text
stringlengths
3
1.05M
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["cascade-picker"] = factory(); else root["cube"] = root["cube"] || {}, root["cube"]["cascade-picker"] = factory(); })(typeof self !== 'undefined' ? self : this, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "./"; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 261); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { var core = module.exports = { version: '2.5.7' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /* 1 */ /***/ (function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(21)('wks'); var uid = __webpack_require__(17); var Symbol = __webpack_require__(1).Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(9)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(11); var IE8_DOM_DEFINE = __webpack_require__(29); var toPrimitive = __webpack_require__(24); var dP = Object.defineProperty; exports.f = __webpack_require__(3) ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /* 5 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /* 6 */ /***/ (function(module, exports) { /* globals __VUE_SSR_CONTEXT__ */ // this module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle module.exports = function normalizeComponent ( rawScriptExports, compiledTemplate, injectStyles, scopeId, moduleIdentifier /* server only */ ) { var esModule var scriptExports = rawScriptExports = rawScriptExports || {} // ES6 modules interop var type = typeof rawScriptExports.default if (type === 'object' || type === 'function') { esModule = rawScriptExports scriptExports = rawScriptExports.default } // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (compiledTemplate) { options.render = compiledTemplate.render options.staticRenderFns = compiledTemplate.staticRenderFns } // scopedId if (scopeId) { options._scopeId = scopeId } var hook if (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || // cached call (this.$vnode && this.$vnode.ssrContext) || // stateful (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else if (injectStyles) { hook = injectStyles } if (hook) { var functional = options.functional var existing = functional ? options.render : options.beforeCreate if (!functional) { // inject component registration as beforeCreate hook options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } else { // register for functioal component in vue file options.render = function renderWithStyleInjection (h, context) { hook.call(context) return existing(h, context) } } } return { esModule: esModule, exports: scriptExports, options: options } } /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(4); var createDesc = __webpack_require__(14); module.exports = __webpack_require__(3) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(33); var defined = __webpack_require__(18); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /* 9 */ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; /***/ }), /* 10 */ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(10); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(1); var core = __webpack_require__(0); var ctx = __webpack_require__(35); var hide = __webpack_require__(7); var has = __webpack_require__(5); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var IS_WRAP = type & $export.W; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE]; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; var key, own, out; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; if (own && has(exports, key)) continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function (C) { var F = function (a, b, c) { if (this instanceof C) { switch (arguments.length) { case 0: return new C(); case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if (IS_PROTO) { (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), /* 13 */ /***/ (function(module, exports) { module.exports = {}; /***/ }), /* 14 */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(30); var enumBugKeys = __webpack_require__(22); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), /* 16 */ /***/ (function(module, exports) { module.exports = true; /***/ }), /* 17 */ /***/ (function(module, exports) { var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /* 18 */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /* 19 */ /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(21)('keys'); var uid = __webpack_require__(17); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(0); var global = __webpack_require__(1); var SHARED = '__core-js_shared__'; var store = global[SHARED] || (global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: core.version, mode: __webpack_require__(16) ? 'pure' : 'global', copyright: '© 2018 Denis Pushkarev (zloirock.ru)' }); /***/ }), /* 22 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /* 23 */ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), /* 24 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(10); // 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"); }; /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(18); module.exports = function (it) { return Object(defined(it)); }; /***/ }), /* 26 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /* 27 */ /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(4).f; var has = __webpack_require__(5); var TAG = __webpack_require__(2)('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; /***/ }), /* 28 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(10); var document = __webpack_require__(1).document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; /***/ }), /* 29 */ /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(3) && !__webpack_require__(9)(function () { return Object.defineProperty(__webpack_require__(28)('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 30 */ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(5); var toIObject = __webpack_require__(8); var arrayIndexOf = __webpack_require__(45)(false); var IE_PROTO = __webpack_require__(20)('IE_PROTO'); module.exports = function (object, names) { var O = toIObject(object); var i = 0; var result = []; var key; for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }), /* 31 */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /* 32 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(exports); } else { var mod = { exports: {} }; factory(mod.exports); global.debug = mod.exports; } })(this, function (exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var warn = exports.warn = function warn(msg, componentName) { if (process.env.NODE_ENV !== 'production') { var component = componentName ? '<' + componentName + '> ' : ''; console.error('[Cube warn]: ' + component + msg); } }; var tip = exports.tip = function tip(msg, componentName) { if (process.env.NODE_ENV !== 'production') { var component = componentName ? '<' + componentName + '> ' : ''; console.warn('[Cube tip]: ' + component + msg); } }; }); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(61))) /***/ }), /* 33 */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(26); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), /* 34 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var LIBRARY = __webpack_require__(16); var $export = __webpack_require__(12); var redefine = __webpack_require__(39); var hide = __webpack_require__(7); var Iterators = __webpack_require__(13); var $iterCreate = __webpack_require__(51); var setToStringTag = __webpack_require__(27); var getPrototypeOf = __webpack_require__(54); var ITERATOR = __webpack_require__(2)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; var VALUES = 'values'; var returnThis = function () { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function (kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; } return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator'; var DEF_VALUES = DEFAULT == VALUES; var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; var $default = $native || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; // Fix native if ($anyNative) { IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if (DEF_VALUES && $native && $native.name !== VALUES) { VALUES_BUG = true; $default = function values() { return $native.call(this); }; } // Define iterator if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if (DEFAULT) { methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if (FORCED) for (key in methods) { if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }), /* 35 */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(43); 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); }; }; /***/ }), /* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(62); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (obj, key, value) { if (key in obj) { (0, _defineProperty2.default)(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }; /***/ }), /* 37 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(19); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $at = __webpack_require__(50)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(34)(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function () { var O = this._t; var index = this._i; var point; if (index >= O.length) return { value: undefined, done: true }; point = $at(O, index); this._i += point.length; return { value: point, done: false }; }); /***/ }), /* 39 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(7); /***/ }), /* 40 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(11); var dPs = __webpack_require__(52); var enumBugKeys = __webpack_require__(22); var IE_PROTO = __webpack_require__(20)('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(28)('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; __webpack_require__(53).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { Empty[PROTOTYPE] = anObject(O); result = new Empty(); Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }), /* 41 */ /***/ (function(module, exports, __webpack_require__) { exports.f = __webpack_require__(2); /***/ }), /* 42 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(1); var core = __webpack_require__(0); var LIBRARY = __webpack_require__(16); var wksExt = __webpack_require__(41); var defineProperty = __webpack_require__(4).f; module.exports = function (name) { var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; /***/ }), /* 43 */ /***/ (function(module, exports) { module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /* 44 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(60), __webpack_require__(36), __webpack_require__(65), __webpack_require__(48)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(exports, require('babel-runtime/core-js/object/keys'), require('babel-runtime/helpers/defineProperty'), require('babel-runtime/helpers/typeof'), require('../lang/string')); } else { var mod = { exports: {} }; factory(mod.exports, global.keys, global.defineProperty, global._typeof, global.string); global.util = mod.exports; } })(this, function (exports, _keys, _defineProperty2, _typeof2, _string) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.isNumber = exports.isObject = exports.isString = exports.isArray = exports.isFunc = exports.isUndef = exports.parsePath = exports.processComponentName = exports.debounce = exports.cb2PromiseWithResolve = exports.parallel = exports.resetTypeValue = exports.createAddAPI = exports.deepAssign = exports.findIndex = undefined; var _keys2 = _interopRequireDefault(_keys); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function findIndex(ary, fn) { if (ary.findIndex) { return ary.findIndex(fn); } var index = -1; ary.some(function (item, i, ary) { var ret = fn.call(this, item, i, ary); if (ret) { index = i; return ret; } }); return index; } function deepAssign(to, from) { for (var key in from) { if (!to[key] || (0, _typeof3.default)(to[key]) !== 'object') { to[key] = from[key]; } else { deepAssign(to[key], from[key]); } } } function createAddAPI(baseObj) { return function add() { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } if (typeof args[0] === 'string') { args[0] = (0, _defineProperty3.default)({}, args[0], args[1]); } deepAssign(baseObj, args[0]); }; } function judgeTypeFnCreator(type) { var toString = Object.prototype.toString; return function isType(o) { return toString.call(o) === '[object ' + type + ']'; }; } var typesReset = { _set: function _set(obj, key, value) { obj[key] = value; }, string: function string(obj, key) { typesReset._set(obj, key, ''); }, number: function number(obj, key) { typesReset._set(obj, key, 0); }, boolean: function boolean(obj, key) { typesReset._set(obj, key, false); }, object: function object(obj, key, value) { if (Array.isArray(value)) { typesReset._set(obj, key, []); } else { typesReset._set(obj, key, {}); } } }; function resetTypeValue(obj, key, defVal) { if (defVal !== undefined) { return typesReset._set(obj, key, defVal); } if (key) { var value = obj[key]; var resetHandler = typesReset[typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)]; resetHandler && resetHandler(obj, key, value); } else { (0, _keys2.default)(obj).forEach(function (key) { resetTypeValue(obj, key); }); } } function parallel(tasks, cb) { var doneCount = 0; var results = []; var tasksLen = tasks.length; if (!tasksLen) { return cb(results); } tasks.forEach(function (task, i) { task(function (ret) { doneCount += 1; results[i] = ret; if (doneCount === tasksLen) { cb(results); } }); }); } function cb2PromiseWithResolve(cb) { var promise = void 0; if (typeof window.Promise !== 'undefined') { var _cb = cb; promise = new window.Promise(function (resolve) { cb = function cb(data) { _cb && _cb(data); resolve(data); }; }); promise.resolve = cb; } return promise; } function debounce(func, wait, immediate, initValue) { var timeout = void 0; var result = initValue; var later = function later(context, args) { timeout = null; if (args) { result = func.apply(context, args); } }; var debounced = function debounced() { var _this = this; for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } if (timeout) { clearTimeout(timeout); } if (immediate) { var callNow = !timeout; timeout = setTimeout(later, wait); if (callNow) { result = func.apply(this, args); } } else { timeout = setTimeout(function () { later(_this, args); }, wait); } return result; }; debounced.cancel = function () { clearTimeout(timeout); timeout = null; }; return debounced; } function processComponentName(Component) { var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref$prefix = _ref.prefix, prefix = _ref$prefix === undefined ? '' : _ref$prefix, _ref$firstUpperCase = _ref.firstUpperCase, firstUpperCase = _ref$firstUpperCase === undefined ? false : _ref$firstUpperCase; var name = Component.name; var pureName = name.replace(/^cube-/i, ''); var camelizeName = '' + (0, _string.camelize)('' + prefix + pureName); if (firstUpperCase) { camelizeName = camelizeName.charAt(0).toUpperCase() + camelizeName.slice(1); } return camelizeName; } function parsePath(obj) { var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var segments = path.split('.'); var result = obj; for (var i = 0; i < segments.length; i++) { var key = segments[i]; if (isUndef(result[key])) { result = ''; break; } else { result = result[key]; } } return result; } var isFunc = judgeTypeFnCreator('Function'); var isUndef = judgeTypeFnCreator('Undefined'); var isArray = judgeTypeFnCreator('Array'); var isString = judgeTypeFnCreator('String'); var isObject = judgeTypeFnCreator('Object'); var isNumber = judgeTypeFnCreator('Number'); exports.findIndex = findIndex; exports.deepAssign = deepAssign; exports.createAddAPI = createAddAPI; exports.resetTypeValue = resetTypeValue; exports.parallel = parallel; exports.cb2PromiseWithResolve = cb2PromiseWithResolve; exports.debounce = debounce; exports.processComponentName = processComponentName; exports.parsePath = parsePath; exports.isUndef = isUndef; exports.isFunc = isFunc; exports.isArray = isArray; exports.isString = isString; exports.isObject = isObject; exports.isNumber = isNumber; }); /***/ }), /* 45 */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(8); var toLength = __webpack_require__(37); var toAbsoluteIndex = __webpack_require__(46); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); var length = toLength(O.length); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) if (IS_INCLUDES || index in O) { if (O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(19); var max = Math.max; var min = Math.min; module.exports = function (index, length) { index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }), /* 47 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(55); var global = __webpack_require__(1); var hide = __webpack_require__(7); var Iterators = __webpack_require__(13); var TO_STRING_TAG = __webpack_require__(2)('toStringTag'); var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + 'TextTrackList,TouchList').split(','); for (var i = 0; i < DOMIterables.length; i++) { var NAME = DOMIterables[i]; var Collection = global[NAME]; var proto = Collection && Collection.prototype; if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; } /***/ }), /* 48 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(exports); } else { var mod = { exports: {} }; factory(mod.exports); global.string = mod.exports; } })(this, function (exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.camelize = camelize; exports.kebab = kebab; var camelizeRE = /-(\w)/g; function camelize(str) { str = String(str); return str.replace(camelizeRE, function (m, c) { return c ? c.toUpperCase() : ''; }); } function kebab(str) { str = String(str); return str.replace(/([A-Z])/g, '-$1').toLowerCase(); } }); /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(module, exports); } else { var mod = { exports: {} }; factory(mod, mod.exports); global.visibility = mod.exports; } })(this, function (module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var EVENT_TOGGLE = 'toggle'; exports.default = { model: { prop: 'visible', event: EVENT_TOGGLE }, props: { visible: { type: Boolean, default: false } }, data: function data() { return { isVisible: false }; }, watch: { isVisible: function isVisible(newVal) { this.$emit(EVENT_TOGGLE, newVal); } }, mounted: function mounted() { var _this = this; this.$watch('visible', function (newVal, oldVal) { if (newVal) { _this.show(); } else if (oldVal && !_this._createAPI_reuse) { _this.hide(); } }, { immediate: true }); }, methods: { show: function show() { this.isVisible = true; }, hide: function hide() { this.isVisible = false; } } }; module.exports = exports['default']; }); /***/ }), /* 50 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(19); var defined = __webpack_require__(18); // true -> String#at // false -> String#codePointAt module.exports = function (TO_STRING) { return function (that, pos) { var s = String(defined(that)); var i = toInteger(pos); var l = s.length; var 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; }; }; /***/ }), /* 51 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var create = __webpack_require__(40); var descriptor = __webpack_require__(14); var setToStringTag = __webpack_require__(27); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __webpack_require__(7)(IteratorPrototype, __webpack_require__(2)('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }), /* 52 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(4); var anObject = __webpack_require__(11); var getKeys = __webpack_require__(15); module.exports = __webpack_require__(3) ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = getKeys(Properties); var length = keys.length; var i = 0; var P; while (length > i) dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }), /* 53 */ /***/ (function(module, exports, __webpack_require__) { var document = __webpack_require__(1).document; module.exports = document && document.documentElement; /***/ }), /* 54 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(5); var toObject = __webpack_require__(25); var IE_PROTO = __webpack_require__(20)('IE_PROTO'); var 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; }; /***/ }), /* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var addToUnscopables = __webpack_require__(56); var step = __webpack_require__(57); var Iterators = __webpack_require__(13); var toIObject = __webpack_require__(8); // 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__(34)(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; var kind = this._k; var 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'); /***/ }), /* 56 */ /***/ (function(module, exports) { module.exports = function () { /* empty */ }; /***/ }), /* 57 */ /***/ (function(module, exports) { module.exports = function (done, value) { return { value: value, done: !!done }; }; /***/ }), /* 58 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = __webpack_require__(30); var hiddenKeys = __webpack_require__(22).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); }; /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(module, exports); } else { var mod = { exports: {} }; factory(mod, mod.exports); global.popup = mod.exports; } })(this, function (module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { props: { zIndex: { type: Number, default: 100 }, maskClosable: { type: Boolean, default: false } } }; module.exports = exports["default"]; }); /***/ }), /* 60 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(69), __esModule: true }; /***/ }), /* 61 */ /***/ (function(module, exports) { // 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 defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } 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 = runTimeout(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; runClearTimeout(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) { runTimeout(drainQueue); } }; // 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.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return [] } 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; }; /***/ }), /* 62 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(63), __esModule: true }; /***/ }), /* 63 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(64); var $Object = __webpack_require__(0).Object; module.exports = function defineProperty(it, key, desc) { return $Object.defineProperty(it, key, desc); }; /***/ }), /* 64 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(12); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(3), 'Object', { defineProperty: __webpack_require__(4).f }); /***/ }), /* 65 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _iterator = __webpack_require__(75); var _iterator2 = _interopRequireDefault(_iterator); var _symbol = __webpack_require__(77); var _symbol2 = _interopRequireDefault(_symbol); var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { return typeof obj === "undefined" ? "undefined" : _typeof(obj); } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); }; /***/ }), /* 66 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(36), __webpack_require__(100), __webpack_require__(32), __webpack_require__(44), __webpack_require__(90)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(module, exports, require('babel-runtime/helpers/defineProperty'), require('../../locale/lang/zh-CN'), require('../helpers/debug'), require('../helpers/util'), require('../lang/date')); } else { var mod = { exports: {} }; factory(mod, mod.exports, global.defineProperty, global.zhCN, global.debug, global.util, global.date); global.index = mod.exports; } })(this, function (module, exports, _defineProperty2, _zhCN, _debug, _util, _date) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _zhCN2 = _interopRequireDefault(_zhCN); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var proto = void 0; var DEFAULT_LANG = 'zh-CN'; var locale = { name: 'locale', install: function install(Vue) { if (locale.installed) return; proto = Vue.prototype; Vue.util.defineReactive(proto, '$cubeLang', DEFAULT_LANG); proto['$cubeMessages'] = (0, _defineProperty3.default)({}, DEFAULT_LANG, _zhCN2.default); locale.installed = true; }, use: function use(lang, messages) { proto['$cubeLang'] = lang; var cubeMessages = proto['$cubeMessages']; if (!(lang in cubeMessages)) { cubeMessages[[lang]] = messages; } }, helpers: { toLocaleDateString: function toLocaleDateString(config, formatRules) { var compatibleConfig = (0, _util.isNumber)(config) ? config : config.replace(/-/g, '/'); var date = new Date(compatibleConfig); if ((0, _util.isUndef)(formatRules)) return date.toDateString(); return (0, _date.formatDate)(date, formatRules); } }, addHelper: function addHelper(fnName, fn) { if (fnName in locale.helpers) { (0, _debug.warn)(fnName + ' has already been registered on helpers function, please change another name'); return; } locale.helpers[fnName] = fn; } }; exports.default = locale; module.exports = exports['default']; }); /***/ }), /* 67 */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(26); var TAG = __webpack_require__(2)('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (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; }; /***/ }), /* 68 */, /* 69 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(70); module.exports = __webpack_require__(0).Object.keys; /***/ }), /* 70 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 Object.keys(O) var toObject = __webpack_require__(25); var $keys = __webpack_require__(15); __webpack_require__(71)('keys', function () { return function keys(it) { return $keys(toObject(it)); }; }); /***/ }), /* 71 */ /***/ (function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__(12); var core = __webpack_require__(0); var fails = __webpack_require__(9); module.exports = function (KEY, exec) { var fn = (core.Object || {})[KEY] || Object[KEY]; var exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; /***/ }), /* 72 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(95)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(module, exports, require('vue-create-api')); } else { var mod = { exports: {} }; factory(mod, mod.exports, global.vueCreateApi); global.createApi = mod.exports; } })(this, function (module, exports, _vueCreateApi) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = createAPI; var _vueCreateApi2 = _interopRequireDefault(_vueCreateApi); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function createAPI(Vue, Component, events, single) { Vue.use(_vueCreateApi2.default, { componentPrefix: 'cube-' }); var api = Vue.createAPI(Component, events, single); return api; } module.exports = exports['default']; }); /***/ }), /* 73 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(66), __webpack_require__(44), __webpack_require__(32)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(module, exports, require('../locale'), require('../helpers/util'), require('../helpers/debug')); } else { var mod = { exports: {} }; factory(mod, mod.exports, global.locale, global.util, global.debug); global.locale = mod.exports; } })(this, function (module, exports, _locale, _util, _debug) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _locale2 = _interopRequireDefault(_locale); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var TRANSLATION_ABSENT = 'Translation is not registered correctly, ' + 'you can call Locale.use() to install it.'; exports.default = { computed: { $t: function $t() { var lang = this.$cubeLang; var messages = this.$cubeMessages[lang]; if ((0, _util.isUndef)(messages)) { (0, _debug.warn)(TRANSLATION_ABSENT); return ''; } return function (path) { return (0, _util.parsePath)(messages, path); }; } }, beforeCreate: function beforeCreate() { _locale2.default.install(this.$root.constructor); } }; module.exports = exports['default']; }); /***/ }), /* 74 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /*! * better-normal-scroll v1.12.6 * (c) 2016-2018 ustbhuangyi * Released under the MIT License. */ var slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var toConsumableArray = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }; function eventMixin(BScroll) { BScroll.prototype.on = function (type, fn) { var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this; if (!this._events[type]) { this._events[type] = []; } this._events[type].push([fn, context]); }; BScroll.prototype.once = function (type, fn) { var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this; function magic() { this.off(type, magic); fn.apply(context, arguments); } // To expose the corresponding function method in order to execute the off method magic.fn = fn; this.on(type, magic); }; BScroll.prototype.off = function (type, fn) { var _events = this._events[type]; if (!_events) { return; } var count = _events.length; while (count--) { if (_events[count][0] === fn || _events[count][0] && _events[count][0].fn === fn) { _events[count][0] = undefined; } } }; BScroll.prototype.trigger = function (type) { var events = this._events[type]; if (!events) { return; } var len = events.length; var eventsCopy = [].concat(toConsumableArray(events)); for (var i = 0; i < len; i++) { var event = eventsCopy[i]; var _event = slicedToArray(event, 2), fn = _event[0], context = _event[1]; if (fn) { fn.apply(context, [].slice.call(arguments, 1)); } } }; } // ssr support var inBrowser = typeof window !== 'undefined'; var ua = inBrowser && navigator.userAgent.toLowerCase(); var isWeChatDevTools = ua && /wechatdevtools/.test(ua); var isAndroid = ua && ua.indexOf('android') > 0; function getNow() { return window.performance && window.performance.now ? window.performance.now() + window.performance.timing.navigationStart : +new Date(); } function extend(target) { for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { rest[_key - 1] = arguments[_key]; } for (var i = 0; i < rest.length; i++) { var source = rest[i]; for (var key in source) { target[key] = source[key]; } } return target; } function isUndef(v) { return v === undefined || v === null; } function getDistance(x, y) { return Math.sqrt(x * x + y * y); } var elementStyle = inBrowser && document.createElement('div').style; var vendor = function () { if (!inBrowser) { return false; } var transformNames = { webkit: 'webkitTransform', Moz: 'MozTransform', O: 'OTransform', ms: 'msTransform', standard: 'transform' }; for (var key in transformNames) { if (elementStyle[transformNames[key]] !== undefined) { return key; } } return false; }(); function prefixStyle(style) { if (vendor === false) { return false; } if (vendor === 'standard') { if (style === 'transitionEnd') { return 'transitionend'; } return style; } return vendor + style.charAt(0).toUpperCase() + style.substr(1); } function addEvent(el, type, fn, capture) { el.addEventListener(type, fn, { passive: false, capture: !!capture }); } function removeEvent(el, type, fn, capture) { el.removeEventListener(type, fn, { passive: false, capture: !!capture }); } function offset(el) { var left = 0; var top = 0; while (el) { left -= el.offsetLeft; top -= el.offsetTop; el = el.offsetParent; } return { left: left, top: top }; } function offsetToBody(el) { var rect = el.getBoundingClientRect(); return { left: -(rect.left + window.pageXOffset), top: -(rect.top + window.pageYOffset) }; } var transform = prefixStyle('transform'); var hasPerspective = inBrowser && prefixStyle('perspective') in elementStyle; // fix issue #361 var hasTouch = inBrowser && ('ontouchstart' in window || isWeChatDevTools); var hasTransform = transform !== false; var hasTransition = inBrowser && prefixStyle('transition') in elementStyle; var style = { transform: transform, transitionTimingFunction: prefixStyle('transitionTimingFunction'), transitionDuration: prefixStyle('transitionDuration'), transitionDelay: prefixStyle('transitionDelay'), transformOrigin: prefixStyle('transformOrigin'), transitionEnd: prefixStyle('transitionEnd') }; var TOUCH_EVENT = 1; var MOUSE_EVENT = 2; var eventType = { touchstart: TOUCH_EVENT, touchmove: TOUCH_EVENT, touchend: TOUCH_EVENT, mousedown: MOUSE_EVENT, mousemove: MOUSE_EVENT, mouseup: MOUSE_EVENT }; function getRect(el) { if (el instanceof window.SVGElement) { var rect = el.getBoundingClientRect(); return { top: rect.top, left: rect.left, width: rect.width, height: rect.height }; } else { return { top: el.offsetTop, left: el.offsetLeft, width: el.offsetWidth, height: el.offsetHeight }; } } function preventDefaultException(el, exceptions) { for (var i in exceptions) { if (exceptions[i].test(el[i])) { return true; } } return false; } function tap(e, eventName) { var ev = document.createEvent('Event'); ev.initEvent(eventName, true, true); ev.pageX = e.pageX; ev.pageY = e.pageY; e.target.dispatchEvent(ev); } function click(e) { var event = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'click'; var eventSource = void 0; if (e.type === 'mouseup' || e.type === 'mousecancel') { eventSource = e; } else if (e.type === 'touchend' || e.type === 'touchcancel') { eventSource = e.changedTouches[0]; } var posSrc = {}; if (eventSource) { posSrc.screenX = eventSource.screenX || 0; posSrc.screenY = eventSource.screenY || 0; posSrc.clientX = eventSource.clientX || 0; posSrc.clientY = eventSource.clientY || 0; } var ev = void 0; var bubbles = true; var cancelable = true; if (typeof MouseEvent !== 'undefined') { try { ev = new MouseEvent(event, extend({ bubbles: bubbles, cancelable: cancelable }, posSrc)); } catch (e) { createEvent(); } } else { createEvent(); } function createEvent() { ev = document.createEvent('Event'); ev.initEvent(event, bubbles, cancelable); extend(ev, posSrc); } // forwardedTouchEvent set to true in case of the conflict with fastclick ev.forwardedTouchEvent = true; ev._constructed = true; e.target.dispatchEvent(ev); } function dblclick(e) { click(e, 'dblclick'); } function prepend(el, target) { if (target.firstChild) { before(el, target.firstChild); } else { target.appendChild(el); } } function before(el, target) { target.parentNode.insertBefore(el, target); } function removeChild(el, child) { el.removeChild(child); } var DEFAULT_OPTIONS = { startX: 0, startY: 0, scrollX: false, scrollY: true, freeScroll: false, directionLockThreshold: 5, eventPassthrough: '', click: false, tap: false, /** * support any side * bounce: { * top: true, * bottom: true, * left: true, * right: true * } */ bounce: true, bounceTime: 800, momentum: true, momentumLimitTime: 300, momentumLimitDistance: 15, swipeTime: 2500, swipeBounceTime: 500, deceleration: 0.0015, flickLimitTime: 200, flickLimitDistance: 100, resizePolling: 60, probeType: 0, preventDefault: true, preventDefaultException: { tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/ }, HWCompositing: true, useTransition: true, useTransform: true, bindToWrapper: false, disableMouse: hasTouch, disableTouch: !hasTouch, observeDOM: true, autoBlur: true, /** * for picker * wheel: { * selectedIndex: 0, * rotate: 25, * adjustTime: 400 * wheelWrapperClass: 'wheel-scroll', * wheelItemClass: 'wheel-item' * } */ wheel: false, /** * for slide * snap: { * loop: false, * el: domEl, * threshold: 0.1, * stepX: 100, * stepY: 100, * speed: 400, * easing: { * style: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)', * fn: function (t) { * return t * (2 - t) * } * } * listenFlick: true * } */ snap: false, /** * for scrollbar * scrollbar: { * fade: true, * interactive: false * } */ scrollbar: false, /** * for pull down and refresh * pullDownRefresh: { * threshold: 50, * stop: 20 * } */ pullDownRefresh: false, /** * for pull up and load * pullUpLoad: { * threshold: 50 * } */ pullUpLoad: false, /** * for mouse wheel * mouseWheel: { * speed: 20, * invert: false, * easeTime: 300 * } */ mouseWheel: false, stopPropagation: false, /** * for zoom * zoom: { * start: 1, * min: 1, * max: 4 * } */ zoom: false, /** * for infinity * infinity: { * render(item, div) { * }, * createTombstone() { * }, * fetch(count) { * } * } */ infinity: false, /** * for double click * dblclick: { * delay: 300 * } */ dblclick: false }; function initMixin(BScroll) { BScroll.prototype._init = function (el, options) { this._handleOptions(options); // init private custom events this._events = {}; this.x = 0; this.y = 0; this.directionX = 0; this.directionY = 0; this.setScale(1); this._addDOMEvents(); this._initExtFeatures(); this._watchTransition(); if (this.options.observeDOM) { this._initDOMObserver(); } if (this.options.autoBlur) { this._handleAutoBlur(); } this.refresh(); if (!this.options.snap) { this.scrollTo(this.options.startX, this.options.startY); } this.enable(); }; BScroll.prototype.setScale = function (scale) { this.lastScale = isUndef(this.scale) ? scale : this.scale; this.scale = scale; }; BScroll.prototype._handleOptions = function (options) { this.options = extend({}, DEFAULT_OPTIONS, options); this.translateZ = this.options.HWCompositing && hasPerspective ? ' translateZ(0)' : ''; this.options.useTransition = this.options.useTransition && hasTransition; this.options.useTransform = this.options.useTransform && hasTransform; this.options.preventDefault = !this.options.eventPassthrough && this.options.preventDefault; // If you want eventPassthrough I have to lock one of the axes this.options.scrollX = this.options.eventPassthrough === 'horizontal' ? false : this.options.scrollX; this.options.scrollY = this.options.eventPassthrough === 'vertical' ? false : this.options.scrollY; // With eventPassthrough we also need lockDirection mechanism this.options.freeScroll = this.options.freeScroll && !this.options.eventPassthrough; this.options.directionLockThreshold = this.options.eventPassthrough ? 0 : this.options.directionLockThreshold; if (this.options.tap === true) { this.options.tap = 'tap'; } }; BScroll.prototype._addDOMEvents = function () { var eventOperation = addEvent; this._handleDOMEvents(eventOperation); }; BScroll.prototype._removeDOMEvents = function () { var eventOperation = removeEvent; this._handleDOMEvents(eventOperation); }; BScroll.prototype._handleDOMEvents = function (eventOperation) { var target = this.options.bindToWrapper ? this.wrapper : window; eventOperation(window, 'orientationchange', this); eventOperation(window, 'resize', this); if (this.options.click) { eventOperation(this.wrapper, 'click', this, true); } if (!this.options.disableMouse) { eventOperation(this.wrapper, 'mousedown', this); eventOperation(target, 'mousemove', this); eventOperation(target, 'mousecancel', this); eventOperation(target, 'mouseup', this); } if (hasTouch && !this.options.disableTouch) { eventOperation(this.wrapper, 'touchstart', this); eventOperation(target, 'touchmove', this); eventOperation(target, 'touchcancel', this); eventOperation(target, 'touchend', this); } eventOperation(this.scroller, style.transitionEnd, this); }; BScroll.prototype._initExtFeatures = function () { if (this.options.snap) { this._initSnap(); } if (this.options.scrollbar) { this._initScrollbar(); } if (this.options.pullUpLoad) { this._initPullUp(); } if (this.options.pullDownRefresh) { this._initPullDown(); } if (this.options.wheel) { this._initWheel(); } if (this.options.mouseWheel) { this._initMouseWheel(); } if (this.options.zoom) { this._initZoom(); } if (this.options.infinity) { this._initInfinite(); } }; BScroll.prototype._watchTransition = function () { if (typeof Object.defineProperty !== 'function') { return; } var me = this; var isInTransition = false; var key = this.useTransition ? 'isInTransition' : 'isAnimating'; Object.defineProperty(this, key, { get: function get() { return isInTransition; }, set: function set(newVal) { isInTransition = newVal; // fix issue #359 var el = me.scroller.children.length ? me.scroller.children : [me.scroller]; var pointerEvents = isInTransition && !me.pulling ? 'none' : 'auto'; for (var i = 0; i < el.length; i++) { el[i].style.pointerEvents = pointerEvents; } } }); }; BScroll.prototype._handleAutoBlur = function () { this.on('beforeScrollStart', function () { var activeElement = document.activeElement; if (activeElement && (activeElement.tagName === 'INPUT' || activeElement.tagName === 'TEXTAREA')) { activeElement.blur(); } }); }; BScroll.prototype._initDOMObserver = function () { var _this = this; if (typeof MutationObserver !== 'undefined') { var timer = void 0; var observer = new MutationObserver(function (mutations) { // don't do any refresh during the transition, or outside of the boundaries if (_this._shouldNotRefresh()) { return; } var immediateRefresh = false; var deferredRefresh = false; for (var i = 0; i < mutations.length; i++) { var mutation = mutations[i]; if (mutation.type !== 'attributes') { immediateRefresh = true; break; } else { if (mutation.target !== _this.scroller) { deferredRefresh = true; break; } } } if (immediateRefresh) { _this.refresh(); } else if (deferredRefresh) { // attributes changes too often clearTimeout(timer); timer = setTimeout(function () { if (!_this._shouldNotRefresh()) { _this.refresh(); } }, 60); } }); var config = { attributes: true, childList: true, subtree: true }; observer.observe(this.scroller, config); this.on('destroy', function () { observer.disconnect(); }); } else { this._checkDOMUpdate(); } }; BScroll.prototype._shouldNotRefresh = function () { var outsideBoundaries = this.x > this.minScrollX || this.x < this.maxScrollX || this.y > this.minScrollY || this.y < this.maxScrollY; return this.isInTransition || this.stopFromTransition || outsideBoundaries; }; BScroll.prototype._checkDOMUpdate = function () { var scrollerRect = getRect(this.scroller); var oldWidth = scrollerRect.width; var oldHeight = scrollerRect.height; function check() { if (this.destroyed) { return; } scrollerRect = getRect(this.scroller); var newWidth = scrollerRect.width; var newHeight = scrollerRect.height; if (oldWidth !== newWidth || oldHeight !== newHeight) { this.refresh(); } oldWidth = newWidth; oldHeight = newHeight; next.call(this); } function next() { var _this2 = this; setTimeout(function () { check.call(_this2); }, 1000); } next.call(this); }; BScroll.prototype.handleEvent = function (e) { switch (e.type) { case 'touchstart': case 'mousedown': this._start(e); if (this.options.zoom && e.touches && e.touches.length > 1) { this._zoomStart(e); } break; case 'touchmove': case 'mousemove': if (this.options.zoom && e.touches && e.touches.length > 1) { this._zoom(e); } else { this._move(e); } break; case 'touchend': case 'mouseup': case 'touchcancel': case 'mousecancel': if (this.scaled) { this._zoomEnd(e); } else { this._end(e); } break; case 'orientationchange': case 'resize': this._resize(); break; case 'transitionend': case 'webkitTransitionEnd': case 'oTransitionEnd': case 'MSTransitionEnd': this._transitionEnd(e); break; case 'click': if (this.enabled && !e._constructed) { if (!preventDefaultException(e.target, this.options.preventDefaultException)) { e.preventDefault(); e.stopPropagation(); } } break; case 'wheel': case 'DOMMouseScroll': case 'mousewheel': this._onMouseWheel(e); break; } }; BScroll.prototype.refresh = function () { var isWrapperStatic = window.getComputedStyle(this.wrapper, null).position === 'static'; var wrapperRect = getRect(this.wrapper); this.wrapperWidth = wrapperRect.width; this.wrapperHeight = wrapperRect.height; var scrollerRect = getRect(this.scroller); this.scrollerWidth = Math.round(scrollerRect.width * this.scale); this.scrollerHeight = Math.round(scrollerRect.height * this.scale); this.relativeX = scrollerRect.left; this.relativeY = scrollerRect.top; if (isWrapperStatic) { this.relativeX -= wrapperRect.left; this.relativeY -= wrapperRect.top; } this.minScrollX = 0; this.minScrollY = 0; var wheel = this.options.wheel; if (wheel) { this.items = this.scroller.children; this.options.itemHeight = this.itemHeight = this.items.length ? this.scrollerHeight / this.items.length : 0; if (this.selectedIndex === undefined) { this.selectedIndex = wheel.selectedIndex || 0; } this.options.startY = -this.selectedIndex * this.itemHeight; this.maxScrollX = 0; this.maxScrollY = -this.itemHeight * (this.items.length - 1); } else { this.maxScrollX = this.wrapperWidth - this.scrollerWidth; if (!this.options.infinity) { this.maxScrollY = this.wrapperHeight - this.scrollerHeight; } if (this.maxScrollX < 0) { this.maxScrollX -= this.relativeX; this.minScrollX = -this.relativeX; } else if (this.scale > 1) { this.maxScrollX = this.maxScrollX / 2 - this.relativeX; this.minScrollX = this.maxScrollX; } if (this.maxScrollY < 0) { this.maxScrollY -= this.relativeY; this.minScrollY = -this.relativeY; } else if (this.scale > 1) { this.maxScrollY = this.maxScrollY / 2 - this.relativeY; this.minScrollY = this.maxScrollY; } } this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < this.minScrollX; this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < this.minScrollY; if (!this.hasHorizontalScroll) { this.maxScrollX = this.minScrollX; this.scrollerWidth = this.wrapperWidth; } if (!this.hasVerticalScroll) { this.maxScrollY = this.minScrollY; this.scrollerHeight = this.wrapperHeight; } this.endTime = 0; this.directionX = 0; this.directionY = 0; this.wrapperOffset = offset(this.wrapper); this.trigger('refresh'); !this.scaled && this.resetPosition(); }; BScroll.prototype.enable = function () { this.enabled = true; }; BScroll.prototype.disable = function () { this.enabled = false; }; } var ease = { // easeOutQuint swipe: { style: 'cubic-bezier(0.23, 1, 0.32, 1)', fn: function fn(t) { return 1 + --t * t * t * t * t; } }, // easeOutQuard swipeBounce: { style: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)', fn: function fn(t) { return t * (2 - t); } }, // easeOutQuart bounce: { style: 'cubic-bezier(0.165, 0.84, 0.44, 1)', fn: function fn(t) { return 1 - --t * t * t * t; } } }; function momentum(current, start, time, lowerMargin, upperMargin, wrapperSize, options) { var distance = current - start; var speed = Math.abs(distance) / time; var deceleration = options.deceleration, itemHeight = options.itemHeight, swipeBounceTime = options.swipeBounceTime, wheel = options.wheel, swipeTime = options.swipeTime; var duration = swipeTime; var rate = wheel ? 4 : 15; var destination = current + speed / deceleration * (distance < 0 ? -1 : 1); if (wheel && itemHeight) { destination = Math.round(destination / itemHeight) * itemHeight; } if (destination < lowerMargin) { destination = wrapperSize ? Math.max(lowerMargin - wrapperSize / 4, lowerMargin - wrapperSize / rate * speed) : lowerMargin; duration = swipeBounceTime; } else if (destination > upperMargin) { destination = wrapperSize ? Math.min(upperMargin + wrapperSize / 4, upperMargin + wrapperSize / rate * speed) : upperMargin; duration = swipeBounceTime; } return { destination: Math.round(destination), duration: duration }; } var DEFAULT_INTERVAL = 100 / 60; function noop() {} var requestAnimationFrame = function () { if (!inBrowser) { /* istanbul ignore if */ return noop; } return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || // if all else fails, use setTimeout function (callback) { return window.setTimeout(callback, (callback.interval || DEFAULT_INTERVAL) / 2); // make interval as precise as possible. }; }(); var cancelAnimationFrame = function () { if (!inBrowser) { /* istanbul ignore if */ return noop; } return window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || function (id) { window.clearTimeout(id); }; }(); var DIRECTION_UP = 1; var DIRECTION_DOWN = -1; var DIRECTION_LEFT = 1; var DIRECTION_RIGHT = -1; var PROBE_DEBOUNCE = 1; var PROBE_REALTIME = 3; function warn(msg) { console.error('[BScroll warn]: ' + msg); } function assert(condition, msg) { if (!condition) { throw new Error('[BScroll] ' + msg); } } function coreMixin(BScroll) { BScroll.prototype._start = function (e) { var _eventType = eventType[e.type]; if (_eventType !== TOUCH_EVENT) { if (e.button !== 0) { return; } } if (!this.enabled || this.destroyed || this.initiated && this.initiated !== _eventType) { return; } this.initiated = _eventType; if (this.options.preventDefault && !preventDefaultException(e.target, this.options.preventDefaultException)) { e.preventDefault(); } if (this.options.stopPropagation) { e.stopPropagation(); } this.moved = false; this.distX = 0; this.distY = 0; this.directionX = 0; this.directionY = 0; this.movingDirectionX = 0; this.movingDirectionY = 0; this.directionLocked = 0; this._transitionTime(); this.startTime = getNow(); if (this.options.wheel) { this.target = e.target; } this.stop(); var point = e.touches ? e.touches[0] : e; this.startX = this.x; this.startY = this.y; this.absStartX = this.x; this.absStartY = this.y; this.pointX = point.pageX; this.pointY = point.pageY; this.trigger('beforeScrollStart'); }; BScroll.prototype._move = function (e) { if (!this.enabled || this.destroyed || eventType[e.type] !== this.initiated) { return; } if (this.options.preventDefault) { e.preventDefault(); } if (this.options.stopPropagation) { e.stopPropagation(); } var point = e.touches ? e.touches[0] : e; var deltaX = point.pageX - this.pointX; var deltaY = point.pageY - this.pointY; this.pointX = point.pageX; this.pointY = point.pageY; this.distX += deltaX; this.distY += deltaY; var absDistX = Math.abs(this.distX); var absDistY = Math.abs(this.distY); var timestamp = getNow(); // We need to move at least momentumLimitDistance pixels for the scrolling to initiate if (timestamp - this.endTime > this.options.momentumLimitTime && absDistY < this.options.momentumLimitDistance && absDistX < this.options.momentumLimitDistance) { return; } // If you are scrolling in one direction lock the other if (!this.directionLocked && !this.options.freeScroll) { if (absDistX > absDistY + this.options.directionLockThreshold) { this.directionLocked = 'h'; // lock horizontally } else if (absDistY >= absDistX + this.options.directionLockThreshold) { this.directionLocked = 'v'; // lock vertically } else { this.directionLocked = 'n'; // no lock } } if (this.directionLocked === 'h') { if (this.options.eventPassthrough === 'vertical') { e.preventDefault(); } else if (this.options.eventPassthrough === 'horizontal') { this.initiated = false; return; } deltaY = 0; } else if (this.directionLocked === 'v') { if (this.options.eventPassthrough === 'horizontal') { e.preventDefault(); } else if (this.options.eventPassthrough === 'vertical') { this.initiated = false; return; } deltaX = 0; } deltaX = this.hasHorizontalScroll ? deltaX : 0; deltaY = this.hasVerticalScroll ? deltaY : 0; this.movingDirectionX = deltaX > 0 ? DIRECTION_RIGHT : deltaX < 0 ? DIRECTION_LEFT : 0; this.movingDirectionY = deltaY > 0 ? DIRECTION_DOWN : deltaY < 0 ? DIRECTION_UP : 0; var newX = this.x + deltaX; var newY = this.y + deltaY; var top = false; var bottom = false; var left = false; var right = false; // Slow down or stop if outside of the boundaries var bounce = this.options.bounce; if (bounce !== false) { top = bounce.top === undefined ? true : bounce.top; bottom = bounce.bottom === undefined ? true : bounce.bottom; left = bounce.left === undefined ? true : bounce.left; right = bounce.right === undefined ? true : bounce.right; } if (newX > this.minScrollX || newX < this.maxScrollX) { if (newX > this.minScrollX && left || newX < this.maxScrollX && right) { newX = this.x + deltaX / 3; } else { newX = newX > this.minScrollX ? this.minScrollX : this.maxScrollX; } } if (newY > this.minScrollY || newY < this.maxScrollY) { if (newY > this.minScrollY && top || newY < this.maxScrollY && bottom) { newY = this.y + deltaY / 3; } else { newY = newY > this.minScrollY ? this.minScrollY : this.maxScrollY; } } if (!this.moved) { this.moved = true; this.trigger('scrollStart'); } this._translate(newX, newY); if (timestamp - this.startTime > this.options.momentumLimitTime) { this.startTime = timestamp; this.startX = this.x; this.startY = this.y; if (this.options.probeType === PROBE_DEBOUNCE) { this.trigger('scroll', { x: this.x, y: this.y }); } } if (this.options.probeType > PROBE_DEBOUNCE) { this.trigger('scroll', { x: this.x, y: this.y }); } var scrollLeft = document.documentElement.scrollLeft || window.pageXOffset || document.body.scrollLeft; var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop; var pX = this.pointX - scrollLeft; var pY = this.pointY - scrollTop; if (pX > document.documentElement.clientWidth - this.options.momentumLimitDistance || pX < this.options.momentumLimitDistance || pY < this.options.momentumLimitDistance || pY > document.documentElement.clientHeight - this.options.momentumLimitDistance) { this._end(e); } }; BScroll.prototype._end = function (e) { if (!this.enabled || this.destroyed || eventType[e.type] !== this.initiated) { return; } this.initiated = false; if (this.options.preventDefault && !preventDefaultException(e.target, this.options.preventDefaultException)) { e.preventDefault(); } if (this.options.stopPropagation) { e.stopPropagation(); } this.trigger('touchEnd', { x: this.x, y: this.y }); this.isInTransition = false; // ensures that the last position is rounded var newX = Math.round(this.x); var newY = Math.round(this.y); var deltaX = newX - this.absStartX; var deltaY = newY - this.absStartY; this.directionX = deltaX > 0 ? DIRECTION_RIGHT : deltaX < 0 ? DIRECTION_LEFT : 0; this.directionY = deltaY > 0 ? DIRECTION_DOWN : deltaY < 0 ? DIRECTION_UP : 0; // if configure pull down refresh, check it first if (this.options.pullDownRefresh && this._checkPullDown()) { return; } // check if it is a click operation if (this._checkClick(e)) { this.trigger('scrollCancel'); return; } // reset if we are outside of the boundaries if (this.resetPosition(this.options.bounceTime, ease.bounce)) { return; } this._translate(newX, newY); this.endTime = getNow(); var duration = this.endTime - this.startTime; var absDistX = Math.abs(newX - this.startX); var absDistY = Math.abs(newY - this.startY); // flick if (this._events.flick && duration < this.options.flickLimitTime && absDistX < this.options.flickLimitDistance && absDistY < this.options.flickLimitDistance) { this.trigger('flick'); return; } var time = 0; // start momentum animation if needed if (this.options.momentum && duration < this.options.momentumLimitTime && (absDistY > this.options.momentumLimitDistance || absDistX > this.options.momentumLimitDistance)) { var top = false; var bottom = false; var left = false; var right = false; var bounce = this.options.bounce; if (bounce !== false) { top = bounce.top === undefined ? true : bounce.top; bottom = bounce.bottom === undefined ? true : bounce.bottom; left = bounce.left === undefined ? true : bounce.left; right = bounce.right === undefined ? true : bounce.right; } var wrapperWidth = this.directionX === DIRECTION_RIGHT && left || this.directionX === DIRECTION_LEFT && right ? this.wrapperWidth : 0; var wrapperHeight = this.directionY === DIRECTION_DOWN && top || this.directionY === DIRECTION_UP && bottom ? this.wrapperHeight : 0; var momentumX = this.hasHorizontalScroll ? momentum(this.x, this.startX, duration, this.maxScrollX, this.minScrollX, wrapperWidth, this.options) : { destination: newX, duration: 0 }; var momentumY = this.hasVerticalScroll ? momentum(this.y, this.startY, duration, this.maxScrollY, this.minScrollY, wrapperHeight, this.options) : { destination: newY, duration: 0 }; newX = momentumX.destination; newY = momentumY.destination; time = Math.max(momentumX.duration, momentumY.duration); this.isInTransition = true; } else { if (this.options.wheel) { newY = Math.round(newY / this.itemHeight) * this.itemHeight; time = this.options.wheel.adjustTime || 400; } } var easing = ease.swipe; if (this.options.snap) { var snap = this._nearestSnap(newX, newY); this.currentPage = snap; time = this.options.snapSpeed || Math.max(Math.max(Math.min(Math.abs(newX - snap.x), 1000), Math.min(Math.abs(newY - snap.y), 1000)), 300); newX = snap.x; newY = snap.y; this.directionX = 0; this.directionY = 0; easing = this.options.snap.easing || ease.bounce; } if (newX !== this.x || newY !== this.y) { // change easing function when scroller goes out of the boundaries if (newX > this.minScrollX || newX < this.maxScrollX || newY > this.minScrollY || newY < this.maxScrollY) { easing = ease.swipeBounce; } this.scrollTo(newX, newY, time, easing); return; } if (this.options.wheel) { this.selectedIndex = Math.round(Math.abs(this.y / this.itemHeight)); } this.trigger('scrollEnd', { x: this.x, y: this.y }); }; BScroll.prototype._checkClick = function (e) { // when in the process of pulling down, it should not prevent click var preventClick = this.stopFromTransition && !this.pulling; this.stopFromTransition = false; // we scrolled less than 15 pixels if (!this.moved) { if (this.options.wheel) { if (this.target && this.target.classList.contains(this.options.wheel.wheelWrapperClass)) { var index = Math.abs(Math.round(this.y / this.itemHeight)); var _offset = Math.round((this.pointY + offsetToBody(this.wrapper).top - this.wrapperHeight / 2) / this.itemHeight); this.target = this.items[index + _offset]; } this.scrollToElement(this.target, this.options.wheel.adjustTime || 400, true, true, ease.swipe); return true; } else { if (!preventClick) { var _dblclick = this.options.dblclick; var dblclickTrigged = false; if (_dblclick && this.lastClickTime) { var _dblclick$delay = _dblclick.delay, delay = _dblclick$delay === undefined ? 300 : _dblclick$delay; if (getNow() - this.lastClickTime < delay) { dblclickTrigged = true; dblclick(e); } } if (this.options.tap) { tap(e, this.options.tap); } if (this.options.click && !preventDefaultException(e.target, this.options.preventDefaultException)) { click(e); } this.lastClickTime = dblclickTrigged ? null : getNow(); return true; } return false; } } return false; }; BScroll.prototype._resize = function () { var _this = this; if (!this.enabled) { return; } // fix a scroll problem under Android condition if (isAndroid) { this.wrapper.scrollTop = 0; } clearTimeout(this.resizeTimeout); this.resizeTimeout = setTimeout(function () { _this.refresh(); }, this.options.resizePolling); }; BScroll.prototype._startProbe = function () { cancelAnimationFrame(this.probeTimer); this.probeTimer = requestAnimationFrame(probe); var me = this; function probe() { var pos = me.getComputedPosition(); me.trigger('scroll', pos); if (!me.isInTransition) { me.trigger('scrollEnd', pos); return; } me.probeTimer = requestAnimationFrame(probe); } }; BScroll.prototype._transitionTime = function () { var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; this.scrollerStyle[style.transitionDuration] = time + 'ms'; if (this.options.wheel) { for (var i = 0; i < this.items.length; i++) { this.items[i].style[style.transitionDuration] = time + 'ms'; } } if (this.indicators) { for (var _i = 0; _i < this.indicators.length; _i++) { this.indicators[_i].transitionTime(time); } } }; BScroll.prototype._transitionTimingFunction = function (easing) { this.scrollerStyle[style.transitionTimingFunction] = easing; if (this.options.wheel) { for (var i = 0; i < this.items.length; i++) { this.items[i].style[style.transitionTimingFunction] = easing; } } if (this.indicators) { for (var _i2 = 0; _i2 < this.indicators.length; _i2++) { this.indicators[_i2].transitionTimingFunction(easing); } } }; BScroll.prototype._transitionEnd = function (e) { if (e.target !== this.scroller || !this.isInTransition) { return; } this._transitionTime(); var needReset = !this.pulling || this.movingDirectionY === DIRECTION_UP; if (needReset && !this.resetPosition(this.options.bounceTime, ease.bounce)) { this.isInTransition = false; if (this.options.probeType !== PROBE_REALTIME) { this.trigger('scrollEnd', { x: this.x, y: this.y }); } } }; BScroll.prototype._translate = function (x, y, scale) { assert(!isUndef(x) && !isUndef(y), 'Translate x or y is null or undefined.'); if (isUndef(scale)) { scale = this.scale; } if (this.options.useTransform) { this.scrollerStyle[style.transform] = 'translate(' + x + 'px,' + y + 'px) scale(' + scale + ')' + this.translateZ; } else { x = Math.round(x); y = Math.round(y); this.scrollerStyle.left = x + 'px'; this.scrollerStyle.top = y + 'px'; } if (this.options.wheel) { var _options$wheel$rotate = this.options.wheel.rotate, rotate = _options$wheel$rotate === undefined ? 25 : _options$wheel$rotate; for (var i = 0; i < this.items.length; i++) { var deg = rotate * (y / this.itemHeight + i); this.items[i].style[style.transform] = 'rotateX(' + deg + 'deg)'; } } this.x = x; this.y = y; this.setScale(scale); if (this.indicators) { for (var _i3 = 0; _i3 < this.indicators.length; _i3++) { this.indicators[_i3].updatePosition(); } } }; BScroll.prototype._animate = function (destX, destY, duration, easingFn) { var me = this; var startX = this.x; var startY = this.y; var startScale = this.lastScale; var destScale = this.scale; var startTime = getNow(); var destTime = startTime + duration; function step() { var now = getNow(); if (now >= destTime) { me.isAnimating = false; me._translate(destX, destY, destScale); me.trigger('scroll', { x: me.x, y: me.y }); if (!me.pulling && !me.resetPosition(me.options.bounceTime)) { me.trigger('scrollEnd', { x: me.x, y: me.y }); } return; } now = (now - startTime) / duration; var easing = easingFn(now); var newX = (destX - startX) * easing + startX; var newY = (destY - startY) * easing + startY; var newScale = (destScale - startScale) * easing + startScale; me._translate(newX, newY, newScale); if (me.isAnimating) { me.animateTimer = requestAnimationFrame(step); } if (me.options.probeType === PROBE_REALTIME) { me.trigger('scroll', { x: me.x, y: me.y }); } } this.isAnimating = true; cancelAnimationFrame(this.animateTimer); step(); }; BScroll.prototype.scrollBy = function (x, y) { var time = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; var easing = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ease.bounce; x = this.x + x; y = this.y + y; this.scrollTo(x, y, time, easing); }; BScroll.prototype.scrollTo = function (x, y) { var time = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; var easing = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ease.bounce; this.isInTransition = this.options.useTransition && time > 0 && (x !== this.x || y !== this.y); if (!time || this.options.useTransition) { this._transitionTimingFunction(easing.style); this._transitionTime(time); this._translate(x, y); if (time && this.options.probeType === PROBE_REALTIME) { this._startProbe(); } if (!time && (x !== this.x || y !== this.y)) { this.trigger('scroll', { x: x, y: y }); // force reflow to put everything in position this._reflow = document.body.offsetHeight; if (!this.resetPosition(this.options.bounceTime, ease.bounce)) { this.trigger('scrollEnd', { x: x, y: y }); } } if (this.options.wheel) { if (y > this.minScrollY) { this.selectedIndex = 0; } else if (y < this.maxScrollY) { this.selectedIndex = this.items.length - 1; } else { this.selectedIndex = Math.round(Math.abs(y / this.itemHeight)); } } } else { this._animate(x, y, time, easing.fn); } }; BScroll.prototype.scrollToElement = function (el, time, offsetX, offsetY, easing) { if (!el) { return; } el = el.nodeType ? el : this.scroller.querySelector(el); if (this.options.wheel && !el.classList.contains(this.options.wheel.wheelItemClass)) { return; } var pos = offset(el); pos.left -= this.wrapperOffset.left; pos.top -= this.wrapperOffset.top; // if offsetX/Y are true we center the element to the screen if (offsetX === true) { offsetX = Math.round(el.offsetWidth / 2 - this.wrapper.offsetWidth / 2); } if (offsetY === true) { offsetY = Math.round(el.offsetHeight / 2 - this.wrapper.offsetHeight / 2); } pos.left -= offsetX || 0; pos.top -= offsetY || 0; pos.left = pos.left > this.minScrollX ? this.minScrollX : pos.left < this.maxScrollX ? this.maxScrollX : pos.left; pos.top = pos.top > this.minScrollY ? this.minScrollY : pos.top < this.maxScrollY ? this.maxScrollY : pos.top; if (this.options.wheel) { pos.top = Math.round(pos.top / this.itemHeight) * this.itemHeight; } this.scrollTo(pos.left, pos.top, time, easing); }; BScroll.prototype.resetPosition = function () { var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; var easeing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ease.bounce; var x = this.x; var roundX = Math.round(x); if (!this.hasHorizontalScroll || roundX > this.minScrollX) { x = this.minScrollX; } else if (roundX < this.maxScrollX) { x = this.maxScrollX; } var y = this.y; var roundY = Math.round(y); if (!this.hasVerticalScroll || roundY > this.minScrollY) { y = this.minScrollY; } else if (roundY < this.maxScrollY) { y = this.maxScrollY; } if (x === this.x && y === this.y) { return false; } this.scrollTo(x, y, time, easeing); return true; }; BScroll.prototype.getComputedPosition = function () { var matrix = window.getComputedStyle(this.scroller, null); var x = void 0; var y = void 0; if (this.options.useTransform) { matrix = matrix[style.transform].split(')')[0].split(', '); x = +(matrix[12] || matrix[4]); y = +(matrix[13] || matrix[5]); } else { x = +matrix.left.replace(/[^-\d.]/g, ''); y = +matrix.top.replace(/[^-\d.]/g, ''); } return { x: x, y: y }; }; BScroll.prototype.stop = function () { if (this.options.useTransition && this.isInTransition) { this.isInTransition = false; cancelAnimationFrame(this.probeTimer); var pos = this.getComputedPosition(); this._translate(pos.x, pos.y); if (this.options.wheel) { this.target = this.items[Math.round(-pos.y / this.itemHeight)]; } else { this.trigger('scrollEnd', { x: this.x, y: this.y }); } this.stopFromTransition = true; } else if (!this.options.useTransition && this.isAnimating) { this.isAnimating = false; cancelAnimationFrame(this.animateTimer); this.trigger('scrollEnd', { x: this.x, y: this.y }); this.stopFromTransition = true; } }; BScroll.prototype.destroy = function () { this.destroyed = true; this.trigger('destroy'); if (this.options.useTransition) { cancelAnimationFrame(this.probeTimer); } else { cancelAnimationFrame(this.animateTimer); } this._removeDOMEvents(); // remove custom events this._events = {}; }; } function snapMixin(BScroll) { BScroll.prototype._initSnap = function () { var _this = this; this.currentPage = {}; var snap = this.options.snap; if (snap.loop) { var children = this.scroller.children; if (children.length > 1) { prepend(children[children.length - 1].cloneNode(true), this.scroller); this.scroller.appendChild(children[1].cloneNode(true)); } else { // Loop does not make any sense if there is only one child. snap.loop = false; } } var el = snap.el; if (typeof el === 'string') { el = this.scroller.querySelectorAll(el); } this.on('refresh', function () { _this.pages = []; if (!_this.wrapperWidth || !_this.wrapperHeight || !_this.scrollerWidth || !_this.scrollerHeight) { return; } var stepX = snap.stepX || _this.wrapperWidth; var stepY = snap.stepY || _this.wrapperHeight; var x = 0; var y = void 0; var cx = void 0; var cy = void 0; var i = 0; var l = void 0; var m = 0; var n = void 0; var rect = void 0; if (!el) { cx = Math.round(stepX / 2); cy = Math.round(stepY / 2); while (x > -_this.scrollerWidth) { _this.pages[i] = []; l = 0; y = 0; while (y > -_this.scrollerHeight) { _this.pages[i][l] = { x: Math.max(x, _this.maxScrollX), y: Math.max(y, _this.maxScrollY), width: stepX, height: stepY, cx: x - cx, cy: y - cy }; y -= stepY; l++; } x -= stepX; i++; } } else { l = el.length; n = -1; for (; i < l; i++) { rect = getRect(el[i]); if (i === 0 || rect.left <= getRect(el[i - 1]).left) { m = 0; n++; } if (!_this.pages[m]) { _this.pages[m] = []; } x = Math.max(-rect.left, _this.maxScrollX); y = Math.max(-rect.top, _this.maxScrollY); cx = x - Math.round(rect.width / 2); cy = y - Math.round(rect.height / 2); _this.pages[m][n] = { x: x, y: y, width: rect.width, height: rect.height, cx: cx, cy: cy }; if (x > _this.maxScrollX) { m++; } } } _this._checkSnapLoop(); var initPageX = snap._loopX ? 1 : 0; var initPageY = snap._loopY ? 1 : 0; _this._goToPage(_this.currentPage.pageX || initPageX, _this.currentPage.pageY || initPageY, 0); // Update snap threshold if needed. var snapThreshold = snap.threshold; if (snapThreshold % 1 === 0) { _this.snapThresholdX = snapThreshold; _this.snapThresholdY = snapThreshold; } else { _this.snapThresholdX = Math.round(_this.pages[_this.currentPage.pageX][_this.currentPage.pageY].width * snapThreshold); _this.snapThresholdY = Math.round(_this.pages[_this.currentPage.pageX][_this.currentPage.pageY].height * snapThreshold); } }); this.on('scrollEnd', function () { if (snap.loop) { if (snap._loopX) { if (_this.currentPage.pageX === 0) { _this._goToPage(_this.pages.length - 2, _this.currentPage.pageY, 0); } if (_this.currentPage.pageX === _this.pages.length - 1) { _this._goToPage(1, _this.currentPage.pageY, 0); } } else { if (_this.currentPage.pageY === 0) { _this._goToPage(_this.currentPage.pageX, _this.pages[0].length - 2, 0); } if (_this.currentPage.pageY === _this.pages[0].length - 1) { _this._goToPage(_this.currentPage.pageX, 1, 0); } } } }); if (snap.listenFlick !== false) { this.on('flick', function () { var time = snap.speed || Math.max(Math.max(Math.min(Math.abs(_this.x - _this.startX), 1000), Math.min(Math.abs(_this.y - _this.startY), 1000)), 300); _this._goToPage(_this.currentPage.pageX + _this.directionX, _this.currentPage.pageY + _this.directionY, time); }); } this.on('destroy', function () { if (snap.loop) { var _children = _this.scroller.children; if (_children.length > 2) { removeChild(_this.scroller, _children[_children.length - 1]); removeChild(_this.scroller, _children[0]); } } }); }; BScroll.prototype._checkSnapLoop = function () { var snap = this.options.snap; if (!snap.loop || !this.pages || !this.pages.length) { return; } if (this.pages.length > 1) { snap._loopX = true; } if (this.pages[0] && this.pages[0].length > 1) { snap._loopY = true; } if (snap._loopX && snap._loopY) { warn('Loop does not support two direction at the same time.'); } }; BScroll.prototype._nearestSnap = function (x, y) { if (!this.pages.length) { return { x: 0, y: 0, pageX: 0, pageY: 0 }; } var i = 0; // Check if we exceeded the snap threshold if (Math.abs(x - this.absStartX) <= this.snapThresholdX && Math.abs(y - this.absStartY) <= this.snapThresholdY) { return this.currentPage; } if (x > this.minScrollX) { x = this.minScrollX; } else if (x < this.maxScrollX) { x = this.maxScrollX; } if (y > this.minScrollY) { y = this.minScrollY; } else if (y < this.maxScrollY) { y = this.maxScrollY; } var l = this.pages.length; for (; i < l; i++) { if (x >= this.pages[i][0].cx) { x = this.pages[i][0].x; break; } } l = this.pages[i].length; var m = 0; for (; m < l; m++) { if (y >= this.pages[0][m].cy) { y = this.pages[0][m].y; break; } } if (i === this.currentPage.pageX) { i += this.directionX; if (i < 0) { i = 0; } else if (i >= this.pages.length) { i = this.pages.length - 1; } x = this.pages[i][0].x; } if (m === this.currentPage.pageY) { m += this.directionY; if (m < 0) { m = 0; } else if (m >= this.pages[0].length) { m = this.pages[0].length - 1; } y = this.pages[0][m].y; } return { x: x, y: y, pageX: i, pageY: m }; }; BScroll.prototype._goToPage = function (x) { var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; var time = arguments[2]; var easing = arguments[3]; var snap = this.options.snap; if (!snap || !this.pages || !this.pages.length) { return; } easing = easing || snap.easing || ease.bounce; if (x >= this.pages.length) { x = this.pages.length - 1; } else if (x < 0) { x = 0; } if (!this.pages[x]) { return; } if (y >= this.pages[x].length) { y = this.pages[x].length - 1; } else if (y < 0) { y = 0; } var posX = this.pages[x][y].x; var posY = this.pages[x][y].y; time = time === undefined ? snap.speed || Math.max(Math.max(Math.min(Math.abs(posX - this.x), 1000), Math.min(Math.abs(posY - this.y), 1000)), 300) : time; this.currentPage = { x: posX, y: posY, pageX: x, pageY: y }; this.scrollTo(posX, posY, time, easing); }; BScroll.prototype.goToPage = function (x, y, time, easing) { var snap = this.options.snap; if (!snap || !this.pages || !this.pages.length) { return; } if (snap.loop) { var len = void 0; if (snap._loopX) { len = this.pages.length - 2; if (x >= len) { x = len - 1; } else if (x < 0) { x = 0; } x += 1; } else { len = this.pages[0].length - 2; if (y >= len) { y = len - 1; } else if (y < 0) { y = 0; } y += 1; } } this._goToPage(x, y, time, easing); }; BScroll.prototype.next = function (time, easing) { var snap = this.options.snap; if (!snap) { return; } var x = this.currentPage.pageX; var y = this.currentPage.pageY; x++; if (x >= this.pages.length && this.hasVerticalScroll) { x = 0; y++; } this._goToPage(x, y, time, easing); }; BScroll.prototype.prev = function (time, easing) { var snap = this.options.snap; if (!snap) { return; } var x = this.currentPage.pageX; var y = this.currentPage.pageY; x--; if (x < 0 && this.hasVerticalScroll) { x = 0; y--; } this._goToPage(x, y, time, easing); }; BScroll.prototype.getCurrentPage = function () { var snap = this.options.snap; if (!snap) { return null; } if (snap.loop) { var currentPage = void 0; if (snap._loopX) { currentPage = extend({}, this.currentPage, { pageX: this.currentPage.pageX - 1 }); } else { currentPage = extend({}, this.currentPage, { pageY: this.currentPage.pageY - 1 }); } return currentPage; } return this.currentPage; }; } function wheelMixin(BScroll) { BScroll.prototype.wheelTo = function () { var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; if (this.options.wheel) { this.y = -index * this.itemHeight; this.scrollTo(0, this.y); } }; BScroll.prototype.getSelectedIndex = function () { return this.options.wheel && this.selectedIndex; }; BScroll.prototype._initWheel = function () { var wheel = this.options.wheel; if (!wheel.wheelWrapperClass) { wheel.wheelWrapperClass = 'wheel-scroll'; } if (!wheel.wheelItemClass) { wheel.wheelItemClass = 'wheel-item'; } if (wheel.selectedIndex === undefined) { wheel.selectedIndex = 0; warn('wheel option selectedIndex is required!'); } }; } var INDICATOR_MIN_LEN = 8; function scrollbarMixin(BScroll) { BScroll.prototype._initScrollbar = function () { var _this = this; var _options$scrollbar = this.options.scrollbar, _options$scrollbar$fa = _options$scrollbar.fade, fade = _options$scrollbar$fa === undefined ? true : _options$scrollbar$fa, _options$scrollbar$in = _options$scrollbar.interactive, interactive = _options$scrollbar$in === undefined ? false : _options$scrollbar$in; this.indicators = []; var indicator = void 0; if (this.options.scrollX) { indicator = { el: createScrollbar('horizontal'), direction: 'horizontal', fade: fade, interactive: interactive }; this._insertScrollBar(indicator.el); this.indicators.push(new Indicator(this, indicator)); } if (this.options.scrollY) { indicator = { el: createScrollbar('vertical'), direction: 'vertical', fade: fade, interactive: interactive }; this._insertScrollBar(indicator.el); this.indicators.push(new Indicator(this, indicator)); } this.on('refresh', function () { for (var i = 0; i < _this.indicators.length; i++) { _this.indicators[i].refresh(); } }); if (fade) { this.on('scrollEnd', function () { for (var i = 0; i < _this.indicators.length; i++) { _this.indicators[i].fade(); } }); this.on('scrollCancel', function () { for (var i = 0; i < _this.indicators.length; i++) { _this.indicators[i].fade(); } }); this.on('scrollStart', function () { for (var i = 0; i < _this.indicators.length; i++) { _this.indicators[i].fade(true); } }); this.on('beforeScrollStart', function () { for (var i = 0; i < _this.indicators.length; i++) { _this.indicators[i].fade(true, true); } }); } this.on('destroy', function () { _this._removeScrollBars(); }); }; BScroll.prototype._insertScrollBar = function (scrollbar) { this.wrapper.appendChild(scrollbar); }; BScroll.prototype._removeScrollBars = function () { for (var i = 0; i < this.indicators.length; i++) { this.indicators[i].destroy(); } }; } function createScrollbar(direction) { var scrollbar = document.createElement('div'); var indicator = document.createElement('div'); scrollbar.style.cssText = 'position:absolute;z-index:9999;pointerEvents:none'; indicator.style.cssText = 'box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px;'; indicator.className = 'bscroll-indicator'; if (direction === 'horizontal') { scrollbar.style.cssText += ';height:7px;left:2px;right:2px;bottom:0'; indicator.style.height = '100%'; scrollbar.className = 'bscroll-horizontal-scrollbar'; } else { scrollbar.style.cssText += ';width:7px;bottom:2px;top:2px;right:1px'; indicator.style.width = '100%'; scrollbar.className = 'bscroll-vertical-scrollbar'; } scrollbar.style.cssText += ';overflow:hidden'; scrollbar.appendChild(indicator); return scrollbar; } function Indicator(scroller, options) { this.wrapper = options.el; this.wrapperStyle = this.wrapper.style; this.indicator = this.wrapper.children[0]; this.indicatorStyle = this.indicator.style; this.scroller = scroller; this.direction = options.direction; if (options.fade) { this.visible = 0; this.wrapperStyle.opacity = '0'; } else { this.visible = 1; } this.sizeRatioX = 1; this.sizeRatioY = 1; this.maxPosX = 0; this.maxPosY = 0; this.x = 0; this.y = 0; if (options.interactive) { this._addDOMEvents(); } } Indicator.prototype.handleEvent = function (e) { switch (e.type) { case 'touchstart': case 'mousedown': this._start(e); break; case 'touchmove': case 'mousemove': this._move(e); break; case 'touchend': case 'mouseup': case 'touchcancel': case 'mousecancel': this._end(e); break; } }; Indicator.prototype.refresh = function () { if (this._shouldShow()) { this.transitionTime(); this._calculate(); this.updatePosition(); } }; Indicator.prototype.fade = function (visible, hold) { var _this2 = this; if (hold && !this.visible) { return; } var time = visible ? 250 : 500; visible = visible ? '1' : '0'; this.wrapperStyle[style.transitionDuration] = time + 'ms'; clearTimeout(this.fadeTimeout); this.fadeTimeout = setTimeout(function () { _this2.wrapperStyle.opacity = visible; _this2.visible = +visible; }, 0); }; Indicator.prototype.updatePosition = function () { if (this.direction === 'vertical') { var y = Math.round(this.sizeRatioY * this.scroller.y); if (y < 0) { this.transitionTime(500); var height = Math.max(this.indicatorHeight + y * 3, INDICATOR_MIN_LEN); this.indicatorStyle.height = height + 'px'; y = 0; } else if (y > this.maxPosY) { this.transitionTime(500); var _height = Math.max(this.indicatorHeight - (y - this.maxPosY) * 3, INDICATOR_MIN_LEN); this.indicatorStyle.height = _height + 'px'; y = this.maxPosY + this.indicatorHeight - _height; } else { this.indicatorStyle.height = this.indicatorHeight + 'px'; } this.y = y; if (this.scroller.options.useTransform) { this.indicatorStyle[style.transform] = 'translateY(' + y + 'px)' + this.scroller.translateZ; } else { this.indicatorStyle.top = y + 'px'; } } else { var x = Math.round(this.sizeRatioX * this.scroller.x); if (x < 0) { this.transitionTime(500); var width = Math.max(this.indicatorWidth + x * 3, INDICATOR_MIN_LEN); this.indicatorStyle.width = width + 'px'; x = 0; } else if (x > this.maxPosX) { this.transitionTime(500); var _width = Math.max(this.indicatorWidth - (x - this.maxPosX) * 3, INDICATOR_MIN_LEN); this.indicatorStyle.width = _width + 'px'; x = this.maxPosX + this.indicatorWidth - _width; } else { this.indicatorStyle.width = this.indicatorWidth + 'px'; } this.x = x; if (this.scroller.options.useTransform) { this.indicatorStyle[style.transform] = 'translateX(' + x + 'px)' + this.scroller.translateZ; } else { this.indicatorStyle.left = x + 'px'; } } }; Indicator.prototype.transitionTime = function () { var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; this.indicatorStyle[style.transitionDuration] = time + 'ms'; }; Indicator.prototype.transitionTimingFunction = function (easing) { this.indicatorStyle[style.transitionTimingFunction] = easing; }; Indicator.prototype.destroy = function () { this._removeDOMEvents(); this.wrapper.parentNode.removeChild(this.wrapper); }; Indicator.prototype._start = function (e) { var point = e.touches ? e.touches[0] : e; e.preventDefault(); e.stopPropagation(); this.transitionTime(); this.initiated = true; this.moved = false; this.lastPointX = point.pageX; this.lastPointY = point.pageY; this.startTime = getNow(); this._handleMoveEvents(addEvent); this.scroller.trigger('beforeScrollStart'); }; Indicator.prototype._move = function (e) { var point = e.touches ? e.touches[0] : e; e.preventDefault(); e.stopPropagation(); if (!this.moved) { this.scroller.trigger('scrollStart'); } this.moved = true; var deltaX = point.pageX - this.lastPointX; this.lastPointX = point.pageX; var deltaY = point.pageY - this.lastPointY; this.lastPointY = point.pageY; var newX = this.x + deltaX; var newY = this.y + deltaY; this._pos(newX, newY); }; Indicator.prototype._end = function (e) { if (!this.initiated) { return; } this.initiated = false; e.preventDefault(); e.stopPropagation(); this._handleMoveEvents(removeEvent); var snapOption = this.scroller.options.snap; if (snapOption) { var speed = snapOption.speed, _snapOption$easing = snapOption.easing, easing = _snapOption$easing === undefined ? ease.bounce : _snapOption$easing; var snap = this.scroller._nearestSnap(this.scroller.x, this.scroller.y); var time = speed || Math.max(Math.max(Math.min(Math.abs(this.scroller.x - snap.x), 1000), Math.min(Math.abs(this.scroller.y - snap.y), 1000)), 300); if (this.scroller.x !== snap.x || this.scroller.y !== snap.y) { this.scroller.directionX = 0; this.scroller.directionY = 0; this.scroller.currentPage = snap; this.scroller.scrollTo(snap.x, snap.y, time, easing); } } if (this.moved) { this.scroller.trigger('scrollEnd', { x: this.scroller.x, y: this.scroller.y }); } }; Indicator.prototype._pos = function (x, y) { if (x < 0) { x = 0; } else if (x > this.maxPosX) { x = this.maxPosX; } if (y < 0) { y = 0; } else if (y > this.maxPosY) { y = this.maxPosY; } x = Math.round(x / this.sizeRatioX); y = Math.round(y / this.sizeRatioY); this.scroller.scrollTo(x, y); this.scroller.trigger('scroll', { x: this.scroller.x, y: this.scroller.y }); }; Indicator.prototype._shouldShow = function () { if (this.direction === 'vertical' && this.scroller.hasVerticalScroll || this.direction === 'horizontal' && this.scroller.hasHorizontalScroll) { this.wrapper.style.display = ''; return true; } this.wrapper.style.display = 'none'; return false; }; Indicator.prototype._calculate = function () { if (this.direction === 'vertical') { var wrapperHeight = this.wrapper.clientHeight; this.indicatorHeight = Math.max(Math.round(wrapperHeight * wrapperHeight / (this.scroller.scrollerHeight || wrapperHeight || 1)), INDICATOR_MIN_LEN); this.indicatorStyle.height = this.indicatorHeight + 'px'; this.maxPosY = wrapperHeight - this.indicatorHeight; this.sizeRatioY = this.maxPosY / this.scroller.maxScrollY; } else { var wrapperWidth = this.wrapper.clientWidth; this.indicatorWidth = Math.max(Math.round(wrapperWidth * wrapperWidth / (this.scroller.scrollerWidth || wrapperWidth || 1)), INDICATOR_MIN_LEN); this.indicatorStyle.width = this.indicatorWidth + 'px'; this.maxPosX = wrapperWidth - this.indicatorWidth; this.sizeRatioX = this.maxPosX / this.scroller.maxScrollX; } }; Indicator.prototype._addDOMEvents = function () { var eventOperation = addEvent; this._handleDOMEvents(eventOperation); }; Indicator.prototype._removeDOMEvents = function () { var eventOperation = removeEvent; this._handleDOMEvents(eventOperation); this._handleMoveEvents(eventOperation); }; Indicator.prototype._handleMoveEvents = function (eventOperation) { if (!this.scroller.options.disableTouch) { eventOperation(window, 'touchmove', this); } if (!this.scroller.options.disableMouse) { eventOperation(window, 'mousemove', this); } }; Indicator.prototype._handleDOMEvents = function (eventOperation) { if (!this.scroller.options.disableTouch) { eventOperation(this.indicator, 'touchstart', this); eventOperation(window, 'touchend', this); } if (!this.scroller.options.disableMouse) { eventOperation(this.indicator, 'mousedown', this); eventOperation(window, 'mouseup', this); } }; function pullDownMixin(BScroll) { BScroll.prototype._initPullDown = function () { // must watch scroll in real time this.options.probeType = PROBE_REALTIME; }; BScroll.prototype._checkPullDown = function () { var _options$pullDownRefr = this.options.pullDownRefresh, _options$pullDownRefr2 = _options$pullDownRefr.threshold, threshold = _options$pullDownRefr2 === undefined ? 90 : _options$pullDownRefr2, _options$pullDownRefr3 = _options$pullDownRefr.stop, stop = _options$pullDownRefr3 === undefined ? 40 : _options$pullDownRefr3; // check if a real pull down action if (this.directionY !== DIRECTION_DOWN || this.y < threshold) { return false; } if (!this.pulling) { this.pulling = true; this.trigger('pullingDown'); } this.scrollTo(this.x, stop, this.options.bounceTime, ease.bounce); return this.pulling; }; BScroll.prototype.finishPullDown = function () { this.pulling = false; this.resetPosition(this.options.bounceTime, ease.bounce); }; BScroll.prototype.openPullDown = function () { var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; this.options.pullDownRefresh = config; this._initPullDown(); }; BScroll.prototype.closePullDown = function () { this.options.pullDownRefresh = false; }; } function pullUpMixin(BScroll) { BScroll.prototype._initPullUp = function () { // must watch scroll in real time this.options.probeType = PROBE_REALTIME; this.pullupWatching = false; this._watchPullUp(); }; BScroll.prototype._watchPullUp = function () { if (this.pullupWatching) { return; } this.pullupWatching = true; this.on('scroll', this._checkToEnd); }; BScroll.prototype._checkToEnd = function (pos) { var _this = this; var _options$pullUpLoad$t = this.options.pullUpLoad.threshold, threshold = _options$pullUpLoad$t === undefined ? 0 : _options$pullUpLoad$t; if (this.movingDirectionY === DIRECTION_UP && pos.y <= this.maxScrollY + threshold) { // reset pullupWatching status after scroll end. this.once('scrollEnd', function () { _this.pullupWatching = false; }); this.trigger('pullingUp'); this.off('scroll', this._checkToEnd); } }; BScroll.prototype.finishPullUp = function () { var _this2 = this; if (this.pullupWatching) { this.once('scrollEnd', function () { _this2._watchPullUp(); }); } else { this._watchPullUp(); } }; BScroll.prototype.openPullUp = function () { var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; this.options.pullUpLoad = config; this._initPullUp(); }; BScroll.prototype.closePullUp = function () { this.options.pullUpLoad = false; if (!this.pullupWatching) { return; } this.pullupWatching = false; this.off('scroll', this._checkToEnd); }; } function mouseWheelMixin(BScroll) { BScroll.prototype._initMouseWheel = function () { var _this = this; this._handleMouseWheelEvent(addEvent); this.on('destroy', function () { clearTimeout(_this.mouseWheelTimer); clearTimeout(_this.mouseWheelEndTimer); _this._handleMouseWheelEvent(removeEvent); }); this.firstWheelOpreation = true; }; BScroll.prototype._handleMouseWheelEvent = function (eventOperation) { eventOperation(this.wrapper, 'wheel', this); eventOperation(this.wrapper, 'mousewheel', this); eventOperation(this.wrapper, 'DOMMouseScroll', this); }; BScroll.prototype._onMouseWheel = function (e) { var _this2 = this; if (!this.enabled) { return; } e.preventDefault(); if (this.options.stopPropagation) { e.stopPropagation(); } if (this.firstWheelOpreation) { this.trigger('scrollStart'); } this.firstWheelOpreation = false; var _options$mouseWheel = this.options.mouseWheel, _options$mouseWheel$s = _options$mouseWheel.speed, speed = _options$mouseWheel$s === undefined ? 20 : _options$mouseWheel$s, _options$mouseWheel$i = _options$mouseWheel.invert, invert = _options$mouseWheel$i === undefined ? false : _options$mouseWheel$i, _options$mouseWheel$e = _options$mouseWheel.easeTime, easeTime = _options$mouseWheel$e === undefined ? 300 : _options$mouseWheel$e; clearTimeout(this.mouseWheelTimer); this.mouseWheelTimer = setTimeout(function () { if (!_this2.options.snap && !easeTime) { _this2.trigger('scrollEnd', { x: _this2.x, y: _this2.y }); } _this2.firstWheelOpreation = true; }, 400); var wheelDeltaX = void 0; var wheelDeltaY = void 0; switch (true) { case 'deltaX' in e: if (e.deltaMode === 1) { wheelDeltaX = -e.deltaX * speed; wheelDeltaY = -e.deltaY * speed; } else { wheelDeltaX = -e.deltaX; wheelDeltaY = -e.deltaY; } break; case 'wheelDeltaX' in e: wheelDeltaX = e.wheelDeltaX / 120 * speed; wheelDeltaY = e.wheelDeltaY / 120 * speed; break; case 'wheelDelta' in e: wheelDeltaX = wheelDeltaY = e.wheelDelta / 120 * speed; break; case 'detail' in e: wheelDeltaX = wheelDeltaY = -e.detail / 3 * speed; break; default: return; } var direction = invert ? -1 : 1; wheelDeltaX *= direction; wheelDeltaY *= direction; if (!this.hasVerticalScroll) { wheelDeltaX = wheelDeltaY; wheelDeltaY = 0; } var newX = void 0; var newY = void 0; if (this.options.snap) { newX = this.currentPage.pageX; newY = this.currentPage.pageY; if (wheelDeltaX > 0) { newX--; } else if (wheelDeltaX < 0) { newX++; } if (wheelDeltaY > 0) { newY--; } else if (wheelDeltaY < 0) { newY++; } this._goToPage(newX, newY); return; } newX = this.x + Math.round(this.hasHorizontalScroll ? wheelDeltaX : 0); newY = this.y + Math.round(this.hasVerticalScroll ? wheelDeltaY : 0); this.movingDirectionX = this.directionX = wheelDeltaX > 0 ? -1 : wheelDeltaX < 0 ? 1 : 0; this.movingDirectionY = this.directionY = wheelDeltaY > 0 ? -1 : wheelDeltaY < 0 ? 1 : 0; if (newX > this.minScrollX) { newX = this.minScrollX; } else if (newX < this.maxScrollX) { newX = this.maxScrollX; } if (newY > this.minScrollY) { newY = this.minScrollY; } else if (newY < this.maxScrollY) { newY = this.maxScrollY; } var needTriggerEnd = this.y === newY; this.scrollTo(newX, newY, easeTime, ease.swipe); this.trigger('scroll', { x: this.x, y: this.y }); clearTimeout(this.mouseWheelEndTimer); if (needTriggerEnd) { this.mouseWheelEndTimer = setTimeout(function () { _this2.trigger('scrollEnd', { x: _this2.x, y: _this2.y }); }, easeTime); } }; } function zoomMixin(BScroll) { BScroll.prototype._initZoom = function () { var _options$zoom = this.options.zoom, _options$zoom$start = _options$zoom.start, start = _options$zoom$start === undefined ? 1 : _options$zoom$start, _options$zoom$min = _options$zoom.min, min = _options$zoom$min === undefined ? 1 : _options$zoom$min, _options$zoom$max = _options$zoom.max, max = _options$zoom$max === undefined ? 4 : _options$zoom$max; this.scale = Math.min(Math.max(start, min), max); this.setScale(this.scale); this.scrollerStyle[style.transformOrigin] = '0 0'; }; BScroll.prototype._zoomTo = function (scale, originX, originY, startScale) { this.scaled = true; var lastScale = scale / (startScale || this.scale); this.setScale(scale); this.refresh(); var newX = Math.round(this.startX - (originX - this.relativeX) * (lastScale - 1)); var newY = Math.round(this.startY - (originY - this.relativeY) * (lastScale - 1)); if (newX > this.minScrollX) { newX = this.minScrollX; } else if (newX < this.maxScrollX) { newX = this.maxScrollX; } if (newY > this.minScrollY) { newY = this.minScrollY; } else if (newY < this.maxScrollY) { newY = this.maxScrollY; } if (this.x !== newX || this.y !== newY) { this.scrollTo(newX, newY, this.options.bounceTime); } this.scaled = false; }; BScroll.prototype.zoomTo = function (scale, x, y) { var _offsetToBody = offsetToBody(this.wrapper), left = _offsetToBody.left, top = _offsetToBody.top; var originX = x + left - this.x; var originY = y + top - this.y; this._zoomTo(scale, originX, originY); }; BScroll.prototype._zoomStart = function (e) { var firstFinger = e.touches[0]; var secondFinger = e.touches[1]; var deltaX = Math.abs(firstFinger.pageX - secondFinger.pageX); var deltaY = Math.abs(firstFinger.pageY - secondFinger.pageY); this.startDistance = getDistance(deltaX, deltaY); this.startScale = this.scale; var _offsetToBody2 = offsetToBody(this.wrapper), left = _offsetToBody2.left, top = _offsetToBody2.top; this.originX = Math.abs(firstFinger.pageX + secondFinger.pageX) / 2 + left - this.x; this.originY = Math.abs(firstFinger.pageY + secondFinger.pageY) / 2 + top - this.y; this.trigger('zoomStart'); }; BScroll.prototype._zoom = function (e) { if (!this.enabled || this.destroyed || eventType[e.type] !== this.initiated) { return; } if (this.options.preventDefault) { e.preventDefault(); } if (this.options.stopPropagation) { e.stopPropagation(); } var firstFinger = e.touches[0]; var secondFinger = e.touches[1]; var deltaX = Math.abs(firstFinger.pageX - secondFinger.pageX); var deltaY = Math.abs(firstFinger.pageY - secondFinger.pageY); var distance = getDistance(deltaX, deltaY); var scale = distance / this.startDistance * this.startScale; this.scaled = true; var _options$zoom2 = this.options.zoom, _options$zoom2$min = _options$zoom2.min, min = _options$zoom2$min === undefined ? 1 : _options$zoom2$min, _options$zoom2$max = _options$zoom2.max, max = _options$zoom2$max === undefined ? 4 : _options$zoom2$max; if (scale < min) { scale = 0.5 * min * Math.pow(2.0, scale / min); } else if (scale > max) { scale = 2.0 * max * Math.pow(0.5, max / scale); } var lastScale = scale / this.startScale; var x = this.startX - (this.originX - this.relativeX) * (lastScale - 1); var y = this.startY - (this.originY - this.relativeY) * (lastScale - 1); this.setScale(scale); this.scrollTo(x, y, 0); }; BScroll.prototype._zoomEnd = function (e) { if (!this.enabled || this.destroyed || eventType[e.type] !== this.initiated) { return; } if (this.options.preventDefault) { e.preventDefault(); } if (this.options.stopPropagation) { e.stopPropagation(); } this.isInTransition = false; this.isAnimating = false; this.initiated = 0; var _options$zoom3 = this.options.zoom, _options$zoom3$min = _options$zoom3.min, min = _options$zoom3$min === undefined ? 1 : _options$zoom3$min, _options$zoom3$max = _options$zoom3.max, max = _options$zoom3$max === undefined ? 4 : _options$zoom3$max; var scale = this.scale > max ? max : this.scale < min ? min : this.scale; this._zoomTo(scale, this.originX, this.originY, this.startScale); this.trigger('zoomEnd'); }; } // import { ease } from '../util/ease' // Number of items to instantiate beyond current view in the scroll direction. var RUNWAY_ITEMS = 30; // Number of items to instantiate beyond current view in the opposite direction. var RUNWAY_ITEMS_OPPOSITE = 10; // The animation interval (in ms) for fading in content from tombstones. var ANIMATION_DURATION_MS = 200; // The number of pixels of default additional length to allow scrolling to. var DEFAULT_SCROLL_RUNWAY = 2000; function infiniteMixin(BScroll) { BScroll.prototype._initInfinite = function () { this.options.probeType = 3; this.maxScrollY = -DEFAULT_SCROLL_RUNWAY; this.infiniteScroller = new InfiniteScroller(this, this.options.infinity); }; } function isTombstoneNode(node) { if (node && node.classList) { return node.classList.contains('tombstone'); } } function InfiniteScroller(scroller, options) { var _this = this; this.options = options; assert(typeof this.options.createTombstone === 'function', 'Infinite scroll need createTombstone Function to create tombstone'); assert(typeof this.options.fetch === 'function', 'Infinite scroll need fetch Function to fetch new data.'); assert(typeof this.options.render === 'function', 'Infinite scroll need render Function to render each item.'); this.firstAttachedItem = 0; this.lastAttachedItem = 0; this.anchorScrollTop = 0; this.anchorItem = { index: 0, offset: 0 }; this.tombstoneHeight = 0; this.tombstoneWidth = 0; this.tombstones = []; this.items = []; this.loadedItems = 0; this.requestInProgress = false; this.hasMore = true; this.scroller = scroller; this.wrapperEl = this.scroller.wrapper; this.scrollerEl = this.scroller.scroller; this.scroller.on('scroll', function () { _this.onScroll(); }); this.scroller.on('resize', function () { _this.onResize(); }); this.onResize(); } InfiniteScroller.prototype.onScroll = function () { var scrollTop = -this.scroller.y; var delta = scrollTop - this.anchorScrollTop; if (scrollTop === 0) { this.anchorItem = { index: 0, offset: 0 }; } else { this.anchorItem = this._calculateAnchoredItem(this.anchorItem, delta); } this.anchorScrollTop = scrollTop; var lastScreenItem = this._calculateAnchoredItem(this.anchorItem, this.wrapperEl.offsetHeight); var start = this.anchorItem.index; var end = lastScreenItem.index; if (delta < 0) { start -= RUNWAY_ITEMS; end += RUNWAY_ITEMS_OPPOSITE; } else { start -= RUNWAY_ITEMS_OPPOSITE; end += RUNWAY_ITEMS; } this.fill(start, end); this.maybeRequestContent(); }; InfiniteScroller.prototype.onResize = function () { var tombstone = this.options.createTombstone(); tombstone.style.position = 'absolute'; this.scrollerEl.appendChild(tombstone); tombstone.style.display = ''; this.tombstoneHeight = tombstone.offsetHeight; this.tombstoneWidth = tombstone.offsetWidth; this.scrollerEl.removeChild(tombstone); for (var i = 0; i < this.items.length; i++) { this.items[i].height = this.items[i].width = 0; } this.onScroll(); }; InfiniteScroller.prototype.fill = function (start, end) { this.firstAttachedItem = Math.max(0, start); if (!this.hasMore) { end = Math.min(end, this.items.length); } this.lastAttachedItem = end; this.attachContent(); }; InfiniteScroller.prototype.maybeRequestContent = function () { var _this2 = this; if (this.requestInProgress || !this.hasMore) { return; } var itemsNeeded = this.lastAttachedItem - this.loadedItems; if (itemsNeeded <= 0) { return; } this.requestInProgress = true; this.options.fetch(itemsNeeded).then(function (items) { _this2.requestInProgress = false; if (items) { _this2.addContent(items); } else { _this2.hasMore = false; var tombstoneLen = _this2._removeTombstones(); var curPos = 0; if (_this2.anchorItem.index <= _this2.items.length) { curPos = _this2._fixScrollPosition(); _this2._setupAnimations({}, curPos); _this2.scroller.resetPosition(_this2.scroller.options.bounceTime); } else { _this2.anchorItem.index -= tombstoneLen; curPos = _this2._fixScrollPosition(); _this2._setupAnimations({}, curPos); _this2.scroller.stop(); _this2.scroller.resetPosition(); _this2.onScroll(); } } }); }; InfiniteScroller.prototype.addContent = function (items) { for (var i = 0; i < items.length; i++) { if (this.items.length <= this.loadedItems) { this._addItem(); } this.items[this.loadedItems++].data = items[i]; } this.attachContent(); this.maybeRequestContent(); }; InfiniteScroller.prototype.attachContent = function () { var unusedNodes = this._collectUnusedNodes(); var tombstoneAnimations = this._createDOMNodes(unusedNodes); this._cleanupUnusedNodes(unusedNodes); this._cacheNodeSize(); var curPos = this._fixScrollPosition(); this._setupAnimations(tombstoneAnimations, curPos); }; InfiniteScroller.prototype.resetMore = function () { this.hasMore = true; }; InfiniteScroller.prototype._removeTombstones = function () { var markIndex = void 0; var tombstoneLen = 0; var itemLen = this.items.length; for (var i = 0; i < itemLen; i++) { var currentNode = this.items[i].node; var currentData = this.items[i].data; if ((!currentNode || isTombstoneNode(currentNode)) && !currentData) { if (!markIndex) { markIndex = i; } if (currentNode) { this.scrollerEl.removeChild(currentNode); } } } tombstoneLen = itemLen - markIndex; this.items.splice(markIndex); this.lastAttachedItem = Math.min(this.lastAttachedItem, this.items.length); return tombstoneLen; }; InfiniteScroller.prototype._collectUnusedNodes = function () { var unusedNodes = []; for (var i = 0; i < this.items.length; i++) { // Skip the items which should be visible. if (i === this.firstAttachedItem) { i = this.lastAttachedItem - 1; continue; } var currentNode = this.items[i].node; if (currentNode) { if (isTombstoneNode(currentNode)) { // Cache tombstones for reuse this.tombstones.push(currentNode); this.tombstones[this.tombstones.length - 1].style.display = 'none'; } else { unusedNodes.push(currentNode); } } this.items[i].node = null; } return unusedNodes; }; InfiniteScroller.prototype._createDOMNodes = function (unusedNodes) { var tombstoneAnimations = {}; for (var i = this.firstAttachedItem; i < this.lastAttachedItem; i++) { while (this.items.length <= i) { this._addItem(); } var currentNode = this.items[i].node; var currentData = this.items[i].data; if (currentNode) { if (isTombstoneNode(currentNode) && currentData) { currentNode.style.zIndex = 1; tombstoneAnimations[i] = [currentNode, this.items[i].top - this.anchorScrollTop]; this.items[i].node = null; } else { continue; } } var node = currentData ? this.options.render(currentData, unusedNodes.pop()) : this._getTombStone(); node.style.position = 'absolute'; this.items[i].top = -1; this.scrollerEl.appendChild(node); this.items[i].node = node; } return tombstoneAnimations; }; InfiniteScroller.prototype._cleanupUnusedNodes = function (unusedNodes) { while (unusedNodes.length) { this.scrollerEl.removeChild(unusedNodes.pop()); } }; InfiniteScroller.prototype._cacheNodeSize = function () { for (var i = this.firstAttachedItem; i < this.lastAttachedItem; i++) { // Only cache the height if we have the real contents, not a placeholder. if (this.items[i].data && !this.items[i].height) { this.items[i].height = this.items[i].node.offsetHeight; this.items[i].width = this.items[i].node.offsetWidth; } } }; InfiniteScroller.prototype._fixScrollPosition = function () { this.anchorScrollTop = 0; for (var _i = 0; _i < this.anchorItem.index; _i++) { this.anchorScrollTop += this.items[_i].height || this.tombstoneHeight; } this.anchorScrollTop += this.anchorItem.offset; // Position all nodes. var curPos = this.anchorScrollTop - this.anchorItem.offset; var i = this.anchorItem.index; while (i > this.firstAttachedItem) { curPos -= this.items[i - 1].height || this.tombstoneHeight; i--; } return curPos; }; InfiniteScroller.prototype._setupAnimations = function (tombstoneAnimations, curPos) { var _this3 = this; for (var i in tombstoneAnimations) { var animation = tombstoneAnimations[i]; this.items[i].node.style.transform = 'translateY(' + (this.anchorScrollTop + animation[1]) + 'px) scale(' + this.tombstoneWidth / this.items[i].width + ', ' + this.tombstoneHeight / this.items[i].height + ')'; // Call offsetTop on the nodes to be animated to force them to apply current transforms. /* eslint-disable no-unused-expressions */ this.items[i].node.offsetTop; animation[0].offsetTop; this.items[i].node.style.transition = 'transform ' + ANIMATION_DURATION_MS + 'ms'; } for (var _i2 = this.firstAttachedItem; _i2 < this.lastAttachedItem; _i2++) { var _animation = tombstoneAnimations[_i2]; if (_animation) { var tombstoneNode = _animation[0]; tombstoneNode.style.transition = 'transform ' + ANIMATION_DURATION_MS + 'ms, opacity ' + ANIMATION_DURATION_MS + 'ms'; tombstoneNode.style.transform = 'translateY(' + curPos + 'px) scale(' + this.items[_i2].width / this.tombstoneWidth + ', ' + this.items[_i2].height / this.tombstoneHeight + ')'; tombstoneNode.style.opacity = 0; } if (curPos !== this.items[_i2].top) { if (!_animation) { this.items[_i2].node.style.transition = ''; } this.items[_i2].node.style.transform = 'translateY(' + curPos + 'px)'; } this.items[_i2].top = curPos; curPos += this.items[_i2].height || this.tombstoneHeight; } this.scroller.maxScrollY = -(curPos - this.wrapperEl.offsetHeight + (this.hasMore ? DEFAULT_SCROLL_RUNWAY : 0)); setTimeout(function () { for (var _i3 in tombstoneAnimations) { var _animation2 = tombstoneAnimations[_i3]; _animation2[0].style.display = 'none'; // Tombstone can be recycled now. _this3.tombstones.push(_animation2[0]); } }, ANIMATION_DURATION_MS); }; InfiniteScroller.prototype._getTombStone = function () { var tombstone = this.tombstones.pop(); if (tombstone) { tombstone.style.display = ''; tombstone.style.opacity = 1; tombstone.style.transform = ''; tombstone.style.transition = ''; return tombstone; } return this.options.createTombstone(); }; InfiniteScroller.prototype._addItem = function () { this.items.push({ data: null, node: null, height: 0, width: 0, top: 0 }); }; InfiniteScroller.prototype._calculateAnchoredItem = function (initialAnchor, delta) { if (delta === 0) { return initialAnchor; } var i = initialAnchor.index; var tombstones = 0; delta += initialAnchor.offset; if (delta < 0) { while (delta < 0 && i > 0 && this.items[i - 1].height) { delta += this.items[i - 1].height; i--; } tombstones = Math.max(-i, Math.ceil(Math.min(delta, 0) / this.tombstoneHeight)); } else { while (delta > 0 && i < this.items.length && this.items[i].height && this.items[i].height < delta) { delta -= this.items[i].height; i++; } if (i >= this.items.length || !this.items[i].height) { tombstones = Math.floor(Math.max(delta, 0) / this.tombstoneHeight); } } i += tombstones; delta -= tombstones * this.tombstoneHeight; return { index: i, offset: delta }; }; function BScroll(el, options) { this.wrapper = typeof el === 'string' ? document.querySelector(el) : el; if (!this.wrapper) { warn('Can not resolve the wrapper DOM.'); } this.scroller = this.wrapper.children[0]; if (!this.scroller) { warn('The wrapper need at least one child element to be scroller.'); } // cache style for better performance this.scrollerStyle = this.scroller.style; this._init(el, options); } initMixin(BScroll); coreMixin(BScroll); eventMixin(BScroll); snapMixin(BScroll); wheelMixin(BScroll); scrollbarMixin(BScroll); pullDownMixin(BScroll); pullUpMixin(BScroll); mouseWheelMixin(BScroll); zoomMixin(BScroll); infiniteMixin(BScroll); BScroll.Version = '1.12.6'; /* harmony default export */ __webpack_exports__["default"] = (BScroll); /***/ }), /* 75 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(76), __esModule: true }; /***/ }), /* 76 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(38); __webpack_require__(47); module.exports = __webpack_require__(41).f('iterator'); /***/ }), /* 77 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(78), __esModule: true }; /***/ }), /* 78 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(79); __webpack_require__(85); __webpack_require__(86); __webpack_require__(87); module.exports = __webpack_require__(0).Symbol; /***/ }), /* 79 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // ECMAScript 6 symbols shim var global = __webpack_require__(1); var has = __webpack_require__(5); var DESCRIPTORS = __webpack_require__(3); var $export = __webpack_require__(12); var redefine = __webpack_require__(39); var META = __webpack_require__(80).KEY; var $fails = __webpack_require__(9); var shared = __webpack_require__(21); var setToStringTag = __webpack_require__(27); var uid = __webpack_require__(17); var wks = __webpack_require__(2); var wksExt = __webpack_require__(41); var wksDefine = __webpack_require__(42); var enumKeys = __webpack_require__(81); var isArray = __webpack_require__(82); var anObject = __webpack_require__(11); var isObject = __webpack_require__(10); var toIObject = __webpack_require__(8); var toPrimitive = __webpack_require__(24); var createDesc = __webpack_require__(14); var _create = __webpack_require__(40); var gOPNExt = __webpack_require__(83); var $GOPD = __webpack_require__(84); var $DP = __webpack_require__(4); var $keys = __webpack_require__(15); var gOPD = $GOPD.f; var dP = $DP.f; var gOPN = gOPNExt.f; var $Symbol = global.Symbol; var $JSON = global.JSON; var _stringify = $JSON && $JSON.stringify; var PROTOTYPE = 'prototype'; var HIDDEN = wks('_hidden'); var TO_PRIMITIVE = wks('toPrimitive'); var isEnum = {}.propertyIsEnumerable; var SymbolRegistry = shared('symbol-registry'); var AllSymbols = shared('symbols'); var OPSymbols = shared('op-symbols'); var ObjectProto = Object[PROTOTYPE]; var USE_NATIVE = typeof $Symbol == 'function'; var 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 () { 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 (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 == '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)); var i = 0; var l = keys.length; var 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)); var result = []; var i = 0; var 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; var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); var result = []; var i = 0; var 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 (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__(58).f = gOPNExt.f = $getOwnPropertyNames; __webpack_require__(23).f = $propertyIsEnumerable; __webpack_require__(31).f = $getOwnPropertySymbols; if (DESCRIPTORS && !__webpack_require__(16)) { 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 es6Symbols = ( // 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(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function (key) { return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(sym) { if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; }, useSetter: function () { setter = true; }, useSimple: function () { 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) { var args = [it]; var i = 1; var replacer, $replacer; while (arguments.length > i) args.push(arguments[i++]); $replacer = replacer = args[1]; if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined if (!isArray(replacer)) replacer = function (key, value) { if (typeof $replacer == 'function') 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__(7)($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); /***/ }), /* 80 */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(17)('meta'); var isObject = __webpack_require__(10); var has = __webpack_require__(5); var setDesc = __webpack_require__(4).f; var id = 0; var isExtensible = Object.isExtensible || function () { return true; }; var FREEZE = !__webpack_require__(9)(function () { return isExtensible(Object.preventExtensions({})); }); var setMeta = function (it) { setDesc(it, META, { value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return primitive with prefix if (!isObject(it)) return 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 (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 (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 }; /***/ }), /* 81 */ /***/ (function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__(15); var gOPS = __webpack_require__(31); var pIE = __webpack_require__(23); module.exports = function (it) { var result = getKeys(it); var getSymbols = gOPS.f; if (getSymbols) { var symbols = getSymbols(it); var isEnum = pIE.f; var i = 0; var key; while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); } return result; }; /***/ }), /* 82 */ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) var cof = __webpack_require__(26); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; /***/ }), /* 83 */ /***/ (function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__(8); var gOPN = __webpack_require__(58).f; var toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function (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)); }; /***/ }), /* 84 */ /***/ (function(module, exports, __webpack_require__) { var pIE = __webpack_require__(23); var createDesc = __webpack_require__(14); var toIObject = __webpack_require__(8); var toPrimitive = __webpack_require__(24); var has = __webpack_require__(5); var IE8_DOM_DEFINE = __webpack_require__(29); var gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(3) ? 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]); }; /***/ }), /* 85 */ /***/ (function(module, exports) { /***/ }), /* 86 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(42)('asyncIterator'); /***/ }), /* 87 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(42)('observable'); /***/ }), /* 88 */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(67); var ITERATOR = __webpack_require__(2)('iterator'); var Iterators = __webpack_require__(13); module.exports = __webpack_require__(0).getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }), /* 89 */, /* 90 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(exports); } else { var mod = { exports: {} }; factory(mod.exports); global.date = mod.exports; } })(this, function (exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var DAY_TIMESTAMP = 60 * 60 * 24 * 1000; var HOUR_TIMESTAMP = 60 * 60 * 1000; var MINUTE_TIMESTAMP = 60 * 1000; function formatType(type, format, value, regExpAttributes) { var regExpMap = { year: '(Y+)', month: '(M+)', date: '(D+)', hour: '(h+)', minute: '(m+)', second: '(s+)', quarter: '(q+)', millisecond: '(S)' }; if (new RegExp(regExpMap[type], regExpAttributes).test(format)) { var replaceStr = type === 'year' ? value.toString().substr(4 - RegExp.$1.length) : RegExp.$1.length === 1 ? value : pad(value); format = format.replace(RegExp.$1, replaceStr); } return format; } function pad(value) { return ('00' + value).substr(('' + value).length); } function formatDate(date, format) { var map = { year: { value: date.getFullYear(), regExpAttributes: 'i' }, month: { value: date.getMonth() + 1 }, date: { value: date.getDate(), regExpAttributes: 'i' }, hour: { value: date.getHours(), regExpAttributes: 'i' }, minute: { value: date.getMinutes() }, second: { value: date.getSeconds() }, quarter: { value: Math.floor((date.getMonth() + 3) / 3), regExpAttributes: 'i' }, millisecond: { value: date.getMilliseconds() } }; for (var key in map) { format = formatType(key, format, map[key].value, map[key].regExpAttributes); } return format; } function getZeroStamp(date) { var year = date.getFullYear(); var month = date.getMonth() + 1; var day = date.getDate(); return +new Date(year + '/' + month + '/' + day + ' 00:00:00'); } function getDayDiff(date1, date2) { return Math.floor((getZeroStamp(date1) - getZeroStamp(date2)) / DAY_TIMESTAMP); } function getNow() { return window.performance && window.performance.now ? window.performance.now() + window.performance.timing.navigationStart : +new Date(); } function computeNatureMaxDay(month, year) { var natureMaxDay = 30; if ([1, 3, 5, 7, 8, 10, 12].indexOf(month) > -1) { natureMaxDay = 31; } else { if (month === 2) { natureMaxDay = !year || !(year % 400) || !(year % 4) && year % 100 ? 29 : 28; } } return natureMaxDay; } exports.DAY_TIMESTAMP = DAY_TIMESTAMP; exports.HOUR_TIMESTAMP = HOUR_TIMESTAMP; exports.MINUTE_TIMESTAMP = MINUTE_TIMESTAMP; exports.pad = pad; exports.formatType = formatType; exports.formatDate = formatDate; exports.getZeroStamp = getZeroStamp; exports.getDayDiff = getDayDiff; exports.getNow = getNow; exports.computeNatureMaxDay = computeNatureMaxDay; }); /***/ }), /* 91 */, /* 92 */, /* 93 */, /* 94 */, /* 95 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /** * vue-create-api v0.2.0 * (c) 2018 ustbhuangyi * @license MIT */ 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 camelizeRE = /-(\w)/g; function camelize(str) { return (str + '').replace(camelizeRE, function (m, c) { return c ? c.toUpperCase() : ''; }); } function escapeReg(str, delimiter) { return (str + '').replace(new RegExp('[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\' + (delimiter || '') + '-]', 'g'), '\\$&'); } function isBoolean(value) { return typeof value === 'boolean'; } function isUndef(value) { return value === undefined; } function isStr(value) { return typeof value === 'string'; } function isFunction(fn) { return typeof fn === 'function'; } function warn(msg) { console.error("[vue-create-api warn]: " + msg); } function assert(condition, msg) { if (!condition) { throw new Error("[vue-create-api error]: " + msg); } } function instantiateComponent(Vue, Component, data, renderFn, options) { var renderData = void 0; var childrenRenderFn = void 0; var instance = new Vue(_extends({}, options, { render: function render(createElement) { var children = childrenRenderFn && childrenRenderFn(createElement); if (children && !Array.isArray(children)) { children = [children]; } return createElement(Component, _extends({}, renderData), children || []); }, methods: { init: function init() { document.body.appendChild(this.$el); }, destroy: function destroy() { this.$destroy(); document.body.removeChild(this.$el); } } })); instance.updateRenderData = function (data, render) { renderData = data; childrenRenderFn = render; }; instance.updateRenderData(data, renderFn); instance.$mount(); instance.init(); var component = instance.$children[0]; component.$updateProps = function (props) { _extends(renderData.props, props); instance.$forceUpdate(); }; return component; } function parseRenderData() { var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; events = parseEvents(events); var props = _extends({}, data); var on = {}; for (var name in events) { if (events.hasOwnProperty(name)) { var handlerName = events[name]; if (props[handlerName]) { on[name] = props[handlerName]; delete props[handlerName]; } } } return { props: props, on: on }; } function parseEvents(events) { var parsedEvents = {}; events.forEach(function (name) { parsedEvents[name] = camelize('on-' + name); }); return parsedEvents; } var eventBeforeDestroy = 'hook:beforeDestroy'; function apiCreator(Component) { var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var single = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var Vue = this; var singleMap = {}; var beforeHooks = []; function createComponent(renderData, renderFn, options, single) { beforeHooks.forEach(function (before) { before(renderData, renderFn, single); }); var ownerInsUid = options.parent ? options.parent._uid : -1; var _ref = singleMap[ownerInsUid] ? singleMap[ownerInsUid] : {}, comp = _ref.comp, ins = _ref.ins; if (single && comp && ins) { ins.updateRenderData(renderData, renderFn); ins.$forceUpdate(); return comp; } var component = instantiateComponent(Vue, Component, renderData, renderFn, options); var instance = component.$parent; var originRemove = component.remove; component.remove = function () { if (single) { if (!singleMap[ownerInsUid]) { return; } singleMap[ownerInsUid] = null; } originRemove && originRemove.call(this); instance.destroy(); }; var originShow = component.show; component.show = function () { originShow && originShow.call(this); return this; }; var originHide = component.hide; component.hide = function () { originHide && originHide.call(this); return this; }; if (single) { singleMap[ownerInsUid] = { comp: component, ins: instance }; } return component; } function processProps(ownerInstance, renderData, isInVueInstance, onChange) { var $props = renderData.props.$props; if ($props) { delete renderData.props.$props; var watchKeys = []; var watchPropKeys = []; Object.keys($props).forEach(function (key) { var propKey = $props[key]; if (isStr(propKey) && propKey in ownerInstance) { // get instance value renderData.props[key] = ownerInstance[propKey]; watchKeys.push(key); watchPropKeys.push(propKey); } else { renderData.props[key] = propKey; } }); if (isInVueInstance) { var unwatchFn = ownerInstance.$watch(function () { var props = {}; watchKeys.forEach(function (key, i) { props[key] = ownerInstance[watchPropKeys[i]]; }); return props; }, onChange); ownerInstance.__unwatchFns__.push(unwatchFn); } } } function processEvents(renderData, ownerInstance) { var $events = renderData.props.$events; if ($events) { delete renderData.props.$events; Object.keys($events).forEach(function (event) { var eventHandler = $events[event]; if (typeof eventHandler === 'string') { eventHandler = ownerInstance[eventHandler]; } renderData.on[event] = eventHandler; }); } } function process$(renderData) { var props = renderData.props; Object.keys(props).forEach(function (prop) { if (prop.charAt(0) === '$') { renderData[prop.slice(1)] = props[prop]; delete props[prop]; } }); } function cancelWatchProps(ownerInstance) { if (ownerInstance.__unwatchFns__) { ownerInstance.__unwatchFns__.forEach(function (unwatchFn) { unwatchFn(); }); ownerInstance.__unwatchFns__ = null; } } var api = { before: function before(hook) { beforeHooks.push(hook); }, create: function create(config, renderFn, _single) { if (!isFunction(renderFn) && isUndef(_single)) { _single = renderFn; renderFn = null; } if (isUndef(_single)) { _single = single; } var ownerInstance = this; var isInVueInstance = !!ownerInstance.$on; var options = {}; if (isInVueInstance) { // Set parent to store router i18n ... options.parent = ownerInstance; if (!ownerInstance.__unwatchFns__) { ownerInstance.__unwatchFns__ = []; } } var renderData = parseRenderData(config, events); var component = null; processProps(ownerInstance, renderData, isInVueInstance, function (newProps) { component && component.$updateProps(newProps); }); processEvents(renderData, ownerInstance); process$(renderData); component = createComponent(renderData, renderFn, options, _single); if (isInVueInstance) { ownerInstance.$on(eventBeforeDestroy, beforeDestroy); } function beforeDestroy() { cancelWatchProps(ownerInstance); component.remove(); component = null; } return component; } }; return api; } var installed = false; function install(Vue) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (installed) { warn('[vue-create-api] already installed. Vue.use(CreateAPI) should be called only once.'); return; } installed = true; var _options$componentPre = options.componentPrefix, componentPrefix = _options$componentPre === undefined ? '' : _options$componentPre, _options$apiPrefix = options.apiPrefix, apiPrefix = _options$apiPrefix === undefined ? '$create-' : _options$apiPrefix; Vue.createAPI = function (Component, events, single) { if (isBoolean(events)) { single = events; events = []; } var api = apiCreator.call(this, Component, events, single); var createName = processComponentName(Component, { componentPrefix: componentPrefix, apiPrefix: apiPrefix }); Vue.prototype[createName] = Component.$create = api.create; return api; }; } function processComponentName(Component, options) { var componentPrefix = options.componentPrefix, apiPrefix = options.apiPrefix; var name = Component.name; assert(name, 'Component must have name while using create-api!'); var prefixReg = new RegExp('^' + escapeReg(componentPrefix), 'i'); var pureName = name.replace(prefixReg, ''); var camelizeName = '' + camelize('' + apiPrefix + pureName); return camelizeName; } var index = { install: install, instantiateComponent: instantiateComponent, version: '0.2.0' }; /* harmony default export */ __webpack_exports__["default"] = (index); /***/ }), /* 96 */ /***/ (function(module, exports, __webpack_require__) { function injectStyle (ssrContext) { __webpack_require__(97) } var Component = __webpack_require__(6)( /* script */ __webpack_require__(98), /* template */ __webpack_require__(99), /* styles */ injectStyle, /* scopeId */ null, /* moduleIdentifier (server only) */ null ) module.exports = Component.exports /***/ }), /* 97 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /* 98 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(36), __webpack_require__(49), __webpack_require__(59)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(module, exports, require('babel-runtime/helpers/defineProperty'), require('../../common/mixins/visibility'), require('../../common/mixins/popup')); } else { var mod = { exports: {} }; factory(mod, mod.exports, global.defineProperty, global.visibility, global.popup); global.popup = mod.exports; } })(this, function (module, exports, _defineProperty2, _visibility, _popup) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _visibility2 = _interopRequireDefault(_visibility); var _popup2 = _interopRequireDefault(_popup); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var COMPONENT_NAME = 'cube-popup'; var EVENT_MASK_CLICK = 'mask-click'; exports.default = { name: COMPONENT_NAME, mixins: [_visibility2.default, _popup2.default], props: { type: { type: String, default: '' }, mask: { type: Boolean, default: true }, content: { type: String, default: '' }, center: { type: Boolean, default: true }, position: { type: String, default: '' } }, computed: { rootClass: function rootClass() { var cls = { 'cube-popup_mask': this.mask }; if (this.type) { cls['cube-' + this.type] = true; } return cls; }, containerClass: function containerClass() { var center = this.center; var position = this.position; if (position) { return (0, _defineProperty3.default)({}, 'cube-popup-' + position, true); } if (center) { return { 'cube-popup-center': true }; } } }, methods: { maskClick: function maskClick(e) { this.$emit(EVENT_MASK_CLICK, e); if (this.maskClosable) { this.hide(); } } } }; module.exports = exports['default']; }); /***/ }), /* 99 */ /***/ (function(module, exports) { module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; return _c('div', { directives: [{ name: "show", rawName: "v-show", value: (_vm.isVisible), expression: "isVisible" }], staticClass: "cube-popup", class: _vm.rootClass, style: ({ 'z-index': _vm.zIndex }) }, [_c('div', { staticClass: "cube-popup-mask", on: { "touchmove": function($event) { $event.preventDefault(); }, "click": _vm.maskClick } }, [_vm._t("mask")], 2), _vm._v(" "), _c('div', { staticClass: "cube-popup-container", class: _vm.containerClass, on: { "touchmove": function($event) { $event.preventDefault(); } } }, [(_vm.$slots.default) ? _c('div', { staticClass: "cube-popup-content" }, [_vm._t("default")], 2) : _c('div', { staticClass: "cube-popup-content", domProps: { "innerHTML": _vm._s(_vm.content) } })])]) },staticRenderFns: []} /***/ }), /* 100 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(module, exports); } else { var mod = { exports: {} }; factory(mod, mod.exports); global.zhCN = mod.exports; } })(this, function (module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { cancel: '取消', confirm: '确认', ok: '确定', prev: '上一步', next: '下一步', selectText: '请选择', now: '现在', selectTime: '选择时间', today: '今日', formatDate: 'M月D日', hours: '点', minutes: '分', validator: { required: '此为必填项', type: { string: '请输入字符', number: '请输入数字', array: '数据类型应为数组', date: '请选择有效日期', email: '请输入有效邮箱', tel: '请输入有效的手机号码', url: '请输入有效网址' }, min: { string: '至少输入 {{config}} 位字符', number: '不得小于 {{config}}', array: '请选择至少 {{config}} 项', date: '请选择 {{config | toLocaleDateString("yyyy年MM月dd日")}} 之后的时间', email: '至少输入 {{config}} 位字符', tel: '至少输入 {{config}} 位字符', url: '至少输入 {{config}} 位字符' }, max: { string: '请勿超过 {{config}} 位字符', number: '请勿大于 {{config}}', array: '最多选择 {{config}} 项', date: '请选择 {{config | toLocaleDateString("yyyy年MM月dd日")}} 之前的时间', email: '请勿超过 {{config}} 位字符', tel: '请勿超过 {{config}} 位字符', url: '请勿超过 {{config}} 位字符' }, len: { string: '请输入 {{config}} 位字符', number: '长度应等于 {{config}}', array: '请选择 {{config}} 项', date: '请选择 {{config | toLocaleDateString("yyyy年MM月dd日")}} 之前的时间', email: '请输入 {{config}} 位字符', tel: '请输入 {{config}} 位字符', url: '请输入 {{config}} 位字符' }, pattern: '格式错误', custom: '未通过校验', notWhitespace: '空白内容无效' } }; module.exports = exports['default']; }); /***/ }), /* 101 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(module, exports); } else { var mod = { exports: {} }; factory(mod, mod.exports); global.picker = mod.exports; } })(this, function (module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { props: { title: { type: String }, subtitle: { type: String }, cancelTxt: { type: String, default: '' }, confirmTxt: { type: String, default: '' }, swipeTime: { type: Number, default: 2500 }, maskClosable: { type: Boolean, default: true } }, computed: { _cancelTxt: function _cancelTxt() { return this.cancelTxt || this.$t('cancel'); }, _confirmTxt: function _confirmTxt() { return this.confirmTxt || this.$t('ok'); } } }; module.exports = exports['default']; }); /***/ }), /* 102 */, /* 103 */, /* 104 */, /* 105 */, /* 106 */, /* 107 */ /***/ (function(module, exports, __webpack_require__) { function injectStyle (ssrContext) { __webpack_require__(130) } var Component = __webpack_require__(6)( /* script */ __webpack_require__(131), /* template */ __webpack_require__(132), /* styles */ injectStyle, /* scopeId */ null, /* moduleIdentifier (server only) */ null ) module.exports = Component.exports /***/ }), /* 108 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(module, exports); } else { var mod = { exports: {} }; factory(mod, mod.exports); global.basicPicker = mod.exports; } })(this, function (module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var DEFAULT_KEYS = { value: 'value', text: 'text', order: 'order' }; exports.default = { props: { data: { type: Array, default: function _default() { return []; } }, selectedIndex: { type: Array, default: function _default() { return []; } }, alias: { type: Object, default: function _default() { return {}; } } }, computed: { valueKey: function valueKey() { return this.alias.value || DEFAULT_KEYS.value; }, textKey: function textKey() { return this.alias.text || DEFAULT_KEYS.text; }, orderKey: function orderKey() { return DEFAULT_KEYS.order; }, merge: function merge() { return [this.data, this.selectedIndex]; } }, watch: { merge: function merge(newVal) { this.setData(newVal[0], newVal[1]); } } }; module.exports = exports['default']; }); /***/ }), /* 109 */, /* 110 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _from = __webpack_require__(111); var _from2 = _interopRequireDefault(_from); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return (0, _from2.default)(arr); } }; /***/ }), /* 111 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(112), __esModule: true }; /***/ }), /* 112 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(38); __webpack_require__(113); module.exports = __webpack_require__(0).Array.from; /***/ }), /* 113 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var ctx = __webpack_require__(35); var $export = __webpack_require__(12); var toObject = __webpack_require__(25); var call = __webpack_require__(114); var isArrayIter = __webpack_require__(115); var toLength = __webpack_require__(37); var createProperty = __webpack_require__(116); var getIterFn = __webpack_require__(88); $export($export.S + $export.F * !__webpack_require__(117)(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); var C = typeof this == 'function' ? this : Array; var aLen = arguments.length; var mapfn = aLen > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; var index = 0; var iterFn = getIterFn(O); var 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; } }); /***/ }), /* 114 */ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__(11); 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; } }; /***/ }), /* 115 */ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__(13); var ITERATOR = __webpack_require__(2)('iterator'); var ArrayProto = Array.prototype; module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }), /* 116 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $defineProperty = __webpack_require__(4); var createDesc = __webpack_require__(14); module.exports = function (object, index, value) { if (index in object) $defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }), /* 117 */ /***/ (function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(2)('iterator'); var SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function () { SAFE_CLOSING = true; }; // eslint-disable-next-line no-throw-literal 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]; var iter = arr[ITERATOR](); iter.next = function () { return { done: safe = true }; }; arr[ITERATOR] = function () { return iter; }; exec(arr); } catch (e) { /* empty */ } return safe; }; /***/ }), /* 118 */, /* 119 */, /* 120 */, /* 121 */, /* 122 */, /* 123 */, /* 124 */, /* 125 */, /* 126 */, /* 127 */, /* 128 */, /* 129 */, /* 130 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /* 131 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(110), __webpack_require__(74), __webpack_require__(96), __webpack_require__(49), __webpack_require__(59), __webpack_require__(108), __webpack_require__(101), __webpack_require__(73)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(module, exports, require('babel-runtime/helpers/toConsumableArray'), require('better-scroll'), require('../popup/popup.vue'), require('../../common/mixins/visibility'), require('../../common/mixins/popup'), require('../../common/mixins/basic-picker'), require('../../common/mixins/picker'), require('../../common/mixins/locale')); } else { var mod = { exports: {} }; factory(mod, mod.exports, global.toConsumableArray, global.betterScroll, global.popup, global.visibility, global.popup, global.basicPicker, global.picker, global.locale); global.picker = mod.exports; } })(this, function (module, exports, _toConsumableArray2, _betterScroll, _popup, _visibility, _popup3, _basicPicker, _picker, _locale) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); var _betterScroll2 = _interopRequireDefault(_betterScroll); var _popup2 = _interopRequireDefault(_popup); var _visibility2 = _interopRequireDefault(_visibility); var _popup4 = _interopRequireDefault(_popup3); var _basicPicker2 = _interopRequireDefault(_basicPicker); var _picker2 = _interopRequireDefault(_picker); var _locale2 = _interopRequireDefault(_locale); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var COMPONENT_NAME = 'cube-picker'; var EVENT_SELECT = 'select'; var EVENT_VALUE_CHANGE = 'value-change'; var EVENT_CANCEL = 'cancel'; var EVENT_CHANGE = 'change'; exports.default = { name: COMPONENT_NAME, mixins: [_visibility2.default, _popup4.default, _basicPicker2.default, _picker2.default, _locale2.default], props: { pending: { type: Boolean, default: false } }, data: function data() { return { finalData: this.data.slice() }; }, created: function created() { this._values = []; this._indexes = this.selectedIndex; }, methods: { confirm: function confirm() { if (!this._canConfirm()) { return; } this.hide(); var changed = false; var pickerSelectedText = []; var length = this.finalData.length; var oldLength = this._values.length; if (oldLength !== length) { changed = true; oldLength > length && (this._values.length = this._indexes.length = length); } for (var i = 0; i < length; i++) { var index = this.wheels[i].getSelectedIndex(); this._indexes[i] = index; var value = null; var text = ''; if (this.finalData[i].length) { value = this.finalData[i][index][this.valueKey]; text = this.finalData[i][index][this.textKey]; } if (this._values[i] !== value) { changed = true; } this._values[i] = value; pickerSelectedText[i] = text; } this.$emit(EVENT_SELECT, this._values, this._indexes, pickerSelectedText); if (changed) { this.$emit(EVENT_VALUE_CHANGE, this._values, this._indexes, pickerSelectedText); } }, maskClick: function maskClick() { this.maskClosable && this.cancel(); }, cancel: function cancel() { this.hide(); this.$emit(EVENT_CANCEL); }, show: function show() { var _this = this; if (this.isVisible) { return; } this.isVisible = true; if (!this.wheels || this.dirty) { this.$nextTick(function () { _this.wheels = _this.wheels || []; var wheelWrapper = _this.$refs.wheelWrapper; for (var i = 0; i < _this.finalData.length; i++) { _this._createWheel(wheelWrapper, i).enable(); _this.wheels[i].wheelTo(_this._indexes[i]); } _this.dirty && _this._destroyExtraWheels(); _this.dirty = false; }); } else { for (var i = 0; i < this.finalData.length; i++) { this.wheels[i].enable(); this.wheels[i].wheelTo(this._indexes[i]); } } }, hide: function hide() { if (!this.isVisible) { return; } this.isVisible = false; for (var i = 0; i < this.finalData.length; i++) { this.wheels[i].disable(); } }, setData: function setData(data, selectedIndex) { var _this2 = this; this._indexes = selectedIndex ? [].concat((0, _toConsumableArray3.default)(selectedIndex)) : []; this.finalData = data.slice(); if (this.isVisible) { this.$nextTick(function () { var wheelWrapper = _this2.$refs.wheelWrapper; _this2.finalData.forEach(function (item, i) { _this2._createWheel(wheelWrapper, i); _this2.wheels[i].wheelTo(_this2._indexes[i]); }); _this2._destroyExtraWheels(); }); } else { this.dirty = true; } }, refill: function refill(datas) { var _this3 = this; var ret = []; if (!datas.length) { return ret; } datas.forEach(function (data, index) { ret[index] = _this3.refillColumn(index, data); }); return ret; }, refillColumn: function refillColumn(index, data) { var _this4 = this; var wheelWrapper = this.$refs.wheelWrapper; var scroll = wheelWrapper.children[index].querySelector('.cube-picker-wheel-scroll'); var wheel = this.wheels ? this.wheels[index] : false; var dist = 0; if (scroll && wheel) { var oldData = this.finalData[index]; this.$set(this.finalData, index, data); var selectedIndex = wheel.getSelectedIndex(); if (oldData.length) { var oldValue = oldData[selectedIndex][this.valueKey]; for (var i = 0; i < data.length; i++) { if (data[i][this.valueKey] === oldValue) { dist = i; break; } } } this._indexes[index] = dist; this.$nextTick(function () { wheel = _this4._createWheel(wheelWrapper, index); wheel.wheelTo(dist); }); } return dist; }, scrollTo: function scrollTo(index, dist) { var wheel = this.wheels[index]; this._indexes[index] = dist; wheel.wheelTo(dist); }, refresh: function refresh() { var _this5 = this; this.$nextTick(function () { _this5.wheels.forEach(function (wheel) { wheel.refresh(); }); }); }, _createWheel: function _createWheel(wheelWrapper, i) { var _this6 = this; if (!this.wheels[i]) { var wheel = this.wheels[i] = new _betterScroll2.default(wheelWrapper.children[i], { wheel: { selectedIndex: this._indexes[i] || 0, wheelWrapperClass: 'cube-picker-wheel-scroll', wheelItemClass: 'cube-picker-wheel-item' }, swipeTime: this.swipeTime, observeDOM: false }); wheel.on('scrollEnd', function () { _this6.$emit(EVENT_CHANGE, i, wheel.getSelectedIndex()); }); } else { this.wheels[i].refresh(); } return this.wheels[i]; }, _destroyExtraWheels: function _destroyExtraWheels() { var dataLength = this.finalData.length; if (this.wheels.length > dataLength) { var extraWheels = this.wheels.splice(dataLength); extraWheels.forEach(function (wheel) { wheel.destroy(); }); } }, _canConfirm: function _canConfirm() { return !this.pending && this.wheels.every(function (wheel) { return !wheel.isInTransition; }); }, _getFlexOrder: function _getFlexOrder(data) { if (data[0]) { return data[0][this.orderKey]; } return 0; } }, beforeDestroy: function beforeDestroy() { this.wheels && this.wheels.forEach(function (wheel) { wheel.destroy(); }); this.wheels = null; }, components: { CubePopup: _popup2.default } }; module.exports = exports['default']; }); /***/ }), /* 132 */ /***/ (function(module, exports) { module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; return _c('transition', { attrs: { "name": "cube-picker-fade" } }, [_c('cube-popup', { directives: [{ name: "show", rawName: "v-show", value: (_vm.isVisible), expression: "isVisible" }], attrs: { "type": "picker", "mask": true, "center": false, "z-index": _vm.zIndex }, on: { "touchmove": function($event) { $event.preventDefault(); }, "mask-click": _vm.maskClick } }, [_c('transition', { attrs: { "name": "cube-picker-move" } }, [_c('div', { directives: [{ name: "show", rawName: "v-show", value: (_vm.isVisible), expression: "isVisible" }], staticClass: "cube-picker-panel cube-safe-area-pb", on: { "click": function($event) { $event.stopPropagation(); } } }, [_c('div', { staticClass: "cube-picker-choose border-bottom-1px" }, [_c('span', { staticClass: "cube-picker-cancel", on: { "click": _vm.cancel } }, [_vm._v(_vm._s(_vm._cancelTxt))]), _vm._v(" "), _c('span', { staticClass: "cube-picker-confirm", on: { "click": _vm.confirm } }, [_vm._v(_vm._s(_vm._confirmTxt))]), _vm._v(" "), _c('div', { staticClass: "cube-picker-title-group" }, [_c('h1', { staticClass: "cube-picker-title", domProps: { "innerHTML": _vm._s(_vm.title) } }), _vm._v(" "), (_vm.subtitle) ? _c('h2', { staticClass: "cube-picker-subtitle", domProps: { "innerHTML": _vm._s(_vm.subtitle) } }) : _vm._e()])]), _vm._v(" "), _c('div', { staticClass: "cube-picker-content" }, [_c('i', { staticClass: "border-bottom-1px" }), _vm._v(" "), _c('i', { staticClass: "border-top-1px" }), _vm._v(" "), _c('div', { ref: "wheelWrapper", staticClass: "cube-picker-wheel-wrapper" }, _vm._l((_vm.finalData), function(data, index) { return _c('div', { key: index, style: ({ order: _vm._getFlexOrder(data) }) }, [_c('ul', { staticClass: "cube-picker-wheel-scroll" }, _vm._l((data), function(item, index) { return _c('li', { key: index, staticClass: "cube-picker-wheel-item", domProps: { "innerHTML": _vm._s(item[_vm.textKey]) } }) }))]) }))]), _vm._v(" "), _c('div', { staticClass: "cube-picker-footer" })])])], 1)], 1) },staticRenderFns: []} /***/ }), /* 133 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(72), __webpack_require__(32)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(module, exports, require('../../common/helpers/create-api'), require('../../common/helpers/debug')); } else { var mod = { exports: {} }; factory(mod, mod.exports, global.createApi, global.debug); global.api = mod.exports; } })(this, function (module, exports, _createApi, _debug) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = addPicker; var _createApi2 = _interopRequireDefault(_createApi); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function addPicker(Vue, Picker) { var pickerAPI = (0, _createApi2.default)(Vue, Picker, ['select', 'value-change', 'cancel', 'change']); pickerAPI.before(function (data, renderFn, single) { if (single) { (0, _debug.tip)('Picker component can not be a singleton.'); } }); } module.exports = exports['default']; }); /***/ }), /* 134 */, /* 135 */, /* 136 */, /* 137 */, /* 138 */, /* 139 */, /* 140 */, /* 141 */, /* 142 */, /* 143 */ /***/ (function(module, exports, __webpack_require__) { var Component = __webpack_require__(6)( /* script */ __webpack_require__(144), /* template */ __webpack_require__(145), /* styles */ null, /* scopeId */ null, /* moduleIdentifier (server only) */ null ) module.exports = Component.exports /***/ }), /* 144 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(107), __webpack_require__(49), __webpack_require__(59), __webpack_require__(108), __webpack_require__(101), __webpack_require__(73)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(module, exports, require('../picker/picker.vue'), require('../../common/mixins/visibility'), require('../../common/mixins/popup'), require('../../common/mixins/basic-picker'), require('../../common/mixins/picker'), require('../../common/mixins/locale')); } else { var mod = { exports: {} }; factory(mod, mod.exports, global.picker, global.visibility, global.popup, global.basicPicker, global.picker, global.locale); global.cascadePicker = mod.exports; } })(this, function (module, exports, _picker, _visibility, _popup, _basicPicker, _picker3, _locale) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _picker2 = _interopRequireDefault(_picker); var _visibility2 = _interopRequireDefault(_visibility); var _popup2 = _interopRequireDefault(_popup); var _basicPicker2 = _interopRequireDefault(_basicPicker); var _picker4 = _interopRequireDefault(_picker3); var _locale2 = _interopRequireDefault(_locale); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var COMPONENT_NAME = 'cube-cascade-picker'; var EVENT_SELECT = 'select'; var EVENT_CANCEL = 'cancel'; var EVENT_CHANGE = 'change'; exports.default = { name: COMPONENT_NAME, mixins: [_visibility2.default, _popup2.default, _basicPicker2.default, _picker4.default, _locale2.default], props: { async: { type: Boolean, default: false } }, data: function data() { return { cascadeData: this.data.slice(), pickerSelectedIndex: this.selectedIndex.slice(), pickerData: [], pending: false }; }, created: function created() { this._updatePickerData(); }, methods: { setData: function setData(data) { var selectedIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; this.pending = false; this.cascadeData = data.slice(); this.pickerSelectedIndex = selectedIndex.slice(); this._updatePickerData(); }, _pickerSelect: function _pickerSelect(selectedVal, selectedIndex, selectedText) { this.$emit(EVENT_SELECT, selectedVal, selectedIndex, selectedText); }, _pickerCancel: function _pickerCancel() { this.$emit(EVENT_CANCEL); }, _pickerChange: function _pickerChange(i, newIndex) { if (newIndex !== this.pickerSelectedIndex[i]) { this.pickerSelectedIndex.splice(i, 1, newIndex); this.async ? this.pending = i !== this.pickerData.length - 1 : this._updatePickerData(i + 1); } this.$emit(EVENT_CHANGE, i, newIndex); }, _updatePickerData: function _updatePickerData() { var _this = this; var fromColumn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; var data = this.cascadeData; var i = 0; while (data) { if (i >= fromColumn) { (function () { var columnData = []; data.forEach(function (item) { columnData.push({ value: item[_this.valueKey], text: item[_this.textKey], order: item[_this.orderKey] }); }); _this.pickerData[i] = columnData; _this.pickerSelectedIndex[i] = fromColumn === 0 ? _this.pickerSelectedIndex[i] < data.length ? _this.pickerSelectedIndex[i] || 0 : 0 : _this.$refs.picker.refillColumn(i, columnData); })(); } data = data.length ? data[this.pickerSelectedIndex[i]].children : null; i++; } if (i < this.pickerData.length) { this.pickerData.splice(i, this.pickerData.length - i); } this.pickerData = this.pickerData.slice(); } }, components: { CubePicker: _picker2.default } }; module.exports = exports['default']; }); /***/ }), /* 145 */ /***/ (function(module, exports) { module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; return _c('cube-picker', { ref: "picker", attrs: { "data": _vm.pickerData, "selected-index": _vm.pickerSelectedIndex, "pending": _vm.pending, "title": _vm.title, "subtitle": _vm.subtitle, "z-index": _vm.zIndex, "cancel-txt": _vm._cancelTxt, "confirm-txt": _vm._confirmTxt, "swipe-time": _vm.swipeTime, "mask-closable": _vm.maskClosable }, on: { "select": _vm._pickerSelect, "cancel": _vm._pickerCancel, "change": _vm._pickerChange }, model: { value: (_vm.isVisible), callback: function($$v) { _vm.isVisible = $$v }, expression: "isVisible" } }) },staticRenderFns: []} /***/ }), /* 146 */, /* 147 */, /* 148 */, /* 149 */, /* 150 */, /* 151 */, /* 152 */, /* 153 */, /* 154 */, /* 155 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(72), __webpack_require__(32)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(module, exports, require('../../common/helpers/create-api'), require('../../common/helpers/debug')); } else { var mod = { exports: {} }; factory(mod, mod.exports, global.createApi, global.debug); global.api = mod.exports; } })(this, function (module, exports, _createApi, _debug) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = addCascadePicker; var _createApi2 = _interopRequireDefault(_createApi); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function addCascadePicker(Vue, CascadePicker) { var cascadePickerAPI = (0, _createApi2.default)(Vue, CascadePicker, ['select', 'cancel', 'change']); cascadePickerAPI.before(function (data, renderFn, single) { if (single) { (0, _debug.tip)('CascadePicker component can not be a singleton.'); } }); } module.exports = exports['default']; }); /***/ }), /* 156 */, /* 157 */, /* 158 */, /* 159 */, /* 160 */, /* 161 */, /* 162 */, /* 163 */, /* 164 */, /* 165 */, /* 166 */, /* 167 */, /* 168 */, /* 169 */, /* 170 */, /* 171 */, /* 172 */, /* 173 */, /* 174 */, /* 175 */, /* 176 */, /* 177 */, /* 178 */, /* 179 */, /* 180 */, /* 181 */, /* 182 */, /* 183 */, /* 184 */, /* 185 */, /* 186 */, /* 187 */, /* 188 */, /* 189 */, /* 190 */, /* 191 */, /* 192 */, /* 193 */, /* 194 */, /* 195 */, /* 196 */, /* 197 */, /* 198 */, /* 199 */, /* 200 */, /* 201 */, /* 202 */, /* 203 */, /* 204 */, /* 205 */, /* 206 */, /* 207 */, /* 208 */, /* 209 */, /* 210 */, /* 211 */, /* 212 */, /* 213 */, /* 214 */, /* 215 */, /* 216 */, /* 217 */, /* 218 */, /* 219 */, /* 220 */, /* 221 */, /* 222 */, /* 223 */, /* 224 */, /* 225 */, /* 226 */, /* 227 */, /* 228 */, /* 229 */, /* 230 */, /* 231 */, /* 232 */, /* 233 */, /* 234 */, /* 235 */, /* 236 */, /* 237 */, /* 238 */, /* 239 */, /* 240 */, /* 241 */, /* 242 */, /* 243 */, /* 244 */, /* 245 */, /* 246 */, /* 247 */, /* 248 */, /* 249 */, /* 250 */, /* 251 */, /* 252 */, /* 253 */, /* 254 */, /* 255 */, /* 256 */, /* 257 */, /* 258 */, /* 259 */, /* 260 */, /* 261 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(107), __webpack_require__(143), __webpack_require__(155), __webpack_require__(133), __webpack_require__(66)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { factory(module, exports, require('../../components/picker/picker.vue'), require('../../components/cascade-picker/cascade-picker.vue'), require('./api'), require('../picker/api'), require('../../common/locale')); } else { var mod = { exports: {} }; factory(mod, mod.exports, global.picker, global.cascadePicker, global.api, global.api, global.locale); global.index = mod.exports; } })(this, function (module, exports, _picker, _cascadePicker, _api, _api3, _locale) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _picker2 = _interopRequireDefault(_picker); var _cascadePicker2 = _interopRequireDefault(_cascadePicker); var _api2 = _interopRequireDefault(_api); var _api4 = _interopRequireDefault(_api3); var _locale2 = _interopRequireDefault(_locale); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } _cascadePicker2.default.install = function (Vue) { Vue.component(_picker2.default.name, _picker2.default); Vue.component(_cascadePicker2.default.name, _cascadePicker2.default); _locale2.default.install(Vue); (0, _api4.default)(Vue, _picker2.default); (0, _api2.default)(Vue, _cascadePicker2.default); }; _cascadePicker2.default.Picker = _picker2.default; exports.default = _cascadePicker2.default; module.exports = exports['default']; }); /***/ }) /******/ ]); });
/*! * Clean Blog v1.0.0 (http://startbootstrap.com) * Copyright 2015 Start Bootstrap * Licensed under Apache 2.0 (https://github.com/IronSummitMedia/startbootstrap/blob/gh-pages/LICENSE) */ $(function(){$("[data-toggle='tooltip']").tooltip()}),$(function(){$("input,textarea").jqBootstrapValidation({preventSubmit:!0,submitError:function(){},submitSuccess:function(a,b){b.preventDefault();var c=$("input#name").val(),d=$("input#email").val(),e=$("input#phone").val(),f=$("textarea#message").val(),g=c;g.indexOf(" ")>=0&&(g=c.split(" ").slice(0,-1).join(" ")),$.ajax({url:"././mail/contact_me.php",type:"POST",data:{name:c,phone:e,email:d,message:f},cache:!1,success:function(){$("#success").html("<div class='alert alert-success'>"),$("#success > .alert-success").html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;").append("</button>"),$("#success > .alert-success").append("<strong>Your message has been sent. </strong>"),$("#success > .alert-success").append("</div>"),$("#contactForm").trigger("reset")},error:function(){$("#success").html("<div class='alert alert-danger'>"),$("#success > .alert-danger").html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;").append("</button>"),$("#success > .alert-danger").append("<strong>Sorry "+g+", it seems that my mail server is not responding. Please try again later!"),$("#success > .alert-danger").append("</div>"),$("#contactForm").trigger("reset")}})},filter:function(){return $(this).is(":visible")}}),$('a[data-toggle="tab"]').click(function(a){a.preventDefault(),$(this).tab("show")})}),$("#name").focus(function(){$("#success").html("")}),function(a){function b(a){return new RegExp("^"+a+"$")}function c(a,b){for(var c=Array.prototype.slice.call(arguments).splice(2),d=a.split("."),e=d.pop(),f=0;f<d.length;f++)b=b[d[f]];return b[e].apply(this,c)}var d=[],e={options:{prependExistingHelpBlock:!1,sniffHtml:!0,preventSubmit:!0,submitError:!1,submitSuccess:!1,semanticallyStrict:!1,autoAdd:{helpBlocks:!0},filter:function(){return!0}},methods:{init:function(b){var c=a.extend(!0,{},e);c.options=a.extend(!0,c.options,b);var h=this,i=a.unique(h.map(function(){return a(this).parents("form")[0]}).toArray());return a(i).bind("submit",function(b){var d=a(this),e=0,f=d.find("input,textarea,select").not("[type=submit],[type=image]").filter(c.options.filter);f.trigger("submit.validation").trigger("validationLostFocus.validation"),f.each(function(b,c){var d=a(c),f=d.parents(".form-group").first();f.hasClass("warning")&&(f.removeClass("warning").addClass("error"),e++)}),f.trigger("validationLostFocus.validation"),e?(c.options.preventSubmit&&b.preventDefault(),d.addClass("error"),a.isFunction(c.options.submitError)&&c.options.submitError(d,b,f.jqBootstrapValidation("collectErrors",!0))):(d.removeClass("error"),a.isFunction(c.options.submitSuccess)&&c.options.submitSuccess(d,b))}),this.each(function(){var b=a(this),e=b.parents(".form-group").first(),h=e.find(".help-block").first(),i=b.parents("form").first(),j=[];if(!h.length&&c.options.autoAdd&&c.options.autoAdd.helpBlocks&&(h=a('<div class="help-block" />'),e.find(".controls").append(h),d.push(h[0])),c.options.sniffHtml){var k="";if(void 0!==b.attr("pattern")&&(k="Not in the expected format<!-- data-validation-pattern-message to override -->",b.data("validationPatternMessage")&&(k=b.data("validationPatternMessage")),b.data("validationPatternMessage",k),b.data("validationPatternRegex",b.attr("pattern"))),void 0!==b.attr("max")||void 0!==b.attr("aria-valuemax")){var l=b.attr(void 0!==b.attr("max")?"max":"aria-valuemax");k="Too high: Maximum of '"+l+"'<!-- data-validation-max-message to override -->",b.data("validationMaxMessage")&&(k=b.data("validationMaxMessage")),b.data("validationMaxMessage",k),b.data("validationMaxMax",l)}if(void 0!==b.attr("min")||void 0!==b.attr("aria-valuemin")){var m=b.attr(void 0!==b.attr("min")?"min":"aria-valuemin");k="Too low: Minimum of '"+m+"'<!-- data-validation-min-message to override -->",b.data("validationMinMessage")&&(k=b.data("validationMinMessage")),b.data("validationMinMessage",k),b.data("validationMinMin",m)}void 0!==b.attr("maxlength")&&(k="Too long: Maximum of '"+b.attr("maxlength")+"' characters<!-- data-validation-maxlength-message to override -->",b.data("validationMaxlengthMessage")&&(k=b.data("validationMaxlengthMessage")),b.data("validationMaxlengthMessage",k),b.data("validationMaxlengthMaxlength",b.attr("maxlength"))),void 0!==b.attr("minlength")&&(k="Too short: Minimum of '"+b.attr("minlength")+"' characters<!-- data-validation-minlength-message to override -->",b.data("validationMinlengthMessage")&&(k=b.data("validationMinlengthMessage")),b.data("validationMinlengthMessage",k),b.data("validationMinlengthMinlength",b.attr("minlength"))),(void 0!==b.attr("required")||void 0!==b.attr("aria-required"))&&(k=c.builtInValidators.required.message,b.data("validationRequiredMessage")&&(k=b.data("validationRequiredMessage")),b.data("validationRequiredMessage",k)),void 0!==b.attr("type")&&"number"===b.attr("type").toLowerCase()&&(k=c.builtInValidators.number.message,b.data("validationNumberMessage")&&(k=b.data("validationNumberMessage")),b.data("validationNumberMessage",k)),void 0!==b.attr("type")&&"email"===b.attr("type").toLowerCase()&&(k="Not a valid email address<!-- data-validator-validemail-message to override -->",b.data("validationValidemailMessage")?k=b.data("validationValidemailMessage"):b.data("validationEmailMessage")&&(k=b.data("validationEmailMessage")),b.data("validationValidemailMessage",k)),void 0!==b.attr("minchecked")&&(k="Not enough options checked; Minimum of '"+b.attr("minchecked")+"' required<!-- data-validation-minchecked-message to override -->",b.data("validationMincheckedMessage")&&(k=b.data("validationMincheckedMessage")),b.data("validationMincheckedMessage",k),b.data("validationMincheckedMinchecked",b.attr("minchecked"))),void 0!==b.attr("maxchecked")&&(k="Too many options checked; Maximum of '"+b.attr("maxchecked")+"' required<!-- data-validation-maxchecked-message to override -->",b.data("validationMaxcheckedMessage")&&(k=b.data("validationMaxcheckedMessage")),b.data("validationMaxcheckedMessage",k),b.data("validationMaxcheckedMaxchecked",b.attr("maxchecked")))}void 0!==b.data("validation")&&(j=b.data("validation").split(",")),a.each(b.data(),function(a){var b=a.replace(/([A-Z])/g,",$1").split(",");"validation"===b[0]&&b[1]&&j.push(b[1])});var n=j,o=[];do a.each(j,function(a,b){j[a]=f(b)}),j=a.unique(j),o=[],a.each(n,function(d,e){if(void 0!==b.data("validation"+e+"Shortcut"))a.each(b.data("validation"+e+"Shortcut").split(","),function(a,b){o.push(b)});else if(c.builtInValidators[e.toLowerCase()]){var g=c.builtInValidators[e.toLowerCase()];"shortcut"===g.type.toLowerCase()&&a.each(g.shortcut.split(","),function(a,b){b=f(b),o.push(b),j.push(b)})}}),n=o;while(n.length>0);var p={};a.each(j,function(d,e){var g=b.data("validation"+e+"Message"),h=void 0!==g,i=!1;if(g=g?g:"'"+e+"' validation failed <!-- Add attribute 'data-validation-"+e.toLowerCase()+"-message' to input to change this message -->",a.each(c.validatorTypes,function(c,d){void 0===p[c]&&(p[c]=[]),i||void 0===b.data("validation"+e+f(d.name))||(p[c].push(a.extend(!0,{name:f(d.name),message:g},d.init(b,e))),i=!0)}),!i&&c.builtInValidators[e.toLowerCase()]){var j=a.extend(!0,{},c.builtInValidators[e.toLowerCase()]);h&&(j.message=g);var k=j.type.toLowerCase();"shortcut"===k?i=!0:a.each(c.validatorTypes,function(c,d){void 0===p[c]&&(p[c]=[]),i||k!==c.toLowerCase()||(b.data("validation"+e+f(d.name),j[d.name.toLowerCase()]),p[k].push(a.extend(j,d.init(b,e))),i=!0)})}i||a.error("Cannot find validation info for '"+e+"'")}),h.data("original-contents",h.data("original-contents")?h.data("original-contents"):h.html()),h.data("original-role",h.data("original-role")?h.data("original-role"):h.attr("role")),e.data("original-classes",e.data("original-clases")?e.data("original-classes"):e.attr("class")),b.data("original-aria-invalid",b.data("original-aria-invalid")?b.data("original-aria-invalid"):b.attr("aria-invalid")),b.bind("validation.validation",function(d,e){var f=g(b),h=[];return a.each(p,function(d,g){(f||f.length||e&&e.includeEmpty||c.validatorTypes[d].blockSubmit&&e&&e.submitting)&&a.each(g,function(a,e){c.validatorTypes[d].validate(b,f,e)&&h.push(e.message)})}),h}),b.bind("getValidators.validation",function(){return p}),b.bind("submit.validation",function(){return b.triggerHandler("change.validation",{submitting:!0})}),b.bind(["keyup","focus","blur","click","keydown","keypress","change"].join(".validation ")+".validation",function(d,f){var j=g(b),k=[];e.find("input,textarea,select").each(function(c,d){var e=k.length;if(a.each(a(d).triggerHandler("validation.validation",f),function(a,b){k.push(b)}),k.length>e)a(d).attr("aria-invalid","true");else{var g=b.data("original-aria-invalid");a(d).attr("aria-invalid",void 0!==g?g:!1)}}),i.find("input,select,textarea").not(b).not('[name="'+b.attr("name")+'"]').trigger("validationLostFocus.validation"),k=a.unique(k.sort()),k.length?(e.removeClass("success error").addClass("warning"),h.html(c.options.semanticallyStrict&&1===k.length?k[0]+(c.options.prependExistingHelpBlock?h.data("original-contents"):""):'<ul role="alert"><li>'+k.join("</li><li>")+"</li></ul>"+(c.options.prependExistingHelpBlock?h.data("original-contents"):""))):(e.removeClass("warning error success"),j.length>0&&e.addClass("success"),h.html(h.data("original-contents"))),"blur"===d.type&&e.removeClass("success")}),b.bind("validationLostFocus.validation",function(){e.removeClass("success")})})},destroy:function(){return this.each(function(){var b=a(this),c=b.parents(".form-group").first(),e=c.find(".help-block").first();b.unbind(".validation"),e.html(e.data("original-contents")),c.attr("class",c.data("original-classes")),b.attr("aria-invalid",b.data("original-aria-invalid")),e.attr("role",b.data("original-role")),d.indexOf(e[0])>-1&&e.remove()})},collectErrors:function(){var b={};return this.each(function(c,d){var e=a(d),f=e.attr("name"),g=e.triggerHandler("validation.validation",{includeEmpty:!0});b[f]=a.extend(!0,g,b[f])}),a.each(b,function(a,c){0===c.length&&delete b[a]}),b},hasErrors:function(){var b=[];return this.each(function(c,d){b=b.concat(a(d).triggerHandler("getValidators.validation")?a(d).triggerHandler("validation.validation",{submitting:!0}):[])}),b.length>0},override:function(b){e=a.extend(!0,e,b)}},validatorTypes:{callback:{name:"callback",init:function(a,b){return{validatorName:b,callback:a.data("validation"+b+"Callback"),lastValue:a.val(),lastValid:!0,lastFinished:!0}},validate:function(a,b,d){if(d.lastValue===b&&d.lastFinished)return!d.lastValid;if(d.lastFinished===!0){d.lastValue=b,d.lastValid=!0,d.lastFinished=!1;var e=d,f=a;c(d.callback,window,a,b,function(a){e.lastValue===a.value&&(e.lastValid=a.valid,a.message&&(e.message=a.message),e.lastFinished=!0,f.data("validation"+e.validatorName+"Message",e.message),setTimeout(function(){f.trigger("change.validation")},1))})}return!1}},ajax:{name:"ajax",init:function(a,b){return{validatorName:b,url:a.data("validation"+b+"Ajax"),lastValue:a.val(),lastValid:!0,lastFinished:!0}},validate:function(b,c,d){return""+d.lastValue==""+c&&d.lastFinished===!0?d.lastValid===!1:(d.lastFinished===!0&&(d.lastValue=c,d.lastValid=!0,d.lastFinished=!1,a.ajax({url:d.url,data:"value="+c+"&field="+b.attr("name"),dataType:"json",success:function(a){""+d.lastValue==""+a.value&&(d.lastValid=!!a.valid,a.message&&(d.message=a.message),d.lastFinished=!0,b.data("validation"+d.validatorName+"Message",d.message),setTimeout(function(){b.trigger("change.validation")},1))},failure:function(){d.lastValid=!0,d.message="ajax call failed",d.lastFinished=!0,b.data("validation"+d.validatorName+"Message",d.message),setTimeout(function(){b.trigger("change.validation")},1)}})),!1)}},regex:{name:"regex",init:function(a,c){return{regex:b(a.data("validation"+c+"Regex"))}},validate:function(a,b,c){return!c.regex.test(b)&&!c.negative||c.regex.test(b)&&c.negative}},required:{name:"required",init:function(){return{}},validate:function(a,b,c){return!(0!==b.length||c.negative)||!!(b.length>0&&c.negative)},blockSubmit:!0},match:{name:"match",init:function(a,b){var c=a.parents("form").first().find('[name="'+a.data("validation"+b+"Match")+'"]').first();return c.bind("validation.validation",function(){a.trigger("change.validation",{submitting:!0})}),{element:c}},validate:function(a,b,c){return b!==c.element.val()&&!c.negative||b===c.element.val()&&c.negative},blockSubmit:!0},max:{name:"max",init:function(a,b){return{max:a.data("validation"+b+"Max")}},validate:function(a,b,c){return parseFloat(b,10)>parseFloat(c.max,10)&&!c.negative||parseFloat(b,10)<=parseFloat(c.max,10)&&c.negative}},min:{name:"min",init:function(a,b){return{min:a.data("validation"+b+"Min")}},validate:function(a,b,c){return parseFloat(b)<parseFloat(c.min)&&!c.negative||parseFloat(b)>=parseFloat(c.min)&&c.negative}},maxlength:{name:"maxlength",init:function(a,b){return{maxlength:a.data("validation"+b+"Maxlength")}},validate:function(a,b,c){return b.length>c.maxlength&&!c.negative||b.length<=c.maxlength&&c.negative}},minlength:{name:"minlength",init:function(a,b){return{minlength:a.data("validation"+b+"Minlength")}},validate:function(a,b,c){return b.length<c.minlength&&!c.negative||b.length>=c.minlength&&c.negative}},maxchecked:{name:"maxchecked",init:function(a,b){var c=a.parents("form").first().find('[name="'+a.attr("name")+'"]');return c.bind("click.validation",function(){a.trigger("change.validation",{includeEmpty:!0})}),{maxchecked:a.data("validation"+b+"Maxchecked"),elements:c}},validate:function(a,b,c){return c.elements.filter(":checked").length>c.maxchecked&&!c.negative||c.elements.filter(":checked").length<=c.maxchecked&&c.negative},blockSubmit:!0},minchecked:{name:"minchecked",init:function(a,b){var c=a.parents("form").first().find('[name="'+a.attr("name")+'"]');return c.bind("click.validation",function(){a.trigger("change.validation",{includeEmpty:!0})}),{minchecked:a.data("validation"+b+"Minchecked"),elements:c}},validate:function(a,b,c){return c.elements.filter(":checked").length<c.minchecked&&!c.negative||c.elements.filter(":checked").length>=c.minchecked&&c.negative},blockSubmit:!0}},builtInValidators:{email:{name:"Email",type:"shortcut",shortcut:"validemail"},validemail:{name:"Validemail",type:"regex",regex:"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}",message:"Not a valid email address<!-- data-validator-validemail-message to override -->"},passwordagain:{name:"Passwordagain",type:"match",match:"password",message:"Does not match the given password<!-- data-validator-paswordagain-message to override -->"},positive:{name:"Positive",type:"shortcut",shortcut:"number,positivenumber"},negative:{name:"Negative",type:"shortcut",shortcut:"number,negativenumber"},number:{name:"Number",type:"regex",regex:"([+-]?\\d+(\\.\\d*)?([eE][+-]?[0-9]+)?)?",message:"Must be a number<!-- data-validator-number-message to override -->"},integer:{name:"Integer",type:"regex",regex:"[+-]?\\d+",message:"No decimal places allowed<!-- data-validator-integer-message to override -->"},positivenumber:{name:"Positivenumber",type:"min",min:0,message:"Must be a positive number<!-- data-validator-positivenumber-message to override -->"},negativenumber:{name:"Negativenumber",type:"max",max:0,message:"Must be a negative number<!-- data-validator-negativenumber-message to override -->"},required:{name:"Required",type:"required",message:"This is required<!-- data-validator-required-message to override -->"},checkone:{name:"Checkone",type:"minchecked",minchecked:1,message:"Check at least one option<!-- data-validation-checkone-message to override -->"}}},f=function(a){return a.toLowerCase().replace(/(^|\s)([a-z])/g,function(a,b,c){return b+c.toUpperCase()})},g=function(b){var c=b.val(),d=b.attr("type");return"checkbox"===d&&(c=b.is(":checked")?c:""),"radio"===d&&(c=a('input[name="'+b.attr("name")+'"]:checked').length>0?c:""),c};a.fn.jqBootstrapValidation=function(b){return e.methods[b]?e.methods[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?(a.error("Method "+b+" does not exist on jQuery.jqBootstrapValidation"),null):e.methods.init.apply(this,arguments)},a.jqBootstrapValidation=function(){a(":input").not("[type=image],[type=submit]").jqBootstrapValidation.apply(this,arguments)}}(jQuery),$(function(){$("body").on("input propertychange",".floating-label-form-group",function(a){$(this).toggleClass("floating-label-form-group-with-value",!!$(a.target).val())}).on("focus",".floating-label-form-group",function(){$(this).addClass("floating-label-form-group-with-focus")}).on("blur",".floating-label-form-group",function(){$(this).removeClass("floating-label-form-group-with-focus")})}),jQuery(document).ready(function(a){var b=1170;if(a(window).width()>b){var c=a(".navbar-custom").height();a(window).on("scroll",{previousTop:0},function(){var b=a(window).scrollTop();b<this.previousTop?b>0&&a(".navbar-custom").hasClass("is-fixed")?a(".navbar-custom").addClass("is-visible"):a(".navbar-custom").removeClass("is-visible is-fixed"):(a(".navbar-custom").removeClass("is-visible"),b>c&&!a(".navbar-custom").hasClass("is-fixed")&&a(".navbar-custom").addClass("is-fixed")),this.previousTop=b})}});$(function(){$("img").addClass("img-responsive")});$(document).ready(function(){$("table").wrap("<div class='table-responsive'></div>");$("table").addClass("table table-hover")});$(document).ready(function(){$('iframe[src*="youtube.com"]').wrap('<div class="embed-responsive embed-responsive-16by9"></div>');$('iframe[src*="youtube.com"]').addClass("embed-responsive-item");$('iframe[src*="vimeo.com"]').wrap('<div class="embed-responsive embed-responsive-16by9"></div>');$('iframe[src*="vimeo.com"]').addClass("embed-responsive-item")});
/** * BaaSCaradhrasAPIDocumentationLib * * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). */ 'use strict'; const BaseModel = require('./BaseModel'); /** * Creates an instance of MTransportcardsRecharge2Request */ class MTransportcardsRecharge2Request extends BaseModel { /** * @constructor * @param {Object} obj The object passed to constructor */ constructor(obj) { super(obj); if (obj === undefined || obj === null) return; this.accountId = this.constructor.getValue(obj.accountId); this.cardNumber = this.constructor.getValue(obj.cardNumber); this.creditType = this.constructor.getValue(obj.creditType); this.productCode = this.constructor.getValue(obj.productCode); this.value = this.constructor.getValue(obj.value); this.amount = this.constructor.getValue(obj.amount); } /** * Function containing information about the fields of this model * @return {array} Array of objects containing information about the fields */ static mappingInfo() { return super.mappingInfo().concat([ { name: 'accountId', realName: 'accountId' }, { name: 'cardNumber', realName: 'cardNumber' }, { name: 'creditType', realName: 'creditType' }, { name: 'productCode', realName: 'productCode' }, { name: 'value', realName: 'value' }, { name: 'amount', realName: 'amount' }, ]); } /** * Function containing information about discriminator values * mapped with their corresponding model class names * * @return {object} Object containing Key-Value pairs mapping discriminator * values with their corresponding model classes */ static discriminatorMap() { return {}; } } module.exports = MTransportcardsRecharge2Request;
module.exports = { root: true, env: { node: true, }, extends: [ 'plugin:vue/recommended', 'eslint:recommended', ], rules: { 'no-console': 'error', 'no-debugger': 'error', }, parserOptions: { parser: 'babel-eslint', }, };
#!/usr/bin/python import logging import attr import datetime import json import os.path import urllib from . import register, Site, Section, Chapter logger = logging.getLogger(__name__) """ Example JSON: { "url": "https://practicalguidetoevil.wordpress.com/table-of-contents/", "title": "A Practical Guide To Evil: Book 1", "author": "erraticerrata", "chapter_selector": "#main .entry-content > ul > li > a", "content_selector": "#main .entry-content", "filter_selector": ".sharedaddy, .wpcnt, style" } """ @attr.s class SiteDefinition: url = attr.ib() title = attr.ib() author = attr.ib() content_selector = attr.ib() # If this is present, it looks for chapters linked from `url`. If not, it assumes `url` points to a chapter. chapter_selector = attr.ib(default=False) # If this is present, it's used to filter out content that matches the selector filter_selector = attr.ib(default=False) @register class Arbitrary(Site): """A way to describe an arbitrary side for a one-off fetch """ @staticmethod def matches(url): # e.g. practical1.json if url.endswith('.json') and os.path.isfile(url): return url def extract(self, url): with open(url) as definition_file: definition = SiteDefinition(**json.load(definition_file)) story = Section( title=definition.title, author=definition.author, url=url ) if definition.chapter_selector: soup = self._soup(definition.url) for chapter in soup.select(definition.chapter_selector): chapter_url = urllib.parse.urljoin(definition.url, str(chapter.get('href'))) story.add(Chapter( title=chapter.string, contents=self._chapter(chapter_url, definition), # TODO: better date detection date=datetime.datetime.now() )) else: story.add(Chapter( title=definition.title, contents=self._chapter(definition.url, definition), # TODO: better date detection date=datetime.datetime.now() )) return story def _chapter(self, url, definition): # TODO: refactor so this can meaningfully handle multiple matches on content_selector. # Probably by changing it so that this returns a Chapter / Section. logger.info("Extracting chapter @ %s", url) soup = self._soup(url) if not soup.select(definition.content_selector): return '' content = soup.select(definition.content_selector)[0] if definition.filter_selector: for filtered in content.select(definition.filter_selector): filtered.decompose() return content.prettify()
import setuptools def readme(): with open('README.md') as f: return f.read() test_dependencies = [ 'pytest', ] # This means dependencies for testing can be installed with: # pip install .[test] # See this Stackoverflow answer for details # https://stackoverflow.com/a/41398850 extras = { "test": test_dependencies, } setuptools.setup( name="sym_api_client_python", version="1.1.1", author="Symphony Platform Solutions", author_email="[email protected]", description="Symphony REST API - Python Client", long_description=readme(), long_description_content_type='text/markdown', url="https://github.com/SymphonyPlatformSolutions/" "symphony-api-client-python", packages=setuptools.find_packages(), install_requires=[ 'aiohttp', 'aioresponses>=0.6.1', 'pyOpenSSL', 'rsa', 'requests', 'python-jose', 'python-json-logger==0.1.11', 'beautifulsoup4==4.8.0', 'Jinja2==2.10.1', 'requests_pkcs12==1.4', 'requests-toolbelt==0.9.1', 'requests-mock>=1.7.0', 'yattag==1.12.2' ], extras_require=extras, include_package_data=True, classifiers=( "Programming Language :: Python :: 3.6", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ), )
/** * First we will load all of this project's JavaScript dependencies which * includes Vue and other libraries. It is a great starting point when * building robust, powerful web applications using Vue and Laravel. */ require('./bootstrap'); window.Vue = require('vue'); /** * The following block of code may be used to automatically register your * Vue components. It will recursively scan this directory for the Vue * components and automatically register them with their "basename". * * Eg. ./components/ExampleComponent.vue -> <example-component></example-component> */ // const files = require.context('./', true, /\.vue$/i) // files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default)) Vue.component( 'example-component', require('./components/ExampleComponent.vue').default ); //additional vue component when you run php artisan vendor:publish --tag=passport-components Vue.component( 'passport-clients', require('./components/passport/Clients.vue').default ); Vue.component( 'passport-authorized-clients', require('./components/passport/AuthorizedClients.vue').default ); Vue.component( 'passport-personal-access-tokens', require('./components/passport/PersonalAccessTokens.vue').default ); /** * Next, we will create a fresh Vue application instance and attach it to * the page. Then, you may begin adding components to this application * or customize the JavaScript scaffolding to fit your unique needs. */ const app = new Vue({ el: '#app', });
import webpack from "webpack"; import path from "path"; import HtmlWebpackPlugin from "html-webpack-plugin"; import InterpolateHtmlPlugin from "react-dev-utils/InterpolateHtmlPlugin"; import ExtractTextPlugin from "extract-text-webpack-plugin"; import getClientEnvironment from "./env"; import paths from "./paths"; // Webpack uses `publicPath` to determine where the app is being served from. // In development, we always serve from the root. This makes config easier. const publicPath = "/"; // `publicUrl` is just like `publicPath`, but we will provide it to our app // as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript. // Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz. const publicUrl = ""; // Get environment variables to inject into our app. var env = getClientEnvironment(publicUrl); // Assert this just to be safe. // Development builds of React are slow and not intended for production. if (env["process.env"].NODE_ENV !== '"production"') { throw new Error("Production builds must have NODE_ENV=production."); } module.exports = { // Don't attempt to continue if there are any errors. bail: true, devtool: "source-map", entry: [require.resolve("./polyfills"), paths.appIndexJs], output: { path: paths.appBuild, publicPath: publicPath, // Generated JS file names (with nested folders). // There will be one main bundle, and one file per asynchronous chunk. // We don't currently advertise code splitting but Webpack supports it. filename: "js/[name].[chunkhash:8].js", chunkFilename: "js/[name].[chunkhash:8].chunk.js" }, module: { rules: [ { exclude: [/\.html$/, /\.(js|jsx)$/, /\.css$/, /\.json$/], use: [ { loader: "url-loader", options: { limit: 10000, name: "media/[name].[hash:8].[ext]" } } ] }, { test: /\.(js|jsx)$/, include: paths.appSrc, use: [ { loader: "babel-loader", options: { cacheDirectory: true } } ] }, { test: /\.css$/, use: ExtractTextPlugin.extract({ fallback: "style-loader", use: "css-loader?minimize" }) } ] }, resolve: { alias: { Components: paths.componentsPath } }, plugins: [ // Makes the public URL available as %PUBLIC_URL% in index.html, e.g.: // <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> new InterpolateHtmlPlugin({ PUBLIC_URL: publicUrl // You can pass any key-value pairs, this was just an example. // WHATEVER: 42 will replace %WHATEVER% with 42 in index.html. }), // Generates an `index.html` file with the <script> injected. new HtmlWebpackPlugin({ inject: true, template: paths.appHtml, minify: { removeComments: true, collapseWhitespace: true, removeRedundantAttributes: true, useShortDoctype: true, removeEmptyAttributes: true, removeStyleLinkTypeAttributes: true, keepClosingSlash: true, minifyJS: true, minifyCSS: true, minifyURLs: true } }), // Makes some environment variables available to the JS code, for example: // if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`. // It is absolutely essential that NODE_ENV was set to production here. // Otherwise React will be compiled in the very slow development mode. new webpack.DefinePlugin(env), // Minify the code. new webpack.optimize.UglifyJsPlugin({ compress: { screw_ie8: true, // React doesn't support IE8 warnings: false }, mangle: { screw_ie8: true }, output: { comments: false, screw_ie8: true }, sourceMap: true }), // Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`. new ExtractTextPlugin("css/[name].[contenthash:8].css") ], // Some libraries import Node modules but don't use them in the browser. // Tell Webpack to provide empty mocks for them so importing them works. node: { fs: "empty", net: "empty", tls: "empty" } };
import { NotImplementedError } from '../extensions/index.js'; /** * Create name of dream team based on the names of its members * * @param {Array} members names of the members * @return {String | Boolean} name of the team or false * in case of incorrect members * * @example * * createDreamTeam(['Matt', 'Ann', 'Dmitry', 'Max']) => 'ADMM' * createDreamTeam(['Olivia', 1111, 'Lily', 'Oscar', true, null]) => 'LOO' * */ export default function createDreamTeam(members) { //throw new NotImplementedError('Not implemented'); // remove line with error and write your code here if(Array.isArray(members)){ let s = ""; let arr = []; for(let i = 0; i < members.length; i++){ if(typeof(members[i]) === 'string') { arr.push(members[i]); } } if(!arr.length > 0 ) return false; for(let i = 0; i < arr.length; i++){ arr[i] = arr[i].trim().substring(0, 1).toUpperCase(); } arr.sort(); for(let i = 0; i < arr.length; i++){ s = s + arr[i]; } return s; } return false; }
import React, {PureComponent} from 'react' import Modal from 'react-modal' import { Tab, Tabs, TabList, TabPanel } from 'react-tabs' import 'react-tabs/style/react-tabs.css' import About from './About' import Mumble from './Mumble' import Settings from './Settings' import Schedule from './schedule/Schedule' Modal.setAppElement('body') class Menu extends PureComponent { constructor(props) { super(props) this.state = { show: false } } show() { this.setState({show: true}) } hide() { this.setState({show: false}) } render() { return ( <> <button className="menu" title="Show the menu" onClick={this.show.bind(this)} >≡</button> <Modal isOpen={this.state.show} onRequestClose={this.hide.bind(this)} contentLabel="Menu"> <Tabs> <TabList> <Tab>Schedule</Tab> <Tab>Mumble</Tab> <Tab>Settings</Tab> <Tab>About</Tab> <button className="close" title="Close" onClick={this.hide.bind(this)}>X</button> </TabList> <TabPanel><Schedule schedule={this.props.schedule} /></TabPanel> <TabPanel><Mumble /></TabPanel> <TabPanel><Settings /></TabPanel> <TabPanel><About /></TabPanel> </Tabs> </Modal> </> ) } } export default Menu
import ReactDOM from "react-dom"; import { BrowserRouter as Router } from "react-router-dom"; import { makeMainRoutes } from "./routes"; import registerServiceWorker from "./registerServiceWorker"; import "./index.css"; import "bootstrap/dist/css/bootstrap.css"; const routes = makeMainRoutes(Router); ReactDOM.render(routes, document.getElementById("root")); registerServiceWorker();
import { ethers } from "ethers"; import sdk from "./1-initialize-sdk.js"; import dotenv from "dotenv"; dotenv.config(); // This is our governance contract. const voteModule = sdk.getVoteModule(process.env.VOTE_CONTRACT); // This is our ERC-20 contract. const tokenModule = sdk.getTokenModule(process.env.TOKEN_CONTRACT); (async () => { try { // Give our treasury the power to mint additional token if needed. await tokenModule.grantRole("minter", voteModule.address); console.log( "Successfully gave vote module permissions to act on token module" ); } catch (error) { console.error( "failed to grant vote module permissions on token module", error ); process.exit(1); } try { // Grab our wallet's token balance, remember -- we hold basically the entire supply right now! const ownedTokenBalance = await tokenModule.balanceOf( process.env.WALLET_ADDRESS ); // Grab 90% of the supply that we hold. const ownedAmount = ethers.BigNumber.from(ownedTokenBalance.value); const percent90 = ownedAmount.div(100).mul(90); // Transfer 90% of the supply to our voting contract. await tokenModule.transfer(voteModule.address, percent90); console.log("✅ Successfully transferred tokens to vote module"); } catch (err) { console.error("failed to transfer tokens to vote module", err); } })();
import { createStore, combineReducers, applyMiddleware, compose } from "redux"; import thunk from "redux-thunk"; import settingsReducer from "./reducers/settings"; import loadingReducer from "./reducers/loading"; const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; export default () => { const store = createStore( combineReducers({ settings: settingsReducer, loading: loadingReducer }), composeEnhancers(applyMiddleware(thunk)) ); return store; };
""" Routines to read in association file between genes and GO terms. """ __copyright__ = "Copyright (C) 2010-2019, H Tang et al. All rights reserved." __author__ = "various" from collections import defaultdict import os import sys from goatools.base import dnld_file from goatools.base import ftp_get from goatools.anno.factory import get_objanno from goatools.anno.factory import get_anno_desc from goatools.anno.factory import get_objanno_g_kws from goatools.semantic import TermCounts from goatools.anno.gaf_reader import GafReader from goatools.anno.genetogo_reader import Gene2GoReader from goatools.anno.opts import AnnoOptions def dnld_assc(assc_name, go2obj=None, namespace='BP', prt=sys.stdout): """Download association from http://geneontology.org/gene-associations.""" # Example assc_name: "tair.gaf" # Download the Association dirloc, assc_base = os.path.split(assc_name) if not dirloc: dirloc = os.getcwd() assc_locfile = os.path.join(dirloc, assc_base) if not dirloc else assc_name dnld_annotation(assc_locfile, prt) # Read the downloaded nt120GV)association assc_orig = read_gaf(assc_locfile, namespace=namespace, prt=prt) if go2obj is None: return assc_orig # If a GO DAG is provided, use only GO IDs present in the GO DAG assc = {} goids_dag = set(go2obj.keys()) for gene, goids_cur in assc_orig.items(): assc[gene] = goids_cur.intersection(goids_dag) return assc def dnld_annotation(assc_file, prt=sys.stdout): """Download gaf, gpad, or gpi from http://current.geneontology.org/annotations/""" if not os.path.isfile(assc_file): # assc_http = "http://geneontology.org/gene-associations/" assc_http = "http://current.geneontology.org/annotations/" _, assc_base = os.path.split(assc_file) src = os.path.join(assc_http, "{ASSC}.gz".format(ASSC=assc_base)) dnld_file(src, assc_file, prt, loading_bar=None) def read_associations(assoc_fn, anno_type='id2gos', namespace='BP', **kws): """Return associatinos in id2gos format""" # kws get_objanno: taxids hdr_only prt allow_missing_symbol obj = get_objanno(assoc_fn, anno_type, **kws) # kws get_id2gos: ev_include ev_exclude keep_ND keep_NOT b_geneid2gos go2geneids return obj.get_id2gos(namespace, **kws) def get_assoc_ncbi_taxids(taxids, force_dnld=False, loading_bar=True, **kws): """Download NCBI's gene2go. Return annotations for user-specified taxid(s).""" fin = kws['gene2go'] if 'gene2go' in kws else os.path.join(os.getcwd(), "gene2go") dnld_ncbi_gene_file(fin, force_dnld, loading_bar=loading_bar) return read_ncbi_gene2go(fin, taxids, **kws) # pylint: disable=unused-argument def dnld_ncbi_gene_file(fin, force_dnld=False, log=sys.stdout, loading_bar=True): """Download a file from NCBI Gene's ftp server.""" if not os.path.exists(fin) or force_dnld: import gzip fin_dir, fin_base = os.path.split(fin) fin_gz = "{F}.gz".format(F=fin_base) fin_gz = os.path.join(fin_dir, fin_gz) if os.path.exists(fin_gz): os.remove(fin_gz) fin_ftp = "ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/{F}.gz".format(F=fin_base) ## if log is not None: ## log.write(" DOWNLOADING GZIP: {GZ}\n".format(GZ=fin_ftp)) ## if loading_bar: ## loading_bar = wget.bar_adaptive ## wget.download(fin_ftp, bar=loading_bar) ## rsp = wget(fin_ftp) ftp_get(fin_ftp, fin_gz) with gzip.open(fin_gz, 'rb') as zstrm: if log is not None: log.write("\n READ GZIP: {F}\n".format(F=fin_gz)) with open(fin, 'wb') as ostrm: ostrm.write(zstrm.read()) if log is not None: log.write(" WROTE UNZIPPED: {F}\n".format(F=fin)) def dnld_annofile(fin_anno, anno_type): """Download annotation file, if needed""" if os.path.exists(fin_anno): return anno_type = get_anno_desc(fin_anno, anno_type) if anno_type == 'gene2go': dnld_ncbi_gene_file(fin_anno) if anno_type in {'gaf', 'gpad'}: dnld_annotation(fin_anno) def read_ncbi_gene2go(fin_gene2go, taxids=None, namespace='BP', **kws): """Read NCBI's gene2go. Return gene2go data for user-specified taxids.""" obj = Gene2GoReader(fin_gene2go, taxids=taxids) # By default, return id2gos. User can cause go2geneids to be returned by: # >>> read_ncbi_gene2go(..., go2geneids=True if 'taxid2asscs' not in kws: if len(obj.taxid2asscs) == 1: taxid = next(iter(obj.taxid2asscs)) kws_ncbi = {k:v for k, v in kws.items() if k in AnnoOptions.keys_exp} kws_ncbi['taxid'] = taxid return obj.get_id2gos(namespace, **kws_ncbi) # Optional detailed associations split by taxid and having both ID2GOs & GO2IDs # e.g., taxid2asscs = defaultdict(lambda: defaultdict(lambda: defaultdict(set)) t2asscs_ret = obj.get_taxid2asscs(taxids, **kws) t2asscs_usr = kws.get('taxid2asscs', defaultdict(lambda: defaultdict(lambda: defaultdict(set)))) if 'taxid2asscs' in kws: obj.fill_taxid2asscs(t2asscs_usr, t2asscs_ret) return obj.get_id2gos_all(t2asscs_ret) def get_gaf_hdr(fin_gaf): """Read Gene Association File (GAF). Return GAF version and data info.""" return GafReader(fin_gaf, hdr_only=True).hdr # pylint: disable=line-too-long def read_gaf(fin_gaf, prt=sys.stdout, hdr_only=False, namespace='BP', allow_missing_symbol=False, **kws): """Read Gene Association File (GAF). Return data.""" return GafReader( fin_gaf, hdr_only=hdr_only, prt=prt, allow_missing_symbol=allow_missing_symbol).get_id2gos( namespace, **kws) def get_b2aset(a2bset): """Given gene2gos, return go2genes. Given go2genes, return gene2gos.""" b2aset = {} for a_item, bset in a2bset.items(): for b_item in bset: if b_item in b2aset: b2aset[b_item].add(a_item) else: b2aset[b_item] = set([a_item]) return b2aset def get_assc_pruned(assc_geneid2gos, min_genecnt=None, max_genecnt=None, prt=sys.stdout): """Remove GO IDs associated with large numbers of genes. Used in stochastic simulations.""" # DEFN WAS: get_assc_pruned(assc_geneid2gos, max_genecnt=None, prt=sys.stdout): # ADDED min_genecnt argument and functionality if max_genecnt is None and min_genecnt is None: return assc_geneid2gos, set() go2genes_orig = get_b2aset(assc_geneid2gos) # go2genes_prun = {go:gs for go, gs in go2genes_orig.items() if len(gs) <= max_genecnt} go2genes_prun = {} for goid, genes in go2genes_orig.items(): num_genes = len(genes) if (min_genecnt is None or num_genes >= min_genecnt) and \ (max_genecnt is None or num_genes <= max_genecnt): go2genes_prun[goid] = genes num_was = len(go2genes_orig) num_now = len(go2genes_prun) gos_rm = set(go2genes_orig.keys()).difference(set(go2genes_prun.keys())) assert num_was-num_now == len(gos_rm) if prt is not None: if min_genecnt is None: min_genecnt = 1 if max_genecnt is None: max_genecnt = "Max" prt.write("{N:4} GO IDs pruned. Kept {NOW} GOs assc w/({m} to {M} genes)\n".format( m=min_genecnt, M=max_genecnt, N=num_was-num_now, NOW=num_now)) return get_b2aset(go2genes_prun), gos_rm def read_annotations(**kws): """Read annotations from either a GAF file or NCBI's gene2go file.""" # Read and save annotation lines objanno = get_objanno_g_kws(**kws) # Return associations return objanno.get_id2gos() if objanno is not None else {} #### if 'gaf' not in kws and 'gene2go' not in kws: #### return #### namespace = kws.get('namespace', 'BP') #### gene2gos = None #### if 'gaf' in kws: #### gene2gos = read_gaf(kws['gaf'], namespace=namespace, prt=sys.stdout) #### if not gene2gos: #### raise RuntimeError("NO ASSOCIATIONS LOADED FROM {F}".format(F=kws['gaf'])) #### elif 'gene2go' in kws: #### assert 'taxid' in kws, 'taxid IS REQUIRED WHEN READING gene2go' #### gene2gos = read_ncbi_gene2go(kws['gene2go'], taxids=[kws['taxid']]) #### if not gene2gos: #### raise RuntimeError("NO ASSOCIATIONS LOADED FROM {F} FOR TAXID({T})".format( #### F=kws['gene2go'], T=kws['taxid'])) #### return gene2gos def get_tcntobj(go2obj, **kws): """Return a TermCounts object if the user provides an annotation file, otherwise None.""" # kws: gpad gaf gene2go id2gos objanno = get_objanno_g_kws(**kws) if objanno: return TermCounts(go2obj, objanno.get_id2gos_nss()) # Copyright (C) 2010-2019, H Tang et al. All rights reserved."
import { assert } from 'chai'; import { getTypes, numberTypes, stringTypes } from '@validatorjs/test'; import forEach from 'mocha-each'; import perfectSquare from '../src'; describe('PerfectSquare', () => { forEach([ 1, 9, 25, '25', 400, '400', '0', 81, 0, 2500 ]).it('valid with a value: %s', (value) => { assert.isTrue(perfectSquare(value)); }); forEach([ 250, 7, -1, 6, 2, 'foo', '', ' ', ' ', ...getTypes([...numberTypes, ...stringTypes]) ]).it('invalid with a value: %s', (value) => { assert.isFalse(perfectSquare(value)); }); });
window.Zoomage=function(e){var s={};function n(t){if(s[t])return s[t].exports;var i=s[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=s,n.d=function(t,i,e){n.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:e})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(i,t){if(1&t&&(i=n(i)),8&t)return i;if(4&t&&"object"==typeof i&&i&&i.__esModule)return i;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:i}),2&t&&"string"!=typeof i)for(var s in i)n.d(e,s,function(t){return i[t]}.bind(null,s));return e},n.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(i,"a",i),i},n.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},n.p="",n(n.s=1)}([function(i,t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?i.exports=s=function(t){return e(t)}:i.exports=s=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},s(t)}i.exports=s},function(i,e,s){"use strict";s.r(e);var n=s(0),o=s.n(n),h=function(t){if(!t||!t.container)throw"[Zoomage.js Error] Zoomage constructor: missing arguments [container].";this.container=t.container,this.canvas=document.createElement("canvas"),this.container.appendChild(this.canvas),this.context=this.canvas.getContext("2d"),this.onZoom=t.onZoom||null,this.onRotate=t.onRotate||null,this.onDrag=t.onDrag||null,this.context.save(),this.dbclickZoomThreshold=Math.abs(t.dbclickZoomThreshold)||.1,this.maxZoom=Math.abs(t.maxZoom)||2,this.minZoom=Math.abs(t.minZoom)||.2,this.enableGestureRotate=t.enableGestureRotate||!1,this.enableDesktop=t.enableDesktop||!1,this.imgTexture=new Image,this.isImgLoaded=!1,this.isFirstTimeLoad=!0,this.lastZoomScale=null,this.lastX=null,this.lastY=null,this.zoomD=1,this.mdown=!1,this.lastTouchEndTimestamp=null,this.lastTouchEndObject=null,this.animateHandle=null,this.dbclickZoomToggle=!0,this._checkRequestAnimationFrame(),this.enableGestureRotate?("transform"in document.body.style?this.prefixedTransform="transform":"webkitTransform"in document.body.style&&(this.prefixedTransform="webkitTransform"),this._setEventListenersTransform(),requestAnimationFrame(this._animateTransform.bind(this))):(this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.width=this.canvas.clientWidth,this.canvas.height=this.canvas.clientHeight,this._setEventListenersCanvas(),requestAnimationFrame(this._animateCanvas.bind(this)))};h.prototype={_animateTransform:function(){this.zoomD>this.maxZoom?this.zoomD=this.maxZoom:this.zoomD<this.minZoom&&(this.zoomD=this.minZoom),this.isImgLoaded&&(this.canvas.style[this.prefixedTransform]="translate("+this.moveXD+"px,"+this.moveYD+"px) translateZ(0) scale("+this.zoomD+") rotate("+this.rotate.angle+"deg)"),this.isFirstTimeLoad&&this.isImgLoaded&&(this.context.drawImage(this.imgTexture,this.position.x,this.position.y,this.scale.x*this.imgTexture.width,this.scale.y*this.imgTexture.height),this.isFirstTimeLoad=!1),requestAnimationFrame(this._animateTransform.bind(this))},_animateCanvas:function(){null!==this.imgTexture.src&&(this.isOnTouching||this.mdown?this.context.clearRect(0,0,this.canvas.width,this.canvas.height):(this.context.restore(),this.context.save()),(this.isOnTouching||this.isFirstTimeLoad||this.mdown)&&this.isImgLoaded&&(this.context.drawImage(this.imgTexture,this.position.x,this.position.y,this.scale.x*this.imgTexture.width,this.scale.y*this.imgTexture.height),this.isFirstTimeLoad=!1),requestAnimationFrame(this._animateCanvas.bind(this)))},_gesturePinchZoom:function(t){var i=!1;if(2<=t.length){var e=t[0],s=t[1],n=Math.sqrt(Math.pow(s.pageX-e.pageX,2)+Math.pow(s.pageY-e.pageY,2));this.lastZoomScale&&(i=n-this.lastZoomScale),this.lastZoomScale=n}return i},_enableGestureRotate:function(t){if(2<=t.length)var i=t[0],e=t[1],s=e.pageX-i.pageX,n=e.pageY-i.pageY,o=180*Math.atan2(n,s)/Math.PI;return{o:i,a:o}},_doZoom:function(t){if(t){var i=this.scale.x,e=this.scale.x+t,s=e-i,n=this.imgTexture.width*s,o=this.imgTexture.height*s,h=this.position.x-n/2,a=this.position.y-o/2;return!(e>this.maxZoom||e<this.minZoom)&&(this.scale.x=e,this.scale.y=e,this.position.x=h,this.position.y=a,this.isOnTouching=!0,this.zoomD=e,this._runCallback("onZoom"),!0)}},_doMove:function(t,i){if(this.lastX&&this.lastY){var e=t-this.lastX,s=i-this.lastY;this.position.x+=e,this.position.y+=s}this.lastX=t,this.lastY=i},_doRotate:function(t){null!==this.lastTouchRotateAngle&&(this.rotate.angle=this.rotate.angle+1.5*(t.a-this.lastTouchRotateAngle),this.rotate.center=t.o),this.lastTouchRotateAngle=t.a,this._runCallback("onRotate")},_zoomInAnimCanvas:function(){var i=this.dbclickZoomLength/10*2;if(.01<this.dbclickZoomLength){if(!this._doZoom(i))return cancelAnimationFrame(t),!1;this.dbclickZoomLength=this.dbclickZoomLength-i,this.animateHandle=requestAnimationFrame(this._zoomInAnimCanvas.bind(this))}else cancelAnimationFrame(this.animateHandle);return!0},_zoomOutAnimCanvas:function(){var i=this.dbclickZoomLength/10*2;if(.01<this.dbclickZoomLength){if(!this._doZoom(-i))return cancelAnimationFrame(t),!1;this.dbclickZoomLength=this.dbclickZoomLength-i,this.animateHandle=requestAnimationFrame(this._zoomOutAnimCanvas.bind(this))}else cancelAnimationFrame(this.animateHandle);return!0},_zoomInAnimTransform:function(){var t=this.dbclickZoomLength/10*2;return.01<this.dbclickZoomLength?(this.zoomD+=t,this.dbclickZoomLength=this.dbclickZoomLength-t,this.animateHandle=requestAnimationFrame(this._zoomInAnimTransform.bind(this))):cancelAnimationFrame(this.animateHandle),!0},_zoomOutAnimTransform:function(){var t=this.dbclickZoomLength/10*2;return.01<this.dbclickZoomLength?(this.zoomD-=t,this.dbclickZoomLength=this.dbclickZoomLength-t,this.animateHandle=requestAnimationFrame(this._zoomOutAnimTransform.bind(this))):cancelAnimationFrame(this.animateHandle),!0},_gestureDbClick:function(t,i){var e=t.changedTouches[0];if(null===this.lastTouchEndTimestamp||null===this.lastTouchEndObject)this.lastTouchEndTimestamp=Math.round((new Date).getTime()),this.lastTouchEndObject=e;else{var s=Math.round((new Date).getTime());s-this.lastTouchEndTimestamp<300&&Math.abs(this.lastTouchEndObject.pageX-e.pageX)<20&&Math.abs(this.lastTouchEndObject.pageY-e.pageY<20)&&i&&i(),this.lastTouchEndTimestamp=s,this.lastTouchEndObject=e}},_runCallback:function(t,i){switch(t){case"onDrag":"function"===this._type(this.onDrag)&&this.onDrag.call(this,{x:this.lastX.toFixed(3),y:this.lastY.toFixed(3)});break;case"onRotate":"function"===this._type(this.onRotate)&&this.onRotate.call(this,{rotate:(this.rotate.angle%360).toFixed(3)});break;case"onZoom":"function"===this._type(this.onZoom)&&this.onZoom.call(this,{zoom:this.zoomD.toFixed(3),scale:{width:(this.zoomD*this.imgTexture.width).toFixed(3),height:(this.zoomD*this.imgTexture.height).toFixed(3)}})}},_setEventListenersTransform:function(){this.container.addEventListener("touchend",function(t){this.lastZoomScale=null,this.lastTouchRotateAngle=null,this.enableDesktop||this._gestureDbClick(t,function(){this.dbclickZoomLength=this.dbclickZoomThreshold,this.dbclickZoomToggle?this._zoomInAnimTransform()||this._zoomOutAnimTransform():this._zoomOutAnimTransform()||this._zoomInAnimTransform(),this.dbclickZoomToggle=!this.dbclickZoomToggle}.bind(this))}.bind(this)),this.container.addEventListener("touchstart",function(t){this.lastX=null,this.lastY=null}.bind(this)),this.container.addEventListener("touchmove",function(t){t.preventDefault(),2==t.touches.length?(this.zoomD=this.zoomD+this._gesturePinchZoom(t.touches)/250,this._runCallback("onZoom"),this._doRotate(this._enableGestureRotate(t.touches))):1==t.touches.length&&(null!==this.lastX&&null!==this.lastY&&(this.moveXD+=t.touches[0].pageX-this.lastX,this.moveYD+=t.touches[0].pageY-this.lastY),this.lastX=t.touches[0].pageX,this.lastY=t.touches[0].pageY,this._runCallback("onDrag"))}.bind(this)),this.imgTexture.addEventListener("load",function(t){this.moveXD=0,this.moveYD=0,this.zoomD=1,this.lastTouchRotateAngle=null,this.rotate={center:{},angle:0},this.canvas.width=this.imgTexture.width,this.canvas.height=this.imgTexture.height,this.canvas.setAttribute("width",this.imgTexture.width+"px"),this.canvas.setAttribute("height",this.imgTexture.height+"px"),this.imgTexture.width>this.imgTexture.height?this.canvas.parentNode.clientWidth<this.imgTexture.width?(this.zoomD=this.canvas.parentNode.clientWidth/this.imgTexture.width,this.moveYD=(this.canvas.parentNode.clientHeight-this.zoomD*this.imgTexture.height)/2-this.imgTexture.height*(1-this.zoomD)/2,this.moveXD=-this.imgTexture.width*(1-this.zoomD)/2):(this.moveXD=(this.canvas.parentNode.clientWidth-this.imgTexture.width)/2,this.moveYD=(this.canvas.parentNode.clientHeight-this.imgTexture.height)/2):this.canvas.parentNode.clientWidth<this.imgTexture.width?(this.zoomD=this.canvas.parentNode.clientHeight/this.imgTexture.height,this.moveXD=(this.canvas.parentNode.clientWidth-this.zoomD*this.imgTexture.width)/2-this.imgTexture.width*(1-this.zoomD)/2,this.moveYD=-this.imgTexture.height*(1-this.zoomD)/2):(this.moveXD=(this.canvas.parentNode.clientWidth-this.imgTexture.width)/2,this.moveYD=(this.canvas.parentNode.clientHeight-this.imgTexture.height)/2),this.isImgLoaded=!0}.bind(this)),this.enableDesktop&&(window.addEventListener("keyup",function(t){187==t.keyCode?this.zoomD+=.1:189==t.keyCode&&(this.zoomD-=.1),187!=t.keyCode&&189!=t.keyCode||this._runCallback("onZoom")}.bind(this)),window.addEventListener("mousedown",function(t){this.mdown=!0,this.lastX=null,this.lastY=null}.bind(this)),window.addEventListener("mouseup",function(t){this.mdown=!1}.bind(this)),window.addEventListener("mousemove",function(t){this.mdown&&(null!==this.lastX&&null!==this.lastY&&(this.moveXD+=t.pageX-this.lastX,this.moveYD+=t.pageY-this.lastY),this.lastX=t.pageX,this.lastY=t.pageY,this._runCallback("onDrag"))}.bind(this)),window.addEventListener("dblclick",function(t){this.dbclickZoomLength=this.dbclickZoomThreshold,this.dbclickZoomToggle?this._zoomInAnimTransform()||this._zoomOutAnimTransform():this._zoomOutAnimTransform()||this._zoomInAnimTransform(),this.dbclickZoomToggle=!this.dbclickZoomToggle}.bind(this)))},_setEventListenersCanvas:function(){this.canvas.addEventListener("touchend",function(t){this.isOnTouching=!1,this.lastZoomScale=null,this.enableDesktop||this._gestureDbClick(t,function(){this.dbclickZoomLength=this.dbclickZoomThreshold,this.dbclickZoomToggle?this._zoomInAnimCanvas()||this._zoomOutAnimCanvas():this._zoomOutAnimCanvas()||this._zoomInAnimCanvas(),this.dbclickZoomToggle=!this.dbclickZoomToggle}.bind(this))}.bind(this)),this.canvas.addEventListener("touchstart",function(t){this.isOnTouching=!0,this.lastX=null,this.lastY=null}.bind(this)),this.canvas.addEventListener("touchmove",function(t){if(t.preventDefault(),2==t.targetTouches.length)this._doZoom(this._gesturePinchZoom(t.targetTouches)/250);else if(1==t.targetTouches.length){var i=t.targetTouches[0].pageX-this.canvas.getBoundingClientRect().left,e=t.targetTouches[0].pageY-this.canvas.getBoundingClientRect().top;this._doMove(i,e),this._runCallback("onDrag")}}.bind(this)),this.imgTexture.addEventListener("load",function(t){if(this.isOnTouching=!1,this.lastTouchEndTimestamp=null,this.lastTouchEndObject=null,this.dbclickZoomLength=0,this.imgTexture.width&&this.imgTexture.height){var i=1;this.imgTexture.width>this.imgTexture.height?this.canvas.clientWidth<this.imgTexture.width?(i=this.canvas.clientWidth/this.imgTexture.width,this.position.y=(this.canvas.clientHeight-i*this.imgTexture.height)/2):(this.position.x=(this.canvas.clientWidth-this.imgTexture.width)/2,this.position.y=(this.canvas.clientHeight-this.imgTexture.height)/2):this.canvas.clientWidth<this.imgTexture.width?(i=this.canvas.clientHeight/this.imgTexture.height,this.position.x=(this.canvas.clientWidth-i*this.imgTexture.width)/2):(this.position.x=(this.canvas.clientWidth-this.imgTexture.width)/2,this.position.y=(this.canvas.clientHeight-this.imgTexture.height)/2),this.scale.x=i,this.scale.y=i}this.isImgLoaded=!0}.bind(this)),this.enableDesktop&&(window.addEventListener("keyup",function(t){187==t.keyCode?this._doZoom(.05):189==t.keyCode&&this._doZoom(-.05)}.bind(this)),window.addEventListener("mousedown",function(t){this.mdown=!0,this.lastX=null,this.lastY=null}.bind(this)),window.addEventListener("mouseup",function(t){this.mdown=!1}.bind(this)),window.addEventListener("mousemove",function(t){var i=t.pageX-this.canvas.getBoundingClientRect().left,e=t.pageY-this.canvas.getBoundingClientRect().top;t.target==this.canvas&&this.mdown&&this._doMove(i,e),(i<=0||i>=this.canvas.clientWidth||e<=0||e>=this.canvas.clientHeight)&&(this.mdown=!1),this.mdown&&this._runCallback("onDrag")}.bind(this)),window.addEventListener("dblclick",function(t){this.dbclickZoomLength=this.dbclickZoomThreshold,this.dbclickZoomToggle?this._zoomInAnimCanvas()||this._zoomOutAnimCanvas():this._zoomOutAnimCanvas()||this._zoomInAnimCanvas(),this.dbclickZoomToggle=!this.dbclickZoomToggle}.bind(this)))},_type:function(t){var i={},e=i.toString;return i["[object Function]"]="function",null==t?t+"":"object"===o()(t)||"function"==typeof t?i[e.call(t)]||"object":o()(t)},_checkRequestAnimationFrame:function(){for(var o=0,t=["ms","moz","webkit","o"],i=0;i<t.length&&!window.requestAnimationFrame;++i)window.requestAnimationFrame=window[t[i]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[i]+"CancelAnimationFrame"]||window[t[i]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t,i){var e=(new Date).getTime(),s=Math.max(0,16-(e-o)),n=window.setTimeout(function(){t(e+s)},s);return o=e+s,n}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})},zoom:function(t){this.dbclickZoomLength=Math.abs(t),this.enableGestureRotate?0<t?this._zoomInAnimTransform():this._zoomOutAnimTransform():0<t?this._zoomInAnimCanvas():this._zoomOutAnimCanvas()},load:function(t){this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.position={x:0,y:0},this.scale={x:1,y:1},this.isImgLoaded=!1,this.isFirstTimeLoad=!0,this.lastZoomScale=null,this.lastX=null,this.lastY=null,this.mdown=!1,this.lastTouchEndTimestamp=null,this.lastTouchEndObject=null,this.imgTexture.src=t}},e.default=h}]).default;
// const loConcat = require('lodash/concat'); import fakeData from '~~/seeds/fake-data.json'; // import typeOf from '~/plugins/lib/type-of'; import moment from 'moment'; const loKebabCase = require('lodash/kebabCase'); const loMerge = require('lodash/merge'); // const errors = require('@feathersjs/errors'); const debug = require('debug')('app:plugins.service-client.class'); const isLog = false; const isDebug = false; class Service { /** * Constructor * @param store */ constructor(store) { this.store = store; this.state = store.state; this.getters = store.getters; this.dispatch = store.dispatch; this.commit = store.commit; this.config = store.getters.getConfig; const {auth} = store.state; this.user = auth.user; if (isDebug) debug('Created.OK'); } /** * Get service fields * @param serviceName * @param isId * @return {Array.<*>} */ static serviceFields(serviceName = '', isId = false) { const serviceFakeData = fakeData[serviceName][0]; const idField = 'id' in serviceFakeData ? 'id' : '_id'; const fields = Object.keys(serviceFakeData).filter(key => isId ? true : key !== idField); if (isLog) debug('serviceFields.fields:', fields); return fields; } /** * Get service paths * @return {Array} */ static getServicePaths() { const paths = Object.keys(fakeData).map(key => loKebabCase(key).toLowerCase()); if (isDebug) debug('getServicePaths:', paths); return paths; } /** * Get service id field * @param path {String} * @return {string} */ getServiceIdField(path = '') { return this.state[path].idField; } /** * Authenticate * @param credentials * @return {Promise.<*>} */ async authenticate(credentials = null) { let result; if (credentials) { result = await this.dispatch('auth/authenticate', credentials); } else { result = await this.dispatch('auth/authenticate'); } if (isDebug) debug('authenticate: OK', 'result:', result); return result; } /** * Logout * @return {Promise.<void>} */ async logout() { await this.dispatch('auth/logout'); if (isDebug) debug('logout: OK'); } /** * Get auth user */ getAuthUser() { const user = this.state.auth.user; if (isLog) debug('getUser:', user); return user; } /** * Get auth user id */ getAuthUserId() { const user = this.getAuthUser(); const idField = user? this.getServiceIdField('users') : ''; return idField? user[idField] : ''; } /** * Clear all services from store */ clearAll() { const paths = Service.getServicePaths(); paths.forEach(path => this.commit(`${path}/clearAll`)); if (isDebug) debug('clearAll: OK'); } /** * Get user for userId * @param userId * @return {Promise.<void>} */ async getUserForUserId(userId) { if(!this.getFromStore('users', userId)){ const user = await this.get('users', userId); await this.get('user-profiles', user.profileId); if(!this.getFromStore('roles', user.roleId)){ await this.get('roles', user.roleId); } } } /** * Find all services for admin user * @return {Promise.<void>} */ async findAllForAdmin() { if (isDebug) debug('findAllForAdmin: START'); // Find chat messages for user const user = this.getAuthUser(); if (user) { const paths = Service.getServicePaths().filter(path => path !== 'chat-messages' && path !== 'user-teams'); paths.forEach(path => this.findAll(path, {query: {}})); // Find all chat messages for admin await this.findChatMessagesForAdmin(user); this.initStateChatCheckAt(); } } /** * Find all chat messages for admin * @param user {Object} * @return {Promise.<void>} */ async findChatMessagesForAdmin(user) { const idField = this.getServiceIdField('users'); const userId = user[idField]; // Find chat messages await this.findAll('user-teams', {query: {}}); const teamIdsForUser = this.getters.getTeamIdsForUser(userId); // getTeamIdsForUser await this.findAll('chat-messages', {query: {$or: [ {ownerId: userId}, {userId: userId}, {roleId: user.roleId}, { teamId: { $in: teamIdsForUser}} ]}}); } /** * Find all services for auth user * @return {Promise.<void>} */ async findAllForUser() { if (isDebug) debug('findAllForUser: START'); const user = this.getAuthUser(); if (user) { // getRole await this.get('roles', user.roleId); await this.find('roles', {query: {alias: 'isAdministrator'}}); // getUserProfiles await this.get('user-profiles', user.profileId); // getTeams const idFieldTeam = this.state.teams.idField; const idFieldUser = this.state.users.idField; const userId = user[idFieldUser]; // Find teams for user let teamIdsForUser = await this.findAll('user-teams', {query: {userId: userId, $sort: {teamId: 1}}}); teamIdsForUser = teamIdsForUser.map(row => row.teamId.toString()); if(teamIdsForUser.length){ await this.findAll('teams', {query: {[idFieldTeam]: {$in: teamIdsForUser}, $sort: {name: 1}}}); } // Find log messages let logMessages = await this.findAll('log-messages', {query: {userId: userId}}); logMessages = logMessages.filter(msg => msg.ownerId !== msg.userId); if(logMessages.length){ let ownerIds = logMessages.map(msg => msg.ownerId); // Get users for log-messages ownerIds for (let i = 0; i < ownerIds.length; i++) { const ownerId = ownerIds[i]; await this.getUserForUserId(ownerId); } } // Find chat messages for user await this.findChatMessagesForUser(user); this.initStateChatCheckAt(); } } /** * Find all chat messages for user * @param user {Object} * @return {Promise.<void>} */ async findChatMessagesForUser(user) { const idField = this.getServiceIdField('users'); const authUserId = user[idField]; // Find chat messages const teamIdsForUser = this.getters.getTeamIdsForUser(authUserId); const chatMessages = await this.findAll('chat-messages', {query: {$or: [ {ownerId: authUserId}, {userId: authUserId}, {roleId: user.roleId}, { teamId: { $in: teamIdsForUser}} ]}}); // Get users for chatMessages for (let i = 0; i < chatMessages.length; i++) { const msg = chatMessages[i]; const msgOwnerId = msg['ownerId']; const msgUserId = msg['user']? msg['userId'] : null; if(msgOwnerId !== authUserId && !this.getFromStore('users', msgOwnerId)){ await this.getUserForUserId(msgOwnerId); } if(msgUserId && msgUserId !== authUserId && !this.getFromStore('users', msgUserId)){ await this.getUserForUserId(msgUserId); } } } /** * Find chat messages for role * @param roleId * @return {Promise.<void>} */ async findChatMessagesForRole(roleId) { const idUserField = this.getServiceIdField('users'); const authUser = this.getAuthUser(); const authUserId = authUser[idUserField]; // Find chat messages if(!this.getFromStore('roles', roleId)){ await this.get('roles', roleId); let chatMessages = this.findInStore('chat-messages', {query: {roleId: roleId}}); if(!chatMessages.length){ chatMessages = await this.find('chat-messages', {query: {roleId: roleId}}); // Get users for chatMessages for (let i = 0; i < chatMessages.length; i++) { const msg = chatMessages[i]; const msgOwnerId = msg['ownerId']; const msgUserId = msg['user']? msg['userId'] : null; if(msgOwnerId !== authUserId && !this.getFromStore('users', msgOwnerId)){ await this.getUserForUserId(msgOwnerId); } if(msgUserId && msgUserId !== authUserId && !this.getFromStore('users', msgUserId)){ await this.getUserForUserId(msgUserId); } } } } } /** * Find chat messages for team * @param teamId * @return {Promise.<void>} */ async findChatMessagesForTeam(teamId) { const idUserField = this.getServiceIdField('users'); const authUser = this.getAuthUser(); const authUserId = authUser[idUserField]; // Find chat messages if(!this.getFromStore('teams', teamId)){ await this.get('teams', teamId); let chatMessages = this.findInStore('chat-messages', {query: {teamId: teamId}}); if(!chatMessages.length){ chatMessages = await this.find('chat-messages', {query: {teamId: teamId}}); // Get users for chatMessages for (let i = 0; i < chatMessages.length; i++) { const msg = chatMessages[i]; const msgOwnerId = msg['ownerId']; const msgUserId = msg['user']? msg['userId'] : null; if(msgOwnerId !== authUserId && !this.getFromStore('users', msgOwnerId)){ await this.getUserForUserId(msgOwnerId); } if(msgUserId && msgUserId !== authUserId && !this.getFromStore('users', msgUserId)){ await this.getUserForUserId(msgUserId); } } } } } /** * Init state chat checkAt */ initStateChatCheckAt(){ let idField = '_id'; const authUser = this.getAuthUser(); if(!authUser) return; // Get chat users const users = this.getChatUsers(); idField = this.getServiceIdField('users'); users.forEach(user => { const userId = user[idField]; this.getChatDTCheckAt('user', userId); }); // Get chat roles const roles = this.getChatRoles(); idField = this.getServiceIdField('roles'); roles.forEach(role => { const roleId = role[idField]; this.getChatDTCheckAt('role', roleId); }); // Get chat teams const teams = this.getChatTeams(); idField = this.getServiceIdField('teams'); teams.forEach(team => { const teamId = team[idField]; this.getChatDTCheckAt('team', teamId); }); } /** * Get new chat messages */ getNewChatMessages(){ let idField = '_id', count = 0, dtCheckAt = '', messages = []; let msgInfo = {}; const authUser = this.getAuthUser(); if(!authUser) return count; // Get chat users const users = this.getChatUsers(); users.forEach(user => { idField = this.state.users.idField; const userId = user[idField]; messages = this.getChatMessages().filter(msg => this.isUserChatMsg(userId, msg)); if(messages.length){ dtCheckAt = this.getChatDTCheckAt('user', userId); msgInfo = this.getChatMsgInfo(messages, dtCheckAt); if(msgInfo.countMsg){ count += msgInfo.countMsg; } } }); // Get chat roles const roles = this.getChatRoles(); roles.forEach(role => { idField = this.state.roles.idField; const roleId = role[idField]; messages = this.getChatMessages().filter(msg => this.isRoleChatMsg(roleId, msg)); if(messages.length){ dtCheckAt = this.getChatDTCheckAt('role', roleId); msgInfo = this.getChatMsgInfo(messages, dtCheckAt); if(msgInfo.countMsg){ count += msgInfo.countMsg; } } }); // Get chat teams const teams = this.getChatTeams(); teams.forEach(team => { const idField = this.state.teams.idField; const teamId = team[idField]; messages = this.getChatMessages().filter(msg => this.isTeamChatMsg(teamId, msg)); if(messages.length){ dtCheckAt = this.getChatDTCheckAt('team', teamId); msgInfo = this.getChatMsgInfo(messages, dtCheckAt); if(msgInfo.countMsg){ count += msgInfo.countMsg; } } }); return count; } /** * Get chat users * @return {Array} */ getChatUsers(){ let users = this.findInStore('users', {query: {$sort: {fullName: 1}}}); users = users.filter(user => this.isChatFilterUser(user)); return users; } /** * Get chat roles * @return {Array} */ getChatRoles(){ let roles = this.findInStore('roles', {query: {$sort: {name: 1}}}); roles = roles.filter(role => this.isChatFilterRole(role)); return roles; } /** * Get chat teams * @return {Array} */ getChatTeams(){ let teams = this.findInStore('teams', {query: {$sort: {name: 1}}}); teams = teams.filter(team => this.isChatFilterTeam(team)); return teams; } /** * Get chat messages * @return {Array} */ getChatMessages(){ let messages = this.findInStore('chat-messages', {query: {$sort: {createdAt: 1}}}); messages = messages.filter(msg => this.isChatFilterMsg(msg)); return messages; } /** * Is user chat msg filter * @param userId * @param msg {Object} * @return {boolean} */ isUserChatMsg(userId, msg) { let result = false; const idField = this.state.users.idField; const authUser = this.getAuthUser(); const authUserId = authUser[idField]; const msgUserId = msg.user? msg.userId : null; // I wrote to the selected user || The selected user wrote to me if(msgUserId){ result = ((userId === msgUserId) && (authUserId === msg.ownerId)) || ((userId === msg.ownerId) && (authUserId === msgUserId)); } return result; } /** * Is team chat msg filter * @param teamId * @param msg {Object} * @return {boolean} */ isTeamChatMsg(teamId, msg) { let result = false; const idField = this.state.users.idField; const authUser = this.getAuthUser(); const authUserId = authUser[idField]; const msgTeamId = msg.team? msg.teamId : null; // I wrote to the selected team || I am a member of the selected team if(teamId === msgTeamId){ result = this.getters.isMyTeam(authUserId, teamId) || (authUserId === msg.ownerId); } return result; } /** * Is role chat msg filter * @param roleId * @param msg {Object} * @return {boolean} */ isRoleChatMsg(roleId, msg) { let result = false; const idField = this.state.users.idField; const authUser = this.getAuthUser(); const authUserId = authUser[idField]; const msgRoleId = msg.role? msg.roleId : null; // I wrote to the selected role || This is my role if(roleId === msgRoleId){ result = (authUser.roleId === roleId) || (authUserId === msg.ownerId); } return result; } /** * Is chat filter role * @param role {Object} * @return {boolean} */ isChatFilterRole(role) { const idField = this.state.roles.idField; const authUser = this.getAuthUser(); const isRole = (authUser.roleAlias === 'isAdministrator')? true : ( role[idField] === authUser.roleId); return (role.alias === 'isAdministrator') || isRole; } /** * Is chat filter team * @param team {Object} * @return {boolean} */ isChatFilterTeam(team) { const idTeamField = this.state.teams.idField; const idUserField = this.state.users.idField; const authUser = this.getAuthUser(); const isTeam = (authUser.roleAlias === 'isAdministrator')? true : this.getters.isMyTeam(authUser[idUserField], team[idTeamField]); return isTeam; } /** * Is chat filter user * @param user {Object} * @return {boolean} */ isChatFilterUser(user) { const idField = this.state.users.idField; const authUser = this.getAuthUser(); const authUserId = authUser[idField]; const userId = user[idField]; const messages = this.getChatMessages(); const msgOwnerIds = messages.map(msg => msg.ownerId); const msgUserIds = messages.filter(msg => !!msg.user).map(msg => msg.userId); const isMsgOwner = (msgOwnerIds.findIndex(id => id === userId) > -1); const isMsgUser = (msgUserIds.findIndex(id => id === userId) > -1); return (userId !== authUserId) && (isMsgOwner || isMsgUser); } /** * Is chat filter msg * @param msg {Object} * @return {boolean|*} */ isChatFilterMsg(msg) { const idField = this.state.users.idField; const authUser = this.getAuthUser(); const authUserId = authUser[idField]; const isMsgOwner = (msg.ownerId === authUserId); const isMsgUser = (msg.userId === authUserId); const isMsgRole = (msg.roleId === authUser.roleId); const isMsgTeam = this.getters.isMyTeam(authUserId, msg.teamId); return (isMsgOwner || isMsgUser || isMsgRole || isMsgTeam); } /** * Get chat dateTime checkAt * @param name {String} * @param id * @param commitCheckAt {Boolean} * @return {String} */ getChatDTCheckAt(name, id, commitCheckAt = false){ let _item, items = [], isStateChatCheckAt = false; let dtCheckAt = moment.utc(0).format(); // Get items from stateChatCheckAt let stateChatCheckAt = this.getters.getChat.checkAt; if (stateChatCheckAt) { items = JSON.parse(stateChatCheckAt); } // Get dtCheckAt from stateChatCheckAt if(items.length){ isStateChatCheckAt = items.filter(item => (item.name === name) && (item.id === id)).length > 0; } if(isStateChatCheckAt){ _item = items.filter(item => (item.name === name) && (item.id === id))[0]; if(commitCheckAt){ _item.checkAt = moment.utc().format(); // Set state chat checkat this.commit('SET_CHAT_CHECKAT', items); } dtCheckAt = _item.checkAt; } else { _item = {name, id, checkAt: dtCheckAt}; items.push(_item); // Set state chat checkat this.commit('SET_CHAT_CHECKAT', items); } return dtCheckAt; } /** * Get chat msg info * @param messages {Array} * @param dtCheckAt {String} * @return {Object} */ getChatMsgInfo(messages, dtCheckAt) { let msgInfo = {}; let _messages = []; msgInfo.countAll = messages.length; // Filter messages _messages = messages.filter(msg => msg.dtUTC >= dtCheckAt); // Get msgInfo msgInfo.timeLabel = _messages.length ? moment(_messages[0].dt).fromNow() : ''; msgInfo.countMsg = _messages.length ? _messages.length : 0; msgInfo.lastMsg = _messages.length ? _messages[0].msg : ''; return msgInfo; } //==============================================================================================// /** * Find method, which is a proxy to the find action * @param path * @param params * @return {Promise.<*>} */ async find(path, params = {}) { let results = await this.dispatch(`${path}/find`, params); results = results.data || results; if (isLog) debug(`find.path: ${path}`, `find.params: ${JSON.stringify(params)}`, 'find.results:', results); return results; } /** * Find count method, which is a proxy to the find action * @param path * @param params * @return {Promise.<*>} */ async findCount(path, params = {}) { const newParams = loMerge(params, {query: {$limit: 0}}); let results = await this.dispatch(`${path}/find`, newParams); results = results.total; if (isLog) debug(`findCount.path: ${path}`, `findCount.params: ${JSON.stringify(newParams)}`, 'findCount.results:', results); return results; } /** * Find all method, which is a proxy to the find action * @param path * @param params * @return {Promise.<*>} */ async findAll(path, params = {}) { const newParams = loMerge(params, {query: {$limit: null}}); let results = await this.dispatch(`${path}/find`, newParams); if (isLog) debug(`findAll.path: ${path}`, `findAll.params: ${JSON.stringify(newParams)}`, 'findAll.results:', results); results = results.data || results; return results; } /** * findInStore method, which is a proxy to the find getter * @param path * @param params * @return {Array} */ findInStore(path, params = {}) { let results = this.getters[`${path}/find`](params); results = results.data || results; if (isLog) debug(`findInStore.path: ${path}`, `findInStore.params: ${JSON.stringify(params)}`, 'findInStore.results:', results); return results; } /** * findCountInStore method, which is a proxy to the find getter * @param path * @param params * @return {Array} */ findCountInStore(path, params = {}) { const newParams = loMerge(params, {query: {$limit: 0}}); let results = this.getters[`${path}/find`](newParams); results = results.total; if (isLog) debug(`findCountInStore.path: ${path}`, `findCountInStore.params: ${JSON.stringify(newParams)}`, 'findCountInStore.results:', results); return results; } /** * findAllInStore method, which is a proxy to the find getter * @param path * @param params * @return {Array} */ findAllInStore(path, params = {}) { const newParams = loMerge(params, {query: {$limit: null}}); let results = this.getters[`${path}/find`](newParams); results = results.data || results; if (isLog) debug(`findAllInStore.path: ${path}`, `findAllInStore.params: ${JSON.stringify(newParams)}`, 'findAllInStore.results:', results); return results; } /** * Get method, which is a proxy to the get action * @param path * @param id * @param params * @return {Promise.<*>} */ async get(path, id, params = {}) { let results = await this.dispatch(`${path}/get`, id, params); if (isLog) debug(`get.path: ${path}`, `get.id: ${id}`, 'get.results:', results); return results; } /** * getFromStore method, which is a proxy to the get getter * @param path * @param id * @param params * @return {Object} */ getFromStore(path, id, params = {}) { let results = this.getters[`${path}/get`](id, params); if (isLog) debug(`getFromStore.path: ${path}`, `getFromStore.id: ${id}`, 'getFromStore.results:', results); return results; } /** * Create method, which is a proxy to the create action * @param path * @param data {Object|Array} * @param params * @return {Object} */ async create(path, data, params = {}) { let results = await this.dispatch(`${path}/create`, [data, params]); if (isLog) debug(`create.path: ${path}`, `create.data: ${data}`, 'create.results:', results); return results; } /** * Patch method, which is a proxy to the patch action * @param path * @param id * @param data {Object} * @param params * @return {Object} */ async patch(path, id, data, params = {}) { let results = await this.dispatch(`${path}/patch`, [id, data, params]); if (isLog) debug(`patch.path: ${path}`, `patch.id: ${id}`, `patch.data: ${data}`, 'patch.results:', results); return results; } /** * Remove method, which is a proxy to the remove action * @param path * @param id {Number|String} * @return {Object} */ async remove(path, id) { let results = await this.dispatch(`${path}/remove`, id); if (isLog) debug(`remove.path: ${path}`, `remove.id: ${id}`, 'remove.results:', results); return results; } } export default Service;
/* * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved. * http://www.jaspersoft.com. * * Unless you have purchased a commercial license agreement from Jaspersoft, * the following license terms apply: * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** * @author: Zakhar Tomchenko * @version: $Id: TooltipPlugin.js 1605 2015-09-23 17:55:32Z inestere $ */ define(function(require){ "use strict"; var TreePlugin = require("./TreePlugin"), _ = require("underscore"), Tooltip = require("common/component/tooltip/Tooltip"); return TreePlugin.extend({ initialize: function(options){ this.tooltip = Tooltip.attachTo(options.attachTo, _.omit(options, "el")); this.listensToList = false; TreePlugin.prototype.initialize.apply(this, arguments); }, itemsRendered: function(model, list){ var self = this; // this because of list triggers render:data event often if(!this.listensToList){ this.listensToList = true; this.listenTo(list, "list:item:mouseover", function(item, e){ self.tooltip.show(item); }); this.listenTo(list, "list:item:mouseout", function(){ self.tooltip.hide(); }); } }, remove: function() { Tooltip.detachFrom(this.$el); this.tooltip.remove(); TreePlugin.prototype.remove.apply(this, arguments); } }); });
$(function() { $('.slick-v1').slick({ slidesToShow: 1, infinite: true, prevArrow: '<span data-role="none" class="slick-v1-prev" aria-label="Previous"></span>', nextArrow: '<span data-role="none" class="slick-v1-next" aria-label="Next"></span>' }); });
/*global console,ajaxurl,$,jQuery,megamenu,document,window,bstw,alert,wp,this*/ /** * Mega Menu jQuery Plugin */ (function($) { "use strict"; $.fn.megaMenu = function(options) { var panel = $("<div />"); panel.settings = options; panel.log = function(message) { if (window.console && console.log) { console.log(message.data); } if (message.success !== true) { alert(message.data); } }; panel.init = function() { var isDirty = false; panel.log({ success: true, data: megamenu.debug_launched + " " + panel.settings.menu_item_id }); $.colorbox.remove(); $.colorbox({ html: "", initialWidth: "75%", scrolling: true, fixed: true, initialHeight: "552", onOpen: function() { $('body').addClass('mega-colorbox-open'); isDirty = false; }, onClosed: function() { $('body').removeClass('mega-colorbox-open'); isDirty = false; } }); var originalClose = $.colorbox.close; $.colorbox.close = function(){ if ( isDirty == false ) { originalClose(); return; } if ( confirm( navMenuL10n.saveAlert ) ) { originalClose(); } }; $.ajax({ type: "POST", url: ajaxurl, data: { action: "mm_get_lightbox_html", _wpnonce: megamenu.nonce, menu_item_id: panel.settings.menu_item_id, menu_item_depth: panel.settings.menu_item_depth, menu_id: panel.settings.menu_id }, cache: false, beforeSend: function() { $("#cboxLoadedContent").empty(); $("#cboxClose").empty(); }, complete: function() { $("#cboxLoadingOverlay").remove(); // fix for WordPress 4.8 widgets when lightbox is opened, closed and reopened if (wp.textWidgets !== undefined) { wp.textWidgets.widgetControls = {}; // WordPress 4.8 Text Widget } if (wp.mediaWidgets !== undefined) { wp.mediaWidgets.widgetControls = {}; // WordPress 4.8 Media Widgets } if (wp.customHtmlWidgets !== undefined) { wp.customHtmlWidgets.widgetControls = {}; // WordPress 4.9 Custom HTML Widgets } }, success: function(response) { $("#cboxLoadingGraphic").remove(); var json = $.parseJSON(response.data); var header_container = $("<div />").addClass("mm_header_container"); var title = $("<div />").addClass("mm_title").html(panel.settings.menu_item_title); var saving = $("<div class='mm_saving'>" + megamenu.saving + "</div>"); header_container.append(title).append(saving); var tabs_container = $("<div class='mm_tab_container' />"); var content_container = $("<div class='mm_content_container' />"); if ( json === null ) { content_container.html(response); } $.each(json, function(idx) { var content = $("<div />").addClass("mm_content").addClass(idx).html(this.content).hide(); // bind save button action content.find("form").on("submit", function(e) { start_saving(); isDirty = false; e.preventDefault(); var data = $(this).serialize(); $.post(ajaxurl, data, function(submit_response) { end_saving(); panel.log(submit_response); }); }); // register changes made content.find("form").on("change", function(e) { isDirty = true; }); if (idx === "menu_icon") { var form = content.find("form.icon_selector").not(".icon_selector_custom"); // bind save button action form.on("change", function(e) { start_saving(); e.preventDefault(); $("input", form).not(e.target).removeAttr("checked"); var data = $(this).serialize(); $.post(ajaxurl, data, function(submit_response) { end_saving(); panel.log(submit_response); }); }); } if (idx === "general_settings") { content.find("select#mega-item-align").on("change", function() { var select = $(this); var selected = $(this).val(); select.next().children().hide(); select.next().children("." + selected).show(); }); } if (idx === "mega_menu") { var submenu_type = content.find("#mm_enable_mega_menu"); submenu_type.parents(".mm_content.mega_menu").attr('data-type', submenu_type.val()); submenu_type.on("change", function() { submenu_type.parents(".mm_content.mega_menu").attr('data-type', submenu_type.val()); start_saving(); var postdata = { action: "mm_save_menu_item_settings", settings: { type: submenu_type.val() }, menu_item_id: panel.settings.menu_item_id, _wpnonce: megamenu.nonce }; $.post(ajaxurl, postdata, function(select_response) { end_saving(); panel.log(select_response); }); }); setup_megamenu(content); setup_grid(content); } var tab = $("<div />").addClass("mm_tab").addClass(idx).html(this.title).on("click", function() { $(".mm_content").hide(); $(".mm_tab").removeClass("active"); $(this).addClass("active"); content.show(); }); if ((panel.settings.menu_item_depth == 0 && idx == "mega_menu") || (panel.settings.menu_item_depth > 0 && idx == "general_settings")) { content.show(); tab.addClass("active"); } tabs_container.append(tab); $(".mm_tab_horizontal", content).on("click", function() { var tab = $(this); var tab_id = $(this).attr("rel"); // reset search $(".filter_icons").val(""); $(".icon_selector > div").show(); tab.addClass("active"); tab.siblings().removeClass("active"); tab.parent().siblings().not("h4").not("input").hide(); tab.parent().siblings("." + tab_id).show(); }); $(".filter_icons", content).on("keyup", function() { var string = $(".filter_icons").val(); var all = $(".icon_selector:visible div input"); var filtered = all.filter(function() { return $(this).attr("id").indexOf(string) > -1; }); filtered.parent().show(); var others = all.not(filtered); others.parent().hide(); }); content_container.append(content); }); $("#cboxLoadedContent").addClass("depth-" + panel.settings.menu_item_depth).append(header_container).append(tabs_container).append(content_container); $("#cboxLoadedContent").css({ "width": "100%", "height": "100%", "display": "block" }); $("#cboxLoadedContent").trigger("megamenu_content_loaded"); } }); }; var setup_grid = function(content) { var grid = content.find("#megamenu-grid"); content.find("#mm_widget_selector").on("change", function() { var submenu_type = content.find("#mm_enable_mega_menu"); if (submenu_type.length && submenu_type.val() != "grid") { return; } var selector = $(this); if (selector.val() != "disabled") { var postdata = { action: "mm_add_widget", id_base: selector.val(), menu_item_id: panel.settings.menu_item_id, is_grid_widget: "true", title: selector.find("option:selected").text(), _wpnonce: megamenu.nonce }; $.post(ajaxurl, postdata, function(response) { var widget = $(response.data); $(".mega-col-widgets:first").append(widget); grid.trigger("make_columns_sortable"); grid.trigger("make_widgets_sortable"); grid.trigger("update_column_block_count"); grid.trigger("save_grid_data"); // reset the dropdown selector.val("disabled"); }); } }); // Add Column grid.on("click", ".mega-add-column", function() { var button = $(this); var row = button.parent().parent(); var used_cols = parseInt(row.attr('data-used-cols')); var available_cols = parseInt(row.attr('data-available-cols')); row.find(".mega-row-is-full").hide(); if ( used_cols + 1 > available_cols ) { row.find(".mega-row-is-full").slideDown().delay(2000).slideUp(); return; } var space_left_on_row = available_cols - used_cols; var data = { action: "mm_get_empty_grid_column", _wpnonce: megamenu.nonce }; $.post(ajaxurl, data, function(response) { var column = $(response.data); if (space_left_on_row < 3) { column.attr('data-span', space_left_on_row); column.find('.mega-num-cols').html(space_left_on_row); } button.parent().parent().append(column); grid.trigger("make_columns_sortable"); grid.trigger("make_widgets_sortable"); grid.trigger("save_grid_data"); grid.trigger("update_row_column_count"); grid.trigger("update_column_block_count"); }); }); // Delete Column grid.on("click", ".mega-col-description > .dashicons-trash", function() { $(this).closest(".mega-col").remove(); grid.trigger("save_grid_data"); grid.trigger("update_row_column_count"); }); // Add Row grid.on("click", ".mega-add-row", function() { var button = $(this); var data = { action: "mm_get_empty_grid_row", _wpnonce: megamenu.nonce }; $.post(ajaxurl, data, function(response) { var row = $(response.data); button.before(row); grid.trigger("make_columns_sortable"); grid.trigger("make_widgets_sortable"); grid.trigger("save_grid_data"); grid.trigger("update_row_column_count"); grid.trigger("update_column_block_count"); }); }); // Delete Row grid.on("click", ".mega-row-actions > .dashicons-trash", function() { $(this).closest(".mega-row").remove(); grid.trigger("save_grid_data"); }); // Expand Column grid.on("click", ".mega-col-expand", function() { var column = $(this).closest(".mega-col"); var cols = parseInt(column.attr("data-span"), 10); if (cols < 12) { cols = cols + 1; column.attr("data-span", cols); $(".mega-num-cols", column).html(cols); grid.trigger("save_grid_data"); grid.trigger("update_row_column_count"); } }); // Contract Column grid.on("click", ".mega-col-contract", function() { var column = $(this).closest(".mega-col"); var cols = parseInt(column.attr("data-span"), 10); if (cols > 1) { cols = cols - 1; column.attr("data-span", cols); $(".mega-num-cols", column).html(cols); grid.trigger("save_grid_data"); grid.trigger("update_row_column_count"); } }); grid.on("click", ".widget-action", function() { var action = "mm_edit_widget"; if ($(this).parent().parent().parent().attr('data-type') == 'item') { action = "mm_edit_menu_item"; } var widget = $(this).closest(".widget"); var widget_title = widget.find("h4"); var id = widget.attr("data-id"); var widget_inner = widget.find(".widget-inner"); if (!widget.hasClass("open") && !widget.data("loaded")) { widget_title.addClass("loading"); // retrieve the widget settings form $.post(ajaxurl, { action: action, widget_id: id, _wpnonce: megamenu.nonce }, function(response) { var $response = $(response); var $form = $response; // bind delete button action $(".delete", $form).on("click", function(e) { e.preventDefault(); widget.remove(); var data = { action: "mm_delete_widget", widget_id: id, _wpnonce: megamenu.nonce }; $.post(ajaxurl, data, function(delete_response) { panel.log(delete_response); grid.trigger("save_grid_data"); grid.trigger("update_column_block_count"); }); }); // bind close button action $(".close", $form).on("click", function(e) { e.preventDefault(); widget.toggleClass("open"); }); // bind save button action $form.on("submit", function(e) { e.preventDefault(); var data = $(this).serialize(); start_saving(); $.post(ajaxurl, data, function(submit_response) { end_saving(); panel.log(submit_response); }); }); widget_inner.html($response); widget.data("loaded", true).toggleClass("open"); grid.trigger("check_widget_inner_position", [widget_inner]); widget_title.removeClass("loading"); // Init Black Studio TinyMCE if (widget.is("[id*=black-studio-tinymce]")) { bstw(widget).deactivate().activate(); } setTimeout(function(){ $(document).trigger("widget-added", [widget]); if ('acf' in window) { acf.getFields(document); } }, 100); }); } else { widget.toggleClass("open"); } grid.trigger("check_widget_inner_position", [widget_inner]); // close all other widgets $(".widget").not(widget).removeClass("open"); }); // Contract Column grid.on("click", ".mega-col-header .dashicons-admin-generic", function() { $(this).toggleClass('mega-settings-open'); $(this).closest(".mega-col").find(".mega-col-settings").slideToggle(); }); grid.on("click", ".mega-row-header .dashicons-admin-generic", function() { $(this).toggleClass('mega-settings-open'); $(this).closest(".mega-row").find(".mega-row-settings").slideToggle(); }); grid.on("keyup", ".widget-content input[name*='[title]'], .media-widget-control [id*='_title'].title, .custom-html-widget-fields [id*='_title'].title", function() { var title = $(this).val(); if (title.length == 0) { var desc = $(this).closest(".widget").find(".widget-title .widget-desc").html(); $(this).closest(".widget").find(".widget-title h4").html(desc); } else { $(this).closest(".widget").find(".widget-title h4").html(title); } }); grid.on("click", ".dashicons-desktop", function() { var icon = $(this); var input = $(this).parent().parent().parent().parent().find("input[name='mega-hide-on-desktop']"); var tooltip = $(this).parent(); if (input.val() == "true") { input.val("false"); tooltip.removeClass("mega-disabled").addClass("mega-enabled"); } else { input.val("true"); tooltip.removeClass("mega-enabled").addClass("mega-disabled"); } grid.trigger("save_grid_data"); }); grid.on("click", ".dashicons-smartphone", function() { var icon = $(this); var input = $(this).parent().parent().parent().parent().find("input[name='mega-hide-on-mobile']"); var tooltip = $(this).parent(); if (input.val() == "true") { input.val("false"); tooltip.removeClass("mega-disabled").addClass("mega-enabled"); } else { input.val("true"); tooltip.removeClass("mega-enabled").addClass("mega-disabled"); } grid.trigger("save_grid_data"); }); grid.on("click", ".mega-save-column-settings, .mega-save-row-settings", function() { grid.trigger("save_grid_data"); }); grid.on("click", ".mega-save-row-settings", function() { grid.trigger("update_total_columns_in_row"); }); grid.on("check_widget_inner_position", function(event, widget_inner) { var widget_inner_right_edge = widget_inner.offset().left + widget_inner.width(); var content_right_edge = $(".mm_content_container").offset().left + $(".mm_content_container").width(); if (widget_inner_right_edge > content_right_edge) { widget_inner.css("right", "0"); } else { widget_inner.css("right", ""); } }); grid.on("save_grid_data", function() { start_saving(); var rows = []; var cols = []; $(".mega-row", grid).each(function() { var row_index = $(this).index(); var row_hide_on_desktop = $(this).find("input[name='mega-hide-on-desktop']").val(); var row_hide_on_mobile = $(this).find("input[name='mega-hide-on-mobile']").val(); var row_class = $(this).find("input.mega-row-class").val(); var row_columns = $(this).find("select.mega-row-columns").val(); rows[row_index] = { "meta": { "class": row_class, "hide-on-desktop": row_hide_on_desktop, "hide-on-mobile": row_hide_on_mobile, "columns": row_columns }, "columns": [] }; }); $(".mega-col", grid).each(function() { var col_index = $(this).parent().children(".mega-col").index($(this)); var row_index = $(this).parent(".mega-row").index(); var col_span = $(this).attr("data-span"); var col_hide_on_desktop = $(this).find("input[name='mega-hide-on-desktop']").val(); var col_hide_on_mobile = $(this).find("input[name='mega-hide-on-mobile']").val(); var col_class = $(this).find("input.mega-column-class").val(); rows[row_index]["columns"][col_index] = { "meta": { "span": col_span, "class": col_class, "hide-on-desktop": col_hide_on_desktop, "hide-on-mobile": col_hide_on_mobile }, "items": [] }; }); $(".widget", grid).each(function() { var block_index = $(this).index(); var id = $(this).attr("data-id"); var type = $(this).attr("data-type"); var row_index = $(this).closest(".mega-row").index(); var col = $(this).closest(".mega-col"); var col_index = col.parent().children(".mega-col").index(col); var widget = { "id": id, "type": type }; rows[row_index]["columns"][col_index]["items"].push(widget); }); $.post(ajaxurl, { action: "mm_save_grid_data", grid: rows, parent_menu_item: panel.settings.menu_item_id, _wpnonce: megamenu.nonce }, function(move_response) { end_saving(); }); grid.trigger("update_row_column_count"); }); grid.on("update_total_columns_in_row", function() { $(".mega-row", grid).each(function() { var row = $(this); var total_cols = $(this).find("select.mega-row-columns").val(); $(this).attr('data-available-cols', total_cols); $(".mega-col", row).not(".ui-sortable-helper").each(function() { var col = $(this); $(this).find('.mega-num-total-cols').html(total_cols); }); }); }); grid.on("update_row_column_count", function() { grid.trigger("update_total_columns_in_row"); $(".mega-row", grid).each(function() { var row = $(this); var used_cols = 0; var available_cols = row.attr("data-available-cols"); $(".mega-col", row).not(".ui-sortable-helper").each(function() { var col = $(this); used_cols = used_cols + parseInt(col.attr("data-span"), 10); }); row.attr("data-used-cols", used_cols); row.removeAttr("data-too-many-cols"); row.removeAttr("data-row-is-full"); if ( used_cols > available_cols ) { row.attr("data-too-many-cols", "true"); } if ( used_cols == available_cols ) { row.attr("data-row-is-full", "true"); } }); }); grid.on("update_column_block_count", function() { $(".mega-col", grid).each(function() { var col = $(this); col.attr("data-total-blocks", $(".mega-col-widgets > .widget", col).length); }); }); grid.on("make_rows_sortable", function() { // sortable row grid.sortable({ forcePlaceholderSize: true, items: ".mega-row", placeholder: "drop-area", handle: ".mega-row-header > .mega-row-actions > .dashicons-sort", tolerance: "pointer", start: function(event, ui) { $(".widget").removeClass("open"); ui.item.data("start_pos", ui.item.index()); }, stop: function(event, ui) { // clean up ui.item.removeAttr("style"); var start_pos = ui.item.data("start_pos"); if (start_pos !== ui.item.index()) { grid.trigger("save_grid_data"); } } }); }); grid.on("make_widgets_sortable", function() { // sortable widgets var cols = grid.find(".mega-col-widgets"); cols.sortable({ connectWith: ".mega-col-widgets", forcePlaceholderSize: true, items: ".widget", placeholder: "drop-area", handle: ".widget-top", helper: "clone", tolerance: "pointer", start: function(event, ui) { $(".widget").removeClass("open"); ui.item.css("margin-top", $(window).scrollTop()); }, stop: function(event, ui) { // clean up ui.item.removeAttr("style"); grid.trigger("save_grid_data"); grid.trigger("update_column_block_count"); } }); }); grid.on("make_columns_sortable", function() { // sortable columns var rows = grid.find(".mega-row"); rows.sortable({ connectWith: ".mega-row", forcePlaceholderSize: false, items: ".mega-col", placeholder: "drop-area", tolerance: "pointer", handle: ".mega-col-header > .mega-col-description > .dashicons-move", start: function(event, ui) { ui.placeholder.height(ui.helper[0].scrollHeight); ui.placeholder.width(ui.item.width() - 1); $(".widget").removeClass("open"); }, sort: function(event, ui) { grid.trigger("update_row_column_count"); }, stop: function(event, ui) { grid.trigger("save_grid_data"); // clean up ui.item.removeAttr("style"); grid.trigger("update_row_column_count"); } }); }); grid.trigger("update_row_column_count"); grid.trigger("update_column_block_count"); grid.trigger("make_rows_sortable"); grid.trigger("make_columns_sortable"); grid.trigger("make_widgets_sortable"); } var setup_megamenu = function(content) { var megamenubuilder = content.find("#widgets"); content.find("#mm_number_of_columns").on("change", function() { megamenubuilder.attr("data-columns", $(this).val()); megamenubuilder.find(".widget-total-cols").html($(this).val()); start_saving(); var postdata = { action: "mm_save_menu_item_settings", settings: { panel_columns: $(this).val() }, menu_item_id: panel.settings.menu_item_id, _wpnonce: megamenu.nonce }; $.post(ajaxurl, postdata, function(select_response) { end_saving(); panel.log(select_response); }); }); megamenubuilder.bind("reorder_widgets", function() { start_saving(); var items = []; $(".widget").each(function() { items.push({ "type": $(this).attr("data-type"), "order": $(this).index() + 1, "id": $(this).attr("data-id"), "parent_menu_item": panel.settings.menu_item_id }); }); $.post(ajaxurl, { action: "mm_reorder_items", items: items, _wpnonce: megamenu.nonce }, function(move_response) { end_saving(); panel.log(move_response); }); }); megamenubuilder.sortable({ forcePlaceholderSize: true, items: ".widget:not(.sub_menu)", placeholder: "drop-area", handle: ".widget-top", start: function(event, ui) { $(".widget").removeClass("open"); ui.item.data("start_pos", ui.item.index()); }, stop: function(event, ui) { // clean up ui.item.removeAttr("style"); var start_pos = ui.item.data("start_pos"); if (start_pos !== ui.item.index()) { megamenubuilder.trigger("reorder_widgets"); } } }); content.find("#mm_widget_selector").on("change", function() { var submenu_type = content.find("#mm_enable_mega_menu"); if (submenu_type.length && submenu_type.val() != "megamenu") { return; } var selector = $(this); if (selector.val() != "disabled") { start_saving(); var postdata = { action: "mm_add_widget", id_base: selector.val(), menu_item_id: panel.settings.menu_item_id, title: selector.find("option:selected").text(), _wpnonce: megamenu.nonce }; $.post(ajaxurl, postdata, function(response) { $(".no_widgets").hide(); var widget = $(response.data); var number_of_columns = content.find("#mm_number_of_columns").val(); widget.find(".widget-total-cols").html(number_of_columns); $("#widgets").append(widget); megamenubuilder.trigger("reorder_widgets"); end_saving(); // reset the dropdown selector.val("disabled"); }); } }); megamenubuilder.on("click", ".widget .widget-expand", function() { var widget = $(this).closest(".widget"); var type = widget.attr("data-type"); var id = widget.attr("id"); var cols = parseInt(widget.attr("data-columns"), 10); var maxcols = parseInt($("#mm_number_of_columns").val(), 10); if (cols < maxcols) { cols = cols + 1; widget.attr("data-columns", cols); $(".widget-num-cols", widget).html(cols); start_saving(); if (type == "widget") { $.post(ajaxurl, { action: "mm_update_widget_columns", id: id, columns: cols, _wpnonce: megamenu.nonce }, function(expand_response) { end_saving(); panel.log(expand_response); }); } if (type == "menu_item") { $.post(ajaxurl, { action: "mm_update_menu_item_columns", id: id, columns: cols, _wpnonce: megamenu.nonce }, function(contract_response) { end_saving(); panel.log(contract_response); }); } } }); megamenubuilder.on("click", ".widget .widget-contract", function() { var widget = $(this).closest(".widget"); var type = widget.attr("data-type"); var id = widget.attr("id"); var cols = parseInt(widget.attr("data-columns"), 10); // account for widgets that have say 8 columns but the panel is only 6 wide var maxcols = parseInt($("#mm_number_of_columns").val(), 10); if (cols > maxcols) { cols = maxcols; } if (cols > 1) { cols = cols - 1; widget.attr("data-columns", cols); $(".widget-num-cols", widget).html(cols); } else { return; } start_saving(); if (type == "widget") { $.post(ajaxurl, { action: "mm_update_widget_columns", id: id, columns: cols, _wpnonce: megamenu.nonce }, function(contract_response) { end_saving(); panel.log(contract_response); }); } if (type == "menu_item") { $.post(ajaxurl, { action: "mm_update_menu_item_columns", id: id, columns: cols, _wpnonce: megamenu.nonce }, function(contract_response) { end_saving(); panel.log(contract_response); }); } }); megamenubuilder.on("click", ".widget .widget-action", function() { var action = "mm_edit_widget"; if ($(this).parent().parent().parent().attr('data-type') == 'menu_item') { action = "mm_edit_menu_item"; } var widget = $(this).closest(".widget"); var widget_title = widget.find(".widget-title"); var widget_inner = widget.find(".widget-inner"); var id = widget.attr("id"); if (!widget.hasClass("open") && !widget.data("loaded")) { widget_title.addClass("loading"); // retrieve the widget settings form $.post(ajaxurl, { action: action, widget_id: id, _wpnonce: megamenu.nonce }, function(response) { var $response = $(response); var $form = $response; // bind delete button action $(".delete", $form).on("click", function(e) { e.preventDefault(); var data = { action: "mm_delete_widget", widget_id: id, _wpnonce: megamenu.nonce }; $.post(ajaxurl, data, function(delete_response) { widget.remove(); panel.log(delete_response); }); }); // bind close button action $(".close", $form).on("click", function(e) { e.preventDefault(); widget.toggleClass("open"); }); // bind save button action $form.on("submit", function(e) { e.preventDefault(); var data = $(this).serialize(); start_saving(); $.post(ajaxurl, data, function(submit_response) { end_saving(); panel.log(submit_response); }); }); widget_inner.html($response); widget.data("loaded", true).toggleClass("open"); widget_title.removeClass("loading"); // Init Black Studio TinyMCE if (widget.is('[id*=black-studio-tinymce]')) { bstw(widget).deactivate().activate(); } setTimeout(function(){ $(document).trigger("widget-added", [widget]); if ('acf' in window) { acf.getFields(document); } }, 100); }); } else { widget.toggleClass("open"); } // close all other widgets $(".widget").not(widget).removeClass("open"); }); } var start_saving = function() { $(".mm_saving").show(); } var end_saving = function() { $(".mm_saving").fadeOut("fast"); } panel.init(); }; }(jQuery)); /** * */ jQuery(function($) { "use strict"; $(".menu").on("click", ".megamenu_launch", function(e) { e.preventDefault(); $(this).megaMenu(); }); $("#megamenu_accordion").accordion({ heightStyle: "content", collapsible: true, active: false, animate: 200 }); var apply_megamenu_enabled_class = function() { if ($("input.megamenu_enabled:checked") && $("input.megamenu_enabled:checked").length) { $("body").addClass("megamenu_enabled"); } else { $("body").removeClass("megamenu_enabled"); } } $("input.megamenu_enabled").on("change", function() { apply_megamenu_enabled_class(); }); apply_megamenu_enabled_class(); $("#menu-to-edit li.menu-item").each(function() { var menu_item = $(this); var menu_id = $("input#menu").val(); var title = menu_item.find(".menu-item-title").text(); menu_item.data("megamenu_has_button", "true"); // fix for Jupiter theme if (!title) { title = menu_item.find(".item-title").text(); } var id = parseInt(menu_item.attr("id").match(/[0-9]+/)[0], 10); var button = $("<span>").addClass("mm_launch") .html(megamenu.launch_lightbox) .on("click", function(e) { e.preventDefault(); if (!$("body").hasClass("megamenu_enabled")) { alert(megamenu.is_disabled_error); return; } var depth = menu_item.attr("class").match(/\menu-item-depth-(\d+)\b/)[1]; $(this).megaMenu({ menu_item_id: id, menu_item_title: title, menu_item_depth: depth, menu_id: menu_id }); }); $(".item-title", menu_item).append(button); if (megamenu.css_prefix === "true") { var custom_css_classes = menu_item.find(".edit-menu-item-classes"); var css_prefix = $("<span>").addClass("mm_prefix").html(megamenu.css_prefix_message); custom_css_classes.after(css_prefix); } }); $(".megamenu_enabled #menu-to-edit").on("mouseenter mouseleave", "li.menu-item", function() { var menu_item = $(this); if (!menu_item.data("megamenu_has_button")) { menu_item.data("megamenu_has_button", "true"); var button = $("<span>").addClass("mm_launch mm_disabled") .html(megamenu.launch_lightbox) .on("click", function(e) { e.preventDefault(); alert(megamenu.save_menu); }); $(".item-title", menu_item).append(button); } }); // AJAX Save MMM Settings $(".max-mega-menu-save").on("click", function(e) { e.preventDefault(); $(".mega_menu_meta_box .spinner").css("visibility", "visible"); var settings = JSON.stringify($("[name^='megamenu_meta']").serializeArray()); // retrieve the widget settings form $.post(ajaxurl, { action: "mm_save_settings", menu: $("#menu").val(), megamenu_meta: settings, nonce: megamenu.nonce }, function(response) { $(".mega_menu_meta_box .spinner").css("visibility", "hidden"); }); }); });
// For documentation, check our wiki // https://github.com/react-native-kit/react-native-track-player/wiki module.exports = require("./lib/index.js");
'use strict' /* globals describe beforeEach it commands */ const expect = require('chai').expect const cli = require('heroku-cli-util') const nock = require('nock') const cmd = commands.find((c) => c.topic === 'stack' && c.command === 'set') const pendingUpgradeApp = { name: 'myapp', stack: { name: 'heroku-16' }, build_stack: { name: 'heroku-18' } } const completedUpgradeApp = { name: 'myapp', stack: { name: 'heroku-18' }, build_stack: { name: 'heroku-18' } } describe('stack:set', function () { beforeEach(() => cli.mockConsole()) it('sets the stack', function () { let api = nock('https://api.heroku.com:443') .patch('/apps/myapp', { build_stack: 'heroku-18' }) .reply(200, pendingUpgradeApp) return cmd.run({ app: 'myapp', args: { stack: 'heroku-18' }, flags: {} }) .then(() => expect(cli.stderr).to.equal('Setting stack to heroku-18... done\n')) .then(() => expect(cli.stdout).to.equal(`You will need to redeploy myapp for the change to take effect. Run git push heroku master to create a new release on myapp. `)) .then(() => api.done()) }) it('sets the stack on a different remote', function () { let api = nock('https://api.heroku.com:443') .patch('/apps/myapp', { build_stack: 'heroku-18' }) .reply(200, pendingUpgradeApp) return cmd.run({ app: 'myapp', args: { stack: 'heroku-18' }, flags: { remote: 'staging' } }) .then(() => expect(cli.stderr).to.equal('Setting stack to heroku-18... done\n')) .then(() => expect(cli.stdout).to.equal(`You will need to redeploy myapp for the change to take effect. Run git push staging master to create a new release on myapp. `)) .then(() => api.done()) }) it('does not show the redeploy message if the stack was immediately updated by API', function () { let api = nock('https://api.heroku.com:443') .patch('/apps/myapp', { build_stack: 'heroku-18' }) .reply(200, completedUpgradeApp) return cmd.run({ app: 'myapp', args: { stack: 'heroku-18' }, flags: {} }) .then(() => expect(cli.stderr).to.equal('Setting stack to heroku-18... done\n')) .then(() => expect(cli.stdout).to.equal('')) .then(() => api.done()) }) })
/* Filename: Search.js Common Name: Search Module Description: A Module containing search functions Author: Lukas Novak Date: Aug 10, 2017 Dependencies: help.js arrayUpdate.js */ var Search = (function() { /* keys is an array of at least one string, * vdb is the vdb to repopulate */ function VDBSearch(vdb, key, comparator) { console.log(comparator); console.log("key is " + key); // To save some time if(key == vdb.lastKey) return true; vdb.lastKey = key; // Get an array and save some MORE time... var keyArray = keyArrayFromString(key.toUpperCase()); if(keyArray.equals(vdb.lastKeyArray)) return true; vdb.lastKeyArray = keyArray; // For the last time, save some time... if(keyArray == []) return true; // console.log(keyArray); var onIds = quickSearch(vdb, keyArray, comparator); // console.log(vdb.onIds); return onIds; } return { VDBSearch : VDBSearch }; function quickSearch(vdb, keys, comparator) { var hitList = populate(vdb, keys[0], comparator); for(var len = keys.length, i = 1; i < len; i++) hitList = narrowSearch(vdb, hitList, keys[i], comparator); return hitList; } function narrowSearch(vdb, list, token, comparator) { // console.log("in narrow search"); if(!isSorted(list, comparator)) alert("NARROW SEARCH FOUND UNSORTED LIST"); return list.sortedMinimalIntersection(populate(vdb, token, comparator), comparator); } // Uses a jank choosing mechanism, should be improved function nearBestValue(hitMatrix) { var nextValue, curValue, nextRow; if(nextValidRow(hitMatrix) != -1) { curValue = curVal(hitMatrix); nextValue = nextVal(hitMatrix); if((nextValue == undefined) || (curValue > nextValue)) { hitMatrix.colFromRow[hitMatrix.row]++; return curValue; } else { nextRow = nextValidRow(hitMatrix); hitMatrix.colFromRow[nextRow]++; hitMatrix.row = nextRow; return nextValue; } } else { return undefined; } } // NONE OF THE FOLLOWING FUNCTIONS CHANGE HITMATRIX /************************************************************/ function curVal(hitMatrix) { return hitMatrix.mat[hitMatrix.row][hitMatrix.colFromRow[hitMatrix.row]]; } function nextVal(hitMatrix) { var nextRow = nextValidRow(hitMatrix); if(nextRow == -1) return undefined; // console.log("next row is " + nextRow); return hitMatrix.mat[nextRow][hitMatrix.colFromRow[nextRow]]; } function nextValidRow(hitMatrix){ var colFromRow = hitMatrix.colFromRow; var matrix = hitMatrix.mat; var curRow = (hitMatrix.row + 1) % matrix.length; var origRow = hitMatrix.row % matrix.length; do { if(matrix[curRow][colFromRow[curRow]] != undefined) return curRow; curRow = (curRow + 1) % (matrix.length); } while(curRow != origRow) if(matrix[origRow][colFromRow[origRow]] != undefined) return origRow; return -1; } /***********************************************************/ function entriesInRange(vdb, range) { var numHits = 0; for(var i = range.start; i < range.end; i++) numHits += Object.keys(vdb.searchSpace[i]['hits']).length; console.log("THIS SEARCH HAS " + numHits + " HITS"); return numHits; } function populate(vdb, token, comparator, max=0) { console.log("populate called with cmp = "); console.log(comparator); // Range logic, and empty if no hits var range = Range(vdb.searchSpace, token); if(range.size == 0) return []; var start = range.start, end = range.end; // For testing entriesInRange(vdb, range); var hitMatrix = {"row":0, "colFromRow":[], "mat":[]}; // A hack - should modify 'hits' to be an array for(var i = start; i < end; i++) { hitMatrix.colFromRow.push(0); hitMatrix.mat[i - start] = Object.keys(vdb.searchSpace[i]['hits']); } // Grab values and populate! var toRet = [], nextValue = nearBestValue(hitMatrix), count = 0; while(nextValue != undefined) { // console.log(count++); if(!toRet.sortedContains(nextValue, comparator)) toRet.inSort(nextValue, comparator); nextValue = nearBestValue(hitMatrix); } // Go home proud console.log("RETURNING"); console.log(toRet); if(!isSorted(toRet, comparator)) alert("ISSUE IS IN SEARCH"); return toRet; } function Range(array=[], token="") { var obj = {}; if(token == "") { obj.start = -1; obj.end = -1; obj.size = 0; } else { // console.log("SEARCHING FOR RANGE..."); // console.log(array); obj.start = array.sortedLeftMostByProperty('key', token, strStartLeftCmp); obj.end = array.sortedRightMostByProperty('key', token, strStartLeftCmp) + 1; obj.size = (obj.start == -1)? 0: obj.end - obj.start; } return obj; } }());
import React from 'react'; import Paper from '@material-ui/core/Paper'; export const paperWidth = 720; export const styles = theme => ({ root: { textAlign: 'center', marginTop: '-70px', width: 'auto', marginLeft: theme.spacing.unit * 2, marginRight: theme.spacing.unit * 2, [theme.breakpoints.up(paperWidth + theme.spacing.unit * 2 * 2)]: { width: paperWidth, marginLeft: 'auto', marginRight: 'auto', }, }, paper: { // marginTop: theme.spacing.unit * 3, // marginBottom: theme.spacing.unit * 3, padding: theme.spacing.unit * 1, [theme.breakpoints.up(paperWidth + theme.spacing.unit * 3 * 2)]: { // marginTop: theme.spacing.unit * 6, // marginBottom: theme.spacing.unit * 6, // padding: theme.spacing.unit * 1, }, }, paperSpaceLarge: { margin: '70px auto', width: '440px', [theme.breakpoints.down(paperWidth + theme.spacing.unit * 3 * 2)]: { width: 'inherit', margin: `20px ${theme.spacing.unit}px 20px ${theme.spacing.unit}px`, }, }, paperSpaceMedium: { textAlign: 'left', margin: '70px auto 24px auto', width: '560px', [theme.breakpoints.down(paperWidth + theme.spacing.unit * 3 * 2)]: { width: 'inherit', margin: `20px ${theme.spacing.unit}px 20px ${theme.spacing.unit}px`, }, }, paperSpaceFormWithSteps: { margin: '70px auto 24px auto', width: '440px', [theme.breakpoints.down(paperWidth + theme.spacing.unit * 3 * 2)]: { width: 'inherit', margin: `20px ${theme.spacing.unit}px 20px ${theme.spacing.unit}px`, }, }, button: { margin: theme.spacing.unit, marginBottom: theme.spacing.unit * 2, }, leftIcon: { marginRight: theme.spacing.unit, }, flexCenter: { display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', }, }); export default class BasePaper extends React.Component { constructor(props) { super(props); } render() { const { classes } = this.props; return ( <div className={classes.root}> <Paper elevation={1} className={classes.paper} square> {this.content} </Paper> </div> ); } }
import { tryCatch } from '../util/tryCatch'; import { errorObject } from '../util/errorObject'; import { OuterSubscriber } from '../OuterSubscriber'; import { subscribeToResult } from '../util/subscribeToResult'; /** * Ignores source values for a duration determined by another Observable, then * emits the most recent value from the source Observable, then repeats this * process. * * <span class="informal">It's like {@link auditTime}, but the silencing * duration is determined by a second Observable.</span> * * <img src="./img/audit.png" width="100%"> * * `audit` is similar to `throttle`, but emits the last value from the silenced * time window, instead of the first value. `audit` emits the most recent value * from the source Observable on the output Observable as soon as its internal * timer becomes disabled, and ignores source values while the timer is enabled. * Initially, the timer is disabled. As soon as the first source value arrives, * the timer is enabled by calling the `durationSelector` function with the * source value, which returns the "duration" Observable. When the duration * Observable emits a value or completes, the timer is disabled, then the most * recent source value is emitted on the output Observable, and this process * repeats for the next source value. * * @example <caption>Emit clicks at a rate of at most one click per second</caption> * var clicks = Rx.Observable.fromEvent(document, 'click'); * var result = clicks.audit(ev => Rx.Observable.interval(1000)); * result.subscribe(x => console.log(x)); * * @see {@link auditTime} * @see {@link debounce} * @see {@link delayWhen} * @see {@link sample} * @see {@link throttle} * * @param {function(value: T): SubscribableOrPromise} durationSelector A function * that receives a value from the source Observable, for computing the silencing * duration, returned as an Observable or a Promise. * @return {Observable<T>} An Observable that performs rate-limiting of * emissions from the source Observable. * @method audit * @owner Observable */ export function audit(durationSelector) { return function auditOperatorFunction(source) { return source.lift(new AuditOperator(durationSelector)); }; } class AuditOperator { constructor(durationSelector) { this.durationSelector = durationSelector; } call(subscriber, source) { return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector)); } } /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ class AuditSubscriber extends OuterSubscriber { constructor(destination, durationSelector) { super(destination); this.durationSelector = durationSelector; this.hasValue = false; } _next(value) { this.value = value; this.hasValue = true; if (!this.throttled) { const duration = tryCatch(this.durationSelector)(value); if (duration === errorObject) { this.destination.error(errorObject.e); } else { const innerSubscription = subscribeToResult(this, duration); if (innerSubscription.closed) { this.clearThrottle(); } else { this.add(this.throttled = innerSubscription); } } } } clearThrottle() { const { value, hasValue, throttled } = this; if (throttled) { this.remove(throttled); this.throttled = null; throttled.unsubscribe(); } if (hasValue) { this.value = null; this.hasValue = false; this.destination.next(value); } } notifyNext(outerValue, innerValue, outerIndex, innerIndex) { this.clearThrottle(); } notifyComplete() { this.clearThrottle(); } } //# sourceMappingURL=audit.js.map
/** * @license Angular UI Tree v2.11.0 * (c) 2010-2015. https://github.com/angular-ui-tree/angular-ui-tree * License: MIT */ (function () { 'use strict'; angular.module('ui.tree', []) .constant('treeConfig', { treeClass: 'angular-ui-tree custom-angular-ui-tree', emptyTreeClass: 'angular-ui-tree-empty', hiddenClass: 'angular-ui-tree-hidden', nodesClass: 'angular-ui-tree-nodes', nodeClass: 'angular-ui-tree-node', handleClass: 'angular-ui-tree-handle', placeholderClass: 'angular-ui-tree-placeholder', dragClass: 'angular-ui-tree-drag', dragThreshold: 3, levelThreshold: 30, hasConnectedTree: false }); })();
from django.shortcuts import render from django.http import HttpResponse from .models import Message from .forms import ChatModelForm from UserProfiles.models import UserProfileModel from .FindUserGuild import FindUserGuild # Create your views here. def GroupChat(request): MessageList = [] UserProf = [] if request.method == 'POST': MessageList = Message.objects.filter(GuildId = (FindUserGuild(request.user.id)).Id) form = ChatModelForm(request.POST) if form.is_valid(): Chat = Message() Chat.UserId = request.user Chat.GuildId = FindUserGuild(request.user.id) Chat.ProfId = UserProfileModel.objects.get(UserProfileRelation = request.user) Chat.MessageBody = form.cleaned_data['MessageBody'] Chat.save() else: MessageList = Message.objects.filter(GuildId = (FindUserGuild(request.user.id)).Id) form = ChatModelForm() return render(request, 'GroupChat/GroupChat.html', {'form': form, 'MessageList': MessageList, 'Username':request.user.id})
# # Module providing the `Process` class which emulates `threading.Thread` # # multiprocessing/process.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # __all__ = ['Process', 'current_process', 'active_children'] # # Imports # import os import sys import signal import itertools from _weakrefset import WeakSet # # # try: ORIGINAL_DIR = os.path.abspath(os.getcwd()) except OSError: ORIGINAL_DIR = None # # Public functions # def current_process(): ''' Return process object representing the current process ''' return _current_process def active_children(): ''' Return list of process objects corresponding to live child processes ''' _cleanup() return list(_current_process._children) # # # def _cleanup(): # check for processes which have finished for p in list(_current_process._children): if p._popen.poll() is not None: _current_process._children.discard(p) # # The `Process` class # class Process(object): ''' Process objects represent activity that is run in a separate process The class is analagous to `threading.Thread` ''' _Popen = None def __init__(self, group=None, target=None, name=None, args=(), kwargs={}, *, daemon=None): assert group is None, 'group argument must be None for now' count = next(_current_process._counter) self._identity = _current_process._identity + (count,) self._authkey = _current_process._authkey if daemon is not None: self._daemonic = daemon else: self._daemonic = _current_process._daemonic self._tempdir = _current_process._tempdir self._parent_pid = os.getpid() self._popen = None self._target = target self._args = tuple(args) self._kwargs = dict(kwargs) self._name = name or type(self).__name__ + '-' + \ ':'.join(str(i) for i in self._identity) _dangling.add(self) def run(self): ''' Method to be run in sub-process; can be overridden in sub-class ''' if self._target: self._target(*self._args, **self._kwargs) def start(self): ''' Start child process ''' assert self._popen is None, 'cannot start a process twice' assert self._parent_pid == os.getpid(), \ 'can only start a process object created by current process' # assert not _current_process._daemonic, \ # 'daemonic processes are not allowed to have children' _cleanup() if self._Popen is not None: Popen = self._Popen else: from .forking import Popen self._popen = Popen(self) self._sentinel = self._popen.sentinel _current_process._children.add(self) def terminate(self): ''' Terminate process; sends SIGTERM signal or uses TerminateProcess() ''' self._popen.terminate() def join(self, timeout=None): ''' Wait until child process terminates ''' assert self._parent_pid == os.getpid(), 'can only join a child process' assert self._popen is not None, 'can only join a started process' res = self._popen.wait(timeout) if res is not None: _current_process._children.discard(self) def is_alive(self): ''' Return whether process is alive ''' if self is _current_process: return True assert self._parent_pid == os.getpid(), 'can only test a child process' if self._popen is None: return False self._popen.poll() return self._popen.returncode is None @property def name(self): return self._name @name.setter def name(self, name): assert isinstance(name, str), 'name must be a string' self._name = name @property def daemon(self): ''' Return whether process is a daemon ''' return self._daemonic @daemon.setter def daemon(self, daemonic): ''' Set whether process is a daemon ''' assert self._popen is None, 'process has already started' self._daemonic = daemonic @property def authkey(self): return self._authkey @authkey.setter def authkey(self, authkey): ''' Set authorization key of process ''' self._authkey = AuthenticationString(authkey) @property def exitcode(self): ''' Return exit code of process or `None` if it has yet to stop ''' if self._popen is None: return self._popen return self._popen.poll() @property def ident(self): ''' Return identifier (PID) of process or `None` if it has yet to start ''' if self is _current_process: return os.getpid() else: return self._popen and self._popen.pid pid = ident @property def sentinel(self): ''' Return a file descriptor (Unix) or handle (Windows) suitable for waiting for process termination. ''' try: return self._sentinel except AttributeError: raise ValueError("process not started") def __repr__(self): if self is _current_process: status = 'started' elif self._parent_pid != os.getpid(): status = 'unknown' elif self._popen is None: status = 'initial' else: if self._popen.poll() is not None: status = self.exitcode else: status = 'started' if type(status) is int: if status == 0: status = 'stopped' else: status = 'stopped[%s]' % _exitcode_to_name.get(status, status) return '<%s(%s, %s%s)>' % (type(self).__name__, self._name, status, self._daemonic and ' daemon' or '') ## def _bootstrap(self): from . import util global _current_process try: self._children = set() self._counter = itertools.count(1) if sys.stdin is not None: try: sys.stdin.close() sys.stdin = open(os.devnull) except (OSError, ValueError): pass old_process = _current_process _current_process = self try: util._finalizer_registry.clear() util._run_after_forkers() finally: # delay finalization of the old process object until after # _run_after_forkers() is executed del old_process util.info('child process calling self.run()') try: self.run() exitcode = 0 finally: util._exit_function() except SystemExit as e: if not e.args: exitcode = 1 elif isinstance(e.args[0], int): exitcode = e.args[0] else: sys.stderr.write(str(e.args[0]) + '\n') exitcode = 1 except: exitcode = 1 import traceback sys.stderr.write('Process %s:\n' % self.name) traceback.print_exc() finally: util.info('process exiting with exitcode %d' % exitcode) sys.stdout.flush() sys.stderr.flush() return exitcode # # We subclass bytes to avoid accidental transmission of auth keys over network # class AuthenticationString(bytes): def __reduce__(self): from .forking import Popen if not Popen.thread_is_spawning(): raise TypeError( 'Pickling an AuthenticationString object is ' 'disallowed for security reasons' ) return AuthenticationString, (bytes(self),) # # Create object representing the main process # class _MainProcess(Process): def __init__(self): self._identity = () self._daemonic = False self._name = 'MainProcess' self._parent_pid = None self._popen = None self._counter = itertools.count(1) self._children = set() self._authkey = AuthenticationString(os.urandom(32)) self._tempdir = None _current_process = _MainProcess() del _MainProcess # # Give names to some return codes # _exitcode_to_name = {} for name, signum in list(signal.__dict__.items()): if name[:3]=='SIG' and '_' not in name: _exitcode_to_name[-signum] = name # For debug and leak testing _dangling = WeakSet()
// Port of the Node.js url module to the browser-side; var urlParser = (function () { // define these here so at least they only have to be // compiled once on the first module load. var protocolPattern = /^([a-z0-9]+:)/, portPattern = /:[0-9]+$/, nonHostChars = ['/', '?', ';', '#'], hostlessProtocol = { 'file': true, 'file:': true }, slashedProtocol = { 'http': true, 'https': true, 'ftp': true, 'gopher': true, 'file': true, 'http:': true, 'https:': true, 'ftp:': true, 'gopher:': true, 'file:': true }, // Hack to remove QueryString parsing querystring = null; //require("querystring"); function urlParse(url, slashesDenoteHost) { if (url && typeof(url) === 'object' && url.href) return url; var out = { href: url }, rest = url; var proto = protocolPattern.exec(rest); if (proto) { proto = proto[0]; out.protocol = proto; rest = rest.substr(proto.length); } // figure out if it's got a host // user@server is *always* interpreted as a hostname, and url // resolution will treat //foo/bar as host=foo,path=bar because that's // how the browser resolves relative URLs. if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { var slashes = rest.substr(0, 2) === '//'; if (slashes && !(proto && hostlessProtocol[proto])) { rest = rest.substr(2); out.slashes = true; } } if (!hostlessProtocol[proto] && (slashes || (proto && !slashedProtocol[proto]))) { // there's a hostname. // the first instance of /, ?, ;, or # ends the host. // don't enforce full RFC correctness, just be unstupid about it. var firstNonHost = -1; for (var i = 0, l = nonHostChars.length; i < l; i++) { var index = rest.indexOf(nonHostChars[i]); if (index !== -1 && (firstNonHost < 0 || index < firstNonHost)) firstNonHost = index; } if (firstNonHost !== -1) { out.host = rest.substr(0, firstNonHost); rest = rest.substr(firstNonHost); } else { out.host = rest; rest = ''; } // pull out the auth and port. var p = parseHost(out.host); var keys = Object.keys(p); for (var i = 0, l = keys.length; i < l; i++) { var key = keys[i]; out[key] = p[key]; } // we've indicated that there is a hostname, // so even if it's empty, it has to be present. out.hostname = out.hostname || ''; } // now rest is set to the post-host stuff. // chop off from the tail first. var hash = rest.indexOf('#'); if (hash !== -1) { // got a fragment string. out.hash = rest.substr(hash); rest = rest.slice(0, hash); } var qm = rest.indexOf('?'); if (qm !== -1) { out.search = rest.substr(qm); out.query = rest.substr(qm + 1); /* Remove QueryString parsing if (parseQueryString) { out.query = querystring.parse(out.query); }*/ rest = rest.slice(0, qm); } /* Remove QueryString parsing. else if (parseQueryString) { // no query string, but parseQueryString still requested out.query = {}; }*/ if (rest) out.pathname = rest; return out; } // format a parsed object into a url string function urlFormat(obj) { // ensure it's an object, and not a string url. // If it's an obj, this is a no-op. // this way, you can call url_format() on strings // to clean up potentially wonky urls. if (typeof(obj) === 'string') obj = urlParse(obj); var protocol = obj.protocol || '', host = (obj.host !== undefined) ? obj.host : obj.hostname !== undefined ? ( (obj.auth ? obj.auth + '@' : '') + obj.hostname + (obj.port ? ':' + obj.port : '') ) : false, pathname = obj.pathname || '', search = obj.search; hash = obj.hash || ''; if (protocol && protocol.substr(-1) !== ':') protocol += ':'; // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. // unless they had them to begin with. if (obj.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) { host = '//' + (host || ''); if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; } else if (!host) { host = ''; } if (hash && hash.charAt(0) !== '#') hash = '#' + hash; if (search && search.charAt(0) !== '?') search = '?' + search; return protocol + host + pathname + search + hash; } function urlResolve(source, relative) { return urlFormat(urlResolveObject(source, relative)); } function urlResolveObject(source, relative) { if (!source) return relative; source = urlParse(urlFormat(source), false, true); relative = urlParse(urlFormat(relative), false, true); // hash is always overridden, no matter what. source.hash = relative.hash; if (relative.href === '') return source; // hrefs like //foo/bar always cut to the protocol. if (relative.slashes && !relative.protocol) { relative.protocol = source.protocol; return relative; } if (relative.protocol && relative.protocol !== source.protocol) { // if it's a known url protocol, then changing // the protocol does weird things // first, if it's not file:, then we MUST have a host, // and if there was a path // to begin with, then we MUST have a path. // if it is file:, then the host is dropped, // because that's known to be hostless. // anything else is assumed to be absolute. if (!slashedProtocol[relative.protocol]) return relative; source.protocol = relative.protocol; if (!relative.host && !hostlessProtocol[relative.protocol]) { var relPath = (relative.pathname || '').split('/'); while (relPath.length && !(relative.host = relPath.shift())); if (!relative.host) relative.host = ''; if (relPath[0] !== '') relPath.unshift(''); if (relPath.length < 2) relPath.unshift(''); relative.pathname = relPath.join('/'); } source.pathname = relative.pathname; source.search = relative.search; source.query = relative.query; source.host = relative.host || ''; delete source.auth; delete source.hostname; source.port = relative.port; return source; } var isSourceAbs = (source.pathname && source.pathname.charAt(0) === '/'), isRelAbs = ( relative.host !== undefined || relative.pathname && relative.pathname.charAt(0) === '/' ), mustEndAbs = (isRelAbs || isSourceAbs || (source.host && relative.pathname)), removeAllDots = mustEndAbs, srcPath = source.pathname && source.pathname.split('/') || [], relPath = relative.pathname && relative.pathname.split('/') || [], psychotic = source.protocol && !slashedProtocol[source.protocol] && source.host !== undefined; // if the url is a non-slashed url, then relative // links like ../.. should be able // to crawl up to the hostname, as well. This is strange. // source.protocol has already been set by now. // Later on, put the first path part into the host field. if (psychotic) { delete source.hostname; delete source.auth; delete source.port; if (source.host) { if (srcPath[0] === '') srcPath[0] = source.host; else srcPath.unshift(source.host); } delete source.host; if (relative.protocol) { delete relative.hostname; delete relative.auth; delete relative.port; if (relative.host) { if (relPath[0] === '') relPath[0] = relative.host; else relPath.unshift(relative.host); } delete relative.host; } mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); } if (isRelAbs) { // it's absolute. source.host = (relative.host || relative.host === '') ? relative.host : source.host; source.search = relative.search; source.query = relative.query; srcPath = relPath; // fall through to the dot-handling below. } else if (relPath.length) { // it's relative // throw away the existing file, and take the new path instead. if (!srcPath) srcPath = []; srcPath.pop(); srcPath = srcPath.concat(relPath); source.search = relative.search; source.query = relative.query; } else if ('search' in relative) { // just pull out the search. // like href='?foo'. // Put this after the other two cases because it simplifies the booleans if (psychotic) { source.host = srcPath.shift(); } source.search = relative.search; source.query = relative.query; return source; } if (!srcPath.length) { // no path at all. easy. // we've already handled the other stuff above. delete source.pathname; return source; } // if a url ENDs in . or .., then it must get a trailing slash. // however, if it ends in anything else non-slashy, // then it must NOT get a trailing slash. var last = srcPath.slice(-1)[0]; var hasTrailingSlash = ( (source.host || relative.host) && (last === '.' || last === '..') || last === ''); // strip single dots, resolve double dots to parent dir // if the path tries to go above the root, `up` ends up > 0 var up = 0; for (var i = srcPath.length; i >= 0; i--) { last = srcPath[i]; if (last == '.') { srcPath.splice(i, 1); } else if (last === '..') { srcPath.splice(i, 1); up++; } else if (up) { srcPath.splice(i, 1); up--; } } // if the path is allowed to go above the root, restore leading ..s if (!mustEndAbs && !removeAllDots) { for (; up--; up) { srcPath.unshift('..'); } } if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { srcPath.unshift(''); } if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { srcPath.push(''); } var isAbsolute = srcPath[0] === '' || (srcPath[0] && srcPath[0].charAt(0) === '/'); // put the host back if (psychotic) { source.host = isAbsolute ? '' : srcPath.shift(); } mustEndAbs = mustEndAbs || (source.host && srcPath.length); if (mustEndAbs && !isAbsolute) { srcPath.unshift(''); } source.pathname = srcPath.join('/'); return source; } function parseHost(host) { var out = {}; var at = host.indexOf('@'); if (at !== -1) { out.auth = host.substr(0, at); host = host.substr(at + 1); // drop the @ } var port = portPattern.exec(host); if (port) { port = port[0]; out.port = port.substr(1); host = host.substr(0, host.length - port.length); } if (host) out.hostname = host; return out; } var url = {}; url.parse = urlParse; url.resolve = urlResolve; url.resolveObject = urlResolveObject; url.format = urlFormat; return url; })();
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require("@angular/core"); var modal_dialog_1 = require("nativescript-angular/modal-dialog"); var SelectGenderComponent = (function () { function SelectGenderComponent(params) { this.params = params; this.genders = ["Female", "Male", "Other"]; this.gender = params.context; } SelectGenderComponent.prototype.onDoneTap = function () { this.params.closeCallback(this.genders[this.gender]); }; return SelectGenderComponent; }()); SelectGenderComponent = __decorate([ core_1.Component({ selector: "select-gender", templateUrl: "views/modals/select-gender/select-gender.html", styleUrls: ["views/modals/select-gender/select-gender.css"] }), __metadata("design:paramtypes", [modal_dialog_1.ModalDialogParams]) ], SelectGenderComponent); exports.SelectGenderComponent = SelectGenderComponent; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0LWdlbmRlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzZWxlY3QtZ2VuZGVyLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHNDQUEwQztBQUMxQyxrRUFBc0U7QUFRdEUsSUFBYSxxQkFBcUI7SUFJOUIsK0JBQW9CLE1BQXlCO1FBQXpCLFdBQU0sR0FBTixNQUFNLENBQW1CO1FBRjdDLFlBQU8sR0FBa0IsQ0FBQyxRQUFRLEVBQUUsTUFBTSxFQUFFLE9BQU8sQ0FBQyxDQUFDO1FBR2pELElBQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDLE9BQU8sQ0FBQztJQUNqQyxDQUFDO0lBRUQseUNBQVMsR0FBVDtRQUNJLElBQUksQ0FBQyxNQUFNLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7SUFDekQsQ0FBQztJQUNMLDRCQUFDO0FBQUQsQ0FBQyxBQVhELElBV0M7QUFYWSxxQkFBcUI7SUFOakMsZ0JBQVMsQ0FBQztRQUNULFFBQVEsRUFBRSxlQUFlO1FBQ3pCLFdBQVcsRUFBRSwrQ0FBK0M7UUFDNUQsU0FBUyxFQUFFLENBQUMsOENBQThDLENBQUM7S0FDNUQsQ0FBQztxQ0FNOEIsZ0NBQWlCO0dBSnBDLHFCQUFxQixDQVdqQztBQVhZLHNEQUFxQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCB9IGZyb20gXCJAYW5ndWxhci9jb3JlXCI7XG5pbXBvcnQgeyBNb2RhbERpYWxvZ1BhcmFtcyB9IGZyb20gXCJuYXRpdmVzY3JpcHQtYW5ndWxhci9tb2RhbC1kaWFsb2dcIjtcblxuQENvbXBvbmVudCh7XG4gIHNlbGVjdG9yOiBcInNlbGVjdC1nZW5kZXJcIixcbiAgdGVtcGxhdGVVcmw6IFwidmlld3MvbW9kYWxzL3NlbGVjdC1nZW5kZXIvc2VsZWN0LWdlbmRlci5odG1sXCIsXG4gIHN0eWxlVXJsczogW1widmlld3MvbW9kYWxzL3NlbGVjdC1nZW5kZXIvc2VsZWN0LWdlbmRlci5jc3NcIl1cbn0pXG5cbmV4cG9ydCBjbGFzcyBTZWxlY3RHZW5kZXJDb21wb25lbnQge1xuICAgIGdlbmRlcjogbnVtYmVyO1xuICAgIGdlbmRlcnM6IEFycmF5PHN0cmluZz4gPSBbXCJGZW1hbGVcIiwgXCJNYWxlXCIsIFwiT3RoZXJcIl07IFxuICAgIFxuICAgIGNvbnN0cnVjdG9yKHByaXZhdGUgcGFyYW1zOiBNb2RhbERpYWxvZ1BhcmFtcykgeyBcbiAgICAgICAgdGhpcy5nZW5kZXIgPSBwYXJhbXMuY29udGV4dDsgXG4gICAgfVxuXG4gICAgb25Eb25lVGFwKCk6IGFueSB7XG4gICAgICAgIHRoaXMucGFyYW1zLmNsb3NlQ2FsbGJhY2sodGhpcy5nZW5kZXJzW3RoaXMuZ2VuZGVyXSk7IFxuICAgIH1cbn0iXX0=
const express = require('express') const router = express.Router() // LTS API versions const apiVersions = { "index": "1", "weather": "1", "holidays": "1", "annual": "1", "template": "2", } /* GET template */ router.get('/:api', async (req, res, next) => { let api = req.params.api let response = apiVersions[api] res.json(response) console.log('API/apiversion returned', api, response) console.log(req) }) module.exports = router
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.HSRemoveElement=t():e.HSRemoveElement=t()}(window,function(){return d={"./src/js/hs-remove-element.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return HSRemoveElement; });\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar HSRemoveElement = /*#__PURE__*/function () {\n function HSRemoveElement(elem, settings) {\n _classCallCheck(this, HSRemoveElement);\n\n this.elem = elem;\n this.defaults = {\n targetEl: null,\n beforeDelete: null,\n afterDelete: null\n };\n this.settings = settings;\n }\n\n _createClass(HSRemoveElement, [{\n key: \"init\",\n value: function init() {\n var context = this,\n $el = context.elem,\n dataSettings = $el.attr('data-hs-remove-element-options') ? JSON.parse($el.attr('data-hs-remove-element-options')) : {},\n options = $.extend(true, context.defaults, dataSettings, context.settings);\n\n context._removeElement($el, options);\n }\n }, {\n key: \"_removeElement\",\n value: function _removeElement(el, config) {\n el.on('click', function () {\n if (typeof config.beforeDelete === 'function') {\n var before = config.beforeDelete(el, config);\n if (before === false) return;\n }\n\n $(config.targetEl).remove();\n\n if (typeof config.afterDelete === 'function') {\n config.afterDelete(el, config);\n }\n });\n }\n }]);\n\n return HSRemoveElement;\n}();\n\n\n\n//# sourceURL=webpack://HSRemoveElement/./src/js/hs-remove-element.js?")}},e={},f.m=d,f.c=e,f.d=function(e,t,n){f.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,"a",t),t},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.p="",f(f.s="./src/js/hs-remove-element.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e});
module.exports = { redisConnErr: 'Your system can not work properly due to the Redis can not be detected. Please check whether the Redis server is set up, and listening on port {{port}}.', pageNotFound: 'Page not found.' }
import PropTypes from "prop-types"; import React from "react"; import { FacetValue, FilterValue } from "./types"; import { getFilterValueDisplay } from "./view-helpers"; import { appendClassName } from "./view-helpers"; function SingleLinksFacet({ className, label, onRemove, onSelect, options, values = [] }) { const value = values[0]; return ( <div className={appendClassName("sui-facet", className)}> <div> <div className="sui-facet__title">{label}</div> <ul className="sui-single-option-facet"> {value && ( <li className="sui-single-option-facet__selected"> {getFilterValueDisplay(value)}{" "} <span className="sui-single-option-facet__remove"> ( <a onClick={e => { e.preventDefault(); onRemove(value); }} href="/" > Remove </a> ) </span> </li> )} {!value && options.map(option => ( <li className="sui-single-option-facet__item" key={getFilterValueDisplay(option.value)} > <a className="sui-single-option-facet__link" href="/" onClick={e => { e.preventDefault(); onSelect(option.value); }} > {getFilterValueDisplay(option.value)} </a>{" "} <span className="sui-facet__count">{option.count}</span> </li> ))} </ul> </div> </div> ); } SingleLinksFacet.propTypes = { label: PropTypes.string.isRequired, onRemove: PropTypes.func.isRequired, onSelect: PropTypes.func.isRequired, options: PropTypes.arrayOf(FacetValue).isRequired, values: PropTypes.arrayOf(FilterValue).isRequired, className: PropTypes.string }; export default SingleLinksFacet;
import Vue from 'vue' import App from './App.vue' import router from './router' import store from './store' ///STYLE import 'bootstrap' import 'bootstrap/dist/css/bootstrap.min.css' import './assets/scss/main.scss' Vue.config.productionTip = false new Vue({ router, store, render: h => h(App) }).$mount('#app')
'use strict'; function init() { function onMouseUp() { var outputElem = document.getElementById('output-element'); var outputText = document.getElementById('output-text'); var selectedTextArea = document.activeElement; if (typeof selectedTextArea.value !== 'undefined') { var selection = selectedTextArea.value.substring( selectedTextArea.selectionStart, selectedTextArea.selectionEnd); outputElem.innerHTML = selectedTextArea.id; outputText.innerHTML = selection; } } document.getElementById("ta-example-one").addEventListener("mouseup", onMouseUp, false); document.getElementById("ta-example-two").addEventListener("mouseup", onMouseUp, false); document.getElementById("ta-example-one").addEventListener("keyup", onMouseUp, false); document.getElementById("ta-example-two").addEventListener("keyup", onMouseUp, false); }
/* Copyright (c) 2018-2019 Uber Technologies, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. */ // @flow import * as React from 'react'; import {Button} from '../button/index.js'; import type {ButtonPropsT} from '../button/types.js'; import {mergeOverrides} from '../helpers/overrides.js'; // ModalButtons should have some margin pre-applied const overrides = { BaseButton: { style: ({$theme}) => ({ marginLeft: $theme.sizing.scale500, }), }, }; export default class ModalButton extends React.Component<ButtonPropsT> { static defaultProps = Button.defaultProps; render() { return ( <Button {...this.props} overrides={mergeOverrides(overrides, this.props.overrides)} > {this.props.children} </Button> ); } }
import { refreshFeatures, paginateFeatures, } from '@codetanzania/emis-api-states'; import { Button, Col, Pagination, Row, Checkbox } from 'antd'; import PropTypes from 'prop-types'; import React from 'react'; import { notifyError, notifySuccess } from '../../../../util'; import './styles.css'; /** * @function * @name CriticalInfrastructuresActionBar * @description Render action bar for actions which are applicable to list * content * * @param {object} props props object * @param {number} props.page current page * @param {number} props.total total number of CriticalInfrastructures * @param {Function} props.onFilter function for filtering * CriticalInfrastructures * * @returns {object} React Component * * @version 0.1.0 * @since 0.1.0 */ const CriticalInfrastructuresActionBar = ({ page, total, onFilter }) => ( <div className="CriticalInfrastructuresActionBar"> <Row> <Col span={1} xl={1} className="checkbox"> <Checkbox /> </Col> <Col span={1} xl={1}> <Button shape="circle" icon="reload" title="Refresh critical infrastructure" onClick={() => refreshFeatures( () => { notifySuccess( 'Critical Infrastructures refreshed successfully' ); }, () => { notifyError( `An Error occurred while refreshing Critical Infrastructures, please Critical Infrastructures system administrator!` ); } ) } className="actionButton" size="large" /> </Col> <Col span={1} xl={1}> <Button type="circle" icon="hdd" title="Archive selected critical infrastructure" className="actionButton" size="large" /> </Col> <Col span={1} offset={17} xl={{ span: 1, offset: 16 }} xxl={{ span: 1, offset: 17 }} > <Button type="circle" icon="filter" title="Filter critical infrastructure" className="actionButton" size="large" onClick={onFilter} /> </Col> <Col span={3} xl={4} xxl={3}> <Pagination simple defaultCurrent={page} total={total} onChange={nextPage => paginateFeatures(nextPage)} className="pagination" /> </Col> </Row> </div> ); /* props validation */ CriticalInfrastructuresActionBar.propTypes = { page: PropTypes.number.isRequired, total: PropTypes.number.isRequired, onFilter: PropTypes.func.isRequired, }; export default CriticalInfrastructuresActionBar;
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function () { function a(b, c) { var d = b.lang.placeholder, e = b.lang.common.generalTab; return { title: d.title, minWidth: 300, minHeight: 80, contents: [{ id: 'info', label: e, title: e, elements: [{ id: 'text', type: 'text', style: 'width: 100%;', label: d.text, 'default': '', required: true, validate: CKEDITOR.dialog.validate.notEmpty(d.textMissing), setup: function (f) { if (c)this.setValue(f.getText().slice(2, -2)); }, commit: function (f) { var g = '[[' + this.getValue() + ']]'; CKEDITOR.plugins.placeholder.createPlaceholder(b, f, g); } }] }], onShow: function () { if (c)this._element = CKEDITOR.plugins.placeholder.getSelectedPlaceHoder(b); this.setupContent(this._element); }, onOk: function () { this.commitContent(this._element); delete this._element; } }; }; CKEDITOR.dialog.add('createplaceholder', function (b) { return a(b); }); CKEDITOR.dialog.add('editplaceholder', function (b) { return a(b, 1); }); })();
import pytest from attacut import utils @pytest.mark.parametrize( ("seq", "expected"), [ ( (7, 9, 10), [ (0, 7), (7, 16), (16, 26) ] ), ] ) def test_create_start_stop_indices(seq, expected): act = utils.create_start_stop_indices(seq) assert act == expected def test_add_suffix_to_file_path(): act = utils.add_suffix_to_file_path("something/input.txt", "omg") exp = "something/input-omg.txt" assert act == exp def test_parse_model_params(): act = utils.parse_model_params("emb:32|l1:48|do:0.5") exp = dict(emb=32, l1=48, do=0.5) assert act == exp
import {registerUserInterfaceAware, UserInterfaceAware} from '../UserInterfaceAware' import {changeXpBy, xpPresentation} from '../xpCombo' export class Character extends UserInterfaceAware { userInterface = ['name', 'lvl', 'attributePoints', 'hp', 'hp+', 'ep', 'ep+', 'xp', 'change'] constructor() { super() this.change.setting = true this['hp+'].hidden = true this['ep+'].hidden = true } name = '' essential = 90 lvl = 1 attributePoints = 0 _xp = 0 _maxXp = 50 xpModifier = 1.2 get xp() { return xpPresentation(this._xp, this._maxXp) } _maxHp = 5 _hp = 5 get hp() { return this.renderBar(this._hp, this._maxHp, '♥️', '♡') } ['hp+']() { this.attributePoints -= 1 this._maxHp += 1 this.updateAttributeButtons() } _maxEp = 5 _ep = 5 get ep() { return this.renderBar(this._ep, this._maxEp, '⚡️️', '☼') } ['ep+']() { this.attributePoints -= 1 this._maxEp += 1 this.updateAttributeButtons() } change(name) { this.name = name } renderBar(current, max, filledSymbol, emptySymbol) { let barView = '' for (let i = 0; i < Math.floor(current); i++) { barView += filledSymbol } for (let i = Math.floor(current); i < max; i++) { barView += emptySymbol } //noinspection JSPrimitiveTypeWrapperUsage barView = new String(barView) //noinspection JSPrimitiveTypeWrapperUsage barView.title = `${current}/${max}` return barView } changeHpBy(amount) { this._hp = this.changeBy(this._hp, this._maxHp, amount) } changeEpBy(amount) { this._ep = this.changeBy(this._ep, this._maxEp, amount) } changeXpBy(amount) { const result = changeXpBy(this._xp, amount, this._maxXp, this.xpModifier) this._xp = result.xp this._maxXp = result.maxXp this.attributePoints += result.attributePoints this.lvl += result.lvlIncrease this.updateAttributeButtons() } changeBy(current, max, amount) { return Math.max(0, Math.min(max, current + amount)) } updateAttributeButtons() { if (this.attributePoints > 0) { this['hp+'].hidden = false this['ep+'].hidden = false } else { this['hp+'].hidden = true this['ep+'].hidden = true } } updateAfterLoad() { super.updateAfterLoad() this.updateAttributeButtons() } } registerUserInterfaceAware(Character)
'use strict'; import $ from './jquery'; import * as deprecate from './internal/deprecation'; import * as logger from './internal/log'; import globalize from './internal/globalize'; /** * Support for markup based binder components. Binder components must be objects with the following "interface": * * <pre> * { * selector: "input.foo", * run: function(element) { * //do stuff on given element * } * } * </pre> */ var Binder = (function () { 'use strict'; var binders = {}; return { /** * Runs all the binder components for the given scope, or the document body if none specified. * * @method runBinders * @param scope {Element} element scope to run the binders in */ runBinders: function (scope) { if ($.isEmptyObject(binders)) { logger.log('No binders to run'); return; } scope = scope || document.body; $('*:not(link, script)', scope).each(function (i, element) { var $element = $(element); $.each(binders, function (id, binder) { if (!$element.data(id) && $element.is(binder.selector)) { logger.log('Running binder component: ' + id + ' on element ' + element); $element.data(id, true); // so we don't bind to the same element again later binder.run(element); } }); }); }, /** * Register a binder component with the given id. * @method register */ register: function (id, binder) { binders[id] = binder; }, /** * Unregister a binder component for the given id. * @method unregister */ unregister: function (id) { binders[id] = null; } }; }()); Binder = deprecate.construct(Binder, 'Binder', { sinceVersion: '5.8.0' }); globalize('Binder', Binder); export default Binder;
/** * Copyright 2018 Telerik AD * * 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. */ !function(e){"function"==typeof define&&define.amd?define(["kendo.core.min"],e):e()}(function(){!function(e,y){kendo.cultures.arn={name:"arn",numberFormat:{pattern:["-n"],decimals:2,",":".",".":",",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":".",".":",",groupSize:[3],symbol:"%"},currency:{name:"",abbr:"",pattern:["-$ n","$ n"],decimals:2,",":".",".":",",groupSize:[3],symbol:"$"}},calendars:{standard:{days:{names:["Kiñe Ante","Epu Ante","Kila Ante","Meli Ante","Kechu Ante","Cayu Ante","Regle Ante"],namesAbbr:["Kiñe","Epu","Kila","Meli","Kechu","Cayu","Regle"],namesShort:["kñ","ep","kl","me","ke","ca","re"]},months:{names:["Kiñe Tripantu","Epu","Kila","Meli","Kechu","Cayu","Regle","Purha","Aiya","Marhi","Marhi Kiñe","Marhi Epu"],namesAbbr:["Kiñe Tripantu","Epu","Kila","Meli","Kechu","Cayu","Regle","Purha","Aiya","Marhi","Marhi Kiñe","Marhi Epu"]},AM:[""],PM:[""],patterns:{d:"dd-MM-yyyy",D:"dddd, dd' de 'MMMM' de 'yyyy",F:"dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",g:"dd-MM-yyyy H:mm",G:"dd-MM-yyyy H:mm:ss",m:"d 'de' MMMM",M:"d 'de' MMMM",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"H:mm",T:"H:mm:ss",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM' de 'yyyy",Y:"MMMM' de 'yyyy"},"/":"-",":":":",firstDay:0}}}}(this)}); //# sourceMappingURL=kendo.culture.arn.min.js.map
// * // * Add multiple markers // * 2013 - en.marnoto.com // * // necessary variables var map; var infoWindow; // markersData variable stores the information necessary to each marker var markersData = [ { lat: 27.7089559, lng: 85.2911132, image: "images/slider.jpg", website: "www.website.com", email: "[email protected]", phone: "123456789", address: "kathmandu", type: "city", name: "kathmandu centre", attr1:"kathmandu centre", attr2: "kathmandu centre", postalCode: "00977" // don't insert comma in the last item of each marker }, { lat: 27.696101, lng: 85.353472, image: "images/slider.jpg", website: "www.website.com", email: "[email protected]", phone: "123456789", address: "kathmandu", type: "hospital", name: "Kathmandu Medical College", attr1:"Kathmandu Nepal", attr2: "Bagmati zone", postalCode: "00977" // don't insert comma in the last item of each marker }, { lat: 27.699744, lng: 85.323536, image: "images/slider.jpg", website: "www.website.com", email: "[email protected]", phone: "123456789", address: "kathmandu", type: "Government office", name: "Home ministry office", attr1:"Kathmandu Nepal", attr2: "Bagmati zone", postalCode: "00977" // don't insert comma in the last item of each marker }, { lat: 27.712457, lng: 85.291228, image: "images/slider.jpg", website: "www.website.com", email: "[email protected]", phone: "123456789", address: "kathmandu", type: "hospital", name: "birendra sainik hospital", attr1:"Kathmandu Nepal", attr2: "Bagmati zone", postalCode: "00977" // don't insert comma in the last item of each marker }, { lat: 27.715415, lng: 85.349253, image:"images/slider.jpg", website: "www.website.com", email: "[email protected]", phone: "123456789", address: "kathmandu", type: "temple", name: "pashupati nath", attr1:"Kathmandu Nepal", attr2: "Bagmati zone", postalCode: "00977" // don't insert comma in the last item of each marker } // don't insert comma in the last item ]; function initialize() { var mapOptions = { center: new google.maps.LatLng(27.7089559, 85.2911132), zoom: 16, panControl: false, scrollwheel: false, mapTypeId: 'roadmap', }; map = new google.maps.Map(document.getElementById('map'), mapOptions); // a new Info Window is created infoWindow = new google.maps.InfoWindow(); // Event that closes the Info Window with a click on the map google.maps.event.addListener(map, 'click', function() { infoWindow.close(); }); // Finally displayMarkers() function is called to begin the markers creation displayMarkers(); } google.maps.event.addDomListener(window, 'load', initialize); // This function will iterate over markersData array // creating markers with createMarker function function displayMarkers(){ // this variable sets the map bounds according to markers position var bounds = new google.maps.LatLngBounds(); // for loop traverses markersData array calling createMarker function for each marker for (var i = 0; i < markersData.length; i++){ var latlng = new google.maps.LatLng(markersData[i].lat, markersData[i].lng); var image = markersData[i].image; var website = markersData[i].website; var email = markersData[i].email; var phone = markersData[i].phone; var address = markersData[i].address; var type = markersData[i].type; var name = markersData[i].name; var attr1 = markersData[i].attr1; var attr2 = markersData[i].attr2; var postalCode = markersData[i].postalCode; createMarker(latlng, image, website, email, phone, address, type, name, attr1, attr2, postalCode); // marker position is added to bounds variable bounds.extend(latlng); } // Finally the bounds variable is used to set the map bounds // with fitBounds() function map.fitBounds(bounds); } // This function creates each marker and it sets their Info Window content function createMarker(latlng, image, website, email, phone, address, type, name, attr1, attr2, postalCode){ var markerImage = 'marker.png'; var marker = new google.maps.Marker({ map: map, position: latlng, icon: markerImage, title: name }); // This event expects a click on a marker // When this event is fired the Info Window content is created // and the Info Window is opened. google.maps.event.addListener(marker, 'click', function() { // Creating the content to be inserted in the infowindow var iwContent = '<div class="popup-panel arrow_box" id="popup-container">'+ '<div class="row">'+ '<div class="col-md-6 blog-panel1">'+ '<a href="#" class="thumbnail1">'+ '<img src="'+image+'" alt="popupimage">'+ '</a>'+ '</div>'+ '<div class="fancy col-md-6">' + '<ul class="list-group">'+ '<li class="list-group-item">'+ type +'</li>'+ '<li class="list-group-item">'+ name +'</li>'+ '<li class="list-group-item">'+ attr1 +'</li>'+ '<li class="list-group-item">'+ attr2 +'</li>'+ '<li class="list-group-item">'+ postalCode +'</li>'+ '</ul>'+ '</div>'+ '</div>'+ '<hr class="horz">'+ '<div class="row">'+ '<div class="col-md-12">'+ '<p class="tiny">'+ '<i class="fa fa-info-circle" aria-hidden="true"></i> Website: <a href="#">' +website+ '</a>'+ '| <i class="fa fa-envelope" aria-hidden="true"></i> E-mail: <a href="#">' +email+ '</a>'+ '| <i class="fa fa-phone-square" aria-hidden="true"></i> Contact: <a href="#">' +phone+ '</a>'+ '| <i class="fa fa-home" aria-hidden="true"></i> Address: <a href="#">' +address+ '</a>'+ '</p>'+ '</div>'+ '</div>'+ '<hr class="horz">'+ '<ul class="nav nav-tabs" role="tablist">'+ '<li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Home</a></li>'+ '<li role="presentation"><a href="#about" aria-controls="profile" role="tab" data-toggle="tab">About</a></li>'+ '<li role="presentation"><a href="#profile" aria-controls="messages" role="tab" data-toggle="tab">Profile</a></li>'+ '<li role="presentation"><a href="#others" aria-controls="settings" role="tab" data-toggle="tab">Others</a></li>'+ '</ul>'+ '<!-- Tab panes -->'+ '<div class="tab-content">'+ '<div role="tabpanel" class="tab-pane active" id="home">This is the HOME page.</div>'+ '<div role="tabpanel" class="tab-pane" id="about">This is the ABOUT page..</div>'+ '<div role="tabpanel" class="tab-pane" id="profile">This is the PROFILE page.</div>'+ '<div role="tabpanel" class="tab-pane" id="others">This is the OTHERS page.</div>'+ '</div>'+ '</div>'; // including content to the Info Window. infoWindow.setContent(iwContent); // opening the Info Window in the current map and at the current marker location. infoWindow.open(map, marker); }); }
import React, { useState} from 'react'; import styled from 'styled-components'; import MenuIcon from '@mui/icons-material/Menu'; import { AccessAlarm, ThreeDRotation } from '@mui/icons-material'; import CloseIcon from '@mui/icons-material/Close'; import Email from './Email'; import Section from './Section'; import Home from './Home'; import SectionCopy from './SectionCopy'; function Header() { const [burgerStatus, setBurgerStatus] = useState(false); return ( <Container id='contHeader'> <a> <img src="/images/david.png" alt="logo"/> </a> <Menu> <a href="#inicio">Inicio</a> <a href="#servicios">Servicios</a> <a href="#exposiciones" >Exposiciones</a> </Menu> <MenuRight> <a className='derecho' href="#galeria" >Galería</a> <div className='derecho'/> <a className='derecho' href="#contacto" >Contacto</a> <CustomIcon onClick={()=> setBurgerStatus(true)} /> </MenuRight> <BurgerNav show={burgerStatus} > <CloseWrapper> <CustomClose onClick={()=> setBurgerStatus(false)}/> </CloseWrapper> <li><a href='#inicio'> Inicio </a></li> <li><a href='#servicios'> Servicios </a></li> <li><a href='#exposiciones'> Exposiciones </a></li> <li><a href='#galeria'> Galería </a></li> <li><a href='#contacto'> Contacto </a></li> </BurgerNav> </Container>) } export default Header; const Container = styled.div` min-height: 60px; position: fixed; display: flex; justify-content: space-between; align-items: center; padding: 0px 20px; background-color: black; right: 0; left: 0; top: 0; z-index: 1; a { color:#f0e6e6; } a:hover{ color:rgb(173, 173, 173); } img{ @media(max-width: 470px) { width: 85vw; } } `; const Menu = styled.div` display: flex; align-items: center; justify-content: center; flex: 1; a { font-weight: 600; text-transform: uppercase; padding: 0 10px; flex-wrap: nowrap; } @media(max-width: 960px) { display: none; } `; const MenuRight = styled.div` display: flex; justify-content: center; align-items: center; a { font-weight: 600; text-transform: uppercase; margin-right: 10px; flex-wrap: nowrap; } .derecho { @media(max-width: 650px) { display: none; } } div{ width: 1px; min-height: 18px; background: rgba(220,202,135,1); margin-right: 10px; } transition: 0.5s ease; a:hover { border-bottom: 1px solid rgba(220,202,135,1); } `; const CustomIcon = styled(MenuIcon)` cursor: pointer; color: #f0e6e6; &:hover { color: grey; } `; const BurgerNav = styled.div` position: fixed; list-style-type:none; top: 0; bottom: 0; right: 0; background: #f0e6e6; width: 200px; z-index: 100; a { color: black; text-decoration: none; }; padding: 20px; li{ padding: 10px 0; font-weight: 600; } transform: ${props => props.show ? 'translateX(0)' : 'translateX(100%)'}; transition: transform 0.3s ease; `; const CloseWrapper = styled.div` display: flex; justify-content: flex-end; `; const CustomClose = styled(CloseIcon)` cursor: pointer; `;
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Mar 9 08:30:17 2019 @author: maximoskaliakatsos-papakostas """ ''' Functions for printing information of an idiom. HOW TO RUN: print_idiom(idiom_name, output_file='', mode='all', include='all') For more information SEE FUNCTION print_idiom at the end of the file EXAMPLES: # first import module import idiom_printer as prnt # ex1: printing all idiom info on screen prnt.print_idiom('BachChorales') # ex2: printing all info in files prnt.print_idiom('BachChorales', output_file='BC_info') # ex3: printing single mode info for gcts and markov in files prnt.print_idiom('BachChorales', output_file='BC_major_info', mode='[0, 2, 4, 5, 7, 9, 11]', include=['gcts', 'markov']) INPUTS: - idiom_name: necessary input, the file name of the saved idiom, has to be the same name found in the 'trained_idioms' folder - output_file: if empty, results will not be saved to files but only printed on screen; if not empty, the file name should NOT have extension and multiple file will be generated for lists, matrices and figures - mode: if 'all', information for all modes will be printed (either on screen or in files), else, the exact string of the mode array should be given, e.g. '[0 2 4 5 7 9 11]' for major etc. If not 'all', only A SINGLE mode is accepted as argument - include: if 'all', all information will be printed (either on screen or in files); else, include can be: - 'gcts' - 'markov' - 'cadences' - 'gct_families' - 'markov_families' - 'bbvl' ''' import pickle import os cwd = os.getcwd() import sys sys.path.insert(0, cwd + '/CM_train') sys.path.insert(0, cwd + '/CM_auxiliary') import CM_TR_TrainingIdiom_class as tic import CM_TonalityGrouping_classes as tgc import numpy as np import matplotlib.pyplot as plt def print_gcts(m, output_file): # get necessary elements g = m.gct_info # if no output file is requested if output_file == '': print('GCTs =================================================') for i in range( len( g.gcts_labels ) ): # gcts_labels # gcts_occurances # gcts_probabilities # gcts_relative_pcs print( "{0:20} \t {1}".format(g.gcts_labels[i] + '\t', str(g.gcts_occurances[i])) + '\t' + "{:.4f}".format(g.gcts_probabilities[i]) + '\t' + "{:.4f}".format(g.gcts_initial_probabilities[i]) + '\t' + str(g.gcts_relative_pcs[i]) ) else: with open(output_file+'.txt', 'a') as the_file: the_file.write('GCTs =================================================' + '\n') the_file.write( "{0:20} \t Occ. \t Probs \t Init. \t Relative PCs ".format('Labels') + '\n') for i in range( len( g.gcts_labels ) ): the_file.write( "{0:20} \t {1}".format(g.gcts_labels[i], str(g.gcts_occurances[i])) + '\t' + "{:.4f}".format(g.gcts_probabilities[i]) + '\t' + "{:.4f}".format(g.gcts_initial_probabilities[i]) + '\t' + str(g.gcts_relative_pcs[i]) + '\n' ) # end print_gcts def print_gct_families(m, output_file): # get necessary elements g = m.gct_group_info # if no output file is requested if output_file == '': print('GCT families ==========================================') for i in range( len( g.gcts_labels ) ): # gcts_labels # gcts_occurances # gcts_probabilities # gcts_relative_pcs print( "{0:20} \t {1}".format(g.gcts_labels[i] + '\t', str(g.gcts_occurances[i])) + '\n' ) else: with open(output_file+'.txt', 'a') as the_file: the_file.write('GCT families ======================================' + '\n') the_file.write( "{0:20} \t Occ. ".format('Labels') + '\n') for i in range( len( g.gcts_labels ) ): the_file.write( "{0:20} \t {1}".format(g.gcts_labels[i], str(g.gcts_occurances[i])) + '\n' ) # print membership dictionary the_file.write( 'Membership:' +'\n' ) memb_dict = g.gcts_membership_dictionary memb_keys = list( memb_dict.keys() ) for i in range( len( memb_keys ) ): the_file.write( "{0:20}:".format( memb_keys[i] ) ) members = memb_dict[ memb_keys[i] ].members for j in range( len(members) ): # skip first - its the representative printed above if j > 0: the_file.write( members[j] + '\t' ) the_file.write( '\n' ) # end print_gct_families def print_cadences(m, output_file): # types of cadences cad_type = ['final', 'intermediate'] for ct in range( len( cad_type ) ): # get necessary elements c = m.cadences[cad_type[ct]] # if no output file is requested if output_file == '': print('Cadences ' + cad_type[ct] + ' ==========================================') for i in range( len( c.cadence_labels ) ): # gcts_labels # gcts_occurances # gcts_probabilities # gcts_relative_pcs print( "{0:20} \t {1}".format(c.cadence_labels[i] + '\t', str(c.cadence_occurances[i])) + '\t' + "{:.4f}".format(c.cadence_probabilities[i]) + '\n' ) else: with open(output_file+'.txt', 'a') as the_file: the_file.write('Cadences ' + cad_type[ct] + ' ==========================================' + '\n') the_file.write( "{0:30} \t Occ. \t Probs".format('Labels') + '\n') for i in range( len( c.cadence_labels ) ): the_file.write( "{0:20} \t {1}".format(c.cadence_labels[i] + '\t', str(c.cadence_occurances[i])) + '\t' + "{:.4f}".format(c.cadence_probabilities[i]) + '\n' ) # end print_cadences def print_markov(m, output_file): # get necessary elements g = m.gct_info tmpfig = plt.figure(figsize=(10, 10), dpi=300) plt.imshow(g.gcts_markov, cmap='gray_r', interpolation='none'); plt.xticks(range(len(g.gcts_labels)), g.gcts_labels, rotation='vertical') plt.yticks(range(len(g.gcts_labels)), g.gcts_labels) tmpfig.savefig(output_file + '.png', format='png', dpi=300, bbox_inches="tight") plt.clf() # end print_markov def print_markov_families(m, output_file): # get necessary elements g = m.gct_group_info tmpfig = plt.figure(figsize=(10, 10), dpi=300) plt.imshow(g.gcts_markov, cmap='gray_r', interpolation='none'); plt.xticks(range(len(g.gcts_labels)), g.gcts_labels, rotation='vertical') plt.yticks(range(len(g.gcts_labels)), g.gcts_labels) tmpfig.savefig(output_file + '_families.png', format='png', dpi=300, bbox_inches="tight") plt.clf() # end print_markov_families def print_element(m, output_file, el): # if no output file is requested if output_file == '': print('Printing: ', el) if el == 'gcts': print_gcts(m, output_file) elif el == 'gct_families': print_gct_families(m, output_file) elif el == 'markov': print('markov') elif el == 'cadences': print_cadences(m, output_file) elif el == 'markov_families': print('markov_families') elif el == 'bbvl': print('bbvl') else: print('this is NOT supposed to be printed!') else: with open(output_file+'.txt', 'a') as the_file: the_file.write('Printing: '+el+'\n' ) print('Printing: ', el) if el == 'gcts': print_gcts(m, output_file) elif el == 'gct_families': print_gct_families(m, output_file) elif el == 'markov': print_markov(m, output_file) elif el == 'cadences': print_cadences(m, output_file) elif el == 'markov_families': print_markov_families(m, output_file) elif el == 'bbvl': print('bbvl') else: print('this is NOT supposed to be printed!') # end print_element def print_mode( m, output_file, include ): print('printing mode: ', m.mode_name) print('printing info for: ', include) print('in output file: ', output_file) elements = ['gcts', 'markov', 'cadences', 'gct_families', 'markov_families'] # elements = ['gcts', 'markov', 'cadences', 'gct_families', 'markov_families', 'bbvl'] # check if file has not been requested if output_file == '': print('Mode: ', m.mode_name) else: # initialise file - make a clean file so other functions can append with open(output_file+'.txt', 'a') as the_file: the_file.write('Mode: '+m.mode_name+'\n') # check which elements have been requested if include == 'all': # print all elements for mode for el in elements: print_element( m, output_file, el) else: for el in include: # check if user given element not in list if el not in elements: print('Element: ', el, ' not in understood.') print('Currently understanding the following elements: ', elements) else: print_element( m, output_file, el) # end print_mode def print_idiom(idiom_name, output_file='', mode='all', include='all'): ''' INPUTS: - idiom_name: necessary input, the file name of the saved idiom, has to be the same name found in the 'trained_idioms' folder - output_file: if empty, results will not be saved to files but only printed on screen; if not empty, the file name should NOT have extension and multiple file will be generated for lists, matrices and figures - mode: if 'all', information for all modes will be printed (either on screen or in files), else, the exact string of the mode array should be given, e.g. '[0 2 4 5 7 9 11]' for major etc. If not 'all', only A SINGLE mode is accepted as argument - include: if 'all', all information will be printed (either on screen or in files); else, include can be: - 'gcts' - 'markov' - 'cadences' - 'gct_families' - 'markov_families' - 'bbvl' OUTPUTS: - NO OUTPUT ''' # load idiom with open(cwd+'/trained_idioms/'+idiom_name+'.pickle', 'rb') as handle: idiom = pickle.load(handle) # check if file has not been requested if output_file == '': print('Printing begins: ') else: # make a folder to put every produced file in folder_name = cwd+os.sep+'IDIOM_LOG'+os.sep+output_file+os.sep if not os.path.exists(folder_name): os.makedirs( folder_name ) # append path to output file name output_file = folder_name+output_file # initialise file - make a clean file so other functions can append with open(output_file+'.txt', 'w') as the_file: the_file.write('File initialisation\n') # get all modes of idiom modes = list( idiom.modes.keys() ) # check if specific mode needs to be printed if mode == 'all': print('DEBUG - printing all modes') # print for all modes for m_id in modes: # get mode m = idiom.modes[ m_id ] # print information from mode print_mode( m, output_file, include ) else: # if not all modes are give, check if given mode in list if mode in modes: print('DEBUG - printing selected mode') m = idiom.modes[ mode ] print_mode( m, output_file, include ) else: print('error: given mode not in list') print('given mode is: ', mode) print('available modes for selected idiom are:', modes) return idiom # end print_idiom
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Train a network across multiple GPUs. """ import contextlib import logging import sys import time from argparse import Namespace from itertools import chain from typing import Any, Dict, List import torch from fairseq import checkpoint_utils, distributed_utils, models, optim, utils from fairseq.dataclass.configs import FairseqConfig from fairseq.dataclass.utils import convert_namespace_to_omegaconf from fairseq.file_io import PathManager from fairseq.logging import meters, metrics from fairseq.nan_detector import NanDetector from fairseq.optim import lr_scheduler logger = logging.getLogger(__name__) class Trainer(object): """Main class for data parallel training. This class supports synchronous distributed data parallel training, where multiple workers each have a full model replica and gradients are accumulated across workers before each update. We use :class:`~torch.nn.parallel.DistributedDataParallel` to handle communication of the gradients across workers. """ def __init__(self, cfg: FairseqConfig, task, model, criterion, quantizer=None): if isinstance(cfg, Namespace): logger.warning( "argparse.Namespace configuration is deprecated! Automatically converting to OmegaConf" ) cfg = convert_namespace_to_omegaconf(cfg) self.cfg = cfg self.task = task # catalog shared parameters shared_params = _catalog_shared_params(model) self.tpu = cfg.common.tpu self.cuda = torch.cuda.is_available() and not cfg.common.cpu and not self.tpu if self.cuda: self.device = torch.device("cuda") elif self.tpu: self.device = utils.get_tpu_device() else: self.device = torch.device("cpu") # copy model and criterion to current device/dtype self._criterion = criterion self._model = model if cfg.common.fp16: self._criterion = self._criterion.half() self._model = self._model.half() elif cfg.common.bf16: self._criterion = self._criterion.to(dtype=torch.bfloat16) self._model = self._model.to(dtype=torch.bfloat16) if not cfg.distributed_training.pipeline_model_parallel: self._criterion = self._criterion.to(device=self.device) self._model = self._model.to(device=self.device) self.pipeline_model_parallel = cfg.distributed_training.pipeline_model_parallel self.last_device = None if self.cuda and self.pipeline_model_parallel: self.last_device = torch.device( cfg.distributed_training.pipeline_devices[-1] ) # check that shared parameters are preserved after device transfer for shared_param in shared_params: ref = _get_module_by_path(self._model, shared_param[0]) for path in shared_param[1:]: logger.info( "detected shared parameter: {} <- {}".format(shared_param[0], path) ) _set_module_by_path(self._model, path, ref) self._dummy_batch = None # indicates we don't have a dummy batch at first self._lr_scheduler = None self._num_updates = 0 self._num_xla_compiles = 0 # for TPUs self._optim_history = None self._optimizer = None self._warn_once = set() self._wrapped_criterion = None self._wrapped_model = None # TODO(myleott): support tpu if self.cuda and self.data_parallel_world_size > 1: self._grad_norm_buf = torch.cuda.DoubleTensor(self.data_parallel_world_size) else: self._grad_norm_buf = None self.quantizer = quantizer if self.quantizer is not None: self.quantizer.set_trainer(self) # get detailed cuda environment if self.cuda: self.cuda_env = utils.CudaEnvironment() if self.data_parallel_world_size > 1: self.cuda_env_arr = distributed_utils.all_gather_list( self.cuda_env, group=distributed_utils.get_global_group() ) else: self.cuda_env_arr = [self.cuda_env] if self.data_parallel_rank == 0: utils.CudaEnvironment.pretty_print_cuda_env_list(self.cuda_env_arr) else: self.cuda_env = None self.cuda_env_arr = None metrics.log_start_time("wall", priority=790, round=0) self._start_time = time.time() self._previous_training_time = 0 self._cumulative_training_time = None def reinitialize(self): """Reinitialize the Trainer, typically after model params change.""" self._lr_scheduler = None self._optimizer = None self._wrapped_criterion = None self._wrapped_model = None @property def data_parallel_world_size(self): if self.cfg.distributed_training.distributed_world_size == 1: return 1 return distributed_utils.get_data_parallel_world_size() @property def data_parallel_process_group(self): return distributed_utils.get_data_parallel_group() @property def data_parallel_rank(self): if self.cfg.distributed_training.distributed_world_size == 1: return 0 return distributed_utils.get_data_parallel_rank() @property def is_data_parallel_master(self): # NOTE: this returns true for all model parallel replicas with data # parallel rank 0 return self.data_parallel_rank == 0 @property def criterion(self): if self._wrapped_criterion is None: if ( utils.has_parameters(self._criterion) and self.data_parallel_world_size > 1 and not self.cfg.optimization.use_bmuf ): self._wrapped_criterion = models.DistributedFairseqModel( self.cfg.distributed_training, self._criterion, process_group=self.data_parallel_process_group, ) else: self._wrapped_criterion = self._criterion return self._wrapped_criterion @property def model(self): if self._wrapped_model is None: if self.data_parallel_world_size > 1 and not self.cfg.optimization.use_bmuf: self._wrapped_model = models.DistributedFairseqModel( self.cfg.distributed_training, self._model, process_group=self.data_parallel_process_group, ) else: self._wrapped_model = self._model return self._wrapped_model @property def optimizer(self): if self._optimizer is None: self._build_optimizer() return self._optimizer @property def lr_scheduler(self): if self._lr_scheduler is None: self._build_optimizer() # this will initialize self._lr_scheduler return self._lr_scheduler def _build_optimizer(self): params = list( filter( lambda p: p.requires_grad, chain(self.model.parameters(), self.criterion.parameters()), ) ) if self.cfg.optimizer._name == 'multi': params = [ [param for name, param in self.model.named_parameters() if 'head_ffn' not in name and param.requires_grad], [param for name, param in self.model.named_parameters() if 'head_ffn' in name and param.requires_grad] ] if self.cfg.common.fp16 or self.cfg.common.bf16: if self.cuda and torch.cuda.get_device_capability(0)[0] < 7: logger.info( "NOTE: your device does NOT support faster training with --fp16, " "please switch to FP32 which is likely to be faster" ) if ( self.cfg.common.memory_efficient_fp16 or self.cfg.common.memory_efficient_bf16 ): self._optimizer = optim.MemoryEfficientFP16Optimizer.build_optimizer( self.cfg, params ) else: self._optimizer = optim.FP16Optimizer.build_optimizer(self.cfg, params) else: if self.cuda and torch.cuda.get_device_capability(0)[0] >= 7: logger.info("NOTE: your device may support faster training with --fp16") self._optimizer = optim.build_optimizer(self.cfg.optimizer, params) if self.cfg.optimization.use_bmuf: self._optimizer = optim.FairseqBMUF( self.cfg.bmuf, self._optimizer, ) if self.cfg.distributed_training.zero_sharding == "os": if ( self.cfg.common.fp16 and not self.cfg.common.memory_efficient_fp16 and not self.cfg.common.memory_efficient_bf16 ) and not self.cfg.common.fp16_no_flatten_grads: raise ValueError( "ZeRO is incomptabile with fp16 and flattened grads. " "Please use --fp16-no-flatten-grads" ) else: optim.shard_(self._optimizer, self.data_parallel_process_group) # We should initialize the learning rate scheduler immediately after # building the optimizer, so that the initial learning rate is set. self._lr_scheduler = lr_scheduler.build_lr_scheduler( self.cfg.lr_scheduler, self.optimizer, ) self._lr_scheduler.step_update(0) def consolidate_optimizer(self): """For OSS, we need to consolidate the state dict.""" if hasattr(self.optimizer.optimizer, "consolidate_state_dict"): self.optimizer.optimizer.consolidate_state_dict() def save_checkpoint(self, filename, extra_state): """Save all training state in a checkpoint file.""" if self.is_data_parallel_master: # only save one checkpoint extra_state["metrics"] = metrics.state_dict() extra_state["previous_training_time"] = self.cumulative_training_time() checkpoint_utils.save_state( filename, self.cfg, self.get_model().state_dict(), self.get_criterion(), self.optimizer, self.lr_scheduler, self.get_num_updates(), self._optim_history, extra_state, ) logger.info(f"Finished saving checkpoint to {filename}") def load_checkpoint( self, filename, reset_optimizer=False, reset_lr_scheduler=False, optimizer_overrides=None, reset_meters=False, ): """ Load all training state from a checkpoint file. rank = 0 will load the checkpoint, and then broadcast it to all other ranks. """ extra_state, self._optim_history, last_optim_state = None, [], None logger.info(f"Preparing to load checkpoint {filename}") is_distributed = self.data_parallel_world_size > 1 bexists = PathManager.isfile(filename) if bexists: load_on_all_ranks = ( self.cfg.checkpoint.load_checkpoint_on_all_dp_ranks # TPUs don't support broadcast yet, so load checkpoints # on every worker for now or self.tpu ) if load_on_all_ranks or self.data_parallel_rank == 0: state = checkpoint_utils.load_checkpoint_to_cpu( filename, load_on_all_ranks=load_on_all_ranks ) last_optim_state = state.get("last_optimizer_state", None) # If doing zero_sharding, do not broadcast global optimizer # state. Later we will broadcast sharded states to each rank # to avoid memory from exploding. if ( not load_on_all_ranks and self.cfg.distributed_training.zero_sharding == "os" and "last_optimizer_state" in state and is_distributed ): state["last_optimizer_state"] = "SHARDED" else: last_optim_state = None state = None if is_distributed and not load_on_all_ranks: state = distributed_utils.broadcast_object( state, src_rank=0, group=self.data_parallel_process_group, dist_device=self.device, ) if self.data_parallel_rank > 0: last_optim_state = state.get("last_optimizer_state", None) # load model parameters try: self.get_model().load_state_dict( state["model"], strict=True, model_cfg=self.cfg.model ) if utils.has_parameters(self.get_criterion()): self.get_criterion().load_state_dict( state["criterion"], strict=True ) except Exception: raise Exception( "Cannot load model parameters from checkpoint {}; " "please ensure that the architectures match.".format(filename) ) extra_state = state["extra_state"] self._optim_history = state["optimizer_history"] if last_optim_state is not None and not reset_optimizer: # rebuild optimizer after loading model, since params may have changed self._build_optimizer() # only reload optimizer and lr_scheduler if they match last_optim = self._optim_history[-1] assert ( last_optim["criterion_name"] == self.get_criterion().__class__.__name__ ), "Criterion does not match; please reset the optimizer (--reset-optimizer)." assert ( last_optim["optimizer_name"] == self.optimizer.__class__.__name__ ), "Optimizer does not match; please reset the optimizer (--reset-optimizer)." if not reset_lr_scheduler: self.lr_scheduler.load_state_dict(last_optim["lr_scheduler_state"]) if not load_on_all_ranks and is_distributed: last_optim_state = self.optimizer.broadcast_global_state_dict( last_optim_state ) self.optimizer.load_state_dict(last_optim_state, optimizer_overrides) self.set_num_updates(last_optim["num_updates"]) if extra_state is not None: epoch = extra_state["train_iterator"]["epoch"] if "previous_training_time" in extra_state: self._previous_training_time = extra_state["previous_training_time"] self._start_time = time.time() self.lr_step(epoch) if "metrics" in extra_state and not reset_meters: metrics.load_state_dict(extra_state["metrics"]) # reset TimeMeters, since their start times don't make sense anymore for meter in metrics.get_meters("default"): if isinstance(meter, meters.TimeMeter): meter.reset() logger.info( "Loaded checkpoint {} (epoch {} @ {} updates)".format( filename, epoch, self.get_num_updates() ) ) else: logger.info("No existing checkpoint found {}".format(filename)) return extra_state def get_train_iterator( self, epoch, combine=True, load_dataset=True, data_selector=None, shard_batch_itr=True, disable_iterator_cache=False, ): """Return an EpochBatchIterator over the training set for a given epoch.""" if load_dataset: logger.info("loading train data for epoch {}".format(epoch)) self.task.load_dataset( self.cfg.dataset.train_subset, epoch=epoch, combine=combine, data_selector=data_selector, ) batch_iterator = self.task.get_batch_iterator( dataset=self.task.dataset(self.cfg.dataset.train_subset), max_tokens=self.cfg.dataset.max_tokens, max_sentences=self.cfg.dataset.batch_size, max_positions=utils.resolve_max_positions( self.task.max_positions(), self.model.max_positions(), self.cfg.dataset.max_tokens, ), ignore_invalid_inputs=True, required_batch_size_multiple=self.cfg.dataset.required_batch_size_multiple, seed=self.cfg.common.seed, num_shards=self.data_parallel_world_size if shard_batch_itr else 1, shard_id=self.data_parallel_rank if shard_batch_itr else 0, num_workers=self.cfg.dataset.num_workers, epoch=epoch, data_buffer_size=self.cfg.dataset.data_buffer_size, disable_iterator_cache=disable_iterator_cache, ) self.reset_dummy_batch(batch_iterator.first_batch) return batch_iterator def get_valid_iterator( self, subset, disable_iterator_cache=False, ): """Return an EpochBatchIterator over given validation subset for a given epoch.""" batch_iterator = self.task.get_batch_iterator( dataset=self.task.dataset(subset), max_tokens=self.cfg.dataset.max_tokens_valid, max_sentences=self.cfg.dataset.batch_size_valid, max_positions=utils.resolve_max_positions( self.task.max_positions(), self.model.max_positions(), ), ignore_invalid_inputs=self.cfg.dataset.skip_invalid_size_inputs_valid_test, required_batch_size_multiple=self.cfg.dataset.required_batch_size_multiple, seed=self.cfg.common.seed, num_shards=self.data_parallel_world_size, shard_id=self.data_parallel_rank, num_workers=self.cfg.dataset.num_workers, data_buffer_size=self.cfg.dataset.data_buffer_size, disable_iterator_cache=disable_iterator_cache, ) self.reset_dummy_batch(batch_iterator.first_batch) return batch_iterator def begin_epoch(self, epoch): """Called at the beginning of each epoch.""" logger.info("begin training epoch {}".format(epoch)) self.lr_step_begin_epoch(epoch) if self.quantizer is not None: self.quantizer.begin_epoch(epoch) # task specific setup per epoch self.task.begin_epoch(epoch, self.get_model()) if self.tpu: import torch_xla.core.xla_model as xm xm.rendezvous("begin_epoch") # wait for all workers xm.mark_step() def begin_valid_epoch(self, epoch): """Called at the beginning of each validation epoch.""" # task specific setup per validation epoch self.task.begin_valid_epoch(epoch, self.get_model()) def reset_dummy_batch(self, batch): self._dummy_batch = batch @metrics.aggregate("train") def train_step(self, samples, raise_oom=False): """Do forward, backward and parameter update.""" self._set_seed() self.model.train() self.criterion.train() self.zero_grad() metrics.log_start_time("train_wall", priority=800, round=0) # forward and backward pass logging_outputs, sample_size, ooms = [], 0, 0 for i, sample in enumerate(samples): sample, is_dummy_batch = self._prepare_sample(sample) def maybe_no_sync(): """ Whenever *samples* contains more than one mini-batch, we want to accumulate gradients locally and only call all-reduce in the last backwards pass. """ if ( self.data_parallel_world_size > 1 and hasattr(self.model, "no_sync") and i < len(samples) - 1 ): return self.model.no_sync() else: return contextlib.ExitStack() # dummy contextmanager try: with maybe_no_sync(): # forward and backward loss, sample_size_i, logging_output = self.task.train_step( sample=sample, model=self.model, criterion=self.criterion, optimizer=self.optimizer, update_num=self.get_num_updates(), ignore_grad=is_dummy_batch, ) del loss logging_outputs.append(logging_output) sample_size += sample_size_i # emptying the CUDA cache after the first step can # reduce the chance of OOM if self.cuda and self.get_num_updates() == 0: torch.cuda.empty_cache() except RuntimeError as e: if "out of memory" in str(e): self._log_oom(e) if raise_oom: raise e logger.warning( "attempting to recover from OOM in forward/backward pass" ) ooms += 1 self.zero_grad() if self.cuda: torch.cuda.empty_cache() if self.cfg.distributed_training.distributed_world_size == 1: return None else: raise e if self.tpu and i < len(samples) - 1: # tpu-comment: every XLA operation before marking step is # appended to the IR graph, and processing too many batches # before marking step can lead to OOM errors. # To handle gradient accumulation use case, we explicitly # mark step here for every forward pass without a backward pass import torch_xla.core.xla_model as xm xm.mark_step() if is_dummy_batch: if torch.is_tensor(sample_size): sample_size.zero_() else: sample_size *= 0.0 if torch.is_tensor(sample_size): sample_size = sample_size.float() else: sample_size = float(sample_size) # gather logging outputs from all replicas if self._sync_stats(): train_time = self._local_cumulative_training_time() logging_outputs, ( sample_size, ooms, total_train_time, ) = self._aggregate_logging_outputs( logging_outputs, sample_size, ooms, train_time, ignore=is_dummy_batch, ) self._cumulative_training_time = ( total_train_time / self.data_parallel_world_size ) overflow = False try: with torch.autograd.profiler.record_function("reduce-grads"): self.optimizer.all_reduce_grads(self.model) if utils.has_parameters(self.criterion): self.optimizer.all_reduce_grads(self.criterion) with torch.autograd.profiler.record_function("multiply-grads"): # multiply gradients by (data_parallel_size / sample_size) since # DDP already normalizes by the number of data parallel workers. # Thus we get (sum_of_gradients / sample_size) at the end. if not self.cfg.optimization.use_bmuf: self.optimizer.multiply_grads( self.data_parallel_world_size / sample_size ) elif sample_size > 0: # BMUF needs to check sample size num = self.data_parallel_world_size if self._sync_stats() else 1 self.optimizer.multiply_grads(num / sample_size) with torch.autograd.profiler.record_function("clip-grads"): # clip grads grad_norm = self.clip_grad_norm(self.cfg.optimization.clip_norm) # check that grad norms are consistent across workers # on tpu check tensor is slow if not self.tpu: if ( not self.cfg.optimization.use_bmuf and self.cfg.distributed_training.distributed_wrapper != "SlowMo" ): self._check_grad_norms(grad_norm) if not torch.isfinite(grad_norm).all(): # check local gradnorm single GPU case, trigger NanDetector raise FloatingPointError("gradients are Nan/Inf") with torch.autograd.profiler.record_function("optimizer"): # take an optimization step self.task.optimizer_step( self.optimizer, model=self.model, update_num=self.get_num_updates() ) except FloatingPointError: # re-run the forward and backward pass with hooks attached to print # out where it fails self.zero_grad() with NanDetector(self.get_model()): for _, sample in enumerate(samples): sample, _ = self._prepare_sample(sample) self.task.train_step( sample, self.model, self.criterion, self.optimizer, self.get_num_updates(), ignore_grad=False, ) raise except OverflowError as e: overflow = True logger.info("NOTE: overflow detected, " + str(e)) grad_norm = torch.tensor(0.0).cuda() self.zero_grad() except RuntimeError as e: if "out of memory" in str(e): self._log_oom(e) logger.error("OOM during optimization, irrecoverable") raise e # Some distributed wrappers (e.g., SlowMo) need access to the optimizer after the step if hasattr(self.model, "perform_additional_optimizer_actions"): if hasattr(self.optimizer, "fp32_params"): self.model.perform_additional_optimizer_actions( self.optimizer.optimizer, self.optimizer.fp32_params ) else: self.model.perform_additional_optimizer_actions( self.optimizer.optimizer ) logging_output = None if ( not overflow or self.cfg.distributed_training.distributed_wrapper == "SlowMo" ): self.set_num_updates(self.get_num_updates() + 1) if self.tpu: # mark step on TPUs import torch_xla.core.xla_model as xm xm.mark_step() # only log stats every log_interval steps # this causes wps to be misreported when log_interval > 1 logging_output = {} if self.get_num_updates() % self.cfg.common.log_interval == 0: # log memory usage mem_info = xm.get_memory_info(self.device) gb_free = mem_info["kb_free"] / 1024 / 1024 gb_total = mem_info["kb_total"] / 1024 / 1024 metrics.log_scalar( "gb_free", gb_free, priority=1500, round=1, weight=0, ) metrics.log_scalar( "gb_total", gb_total, priority=1600, round=1, weight=0, ) logging_output = self._reduce_and_log_stats( logging_outputs, sample_size, grad_norm, ) # log whenever there's an XLA compilation, since these # slow down training and may indicate opportunities for # optimization self._check_xla_compilation() else: # log stats logging_output = self._reduce_and_log_stats( logging_outputs, sample_size, grad_norm, ) # clear CUDA cache to reduce memory fragmentation if ( self.cuda and self.cfg.common.empty_cache_freq > 0 and ( (self.get_num_updates() + self.cfg.common.empty_cache_freq - 1) % self.cfg.common.empty_cache_freq ) == 0 ): torch.cuda.empty_cache() if self.cfg.common.fp16: metrics.log_scalar( "loss_scale", self.optimizer.scaler.loss_scale, priority=700, round=4, weight=0, ) metrics.log_stop_time("train_wall") return logging_output @metrics.aggregate("valid") def valid_step(self, sample, raise_oom=False): """Do forward pass in evaluation mode.""" if self.tpu: import torch_xla.core.xla_model as xm xm.rendezvous("valid_step") # wait for all workers xm.mark_step() with torch.no_grad(): self.model.eval() self.criterion.eval() sample, is_dummy_batch = self._prepare_sample(sample) try: _loss, sample_size, logging_output = self.task.valid_step( sample, self.model, self.criterion ) except RuntimeError as e: if "out of memory" in str(e): self._log_oom(e) if not raise_oom: logger.warning( "ran out of memory in validation step, retrying batch" ) for p in self.model.parameters(): if p.grad is not None: p.grad = None # free some memory if self.cuda: torch.cuda.empty_cache() return self.valid_step(sample, raise_oom=True) raise e logging_outputs = [logging_output] if is_dummy_batch: if torch.is_tensor(sample_size): sample_size.zero_() else: sample_size *= 0.0 # gather logging outputs from all replicas if self.data_parallel_world_size > 1: logging_outputs, (sample_size,) = self._aggregate_logging_outputs( logging_outputs, sample_size, ignore=is_dummy_batch, ) # log validation stats logging_output = self._reduce_and_log_stats(logging_outputs, sample_size) return logging_output def zero_grad(self): self.optimizer.zero_grad() def lr_step_begin_epoch(self, epoch): """Adjust the learning rate at the beginning of the epoch.""" self.lr_scheduler.step_begin_epoch(epoch) # prefer updating the LR based on the number of steps return self.lr_step_update() def lr_step(self, epoch, val_loss=None): """Adjust the learning rate at the end of the epoch.""" self.lr_scheduler.step(epoch, val_loss) # prefer updating the LR based on the number of steps return self.lr_step_update() def lr_step_update(self): """Update the learning rate after each update.""" new_lr = self.lr_scheduler.step_update(self.get_num_updates()) if isinstance(new_lr, dict): for k, v in new_lr.items(): metrics.log_scalar(f"lr_{k}", v, weight=0, priority=300) new_lr = new_lr.get("default", next(iter(new_lr.values()))) else: metrics.log_scalar("lr", new_lr, weight=0, priority=300) return new_lr def get_lr(self): """Get the current learning rate.""" return self.optimizer.get_lr() def get_model(self): """Get the (non-wrapped) model instance.""" return self._model def get_criterion(self): """Get the (non-wrapped) criterion instance.""" return self._criterion def get_meter(self, name): """[deprecated] Get a specific meter by name.""" from fairseq import meters if "get_meter" not in self._warn_once: self._warn_once.add("get_meter") utils.deprecation_warning( "Trainer.get_meter is deprecated. Please use fairseq.metrics instead." ) train_meters = metrics.get_meters("train") if train_meters is None: train_meters = {} if name == "train_loss" and "loss" in train_meters: return train_meters["loss"] elif name == "train_nll_loss": # support for legacy train.py, which assumed this meter is # always initialized m = train_meters.get("nll_loss", None) return m or meters.AverageMeter() elif name == "wall": # support for legacy train.py, which assumed this meter is # always initialized m = metrics.get_meter("default", "wall") return m or meters.TimeMeter() elif name == "wps": m = metrics.get_meter("train", "wps") return m or meters.TimeMeter() elif name in {"valid_loss", "valid_nll_loss"}: # support for legacy train.py, which assumed these meters # are always initialized k = name[len("valid_") :] m = metrics.get_meter("valid", k) return m or meters.AverageMeter() elif name == "oom": return meters.AverageMeter() elif name in train_meters: return train_meters[name] return None def get_num_updates(self): """Get the number of parameters updates.""" return self._num_updates def set_num_updates(self, num_updates): """Set the number of parameters updates.""" self._num_updates = num_updates self.lr_step_update() if self.quantizer: self.quantizer.step_update(self._num_updates) metrics.log_scalar("num_updates", self._num_updates, weight=0, priority=200) def clip_grad_norm(self, clip_norm): return self.optimizer.clip_grad_norm(clip_norm, aggregate_norm_fn=None) def cumulative_training_time(self): if self._cumulative_training_time is None: # single GPU return self._local_cumulative_training_time() else: return self._cumulative_training_time def _local_cumulative_training_time(self): """Aggregate training time in seconds.""" return time.time() - self._start_time + self._previous_training_time def _prepare_sample(self, sample, is_dummy=False): if sample == "DUMMY": raise Exception( "Trying to use an uninitialized 'dummy' batch. This usually indicates " "that the total number of batches is smaller than the number of " "participating GPUs. Try reducing the batch size or using fewer GPUs." ) if sample is None or len(sample) == 0: assert ( self._dummy_batch is not None and len(self._dummy_batch) > 0 ), "Invalid dummy batch: {}".format(self._dummy_batch) sample, _ = self._prepare_sample(self._dummy_batch, is_dummy=True) return sample, True if self.cuda: if self.pipeline_model_parallel: if "target" in sample: sample["target"] = utils.move_to_cuda( sample["target"], device=self.last_device ) else: sample = utils.move_to_cuda(sample) elif self.tpu and is_dummy: # the dummy batch may not be on the appropriate device sample = utils.move_to_cuda(sample, device=self.device) def apply_half(t): if t.dtype is torch.float32: return t.half() return t def apply_bfloat16(t): if t.dtype is torch.float32: return t.to(dtype=torch.bfloat16) return t if self.cfg.common.fp16: sample = utils.apply_to_sample(apply_half, sample) if self.cfg.common.bf16: sample = utils.apply_to_sample(apply_bfloat16, sample) if self._dummy_batch == "DUMMY": self._dummy_batch = sample return sample, False def _set_seed(self): # Set seed based on args.seed and the update number so that we get # reproducible results when resuming from checkpoints seed = self.cfg.common.seed + self.get_num_updates() utils.set_torch_seed(seed) def _sync_stats(self): # Return True if it's using multiple GPUs and DDP or multiple GPUs with # BMUF and it's a bmuf sync with warmup iterations completed before. if self.data_parallel_world_size == 1: return False elif self.cfg.optimization.use_bmuf: return ( self.get_num_updates() + 1 ) % self.cfg.bmuf.global_sync_iter == 0 and ( self.get_num_updates() + 1 ) > self.cfg.bmuf.warmup_iterations else: return True def _log_oom(self, exc): msg = "OOM: Ran out of memory with exception: {}".format(exc) logger.warning(msg) if torch.cuda.is_available() and hasattr(torch.cuda, "memory_summary"): for device_idx in range(torch.cuda.device_count()): logger.warning(torch.cuda.memory_summary(device=device_idx)) sys.stderr.flush() def _aggregate_logging_outputs( self, logging_outputs: List[Dict[str, Any]], *extra_stats_to_sum, ignore=False, ): if self.task.__class__.logging_outputs_can_be_summed(self.get_criterion()): return self._fast_stat_sync_sum( logging_outputs, *extra_stats_to_sum, ignore=ignore ) else: return self._all_gather_list_sync( logging_outputs, *extra_stats_to_sum, ignore=ignore ) def _all_gather_list_sync( self, logging_outputs: List[Dict[str, Any]], *extra_stats_to_sum, ignore=False, ): """ Sync logging outputs across workers. all_gather_list_sync is suitable when logging outputs are complex types. """ if self.tpu: raise NotImplementedError if ignore: logging_outputs = [] results = list( zip( *distributed_utils.all_gather_list( [logging_outputs] + list(extra_stats_to_sum), max_size=getattr(self.cfg.common, "all_gather_list_size", 16384), group=self.data_parallel_process_group, ) ) ) logging_outputs, extra_stats_to_sum = results[0], results[1:] logging_outputs = list(chain.from_iterable(logging_outputs)) extra_stats_to_sum = [sum(s) for s in extra_stats_to_sum] return logging_outputs, extra_stats_to_sum def _fast_stat_sync_sum( self, logging_outputs: List[Dict[str, Any]], *extra_stats_to_sum, ignore=False, ): """ Sync logging outputs across workers. fast_stat_sync_sum is faster than all_gather_list_sync, but is only suitable when logging outputs are scalars and can be summed. Note that *logging_outputs* cannot contain any nested dicts/lists. """ data = {} for i, stat in enumerate(extra_stats_to_sum): data["extra_stats_" + str(i)] = stat if len(logging_outputs) > 0: log_keys = list(logging_outputs[0].keys()) for k in log_keys: if not ignore: v = sum(log[k] for log in logging_outputs if k in log) else: v = logging_outputs[0][k] v = torch.zeros_like(v) if torch.is_tensor(v) else 0 data["logging_outputs_" + k] = v else: log_keys = None data = distributed_utils.all_reduce_dict( data, device=self.device, group=self.data_parallel_process_group ) extra_stats_to_sum = [ data["extra_stats_" + str(i)] for i in range(len(extra_stats_to_sum)) ] if log_keys is not None: logging_outputs = [{k: data["logging_outputs_" + k] for k in log_keys}] else: logging_outputs = [] return logging_outputs, extra_stats_to_sum def _check_grad_norms(self, grad_norm): """Check that grad norms are consistent across workers.""" if self._grad_norm_buf is not None: self._grad_norm_buf.zero_() self._grad_norm_buf[self.data_parallel_rank] = grad_norm distributed_utils.all_reduce( self._grad_norm_buf, group=self.data_parallel_process_group ) def is_consistent(tensor): max_abs_diff = torch.max(torch.abs(tensor - tensor[0])) return ( torch.isfinite(tensor).all() or (max_abs_diff / (tensor[0] + 1e-6) < 1e-6).all() ) if not is_consistent(self._grad_norm_buf): pretty_detail = "\n".join( "rank {:3d} = {:.8f}".format(r, n) for r, n in enumerate(self._grad_norm_buf.tolist()) ) error_detail = "grad_norm across the workers:\n{}\n".format( pretty_detail ) # use FloatingPointError to trigger NanDetector raise FloatingPointError( "Fatal error: gradients are inconsistent between workers. " "Try --ddp-backend=no_c10d. " "Or are you mixing up different generation of GPUs in training?" + "\n" + "-" * 80 + "\n{}\n".format(error_detail) + "-" * 80 ) def _reduce_and_log_stats(self, logging_outputs, sample_size, grad_norm=None): if grad_norm is not None and ( not torch.is_tensor(grad_norm) or torch.isfinite(grad_norm) ): metrics.log_speed("ups", 1.0, priority=100, round=2) metrics.log_scalar("gnorm", grad_norm, priority=400, round=3) if self.cfg.optimization.clip_norm > 0: metrics.log_scalar( "clip", torch.where( grad_norm > self.cfg.optimization.clip_norm, grad_norm.new_tensor(100), grad_norm.new_tensor(0), ), priority=500, round=1, ) with metrics.aggregate() as agg: if logging_outputs is not None: self.task.reduce_metrics(logging_outputs, self.get_criterion()) del logging_outputs # extra warning for criterions that don't properly log a loss value if "loss" not in agg: if "loss" not in self._warn_once: self._warn_once.add("loss") logger.warning( "Criterion.reduce_metrics did not log a 'loss' value, " "which may break some functionality" ) metrics.log_scalar("loss", -1) # support legacy interface if self.tpu: logging_output = {} else: logging_output = agg.get_smoothed_values() logging_output["sample_size"] = sample_size for key_to_delete in ["ppl", "wps", "wpb", "bsz"]: if key_to_delete in logging_output: del logging_output[key_to_delete] return logging_output def _check_xla_compilation(self): import torch_xla.debug.metrics as met compile_stats = met.metric_data("CompileTime") if compile_stats is None: return num_xla_compiles = compile_stats[0] if num_xla_compiles > self._num_xla_compiles: logger.warning( "XLA compilation detected on device #{}; too many of these can lead " "to slow training, but we expect a few in the beginning".format( self.cfg.distributed_training.distributed_rank ) ) self._num_xla_compiles = num_xla_compiles def _catalog_shared_params(module, memo=None, prefix=""): if memo is None: first_call = True memo = {} else: first_call = False for name, param in module._parameters.items(): param_prefix = prefix + ("." if prefix else "") + name if param not in memo: memo[param] = [] memo[param].append(param_prefix) for name, m in module._modules.items(): if m is None: continue submodule_prefix = prefix + ("." if prefix else "") + name _catalog_shared_params(m, memo, submodule_prefix) if first_call: return [x for x in memo.values() if len(x) > 1] def _get_module_by_path(module, path): path = path.split(".") for name in path: module = getattr(module, name) return module def _set_module_by_path(module, path, value): path = path.split(".") for name in path[:-1]: module = getattr(module, name) setattr(module, path[-1], value)
import React, { useState, useEffect } from "react"; import { Link } from "react-router-dom"; import { connect } from "react-redux"; // import classes from "./Navbar.module.css"; import "./Navbar.css"; import shoppingBagIcon from "../../../../assets/img/shopping-bag.png"; import userIcon from "../../../../assets/img/user.png"; import favouriteIcon from "../../../../assets/img/heart.png"; const Navbar = (props) => { return ( <div className="navbar-master"> {/* ======================= DESKTOP NAV ======================= */} <nav className="navbar navbar-expand-lg navbar-light bg-white d-none d-sm-block" id="navbar" > <div className="container"> <Link className="navbar-brand" to="/"> anico. </Link> {/* <button className="hamburger hamburger--collapse navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation" > <span className="hamburger-box"> <span className="hamburger-inner"></span> </span> </button> */} <div className="collapse navbar-collapse" id="navbarNav"> <ul className="navbar-nav"> <li className="nav-item active"> <Link className="nav-link pr-4" to="/products"> Shop </Link> </li> <li className="nav-item"> <Link className="nav-link pr-4" to="/products"> The Show Kit </Link> </li> <li className="nav-item"> <Link className="nav-link pr-4" to="/products"> Exclusive </Link> </li> <li className="nav-item"> <Link className="nav-link pr-4" to="/products"> Sale </Link> </li> <li className="nav-item"> <Link className="nav-link" to="/support"> Support </Link> </li> </ul> <ul className="navbar-nav ml-auto"> {props.sessionAuthData ? ( <Link className="nav-link" to="/cart"> <li className="nav-item mr-2" style={{ marginTop: "1.2rem" }}> welcome back &nbsp; {props.sessionAuthData.email.substring( 0, props.sessionAuthData.email.lastIndexOf("@") )} </li> </Link> ) : null} <li className="nav-item d-none d-sm-block" style={{ marginTop: "1rem" }} > <Link className="nav-link" to="/favourite"> <img src={favouriteIcon} className="img-fluid" alt="shopping bag" width="25" /> </Link> </li> {!props.sessionAuthData ? ( <li className="nav-item pl-1 d-none d-sm-block" style={{ marginTop: "1rem" }} > <Link className="nav-link" to="/login"> <img src={userIcon} className="img-fluid" alt="userIcon" width="25" /> </Link> </li> ) : null} <li className="nav-item pl-1 d-none d-sm-block" style={{ marginTop: "1rem" }} > <Link className="nav-link" to="/cart"> <img src={shoppingBagIcon} className="img-fluid d-inline" alt="shopping bag" width="25" /> <div className="item-count">{props.itemCount}</div> </Link> </li> </ul> </div> </div> </nav> {/* ======================= MOBILE NAV ======================= */} <nav className="navbar navbar-expand-lg navbar-light bg-white d-block d-sm-none" id="navbar" > <div class="d-flex flex-row"> <div class="flex-item flex-hamburger"> {/* <button className="hamburger hamburger--collapse navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation" > <span className="hamburger-box"> <span className="hamburger-inner"></span> </span> </button> */} <button class="navbar-toggler mt-2 border-0 text-dark" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation" > <span class="navbar-toggler-icon"></span> </button> </div> <div class="flex-item flex-favourite"> <Link className="nav-link" to="/favourite"> <img src={favouriteIcon} alt="shopping bag" width="25" /> </Link> </div> <div class="flex-item"></div> <div class="flex-item flex-brand"> <div class="nav-mobile-flex-item-brand"> <Link className="navbar-brand" to="/"> anico. </Link> </div> </div> <div class="flex-item"></div> <div class="flex-item flex-user"> {!props.sessionAuthData ? ( <Link className="nav-link" to="/login"> <img src={userIcon} alt="userIcon" width="25" /> </Link> ) : null} </div> <div class="flex-item flex-cart"> <Link className="nav-link" to="/cart"> <img src={shoppingBagIcon} alt="shopping bag" width="25" /> <div className="item-count">{props.itemCount}</div> </Link> </div> </div> <div className="container"> <div className="collapse navbar-collapse" id="navbarNav" // data-toggle={isMobile ? "collapse" : ""} // data-target={isMobile ? "#navbarNav" : ""} data-toggle="collapse" data-target="#navbarNav" > <ul className="navbar-nav"> <li className="nav-item active"> <Link className="nav-link pr-4" to="/products"> Products </Link> </li> <li className="nav-item"> <Link className="nav-link pr-4" to="/products"> The Show Kit </Link> </li> <li className="nav-item"> <Link className="nav-link pr-4" to="/products"> Exclusive </Link> </li> <li className="nav-item"> <Link className="nav-link pr-4" to="/products"> Sale </Link> </li> <li className="nav-item"> <Link className="nav-link" to="/support"> Support </Link> </li> </ul> <ul className="navbar-nav ml-auto"> {props.sessionAuthData ? ( <Link className="nav-link" to="/cart"> <li className="nav-item mr-2" style={{ marginTop: "1.2rem" }}> welcome back &nbsp; {props.sessionAuthData.email.substring( 0, props.sessionAuthData.email.lastIndexOf("@") )} </li> </Link> ) : null} </ul> </div> </div> </nav> </div> ); }; // REDUX SECTION // STORE - Getting all the state from reducer.js const mapStateToProps = (global_state) => { return { itemCount: global_state.myCart.length, sessionAuthData: global_state.sessionAuthData, }; }; // ACTION - returning value to the reducer.js for processing and computation const mapDispatchToProps = (dispatch) => { return {}; }; export default connect(mapStateToProps, mapDispatchToProps)(Navbar);
/* * Copyright (C) 2017-2019 Dremio Corporation * * 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. */ import { PureComponent } from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router'; import Radium from 'radium'; import PropTypes from 'prop-types'; import Immutable from 'immutable'; import { FormattedMessage, injectIntl } from 'react-intl'; import Art from 'components/Art'; import ChatItem from '@inject/components/HeaderItemsTypes/ChatItem'; import MainHeaderItem from './MainHeaderItem'; import HeaderLink from './HeaderItemsTypes/HeaderLink'; import SearchItem from './HeaderItemsTypes/SearchItem'; import NewQueryButton from './HeaderItemsTypes/NewQueryButton'; import HeaderDropdown from './HeaderItemsTypes/HeaderDropdown'; import AccountMenu from './AccountMenu'; import HelpMenu from './HelpMenu'; import './MainHeader.less'; @injectIntl @Radium export class MainHeader extends PureComponent { static propTypes = { user: PropTypes.instanceOf(Immutable.Map), intl: PropTypes.object.isRequired, socketIsOpen: PropTypes.bool.isRequired }; static defaultProps = { user: Immutable.Map() }; render() { const { user, socketIsOpen } = this.props; return ( <div className='explore-header'> <Link className='dremio' to='/' style={styles.logo}> <span className={'dremioLogoWithTextContainer'}> <Art className={'dremioLogoWithText'} src={'NarwhalLogoWithNameLight.svg'} alt={this.props.intl.formatMessage({id: 'App.NarwhalLogo'})} style={{...styles.logoIcon, filter: `saturate(${socketIsOpen ? 1 : 0})`}}/> </span> </Link> <div className='header-wrap'> <div className='left-part'> <MainHeaderItem> <HeaderLink to='/'><FormattedMessage id='Dataset.Datasets'/></HeaderLink> </MainHeaderItem> <MainHeaderItem> <HeaderLink to='/jobs'><FormattedMessage id='Job.Jobs'/></HeaderLink> </MainHeaderItem> <MainHeaderItem> <SearchItem/> </MainHeaderItem> <MainHeaderItem> <NewQueryButton/> </MainHeaderItem> </div> <div className='right-part' style={styles.rightPart}> {ChatItem && <ChatItem />} <MainHeaderItem> <HeaderDropdown name={this.props.intl.formatMessage({id: 'App.Help'})} menu={<HelpMenu />}/> </MainHeaderItem> { user.get('admin') && <MainHeaderItem> <HeaderLink to='/admin'><FormattedMessage id='App.Admin'/></HeaderLink> </MainHeaderItem> } <MainHeaderItem> <HeaderDropdown dataQa='logout-menu' name={user.get('userName')} menu={<AccountMenu />}/> </MainHeaderItem> </div> </div> </div> ); } } const mapStateToProps = state => ({ user: state.account.get('user'), socketIsOpen: state.serverStatus.get('socketIsOpen') }); export default connect(mapStateToProps)(MainHeader); const styles = { logo: { margin: '5px 0 0 7px' }, logoIcon: { width: 115, height: 36, position: 'relative', top: -2, left: -4 }, rightPart: { margin: '0 4px 0 0' } };
#!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. import numpy as np from scipy.spatial import cKDTree as KDTree import trimesh def compute_trimesh_chamfer( gt_points, gen_mesh, offset, scale, num_mesh_samples=30000 ): """ This function computes a symmetric chamfer distance, i.e. the sum of both chamfers. gt_points: trimesh.points.PointCloud of just poins, sampled from the surface (see compute_metrics.ply for more documentation) gen_mesh: trimesh.base.Trimesh of output mesh from whichever autoencoding reconstruction method (see compute_metrics.py for more) """ gen_points_sampled = trimesh.sample.sample_surface( gen_mesh, num_mesh_samples )[0] gen_points_sampled = gen_points_sampled / scale - offset # only need numpy array of points # gt_points_np = gt_points.vertices gt_points_np = gt_points.vertices # one direction gen_points_kd_tree = KDTree(gen_points_sampled) one_distances, one_vertex_ids = gen_points_kd_tree.query(gt_points_np) gt_to_gen_chamfer = np.mean(np.square(one_distances)) # other direction gt_points_kd_tree = KDTree(gt_points_np) two_distances, two_vertex_ids = gt_points_kd_tree.query(gen_points_sampled) gen_to_gt_chamfer = np.mean(np.square(two_distances)) return gt_to_gen_chamfer + gen_to_gt_chamfer
import React from 'react'; import gql from 'graphql-tag'; import { useQuery } from 'react-apollo-hooks'; import { useAuthenticated } from '../auth'; const UserContext = React.createContext(null); const UserContextProvider = ({ children }) => { // Don't bother with the query if we aren't authenticated const authenticated = useAuthenticated(); return authenticated ? ( <UserProviderGql>{children}</UserProviderGql> ) : ( children ); }; const UserProviderGql = ({ children }) => { const { data } = useQuery(CURRENT_USER_QUERY); return ( <UserContext.Provider value={data ? data.loggedInUser : null}> {children} </UserContext.Provider> ); }; export const CURRENT_USER_QUERY = gql` query LoggedInUserQuery { loggedInUser { id } } `; export { UserContext as default, UserContextProvider };
import { css } from 'styled-components'; export const ul = css` list-style-type: none; padding-inline-end: 40px; `; export const li = css`margin-bottom: 5px;`;
function something() { var x = window.localStorage.getItem('bbb'); x = x * 1 + 1; window.localStorage.setItem('bbb', x); alert(x); } function add_to_cart(id) { var key = 'product_' + id; var x = window.localStorage.getItem(key); x = x * 1 + 1; window.localStorage.setItem(key, x); update_orders_input(); update_orders_button(); } function cart_get_number_of_items() { var cnt = 0; for(var i = 0; i < window.localStorage.length; i++) { var key = window.localStorage.key(i); // получаем ключ var value = window.localStorage.getItem(key); // получаем значение, аналог в ruby: hh[key] = x if(key.indexOf('product_') == 0) { cnt = cnt + value * 1; } } return cnt; } function cart_get_orders() { var orders = ''; for(var i = 0; i < window.localStorage.length; i++) { var key = window.localStorage.key(i); // получаем ключ var value = window.localStorage.getItem(key); // получаем значение, аналог в ruby: hh[key] = x if(key.indexOf('product_') == 0) { orders = orders + key + '=' + value + ','; } } return orders; } function update_orders_input() { var orders = cart_get_orders(); $('#orders_input').val(orders); } function update_orders_button() { var text = 'Cart (' + cart_get_number_of_items() + ')'; $('#orders_button').val(text); } function cancel_order() { window.localStorage.clear(); update_orders_input(); update_orders_button(); $('#cart').text('Your cart is empty now'); return false; }
import PropTypes from 'prop-types'; import ReactFauxDom from 'react-faux-dom'; import cloud from 'd3-cloud'; import { Component } from 'react'; import { scaleOrdinal } from 'd3-scale'; import { schemeCategory10 } from 'd3-scale-chromatic'; import { select } from 'd3-selection'; import { defaultFontSizeMapper } from './defaultMappers'; const ordinalScale = scaleOrdinal(schemeCategory10); const defaultFillMapper = (d, i) => ordinalScale(i); class WordCloud extends Component { static propTypes = { data: PropTypes.arrayOf( PropTypes.shape({ text: PropTypes.string.isRequired, value: PropTypes.number.isRequired, }) ).isRequired, font: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), fontFillMapper: PropTypes.func, fontSizeMapper: PropTypes.func, height: PropTypes.number, padding: PropTypes.oneOfType([PropTypes.number, PropTypes.func]), rotate: PropTypes.oneOfType([PropTypes.number, PropTypes.func]), width: PropTypes.number, onWordClick: PropTypes.func, onWordMouseOut: PropTypes.func, onWordMouseOver: PropTypes.func, }; static defaultProps = { width: 700, height: 600, padding: 5, font: 'serif', fontSizeMapper: defaultFontSizeMapper, fontFillMapper: defaultFillMapper, rotate: 0, onWordClick: null, onWordMouseOver: null, onWordMouseOut: null, }; componentWillMount() { this.wordCloud = ReactFauxDom.createElement('div'); } render() { const { data, width, height, padding, font, fontSizeMapper, fontFillMapper, rotate, onWordClick, onWordMouseOver, onWordMouseOut, } = this.props; // clear old words select(this.wordCloud) .selectAll('*') .remove(); // render based on new data const layout = cloud() .size([width, height]) .font(font) .words(data) .padding(padding) .rotate(rotate) .fontSize(fontSizeMapper) .on('end', words => { const texts = select(this.wordCloud) .append('svg') .attr('width', layout.size()[0]) .attr('height', layout.size()[1]) .append('g') .attr( 'transform', `translate(${layout.size()[0] / 2},${layout.size()[1] / 2})` ) .selectAll('text') .data(words) .enter() .append('text') .style('font-size', d => `${d.size}px`) .style('font-family', font) .style('fill', fontFillMapper) .attr('text-anchor', 'middle') .attr('transform', d => `translate(${[d.x, d.y]})rotate(${d.rotate})`) .text(d => d.text); if (onWordClick) { texts.on('click', onWordClick); } if (onWordMouseOver) { texts.on('mouseover', onWordMouseOver); } if (onWordMouseOut) { texts.on('mouseout', onWordMouseOut); } }); layout.start(); return this.wordCloud.toReact(); } } export default WordCloud;
const { table, getBorderCharacters } = require('table') const kindOf = require('kind-of') const pick = require('lodash/pick') const castArray = require('lodash/castArray') const assert = require('assert-plus') const TABLE_OPTIONS = { border: getBorderCharacters('void'), columnDefault: { paddingLeft: 2, paddingRight: 2 }, drawHorizontalLine: () => { return false } } exports.getColumns = getColumns exports.getRows = getRows exports.objectToTable = objectToTable exports.fromObject = objectToTable exports.tableize = tableize exports.toTable = toTable function tableize (options, items) { if (arguments.length === 1) { return data => tableize(options, data) } const keys = options.keys || Object.keys(items[0]) const result = [] items.forEach(item => { const instance = [] keys.forEach(key => { instance.push(item[key]) }) result.push(instance) }) result.unshift(keys) return result } /** * * @param {object|string|string[]} options - keys to select (default will use all keys of object or first item in an array) * @param {object|object[]} data - data to be proccesed * @returns {array[]} * */ function objectToTable (options, data) { if (arguments.length === 1) { return data => objectToTable(options, data) } const columns = getColumns(options, data) const rows = getRows(columns, data) rows.unshift(columns) return rows } /** * * @param {string|string[]} keys - options * @param {object|object[]} data * @param {number} [index] * @returns {array[]} data as an array of string values (rows) */ function getRows (keys, data, index) { switch (kindOf(data)) { case 'array': { return data.map((value, index) => getRows(keys, value, index)) } case 'object': { Object.assign(data, { index }) return Object.values(pick(data, keys)) } default: throw new TypeError(`unexpected type: ${kindOf(data)}`) } } /** * * @param {object|string|string[]} options - options (with keys) * @param {object} data - data object to sample * @returns {string[]} columns (array of strings) */ function getColumns (options, data) { if (kindOf(options) === 'object' && (options.keys || options.columns)) { return castArray(options.keys || options.columns) } if (kindOf(options) === 'string') { return [options] } if (kindOf(options) === 'array') { assert.arrayOfString(options) return options } // Calculate columns from data switch (kindOf(data)) { case 'object': return Object.keys(data) case 'array': { if (data.length === 0) { throw new Error('get.columns.error:no.data') } else { if (kindOf(data[0]) === 'object') { return Object.keys(data[0]) } return ['index'] } } default: throw new Error(`get.columns.error:cannot calculate column names from ${kindOf(data)}`) } } /** * * @param {object} options * @param {any} [value] * @returns {function|*} */ function toTable (options, value) { if (arguments.length === 1) { return value => toTable(options, value) } const data = objectToTable(options, value) console.log(table(data, TABLE_OPTIONS)) }
# -*- coding:utf8 -*- from numpy import * from numpy import linalg as la import pandas as pd datamat = mat([[0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 5], [0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 3], [0, 0, 0, 0, 4, 0, 0, 1, 0, 4, 0], [3, 3, 4, 0, 0, 0, 0, 2, 2, 0, 0], [5, 4, 5, 0, 0, 0, 0, 5, 5, 0, 0], [0, 0, 0, 0, 5, 0, 1, 0, 0, 5, 0], [4, 3, 4, 0, 0, 0, 0, 5, 5, 0, 1], [0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 4], [0, 0, 0, 2, 0, 2, 5, 0, 0, 1, 2], [0, 0, 0, 0, 5, 0, 0, 0, 0, 4, 0], [1, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0]] # 欧拉距离相似度,评分可用,程度不建议 def oulasim(A, B): distince = la.norm(A - B) # 第二范式:平方的和后求根号 similarity = 1 / (1 + distince) return similarity # 余弦相似度,评分、1/0、程度都可以用 def cossim(A, B): ABDOT = dot(A, B) ABlen = la.norm(A) * la.norm(B) if ABlen == 0: similarity = '异常' else: similarity = ABDOT / float(ABlen) return similarity # 皮尔逊相关系数 def pearsonsim(A, B): A = A - mean(A) B = B - mean(B) ABDOT = dot(A, B) ABlen = la.norm(A) * la.norm(B) if ABlen == 0: similarity = '异常' else: similarity = ABDOT / float(ABlen) return similarity # 协同推荐,商品相似度打分 def recommender(datamat, item_set, method): col = shape(datamat)[1] # 物品数量 item = datamat[:, item_set] similarity_matrix = zeros([col, 1]) for i in range(col): index = nonzero(logical_and(item > 0, datamat[:, i] > 0))[0] if sum(index) > 0: similarity = method(datamat[index, item_set].T, datamat[index, i]) else: similarity = '-1' similarity_matrix[i] = similarity return similarity_matrix # 相似度矩阵 def similarity(datamat, method): item_sum = shape(datamat)[1] similarity = pd.DataFrame([]) for i in range(item_sum): res = recommender(datamat, i, method) similarity = pd.concat([similarity, pd.DataFrame(res)], axis=1) return similarity # svd n = shape(datamat)[1] # 商品数目 U, sigma, VT = la.svd(datamat) # 规约最小维数 sigma2 = sigma ** 2 k = len(sigma2) n_sum2 = sum(sigma2) nsum = 0 max_sigma_index = 0 for i in sigma: nsum = nsum + i ** 2 max_sigma_index = max_sigma_index + 1 if nsum >= n_sum2 * 0.9: break # item new matrix item = datamat.T * U[:, 0:max_sigma_index] * sigma[0:max_sigma_index]
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5ec199f0"],{"6a26":function(n,t,i){"use strict";i.r(t);var e=function(){var n=this,t=n.$createElement,i=n._self._c||t;return i("div",{staticClass:"header"},[i("div",{staticClass:"menu"},[i("x-icon",{staticClass:"icon",attrs:{name:"menu"},on:{click:n.onClickMenu}})],1),i("div",{staticClass:"logo",on:{click:function(t){n.link("index")}}},[i("span",{staticClass:"icon"},[i("x-icon",{staticStyle:{width:"100%",height:"100%",color:"#1890ff"},attrs:{name:"snow"}})],1),n._m(0)]),i("ul",{staticClass:"navbar"},[i("li",{on:{click:function(t){n.link("github")}}},[i("x-icon",{staticStyle:{"margin-right":"3px",color:"rgba(0,0,0,0.85)"},attrs:{name:"github"}}),n._v("\n Github\n ")],1),i("li",{on:{click:function(t){n.link("react")}}},[n._v("\n Xue-react\n ")])])])},c=[function(){var n=this,t=n.$createElement,i=n._self._c||t;return i("h1",{staticClass:"title"},[i("span",[n._v("X")]),n._v("ue - ui")])}],a=(i("cadf"),i("551c"),i("097d"),{name:"Header",inject:["eventBus"],mounted:function(){},methods:{link:function(n){"index"===n&&this.$router.push("/"),"github"===n&&window.open("https://github.com/BlameDeng/xue-ui","_blank"),"react"===n&&window.open("https://github.com/BlameDeng/xue-react","_blank")},onClickMenu:function(){this.eventBus.$emit("click-menu")}}}),s=a,o=(i("885b"),i("2877")),u=Object(o["a"])(s,e,c,!1,null,"cb3df662",null);u.options.__file="header.vue";t["default"]=u.exports},8245:function(n,t,i){},"885b":function(n,t,i){"use strict";var e=i("8245"),c=i.n(e);c.a}}]); //# sourceMappingURL=chunk-5ec199f0.cf5f01c9.js.map
import os import re import tempfile import shutil from tqdm import tqdm import shlex from ._streams import AudioStream, VideoStream, SubtitleStream from ._errors import FFmpegNormalizeError from ._cmd_utils import NUL, CommandRunner, DUR_REGEX, to_ms from ._logger import setup_custom_logger logger = setup_custom_logger("ffmpeg_normalize") class MediaFile: """ Class that holds a file, its streams and adjustments """ def __init__(self, ffmpeg_normalize, input_file, output_file=None): """ Initialize a media file for later normalization. Arguments: ffmpeg_normalize {FFmpegNormalize} -- reference to overall settings input_file {str} -- Path to input file Keyword Arguments: output_file {str} -- Path to output file (default: {None}) """ self.ffmpeg_normalize = ffmpeg_normalize self.skip = False self.input_file = input_file self.output_file = output_file self.streams = {"audio": {}, "video": {}, "subtitle": {}} self.parse_streams() def _stream_ids(self): return ( list(self.streams["audio"].keys()) + list(self.streams["video"].keys()) + list(self.streams["subtitle"].keys()) ) def __repr__(self): return os.path.basename(self.input_file) def parse_streams(self): """ Try to parse all input streams from file """ logger.debug(f"Parsing streams of {self.input_file}") cmd = [ self.ffmpeg_normalize.ffmpeg_exe, "-i", self.input_file, "-c", "copy", "-t", "0", "-map", "0", "-f", "null", NUL, ] cmd_runner = CommandRunner(cmd) cmd_runner.run_command() output = cmd_runner.get_output() logger.debug("Stream parsing command output:") logger.debug(output) output_lines = [line.strip() for line in output.split("\n")] duration = None for line in output_lines: if "Duration" in line: duration_search = DUR_REGEX.search(line) if not duration_search: logger.warning("Could not extract duration from input file!") else: duration = duration_search.groupdict() duration = to_ms(**duration) / 1000 logger.debug("Found duration: " + str(duration) + " s") if not line.startswith("Stream"): continue stream_id_match = re.search(r"#0:([\d]+)", line) if stream_id_match: stream_id = int(stream_id_match.group(1)) if stream_id in self._stream_ids(): continue else: continue if "Audio" in line: logger.debug(f"Found audio stream at index {stream_id}") sample_rate_match = re.search(r"(\d+) Hz", line) sample_rate = ( int(sample_rate_match.group(1)) if sample_rate_match else None ) bit_depth_match = re.search(r"s(\d+)p?,", line) bit_depth = int(bit_depth_match.group(1)) if bit_depth_match else None self.streams["audio"][stream_id] = AudioStream( self, self.ffmpeg_normalize, stream_id, sample_rate, bit_depth, duration, ) elif "Video" in line: logger.debug(f"Found video stream at index {stream_id}") self.streams["video"][stream_id] = VideoStream( self, self.ffmpeg_normalize, stream_id ) elif "Subtitle" in line: logger.debug(f"Found subtitle stream at index {stream_id}") self.streams["subtitle"][stream_id] = SubtitleStream( self, self.ffmpeg_normalize, stream_id ) if not self.streams["audio"]: raise FFmpegNormalizeError( f"Input file {self.input_file} does not contain any audio streams" ) if ( os.path.splitext(self.output_file)[1].lower() in [".wav", ".mp3", ".aac"] and len(self.streams["audio"].values()) > 1 ): logger.warning( "Output file only supports one stream. " "Keeping only first audio stream." ) first_stream = list(self.streams["audio"].values())[0] self.streams["audio"] = {first_stream.stream_id: first_stream} self.streams["video"] = {} self.streams["subtitle"] = {} def run_normalization(self): logger.debug(f"Running normalization for {self.input_file}") # run the first pass to get loudness stats self._first_pass() # run the second pass as a whole if self.ffmpeg_normalize.progress: with tqdm(total=100, position=1, desc="Second Pass") as pbar: for progress in self._second_pass(): pbar.update(progress - pbar.n) else: for _ in self._second_pass(): pass def _first_pass(self): logger.debug(f"Parsing normalization info for {self.input_file}") for index, audio_stream in enumerate(self.streams["audio"].values()): if self.ffmpeg_normalize.normalization_type == "ebu": fun = getattr(audio_stream, "parse_loudnorm_stats") else: fun = getattr(audio_stream, "parse_volumedetect_stats") if self.ffmpeg_normalize.progress: with tqdm( total=100, position=1, desc=f"Stream {index + 1}/{len(self.streams['audio'].values())}", ) as pbar: for progress in fun(): pbar.update(progress - pbar.n) else: for _ in fun(): pass if self.ffmpeg_normalize.print_stats: stats = [ audio_stream.get_stats() for audio_stream in self.streams["audio"].values() ] self.ffmpeg_normalize.stats.extend(stats) def _get_audio_filter_cmd(self): """ Return filter_complex command and output labels needed """ filter_chains = [] output_labels = [] for audio_stream in self.streams["audio"].values(): if self.ffmpeg_normalize.normalization_type == "ebu": normalization_filter = audio_stream.get_second_pass_opts_ebu() else: normalization_filter = audio_stream.get_second_pass_opts_peakrms() input_label = f"[0:{audio_stream.stream_id}]" output_label = f"[norm{audio_stream.stream_id}]" output_labels.append(output_label) filter_chain = [] if self.ffmpeg_normalize.pre_filter: filter_chain.append(self.ffmpeg_normalize.pre_filter) filter_chain.append(normalization_filter) if self.ffmpeg_normalize.post_filter: filter_chain.append(self.ffmpeg_normalize.post_filter) filter_chains.append(input_label + ",".join(filter_chain) + output_label) filter_complex_cmd = ";".join(filter_chains) return filter_complex_cmd, output_labels def _second_pass(self): """ Construct the second pass command and run it FIXME: make this method simpler """ logger.info(f"Running second pass for {self.input_file}") # get the target output stream types depending on the options output_stream_types = ["audio"] if not self.ffmpeg_normalize.video_disable: output_stream_types.append("video") if not self.ffmpeg_normalize.subtitle_disable: output_stream_types.append("subtitle") # base command, here we will add all other options cmd = [self.ffmpeg_normalize.ffmpeg_exe, "-y", "-nostdin"] # extra options (if any) if self.ffmpeg_normalize.extra_input_options: cmd.extend(self.ffmpeg_normalize.extra_input_options) # get complex filter command audio_filter_cmd, output_labels = self._get_audio_filter_cmd() # add input file and basic filter cmd.extend(["-i", self.input_file, "-filter_complex", audio_filter_cmd]) # map metadata, only if needed if self.ffmpeg_normalize.metadata_disable: cmd.extend(["-map_metadata", "-1"]) else: # map global metadata cmd.extend(["-map_metadata", "0"]) # map per-stream metadata (e.g. language tags) for stream_type in output_stream_types: stream_key = stream_type[0] if stream_type not in self.streams: continue for idx, _ in enumerate(self.streams[stream_type].items()): cmd.extend( [ f"-map_metadata:s:{stream_key}:{idx}", f"0:s:{stream_key}:{idx}", ] ) # map chapters if needed if self.ffmpeg_normalize.chapters_disable: cmd.extend(["-map_chapters", "-1"]) else: cmd.extend(["-map_chapters", "0"]) # collect all '-map' and codecs needed for output video based on input video if not self.ffmpeg_normalize.video_disable: for s in self.streams["video"].keys(): cmd.extend(["-map", f"0:{s}"]) # set codec (copy by default) cmd.extend(["-c:v", self.ffmpeg_normalize.video_codec]) # ... and map the output of the normalization filters for ol in output_labels: cmd.extend(["-map", ol]) # set audio codec (never copy) if self.ffmpeg_normalize.audio_codec: cmd.extend(["-c:a", self.ffmpeg_normalize.audio_codec]) else: for index, (_, audio_stream) in enumerate(self.streams["audio"].items()): cmd.extend([f"-c:a:{index}", audio_stream.get_pcm_codec()]) # other audio options (if any) if self.ffmpeg_normalize.audio_bitrate: cmd.extend(["-b:a", str(self.ffmpeg_normalize.audio_bitrate)]) if self.ffmpeg_normalize.sample_rate: cmd.extend(["-ar", str(self.ffmpeg_normalize.sample_rate)]) else: cmd.extend(['-ar', str(self.streams['audio'][0].sample_rate)]) # if self.ffmpeg_normalize.normalization_type == "ebu": # logger.warn( # "The sample rate will automatically be set to 192 kHz by the loudnorm filter. " # "Specify -ar/--sample-rate to override it." # ) # ... and subtitles if not self.ffmpeg_normalize.subtitle_disable: for s in self.streams["subtitle"].keys(): cmd.extend(["-map", f"0:{s}"]) # copy subtitles cmd.extend(["-c:s", "copy"]) if self.ffmpeg_normalize.keep_original_audio: highest_index = len(self.streams["audio"]) for index, (_, s) in enumerate(self.streams["audio"].items()): cmd.extend(["-map", f"0:a:{index}"]) cmd.extend([f"-c:a:{highest_index + index}", "copy"]) # extra options (if any) if self.ffmpeg_normalize.extra_output_options: cmd.extend(self.ffmpeg_normalize.extra_output_options) # output format (if any) if self.ffmpeg_normalize.output_format: cmd.extend(["-f", self.ffmpeg_normalize.output_format]) # if dry run, only show sample command if self.ffmpeg_normalize.dry_run: cmd.append(self.output_file) cmd_runner = CommandRunner(cmd, dry=True) cmd_runner.run_command() yield 100 return # create a temporary output file name temp_dir = tempfile.gettempdir() output_file_suffix = os.path.splitext(self.output_file)[1] temp_file_name = os.path.join( temp_dir, next(tempfile._get_candidate_names()) + output_file_suffix ) cmd.append(temp_file_name) # run the actual command try: cmd_runner = CommandRunner(cmd) try: for progress in cmd_runner.run_ffmpeg_command(): yield progress except Exception as e: logger.error( "Error while running command {}! Error: {}".format( " ".join([shlex.quote(c) for c in cmd]), e ) ) else: # move file from TMP to output file logger.debug( f"Moving temporary file from {temp_file_name} to {self.output_file}" ) shutil.move(temp_file_name, self.output_file) except Exception as e: # remove dangling temporary file if os.path.isfile(temp_file_name): os.remove(temp_file_name) raise e logger.debug("Normalization finished")
//>>built (function(d,b){"object"===typeof exports&&"undefined"!==typeof module&&"function"===typeof require?b(require("../moment")):"function"===typeof define&&define.amd?define("moment/locale/ar-ly",["../moment"],b):b(d.moment)})(this,function(d){var b={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},f=function(c){return 0===c?0:1===c?1:2===c?2:3<=c%100&&10>=c%100?3:11<=c%100?4:5},h={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629", ["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"], h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627", "%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627", "%d \u0639\u0627\u0645"]},a=function(c){return function(a,b,d,e){d=f(a);e=h[c][f(a)];2===d&&(e=e[b?0:1]);return e.replace(/%d/i,a)}},g="\u064a\u0646\u0627\u064a\u0631 \u0641\u0628\u0631\u0627\u064a\u0631 \u0645\u0627\u0631\u0633 \u0623\u0628\u0631\u064a\u0644 \u0645\u0627\u064a\u0648 \u064a\u0648\u0646\u064a\u0648 \u064a\u0648\u0644\u064a\u0648 \u0623\u063a\u0633\u0637\u0633 \u0633\u0628\u062a\u0645\u0628\u0631 \u0623\u0643\u062a\u0648\u0628\u0631 \u0646\u0648\u0641\u0645\u0628\u0631 \u062f\u064a\u0633\u0645\u0628\u0631".split(" "); return d.defineLocale("ar-ly",{months:g,monthsShort:g,weekdays:"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0625\u062b\u0646\u064a\u0646 \u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0633\u0628\u062a".split(" "),weekdaysShort:"\u0623\u062d\u062f \u0625\u062b\u0646\u064a\u0646 \u062b\u0644\u0627\u062b\u0627\u0621 \u0623\u0631\u0628\u0639\u0627\u0621 \u062e\u0645\u064a\u0633 \u062c\u0645\u0639\u0629 \u0633\u0628\u062a".split(" "), weekdaysMin:"\u062d\u0646\u062b\u0631\u062e\u062c\u0633".split(""),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(a){return"\u0645"===a},meridiem:function(a,b,d){return 12>a?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT", nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:a("s"),ss:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},preparse:function(a){return a.replace(/\u060c/g,",")}, postformat:function(a){return a.replace(/\d/g,function(a){return b[a]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}})});
var express = require("express"); var path = require("path"); var cookieParser = require("cookie-parser"); var logger = require("morgan"); var indexRouter = require("./routes/index"); var apiRouter = require("./routes/api"); var apiResponse = require("./helpers/apiResponse"); var cors = require("cors"); require("dotenv").config(); // DB connection var MONGODB_URL = process.env.MONGODB_URL; var mongoose = require("mongoose"); mongoose .connect(MONGODB_URL, { useNewUrlParser: true, useUnifiedTopology: true }) .then(() => { //don't show the log when it is test if (process.env.NODE_ENV !== "test") { console.log("Connected to %s", MONGODB_URL); console.log("App is running ... \n"); console.log("Press CTRL + C to stop the process. \n"); } }) .catch(err => { console.error("App starting error:", err.message); process.exit(1); }); var app = express(); // view engine setup app.set("views", path.join(__dirname, "views")); app.set("view engine", "ejs"); if (process.env.NODE_ENV !== "test") { app.use(logger("dev")); } app.use(express.json()); app.use(express.urlencoded({ extended: false })); app.use(cookieParser()); app.use(express.static(path.join(__dirname, "public"))); app.use(cors()); app.use("/", indexRouter); app.use("/api", apiRouter); // throw 404 if URL not found app.all("*", function(req, res) { return apiResponse.notFoundResponse(res, "Page not found"); }); // error handler app.use(function(err, req, res) { // set locals, only providing error in development res.locals.message = err.message; res.locals.error = req.app.get("env") === "development" ? err : {}; // render the error page res.status(err.status || 500); res.render("error"); }); module.exports = app;
let appRoot = require('app-root-path'); let constants = require(`${appRoot}/local_modules/constants`); let functions = require(`${appRoot}/local_modules/localFunctions`); //validate & sanitize form data const validator = require('validator'); //parse incoming request bodies using body-parser middleware const bodyParser = require('body-parser'); // create application/x-www-form-urlencoded parser let urlencodedParser = bodyParser.urlencoded({ extended: false }); //mongodb connection const MongoClient = require('mongodb').MongoClient; module.exports = (app) => { app.get('/api', (req,res) => { res.render('api',{title: 'ALC 2.0 Assessment API'}); }); app.post('/api/student/add',urlencodedParser,(req,res) => { if (!req.body) {res.send({status: 400});} else { var newData = {}; //sanitize post data for (x in req.body) { var escaped = validator.escape(req.body[x]); newData[x] = validator.trim(escaped); } //get input input errors var validatePostData = functions.inputValidator(newData); MongoClient.connect(constants.dburl, (err, db) => { if (!err) { //uncomment next line to create db collection if it does not exist // db.createCollection(constants.stCol); var dbcol = db.collection(constants.stCol); //verify if reg_number is unique dbcol.find({reg_number : newData.reg_number}).toArray(function(err, doc) { if (!err) { if (doc.length > 0) { res.send({status : 400, data : "Reg. number is already registered"}) }else { //verify user inputs if(Object.keys(validatePostData).length < 1){ // Insert a single document dbcol.insertOne(newData, (err, r) => { if (!err) { r.insertedCount === 1 ? res.send({status : 200, data : r.ops[0]}) : res.send({status : 500, data : err.message}); }else { res.send({status : 500, data : err.message}); } db.close(); }); }else { res.send({status: 400, data: validatePostData});; } } }else { res.send({status : 500, data : err.message}); } }); }else { res.send({status : 500, data : err.message}); } }); } }); app.get('/api/student/list', (req,res) => { MongoClient.connect(constants.dburl, (err, db) => { if(!err){ var dbcol = db.collection(constants.stCol); dbcol.find({},{_id : 0}).toArray(function(err, docs) { if(!err){ res.send({status : 200, data : {number : docs.length, students : docs}}); }else { res.send({status: 500, data : err.message}); } db.close(); }); }else { res.send({status: 500, data : err.message}); } }); }); app.get('/api/student/view/:regno', (req,res) => { var regno = req.params['regno']; MongoClient.connect(constants.dburl, (err, db) => { if(!err){ var dbcol = db.collection(constants.stCol); dbcol.find({reg_number: regno},{_id : 0}).toArray(function(err, doc) { if(!err){ if (doc.length > 0) { res.send({status : 200, data : doc[0]}); } else { res.send({status: 400, data : 'No record found!'}); } }else { res.send({status: 500, data : err.message}); } db.close(); }); }else { res.send({status: 500, data : err.message}); } }); }); app.get('/api/student/delete/:regno', (req, res) => { var regno = req.params['regno']; MongoClient.connect(constants.dburl, (err, db) => { if (!err) { var dbcol = db.collection(constants.stCol); dbcol.find({reg_number : regno}).toArray(function(err, docs) { if (!err) { if (docs.length !== 0) { dbcol.deleteOne({reg_number : regno},(err,r)=> { if(!err){ db.close(); res.send({status: 200, data : ''}); }else { db.close(); res.send({status : 500, data : err.message}); } }); }else { db.close(); res.send({status: 400, data: 'Reference error: No record found.'}); } }else { db.close(); res.send({status: 500, data: err.message}); } }); } else { res.send({status: 500, data: err.message}); } }); }); app.post('/api/student/update', urlencodedParser, (req,res) => { var newData = {}; for(x in req.body){ var escaped = validator.escape(req.body[x]); newData[x] = validator.trim(escaped); } var validatePostData = functions.inputValidator(newData , 'update'); MongoClient.connect(constants.dburl, (err, db) => { if (!err) { var dbcol = db.collection(constants.stCol); //verify if reg_number exists dbcol.find({reg_number : newData.reg_number}).toArray(function(err, doc) { if (!err) { if (doc.length > 0) { //verify user inputs if(Object.keys(validatePostData).length < 1){ // Update existing record dbcol.updateOne({reg_number : newData.reg_number}, {$set : newData}, (err, r) => { if (!err) { r.result.n === 1 ? res.send({status : 200, data : newData}) : res.send({status : 500, data : err.message}); }else { res.send({status : 500, data : err.message}); } db.close(); }); }else { res.send({status: 400, data: validatePostData});; } }else { res.send({status : 400, data : `No record found for the reg. number ${newData.reg_number}.`}); } }else { res.send({status : 500, data : err.message}); } }); }else { res.send({status : 500, data : err.message}); } }); }); }
const expect = require("chai").expect const quiqErrorHandler = require("../../src/quiqErrorHandler") // const mockData = require("../__mocks__/eventStubWithEmail.json") describe("quiqErrorHandler", () => { it("Calls next given the proper data", () => { const req = {} const res = {} const next = function() {} quiqErrorHandler(req, res, next) }) })
import React from 'react'; import './admin.css' import AppBar from '@material-ui/core/AppBar'; import CssBaseline from '@material-ui/core/CssBaseline'; import Divider from '@material-ui/core/Divider'; import Drawer from '@material-ui/core/Drawer'; import Hidden from '@material-ui/core/Hidden'; import IconButton from '@material-ui/core/IconButton'; //import InboxIcon from '@material-ui/icons/MoveToInbox'; import List from '@material-ui/core/List'; import ListItem from '@material-ui/core/ListItem'; import ListItemIcon from '@material-ui/core/ListItemIcon'; import ListItemText from '@material-ui/core/ListItemText'; //import MailIcon from '@material-ui/icons/Mail'; import MenuIcon from '@material-ui/icons/Menu'; import Toolbar from '@material-ui/core/Toolbar'; import Typography from '@material-ui/core/Typography'; import { makeStyles, useTheme } from '@material-ui/core/styles'; import ExpandLess from '@material-ui/icons/ExpandLess' import ExpandMore from '@material-ui/icons/ExpandMore' import { withRouter } from 'react-router'; import { Route } from 'react-router-dom'; import { Link } from 'react-router-dom' // Importing Components import Dashboard from './Dashboard' import AddProducts from './Products/Addproduct' import ManageCategory from './Category/ManageCategory' import ManageSubCategory from './Category/ManageSubCategory' import ProductLists from './Products/ProductsList' import EditProduct from './Products/EditProduct' import CustomerLists from './Customers/CustomerLists' import OrderList from './Orders/Orderslist' import ProductValues from './Products/ProductValues' import ProductImages from './Products/ProductImages' import ManageRoles from './Permissions/ManageRoles' import ManageAdminAccounts from './Permissions/ManageAdminAccounts' import AddAdminAccount from './Permissions/AddAdminAccount' import EditAdminAccount from './Permissions/EditAdminAccount' import ADDNewDistributor from './Distrubutors/AddDistributor' import DistributorLists from './Distrubutors/DistributorsList' import DistributorView from './Distrubutors/DistributorView' import AddDiscountonproducts from './Distrubutors/AddDiscountProducts' import DistributorOrders from './Distrubutors/Orders' import DistributorPayents from './Distrubutors/Payments' import Axios from 'axios' const drawerWidth = 240; const useStyles = makeStyles((theme) => ({ Dividers: { backgroundColor: '#C2F0FC', height: '1px' }, Expanders: { color: '#FFFFFF', //107595 }, ListItemstyles: { color: '#FFFFFF', fontSize: '15px', fontWeight: 'bold', fontFamily: 'calibri' }, sidebarheads: { fontFamily: 'sans-serif', fontWeight: 'bolder', }, sidebarchilds: { fontFamily: 'calibri', fontWeight: 'bold', color: '#81f5ff', fontSize: '15px', marginLeft: '10px', } , root: { display: 'flex', }, drawer: { [theme.breakpoints.up('sm')]: { width: drawerWidth, flexShrink: 0, }, }, appBar: { [theme.breakpoints.up('sm')]: { width: `calc(100% )`, marginLeft: drawerWidth, backgroundColor: '#fff', height: '80px', borderBottom: '1px solid #3282b8' } }, menuButton: { marginRight: theme.spacing(2), [theme.breakpoints.up('sm')]: { display: 'none', }, }, // necessary for content to be below app bar toolbar: theme.mixins.toolbar, drawerPaper: { width: drawerWidth, marginTop: '80px', // backgroundImage:"url('http://localhost:8000/images/bgsidebar15.jpg')", backgroundColor: '#34495e', border: '1px solid #34495e' // C2F0FC }, content: { flexGrow: 1, padding: theme.spacing(3), }, })); function Sidebar(props) { const [display, setdisplay] = React.useState(false); const [permissions, setdPermissions] = React.useState([]); const [user, setuser] = React.useState([]); const [check, setcheck] = React.useState(true); const logout = () =>{ window.localStorage.setItem('sop256skikl',''); window.location.reload(); } const senderdata = { token: window.localStorage.getItem('sop256skikl') } if (check) { setcheck(false); Axios.post('/api/admin_check_auth', senderdata).then(res => { console.log(res); if (res.data.status == 200) { setdPermissions(res.data.user[0].permissions[0]); setuser(res.data.user); setdisplay(true); } else { props.history.push('/AdminLogin'); } }) } const { container } = props; const classes = useStyles(); const theme = useTheme(); const [mobileOpen, setMobileOpen] = React.useState(false); const handleDrawerToggle = () => { setMobileOpen(!mobileOpen); }; const [show1, setShow1] = React.useState(false); const [show2, setShow2] = React.useState(false); const [show3, setShow3] = React.useState(false); const [show4, setShow4] = React.useState(false); const [show5, setShow5] = React.useState(false); const [show6, setShow6] = React.useState(false); const [show7, setShow7] = React.useState(false); const [show8, setShow8] = React.useState(false); const [show9, setShow9] = React.useState(false); const sidebarchildhandler = (par) => { switch (par) { case 1: setShow1(!show1); setShow2(false); setShow3(false); setShow4(false); setShow5(false); setShow6(false); setShow7(false); setShow8(false); setShow9(false); break; case 2: setShow1(false); setShow2(!show2); setShow3(false); setShow4(false); setShow5(false); setShow6(false); setShow7(false); setShow8(false); setShow9(false); break; case 3: setShow1(false); setShow2(false); setShow3(!show3); setShow4(false); setShow5(false); setShow6(false); setShow7(false); setShow8(false); setShow9(false); break; case 4: setShow1(false); setShow2(false); setShow3(false); setShow4(!show4); setShow5(false); setShow6(false); setShow7(false); setShow8(false); setShow9(false); break; case 5: setShow1(false); setShow2(false); setShow3(false); setShow4(false); setShow5(!show5); setShow6(false); setShow7(false); setShow8(false); setShow9(false); break; case 6: setShow1(false); setShow2(false); setShow3(false); setShow4(false); setShow5(false); setShow6(!show6); setShow7(false); setShow8(false); setShow9(false); break; case 7: setShow1(false); setShow2(false); setShow3(false); setShow4(false); setShow5(false); setShow6(false); setShow7(!show7); setShow8(false); setShow9(false); break; case 8: setShow1(false); setShow2(false); setShow3(false); setShow4(false); setShow5(false); setShow6(false); setShow7(false); setShow8(!show8); setShow9(false); break; case 9: setShow1(false); setShow2(false); setShow3(false); setShow4(false); setShow5(false); setShow6(false); setShow7(false); setShow8(false); setShow9(!show9); break; } } const drawer = ( <div> <List className={classes.sidebarheads}> { permissions.dashboard == 1 ? <> <ListItem button component={Link} to="/adminpanel/Dashboard"> <ListItemText > <h6 className={classes.ListItemstyles}><i className="fas fa-home"></i> Dashboard</h6> </ListItemText> </ListItem> <Divider className={classes.Dividers} /> </> : null } {/* { permissions.customers == 1 ? <> <ListItem button onClick={() => sidebarchildhandler(2)} > <ListItemText> <h6 className={classes.ListItemstyles}> <i className="fas fa-users"></i> Manage Customers</h6></ListItemText> {show2 ? <ExpandLess className={classes.Expanders} /> : <ExpandMore className={classes.Expanders} /> } </ListItem> {show2 ? <div className={classes.sidebarchilds}> {/* <ListItem button component={Link} to="/adminpanel/NewUser" > <ListItemText ><h6 className={classes.sidebarchilds}>New Custpmer</h6></ListItemText> </ListItem> <ListItem button component={Link} to="/adminpanel/Cutomers"> <ListItemText ><h6 className={classes.sidebarchilds}>Customers lists</h6></ListItemText> </ListItem> </div> : '' } <Divider className={classes.Dividers} /> </> : null } */} { permissions.products == 1 ? <> <ListItem button onClick={() => sidebarchildhandler(4)} > <ListItemText > <h6 className={classes.ListItemstyles}><i className="fas fa-school"></i> Manage Products</h6></ListItemText> {show4 ? <ExpandLess className={classes.Expanders} /> : <ExpandMore className={classes.Expanders} /> } </ListItem> {show4 ? <List > <ListItem button component={Link} to="/adminpanel/AddProducts"> <ListItemText ><h6 className={classes.sidebarchilds}>New Product</h6></ListItemText> </ListItem> <ListItem button component={Link} to="/adminpanel/ProductLists"> <ListItemText ><h6 className={classes.sidebarchilds}>Product Lists</h6></ListItemText> </ListItem> </List> : '' } <Divider className={classes.Dividers} /> </> : null } { permissions.categories == 1 ? <><ListItem button onClick={() => sidebarchildhandler(6)} > <ListItemText > <h6 className={classes.ListItemstyles}><i className="fas fa-school"></i>Manage Categories</h6></ListItemText> {show6 ? <ExpandLess className={classes.Expanders} /> : <ExpandMore className={classes.Expanders} /> } </ListItem> {show6 ? <List > <ListItem button component={Link} to="/adminpanel/ManageCategory"> <ListItemText ><h6 className={classes.sidebarchilds}>Manage Categories</h6></ListItemText> </ListItem> <ListItem button component={Link} to="/adminpanel/ManageSubCategory"> <ListItemText ><h6 className={classes.sidebarchilds}>Manage sub Categories</h6></ListItemText> </ListItem> </List> : '' } <Divider className={classes.Dividers} /> </> : null } {/* { permissions.orders == 1 ? <> <ListItem button onClick={() => sidebarchildhandler(1)} > <ListItemText > <h6 className={classes.ListItemstyles}><i className="fas fa-school"></i> Manage Orders</h6></ListItemText> {show4 ? <ExpandLess className={classes.Expanders} /> : <ExpandMore className={classes.Expanders} /> } </ListItem> {show1 ? <List > {/* <ListItem button component={Link} to="/adminpanel/NewClass"> <ListItemText ><h6 className={classes.sidebarchilds}>New Order</h6></ListItemText> </ListItem> <ListItem button component={Link} to="/adminpanel/Orders"> <ListItemText ><h6 className={classes.sidebarchilds}>Order Lists</h6></ListItemText> </ListItem> </List> : '' } <Divider className={classes.Dividers} /></> : null } */} {/* { permissions.distributors == 1 ? <><ListItem button onClick={() => sidebarchildhandler(3)} > <ListItemText > <h6 className={classes.ListItemstyles}><i className="fas fa-school"></i> Manage Distributors</h6></ListItemText> {show4 ? <ExpandLess className={classes.Expanders} /> : <ExpandMore className={classes.Expanders} /> } </ListItem> {show3 ? <List > <ListItem button component={Link} to="/adminpanel/ADDNewDistributor"> <ListItemText ><h6 className={classes.sidebarchilds}>New Distributor</h6></ListItemText> </ListItem> <ListItem button component={Link} to="/adminpanel/DistributorLists"> <ListItemText ><h6 className={classes.sidebarchilds}>Distributor listis</h6></ListItemText> </ListItem> </List> : '' } <Divider className={classes.Dividers} /></> : null } */} { permissions.permissions == 1 ? <><ListItem button onClick={() => sidebarchildhandler(9)} > <ListItemText > <h6 className={classes.ListItemstyles}> <i className="fas fa-cog"></i>Manage Permissions </h6></ListItemText> {show9 ? <ExpandLess className={classes.Expanders} /> : <ExpandMore className={classes.Expanders} /> } </ListItem> {show9 ? <List > <ListItem button component={Link} to="/adminpanel/ManageRoles"> <ListItemText ><h6 className={classes.sidebarchilds}>Manage Roles</h6></ListItemText> </ListItem> <ListItem button component={Link} to="/adminpanel/ManageAdminAccounts"> <ListItemText ><h6 className={classes.sidebarchilds}>Manage Admin Accounts</h6></ListItemText> </ListItem> </List> : '' } <Divider className={classes.Dividers} /></> : null } {/* { permissions.reports == 1 ? <><ListItem button onClick={() => sidebarchildhandler(5)} > <ListItemText > <h6 className={classes.ListItemstyles}> <i className="fas fa-cog"></i>Reports </h6></ListItemText> {show5 ? <ExpandLess className={classes.Expanders} /> : <ExpandMore className={classes.Expanders} /> } </ListItem> {show5 ? <List > <ListItem button> <ListItemText ><h6 className={classes.sidebarchilds}>Reports</h6></ListItemText> </ListItem> </List> : '' } <Divider className={classes.Dividers} /></> : null } */} <ListItem button onClick={() => sidebarchildhandler(8)} > <ListItemText > <h6 className={classes.ListItemstyles}> <i className="fas fa-cog"></i> User </h6></ListItemText> {show8 ? <ExpandLess className={classes.Expanders} /> : <ExpandMore className={classes.Expanders} /> } </ListItem> {show8 ? <List > <ListItem button > <ListItemText ><h6 onClick={()=>{logout()}} className={classes.sidebarchilds}>Log-Out</h6></ListItemText> </ListItem> </List> : '' } </List> </div> ); return ( <div style={{ position: 'absolute', top: '0', left: '0', right: '0', bottom: '0', backgroundColor: 'white' }}> { display ? <div className={classes.root}> <CssBaseline /> <AppBar position="fixed" className={classes.appBar}> <Toolbar> <IconButton color="inherit" aria-label="open drawer" edge="start" onClick={handleDrawerToggle} className={classes.menuButton} > <MenuIcon /> </IconButton > <Typography variant="h6" noWrap> <h2 style={{ color: 'black', fontWeight: 'normal', fontFamily: 'monospace', fontSize: '25px', marginLeft: '10px' }} > <span> {/* <img style={{ width: '70px', height: '70px', marginRight: '0px', marginBottom: '0px' }} src="/images/site_logo.png"> */} {/* </img> */} </span> <span>Grace Impex Admin</span> </h2> </Typography> </Toolbar> </AppBar> <nav className={classes.drawer} aria-label="mailbox folders"> {/* The implementation can be swapped with js to avoid SEO duplication of links. */} <Hidden smUp implementation="css"> <Drawer container={container} variant="temporary" anchor={theme.direction === 'rtl' ? 'right' : 'left'} open={mobileOpen} onClose={handleDrawerToggle} classes={{ paper: classes.drawerPaper, }} ModalProps={{ keepMounted: true, // Better open performance on mobile. }} > {drawer} </Drawer> </Hidden> <Hidden xsDown implementation="css"> <Drawer classes={{ paper: classes.drawerPaper, }} variant="permanent" open > {drawer} </Drawer> </Hidden> </nav> <main id="adminpanel" className={classes.content}> <div className={classes.toolbar} /> <Route exect path="/adminpanel/Dashboard" component={Dashboard}></Route> <Route exect path="/adminpanel/AddProducts" component={AddProducts}></Route> <Route exect path="/adminpanel/ManageCategory" component={ManageCategory}></Route> <Route exect path="/adminpanel/ManageSubCategory" component={ManageSubCategory}></Route> <Route exect path="/adminpanel/ProductLists" component={ProductLists}></Route> <Route exect path="/adminpanel/EditProduct/:id" component={EditProduct}></Route> <Route exect path="/adminpanel/Cutomers" component={CustomerLists}></Route> <Route exect path="/adminpanel/Orders" component={OrderList}></Route> <Route exect path="/adminpanel/ProductValues/:id" component={ProductValues}></Route> <Route exect path="/adminpanel/ProductImages/:id" component={ProductImages}></Route> <Route exect path="/adminpanel/ManageRoles" component={ManageRoles}></Route> <Route exect path="/adminpanel/ManageAdminAccounts" component={ManageAdminAccounts}></Route> <Route exect path="/adminpanel/AddAdminAccount" component={AddAdminAccount}></Route> <Route exect path="/adminpanel/EditAdminAccount/:id" component={EditAdminAccount}></Route> <Route exect path="/adminpanel/ADDNewDistributor" component={ADDNewDistributor}></Route> <Route exect path="/adminpanel/DistributorLists" component={DistributorLists}></Route> <Route exect path="/adminpanel/DistributorView/:id" component={DistributorView}></Route> <Route exect path="/adminpanel/AddDiscountonproducts/:id" component={AddDiscountonproducts}></Route> </main> </div> : <div id="displayspinner" style={{ display: 'block', marginLeft: '45%', marginTop: '20%' }}> <div className="spinner-border text-info ml-2" style={{ width: '100px', height: '100px' }} role="status"> <span className="sr-only">Loading...</span> </div> </div> } </div> ); } export default Sidebar;
import boto3 aws_mag_con=boto3.session.Session(profile_name="ec2_developer") ''' ec2_con_re=aws_mag_con.resource(service_name="ec2",region_name='us-east-1') f_ebs_unused={"Name":"status","Values":["available"]} for each_volume in ec2_con_re.volumes.filter(Filters=[f_ebs_unused]): if not each_volume.tags: print(each_volume.id, each_volume.state,each_volume.tags) print("Deleting unused and untagged volumes.....") each_volume.delete() print("Delted all unused unatageed volumes.") ''' ec2_con_cli=aws_mag_con.client(service_name="ec2",region_name='us-east-1') for each_item in ec2_con_cli.describe_volumes()['Volumes']: if not "Tags" in each_item and each_item['State']=='available': print('Deleting ',each_item['VolumeId']) ec2_con_cli.delete_volume(VolumeId=each_item['VolumeId']) print("Delete all unused and untagged volumes.")
# Copyright (c) 2014 Mirantis 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. from sahara.plugins.cdh.v5_4_0 import config_helper as c_h from sahara.tests.unit import base from sahara.tests.unit.plugins.cdh import utils as ctu class ConfigHelperTestCase(base.SaharaTestCase): def test_is_swift_enabled(self): cluster = ctu.get_fake_cluster(cluster_configs={}) self.assertTrue(c_h.is_swift_enabled(cluster)) cluster = ctu.get_fake_cluster( cluster_configs={'general': {c_h.ENABLE_SWIFT.name: False}}) self.assertFalse(c_h.is_swift_enabled(cluster)) def test_get_swift_lib_url(self): cluster = ctu.get_fake_cluster(cluster_configs={}) self.assertEqual(c_h.DEFAULT_SWIFT_LIB_URL, c_h.get_swift_lib_url(cluster)) cluster = ctu.get_fake_cluster( cluster_configs={'general': {c_h.SWIFT_LIB_URL.name: 'spam'}}) self.assertEqual('spam', c_h.get_swift_lib_url(cluster))
import Transaction from '../../transaction'; import inherits from 'inherits'; import Debug from 'debug'; import { assign, isUndefined } from 'lodash'; const debug = Debug('knex:tx'); function Transaction_MySQL() { Transaction.apply(this, arguments); } inherits(Transaction_MySQL, Transaction); assign(Transaction_MySQL.prototype, { query(conn, sql, status, value) { const t = this; const q = this.trxClient .query(conn, sql) .catch( (err) => err.errno === 1305, () => { this.trxClient.logger.warn( 'Transaction was implicitly committed, do not mix transactions and ' + 'DDL with MySQL (#805)' ); } ) .catch(function(err) { status = 2; value = err; t._completed = true; debug('%s error running transaction query', t.txid); }) .tap(function() { if (status === 1) t._resolver(value); if (status === 2) { if (isUndefined(value)) { value = new Error(`Transaction rejected with non-error: ${value}`); } t._rejecter(value); } }); if (status === 1 || status === 2) { t._completed = true; } return q; }, }); export default Transaction_MySQL;
// flow-typed signature: 12a7eb4115916b2bc437d76d1b9a9629 // flow-typed version: <<STUB>>/jest-canvas-mock_v1.1.0/flow_v0.80.0 /** * This is an autogenerated libdef stub for: * * 'jest-canvas-mock' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to share your work with the * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ declare module 'jest-canvas-mock' { declare module.exports: any; } /** * We include stubs for each file inside this npm package in case you need to * require those files directly. Feel free to delete any files that aren't * needed. */ declare module 'jest-canvas-mock/__tests__/index' { declare module.exports: any; } declare module 'jest-canvas-mock/__tests__/server-side' { declare module.exports: any; } declare module 'jest-canvas-mock/lib/canvas' { declare module.exports: any; } declare module 'jest-canvas-mock/lib/context2d' { declare module.exports: any; } declare module 'jest-canvas-mock/lib/index' { declare module.exports: any; } declare module 'jest-canvas-mock/lib/window' { declare module.exports: any; } declare module 'jest-canvas-mock/src/canvas' { declare module.exports: any; } declare module 'jest-canvas-mock/src/context2d' { declare module.exports: any; } declare module 'jest-canvas-mock/src/index' { declare module.exports: any; } declare module 'jest-canvas-mock/src/window' { declare module.exports: any; } // Filename aliases declare module 'jest-canvas-mock/__tests__/index.js' { declare module.exports: $Exports<'jest-canvas-mock/__tests__/index'>; } declare module 'jest-canvas-mock/__tests__/server-side.js' { declare module.exports: $Exports<'jest-canvas-mock/__tests__/server-side'>; } declare module 'jest-canvas-mock/lib/canvas.js' { declare module.exports: $Exports<'jest-canvas-mock/lib/canvas'>; } declare module 'jest-canvas-mock/lib/context2d.js' { declare module.exports: $Exports<'jest-canvas-mock/lib/context2d'>; } declare module 'jest-canvas-mock/lib/index.js' { declare module.exports: $Exports<'jest-canvas-mock/lib/index'>; } declare module 'jest-canvas-mock/lib/window.js' { declare module.exports: $Exports<'jest-canvas-mock/lib/window'>; } declare module 'jest-canvas-mock/src/canvas.js' { declare module.exports: $Exports<'jest-canvas-mock/src/canvas'>; } declare module 'jest-canvas-mock/src/context2d.js' { declare module.exports: $Exports<'jest-canvas-mock/src/context2d'>; } declare module 'jest-canvas-mock/src/index.js' { declare module.exports: $Exports<'jest-canvas-mock/src/index'>; } declare module 'jest-canvas-mock/src/window.js' { declare module.exports: $Exports<'jest-canvas-mock/src/window'>; }
// not much in here yet... // allows HTML to be hidden / shown function toggle() { var ele = document.getElementById("toggleText"); var text = document.getElementById("displayText"); if(ele.style.display == "block") { ele.style.display = "none"; text.innerHTML = "(Show)"; } else { ele.style.display = "block"; text.innerHTML = "(Hide)"; } }
import pytest from fastai import * from fastai.vision import * def test_vision_datasets(): sds = (ImageItemList.from_folder(untar_data(URLs.MNIST_TINY)) .split_by_idx([0]) .label_from_folder() .add_test_folder()) assert np.array_equal(sds.train.classes, sds.valid.classes), 'train/valid classes same' assert len(sds.test)==20, "test_ds is correct size" def test_multi(): path = untar_data(URLs.PLANET_TINY) data = (ImageItemList.from_csv(path, 'labels.csv', folder='train', suffix='.jpg') .random_split_by_pct().label_from_df(sep=' ').databunch()) x,y = data.valid_ds[0] assert x.shape[0]==3 assert data.c==len(y.data)==14 assert len(str(y))>2 def test_camvid(): camvid = untar_data(URLs.CAMVID_TINY) path_lbl = camvid/'labels' path_img = camvid/'images' codes = np.loadtxt(camvid/'codes.txt', dtype=str) get_y_fn = lambda x: path_lbl/f'{x.stem}_P{x.suffix}' data = (SegmentationItemList.from_folder(path_img) .random_split_by_pct() .label_from_func(get_y_fn, classes=codes) .transform(get_transforms(), tfm_y=True) .databunch()) def test_coco(): coco = untar_data(URLs.COCO_TINY) images, lbl_bbox = get_annotations(coco/'train.json') img2bbox = dict(zip(images, lbl_bbox)) get_y_func = lambda o:img2bbox[o.name] data = (ObjectItemList.from_folder(coco) .random_split_by_pct() .label_from_func(get_y_func) .transform(get_transforms(), tfm_y=True) .databunch(bs=16, collate_fn=bb_pad_collate))
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=124)}([function(e,t,n){"use strict";e.exports=n(132)},function(e,t,n){"use strict";t.a=function(e,t){e.prototype=o()(t.prototype),e.prototype.constructor=e,e.__proto__=t};var r=n(154),o=n.n(r)},function(e,t,n){"use strict";t.a=a;var r=n(79),o=n.n(r);function a(){return(a=o.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}},function(e,t,n){"use strict";t.a=function(e,t){if(null==e)return{};var n,r,a={},l=i()(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);if(o.a){var s=o()(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a};var r=n(159),o=n.n(r),a=n(168),i=n.n(a)},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===a)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}"undefined"!==typeof e&&e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){e.exports=n(172)()},function(e,t,n){"use strict";t.e=p,n.d(t,"a",function(){return d}),n.d(t,"c",function(){return h}),n.d(t,"b",function(){return m}),t.d=function(e){var t,n=((t={})[p(e)]=!0,t);if(e.bsSize){var r=u.b[e.bsSize]||e.bsSize;n[p(e,r)]=!0}e.bsStyle&&(n[p(e,e.bsStyle)]=!0);return n},t.f=function(e){var t={};return o()(e).forEach(function(e){var n=e[0],r=e[1];v(n)||(t[n]=r)}),[b(e),t]},t.g=function(e,t){var n={};t.forEach(function(e){n[e]=!0});var r={};return o()(e).forEach(function(e){var t=e[0],o=e[1];v(t)||n[t]||(r[t]=o)}),[b(e),r]};var r=n(90),o=n.n(r),a=n(2),i=n(41),l=n.n(i),s=n(5),c=n.n(s),u=n(10);function f(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return"function"===typeof n[n.length-1]?e.apply(void 0,n):function(t){return e.apply(void 0,n.concat([t]))}}}function p(e,t){var n=(e.bsClass||"").trim();return null==n&&l()(!1),n+(t?"-"+t:"")}var d=f(function(e,t){var n=t.propTypes||(t.propTypes={}),r=t.defaultProps||(t.defaultProps={});return n.bsClass=c.a.string,r.bsClass=e,t}),h=f(function(e,t,n){"string"!==typeof t&&(n=t,t=void 0);var r=n.STYLES||[],o=n.propTypes||{};e.forEach(function(e){-1===r.indexOf(e)&&r.push(e)});var i=c.a.oneOf(r);(n.STYLES=r,i._values=r,n.propTypes=Object(a.a)({},o,{bsStyle:i}),void 0!==t)&&((n.defaultProps||(n.defaultProps={})).bsStyle=t);return n}),m=f(function(e,t,n){"string"!==typeof t&&(n=t,t=void 0);var r=n.SIZES||[],o=n.propTypes||{};e.forEach(function(e){-1===r.indexOf(e)&&r.push(e)});var i=[];r.forEach(function(e){var t=u.b[e];t&&t!==e&&i.push(t),i.push(e)});var l=c.a.oneOf(i);return l._values=i,n.SIZES=r,n.propTypes=Object(a.a)({},o,{bsSize:l}),void 0!==t&&(n.defaultProps||(n.defaultProps={}),n.defaultProps.bsSize=t),n});function b(e){return{bsClass:e.bsClass,bsSize:e.bsSize,bsStyle:e.bsStyle,bsRole:e.bsRole}}function v(e){return"bsClass"===e||"bsSize"===e||"bsStyle"===e||"bsRole"===e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(0)),o=n(182),a=i(n(42));function i(e){return e&&e.__esModule?e:{default:e}}t.default=(0,a.default)(function(e,t,n,a,i){var l=e[t];return r.default.isValidElement(l)?new Error("Invalid "+a+" `"+i+"` of type ReactElement supplied to `"+n+"`,expected an element type (a string , component class, or function component)."):(0,o.isValidElementType)(l)?null:new Error("Invalid "+a+" `"+i+"` of value `"+l+"` supplied to `"+n+"`, expected an element type (a string , component class, or function component).")}),e.exports=t.default},function(e,t,n){"use strict";t.a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(function(e){return null!=e}).reduce(function(e,t){if("function"!==typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r),t.apply(this,r)}},null)}},function(e,t,n){"use strict";t.a=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";n.d(t,"c",function(){return r}),n.d(t,"b",function(){return o}),n.d(t,"a",function(){return a}),n.d(t,"d",function(){return i}),n.d(t,"e",function(){return l});var r={LARGE:"large",SMALL:"small",XSMALL:"xsmall"},o={large:"lg",medium:"md",small:"sm",xsmall:"xs",lg:"lg",md:"md",sm:"sm",xs:"xs"},a=["lg","md","sm","xs"],i={SUCCESS:"success",WARNING:"warning",DANGER:"danger",INFO:"info"},l={DEFAULT:"default",PRIMARY:"primary",LINK:"link",INVERSE:"inverse"}},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(133)},function(e,t,n){"use strict";var r=n(0),o=n.n(r);t.a={map:function(e,t,n){var r=0;return o.a.Children.map(e,function(e){return o.a.isValidElement(e)?t.call(n,e,r++):e})},forEach:function(e,t,n){var r=0;o.a.Children.forEach(e,function(e){o.a.isValidElement(e)&&t.call(n,e,r++)})},count:function(e){var t=0;return o.a.Children.forEach(e,function(e){o.a.isValidElement(e)&&++t}),t},find:function(e,t,n){var r,a=0;return o.a.Children.forEach(e,function(e){r||o.a.isValidElement(e)&&t.call(n,e,a++)&&(r=e)}),r},filter:function(e,t,n){var r=0,a=[];return o.a.Children.forEach(e,function(e){o.a.isValidElement(e)&&t.call(n,e,r++)&&a.push(e)}),a},every:function(e,t,n){var r=0,a=!0;return o.a.Children.forEach(e,function(e){a&&o.a.isValidElement(e)&&(t.call(n,e,r++)||(a=!1))}),a},some:function(e,t,n){var r=0,a=!1;return o.a.Children.forEach(e,function(e){a||o.a.isValidElement(e)&&t.call(n,e,r++)&&(a=!0)}),a},toArray:function(e){var t=[];return o.a.Children.forEach(e,function(e){o.a.isValidElement(e)&&t.push(e)}),t}}},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(9),l=n(0),s=n.n(l),c=n(5),u=n.n(c),f=n(7),p=n.n(f),d=n(8),h={href:u.a.string,onClick:u.a.func,onKeyDown:u.a.func,disabled:u.a.bool,role:u.a.string,tabIndex:u.a.oneOfType([u.a.number,u.a.string]),componentClass:p.a};function m(e){return!e||"#"===e.trim()}var b=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleClick=r.handleClick.bind(Object(i.a)(r)),r.handleKeyDown=r.handleKeyDown.bind(Object(i.a)(r)),r}Object(a.a)(t,e);var n=t.prototype;return n.handleClick=function(e){var t=this.props,n=t.disabled,r=t.href,o=t.onClick;(n||m(r))&&e.preventDefault(),n?e.stopPropagation():o&&o(e)},n.handleKeyDown=function(e){" "===e.key&&(e.preventDefault(),this.handleClick(e))},n.render=function(){var e=this.props,t=e.componentClass,n=e.disabled,a=e.onKeyDown,i=Object(o.a)(e,["componentClass","disabled","onKeyDown"]);return m(i.href)&&(i.role=i.role||"button",i.href=i.href||"#"),n&&(i.tabIndex=-1,i.style=Object(r.a)({pointerEvents:"none"},i.style)),s.a.createElement(t,Object(r.a)({},i,{onClick:this.handleClick,onKeyDown:Object(d.a)(this.handleKeyDown,a)}))},t}(s.a.Component);b.propTypes=h,b.defaultProps={componentClass:"a"},t.a=b},function(e,t,n){var r=n(58)("wks"),o=n(39),a=n(19).Symbol,i="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=i&&a[e]||(i?a:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(19),o=n(14),a=n(80),i=n(31),l=n(21),s=function(e,t,n){var c,u,f,p=e&s.F,d=e&s.G,h=e&s.S,m=e&s.P,b=e&s.B,v=e&s.W,y=d?o:o[t]||(o[t]={}),g=y.prototype,O=d?r:h?r[t]:(r[t]||{}).prototype;for(c in d&&(n=t),n)(u=!p&&O&&void 0!==O[c])&&l(y,c)||(f=u?O[c]:n[c],y[c]=d&&"function"!=typeof O[c]?n[c]:b&&u?a(f,r):v&&O[c]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):m&&"function"==typeof f?a(Function.call,f):f,m&&((y.virtual||(y.virtual={}))[c]=f,e&s.R&&g&&!g[c]&&i(g,c,f)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=!("undefined"===typeof window||!window.document||!window.document.createElement),e.exports=t.default},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(32),o=n(81),a=n(53),i=Object.defineProperty;t.f=n(23)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),o)try{return i(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function e(t,n,a){void 0===a&&(a=[]);var l=t.displayName||t.name||"Component";var s=o.isReactComponent(t);var c=Object.keys(n);var u=c.map(o.defaultKey);!s&&a.length&&invariant(!1);var f=function(e){var a,l;function f(){for(var t,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(t=e.call.apply(e,[this].concat(o))||this).handlers=Object.create(null),c.forEach(function(e){var r=n[e];t.handlers[r]=function(n){if(t.props[r]){var o;t._notifying=!0;for(var a=arguments.length,i=new Array(a>1?a-1:0),l=1;l<a;l++)i[l-1]=arguments[l];(o=t.props)[r].apply(o,[n].concat(i)),t._notifying=!1}t._values[e]=n,t.unmounted||t.forceUpdate()}}),s&&(t.attachRef=function(e){t.inner=e}),t}l=e,(a=f).prototype=Object.create(l.prototype),a.prototype.constructor=a,a.__proto__=l;var p=f.prototype;return p.shouldComponentUpdate=function(){return!this._notifying},p.componentWillMount=function(){var e=this,t=this.props;this._values=Object.create(null),c.forEach(function(n){e._values[n]=t[o.defaultKey(n)]})},p.componentWillReceiveProps=function(e){var t=this,n=this.props;c.forEach(function(r){!o.isProp(e,r)&&o.isProp(n,r)&&(t._values[r]=e[o.defaultKey(r)])})},p.componentWillUnmount=function(){this.unmounted=!0},p.getControlledInstance=function(){return this.inner},p.render=function(){var e=this,n=i({},this.props);u.forEach(function(e){delete n[e]});var o={};return c.forEach(function(t){var n=e.props[t];o[t]=void 0!==n?n:e._values[t]}),r.default.createElement(t,i({},n,o,this.handlers,{ref:this.attachRef}))},f}(r.default.Component);f.displayName="Uncontrolled("+l+")";f.propTypes=o.uncontrolledPropTypes(n,l);a.forEach(function(e){f.prototype[e]=function(){var t;return(t=this.inner)[e].apply(t,arguments)}});f.ControlledComponent=t;f.deferControlTo=function(t,r,o){return void 0===r&&(r={}),e(t,i({},n,r),o)};return f};var r=a(n(0)),o=(a(n(41)),function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(174)));function a(e){return e&&e.__esModule?e:{default:e}}function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}e.exports=t.default},function(e,t,n){e.exports=!n(24)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(83),o=n(59);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(84),o=n(55);e.exports=function(e){return r(o(e))}},function(e,t,n){e.exports=n(178)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&e.ownerDocument||document},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(18),a=(r=o)&&r.__esModule?r:{default:r};function i(e,t){if(t)do{if(t===e)return!0}while(t=t.parentNode);return!1}t.default=a.default?function(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):i(e,t)}:i,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return(0,o.default)(r.default.findDOMNode(e))};var r=a(n(11)),o=a(n(28));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){var r=n(20),o=n(34);e.exports=n(23)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(33);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";var r=n(27),o=n.n(r),a=n(3),i=n(2),l=n(1),s=n(4),c=n.n(s),u=n(0),f=n.n(u),p=n(5),d=n.n(p),h=n(7),m=n.n(h),b=n(6),v=n(10),y=n(15),g={active:d.a.bool,disabled:d.a.bool,block:d.a.bool,onClick:d.a.func,componentClass:m.a,href:d.a.string,type:d.a.oneOf(["button","reset","submit"])},O=function(e){function t(){return e.apply(this,arguments)||this}Object(l.a)(t,e);var n=t.prototype;return n.renderAnchor=function(e,t){return f.a.createElement(y.a,Object(i.a)({},e,{className:c()(t,e.disabled&&"disabled")}))},n.renderButton=function(e,t){var n=e.componentClass,r=Object(a.a)(e,["componentClass"]),o=n||"button";return f.a.createElement(o,Object(i.a)({},r,{type:r.type||"button",className:t}))},n.render=function(){var e,t=this.props,n=t.active,r=t.block,o=t.className,l=Object(a.a)(t,["active","block","className"]),s=Object(b.f)(l),u=s[0],f=s[1],p=Object(i.a)({},Object(b.d)(u),((e={active:n})[Object(b.e)(u,"block")]=r,e)),d=c()(o,p);return f.href?this.renderAnchor(f,d):this.renderButton(f,d)},t}(f.a.Component);O.propTypes=g,O.defaultProps={active:!1,block:!1,disabled:!1},t.a=Object(b.a)("btn",Object(b.b)([v.c.LARGE,v.c.SMALL,v.c.XSMALL],Object(b.c)(o()(v.d).concat([v.e.DEFAULT,v.e.PRIMARY,v.e.LINK]),v.e.DEFAULT,O)))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var c="",u="",f=t;if("string"===typeof t){if(void 0===n)return e.style[(0,r.default)(t)]||(0,a.default)(e).getPropertyValue((0,o.default)(t));(f={})[t]=n}Object.keys(f).forEach(function(t){var n=f[t];n||0===n?(0,s.default)(t)?u+=t+"("+n+") ":c+=(0,o.default)(t)+": "+n+";":(0,i.default)(e,(0,o.default)(t))}),u&&(c+=l.transform+": "+u+";");e.style.cssText+=";"+c};var r=c(n(95)),o=c(n(190)),a=c(n(192)),i=c(n(193)),l=n(65),s=c(n(194));function c(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t){e.exports=!0},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(55);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,a,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,l],u=0;(s=new Error(t.replace(/%s/g,function(){return c[u++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t,n,r,o,a,i){var l=o||"<<anonymous>>",s=i||r;if(null==n[r])return t?new Error("Required "+a+" `"+s+"` was not specified in `"+l+"`."):null;for(var c=arguments.length,u=Array(c>6?c-6:0),f=6;f<c;f++)u[f-6]=arguments[f];return e.apply(void 0,[n,r,l,a,s].concat(u))}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,a.default)(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=null;return t.forEach(function(e){if(null==o){var t=e.apply(void 0,n);null!=t&&(o=t)}}),o})};var r,o=n(42),a=(r=o)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(9),l=n(4),s=n.n(l),c=n(98),u=n.n(c),f=n(29),p=n.n(f),d=n(68),h=n.n(d),m=n(0),b=n.n(m),v=n(5),y=n.n(v),g=n(11),O=n.n(g),E=n(43),x=n.n(E),C=n(7),w=n.n(C),_=n(45),j=n.n(_),T=n(22),N=n.n(T),k=n(13),S=(n.n(k),n(64)),P=n(201),M=n(101),R=n(6),I=n(8),D=n(92),A=n(12),L=M.a.defaultProps.bsRole,F=P.a.defaultProps.bsRole,U={dropup:y.a.bool,id:j()(y.a.oneOfType([y.a.string,y.a.number])),componentClass:w.a,children:x()(Object(D.c)(L,F),Object(D.a)(F)),disabled:y.a.bool,pullRight:y.a.bool,open:y.a.bool,defaultOpen:y.a.bool,onToggle:y.a.func,onSelect:y.a.func,role:y.a.string,rootCloseEvent:y.a.oneOf(["click","mousedown"]),onMouseEnter:y.a.func,onMouseLeave:y.a.func},B={componentClass:S.a},H=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleClick=r.handleClick.bind(Object(i.a)(r)),r.handleKeyDown=r.handleKeyDown.bind(Object(i.a)(r)),r.handleClose=r.handleClose.bind(Object(i.a)(r)),r._focusInDropdown=!1,r.lastOpenEventType=null,r}Object(a.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.focusNextOnOpen()},n.componentWillUpdate=function(e){!e.open&&this.props.open&&(this._focusInDropdown=p()(O.a.findDOMNode(this.menu),u()(document)))},n.componentDidUpdate=function(e){var t=this.props.open,n=e.open;t&&!n&&this.focusNextOnOpen(),!t&&n&&this._focusInDropdown&&(this._focusInDropdown=!1,this.focus())},n.focus=function(){var e=O.a.findDOMNode(this.toggle);e&&e.focus&&e.focus()},n.focusNextOnOpen=function(){var e=this.menu;e&&e.focusNext&&("keydown"!==this.lastOpenEventType&&"menuitem"!==this.props.role||e.focusNext())},n.handleClick=function(e){this.props.disabled||this.toggleOpen(e,{source:"click"})},n.handleClose=function(e,t){this.props.open&&this.toggleOpen(e,t)},n.handleKeyDown=function(e){if(!this.props.disabled)switch(e.keyCode){case h.a.codes.down:this.props.open?this.menu.focusNext&&this.menu.focusNext():this.toggleOpen(e,{source:"keydown"}),e.preventDefault();break;case h.a.codes.esc:case h.a.codes.tab:this.handleClose(e,{source:"keydown"})}},n.toggleOpen=function(e,t){var n=!this.props.open;n&&(this.lastOpenEventType=t.source),this.props.onToggle&&this.props.onToggle(n,e,t)},n.renderMenu=function(e,t){var n=this,a=t.id,i=t.onSelect,l=t.rootCloseEvent,s=Object(o.a)(t,["id","onSelect","rootCloseEvent"]),c=function(e){n.menu=e};return"string"===typeof e.ref||(c=Object(I.a)(e.ref,c)),Object(m.cloneElement)(e,Object(r.a)({},s,{ref:c,labelledBy:a,bsClass:Object(R.e)(s,"menu"),onClose:Object(I.a)(e.props.onClose,this.handleClose),onSelect:Object(I.a)(e.props.onSelect,i,function(e,t){return n.handleClose(t,{source:"select"})}),rootCloseEvent:l}))},n.renderToggle=function(e,t){var n=this,o=function(e){n.toggle=e};return"string"===typeof e.ref||(o=Object(I.a)(e.ref,o)),Object(m.cloneElement)(e,Object(r.a)({},t,{ref:o,bsClass:Object(R.e)(t,"toggle"),onClick:Object(I.a)(e.props.onClick,this.handleClick),onKeyDown:Object(I.a)(e.props.onKeyDown,this.handleKeyDown)}))},n.render=function(){var e,t=this,n=this.props,a=n.componentClass,i=n.id,l=n.dropup,c=n.disabled,u=n.pullRight,f=n.open,p=n.onSelect,d=n.role,h=n.bsClass,m=n.className,v=n.rootCloseEvent,y=n.children,g=Object(o.a)(n,["componentClass","id","dropup","disabled","pullRight","open","onSelect","role","bsClass","className","rootCloseEvent","children"]);delete g.onToggle;var O=((e={})[h]=!0,e.open=f,e.disabled=c,e);return l&&(O[h]=!1,O.dropup=!0),b.a.createElement(a,Object(r.a)({},g,{className:s()(m,O)}),A.a.map(y,function(e){switch(e.props.bsRole){case L:return t.renderToggle(e,{id:i,disabled:c,open:f,role:d,bsClass:h});case F:return t.renderMenu(e,{id:i,open:f,pullRight:u,bsClass:h,onSelect:p,rootCloseEvent:v});default:return e}}))},t}(b.a.Component);H.propTypes=U,H.defaultProps=B,Object(R.a)("dropdown",H);var z=N()(H,{open:"onToggle"});z.Toggle=M.a,z.Menu=P.a,t.a=z},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n,r,o,a){var i=r||"<<anonymous>>",l=a||n;if(null==t[n])return new Error("The "+o+" `"+l+"` is required to make `"+i+"` accessible for users of assistive technologies such as screen readers.");for(var s=arguments.length,c=Array(s>5?s-5:0),u=5;u<s;u++)c[u-5]=arguments[u];return e.apply(void 0,[t,n,r,o,a].concat(c))}},e.exports=t.default},function(e,t,n){"use strict";t.a=function(e,t){var n=t.propTypes,r={},a={};return o()(e).forEach(function(e){var t=e[0],o=e[1];n[t]?r[t]=o:a[t]=o}),[r,a]};var r=n(90),o=n.n(r)},function(e,t,n){"use strict";var r,o=n(2),a=n(3),i=n(1),l=n(4),s=n.n(l),c=n(0),u=n.n(c),f=n(5),p=n.n(f),d=n(97),h=n.n(d),m={in:p.a.bool,mountOnEnter:p.a.bool,unmountOnExit:p.a.bool,appear:p.a.bool,timeout:p.a.number,onEnter:p.a.func,onEntering:p.a.func,onEntered:p.a.func,onExit:p.a.func,onExiting:p.a.func,onExited:p.a.func},b=((r={})[d.ENTERING]="in",r[d.ENTERED]="in",r),v=function(e){function t(){return e.apply(this,arguments)||this}return Object(i.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,r=Object(a.a)(e,["className","children"]);return u.a.createElement(h.a,r,function(e,r){return u.a.cloneElement(n,Object(o.a)({},r,{className:s()("fade",t,n.props.className,b[e])}))})},t}(u.a.Component);v.propTypes=m,v.defaultProps={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},t.a=v},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(7),f=n.n(u),p=n(230),d=n(231),h=n(232),m=n(233),b=n(234),v=n(235),y=n(6),g={componentClass:f.a},O=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,a=Object(o.a)(e,["componentClass","className"]),i=Object(y.f)(a),s=i[0],u=i[1],f=Object(y.d)(s);return c.a.createElement(t,Object(r.a)({},u,{className:l()(n,f)}))},t}(c.a.Component);O.propTypes=g,O.defaultProps={componentClass:"div"},O.Heading=d.a,O.Body=p.a,O.Left=h.a,O.Right=v.a,O.List=m.a,O.ListItem=b.a,t.a=Object(y.a)("media",O)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=i(n(0)),a=i(n(42));function i(e){return e&&e.__esModule?e:{default:e}}t.default=(0,a.default)(function(e,t,n,a,i){var l=e[t],s="undefined"===typeof l?"undefined":r(l);return o.default.isValidElement(l)?new Error("Invalid "+a+" `"+i+"` of type ReactElement supplied to `"+n+"`, expected a ReactComponent or a DOMElement. You can usually obtain a ReactComponent or DOMElement from a ReactElement by attaching a ref to it."):"object"===s&&"function"===typeof l.render||1===l.nodeType?null:new Error("Invalid "+a+" `"+i+"` of value `"+l+"` supplied to `"+n+"`, expected a ReactComponent or a DOMElement.")}),e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e===e.window?e:9===e.nodeType&&(e.defaultView||e.parentWindow)},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return e="function"===typeof e?e():e,a.default.findDOMNode(e)||t};var r,o=n(11),a=(r=o)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,i,l=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var c in n=Object(arguments[s]))o.call(n,c)&&(l[c]=n[c]);if(r){i=r(n);for(var u=0;u<i.length;u++)a.call(n,i[u])&&(l[i[u]]=n[i[u]])}}return l}},function(e,t,n){var r=n(33);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(58)("keys"),o=n(39);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(14),o=n(19),a=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(38)?"pure":"global",copyright:"\xa9 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(32),o=n(157),a=n(59),i=n(57)("IE_PROTO"),l=function(){},s=function(){var e,t=n(82)("iframe"),r=a.length;for(t.style.display="none",n(158).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),s=e.F;r--;)delete s.prototype[a[r]];return s()};e.exports=Object.create||function(e,t){var n;return null!==e?(l.prototype=r(e),n=new l,l.prototype=null,n[i]=e):n=s(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(20).f,o=n(21),a=n(16)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(1),o=n(5),a=n.n(o),i=n(0),l=n.n(i),s={label:a.a.string.isRequired,onClick:a.a.func},c=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.onClick;return l.a.createElement("button",{type:"button",className:"close",onClick:n},l.a.createElement("span",{"aria-hidden":"true"},"\xd7"),l.a.createElement("span",{className:"sr-only"},t))},t}(l.a.Component);c.propTypes=s,c.defaultProps={label:"Close"},t.a=c},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(43),d=n.n(p),h=n(36),m=n(6),b={vertical:f.a.bool,justified:f.a.bool,block:d()(f.a.bool,function(e){var t=e.block,n=e.vertical;return t&&!n?new Error("`block` requires `vertical` to be set to have any effect"):null})},v=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.block,a=t.justified,i=t.vertical,s=t.className,u=Object(o.a)(t,["block","justified","vertical","className"]),f=Object(m.f)(u),p=f[0],d=f[1],b=Object(r.a)({},Object(m.d)(p),((e={})[Object(m.e)(p)]=!i,e[Object(m.e)(p,"vertical")]=i,e[Object(m.e)(p,"justified")]=a,e[Object(m.e)(h.a.defaultProps,"block")]=n,e));return c.a.createElement("div",Object(r.a)({},d,{className:l()(s,b)}))},t}(c.a.Component);v.propTypes=b,v.defaultProps={block:!1,justified:!1,vertical:!1},t.a=Object(m.a)("btn-group",v)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationEnd=t.animationDelay=t.animationTiming=t.animationDuration=t.animationName=t.transitionEnd=t.transitionDuration=t.transitionDelay=t.transitionTiming=t.transitionProperty=t.transform=void 0;var r,o=n(18);var a="transform",i=void 0,l=void 0,s=void 0,c=void 0,u=void 0,f=void 0,p=void 0,d=void 0,h=void 0,m=void 0,b=void 0;if(((r=o)&&r.__esModule?r:{default:r}).default){var v=function(){for(var e=document.createElement("div").style,t={O:function(e){return"o"+e.toLowerCase()},Moz:function(e){return e.toLowerCase()},Webkit:function(e){return"webkit"+e},ms:function(e){return"MS"+e}},n=Object.keys(t),r=void 0,o=void 0,a="",i=0;i<n.length;i++){var l=n[i];if(l+"TransitionProperty"in e){a="-"+l.toLowerCase(),r=t[l]("TransitionEnd"),o=t[l]("AnimationEnd");break}}!r&&"transitionProperty"in e&&(r="transitionend");!o&&"animationName"in e&&(o="animationend");return e=null,{animationEnd:o,transitionEnd:r,prefix:a}}();i=v.prefix,t.transitionEnd=l=v.transitionEnd,t.animationEnd=s=v.animationEnd,t.transform=a=i+"-"+a,t.transitionProperty=c=i+"-transition-property",t.transitionDuration=u=i+"-transition-duration",t.transitionDelay=p=i+"-transition-delay",t.transitionTiming=f=i+"-transition-timing-function",t.animationName=d=i+"-animation-name",t.animationDuration=h=i+"-animation-duration",t.animationTiming=m=i+"-animation-delay",t.animationDelay=b=i+"-animation-timing-function"}t.transform=a,t.transitionProperty=c,t.transitionTiming=f,t.transitionDelay=p,t.transitionDuration=u,t.transitionEnd=l,t.animationName=d,t.animationDuration=h,t.animationTiming=m,t.animationDelay=b,t.animationEnd=s,t.default={transform:a,end:l,property:c,timing:f,delay:p,duration:u}},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(6),d={glyph:f.a.string.isRequired},h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.glyph,a=t.className,i=Object(o.a)(t,["glyph","className"]),s=Object(p.f)(i),u=s[0],f=s[1],d=Object(r.a)({},Object(p.d)(u),((e={})[Object(p.e)(u,n)]=!0,e));return c.a.createElement("span",Object(r.a)({},f,{className:l()(a,d)}))},t}(c.a.Component);h.propTypes=d,t.a=Object(p.a)("glyphicon",h)},function(e,t,n){"use strict";var r,o=n(2),a=n(3),i=n(9),l=n(1),s=n(4),c=n.n(s),u=n(37),f=n.n(u),p=n(0),d=n.n(p),h=n(5),m=n.n(h),b=n(97),v=n.n(b),y=n(96),g=n(8),O={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};var E=((r={})[b.EXITED]="collapse",r[b.EXITING]="collapsing",r[b.ENTERING]="collapsing",r[b.ENTERED]="collapse in",r),x={in:m.a.bool,mountOnEnter:m.a.bool,unmountOnExit:m.a.bool,appear:m.a.bool,timeout:m.a.number,onEnter:m.a.func,onEntering:m.a.func,onEntered:m.a.func,onExit:m.a.func,onExiting:m.a.func,onExited:m.a.func,dimension:m.a.oneOfType([m.a.oneOf(["height","width"]),m.a.func]),getDimensionValue:m.a.func,role:m.a.string},C={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,dimension:"height",getDimensionValue:function(e,t){var n=t["offset"+Object(y.a)(e)],r=O[e];return n+parseInt(f()(t,r[0]),10)+parseInt(f()(t,r[1]),10)}},w=function(e){function t(){for(var t,n,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t=n=e.call.apply(e,[this].concat(o))||this,n.handleEnter=function(e){e.style[n.getDimension()]="0"},n.handleEntering=function(e){var t=n.getDimension();e.style[t]=n._getScrollDimensionValue(e,t)},n.handleEntered=function(e){e.style[n.getDimension()]=null},n.handleExit=function(e){var t=n.getDimension();e.style[t]=n.props.getDimensionValue(t,e)+"px",e.offsetHeight},n.handleExiting=function(e){e.style[n.getDimension()]="0"},t||Object(i.a)(n)}Object(l.a)(t,e);var n=t.prototype;return n.getDimension=function(){return"function"===typeof this.props.dimension?this.props.dimension():this.props.dimension},n._getScrollDimensionValue=function(e,t){return e["scroll"+Object(y.a)(t)]+"px"},n.render=function(){var e=this,t=this.props,n=t.onEnter,r=t.onEntering,i=t.onEntered,l=t.onExit,s=t.onExiting,u=t.className,f=t.children,p=Object(a.a)(t,["onEnter","onEntering","onEntered","onExit","onExiting","className","children"]);delete p.dimension,delete p.getDimensionValue;var h=Object(g.a)(this.handleEnter,n),m=Object(g.a)(this.handleEntering,r),b=Object(g.a)(this.handleEntered,i),y=Object(g.a)(this.handleExit,l),O=Object(g.a)(this.handleExiting,s);return d.a.createElement(v.a,Object(o.a)({},p,{"aria-expanded":p.role?p.in:null,onEnter:h,onEntering:m,onEntered:b,onExit:y,onExiting:O}),function(t,n){return d.a.cloneElement(f,Object(o.a)({},n,{className:c()(u,f.props.className,E[t],"width"===e.getDimension()&&"width")}))})},t}(d.a.Component);w.propTypes=x,w.defaultProps=C,t.a=w},function(e,t){function n(e){if(e&&"object"===typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"===typeof e)return i[e];var n,a=String(e);return(n=r[a.toLowerCase()])?n:(n=o[a.toLowerCase()])||(1===a.length?a.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"===typeof e){var n=e.which||e.keyCode||e.charCode;if(null===n||void 0===n)return!1;if("string"===typeof t){var a;if(a=r[t.toLowerCase()])return a===n;if(a=o[t.toLowerCase()])return a===n}else if("number"===typeof t)return t===n;return!1}};var r=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=t.aliases={windows:91,"\u21e7":16,"\u2325":18,"\u2303":17,"\u2318":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(a=97;a<123;a++)r[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)r[a-48]=a;for(a=1;a<13;a++)r["f"+a]=a+111;for(a=0;a<10;a++)r["numpad "+a]=a+96;var i=t.names=t.title={};for(a in r)i[r[a]]=a;for(var l in o)r[l]=o[l]},function(e,t){e.exports={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(18);var a=function(){};((r=o)&&r.__esModule?r:{default:r}).default&&(a=document.addEventListener?function(e,t,n,r){return e.addEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.attachEvent("on"+t,function(t){(t=t||window.event).target=t.target||t.srcElement,t.currentTarget=e,n.call(e,t)})}:void 0),t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(18);var a=function(){};((r=o)&&r.__esModule?r:{default:r}).default&&(a=document.addEventListener?function(e,t,n,r){return e.removeEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.detachEvent("on"+t,n)}:void 0),t.default=a,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},o=i(n(0)),a=i(n(273));function i(e){return e&&e.__esModule?e:{default:e}}t.default=(0,a.default)(function(e,t,n,a,i){var l=e[t],s="undefined"===typeof l?"undefined":r(l);return o.default.isValidElement(l)?new Error("Invalid "+a+" `"+i+"` of type ReactElement supplied to `"+n+"`, expected an element type (a string or a ReactClass)."):"function"!==s&&"string"!==s?new Error("Invalid "+a+" `"+i+"` of value `"+l+"` supplied to `"+n+"`, expected an element type (a string or a ReactClass)."):null})},function(e,t,n){"use strict";var r=n(3),o=n(1),a=n(0),i=n.n(a),l=n(5),s=n.n(l),c=n(22),u=n.n(c),f=s.a.oneOfType([s.a.string,s.a.number]),p={id:function(e){var t=null;if(!e.generateChildId){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=f.apply(void 0,[e].concat(r)))||e.id||(t=new Error("In order to properly initialize Tabs in a way that is accessible to assistive technologies (such as screen readers) an `id` or a `generateChildId` prop to TabContainer is required"))}return t},generateChildId:s.a.func,onSelect:s.a.func,activeKey:s.a.any},d={$bs_tabContainer:s.a.shape({activeKey:s.a.any,onSelect:s.a.func.isRequired,getTabId:s.a.func.isRequired,getPaneId:s.a.func.isRequired})},h=function(e){function t(){return e.apply(this,arguments)||this}Object(o.a)(t,e);var n=t.prototype;return n.getChildContext=function(){var e=this.props,t=e.activeKey,n=e.onSelect,r=e.generateChildId,o=e.id,a=r||function(e,t){return o?o+"-"+t+"-"+e:null};return{$bs_tabContainer:{activeKey:t,onSelect:n,getTabId:function(e){return a(e,"tab")},getPaneId:function(e){return a(e,"pane")}}}},n.render=function(){var e=this.props,t=e.children,n=Object(r.a)(e,["children"]);return delete n.generateChildId,delete n.onSelect,delete n.activeKey,i.a.cloneElement(i.a.Children.only(t),n)},t}(i.a.Component);h.propTypes=p,h.childContextTypes=d,t.a=u()(h,{activeKey:"onSelect"})},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(9),l=n(4),s=n.n(l),c=n(0),u=n.n(c),f=n(5),p=n.n(f),d=n(7),h=n.n(d),m=n(6),b={componentClass:h.a,animation:p.a.oneOfType([p.a.bool,h.a]),mountOnEnter:p.a.bool,unmountOnExit:p.a.bool},v={$bs_tabContainer:p.a.shape({activeKey:p.a.any})},y={$bs_tabContent:p.a.shape({bsClass:p.a.string,animation:p.a.oneOfType([p.a.bool,h.a]),activeKey:p.a.any,mountOnEnter:p.a.bool,unmountOnExit:p.a.bool,onPaneEnter:p.a.func.isRequired,onPaneExited:p.a.func.isRequired,exiting:p.a.bool.isRequired})},g=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handlePaneEnter=r.handlePaneEnter.bind(Object(i.a)(r)),r.handlePaneExited=r.handlePaneExited.bind(Object(i.a)(r)),r.state={activeKey:null,activeChild:null},r}Object(a.a)(t,e);var n=t.prototype;return n.getChildContext=function(){var e=this.props,t=e.bsClass,n=e.animation,r=e.mountOnEnter,o=e.unmountOnExit,a=this.state.activeKey,i=this.getContainerActiveKey(),l=null!=a&&a!==i;return{$bs_tabContent:{bsClass:t,animation:n,activeKey:null!=a?a:i,mountOnEnter:r,unmountOnExit:o,onPaneEnter:this.handlePaneEnter,onPaneExited:this.handlePaneExited,exiting:l}}},n.componentWillReceiveProps=function(e){!e.animation&&this.state.activeChild&&this.setState({activeKey:null,activeChild:null})},n.componentWillUnmount=function(){this.isUnmounted=!0},n.getContainerActiveKey=function(){var e=this.context.$bs_tabContainer;return e&&e.activeKey},n.handlePaneEnter=function(e,t){return!!this.props.animation&&(t===this.getContainerActiveKey()&&(this.setState({activeKey:t,activeChild:e}),!0))},n.handlePaneExited=function(e){this.isUnmounted||this.setState(function(t){return t.activeChild!==e?null:{activeKey:null,activeChild:null}})},n.render=function(){var e=this.props,t=e.componentClass,n=e.className,a=Object(o.a)(e,["componentClass","className"]),i=Object(m.g)(a,["animation","mountOnEnter","unmountOnExit"]),l=i[0],c=i[1];return u.a.createElement(t,Object(r.a)({},c,{className:s()(n,Object(m.e)(l,"content"))}))},t}(u.a.Component);g.propTypes=b,g.defaultProps={componentClass:"div",animation:!0,mountOnEnter:!1,unmountOnExit:!1},g.contextTypes=v,g.childContextTypes=y,t.a=Object(m.a)("tab",g)},function(e,t,n){"use strict";var r=n(127);function o(){}var a=null,i={};function l(e){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("Promise constructor's argument is not a function");this._75=0,this._83=0,this._18=null,this._38=null,e!==o&&d(e,this)}function s(e,t){for(;3===e._83;)e=e._18;if(l._47&&l._47(e),0===e._83)return 0===e._75?(e._75=1,void(e._38=t)):1===e._75?(e._75=2,void(e._38=[e._38,t])):void e._38.push(t);!function(e,t){r(function(){var n=1===e._83?t.onFulfilled:t.onRejected;if(null!==n){var r=function(e,t){try{return e(t)}catch(e){return a=e,i}}(n,e._18);r===i?u(t.promise,a):c(t.promise,r)}else 1===e._83?c(t.promise,e._18):u(t.promise,e._18)})}(e,t)}function c(e,t){if(t===e)return u(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"===typeof t||"function"===typeof t)){var n=function(e){try{return e.then}catch(e){return a=e,i}}(t);if(n===i)return u(e,a);if(n===e.then&&t instanceof l)return e._83=3,e._18=t,void f(e);if("function"===typeof n)return void d(n.bind(t),e)}e._83=1,e._18=t,f(e)}function u(e,t){e._83=2,e._18=t,l._71&&l._71(e,t),f(e)}function f(e){if(1===e._75&&(s(e,e._38),e._38=null),2===e._75){for(var t=0;t<e._38.length;t++)s(e,e._38[t]);e._38=null}}function p(e,t,n){this.onFulfilled="function"===typeof e?e:null,this.onRejected="function"===typeof t?t:null,this.promise=n}function d(e,t){var n=!1,r=function(e,t,n){try{e(t,n)}catch(e){return a=e,i}}(e,function(e){n||(n=!0,c(t,e))},function(e){n||(n=!0,u(t,e))});n||r!==i||(n=!0,u(t,a))}e.exports=l,l._47=null,l._71=null,l._44=o,l.prototype.then=function(e,t){if(this.constructor!==l)return function(e,t,n){return new e.constructor(function(r,a){var i=new l(o);i.then(r,a),s(e,new p(t,n,i))})}(this,e,t);var n=new l(o);return s(this,new p(e,t,n)),n}},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,o,a,i,l,s){if(r(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,a,i,l,s],f=0;(c=new Error(t.replace(/%s/g,function(){return u[f++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){e.exports=n(148)},function(e,t,n){var r=n(150);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){e.exports=!n(23)&&!n(24)(function(){return 7!=Object.defineProperty(n(82)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(33),o=n(19).document,a=r(o)&&r(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){var r=n(21),o=n(26),a=n(152)(!1),i=n(57)("IE_PROTO");e.exports=function(e,t){var n,l=o(e),s=0,c=[];for(n in l)n!=i&&r(l,n)&&c.push(n);for(;t.length>s;)r(l,n=t[s++])&&(~a(c,n)||c.push(n));return c}},function(e,t,n){var r=n(54);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(56),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){"use strict";var r=n(3),o=n(2),a=n(9),i=n(1),l=n(4),s=n.n(l),c=n(5),u=n.n(c),f=n(0),p=n.n(f),d=n(22),h=n.n(d),m=n(6),b=n(12),v=n(92),y={accordion:u.a.bool,activeKey:u.a.any,onSelect:u.a.func,role:u.a.string,generateChildId:u.a.func,id:Object(v.b)("PanelGroup")},g={$bs_panelGroup:u.a.shape({getId:u.a.func,headerRole:u.a.string,panelRole:u.a.string,activeKey:u.a.any,onToggle:u.a.func})},O=function(e){function t(){for(var t,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return t=n=e.call.apply(e,[this].concat(o))||this,n.handleSelect=function(e,t,r){t?n.props.onSelect(e,r):n.props.activeKey===e&&n.props.onSelect(null,r)},t||Object(a.a)(n)}Object(i.a)(t,e);var n=t.prototype;return n.getChildContext=function(){var e=this.props,t=e.activeKey,n=e.accordion,r=e.generateChildId,a=e.id,i=null;return n&&(i=r||function(e,t){return a?a+"-"+t+"-"+e:null}),{$bs_panelGroup:Object(o.a)({getId:i,headerRole:"tab",panelRole:"tabpanel"},n&&{activeKey:t,onToggle:this.handleSelect})}},n.render=function(){var e=this.props,t=e.accordion,n=e.className,a=e.children,i=Object(r.a)(e,["accordion","className","children"]),l=Object(m.g)(i,["onSelect","activeKey"]),c=l[0],u=l[1];t&&(u.role=u.role||"tablist");var d=Object(m.d)(c);return p.a.createElement("div",Object(o.a)({},u,{className:s()(n,d)}),b.a.map(a,function(e){return Object(f.cloneElement)(e,{bsStyle:e.props.bsStyle||c.bsStyle})}))},t}(p.a.Component);O.propTypes=y,O.defaultProps={accordion:!1},O.childContextTypes=g,t.a=h()(Object(m.a)("panel-group",O),{activeKey:"onSelect"})},function(e,t,n){e.exports=n(31)},function(e,t,n){t.f=n(16)},function(e,t,n){var r=n(83),o=n(59).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){e.exports=n(175)},function(e,t,n){var r=n(25),o=n(26),a=n(35).f;e.exports=function(e){return function(t){for(var n,i=o(t),l=r(i),s=l.length,c=0,u=[];s>c;)a.call(i,n=l[c++])&&u.push(e?[n,i[n]]:i[n]);return u}}},function(e,t,n){"use strict";t.b=function(e){return function(t){var n=null;if(!t.generateChildId){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];(n=s.apply(void 0,[t].concat(o)))||t.id||(n=new Error("In order to properly initialize the "+e+" in a way that is accessible to assistive technologies (such as screen readers) an `id` or a `generateChildId` prop to "+e+" is required"))}return n}},t.c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i()(function(e,n,r){var o;return t.every(function(t){return!!l.a.some(e.children,function(e){return e.props.bsRole===t})||(o=t,!1)}),o?new Error("(children) "+r+" - Missing a required child with bsRole: "+o+". "+r+" must have at least one child of each of the following bsRoles: "+t.join(", ")):null})},t.a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i()(function(e,n,r){var o;return t.every(function(t){var n=l.a.filter(e.children,function(e){return e.props.bsRole===t});return!(n.length>1)||(o=t,!1)}),o?new Error("(children) "+r+" - Duplicate children detected of bsRole: "+o+". Only one child each allowed with the following bsRoles: "+t.join(", ")):null})};var r=n(5),o=n.n(r),a=n(42),i=n.n(a),l=n(12),s=o.a.oneOfType([o.a.string,o.a.number])},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(15),d={active:f.a.bool,href:f.a.string,title:f.a.node,target:f.a.string},h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.active,n=e.href,a=e.title,i=e.target,s=e.className,u=Object(o.a)(e,["active","href","title","target","className"]),f={href:n,title:a,target:i};return c.a.createElement("li",{className:l()(s,{active:t})},t?c.a.createElement("span",u):c.a.createElement(p.a,Object(r.a)({},u,f)))},t}(c.a.Component);h.propTypes=d,h.defaultProps={active:!1},t.a=h},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(9),l=n(4),s=n.n(l),c=n(0),u=n.n(c),f=n(5),p=n.n(f),d=n(11),h=n.n(d),m=n(187),b=n.n(m),v={direction:p.a.oneOf(["prev","next"]),onAnimateOutEnd:p.a.func,active:p.a.bool,animateIn:p.a.bool,animateOut:p.a.bool,index:p.a.number},y=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleAnimateOutEnd=r.handleAnimateOutEnd.bind(Object(i.a)(r)),r.state={direction:null},r.isUnmounted=!1,r}Object(a.a)(t,e);var n=t.prototype;return n.componentWillReceiveProps=function(e){this.props.active!==e.active&&this.setState({direction:null})},n.componentDidUpdate=function(e){var t=this,n=this.props.active,r=e.active;!n&&r&&b.a.end(h.a.findDOMNode(this),this.handleAnimateOutEnd),n!==r&&setTimeout(function(){return t.startAnimation()},20)},n.componentWillUnmount=function(){this.isUnmounted=!0},n.handleAnimateOutEnd=function(){this.isUnmounted||this.props.onAnimateOutEnd&&this.props.onAnimateOutEnd(this.props.index)},n.startAnimation=function(){this.isUnmounted||this.setState({direction:"prev"===this.props.direction?"right":"left"})},n.render=function(){var e=this.props,t=e.direction,n=e.active,a=e.animateIn,i=e.animateOut,l=e.className,c=Object(o.a)(e,["direction","active","animateIn","animateOut","className"]);delete c.onAnimateOutEnd,delete c.index;var f={item:!0,active:n&&!a||i};return t&&n&&a&&(f[t]=!0),this.state.direction&&(a||i)&&(f[this.state.direction]=!0),u.a.createElement("div",Object(r.a)({},c,{className:s()(l,f)}))},t}(u.a.Component);y.propTypes=v,y.defaultProps={active:!1,animateIn:!1,animateOut:!1},t.a=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.default)(e.replace(i,"ms-"))};var r,o=n(189),a=(r=o)&&r.__esModule?r:{default:r};var i=/^-ms-/;e.exports=t.default},function(e,t,n){"use strict";t.a=function(e){return""+e.charAt(0).toUpperCase()+e.slice(1)}},function(e,t,n){"use strict";t.__esModule=!0,t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(5)),o=l(n(0)),a=l(n(11)),i=n(199);n(200);function l(e){return e&&e.__esModule?e:{default:e}}var s=t.UNMOUNTED="unmounted",c=t.EXITED="exited",u=t.ENTERING="entering",f=t.ENTERED="entered",p=t.EXITING="exiting",d=function(e){function t(n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,n,r)),a=r.transitionGroup,i=a&&!a.isMounting?n.enter:n.appear,l=void 0;return o.appearStatus=null,n.in?i?(l=c,o.appearStatus=u):l=f:l=n.unmountOnExit||n.mountOnEnter?s:c,o.state={status:l},o.nextCallback=null,o}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===s?{status:c}:null},t.prototype.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.prototype.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==u&&n!==f&&(t=u):n!==u&&n!==f||(t=p)}this.updateStatus(!1,t)},t.prototype.componentWillUnmount=function(){this.cancelNextCallback()},t.prototype.getTimeouts=function(){var e=this.props.timeout,t=void 0,n=void 0,r=void 0;return t=n=r=e,null!=e&&"number"!==typeof e&&(t=e.exit,n=e.enter,r=e.appear),{exit:t,enter:n,appear:r}},t.prototype.updateStatus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments[1];if(null!==t){this.cancelNextCallback();var n=a.default.findDOMNode(this);t===u?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===c&&this.setState({status:s})},t.prototype.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,a=this.getTimeouts();t||r?(this.props.onEnter(e,o),this.safeSetState({status:u},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,a.enter,function(){n.safeSetState({status:f},function(){n.props.onEntered(e,o)})})})):this.safeSetState({status:f},function(){n.props.onEntered(e)})},t.prototype.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:p},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:c},function(){t.props.onExited(e)})})})):this.safeSetState({status:c},function(){t.props.onExited(e)})},t.prototype.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},t.prototype.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},t.prototype.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},t.prototype.onTransitionEnd=function(e,t,n){this.setNextCallback(n),e?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},t.prototype.render=function(){var e=this.state.status;if(e===s)return null;var t=this.props,n=t.children,r=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"===typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},t}(o.default.Component);function h(){}d.contextTypes={transitionGroup:r.object},d.childContextTypes={transitionGroup:function(){}},d.propTypes={},d.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:h,onEntering:h,onEntered:h,onExit:h,onExiting:h,onExited:h},d.UNMOUNTED=0,d.EXITED=1,d.ENTERING=2,d.ENTERED=3,d.EXITING=4,t.default=(0,i.polyfill)(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,a.default)();try{return e.activeElement}catch(e){}};var r,o=n(28),a=(r=o)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=c(n(29)),o=c(n(5)),a=c(n(0)),i=c(n(11)),l=c(n(100)),s=c(n(30));function c(e){return e&&e.__esModule?e:{default:e}}var u=27;var f=function(e){function t(n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,n,o));return a.addEventListeners=function(){var e=a.props.event,t=(0,s.default)(a);a.documentMouseCaptureListener=(0,l.default)(t,e,a.handleMouseCapture,!0),a.documentMouseListener=(0,l.default)(t,e,a.handleMouse),a.documentKeyupListener=(0,l.default)(t,"keyup",a.handleKeyUp)},a.removeEventListeners=function(){a.documentMouseCaptureListener&&a.documentMouseCaptureListener.remove(),a.documentMouseListener&&a.documentMouseListener.remove(),a.documentKeyupListener&&a.documentKeyupListener.remove()},a.handleMouseCapture=function(e){var t;a.preventMouseRootClose=!!((t=e).metaKey||t.altKey||t.ctrlKey||t.shiftKey)||!function(e){return 0===e.button}(e)||(0,r.default)(i.default.findDOMNode(a),e.target)},a.handleMouse=function(e){!a.preventMouseRootClose&&a.props.onRootClose&&a.props.onRootClose(e)},a.handleKeyUp=function(e){e.keyCode===u&&a.props.onRootClose&&a.props.onRootClose(e)},a.preventMouseRootClose=!1,a}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){this.props.disabled||this.addEventListeners()},t.prototype.componentDidUpdate=function(e){!this.props.disabled&&e.disabled?this.addEventListeners():this.props.disabled&&!e.disabled&&this.removeEventListeners()},t.prototype.componentWillUnmount=function(){this.props.disabled||this.removeEventListeners()},t.prototype.render=function(){return this.props.children},t}(a.default.Component);f.displayName="RootCloseWrapper",f.propTypes={onRootClose:o.default.func,children:o.default.element,disabled:o.default.bool,event:o.default.oneOf(["click","mousedown"])},f.defaultProps={event:"click"},t.default=f,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t,n,a){return(0,r.default)(e,t,n,a),{remove:function(){(0,o.default)(e,t,n,a)}}};var r=a(n(70)),o=a(n(71));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(0),l=n.n(i),s=n(5),c=n.n(s),u=n(4),f=n.n(u),p=n(36),d=n(15),h=n(6),m={noCaret:c.a.bool,open:c.a.bool,title:c.a.string,useAnchor:c.a.bool},b=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.noCaret,n=e.open,a=e.useAnchor,i=e.bsClass,s=e.className,c=e.children,u=Object(o.a)(e,["noCaret","open","useAnchor","bsClass","className","children"]);delete u.bsRole;var h=a?d.a:p.a,m=!t;return l.a.createElement(h,Object(r.a)({},u,{role:"button",className:f()(s,i),"aria-haspopup":!0,"aria-expanded":n}),c||u.title,m&&" ",m&&l.a.createElement("span",{className:"caret"}))},t}(l.a.Component);b.propTypes=m,b.defaultProps={open:!1,useAnchor:!1,bsRole:"toggle"},t.a=Object(h.a)("dropdown-toggle",b)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(7),d=n.n(p),h=n(6),m={fluid:f.a.bool,componentClass:d.a},b=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.fluid,n=e.componentClass,a=e.className,i=Object(o.a)(e,["fluid","componentClass","className"]),s=Object(h.f)(i),u=s[0],f=s[1],p=Object(h.e)(u,t&&"fluid");return c.a.createElement(n,Object(r.a)({},f,{className:l()(a,p)}))},t}(c.a.Component);b.propTypes=m,b.defaultProps={componentClass:"div",fluid:!1},t.a=Object(h.a)("container",b)},function(e,t,n){"use strict";var r=n(27),o=n.n(r),a=n(2),i=n(3),l=n(1),s=n(4),c=n.n(s),u=n(0),f=n.n(u),p=n(5),d=n.n(p),h=n(6),m=n(10),b={active:d.a.any,disabled:d.a.any,header:d.a.node,listItem:d.a.bool,onClick:d.a.func,href:d.a.string,type:d.a.string},v=function(e){function t(){return e.apply(this,arguments)||this}Object(l.a)(t,e);var n=t.prototype;return n.renderHeader=function(e,t){return f.a.isValidElement(e)?Object(u.cloneElement)(e,{className:c()(e.props.className,t)}):f.a.createElement("h4",{className:t},e)},n.render=function(){var e,t=this.props,n=t.active,r=t.disabled,o=t.className,l=t.header,s=t.listItem,u=t.children,p=Object(i.a)(t,["active","disabled","className","header","listItem","children"]),d=Object(h.f)(p),m=d[0],b=d[1],v=Object(a.a)({},Object(h.d)(m),{active:n,disabled:r});return b.href?e="a":b.onClick?(e="button",b.type=b.type||"button"):e=s?"li":"span",b.className=c()(o,v),l?f.a.createElement(e,b,this.renderHeader(l,Object(h.e)(m,"heading")),f.a.createElement("p",{className:Object(h.e)(m,"text")},u)):f.a.createElement(e,b,u)},t}(f.a.Component);v.propTypes=b,v.defaultProps={listItem:!1},t.a=Object(h.a)("list-group-item",Object(h.c)(o()(m.d),v))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((!i&&0!==i||e)&&a.default){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),i=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return i};var r,o=n(18),a=(r=o)&&r.__esModule?r:{default:r};var i=void 0;e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return(0,r.default)(e)||(t=e,t&&"body"===t.tagName.toLowerCase())?function(e){var t=(0,o.default)(e),n=(0,r.default)(t).innerWidth;if(!n){var a=t.documentElement.getBoundingClientRect();n=a.right-Math.abs(a.left)}return t.body.clientWidth<n}(e):e.scrollHeight>e.clientHeight;var t};var r=a(n(50)),o=a(n(28));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=u(n(5)),o=u(n(49)),a=u(n(0)),i=u(n(11)),l=u(n(51)),s=u(n(30)),c=u(n(249));function u(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var p=function(e){function t(){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=f(this,e.call.apply(e,[this].concat(a))),r.setContainer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.props;r._portalContainerNode=(0,l.default)(e.container,(0,s.default)(r).body)},r.getMountNode=function(){return r._portalContainerNode},f(r,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){this.setContainer(),this.forceUpdate(this.props.onRendered)},t.prototype.componentWillReceiveProps=function(e){e.container!==this.props.container&&this.setContainer(e)},t.prototype.componentWillUnmount=function(){this._portalContainerNode=null},t.prototype.render=function(){return this.props.children&&this._portalContainerNode?i.default.createPortal(this.props.children,this._portalContainerNode):null},t}(a.default.Component);p.displayName="Portal",p.propTypes={container:r.default.oneOfType([o.default,r.default.func]),onRendered:r.default.func},t.default=i.default.createPortal?p:c.default,e.exports=t.default},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(7),f=n.n(u),p=n(6),d={componentClass:f.a},h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,a=Object(o.a)(e,["componentClass","className"]),i=Object(p.f)(a),s=i[0],u=i[1],f=Object(p.d)(s);return c.a.createElement(t,Object(r.a)({},u,{className:l()(n,f)}))},t}(c.a.Component);h.propTypes=d,h.defaultProps={componentClass:"div"},t.a=Object(p.a)("modal-body",h)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(6),d=n(10),h={dialogClassName:f.a.string},m=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.dialogClassName,a=t.className,i=t.style,s=t.children,u=Object(o.a)(t,["dialogClassName","className","style","children"]),f=Object(p.f)(u),d=f[0],h=f[1],m=Object(p.e)(d),b=Object(r.a)({display:"block"},i),v=Object(r.a)({},Object(p.d)(d),((e={})[m]=!1,e[Object(p.e)(d,"dialog")]=!0,e));return c.a.createElement("div",Object(r.a)({},h,{tabIndex:"-1",role:"dialog",style:b,className:l()(a,m)}),c.a.createElement("div",{className:l()(n,v)},c.a.createElement("div",{className:Object(p.e)(d,"content"),role:"document"},s)))},t}(c.a.Component);m.propTypes=h,t.a=Object(p.a)("modal",Object(p.b)([d.c.LARGE,d.c.SMALL],m))},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(7),f=n.n(u),p=n(6),d={componentClass:f.a},h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,a=Object(o.a)(e,["componentClass","className"]),i=Object(p.f)(a),s=i[0],u=i[1],f=Object(p.d)(s);return c.a.createElement(t,Object(r.a)({},u,{className:l()(n,f)}))},t}(c.a.Component);h.propTypes=d,h.defaultProps={componentClass:"div"},t.a=Object(p.a)("modal-footer",h)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(5),c=n.n(s),u=n(0),f=n.n(u),p=n(6),d=n(8),h=n(63),m={closeLabel:c.a.string,closeButton:c.a.bool,onHide:c.a.func},b={$bs_modal:c.a.shape({onHide:c.a.func})},v=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.closeLabel,n=e.closeButton,a=e.onHide,i=e.className,s=e.children,c=Object(o.a)(e,["closeLabel","closeButton","onHide","className","children"]),u=this.context.$bs_modal,m=Object(p.f)(c),b=m[0],v=m[1],y=Object(p.d)(b);return f.a.createElement("div",Object(r.a)({},v,{className:l()(i,y)}),n&&f.a.createElement(h.a,{label:t,onClick:Object(d.a)(u&&u.onHide,a)}),s)},t}(f.a.Component);v.propTypes=m,v.defaultProps={closeLabel:"Close",closeButton:!1},v.contextTypes=b,t.a=Object(p.a)("modal-header",v)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(7),f=n.n(u),p=n(6),d={componentClass:f.a},h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,a=Object(o.a)(e,["componentClass","className"]),i=Object(p.f)(a),s=i[0],u=i[1],f=Object(p.d)(s);return c.a.createElement(t,Object(r.a)({},u,{className:l()(n,f)}))},t}(c.a.Component);h.propTypes=d,h.defaultProps={componentClass:"h4"},t.a=Object(p.a)("modal-title",h)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(68),c=n.n(s),u=n(0),f=n.n(u),p=n(5),d=n.n(p),h=n(11),m=n.n(h),b=n(43),v=n.n(b),y=n(13),g=(n.n(y),n(6)),O=n(8),E=n(12),x={activeKey:d.a.any,activeHref:d.a.string,stacked:d.a.bool,justified:v()(d.a.bool,function(e){var t=e.justified,n=e.navbar;return t&&n?Error("justified navbar `Nav`s are not supported"):null}),onSelect:d.a.func,role:d.a.string,navbar:d.a.bool,pullRight:d.a.bool,pullLeft:d.a.bool},C={$bs_navbar:d.a.shape({bsClass:d.a.string,onSelect:d.a.func}),$bs_tabContainer:d.a.shape({activeKey:d.a.any,onSelect:d.a.func.isRequired,getTabId:d.a.func.isRequired,getPaneId:d.a.func.isRequired})},w=function(e){function t(){return e.apply(this,arguments)||this}Object(a.a)(t,e);var n=t.prototype;return n.componentDidUpdate=function(){var e=this;if(this._needsRefocus){this._needsRefocus=!1;var t=this.props.children,n=this.getActiveProps(),r=n.activeKey,o=n.activeHref,a=E.a.find(t,function(t){return e.isActive(t,r,o)}),i=E.a.toArray(t).indexOf(a),l=m.a.findDOMNode(this).children,s=l&&l[i];s&&s.firstChild&&s.firstChild.focus()}},n.getActiveProps=function(){var e=this.context.$bs_tabContainer;return e||this.props},n.getNextActiveChild=function(e){var t=this,n=this.props.children,r=n.filter(function(e){return null!=e.props.eventKey&&!e.props.disabled}),o=this.getActiveProps(),a=o.activeKey,i=o.activeHref,l=E.a.find(n,function(e){return t.isActive(e,a,i)}),s=r.indexOf(l);if(-1===s)return r[0];var c=s+e,u=r.length;return c>=u?c=0:c<0&&(c=u-1),r[c]},n.getTabProps=function(e,t,n,r,o){var a=this;if(!t&&"tablist"!==n)return null;var i=e.props,l=i.id,s=i["aria-controls"],c=i.eventKey,u=i.role,f=i.onKeyDown,p=i.tabIndex;return t&&(l=t.getTabId(c),s=t.getPaneId(c)),"tablist"===n&&(u=u||"tab",f=Object(O.a)(function(e){return a.handleTabKeyDown(o,e)},f),p=r?p:-1),{id:l,role:u,onKeyDown:f,"aria-controls":s,tabIndex:p}},n.handleTabKeyDown=function(e,t){var n;switch(t.keyCode){case c.a.codes.left:case c.a.codes.up:n=this.getNextActiveChild(-1);break;case c.a.codes.right:case c.a.codes.down:n=this.getNextActiveChild(1);break;default:return}t.preventDefault(),e&&n&&null!=n.props.eventKey&&e(n.props.eventKey),this._needsRefocus=!0},n.isActive=function(e,t,n){var r=e.props;return!!(r.active||null!=t&&r.eventKey===t||n&&r.href===n)||r.active},n.render=function(){var e,t=this,n=this.props,a=n.stacked,i=n.justified,s=n.onSelect,c=n.role,p=n.navbar,d=n.pullRight,h=n.pullLeft,m=n.className,b=n.children,v=Object(o.a)(n,["stacked","justified","onSelect","role","navbar","pullRight","pullLeft","className","children"]),y=this.context.$bs_tabContainer,x=c||(y?"tablist":null),C=this.getActiveProps(),w=C.activeKey,_=C.activeHref;delete v.activeKey,delete v.activeHref;var j,T,N=Object(g.f)(v),k=N[0],S=N[1],P=Object(r.a)({},Object(g.d)(k),((e={})[Object(g.e)(k,"stacked")]=a,e[Object(g.e)(k,"justified")]=i,e)),M=null!=p?p:this.context.$bs_navbar;if(M){var R=this.context.$bs_navbar||{bsClass:"navbar"};P[Object(g.e)(R,"nav")]=!0,T=Object(g.e)(R,"right"),j=Object(g.e)(R,"left")}else T="pull-right",j="pull-left";return P[T]=d,P[j]=h,f.a.createElement("ul",Object(r.a)({},S,{role:x,className:l()(m,P)}),E.a.map(b,function(e){var n=t.isActive(e,w,_),o=Object(O.a)(e.props.onSelect,s,M&&M.onSelect,y&&y.onSelect);return Object(u.cloneElement)(e,Object(r.a)({},t.getTabProps(e,y,x,n,o),{active:n,activeKey:w,activeHref:_,onSelect:o}))}))},t}(f.a.Component);w.propTypes=x,w.defaultProps={justified:!1,pullRight:!1,pullLeft:!1,stacked:!1},w.contextTypes=C,t.a=Object(g.a)("nav",Object(g.c)(["tabs","pills"],w))},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(6),d={$bs_navbar:f.a.shape({bsClass:f.a.string})},h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,a=Object(o.a)(e,["className","children"]),i=this.context.$bs_navbar||{bsClass:"navbar"},s=Object(p.e)(i,"brand");return c.a.isValidElement(n)?c.a.cloneElement(n,{className:l()(n.props.className,t,s)}):c.a.createElement("span",Object(r.a)({},a,{className:l()(t,s)}),n)},t}(c.a.Component);h.contextTypes=d,t.a=h},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(9),l=n(4),s=n.n(l),c=n(0),u=n.n(c),f=n(5),p=n.n(f),d=n(15),h=n(8),m={active:p.a.bool,disabled:p.a.bool,role:p.a.string,href:p.a.string,onClick:p.a.func,onSelect:p.a.func,eventKey:p.a.any},b=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleClick=r.handleClick.bind(Object(i.a)(r)),r}Object(a.a)(t,e);var n=t.prototype;return n.handleClick=function(e){this.props.disabled?e.preventDefault():this.props.onSelect&&this.props.onSelect(this.props.eventKey,e)},n.render=function(){var e=this.props,t=e.active,n=e.disabled,a=e.onClick,i=e.className,l=e.style,c=Object(o.a)(e,["active","disabled","onClick","className","style"]);return delete c.onSelect,delete c.eventKey,delete c.activeKey,delete c.activeHref,c.role?"tab"===c.role&&(c["aria-selected"]=t):"#"===c.href&&(c.role="button"),u.a.createElement("li",{role:"presentation",className:s()(i,{active:t,disabled:n}),style:l},u.a.createElement(d.a,Object(r.a)({},c,{disabled:n,onClick:Object(h.a)(a,this.handleClick)})))},t}(u.a.Component);b.propTypes=m,b.defaultProps={active:!1,disabled:!1},t.a=b},function(e,t,n){"use strict";var r=n(3),o=n(1),a=n(2),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(257),d=n.n(p),h=n(7),m=n.n(h),b=n(47),v=Object(a.a)({},d.a.propTypes,{show:f.a.bool,rootClose:f.a.bool,onHide:f.a.func,animation:f.a.oneOfType([f.a.bool,m.a]),onEnter:f.a.func,onEntering:f.a.func,onEntered:f.a.func,onExit:f.a.func,onExiting:f.a.func,onExited:f.a.func,placement:f.a.oneOf(["top","right","bottom","left"])}),y={animation:b.a,rootClose:!1,show:!1,placement:"right"},g=function(e){function t(){return e.apply(this,arguments)||this}return Object(o.a)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.animation,o=t.children,i=Object(r.a)(t,["animation","children"]),u=!0===n?b.a:n||null;return e=u?o:Object(s.cloneElement)(o,{className:l()(o.props.className,"in")}),c.a.createElement(d.a,Object(a.a)({},i,{transition:u}),e)},t}(c.a.Component);g.propTypes=v,g.defaultProps=y,t.a=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,a.default)(e),n=(0,o.default)(t),i=t&&t.documentElement,l={top:0,left:0,height:0,width:0};if(!t)return;if(!(0,r.default)(i,e))return l;void 0!==e.getBoundingClientRect&&(l=e.getBoundingClientRect());return l={top:l.top+(n.pageYOffset||i.scrollTop)-(i.clientTop||0),left:l.left+(n.pageXOffset||i.scrollLeft)-(i.clientLeft||0),width:(null==l.width?e.offsetWidth:l.width)||0,height:(null==l.height?e.offsetHeight:l.height)||0}};var r=i(n(29)),o=i(n(50)),a=i(n(28));function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,a.default)(e);if(void 0===t)return n?"pageYOffset"in n?n.pageYOffset:n.document.documentElement.scrollTop:e.scrollTop;n?n.scrollTo("pageXOffset"in n?n.pageXOffset:n.document.documentElement.scrollLeft,t):e.scrollTop=t};var r,o=n(50),a=(r=o)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(9),l=n(4),s=n.n(l),c=n(0),u=n.n(c),f=n(5),p=n.n(f),d=n(15),h=n(8),m={disabled:p.a.bool,previous:p.a.bool,next:p.a.bool,onClick:p.a.func,onSelect:p.a.func,eventKey:p.a.any},b=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleSelect=r.handleSelect.bind(Object(i.a)(r)),r}Object(a.a)(t,e);var n=t.prototype;return n.handleSelect=function(e){var t=this.props,n=t.disabled,r=t.onSelect,o=t.eventKey;n?e.preventDefault():r&&r(o,e)},n.render=function(){var e=this.props,t=e.disabled,n=e.previous,a=e.next,i=e.onClick,l=e.className,c=e.style,f=Object(o.a)(e,["disabled","previous","next","onClick","className","style"]);return delete f.onSelect,delete f.eventKey,u.a.createElement("li",{className:s()(l,{disabled:t,previous:n,next:a}),style:c},u.a.createElement(d.a,Object(r.a)({},f,{disabled:t,onClick:Object(h.a)(i,this.handleSelect)})))},t}(u.a.Component);b.propTypes=m,b.defaultProps={disabled:!1,previous:!1,next:!1},t.a=b},function(e,t,n){"use strict";var r=n(2),o=n(1),a=n(5),i=n.n(a),l=n(0),s=n.n(l),c=n(6),u=n(67),f={onEnter:i.a.func,onEntering:i.a.func,onEntered:i.a.func,onExit:i.a.func,onExiting:i.a.func,onExited:i.a.func},p={$bs_panel:i.a.shape({headingId:i.a.string,bodyId:i.a.string,bsClass:i.a.string,expanded:i.a.bool})},d=function(e){function t(){return e.apply(this,arguments)||this}return Object(o.a)(t,e),t.prototype.render=function(){var e=this.props.children,t=this.context.$bs_panel||{},n=t.headingId,o=t.bodyId,a=t.bsClass,i=t.expanded,l=Object(c.f)(this.props),f=l[0],p=l[1];return f.bsClass=a||f.bsClass,n&&o&&(p.id=o,p.role=p.role||"tabpanel",p["aria-labelledby"]=n),s.a.createElement(u.a,Object(r.a)({in:i},p),s.a.createElement("div",{className:Object(c.e)(f,"collapse")},e))},t}(s.a.Component);d.propTypes=f,d.contextTypes=p,t.a=Object(c.a)("panel",d)},function(e,t,n){"use strict";var r=n(3),o=n(1),a=n(9),i=n(5),l=n.n(i),s=n(0),c=n.n(s),u=n(4),f=n.n(u),p=n(72),d=n.n(p),h=n(15),m=n(8),b={onClick:l.a.func,componentClass:d.a},v={componentClass:h.a},y={$bs_panel:l.a.shape({bodyId:l.a.string,onToggle:l.a.func,expanded:l.a.bool})},g=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleToggle=t.handleToggle.bind(Object(a.a)(t)),t}Object(o.a)(t,e);var n=t.prototype;return n.handleToggle=function(e){var t=(this.context.$bs_panel||{}).onToggle;t&&t(e)},n.render=function(){var e=this.props,t=e.onClick,n=e.className,o=e.componentClass,a=Object(r.a)(e,["onClick","className","componentClass"]),i=this.context.$bs_panel||{},l=i.expanded,s=i.bodyId,u=o;return a.onClick=Object(m.a)(t,this.handleToggle),a["aria-expanded"]=l,a.className=f()(n,!l&&"collapsed"),s&&(a["aria-controls"]=s),c.a.createElement(u,a)},t}(c.a.Component);g.propTypes=b,g.defaultProps=v,g.contextTypes=y,t.a=g},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(9),l=n(4),s=n.n(l),c=n(0),u=n.n(c),f=n(5),p=n.n(f),d=n(7),h=n.n(d),m=n(13),b=(n.n(m),n(6)),v=n(8),y=n(47),g={eventKey:p.a.any,animation:p.a.oneOfType([p.a.bool,h.a]),id:p.a.string,"aria-labelledby":p.a.string,bsClass:p.a.string,onEnter:p.a.func,onEntering:p.a.func,onEntered:p.a.func,onExit:p.a.func,onExiting:p.a.func,onExited:p.a.func,mountOnEnter:p.a.bool,unmountOnExit:p.a.bool},O={$bs_tabContainer:p.a.shape({getTabId:p.a.func,getPaneId:p.a.func}),$bs_tabContent:p.a.shape({bsClass:p.a.string,animation:p.a.oneOfType([p.a.bool,h.a]),activeKey:p.a.any,mountOnEnter:p.a.bool,unmountOnExit:p.a.bool,onPaneEnter:p.a.func.isRequired,onPaneExited:p.a.func.isRequired,exiting:p.a.bool.isRequired})},E={$bs_tabContainer:p.a.oneOf([null])},x=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleEnter=r.handleEnter.bind(Object(i.a)(r)),r.handleExited=r.handleExited.bind(Object(i.a)(r)),r.in=!1,r}Object(a.a)(t,e);var n=t.prototype;return n.getChildContext=function(){return{$bs_tabContainer:null}},n.componentDidMount=function(){this.shouldBeIn()&&this.handleEnter()},n.componentDidUpdate=function(){this.in?this.shouldBeIn()||this.handleExited():this.shouldBeIn()&&this.handleEnter()},n.componentWillUnmount=function(){this.in&&this.handleExited()},n.getAnimation=function(){if(null!=this.props.animation)return this.props.animation;var e=this.context.$bs_tabContent;return e&&e.animation},n.handleEnter=function(){var e=this.context.$bs_tabContent;e&&(this.in=e.onPaneEnter(this,this.props.eventKey))},n.handleExited=function(){var e=this.context.$bs_tabContent;e&&(e.onPaneExited(this),this.in=!1)},n.isActive=function(){var e=this.context.$bs_tabContent,t=e&&e.activeKey;return this.props.eventKey===t},n.shouldBeIn=function(){return this.getAnimation()&&this.isActive()},n.render=function(){var e=this.props,t=e.eventKey,n=e.className,a=e.onEnter,i=e.onEntering,l=e.onEntered,c=e.onExit,f=e.onExiting,p=e.onExited,d=e.mountOnEnter,h=e.unmountOnExit,m=Object(o.a)(e,["eventKey","className","onEnter","onEntering","onEntered","onExit","onExiting","onExited","mountOnEnter","unmountOnExit"]),g=this.context,O=g.$bs_tabContent,E=g.$bs_tabContainer,x=Object(b.g)(m,["animation"]),C=x[0],w=x[1],_=this.isActive(),j=this.getAnimation(),T=null!=d?d:O&&O.mountOnEnter,N=null!=h?h:O&&O.unmountOnExit;if(!_&&!j&&N)return null;var k=!0===j?y.a:j||null;O&&(C.bsClass=Object(b.e)(O,"pane"));var S=Object(r.a)({},Object(b.d)(C),{active:_});E&&(w.id=E.getPaneId(t),w["aria-labelledby"]=E.getTabId(t));var P=u.a.createElement("div",Object(r.a)({},w,{role:"tabpanel","aria-hidden":!_,className:s()(n,S)}));if(k){var M=O&&O.exiting;return u.a.createElement(k,{in:_&&!M,onEnter:Object(v.a)(this.handleEnter,a),onEntering:i,onEntered:l,onExit:c,onExiting:f,onExited:Object(v.a)(this.handleExited,p),mountOnEnter:T,unmountOnExit:N},P)}return P},t}(u.a.Component);x.propTypes=g,x.contextTypes=O,x.childContextTypes=E,t.a=Object(b.a)("tab-pane",x)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(5),l=n.n(i),s=n(0),c=n.n(s),u=n(36),f={type:l.a.oneOf(["checkbox","radio"]),name:l.a.string,checked:l.a.bool,disabled:l.a.bool,onChange:l.a.func,value:l.a.any.isRequired},p=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.name,a=e.checked,i=e.type,l=e.onChange,s=e.value,f=Object(o.a)(e,["children","name","checked","type","onChange","value"]),p=f.disabled;return c.a.createElement(u.a,Object(r.a)({},f,{active:!!a,componentClass:"label"}),c.a.createElement("input",{name:n,type:i,autoComplete:"off",value:s,checked:!!a,disabled:!!p,onChange:l}),t)},t}(c.a.Component);p.propTypes=f,t.a=p},function(e,t,n){n(125),e.exports=n(131)},function(e,t,n){"use strict";"undefined"===typeof Promise&&(n(126).enable(),window.Promise=n(129)),n(130),Object.assign=n(52)},function(e,t,n){"use strict";var r=n(75),o=[ReferenceError,TypeError,RangeError],a=!1;function i(){a=!1,r._47=null,r._71=null}function l(e,t){return t.some(function(t){return e instanceof t})}t.disable=i,t.enable=function(e){e=e||{},a&&i();a=!0;var t=0,n=0,s={};function c(t){(e.allRejections||l(s[t].error,e.whitelist||o))&&(s[t].displayId=n++,e.onUnhandled?(s[t].logged=!0,e.onUnhandled(s[t].displayId,s[t].error)):(s[t].logged=!0,function(e,t){console.warn("Possible Unhandled Promise Rejection (id: "+e+"):"),((t&&(t.stack||t))+"").split("\n").forEach(function(e){console.warn(" "+e)})}(s[t].displayId,s[t].error)))}r._47=function(t){var n;2===t._83&&s[t._56]&&(s[t._56].logged?(n=t._56,s[n].logged&&(e.onHandled?e.onHandled(s[n].displayId,s[n].error):s[n].onUnhandled||(console.warn("Promise Rejection Handled (id: "+s[n].displayId+"):"),console.warn(' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+s[n].displayId+".")))):clearTimeout(s[t._56].timeout),delete s[t._56])},r._71=function(e,n){0===e._75&&(e._56=t++,s[e._56]={displayId:null,error:n,timeout:setTimeout(c.bind(null,e._56),l(n,o)?100:2e3),logged:!1})}}},function(e,t,n){"use strict";(function(t){function n(e){o.length||(r(),!0),o[o.length]=e}e.exports=n;var r,o=[],a=0,i=1024;function l(){for(;a<o.length;){var e=a;if(a+=1,o[e].call(),a>i){for(var t=0,n=o.length-a;t<n;t++)o[t]=o[t+a];o.length-=a,a=0}}o.length=0,a=0,!1}var s,c,u,f="undefined"!==typeof t?t:self,p=f.MutationObserver||f.WebKitMutationObserver;function d(e){return function(){var t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}"function"===typeof p?(s=1,c=new p(l),u=document.createTextNode(""),c.observe(u,{characterData:!0}),r=function(){s=-s,u.data=s}):r=d(l),n.requestFlush=r,n.makeRequestCallFromTimer=d}).call(t,n(128))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(75);e.exports=r;var o=u(!0),a=u(!1),i=u(null),l=u(void 0),s=u(0),c=u("");function u(e){var t=new r(r._44);return t._83=1,t._18=e,t}r.resolve=function(e){if(e instanceof r)return e;if(null===e)return i;if(void 0===e)return l;if(!0===e)return o;if(!1===e)return a;if(0===e)return s;if(""===e)return c;if("object"===typeof e||"function"===typeof e)try{var t=e.then;if("function"===typeof t)return new r(t.bind(e))}catch(e){return new r(function(t,n){n(e)})}return u(e)},r.all=function(e){var t=Array.prototype.slice.call(e);return new r(function(e,n){if(0===t.length)return e([]);var o=t.length;function a(i,l){if(l&&("object"===typeof l||"function"===typeof l)){if(l instanceof r&&l.then===r.prototype.then){for(;3===l._83;)l=l._18;return 1===l._83?a(i,l._18):(2===l._83&&n(l._18),void l.then(function(e){a(i,e)},n))}var s=l.then;if("function"===typeof s)return void new r(s.bind(l)).then(function(e){a(i,e)},n)}t[i]=l,0===--o&&e(t)}for(var i=0;i<t.length;i++)a(i,t[i])})},r.reject=function(e){return new r(function(t,n){n(e)})},r.race=function(e){return new r(function(t,n){e.forEach(function(e){r.resolve(e).then(t,n)})})},r.prototype.catch=function(e){return this.then(null,e)}},function(e,t){!function(e){"use strict";if(!e.fetch){var t={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(t.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=function(e){return e&&DataView.prototype.isPrototypeOf(e)},o=ArrayBuffer.isView||function(e){return e&&n.indexOf(Object.prototype.toString.call(e))>-1};u.prototype.append=function(e,t){e=l(e),t=s(t);var n=this.map[e];this.map[e]=n?n+","+t:t},u.prototype.delete=function(e){delete this.map[l(e)]},u.prototype.get=function(e){return e=l(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(l(e))},u.prototype.set=function(e,t){this.map[l(e)]=s(t)},u.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),c(e)},u.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),c(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),c(e)},t.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var a=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},m.call(b.prototype),m.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var i=[301,302,303,307,308];y.redirect=function(e,t){if(-1===i.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},e.Headers=u,e.Request=b,e.Response=y,e.fetch=function(e,n){return new Promise(function(r,o){var a=new b(e,n),i=new XMLHttpRequest;i.onload=function(){var e,t,n={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new u,e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t)};n.url="responseURL"in i?i.responseURL:n.headers.get("X-Request-URL");var o="response"in i?i.response:i.responseText;r(new y(o,n))},i.onerror=function(){o(new TypeError("Network request failed"))},i.ontimeout=function(){o(new TypeError("Network request failed"))},i.open(a.method,a.url,!0),"include"===a.credentials&&(i.withCredentials=!0),"responseType"in i&&t.blob&&(i.responseType="blob"),a.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"===typeof a._bodyInit?null:a._bodyInit)})},e.fetch.polyfill=!0}function l(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function s(e){return"string"!==typeof e&&(e=String(e)),e}function c(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(n[Symbol.iterator]=function(){return n}),n}function u(e){this.map={},e instanceof u?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function d(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function h(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"===typeof e)this._bodyText=e;else if(t.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(t.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(t.arrayBuffer&&t.blob&&r(e))this._bodyArrayBuffer=h(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!t.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!o(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=h(e)}else this._bodyText="";this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e,t,n,r=f(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=p(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},t.formData&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}function b(e,t){var n,r,o=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new u(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),a.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function y(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!==typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=(n.n(r),n(11)),a=(n.n(o),n(140)),i=n(291);n.n(i);o.render(r.createElement(a.a,null),document.getElementById("root"))},function(e,t,n){"use strict";var r=n(52),o=n(76),a=n(77),i=n(78),l="function"===typeof Symbol&&Symbol.for,s=l?Symbol.for("react.element"):60103,c=l?Symbol.for("react.portal"):60106,u=l?Symbol.for("react.fragment"):60107,f=l?Symbol.for("react.strict_mode"):60108,p=l?Symbol.for("react.profiler"):60114,d=l?Symbol.for("react.provider"):60109,h=l?Symbol.for("react.context"):60110,m=l?Symbol.for("react.async_mode"):60111,b=l?Symbol.for("react.forward_ref"):60112;l&&Symbol.for("react.timeout");var v="function"===typeof Symbol&&Symbol.iterator;function y(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);o(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function O(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||g}function E(){}function x(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||g}O.prototype.isReactComponent={},O.prototype.setState=function(e,t){"object"!==typeof e&&"function"!==typeof e&&null!=e&&y("85"),this.updater.enqueueSetState(this,e,t,"setState")},O.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},E.prototype=O.prototype;var C=x.prototype=new E;C.constructor=x,r(C,O.prototype),C.isPureReactComponent=!0;var w={current:null},_=Object.prototype.hasOwnProperty,j={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r=void 0,o={},a=null,i=null;if(null!=t)for(r in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(a=""+t.key),t)_.call(t,r)&&!j.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:s,type:e,key:a,ref:i,props:o,_owner:w.current}}function N(e){return"object"===typeof e&&null!==e&&e.$$typeof===s}var k=/\/+/g,S=[];function P(e,t,n,r){if(S.length){var o=S.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function M(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>S.length&&S.push(e)}function R(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case s:case c:a=!0}}if(a)return n(r,e,""===t?"."+I(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var i=0;i<e.length;i++){var l=t+I(o=e[i],i);a+=R(o,l,n,r)}else if(null===e||"undefined"===typeof e?l=null:l="function"===typeof(l=v&&e[v]||e["@@iterator"])?l:null,"function"===typeof l)for(e=l.call(e),i=0;!(o=e.next()).done;)a+=R(o=o.value,l=t+I(o,i++),n,r);else"object"===o&&y("31","[object Object]"===(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return a}function I(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function D(e,t){e.func.call(e.context,t,e.count++)}function A(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?L(e,r,n,i.thatReturnsArgument):null!=e&&(N(e)&&(t=o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(k,"$&/")+"/")+n,e={$$typeof:s,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function L(e,t,n,r,o){var a="";null!=n&&(a=(""+n).replace(k,"$&/")+"/"),t=P(t,a,r,o),null==e||R(e,"",A,t),M(t)}var F={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return L(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=P(null,null,t,n),null==e||R(e,"",D,t),M(t)},count:function(e){return null==e?0:R(e,"",i.thatReturnsNull,null)},toArray:function(e){var t=[];return L(e,t,null,i.thatReturnsArgument),t},only:function(e){return N(e)||y("143"),e}},createRef:function(){return{current:null}},Component:O,PureComponent:x,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:h,_calculateChangedBits:t,_defaultValue:e,_currentValue:e,_currentValue2:e,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null}).Provider={$$typeof:d,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:b,render:e}},Fragment:u,StrictMode:f,unstable_AsyncMode:m,unstable_Profiler:p,createElement:T,cloneElement:function(e,t,n){(null===e||void 0===e)&&y("267",e);var o=void 0,a=r({},e.props),i=e.key,l=e.ref,c=e._owner;if(null!=t){void 0!==t.ref&&(l=t.ref,c=w.current),void 0!==t.key&&(i=""+t.key);var u=void 0;for(o in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)_.call(t,o)&&!j.hasOwnProperty(o)&&(a[o]=void 0===t[o]&&void 0!==u?u[o]:t[o])}if(1===(o=arguments.length-2))a.children=n;else if(1<o){u=Array(o);for(var f=0;f<o;f++)u[f]=arguments[f+2];a.children=u}return{$$typeof:s,type:e.type,key:i,ref:l,props:a,_owner:c}},createFactory:function(e){var t=T.bind(null,e);return t.type=e,t},isValidElement:N,version:"16.4.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:w,assign:r}},U={default:F},B=U&&F||U;e.exports=B.default?B.default:B},function(e,t,n){"use strict";var r=n(76),o=n(0),a=n(134),i=n(52),l=n(78),s=n(135),c=n(136),u=n(137),f=n(77);function p(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=0;o<t;o++)n+="&args[]="+encodeURIComponent(arguments[o+1]);r(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}o||p("227");var d={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(e,t,n,r,o,a,i,l,s){(function(e,t,n,r,o,a,i,l,s){this._hasCaughtError=!1,this._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this._caughtError=e,this._hasCaughtError=!0}}).apply(d,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,o,a,i,l,s){if(d.invokeGuardedCallback.apply(this,arguments),d.hasCaughtError()){var c=d.clearCaughtError();d._hasRethrowError||(d._hasRethrowError=!0,d._rethrowError=c)}},rethrowCaughtError:function(){return function(){if(d._hasRethrowError){var e=d._rethrowError;throw d._rethrowError=null,d._hasRethrowError=!1,e}}.apply(d,arguments)},hasCaughtError:function(){return d._hasCaughtError},clearCaughtError:function(){if(d._hasCaughtError){var e=d._caughtError;return d._caughtError=null,d._hasCaughtError=!1,e}p("198")}};var h=null,m={};function b(){if(h)for(var e in m){var t=m[e],n=h.indexOf(e);if(-1<n||p("96",e),!y[n])for(var r in t.extractEvents||p("97",e),y[n]=t,n=t.eventTypes){var o=void 0,a=n[r],i=t,l=r;g.hasOwnProperty(l)&&p("99",l),g[l]=a;var s=a.phasedRegistrationNames;if(s){for(o in s)s.hasOwnProperty(o)&&v(s[o],i,l);o=!0}else a.registrationName?(v(a.registrationName,i,l),o=!0):o=!1;o||p("98",r,e)}}}function v(e,t,n){O[e]&&p("100",e),O[e]=t,E[e]=t.eventTypes[n].dependencies}var y=[],g={},O={},E={};function x(e){h&&p("101"),h=Array.prototype.slice.call(e),b()}function C(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];m.hasOwnProperty(t)&&m[t]===r||(m[t]&&p("102",t),m[t]=r,n=!0)}n&&b()}var w={plugins:y,eventNameDispatchConfigs:g,registrationNameModules:O,registrationNameDependencies:E,possibleRegistrationNames:null,injectEventPluginOrder:x,injectEventPluginsByName:C},_=null,j=null,T=null;function N(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=T(r),d.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function k(e,t){return null==t&&p("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function S(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var P=null;function M(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)N(e,t,n[o],r[o]);else n&&N(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function R(e){return M(e,!0)}function I(e){return M(e,!1)}var D={injectEventPluginOrder:x,injectEventPluginsByName:C};function A(e,t){var n=e.stateNode;if(!n)return null;var r=_(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}return e?null:(n&&"function"!==typeof n&&p("231",t,typeof n),n)}function L(e,t){null!==e&&(P=k(P,e)),e=P,P=null,e&&(S(e,t?R:I),P&&p("95"),d.rethrowCaughtError())}function F(e,t,n,r){for(var o=null,a=0;a<y.length;a++){var i=y[a];i&&(i=i.extractEvents(e,t,n,r))&&(o=k(o,i))}L(o,!1)}var U={injection:D,getListener:A,runEventsInBatch:L,runExtractedEventsInBatch:F},B=Math.random().toString(36).slice(2),H="__reactInternalInstance$"+B,z="__reactEventHandlers$"+B;function K(e){if(e[H])return e[H];for(;!e[H];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[H]).tag||6===e.tag?e:null}function W(e){if(5===e.tag||6===e.tag)return e.stateNode;p("33")}function $(e){return e[z]||null}var V={precacheFiberNode:function(e,t){t[H]=e},getClosestInstanceFromNode:K,getInstanceFromNode:function(e){return!(e=e[H])||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:W,getFiberCurrentPropsFromNode:$,updateFiberProps:function(e,t){e[z]=t}};function q(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function G(e,t,n){for(var r=[];e;)r.push(e),e=q(e);for(e=r.length;0<e--;)t(r[e],"captured",n);for(e=0;e<r.length;e++)t(r[e],"bubbled",n)}function Y(e,t,n){(t=A(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=k(n._dispatchListeners,t),n._dispatchInstances=k(n._dispatchInstances,e))}function X(e){e&&e.dispatchConfig.phasedRegistrationNames&&G(e._targetInst,Y,e)}function Q(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;G(t=t?q(t):null,Y,e)}}function Z(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=A(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=k(n._dispatchListeners,t),n._dispatchInstances=k(n._dispatchInstances,e))}function J(e){e&&e.dispatchConfig.registrationName&&Z(e._targetInst,null,e)}function ee(e){S(e,X)}function te(e,t,n,r){if(n&&r)e:{for(var o=n,a=r,i=0,l=o;l;l=q(l))i++;l=0;for(var s=a;s;s=q(s))l++;for(;0<i-l;)o=q(o),i--;for(;0<l-i;)a=q(a),l--;for(;i--;){if(o===a||o===a.alternate)break e;o=q(o),a=q(a)}o=null}else o=null;for(a=o,o=[];n&&n!==a&&(null===(i=n.alternate)||i!==a);)o.push(n),n=q(n);for(n=[];r&&r!==a&&(null===(i=r.alternate)||i!==a);)n.push(r),r=q(r);for(r=0;r<o.length;r++)Z(o[r],"bubbled",e);for(e=n.length;0<e--;)Z(n[e],"captured",t)}var ne={accumulateTwoPhaseDispatches:ee,accumulateTwoPhaseDispatchesSkipTarget:function(e){S(e,Q)},accumulateEnterLeaveDispatches:te,accumulateDirectDispatches:function(e){S(e,J)}};function re(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}var oe={animationend:re("Animation","AnimationEnd"),animationiteration:re("Animation","AnimationIteration"),animationstart:re("Animation","AnimationStart"),transitionend:re("Transition","TransitionEnd")},ae={},ie={};function le(e){if(ae[e])return ae[e];if(!oe[e])return e;var t,n=oe[e];for(t in n)if(n.hasOwnProperty(t)&&t in ie)return ae[e]=n[t];return e}a.canUseDOM&&(ie=document.createElement("div").style,"AnimationEvent"in window||(delete oe.animationend.animation,delete oe.animationiteration.animation,delete oe.animationstart.animation),"TransitionEvent"in window||delete oe.transitionend.transition);var se=le("animationend"),ce=le("animationiteration"),ue=le("animationstart"),fe=le("transitionend"),pe="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),de=null;function he(){return!de&&a.canUseDOM&&(de="textContent"in document.documentElement?"textContent":"innerText"),de}var me={_root:null,_startText:null,_fallbackText:null};function be(){if(me._fallbackText)return me._fallbackText;var e,t,n=me._startText,r=n.length,o=ve(),a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return me._fallbackText=o.slice(e,1<t?1-t:void 0),me._fallbackText}function ve(){return"value"in me._root?me._root.value:me._root[he()]}var ye="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),ge={type:null,target:null,currentTarget:l.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};function Oe(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?l.thatReturnsTrue:l.thatReturnsFalse,this.isPropagationStopped=l.thatReturnsFalse,this}function Ee(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function xe(e){e instanceof this||p("223"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Ce(e){e.eventPool=[],e.getPooled=Ee,e.release=xe}i(Oe.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=l.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=l.thatReturnsTrue)},persist:function(){this.isPersistent=l.thatReturnsTrue},isPersistent:l.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t<ye.length;t++)this[ye[t]]=null}}),Oe.Interface=ge,Oe.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,Ce(n),n},Ce(Oe);var we=Oe.extend({data:null}),_e=Oe.extend({data:null}),je=[9,13,27,32],Te=a.canUseDOM&&"CompositionEvent"in window,Ne=null;a.canUseDOM&&"documentMode"in document&&(Ne=document.documentMode);var ke=a.canUseDOM&&"TextEvent"in window&&!Ne,Se=a.canUseDOM&&(!Te||Ne&&8<Ne&&11>=Ne),Pe=String.fromCharCode(32),Me={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Re=!1;function Ie(e,t){switch(e){case"keyup":return-1!==je.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function De(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Ae=!1;var Le={eventTypes:Me,extractEvents:function(e,t,n,r){var o=void 0,a=void 0;if(Te)e:{switch(e){case"compositionstart":o=Me.compositionStart;break e;case"compositionend":o=Me.compositionEnd;break e;case"compositionupdate":o=Me.compositionUpdate;break e}o=void 0}else Ae?Ie(e,n)&&(o=Me.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=Me.compositionStart);return o?(Se&&(Ae||o!==Me.compositionStart?o===Me.compositionEnd&&Ae&&(a=be()):(me._root=r,me._startText=ve(),Ae=!0)),o=we.getPooled(o,t,n,r),a?o.data=a:null!==(a=De(n))&&(o.data=a),ee(o),a=o):a=null,(e=ke?function(e,t){switch(e){case"compositionend":return De(t);case"keypress":return 32!==t.which?null:(Re=!0,Pe);case"textInput":return(e=t.data)===Pe&&Re?null:e;default:return null}}(e,n):function(e,t){if(Ae)return"compositionend"===e||!Te&&Ie(e,t)?(e=be(),me._root=null,me._startText=null,me._fallbackText=null,Ae=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Se?null:t.data;default:return null}}(e,n))?((t=_e.getPooled(Me.beforeInput,t,n,r)).data=e,ee(t)):t=null,null===a?t:null===t?a:[a,t]}},Fe=null,Ue={injectFiberControlledHostComponent:function(e){Fe=e}},Be=null,He=null;function ze(e){if(e=j(e)){Fe&&"function"===typeof Fe.restoreControlledState||p("194");var t=_(e.stateNode);Fe.restoreControlledState(e.stateNode,e.type,t)}}function Ke(e){Be?He?He.push(e):He=[e]:Be=e}function We(){return null!==Be||null!==He}function $e(){if(Be){var e=Be,t=He;if(He=Be=null,ze(e),t)for(e=0;e<t.length;e++)ze(t[e])}}var Ve={injection:Ue,enqueueStateRestore:Ke,needsStateRestore:We,restoreStateIfNeeded:$e};function qe(e,t){return e(t)}function Ge(e,t,n){return e(t,n)}function Ye(){}var Xe=!1;function Qe(e,t){if(Xe)return e(t);Xe=!0;try{return qe(e,t)}finally{Xe=!1,We()&&(Ye(),$e())}}var Ze={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Je(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Ze[e.type]:"textarea"===t}function et(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function tt(e,t){return!(!a.canUseDOM||t&&!("addEventListener"in document))&&((t=(e="on"+e)in document)||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"===typeof t[e]),t)}function nt(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function rt(e){e._valueTracker||(e._valueTracker=function(e){var t=nt(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ot(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=nt(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}var at=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,it="function"===typeof Symbol&&Symbol.for,lt=it?Symbol.for("react.element"):60103,st=it?Symbol.for("react.portal"):60106,ct=it?Symbol.for("react.fragment"):60107,ut=it?Symbol.for("react.strict_mode"):60108,ft=it?Symbol.for("react.profiler"):60114,pt=it?Symbol.for("react.provider"):60109,dt=it?Symbol.for("react.context"):60110,ht=it?Symbol.for("react.async_mode"):60111,mt=it?Symbol.for("react.forward_ref"):60112,bt=it?Symbol.for("react.timeout"):60113,vt="function"===typeof Symbol&&Symbol.iterator;function yt(e){return null===e||"undefined"===typeof e?null:"function"===typeof(e=vt&&e[vt]||e["@@iterator"])?e:null}function gt(e){var t=e.type;if("function"===typeof t)return t.displayName||t.name;if("string"===typeof t)return t;switch(t){case ht:return"AsyncMode";case dt:return"Context.Consumer";case ct:return"ReactFragment";case st:return"ReactPortal";case ft:return"Profiler("+e.pendingProps.id+")";case pt:return"Context.Provider";case ut:return"StrictMode";case bt:return"Timeout"}if("object"===typeof t&&null!==t)switch(t.$$typeof){case mt:return""!==(e=t.render.displayName||t.render.name||"")?"ForwardRef("+e+")":"ForwardRef"}return null}function Ot(e){var t="";do{e:switch(e.tag){case 0:case 1:case 2:case 5:var n=e._debugOwner,r=e._debugSource,o=gt(e),a=null;n&&(a=gt(n)),n=r,o="\n in "+(o||"Unknown")+(n?" (at "+n.fileName.replace(/^.*[\\\/]/,"")+":"+n.lineNumber+")":a?" (created by "+a+")":"");break e;default:o=""}t+=o,e=e.return}while(e);return t}var Et=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,xt=Object.prototype.hasOwnProperty,Ct={},wt={};function _t(e,t,n,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t}var jt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){jt[e]=new _t(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];jt[t]=new _t(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){jt[e]=new _t(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){jt[e]=new _t(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){jt[e]=new _t(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){jt[e]=new _t(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){jt[e]=new _t(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){jt[e]=new _t(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){jt[e]=new _t(e,5,!1,e.toLowerCase(),null)});var Tt=/[\-:]([a-z])/g;function Nt(e){return e[1].toUpperCase()}function kt(e,t,n,r){var o=jt.hasOwnProperty(t)?jt[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!xt.call(wt,e)||!xt.call(Ct,e)&&(Et.test(e)?wt[e]=!0:(Ct[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function St(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Pt(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=At(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Mt(e,t){null!=(t=t.checked)&&kt(e,"checked",t,!1)}function Rt(e,t){Mt(e,t);var n=At(t.value);null!=n&&("number"===t.type?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n)),t.hasOwnProperty("value")?Dt(e,t.type,n):t.hasOwnProperty("defaultValue")&&Dt(e,t.type,At(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function It(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){t=""+e._wrapperState.initialValue;var r=e.value;n||t===r||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==n&&(e.name=n)}function Dt(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function At(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Tt,Nt);jt[t]=new _t(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Tt,Nt);jt[t]=new _t(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Tt,Nt);jt[t]=new _t(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),jt.tabIndex=new _t("tabIndex",1,!1,"tabindex",null);var Lt={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Ft(e,t,n){return(e=Oe.getPooled(Lt.change,e,t,n)).type="change",Ke(n),ee(e),e}var Ut=null,Bt=null;function Ht(e){L(e,!1)}function zt(e){if(ot(W(e)))return e}function Kt(e,t){if("change"===e)return t}var Wt=!1;function $t(){Ut&&(Ut.detachEvent("onpropertychange",Vt),Bt=Ut=null)}function Vt(e){"value"===e.propertyName&&zt(Bt)&&Qe(Ht,e=Ft(Bt,e,et(e)))}function qt(e,t,n){"focus"===e?($t(),Bt=n,(Ut=t).attachEvent("onpropertychange",Vt)):"blur"===e&&$t()}function Gt(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return zt(Bt)}function Yt(e,t){if("click"===e)return zt(t)}function Xt(e,t){if("input"===e||"change"===e)return zt(t)}a.canUseDOM&&(Wt=tt("input")&&(!document.documentMode||9<document.documentMode));var Qt={eventTypes:Lt,_isInputEventSupported:Wt,extractEvents:function(e,t,n,r){var o=t?W(t):window,a=void 0,i=void 0,l=o.nodeName&&o.nodeName.toLowerCase();if("select"===l||"input"===l&&"file"===o.type?a=Kt:Je(o)?Wt?a=Xt:(a=Gt,i=qt):(l=o.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(a=Yt),a&&(a=a(e,t)))return Ft(a,n,r);i&&i(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&Dt(o,"number",o.value)}},Zt=Oe.extend({view:null,detail:null}),Jt={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function en(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Jt[e])&&!!t[e]}function tn(){return en}var nn=Zt.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:tn,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)}}),rn=nn.extend({pointerId:null,width:null,height:null,pressure:null,tiltX:null,tiltY:null,pointerType:null,isPrimary:null}),on={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},an={eventTypes:on,extractEvents:function(e,t,n,r){var o="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(o&&(n.relatedTarget||n.fromElement)||!a&&!o)return null;if(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,a?(a=t,t=(t=n.relatedTarget||n.toElement)?K(t):null):a=null,a===t)return null;var i=void 0,l=void 0,s=void 0,c=void 0;return"mouseout"===e||"mouseover"===e?(i=nn,l=on.mouseLeave,s=on.mouseEnter,c="mouse"):"pointerout"!==e&&"pointerover"!==e||(i=rn,l=on.pointerLeave,s=on.pointerEnter,c="pointer"),e=null==a?o:W(a),o=null==t?o:W(t),(l=i.getPooled(l,a,n,r)).type=c+"leave",l.target=e,l.relatedTarget=o,(n=i.getPooled(s,t,n,r)).type=c+"enter",n.target=o,n.relatedTarget=e,te(l,n,a,t),[l,n]}};function ln(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!==(2&t.effectTag))return 1;for(;t.return;)if(0!==(2&(t=t.return).effectTag))return 1}return 3===t.tag?2:3}function sn(e){2!==ln(e)&&p("188")}function cn(e){var t=e.alternate;if(!t)return 3===(t=ln(e))&&p("188"),1===t?null:e;for(var n=e,r=t;;){var o=n.return,a=o?o.alternate:null;if(!o||!a)break;if(o.child===a.child){for(var i=o.child;i;){if(i===n)return sn(o),e;if(i===r)return sn(o),t;i=i.sibling}p("188")}if(n.return!==r.return)n=o,r=a;else{i=!1;for(var l=o.child;l;){if(l===n){i=!0,n=o,r=a;break}if(l===r){i=!0,r=o,n=a;break}l=l.sibling}if(!i){for(l=a.child;l;){if(l===n){i=!0,n=a,r=o;break}if(l===r){i=!0,r=a,n=o;break}l=l.sibling}i||p("189")}}n.alternate!==r&&p("190")}return 3!==n.tag&&p("188"),n.stateNode.current===n?e:t}function un(e){if(!(e=cn(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}var fn=Oe.extend({animationName:null,elapsedTime:null,pseudoElement:null}),pn=Oe.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dn=Zt.extend({relatedTarget:null});function hn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var mn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},vn=Zt.extend({key:function(e){if(e.key){var t=mn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=hn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?bn[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:tn,charCode:function(e){return"keypress"===e.type?hn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?hn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),yn=nn.extend({dataTransfer:null}),gn=Zt.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:tn}),On=Oe.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),En=nn.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),xn=[["abort","abort"],[se,"animationEnd"],[ce,"animationIteration"],[ue,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[fe,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],Cn={},wn={};function _n(e,t){var n=e[0],r="on"+((e=e[1])[0].toUpperCase()+e.slice(1));t={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:t},Cn[e]=t,wn[n]=t}[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach(function(e){_n(e,!0)}),xn.forEach(function(e){_n(e,!1)});var jn={eventTypes:Cn,isInteractiveTopLevelEventType:function(e){return void 0!==(e=wn[e])&&!0===e.isInteractive},extractEvents:function(e,t,n,r){var o=wn[e];if(!o)return null;switch(e){case"keypress":if(0===hn(n))return null;case"keydown":case"keyup":e=vn;break;case"blur":case"focus":e=dn;break;case"click":if(2===n.button)return null;case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=nn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=gn;break;case se:case ce:case ue:e=fn;break;case fe:e=On;break;case"scroll":e=Zt;break;case"wheel":e=En;break;case"copy":case"cut":case"paste":e=pn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=rn;break;default:e=Oe}return ee(t=e.getPooled(o,t,n,r)),t}},Tn=jn.isInteractiveTopLevelEventType,Nn=[];function kn(e){var t=e.targetInst;do{if(!t){e.ancestors.push(t);break}var n;for(n=t;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;e.ancestors.push(t),t=K(n)}while(t);for(n=0;n<e.ancestors.length;n++)t=e.ancestors[n],F(e.topLevelType,t,e.nativeEvent,et(e.nativeEvent))}var Sn=!0;function Pn(e){Sn=!!e}function Mn(e,t){if(!t)return null;var n=(Tn(e)?In:Dn).bind(null,e);t.addEventListener(e,n,!1)}function Rn(e,t){if(!t)return null;var n=(Tn(e)?In:Dn).bind(null,e);t.addEventListener(e,n,!0)}function In(e,t){Ge(Dn,e,t)}function Dn(e,t){if(Sn){var n=et(t);if(null===(n=K(n))||"number"!==typeof n.tag||2===ln(n)||(n=null),Nn.length){var r=Nn.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{Qe(kn,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>Nn.length&&Nn.push(e)}}}var An={get _enabled(){return Sn},setEnabled:Pn,isEnabled:function(){return Sn},trapBubbledEvent:Mn,trapCapturedEvent:Rn,dispatchEvent:Dn},Ln={},Fn=0,Un="_reactListenersID"+(""+Math.random()).slice(2);function Bn(e){return Object.prototype.hasOwnProperty.call(e,Un)||(e[Un]=Fn++,Ln[e[Un]]={}),Ln[e[Un]]}function Hn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zn(e,t){var n,r=Hn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Hn(r)}}function Kn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var Wn=a.canUseDOM&&"documentMode"in document&&11>=document.documentMode,$n={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Vn=null,qn=null,Gn=null,Yn=!1;function Xn(e,t){if(Yn||null==Vn||Vn!==s())return null;var n=Vn;return"selectionStart"in n&&Kn(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?n={anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:n=void 0,Gn&&c(Gn,n)?null:(Gn=n,(e=Oe.getPooled($n.select,qn,e,t)).type="select",e.target=Vn,ee(e),e)}var Qn={eventTypes:$n,extractEvents:function(e,t,n,r){var o,a=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!a)){e:{a=Bn(a),o=E.onSelect;for(var i=0;i<o.length;i++){var l=o[i];if(!a.hasOwnProperty(l)||!a[l]){a=!1;break e}}a=!0}o=!a}if(o)return null;switch(a=t?W(t):window,e){case"focus":(Je(a)||"true"===a.contentEditable)&&(Vn=a,qn=t,Gn=null);break;case"blur":Gn=qn=Vn=null;break;case"mousedown":Yn=!0;break;case"contextmenu":case"mouseup":return Yn=!1,Xn(n,r);case"selectionchange":if(Wn)break;case"keydown":case"keyup":return Xn(n,r)}return null}};D.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),_=V.getFiberCurrentPropsFromNode,j=V.getInstanceFromNode,T=V.getNodeFromInstance,D.injectEventPluginsByName({SimpleEventPlugin:jn,EnterLeaveEventPlugin:an,ChangeEventPlugin:Qt,SelectEventPlugin:Qn,BeforeInputEventPlugin:Le});var Zn="function"===typeof requestAnimationFrame?requestAnimationFrame:void 0,Jn=Date,er=setTimeout,tr=clearTimeout,nr=void 0;if("object"===typeof performance&&"function"===typeof performance.now){var rr=performance;nr=function(){return rr.now()}}else nr=function(){return Jn.now()};var or=void 0,ar=void 0;if(a.canUseDOM){var ir="function"===typeof Zn?Zn:function(){p("276")},lr=null,sr=null,cr=-1,ur=!1,fr=!1,pr=0,dr=33,hr=33,mr={didTimeout:!1,timeRemaining:function(){var e=pr-nr();return 0<e?e:0}},br=function(e,t){var n=e.scheduledCallback,r=!1;try{n(t),r=!0}finally{ar(e),r||(ur=!0,window.postMessage(vr,"*"))}},vr="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===vr&&(ur=!1,null!==lr)){if(null!==lr){var t=nr();if(!(-1===cr||cr>t)){e=-1;for(var n=[],r=lr;null!==r;){var o=r.timeoutTime;-1!==o&&o<=t?n.push(r):-1!==o&&(-1===e||o<e)&&(e=o),r=r.next}if(0<n.length)for(mr.didTimeout=!0,t=0,r=n.length;t<r;t++)br(n[t],mr);cr=e}}for(e=nr();0<pr-e&&null!==lr;)e=lr,mr.didTimeout=!1,br(e,mr),e=nr();null===lr||fr||(fr=!0,ir(yr))}},!1);var yr=function(e){fr=!1;var t=e-pr+hr;t<hr&&dr<hr?(8>t&&(t=8),hr=t<dr?dr:t):dr=t,pr=e+hr,ur||(ur=!0,window.postMessage(vr,"*"))};or=function(e,t){var n=-1;return null!=t&&"number"===typeof t.timeout&&(n=nr()+t.timeout),(-1===cr||-1!==n&&n<cr)&&(cr=n),e={scheduledCallback:e,timeoutTime:n,prev:null,next:null},null===lr?lr=e:null!==(t=e.prev=sr)&&(t.next=e),sr=e,fr||(fr=!0,ir(yr)),e},ar=function(e){if(null!==e.prev||lr===e){var t=e.next,n=e.prev;e.next=null,e.prev=null,null!==t?null!==n?(n.next=t,t.prev=n):(t.prev=null,lr=t):null!==n?(n.next=null,sr=n):sr=lr=null}}}else{var gr=new Map;or=function(e){var t={scheduledCallback:e,timeoutTime:0,next:null,prev:null},n=er(function(){e({timeRemaining:function(){return 1/0},didTimeout:!1})});return gr.set(e,n),t},ar=function(e){var t=gr.get(e.scheduledCallback);gr.delete(e),tr(t)}}function Or(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return o.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}(t.children))&&(e.children=t),e}function Er(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+n,t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function xr(e,t){var n=t.value;e._wrapperState={initialValue:null!=n?n:t.defaultValue,wasMultiple:!!t.multiple}}function Cr(e,t){return null!=t.dangerouslySetInnerHTML&&p("91"),i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function wr(e,t){var n=t.value;null==n&&(n=t.defaultValue,null!=(t=t.children)&&(null!=n&&p("92"),Array.isArray(t)&&(1>=t.length||p("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function _r(e,t){var n=t.value;null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function jr(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}var Tr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Nr(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function kr(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Nr(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Sr,Pr=void 0,Mr=(Sr=function(e,t){if(e.namespaceURI!==Tr.svg||"innerHTML"in e)e.innerHTML=t;else{for((Pr=Pr||document.createElement("div")).innerHTML="<svg>"+t+"</svg>",t=Pr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return Sr(e,t)})}:Sr);function Rr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Ir={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Dr=["Webkit","ms","Moz","O"];function Ar(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,a=t[n];o=null==a||"boolean"===typeof a||""===a?"":r||"number"!==typeof a||0===a||Ir.hasOwnProperty(o)&&Ir[o]?(""+a).trim():a+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(Ir).forEach(function(e){Dr.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ir[t]=Ir[e]})});var Lr=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Fr(e,t,n){t&&(Lr[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&p("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&p("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||p("61")),null!=t.style&&"object"!==typeof t.style&&p("62",n()))}function Ur(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Br=l.thatReturns("");function Hr(e,t){var n=Bn(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=E[t];for(var r=0;r<t.length;r++){var o=t[r];if(!n.hasOwnProperty(o)||!n[o]){switch(o){case"scroll":Rn("scroll",e);break;case"focus":case"blur":Rn("focus",e),Rn("blur",e),n.blur=!0,n.focus=!0;break;case"cancel":case"close":tt(o,!0)&&Rn(o,e);break;case"invalid":case"submit":case"reset":break;default:-1===pe.indexOf(o)&&Mn(o,e)}n[o]=!0}}}function zr(e,t,n,r){return n=9===n.nodeType?n:n.ownerDocument,r===Tr.html&&(r=Nr(e)),r===Tr.html?"script"===e?((e=n.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):e="string"===typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function Kr(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function Wr(e,t,n,r){var o=Ur(t,n);switch(t){case"iframe":case"object":Mn("load",e);var a=n;break;case"video":case"audio":for(a=0;a<pe.length;a++)Mn(pe[a],e);a=n;break;case"source":Mn("error",e),a=n;break;case"img":case"image":case"link":Mn("error",e),Mn("load",e),a=n;break;case"form":Mn("reset",e),Mn("submit",e),a=n;break;case"details":Mn("toggle",e),a=n;break;case"input":Pt(e,n),a=St(e,n),Mn("invalid",e),Hr(r,"onChange");break;case"option":a=Or(e,n);break;case"select":xr(e,n),a=i({},n,{value:void 0}),Mn("invalid",e),Hr(r,"onChange");break;case"textarea":wr(e,n),a=Cr(e,n),Mn("invalid",e),Hr(r,"onChange");break;default:a=n}Fr(t,a,Br);var s,c=a;for(s in c)if(c.hasOwnProperty(s)){var u=c[s];"style"===s?Ar(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&Mr(e,u):"children"===s?"string"===typeof u?("textarea"!==t||""!==u)&&Rr(e,u):"number"===typeof u&&Rr(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(O.hasOwnProperty(s)?null!=u&&Hr(r,s):null!=u&&kt(e,s,u,o))}switch(t){case"input":rt(e),It(e,n,!1);break;case"textarea":rt(e),jr(e);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,null!=(t=n.value)?Er(e,!!n.multiple,t,!1):null!=n.defaultValue&&Er(e,!!n.multiple,n.defaultValue,!0);break;default:"function"===typeof a.onClick&&(e.onclick=l)}}function $r(e,t,n,r,o){var a=null;switch(t){case"input":n=St(e,n),r=St(e,r),a=[];break;case"option":n=Or(e,n),r=Or(e,r),a=[];break;case"select":n=i({},n,{value:void 0}),r=i({},r,{value:void 0}),a=[];break;case"textarea":n=Cr(e,n),r=Cr(e,r),a=[];break;default:"function"!==typeof n.onClick&&"function"===typeof r.onClick&&(e.onclick=l)}Fr(t,r,Br),t=e=void 0;var s=null;for(e in n)if(!r.hasOwnProperty(e)&&n.hasOwnProperty(e)&&null!=n[e])if("style"===e){var c=n[e];for(t in c)c.hasOwnProperty(t)&&(s||(s={}),s[t]="")}else"dangerouslySetInnerHTML"!==e&&"children"!==e&&"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&"autoFocus"!==e&&(O.hasOwnProperty(e)?a||(a=[]):(a=a||[]).push(e,null));for(e in r){var u=r[e];if(c=null!=n?n[e]:void 0,r.hasOwnProperty(e)&&u!==c&&(null!=u||null!=c))if("style"===e)if(c){for(t in c)!c.hasOwnProperty(t)||u&&u.hasOwnProperty(t)||(s||(s={}),s[t]="");for(t in u)u.hasOwnProperty(t)&&c[t]!==u[t]&&(s||(s={}),s[t]=u[t])}else s||(a||(a=[]),a.push(e,s)),s=u;else"dangerouslySetInnerHTML"===e?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(a=a||[]).push(e,""+u)):"children"===e?c===u||"string"!==typeof u&&"number"!==typeof u||(a=a||[]).push(e,""+u):"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&(O.hasOwnProperty(e)?(null!=u&&Hr(o,e),a||c===u||(a=[])):(a=a||[]).push(e,u))}return s&&(a=a||[]).push("style",s),a}function Vr(e,t,n,r,o){"input"===n&&"radio"===o.type&&null!=o.name&&Mt(e,o),Ur(n,r),r=Ur(n,o);for(var a=0;a<t.length;a+=2){var i=t[a],l=t[a+1];"style"===i?Ar(e,l):"dangerouslySetInnerHTML"===i?Mr(e,l):"children"===i?Rr(e,l):kt(e,i,l,r)}switch(n){case"input":Rt(e,o);break;case"textarea":_r(e,o);break;case"select":e._wrapperState.initialValue=void 0,t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!o.multiple,null!=(n=o.value)?Er(e,!!o.multiple,n,!1):t!==!!o.multiple&&(null!=o.defaultValue?Er(e,!!o.multiple,o.defaultValue,!0):Er(e,!!o.multiple,o.multiple?[]:"",!1))}}function qr(e,t,n,r,o){switch(t){case"iframe":case"object":Mn("load",e);break;case"video":case"audio":for(r=0;r<pe.length;r++)Mn(pe[r],e);break;case"source":Mn("error",e);break;case"img":case"image":case"link":Mn("error",e),Mn("load",e);break;case"form":Mn("reset",e),Mn("submit",e);break;case"details":Mn("toggle",e);break;case"input":Pt(e,n),Mn("invalid",e),Hr(o,"onChange");break;case"select":xr(e,n),Mn("invalid",e),Hr(o,"onChange");break;case"textarea":wr(e,n),Mn("invalid",e),Hr(o,"onChange")}for(var a in Fr(t,n,Br),r=null,n)if(n.hasOwnProperty(a)){var i=n[a];"children"===a?"string"===typeof i?e.textContent!==i&&(r=["children",i]):"number"===typeof i&&e.textContent!==""+i&&(r=["children",""+i]):O.hasOwnProperty(a)&&null!=i&&Hr(o,a)}switch(t){case"input":rt(e),It(e,n,!0);break;case"textarea":rt(e),jr(e);break;case"select":case"option":break;default:"function"===typeof n.onClick&&(e.onclick=l)}return r}function Gr(e,t){return e.nodeValue!==t}var Yr={createElement:zr,createTextNode:Kr,setInitialProperties:Wr,diffProperties:$r,updateProperties:Vr,diffHydratedProperties:qr,diffHydratedText:Gr,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(Rt(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=$(r);o||p("90"),ot(r),Rt(r,o)}}}break;case"textarea":_r(e,n);break;case"select":null!=(t=n.value)&&Er(e,!!n.multiple,t,!1)}}},Xr=null,Qr=null;function Zr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Jr(e,t){return"textarea"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&"string"===typeof t.dangerouslySetInnerHTML.__html}var eo=nr,to=or,no=ar;function ro(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}function oo(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}new Set;var ao=[],io=-1;function lo(e){return{current:e}}function so(e){0>io||(e.current=ao[io],ao[io]=null,io--)}function co(e,t){ao[++io]=e.current,e.current=t}var uo=lo(f),fo=lo(!1),po=f;function ho(e){return bo(e)?po:uo.current}function mo(e,t){var n=e.type.contextTypes;if(!n)return f;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function bo(e){return 2===e.tag&&null!=e.type.childContextTypes}function vo(e){bo(e)&&(so(fo),so(uo))}function yo(e){so(fo),so(uo)}function go(e,t,n){uo.current!==f&&p("168"),co(uo,t),co(fo,n)}function Oo(e,t){var n=e.stateNode,r=e.type.childContextTypes;if("function"!==typeof n.getChildContext)return t;for(var o in n=n.getChildContext())o in r||p("108",gt(e)||"Unknown",o);return i({},t,n)}function Eo(e){if(!bo(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||f,po=uo.current,co(uo,t),co(fo,fo.current),!0}function xo(e,t){var n=e.stateNode;if(n||p("169"),t){var r=Oo(e,po);n.__reactInternalMemoizedMergedChildContext=r,so(fo),so(uo),co(uo,r)}else so(fo);co(fo,t)}function Co(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function wo(e,t,n){var r=e.alternate;return null===r?((r=new Co(e.tag,t,e.key,e.mode)).type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function _o(e,t,n){var r=e.type,o=e.key;if(e=e.props,"function"===typeof r)var a=r.prototype&&r.prototype.isReactComponent?2:0;else if("string"===typeof r)a=5;else switch(r){case ct:return jo(e.children,t,n,o);case ht:a=11,t|=3;break;case ut:a=11,t|=2;break;case ft:return(r=new Co(15,e,o,4|t)).type=ft,r.expirationTime=n,r;case bt:a=16,t|=2;break;default:e:{switch("object"===typeof r&&null!==r?r.$$typeof:null){case pt:a=13;break e;case dt:a=12;break e;case mt:a=14;break e;default:p("130",null==r?r:typeof r,"")}a=void 0}}return(t=new Co(a,e,o,t)).type=r,t.expirationTime=n,t}function jo(e,t,n,r){return(e=new Co(10,e,r,t)).expirationTime=n,e}function To(e,t,n){return(e=new Co(6,e,null,t)).expirationTime=n,e}function No(e,t,n){return(t=new Co(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ko(e,t,n){return e={current:t=new Co(3,null,null,t?3:0),containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}var So=null,Po=null;function Mo(e){return function(t){try{return e(t)}catch(e){}}}function Ro(e){"function"===typeof So&&So(e)}function Io(e){"function"===typeof Po&&Po(e)}var Do=!1;function Ao(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Lo(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Fo(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Uo(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n)}function Bo(e,t,n){var r=e.alternate;if(null===r){var o=e.updateQueue,a=null;null===o&&(o=e.updateQueue=Ao(e.memoizedState))}else o=e.updateQueue,a=r.updateQueue,null===o?null===a?(o=e.updateQueue=Ao(e.memoizedState),a=r.updateQueue=Ao(r.memoizedState)):o=e.updateQueue=Lo(a):null===a&&(a=r.updateQueue=Lo(o));null===a||o===a?Uo(o,t,n):null===o.lastUpdate||null===a.lastUpdate?(Uo(o,t,n),Uo(a,t,n)):(Uo(o,t,n),a.lastUpdate=t)}function Ho(e,t,n){var r=e.updateQueue;null===(r=null===r?e.updateQueue=Ao(e.memoizedState):zo(e,r)).lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function zo(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Lo(t)),t}function Ko(e,t,n,r,o,a){switch(n.tag){case 1:return"function"===typeof(e=n.payload)?e.call(a,r,o):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(null===(o="function"===typeof(e=n.payload)?e.call(a,r,o):e)||void 0===o)break;return i({},r,o);case 2:Do=!0}return r}function Wo(e,t,n,r,o){if(Do=!1,!(0===t.expirationTime||t.expirationTime>o)){for(var a=(t=zo(e,t)).baseState,i=null,l=0,s=t.firstUpdate,c=a;null!==s;){var u=s.expirationTime;u>o?(null===i&&(i=s,a=c),(0===l||l>u)&&(l=u)):(c=Ko(e,0,s,c,n,r),null!==s.callback&&(e.effectTag|=32,s.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=s:(t.lastEffect.nextEffect=s,t.lastEffect=s))),s=s.next}for(u=null,s=t.firstCapturedUpdate;null!==s;){var f=s.expirationTime;f>o?(null===u&&(u=s,null===i&&(a=c)),(0===l||l>f)&&(l=f)):(c=Ko(e,0,s,c,n,r),null!==s.callback&&(e.effectTag|=32,s.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=s:(t.lastCapturedEffect.nextEffect=s,t.lastCapturedEffect=s))),s=s.next}null===i&&(t.lastUpdate=null),null===u?t.lastCapturedUpdate=null:e.effectTag|=32,null===i&&null===u&&(a=c),t.baseState=a,t.firstUpdate=i,t.firstCapturedUpdate=u,t.expirationTime=l,e.memoizedState=c}}function $o(e,t){"function"!==typeof e&&p("191",e),e.call(t)}function Vo(e,t,n){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var r=e.callback;null!==r&&(e.callback=null,$o(r,n)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)null!==(t=e.callback)&&(e.callback=null,$o(t,n)),e=e.nextEffect}function qo(e,t){return{value:e,source:t,stack:Ot(t)}}var Go=lo(null),Yo=lo(null),Xo=lo(0);function Qo(e){var t=e.type._context;co(Xo,t._changedBits),co(Yo,t._currentValue),co(Go,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function Zo(e){var t=Xo.current,n=Yo.current;so(Go),so(Yo),so(Xo),(e=e.type._context)._currentValue=n,e._changedBits=t}var Jo={},ea=lo(Jo),ta=lo(Jo),na=lo(Jo);function ra(e){return e===Jo&&p("174"),e}function oa(e,t){co(na,t),co(ta,e),co(ea,Jo);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:kr(null,"");break;default:t=kr(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}so(ea),co(ea,t)}function aa(e){so(ea),so(ta),so(na)}function ia(e){ta.current===e&&(so(ea),so(ta))}function la(e,t,n){var r=e.memoizedState;r=null===(t=t(n,r))||void 0===t?r:i({},r,t),e.memoizedState=r,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=r)}var sa={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===ln(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Oi(),o=Fo(r=yi(r,e));o.payload=t,void 0!==n&&null!==n&&(o.callback=n),Bo(e,o,r),gi(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Oi(),o=Fo(r=yi(r,e));o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),Bo(e,o,r),gi(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Oi(),r=Fo(n=yi(n,e));r.tag=2,void 0!==t&&null!==t&&(r.callback=t),Bo(e,r,n),gi(e,n)}};function ca(e,t,n,r,o,a){var i=e.stateNode;return e=e.type,"function"===typeof i.shouldComponentUpdate?i.shouldComponentUpdate(n,o,a):!e.prototype||!e.prototype.isPureReactComponent||(!c(t,n)||!c(r,o))}function ua(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&sa.enqueueReplaceState(t,t.state,null)}function fa(e,t){var n=e.type,r=e.stateNode,o=e.pendingProps,a=ho(e);r.props=o,r.state=e.memoizedState,r.refs=f,r.context=mo(e,a),null!==(a=e.updateQueue)&&(Wo(e,a,o,r,t),r.state=e.memoizedState),"function"===typeof(a=e.type.getDerivedStateFromProps)&&(la(e,a,o),r.state=e.memoizedState),"function"===typeof n.getDerivedStateFromProps||"function"===typeof r.getSnapshotBeforeUpdate||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||(n=r.state,"function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&sa.enqueueReplaceState(r,r.state,null),null!==(a=e.updateQueue)&&(Wo(e,a,o,r,t),r.state=e.memoizedState)),"function"===typeof r.componentDidMount&&(e.effectTag|=4)}var pa=Array.isArray;function da(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){var r=void 0;(n=n._owner)&&(2!==n.tag&&p("110"),r=n.stateNode),r||p("147",e);var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=r.refs===f?r.refs={}:r.refs;null===e?delete t[o]:t[o]=e})._stringRef=o,t)}"string"!==typeof e&&p("148"),n._owner||p("254",e)}return e}function ha(e,t){"textarea"!==e.type&&p("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function ma(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t,n){return(e=wo(e,t,n)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function i(t){return e&&null===t.alternate&&(t.effectTag=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=To(n,e.mode,r)).return=e,t):((t=o(t,n,r)).return=e,t)}function s(e,t,n,r){return null!==t&&t.type===n.type?((r=o(t,n.props,r)).ref=da(e,t,n),r.return=e,r):((r=_o(n,e.mode,r)).ref=da(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=No(n,e.mode,r)).return=e,t):((t=o(t,n.children||[],r)).return=e,t)}function u(e,t,n,r,a){return null===t||10!==t.tag?((t=jo(n,e.mode,r,a)).return=e,t):((t=o(t,n,r)).return=e,t)}function f(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=To(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case lt:return(n=_o(t,e.mode,n)).ref=da(e,null,t),n.return=e,n;case st:return(t=No(t,e.mode,n)).return=e,t}if(pa(t)||yt(t))return(t=jo(t,e.mode,n,null)).return=e,t;ha(e,t)}return null}function d(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==o?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case lt:return n.key===o?n.type===ct?u(e,t,n.props.children,r,o):s(e,t,n,r):null;case st:return n.key===o?c(e,t,n,r):null}if(pa(n)||yt(n))return null!==o?null:u(e,t,n,r,null);ha(e,n)}return null}function h(e,t,n,r,o){if("string"===typeof r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case lt:return e=e.get(null===r.key?n:r.key)||null,r.type===ct?u(t,e,r.props.children,o,r.key):s(t,e,r,o);case st:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(pa(r)||yt(r))return u(t,e=e.get(n)||null,r,o,null);ha(t,r)}return null}function m(o,i,l,s){for(var c=null,u=null,p=i,m=i=0,b=null;null!==p&&m<l.length;m++){p.index>m?(b=p,p=null):b=p.sibling;var v=d(o,p,l[m],s);if(null===v){null===p&&(p=b);break}e&&p&&null===v.alternate&&t(o,p),i=a(v,i,m),null===u?c=v:u.sibling=v,u=v,p=b}if(m===l.length)return n(o,p),c;if(null===p){for(;m<l.length;m++)(p=f(o,l[m],s))&&(i=a(p,i,m),null===u?c=p:u.sibling=p,u=p);return c}for(p=r(o,p);m<l.length;m++)(b=h(p,o,m,l[m],s))&&(e&&null!==b.alternate&&p.delete(null===b.key?m:b.key),i=a(b,i,m),null===u?c=b:u.sibling=b,u=b);return e&&p.forEach(function(e){return t(o,e)}),c}function b(o,i,l,s){var c=yt(l);"function"!==typeof c&&p("150"),null==(l=c.call(l))&&p("151");for(var u=c=null,m=i,b=i=0,v=null,y=l.next();null!==m&&!y.done;b++,y=l.next()){m.index>b?(v=m,m=null):v=m.sibling;var g=d(o,m,y.value,s);if(null===g){m||(m=v);break}e&&m&&null===g.alternate&&t(o,m),i=a(g,i,b),null===u?c=g:u.sibling=g,u=g,m=v}if(y.done)return n(o,m),c;if(null===m){for(;!y.done;b++,y=l.next())null!==(y=f(o,y.value,s))&&(i=a(y,i,b),null===u?c=y:u.sibling=y,u=y);return c}for(m=r(o,m);!y.done;b++,y=l.next())null!==(y=h(m,o,b,y.value,s))&&(e&&null!==y.alternate&&m.delete(null===y.key?b:y.key),i=a(y,i,b),null===u?c=y:u.sibling=y,u=y);return e&&m.forEach(function(e){return t(o,e)}),c}return function(e,r,a,l){var s="object"===typeof a&&null!==a&&a.type===ct&&null===a.key;s&&(a=a.props.children);var c="object"===typeof a&&null!==a;if(c)switch(a.$$typeof){case lt:e:{for(c=a.key,s=r;null!==s;){if(s.key===c){if(10===s.tag?a.type===ct:s.type===a.type){n(e,s.sibling),(r=o(s,a.type===ct?a.props.children:a.props,l)).ref=da(e,s,a),r.return=e,e=r;break e}n(e,s);break}t(e,s),s=s.sibling}a.type===ct?((r=jo(a.props.children,e.mode,l,a.key)).return=e,e=r):((l=_o(a,e.mode,l)).ref=da(e,r,a),l.return=e,e=l)}return i(e);case st:e:{for(s=a.key;null!==r;){if(r.key===s){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=o(r,a.children||[],l)).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=No(a,e.mode,l)).return=e,e=r}return i(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,a,l)).return=e,e=r):(n(e,r),(r=To(a,e.mode,l)).return=e,e=r),i(e);if(pa(a))return m(e,r,a,l);if(yt(a))return b(e,r,a,l);if(c&&ha(e,a),"undefined"===typeof a&&!s)switch(e.tag){case 2:case 1:p("152",(l=e.type).displayName||l.name||"Component")}return n(e,r)}}var ba=ma(!0),va=ma(!1),ya=null,ga=null,Oa=!1;function Ea(e,t){var n=new Co(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function xa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Ca(e){if(Oa){var t=ga;if(t){var n=t;if(!xa(e,t)){if(!(t=ro(n))||!xa(e,t))return e.effectTag|=2,Oa=!1,void(ya=e);Ea(ya,n)}ya=e,ga=oo(t)}else e.effectTag|=2,Oa=!1,ya=e}}function wa(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;ya=e}function _a(e){if(e!==ya)return!1;if(!Oa)return wa(e),Oa=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Jr(t,e.memoizedProps))for(t=ga;t;)Ea(e,t),t=ro(t);return wa(e),ga=ya?ro(e.stateNode):null,!0}function ja(){ga=ya=null,Oa=!1}function Ta(e,t,n){Na(e,t,n,t.expirationTime)}function Na(e,t,n,r){t.child=null===e?va(t,null,n,r):ba(t,e.child,n,r)}function ka(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Sa(e,t,n,r,o){ka(e,t);var a=0!==(64&t.effectTag);if(!n&&!a)return r&&xo(t,!1),Ra(e,t);n=t.stateNode,at.current=t;var i=a?null:n.render();return t.effectTag|=1,a&&(Na(e,t,null,o),t.child=null),Na(e,t,i,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&xo(t,!0),t.child}function Pa(e){var t=e.stateNode;t.pendingContext?go(0,t.pendingContext,t.pendingContext!==t.context):t.context&&go(0,t.context,!1),oa(e,t.containerInfo)}function Ma(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){switch(o.tag){case 12:var a=0|o.stateNode;if(o.type===t&&0!==(a&n)){for(a=o;null!==a;){var i=a.alternate;if(0===a.expirationTime||a.expirationTime>r)a.expirationTime=r,null!==i&&(0===i.expirationTime||i.expirationTime>r)&&(i.expirationTime=r);else{if(null===i||!(0===i.expirationTime||i.expirationTime>r))break;i.expirationTime=r}a=a.return}a=null}else a=o.child;break;case 13:a=o.type===e.type?null:o.child;break;default:a=o.child}if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===e){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}}function Ra(e,t){if(null!==e&&t.child!==e.child&&p("153"),null!==t.child){var n=wo(e=t.child,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=wo(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function Ia(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:Pa(t);break;case 2:Eo(t);break;case 4:oa(t,t.stateNode.containerInfo);break;case 13:Qo(t)}return null}switch(t.tag){case 0:null!==e&&p("155");var r=t.type,o=t.pendingProps,a=ho(t);return r=r(o,a=mo(t,a)),t.effectTag|=1,"object"===typeof r&&null!==r&&"function"===typeof r.render&&void 0===r.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,"function"===typeof(a=a.getDerivedStateFromProps)&&la(t,a,o),o=Eo(t),r.updater=sa,t.stateNode=r,r._reactInternalFiber=t,fa(t,n),e=Sa(e,t,!0,o,n)):(t.tag=1,Ta(e,t,r),t.memoizedProps=o,e=t.child),e;case 1:return o=t.type,n=t.pendingProps,fo.current||t.memoizedProps!==n?(o=o(n,r=mo(t,r=ho(t))),t.effectTag|=1,Ta(e,t,o),t.memoizedProps=n,e=t.child):e=Ra(e,t),e;case 2:if(o=Eo(t),null===e)if(null===t.stateNode){var i=t.pendingProps,l=t.type;r=ho(t);var s=2===t.tag&&null!=t.type.contextTypes;i=new l(i,a=s?mo(t,r):f),t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,i.updater=sa,t.stateNode=i,i._reactInternalFiber=t,s&&((s=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,s.__reactInternalMemoizedMaskedChildContext=a),fa(t,n),r=!0}else{l=t.type,r=t.stateNode,s=t.memoizedProps,a=t.pendingProps,r.props=s;var c=r.context;i=mo(t,i=ho(t));var u=l.getDerivedStateFromProps;(l="function"===typeof u||"function"===typeof r.getSnapshotBeforeUpdate)||"function"!==typeof r.UNSAFE_componentWillReceiveProps&&"function"!==typeof r.componentWillReceiveProps||(s!==a||c!==i)&&ua(t,r,a,i),Do=!1;var d=t.memoizedState;c=r.state=d;var h=t.updateQueue;null!==h&&(Wo(t,h,a,r,n),c=t.memoizedState),s!==a||d!==c||fo.current||Do?("function"===typeof u&&(la(t,u,a),c=t.memoizedState),(s=Do||ca(t,s,a,d,c,i))?(l||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||("function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount()),"function"===typeof r.componentDidMount&&(t.effectTag|=4)):("function"===typeof r.componentDidMount&&(t.effectTag|=4),t.memoizedProps=a,t.memoizedState=c),r.props=a,r.state=c,r.context=i,r=s):("function"===typeof r.componentDidMount&&(t.effectTag|=4),r=!1)}else l=t.type,r=t.stateNode,a=t.memoizedProps,s=t.pendingProps,r.props=a,c=r.context,i=mo(t,i=ho(t)),(l="function"===typeof(u=l.getDerivedStateFromProps)||"function"===typeof r.getSnapshotBeforeUpdate)||"function"!==typeof r.UNSAFE_componentWillReceiveProps&&"function"!==typeof r.componentWillReceiveProps||(a!==s||c!==i)&&ua(t,r,s,i),Do=!1,c=t.memoizedState,d=r.state=c,null!==(h=t.updateQueue)&&(Wo(t,h,s,r,n),d=t.memoizedState),a!==s||c!==d||fo.current||Do?("function"===typeof u&&(la(t,u,s),d=t.memoizedState),(u=Do||ca(t,a,s,c,d,i))?(l||"function"!==typeof r.UNSAFE_componentWillUpdate&&"function"!==typeof r.componentWillUpdate||("function"===typeof r.componentWillUpdate&&r.componentWillUpdate(s,d,i),"function"===typeof r.UNSAFE_componentWillUpdate&&r.UNSAFE_componentWillUpdate(s,d,i)),"function"===typeof r.componentDidUpdate&&(t.effectTag|=4),"function"===typeof r.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!==typeof r.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!==typeof r.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=s,t.memoizedState=d),r.props=s,r.state=d,r.context=i,r=u):("function"!==typeof r.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!==typeof r.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),r=!1);return Sa(e,t,r,o,n);case 3:return Pa(t),null!==(o=t.updateQueue)?(r=null!==(r=t.memoizedState)?r.element:null,Wo(t,o,t.pendingProps,null,n),(o=t.memoizedState.element)===r?(ja(),e=Ra(e,t)):(r=t.stateNode,(r=(null===e||null===e.child)&&r.hydrate)&&(ga=oo(t.stateNode.containerInfo),ya=t,r=Oa=!0),r?(t.effectTag|=2,t.child=va(t,null,o,n)):(ja(),Ta(e,t,o)),e=t.child)):(ja(),e=Ra(e,t)),e;case 5:return ra(na.current),(o=ra(ea.current))!==(r=kr(o,t.type))&&(co(ta,t),co(ea,r)),null===e&&Ca(t),o=t.type,s=t.memoizedProps,r=t.pendingProps,a=null!==e?e.memoizedProps:null,fo.current||s!==r||((s=1&t.mode&&!!r.hidden)&&(t.expirationTime=1073741823),s&&1073741823===n)?(s=r.children,Jr(o,r)?s=null:a&&Jr(o,a)&&(t.effectTag|=16),ka(e,t),1073741823!==n&&1&t.mode&&r.hidden?(t.expirationTime=1073741823,t.memoizedProps=r,e=null):(Ta(e,t,s),t.memoizedProps=r,e=t.child)):e=Ra(e,t),e;case 6:return null===e&&Ca(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return oa(t,t.stateNode.containerInfo),o=t.pendingProps,fo.current||t.memoizedProps!==o?(null===e?t.child=ba(t,null,o,n):Ta(e,t,o),t.memoizedProps=o,e=t.child):e=Ra(e,t),e;case 14:return o=t.type.render,n=t.pendingProps,r=t.ref,fo.current||t.memoizedProps!==n||r!==(null!==e?e.ref:null)?(Ta(e,t,o=o(n,r)),t.memoizedProps=n,e=t.child):e=Ra(e,t),e;case 10:return n=t.pendingProps,fo.current||t.memoizedProps!==n?(Ta(e,t,n),t.memoizedProps=n,e=t.child):e=Ra(e,t),e;case 11:return n=t.pendingProps.children,fo.current||null!==n&&t.memoizedProps!==n?(Ta(e,t,n),t.memoizedProps=n,e=t.child):e=Ra(e,t),e;case 15:return n=t.pendingProps,t.memoizedProps===n?e=Ra(e,t):(Ta(e,t,n.children),t.memoizedProps=n,e=t.child),e;case 13:return function(e,t,n){var r=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=!0;if(fo.current)i=!1;else if(a===o)return t.stateNode=0,Qo(t),Ra(e,t);var l=o.value;if(t.memoizedProps=o,null===a)l=1073741823;else if(a.value===o.value){if(a.children===o.children&&i)return t.stateNode=0,Qo(t),Ra(e,t);l=0}else{var s=a.value;if(s===l&&(0!==s||1/s===1/l)||s!==s&&l!==l){if(a.children===o.children&&i)return t.stateNode=0,Qo(t),Ra(e,t);l=0}else if(l="function"===typeof r._calculateChangedBits?r._calculateChangedBits(s,l):1073741823,0===(l|=0)){if(a.children===o.children&&i)return t.stateNode=0,Qo(t),Ra(e,t)}else Ma(t,r,l,n)}return t.stateNode=l,Qo(t),Ta(e,t,o.children),t.child}(e,t,n);case 12:e:if(r=t.type,a=t.pendingProps,s=t.memoizedProps,o=r._currentValue,i=r._changedBits,fo.current||0!==i||s!==a){if(t.memoizedProps=a,void 0!==(l=a.unstable_observedBits)&&null!==l||(l=1073741823),t.stateNode=l,0!==(i&l))Ma(t,r,i,n);else if(s===a){e=Ra(e,t);break e}n=(n=a.children)(o),t.effectTag|=1,Ta(e,t,n),e=t.child}else e=Ra(e,t);return e;default:p("156")}}function Da(e){e.effectTag|=4}var Aa=void 0,La=void 0,Fa=void 0;function Ua(e,t){var n=t.pendingProps;switch(t.tag){case 1:return null;case 2:return vo(t),null;case 3:aa(),yo();var r=t.stateNode;return r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(_a(t),t.effectTag&=-3),Aa(t),null;case 5:ia(t),r=ra(na.current);var o=t.type;if(null!==e&&null!=t.stateNode){var a=e.memoizedProps,i=t.stateNode,l=ra(ea.current);i=$r(i,o,a,n,r),La(e,t,i,o,a,n,r,l),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!n)return null===t.stateNode&&p("166"),null;if(e=ra(ea.current),_a(t))n=t.stateNode,o=t.type,a=t.memoizedProps,n[H]=t,n[z]=a,r=qr(n,o,a,e,r),t.updateQueue=r,null!==r&&Da(t);else{(e=zr(o,n,r,e))[H]=t,e[z]=n;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)e.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}Wr(e,o,n,r),Zr(o,n)&&Da(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Fa(e,t,e.memoizedProps,n);else{if("string"!==typeof n)return null===t.stateNode&&p("166"),null;r=ra(na.current),ra(ea.current),_a(t)?(r=t.stateNode,n=t.memoizedProps,r[H]=t,Gr(r,n)&&Da(t)):((r=Kr(n,r))[H]=t,t.stateNode=r)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return aa(),Aa(t),null;case 13:return Zo(t),null;case 12:return null;case 0:p("167");default:p("156")}}function Ba(e,t){var n=t.source;null===t.stack&&null!==n&&Ot(n),null!==n&&gt(n),t=t.value,null!==e&&2===e.tag&&gt(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function Ha(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(t){bi(e,t)}else t.current=null}function za(e){switch(Io(e),e.tag){case 2:Ha(e);var t=e.stateNode;if("function"===typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){bi(e,t)}break;case 5:Ha(e);break;case 4:$a(e)}}function Ka(e){return 5===e.tag||3===e.tag||4===e.tag}function Wa(e){e:{for(var t=e.return;null!==t;){if(Ka(t)){var n=t;break e}t=t.return}p("160"),n=void 0}var r=t=void 0;switch(n.tag){case 5:t=n.stateNode,r=!1;break;case 3:case 4:t=n.stateNode.containerInfo,r=!0;break;default:p("161")}16&n.effectTag&&(Rr(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Ka(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)if(n)if(r){var a=t,i=o.stateNode,l=n;8===a.nodeType?a.parentNode.insertBefore(i,l):a.insertBefore(i,l)}else t.insertBefore(o.stateNode,n);else r?(a=t,i=o.stateNode,8===a.nodeType?a.parentNode.insertBefore(i,a):a.appendChild(i)):t.appendChild(o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}}function $a(e){for(var t=e,n=!1,r=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&p("160"),n.tag){case 5:r=n.stateNode,o=!1;break e;case 3:case 4:r=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var a=t,i=a;;)if(za(i),null!==i.child&&4!==i.tag)i.child.return=i,i=i.child;else{if(i===a)break;for(;null===i.sibling;){if(null===i.return||i.return===a)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}o?(a=r,i=t.stateNode,8===a.nodeType?a.parentNode.removeChild(i):a.removeChild(i)):r.removeChild(t.stateNode)}else if(4===t.tag?r=t.stateNode.containerInfo:za(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function Va(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&(n[z]=r,Vr(n,a,o,e,r))}break;case 6:null===t.stateNode&&p("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:p("163")}}function qa(e,t,n){(n=Fo(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ji(r),Ba(e,t)},n}function Ga(e,t,n){(n=Fo(n)).tag=3;var r=e.stateNode;return null!==r&&"function"===typeof r.componentDidCatch&&(n.callback=function(){null===fi?fi=new Set([this]):fi.add(this);var n=t.value,r=t.stack;Ba(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function Ya(e,t,n,r,o,a){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=qo(r,n),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,void Ho(e,r=qa(e,r,a),a);case 2:if(t=r,n=e.stateNode,0===(64&e.effectTag)&&null!==n&&"function"===typeof n.componentDidCatch&&(null===fi||!fi.has(n)))return e.effectTag|=1024,void Ho(e,r=Ga(e,t,a),a)}e=e.return}while(null!==e)}function Xa(e){switch(e.tag){case 2:vo(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return aa(),yo(),1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 5:return ia(e),null;case 16:return 1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 4:return aa(),null;case 13:return Zo(e),null;default:return null}}Aa=function(){},La=function(e,t,n){(t.updateQueue=n)&&Da(t)},Fa=function(e,t,n,r){n!==r&&Da(t)};var Qa=eo(),Za=2,Ja=Qa,ei=0,ti=0,ni=!1,ri=null,oi=null,ai=0,ii=-1,li=!1,si=null,ci=!1,ui=!1,fi=null;function pi(){if(null!==ri)for(var e=ri.return;null!==e;){var t=e;switch(t.tag){case 2:vo(t);break;case 3:aa(),yo();break;case 5:ia(t);break;case 4:aa();break;case 13:Zo(t)}e=e.return}oi=null,ai=0,ii=-1,li=!1,ri=null,ui=!1}function di(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0===(512&e.effectTag)){t=Ua(t,e);var o=e;if(1073741823===ai||1073741823!==o.expirationTime){var a=0;switch(o.tag){case 3:case 2:var i=o.updateQueue;null!==i&&(a=i.expirationTime)}for(i=o.child;null!==i;)0!==i.expirationTime&&(0===a||a>i.expirationTime)&&(a=i.expirationTime),i=i.sibling;o.expirationTime=a}if(null!==t)return t;if(null!==n&&0===(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e)),null!==r)return r;if(null===n){ui=!0;break}e=n}else{if(null!==(e=Xa(e)))return e.effectTag&=511,e;if(null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=512),null!==r)return r;if(null===n)break;e=n}}return null}function hi(e){var t=Ia(e.alternate,e,ai);return null===t&&(t=di(e)),at.current=null,t}function mi(e,t,n){ni&&p("243"),ni=!0,t===ai&&e===oi&&null!==ri||(pi(),ai=t,ii=-1,ri=wo((oi=e).current,null,ai),e.pendingCommitExpirationTime=0);var r=!1;for(li=!n||ai<=Za;;){try{if(n)for(;null!==ri&&!Zi();)ri=hi(ri);else for(;null!==ri;)ri=hi(ri)}catch(t){if(null===ri)r=!0,Ji(t);else{null===ri&&p("271");var o=(n=ri).return;if(null===o){r=!0,Ji(t);break}Ya(e,o,n,t,0,ai),ri=di(n)}}break}if(ni=!1,r)return null;if(null===ri){if(ui)return e.pendingCommitExpirationTime=t,e.current.alternate;li&&p("262"),0<=ii&&setTimeout(function(){var t=e.current.expirationTime;0!==t&&(0===e.remainingExpirationTime||e.remainingExpirationTime<t)&&Ki(e,t)},ii),function(e){null===Ni&&p("246"),Ni.remainingExpirationTime=e}(e.current.expirationTime)}return null}function bi(e,t){var n;e:{for(ni&&!ci&&p("263"),n=e.return;null!==n;){switch(n.tag){case 2:var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromCatch||"function"===typeof r.componentDidCatch&&(null===fi||!fi.has(r))){Bo(n,e=Ga(n,e=qo(t,e),1),1),gi(n,1),n=void 0;break e}break;case 3:Bo(n,e=qa(n,e=qo(t,e),1),1),gi(n,1),n=void 0;break e}n=n.return}3===e.tag&&(Bo(e,n=qa(e,n=qo(t,e),1),1),gi(e,1)),n=void 0}return n}function vi(){var e=2+25*(1+((Oi()-2+500)/25|0));return e<=ei&&(e=ei+1),ei=e}function yi(e,t){return e=0!==ti?ti:ni?ci?1:ai:1&t.mode?Li?2+10*(1+((e-2+15)/10|0)):2+25*(1+((e-2+500)/25|0)):1,Li&&(0===Si||e>Si)&&(Si=e),e}function gi(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!ni&&0!==ai&&t<ai&&pi();var r=n.current.expirationTime;ni&&!ci&&oi===n||Ki(n,r),Bi>Ui&&p("185")}e=e.return}}function Oi(){return Ja=eo()-Qa,Za=2+(Ja/10|0)}function Ei(e){var t=ti;ti=2+25*(1+((Oi()-2+500)/25|0));try{return e()}finally{ti=t}}function xi(e,t,n,r,o){var a=ti;ti=1;try{return e(t,n,r,o)}finally{ti=a}}var Ci=null,wi=null,_i=0,ji=void 0,Ti=!1,Ni=null,ki=0,Si=0,Pi=!1,Mi=!1,Ri=null,Ii=null,Di=!1,Ai=!1,Li=!1,Fi=null,Ui=1e3,Bi=0,Hi=1;function zi(e){if(0!==_i){if(e>_i)return;null!==ji&&no(ji)}var t=eo()-Qa;_i=e,ji=to($i,{timeout:10*(e-2)-t})}function Ki(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===wi?(Ci=wi=e,e.nextScheduledRoot=e):(wi=wi.nextScheduledRoot=e).nextScheduledRoot=Ci;else{var n=e.remainingExpirationTime;(0===n||t<n)&&(e.remainingExpirationTime=t)}Ti||(Di?Ai&&(Ni=e,ki=1,Xi(e,1,!1)):1===t?Vi():zi(t))}function Wi(){var e=0,t=null;if(null!==wi)for(var n=wi,r=Ci;null!==r;){var o=r.remainingExpirationTime;if(0===o){if((null===n||null===wi)&&p("244"),r===r.nextScheduledRoot){Ci=wi=r.nextScheduledRoot=null;break}if(r===Ci)Ci=o=r.nextScheduledRoot,wi.nextScheduledRoot=o,r.nextScheduledRoot=null;else{if(r===wi){(wi=n).nextScheduledRoot=Ci,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if((0===e||o<e)&&(e=o,t=r),r===wi)break;n=r,r=r.nextScheduledRoot}}null!==(n=Ni)&&n===t&&1===e?Bi++:Bi=0,Ni=t,ki=e}function $i(e){qi(0,!0,e)}function Vi(){qi(1,!1,null)}function qi(e,t,n){if(Ii=n,Wi(),t)for(;null!==Ni&&0!==ki&&(0===e||e>=ki)&&(!Pi||Oi()>=ki);)Oi(),Xi(Ni,ki,!Pi),Wi();else for(;null!==Ni&&0!==ki&&(0===e||e>=ki);)Xi(Ni,ki,!1),Wi();null!==Ii&&(_i=0,ji=null),0!==ki&&zi(ki),Ii=null,Pi=!1,Yi()}function Gi(e,t){Ti&&p("253"),Ni=e,ki=t,Xi(e,t,!1),Vi(),Yi()}function Yi(){if(Bi=0,null!==Fi){var e=Fi;Fi=null;for(var t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(e){Mi||(Mi=!0,Ri=e)}}}if(Mi)throw e=Ri,Ri=null,Mi=!1,e}function Xi(e,t,n){Ti&&p("245"),Ti=!0,n?null!==(n=e.finishedWork)?Qi(e,n,t):null!==(n=mi(e,t,!0))&&(Zi()?e.finishedWork=n:Qi(e,n,t)):null!==(n=e.finishedWork)?Qi(e,n,t):null!==(n=mi(e,t,!1))&&Qi(e,n,t),Ti=!1}function Qi(e,t,n){var r=e.firstBatch;if(null!==r&&r._expirationTime<=n&&(null===Fi?Fi=[r]:Fi.push(r),r._defer))return e.finishedWork=t,void(e.remainingExpirationTime=0);if(e.finishedWork=null,ci=ni=!0,(n=t.stateNode).current===t&&p("177"),0===(r=n.pendingCommitExpirationTime)&&p("261"),n.pendingCommitExpirationTime=0,Oi(),at.current=null,1<t.effectTag)if(null!==t.lastEffect){t.lastEffect.nextEffect=t;var o=t.firstEffect}else o=t;else o=t.firstEffect;Xr=Sn;var a=s();if(Kn(a)){if("selectionStart"in a)var i={start:a.selectionStart,end:a.selectionEnd};else e:{var l=window.getSelection&&window.getSelection();if(l&&0!==l.rangeCount){i=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{i.nodeType,f.nodeType}catch(e){i=null;break e}var d=0,h=-1,m=-1,b=0,v=0,y=a,g=null;t:for(;;){for(var O;y!==i||0!==c&&3!==y.nodeType||(h=d+c),y!==f||0!==l&&3!==y.nodeType||(m=d+l),3===y.nodeType&&(d+=y.nodeValue.length),null!==(O=y.firstChild);)g=y,y=O;for(;;){if(y===a)break t;if(g===i&&++b===c&&(h=d),g===f&&++v===l&&(m=d),null!==(O=y.nextSibling))break;g=(y=g).parentNode}y=O}i=-1===h||-1===m?null:{start:h,end:m}}else i=null}i=i||{start:0,end:0}}else i=null;for(Qr={focusedElem:a,selectionRange:i},Pn(!1),si=o;null!==si;){a=!1,i=void 0;try{for(;null!==si;){if(256&si.effectTag){var E=si.alternate;switch((c=si).tag){case 2:if(256&c.effectTag&&null!==E){var x=E.memoizedProps,C=E.memoizedState,w=c.stateNode;w.props=c.memoizedProps,w.state=c.memoizedState;var _=w.getSnapshotBeforeUpdate(x,C);w.__reactInternalSnapshotBeforeUpdate=_}break;case 3:case 5:case 6:case 4:break;default:p("163")}}si=si.nextEffect}}catch(e){a=!0,i=e}a&&(null===si&&p("178"),bi(si,i),null!==si&&(si=si.nextEffect))}for(si=o;null!==si;){E=!1,x=void 0;try{for(;null!==si;){var j=si.effectTag;if(16&j&&Rr(si.stateNode,""),128&j){var T=si.alternate;if(null!==T){var N=T.ref;null!==N&&("function"===typeof N?N(null):N.current=null)}}switch(14&j){case 2:Wa(si),si.effectTag&=-3;break;case 6:Wa(si),si.effectTag&=-3,Va(si.alternate,si);break;case 4:Va(si.alternate,si);break;case 8:$a(C=si),C.return=null,C.child=null,C.alternate&&(C.alternate.child=null,C.alternate.return=null)}si=si.nextEffect}}catch(e){E=!0,x=e}E&&(null===si&&p("178"),bi(si,x),null!==si&&(si=si.nextEffect))}if(N=Qr,T=s(),j=N.focusedElem,E=N.selectionRange,T!==j&&u(document.documentElement,j)){null!==E&&Kn(j)&&(T=E.start,void 0===(N=E.end)&&(N=T),"selectionStart"in j?(j.selectionStart=T,j.selectionEnd=Math.min(N,j.value.length)):window.getSelection&&(T=window.getSelection(),x=j[he()].length,N=Math.min(E.start,x),E=void 0===E.end?N:Math.min(E.end,x),!T.extend&&N>E&&(x=E,E=N,N=x),x=zn(j,N),C=zn(j,E),x&&C&&(1!==T.rangeCount||T.anchorNode!==x.node||T.anchorOffset!==x.offset||T.focusNode!==C.node||T.focusOffset!==C.offset)&&((w=document.createRange()).setStart(x.node,x.offset),T.removeAllRanges(),N>E?(T.addRange(w),T.extend(C.node,C.offset)):(w.setEnd(C.node,C.offset),T.addRange(w))))),T=[];for(N=j;N=N.parentNode;)1===N.nodeType&&T.push({element:N,left:N.scrollLeft,top:N.scrollTop});for("function"===typeof j.focus&&j.focus(),j=0;j<T.length;j++)(N=T[j]).element.scrollLeft=N.left,N.element.scrollTop=N.top}for(Qr=null,Pn(Xr),Xr=null,n.current=t,si=o;null!==si;){o=!1,j=void 0;try{for(T=r;null!==si;){var k=si.effectTag;if(36&k){var S=si.alternate;switch(E=T,(N=si).tag){case 2:var P=N.stateNode;if(4&N.effectTag)if(null===S)P.props=N.memoizedProps,P.state=N.memoizedState,P.componentDidMount();else{var M=S.memoizedProps,R=S.memoizedState;P.props=N.memoizedProps,P.state=N.memoizedState,P.componentDidUpdate(M,R,P.__reactInternalSnapshotBeforeUpdate)}var I=N.updateQueue;null!==I&&(P.props=N.memoizedProps,P.state=N.memoizedState,Vo(N,I,P));break;case 3:var D=N.updateQueue;if(null!==D){if(x=null,null!==N.child)switch(N.child.tag){case 5:x=N.child.stateNode;break;case 2:x=N.child.stateNode}Vo(N,D,x)}break;case 5:var A=N.stateNode;null===S&&4&N.effectTag&&Zr(N.type,N.memoizedProps)&&A.focus();break;case 6:case 4:case 15:case 16:break;default:p("163")}}if(128&k){N=void 0;var L=si.ref;if(null!==L){var F=si.stateNode;switch(si.tag){case 5:N=F;break;default:N=F}"function"===typeof L?L(N):L.current=N}}var U=si.nextEffect;si.nextEffect=null,si=U}}catch(e){o=!0,j=e}o&&(null===si&&p("178"),bi(si,j),null!==si&&(si=si.nextEffect))}ni=ci=!1,Ro(t.stateNode),0===(t=n.current.expirationTime)&&(fi=null),e.remainingExpirationTime=t}function Zi(){return!(null===Ii||Ii.timeRemaining()>Hi)&&(Pi=!0)}function Ji(e){null===Ni&&p("246"),Ni.remainingExpirationTime=0,Mi||(Mi=!0,Ri=e)}function el(e,t){var n=Di;Di=!0;try{return e(t)}finally{(Di=n)||Ti||Vi()}}function tl(e,t){if(Di&&!Ai){Ai=!0;try{return e(t)}finally{Ai=!1}}return e(t)}function nl(e,t){Ti&&p("187");var n=Di;Di=!0;try{return xi(e,t)}finally{Di=n,Vi()}}function rl(e,t,n){if(Li)return e(t,n);Di||Ti||0===Si||(qi(Si,!1,null),Si=0);var r=Li,o=Di;Di=Li=!0;try{return e(t,n)}finally{Li=r,(Di=o)||Ti||Vi()}}function ol(e){var t=Di;Di=!0;try{xi(e)}finally{(Di=t)||Ti||qi(1,!1,null)}}function al(e,t,n,r,o){var a=t.current;if(n){var i;n=n._reactInternalFiber;e:{for(2===ln(n)&&2===n.tag||p("170"),i=n;3!==i.tag;){if(bo(i)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}(i=i.return)||p("171")}i=i.stateNode.context}n=bo(n)?Oo(n,i):i}else n=f;return null===t.context?t.context=n:t.pendingContext=n,t=o,(o=Fo(r)).payload={element:e},null!==(t=void 0===t?null:t)&&(o.callback=t),Bo(a,o,r),gi(a,r),r}function il(e){var t=e._reactInternalFiber;return void 0===t&&("function"===typeof e.render?p("188"):p("268",Object.keys(e))),null===(e=un(t))?null:e.stateNode}function ll(e,t,n,r){var o=t.current;return al(e,t,n,o=yi(Oi(),o),r)}function sl(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function cl(e){var t=e.findFiberByHostInstance;return function(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);So=Mo(function(e){return t.onCommitFiberRoot(n,e)}),Po=Mo(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}(i({},e,{findHostInstanceByFiber:function(e){return null===(e=un(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}var ul=el,fl=rl,pl=function(){Ti||0===Si||(qi(Si,!1,null),Si=0)};function dl(e){this._expirationTime=vi(),this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function hl(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function ml(e,t,n){this._internalRoot=ko(e,t,n)}function bl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function vl(e,t,n,r,o){bl(n)||p("200");var a=n._reactRootContainer;if(a){if("function"===typeof o){var i=o;o=function(){var e=sl(a._internalRoot);i.call(e)}}null!=e?a.legacy_renderSubtreeIntoContainer(e,t,o):a.render(t,o)}else{if(a=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new ml(e,!1,t)}(n,r),"function"===typeof o){var l=o;o=function(){var e=sl(a._internalRoot);l.call(e)}}tl(function(){null!=e?a.legacy_renderSubtreeIntoContainer(e,t,o):a.render(t,o)})}return sl(a._internalRoot)}function yl(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return bl(t)||p("200"),function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:st,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}Ue.injectFiberControlledHostComponent(Yr),dl.prototype.render=function(e){this._defer||p("250"),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,r=new hl;return al(e,t,null,n,r._onCommit),r},dl.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},dl.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||p("251"),this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var r=null,o=t;o!==this;)r=o,o=o._next;null===r&&p("251"),r._next=o._next,this._next=t,e.firstBatch=this}this._defer=!1,Gi(e,n),t=this._next,this._next=null,null!==(t=e.firstBatch=t)&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},dl.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},hl.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},hl.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];"function"!==typeof n&&p("191",n),n()}}},ml.prototype.render=function(e,t){var n=this._internalRoot,r=new hl;return null!==(t=void 0===t?null:t)&&r.then(t),ll(e,n,null,r._onCommit),r},ml.prototype.unmount=function(e){var t=this._internalRoot,n=new hl;return null!==(e=void 0===e?null:e)&&n.then(e),ll(null,t,null,n._onCommit),n},ml.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,o=new hl;return null!==(n=void 0===n?null:n)&&o.then(n),ll(t,r,e,o._onCommit),o},ml.prototype.createBatch=function(){var e=new dl(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(n=null;null!==r&&r._expirationTime<=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e},qe=ul,Ge=fl,Ye=pl;var gl={createPortal:yl,findDOMNode:function(e){return null==e?null:1===e.nodeType?e:il(e)},hydrate:function(e,t,n){return vl(null,e,t,!0,n)},render:function(e,t,n){return vl(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){return(null==e||void 0===e._reactInternalFiber)&&p("38"),vl(e,t,n,!1,r)},unmountComponentAtNode:function(e){return bl(e)||p("40"),!!e._reactRootContainer&&(tl(function(){vl(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return yl.apply(void 0,arguments)},unstable_batchedUpdates:el,unstable_deferredUpdates:Ei,unstable_interactiveUpdates:rl,flushSync:nl,unstable_flushControlled:ol,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:U,EventPluginRegistry:w,EventPropagators:ne,ReactControlledComponent:Ve,ReactDOMComponentTree:V,ReactDOMEventListener:An},unstable_createRoot:function(e,t){return new ml(e,!0,null!=t&&!0===t.hydrate)}};cl({findFiberByHostInstance:K,bundleType:0,version:"16.4.2",rendererPackageName:"react-dom"});var Ol={default:gl},El=Ol&&gl||Ol;e.exports=El.default?El.default:El},function(e,t,n){"use strict";var r=!("undefined"===typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t,n){"use strict";e.exports=function(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}e.exports=function(e,t){if(o(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var i=0;i<n.length;i++)if(!r.call(t,n[i])||!o(e[n[i]],t[n[i]]))return!1;return!0}},function(e,t,n){"use strict";var r=n(138);e.exports=function e(t,n){return!(!t||!n)&&(t===n||!r(t)&&(r(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}},function(e,t,n){"use strict";var r=n(139);e.exports=function(e){return r(e)&&3==e.nodeType}},function(e,t,n){"use strict";e.exports=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"===typeof t.Node?e instanceof t.Node:"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName))}},function(e,t,n){"use strict";var r,o=n(0),a=(n.n(o),n(141)),i=(n.n(a),n(142)),l=n(143),s=n(144),c=n(145),u=n(146),f=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=this&&this.__assign||function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},d=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function l(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,l)}s((r=r.apply(e,t||[])).next())})},h=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}},m=function(e){function t(t){var n=e.call(this,t)||this;return n.url="http://220.120.190.175:13000",n.miners=[],n.blocks=[],n.info={},n.lastBlock={},n.workers=[],n.totalWorkers=[],n.disconnections=[],n.totalDisconnections=[],n.blockStat={},n.handleShow=n.handleShow.bind(n),n.handleClose=n.handleClose.bind(n),n.handleShowDisconnected=n.handleShowDisconnected.bind(n),n.handleCloseDisconnected=n.handleCloseDisconnected.bind(n),n.state={show:!1,showDisconnected:!1},n.state={blocks:[],info:{},miners:[],workers:[],disconnections:[],seconds:0,test:"apple"},n}return f(t,e),t.prototype.tick=function(){this.setState(function(e){return{seconds:e.seconds+1}})},t.prototype.initialize=function(){return d(this,void 0,void 0,function(){var e,t,n,r,o,a,i,l,s,c,u,f;return h(this,function(p){switch(p.label){case 0:return[4,fetch(this.url+"/api/v1/hycon")];case 1:return[4,p.sent().json()];case 2:for(e=p.sent(),this.miners=e.miners,this.blocks=e.blocks,this.info=e.info,this.lastBlock=e.lastBlock,this.totalWorkers=e.workers,this.totalDisconnections=e.disconnections,this.workers=[],this.blockStat={_01h:0,_06h:0,_12h:0,_24h:0,_01x:0,_06x:0,_12x:0,_24x:0},t=Date.now(),n=0,r=this.blocks;n<r.length;n++)i=r[n],t-i.timestamp<=36e5?(this.blockStat._01h++,this.blockStat._06h++,this.blockStat._12h++,this.blockStat._24h++):t-i.timestamp<=216e5?(this.blockStat._06h++,this.blockStat._12h++,this.blockStat._24h++):t-i.timestamp<=432e5?(this.blockStat._12h++,this.blockStat._24h++):t-i.timestamp<=864e5&&this.blockStat._24h++;for(o=0,a=this.blocks;o<a.length;o++)(i=a[o]).timestamp=new Date(i.timestamp).toUTCString(),i.localTimestamp=new Date(i.timestamp).toString();for(this.miners.sort(function(e,t){return t.hashshare-e.hashshare}),this.setState({miners:[]}),this.setState({miners:this.miners}),this.setState({blocks:[]}),this.setState({blocks:this.blocks}),this.setState({info:{}}),this.setState({info:this.info}),this.workers=[],l=0,s=this.totalWorkers;l<s.length;l++)(f=s[l]).address===this.showWallet&&this.workers.push(f);for(this.workers.sort(function(e,t){return e.workerId>t.workerId?1:e.workerId===t.workerId?0:-1}),this.setState({workers:[]}),this.setState({workers:this.workers}),this.disconnections=[],c=0,u=this.totalDisconnections;c<u.length;c++)(f=u[c]).address===this.showWallet&&(f.timeStamp=new Date(f.timeStamp).toLocaleString(),this.disconnections.push(f));return this.setState({disconnections:[]}),this.setState({disconnections:this.disconnections}),console.log(e),[2]}})})},t.prototype.componentDidMount=function(){return d(this,void 0,void 0,function(){var e=this;return h(this,function(t){return setInterval(function(){e.initialize()},2e3),[2]})})},t.prototype.handleClose=function(){this.setState({show:!1})},t.prototype.handleShow=function(){this.setState({show:!0})},t.prototype.clickMiner=function(e){this.showWallet=e,this.initialize(),this.setState({show:!0})},t.prototype.handleCloseDisconnected=function(){this.setState({showDisconnected:!1})},t.prototype.handleShowDisconnected=function(){this.setState({showDisconnected:!0})},t.prototype.clickMinerDisconnected=function(e){this.showWallet=e,this.initialize(),this.setState({showDisconnected:!0})},t.prototype.render=function(){var e=this,t={fontSize:"30px",fontFamily:"Alegreya SC",fontWeight:700},n={fontSize:"30px",fontFamily:"Gentium Basic",fontWeight:700},r={fontSize:"18px",fontFamily:"Gentium Basic"},a={fontSize:"18px",fontFamily:"Alegreya SC"};return o.createElement("div",null,o.createElement(u.b,p({},this.props,{show:this.state.show,onHide:this.handleClose,bsSize:"lg",dialogClassName:"worker-modal"}),o.createElement(u.b.Header,{closeButton:!0},o.createElement(u.b.Title,null,"Workers")),o.createElement(u.b.Body,null,o.createElement("span",{style:n}," ",this.showWallet," "),o.createElement("table",{className:"table table-hover",style:r},o.createElement("thead",{style:a},o.createElement("tr",null,o.createElement("th",{className:"text-center"},"On"),o.createElement("th",{className:"text-center"},"Worker"),o.createElement("th",{className:"text-center"},"Hash Rate"),o.createElement("th",{className:"text-center"},"Hash Share"),o.createElement("th",{className:"text-center"},"Expected Return"),o.createElement("th",{className:"text-center"},"Expected Fee"),o.createElement("th",{className:"text-center"},"Elapsed"))),o.createElement("tbody",null,this.state.workers.map(function(t){return o.createElement(s.a,{key:t.address+t.workerId,worker:t,info:e.info,app:e})})))),o.createElement(u.b.Footer,null,o.createElement(u.a,{onClick:this.handleClose},"Close"))),o.createElement(u.b,p({},this.props,{show:this.state.showDisconnected,onHide:this.handleCloseDisconnected,bsSize:"lg",dialogClassName:"worker-modal"}),o.createElement(u.b.Header,{closeButton:!0},o.createElement(u.b.Title,null,"Disconnected Workers")),o.createElement(u.b.Body,null,o.createElement("span",{style:n}," ",this.showWallet," "),o.createElement("table",{className:"table table-hover",style:r},o.createElement("thead",{style:a},o.createElement("tr",null,o.createElement("th",{className:"text-center"},"DateTime"),o.createElement("th",{className:"text-center"},"Disconnected Worker"))),o.createElement("tbody",null,this.state.disconnections.map(function(t){return o.createElement(c.a,{key:t.address+t.workerId,worker:t,info:e.info,app:e})})))),o.createElement(u.b.Footer,null,o.createElement(u.a,{onClick:this.handleCloseDisconnected},"Close"))),o.createElement("section",{id:"pool_data"},o.createElement("div",{className:"container"},o.createElement("div",{className:"table-responsive"},o.createElement("span",{style:t},"Pool Status"),o.createElement("table",{className:"table table-hover",id:"poolBrief",style:r},o.createElement("thead",{style:a},o.createElement("tr",null,o.createElement("th",{className:"text-center"},"Hash Rate"),o.createElement("th",{className:"text-center"},"Workers"),o.createElement("th",{className:"text-center"},"Last 1h"),o.createElement("th",{className:"text-center"},"Last 6h"),o.createElement("th",{className:"text-center"},"Last 12h"),o.createElement("th",{className:"text-center"},"Last 24h"),o.createElement("th",{className:"text-center"},"Pool Address"))),o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{className:"text-center"},(.001*this.info.poolHashrate).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})," kH/s"),o.createElement("td",{className:"text-center"},this.info.workerCount),o.createElement("td",{className:"text-center"},this.blockStat._01h),o.createElement("td",{className:"text-center"},this.blockStat._06h),o.createElement("td",{className:"text-center"},this.blockStat._12h),o.createElement("td",{className:"text-center"},this.blockStat._24h),o.createElement("td",{className:"text-center"},o.createElement("a",{style:{textDecoration:"none",color:"#3152A5",fontFamily:"Gentium Basic",fontWeight:500},href:"http://explorer.hycon.io/address/H2nVWAEBuFRMYBqUN4tLXfoHhc93H7KVP",target:"_blank"},"H2nVWAEBuFRMYBqUN4tLXfoHhc93H7KVP"))))),o.createElement("table",{className:"table table-hover",id:"poolData",style:r},o.createElement("thead",{style:a},o.createElement("tr",null,o.createElement("th",{className:"text-center"},"On"),o.createElement("th",{className:"text-center"},"Wallet Address"),o.createElement("th",{className:"text-center"},"Workers"),o.createElement("th",{className:"text-center"},"Hash Rate"),o.createElement("th",{className:"text-center"},"Hash Share"),o.createElement("th",{className:"text-center"},"Expected Return "),o.createElement("th",{className:"text-center"},"Expected Fee "),o.createElement("th",{className:"text-center"},"Elapsed"))),o.createElement("tbody",null,this.state.miners.map(function(t){return o.createElement(l.a,{key:t._id,miner:t,info:e.info,app:e})})))))),o.createElement("section",{id:"mined_blocks"},o.createElement("div",{className:"container"},o.createElement("div",{className:"table-responsive"},o.createElement("span",{style:t},"Last Block"),o.createElement("table",{className:"table table-hover",id:"minedBlocks",style:r},o.createElement("thead",{style:a},o.createElement("tr",null,o.createElement("th",{"data-field":"height",className:"text-center"},"Height"),o.createElement("th",{"data-field":"timestamp",className:"text-center"},"Block Timestamp"),o.createElement("th",{"data-field":"miner",className:"text-center"},"Miner"),o.createElement("th",{"data-field":"blockhash",className:"text-center"},"Block Hash"))),o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{className:"text-center"},this.lastBlock.height),o.createElement("td",{className:"text-center"},this.lastBlock.ago),o.createElement("td",{className:"text-center"},this.lastBlock.miner),o.createElement("td",{className:"text-center"},this.lastBlock.blockHash)))),o.createElement("span",{style:t},"Mined Blocks"),o.createElement("table",{className:"table table-hover",id:"minedBlocks",style:r},o.createElement("thead",{style:a},o.createElement("tr",null,o.createElement("th",{"data-field":"height",className:"text-center"},"Height"),o.createElement("th",{"data-field":"Mainchain",className:"text-center"},"Mainchain"),o.createElement("th",{"data-field":"datetime",className:"text-center"},"Datetime"),o.createElement("th",{"data-field":"blockhash",className:"text-center"},"Block Hash"))),o.createElement("tbody",null,this.state.blocks.map(function(e){return o.createElement(i.a,{key:e._id,info:e})})))))))},t}(o.Component);t.a=m},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r,o=n(0),a=(n.n(o),this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)})),i=function(e){function t(t){var n=e.call(this,t)||this;return n.state={info:t.info},n}return a(t,e),t.prototype.render=function(){return o.createElement("tr",null,o.createElement("td",{className:"text-center"},this.state.info.height),o.createElement("td",{className:"text-center"},this.state.info.mainchain?o.createElement("i",{className:"fas fa-code-branch",style:{color:"#03EBA6",fontSize:"22px","vertical-align":"middle"}}):o.createElement("i",{className:"fas fa-code-branch",style:{color:"#BFBFBF",fontSize:"22px","vertical-align":"middle"}})),o.createElement("td",{className:"text-center"},this.state.info.timestamp),o.createElement("td",{className:"text-center"},this.state.info._id))},t}(o.Component)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r,o=n(0),a=(n.n(o),this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)})),i=function(e){function t(t){var n=e.call(this,t)||this;return n.state={info:t.info,miner:t.miner,app:t.app},n}return a(t,e),t.prototype.handleClick=function(e){this.state.app.clickMiner(e)},t.prototype.handleClickDiconnected=function(e){console.log("click disconnected "+e+" app="+this.state.app),this.state.app.clickMinerDisconnected(e)},t.prototype.render=function(){var e=this;return o.createElement("tr",null,o.createElement("td",{className:"text-center"},this.state.miner.nodes>0?o.createElement("i",{className:"fa fa-circle",style:{color:"#03EBA6"}}):o.createElement("i",{className:"fa fa-circle",style:{color:"#BFBFBF"}})),o.createElement("td",{onClick:function(){return e.handleClick(e.state.miner._id)},className:"text-center"},this.state.miner._id," "),o.createElement("td",{onClick:function(){return e.handleClickDiconnected(e.state.miner._id)},className:"text-center"},this.state.miner.nodes>0?this.state.miner.nodes:"-"),o.createElement("td",{className:"text-center"},this.state.miner.hashrate>0?(.001*this.state.miner.hashrate).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})+" kH/s":"-"),o.createElement("td",{className:"text-center"},(100*this.state.miner.hashshare).toFixed(2),"%"),o.createElement("td",{className:"text-center"},(240*this.state.miner.reward).toFixed(9)," HYC"),o.createElement("td",{className:"text-center"},(240*this.state.miner.fee).toFixed(9)," HYC"),o.createElement("td",{className:"text-center"},this.state.miner.elapsedStr))},t}(o.Component)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r,o=n(0),a=(n.n(o),this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)})),i=function(e){function t(t){var n=e.call(this,t)||this;return n.state={info:t.info,worker:t.worker,app:t.app},n}return a(t,e),t.prototype.handleClick=function(e){console.log("click2 "+e+" app="+this.state.app)},t.prototype.render=function(){return o.createElement("tr",null,o.createElement("td",{className:"text-center"},Date.now()-this.state.worker.lastUpdate>=3e4?o.createElement("i",{className:"fa fa-circle",style:{color:"#BFBFBF"}}):o.createElement("i",{className:"fa fa-circle",style:{color:"#03EBA6"}})),o.createElement("td",{className:"text-center"},this.state.worker.workerId),o.createElement("td",{className:"text-center"},this.state.worker.hashrate>0?(.001*this.state.worker.hashrate).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})+" kH/s":"-"),o.createElement("td",{className:"text-center"},(this.state.worker.hashshare/this.state.info.poolHashshare*100).toFixed(2),"%"),o.createElement("td",{className:"text-center"},(this.state.worker.reward/this.state.info.poolHashshare*240).toFixed(9)," HYC"),o.createElement("td",{className:"text-center"},(this.state.worker.fee/this.state.info.poolHashshare*240).toFixed(9)," HYC"),o.createElement("td",{className:"text-center"},this.state.worker.elapsedStr))},t}(o.Component)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r,o=n(0),a=(n.n(o),this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)})),i=function(e){function t(t){var n=e.call(this,t)||this;return n.state={info:t.info,worker:t.worker,app:t.app},n}return a(t,e),t.prototype.handleClick=function(e){console.log("click2 "+e+" app="+this.state.app)},t.prototype.render=function(){return o.createElement("tr",null,o.createElement("td",{className:"text-center"},new Date(this.state.worker.timestamp).toLocaleString()),o.createElement("td",{className:"text-center"},this.state.worker.workerId))},t}(o.Component)},function(e,t,n){"use strict";n(147),n(177),n(180),n(181),n(93);var r=n(36);n.d(t,"a",function(){return r.a});n(64),n(184),n(185),n(94),n(195),n(196),n(63),n(197),n(198),n(67),n(44),n(216),n(47),n(217),n(218),n(221),n(66),n(102),n(222),n(223),n(224),n(227),n(228),n(229),n(103),n(48),n(236);var o=n(237);n.d(t,"b",function(){return o.a});n(108),n(109),n(110),n(111),n(112),n(113),n(252),n(114),n(256),n(115),n(116),n(263),n(264),n(265),n(267),n(268),n(270),n(86),n(276),n(277),n(278),n(279),n(280),n(15),n(281),n(283),n(73),n(74),n(284),n(122),n(285),n(286),n(123),n(287),n(288),n(289),n(290)},function(e,t,n){"use strict";var r=n(2),o=n(1),a=n(0),i=n.n(a),l=n(86);i.a.Component},function(e,t,n){n(149),e.exports=n(14).Object.assign},function(e,t,n){var r=n(17);r(r.S+r.F,"Object",{assign:n(151)})},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){"use strict";var r=n(25),o=n(60),a=n(35),i=n(40),l=n(84),s=Object.assign;e.exports=!s||n(24)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=s({},e)[n]||Object.keys(s({},t)).join("")!=r})?function(e,t){for(var n=i(e),s=arguments.length,c=1,u=o.f,f=a.f;s>c;)for(var p,d=l(arguments[c++]),h=u?r(d).concat(u(d)):r(d),m=h.length,b=0;m>b;)f.call(d,p=h[b++])&&(n[p]=d[p]);return n}:s},function(e,t,n){var r=n(26),o=n(85),a=n(153);e.exports=function(e){return function(t,n,i){var l,s=r(t),c=o(s.length),u=a(i,c);if(e&&n!=n){for(;c>u;)if((l=s[u++])!=l)return!0}else for(;c>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var r=n(56),o=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):a(e,t)}},function(e,t,n){e.exports=n(155)},function(e,t,n){n(156);var r=n(14).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(17);r(r.S,"Object",{create:n(61)})},function(e,t,n){var r=n(20),o=n(32),a=n(25);e.exports=n(23)?Object.defineProperties:function(e,t){o(e);for(var n,i=a(t),l=i.length,s=0;l>s;)r.f(e,n=i[s++],t[n]);return e}},function(e,t,n){var r=n(19).document;e.exports=r&&r.documentElement},function(e,t,n){e.exports=n(160)},function(e,t,n){n(161),e.exports=n(14).Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(19),o=n(21),a=n(23),i=n(17),l=n(87),s=n(162).KEY,c=n(24),u=n(58),f=n(62),p=n(39),d=n(16),h=n(88),m=n(163),b=n(164),v=n(165),y=n(32),g=n(33),O=n(26),E=n(53),x=n(34),C=n(61),w=n(166),_=n(167),j=n(20),T=n(25),N=_.f,k=j.f,S=w.f,P=r.Symbol,M=r.JSON,R=M&&M.stringify,I=d("_hidden"),D=d("toPrimitive"),A={}.propertyIsEnumerable,L=u("symbol-registry"),F=u("symbols"),U=u("op-symbols"),B=Object.prototype,H="function"==typeof P,z=r.QObject,K=!z||!z.prototype||!z.prototype.findChild,W=a&&c(function(){return 7!=C(k({},"a",{get:function(){return k(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=N(B,t);r&&delete B[t],k(e,t,n),r&&e!==B&&k(B,t,r)}:k,$=function(e){var t=F[e]=C(P.prototype);return t._k=e,t},V=H&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},q=function(e,t,n){return e===B&&q(U,t,n),y(e),t=E(t,!0),y(n),o(F,t)?(n.enumerable?(o(e,I)&&e[I][t]&&(e[I][t]=!1),n=C(n,{enumerable:x(0,!1)})):(o(e,I)||k(e,I,x(1,{})),e[I][t]=!0),W(e,t,n)):k(e,t,n)},G=function(e,t){y(e);for(var n,r=b(t=O(t)),o=0,a=r.length;a>o;)q(e,n=r[o++],t[n]);return e},Y=function(e){var t=A.call(this,e=E(e,!0));return!(this===B&&o(F,e)&&!o(U,e))&&(!(t||!o(this,e)||!o(F,e)||o(this,I)&&this[I][e])||t)},X=function(e,t){if(e=O(e),t=E(t,!0),e!==B||!o(F,t)||o(U,t)){var n=N(e,t);return!n||!o(F,t)||o(e,I)&&e[I][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=S(O(e)),r=[],a=0;n.length>a;)o(F,t=n[a++])||t==I||t==s||r.push(t);return r},Z=function(e){for(var t,n=e===B,r=S(n?U:O(e)),a=[],i=0;r.length>i;)!o(F,t=r[i++])||n&&!o(B,t)||a.push(F[t]);return a};H||(l((P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(U,n),o(this,I)&&o(this[I],e)&&(this[I][e]=!1),W(this,e,x(1,n))};return a&&K&&W(B,e,{configurable:!0,set:t}),$(e)}).prototype,"toString",function(){return this._k}),_.f=X,j.f=q,n(89).f=w.f=Q,n(35).f=Y,n(60).f=Z,a&&!n(38)&&l(B,"propertyIsEnumerable",Y,!0),h.f=function(e){return $(d(e))}),i(i.G+i.W+i.F*!H,{Symbol:P});for(var J="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;J.length>ee;)d(J[ee++]);for(var te=T(d.store),ne=0;te.length>ne;)m(te[ne++]);i(i.S+i.F*!H,"Symbol",{for:function(e){return o(L,e+="")?L[e]:L[e]=P(e)},keyFor:function(e){if(!V(e))throw TypeError(e+" is not a symbol!");for(var t in L)if(L[t]===e)return t},useSetter:function(){K=!0},useSimple:function(){K=!1}}),i(i.S+i.F*!H,"Object",{create:function(e,t){return void 0===t?C(e):G(C(e),t)},defineProperty:q,defineProperties:G,getOwnPropertyDescriptor:X,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),M&&i(i.S+i.F*(!H||c(function(){var e=P();return"[null]"!=R([e])||"{}"!=R({a:e})||"{}"!=R(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(g(t)||void 0!==e)&&!V(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!V(t))return t}),r[1]=t,R.apply(M,r)}}),P.prototype[D]||n(31)(P.prototype,D,P.prototype.valueOf),f(P,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,n){var r=n(39)("meta"),o=n(33),a=n(21),i=n(20).f,l=0,s=Object.isExtensible||function(){return!0},c=!n(24)(function(){return s(Object.preventExtensions({}))}),u=function(e){i(e,r,{value:{i:"O"+ ++l,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!s(e))return"F";if(!t)return"E";u(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!s(e))return!0;if(!t)return!1;u(e)}return e[r].w},onFreeze:function(e){return c&&f.NEED&&s(e)&&!a(e,r)&&u(e),e}}},function(e,t,n){var r=n(19),o=n(14),a=n(38),i=n(88),l=n(20).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=a?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||l(t,e,{value:i.f(e)})}},function(e,t,n){var r=n(25),o=n(60),a=n(35);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var i,l=n(e),s=a.f,c=0;l.length>c;)s.call(e,i=l[c++])&&t.push(i);return t}},function(e,t,n){var r=n(54);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(26),o=n(89).f,a={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return i&&"[object Window]"==a.call(e)?function(e){try{return o(e)}catch(e){return i.slice()}}(e):o(r(e))}},function(e,t,n){var r=n(35),o=n(34),a=n(26),i=n(53),l=n(21),s=n(81),c=Object.getOwnPropertyDescriptor;t.f=n(23)?c:function(e,t){if(e=a(e),t=i(t,!0),s)try{return c(e,t)}catch(e){}if(l(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){e.exports=n(169)},function(e,t,n){n(170),e.exports=n(14).Object.keys},function(e,t,n){var r=n(40),o=n(25);n(171)("keys",function(){return function(e){return o(r(e))}})},function(e,t,n){var r=n(17),o=n(14),a=n(24);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],i={};i[e]=t(n),r(r.S+r.F*a(function(){n(1)}),"Object",i)}},function(e,t,n){"use strict";var r=n(173);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";t.__esModule=!0,t.uncontrolledPropTypes=function(e,t){var n={};return Object.keys(e).forEach(function(e){n[a(e)]=o}),n},t.isProp=function(e,t){return void 0!==e[t]},t.defaultKey=a,t.isReactComponent=function(e){return!!(e&&e.prototype&&e.prototype.isReactComponent)};var r;(r=n(41))&&r.__esModule;var o=function(){};function a(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}},function(e,t,n){n(176),e.exports=n(14).Object.entries},function(e,t,n){var r=n(17),o=n(91)(!0);r(r.S,"Object",{entries:function(e){return o(e)}})},function(e,t,n){"use strict";var r=n(27),o=n.n(r),a=n(2),i=n(3),l=n(1),s=n(4),c=n.n(s),u=n(0),f=n.n(u),p=n(5),d=n.n(p),h=n(6),m=n(10),b=n(63),v={onDismiss:d.a.func,closeLabel:d.a.string},y=function(e){function t(){return e.apply(this,arguments)||this}return Object(l.a)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.onDismiss,r=t.closeLabel,o=t.className,l=t.children,s=Object(i.a)(t,["onDismiss","closeLabel","className","children"]),u=Object(h.f)(s),p=u[0],d=u[1],m=!!n,v=Object(a.a)({},Object(h.d)(p),((e={})[Object(h.e)(p,"dismissable")]=m,e));return f.a.createElement("div",Object(a.a)({},d,{role:"alert",className:c()(o,v)}),m&&f.a.createElement(b.a,{onClick:n,label:r}),l)},t}(f.a.Component);y.propTypes=v,y.defaultProps={closeLabel:"Close alert"};Object(h.c)(o()(m.d),m.d.INFO,Object(h.a)("alert",y))},function(e,t,n){n(179),e.exports=n(14).Object.values},function(e,t,n){var r=n(17),o=n(91)(!1);r(r.S,"Object",{values:function(e){return o(e)}})},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(6),d={pullRight:f.a.bool},h=function(e){function t(){return e.apply(this,arguments)||this}Object(a.a)(t,e);var n=t.prototype;return n.hasContent=function(e){var t=!1;return c.a.Children.forEach(e,function(e){t||(e||0===e)&&(t=!0)}),t},n.render=function(){var e=this.props,t=e.pullRight,n=e.className,a=e.children,i=Object(o.a)(e,["pullRight","className","children"]),s=Object(p.f)(i),u=s[0],f=s[1],d=Object(r.a)({},Object(p.d)(u),{"pull-right":t,hidden:!this.hasContent(a)});return c.a.createElement("span",Object(r.a)({},f,{className:l()(n,d)}),a)},t}(c.a.Component);h.propTypes=d,h.defaultProps={pullRight:!1};Object(p.a)("badge",h)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(93),f=n(6),p=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=Object(o.a)(e,["className"]),a=Object(f.f)(n),i=a[0],s=a[1],u=Object(f.d)(i);return c.a.createElement("ol",Object(r.a)({},s,{role:"navigation","aria-label":"breadcrumbs",className:l()(t,u)}))},t}(c.a.Component);p.Item=u.a;Object(f.a)("breadcrumb",p)},function(e,t,n){"use strict";e.exports=n(183)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.timeout"):60113;function h(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case i:case s:case l:return e;default:switch(e=e&&e.$$typeof){case u:case p:case c:return e;default:return t}}case a:return t}}}t.typeOf=h,t.AsyncMode=f,t.ContextConsumer=u,t.ContextProvider=c,t.Element=o,t.ForwardRef=p,t.Fragment=i,t.Profiler=s,t.Portal=a,t.StrictMode=l,t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===f||e===s||e===l||e===d||"object"===typeof e&&null!==e&&(e.$$typeof===c||e.$$typeof===u||e.$$typeof===p)},t.isAsyncMode=function(e){return h(e)===f},t.isContextConsumer=function(e){return h(e)===u},t.isContextProvider=function(e){return h(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return h(e)===p},t.isFragment=function(e){return h(e)===i},t.isProfiler=function(e){return h(e)===s},t.isPortal=function(e){return h(e)===a},t.isStrictMode=function(e){return h(e)===l}},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(6),f=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=Object(o.a)(e,["className"]),a=Object(u.f)(n),i=a[0],s=a[1],f=Object(u.d)(i);return c.a.createElement("div",Object(r.a)({},s,{role:"toolbar",className:l()(t,f)}))},t}(c.a.Component);Object(u.a)("btn-toolbar",f)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(9),l=n(4),s=n.n(l),c=n(0),u=n.n(c),f=n(5),p=n.n(f),d=n(186),h=n(94),m=n(66),b=n(15),v=n(6),y=n(12),g={slide:p.a.bool,indicators:p.a.bool,interval:p.a.number,controls:p.a.bool,pauseOnHover:p.a.bool,wrap:p.a.bool,onSelect:p.a.func,onSlideEnd:p.a.func,activeIndex:p.a.number,defaultActiveIndex:p.a.number,direction:p.a.oneOf(["prev","next"]),prevIcon:p.a.node,prevLabel:p.a.string,nextIcon:p.a.node,nextLabel:p.a.string},O={slide:!0,interval:5e3,pauseOnHover:!0,wrap:!0,indicators:!0,controls:!0,prevIcon:u.a.createElement(m.a,{glyph:"chevron-left"}),prevLabel:"Previous",nextIcon:u.a.createElement(m.a,{glyph:"chevron-right"}),nextLabel:"Next"},E=function(e){function t(t,n){var r;(r=e.call(this,t,n)||this).handleMouseOver=r.handleMouseOver.bind(Object(i.a)(r)),r.handleMouseOut=r.handleMouseOut.bind(Object(i.a)(r)),r.handlePrev=r.handlePrev.bind(Object(i.a)(r)),r.handleNext=r.handleNext.bind(Object(i.a)(r)),r.handleItemAnimateOutEnd=r.handleItemAnimateOutEnd.bind(Object(i.a)(r));var o=t.defaultActiveIndex;return r.state={activeIndex:null!=o?o:0,previousActiveIndex:null,direction:null},r.isUnmounted=!1,r}Object(a.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.waitForNext()},n.componentWillReceiveProps=function(e){var t=this.getActiveIndex();null!=e.activeIndex&&e.activeIndex!==t&&(clearTimeout(this.timeout),this.setState({previousActiveIndex:t,direction:null!=e.direction?e.direction:this.getDirection(t,e.activeIndex)})),null==e.activeIndex&&this.state.activeIndex>=e.children.length&&this.setState({activeIndex:0,previousActiveIndex:null,direction:null})},n.componentWillUnmount=function(){clearTimeout(this.timeout),this.isUnmounted=!0},n.getActiveIndex=function(){var e=this.props.activeIndex;return null!=e?e:this.state.activeIndex},n.getDirection=function(e,t){return e===t?null:e>t?"prev":"next"},n.handleItemAnimateOutEnd=function(){var e=this;this.setState({previousActiveIndex:null,direction:null},function(){e.waitForNext(),e.props.onSlideEnd&&e.props.onSlideEnd()})},n.handleMouseOut=function(){this.isPaused&&this.play()},n.handleMouseOver=function(){this.props.pauseOnHover&&this.pause()},n.handleNext=function(e){var t=this.getActiveIndex()+1;if(t>y.a.count(this.props.children)-1){if(!this.props.wrap)return;t=0}this.select(t,e,"next")},n.handlePrev=function(e){var t=this.getActiveIndex()-1;if(t<0){if(!this.props.wrap)return;t=y.a.count(this.props.children)-1}this.select(t,e,"prev")},n.pause=function(){this.isPaused=!0,clearTimeout(this.timeout)},n.play=function(){this.isPaused=!1,this.waitForNext()},n.select=function(e,t,n){if(clearTimeout(this.timeout),!this.isUnmounted){var r=this.props.slide?this.getActiveIndex():null;n=n||this.getDirection(r,e);var o=this.props.onSelect;if(o&&(o.length>1?(t?(t.persist(),t.direction=n):t={direction:n},o(e,t)):o(e)),null==this.props.activeIndex&&e!==r){if(null!=this.state.previousActiveIndex)return;this.setState({activeIndex:e,previousActiveIndex:r,direction:n})}}},n.waitForNext=function(){var e=this.props,t=e.slide,n=e.interval,r=e.activeIndex;!this.isPaused&&t&&n&&null==r&&(this.timeout=setTimeout(this.handleNext,n))},n.renderControls=function(e){var t=e.wrap,n=e.children,r=e.activeIndex,o=e.prevIcon,a=e.nextIcon,i=e.bsProps,l=e.prevLabel,c=e.nextLabel,f=Object(v.e)(i,"control"),p=y.a.count(n);return[(t||0!==r)&&u.a.createElement(b.a,{key:"prev",className:s()(f,"left"),onClick:this.handlePrev},o,l&&u.a.createElement("span",{className:"sr-only"},l)),(t||r!==p-1)&&u.a.createElement(b.a,{key:"next",className:s()(f,"right"),onClick:this.handleNext},a,c&&u.a.createElement("span",{className:"sr-only"},c))]},n.renderIndicators=function(e,t,n){var r=this,o=[];return y.a.forEach(e,function(e,n){o.push(u.a.createElement("li",{key:n,className:n===t?"active":null,onClick:function(e){return r.select(n,e)}})," ")}),u.a.createElement("ol",{className:Object(v.e)(n,"indicators")},o)},n.render=function(){var e=this,t=this.props,n=t.slide,a=t.indicators,i=t.controls,l=t.wrap,f=t.prevIcon,p=t.prevLabel,d=t.nextIcon,h=t.nextLabel,m=t.className,b=t.children,g=Object(o.a)(t,["slide","indicators","controls","wrap","prevIcon","prevLabel","nextIcon","nextLabel","className","children"]),O=this.state,E=O.previousActiveIndex,x=O.direction,C=Object(v.g)(g,["interval","pauseOnHover","onSelect","onSlideEnd","activeIndex","defaultActiveIndex","direction"]),w=C[0],_=C[1],j=this.getActiveIndex(),T=Object(r.a)({},Object(v.d)(w),{slide:n});return u.a.createElement("div",Object(r.a)({},_,{className:s()(m,T),onMouseOver:this.handleMouseOver,onMouseOut:this.handleMouseOut}),a&&this.renderIndicators(b,j,w),u.a.createElement("div",{className:Object(v.e)(w,"inner")},y.a.map(b,function(t,r){var o=r===j,a=n&&r===E;return Object(c.cloneElement)(t,{active:o,index:r,animateOut:a,animateIn:o&&null!=E&&n,direction:x,onAnimateOutEnd:a?e.handleItemAnimateOutEnd:null})})),i&&this.renderControls({wrap:l,children:b,activeIndex:j,prevIcon:f,prevLabel:p,nextIcon:d,nextLabel:h,bsProps:w}))},t}(u.a.Component);E.propTypes=g,E.defaultProps=O,E.Caption=d.a,E.Item=h.a;Object(v.a)("carousel",E)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(7),f=n.n(u),p=n(6),d={componentClass:f.a},h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,a=Object(o.a)(e,["componentClass","className"]),i=Object(p.f)(a),s=i[0],u=i[1],f=Object(p.d)(s);return c.a.createElement(t,Object(r.a)({},u,{className:l()(n,f)}))},t}(c.a.Component);h.propTypes=d,h.defaultProps={componentClass:"div"},t.a=Object(p.a)("carousel-caption",h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.properties=t.end=void 0;var r=a(n(188)),o=a(n(65));function a(e){return e&&e.__esModule?e:{default:e}}t.end=r.default,t.properties=o.default,t.default={end:r.default,properties:o.default}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(65)),o=a(n(37));function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){var o,a={target:e,currentTarget:e};function i(e){e.target===e.currentTarget&&(clearTimeout(o),e.target.removeEventListener(r.default.end,i),t.call(this))}r.default.end?null==n&&(n=l(e)||0):n=0,r.default.end?(e.addEventListener(r.default.end,i,!1),o=setTimeout(function(){return i(a)},1.5*(n||100))):setTimeout(i.bind(null,a),0)}function l(e){var t=(0,o.default)(e,r.default.duration),n=-1===t.indexOf("ms")?1e3:1;return parseFloat(t)*n}i._parseDuration=l,t.default=i,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(r,function(e,t){return t.toUpperCase()})};var r=/-(.)/g;e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.default)(e).replace(i,"-ms-")};var r,o=n(191),a=(r=o)&&r.__esModule?r:{default:r};var i=/^ms-/;e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(r,"-$1").toLowerCase()};var r=/([A-Z])/g;e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)throw new TypeError("No Element passed to `getComputedStyle()`");var t=e.ownerDocument;return"defaultView"in t?t.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):window.getComputedStyle(e,null):{getPropertyValue:function(t){var n=e.style;"float"==(t=(0,a.default)(t))&&(t="styleFloat");var r=e.currentStyle[t]||null;if(null==r&&n&&n[t]&&(r=n[t]),l.test(r)&&!i.test(t)){var o=n.left,s=e.runtimeStyle,c=s&&s.left;c&&(s.left=e.currentStyle.left),n.left="fontSize"===t?"1em":r,r=n.pixelLeft+"px",n.left=o,c&&(s.left=c)}return r}}};var r,o=n(95),a=(r=o)&&r.__esModule?r:{default:r};var i=/^(top|right|bottom|left)$/,l=/^([+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/i;e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return"removeProperty"in e.style?e.style.removeProperty(t):e.style.removeAttribute(t)},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!(!e||!r.test(e))};var r=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;e.exports=t.default},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(13),d=(n.n(p),n(6)),h={inline:f.a.bool,disabled:f.a.bool,title:f.a.string,validationState:f.a.oneOf(["success","warning","error",null]),inputRef:f.a.func},m=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.inline,n=e.disabled,a=e.validationState,i=e.inputRef,s=e.className,u=e.style,f=e.title,p=e.children,h=Object(o.a)(e,["inline","disabled","validationState","inputRef","className","style","title","children"]),m=Object(d.f)(h),b=m[0],v=m[1],y=c.a.createElement("input",Object(r.a)({},v,{ref:i,type:"checkbox",disabled:n}));if(t){var g,O=((g={})[Object(d.e)(b,"inline")]=!0,g.disabled=n,g);return c.a.createElement("label",{className:l()(s,O),style:u,title:f},y,p)}var E=Object(r.a)({},Object(d.d)(b),{disabled:n});return a&&(E["has-"+a]=!0),c.a.createElement("div",{className:l()(s,E),style:u},c.a.createElement("label",{title:f},y,p))},t}(c.a.Component);m.propTypes=h,m.defaultProps={inline:!1,disabled:!1,title:""};Object(d.a)("checkbox",m)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(7),d=n.n(p),h=n(6),m=n(96),b=n(10),v={componentClass:d.a,visibleXsBlock:f.a.bool,visibleSmBlock:f.a.bool,visibleMdBlock:f.a.bool,visibleLgBlock:f.a.bool},y=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,a=Object(o.a)(e,["componentClass","className"]),i=Object(h.f)(a),s=i[0],u=i[1],f=Object(h.d)(s);return b.a.forEach(function(e){var t="visible"+Object(m.a)(e)+"Block";u[t]&&(f["visible-"+e+"-block"]=!0),delete u[t]}),c.a.createElement(t,Object(r.a)({},u,{className:l()(n,f)}))},t}(c.a.Component);y.propTypes=v,y.defaultProps={componentClass:"div"};Object(h.a)("clearfix",y)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(13),d=(n.n(p),n(6)),h={htmlFor:f.a.string,srOnly:f.a.bool},m={$bs_formGroup:f.a.object},b=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.context.$bs_formGroup,t=e&&e.controlId,n=this.props,a=n.htmlFor,i=void 0===a?t:a,s=n.srOnly,u=n.className,f=Object(o.a)(n,["htmlFor","srOnly","className"]),p=Object(d.f)(f),h=p[0],m=p[1],b=Object(r.a)({},Object(d.d)(h),{"sr-only":s});return c.a.createElement("label",Object(r.a)({},m,{htmlFor:i,className:l()(u,b)}))},t}(c.a.Component);b.propTypes=h,b.defaultProps={srOnly:!1},b.contextTypes=m;Object(d.a)("control-label",b)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(7),d=n.n(p),h=n(6),m=n(10),b={componentClass:d.a,xs:f.a.number,sm:f.a.number,md:f.a.number,lg:f.a.number,xsHidden:f.a.bool,smHidden:f.a.bool,mdHidden:f.a.bool,lgHidden:f.a.bool,xsOffset:f.a.number,smOffset:f.a.number,mdOffset:f.a.number,lgOffset:f.a.number,xsPush:f.a.number,smPush:f.a.number,mdPush:f.a.number,lgPush:f.a.number,xsPull:f.a.number,smPull:f.a.number,mdPull:f.a.number,lgPull:f.a.number},v=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,a=Object(o.a)(e,["componentClass","className"]),i=Object(h.f)(a),s=i[0],u=i[1],f=[];return m.a.forEach(function(e){function t(t,n){var r=""+e+t,o=u[r];null!=o&&f.push(Object(h.e)(s,""+e+n+"-"+o)),delete u[r]}t("",""),t("Offset","-offset"),t("Push","-push"),t("Pull","-pull");var n=e+"Hidden";u[n]&&f.push("hidden-"+e),delete u[n]}),c.a.createElement(t,Object(r.a)({},u,{className:l()(n,f)}))},t}(c.a.Component);v.propTypes=b,v.defaultProps={componentClass:"div"};Object(h.a)("col",v)},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,l=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?l="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==l){var s=e.displayName||e.name,c="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,r)}}return e}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: 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("number"!==typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}};var r,o=n(5),a=(r=o)&&r.__esModule?r:{default:r};t.timeoutsShape=a.default.oneOfType([a.default.number,a.default.shape({enter:a.default.number,exit:a.default.number}).isRequired]),t.classNamesShape=a.default.oneOfType([a.default.string,a.default.shape({enter:a.default.string,exit:a.default.string,active:a.default.string}),a.default.shape({enter:a.default.string,enterDone:a.default.string,enterActive:a.default.string,exit:a.default.string,exitDone:a.default.string,exitActive:a.default.string})])},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(202),i=n.n(a),l=n(1),s=n(9),c=n(4),u=n.n(c),f=n(68),p=n.n(f),d=n(0),h=n.n(d),m=n(5),b=n.n(m),v=n(11),y=n.n(v),g=n(99),O=n.n(g),E=n(6),x=n(8),C=n(12),w={open:b.a.bool,pullRight:b.a.bool,onClose:b.a.func,labelledBy:b.a.oneOfType([b.a.string,b.a.number]),onSelect:b.a.func,rootCloseEvent:b.a.oneOf(["click","mousedown"])},_=function(e){function t(t){var n;return(n=e.call(this,t)||this).handleRootClose=n.handleRootClose.bind(Object(s.a)(n)),n.handleKeyDown=n.handleKeyDown.bind(Object(s.a)(n)),n}Object(l.a)(t,e);var n=t.prototype;return n.getFocusableMenuItems=function(){var e=y.a.findDOMNode(this);return e?i()(e.querySelectorAll('[tabIndex="-1"]')):[]},n.getItemsAndActiveIndex=function(){var e=this.getFocusableMenuItems();return{items:e,activeIndex:e.indexOf(document.activeElement)}},n.focusNext=function(){var e=this.getItemsAndActiveIndex(),t=e.items,n=e.activeIndex;0!==t.length&&t[n===t.length-1?0:n+1].focus()},n.focusPrevious=function(){var e=this.getItemsAndActiveIndex(),t=e.items,n=e.activeIndex;0!==t.length&&t[0===n?t.length-1:n-1].focus()},n.handleKeyDown=function(e){switch(e.keyCode){case p.a.codes.down:this.focusNext(),e.preventDefault();break;case p.a.codes.up:this.focusPrevious(),e.preventDefault();break;case p.a.codes.esc:case p.a.codes.tab:this.props.onClose(e,{source:"keydown"})}},n.handleRootClose=function(e){this.props.onClose(e,{source:"rootClose"})},n.render=function(){var e,t=this,n=this.props,a=n.open,i=n.pullRight,l=n.labelledBy,s=n.onSelect,c=n.className,f=n.rootCloseEvent,p=n.children,d=Object(o.a)(n,["open","pullRight","labelledBy","onSelect","className","rootCloseEvent","children"]),m=Object(E.g)(d,["onClose"]),b=m[0],v=m[1],y=Object(r.a)({},Object(E.d)(b),((e={})[Object(E.e)(b,"right")]=i,e));return h.a.createElement(O.a,{disabled:!a,onRootClose:this.handleRootClose,event:f},h.a.createElement("ul",Object(r.a)({},v,{role:"menu",className:u()(c,y),"aria-labelledby":l}),C.a.map(p,function(e){return h.a.cloneElement(e,{onKeyDown:Object(x.a)(e.props.onKeyDown,t.handleKeyDown),onSelect:Object(x.a)(e.props.onSelect,s)})})))},t}(h.a.Component);_.propTypes=w,_.defaultProps={bsRole:"menu",pullRight:!1},t.a=Object(E.a)("dropdown-menu",_)},function(e,t,n){e.exports=n(203)},function(e,t,n){n(204),n(209),e.exports=n(14).Array.from},function(e,t,n){"use strict";var r=n(205)(!0);n(206)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(56),o=n(55);e.exports=function(e){return function(t,n){var a,i,l=String(o(t)),s=r(n),c=l.length;return s<0||s>=c?e?"":void 0:(a=l.charCodeAt(s))<55296||a>56319||s+1===c||(i=l.charCodeAt(s+1))<56320||i>57343?e?l.charAt(s):a:e?l.slice(s,s+2):i-56320+(a-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(38),o=n(17),a=n(87),i=n(31),l=n(69),s=n(207),c=n(62),u=n(208),f=n(16)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,h,m,b,v){s(n,t,h);var y,g,O,E=function(e){if(!p&&e in _)return _[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",C="values"==m,w=!1,_=e.prototype,j=_[f]||_["@@iterator"]||m&&_[m],T=j||E(m),N=m?C?E("entries"):T:void 0,k="Array"==t&&_.entries||j;if(k&&(O=u(k.call(new e)))!==Object.prototype&&O.next&&(c(O,x,!0),r||"function"==typeof O[f]||i(O,f,d)),C&&j&&"values"!==j.name&&(w=!0,T=function(){return j.call(this)}),r&&!v||!p&&!w&&_[f]||i(_,f,T),l[t]=T,l[x]=d,m)if(y={values:C?T:E("values"),keys:b?T:E("keys"),entries:N},v)for(g in y)g in _||a(_,g,y[g]);else o(o.P+o.F*(p||w),t,y);return y}},function(e,t,n){"use strict";var r=n(61),o=n(34),a=n(62),i={};n(31)(i,n(16)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(i,{next:o(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var r=n(21),o=n(40),a=n(57)("IE_PROTO"),i=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},function(e,t,n){"use strict";var r=n(80),o=n(17),a=n(40),i=n(210),l=n(211),s=n(85),c=n(212),u=n(213);o(o.S+o.F*!n(215)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,o,f,p=a(e),d="function"==typeof this?this:Array,h=arguments.length,m=h>1?arguments[1]:void 0,b=void 0!==m,v=0,y=u(p);if(b&&(m=r(m,h>2?arguments[2]:void 0,2)),void 0==y||d==Array&&l(y))for(n=new d(t=s(p.length));t>v;v++)c(n,v,b?m(p[v],v):p[v]);else for(f=y.call(p),n=new d;!(o=f.next()).done;v++)c(n,v,b?i(f,m,[o.value,v],!0):o.value);return n.length=v,n}})},function(e,t,n){var r=n(32);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.call(e)),t}}},function(e,t,n){var r=n(69),o=n(16)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[o]===e)}},function(e,t,n){"use strict";var r=n(20),o=n(34);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){var r=n(214),o=n(16)("iterator"),a=n(69);e.exports=n(14).getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||a[r(e)]}},function(e,t,n){var r=n(54),o=n(16)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?r(t):"Object"==(i=r(t))&&"function"==typeof t.callee?"Arguments":i}},function(e,t,n){var r=n(16)("iterator"),o=!1;try{var a=[7][r]();a.return=function(){o=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var a=[7],i=a[r]();i.next=function(){return{done:n=!0}},a[r]=function(){return i},e(a)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(3),o=n(1),a=n(2),i=n(0),l=n.n(i),s=n(5),c=n.n(s),u=n(44),f=n(46),p=Object(a.a)({},u.a.propTypes,{bsStyle:c.a.string,bsSize:c.a.string,title:c.a.node.isRequired,noCaret:c.a.bool,children:c.a.node}),d=function(e){function t(){return e.apply(this,arguments)||this}return Object(o.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.bsSize,n=e.bsStyle,o=e.title,i=e.children,s=Object(r.a)(e,["bsSize","bsStyle","title","children"]),c=Object(f.a)(s,u.a.ControlledComponent),p=c[0],d=c[1];return l.a.createElement(u.a,Object(a.a)({},p,{bsSize:t,bsStyle:n}),l.a.createElement(u.a.Toggle,Object(a.a)({},d,{bsSize:t,bsStyle:n}),o),l.a.createElement(u.a.Menu,null,i))},t}(l.a.Component);d.propTypes=p},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(7),d=n.n(p),h=n(6),m={horizontal:f.a.bool,inline:f.a.bool,componentClass:d.a},b=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.horizontal,n=e.inline,a=e.componentClass,i=e.className,s=Object(o.a)(e,["horizontal","inline","componentClass","className"]),u=Object(h.f)(s),f=u[0],p=u[1],d=[];return t&&d.push(Object(h.e)(f,"horizontal")),n&&d.push(Object(h.e)(f,"inline")),c.a.createElement(a,Object(r.a)({},p,{className:l()(i,d)}))},t}(c.a.Component);b.propTypes=m,b.defaultProps={horizontal:!1,inline:!1,componentClass:"form"};Object(h.a)("form",b)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(7),d=n.n(p),h=n(13),m=(n.n(h),n(219)),b=n(220),v=n(6),y=n(10),g={componentClass:d.a,type:f.a.string,id:f.a.string,inputRef:f.a.func},O={$bs_formGroup:f.a.object},E=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e,t=this.context.$bs_formGroup,n=t&&t.controlId,a=this.props,i=a.componentClass,s=a.type,u=a.id,f=void 0===u?n:u,p=a.inputRef,d=a.className,h=a.bsSize,m=Object(o.a)(a,["componentClass","type","id","inputRef","className","bsSize"]),b=Object(v.f)(m),g=b[0],O=b[1];if("file"!==s&&(e=Object(v.d)(g)),h){var E=y.b[h]||h;e[Object(v.e)({bsClass:"input"},E)]=!0}return c.a.createElement(i,Object(r.a)({},O,{type:s,id:f,ref:p,className:l()(d,e)}))},t}(c.a.Component);E.propTypes=g,E.defaultProps={componentClass:"input"},E.contextTypes=O,E.Feedback=m.a,E.Static=b.a;Object(v.a)("form-control",Object(v.b)([y.c.SMALL,y.c.LARGE],E))},function(e,t,n){"use strict";var r=n(3),o=n(2),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(66),d=n(6),h={$bs_formGroup:f.a.object},m=function(e){function t(){return e.apply(this,arguments)||this}Object(a.a)(t,e);var n=t.prototype;return n.getGlyph=function(e){switch(e){case"success":return"ok";case"warning":return"warning-sign";case"error":return"remove";default:return null}},n.renderDefaultFeedback=function(e,t,n,r){var a=this.getGlyph(e&&e.validationState);return a?c.a.createElement(p.a,Object(o.a)({},r,{glyph:a,className:l()(t,n)})):null},n.render=function(){var e=this.props,t=e.className,n=e.children,a=Object(r.a)(e,["className","children"]),i=Object(d.f)(a),s=i[0],u=i[1],f=Object(d.d)(s);if(!n)return this.renderDefaultFeedback(this.context.$bs_formGroup,t,f,u);var p=c.a.Children.only(n);return c.a.cloneElement(p,Object(o.a)({},u,{className:l()(p.props.className,t,f)}))},t}(c.a.Component);m.defaultProps={bsRole:"feedback"},m.contextTypes=h,t.a=Object(d.a)("form-control-feedback",m)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(7),f=n.n(u),p=n(6),d={componentClass:f.a},h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,a=Object(o.a)(e,["componentClass","className"]),i=Object(p.f)(a),s=i[0],u=i[1],f=Object(p.d)(s);return c.a.createElement(t,Object(r.a)({},u,{className:l()(n,f)}))},t}(c.a.Component);h.propTypes=d,h.defaultProps={componentClass:"p"},t.a=Object(p.a)("form-control-static",h)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(6),d=n(10),h=n(12),m={controlId:f.a.string,validationState:f.a.oneOf(["success","warning","error",null])},b={$bs_formGroup:f.a.object.isRequired},v=function(e){function t(){return e.apply(this,arguments)||this}Object(a.a)(t,e);var n=t.prototype;return n.getChildContext=function(){var e=this.props;return{$bs_formGroup:{controlId:e.controlId,validationState:e.validationState}}},n.hasFeedback=function(e){var t=this;return h.a.some(e,function(e){return"feedback"===e.props.bsRole||e.props.children&&t.hasFeedback(e.props.children)})},n.render=function(){var e=this.props,t=e.validationState,n=e.className,a=e.children,i=Object(o.a)(e,["validationState","className","children"]),s=Object(p.g)(i,["controlId"]),u=s[0],f=s[1],d=Object(r.a)({},Object(p.d)(u),{"has-feedback":this.hasFeedback(a)});return t&&(d["has-"+t]=!0),c.a.createElement("div",Object(r.a)({},f,{className:l()(n,d)}),a)},t}(c.a.Component);v.propTypes=m,v.childContextTypes=b;Object(p.a)("form-group",Object(p.b)([d.c.LARGE,d.c.SMALL],v))},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(6),f=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=Object(o.a)(e,["className"]),a=Object(u.f)(n),i=a[0],s=a[1],f=Object(u.d)(i);return c.a.createElement("span",Object(r.a)({},s,{className:l()(t,f)}))},t}(c.a.Component);Object(u.a)("help-block",f)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(6),d={responsive:f.a.bool,rounded:f.a.bool,circle:f.a.bool,thumbnail:f.a.bool},h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.responsive,a=t.rounded,i=t.circle,s=t.thumbnail,u=t.className,f=Object(o.a)(t,["responsive","rounded","circle","thumbnail","className"]),d=Object(p.f)(f),h=d[0],m=d[1],b=((e={})[Object(p.e)(h,"responsive")]=n,e[Object(p.e)(h,"rounded")]=a,e[Object(p.e)(h,"circle")]=i,e[Object(p.e)(h,"thumbnail")]=s,e);return c.a.createElement("img",Object(r.a)({},m,{className:l()(u,b)}))},t}(c.a.Component);h.propTypes=d,h.defaultProps={responsive:!1,rounded:!1,circle:!1,thumbnail:!1};Object(p.a)("img",h)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(225),f=n(226),p=n(6),d=n(10),h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=Object(o.a)(e,["className"]),a=Object(p.f)(n),i=a[0],s=a[1],u=Object(p.d)(i);return c.a.createElement("span",Object(r.a)({},s,{className:l()(t,u)}))},t}(c.a.Component);h.Addon=u.a,h.Button=f.a;Object(p.a)("input-group",Object(p.b)([d.c.LARGE,d.c.SMALL],h))},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(6),f=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=Object(o.a)(e,["className"]),a=Object(u.f)(n),i=a[0],s=a[1],f=Object(u.d)(i);return c.a.createElement("span",Object(r.a)({},s,{className:l()(t,f)}))},t}(c.a.Component);t.a=Object(u.a)("input-group-addon",f)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(6),f=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=Object(o.a)(e,["className"]),a=Object(u.f)(n),i=a[0],s=a[1],f=Object(u.d)(i);return c.a.createElement("span",Object(r.a)({},s,{className:l()(t,f)}))},t}(c.a.Component);t.a=Object(u.a)("input-group-btn",f)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(0),l=n.n(i),s=n(4),c=n.n(s),u=n(7),f=n.n(u),p=n(6),d={componentClass:f.a},h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,a=Object(o.a)(e,["componentClass","className"]),i=Object(p.f)(a),s=i[0],u=i[1],f=Object(p.d)(s);return l.a.createElement(t,Object(r.a)({},u,{className:c()(n,f)}))},t}(l.a.Component);h.propTypes=d,h.defaultProps={componentClass:"div"};Object(p.a)("jumbotron",h)},function(e,t,n){"use strict";var r=n(27),o=n.n(r),a=n(2),i=n(3),l=n(1),s=n(4),c=n.n(s),u=n(0),f=n.n(u),p=n(6),d=n(10),h=function(e){function t(){return e.apply(this,arguments)||this}Object(l.a)(t,e);var n=t.prototype;return n.hasContent=function(e){var t=!1;return f.a.Children.forEach(e,function(e){t||(e||0===e)&&(t=!0)}),t},n.render=function(){var e=this.props,t=e.className,n=e.children,r=Object(i.a)(e,["className","children"]),o=Object(p.f)(r),l=o[0],s=o[1],u=Object(a.a)({},Object(p.d)(l),{hidden:!this.hasContent(n)});return f.a.createElement("span",Object(a.a)({},s,{className:c()(t,u)}),n)},t}(f.a.Component);Object(p.a)("label",Object(p.c)(o()(d.d).concat([d.e.DEFAULT,d.e.PRIMARY]),d.e.DEFAULT,h))},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(7),f=n.n(u),p=n(103),d=n(6),h=n(12),m={componentClass:f.a};var b=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.componentClass,a=void 0===n?function(e){return e?h.a.some(e,function(e){return e.type!==p.a||e.props.href||e.props.onClick})?"div":"ul":"div"}(t):n,i=e.className,u=Object(o.a)(e,["children","componentClass","className"]),f=Object(d.f)(u),m=f[0],b=f[1],v=Object(d.d)(m),y="ul"===a&&h.a.every(t,function(e){return e.type===p.a});return c.a.createElement(a,Object(r.a)({},b,{className:l()(i,v)}),y?h.a.map(t,function(e){return Object(s.cloneElement)(e,{listItem:!0})}):t)},t}(c.a.Component);b.propTypes=m;Object(d.a)("list-group",b)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(7),d=n.n(p),h=n(48),m=n(6),b={align:f.a.oneOf(["top","middle","bottom"]),componentClass:d.a},v=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.align,a=e.className,i=Object(o.a)(e,["componentClass","align","className"]),s=Object(m.f)(i),u=s[0],f=s[1],p=Object(m.d)(u);return n&&(p[Object(m.e)(h.a.defaultProps,n)]=!0),c.a.createElement(t,Object(r.a)({},f,{className:l()(a,p)}))},t}(c.a.Component);v.propTypes=b,v.defaultProps={componentClass:"div"},t.a=Object(m.a)("media-body",v)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(7),f=n.n(u),p=n(6),d={componentClass:f.a},h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,a=Object(o.a)(e,["componentClass","className"]),i=Object(p.f)(a),s=i[0],u=i[1],f=Object(p.d)(s);return c.a.createElement(t,Object(r.a)({},u,{className:l()(n,f)}))},t}(c.a.Component);h.propTypes=d,h.defaultProps={componentClass:"h4"},t.a=Object(p.a)("media-heading",h)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(48),d=n(6),h={align:f.a.oneOf(["top","middle","bottom"])},m=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.align,n=e.className,a=Object(o.a)(e,["align","className"]),i=Object(d.f)(a),s=i[0],u=i[1],f=Object(d.d)(s);return t&&(f[Object(d.e)(p.a.defaultProps,t)]=!0),c.a.createElement("div",Object(r.a)({},u,{className:l()(n,f)}))},t}(c.a.Component);m.propTypes=h,t.a=Object(d.a)("media-left",m)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(6),f=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=Object(o.a)(e,["className"]),a=Object(u.f)(n),i=a[0],s=a[1],f=Object(u.d)(i);return c.a.createElement("ul",Object(r.a)({},s,{className:l()(t,f)}))},t}(c.a.Component);t.a=Object(u.a)("media-list",f)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(6),f=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=Object(o.a)(e,["className"]),a=Object(u.f)(n),i=a[0],s=a[1],f=Object(u.d)(i);return c.a.createElement("li",Object(r.a)({},s,{className:l()(t,f)}))},t}(c.a.Component);t.a=Object(u.a)("media",f)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(48),d=n(6),h={align:f.a.oneOf(["top","middle","bottom"])},m=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.align,n=e.className,a=Object(o.a)(e,["align","className"]),i=Object(d.f)(a),s=i[0],u=i[1],f=Object(d.d)(s);return t&&(f[Object(d.e)(p.a.defaultProps,t)]=!0),c.a.createElement("div",Object(r.a)({},u,{className:l()(n,f)}))},t}(c.a.Component);m.propTypes=h,t.a=Object(d.a)("media-right",m)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(9),l=n(4),s=n.n(l),c=n(0),u=n.n(c),f=n(5),p=n.n(f),d=n(43),h=n.n(d),m=n(15),b=n(6),v=n(8),y={active:p.a.bool,disabled:p.a.bool,divider:h()(p.a.bool,function(e){var t=e.divider,n=e.children;return t&&n?new Error("Children will not be rendered for dividers"):null}),eventKey:p.a.any,header:p.a.bool,href:p.a.string,onClick:p.a.func,onSelect:p.a.func},g=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleClick=r.handleClick.bind(Object(i.a)(r)),r}Object(a.a)(t,e);var n=t.prototype;return n.handleClick=function(e){var t=this.props,n=t.href,r=t.disabled,o=t.onSelect,a=t.eventKey;n&&!r||e.preventDefault(),r||o&&o(a,e)},n.render=function(){var e=this.props,t=e.active,n=e.disabled,a=e.divider,i=e.header,l=e.onClick,c=e.className,f=e.style,p=Object(o.a)(e,["active","disabled","divider","header","onClick","className","style"]),d=Object(b.g)(p,["eventKey","onSelect"]),h=d[0],y=d[1];return a?(y.children=void 0,u.a.createElement("li",Object(r.a)({},y,{role:"separator",className:s()(c,"divider"),style:f}))):i?u.a.createElement("li",Object(r.a)({},y,{role:"heading",className:s()(c,Object(b.e)(h,"header")),style:f})):u.a.createElement("li",{role:"presentation",className:s()(c,{active:t,disabled:n}),style:f},u.a.createElement(m.a,Object(r.a)({},y,{role:"menuitem",tabIndex:"-1",onClick:Object(v.a)(l,this.handleClick)})))},t}(u.a.Component);g.propTypes=y,g.defaultProps={divider:!1,disabled:!1,header:!1};Object(b.a)("dropdown",g)},function(e,t,n){"use strict";var r=n(3),o=n(1),a=n(9),i=n(2),l=n(4),s=n.n(l),c=n(238),u=n.n(c),f=n(28),p=n.n(f),d=n(18),h=n.n(d),m=n(104),b=n.n(m),v=n(0),y=n.n(v),g=n(5),O=n.n(g),E=n(11),x=n.n(E),C=n(242),w=n.n(C),_=n(106),j=n.n(_),T=n(7),N=n.n(T),k=n(47),S=n(108),P=n(109),M=n(110),R=n(111),I=n(112),D=n(6),A=n(8),L=n(46),F=n(10),U=Object(i.a)({},w.a.propTypes,P.a.propTypes,{backdrop:O.a.oneOf(["static",!0,!1]),backdropClassName:O.a.string,keyboard:O.a.bool,animation:O.a.bool,dialogComponentClass:N.a,autoFocus:O.a.bool,enforceFocus:O.a.bool,restoreFocus:O.a.bool,show:O.a.bool,onHide:O.a.func,onEnter:O.a.func,onEntering:O.a.func,onEntered:O.a.func,onExit:O.a.func,onExiting:O.a.func,onExited:O.a.func,container:w.a.propTypes.container}),B=Object(i.a)({},w.a.defaultProps,{animation:!0,dialogComponentClass:P.a}),H={$bs_modal:O.a.shape({onHide:O.a.func})};function z(e){return y.a.createElement(k.a,Object(i.a)({},e,{timeout:W.TRANSITION_DURATION}))}function K(e){return y.a.createElement(k.a,Object(i.a)({},e,{timeout:W.BACKDROP_TRANSITION_DURATION}))}var W=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleEntering=r.handleEntering.bind(Object(a.a)(r)),r.handleExited=r.handleExited.bind(Object(a.a)(r)),r.handleWindowResize=r.handleWindowResize.bind(Object(a.a)(r)),r.handleDialogClick=r.handleDialogClick.bind(Object(a.a)(r)),r.setModalRef=r.setModalRef.bind(Object(a.a)(r)),r.state={style:{}},r}Object(o.a)(t,e);var n=t.prototype;return n.getChildContext=function(){return{$bs_modal:{onHide:this.props.onHide}}},n.componentWillUnmount=function(){this.handleExited()},n.setModalRef=function(e){this._modal=e},n.handleDialogClick=function(e){e.target===e.currentTarget&&this.props.onHide()},n.handleEntering=function(){u.a.on(window,"resize",this.handleWindowResize),this.updateStyle()},n.handleExited=function(){u.a.off(window,"resize",this.handleWindowResize)},n.handleWindowResize=function(){this.updateStyle()},n.updateStyle=function(){if(h.a){var e=this._modal.getDialogElement(),t=e.scrollHeight,n=p()(e),r=j()(x.a.findDOMNode(this.props.container||n.body)),o=t>n.documentElement.clientHeight;this.setState({style:{paddingRight:r&&!o?b()():void 0,paddingLeft:!r&&o?b()():void 0}})}},n.render=function(){var e=this.props,t=e.backdrop,n=e.backdropClassName,o=e.animation,a=e.show,l=e.dialogComponentClass,c=e.className,u=e.style,f=e.children,p=e.onEntering,d=e.onExited,h=Object(r.a)(e,["backdrop","backdropClassName","animation","show","dialogComponentClass","className","style","children","onEntering","onExited"]),m=Object(L.a)(h,w.a),b=m[0],v=m[1],g=a&&!o&&"in";return y.a.createElement(w.a,Object(i.a)({},b,{ref:this.setModalRef,show:a,containerClassName:Object(D.e)(h,"open"),transition:o?z:void 0,backdrop:t,backdropTransition:o?K:void 0,backdropClassName:s()(Object(D.e)(h,"backdrop"),n,g),onEntering:Object(A.a)(p,this.handleEntering),onExited:Object(A.a)(d,this.handleExited)}),y.a.createElement(l,Object(i.a)({},v,{style:Object(i.a)({},this.state.style,u),className:s()(c,g),onClick:!0===t?this.handleDialogClick:null}),f))},t}(y.a.Component);W.propTypes=U,W.defaultProps=B,W.childContextTypes=H,W.Body=S.a,W.Header=R.a,W.Title=I.a,W.Footer=M.a,W.Dialog=P.a,W.TRANSITION_DURATION=300,W.BACKDROP_TRANSITION_DURATION=150,t.a=Object(D.a)("modal",Object(D.b)([F.c.LARGE,F.c.SMALL],W))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listen=t.filter=t.off=t.on=void 0;var r=l(n(70)),o=l(n(71)),a=l(n(239)),i=l(n(241));function l(e){return e&&e.__esModule?e:{default:e}}t.on=r.default,t.off=o.default,t.filter=a.default,t.listen=i.default,t.default={on:r.default,off:o.default,filter:a.default,listen:i.default}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return function(n){var a=n.currentTarget,i=n.target,l=(0,o.default)(a,e);l.some(function(e){return(0,r.default)(e,i)})&&t.call(this,n)}};var r=a(n(29)),o=a(n(240));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,a="#"===t[0],i="."===t[0],l=a||i?t.slice(1):t;if(r.test(l))return a?(e=e.getElementById?e:document,(n=e.getElementById(l))?[n]:[]):e.getElementsByClassName&&i?o(e.getElementsByClassName(l)):o(e.getElementsByTagName(t));return o(e.querySelectorAll(t))};var r=/^[\w-]*$/,o=Function.prototype.bind.call(Function.prototype.call,[].slice);e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(18)),o=i(n(70)),a=i(n(71));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(){};r.default&&(l=function(e,t,n,r){return(0,o.default)(e,t,n,r),function(){(0,a.default)(e,t,n,r)}}),t.default=l,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=x(n(98)),a=x(n(29)),i=x(n(18)),l=x(n(5)),s=x(n(49)),c=x(n(243)),u=x(n(7)),f=n(0),p=x(f),d=x(n(11)),h=x(n(13)),m=x(n(244)),b=x(n(107)),v=x(n(250)),y=x(n(100)),g=x(n(251)),O=x(n(51)),E=x(n(30));function x(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var w=new m.default,_=function(e){function t(){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=C(this,e.call.apply(e,[this].concat(a))),j.call(r),C(r,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.omitProps=function(e,t){var n={};return Object.keys(e).map(function(r){Object.prototype.hasOwnProperty.call(t,r)||(n[r]=e[r])}),n},t.prototype.render=function(){var e=this.props,n=e.show,o=e.container,a=e.children,i=e.transition,l=e.backdrop,s=e.className,c=e.style,u=e.onExit,d=e.onExiting,h=e.onEnter,m=e.onEntering,y=e.onEntered,g=p.default.Children.only(a),O=this.omitProps(this.props,t.propTypes);if(!(n||i&&!this.state.exited))return null;var E=g.props,x=E.role,C=E.tabIndex;return void 0!==x&&void 0!==C||(g=(0,f.cloneElement)(g,{role:void 0===x?"document":x,tabIndex:null==C?"-1":C})),i&&(g=p.default.createElement(i,{appear:!0,unmountOnExit:!0,in:n,onExit:u,onExiting:d,onExited:this.handleHidden,onEnter:h,onEntering:m,onEntered:y},g)),p.default.createElement(b.default,{ref:this.setMountNode,container:o,onRendered:this.onPortalRendered},p.default.createElement("div",r({ref:this.setModalNodeRef,role:x||"dialog"},O,{style:c,className:s}),l&&this.renderBackdrop(),p.default.createElement(v.default,{ref:this.setDialogRef},g)))},t.prototype.componentWillReceiveProps=function(e){e.show?this.setState({exited:!1}):e.transition||this.setState({exited:!0})},t.prototype.componentWillUpdate=function(e){!this.props.show&&e.show&&this.checkForFocus()},t.prototype.componentDidMount=function(){this._isMounted=!0,this.props.show&&this.onShow()},t.prototype.componentDidUpdate=function(e){var t=this.props.transition;!e.show||this.props.show||t?!e.show&&this.props.show&&this.onShow():this.onHide()},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.show,n=e.transition;this._isMounted=!1,(t||n&&!this.state.exited)&&this.onHide()},t.prototype.autoFocus=function(){if(this.props.autoFocus){var e=this.getDialogElement(),t=(0,o.default)((0,E.default)(this));e&&!(0,a.default)(e,t)&&(this.lastFocus=t,e.hasAttribute("tabIndex")||((0,h.default)(!1,'The modal content node does not accept focus. For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'),e.setAttribute("tabIndex",-1)),e.focus())}},t.prototype.restoreLastFocus=function(){this.lastFocus&&this.lastFocus.focus&&(this.lastFocus.focus(),this.lastFocus=null)},t.prototype.getDialogElement=function(){return d.default.findDOMNode(this.dialog)},t.prototype.isTopModal=function(){return this.props.manager.isTopModal(this)},t}(p.default.Component);_.propTypes=r({},b.default.propTypes,{show:l.default.bool,container:l.default.oneOfType([s.default,l.default.func]),onShow:l.default.func,onHide:l.default.func,backdrop:l.default.oneOfType([l.default.bool,l.default.oneOf(["static"])]),renderBackdrop:l.default.func,onEscapeKeyDown:l.default.func,onEscapeKeyUp:(0,c.default)(l.default.func,"Please use onEscapeKeyDown instead for consistency"),onBackdropClick:l.default.func,backdropStyle:l.default.object,backdropClassName:l.default.string,containerClassName:l.default.string,keyboard:l.default.bool,transition:u.default,backdropTransition:u.default,autoFocus:l.default.bool,enforceFocus:l.default.bool,restoreFocus:l.default.bool,onEnter:l.default.func,onEntering:l.default.func,onEntered:l.default.func,onExit:l.default.func,onExiting:l.default.func,onExited:l.default.func,manager:l.default.object.isRequired}),_.defaultProps={show:!1,backdrop:!0,keyboard:!0,autoFocus:!0,enforceFocus:!0,restoreFocus:!0,onHide:function(){},manager:w,renderBackdrop:function(e){return p.default.createElement("div",e)}};var j=function(){var e=this;this.state={exited:!this.props.show},this.renderBackdrop=function(){var t=e.props,n=t.backdropStyle,r=t.backdropClassName,o=t.renderBackdrop,a=t.backdropTransition,i=o({ref:function(t){return e.backdrop=t},style:n,className:r,onClick:e.handleBackdropClick});return a&&(i=p.default.createElement(a,{appear:!0,in:e.props.show},i)),i},this.onPortalRendered=function(){e.autoFocus(),e.props.onShow&&e.props.onShow()},this.onShow=function(){var t=(0,E.default)(e),n=(0,O.default)(e.props.container,t.body);e.props.manager.add(e,n,e.props.containerClassName),e._onDocumentKeydownListener=(0,y.default)(t,"keydown",e.handleDocumentKeyDown),e._onDocumentKeyupListener=(0,y.default)(t,"keyup",e.handleDocumentKeyUp),e._onFocusinListener=(0,g.default)(e.enforceFocus)},this.onHide=function(){e.props.manager.remove(e),e._onDocumentKeydownListener.remove(),e._onDocumentKeyupListener.remove(),e._onFocusinListener.remove(),e.props.restoreFocus&&e.restoreLastFocus()},this.setMountNode=function(t){e.mountNode=t?t.getMountNode():t},this.setModalNodeRef=function(t){e.modalNode=t},this.setDialogRef=function(t){e.dialog=t},this.handleHidden=function(){var t;(e.setState({exited:!0}),e.onHide(),e.props.onExited)&&(t=e.props).onExited.apply(t,arguments)},this.handleBackdropClick=function(t){t.target===t.currentTarget&&(e.props.onBackdropClick&&e.props.onBackdropClick(t),!0===e.props.backdrop&&e.props.onHide())},this.handleDocumentKeyDown=function(t){e.props.keyboard&&27===t.keyCode&&e.isTopModal()&&(e.props.onEscapeKeyDown&&e.props.onEscapeKeyDown(t),e.props.onHide())},this.handleDocumentKeyUp=function(t){e.props.keyboard&&27===t.keyCode&&e.isTopModal()&&e.props.onEscapeKeyUp&&e.props.onEscapeKeyUp(t)},this.checkForFocus=function(){i.default&&(e.lastFocus=(0,o.default)())},this.enforceFocus=function(){if(e.props.enforceFocus&&e._isMounted&&e.isTopModal()){var t=e.getDialogElement(),n=(0,o.default)((0,E.default)(e));t&&!(0,a.default)(t,n)&&t.focus()}}};_.Manager=m.default,t.default=_,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r,o=n(13),a=(r=o)&&r.__esModule?r:{default:r};var i={};function l(e,t){return function(n,r,o,l,s){var c=o||"<<anonymous>>",u=s||r;if(null!=n[r]){var f=o+"."+r;(0,a.default)(i[f],"The "+l+" `"+u+"` of `"+c+"` is deprecated. "+t+"."),i[f]=!0}for(var p=arguments.length,d=Array(p>5?p-5:0),h=5;h<p;h++)d[h-5]=arguments[h];return e.apply(void 0,[n,r,o,l,s].concat(d))}}l._resetWarned=function(){i={}},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=s(n(245)),o=s(n(37)),a=s(n(104)),i=s(n(106)),l=n(248);function s(e){return e&&e.__esModule?e:{default:e}}t.default=function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=n.hideSiblingNodes,c=void 0===s||s,u=n.handleContainerOverflow,f=void 0===u||u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.add=function(e,n,s){var c=t.modals.indexOf(e),u=t.containers.indexOf(n);if(-1!==c)return c;if(c=t.modals.length,t.modals.push(e),t.hideSiblingNodes&&(0,l.hideSiblings)(n,e.mountNode),-1!==u)return t.data[u].modals.push(e),c;var f={modals:[e],classes:s?s.split(/\s+/):[],overflowing:(0,i.default)(n)};return t.handleContainerOverflow&&function(e,t){var n={overflow:"hidden"};e.style={overflow:t.style.overflow,paddingRight:t.style.paddingRight},e.overflowing&&(n.paddingRight=parseInt((0,o.default)(t,"paddingRight")||0,10)+(0,a.default)()+"px"),(0,o.default)(t,n)}(f,n),f.classes.forEach(r.default.addClass.bind(null,n)),t.containers.push(n),t.data.push(f),c},this.remove=function(e){var n=t.modals.indexOf(e);if(-1!==n){var o=function(e,t){return n=function(e){return-1!==e.modals.indexOf(t)},r=-1,e.some(function(e,t){if(n(e,t))return r=t,!0}),r;var n,r}(t.data,e),a=t.data[o],i=t.containers[o];a.modals.splice(a.modals.indexOf(e),1),t.modals.splice(n,1),0===a.modals.length?(a.classes.forEach(r.default.removeClass.bind(null,i)),t.handleContainerOverflow&&function(e,t){var n=e.style;Object.keys(n).forEach(function(e){return t.style[e]=n[e]})}(a,i),t.hideSiblingNodes&&(0,l.showSiblings)(i,e.mountNode),t.containers.splice(o,1),t.data.splice(o,1)):t.hideSiblingNodes&&(0,l.ariaHidden)(!1,a.modals[a.modals.length-1].mountNode)}},this.isTopModal=function(e){return!!t.modals.length&&t.modals[t.modals.length-1]===e},this.hideSiblingNodes=c,this.handleContainerOverflow=f,this.modals=[],this.containers=[],this.data=[]},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasClass=t.removeClass=t.addClass=void 0;var r=i(n(246)),o=i(n(247)),a=i(n(105));function i(e){return e&&e.__esModule?e:{default:e}}t.addClass=r.default,t.removeClass=o.default,t.hasClass=a.default,t.default={addClass:r.default,removeClass:o.default,hasClass:a.default}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){e.classList?e.classList.add(t):(0,a.default)(e,t)||("string"===typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var r,o=n(105),a=(r=o)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"===typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";t.__esModule=!0,t.ariaHidden=a,t.hideSiblings=function(e,t){o(e,t,function(e){return a(!0,e)})},t.showSiblings=function(e,t){o(e,t,function(e){return a(!1,e)})};var r=["template","script","style"],o=function(e,t,n){t=[].concat(t),[].forEach.call(e.children,function(e){var o,a,i;-1===t.indexOf(e)&&(a=(o=e).nodeType,i=o.tagName,1===a&&-1===r.indexOf(i.toLowerCase()))&&n(e)})};function a(e,t){t&&(e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden"))}},function(e,t,n){"use strict";t.__esModule=!0;var r=c(n(5)),o=c(n(49)),a=c(n(0)),i=c(n(11)),l=c(n(51)),s=c(n(30));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var f=function(e){function t(){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,c=Array(o),f=0;f<o;f++)c[f]=arguments[f];return n=r=u(this,e.call.apply(e,[this].concat(c))),r._mountOverlayTarget=function(){r._overlayTarget||(r._overlayTarget=document.createElement("div"),r._portalContainerNode=(0,l.default)(r.props.container,(0,s.default)(r).body),r._portalContainerNode.appendChild(r._overlayTarget))},r._unmountOverlayTarget=function(){r._overlayTarget&&(r._portalContainerNode.removeChild(r._overlayTarget),r._overlayTarget=null),r._portalContainerNode=null},r._renderOverlay=function(){var e=r.props.children?a.default.Children.only(r.props.children):null;if(null!==e){r._mountOverlayTarget();var t=!r._overlayInstance;r._overlayInstance=i.default.unstable_renderSubtreeIntoContainer(r,e,r._overlayTarget,function(){t&&r.props.onRendered&&r.props.onRendered()})}else r._unrenderOverlay(),r._unmountOverlayTarget()},r._unrenderOverlay=function(){r._overlayTarget&&(i.default.unmountComponentAtNode(r._overlayTarget),r._overlayInstance=null)},r.getMountNode=function(){return r._overlayTarget},u(r,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){this._isMounted=!0,this._renderOverlay()},t.prototype.componentDidUpdate=function(){this._renderOverlay()},t.prototype.componentWillReceiveProps=function(e){this._overlayTarget&&e.container!==this.props.container&&(this._portalContainerNode.removeChild(this._overlayTarget),this._portalContainerNode=(0,l.default)(e.container,(0,s.default)(this).body),this._portalContainerNode.appendChild(this._overlayTarget))},t.prototype.componentWillUnmount=function(){this._isMounted=!1,this._unrenderOverlay(),this._unmountOverlayTarget()},t.prototype.render=function(){return null},t}(a.default.Component);f.displayName="Portal",f.propTypes={container:r.default.oneOfType([o.default,r.default.func]),onRendered:r.default.func},t.default=f,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(5)),o=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}var i={children:r.default.node},l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){return this.props.children},t}(o.default.Component);l.propTypes=i,t.default=l,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){var t=void 0;document.addEventListener?(document.addEventListener("focus",e,!0),t=function(){return document.removeEventListener("focus",e,!0)}):(document.attachEvent("onfocusin",e),t=function(){return document.detachEvent("onfocusin",e)});return{remove:t}},e.exports=t.default},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(9),l=n(4),s=n.n(l),c=n(0),u=n.n(c),f=n(5),p=n.n(f),d=n(7),h=n.n(d),m=n(22),b=n.n(m),v=n(102),y=n(114),g=n(253),O=n(254),E=n(255),x=n(6),C=n(10),w=n(8),_={fixedTop:p.a.bool,fixedBottom:p.a.bool,staticTop:p.a.bool,inverse:p.a.bool,fluid:p.a.bool,componentClass:h.a,onToggle:p.a.func,onSelect:p.a.func,collapseOnSelect:p.a.bool,expanded:p.a.bool,role:p.a.string},j={$bs_navbar:p.a.shape({bsClass:p.a.string,expanded:p.a.bool,onToggle:p.a.func.isRequired,onSelect:p.a.func})},T=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleToggle=r.handleToggle.bind(Object(i.a)(r)),r.handleCollapse=r.handleCollapse.bind(Object(i.a)(r)),r}Object(a.a)(t,e);var n=t.prototype;return n.getChildContext=function(){var e=this.props,t=e.bsClass,n=e.expanded,r=e.onSelect,o=e.collapseOnSelect;return{$bs_navbar:{bsClass:t,expanded:n,onToggle:this.handleToggle,onSelect:Object(w.a)(r,o?this.handleCollapse:null)}}},n.handleCollapse=function(){var e=this.props,t=e.onToggle;e.expanded&&t(!1)},n.handleToggle=function(){var e=this.props;(0,e.onToggle)(!e.expanded)},n.render=function(){var e,t=this.props,n=t.componentClass,a=t.fixedTop,i=t.fixedBottom,l=t.staticTop,c=t.inverse,f=t.fluid,p=t.className,d=t.children,h=Object(o.a)(t,["componentClass","fixedTop","fixedBottom","staticTop","inverse","fluid","className","children"]),m=Object(x.g)(h,["expanded","onToggle","onSelect","collapseOnSelect"]),b=m[0],y=m[1];void 0===y.role&&"nav"!==n&&(y.role="navigation"),c&&(b.bsStyle=C.e.INVERSE);var g=Object(r.a)({},Object(x.d)(b),((e={})[Object(x.e)(b,"fixed-top")]=a,e[Object(x.e)(b,"fixed-bottom")]=i,e[Object(x.e)(b,"static-top")]=l,e));return u.a.createElement(n,Object(r.a)({},y,{className:s()(p,g)}),u.a.createElement(v.a,{fluid:f},d))},t}(u.a.Component);T.propTypes=_,T.defaultProps={componentClass:"nav",fixedTop:!1,fixedBottom:!1,staticTop:!1,inverse:!1,fluid:!1,collapseOnSelect:!1},T.childContextTypes=j,Object(x.a)("navbar",T);var N=b()(T,{expanded:"onToggle"});function k(e,t,n){var a=function(e,n){var a=e.componentClass,i=e.className,l=e.pullRight,c=e.pullLeft,f=Object(o.a)(e,["componentClass","className","pullRight","pullLeft"]),p=n.$bs_navbar,d=void 0===p?{bsClass:"navbar"}:p;return u.a.createElement(a,Object(r.a)({},f,{className:s()(i,Object(x.e)(d,t),l&&Object(x.e)(d,"right"),c&&Object(x.e)(d,"left"))}))};return a.displayName=n,a.propTypes={componentClass:h.a,pullRight:p.a.bool,pullLeft:p.a.bool},a.defaultProps={componentClass:e,pullRight:!1,pullLeft:!1},a.contextTypes={$bs_navbar:p.a.shape({bsClass:p.a.string})},a}N.Brand=y.a,N.Header=O.a,N.Toggle=E.a,N.Collapse=g.a,N.Form=k("div","form","NavbarForm"),N.Text=k("p","text","NavbarText"),N.Link=k("a","link","NavbarLink");Object(x.c)([C.e.DEFAULT,C.e.INVERSE],C.e.DEFAULT,N)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(0),l=n.n(i),s=n(5),c=n.n(s),u=n(67),f=n(6),p={$bs_navbar:c.a.shape({bsClass:c.a.string,expanded:c.a.bool})},d=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=Object(o.a)(e,["children"]),a=this.context.$bs_navbar||{bsClass:"navbar"},i=Object(f.e)(a,"collapse");return l.a.createElement(u.a,Object(r.a)({in:a.expanded},n),l.a.createElement("div",{className:i},t))},t}(l.a.Component);d.contextTypes=p,t.a=d},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(6),d={$bs_navbar:f.a.shape({bsClass:f.a.string})},h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=Object(o.a)(e,["className"]),a=this.context.$bs_navbar||{bsClass:"navbar"},i=Object(p.e)(a,"header");return c.a.createElement("div",Object(r.a)({},n,{className:l()(t,i)}))},t}(c.a.Component);h.contextTypes=d,t.a=h},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(6),d=n(8),h={onClick:f.a.func,children:f.a.node},m={$bs_navbar:f.a.shape({bsClass:f.a.string,expanded:f.a.bool,onToggle:f.a.func.isRequired})},b=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.onClick,n=e.className,a=e.children,i=Object(o.a)(e,["onClick","className","children"]),s=this.context.$bs_navbar||{bsClass:"navbar"},u=Object(r.a)({type:"button"},i,{onClick:Object(d.a)(t,s.onToggle),className:l()(n,Object(p.e)(s,"toggle"),!s.expanded&&"collapsed")});return a?c.a.createElement("button",u,a):c.a.createElement("button",u,c.a.createElement("span",{className:"sr-only"},"Toggle navigation"),c.a.createElement("span",{className:"icon-bar"}),c.a.createElement("span",{className:"icon-bar"}),c.a.createElement("span",{className:"icon-bar"}))},t}(c.a.Component);b.propTypes=h,b.contextTypes=m,t.a=b},function(e,t,n){"use strict";var r=n(3),o=n(1),a=n(2),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(44),d=n(46),h=n(12),m=Object(a.a)({},p.a.propTypes,{title:f.a.node.isRequired,noCaret:f.a.bool,active:f.a.bool,activeKey:f.a.any,activeHref:f.a.string,children:f.a.node}),b=function(e){function t(){return e.apply(this,arguments)||this}Object(o.a)(t,e);var n=t.prototype;return n.isActive=function(e,t,n){var r=this,o=e.props;return!!(o.active||null!=t&&o.eventKey===t||n&&o.href===n)||(!!h.a.some(o.children,function(e){return r.isActive(e,t,n)})||o.active)},n.render=function(){var e=this,t=this.props,n=t.title,o=t.activeKey,i=t.activeHref,s=t.className,u=t.style,f=t.children,m=Object(r.a)(t,["title","activeKey","activeHref","className","style","children"]),b=this.isActive(this,o,i);delete m.active,delete m.eventKey;var v=Object(d.a)(m,p.a.ControlledComponent),y=v[0],g=v[1];return c.a.createElement(p.a,Object(a.a)({},y,{componentClass:"li",className:l()(s,{active:b}),style:u}),c.a.createElement(p.a.Toggle,Object(a.a)({},g,{useAnchor:!0}),n),c.a.createElement(p.a.Menu,null,h.a.map(f,function(t){return c.a.cloneElement(t,{active:e.isActive(t,o,i)})})))},t}(c.a.Component);b.propTypes=m},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=u(n(5)),a=u(n(7)),i=u(n(0)),l=u(n(107)),s=u(n(258)),c=u(n(99));function u(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,n,r));return o.handleHidden=function(){var e;(o.setState({exited:!0}),o.props.onExited)&&(e=o.props).onExited.apply(e,arguments)},o.state={exited:!n.show},o.onHiddenListener=o.handleHidden.bind(o),o}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillReceiveProps=function(e){e.show?this.setState({exited:!1}):e.transition||this.setState({exited:!0})},t.prototype.render=function(){var e=this.props,t=e.container,n=e.containerPadding,r=e.target,o=e.placement,a=e.shouldUpdatePosition,u=e.rootClose,f=e.children,p=e.transition,d=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["container","containerPadding","target","placement","shouldUpdatePosition","rootClose","children","transition"]);if(!(d.show||p&&!this.state.exited))return null;var h=f;if(h=i.default.createElement(s.default,{container:t,containerPadding:n,target:r,placement:o,shouldUpdatePosition:a},h),p){var m=d.onExit,b=d.onExiting,v=d.onEnter,y=d.onEntering,g=d.onEntered;h=i.default.createElement(p,{in:d.show,appear:!0,onExit:m,onExiting:b,onExited:this.onHiddenListener,onEnter:v,onEntering:y,onEntered:g},h)}return u&&(h=i.default.createElement(c.default,{onRootClose:d.onHide},h)),i.default.createElement(l.default,{container:t},h)},t}(i.default.Component);f.propTypes=r({},l.default.propTypes,s.default.propTypes,{show:o.default.bool,rootClose:o.default.bool,onHide:function(e){var t=o.default.func;e.rootClose&&(t=t.isRequired);for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return t.apply(void 0,[e].concat(r))},transition:a.default,onEnter:o.default.func,onEntering:o.default.func,onEntered:o.default.func,onExit:o.default.func,onExiting:o.default.func,onExited:o.default.func}),t.default=f,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=d(n(4)),a=d(n(5)),i=d(n(49)),l=n(0),s=d(l),c=d(n(11)),u=d(n(259)),f=d(n(51)),p=d(n(30));function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var m=function(e){function t(n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,n,r));return o.getTarget=function(){var e=o.props.target,t="function"===typeof e?e():e;return t&&c.default.findDOMNode(t)||null},o.maybeUpdatePosition=function(e){var t=o.getTarget();(o.props.shouldUpdatePosition||t!==o._lastTarget||e)&&o.updatePosition(t)},o.state={positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null},o._needsFlush=!1,o._lastTarget=null,o}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){this.updatePosition(this.getTarget())},t.prototype.componentWillReceiveProps=function(){this._needsFlush=!0},t.prototype.componentDidUpdate=function(e){this._needsFlush&&(this._needsFlush=!1,this.maybeUpdatePosition(this.props.placement!==e.placement))},t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,a=h(e,["children","className"]),i=this.state,c=i.positionLeft,u=i.positionTop,f=h(i,["positionLeft","positionTop"]);delete a.target,delete a.container,delete a.containerPadding,delete a.shouldUpdatePosition;var p=s.default.Children.only(t);return(0,l.cloneElement)(p,r({},a,f,{positionLeft:c,positionTop:u,className:(0,o.default)(n,p.props.className),style:r({},p.props.style,{left:c,top:u})}))},t.prototype.updatePosition=function(e){if(this._lastTarget=e,e){var t=c.default.findDOMNode(this),n=(0,f.default)(this.props.container,(0,p.default)(this).body);this.setState((0,u.default)(this.props.placement,t,e,n,this.props.containerPadding))}else this.setState({positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null})},t}(s.default.Component);m.propTypes={target:a.default.oneOfType([i.default,a.default.func]),container:a.default.oneOfType([i.default,a.default.func]),containerPadding:a.default.number,placement:a.default.oneOf(["top","right","bottom","left"]),shouldUpdatePosition:a.default.bool},m.displayName="Position",m.defaultProps={containerPadding:0,placement:"right",shouldUpdatePosition:!1},t.default=m,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t,n,a,i){var l="BODY"===a.tagName?(0,r.default)(n):(0,o.default)(n,a),c=(0,r.default)(t),u=c.height,f=c.width,p=void 0,d=void 0,h=void 0,m=void 0;if("left"===e||"right"===e){d=l.top+(l.height-u)/2,p="left"===e?l.left-f:l.left+l.width;var b=function(e,t,n,r){var o=s(n),a=o.scroll,i=o.height,l=e-r-a,c=e+r-a+t;return l<0?-l:c>i?i-c:0}(d,u,a,i);d+=b,m=50*(1-2*b/u)+"%",h=void 0}else{if("top"!==e&&"bottom"!==e)throw new Error('calcOverlayPosition(): No such placement of "'+e+'" found.');p=l.left+(l.width-f)/2,d="top"===e?l.top-u:l.top+l.height;var v=function(e,t,n,r){var o=s(n).width,a=e-r,i=e+r+t;if(a<0)return-a;if(i>o)return o-i;return 0}(p,f,a,i);p+=v,h=50*(1-2*v/f)+"%",m=void 0}return{positionLeft:p,positionTop:d,arrowOffsetLeft:h,arrowOffsetTop:m}};var r=l(n(117)),o=l(n(260)),a=l(n(118)),i=l(n(30));function l(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=void 0,n=void 0,o=void 0;if("BODY"===e.tagName)t=window.innerWidth,n=window.innerHeight,o=(0,a.default)((0,i.default)(e).documentElement)||(0,a.default)(e);else{var l=(0,r.default)(e);t=l.width,n=l.height,o=(0,a.default)(e)}return{width:t,height:n,scroll:o}}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e,t){var n,c={top:0,left:0};"fixed"===(0,s.default)(e,"position")?n=e.getBoundingClientRect():(t=t||(0,a.default)(e),n=(0,o.default)(e),"html"!==function(e){return e.nodeName&&e.nodeName.toLowerCase()}(t)&&(c=(0,o.default)(t)),c.top+=parseInt((0,s.default)(t,"borderTopWidth"),10)-(0,i.default)(t)||0,c.left+=parseInt((0,s.default)(t,"borderLeftWidth"),10)-(0,l.default)(t)||0);return r({},n,{top:n.top-c.top-(parseInt((0,s.default)(e,"marginTop"),10)||0),left:n.left-c.left-(parseInt((0,s.default)(e,"marginLeft"),10)||0)})};var o=c(n(117)),a=c(n(261)),i=c(n(118)),l=c(n(262)),s=c(n(37));function c(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,r.default)(e),n=e&&e.offsetParent;for(;n&&"html"!==i(e)&&"static"===(0,o.default)(n,"position");)n=n.offsetParent;return n||t.documentElement};var r=a(n(28)),o=a(n(37));function a(e){return e&&e.__esModule?e:{default:e}}function i(e){return e.nodeName&&e.nodeName.toLowerCase()}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,a.default)(e);if(void 0===t)return n?"pageXOffset"in n?n.pageXOffset:n.document.documentElement.scrollLeft:e.scrollLeft;n?n.scrollTo(t,"pageYOffset"in n?n.pageYOffset:n.document.documentElement.scrollTop):e.scrollLeft=t};var r,o=n(50),a=(r=o)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){"use strict";var r=n(3),o=n(1),a=n(9),i=n(2),l=n(29),s=n.n(l),c=n(0),u=n.n(c),f=n(5),p=n.n(f),d=n(11),h=n.n(d),m=n(13),b=(n.n(m),n(116)),v=n(8);function y(e,t){return Array.isArray(t)?t.indexOf(e)>=0:e===t}var g=p.a.oneOf(["click","hover","focus"]),O=Object(i.a)({},b.a.propTypes,{trigger:p.a.oneOfType([g,p.a.arrayOf(g)]),delay:p.a.number,delayShow:p.a.number,delayHide:p.a.number,defaultOverlayShown:p.a.bool,overlay:p.a.node.isRequired,onBlur:p.a.func,onClick:p.a.func,onFocus:p.a.func,onMouseOut:p.a.func,onMouseOver:p.a.func,target:p.a.oneOf([null]),onHide:p.a.oneOf([null]),show:p.a.oneOf([null])}),E=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleToggle=r.handleToggle.bind(Object(a.a)(r)),r.handleDelayedShow=r.handleDelayedShow.bind(Object(a.a)(r)),r.handleDelayedHide=r.handleDelayedHide.bind(Object(a.a)(r)),r.handleHide=r.handleHide.bind(Object(a.a)(r)),r.handleMouseOver=function(e){return r.handleMouseOverOut(r.handleDelayedShow,e,"fromElement")},r.handleMouseOut=function(e){return r.handleMouseOverOut(r.handleDelayedHide,e,"toElement")},r._mountNode=null,r.state={show:t.defaultOverlayShown},r}Object(o.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this._mountNode=document.createElement("div"),this.renderOverlay()},n.componentDidUpdate=function(){this.renderOverlay()},n.componentWillUnmount=function(){h.a.unmountComponentAtNode(this._mountNode),this._mountNode=null,clearTimeout(this._hoverShowDelay),clearTimeout(this._hoverHideDelay)},n.handleDelayedHide=function(){var e=this;if(null!=this._hoverShowDelay)return clearTimeout(this._hoverShowDelay),void(this._hoverShowDelay=null);if(this.state.show&&null==this._hoverHideDelay){var t=null!=this.props.delayHide?this.props.delayHide:this.props.delay;t?this._hoverHideDelay=setTimeout(function(){e._hoverHideDelay=null,e.hide()},t):this.hide()}},n.handleDelayedShow=function(){var e=this;if(null!=this._hoverHideDelay)return clearTimeout(this._hoverHideDelay),void(this._hoverHideDelay=null);if(!this.state.show&&null==this._hoverShowDelay){var t=null!=this.props.delayShow?this.props.delayShow:this.props.delay;t?this._hoverShowDelay=setTimeout(function(){e._hoverShowDelay=null,e.show()},t):this.show()}},n.handleHide=function(){this.hide()},n.handleMouseOverOut=function(e,t,n){var r=t.currentTarget,o=t.relatedTarget||t.nativeEvent[n];o&&o===r||s()(r,o)||e(t)},n.handleToggle=function(){this.state.show?this.hide():this.show()},n.hide=function(){this.setState({show:!1})},n.makeOverlay=function(e,t){return u.a.createElement(b.a,Object(i.a)({},t,{show:this.state.show,onHide:this.handleHide,target:this}),e)},n.show=function(){this.setState({show:!0})},n.renderOverlay=function(){h.a.unstable_renderSubtreeIntoContainer(this,this._overlay,this._mountNode)},n.render=function(){var e=this.props,t=e.trigger,n=e.overlay,o=e.children,a=e.onBlur,i=e.onClick,l=e.onFocus,s=e.onMouseOut,f=e.onMouseOver,p=Object(r.a)(e,["trigger","overlay","children","onBlur","onClick","onFocus","onMouseOut","onMouseOver"]);delete p.delay,delete p.delayShow,delete p.delayHide,delete p.defaultOverlayShown;var d=u.a.Children.only(o),h=d.props,m={};return this.state.show&&(m["aria-describedby"]=n.props.id),m.onClick=Object(v.a)(h.onClick,i),y("click",t)&&(m.onClick=Object(v.a)(m.onClick,this.handleToggle)),y("hover",t)&&(m.onMouseOver=Object(v.a)(h.onMouseOver,f,this.handleMouseOver),m.onMouseOut=Object(v.a)(h.onMouseOut,s,this.handleMouseOut)),y("focus",t)&&(m.onFocus=Object(v.a)(h.onFocus,l,this.handleDelayedShow),m.onBlur=Object(v.a)(h.onBlur,a,this.handleDelayedHide)),this._overlay=this.makeOverlay(n,p),Object(c.cloneElement)(d,m)},t}(u.a.Component);E.propTypes=O,E.defaultProps={defaultOverlayShown:!1,trigger:["hover","focus"]}},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(6),f=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,a=Object(o.a)(e,["className","children"]),i=Object(u.f)(a),s=i[0],f=i[1],p=Object(u.d)(s);return c.a.createElement("div",Object(r.a)({},f,{className:l()(t,p)}),c.a.createElement("h1",null,n))},t}(c.a.Component);Object(u.a)("page-header",f)},function(e,t,n){"use strict";var r=n(119);n(266).a.wrapper(r.a,"`<PageItem>`","`<Pager.Item>`")},function(e,t,n){"use strict";var r=n(1),o=n(13),a=(n.n(o),{});function i(e,t,n){var r;"object"===typeof e?r=e.message:(r=e+" is deprecated. Use "+t+" instead.",n&&(r+="\nYou can read more about it at "+n)),a[r]||(a[r]=!0)}i.wrapper=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.componentWillMount=function(){if(i.apply(void 0,n),e.prototype.componentWillMount){for(var t,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];(t=e.prototype.componentWillMount).call.apply(t,[this].concat(o))}},t}(e)},t.a=i},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(119),d=n(6),h=n(8),m=n(12),b={onSelect:f.a.func},v=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.onSelect,n=e.className,a=e.children,i=Object(o.a)(e,["onSelect","className","children"]),u=Object(d.f)(i),f=u[0],p=u[1],b=Object(d.d)(f);return c.a.createElement("ul",Object(r.a)({},p,{className:l()(n,b)}),m.a.map(a,function(e){return Object(s.cloneElement)(e,{onSelect:Object(h.a)(e.props.onSelect,t)})}))},t}(c.a.Component);v.propTypes=b,v.Item=p.a;Object(d.a)("pager",v)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(269),f=n(6),p=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,a=Object(o.a)(e,["className","children"]),i=Object(f.f)(a),s=i[0],u=i[1],p=Object(f.d)(s);return c.a.createElement("ul",Object(r.a)({},u,{className:l()(t,p)}),n)},t}(c.a.Component);Object(f.a)("pagination",p),p.First=u.b,p.Prev=u.e,p.Ellipsis=u.a,p.Item=u.f,p.Next=u.d,p.Last=u.c},function(e,t,n){"use strict";t.f=h,n.d(t,"b",function(){return b}),n.d(t,"e",function(){return v}),n.d(t,"a",function(){return y}),n.d(t,"d",function(){return g}),n.d(t,"c",function(){return O});var r=n(1),o=n(2),a=n(3),i=n(4),l=n.n(i),s=n(5),c=n.n(s),u=n(0),f=n.n(u),p=n(15),d={eventKey:c.a.any,className:c.a.string,onSelect:c.a.func,disabled:c.a.bool,active:c.a.bool,activeLabel:c.a.string.isRequired};function h(e){var t=e.active,n=e.disabled,r=e.className,i=e.style,s=e.activeLabel,c=e.children,u=Object(a.a)(e,["active","disabled","className","style","activeLabel","children"]),d=t||n?"span":p.a;return f.a.createElement("li",{style:i,className:l()(r,{active:t,disabled:n})},f.a.createElement(d,Object(o.a)({disabled:n},u),c,t&&f.a.createElement("span",{className:"sr-only"},s)))}function m(e,t,n){var i,s;return void 0===n&&(n=e),s=i=function(e){function i(){return e.apply(this,arguments)||this}return Object(r.a)(i,e),i.prototype.render=function(){var e=this.props,r=e.disabled,i=e.children,s=e.className,c=Object(a.a)(e,["disabled","children","className"]),u=r?"span":p.a;return f.a.createElement("li",Object(o.a)({"aria-label":n,className:l()(s,{disabled:r})},c),f.a.createElement(u,null,i||t))},i}(f.a.Component),i.displayName=e,i.propTypes={disabled:c.a.bool},s}h.propTypes=d,h.defaultProps={active:!1,disabled:!1,activeLabel:"(current)"};var b=m("First","\xab"),v=m("Prev","\u2039"),y=m("Ellipsis","\u2026","More"),g=m("Next","\u203a"),O=m("Last","\xbb")},function(e,t,n){"use strict";var r=n(79),o=n.n(r),a=n(27),i=n.n(a),l=n(2),s=n(9),c=n(1),u=n(4),f=n.n(u),p=n(5),d=n.n(p),h=n(0),m=n.n(h),b=n(22),v=n.n(b),y=n(13),g=(n.n(y),n(6)),O=n(10),E=n(271),x=n(272),C=n(274),w=n(275),_=n(121),j=n(120),T=Object.prototype.hasOwnProperty,N=function(e,t){return e?e+"--"+t:null},k={expanded:d.a.bool,onToggle:d.a.func,eventKey:d.a.any,id:d.a.string},S={$bs_panelGroup:d.a.shape({getId:d.a.func,activeKey:d.a.any,onToggle:d.a.func})},P={$bs_panel:d.a.shape({headingId:d.a.string,bodyId:d.a.string,bsClass:d.a.string,onToggle:d.a.func,expanded:d.a.bool})},M=function(e){function t(){for(var t,n,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t=n=e.call.apply(e,[this].concat(o))||this,n.handleToggle=function(e){var t=n.context.$bs_panelGroup,r=!n.getExpanded();t&&t.onToggle?t.onToggle(n.props.eventKey,r,e):n.props.onToggle(r,e)},t||Object(s.a)(n)}Object(c.a)(t,e);var n=t.prototype;return n.getChildContext=function(){var e,t=this.props,n=t.eventKey,r=t.id,o=null==n?r:n;if(null!==o){var a=this.context.$bs_panelGroup,i=a&&a.getId||N;e={headingId:i(o,"heading"),bodyId:i(o,"body")}}return{$bs_panel:Object(l.a)({},e,{bsClass:this.props.bsClass,expanded:this.getExpanded(),onToggle:this.handleToggle})}},n.getExpanded=function(){var e=this.context.$bs_panelGroup;return e&&T.call(e,"activeKey")?e.activeKey===this.props.eventKey:!!this.props.expanded},n.render=function(){var e=this.props,t=e.className,n=e.children,r=Object(g.g)(this.props,["onToggle","eventKey","expanded"]),o=r[0],a=r[1];return m.a.createElement("div",Object(l.a)({},a,{className:f()(t,Object(g.d)(o))}),n)},t}(m.a.Component);M.propTypes=k,M.contextTypes=S,M.childContextTypes=P;var R=v()(Object(g.a)("panel",Object(g.c)(i()(O.d).concat([O.e.DEFAULT,O.e.PRIMARY]),O.e.DEFAULT,M)),{expanded:"onToggle"});o()(R,{Heading:x.a,Title:C.a,Body:E.a,Footer:w.a,Toggle:_.a,Collapse:j.a})},function(e,t,n){"use strict";var r=n(2),o=n(1),a=n(5),i=n.n(a),l=n(0),s=n.n(l),c=n(4),u=n.n(c),f=n(6),p=n(120),d={collapsible:i.a.bool.isRequired},h={$bs_panel:i.a.shape({bsClass:i.a.string})},m=function(e){function t(){return e.apply(this,arguments)||this}return Object(o.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,o=e.collapsible,a=(this.context.$bs_panel||{}).bsClass,i=Object(f.g)(this.props,["collapsible"]),l=i[0],c=i[1];l.bsClass=a||l.bsClass;var d=s.a.createElement("div",Object(r.a)({},c,{className:u()(n,Object(f.e)(l,"body"))}),t);return o&&(d=s.a.createElement(p.a,null,d)),d},t}(s.a.Component);m.propTypes=d,m.defaultProps={collapsible:!1},m.contextTypes=h,t.a=Object(f.a)("panel",m)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(5),l=n.n(i),s=n(0),c=n.n(s),u=n(4),f=n.n(u),p=n(72),d=n.n(p),h=n(6),m={componentClass:d.a},b={$bs_panel:l.a.shape({headingId:l.a.string,bsClass:l.a.string})},v=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,a=e.componentClass,i=Object(o.a)(e,["children","className","componentClass"]),l=this.context.$bs_panel||{},s=l.headingId,u=l.bsClass,p=Object(h.f)(i),d=p[0],m=p[1];return d.bsClass=u||d.bsClass,s&&(m.role=m.role||"tab",m.id=s),c.a.createElement(a,Object(r.a)({},m,{className:f()(n,Object(h.e)(d,"heading"))}),t)},t}(c.a.Component);v.propTypes=m,v.defaultProps={componentClass:"div"},v.contextTypes=b,t.a=Object(h.a)("panel",v)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){function t(t,n,r,o,a,i){var l=o||"<<anonymous>>",s=i||r;if(null==n[r])return t?new Error("Required "+a+" `"+s+"` was not specified in `"+l+"`."):null;for(var c=arguments.length,u=Array(c>6?c-6:0),f=6;f<c;f++)u[f-6]=arguments[f];return e.apply(void 0,[n,r,l,a,s].concat(u))}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(5),c=n.n(s),u=n(0),f=n.n(u),p=n(72),d=n.n(p),h=n(6),m=n(121),b={componentClass:d.a,toggle:c.a.bool},v={$bs_panel:c.a.shape({bsClass:c.a.string})},y=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,a=e.toggle,i=e.componentClass,s=Object(o.a)(e,["children","className","toggle","componentClass"]),c=(this.context.$bs_panel||{}).bsClass,u=Object(h.f)(s),p=u[0],d=u[1];return p.bsClass=c||p.bsClass,a&&(t=f.a.createElement(m.a,null,t)),f.a.createElement(i,Object(r.a)({},d,{className:l()(n,Object(h.e)(p,"title"))}),t)},t}(f.a.Component);y.propTypes=b,y.defaultProps={componentClass:"div"},y.contextTypes=v,t.a=Object(h.a)("panel",y)},function(e,t,n){"use strict";var r=n(2),o=n(1),a=n(5),i=n.n(a),l=n(0),s=n.n(l),c=n(4),u=n.n(c),f=n(6),p={$bs_panel:i.a.shape({bsClass:i.a.string})},d=function(e){function t(){return e.apply(this,arguments)||this}return Object(o.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,o=(this.context.$bs_panel||{}).bsClass,a=Object(f.f)(this.props),i=a[0],l=a[1];return i.bsClass=o||i.bsClass,s.a.createElement("div",Object(r.a)({},l,{className:u()(n,Object(f.e)(i,"footer"))}),t)},t}(s.a.Component);d.contextTypes=p,t.a=Object(f.a)("panel",d)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(45),d=n.n(p),h=n(6),m={id:d()(f.a.oneOfType([f.a.string,f.a.number])),placement:f.a.oneOf(["top","right","bottom","left"]),positionTop:f.a.oneOfType([f.a.number,f.a.string]),positionLeft:f.a.oneOfType([f.a.number,f.a.string]),arrowOffsetTop:f.a.oneOfType([f.a.number,f.a.string]),arrowOffsetLeft:f.a.oneOfType([f.a.number,f.a.string]),title:f.a.node},b=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.placement,a=t.positionTop,i=t.positionLeft,s=t.arrowOffsetTop,u=t.arrowOffsetLeft,f=t.title,p=t.className,d=t.style,m=t.children,b=Object(o.a)(t,["placement","positionTop","positionLeft","arrowOffsetTop","arrowOffsetLeft","title","className","style","children"]),v=Object(h.f)(b),y=v[0],g=v[1],O=Object(r.a)({},Object(h.d)(y),((e={})[n]=!0,e)),E=Object(r.a)({display:"block",top:a,left:i},d),x={top:s,left:u};return c.a.createElement("div",Object(r.a)({},g,{role:"tooltip",className:l()(p,O),style:E}),c.a.createElement("div",{className:"arrow",style:x}),f&&c.a.createElement("h3",{className:Object(h.e)(y,"title")},f),c.a.createElement("div",{className:Object(h.e)(y,"content")},m))},t}(c.a.Component);b.propTypes=m,b.defaultProps={placement:"right"};Object(h.a)("popover",b)},function(e,t,n){"use strict";var r=n(27),o=n.n(r),a=n(2),i=n(3),l=n(1),s=n(4),c=n.n(s),u=n(0),f=n.n(u),p=n(5),d=n.n(p),h=n(6),m=n(10),b=n(12),v=1e3;var y={min:d.a.number,now:d.a.number,max:d.a.number,label:d.a.node,srOnly:d.a.bool,striped:d.a.bool,active:d.a.bool,children:function(e,t,n){var r=e[t];if(!r)return null;var o=null;return f.a.Children.forEach(r,function(e){if(!o){var t=f.a.createElement(g,null);if(e.type!==t.type){var r=f.a.isValidElement(e)?e.type.displayName||e.type.name||e.type:e;o=new Error("Children of "+n+" can contain only ProgressBar components. Found "+r+".")}}}),o},isChild:d.a.bool};var g=function(e){function t(){return e.apply(this,arguments)||this}Object(l.a)(t,e);var n=t.prototype;return n.renderProgressBar=function(e){var t,n=e.min,r=e.now,o=e.max,l=e.label,s=e.srOnly,u=e.striped,p=e.active,d=e.className,m=e.style,b=Object(i.a)(e,["min","now","max","label","srOnly","striped","active","className","style"]),y=Object(h.f)(b),g=y[0],O=y[1],E=Object(a.a)({},Object(h.d)(g),((t={active:p})[Object(h.e)(g,"striped")]=p||u,t));return f.a.createElement("div",Object(a.a)({},O,{role:"progressbar",className:c()(d,E),style:Object(a.a)({width:function(e,t,n){var r=(e-t)/(n-t)*100;return Math.round(r*v)/v}(r,n,o)+"%"},m),"aria-valuenow":r,"aria-valuemin":n,"aria-valuemax":o}),s?f.a.createElement("span",{className:"sr-only"},l):l)},n.render=function(){var e=this.props,t=e.isChild,n=Object(i.a)(e,["isChild"]);if(t)return this.renderProgressBar(n);var r=n.min,o=n.now,l=n.max,s=n.label,p=n.srOnly,d=n.striped,h=n.active,m=n.bsClass,v=n.bsStyle,y=n.className,g=n.children,O=Object(i.a)(n,["min","now","max","label","srOnly","striped","active","bsClass","bsStyle","className","children"]);return f.a.createElement("div",Object(a.a)({},O,{className:c()(y,"progress")}),g?b.a.map(g,function(e){return Object(u.cloneElement)(e,{isChild:!0})}):this.renderProgressBar({min:r,now:o,max:l,label:s,srOnly:p,striped:d,active:h,bsClass:m,bsStyle:v}))},t}(f.a.Component);g.propTypes=y,g.defaultProps={min:0,max:100,active:!1,isChild:!1,srOnly:!1,striped:!1};Object(h.a)("progress-bar",Object(h.c)(o()(m.d),g))},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(13),d=(n.n(p),n(6)),h={inline:f.a.bool,disabled:f.a.bool,title:f.a.string,validationState:f.a.oneOf(["success","warning","error",null]),inputRef:f.a.func},m=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.inline,n=e.disabled,a=e.validationState,i=e.inputRef,s=e.className,u=e.style,f=e.title,p=e.children,h=Object(o.a)(e,["inline","disabled","validationState","inputRef","className","style","title","children"]),m=Object(d.f)(h),b=m[0],v=m[1],y=c.a.createElement("input",Object(r.a)({},v,{ref:i,type:"radio",disabled:n}));if(t){var g,O=((g={})[Object(d.e)(b,"inline")]=!0,g.disabled=n,g);return c.a.createElement("label",{className:l()(s,O),style:u,title:f},y,p)}var E=Object(r.a)({},Object(d.d)(b),{disabled:n});return a&&(E["has-"+a]=!0),c.a.createElement("div",{className:l()(s,E),style:u},c.a.createElement("label",{title:f},y,p))},t}(c.a.Component);m.propTypes=h,m.defaultProps={inline:!1,disabled:!1,title:""};Object(d.a)("radio",m)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(13),d=(n.n(p),n(6)),h={children:f.a.element.isRequired,a16by9:f.a.bool,a4by3:f.a.bool},m=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.a16by9,a=t.a4by3,i=t.className,u=t.children,f=Object(o.a)(t,["a16by9","a4by3","className","children"]),p=Object(d.f)(f),h=p[0],m=p[1],b=Object(r.a)({},Object(d.d)(h),((e={})[Object(d.e)(h,"16by9")]=n,e[Object(d.e)(h,"4by3")]=a,e));return c.a.createElement("div",{className:l()(b)},Object(s.cloneElement)(u,Object(r.a)({},m,{className:l()(i,Object(d.e)(h,"item"))})))},t}(c.a.Component);m.propTypes=h,m.defaultProps={a16by9:!1,a4by3:!1};Object(d.a)("embed-responsive",m)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(7),f=n.n(u),p=n(6),d={componentClass:f.a},h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,a=Object(o.a)(e,["componentClass","className"]),i=Object(p.f)(a),s=i[0],u=i[1],f=Object(p.d)(s);return c.a.createElement(t,Object(r.a)({},u,{className:l()(n,f)}))},t}(c.a.Component);h.propTypes=d,h.defaultProps={componentClass:"div"};Object(p.a)("row",h)},function(e,t,n){"use strict";var r=n(3),o=n(1),a=n(2),i=n(0),l=n.n(i),s=n(5),c=n.n(s),u=n(36),f=n(44),p=n(282),d=n(46),h=Object(a.a)({},f.a.propTypes,{bsStyle:c.a.string,bsSize:c.a.string,href:c.a.string,onClick:c.a.func,title:c.a.node.isRequired,toggleLabel:c.a.string,children:c.a.node}),m=function(e){function t(){return e.apply(this,arguments)||this}return Object(o.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.bsSize,n=e.bsStyle,o=e.title,i=e.toggleLabel,s=e.children,c=Object(r.a)(e,["bsSize","bsStyle","title","toggleLabel","children"]),h=Object(d.a)(c,f.a.ControlledComponent),m=h[0],b=h[1];return l.a.createElement(f.a,Object(a.a)({},m,{bsSize:t,bsStyle:n}),l.a.createElement(u.a,Object(a.a)({},b,{disabled:c.disabled,bsSize:t,bsStyle:n}),o),l.a.createElement(p.a,{"aria-label":i||o,bsSize:t,bsStyle:n}),l.a.createElement(f.a.Menu,null,s))},t}(l.a.Component);m.propTypes=h,m.Toggle=p.a},function(e,t,n){"use strict";var r=n(2),o=n(1),a=n(0),i=n.n(a),l=n(101),s=function(e){function t(){return e.apply(this,arguments)||this}return Object(o.a)(t,e),t.prototype.render=function(){return i.a.createElement(l.a,Object(r.a)({},this.props,{useAnchor:!1,noCaret:!1}))},t}(i.a.Component);s.defaultProps=l.a.defaultProps,t.a=s},function(e,t,n){"use strict";var r=n(1),o=n(2),a=n(0),i=n.n(a),l=n(5),s=n.n(l),c=n(73),u=n(74),f=n(122),p=Object(o.a)({},f.a.propTypes,{disabled:s.a.bool,title:s.a.node,tabClassName:s.a.string}),d=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=Object(o.a)({},this.props);return delete e.title,delete e.disabled,delete e.tabClassName,i.a.createElement(f.a,e)},t}(i.a.Component);d.propTypes=p,d.Container=c.a,d.Content=u.a,d.Pane=f.a},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(6),d={striped:f.a.bool,bordered:f.a.bool,condensed:f.a.bool,hover:f.a.bool,responsive:f.a.bool},h=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.striped,a=t.bordered,i=t.condensed,s=t.hover,u=t.responsive,f=t.className,d=Object(o.a)(t,["striped","bordered","condensed","hover","responsive","className"]),h=Object(p.f)(d),m=h[0],b=h[1],v=Object(r.a)({},Object(p.d)(m),((e={})[Object(p.e)(m,"striped")]=n,e[Object(p.e)(m,"bordered")]=a,e[Object(p.e)(m,"condensed")]=i,e[Object(p.e)(m,"hover")]=s,e)),y=c.a.createElement("table",Object(r.a)({},b,{className:l()(f,v)}));return u?c.a.createElement("div",{className:Object(p.e)(m,"responsive")},y):y},t}(c.a.Component);h.propTypes=d,h.defaultProps={bordered:!1,condensed:!1,hover:!1,responsive:!1,striped:!1};Object(p.a)("table",h)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(0),l=n.n(i),s=n(5),c=n.n(s),u=n(45),f=n.n(u),p=n(22),d=n.n(p),h=n(7),m=n.n(h),b=n(113),v=n(115),y=n(73),g=n(74),O=n(6),E=n(12),x=y.a.ControlledComponent,C={activeKey:c.a.any,bsStyle:c.a.oneOf(["tabs","pills"]),animation:c.a.oneOfType([c.a.bool,m.a]),id:f()(c.a.oneOfType([c.a.string,c.a.number])),onSelect:c.a.func,mountOnEnter:c.a.bool,unmountOnExit:c.a.bool};var w=function(e){function t(){return e.apply(this,arguments)||this}Object(a.a)(t,e);var n=t.prototype;return n.renderTab=function(e){var t=e.props,n=t.title,r=t.eventKey,o=t.disabled,a=t.tabClassName;return null==n?null:l.a.createElement(v.a,{eventKey:r,disabled:o,className:a},n)},n.render=function(){var e=this.props,t=e.id,n=e.onSelect,a=e.animation,i=e.mountOnEnter,s=e.unmountOnExit,c=e.bsClass,u=e.className,f=e.style,p=e.children,d=e.activeKey,h=void 0===d?function(e){var t;return E.a.forEach(e,function(e){null==t&&(t=e.props.eventKey)}),t}(p):d,m=Object(o.a)(e,["id","onSelect","animation","mountOnEnter","unmountOnExit","bsClass","className","style","children","activeKey"]);return l.a.createElement(x,{id:t,activeKey:h,onSelect:n,className:u,style:f},l.a.createElement("div",null,l.a.createElement(b.a,Object(r.a)({},m,{role:"tablist"}),E.a.map(p,this.renderTab)),l.a.createElement(g.a,{bsClass:c,animation:a,mountOnEnter:i,unmountOnExit:s},p)))},t}(l.a.Component);w.propTypes=C,w.defaultProps={bsStyle:"tabs",animation:!0,mountOnEnter:!1,unmountOnExit:!1},Object(O.a)("tab",w);d()(w,{activeKey:"onSelect"})},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(15),d=n(6),h={src:f.a.string,alt:f.a.string,href:f.a.string,onError:f.a.func,onLoad:f.a.func},m=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.src,n=e.alt,a=e.onError,i=e.onLoad,s=e.className,u=e.children,f=Object(o.a)(e,["src","alt","onError","onLoad","className","children"]),h=Object(d.f)(f),m=h[0],b=h[1],v=b.href?p.a:"div",y=Object(d.d)(m);return c.a.createElement(v,Object(r.a)({},b,{className:l()(s,y)}),c.a.createElement("img",{src:t,alt:n,onError:a,onLoad:i}),u&&c.a.createElement("div",{className:"caption"},u))},t}(c.a.Component);m.propTypes=h;Object(d.a)("thumbnail",m)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(5),l=n.n(i),s=n(0),c=n.n(s),u=n(41),f=n.n(u),p=n(22),d=n.n(p),h=n(8),m=n(12),b=n(64),v=n(123),y={name:l.a.string,value:l.a.any,onChange:l.a.func,type:l.a.oneOf(["checkbox","radio"]).isRequired},g=function(e){function t(){return e.apply(this,arguments)||this}Object(a.a)(t,e);var n=t.prototype;return n.getValues=function(){var e=this.props.value;return null==e?[]:[].concat(e)},n.handleToggle=function(e){var t=this.props,n=t.type,r=t.onChange,o=this.getValues(),a=-1!==o.indexOf(e);"radio"!==n?r(a?o.filter(function(t){return t!==e}):o.concat([e])):a||r(e)},n.render=function(){var e=this,t=this.props,n=t.children,a=t.type,i=t.name,l=Object(o.a)(t,["children","type","name"]),s=this.getValues();return"radio"!==a||i||f()(!1),delete l.onChange,delete l.value,c.a.createElement(b.a,Object(r.a)({},l,{"data-toggle":"buttons"}),m.a.map(n,function(t){var n=t.props,r=n.value,o=n.onChange;return c.a.cloneElement(t,{type:a,name:t.name||i,checked:-1!==s.indexOf(r),onChange:Object(h.a)(o,function(){return e.handleToggle(r)})})}))},t}(c.a.Component);g.propTypes=y,g.defaultProps={type:"radio"};var O=d()(g,{value:"onChange"});O.Button=v.a},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(5),f=n.n(u),p=n(45),d=n.n(p),h=n(6),m={id:d()(f.a.oneOfType([f.a.string,f.a.number])),placement:f.a.oneOf(["top","right","bottom","left"]),positionTop:f.a.oneOfType([f.a.number,f.a.string]),positionLeft:f.a.oneOfType([f.a.number,f.a.string]),arrowOffsetTop:f.a.oneOfType([f.a.number,f.a.string]),arrowOffsetLeft:f.a.oneOfType([f.a.number,f.a.string])},b=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.placement,a=t.positionTop,i=t.positionLeft,s=t.arrowOffsetTop,u=t.arrowOffsetLeft,f=t.className,p=t.style,d=t.children,m=Object(o.a)(t,["placement","positionTop","positionLeft","arrowOffsetTop","arrowOffsetLeft","className","style","children"]),b=Object(h.f)(m),v=b[0],y=b[1],g=Object(r.a)({},Object(h.d)(v),((e={})[n]=!0,e)),O=Object(r.a)({top:a,left:i},p),E={top:s,left:u};return c.a.createElement("div",Object(r.a)({},y,{role:"tooltip",className:l()(f,g),style:O}),c.a.createElement("div",{className:Object(h.e)(v,"arrow"),style:E}),c.a.createElement("div",{className:Object(h.e)(v,"inner")},d))},t}(c.a.Component);b.propTypes=m,b.defaultProps={placement:"right"};Object(h.a)("tooltip",b)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(1),i=n(4),l=n.n(i),s=n(0),c=n.n(s),u=n(6),f=n(10),p=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=Object(o.a)(e,["className"]),a=Object(u.f)(n),i=a[0],s=a[1],f=Object(u.d)(i);return c.a.createElement("div",Object(r.a)({},s,{className:l()(t,f)}))},t}(c.a.Component);Object(u.a)("well",Object(u.b)([f.c.LARGE,f.c.SMALL],p))},function(e,t,n){"use strict";n(6),n(8),n(12)},function(e,t){}]); //# sourceMappingURL=main.1f83b92e.js.map
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. # # -*- encoding: utf-8 -*- """python_instance.py: Python Instance for running python functions """ import base64 import os import signal import time try: import Queue as queue except: import queue import threading import sys import re import pulsar import contextimpl import Function_pb2 import log import util import InstanceCommunication_pb2 from functools import partial from collections import namedtuple from function_stats import Stats Log = log.Log # Equivalent of the InstanceConfig in Java InstanceConfig = namedtuple('InstanceConfig', 'instance_id function_id function_version function_details max_buffered_tuples') # This is the message that the consumers put on the queue for the function thread to process InternalMessage = namedtuple('InternalMessage', 'message topic serde consumer') InternalQuitMessage = namedtuple('InternalQuitMessage', 'quit') DEFAULT_SERIALIZER = "serde.IdentitySerDe" PY3 = sys.version_info[0] >= 3 def base64ify(bytes_or_str): if PY3 and isinstance(bytes_or_str, str): input_bytes = bytes_or_str.encode('utf8') else: input_bytes = bytes_or_str output_bytes = base64.urlsafe_b64encode(input_bytes) if PY3: return output_bytes.decode('ascii') else: return output_bytes class PythonInstance(object): def __init__(self, instance_id, function_id, function_version, function_details, max_buffered_tuples, expected_healthcheck_interval, user_code, pulsar_client, secrets_provider, cluster_name): self.instance_config = InstanceConfig(instance_id, function_id, function_version, function_details, max_buffered_tuples) self.user_code = user_code self.queue = queue.Queue(max_buffered_tuples) self.log_topic_handler = None if function_details.logTopic is not None and function_details.logTopic != "": self.log_topic_handler = log.LogTopicHandler(str(function_details.logTopic), pulsar_client) self.pulsar_client = pulsar_client self.input_serdes = {} self.consumers = {} self.output_serde = None self.function_class = None self.function_purefunction = None self.producer = None self.execution_thread = None self.atmost_once = self.instance_config.function_details.processingGuarantees == Function_pb2.ProcessingGuarantees.Value('ATMOST_ONCE') self.atleast_once = self.instance_config.function_details.processingGuarantees == Function_pb2.ProcessingGuarantees.Value('ATLEAST_ONCE') self.auto_ack = self.instance_config.function_details.autoAck self.contextimpl = None self.last_health_check_ts = time.time() self.timeout_ms = function_details.source.timeoutMs if function_details.source.timeoutMs > 0 else None self.expected_healthcheck_interval = expected_healthcheck_interval self.secrets_provider = secrets_provider self.metrics_labels = [function_details.tenant, "%s/%s" % (function_details.tenant, function_details.namespace), function_details.name, instance_id, cluster_name, "%s/%s/%s" % (function_details.tenant, function_details.namespace, function_details.name)] self.stats = Stats(self.metrics_labels) def health_check(self): self.last_health_check_ts = time.time() health_check_result = InstanceCommunication_pb2.HealthCheckResult() health_check_result.success = True return health_check_result def process_spawner_health_check_timer(self): if time.time() - self.last_health_check_ts > self.expected_healthcheck_interval * 3: Log.critical("Haven't received health check from spawner in a while. Stopping instance...") os.kill(os.getpid(), signal.SIGKILL) sys.exit(1) def run(self): # Setup consumers and input deserializers mode = pulsar._pulsar.ConsumerType.Shared if self.instance_config.function_details.source.subscriptionType == Function_pb2.SubscriptionType.Value("FAILOVER"): mode = pulsar._pulsar.ConsumerType.Failover subscription_name = str(self.instance_config.function_details.tenant) + "/" + \ str(self.instance_config.function_details.namespace) + "/" + \ str(self.instance_config.function_details.name) properties = util.get_properties(util.getFullyQualifiedFunctionName( self.instance_config.function_details.tenant, self.instance_config.function_details.namespace, self.instance_config.function_details.name), self.instance_config.instance_id) for topic, serde in self.instance_config.function_details.source.topicsToSerDeClassName.items(): if not serde: serde_kclass = util.import_class(os.path.dirname(self.user_code), DEFAULT_SERIALIZER) else: serde_kclass = util.import_class(os.path.dirname(self.user_code), serde) self.input_serdes[topic] = serde_kclass() Log.debug("Setting up consumer for topic %s with subname %s" % (topic, subscription_name)) self.consumers[topic] = self.pulsar_client.subscribe( str(topic), subscription_name, consumer_type=mode, message_listener=partial(self.message_listener, self.input_serdes[topic]), unacked_messages_timeout_ms=int(self.timeout_ms) if self.timeout_ms else None, properties=properties ) for topic, consumer_conf in self.instance_config.function_details.source.inputSpecs.items(): if not consumer_conf.serdeClassName: serde_kclass = util.import_class(os.path.dirname(self.user_code), DEFAULT_SERIALIZER) else: serde_kclass = util.import_class(os.path.dirname(self.user_code), consumer_conf.serdeClassName) self.input_serdes[topic] = serde_kclass() Log.debug("Setting up consumer for topic %s with subname %s" % (topic, subscription_name)) if consumer_conf.isRegexPattern: self.consumers[topic] = self.pulsar_client.subscribe( re.compile(str(topic)), subscription_name, consumer_type=mode, message_listener=partial(self.message_listener, self.input_serdes[topic]), unacked_messages_timeout_ms=int(self.timeout_ms) if self.timeout_ms else None, properties=properties ) else: self.consumers[topic] = self.pulsar_client.subscribe( str(topic), subscription_name, consumer_type=mode, message_listener=partial(self.message_listener, self.input_serdes[topic]), unacked_messages_timeout_ms=int(self.timeout_ms) if self.timeout_ms else None, properties=properties ) function_kclass = util.import_class(os.path.dirname(self.user_code), self.instance_config.function_details.className) if function_kclass is None: Log.critical("Could not import User Function Module %s" % self.instance_config.function_details.className) raise NameError("Could not import User Function Module %s" % self.instance_config.function_details.className) try: self.function_class = function_kclass() except: self.function_purefunction = function_kclass self.contextimpl = contextimpl.ContextImpl(self.instance_config, Log, self.pulsar_client, self.user_code, self.consumers, self.secrets_provider, self.metrics_labels) # Now launch a thread that does execution self.execution_thread = threading.Thread(target=self.actual_execution) self.execution_thread.start() # start proccess spawner health check timer self.last_health_check_ts = time.time() if self.expected_healthcheck_interval > 0: timer = util.FixedTimer(self.expected_healthcheck_interval, self.process_spawner_health_check_timer, name="health-check-timer") timer.start() def actual_execution(self): Log.debug("Started Thread for executing the function") while True: try: msg = self.queue.get(True) if isinstance(msg, InternalQuitMessage): break Log.debug("Got a message from topic %s" % msg.topic) # deserialize message input_object = msg.serde.deserialize(msg.message.data()) # set current message in context self.contextimpl.set_current_message_context(msg.message, msg.topic) output_object = None self.saved_log_handler = None if self.log_topic_handler is not None: self.saved_log_handler = log.remove_all_handlers() log.add_handler(self.log_topic_handler) successfully_executed = False try: # get user function start time for statistic calculation self.stats.set_last_invocation(time.time()) # start timer for process time self.stats.process_time_start() if self.function_class is not None: output_object = self.function_class.process(input_object, self.contextimpl) else: output_object = self.function_purefunction.process(input_object) successfully_executed = True # stop timer for process time self.stats.process_time_end() except Exception as e: Log.exception("Exception while executing user method") self.stats.incr_total_user_exceptions(e) if self.log_topic_handler is not None: log.remove_all_handlers() log.add_handler(self.saved_log_handler) if successfully_executed: self.process_result(output_object, msg) self.stats.incr_total_processed_successfully() except Exception as e: Log.error("Uncaught exception in Python instance: %s" % e); self.stats.incr_total_sys_exceptions(e) def done_producing(self, consumer, orig_message, result, sent_message): if result == pulsar.Result.Ok and self.auto_ack and self.atleast_once: consumer.acknowledge(orig_message) def process_result(self, output, msg): if output is not None and self.instance_config.function_details.sink.topic != None and \ len(self.instance_config.function_details.sink.topic) > 0: if self.output_serde is None: self.setup_output_serde() if self.producer is None: self.setup_producer() # serialize function output output_bytes = self.output_serde.serialize(output) if output_bytes is not None: props = {"__pfn_input_topic__" : str(msg.topic), "__pfn_input_msg_id__" : base64ify(msg.message.message_id().serialize())} self.producer.send_async(output_bytes, partial(self.done_producing, msg.consumer, msg.message), properties=props) elif self.auto_ack and self.atleast_once: msg.consumer.acknowledge(msg.message) def setup_output_serde(self): if self.instance_config.function_details.sink.serDeClassName != None and \ len(self.instance_config.function_details.sink.serDeClassName) > 0: serde_kclass = util.import_class(os.path.dirname(self.user_code), self.instance_config.function_details.sink.serDeClassName) self.output_serde = serde_kclass() else: global DEFAULT_SERIALIZER serde_kclass = util.import_class(os.path.dirname(self.user_code), DEFAULT_SERIALIZER) self.output_serde = serde_kclass() def setup_producer(self): if self.instance_config.function_details.sink.topic != None and \ len(self.instance_config.function_details.sink.topic) > 0: Log.debug("Setting up producer for topic %s" % self.instance_config.function_details.sink.topic) self.producer = self.pulsar_client.create_producer( str(self.instance_config.function_details.sink.topic), block_if_queue_full=True, batching_enabled=True, batching_max_publish_delay_ms=1, # set send timeout to be infinity to prevent potential deadlock with consumer # that might happen when consumer is blocked due to unacked messages send_timeout_millis=0, max_pending_messages=100000, properties=util.get_properties(util.getFullyQualifiedFunctionName( self.instance_config.function_details.tenant, self.instance_config.function_details.namespace, self.instance_config.function_details.name), self.instance_config.instance_id) ) def message_listener(self, serde, consumer, message): # increment number of received records from source self.stats.incr_total_received() item = InternalMessage(message, message.topic_name(), serde, consumer) self.queue.put(item, True) if self.atmost_once and self.auto_ack: consumer.acknowledge(message) def get_and_reset_metrics(self): # First get any user metrics metrics = self.get_metrics() self.reset_metrics() return metrics def reset_metrics(self): self.stats.reset() self.contextimpl.reset_metrics() def get_metrics(self): total_received = self.stats.get_total_received() total_processed_successfully = self.stats.get_total_processed_successfully() total_user_exceptions = self.stats.get_total_user_exceptions() total_sys_exceptions = self.stats.get_total_sys_exceptions() avg_process_latency_ms = self.stats.get_avg_process_latency() last_invocation = self.stats.get_last_invocation() total_received_1min = self.stats.get_total_received_1min() total_processed_successfully_1min = self.stats.get_total_processed_successfully_1min() total_user_exceptions_1min = self.stats.get_total_user_exceptions_1min() total_sys_exceptions_1min = self.stats.get_total_sys_exceptions_1min() avg_process_latency_ms_1min = self.stats.get_avg_process_latency_1min() metrics_data = InstanceCommunication_pb2.MetricsData() # total metrics metrics_data.receivedTotal = int(total_received) if sys.version_info.major >= 3 else long(total_received) metrics_data.processedSuccessfullyTotal = int(total_processed_successfully) if sys.version_info.major >= 3 else long(total_processed_successfully) metrics_data.systemExceptionsTotal = int(total_sys_exceptions) if sys.version_info.major >= 3 else long(total_sys_exceptions) metrics_data.userExceptionsTotal = int(total_user_exceptions) if sys.version_info.major >= 3 else long(total_user_exceptions) metrics_data.avgProcessLatency = avg_process_latency_ms metrics_data.lastInvocation = int(last_invocation) if sys.version_info.major >= 3 else long(last_invocation) # 1min metrics metrics_data.receivedTotal_1min = int(total_received_1min) if sys.version_info.major >= 3 else long(total_received_1min) metrics_data.processedSuccessfullyTotal_1min = int( total_processed_successfully_1min) if sys.version_info.major >= 3 else long(total_processed_successfully_1min) metrics_data.systemExceptionsTotal_1min = int(total_sys_exceptions_1min) if sys.version_info.major >= 3 else long( total_sys_exceptions_1min) metrics_data.userExceptionsTotal_1min = int(total_user_exceptions_1min) if sys.version_info.major >= 3 else long( total_user_exceptions_1min) metrics_data.avgProcessLatency_1min = avg_process_latency_ms_1min # get any user metrics user_metrics = self.contextimpl.get_metrics() for metric_name, value in user_metrics.items(): metrics_data.userMetrics[metric_name] = value return metrics_data def add_system_metrics(self, metric_name, value, metrics): metrics.metrics[metric_name].count = value metrics.metrics[metric_name].sum = value metrics.metrics[metric_name].min = 0 metrics.metrics[metric_name].max = value def get_function_status(self): status = InstanceCommunication_pb2.FunctionStatus() status.running = True total_received = self.stats.get_total_received() total_processed_successfully = self.stats.get_total_processed_successfully() total_user_exceptions = self.stats.get_total_user_exceptions() total_sys_exceptions = self.stats.get_total_sys_exceptions() avg_process_latency_ms = self.stats.get_avg_process_latency() last_invocation = self.stats.get_last_invocation() status.numReceived = int(total_received) if sys.version_info.major >= 3 else long(total_received) status.numSuccessfullyProcessed = int(total_processed_successfully) if sys.version_info.major >= 3 else long(total_processed_successfully) status.numUserExceptions = int(total_user_exceptions) if sys.version_info.major >= 3 else long(total_user_exceptions) status.instanceId = self.instance_config.instance_id for ex, tm in self.stats.latest_user_exception: to_add = status.latestUserExceptions.add() to_add.exceptionString = ex to_add.msSinceEpoch = tm status.numSystemExceptions = int(total_sys_exceptions) if sys.version_info.major >= 3 else long(total_sys_exceptions) for ex, tm in self.stats.latest_sys_exception: to_add = status.latestSystemExceptions.add() to_add.exceptionString = ex to_add.msSinceEpoch = tm status.averageLatency = avg_process_latency_ms status.lastInvocationTime = int(last_invocation) if sys.version_info.major >= 3 else long(last_invocation) return status def join(self): self.queue.put(InternalQuitMessage(True), True) self.execution_thread.join() self.close() def close(self): Log.info("Closing python instance...") if self.producer: self.producer.close() if self.consumers: for consumer in self.consumers.values(): try: consumer.close() except: pass if self.pulsar_client: self.pulsar_client.close()
#! /usr/bin/env python """ Author: Jeremy M. Stober Program: FIND_DUPLICATES.PY Date: Thursday, November 1 2012 Description: Find duplicate images. """ import numpy as np duplicates = [] imgs = np.load("observations.npy") #imgs = np.load("imgs.npy") for (i,p) in enumerate(imgs): for (j,q) in enumerate(imgs[i:]): if i != j+i and np.allclose(p,q): print i,j+i duplicates.append((i,j+i)) import cPickle as pickle pickle.dump(duplicates, open("o_duplicates.pck","w"), pickle.HIGHEST_PROTOCOL)
export const fusePools = [ { id: 'fuse-bifi-maxi', logo: 'single-assets/BIFI.png', name: 'BIFI Maxi', token: 'BIFI', tokenDescription: 'Beefy.Finance', tokenAddress: '0x2bF9b864cdc97b08B6D79ad4663e71B8aB65c45c', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooFuseBIFI', earnedTokenAddress: '0x79149B500f0d796aA7f85e0170d16C7e79BAd3C5', earnContractAddress: '0x79149B500f0d796aA7f85e0170d16C7e79BAd3C5', pricePerFullShare: 1, tvl: 0, oracle: 'tokens', oracleId: 'BIFI', oraclePrice: 0, depositsPaused: false, status: 'active', platform: 'Beefy.Finance', assets: ['BIFI'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_NONE', 'MCAP_MEDIUM', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'Maxi', withdrawalFee: '0%', buyTokenUrl: 'https://app.fuse.fi/#/swap?inputCurrency=FUSE&outputCurrency=0x2bF9b864cdc97b08B6D79ad4663e71B8aB65c45c', createdAt: 1644690600, }, { id: 'voltage-wfuse-elon', name: 'ELON-FUSE LP', token: 'ELON-FUSE LP', tokenDescription: 'Voltage', tokenAddress: '0xe418c323fA450e7e18c4dB304bEFC7ffF92D2Cc1', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooVoltageFUSE-ELON', earnedTokenAddress: '0xa7224e31367069637A8C2cc0aa10B7A90D9343C1', earnContractAddress: '0xa7224e31367069637A8C2cc0aa10B7A90D9343C1', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltage-wfuse-elon', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: false, status: 'active', platform: 'Voltage', assets: ['ELON', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_HIGH', 'MCAP_MEDIUM', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app-v1.voltage.finance/#/add/FUSE/0x5DD8015cec49F4dB01fd228F688BF30337d3e0A9', buyTokenUrl: 'https://app.fuse.fi/#/swap?inputCurrency=FUSE&outputCurrency=0x5DD8015cec49F4dB01fd228F688BF30337d3e0A9', createdAt: 1644603605, }, { id: 'voltagev2-fusd-bnb', name: 'fUSD-BNB LP', token: 'fUSD-BNB LP', tokenDescription: 'Voltage', tokenAddress: '0x0dF48369504825C16D3FC6a74842aEf3c91E90E6', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooVoltagefUSD-BNB', earnedTokenAddress: '0x511Aa76E55D9DD024C799ea05149809147eF14dD', earnContractAddress: '0x511Aa76E55D9DD024C799ea05149809147eF14dD', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltagev2-fusd-bnb', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: false, status: 'active', platform: 'Voltage', assets: ['fUSD', 'BNB'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_HIGH', 'MCAP_MICRO', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.voltage.finance/index.html#/add/0x249BE57637D8B013Ad64785404b24aeBaE9B098B/0x6acb34b1Df86E254b544189Ec32Cf737e2482058', buyTokenUrl: 'https://app.voltage.finance/index.html#/swap?inputCurrency=0x249BE57637D8B013Ad64785404b24aeBaE9B098B&outputCurrency=0x6acb34b1Df86E254b544189Ec32Cf737e2482058', createdAt: 1647451620, }, { id: 'voltagev2-wbtc-weth', name: 'WBTC-WETH LP', token: 'WBTC-WETH LP', tokenDescription: 'Voltage', tokenAddress: '0x97F4F45F0172F2E20Ab284A61C8adcf5E4d04228', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooVoltageWBTC-WETH ', earnedTokenAddress: '0x6EA8ad7228eBcA6C686096269d60bb1C72D13fa8', earnContractAddress: '0x6EA8ad7228eBcA6C686096269d60bb1C72D13fa8', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltagev2-wbtc-weth', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: false, status: 'active', platform: 'Voltage', assets: ['WBTC', 'WETH'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_LOW', 'MCAP_LARGE', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.voltage.finance/index.html#/add/0x33284f95ccb7B948d9D352e1439561CF83d8d00d/0xa722c13135930332Eb3d749B2F0906559D2C5b99', buyTokenUrl: 'https://app.voltage.finance/index.html#/swap?inputCurrency=0x33284f95ccb7B948d9D352e1439561CF83d8d00d&outputCurrency=0xa722c13135930332Eb3d749B2F0906559D2C5b99', createdAt: 1647451320, }, { id: 'voltagev2-wfuse-weth', name: 'WETH-FUSE LP', token: 'WETH-FUSE LP', tokenDescription: 'Voltage', tokenAddress: '0x7Fe1A61E4FE983D275cb5669072A9d1dee9Bd45C', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooVoltageWFUSE-ETH', earnedTokenAddress: '0xDb852f7398f9Bdbf868ed4Dda2eb3B055e219B3c', earnContractAddress: '0xDb852f7398f9Bdbf868ed4Dda2eb3B055e219B3c', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltagev2-wfuse-weth', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: false, status: 'active', platform: 'Voltage', assets: ['WETH', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_HIGH', 'MCAP_SMALL', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.voltage.finance/index.html#/add/0x0BE9e53fd7EDaC9F859882AfdDa116645287C629/0xa722c13135930332Eb3d749B2F0906559D2C5b99', buyTokenUrl: 'https://app.voltage.finance/index.html#/swap?inputCurrency=0x0BE9e53fd7EDaC9F859882AfdDa116645287C629&outputCurrency=0xa722c13135930332Eb3d749B2F0906559D2C5b99', createdAt: 1647458875, }, { id: 'voltagev2-wfuse-busd', name: 'BUSD-FUSE LP', token: 'BUSD-FUSE LP', tokenDescription: 'Voltage', tokenAddress: '0x91520Fc2942Fd52949514f159aA4927b8850178d', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooVoltageWFUSE-BUSD', earnedTokenAddress: '0x3438aE2A02305f790Cbb00B44A176a6D33B90876', earnContractAddress: '0x3438aE2A02305f790Cbb00B44A176a6D33B90876', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltagev2-wfuse-busd', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: false, status: 'active', platform: 'Voltage', assets: ['BUSD', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_HIGH', 'MCAP_SMALL', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.voltage.finance/index.html#/add/0x0BE9e53fd7EDaC9F859882AfdDa116645287C629/0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5', buyTokenUrl: 'https://app.voltage.finance/index.html#/swap?inputCurrency=0x0BE9e53fd7EDaC9F859882AfdDa116645287C629&outputCurrency=0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5', createdAt: 1647505250, }, { id: 'voltagev2-wfuse-usdc', name: 'USDC-FUSE LP', token: 'USDC-FUSE FLP', tokenDescription: 'Voltage', tokenAddress: '0xc79983b0754ac688Bf54939aDd59BDF75916fDA2', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooVoltageWFUSE-USDC', earnedTokenAddress: '0x641Ec255eD35C7bf520745b6E40E6f3d989D0ff2', earnContractAddress: '0x641Ec255eD35C7bf520745b6E40E6f3d989D0ff2', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltagev2-wfuse-usdc', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: false, status: 'active', platform: 'Voltage', assets: ['USDC', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_HIGH', 'MCAP_SMALL', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.voltage.finance/index.html#/add/0x0BE9e53fd7EDaC9F859882AfdDa116645287C629/0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5', buyTokenUrl: 'https://app.voltage.finance/index.html#/swap?inputCurrency=0x0BE9e53fd7EDaC9F859882AfdDa116645287C629&outputCurrency=0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5', createdAt: 1647505440, }, { id: 'voltagev2-wfuse-fusd', name: 'fUSD-FUSE LP', token: 'fUSD-FUSE LP', tokenDescription: 'Voltage', tokenAddress: '0x933a10d094592EB3F2a26bCb366472eba8868A66', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooVoltageWFUSE-fUSD', earnedTokenAddress: '0x20624135bDde2e871d2e0A7A57D83B423501f691', earnContractAddress: '0x20624135bDde2e871d2e0A7A57D83B423501f691', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltagev2-wfuse-fusd', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: false, status: 'active', platform: 'Voltage', assets: ['fUSD', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_HIGH', 'MCAP_MICRO', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.voltage.finance/index.html#/add/0x0BE9e53fd7EDaC9F859882AfdDa116645287C629/0x249BE57637D8B013Ad64785404b24aeBaE9B098B', buyTokenUrl: 'https://app.voltage.finance/index.html#/swap?inputCurrency=0x0BE9e53fd7EDaC9F859882AfdDa116645287C629&outputCurrency=0x249BE57637D8B013Ad64785404b24aeBaE9B098B', createdAt: 1647505595, }, { id: 'voltagev2-wfuse-volt', name: 'VOLT-FUSE LP', token: 'VOLT-FUSE LP', tokenDescription: 'Voltage', tokenAddress: '0xA670b12F8485aa379e99cF097017785b6acA5968', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooVoltageWFUSE-VOLT', earnedTokenAddress: '0xa7F1E6C6D0E1470E13329bDa65b91E6235b4cC51', earnContractAddress: '0xa7F1E6C6D0E1470E13329bDa65b91E6235b4cC51', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltagev2-wfuse-volt', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: false, status: 'active', platform: 'Voltage', assets: ['VOLT', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_HIGH', 'MCAP_MICRO', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.voltage.finance/index.html#/add/0x0BE9e53fd7EDaC9F859882AfdDa116645287C629/0x34Ef2Cc892a88415e9f02b91BfA9c91fC0bE6bD4', buyTokenUrl: 'https://app.voltage.finance/index.html#/swap?inputCurrency=0x0BE9e53fd7EDaC9F859882AfdDa116645287C629&outputCurrency=0x34Ef2Cc892a88415e9f02b91BfA9c91fC0bE6bD4', createdAt: 1647365195, }, { id: 'voltagev2-fusd-volt', name: 'fUSD-VOLT LP', token: 'fUSD-VOLT LP', tokenDescription: 'Voltage', tokenAddress: '0x4E6b54f8dee787B16D8CdBA4f759342b19239C2c', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooVoltagefUSD-VOLT', earnedTokenAddress: '0x1592550E083286C35282E53732FDE11800A187E1', earnContractAddress: '0x1592550E083286C35282E53732FDE11800A187E1', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltagev2-fusd-volt', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: false, status: 'active', platform: 'Voltage', assets: ['fUSD', 'VOLT'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_HIGH', 'MCAP_MICRO', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.voltage.finance/index.html#/add/0x34Ef2Cc892a88415e9f02b91BfA9c91fC0bE6bD4/0x249BE57637D8B013Ad64785404b24aeBaE9B098B', buyTokenUrl: 'https://app.voltage.finance/index.html#/swap?inputCurrency=0x34Ef2Cc892a88415e9f02b91BfA9c91fC0bE6bD4&outputCurrency=0x249BE57637D8B013Ad64785404b24aeBaE9B098B', createdAt: 1647505730, }, { id: 'voltagev2-wfuse-atust', name: 'atUST-FUSE LP', token: 'atUST-FUSE LP', tokenDescription: 'Voltage', tokenAddress: '0xd729609735222F203fCe2e0Ed940ac749eaD839a', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooVoltageWFUSE-atUST', earnedTokenAddress: '0x775965D328FD46b51595E7d711c6B563CD4eFCF4', earnContractAddress: '0x775965D328FD46b51595E7d711c6B563CD4eFCF4', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltagev2-wfuse-atust', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: false, status: 'active', platform: 'Voltage', assets: ['UST', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_HIGH', 'MCAP_SMALL', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.voltage.finance/index.html#/add/0x0BE9e53fd7EDaC9F859882AfdDa116645287C629/0x0D58a44be3dCA0aB449965dcc2c46932547Fea2f', buyTokenUrl: 'https://app.voltage.finance/index.html#/swap?inputCurrency=0x0BE9e53fd7EDaC9F859882AfdDa116645287C629&outputCurrency=0x0D58a44be3dCA0aB449965dcc2c46932547Fea2f', createdAt: 1647365195, }, { id: 'voltagev2-volt-bnb', name: 'VOLT-BNB LP', token: 'VOLT-BNB LP', tokenDescription: 'Voltage', tokenAddress: '0x4Eb876bd1e8e4cd4594557890D52EE327BF1B7b2', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooVoltageVOLT-BNB', earnedTokenAddress: '0xbF56396EBc9F2Ad01e80a00642A4b80D0dcea27A', earnContractAddress: '0xbF56396EBc9F2Ad01e80a00642A4b80D0dcea27A', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltagev2-volt-bnb', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: false, status: 'active', platform: 'Voltage', assets: ['VOLT', 'BNB'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_HIGH', 'MCAP_MICRO', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.voltage.finance/index.html#/add/0x34Ef2Cc892a88415e9f02b91BfA9c91fC0bE6bD4/0x6acb34b1Df86E254b544189Ec32Cf737e2482058', buyTokenUrl: 'https://app.voltage.finance/index.html#/swap?inputCurrency=0x34Ef2Cc892a88415e9f02b91BfA9c91fC0bE6bD4&outputCurrency=0x6acb34b1Df86E254b544189Ec32Cf737e2482058', createdAt: 1647180880, }, { id: 'voltagev2-wfuse-gdollar', name: 'G$-FUSE LP', token: 'G$-FUSE LP', tokenDescription: 'Voltage', tokenAddress: '0xa02ed9Fe9e3351FE2cd1F588B23973C1542dCbCC', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooVoltageWFUSE-G$', earnedTokenAddress: '0x70c6AF9Dff8C19B3db576E5E199B22A883874f05', earnContractAddress: '0x70c6AF9Dff8C19B3db576E5E199B22A883874f05', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltagev2-wfuse-gdollar', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: false, status: 'active', platform: 'Voltage', assets: ['G', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_HIGH', 'MCAP_MICRO', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.voltage.finance/index.html#/add/0x0BE9e53fd7EDaC9F859882AfdDa116645287C629/0x495d133B938596C9984d462F007B676bDc57eCEC', buyTokenUrl: 'https://app.voltage.finance/index.html#/swap?inputCurrency=0x0BE9e53fd7EDaC9F859882AfdDa116645287C629&outputCurrency=0x495d133B938596C9984d462F007B676bDc57eCEC', createdAt: 1647365540, }, { id: 'voltage-wfuse-usdc-eol', name: 'USDC-FUSE LP', token: 'USDC-FUSE LP', tokenDescription: 'Voltage', tokenAddress: '0x9f17b1895633E855b8b1C1D0Ade9B3B72EB0590C', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooFuseFiUSDC-FUSE', earnedTokenAddress: '0x98d3913474fccEDeB63077237914be00202fB007', earnContractAddress: '0x98d3913474fccEDeB63077237914be00202fB007', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltage-wfuse-usdc', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: true, status: 'eol', retireReason: 'rewards', platform: 'Voltage', assets: ['USDC', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_LOW', 'MCAP_MEDIUM', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.fuse.fi/#/add/FUSE/0x620fd5fa44be6af63715ef4e65ddfa0387ad13f5', buyTokenUrl: 'https://app.fuse.fi/#/swap?inputCurrency=FUSE&outputCurrency=0x620fd5fa44be6af63715ef4e65ddfa0387ad13f5', createdAt: 1641409265, }, { id: 'voltage-wfuse-ust-eol', name: 'UST-FUSE LP', token: 'UST-FUSE LP', tokenDescription: 'Voltage', tokenAddress: '0x53B1B8Fb8bE9aA94076e6B29fb9D08bd9ced2D30', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooVoltageFUSE-UST', earnedTokenAddress: '0x99b36431E236267D4e8998383fFF6747950311c0', earnContractAddress: '0x99b36431E236267D4e8998383fFF6747950311c0', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltage-wfuse-ust', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: true, status: 'eol', retireReason: 'rewards', platform: 'Voltage', assets: ['UST', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_HIGH', 'MCAP_SMALL', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.fuse.fi/#/add/FUSE/0x0D58a44be3dCA0aB449965dcc2c46932547Fea2f', buyTokenUrl: 'https://app.fuse.fi/#/swap?inputCurrency=FUSE&outputCurrency=0x0D58a44be3dCA0aB449965dcc2c46932547Fea2f', createdAt: 1643810650, }, { id: 'voltage-luna-ust-eol', name: 'LUNA-UST LP', token: 'LUNA-UST LP', tokenDescription: 'Voltage', tokenAddress: '0x44cB3a602AE57b60A5dc808a44544Ab9ec8dDB36', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooVoltageLUNA-UST', earnedTokenAddress: '0x9814b2BDe7b2874C5124B0D6b8C741E81BcEE829', earnContractAddress: '0x9814b2BDe7b2874C5124B0D6b8C741E81BcEE829', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltage-luna-ust', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: true, status: 'eol', retireReason: 'rewards', platform: 'Voltage', assets: ['LUNA', 'UST'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_HIGH', 'MCAP_LARGE', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.fuse.fi/#/add/0x588e24DEd8f850b14BB2e62E9c50A7Cd5Ee13Da9/0x0D58a44be3dCA0aB449965dcc2c46932547Fea2f', buyTokenUrl: 'https://app.fuse.fi/#/swap?inputCurrency=0x0D58a44be3dCA0aB449965dcc2c46932547Fea2f&outputCurrency=0x588e24DEd8f850b14BB2e62E9c50A7Cd5Ee13Da9', createdAt: 1643819850, }, // { // id: 'sushi-sushi-weth', // name: 'SUSHI-WETH LP', // token: 'SUSHI-WETH LP', // tokenDescription: 'SushiSwap', // tokenAddress: '0xF9C63E6e21d65ba3Cb6B95790F559E8Da1B38764', // tokenDecimals: 18, // tokenDescriptionUrl: '#', // earnedToken: 'mooSushiSUSHI-WETH', // earnedTokenAddress: '0x202D9EA0AeAC4B30f9f4aABd084Fb8C1DE316840', // earnContractAddress: '0x202D9EA0AeAC4B30f9f4aABd084Fb8C1DE316840', // pricePerFullShare: 1, // tvl: 0, // oracle: 'lps', // oracleId: 'sushi-sushi-weth', // oraclePrice: 0, // withdrawalFee: '0%', // depositsPaused: true, // status: 'active', // platform: 'SushiSwap', // assets: ['SUSHI', 'WETH'], // risks: [ // 'COMPLEXITY_LOW', // 'BATTLE_TESTED', // 'IL_LOW', // 'MCAP_MEDIUM', // 'AUDIT', // 'CONTRACTS_VERIFIED', // ], // stratType: 'StratLP', // addLiquidityUrl: // 'https://app.sushi.com/add/0x90708b20ccc1eb95a4fa7c8b18fd2c22a0ff9e78/0xa722c13135930332Eb3d749B2F0906559D2C5b99', // buyTokenUrl: // 'https://app.sushi.com/swap?inputCurrency=0x90708b20ccc1eb95a4fa7c8b18fd2c22a0ff9e78&outputCurrency=0xa722c13135930332Eb3d749B2F0906559D2C5b99', // }, { id: 'sushi-wfuse-usdc', name: 'FUSE-USDC LP', token: 'FUSE-USDC LP', tokenDescription: 'SushiSwap', tokenAddress: '0xba9CA720e314F42E17E80991c1d0AFfE47387108', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooSushiFUSE-USDC', earnedTokenAddress: '0x87FFA2E1D232d5B98fd4366C311b568c022aE650', earnContractAddress: '0x87FFA2E1D232d5B98fd4366C311b568c022aE650', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'sushi-wfuse-usdc', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: false, status: 'active', platform: 'SushiSwap', assets: ['FUSE', 'USDC'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_LOW', 'MCAP_MEDIUM', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.sushi.com/add/0x0BE9e53fd7EDaC9F859882AfdDa116645287C629/0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5', buyTokenUrl: 'https://app.sushi.com/swap?inputCurrency=0x0BE9e53fd7EDaC9F859882AfdDa116645287C629&outputCurrency=0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5', createdAt: 1643485320, }, { id: 'sushi-wfuse-weth', name: 'WETH-FUSE LP', token: 'WETH-FUSE SLP', tokenDescription: 'SushiSwap', tokenAddress: '0x90c3bA00d2F7F15Cd9FDE087538be3A2865E7E2F', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooSushiFUSE-WETH', earnedTokenAddress: '0xd4E241053314254e62050aDC84B271F9d2164a16', earnContractAddress: '0xd4E241053314254e62050aDC84B271F9d2164a16', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'sushi-wfuse-weth', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: false, status: 'active', platform: 'SushiSwap', assets: ['WETH', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_LOW', 'MCAP_MEDIUM', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.sushi.com/add/0x0BE9e53fd7EDaC9F859882AfdDa116645287C629/0xa722c13135930332Eb3d749B2F0906559D2C5b99', buyTokenUrl: 'https://app.sushi.com/swap?inputCurrency=0x0BE9e53fd7EDaC9F859882AfdDa116645287C629&outputCurrency=0xa722c13135930332Eb3d749B2F0906559D2C5b99', createdAt: 1643414500, }, { id: 'fuse-fuse', logo: 'single-assets/FUSE.svg', name: 'FUSE', token: 'FUSE', tokenDescription: 'Beefy Delegator', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooFuse', earnedTokenAddress: '0x2C43DBef81ABa6b95799FD2aEc738Cd721ba77f3', earnContractAddress: '0x2C43DBef81ABa6b95799FD2aEc738Cd721ba77f3', pricePerFullShare: 1, tvl: 0, oracle: 'tokens', oracleId: 'WFUSE', oraclePrice: 0, depositsPaused: false, status: 'active', platform: 'Fuse', assets: ['WFUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_NONE', 'MCAP_LARGE', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'SingleStake', withdrawalFee: '0%', buyTokenUrl: 'https://app.fuse.fi/#/swap?inputCurrency=FUSE&outputCurrency=0xa722c13135930332Eb3d749B2F0906559D2C5b99', createdAt: 1641908745, }, { id: 'voltage-wfuse-weth-eol', name: 'WETH-FUSE LP', token: 'WETH-FUSE FLP', tokenDescription: 'Voltage', tokenAddress: '0x75e24462108E49B71278c93b49B35A5837c0547C', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooFuseFiWETH-FUSE', earnedTokenAddress: '0x7c7B7FbccA5699175003ecbe1B41E79F40385469', earnContractAddress: '0x7c7B7FbccA5699175003ecbe1B41E79F40385469', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltage-wfuse-weth', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: true, status: 'eol', retireReason: 'rewards', platform: 'Voltage', assets: ['WETH', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_LOW', 'MCAP_LARGE', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.fuse.fi/#/add/FUSE/0xa722c13135930332Eb3d749B2F0906559D2C5b99', buyTokenUrl: 'https://app.fuse.fi/#/swap?inputCurrency=FUSE&outputCurrency=0xa722c13135930332Eb3d749B2F0906559D2C5b99', createdAt: 1641410065, }, { id: 'voltage-wfuse-g$-eol', name: 'G$-FUSE LP', token: 'G$-FUSE FLP', tokenDescription: 'Voltage', tokenAddress: '0x8d441C2Ff54C015A1BE22ad88e5D42EFBEC6C7EF', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooFuseFiG$-FUSE', earnedTokenAddress: '0xa5aaE3a55cA356C62b5425AA4bFC212542B17777', earnContractAddress: '0xa5aaE3a55cA356C62b5425AA4bFC212542B17777', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltage-wfuse-g$', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: true, status: 'eol', platform: 'Voltage', retireReason: 'rewards', assets: ['G', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_LOW', 'MCAP_LARGE', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.fuse.fi/#/add/FUSE/0x495d133B938596C9984d462F007B676bDc57eCEC', buyTokenUrl: 'https://app.fuse.fi/#/swap?inputCurrency=FUSE&outputCurrency=0x495d133B938596C9984d462F007B676bDc57eCEC', createdAt: 1641411120, }, { id: 'voltage-fusd-bnb-eol', name: 'fUSD-BNB LP', token: 'fUSD-BNB FLP', tokenDescription: 'Voltage', tokenAddress: '0x123e18262642a090b209A9CdD5bC5DFA03d734D1', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooFuseFifUSD-BNB', earnedTokenAddress: '0x3dE0279f183f9C9eFCD19C60c1f83288B50dB659', earnContractAddress: '0x3dE0279f183f9C9eFCD19C60c1f83288B50dB659', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltage-fusd-bnb', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: true, status: 'eol', retireReason: 'rewards', platform: 'Voltage', assets: ['fUSD', 'BNB'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_LOW', 'MCAP_LARGE', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.fuse.fi/#/add/0x6acb34b1Df86E254b544189Ec32Cf737e2482058/0x249BE57637D8B013Ad64785404b24aeBaE9B098B', buyTokenUrl: 'https://app.fuse.fi/#/swap?inputCurrency=0x6acb34b1Df86E254b544189Ec32Cf737e2482058&outputCurrency=0x249BE57637D8B013Ad64785404b24aeBaE9B098B', createdAt: 1641410790, }, { id: 'voltage-wfuse-busd-eol', name: 'BUSD-FUSE LP', token: 'BUSD-FUSE FLP', tokenDescription: 'Voltage', tokenAddress: '0x2e7DeDEfC1b40eb2C935A5d07ACDb8F8a9B2A91D', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooFuseFiBUSD-FUSE', earnedTokenAddress: '0xF9eBb381dC153D0966B2BaEe776de2F400405755', earnContractAddress: '0xF9eBb381dC153D0966B2BaEe776de2F400405755', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltage-wfuse-busd', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: true, status: 'eol', retireReason: 'rewards', platform: 'Voltage', assets: ['BUSD', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_LOW', 'MCAP_LARGE', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.fuse.fi/#/add/FUSE/0x6a5F6A8121592BeCd6747a38d67451B310F7f156', buyTokenUrl: 'https://app.fuse.fi/#/swap?inputCurrency=FUSE&outputCurrency=0x6a5F6A8121592BeCd6747a38d67451B310F7f156', createdAt: 1641410975, }, { id: 'voltage-wfuse-fusd-eol', name: 'fUSD-FUSE LP', token: 'fUSD-FUSE FLP', tokenDescription: 'Voltage', tokenAddress: '0xcDd8964BA8963929867CAfFCf5942De4F085bFB7', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooFuseFifUSD-FUSE', earnedTokenAddress: '0x9712b6aff7d2dB96097565EB8b2183b75e839130', earnContractAddress: '0x9712b6aff7d2dB96097565EB8b2183b75e839130', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltage-wfuse-fusd', oraclePrice: 0, withdrawalFee: '0%', depositsPaused: true, status: 'eol', retireReason: 'rewards', platform: 'Voltage', assets: ['fUSD', 'FUSE'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_LOW', 'MCAP_LARGE', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.fuse.fi/#/add/FUSE/0x249BE57637D8B013Ad64785404b24aeBaE9B098B', buyTokenUrl: 'https://app.fuse.fi/#/swap?inputCurrency=FUSE&outputCurrency=0x249BE57637D8B013Ad64785404b24aeBaE9B098B', createdAt: 1641410460, }, { id: 'voltage-wbtc-weth-eol', name: 'WETH-WBTC LP', token: 'WETH-WBTC LP', tokenDescription: 'Voltage', tokenAddress: '0x79FB917292f841Ab64941C04aCDf5F9059aa24E7', tokenDecimals: 18, tokenDescriptionUrl: '#', earnedToken: 'mooFuseFiWETH-WBTC', earnedTokenAddress: '0x8d81807F19b97FA86EecaB32F1376645FBB4d2F9', earnContractAddress: '0x8d81807F19b97FA86EecaB32F1376645FBB4d2F9', pricePerFullShare: 1, tvl: 0, oracle: 'lps', oracleId: 'voltage-wbtc-weth', oraclePrice: 0, withdrawalFee: '0.01%', depositsPaused: true, status: 'eol', retireReason: 'rewards', platform: 'Voltage', assets: ['WETH', 'WBTC'], risks: [ 'COMPLEXITY_LOW', 'BATTLE_TESTED', 'IL_LOW', 'MCAP_LARGE', 'AUDIT', 'CONTRACTS_VERIFIED', ], stratType: 'StratLP', addLiquidityUrl: 'https://app.fuse.fi/#/add/0x33284f95ccb7B948d9D352e1439561CF83d8d00d/0xa722c13135930332Eb3d749B2F0906559D2C5b99', buyTokenUrl: 'https://app.fuse.fi/#/swap?inputCurrency=0x33284f95ccb7B948d9D352e1439561CF83d8d00d&outputCurrency=0xa722c13135930332Eb3d749B2F0906559D2C5b99', createdAt: 1641410240, }, ];
// map api response into our custom format export const userMapper = user => ({ id: user.id, avatar: user.avatar, email: user.email, nickname: user.nickname, firstName: user.first_name, lastName: user.last_name, }); export const emptyUser = () => ({ id: null, avatar: null, email: '', nickname: '', firstName: '', lastName: '', }); export const likeMapper = like => ({ userId: like.user_id }); export const commentMapper = comment => ({ id: comment.id, body: comment.body, imageUrl: comment.image_url, authorId: comment.author_id, tweetId: comment.tweet_id, created: comment.created_at, updated: comment.updated_at, author: userMapper(comment.author), // commentsCount: comment.comments_count, likesCount: comment.likes_count, likes: comment.likes.map(likeMapper), }); export const tweetMapper = tweet => ({ id: tweet.id, text: tweet.text, imageUrl: tweet.image_url, created: tweet.created_at, author: userMapper(tweet.author), commentsCount: tweet.comments_count, likesCount: tweet.likes_count, likes: tweet.likes.map(likeMapper), });
import React from 'react' class Bold extends React.Component { render(){ return ( <span className='bold'> {this.props.children} </span> ) } } export default Bold
import React, { Component } from "react"; import { StyleSheet, Text, View, TextInput, ScrollView, Keyboard, BackHandler, TouchableOpacity, Image } from "react-native"; import { appThemeColor } from "../../AppGlobalConfig"; import Dimensions from "Dimensions"; const sendBtnIcon = require("../../Images/send-message.png"); const sendBtnIconDisabled = require("../../Images/send-message-disabled.png"); const DEVICE_WIDTH = Dimensions.get("window").width; const DEVICE_HEIGHT = Dimensions.get("window").height; const MARGIN = 40; var { height, width } = Dimensions.get("window"); var _keyboardWillShowSubscription; var _keyboardWillHideSubscription; height = height - 80; export default class ChatScreen extends Component { constructor(props) { super(props); this.state = { isLoading: false, smartAssitantTyping: false, height: height, chatMessages: [], welcomeMessage: true, msgText: "" }; console.ignoredYellowBox = ["Setting a timer"]; this._handleBackButton = this._handleBackButton.bind(this); this._onClickSendBtn = this._onClickSendBtn.bind(this); } componentDidMount() { BackHandler.addEventListener("hardwareBackPress", this._handleBackButton); _keyboardWillShowSubscription = Keyboard.addListener("keyboardDidShow", e => this._keyboardWillShow(e) ); _keyboardWillHideSubscription = Keyboard.addListener("keyboardDidHide", e => this._keyboardWillHide(e) ); } _keyboardWillShow(e) { this.setState({ height: height - e.endCoordinates.height }); } _keyboardWillHide(e) { this.setState({ height: height }); } componentWillUnmount() { _keyboardWillShowSubscription.remove(); _keyboardWillHideSubscription.remove(); BackHandler.removeEventListener( "hardwareBackPress", this._handleBackButton ); // this.props.navigation.navigate("drawerStack"); } _handleBackButton() { if (this.state.isLoading) { return true; } this.props.navigation.navigate("drawerStack"); return true; } _onClickSendBtn() { if (this.state.msgText.trim() == "") return; Keyboard.dismiss(); this.textInput.clear(); let tempMsgs = this.state.chatMessages; tempMsgs.push({ msgType: "s", msg: this.state.msgText }); this.setState({ chatMessages: tempMsgs, smartAssitantTyping: true, welcomeMessage: false }); // Make the REST API call here to send the input to the server and get the messages from the server setTimeout(_ => { let msgSet = [ { id: "gm", msg: "Please provide alternate keywords." }, { id: "hi", msg: "Hello, How may I help you?" }, { id: "hello", msg: "Hello, How may I help you?" }, { id: "hey", msg: "Hello, How may I help you?" }, { id: "hola", msg: "Hello, How may I help you?" }, { id: "fever", msg: "Please provide with basic details." }, { id: "long", msg: "This is a long message printed just to test the behaviour or the interface how it would look if the user types longs message or the result of a query is longer than usual!!" } ]; let msgTxtIdx = msgSet.findIndex(m => m.id == this.state.msgText); msgTxtIdx = msgTxtIdx == -1 ? 0 : msgTxtIdx; let tempMsgs = this.state.chatMessages; tempMsgs.push({ msgType: "r", msg: msgSet[msgTxtIdx].msg }); this.setState({ msgText: "", chatMessages: tempMsgs, smartAssitantTyping: false }); }, 3000); } render() { return ( <View style={{ height: this.state.height, backgroundColor: "white" }}> {this.state.chatMessages.length == 0 ? ( <View style={styles.welcomeView}> <Text style={{ fontSize: 28, textAlign: "center" }}> Welcome to EzDoc Smart Assistant </Text> </View> ) : ( <ScrollView style={styles.scrollView}> <View> {this.state.chatMessages.map((prop, key) => { return ( <View key={key} style={ prop.msgType == "s" ? { flexDirection: "row", alignSelf: "flex-end" } : { flexDirection: "row", alignSelf: "flex-start" } } > <View style={ prop.msgType == "s" ? styles.sentMsg : styles.receivedMsg } > <Text>{prop.msg}</Text> </View> </View> ); })} </View> </ScrollView> )} <View style={{ marginHorizontal: 10 }}> {this.state.smartAssitantTyping ? ( <Text style={{ color: appThemeColor.textColorTheme }}> {" "} Smart Assistant is typing.... </Text> ) : null} </View> <View style={styles.ipWrapper}> <TextInput ref={input => { this.textInput = input; }} style={styles.input} placeholder="Type your message here...." returnKeyLabel={"next"} onChangeText={text => this.setState({ msgText: text })} /> <TouchableOpacity onPress={this._onClickSendBtn.bind(this)}> {this.state.msgText != "" ? ( <Image source={sendBtnIcon} style={{ height: 30, width: 30 }} /> ) : ( <Image source={sendBtnIconDisabled} style={{ height: 30, width: 30 }} /> )} </TouchableOpacity> </View> </View> ); } } const styles = StyleSheet.create({ receivedMsg: { padding: 10, maxWidth: DEVICE_WIDTH - 80, backgroundColor: "#BEFEEB", marginHorizontal: 15, marginVertical: 5, borderRadius: 5 }, sentMsg: { backgroundColor: "#FBD8FF", marginVertical: 5, padding: 10, maxWidth: DEVICE_WIDTH - 80, justifyContent: "flex-end", marginHorizontal: 15, borderRadius: 5 }, actionbtn: { marginTop: 20 }, container: { alignItems: "center", justifyContent: "center", flexDirection: "row" }, button: { alignItems: "center", justifyContent: "center", backgroundColor: appThemeColor.btnBgColor, height: MARGIN, borderRadius: 4, zIndex: 100, width: DEVICE_WIDTH - 40 }, circle: { height: MARGIN, width: MARGIN, marginTop: -MARGIN, borderWidth: 1, borderColor: appThemeColor.color, borderRadius: 100, zIndex: 99, backgroundColor: appThemeColor.color }, text: { color: appThemeColor.btnTextColor }, input: { width: DEVICE_WIDTH - 55, height: 40, marginHorizontal: 10, paddingLeft: 10, borderRadius: 4, color: appThemeColor.color, backgroundColor: appThemeColor.ipBgColor }, ipWrapper: { height: 40, backgroundColor: appThemeColor.color, marginVertical: 5, flexDirection: "row", alignItems: "center" }, scrollView: { height: DEVICE_HEIGHT - 100, backgroundColor: appThemeColor.screenBgColor }, welcomeView: { flex: 1, flexDirection: "row", justifyContent: "center", alignItems: "center", height: DEVICE_HEIGHT - 100 }, roleView: { marginTop: 10, marginHorizontal: 20, paddingLeft: 20, paddingTop: 5, paddingBottom: 5, borderRadius: 4, backgroundColor: appThemeColor.ipBgColor, width: DEVICE_WIDTH - 40 }, roleTextHeader: { color: appThemeColor.textColorWhite, paddingTop: 5, paddingBottom: 5, flex: 1, alignItems: "center", flexDirection: "row", justifyContent: "center" }, roleText: { color: appThemeColor.textColorWhite, paddingLeft: 10 }, radioOuter: { height: 24, width: 24, borderRadius: 12, borderWidth: 2, borderColor: "#9eacb4", alignItems: "center", justifyContent: "center" }, radioInner: { height: 12, width: 12, borderRadius: 6, backgroundColor: "#ffffff" }, radioLabel: { color: "white", paddingLeft: 5 } });
'use strict'; /* ------------------------------------------------------------------------------------------------ CHALLENGE 1 - Review Write a function that finds maximum value in an array using the 'reduce' method. E.g. [4,2,7,5,9,2] -> 9 ------------------------------------------------------------------------------------------------ */ const maxInArray = (arr) => { // Solution code here... return arr.reduce((num1,num2)=>{ return num1 > num2 ? num1 : num2; }); }; /* ------------------------------------------------------------------------------------------------ CHALLENGE 2 Write a function named findMax that takes in a matrix of positive numbers and returns the number with the highest value. For example: [ [1, 3, 4, 5], [4, 5, 6], [23, 5, 5] ] return: 23 ------------------------------------------------------------------------------------------------ */ const findMax = (matrix) => { // Solution code here... var array = matrix.map(function (arr){ return arr.reduce(function (num1, num2) { return (num2 > num1) ? num2 : num1; }, 0); }); return array.reduce(function (num1, num2){ return (num2 > num1) ? num2 : num1; }, 0); }; /* ------------------------------------------------------------------------------------------------ CHALLENGE 3 Write a function named totalSum that takes in a matrix of numbers and returns the totalSum of all the numbers. For example: [ [1, 3, 4, 5], [4, 5, 1], [2, 5, 5] ] return: 35 ------------------------------------------------------------------------------------------------ */ const totalSum = (matrix) => { // Solution code here... var array = matrix.map(function (arr){ return arr.reduce(function (num1, num2) { return num1+num2; }, 0); }); return array.reduce(function (num1, num2) { return num1+num2; }, 0); }; /* ------------------------------------------------------------------------------------------------ CHALLENGE 4 You friend Pat has a chain of stores around the greater Seattle area. He specializes in selling salmon cookies. Pat has data for the hourly sales of cookies per hour for each store. He wants to create an array of the total number of cookies sold per hour for all of his stores combined. Write a function named grandTotal that adds up the cookies sales for each hour of operation for all of the stores combined. For example, the first element in the hourlySales array should be the sum of the cookies sold in the 9:00 a.m. hour at all five stores combined. For this example, the total at 9:00 a.m. is 17 + 26 + 7 + 5 + 33, or 88 total cookies. Return the array of the total number of cookies sold per hour for all of the stores combined. ------------------------------------------------------------------------------------------------ */ const hoursOpen = ['9 a.m.', '10 a.m.', '11 a.m.', '12 p.m.', '1 p.m.', '2 p.m.', '3 p.m.', '4 p.m.', '5 p.m.', '6 p.m.', '7 p.m.', '8 p.m.']; const firstPike = [17, 18, 23, 24, 24, 12, 13, 27, 30, 20, 24, 18]; const seaTac = [26, 5, 5, 59, 23, 39, 38, 20, 30, 7, 59, 43]; const seattleCenter = [7, 14, 19, 22, 15, 4, 23, 27, 28, 23, 1, 29]; const capHill = [5, 85, 58, 51, 50, 13, 33, 32, 47, 94, 31, 62]; const alkiBeach = [33, 31, 147, 130, 27, 93, 38, 126, 141, 63, 46, 17]; const cookieStores = [firstPike, seaTac, seattleCenter, capHill, alkiBeach]; const grandTotal = (stores) => { // Solution code here... var arr = [0,0,0,0,0,0,0,0,0,0,0,0]; for(let i=0;i<hoursOpen.length; i++){ for (let j =0; j<stores.length;j++){ arr[i] += stores[j][i]; } } return arr; } /* ------------------------------------------------------------------------------------------------ CHALLENGE 5 Pat has decided that he would also like to organize his data as objects containing the number of cookies sold per hour and the time. Here is sample data for the 9:00 sales: { sales: '88 cookies', time: '9 a.m.' }. Write a function named salesData that uses forEach to iterate over the hourlySales array and create an object for each hour. Return an array of the formatted data. ------------------------------------------------------------------------------------------------ */ const salesData = (hours, data) => { // Solution code here... let arr = []; let index =0; data.forEach(element => { let salesObj={}; salesObj.sales = element + ' cookies'; salesObj.time = hours[index]; arr.push(salesObj); index++; }); return arr; }; /* ------------------------------------------------------------------------------------------------ CHALLENGE 6 Write a function named howManyTreats that will return the quantity of treats you need to pick up from the pet store today from this array. ------------------------------------------------------------------------------------------------ */ const errands = [ { store: 'Grocery store', items: [{ name: 'Eggs', quantity: 12 }, { name: 'Milk', quantity: 1 }, { name: 'Apples', quantity: 3 }] }, { store: 'Drug store', items: [{ name: 'Toothpaste', quantity: 1 }, { name: 'Toothbrush', quantity: 3 }, { name: 'Mouthwash', quantity: 1 }] }, { store: 'Pet store', items: [{ name: 'Cans of food', quantity: 8 }, { name: 'Treats', quantity: 24 }, { name: 'Leash', quantity: 1 }] } ]; const howManyTreats = (arr) => { // Solution code here... return arr[2].items[1].quantity; }; /* ------------------------------------------------------------------------------------------------ CHALLENGE 7 - Stretch Goal Write a function named battleship that accepts a 2D array and two numbers: a row coordinate and a column coordinate. Return "hit" or "miss" depending on if there's part of a boat at that position in the array. Assume the array has only one of two values at each index. '#' for part of a boat, or ' ' for open water. Here is a sample board: [ ['#', ' ', '#', ' '], ['#', ' ', '#', ' '], ['#', ' ', ' ', ' '], [' ', ' ', '#', '#'], ] The top row of the board is considered row zero and row numbers increase as they go down. ------------------------------------------------------------------------------------------------ */ const battleship = (board, row, col) => { // Solution code here... }; /* ------------------------------------------------------------------------------------------------ CHALLENGE 8 - Stretch Goal Write a function named calculateProduct that takes in a two-dimensional array of numbers, multiplies all of the numbers in each array, and returns the final product. This function should work for any number of inner arrays. For example, the following input returns a product of 720: [[1,2], [3,4], [5,6]] ------------------------------------------------------------------------------------------------ */ const calculateProduct = (numbers) => { // Solution code here... }; /* ------------------------------------------------------------------------------------------------ CHALLENGE 9 - Stretch Goal Write a function named averageDailyTemperature that accepts a two-dimensional array representing average daily temperatures grouped week-by-week. Calculate the average daily temperature during that entire period. Your output should be a single number. Write your function so it could accept an array with any number of weeks given to it. ------------------------------------------------------------------------------------------------ */ // Real daily average temperatures for Seattle, October 1-28 2017 const weeklyTemperatures = [ [66, 64, 58, 65, 71, 57, 60], [57, 65, 65, 70, 72, 65, 51], [55, 54, 60, 53, 59, 57, 61], [65, 56, 55, 52, 55, 62, 57], ]; const averageDailyTemperature = (weather) => { // Solution code here... }; /* ------------------------------------------------------------------------------------------------ CHALLENGE 10 - Stretch Goal Write a function named lowestWeeklyAverage that accepts a two-dimensional array of daily temperatures grouped week-by-week. Calculate the average temperature for each week and return the value of the lowest weekly average temperature. For example, in the data set below, the lowest weekly average is 46, which is the average of the temperatures in week 2. All other weeks have average temperatures that are greater than 46. ------------------------------------------------------------------------------------------------ */ let lowestWeeklyTemperatureData = [ [33, 64, 58, 65, 71, 57, 60], [40, 45, 33, 53, 44, 59, 48], [55, 54, 60, 53, 59, 57, 61], [65, 56, 55, 52, 55, 62, 57], ]; const lowestWeeklyAverage = (weather) => { // Solution code here... }; /* ------------------------------------------------------------------------------------------------ CHALLENGE 11 - Stretch Goal Write a function called excel that accepts a string representing rows and columns in a table. Rows are seperated by newline "\n" characters. Columns are seperated by commas. For example, '1,1,1\n4,4,4\n9,9,9' represents a 3x3 table. The function should parse the string as rows and columns and compute the sum of the values for each row. Return an array with the sum of the values in each row. For example, excel('1,1,1\n4,4,4\n9,9,9') returns [3, 12, 27]. ------------------------------------------------------------------------------------------------ */ const excel = (str) => { // Solution code here... }; /* ------------------------------------------------------------------------------------------------ TESTS All the code below will verify that your functions are working to solve the challenges. DO NOT CHANGE any of the below code. Run your tests from the console: jest challenge-12.test.js ------------------------------------------------------------------------------------------------ */ describe('Testing challenge 1', () => { test('It should return the maximum number found', () => { expect(maxInArray([4, 2, 7, 5, 9, 2])).toStrictEqual(9); }); test('It should handle negatives and return the maximum number found', () => { expect(maxInArray([4, -2, -7, 5, -9, 2])).toStrictEqual(5); }); }); describe('Testing challenge 2', () => { test('It should return the max value', () => { expect(findMax([[13,24,24,2], [2,5,6], [2,3]])).toStrictEqual(24); }); }); describe('Testing challenge 3', () => { test('It should return the total sum', () => { expect(totalSum([[13,24,24,2], [2,5,6], [2,3]])).toStrictEqual(81); expect(totalSum([])).toStrictEqual(0); }); }); describe('Testing challenge 4', () => { test('It should add the hourly totals array', () => { expect(grandTotal(cookieStores)).toStrictEqual([88, 153, 252, 286, 139, 161, 145, 232, 276, 207, 161, 169]); }); }); describe('Testing challenge 5', () => { test('It should create an object of data for each store', () => { expect(salesData(hoursOpen, grandTotal(cookieStores))).toStrictEqual([ { sales: '88 cookies', time: '9 a.m.' }, { sales: '153 cookies', time: '10 a.m.' }, { sales: '252 cookies', time: '11 a.m.' }, { sales: '286 cookies', time: '12 p.m.' }, { sales: '139 cookies', time: '1 p.m.' }, { sales: '161 cookies', time: '2 p.m.' }, { sales: '145 cookies', time: '3 p.m.' }, { sales: '232 cookies', time: '4 p.m.' }, { sales: '276 cookies', time: '5 p.m.' }, { sales: '207 cookies', time: '6 p.m.' }, { sales: '161 cookies', time: '7 p.m.' }, { sales: '169 cookies', time: '8 p.m.' } ]); expect(salesData(hoursOpen, grandTotal(cookieStores)).length).toStrictEqual(hoursOpen.length); }); }); describe('Testing challenge 6', () => { test('It should return the number 24', () => { expect(howManyTreats(errands)).toStrictEqual(24); }); }); xdescribe('Testing challenge 7', () => { const battleshipData = [ ['#', ' ', '#', ' '], ['#', ' ', '#', ' '], ['#', ' ', ' ', ' '], [' ', ' ', '#', '#'], ]; test('It should return "hit" when it hits a boat', () => { expect(battleship(battleshipData, 0, 0)).toStrictEqual('hit'); expect(battleship(battleshipData, 1, 0)).toStrictEqual('hit'); }); test('It should return "miss" when it doesn\'t hit a boat', () => { expect(battleship(battleshipData, 0, 1)).toStrictEqual('miss'); expect(battleship(battleshipData, 3, 0)).toStrictEqual('miss'); }); }); xdescribe('Testing challenge 8', () => { test('It should multiply all the numbers together', () => { expect(calculateProduct([[1, 2], [3, 4], [5, 6]])).toStrictEqual(720); }); test('It should return zero if there are any zeroes in the data', () => { expect(calculateProduct([[2, 3, 4, 6, 0], [4, 3, 7], [2, 4, 6]])).toStrictEqual(0); }); test('It should work even if some of the arrays contain no numbers', () => { expect(calculateProduct([[1, 2], [], [3, 4, 5]])).toStrictEqual(120); }); }); xdescribe('Testing challenge 9', () => { test('It should calculate and return the average temperature of the data set', () => { expect(averageDailyTemperature(weeklyTemperatures)).toStrictEqual(60.25); }); }); xdescribe('Testing challenge 10', () => { test('It should return the lowest weekly average temperature within the data set', () => { expect(lowestWeeklyAverage(weeklyTemperatures)).toStrictEqual(57); expect(lowestWeeklyAverage(lowestWeeklyTemperatureData)).toStrictEqual(46); }); }); xdescribe('Testing challenge 11', () => { test('It should return the total count for each row', () => { let result = excel('1,1,1\n4,4,4\n9,9,9'); expect(result.length).toStrictEqual(3); expect(result[0]).toStrictEqual(3); expect(result[1]).toStrictEqual(12); expect(result[2]).toStrictEqual(27); }); });
webpackJsonp([3],[,,,,,,,,,,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.parseChildIndex=t.getReactEventByType=t.renderByOrder=t.isChildrenEqual=t.isSingleChildEqual=t.filterSvgElements=t.isSsr=t.validateWidthHeight=t.filterEventsOfChild=t.filterEventAttributes=t.getPresentationAttributes=t.withoutType=t.findChildByType=t.findAllByType=t.getDisplayName=t.LEGEND_TYPES=t.SCALE_TYPES=t.EVENT_ATTRIBUTES=t.PRESENTATION_ATTRIBUTES=void 0;var o=n(44),l=r(o),u=n(220),s=r(u),f=n(27),c=r(f),d=n(15),p=r(d),h=n(19),y=r(h),m=n(1),v=r(m),g=n(2),b=r(g),x=n(18),_=n(13),w=t.PRESENTATION_ATTRIBUTES={alignmentBaseline:b.default.string,angle:b.default.number,baselineShift:b.default.string,clip:b.default.string,clipPath:b.default.string,clipRule:b.default.string,color:b.default.string,colorInterpolation:b.default.string,colorInterpolationFilters:b.default.string,colorProfile:b.default.string,colorRendering:b.default.string,cursor:b.default.string,direction:b.default.oneOf(["ltr","rtl","inherit"]),display:b.default.string,dominantBaseline:b.default.string,enableBackground:b.default.string,fill:b.default.string,fillOpacity:b.default.oneOfType([b.default.string,b.default.number]),fillRule:b.default.oneOf(["nonzero","evenodd","inherit"]),filter:b.default.string,floodColor:b.default.string,floodOpacity:b.default.oneOfType([b.default.string,b.default.number]),font:b.default.string,fontFamily:b.default.string,fontSize:b.default.oneOfType([b.default.number,b.default.string]),fontSizeAdjust:b.default.oneOfType([b.default.number,b.default.string]),fontStretch:b.default.oneOf(["normal","wider","narrower","ultra-condensed","extra-condensed","condensed","semi-condensed","semi-expanded","expanded","extra-expanded","ultra-expanded","inherit"]),fontStyle:b.default.oneOf(["normal","italic","oblique","inherit"]),fontVariant:b.default.oneOf(["normal","small-caps","inherit"]),fontWeight:b.default.oneOf(["normal","bold","bolder","lighter",100,200,300,400,500,600,700,800,900,"inherit"]),glyphOrientationHorizontal:b.default.string,glyphOrientationVertical:b.default.string,imageRendering:b.default.oneOf(["auto","optimizeSpeed","optimizeQuality","inherit"]),kerning:b.default.oneOfType([b.default.number,b.default.string]),letterSpacing:b.default.oneOfType([b.default.number,b.default.string]),lightingColor:b.default.string,markerEnd:b.default.string,markerMid:b.default.string,markerStart:b.default.string,mask:b.default.string,opacity:b.default.oneOfType([b.default.number,b.default.string]),overflow:b.default.oneOf(["visible","hidden","scroll","auto","inherit"]),pointerEvents:b.default.oneOf(["visiblePainted","visibleFill","visibleStroke","visible","painted","fill","stroke","all","none","inherit"]),shapeRendering:b.default.oneOf(["auto","optimizeSpeed","crispEdges","geometricPrecision","inherit"]),stopColor:b.default.string,stopOpacity:b.default.oneOfType([b.default.number,b.default.string]),stroke:b.default.oneOfType([b.default.number,b.default.string]),strokeDasharray:b.default.string,strokeDashoffset:b.default.oneOfType([b.default.number,b.default.string]),strokeLinecap:b.default.oneOf(["butt","round","square","inherit"]),strokeLinejoin:b.default.oneOf(["miter","round","bevel","inherit"]),strokeMiterlimit:b.default.oneOfType([b.default.number,b.default.string]),strokeOpacity:b.default.oneOfType([b.default.number,b.default.string]),strokeWidth:b.default.oneOfType([b.default.number,b.default.string]),textAnchor:b.default.oneOf(["start","middle","end","inherit"]),textDecoration:b.default.oneOf(["none","underline","overline","line-through","blink","inherit"]),textRendering:b.default.oneOf(["auto","optimizeSpeed","optimizeLegibility","geometricPrecision","inherit"]),unicodeBidi:b.default.oneOf(["normal","embed","bidi-override","inherit"]),visibility:b.default.oneOf(["visible","hidden","collapse","inherit"]),wordSpacing:b.default.oneOfType([b.default.number,b.default.string]),writingMode:b.default.oneOf(["lr-tb","rl-tb","tb-rl","lr","rl","tb","inherit"]),transform:b.default.string,style:b.default.object,width:b.default.number,height:b.default.number,dx:b.default.number,dy:b.default.number,x:b.default.number,y:b.default.number,r:b.default.number,radius:b.default.oneOfType([b.default.number,b.default.array])},O=t.EVENT_ATTRIBUTES={onClick:b.default.func,onMouseDown:b.default.func,onMouseUp:b.default.func,onMouseOver:b.default.func,onMouseMove:b.default.func,onMouseOut:b.default.func,onMouseEnter:b.default.func,onMouseLeave:b.default.func,onTouchEnd:b.default.func,onTouchMove:b.default.func,onTouchStart:b.default.func,onTouchCancel:b.default.func},E={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},C=(t.SCALE_TYPES=["auto","linear","pow","sqrt","log","identity","time","band","point","ordinal","quantile","quantize","utcTime","sequential","threshold"],t.LEGEND_TYPES=["plainline","line","square","rect","circle","cross","diamond","star","triangle","wye","none"],t.getDisplayName=function(e){return e?"string"==typeof e?e:e.displayName||e.name||"Component":""}),k=t.findAllByType=function(e,t){var n=[],r=[];return r=(0,y.default)(t)?t.map(function(e){return C(e)}):[C(t)],v.default.Children.forEach(e,function(e){var t=e&&e.type&&(e.type.displayName||e.type.name);r.indexOf(t)!==-1&&n.push(e)}),n},T=(t.findChildByType=function(e,t){var n=k(e,t);return n&&n[0]},t.withoutType=function(e,t){var n=[],r=void 0;return r=(0,y.default)(t)?t.map(function(e){return C(e)}):[C(t)],v.default.Children.forEach(e,function(e){e&&e.type&&e.type.displayName&&r.indexOf(e.type.displayName)!==-1||n.push(e)}),n},t.getPresentationAttributes=function(e){if(!e||(0,p.default)(e))return null;var t=v.default.isValidElement(e)?e.props:e;if(!(0,c.default)(t))return null;var n=null;for(var r in t)({}).hasOwnProperty.call(t,r)&&w[r]&&(n||(n={}),n[r]=t[r]);return n},function(e,t){return function(n){return e(t,n),null}}),S=(t.filterEventAttributes=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||(0,p.default)(e))return null;var r=v.default.isValidElement(e)?e.props:e;if(!(0,c.default)(r))return null;var a=null;for(var i in r)({}).hasOwnProperty.call(r,i)&&O[i]&&(a||(a={}),a[i]=t||(n?T(r[i],r):r[i]));return a},function(e,t,n){return function(r){return e(t,n,r),null}}),A=(t.filterEventsOfChild=function(e,t,n){if(!(0,c.default)(e))return null;var r=null;for(var a in e)({}).hasOwnProperty.call(e,a)&&O[a]&&(0,p.default)(e[a])&&(r||(r={}),r[a]=S(e[a],t,n));return r},t.validateWidthHeight=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!(0,x.isNumber)(n)||n<=0||!(0,x.isNumber)(r)||r<=0)},t.isSsr=function(){return!("undefined"!=typeof window&&window.document&&window.document.createElement&&window.setTimeout)},["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"]),M=function(e){return e&&e.type&&(0,s.default)(e.type)&&A.indexOf(e.type)>=0},P=(t.filterSvgElements=function(e){var t=[];return v.default.Children.forEach(e,function(e){e&&e.type&&(0,s.default)(e.type)&&A.indexOf(e.type)>=0&&t.push(e)}),t},function(e,t){if((0,l.default)(e)&&(0,l.default)(t))return!0;if(!(0,l.default)(e)&&!(0,l.default)(t)){var n=e.props||{},r=n.children,a=i(n,["children"]),o=t.props||{},u=o.children,s=i(o,["children"]);return r&&u?(0,_.shallowEqual)(a,s)&&N(r,u):!r&&!u&&(0,_.shallowEqual)(a,s)}return!1});t.isSingleChildEqual=P;var N=t.isChildrenEqual=function e(t,n){if(t===n)return!0;if(m.Children.count(t)!==m.Children.count(n))return!1;var r=m.Children.count(t);if(0===r)return!0;if(1===r)return P((0,y.default)(t)?t[0]:t,(0,y.default)(n)?n[0]:n);for(var a=0;a<r;a++){var i=t[a],o=n[a];if((0,y.default)(i)||(0,y.default)(o)){if(!e(i,o))return!1}else if(!P(i,o))return!1}return!0};t.renderByOrder=function(e,t){var n=[],r={};return m.Children.forEach(e,function(e,i){if(e&&M(e))n.push(e);else if(e&&t[C(e.type)]){var o=C(e.type),l=t[o],u=l.handler,s=l.once;if(s&&!r[o]||!s){var f=u(e,o,i);(0,y.default)(f)?n=[n].concat(a(f)):n.push(f),r[o]=!0}}}),n},t.getReactEventByType=function(e){var t=e&&e.type;return t&&E[t]?E[t]:null},t.parseChildIndex=function(e,t){var n=-1;return m.Children.forEach(t,function(t,r){t===e&&(n=r)}),n}},function(e,t){"use strict";function n(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function r(e,t){return!n(e,this.props)||!n(t,this.state)}function a(e){e.prototype.shouldComponentUpdate=r}Object.defineProperty(t,"__esModule",{value:!0}),t.shallowEqual=n,t.default=a},,,,function(e,t,n){var r,a;/*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===a)for(var o in r)i.call(r,o)&&r[o]&&e.push(o)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(r=[],a=function(){return n}.apply(t,r),!(void 0!==a&&(e.exports=a)))}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.getLinearRegression=t.findEntryInArray=t.interpolateNumber=t.hasDuplicate=t.getAnyElementOfObject=t.getPercentValue=t.uniqueId=t.isNumOrStr=t.isNumber=t.isPercent=t.mathSign=void 0;var a=n(152),i=r(a),o=n(19),l=r(o),u=n(186),s=r(u),f=n(265),c=r(f),d=n(220),p=r(d),h=(t.mathSign=function(e){return 0===e?0:e>0?1:-1},t.isPercent=function(e){return(0,p.default)(e)&&e.indexOf("%")===e.length-1}),y=t.isNumber=function(e){return(0,c.default)(e)&&!(0,s.default)(e)},m=(t.isNumOrStr=function(e){return y(e)||(0,p.default)(e)},0);t.uniqueId=function(e){var t=++m;return""+(e||"")+t},t.getPercentValue=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!y(e)&&!(0,p.default)(e))return n;var a=void 0;if(h(e)){var i=e.indexOf("%");a=t*parseFloat(e.slice(0,i))/100}else a=+e;return(0,s.default)(a)&&(a=n),r&&a>t&&(a=t),a},t.getAnyElementOfObject=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},t.hasDuplicate=function(e){if(!(0,l.default)(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1},t.interpolateNumber=function(e,t){return y(e)&&y(t)?function(n){return e+n*(t-e)}:function(){return t}},t.findEntryInArray=function(e,t,n){return e&&e.length?e.find(function(e){return e&&(0,i.default)(e,t)===n}):null},t.getLinearRegression=function(e){if(!e||!e.length)return null;for(var t=e.length,n=0,r=0,a=0,i=0,o=1/0,l=-(1/0),u=0;u<t;u++)n+=e[u].cx,r+=e[u].cy,a+=e[u].cx*e[u].cy,i+=e[u].cx*e[u].cx,o=Math.min(o,e[u].cx),l=Math.max(l,e[u].cx);var s=t*i!==n*n?(t*a-n*r)/(t*i-n*n):0;return{xmin:o,xmax:l,a:s,b:(r-s*n)/t}}},,function(e,t){"use strict";function n(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function r(e){function t(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}this.setState(t.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var i=null,o=null,l=null;if("function"==typeof t.componentWillMount?i="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(i="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==i||null!==o||null!==l){var u=e.displayName||e.name,s="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+s+" but also contains the following legacy lifecycles:"+(null!==i?"\n "+i:"")+(null!==o?"\n "+o:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=n,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var f=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;f.call(this,e,t,r)}}return e}Object.defineProperty(t,"__esModule",{value:!0}),n.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0,t.polyfill=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){return"string"==typeof e?e:null}function i(e){if(!e)return null;var t=e.props;if("value"in t)return t.value;if(e.key)return e.key;if(e.type&&e.type.isSelectOptGroup&&t.label)return t.label;throw new Error("Need at least a key or a value or a label (only for OptGroup) for "+e)}function o(e,t){return"value"===t?i(e):e.props[t]}function l(e){return e.multiple}function u(e){return e.combobox}function s(e){return e.multiple||e.tags}function f(e){return s(e)||u(e)}function c(e){return!f(e)}function d(e){var t=e;return void 0===e?t=[]:Array.isArray(e)||(t=[e]),t}function p(e){return typeof e+"-"+e}function h(e){e.preventDefault()}function y(e,t){for(var n=-1,r=0;r<e.length;r++)if(e[r]===t){n=r;break}return n}function m(e,t){var n=void 0;e=d(e);for(var r=0;r<e.length;r++)if(e[r].key===t){n=e[r].label;break}return n}function v(e,t){if(null===t||void 0===t)return[];var n=[];return C.default.Children.forEach(e,function(e){if(e.type.isMenuItemGroup)n=n.concat(v(e.props.children,t));else{var r=i(e),a=e.key;y(t,r)!==-1&&a&&n.push(a)}}),n}function g(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.type.isMenuItemGroup){var r=g(n.props.children);if(r)return r}else if(!n.props.disabled)return n}return null}function b(e,t){for(var n=0;n<t.length;++n)if(e.lastIndexOf(t[n])>0)return!0;return!1}function x(e,t){var n=new RegExp("["+t.join()+"]");return e.split(n).filter(function(e){return e})}function _(e,t){if(t.props.disabled)return!1;var n=d(o(t,this.props.optionFilterProp)).join("");return n.toLowerCase().indexOf(e.toLowerCase())>-1}function w(e,t){if(!c(t)&&!l(t)&&"string"!=typeof e)throw new Error("Invalid `value` of type `"+typeof e+"` supplied to Option, expected `string` when `tags/combobox` is `true`.")}function O(e,t){return function(n){e[t]=n}}t.__esModule=!0,t.UNSELECTABLE_ATTRIBUTE=t.UNSELECTABLE_STYLE=void 0,t.toTitle=a,t.getValuePropValue=i,t.getPropValue=o,t.isMultiple=l,t.isCombobox=u,t.isMultipleOrTags=s,t.isMultipleOrTagsOrCombobox=f,t.isSingleMode=c,t.toArray=d,t.getMapKey=p,t.preventDefaultEvent=h,t.findIndexInValueBySingleValue=y,t.getLabelFromPropsValue=m,t.getSelectKeys=v,t.findFirstMenuItem=g,t.includesSeparators=b,t.splitBySeparators=x,t.defaultFilterFn=_,t.validateOptionValue=w,t.saveRef=O;var E=n(1),C=r(E);t.UNSELECTABLE_STYLE={userSelect:"none",WebkitUserSelect:"none"},t.UNSELECTABLE_ATTRIBUTE={unselectable:"on"}},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){var t=e.children,n=e.className,r=a(e,["children","className"]),i=(0,d.default)("recharts-layer",n);return u.default.createElement("g",o({className:i},r),t)}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(1),u=r(l),s=n(2),f=r(s),c=n(17),d=r(c),p={className:f.default.string,children:f.default.oneOfType([f.default.arrayOf(f.default.node),f.default.node])};i.propTypes=p,t.default=i},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=a(i),l=n(3),u=a(l),s=n(8),f=a(s),c=n(5),d=a(c),p=n(4),h=a(p),y=n(1),m=r(y),v=n(2),g=a(v),b=function(e){function t(){return(0,u.default)(this,t),(0,d.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,h.default)(t,e),(0,f.default)(t,[{key:"getLocale",value:function(){var e=this.props,t=e.componentName,n=e.defaultLocale,r=this.context.antLocale,a=r&&r[t];return(0,o.default)({},"function"==typeof n?n():n,a||{})}},{key:"getLocaleCode",value:function(){var e=this.context.antLocale,t=e&&e.locale;return e&&e.exist&&!t?"en-us":t}},{key:"render",value:function(){return this.props.children(this.getLocale(),this.getLocaleCode())}}]),t}(m.Component);t.default=b,b.contextTypes={antLocale:g.default.object},e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.parseDomainOfCategoryAxis=t.getBandSizeOfAxis=t.validateCoordinateInRange=t.parseSpecifiedDomain=t.MAX_VALUE_REG=t.MIN_VALUE_REG=t.getDomainOfStackGroups=t.getStackedDataOfItem=t.detectReferenceElementsDomain=t.getBaseValueOfBar=t.getCateCoordinateOfBar=t.getCateCoordinateOfLine=t.getTicksOfScale=t.calculateDomainOfTicks=t.getStackGroupsByAxisId=t.getStackedData=t.offsetSign=t.truncateByDomain=t.findPositionOfBar=t.checkDomainOfScale=t.parseScale=t.combineEventHandlers=t.getTicksOfAxis=t.getCoordinatesOfGrid=t.isCategorialAxis=t.getDomainOfItemsWithSameAxis=t.parseErrorBarsOfAxis=t.getDomainOfErrorBars=t.appendOffsetOfLegend=t.getBarPosition=t.getBarSizeList=t.getLegendProps=t.getMainColorOfGraphicItem=t.calculateActiveTickIndex=t.getDomainOfDataByKey=t.getValueByDataKey=void 0;var l=n(61),u=a(l),s=n(381),f=a(s),c=n(186),d=a(c),p=n(220),h=a(p),y=n(499),m=a(y),v=n(378),g=a(v),b=n(19),x=a(b),_=n(495),w=a(_),O=n(15),E=a(O),C=n(152),k=a(C),T=n(44),S=a(T),A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M=n(531),P=n(404),N=r(P),j=n(214),R=n(18),I=n(395),D=a(I),L=n(396),B=a(L),V=n(394),F=a(V),z=n(158),W=a(z),K=n(292),U=a(K),G=n(12),H=t.getValueByDataKey=function(e,t,n){return(0,S.default)(e)||(0,S.default)(t)?n:(0,R.isNumOrStr)(t)?(0,k.default)(e,t,n):(0,E.default)(t)?t(e):n},q=t.getDomainOfDataByKey=function(e,t,n,r){var a=(0,w.default)(e,function(e){return H(e,t)});if("number"===n){var i=a.filter(R.isNumber);return[Math.min.apply(null,i),Math.max.apply(null,i)]}var o=r?a.filter(function(e){return!(0,S.default)(e)}):a;return o.map(function(e){return(0,R.isNumOrStr)(e)?e:""})},Y=(t.calculateActiveTickIndex=function(e,t,n,r){var a=-1,i=t.length;if(i>1){if(r&&"angleAxis"===r.axisType&&Math.abs(Math.abs(r.range[1]-r.range[0])-360)<=1e-6)for(var o=r.range,l=0;l<i;l++){var u=l>0?n[l-1].coordinate:n[i-1].coordinate,s=n[l].coordinate,f=l>=i-1?n[0].coordinate:n[l+1].coordinate,c=void 0;if((0,R.mathSign)(s-u)!==(0,R.mathSign)(f-s)){var d=[];if((0,R.mathSign)(f-s)===(0,R.mathSign)(o[1]-o[0])){c=f;var p=s+o[1]-o[0];d[0]=Math.min(p,(p+u)/2),d[1]=Math.max(p,(p+u)/2)}else{c=u;var h=f+o[1]-o[0];d[0]=Math.min(s,(h+s)/2),d[1]=Math.max(s,(h+s)/2)}var y=[Math.min(s,(c+s)/2),Math.max(s,(c+s)/2)];if(e>y[0]&&e<=y[1]||e>=d[0]&&e<=d[1]){a=n[l].index;break}}else{var m=Math.min(u,f),v=Math.max(u,f);if(e>(m+s)/2&&e<=(v+s)/2){a=n[l].index;break}}}else for(var g=0;g<i;g++)if(0===g&&e<=(t[g].coordinate+t[g+1].coordinate)/2||g>0&&g<i-1&&e>(t[g].coordinate+t[g-1].coordinate)/2&&e<=(t[g].coordinate+t[g+1].coordinate)/2||g===i-1&&e>(t[g].coordinate+t[g-1].coordinate)/2){a=t[g].index;break}}else a=0;return a},t.getMainColorOfGraphicItem=function(e){var t=e.type.displayName,n=void 0;switch(t){case"Line":case"Area":case"Radar":n=e.props.stroke;break;default:n=e.props.fill}return n}),X=t.getLegendProps=function(e){var t=e.children,n=e.formatedGraphicalItems,r=e.legendWidth,a=e.legendContent,i=(0,G.findChildByType)(t,U.default);if(!i)return null;var o=void 0;return o=i.props&&i.props.payload?i.props&&i.props.payload:"children"===a?(n||[]).reduce(function(e,t){var n=t.item,r=t.props,a=r.sectors||r.data||[];return e.concat(a.map(function(e){return{type:i.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}}))},[]):(n||[]).map(function(e){var t=e.item,n=t.props,r=n.dataKey,a=n.name,o=n.legendType,l=n.hide;return{inactive:l,dataKey:r,type:i.props.iconType||o||"square",color:Y(t),value:a||r,payload:t.props}}),A({},i.props,U.default.getWithHeight(i,r),{payload:o,item:i})},J=(t.getBarSizeList=function(e){var t=e.barSize,n=e.stackGroups,r=void 0===n?{}:n;if(!r)return{};for(var a={},i=Object.keys(r),o=0,l=i.length;o<l;o++)for(var u=r[i[o]].stackGroups,s=Object.keys(u),f=0,c=s.length;f<c;f++){var d=u[s[f]],p=d.items,h=d.cateAxisId,y=p.filter(function(e){return(0,G.getDisplayName)(e.type).indexOf("Bar")>=0});if(y&&y.length){var m=y[0].props.barSize,v=y[0].props[h];a[v]||(a[v]=[]),a[v].push({item:y[0],stackList:y.slice(1),barSize:(0,S.default)(m)?t:m})}}return a},t.getBarPosition=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,a=e.sizeList,i=void 0===a?[]:a,l=e.maxBarSize,u=i.length;if(u<1)return null;var s=(0,R.getPercentValue)(t,r,0,!0),f=void 0;if(i[0].barSize===+i[0].barSize){var c=!1,d=r/u,p=i.reduce(function(e,t){return e+t.barSize||0},0);p+=(u-1)*s,p>=r&&(p-=(u-1)*s,s=0),p>=r&&d>0&&(c=!0,d*=.9,p=u*d);var h=(r-p)/2>>0,y={offset:h-s,size:0};f=i.reduce(function(e,t){var n=[].concat(o(e),[{item:t.item,position:{offset:y.offset+y.size+s,size:c?d:t.barSize}}]);return y=n[n.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){n.push({item:e,position:y})}),n},[])}else{var m=(0,R.getPercentValue)(n,r,0,!0);r-2*m-(u-1)*s<=0&&(s=0);var v=(r-2*m-(u-1)*s)/u;v>1&&(v>>=0);var g=l===+l?Math.min(v,l):v;f=i.reduce(function(e,t,n){var r=[].concat(o(e),[{item:t.item,position:{offset:m+(v+s)*n+(v-g)/2,size:g}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:r[r.length-1].position})}),r},[])}return f},t.appendOffsetOfLegend=function(e,t,n,r){var a=n.children,o=n.width,l=n.height,u=n.margin,s=o-(u.left||0)-(u.right||0),f=l-(u.top||0)-(u.bottom||0),c=X({children:a,items:t,legendWidth:s,legendHeight:f}),d=e;if(c){var p=r||{},h=c.align,y=c.verticalAlign,m=c.layout;("vertical"===m||"horizontal"===m&&"center"===y)&&(0,R.isNumber)(e[h])&&(d=A({},e,i({},h,d[h]+(p.width||0)))),("horizontal"===m||"vertical"===m&&"center"===h)&&(0,R.isNumber)(e[y])&&(d=A({},e,i({},y,d[y]+(p.height||0))))}return d},t.getDomainOfErrorBars=function(e,t,n,r){var a=t.props.children,i=(0,G.findAllByType)(a,W.default).filter(function(e){var t=e.props.direction;return!(!(0,S.default)(t)&&!(0,S.default)(r))||r.indexOf(t)>=0});if(i&&i.length){var o=i.map(function(e){return e.props.dataKey});return e.reduce(function(e,t){var r=H(t,n,0),a=(0,x.default)(r)?[(0,g.default)(r),(0,m.default)(r)]:[r,r],i=o.reduce(function(e,n){var r=H(t,n,0),i=a[0]-Math.abs((0,x.default)(r)?r[0]:r),o=a[1]+Math.abs((0,x.default)(r)?r[1]:r);return[Math.min(i,e[0]),Math.max(o,e[1])]},[1/0,-(1/0)]);return[Math.min(i[0],e[0]),Math.max(i[1],e[1])]},[1/0,-(1/0)])}return null}),$=(t.parseErrorBarsOfAxis=function(e,t,n,r){var a=t.map(function(t){return J(e,t,n,r)}).filter(function(e){return!(0,S.default)(e)});return a&&a.length?a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-(1/0)]):null},t.getDomainOfItemsWithSameAxis=function(e,t,n,r){var a=t.map(function(t){var a=t.props.dataKey;return"number"===n&&a?J(e,t,a)||q(e,a,n,r):q(e,a,n,r)});if("number"===n)return a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-(1/0)]);var i={};return a.reduce(function(e,t){for(var n=0,r=t.length;n<r;n++)i[t[n]]||(i[t[n]]=!0,e.push(t[n]));return e},[])},t.isCategorialAxis=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},t.getCoordinatesOfGrid=function(e,t,n){var r=void 0,a=void 0,i=e.map(function(e){return e.coordinate===t&&(r=!0),e.coordinate===n&&(a=!0),e.coordinate});return r||i.push(t),a||i.push(n),i},t.getTicksOfAxis=function(e,t,n){if(!e)return null;var r=e.scale,a=e.duplicateDomain,i=e.type,o=e.range,l=(t||n)&&"category"===i&&r.bandwidth?r.bandwidth()/2:0;return l="angleAxis"===e.axisType?2*(0,R.mathSign)(o[0]-o[1])*l:l,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map(function(e){var t=a?a.indexOf(e):e;return{coordinate:r(t)+l,value:e,offset:l}}):e.isCategorial&&e.categoricalDomain?e.categoricalDomain.map(function(e,t){return{coordinate:r(e),value:e,index:t,offset:l}}):r.ticks&&!n?r.ticks(e.tickCount).map(function(e){return{coordinate:r(e)+l,value:e,offset:l}}):r.domain().map(function(e,t){return{coordinate:r(e)+l,value:a?a[e]:e,index:t,offset:l}})},t.combineEventHandlers=function(e,t,n){var r=void 0;return(0,E.default)(n)?r=n:(0,E.default)(t)&&(r=t),(0,E.default)(e)||r?function(t,n,a,i){(0,E.default)(e)&&e(t,n,a,i),(0,E.default)(r)&&r(t,n,a,i)}:null},t.parseScale=function(e,t){var n=e.scale,r=e.type,a=e.layout,i=e.axisType;if("auto"===n)return"radial"===a&&"radiusAxis"===i?{scale:N.scaleBand(),realScaleType:"band"}:"radial"===a&&"angleAxis"===i?{scale:N.scaleLinear(),realScaleType:"linear"}:"category"===r&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0)?{scale:N.scalePoint(),realScaleType:"point"}:"category"===r?{scale:N.scaleBand(),realScaleType:"band"}:{scale:N.scaleLinear(),realScaleType:"linear"};if((0,h.default)(n)){var o="scale"+n.slice(0,1).toUpperCase()+n.slice(1);return{scale:(N[o]||N.scalePoint)(),realScaleType:N[o]?o:"point"}}return(0,E.default)(n)?{scale:n}:{scale:N.scalePoint(),realScaleType:"point"}},1e-4),Z=(t.checkDomainOfScale=function(e){var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),a=Math.min(r[0],r[1])-$,i=Math.max(r[0],r[1])+$,o=e(t[0]),l=e(t[n-1]);(o<a||o>i||l<a||l>i)&&e.domain([t[0],t[n-1]])}},t.findPositionOfBar=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null},t.truncateByDomain=function(e,t){if(!t||2!==t.length||!(0,R.isNumber)(t[0])||!(0,R.isNumber)(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),a=[e[0],e[1]];return(!(0,R.isNumber)(e[0])||e[0]<n)&&(a[0]=n),(!(0,R.isNumber)(e[1])||e[1]>r)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]<n&&(a[1]=n),a},t.offsetSign=function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var a=0,i=0,o=0;o<t;++o){var l=(0,d.default)(e[o][n][1])?e[o][n][0]:e[o][n][1];l>=0?(e[o][n][0]=a,e[o][n][1]=a+l,a=e[o][n][1]):(e[o][n][0]=i,e[o][n][1]=i+l,i=e[o][n][1])}}),Q={sign:Z,expand:j.stackOffsetExpand,none:j.stackOffsetNone,silhouette:j.stackOffsetSilhouette,wiggle:j.stackOffsetWiggle},ee=t.getStackedData=function(e,t,n){var r=t.map(function(e){return e.props.dataKey}),a=(0,j.stack)().keys(r).value(function(e,t){return+H(e,t,0)}).order(j.stackOrderNone).offset(Q[n]);return a(e)},te=(t.getStackGroupsByAxisId=function(e,t,n,r,a,o){if(!e)return null;var l=o?t.reverse():t,u=l.reduce(function(e,t){var a=t.props,o=a.stackId,l=a.hide;if(l)return e;var u=t.props[n],s=e[u]||{hasStack:!1,stackGroups:{}};if((0,R.isNumOrStr)(o)){var f=s.stackGroups[o]||{numericAxisId:n,cateAxisId:r,items:[]};f.items.push(t),s.hasStack=!0,s.stackGroups[o]=f}else s.stackGroups[(0,R.uniqueId)("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return A({},e,i({},u,s))},{});return Object.keys(u).reduce(function(t,o){var l=u[o];return l.hasStack&&(l.stackGroups=Object.keys(l.stackGroups).reduce(function(t,o){var u=l.stackGroups[o];return A({},t,i({},o,{numericAxisId:n,cateAxisId:r,items:u.items,stackedData:ee(e,u.items,a)}))},{})),A({},t,i({},o,l))},{})},t.calculateDomainOfTicks=function(e,t){return"number"===t?[Math.min.apply(null,e),Math.max.apply(null,e)]:e}),ne=(t.getTicksOfScale=function(e,t){var n=t.realScaleType,r=t.type,a=t.tickCount,i=t.originalDomain,o=t.allowDecimals,l=n||t.scale;if("auto"!==l&&"linear"!==l)return null;if(a&&"number"===r&&i&&("auto"===i[0]||"auto"===i[1])){var u=e.domain(),s=(0,M.getNiceTickValues)(u,a,o);return e.domain(te(s,r)),{niceTicks:s}}if(a&&"number"===r){var f=e.domain(),c=(0,M.getTickValuesFixedDomain)(f,a,o);return{niceTicks:c}}return null},t.getCateCoordinateOfLine=function(e){var t=e.axis,n=e.ticks,r=e.bandSize,a=e.entry,i=e.index;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!(0,S.default)(a[t.dataKey])){var o=(0,R.findEntryInArray)(n,"value",a[t.dataKey]);if(o)return o.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=H(a,t.dataKey);return(0,S.default)(l)?null:t.scale(l)},t.getCateCoordinateOfBar=function(e){var t=e.axis,n=e.ticks,r=e.offset,a=e.bandSize,i=e.entry,o=e.index;if("category"===t.type)return n[o]?n[o].coordinate+r:null;var l=H(i,t.dataKey,t.domain[o]);return(0,S.default)(l)?null:t.scale(l)-a/2+r},t.getBaseValueOfBar=function(e){var t=e.numericAxis,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return r<=0&&a>=0?0:a<0?a:r}return n[0]},t.detectReferenceElementsDomain=function(e,t,n,r,a){var i=(0,G.findAllByType)(e,B.default),o=(0,G.findAllByType)(e,D.default),l=i.concat(o),u=(0,G.findAllByType)(e,F.default),s=r+"Id",f=r[0],c=t;if(l.length&&(c=l.reduce(function(e,t){if(t.props[s]===n&&t.props.alwaysShow&&(0,R.isNumber)(t.props[f])){var r=t.props[f];return[Math.min(e[0],r),Math.max(e[1],r)]}return e},c)),u.length){var d=f+"1",p=f+"2";c=u.reduce(function(e,t){if(t.props[s]===n&&t.props.alwaysShow&&(0,R.isNumber)(t.props[d])&&(0,R.isNumber)(t.props[p])){var r=t.props[d],a=t.props[p];return[Math.min(e[0],r,a),Math.max(e[1],r,a)]}return e},c)}return a&&a.length&&(c=a.reduce(function(e,t){return(0,R.isNumber)(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e},c)),c},t.getStackedDataOfItem=function(e,t){var n=e.props.stackId;if((0,R.isNumOrStr)(n)){var r=t[n];if(r&&r.items.length){for(var a=-1,i=0,o=r.items.length;i<o;i++)if(r.items[i]===e){a=i;break}return a>=0?r.stackedData[a]:null}}return null},function(e){return e.reduce(function(e,t){return[Math.min.apply(null,t.concat([e[0]]).filter(R.isNumber)),Math.max.apply(null,t.concat([e[1]]).filter(R.isNumber))]},[1/0,-(1/0)])}),re=(t.getDomainOfStackGroups=function(e,t,n){return Object.keys(e).reduce(function(r,a){var i=e[a],o=i.stackedData,l=o.reduce(function(e,r){var a=ne(r.slice(t,n+1));return[Math.min(e[0],a[0]),Math.max(e[1],a[1])]},[1/0,-(1/0)]);return[Math.min(l[0],r[0]),Math.max(l[1],r[1])]},[1/0,-(1/0)]).map(function(e){return e===1/0||e===-(1/0)?0:e})},t.MIN_VALUE_REG=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/),ae=t.MAX_VALUE_REG=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/;t.parseSpecifiedDomain=function(e,t,n){if(!(0,x.default)(e))return t;var r=[];if((0,R.isNumber)(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(re.test(e[0])){var a=+re.exec(e[0])[1];r[0]=t[0]-a}else(0,E.default)(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if((0,R.isNumber)(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(ae.test(e[1])){var i=+ae.exec(e[1])[1];r[1]=t[1]+i}else(0,E.default)(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},t.validateCoordinateInRange=function(e,t){if(!t)return!1;var n=t.range(),r=n[0],a=n[n.length-1],i=r<=a?e>=r&&e<=a:e>=a&&e<=r;return i},t.getBandSizeOfAxis=function(e,t){if(e&&e.scale&&e.scale.bandwidth)return e.scale.bandwidth();if(e&&t&&t.length>=2){for(var n=(0,f.default)(t,function(e){return e.coordinate}),r=1/0,a=1,i=n.length;a<i;a++){var o=n[a],l=n[a-1];r=Math.min((o.coordinate||0)-(l.coordinate||0),r)}return r===1/0?0:r}return 0},t.parseDomainOfCategoryAxis=function(e,t,n){return e&&e.length?(0,u.default)(e,(0,k.default)(n,"type.defaultProps.domain"))?t:e:t}},function(e,t,n){var r=n(299),a=n(297),i=n(402),o=n(561),l=n(554),u="prototype",s=function(e,t,n){var f,c,d,p,h=e&s.F,y=e&s.G,m=e&s.S,v=e&s.P,g=e&s.B,b=y?r:m?r[t]||(r[t]={}):(r[t]||{})[u],x=y?a:a[t]||(a[t]={}),_=x[u]||(x[u]={});y&&(n=t);for(f in n)c=!h&&b&&void 0!==b[f],d=(c?b:n)[f],p=g&&c?l(d,r):v&&"function"==typeof d?l(Function.call,d):d,b&&o(b,f,d,e&s.U),x[f]!=d&&i(x,f,p),v&&_[f]!=d&&(_[f]=d)};r.core=a,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=[];return o.default.Children.forEach(e,function(e){t.push(e)}),t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(1),o=r(i);e.exports=t.default},,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(3),i=r(a),o=n(5),l=r(o),u=n(4),s=r(u),f=n(1),c=r(f),d=n(2),p=r(d),h=function(e){function t(){return(0,i.default)(this,t),(0,l.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t}(c.default.Component);h.propTypes={value:p.default.oneOfType([p.default.string,p.default.number])},h.isSelectOption=!0,t.default=h,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){var r=o.default.oneOfType([o.default.string,o.default.number]),a=o.default.shape({key:r.isRequired,label:o.default.node});if(!e.labelInValue){if(("multiple"===e.mode||"tags"===e.mode||e.multiple||e.tags)&&""===e[t])return new Error("Invalid prop `"+t+"` of type `string` supplied to `"+n+"`, expected `array` when `multiple` or `tags` is `true`.");var i=o.default.oneOfType([o.default.arrayOf(r),r]);return i.apply(void 0,arguments)}var l=o.default.oneOfType([o.default.arrayOf(a),a]),u=l.apply(void 0,arguments);if(u)return new Error("Invalid prop `"+t+"` supplied to `"+n+"`, "+("when you set `labelInValue` to `true`, `"+t+"` should in ")+"shape of `{ key: string | number, label?: ReactNode }`.")}t.__esModule=!0,t.SelectPropTypes=void 0;var i=n(2),o=r(i);t.SelectPropTypes={defaultActiveFirstOption:o.default.bool,multiple:o.default.bool,filterOption:o.default.any,children:o.default.any,showSearch:o.default.bool,disabled:o.default.bool,allowClear:o.default.bool,showArrow:o.default.bool,tags:o.default.bool,prefixCls:o.default.string,className:o.default.string,transitionName:o.default.string,optionLabelProp:o.default.string,optionFilterProp:o.default.string,animation:o.default.string,choiceTransitionName:o.default.string,onChange:o.default.func,onBlur:o.default.func,onFocus:o.default.func,onSelect:o.default.func,onSearch:o.default.func,onPopupScroll:o.default.func,onMouseEnter:o.default.func,onMouseLeave:o.default.func,onInputKeyDown:o.default.func,placeholder:o.default.any,onDeselect:o.default.func,labelInValue:o.default.bool,value:a,defaultValue:a,dropdownStyle:o.default.object,maxTagTextLength:o.default.number,maxTagCount:o.default.number,maxTagPlaceholder:o.default.oneOfType([o.default.node,o.default.func]),tokenSeparators:o.default.arrayOf(o.default.string),getInputElement:o.default.func,showAction:o.default.arrayOf(o.default.string)}},,,function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),o=a(i),l=n(6),u=a(l),s=n(3),f=a(s),c=n(8),d=a(c),p=n(5),h=a(p),y=n(4),m=a(y),v=n(1),g=r(v),b=n(2),x=a(b),_=n(59),w=a(_),O=n(7),E=a(O),C=n(22),k=a(C),T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]]);return n},S=function(e){function t(){(0,f.default)(this,t);var e=(0,h.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.saveCheckbox=function(t){e.rcCheckbox=t},e}return(0,m.default)(t,e),(0,d.default)(t,[{key:"shouldComponentUpdate",value:function(e,t,n){return!(0,k.default)(this.props,e)||!(0,k.default)(this.state,t)||!(0,k.default)(this.context.radioGroup,n.radioGroup)}},{key:"focus",value:function(){this.rcCheckbox.focus()}},{key:"blur",value:function(){this.rcCheckbox.blur()}},{key:"render",value:function(){var e,t=this.props,n=this.context,r=t.prefixCls,a=t.className,i=t.children,l=t.style,s=T(t,["prefixCls","className","children","style"]),f=n.radioGroup,c=(0,u.default)({},s);f&&(c.name=f.name,c.onChange=f.onChange,c.checked=t.value===f.value,c.disabled=t.disabled||f.disabled);var d=(0,E.default)(a,(e={},(0,o.default)(e,r+"-wrapper",!0),(0,o.default)(e,r+"-wrapper-checked",c.checked),(0,o.default)(e,r+"-wrapper-disabled",c.disabled),e));return g.createElement("label",{className:d,style:l,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave},g.createElement(w.default,(0,u.default)({},c,{prefixCls:r,ref:this.saveCheckbox})),void 0!==i?g.createElement("span",null,i):null)}}]),t}(g.Component);t.default=S,S.defaultProps={prefixCls:"ant-radio",type:"radio"},S.contextTypes={radioGroup:x.default.any},e.exports=t.default},,function(e,t,n){function r(e){return null!=e&&i(e.length)&&!a(e)}var a=n(15),i=n(114);e.exports=r},,,,,,function(e,t){function n(e){return null==e}e.exports=n},,function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=a(i),l=n(9),u=a(l),s=n(3),f=a(s),c=n(8),d=a(c),p=n(5),h=a(p),y=n(4),m=a(y),v=n(1),g=r(v),b=n(2),x=a(b),_=n(57),w=a(_),O=n(7),E=a(O),C=n(24),k=a(C),T=n(52),S=a(T),A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]]);return n},M={prefixCls:x.default.string,className:x.default.string,size:x.default.oneOf(["default","large","small"]),combobox:x.default.bool,notFoundContent:x.default.any,showSearch:x.default.bool,optionLabelProp:x.default.string,transitionName:x.default.string,choiceTransitionName:x.default.string},P=function(e){function t(){(0,f.default)(this,t);var e=(0,h.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.saveSelect=function(t){e.rcSelect=t},e.renderSelect=function(t){var n,r=e.props,a=r.prefixCls,i=r.className,l=void 0===i?"":i,s=r.size,f=r.mode,c=A(r,["prefixCls","className","size","mode"]),d=(0,E.default)((n={},(0,u.default)(n,a+"-lg","large"===s),(0,u.default)(n,a+"-sm","small"===s),n),l),p=e.props.optionLabelProp,h="combobox"===f;h&&(p=p||"value");var y={multiple:"multiple"===f,tags:"tags"===f,combobox:h};return g.createElement(w.default,(0,o.default)({},c,y,{prefixCls:a,className:d,optionLabelProp:p||"children",notFoundContent:e.getNotFoundContent(t),ref:e.saveSelect}))},e}return(0,m.default)(t,e),(0,d.default)(t,[{key:"focus",value:function(){this.rcSelect.focus()}},{key:"blur",value:function(){this.rcSelect.blur()}},{key:"getNotFoundContent",value:function(e){var t=this.props,n=t.notFoundContent,r=t.mode,a="combobox"===r;return a?void 0===n?null:n:void 0===n?e.notFoundContent:n}},{key:"render",value:function(){return g.createElement(k.default,{componentName:"Select",defaultLocale:S.default.Select},this.renderSelect)}}]),t}(g.Component);t.default=P,P.Option=_.Option,P.OptGroup=_.OptGroup,P.defaultProps={prefixCls:"ant-select",showSearch:!1,transitionName:"slide-up",choiceTransitionName:"zoom" },P.propTypes=M,e.exports=t.default},,,function(e,t){function n(e){return e}e.exports=n},,,,function(e,t,n){"use strict";n(11),n(56),n(39)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vertical";if("undefined"==typeof document||"undefined"==typeof window)return 0;if(f)return f;var t=document.createElement("div");Object.keys(c).forEach(function(e){t.style[e]=c[e]}),document.body.appendChild(t);var n=0;return"vertical"===e?n=t.offsetWidth-t.clientWidth:"horizontal"===e&&(n=t.offsetHeight-t.clientHeight),document.body.removeChild(t),f=n}function i(e,t,n){function r(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var l=this;i[0]&&i[0].persist&&i[0].persist();var u=function(){a=null,n||e.apply(l,i)},s=n&&!a;clearTimeout(a),a=setTimeout(u,t),s&&e.apply(l,i)}var a=void 0;return r.cancel=function(){a&&(clearTimeout(a),a=null)},r}function o(e,t,n){d[t]||((0,s.default)(e,t,n),d[t]=!e)}function l(e,t){var n=e.indexOf(t),r=e.slice(0,n),a=e.slice(n+1,e.length);return r.concat(a)}t.__esModule=!0,t.measureScrollbar=a,t.debounce=i,t.warningOnce=o,t.remove=l;var u=n(41),s=r(u),f=void 0,c={position:"absolute",top:"-9999px",width:"50px",height:"50px",overflow:"scroll"},d={}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.inRangeOfSector=t.formatAngleOfSector=t.getAngleOfPoint=t.distanceBetweenPoints=t.formatAxisMap=t.getMaxRadius=t.polarToCartesian=t.radianToDegree=t.degreeToRadian=t.RADIAN=void 0;var i=n(44),o=r(i),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(18),s=n(25),f=t.RADIAN=Math.PI/180,c=(t.degreeToRadian=function(e){return e*Math.PI/180},t.radianToDegree=function(e){return 180*e/Math.PI}),d=(t.polarToCartesian=function(e,t,n,r){return{x:e+Math.cos(-f*r)*n,y:t+Math.sin(-f*r)*n}},t.getMaxRadius=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2}),p=(t.formatAxisMap=function(e,t,n,r,i){var f=e.width,c=e.height,p=e.startAngle,h=e.endAngle,y=(0,u.getPercentValue)(e.cx,f,f/2),m=(0,u.getPercentValue)(e.cy,c,c/2),v=d(f,c,n),g=(0,u.getPercentValue)(e.innerRadius,v,0),b=(0,u.getPercentValue)(e.outerRadius,v,.8*v),x=Object.keys(t);return x.reduce(function(e,n){var u=t[n],f=u.domain,c=u.reversed,d=void 0;(0,o.default)(u.range)?("angleAxis"===r?d=[p,h]:"radiusAxis"===r&&(d=[g,b]),c&&(d=[d[1],d[0]])):(d=u.range,p=d[0],h=d[1]);var v=(0,s.parseScale)(u,i),x=v.realScaleType,_=v.scale;_.domain(f).range(d),(0,s.checkDomainOfScale)(_);var w=(0,s.getTicksOfScale)(_,l({},u,{realScaleType:x})),O=l({},u,w,{range:d,radius:b,realScaleType:x,scale:_,cx:y,cy:m,innerRadius:g,outerRadius:b,startAngle:p,endAngle:h});return l({},e,a({},n,O))},{})},t.distanceBetweenPoints=function(e,t){var n=e.x,r=e.y,a=t.x,i=t.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(r-i,2))}),h=t.getAngleOfPoint=function(e,t){var n=e.x,r=e.y,a=t.cx,i=t.cy,o=p({x:n,y:r},{x:a,y:i});if(o<=0)return{radius:o};var l=(n-a)/o,u=Math.acos(l);return r>i&&(u=2*Math.PI-u),{radius:o,angle:c(u),angleInRadian:u}},y=t.formatAngleOfSector=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),a=Math.floor(n/360),i=Math.min(r,a);return{startAngle:t-360*i,endAngle:n-360*i}},m=function(e,t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),i=Math.floor(r/360),o=Math.min(a,i);return e+360*o};t.inRangeOfSector=function(e,t){var n=e.x,r=e.y,a=h({x:n,y:r},t),i=a.radius,o=a.angle,u=t.innerRadius,s=t.outerRadius;if(i<u||i>s)return!1;if(0===i)return!0;var f=y(t),c=f.startAngle,d=f.endAngle,p=o,v=void 0;if(c<=d){for(;p>d;)p-=360;for(;p<c;)p+=360;v=p>=c&&p<=d}else{for(;p>c;)p-=360;for(;p<d;)p+=360;v=p>=d&&p<=c}return v?l({},t,{radius:i,angle:m(p,t)}):null}},11,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.SelectPropTypes=t.OptGroup=t.Option=void 0;var a=n(64),i=r(a),o=n(32),l=r(o),u=n(33),s=n(63),f=r(s);i.default.Option=l.default,i.default.OptGroup=f.default,t.Option=l.default,t.OptGroup=f.default,t.SelectPropTypes=u.SelectPropTypes,t.default=i.default},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(85),i=r(a);t.default=i.default,e.exports=t.default},,function(e,t,n){function r(e,t){return a(e,t)}var a=n(169);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(6),i=r(a),o=n(3),l=r(o),u=n(5),s=r(u),f=n(4),c=r(f),d=n(1),p=r(d),h=n(10),y=n(2),m=r(y),v=n(28),g=r(v),b=n(45),x=r(b),_=n(141),w=r(_),O=n(21),E=function(e){function t(n){(0,l.default)(this,t);var r=(0,s.default)(this,e.call(this,n));return C.call(r),r.lastInputValue=n.inputValue,r.saveMenuRef=(0,O.saveRef)(r,"menuRef"),r}return(0,c.default)(t,e),t.prototype.componentDidMount=function(){this.scrollActiveItemToView(),this.lastVisible=this.props.visible},t.prototype.shouldComponentUpdate=function(e){return e.visible||(this.lastVisible=!1),e.visible},t.prototype.componentDidUpdate=function(e){var t=this.props;!e.visible&&t.visible&&this.scrollActiveItemToView(),this.lastVisible=t.visible,this.lastInputValue=t.inputValue},t.prototype.renderMenu=function(){var e=this,t=this.props,n=t.menuItems,r=t.defaultActiveFirstOption,a=t.value,o=t.prefixCls,l=t.multiple,u=t.onMenuSelect,s=t.inputValue,f=t.firstActiveValue,c=t.backfillValue;if(n&&n.length){var h={};l?(h.onDeselect=t.onMenuDeselect,h.onSelect=u):h.onClick=u;var y=(0,O.getSelectKeys)(n,a),m={},v=n;if(y.length||f){t.visible&&!this.lastVisible&&(m.activeKey=y[0]||f);var b=!1,_=function(t){return!b&&y.indexOf(t.key)!==-1||!b&&!y.length&&f.indexOf(t.key)!==-1?(b=!0,(0,d.cloneElement)(t,{ref:function(t){e.firstActiveItem=t}})):t};v=n.map(function(e){if(e.type.isMenuItemGroup){var t=(0,g.default)(e.props.children).map(_);return(0,d.cloneElement)(e,{},t)}return _(e)})}else this.firstActiveItem=null;var w=a&&a[a.length-1];return s===this.lastInputValue||w&&w===c||(m.activeKey=""),p.default.createElement(x.default,(0,i.default)({ref:this.saveMenuRef,style:this.props.dropdownMenuStyle,defaultActiveFirst:r,role:"listbox"},m,{multiple:l},h,{selectedKeys:y,prefixCls:o+"-menu"}),v)}return null},t.prototype.render=function(){var e=this.renderMenu();return e?p.default.createElement("div",{style:{overflow:"auto"},onFocus:this.props.onPopupFocus,onMouseDown:O.preventDefaultEvent,onScroll:this.props.onPopupScroll},e):null},t}(p.default.Component);E.propTypes={defaultActiveFirstOption:m.default.bool,value:m.default.any,dropdownMenuStyle:m.default.object,multiple:m.default.bool,onPopupFocus:m.default.func,onPopupScroll:m.default.func,onMenuDeSelect:m.default.func,onMenuSelect:m.default.func,prefixCls:m.default.string,menuItems:m.default.any,inputValue:m.default.string,visible:m.default.bool};var C=function(){var e=this;this.scrollActiveItemToView=function(){var t=(0,h.findDOMNode)(e.firstActiveItem),n=e.props;if(t){var r={onlyScrollIfNeeded:!0};n.value&&0!==n.value.length||!n.firstActiveValue||(r.alignWithTop=!0),(0,w.default)(t,(0,h.findDOMNode)(e.menuRef),r)}}};t.default=E,E.displayName="DropdownMenu",e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(3),i=r(a),o=n(5),l=r(o),u=n(4),s=r(u),f=n(1),c=r(f),d=function(e){function t(){return(0,i.default)(this,t),(0,l.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t}(c.default.Component);d.isSelectOptGroup=!0,t.default=d,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(){}function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var a=0;a<t.length;a++)t[a]&&"function"==typeof t[a]&&t[a].apply(this,n)}}t.__esModule=!0;var o=n(6),l=r(o),u=n(3),s=r(u),f=n(5),c=r(f),d=n(4),p=r(d),h=n(1),y=r(h),m=n(10),v=r(m),g=n(20),b=n(51),x=r(b),_=n(28),w=r(_),O=n(7),E=r(O),C=n(30),k=r(C),T=n(98),S=r(T),A=n(45),M=n(41),P=r(M),N=n(32),j=r(N),R=n(21),I=n(65),D=r(I),L=n(33),B=function(e){function t(n){(0,s.default)(this,t);var r=(0,c.default)(this,e.call(this,n));V.call(r);var a=t.getOptionsInfoFromProps(n);return r.state={value:t.getValueFromProps(n,!0),inputValue:n.combobox?t.getInputValueForCombobox(n,a,!0):"",open:n.defaultOpen,optionsInfo:a,skipBuildOptionsInfo:!0},r.saveInputRef=(0,R.saveRef)(r,"inputRef"),r.saveInputMirrorRef=(0,R.saveRef)(r,"inputMirrorRef"),r.saveTopCtrlRef=(0,R.saveRef)(r,"topCtrlRef"),r.saveSelectTriggerRef=(0,R.saveRef)(r,"selectTriggerRef"),r.saveRootRef=(0,R.saveRef)(r,"rootRef"),r.saveSelectionRef=(0,R.saveRef)(r,"selectionRef"),r}return(0,p.default)(t,e),t.prototype.componentDidMount=function(){this.props.autoFocus&&this.focus()},t.prototype.componentDidUpdate=function(){if((0,R.isMultipleOrTags)(this.props)){var e=this.getInputDOMNode(),t=this.getInputMirrorDOMNode();e.value?(e.style.width="",e.style.width=t.clientWidth+"px"):e.style.width=""}this.forcePopupAlign()},t.prototype.componentWillUnmount=function(){this.clearFocusTime(),this.clearBlurTime(),this.dropdownContainer&&(v.default.unmountComponentAtNode(this.dropdownContainer),document.body.removeChild(this.dropdownContainer),this.dropdownContainer=null)},t.prototype.focus=function(){(0,R.isSingleMode)(this.props)?this.selectionRef.focus():this.getInputDOMNode().focus()},t.prototype.blur=function(){(0,R.isSingleMode)(this.props)?this.selectionRef.blur():this.getInputDOMNode().blur()},t.prototype.renderClear=function(){var e=this.props,t=e.prefixCls,n=e.allowClear,r=this.state,a=r.value,i=r.inputValue,o=y.default.createElement("span",(0,l.default)({key:"clear",onMouseDown:R.preventDefaultEvent,style:R.UNSELECTABLE_STYLE},R.UNSELECTABLE_ATTRIBUTE,{className:t+"-selection__clear",onClick:this.onClearSelection}));return n?(0,R.isCombobox)(this.props)?i?o:null:i||a.length?o:null:null},t.prototype.render=function(){var e,t=this.props,n=(0,R.isMultipleOrTags)(t),r=this.state,a=t.className,i=t.disabled,o=t.prefixCls,u=this.renderTopControlNode(),s={},f=this.state.open;f&&(this._options=this.renderFilterOptions());var c=this.getRealOpenState(),d=this._options||[];(0,R.isMultipleOrTagsOrCombobox)(t)||(s={onKeyDown:this.onKeyDown,tabIndex:t.disabled?-1:0});var p=(e={},e[a]=!!a,e[o]=1,e[o+"-open"]=f,e[o+"-focused"]=f||!!this._focused,e[o+"-combobox"]=(0,R.isCombobox)(t),e[o+"-disabled"]=i,e[o+"-enabled"]=!i,e[o+"-allow-clear"]=!!t.allowClear,e[o+"-no-arrow"]=!t.showArrow,e);return y.default.createElement(D.default,{onPopupFocus:this.onPopupFocus,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,dropdownAlign:t.dropdownAlign,dropdownClassName:t.dropdownClassName,dropdownMatchSelectWidth:t.dropdownMatchSelectWidth,defaultActiveFirstOption:t.defaultActiveFirstOption,dropdownMenuStyle:t.dropdownMenuStyle,transitionName:t.transitionName,animation:t.animation,prefixCls:t.prefixCls,dropdownStyle:t.dropdownStyle,combobox:t.combobox,showSearch:t.showSearch,options:d,multiple:n,disabled:i,visible:c,inputValue:r.inputValue,value:r.value,backfillValue:r.backfillValue,firstActiveValue:t.firstActiveValue,onDropdownVisibleChange:this.onDropdownVisibleChange,getPopupContainer:t.getPopupContainer,onMenuSelect:this.onMenuSelect,onMenuDeselect:this.onMenuDeselect,onPopupScroll:t.onPopupScroll,showAction:t.showAction,ref:this.saveSelectTriggerRef},y.default.createElement("div",{style:t.style,ref:this.saveRootRef,onBlur:this.onOuterBlur,onFocus:this.onOuterFocus,className:(0,E.default)(p)},y.default.createElement("div",(0,l.default)({ref:this.saveSelectionRef,key:"selection",className:o+"-selection\n "+o+"-selection--"+(n?"multiple":"single"),role:"combobox","aria-autocomplete":"list","aria-haspopup":"true","aria-expanded":c},s),u,this.renderClear(),n||!t.showArrow?null:y.default.createElement("span",(0,l.default)({key:"arrow",className:o+"-arrow",style:R.UNSELECTABLE_STYLE},R.UNSELECTABLE_ATTRIBUTE,{onClick:this.onArrowClick}),y.default.createElement("b",null)))))},t}(y.default.Component);B.propTypes=L.SelectPropTypes,B.defaultProps={prefixCls:"rc-select",defaultOpen:!1,labelInValue:!1,defaultActiveFirstOption:!0,showSearch:!0,allowClear:!1,placeholder:"",onChange:a,onFocus:a,onBlur:a,onSelect:a,onSearch:a,onDeselect:a,onInputKeyDown:a,showArrow:!0,dropdownMatchSelectWidth:!0,dropdownStyle:{},dropdownMenuStyle:{},optionFilterProp:"value",optionLabelProp:"value",notFoundContent:"Not Found",backfill:!1,showAction:["click"],tokenSeparators:[],autoClearSearchValue:!0},B.getDerivedStateFromProps=function(e,t){var n=t.skipBuildOptionsInfo?t.optionsInfo:B.getOptionsInfoFromProps(e,t),r={optionsInfo:n,skipBuildOptionsInfo:!1};if("open"in e&&(r.open=e.open),"value"in e){var a=B.getValueFromProps(e);r.value=a,e.combobox&&(r.inputValue=B.getInputValueForCombobox(e,n))}return r},B.getOptionsFromChildren=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return y.default.Children.forEach(e,function(e){e&&(e.type.isSelectOptGroup?B.getOptionsFromChildren(e.props.children,t):t.push(e))}),t},B.getInputValueForCombobox=function(e,t,n){var r=[];if("value"in e&&!n&&(r=(0,R.toArray)(e.value)),"defaultValue"in e&&n&&(r=(0,R.toArray)(e.defaultValue)),!r.length)return"";r=r[0];var a=r;return e.labelInValue?a=r.label:t[(0,R.getMapKey)(r)]&&(a=t[(0,R.getMapKey)(r)].label),void 0===a&&(a=""),a},B.getLabelFromOption=function(e,t){return(0,R.getPropValue)(t,e.optionLabelProp)},B.getOptionsInfoFromProps=function(e,t){var n=B.getOptionsFromChildren(e.children),r={};if(n.forEach(function(t){var n=(0,R.getValuePropValue)(t);r[(0,R.getMapKey)(n)]={option:t,value:n,label:B.getLabelFromOption(e,t),title:t.props.title}}),t){var a=t.optionsInfo,i=t.value;i.forEach(function(e){var t=(0,R.getMapKey)(e);r[t]||void 0===a[t]||(r[t]=a[t])})}return r},B.getValueFromProps=function(e,t){var n=[];return"value"in e&&!t&&(n=(0,R.toArray)(e.value)),"defaultValue"in e&&t&&(n=(0,R.toArray)(e.defaultValue)),e.labelInValue&&(n=n.map(function(e){return e.key})),n};var V=function(){var e=this;this.onInputChange=function(t){var n=e.props.tokenSeparators,r=t.target.value;if((0,R.isMultipleOrTags)(e.props)&&n.length&&(0,R.includesSeparators)(r,n)){var a=e.getValueByInput(r);return void 0!==a&&e.fireChange(a),e.setOpenState(!1,!0),void e.setInputValue("",!1)}e.setInputValue(r),e.setState({open:!0}),(0,R.isCombobox)(e.props)&&e.fireChange([r])},this.onDropdownVisibleChange=function(t){t&&!e._focused&&(e.clearBlurTime(),e.timeoutFocus(),e._focused=!0,e.updateFocusClassName()),e.setOpenState(t)},this.onKeyDown=function(t){var n=e.props;if(!n.disabled){var r=t.keyCode;e.state.open&&!e.getInputDOMNode()?e.onInputKeyDown(t):r!==x.default.ENTER&&r!==x.default.DOWN||(e.setOpenState(!0),t.preventDefault())}},this.onInputKeyDown=function(t){var n=e.props;if(!n.disabled){var r=e.state,a=t.keyCode;if((0,R.isMultipleOrTags)(n)&&!t.target.value&&a===x.default.BACKSPACE){t.preventDefault();var i=r.value;return void(i.length&&e.removeSelected(i[i.length-1]))}if(a===x.default.DOWN){if(!r.open)return e.openIfHasChildren(),t.preventDefault(),void t.stopPropagation()}else if(a===x.default.ENTER&&r.open)t.preventDefault();else if(a===x.default.ESC)return void(r.open&&(e.setOpenState(!1),t.preventDefault(),t.stopPropagation()));if(r.open){var o=e.selectTriggerRef.getInnerMenu();o&&o.onKeyDown(t,e.handleBackfill)&&(t.preventDefault(),t.stopPropagation())}}},this.onMenuSelect=function(t){var n=t.item;if(n){var r=e.state.value,a=e.props,i=(0,R.getValuePropValue)(n),o=r[r.length-1];if(e.fireSelect(i),(0,R.isMultipleOrTags)(a)){if((0,R.findIndexInValueBySingleValue)(r,i)!==-1)return;r=r.concat([i])}else{if(o&&o===i&&i!==e.state.backfillValue)return void e.setOpenState(!1,!0);r=[i],e.setOpenState(!1,!0)}e.fireChange(r);var l=void 0;l=(0,R.isCombobox)(a)?(0,R.getPropValue)(n,a.optionLabelProp):"",a.autoClearSearchValue&&e.setInputValue(l,!1)}},this.onMenuDeselect=function(t){var n=t.item,r=t.domEvent;"click"===r.type&&e.removeSelected((0,R.getValuePropValue)(n));var a=e.props;a.autoClearSearchValue&&e.setInputValue("",!1)},this.onArrowClick=function(t){t.stopPropagation(),t.preventDefault(),e.props.disabled||e.setOpenState(!e.state.open,!e.state.open)},this.onPlaceholderClick=function(){e.getInputDOMNode()&&e.getInputDOMNode().focus()},this.onOuterFocus=function(t){return e.props.disabled?void t.preventDefault():(e.clearBlurTime(),void(((0,R.isMultipleOrTagsOrCombobox)(e.props)||t.target!==e.getInputDOMNode())&&(e._focused||(e._focused=!0,e.updateFocusClassName(),e.timeoutFocus()))))},this.onPopupFocus=function(){e.maybeFocus(!0,!0)},this.onOuterBlur=function(t){return e.props.disabled?void t.preventDefault():void(e.blurTimer=setTimeout(function(){e._focused=!1,e.updateFocusClassName();var t=e.props,n=e.state.value,r=e.state.inputValue;if((0,R.isSingleMode)(t)&&t.showSearch&&r&&t.defaultActiveFirstOption){var a=e._options||[];if(a.length){var i=(0,R.findFirstMenuItem)(a);i&&(n=[(0,R.getValuePropValue)(i)],e.fireChange(n))}}else(0,R.isMultipleOrTags)(t)&&r&&(e.state.inputValue=e.getInputDOMNode().value="",n=e.getValueByInput(r),void 0!==n&&e.fireChange(n));t.onBlur(e.getVLForOnChange(n)),e.setOpenState(!1)},10))},this.onClearSelection=function(t){var n=e.props,r=e.state;if(!n.disabled){var a=r.inputValue,i=r.value;t.stopPropagation(),(a||i.length)&&(i.length&&e.fireChange([]),e.setOpenState(!1,!0),a&&e.setInputValue(""))}},this.onChoiceAnimationLeave=function(){e.forcePopupAlign()},this.getOptionInfoBySingleValue=function(t,n){var r=void 0;if(n=n||e.state.optionsInfo,n[(0,R.getMapKey)(t)]&&(r=n[(0,R.getMapKey)(t)]),r)return r;var a=t;if(e.props.labelInValue){var i=(0,R.getLabelFromPropsValue)(e.props.value,t);void 0!==i&&(a=i)}var o={option:y.default.createElement(j.default,{value:t,key:t},t),value:t,label:a};return o},this.getOptionBySingleValue=function(t){var n=e.getOptionInfoBySingleValue(t),r=n.option;return r},this.getOptionsBySingleValue=function(t){return t.map(function(t){return e.getOptionBySingleValue(t)})},this.getValueByLabel=function(t){if(void 0===t)return null;var n=null;return Object.keys(e.state.optionsInfo).forEach(function(r){var a=e.state.optionsInfo[r];(0,R.toArray)(a.label).join("")===t&&(n=a.value)}),n},this.getVLBySingleValue=function(t){return e.props.labelInValue?{key:t,label:e.getLabelBySingleValue(t)}:t},this.getVLForOnChange=function(t){var n=t;return void 0!==n?(n=e.props.labelInValue?n.map(function(t){return{key:t,label:e.getLabelBySingleValue(t)}}):n.map(function(e){return e}),(0,R.isMultipleOrTags)(e.props)?n:n[0]):n},this.getLabelBySingleValue=function(t,n){var r=e.getOptionInfoBySingleValue(t,n),a=r.label;return a},this.getDropdownContainer=function(){return e.dropdownContainer||(e.dropdownContainer=document.createElement("div"),document.body.appendChild(e.dropdownContainer)),e.dropdownContainer},this.getPlaceholderElement=function(){var t=e.props,n=e.state,r=!1;n.inputValue&&(r=!0),n.value.length&&(r=!0),(0,R.isCombobox)(t)&&1===n.value.length&&!n.value[0]&&(r=!1);var a=t.placeholder;return a?y.default.createElement("div",(0,l.default)({onMouseDown:R.preventDefaultEvent,style:(0,l.default)({display:r?"none":"block"},R.UNSELECTABLE_STYLE)},R.UNSELECTABLE_ATTRIBUTE,{onClick:e.onPlaceholderClick,className:t.prefixCls+"-selection__placeholder"}),a):null},this.getInputElement=function(){var t,n=e.props,r=n.getInputElement?n.getInputElement():y.default.createElement("input",{id:n.id,autoComplete:"off"}),a=(0,E.default)(r.props.className,(t={},t[n.prefixCls+"-search__field"]=!0,t));return y.default.createElement("div",{className:n.prefixCls+"-search__field__wrap"},y.default.cloneElement(r,{ref:e.saveInputRef,onChange:e.onInputChange,onKeyDown:i(e.onInputKeyDown,r.props.onKeyDown,e.props.onInputKeyDown),value:e.state.inputValue,disabled:n.disabled,className:a}),y.default.createElement("span",{ref:e.saveInputMirrorRef,className:n.prefixCls+"-search__field__mirror"},e.state.inputValue,"\xa0"))},this.getInputDOMNode=function(){return e.topCtrlRef?e.topCtrlRef.querySelector("input,textarea,div[contentEditable]"):e.inputRef},this.getInputMirrorDOMNode=function(){return e.inputMirrorRef},this.getPopupDOMNode=function(){return e.selectTriggerRef.getPopupDOMNode()},this.getPopupMenuComponent=function(){return e.selectTriggerRef.getInnerMenu()},this.setOpenState=function(t,n){var r=e.props,a=e.state;if(a.open===t)return void e.maybeFocus(t,n);var i={open:t,backfillValue:void 0};!t&&(0,R.isSingleMode)(r)&&r.showSearch&&e.setInputValue("",!1),t||e.maybeFocus(t,n),e.setState(i,function(){t&&e.maybeFocus(t,n)})},this.setInputValue=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t!==e.state.inputValue&&(e.setState({inputValue:t},e.forcePopupAlign),n&&e.props.onSearch(t))},this.getValueByInput=function(t){var n=e.props,r=n.multiple,a=n.tokenSeparators,i=e.state.value,o=!1;return(0,R.splitBySeparators)(t,a).forEach(function(t){var n=[t];if(r){var a=e.getValueByLabel(t);a&&(0,R.findIndexInValueBySingleValue)(i,a)===-1&&(i=i.concat(a),o=!0,e.fireSelect(a))}else(0,R.findIndexInValueBySingleValue)(i,t)===-1&&(i=i.concat(n),o=!0,e.fireSelect(t))}),o?i:void 0},this.getRealOpenState=function(){var t=e.state.open,n=e._options||[];return!(0,R.isMultipleOrTagsOrCombobox)(e.props)&&e.props.showSearch||t&&!n.length&&(t=!1),t},this.handleBackfill=function(t){if(e.props.backfill&&((0,R.isSingleMode)(e.props)||(0,R.isCombobox)(e.props))){var n=(0,R.getValuePropValue)(t);(0,R.isCombobox)(e.props)&&e.setInputValue(n,!1),e.setState({value:[n],backfillValue:n})}},this.filterOption=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:R.defaultFilterFn,a=e.state.value,i=a[a.length-1];if(!t||i&&i===e.state.backfillValue)return!0;var o=e.props.filterOption;return"filterOption"in e.props?e.props.filterOption===!0&&(o=r):o=r,!o||("function"==typeof o?o.call(e,t,n):!n.props.disabled)},this.timeoutFocus=function(){e.focusTimer&&e.clearFocusTime(),e.focusTimer=setTimeout(function(){e.props.onFocus()},10)},this.clearFocusTime=function(){e.focusTimer&&(clearTimeout(e.focusTimer),e.focusTimer=null)},this.clearBlurTime=function(){e.blurTimer&&(clearTimeout(e.blurTimer),e.blurTimer=null)},this.updateFocusClassName=function(){var t=e.rootRef,n=e.props;e._focused?(0,S.default)(t).add(n.prefixCls+"-focused"):(0,S.default)(t).remove(n.prefixCls+"-focused")},this.maybeFocus=function(t,n){if(n||t){var r=e.getInputDOMNode(),a=document,i=a.activeElement;r&&(t||(0,R.isMultipleOrTagsOrCombobox)(e.props))?i!==r&&(r.focus(),e._focused=!0):i!==e.selectionRef&&(e.selectionRef.focus(),e._focused=!0)}},this.removeSelected=function(t,n){var r=e.props;if(!r.disabled&&!e.isChildDisabled(t)){n&&n.stopPropagation&&n.stopPropagation();var a=e.state.value.filter(function(e){return e!==t}),i=(0,R.isMultipleOrTags)(r);if(i){var o=t;r.labelInValue&&(o={key:t,label:e.getLabelBySingleValue(t)}),r.onDeselect(o,e.getOptionBySingleValue(t))}e.fireChange(a)}},this.openIfHasChildren=function(){var t=e.props;(y.default.Children.count(t.children)||(0,R.isSingleMode)(t))&&e.setOpenState(!0)},this.fireSelect=function(t){e.props.onSelect(e.getVLBySingleValue(t),e.getOptionBySingleValue(t))},this.fireChange=function(t){var n=e.props;"value"in n||e.setState({value:t},e.forcePopupAlign);var r=e.getVLForOnChange(t),a=e.getOptionsBySingleValue(t);n.onChange(r,(0,R.isMultipleOrTags)(e.props)?a:a[0])},this.isChildDisabled=function(t){return(0,w.default)(e.props.children).some(function(e){var n=(0,R.getValuePropValue)(e);return n===t&&e.props&&e.props.disabled})},this.forcePopupAlign=function(){e.selectTriggerRef.triggerRef.forcePopupAlign()},this.renderFilterOptions=function(){var t=e.state.inputValue,n=e.props,r=n.children,a=n.tags,i=n.filterOption,o=n.notFoundContent,l=[],u=[],s=e.renderFilterOptionsFromChildren(r,u,l);if(a){var f=e.state.value;if(f=f.filter(function(e){return u.indexOf(e)===-1&&(!t||String(e).indexOf(String(t))>-1)}),f.forEach(function(e){var t=e,n=y.default.createElement(A.Item,{style:R.UNSELECTABLE_STYLE,role:"option",attribute:R.UNSELECTABLE_ATTRIBUTE,value:t,key:t},t);s.push(n),l.push(n)}),t){var c=l.every(function(n){var r=function(){return(0,R.getValuePropValue)(n)===t};return i!==!1?!e.filterOption.call(e,t,n,r):!r()});c&&s.unshift(y.default.createElement(A.Item,{style:R.UNSELECTABLE_STYLE,role:"option",attribute:R.UNSELECTABLE_ATTRIBUTE,value:t,key:t},t))}}return!s.length&&o&&(s=[y.default.createElement(A.Item,{style:R.UNSELECTABLE_STYLE,attribute:R.UNSELECTABLE_ATTRIBUTE,disabled:!0,role:"option",value:"NOT_FOUND",key:"NOT_FOUND"},o)]),s},this.renderFilterOptionsFromChildren=function(t,n,r){var a=[],i=e.props,o=e.state.inputValue,u=i.tags;return y.default.Children.forEach(t,function(t){if(t)if(t.type.isSelectOptGroup){var i=e.renderFilterOptionsFromChildren(t.props.children,n,r);if(i.length){var s=t.props.label,f=t.key;f||"string"!=typeof s?!s&&f&&(s=f):f=s,a.push(y.default.createElement(A.ItemGroup,{key:f,title:s},i))}}else{(0,P.default)(t.type.isSelectOption,"the children of `Select` should be `Select.Option` or `Select.OptGroup`, "+("instead of `"+(t.type.name||t.type.displayName||t.type)+"`."));var c=(0,R.getValuePropValue)(t);if((0,R.validateOptionValue)(c,e.props),e.filterOption(o,t)){var d=y.default.createElement(A.Item,(0,l.default)({style:R.UNSELECTABLE_STYLE,attribute:R.UNSELECTABLE_ATTRIBUTE,value:c,key:c,role:"option"},t.props));a.push(d),r.push(d)}u&&n.push(c)}}),a},this.renderTopControlNode=function(){var t=e.state,n=t.value,r=t.open,a=t.inputValue,i=e.props,o=i.choiceTransitionName,u=i.prefixCls,s=i.maxTagTextLength,f=i.maxTagCount,c=i.maxTagPlaceholder,d=i.showSearch,p=u+"-selection__rendered",h=null;if((0,R.isSingleMode)(i)){var m=null;if(n.length){var v=!1,g=1;d&&r?(v=!a,v&&(g=.4)):v=!0;var b=n[0],x=e.getOptionInfoBySingleValue(b),_=x.label,w=x.title;m=y.default.createElement("div",{key:"value",className:u+"-selection-selected-value",title:(0,R.toTitle)(w||_),style:{display:v?"block":"none",opacity:g}},_)}h=d?[m,y.default.createElement("div",{className:u+"-search "+u+"-search--inline",key:"input",style:{display:r?"block":"none"}},e.getInputElement())]:[m]}else{var O=[],E=n,C=void 0;if(void 0!==f&&n.length>f){E=E.slice(0,f);var T=e.getVLForOnChange(n.slice(f,n.length)),S="+ "+(n.length-f)+" ...";c&&(S="function"==typeof c?c(T):c),C=y.default.createElement("li",(0,l.default)({style:R.UNSELECTABLE_STYLE},R.UNSELECTABLE_ATTRIBUTE,{onMouseDown:R.preventDefaultEvent,className:u+"-selection__choice "+u+"-selection__choice__disabled",key:"maxTagPlaceholder",title:(0,R.toTitle)(S)}),y.default.createElement("div",{className:u+"-selection__choice__content"},S))}(0,R.isMultipleOrTags)(i)&&(O=E.map(function(t){var n=e.getOptionInfoBySingleValue(t),r=n.label,a=n.title||r;s&&"string"==typeof r&&r.length>s&&(r=r.slice(0,s)+"...");var i=e.isChildDisabled(t),o=i?u+"-selection__choice "+u+"-selection__choice__disabled":u+"-selection__choice";return y.default.createElement("li",(0,l.default)({style:R.UNSELECTABLE_STYLE},R.UNSELECTABLE_ATTRIBUTE,{onMouseDown:R.preventDefaultEvent,className:o,key:t,title:(0,R.toTitle)(a)}),y.default.createElement("div",{className:u+"-selection__choice__content"},r),i?null:y.default.createElement("span",{className:u+"-selection__choice__remove",onClick:function(n){e.removeSelected(t,n)}}))})),C&&O.push(C),O.push(y.default.createElement("li",{className:u+"-search "+u+"-search--inline",key:"__input"},e.getInputElement())),h=(0,R.isMultipleOrTags)(i)&&o?y.default.createElement(k.default,{onLeave:e.onChoiceAnimationLeave,component:"ul",transitionName:o},O):y.default.createElement("ul",null,O)}return y.default.createElement("div",{className:p,ref:e.saveTopCtrlRef},e.getPlaceholderElement(),h)}};B.displayName="Select",(0,g.polyfill)(B),t.default=B,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(6),i=r(a),o=n(16),l=r(o),u=n(3),s=r(u),f=n(5),c=r(f),d=n(4),p=r(d),h=n(70),y=r(h),m=n(1),v=r(m),g=n(2),b=r(g),x=n(7),_=r(x),w=n(62),O=r(w),E=n(10),C=r(E),k=n(21);y.default.displayName="Trigger";var T={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}},S=function(e){function t(n){(0,s.default)(this,t);var r=(0,c.default)(this,e.call(this,n));return A.call(r),r.saveDropdownMenuRef=(0,k.saveRef)(r,"dropdownMenuRef"),r.saveTriggerRef=(0,k.saveRef)(r,"triggerRef"),r.state={dropdownWidth:null},r}return(0,p.default)(t,e),t.prototype.componentDidMount=function(){this.setDropdownWidth()},t.prototype.componentDidUpdate=function(){this.setDropdownWidth()},t.prototype.render=function(){var e,t=this.props,n=t.onPopupFocus,r=(0,l.default)(t,["onPopupFocus"]),a=r.multiple,o=r.visible,u=r.inputValue,s=r.dropdownAlign,f=r.disabled,c=r.showSearch,d=r.dropdownClassName,p=r.dropdownStyle,h=r.dropdownMatchSelectWidth,m=this.getDropdownPrefixCls(),g=(e={},e[d]=!!d,e[m+"--"+(a?"multiple":"single")]=1,e),b=this.getDropdownElement({menuItems:r.options,onPopupFocus:n,multiple:a,inputValue:u,visible:o}),x=void 0;x=f?[]:(0,k.isSingleMode)(r)&&!c?["click"]:["blur"];var w=(0,i.default)({},p),O=h?"width":"minWidth";return this.state.dropdownWidth&&(w[O]=this.state.dropdownWidth+"px"),v.default.createElement(y.default,(0,i.default)({},r,{showAction:f?[]:this.props.showAction,hideAction:x,ref:this.saveTriggerRef,popupPlacement:"bottomLeft",builtinPlacements:T,prefixCls:m,popupTransitionName:this.getDropdownTransitionName(),onPopupVisibleChange:r.onDropdownVisibleChange,popup:b,popupAlign:s,popupVisible:o,getPopupContainer:r.getPopupContainer,popupClassName:(0,_.default)(g),popupStyle:w}),r.children)},t}(v.default.Component);S.propTypes={onPopupFocus:b.default.func,onPopupScroll:b.default.func,dropdownMatchSelectWidth:b.default.bool,dropdownAlign:b.default.object,visible:b.default.bool,disabled:b.default.bool,showSearch:b.default.bool,dropdownClassName:b.default.string,multiple:b.default.bool,inputValue:b.default.string,filterOption:b.default.any,options:b.default.any,prefixCls:b.default.string,popupClassName:b.default.string,children:b.default.any,showAction:b.default.arrayOf(b.default.string)};var A=function(){var e=this;this.setDropdownWidth=function(){var t=C.default.findDOMNode(e).offsetWidth;t!==e.state.dropdownWidth&&e.setState({dropdownWidth:t})},this.getInnerMenu=function(){return e.dropdownMenuRef&&e.dropdownMenuRef.menuRef},this.getPopupDOMNode=function(){return e.triggerRef.getPopupDomNode()},this.getDropdownElement=function(t){var n=e.props;return v.default.createElement(O.default,(0,i.default)({ref:e.saveDropdownMenuRef},t,{prefixCls:e.getDropdownPrefixCls(),onMenuSelect:n.onMenuSelect,onMenuDeselect:n.onMenuDeselect,onPopupScroll:n.onPopupScroll,value:n.value,backfillValue:n.backfillValue,firstActiveValue:n.firstActiveValue,defaultActiveFirstOption:n.defaultActiveFirstOption,dropdownMenuStyle:n.dropdownMenuStyle}))},this.getDropdownTransitionName=function(){var t=e.props,n=t.transitionName;return!n&&t.animation&&(n=e.getDropdownPrefixCls()+"-"+t.animation),n},this.getDropdownPrefixCls=function(){return e.props.prefixCls+"-dropdown"}};t.default=S,S.displayName="SelectTrigger",e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.translateStyle=t.AnimateGroup=t.configBezier=t.configSpring=void 0;var a=n(389),i=r(a),o=n(390),l=n(193),u=n(520),s=r(u);t.configSpring=o.configSpring,t.configBezier=o.configBezier,t.AnimateGroup=s.default, t.translateStyle=l.translateStyle,t.default=i.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(79),i=r(a),o=n(149),l=r(o);i.default.Group=l.default,t.default=i.default,e.exports=t.default},function(e,t,n){(function(e){var r=n(29),a=n(130),i="object"==typeof t&&t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,l=o&&o.exports===i,u=l?r.Buffer:void 0,s=u?u.isBuffer:void 0,f=s||a;e.exports=f}).call(t,n(74)(e))},function(e,t,n){var r=n(124),a=n(84),i=n(127),o=i&&i.isTypedArray,l=o?a(o):r;e.exports=l},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Group=t.Button=void 0;var a=n(36),i=r(a),o=n(109),l=r(o),u=n(110),s=r(u);i.default.Button=s.default,i.default.Group=l.default,t.Button=s.default,t.Group=l.default,t.default=i.default},,,,function(e,t,n){"use strict";function r(e,t,n){return!a(e.props,t)||!a(e.state,n)}var a=n(86),i={shouldComponentUpdate:function(e,t){return r(this,e,t)}};e.exports=i},,function(e,t){function n(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||r;return e===n}var r=Object.prototype;e.exports=n},,function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),o=a(i),l=n(6),u=a(l),s=n(3),f=a(s),c=n(8),d=a(c),p=n(5),h=a(p),y=n(4),m=a(y),v=n(1),g=r(v),b=n(2),x=a(b),_=n(7),w=a(_),O=n(59),E=a(O),C=n(22),k=a(C),T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]]);return n},S=function(e){function t(){(0,f.default)(this,t);var e=(0,h.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.saveCheckbox=function(t){e.rcCheckbox=t},e}return(0,m.default)(t,e),(0,d.default)(t,[{key:"shouldComponentUpdate",value:function(e,t,n){return!(0,k.default)(this.props,e)||!(0,k.default)(this.state,t)||!(0,k.default)(this.context.checkboxGroup,n.checkboxGroup)}},{key:"focus",value:function(){this.rcCheckbox.focus()}},{key:"blur",value:function(){this.rcCheckbox.blur()}},{key:"render",value:function(){var e=this.props,t=this.context,n=e.prefixCls,r=e.className,a=e.children,i=e.indeterminate,l=e.style,s=e.onMouseEnter,f=e.onMouseLeave,c=T(e,["prefixCls","className","children","indeterminate","style","onMouseEnter","onMouseLeave"]),d=t.checkboxGroup,p=(0,u.default)({},c);d&&(p.onChange=function(){return d.toggleOption({label:a,value:e.value})},p.checked=d.value.indexOf(e.value)!==-1,p.disabled=e.disabled||d.disabled);var h=(0,w.default)(r,(0,o.default)({},n+"-wrapper",!0)),y=(0,w.default)((0,o.default)({},n+"-indeterminate",i));return g.createElement("label",{className:h,style:l,onMouseEnter:s,onMouseLeave:f},g.createElement(E.default,(0,u.default)({},p,{prefixCls:n,className:y,ref:this.saveCheckbox})),void 0!==a?g.createElement("span",null,a):null)}}]),t}(g.Component);t.default=S,S.defaultProps={prefixCls:"ant-checkbox",indeterminate:!1},S.contextTypes={checkboxGroup:x.default.any},e.exports=t.default},function(e,t){function n(e){return!!e&&"object"==typeof e}function r(e,t){var n=null==e?void 0:e[t];return o(n)?n:void 0}function a(e){return i(e)&&d.call(e)==l}function i(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function o(e){return null!=e&&(a(e)?p.test(f.call(e)):n(e)&&u.test(e))}var l="[object Function]",u=/^\[object .+?Constructor\]$/,s=Object.prototype,f=Function.prototype.toString,c=s.hasOwnProperty,d=s.toString,p=RegExp("^"+f.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},function(e,t){function n(e){return a(e)&&h.call(e,"callee")&&(!m.call(e,"callee")||y.call(e)==f)}function r(e){return null!=e&&o(e.length)&&!i(e)}function a(e){return u(e)&&r(e)}function i(e){var t=l(e)?y.call(e):"";return t==c||t==d}function o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function l(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function u(e){return!!e&&"object"==typeof e}var s=9007199254740991,f="[object Arguments]",c="[object Function]",d="[object GeneratorFunction]",p=Object.prototype,h=p.hasOwnProperty,y=p.toString,m=p.propertyIsEnumerable;e.exports=n},function(e,t){function n(e){return!!e&&"object"==typeof e}function r(e,t){var n=null==e?void 0:e[t];return l(n)?n:void 0}function a(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=v}function i(e){return o(e)&&h.call(e)==s}function o(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function l(e){return null!=e&&(i(e)?y.test(d.call(e)):n(e)&&f.test(e))}var u="[object Array]",s="[object Function]",f=/^\[object .+?Constructor\]$/,c=Object.prototype,d=Function.prototype.toString,p=c.hasOwnProperty,h=c.toString,y=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=r(Array,"isArray"),v=9007199254740991,g=m||function(e){return n(e)&&a(e.length)&&h.call(e)==u};e.exports=g},function(e,t,n){function r(e){return function(t){return null==t?void 0:t[e]}}function a(e){return null!=e&&o(g(e))}function i(e,t){return e="number"==typeof e||p.test(e)?+e:-1,t=null==t?v:t,e>-1&&e%1==0&&e<t}function o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=v}function l(e){for(var t=s(e),n=t.length,r=n&&e.length,a=!!r&&o(r)&&(d(e)||c(e)),l=-1,u=[];++l<n;){var f=t[l];(a&&i(f,r)||y.call(e,f))&&u.push(f)}return u}function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){if(null==e)return[];u(e)||(e=Object(e));var t=e.length;t=t&&o(t)&&(d(e)||c(e))&&t||0;for(var n=e.constructor,r=-1,a="function"==typeof n&&n.prototype===e,l=Array(t),s=t>0;++r<t;)l[r]=r+"";for(var f in e)s&&i(f,t)||"constructor"==f&&(a||!y.call(e,f))||l.push(f);return l}var f=n(80),c=n(81),d=n(82),p=/^\d+$/,h=Object.prototype,y=h.hasOwnProperty,m=f(Object,"keys"),v=9007199254740991,g=r("length"),b=m?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&a(e)?l(e):u(e)?m(e):[]}:l;e.exports=b},function(e,t){function n(e){return function(t){return e(t)}}e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(6),i=r(a),o=n(16),l=r(o),u=n(3),s=r(u),f=n(5),c=r(f),d=n(4),p=r(d),h=n(1),y=r(h),m=n(2),v=r(m),g=n(75),b=r(g),x=n(7),_=r(x),w=function(e){function t(n){(0,s.default)(this,t);var r=(0,c.default)(this,e.call(this,n));O.call(r);var a="checked"in n?n.checked:n.defaultChecked;return r.state={checked:a},r}return(0,p.default)(t,e),t.prototype.componentWillReceiveProps=function(e){"checked"in e&&this.setState({checked:e.checked})},t.prototype.shouldComponentUpdate=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return b.default.shouldComponentUpdate.apply(this,t)},t.prototype.focus=function(){this.input.focus()},t.prototype.blur=function(){this.input.blur()},t.prototype.render=function(){var e,t=this.props,n=t.prefixCls,r=t.className,a=t.style,o=t.name,u=t.id,s=t.type,f=t.disabled,c=t.readOnly,d=t.tabIndex,p=t.onClick,h=t.onFocus,m=t.onBlur,v=t.autoFocus,g=t.value,b=(0,l.default)(t,["prefixCls","className","style","name","id","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur","autoFocus","value"]),x=Object.keys(b).reduce(function(e,t){return"aria-"!==t.substr(0,5)&&"data-"!==t.substr(0,5)&&"role"!==t||(e[t]=b[t]),e},{}),w=this.state.checked,O=(0,_.default)(n,r,(e={},e[n+"-checked"]=w,e[n+"-disabled"]=f,e));return y.default.createElement("span",{className:O,style:a},y.default.createElement("input",(0,i.default)({name:o,id:u,type:s,readOnly:c,disabled:f,tabIndex:d,className:n+"-input",checked:!!w,onClick:p,onFocus:h,onBlur:m,onChange:this.handleChange,autoFocus:v,ref:this.saveInput,value:g},x)),y.default.createElement("span",{className:n+"-inner"}))},t}(y.default.Component);w.propTypes={prefixCls:v.default.string,className:v.default.string,style:v.default.object,name:v.default.string,id:v.default.string,type:v.default.string,defaultChecked:v.default.oneOfType([v.default.number,v.default.bool]),checked:v.default.oneOfType([v.default.number,v.default.bool]),disabled:v.default.bool,onFocus:v.default.func,onBlur:v.default.func,onChange:v.default.func,onClick:v.default.func,tabIndex:v.default.string,readOnly:v.default.bool,autoFocus:v.default.bool,value:v.default.any},w.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){}};var O=function(){var e=this;this.handleChange=function(t){var n=e.props;n.disabled||("checked"in n||e.setState({checked:t.target.checked}),n.onChange({target:(0,i.default)({},n,{checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},this.saveInput=function(t){e.input=t}};t.default=w,e.exports=t.default},function(e,t,n){"use strict";var r=n(83);e.exports=function(e,t,n,a){var i=n?n.call(a,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var o=r(e),l=r(t),u=o.length;if(u!==l.length)return!1;a=a||null;for(var s=Object.prototype.hasOwnProperty.bind(t),f=0;f<u;f++){var c=o[f];if(!s(c))return!1;var d=e[c],p=t[c],h=n?n.call(a,d,p,c):void 0;if(h===!1||void 0===h&&d!==p)return!1}return!0}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var f=n(381),c=r(f),d=n(15),p=r(d),h=n(380),y=r(h),m=n(502),v=r(m),g=n(44),b=r(g),x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),w=n(1),O=r(w),E=n(2),C=r(E),k=n(17),T=r(k),S=n(160),A=r(S),M=n(23),P=r(M),N=n(195),j=r(N),R=n(292),I=r(R),D=n(133),L=r(D),B=n(400),V=r(B),F=n(198),z=r(F),W=n(103),K=r(W),U=n(134),G=r(U),H=n(12),q=n(393),Y=r(q),X=n(392),J=r(X),$=n(296),Z=n(18),Q=n(25),ee=n(55),te=n(13),ne=n(550),re={xAxis:["bottom","top"],yAxis:["left","right"]},ae={x:0,y:0},ie=function(e){var t,n,r,f=e.chartName,d=e.GraphicalChild,h=e.eventType,m=void 0===h?"axis":h,g=e.axisComponents,E=e.legendContent,k=e.formatAxisMap,S=e.defaultProps,M=e.propTypes,N=(n=t=function(e){function t(e){l(this,t);var n=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));r.call(n);var a=n.constructor.createDefaultState(e),i=0;return n.state=x({},a,{updateId:0},n.updateStateOfAxisMapsOffsetAndStackGroups(x({props:e},a,{updateId:i}))),n.uniqueChartId=(0,b.default)(e.id)?(0,Z.uniqueId)("recharts"):e.id,e.throttleDelay&&(n.triggeredAfterMouseMove=(0,v.default)(n.triggeredAfterMouseMove,e.throttleDelay)),n}return s(t,e),_(t,[{key:"componentDidMount",value:function(){(0,b.default)(this.props.syncId)||this.addListener()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.data,r=t.children,a=t.width,i=t.height,o=t.layout,l=t.stackOffset,u=t.margin,s=this.state.updateId;if(e.data===n&&e.width===a&&e.height===i&&e.layout===o&&e.stackOffset===l&&(0,te.shallowEqual)(e.margin,u)){if(!(0,H.isChildrenEqual)(e.children,r)){var f=!(0,b.default)(e.data),c=f?s:s+1,d=this.state,p=d.dataStartIndex,h=d.dataEndIndex,y=x({},this.constructor.createDefaultState(e),{dataEndIndex:h,dataStartIndex:p});this.setState(x({},y,{updateId:c},this.updateStateOfAxisMapsOffsetAndStackGroups(x({props:e},y,{updateId:c}))))}}else{var m=this.constructor.createDefaultState(e);this.setState(x({},m,{updateId:s+1},this.updateStateOfAxisMapsOffsetAndStackGroups(x({props:e},m,{updateId:s+1}))))}(0,b.default)(this.props.syncId)&&!(0,b.default)(e.syncId)&&this.addListener(),!(0,b.default)(this.props.syncId)&&(0,b.default)(e.syncId)&&this.removeListener()}},{key:"componentWillUnmount",value:function(){(0,b.default)(this.props.syncId)||this.removeListener(),"function"==typeof this.triggeredAfterMouseMove.cancel&&this.triggeredAfterMouseMove.cancel()}},{key:"getAxisMap",value:function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,a=t.AxisComp,i=t.graphicalItems,o=t.stackGroups,l=t.dataStartIndex,u=t.dataEndIndex,s=e.children,f=r+"Id",c=(0,H.findAllByType)(s,a),d={};return c&&c.length?d=this.getAxisMapByAxes(e,{axes:c,graphicalItems:i,axisType:r,axisIdKey:f,stackGroups:o,dataStartIndex:l,dataEndIndex:u}):i&&i.length&&(d=this.getAxisMapByItems(e,{Axis:a,graphicalItems:i,axisType:r,axisIdKey:f,stackGroups:o,dataStartIndex:l,dataEndIndex:u})),d}},{key:"getAxisMapByAxes",value:function(e,t){var n=this,r=t.axes,a=t.graphicalItems,l=t.axisType,u=t.axisIdKey,s=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,d=e.layout,p=e.children,h=e.stackOffset,m=(0,Q.isCategorialAxis)(d,l),v=r.reduce(function(t,r){var v=r.props,g=v.type,_=v.dataKey,w=v.allowDataOverflow,O=v.allowDuplicatedCategory,E=v.scale,C=v.ticks,k=r.props[u],T=n.constructor.getDisplayedData(e,{graphicalItems:a.filter(function(e){return e.props[u]===k}),dataStartIndex:f,dataEndIndex:c}),S=T.length;if(!t[k]){var A=void 0,M=void 0,P=void 0;if(_){if(A=(0,Q.getDomainOfDataByKey)(T,_,g),"category"===g&&m){var N=(0,Z.hasDuplicate)(A);O&&N?(M=A,A=(0,y.default)(0,S)):O||(A=(0,Q.parseDomainOfCategoryAxis)(r.props.domain,A,r).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(o(e),[t])},[]))}else if("category"===g)A=O?A.filter(function(e){return""!==e&&!(0,b.default)(e)}):(0,Q.parseDomainOfCategoryAxis)(r.props.domain,A,r).reduce(function(e,t){return e.indexOf(t)>=0||""===t||(0,b.default)(t)?e:[].concat(o(e),[t])},[]);else if("number"===g){var j=(0,Q.parseErrorBarsOfAxis)(T,a.filter(function(e){return e.props[u]===k&&!e.props.hide}),_,l);j&&(A=j)}!m||"number"!==g&&"auto"===E||(P=(0,Q.getDomainOfDataByKey)(T,_,"category"))}else A=m?(0,y.default)(0,S):s&&s[k]&&s[k].hasStack&&"number"===g?"expand"===h?[0,1]:(0,Q.getDomainOfStackGroups)(s[k].stackGroups,f,c):(0,Q.getDomainOfItemsWithSameAxis)(T,a.filter(function(e){return e.props[u]===k&&!e.props.hide}),g,!0);return"number"===g&&(A=(0,Q.detectReferenceElementsDomain)(p,A,k,l,C),r.props.domain&&(A=(0,Q.parseSpecifiedDomain)(r.props.domain,A,w))),x({},t,i({},k,x({},r.props,{axisType:l,domain:A,categoricalDomain:P,duplicateDomain:M,originalDomain:r.props.domain,isCategorial:m,layout:d})))}return t},{});return v}},{key:"getAxisMapByItems",value:function(e,t){var n=t.graphicalItems,r=t.Axis,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,u=t.dataStartIndex,s=t.dataEndIndex,f=e.layout,c=e.children,d=this.constructor.getDisplayedData(e,{graphicalItems:n,dataStartIndex:u,dataEndIndex:s}),p=d.length,h=(0,Q.isCategorialAxis)(f,a),m=-1,v=n.reduce(function(e,t){var v=t.props[o];if(!e[v]){m++;var g=void 0;return h?g=(0,y.default)(0,p):l&&l[v]&&l[v].hasStack?(g=(0,Q.getDomainOfStackGroups)(l[v].stackGroups,u,s),g=(0,Q.detectReferenceElementsDomain)(c,g,v,a)):(g=(0,Q.parseSpecifiedDomain)(r.defaultProps.domain,(0,Q.getDomainOfItemsWithSameAxis)(d,n.filter(function(e){return e.props[o]===v&&!e.props.hide}),"number"),r.defaultProps.allowDataOverflow),g=(0,Q.detectReferenceElementsDomain)(c,g,v,a)),x({},e,i({},v,x({axisType:a},r.defaultProps,{hide:!0,orientation:re[a]&&re[a][m%2],domain:g,originalDomain:r.defaultProps.domain,isCategorial:h,layout:f})))}return e},{});return v}},{key:"getActiveCoordinate",value:function(e,t,n){var r=this.props.layout,a=e.find(function(e){return e&&e.index===t});if(a){if("horizontal"===r)return{x:a.coordinate,y:n.y};if("vertical"===r)return{x:n.x,y:a.coordinate};if("centric"===r){var i=a.coordinate,o=n.radius;return x({},n,(0,ee.polarToCartesian)(n.cx,n.cy,o,i),{angle:i,radius:o})}var l=a.coordinate,u=n.angle;return x({},n,(0,ee.polarToCartesian)(n.cx,n.cy,l,u),{angle:u,radius:l})}return ae}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t=(0,$.getOffset)(this.container),n=(0,$.calculateChartCoordinate)(e,t),r=this.inRange(n.chartX,n.chartY);if(!r)return null;var a=this.state,i=a.xAxisMap,o=a.yAxisMap;if("axis"!==m&&i&&o){var l=(0,Z.getAnyElementOfObject)(i).scale,u=(0,Z.getAnyElementOfObject)(o).scale,s=l&&l.invert?l.invert(n.chartX):null,f=u&&u.invert?u.invert(n.chartY):null;return x({},n,{xValue:s,yValue:f})}var c=this.state,d=c.orderedTooltipTicks,p=c.tooltipAxis,h=c.tooltipTicks,y=this.calculateTooltipPos(r),v=(0,Q.calculateActiveTickIndex)(y,d,h,p);if(v>=0&&h){var g=h[v]&&h[v].value,b=this.getTooltipContent(v,g),_=this.getActiveCoordinate(d,v,r);return x({},n,{activeTooltipIndex:v,activeLabel:g,activePayload:b,activeCoordinate:_})}return null}},{key:"getTooltipContent",value:function(e,t){var n=this.state,r=n.graphicalItems,a=n.tooltipAxis,i=this.constructor.getDisplayedData(this.props,this.state);return e<0||!r||!r.length||e>=i.length?null:r.reduce(function(n,r){var l=r.props.hide;if(l)return n;var u=r.props,s=u.dataKey,f=u.name,c=u.unit,d=u.formatter,p=u.data,h=void 0;return h=a.dataKey&&!a.allowDuplicatedCategory?(0,Z.findEntryInArray)(p||i,a.dataKey,t):i[e],h?[].concat(o(n),[x({},(0,H.getPresentationAttributes)(r),{dataKey:s,unit:c,formatter:d,name:f||s,color:(0,Q.getMainColorOfGraphicItem)(r),value:(0,Q.getValueByDataKey)(h,s),payload:h})]):n},[])}},{key:"getFormatItems",value:function(e,t){var n=this,r=t.graphicalItems,a=t.stackGroups,o=t.offset,l=t.updateId,u=t.dataStartIndex,s=t.dataEndIndex,f=e.barSize,c=e.layout,d=e.barGap,p=e.barCategoryGap,h=e.maxBarSize,y=this.getAxisNameByLayout(c),m=y.numericAxisName,v=y.cateAxisName,_=this.constructor.hasBar(r),w=_&&(0,Q.getBarSizeList)({barSize:f,stackGroups:a}),O=[];return r.forEach(function(r,f){var y=n.constructor.getDisplayedData(e,{dataStartIndex:u,dataEndIndex:s},r),E=r.props,C=E.dataKey,k=E.maxBarSize,T=r.props[m+"Id"],S=r.props[v+"Id"],A=g.reduce(function(e,n){var a,o=t[n.axisType+"Map"],l=r.props[n.axisType+"Id"],u=o&&o[l];return x({},e,(a={},i(a,n.axisType,u),i(a,n.axisType+"Ticks",(0,Q.getTicksOfAxis)(u)),a))},{}),M=A[v],P=A[v+"Ticks"],N=a&&a[T]&&a[T].hasStack&&(0,Q.getStackedDataOfItem)(r,a[T].stackGroups),j=(0,Q.getBandSizeOfAxis)(M,P),R=(0,b.default)(k)?h:k,I=_&&(0,Q.getBarPosition)({barGap:d,barCategoryGap:p,bandSize:j,sizeList:w[S],maxBarSize:R}),D=r&&r.type&&r.type.getComposedData;if(D){var L;O.push({props:x({},D(x({},A,{displayedData:y,props:e,dataKey:C,item:r,bandSize:j,barPosition:I,offset:o,stackedData:N,layout:c,dataStartIndex:u,dataEndIndex:s,onItemMouseLeave:(0,Q.combineEventHandlers)(n.handleItemMouseLeave,null,r.props.onMouseLeave),onItemMouseEnter:(0,Q.combineEventHandlers)(n.handleItemMouseEnter,null,r.props.onMouseEnter)})),(L={key:r.key||"item-"+f},i(L,m,A[m]),i(L,v,A[v]),i(L,"animationId",l),L)),childIndex:(0,H.parseChildIndex)(r,e.children),item:r})}}),O}},{key:"getCursorRectangle",value:function(){var e=this.props.layout,t=this.state,n=t.activeCoordinate,r=t.offset,a=t.tooltipAxisBandSize,i=a/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?n.x-i:r.left+.5,y:"horizontal"===e?r.top+.5:n.y-i,width:"horizontal"===e?a:r.width-1,height:"horizontal"===e?r.height-1:a}}},{key:"getCursorPoints",value:function(){var e=this.props.layout,t=this.state,n=t.activeCoordinate,r=t.offset,a=void 0,i=void 0,o=void 0,l=void 0;if("horizontal"===e)a=n.x,o=a,i=r.top,l=r.top+r.height;else if("vertical"===e)i=n.y,l=i,a=r.left,o=r.left+r.width;else if(!(0,b.default)(n.cx)||!(0,b.default)(n.cy)){if("centric"!==e){var u=n.cx,s=n.cy,f=n.radius,c=n.startAngle,d=n.endAngle,p=(0,ee.polarToCartesian)(u,s,f,c),h=(0,ee.polarToCartesian)(u,s,f,d);return{points:[p,h],cx:u,cy:s,radius:f,startAngle:c,endAngle:d}}var y=n.cx,m=n.cy,v=n.innerRadius,g=n.outerRadius,x=n.angle,_=(0,ee.polarToCartesian)(y,m,v,x),w=(0,ee.polarToCartesian)(y,m,g,x);a=_.x,i=_.y,o=w.x,l=w.y}return[{x:a,y:i},{x:o,y:l}]}},{key:"getAxisNameByLayout",value:function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}}},{key:"calculateTooltipPos",value:function(e){var t=this.props.layout;return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}},{key:"inRange",value:function(e,t){var n=this.props.layout;if("horizontal"===n||"vertical"===n){var r=this.state.offset,a=e>=r.left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height;return a?{x:e,y:t}:null}var i=this.state,o=i.angleAxisMap,l=i.radiusAxisMap;if(o&&l){var u=(0,Z.getAnyElementOfObject)(o);return(0,ee.inRangeOfSector)({x:e,y:t},u)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=(0,H.findChildByType)(e,j.default),n=t&&"axis"===m?{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove}:{},r=(0,H.filterEventAttributes)(this.props,this.handleOuterEvent);return x({},r,n)}},{key:"updateStateOfAxisMapsOffsetAndStackGroups",value:function(e){var t=this,n=e.props,r=e.dataStartIndex,a=e.dataEndIndex,o=e.updateId;if(!(0,H.validateWidthHeight)({props:n}))return null;var l=n.children,u=n.layout,s=n.stackOffset,c=n.data,p=n.reverseStackOrder,h=this.getAxisNameByLayout(u),y=h.numericAxisName,m=h.cateAxisName,v=(0,H.findAllByType)(l,d),b=(0,Q.getStackGroupsByAxisId)(c,v,y+"Id",m+"Id",s,p),_=g.reduce(function(e,o){var l=o.axisType+"Map";return x({},e,i({},l,t.getAxisMap(n,x({},o,{graphicalItems:v,stackGroups:o.axisType===y&&b,dataStartIndex:r,dataEndIndex:a}))))},{}),w=this.calculateOffset(x({},_,{props:n,graphicalItems:v}));Object.keys(_).forEach(function(e){_[e]=k(n,_[e],w,e.replace("Map",""),f)});var O=_[m+"Map"],E=this.tooltipTicksGenerator(O),C=this.getFormatItems(n,x({},_,{dataStartIndex:r,dataEndIndex:a,updateId:o,graphicalItems:v,stackGroups:b,offset:w}));return x({formatedGraphicalItems:C,graphicalItems:v,offset:w,stackGroups:b},E,_)}},{key:"addListener",value:function(){ne.eventCenter.on(ne.SYNC_EVENT,this.handleReceiveSyncEvent),ne.eventCenter.setMaxListeners&&ne.eventCenter._maxListeners&&ne.eventCenter.setMaxListeners(ne.eventCenter._maxListeners+1)}},{key:"removeListener",value:function(){ne.eventCenter.removeListener(ne.SYNC_EVENT,this.handleReceiveSyncEvent),ne.eventCenter.setMaxListeners&&ne.eventCenter._maxListeners&&ne.eventCenter.setMaxListeners(ne.eventCenter._maxListeners-1)}},{key:"calculateOffset",value:function(e){var t=e.props,n=e.graphicalItems,r=e.xAxisMap,a=void 0===r?{}:r,o=e.yAxisMap,l=void 0===o?{}:o,u=t.width,s=t.height,f=t.children,c=t.margin||{},d=(0,H.findChildByType)(f,J.default),p=(0,H.findChildByType)(f,I.default),h=Object.keys(l).reduce(function(e,t){var n=l[t],r=n.orientation;return n.mirror||n.hide?e:x({},e,i({},r,e[r]+n.width))},{left:c.left||0,right:c.right||0}),y=Object.keys(a).reduce(function(e,t){var n=a[t],r=n.orientation;return n.mirror||n.hide?e:x({},e,i({},r,e[r]+n.height))},{top:c.top||0,bottom:c.bottom||0}),m=x({},y,h),v=m.bottom;if(d&&(m.bottom+=d.props.height||J.default.defaultProps.height),p&&this.legendInstance){var g=this.legendInstance.getBBox();m=(0,Q.appendOffsetOfLegend)(m,n,t,g)}return x({brushBottom:v},m,{width:u-m.left-m.right,height:s-m.top-m.bottom})}},{key:"triggerSyncEvent",value:function(e){var t=this.props.syncId;(0,b.default)(t)||ne.eventCenter.emit(ne.SYNC_EVENT,t,this.uniqueChartId,e)}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formatedGraphicalItems,a=0,i=r.length;a<i;a++){var o=r[a];if(o.item===e||o.props.key===e.key||t===(0,H.getDisplayName)(o.item.type)&&n===o.childIndex)return o}return null}},{key:"renderAxis",value:function(e,t,n,r){var a=this.props,i=a.width,o=a.height;return O.default.createElement(Y.default,x({},e,{className:"recharts-"+e.axisType+" "+e.axisType,key:t.key||n+"-"+r,viewBox:{x:0,y:0,width:i,height:o},ticksGenerator:this.axesTicksGenerator}))}},{key:"renderLegend",value:function(){var e=this,t=this.state.formatedGraphicalItems,n=this.props,r=n.children,i=n.width,o=n.height,l=this.props.margin||{},u=i-(l.left||0)-(l.right||0),s=o-(l.top||0)-(l.bottom||0),f=(0,Q.getLegendProps)({children:r,formatedGraphicalItems:t,legendWidth:u,legendHeight:s,legendContent:E});if(!f)return null;var c=f.item,d=a(f,["item"]);return(0,w.cloneElement)(c,x({},d,{chartWidth:i,chartHeight:o,margin:l,ref:function(t){e.legendInstance=t},onBBoxUpdate:this.handleLegendBBoxUpdate}))}},{key:"renderTooltip",value:function(){var e=this.props.children,t=(0,H.findChildByType)(e,j.default);if(!t)return null;var n=this.state,r=n.isTooltipActive,a=n.activeCoordinate,i=n.activePayload,o=n.activeLabel,l=n.offset;return(0,w.cloneElement)(t,{viewBox:x({},l,{x:l.left,y:l.top}),active:r,label:o,payload:r?i:[],coordinate:a})}},{key:"renderActiveDot",value:function(e,t){var n=void 0;return n=(0,w.isValidElement)(e)?(0,w.cloneElement)(e,t):(0,p.default)(e)?e(t):O.default.createElement(K.default,t),O.default.createElement(P.default,{className:"recharts-active-dot",key:t.key},n)}},{key:"renderActivePoints",value:function(e){var t=e.item,n=e.activePoint,r=e.basePoint,a=e.childIndex,i=e.isRange,o=[],l=t.props.key,u=t.item.props,s=u.activeDot,f=u.dataKey,c=x({index:a,dataKey:f,cx:n.x,cy:n.y,r:4,fill:(0,Q.getMainColorOfGraphicItem)(t.item),strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value,key:l+"-activePoint-"+a},(0,H.getPresentationAttributes)(s),(0,H.filterEventAttributes)(s));return o.push(this.renderActiveDot(s,c,a)),r?o.push(this.renderActiveDot(s,x({},c,{cx:r.x,cy:r.y,key:l+"-basePoint-"+a}),a)):i&&o.push(null),o}},{key:"render",value:function(){var e=this;if(!(0,H.validateWidthHeight)(this))return null;var t=this.props,n=t.children,r=t.className,i=t.width,o=t.height,l=t.style,u=t.compact,s=a(t,["children","className","width","height","style","compact"]),f=(0,H.getPresentationAttributes)(s),c={CartesianGrid:{handler:this.renderGrid,once:!0},ReferenceArea:{handler:this.renderReferenceElement},ReferenceLine:{handler:this.renderReferenceElement},ReferenceDot:{handler:this.renderReferenceElement},XAxis:{handler:this.renderXAxis},YAxis:{handler:this.renderYAxis},Brush:{handler:this.renderBrush,once:!0},Bar:{handler:this.renderGraphicChild},Line:{handler:this.renderGraphicChild},Area:{handler:this.renderGraphicChild},Radar:{handler:this.renderGraphicChild},RadialBar:{handler:this.renderGraphicChild},Scatter:{handler:this.renderGraphicChild},Pie:{handler:this.renderGraphicChild},Tooltip:{handler:this.renderCursor,once:!0},PolarGrid:{handler:this.renderPolarGrid,once:!0},PolarAngleAxis:{handler:this.renderPolarAxis},PolarRadiusAxis:{handler:this.renderPolarAxis}};if(u)return O.default.createElement(A.default,x({},f,{width:i,height:o}),(0,H.renderByOrder)(n,c));var d=this.parseEventsOfWrapper();return O.default.createElement("div",x({className:(0,T.default)("recharts-wrapper",r),style:x({},l,{position:"relative",cursor:"default",width:i,height:o})},d,{ref:function(t){e.container=t}}),O.default.createElement(A.default,x({},f,{width:i,height:o}),(0,H.renderByOrder)(n,c)),this.renderLegend(),this.renderTooltip())}}]),t}(w.Component),t.displayName=f,t.propTypes=x({syncId:C.default.oneOfType([C.default.string,C.default.number]),compact:C.default.bool,width:C.default.number,height:C.default.number,data:C.default.arrayOf(C.default.object),layout:C.default.oneOf(["horizontal","vertical"]),stackOffset:C.default.oneOf(["sign","expand","none","wiggle","silhouette"]),throttleDelay:C.default.number,margin:C.default.shape({top:C.default.number,right:C.default.number,bottom:C.default.number,left:C.default.number}),barCategoryGap:C.default.oneOfType([C.default.number,C.default.string]),barGap:C.default.oneOfType([C.default.number,C.default.string]),barSize:C.default.oneOfType([C.default.number,C.default.string]),maxBarSize:C.default.number,style:C.default.object,className:C.default.string,children:C.default.oneOfType([C.default.arrayOf(C.default.node),C.default.node]),onClick:C.default.func,onMouseLeave:C.default.func,onMouseEnter:C.default.func,onMouseMove:C.default.func,onMouseDown:C.default.func,onMouseUp:C.default.func,reverseStackOrder:C.default.bool,id:C.default.string},M),t.defaultProps=x({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1},S),t.createDefaultState=function(e){var t=e.children,n=(0,H.findChildByType)(t,J.default),r=n&&n.props&&n.props.startIndex||0,a=n&&n.props&&n.props.endIndex||e.data&&e.data.length-1||0;return{chartX:0,chartY:0,dataStartIndex:r,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!1}},t.hasBar=function(e){return!(!e||!e.length)&&e.some(function(e){var t=(0,H.getDisplayName)(e&&e.type);return t&&t.indexOf("Bar")>=0})},t.getDisplayedData=function(e,t,n){var r=t.graphicalItems,a=t.dataStartIndex,i=t.dataEndIndex,l=(r||[]).reduce(function(e,t){var n=t.props.data;return n&&n.length?[].concat(o(e),o(n)):e},[]);if(l&&l.length>0)return l;if(n&&n.props&&n.props.data&&n.props.data.length>0)return n.props.data;var u=e.data;return u&&u.length&&(0,Z.isNumber)(a)&&(0,Z.isNumber)(i)?u.slice(a,i+1):[]},r=function(){var e=this;this.handleLegendBBoxUpdate=function(t){if(t&&e.legendInstance){var n=e.state,r=n.dataStartIndex,a=n.dataEndIndex,i=n.updateId;e.setState(e.updateStateOfAxisMapsOffsetAndStackGroups({props:e.props,dataStartIndex:r,dataEndIndex:a,updateId:i}))}},this.handleReceiveSyncEvent=function(t,n,r){var a=e.props,i=a.syncId,o=a.layout,l=e.state.updateId;if(i===t&&n!==e.uniqueChartId){var u=r.dataStartIndex,s=r.dataEndIndex;if((0,b.default)(r.dataStartIndex)&&(0,b.default)(r.dataEndIndex))if((0,b.default)(r.activeTooltipIndex))e.setState(r);else{var f=r.chartX,c=r.chartY,d=r.activeTooltipIndex,p=e.state,h=p.offset,y=p.tooltipTicks;if(!h)return;var m=x({},h,{x:h.left,y:h.top}),v=Math.min(f,m.x+m.width),g=Math.min(c,m.y+m.height),_=y[d]&&y[d].value,w=e.getTooltipContent(d),O=y[d]?{x:"horizontal"===o?y[d].coordinate:v,y:"horizontal"===o?g:y[d].coordinate}:ae;e.setState(x({},r,{activeLabel:_,activeCoordinate:O,activePayload:w}))}else e.setState(x({dataStartIndex:u,dataEndIndex:s},e.updateStateOfAxisMapsOffsetAndStackGroups({props:e.props,dataStartIndex:u,dataEndIndex:s,updateId:l})))}},this.handleBrushChange=function(t){var n=t.startIndex,r=t.endIndex;if(n!==e.state.dataStartIndex||r!==e.state.dataEndIndex){var a=e.state.updateId;e.setState(function(){return x({dataStartIndex:n,dataEndIndex:r},e.updateStateOfAxisMapsOffsetAndStackGroups({props:e.props,dataStartIndex:n,dataEndIndex:r,updateId:a}))}),e.triggerSyncEvent({dataStartIndex:n,dataEndIndex:r})}},this.handleMouseEnter=function(t){ var n=e.props.onMouseEnter,r=e.getMouseInfo(t);if(r){var a=x({},r,{isTooltipActive:!0});e.setState(a),e.triggerSyncEvent(a),(0,p.default)(n)&&n(a,t)}},this.triggeredAfterMouseMove=function(t){var n=e.props.onMouseMove,r=e.getMouseInfo(t),a=r?x({},r,{isTooltipActive:!0}):{isTooltipActive:!1};e.setState(a),e.triggerSyncEvent(a),(0,p.default)(n)&&n(a,t)},this.handleItemMouseEnter=function(t){e.setState(function(){return{isTooltipActive:!0,activeItem:t,activePayload:t.tooltipPayload,activeCoordinate:t.tooltipPosition||{x:t.cx,y:t.cy}}})},this.handleItemMouseLeave=function(){e.setState(function(){return{isTooltipActive:!1}})},this.handleMouseMove=function(t){t&&(0,p.default)(t.persist)&&t.persist(),e.triggeredAfterMouseMove(t)},this.handleMouseLeave=function(t){var n=e.props.onMouseLeave,r={isTooltipActive:!1};e.setState(r),e.triggerSyncEvent(r),(0,p.default)(n)&&n(r,t)},this.handleOuterEvent=function(t){var n=(0,H.getReactEventByType)(t);if(n&&(0,p.default)(e.props[n])){var r=e.getMouseInfo(t),a=e.props[n];a(r,t)}},this.handleClick=function(t){var n=e.props.onClick;if((0,p.default)(n)){var r=e.getMouseInfo(t);n(r,t)}},this.handleMouseDown=function(t){var n=e.props.onMouseDown;if((0,p.default)(n)){var r=e.getMouseInfo(t);n(r,t)}},this.handleMouseUp=function(t){var n=e.props.onMouseUp;if((0,p.default)(n)){var r=e.getMouseInfo(t);n(r,t)}},this.handleTouchMove=function(t){null!=t.changedTouches&&t.changedTouches.length>0&&e.handleMouseMove(t.changedTouches[0])},this.verticalCoordinatesGenerator=function(e){var t=e.xAxis,n=e.width,r=e.height,a=e.offset;return(0,Q.getCoordinatesOfGrid)(Y.default.getTicks(x({},Y.default.defaultProps,t,{ticks:(0,Q.getTicksOfAxis)(t,!0),viewBox:{x:0,y:0,width:n,height:r}})),a.left,a.left+a.width)},this.horizontalCoordinatesGenerator=function(e){var t=e.yAxis,n=e.width,r=e.height,a=e.offset;return(0,Q.getCoordinatesOfGrid)(Y.default.getTicks(x({},Y.default.defaultProps,t,{ticks:(0,Q.getTicksOfAxis)(t,!0),viewBox:{x:0,y:0,width:n,height:r}})),a.top,a.top+a.height)},this.axesTicksGenerator=function(e){return(0,Q.getTicksOfAxis)(e,!0)},this.tooltipTicksGenerator=function(e){var t=(0,Z.getAnyElementOfObject)(e),n=(0,Q.getTicksOfAxis)(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:(0,c.default)(n,function(e){return e.coordinate}),tooltipAxis:t,tooltipAxisBandSize:(0,Q.getBandSizeOfAxis)(t)}},this.renderCursor=function(t){var n=e.state,r=n.isTooltipActive,a=n.activeCoordinate,i=n.activePayload,o=n.offset;if(!(t&&t.props.cursor&&r&&a))return null;var l=e.props.layout,u=void 0,s=L.default;if("ScatterChart"===f)u=a,s=V.default;else if("BarChart"===f)u=e.getCursorRectangle(),s=G.default;else if("radial"===l){var c=e.getCursorPoints(),d=c.cx,p=c.cy,h=c.radius,y=c.startAngle,m=c.endAngle;u={cx:d,cy:p,startAngle:y,endAngle:m,innerRadius:h,outerRadius:h},s=z.default}else u={points:e.getCursorPoints()},s=L.default;var v=t.key||"_recharts-cursor",g=x({stroke:"#ccc"},o,u,(0,H.getPresentationAttributes)(t.props.cursor),{payload:i,key:v,className:"recharts-tooltip-cursor"});return(0,w.isValidElement)(t.props.cursor)?(0,w.cloneElement)(t.props.cursor,g):(0,w.createElement)(s,g)},this.renderPolarAxis=function(t,n,r){var a=t.type.axisType,i=e.state[a+"Map"],o=i[t.props[a+"Id"]];return(0,w.cloneElement)(t,x({},o,{className:a,key:t.key||n+"-"+r,ticks:(0,Q.getTicksOfAxis)(o,!0)}))},this.renderXAxis=function(t,n,r){var a=e.state.xAxisMap,i=a[t.props.xAxisId];return e.renderAxis(i,t,n,r)},this.renderYAxis=function(t,n,r){var a=e.state.yAxisMap,i=a[t.props.yAxisId];return e.renderAxis(i,t,n,r)},this.renderGrid=function(t){var n=e.state,r=n.xAxisMap,a=n.yAxisMap,i=n.offset,o=e.props,l=o.width,u=o.height,s=(0,Z.getAnyElementOfObject)(r),f=(0,Z.getAnyElementOfObject)(a),c=t.props||{};return(0,w.cloneElement)(t,{key:t.key||"grid",x:(0,Z.isNumber)(c.x)?c.x:i.left,y:(0,Z.isNumber)(c.y)?c.y:i.top,width:(0,Z.isNumber)(c.width)?c.width:i.width,height:(0,Z.isNumber)(c.height)?c.height:i.height,xAxis:s,yAxis:f,offset:i,chartWidth:l,chartHeight:u,verticalCoordinatesGenerator:e.verticalCoordinatesGenerator,horizontalCoordinatesGenerator:e.horizontalCoordinatesGenerator})},this.renderPolarGrid=function(t){var n=e.state,r=n.radiusAxisMap,a=n.angleAxisMap,i=(0,Z.getAnyElementOfObject)(r),o=(0,Z.getAnyElementOfObject)(a),l=o.cx,u=o.cy,s=o.innerRadius,f=o.outerRadius;return(0,w.cloneElement)(t,{polarAngles:(0,Q.getTicksOfAxis)(o,!0).map(function(e){return e.coordinate}),polarRadius:(0,Q.getTicksOfAxis)(i,!0).map(function(e){return e.coordinate}),cx:l,cy:u,innerRadius:s,outerRadius:f,key:t.key||"polar-grid"})},this.renderBrush=function(t){var n=e.props,r=n.margin,a=n.data,i=e.state,o=i.offset,l=i.dataStartIndex,u=i.dataEndIndex,s=i.updateId;return(0,w.cloneElement)(t,{key:t.key||"_recharts-brush",onChange:(0,Q.combineEventHandlers)(e.handleBrushChange,null,t.props.onChange),data:a,x:(0,Z.isNumber)(t.props.x)?t.props.x:o.left,y:(0,Z.isNumber)(t.props.y)?t.props.y:o.top+o.height+o.brushBottom-(r.bottom||0),width:(0,Z.isNumber)(t.props.width)?t.props.width:o.width,startIndex:l,endIndex:u,updateId:"brush-"+s})},this.renderReferenceElement=function(t,n,r){if(!t)return null;var a=e.state,i=a.xAxisMap,o=a.yAxisMap,l=a.offset,u=t.props,s=u.xAxisId,f=u.yAxisId;return(0,w.cloneElement)(t,{key:t.key||n+"-"+r,xAxis:i[s],yAxis:o[f],viewBox:{x:l.left,y:l.top,width:l.width,height:l.height}})},this.renderGraphicChild=function(t,n,r){var a=e.filterFormatItem(t,n,r);if(!a)return null;var i=(0,w.cloneElement)(t,a.props),l=e.state,u=l.isTooltipActive,s=l.tooltipAxis,f=l.activeTooltipIndex,c=l.activeLabel,d=e.props.children,p=(0,H.findChildByType)(d,j.default),h=a.props,y=h.points,m=h.isRange,v=h.baseLine,g=a.item.props,x=g.activeDot,_=g.hide,O=!_&&u&&p&&x&&f>=0;if(O){var E=void 0,C=void 0;if(s.dataKey&&!s.allowDuplicatedCategory?(E=(0,Z.findEntryInArray)(y,"payload."+s.dataKey,c),C=m&&v&&(0,Z.findEntryInArray)(v,"payload."+s.dataKey,c)):(E=y[f],C=m&&v&&v[f]),!(0,b.default)(E))return[i].concat(o(e.renderActivePoints({item:a,activePoint:E,basePoint:C,childIndex:f,isRange:m})))}return m?[i,null,null]:[i,null]}},n);return N};t.default=ie},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e){var t=e.viewBox,n=e.position,r=e.value,a=e.children,i=e.content,o=e.className,l=void 0===o?"":o;if(!t||(0,c.default)(r)&&(0,c.default)(a)&&!(0,p.isValidElement)(i)&&!(0,s.default)(i))return null;if((0,p.isValidElement)(i))return(0,p.cloneElement)(i,e);var u=void 0;if((0,s.default)(i)){if(u=i(e),(0,p.isValidElement)(u))return u}else u=S(e);var f=j(t),y=(0,_.getPresentationAttributes)(e);if(f&&("insideStart"===n||"insideEnd"===n||"end"===n))return M(e,u,y);var m=f?P(e):N(e);return h.default.createElement(x.default,d({className:(0,g.default)("recharts-label",l)},y,m),u)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(27),l=r(o),u=n(15),s=r(u),f=n(44),c=r(f),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=n(1),h=r(p),y=n(2),m=r(y),v=n(17),g=r(v),b=n(102),x=r(b),_=n(12),w=n(18),O=n(55),E=m.default.shape({x:m.default.number,y:m.default.number,width:m.default.number,height:m.default.number}),C=m.default.shape({cx:m.default.number,cy:m.default.number,innerRadius:m.default.number,outerRadius:m.default.number,startAngle:m.default.number,endAngle:m.default.number}),k={viewBox:m.default.oneOfType([E,C]),formatter:m.default.func,value:m.default.oneOfType([m.default.number,m.default.string]),offset:m.default.number,position:m.default.oneOf(["top","left","right","bottom","inside","outside","insideLeft","insideRight","insideTop","insideBottom","insideTopLeft","insideBottomLeft","insideTopRight","insideBottomRight","insideStart","insideEnd","end","center"]),children:m.default.oneOfType([m.default.arrayOf(m.default.node),m.default.node]),className:m.default.string,content:m.default.oneOfType([m.default.element,m.default.func])},T={offset:5},S=function(e){var t=e.value,n=e.formatter,r=(0,c.default)(e.children)?t:e.children;return(0,s.default)(n)?n(r):r},A=function(e,t){var n=(0,w.mathSign)(t-e),r=Math.min(Math.abs(t-e),360);return n*r},M=function(e,t,n){var r=e.position,a=e.viewBox,i=e.offset,o=e.className,l=a.cx,u=a.cy,s=a.innerRadius,f=a.outerRadius,p=a.startAngle,y=a.endAngle,m=a.clockWise,v=(s+f)/2,b=A(p,y),x=b>=0?1:-1,_=void 0,E=void 0;"insideStart"===r?(_=p+x*i,E=m):"insideEnd"===r?(_=y-x*i,E=!m):"end"===r&&(_=y+x*i,E=m),E=b<=0?E:!E;var C=(0,O.polarToCartesian)(l,u,v,_),k=(0,O.polarToCartesian)(l,u,v,_+359*(E?1:-1)),T="M"+C.x+","+C.y+"\n A"+v+","+v+",0,1,"+(E?0:1)+",\n "+k.x+","+k.y,S=(0,c.default)(e.id)?(0,w.uniqueId)("recharts-radial-line-"):e.id;return h.default.createElement("text",d({},n,{dominantBaseline:"central",className:(0,g.default)("recharts-radial-bar-label",o)}),h.default.createElement("defs",null,h.default.createElement("path",{id:S,d:T})),h.default.createElement("textPath",{xlinkHref:"#"+S},t))},P=function(e){var t=e.viewBox,n=e.offset,r=e.position,a=t.cx,i=t.cy,o=t.innerRadius,l=t.outerRadius,u=t.startAngle,s=t.endAngle,f=(u+s)/2;if("outside"===r){var c=(0,O.polarToCartesian)(a,i,l+n,f),d=c.x,p=c.y;return{x:d,y:p,textAnchor:d>=a?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:a,y:i,textAnchor:"middle",verticalAnchor:"middle"};var h=(o+l)/2,y=(0,O.polarToCartesian)(a,i,h,f),m=y.x,v=y.y;return{x:m,y:v,textAnchor:"middle",verticalAnchor:"middle"}},N=function(e){var t=e.viewBox,n=e.offset,r=e.position,a=t.x,i=t.y,o=t.width,u=t.height,s=u>=0?1:-1;return"top"===r?{x:a+o/2,y:i-s*n,textAnchor:"middle",verticalAnchor:"end"}:"bottom"===r?{x:a+o/2,y:i+u+s*n,textAnchor:"middle",verticalAnchor:"start"}:"left"===r?{x:a-n,y:i+u/2,textAnchor:"end",verticalAnchor:"middle"}:"right"===r?{x:a+o+n,y:i+u/2,textAnchor:"start",verticalAnchor:"middle"}:"insideLeft"===r?{x:a+n,y:i+u/2,textAnchor:"start",verticalAnchor:"middle"}:"insideRight"===r?{x:a+o-n,y:i+u/2,textAnchor:"end",verticalAnchor:"middle"}:"insideTop"===r?{x:a+o/2,y:i+s*n,textAnchor:"middle",verticalAnchor:"start"}:"insideBottom"===r?{x:a+o/2,y:i+u-s*n,textAnchor:"middle",verticalAnchor:"end"}:"insideTopLeft"===r?{x:a+n,y:i+s*n,textAnchor:"start",verticalAnchor:"start"}:"insideTopRight"===r?{x:a+o-n,y:i+s*n,textAnchor:"end",verticalAnchor:"start"}:"insideBottomLeft"===r?{x:a+n,y:i+u-s*n,textAnchor:"start",verticalAnchor:"end"}:"insideBottomRight"===r?{x:a+o-n,y:i+u-s*n,textAnchor:"end",verticalAnchor:"end"}:(0,l.default)(r)&&((0,w.isNumber)(r.x)||(0,w.isPercent)(r.x))&&((0,w.isNumber)(r.y)||(0,w.isPercent)(r.y))?{x:a+(0,w.getPercentValue)(r.x,o),y:i+(0,w.getPercentValue)(r.y,u),textAnchor:"end",verticalAnchor:"end"}:{x:a+o/2,y:i+u/2,textAnchor:"middle",verticalAnchor:"middle"}},j=function(e){return(0,w.isNumber)(e.cx)};i.displayName="Label",i.defaultProps=T,i.propTypes=k;var R=function(e){var t=e.cx,n=e.cy,r=e.angle,a=e.startAngle,i=e.endAngle,o=e.r,l=e.radius,u=e.innerRadius,s=e.outerRadius,f=e.x,c=e.y,d=e.top,p=e.left,h=e.width,y=e.height,m=e.clockWise;if((0,w.isNumber)(h)&&(0,w.isNumber)(y)){if((0,w.isNumber)(f)&&(0,w.isNumber)(c))return{x:f,y:c,width:h,height:y};if((0,w.isNumber)(d)&&(0,w.isNumber)(p))return{x:d,y:p,width:h,height:y}}return(0,w.isNumber)(f)&&(0,w.isNumber)(c)?{x:f,y:c,width:0,height:0}:(0,w.isNumber)(t)&&(0,w.isNumber)(n)?{cx:t,cy:n,startAngle:a||r||0,endAngle:i||r||0,innerRadius:u||0,outerRadius:s||l||o||0,clockWise:m}:e.viewBox?e.viewBox:{}},I=function(e,t){return e?e===!0?h.default.createElement(i,{key:"label-implicit",viewBox:t}):(0,w.isNumOrStr)(e)?h.default.createElement(i,{key:"label-implicit",viewBox:t,value:e}):(0,p.isValidElement)(e)||(0,s.default)(e)?h.default.createElement(i,{key:"label-implicit",content:e,viewBox:t}):(0,l.default)(e)?h.default.createElement(i,d({viewBox:t},e,{key:"label-implicit"})):null:null},D=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=R(e),l=(0,_.findAllByType)(r,i).map(function(e,n){return(0,p.cloneElement)(e,{viewBox:t||o,key:"label-"+n})});if(!n)return l;var u=I(e.label,t||o);return[u].concat(a(l))};i.parseViewBox=R,i.renderCallByParent=D,t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){var t=e.data,n=e.valueAccessor,r=e.dataKey,a=e.clockWise,o=e.id,l=i(e,["data","valueAccessor","dataKey","clockWise","id"]);return t&&t.length?b.default.createElement(C.default,{className:"recharts-label-list"},t.map(function(e,t){var i=(0,d.default)(r)?n(e,t):(0,T.getValueByDataKey)(e&&e.payload,r),u=(0,d.default)(o)?{}:{id:o+"-"+t};return b.default.createElement(O.default,v({},(0,k.getPresentationAttributes)(e),l,u,{index:t,value:i,viewBox:O.default.parseViewBox((0,d.default)(a)?e:v({},e,{clockWise:a})),key:"label-"+t}))})):null}Object.defineProperty(t,"__esModule",{value:!0});var l=n(27),u=r(l),s=n(15),f=r(s),c=n(44),d=r(c),p=n(497),h=r(p),y=n(19),m=r(y),v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g=n(1),b=r(g),x=n(2),_=r(x),w=n(88),O=r(w),E=n(23),C=r(E),k=n(12),T=n(25),S={id:_.default.string,data:_.default.arrayOf(_.default.object),valueAccessor:_.default.func,clockWise:_.default.bool,dataKey:_.default.oneOfType([_.default.string,_.default.number,_.default.func])},A={valueAccessor:function(e){return(0,m.default)(e.value)?(0,h.default)(e.value):e.value}};o.propTypes=S,o.displayName="LabelList";var M=function(e,t){return e?e===!0?b.default.createElement(o,{key:"labelList-implicit",data:t}):b.default.isValidElement(e)||(0,f.default)(e)?b.default.createElement(o,{key:"labelList-implicit",data:t,content:e}):(0,u.default)(e)?b.default.createElement(o,v({data:t},e,{key:"labelList-implicit"})):null:null},P=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=(0,k.findAllByType)(r,o).map(function(e,n){return(0,g.cloneElement)(e,{data:t,key:"labelList-"+n})});if(!n)return i;var l=M(e.label,t);return[l].concat(a(i))};o.renderCallByParent=P,o.defaultProps=A,t.default=o},,,,,[1970,113],function(e,t,n){function r(e){var t=this.__data__=new a(e);this.size=t.size}var a=n(72),i=n(142),o=n(143),l=n(144),u=n(145),s=n(146);r.prototype.clear=i,r.prototype.delete=o,r.prototype.get=l,r.prototype.has=u,r.prototype.set=s,e.exports=r},function(e,t,n){function r(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?l(e)?i(e[0],e[1]):a(e):u(e)}var a=n(364),i=n(365),o=n(49),l=n(19),u=n(379);e.exports=r},,,,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u,s,f=n(44),c=r(f),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=n(1),y=r(h),m=n(2),v=r(m),g=n(581),b=r(g),x=n(17),_=r(x),w=n(18),O=n(12),E=n(296),C=/[ \f\n\r\t\v\u2028\u2029]+/,k=function(e){try{var t=(0,c.default)(e.children)?[]:e.children.toString().split(C),n=t.map(function(t){return{word:t,width:(0,E.getStringSize)(t,e.style).width}}),r=(0,E.getStringSize)("\xa0",e.style).width;return{wordsWithComputedWidth:n,spaceWidth:r}}catch(e){return null}},T=(s=u=function(e){function t(){var e,n,r,a;i(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={wordsByLines:[]},a=n,o(r,a)}return l(t,e),p(t,[{key:"componentWillMount",value:function(){this.updateWordsByLines(this.props,!0)}},{key:"componentWillReceiveProps",value:function(e){var t=this.props.children!==e.children||this.props.style!==e.style;this.updateWordsByLines(e,t)}},{key:"updateWordsByLines",value:function(e,t){if(!e.width&&!e.scaleToFit||(0,O.isSsr)())this.updateWordsWithoutCalculate(e);else{if(t){var n=k(e);if(!n)return void this.updateWordsWithoutCalculate(e);var r=n.wordsWithComputedWidth,a=n.spaceWidth;this.wordsWithComputedWidth=r,this.spaceWidth=a}var i=this.calculateWordsByLines(this.wordsWithComputedWidth,this.spaceWidth,e.width);this.setState({wordsByLines:i})}}},{key:"updateWordsWithoutCalculate",value:function(e){var t=(0,c.default)(e.children)?[]:e.children.toString().split(C);this.setState({wordsByLines:[{words:t}]})}},{key:"calculateWordsByLines",value:function(e,t,n){var r=this.props.scaleToFit;return e.reduce(function(e,a){var i=a.word,o=a.width,l=e[e.length-1];if(l&&(null==n||r||l.width+o+t<n))l.words.push(i),l.width+=o+t;else{var u={words:[i],width:o};e.push(u)}return e},[])}},{key:"render",value:function(){var e=this.props,t=e.dx,n=e.dy,r=e.textAnchor,i=e.verticalAnchor,o=e.scaleToFit,l=e.angle,u=e.lineHeight,s=e.capHeight,f=e.className,c=a(e,["dx","dy","textAnchor","verticalAnchor","scaleToFit","angle","lineHeight","capHeight","className"]),p=this.state.wordsByLines;if(!(0,w.isNumOrStr)(c.x)||!(0,w.isNumOrStr)(c.y))return null;var h=c.x+((0,w.isNumber)(t)?t:0),m=c.y+((0,w.isNumber)(n)?n:0),v=void 0;switch(i){case"start":v=(0,b.default)("calc("+s+")");break;case"middle":v=(0,b.default)("calc("+(p.length-1)/2+" * -"+u+" + ("+s+" / 2))");break;default:v=(0,b.default)("calc("+(p.length-1)+" * -"+u+")")}var g=[];if(o){var x=p[0].width;g.push("scale("+this.props.width/x+")")}return l&&g.push("rotate("+l+", "+h+", "+m+")"),g.length&&(c.transform=g.join(" ")),y.default.createElement("text",d({},(0,O.getPresentationAttributes)(c),{x:h,y:m,className:(0,_.default)("recharts-text",f),textAnchor:r}),p.map(function(e,t){return y.default.createElement("tspan",{x:h,dy:0===t?v:u,key:t},e.words.join(" "))}))}}]),t}(h.Component),u.propTypes=d({},O.PRESENTATION_ATTRIBUTES,{scaleToFit:v.default.bool,angle:v.default.number,textAnchor:v.default.oneOf(["start","middle","end","inherit"]),verticalAnchor:v.default.oneOf(["start","middle","end"]),style:v.default.object}),u.defaultProps={x:0,y:0,lineHeight:"1em",capHeight:"0.71em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end"},s);t.default=T},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(1),p=r(d),h=n(2),y=r(h),m=n(17),v=r(m),g=n(13),b=r(g),x=n(12),_=(0,b.default)((s=u=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.r,a=e.className,i=(0,v.default)("recharts-dot",a);return t===+t&&n===+n&&r===+r?p.default.createElement("circle",f({},(0,x.getPresentationAttributes)(this.props),(0,x.filterEventAttributes)(this.props,null,!0),{className:i,cx:t,cy:n,r:r})):null}}]),t}(d.Component),u.displayName="Dot",u.propTypes={className:y.default.string,cx:y.default.number,cy:y.default.number,r:y.default.number},l=s))||l;t.default=_},,,function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=a(i),l=n(3),u=a(l),s=n(8),f=a(s),c=n(5),d=a(c),p=n(4),h=a(p),y=n(1),m=r(y),v=n(189),g=a(v),b=n(7),x=a(b),_=n(105),w=a(_),O=function(e){function t(){return(0,u.default)(this,t),(0,d.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,h.default)(t,e),(0,f.default)(t,[{key:"getTransitionName",value:function(){var e=this.props,t=e.placement,n=void 0===t?"":t,r=e.transitionName;return void 0!==r?r:n.indexOf("top")>=0?"slide-down":"slide-up"}},{key:"componentDidMount",value:function(){var e=this.props.overlay;if(e){var t=e.props;(0,w.default)(!t.mode||"vertical"===t.mode,'mode="'+t.mode+"\" is not supported for Dropdown's Menu.")}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.prefixCls,r=e.overlay,a=e.trigger,i=e.disabled,l=m.Children.only(t),u=m.Children.only(r),s=m.cloneElement(l,{className:(0,x.default)(l.props.className,n+"-trigger"),disabled:i}),f=u.props,c=f.selectable,d=void 0!==c&&c,p=f.focusable,h=void 0===p||p,y="string"==typeof u.type?u:m.cloneElement(u,{mode:"vertical",selectable:d,focusable:h});return m.createElement(g.default,(0,o.default)({},this.props,{transitionName:this.getTransitionName(),trigger:i?[]:a,overlay:y}),s)}}]),t}(m.Component);t.default=O,O.defaultProps={prefixCls:"ant-dropdown",mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft"},e.exports=t.default},,,function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=null,n=!1;return v.Children.forEach(e,function(e){e&&e.props&&e.props.checked&&(t=e.props.value,n=!0)}),n?{value:t}:void 0}Object.defineProperty(t,"__esModule",{value:!0});var o=n(9),l=a(o),u=n(3),s=a(u),f=n(8),c=a(f),d=n(5),p=a(d),h=n(4),y=a(h),m=n(1),v=r(m),g=n(2),b=a(g),x=n(7),_=a(x),w=n(22),O=a(w),E=n(36),C=a(E),k=function(e){function t(e){(0,s.default)(this,t);var n=(0,p.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onRadioChange=function(e){var t=n.state.value,r=e.target.value;"value"in n.props||n.setState({value:r});var a=n.props.onChange;a&&r!==t&&a(e)};var r=void 0;if("value"in e)r=e.value;else if("defaultValue"in e)r=e.defaultValue;else{var a=i(e.children);r=a&&a.value}return n.state={value:r},n}return(0,y.default)(t,e),(0,c.default)(t,[{key:"getChildContext",value:function(){return{radioGroup:{onChange:this.onRadioChange,value:this.state.value,disabled:this.props.disabled,name:this.props.name}}}},{key:"componentWillReceiveProps",value:function(e){if("value"in e)this.setState({value:e.value});else{var t=i(e.children);t&&this.setState({value:t.value})}}},{key:"shouldComponentUpdate",value:function(e,t){return!(0,O.default)(this.props,e)||!(0,O.default)(this.state,t)}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.className,a=void 0===r?"":r,i=t.options,o=n+"-group",u=(0,_.default)(o,(0,l.default)({},o+"-"+t.size,t.size),a),s=t.children;return i&&i.length>0&&(s=i.map(function(t,r){return"string"==typeof t?v.createElement(C.default,{key:r,prefixCls:n,disabled:e.props.disabled,value:t,onChange:e.onRadioChange,checked:e.state.value===t},t):v.createElement(C.default,{key:r,prefixCls:n,disabled:t.disabled||e.props.disabled,value:t.value,onChange:e.onRadioChange,checked:e.state.value===t.value},t.label)})),v.createElement("div",{className:u,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,id:t.id},s)}}]),t}(v.Component);t.default=k,k.defaultProps={disabled:!1,prefixCls:"ant-radio"},k.childContextTypes={radioGroup:b.default.any},e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=a(i),l=n(3),u=a(l),s=n(8),f=a(s),c=n(5),d=a(c),p=n(4),h=a(p),y=n(1),m=r(y),v=n(2),g=a(v),b=n(36),x=a(b),_=function(e){function t(){return(0,u.default)(this,t),(0,d.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,h.default)(t,e),(0,f.default)(t,[{key:"render",value:function(){var e=(0,o.default)({},this.props);return this.context.radioGroup&&(e.onChange=this.context.radioGroup.onChange,e.checked=this.props.value===this.context.radioGroup.value,e.disabled=this.props.disabled||this.context.radioGroup.disabled),m.createElement(x.default,e)}}]),t}(m.Component);t.default=_,_.defaultProps={prefixCls:"ant-radio-button"},_.contextTypes={radioGroup:g.default.any},e.exports=t.default},,,11,,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(106),i=r(a),o=n(180),l=r(o);i.default.Button=l.default,t.default=i.default,e.exports=t.default},,function(e,t,n){function r(e,t){var n=o(e),r=!n&&i(e),f=!n&&!r&&l(e),d=!n&&!r&&!f&&s(e),p=n||r||f||d,h=p?a(e.length,String):[],y=h.length;for(var m in e)!t&&!c.call(e,m)||p&&("length"==m||f&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||u(m,y))||h.push(m);return h}var a=n(125),i=n(129),o=n(19),l=n(68),u=n(126),s=n(69),f=Object.prototype,c=f.hasOwnProperty;e.exports=r},[1970,139],,,,function(e,t,n){function r(e){return o(e)&&i(e.length)&&!!P[a(e)]}var a=n(90),i=n(114),o=n(58),l="[object Arguments]",u="[object Array]",s="[object Boolean]",f="[object Date]",c="[object Error]",d="[object Function]",p="[object Map]",h="[object Number]",y="[object Object]",m="[object RegExp]",v="[object Set]",g="[object String]",b="[object WeakMap]",x="[object ArrayBuffer]",_="[object DataView]",w="[object Float32Array]",O="[object Float64Array]",E="[object Int8Array]",C="[object Int16Array]",k="[object Int32Array]",T="[object Uint8Array]",S="[object Uint8ClampedArray]",A="[object Uint16Array]",M="[object Uint32Array]",P={};P[w]=P[O]=P[E]=P[C]=P[k]=P[T]=P[S]=P[A]=P[M]=!0,P[l]=P[u]=P[x]=P[s]=P[_]=P[f]=P[c]=P[d]=P[p]=P[h]=P[y]=P[m]=P[v]=P[g]=P[b]=!1,e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}e.exports=n},,function(e,t,n){(function(e){var r=n(261),a="object"==typeof t&&t&&!t.nodeType&&t,i=a&&"object"==typeof e&&e&&!e.nodeType&&e,o=i&&i.exports===a,l=o&&r.process,u=function(){try{var e=i&&i.require&&i.require("util").types;return e?e:l&&l.binding&&l.binding("util")}catch(e){}}();e.exports=u}).call(t,n(74)(e))},,,function(e,t){function n(){return!1}e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),d=n(2),p=r(d),h=n(13),y=r(h),m=n(12),v=(0,y.default)((s=u=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),f(t,[{key:"render",value:function(){return null}}]),t}(c.Component),u.displayName="XAxis",u.propTypes={allowDecimals:p.default.bool,allowDuplicatedCategory:p.default.bool,hide:p.default.bool,name:p.default.oneOfType([p.default.string,p.default.number]),unit:p.default.oneOfType([p.default.string,p.default.number]),xAxisId:p.default.oneOfType([p.default.string,p.default.number]),domain:p.default.arrayOf(p.default.oneOfType([p.default.string,p.default.number,p.default.func,p.default.oneOf(["auto","dataMin","dataMax"])])),dataKey:p.default.oneOfType([p.default.string,p.default.number,p.default.func]),width:p.default.number,height:p.default.number,mirror:p.default.bool,orientation:p.default.oneOf(["top","bottom"]),type:p.default.oneOf(["number","category"]),ticks:p.default.array,tickCount:p.default.number,tickFormatter:p.default.func,padding:p.default.shape({left:p.default.number,right:p.default.number}),allowDataOverflow:p.default.bool,scale:p.default.oneOfType([p.default.oneOf(m.SCALE_TYPES),p.default.func]),tick:p.default.oneOfType([p.default.bool,p.default.func,p.default.object,p.default.element]),axisLine:p.default.oneOfType([p.default.bool,p.default.object]),tickLine:p.default.oneOfType([p.default.bool,p.default.object]),minTickGap:p.default.number,tickSize:p.default.number,interval:p.default.oneOfType([p.default.number,p.default.oneOf(["preserveStart","preserveEnd","preserveStartEnd"])]),reversed:p.default.bool},u.defaultProps={allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",domain:[0,"auto"],padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0},l=s))||l;t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),d=n(2),p=r(d),h=n(13),y=r(h),m=(0,y.default)((s=u=function(e){function t(){return a(this,t), i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),f(t,[{key:"render",value:function(){return null}}]),t}(c.Component),u.displayName="YAxis",u.propTypes={allowDecimals:p.default.bool,allowDuplicatedCategory:p.default.bool,hide:p.default.bool,name:p.default.oneOfType([p.default.string,p.default.number]),unit:p.default.oneOfType([p.default.string,p.default.number]),yAxisId:p.default.oneOfType([p.default.string,p.default.number]),domain:p.default.arrayOf(p.default.oneOfType([p.default.string,p.default.number,p.default.func,p.default.oneOf(["auto","dataMin","dataMax"])])),dataKey:p.default.oneOfType([p.default.string,p.default.number,p.default.func]),ticks:p.default.array,tickCount:p.default.number,tickFormatter:p.default.func,width:p.default.number,height:p.default.number,mirror:p.default.bool,orientation:p.default.oneOf(["left","right"]),type:p.default.oneOf(["number","category"]),padding:p.default.shape({top:p.default.number,bottom:p.default.number}),allowDataOverflow:p.default.bool,scale:p.default.oneOfType([p.default.oneOf(["auto","linear","pow","sqrt","log","identity","time","band","point","ordinal","quantile","quantize","utcTime","sequential","threshold"]),p.default.func]),tick:p.default.oneOfType([p.default.bool,p.default.func,p.default.object,p.default.element]),axisLine:p.default.oneOfType([p.default.bool,p.default.object]),tickLine:p.default.oneOfType([p.default.bool,p.default.object]),minTickGap:p.default.number,tickSize:p.default.number,interval:p.default.oneOfType([p.default.number,p.default.oneOf(["preserveStart","preserveEnd","preserveStartEnd"])]),reversed:p.default.bool},u.defaultProps={allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",domain:[0,"auto"],padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1},l=s))||l;t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=n(19),c=r(f),d=n(15),p=r(d),h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=n(1),v=r(m),g=n(2),b=r(g),x=n(214),_=n(17),w=r(_),O=n(13),E=r(O),C=n(12),k=n(18),T={curveBasisClosed:x.curveBasisClosed,curveBasisOpen:x.curveBasisOpen,curveBasis:x.curveBasis,curveLinearClosed:x.curveLinearClosed,curveLinear:x.curveLinear,curveMonotoneX:x.curveMonotoneX,curveMonotoneY:x.curveMonotoneY,curveNatural:x.curveNatural,curveStep:x.curveStep,curveStepAfter:x.curveStepAfter,curveStepBefore:x.curveStepBefore},S=function(e){return e.x===+e.x&&e.y===+e.y},A=function(e){return e.x},M=function(e){return e.y},P=function(e,t){if((0,p.default)(e))return e;var n="curve"+e.slice(0,1).toUpperCase()+e.slice(1);return"curveMonotone"===n&&t?T[""+n+("vertical"===t?"Y":"X")]:T[n]||x.curveLinear},N=(0,E.default)((s=u=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),y(t,[{key:"getPath",value:function(){var e=this.props,t=e.type,n=e.points,r=e.baseLine,a=e.layout,i=e.connectNulls,o=P(t,a),l=i?n.filter(function(e){return S(e)}):n,u=void 0;if((0,c.default)(r)){var s=l.map(function(e,t){return h({},e,{base:r[t]})});return u="vertical"===a?(0,x.area)().y(M).x1(A).x0(function(e){return e.base.x}):(0,x.area)().x(A).y1(M).y0(function(e){return e.base.y}),u.defined(S).curve(o),u(s)}return u="vertical"===a&&(0,k.isNumber)(r)?(0,x.area)().y(M).x1(A).x0(r):(0,k.isNumber)(r)?(0,x.area)().x(A).y1(M).y0(r):(0,x.line)().x(A).y(M),u.defined(S).curve(o),u(l)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.points,r=e.path,a=e.pathRef;if(!(n&&n.length||r))return null;var i=n&&n.length?this.getPath():r;return v.default.createElement("path",h({},(0,C.getPresentationAttributes)(this.props),(0,C.filterEventAttributes)(this.props,null,!0),{className:(0,w.default)("recharts-curve",t),d:i,ref:a}))}}]),t}(m.Component),u.displayName="Curve",u.propTypes=h({},C.PRESENTATION_ATTRIBUTES,{className:b.default.string,type:b.default.oneOfType([b.default.oneOf(["basis","basisClosed","basisOpen","linear","linearClosed","natural","monotoneX","monotoneY","monotone","step","stepBefore","stepAfter"]),b.default.func]),layout:b.default.oneOf(["horizontal","vertical"]),baseLine:b.default.oneOfType([b.default.number,b.default.array]),points:b.default.arrayOf(b.default.object),connectNulls:b.default.bool,path:b.default.string,pathRef:b.default.func}),u.defaultProps={type:"linear",points:[],connectNulls:!1},l=s))||l;t.default=N},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(1),p=r(d),h=n(2),y=r(h),m=n(17),v=r(m),g=n(66),b=r(g),x=n(13),_=r(x),w=n(12),O=function(e,t,n,r,a){var i=Math.min(Math.abs(n)/2,Math.abs(r)/2),o=r>=0?1:-1,l=r>=0?1:0,u=void 0;if(i>0&&a instanceof Array){for(var s=[],f=0,c=4;f<c;f++)s[f]=a[f]>i?i:a[f];u="M"+e+","+(t+o*s[0]),s[0]>0&&(u+="A "+s[0]+","+s[0]+",0,0,"+l+","+(e+s[0])+","+t),u+="L "+(e+n-s[1])+","+t,s[1]>0&&(u+="A "+s[1]+","+s[1]+",0,0,"+l+",\n "+(e+n)+","+(t+o*s[1])),u+="L "+(e+n)+","+(t+r-o*s[2]),s[2]>0&&(u+="A "+s[2]+","+s[2]+",0,0,"+l+",\n "+(e+n-s[2])+","+(t+r)),u+="L "+(e+s[3])+","+(t+r),s[3]>0&&(u+="A "+s[3]+","+s[3]+",0,0,"+l+",\n "+e+","+(t+r-o*s[3])),u+="Z"}else if(i>0&&a===+a&&a>0){var d=Math.min(i,a);u="M "+e+","+(t+o*d)+"\n A "+d+","+d+",0,0,"+l+","+(e+d)+","+t+"\n L "+(e+n-d)+","+t+"\n A "+d+","+d+",0,0,"+l+","+(e+n)+","+(t+o*d)+"\n L "+(e+n)+","+(t+r-o*d)+"\n A "+d+","+d+",0,0,"+l+","+(e+n-d)+","+(t+r)+"\n L "+(e+d)+","+(t+r)+"\n A "+d+","+d+",0,0,"+l+","+e+","+(t+r-o*d)+" Z"}else u="M "+e+","+t+" h "+n+" v "+r+" h "+-n+" Z";return u},E=(0,_.default)((s=u=function(e){function t(){var e,n,r,o;a(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={totalLength:-1},o=n,i(r,o)}return o(t,e),c(t,[{key:"componentDidMount",value:function(){if(this.node&&this.node.getTotalLength)try{var e=this.node.getTotalLength();e&&this.setState({totalLength:e})}catch(e){}}},{key:"render",value:function(){var e=this,t=this.props,n=t.x,r=t.y,a=t.width,i=t.height,o=t.radius,l=t.className,u=this.state.totalLength,s=this.props,c=s.animationEasing,d=s.animationDuration,h=s.animationBegin,y=s.isAnimationActive,m=s.isUpdateAnimationActive;if(n!==+n||r!==+r||a!==+a||i!==+i||0===a||0===i)return null;var g=(0,v.default)("recharts-rectangle",l);return m?p.default.createElement(b.default,{canBegin:u>0,from:{width:a,height:i,x:n,y:r},to:{width:a,height:i,x:n,y:r},duration:d,animationEasing:c,isActive:m},function(t){var n=t.width,r=t.height,a=t.x,i=t.y;return p.default.createElement(b.default,{canBegin:u>0,from:"0px "+(u===-1?1:u)+"px",to:u+"px 0px",attributeName:"strokeDasharray",begin:h,duration:d,isActive:y,easing:c},p.default.createElement("path",f({},(0,w.getPresentationAttributes)(e.props),(0,w.filterEventAttributes)(e.props),{className:g,d:O(a,i,n,r,o),ref:function(t){e.node=t}})))}):p.default.createElement("path",f({},(0,w.getPresentationAttributes)(this.props),(0,w.filterEventAttributes)(this.props),{className:g,d:O(n,r,a,i,o)}))}}]),t}(d.Component),u.displayName="Rectangle",u.propTypes=f({},w.PRESENTATION_ATTRIBUTES,w.EVENT_ATTRIBUTES,{className:y.default.string,x:y.default.number,y:y.default.number,width:y.default.number,height:y.default.number,radius:y.default.oneOfType([y.default.number,y.default.array]),isAnimationActive:y.default.bool,isUpdateAnimationActive:y.default.bool,animationBegin:y.default.number,animationDuration:y.default.number,animationEasing:y.default.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"])}),u.defaultProps={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},l=s))||l;t.default=E},function(e,t,n){var r=n(29),a=r.Uint8Array;e.exports=a},function(e,t,n){function r(e,t){return o(i(e,t,a),e+"")}var a=n(49),i=n(172),o=n(173);e.exports=r},function(e,t,n){function r(e,t,n){if(!l(n))return!1;var r=typeof t;return!!("number"==r?i(n)&&o(t,n.length):"string"==r&&t in n)&&a(n[t],e)}var a=n(128),i=n(38),o=n(126),l=n(27);e.exports=r},,11,,,function(e,t,n){function r(){this.__data__=new a,this.size=0}var a=n(72);e.exports=r},function(e,t){function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}e.exports=n},function(e,t){function n(e){return this.__data__.get(e)}e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t,n){function r(e,t){var n=this.__data__;if(n instanceof a){var r=n.__data__;if(!i||r.length<l-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(r)}return n.set(e,t),this.size=n.size,this}var a=n(72),i=n(167),o=n(179),l=200;e.exports=r},,,function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(118),o=a(i),l=n(3),u=a(l),s=n(8),f=a(s),c=n(5),d=a(c),p=n(4),h=a(p),y=n(1),m=r(y),v=n(2),g=a(v),b=n(7),x=a(b),_=n(22),w=a(_),O=n(79),E=a(O),C=function(e){function t(e){(0,u.default)(this,t);var n=(0,d.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.toggleOption=function(e){var t=n.state.value.indexOf(e.value),r=[].concat((0,o.default)(n.state.value));t===-1?r.push(e.value):r.splice(t,1),"value"in n.props||n.setState({value:r});var a=n.props.onChange;a&&a(r)},n.state={value:e.value||e.defaultValue||[]},n}return(0,h.default)(t,e),(0,f.default)(t,[{key:"getChildContext",value:function(){return{checkboxGroup:{toggleOption:this.toggleOption,value:this.state.value,disabled:this.props.disabled}}}},{key:"componentWillReceiveProps",value:function(e){"value"in e&&this.setState({value:e.value||[]})}},{key:"shouldComponentUpdate",value:function(e,t){return!(0,w.default)(this.props,e)||!(0,w.default)(this.state,t)}},{key:"getOptions",value:function(){var e=this.props.options;return e.map(function(e){return"string"==typeof e?{label:e,value:e}:e})}},{key:"render",value:function(){var e=this,t=this.props,n=this.state,r=t.prefixCls,a=t.className,i=t.style,o=t.options,l=r+"-group",u=t.children;o&&o.length>0&&(u=this.getOptions().map(function(a){return m.createElement(E.default,{prefixCls:r,key:a.value.toString(),disabled:"disabled"in a?a.disabled:t.disabled,value:a.value,checked:n.value.indexOf(a.value)!==-1,onChange:function(){return e.toggleOption(a)},className:l+"-item"},a.label)}));var s=(0,x.default)(l,a);return m.createElement("div",{className:s,style:i},u)}}]),t}(m.Component);t.default=C,C.defaultProps={options:[],prefixCls:"ant-checkbox"},C.propTypes={defaultValue:g.default.array,value:g.default.array,options:g.default.array.isRequired,onChange:g.default.func},C.childContextTypes={checkboxGroup:g.default.any},e.exports=t.default},function(e,t,n){function r(e,t,n){(void 0===n||i(e[t],n))&&(void 0!==n||t in e)||a(e,t,n)}var a=n(215),i=n(128);e.exports=r},function(e,t){function n(e,t){return"__proto__"==t?void 0:e[t]}e.exports=n},,function(e,t,n){function r(e){return o(e)?a(e):i(e)}var a=n(119),i=n(321),o=n(38);e.exports=r},function(e,t,n){function r(e){return o(e)?a(e,!0):i(e)}var a=n(119),i=n(253),o=n(38);e.exports=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(6),i=r(a),o=n(3),l=r(o),u=n(5),s=r(u),f=n(4),c=r(f),d=n(1),p=r(d),h=n(2),y=r(h),m=n(50),v=n(275),g=r(v),b=n(285),x=r(b),_=n(157),w=r(_),O=n(280),E=r(O),C=function(e){function t(){var n,r,a;(0,l.default)(this,t);for(var o=arguments.length,u=Array(o),f=0;f<o;f++)u[f]=arguments[f];return n=r=(0,s.default)(this,e.call.apply(e,[this].concat(u))),r.handleRowHover=function(e,t){r.props.store.setState({currentHoverKey:e?t:null})},r.renderRows=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=r.context.table,o=a.columnManager,l=a.components,u=a.props,s=u.prefixCls,f=u.childrenColumnName,c=u.rowClassName,d=u.rowRef,h=u.onRowClick,y=u.onRowDoubleClick,m=u.onRowContextMenu,v=u.onRowMouseEnter,g=u.onRowMouseLeave,b=u.onRow,x=r.props,_=x.getRowKey,O=x.fixed,C=x.expander,k=x.isAnyColumnsFixed,T=[],S=function(a){var u=e[a],x=_(u,a),S="string"==typeof c?c:c(u,a,t),A={};o.isAnyColumnsFixed()&&(A.onHover=r.handleRowHover);var M=void 0;M="left"===O?o.leftLeafColumns():"right"===O?o.rightLeafColumns():o.leafColumns();var P=s+"-row",N=p.default.createElement(E.default,(0,i.default)({},C.props,{fixed:O,index:a,prefixCls:P,record:u,key:x,rowKey:x,onRowClick:h,needIndentSpaced:C.needIndentSpaced,onExpandedChange:C.handleExpandChange}),function(e){return p.default.createElement(w.default,(0,i.default)({fixed:O,indent:t,className:S,record:u,index:a,prefixCls:P,childrenColumnName:f,columns:M,onRow:b,onRowDoubleClick:y,onRowContextMenu:m,onRowMouseEnter:v,onRowMouseLeave:g},A,{rowKey:x,ancestorKeys:n,ref:d(u,a,t),components:l,isAnyColumnsFixed:k},e))});T.push(N),C.renderRows(r.renderRows,T,u,a,t,O,x,n)},A=0;A<e.length;A++)S(A);return T},a=n,(0,s.default)(r,a)}return(0,c.default)(t,e),t.prototype.render=function(){var e=this.context.table,t=e.components,n=e.props,r=n.prefixCls,a=n.scroll,i=n.data,o=n.getBodyWrapper,l=this.props,u=l.expander,s=l.tableClassName,f=l.hasHead,c=l.hasBody,d=l.fixed,h=l.columns,y={};!d&&a.x&&(a.x===!0?y.tableLayout="fixed":y.width=a.x);var m=c?t.table:"table",v=t.body.wrapper,b=void 0;return c&&(b=p.default.createElement(v,{className:r+"-tbody"},this.renderRows(i,0)),o&&(b=o(b))),p.default.createElement(m,{className:s,style:y,key:"table"},p.default.createElement(g.default,{columns:h,fixed:d}),f&&p.default.createElement(x.default,{expander:u,columns:h,fixed:d}),b)},t}(p.default.Component);C.propTypes={fixed:y.default.oneOfType([y.default.string,y.default.bool]),columns:y.default.array.isRequired,tableClassName:y.default.string.isRequired,hasHead:y.default.bool.isRequired,hasBody:y.default.bool.isRequired,store:y.default.object.isRequired,expander:y.default.object.isRequired,getRowKey:y.default.func,isAnyColumnsFixed:y.default.bool},C.contextTypes={table:y.default.any},t.default=(0,m.connect)()(C),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=e.expandedRowsHeight,r=e.fixedColumnsBodyRowsHeight,a=t.fixed,i=t.index,o=t.rowKey;return a?n[o]?n[o]:r[i]?r[i]:null:null}t.__esModule=!0;var i=n(6),o=r(i),l=n(3),u=r(l),s=n(5),f=r(s),c=n(4),d=r(c),p=n(1),h=r(p),y=n(10),m=r(y),v=n(2),g=r(v),b=n(50),x=n(20),_=n(284),w=r(_),O=n(54),E=function(e){function t(n){(0,u.default)(this,t);var r=(0,f.default)(this,e.call(this,n));return r.onRowClick=function(e){var t=r.props,n=t.record,a=t.index,i=t.onRowClick;i&&i(n,a,e)},r.onRowDoubleClick=function(e){var t=r.props,n=t.record,a=t.index,i=t.onRowDoubleClick;i&&i(n,a,e)},r.onContextMenu=function(e){var t=r.props,n=t.record,a=t.index,i=t.onRowContextMenu;i&&i(n,a,e)},r.onMouseEnter=function(e){var t=r.props,n=t.record,a=t.index,i=t.onRowMouseEnter,o=t.onHover,l=t.rowKey;o(!0,l),i&&i(n,a,e)},r.onMouseLeave=function(e){var t=r.props,n=t.record,a=t.index,i=t.onRowMouseLeave,o=t.onHover,l=t.rowKey;o(!1,l),i&&i(n,a,e)},r.shouldRender=n.visible,r.state={},r}return(0,d.default)(t,e),t.getDerivedStateFromProps=function(e,t){return t.visible||!t.visible&&e.visible?{shouldRender:!0,visible:e.visible}:{visible:e.visible}},t.prototype.componentDidMount=function(){this.state.shouldRender&&this.saveRowRef()},t.prototype.shouldComponentUpdate=function(e){return!(!this.props.visible&&!e.visible)},t.prototype.componentDidUpdate=function(){this.state.shouldRender&&!this.rowRef&&this.saveRowRef()},t.prototype.setExpanedRowHeight=function(){var e,t=this.props,n=t.store,r=t.rowKey,a=n.getState(),i=a.expandedRowsHeight,l=this.rowRef.getBoundingClientRect().height;i=(0,o.default)({},i,(e={},e[r]=l,e)),n.setState({expandedRowsHeight:i})},t.prototype.setRowHeight=function(){var e=this.props,t=e.store,n=e.index,r=t.getState().fixedColumnsBodyRowsHeight.slice(),a=this.rowRef.getBoundingClientRect().height;r[n]=a,t.setState({fixedColumnsBodyRowsHeight:r})},t.prototype.getStyle=function(){var e=this.props,t=e.height,n=e.visible;return t&&t!==this.style.height&&(this.style=(0,o.default)({},this.style,{height:t})),n||this.style.display||(this.style=(0,o.default)({},this.style,{display:"none"})),this.style},t.prototype.saveRowRef=function(){this.rowRef=m.default.findDOMNode(this);var e=this.props,t=e.isAnyColumnsFixed,n=e.fixed,r=e.expandedRow,a=e.ancestorKeys;t&&(!n&&r&&this.setExpanedRowHeight(),!n&&a.length>=0&&this.setRowHeight())},t.prototype.render=function(){if(!this.state.shouldRender)return null;var e=this.props,t=e.prefixCls,n=e.columns,r=e.record,a=e.index,i=e.onRow,l=e.indent,u=e.indentSize,s=e.hovered,f=e.height,c=e.visible,d=e.components,p=e.hasExpandIcon,y=e.renderExpandIcon,m=e.renderExpandIconCell,v=d.body.row,g=d.body.cell,b=this.props.className;s&&(b+=" "+t+"-hover");var x=[];m(x);for(var _=0;_<n.length;_++){var E=n[_];(0,O.warningOnce)(void 0===E.onCellClick,"column[onCellClick] is deprecated, please use column[onCell] instead."),x.push(h.default.createElement(w.default,{prefixCls:t,record:r,indentSize:u,indent:l,index:a,column:E,key:E.key||E.dataIndex,expandIcon:p(_)&&y(),component:g}))}var C=(t+" "+b+" "+t+"-level-"+l).trim(),k=i(r,a),T=k?k.style:{},S={height:f};return c||(S.display="none"),S=(0,o.default)({},S,T),h.default.createElement(v,(0,o.default)({onClick:this.onRowClick,onDoubleClick:this.onRowDoubleClick,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onContextMenu:this.onContextMenu,className:C},k,{style:S}),x)},t}(h.default.Component);E.propTypes={onRow:g.default.func,onRowClick:g.default.func,onRowDoubleClick:g.default.func,onRowContextMenu:g.default.func,onRowMouseEnter:g.default.func,onRowMouseLeave:g.default.func,record:g.default.object,prefixCls:g.default.string,onHover:g.default.func,columns:g.default.array,height:g.default.oneOfType([g.default.string,g.default.number]),index:g.default.number,rowKey:g.default.oneOfType([g.default.string,g.default.number]).isRequired,className:g.default.string,indent:g.default.number,indentSize:g.default.number,hasExpandIcon:g.default.func,hovered:g.default.bool.isRequired,visible:g.default.bool.isRequired,store:g.default.object.isRequired,fixed:g.default.oneOfType([g.default.string,g.default.bool]),renderExpandIcon:g.default.func,renderExpandIconCell:g.default.func,components:g.default.any,expandedRow:g.default.bool,isAnyColumnsFixed:g.default.bool,ancestorKeys:g.default.array.isRequired},E.defaultProps={onRow:function(){},onHover:function(){},hasExpandIcon:function(){},renderExpandIcon:function(){},renderExpandIconCell:function(){}},(0,x.polyfill)(E),t.default=(0,b.connect)(function(e,t){var n=e.currentHoverKey,r=e.expandedRowKeys,i=t.rowKey,o=t.ancestorKeys,l=0===o.length||o.every(function(e){return~r.indexOf(e)});return{visible:l,hovered:n===i,height:a(e,t)}})(E),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u,s,f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(1),p=r(d),h=n(2),y=r(h),m=n(23),v=r(m),g=n(12),b=(s=u=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),c(t,[{key:"renderErrorBars",value:function(){var e=this.props,t=e.offset,n=e.layout,r=e.width,i=e.dataKey,o=e.data,l=e.dataPointFormatter,u=e.xAxis,s=e.yAxis,c=a(e,["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"]),d=(0,g.getPresentationAttributes)(c);return o.map(function(e,a){var o=l(e,i),c=o.x,h=o.y,y=o.value,m=o.errorVal;if(!m)return null;var g=void 0,b=void 0,x=void 0,_=void 0,w=void 0,O=void 0,E=void 0,C=void 0,k=void 0,T=void 0,S=void 0,A=void 0;return Array.isArray(m)?(S=m[0],A=m[1]):(S=m,A=m),"vertical"===n?(E=u.scale,g=y,b=h+t,x=E(g-S),_=b+r,w=E(g+A),O=b-r,C={x1:w,y1:_,x2:w,y2:O},k={x1:x,y1:b,x2:w,y2:b},T={x1:x,y1:_,x2:x,y2:O}):"horizontal"===n&&(E=s.scale,g=c+t,b=y,x=g-r,w=g+r,_=E(b-S),O=E(b+A),C={x1:x,y1:O,x2:w,y2:O},k={x1:g,y1:_,x2:g,y2:O},T={x1:x,y1:_,x2:w,y2:_}),p.default.createElement(v.default,f({className:"recharts-errorBar",key:a},d),p.default.createElement("line",C),p.default.createElement("line",k),p.default.createElement("line",T))})}},{key:"render",value:function(){return p.default.createElement(v.default,{className:"recharts-errorBars"},this.renderErrorBars())}}]),t}(d.Component),u.propTypes={dataKey:y.default.oneOfType([y.default.string,y.default.number,y.default.func]).isRequired,data:y.default.array,xAxis:y.default.object,yAxis:y.default.object,layout:y.default.string,dataPointFormatter:y.default.func,stroke:y.default.string,strokeWidth:y.default.number,width:y.default.number,offset:y.default.number},u.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"},s);t.default=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(){return null}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(1),l=(r(o),n(12));a.propTypes=i({},l.PRESENTATION_ATTRIBUTES),a.displayName="Cell",t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,l=e.className,s=e.style,f=a(e,["children","width","height","viewBox","className","style"]),c=i||{width:n,height:r,x:0,y:0},h=(0,d.default)("recharts-surface",l),y=(0,p.getPresentationAttributes)(f);return u.default.createElement("svg",o({},y,{className:h,width:n,height:r,style:s,viewBox:c.x+" "+c.y+" "+c.width+" "+c.height,version:"1.1"}),t)}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(1),u=r(l),s=n(2),f=r(s),c=n(17),d=r(c),p=n(12),h={width:f.default.number.isRequired,height:f.default.number.isRequired,viewBox:f.default.shape({x:f.default.number,y:f.default.number,width:f.default.number,height:f.default.number}),className:f.default.string,style:f.default.object,children:f.default.oneOfType([f.default.arrayOf(f.default.node),f.default.node])};i.propTypes=h,t.default=i},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.formatAxisMap=void 0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(25);t.formatAxisMap=function(e,t,n,o,l){var u=e.width,s=e.height,f=e.layout,c=Object.keys(t),d={left:n.left,leftMirror:n.left,right:u-n.right,rightMirror:u-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom};return c.reduce(function(e,u){var s=t[u],c=s.orientation,p=s.domain,h=s.padding,y=void 0===h?{}:h,m=s.mirror,v=s.reversed,g=""+c+(m?"Mirror":""),b=void 0,x=void 0,_=void 0,w=void 0;b="xAxis"===o?[n.left+(y.left||0),n.left+n.width-(y.right||0)]:"yAxis"===o?"horizontal"===f?[n.top+n.height-(y.bottom||0),n.top+(y.top||0)]:[n.top+(y.top||0),n.top+n.height-(y.bottom||0)]:s.range,v&&(b=[b[1],b[0]]);var O=(0,i.parseScale)(s,l),E=O.scale,C=O.realScaleType;E.domain(p).range(b),(0,i.checkDomainOfScale)(E);var k=(0,i.getTicksOfScale)(E,a({},s,{realScaleType:C}));"xAxis"===o?(w="top"===c&&!m||"bottom"===c&&m,x=n.left,_=d[g]-w*s.height):"yAxis"===o&&(w="left"===c&&!m||"right"===c&&m,x=d[g]-w*s.width,_=n.top);var T=a({},s,k,{realScaleType:C,x:x,y:_,scale:E,width:"xAxis"===o?n.width:s.width,height:"yAxis"===o?n.height:s.height});return T.bandSize=(0,i.getBandSizeOfAxis)(T,k),s.hide||"xAxis"!==o?s.hide||(d[g]+=(w?-1:1)*T.width):d[g]+=(w?-1:1)*T.height,a({},e,r({},u,T))},{})}},,function(e,t,n){var r=n(171),a=r();e.exports=a},function(e,t,n){function r(e){return i(e)&&a(e)}var a=n(38),i=n(58);e.exports=r},,,,function(e,t){function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}e.exports=n},function(e,t,n){function r(e,t,n,o,l){return e===t||(null==e||null==t||!i(e)&&!i(t)?e!==e&&t!==t:a(e,t,n,o,r,l))}var a=n(359),i=n(58);e.exports=r},function(e,t,n){var r=n(175),a=n(336),i=n(49),o=a?function(e,t){return a(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=o},function(e,t){function n(e){return function(t,n,r){for(var a=-1,i=Object(t),o=r(t),l=o.length;l--;){var u=o[e?l:++a];if(n(i[u],u,i)===!1)break}return t}}e.exports=n},function(e,t,n){function r(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,l=i(r.length-t,0),u=Array(l);++o<l;)u[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(u),a(e,this,s)}}var a=n(168),i=Math.max;e.exports=r},function(e,t,n){var r=n(170),a=n(174),i=a(r);e.exports=i},function(e,t){function n(e){var t=0,n=0;return function(){var o=i(),l=a-(o-n);if(n=o,l>0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var r=800,a=16,i=Date.now;e.exports=n},function(e,t){function n(e){return function(){return e}}e.exports=n},,[1973,181],,,function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=a(i),l=n(3),u=a(l),s=n(8),f=a(s),c=n(5),d=a(c),p=n(4),h=a(p),y=n(1),m=r(y),v=n(31),g=a(v),b=n(106),x=a(b),_=n(7),w=a(_),O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]]);return n},E=g.default.Group,C=function(e){function t(){return(0,u.default)(this,t),(0,d.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,h.default)(t,e),(0,f.default)(t,[{key:"render",value:function(){var e=this.props,t=e.type,n=e.disabled,r=e.onClick,a=e.children,i=e.prefixCls,l=e.className,u=e.overlay,s=e.trigger,f=e.align,c=e.visible,d=e.onVisibleChange,p=e.placement,h=e.getPopupContainer,y=O(e,["type","disabled","onClick","children","prefixCls","className","overlay","trigger","align","visible","onVisibleChange","placement","getPopupContainer"]),v={align:f,overlay:u,disabled:n,trigger:n?[]:s,onVisibleChange:d,placement:p,getPopupContainer:h};return"visible"in this.props&&(v.visible=c),m.createElement(E,(0,o.default)({},y,{className:(0,w.default)(i,l)}),m.createElement(g.default,{type:t,disabled:n,onClick:r},a),m.createElement(x.default,v,m.createElement(g.default,{type:t,icon:"ellipsis"})))}}]),t}(m.Component);t.default=C,C.defaultProps={placement:"bottomRight",type:"default",prefixCls:"ant-dropdown-button"},e.exports=t.default},11,function(e,t,n){!function(e,r){r(t,n(213))}(this,function(e,t){"use strict";function n(e,t,n,r,a){var i=e*e,o=i*e;return((1-3*e+3*i-o)*t+(4-6*i+3*o)*n+(1+3*e+3*i-3*o)*r+o*a)/6}function r(e,t){return function(n){return e+n*t}}function a(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function i(e,t){var n=t-e;return n?r(e,n>180||n<-180?n-360*Math.round(n/360):n):S(isNaN(e)?t:e)}function o(e){return 1===(e=+e)?l:function(t,n){return n-t?a(t,n,e):S(isNaN(t)?n:t)}}function l(e,t){var n=t-e;return n?r(e,n):S(isNaN(e)?t:e)}function u(e){return function(n){var r,a,i=n.length,o=new Array(i),l=new Array(i),u=new Array(i);for(r=0;r<i;++r)a=t.rgb(n[r]),o[r]=a.r||0,l[r]=a.g||0,u[r]=a.b||0;return o=e(o),l=e(l),u=e(u),a.opacity=1,function(e){return a.r=o(e),a.g=l(e),a.b=u(e),a+""}}}function s(e){return function(){return e}}function f(e){return function(t){return e(t)+""}}function c(e){return"none"===e?W:(w||(w=document.createElement("DIV"),O=document.documentElement,E=document.defaultView),w.style.transform=e,e=E.getComputedStyle(O.appendChild(w),null).getPropertyValue("transform"),O.removeChild(w),e=e.slice(7,-1).split(","),K(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5])); }function d(e){return null==e?W:(C||(C=document.createElementNS("http://www.w3.org/2000/svg","g")),C.setAttribute("transform",e),(e=C.transform.baseVal.consolidate())?(e=e.matrix,K(e.a,e.b,e.c,e.d,e.e,e.f)):W)}function p(e,t,n,r){function a(e){return e.length?e.pop()+" ":""}function i(e,r,a,i,o,l){if(e!==a||r!==i){var u=o.push("translate(",null,t,null,n);l.push({i:u-4,x:R(e,a)},{i:u-2,x:R(r,i)})}else(a||i)&&o.push("translate("+a+t+i+n)}function o(e,t,n,i){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),i.push({i:n.push(a(n)+"rotate(",null,r)-2,x:R(e,t)})):t&&n.push(a(n)+"rotate("+t+r)}function l(e,t,n,i){e!==t?i.push({i:n.push(a(n)+"skewX(",null,r)-2,x:R(e,t)}):t&&n.push(a(n)+"skewX("+t+r)}function u(e,t,n,r,i,o){if(e!==n||t!==r){var l=i.push(a(i)+"scale(",null,",",null,")");o.push({i:l-4,x:R(e,n)},{i:l-2,x:R(t,r)})}else 1===n&&1===r||i.push(a(i)+"scale("+n+","+r+")")}return function(t,n){var r=[],a=[];return t=e(t),n=e(n),i(t.translateX,t.translateY,n.translateX,n.translateY,r,a),o(t.rotate,n.rotate,r,a),l(t.skewX,n.skewX,r,a),u(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,a),t=n=null,function(e){for(var t,n=-1,i=a.length;++n<i;)r[(t=a[n]).i]=t.x(e);return r.join("")}}}function h(e){return((e=Math.exp(e))+1/e)/2}function y(e){return((e=Math.exp(e))-1/e)/2}function m(e){return((e=Math.exp(2*e))-1)/(e+1)}function v(e){return function(n,r){var a=e((n=t.hsl(n)).h,(r=t.hsl(r)).h),i=l(n.s,r.s),o=l(n.l,r.l),u=l(n.opacity,r.opacity);return function(e){return n.h=a(e),n.s=i(e),n.l=o(e),n.opacity=u(e),n+""}}}function g(e,n){var r=l((e=t.lab(e)).l,(n=t.lab(n)).l),a=l(e.a,n.a),i=l(e.b,n.b),o=l(e.opacity,n.opacity);return function(t){return e.l=r(t),e.a=a(t),e.b=i(t),e.opacity=o(t),e+""}}function b(e){return function(n,r){var a=e((n=t.hcl(n)).h,(r=t.hcl(r)).h),i=l(n.c,r.c),o=l(n.l,r.l),u=l(n.opacity,r.opacity);return function(e){return n.h=a(e),n.c=i(e),n.l=o(e),n.opacity=u(e),n+""}}}function x(e){return function n(r){function a(n,a){var i=e((n=t.cubehelix(n)).h,(a=t.cubehelix(a)).h),o=l(n.s,a.s),u=l(n.l,a.l),s=l(n.opacity,a.opacity);return function(e){return n.h=i(e),n.s=o(e),n.l=u(Math.pow(e,r)),n.opacity=s(e),n+""}}return r=+r,a.gamma=n,a}(1)}function _(e,t){for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return i[t](e-t)}}var w,O,E,C,k=function(e){var t=e.length-1;return function(r){var a=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[a],o=e[a+1],l=a>0?e[a-1]:2*i-o,u=a<t-1?e[a+2]:2*o-i;return n((r-a/t)*t,l,i,o,u)}},T=function(e){var t=e.length;return function(r){var a=Math.floor(((r%=1)<0?++r:r)*t),i=e[(a+t-1)%t],o=e[a%t],l=e[(a+1)%t],u=e[(a+2)%t];return n((r-a/t)*t,i,o,l,u)}},S=function(e){return function(){return e}},A=function e(n){function r(e,n){var r=a((e=t.rgb(e)).r,(n=t.rgb(n)).r),i=a(e.g,n.g),o=a(e.b,n.b),u=l(e.opacity,n.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=u(t),e+""}}var a=o(n);return r.gamma=e,r}(1),M=u(k),P=u(T),N=function(e,t){var n,r=t?t.length:0,a=e?Math.min(r,e.length):0,i=new Array(a),o=new Array(r);for(n=0;n<a;++n)i[n]=V(e[n],t[n]);for(;n<r;++n)o[n]=t[n];return function(e){for(n=0;n<a;++n)o[n]=i[n](e);return o}},j=function(e,t){var n=new Date;return e=+e,t-=e,function(r){return n.setTime(e+t*r),n}},R=function(e,t){return e=+e,t-=e,function(n){return e+t*n}},I=function(e,t){var n,r={},a={};null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={});for(n in t)n in e?r[n]=V(e[n],t[n]):a[n]=t[n];return function(e){for(n in r)a[n]=r[n](e);return a}},D=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,L=new RegExp(D.source,"g"),B=function(e,t){var n,r,a,i=D.lastIndex=L.lastIndex=0,o=-1,l=[],u=[];for(e+="",t+="";(n=D.exec(e))&&(r=L.exec(t));)(a=r.index)>i&&(a=t.slice(i,a),l[o]?l[o]+=a:l[++o]=a),(n=n[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,u.push({i:o,x:R(n,r)})),i=L.lastIndex;return i<t.length&&(a=t.slice(i),l[o]?l[o]+=a:l[++o]=a),l.length<2?u[0]?f(u[0].x):s(t):(t=u.length,function(e){for(var n,r=0;r<t;++r)l[(n=u[r]).i]=n.x(e);return l.join("")})},V=function(e,n){var r,a=typeof n;return null==n||"boolean"===a?S(n):("number"===a?R:"string"===a?(r=t.color(n))?(n=r,A):B:n instanceof t.color?A:n instanceof Date?j:Array.isArray(n)?N:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?I:R)(e,n)},F=function(e,t){return e=+e,t-=e,function(n){return Math.round(e+t*n)}},z=180/Math.PI,W={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},K=function(e,t,n,r,a,i){var o,l,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,u/=l),e*r<t*n&&(e=-e,t=-t,u=-u,o=-o),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*z,skewX:Math.atan(u)*z,scaleX:o,scaleY:l}},U=p(c,"px, ","px)","deg)"),G=p(d,", ",")",")"),H=Math.SQRT2,q=2,Y=4,X=1e-12,J=function(e,t){var n,r,a=e[0],i=e[1],o=e[2],l=t[0],u=t[1],s=t[2],f=l-a,c=u-i,d=f*f+c*c;if(d<X)r=Math.log(s/o)/H,n=function(e){return[a+e*f,i+e*c,o*Math.exp(H*e*r)]};else{var p=Math.sqrt(d),v=(s*s-o*o+Y*d)/(2*o*q*p),g=(s*s-o*o-Y*d)/(2*s*q*p),b=Math.log(Math.sqrt(v*v+1)-v),x=Math.log(Math.sqrt(g*g+1)-g);r=(x-b)/H,n=function(e){var t=e*r,n=h(b),l=o/(q*p)*(n*m(H*t+b)-y(b));return[a+l*f,i+l*c,o*n/h(H*t+b)]}}return n.duration=1e3*r,n},$=v(i),Z=v(l),Q=b(i),ee=b(l),te=x(i),ne=x(l),re=function(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n};e.interpolate=V,e.interpolateArray=N,e.interpolateBasis=k,e.interpolateBasisClosed=T,e.interpolateDate=j,e.interpolateNumber=R,e.interpolateObject=I,e.interpolateRound=F,e.interpolateString=B,e.interpolateTransformCss=U,e.interpolateTransformSvg=G,e.interpolateZoom=J,e.interpolateRgb=A,e.interpolateRgbBasis=M,e.interpolateRgbBasisClosed=P,e.interpolateHsl=$,e.interpolateHslLong=Z,e.interpolateLab=g,e.interpolateHcl=Q,e.interpolateHclLong=ee,e.interpolateCubehelix=te,e.interpolateCubehelixLong=ne,e.piecewise=_,e.quantize=re,Object.defineProperty(e,"__esModule",{value:!0})})},,function(e,t,n){function r(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],l=t(o);if(null!=l&&(void 0===u?l===l&&!a(l):n(l,u)))var u=l,s=o}return s}var a=n(338);e.exports=r},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}e.exports=n},function(e,t,n){function r(e){return a(e)&&e!=+e}var a=n(265);e.exports=r},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(1),f=r(s),c=n(2),d=r(c),p=n(10),h=r(p),y=n(70),m=r(y),v=n(190),g=r(v),b=n(20),x=function(e){function t(n){i(this,t);var r=o(this,e.call(this,n));return _.call(r),"visible"in n?r.state={visible:n.visible}:r.state={visible:n.defaultVisible},r}return l(t,e),t.getDerivedStateFromProps=function(e){return"visible"in e?{visible:e.visible}:null},t.prototype.getMenuElement=function(){var e=this.props,t=e.overlay,n=e.prefixCls,r={prefixCls:n+"-menu",onClick:this.onClick};return"string"==typeof t.type&&delete r.prefixCls,f.default.cloneElement(t,r)},t.prototype.getPopupDomNode=function(){return this.trigger.getPopupDomNode()},t.prototype.render=function(){var e=this.props,t=e.prefixCls,n=e.children,r=e.transitionName,i=e.animation,o=e.align,l=e.placement,s=e.getPopupContainer,c=e.showAction,d=e.hideAction,p=e.overlayClassName,h=e.overlayStyle,y=e.trigger,v=a(e,["prefixCls","children","transitionName","animation","align","placement","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","trigger"]);return f.default.createElement(m.default,u({},v,{prefixCls:t,ref:this.saveTrigger,popupClassName:p,popupStyle:h,builtinPlacements:g.default,action:y,showAction:c,hideAction:d,popupPlacement:l,popupAlign:o,popupTransitionName:r,popupAnimation:i,popupVisible:this.state.visible,afterPopupVisibleChange:this.afterVisibleChange,popup:this.getMenuElement(),onPopupVisibleChange:this.onVisibleChange,getPopupContainer:s}),n)},t}(s.Component);x.propTypes={minOverlayWidthMatchTrigger:d.default.bool,onVisibleChange:d.default.func,onOverlayClick:d.default.func,prefixCls:d.default.string,children:d.default.any,transitionName:d.default.string,overlayClassName:d.default.string,animation:d.default.any,align:d.default.object,overlayStyle:d.default.object,placement:d.default.string,overlay:d.default.node,trigger:d.default.array,showAction:d.default.array,hideAction:d.default.array,getPopupContainer:d.default.func,visible:d.default.bool,defaultVisible:d.default.bool},x.defaultProps={minOverlayWidthMatchTrigger:!0,prefixCls:"rc-dropdown",trigger:["hover"],showAction:[],hideAction:[],overlayClassName:"",overlayStyle:{},defaultVisible:!1,onVisibleChange:function(){},placement:"bottomLeft"};var _=function(){var e=this;this.onClick=function(t){var n=e.props,r=n.overlay.props;"visible"in n||e.setState({visible:!1}),n.onOverlayClick&&n.onOverlayClick(t),r.onClick&&r.onClick(t)},this.onVisibleChange=function(t){var n=e.props;"visible"in n||e.setState({visible:t}),n.onVisibleChange(t)},this.afterVisibleChange=function(t){if(t&&e.props.minOverlayWidthMatchTrigger){var n=e.getPopupDomNode(),r=h.default.findDOMNode(e);r&&n&&r.offsetWidth>n.offsetWidth&&(n.style.minWidth=r.offsetWidth+"px",e.trigger&&e.trigger._component&&e.trigger._component.alignInstance&&e.trigger._component.alignInstance.forceAlign())}},this.saveTrigger=function(t){e.trigger=t}};(0,b.polyfill)(x),t.default=x,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(188),i=r(a);t.default=i.default,e.exports=t.default},function(e,t){"use strict";t.__esModule=!0;var n={adjustX:1,adjustY:1},r=[0,0],a=t.placements={topLeft:{points:["bl","tl"],overflow:n,offset:[0,-4],targetOffset:r},topCenter:{points:["bc","tc"],overflow:n,offset:[0,-4],targetOffset:r},topRight:{points:["br","tr"],overflow:n,offset:[0,-4],targetOffset:r},bottomLeft:{points:["tl","bl"],overflow:n,offset:[0,4],targetOffset:r},bottomCenter:{points:["tc","bc"],overflow:n,offset:[0,4],targetOffset:r},bottomRight:{points:["tr","br"],overflow:n,offset:[0,4],targetOffset:r}};t.default=a},,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.warn=t.getTransitionVal=t.compose=t.translateStyle=t.mapObject=t.debugf=t.debug=t.log=t.generatePrefixStyle=t.getDashCase=t.identity=t.getIntersectionKeys=void 0;var i=n(496),o=r(i),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=["Webkit","Moz","O","ms"],s=["-webkit-","-moz-","-o-","-ms-"],f=["transform","transformOrigin","transition"],c=(t.getIntersectionKeys=function(e,t){return(0,o.default)(Object.keys(e),Object.keys(t))},t.identity=function(e){return e}),d=t.getDashCase=function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})},p=t.generatePrefixStyle=function(e,t){if(f.indexOf(e)===-1)return a({},e,t);var n="transition"===e,r=e.replace(/(\w)/,function(e){return e.toUpperCase()}),i=t;return u.reduce(function(e,o,u){return n&&(i=t.replace(/(transform|transform-origin)/gim,s[u]+"$1")),l({},e,a({},o+r,i))},{})},h=t.log=function(){var e;(e=console).log.apply(e,arguments)},y=(t.debug=function(e){return function(t){return h(e,t),t}},t.debugf=function(e,t){return function(){for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var i=t.apply(void 0,r),o=e||t.name||"anonymous function",l="("+r.map(JSON.stringify).join(", ")+")";return h(o+": "+l+" => "+JSON.stringify(i)),i}},t.mapObject=function(e,t){return Object.keys(t).reduce(function(n,r){return l({},n,a({},r,e(r,t[r])))},{})},t.translateStyle=function(e){return Object.keys(e).reduce(function(e,t){return l({},e,p(t,e[t]))},e)},t.compose=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return c;var r=t.reverse(),a=r[0],i=r.slice(1);return function(){return i.reduce(function(e,t){return t(e)},a.apply(void 0,arguments))}},t.getTransitionVal=function(e,t,n){return e.map(function(e){return d(e)+" "+t+"ms "+n}).join(",")},!1);t.warn=function(e,t,n,r,a,i,o,l){if(y&&"undefined"!=typeof console&&console.warn&&(void 0===t&&console.warn("LogUtils requires an error message argument"),!e))if(void 0===t)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,i,o,l],s=0;console.warn(t.replace(/%s/g,function(){return u[s++]}))}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),d=n(2),p=r(d),h=n(13),y=r(h),m=(0,y.default)((s=u=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),f(t,[{key:"render",value:function(){return null}}]),t}(c.Component),u.displayName="ZAxis",u.propTypes={type:p.default.oneOf(["number","category"]),name:p.default.oneOfType([p.default.string,p.default.number]),unit:p.default.oneOfType([p.default.string,p.default.number]),zAxisId:p.default.oneOfType([p.default.string,p.default.number]),dataKey:p.default.oneOfType([p.default.string,p.default.number,p.default.func]),range:p.default.arrayOf(p.default.number),scale:p.default.oneOfType([p.default.oneOf(["auto","linear","pow","sqrt","log","identity","time","band","point","ordinal","quantile","quantize","utcTime","sequential","threshold"]),p.default.func])},u.defaultProps={zAxisId:0,range:[64,64],scale:"auto",type:"number"},l=s))||l;t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=n(44),c=r(f),d=n(15),p=r(d),h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=n(1),v=r(m),g=n(2),b=r(g),x=n(66),_=n(545),w=r(_),O=n(12),E=n(18),C=n(13),k=r(C),T=1,S={content:b.default.oneOfType([b.default.element,b.default.func]),viewBox:b.default.shape({x:b.default.number,y:b.default.number,width:b.default.number,height:b.default.number}),active:b.default.bool,separator:b.default.string,formatter:b.default.func,offset:b.default.number,itemStyle:b.default.object,labelStyle:b.default.object,wrapperStyle:b.default.object,cursor:b.default.oneOfType([b.default.bool,b.default.element,b.default.object]),coordinate:b.default.shape({x:b.default.number,y:b.default.number}),position:b.default.shape({x:b.default.number,y:b.default.number}),label:b.default.any,payload:b.default.arrayOf(b.default.shape({name:b.default.any,value:b.default.oneOfType([b.default.number,b.default.string,b.default.array]),unit:b.default.any})),isAnimationActive:b.default.bool,animationDuration:b.default.number,animationEasing:b.default.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),itemSorter:b.default.func,filterNull:b.default.bool,useTranslate3d:b.default.bool},A={active:!1,offset:10,viewBox:{x1:0,x2:0,y1:0,y2:0},coordinate:{x:0,y:0},cursorStyle:{},separator:" : ",wrapperStyle:{},itemStyle:{},labelStyle:{},cursor:!0,isAnimationActive:!(0,O.isSsr)(),animationEasing:"ease",animationDuration:400,itemSorter:function(){return-1},filterNull:!0,useTranslate3d:!1},M=function(e,t){return v.default.isValidElement(e)?v.default.cloneElement(e,t):(0,p.default)(e)?e(t):v.default.createElement(w.default,t)},P=(0,k.default)((s=u=function(e){function t(){var e,n,r,o;a(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={boxWidth:-1,boxHeight:-1},o=n,i(r,o)}return o(t,e),y(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"updateBBox",value:function(){var e=this.state,t=e.boxWidth,n=e.boxHeight;if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-t)>T||Math.abs(r.height-n)>T)&&this.setState({boxWidth:r.width,boxHeight:r.height})}else t===-1&&n===-1||this.setState({boxWidth:-1,boxHeight:-1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.payload,r=t.isAnimationActive,a=t.animationDuration,i=t.animationEasing,o=t.filterNull,l=o&&n&&n.length?n.filter(function(e){return!(0,c.default)(e.value)}):n,u=l&&l.length,s=this.props,f=s.content,d=s.viewBox,p=s.coordinate,y=s.position,m=s.active,g=s.offset,b=s.wrapperStyle,_=h({pointerEvents:"none",visibility:m&&u?"visible":"hidden",position:"absolute",top:0},b),w=void 0,O=void 0;if(y&&(0,E.isNumber)(y.x)&&(0,E.isNumber)(y.y))w=y.x,O=y.y;else{var C=this.state,k=C.boxWidth,T=C.boxHeight;k>0&&T>0&&p?(w=y&&(0,E.isNumber)(y.x)?y.x:Math.max(p.x+k+g>d.x+d.width?p.x-k-g:p.x+g,d.x),O=y&&(0,E.isNumber)(y.y)?y.y:Math.max(p.y+T+g>d.y+d.height?p.y-T-g:p.y+g,d.y)):_.visibility="hidden"}return _=h({},_,(0,x.translateStyle)({transform:this.props.useTranslate3d?"translate3d("+w+"px, "+O+"px, 0)":"translate("+w+"px, "+O+"px)"})),r&&m&&(_=h({},_,(0,x.translateStyle)({transition:"transform "+a+"ms "+i}))),v.default.createElement("div",{className:"recharts-tooltip-wrapper",style:_,ref:function(t){e.wrapperNode=t}},M(f,h({},this.props,{payload:l})))}}]),t}(m.Component),u.displayName="Tooltip",u.propTypes=S,u.defaultProps=A,l=s))||l;t.default=P},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=n(15),c=r(f),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=n(1),y=r(h),m=n(2),v=r(m),g=n(13),b=r(g),x=n(23),_=r(x),w=n(12),O=n(103),E=r(O),C=n(294),k=r(C),T=n(102),S=r(T),A=n(55),M=Math.PI/180,P=1e-5,N=(0,b.default)((s=u=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),p(t,[{key:"getTickLineCoord",value:function(e){var t=this.props,n=t.cx,r=t.cy,a=t.radius,i=t.orientation,o=t.tickLine,l=o&&o.size||8,u=(0,A.polarToCartesian)(n,r,a,e.coordinate),s=(0,A.polarToCartesian)(n,r,a+("inner"===i?-1:1)*l,e.coordinate);return{x1:u.x,y1:u.y,x2:s.x,y2:s.y}}},{key:"getTickTextAnchor",value:function(e){var t=this.props.orientation,n=Math.cos(-e.coordinate*M),r=void 0;return r=n>P?"outer"===t?"start":"end":n<-P?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.radius,a=e.axisLine,i=e.axisLineType,o=d({},(0,w.getPresentationAttributes)(this.props),{fill:"none"},(0,w.getPresentationAttributes)(a));if("circle"===i)return y.default.createElement(E.default,d({className:"recharts-polar-angle-axis-line"},o,{cx:t,cy:n,r:r}));var l=this.props.ticks,u=l.map(function(e){return(0,A.polarToCartesian)(t,n,r,e.coordinate)});return y.default.createElement(k.default,d({className:"recharts-polar-angle-axis-line"},o,{points:u}))}},{key:"renderTickItem",value:function(e,t,n){var r=void 0;return r=y.default.isValidElement(e)?y.default.cloneElement(e,t):(0,c.default)(e)?e(t):y.default.createElement(S.default,d({},t,{className:"recharts-polar-angle-axis-tick-value"}),n)}},{key:"renderTicks",value:function(){var e=this,t=this.props,n=t.ticks,r=t.tick,a=t.tickLine,i=t.tickFormatter,o=t.stroke,l=(0,w.getPresentationAttributes)(this.props),u=(0,w.getPresentationAttributes)(r),s=d({},l,{fill:"none"},(0,w.getPresentationAttributes)(a)),f=n.map(function(t,n){var f=e.getTickLineCoord(t),c=e.getTickTextAnchor(t),p=d({textAnchor:c},l,{stroke:"none",fill:o},u,{index:n,payload:t,x:f.x2,y:f.y2});return y.default.createElement(_.default,d({className:"recharts-polar-angle-axis-tick",key:"tick-"+n},(0,w.filterEventsOfChild)(e.props,t,n)),a&&y.default.createElement("line",d({className:"recharts-polar-angle-axis-tick-line"},s,f)),r&&e.renderTickItem(r,p,i?i(t.value):t.value))});return y.default.createElement(_.default,{className:"recharts-polar-angle-axis-ticks"},f)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.radius,r=e.axisLine;return n<=0||!t||!t.length?null:y.default.createElement(_.default,{className:"recharts-polar-angle-axis"},r&&this.renderAxisLine(),this.renderTicks())}}]),t}(h.Component),u.displayName="PolarAngleAxis",u.axisType="angleAxis",u.propTypes=d({},w.PRESENTATION_ATTRIBUTES,w.EVENT_ATTRIBUTES,{type:v.default.oneOf(["number","category"]),angleAxisId:v.default.oneOfType([v.default.string,v.default.number]),dataKey:v.default.oneOfType([v.default.number,v.default.string,v.default.func]),cx:v.default.number,cy:v.default.number,radius:v.default.oneOfType([v.default.number,v.default.string]),hide:v.default.bool,scale:v.default.oneOfType([v.default.oneOf(w.SCALE_TYPES),v.default.func]),axisLine:v.default.oneOfType([v.default.bool,v.default.object]),axisLineType:v.default.oneOf(["polygon","circle"]),tickLine:v.default.oneOfType([v.default.bool,v.default.object]),tick:v.default.oneOfType([v.default.bool,v.default.func,v.default.object,v.default.element]),ticks:v.default.arrayOf(v.default.shape({value:v.default.any,coordinate:v.default.number})),stroke:v.default.string,orientation:v.default.oneOf(["inner","outer"]),tickFormatter:v.default.func,allowDuplicatedCategory:v.default.bool}),u.defaultProps={type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,domain:[0,"auto"],orientation:"outer",axisLine:!0,tickLine:!0,tick:!0,hide:!1,allowDuplicatedCategory:!0},l=s))||l;t.default=N},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u,s,f,c=n(15),d=r(c),p=n(500),h=r(p),y=n(377),m=r(y),v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=n(1),x=r(b),_=n(2),w=r(_),O=n(13),E=r(O),C=n(102),k=r(C),T=n(88),S=r(T),A=n(23),M=r(A),P=n(12),N=n(55),j=(0,E.default)((f=s=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),g(t,[{key:"getTickValueCoord",value:function(e){var t=e.coordinate,n=this.props,r=n.angle,a=n.cx,i=n.cy;return(0,N.polarToCartesian)(a,i,t,r)}},{key:"getTickTextAnchor",value:function(){var e=this.props.orientation,t=void 0;switch(e){case"left":t="end";break;case"right":t="start";break;default:t="middle"}return t}},{key:"getViewBox",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,a=e.ticks,i=(0,m.default)(a,function(e){return e.coordinate||0}),o=(0,h.default)(a,function(e){return e.coordinate||0});return{cx:t,cy:n,startAngle:r,endAngle:r,innerRadius:o.coordinate||0,outerRadius:i.coordinate||0}}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,i=e.ticks,o=e.axisLine,l=a(e,["cx","cy","angle","ticks","axisLine"]),u=i.reduce(function(e,t){return[Math.min(e[0],t.coordinate),Math.max(e[1],t.coordinate)]},[1/0,-(1/0)]),s=(0,N.polarToCartesian)(t,n,u[0],r),f=(0,N.polarToCartesian)(t,n,u[1],r),c=v({},(0,P.getPresentationAttributes)(l),{fill:"none"},(0,P.getPresentationAttributes)(o),{x1:s.x,y1:s.y,x2:f.x,y2:f.y});return x.default.createElement("line",v({className:"recharts-polar-radius-axis-line"},c))}},{key:"renderTickItem",value:function(e,t,n){var r=void 0;return r=x.default.isValidElement(e)?x.default.cloneElement(e,t):(0,d.default)(e)?e(t):x.default.createElement(k.default,v({},t,{className:"recharts-polar-radius-axis-tick-value"}),n)}},{key:"renderTicks",value:function(){var e=this,t=this.props,n=t.ticks,r=t.tick,i=t.angle,o=t.tickFormatter,l=t.stroke,u=a(t,["ticks","tick","angle","tickFormatter","stroke"]),s=this.getTickTextAnchor(),f=(0,P.getPresentationAttributes)(u),c=(0,P.getPresentationAttributes)(r),d=n.map(function(t,n){var a=e.getTickValueCoord(t),u=v({textAnchor:s,transform:"rotate("+(90-i)+", "+a.x+", "+a.y+")"},f,{stroke:"none",fill:l},c,{index:n},a,{payload:t});return x.default.createElement(M.default,v({className:"recharts-polar-radius-axis-tick",key:"tick-"+n},(0,P.filterEventsOfChild)(e.props,t,n)),e.renderTickItem(r,u,o?o(t.value):t.value))});return x.default.createElement(M.default,{className:"recharts-polar-radius-axis-ticks"},d)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.axisLine,r=e.tick;return t&&t.length?x.default.createElement(M.default,{className:"recharts-polar-radius-axis"},n&&this.renderAxisLine(),r&&this.renderTicks(),S.default.renderCallByParent(this.props,this.getViewBox())):null}}]),t}(b.Component),s.displayName="PolarRadiusAxis",s.axisType="radiusAxis",s.propTypes=v({},P.PRESENTATION_ATTRIBUTES,P.EVENT_ATTRIBUTES,{type:w.default.oneOf(["number","category"]),cx:w.default.number,cy:w.default.number,hide:w.default.bool,radiusAxisId:w.default.oneOfType([w.default.string,w.default.number]),angle:w.default.number,tickCount:w.default.number,ticks:w.default.arrayOf(w.default.shape({value:w.default.any,coordinate:w.default.number})),orientation:w.default.oneOf(["left","right","middle"]),axisLine:w.default.oneOfType([w.default.bool,w.default.object]),tick:w.default.oneOfType([w.default.bool,w.default.object,w.default.element,w.default.func]),stroke:w.default.string,tickFormatter:w.default.func,domain:w.default.arrayOf(w.default.oneOfType([w.default.number,w.default.oneOf(["auto","dataMin","dataMax"])])),scale:w.default.oneOfType([w.default.oneOf(["auto","linear","pow","sqrt","log","identity","time","band","point","ordinal","quantile","quantize","utcTime","sequential","threshold"]),w.default.func]),allowDataOverflow:w.default.bool,allowDuplicatedCategory:w.default.bool}),s.defaultProps={type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,domain:[0,"auto"],allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0},u=f))||u;t.default=j},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(1),p=r(d),h=n(2),y=r(h),m=n(17),v=r(m),g=n(13),b=r(g),x=n(12),_=n(55),w=n(18),O=function(e,t){var n=(0,w.mathSign)(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},E=function(e){var t=e.cx,n=e.cy,r=e.radius,a=e.angle,i=e.sign,o=e.isExternal,l=e.cornerRadius,u=l*(o?1:-1)+r,s=Math.asin(l/u)/_.RADIAN,f=a+i*s,c=(0,_.polarToCartesian)(t,n,u,f),d=(0,_.polarToCartesian)(t,n,r,f),p=(0,_.polarToCartesian)(t,n,u*Math.cos(s*_.RADIAN),a);return{center:c,circleTangency:d,lineTangency:p,theta:s}},C=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,a=e.outerRadius,i=e.startAngle,o=e.endAngle,l=O(i,o),u=i+l,s=(0,_.polarToCartesian)(t,n,a,i),f=(0,_.polarToCartesian)(t,n,a,u),c="M "+s.x+","+s.y+"\n A "+a+","+a+",0,\n "+ +(Math.abs(l)>180)+","+ +(i>u)+",\n "+f.x+","+f.y+"\n "; if(r>0){var d=(0,_.polarToCartesian)(t,n,r,i),p=(0,_.polarToCartesian)(t,n,r,u);c+="L "+p.x+","+p.y+"\n A "+r+","+r+",0,\n "+ +(Math.abs(l)>180)+","+ +(i<=u)+",\n "+d.x+","+d.y+" Z"}else c+="L "+t+","+n+" Z";return c},k=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,a=e.outerRadius,i=e.cornerRadius,o=e.startAngle,l=e.endAngle,u=(0,w.mathSign)(l-o),s=E({cx:t,cy:n,radius:a,angle:o,sign:u,cornerRadius:i}),f=s.circleTangency,c=s.lineTangency,d=s.theta,p=E({cx:t,cy:n,radius:a,angle:l,sign:-u,cornerRadius:i}),h=p.circleTangency,y=p.lineTangency,m=p.theta,v=Math.abs(o-l)-d-m;if(v<0)return C({cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:o,endAngle:l});var g="M "+c.x+","+c.y+"\n A"+i+","+i+",0,0,"+ +(u<0)+","+f.x+","+f.y+"\n A"+a+","+a+",0,"+ +(v>180)+","+ +(u<0)+","+h.x+","+h.y+"\n A"+i+","+i+",0,0,"+ +(u<0)+","+y.x+","+y.y+"\n ";if(r>0){var b=E({cx:t,cy:n,radius:r,angle:o,sign:u,isExternal:!0,cornerRadius:i}),x=b.circleTangency,_=b.lineTangency,O=b.theta,k=E({cx:t,cy:n,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:i}),T=k.circleTangency,S=k.lineTangency,A=k.theta,M=Math.abs(o-l)-O-A;if(M<0)return g+"L"+t+","+n+"Z";g+="L"+S.x+","+S.y+"\n A"+i+","+i+",0,0,"+ +(u<0)+","+T.x+","+T.y+"\n A"+r+","+r+",0,"+ +(M>180)+","+ +(u>0)+","+x.x+","+x.y+"\n A"+i+","+i+",0,0,"+ +(u<0)+","+_.x+","+_.y+"Z"}else g+="L"+t+","+n+"Z";return g},T=(0,b.default)((s=u=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.innerRadius,a=e.outerRadius,i=e.cornerRadius,o=e.startAngle,l=e.endAngle,u=e.className;if(a<r||o===l)return null;var s=(0,v.default)("recharts-sector",u),c=a-r,d=(0,w.getPercentValue)(i,c,0,!0),h=void 0;return h=d>0&&Math.abs(o-l)<360?k({cx:t,cy:n,innerRadius:r,outerRadius:a,cornerRadius:Math.min(d,c/2),startAngle:o,endAngle:l}):C({cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:o,endAngle:l}),p.default.createElement("path",f({},(0,x.getPresentationAttributes)(this.props),(0,x.filterEventAttributes)(this.props),{className:s,d:h}))}}]),t}(d.Component),u.displayName="Sector",u.propTypes=f({},x.PRESENTATION_ATTRIBUTES,{className:y.default.string,cx:y.default.number,cy:y.default.number,innerRadius:y.default.number,outerRadius:y.default.number,startAngle:y.default.number,endAngle:y.default.number,cornerRadius:y.default.oneOfType([y.default.number,y.default.string])}),u.defaultProps={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0},l=s))||l;t.default=T},417,,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(236),i=r(a);t.default=i.default,e.exports=t.default},function(e,t,n){"use strict";n(11),n(244),n(94),n(120),n(177),n(343),n(230)},,function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new a;++t<n;)this.add(e[t])}var a=n(179),i=n(373),o=n(374);r.prototype.add=r.prototype.push=i,r.prototype.has=o,e.exports=r},,function(e,t){function n(e,t){return e.has(t)}e.exports=n},,,,function(e,t,n){!function(e,n){n(t)}(this,function(e){"use strict";function t(e){return function(t,n){return o(e(t),n)}}function n(e,t){return[e,t]}function r(e,t,n){var r=(t-e)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,a);return a>=0?(i>=E?10:i>=C?5:i>=k?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=E?10:i>=C?5:i>=k?2:1)}function a(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/a;return i>=E?a*=10:i>=C?a*=5:i>=k&&(a*=2),t<e?-a:a}function i(e){return e.length}var o=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN},l=function(e){return 1===e.length&&(e=t(e)),{left:function(t,n,r,a){for(null==r&&(r=0),null==a&&(a=t.length);r<a;){var i=r+a>>>1;e(t[i],n)<0?r=i+1:a=i}return r},right:function(t,n,r,a){for(null==r&&(r=0),null==a&&(a=t.length);r<a;){var i=r+a>>>1;e(t[i],n)>0?a=i:r=i+1}return r}}},u=l(o),s=u.right,f=u.left,c=function(e,t){null==t&&(t=n);for(var r=0,a=e.length-1,i=e[0],o=new Array(a<0?0:a);r<a;)o[r]=t(i,i=e[++r]);return o},d=function(e,t,r){var a,i,o,l,u=e.length,s=t.length,f=new Array(u*s);for(null==r&&(r=n),a=o=0;a<u;++a)for(l=e[a],i=0;i<s;++i,++o)f[o]=r(l,t[i]);return f},p=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},h=function(e){return null===e?NaN:+e},y=function(e,t){var n,r,a=e.length,i=0,o=-1,l=0,u=0;if(null==t)for(;++o<a;)isNaN(n=h(e[o]))||(r=n-l,l+=r/++i,u+=r*(n-l));else for(;++o<a;)isNaN(n=h(t(e[o],o,e)))||(r=n-l,l+=r/++i,u+=r*(n-l));if(i>1)return u/(i-1)},m=function(e,t){var n=y(e,t);return n?Math.sqrt(n):n},v=function(e,t){var n,r,a,i=e.length,o=-1;if(null==t){for(;++o<i;)if(null!=(n=e[o])&&n>=n)for(r=a=n;++o<i;)null!=(n=e[o])&&(r>n&&(r=n),a<n&&(a=n))}else for(;++o<i;)if(null!=(n=t(e[o],o,e))&&n>=n)for(r=a=n;++o<i;)null!=(n=t(e[o],o,e))&&(r>n&&(r=n),a<n&&(a=n));return[r,a]},g=Array.prototype,b=g.slice,x=g.map,_=function(e){return function(){return e}},w=function(e){return e},O=function(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(a);++r<a;)i[r]=e+r*n;return i},E=Math.sqrt(50),C=Math.sqrt(10),k=Math.sqrt(2),T=function(e,t,n){var a,i,o,l,u=-1;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((a=t<e)&&(i=e,e=t,t=i),0===(l=r(e,t,n))||!isFinite(l))return[];if(l>0)for(e=Math.ceil(e/l),t=Math.floor(t/l),o=new Array(i=Math.ceil(t-e+1));++u<i;)o[u]=(e+u)*l;else for(e=Math.floor(e*l),t=Math.ceil(t*l),o=new Array(i=Math.ceil(e-t+1));++u<i;)o[u]=(e-u)/l;return a&&o.reverse(),o},S=function(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1},A=function(){function e(e){var i,o,l=e.length,u=new Array(l);for(i=0;i<l;++i)u[i]=t(e[i],i,e);var f=n(u),c=f[0],d=f[1],p=r(u,c,d);Array.isArray(p)||(p=a(c,d,p),p=O(Math.ceil(c/p)*p,Math.floor(d/p)*p,p));for(var h=p.length;p[0]<=c;)p.shift(),--h;for(;p[h-1]>d;)p.pop(),--h;var y,m=new Array(h+1);for(i=0;i<=h;++i)y=m[i]=[],y.x0=i>0?p[i-1]:c,y.x1=i<h?p[i]:d;for(i=0;i<l;++i)o=u[i],c<=o&&o<=d&&m[s(p,o,0,h)].push(e[i]);return m}var t=w,n=v,r=S;return e.value=function(n){return arguments.length?(t="function"==typeof n?n:_(n),e):t},e.domain=function(t){return arguments.length?(n="function"==typeof t?t:_([t[0],t[1]]),e):n},e.thresholds=function(t){return arguments.length?(r="function"==typeof t?t:_(Array.isArray(t)?b.call(t):t),e):r},e},M=function(e,t,n){if(null==n&&(n=h),r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),o=+n(e[i],i,e),l=+n(e[i+1],i+1,e);return o+(l-o)*(a-i)}},P=function(e,t,n){return e=x.call(e,h).sort(o),Math.ceil((n-t)/(2*(M(e,.75)-M(e,.25))*Math.pow(e.length,-1/3)))},N=function(e,t,n){return Math.ceil((n-t)/(3.5*m(e)*Math.pow(e.length,-1/3)))},j=function(e,t){var n,r,a=e.length,i=-1;if(null==t){for(;++i<a;)if(null!=(n=e[i])&&n>=n)for(r=n;++i<a;)null!=(n=e[i])&&n>r&&(r=n)}else for(;++i<a;)if(null!=(n=t(e[i],i,e))&&n>=n)for(r=n;++i<a;)null!=(n=t(e[i],i,e))&&n>r&&(r=n);return r},R=function(e,t){var n,r=e.length,a=r,i=-1,o=0;if(null==t)for(;++i<r;)isNaN(n=h(e[i]))?--a:o+=n;else for(;++i<r;)isNaN(n=h(t(e[i],i,e)))?--a:o+=n;if(a)return o/a},I=function(e,t){var n,r=e.length,a=-1,i=[];if(null==t)for(;++a<r;)isNaN(n=h(e[a]))||i.push(n);else for(;++a<r;)isNaN(n=h(t(e[a],a,e)))||i.push(n);return M(i.sort(o),.5)},D=function(e){for(var t,n,r,a=e.length,i=-1,o=0;++i<a;)o+=e[i].length;for(n=new Array(o);--a>=0;)for(r=e[a],t=r.length;--t>=0;)n[--o]=r[t];return n},L=function(e,t){var n,r,a=e.length,i=-1;if(null==t){for(;++i<a;)if(null!=(n=e[i])&&n>=n)for(r=n;++i<a;)null!=(n=e[i])&&r>n&&(r=n)}else for(;++i<a;)if(null!=(n=t(e[i],i,e))&&n>=n)for(r=n;++i<a;)null!=(n=t(e[i],i,e))&&r>n&&(r=n);return r},B=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},V=function(e,t){if(n=e.length){var n,r,a=0,i=0,l=e[i];for(null==t&&(t=o);++a<n;)(t(r=e[a],l)<0||0!==t(l,l))&&(l=r,i=a);return 0===t(l,l)?i:void 0}},F=function(e,t,n){for(var r,a,i=(null==n?e.length:n)-(t=null==t?0:+t);i;)a=Math.random()*i--|0,r=e[i+t],e[i+t]=e[a+t],e[a+t]=r;return e},z=function(e,t){var n,r=e.length,a=-1,i=0;if(null==t)for(;++a<r;)(n=+e[a])&&(i+=n);else for(;++a<r;)(n=+t(e[a],a,e))&&(i+=n);return i},W=function(e){if(!(a=e.length))return[];for(var t=-1,n=L(e,i),r=new Array(n);++t<n;)for(var a,o=-1,l=r[t]=new Array(a);++o<a;)l[o]=e[o][t];return r},K=function(){return W(arguments)};e.bisect=s,e.bisectRight=s,e.bisectLeft=f,e.ascending=o,e.bisector=l,e.cross=d,e.descending=p,e.deviation=m,e.extent=v,e.histogram=A,e.thresholdFreedmanDiaconis=P,e.thresholdScott=N,e.thresholdSturges=S,e.max=j,e.mean=R,e.median=I,e.merge=D,e.min=L,e.pairs=c,e.permute=B,e.quantile=M,e.range=O,e.scan=V,e.shuffle=F,e.sum=z,e.ticks=T,e.tickIncrement=r,e.tickStep=a,e.transpose=W,e.variance=y,e.zip=K,Object.defineProperty(e,"__esModule",{value:!0})})},function(e,t,n){!function(e,n){n(t)}(this,function(e){"use strict";function t(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function n(){}function r(e){var t;return e=(e+"").trim().toLowerCase(),(t=D.exec(e))?(t=parseInt(t[1],16),new u(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1)):(t=L.exec(e))?a(parseInt(t[1],16)):(t=B.exec(e))?new u(t[1],t[2],t[3],1):(t=V.exec(e))?new u(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=F.exec(e))?i(t[1],t[2],t[3],t[4]):(t=z.exec(e))?i(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=W.exec(e))?f(t[1],t[2]/100,t[3]/100,1):(t=K.exec(e))?f(t[1],t[2]/100,t[3]/100,t[4]):U.hasOwnProperty(e)?a(U[e]):"transparent"===e?new u(NaN,NaN,NaN,0):null}function a(e){return new u(e>>16&255,e>>8&255,255&e,1)}function i(e,t,n,r){return r<=0&&(e=t=n=NaN),new u(e,t,n,r)}function o(e){return e instanceof n||(e=r(e)),e?(e=e.rgb(),new u(e.r,e.g,e.b,e.opacity)):new u}function l(e,t,n,r){return 1===arguments.length?o(e):new u(e,t,n,null==r?1:r)}function u(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function s(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function f(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new p(e,t,n,r)}function c(e){if(e instanceof p)return new p(e.h,e.s,e.l,e.opacity);if(e instanceof n||(e=r(e)),!e)return new p;if(e instanceof p)return e;e=e.rgb();var t=e.r/255,a=e.g/255,i=e.b/255,o=Math.min(t,a,i),l=Math.max(t,a,i),u=NaN,s=l-o,f=(l+o)/2;return s?(u=t===l?(a-i)/s+6*(a<i):a===l?(i-t)/s+2:(t-a)/s+4,s/=f<.5?l+o:2-l-o,u*=60):s=f>0&&f<1?0:u,new p(u,s,f,e.opacity)}function d(e,t,n,r){return 1===arguments.length?c(e):new p(e,t,n,null==r?1:r)}function p(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function h(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function y(e){if(e instanceof g)return new g(e.l,e.a,e.b,e.opacity);if(e instanceof k){if(isNaN(e.h))return new g(e.l,0,0,e.opacity);var t=e.h*G;return new g(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof u||(e=o(e));var n,r,a=w(e.r),i=w(e.g),l=w(e.b),s=b((.2225045*a+.7168786*i+.0606169*l)/X);return a===i&&i===l?n=r=s:(n=b((.4360747*a+.3850649*i+.1430804*l)/Y),r=b((.0139322*a+.0971045*i+.7141733*l)/J)),new g(116*s-16,500*(n-s),200*(s-r),e.opacity)}function m(e,t){return new g(e,0,0,null==t?1:t)}function v(e,t,n,r){return 1===arguments.length?y(e):new g(e,t,n,null==r?1:r)}function g(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function b(e){return e>ee?Math.pow(e,1/3):e/Q+$}function x(e){return e>Z?e*e*e:Q*(e-$)}function _(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function w(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function O(e){if(e instanceof k)return new k(e.h,e.c,e.l,e.opacity);if(e instanceof g||(e=y(e)),0===e.a&&0===e.b)return new k(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*H;return new k(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function E(e,t,n,r){return 1===arguments.length?O(e):new k(n,t,e,null==r?1:r)}function C(e,t,n,r){return 1===arguments.length?O(e):new k(e,t,n,null==r?1:r)}function k(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function T(e){if(e instanceof A)return new A(e.h,e.s,e.l,e.opacity);e instanceof u||(e=o(e));var t=e.r/255,n=e.g/255,r=e.b/255,a=(ue*r+oe*t-le*n)/(ue+oe-le),i=r-a,l=(ie*(n-a)-re*i)/ae,s=Math.sqrt(l*l+i*i)/(ie*a*(1-a)),f=s?Math.atan2(l,i)*H-120:NaN;return new A(f<0?f+360:f,s,a,e.opacity)}function S(e,t,n,r){return 1===arguments.length?T(e):new A(e,t,n,null==r?1:r)}function A(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}var M=function(e,t,n){e.prototype=t.prototype=n,n.constructor=e},P=.7,N=1/P,j="\\s*([+-]?\\d+)\\s*",R="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",I="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",D=/^#([0-9a-f]{3})$/,L=/^#([0-9a-f]{6})$/,B=new RegExp("^rgb\\("+[j,j,j]+"\\)$"),V=new RegExp("^rgb\\("+[I,I,I]+"\\)$"),F=new RegExp("^rgba\\("+[j,j,j,R]+"\\)$"),z=new RegExp("^rgba\\("+[I,I,I,R]+"\\)$"),W=new RegExp("^hsl\\("+[R,I,I]+"\\)$"),K=new RegExp("^hsla\\("+[R,I,I,R]+"\\)$"),U={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};M(n,r,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),M(u,l,t(n,{brighter:function(e){return e=null==e?N:Math.pow(N,e),new u(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?P:Math.pow(P,e),new u(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+s(this.r)+s(this.g)+s(this.b)},toString:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(1===e?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),M(p,d,t(n,{brighter:function(e){return e=null==e?N:Math.pow(N,e),new p(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?P:Math.pow(P,e),new p(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new u(h(e>=240?e-240:e+120,a,r),h(e,a,r),h(e<120?e+240:e-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var G=Math.PI/180,H=180/Math.PI,q=18,Y=.96422,X=1,J=.82521,$=4/29,Z=6/29,Q=3*Z*Z,ee=Z*Z*Z;M(g,v,t(n,{brighter:function(e){return new g(this.l+q*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new g(this.l-q*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=Y*x(t),e=X*x(e),n=J*x(n),new u(_(3.1338561*t-1.6168667*e-.4906146*n),_(-.9787684*t+1.9161415*e+.033454*n),_(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),M(k,C,t(n,{brighter:function(e){return new k(this.h,this.c,this.l+q*(null==e?1:e),this.opacity)},darker:function(e){return new k(this.h,this.c,this.l-q*(null==e?1:e),this.opacity)},rgb:function(){return y(this).rgb()}}));var te=-.14861,ne=1.78277,re=-.29227,ae=-.90649,ie=1.97294,oe=ie*ae,le=ie*ne,ue=ne*re-ae*te;M(A,S,t(n,{brighter:function(e){return e=null==e?N:Math.pow(N,e),new A(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?P:Math.pow(P,e),new A(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*G,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),a=Math.sin(e);return new u(255*(t+n*(te*r+ne*a)),255*(t+n*(re*r+ae*a)),255*(t+n*(ie*r)),this.opacity)}})),e.color=r,e.rgb=l,e.hsl=d,e.lab=v,e.hcl=C,e.lch=E,e.gray=m,e.cubehelix=S,Object.defineProperty(e,"__esModule",{value:!0})})},function(e,t,n){!function(e,r){r(t,n(347))}(this,function(e,t){"use strict";function n(e){return e>1?0:e<-1?ce:Math.acos(e)}function r(e){return e>=1?de:e<=-1?-de:Math.asin(e)}function a(e){return e.innerRadius}function i(e){return e.outerRadius}function o(e){return e.startAngle}function l(e){return e.endAngle}function u(e){return e&&e.padAngle}function s(e,t,n,r,a,i,o,l){var u=n-e,s=r-t,f=o-a,c=l-i,d=(f*(t-i)-c*(e-a))/(c*u-f*s);return[e+d*u,t+d*s]}function f(e,t,n,r,a,i,o){var l=e-n,u=t-r,s=(o?i:-i)/se(l*l+u*u),f=s*u,c=-s*l,d=e+f,p=t+c,h=n+f,y=r+c,m=(d+h)/2,v=(p+y)/2,g=h-d,b=y-p,x=g*g+b*b,_=a-i,w=d*y-h*p,O=(b<0?-1:1)*se(oe(0,_*_*x-w*w)),E=(w*b-g*O)/x,C=(-w*g-b*O)/x,k=(w*b+g*O)/x,T=(-w*g+b*O)/x,S=E-m,A=C-v,M=k-m,P=T-v;return S*S+A*A>M*M+P*P&&(E=k,C=T),{cx:E,cy:C,x01:-f,y01:-c,x11:E*(a/_-1),y11:C*(a/_-1)}}function c(e){this._context=e}function d(e){return e[0]}function p(e){return e[1]}function h(e){this._curve=e}function y(e){function t(t){return new h(e(t))}return t._curve=e,t}function m(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(y(e)):t()._curve},e}function v(e){return e.source}function g(e){return e.target}function b(e){function n(){var n,u=Ce.call(arguments),s=r.apply(this,u),f=a.apply(this,u);if(l||(l=n=t.path()),e(l,+i.apply(this,(u[0]=s,u)),+o.apply(this,u),+i.apply(this,(u[0]=f,u)),+o.apply(this,u)),n)return l=null,n+""||null}var r=v,a=g,i=d,o=p,l=null;return n.source=function(e){return arguments.length?(r=e,n):r},n.target=function(e){return arguments.length?(a=e,n):a},n.x=function(e){return arguments.length?(i="function"==typeof e?e:ne(+e),n):i},n.y=function(e){return arguments.length?(o="function"==typeof e?e:ne(+e),n):o},n.context=function(e){return arguments.length?(l=null==e?null:e,n):l},n}function x(e,t,n,r,a){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,a,r,a)}function _(e,t,n,r,a){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+a)/2,r,n,r,a)}function w(e,t,n,r,a){var i=Ee(t,n),o=Ee(t,n=(n+a)/2),l=Ee(r,n),u=Ee(r,a);e.moveTo(i[0],i[1]),e.bezierCurveTo(o[0],o[1],l[0],l[1],u[0],u[1])}function O(){return b(x)}function E(){return b(_)}function C(){var e=b(w);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}function k(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function T(e){this._context=e}function S(e){this._context=e}function A(e){this._context=e}function M(e,t){this._basis=new T(e),this._beta=t}function P(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function N(e,t){this._context=e,this._k=(1-t)/6}function j(e,t){this._context=e,this._k=(1-t)/6}function R(e,t){this._context=e,this._k=(1-t)/6}function I(e,t,n){var r=e._x1,a=e._y1,i=e._x2,o=e._y2;if(e._l01_a>fe){var l=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*l-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,a=(a*l-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>fe){var s=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,f=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*s+e._x1*e._l23_2a-t*e._l12_2a)/f,o=(o*s+e._y1*e._l23_2a-n*e._l12_2a)/f}e._context.bezierCurveTo(r,a,i,o,e._x2,e._y2)}function D(e,t){this._context=e,this._alpha=t}function L(e,t){this._context=e,this._alpha=t}function B(e,t){this._context=e,this._alpha=t}function V(e){this._context=e}function F(e){return e<0?-1:1}function z(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),o=(n-e._y1)/(a||r<0&&-0),l=(i*a+o*r)/(r+a);return(F(i)+F(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(l))||0}function W(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function K(e,t,n){var r=e._x0,a=e._y0,i=e._x1,o=e._y1,l=(i-r)/3;e._context.bezierCurveTo(r+l,a+l*t,i-l,o-l*n,i,o)}function U(e){this._context=e}function G(e){this._context=new H(e)}function H(e){this._context=e}function q(e){return new U(e)}function Y(e){return new G(e)}function X(e){this._context=e}function J(e){var t,n,r=e.length-1,a=new Array(r),i=new Array(r),o=new Array(r);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,o[t]-=n*o[t-1];for(a[r-1]=o[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function $(e,t){this._context=e,this._t=t}function Z(e){return new $(e,0)}function Q(e){return new $(e,1)}function ee(e,t){return e[t]}function te(e){for(var t,n=0,r=-1,a=e.length;++r<a;)(t=+e[r][1])&&(n+=t);return n}var ne=function(e){return function(){return e}},re=Math.abs,ae=Math.atan2,ie=Math.cos,oe=Math.max,le=Math.min,ue=Math.sin,se=Math.sqrt,fe=1e-12,ce=Math.PI,de=ce/2,pe=2*ce,he=function(){function e(){var e,a,i=+c.apply(this,arguments),o=+d.apply(this,arguments),l=y.apply(this,arguments)-de,u=m.apply(this,arguments)-de,b=re(u-l),x=u>l;if(g||(g=e=t.path()),o<i&&(a=o,o=i,i=a),o>fe)if(b>pe-fe)g.moveTo(o*ie(l),o*ue(l)),g.arc(0,0,o,l,u,!x),i>fe&&(g.moveTo(i*ie(u),i*ue(u)),g.arc(0,0,i,u,l,x));else{var _,w,O=l,E=u,C=l,k=u,T=b,S=b,A=v.apply(this,arguments)/2,M=A>fe&&(h?+h.apply(this,arguments):se(i*i+o*o)),P=le(re(o-i)/2,+p.apply(this,arguments)),N=P,j=P;if(M>fe){var R=r(M/i*ue(A)),I=r(M/o*ue(A));(T-=2*R)>fe?(R*=x?1:-1,C+=R,k-=R):(T=0,C=k=(l+u)/2),(S-=2*I)>fe?(I*=x?1:-1,O+=I,E-=I):(S=0,O=E=(l+u)/2)}var D=o*ie(O),L=o*ue(O),B=i*ie(k),V=i*ue(k);if(P>fe){var F=o*ie(E),z=o*ue(E),W=i*ie(C),K=i*ue(C);if(b<ce){var U=T>fe?s(D,L,W,K,F,z,B,V):[B,V],G=D-U[0],H=L-U[1],q=F-U[0],Y=z-U[1],X=1/ue(n((G*q+H*Y)/(se(G*G+H*H)*se(q*q+Y*Y)))/2),J=se(U[0]*U[0]+U[1]*U[1]);N=le(P,(i-J)/(X-1)),j=le(P,(o-J)/(X+1))}}S>fe?j>fe?(_=f(W,K,D,L,o,j,x),w=f(F,z,B,V,o,j,x),g.moveTo(_.cx+_.x01,_.cy+_.y01),j<P?g.arc(_.cx,_.cy,j,ae(_.y01,_.x01),ae(w.y01,w.x01),!x):(g.arc(_.cx,_.cy,j,ae(_.y01,_.x01),ae(_.y11,_.x11),!x),g.arc(0,0,o,ae(_.cy+_.y11,_.cx+_.x11),ae(w.cy+w.y11,w.cx+w.x11),!x),g.arc(w.cx,w.cy,j,ae(w.y11,w.x11),ae(w.y01,w.x01),!x))):(g.moveTo(D,L),g.arc(0,0,o,O,E,!x)):g.moveTo(D,L),i>fe&&T>fe?N>fe?(_=f(B,V,F,z,i,-N,x),w=f(D,L,W,K,i,-N,x),g.lineTo(_.cx+_.x01,_.cy+_.y01),N<P?g.arc(_.cx,_.cy,N,ae(_.y01,_.x01),ae(w.y01,w.x01),!x):(g.arc(_.cx,_.cy,N,ae(_.y01,_.x01),ae(_.y11,_.x11),!x),g.arc(0,0,i,ae(_.cy+_.y11,_.cx+_.x11),ae(w.cy+w.y11,w.cx+w.x11),x),g.arc(w.cx,w.cy,N,ae(w.y11,w.x11),ae(w.y01,w.x01),!x))):g.arc(0,0,i,k,C,x):g.lineTo(B,V)}else g.moveTo(0,0);if(g.closePath(),e)return g=null,e+""||null}var c=a,d=i,p=ne(0),h=null,y=o,m=l,v=u,g=null;return e.centroid=function(){var e=(+c.apply(this,arguments)+ +d.apply(this,arguments))/2,t=(+y.apply(this,arguments)+ +m.apply(this,arguments))/2-ce/2;return[ie(t)*e,ue(t)*e]},e.innerRadius=function(t){return arguments.length?(c="function"==typeof t?t:ne(+t),e):c},e.outerRadius=function(t){return arguments.length?(d="function"==typeof t?t:ne(+t),e):d},e.cornerRadius=function(t){return arguments.length?(p="function"==typeof t?t:ne(+t),e):p},e.padRadius=function(t){return arguments.length?(h=null==t?null:"function"==typeof t?t:ne(+t),e):h},e.startAngle=function(t){return arguments.length?(y="function"==typeof t?t:ne(+t),e):y},e.endAngle=function(t){return arguments.length?(m="function"==typeof t?t:ne(+t),e):m},e.padAngle=function(t){return arguments.length?(v="function"==typeof t?t:ne(+t),e):v},e.context=function(t){return arguments.length?(g=null==t?null:t,e):g},e};c.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var ye=function(e){return new c(e)},me=function(){function e(e){var u,s,f,c=e.length,d=!1;for(null==i&&(l=o(f=t.path())),u=0;u<=c;++u)!(u<c&&a(s=e[u],u,e))===d&&((d=!d)?l.lineStart():l.lineEnd()),d&&l.point(+n(s,u,e),+r(s,u,e));if(f)return l=null,f+""||null}var n=d,r=p,a=ne(!0),i=null,o=ye,l=null;return e.x=function(t){return arguments.length?(n="function"==typeof t?t:ne(+t),e):n},e.y=function(t){return arguments.length?(r="function"==typeof t?t:ne(+t),e):r},e.defined=function(t){return arguments.length?(a="function"==typeof t?t:ne(!!t),e):a},e.curve=function(t){return arguments.length?(o=t,null!=i&&(l=o(i)),e):o},e.context=function(t){return arguments.length?(null==t?i=l=null:l=o(i=t),e):i},e},ve=function(){function e(e){var n,c,d,p,h,y=e.length,m=!1,v=new Array(y),g=new Array(y);for(null==u&&(f=s(h=t.path())),n=0;n<=y;++n){if(!(n<y&&l(p=e[n],n,e))===m)if(m=!m)c=n,f.areaStart(),f.lineStart();else{for(f.lineEnd(),f.lineStart(),d=n-1;d>=c;--d)f.point(v[d],g[d]);f.lineEnd(),f.areaEnd()}m&&(v[n]=+r(p,n,e),g[n]=+i(p,n,e),f.point(a?+a(p,n,e):v[n],o?+o(p,n,e):g[n]))}if(h)return f=null,h+""||null}function n(){return me().defined(l).curve(s).context(u)}var r=d,a=null,i=ne(0),o=p,l=ne(!0),u=null,s=ye,f=null;return e.x=function(t){return arguments.length?(r="function"==typeof t?t:ne(+t),a=null,e):r},e.x0=function(t){return arguments.length?(r="function"==typeof t?t:ne(+t),e):r},e.x1=function(t){return arguments.length?(a=null==t?null:"function"==typeof t?t:ne(+t),e):a},e.y=function(t){return arguments.length?(i="function"==typeof t?t:ne(+t),o=null,e):i},e.y0=function(t){return arguments.length?(i="function"==typeof t?t:ne(+t),e):i},e.y1=function(t){return arguments.length?(o=null==t?null:"function"==typeof t?t:ne(+t),e):o},e.lineX0=e.lineY0=function(){return n().x(r).y(i)},e.lineY1=function(){return n().x(r).y(o)},e.lineX1=function(){return n().x(a).y(i)},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:ne(!!t),e):l},e.curve=function(t){return arguments.length?(s=t,null!=u&&(f=s(u)),e):s},e.context=function(t){return arguments.length?(null==t?u=f=null:f=s(u=t),e):u},e},ge=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},be=function(e){return e},xe=function(){function e(e){var l,u,s,f,c,d=e.length,p=0,h=new Array(d),y=new Array(d),m=+a.apply(this,arguments),v=Math.min(pe,Math.max(-pe,i.apply(this,arguments)-m)),g=Math.min(Math.abs(v)/d,o.apply(this,arguments)),b=g*(v<0?-1:1);for(l=0;l<d;++l)(c=y[h[l]=l]=+t(e[l],l,e))>0&&(p+=c);for(null!=n?h.sort(function(e,t){return n(y[e],y[t])}):null!=r&&h.sort(function(t,n){return r(e[t],e[n])}),l=0,s=p?(v-d*b)/p:0;l<d;++l,m=f)u=h[l],c=y[u],f=m+(c>0?c*s:0)+b,y[u]={data:e[u],index:l,value:c,startAngle:m,endAngle:f,padAngle:g};return y}var t=be,n=ge,r=null,a=ne(0),i=ne(pe),o=ne(0);return e.value=function(n){return arguments.length?(t="function"==typeof n?n:ne(+n),e):t},e.sortValues=function(t){return arguments.length?(n=t,r=null,e):n},e.sort=function(t){return arguments.length?(r=t,n=null,e):r},e.startAngle=function(t){return arguments.length?(a="function"==typeof t?t:ne(+t),e):a},e.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:ne(+t),e):i},e.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:ne(+t),e):o},e},_e=y(ye);h.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};var we=function(){return m(me().curve(_e))},Oe=function(){var e=ve().curve(_e),t=e.curve,n=e.lineX0,r=e.lineX1,a=e.lineY0,i=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return m(n())},delete e.lineX0,e.lineEndAngle=function(){return m(r())},delete e.lineX1,e.lineInnerRadius=function(){return m(a())},delete e.lineY0,e.lineOuterRadius=function(){return m(i())},delete e.lineY1,e.curve=function(e){return arguments.length?t(y(e)):t()._curve},e},Ee=function(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]},Ce=Array.prototype.slice,ke={draw:function(e,t){var n=Math.sqrt(t/ce);e.moveTo(n,0),e.arc(0,0,n,0,pe)}},Te={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Se=Math.sqrt(1/3),Ae=2*Se,Me={draw:function(e,t){var n=Math.sqrt(t/Ae),r=n*Se;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Pe=.8908130915292852,Ne=Math.sin(ce/10)/Math.sin(7*ce/10),je=Math.sin(pe/10)*Ne,Re=-Math.cos(pe/10)*Ne,Ie={draw:function(e,t){var n=Math.sqrt(t*Pe),r=je*n,a=Re*n;e.moveTo(0,-n),e.lineTo(r,a);for(var i=1;i<5;++i){var o=pe*i/5,l=Math.cos(o),u=Math.sin(o);e.lineTo(u*n,-l*n),e.lineTo(l*r-u*a,u*r+l*a)}e.closePath()}},De={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}},Le=Math.sqrt(3),Be={draw:function(e,t){var n=-Math.sqrt(t/(3*Le));e.moveTo(0,2*n),e.lineTo(-Le*n,-n),e.lineTo(Le*n,-n),e.closePath()}},Ve=-.5,Fe=Math.sqrt(3)/2,ze=1/Math.sqrt(12),We=3*(ze/2+1),Ke={draw:function(e,t){var n=Math.sqrt(t/We),r=n/2,a=n*ze,i=r,o=n*ze+n,l=-i,u=o;e.moveTo(r,a),e.lineTo(i,o),e.lineTo(l,u),e.lineTo(Ve*r-Fe*a,Fe*r+Ve*a),e.lineTo(Ve*i-Fe*o,Fe*i+Ve*o),e.lineTo(Ve*l-Fe*u,Fe*l+Ve*u),e.lineTo(Ve*r+Fe*a,Ve*a-Fe*r),e.lineTo(Ve*i+Fe*o,Ve*o-Fe*i),e.lineTo(Ve*l+Fe*u,Ve*u-Fe*l),e.closePath()}},Ue=[ke,Te,Me,De,Ie,Be,Ke],Ge=function(){ function e(){var e;if(a||(a=e=t.path()),n.apply(this,arguments).draw(a,+r.apply(this,arguments)),e)return a=null,e+""||null}var n=ne(ke),r=ne(64),a=null;return e.type=function(t){return arguments.length?(n="function"==typeof t?t:ne(t),e):n},e.size=function(t){return arguments.length?(r="function"==typeof t?t:ne(+t),e):r},e.context=function(t){return arguments.length?(a=null==t?null:t,e):a},e},He=function(){};T.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:k(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:k(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var qe=function(e){return new T(e)};S.prototype={areaStart:He,areaEnd:He,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:k(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var Ye=function(e){return new S(e)};A.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:k(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var Xe=function(e){return new A(e)};M.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,a=e[0],i=t[0],o=e[n]-a,l=t[n]-i,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*e[u]+(1-this._beta)*(a+r*o),this._beta*t[u]+(1-this._beta)*(i+r*l));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var Je=function e(t){function n(e){return 1===t?new T(e):new M(e,t)}return n.beta=function(t){return e(+t)},n}(.85);N.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:P(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:P(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var $e=function e(t){function n(e){return new N(e,t)}return n.tension=function(t){return e(+t)},n}(0);j.prototype={areaStart:He,areaEnd:He,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:P(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ze=function e(t){function n(e){return new j(e,t)}return n.tension=function(t){return e(+t)},n}(0);R.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:P(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Qe=function e(t){function n(e){return new R(e,t)}return n.tension=function(t){return e(+t)},n}(0);D.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:I(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var et=function e(t){function n(e){return t?new D(e,t):new N(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);L.prototype={areaStart:He,areaEnd:He,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:I(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var tt=function e(t){function n(e){return t?new L(e,t):new j(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);B.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:I(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var nt=function e(t){function n(e){return t?new B(e,t):new R(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);V.prototype={areaStart:He,areaEnd:He,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};var rt=function(e){return new V(e)};U.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:K(this,this._t0,W(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,K(this,W(this,n=z(this,e,t)),n);break;default:K(this,this._t0,n=z(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(G.prototype=Object.create(U.prototype)).point=function(e,t){U.prototype.point.call(this,t,e)},H.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}},X.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=J(e),a=J(t),i=0,o=1;o<n;++i,++o)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[o],t[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var at=function(e){return new X(e)};$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var it=function(e){return new $(e,.5)},ot=function(e,t){if((a=e.length)>1)for(var n,r,a,i=1,o=e[t[0]],l=o.length;i<a;++i)for(r=o,o=e[t[i]],n=0;n<l;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]},lt=function(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n},ut=function(){function e(e){var i,o,l=t.apply(this,arguments),u=e.length,s=l.length,f=new Array(s);for(i=0;i<s;++i){for(var c,d=l[i],p=f[i]=new Array(u),h=0;h<u;++h)p[h]=c=[0,+a(e[h],d,h,e)],c.data=e[h];p.key=d}for(i=0,o=n(f);i<s;++i)f[o[i]].index=i;return r(f,o),f}var t=ne([]),n=lt,r=ot,a=ee;return e.keys=function(n){return arguments.length?(t="function"==typeof n?n:ne(Ce.call(n)),e):t},e.value=function(t){return arguments.length?(a="function"==typeof t?t:ne(+t),e):a},e.order=function(t){return arguments.length?(n=null==t?lt:"function"==typeof t?t:ne(Ce.call(t)),e):n},e.offset=function(t){return arguments.length?(r=null==t?ot:t,e):r},e},st=function(e,t){if((r=e.length)>0){for(var n,r,a,i=0,o=e[0].length;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}ot(e,t)}},ft=function(e,t){if((l=e.length)>1)for(var n,r,a,i,o,l,u=0,s=e[t[0]].length;u<s;++u)for(i=o=0,n=0;n<l;++n)(a=(r=e[t[n]][u])[1]-r[0])>=0?(r[0]=i,r[1]=i+=a):a<0?(r[1]=o,r[0]=o+=a):r[0]=i},ct=function(e,t){if((n=e.length)>0){for(var n,r=0,a=e[t[0]],i=a.length;r<i;++r){for(var o=0,l=0;o<n;++o)l+=e[o][r][1]||0;a[r][1]+=a[r][0]=-l/2}ot(e,t)}},dt=function(e,t){if((a=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,a,i=0,o=1;o<r;++o){for(var l=0,u=0,s=0;l<a;++l){for(var f=e[t[l]],c=f[o][1]||0,d=f[o-1][1]||0,p=(c-d)/2,h=0;h<l;++h){var y=e[t[h]],m=y[o][1]||0,v=y[o-1][1]||0;p+=m-v}u+=c,s+=p*c}n[o-1][1]+=n[o-1][0]=i,u&&(i-=s/u)}n[o-1][1]+=n[o-1][0]=i,ot(e,t)}},pt=function(e){var t=e.map(te);return lt(e).sort(function(e,n){return t[e]-t[n]})},ht=function(e){return pt(e).reverse()},yt=function(e){var t,n,r=e.length,a=e.map(te),i=lt(e).sort(function(e,t){return a[t]-a[e]}),o=0,l=0,u=[],s=[];for(t=0;t<r;++t)n=i[t],o<l?(o+=a[n],u.push(n)):(l+=a[n],s.push(n));return s.reverse().concat(u)},mt=function(e){return lt(e).reverse()};e.arc=he,e.area=ve,e.line=me,e.pie=xe,e.areaRadial=Oe,e.radialArea=Oe,e.lineRadial=we,e.radialLine=we,e.pointRadial=Ee,e.linkHorizontal=O,e.linkVertical=E,e.linkRadial=C,e.symbol=Ge,e.symbols=Ue,e.symbolCircle=ke,e.symbolCross=Te,e.symbolDiamond=Me,e.symbolSquare=De,e.symbolStar=Ie,e.symbolTriangle=Be,e.symbolWye=Ke,e.curveBasisClosed=Ye,e.curveBasisOpen=Xe,e.curveBasis=qe,e.curveBundle=Je,e.curveCardinalClosed=Ze,e.curveCardinalOpen=Qe,e.curveCardinal=$e,e.curveCatmullRomClosed=tt,e.curveCatmullRomOpen=nt,e.curveCatmullRom=et,e.curveLinearClosed=rt,e.curveLinear=ye,e.curveMonotoneX=q,e.curveMonotoneY=Y,e.curveNatural=at,e.curveStep=it,e.curveStepAfter=Q,e.curveStepBefore=Z,e.stack=ut,e.stackOffsetExpand=st,e.stackOffsetDiverging=ft,e.stackOffsetNone=ot,e.stackOffsetSilhouette=ct,e.stackOffsetWiggle=dt,e.stackOrderAscending=pt,e.stackOrderDescending=ht,e.stackOrderInsideOut=yt,e.stackOrderNone=lt,e.stackOrderReverse=mt,Object.defineProperty(e,"__esModule",{value:!0})})},,function(e,t){function n(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}e.exports=n},function(e,t,n){function r(e,t,n,r,s,f){var c=n&l,d=e.length,p=t.length;if(d!=p&&!(c&&p>d))return!1;var h=f.get(e);if(h&&f.get(t))return h==t;var y=-1,m=!0,v=n&u?new a:void 0;for(f.set(e,t),f.set(t,e);++y<d;){var g=e[y],b=t[y];if(r)var x=c?r(b,g,y,t,e,f):r(g,b,y,e,t,f);if(void 0!==x){if(x)continue;m=!1;break}if(v){if(!i(t,function(e,t){if(!o(v,t)&&(g===e||s(g,e,n,r,f)))return v.push(t)})){m=!1;break}}else if(g!==b&&!s(g,b,n,r,f)){m=!1;break}}return f.delete(e),f.delete(t),m}var a=n(206),i=n(351),o=n(208),l=1,u=2;e.exports=r},function(e,t,n){function r(e){return e===e&&!a(e)}var a=n(27);e.exports=r},function(e,t){function n(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}e.exports=n},function(e,t,n){function r(e){return"string"==typeof e||!i(e)&&o(e)&&a(e)==l}var a=n(90),i=n(19),o=n(58),l="[object String]";e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(3),i=r(a),o=n(5),l=r(o),u=n(4),s=r(u),f=function(e){return function(e){function t(){return(0,i.default)(this,t),(0,l.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t.prototype.componentDidUpdate=function(){if(this.path){var e=this.path.style;e.transitionDuration=".3s, .3s, .3s, .06s";var t=Date.now();this.prevTimeStamp&&t-this.prevTimeStamp<100&&(e.transitionDuration="0s, 0s"),this.prevTimeStamp=Date.now()}},t.prototype.render=function(){return e.prototype.render.call(this)},t}(e)};t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.propTypes=t.defaultProps=void 0;var a=n(2),i=r(a);t.defaultProps={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},t.propTypes={className:i.default.string,percent:i.default.oneOfType([i.default.number,i.default.string]),prefixCls:i.default.string,strokeColor:i.default.string,strokeLinecap:i.default.oneOf(["butt","round","square"]),strokeWidth:i.default.oneOfType([i.default.number,i.default.string]),style:i.default.object,trailColor:i.default.string,trailWidth:i.default.oneOfType([i.default.number,i.default.string])}},,function(e,t,n){var r=n(99),a=n(29),i=r(a,"Set");e.exports=i},,,function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=a(i),l=n(3),u=a(l),s=n(8),f=a(s),c=n(5),d=a(c),p=n(4),h=a(p),y=n(1),m=r(y),v=n(46),g=a(v),b=function(e){function t(){return(0,u.default)(this,t),(0,d.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,h.default)(t,e),(0,f.default)(t,[{key:"render",value:function(){return m.createElement(g.default,(0,o.default)({size:"small"},this.props))}}]),t}(m.Component);t.default=b,b.Option=g.default.Option,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=a(i),l=n(3),u=a(l),s=n(8),f=a(s),c=n(5),d=a(c),p=n(4),h=a(p),y=n(1),m=r(y),v=n(271),g=a(v),b=n(425),x=a(b),_=n(7),w=a(_),O=n(24),E=a(O),C=n(46),k=a(C),T=n(227),S=a(T),A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]]);return n},M=function(e){function t(){(0,u.default)(this,t);var e=(0,d.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.renderPagination=function(t){var n=e.props,r=n.className,a=n.size,i=n.locale,l=A(n,["className","size","locale"]),u=(0,o.default)({},t,i),s="small"===a;return m.createElement(g.default,(0,o.default)({},l,{className:(0,w.default)(r,{mini:s}),selectComponentClass:s?S.default:k.default,locale:u}))},e}return(0,h.default)(t,e),(0,f.default)(t,[{key:"render",value:function(){return m.createElement(E.default,{componentName:"Pagination",defaultLocale:x.default},this.renderPagination)}}]),t}(m.Component);t.default=M,M.defaultProps={prefixCls:"ant-pagination",selectPrefixCls:"ant-select"},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(228),i=r(a);t.default=i.default,e.exports=t.default},function(e,t,n){"use strict";n(11),n(243),n(53),n(39)},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=a(i),l=n(5),u=a(l),s=n(4),f=a(s),c=n(1),d=r(c),p=function(e){function t(){return(0,o.default)(this,t),(0,u.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,f.default)(t,e),t}(d.Component);t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=a(i),l=n(5),u=a(l),s=n(4),f=a(s),c=n(1),d=r(c),p=function(e){function t(){return(0,o.default)(this,t),(0,u.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,f.default)(t,e),t}(d.Component);t.default=p,p.__ANT_TABLE_COLUMN_GROUP=!0,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),i=r(a);t.default=function(e){return i.createElement("div",{className:e.className,onClick:e.onClick},e.children)},e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=a(i),l=n(3),u=a(l),s=n(8),f=a(s),c=n(5),d=a(c),p=n(4),h=a(p),y=n(1),m=r(y),v=n(67),g=a(v),b=n(71),x=a(b),_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]]);return n},w=function(e){function t(e){(0,u.default)(this,t);var n=(0,d.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={checked:n.getCheckState(e)},n}return(0,h.default)(t,e),(0,f.default)(t,[{key:"componentDidMount",value:function(){this.subscribe()}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe()}},{key:"subscribe",value:function(){var e=this,t=this.props.store;this.unsubscribe=t.subscribe(function(){var t=e.getCheckState(e.props);e.setState({checked:t})})}},{key:"getCheckState",value:function(e){var t=e.store,n=e.defaultSelection,r=e.rowIndex,a=!1;return a=t.getState().selectionDirty?t.getState().selectedRowKeys.indexOf(r)>=0:t.getState().selectedRowKeys.indexOf(r)>=0||n.indexOf(r)>=0}},{key:"render",value:function(){var e=this.props,t=e.type,n=e.rowIndex,r=_(e,["type","rowIndex"]),a=this.state.checked;return"radio"===t?m.createElement(x.default,(0,o.default)({checked:a,value:n},r)):m.createElement(g.default,(0,o.default)({checked:a},r))}}]),t}(m.Component);t.default=w,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),o=a(i),l=n(3),u=a(l),s=n(8),f=a(s),c=n(5),d=a(c),p=n(4),h=a(p),y=n(1),m=r(y),v=n(67),g=a(v),b=n(117),x=a(b),_=n(226),w=a(_),O=n(14),E=a(O),C=n(7),k=a(C),T=function(e){function t(e){(0,u.default)(this,t);var n=(0,d.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleSelectAllChagne=function(e){var t=e.target.checked;n.props.onSelect(t?"all":"removeAll",0,null)},n.defaultSelections=e.hideDefaultSelections?[]:[{key:"all",text:e.locale.selectAll,onSelect:function(){}},{key:"invert",text:e.locale.selectInvert,onSelect:function(){}}],n.state={checked:n.getCheckState(e),indeterminate:n.getIndeterminateState(e)},n}return(0,h.default)(t,e),(0,f.default)(t,[{key:"componentDidMount",value:function(){this.subscribe()}},{key:"componentWillReceiveProps",value:function(e){this.setCheckState(e)}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe()}},{key:"subscribe",value:function(){var e=this,t=this.props.store;this.unsubscribe=t.subscribe(function(){e.setCheckState(e.props)})}},{key:"checkSelection",value:function(e,t,n){var r=this.props,a=r.store,i=r.getCheckboxPropsByItem,o=r.getRecordKey;return("every"===t||"some"===t)&&(n?e[t](function(e,t){return i(e,t).defaultChecked}):e[t](function(e,t){return a.getState().selectedRowKeys.indexOf(o(e,t))>=0}))}},{key:"setCheckState",value:function(e){var t=this.getCheckState(e),n=this.getIndeterminateState(e);this.setState(function(e){var r={};return n!==e.indeterminate&&(r.indeterminate=n),t!==e.checked&&(r.checked=t),r})}},{key:"getCheckState",value:function(e){var t=e.store,n=e.data,r=void 0;return r=!!n.length&&(t.getState().selectionDirty?this.checkSelection(n,"every",!1):this.checkSelection(n,"every",!1)||this.checkSelection(n,"every",!0))}},{key:"getIndeterminateState",value:function(e){var t=e.store,n=e.data,r=void 0;return r=!!n.length&&(t.getState().selectionDirty?this.checkSelection(n,"some",!1)&&!this.checkSelection(n,"every",!1):this.checkSelection(n,"some",!1)&&!this.checkSelection(n,"every",!1)||this.checkSelection(n,"some",!0)&&!this.checkSelection(n,"every",!0))}},{key:"renderMenus",value:function(e){var t=this;return e.map(function(e,n){return m.createElement(w.default.Item,{key:e.key||n},m.createElement("div",{onClick:function(){t.props.onSelect(e.key,n,e.onSelect)}},e.text))})}},{key:"render",value:function(){var e=this.props,t=e.disabled,n=e.prefixCls,r=e.selections,a=e.getPopupContainer,i=this.state,l=i.checked,u=i.indeterminate,s=n+"-selection",f=null;if(r){var c=Array.isArray(r)?this.defaultSelections.concat(r):this.defaultSelections,d=m.createElement(w.default,{className:s+"-menu",selectedKeys:[]},this.renderMenus(c));f=c.length>0?m.createElement(x.default,{overlay:d,getPopupContainer:a},m.createElement("div",{className:s+"-down"},m.createElement(E.default,{type:"down"}))):null}return m.createElement("div",{className:s},m.createElement(g.default,{className:(0,k.default)((0,o.default)({},s+"-select-all-custom",f)),checked:l,indeterminate:u,disabled:t,onChange:this.handleSelectAllChagne}),f)}}]),t}(m.Component);t.default=T,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}function i(){}function o(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation&&e.nativeEvent.stopImmediatePropagation()}function l(e){return e.rowSelection||{}}Object.defineProperty(t,"__esModule",{value:!0});var u=n(140),s=a(u),f=n(9),c=a(f),d=n(6),p=a(d),h=n(3),y=a(h),m=n(8),v=a(m),g=n(5),b=a(g),x=n(4),_=a(x),w=n(1),O=r(w),E=n(10),C=r(E),k=n(287),T=a(k),S=n(2),A=a(S),M=n(7),P=a(M),N=n(229),j=a(N),R=n(14),I=a(R),D=n(342),L=a(D),B=n(24),V=a(B),F=n(52),z=a(F),W=n(105),K=a(W),U=n(239),G=a(U),H=n(238),q=a(H),Y=n(234),X=a(Y),J=n(235),$=a(J),Z=n(231),Q=a(Z),ee=n(232),te=a(ee),ne=n(237),re=a(ne),ae=n(240),ie=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]]);return n},oe={onChange:i,onShowSizeChange:i},le={},ue=function(e){function t(e){(0,y.default)(this,t);var n=(0,b.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.getCheckboxPropsByItem=function(e,t){var r=l(n.props);if(!r.getCheckboxProps)return{};var a=n.getRecordKey(e,t);return n.CheckboxPropsCache[a]||(n.CheckboxPropsCache[a]=r.getCheckboxProps(e)),n.CheckboxPropsCache[a]},n.onRow=function(e,t){var r=n.props,a=r.onRow,i=r.prefixCls,o=a?a(e,t):{};return(0,p.default)({},o,{prefixCls:i,store:n.store,rowKey:n.getRecordKey(e,t)})},n.handleFilter=function(e,t){var r=n.props,a=(0,p.default)({},n.state.pagination),i=(0,p.default)({},n.state.filters,(0,c.default)({},n.getColumnKey(e),t)),o=[];(0,ae.treeMap)(n.columns,function(e){e.children||o.push(n.getColumnKey(e))}),Object.keys(i).forEach(function(e){o.indexOf(e)<0&&delete i[e]}),r.pagination&&(a.current=1,a.onChange(a.current));var l={pagination:a,filters:{}},u=(0,p.default)({},i);n.getFilteredValueColumns().forEach(function(e){var t=n.getColumnKey(e);t&&delete u[t]}),Object.keys(u).length>0&&(l.filters=u),"object"===(0,s.default)(r.pagination)&&"current"in r.pagination&&(l.pagination=(0,p.default)({},a,{current:n.state.pagination.current})),n.setState(l,function(){n.store.setState({selectionDirty:!1});var e=n.props.onChange;e&&e.apply(null,n.prepareParamsArguments((0,p.default)({},n.state,{selectionDirty:!1,filters:i,pagination:a})))})},n.handleSelect=function(e,t,r){var a=r.target.checked,i=r.nativeEvent,o=n.store.getState().selectionDirty?[]:n.getDefaultSelection(),l=n.store.getState().selectedRowKeys.concat(o),u=n.getRecordKey(e,t);a?l.push(n.getRecordKey(e,t)):l=l.filter(function(e){return u!==e}),n.store.setState({selectionDirty:!0}),n.setSelectedRowKeys(l,{selectWay:"onSelect",record:e,checked:a,changeRowKeys:void 0,nativeEvent:i})},n.handleRadioSelect=function(e,t,r){var a=r.target.checked,i=r.nativeEvent,o=n.store.getState().selectionDirty?[]:n.getDefaultSelection(),l=n.store.getState().selectedRowKeys.concat(o),u=n.getRecordKey(e,t);l=[u],n.store.setState({selectionDirty:!0}),n.setSelectedRowKeys(l,{selectWay:"onSelect",record:e,checked:a,changeRowKeys:void 0,nativeEvent:i})},n.handleSelectRow=function(e,t,r){var a=n.getFlatCurrentPageData(),i=n.store.getState().selectionDirty?[]:n.getDefaultSelection(),o=n.store.getState().selectedRowKeys.concat(i),l=a.filter(function(e,t){return!n.getCheckboxPropsByItem(e,t).disabled}).map(function(e,t){return n.getRecordKey(e,t)}),u=[],s="onSelectAll",f=void 0;switch(e){case"all":l.forEach(function(e){o.indexOf(e)<0&&(o.push(e),u.push(e))}),s="onSelectAll",f=!0;break;case"removeAll":l.forEach(function(e){o.indexOf(e)>=0&&(o.splice(o.indexOf(e),1),u.push(e))}),s="onSelectAll",f=!1;break;case"invert":l.forEach(function(e){o.indexOf(e)<0?o.push(e):o.splice(o.indexOf(e),1),u.push(e),s="onSelectInvert"})}n.store.setState({selectionDirty:!0});var c=n.props.rowSelection,d=2;return c&&c.hideDefaultSelections&&(d=0),t>=d&&"function"==typeof r?r(l):void n.setSelectedRowKeys(o,{selectWay:s,checked:f,changeRowKeys:u})},n.handlePageChange=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];var i=n.props,o=(0,p.default)({},n.state.pagination);e?o.current=e:o.current=o.current||1,o.onChange.apply(o,[o.current].concat(r));var l={pagination:o};i.pagination&&"object"===(0,s.default)(i.pagination)&&"current"in i.pagination&&(l.pagination=(0,p.default)({},o,{current:n.state.pagination.current})),n.setState(l),n.store.setState({selectionDirty:!1});var u=n.props.onChange;u&&u.apply(null,n.prepareParamsArguments((0,p.default)({},n.state,{selectionDirty:!1,pagination:o})))},n.renderSelectionBox=function(e){return function(t,r,a){var i=n.getRecordKey(r,a),l=n.getCheckboxPropsByItem(r,a),u=function(t){"radio"===e?n.handleRadioSelect(r,i,t):n.handleSelect(r,i,t)};return O.createElement("span",{onClick:o},O.createElement(X.default,(0,p.default)({type:e,store:n.store,rowIndex:i,onChange:u,defaultSelection:n.getDefaultSelection()},l)))}},n.getRecordKey=function(e,t){var r=n.props.rowKey,a="function"==typeof r?r(e,t):e[r];return(0,K.default)(void 0!==a,"Each record in dataSource of table should have a unique `key` prop, or set `rowKey` to an unique primary key,see https://u.ant.design/table-row-key"),void 0===a?t:a},n.getPopupContainer=function(){ return C.findDOMNode(n)},n.handleShowSizeChange=function(e,t){var r=n.state.pagination;r.onShowSizeChange(e,t);var a=(0,p.default)({},r,{pageSize:t,current:e});n.setState({pagination:a});var i=n.props.onChange;i&&i.apply(null,n.prepareParamsArguments((0,p.default)({},n.state,{pagination:a})))},n.renderTable=function(e,t){var r,a=(0,p.default)({},e,n.props.locale),i=n.props,o=(i.style,i.className,i.prefixCls),l=i.showHeader,u=ie(i,["style","className","prefixCls","showHeader"]),s=n.getCurrentPageData(),f=n.props.expandedRowRender&&n.props.expandIconAsCell!==!1,d=(0,P.default)((r={},(0,c.default)(r,o+"-"+n.props.size,!0),(0,c.default)(r,o+"-bordered",n.props.bordered),(0,c.default)(r,o+"-empty",!s.length),(0,c.default)(r,o+"-without-column-header",!l),r)),h=n.renderRowSelection(a);h=n.renderColumnsDropdown(h,a),h=h.map(function(e,t){var r=(0,p.default)({},e);return r.key=n.getColumnKey(r,t),r});var y=h[0]&&"selection-column"===h[0].key?1:0;return"expandIconColumnIndex"in u&&(y=u.expandIconColumnIndex),O.createElement(T.default,(0,p.default)({key:"table"},u,{onRow:n.onRow,components:n.components,prefixCls:o,data:s,columns:h,showHeader:l,className:d,expandIconColumnIndex:y,expandIconAsCell:f,emptyText:!t.spinning&&a.emptyText}))},(0,K.default)(!("columnsPageRange"in e||"columnsPageSize"in e),"`columnsPageRange` and `columnsPageSize` are removed, please use fixed columns instead, see: https://u.ant.design/fixed-columns."),n.columns=e.columns||(0,ae.normalizeColumns)(e.children),n.createComponents(e.components),n.state=(0,p.default)({},n.getDefaultSortOrder(n.columns),{filters:n.getFiltersFromColumns(),pagination:n.getDefaultPagination(e)}),n.CheckboxPropsCache={},n.store=(0,q.default)({selectedRowKeys:l(e).selectedRowKeys||[],selectionDirty:!1}),n}return(0,_.default)(t,e),(0,v.default)(t,[{key:"getDefaultSelection",value:function(){var e=this,t=l(this.props);return t.getCheckboxProps?this.getFlatData().filter(function(t,n){return e.getCheckboxPropsByItem(t,n).defaultChecked}).map(function(t,n){return e.getRecordKey(t,n)}):[]}},{key:"getDefaultPagination",value:function(e){var t=e.pagination||{};return this.hasPagination(e)?(0,p.default)({},oe,t,{current:t.defaultCurrent||t.current||1,pageSize:t.defaultPageSize||t.pageSize||10}):{}}},{key:"componentWillReceiveProps",value:function(e){if(this.columns=e.columns||(0,ae.normalizeColumns)(e.children),("pagination"in e||"pagination"in this.props)&&this.setState(function(t){var n=(0,p.default)({},oe,t.pagination,e.pagination);return n.current=n.current||1,n.pageSize=n.pageSize||10,{pagination:e.pagination!==!1?n:le}}),e.rowSelection&&"selectedRowKeys"in e.rowSelection&&this.store.setState({selectedRowKeys:e.rowSelection.selectedRowKeys||[]}),"dataSource"in e&&e.dataSource!==this.props.dataSource&&this.store.setState({selectionDirty:!1}),this.CheckboxPropsCache={},this.getSortOrderColumns(this.columns).length>0){var t=this.getSortStateFromColumns(this.columns);t.sortColumn===this.state.sortColumn&&t.sortOrder===this.state.sortOrder||this.setState(t)}var n=this.getFilteredValueColumns(this.columns);if(n.length>0){var r=this.getFiltersFromColumns(this.columns),a=(0,p.default)({},this.state.filters);Object.keys(r).forEach(function(e){a[e]=r[e]}),this.isFiltersChanged(a)&&this.setState({filters:a})}this.createComponents(e.components,this.props.components)}},{key:"setSelectedRowKeys",value:function(e,t){var n=this,r=t.selectWay,a=t.record,i=t.checked,o=t.changeRowKeys,u=t.nativeEvent,s=l(this.props);!s||"selectedRowKeys"in s||this.store.setState({selectedRowKeys:e});var f=this.getFlatData();if(s.onChange||s[r]){var c=f.filter(function(t,r){return e.indexOf(n.getRecordKey(t,r))>=0});if(s.onChange&&s.onChange(e,c),"onSelect"===r&&s.onSelect)s.onSelect(a,i,c,u);else if("onSelectAll"===r&&s.onSelectAll){var d=f.filter(function(e,t){return o.indexOf(n.getRecordKey(e,t))>=0});s.onSelectAll(i,c,d)}else"onSelectInvert"===r&&s.onSelectInvert&&s.onSelectInvert(e)}}},{key:"hasPagination",value:function(e){return(e||this.props).pagination!==!1}},{key:"isFiltersChanged",value:function(e){var t=this,n=!1;return Object.keys(e).length!==Object.keys(this.state.filters).length?n=!0:Object.keys(e).forEach(function(r){e[r]!==t.state.filters[r]&&(n=!0)}),n}},{key:"getSortOrderColumns",value:function(e){return(0,ae.flatFilter)(e||this.columns||[],function(e){return"sortOrder"in e})}},{key:"getFilteredValueColumns",value:function(e){return(0,ae.flatFilter)(e||this.columns||[],function(e){return"undefined"!=typeof e.filteredValue})}},{key:"getFiltersFromColumns",value:function(e){var t=this,n={};return this.getFilteredValueColumns(e).forEach(function(e){var r=t.getColumnKey(e);n[r]=e.filteredValue}),n}},{key:"getDefaultSortOrder",value:function(e){var t=this.getSortStateFromColumns(e),n=(0,ae.flatFilter)(e||[],function(e){return null!=e.defaultSortOrder})[0];return n&&!t.sortColumn?{sortColumn:n,sortOrder:n.defaultSortOrder}:t}},{key:"getSortStateFromColumns",value:function(e){var t=this.getSortOrderColumns(e).filter(function(e){return e.sortOrder})[0];return t?{sortColumn:t,sortOrder:t.sortOrder}:{sortColumn:null,sortOrder:null}}},{key:"getSorterFn",value:function(){var e=this.state,t=e.sortOrder,n=e.sortColumn;if(t&&n&&"function"==typeof n.sorter)return function(e,r){var a=n.sorter(e,r,t);return 0!==a?"descend"===t?-a:a:0}}},{key:"toggleSortOrder",value:function(e,t){var n=this.state,r=n.sortColumn,a=n.sortOrder,i=this.isSortColumn(t);i?a===e?(a=void 0,r=null):a=e:(a=e,r=t);var o={sortOrder:a,sortColumn:r};0===this.getSortOrderColumns().length&&this.setState(o);var l=this.props.onChange;l&&l.apply(null,this.prepareParamsArguments((0,p.default)({},this.state,o)))}},{key:"renderRowSelection",value:function(e){var t=this,n=this.props,r=n.prefixCls,a=n.rowSelection,i=this.columns.concat();if(a){var o=this.getFlatCurrentPageData().filter(function(e,n){return!a.getCheckboxProps||!t.getCheckboxPropsByItem(e,n).disabled}),l=(0,P.default)(r+"-selection-column",(0,c.default)({},r+"-selection-column-custom",a.selections)),u={key:"selection-column",render:this.renderSelectionBox(a.type),className:l,fixed:a.fixed,width:a.columnWidth};if("radio"!==a.type){var s=o.every(function(e,n){return t.getCheckboxPropsByItem(e,n).disabled});u.title=O.createElement($.default,{store:this.store,locale:e,data:o,getCheckboxPropsByItem:this.getCheckboxPropsByItem,getRecordKey:this.getRecordKey,disabled:s,prefixCls:r,onSelect:this.handleSelectRow,selections:a.selections,hideDefaultSelections:a.hideDefaultSelections,getPopupContainer:this.getPopupContainer})}"fixed"in a?u.fixed=a.fixed:i.some(function(e){return"left"===e.fixed||e.fixed===!0})&&(u.fixed="left"),i[0]&&"selection-column"===i[0].key?i[0]=u:i.unshift(u)}return i}},{key:"getColumnKey",value:function(e,t){return e.key||e.dataIndex||t}},{key:"getMaxCurrent",value:function(e){var t=this.state.pagination,n=t.current,r=t.pageSize;return(n-1)*r>=e?Math.floor((e-1)/r)+1:n}},{key:"isSortColumn",value:function(e){var t=this.state.sortColumn;return!(!e||!t)&&this.getColumnKey(t)===this.getColumnKey(e)}},{key:"renderColumnsDropdown",value:function(e,t){var n=this,r=this.props,a=r.prefixCls,i=r.dropdownPrefixCls,o=this.state.sortOrder;return(0,ae.treeMap)(e,function(e,r){var l=(0,p.default)({},e),u=n.getColumnKey(l,r),s=void 0,f=void 0;if(l.filters&&l.filters.length>0||l.filterDropdown){var d=n.state.filters[u]||[];s=O.createElement(G.default,{locale:t,column:l,selectedKeys:d,confirmFilter:n.handleFilter,prefixCls:a+"-filter",dropdownPrefixCls:i||"ant-dropdown",getPopupContainer:n.getPopupContainer})}if(l.sorter){var h=n.isSortColumn(l);h&&(l.className=(0,P.default)(l.className,(0,c.default)({},a+"-column-sort",o)));var y=h&&"ascend"===o,m=h&&"descend"===o;f=O.createElement("div",{className:a+"-column-sorter"},O.createElement("span",{className:a+"-column-sorter-up "+(y?"on":"off"),title:"\u2191",onClick:function(){return n.toggleSortOrder("ascend",l)}},O.createElement(I.default,{type:"caret-up"})),O.createElement("span",{className:a+"-column-sorter-down "+(m?"on":"off"),title:"\u2193",onClick:function(){return n.toggleSortOrder("descend",l)}},O.createElement(I.default,{type:"caret-down"})))}return l.title=O.createElement("span",{key:u},l.title,f,s),(f||s)&&(l.className=(0,P.default)(a+"-column-has-filters",l.className)),l})}},{key:"renderPagination",value:function(e){if(!this.hasPagination())return null;var t="default",n=this.state.pagination;n.size?t=n.size:"middle"!==this.props.size&&"small"!==this.props.size||(t="small");var r=n.position||"bottom",a=n.total||this.getLocalData().length;return a>0&&(r===e||"both"===r)?O.createElement(j.default,(0,p.default)({key:"pagination-"+e},n,{className:(0,P.default)(n.className,this.props.prefixCls+"-pagination"),onChange:this.handlePageChange,total:a,size:t,current:this.getMaxCurrent(a),onShowSizeChange:this.handleShowSizeChange})):null}},{key:"prepareParamsArguments",value:function(e){var t=(0,p.default)({},e.pagination);delete t.onChange,delete t.onShowSizeChange;var n=e.filters,r={};return e.sortColumn&&e.sortOrder&&(r.column=e.sortColumn,r.order=e.sortOrder,r.field=e.sortColumn.dataIndex,r.columnKey=this.getColumnKey(e.sortColumn)),[t,n,r]}},{key:"findColumn",value:function(e){var t=this,n=void 0;return(0,ae.treeMap)(this.columns,function(r){t.getColumnKey(r)===e&&(n=r)}),n}},{key:"getCurrentPageData",value:function(){var e=this.getLocalData(),t=void 0,n=void 0,r=this.state;return this.hasPagination()?(n=r.pagination.pageSize,t=this.getMaxCurrent(r.pagination.total||e.length)):(n=Number.MAX_VALUE,t=1),(e.length>n||n===Number.MAX_VALUE)&&(e=e.filter(function(e,r){return r>=(t-1)*n&&r<t*n})),e}},{key:"getFlatData",value:function(){return(0,ae.flatArray)(this.getLocalData())}},{key:"getFlatCurrentPageData",value:function(){return(0,ae.flatArray)(this.getCurrentPageData())}},{key:"recursiveSort",value:function(e,t){var n=this,r=this.props.childrenColumnName,a=void 0===r?"children":r;return e.sort(t).map(function(e){return e[a]?(0,p.default)({},e,(0,c.default)({},a,n.recursiveSort(e[a],t))):e})}},{key:"getLocalData",value:function(){var e=this,t=this.state,n=this.props.dataSource,r=n||[];r=r.slice(0);var a=this.getSorterFn();return a&&(r=this.recursiveSort(r,a)),t.filters&&Object.keys(t.filters).forEach(function(n){var a=e.findColumn(n);if(a){var i=t.filters[n]||[];if(0!==i.length){var o=a.onFilter;r=o?r.filter(function(e){return i.some(function(t){return o(t,e)})}):r}}}),r}},{key:"createComponents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=e&&e.body&&e.body.row,r=t&&t.body&&t.body.row;this.components&&n===r||(this.components=(0,p.default)({},e),this.components.body=(0,p.default)({},e.body,{row:(0,re.default)(n)}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.style,r=t.className,a=t.prefixCls,i=this.getCurrentPageData(),o=this.props.loading;"boolean"==typeof o&&(o={spinning:o});var l=O.createElement(V.default,{componentName:"Table",defaultLocale:z.default.Table},function(t){return e.renderTable(t,o)}),u=this.hasPagination()&&i&&0!==i.length?a+"-with-pagination":a+"-without-pagination";return O.createElement("div",{className:(0,P.default)(a+"-wrapper",r),style:n},O.createElement(L.default,(0,p.default)({},o,{className:o.spinning?u+" "+a+"-spin-holder":""}),this.renderPagination("top"),l,this.renderPagination("bottom")))}}]),t}(O.Component);t.default=ue,ue.Column=Q.default,ue.ColumnGroup=te.default,ue.propTypes={dataSource:A.default.array,columns:A.default.array,prefixCls:A.default.string,useFixedHeader:A.default.bool,rowSelection:A.default.object,className:A.default.string,size:A.default.string,loading:A.default.oneOfType([A.default.bool,A.default.object]),bordered:A.default.bool,onChange:A.default.func,locale:A.default.object,dropdownPrefixCls:A.default.string},ue.defaultProps={dataSource:[],prefixCls:"ant-table",useFixedHeader:!1,className:"",size:"default",loading:!1,bordered:!1,indentSize:20,locale:{},rowKey:"key",showHeader:!0},e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"tr",t=function(t){function n(e){(0,c.default)(this,n);var t=(0,y.default)(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));t.store=e.store;var r=t.store.getState(),a=r.selectedRowKeys;return t.state={selected:a.indexOf(e.rowKey)>=0},t}return(0,v.default)(n,t),(0,p.default)(n,[{key:"componentDidMount",value:function(){this.subscribe()}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe()}},{key:"subscribe",value:function(){var e=this,t=this.props,n=t.store,r=t.rowKey;this.unsubscribe=n.subscribe(function(){var t=e.store.getState(),n=t.selectedRowKeys,a=n.indexOf(r)>=0;a!==e.state.selected&&e.setState({selected:a})})}},{key:"render",value:function(){var t=(0,O.default)(this.props,["prefixCls","rowKey","store"]),n=(0,_.default)(this.props.className,(0,s.default)({},this.props.prefixCls+"-row-selected",this.state.selected));return b.createElement(e,(0,l.default)({},t,{className:n}),this.props.children)}}]),n}(b.Component);return t}Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),l=a(o),u=n(9),s=a(u),f=n(3),c=a(f),d=n(8),p=a(d),h=n(5),y=a(h),m=n(4),v=a(m);t.default=i;var g=n(1),b=r(g),x=n(7),_=a(x),w=n(147),O=a(w);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){function t(e){a=(0,o.default)({},a,e);for(var t=0;t<i.length;t++)i[t]()}function n(){return a}function r(e){return i.push(e),function(){var t=i.indexOf(e);i.splice(t,1)}}var a=e,i=[];return{setState:t,getState:n,subscribe:r}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=r(i);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),o=a(i),l=n(3),u=a(l),s=n(8),f=a(s),c=n(5),d=a(c),p=n(4),h=a(p),y=n(1),m=r(y),v=n(10),g=r(v),b=n(45),x=a(b),_=n(248),w=a(_),O=n(7),E=a(O),C=n(22),k=a(C),T=n(117),S=a(T),A=n(14),M=a(A),P=n(67),N=a(P),j=n(71),R=a(j),I=n(233),D=a(I),L=function(e){function t(e){(0,u.default)(this,t);var n=(0,d.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.setNeverShown=function(e){var t=g.findDOMNode(n),r=!!(0,w.default)(t,".ant-table-scroll");r&&(n.neverShown=!!e.fixed)},n.setSelectedKeys=function(e){var t=e.selectedKeys;n.setState({selectedKeys:t})},n.handleClearFilters=function(){n.setState({selectedKeys:[]},n.handleConfirm)},n.handleConfirm=function(){n.setVisible(!1),n.confirmFilter()},n.onVisibleChange=function(e){n.setVisible(e),e||n.confirmFilter()},n.handleMenuItemClick=function(e){if(e.keyPath&&!(e.keyPath.length<=1)){var t=n.state.keyPathOfSelectedItem;n.state.selectedKeys.indexOf(e.key)>=0?delete t[e.key]:t[e.key]=e.keyPath,n.setState({keyPathOfSelectedItem:t})}},n.renderFilterIcon=function(){var e=n.props,t=e.column,r=e.locale,a=e.prefixCls,i=t.filterIcon,o=n.props.selectedKeys.length>0?a+"-selected":"";return i?m.cloneElement(i,{title:r.filterTitle,className:(0,E.default)(a+"-icon",i.props.className)}):m.createElement(M.default,{title:r.filterTitle,type:"filter",className:o})};var r="filterDropdownVisible"in e.column&&e.column.filterDropdownVisible;return n.state={selectedKeys:e.selectedKeys,keyPathOfSelectedItem:{},visible:r},n}return(0,h.default)(t,e),(0,f.default)(t,[{key:"componentDidMount",value:function(){var e=this.props.column;this.setNeverShown(e)}},{key:"componentWillReceiveProps",value:function(e){var t=e.column;this.setNeverShown(t);var n={};"selectedKeys"in e&&!(0,k.default)(this.props.selectedKeys,e.selectedKeys)&&(n.selectedKeys=e.selectedKeys),"filterDropdownVisible"in t&&(n.visible=t.filterDropdownVisible),Object.keys(n).length>0&&this.setState(n)}},{key:"setVisible",value:function(e){var t=this.props.column;"filterDropdownVisible"in t||this.setState({visible:e}),t.onFilterDropdownVisibleChange&&t.onFilterDropdownVisibleChange(e)}},{key:"confirmFilter",value:function(){this.state.selectedKeys!==this.props.selectedKeys&&this.props.confirmFilter(this.props.column,this.state.selectedKeys)}},{key:"renderMenuItem",value:function(e){var t=this.props.column,n=this.state.selectedKeys,r=!("filterMultiple"in t)||t.filterMultiple,a=r?m.createElement(N.default,{checked:n.indexOf(e.value.toString())>=0}):m.createElement(R.default,{checked:n.indexOf(e.value.toString())>=0});return m.createElement(b.Item,{key:e.value},a,m.createElement("span",null,e.text))}},{key:"hasSubMenu",value:function(){var e=this.props.column.filters,t=void 0===e?[]:e;return t.some(function(e){return!!(e.children&&e.children.length>0)})}},{key:"renderMenus",value:function(e){var t=this;return e.map(function(e){if(e.children&&e.children.length>0){var n=t.state.keyPathOfSelectedItem,r=Object.keys(n).some(function(t){return n[t].indexOf(e.value)>=0}),a=r?t.props.dropdownPrefixCls+"-submenu-contain-selected":"";return m.createElement(b.SubMenu,{title:e.text,className:a,key:e.value.toString()},t.renderMenus(e.children))}return t.renderMenuItem(e)})}},{key:"render",value:function(){var e=this.props,t=e.column,n=e.locale,r=e.prefixCls,a=e.dropdownPrefixCls,i=e.getPopupContainer,l=!("filterMultiple"in t)||t.filterMultiple,u=(0,E.default)((0,o.default)({},a+"-menu-without-submenu",!this.hasSubMenu())),s=t.filterDropdown?m.createElement(D.default,null,t.filterDropdown):m.createElement(D.default,{className:r+"-dropdown"},m.createElement(x.default,{multiple:l,onClick:this.handleMenuItemClick,prefixCls:a+"-menu",className:u,onSelect:this.setSelectedKeys,onDeselect:this.setSelectedKeys,selectedKeys:this.state.selectedKeys,getPopupContainer:function(e){return e.parentNode}},this.renderMenus(t.filters)),m.createElement("div",{className:r+"-dropdown-btns"},m.createElement("a",{className:r+"-dropdown-link confirm",onClick:this.handleConfirm},n.filterConfirm),m.createElement("a",{className:r+"-dropdown-link clear",onClick:this.handleClearFilters},n.filterReset)));return m.createElement(S.default,{trigger:["click"],overlay:s,visible:!this.neverShown&&this.state.visible,onVisibleChange:this.onVisibleChange,getPopupContainer:i,forceRender:!0},this.renderFilterIcon())}}]),t}(m.Component);t.default=L,L.defaultProps={handleFilter:function(){},column:{}},e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"children",n=[],r=function e(r){r.forEach(function(r){if(r[t]){var a=(0,d.default)({},r);delete a[t],n.push(a),r[t].length>0&&e(r[t])}else n.push(r)})};return r(e),n}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children";return e.map(function(e,r){var a={};return e[n]&&(a[n]=o(e[n],t,n)),(0,d.default)({},t(e,r),a)})}function l(e,t){return e.reduce(function(e,n){if(t(n)&&e.push(n),n.children){var r=l(n.children,t);e.push.apply(e,(0,f.default)(r))}return e},[])}function u(e){var t=[];return h.Children.forEach(e,function(e){if(h.isValidElement(e)){var n=(0,d.default)({},e.props);e.key&&(n.key=e.key),e.type&&e.type.__ANT_TABLE_COLUMN_GROUP&&(n.children=u(n.children)),t.push(n)}}),t}Object.defineProperty(t,"__esModule",{value:!0});var s=n(118),f=a(s),c=n(6),d=a(c);t.flatArray=i,t.treeMap=o,t.flatFilter=l,t.normalizeColumns=u;var p=n(1),h=r(p)},,,11,11,,,function(e,t,n){!function(e,n){n(t)}(this,function(e){"use strict";function t(e,n,r,o){function l(t){return e(t=new Date(+t)),t}return l.floor=l,l.ceil=function(t){return e(t=new Date(t-1)),n(t,1),e(t),t},l.round=function(e){var t=l(e),n=l.ceil(e);return e-t<n-e?t:n},l.offset=function(e,t){return n(e=new Date(+e),null==t?1:Math.floor(t)),e},l.range=function(t,r,a){var i,o=[];if(t=l.ceil(t),a=null==a?1:Math.floor(a),!(t<r&&a>0))return o;do o.push(i=new Date(+t)),n(t,a),e(t);while(i<t&&t<r);return o},l.filter=function(r){return t(function(t){if(t>=t)for(;e(t),!r(t);)t.setTime(t-1)},function(e,t){if(e>=e)if(t<0)for(;++t<=0;)for(;n(e,-1),!r(e););else for(;--t>=0;)for(;n(e,1),!r(e););})},r&&(l.count=function(t,n){return a.setTime(+t),i.setTime(+n),e(a),e(i),Math.floor(r(a,i))},l.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?l.filter(o?function(t){return o(t)%e===0}:function(t){return l.count(0,t)%e===0}):l:null}),l}function n(e){return t(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*s)/d})}function r(e){return t(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/d})}var a=new Date,i=new Date,o=t(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?t(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):o:null};var l=o.range,u=1e3,s=6e4,f=36e5,c=864e5,d=6048e5,p=t(function(e){e.setTime(Math.floor(e/u)*u)},function(e,t){e.setTime(+e+t*u)},function(e,t){return(t-e)/u},function(e){return e.getUTCSeconds()}),h=p.range,y=t(function(e){e.setTime(Math.floor(e/s)*s)},function(e,t){e.setTime(+e+t*s)},function(e,t){return(t-e)/s},function(e){return e.getMinutes()}),m=y.range,v=t(function(e){var t=e.getTimezoneOffset()*s%f;t<0&&(t+=f),e.setTime(Math.floor((+e-t)/f)*f+t)},function(e,t){e.setTime(+e+t*f)},function(e,t){return(t-e)/f},function(e){return e.getHours()}),g=v.range,b=t(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*s)/c},function(e){return e.getDate()-1}),x=b.range,_=n(0),w=n(1),O=n(2),E=n(3),C=n(4),k=n(5),T=n(6),S=_.range,A=w.range,M=O.range,P=E.range,N=C.range,j=k.range,R=T.range,I=t(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()}),D=I.range,L=t(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});L.every=function(e){return isFinite(e=Math.floor(e))&&e>0?t(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null};var B=L.range,V=t(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*s)},function(e,t){return(t-e)/s},function(e){return e.getUTCMinutes()}),F=V.range,z=t(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*f)},function(e,t){return(t-e)/f},function(e){return e.getUTCHours()}),W=z.range,K=t(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/c},function(e){return e.getUTCDate()-1}),U=K.range,G=r(0),H=r(1),q=r(2),Y=r(3),X=r(4),J=r(5),$=r(6),Z=G.range,Q=H.range,ee=q.range,te=Y.range,ne=X.range,re=J.range,ae=$.range,ie=t(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()}),oe=ie.range,le=t(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});le.every=function(e){return isFinite(e=Math.floor(e))&&e>0?t(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null};var ue=le.range;e.timeInterval=t,e.timeMillisecond=o,e.timeMilliseconds=l,e.utcMillisecond=o,e.utcMilliseconds=l,e.timeSecond=p,e.timeSeconds=h,e.utcSecond=p,e.utcSeconds=h,e.timeMinute=y,e.timeMinutes=m,e.timeHour=v,e.timeHours=g,e.timeDay=b,e.timeDays=x,e.timeWeek=_,e.timeWeeks=S,e.timeSunday=_,e.timeSundays=S,e.timeMonday=w,e.timeMondays=A,e.timeTuesday=O,e.timeTuesdays=M,e.timeWednesday=E,e.timeWednesdays=P,e.timeThursday=C,e.timeThursdays=N,e.timeFriday=k,e.timeFridays=j,e.timeSaturday=T,e.timeSaturdays=R,e.timeMonth=I,e.timeMonths=D,e.timeYear=L,e.timeYears=B,e.utcMinute=V,e.utcMinutes=F,e.utcHour=z,e.utcHours=W,e.utcDay=K,e.utcDays=U,e.utcWeek=G,e.utcWeeks=Z,e.utcSunday=G,e.utcSundays=Z,e.utcMonday=H,e.utcMondays=Q,e.utcTuesday=q,e.utcTuesdays=ee,e.utcWednesday=Y,e.utcWednesdays=te,e.utcThursday=X,e.utcThursdays=ne,e.utcFriday=J,e.utcFridays=re,e.utcSaturday=$,e.utcSaturdays=ae,e.utcMonth=ie,e.utcMonths=oe,e.utcYear=le,e.utcYears=ue,Object.defineProperty(e,"__esModule",{value:!0})})},function(e,t,n){var r=n(249);e.exports=function(e,t,n){for(n=n||document,e={parentNode:e};(e=e.parentNode)&&e!==n;)if(r(e,t))return e}},function(e,t){"use strict";function n(e,t){var n=window.Element.prototype,r=n.matches||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector;if(!e||1!==e.nodeType)return!1;var a=e.parentNode;if(r)return r.call(e,t);for(var i=a.querySelectorAll(t),o=i.length,l=0;l<o;l++)if(i[l]===e)return!0;return!1}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[a++]=o)}return i}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}e.exports=n},function(e,t,n){var r=n(27),a=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(a)return a(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t,n){function r(e){if(!a(e))return o(e);var t=i(e),n=[];for(var r in e)("constructor"!=r||!t&&u.call(e,r))&&n.push(r);return n}var a=n(27),i=n(77),o=n(263),l=Object.prototype,u=l.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t,n,c,d){e!==t&&o(t,function(o,s){if(u(o))d||(d=new a),l(e,t,s,n,r,c,d);else{var p=c?c(f(e,s),o,s+"",e,t,d):void 0;void 0===p&&(p=o),i(e,s,p)}},s)}var a=n(95),i=n(150),o=n(163),l=n(255),u=n(27),s=n(154),f=n(151);e.exports=r},function(e,t,n){function r(e,t,n,r,b,x,_){var w=v(e,n),O=v(t,n),E=_.get(O);if(E)return void a(e,n,E);var C=x?x(w,O,n+"",e,t,_):void 0,k=void 0===C;if(k){var T=f(O),S=!T&&d(O),A=!T&&!S&&m(O);C=O,T||S||A?f(w)?C=w:c(w)?C=l(w):S?(k=!1,C=i(O,!0)):A?(k=!1,C=o(O,!0)):C=[]:y(O)||s(O)?(C=w,s(w)?C=g(w):(!h(w)||r&&p(w))&&(C=u(O))):k=!1}k&&(_.set(O,C),b(C,O,r,x,_),_.delete(O)),a(e,n,C)}var a=n(150),i=n(257),o=n(258),l=n(216),u=n(262),s=n(129),f=n(19),c=n(164),d=n(68),p=n(15),h=n(27),y=n(187),m=n(69),v=n(151),g=n(267);e.exports=r},function(e,t,n){function r(e){var t=new e.constructor(e.byteLength);return new a(t).set(new a(e)),t}var a=n(135);e.exports=r},function(e,t,n){(function(e){function r(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}var a=n(29),i="object"==typeof t&&t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,l=o&&o.exports===i,u=l?a.Buffer:void 0,s=u?u.allocUnsafe:void 0;e.exports=r}).call(t,n(74)(e))},function(e,t,n){function r(e,t){var n=t?a(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var a=n(256);e.exports=r},function(e,t,n){function r(e,t,n,r){var o=!n;n||(n={});for(var l=-1,u=t.length;++l<u;){var s=t[l],f=r?r(n[s],e[s],s,n,e):void 0;void 0===f&&(f=e[s]),o?i(n,s,f):a(n,s,f)}return n}var a=n(420),i=n(215);e.exports=r},function(e,t,n){function r(e){return a(function(t,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,l=a>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(a--,o):void 0,l&&i(n[0],n[1],l)&&(o=a<3?void 0:o,a=1),t=Object(t);++r<a;){var u=n[r];u&&e(t,u,r,o)}return t})}var a=n(136),i=n(137);e.exports=r},,function(e,t,n){function r(e){return"function"!=typeof e.constructor||o(e)?{}:a(i(e))}var a=n(252),i=n(421),o=n(77);e.exports=r},function(e,t){function n(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}e.exports=n},,function(e,t,n){function r(e){return"number"==typeof e||i(e)&&a(e)==o}var a=n(90),i=n(58),o="[object Number]";e.exports=r},function(e,t,n){var r=n(254),a=n(260),i=a(function(e,t,n){r(e,t,n)});e.exports=i},function(e,t,n){function r(e){return a(e,i(e))}var a=n(259),i=n(154);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),o=n(8),l=r(o),u=n(5),s=r(u),f=n(4),c=r(f),d=n(1),p=r(d),h=n(2),y=r(h),m=n(155),v=r(m),g=function(e){function t(e){(0,i.default)(this,t);var n=(0,s.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.buildOptionText=function(e){return e+" "+n.props.locale.items_per_page},n.changeSize=function(e){n.props.changeSize(Number(e))},n.handleChange=function(e){n.setState({goInputText:e.target.value})},n.go=function(e){var t=n.state.goInputText;""!==t&&(t=isNaN(t)?n.props.current:Number(t),e.keyCode!==v.default.ENTER&&"click"!==e.type||(n.setState({goInputText:""}),n.props.quickGo(t)))},n.state={goInputText:""},n}return(0,c.default)(t,e),(0,l.default)(t,[{key:"render",value:function(){var e=this.props,t=this.state,n=e.locale,r=e.rootPrefixCls+"-options",a=e.changeSize,i=e.quickGo,o=e.goButton,l=e.buildOptionText||this.buildOptionText,u=e.selectComponentClass,s=null,f=null,c=null;if(!a&&!i)return null;if(a&&u){var d=u.Option,h=e.pageSize||e.pageSizeOptions[0],y=e.pageSizeOptions.map(function(e,t){return p.default.createElement(d,{key:t,value:e},l(e))});s=p.default.createElement(u,{prefixCls:e.selectPrefixCls,showSearch:!1,className:r+"-size-changer",optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:h.toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},y)}return i&&(o&&(c="boolean"==typeof o?p.default.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go},n.jump_to_confirm):p.default.createElement("span",{onClick:this.go,onKeyUp:this.go},o)),f=p.default.createElement("div",{className:r+"-quick-jumper"},n.jump_to,p.default.createElement("input",{type:"text",value:t.goInputText,onChange:this.handleChange,onKeyUp:this.go}),n.page,c)),p.default.createElement("li",{className:""+r},s,f)}}]),t}(p.default.Component);g.propTypes={changeSize:y.default.func,quickGo:y.default.func,selectComponentClass:y.default.func,current:y.default.number,pageSizeOptions:y.default.arrayOf(y.default.string),pageSize:y.default.number,buildOptionText:y.default.func,locale:y.default.object},g.defaultProps={pageSizeOptions:["10","20","30","40"]},t.default=g,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),i=r(a),o=n(2),l=r(o),u=function(e){var t=e.rootPrefixCls+"-item",n=t+" "+t+"-"+e.page;e.active&&(n=n+" "+t+"-active"),e.className&&(n=n+" "+e.className);var r=function(){e.onClick(e.page)},a=function(t){e.onKeyPress(t,e.onClick,e.page)};return i.default.createElement("li",{title:e.showTitle?e.page:null,className:n,onClick:r,onKeyPress:a,tabIndex:"0"},e.itemRender(e.page,"page",i.default.createElement("a",null,e.page)))};u.propTypes={page:l.default.number,active:l.default.bool,last:l.default.bool,locale:l.default.object,className:l.default.string,showTitle:l.default.bool,rootPrefixCls:l.default.string,onClick:l.default.func,onKeyPress:l.default.func,itemRender:l.default.func },t.default=u,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(){}function i(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function o(e,t,n){return n}Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=r(l),s=n(8),f=r(s),c=n(5),d=r(c),p=n(4),h=r(p),y=n(1),m=r(y),v=n(2),g=r(v),b=n(269),x=r(b),_=n(268),w=r(_),O=n(155),E=r(O),C=n(272),k=r(C),T=function(e){function t(e){(0,u.default)(this,t);var n=(0,d.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));S.call(n);var r=e.onChange!==a,i="current"in e;i&&!r&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var o=e.defaultCurrent;"current"in e&&(o=e.current);var l=e.defaultPageSize;return"pageSize"in e&&(l=e.pageSize),n.state={current:o,currentInputValue:o,pageSize:l},n}return(0,h.default)(t,e),(0,f.default)(t,[{key:"componentWillReceiveProps",value:function(e){if("current"in e&&this.setState({current:e.current,currentInputValue:e.current}),"pageSize"in e){var t={},n=this.state.current,r=this.calculatePage(e.pageSize);n=n>r?r:n,"current"in e||(t.current=n,t.currentInputValue=n),t.pageSize=e.pageSize,this.setState(t)}}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.prefixCls;if(t.current!==this.state.current&&this.paginationNode){var r=this.paginationNode.querySelector("."+n+"-item-"+t.current);r&&document.activeElement===r&&r.blur()}}},{key:"getJumpPrevPage",value:function(){return Math.max(1,this.state.current-(this.props.showLessItems?3:5))}},{key:"getJumpNextPage",value:function(){return Math.min(this.calculatePage(),this.state.current+(this.props.showLessItems?3:5))}},{key:"getJumpPrevPage",value:function(){return Math.max(1,this.state.current-(this.props.showLessItems?3:5))}},{key:"getJumpNextPage",value:function(){return Math.min(this.calculatePage(),this.state.current+(this.props.showLessItems?3:5))}},{key:"render",value:function(){if(this.props.hideOnSinglePage===!0&&this.props.total<=this.state.pageSize)return null;var e=this.props,t=e.locale,n=e.prefixCls,r=this.calculatePage(),a=[],i=null,o=null,l=null,u=null,s=null,f=e.showQuickJumper&&e.showQuickJumper.goButton,c=e.showLessItems?1:2,d=this.state,p=d.current,h=d.pageSize,y=p-1>0?p-1:0,v=p+1<r?p+1:r;if(e.simple)return f&&(s="boolean"==typeof f?m.default.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},t.jump_to_confirm):m.default.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},f),s=m.default.createElement("li",{title:e.showTitle?""+t.jump_to+this.state.current+"/"+r:null,className:n+"-simple-pager"},s)),m.default.createElement("ul",{className:n+" "+n+"-simple "+e.className,style:e.style},m.default.createElement("li",{title:e.showTitle?t.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:(this.hasPrev()?"":n+"-disabled")+" "+n+"-prev","aria-disabled":!this.hasPrev()},e.itemRender(y,"prev",m.default.createElement("a",{className:n+"-item-link"}))),m.default.createElement("li",{title:e.showTitle?this.state.current+"/"+r:null,className:n+"-simple-pager"},m.default.createElement("input",{type:"text",value:this.state.currentInputValue,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),m.default.createElement("span",{className:n+"-slash"},"\uff0f"),r),m.default.createElement("li",{title:e.showTitle?t.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:(this.hasNext()?"":n+"-disabled")+" "+n+"-next","aria-disabled":!this.hasNext()},e.itemRender(v,"next",m.default.createElement("a",{className:n+"-item-link"}))),s);if(r<=5+2*c)for(var g=1;g<=r;g++){var b=this.state.current===g;a.push(m.default.createElement(x.default,{locale:t,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:g,page:g,active:b,showTitle:e.showTitle,itemRender:e.itemRender}))}else{var _=e.showLessItems?t.prev_3:t.prev_5,O=e.showLessItems?t.next_3:t.next_5;e.showPrevNextJumpers&&(i=m.default.createElement("li",{title:e.showTitle?_:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:n+"-jump-prev"},e.itemRender(this.getJumpPrevPage(),"jump-prev",m.default.createElement("a",{className:n+"-item-link"}))),o=m.default.createElement("li",{title:e.showTitle?O:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:n+"-jump-next"},e.itemRender(this.getJumpNextPage(),"jump-next",m.default.createElement("a",{className:n+"-item-link"})))),u=m.default.createElement(x.default,{locale:e.locale,last:!0,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:r,page:r,active:!1,showTitle:e.showTitle,itemRender:e.itemRender}),l=m.default.createElement(x.default,{locale:e.locale,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:e.showTitle,itemRender:e.itemRender});var E=Math.max(1,p-c),C=Math.min(p+c,r);p-1<=c&&(C=1+2*c),r-p<=c&&(E=r-2*c);for(var k=E;k<=C;k++){var T=p===k;a.push(m.default.createElement(x.default,{locale:e.locale,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:k,page:k,active:T,showTitle:e.showTitle,itemRender:e.itemRender}))}p-1>=2*c&&3!==p&&(a[0]=m.default.cloneElement(a[0],{className:n+"-item-after-jump-prev"}),a.unshift(i)),r-p>=2*c&&p!==r-2&&(a[a.length-1]=m.default.cloneElement(a[a.length-1],{className:n+"-item-before-jump-next"}),a.push(o)),1!==E&&a.unshift(l),C!==r&&a.push(u)}var S=null;e.showTotal&&(S=m.default.createElement("li",{className:n+"-total-text"},e.showTotal(e.total,[(p-1)*h+1,p*h>e.total?e.total:p*h])));var A=!this.hasPrev(),M=!this.hasNext();return m.default.createElement("ul",{className:n+" "+e.className,style:e.style,unselectable:"unselectable",ref:this.savePaginationNode},S,m.default.createElement("li",{title:e.showTitle?t.prev_page:null,onClick:this.prev,tabIndex:A?null:0,onKeyPress:this.runIfEnterPrev,className:(A?n+"-disabled":"")+" "+n+"-prev","aria-disabled":A},e.itemRender(y,"prev",m.default.createElement("a",{className:n+"-item-link"}))),a,m.default.createElement("li",{title:e.showTitle?t.next_page:null,onClick:this.next,tabIndex:M?null:0,onKeyPress:this.runIfEnterNext,className:(M?n+"-disabled":"")+" "+n+"-next","aria-disabled":M},e.itemRender(v,"next",m.default.createElement("a",{className:n+"-item-link"}))),m.default.createElement(w.default,{locale:e.locale,rootPrefixCls:n,selectComponentClass:e.selectComponentClass,selectPrefixCls:e.selectPrefixCls,changeSize:this.props.showSizeChanger?this.changePageSize:null,current:this.state.current,pageSize:this.state.pageSize,pageSizeOptions:this.props.pageSizeOptions,quickGo:this.props.showQuickJumper?this.handleChange:null,goButton:f}))}}]),t}(m.default.Component);T.propTypes={prefixCls:g.default.string,current:g.default.number,defaultCurrent:g.default.number,total:g.default.number,pageSize:g.default.number,defaultPageSize:g.default.number,onChange:g.default.func,hideOnSinglePage:g.default.bool,showSizeChanger:g.default.bool,showLessItems:g.default.bool,onShowSizeChange:g.default.func,selectComponentClass:g.default.func,showPrevNextJumpers:g.default.bool,showQuickJumper:g.default.oneOfType([g.default.bool,g.default.object]),showTitle:g.default.bool,pageSizeOptions:g.default.arrayOf(g.default.string),showTotal:g.default.func,locale:g.default.object,style:g.default.object,itemRender:g.default.func},T.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showSizeChanger:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:k.default,style:{},itemRender:o};var S=function(){var e=this;this.savePaginationNode=function(t){e.paginationNode=t},this.calculatePage=function(t){var n=t;return"undefined"==typeof n&&(n=e.state.pageSize),Math.floor((e.props.total-1)/n)+1},this.isValid=function(t){return i(t)&&t>=1&&t!==e.state.current},this.handleKeyDown=function(e){e.keyCode!==E.default.ARROW_UP&&e.keyCode!==E.default.ARROW_DOWN||e.preventDefault()},this.handleKeyUp=function(t){var n=t.target.value,r=e.state.currentInputValue,a=void 0;a=""===n?n:isNaN(Number(n))?r:Number(n),a!==r&&e.setState({currentInputValue:a}),t.keyCode===E.default.ENTER?e.handleChange(a):t.keyCode===E.default.ARROW_UP?e.handleChange(a-1):t.keyCode===E.default.ARROW_DOWN&&e.handleChange(a+1)},this.changePageSize=function(t){var n=e.state.current,r=e.calculatePage(t);n=n>r?r:n,0===r&&(n=e.state.current),"number"==typeof t&&("pageSize"in e.props||e.setState({pageSize:t}),"current"in e.props||e.setState({current:n,currentInputValue:n})),e.props.onShowSizeChange(n,t)},this.handleChange=function(t){var n=t;if(e.isValid(n)){n>e.calculatePage()&&(n=e.calculatePage()),"current"in e.props||e.setState({current:n,currentInputValue:n});var r=e.state.pageSize;return e.props.onChange(n,r),n}return e.state.current},this.prev=function(){e.hasPrev()&&e.handleChange(e.state.current-1)},this.next=function(){e.hasNext()&&e.handleChange(e.state.current+1)},this.jumpPrev=function(){e.handleChange(e.getJumpPrevPage())},this.jumpNext=function(){e.handleChange(e.getJumpNextPage())},this.hasPrev=function(){return e.state.current>1},this.hasNext=function(){return e.state.current<e.calculatePage()},this.runIfEnter=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];"Enter"!==e.key&&13!==e.charCode||t.apply(void 0,r)},this.runIfEnterPrev=function(t){e.runIfEnter(t,e.prev)},this.runIfEnterNext=function(t){e.runIfEnter(t,e.next)},this.runIfEnterJumpPrev=function(t){e.runIfEnter(t,e.jumpPrev)},this.runIfEnterJumpNext=function(t){e.runIfEnter(t,e.jumpNext)},this.handleGoTO=function(t){t.keyCode!==E.default.ENTER&&"click"!==t.type||e.handleChange(e.state.currentInputValue)}};t.default=T,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(270);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(a).default}}),e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={items_per_page:"\u6761/\u9875",jump_to:"\u8df3\u81f3",jump_to_confirm:"\u786e\u5b9a",page:"\u9875",prev_page:"\u4e0a\u4e00\u9875",next_page:"\u4e0b\u4e00\u9875",prev_5:"\u5411\u524d 5 \u9875",next_5:"\u5411\u540e 5 \u9875",prev_3:"\u5411\u524d 3 \u9875",next_3:"\u5411\u540e 3 \u9875"},e.exports=t.default},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=t.table,r=n.props,a=r.prefixCls,i=r.scroll,l=e.columns,s=e.fixed,f=e.tableClassName,d=e.getRowKey,h=e.handleBodyScroll,y=e.handleWheel,m=e.expander,v=e.isAnyColumnsFixed,g=n.saveRef,b=n.props.useFixedHeader,x=(0,o.default)({},n.props.bodyStyle),_={};if((i.x||s)&&(x.overflowX=x.overflowX||"scroll",x.WebkitTransform="translate3d (0, 0, 0)"),i.y){s?(_.maxHeight=x.maxHeight||i.y,_.overflowY=x.overflowY||"scroll"):x.maxHeight=x.maxHeight||i.y,x.overflowY=x.overflowY||"scroll",b=!0;var w=(0,c.measureScrollbar)();w>0&&s&&(x.marginBottom="-"+w+"px",x.paddingBottom="0px")}var O=u.default.createElement(p.default,{tableClassName:f,hasHead:!b,hasBody:!0,fixed:s,columns:l,expander:m,getRowKey:d,isAnyColumnsFixed:v});if(s&&l.length){var E=void 0;return"left"===l[0].fixed||l[0].fixed===!0?E="fixedColumnsBodyLeft":"right"===l[0].fixed&&(E="fixedColumnsBodyRight"),delete x.overflowX,delete x.overflowY,u.default.createElement("div",{key:"bodyTable",className:a+"-body-outer",style:(0,o.default)({},x)},u.default.createElement("div",{className:a+"-body-inner",style:_,ref:g(E),onWheel:y,onScroll:h},O))}return u.default.createElement("div",{key:"bodyTable",className:a+"-body",style:x,ref:g("bodyTable"),onWheel:y,onScroll:h},O)}t.__esModule=!0;var i=n(6),o=r(i);t.default=a;var l=n(1),u=r(l),s=n(2),f=r(s),c=n(54),d=n(156),p=r(d);a.propTypes={fixed:f.default.oneOfType([f.default.string,f.default.bool]),columns:f.default.array.isRequired,tableClassName:f.default.string.isRequired,handleWheel:f.default.func.isRequired,handleBodyScroll:f.default.func.isRequired,getRowKey:f.default.func.isRequired,expander:f.default.object.isRequired,isAnyColumnsFixed:f.default.bool},a.contextTypes={table:f.default.any},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=t.table,r=n.props,a=r.prefixCls,i=r.expandIconAsCell,l=e.fixed,u=[];i&&"right"!==l&&u.push(o.default.createElement("col",{className:a+"-expand-icon-col",key:"rc-table-expand-icon-col"}));var s=void 0;return s="left"===l?n.columnManager.leftLeafColumns():"right"===l?n.columnManager.rightLeafColumns():n.columnManager.leafColumns(),u=u.concat(s.map(function(e){return o.default.createElement("col",{key:e.key||e.dataIndex,style:{width:e.width,minWidth:e.width}})})),o.default.createElement("colgroup",null,u)}t.__esModule=!0,t.default=a;var i=n(1),o=r(i),l=n(2),u=r(l);a.propTypes={fixed:u.default.string},a.contextTypes={table:u.default.any},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(){}t.__esModule=!0;var i=n(2),o=r(i);a.propTypes={className:o.default.string,colSpan:o.default.number,title:o.default.node,dataIndex:o.default.string,width:o.default.oneOfType([o.default.number,o.default.string]),fixed:o.default.oneOf([!0,"left","right"]),render:o.default.func,onCellClick:o.default.func,onCell:o.default.func,onHeaderCell:o.default.func},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(3),i=r(a),o=n(5),l=r(o),u=n(4),s=r(u),f=n(1),c=n(2),d=r(c),p=function(e){function t(){return(0,i.default)(this,t),(0,l.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t}(f.Component);p.propTypes={title:d.default.node},p.isTableColumnGroup=!0,t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(6),i=r(a),o=n(3),l=r(o),u=n(1),s=r(u),f=function(){function e(t,n){(0,l.default)(this,e),this._cached={},this.columns=t||this.normalize(n)}return e.prototype.isAnyColumnsFixed=function(){var e=this;return this._cache("isAnyColumnsFixed",function(){return e.columns.some(function(e){return!!e.fixed})})},e.prototype.isAnyColumnsLeftFixed=function(){var e=this;return this._cache("isAnyColumnsLeftFixed",function(){return e.columns.some(function(e){return"left"===e.fixed||e.fixed===!0})})},e.prototype.isAnyColumnsRightFixed=function(){var e=this;return this._cache("isAnyColumnsRightFixed",function(){return e.columns.some(function(e){return"right"===e.fixed})})},e.prototype.leftColumns=function(){var e=this;return this._cache("leftColumns",function(){return e.groupedColumns().filter(function(e){return"left"===e.fixed||e.fixed===!0})})},e.prototype.rightColumns=function(){var e=this;return this._cache("rightColumns",function(){return e.groupedColumns().filter(function(e){return"right"===e.fixed})})},e.prototype.leafColumns=function(){var e=this;return this._cache("leafColumns",function(){return e._leafColumns(e.columns)})},e.prototype.leftLeafColumns=function(){var e=this;return this._cache("leftLeafColumns",function(){return e._leafColumns(e.leftColumns())})},e.prototype.rightLeafColumns=function(){var e=this;return this._cache("rightLeafColumns",function(){return e._leafColumns(e.rightColumns())})},e.prototype.groupedColumns=function(){var e=this;return this._cache("groupedColumns",function(){var t=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];a[n]=a[n]||[];var o=[],l=function(e){var t=a.length-n;e&&!e.children&&t>1&&(!e.rowSpan||e.rowSpan<t)&&(e.rowSpan=t)};return t.forEach(function(u,s){var f=(0,i.default)({},u);a[n].push(f),r.colSpan=r.colSpan||0,f.children&&f.children.length>0?(f.children=e(f.children,n+1,f,a),r.colSpan+=f.colSpan):r.colSpan++;for(var c=0;c<a[n].length-1;++c)l(a[n][c]);s+1===t.length&&l(f),o.push(f)}),o};return t(e.columns)})},e.prototype.normalize=function(e){var t=this,n=[];return s.default.Children.forEach(e,function(e){if(s.default.isValidElement(e)){var r=(0,i.default)({},e.props);e.key&&(r.key=e.key),e.type.isTableColumnGroup&&(r.children=t.normalize(r.children)),n.push(r)}}),n},e.prototype.reset=function(e,t){this.columns=e||this.normalize(t),this._cached={}},e.prototype._cache=function(e,t){return e in this._cached?this._cached[e]:(this._cached[e]=t(),this._cached[e])},e.prototype._leafColumns=function(e){var t=this,n=[];return e.forEach(function(e){e.children?n.push.apply(n,t._leafColumns(e.children)):n.push(e)}),n},e}();t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(3),i=r(a),o=n(5),l=r(o),u=n(4),s=r(u),f=n(1),c=r(f),d=n(2),p=r(d),h=n(22),y=r(h),m=function(e){function t(){return(0,i.default)(this,t),(0,l.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t.prototype.shouldComponentUpdate=function(e){return!(0,y.default)(e,this.props)},t.prototype.render=function(){var e=this.props,t=e.expandable,n=e.prefixCls,r=e.onExpand,a=e.needIndentSpaced,i=e.expanded,o=e.record;if(t){var l=i?"expanded":"collapsed";return c.default.createElement("span",{className:n+"-expand-icon "+n+"-"+l,onClick:function(e){return r(o,e)}})}return a?c.default.createElement("span",{className:n+"-expand-icon "+n+"-spaced"}):null},t}(c.default.Component);m.propTypes={record:p.default.object,prefixCls:p.default.string,expandable:p.default.any,expanded:p.default.bool,needIndentSpaced:p.default.bool,onExpand:p.default.func},t.default=m,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(3),i=r(a),o=n(5),l=r(o),u=n(4),s=r(u),f=n(1),c=r(f),d=n(2),p=r(d),h=n(50),y=n(279),m=r(y),v=function(e){function t(){var n,r,a;(0,i.default)(this,t);for(var o=arguments.length,u=Array(o),s=0;s<o;s++)u[s]=arguments[s];return n=r=(0,l.default)(this,e.call.apply(e,[this].concat(u))),r.hasExpandIcon=function(e){var t=r.props.expandRowByClick;return!r.expandIconAsCell&&!t&&e===r.expandIconColumnIndex},r.handleExpandChange=function(e,t){var n=r.props,a=n.onExpandedChange,i=n.expanded,o=n.rowKey;r.expandable&&a(!i,e,t,o)},r.handleRowClick=function(e,t,n){var a=r.props,i=a.expandRowByClick,o=a.onRowClick;i&&r.handleExpandChange(e,n),o&&o(e,t,n)},r.renderExpandIcon=function(){var e=r.props,t=e.prefixCls,n=e.expanded,a=e.record,i=e.needIndentSpaced;return c.default.createElement(m.default,{expandable:r.expandable,prefixCls:t,onExpand:r.handleExpandChange,needIndentSpaced:i,expanded:n,record:a})},r.renderExpandIconCell=function(e){if(r.expandIconAsCell){var t=r.props.prefixCls;e.push(c.default.createElement("td",{className:t+"-expand-icon-cell",key:"rc-table-expand-icon-cell"},r.renderExpandIcon()))}},a=n,(0,l.default)(r,a)}return(0,s.default)(t,e),t.prototype.componentWillUnmount=function(){this.handleDestroy()},t.prototype.handleDestroy=function(){var e=this.props,t=e.onExpandedChange,n=e.rowKey,r=e.record;this.expandable&&t(!1,r,null,n,!0)},t.prototype.render=function(){var e=this.props,t=e.childrenColumnName,n=e.expandedRowRender,r=e.indentSize,a=e.record,i=e.fixed;this.expandIconAsCell="right"!==i&&this.props.expandIconAsCell,this.expandIconColumnIndex="right"!==i?this.props.expandIconColumnIndex:-1;var o=a[t];this.expandable=!(!o&&!n);var l={indentSize:r,onRowClick:this.handleRowClick,hasExpandIcon:this.hasExpandIcon,renderExpandIcon:this.renderExpandIcon,renderExpandIconCell:this.renderExpandIconCell};return this.props.children(l)},t}(c.default.Component);v.propTypes={prefixCls:p.default.string.isRequired,rowKey:p.default.oneOfType([p.default.string,p.default.number]).isRequired,fixed:p.default.oneOfType([p.default.string,p.default.bool]),record:p.default.object.isRequired,indentSize:p.default.number,needIndentSpaced:p.default.bool.isRequired,expandRowByClick:p.default.bool,expanded:p.default.bool.isRequired,expandIconAsCell:p.default.bool,expandIconColumnIndex:p.default.number,childrenColumnName:p.default.string,expandedRowRender:p.default.func,onExpandedChange:p.default.func.isRequired,onRowClick:p.default.func,children:p.default.func.isRequired},t.default=(0,h.connect)(function(e,t){var n=e.expandedRowKeys,r=t.rowKey;return{expanded:!!~n.indexOf(r)}})(v),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(6),i=r(a),o=n(3),l=r(o),u=n(5),s=r(u),f=n(4),c=r(f),d=n(1),p=r(d),h=n(2),y=r(h),m=n(50),v=n(20),g=n(157),b=r(g),x=n(54),_=function(e){function t(n){(0,l.default)(this,t);var r=(0,s.default)(this,e.call(this,n));w.call(r);var a=n.data,i=n.childrenColumnName,o=n.defaultExpandAllRows,u=n.expandedRowKeys,f=n.defaultExpandedRowKeys,c=n.getRowKey,d=[],p=[].concat(a);if(o)for(var h=0;h<p.length;h++){var y=p[h];d.push(c(y,h)),p=p.concat(y[i]||[])}else d=u||f;return r.columnManager=n.columnManager,r.store=n.store,r.store.setState({expandedRowsHeight:{},expandedRowKeys:d}),r}return(0,c.default)(t,e),t.prototype.componentDidUpdate=function(){"expandedRowKeys"in this.props&&this.store.setState({expandedRowKeys:this.props.expandedRowKeys})},t.prototype.renderExpandedRow=function(e,t,n,r,a,i,o){var l=this.props,u=l.prefixCls,s=l.expandIconAsCell,f=l.indentSize,c=void 0;c="left"===o?this.columnManager.leftLeafColumns().length:"right"===o?this.columnManager.rightLeafColumns().length:this.columnManager.leafColumns().length;var d=[{key:"extra-row",render:function(){return{props:{colSpan:c},children:"right"!==o?n(e,t,i):"&nbsp;"}}}];s&&"right"!==o&&d.unshift({key:"expand-icon-placeholder",render:function(){return null}});var h=a[a.length-1],y=h+"-extra-row",m={body:{row:"tr",cell:"td"}};return p.default.createElement(b.default,{key:y,columns:d,className:r,rowKey:y,ancestorKeys:a,prefixCls:u+"-expanded-row",indentSize:f,indent:i,fixed:o,components:m,expandedRow:!0})},t.prototype.render=function(){var e=this.props,t=e.data,n=e.childrenColumnName,r=e.children,a=t.some(function(e){return e[n]});return r({props:this.props,needIndentSpaced:a,renderRows:this.renderRows,handleExpandChange:this.handleExpandChange,renderExpandIndentCell:this.renderExpandIndentCell})},t}(p.default.Component);_.propTypes={expandIconAsCell:y.default.bool,expandedRowKeys:y.default.array,expandedRowClassName:y.default.func,defaultExpandAllRows:y.default.bool,defaultExpandedRowKeys:y.default.array,expandIconColumnIndex:y.default.number,expandedRowRender:y.default.func,childrenColumnName:y.default.string,indentSize:y.default.number,onExpand:y.default.func,onExpandedRowsChange:y.default.func,columnManager:y.default.object.isRequired,store:y.default.object.isRequired,prefixCls:y.default.string.isRequired,data:y.default.array,children:y.default.func.isRequired,getRowKey:y.default.func.isRequired},_.defaultProps={expandIconAsCell:!1,expandedRowClassName:function(){return""},expandIconColumnIndex:0,defaultExpandAllRows:!1,defaultExpandedRowKeys:[],childrenColumnName:"children",indentSize:15,onExpand:function(){},onExpandedRowsChange:function(){}};var w=function(){var e=this;this.handleExpandChange=function(t,n,r,a){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];r&&(r.preventDefault(),r.stopPropagation());var o=e.props,l=o.onExpandedRowsChange,u=o.onExpand,s=e.store.getState(),f=s.expandedRowKeys;if(t)f=[].concat(f,[a]);else{var c=f.indexOf(a);c!==-1&&(f=(0,x.remove)(f,a))}e.props.expandedRowKeys||e.store.setState({expandedRowKeys:f}),l(f),i||u(t,n)},this.renderExpandIndentCell=function(t,n){var r=e.props,a=r.prefixCls,o=r.expandIconAsCell;if(o&&"right"!==n&&t.length){var l={key:"rc-table-expand-icon-cell",className:a+"-expand-icon-th",title:"",rowSpan:t.length};t[0].unshift((0,i.default)({},l,{column:l}))}},this.renderRows=function(t,n,r,a,i,o,l,u){var s=e.props,f=s.expandedRowClassName,c=s.expandedRowRender,d=s.childrenColumnName,p=r[d],h=[].concat(u,[l]),y=i+1;c&&n.push(e.renderExpandedRow(r,a,c,f(r,a,i),h,y,o)),p&&n.push.apply(n,t(p,y,h))}};(0,v.polyfill)(_),t.default=(0,m.connect)()(_),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=t.table,r=n.props,a=r.prefixCls,i=r.scroll,l=r.showHeader,u=e.columns,f=e.fixed,d=e.tableClassName,p=e.handleBodyScrollLeft,h=e.expander,y=n.saveRef,m=n.props.useFixedHeader,v={};if(i.y){m=!0;var g=(0,s.measureScrollbar)("horizontal");g>0&&!f&&(v.marginBottom="-"+g+"px",v.paddingBottom="0px")}return m&&l?o.default.createElement("div",{key:"headTable",ref:f?null:y("headTable"),className:a+"-header",style:v,onScroll:p},o.default.createElement(c.default,{tableClassName:d,hasHead:!0,hasBody:!1,fixed:f,columns:u,expander:h})):null}t.__esModule=!0,t.default=a;var i=n(1),o=r(i),l=n(2),u=r(l),s=n(54),f=n(156),c=r(f);a.propTypes={fixed:u.default.oneOfType([u.default.string,u.default.bool]),columns:u.default.array.isRequired,tableClassName:u.default.string.isRequired,handleBodyScrollLeft:u.default.func.isRequired,expander:u.default.object.isRequired},a.contextTypes={table:u.default.any},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(6),i=r(a),o=n(3),l=r(o),u=n(5),s=r(u),f=n(4),c=r(f),d=n(1),p=r(d),h=n(2),y=r(h),m=n(22),v=r(m),g=n(176),b=r(g),x=n(50),_=n(266),w=r(_),O=n(98),E=r(O),C=n(20),k=n(54),T=n(278),S=r(T),A=n(282),M=r(A),P=n(274),N=r(P),j=n(281),R=r(j),I=function(e){function t(n){(0,l.default)(this,t);var r=(0,s.default)(this,e.call(this,n));return r.state={},r.getRowKey=function(e,t){var n=r.props.rowKey,a="function"==typeof n?n(e,t):e[n];return(0,k.warningOnce)(void 0!==a,"Each record in table should have a unique `key` prop,or set `rowKey` to an unique primary key."),void 0===a?t:a},r.handleWindowResize=function(){r.syncFixedTableRowHeight(),r.setScrollPositionClassName()},r.syncFixedTableRowHeight=function(){var e=r.tableNode.getBoundingClientRect();if(!(void 0!==e.height&&e.height<=0)){var t=r.props.prefixCls,n=r.headTable?r.headTable.querySelectorAll("thead"):r.bodyTable.querySelectorAll("thead"),a=r.bodyTable.querySelectorAll("."+t+"-row")||[],i=[].map.call(n,function(e){return e.getBoundingClientRect().height||"auto"}),o=[].map.call(a,function(e){return e.getBoundingClientRect().height||"auto"}),l=r.store.getState();(0,v.default)(l.fixedColumnsHeadRowsHeight,i)&&(0,v.default)(l.fixedColumnsBodyRowsHeight,o)||r.store.setState({fixedColumnsHeadRowsHeight:i,fixedColumnsBodyRowsHeight:o})}},r.handleBodyScrollLeft=function(e){if(e.currentTarget===e.target){var t=e.target,n=r.props.scroll,a=void 0===n?{}:n,i=r.headTable,o=r.bodyTable;t.scrollLeft!==r.lastScrollLeft&&a.x&&(t===o&&i?i.scrollLeft=t.scrollLeft:t===i&&o&&(o.scrollLeft=t.scrollLeft),r.setScrollPositionClassName()),r.lastScrollLeft=t.scrollLeft}},r.handleBodyScrollTop=function(e){var t=e.target;if(e.currentTarget===t){var n=r.props.scroll,a=void 0===n?{}:n,i=r.headTable,o=r.bodyTable,l=r.fixedColumnsBodyLeft,u=r.fixedColumnsBodyRight;if(t.scrollTop!==r.lastScrollTop&&a.y&&t!==i){var s=t.scrollTop;l&&t!==l&&(l.scrollTop=s),u&&t!==u&&(u.scrollTop=s),o&&t!==o&&(o.scrollTop=s)}r.lastScrollTop=t.scrollTop}},r.handleBodyScroll=function(e){r.handleBodyScrollLeft(e),r.handleBodyScrollTop(e)},r.handleWheel=function(e){var t=r.props.scroll,n=void 0===t?{}:t;if(window.navigator.userAgent.match(/Trident\/7\./)&&n.y){e.preventDefault();var a=e.deltaY,i=e.target,o=r.bodyTable,l=r.fixedColumnsBodyLeft,u=r.fixedColumnsBodyRight,s=0;s=r.lastScrollTop?r.lastScrollTop+a:a,l&&i!==l&&(l.scrollTop=s),u&&i!==u&&(u.scrollTop=s),o&&i!==o&&(o.scrollTop=s)}},r.saveRef=function(e){return function(t){r[e]=t}},["onRowClick","onRowDoubleClick","onRowContextMenu","onRowMouseEnter","onRowMouseLeave"].forEach(function(e){(0,k.warningOnce)(void 0===n[e],e+" is deprecated, please use onRow instead.")}),(0,k.warningOnce)(void 0===n.getBodyWrapper,"getBodyWrapper is deprecated, please use custom components instead."),r.columnManager=new S.default(n.columns,n.children),r.store=(0,x.create)({currentHoverKey:null,fixedColumnsHeadRowsHeight:[],fixedColumnsBodyRowsHeight:[]}),r.setScrollPosition("left"),r.debouncedWindowResize=(0,k.debounce)(r.handleWindowResize,150),r}return(0,c.default)(t,e),t.getDerivedStateFromProps=function(e,t){return e.columns&&e.columns!==t.columns?{columns:e.columns,children:null}:e.children!==t.children?{columns:null,children:e.children}:null},t.prototype.getChildContext=function(){return{table:{props:this.props,columnManager:this.columnManager,saveRef:this.saveRef,components:(0,w.default)({table:"table",header:{wrapper:"thead",row:"tr",cell:"th"},body:{wrapper:"tbody",row:"tr",cell:"td"}},this.props.components)}}},t.prototype.componentDidMount=function(){this.columnManager.isAnyColumnsFixed()&&(this.handleWindowResize(),this.resizeEvent=(0,b.default)(window,"resize",this.debouncedWindowResize))},t.prototype.componentDidUpdate=function(e){this.columnManager.isAnyColumnsFixed()&&(this.handleWindowResize(),this.resizeEvent||(this.resizeEvent=(0,b.default)(window,"resize",this.debouncedWindowResize))),e.data.length>0&&0===this.props.data.length&&this.hasScrollX()&&this.resetScrollX()},t.prototype.componentWillUnmount=function(){this.resizeEvent&&this.resizeEvent.remove(),this.debouncedWindowResize&&this.debouncedWindowResize.cancel()},t.prototype.setScrollPosition=function(e){if(this.scrollPosition=e,this.tableNode){var t=this.props.prefixCls;"both"===e?(0,E.default)(this.tableNode).remove(new RegExp("^"+t+"-scroll-position-.+$")).add(t+"-scroll-position-left").add(t+"-scroll-position-right"):(0,E.default)(this.tableNode).remove(new RegExp("^"+t+"-scroll-position-.+$")).add(t+"-scroll-position-"+e)}},t.prototype.setScrollPositionClassName=function(){var e=this.bodyTable,t=0===e.scrollLeft,n=e.scrollLeft+1>=e.children[0].getBoundingClientRect().width-e.getBoundingClientRect().width;t&&n?this.setScrollPosition("both"):t?this.setScrollPosition("left"):n?this.setScrollPosition("right"):"middle"!==this.scrollPosition&&this.setScrollPosition("middle")},t.prototype.resetScrollX=function(){this.headTable&&(this.headTable.scrollLeft=0),this.bodyTable&&(this.bodyTable.scrollLeft=0)},t.prototype.hasScrollX=function(){var e=this.props.scroll,t=void 0===e?{}:e;return"x"in t},t.prototype.renderMainTable=function(){var e=this.props,t=e.scroll,n=e.prefixCls,r=this.columnManager.isAnyColumnsFixed(),a=r||t.x||t.y,i=[this.renderTable({columns:this.columnManager.groupedColumns(),isAnyColumnsFixed:r}),this.renderEmptyText(),this.renderFooter()];return a?p.default.createElement("div",{className:n+"-scroll"},i):i},t.prototype.renderLeftFixedTable=function(){var e=this.props.prefixCls;return p.default.createElement("div",{className:e+"-fixed-left"},this.renderTable({columns:this.columnManager.leftColumns(),fixed:"left"}))},t.prototype.renderRightFixedTable=function(){var e=this.props.prefixCls;return p.default.createElement("div",{className:e+"-fixed-right"},this.renderTable({columns:this.columnManager.rightColumns(),fixed:"right"}))},t.prototype.renderTable=function(e){var t=e.columns,n=e.fixed,r=e.isAnyColumnsFixed,a=this.props,i=a.prefixCls,o=a.scroll,l=void 0===o?{}:o,u=l.x||n?i+"-fixed":"",s=p.default.createElement(M.default,{key:"head",columns:t,fixed:n,tableClassName:u,handleBodyScrollLeft:this.handleBodyScrollLeft,expander:this.expander}),f=p.default.createElement(N.default,{key:"body",columns:t,fixed:n,tableClassName:u,getRowKey:this.getRowKey,handleWheel:this.handleWheel,handleBodyScroll:this.handleBodyScroll,expander:this.expander, isAnyColumnsFixed:r});return[s,f]},t.prototype.renderTitle=function(){var e=this.props,t=e.title,n=e.prefixCls;return t?p.default.createElement("div",{className:n+"-title",key:"title"},t(this.props.data)):null},t.prototype.renderFooter=function(){var e=this.props,t=e.footer,n=e.prefixCls;return t?p.default.createElement("div",{className:n+"-footer",key:"footer"},t(this.props.data)):null},t.prototype.renderEmptyText=function(){var e=this.props,t=e.emptyText,n=e.prefixCls,r=e.data;if(r.length)return null;var a=n+"-placeholder";return p.default.createElement("div",{className:a,key:"emptyText"},"function"==typeof t?t():t)},t.prototype.render=function(){var e=this,t=this.props,n=t.prefixCls;this.state.columns?this.columnManager.reset(t.columns):this.state.children&&this.columnManager.reset(null,t.children);var r=t.prefixCls;t.className&&(r+=" "+t.className),(t.useFixedHeader||t.scroll&&t.scroll.y)&&(r+=" "+n+"-fixed-header"),r+="both"===this.scrollPosition?" "+n+"-scroll-position-left "+n+"-scroll-position-right":" "+n+"-scroll-position-"+this.scrollPosition;var a=this.columnManager.isAnyColumnsLeftFixed(),o=this.columnManager.isAnyColumnsRightFixed();return p.default.createElement(x.Provider,{store:this.store},p.default.createElement(R.default,(0,i.default)({},t,{columnManager:this.columnManager,getRowKey:this.getRowKey}),function(i){return e.expander=i,p.default.createElement("div",{ref:e.saveRef("tableNode"),className:r,style:t.style,id:t.id},e.renderTitle(),p.default.createElement("div",{className:n+"-content"},e.renderMainTable(),a&&e.renderLeftFixedTable(),o&&e.renderRightFixedTable()))}))},t}(p.default.Component);I.propTypes=(0,i.default)({data:y.default.array,useFixedHeader:y.default.bool,columns:y.default.array,prefixCls:y.default.string,bodyStyle:y.default.object,style:y.default.object,rowKey:y.default.oneOfType([y.default.string,y.default.func]),rowClassName:y.default.oneOfType([y.default.string,y.default.func]),onRow:y.default.func,onHeaderRow:y.default.func,onRowClick:y.default.func,onRowDoubleClick:y.default.func,onRowContextMenu:y.default.func,onRowMouseEnter:y.default.func,onRowMouseLeave:y.default.func,showHeader:y.default.bool,title:y.default.func,id:y.default.string,footer:y.default.func,emptyText:y.default.oneOfType([y.default.node,y.default.func]),scroll:y.default.object,rowRef:y.default.func,getBodyWrapper:y.default.func,children:y.default.node,components:y.default.shape({table:y.default.any,header:y.default.shape({wrapper:y.default.any,row:y.default.any,cell:y.default.any}),body:y.default.shape({wrapper:y.default.any,row:y.default.any,cell:y.default.any})})},R.default.PropTypes),I.childContextTypes={table:y.default.any,components:y.default.any},I.defaultProps={data:[],useFixedHeader:!1,rowKey:"key",rowClassName:function(){return""},onRow:function(){},onHeaderRow:function(){},prefixCls:"rc-table",bodyStyle:{},style:{},showHeader:!0,scroll:{},rowRef:function(){return null},emptyText:function(){return"No Data"}},(0,C.polyfill)(I),t.default=I,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){return e&&!h.default.isValidElement(e)&&"[object Object]"===Object.prototype.toString.call(e)}t.__esModule=!0;var i=n(6),o=r(i),l=n(3),u=r(l),s=n(5),f=r(s),c=n(4),d=r(c),p=n(1),h=r(p),y=n(2),m=r(y),v=n(152),g=r(v),b=function(e){function t(){var n,r,a;(0,u.default)(this,t);for(var i=arguments.length,o=Array(i),l=0;l<i;l++)o[l]=arguments[l];return n=r=(0,f.default)(this,e.call.apply(e,[this].concat(o))),r.handleClick=function(e){var t=r.props,n=t.record,a=t.column.onCellClick;a&&a(n,e)},a=n,(0,f.default)(r,a)}return(0,d.default)(t,e),t.prototype.render=function e(){var t=this.props,n=t.record,r=t.indentSize,i=t.prefixCls,l=t.indent,u=t.index,s=t.expandIcon,f=t.column,c=t.component,d=f.dataIndex,e=f.render,p=f.className,y=void 0===p?"":p,m=void 0;m="number"==typeof d?(0,g.default)(n,d):d&&0!==d.length?(0,g.default)(n,d):n;var v={},b=void 0,x=void 0;e&&(m=e(m,n,u),a(m)&&(v=m.props||v,b=v.colSpan,x=v.rowSpan,m=m.children)),f.onCell&&(v=(0,o.default)({},v,f.onCell(n))),a(m)&&(m=null);var _=s?h.default.createElement("span",{style:{paddingLeft:r*l+"px"},className:i+"-indent indent-level-"+l}):null;return 0===x||0===b?null:(f.align&&(v.style=(0,o.default)({},v.style,{textAlign:f.align})),h.default.createElement(c,(0,o.default)({className:y,onClick:this.handleClick},v),_,s,m))},t}(h.default.Component);b.propTypes={record:m.default.object,prefixCls:m.default.string,index:m.default.number,indent:m.default.number,indentSize:m.default.number,column:m.default.object,expandIcon:m.default.node,component:m.default.any},t.default=b,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments[2];return n=n||[],n[t]=n[t]||[],e.forEach(function(e){if(e.rowSpan&&n.length<e.rowSpan)for(;n.length<e.rowSpan;)n.push([]);var r={key:e.key,className:e.className||"",children:e.title,column:e};e.children&&a(e.children,t+1,n),"colSpan"in e&&(r.colSpan=e.colSpan),"rowSpan"in e&&(r.rowSpan=e.rowSpan),0!==r.colSpan&&n[t].push(r)}),n.filter(function(e){return e.length>0})}function i(e,t){var n=t.table,r=n.components,i=n.props,o=i.prefixCls,u=i.showHeader,s=i.onHeaderRow,f=e.expander,d=e.columns,p=e.fixed;if(!u)return null;var h=a(d);f.renderExpandIndentCell(h,p);var y=r.header.wrapper;return l.default.createElement(y,{className:o+"-thead"},h.map(function(e,t){return l.default.createElement(c.default,{key:t,index:t,fixed:p,columns:d,rows:h,row:e,components:r,onHeaderRow:s})}))}t.__esModule=!0,t.default=i;var o=n(1),l=r(o),u=n(2),s=r(u),f=n(286),c=r(f);i.propTypes={fixed:s.default.string,columns:s.default.array.isRequired,expander:s.default.object.isRequired,onHeaderRow:s.default.func},i.contextTypes={table:s.default.any},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.row,n=e.index,r=e.height,a=e.components,i=e.onHeaderRow,o=a.header.row,u=a.header.cell,f=i(t.map(function(e){return e.column}),n),d=f?f.style:{},p=(0,s.default)({height:r},d);return c.default.createElement(o,(0,s.default)({},f,{style:p}),t.map(function(e,t){var n=e.column,r=(0,l.default)(e,["column"]),a=n.onHeaderCell?n.onHeaderCell(n):{};return n.align&&(a.style=(0,s.default)({},a.style,{textAlign:n.align})),c.default.createElement(u,(0,s.default)({},r,a,{key:n.key||n.dataIndex||t}))}))}function i(e,t){var n=e.fixedColumnsHeadRowsHeight,r=t.columns,a=t.rows,i=t.fixed,o=n[0];return i&&o&&r?"auto"===o?"auto":o/a.length:null}t.__esModule=!0;var o=n(16),l=r(o),u=n(6),s=r(u),f=n(1),c=r(f),d=n(2),p=r(d),h=n(50);a.propTypes={row:p.default.array,index:p.default.number,height:p.default.oneOfType([p.default.string,p.default.number]),components:p.default.any,onHeaderRow:p.default.func},t.default=(0,h.connect)(function(e,t){return{height:i(e,t)}})(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.ColumnGroup=t.Column=void 0;var a=n(283),i=r(a),o=n(276),l=r(o),u=n(277),s=r(u);i.default.Column=l.default,i.default.ColumnGroup=s.default,t.default=i.default,t.Column=l.default,t.ColumnGroup=s.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=n(61),c=r(f),d=n(186),p=r(d),h=n(15),y=r(h),m=n(44),v=r(m),g=n(19),b=r(g),x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),w=n(1),O=r(w),E=n(2),C=r(E),k=n(17),T=r(k),S=n(66),A=r(S),M=n(133),P=r(M),N=n(103),j=r(N),R=n(23),I=r(R),D=n(89),L=r(D),B=n(13),V=r(B),F=n(12),z=n(18),W=n(25),K=(0,V.default)((s=u=function(e){function t(){var e,n,r,o;a(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={isAnimationFinished:!0},r.id=(0,z.uniqueId)("recharts-area-"),r.cachePrevData=function(e,t){r.setState({prevPoints:e,prevBaseLine:t})},r.handleAnimationEnd=function(){var e=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),(0,y.default)(e)&&e()},r.handleAnimationStart=function(){var e=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),(0,y.default)(e)&&e()},o=n,i(r,o)}return o(t,e),_(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.animationId,r=t.points,a=t.baseLine;e.animationId!==n&&this.cachePrevData(r,a)}},{key:"renderDots",value:function(){var e=this,t=this.props.isAnimationActive;if(t&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.dot,a=n.points,i=n.dataKey,o=(0,F.getPresentationAttributes)(this.props),l=(0,F.getPresentationAttributes)(r),u=(0,F.filterEventAttributes)(r),s=a.map(function(t,n){var a=x({key:"dot-"+n,r:3},o,l,u,{dataKey:i,cx:t.x,cy:t.y,index:n,value:t.value,payload:t.payload});return e.constructor.renderDotItem(r,a)});return O.default.createElement(I.default,{className:"recharts-area-dots"},s)}},{key:"renderHorizontalRect",value:function(e){var t=this.props,n=t.baseLine,r=t.points,a=t.strokeWidth,i=r[0].x,o=r[r.length-1].x,l=e*Math.abs(i-o),u=Math.max.apply(null,r.map(function(e){return e.y||0}));return(0,z.isNumber)(n)?u=Math.max(n,u):n&&(0,b.default)(n)&&n.length&&(u=Math.max(Math.max.apply(null,n.map(function(e){return e.y||0})),u)),(0,z.isNumber)(u)?O.default.createElement("rect",{x:i<o?i:i-l,y:0,width:l,height:u+(a||1)}):null}},{key:"renderVerticalRect",value:function(e){var t=this.props,n=t.baseLine,r=t.points,a=t.strokeWidth,i=r[0].y,o=r[r.length-1].y,l=e*Math.abs(i-o),u=Math.max.apply(null,r.map(function(e){return e.x||0}));return(0,z.isNumber)(n)?u=Math.max(n,u):n&&(0,b.default)(n)&&n.length&&(u=Math.max(Math.max.apply(null,n.map(function(e){return e.x||0})),u)),(0,z.isNumber)(u)?O.default.createElement("rect",{x:0,y:i<o?i:i-l,width:u+(a||1),height:l}):null}},{key:"renderClipRect",value:function(e){var t=this.props.layout;return"vertical"===t?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:"renderAreaStatically",value:function(e,t,n){var r=this.props,a=r.layout,i=r.type,o=r.stroke,l=r.connectNulls,u=r.isRange;return O.default.createElement(I.default,{clipPath:n?"url(#clipPath-"+this.id+")":null},O.default.createElement(P.default,x({},this.props,{points:e,baseLine:t,stroke:"none",className:"recharts-area-area"})),"none"!==o&&O.default.createElement(P.default,x({},(0,F.getPresentationAttributes)(this.props),{className:"recharts-area-curve",layout:a,type:i,connectNulls:l,fill:"none",points:e})),"none"!==o&&u&&O.default.createElement(P.default,x({},(0,F.getPresentationAttributes)(this.props),{className:"recharts-area-curve",layout:a,type:i,connectNulls:l,fill:"none",points:t})))}},{key:"renderAreaWithAnimation",value:function(e){var t=this,n=this.props,r=n.points,a=n.baseLine,i=n.isAnimationActive,o=n.animationBegin,l=n.animationDuration,u=n.animationEasing,s=n.animationId,f=n.id,c=this.state,d=c.prevPoints,h=c.prevBaseLine,y=(0,v.default)(f)?this.id:f;return O.default.createElement(A.default,{begin:o,duration:l,isActive:i,easing:u,from:{t:0},to:{t:1},key:"area-"+s,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(n){var i=n.t;if(d){var o=r.map(function(e,t){if(d[t]){var n=d[t],r=(0,z.interpolateNumber)(n.x,e.x),a=(0,z.interpolateNumber)(n.y,e.y);return x({},e,{x:r(i),y:a(i)})}return e}),l=void 0;if((0,z.isNumber)(a)){var u=(0,z.interpolateNumber)(h,a);l=u(i)}else if((0,v.default)(a)||(0,p.default)(a)){var s=(0,z.interpolateNumber)(h,0);l=s(i)}else l=a.map(function(e,t){if(h[t]){var n=h[t],r=(0,z.interpolateNumber)(n.x,e.x),a=(0,z.interpolateNumber)(n.y,e.y);return x({},e,{x:r(i),y:a(i)})}return e});return t.renderAreaStatically(o,l,e)}return O.default.createElement(I.default,null,O.default.createElement("defs",null,O.default.createElement("clipPath",{id:"animationClipPath-"+y},t.renderClipRect(i))),O.default.createElement(I.default,{clipPath:"url(#animationClipPath-"+y+")"},t.renderAreaStatically(r,a,e)))})}},{key:"renderArea",value:function(e){var t=this.props,n=t.points,r=t.baseLine,a=t.isAnimationActive,i=this.state,o=i.prevPoints,l=i.prevBaseLine,u=i.totalLength;return a&&n&&n.length&&(!o&&u>0||!(0,c.default)(o,n)||!(0,c.default)(l,r))?this.renderAreaWithAnimation(e):this.renderAreaStatically(n,r,e)}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.dot,r=e.points,a=e.className,i=e.top,o=e.left,l=e.xAxis,u=e.yAxis,s=e.width,f=e.height,c=e.isAnimationActive,d=e.id;if(t||!r||!r.length)return null;var p=this.state.isAnimationFinished,h=1===r.length,y=(0,T.default)("recharts-area",a),m=l&&l.allowDataOverflow||u&&u.allowDataOverflow,g=(0,v.default)(d)?this.id:d;return O.default.createElement(I.default,{className:y},m?O.default.createElement("defs",null,O.default.createElement("clipPath",{id:"clipPath-"+g},O.default.createElement("rect",{x:o,y:i,width:s,height:f}))):null,h?null:this.renderArea(m),(n||h)&&this.renderDots(),(!c||p)&&L.default.renderCallByParent(this.props,r))}}]),t}(w.Component),u.displayName="Area",u.propTypes=x({},F.PRESENTATION_ATTRIBUTES,F.EVENT_ATTRIBUTES,{className:C.default.string,dataKey:C.default.oneOfType([C.default.string,C.default.number,C.default.func]).isRequired,type:C.default.oneOfType([C.default.oneOf(["basis","basisClosed","basisOpen","linear","linearClosed","natural","monotoneX","monotoneY","monotone","step","stepBefore","stepAfter"]),C.default.func]),unit:C.default.oneOfType([C.default.string,C.default.number]),name:C.default.oneOfType([C.default.string,C.default.number]),yAxisId:C.default.oneOfType([C.default.string,C.default.number]),xAxisId:C.default.oneOfType([C.default.string,C.default.number]),yAxis:C.default.object,xAxis:C.default.object,stackId:C.default.oneOfType([C.default.number,C.default.string]),legendType:C.default.oneOf(F.LEGEND_TYPES),connectNulls:C.default.bool,activeDot:C.default.oneOfType([C.default.object,C.default.element,C.default.func,C.default.bool]),dot:C.default.oneOfType([C.default.func,C.default.element,C.default.object,C.default.bool]),label:C.default.oneOfType([C.default.func,C.default.element,C.default.object,C.default.bool]),hide:C.default.bool,layout:C.default.oneOf(["horizontal","vertical"]),baseLine:C.default.oneOfType([C.default.number,C.default.array]),isRange:C.default.bool,points:C.default.arrayOf(C.default.shape({x:C.default.number,y:C.default.number,value:C.default.oneOfType([C.default.number,C.default.array])})),onAnimationStart:C.default.func,onAnimationEnd:C.default.func,animationId:C.default.number,isAnimationActive:C.default.bool,animationBegin:C.default.number,animationDuration:C.default.number,animationEasing:C.default.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),id:C.default.string}),u.defaultProps={stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!(0,F.isSsr)(),animationBegin:0,animationDuration:1500,animationEasing:"ease"},u.getBaseValue=function(e,t,n){var r=e.layout,a=e.baseValue;if((0,z.isNumber)(a))return a;var i="horizontal"===r?n:t,o=i.scale.domain();if("number"===i.type){var l=Math.max(o[0],o[1]),u=Math.min(o[0],o[1]);return"dataMin"===a?u:"dataMax"===a?l:l<0?l:Math.max(Math.min(o[0],o[1]),0)}return"dataMin"===a?o[0]:"dataMax"===a?o[1]:o[0]},u.getComposedData=function(e){var t=e.props,n=e.xAxis,r=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.bandSize,l=e.dataKey,u=e.stackedData,s=e.dataStartIndex,f=e.displayedData,c=e.offset,d=t.layout,p=u&&u.length,h=K.getBaseValue(t,n,r),y=!1,m=f.map(function(e,t){var f=void 0;return p?f=u[s+t]:(f=(0,W.getValueByDataKey)(e,l),(0,b.default)(f)?y=!0:f=[h,f]),"horizontal"===d?{x:(0,W.getCateCoordinateOfLine)({axis:n,ticks:a,bandSize:o,entry:e,index:t}),y:(0,v.default)(f[1])?null:r.scale(f[1]),value:f,payload:e}:{x:(0,v.default)(f[1])?null:n.scale(f[1]),y:(0,W.getCateCoordinateOfLine)({axis:r,ticks:i,bandSize:o,entry:e,index:t}),value:f,payload:e}}),g=void 0;return g=p||y?m.map(function(e){return{x:"horizontal"===d?e.x:n.scale(e&&e.value[0]),y:"horizontal"===d?r.scale(e&&e.value[0]):e.y}}):"horizontal"===d?r.scale(h):n.scale(h),x({points:m,baseLine:g,layout:d,isRange:y},c)},u.renderDotItem=function(e,t){var n=void 0;return n=O.default.isValidElement(e)?O.default.cloneElement(e,t):(0,y.default)(e)?e(t):O.default.createElement(j.default,x({},t,{className:"recharts-area-dot"}))},l=s))||l;t.default=K},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u,s,f,c=n(44),d=r(c),p=n(61),h=r(p),y=n(15),m=r(y),v=n(19),g=r(v),b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=n(1),w=r(_),O=n(2),E=r(O),C=n(17),k=r(C),T=n(66),S=r(T),A=n(134),M=r(A),P=n(23),N=r(P),j=n(158),R=r(j),I=n(159),D=r(I),L=n(89),B=r(L),V=n(13),F=r(V),z=n(18),W=n(12),K=n(25),U=(0,F.default)((f=s=function(e){function t(){var e,n,r,a;i(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={isAnimationFinished:!1},r.id=(0,z.uniqueId)("recharts-bar-"),r.cachePrevData=function(e){r.setState({prevData:e})},r.handleAnimationEnd=function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd()},r.handleAnimationStart=function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart()},a=n,o(r,a)}return l(t,e),x(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.animationId,r=t.data;e.animationId!==n&&this.cachePrevData(r)}},{key:"renderRectangle",value:function(e,t){var n=void 0;return n=w.default.isValidElement(e)?w.default.cloneElement(e,t):(0,m.default)(e)?e(t):w.default.createElement(M.default,t)}},{key:"renderRectanglesStatically",value:function(e){var t=this,n=this.props.shape,r=(0,W.getPresentationAttributes)(this.props);return e&&e.map(function(e,a){var i=b({},r,e,{index:a});return w.default.createElement(N.default,b({className:"recharts-bar-rectangle"},(0,W.filterEventsOfChild)(t.props,e,a),{key:"rectangle-"+a}),t.renderRectangle(n,i))})}},{key:"renderRectanglesWithAnimation",value:function(){var e=this,t=this.props,n=t.data,r=t.layout,a=t.isAnimationActive,i=t.animationBegin,o=t.animationDuration,l=t.animationEasing,u=t.animationId,s=(t.width,this.state.prevData);return w.default.createElement(S.default,{begin:i,duration:o,isActive:a,easing:l,from:{t:0},to:{t:1},key:"bar-"+u,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var a=t.t,i=n.map(function(e,t){var n=s&&s[t];if(n){var i=(0,z.interpolateNumber)(n.x,e.x),o=(0,z.interpolateNumber)(n.y,e.y),l=(0,z.interpolateNumber)(n.width,e.width),u=(0,z.interpolateNumber)(n.height,e.height);return b({},e,{x:i(a),y:o(a),width:l(a),height:u(a)})}if("horizontal"===r){var f=(0,z.interpolateNumber)(0,e.height),c=f(a);return b({},e,{y:e.y+e.height-c,height:c})}var d=(0,z.interpolateNumber)(0,e.width),p=d(a);return b({},e,{width:p})});return w.default.createElement(N.default,null,e.renderRectanglesStatically(i))})}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return!(n&&t&&t.length)||r&&(0,h.default)(r,t)?this.renderRectanglesStatically(t):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(e){var t=this,n=this.props.data,r=(0,W.getPresentationAttributes)(this.props.background);return n.map(function(e,n){var i=(e.value,e.background),o=a(e,["value","background"]);if(!i)return null;var l=b({},o,{fill:"#eee"},i,r,(0,W.filterEventsOfChild)(t.props,e,n),{index:n,key:"background-bar-"+n,className:"recharts-bar-background-rectangle"});return t.renderRectangle(i,l)})}},{key:"renderErrorBar",value:function(){function e(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:(0,K.getValueByDataKey)(e,t)}}if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var t=this.props,n=t.data,r=t.xAxis,a=t.yAxis,i=t.layout,o=t.children,l=(0,W.findAllByType)(o,R.default);if(!l)return null;var u="vertical"===i?n[0].height/2:n[0].width/2;return l.map(function(t,o){return w.default.cloneElement(t,{key:o,data:n,xAxis:r,yAxis:a,layout:i,offset:u,dataPointFormatter:e})})}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.data,r=e.className,a=e.xAxis,i=e.yAxis,o=e.left,l=e.top,u=e.width,s=e.height,f=e.isAnimationActive,c=e.background,p=e.id;if(t||!n||!n.length)return null;var h=this.state.isAnimationFinished,y=(0,k.default)("recharts-bar",r),m=a&&a.allowDataOverflow||i&&i.allowDataOverflow,v=(0,d.default)(p)?this.id:p;return w.default.createElement(N.default,{className:y},m?w.default.createElement("defs",null,w.default.createElement("clipPath",{id:"clipPath-"+v},w.default.createElement("rect",{x:o,y:l,width:u,height:s}))):null,w.default.createElement(N.default,{className:"recharts-bar-rectangles",clipPath:m?"url(#clipPath-"+v+")":null},c?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(),(!f||h)&&B.default.renderCallByParent(this.props,n))}}]),t}(_.Component),s.displayName="Bar",s.propTypes=b({},W.PRESENTATION_ATTRIBUTES,W.EVENT_ATTRIBUTES,{className:E.default.string,layout:E.default.oneOf(["vertical","horizontal"]),xAxisId:E.default.oneOfType([E.default.number,E.default.string]),yAxisId:E.default.oneOfType([E.default.number,E.default.string]),yAxis:E.default.object,xAxis:E.default.object,stackId:E.default.oneOfType([E.default.number,E.default.string]),barSize:E.default.number,unit:E.default.oneOfType([E.default.string,E.default.number]),name:E.default.oneOfType([E.default.string,E.default.number]),dataKey:E.default.oneOfType([E.default.string,E.default.number,E.default.func]).isRequired,legendType:E.default.oneOf(W.LEGEND_TYPES),minPointSize:E.default.number,maxBarSize:E.default.number,hide:E.default.bool,shape:E.default.oneOfType([E.default.func,E.default.element]),data:E.default.arrayOf(E.default.shape({x:E.default.number,y:E.default.number,width:E.default.number,height:E.default.number,radius:E.default.oneOfType([E.default.number,E.default.array]),value:E.default.oneOfType([E.default.number,E.default.string,E.default.array])})),onAnimationStart:E.default.func,onAnimationEnd:E.default.func,animationId:E.default.number,isAnimationActive:E.default.bool,animationBegin:E.default.number,animationDuration:E.default.number,animationEasing:E.default.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),id:E.default.string}),s.defaultProps={xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",isAnimationActive:!(0,W.isSsr)(),animationBegin:0,animationDuration:400,animationEasing:"ease",onAnimationStart:function(){},onAnimationEnd:function(){}},s.getComposedData=function(e){var t=e.props,n=e.item,r=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,l=e.xAxisTicks,u=e.yAxisTicks,s=e.stackedData,f=e.dataStartIndex,c=e.displayedData,d=e.offset,p=(0,K.findPositionOfBar)(r,n);if(!p)return[];var h=t.layout,y=n.props,m=y.dataKey,v=y.children,x=y.minPointSize,_="horizontal"===h?o:i,w=s?_.scale.domain():null,O=(0,K.getBaseValueOfBar)({props:t,numericAxis:_}),E=(0,W.findAllByType)(v,D.default),C=c.map(function(e,t){var n=void 0,r=void 0,c=void 0,d=void 0,y=void 0,v=void 0;if(s?n=(0,K.truncateByDomain)(s[f+t],w):(n=(0,K.getValueByDataKey)(e,m),(0,g.default)(n)||(n=[O,n])),"horizontal"===h){if(r=(0,K.getCateCoordinateOfBar)({axis:i,ticks:l,bandSize:a,offset:p.offset,entry:e,index:t}),c=o.scale(n[1]),d=p.size,y=o.scale(n[0])-o.scale(n[1]),v={x:r,y:o.y,width:d,height:o.height},Math.abs(x)>0&&Math.abs(y)<Math.abs(x)){var _=(0,z.mathSign)(y||x)*(Math.abs(x)-Math.abs(y));c-=_,y+=_}}else if(r=i.scale(n[0]),c=(0,K.getCateCoordinateOfBar)({axis:o,ticks:u,bandSize:a,offset:p.offset,entry:e,index:t}),d=i.scale(n[1])-i.scale(n[0]),y=p.size,v={x:i.x,y:c,width:i.width,height:y},Math.abs(x)>0&&Math.abs(d)<Math.abs(x)){var C=(0,z.mathSign)(d||x)*(Math.abs(x)-Math.abs(d));d+=C}return b({},e,{x:r,y:c,width:d,height:y,value:s?n:n[1],payload:e,background:v},E&&E[t]&&E[t].props)});return b({data:C,layout:h},d)},u=f))||u;t.default=U},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s,f,c,d=n(61),p=r(d),h=n(15),y=r(h),m=n(44),v=r(m),g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),x=n(1),_=r(x),w=n(2),O=r(w),E=n(66),C=r(E),k=n(17),T=r(k),S=n(13),A=r(S),M=n(133),P=r(M),N=n(103),j=r(N),R=n(23),I=r(R),D=n(89),L=r(D),B=n(158),V=r(B),F=n(18),z=n(12),W=n(25),K=(0,A.default)((c=f=function(e){function t(){var e,n,r,a;o(this,t);for(var i=arguments.length,u=Array(i),s=0;s<i;s++)u[s]=arguments[s];return n=r=l(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={isAnimationFinished:!0,totalLength:0},r.id=(0,F.uniqueId)("recharts-line-"),r.cachePrevData=function(e){r.setState({prevPoints:e})},r.pathRef=function(e){r.mainCurve=e},r.handleAnimationEnd=function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd()},r.handleAnimationStart=function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart()},a=n,l(r,a)}return u(t,e),b(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.animationId,r=t.points;e.animationId!==n&&this.cachePrevData(r)}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}},{key:"getStrokeDasharray",value:function(e,t,n){for(var r=n.reduce(function(e,t){return e+t}),a=parseInt(e/r,10),o=e%r,l=t-e,u=[],s=0,f=0;;f+=n[s],++s)if(f+n[s]>o){u=[].concat(i(n.slice(0,s)),[o-f]);break}var c=u.length%2===0?[0,l]:[l];return[].concat(i(this.repeat(n,a)),i(u),c).map(function(e){return e+"px"}).join(", ")}},{key:"repeat",value:function(e,t){for(var n=e.length%2!==0?[].concat(i(e),[0]):e,r=[],a=0;a<t;++a)r=[].concat(i(r),i(n));return r}},{key:"renderErrorBar",value:function(){function e(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:(0,W.getValueByDataKey)(e.payload,t)}}if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var t=this.props,n=t.points,r=t.xAxis,a=t.yAxis,i=t.layout,o=t.children,l=(0,z.findAllByType)(o,V.default);return l?l.map(function(t,o){return _.default.cloneElement(t,{key:o,data:n,xAxis:r,yAxis:a,layout:i,dataPointFormatter:e})}):null}},{key:"renderDotItem",value:function(e,t){var n=void 0;if(_.default.isValidElement(e))n=_.default.cloneElement(e,t);else if((0,y.default)(e))n=e(t);else{var r=(0,T.default)("recharts-line-dot",e?e.className:"");n=_.default.createElement(j.default,g({},t,{className:r}))}return n}},{key:"renderDots",value:function(){var e=this,t=this.props.isAnimationActive;if(t&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.dot,a=n.points,i=n.dataKey,o=(0,z.getPresentationAttributes)(this.props),l=(0,z.getPresentationAttributes)(r),u=(0,z.filterEventAttributes)(r),s=a.map(function(t,n){var a=g({key:"dot-"+n,r:3},o,l,u,{value:t.value,dataKey:i,cx:t.x,cy:t.y,index:n,payload:t.payload});return e.renderDotItem(r,a)});return _.default.createElement(I.default,{className:"recharts-line-dots",key:"dots"},s)}},{key:"renderCurveStatically",value:function(e,t,n){var r=this.props,a=r.type,i=r.layout,o=r.connectNulls,l=r.id,u=(0,v.default)(l)?this.id:l,s=g({},(0,z.getPresentationAttributes)(this.props),(0,z.filterEventAttributes)(this.props),{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-"+u+")":null,points:e},n,{type:a,layout:i,connectNulls:o});return _.default.createElement(P.default,g({},s,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e){var t=this,n=this.props,r=n.points,i=n.strokeDasharray,o=n.isAnimationActive,l=n.animationBegin,u=n.animationDuration,s=n.animationEasing,f=n.animationId,c=n.width,d=n.height,p=(a(n,["points","strokeDasharray","isAnimationActive","animationBegin","animationDuration","animationEasing","animationId","width","height"]),this.state),h=p.prevPoints,y=p.totalLength;return _.default.createElement(C.default,{begin:l,duration:u,isActive:o,easing:s,from:{t:0},to:{t:1},key:"line-"+f,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(n){var a=n.t;if(h){var o=r.map(function(e,t){if(h[t]){var n=h[t],r=(0,F.interpolateNumber)(n.x,e.x),i=(0,F.interpolateNumber)(n.y,e.y);return g({},e,{x:r(a),y:i(a)})}var o=(0,F.interpolateNumber)(2*c,e.x),l=(0,F.interpolateNumber)(d/2,e.y);return g({},e,{x:o(a),y:l(a)})});return t.renderCurveStatically(o,e)}var l=(0,F.interpolateNumber)(0,y),u=l(a),s=void 0;if(i){var f=i.split(/[,\s]+/gim).map(function(e){return parseFloat(e)});s=t.getStrokeDasharray(u,y,f); }else s=u+"px "+(y-u)+"px";return t.renderCurveStatically(r,e,{strokeDasharray:s})})}},{key:"renderCurve",value:function(e){var t=this.props,n=t.points,r=t.isAnimationActive,a=this.state,i=a.prevPoints,o=a.totalLength;return r&&n&&n.length&&(!i&&o>0||!(0,p.default)(i,n))?this.renderCurveWithAnimation(e):this.renderCurveStatically(n,e)}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.dot,r=e.points,a=e.className,i=e.xAxis,o=e.yAxis,l=e.top,u=e.left,s=e.width,f=e.height,c=e.isAnimationActive,d=e.id;if(t||!r||!r.length)return null;var p=this.state.isAnimationFinished,h=1===r.length,y=(0,T.default)("recharts-line",a),m=i&&i.allowDataOverflow||o&&o.allowDataOverflow,g=(0,v.default)(d)?this.id:d;return _.default.createElement(I.default,{className:y},m?_.default.createElement("defs",null,_.default.createElement("clipPath",{id:"clipPath-"+g},_.default.createElement("rect",{x:u,y:l,width:s,height:f}))):null,!h&&this.renderCurve(m),this.renderErrorBar(),(h||n)&&this.renderDots(),(!c||p)&&L.default.renderCallByParent(this.props,r))}}]),t}(x.Component),f.displayName="Line",f.propTypes=g({},z.PRESENTATION_ATTRIBUTES,z.EVENT_ATTRIBUTES,{className:O.default.string,type:O.default.oneOfType([O.default.oneOf(["basis","basisClosed","basisOpen","linear","linearClosed","natural","monotoneX","monotoneY","monotone","step","stepBefore","stepAfter"]),O.default.func]),unit:O.default.oneOfType([O.default.string,O.default.number]),name:O.default.oneOfType([O.default.string,O.default.number]),yAxisId:O.default.oneOfType([O.default.string,O.default.number]),xAxisId:O.default.oneOfType([O.default.string,O.default.number]),yAxis:O.default.object,xAxis:O.default.object,legendType:O.default.oneOf(z.LEGEND_TYPES),layout:O.default.oneOf(["horizontal","vertical"]),connectNulls:O.default.bool,hide:O.default.bool,activeDot:O.default.oneOfType([O.default.object,O.default.element,O.default.func,O.default.bool]),dot:O.default.oneOfType([O.default.object,O.default.element,O.default.func,O.default.bool]),top:O.default.number,left:O.default.number,width:O.default.number,height:O.default.number,points:O.default.arrayOf(O.default.shape({x:O.default.number,y:O.default.number,value:O.default.value})),onAnimationStart:O.default.func,onAnimationEnd:O.default.func,isAnimationActive:O.default.bool,animationBegin:O.default.number,animationDuration:O.default.number,animationEasing:O.default.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),animationId:O.default.number,id:O.default.string}),f.defaultProps={xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!(0,z.isSsr)(),animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,onAnimationStart:function(){},onAnimationEnd:function(){}},f.getComposedData=function(e){var t=e.props,n=e.xAxis,r=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,l=e.bandSize,u=e.displayedData,s=e.offset,f=t.layout,c=u.map(function(e,t){var u=(0,W.getValueByDataKey)(e,o);return"horizontal"===f?{x:(0,W.getCateCoordinateOfLine)({axis:n,ticks:a,bandSize:l,entry:e,index:t}),y:(0,v.default)(u)?null:r.scale(u),value:u,payload:e}:{x:(0,v.default)(u)?null:n.scale(u),y:(0,W.getCateCoordinateOfLine)({axis:r,ticks:i,bandSize:l,entry:e,index:t}),value:u,payload:e}});return g({points:c,layout:f},s)},s=c))||s;t.default=K},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=n(61),c=r(f),d=n(15),p=r(d),h=n(44),y=r(h),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=n(1),b=r(g),x=n(2),_=r(x),w=n(66),O=r(w),E=n(17),C=r(E),k=n(13),T=r(k),S=n(23),A=r(S),M=n(89),P=r(M),N=n(12),j=n(194),R=r(j),I=n(133),D=r(I),L=n(295),B=r(L),V=n(158),F=r(V),z=n(159),W=r(z),K=n(18),U=n(25),G=(0,T.default)((s=u=function(e){function t(){var e,n,r,o;a(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={isAnimationFinished:!1},r.cachePrevPoints=function(e){r.setState({prevPoints:e})},r.handleAnimationEnd=function(){r.setState({isAnimationFinished:!0})},r.handleAnimationStart=function(){r.setState({isAnimationFinished:!1})},r.id=(0,K.uniqueId)("recharts-scatter-"),o=n,i(r,o)}return o(t,e),v(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.animationId,r=t.points;e.animationId!==n&&this.cachePrevPoints(r)}},{key:"renderSymbolItem",value:function(e,t){var n=void 0;return n=b.default.isValidElement(e)?b.default.cloneElement(e,t):(0,p.default)(e)?e(t):b.default.createElement(B.default,m({},t,{type:e}))}},{key:"renderSymbolsStatically",value:function(e){var t=this,n=this.props,r=n.shape,a=n.activeShape,i=n.activeIndex,o=(0,N.getPresentationAttributes)(this.props);return e.map(function(e,n){var l=m({key:"symbol-"+n},o,e);return b.default.createElement(A.default,m({className:"recharts-scatter-symbol"},(0,N.filterEventsOfChild)(t.props,e,n),{key:"symbol-"+n}),t.renderSymbolItem(i===n?a:r,l))})}},{key:"renderSymbolsWithAnimation",value:function(){var e=this,t=this.props,n=t.points,r=t.isAnimationActive,a=t.animationBegin,i=t.animationDuration,o=t.animationEasing,l=t.animationId,u=this.state.prevPoints;return b.default.createElement(O.default,{begin:a,duration:i,isActive:r,easing:o,from:{t:0},to:{t:1},key:"pie-"+l,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var r=t.t,a=n.map(function(e,t){var n=u&&u[t];if(n){var a=(0,K.interpolateNumber)(n.cx,e.cx),i=(0,K.interpolateNumber)(n.cy,e.cy),o=(0,K.interpolateNumber)(n.size,e.size);return m({},e,{cx:a(r),cy:i(r),size:o(r)})}var l=(0,K.interpolateNumber)(0,e.size);return m({},e,{size:l(r)})});return b.default.createElement(A.default,null,e.renderSymbolsStatically(a))})}},{key:"renderSymbols",value:function(){var e=this.props,t=e.points,n=e.isAnimationActive,r=this.state.prevPoints;return!(n&&t&&t.length)||r&&(0,c.default)(r,t)?this.renderSymbolsStatically(t):this.renderSymbolsWithAnimation()}},{key:"renderErrorBar",value:function(){function e(e,t){return{x:e.cx,y:e.cy,value:e.y,errorVal:(0,U.getValueByDataKey)(e,t)}}function t(e,t){return{x:e.cx,y:e.cy,value:e.x,errorVal:(0,U.getValueByDataKey)(e,t)}}var n=this.props.isAnimationActive;if(n&&!this.state.isAnimationFinished)return null;var r=this.props,a=r.points,i=r.xAxis,o=r.yAxis,l=r.children,u=(0,N.findAllByType)(l,F.default);return u?u.map(function(n,r){var l=n.props.direction;return b.default.cloneElement(n,{key:r,data:a,xAxis:i,yAxis:o,layout:"x"===l?"vertical":"horizontal",dataPointFormatter:"x"===l?t:e})}):null}},{key:"renderLine",value:function(){var e=this.props,t=e.points,n=e.line,r=e.lineType,a=e.lineJointType,i=(0,N.getPresentationAttributes)(this.props),o=(0,N.getPresentationAttributes)(n),l=void 0,u=void 0;if("joint"===r)l=t.map(function(e){return{x:e.cx,y:e.cy}});else if("fitting"===r){var s=(0,K.getLinearRegression)(t),f=s.xmin,c=s.xmax,d=s.a,h=s.b,y=function(e){return d*e+h};l=[{x:f,y:y(f)},{x:c,y:y(c)}]}var v=m({},i,{fill:"none",stroke:i&&i.fill},o,{points:l});return u=b.default.isValidElement(n)?b.default.cloneElement(n,v):(0,p.default)(n)?n(v):b.default.createElement(D.default,m({},v,{type:a})),b.default.createElement(A.default,{className:"recharts-scatter-line",key:"recharts-scatter-line"},u)}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.points,r=e.line,a=e.className,i=e.xAxis,o=e.yAxis,l=e.left,u=e.top,s=e.width,f=e.height,c=e.id;if(t||!n||!n.length)return null;var d=this.state,p=d.isAnimationActive,h=d.isAnimationFinished,m=(0,C.default)("recharts-scatter",a),v=i&&i.allowDataOverflow||o&&o.allowDataOverflow,g=(0,y.default)(c)?this.id:c;return b.default.createElement(A.default,{className:m,clipPath:v?"url(#clipPath-"+g+")":null},v?b.default.createElement("defs",null,b.default.createElement("clipPath",{id:"clipPath-"+g},b.default.createElement("rect",{x:l,y:u,width:s,height:f}))):null,r&&this.renderLine(),this.renderErrorBar(),b.default.createElement(A.default,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!p||h)&&P.default.renderCallByParent(this.props,n))}}]),t}(g.Component),u.displayName="Scatter",u.propTypes=m({},N.EVENT_ATTRIBUTES,N.PRESENTATION_ATTRIBUTES,{xAxisId:_.default.oneOfType([_.default.string,_.default.number]),yAxisId:_.default.oneOfType([_.default.string,_.default.number]),zAxisId:_.default.oneOfType([_.default.string,_.default.number]),line:_.default.oneOfType([_.default.bool,_.default.object,_.default.func,_.default.element]),lineType:_.default.oneOf(["fitting","joint"]),lineJointType:_.default.oneOfType([_.default.oneOf(["basis","basisClosed","basisOpen","linear","linearClosed","natural","monotoneX","monotoneY","monotone","step","stepBefore","stepAfter"]),_.default.func]),legendType:_.default.oneOf(N.LEGEND_TYPES),className:_.default.string,name:_.default.oneOfType([_.default.string,_.default.number]),activeIndex:_.default.number,activeShape:_.default.oneOfType([_.default.object,_.default.func,_.default.element]),shape:_.default.oneOfType([_.default.oneOf(["circle","cross","diamond","square","star","triangle","wye"]),_.default.element,_.default.func]),points:_.default.arrayOf(_.default.shape({cx:_.default.number,cy:_.default.number,size:_.default.number,node:_.default.shape({x:_.default.oneOfType([_.default.number,_.default.string]),y:_.default.oneOfType([_.default.number,_.default.string]),z:_.default.oneOfType([_.default.number,_.default.string])}),payload:_.default.any})),hide:_.default.bool,isAnimationActive:_.default.bool,animationId:_.default.number,animationBegin:_.default.number,animationDuration:_.default.number,animationEasing:_.default.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"])}),u.defaultProps={xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!(0,N.isSsr)(),animationBegin:0,animationDuration:400,animationEasing:"linear"},u.getComposedData=function(e){var t=e.xAxis,n=e.yAxis,r=e.zAxis,a=e.item,i=e.displayedData,o=e.onItemMouseLeave,l=e.onItemMouseEnter,u=e.offset,s=e.xAxisTicks,f=(0,N.findAllByType)(a.props.children,W.default),c=(0,y.default)(t.dataKey)?a.props.dataKey:t.dataKey,d=(0,y.default)(n.dataKey)?a.props.dataKey:n.dataKey,p=r&&r.dataKey,h=r?r.range:R.default.defaultProps.range,v=h&&h[0],g=t.scale.bandwidth?t.scale.bandwidth():0,b=n.scale.bandwidth?n.scale.bandwidth():0,x=i.map(function(e,a){var i=e[c],o=e[d],l=!(0,y.default)(p)&&e[p]||"-",u=[{name:t.name||t.dataKey,unit:t.unit||"",value:i,payload:e},{name:n.name||n.dataKey,unit:n.unit||"",value:o,payload:e}];"-"!==l&&u.push({name:r.name||r.dataKey,unit:r.unit||"",value:l,payload:e});var h=(0,U.getCateCoordinateOfLine)({axis:t,ticks:s,bandSize:g,entry:e,index:a}),x=(0,U.getCateCoordinateOfLine)({axis:n,ticks:s,bandSize:b,entry:e,index:a}),_="-"!==l?r.scale(l):v,w=Math.sqrt(Math.max(_,0)/Math.PI);return m({},e,{cx:h,cy:x,x:h-w,y:x-w,xAxis:t,yAxis:n,zAxis:r,width:2*w,height:2*w,size:_,node:{x:i,y:o,z:l},tooltipPayload:u,tooltipPosition:{x:h,y:x},payload:e},f&&f[a]&&f[a].props)});return m({onMouseLeave:o,onMouseEnter:l,points:x},u)},l=s))||l;t.default=G},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=n(15),c=r(f),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=n(1),y=r(h),m=n(2),v=r(m),g=n(13),b=r(g),x=n(544),_=r(x),w=n(18),O=n(12),E=function(e,t){return y.default.isValidElement(e)?y.default.cloneElement(e,t):(0,c.default)(e)?e(t):y.default.createElement(_.default,t)},C=1,k=O.LEGEND_TYPES.filter(function(e){return"none"!==e}),T=(0,b.default)((s=u=function(e){function t(){var e,n,r,o;a(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={boxWidth:-1,boxHeight:-1},o=n,i(r,o)}return o(t,e),p(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){var e=this.state,t=e.boxWidth,n=e.boxHeight;return t>=0&&n>=0?{width:t,height:n}:null}},{key:"getDefaultPosition",value:function(e){var t=this.props,n=t.layout,r=t.align,a=t.verticalAlign,i=t.margin,o=t.chartWidth,l=t.chartHeight,u=void 0,s=void 0;if(!e||(void 0===e.left||null===e.left)&&(void 0===e.right||null===e.right))if("center"===r&&"vertical"===n){var f=this.getBBox()||{width:0};u={left:((o||0)-f.width)/2}}else u="right"===r?{right:i&&i.right||0}:{left:i&&i.left||0};if(!e||(void 0===e.top||null===e.top)&&(void 0===e.bottom||null===e.bottom))if("middle"===a){var c=this.getBBox()||{height:0};s={top:((l||0)-c.height)/2}}else s="bottom"===a?{bottom:i&&i.bottom||0}:{top:i&&i.top||0};return d({},u,s)}},{key:"updateBBox",value:function(){var e=this.state,t=e.boxWidth,n=e.boxHeight,r=this.props.onBBoxUpdate;if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var a=this.wrapperNode.getBoundingClientRect();(Math.abs(a.width-t)>C||Math.abs(a.height-n)>C)&&this.setState({boxWidth:a.width,boxHeight:a.height},function(){r&&r(a)})}else t===-1&&n===-1||this.setState({boxWidth:-1,boxHeight:-1},function(){r&&r(null)})}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,r=t.width,a=t.height,i=t.wrapperStyle,o=d({position:"absolute",width:r||"auto",height:a||"auto"},this.getDefaultPosition(i),i);return y.default.createElement("div",{className:"recharts-legend-wrapper",style:o,ref:function(t){e.wrapperNode=t}},E(n,this.props))}}],[{key:"getWithHeight",value:function(e,t){var n=e.props.layout;return"vertical"===n&&(0,w.isNumber)(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}]),t}(h.Component),u.displayName="Legend",u.propTypes={content:v.default.oneOfType([v.default.element,v.default.func]),wrapperStyle:v.default.object,chartWidth:v.default.number,chartHeight:v.default.number,width:v.default.number,height:v.default.number,iconSize:v.default.number,iconType:v.default.oneOf(k),layout:v.default.oneOf(["horizontal","vertical"]),align:v.default.oneOf(["center","left","right"]),verticalAlign:v.default.oneOf(["top","bottom","middle"]),margin:v.default.shape({top:v.default.number,left:v.default.number,bottom:v.default.number,right:v.default.number}),payload:v.default.arrayOf(v.default.shape({value:v.default.any,id:v.default.any,type:v.default.oneOf(O.LEGEND_TYPES)})),formatter:v.default.func,onMouseEnter:v.default.func,onMouseLeave:v.default.func,onClick:v.default.func,onBBoxUpdate:v.default.func},u.defaultProps={iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"},l=s))||l;t.default=T},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ComposedChart=t.RadialBarChart=t.AreaChart=t.ScatterChart=t.RadarChart=t.Sankey=t.Treemap=t.PieChart=t.BarChart=t.LineChart=t.ErrorBar=t.ZAxis=t.YAxis=t.XAxis=t.Scatter=t.Bar=t.Area=t.Line=t.CartesianGrid=t.CartesianAxis=t.ReferenceArea=t.ReferenceDot=t.ReferenceLine=t.Brush=t.RadialBar=t.Radar=t.Pie=t.PolarAngleAxis=t.PolarRadiusAxis=t.PolarGrid=t.Symbols=t.Cross=t.Dot=t.Polygon=t.Rectangle=t.Curve=t.Sector=t.LabelList=t.Label=t.Text=t.Cell=t.ResponsiveContainer=t.Tooltip=t.Legend=t.Layer=t.Surface=void 0,n(548);var a=n(160),i=r(a),o=n(23),l=r(o),u=n(292),s=r(u),f=n(195),c=r(f),d=n(546),p=r(d),h=n(159),y=r(h),m=n(102),v=r(m),g=n(88),b=r(g),x=n(89),_=r(x),w=n(198),O=r(w),E=n(133),C=r(E),k=n(134),T=r(k),S=n(294),A=r(S),M=n(103),P=r(M),N=n(400),j=r(N),R=n(295),I=r(R),D=n(547),L=r(D),B=n(197),V=r(B),F=n(196),z=r(F),W=n(397),K=r(W),U=n(398),G=r(U),H=n(399),q=r(H),Y=n(392),X=r(Y),J=n(396),$=r(J),Z=n(395),Q=r(Z),ee=n(394),te=r(ee),ne=n(393),re=r(ne),ae=n(533),ie=r(ae),oe=n(290),le=r(oe),ue=n(288),se=r(ue),fe=n(289),ce=r(fe),de=n(291),pe=r(de),he=n(131),ye=r(he),me=n(132),ve=r(me),ge=n(194),be=r(ge),xe=n(158),_e=r(xe),we=n(537),Oe=r(we),Ee=n(535),Ce=r(Ee),ke=n(538),Te=r(ke),Se=n(543),Ae=r(Se),Me=n(541),Pe=r(Me),Ne=n(539),je=r(Ne),Re=n(542),Ie=r(Re),De=n(534),Le=r(De),Be=n(540),Ve=r(Be),Fe=n(536),ze=r(Fe);t.Surface=i.default,t.Layer=l.default,t.Legend=s.default,t.Tooltip=c.default,t.ResponsiveContainer=p.default,t.Cell=y.default,t.Text=v.default,t.Label=b.default,t.LabelList=_.default,t.Sector=O.default,t.Curve=C.default,t.Rectangle=T.default,t.Polygon=A.default,t.Dot=P.default,t.Cross=j.default,t.Symbols=I.default,t.PolarGrid=L.default,t.PolarRadiusAxis=V.default,t.PolarAngleAxis=z.default,t.Pie=K.default,t.Radar=G.default,t.RadialBar=q.default,t.Brush=X.default,t.ReferenceLine=$.default,t.ReferenceDot=Q.default,t.ReferenceArea=te.default,t.CartesianAxis=re.default,t.CartesianGrid=ie.default,t.Line=le.default,t.Area=se.default,t.Bar=ce.default,t.Scatter=pe.default,t.XAxis=ye.default,t.YAxis=ve.default,t.ZAxis=be.default,t.ErrorBar=_e.default,t.LineChart=Oe.default,t.BarChart=Ce.default,t.PieChart=Te.default,t.Treemap=Ae.default,t.Sankey=Pe.default,t.RadarChart=je.default,t.ScatterChart=Ie.default,t.AreaChart=Le.default,t.RadialBarChart=Ve.default,t.ComposedChart=ze.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(1),p=r(d),h=n(2),y=r(h),m=n(17),v=r(m),g=n(13),b=r(g),x=n(12),_=function(e){return e.reduce(function(e,t){return t.x===+t.x&&t.y===+t.y&&e.push([t.x,t.y]),e},[]).join(" ")},w=(0,b.default)((s=u=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=e.points,n=e.className;if(!t||!t.length)return null;var r=(0,v.default)("recharts-polygon",n);return p.default.createElement("polygon",f({},(0,x.getPresentationAttributes)(this.props),(0,x.filterEventAttributes)(this.props),{className:r,points:_(t)}))}}]),t}(d.Component),u.displayName="Polygon",u.propTypes=f({},x.PRESENTATION_ATTRIBUTES,{className:y.default.string,points:y.default.arrayOf(y.default.shape({x:y.default.number,y:y.default.number}))}),l=s))||l;t.default=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(1),p=r(d),h=n(2),y=r(h),m=n(214),v=n(17),g=r(v),b=n(13),x=r(b),_=n(12),w={symbolCircle:m.symbolCircle,symbolCross:m.symbolCross,symbolDiamond:m.symbolDiamond,symbolSquare:m.symbolSquare,symbolStar:m.symbolStar,symbolTriangle:m.symbolTriangle,symbolWye:m.symbolWye},O=Math.PI/180,E=function(e){var t="symbol"+e.slice(0,1).toUpperCase()+e.slice(1);return w[t]||m.symbolCircle},C=function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*O;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},k=(0,x.default)((s=u=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.props,t=e.size,n=e.sizeType,r=e.type,a=E(r),i=(0,m.symbol)().type(a).size(C(t,n,r));return i()}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.cx,r=e.cy,a=e.size;return n===+n&&r===+r&&a===+a?p.default.createElement("path",f({},(0,_.getPresentationAttributes)(this.props),(0,_.filterEventAttributes)(this.props),{className:(0,g.default)("recharts-symbols",t),transform:"translate("+n+", "+r+")",d:this.getPath()})):null}}]),t}(d.Component),u.displayName="Symbols",u.propTypes=f({},_.PRESENTATION_ATTRIBUTES,{className:y.default.string,type:y.default.oneOf(["circle","cross","diamond","square","star","triangle","wye"]),cx:y.default.number,cy:y.default.number,size:y.default.number,sizeType:y.default.oneOf(["area","diameter"])}),u.defaultProps={type:"circle",size:64,sizeType:"area"},l=s))||l;t.default=k},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){return c.indexOf(e)>=0&&t===+t?t+"px":t}function i(e){var t=e.split(""),n=t.reduce(function(e,t){return t===t.toUpperCase()?[].concat(r(e),["-",t.toLowerCase()]):[].concat(r(e),[t])},[]);return n.join("")}Object.defineProperty(t,"__esModule",{value:!0}),t.calculateChartCoordinate=t.getOffset=t.getStringSize=t.getStyleString=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(12),u={widthCache:{},cacheCount:0},s=2e3,f={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},c=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","lineHeight","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],d="recharts_measurement_span",p=t.getStyleString=function(e){return Object.keys(e).reduce(function(t,n){return""+t+i(n)+":"+a(n,e[n])+";"},"")};t.getStringSize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0===e||null===e||(0,l.isSsr)())return{width:0,height:0};var n=""+e,r=p(t),a=n+"-"+r;if(u.widthCache[a])return u.widthCache[a];try{var i=document.getElementById(d);i||(i=document.createElement("span"),i.setAttribute("id",d),document.body.appendChild(i));var c=o({},f,t);Object.keys(c).map(function(e){return i.style[e]=c[e],e}),i.textContent=n;var h=i.getBoundingClientRect(),y={width:h.width,height:h.height};return u.widthCache[a]=y,++u.cacheCount>s&&(u.cacheCount=0,u.widthCache={}),y}catch(e){return{width:0,height:0}}},t.getOffset=function(e){var t=e.ownerDocument.documentElement,n={top:0,left:0};return"undefined"!=typeof e.getBoundingClientRect&&(n=e.getBoundingClientRect()),{top:n.top+window.pageYOffset-t.clientTop,left:n.left+window.pageXOffset-t.clientLeft}},t.calculateChartCoordinate=function(e,t){return{chartX:Math.round(e.pageX-t.left),chartY:Math.round(e.pageY-t.top)}}},function(e,t){var n=e.exports={version:"2.5.1"};"number"==typeof __e&&(__e=n)},[1908,199],303,436,function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},,,,,,,,,,,,,function(e,t,n){!function(e,n){n(t)}(this,function(e){"use strict";function t(){}function n(e,n){var r=new t;if(e instanceof t)e.each(function(e,t){r.set(t,e)});else if(Array.isArray(e)){var a,i=-1,o=e.length;if(null==n)for(;++i<o;)r.set(i,e[i]);else for(;++i<o;)r.set(n(a=e[i],i,e),a)}else if(e)for(var l in e)r.set(l,e[l]);return r}function r(){return{}}function a(e,t,n){e[t]=n}function i(){return n()}function o(e,t,n){e.set(t,n)}function l(){}function u(e,t){var n=new l;if(e instanceof l)e.each(function(e){n.add(e)});else if(e){var r=-1,a=e.length;if(null==t)for(;++r<a;)n.add(e[r]);else for(;++r<a;)n.add(t(e[r],r,e))}return n}var s="$";t.prototype=n.prototype={constructor:t,has:function(e){return s+e in this},get:function(e){return this[s+e]},set:function(e,t){return this[s+e]=t,this},remove:function(e){var t=s+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===s&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===s&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===s&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===s&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===s&&++e;return e},empty:function(){for(var e in this)if(e[0]===s)return!1;return!0},each:function(e){for(var t in this)t[0]===s&&e(this[t],t.slice(1),this)}};var f=function(){function e(t,r,a,i){if(r>=f.length)return null!=l&&t.sort(l),null!=u?u(t):t;for(var o,s,c,d=-1,p=t.length,h=f[r++],y=n(),m=a();++d<p;)(c=y.get(o=h(s=t[d])+""))?c.push(s):y.set(o,[s]);return y.each(function(t,n){i(m,n,e(t,r,a,i))}),m}function t(e,n){if(++n>f.length)return e;var r,a=c[n-1];return null!=u&&n>=f.length?r=e.entries():(r=[],e.each(function(e,a){r.push({key:a,values:t(e,n)})})),null!=a?r.sort(function(e,t){return a(e.key,t.key)}):r}var l,u,s,f=[],c=[];return s={object:function(t){return e(t,0,r,a)},map:function(t){return e(t,0,i,o)},entries:function(n){return t(e(n,0,i,o),0)},key:function(e){return f.push(e),s},sortKeys:function(e){return c[f.length-1]=e,s},sortValues:function(e){return l=e,s},rollup:function(e){return u=e,s}}},c=n.prototype;l.prototype=u.prototype={constructor:l,has:c.has,add:function(e){return e+="",this[s+e]=e,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};var d=function(e){var t=[];for(var n in e)t.push(n);return t},p=function(e){var t=[];for(var n in e)t.push(e[n]);return t},h=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t};e.nest=f,e.set=u,e.map=n,e.keys=d,e.values=p,e.entries=h,Object.defineProperty(e,"__esModule",{value:!0})})},,,function(e,t,n){var r=n(99),a=n(29),i=r(a,"DataView");e.exports=i},function(e,t,n){var r=n(99),a=n(29),i=r(a,"Promise");e.exports=i},function(e,t,n){var r=n(99),a=n(29),i=r(a,"WeakMap");e.exports=i},function(e,t,n){function r(e){if(!a(e))return i(e);var t=[];for(var n in Object(e))l.call(e,n)&&"constructor"!=n&&t.push(n);return t}var a=n(77),i=n(325),o=Object.prototype,l=o.hasOwnProperty;e.exports=r},function(e,t,n){var r=n(318),a=n(167),i=n(319),o=n(224),l=n(320),u=n(90),s=n(441),f="[object Map]",c="[object Object]",d="[object Promise]",p="[object Set]",h="[object WeakMap]",y="[object DataView]",m=s(r),v=s(a),g=s(i),b=s(o),x=s(l),_=u;(r&&_(new r(new ArrayBuffer(1)))!=y||a&&_(new a)!=f||i&&_(i.resolve())!=d||o&&_(new o)!=p||l&&_(new l)!=h)&&(_=function(e){var t=u(e),n=t==c?e.constructor:void 0,r=n?s(n):"";if(r)switch(r){case m:return y;case v:return f;case g:return d;case b:return p;case x:return h}return t}),e.exports=_},,function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}e.exports=n},function(e,t,n){var r=n(440),a=r(Object.keys,Object);e.exports=a},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(341),i=r(a);t.default=i.default,e.exports=t.default},[1970,344],,,,,,function(e,t,n){function r(e,t){var n=null==e?0:e.length;return!!n&&a(e,t,0)>-1}var a=n(358);e.exports=r},function(e,t){function n(e,t,n){for(var r=-1,a=null==e?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1}e.exports=n},,,,,,function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=a(i),l=n(9),u=a(l),s=n(3),f=a(s),c=n(8),d=a(c),p=n(5),h=a(p),y=n(4),m=a(y),v=n(2),g=a(v),b=n(1),x=r(b),_=n(14),w=a(_),O=n(385),E=n(7),C=a(E),k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]]);return n},T={normal:"#108ee9",exception:"#ff5500",success:"#87d068"},S=function(e){return!e||e<0?0:e>100?100:e},A=function(e){function t(){return(0,f.default)(this,t),(0,h.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,r=t.className,a=t.percent,i=void 0===a?0:a,l=t.status,s=t.format,f=t.trailColor,c=t.size,d=t.successPercent,p=t.type,h=t.strokeWidth,y=t.width,m=t.showInfo,v=t.gapDegree,g=void 0===v?0:v,b=t.gapPosition,_=k(t,["prefixCls","className","percent","status","format","trailColor","size","successPercent","type","strokeWidth","width","showInfo","gapDegree","gapPosition"]),E=parseInt(d?d.toString():i.toString(),10)>=100&&!("status"in t)?"success":l||"normal",A=void 0,M=void 0,P=s||function(e){ return e+"%"};if(m){var N=void 0,j="circle"===p||"dashboard"===p?"":"-circle";s||"exception"!==E&&"success"!==E?N=P(S(i),S(d)):"exception"===E?N=x.createElement(w.default,{type:"cross"+j}):"success"===E&&(N=x.createElement(w.default,{type:"check"+j})),A=x.createElement("span",{className:n+"-text"},N)}if("line"===p){var R={width:S(i)+"%",height:h||("small"===c?6:8)},I={width:S(d)+"%",height:h||("small"===c?6:8)},D=void 0!==d?x.createElement("div",{className:n+"-success-bg",style:I}):null;M=x.createElement("div",null,x.createElement("div",{className:n+"-outer"},x.createElement("div",{className:n+"-inner"},x.createElement("div",{className:n+"-bg",style:R}),D)),A)}else if("circle"===p||"dashboard"===p){var L=y||120,B={width:L,height:L,fontSize:.15*L+6},V=h||6,F=b||"dashboard"===p&&"bottom"||"top",z=g||"dashboard"===p&&75;M=x.createElement("div",{className:n+"-inner",style:B},x.createElement(O.Circle,{percent:S(i),strokeWidth:V,trailWidth:V,strokeColor:T[E],trailColor:f,prefixCls:n,gapDegree:z,gapPosition:F}),A)}var W=(0,C.default)(n,(e={},(0,u.default)(e,n+"-"+("dashboard"===p&&"circle"||p),!0),(0,u.default)(e,n+"-status-"+E,!0),(0,u.default)(e,n+"-show-info",m),(0,u.default)(e,n+"-"+c,c),e),r);return x.createElement("div",(0,o.default)({},_,{className:W}),M)}}]),t}(x.Component);t.default=A,A.defaultProps={type:"line",percent:0,showInfo:!0,trailColor:"#f3f3f3",prefixCls:"ant-progress",size:"default"},A.propTypes={status:g.default.oneOf(["normal","exception","active","success"]),type:g.default.oneOf(["line","circle","dashboard"]),showInfo:g.default.bool,percent:g.default.number,width:g.default.number,strokeWidth:g.default.number,trailColor:g.default.string,format:g.default.func,gapDegree:g.default.number,default:g.default.oneOf(["default","small"])},e.exports=t.default},,,11,,function(e,t,n){!function(e,n){n(t)}(this,function(e){"use strict";function t(e){return new n(e)}function n(e){if(!(t=u.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function r(t){return f=v(t),e.format=f.format,e.formatPrefix=f.formatPrefix,f}var a=function(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]},i=function(e){return e=a(Math.abs(e)),e?e[1]:NaN},o=function(e,t){return function(n,r){for(var a=n.length,i=[],o=0,l=e[0],u=0;a>0&&l>0&&(u+l+1>r&&(l=Math.max(1,r-u)),i.push(n.substring(a-=l,a+l)),!((u+=l+1)>r));)l=e[o=(o+1)%e.length];return i.reverse().join(t)}},l=function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}},u=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;t.prototype=n.prototype,n.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var s,f,c=function(e){e:for(var t,n=e.length,r=1,a=-1;r<n;++r)switch(e[r]){case".":a=t=r;break;case"0":0===a&&(a=r),t=r;break;default:if(a>0){if(!+e[r])break e;a=0}}return a>0?e.slice(0,a)+e.slice(t+1):e},d=function(e,t){var n=a(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(s=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,l=r.length;return o===l?r:o>l?r+new Array(o-l+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+a(e,Math.max(0,t+o-1))[0]},p=function(e,t){var n=a(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},h={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return p(100*e,t)},r:p,s:d,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},y=function(e){return e},m=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"],v=function(e){function n(e){function n(e){var t,n,l,u=w,p=O;if("c"===_)p=E(e)+p,e="";else{e=+e;var h=e<0;if(e=E(Math.abs(e),b),x&&(e=c(e)),h&&0===+e&&(h=!1),u=(h?"("===o?o:"-":"-"===o||"("===o?"":o)+u,p=("s"===_?m[8+s/3]:"")+p+(h&&"("===o?")":""),C)for(t=-1,n=e.length;++t<n;)if(l=e.charCodeAt(t),48>l||l>57){p=(46===l?f+e.slice(t+1):e.slice(t))+p,e=e.slice(0,t);break}}g&&!y&&(e=a(e,1/0));var k=u.length+e.length+p.length,T=k<v?new Array(v-k+1).join(r):"";switch(g&&y&&(e=a(T+e,T.length?v-p.length:1/0),T=""),i){case"<":e=u+e+p+T;break;case"=":e=u+T+e+p;break;case"^":e=T.slice(0,k=T.length>>1)+u+e+p+T.slice(k);break;default:e=T+u+e+p}return d(e)}e=t(e);var r=e.fill,i=e.align,o=e.sign,l=e.symbol,y=e.zero,v=e.width,g=e.comma,b=e.precision,x=e.trim,_=e.type;"n"===_?(g=!0,_="g"):h[_]||(null==b&&(b=12),x=!0,_="g"),(y||"0"===r&&"="===i)&&(y=!0,r="0",i="=");var w="$"===l?u[0]:"#"===l&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",O="$"===l?u[1]:/[%p]/.test(_)?p:"",E=h[_],C=/[defgprs%]/.test(_);return b=null==b?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),n.toString=function(){return e+""},n}function r(e,r){var a=n((e=t(e),e.type="f",e)),o=3*Math.max(-8,Math.min(8,Math.floor(i(r)/3))),l=Math.pow(10,-o),u=m[8+o/3];return function(e){return a(l*e)+u}}var a=e.grouping&&e.thousands?o(e.grouping,e.thousands):y,u=e.currency,f=e.decimal,d=e.numerals?l(e.numerals):y,p=e.percent||"%";return{format:n,formatPrefix:r}};r({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var g=function(e){return Math.max(0,-i(Math.abs(e)))},b=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(i(t)/3)))-i(Math.abs(e)))},x=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,i(t)-i(e))+1};e.formatDefaultLocale=r,e.formatLocale=v,e.formatSpecifier=t,e.precisionFixed=g,e.precisionPrefix=b,e.precisionRound=x,Object.defineProperty(e,"__esModule",{value:!0})})},function(e,t,n){!function(e,n){n(t)}(this,function(e){"use strict";function t(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function n(){return new t}var r=Math.PI,a=2*r,i=1e-6,o=a-i;t.prototype=n.prototype={constructor:t,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,a,i){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+i)},arcTo:function(e,t,n,a,o){e=+e,t=+t,n=+n,a=+a,o=+o;var l=this._x1,u=this._y1,s=n-e,f=a-t,c=l-e,d=u-t,p=c*c+d*d;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(p>i)if(Math.abs(d*s-f*c)>i&&o){var h=n-l,y=a-u,m=s*s+f*f,v=h*h+y*y,g=Math.sqrt(m),b=Math.sqrt(p),x=o*Math.tan((r-Math.acos((m+p-v)/(2*g*b)))/2),_=x/b,w=x/g;Math.abs(_-1)>i&&(this._+="L"+(e+_*c)+","+(t+_*d)),this._+="A"+o+","+o+",0,0,"+ +(d*h>c*y)+","+(this._x1=e+w*s)+","+(this._y1=t+w*f)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,l,u,s){e=+e,t=+t,n=+n;var f=n*Math.cos(l),c=n*Math.sin(l),d=e+f,p=t+c,h=1^s,y=s?l-u:u-l;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+d+","+p:(Math.abs(this._x1-d)>i||Math.abs(this._y1-p)>i)&&(this._+="L"+d+","+p),n&&(y<0&&(y=y%a+a),y>o?this._+="A"+n+","+n+",0,1,"+h+","+(e-f)+","+(t-c)+"A"+n+","+n+",0,1,"+h+","+(this._x1=d)+","+(this._y1=p):y>i&&(this._+="A"+n+","+n+",0,"+ +(y>=r)+","+h+","+(this._x1=e+n*Math.cos(u))+","+(this._y1=t+n*Math.sin(u))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}},e.path=n,Object.defineProperty(e,"__esModule",{value:!0})})},,function(e,t,n){!function(e,r){r(t,n(247))}(this,function(e,t){"use strict";function n(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function r(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function a(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}function i(e){function i(e,t){return function(n){var r,a,i,o=[],l=-1,u=0,s=e.length;for(n instanceof Date||(n=new Date(+n));++l<s;)37===e.charCodeAt(l)&&(o.push(e.slice(u,l)),null!=(a=me[r=e.charAt(++l)])?r=e.charAt(++l):a="e"===r?" ":"0",(i=t[r])&&(r=i(n,a)),o.push(r),u=l+1);return o.push(e.slice(u,l)),o.join("")}}function o(e,n){return function(i){var o,u,s=a(1900),f=l(s,e,i+="",0);if(f!=i.length)return null;if("Q"in s)return new Date(s.Q);if("p"in s&&(s.H=s.H%12+12*s.p),"V"in s){if(s.V<1||s.V>53)return null;"w"in s||(s.w=1),"Z"in s?(o=r(a(s.y)),u=o.getUTCDay(),o=u>4||0===u?t.utcMonday.ceil(o):t.utcMonday(o),o=t.utcDay.offset(o,7*(s.V-1)),s.y=o.getUTCFullYear(),s.m=o.getUTCMonth(),s.d=o.getUTCDate()+(s.w+6)%7):(o=n(a(s.y)),u=o.getDay(),o=u>4||0===u?t.timeMonday.ceil(o):t.timeMonday(o),o=t.timeDay.offset(o,7*(s.V-1)),s.y=o.getFullYear(),s.m=o.getMonth(),s.d=o.getDate()+(s.w+6)%7)}else("W"in s||"U"in s)&&("w"in s||(s.w="u"in s?s.u%7:"W"in s?1:0),u="Z"in s?r(a(s.y)).getUTCDay():n(a(s.y)).getDay(),s.m=0,s.d="W"in s?(s.w+6)%7+7*s.W-(u+5)%7:s.w+7*s.U-(u+6)%7);return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,r(s)):n(s)}}function l(e,t,n,r){for(var a,i,o=0,l=t.length,u=n.length;o<l;){if(r>=u)return-1;if(a=t.charCodeAt(o++),37===a){if(a=t.charAt(o++),i=$e[a in me?t.charAt(o++):a],!i||(r=i(e,n,r))<0)return-1}else if(a!=n.charCodeAt(r++))return-1}return r}function de(e,t,n){var r=Ve.exec(t.slice(n));return r?(e.p=Fe[r[0].toLowerCase()],n+r[0].length):-1}function pe(e,t,n){var r=Ke.exec(t.slice(n));return r?(e.w=Ue[r[0].toLowerCase()],n+r[0].length):-1}function he(e,t,n){var r=ze.exec(t.slice(n));return r?(e.w=We[r[0].toLowerCase()],n+r[0].length):-1}function ye(e,t,n){var r=qe.exec(t.slice(n));return r?(e.m=Ye[r[0].toLowerCase()],n+r[0].length):-1}function ve(e,t,n){var r=Ge.exec(t.slice(n));return r?(e.m=He[r[0].toLowerCase()],n+r[0].length):-1}function ge(e,t,n){return l(e,Pe,t,n)}function be(e,t,n){return l(e,Ne,t,n)}function xe(e,t,n){return l(e,je,t,n)}function _e(e){return De[e.getDay()]}function we(e){return Ie[e.getDay()]}function Oe(e){return Be[e.getMonth()]}function Ee(e){return Le[e.getMonth()]}function Ce(e){return Re[+(e.getHours()>=12)]}function ke(e){return De[e.getUTCDay()]}function Te(e){return Ie[e.getUTCDay()]}function Se(e){return Be[e.getUTCMonth()]}function Ae(e){return Le[e.getUTCMonth()]}function Me(e){return Re[+(e.getUTCHours()>=12)]}var Pe=e.dateTime,Ne=e.date,je=e.time,Re=e.periods,Ie=e.days,De=e.shortDays,Le=e.months,Be=e.shortMonths,Ve=u(Re),Fe=s(Re),ze=u(Ie),We=s(Ie),Ke=u(De),Ue=s(De),Ge=u(Le),He=s(Le),qe=u(Be),Ye=s(Be),Xe={a:_e,A:we,b:Oe,B:Ee,c:null,d:A,e:A,f:R,H:M,I:P,j:N,L:j,m:I,M:D,p:Ce,Q:fe,s:ce,S:L,u:B,U:V,V:F,w:z,W:W,x:null,X:null,y:K,Y:U,Z:G,"%":se},Je={a:ke,A:Te,b:Se,B:Ae,c:null,d:H,e:H,f:$,H:q,I:Y,j:X,L:J,m:Z,M:Q,p:Me,Q:fe,s:ce,S:ee,u:te,U:ne,V:re,w:ae,W:ie,x:null,X:null,y:oe,Y:le,Z:ue,"%":se},$e={a:pe,A:he,b:ye,B:ve,c:ge,d:b,e:b,f:C,H:_,I:_,j:x,L:E,m:g,M:w,p:de,Q:T,s:S,S:O,u:c,U:d,V:p,w:f,W:h,x:be,X:xe,y:m,Y:y,Z:v,"%":k};return Xe.x=i(Ne,Xe),Xe.X=i(je,Xe),Xe.c=i(Pe,Xe),Je.x=i(Ne,Je),Je.X=i(je,Je),Je.c=i(Pe,Je),{format:function(e){var t=i(e+="",Xe);return t.toString=function(){return e},t},parse:function(e){var t=o(e+="",n);return t.toString=function(){return e},t},utcFormat:function(e){var t=i(e+="",Je);return t.toString=function(){return e},t},utcParse:function(e){var t=o(e,r);return t.toString=function(){return e},t}}}function o(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function l(e){return e.replace(be,"\\$&")}function u(e){return new RegExp("^(?:"+e.map(l).join("|")+")","i")}function s(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function f(e,t,n){var r=ve.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function c(e,t,n){var r=ve.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function d(e,t,n){var r=ve.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function p(e,t,n){var r=ve.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function h(e,t,n){var r=ve.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function y(e,t,n){var r=ve.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function m(e,t,n){var r=ve.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function v(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function g(e,t,n){var r=ve.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function b(e,t,n){var r=ve.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function x(e,t,n){var r=ve.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function _(e,t,n){var r=ve.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function w(e,t,n){var r=ve.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function O(e,t,n){var r=ve.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function E(e,t,n){var r=ve.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function C(e,t,n){var r=ve.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function k(e,t,n){var r=ge.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function T(e,t,n){var r=ve.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function S(e,t,n){var r=ve.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function A(e,t){return o(e.getDate(),t,2)}function M(e,t){return o(e.getHours(),t,2)}function P(e,t){return o(e.getHours()%12||12,t,2)}function N(e,n){return o(1+t.timeDay.count(t.timeYear(e),e),n,3)}function j(e,t){return o(e.getMilliseconds(),t,3)}function R(e,t){return j(e,t)+"000"}function I(e,t){return o(e.getMonth()+1,t,2)}function D(e,t){return o(e.getMinutes(),t,2)}function L(e,t){return o(e.getSeconds(),t,2)}function B(e){var t=e.getDay();return 0===t?7:t}function V(e,n){return o(t.timeSunday.count(t.timeYear(e),e),n,2)}function F(e,n){var r=e.getDay();return e=r>=4||0===r?t.timeThursday(e):t.timeThursday.ceil(e),o(t.timeThursday.count(t.timeYear(e),e)+(4===t.timeYear(e).getDay()),n,2)}function z(e){return e.getDay()}function W(e,n){return o(t.timeMonday.count(t.timeYear(e),e),n,2)}function K(e,t){return o(e.getFullYear()%100,t,2)}function U(e,t){return o(e.getFullYear()%1e4,t,4)}function G(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+o(t/60|0,"0",2)+o(t%60,"0",2)}function H(e,t){return o(e.getUTCDate(),t,2)}function q(e,t){return o(e.getUTCHours(),t,2)}function Y(e,t){return o(e.getUTCHours()%12||12,t,2)}function X(e,n){return o(1+t.utcDay.count(t.utcYear(e),e),n,3)}function J(e,t){return o(e.getUTCMilliseconds(),t,3)}function $(e,t){return J(e,t)+"000"}function Z(e,t){return o(e.getUTCMonth()+1,t,2)}function Q(e,t){return o(e.getUTCMinutes(),t,2)}function ee(e,t){return o(e.getUTCSeconds(),t,2)}function te(e){var t=e.getUTCDay();return 0===t?7:t}function ne(e,n){return o(t.utcSunday.count(t.utcYear(e),e),n,2)}function re(e,n){var r=e.getUTCDay();return e=r>=4||0===r?t.utcThursday(e):t.utcThursday.ceil(e),o(t.utcThursday.count(t.utcYear(e),e)+(4===t.utcYear(e).getUTCDay()),n,2)}function ae(e){return e.getUTCDay()}function ie(e,n){return o(t.utcMonday.count(t.utcYear(e),e),n,2)}function oe(e,t){return o(e.getUTCFullYear()%100,t,2)}function le(e,t){return o(e.getUTCFullYear()%1e4,t,4)}function ue(){return"+0000"}function se(){return"%"}function fe(e){return+e}function ce(e){return Math.floor(+e/1e3)}function de(t){return ye=i(t),e.timeFormat=ye.format,e.timeParse=ye.parse,e.utcFormat=ye.utcFormat,e.utcParse=ye.utcParse,ye}function pe(e){return e.toISOString()}function he(e){var t=new Date(e);return isNaN(t)?null:t}var ye,me={"-":"",_:" ",0:"0"},ve=/^\s*\d+/,ge=/^%/,be=/[\\^$*+?|[\]().{}]/g;de({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var xe="%Y-%m-%dT%H:%M:%S.%LZ",_e=Date.prototype.toISOString?pe:e.utcFormat(xe),we=+new Date("2000-01-01T00:00:00.000Z")?he:e.utcParse(xe);e.timeFormatDefaultLocale=de,e.timeFormatLocale=i,e.isoFormat=_e,e.isoParse=we,Object.defineProperty(e,"__esModule",{value:!0})})},,function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}e.exports=n},function(e,t,n){var r=n(480),a=n(490),i=a(r);e.exports=i},function(e,t){function n(e,t,n,r){for(var a=e.length,i=n+(r?1:-1);r?i--:++i<a;)if(t(e[i],i,e))return i;return-1}e.exports=n},function(e,t,n){function r(e,t,n,o,l){var u=-1,s=e.length;for(n||(n=i),l||(l=[]);++u<s;){var f=e[u];t>0&&n(f)?t>1?r(f,t-1,n,o,l):a(l,f):o||(l[l.length]=f)}return l}var a=n(251),i=n(493);e.exports=r},function(e,t,n){function r(e,t,n){var r=t(e);return i(e)?r:a(r,n(e))}var a=n(251),i=n(19);e.exports=r},function(e,t){function n(e,t){return e>t}e.exports=n},function(e,t){function n(e,t){return null!=e&&t in Object(e)}e.exports=n},function(e,t,n){function r(e,t,n){return t===t?o(e,t,n):a(e,i,n)}var a=n(353),i=n(361),o=n(375);e.exports=r},function(e,t,n){function r(e,t,n,r,m,g){var b=s(e),x=s(t),_=b?h:u(e),w=x?h:u(t);_=_==p?y:_,w=w==p?y:w;var O=_==y,E=w==y,C=_==w;if(C&&f(e)){if(!f(t))return!1;b=!0,O=!1}if(C&&!O)return g||(g=new a),b||c(e)?i(e,t,n,r,m,g):o(e,t,_,n,r,m,g);if(!(n&d)){var k=O&&v.call(e,"__wrapped__"),T=E&&v.call(t,"__wrapped__");if(k||T){var S=k?e.value():e,A=T?t.value():t;return g||(g=new a),m(S,A,n,r,g)}}return!!C&&(g||(g=new a),l(e,t,n,r,m,g))}var a=n(95),i=n(217),o=n(368),l=n(369),u=n(322),s=n(19),f=n(68),c=n(69),d=1,p="[object Arguments]",h="[object Array]",y="[object Object]",m=Object.prototype,v=m.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t,n,r){var u=n.length,s=u,f=!r;if(null==e)return!s;for(e=Object(e);u--;){var c=n[u];if(f&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++u<s;){c=n[u];var d=c[0],p=e[d],h=c[1];if(f&&c[2]){if(void 0===p&&!(d in e))return!1}else{var y=new a;if(r)var m=r(p,h,d,e,t,y);if(!(void 0===m?i(h,p,o|l,r,y):m))return!1}}return!0}var a=n(95),i=n(169),o=1,l=2;e.exports=r},function(e,t){function n(e){return e!==e}e.exports=n},function(e,t){function n(e,t){return e<t}e.exports=n},function(e,t,n){function r(e,t){var n=-1,r=i(e)?Array(e.length):[];return a(e,function(e,a,i){r[++n]=t(e,a,i)}),r}var a=n(352),i=n(38);e.exports=r},function(e,t,n){function r(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||a(n,e,t)}}var a=n(360),i=n(371),o=n(219);e.exports=r},function(e,t,n){function r(e,t){return l(e)&&u(t)?s(f(e),t):function(n){var r=i(n,e);return void 0===r&&r===t?o(n,e):a(t,r,c|d)}}var a=n(169),i=n(152),o=n(376),l=n(323),u=n(218),s=n(219),f=n(264),c=1,d=2;e.exports=r},function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}e.exports=n},function(e,t,n){function r(e){return function(t){return a(t,e)}}var a=n(481);e.exports=r},function(e,t,n){function r(e,t,n,r,a,O,C){switch(n){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!O(new i(e),new i(t)));case d:case p:case m:return o(+e,+t);case h:return e.name==t.name&&e.message==t.message;case v:case b:return e==t+"";case y:var k=u;case g:var T=r&f;if(k||(k=s),e.size!=t.size&&!T)return!1;var S=C.get(e);if(S)return S==t;r|=c,C.set(e,t);var A=l(k(e),k(t),r,a,O,C);return C.delete(e),A;case x:if(E)return E.call(e)==E.call(t)}return!1}var a=n(310),i=n(135),o=n(128),l=n(217),u=n(324),s=n(185),f=1,c=2,d="[object Boolean]",p="[object Date]",h="[object Error]",y="[object Map]",m="[object Number]",v="[object RegExp]",g="[object Set]",b="[object String]",x="[object Symbol]",_="[object ArrayBuffer]",w="[object DataView]",O=a?a.prototype:void 0,E=O?O.valueOf:void 0;e.exports=r},function(e,t,n){function r(e,t,n,r,o,u){var s=n&i,f=a(e),c=f.length,d=a(t),p=d.length;if(c!=p&&!s)return!1;for(var h=c;h--;){var y=f[h];if(!(s?y in t:l.call(t,y)))return!1}var m=u.get(e);if(m&&u.get(t))return m==t;var v=!0;u.set(e,t),u.set(t,e);for(var g=s;++h<c;){y=f[h];var b=e[y],x=t[y];if(r)var _=s?r(x,b,y,t,e,u):r(b,x,y,e,t,u);if(!(void 0===_?b===x||o(b,x,n,r,u):_)){v=!1;break}g||(g="constructor"==y)}if(v&&!g){var w=e.constructor,O=t.constructor;w!=O&&"constructor"in e&&"constructor"in t&&!("function"==typeof w&&w instanceof w&&"function"==typeof O&&O instanceof O)&&(v=!1)}return u.delete(e),u.delete(t),v}var a=n(370),i=1,o=Object.prototype,l=o.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){return a(e,o,i)}var a=n(355),i=n(372),o=n(153);e.exports=r},function(e,t,n){function r(e){for(var t=i(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,a(o)]}return t}var a=n(218),i=n(153);e.exports=r},function(e,t,n){var r=n(250),a=n(382),i=Object.prototype,o=i.propertyIsEnumerable,l=Object.getOwnPropertySymbols,u=l?function(e){return null==e?[]:(e=Object(e),r(l(e),function(t){return o.call(e,t)}))}:a;e.exports=u},function(e,t){function n(e){return this.__data__.set(e,r),this}var r="__lodash_hash_undefined__";e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t){function n(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}e.exports=n},function(e,t,n){function r(e,t){return null!=e&&i(e,t,a)}var a=n(357),i=n(492);e.exports=r},function(e,t,n){function r(e,t){return e&&e.length?a(e,o(t,2),i):void 0}var a=n(184),i=n(356),o=n(96);e.exports=r},function(e,t,n){function r(e){return e&&e.length?a(e,o,i):void 0}var a=n(184),i=n(362),o=n(49);e.exports=r},function(e,t,n){function r(e){return o(e)?a(l(e)):i(e)}var a=n(366),i=n(367),o=n(323),l=n(264);e.exports=r},function(e,t,n){var r=n(491),a=r();e.exports=a},function(e,t,n){var r=n(354),a=n(483),i=n(136),o=n(137),l=i(function(e,t){if(null==e)return[];var n=t.length;return n>1&&o(e,t[0],t[1])?t=[]:n>2&&o(t[0],t[1],t[2])&&(t=[t[0]]),a(e,r(t,1),[])});e.exports=l},function(e,t){function n(){return[]}e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(6),i=r(a),o=n(16),l=r(o),u=n(3),s=r(u),f=n(5),c=r(f),d=n(4),p=r(d),h=n(1),y=r(h),m=n(2),v=r(m),g=n(221),b=r(g),x=n(222),_=function(e){function t(){return(0,s.default)(this,t),(0,c.default)(this,e.apply(this,arguments))}return(0,p.default)(t,e),t.prototype.getPathStyles=function(){var e=this.props,t=e.percent,n=e.strokeWidth,r=e.gapDegree,a=void 0===r?0:r,i=e.gapPosition,o=50-n/2,l=0,u=-o,s=0,f=-2*o;switch(i){case"left":l=-o,u=0,s=2*o,f=0;break;case"right":l=o,u=0,s=-2*o,f=0;break;case"bottom":u=o,f=2*o}var c="M 50,50 m "+l+","+u+"\n a "+o+","+o+" 0 1 1 "+s+","+-f+"\n a "+o+","+o+" 0 1 1 "+-s+","+f,d=2*Math.PI*o,p={strokeDasharray:d-a+"px "+d+"px",strokeDashoffset:"-"+a/2+"px",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"},h={strokeDasharray:t/100*(d-a)+"px "+d+"px",strokeDashoffset:"-"+a/2+"px",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:c,trailPathStyle:p,strokePathStyle:h}},t.prototype.render=function(){var e=this,t=this.props,n=t.prefixCls,r=t.strokeWidth,a=t.trailWidth,o=t.strokeColor,u=(t.percent,t.trailColor),s=t.strokeLinecap,f=t.style,c=t.className,d=(0,l.default)(t,["prefixCls","strokeWidth","trailWidth","strokeColor","percent","trailColor","strokeLinecap","style","className"]),p=this.getPathStyles(),h=p.pathString,m=p.trailPathStyle,v=p.strokePathStyle;return delete d.percent,delete d.gapDegree,delete d.gapPosition,y.default.createElement("svg",(0,i.default)({className:n+"-circle "+c,viewBox:"0 0 100 100",style:f},d),y.default.createElement("path",{className:n+"-circle-trail",d:h,stroke:u,strokeWidth:a||r,fillOpacity:"0",style:m}),y.default.createElement("path",{className:n+"-circle-path",d:h,strokeLinecap:s,stroke:o,strokeWidth:0===this.props.percent?0:r,fillOpacity:"0",ref:function(t){e.path=t},style:v}))},t}(h.Component);_.propTypes=(0,i.default)({},x.propTypes,{gapPosition:v.default.oneOf(["top","bottom","left","right"])}),_.defaultProps=(0,i.default)({},x.defaultProps,{gapPosition:"top"}),t.default=(0,b.default)(_),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(6),i=r(a),o=n(16),l=r(o),u=n(3),s=r(u),f=n(5),c=r(f),d=n(4),p=r(d),h=n(1),y=r(h),m=n(221),v=r(m),g=n(222),b=function(e){function t(){return(0,s.default)(this,t),(0,c.default)(this,e.apply(this,arguments))}return(0,p.default)(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.percent,a=t.prefixCls,o=t.strokeColor,u=t.strokeLinecap,s=t.strokeWidth,f=t.style,c=t.trailColor,d=t.trailWidth,p=(0,l.default)(t,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth"]);delete p.gapPosition;var h={strokeDasharray:"100px, 100px",strokeDashoffset:100-r+"px",transition:"stroke-dashoffset 0.3s ease 0s, stroke 0.3s linear"},m=s/2,v=100-s/2,g="M "+("round"===u?m:0)+","+m+"\n L "+("round"===u?v:100)+","+m,b="0 0 100 "+s;return y.default.createElement("svg",(0,i.default)({className:a+"-line "+n,viewBox:b,preserveAspectRatio:"none",style:f},p),y.default.createElement("path",{className:a+"-line-trail",d:g,strokeLinecap:u,stroke:c,strokeWidth:d||s,fillOpacity:"0"}),y.default.createElement("path",{className:a+"-line-path",d:g,strokeLinecap:u,stroke:o,strokeWidth:s,fillOpacity:"0",ref:function(t){e.path=t},style:h}))},t}(h.Component);b.propTypes=g.propTypes,b.defaultProps=g.defaultProps,t.default=(0,v.default)(b),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.Circle=t.Line=void 0;var a=n(384),i=r(a),o=n(383),l=r(o);t.Line=i.default,t.Circle=l.default,t.default={Line:i.default,Circle:l.default}},,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var f,c,d,p=n(61),h=r(p),y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=n(1),g=r(v),b=n(2),x=r(b),_=n(522),w=r(_),O=n(523),E=r(O),C=n(390),k=n(524),T=r(k),S=n(193),A=(0,E.default)((d=c=function(e){function t(e,n){l(this,t);var r=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),a=r.props,i=a.isActive,s=a.attributeName,f=a.from,c=a.to,d=a.steps,p=a.children;if(r.handleStyleChange=r.handleStyleChange.bind(r),r.changeStyle=r.changeStyle.bind(r),!i)return r.state={style:{}},"function"==typeof p&&(r.state={style:c}),u(r);if(d&&d.length)r.state={style:d[0].style};else if(f){if("function"==typeof p)return r.state={style:f},u(r);r.state={style:s?o({},s,f):f}}else r.state={style:{}};return r}return s(t,e),m(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,t&&n&&this.runAnimation(this.props)}},{key:"componentWillReceiveProps",value:function(e){var t=e.isActive,n=e.canBegin,r=e.attributeName,a=e.shouldReAnimate;if(n){if(!t)return void this.setState({style:r?o({},r,e.to):e.to});if(!((0,h.default)(this.props.to,e.to)&&this.props.canBegin&&this.props.isActive)){var i=!this.props.canBegin||!this.props.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var l=i||a?e.from:this.props.to;this.setState({style:r?o({},r,l):l}),this.runAnimation(y({},e,{from:l,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1,this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation()}},{key:"runJSAnimation",value:function(e){var t=this,n=e.from,r=e.to,a=e.duration,i=e.easing,o=e.begin,l=e.onAnimationEnd,u=e.onAnimationStart,s=(0,T.default)(n,r,(0,C.configEasing)(i),a,this.changeStyle),f=function(){t.stopJSAnimation=s()};this.manager.start([u,o,f,a,l])}},{key:"runStepAnimation",value:function(e){var t=this,n=e.steps,r=e.begin,a=e.onAnimationStart,o=n[0],l=o.style,u=o.duration,s=void 0===u?0:u,f=function(e,r,a){if(0===a)return e;var o=r.duration,l=r.easing,u=void 0===l?"ease":l,s=r.style,f=r.properties,c=r.onAnimationEnd,d=a>0?n[a-1]:r,p=f||Object.keys(s);if("function"==typeof u||"spring"===u)return[].concat(i(e),[t.runJSAnimation.bind(t,{from:d.style,to:s,duration:o,easing:u}),o]);var h=(0,S.getTransitionVal)(p,o,u),m=y({},d.style,s,{transition:h});return[].concat(i(e),[m,o,c]).filter(S.identity)};return this.manager.start([a].concat(i(n.reduce(f,[l,Math.max(s,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){this.manager||(this.manager=(0,w.default)());var t=e.begin,n=e.duration,r=e.attributeName,a=(e.from,e.to),i=e.easing,l=e.onAnimationStart,u=e.onAnimationEnd,s=e.steps,f=e.children,c=this.manager;if(this.unSubscribe=c.subscribe(this.handleStyleChange),"function"==typeof i||"function"==typeof f||"spring"===i)return void this.runJSAnimation(e);if(s.length>1)return void this.runStepAnimation(e);var d=r?o({},r,a):a,p=(0,S.getTransitionVal)(Object.keys(d),n,i);c.start([l,t,y({},d,{transition:p}),n,u])}},{key:"handleStyleChange",value:function(e){this.changeStyle(e)}},{key:"changeStyle",value:function(e){this.mounted&&this.setState({style:e})}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.begin,e.duration,e.attributeName,e.easing,e.isActive),r=(e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart,a(e,["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"])),i=v.Children.count(t),o=(0,S.translateStyle)(this.state.style);if("function"==typeof t)return t(o);if(!n||0===i)return t;var l=function(e){var t=e.props,n=t.style,a=void 0===n?{}:n,i=t.className,l=(0,v.cloneElement)(e,y({},r,{style:y({},a,o),className:i}));return l; };if(1===i){v.Children.only(t);return l(v.Children.only(t))}return g.default.createElement("div",null,v.Children.map(t,function(e){return l(e)}))}}]),t}(v.Component),c.displayName="Animate",c.propTypes={from:x.default.oneOfType([x.default.object,x.default.string]),to:x.default.oneOfType([x.default.object,x.default.string]),attributeName:x.default.string,duration:x.default.number,begin:x.default.number,easing:x.default.oneOfType([x.default.string,x.default.func]),steps:x.default.arrayOf(x.default.shape({duration:x.default.number.isRequired,style:x.default.object.isRequired,easing:x.default.oneOfType([x.default.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),x.default.func]),properties:x.default.arrayOf("string"),onAnimationEnd:x.default.func})),children:x.default.oneOfType([x.default.node,x.default.func]),isActive:x.default.bool,canBegin:x.default.bool,onAnimationEnd:x.default.func,shouldReAnimate:x.default.bool,onAnimationStart:x.default.func,onAnimationReStart:x.default.func},c.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},f=d))||f;t.default=A},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.configEasing=t.configSpring=t.configBezier=void 0;var a=n(193),i=1e-4,o=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},l=function(e,t){return e.map(function(e,n){return e*Math.pow(t,n)}).reduce(function(e,t){return e+t})},u=function(e,t){return function(n){var r=o(e,t);return l(r,n)}},s=function(e,t){return function(n){var a=o(e,t),i=[].concat(r(a.map(function(e,t){return e*t}).slice(1)),[0]);return l(i,n)}},f=t.configBezier=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],l=t[2],f=t[3];if(1===t.length)switch(t[0]){case"linear":r=0,o=0,l=1,f=1;break;case"ease":r=.25,o=.1,l=.25,f=1;break;case"ease-in":r=.42,o=0,l=1,f=1;break;case"ease-out":r=.42,o=0,l=.58,f=1;break;case"ease-in-out":r=0,o=0,l=.58,f=1;break;default:(0,a.warn)(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', instead received %s",t)}(0,a.warn)([r,l,o,f].every(function(e){return"number"==typeof e&&e>=0&&e<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",t);var c=u(r,l),d=u(o,f),p=s(r,l),h=function(e){return e>1?1:e<0?0:e},y=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var a=c(n)-t,o=p(n);if(Math.abs(a-t)<i||o<i)return d(n);n=h(n-a/o)}return d(n)};return y.isStepper=!1,y},c=t.configSpring=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,a=void 0===r?8:r,o=e.dt,l=void 0===o?17:o,u=function(e,t,r){var o=-(e-t)*n,u=r*a,s=r+(o-u)*l/1e3,f=r*l/1e3+e;return Math.abs(f-t)<i&&Math.abs(s)<i?[t,0]:[f,s]};return u.isStepper=!0,u.dt=l,u};t.configEasing=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0];if("string"==typeof r)switch(r){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return f(r);case"spring":return c();default:(0,a.warn)(!1,"[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear' and 'spring', instead received %s",t)}return"function"==typeof r?r:((0,a.warn)(!1,"[configEasing]: first argument type should be function or string, instead received %s",t),null)}},function(e,t){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e},a=t.PLACE_HOLDER={"@@functional/placeholder":!0},i=function(e){return e===a},o=function(e){return function t(){return 0===arguments.length||1===arguments.length&&i(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},l=function e(t,r){return 1===t?r:o(function(){for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];var f=u.filter(function(e){return e!==a}).length;return f>=t?r.apply(void 0,u):e(t-f,o(function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];var o=u.map(function(e){return i(e)?t.shift():e});return r.apply(void 0,n(o).concat(t))}))})},u=t.curry=function(e){return l(e.length,e)};t.range=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},t.map=u(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(e){return t[e]}).map(e)}),t.compose=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return r;var a=t.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(e,t){return t(e)},i.apply(void 0,arguments))}},t.reverse=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},t.memoize=function(e){var t=null,n=null;return function(){for(var r=arguments.length,a=Array(r),i=0;i<r;i++)a[i]=arguments[i];return t&&a.every(function(e,n){return e===t[n]})?n:(t=a,n=e.apply(void 0,a))}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u,s,f,c=n(380),d=r(c),p=n(15),h=r(p),y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=n(1),g=r(v),b=n(2),x=r(b),_=n(17),w=r(_),O=n(404),E=n(25),C=n(13),k=r(C),T=n(23),S=r(T),A=n(102),M=r(A),P=n(18),N=n(549),j=(0,k.default)((f=s=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleDrag=function(e){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(e):n.state.isSlideMoving&&n.handleSlideDrag(e)},n.handleTouchMove=function(e){null!=e.changedTouches&&e.changedTouches.length>0&&n.handleDrag(e.changedTouches[0])},n.handleDragEnd=function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1})},n.handleLeaveWrapper=function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=setTimeout(n.handleDragEnd,1e3))},n.handleEnterSlideOrTraveller=function(){n.setState({isTextActive:!0})},n.handleLeaveSlideOrTraveller=function(){n.setState({isTextActive:!1})},n.handleSlideDragStart=function(e){var t=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX})},n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state=e.data&&e.data.length?n.updateScale(e):{},n}return l(t,e),m(t,[{key:"componentWillReceiveProps",value:function(e){var t=this,n=this.props,r=n.data,a=n.width,i=n.x,o=n.travellerWidth,l=n.updateId;(e.data!==r||e.updateId!==l)&&e.data&&e.data.length?this.setState(this.updateScale(e)):e.width===a&&e.x===i&&e.travellerWidth===o||(this.scale.range([e.x,e.x+e.width-e.travellerWidth]),this.scaleValues=this.scale.domain().map(function(e){return t.scale(e)}),this.setState({startX:this.scale(e.startIndex),endX:this.scale(e.endIndex)}))}},{key:"componentWillUnmount",value:function(){this.scale=null,this.scaleValues=null,this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null)}},{key:"getIndexInRange",value:function(e,t){for(var n=e.length,r=0,a=n-1;a-r>1;){var i=Math.floor((r+a)/2);e[i]>t?a=i:r=i}return t>=e[a]?a:r}},{key:"getIndex",value:function(e){var t=e.startX,n=e.endX,r=this.props,a=r.gap,i=r.data,o=i.length-1,l=Math.min(t,n),u=Math.max(t,n),s=this.getIndexInRange(this.scaleValues,l),f=this.getIndexInRange(this.scaleValues,u);return{startIndex:s-s%a,endIndex:f===o?o:f-f%a}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,a=t.dataKey,i=(0,E.getValueByDataKey)(n[e],a,e);return(0,h.default)(r)?r(i):i}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,a=t.endX,i=this.props,o=i.x,l=i.width,u=i.travellerWidth,s=i.startIndex,f=i.endIndex,c=i.onChange,d=e.pageX-n;d>0?d=Math.min(d,o+l-u-a,o+l-u-r):d<0&&(d=Math.max(d,o-r,o-a));var p=this.getIndex({startX:r+d,endX:a+d});p.startIndex===s&&p.endIndex===f||!c||c(p),this.setState({startX:r+d,endX:a+d,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX})}},{key:"handleTravellerMove",value:function(e){var t,n=this.state,r=n.brushMoveStartX,i=n.movingTravellerId,o=n.endX,l=n.startX,u=this.state[i],s=this.props,f=s.x,c=s.width,d=s.travellerWidth,p=s.onChange,h=s.gap,y=s.data,m={startX:this.state.startX,endX:this.state.endX},v=e.pageX-r;v>0?v=Math.min(v,f+c-d-u):v<0&&(v=Math.max(v,f-u)),m[i]=u+v;var g=this.getIndex(m),b=g.startIndex,x=g.endIndex,_=function(){var e=y.length-1;return"startX"===i&&(o>l?b%h===0:x%h===0)||o<l&&x===e||"endX"===i&&(o>l?x%h===0:b%h===0)||o>l&&x===e};this.setState((t={},a(t,i,u+v),a(t,"brushMoveStartX",e.pageX),t),function(){p&&_()&&p(g)})}},{key:"updateScale",value:function(e){var t=this,n=e.data,r=e.startIndex,a=e.endIndex,i=e.x,o=e.width,l=e.travellerWidth,u=n.length;return this.scale=(0,O.scalePoint)().domain((0,d.default)(0,u)).range([i,i+o-l]),this.scaleValues=this.scale.domain().map(function(e){return t.scale(e)}),{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,startX:this.scale(r),endX:this.scale(a)}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,a=e.height,i=e.fill,o=e.stroke;return g.default.createElement("rect",{stroke:o,fill:i,x:t,y:n,width:r,height:a})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,a=e.height,i=e.data,o=e.children,l=e.padding,u=v.Children.only(o);return u?g.default.cloneElement(u,{x:t,y:n,width:r,height:a,margin:l,compact:!0,data:i}):null}},{key:"renderTraveller",value:function(e,t){var n=this.props,r=n.y,a=n.travellerWidth,i=n.height,o=n.stroke,l=Math.floor(r+i/2)-1,u=Math.max(e,this.props.x);return g.default.createElement(S.default,{className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[t],onTouchStart:this.travellerDragStartHandlers[t],style:{cursor:"col-resize"}},g.default.createElement("rect",{x:u,y:r,width:a,height:i,fill:o,stroke:"none"}),g.default.createElement("line",{x1:u+1,y1:l,x2:u+a-1,y2:l,fill:"none",stroke:"#fff"}),g.default.createElement("line",{x1:u+1,y1:l+2,x2:u+a-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderSlide",value:function(e,t){var n=this.props,r=n.y,a=n.height,i=n.stroke;return g.default.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:i,fillOpacity:.2,x:Math.min(e,t),y:r,width:Math.abs(t-e),height:a})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,r=e.y,a=e.height,i=e.travellerWidth,o=e.stroke,l=this.state,u=l.startX,s=l.endX,f=5,c={pointerEvents:"none",fill:o};return g.default.createElement(S.default,{className:"recharts-brush-texts"},g.default.createElement(M.default,y({textAnchor:"end",verticalAnchor:"middle",x:Math.min(u,s)-f,y:r+a/2},c),this.getTextOfTick(t)),g.default.createElement(M.default,y({textAnchor:"start",verticalAnchor:"middle",x:Math.max(u,s)+i+f,y:r+a/2},c),this.getTextOfTick(n)))}},{key:"render",value:function(){var e=this.props,t=e.data,n=e.className,r=e.children,a=e.x,i=e.y,o=e.width,l=e.height,u=this.state,s=u.startX,f=u.endX,c=u.isTextActive,d=u.isSlideMoving,p=u.isTravellerMoving;if(!t||!t.length||!(0,P.isNumber)(a)||!(0,P.isNumber)(i)||!(0,P.isNumber)(o)||!(0,P.isNumber)(l)||o<=0||l<=0)return null;var h=(0,w.default)("recharts-brush",n),y=1===g.default.Children.count(r),m=(0,N.generatePrefixStyle)("userSelect","none");return g.default.createElement(S.default,{className:h,onMouseMove:this.handleDrag,onMouseLeave:this.handleLeaveWrapper,onMouseUp:this.handleDragEnd,onTouchEnd:this.handleDragEnd,onTouchMove:this.handleTouchMove,style:m},this.renderBackground(),y&&this.renderPanorama(),this.renderSlide(s,f),this.renderTraveller(s,"startX"),this.renderTraveller(f,"endX"),(c||d||p)&&this.renderText())}}]),t}(v.Component),s.displayName="Brush",s.propTypes={className:x.default.string,fill:x.default.string,stroke:x.default.string,x:x.default.number,y:x.default.number,width:x.default.number,height:x.default.number.isRequired,travellerWidth:x.default.number,gap:x.default.number,padding:x.default.shape({top:x.default.number,right:x.default.number,bottom:x.default.number,left:x.default.number}),dataKey:x.default.oneOfType([x.default.string,x.default.number,x.default.func]),data:x.default.array,startIndex:x.default.number,endIndex:x.default.number,tickFormatter:x.default.func,children:x.default.node,onChange:x.default.func,updateId:x.default.oneOfType([x.default.string,x.default.number])},s.defaultProps={height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1}},u=f))||u;t.default=j},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u,s,f=n(15),c=r(f),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=n(1),y=r(h),m=n(2),v=r(m),g=n(17),b=r(g),x=n(13),_=n(296),w=n(23),O=r(w),E=n(102),C=r(E),k=n(88),T=r(k),S=n(12),A=n(18),M=(s=u=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),p(t,[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=a(e,["viewBox"]),i=this.props,o=i.viewBox,l=a(i,["viewBox"]);return!(0,x.shallowEqual)(n,o)||!(0,x.shallowEqual)(r,l)||!(0,x.shallowEqual)(t,this.state)}},{key:"getTickLineCoord",value:function(e){var t=this.props,n=t.x,r=t.y,a=t.width,i=t.height,o=t.orientation,l=t.tickSize,u=t.mirror,s=t.tickMargin,f=void 0,c=void 0,d=void 0,p=void 0,h=void 0,y=void 0,m=u?-1:1,v=e.tickSize||l,g=(0,A.isNumber)(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":f=c=e.coordinate,p=r+!u*i,d=p-m*v,y=d-m*s,h=g;break;case"left":d=p=e.coordinate,c=n+!u*a,f=c-m*v,h=f-m*s,y=g;break;case"right":d=p=e.coordinate,c=n+u*a,f=c+m*v,h=f+m*s,y=g;break;default:f=c=e.coordinate,p=r+u*i,d=p+m*v,y=d+m*s,h=g}return{line:{x1:f,y1:d,x2:c,y2:p},tick:{x:h,y:y}}}},{key:"getTickTextAnchor",value:function(){var e=this.props,t=e.orientation,n=e.mirror,r=void 0;switch(t){case"left":r=n?"start":"end";break;case"right":r=n?"end":"start";break;default:r="middle"}return r}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,n=e.mirror,r="end";switch(t){case"left":case"right":r="middle";break;case"top":r=n?"start":"end";break;default:r=n?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,a=e.height,i=e.orientation,o=e.axisLine,l=e.mirror,u=d({},(0,S.getPresentationAttributes)(this.props),{fill:"none"},(0,S.getPresentationAttributes)(o));if("top"===i||"bottom"===i){var s="top"===i&&!l||"bottom"===i&&l;u=d({},u,{x1:t,y1:n+s*a,x2:t+r,y2:n+s*a})}else{var f="left"===i&&!l||"right"===i&&l;u=d({},u,{x1:t+f*r,y1:n,x2:t+f*r,y2:n+a})}return y.default.createElement("line",d({className:"recharts-cartesian-axis-line"},u))}},{key:"renderTickItem",value:function(e,t,n){var r=void 0;return r=y.default.isValidElement(e)?y.default.cloneElement(e,t):(0,c.default)(e)?e(t):y.default.createElement(C.default,d({},t,{className:"recharts-cartesian-axis-tick-value"}),n)}},{key:"renderTicks",value:function(e){var n=this,r=this.props,a=r.tickLine,i=r.stroke,o=r.tick,l=r.tickFormatter,u=r.unit,s=t.getTicks(d({},this.props,{ticks:e})),f=this.getTickTextAnchor(),p=this.getTickVerticalAnchor(),h=(0,S.getPresentationAttributes)(this.props),m=(0,S.getPresentationAttributes)(o),v=d({},h,{fill:"none"},(0,S.getPresentationAttributes)(a)),g=s.map(function(e,t){var r=n.getTickLineCoord(e),g=r.line,b=r.tick,x=d({textAnchor:f,verticalAnchor:p},h,{stroke:"none",fill:i},m,b,{index:t,payload:e,visibleTicksCount:s.length});return y.default.createElement(O.default,d({className:"recharts-cartesian-axis-tick",key:"tick-"+t},(0,S.filterEventsOfChild)(n.props,e,t)),a&&y.default.createElement("line",d({className:"recharts-cartesian-axis-tick-line"},v,g)),o&&n.renderTickItem(o,x,""+((0,c.default)(l)?l(e.value):e.value)+(u||"")))});return y.default.createElement("g",{className:"recharts-cartesian-axis-ticks"},g)}},{key:"render",value:function(){var e=this.props,t=e.axisLine,n=e.width,r=e.height,i=e.ticksGenerator,o=e.className,l=e.hide;if(l)return null;var u=this.props,s=u.ticks,f=a(u,["ticks"]),d=s;return(0,c.default)(i)&&(d=i(s&&s.length>0?this.props:f)),n<=0||r<=0||!d||!d.length?null:y.default.createElement(O.default,{className:(0,b.default)("recharts-cartesian-axis",o)},t&&this.renderAxisLine(),this.renderTicks(d),T.default.renderCallByParent(this.props))}}],[{key:"getTicks",value:function(e){var n=e.tick,r=e.ticks,a=e.viewBox,i=e.minTickGap,o=e.orientation,l=e.interval,u=e.tickFormatter,s=e.unit;return r&&r.length&&n?(0,A.isNumber)(l)||(0,S.isSsr)()?t.getNumberIntervalTicks(r,(0,A.isNumber)(l)?l:0):"preserveStartEnd"===l?t.getTicksStart({ticks:r,tickFormatter:u,viewBox:a,orientation:o,minTickGap:i,unit:s},!0):"preserveStart"===l?t.getTicksStart({ticks:r,tickFormatter:u,viewBox:a,orientation:o,minTickGap:i,unit:s}):t.getTicksEnd({ticks:r,tickFormatter:u,viewBox:a,orientation:o,minTickGap:i,unit:s}):[]}},{key:"getNumberIntervalTicks",value:function(e,t){return e.filter(function(e,n){return n%(t+1)===0})}},{key:"getTicksStart",value:function(e,t){var n=e.ticks,r=e.tickFormatter,a=e.viewBox,i=e.orientation,o=e.minTickGap,l=e.unit,u=a.x,s=a.y,f=a.width,p=a.height,h="top"===i||"bottom"===i?"width":"height",y=(n||[]).slice(),m=l?(0,_.getStringSize)(l)[h]:0,v=y.length,g=v>=2?(0,A.mathSign)(y[1].coordinate-y[0].coordinate):1,b=void 0,x=void 0;if(1===g?(b="width"===h?u:s,x="width"===h?u+f:s+p):(b="width"===h?u+f:s+p,x="width"===h?u:s),t){var w=n[v-1],O=(0,c.default)(r)?r(w.value):w.value,E=(0,_.getStringSize)(O)[h]+m,C=g*(w.coordinate+g*E/2-x);y[v-1]=w=d({},w,{tickCoord:C>0?w.coordinate-C*g:w.coordinate});var k=g*(w.tickCoord-g*E/2-b)>=0&&g*(w.tickCoord+g*E/2-x)<=0;k&&(x=w.tickCoord-g*(E/2+o),y[v-1]=d({},w,{isShow:!0}))}for(var T=t?v-1:v,S=0;S<T;S++){var M=y[S],P=(0,c.default)(r)?r(M.value):M.value,N=(0,_.getStringSize)(P)[h]+m;if(0===S){var j=g*(M.coordinate-g*N/2-b);y[S]=M=d({},M,{tickCoord:j<0?M.coordinate-j*g:M.coordinate})}else y[S]=M=d({},M,{tickCoord:M.coordinate});var R=g*(M.tickCoord-g*N/2-b)>=0&&g*(M.tickCoord+g*N/2-x)<=0;R&&(b=M.tickCoord+g*(N/2+o),y[S]=d({},M,{isShow:!0}))}return y.filter(function(e){return e.isShow})}},{key:"getTicksEnd",value:function(e){var t=e.ticks,n=e.tickFormatter,r=e.viewBox,a=e.orientation,i=e.minTickGap,o=e.unit,l=r.x,u=r.y,s=r.width,f=r.height,p="top"===a||"bottom"===a?"width":"height",h=o?(0,_.getStringSize)(o)[p]:0,y=(t||[]).slice(),m=y.length,v=m>=2?(0,A.mathSign)(y[1].coordinate-y[0].coordinate):1,g=void 0,b=void 0;1===v?(g="width"===p?l:u,b="width"===p?l+s:u+f):(g="width"===p?l+s:u+f,b="width"===p?l:u);for(var x=m-1;x>=0;x--){var w=y[x],O=(0,c.default)(n)?n(w.value):w.value,E=(0,_.getStringSize)(O)[p]+h;if(x===m-1){var C=v*(w.coordinate+v*E/2-b);y[x]=w=d({},w,{tickCoord:C>0?w.coordinate-C*v:w.coordinate})}else y[x]=w=d({},w,{tickCoord:w.coordinate});var k=v*(w.tickCoord-v*E/2-g)>=0&&v*(w.tickCoord+v*E/2-b)<=0;k&&(b=w.tickCoord-v*(E/2+i),y[x]=d({},w,{isShow:!0}))}return y.filter(function(e){return e.isShow})}}]),t}(h.Component),u.displayName="CartesianAxis",u.propTypes=d({},S.PRESENTATION_ATTRIBUTES,S.EVENT_ATTRIBUTES,{className:v.default.string,x:v.default.number,y:v.default.number,width:v.default.number,height:v.default.number,orientation:v.default.oneOf(["top","bottom","left","right"]),viewBox:v.default.shape({x:v.default.number,y:v.default.number,width:v.default.number,height:v.default.number}),tick:v.default.oneOfType([v.default.bool,v.default.func,v.default.object,v.default.element]),axisLine:v.default.oneOfType([v.default.bool,v.default.object]),tickLine:v.default.oneOfType([v.default.bool,v.default.object]),mirror:v.default.bool,tickMargin:v.default.number.isRequired,minTickGap:v.default.number,ticks:v.default.array,tickSize:v.default.number,stroke:v.default.string,tickFormatter:v.default.func,ticksGenerator:v.default.func,interval:v.default.oneOfType([v.default.number,v.default.oneOf(["preserveStart","preserveEnd","preserveStartEnd"])])}),u.defaultProps={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"},s);t.default=M},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=n(15),c=r(f),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=n(1),y=r(h),m=n(2),v=r(m),g=n(17),b=r(g),x=n(13),_=r(x),w=n(23),O=r(w),E=n(88),C=r(E),k=n(12),T=n(18),S=n(25),A=n(134),M=r(A),P=(0,_.default)((s=u=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),p(t,[{key:"getRect",value:function(e,t,n,r){var a=this.props,i=a.x1,o=a.x2,l=a.y1,u=a.y2,s=a.xAxis,f=a.yAxis,c=s.scale,d=f.scale,p=c.bandwidth?c.bandwidth()/2:0,h=d.bandwidth?d.bandwidth()/2:0,y=c.range(),m=d.range(),v=void 0,g=void 0,b=void 0,x=void 0;return v=e?c(i)+p:y[0],g=t?c(o)+p:y[1],b=n?d(l)+h:m[0],x=r?d(u)+h:m[1],(0,S.validateCoordinateInRange)(v,c)&&(0,S.validateCoordinateInRange)(g,c)&&(0,S.validateCoordinateInRange)(b,d)&&(0,S.validateCoordinateInRange)(x,d)?{x:Math.min(v,g),y:Math.min(b,x),width:Math.abs(g-v),height:Math.abs(x-b)}:null}},{key:"renderRect",value:function(e,t){var n=void 0;return n=y.default.isValidElement(e)?y.default.cloneElement(e,t):(0,c.default)(e)?e(t):y.default.createElement(M.default,d({},t,{className:"recharts-reference-area-rect"}))}},{key:"render",value:function(){var e=this.props,t=e.x1,n=e.x2,r=e.y1,a=e.y2,i=e.className,o=(0,T.isNumOrStr)(t),l=(0,T.isNumOrStr)(n),u=(0,T.isNumOrStr)(r),s=(0,T.isNumOrStr)(a);if(!(o||l||u||s))return null;var f=this.getRect(o,l,u,s);if(!f)return null;var c=this.props.shape;return y.default.createElement(O.default,{className:(0,b.default)("recharts-reference-area",i)},this.renderRect(c,d({},this.props,f)),C.default.renderCallByParent(this.props,f))}}]),t}(h.Component),u.displayName="ReferenceArea",u.propTypes=d({},k.PRESENTATION_ATTRIBUTES,{viewBox:v.default.shape({x:v.default.number,y:v.default.number,width:v.default.number,height:v.default.number}),xAxis:v.default.object,yAxis:v.default.object,isFront:v.default.bool,alwaysShow:v.default.bool,x1:v.default.oneOfType([v.default.number,v.default.string]),x2:v.default.oneOfType([v.default.number,v.default.string]),y1:v.default.oneOfType([v.default.number,v.default.string]),y2:v.default.oneOfType([v.default.number,v.default.string]),className:v.default.oneOfType([v.default.number,v.default.string]),yAxisId:v.default.oneOfType([v.default.string,v.default.number]),xAxisId:v.default.oneOfType([v.default.string,v.default.number]),shape:v.default.oneOfType([v.default.func,v.default.element])}),u.defaultProps={isFront:!1,alwaysShow:!1,xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1},l=s))||l;t.default=P},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=n(15),c=r(f),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=n(1),y=r(h),m=n(2),v=r(m),g=n(17),b=r(g),x=n(13),_=r(x),w=n(23),O=r(w),E=n(103),C=r(E),k=n(12),T=n(88),S=r(T),A=n(18),M=n(25),P=(0,_.default)((s=u=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),p(t,[{key:"getCoordinate",value:function(){var e=this.props,t=e.x,n=e.y,r=e.xAxis,a=e.yAxis,i=r.scale,o=a.scale,l={cx:i(t)+(i.bandwidth?i.bandwidth()/2:0),cy:o(n)+(o.bandwidth?o.bandwidth()/2:0)};return(0,M.validateCoordinateInRange)(l.cx,i)&&(0,M.validateCoordinateInRange)(l.cy,o)?l:null}},{key:"renderDot",value:function(e,t){var n=void 0;return n=y.default.isValidElement(e)?y.default.cloneElement(e,t):(0,c.default)(e)?e(t):y.default.createElement(C.default,d({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"}))}},{key:"render",value:function(){var e=this.props,t=e.x,n=e.y,r=e.r,a=(0,A.isNumOrStr)(t),i=(0,A.isNumOrStr)(n);if(!a||!i)return null;var o=this.getCoordinate();if(!o)return null;var l=this.props,u=l.shape,s=l.className,f=d({},(0,k.getPresentationAttributes)(this.props),(0,k.filterEventAttributes)(this.props),o);return y.default.createElement(O.default,{className:(0,b.default)("recharts-reference-dot",s)},this.renderDot(u,f),S.default.renderCallByParent(this.props,{x:o.cx-r,y:o.cy-r,width:2*r,height:2*r}))}}]),t}(h.Component),u.displayName="ReferenceDot",u.propTypes=d({},k.PRESENTATION_ATTRIBUTES,k.EVENT_ATTRIBUTES,{r:v.default.number,xAxis:v.default.shape({scale:v.default.func}),yAxis:v.default.shape({scale:v.default.func}),isFront:v.default.bool,alwaysShow:v.default.bool,x:v.default.oneOfType([v.default.number,v.default.string]),y:v.default.oneOfType([v.default.number,v.default.string]),className:v.default.oneOfType([v.default.number,v.default.string]),yAxisId:v.default.oneOfType([v.default.string,v.default.number]),xAxisId:v.default.oneOfType([v.default.string,v.default.number]),shape:v.default.oneOfType([v.default.func,v.default.element])}),u.defaultProps={isFront:!1,alwaysShow:!1,xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1},l=s))||l;t.default=P},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=n(15),c=r(f),d=function(){function e(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(r=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(a)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=n(1),m=r(y),v=n(2),g=r(v),b=n(17),x=r(b),_=n(13),w=r(_),O=n(23),E=r(O),C=n(12),k=n(88),T=r(k),S=n(18),A=n(25),M=function(e,t){var n=void 0;return n=m.default.isValidElement(e)?m.default.cloneElement(e,t):(0,c.default)(e)?e(t):m.default.createElement("line",h({},t,{className:"recharts-reference-line-line"}))},P=(0,w.default)((s=u=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),p(t,[{key:"getEndPoints",value:function(e,t){var n=this.props,r=n.xAxis,a=n.yAxis,i=n.viewBox,o=i.x,l=i.y,u=i.width,s=i.height; if(t){var f=this.props.y,c=a.scale,d=c.bandwidth?c.bandwidth()/2:0,p=c(f)+d;if((0,A.validateCoordinateInRange)(p,c))return"left"===a.orientation?[{x:o,y:p},{x:o+u,y:p}]:[{x:o+u,y:p},{x:o,y:p}]}else if(e){var h=this.props.x,y=r.scale,m=y.bandwidth?y.bandwidth()/2:0,v=y(h)+m;if((0,A.validateCoordinateInRange)(v,y))return"top"===r.orientation?[{x:v,y:l},{x:v,y:l+s}]:[{x:v,y:l+s},{x:v,y:l}]}return null}},{key:"render",value:function(){var e=this.props,t=e.x,n=e.y,r=e.shape,a=e.className,i=(0,S.isNumOrStr)(t),o=(0,S.isNumOrStr)(n);if(!i&&!o)return null;var l=this.getEndPoints(i,o);if(!l)return null;var u=d(l,2),s=u[0],f=u[1],c=h({},(0,C.getPresentationAttributes)(this.props),(0,C.filterEventAttributes)(this.props),{x1:s.x,y1:s.y,x2:f.x,y2:f.y});return m.default.createElement(E.default,{className:(0,x.default)("recharts-reference-line",a)},M(r,c),T.default.renderCallByParent(this.props,{x:Math.min(c.x1,c.x2),y:Math.min(c.y1,c.y2),width:Math.abs(c.x2-c.x1),height:Math.abs(c.y2-c.y1)}))}}]),t}(y.Component),u.displayName="ReferenceLine",u.propTypes=h({},C.PRESENTATION_ATTRIBUTES,{viewBox:g.default.shape({x:g.default.number,y:g.default.number,width:g.default.number,height:g.default.number}),xAxis:g.default.object,yAxis:g.default.object,isFront:g.default.bool,alwaysShow:g.default.bool,x:g.default.oneOfType([g.default.number,g.default.string]),y:g.default.oneOfType([g.default.number,g.default.string]),className:g.default.oneOfType([g.default.number,g.default.string]),yAxisId:g.default.oneOfType([g.default.string,g.default.number]),xAxisId:g.default.oneOfType([g.default.string,g.default.number]),shape:g.default.func}),u.defaultProps={isFront:!1,alwaysShow:!1,xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1},l=s))||l;t.default=P},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=n(61),c=r(f),d=n(187),p=r(d),h=n(15),y=r(h),m=n(44),v=r(m),g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),x=n(1),_=r(x),w=n(2),O=r(w),E=n(66),C=r(E),k=n(17),T=r(k),S=n(13),A=r(S),M=n(23),P=r(M),N=n(198),j=r(N),R=n(133),I=r(R),D=n(102),L=r(D),B=n(88),V=r(B),F=n(89),z=r(F),W=n(159),K=r(W),U=n(12),G=n(55),H=n(18),q=n(25),Y=n(401),X=(0,A.default)((s=u=function(e){function t(){var e,n,r,o;a(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={isAnimationFinished:!1,isAnimationStarted:!1},r.id=(0,H.uniqueId)("recharts-pie-"),r.cachePrevData=function(e){r.setState({prevSectors:e})},r.handleAnimationEnd=function(){r.setState({isAnimationFinished:!0})},r.handleAnimationStart=function(){r.setState({isAnimationStarted:!0})},o=n,i(r,o)}return o(t,e),b(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.animationId,r=t.sectors;e.isAnimationActive!==this.props.isAnimationActive?this.cachePrevData([]):e.animationId!==n&&this.cachePrevData(r)}},{key:"getTextAnchor",value:function(e,t){return e>t?"start":e<t?"end":"middle"}},{key:"isActiveIndex",value:function(e){var t=this.props.activeIndex;return Array.isArray(t)?t.indexOf(e)!==-1:e===t}},{key:"renderLabelLineItem",value:function(e,t){return _.default.isValidElement(e)?_.default.cloneElement(e,t):(0,y.default)(e)?e(t):_.default.createElement(I.default,g({},t,{type:"linear",className:"recharts-pie-label-line"}))}},{key:"renderLabelItem",value:function(e,t,n){if(_.default.isValidElement(e))return _.default.cloneElement(e,t);var r=n;return(0,y.default)(e)&&(r=e(t),_.default.isValidElement(r))?r:_.default.createElement(L.default,g({},t,{alignmentBaseline:"middle",className:"recharts-pie-label-text"}),r)}},{key:"renderLabels",value:function(e){var t=this,n=this.props.isAnimationActive;if(n&&!this.state.isAnimationFinished)return null;var r=this.props,a=r.label,i=r.labelLine,o=r.dataKey,l=r.valueKey,u=(0,U.getPresentationAttributes)(this.props),s=(0,U.getPresentationAttributes)(a),f=(0,U.getPresentationAttributes)(i),c=a&&a.offsetRadius||20,d=e.map(function(e,n){var r=(e.startAngle+e.endAngle)/2,d=(0,G.polarToCartesian)(e.cx,e.cy,e.outerRadius+c,r),p=g({},u,e,{stroke:"none"},s,{index:n,textAnchor:t.getTextAnchor(d.x,e.cx)},d),h=g({},u,e,{fill:"none",stroke:e.fill},f,{index:n,points:[(0,G.polarToCartesian)(e.cx,e.cy,e.outerRadius,r),d]}),y=o;return(0,v.default)(o)&&(0,v.default)(l)?y="value":(0,v.default)(o)&&(y=l),_.default.createElement(P.default,{key:"label-"+n},i&&t.renderLabelLineItem(i,h),t.renderLabelItem(a,p,(0,q.getValueByDataKey)(e,y)))});return _.default.createElement(P.default,{className:"recharts-pie-labels"},d)}},{key:"renderSectorItem",value:function(e,t){return _.default.isValidElement(e)?_.default.cloneElement(e,t):(0,y.default)(e)?e(t):(0,p.default)(e)?_.default.createElement(j.default,g({},t,e)):_.default.createElement(j.default,t)}},{key:"renderSectorsStatically",value:function(e){var t=this,n=this.props.activeShape;return e.map(function(e,r){return _.default.createElement(P.default,g({className:"recharts-pie-sector"},(0,U.filterEventsOfChild)(t.props,e,r),{key:"sector-"+r}),t.renderSectorItem(t.isActiveIndex(r)?n:null,e))})}},{key:"renderSectorsWithAnimation",value:function(){var e=this,t=this.props,n=t.sectors,r=t.isAnimationActive,a=t.animationBegin,i=t.animationDuration,o=t.animationEasing,l=t.animationId,u=this.state.prevSectors;return _.default.createElement(C.default,{begin:a,duration:i,isActive:r,easing:o,from:{t:0},to:{t:1},key:"pie-"+l,onAnimationEnd:this.handleAnimationEnd},function(t){var r=t.t,a=[],i=n&&n[0],o=i.startAngle;return n.forEach(function(e,t){var n=u&&u[t],i=t>0?e.paddingAngle:0;if(n){var l=(0,H.interpolateNumber)(n.endAngle-n.startAngle,e.endAngle-e.startAngle),s=g({},e,{startAngle:o+i,endAngle:o+l(r)+i});a.push(s),o=s.endAngle}else{var f=e.endAngle,c=e.startAngle,d=(0,H.interpolateNumber)(0,f-c),p=d(r),h=g({},e,{startAngle:o+i,endAngle:o+p+i});a.push(h),o=h.endAngle}}),_.default.createElement(P.default,null,e.renderSectorsStatically(a))})}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return!(n&&t&&t.length)||r&&(0,c.default)(r,t)?this.renderSectorsStatically(t):this.renderSectorsWithAnimation()}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.sectors,r=e.className,a=e.label,i=e.cx,o=e.cy,l=e.innerRadius,u=e.outerRadius,s=e.isAnimationActive,f=e.id;if(t||!n||!n.length||!(0,H.isNumber)(i)||!(0,H.isNumber)(o)||!(0,H.isNumber)(l)||!(0,H.isNumber)(u))return null;var c=this.state.isAnimationFinished,d=(0,T.default)("recharts-pie",r);return _.default.createElement(P.default,{className:d},_.default.createElement("g",{clipPath:"url(#"+((0,v.default)(f)?this.id:f)+")"},this.renderSectors()),a&&this.renderLabels(n),V.default.renderCallByParent(this.props,null,!1),(!s||c)&&z.default.renderCallByParent(this.props,n,!1))}}]),t}(x.Component),u.displayName="Pie",u.propTypes=g({},U.PRESENTATION_ATTRIBUTES,U.EVENT_ATTRIBUTES,{className:O.default.string,animationId:O.default.number,cx:O.default.oneOfType([O.default.number,O.default.string]),cy:O.default.oneOfType([O.default.number,O.default.string]),startAngle:O.default.number,endAngle:O.default.number,paddingAngle:O.default.number,innerRadius:O.default.oneOfType([O.default.number,O.default.string]),outerRadius:O.default.oneOfType([O.default.number,O.default.string]),cornerRadius:O.default.oneOfType([O.default.number,O.default.string]),dataKey:O.default.oneOfType([O.default.string,O.default.number,O.default.func]).isRequired,nameKey:O.default.oneOfType([O.default.string,O.default.number,O.default.func]),valueKey:O.default.oneOfType([O.default.string,O.default.number,O.default.func]),data:O.default.arrayOf(O.default.object),minAngle:O.default.number,legendType:O.default.oneOf(U.LEGEND_TYPES),maxRadius:O.default.number,sectors:O.default.arrayOf(O.default.object),hide:O.default.bool,labelLine:O.default.oneOfType([O.default.object,O.default.func,O.default.element,O.default.bool]),label:O.default.oneOfType([O.default.shape({offsetRadius:O.default.number}),O.default.func,O.default.element,O.default.bool]),activeShape:O.default.oneOfType([O.default.object,O.default.func,O.default.element]),activeIndex:O.default.oneOfType([O.default.number,O.default.arrayOf(O.default.number)]),isAnimationActive:O.default.bool,animationBegin:O.default.number,animationDuration:O.default.number,animationEasing:O.default.oneOf(["ease","ease-in","ease-out","ease-in-out","spring","linear"]),id:O.default.string}),u.defaultProps={stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!(0,U.isSsr)(),animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name"},u.parseDeltaAngle=function(e){var t=e.startAngle,n=e.endAngle,r=(0,H.mathSign)(n-t),a=Math.min(Math.abs(n-t),360);return r*a},u.getRealPieData=function(e){var t=e.props,n=t.data,r=t.children,a=(0,U.getPresentationAttributes)(e.props),i=(0,U.findAllByType)(r,K.default);return n&&n.length?n.map(function(e,t){return g({payload:e},a,e,i&&i[t]&&i[t].props)}):i&&i.length?i.map(function(e){return g({},a,e.props)}):[]},u.parseCoordinateOfPie=function(e,t){var n=t.top,r=t.left,a=t.width,i=t.height,o=(0,G.getMaxRadius)(a,i),l=r+(0,H.getPercentValue)(e.props.cx,a,a/2),u=n+(0,H.getPercentValue)(e.props.cy,i,i/2),s=(0,H.getPercentValue)(e.props.innerRadius,o,0),f=(0,H.getPercentValue)(e.props.outerRadius,o,.8*o),c=e.props.maxRadius||Math.sqrt(a*a+i*i)/2;return{cx:l,cy:u,innerRadius:s,outerRadius:f,maxRadius:c}},u.getComposedData=function(e){var t=e.item,n=e.offset,r=e.onItemMouseLeave,a=e.onItemMouseEnter,i=X.getRealPieData(t);if(!i||!i.length)return[];var o=t.props,l=o.cornerRadius,u=o.startAngle,s=o.endAngle,f=o.paddingAngle,c=o.dataKey,d=o.nameKey,p=o.valueKey,h=Math.abs(t.props.minAngle),y=X.parseCoordinateOfPie(t,n),m=i.length,b=X.parseDeltaAngle({startAngle:u,endAngle:s}),x=Math.abs(b),_=(x>=360?m:m-1)*f,w=x-m*h-_,O=c;(0,v.default)(c)&&(0,v.default)(p)?((0,Y.warn)(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),O="value"):(0,v.default)(c)&&((0,Y.warn)(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),O=p);var E=i.reduce(function(e,t){var n=(0,q.getValueByDataKey)(t,O,0);return e+((0,H.isNumber)(n)?n:0)},0),C=void 0;if(E>0){var k=void 0;C=i.map(function(e,t){var n=(0,q.getValueByDataKey)(e,O,0),r=(0,q.getValueByDataKey)(e,d,t),a=((0,H.isNumber)(n)?n:0)/E,i=void 0;i=t?k.endAngle+(0,H.mathSign)(b)*f:u;var o=i+(0,H.mathSign)(b)*(h+a*w),s=(i+o)/2,c=(y.innerRadius+y.outerRadius)/2,p=[{name:r,value:n,payload:e}],m=(0,G.polarToCartesian)(y.cx,y.cy,c,s);return k=g({percent:a,cornerRadius:l,name:r,tooltipPayload:p,midAngle:s,middleRadius:c,tooltipPosition:m},e,y,{value:(0,q.getValueByDataKey)(e,O),startAngle:i,endAngle:o,payload:e,paddingAngle:(0,H.mathSign)(b)*f})})}return g({},y,{sectors:C,data:i,onMouseLeave:r,onMouseEnter:a})},l=s))||l;t.default=X},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=n(61),c=r(f),d=n(15),p=r(d),h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=n(1),v=r(m),g=n(2),b=r(g),x=n(66),_=r(x),w=n(17),O=r(w),E=n(18),C=n(13),k=r(C),T=n(12),S=n(55),A=n(25),M=n(294),P=r(M),N=n(103),j=r(N),R=n(23),I=r(R),D=n(89),L=r(D),B=(0,k.default)((s=u=function(e){function t(){var e,n,r,o;a(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={isAnimationFinished:!1},r.cachePrevData=function(e){r.setState({prevPoints:e})},r.handleAnimationEnd=function(){r.setState({isAnimationFinished:!0})},r.handleAnimationStart=function(){r.setState({isAnimationFinished:!1})},r.handleMouseEnter=function(e){var t=r.props.onMouseEnter;t&&t(r.props,e)},r.handleMouseLeave=function(e){var t=r.props.onMouseLeave;t&&t(r.props,e)},o=n,i(r,o)}return o(t,e),y(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.animationId,r=t.points;e.animationId!==n&&this.cachePrevData(r)}},{key:"renderDotItem",value:function(e,t){var n=void 0;return n=v.default.isValidElement(e)?v.default.cloneElement(e,t):(0,p.default)(e)?e(t):v.default.createElement(j.default,h({},t,{className:"recharts-radar-dot"}))}},{key:"renderDots",value:function(e){var t=this,n=this.props,r=n.dot,a=n.dataKey,i=(0,T.getPresentationAttributes)(this.props),o=(0,T.getPresentationAttributes)(r),l=e.map(function(e,n){var l=h({key:"dot-"+n,r:3},i,o,{dataKey:a,cx:e.x,cy:e.y,index:n,playload:e});return t.renderDotItem(r,l)});return v.default.createElement(I.default,{className:"recharts-radar-dots"},l)}},{key:"renderPolygonStatically",value:function(e){var t=this.props,n=t.shape,r=t.dot,a=void 0;return a=v.default.isValidElement(n)?v.default.cloneElement(n,h({},this.props,{points:e})):(0,p.default)(n)?n(h({},this.props,{points:e})):v.default.createElement(P.default,h({},(0,T.filterEventAttributes)(this.props),{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},(0,T.getPresentationAttributes)(this.props),{points:e})),v.default.createElement(I.default,{className:"recharts-radar-polygon"},a,r?this.renderDots(e):null)}},{key:"renderPolygonWithAnimation",value:function(){var e=this,t=this.props,n=t.points,r=t.isAnimationActive,a=t.animationBegin,i=t.animationDuration,o=t.animationEasing,l=t.animationId,u=this.state.prevPoints;return v.default.createElement(_.default,{begin:a,duration:i,isActive:r,easing:o,from:{t:0},to:{t:1},key:"radar-"+l,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var r=t.t,a=n.map(function(e,t){var n=u&&u[t];if(n){var a=(0,E.interpolateNumber)(n.x,e.x),i=(0,E.interpolateNumber)(n.y,e.y);return h({},e,{x:a(r),y:i(r)})}var o=(0,E.interpolateNumber)(e.cx,e.x),l=(0,E.interpolateNumber)(e.cy,e.y);return h({},e,{x:o(r),y:l(r)})});return e.renderPolygonStatically(a)})}},{key:"renderPolygon",value:function(){var e=this.props,t=e.points,n=e.isAnimationActive,r=this.state.prevPoints;return!(n&&t&&t.length)||r&&(0,c.default)(r,t)?this.renderPolygonStatically(t):this.renderPolygonWithAnimation()}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.className,r=e.points,a=e.isAnimationActive;if(t||!r||!r.length)return null;var i=this.state.isAnimationFinished,o=(0,O.default)("recharts-radar",n);return v.default.createElement(I.default,{className:o},this.renderPolygon(),(!a||i)&&L.default.renderCallByParent(this.props,r))}}]),t}(m.Component),u.displayName="Radar",u.propTypes=h({},T.PRESENTATION_ATTRIBUTES,{className:b.default.string,dataKey:b.default.oneOfType([b.default.number,b.default.string,b.default.func]).isRequired,angleAxisId:b.default.oneOfType([b.default.string,b.default.number]),radiusAxisId:b.default.oneOfType([b.default.string,b.default.number]),points:b.default.arrayOf(b.default.shape({x:b.default.number,y:b.default.number,cx:b.default.number,cy:b.default.number,angle:b.default.number,radius:b.default.number,value:b.default.number,payload:b.default.object})),shape:b.default.oneOfType([b.default.element,b.default.func]),activeDot:b.default.oneOfType([b.default.object,b.default.element,b.default.func,b.default.bool]),dot:b.default.oneOfType([b.default.object,b.default.element,b.default.func,b.default.bool]),label:b.default.oneOfType([b.default.element,b.default.func,b.default.object,b.default.bool]),legendType:b.default.oneOf(T.LEGEND_TYPES),hide:b.default.bool,onMouseEnter:b.default.func,onMouseLeave:b.default.func,onClick:b.default.func,isAnimationActive:b.default.bool,animationId:b.default.number,animationBegin:b.default.number,animationDuration:b.default.number,animationEasing:b.default.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"])}),u.defaultProps={angleAxisId:0,radiusAxisId:0,hide:!1,activeDot:!0,dot:!1,legendType:"rect",isAnimationActive:!(0,T.isSsr)(),animationBegin:0,animationDuration:1500,animationEasing:"ease"},u.getComposedData=function(e){var t=e.radiusAxis,n=e.angleAxis,r=e.displayedData,a=e.dataKey,i=e.bandSize,o=n.cx,l=n.cy,u=r.map(function(e,r){var u=(0,A.getValueByDataKey)(e,n.dataKey,r),s=(0,A.getValueByDataKey)(e,a,0),f=n.scale(u)+(i||0),c=t.scale(s);return h({},(0,S.polarToCartesian)(o,l,c,f),{name:u,value:s,cx:o,cy:l,radius:c,angle:f,payload:e})});return{points:u}},l=s))||l;t.default=B},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u,s,f,c=n(61),d=r(c),p=n(15),h=r(p),y=n(19),m=r(y),v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=n(1),x=r(b),_=n(2),w=r(_),O=n(17),E=r(O),C=n(66),k=r(C),T=n(198),S=r(T),A=n(23),M=r(A),P=n(12),N=n(13),j=r(N),R=n(89),I=r(R),D=n(159),L=r(D),B=n(18),V=n(25),F=(0,j.default)((f=s=function(e){function t(){var e,n,r,a;i(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={isAnimationFinished:!1},r.cachePrevData=function(e){r.setState({prevData:e})},r.handleAnimationEnd=function(){r.setState({isAnimationFinished:!0})},r.handleAnimationStart=function(){r.setState({isAnimationFinished:!1})},a=n,o(r,a)}return l(t,e),g(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.animationId,r=t.data;e.animationId!==n&&this.cachePrevData(r)}},{key:"getDeltaAngle",value:function(){var e=this.props,t=e.startAngle,n=e.endAngle,r=(0,B.mathSign)(n-t),a=Math.min(Math.abs(n-t),360);return r*a}},{key:"renderSectorShape",value:function(e,t){var n=void 0;return n=x.default.isValidElement(e)?x.default.cloneElement(e,t):(0,h.default)(e)?e(t):x.default.createElement(S.default,t)}},{key:"renderSectorsStatically",value:function(e){var t=this,n=this.props,r=n.shape,i=n.activeShape,o=n.activeIndex,l=n.cornerRadius,u=a(n,["shape","activeShape","activeIndex","cornerRadius"]),s=(0,P.getPresentationAttributes)(u);return e.map(function(e,n){var a=v({},s,{cornerRadius:l},e,(0,P.filterEventsOfChild)(t.props,e,n),{key:"sector-"+n,className:"recharts-radial-bar-sector"});return t.renderSectorShape(n===o?i:r,a)})}},{key:"renderSectorsWithAnimation",value:function(){var e=this,t=this.props,n=t.data,r=t.isAnimationActive,a=t.animationBegin,i=t.animationDuration,o=t.animationEasing,l=t.animationId,u=this.state.prevData;return x.default.createElement(k.default,{begin:a,duration:i,isActive:r,easing:o,from:{t:0},to:{t:1},key:"radialBar-"+l,onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(t){var r=t.t,a=n.map(function(e,t){var n=u&&u[t];if(n){var a=(0,B.interpolateNumber)(n.startAngle,e.startAngle),i=(0,B.interpolateNumber)(n.endAngle,e.endAngle);return v({},e,{startAngle:a(r),endAngle:i(r)})}var o=e.endAngle,l=e.startAngle,s=(0,B.interpolateNumber)(l,o);return v({},e,{endAngle:s(r)})});return x.default.createElement(M.default,null,e.renderSectorsStatically(a))})}},{key:"renderSectors",value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return!(n&&t&&t.length)||r&&(0,d.default)(r,t)?this.renderSectorsStatically(t):this.renderSectorsWithAnimation()}},{key:"renderBackground",value:function(e){var t=this,n=this.props.cornerRadius,r=(0,P.getPresentationAttributes)(this.props.background);return e.map(function(e,i){var o=(e.value,e.background),l=a(e,["value","background"]);if(!o)return null;var u=v({cornerRadius:n},l,{fill:"#eee"},o,r,(0,P.filterEventsOfChild)(t.props,e,i),{index:i,key:"sector-"+i,className:"recharts-radial-bar-background-sector"});return t.renderSectorShape(o,u)})}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.data,r=e.className,a=e.background,i=e.isAnimationActive;if(t||!n||!n.length)return null;var o=this.state.isAnimationFinished,l=(0,E.default)("recharts-area",r);return x.default.createElement(M.default,{className:l},a&&x.default.createElement(M.default,{className:"recharts-radial-bar-background"},this.renderBackground(n)),x.default.createElement(M.default,{className:"recharts-radial-bar-sectors"},this.renderSectors(n)),(!i||o)&&I.default.renderCallByParent(v({},this.props,{clockWise:this.getDeltaAngle()<0}),n))}}]),t}(b.Component),s.displayName="RadialBar",s.propTypes=v({},P.PRESENTATION_ATTRIBUTES,{className:w.default.string,angleAxisId:w.default.oneOfType([w.default.string,w.default.number]),radiusAxisId:w.default.oneOfType([w.default.string,w.default.number]),shape:w.default.oneOfType([w.default.func,w.default.element]),activeShape:w.default.oneOfType([w.default.object,w.default.func,w.default.element]),activeIndex:w.default.number,dataKey:w.default.oneOfType([w.default.string,w.default.number,w.default.func]).isRequired,cornerRadius:w.default.oneOfType([w.default.number,w.default.string]),minPointSize:w.default.number,maxBarSize:w.default.number,data:w.default.arrayOf(w.default.shape({cx:w.default.number,cy:w.default.number,innerRadius:w.default.number,outerRadius:w.default.number,value:w.default.value})),legendType:w.default.oneOf(P.LEGEND_TYPES),label:w.default.oneOfType([w.default.bool,w.default.func,w.default.element,w.default.object]),background:w.default.oneOfType([w.default.bool,w.default.func,w.default.object,w.default.element]),hide:w.default.bool,onMouseEnter:w.default.func,onMouseLeave:w.default.func,onClick:w.default.func,isAnimationActive:w.default.bool,animationBegin:w.default.number,animationDuration:w.default.number,animationEasing:w.default.oneOf(["ease","ease-in","ease-out","ease-in-out","linear","spring"])}),s.defaultProps={angleAxisId:0,radiusAxisId:0,minPointSize:0,hide:!1,legendType:"rect",data:[],isAnimationActive:!(0,P.isSsr)(),animationBegin:0,animationDuration:1500,animationEasing:"ease"},s.getComposedData=function(e){var t=e.item,n=e.props,r=e.radiusAxis,a=e.radiusAxisTicks,i=e.angleAxis,o=e.angleAxisTicks,l=e.displayedData,u=e.dataKey,s=e.stackedData,f=e.barPosition,c=e.bandSize,d=e.dataStartIndex,p=(0,V.findPositionOfBar)(f,t);if(!p)return[];var h=i.cx,y=i.cy,g=n.layout,b=t.props,x=b.children,_=b.minPointSize,w="radial"===g?i:r,O=s?w.scale.domain():null,E=(0,V.getBaseValueOfBar)({props:n,numericAxis:w}),C=(0,P.findAllByType)(x,L.default),k=l.map(function(e,t){var l=void 0,f=void 0,b=void 0,x=void 0,w=void 0,k=void 0;if(s?l=(0,V.truncateByDomain)(s[d+t],O):(l=(0,V.getValueByDataKey)(e,u),(0,m.default)(l)||(l=[E,l])),"radial"===g){f=(0,V.getCateCoordinateOfBar)({axis:r,ticks:a,bandSize:c,offset:p.offset,entry:e,index:t}),w=i.scale(l[1]),x=i.scale(l[0]),b=f+p.size;var T=w-x;if(Math.abs(_)>0&&Math.abs(T)<Math.abs(_)){var S=(0,B.mathSign)(T||_)*(Math.abs(_)-Math.abs(T));w+=S}k={background:{cx:h,cy:y,innerRadius:f,outerRadius:b,startAngle:n.startAngle,endAngle:n.endAngle}}}else{f=r.scale(l[0]),b=r.scale(l[1]),x=(0,V.getCateCoordinateOfBar)({axis:i,ticks:o,bandSize:c,offset:p.offset,entry:e,index:t}),w=x+p.size;var A=b-f;if(Math.abs(_)>0&&Math.abs(A)<Math.abs(_)){var M=(0,B.mathSign)(A||_)*(Math.abs(_)-Math.abs(A));b+=M}}return v({},e,k,{payload:e,value:s?l:l[1],cx:h,cy:y,innerRadius:f,outerRadius:b,startAngle:x,endAngle:w},C&&C[t]&&C[t].props)});return{data:k,layout:g}},u=f))||u;t.default=F},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(1),p=r(d),h=n(2),y=r(h),m=n(17),v=r(m),g=n(13),b=r(g),x=n(18),_=n(12),w=(0,b.default)((s=u=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),c(t,[{key:"getPath",value:function(e,t,n,r,a,i){return"M"+e+","+a+"v"+r+"M"+i+","+t+"h"+n}},{key:"render",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,a=e.height,i=e.top,o=e.left,l=e.className;return(0,x.isNumber)(t)&&(0,x.isNumber)(n)&&(0,x.isNumber)(r)&&(0,x.isNumber)(a)&&(0,x.isNumber)(i)&&(0,x.isNumber)(o)?p.default.createElement("path",f({},(0,_.getPresentationAttributes)(this.props),{className:(0,v.default)("recharts-cross",l),d:this.getPath(t,n,r,a,i,o)})):null}}]),t}(d.Component),u.displayName="Cross",u.propTypes=f({},_.PRESENTATION_ATTRIBUTES,{x:y.default.number,y:y.default.number,width:y.default.number,height:y.default.number,top:y.default.number,left:y.default.number,className:y.default.string}),u.defaultProps={x:0,y:0,top:0,left:0,width:0,height:0},l=s))||l;t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=!1;t.warn=function(e,t,n,a,i,o,l,u){if(r&&"undefined"!=typeof console&&console.warn&&(void 0===t&&console.warn("LogUtils requires an error message argument"),!e))if(void 0===t)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,a,i,o,l,u],f=0;console.warn(t.replace(/%s/g,function(){return s[f++]}))}}},[1913,559,560,298],function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){!function(e,r){r(t,n(212),n(315),n(182),n(346),n(247),n(349),n(213))}(this,function(e,t,n,r,a,i,o,l){"use strict";function u(e){function t(t){var n=t+"",o=r.get(n);if(!o){if(i!==K)return i;r.set(n,o=a.push(t))}return e[(o-1)%e.length]}var r=n.map(),a=[],i=K;return e=null==e?[]:W.call(e),t.domain=function(e){if(!arguments.length)return a.slice();a=[],r=n.map();for(var i,o,l=-1,u=e.length;++l<u;)r.has(o=(i=e[l])+"")||r.set(o,a.push(i));return t},t.range=function(n){return arguments.length?(e=W.call(n),t):e.slice()},t.unknown=function(e){return arguments.length?(i=e,t):i},t.copy=function(){return u().domain(a).range(e).unknown(i)},t}function s(){function e(){var e=i().length,a=l[1]<l[0],u=l[a-0],s=l[1-a];n=(s-u)/Math.max(1,e-c+2*d),f&&(n=Math.floor(n)),u+=(s-u-n*(e-c))*p,r=n*(1-c),f&&(u=Math.round(u),r=Math.round(r));var h=t.range(e).map(function(e){return u+n*e});return o(a?h.reverse():h)}var n,r,a=u().unknown(void 0),i=a.domain,o=a.range,l=[0,1],f=!1,c=0,d=0,p=.5;return delete a.unknown,a.domain=function(t){return arguments.length?(i(t),e()):i()},a.range=function(t){return arguments.length?(l=[+t[0],+t[1]],e()):l.slice()},a.rangeRound=function(t){return l=[+t[0],+t[1]],f=!0,e()},a.bandwidth=function(){return r},a.step=function(){return n},a.round=function(t){return arguments.length?(f=!!t,e()):f},a.padding=function(t){return arguments.length?(c=d=Math.max(0,Math.min(1,t)),e()):c},a.paddingInner=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),e()):c},a.paddingOuter=function(t){return arguments.length?(d=Math.max(0,Math.min(1,t)),e()):d},a.align=function(t){return arguments.length?(p=Math.max(0,Math.min(1,t)),e()):p},a.copy=function(){return s().domain(i()).range(l).round(f).paddingInner(c).paddingOuter(d).align(p)},e()}function f(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return f(t())},e}function c(){return f(s().paddingInner(1))}function d(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:U(t)}function p(e){return function(t,n){var r=e(t=+t,n=+n);return function(e){return e<=t?0:e>=n?1:r(e)}}}function h(e){return function(t,n){var r=e(t=+t,n=+n);return function(e){return e<=0?t:e>=1?n:r(e)}}}function y(e,t,n,r){var a=e[0],i=e[1],o=t[0],l=t[1];return i<a?(a=n(i,a),o=r(l,o)):(a=n(a,i),o=r(o,l)),function(e){return o(a(e))}}function m(e,n,r,a){var i=Math.min(e.length,n.length)-1,o=new Array(i),l=new Array(i),u=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),n=n.slice().reverse());++u<i;)o[u]=r(e[u],e[u+1]),l[u]=a(n[u],n[u+1]);return function(n){var r=t.bisect(e,n,1,i)-1;return l[r](o[r](n))}}function v(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp())}function g(e,t){function n(){return i=Math.min(u.length,s.length)>2?m:y,o=l=null,a}function a(t){return(o||(o=i(u,s,c?p(e):e,f)))(+t)}var i,o,l,u=H,s=H,f=r.interpolate,c=!1;return a.invert=function(e){return(l||(l=i(s,u,d,c?h(t):t)))(+e)},a.domain=function(e){ return arguments.length?(u=z.call(e,G),n()):u.slice()},a.range=function(e){return arguments.length?(s=W.call(e),n()):s.slice()},a.rangeRound=function(e){return s=W.call(e),f=r.interpolateRound,n()},a.clamp=function(e){return arguments.length?(c=!!e,n()):c},a.interpolate=function(e){return arguments.length?(f=e,n()):f},n()}function b(e){var n=e.domain;return e.ticks=function(e){var r=n();return t.ticks(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,t){return q(n(),e,t)},e.nice=function(r){null==r&&(r=10);var a,i=n(),o=0,l=i.length-1,u=i[o],s=i[l];return s<u&&(a=u,u=s,s=a,a=o,o=l,l=a),a=t.tickIncrement(u,s,r),a>0?(u=Math.floor(u/a)*a,s=Math.ceil(s/a)*a,a=t.tickIncrement(u,s,r)):a<0&&(u=Math.ceil(u*a)/a,s=Math.floor(s*a)/a,a=t.tickIncrement(u,s,r)),a>0?(i[o]=Math.floor(u/a)*a,i[l]=Math.ceil(s/a)*a,n(i)):a<0&&(i[o]=Math.ceil(u*a)/a,i[l]=Math.floor(s*a)/a,n(i)),e},e}function x(){var e=g(d,r.interpolateNumber);return e.copy=function(){return v(e,x())},b(e)}function _(){function e(e){return+e}var t=[0,1];return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=z.call(n,G),e):t.slice()},e.copy=function(){return _().domain(t)},b(e)}function w(e,t){return(t=Math.log(t/e))?function(n){return Math.log(n/e)/t}:U(t)}function O(e,t){return e<0?function(n){return-Math.pow(-t,n)*Math.pow(-e,1-n)}:function(n){return Math.pow(t,n)*Math.pow(e,1-n)}}function E(e){return isFinite(e)?+("1e"+e):e<0?0:e}function C(e){return 10===e?E:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function k(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}function T(e){return function(t){return-e(-t)}}function S(){function e(){return o=k(i),l=C(i),r()[0]<0&&(o=T(o),l=T(l)),n}var n=g(w,O).domain([1,10]),r=n.domain,i=10,o=k(10),l=C(10);return n.base=function(t){return arguments.length?(i=+t,e()):i},n.domain=function(t){return arguments.length?(r(t),e()):r()},n.ticks=function(e){var n,a=r(),u=a[0],s=a[a.length-1];(n=s<u)&&(p=u,u=s,s=p);var f,c,d,p=o(u),h=o(s),y=null==e?10:+e,m=[];if(!(i%1)&&h-p<y){if(p=Math.round(p)-1,h=Math.round(h)+1,u>0){for(;p<h;++p)for(c=1,f=l(p);c<i;++c)if(d=f*c,!(d<u)){if(d>s)break;m.push(d)}}else for(;p<h;++p)for(c=i-1,f=l(p);c>=1;--c)if(d=f*c,!(d<u)){if(d>s)break;m.push(d)}}else m=t.ticks(p,h,Math.min(h-p,y)).map(l);return n?m.reverse():m},n.tickFormat=function(e,t){if(null==t&&(t=10===i?".0e":","),"function"!=typeof t&&(t=a.format(t)),e===1/0)return t;null==e&&(e=10);var r=Math.max(1,i*e/n.ticks().length);return function(e){var n=e/l(Math.round(o(e)));return n*i<i-.5&&(n*=i),n<=r?t(e):""}},n.nice=function(){return r(Y(r(),{floor:function(e){return l(Math.floor(o(e)))},ceil:function(e){return l(Math.ceil(o(e)))}}))},n.copy=function(){return v(n,S().base(i))},n}function A(e,t){return e<0?-Math.pow(-e,t):Math.pow(e,t)}function M(){function e(e,t){return(t=A(t,n)-(e=A(e,n)))?function(r){return(A(r,n)-e)/t}:U(t)}function t(e,t){return t=A(t,n)-(e=A(e,n)),function(r){return A(e+t*r,1/n)}}var n=1,r=g(e,t),a=r.domain;return r.exponent=function(e){return arguments.length?(n=+e,a(a())):n},r.copy=function(){return v(r,M().exponent(n))},b(r)}function P(){return M().exponent(.5)}function N(){function e(){var e=0,o=Math.max(1,a.length);for(i=new Array(o-1);++e<o;)i[e-1]=t.quantile(r,e/o);return n}function n(e){if(!isNaN(e=+e))return a[t.bisect(i,e)]}var r=[],a=[],i=[];return n.invertExtent=function(e){var t=a.indexOf(e);return t<0?[NaN,NaN]:[t>0?i[t-1]:r[0],t<i.length?i[t]:r[r.length-1]]},n.domain=function(n){if(!arguments.length)return r.slice();r=[];for(var a,i=0,o=n.length;i<o;++i)a=n[i],null==a||isNaN(a=+a)||r.push(a);return r.sort(t.ascending),e()},n.range=function(t){return arguments.length?(a=W.call(t),e()):a.slice()},n.quantiles=function(){return i.slice()},n.copy=function(){return N().domain(r).range(a)},n}function j(){function e(e){if(e<=e)return l[t.bisect(o,e,0,i)]}function n(){var t=-1;for(o=new Array(i);++t<i;)o[t]=((t+1)*a-(t-i)*r)/(i+1);return e}var r=0,a=1,i=1,o=[.5],l=[0,1];return e.domain=function(e){return arguments.length?(r=+e[0],a=+e[1],n()):[r,a]},e.range=function(e){return arguments.length?(i=(l=W.call(e)).length-1,n()):l.slice()},e.invertExtent=function(e){var t=l.indexOf(e);return t<0?[NaN,NaN]:t<1?[r,o[0]]:t>=i?[o[i-1],a]:[o[t-1],o[t]]},e.copy=function(){return j().domain([r,a]).range(l)},b(e)}function R(){function e(e){if(e<=e)return r[t.bisect(n,e,0,a)]}var n=[.5],r=[0,1],a=1;return e.domain=function(t){return arguments.length?(n=W.call(t),a=Math.min(n.length,r.length-1),e):n.slice()},e.range=function(t){return arguments.length?(r=W.call(t),a=Math.min(n.length,r.length-1),e):r.slice()},e.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},e.copy=function(){return R().domain(n).range(r)},e}function I(e){return new Date(e)}function D(e){return e instanceof Date?+e:+new Date(+e)}function L(e,n,a,i,o,l,u,s,f){function c(t){return(u(t)<t?b:l(t)<t?x:o(t)<t?_:i(t)<t?w:n(t)<t?a(t)<t?O:E:e(t)<t?C:k)(t)}function p(n,r,a,i){if(null==n&&(n=10),"number"==typeof n){var o=Math.abs(a-r)/n,l=t.bisector(function(e){return e[2]}).right(T,o);l===T.length?(i=t.tickStep(r/te,a/te,n),n=e):l?(l=T[o/T[l-1][2]<T[l][2]/o?l-1:l],i=l[1],n=l[0]):(i=t.tickStep(r,a,n),n=s)}return null==i?n:n.every(i)}var h=g(d,r.interpolateNumber),y=h.invert,m=h.domain,b=f(".%L"),x=f(":%S"),_=f("%I:%M"),w=f("%I %p"),O=f("%a %d"),E=f("%b %d"),C=f("%B"),k=f("%Y"),T=[[u,1,X],[u,5,5*X],[u,15,15*X],[u,30,30*X],[l,1,J],[l,5,5*J],[l,15,15*J],[l,30,30*J],[o,1,$],[o,3,3*$],[o,6,6*$],[o,12,12*$],[i,1,Z],[i,2,2*Z],[a,1,Q],[n,1,ee],[n,3,3*ee],[e,1,te]];return h.invert=function(e){return new Date(y(e))},h.domain=function(e){return arguments.length?m(z.call(e,D)):m().map(I)},h.ticks=function(e,t){var n,r=m(),a=r[0],i=r[r.length-1],o=i<a;return o&&(n=a,a=i,i=n),n=p(e,a,i,t),n=n?n.range(a,i+1):[],o?n.reverse():n},h.tickFormat=function(e,t){return null==t?c:f(t)},h.nice=function(e,t){var n=m();return(e=p(e,n[0],n[n.length-1],t))?m(Y(n,e)):h},h.copy=function(){return v(h,L(e,n,a,i,o,l,u,s,f))},h}function B(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function V(e){function t(t){var i=(t-n)/(r-n);return e(a?Math.max(0,Math.min(1,i)):i)}var n=0,r=1,a=!1;return t.domain=function(e){return arguments.length?(n=+e[0],r=+e[1],t):[n,r]},t.clamp=function(e){return arguments.length?(a=!!e,t):a},t.interpolator=function(n){return arguments.length?(e=n,t):e},t.copy=function(){return V(e).domain([n,r]).clamp(a)},b(t)}var F=Array.prototype,z=F.map,W=F.slice,K={name:"implicit"},U=function(e){return function(){return e}},G=function(e){return+e},H=[0,1],q=function(e,n,r){var i,o=e[0],l=e[e.length-1],u=t.tickStep(o,l,null==n?10:n);switch(r=a.formatSpecifier(null==r?",f":r),r.type){case"s":var s=Math.max(Math.abs(o),Math.abs(l));return null!=r.precision||isNaN(i=a.precisionPrefix(u,s))||(r.precision=i),a.formatPrefix(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=a.precisionRound(u,Math.max(Math.abs(o),Math.abs(l))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=a.precisionFixed(u))||(r.precision=i-2*("%"===r.type))}return a.format(r)},Y=function(e,t){e=e.slice();var n,r=0,a=e.length-1,i=e[r],o=e[a];return o<i&&(n=r,r=a,a=n,n=i,i=o,o=n),e[r]=t.floor(i),e[a]=t.ceil(o),e},X=1e3,J=60*X,$=60*J,Z=24*$,Q=7*Z,ee=30*Z,te=365*Z,ne=function(){return L(i.timeYear,i.timeMonth,i.timeWeek,i.timeDay,i.timeHour,i.timeMinute,i.timeSecond,i.timeMillisecond,o.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)])},re=function(){return L(i.utcYear,i.utcMonth,i.utcWeek,i.utcDay,i.utcHour,i.utcMinute,i.utcSecond,i.utcMillisecond,o.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])},ae=function(e){return e.match(/.{6}/g).map(function(e){return"#"+e})},ie=ae("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),oe=ae("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),le=ae("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),ue=ae("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),se=r.interpolateCubehelixLong(l.cubehelix(300,.5,0),l.cubehelix(-240,.5,1)),fe=r.interpolateCubehelixLong(l.cubehelix(-100,.75,.35),l.cubehelix(80,1.5,.8)),ce=r.interpolateCubehelixLong(l.cubehelix(260,.75,.35),l.cubehelix(80,1.5,.8)),de=l.cubehelix(),pe=function(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return de.h=360*e-100,de.s=1.5-1.5*t,de.l=.8-.9*t,de+""},he=B(ae("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),ye=B(ae("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),me=B(ae("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ve=B(ae("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));e.scaleBand=s,e.scalePoint=c,e.scaleIdentity=_,e.scaleLinear=x,e.scaleLog=S,e.scaleOrdinal=u,e.scaleImplicit=K,e.scalePow=M,e.scaleSqrt=P,e.scaleQuantile=N,e.scaleQuantize=j,e.scaleThreshold=R,e.scaleTime=ne,e.scaleUtc=re,e.schemeCategory10=ie,e.schemeCategory20b=oe,e.schemeCategory20c=le,e.schemeCategory20=ue,e.interpolateCubehelixDefault=se,e.interpolateRainbow=pe,e.interpolateWarm=fe,e.interpolateCool=ce,e.interpolateViridis=he,e.interpolateMagma=ye,e.interpolateInferno=me,e.interpolatePlasma=ve,e.scaleSequential=V,Object.defineProperty(e,"__esModule",{value:!0})})},,,,,,,,,,function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=a(i),l=n(9),u=a(l),s=n(3),f=a(s),c=n(8),d=a(c),p=n(5),h=a(p),y=n(4),m=a(y),v=n(1),g=r(v),b=n(10),x=r(b),_=n(30),w=a(_),O=n(7),E=a(O),C=n(147),k=a(C),T=n(14),S=a(T),A=n(455),M=a(A),P=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]]);return n},N=function(e){function t(e){(0,f.default)(this,t);var n=(0,h.default)(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.close=function(e){var t=n.props.onClose;if(t&&t(e),!e.defaultPrevented){var r=x.findDOMNode(n);r.style.width=r.getBoundingClientRect().width+"px",r.style.width=r.getBoundingClientRect().width+"px",n.setState({closing:!0})}},n.animationEnd=function(e,t){if(!t&&!n.state.closed){n.setState({closed:!0,closing:!1});var r=n.props.afterClose;r&&r()}},n.state={closing:!1,closed:!1},n}return(0,m.default)(t,e),(0,d.default)(t,[{key:"isPresetColor",value:function(e){return!!e&&/^(pink|red|yellow|orange|cyan|green|blue|purple|geekblue|magenta|volcano|gold|lime)(-inverse)?$/.test(e)}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,r=t.closable,a=t.color,i=t.className,l=t.children,s=t.style,f=P(t,["prefixCls","closable","color","className","children","style"]),c=r?g.createElement(S.default,{type:"cross",onClick:this.close}):"",d=this.isPresetColor(a),p=(0,E.default)(n,(e={},(0,u.default)(e,n+"-"+a,d),(0,u.default)(e,n+"-has-color",a&&!d),(0,u.default)(e,n+"-close",this.state.closing),e),i),h=(0,k.default)(f,["onClose","afterClose"]),y=(0,o.default)({backgroundColor:a&&!d?a:null},s),m=this.state.closed?null:g.createElement("div",(0,o.default)({"data-show":!this.state.closing},h,{className:p,style:y}),l,c);return g.createElement(w.default,{component:"",showProp:"data-show",transitionName:n+"-zoom",transitionAppear:!0,onEnd:this.animationEnd},m)}}]),t}(g.Component);t.default=N,N.CheckableTag=M.default,N.defaultProps={prefixCls:"ant-tag",closable:!1},e.exports=t.default},[1970,459],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=a(i),l=n(9),u=a(l),s=n(3),f=a(s),c=n(8),d=a(c),p=n(5),h=a(p),y=n(4),m=a(y),v=n(1),g=r(v),b=n(7),x=a(b),_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&(n[r[a]]=e[r[a]]);return n},w=function(e){function t(){(0,f.default)(this,t);var e=(0,h.default)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.handleClick=function(){var t=e.props,n=t.checked,r=t.onChange;r&&r(!n)},e}return(0,m.default)(t,e),(0,d.default)(t,[{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,r=void 0===n?"ant-tag":n,a=t.className,i=t.checked,l=_(t,["prefixCls","className","checked"]),s=(0,x.default)(r,(e={},(0,u.default)(e,r+"-checkable",!0),(0,u.default)(e,r+"-checkable-checked",i),e),a);return delete l.onChange,g.createElement("div",(0,o.default)({},l,{className:s,onClick:this.handleClick}))}}]),t}(g.Component);t.default=w,e.exports=t.default},,,,11,,,,,,,,,,,,,,,,,function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function a(e){return"number"==typeof e}function i(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!a(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,a,l,u,s;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var f=new Error('Uncaught, unspecified "error" event. ('+t+")");throw f.context=t,f}if(n=this._events[e],o(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:l=Array.prototype.slice.call(arguments,1),n.apply(this,l)}else if(i(n))for(l=Array.prototype.slice.call(arguments,1),s=n.slice(),a=s.length,u=0;u<a;u++)s[u].apply(this,l);return!0},n.prototype.addListener=function(e,t){var a;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned&&(a=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,a&&a>0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),a||(a=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var a=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,a,o,l;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,a=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(l=o;l-- >0;)if(n[l]===t||n[l].listener&&n[l].listener===t){a=l;break}if(a<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},,,function(e,t,n){function r(e,t){var n=[];return a(e,function(e,r,a){t(e,r,a)&&n.push(e)}),n}var a=n(352);e.exports=r},function(e,t,n){function r(e,t){return e&&a(e,t,i)}var a=n(163),i=n(153);e.exports=r},,function(e,t,n){function r(e,t,n){for(var r=n?o:i,c=e[0].length,d=e.length,p=d,h=Array(d),y=1/0,m=[];p--;){var v=e[p];p&&t&&(v=l(v,u(t))),y=f(v.length,y),h[p]=!n&&(t||c>=120&&v.length>=120)?new a(p&&v):void 0}v=e[0];var g=-1,b=h[0];e:for(;++g<c&&m.length<y;){var x=v[g],_=t?t(x):x;if(x=n||0!==x?x:0,!(b?s(b,_):r(m,_,n))){for(p=d;--p;){var w=h[p];if(!(w?s(w,_):r(e[p],_,n)))continue e}b&&b.push(_),m.push(x)}}return m}var a=n(206),i=n(334),o=n(335),l=n(207),u=n(84),s=n(208),f=Math.min;e.exports=r},function(e,t,n){function r(e,t,n){var r=-1;t=a(t.length?t:[f],u(i));var c=o(e,function(e,n,i){var o=a(t,function(t){return t(e)});return{criteria:o,index:++r,value:e}});return l(c,function(e,t){return s(e,t,n)})}var a=n(207),i=n(96),o=n(363),l=n(485),u=n(84),s=n(489),f=n(49);e.exports=r},function(e,t){function n(e,t,n,i){for(var o=-1,l=a(r((t-e)/(n||1)),0),u=Array(l);l--;)u[i?l:++o]=e,e+=n;return u}var r=Math.ceil,a=Math.max;e.exports=n},function(e,t){function n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}e.exports=n},function(e,t){function n(e,t){for(var n,r=-1,a=e.length;++r<a;){var i=t(e[r]);void 0!==i&&(n=void 0===n?i:n+i)}return n}e.exports=n},function(e,t,n){function r(e){return a(e)?e:[]}var a=n(164);e.exports=r},function(e,t,n){function r(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e===e,o=a(e),l=void 0!==t,u=null===t,s=t===t,f=a(t);if(!u&&!f&&!o&&e>t||o&&l&&s&&!u&&!f||r&&l&&s||!n&&s||!i)return 1;if(!r&&!o&&!f&&e<t||f&&n&&i&&!r&&!o||u&&n&&i||!l&&i||!s)return-1}return 0}var a=n(338);e.exports=r},function(e,t,n){function r(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,l=i.length,u=n.length;++r<l;){var s=a(i[r],o[r]);if(s){if(r>=u)return s;var f=n[r];return s*("desc"==f?-1:1)}}return e.index-t.index}var a=n(488);e.exports=r},function(e,t,n){function r(e,t){return function(n,r){if(null==n)return n;if(!a(n))return e(n,r);for(var i=n.length,o=t?i:-1,l=Object(n);(t?o--:++o<i)&&r(l[o],o,l)!==!1;);return n}}var a=n(38);e.exports=r},function(e,t,n){function r(e){return function(t,n,r){return r&&"number"!=typeof r&&i(t,n,r)&&(n=r=void 0),t=o(t),void 0===n?(n=t,t=0):n=o(n),r=void 0===r?t<n?1:-1:o(r),a(t,n,r,e)}}var a=n(484),i=n(137),o=n(503);e.exports=r},,function(e,t,n){function r(e){return o(e)||i(e)||!!(l&&e&&e[l])}var a=n(310),i=n(129),o=n(19),l=a?a.isConcatSpreadable:void 0;e.exports=r},function(e,t,n){function r(e,t){var n=l(e)?a:i;return n(e,o(t,3))}var a=n(250),i=n(479),o=n(96),l=n(19);e.exports=r},function(e,t,n){function r(e,t){return a(i(e,t),1)}var a=n(354),i=n(498);e.exports=r},function(e,t,n){var r=n(207),a=n(482),i=n(136),o=n(487),l=i(function(e){var t=r(e,o);return t.length&&t[0]===e[0]?a(t):[]});e.exports=l},function(e,t){function n(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}e.exports=n},function(e,t,n){function r(e,t){var n=l(e)?a:o;return n(e,i(t,3))}var a=n(207),i=n(96),o=n(363),l=n(19);e.exports=r},function(e,t,n){function r(e){return e&&e.length?a(e,o,i):void 0}var a=n(184),i=n(356),o=n(49);e.exports=r},function(e,t,n){function r(e,t){return e&&e.length?a(e,i(t,2),o):void 0}var a=n(184),i=n(96),o=n(362);e.exports=r},function(e,t,n){function r(e,t){return e&&e.length?i(e,a(t,2)):0}var a=n(96),i=n(486);e.exports=r},function(e,t,n){function r(e,t,n){var r=!0,l=!0;if("function"!=typeof e)throw new TypeError(o);return i(n)&&(r="leading"in n?!!n.leading:r,l="trailing"in n?!!n.trailing:l),a(e,t,{leading:r,maxWait:t,trailing:l})}var a=n(337),i=n(27),o="Expected a function";e.exports=r},function(e,t,n){function r(e){if(!e)return 0===e?e:0;if(e=a(e),e===i||e===-i){var t=e<0?-1:1;return t*o}return e===e?e:0}var a=n(643),i=1/0,o=1.7976931348623157e308;e.exports=r},function(e,t,n){var r=n(508);r.prototype.formulaEval=function(){"use strict";for(var e,t,n,r=[],a=this.value,i=0;i<a.length;i++)1===a[i].type||3===a[i].type?r.push({value:3===a[i].type?a[i].show:a[i].value,type:1}):13===a[i].type?r.push({value:a[i].show,type:1}):0===a[i].type?r[r.length-1]={value:a[i].show+("-"!=a[i].show?"(":"")+r[r.length-1].value+("-"!=a[i].show?")":""),type:0}:7===a[i].type?r[r.length-1]={value:(1!=r[r.length-1].type?"(":"")+r[r.length-1].value+(1!=r[r.length-1].type?")":"")+a[i].show,type:7}:10===a[i].type?(e=r.pop(),t=r.pop(),"P"===a[i].show||"C"===a[i].show?r.push({value:"<sup>"+t.value+"</sup>"+a[i].show+"<sub>"+e.value+"</sub>",type:10}):r.push({value:(1!=t.type?"(":"")+t.value+(1!=t.type?")":"")+"<sup>"+e.value+"</sup>",type:1})):2===a[i].type||9===a[i].type?(e=r.pop(),t=r.pop(),r.push({value:(1!=t.type?"(":"")+t.value+(1!=t.type?")":"")+a[i].show+(1!=e.type?"(":"")+e.value+(1!=e.type?")":""),type:a[i].type})):12===a[i].type&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:a[i].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value},e.exports=r},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++)e[n]+=t;return e}function a(e,t,n,r){for(var a=0;a<r;a++)if(e[n+a]!==t[a])return!1;return!0}var o=n(506),l=["sin","cos","tan","pi","(",")","P","C","asin","acos","atan","7","8","9","int","cosh","acosh","ln","^","root","4","5","6","/","!","tanh","atanh","Mod","1","2","3","*","sinh","asinh","e","log","0",".","+","-",",","Sigma","n","Pi","pow"],u=["sin","cos","tan","&pi;","(",")","P","C","asin","acos","atan","7","8","9","Int","cosh","acosh"," ln","^","root","4","5","6","&divide;","!","tanh","atanh"," Mod ","1","2","3","&times;","sinh","asinh","e"," log","0",".","+","-",",","&Sigma;","n","&Pi;","pow"],s=[o.math.sin,o.math.cos,o.math.tan,"PI","(",")",o.math.P,o.math.C,o.math.asin,o.math.acos,o.math.atan,"7","8","9",Math.floor,o.math.cosh,o.math.acosh,Math.log,Math.pow,Math.sqrt,"4","5","6",o.math.div,o.math.fact,o.math.tanh,o.math.atanh,o.math.mod,"1","2","3",o.math.mul,o.math.sinh,o.math.asinh,"E",o.math.log,"0",".",o.math.add,o.math.sub,",",o.math.sigma,"n",o.math.Pi,Math.pow],f={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0},c=[0,0,0,3,4,5,10,10,0,0,0,1,1,1,0,0,0,0,10,0,1,1,1,2,7,0,0,2,1,1,1,2,0,0,3,0,1,6,9,9,11,12,13,12,8],d={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0},p={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0},h={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0},m={},v={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0},g={1:!0},b=[[],["1","2","3","7","8","9","4","5","6","+","-","*","/","(",")","^","!","P","C","e","0",".",",","n"],["pi","ln","Pi"],["sin","cos","tan","Del","int","Mod","log","pow"],["asin","acos","atan","cosh","root","tanh","sinh"],["acosh","atanh","asinh","Sigma"]];o.addToken=function(e){for(i=0;i<e.length;i++){x=e[i].token.length;var t=-1;if(x<b.length)for(y=0;y<b[x].length;y++)if(e[i].token===b[x][y]){t=l.indexOf(b[x][y]);break}t===-1?(l.push(e[i].token),c.push(e[i].type),b.length<=e[i].token.length&&(b[e[i].token.length]=[]),b[e[i].token.length].push(e[i].token),s.push(e[i].value),u.push(e[i].show)):(l[t]=e[i].token,c[t]=e[i].type,s[t]=e[i].value,u[t]=e[i].show)}},o.lex=function(e,t){"use strict";var n,i,y,x,_=[{type:4,value:"(",show:"(",pre:0}],w=[],O=e,E=0,C=d,k=0,T=m,S="";"undefined"!=typeof t&&o.addToken(t);var A={};for(i=0;i<O.length;i++)if(" "!=O[i]){n="";e:for(y=O.length-i>b.length-2?b.length-1:O.length-i;y>0;y--)for(x=0;x<b[y].length;x++)if(a(O,b[y][x],i,y)){n=b[y][x];break e}if(i+=n.length-1,""===n)throw new o.exception("Can't understand after "+O.slice(i));var M=l.indexOf(n),P=n,N=c[M],j=s[M],R=f[N],I=u[M],D=_[_.length-1];for(L=w.length;L--;)if(0===w[L]&&[0,2,3,5,9,11,12,13].indexOf(N)!==-1){if(C[N]!==!0)throw new o.exception(n+" is not allowed after "+S);_.push({value:")",type:5,pre:0,show:")"}),C=p,T=v,r(w,-1).pop()}if(C[N]!==!0)throw new o.exception(n+" is not allowed after "+S);if(T[N]===!0&&(N=2,j=o.math.mul,I="&times;",R=3,i-=n.length),A={value:j,type:N,pre:R,show:I},0===N)C=d,T=m,r(w,2).push(2),_.push(A),_.push({value:"(",type:4,pre:0,show:"("});else if(1===N)1===D.type?(D.value+=j,r(w,1)):_.push(A),C=p,T=h;else if(2===N)C=d,T=m,r(w,2),_.push(A);else if(3===N)_.push(A),C=p,T=v;else if(4===N)E+=w.length,w=[],k++,C=d,T=m,_.push(A);else if(5===N){if(!k)throw new o.exception("Closing parenthesis are more than opening one, wait What!!!");for(;E--;)_.push({value:")",type:5,pre:0,show:")"});E=0,k--,C=p,T=v,_.push(A)}else if(6===N){if(D.hasDec)throw new o.exception("Two decimals are not allowed in one number");1!==D.type&&(D={value:0,type:1,pre:0},_.push(D),r(w,-1)),C=g,r(w,1),T=m,D.value+=j,D.hasDec=!0}else 7===N&&(C=p,T=v,r(w,1),_.push(A));8===N?(C=d,T=m,r(w,4).push(4),_.push(A),_.push({value:"(",type:4,pre:0,show:"("})):9===N?(9===D.type?D.value===o.math.add?(D.value=j,D.show=I,r(w,1)):D.value===o.math.sub&&"-"===I&&(D.value=o.math.add,D.show="+",r(w,1)):5!==D.type&&7!==D.type&&1!==D.type&&3!==D.type&&13!==D.type?"-"===P&&(C=d,T=m,r(w,2).push(2),_.push({value:o.math.changeSign,type:0,pre:21,show:"-"}),_.push({value:"(",type:4,pre:0,show:"("})):(_.push(A),r(w,2)),C=d,T=m):10===N?(C=d,T=m,r(w,2),_.push(A)):11===N?(C=d,T=m,_.push(A)):12===N?(C=d,T=m,r(w,6).push(6),_.push(A),_.push({value:"(",type:4,pre:0})):13===N&&(C=p, T=v,_.push(A)),r(w,-1),S=n}for(var L=w.length;L--;)0===w[L]&&(_.push({value:")",show:")",type:5,pre:3}),r(w,-1).pop());if(C[5]!==!0)throw new o.exception("complete the expression");for(;k--;)_.push({value:")",show:")",type:5,pre:3});return _.push({type:5,value:")",show:")",pre:0}),new o(_)},e.exports=o},function(e,t){var n=function(e){this.value=e};n.math={isDegree:!0,acos:function(e){return n.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return n.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return n.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,t){var r=1,a=e-t,i=t;i<a&&(i=a,a=t);for(var o=i+1;o<=e;o++)r*=o;return r/n.math.fact(a)},changeSign:function(e){return-e},cos:function(e){return n.math.isDegree&&(e=n.math.toRadian(e)),Math.cos(e)},cosh:function(e){return(Math.pow(Math.E,e)+Math.pow(Math.E,-1*e))/2},div:function(e,t){return e/t},fact:function(e){if(e%1!==0)return"NAN";for(var t=1,n=2;n<=e;n++)t*=n;return t},inverse:function(e){return 1/e},log:function(e){return Math.log(e)/Math.log(10)},mod:function(e,t){return e%t},mul:function(e,t){return e*t},P:function(e,t){for(var n=1,r=Math.floor(e)-Math.floor(t)+1;r<=Math.floor(e);r++)n*=r;return n},Pi:function(e,t,n){for(var r=1,a=e;a<=t;a++)r*=Number(n.postfixEval({n:a}));return r},pow10x:function(e){for(var t=1;e--;)t*=10;return t},sigma:function(e,t,n){for(var r=0,a=e;a<=t;a++)r+=Number(n.postfixEval({n:a}));return r},sin:function(e){return n.math.isDegree&&(e=n.math.toRadian(e)),Math.sin(e)},sinh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-1*e))/2},sub:function(e,t){return e-t},tan:function(e){return n.math.isDegree&&(e=n.math.toRadian(e)),Math.tan(e)},tanh:function(e){return n.sinha(e)/n.cosha(e)},toRadian:function(e){return e*Math.PI/180}},n.exception=function(e){this.message=e},e.exports=n},function(e,t,n){var r=n(505);r.prototype.toPostfix=function(){"use strict";for(var e,t,n,a,i,o=[],l=[{value:"(",type:4,pre:0}],u=this.value,s=1;s<u.length;s++)if(1===u[s].type||3===u[s].type||13===u[s].type)1===u[s].type&&(u[s].value=Number(u[s].value)),o.push(u[s]);else if(4===u[s].type)l.push(u[s]);else if(5===u[s].type)for(;4!==(t=l.pop()).type;)o.push(t);else if(11===u[s].type){for(;4!==(t=l.pop()).type;)o.push(t);l.push(t)}else{e=u[s],a=e.pre,i=l[l.length-1],n=i.pre;var f="Math.pow"==i.value&&"Math.pow"==e.value;if(a>n)l.push(e);else{for(;n>=a&&!f||f&&a<n;)t=l.pop(),i=l[l.length-1],o.push(t),n=i.pre,f="Math.pow"==e.value&&"Math.pow"==i.value;l.push(e)}}return new r(o)},e.exports=r},function(e,t,n){var r=n(507);r.prototype.postfixEval=function(e){"use strict";e=e||{},e.PI=Math.PI,e.E=Math.E;for(var t,n,a,i=[],o=this.value,l="undefined"!=typeof e.n,u=0;u<o.length;u++)1===o[u].type?i.push({value:o[u].value,type:1}):3===o[u].type?i.push({value:e[o[u].value],type:1}):0===o[u].type?"undefined"==typeof i[i.length-1].type?i[i.length-1].value.push(o[u]):i[i.length-1].value=o[u].value(i[i.length-1].value):7===o[u].type?"undefined"==typeof i[i.length-1].type?i[i.length-1].value.push(o[u]):i[i.length-1].value=o[u].value(i[i.length-1].value):8===o[u].type?(t=i.pop(),n=i.pop(),i.push({type:1,value:o[u].value(n.value,t.value)})):10===o[u].type?(t=i.pop(),n=i.pop(),"undefined"==typeof n.type?(n.value=n.concat(t),n.value.push(o[u]),i.push(n)):"undefined"==typeof t.type?(t.unshift(n),t.push(o[u]),i.push(t)):i.push({type:1,value:o[u].value(n.value,t.value)})):2===o[u].type||9===o[u].type?(t=i.pop(),n=i.pop(),"undefined"==typeof n.type?(console.log(n),n=n.concat(t),n.push(o[u]),i.push(n)):"undefined"==typeof t.type?(t.unshift(n),t.push(o[u]),i.push(t)):i.push({type:1,value:o[u].value(n.value,t.value)})):12===o[u].type?(t=i.pop(),"undefined"!=typeof t.type&&(t=[t]),n=i.pop(),a=i.pop(),i.push({type:1,value:o[u].value(a.value,n.value,new r(t))})):13===o[u].type&&(l?i.push({value:e[o[u].value],type:3}):i.push([o[u]]));if(i.length>1)throw new r.exception("Uncaught Syntax error");return i[0].value>1e15?"Infinity":parseFloat(i[0].value.toFixed(15))},r.eval=function(e,t,n){return"undefined"==typeof t?this.lex(e).toPostfix().postfixEval():"undefined"==typeof n?"undefined"!=typeof t.length?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t):this.lex(e,t).toPostfix().postfixEval(n)},e.exports=r},,,,,,,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(r=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(a)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(1),c=r(f),d=n(2),p=r(d),h=n(518),y=function(e){function t(){a(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.state={expandChildHeight:0,expandChildWidth:0,expandScrollLeft:0,expandScrollTop:0,shrinkScrollTop:0,shrinkScrollLeft:0,lastWidth:0,lastHeight:0},e.reset=e.reset.bind(e),e.handleScroll=e.handleScroll.bind(e),e}return o(t,e),s(t,[{key:"componentWillMount",value:function(){this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.containerSize(),t=u(e,2),n=t[0],r=t[1];this.reset(n,r),this.props.onResize(n,r)}},{key:"shouldComponentUpdate",value:function(e,t){return this.props!==e||this.state!==t}},{key:"componentDidUpdate",value:function(){this.expand.scrollLeft=this.expand.scrollWidth,this.expand.scrollTop=this.expand.scrollHeight,this.shrink.scrollLeft=this.shrink.scrollWidth,this.shrink.scrollTop=this.shrink.scrollHeight}},{key:"containerSize",value:function(){return[this.props.handleWidth&&this.container.parentElement.offsetWidth,this.props.handleHeight&&this.container.parentElement.offsetHeight]}},{key:"reset",value:function(e,t){if("undefined"!=typeof window){var n=this.container.parentElement,r="static";n.currentStyle?r=n.currentStyle.position:window.getComputedStyle&&(r=window.getComputedStyle(n).position),"static"===r&&(n.style.position="relative"),this.setState({expandChildHeight:this.expand.offsetHeight+10,expandChildWidth:this.expand.offsetWidth+10,lastWidth:e,lastHeight:t})}}},{key:"handleScroll",value:function(e){if("undefined"!=typeof window){e.preventDefault(),e.stopPropagation();var t=this.state,n=this.containerSize(),r=u(n,2),a=r[0],i=r[1];a===t.lastWidth&&i===t.lastHeight||this.props.onResize(a,i),this.reset(a,i)}}},{key:"render",value:function(){var e=this,t=this.state,n=l({},h.expandChildStyle,{width:t.expandChildWidth,height:t.expandChildHeight});return c.default.createElement("div",{style:h.parentStyle,ref:function(t){e.container=t}},c.default.createElement("div",{style:h.parentStyle,onScroll:this.handleScroll,ref:function(t){e.expand=t}},c.default.createElement("div",{style:n})),c.default.createElement("div",{style:h.parentStyle,onScroll:this.handleScroll,ref:function(t){e.shrink=t}},c.default.createElement("div",{style:h.shrinkChildStyle})))}}]),t}(f.Component);t.default=y,y.propTypes={handleWidth:p.default.bool,handleHeight:p.default.bool,onResize:p.default.func},y.defaultProps={handleWidth:!1,handleHeight:!1,onResize:function(e){return e}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.parentStyle={position:"absolute",left:0,top:0,right:0,bottom:0,overflow:"hidden",zIndex:-1,visibility:"hidden"},t.shrinkChildStyle={position:"absolute",left:0,top:0,width:"200%",height:"200%"},t.expandChildStyle={position:"absolute",left:0,top:0,width:"100%",height:"100%"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(517),i=r(a);t.default=i.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(1),c=r(f),d=n(527),p=r(d),h=n(2),y=r(h),m=n(521),v=r(m),g=(u=l=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"render",value:function(){var e=this.props,t=e.component,n=e.children,r=e.appear,a=e.enter,i=e.leave;return c.default.createElement(p.default,{component:t},f.Children.map(n,function(e,t){return c.default.createElement(v.default,{appearOptions:r,enterOptions:a,leaveOptions:i,key:"child-"+t},e)}))}}]),t}(f.Component),l.propTypes={appear:y.default.object,enter:y.default.object,leave:y.default.object,children:y.default.oneOfType([y.default.array,y.default.element]),component:y.default.any},l.defaultProps={component:"span"},u);t.default=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u,s,f=n(265),c=r(f),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=n(1),y=r(h),m=n(526),v=r(m),g=n(2),b=r(g),x=n(389),_=r(x),w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.steps,n=e.duration;return t&&t.length?t.reduce(function(e,t){return e+((0,c.default)(t.duration)&&t.duration>0?t.duration:0)},0):(0,c.default)(n)?n:0},O=(s=u=function(e){function t(){var e,n,r,a;i(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={isActive:!1},r.handleEnter=function(e,t){var n=r.props,a=n.appearOptions,i=n.enterOptions;r.handleStyleActive(t?a:i)},r.handleExit=function(){r.handleStyleActive(r.props.leaveOptions)},a=n,o(r,a)}return l(t,e),p(t,[{key:"handleStyleActive",value:function(e){if(e){var t=e.onAnimationEnd?function(){e.onAnimationEnd()}:null;this.setState(d({},e,{onAnimationEnd:t,isActive:!0}))}}},{key:"parseTimeout",value:function(){var e=this.props,t=e.appearOptions,n=e.enterOptions,r=e.leaveOptions;return w(t)+w(n)+w(r)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=(t.appearOptions,t.enterOptions,t.leaveOptions,a(t,["children","appearOptions","enterOptions","leaveOptions"]));return y.default.createElement(v.default,d({},r,{onEnter:this.handleEnter,onExit:this.handleExit,timeout:this.parseTimeout()}),function(t){return y.default.createElement(_.default,e.state,h.Children.only(n))})}}]),t}(h.Component),u.propTypes={appearOptions:b.default.object,enterOptions:b.default.object,leaveOptions:b.default.object,children:b.default.element},s);t.default=O},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){return Array.isArray(e)?e:Array.from(e)}function i(){var e={},t=function(){return null},n=!1,r=function r(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var l=i,s=a(l),f=s[0],c=s.slice(1);return"number"==typeof f?void(0,u.default)(r.bind(null,c),f):(r(f),void(0,u.default)(r.bind(null,c)))}"object"===("undefined"==typeof i?"undefined":o(i))&&(e=i,t(e)),"function"==typeof i&&i()}};return{stop:function(){n=!0},start:function(e){n=!1,r(e)},subscribe:function(e){return t=e,function(){t=function(){return null}}}}}Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=i;var l=n(525),u=r(l)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(e===t)return!0;if("object"!==("undefined"==typeof e?"undefined":h(e))||null===e||"object"!==("undefined"==typeof t?"undefined":h(t))||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=hasOwnProperty.bind(t),i=0;i<n.length;i++){var o=n[i];if(e[o]!==t[o])if((0,p.default)(e[o])){if(!(0,p.default)(t[o])||e[o].length!==t[o].length)return!1;if(!(0,c.default)(e[o],t[o]))return!1}else if((0,s.default)(e[o])){if(!(0,s.default)(t[o])||!(0,c.default)(e[o],t[o]))return!1}else if(!a(n[i])||e[n[i]]!==t[n[i]])return!1}return!0}function i(e,t,n){return!a(e.props,t)||!a(e.state,n)}function o(e,t){return i(this,e,t)}function l(e){e.prototype.shouldComponentUpdate=o}Object.defineProperty(t,"__esModule",{value:!0}),t.shallowEqual=void 0;var u=n(187),s=r(u),f=n(61),c=r(f),d=n(19),p=r(d),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.shallowEqual=a,t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(494),l=r(o),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(r=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(a)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=n(165),c=r(f),d=n(193),p=function(e,t,n){return e+(t-e)*n},h=function(e){var t=e.from,n=e.to;return t!==n},y=function e(t,n,r){var a=(0,d.mapObject)(function(e,n){if(h(n)){var r=t(n.from,n.to,n.velocity),a=s(r,2),i=a[0],o=a[1];return u({},n,{from:i,velocity:o})}return n},n);return r<1?(0,d.mapObject)(function(e,t){return h(t)?u({},t,{velocity:p(t.velocity,a[e].velocity,r),from:p(t.from,a[e].from,r)}):t},n):e(t,a,r-1)};t.default=function(e,t,n,r,o){var s=(0,d.getIntersectionKeys)(e,t),m=s.reduce(function(n,r){return u({},n,i({},r,[e[r],t[r]]))},{}),v=s.reduce(function(n,r){return u({},n,i({},r,{from:e[r],velocity:0,to:t[r]}))},{}),g=-1,b=void 0,x=void 0,_=function(){return null},w=function(){return(0,d.mapObject)(function(e,t){return t.from},v)},O=function(){return!(0,l.default)(v,h).length},E=function(r){b||(b=r);var a=r-b,i=a/n.dt;v=y(n,v,i),o(u({},e,t,w(v))),b=r,O()||(g=(0,c.default)(_))},C=function(i){x||(x=i);var l=(i-x)/r,s=(0,d.mapObject)(function(e,t){return p.apply(void 0,a(t).concat([n(l)]))},m);if(o(u({},e,t,s)),l<1)g=(0,c.default)(_);else{var f=(0,d.mapObject)(function(e,t){return p.apply(void 0,a(t).concat([n(1)]))},m);o(u({},e,t,f))}};return _=n.isStepper?E:C,function(){return(0,c.default)(_),function(){(0,f.cancel)(g)}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=function r(a){n<0&&(n=a),a-n>t?(e(a),n=-1):(0,o.default)(r)};(0,o.default)(r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(165),o=r(i)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(){}t.__esModule=!0,t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var f=n(2),c=a(f),d=n(1),p=r(d),h=n(10),y=r(h),m=n(20),v=(n(529),t.UNMOUNTED="unmounted"),g=t.EXITED="exited",b=t.ENTERING="entering",x=t.ENTERED="entered",_=t.EXITING="exiting",w=function(e){function t(n,r){o(this,t);var a=l(this,e.call(this,n,r)),i=r.transitionGroup,u=i&&!i.isMounting?n.enter:n.appear,s=void 0;return a.appearStatus=null,n.in?u?(s=g,a.appearStatus=b):s=x:s=n.unmountOnExit||n.mountOnEnter?v:g,a.state={status:s},a.nextCallback=null,a}return u(t,e),t.prototype.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){var n=e.in;return n&&t.status===v?{status:g}:null},t.prototype.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.prototype.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==b&&n!==x&&(t=b):n!==b&&n!==x||(t=_)}this.updateStatus(!1,t)},t.prototype.componentWillUnmount=function(){this.cancelNextCallback()},t.prototype.getTimeouts=function(){var e=this.props.timeout,t=void 0,n=void 0,r=void 0;return t=n=r=e,null!=e&&"number"!=typeof e&&(t=e.exit,n=e.enter,r=e.appear),{exit:t,enter:n,appear:r}},t.prototype.updateStatus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments[1];if(null!==t){this.cancelNextCallback();var n=y.default.findDOMNode(this);t===b?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===g&&this.setState({status:v})},t.prototype.performEnter=function(e,t){var n=this,r=this.props.enter,a=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,i=this.getTimeouts();return t||r?(this.props.onEnter(e,a),void this.safeSetState({status:b},function(){n.props.onEntering(e,a),n.onTransitionEnd(e,i.enter,function(){n.safeSetState({status:x},function(){n.props.onEntered(e,a)})})})):void this.safeSetState({status:x},function(){n.props.onEntered(e)})},t.prototype.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();return n?(this.props.onExit(e),void this.safeSetState({status:_},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:g},function(){t.props.onExited(e)})})})):void this.safeSetState({status:g},function(){t.props.onExited(e)})},t.prototype.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},t.prototype.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},t.prototype.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},t.prototype.onTransitionEnd=function(e,t,n){this.setNextCallback(n),e?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},t.prototype.render=function(){var e=this.state.status;if(e===v)return null;var t=this.props,n=t.children,r=i(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=p.default.Children.only(n);return p.default.cloneElement(a,r)},t}(p.default.Component);w.contextTypes={transitionGroup:c.object},w.childContextTypes={transitionGroup:function(){}},w.propTypes={},w.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:s,onEntering:s,onEntered:s,onExit:s,onExiting:s,onExited:s},w.UNMOUNTED=0,w.EXITED=1,w.ENTERING=2,w.ENTERED=3,w.EXITING=4,t.default=(0,m.polyfill)(w)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(2),f=r(s),c=n(1),d=r(c),p=n(20),h=n(528),y=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},m=({component:f.default.any,children:f.default.node,appear:f.default.bool,enter:f.default.bool,exit:f.default.bool,childFactory:f.default.func},{component:"div",childFactory:function(e){return e}}),v=function(e){function t(n,r){i(this,t);var a=o(this,e.call(this,n,r)),l=a.handleExited.bind(a);return a.state={handleExited:l,firstRender:!0},a}return l(t,e),t.prototype.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},t.prototype.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited,a=t.firstRender;return{children:a?(0,h.getInitialChildMapping)(e,r):(0,h.getNextChildMapping)(e,n,r),firstRender:!1}},t.prototype.handleExited=function(e,t){var n=(0,h.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.setState(function(t){var n=u({},t.children);return delete n[e.key],{children:n}}))},t.prototype.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=a(e,["component","childFactory"]),i=y(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?i:d.default.createElement(t,r,i)},t}(d.default.Component);v.childContextTypes={transitionGroup:f.default.object.isRequired},v.propTypes={},v.defaultProps=m,t.default=(0,p.polyfill)(v),e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=function(e){return t&&(0,u.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&u.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r=Object.create(null),a=[];for(var i in e)i in t?a.length&&(r[i]=a,a=[]):a.push(i);var o=void 0,l={};for(var u in t){if(r[u])for(o=0;o<r[u].length;o++){var s=r[u][o];l[r[u][o]]=n(s)}l[u]=n(u)}for(o=0;o<a.length;o++)l[a[o]]=n(a[o]);return l}function i(e,t,n){return null!=n[t]?n[t]:e.props[t]}function o(e,t){return r(e.children,function(n){return(0,u.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})}function l(e,t,n){var o=r(e.children),l=a(t,o);return Object.keys(l).forEach(function(r){var a=l[r];if((0,u.isValidElement)(a)){var s=r in t,f=r in o,c=t[r],d=(0,u.isValidElement)(c)&&!c.props.in;!f||s&&!d?f||!s||d?f&&s&&(0,u.isValidElement)(c)&&(l[r]=(0,u.cloneElement)(a,{onExited:n.bind(null,a),in:c.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):l[r]=(0,u.cloneElement)(a,{in:!1}):l[r]=(0,u.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),l}t.__esModule=!0,t.getChildMapping=r,t.mergeChildMappings=a,t.getInitialChildMapping=o,t.getNextChildMapping=l;var u=n(1)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: 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("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}}t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0,t.transitionTimeout=a;var i=n(2),o=r(i);t.timeoutsShape=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]),t.classNamesShape=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})])},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e){var t=d(e,2),n=t[0],r=t[1],a=n,i=r;return n>r&&(a=r,i=n),[a,i]}function o(e,t,n){if(e<=0)return 0;var r=y.default.getDigitCount(e),a=e/Math.pow(10,r),i=1!==r?y.default.multiply(Math.ceil(a/.05)+n,.05):y.default.multiply(Math.ceil(a/.1)+n,.1),o=y.default.multiply(i,Math.pow(10,r));return t?o:Math.ceil(o)}function l(e,t,n){var r=y.default.isFloat(e),a=1,i=e;if(r&&n){var o=Math.abs(e);o<1?(a=Math.pow(10,y.default.getDigitCount(e)-1),i=y.default.multiply(Math.floor(e/a),a)):o>1&&(i=Math.floor(e))}else 0===e?i=Math.floor((t-1)/2):n||(i=Math.floor(e));var l=Math.floor((t-1)/2),u=(0,p.compose)((0,p.map)(function(e){return y.default.sum(i,y.default.multiply(e-l,a))}),p.range);return u(0,t)}function u(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=o((t-e)/(n-1),r,a),l=void 0;e<=0&&t>=0?l=0:(l=y.default.divide(y.default.sum(e,t),2),l=y.default.minus(l,y.default.modulo(l,i)),l=y.default.strip(l,16));var s=Math.ceil((l-e)/i),f=Math.ceil((t-l)/i),c=s+f+1;return c>n?u(e,t,n,r,a+1):(c<n&&(f=t>0?f+(n-c):f,s=t>0?s:s+(n-c)),{step:i,tickMin:y.default.minus(l,y.default.multiply(s,i)),tickMax:y.default.sum(l,y.default.multiply(f,i))})}function s(e){var t=d(e,2),n=t[0],r=t[1],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=Math.max(a,2),f=i([n,r]),c=d(f,2),h=c[0],m=c[1];if(h===m)return l(h,a,o);var v=u(h,m,s,o),g=v.step,b=v.tickMin,x=v.tickMax,_=y.default.rangeStep(b,x+.1*g,g);return n>r?(0,p.reverse)(_):_}function f(e){var t=d(e,2),n=t[0],r=t[1],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,u=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=Math.max(a,2),f=i([n,r]),c=d(f,2),h=c[0],y=c[1];if(h===y)return l(h,a,u);var m=o((y-h)/(s-1),u,0),v=(0,p.compose)((0,p.map)(function(e){return h+e*m}),p.range),g=v(0,s).filter(function(e){return e>=h&&e<=y});return n>r?(0,p.reverse)(g):g}function c(e,t){var n=d(e,2),r=n[0],l=n[1],u=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=i([r,l]),f=d(s,2),c=f[0],h=f[1];if(c===h)return[c];var m=Math.max(t,2),v=o((h-c)/(m-1),u,0),g=[].concat(a(y.default.rangeStep(c,h-.99*v,v)),[h]);return r>l?(0,p.reverse)(g):g}Object.defineProperty(t,"__esModule",{value:!0}),t.getTickValuesFixedDomain=t.getTickValues=t.getNiceTickValues=void 0;var d=function(){function e(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(r=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(a)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=n(391),h=n(532),y=r(h);t.getNiceTickValues=(0,p.memoize)(s),t.getTickValues=(0,p.memoize)(f),t.getTickValuesFixedDomain=(0,p.memoize)(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(530);Object.defineProperty(t,"getTickValues",{enumerable:!0,get:function(){return r.getTickValues}}),Object.defineProperty(t,"getNiceTickValues",{enumerable:!0,get:function(){return r.getNiceTickValues}}),Object.defineProperty(t,"getTickValuesFixedDomain",{enumerable:!0,get:function(){return r.getTickValuesFixedDomain}})},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12;return+parseFloat(e.toPrecision(t))}function a(e){return/^([+-]?)\d*\.\d+$/.test(e)}function i(e){var t=Math.abs(e),n=void 0;return n=0===e?1:Math.floor(Math.log(t)/Math.log(10))+1}function o(e){var t=e?""+e:"";if(t.indexOf("e")>=0)return Math.abs(parseInt(t.slice(t.indexOf("e")+1),10));var n=t.split(".");return n.length>1?n[1].length:0}function l(e,t){var n=parseInt((""+e).replace(".",""),10),r=parseInt((""+t).replace(".",""),10),a=o(e)+o(t);return n*r/Math.pow(10,a)}function u(e,t){var n=Math.max(o(e),o(t));return n=Math.pow(10,n),(l(e,n)+l(t,n))/n}function s(e,t){return u(e,-t)}function f(e,t){var n=o(e),r=o(t),a=parseInt((""+e).replace(".",""),10),i=parseInt((""+t).replace(".",""),10); return a/i*Math.pow(10,r-n)}function c(e,t){var n=Math.abs(t);if(t<=0)return e;var r=Math.floor(e/n);return s(e,l(n,r))}function d(e,t,n){for(var r=e,a=[];r<t;)a.push(r),r=u(r,n);return a}Object.defineProperty(t,"__esModule",{value:!0});var p=n(391),h=(0,p.curry)(function(e,t,n){var r=+e,a=+t;return r+n*(a-r)}),y=(0,p.curry)(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),m=(0,p.curry)(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});t.default={rangeStep:d,isFloat:a,getDigitCount:i,getDecimalDigitCount:o,sum:u,minus:s,multiply:l,divide:f,modulo:c,strip:r,interpolateNumber:h,uninterpolateNumber:y,uninterpolateTruncation:m}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u,s,f,c=n(15),d=r(c),p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=n(1),m=r(y),v=n(2),g=r(v),b=n(13),x=r(b),_=n(12),w=n(18),O=(0,x.default)((f=s=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),h(t,[{key:"renderLineItem",value:function(e,t){var n=void 0;if(m.default.isValidElement(e))n=m.default.cloneElement(e,t);else if((0,d.default)(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,l=t.y2,u=t.key,s=a(t,["x1","y1","x2","y2","key"]);n=m.default.createElement("line",p({},(0,_.getPresentationAttributes)(s),{x1:r,y1:i,x2:o,y2:l,fill:"none",key:u}))}return n}},{key:"renderHorizontal",value:function(e){var t=this,n=this.props,r=n.x,a=n.width,i=n.horizontal;if(!e||!e.length)return null;var o=e.map(function(e,n){var o=p({},t.props,{x1:r,y1:e,x2:r+a,y2:e,key:"line-"+n,index:n});return t.renderLineItem(i,o)});return m.default.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}},{key:"renderVertical",value:function(e){var t=this,n=this.props,r=n.y,a=n.height,i=n.vertical;if(!e||!e.length)return null;var o=e.map(function(e,n){var o=p({},t.props,{x1:e,y1:r,x2:e,y2:r+a,key:"line-"+n,index:n});return t.renderLineItem(i,o)});return m.default.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}},{key:"renderVerticalStripes",value:function(e){var t=this.props.verticalFill;if(!t||!t.length)return null;var n=this.props,r=n.fillOpacity,a=n.x,i=n.y,o=n.width,l=n.height,u=e.slice().sort(function(e,t){return e-t>0});a!==u[0]&&u.unshift(0);var s=u.map(function(e,n){var s=u[n+1]?u[n+1]-e:a+o-e;if(s<=0)return null;var f=n%t.length;return m.default.createElement("rect",{key:n,x:Math.round(e+a-a),y:i,width:s,height:l,stroke:"none",fill:t[f],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return m.default.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},s)}},{key:"renderHorizontalStripes",value:function(e){var t=this.props.horizontalFill;if(!t||!t.length)return null;var n=this.props,r=n.fillOpacity,a=n.x,i=n.y,o=n.width,l=n.height,u=e.slice().sort(function(e,t){return e-t>0});i!==u[0]&&u.unshift(0);var s=u.map(function(e,n){var s=u[n+1]?u[n+1]-e:i+l-e;if(s<=0)return null;var f=n%t.length;return m.default.createElement("rect",{key:n,y:Math.round(e+i-i),x:a,height:s,width:o,stroke:"none",fill:t[f],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return m.default.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},s)}},{key:"renderBackground",value:function(){var e=this.props.fill;if(!e||"none"===e)return null;var t=this.props,n=t.fillOpacity,r=t.x,a=t.y,i=t.width,o=t.height;return m.default.createElement("rect",{x:r,y:a,width:i,height:o,stroke:"none",fill:e,fillOpacity:n,className:"recharts-cartesian-grid-bg"})}},{key:"render",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,a=e.height,i=e.horizontal,o=e.vertical,l=e.horizontalCoordinatesGenerator,u=e.verticalCoordinatesGenerator,s=e.xAxis,f=e.yAxis,c=e.offset,p=e.chartWidth,h=e.chartHeight;if(!(0,w.isNumber)(r)||r<=0||!(0,w.isNumber)(a)||a<=0||!(0,w.isNumber)(t)||t!==+t||!(0,w.isNumber)(n)||n!==+n)return null;var y=this.props,v=y.horizontalPoints,g=y.verticalPoints;return v&&v.length||!(0,d.default)(l)||(v=l({yAxis:f,width:p,height:h,offset:c})),g&&g.length||!(0,d.default)(u)||(g=u({xAxis:s,width:p,height:h,offset:c})),m.default.createElement("g",{className:"recharts-cartesian-grid"},this.renderBackground(),i&&this.renderHorizontal(v),o&&this.renderVertical(g),i&&this.renderHorizontalStripes(v),o&&this.renderVerticalStripes(g))}}]),t}(y.Component),s.displayName="CartesianGrid",s.propTypes=p({},_.PRESENTATION_ATTRIBUTES,{x:g.default.number,y:g.default.number,width:g.default.number,height:g.default.number,horizontal:g.default.oneOfType([g.default.object,g.default.element,g.default.func,g.default.bool]),vertical:g.default.oneOfType([g.default.object,g.default.element,g.default.func,g.default.bool]),horizontalPoints:g.default.arrayOf(g.default.number),verticalPoints:g.default.arrayOf(g.default.number),horizontalCoordinatesGenerator:g.default.func,verticalCoordinatesGenerator:g.default.func,xAxis:g.default.object,yAxis:g.default.object,offset:g.default.object,chartWidth:g.default.number,chartHeight:g.default.number,verticalFill:g.default.arrayOf(g.default.string),horizontalFill:g.default.arrayOf(g.default.string)}),s.defaultProps={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]},u=f))||u;t.default=O},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(87),i=r(a),o=n(288),l=r(o),u=n(131),s=r(u),f=n(132),c=r(f),d=n(161);t.default=(0,i.default)({chartName:"AreaChart",GraphicalChild:l.default,axisComponents:[{axisType:"xAxis",AxisComp:s.default},{axisType:"yAxis",AxisComp:c.default}],formatAxisMap:d.formatAxisMap})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(87),i=r(a),o=n(289),l=r(o),u=n(131),s=r(u),f=n(132),c=r(f),d=n(161);t.default=(0,i.default)({chartName:"BarChart",GraphicalChild:l.default,axisComponents:[{axisType:"xAxis",AxisComp:s.default},{axisType:"yAxis",AxisComp:c.default}],formatAxisMap:d.formatAxisMap})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(87),i=r(a),o=n(288),l=r(o),u=n(289),s=r(u),f=n(290),c=r(f),d=n(291),p=r(d),h=n(131),y=r(h),m=n(132),v=r(m),g=n(194),b=r(g),x=n(161);t.default=(0,i.default)({chartName:"ComposedChart",GraphicalChild:[c.default,l.default,s.default,p.default],axisComponents:[{axisType:"xAxis",AxisComp:y.default},{axisType:"yAxis",AxisComp:v.default},{axisType:"zAxis",AxisComp:b.default}],formatAxisMap:x.formatAxisMap})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(87),i=r(a),o=n(290),l=r(o),u=n(131),s=r(u),f=n(132),c=r(f),d=n(161);t.default=(0,i.default)({chartName:"LineChart",GraphicalChild:l.default,axisComponents:[{axisType:"xAxis",AxisComp:s.default},{axisType:"yAxis",AxisComp:c.default}],formatAxisMap:d.formatAxisMap})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(87),l=r(o),u=n(196),s=r(u),f=n(197),c=r(f),d=n(55),p=n(397),h=r(p);t.default=(0,l.default)({chartName:"PieChart",GraphicalChild:h.default,eventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:s.default},{axisType:"radiusAxis",AxisComp:c.default}],formatAxisMap:d.formatAxisMap,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},propTypes:{layout:i.default.oneOf(["centric"]),startAngle:i.default.number,endAngle:i.default.number,cx:i.default.oneOfType([i.default.number,i.default.string]),cy:i.default.oneOfType([i.default.number,i.default.string]),innerRadius:i.default.oneOfType([i.default.number,i.default.string]),outerRadius:i.default.oneOfType([i.default.number,i.default.string])}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(87),l=r(o),u=n(398),s=r(u),f=n(196),c=r(f),d=n(197),p=r(d),h=n(55);t.default=(0,l.default)({chartName:"RadarChart",GraphicalChild:s.default,axisComponents:[{axisType:"angleAxis",AxisComp:c.default},{axisType:"radiusAxis",AxisComp:p.default}],formatAxisMap:h.formatAxisMap,defaultProps:{layout:"centric",startAngle:90,endAngle:-270,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},propTypes:{layout:i.default.oneOf(["centric"]),startAngle:i.default.number,endAngle:i.default.number,cx:i.default.oneOfType([i.default.number,i.default.string]),cy:i.default.oneOfType([i.default.number,i.default.string]),innerRadius:i.default.oneOfType([i.default.number,i.default.string]),outerRadius:i.default.oneOfType([i.default.number,i.default.string])}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),i=r(a),o=n(87),l=r(o),u=n(196),s=r(u),f=n(197),c=r(f),d=n(55),p=n(399),h=r(p);t.default=(0,l.default)({chartName:"RadialBarChart",GraphicalChild:h.default,legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:s.default},{axisType:"radiusAxis",AxisComp:c.default}],formatAxisMap:d.formatAxisMap,defaultProps:{layout:"radial",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},propTypes:{layout:i.default.oneOf(["radial"]),startAngle:i.default.number,endAngle:i.default.number,cx:i.default.oneOfType([i.default.number,i.default.string]),cy:i.default.oneOfType([i.default.number,i.default.string]),innerRadius:i.default.oneOfType([i.default.number,i.default.string]),outerRadius:i.default.oneOfType([i.default.number,i.default.string])}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u,s,f,c=n(15),d=r(c),p=n(501),h=r(p),y=n(378),m=r(y),v=n(377),g=r(v),b=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_=n(1),w=r(_),O=n(2),E=r(O),C=n(17),k=r(C),T=n(160),S=r(T),A=n(23),M=r(A),P=n(195),N=r(P),j=n(134),R=r(j),I=n(13),D=r(I),L=n(12),B=n(25),V={x:0,y:0},F=function(e,t){var n=+e,r=t-n;return function(e){return n+r*e}},z=function(e){return e.y+e.dy/2},W=function(e){return e&&e.value||0},K=function(e,t){return t.reduce(function(t,n){return t+W(e[n])},0)},U=function(e,t,n){return n.reduce(function(n,r){var a=t[r],i=e[a.source];return n+z(i)*W(t[r])},0)},G=function(e,t,n){return n.reduce(function(n,r){var a=t[r],i=e[a.target];return n+z(i)*W(t[r])},0)},H=function(e,t){return e.y-t.y},q=function(e,t){for(var n=[],r=[],a=[],i=[],o=0,l=e.length;o<l;o++){var u=e[o];u.source===t&&(a.push(u.target),i.push(o)),u.target===t&&(n.push(u.source),r.push(o))}return{sourceNodes:n,sourceLinks:r,targetLinks:i,targetNodes:a}},Y=function e(t,n){for(var r=n.targetNodes,a=0,i=r.length;a<i;a++){var o=t[r[a]];o&&(o.depth=Math.max(n.depth+1,o.depth),e(t,o))}},X=function(e,t,n){for(var r=e.nodes,a=e.links,i=r.map(function(e,t){var n=q(a,t);return x({},e,n,{value:Math.max(K(a,n.sourceLinks),K(a,n.targetLinks)),depth:0})}),o=0,l=i.length;o<l;o++){var u=i[o];u.sourceNodes.length||Y(i,u)}var s=(0,g.default)(i,function(e){return e.depth}).depth;if(s>=1)for(var f=(t-n)/s,c=0,d=i.length;c<d;c++){var p=i[c];p.targetNodes.length||(p.depth=s),p.x=p.depth*f,p.dx=n}return{tree:i,maxDepth:s}},J=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var a=e[n];t[a.depth]||(t[a.depth]=[]),t[a.depth].push(a)}return t},$=function(e,t,n,r){for(var a=(0,m.default)(e.map(function(e){return(t-(e.length-1)*n)/(0,h.default)(e,W)})),i=0,o=e.length;i<o;i++)for(var l=0,u=e[i].length;l<u;l++){var s=e[i][l];s.y=l,s.dy=s.value*a}return r.map(function(e){return x({},e,{dy:W(e)*a})})},Z=function(e,t,n){for(var r=0,a=e.length;r<a;r++){var i=e[r],o=i.length;i.sort(H);for(var l=0,u=0;u<o;u++){var s=i[u],f=l-s.y;f>0&&(s.y+=f),l=s.y+s.dy+n}l=t+n;for(var c=o-1;c>=0;c--){var d=i[c],p=d.y+d.dy+n-l;if(!(p>0))break;d.y-=p,l=d.y}}},Q=function(e,t,n,r){for(var a=0,i=t.length;a<i;a++)for(var o=t[a],l=0,u=o.length;l<u;l++){var s=o[l];if(s.sourceLinks.length){var f=K(n,s.sourceLinks),c=U(e,n,s.sourceLinks),d=c/f;s.y+=(d-z(s))*r}}},ee=function(e,t,n,r){for(var a=t.length-1;a>=0;a--)for(var i=t[a],o=0,l=i.length;o<l;o++){var u=i[o];if(u.targetLinks.length){var s=K(n,u.targetLinks),f=G(e,n,u.targetLinks),c=f/s;u.y+=(c-z(u))*r}}},te=function(e,t){for(var n=0,r=e.length;n<r;n++){var a=e[n],i=0,o=0;a.targetLinks.sort(function(n,r){return e[t[n].target].y-e[t[r].target].y}),a.sourceLinks.sort(function(n,r){return e[t[n].source].y-e[t[r].source].y});for(var l=0,u=a.targetLinks.length;l<u;l++){var s=t[a.targetLinks[l]];s&&(s.sy=i,i+=s.dy)}for(var f=0,c=a.sourceLinks.length;f<c;f++){var d=t[a.sourceLinks[f]];d&&(d.ty=o,o+=d.dy)}}},ne=function(e){var t=e.data,n=e.width,r=e.height,a=e.iterations,i=e.nodeWidth,o=e.nodePadding,l=t.links,u=X(t,n,i),s=u.tree,f=J(s),c=$(f,r,o,l);Z(f,r,o);for(var d=1,p=1;p<=a;p++)ee(s,f,c,d*=.99),Z(f,r,o),Q(s,f,c,d),Z(f,r,o);return te(s,c),{nodes:s,links:c}},re=function(e,t){return"node"===t?{x:e.x+e.width/2,y:e.y+e.height/2}:{x:(e.sourceX+e.targetX)/2,y:(e.sourceY+e.targetY)/2}},ae=function(e,t,n){var r=e.payload;if("node"===t)return[{payload:e,name:(0,B.getValueByDataKey)(r,n,""),value:(0,B.getValueByDataKey)(r,"value")}];if(r.source&&r.target){var a=(0,B.getValueByDataKey)(r.source,n,""),i=(0,B.getValueByDataKey)(r.target,n,"");return[{payload:e,name:a+" - "+i,value:(0,B.getValueByDataKey)(r,"value")}]}return[]},ie=(0,D.default)((f=s=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state=n.createDefaultState(e),n}return l(t,e),b(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.data,r=t.width,a=t.height,i=t.margin,o=t.iterations,l=t.nodeWidth,u=t.nodePadding,s=t.nameKey;e.data===n&&e.width===r&&e.height===a&&(0,I.shallowEqual)(e.margin,i)&&e.iterations===o&&e.nodeWidth===l&&e.nodePadding===u&&e.nameKey===s||this.setState(this.createDefaultState(e))}},{key:"createDefaultState",value:function(e){var t=e.data,n=e.width,r=e.height,a=e.margin,i=e.iterations,o=e.nodeWidth,l=e.nodePadding,u=n-(a&&a.left||0)-(a&&a.right||0),s=r-(a&&a.top||0)-(a&&a.bottom||0),f=ne({data:t,width:u,height:s,iterations:i,nodeWidth:o,nodePadding:l}),c=f.links,d=f.nodes;return{activeElement:null,activeElementType:null,isTooltipActive:!1,nodes:d,links:c}}},{key:"handleMouseEnter",value:function(e,t,n){var r=this.props,a=r.onMouseEnter,i=r.children,o=(0,L.findChildByType)(i,N.default);o?this.setState({activeElement:e,activeElementType:t,isTooltipActive:!0},function(){a&&a(e,t,n)}):a&&a(e,t,n)}},{key:"handleMouseLeave",value:function(e,t,n){var r=this.props,a=r.onMouseLeave,i=r.children,o=(0,L.findChildByType)(i,N.default);o?this.setState({isTooltipActive:!1},function(){a&&a(e,t,n)}):a&&a(e,t,n)}},{key:"renderLinkItem",value:function(e,t){if(w.default.isValidElement(e))return w.default.cloneElement(e,t);if((0,d.default)(e))return e(t);var n=t.sourceX,r=t.sourceY,i=t.sourceControlX,o=t.targetX,l=t.targetY,u=t.targetControlX,s=t.linkWidth,f=a(t,["sourceX","sourceY","sourceControlX","targetX","targetY","targetControlX","linkWidth"]);return w.default.createElement("path",x({className:"recharts-sankey-link",d:"\n M"+n+","+r+"\n C"+i+","+r+" "+u+","+l+" "+o+","+l+"\n ",fill:"none",stroke:"#333",strokeWidth:s,strokeOpacity:"0.2"},(0,L.getPresentationAttributes)(f)))}},{key:"renderLinks",value:function(e,t){var n=this,r=this.props,a=r.linkCurvature,i=r.link,o=r.margin,l=o.top||0,u=o.left||0;return w.default.createElement(M.default,{className:"recharts-sankey-links",key:"recharts-sankey-links"},e.map(function(e,r){var o=e.sy,s=e.ty,f=e.dy,c=t[e.source],d=t[e.target],p=c.x+c.dx+u,h=d.x+u,y=F(p,h),m=y(a),v=y(1-a),g=c.y+o+f/2+l,b=d.y+s+f/2+l,_=x({sourceX:p,targetX:h,sourceY:g,targetY:b,sourceControlX:m,targetControlX:v,sourceRelativeY:o,targetRelativeY:s,linkWidth:f,index:r,payload:x({},e,{source:c,target:d})},(0,L.getPresentationAttributes)(i)),O={onMouseEnter:n.handleMouseEnter.bind(n,_,"link"),onMouseLeave:n.handleMouseLeave.bind(n,_,"link")};return w.default.createElement(M.default,x({key:"link"+r},O),n.renderLinkItem(i,_))}))}},{key:"renderNodeItem",value:function(e,t){return w.default.isValidElement(e)?w.default.cloneElement(e,t):(0,d.default)(e)?e(t):w.default.createElement(R.default,x({className:"recharts-sankey-node",fill:"#0088fe",fillOpacity:"0.8"},t))}},{key:"renderNodes",value:function(e){var t=this,n=this.props,r=n.node,a=n.margin,i=a.top||0,o=a.left||0;return w.default.createElement(M.default,{className:"recharts-sankey-nodes",key:"recharts-sankey-nodes"},e.map(function(e,n){var a=e.x,l=e.y,u=e.dx,s=e.dy,f=x({},(0,L.getPresentationAttributes)(r),{x:a+o,y:l+i,width:u,height:s,index:n,payload:e}),c={onMouseEnter:t.handleMouseEnter.bind(t,f,"node"),onMouseLeave:t.handleMouseLeave.bind(t,f,"node")};return w.default.createElement(M.default,x({key:"node"+n},c),t.renderNodeItem(r,f))}))}},{key:"renderTooltip",value:function(){var e=this.props,t=e.children,n=e.width,r=e.height,a=e.nameKey,i=(0,L.findChildByType)(t,N.default);if(!i)return null;var o=this.state,l=o.isTooltipActive,u=o.activeElement,s=o.activeElementType,f={x:0,y:0,width:n,height:r},c=u?re(u,s):V,d=u?ae(u,s,a):[];return w.default.cloneElement(i,{viewBox:f,active:l,coordinate:c,label:"",payload:d})}},{key:"render",value:function(){if(!(0,L.validateWidthHeight)(this))return null;var e=this.props,t=e.width,n=e.height,r=e.className,i=e.style,o=e.children,l=a(e,["width","height","className","style","children"]),u=this.state,s=u.links,f=u.nodes,c=(0,L.getPresentationAttributes)(l);return w.default.createElement("div",{className:(0,k.default)("recharts-wrapper",r),style:x({},i,{position:"relative",cursor:"default",width:t,height:n})},w.default.createElement(S.default,x({},c,{width:t,height:n}),(0,L.filterSvgElements)(o),this.renderLinks(s,f),this.renderNodes(f)),this.renderTooltip())}}]),t}(_.Component),s.displayName="Sankey",s.propTypes=x({},L.PRESENTATION_ATTRIBUTES,L.EVENT_ATTRIBUTES,{nameKey:E.default.oneOfType([E.default.string,E.default.number,E.default.func]),dataKey:E.default.oneOfType([E.default.string,E.default.number,E.default.func]),width:E.default.number,height:E.default.number,data:E.default.shape({nodes:E.default.array,links:E.default.arrayOf(E.default.shape({target:E.default.number,source:E.default.number,value:E.default.number}))}),nodePadding:E.default.number,nodeWidth:E.default.number,linkCurvature:E.default.number,iterations:E.default.number,node:E.default.oneOfType([E.default.object,E.default.element,E.default.func]),link:E.default.oneOfType([E.default.object,E.default.element,E.default.func]),style:E.default.object,className:E.default.string,children:E.default.oneOfType([E.default.arrayOf(E.default.node),E.default.node]),margin:E.default.shape({top:E.default.number,right:E.default.number,bottom:E.default.number,left:E.default.number})}),s.defaultProps={nodePadding:10,nodeWidth:10,nameKey:"name",dataKey:"value",linkCurvature:.5,iterations:32,margin:{top:5,right:5,bottom:5,left:5}},u=f))||u;t.default=ie},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(87),i=r(a),o=n(291),l=r(o),u=n(131),s=r(u),f=n(132),c=r(f),d=n(194),p=r(d),h=n(161);t.default=(0,i.default)({chartName:"ScatterChart",GraphicalChild:l.default,eventType:"single",axisComponents:[{axisType:"xAxis",AxisComp:s.default},{axisType:"yAxis",AxisComp:c.default},{axisType:"zAxis",AxisComp:p.default}],formatAxisMap:h.formatAxisMap})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u,s,f,c=n(15),d=r(c),p=n(186),h=r(p),y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=n(1),g=r(v),b=n(2),x=r(b),_=n(66),w=r(_),O=n(17),E=r(O),C=n(160),k=r(C),T=n(23),S=r(T),A=n(134),M=r(A),P=n(12),N=n(195),j=r(N),R=n(13),I=r(R),D=n(25),L=function e(t){var n=t.depth,r=t.node,a=t.index,i=t.valueKey,o=r.children,l=n+1,u=o&&o.length?o.map(function(t,n){return e({depth:l,node:t,index:n,valueKey:i})}):null,s=void 0;return s=o&&o.length?u.reduce(function(e,t){return e+t.value},0):(0,h.default)(r[i])||r[i]<=0?0:r[i],m({},r,{children:u,value:s,depth:n,index:a})},B=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height}},V=function(e,t){var n=t<0?0:t;return e.map(function(e){var t=e.value*n;return m({},e,{area:(0,h.default)(t)||t<=0?0:t})})},F=function(e,t,n){var r=t*t,a=e.area*e.area,i=e.reduce(function(e,t){return{min:Math.min(e.min,t.area),max:Math.max(e.max,t.area)}},{min:1/0,max:0}),o=i.min,l=i.max;return a?Math.max(r*l*n/a,a/(r*o*n)):1/0},z=function(e,t,n,r){var a=t?Math.round(e.area/t):0;(r||a>n.height)&&(a=n.height);for(var i=n.x,o=void 0,l=0,u=e.length;l<u;l++)o=e[l],o.x=i,o.y=n.y,o.height=a,o.width=Math.min(a?Math.round(o.area/a):0,n.x+n.width-i),i+=o.width;return o.z=!0,o.width+=n.x+n.width-i,m({},n,{y:n.y+a,height:n.height-a})},W=function(e,t,n,r){var a=t?Math.round(e.area/t):0;(r||a>n.width)&&(a=n.width);for(var i=n.y,o=void 0,l=0,u=e.length;l<u;l++)o=e[l],o.x=n.x,o.y=i,o.width=a,o.height=Math.min(a?Math.round(o.area/a):0,n.y+n.height-i),i+=o.height;return o.z=!1,o.height+=n.y+n.height-i,m({},n,{x:n.x+a,width:n.width-a})},K=function(e,t,n,r){return t===n.width?z(e,t,n,r):W(e,t,n,r)},U=function e(t,n){var r=t.children;if(r&&r.length){var a=B(t),i=[],o=1/0,l=void 0,u=void 0,s=Math.min(a.width,a.height),f=V(r,a.width*a.height/t.value),c=f.slice();for(i.area=0;c.length>0;)i.push(l=c[0]),i.area+=l.area,u=F(i,s,n),u<=o?(c.shift(),o=u):(i.area-=i.pop().area,a=K(i,s,a,!1),s=Math.min(a.width,a.height),i.length=i.area=0,o=1/0);return i.length&&(a=K(i,s,a,!0),i.length=i.area=0),m({},t,{children:f.map(function(t){return e(t,n)})})}return t},G=(0,I.default)((f=s=function(e){function t(){var e,n,r,a;i(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state=r.createDefaultState(),a=n,o(r,a)}return l(t,e),y(t,[{key:"componentWillReceiveProps",value:function(e){e.data!==this.props.data&&this.setState(this.createDefaultState())}},{key:"createDefaultState",value:function(){return{isTooltipActive:!1,activeNode:null}}},{key:"handleMouseEnter",value:function(e,t){var n=this.props,r=n.onMouseEnter,a=n.children,i=(0,P.findChildByType)(a,j.default);i?this.setState({isTooltipActive:!0,activeNode:e},function(){r&&r(e,t)}):r&&r(e,t)}},{key:"handleMouseLeave",value:function(e,t){var n=this.props,r=n.onMouseLeave,a=n.children,i=(0,P.findChildByType)(a,j.default);i?this.setState({isTooltipActive:!1,activeNode:null},function(){r&&r(e,t)}):r&&r(e,t)}},{key:"handleClick",value:function(e){var t=this.props.onClick;t&&t(e)}},{key:"renderAnimatedItem",value:function(e,t,n){var r=this,a=this.props,i=a.isAnimationActive,o=a.animationBegin,l=a.animationDuration,u=a.animationEasing,s=a.isUpdateAnimationActive,f=t.width,c=t.height,d=t.x,p=t.y,h=parseInt((2*Math.random()-1)*f,10),y={};return n&&(y={onMouseEnter:this.handleMouseEnter.bind(this,t),onMouseLeave:this.handleMouseLeave.bind(this,t),onClick:this.handleClick.bind(this,t)}),g.default.createElement(w.default,{from:{x:d,y:p,width:f,height:c},to:{x:d,y:p,width:f,height:c},duration:l,easing:u,isActive:s},function(n){var a=n.x,f=n.y,c=n.width,d=n.height;return g.default.createElement(w.default,{from:"translate("+h+"px, "+h+"px)",to:"translate(0, 0)",attributeName:"transform",begin:o,easing:u,isActive:i,duration:l},g.default.createElement(S.default,y,r.renderContentItem(e,m({},t,{isAnimationActive:i,isUpdateAnimationActive:!s,width:c,height:d,x:a,y:f}))))})}},{key:"renderContentItem",value:function(e,t){return g.default.isValidElement(e)?g.default.cloneElement(e,t):(0,d.default)(e)?e(t):g.default.createElement(M.default,m({fill:"#fff",stroke:"#000"},t))}},{key:"renderNode",value:function(e,t,n){var r=this,a=this.props.content,i=m({},(0,P.getPresentationAttributes)(this.props),t,{root:e}),o=!t.children||!t.children.length;return g.default.createElement(S.default,{key:"recharts-treemap-node-"+n,className:"recharts-treemap-depth-"+t.depth},this.renderAnimatedItem(a,i,o),t.children&&t.children.length?t.children.map(function(e,n){return r.renderNode(t,e,n)}):null)}},{key:"renderAllNodes",value:function(){var e=this.props,t=e.width,n=e.height,r=e.data,a=e.dataKey,i=e.aspectRatio,o=L({depth:0,node:{children:r,x:0,y:0,width:t,height:n},index:0,valueKey:a}),l=U(o,i);return this.renderNode(l,l,0)}},{key:"renderTooltip",value:function(){var e=this.props,t=e.children,n=e.nameKey,r=(0,P.findChildByType)(t,j.default);if(!r)return null;var a=this.props,i=a.width,o=a.height,l=a.dataKey,u=this.state,s=u.isTooltipActive,f=u.activeNode,c={x:0,y:0,width:i,height:o},d=f?{x:f.x+f.width/2,y:f.y+f.height/2}:null,p=s&&f?[{payload:f,name:(0,D.getValueByDataKey)(f,n,""),value:(0,D.getValueByDataKey)(f,l)}]:[];return g.default.cloneElement(r,{viewBox:c,active:s,coordinate:d,label:"",payload:p})}},{key:"render",value:function(){if(!(0,P.validateWidthHeight)(this))return null;var e=this.props,t=e.width,n=e.height,r=e.className,i=e.style,o=e.children,l=a(e,["width","height","className","style","children"]),u=(0,P.getPresentationAttributes)(l);return g.default.createElement("div",{className:(0,E.default)("recharts-wrapper",r),style:m({},i,{position:"relative",cursor:"default",width:t,height:n})},g.default.createElement(k.default,m({},u,{width:t,height:n}),this.renderAllNodes(),(0,P.filterSvgElements)(o)),this.renderTooltip())}}]),t}(v.Component),s.displayName="Treemap",s.propTypes={width:x.default.number,height:x.default.number,data:x.default.array,style:x.default.object,aspectRatio:x.default.number,content:x.default.oneOfType([x.default.element,x.default.func]),fill:x.default.string,stroke:x.default.string,className:x.default.string,nameKey:x.default.oneOfType([x.default.string,x.default.number,x.default.func]),dataKey:x.default.oneOfType([x.default.string,x.default.number,x.default.func]),children:x.default.oneOfType([x.default.arrayOf(x.default.node),x.default.node]),onMouseEnter:x.default.func,onMouseLeave:x.default.func,onClick:x.default.func,isAnimationActive:x.default.bool,isUpdateAnimationActive:x.default.bool,animationBegin:x.default.number,animationDuration:x.default.number,animationEasing:x.default.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"])},s.defaultProps={dataKey:"value",aspectRatio:.5*(1+Math.sqrt(5)),isAnimationActive:!(0,P.isSsr)(),isUpdateAnimationActive:!(0,P.isSsr)(),animationBegin:0,animationDuration:1500,animationEasing:"linear"},u=f))||u;t.default=G},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u,s,f,c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(1),h=r(p),y=n(2),m=r(y),v=n(17),g=r(v),b=n(13),x=r(b),_=n(160),w=r(_),O=n(295),E=r(O),C=n(12),k=32,T=C.LEGEND_TYPES.filter(function(e){return"none"!==e}),S=(0,x.default)((f=s=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),d(t,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=k/2,r=k/6,a=k/3,i=e.inactive?t:e.color;return"plainline"===e.type?h.default.createElement("line",{strokeWidth:4,fill:"none",stroke:i,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:k,y2:n,className:"recharts-legend-icon"}):"line"===e.type?h.default.createElement("path",{strokeWidth:4,fill:"none",stroke:i,d:"M0,"+n+"h"+a+"\n A"+r+","+r+",0,1,1,"+2*a+","+n+"\n H"+k+"M"+2*a+","+n+"\n A"+r+","+r+",0,1,1,"+a+","+n, className:"recharts-legend-icon"}):"rect"===e.type?h.default.createElement("path",{stroke:"none",fill:i,d:"M0,"+k/8+"h"+k+"v"+3*k/4+"h"+-k+"z",className:"recharts-legend-icon"}):h.default.createElement(E.default,{fill:i,cx:n,cy:n,size:k,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,i=t.layout,o=t.formatter,l={x:0,y:0,width:k,height:k},u={display:"horizontal"===i?"inline-block":"block",marginRight:10},s={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map(function(t,n){var i,f=t.formatter||o,d=(0,g.default)((i={"recharts-legend-item":!0},a(i,"legend-item-"+n,!0),a(i,"inactive",t.inactive),i));return"none"===t.type?null:h.default.createElement("li",c({className:d,style:u,key:"legend-item-"+n},(0,C.filterEventsOfChild)(e.props,t,n)),h.default.createElement(w.default,{width:r,height:r,viewBox:l,style:s},e.renderIcon(t)),h.default.createElement("span",{className:"recharts-legend-item-text"},f?f(t.value,t,n):t.value))})}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var a={padding:0,margin:0,textAlign:"horizontal"===n?r:"left"};return h.default.createElement("ul",{className:"recharts-default-legend",style:a},this.renderItems())}}]),t}(p.Component),s.displayName="Legend",s.propTypes={content:m.default.element,iconSize:m.default.number,iconType:m.default.oneOf(T),layout:m.default.oneOf(["horizontal","vertical"]),align:m.default.oneOf(["center","left","right"]),verticalAlign:m.default.oneOf(["top","bottom","middle"]),payload:m.default.arrayOf(m.default.shape({value:m.default.any,id:m.default.any,type:m.default.oneOf(C.LEGEND_TYPES)})),inactiveColor:m.default.string,formatter:m.default.func,onMouseEnter:m.default.func,onMouseLeave:m.default.func,onClick:m.default.func},s.defaultProps={iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"},u=f))||u;t.default=S},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=n(19),c=r(f),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=n(1),y=r(h),m=n(2),v=r(m),g=n(13),b=r(g),x=n(18),_=function(e){return(0,c.default)(e)&&(0,x.isNumOrStr)(e[0])&&(0,x.isNumOrStr)(e[1])?e.join(" ~ "):e},w=(0,b.default)((s=u=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),p(t,[{key:"renderContent",value:function(){var e=this.props,t=e.payload,n=e.separator,r=e.formatter,a=e.itemStyle,i=e.itemSorter;if(t&&t.length){var o={padding:0,margin:0},l=t.sort(i).map(function(e,t){var i=d({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},a),o=(0,x.isNumOrStr)(e.name),l=e.formatter||r||_;return y.default.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-"+t,style:i},o?y.default.createElement("span",{className:"recharts-tooltip-item-name"},e.name):null,o?y.default.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,y.default.createElement("span",{className:"recharts-tooltip-item-value"},l?l(e.value,e.name,e,t):e.value),y.default.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return y.default.createElement("ul",{className:"recharts-tooltip-item-list",style:o},l)}return null}},{key:"render",value:function(){var e=this.props,t=e.labelStyle,n=e.label,r=e.labelFormatter,a=e.wrapperStyle,i=d({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),o=d({margin:0},t),l=(0,x.isNumOrStr)(n),u=l?n:"";return l&&r&&(u=r(n)),y.default.createElement("div",{className:"recharts-default-tooltip",style:i},y.default.createElement("p",{className:"recharts-tooltip-label",style:o},u),this.renderContent())}}]),t}(h.Component),u.displayName="DefaultTooltipContent",u.propTypes={separator:v.default.string,formatter:v.default.func,wrapperStyle:v.default.object,itemStyle:v.default.object,labelStyle:v.default.object,labelFormatter:v.default.func,label:v.default.any,payload:v.default.arrayOf(v.default.shape({name:v.default.any,value:v.default.oneOfType([v.default.number,v.default.string,v.default.array]),unit:v.default.any})),itemSorter:v.default.func},u.defaultProps={separator:" : ",itemStyle:{},labelStyle:{}},l=s))||l;t.default=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s=n(337),f=r(s),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(1),p=r(d),h=n(2),y=r(h),m=n(17),v=r(m),g=n(519),b=r(g),x=n(18),_=n(401),w=(u=l=function(e){function t(e){a(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.updateDimensionsImmediate=function(){if(n.mounted){var e=n.getContainerSize();if(e){var t=n.state,r=t.containerWidth,a=t.containerHeight,i=e.containerWidth,o=e.containerHeight;i===r&&o===a||n.setState({containerWidth:i,containerHeight:o})}}},n.state={containerWidth:-1,containerHeight:-1},n.handleResize=e.debounce>0?(0,f.default)(n.updateDimensionsImmediate,e.debounce):n.updateDimensionsImmediate,n}return o(t,e),c(t,[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.getContainerSize();e&&this.setState(e)}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"getContainerSize",value:function(){return this.container?{containerWidth:this.container.clientWidth,containerHeight:this.container.clientHeight}:null}},{key:"renderChart",value:function(){var e=this.state,t=e.containerWidth,n=e.containerHeight;if(t<0||n<0)return null;var r=this.props,a=r.aspect,i=r.width,o=r.height,l=r.minWidth,u=r.minHeight,s=r.maxHeight,f=r.children;(0,_.warn)((0,x.isPercent)(i)||(0,x.isPercent)(o),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",i,o),(0,_.warn)(!a||a>0,"The aspect(%s) must be greater than zero.",a);var c=(0,x.isPercent)(i)?t:i,d=(0,x.isPercent)(o)?n:o;return a&&a>0&&(d=c/a,s&&d>s&&(d=s)),(0,_.warn)(c>0||d>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",c,d,i,o,l,u,a),p.default.cloneElement(f,{width:c,height:d})}},{key:"render",value:function(){var e=this,t=this.props,n=t.minWidth,r=t.minHeight,a=t.width,i=t.height,o=t.maxHeight,l=t.id,u=t.className,s={width:a,height:i,minWidth:n,minHeight:r,maxHeight:o};return p.default.createElement("div",{id:l,className:(0,v.default)("recharts-responsive-container",u),style:s,ref:function(t){e.container=t}},this.renderChart(),p.default.createElement(b.default,{handleWidth:!0,handleHeight:!0,onResize:this.handleResize}))}}]),t}(d.Component),l.displayName="ResponsiveContainer",l.propTypes={aspect:y.default.number,width:y.default.oneOfType([y.default.string,y.default.number]),height:y.default.oneOfType([y.default.string,y.default.number]),minHeight:y.default.oneOfType([y.default.string,y.default.number]),minWidth:y.default.oneOfType([y.default.string,y.default.number]),maxHeight:y.default.oneOfType([y.default.string,y.default.number]),children:y.default.node.isRequired,debounce:y.default.number,id:y.default.oneOfType([y.default.string,y.default.number]),className:y.default.oneOfType([y.default.string,y.default.number])},l.defaultProps={width:"100%",height:"100%",debounce:0},u);t.default=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l,u,s,f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(1),p=r(d),h=n(2),y=r(h),m=n(13),v=r(m),g=n(55),b=n(12),x=(0,v.default)((s=u=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),c(t,[{key:"getPolygonPath",value:function(e){var t=this.props,n=t.cx,r=t.cy,a=t.polarAngles,i="";return a.forEach(function(t,a){var o=(0,g.polarToCartesian)(n,r,e,t);i+=a?"L "+o.x+","+o.y:"M "+o.x+","+o.y}),i+="Z"}},{key:"renderPolarAngles",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.innerRadius,a=e.outerRadius,i=e.polarAngles;if(!i||!i.length)return null;var o=f({stroke:"#ccc"},(0,b.getPresentationAttributes)(this.props));return p.default.createElement("g",{className:"recharts-polar-grid-angle"},i.map(function(e,i){var l=(0,g.polarToCartesian)(t,n,r,e),u=(0,g.polarToCartesian)(t,n,a,e);return p.default.createElement("line",f({},o,{key:"line-"+i,x1:l.x,y1:l.y,x2:u.x,y2:u.y}))}))}},{key:"renderConcentricCircle",value:function(e,t,n){var r=this.props,a=r.cx,i=r.cy,o=f({stroke:"#ccc"},(0,b.getPresentationAttributes)(this.props),{fill:"none"},n);return p.default.createElement("circle",f({},o,{className:"recharts-polar-grid-concentric-circle",key:"circle-"+t,cx:a,cy:i,r:e}))}},{key:"renderConcentricPolygon",value:function(e,t,n){var r=f({stroke:"#ccc"},(0,b.getPresentationAttributes)(this.props),{fill:"none"},n);return p.default.createElement("path",f({},r,{className:"recharts-polar-grid-concentric-polygon",key:"path-"+t,d:this.getPolygonPath(e)}))}},{key:"renderConcentricPath",value:function(){var e=this,t=this.props,n=t.polarRadius,r=t.gridType;return n&&n.length?p.default.createElement("g",{className:"recharts-polar-grid-concentric"},n.map(function(t,n){return"circle"===r?e.renderConcentricCircle(t,n):e.renderConcentricPolygon(t,n)})):null}},{key:"render",value:function(){var e=this.props.outerRadius;return e<=0?null:p.default.createElement("g",{className:"recharts-polar-grid"},this.renderPolarAngles(),this.renderConcentricPath())}}]),t}(d.Component),u.displayName="PolarGrid",u.propTypes=f({},b.PRESENTATION_ATTRIBUTES,{cx:y.default.number,cy:y.default.number,innerRadius:y.default.number,outerRadius:y.default.number,polarAngles:y.default.arrayOf(y.default.number),polarRadius:y.default.arrayOf(y.default.number),gridType:y.default.oneOf(["polygon","circle"])}),u.defaultProps={cx:0,cy:0,innerRadius:0,outerRadius:0,gridType:"polygon"},l=s))||l;t.default=x},function(e,t,n){"use strict";n(551);var r={};if(!Object.setPrototypeOf&&!r.__proto__){var a=Object.getPrototypeOf;Object.getPrototypeOf=function(e){return e.__proto__?e.__proto__:a.call(Object,e)}}},function(e,t){"use strict";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=["Webkit","Moz","O","ms"];t.generatePrefixStyle=function(e,t){if(!e)return null;var i=e.replace(/(\w)/,function(e){return e.toUpperCase()}),o=a.reduce(function(e,a){return r({},e,n({},a+i,t))},{});return o[e]=t,o}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SYNC_EVENT=t.eventCenter=void 0;var a=n(476),i=r(a),o=new i.default;o.setMaxListeners&&o.setMaxListeners(10),t.eventCenter=o;t.SYNC_EVENT="recharts.syncMouseEvents"},function(e,t,n){n(564),n(565),n(566),n(567),n(568),n(569),n(570),n(571),n(572),n(573),n(574),n(575),n(576),n(577),n(578),n(579),n(580),e.exports=n(297).Math},669,[1903,300],[1907,552],[1909,300,299],444,[1915,298,199,555],function(e,t,n){var r=n(302),a=Math.pow,i=a(2,-52),o=a(2,-23),l=a(2,127)*(2-o),u=a(2,-126),s=function(e){return e+1/i-1/i};e.exports=Math.fround||function(e){var t,n,a=Math.abs(e),f=r(e);return a<u?f*s(a/u/o)*u*o:(t=(1+o/i)*a,n=t-(t-a),n>l||n!=n?f*(1/0):f*n)}},[1927,553,557,562,298],609,function(e,t,n){var r=n(299),a=n(402),i=n(556),o=n(563)("src"),l="toString",u=Function[l],s=(""+u).split(l);n(297).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,l){var u="function"==typeof n;u&&(i(n,"name")||a(n,"name",t)),e[t]!==n&&(u&&(i(n,o)||a(n,o,e[t]?""+e[t]:s.join(String(t)))),e===r?e[t]=n:l?e[t]?e[t]=n:a(e,t,n):(delete e[t],a(e,t,n)))})(Function.prototype,l,function(){return"function"==typeof this&&this[o]||u.call(this)})},[1950,300],672,function(e,t,n){var r=n(26),a=n(403),i=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:a(e-1+i(e-1)*i(e+1))}})},function(e,t,n){function r(e){return isFinite(e=+e)&&0!=e?e<0?-r(-e):Math.log(e+Math.sqrt(e*e+1)):e}var a=n(26),i=Math.asinh;a(a.S+a.F*!(i&&1/i(0)>0),"Math",{asinh:r})},function(e,t,n){var r=n(26),a=Math.atanh;r(r.S+r.F*!(a&&1/a(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(26),a=n(302);r(r.S,"Math",{cbrt:function(e){return a(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(26);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(26),a=Math.exp;r(r.S,"Math",{cosh:function(e){return(a(e=+e)+a(-e))/2}})},function(e,t,n){var r=n(26),a=n(301);r(r.S+r.F*(a!=Math.expm1),"Math",{expm1:a})},function(e,t,n){var r=n(26);r(r.S,"Math",{fround:n(558)})},function(e,t,n){var r=n(26),a=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,i=0,o=0,l=arguments.length,u=0;o<l;)n=a(arguments[o++]),u<n?(r=u/n,i=i*r*r+1,u=n):n>0?(r=n/u,i+=r*r):i+=n;return u===1/0?1/0:u*Math.sqrt(i)}})},function(e,t,n){var r=n(26),a=Math.imul;r(r.S+r.F*n(199)(function(){return a(4294967295,5)!=-5||2!=a.length}),"Math",{imul:function(e,t){var n=65535,r=+e,a=+t,i=n&r,o=n&a;return 0|i*o+((n&r>>>16)*o+i*(n&a>>>16)<<16>>>0)}})},function(e,t,n){var r=n(26);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(26);r(r.S,"Math",{log1p:n(403)})},function(e,t,n){var r=n(26);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(26);r(r.S,"Math",{sign:n(302)})},function(e,t,n){var r=n(26),a=n(301),i=Math.exp;r(r.S+r.F*n(199)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(a(e)-a(-e))/2:(i(e-1)-i(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(26),a=n(301),i=Math.exp;r(r.S,"Math",{tanh:function(e){var t=a(e=+e),n=a(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var r=n(26);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){function r(e,t){function n(e,n,o){if(i++>s)throw i=0,new Error("Call stack overflow for "+o);if(""===e)throw new Error(n+"(): '"+o+"' must contain a non-whitespace string");e=r(e,o);var l=a(e);if(l.length>1||e.indexOf("var(")>-1)return n+"("+e+")";var f=l[0]||"";"%"===f&&(e=e.replace(/\b[0-9\.]+%/g,function(e){return.01*parseFloat(e.slice(0,-1))}));var c,d=e.replace(new RegExp(f,"gi"),"");try{c=u.eval(d)}catch(t){return n+"("+e+")"}return"%"===f&&(c*=100),(n.length||"%"===f)&&(c=Math.round(c*t)/t),c+=f}function r(e,t){e=e.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var r,a="",i=e;r=f.exec(i);){r[0].index>0&&(a+=i.substring(0,r[0].index));var l=o("(",")",i.substring([0].index));if(""===l.body)throw new Error("'"+e+"' must contain a non-whitespace string");var u=n(l.body,"",t);a+=l.pre+u,i=l.post}return a+i}return i=0,t=Math.pow(10,void 0===t?5:t),e=e.replace(/\n+/g," "),l(e,/((?:\-[a-z]+\-)?calc)\(/,n)}function a(e){for(var t=[],n=[],r=/[\.0-9]([%a-z]+)/gi,a=r.exec(e);a;)a&&a[1]&&(n.indexOf(a[1].toLowerCase())===-1&&(t.push(a[1]),n.push(a[1].toLowerCase())),a=r.exec(e));return t}var i,o=n(582),l=n(583),u=n(504),s=100,f=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g;e.exports=r},function(e,t){function n(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var i=a(e,t,n);return i&&{start:i[0],end:i[1],pre:n.slice(0,i[0]),body:n.slice(i[0]+e.length,i[1]),post:n.slice(i[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}function a(e,t,n){var r,a,i,o,l,u=n.indexOf(e),s=n.indexOf(t,u+1),f=u;if(u>=0&&s>0){for(r=[],i=n.length;f>=0&&!l;)f==u?(r.push(f),u=n.indexOf(e,f+1)):1==r.length?l=[r.pop(),s]:(a=r.pop(),a<i&&(i=a,o=s),s=n.indexOf(t,f+1)),f=u<s&&u>=0?u:s;r.length&&(l=[i,o])}return l}e.exports=n,n.range=a},function(e,t,n){function r(e,t,n){var r=e;return a(e,t).reduce(function(e,a){return e.replace(a.functionIdentifier+"("+a.matches.body+")",i(a.matches.body,a.functionIdentifier,n,r,t))},e)}function a(e,t){var n=[],r="string"==typeof t?new RegExp("\\b("+t+")\\("):t;do{var a=r.exec(e);if(!a)return n;if(void 0===a[1])throw new Error("Missing the first couple of parenthesis to get the function identifier in "+t);var i=a[1],l=a.index,u=o("(",")",e.substring(l));if(!u||u.start!==a[0].length-1)throw new SyntaxError(i+"(): missing closing ')' in the value '"+e+"'");n.push({matches:u,functionIdentifier:i}),e=u.post}while(r.test(e));return n}function i(e,t,n,a,i){return n(r(e,i,n),t,a)}var o=n(584);e.exports=r},582,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports={weather:"weather___3Lmjt",quote:"quote___1CAt1",imageWrap:"imageWrap___1Xe64",parapgraph:"parapgraph___2HLdt",avatar:"avatar___2HDM0"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.startAnimation=t.formatNumber=void 0;var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),s=r(u),f=n(794),c=r(f),d=t.formatNumber=function(e,t){var n=e<0,r=""+Math.abs(e).toFixed(t.decimals),a=r.split("."),i=a[0],o=a.length>1?""+t.decimal+a[1]:"",l=/(\d+)(\d{3})/;if(t.separator)for(;l.test(i);)i=i.replace(l,"$1"+t.separator+"$2");return""+(n?"-":"")+(t.prefix||"")+i+o+(t.suffix||"")},p=t.startAnimation=function(e){if(!e||!e.spanElement)throw new Error("You need to pass the CountUp component as an argument!\neg. this.myCountUp.startAnimation(this.myCountUp);");var t=e.props,n=t.decimal,r=t.decimals,a=t.duration,i=t.easingFn,o=t.end,l=t.formattingFn,u=t.onComplete,s=t.onStart,f=t.prefix,d=t.separator,p=t.start,h=t.suffix,y=t.useEasing,m=new c.default(e.spanElement,p,o,r,a,{decimal:n,easingFn:i,formattingFn:l,separator:d,prefix:f,suffix:h,useEasing:y,useGrouping:!!d});"function"==typeof s&&s(),m.start(u)},h=function(e){function t(){var e,n,r,o;a(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.spanElement=null,r.refSpan=function(e){r.spanElement=e},o=n,i(r,o)}return o(t,e),l(t,[{key:"componentDidMount",value:function(){p(this)}},{key:"shouldComponentUpdate",value:function(e){var t=this.props.duration!==e.duration||this.props.end!==e.end||this.props.start!==e.start;return e.redraw||t}},{key:"componentDidUpdate",value:function(){p(this)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.start,r=e.decimal,a=e.decimals,i=e.separator,o=e.prefix,l=e.suffix,u=e.style,f=e.formattingFn;return s.default.createElement("span",{className:t,ref:this.refSpan,style:u},"function"==typeof f?f(n):d(n,{decimal:r,decimals:a,separator:i,prefix:o,suffix:l}))}}]),t}(s.default.Component);h.defaultProps={className:void 0,decimal:".",decimals:0,duration:3,easingFn:null,end:100,formattingFn:null,onComplete:void 0,onStart:void 0,prefix:"",separator:"",start:0,suffix:"",redraw:!1,style:void 0,useEasing:!0},t.default=h},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.icon,n=e.color,r=e.title,a=e.number;return d.default.createElement(o.default,{className:m.default.numberCard,bordered:!1,bodyStyle:{padding:0}},d.default.createElement(f.default,{className:m.default.iconWarp,style:{color:n},type:t}),d.default.createElement("div",{className:m.default.content},d.default.createElement("p",{className:m.default.title},r||"No Title"),d.default.createElement("p",{className:m.default.number},d.default.createElement(h.default,(0,u.default)({start:0,end:a,duration:2.75,useEasing:!0,useGrouping:!0,separator:","},e.countUp||{})))))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(47),o=r(i),l=n(6),u=r(l),s=n(14),f=r(s);n(48),n(60);var c=n(1),d=r(c),p=n(664),h=r(p),y=n(764),m=r(y);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.name,n=e.content,r=e.title,a=e.avatar;return o.default.createElement("div",{className:u.default.quote},o.default.createElement("div",{className:u.default.inner},n),o.default.createElement("div",{className:u.default.footer},o.default.createElement("div",{className:u.default.description},o.default.createElement("p",null,"-",t,"-"),o.default.createElement("p",null,r)),o.default.createElement("div",{className:u.default.avatar,style:{backgroundImage:"url("+a+")"}})))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=r(i),l=n(765),u=r(l);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){for(var t,n=0;n<e.data.length;n++)t=e.data[n].type;if("3"==t)var r=[{title:"NAME",dataIndex:"name"},{title:"STATUS",dataIndex:"status",render:function(e){return d.default.createElement(f.default,{color:m[e].color},m[e].text)}},{title:"DATE",dataIndex:"date",render:function(e){return new Date(e).format("yyyy-MM-dd")}},{title:"PRICE",dataIndex:"price",render:function(e,t){return d.default.createElement("span",{style:{color:m[t.status].color}},"$",e)}}];else if("2"==t)var r=[{title:"PROJECT",dataIndex:"name"},{title:"STATUS",dataIndex:"status",render:function(e){return d.default.createElement(f.default,{color:m[e].color},m[e].text)}},{title:"CLIENT",dataIndex:"price",render:function(e,t){return d.default.createElement("span",{style:{color:m[t.status].color}},"$",e)}},{title:"LAST ACTIVITY",dataIndex:"date",render:function(e){return new Date(e).format("yyyy-MM-dd")}}];else var r=[{title:"DATE",dataIndex:"date",render:function(e){return new Date(e).format("yyyy-MM-dd")}},{title:"PROFIT",dataIndex:"price",render:function(e,t){return d.default.createElement("span",{style:{color:m[t.status].color}},"$",e)}},{title:"IMPRESSIONS",dataIndex:"name"},{title:"DOWNLOAD",dataIndex:"status",render:function(e){return d.default.createElement(u.default,{percent:30,strokeWidth:5})}}];return d.default.createElement("div",{className:h.default.recentsales},d.default.createElement(o.default,{pagination:!1,columns:r,rowKey:function(e,t){return t},dataSource:e.data.filter(function(e,t){return t<5})}))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(203),o=r(i),l=n(327),u=r(l),s=n(414),f=r(s);n(204),n(328),n(415);var c=n(1),d=r(c),p=n(766),h=r(p),y=n(111),m={1:{color:y.color.green,text:"SALE"},2:{color:y.color.yellow,text:"REJECT"},3:{color:y.color.red,text:"TAX"},4:{color:y.color.blue,text:"EXTENDED"},5:{color:y.color.stil_de_gran_yellow,text:"AWAY"},6:{color:y.color.jungle_green,text:"ONLINE"},7:{color:y.color.red,text:"OFFLINE"},8:{color:y.color.stil_de_gran_yellow,text:"AWAY"},9:{color:y.color.green,text:"SALE"},10:{color:y.color.yellow,text:"REJECT"},11:{color:y.color.red,text:"TAX"},12:{color:y.color.blue,text:"EXTENDED"}};t.default=a,e.exports=t.default},,,,,,,,,,,,,function(e,t){e.exports={numberCard:"numberCard___1ubZj",iconWarp:"iconWarp___1vv2q",content:"content___1k3dT",title:"title___3Vo0B",number:"number___2Ddyr"}},function(e,t){e.exports={quote:"quote___2NfX3",inner:"inner___Yr5FE",footer:"footer___35MAr",description:"description___1OlGD",avatar:"avatar___KRiAD"}},function(e,t){e.exports={recentsales:"recentsales___1YXCG"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){var r,a;!function(i,o){r=o,a="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==a&&(e.exports=a))}(this,function(e,t,n){var r=function(e,t,n,r,a,i){function o(e){var t,n,r,a,i,o,l=e<0;if(e=Math.abs(e).toFixed(s.decimals),e+="",t=e.split("."),n=t[0],r=t.length>1?s.options.decimal+t[1]:"",s.options.useGrouping){for(a="",i=0,o=n.length;i<o;++i)0!==i&&i%3===0&&(a=s.options.separator+a),a=n[o-i-1]+a;n=a}return s.options.numerals.length&&(n=n.replace(/[0-9]/g,function(e){return s.options.numerals[+e]}),r=r.replace(/[0-9]/g,function(e){return s.options.numerals[+e]})),(l?"-":"")+s.options.prefix+n+r+s.options.suffix}function l(e,t,n,r){return n*(-Math.pow(2,-10*e/r)+1)*1024/1023+t}function u(e){return"number"==typeof e&&!isNaN(e)}var s=this;if(s.version=function(){return"1.9.3"},s.options={useEasing:!0,useGrouping:!0,separator:",",decimal:".",easingFn:l,formattingFn:o,prefix:"",suffix:"",numerals:[]},i&&"object"==typeof i)for(var f in s.options)i.hasOwnProperty(f)&&null!==i[f]&&(s.options[f]=i[f]);""===s.options.separator?s.options.useGrouping=!1:s.options.separator=""+s.options.separator;for(var c=0,d=["webkit","moz","ms","o"],p=0;p<d.length&&!window.requestAnimationFrame;++p)window.requestAnimationFrame=window[d[p]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[d[p]+"CancelAnimationFrame"]||window[d[p]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,t){var n=(new Date).getTime(),r=Math.max(0,16-(n-c)),a=window.setTimeout(function(){e(n+r)},r);return c=n+r,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)}),s.initialize=function(){return!(!s.initialized&&(s.error="",s.d="string"==typeof e?document.getElementById(e):e,s.d?(s.startVal=Number(t),s.endVal=Number(n),u(s.startVal)&&u(s.endVal)?(s.decimals=Math.max(0,r||0),s.dec=Math.pow(10,s.decimals),s.duration=1e3*Number(a)||2e3,s.countDown=s.startVal>s.endVal,s.frameVal=s.startVal,s.initialized=!0,0):(s.error="[CountUp] startVal ("+t+") or endVal ("+n+") is not a number",1)):(s.error="[CountUp] target is null or undefined",1)))},s.printValue=function(e){var t=s.options.formattingFn(e);"INPUT"===s.d.tagName?this.d.value=t:"text"===s.d.tagName||"tspan"===s.d.tagName?this.d.textContent=t:this.d.innerHTML=t},s.count=function(e){s.startTime||(s.startTime=e),s.timestamp=e;var t=e-s.startTime;s.remaining=s.duration-t,s.options.useEasing?s.countDown?s.frameVal=s.startVal-s.options.easingFn(t,0,s.startVal-s.endVal,s.duration):s.frameVal=s.options.easingFn(t,s.startVal,s.endVal-s.startVal,s.duration):s.countDown?s.frameVal=s.startVal-(s.startVal-s.endVal)*(t/s.duration):s.frameVal=s.startVal+(s.endVal-s.startVal)*(t/s.duration),s.countDown?s.frameVal=s.frameVal<s.endVal?s.endVal:s.frameVal:s.frameVal=s.frameVal>s.endVal?s.endVal:s.frameVal,s.frameVal=Math.round(s.frameVal*s.dec)/s.dec,s.printValue(s.frameVal),t<s.duration?s.rAF=requestAnimationFrame(s.count):s.callback&&s.callback()},s.start=function(e){s.initialize()&&(s.callback=e,s.rAF=requestAnimationFrame(s.count))},s.pauseResume=function(){s.paused?(s.paused=!1,delete s.startTime,s.duration=s.remaining,s.startVal=s.frameVal,requestAnimationFrame(s.count)):(s.paused=!0,cancelAnimationFrame(s.rAF))},s.reset=function(){s.paused=!1,delete s.startTime,s.initialized=!1,s.initialize()&&(cancelAnimationFrame(s.rAF),s.printValue(s.startVal))},s.update=function(e){if(s.initialize()){if(e=Number(e),!u(e))return void(s.error="[CountUp] update() - new endVal is not a number: "+e);s.error="",e!==s.frameVal&&(cancelAnimationFrame(s.rAF),s.paused=!1,delete s.startTime,s.startVal=s.frameVal,s.endVal=e,s.countDown=s.startVal>s.endVal,s.rAF=requestAnimationFrame(s.count))}},s.initialize()&&s.printValue(s.startVal)};return r})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=[{title:"name",dataIndex:"name",className:d.default.name},{title:"percent",dataIndex:"percent",className:d.default.percent,render:function(e,t){return f.default.createElement(u.default,{color:h[t.status].color},e,"%")}}];return f.default.createElement(o.default,{pagination:!1,showHeader:!1,columns:t,rowKey:function(e,t){return t},dataSource:e.data})}Object.defineProperty(t,"__esModule",{value:!0});var i=n(203),o=r(i),l=n(414),u=r(l);n(204),n(415);var s=n(1),f=r(s),c=n(1283),d=r(c),p=n(111),h={1:{color:p.color.green},2:{color:p.color.red},3:{color:p.color.blue},4:{color:p.color.yellow}};a.propTypes={props:s.PropTypes.object},t.default=a,e.exports=t.default},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{ default:e}}function a(e){var t=[{title:"avatar",dataIndex:"avatar",width:48,className:d.default.avatarcolumn,render:function(e){return f.default.createElement("span",{style:{backgroundImage:"url("+e+")"},className:d.default.avatar})}},{title:"content",dataIndex:"content",render:function(e,t){return f.default.createElement("div",null,f.default.createElement("h5",{className:d.default.name},t.name),f.default.createElement("p",{className:d.default.content},t.content),f.default.createElement("div",{className:d.default.daterow},f.default.createElement(u.default,{color:h[t.status].color},h[t.status].text),f.default.createElement("span",{className:d.default.date},t.date)))}}];return f.default.createElement("div",{className:d.default.comments},f.default.createElement(o.default,{pagination:!1,showHeader:!1,columns:t,rowKey:function(e,t){return t},dataSource:e.data.filter(function(e,t){return t<3})}))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(203),o=r(i),l=n(414),u=r(l);n(204),n(415);var s=n(1),f=r(s),c=n(1284),d=r(c),p=n(111),h={1:{color:p.color.green,text:"APPROVED"},2:{color:p.color.yellow,text:"PENDING"},3:{color:p.color.red,text:"REJECTED"}};t.default=a,e.exports=t.default},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){return o.default.createElement("div",{className:u.default.sales},o.default.createElement("div",{className:u.default.title},"TEAM TOTAL COMPLETED"),o.default.createElement(f.ResponsiveContainer,{minHeight:360},o.default.createElement(f.AreaChart,{data:e.data},o.default.createElement(f.Legend,{verticalAlign:"top",content:function(e){var t=e.payload;return o.default.createElement("ul",{className:u.default.legend+" clearfix"},t.map(function(e,t){return o.default.createElement("li",{key:t},o.default.createElement("span",{className:u.default.radiusdot,style:{background:e.color}}),e.value)}))}}),o.default.createElement(f.XAxis,{dataKey:"name",axisLine:{stroke:s.color.borderBase,strokeWidth:1},tickLine:!1}),o.default.createElement(f.YAxis,{axisLine:!1,tickLine:!1}),o.default.createElement(f.CartesianGrid,{vertical:!1,stroke:s.color.borderBase,strokeDasharray:"3 3"}),o.default.createElement(f.Tooltip,{wrapperStyle:{border:"none",boxShadow:"4px 4px 40px rgba(0, 0, 0, 0.05)"},content:function(e){var t=e.payload.map(function(e,t){return o.default.createElement("li",{key:t,className:u.default.tipitem},o.default.createElement("span",{className:u.default.radiusdot,style:{background:e.color}}),e.name+":"+e.value)});return o.default.createElement("div",{className:u.default.tooltip},o.default.createElement("p",{className:u.default.tiptitle},e.label),o.default.createElement("ul",null,t))}}),o.default.createElement(f.Area,{type:"monotone",dataKey:"Task complete",stroke:s.color.grass,fill:s.color.grass,strokeWidth:2,dot:{fill:"#fff"},activeDot:{r:5,fill:"#fff",stroke:s.color.green}}),o.default.createElement(f.Area,{type:"monotone",dataKey:"Cards Complete",stroke:s.color.sky,fill:s.color.sky,strokeWidth:2,dot:{fill:"#fff"},activeDot:{r:5,fill:"#fff",stroke:s.color.blue}}))))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=r(i),l=n(1285),u=r(l),s=n(111),f=n(293);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){return u.default.createElement("div",{className:f.default.cpu},u.default.createElement("div",{className:f.default.number},u.default.createElement("div",{className:f.default.item},u.default.createElement("p",null,"usage"),u.default.createElement("p",null,u.default.createElement(p.default,(0,o.default)({end:e.usage,suffix:"GB"},y)))),u.default.createElement("div",{className:f.default.item},u.default.createElement("p",null,"space"),u.default.createElement("p",null,u.default.createElement(p.default,(0,o.default)({end:e.space,suffix:"GB"},y)))),u.default.createElement("div",{className:f.default.item},u.default.createElement("p",null,"cpu"),u.default.createElement("p",null,u.default.createElement(p.default,(0,o.default)({end:e.cpu,suffix:"%"},y))))),u.default.createElement(h.ResponsiveContainer,{minHeight:300},u.default.createElement(h.LineChart,{data:e.data,margin:{left:-40}},u.default.createElement(h.XAxis,{dataKey:"name",axisLine:{stroke:c.color.borderBase,strokeWidth:1},tickLine:!1}),u.default.createElement(h.YAxis,{axisLine:!1,tickLine:!1}),u.default.createElement(h.CartesianGrid,{vertical:!1,stroke:c.color.borderBase,strokeDasharray:"3 3"}),u.default.createElement(h.Line,{type:"monotone",connectNulls:!0,dataKey:"cpu",stroke:c.color.blue,fill:c.color.blue}))))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=r(i),l=n(1),u=r(l),s=n(1286),f=r(s),c=n(111),d=n(664),p=r(d),h=n(293),y={start:0,duration:2.75,useEasing:!0,useGrouping:!0,separator:","};a.propTypes={props:l.PropTypes.object},t.default=a,e.exports=t.default},,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){return o.default.createElement("div",{className:u.default.sales},o.default.createElement("div",{className:u.default.title},"Yearly Sales"),o.default.createElement(f.ResponsiveContainer,{minHeight:360},o.default.createElement(f.LineChart,{data:e.data},o.default.createElement(f.Legend,{verticalAlign:"top",content:function(e){var t=e.payload;return o.default.createElement("ul",{className:u.default.legend+" clearfix"},t.map(function(e,t){return o.default.createElement("li",{key:t},o.default.createElement("span",{className:u.default.radiusdot,style:{background:e.color}}),e.value)}))}}),o.default.createElement(f.XAxis,{dataKey:"name",axisLine:{stroke:s.color.borderBase,strokeWidth:1},tickLine:!1}),o.default.createElement(f.YAxis,{axisLine:!1,tickLine:!1}),o.default.createElement(f.CartesianGrid,{vertical:!1,stroke:s.color.borderBase,strokeDasharray:"3 3"}),o.default.createElement(f.Tooltip,{wrapperStyle:{border:"none",boxShadow:"4px 4px 40px rgba(0, 0, 0, 0.05)"},content:function(e){var t=e.payload.map(function(e,t){return o.default.createElement("li",{key:t,className:u.default.tipitem},o.default.createElement("span",{className:u.default.radiusdot,style:{background:e.color}}),e.name+":"+e.value)});return o.default.createElement("div",{className:u.default.tooltip},o.default.createElement("p",{className:u.default.tiptitle},e.label),o.default.createElement("ul",null,t))}}),o.default.createElement(f.Line,{type:"monotone",dataKey:"Food",stroke:s.color.purple,strokeWidth:3,dot:{fill:s.color.purple},activeDot:{r:5,strokeWidth:0}}),o.default.createElement(f.Line,{type:"monotone",dataKey:"Clothes",stroke:s.color.red,strokeWidth:3,dot:{fill:s.color.red},activeDot:{r:5,strokeWidth:0}}),o.default.createElement(f.Line,{type:"monotone",dataKey:"Electronics",stroke:s.color.green,strokeWidth:3,dot:{fill:s.color.green},activeDot:{r:5,strokeWidth:0}}))))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=r(i),l=n(1287),u=r(l),s=n(111),f=n(293);t.default=a,e.exports=t.default},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.avatar,n=e.name,r=e.email;return f.default.createElement("div",{className:d.default.user},f.default.createElement("div",{className:d.default.header},f.default.createElement("div",{className:d.default.headerinner},f.default.createElement("div",{className:d.default.avatar,style:{backgroundImage:"url("+t+")"}}),f.default.createElement("h5",{className:d.default.name},n),f.default.createElement("p",null,r))),f.default.createElement("div",{className:d.default.number},f.default.createElement("div",{className:d.default.item},f.default.createElement("p",null,"EARNING SALES"),f.default.createElement("p",{style:{color:y.color.green}},f.default.createElement(h.default,(0,u.default)({end:e.sales,prefix:"$"},m)))),f.default.createElement("div",{className:d.default.item},f.default.createElement("p",null,"ITEM SOLD"),f.default.createElement("p",{style:{color:y.color.blue}},f.default.createElement(h.default,(0,u.default)({end:e.sold},m))))),f.default.createElement("div",{className:d.default.footer},f.default.createElement(o.default,{type:"ghost",size:"large"},"View Profile")))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(31),o=r(i),l=n(6),u=r(l);n(34);var s=n(1),f=r(s),c=n(1289),d=r(c),p=n(664),h=r(p),y=n(111),m={start:0,duration:2.75,useEasing:!0,useGrouping:!0,separator:","};a.propTypes={props:s.PropTypes.object},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.city,n=e.icon,r=e.dateTime,a=e.temperature,i=e.name;return o.default.createElement("div",{className:u.default.weather},o.default.createElement("div",{className:u.default.left},o.default.createElement("div",{className:u.default.icon,style:{backgroundImage:"url("+n+")"}}),o.default.createElement("p",null,i)),o.default.createElement("div",{className:u.default.right},o.default.createElement("h1",{className:u.default.temperature},a+"\xb0"),o.default.createElement("p",{className:u.default.description},t,",",r)))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=r(i),l=n(1290),u=r(l);t.default=a,e.exports=t.default},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.dashboard,n=(e.dispatch,t.weather),r=t.sales,a=t.quote,i=t.numbers,l=t.recentSales,s=(t.recentSales1,t.comments),c=t.completed,p=t.browser,y=t.cpu,m=t.user,g=i.map(function(e,t){return h.default.createElement(d.default,{key:t,lg:6,md:12},h.default.createElement(v.default,e))});return h.default.createElement("div",{className:"dashboard-1"},h.default.createElement(u.default,{gutter:24},g,h.default.createElement(d.default,{lg:18,md:24},h.default.createElement(f.default,{bordered:!1,bodyStyle:{padding:"24px 36px 24px 0"}},h.default.createElement(_.default,{data:r}))),h.default.createElement(d.default,{lg:6,md:24},h.default.createElement(u.default,{gutter:24},h.default.createElement(d.default,{lg:24,md:12},h.default.createElement(f.default,{bordered:!1,className:L.default.weather,bodyStyle:{padding:0,height:204,background:B.color.blue}},h.default.createElement(O.default,n))),h.default.createElement(d.default,{lg:24,md:12},h.default.createElement(f.default,{bordered:!1,className:L.default.quote,bodyStyle:{padding:0,height:204,background:B.color.peach}},h.default.createElement(b.default,a))))),h.default.createElement(d.default,{lg:12,md:24},h.default.createElement(f.default,(0,o.default)({bordered:!1},V),h.default.createElement(C.default,{data:l}))),h.default.createElement(d.default,{lg:12,md:24},h.default.createElement(f.default,(0,o.default)({bordered:!1},V),h.default.createElement(T.default,{data:s}))),h.default.createElement(d.default,{lg:24,md:24},h.default.createElement(f.default,{bordered:!1,bodyStyle:{padding:"24px 36px 24px 0"}},h.default.createElement(A.default,{data:c}))),h.default.createElement(d.default,{lg:8,md:24},h.default.createElement(f.default,(0,o.default)({bordered:!1},V),h.default.createElement(P.default,{data:p}))),h.default.createElement(d.default,{lg:8,md:24},h.default.createElement(f.default,(0,o.default)({bordered:!1},V),h.default.createElement(j.default,y))),h.default.createElement(d.default,{lg:8,md:24},h.default.createElement(f.default,{bordered:!1,bodyStyle:(0,o.default)({},V.bodyStyle,{padding:0})},h.default.createElement(I.default,m)))))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=r(i),l=n(37),u=r(l),s=n(47),f=r(s),c=n(42),d=r(c);n(40),n(48),n(43);var p=n(1),h=r(p),y=n(637),m=n(749),v=r(m),g=n(750),b=r(g),x=n(1171),_=r(x),w=n(1174),O=r(w),E=n(751),C=r(E),k=n(1164),T=r(k),S=n(1166),A=r(S),M=n(1162),P=r(M),N=n(1167),j=r(N),R=n(1173),I=r(R),D=n(622),L=r(D),B=n(111),V={bodyStyle:{height:432,background:"#fff"}};a.propTypes={weather:p.PropTypes.object,sales:p.PropTypes.array,quote:p.PropTypes.object,numbers:p.PropTypes.array,recentSales:p.PropTypes.array,recentSales1:p.PropTypes.array,comments:p.PropTypes.array,completed:p.PropTypes.array,browser:p.PropTypes.array,cpu:p.PropTypes.object,user:p.PropTypes.object},t.default=(0,y.connect)(function(e){var t=e.dashboard;return{dashboard:t}})(a),e.exports=t.default},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports={percent:"percent___2wnDn",name:"name___N8JTu"}},function(e,t){e.exports={comments:"comments___3U37b",avatar:"avatar___1SjsO",content:"content___2mI8X",date:"date___2NfLE",daterow:"daterow___2Qd0u",name:"name___kbyyB",avatarcolumn:"avatarcolumn____A-Pt"}},function(e,t){e.exports={sales:"sales___2LYz2",title:"title___1Gbt6",radiusdot:"radiusdot___1P8sW",legend:"legend___16CoO",tooltip:"tooltip___1Pepr",tiptitle:"tiptitle___2WtlX",tipitem:"tipitem___wB1Sk"}},function(e,t){e.exports={cpu:"cpu___1Oax-",number:"number___11khU",item:"item___2pd07"}},function(e,t){e.exports={sales:"sales___1wdnf",title:"title___35jgQ",radiusdot:"radiusdot___gpKER",legend:"legend___OTUEu",tooltip:"tooltip___1HfA4",tiptitle:"tiptitle___2-3C4",tipitem:"tipitem___3NxJk"}},,function(e,t){e.exports={user:"user___1CkBO",header:"header___2Cdci",headerinner:"headerinner___1Aw6G",avatar:"avatar___3246b",name:"name___3apAy",number:"number___3TY_Z",item:"item___3wSHd",footer:"footer___1uC0p"}},function(e,t){e.exports={weather:"weather___3C3NN",left:"left___mKCyN",icon:"icon___1PWov",right:"right___2sjlU",temperature:"temperature___3Ewtp",description:"description___26-AD"}}]);
tinyMCE.addI18n({fi:{ common:{ edit_confirm:"Haluatko k\u00E4ytt\u00E4\u00E4 WYSIWYG-tilaa t\u00E4ss\u00E4 tekstikent\u00E4ss\u00E4?", apply:"K\u00E4yt\u00E4", insert:"Lis\u00E4\u00E4", update:"P\u00E4ivit\u00E4", cancel:"Peruuta", close:"Sulje", browse:"Selaa", class_name:"Luokka", not_set:"-- Ei m\u00E4\u00E4ritetty --", clipboard_msg:"Kopioi/Leikkaa/Liit\u00E4 ei ole k\u00E4ytett\u00E4viss\u00E4 Mozilla ja Firefox -selaimilla.\nHaluatko lis\u00E4tietoa t\u00E4st\u00E4 ongelmasta?", clipboard_no_support:"Selaimesi ei ole tuettu, k\u00E4yt\u00E4 sen sijaan n\u00E4pp\u00E4inoikoteit\u00E4.", popup_blocked:"Sinulla on k\u00E4yt\u00F6ss\u00E4si ohjelma, joka est\u00E4\u00E4 ponnahdusikkunoiden n\u00E4yt\u00F6n. Sinun t\u00E4ytyy kytke\u00E4 ponnahdusikkunoiden esto pois p\u00E4\u00E4lt\u00E4 voidaksesi hy\u00F6dynt\u00E4\u00E4 t\u00E4ysin t\u00E4t\u00E4 ty\u00F6kalua.", invalid_data:"Virhe: Sy\u00F6tit virheellisi\u00E4 arvoja, ne n\u00E4kyv\u00E4t punaisina.", more_colors:"Enemm\u00E4n v\u00E4rej\u00E4" }, contextmenu:{ align:"Tasaus", left:"Vasemmalle", center:"Keskelle", right:"Oikealle", full:"Molemmille puolille" }, insertdatetime:{ date_fmt:"%d.%m.%Y", time_fmt:"%H:%M:%S", insertdate_desc:"Lis\u00E4\u00E4 p\u00E4iv\u00E4m\u00E4\u00E4r\u00E4", inserttime_desc:"Lis\u00E4\u00E4 kellonaika", months_long:"tammikuu,helmikuu,maaliskuu,huhtikuu,toukokuu,kes\u00E4kuu,hein\u00E4kuu,elokuu,syyskuu,lokakuu,marraskuu,joulukuu", months_short:"tammi,helmi,maalis,huhti,touko,kes\u00E4,hein\u00E4,elo,syys,loka,marras,joulu", day_long:"sunnuntai,maanantai,tiistai,keskiviikko,torstai,perjantai,lauantai,sunnuntai", day_short:"su,ma,ti,ke,to,pe,la,su" }, print:{ print_desc:"Tulosta" }, preview:{ preview_desc:"Esikatselu" }, directionality:{ ltr_desc:"Suunta vasemmalta oikealle", rtl_desc:"Suunta oikealta vasemmalle" }, layer:{ insertlayer_desc:"Lis\u00E4\u00E4 uusi taso", forward_desc:"Siirr\u00E4 eteenp\u00E4in", backward_desc:"Siirr\u00E4 taaksep\u00E4in", absolute_desc:"Absoluuttinen sijainti", content:"Uusi taso..." }, save:{ save_desc:"Tallenna", cancel_desc:"Peruuta kaikki muutokset" }, nonbreaking:{ nonbreaking_desc:"Lis\u00E4\u00E4 tyhj\u00E4 merkki (nbsp)" }, iespell:{ iespell_desc:"Oikeinkirjoituksen tarkistus", download:"ieSpell-ohjelmaa ei havaittu. Haluatko asentaa sen nyt?" }, advhr:{ advhr_desc:"Vaakatasoviivain" }, emotions:{ emotions_desc:"Hymi\u00F6t" }, searchreplace:{ search_desc:"Etsi", replace_desc:"Etsi ja korvaa" }, advimage:{ image_desc:"Lis\u00E4\u00E4/muokkaa kuvaa" }, advlink:{ link_desc:"Lis\u00E4\u00E4/muokkaa linkki\u00E4" }, xhtmlxtras:{ cite_desc:"Sitaatti", abbr_desc:"Lyhenne", acronym_desc:"Kirjainlyhenne", del_desc:"Poisto", ins_desc:"Lis\u00E4ys", attribs_desc:"Lis\u00E4\u00E4/muokkaa attribuutteja" }, style:{ desc:"Muokkaa CSS-tyylej\u00E4" }, paste:{ paste_text_desc:"Liit\u00E4 pelkk\u00E4n\u00E4 tekstin\u00E4", paste_word_desc:"Liit\u00E4 Wordist\u00E4", selectall_desc:"Valitse kaikki", plaintext_mode_sticky:"Liitt\u00E4minen on nyt pelkk\u00E4n\u00E4 tekstin\u00E4. Klikkaa uudelleen vaihtaaksesi takaisin tavalliseen tilaan. Palaat takaisin tavalliseen tilaan liitetty\u00E4si jotakin.", plaintext_mode:"Liitt\u00E4minen on nyt pelkk\u00E4n\u00E4 tekstin\u00E4. Klikkaa uudelleen vaihtaaksesi takaisin tavalliseen tilaan." }, paste_dlg:{ text_title:"Paina CTRL+V liitt\u00E4\u00E4ksesi sis\u00E4ll\u00F6n ikkunaan.", text_linebreaks:"S\u00E4ilyt\u00E4 rivinvaihdot", word_title:"Paina CTRL+V liitt\u00E4\u00E4ksesi sis\u00E4ll\u00F6n ikkunaan." }, table:{ desc:"Lis\u00E4\u00E4 uusi taulukko", row_before_desc:"Lis\u00E4\u00E4 rivi ennen", row_after_desc:"Lis\u00E4\u00E4 rivi j\u00E4lkeen", delete_row_desc:"Poista rivi", col_before_desc:"Lis\u00E4\u00E4 sarake ennen", col_after_desc:"Lis\u00E4\u00E4 sarake j\u00E4lkeen", delete_col_desc:"Poista sarake", split_cells_desc:"Jaa yhdistetyt taulukon solut", merge_cells_desc:"Yhdist\u00E4 taulukon solut", row_desc:"Taulukon rivin asetukset", cell_desc:"Taulukon solun asetukset", props_desc:"Taulukon asetukset", paste_row_before_desc:"Liit\u00E4 taulukon rivi ennen", paste_row_after_desc:"Liit\u00E4 taulukon rivi j\u00E4lkeen", cut_row_desc:"Leikkaa taulukon rivi", copy_row_desc:"Kopioi taulukon rivi", del:"Poista taulukko", row:"Rivi", col:"Sarake", cell:"Solu", cellprops_delta_width:"80" }, autosave:{ unload_msg:"Tekem\u00E4si muutokset menetet\u00E4\u00E4n jos poistut t\u00E4lt\u00E4 sivulta.", restore_content:"Palauta automaattisesti tallennettu sis\u00E4lt\u00F6.", warning_message:"Jos palautat automaattisesti tallennetun sis\u00E4ll\u00F6n, menet\u00E4t t\u00E4ll\u00E4 hetkell\u00E4 editorissa olevan sis\u00E4ll\u00F6n.\n\nHaluatko varmasti palauttaa tallennetun sis\u00E4ll\u00F6n?" }, fullscreen:{ desc:"Kokoruututila" }, media:{ desc:"Lis\u00E4\u00E4/muokkaa upotettua mediaa", edit:"Muokkaa upotettua mediaa" }, fullpage:{ desc:"Tiedoston asetukset" }, template:{ desc:"Lis\u00E4\u00E4 esim\u00E4\u00E4ritetty\u00E4 sivupohjasis\u00E4lt\u00F6\u00E4" }, visualchars:{ desc:"N\u00E4yt\u00E4/piilota muotoilumerkit." }, spellchecker:{ desc:"Oikeinkirjoituksen tarkistus", menu:"Oikeinkirjoituksen asetukset", ignore_word:"Ohita sana", ignore_words:"Ohita kaikki", langs:"Kielet", wait:"Odota ole hyv\u00E4...", sug:"Ehdotukset", no_sug:"Ei ehdotuksia", no_mpell:"Virheit\u00E4 ei l\u00F6ytynyt." }, pagebreak:{ desc:"Lis\u00E4\u00E4 sivunvaihto." }, advlist:{ types:"Tyypit", def:"Oletus", lower_alpha:"pienet kirjaimet: a, b, c", lower_greek:"pienet kirjaimet: \u03B1, \u03B2, \u03B3", lower_roman:"pienet kirjaimet: i, ii, iii", upper_alpha:"isot kirjaimet: A, B, C", upper_roman:"isot kirjaimet: I, II, III", circle:"Pallo", disc:"Ympyr\u00E4", square:"Neli\u00F6" }}});
'use strict' const path = require('path') const defaultSettings = require('./src/settings.js') function resolve(dir) { return path.join(__dirname, dir) } const name = defaultSettings.title || 'vue Admin Template' // page title // If your port is set to 80, // use administrator privileges to execute the command line. // For example, Mac: sudo npm run const port = 9528 // dev port // cdn const cdn = { css: [ // element-ui css 'https://cdn.bootcss.com/element-ui/2.7.2/theme-chalk/index.css' ], js: [ // vue must at first! 'https://cdn.bootcss.com/vue/2.6.10/vue.min.js', // vue-router 'https://cdn.bootcss.com/vue-router/3.0.6/vue-router.min.js', // element-ui js 'https://cdn.bootcss.com/element-ui/2.7.2/index.js' ] } // All configuration item explanations can be find in https://cli.vuejs.org/config/ module.exports = { /** * You will need to set publicPath if you plan to deploy your site under a sub path, * for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/, * then publicPath should be set to "/bar/". * In most cases please use '/' !!! * Detail: https://cli.vuejs.org/config/#publicpath */ publicPath: '/', outputDir: 'dist', assetsDir: 'static', lintOnSave: process.env.NODE_ENV === 'development', productionSourceMap: false, devServer: { port: port, open: true, overlay: { warnings: false, errors: true }, proxy: { // change xxx-api/login => mock/login // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { target: `http://localhost:${port}/mock`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '' } } }, after: require('./mock/mock-server.js') }, configureWebpack: { // provide the app's title in webpack's name field, so that // it can be accessed in index.html to inject the correct title. name: name, resolve: { alias: { '@': resolve('src') } }, // 不打包 vue element vue-router externals: { vue: 'Vue', 'element-ui':'ELEMENT', 'vue-router':'VueRouter' } }, chainWebpack(config) { config.plugin('html').tap(args => { args[0].cdn = cdn return args }) config.plugins.delete('preload') // TODO: need test config.plugins.delete('prefetch') // TODO: need test // set svg-sprite-loader config.module .rule('svg') .exclude.add(resolve('src/icons')) .end() config.module .rule('icons') .test(/\.svg$/) .include.add(resolve('src/icons')) .end() .use('svg-sprite-loader') .loader('svg-sprite-loader') .options({ symbolId: 'icon-[name]' }) .end() // set preserveWhitespace config.module .rule('vue') .use('vue-loader') .loader('vue-loader') .tap(options => { options.compilerOptions.preserveWhitespace = true return options }) .end() config // https://webpack.js.org/configuration/devtool/#development .when(process.env.NODE_ENV === 'development', config => config.devtool('cheap-source-map') ) config .when(process.env.NODE_ENV !== 'development', config => { config .plugin('ScriptExtHtmlWebpackPlugin') .after('html') .use('script-ext-html-webpack-plugin', [{ // `runtime` must same as runtimeChunk name. default is `runtime` inline: /runtime\..*\.js$/ }]) .end() config .optimization.splitChunks({ chunks: 'all', cacheGroups: { libs: { name: 'chunk-libs', test: /[\\/]node_modules[\\/]/, priority: 10, chunks: 'initial' // only package third parties that are initially dependent }, elementUI: { name: 'chunk-elementUI', // split elementUI into a single package priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm }, commons: { name: 'chunk-commons', test: resolve('src/components'), // can customize your rules minChunks: 3, // minimum common number priority: 5, reuseExistingChunk: true } } }) config.optimization.runtimeChunk('single') } ) } }
import matplotlib import utils if utils.hostname() != 'user': matplotlib.use('Agg') import matplotlib.pyplot as plt import warnings import numpy as np import matplotlib.animation as animation warnings.simplefilter('ignore') anim_running = True def plot_slice_3d_2(image3d, mask, axis, pid, img_dir=None, idx=None): fig, ax = plt.subplots(2, 2, figsize=[8, 8]) fig.canvas.set_window_title(pid) masked_image = image3d * mask if idx is None: roi_idxs = np.where(mask == 1.) if len(roi_idxs[0]) > 0: idx = (np.mean(roi_idxs[0]), np.mean(roi_idxs[1]), np.mean(roi_idxs[2])) else: print 'No nodules' idx = np.array(image3d.shape) / 2 else: idx = idx.astype(int) if axis == 0: # sax ax[0, 0].imshow(image3d[idx[0], :, :], cmap=plt.cm.gray) ax[0, 1].imshow(mask[idx[0], :, :], cmap=plt.cm.gray) ax[1, 0].imshow(masked_image[idx[0], :, :], cmap=plt.cm.gray) if axis == 1: # 2 lungs ax[0, 0].imshow(image3d[:, idx[1], :], cmap=plt.cm.gray) ax[0, 1].imshow(mask[:, idx[1], :], cmap=plt.cm.gray) ax[1, 0].imshow(masked_image[:, idx[1], :], cmap=plt.cm.gray) if axis == 2: # side view ax[0, 0].imshow(image3d[:, :, idx[2]], cmap=plt.cm.gray) ax[0, 1].imshow(mask[:, :, idx[2]], cmap=plt.cm.gray) ax[1, 0].imshow(masked_image[:, :, idx[2]], cmap=plt.cm.gray) if img_dir is not None: fig.savefig(img_dir + '/%s%s.png' % (pid, axis), bbox_inches='tight') else: plt.show() fig.clf() plt.close('all') def plot_slice_3d_3(input, mask, prediction, axis, pid, img_dir=None, idx=None): # to convert cuda arrays to numpy array input = np.asarray(input) mask = np.asarray(mask) prediction = np.asarray(prediction) fig, ax = plt.subplots(2, 2, figsize=[8, 8]) fig.canvas.set_window_title(pid) if idx is None: roi_idxs = np.where(mask > 0) if len(roi_idxs[0]) > 0: idx = (int(np.mean(roi_idxs[0])), int(np.mean(roi_idxs[1])), int(np.mean(roi_idxs[2]))) else: print 'No nodules' idx = np.array(input.shape) / 2 else: idx = idx.astype(int) if axis == 0: # sax ax[0, 0].imshow(prediction[idx[0], :, :], cmap=plt.cm.gray) ax[1, 0].imshow(input[idx[0], :, :], cmap=plt.cm.gray) ax[0, 1].imshow(mask[idx[0], :, :], cmap=plt.cm.gray) if axis == 1: # 2 lungs ax[0, 0].imshow(prediction[:, idx[1], :], cmap=plt.cm.gray) ax[1, 0].imshow(input[:, idx[1], :], cmap=plt.cm.gray) ax[0, 1].imshow(mask[:, idx[1], :], cmap=plt.cm.gray) if axis == 2: # side view ax[0, 0].imshow(prediction[:, :, idx[2]], cmap=plt.cm.gray) ax[1, 0].imshow(input[:, :, idx[2]], cmap=plt.cm.gray) ax[0, 1].imshow(mask[:, :, idx[2]], cmap=plt.cm.gray) if img_dir is not None: fig.savefig(img_dir + '/%s-%s.png' % (pid, axis), bbox_inches='tight') else: plt.show() fig.clf() plt.close('all') def plot_slice_3d_3axis(input, pid, img_dir=None, idx=None): # to convert cuda arrays to numpy array input = np.asarray(input) fig, ax = plt.subplots(2, 2, figsize=[8, 8]) fig.canvas.set_window_title(pid) ax[0, 0].imshow(input[idx[0], :, :], cmap=plt.cm.gray) ax[1, 0].imshow(input[:, idx[1], :], cmap=plt.cm.gray) ax[0, 1].imshow(input[:, :, idx[2]], cmap=plt.cm.gray) if img_dir is not None: fig.savefig(img_dir + '/%s.png' % (pid), bbox_inches='tight') else: plt.show() fig.clf() plt.close('all') def plot_slice_3d_4(input, mask, prediction, lung_mask, axis, pid, img_dir=None, idx=None): # to convert cuda arrays to numpy array input = np.asarray(input) mask = np.asarray(mask) prediction = np.asarray(prediction) fig, ax = plt.subplots(2, 2, figsize=[8, 8]) fig.canvas.set_window_title(pid) if idx is None: roi_idxs = np.where(mask > 0) if len(roi_idxs[0]) > 0: idx = (int(np.mean(roi_idxs[0])), int(np.mean(roi_idxs[1])), int(np.mean(roi_idxs[2]))) else: print 'No nodules' idx = np.array(input.shape) / 2 else: idx = idx.astype(int) if axis == 0: # sax ax[0, 0].imshow(prediction[idx[0], :, :], cmap=plt.cm.gray) ax[1, 0].imshow(input[idx[0], :, :], cmap=plt.cm.gray) ax[0, 1].imshow(mask[idx[0], :, :], cmap=plt.cm.gray) ax[1, 1].imshow(lung_mask[idx[0], :, :], cmap=plt.cm.gray) if axis == 1: # 2 lungs ax[0, 0].imshow(prediction[:, idx[1], :], cmap=plt.cm.gray) ax[1, 0].imshow(input[:, idx[1], :], cmap=plt.cm.gray) ax[0, 1].imshow(mask[:, idx[1], :], cmap=plt.cm.gray) ax[1, 1].imshow(lung_mask[:, idx[1], :], cmap=plt.cm.gray) if axis == 2: # side view ax[0, 0].imshow(prediction[:, :, idx[2]], cmap=plt.cm.gray) ax[1, 0].imshow(input[:, :, idx[2]], cmap=plt.cm.gray) ax[0, 1].imshow(mask[:, :, idx[2]], cmap=plt.cm.gray) ax[1, 1].imshow(lung_mask[:, :, idx[2]], cmap=plt.cm.gray) if img_dir is not None: fig.savefig(img_dir + '/%s-%s.png' % (pid, axis), bbox_inches='tight') else: plt.show() fig.clf() plt.close('all') def plot_slice_3d_3_patch(input, mask, prediction, axis, pid, patch_size=64, img_dir=None, idx=None): # to convert cuda arrays to numpy array input = np.asarray(input) mask = np.asarray(mask) prediction = np.asarray(prediction) fig, ax = plt.subplots(2, 2, figsize=[8, 8]) fig.canvas.set_window_title(pid) if idx is None: roi_idxs = np.where(mask > 0) if len(roi_idxs[0]) > 0: idx = (np.mean(roi_idxs[0]), np.mean(roi_idxs[1]), np.mean(roi_idxs[2])) else: print 'No nodules' idx = np.array(input.shape) / 2 if axis == 0: # sax sz, sy, sx = slice(idx[0], idx[0] + 1), slice(idx[1] - patch_size, idx[1] + patch_size), slice( idx[2] - patch_size, idx[2] + patch_size) ax[0, 0].imshow(prediction[sz, sy, sx], cmap=plt.cm.gray) ax[1, 0].imshow(input[sz, sy, sx], cmap=plt.cm.gray) ax[0, 1].imshow(mask[sz, sy, sx], cmap=plt.cm.gray) if axis == 1: # 2 lungs ax[0, 0].imshow(prediction[:, idx[1], :], cmap=plt.cm.gray) ax[1, 0].imshow(input[:, idx[1], :], cmap=plt.cm.gray) ax[0, 1].imshow(mask[:, idx[1], :], cmap=plt.cm.gray) if axis == 2: # side view ax[0, 0].imshow(prediction[:, :, idx[2]], cmap=plt.cm.gray) ax[1, 0].imshow(input[:, :, idx[2]], cmap=plt.cm.gray) ax[0, 1].imshow(mask[:, :, idx[2]], cmap=plt.cm.gray) if img_dir is not None: fig.savefig(img_dir + '/%s.png' % pid, bbox_inches='tight') else: plt.show() fig.clf() plt.close('all') def plot_slice_3d_2_patch(ct_scan, mask, pid, img_dir=None, idx=None): # to convert cuda arrays to numpy array ct_scan = np.asarray(ct_scan) mask = np.asarray(mask) fig, ax = plt.subplots(2, 3, figsize=[8, 8]) fig.canvas.set_window_title(pid) if idx == None: #just plot in the middle of the cube in_sh = ct_scan.shape idx = [in_sh[0]/2,in_sh[1]/2,in_sh[2]/2] print np.amin(ct_scan), np.amax(ct_scan) print np.amin(mask), np.amax(mask) ax[0, 0].imshow(ct_scan[idx[0], :, :], cmap=plt.cm.gray) ax[0, 1].imshow(ct_scan[:, idx[1], :], cmap=plt.cm.gray) ax[0, 2].imshow(ct_scan[:, :, idx[2]], cmap=plt.cm.gray) ax[1, 0].imshow(mask[idx[0], :, :], cmap=plt.cm.gray) ax[1, 1].imshow(mask[:, idx[1], :], cmap=plt.cm.gray) ax[1, 2].imshow(mask[:, :, idx[2]], cmap=plt.cm.gray) if img_dir is not None: fig.savefig(img_dir + '/%s.png' % pid, bbox_inches='tight') else: plt.show() fig.clf() plt.close('all') def plot_2d(img, mask, pid, img_dir): # fig = plt.figure() fig, ax = plt.subplots(2, 2, figsize=[8, 8]) fig.canvas.set_window_title(pid) ax[0, 0].imshow(img, cmap='gray') ax[0, 1].imshow(mask, cmap='gray') ax[1, 0].imshow(img * mask, cmap='gray') plt.show() fig.savefig(img_dir + '/%s.png' % pid, bbox_inches='tight') fig.clf() plt.close('all') def plot_2d_4(img, img_prev, img_next, mask, pid, img_dir): fig, ax = plt.subplots(2, 2, figsize=[8, 8]) fig.canvas.set_window_title(pid) ax[0, 0].imshow(img, cmap='gray') ax[0, 1].imshow(img_prev, cmap='gray') ax[1, 0].imshow(img_next, cmap='gray') ax[1, 1].imshow(img * mask, cmap='gray') plt.show() fig.savefig(img_dir + '/%s.png' % pid, bbox_inches='tight') fig.clf() plt.close('all') def plot_2d_animation(input, mask, predictions): rgb_image = np.concatenate((input, input, input), axis=0) mask = np.concatenate((np.zeros_like(input), mask, predictions), axis=0) # green = targets # blue = predictions # red = overlap idxs = np.where(mask > 0.3) rgb_image[idxs] = mask[idxs] rgb_image = np.rollaxis(rgb_image, axis=0, start=4) print rgb_image.shape def get_data_step(step): return rgb_image[step, :, :, :] fig = plt.figure() im = fig.gca().imshow(get_data_step(0)) def init(): im.set_data(get_data_step(0)) return im, def animate(i): im.set_data(get_data_step(i)) return im, anim = animation.FuncAnimation(fig, animate, init_func=init, frames=rgb_image.shape[1], interval=20000 / rgb_image.shape[0], blit=True) def on_click(event): global anim_running if anim_running: anim.event_source.stop() anim_running = False else: anim.event_source.start() anim_running = True fig.canvas.mpl_connect('button_press_event', on_click) try: plt.show() except AttributeError: pass def plot_all_slices(input, pid, img_dir=None): # to convert cuda arrays to numpy array input = np.asarray(input) for idx in range(0, input.shape[0]-3, 4): fig, ax = plt.subplots(2, 2, figsize=[8, 8]) fig.canvas.set_window_title(pid) ax[0, 0].imshow(input[idx, :, :], cmap=plt.cm.gray) ax[1, 0].imshow(input[idx+1, :, :], cmap=plt.cm.gray) ax[0, 1].imshow(input[idx+2, :, :], cmap=plt.cm.gray) ax[1, 1].imshow(input[idx+3, :, :], cmap=plt.cm.gray) if img_dir is not None: fig.savefig(img_dir + '_' + str(pid) + '_' + str(idx) + '.png' , bbox_inches='tight') else: plt.show() fig.clf() plt.close('all') def plot_all_slices(ct_scan, mask, pid, img_dir=None): # to convert cuda arrays to numpy array ct_scan = np.asarray(ct_scan) mask = np.asarray(mask) for idx in range(0, mask.shape[0]-3, 2): fig, ax = plt.subplots(2, 2, figsize=[8, 8]) fig.canvas.set_window_title(pid) ax[0, 0].imshow(mask[idx, :, :], cmap=plt.cm.gray) ax[1, 0].imshow(ct_scan[idx+1, :, :], cmap=plt.cm.gray) ax[0, 1].imshow(mask[idx+2, :, :], cmap=plt.cm.gray) ax[1, 1].imshow(ct_scan[idx+3, :, :], cmap=plt.cm.gray) if img_dir is not None: fig.savefig(img_dir + '_' + str(pid) + '_' + str(idx) + '.png' , bbox_inches='tight') else: plt.show() fig.clf() plt.close('all') def plot_4_slices(input, pid, img_dir=None, idx=None): # to convert cuda arrays to numpy array input = np.asarray(input) fig, ax = plt.subplots(2, 2, figsize=[8, 8]) fig.canvas.set_window_title(pid) ax[0, 0].imshow(input[idx[0], :, :], cmap=plt.cm.gray) ax[1, 0].imshow(input[:, idx[1], :], cmap=plt.cm.gray) ax[0, 1].imshow(input[:, :, idx[2]], cmap=plt.cm.gray) ax[1, 1].imshow(input[:, :, idx[2]], cmap=plt.cm.gray) if img_dir is not None: fig.savefig(img_dir + '/%s.png' % (pid), bbox_inches='tight') else: plt.show() fig.clf() plt.close('all') def plot_learning_curves(train_losses, valid_losses, expid, img_dir): fig = plt.figure() x_range = np.arange(len(train_losses)) + 1 plt.plot(x_range, train_losses) plt.plot(x_range, valid_losses) if img_dir is not None: fig.savefig(img_dir + '/%s.png' % expid, bbox_inches='tight') print 'Saved plot' else: plt.show() fig.clf() plt.close('all')
"use strict"; Object.defineProperty(exports, "__esModule", { value: true, }); exports.SimpleToolbarMenuItem = void 0; var _litElement = require("lit"); var _a11yMenuButtonItem = require("@digitalnsw/a11y-menu-button/lib/a11y-menu-button-item.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _templateObject2() { var data = _taggedTemplateLiteral([ "\n :host {\n --simple-toolbar-button-min-width: 100% !important;\n }\n ::slotted(*) {\n --simple-toolbar-border-radius: 0px;\n display: flex;\n }\n ", ]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _toConsumableArray(arr) { return ( _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread() ); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if ( Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]" ) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } function _templateObject() { var data = _taggedTemplateLiteral([ '\n <li role="none">\n <slot></slot>\n </li>\n ', ]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze( Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } }) ); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError( "this hasn't been initialised - super() hasn't been called" ); } return self; } function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true }, }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * `simple-toolbar-menu` * `An icon / button that has support for multiple options via drop down.` * * @microcopy - the mental model for this element * - panel - the flyout from left or right side that has elements that can be placed * - button - an item that expresses what interaction you will have with the content. * * @element simple-toolbar-menu-item * @extends A11yMenuButtonItemBehaviors */ var SimpleToolbarMenuItem = /*#__PURE__*/ (function (_A11yMenuButtonItemBe) { _inherits(SimpleToolbarMenuItem, _A11yMenuButtonItemBe); function SimpleToolbarMenuItem() { _classCallCheck(this, SimpleToolbarMenuItem); return _possibleConstructorReturn( this, _getPrototypeOf(SimpleToolbarMenuItem).call(this) ); } _createClass( SimpleToolbarMenuItem, [ { key: "render", value: function render() { return (0, _litElement.html)(_templateObject()); }, }, ], [ { key: "styles", get: function get() { return [].concat( _toConsumableArray( _get(_getPrototypeOf(SimpleToolbarMenuItem), "styles", this) ), [(0, _litElement.css)(_templateObject2())] ); }, }, { key: "tag", get: function get() { return "simple-toolbar-menu-item"; }, }, ] ); return SimpleToolbarMenuItem; })( (0, _a11yMenuButtonItem.A11yMenuButtonItemBehaviors)(_litElement.LitElement) ); exports.SimpleToolbarMenuItem = SimpleToolbarMenuItem; window.customElements.define(SimpleToolbarMenuItem.tag, SimpleToolbarMenuItem);
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(React.createElement("path", { d: "M1 19h22V5H1v14zM19 7v10H5V7h14z" }), 'StayCurrentLandscapeSharp');
const app = require('express')(); const http = require('http').createServer(app); const io = require('socket.io')(http); app.get('/', (req, res) => { res.sendFile(__dirname + '/index.html'); }); io.on('connection', (socket) => { console.log('a user connected'); socket.on('chat message', (msg) => { io.emit('chat message', msg); }); socket.on('disconnect', () => { console.log('user disconnected'); }); }); http.listen(3000, () => { console.log('Connected at 3000'); });
//初始化界面,菜单配置路径是【/frs/yufreejs?js=/yujs/east/58table.js】 var str_date = ""; var str_org_no = ""; var fileName = ""; function AfterInit(){ str_date = jso_OpenPars.data_dt; JSPFree.createSpanByBtn("d1",["压缩/onZip","下载/onDownload","刷新/onRefresh","取消/onCancel","查看任务/onLookAllZipTaskAndFile"]); } //一定要页面加载完之后才行 function AfterBodyLoad(){ //立即刷新界面 doRefreshData(); //每10秒钟刷新一次 self.setInterval(doRefreshData,5000); } //刷新一下状态 function doRefreshData(){ var jso_statu = JSPFree.doClassMethodCall("com.yusys.pscs.datagramtask.service.PscsDatagramTaskBS", "checkZipAndDownloadStatu",{data_dt:str_date}); setMsgHtmlText(jso_statu.msg); if(jso_statu.code=="-999"){ //发生错误,则什么都不能干! $('#d1_onZip').linkbutton('disable'); $('#d1_onDownload').linkbutton('disable'); } else{ str_org_no = jso_statu.org_no; // if(jso_statu.code=="1"){ //如果正在下载 $('#d1_onZip').linkbutton('disable'); $('#d1_onDownload').linkbutton('disable'); } else if(jso_statu.code=="2"){ //系统空闲,并且文件已生成 $('#d1_onZip').linkbutton('enable'); $('#d1_onDownload').linkbutton('enable'); } else if(jso_statu.code=="3"){ //系统空闲,但文件还没有,只能先压缩 $('#d1_onZip').linkbutton('enable'); $('#d1_onDownload').linkbutton('disable'); } } } //设置提示消息 function setMsgHtmlText(_html){ var dom_d1A = document.getElementById("d1_A"); // dom_d1A.innerHTML=_html; } //压缩 function onZip(){ var jso_par ={"org_no":str_org_no,"data_dt":str_date}; JSPFree.confirm('提示', '你的要压缩报文吗,这是一个耗时操作,请谨慎操作!', function(_isOK){ if (_isOK){ var jso_rt = JSPFree.doClassMethodCall("com.yusys.pscs.datagramtask.service.PscsDatagramTaskBS", "zipTarGzReportFile",jso_par); doRefreshData(); //必须立即刷新一下 JSPFree.alert(jso_rt.msg); } }); } //【下载】按钮点击逻辑 function onDownload(){ JSPFree.confirm('提示', '你真的要下载压缩文件么?这是一个非常耗时的操作,请谨慎操作!<br>建议使用Ftp工具下载或直接在服务器端拷贝!', function(_isOK){ if (_isOK){ var download=null; download = $('<iframe id="download" style="display: none;"/>'); $('body').append(download); var src = v_context + "/datagramtask/download?org_no=" + str_org_no + "&data_dt=" + str_date; download.attr('src', src); } }); } //【刷新】按钮点击逻辑 function onRefresh(){ doRefreshData(); JSPFree.alert("人工刷新完成!"); } //查看所有任务 function onLookAllZipTaskAndFile(){ JSPFree.openDialog("查看所有在线任务","/yujs/pscs/datagramtask/pscs-datagram-task-zipview.js",950,600); } function onCancel(){ JSPFree.closeDialog(); }
import React from 'react' import Kamon from './kamon' export default function ButtonGroups () { return ( <div> <h2>Button groups</h2> <div className='btn-group btn-group-auto-lg' role='group' aria-label='...'> <button type='button' className='btn btn-default active'>Left</button> <button type='button' className='btn btn-default'>Middle</button> <button type='button' className='btn btn-default'>Right</button> </div>&nbsp;&nbsp; <div className='btn-group btn-group-auto-lg' role='group' aria-label='...'> <button type='button' className='btn btn-default'> <Kamon name='share' /> </button> <button type='button' className='btn btn-default'> <Kamon name='pencil' /> </button> <button type='button' className='btn btn-default'> <Kamon name='card-plus' /> </button> <button type='button' className='btn btn-default'> <Kamon name='unlocked' /> </button> <button type='button' className='btn btn-default'> <Kamon name='trash' /> </button> </div> <h4>Vertical</h4> <div className='btn-group-vertical btn-group-auto-lg' role='group' aria-label='...'> <button type='button' className='btn btn-default'>One</button> <button type='button' className='btn btn-default'>Two</button> <button type='button' className='btn btn-default'>Three</button> <div className='btn-group btn-group-auto-lg' role='group' aria-label='...'> <button type='button' className='btn btn-default dropdown-toggle' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'> Dropdown{' '} <span className='caret'></span> </button> <ul className='dropdown-menu dropdown-menu-auto-lg'> <li><a href='javascript:;'>Dropdown link</a></li> <li><a href='javascript:;'>Dropdown link</a></li> </ul> </div> <button type='button' className='btn btn-default'>Four</button> </div>&nbsp;&nbsp; <div className='btn-group-vertical btn-group-auto-lg' role='group' aria-label='...'> <button type='button' className='btn btn-default'> <Kamon name='share' /> </button> <button type='button' className='btn btn-default'> <Kamon name='pencil' /> </button> <button type='button' className='btn btn-default'> <Kamon name='card-plus' /> </button> <button type='button' className='btn btn-default'> <Kamon name='unlocked' /> </button> <button type='button' className='btn btn-default'> <Kamon name='trash' /> </button> </div> <h4>Toolbar</h4> <div className='btn-toolbar' role='toolbar' aria-label='...'> <div className='btn-group btn-group-auto-lg' role='group' aria-label='...'> <button type='button' className='btn btn-default'>1</button> <button type='button' className='btn btn-default'>2</button> <button type='button' className='btn btn-default'>3</button> </div> <div className='btn-group btn-group-auto-lg' role='group' aria-label='...'> <div className='btn-group btn-group-auto-lg' role='group'> <button type='button' className='btn btn-default dropdown-toggle' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'> Dropdown{' '} <span className='caret'></span> </button> <ul className='dropdown-menu dropdown-menu-auto-lg'> <li><a href='javascript:;'>Dropdown link</a></li> <li><a href='javascript:;'>Dropdown link</a></li> </ul> </div> <button type='button' className='btn btn-default'>4</button> <button type='button' className='btn btn-default'>5</button> <button type='button' className='btn btn-default'>6</button> </div> </div> <h4>Small size</h4> <div className='btn-group btn-group-sm' role='group' aria-label='...'> <button type='button' className='btn btn-default'>Left</button> <button type='button' className='btn btn-default'>Middle</button> <button type='button' className='btn btn-default'>Right</button> </div> <h4>Justified</h4> <div className='btn-group btn-group-justified btn-group-auto-lg' role='group' aria-label='...'> <button type='button' className='btn btn-default'>Left</button> <button type='button' className='btn btn-default'>Middle</button> <button type='button' className='btn btn-default'>Right</button> <div className='btn-group btn-group-auto-lg' role='group'> <button type='button' className='btn btn-default dropdown-toggle' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'> Dropdown{' '} <span className='caret'></span> </button> <ul className='dropdown-menu dropdown-menu-auto-lg'> <li><a href='javascript:;'>Dropdown link</a></li> <li><a href='javascript:;'>Dropdown link</a></li> </ul> </div> </div> </div> ) }
var searchData= [ ['adc_5fresult_0',['adc_result',['../api_8c.html#a6cf5581e633e901594da18bae50dc4d4',1,'api.c']]], ['alarm_5fcontrol_1',['alarm_control',['../main_8c.html#ac97329130f71ab7682fa279eddd8e168',1,'main.c']]], ['alarm_5fhour_2',['alarm_hour',['../ds1302_8c.html#a1751afdca377b1e7626778e46ac89d32',1,'ds1302.c']]], ['alarm_5fmin_3',['alarm_min',['../ds1302_8c.html#a7c98803c6ac3c66ae98d5d3bd107c5ae',1,'ds1302.c']]], ['api_2ec_4',['api.c',['../api_8c.html',1,'']]] ];
// The Module object: Our interface to the outside world. We import // and export values on it. There are various ways Module can be used: // 1. Not defined. We create it here // 2. A function parameter, function(Module) { ..generated code.. } // 3. pre-run appended it, var Module = {}; ..generated code.. // 4. External script tag defines var Module. // We need to check if Module already exists (e.g. case 3 above). // Substitution will be replaced with actual code on later stage of the build, // this way Closure Compiler will not mangle it (e.g. case 4. above). // Note that if you want to run closure, and also to use Module // after the generated code, you will need to define var Module = {}; // before the code. Then that object will be used in the code, and you // can continue to use Module afterwards as well. var Module = typeof Module !== 'undefined' ? Module : {}; // --pre-jses are emitted after the Module integration code, so that they can // refer to Module (if they choose; they can also define Module) if (!Module.expectedDataFileDownloads) { Module.expectedDataFileDownloads = 0; } Module.expectedDataFileDownloads++; (function() { var loadPackage = function(metadata) { var PACKAGE_PATH; if (typeof window === 'object') { PACKAGE_PATH = window['encodeURIComponent'](window.location.pathname.toString().substring(0, window.location.pathname.toString().lastIndexOf('/')) + '/'); } else if (typeof location !== 'undefined') { // worker PACKAGE_PATH = encodeURIComponent(location.pathname.toString().substring(0, location.pathname.toString().lastIndexOf('/')) + '/'); } else { throw 'using preloaded data can only be done on a web page or in a web worker'; } var PACKAGE_NAME = 'redux.data'; var REMOTE_PACKAGE_BASE = 'redux.data'; if (typeof Module['locateFilePackage'] === 'function' && !Module['locateFile']) { Module['locateFile'] = Module['locateFilePackage']; err('warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)'); } var REMOTE_PACKAGE_NAME = Module['locateFile'] ? Module['locateFile'](REMOTE_PACKAGE_BASE, '') : REMOTE_PACKAGE_BASE; var REMOTE_PACKAGE_SIZE = metadata['remote_package_size']; var PACKAGE_UUID = metadata['package_uuid']; function fetchRemotePackage(packageName, packageSize, callback, errback) { var xhr = new XMLHttpRequest(); xhr.open('GET', packageName, true); xhr.responseType = 'arraybuffer'; xhr.onprogress = function(event) { var url = packageName; var size = packageSize; if (event.total) size = event.total; if (event.loaded) { if (!xhr.addedTotal) { xhr.addedTotal = true; if (!Module.dataFileDownloads) Module.dataFileDownloads = {}; Module.dataFileDownloads[url] = { loaded: event.loaded, total: size }; } else { Module.dataFileDownloads[url].loaded = event.loaded; } var total = 0; var loaded = 0; var num = 0; for (var download in Module.dataFileDownloads) { var data = Module.dataFileDownloads[download]; total += data.total; loaded += data.loaded; num++; } total = Math.ceil(total * Module.expectedDataFileDownloads/num); if (Module['setStatus']) Module['setStatus']('Downloading data... (' + loaded + '/' + total + ')'); } else if (!Module.dataFileDownloads) { if (Module['setStatus']) Module['setStatus']('Downloading data...'); } }; xhr.onerror = function(event) { throw new Error("NetworkError for: " + packageName); } xhr.onload = function(event) { if (xhr.status == 200 || xhr.status == 304 || xhr.status == 206 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 var packageData = xhr.response; callback(packageData); } else { throw new Error(xhr.statusText + " : " + xhr.responseURL); } }; xhr.send(null); }; function handleError(error) { console.error('package error:', error); }; var fetchedCallback = null; var fetched = Module['getPreloadedPackage'] ? Module['getPreloadedPackage'](REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE) : null; if (!fetched) fetchRemotePackage(REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE, function(data) { if (fetchedCallback) { fetchedCallback(data); fetchedCallback = null; } else { fetched = data; } }, handleError); function runWithFS() { function assert(check, msg) { if (!check) throw msg + new Error().stack; } Module['FS_createPath']('/', 'sprites', true, true); /** @constructor */ function DataRequest(start, end, audio) { this.start = start; this.end = end; this.audio = audio; } DataRequest.prototype = { requests: {}, open: function(mode, name) { this.name = name; this.requests[name] = this; Module['addRunDependency']('fp ' + this.name); }, send: function() {}, onload: function() { var byteArray = this.byteArray.subarray(this.start, this.end); this.finish(byteArray); }, finish: function(byteArray) { var that = this; Module['FS_createDataFile'](this.name, null, byteArray, true, true, true); // canOwn this data in the filesystem, it is a slide into the heap that will never change Module['removeRunDependency']('fp ' + that.name); this.requests[this.name] = null; } }; var files = metadata['files']; for (var i = 0; i < files.length; ++i) { new DataRequest(files[i]['start'], files[i]['end'], files[i]['audio']).open('GET', files[i]['filename']); } function processPackageData(arrayBuffer) { assert(arrayBuffer, 'Loading data file failed.'); assert(arrayBuffer instanceof ArrayBuffer, 'bad input to processPackageData'); var byteArray = new Uint8Array(arrayBuffer); var curr; // Reuse the bytearray from the XHR as the source for file reads. DataRequest.prototype.byteArray = byteArray; var files = metadata['files']; for (var i = 0; i < files.length; ++i) { DataRequest.prototype.requests[files[i].filename].onload(); } Module['removeRunDependency']('datafile_redux.data'); }; Module['addRunDependency']('datafile_redux.data'); if (!Module.preloadResults) Module.preloadResults = {}; Module.preloadResults[PACKAGE_NAME] = {fromCache: false}; if (fetched) { processPackageData(fetched); fetched = null; } else { fetchedCallback = processPackageData; } } if (Module['calledRun']) { runWithFS(); } else { if (!Module['preRun']) Module['preRun'] = []; Module["preRun"].push(runWithFS); // FS is not initialized yet, wait for it } } loadPackage({"files": [{"filename": "/sprites/ball-bump.png", "start": 0, "end": 7843, "audio": 0}, {"filename": "/sprites/ball-bump.psd", "start": 7843, "end": 95587, "audio": 0}, {"filename": "/sprites/ball-normal.png", "start": 95587, "end": 106350, "audio": 0}, {"filename": "/sprites/ball-normal.psd", "start": 106350, "end": 221548, "audio": 0}, {"filename": "/sprites/bumpmap.png", "start": 221548, "end": 226901, "audio": 0}, {"filename": "/sprites/bumpmap2.png", "start": 226901, "end": 231507, "audio": 0}, {"filename": "/sprites/circle.png", "start": 231507, "end": 234810, "audio": 0}, {"filename": "/sprites/glow.png", "start": 234810, "end": 238465, "audio": 0}, {"filename": "/sprites/glow.psd", "start": 238465, "end": 273703, "audio": 0}, {"filename": "/sprites/light.png", "start": 273703, "end": 277002, "audio": 0}, {"filename": "/sprites/normal-2.png", "start": 277002, "end": 284995, "audio": 0}, {"filename": "/sprites/normal-3.png", "start": 284995, "end": 291682, "audio": 0}, {"filename": "/sprites/normal-4.png", "start": 291682, "end": 300042, "audio": 0}, {"filename": "/sprites/normal.png", "start": 300042, "end": 308380, "audio": 0}, {"filename": "/sprites/NormalMap.png", "start": 308380, "end": 323351, "audio": 0}, {"filename": "/sprites/spaceship.png", "start": 323351, "end": 327940, "audio": 0}, {"filename": "/sprites/unshaded-spaceship.png", "start": 327940, "end": 332290, "audio": 0}], "remote_package_size": 332290, "package_uuid": "859b2994-0692-40c4-aebc-a5dcc84e6b42"}); })(); // All the pre-js content up to here must remain later on, we need to run // it. var necessaryPreJSTasks = Module['preRun'].slice(); if (!Module['preRun']) throw 'Module.preRun should exist because file support used it; did a pre-js delete it?'; necessaryPreJSTasks.forEach(function(task) { if (Module['preRun'].indexOf(task) < 0) throw 'All preRun tasks that exist before user pre-js code should remain after; did you replace Module or modify Module.preRun?'; }); // Sometimes an existing Module object exists with properties // meant to overwrite the default module functionality. Here // we collect those properties and reapply _after_ we configure // the current environment's defaults to avoid having to be so // defensive during initialization. var moduleOverrides = {}; var key; for (key in Module) { if (Module.hasOwnProperty(key)) { moduleOverrides[key] = Module[key]; } } var arguments_ = []; var thisProgram = './this.program'; var quit_ = function(status, toThrow) { throw toThrow; }; // Determine the runtime environment we are in. You can customize this by // setting the ENVIRONMENT setting at compile time (see settings.js). var ENVIRONMENT_IS_WEB = false; var ENVIRONMENT_IS_WORKER = false; var ENVIRONMENT_IS_NODE = false; var ENVIRONMENT_IS_SHELL = false; ENVIRONMENT_IS_WEB = typeof window === 'object'; ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; // N.b. Electron.js environment is simultaneously a NODE-environment, but // also a web environment. ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof process.versions === 'object' && typeof process.versions.node === 'string'; ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; if (Module['ENVIRONMENT']) { throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)'); } // `/` should be present at the end if `scriptDirectory` is not empty var scriptDirectory = ''; function locateFile(path) { if (Module['locateFile']) { return Module['locateFile'](path, scriptDirectory); } return scriptDirectory + path; } // Hooks that are implemented differently in different runtime environments. var read_, readAsync, readBinary, setWindowTitle; var nodeFS; var nodePath; if (ENVIRONMENT_IS_NODE) { if (ENVIRONMENT_IS_WORKER) { scriptDirectory = require('path').dirname(scriptDirectory) + '/'; } else { scriptDirectory = __dirname + '/'; } read_ = function shell_read(filename, binary) { if (!nodeFS) nodeFS = require('fs'); if (!nodePath) nodePath = require('path'); filename = nodePath['normalize'](filename); return nodeFS['readFileSync'](filename, binary ? null : 'utf8'); }; readBinary = function readBinary(filename) { var ret = read_(filename, true); if (!ret.buffer) { ret = new Uint8Array(ret); } assert(ret.buffer); return ret; }; if (process['argv'].length > 1) { thisProgram = process['argv'][1].replace(/\\/g, '/'); } arguments_ = process['argv'].slice(2); if (typeof module !== 'undefined') { module['exports'] = Module; } process['on']('uncaughtException', function(ex) { // suppress ExitStatus exceptions from showing an error if (!(ex instanceof ExitStatus)) { throw ex; } }); process['on']('unhandledRejection', abort); quit_ = function(status) { process['exit'](status); }; Module['inspect'] = function () { return '[Emscripten Module object]'; }; } else if (ENVIRONMENT_IS_SHELL) { if (typeof read != 'undefined') { read_ = function shell_read(f) { return read(f); }; } readBinary = function readBinary(f) { var data; if (typeof readbuffer === 'function') { return new Uint8Array(readbuffer(f)); } data = read(f, 'binary'); assert(typeof data === 'object'); return data; }; if (typeof scriptArgs != 'undefined') { arguments_ = scriptArgs; } else if (typeof arguments != 'undefined') { arguments_ = arguments; } if (typeof quit === 'function') { quit_ = function(status) { quit(status); }; } if (typeof print !== 'undefined') { // Prefer to use print/printErr where they exist, as they usually work better. if (typeof console === 'undefined') console = /** @type{!Console} */({}); console.log = /** @type{!function(this:Console, ...*): undefined} */ (print); console.warn = console.error = /** @type{!function(this:Console, ...*): undefined} */ (typeof printErr !== 'undefined' ? printErr : print); } } else // Note that this includes Node.js workers when relevant (pthreads is enabled). // Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and // ENVIRONMENT_IS_NODE. if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled scriptDirectory = self.location.href; } else if (document.currentScript) { // web scriptDirectory = document.currentScript.src; } // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them. // otherwise, slice off the final part of the url to find the script directory. // if scriptDirectory does not contain a slash, lastIndexOf will return -1, // and scriptDirectory will correctly be replaced with an empty string. if (scriptDirectory.indexOf('blob:') !== 0) { scriptDirectory = scriptDirectory.substr(0, scriptDirectory.lastIndexOf('/')+1); } else { scriptDirectory = ''; } // Differentiate the Web Worker from the Node Worker case, as reading must // be done differently. { read_ = function shell_read(url) { var xhr = new XMLHttpRequest(); xhr.open('GET', url, false); xhr.send(null); return xhr.responseText; }; if (ENVIRONMENT_IS_WORKER) { readBinary = function readBinary(url) { var xhr = new XMLHttpRequest(); xhr.open('GET', url, false); xhr.responseType = 'arraybuffer'; xhr.send(null); return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response)); }; } readAsync = function readAsync(url, onload, onerror) { var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.responseType = 'arraybuffer'; xhr.onload = function xhr_onload() { if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 onload(xhr.response); return; } onerror(); }; xhr.onerror = onerror; xhr.send(null); }; } setWindowTitle = function(title) { document.title = title }; } else { throw new Error('environment detection error'); } // Set up the out() and err() hooks, which are how we can print to stdout or // stderr, respectively. var out = Module['print'] || console.log.bind(console); var err = Module['printErr'] || console.warn.bind(console); // Merge back in the overrides for (key in moduleOverrides) { if (moduleOverrides.hasOwnProperty(key)) { Module[key] = moduleOverrides[key]; } } // Free the object hierarchy contained in the overrides, this lets the GC // reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. moduleOverrides = null; // Emit code to handle expected values on the Module object. This applies Module.x // to the proper local x. This has two benefits: first, we only emit it if it is // expected to arrive, and second, by using a local everywhere else that can be // minified. if (Module['arguments']) arguments_ = Module['arguments'];if (!Object.getOwnPropertyDescriptor(Module, 'arguments')) Object.defineProperty(Module, 'arguments', { configurable: true, get: function() { abort('Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } }); if (Module['thisProgram']) thisProgram = Module['thisProgram'];if (!Object.getOwnPropertyDescriptor(Module, 'thisProgram')) Object.defineProperty(Module, 'thisProgram', { configurable: true, get: function() { abort('Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } }); if (Module['quit']) quit_ = Module['quit'];if (!Object.getOwnPropertyDescriptor(Module, 'quit')) Object.defineProperty(Module, 'quit', { configurable: true, get: function() { abort('Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } }); // perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message // Assertions on removed incoming Module JS APIs. assert(typeof Module['memoryInitializerPrefixURL'] === 'undefined', 'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead'); assert(typeof Module['pthreadMainPrefixURL'] === 'undefined', 'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead'); assert(typeof Module['cdInitializerPrefixURL'] === 'undefined', 'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead'); assert(typeof Module['filePackagePrefixURL'] === 'undefined', 'Module.filePackagePrefixURL option was removed, use Module.locateFile instead'); assert(typeof Module['read'] === 'undefined', 'Module.read option was removed (modify read_ in JS)'); assert(typeof Module['readAsync'] === 'undefined', 'Module.readAsync option was removed (modify readAsync in JS)'); assert(typeof Module['readBinary'] === 'undefined', 'Module.readBinary option was removed (modify readBinary in JS)'); assert(typeof Module['setWindowTitle'] === 'undefined', 'Module.setWindowTitle option was removed (modify setWindowTitle in JS)'); assert(typeof Module['TOTAL_MEMORY'] === 'undefined', 'Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY'); if (!Object.getOwnPropertyDescriptor(Module, 'read')) Object.defineProperty(Module, 'read', { configurable: true, get: function() { abort('Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } }); if (!Object.getOwnPropertyDescriptor(Module, 'readAsync')) Object.defineProperty(Module, 'readAsync', { configurable: true, get: function() { abort('Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } }); if (!Object.getOwnPropertyDescriptor(Module, 'readBinary')) Object.defineProperty(Module, 'readBinary', { configurable: true, get: function() { abort('Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } }); if (!Object.getOwnPropertyDescriptor(Module, 'setWindowTitle')) Object.defineProperty(Module, 'setWindowTitle', { configurable: true, get: function() { abort('Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } }); var IDBFS = 'IDBFS is no longer included by default; build with -lidbfs.js'; var PROXYFS = 'PROXYFS is no longer included by default; build with -lproxyfs.js'; var WORKERFS = 'WORKERFS is no longer included by default; build with -lworkerfs.js'; var NODEFS = 'NODEFS is no longer included by default; build with -lnodefs.js'; var STACK_ALIGN = 16; function alignMemory(size, factor) { if (!factor) factor = STACK_ALIGN; // stack alignment (16-byte) by default return Math.ceil(size / factor) * factor; } function getNativeTypeSize(type) { switch (type) { case 'i1': case 'i8': return 1; case 'i16': return 2; case 'i32': return 4; case 'i64': return 8; case 'float': return 4; case 'double': return 8; default: { if (type[type.length-1] === '*') { return 4; // A pointer } else if (type[0] === 'i') { var bits = Number(type.substr(1)); assert(bits % 8 === 0, 'getNativeTypeSize invalid bits ' + bits + ', type ' + type); return bits / 8; } else { return 0; } } } } function warnOnce(text) { if (!warnOnce.shown) warnOnce.shown = {}; if (!warnOnce.shown[text]) { warnOnce.shown[text] = 1; err(text); } } // Wraps a JS function as a wasm function with a given signature. function convertJsFunctionToWasm(func, sig) { // If the type reflection proposal is available, use the new // "WebAssembly.Function" constructor. // Otherwise, construct a minimal wasm module importing the JS function and // re-exporting it. if (typeof WebAssembly.Function === "function") { var typeNames = { 'i': 'i32', 'j': 'i64', 'f': 'f32', 'd': 'f64' }; var type = { parameters: [], results: sig[0] == 'v' ? [] : [typeNames[sig[0]]] }; for (var i = 1; i < sig.length; ++i) { type.parameters.push(typeNames[sig[i]]); } return new WebAssembly.Function(type, func); } // The module is static, with the exception of the type section, which is // generated based on the signature passed in. var typeSection = [ 0x01, // id: section, 0x00, // length: 0 (placeholder) 0x01, // count: 1 0x60, // form: func ]; var sigRet = sig.slice(0, 1); var sigParam = sig.slice(1); var typeCodes = { 'i': 0x7f, // i32 'j': 0x7e, // i64 'f': 0x7d, // f32 'd': 0x7c, // f64 }; // Parameters, length + signatures typeSection.push(sigParam.length); for (var i = 0; i < sigParam.length; ++i) { typeSection.push(typeCodes[sigParam[i]]); } // Return values, length + signatures // With no multi-return in MVP, either 0 (void) or 1 (anything else) if (sigRet == 'v') { typeSection.push(0x00); } else { typeSection = typeSection.concat([0x01, typeCodes[sigRet]]); } // Write the overall length of the type section back into the section header // (excepting the 2 bytes for the section id and length) typeSection[1] = typeSection.length - 2; // Rest of the module is static var bytes = new Uint8Array([ 0x00, 0x61, 0x73, 0x6d, // magic ("\0asm") 0x01, 0x00, 0x00, 0x00, // version: 1 ].concat(typeSection, [ 0x02, 0x07, // import section // (import "e" "f" (func 0 (type 0))) 0x01, 0x01, 0x65, 0x01, 0x66, 0x00, 0x00, 0x07, 0x05, // export section // (export "f" (func 0 (type 0))) 0x01, 0x01, 0x66, 0x00, 0x00, ])); // We can compile this wasm module synchronously because it is very small. // This accepts an import (at "e.f"), that it reroutes to an export (at "f") var module = new WebAssembly.Module(bytes); var instance = new WebAssembly.Instance(module, { 'e': { 'f': func } }); var wrappedFunc = instance.exports['f']; return wrappedFunc; } var freeTableIndexes = []; // Weak map of functions in the table to their indexes, created on first use. var functionsInTableMap; // Add a wasm function to the table. function addFunctionWasm(func, sig) { var table = wasmTable; // Check if the function is already in the table, to ensure each function // gets a unique index. First, create the map if this is the first use. if (!functionsInTableMap) { functionsInTableMap = new WeakMap(); for (var i = 0; i < table.length; i++) { var item = table.get(i); // Ignore null values. if (item) { functionsInTableMap.set(item, i); } } } if (functionsInTableMap.has(func)) { return functionsInTableMap.get(func); } // It's not in the table, add it now. var ret; // Reuse a free index if there is one, otherwise grow. if (freeTableIndexes.length) { ret = freeTableIndexes.pop(); } else { ret = table.length; // Grow the table try { table.grow(1); } catch (err) { if (!(err instanceof RangeError)) { throw err; } throw 'Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.'; } } // Set the new value. try { // Attempting to call this with JS function will cause of table.set() to fail table.set(ret, func); } catch (err) { if (!(err instanceof TypeError)) { throw err; } assert(typeof sig !== 'undefined', 'Missing signature argument to addFunction'); var wrapped = convertJsFunctionToWasm(func, sig); table.set(ret, wrapped); } functionsInTableMap.set(func, ret); return ret; } function removeFunctionWasm(index) { functionsInTableMap.delete(wasmTable.get(index)); freeTableIndexes.push(index); } // 'sig' parameter is required for the llvm backend but only when func is not // already a WebAssembly function. function addFunction(func, sig) { assert(typeof func !== 'undefined'); return addFunctionWasm(func, sig); } function removeFunction(index) { removeFunctionWasm(index); } function makeBigInt(low, high, unsigned) { return unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0)); } var tempRet0 = 0; var setTempRet0 = function(value) { tempRet0 = value; }; var getTempRet0 = function() { return tempRet0; }; function getCompilerSetting(name) { throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for getCompilerSetting or emscripten_get_compiler_setting to work'; } // === Preamble library stuff === // Documentation for the public APIs defined in this file must be updated in: // site/source/docs/api_reference/preamble.js.rst // A prebuilt local version of the documentation is available at: // site/build/text/docs/api_reference/preamble.js.txt // You can also build docs locally as HTML or other formats in site/ // An online HTML version (which may be of a different version of Emscripten) // is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html var wasmBinary;if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];if (!Object.getOwnPropertyDescriptor(Module, 'wasmBinary')) Object.defineProperty(Module, 'wasmBinary', { configurable: true, get: function() { abort('Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } }); var noExitRuntime;if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime'];if (!Object.getOwnPropertyDescriptor(Module, 'noExitRuntime')) Object.defineProperty(Module, 'noExitRuntime', { configurable: true, get: function() { abort('Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } }); if (typeof WebAssembly !== 'object') { abort('no native wasm support detected'); } // In MINIMAL_RUNTIME, setValue() and getValue() are only available when building with safe heap enabled, for heap safety checking. // In traditional runtime, setValue() and getValue() are always available (although their use is highly discouraged due to perf penalties) /** @param {number} ptr @param {number} value @param {string} type @param {number|boolean=} noSafe */ function setValue(ptr, value, type, noSafe) { type = type || 'i8'; if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit switch(type) { case 'i1': HEAP8[((ptr)>>0)]=value; break; case 'i8': HEAP8[((ptr)>>0)]=value; break; case 'i16': HEAP16[((ptr)>>1)]=value; break; case 'i32': HEAP32[((ptr)>>2)]=value; break; case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math.min((+(Math.floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break; case 'float': HEAPF32[((ptr)>>2)]=value; break; case 'double': HEAPF64[((ptr)>>3)]=value; break; default: abort('invalid type for setValue: ' + type); } } /** @param {number} ptr @param {string} type @param {number|boolean=} noSafe */ function getValue(ptr, type, noSafe) { type = type || 'i8'; if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit switch(type) { case 'i1': return HEAP8[((ptr)>>0)]; case 'i8': return HEAP8[((ptr)>>0)]; case 'i16': return HEAP16[((ptr)>>1)]; case 'i32': return HEAP32[((ptr)>>2)]; case 'i64': return HEAP32[((ptr)>>2)]; case 'float': return HEAPF32[((ptr)>>2)]; case 'double': return HEAPF64[((ptr)>>3)]; default: abort('invalid type for getValue: ' + type); } return null; } // Wasm globals var wasmMemory; var wasmTable; //======================================== // Runtime essentials //======================================== // whether we are quitting the application. no code should run after this. // set in exit() and abort() var ABORT = false; // set by exit() and abort(). Passed to 'onExit' handler. // NOTE: This is also used as the process return code code in shell environments // but only when noExitRuntime is false. var EXITSTATUS = 0; /** @type {function(*, string=)} */ function assert(condition, text) { if (!condition) { abort('Assertion failed: ' + text); } } // Returns the C function with a specified identifier (for C++, you need to do manual name mangling) function getCFunc(ident) { var func = Module['_' + ident]; // closure exported function assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported'); return func; } // C calling interface. /** @param {string|null=} returnType @param {Array=} argTypes @param {Arguments|Array=} args @param {Object=} opts */ function ccall(ident, returnType, argTypes, args, opts) { // For fast lookup of conversion functions var toC = { 'string': function(str) { var ret = 0; if (str !== null && str !== undefined && str !== 0) { // null string // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' var len = (str.length << 2) + 1; ret = stackAlloc(len); stringToUTF8(str, ret, len); } return ret; }, 'array': function(arr) { var ret = stackAlloc(arr.length); writeArrayToMemory(arr, ret); return ret; } }; function convertReturnValue(ret) { if (returnType === 'string') return UTF8ToString(ret); if (returnType === 'boolean') return Boolean(ret); return ret; } var func = getCFunc(ident); var cArgs = []; var stack = 0; assert(returnType !== 'array', 'Return type should not be "array".'); if (args) { for (var i = 0; i < args.length; i++) { var converter = toC[argTypes[i]]; if (converter) { if (stack === 0) stack = stackSave(); cArgs[i] = converter(args[i]); } else { cArgs[i] = args[i]; } } } var ret = func.apply(null, cArgs); ret = convertReturnValue(ret); if (stack !== 0) stackRestore(stack); return ret; } /** @param {string=} returnType @param {Array=} argTypes @param {Object=} opts */ function cwrap(ident, returnType, argTypes, opts) { return function() { return ccall(ident, returnType, argTypes, arguments, opts); } } // We used to include malloc/free by default in the past. Show a helpful error in // builds with assertions. var ALLOC_NORMAL = 0; // Tries to use _malloc() var ALLOC_STACK = 1; // Lives for the duration of the current function call // allocate(): This is for internal use. You can use it yourself as well, but the interface // is a little tricky (see docs right below). The reason is that it is optimized // for multiple syntaxes to save space in generated code. So you should // normally not use allocate(), and instead allocate memory using _malloc(), // initialize it with setValue(), and so forth. // @slab: An array of data. // @allocator: How to allocate memory, see ALLOC_* /** @type {function((Uint8Array|Array<number>), number)} */ function allocate(slab, allocator) { var ret; assert(typeof allocator === 'number', 'allocate no longer takes a type argument') assert(typeof slab !== 'number', 'allocate no longer takes a number as arg0') if (allocator == ALLOC_STACK) { ret = stackAlloc(slab.length); } else { ret = _malloc(slab.length); } if (slab.subarray || slab.slice) { HEAPU8.set(/** @type {!Uint8Array} */(slab), ret); } else { HEAPU8.set(new Uint8Array(slab), ret); } return ret; } // runtime_strings.js: Strings related runtime functions that are part of both MINIMAL_RUNTIME and regular runtime. // Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns // a copy of that string as a Javascript String object. var UTF8Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined; /** * @param {number} idx * @param {number=} maxBytesToRead * @return {string} */ function UTF8ArrayToString(heap, idx, maxBytesToRead) { var endIdx = idx + maxBytesToRead; var endPtr = idx; // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. // (As a tiny code save trick, compare endPtr against endIdx using a negation, so that undefined means Infinity) while (heap[endPtr] && !(endPtr >= endIdx)) ++endPtr; if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) { return UTF8Decoder.decode(heap.subarray(idx, endPtr)); } else { var str = ''; // If building with TextDecoder, we have already computed the string length above, so test loop end condition against that while (idx < endPtr) { // For UTF8 byte structure, see: // http://en.wikipedia.org/wiki/UTF-8#Description // https://www.ietf.org/rfc/rfc2279.txt // https://tools.ietf.org/html/rfc3629 var u0 = heap[idx++]; if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } var u1 = heap[idx++] & 63; if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } var u2 = heap[idx++] & 63; if ((u0 & 0xF0) == 0xE0) { u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; } else { if ((u0 & 0xF8) != 0xF0) warnOnce('Invalid UTF-8 leading byte 0x' + u0.toString(16) + ' encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!'); u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heap[idx++] & 63); } if (u0 < 0x10000) { str += String.fromCharCode(u0); } else { var ch = u0 - 0x10000; str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); } } } return str; } // Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns a // copy of that string as a Javascript String object. // maxBytesToRead: an optional length that specifies the maximum number of bytes to read. You can omit // this parameter to scan the string until the first \0 byte. If maxBytesToRead is // passed, and the string at [ptr, ptr+maxBytesToReadr[ contains a null byte in the // middle, then the string will cut short at that byte index (i.e. maxBytesToRead will // not produce a string of exact length [ptr, ptr+maxBytesToRead[) // N.B. mixing frequent uses of UTF8ToString() with and without maxBytesToRead may // throw JS JIT optimizations off, so it is worth to consider consistently using one // style or the other. /** * @param {number} ptr * @param {number=} maxBytesToRead * @return {string} */ function UTF8ToString(ptr, maxBytesToRead) { return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ''; } // Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', // encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. // Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. // Parameters: // str: the Javascript string to copy. // heap: the array to copy to. Each index in this array is assumed to be one 8-byte element. // outIdx: The starting offset in the array to begin the copying. // maxBytesToWrite: The maximum number of bytes this function can write to the array. // This count should include the null terminator, // i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. // maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. // Returns the number of bytes written, EXCLUDING the null terminator. function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) { if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. return 0; var startIdx = outIdx; var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. for (var i = 0; i < str.length; ++i) { // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. // See http://unicode.org/faq/utf_bom.html#utf16-3 // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 var u = str.charCodeAt(i); // possibly a lead surrogate if (u >= 0xD800 && u <= 0xDFFF) { var u1 = str.charCodeAt(++i); u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF); } if (u <= 0x7F) { if (outIdx >= endIdx) break; heap[outIdx++] = u; } else if (u <= 0x7FF) { if (outIdx + 1 >= endIdx) break; heap[outIdx++] = 0xC0 | (u >> 6); heap[outIdx++] = 0x80 | (u & 63); } else if (u <= 0xFFFF) { if (outIdx + 2 >= endIdx) break; heap[outIdx++] = 0xE0 | (u >> 12); heap[outIdx++] = 0x80 | ((u >> 6) & 63); heap[outIdx++] = 0x80 | (u & 63); } else { if (outIdx + 3 >= endIdx) break; if (u >= 0x200000) warnOnce('Invalid Unicode code point 0x' + u.toString(16) + ' encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF).'); heap[outIdx++] = 0xF0 | (u >> 18); heap[outIdx++] = 0x80 | ((u >> 12) & 63); heap[outIdx++] = 0x80 | ((u >> 6) & 63); heap[outIdx++] = 0x80 | (u & 63); } } // Null-terminate the pointer to the buffer. heap[outIdx] = 0; return outIdx - startIdx; } // Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', // null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. // Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. // Returns the number of bytes written, EXCLUDING the null terminator. function stringToUTF8(str, outPtr, maxBytesToWrite) { assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); } // Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. function lengthBytesUTF8(str) { var len = 0; for (var i = 0; i < str.length; ++i) { // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. // See http://unicode.org/faq/utf_bom.html#utf16-3 var u = str.charCodeAt(i); // possibly a lead surrogate if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); if (u <= 0x7F) ++len; else if (u <= 0x7FF) len += 2; else if (u <= 0xFFFF) len += 3; else len += 4; } return len; } // runtime_strings_extra.js: Strings related runtime functions that are available only in regular runtime. // Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns // a copy of that string as a Javascript String object. function AsciiToString(ptr) { var str = ''; while (1) { var ch = HEAPU8[((ptr++)>>0)]; if (!ch) return str; str += String.fromCharCode(ch); } } // Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', // null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. function stringToAscii(str, outPtr) { return writeAsciiToMemory(str, outPtr, false); } // Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns // a copy of that string as a Javascript String object. var UTF16Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined; function UTF16ToString(ptr, maxBytesToRead) { assert(ptr % 2 == 0, 'Pointer passed to UTF16ToString must be aligned to two bytes!'); var endPtr = ptr; // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. var idx = endPtr >> 1; var maxIdx = idx + maxBytesToRead / 2; // If maxBytesToRead is not passed explicitly, it will be undefined, and this // will always evaluate to true. This saves on code size. while (!(idx >= maxIdx) && HEAPU16[idx]) ++idx; endPtr = idx << 1; if (endPtr - ptr > 32 && UTF16Decoder) { return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr)); } else { var i = 0; var str = ''; while (1) { var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; if (codeUnit == 0 || i == maxBytesToRead / 2) return str; ++i; // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. str += String.fromCharCode(codeUnit); } } } // Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', // null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. // Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. // Parameters: // str: the Javascript string to copy. // outPtr: Byte address in Emscripten HEAP where to write the string to. // maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null // terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. // maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. // Returns the number of bytes written, EXCLUDING the null terminator. function stringToUTF16(str, outPtr, maxBytesToWrite) { assert(outPtr % 2 == 0, 'Pointer passed to stringToUTF16 must be aligned to two bytes!'); assert(typeof maxBytesToWrite == 'number', 'stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. if (maxBytesToWrite === undefined) { maxBytesToWrite = 0x7FFFFFFF; } if (maxBytesToWrite < 2) return 0; maxBytesToWrite -= 2; // Null terminator. var startPtr = outPtr; var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; for (var i = 0; i < numCharsToWrite; ++i) { // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. var codeUnit = str.charCodeAt(i); // possibly a lead surrogate HEAP16[((outPtr)>>1)]=codeUnit; outPtr += 2; } // Null-terminate the pointer to the HEAP. HEAP16[((outPtr)>>1)]=0; return outPtr - startPtr; } // Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. function lengthBytesUTF16(str) { return str.length*2; } function UTF32ToString(ptr, maxBytesToRead) { assert(ptr % 4 == 0, 'Pointer passed to UTF32ToString must be aligned to four bytes!'); var i = 0; var str = ''; // If maxBytesToRead is not passed explicitly, it will be undefined, and this // will always evaluate to true. This saves on code size. while (!(i >= maxBytesToRead / 4)) { var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; if (utf32 == 0) break; ++i; // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. // See http://unicode.org/faq/utf_bom.html#utf16-3 if (utf32 >= 0x10000) { var ch = utf32 - 0x10000; str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); } else { str += String.fromCharCode(utf32); } } return str; } // Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', // null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. // Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. // Parameters: // str: the Javascript string to copy. // outPtr: Byte address in Emscripten HEAP where to write the string to. // maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null // terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. // maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. // Returns the number of bytes written, EXCLUDING the null terminator. function stringToUTF32(str, outPtr, maxBytesToWrite) { assert(outPtr % 4 == 0, 'Pointer passed to stringToUTF32 must be aligned to four bytes!'); assert(typeof maxBytesToWrite == 'number', 'stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. if (maxBytesToWrite === undefined) { maxBytesToWrite = 0x7FFFFFFF; } if (maxBytesToWrite < 4) return 0; var startPtr = outPtr; var endPtr = startPtr + maxBytesToWrite - 4; for (var i = 0; i < str.length; ++i) { // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. // See http://unicode.org/faq/utf_bom.html#utf16-3 var codeUnit = str.charCodeAt(i); // possibly a lead surrogate if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { var trailSurrogate = str.charCodeAt(++i); codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); } HEAP32[((outPtr)>>2)]=codeUnit; outPtr += 4; if (outPtr + 4 > endPtr) break; } // Null-terminate the pointer to the HEAP. HEAP32[((outPtr)>>2)]=0; return outPtr - startPtr; } // Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. function lengthBytesUTF32(str) { var len = 0; for (var i = 0; i < str.length; ++i) { // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. // See http://unicode.org/faq/utf_bom.html#utf16-3 var codeUnit = str.charCodeAt(i); if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. len += 4; } return len; } // Allocate heap space for a JS string, and write it there. // It is the responsibility of the caller to free() that memory. function allocateUTF8(str) { var size = lengthBytesUTF8(str) + 1; var ret = _malloc(size); if (ret) stringToUTF8Array(str, HEAP8, ret, size); return ret; } // Allocate stack space for a JS string, and write it there. function allocateUTF8OnStack(str) { var size = lengthBytesUTF8(str) + 1; var ret = stackAlloc(size); stringToUTF8Array(str, HEAP8, ret, size); return ret; } // Deprecated: This function should not be called because it is unsafe and does not provide // a maximum length limit of how many bytes it is allowed to write. Prefer calling the // function stringToUTF8Array() instead, which takes in a maximum length that can be used // to be secure from out of bounds writes. /** @deprecated @param {boolean=} dontAddNull */ function writeStringToMemory(string, buffer, dontAddNull) { warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!'); var /** @type {number} */ lastChar, /** @type {number} */ end; if (dontAddNull) { // stringToUTF8Array always appends null. If we don't want to do that, remember the // character that existed at the location where the null will be placed, and restore // that after the write (below). end = buffer + lengthBytesUTF8(string); lastChar = HEAP8[end]; } stringToUTF8(string, buffer, Infinity); if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character. } function writeArrayToMemory(array, buffer) { assert(array.length >= 0, 'writeArrayToMemory array must have a length (should be an array or typed array)') HEAP8.set(array, buffer); } /** @param {boolean=} dontAddNull */ function writeAsciiToMemory(str, buffer, dontAddNull) { for (var i = 0; i < str.length; ++i) { assert(str.charCodeAt(i) === str.charCodeAt(i)&0xff); HEAP8[((buffer++)>>0)]=str.charCodeAt(i); } // Null-terminate the pointer to the HEAP. if (!dontAddNull) HEAP8[((buffer)>>0)]=0; } // Memory management var PAGE_SIZE = 16384; var WASM_PAGE_SIZE = 65536; function alignUp(x, multiple) { if (x % multiple > 0) { x += multiple - (x % multiple); } return x; } var HEAP, /** @type {ArrayBuffer} */ buffer, /** @type {Int8Array} */ HEAP8, /** @type {Uint8Array} */ HEAPU8, /** @type {Int16Array} */ HEAP16, /** @type {Uint16Array} */ HEAPU16, /** @type {Int32Array} */ HEAP32, /** @type {Uint32Array} */ HEAPU32, /** @type {Float32Array} */ HEAPF32, /** @type {Float64Array} */ HEAPF64; function updateGlobalBufferAndViews(buf) { buffer = buf; Module['HEAP8'] = HEAP8 = new Int8Array(buf); Module['HEAP16'] = HEAP16 = new Int16Array(buf); Module['HEAP32'] = HEAP32 = new Int32Array(buf); Module['HEAPU8'] = HEAPU8 = new Uint8Array(buf); Module['HEAPU16'] = HEAPU16 = new Uint16Array(buf); Module['HEAPU32'] = HEAPU32 = new Uint32Array(buf); Module['HEAPF32'] = HEAPF32 = new Float32Array(buf); Module['HEAPF64'] = HEAPF64 = new Float64Array(buf); } var STACK_BASE = 5330976, STACKTOP = STACK_BASE, STACK_MAX = 88096; assert(STACK_BASE % 16 === 0, 'stack must start aligned'); var TOTAL_STACK = 5242880; if (Module['TOTAL_STACK']) assert(TOTAL_STACK === Module['TOTAL_STACK'], 'the stack size can no longer be determined at runtime') var INITIAL_INITIAL_MEMORY = Module['INITIAL_MEMORY'] || 16777216;if (!Object.getOwnPropertyDescriptor(Module, 'INITIAL_MEMORY')) Object.defineProperty(Module, 'INITIAL_MEMORY', { configurable: true, get: function() { abort('Module.INITIAL_MEMORY has been replaced with plain INITIAL_INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } }); assert(INITIAL_INITIAL_MEMORY >= TOTAL_STACK, 'INITIAL_MEMORY should be larger than TOTAL_STACK, was ' + INITIAL_INITIAL_MEMORY + '! (TOTAL_STACK=' + TOTAL_STACK + ')'); // check for full engine support (use string 'subarray' to avoid closure compiler confusion) assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray !== undefined && Int32Array.prototype.set !== undefined, 'JS engine does not provide full typed array support'); // In non-standalone/normal mode, we create the memory here. // Create the main memory. (Note: this isn't used in STANDALONE_WASM mode since the wasm // memory is created in the wasm, not in JS.) if (Module['wasmMemory']) { wasmMemory = Module['wasmMemory']; } else { wasmMemory = new WebAssembly.Memory({ 'initial': INITIAL_INITIAL_MEMORY / WASM_PAGE_SIZE , 'maximum': INITIAL_INITIAL_MEMORY / WASM_PAGE_SIZE }); } if (wasmMemory) { buffer = wasmMemory.buffer; } // If the user provides an incorrect length, just use that length instead rather than providing the user to // specifically provide the memory length with Module['INITIAL_MEMORY']. INITIAL_INITIAL_MEMORY = buffer.byteLength; assert(INITIAL_INITIAL_MEMORY % WASM_PAGE_SIZE === 0); updateGlobalBufferAndViews(buffer); // Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode. function writeStackCookie() { assert((STACK_MAX & 3) == 0); // The stack grows downwards HEAPU32[(STACK_MAX >> 2)+1] = 0x2135467; HEAPU32[(STACK_MAX >> 2)+2] = 0x89BACDFE; // Also test the global address 0 for integrity. HEAP32[0] = 0x63736d65; /* 'emsc' */ } function checkStackCookie() { if (ABORT) return; var cookie1 = HEAPU32[(STACK_MAX >> 2)+1]; var cookie2 = HEAPU32[(STACK_MAX >> 2)+2]; if (cookie1 != 0x2135467 || cookie2 != 0x89BACDFE) { abort('Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x' + cookie2.toString(16) + ' ' + cookie1.toString(16)); } // Also test the global address 0 for integrity. if (HEAP32[0] !== 0x63736d65 /* 'emsc' */) abort('Runtime error: The application has corrupted its heap memory area (address zero)!'); } // Endianness check (note: assumes compiler arch was little-endian) (function() { var h16 = new Int16Array(1); var h8 = new Int8Array(h16.buffer); h16[0] = 0x6373; if (h8[0] !== 0x73 || h8[1] !== 0x63) throw 'Runtime error: expected the system to be little-endian!'; })(); function abortFnPtrError(ptr, sig) { abort("Invalid function pointer " + ptr + " called with signature '" + sig + "'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this). Build with ASSERTIONS=2 for more info."); } var __ATPRERUN__ = []; // functions called before the runtime is initialized var __ATINIT__ = []; // functions called during startup var __ATMAIN__ = []; // functions called when main() is to be run var __ATEXIT__ = []; // functions called during shutdown var __ATPOSTRUN__ = []; // functions called after the main() is called var runtimeInitialized = false; var runtimeExited = false; function preRun() { if (Module['preRun']) { if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; while (Module['preRun'].length) { addOnPreRun(Module['preRun'].shift()); } } callRuntimeCallbacks(__ATPRERUN__); } function initRuntime() { checkStackCookie(); assert(!runtimeInitialized); runtimeInitialized = true; if (!Module["noFSInit"] && !FS.init.initialized) FS.init(); TTY.init(); callRuntimeCallbacks(__ATINIT__); } function preMain() { checkStackCookie(); FS.ignorePermissions = false; callRuntimeCallbacks(__ATMAIN__); } function exitRuntime() { checkStackCookie(); runtimeExited = true; } function postRun() { checkStackCookie(); if (Module['postRun']) { if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; while (Module['postRun'].length) { addOnPostRun(Module['postRun'].shift()); } } callRuntimeCallbacks(__ATPOSTRUN__); } function addOnPreRun(cb) { __ATPRERUN__.unshift(cb); } function addOnInit(cb) { __ATINIT__.unshift(cb); } function addOnPreMain(cb) { __ATMAIN__.unshift(cb); } function addOnExit(cb) { } function addOnPostRun(cb) { __ATPOSTRUN__.unshift(cb); } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc assert(Math.imul, 'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); assert(Math.fround, 'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); assert(Math.clz32, 'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); assert(Math.trunc, 'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); // A counter of dependencies for calling run(). If we need to // do asynchronous work before running, increment this and // decrement it. Incrementing must happen in a place like // Module.preRun (used by emcc to add file preloading). // Note that you can add dependencies in preRun, even though // it happens right before run - run will be postponed until // the dependencies are met. var runDependencies = 0; var runDependencyWatcher = null; var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled var runDependencyTracking = {}; function getUniqueRunDependency(id) { var orig = id; while (1) { if (!runDependencyTracking[id]) return id; id = orig + Math.random(); } } function addRunDependency(id) { runDependencies++; if (Module['monitorRunDependencies']) { Module['monitorRunDependencies'](runDependencies); } if (id) { assert(!runDependencyTracking[id]); runDependencyTracking[id] = 1; if (runDependencyWatcher === null && typeof setInterval !== 'undefined') { // Check for missing dependencies every few seconds runDependencyWatcher = setInterval(function() { if (ABORT) { clearInterval(runDependencyWatcher); runDependencyWatcher = null; return; } var shown = false; for (var dep in runDependencyTracking) { if (!shown) { shown = true; err('still waiting on run dependencies:'); } err('dependency: ' + dep); } if (shown) { err('(end of list)'); } }, 10000); } } else { err('warning: run dependency added without ID'); } } function removeRunDependency(id) { runDependencies--; if (Module['monitorRunDependencies']) { Module['monitorRunDependencies'](runDependencies); } if (id) { assert(runDependencyTracking[id]); delete runDependencyTracking[id]; } else { err('warning: run dependency removed without ID'); } if (runDependencies == 0) { if (runDependencyWatcher !== null) { clearInterval(runDependencyWatcher); runDependencyWatcher = null; } if (dependenciesFulfilled) { var callback = dependenciesFulfilled; dependenciesFulfilled = null; callback(); // can add another dependenciesFulfilled } } } Module["preloadedImages"] = {}; // maps url to image data Module["preloadedAudios"] = {}; // maps url to audio data /** @param {string|number=} what */ function abort(what) { if (Module['onAbort']) { Module['onAbort'](what); } what += ''; err(what); ABORT = true; EXITSTATUS = 1; var output = 'abort(' + what + ') at ' + stackTrace(); what = output; // Use a wasm runtime error, because a JS error might be seen as a foreign // exception, which means we'd run destructors on it. We need the error to // simply make the program stop. var e = new WebAssembly.RuntimeError(what); // Throw the error whether or not MODULARIZE is set because abort is used // in code paths apart from instantiation where an exception is expected // to be thrown when abort is called. throw e; } // {{MEM_INITIALIZER}} function hasPrefix(str, prefix) { return String.prototype.startsWith ? str.startsWith(prefix) : str.indexOf(prefix) === 0; } // Prefix of data URIs emitted by SINGLE_FILE and related options. var dataURIPrefix = 'data:application/octet-stream;base64,'; // Indicates whether filename is a base64 data URI. function isDataURI(filename) { return hasPrefix(filename, dataURIPrefix); } var fileURIPrefix = "file://"; // Indicates whether filename is delivered via file protocol (as opposed to http/https) function isFileURI(filename) { return hasPrefix(filename, fileURIPrefix); } function createExportWrapper(name, fixedasm) { return function() { var displayName = name; var asm = fixedasm; if (!fixedasm) { asm = Module['asm']; } assert(runtimeInitialized, 'native function `' + displayName + '` called before runtime initialization'); assert(!runtimeExited, 'native function `' + displayName + '` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); if (!asm[name]) { assert(asm[name], 'exported native function `' + displayName + '` not found'); } return asm[name].apply(null, arguments); }; } var wasmBinaryFile = 'redux.wasm'; if (!isDataURI(wasmBinaryFile)) { wasmBinaryFile = locateFile(wasmBinaryFile); } function getBinary() { try { if (wasmBinary) { return new Uint8Array(wasmBinary); } if (readBinary) { return readBinary(wasmBinaryFile); } else { throw "both async and sync fetching of the wasm failed"; } } catch (err) { abort(err); } } function getBinaryPromise() { // If we don't have the binary yet, and have the Fetch api, use that; // in some environments, like Electron's render process, Fetch api may be present, but have a different context than expected, let's only use it on the Web if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && typeof fetch === 'function' // Let's not use fetch to get objects over file:// as it's most likely Cordova which doesn't support fetch for file:// && !isFileURI(wasmBinaryFile) ) { return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) { if (!response['ok']) { throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; } return response['arrayBuffer'](); }).catch(function () { return getBinary(); }); } // Otherwise, getBinary should be able to get it synchronously return Promise.resolve().then(getBinary); } // Create the wasm instance. // Receives the wasm imports, returns the exports. function createWasm() { // prepare imports var info = { 'env': asmLibraryArg, 'wasi_snapshot_preview1': asmLibraryArg }; // Load the wasm module and create an instance of using native support in the JS engine. // handle a generated wasm instance, receiving its exports and // performing other necessary setup /** @param {WebAssembly.Module=} module*/ function receiveInstance(instance, module) { var exports = instance.exports; Module['asm'] = exports; wasmTable = Module['asm']['__indirect_function_table']; assert(wasmTable, "table not found in wasm exports"); removeRunDependency('wasm-instantiate'); } // we can't run yet (except in a pthread, where we have a custom sync instantiator) addRunDependency('wasm-instantiate'); // Async compilation can be confusing when an error on the page overwrites Module // (for example, if the order of elements is wrong, and the one defining Module is // later), so we save Module and check it later. var trueModule = Module; function receiveInstantiatedSource(output) { // 'output' is a WebAssemblyInstantiatedSource object which has both the module and instance. // receiveInstance() will swap in the exports (to Module.asm) so they can be called assert(Module === trueModule, 'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?'); trueModule = null; // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line. // When the regression is fixed, can restore the above USE_PTHREADS-enabled path. receiveInstance(output['instance']); } function instantiateArrayBuffer(receiver) { return getBinaryPromise().then(function(binary) { return WebAssembly.instantiate(binary, info); }).then(receiver, function(reason) { err('failed to asynchronously prepare wasm: ' + reason); abort(reason); }); } // Prefer streaming instantiation if available. function instantiateAsync() { if (!wasmBinary && typeof WebAssembly.instantiateStreaming === 'function' && !isDataURI(wasmBinaryFile) && // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously. !isFileURI(wasmBinaryFile) && typeof fetch === 'function') { fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function (response) { var result = WebAssembly.instantiateStreaming(response, info); return result.then(receiveInstantiatedSource, function(reason) { // We expect the most common failure cause to be a bad MIME type for the binary, // in which case falling back to ArrayBuffer instantiation should work. err('wasm streaming compile failed: ' + reason); err('falling back to ArrayBuffer instantiation'); return instantiateArrayBuffer(receiveInstantiatedSource); }); }); } else { return instantiateArrayBuffer(receiveInstantiatedSource); } } // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback // to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel // to any other async startup actions they are performing. if (Module['instantiateWasm']) { try { var exports = Module['instantiateWasm'](info, receiveInstance); return exports; } catch(e) { err('Module.instantiateWasm callback failed with error: ' + e); return false; } } instantiateAsync(); return {}; // no exports yet; we'll fill them in later } // Globals used by JS i64 conversions var tempDouble; var tempI64; // === Body === var ASM_CONSTS = { 55724: function($0, $1, $2) {var w = $0; var h = $1; var pixels = $2; if (!Module['SDL2']) Module['SDL2'] = {}; var SDL2 = Module['SDL2']; if (SDL2.ctxCanvas !== Module['canvas']) { SDL2.ctx = Module['createContext'](Module['canvas'], false, true); SDL2.ctxCanvas = Module['canvas']; } if (SDL2.w !== w || SDL2.h !== h || SDL2.imageCtx !== SDL2.ctx) { SDL2.image = SDL2.ctx.createImageData(w, h); SDL2.w = w; SDL2.h = h; SDL2.imageCtx = SDL2.ctx; } var data = SDL2.image.data; var src = pixels >> 2; var dst = 0; var num; if (typeof CanvasPixelArray !== 'undefined' && data instanceof CanvasPixelArray) { num = data.length; while (dst < num) { var val = HEAP32[src]; data[dst ] = val & 0xff; data[dst+1] = (val >> 8) & 0xff; data[dst+2] = (val >> 16) & 0xff; data[dst+3] = 0xff; src++; dst += 4; } } else { if (SDL2.data32Data !== data) { SDL2.data32 = new Int32Array(data.buffer); SDL2.data8 = new Uint8Array(data.buffer); } var data32 = SDL2.data32; num = data32.length; data32.set(HEAP32.subarray(src, src + num)); var data8 = SDL2.data8; var i = 3; var j = i + 4*num; if (num % 8 == 0) { while (i < j) { data8[i] = 0xff; i = i + 4 | 0; data8[i] = 0xff; i = i + 4 | 0; data8[i] = 0xff; i = i + 4 | 0; data8[i] = 0xff; i = i + 4 | 0; data8[i] = 0xff; i = i + 4 | 0; data8[i] = 0xff; i = i + 4 | 0; data8[i] = 0xff; i = i + 4 | 0; data8[i] = 0xff; i = i + 4 | 0; } } else { while (i < j) { data8[i] = 0xff; i = i + 4 | 0; } } } SDL2.ctx.putImageData(SDL2.image, 0, 0); return 0;}, 57203: function($0, $1, $2, $3, $4) {var w = $0; var h = $1; var hot_x = $2; var hot_y = $3; var pixels = $4; var canvas = document.createElement("canvas"); canvas.width = w; canvas.height = h; var ctx = canvas.getContext("2d"); var image = ctx.createImageData(w, h); var data = image.data; var src = pixels >> 2; var dst = 0; var num; if (typeof CanvasPixelArray !== 'undefined' && data instanceof CanvasPixelArray) { num = data.length; while (dst < num) { var val = HEAP32[src]; data[dst ] = val & 0xff; data[dst+1] = (val >> 8) & 0xff; data[dst+2] = (val >> 16) & 0xff; data[dst+3] = (val >> 24) & 0xff; src++; dst += 4; } } else { var data32 = new Int32Array(data.buffer); num = data32.length; data32.set(HEAP32.subarray(src, src + num)); } ctx.putImageData(image, 0, 0); var url = hot_x === 0 && hot_y === 0 ? "url(" + canvas.toDataURL() + "), auto" : "url(" + canvas.toDataURL() + ") " + hot_x + " " + hot_y + ", auto"; var urlBuf = _malloc(url.length + 1); stringToUTF8(url, urlBuf, url.length + 1); return urlBuf;}, 58192: function($0) {if (Module['canvas']) { Module['canvas'].style['cursor'] = UTF8ToString($0); } return 0;}, 58285: function() {if (Module['canvas']) { Module['canvas'].style['cursor'] = 'none'; }}, 59510: function() {return screen.width;}, 59537: function() {return screen.height;}, 59565: function() {return window.innerWidth;}, 59597: function() {return window.innerHeight;}, 59675: function($0) {if (typeof setWindowTitle !== 'undefined') { setWindowTitle(UTF8ToString($0)); } return 0;}, 59809: function() {if (typeof(AudioContext) !== 'undefined') { return 1; } else if (typeof(webkitAudioContext) !== 'undefined') { return 1; } return 0;}, 59975: function() {if ((typeof(navigator.mediaDevices) !== 'undefined') && (typeof(navigator.mediaDevices.getUserMedia) !== 'undefined')) { return 1; } else if (typeof(navigator.webkitGetUserMedia) !== 'undefined') { return 1; } return 0;}, 60201: function($0) {if(typeof(Module['SDL2']) === 'undefined') { Module['SDL2'] = {}; } var SDL2 = Module['SDL2']; if (!$0) { SDL2.audio = {}; } else { SDL2.capture = {}; } if (!SDL2.audioContext) { if (typeof(AudioContext) !== 'undefined') { SDL2.audioContext = new AudioContext(); } else if (typeof(webkitAudioContext) !== 'undefined') { SDL2.audioContext = new webkitAudioContext(); } if (SDL2.audioContext) { autoResumeAudioContext(SDL2.audioContext); } } return SDL2.audioContext === undefined ? -1 : 0;}, 60754: function() {var SDL2 = Module['SDL2']; return SDL2.audioContext.sampleRate;}, 60824: function($0, $1, $2, $3) {var SDL2 = Module['SDL2']; var have_microphone = function(stream) { if (SDL2.capture.silenceTimer !== undefined) { clearTimeout(SDL2.capture.silenceTimer); SDL2.capture.silenceTimer = undefined; } SDL2.capture.mediaStreamNode = SDL2.audioContext.createMediaStreamSource(stream); SDL2.capture.scriptProcessorNode = SDL2.audioContext.createScriptProcessor($1, $0, 1); SDL2.capture.scriptProcessorNode.onaudioprocess = function(audioProcessingEvent) { if ((SDL2 === undefined) || (SDL2.capture === undefined)) { return; } audioProcessingEvent.outputBuffer.getChannelData(0).fill(0.0); SDL2.capture.currentCaptureBuffer = audioProcessingEvent.inputBuffer; dynCall('vi', $2, [$3]); }; SDL2.capture.mediaStreamNode.connect(SDL2.capture.scriptProcessorNode); SDL2.capture.scriptProcessorNode.connect(SDL2.audioContext.destination); SDL2.capture.stream = stream; }; var no_microphone = function(error) { }; SDL2.capture.silenceBuffer = SDL2.audioContext.createBuffer($0, $1, SDL2.audioContext.sampleRate); SDL2.capture.silenceBuffer.getChannelData(0).fill(0.0); var silence_callback = function() { SDL2.capture.currentCaptureBuffer = SDL2.capture.silenceBuffer; dynCall('vi', $2, [$3]); }; SDL2.capture.silenceTimer = setTimeout(silence_callback, ($1 / SDL2.audioContext.sampleRate) * 1000); if ((navigator.mediaDevices !== undefined) && (navigator.mediaDevices.getUserMedia !== undefined)) { navigator.mediaDevices.getUserMedia({ audio: true, video: false }).then(have_microphone).catch(no_microphone); } else if (navigator.webkitGetUserMedia !== undefined) { navigator.webkitGetUserMedia({ audio: true, video: false }, have_microphone, no_microphone); }}, 62476: function($0, $1, $2, $3) {var SDL2 = Module['SDL2']; SDL2.audio.scriptProcessorNode = SDL2.audioContext['createScriptProcessor']($1, 0, $0); SDL2.audio.scriptProcessorNode['onaudioprocess'] = function (e) { if ((SDL2 === undefined) || (SDL2.audio === undefined)) { return; } SDL2.audio.currentOutputBuffer = e['outputBuffer']; dynCall('vi', $2, [$3]); }; SDL2.audio.scriptProcessorNode['connect'](SDL2.audioContext['destination']);}, 62886: function($0, $1) {var SDL2 = Module['SDL2']; var numChannels = SDL2.capture.currentCaptureBuffer.numberOfChannels; for (var c = 0; c < numChannels; ++c) { var channelData = SDL2.capture.currentCaptureBuffer.getChannelData(c); if (channelData.length != $1) { throw 'Web Audio capture buffer length mismatch! Destination size: ' + channelData.length + ' samples vs expected ' + $1 + ' samples!'; } if (numChannels == 1) { for (var j = 0; j < $1; ++j) { setValue($0 + (j * 4), channelData[j], 'float'); } } else { for (var j = 0; j < $1; ++j) { setValue($0 + (((j * numChannels) + c) * 4), channelData[j], 'float'); } } }}, 63491: function($0, $1) {var SDL2 = Module['SDL2']; var numChannels = SDL2.audio.currentOutputBuffer['numberOfChannels']; for (var c = 0; c < numChannels; ++c) { var channelData = SDL2.audio.currentOutputBuffer['getChannelData'](c); if (channelData.length != $1) { throw 'Web Audio output buffer length mismatch! Destination size: ' + channelData.length + ' samples vs expected ' + $1 + ' samples!'; } for (var j = 0; j < $1; ++j) { channelData[j] = HEAPF32[$0 + ((j*numChannels + c) << 2) >> 2]; } }}, 63971: function($0) {var SDL2 = Module['SDL2']; if ($0) { if (SDL2.capture.silenceTimer !== undefined) { clearTimeout(SDL2.capture.silenceTimer); } if (SDL2.capture.stream !== undefined) { var tracks = SDL2.capture.stream.getAudioTracks(); for (var i = 0; i < tracks.length; i++) { SDL2.capture.stream.removeTrack(tracks[i]); } SDL2.capture.stream = undefined; } if (SDL2.capture.scriptProcessorNode !== undefined) { SDL2.capture.scriptProcessorNode.onaudioprocess = function(audioProcessingEvent) {}; SDL2.capture.scriptProcessorNode.disconnect(); SDL2.capture.scriptProcessorNode = undefined; } if (SDL2.capture.mediaStreamNode !== undefined) { SDL2.capture.mediaStreamNode.disconnect(); SDL2.capture.mediaStreamNode = undefined; } if (SDL2.capture.silenceBuffer !== undefined) { SDL2.capture.silenceBuffer = undefined } SDL2.capture = undefined; } else { if (SDL2.audio.scriptProcessorNode != undefined) { SDL2.audio.scriptProcessorNode.disconnect(); SDL2.audio.scriptProcessorNode = undefined; } SDL2.audio = undefined; } if ((SDL2.audioContext !== undefined) && (SDL2.audio === undefined) && (SDL2.capture === undefined)) { SDL2.audioContext.close(); SDL2.audioContext = undefined; }} }; function abortStackOverflow(allocSize) { abort('Stack overflow! Attempted to allocate ' + allocSize + ' bytes on the stack, but stack has only ' + (STACK_MAX - stackSave() + allocSize) + ' bytes available!'); } function listenOnce(object, event, func) { object.addEventListener(event, func, { 'once': true }); } function autoResumeAudioContext(ctx, elements) { if (!elements) { elements = [document, document.getElementById('canvas')]; } ['keydown', 'mousedown', 'touchstart'].forEach(function(event) { elements.forEach(function(element) { if (element) { listenOnce(element, event, function() { if (ctx.state === 'suspended') ctx.resume(); }); } }); }); } function callRuntimeCallbacks(callbacks) { while(callbacks.length > 0) { var callback = callbacks.shift(); if (typeof callback == 'function') { callback(Module); // Pass the module as the first argument. continue; } var func = callback.func; if (typeof func === 'number') { if (callback.arg === undefined) { wasmTable.get(func)(); } else { wasmTable.get(func)(callback.arg); } } else { func(callback.arg === undefined ? null : callback.arg); } } } function demangle(func) { warnOnce('warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling'); return func; } function demangleAll(text) { var regex = /\b_Z[\w\d_]+/g; return text.replace(regex, function(x) { var y = demangle(x); return x === y ? x : (y + ' [' + x + ']'); }); } function dynCallLegacy(sig, ptr, args) { assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); if (args && args.length) { // j (64-bit integer) must be passed in as two numbers [low 32, high 32]. assert(args.length === sig.substring(1).replace(/j/g, '--').length); } else { assert(sig.length == 1); } if (args && args.length) { return Module['dynCall_' + sig].apply(null, [ptr].concat(args)); } return Module['dynCall_' + sig].call(null, ptr); } function dynCall(sig, ptr, args) { // Without WASM_BIGINT support we cannot directly call function with i64 as // part of thier signature, so we rely the dynCall functions generated by // wasm-emscripten-finalize if (sig.indexOf('j') != -1) { return dynCallLegacy(sig, ptr, args); } return wasmTable.get(ptr).apply(null, args) } function jsStackTrace() { var error = new Error(); if (!error.stack) { // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown, // so try that as a special-case. try { throw new Error(); } catch(e) { error = e; } if (!error.stack) { return '(no stack trace available)'; } } return error.stack.toString(); } function stackTrace() { var js = jsStackTrace(); if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace'](); return demangleAll(js); } function setErrNo(value) { HEAP32[((___errno_location())>>2)]=value; return value; } var PATH={splitPath:function(filename) { var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; return splitPathRe.exec(filename).slice(1); },normalizeArray:function(parts, allowAboveRoot) { // if the path tries to go above the root, `up` ends up > 0 var up = 0; for (var i = parts.length - 1; i >= 0; i--) { var last = parts[i]; if (last === '.') { parts.splice(i, 1); } else if (last === '..') { parts.splice(i, 1); up++; } else if (up) { parts.splice(i, 1); up--; } } // if the path is allowed to go above the root, restore leading ..s if (allowAboveRoot) { for (; up; up--) { parts.unshift('..'); } } return parts; },normalize:function(path) { var isAbsolute = path.charAt(0) === '/', trailingSlash = path.substr(-1) === '/'; // Normalize the path path = PATH.normalizeArray(path.split('/').filter(function(p) { return !!p; }), !isAbsolute).join('/'); if (!path && !isAbsolute) { path = '.'; } if (path && trailingSlash) { path += '/'; } return (isAbsolute ? '/' : '') + path; },dirname:function(path) { var result = PATH.splitPath(path), root = result[0], dir = result[1]; if (!root && !dir) { // No dirname whatsoever return '.'; } if (dir) { // It has a dirname, strip trailing slash dir = dir.substr(0, dir.length - 1); } return root + dir; },basename:function(path) { // EMSCRIPTEN return '/'' for '/', not an empty string if (path === '/') return '/'; path = PATH.normalize(path); path = path.replace(/\/$/, ""); var lastSlash = path.lastIndexOf('/'); if (lastSlash === -1) return path; return path.substr(lastSlash+1); },extname:function(path) { return PATH.splitPath(path)[3]; },join:function() { var paths = Array.prototype.slice.call(arguments, 0); return PATH.normalize(paths.join('/')); },join2:function(l, r) { return PATH.normalize(l + '/' + r); }}; function getRandomDevice() { if (typeof crypto === 'object' && typeof crypto['getRandomValues'] === 'function') { // for modern web browsers var randomBuffer = new Uint8Array(1); return function() { crypto.getRandomValues(randomBuffer); return randomBuffer[0]; }; } else if (ENVIRONMENT_IS_NODE) { // for nodejs with or without crypto support included try { var crypto_module = require('crypto'); // nodejs has crypto support return function() { return crypto_module['randomBytes'](1)[0]; }; } catch (e) { // nodejs doesn't have crypto support } } // we couldn't find a proper implementation, as Math.random() is not suitable for /dev/random, see emscripten-core/emscripten/pull/7096 return function() { abort("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };"); }; } var PATH_FS={resolve:function() { var resolvedPath = '', resolvedAbsolute = false; for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { var path = (i >= 0) ? arguments[i] : FS.cwd(); // Skip empty and invalid entries if (typeof path !== 'string') { throw new TypeError('Arguments to path.resolve must be strings'); } else if (!path) { return ''; // an invalid portion invalidates the whole thing } resolvedPath = path + '/' + resolvedPath; resolvedAbsolute = path.charAt(0) === '/'; } // At this point the path should be resolved to a full absolute path, but // handle relative paths to be safe (might happen when process.cwd() fails) resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { return !!p; }), !resolvedAbsolute).join('/'); return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; },relative:function(from, to) { from = PATH_FS.resolve(from).substr(1); to = PATH_FS.resolve(to).substr(1); function trim(arr) { var start = 0; for (; start < arr.length; start++) { if (arr[start] !== '') break; } var end = arr.length - 1; for (; end >= 0; end--) { if (arr[end] !== '') break; } if (start > end) return []; return arr.slice(start, end - start + 1); } var fromParts = trim(from.split('/')); var toParts = trim(to.split('/')); var length = Math.min(fromParts.length, toParts.length); var samePartsLength = length; for (var i = 0; i < length; i++) { if (fromParts[i] !== toParts[i]) { samePartsLength = i; break; } } var outputParts = []; for (var i = samePartsLength; i < fromParts.length; i++) { outputParts.push('..'); } outputParts = outputParts.concat(toParts.slice(samePartsLength)); return outputParts.join('/'); }}; var TTY={ttys:[],init:function () { // https://github.com/emscripten-core/emscripten/pull/1555 // if (ENVIRONMENT_IS_NODE) { // // currently, FS.init does not distinguish if process.stdin is a file or TTY // // device, it always assumes it's a TTY device. because of this, we're forcing // // process.stdin to UTF8 encoding to at least make stdin reading compatible // // with text files until FS.init can be refactored. // process['stdin']['setEncoding']('utf8'); // } },shutdown:function() { // https://github.com/emscripten-core/emscripten/pull/1555 // if (ENVIRONMENT_IS_NODE) { // // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)? // // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation // // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists? // // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle // // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call // process['stdin']['pause'](); // } },register:function(dev, ops) { TTY.ttys[dev] = { input: [], output: [], ops: ops }; FS.registerDevice(dev, TTY.stream_ops); },stream_ops:{open:function(stream) { var tty = TTY.ttys[stream.node.rdev]; if (!tty) { throw new FS.ErrnoError(43); } stream.tty = tty; stream.seekable = false; },close:function(stream) { // flush any pending line data stream.tty.ops.flush(stream.tty); },flush:function(stream) { stream.tty.ops.flush(stream.tty); },read:function(stream, buffer, offset, length, pos /* ignored */) { if (!stream.tty || !stream.tty.ops.get_char) { throw new FS.ErrnoError(60); } var bytesRead = 0; for (var i = 0; i < length; i++) { var result; try { result = stream.tty.ops.get_char(stream.tty); } catch (e) { throw new FS.ErrnoError(29); } if (result === undefined && bytesRead === 0) { throw new FS.ErrnoError(6); } if (result === null || result === undefined) break; bytesRead++; buffer[offset+i] = result; } if (bytesRead) { stream.node.timestamp = Date.now(); } return bytesRead; },write:function(stream, buffer, offset, length, pos) { if (!stream.tty || !stream.tty.ops.put_char) { throw new FS.ErrnoError(60); } try { for (var i = 0; i < length; i++) { stream.tty.ops.put_char(stream.tty, buffer[offset+i]); } } catch (e) { throw new FS.ErrnoError(29); } if (length) { stream.node.timestamp = Date.now(); } return i; }},default_tty_ops:{get_char:function(tty) { if (!tty.input.length) { var result = null; if (ENVIRONMENT_IS_NODE) { // we will read data by chunks of BUFSIZE var BUFSIZE = 256; var buf = Buffer.alloc ? Buffer.alloc(BUFSIZE) : new Buffer(BUFSIZE); var bytesRead = 0; try { bytesRead = nodeFS.readSync(process.stdin.fd, buf, 0, BUFSIZE, null); } catch(e) { // Cross-platform differences: on Windows, reading EOF throws an exception, but on other OSes, // reading EOF returns 0. Uniformize behavior by treating the EOF exception to return 0. if (e.toString().indexOf('EOF') != -1) bytesRead = 0; else throw e; } if (bytesRead > 0) { result = buf.slice(0, bytesRead).toString('utf-8'); } else { result = null; } } else if (typeof window != 'undefined' && typeof window.prompt == 'function') { // Browser. result = window.prompt('Input: '); // returns null on cancel if (result !== null) { result += '\n'; } } else if (typeof readline == 'function') { // Command line. result = readline(); if (result !== null) { result += '\n'; } } if (!result) { return null; } tty.input = intArrayFromString(result, true); } return tty.input.shift(); },put_char:function(tty, val) { if (val === null || val === 10) { out(UTF8ArrayToString(tty.output, 0)); tty.output = []; } else { if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle. } },flush:function(tty) { if (tty.output && tty.output.length > 0) { out(UTF8ArrayToString(tty.output, 0)); tty.output = []; } }},default_tty1_ops:{put_char:function(tty, val) { if (val === null || val === 10) { err(UTF8ArrayToString(tty.output, 0)); tty.output = []; } else { if (val != 0) tty.output.push(val); } },flush:function(tty) { if (tty.output && tty.output.length > 0) { err(UTF8ArrayToString(tty.output, 0)); tty.output = []; } }}}; function mmapAlloc(size) { var alignedSize = alignMemory(size, 16384); var ptr = _malloc(alignedSize); while (size < alignedSize) HEAP8[ptr + size++] = 0; return ptr; } var MEMFS={ops_table:null,mount:function(mount) { return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0); },createNode:function(parent, name, mode, dev) { if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { // no supported throw new FS.ErrnoError(63); } if (!MEMFS.ops_table) { MEMFS.ops_table = { dir: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr, lookup: MEMFS.node_ops.lookup, mknod: MEMFS.node_ops.mknod, rename: MEMFS.node_ops.rename, unlink: MEMFS.node_ops.unlink, rmdir: MEMFS.node_ops.rmdir, readdir: MEMFS.node_ops.readdir, symlink: MEMFS.node_ops.symlink }, stream: { llseek: MEMFS.stream_ops.llseek } }, file: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr }, stream: { llseek: MEMFS.stream_ops.llseek, read: MEMFS.stream_ops.read, write: MEMFS.stream_ops.write, allocate: MEMFS.stream_ops.allocate, mmap: MEMFS.stream_ops.mmap, msync: MEMFS.stream_ops.msync } }, link: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr, readlink: MEMFS.node_ops.readlink }, stream: {} }, chrdev: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr }, stream: FS.chrdev_stream_ops } }; } var node = FS.createNode(parent, name, mode, dev); if (FS.isDir(node.mode)) { node.node_ops = MEMFS.ops_table.dir.node; node.stream_ops = MEMFS.ops_table.dir.stream; node.contents = {}; } else if (FS.isFile(node.mode)) { node.node_ops = MEMFS.ops_table.file.node; node.stream_ops = MEMFS.ops_table.file.stream; node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity. // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme. node.contents = null; } else if (FS.isLink(node.mode)) { node.node_ops = MEMFS.ops_table.link.node; node.stream_ops = MEMFS.ops_table.link.stream; } else if (FS.isChrdev(node.mode)) { node.node_ops = MEMFS.ops_table.chrdev.node; node.stream_ops = MEMFS.ops_table.chrdev.stream; } node.timestamp = Date.now(); // add the new node to the parent if (parent) { parent.contents[name] = node; } return node; },getFileDataAsRegularArray:function(node) { if (node.contents && node.contents.subarray) { var arr = []; for (var i = 0; i < node.usedBytes; ++i) arr.push(node.contents[i]); return arr; // Returns a copy of the original data. } return node.contents; // No-op, the file contents are already in a JS array. Return as-is. },getFileDataAsTypedArray:function(node) { if (!node.contents) return new Uint8Array(0); if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. return new Uint8Array(node.contents); },expandFileStorage:function(node, newCapacity) { var prevCapacity = node.contents ? node.contents.length : 0; if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough. // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity. // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to // avoid overshooting the allocation cap by a very large margin. var CAPACITY_DOUBLING_MAX = 1024 * 1024; newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) >>> 0); if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding. var oldContents = node.contents; node.contents = new Uint8Array(newCapacity); // Allocate new storage. if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage. return; },resizeFileStorage:function(node, newSize) { if (node.usedBytes == newSize) return; if (newSize == 0) { node.contents = null; // Fully decommit when requesting a resize to zero. node.usedBytes = 0; return; } if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store. var oldContents = node.contents; node.contents = new Uint8Array(newSize); // Allocate new storage. if (oldContents) { node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage. } node.usedBytes = newSize; return; } // Backing with a JS array. if (!node.contents) node.contents = []; if (node.contents.length > newSize) node.contents.length = newSize; else while (node.contents.length < newSize) node.contents.push(0); node.usedBytes = newSize; },node_ops:{getattr:function(node) { var attr = {}; // device numbers reuse inode numbers. attr.dev = FS.isChrdev(node.mode) ? node.id : 1; attr.ino = node.id; attr.mode = node.mode; attr.nlink = 1; attr.uid = 0; attr.gid = 0; attr.rdev = node.rdev; if (FS.isDir(node.mode)) { attr.size = 4096; } else if (FS.isFile(node.mode)) { attr.size = node.usedBytes; } else if (FS.isLink(node.mode)) { attr.size = node.link.length; } else { attr.size = 0; } attr.atime = new Date(node.timestamp); attr.mtime = new Date(node.timestamp); attr.ctime = new Date(node.timestamp); // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize), // but this is not required by the standard. attr.blksize = 4096; attr.blocks = Math.ceil(attr.size / attr.blksize); return attr; },setattr:function(node, attr) { if (attr.mode !== undefined) { node.mode = attr.mode; } if (attr.timestamp !== undefined) { node.timestamp = attr.timestamp; } if (attr.size !== undefined) { MEMFS.resizeFileStorage(node, attr.size); } },lookup:function(parent, name) { throw FS.genericErrors[44]; },mknod:function(parent, name, mode, dev) { return MEMFS.createNode(parent, name, mode, dev); },rename:function(old_node, new_dir, new_name) { // if we're overwriting a directory at new_name, make sure it's empty. if (FS.isDir(old_node.mode)) { var new_node; try { new_node = FS.lookupNode(new_dir, new_name); } catch (e) { } if (new_node) { for (var i in new_node.contents) { throw new FS.ErrnoError(55); } } } // do the internal rewiring delete old_node.parent.contents[old_node.name]; old_node.name = new_name; new_dir.contents[new_name] = old_node; old_node.parent = new_dir; },unlink:function(parent, name) { delete parent.contents[name]; },rmdir:function(parent, name) { var node = FS.lookupNode(parent, name); for (var i in node.contents) { throw new FS.ErrnoError(55); } delete parent.contents[name]; },readdir:function(node) { var entries = ['.', '..']; for (var key in node.contents) { if (!node.contents.hasOwnProperty(key)) { continue; } entries.push(key); } return entries; },symlink:function(parent, newname, oldpath) { var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0); node.link = oldpath; return node; },readlink:function(node) { if (!FS.isLink(node.mode)) { throw new FS.ErrnoError(28); } return node.link; }},stream_ops:{read:function(stream, buffer, offset, length, position) { var contents = stream.node.contents; if (position >= stream.node.usedBytes) return 0; var size = Math.min(stream.node.usedBytes - position, length); assert(size >= 0); if (size > 8 && contents.subarray) { // non-trivial, and typed array buffer.set(contents.subarray(position, position + size), offset); } else { for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; } return size; },write:function(stream, buffer, offset, length, position, canOwn) { // The data buffer should be a typed array view assert(!(buffer instanceof ArrayBuffer)); if (!length) return 0; var node = stream.node; node.timestamp = Date.now(); if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array? if (canOwn) { assert(position === 0, 'canOwn must imply no weird position inside the file'); node.contents = buffer.subarray(offset, offset + length); node.usedBytes = length; return length; } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data. node.contents = buffer.slice(offset, offset + length); node.usedBytes = length; return length; } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file? node.contents.set(buffer.subarray(offset, offset + length), position); return length; } } // Appending to an existing file and we need to reallocate, or source data did not come as a typed array. MEMFS.expandFileStorage(node, position+length); if (node.contents.subarray && buffer.subarray) { // Use typed array write which is available. node.contents.set(buffer.subarray(offset, offset + length), position); } else { for (var i = 0; i < length; i++) { node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not. } } node.usedBytes = Math.max(node.usedBytes, position + length); return length; },llseek:function(stream, offset, whence) { var position = offset; if (whence === 1) { position += stream.position; } else if (whence === 2) { if (FS.isFile(stream.node.mode)) { position += stream.node.usedBytes; } } if (position < 0) { throw new FS.ErrnoError(28); } return position; },allocate:function(stream, offset, length) { MEMFS.expandFileStorage(stream.node, offset + length); stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); },mmap:function(stream, address, length, position, prot, flags) { // We don't currently support location hints for the address of the mapping assert(address === 0); if (!FS.isFile(stream.node.mode)) { throw new FS.ErrnoError(43); } var ptr; var allocated; var contents = stream.node.contents; // Only make a new copy when MAP_PRIVATE is specified. if (!(flags & 2) && contents.buffer === buffer) { // We can't emulate MAP_SHARED when the file is not backed by the buffer // we're mapping to (e.g. the HEAP buffer). allocated = false; ptr = contents.byteOffset; } else { // Try to avoid unnecessary slices. if (position > 0 || position + length < contents.length) { if (contents.subarray) { contents = contents.subarray(position, position + length); } else { contents = Array.prototype.slice.call(contents, position, position + length); } } allocated = true; ptr = mmapAlloc(length); if (!ptr) { throw new FS.ErrnoError(48); } HEAP8.set(contents, ptr); } return { ptr: ptr, allocated: allocated }; },msync:function(stream, buffer, offset, length, mmapFlags) { if (!FS.isFile(stream.node.mode)) { throw new FS.ErrnoError(43); } if (mmapFlags & 2) { // MAP_PRIVATE calls need not to be synced back to underlying fs return 0; } var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); // should we check if bytesWritten and length are the same? return 0; }}}; var ERRNO_MESSAGES={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"}; var ERRNO_CODES={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135}; var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e) { if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); return setErrNo(e.errno); },lookupPath:function(path, opts) { path = PATH_FS.resolve(FS.cwd(), path); opts = opts || {}; if (!path) return { path: '', node: null }; var defaults = { follow_mount: true, recurse_count: 0 }; for (var key in defaults) { if (opts[key] === undefined) { opts[key] = defaults[key]; } } if (opts.recurse_count > 8) { // max recursive lookup of 8 throw new FS.ErrnoError(32); } // split the path var parts = PATH.normalizeArray(path.split('/').filter(function(p) { return !!p; }), false); // start at the root var current = FS.root; var current_path = '/'; for (var i = 0; i < parts.length; i++) { var islast = (i === parts.length-1); if (islast && opts.parent) { // stop resolving break; } current = FS.lookupNode(current, parts[i]); current_path = PATH.join2(current_path, parts[i]); // jump to the mount's root node if this is a mountpoint if (FS.isMountpoint(current)) { if (!islast || (islast && opts.follow_mount)) { current = current.mounted.root; } } // by default, lookupPath will not follow a symlink if it is the final path component. // setting opts.follow = true will override this behavior. if (!islast || opts.follow) { var count = 0; while (FS.isLink(current.mode)) { var link = FS.readlink(current_path); current_path = PATH_FS.resolve(PATH.dirname(current_path), link); var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); current = lookup.node; if (count++ > 40) { // limit max consecutive symlinks to 40 (SYMLOOP_MAX). throw new FS.ErrnoError(32); } } } } return { path: current_path, node: current }; },getPath:function(node) { var path; while (true) { if (FS.isRoot(node)) { var mount = node.mount.mountpoint; if (!path) return mount; return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path; } path = path ? node.name + '/' + path : node.name; node = node.parent; } },hashName:function(parentid, name) { var hash = 0; for (var i = 0; i < name.length; i++) { hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0; } return ((parentid + hash) >>> 0) % FS.nameTable.length; },hashAddNode:function(node) { var hash = FS.hashName(node.parent.id, node.name); node.name_next = FS.nameTable[hash]; FS.nameTable[hash] = node; },hashRemoveNode:function(node) { var hash = FS.hashName(node.parent.id, node.name); if (FS.nameTable[hash] === node) { FS.nameTable[hash] = node.name_next; } else { var current = FS.nameTable[hash]; while (current) { if (current.name_next === node) { current.name_next = node.name_next; break; } current = current.name_next; } } },lookupNode:function(parent, name) { var errCode = FS.mayLookup(parent); if (errCode) { throw new FS.ErrnoError(errCode, parent); } var hash = FS.hashName(parent.id, name); for (var node = FS.nameTable[hash]; node; node = node.name_next) { var nodeName = node.name; if (node.parent.id === parent.id && nodeName === name) { return node; } } // if we failed to find it in the cache, call into the VFS return FS.lookup(parent, name); },createNode:function(parent, name, mode, rdev) { var node = new FS.FSNode(parent, name, mode, rdev); FS.hashAddNode(node); return node; },destroyNode:function(node) { FS.hashRemoveNode(node); },isRoot:function(node) { return node === node.parent; },isMountpoint:function(node) { return !!node.mounted; },isFile:function(mode) { return (mode & 61440) === 32768; },isDir:function(mode) { return (mode & 61440) === 16384; },isLink:function(mode) { return (mode & 61440) === 40960; },isChrdev:function(mode) { return (mode & 61440) === 8192; },isBlkdev:function(mode) { return (mode & 61440) === 24576; },isFIFO:function(mode) { return (mode & 61440) === 4096; },isSocket:function(mode) { return (mode & 49152) === 49152; },flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(str) { var flags = FS.flagModes[str]; if (typeof flags === 'undefined') { throw new Error('Unknown file open mode: ' + str); } return flags; },flagsToPermissionString:function(flag) { var perms = ['r', 'w', 'rw'][flag & 3]; if ((flag & 512)) { perms += 'w'; } return perms; },nodePermissions:function(node, perms) { if (FS.ignorePermissions) { return 0; } // return 0 if any user, group or owner bits are set. if (perms.indexOf('r') !== -1 && !(node.mode & 292)) { return 2; } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) { return 2; } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) { return 2; } return 0; },mayLookup:function(dir) { var errCode = FS.nodePermissions(dir, 'x'); if (errCode) return errCode; if (!dir.node_ops.lookup) return 2; return 0; },mayCreate:function(dir, name) { try { var node = FS.lookupNode(dir, name); return 20; } catch (e) { } return FS.nodePermissions(dir, 'wx'); },mayDelete:function(dir, name, isdir) { var node; try { node = FS.lookupNode(dir, name); } catch (e) { return e.errno; } var errCode = FS.nodePermissions(dir, 'wx'); if (errCode) { return errCode; } if (isdir) { if (!FS.isDir(node.mode)) { return 54; } if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { return 10; } } else { if (FS.isDir(node.mode)) { return 31; } } return 0; },mayOpen:function(node, flags) { if (!node) { return 44; } if (FS.isLink(node.mode)) { return 32; } else if (FS.isDir(node.mode)) { if (FS.flagsToPermissionString(flags) !== 'r' || // opening for write (flags & 512)) { // TODO: check for O_SEARCH? (== search for dir only) return 31; } } return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); },MAX_OPEN_FDS:4096,nextfd:function(fd_start, fd_end) { fd_start = fd_start || 0; fd_end = fd_end || FS.MAX_OPEN_FDS; for (var fd = fd_start; fd <= fd_end; fd++) { if (!FS.streams[fd]) { return fd; } } throw new FS.ErrnoError(33); },getStream:function(fd) { return FS.streams[fd]; },createStream:function(stream, fd_start, fd_end) { if (!FS.FSStream) { FS.FSStream = /** @constructor */ function(){}; FS.FSStream.prototype = { object: { get: function() { return this.node; }, set: function(val) { this.node = val; } }, isRead: { get: function() { return (this.flags & 2097155) !== 1; } }, isWrite: { get: function() { return (this.flags & 2097155) !== 0; } }, isAppend: { get: function() { return (this.flags & 1024); } } }; } // clone it, so we can return an instance of FSStream var newStream = new FS.FSStream(); for (var p in stream) { newStream[p] = stream[p]; } stream = newStream; var fd = FS.nextfd(fd_start, fd_end); stream.fd = fd; FS.streams[fd] = stream; return stream; },closeStream:function(fd) { FS.streams[fd] = null; },chrdev_stream_ops:{open:function(stream) { var device = FS.getDevice(stream.node.rdev); // override node's stream ops with the device's stream.stream_ops = device.stream_ops; // forward the open call if (stream.stream_ops.open) { stream.stream_ops.open(stream); } },llseek:function() { throw new FS.ErrnoError(70); }},major:function(dev) { return ((dev) >> 8); },minor:function(dev) { return ((dev) & 0xff); },makedev:function(ma, mi) { return ((ma) << 8 | (mi)); },registerDevice:function(dev, ops) { FS.devices[dev] = { stream_ops: ops }; },getDevice:function(dev) { return FS.devices[dev]; },getMounts:function(mount) { var mounts = []; var check = [mount]; while (check.length) { var m = check.pop(); mounts.push(m); check.push.apply(check, m.mounts); } return mounts; },syncfs:function(populate, callback) { if (typeof(populate) === 'function') { callback = populate; populate = false; } FS.syncFSRequests++; if (FS.syncFSRequests > 1) { err('warning: ' + FS.syncFSRequests + ' FS.syncfs operations in flight at once, probably just doing extra work'); } var mounts = FS.getMounts(FS.root.mount); var completed = 0; function doCallback(errCode) { assert(FS.syncFSRequests > 0); FS.syncFSRequests--; return callback(errCode); } function done(errCode) { if (errCode) { if (!done.errored) { done.errored = true; return doCallback(errCode); } return; } if (++completed >= mounts.length) { doCallback(null); } }; // sync all mounts mounts.forEach(function (mount) { if (!mount.type.syncfs) { return done(null); } mount.type.syncfs(mount, populate, done); }); },mount:function(type, opts, mountpoint) { if (typeof type === 'string') { // The filesystem was not included, and instead we have an error // message stored in the variable. throw type; } var root = mountpoint === '/'; var pseudo = !mountpoint; var node; if (root && FS.root) { throw new FS.ErrnoError(10); } else if (!root && !pseudo) { var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); mountpoint = lookup.path; // use the absolute path node = lookup.node; if (FS.isMountpoint(node)) { throw new FS.ErrnoError(10); } if (!FS.isDir(node.mode)) { throw new FS.ErrnoError(54); } } var mount = { type: type, opts: opts, mountpoint: mountpoint, mounts: [] }; // create a root node for the fs var mountRoot = type.mount(mount); mountRoot.mount = mount; mount.root = mountRoot; if (root) { FS.root = mountRoot; } else if (node) { // set as a mountpoint node.mounted = mount; // add the new mount to the current mount's children if (node.mount) { node.mount.mounts.push(mount); } } return mountRoot; },unmount:function (mountpoint) { var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); if (!FS.isMountpoint(lookup.node)) { throw new FS.ErrnoError(28); } // destroy the nodes for this mount, and all its child mounts var node = lookup.node; var mount = node.mounted; var mounts = FS.getMounts(mount); Object.keys(FS.nameTable).forEach(function (hash) { var current = FS.nameTable[hash]; while (current) { var next = current.name_next; if (mounts.indexOf(current.mount) !== -1) { FS.destroyNode(current); } current = next; } }); // no longer a mountpoint node.mounted = null; // remove this mount from the child mounts var idx = node.mount.mounts.indexOf(mount); assert(idx !== -1); node.mount.mounts.splice(idx, 1); },lookup:function(parent, name) { return parent.node_ops.lookup(parent, name); },mknod:function(path, mode, dev) { var lookup = FS.lookupPath(path, { parent: true }); var parent = lookup.node; var name = PATH.basename(path); if (!name || name === '.' || name === '..') { throw new FS.ErrnoError(28); } var errCode = FS.mayCreate(parent, name); if (errCode) { throw new FS.ErrnoError(errCode); } if (!parent.node_ops.mknod) { throw new FS.ErrnoError(63); } return parent.node_ops.mknod(parent, name, mode, dev); },create:function(path, mode) { mode = mode !== undefined ? mode : 438 /* 0666 */; mode &= 4095; mode |= 32768; return FS.mknod(path, mode, 0); },mkdir:function(path, mode) { mode = mode !== undefined ? mode : 511 /* 0777 */; mode &= 511 | 512; mode |= 16384; return FS.mknod(path, mode, 0); },mkdirTree:function(path, mode) { var dirs = path.split('/'); var d = ''; for (var i = 0; i < dirs.length; ++i) { if (!dirs[i]) continue; d += '/' + dirs[i]; try { FS.mkdir(d, mode); } catch(e) { if (e.errno != 20) throw e; } } },mkdev:function(path, mode, dev) { if (typeof(dev) === 'undefined') { dev = mode; mode = 438 /* 0666 */; } mode |= 8192; return FS.mknod(path, mode, dev); },symlink:function(oldpath, newpath) { if (!PATH_FS.resolve(oldpath)) { throw new FS.ErrnoError(44); } var lookup = FS.lookupPath(newpath, { parent: true }); var parent = lookup.node; if (!parent) { throw new FS.ErrnoError(44); } var newname = PATH.basename(newpath); var errCode = FS.mayCreate(parent, newname); if (errCode) { throw new FS.ErrnoError(errCode); } if (!parent.node_ops.symlink) { throw new FS.ErrnoError(63); } return parent.node_ops.symlink(parent, newname, oldpath); },rename:function(old_path, new_path) { var old_dirname = PATH.dirname(old_path); var new_dirname = PATH.dirname(new_path); var old_name = PATH.basename(old_path); var new_name = PATH.basename(new_path); // parents must exist var lookup, old_dir, new_dir; // let the errors from non existant directories percolate up lookup = FS.lookupPath(old_path, { parent: true }); old_dir = lookup.node; lookup = FS.lookupPath(new_path, { parent: true }); new_dir = lookup.node; if (!old_dir || !new_dir) throw new FS.ErrnoError(44); // need to be part of the same mount if (old_dir.mount !== new_dir.mount) { throw new FS.ErrnoError(75); } // source must exist var old_node = FS.lookupNode(old_dir, old_name); // old path should not be an ancestor of the new path var relative = PATH_FS.relative(old_path, new_dirname); if (relative.charAt(0) !== '.') { throw new FS.ErrnoError(28); } // new path should not be an ancestor of the old path relative = PATH_FS.relative(new_path, old_dirname); if (relative.charAt(0) !== '.') { throw new FS.ErrnoError(55); } // see if the new path already exists var new_node; try { new_node = FS.lookupNode(new_dir, new_name); } catch (e) { // not fatal } // early out if nothing needs to change if (old_node === new_node) { return; } // we'll need to delete the old entry var isdir = FS.isDir(old_node.mode); var errCode = FS.mayDelete(old_dir, old_name, isdir); if (errCode) { throw new FS.ErrnoError(errCode); } // need delete permissions if we'll be overwriting. // need create permissions if new doesn't already exist. errCode = new_node ? FS.mayDelete(new_dir, new_name, isdir) : FS.mayCreate(new_dir, new_name); if (errCode) { throw new FS.ErrnoError(errCode); } if (!old_dir.node_ops.rename) { throw new FS.ErrnoError(63); } if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) { throw new FS.ErrnoError(10); } // if we are going to change the parent, check write permissions if (new_dir !== old_dir) { errCode = FS.nodePermissions(old_dir, 'w'); if (errCode) { throw new FS.ErrnoError(errCode); } } try { if (FS.trackingDelegate['willMovePath']) { FS.trackingDelegate['willMovePath'](old_path, new_path); } } catch(e) { err("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); } // remove the node from the lookup hash FS.hashRemoveNode(old_node); // do the underlying fs rename try { old_dir.node_ops.rename(old_node, new_dir, new_name); } catch (e) { throw e; } finally { // add the node back to the hash (in case node_ops.rename // changed its name) FS.hashAddNode(old_node); } try { if (FS.trackingDelegate['onMovePath']) FS.trackingDelegate['onMovePath'](old_path, new_path); } catch(e) { err("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); } },rmdir:function(path) { var lookup = FS.lookupPath(path, { parent: true }); var parent = lookup.node; var name = PATH.basename(path); var node = FS.lookupNode(parent, name); var errCode = FS.mayDelete(parent, name, true); if (errCode) { throw new FS.ErrnoError(errCode); } if (!parent.node_ops.rmdir) { throw new FS.ErrnoError(63); } if (FS.isMountpoint(node)) { throw new FS.ErrnoError(10); } try { if (FS.trackingDelegate['willDeletePath']) { FS.trackingDelegate['willDeletePath'](path); } } catch(e) { err("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); } parent.node_ops.rmdir(parent, name); FS.destroyNode(node); try { if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); } catch(e) { err("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); } },readdir:function(path) { var lookup = FS.lookupPath(path, { follow: true }); var node = lookup.node; if (!node.node_ops.readdir) { throw new FS.ErrnoError(54); } return node.node_ops.readdir(node); },unlink:function(path) { var lookup = FS.lookupPath(path, { parent: true }); var parent = lookup.node; var name = PATH.basename(path); var node = FS.lookupNode(parent, name); var errCode = FS.mayDelete(parent, name, false); if (errCode) { // According to POSIX, we should map EISDIR to EPERM, but // we instead do what Linux does (and we must, as we use // the musl linux libc). throw new FS.ErrnoError(errCode); } if (!parent.node_ops.unlink) { throw new FS.ErrnoError(63); } if (FS.isMountpoint(node)) { throw new FS.ErrnoError(10); } try { if (FS.trackingDelegate['willDeletePath']) { FS.trackingDelegate['willDeletePath'](path); } } catch(e) { err("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); } parent.node_ops.unlink(parent, name); FS.destroyNode(node); try { if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); } catch(e) { err("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); } },readlink:function(path) { var lookup = FS.lookupPath(path); var link = lookup.node; if (!link) { throw new FS.ErrnoError(44); } if (!link.node_ops.readlink) { throw new FS.ErrnoError(28); } return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); },stat:function(path, dontFollow) { var lookup = FS.lookupPath(path, { follow: !dontFollow }); var node = lookup.node; if (!node) { throw new FS.ErrnoError(44); } if (!node.node_ops.getattr) { throw new FS.ErrnoError(63); } return node.node_ops.getattr(node); },lstat:function(path) { return FS.stat(path, true); },chmod:function(path, mode, dontFollow) { var node; if (typeof path === 'string') { var lookup = FS.lookupPath(path, { follow: !dontFollow }); node = lookup.node; } else { node = path; } if (!node.node_ops.setattr) { throw new FS.ErrnoError(63); } node.node_ops.setattr(node, { mode: (mode & 4095) | (node.mode & ~4095), timestamp: Date.now() }); },lchmod:function(path, mode) { FS.chmod(path, mode, true); },fchmod:function(fd, mode) { var stream = FS.getStream(fd); if (!stream) { throw new FS.ErrnoError(8); } FS.chmod(stream.node, mode); },chown:function(path, uid, gid, dontFollow) { var node; if (typeof path === 'string') { var lookup = FS.lookupPath(path, { follow: !dontFollow }); node = lookup.node; } else { node = path; } if (!node.node_ops.setattr) { throw new FS.ErrnoError(63); } node.node_ops.setattr(node, { timestamp: Date.now() // we ignore the uid / gid for now }); },lchown:function(path, uid, gid) { FS.chown(path, uid, gid, true); },fchown:function(fd, uid, gid) { var stream = FS.getStream(fd); if (!stream) { throw new FS.ErrnoError(8); } FS.chown(stream.node, uid, gid); },truncate:function(path, len) { if (len < 0) { throw new FS.ErrnoError(28); } var node; if (typeof path === 'string') { var lookup = FS.lookupPath(path, { follow: true }); node = lookup.node; } else { node = path; } if (!node.node_ops.setattr) { throw new FS.ErrnoError(63); } if (FS.isDir(node.mode)) { throw new FS.ErrnoError(31); } if (!FS.isFile(node.mode)) { throw new FS.ErrnoError(28); } var errCode = FS.nodePermissions(node, 'w'); if (errCode) { throw new FS.ErrnoError(errCode); } node.node_ops.setattr(node, { size: len, timestamp: Date.now() }); },ftruncate:function(fd, len) { var stream = FS.getStream(fd); if (!stream) { throw new FS.ErrnoError(8); } if ((stream.flags & 2097155) === 0) { throw new FS.ErrnoError(28); } FS.truncate(stream.node, len); },utime:function(path, atime, mtime) { var lookup = FS.lookupPath(path, { follow: true }); var node = lookup.node; node.node_ops.setattr(node, { timestamp: Math.max(atime, mtime) }); },open:function(path, flags, mode, fd_start, fd_end) { if (path === "") { throw new FS.ErrnoError(44); } flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags; mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode; if ((flags & 64)) { mode = (mode & 4095) | 32768; } else { mode = 0; } var node; if (typeof path === 'object') { node = path; } else { path = PATH.normalize(path); try { var lookup = FS.lookupPath(path, { follow: !(flags & 131072) }); node = lookup.node; } catch (e) { // ignore } } // perhaps we need to create the node var created = false; if ((flags & 64)) { if (node) { // if O_CREAT and O_EXCL are set, error out if the node already exists if ((flags & 128)) { throw new FS.ErrnoError(20); } } else { // node doesn't exist, try to create it node = FS.mknod(path, mode, 0); created = true; } } if (!node) { throw new FS.ErrnoError(44); } // can't truncate a device if (FS.isChrdev(node.mode)) { flags &= ~512; } // if asked only for a directory, then this must be one if ((flags & 65536) && !FS.isDir(node.mode)) { throw new FS.ErrnoError(54); } // check permissions, if this is not a file we just created now (it is ok to // create and write to a file with read-only permissions; it is read-only // for later use) if (!created) { var errCode = FS.mayOpen(node, flags); if (errCode) { throw new FS.ErrnoError(errCode); } } // do truncation if necessary if ((flags & 512)) { FS.truncate(node, 0); } // we've already handled these, don't pass down to the underlying vfs flags &= ~(128 | 512 | 131072); // register the stream with the filesystem var stream = FS.createStream({ node: node, path: FS.getPath(node), // we want the absolute path to the node flags: flags, seekable: true, position: 0, stream_ops: node.stream_ops, // used by the file family libc calls (fopen, fwrite, ferror, etc.) ungotten: [], error: false }, fd_start, fd_end); // call the new stream's open function if (stream.stream_ops.open) { stream.stream_ops.open(stream); } if (Module['logReadFiles'] && !(flags & 1)) { if (!FS.readFiles) FS.readFiles = {}; if (!(path in FS.readFiles)) { FS.readFiles[path] = 1; err("FS.trackingDelegate error on read file: " + path); } } try { if (FS.trackingDelegate['onOpenFile']) { var trackingFlags = 0; if ((flags & 2097155) !== 1) { trackingFlags |= FS.tracking.openFlags.READ; } if ((flags & 2097155) !== 0) { trackingFlags |= FS.tracking.openFlags.WRITE; } FS.trackingDelegate['onOpenFile'](path, trackingFlags); } } catch(e) { err("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: " + e.message); } return stream; },close:function(stream) { if (FS.isClosed(stream)) { throw new FS.ErrnoError(8); } if (stream.getdents) stream.getdents = null; // free readdir state try { if (stream.stream_ops.close) { stream.stream_ops.close(stream); } } catch (e) { throw e; } finally { FS.closeStream(stream.fd); } stream.fd = null; },isClosed:function(stream) { return stream.fd === null; },llseek:function(stream, offset, whence) { if (FS.isClosed(stream)) { throw new FS.ErrnoError(8); } if (!stream.seekable || !stream.stream_ops.llseek) { throw new FS.ErrnoError(70); } if (whence != 0 && whence != 1 && whence != 2) { throw new FS.ErrnoError(28); } stream.position = stream.stream_ops.llseek(stream, offset, whence); stream.ungotten = []; return stream.position; },read:function(stream, buffer, offset, length, position) { if (length < 0 || position < 0) { throw new FS.ErrnoError(28); } if (FS.isClosed(stream)) { throw new FS.ErrnoError(8); } if ((stream.flags & 2097155) === 1) { throw new FS.ErrnoError(8); } if (FS.isDir(stream.node.mode)) { throw new FS.ErrnoError(31); } if (!stream.stream_ops.read) { throw new FS.ErrnoError(28); } var seeking = typeof position !== 'undefined'; if (!seeking) { position = stream.position; } else if (!stream.seekable) { throw new FS.ErrnoError(70); } var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); if (!seeking) stream.position += bytesRead; return bytesRead; },write:function(stream, buffer, offset, length, position, canOwn) { if (length < 0 || position < 0) { throw new FS.ErrnoError(28); } if (FS.isClosed(stream)) { throw new FS.ErrnoError(8); } if ((stream.flags & 2097155) === 0) { throw new FS.ErrnoError(8); } if (FS.isDir(stream.node.mode)) { throw new FS.ErrnoError(31); } if (!stream.stream_ops.write) { throw new FS.ErrnoError(28); } if (stream.seekable && stream.flags & 1024) { // seek to the end before writing in append mode FS.llseek(stream, 0, 2); } var seeking = typeof position !== 'undefined'; if (!seeking) { position = stream.position; } else if (!stream.seekable) { throw new FS.ErrnoError(70); } var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); if (!seeking) stream.position += bytesWritten; try { if (stream.path && FS.trackingDelegate['onWriteToFile']) FS.trackingDelegate['onWriteToFile'](stream.path); } catch(e) { err("FS.trackingDelegate['onWriteToFile']('"+stream.path+"') threw an exception: " + e.message); } return bytesWritten; },allocate:function(stream, offset, length) { if (FS.isClosed(stream)) { throw new FS.ErrnoError(8); } if (offset < 0 || length <= 0) { throw new FS.ErrnoError(28); } if ((stream.flags & 2097155) === 0) { throw new FS.ErrnoError(8); } if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) { throw new FS.ErrnoError(43); } if (!stream.stream_ops.allocate) { throw new FS.ErrnoError(138); } stream.stream_ops.allocate(stream, offset, length); },mmap:function(stream, address, length, position, prot, flags) { // User requests writing to file (prot & PROT_WRITE != 0). // Checking if we have permissions to write to the file unless // MAP_PRIVATE flag is set. According to POSIX spec it is possible // to write to file opened in read-only mode with MAP_PRIVATE flag, // as all modifications will be visible only in the memory of // the current process. if ((prot & 2) !== 0 && (flags & 2) === 0 && (stream.flags & 2097155) !== 2) { throw new FS.ErrnoError(2); } if ((stream.flags & 2097155) === 1) { throw new FS.ErrnoError(2); } if (!stream.stream_ops.mmap) { throw new FS.ErrnoError(43); } return stream.stream_ops.mmap(stream, address, length, position, prot, flags); },msync:function(stream, buffer, offset, length, mmapFlags) { if (!stream || !stream.stream_ops.msync) { return 0; } return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); },munmap:function(stream) { return 0; },ioctl:function(stream, cmd, arg) { if (!stream.stream_ops.ioctl) { throw new FS.ErrnoError(59); } return stream.stream_ops.ioctl(stream, cmd, arg); },readFile:function(path, opts) { opts = opts || {}; opts.flags = opts.flags || 'r'; opts.encoding = opts.encoding || 'binary'; if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { throw new Error('Invalid encoding type "' + opts.encoding + '"'); } var ret; var stream = FS.open(path, opts.flags); var stat = FS.stat(path); var length = stat.size; var buf = new Uint8Array(length); FS.read(stream, buf, 0, length, 0); if (opts.encoding === 'utf8') { ret = UTF8ArrayToString(buf, 0); } else if (opts.encoding === 'binary') { ret = buf; } FS.close(stream); return ret; },writeFile:function(path, data, opts) { opts = opts || {}; opts.flags = opts.flags || 'w'; var stream = FS.open(path, opts.flags, opts.mode); if (typeof data === 'string') { var buf = new Uint8Array(lengthBytesUTF8(data)+1); var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn); } else if (ArrayBuffer.isView(data)) { FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn); } else { throw new Error('Unsupported data type'); } FS.close(stream); },cwd:function() { return FS.currentPath; },chdir:function(path) { var lookup = FS.lookupPath(path, { follow: true }); if (lookup.node === null) { throw new FS.ErrnoError(44); } if (!FS.isDir(lookup.node.mode)) { throw new FS.ErrnoError(54); } var errCode = FS.nodePermissions(lookup.node, 'x'); if (errCode) { throw new FS.ErrnoError(errCode); } FS.currentPath = lookup.path; },createDefaultDirectories:function() { FS.mkdir('/tmp'); FS.mkdir('/home'); FS.mkdir('/home/web_user'); },createDefaultDevices:function() { // create /dev FS.mkdir('/dev'); // setup /dev/null FS.registerDevice(FS.makedev(1, 3), { read: function() { return 0; }, write: function(stream, buffer, offset, length, pos) { return length; } }); FS.mkdev('/dev/null', FS.makedev(1, 3)); // setup /dev/tty and /dev/tty1 // stderr needs to print output using Module['printErr'] // so we register a second tty just for it. TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); FS.mkdev('/dev/tty', FS.makedev(5, 0)); FS.mkdev('/dev/tty1', FS.makedev(6, 0)); // setup /dev/[u]random var random_device = getRandomDevice(); FS.createDevice('/dev', 'random', random_device); FS.createDevice('/dev', 'urandom', random_device); // we're not going to emulate the actual shm device, // just create the tmp dirs that reside in it commonly FS.mkdir('/dev/shm'); FS.mkdir('/dev/shm/tmp'); },createSpecialDirectories:function() { // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the name of the stream for fd 6 (see test_unistd_ttyname) FS.mkdir('/proc'); FS.mkdir('/proc/self'); FS.mkdir('/proc/self/fd'); FS.mount({ mount: function() { var node = FS.createNode('/proc/self', 'fd', 16384 | 511 /* 0777 */, 73); node.node_ops = { lookup: function(parent, name) { var fd = +name; var stream = FS.getStream(fd); if (!stream) throw new FS.ErrnoError(8); var ret = { parent: null, mount: { mountpoint: 'fake' }, node_ops: { readlink: function() { return stream.path } } }; ret.parent = ret; // make it look like a simple root node return ret; } }; return node; } }, {}, '/proc/self/fd'); },createStandardStreams:function() { // TODO deprecate the old functionality of a single // input / output callback and that utilizes FS.createDevice // and instead require a unique set of stream ops // by default, we symlink the standard streams to the // default tty devices. however, if the standard streams // have been overwritten we create a unique device for // them instead. if (Module['stdin']) { FS.createDevice('/dev', 'stdin', Module['stdin']); } else { FS.symlink('/dev/tty', '/dev/stdin'); } if (Module['stdout']) { FS.createDevice('/dev', 'stdout', null, Module['stdout']); } else { FS.symlink('/dev/tty', '/dev/stdout'); } if (Module['stderr']) { FS.createDevice('/dev', 'stderr', null, Module['stderr']); } else { FS.symlink('/dev/tty1', '/dev/stderr'); } // open default streams for the stdin, stdout and stderr devices var stdin = FS.open('/dev/stdin', 'r'); var stdout = FS.open('/dev/stdout', 'w'); var stderr = FS.open('/dev/stderr', 'w'); assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')'); assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')'); assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')'); },ensureErrnoError:function() { if (FS.ErrnoError) return; FS.ErrnoError = /** @this{Object} */ function ErrnoError(errno, node) { this.node = node; this.setErrno = /** @this{Object} */ function(errno) { this.errno = errno; for (var key in ERRNO_CODES) { if (ERRNO_CODES[key] === errno) { this.code = key; break; } } }; this.setErrno(errno); this.message = ERRNO_MESSAGES[errno]; // Try to get a maximally helpful stack trace. On Node.js, getting Error.stack // now ensures it shows what we want. if (this.stack) { // Define the stack property for Node.js 4, which otherwise errors on the next line. Object.defineProperty(this, "stack", { value: (new Error).stack, writable: true }); this.stack = demangleAll(this.stack); } }; FS.ErrnoError.prototype = new Error(); FS.ErrnoError.prototype.constructor = FS.ErrnoError; // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info) [44].forEach(function(code) { FS.genericErrors[code] = new FS.ErrnoError(code); FS.genericErrors[code].stack = '<generic error, no stack>'; }); },staticInit:function() { FS.ensureErrnoError(); FS.nameTable = new Array(4096); FS.mount(MEMFS, {}, '/'); FS.createDefaultDirectories(); FS.createDefaultDevices(); FS.createSpecialDirectories(); FS.filesystems = { 'MEMFS': MEMFS, }; },init:function(input, output, error) { assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); FS.init.initialized = true; FS.ensureErrnoError(); // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here Module['stdin'] = input || Module['stdin']; Module['stdout'] = output || Module['stdout']; Module['stderr'] = error || Module['stderr']; FS.createStandardStreams(); },quit:function() { FS.init.initialized = false; // force-flush all streams, so we get musl std streams printed out var fflush = Module['_fflush']; if (fflush) fflush(0); // close all of our streams for (var i = 0; i < FS.streams.length; i++) { var stream = FS.streams[i]; if (!stream) { continue; } FS.close(stream); } },getMode:function(canRead, canWrite) { var mode = 0; if (canRead) mode |= 292 | 73; if (canWrite) mode |= 146; return mode; },findObject:function(path, dontResolveLastLink) { var ret = FS.analyzePath(path, dontResolveLastLink); if (ret.exists) { return ret.object; } else { setErrNo(ret.error); return null; } },analyzePath:function(path, dontResolveLastLink) { // operate from within the context of the symlink's target try { var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); path = lookup.path; } catch (e) { } var ret = { isRoot: false, exists: false, error: 0, name: null, path: null, object: null, parentExists: false, parentPath: null, parentObject: null }; try { var lookup = FS.lookupPath(path, { parent: true }); ret.parentExists = true; ret.parentPath = lookup.path; ret.parentObject = lookup.node; ret.name = PATH.basename(path); lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); ret.exists = true; ret.path = lookup.path; ret.object = lookup.node; ret.name = lookup.node.name; ret.isRoot = lookup.path === '/'; } catch (e) { ret.error = e.errno; }; return ret; },createPath:function(parent, path, canRead, canWrite) { parent = typeof parent === 'string' ? parent : FS.getPath(parent); var parts = path.split('/').reverse(); while (parts.length) { var part = parts.pop(); if (!part) continue; var current = PATH.join2(parent, part); try { FS.mkdir(current); } catch (e) { // ignore EEXIST } parent = current; } return current; },createFile:function(parent, name, properties, canRead, canWrite) { var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); var mode = FS.getMode(canRead, canWrite); return FS.create(path, mode); },createDataFile:function(parent, name, data, canRead, canWrite, canOwn) { var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent; var mode = FS.getMode(canRead, canWrite); var node = FS.create(path, mode); if (data) { if (typeof data === 'string') { var arr = new Array(data.length); for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); data = arr; } // make sure we can write to the file FS.chmod(node, mode | 146); var stream = FS.open(node, 'w'); FS.write(stream, data, 0, data.length, 0, canOwn); FS.close(stream); FS.chmod(node, mode); } return node; },createDevice:function(parent, name, input, output) { var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); var mode = FS.getMode(!!input, !!output); if (!FS.createDevice.major) FS.createDevice.major = 64; var dev = FS.makedev(FS.createDevice.major++, 0); // Create a fake device that a set of stream ops to emulate // the old behavior. FS.registerDevice(dev, { open: function(stream) { stream.seekable = false; }, close: function(stream) { // flush any pending line data if (output && output.buffer && output.buffer.length) { output(10); } }, read: function(stream, buffer, offset, length, pos /* ignored */) { var bytesRead = 0; for (var i = 0; i < length; i++) { var result; try { result = input(); } catch (e) { throw new FS.ErrnoError(29); } if (result === undefined && bytesRead === 0) { throw new FS.ErrnoError(6); } if (result === null || result === undefined) break; bytesRead++; buffer[offset+i] = result; } if (bytesRead) { stream.node.timestamp = Date.now(); } return bytesRead; }, write: function(stream, buffer, offset, length, pos) { for (var i = 0; i < length; i++) { try { output(buffer[offset+i]); } catch (e) { throw new FS.ErrnoError(29); } } if (length) { stream.node.timestamp = Date.now(); } return i; } }); return FS.mkdev(path, mode, dev); },forceLoadFile:function(obj) { if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; var success = true; if (typeof XMLHttpRequest !== 'undefined') { throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); } else if (read_) { // Command-line. try { // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as // read() will try to parse UTF8. obj.contents = intArrayFromString(read_(obj.url), true); obj.usedBytes = obj.contents.length; } catch (e) { success = false; } } else { throw new Error('Cannot load without read() or XMLHttpRequest.'); } if (!success) setErrNo(29); return success; },createLazyFile:function(parent, name, url, canRead, canWrite) { // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse. /** @constructor */ function LazyUint8Array() { this.lengthKnown = false; this.chunks = []; // Loaded chunks. Index is the chunk number } LazyUint8Array.prototype.get = /** @this{Object} */ function LazyUint8Array_get(idx) { if (idx > this.length-1 || idx < 0) { return undefined; } var chunkOffset = idx % this.chunkSize; var chunkNum = (idx / this.chunkSize)|0; return this.getter(chunkNum)[chunkOffset]; }; LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) { this.getter = getter; }; LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { // Find length var xhr = new XMLHttpRequest(); xhr.open('HEAD', url, false); xhr.send(null); if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); var datalength = Number(xhr.getResponseHeader("Content-length")); var header; var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip"; var chunkSize = 1024*1024; // Chunk size in bytes if (!hasByteServing) chunkSize = datalength; // Function to get a range from the remote URL. var doXHR = (function(from, to) { if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!"); // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available. var xhr = new XMLHttpRequest(); xhr.open('GET', url, false); if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); // Some hints to the browser that we want binary data. if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer'; if (xhr.overrideMimeType) { xhr.overrideMimeType('text/plain; charset=x-user-defined'); } xhr.send(null); if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); if (xhr.response !== undefined) { return new Uint8Array(/** @type{Array<number>} */(xhr.response || [])); } else { return intArrayFromString(xhr.responseText || '', true); } }); var lazyArray = this; lazyArray.setDataGetter(function(chunkNum) { var start = chunkNum * chunkSize; var end = (chunkNum+1) * chunkSize - 1; // including this byte end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block if (typeof(lazyArray.chunks[chunkNum]) === "undefined") { lazyArray.chunks[chunkNum] = doXHR(start, end); } if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!"); return lazyArray.chunks[chunkNum]; }); if (usesGzip || !datalength) { // if the server uses gzip or doesn't supply the length, we have to download the whole file to get the (uncompressed) length chunkSize = datalength = 1; // this will force getter(0)/doXHR do download the whole file datalength = this.getter(0).length; chunkSize = datalength; out("LazyFiles on gzip forces download of the whole file when length is accessed"); } this._length = datalength; this._chunkSize = chunkSize; this.lengthKnown = true; }; if (typeof XMLHttpRequest !== 'undefined') { if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc'; var lazyArray = new LazyUint8Array(); Object.defineProperties(lazyArray, { length: { get: /** @this{Object} */ function() { if(!this.lengthKnown) { this.cacheLength(); } return this._length; } }, chunkSize: { get: /** @this{Object} */ function() { if(!this.lengthKnown) { this.cacheLength(); } return this._chunkSize; } } }); var properties = { isDevice: false, contents: lazyArray }; } else { var properties = { isDevice: false, url: url }; } var node = FS.createFile(parent, name, properties, canRead, canWrite); // This is a total hack, but I want to get this lazy file code out of the // core of MEMFS. If we want to keep this lazy file concept I feel it should // be its own thin LAZYFS proxying calls to MEMFS. if (properties.contents) { node.contents = properties.contents; } else if (properties.url) { node.contents = null; node.url = properties.url; } // Add a function that defers querying the file size until it is asked the first time. Object.defineProperties(node, { usedBytes: { get: /** @this {FSNode} */ function() { return this.contents.length; } } }); // override each stream op with one that tries to force load the lazy file first var stream_ops = {}; var keys = Object.keys(node.stream_ops); keys.forEach(function(key) { var fn = node.stream_ops[key]; stream_ops[key] = function forceLoadLazyFile() { if (!FS.forceLoadFile(node)) { throw new FS.ErrnoError(29); } return fn.apply(null, arguments); }; }); // use a custom read function stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) { if (!FS.forceLoadFile(node)) { throw new FS.ErrnoError(29); } var contents = stream.node.contents; if (position >= contents.length) return 0; var size = Math.min(contents.length - position, length); assert(size >= 0); if (contents.slice) { // normal array for (var i = 0; i < size; i++) { buffer[offset + i] = contents[position + i]; } } else { for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR buffer[offset + i] = contents.get(position + i); } } return size; }; node.stream_ops = stream_ops; return node; },createPreloadedFile:function(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { Browser.init(); // XXX perhaps this method should move onto Browser? // TODO we should allow people to just pass in a complete filename instead // of parent and name being that we just join them anyways var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent; var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname function processData(byteArray) { function finish(byteArray) { if (preFinish) preFinish(); if (!dontCreateFile) { FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); } if (onload) onload(); removeRunDependency(dep); } var handled = false; Module['preloadPlugins'].forEach(function(plugin) { if (handled) return; if (plugin['canHandle'](fullname)) { plugin['handle'](byteArray, fullname, finish, function() { if (onerror) onerror(); removeRunDependency(dep); }); handled = true; } }); if (!handled) finish(byteArray); } addRunDependency(dep); if (typeof url == 'string') { Browser.asyncLoad(url, function(byteArray) { processData(byteArray); }, onerror); } else { processData(url); } },indexedDB:function() { return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; },DB_NAME:function() { return 'EM_FS_' + window.location.pathname; },DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(paths, onload, onerror) { onload = onload || function(){}; onerror = onerror || function(){}; var indexedDB = FS.indexedDB(); try { var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); } catch (e) { return onerror(e); } openRequest.onupgradeneeded = function openRequest_onupgradeneeded() { out('creating db'); var db = openRequest.result; db.createObjectStore(FS.DB_STORE_NAME); }; openRequest.onsuccess = function openRequest_onsuccess() { var db = openRequest.result; var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite'); var files = transaction.objectStore(FS.DB_STORE_NAME); var ok = 0, fail = 0, total = paths.length; function finish() { if (fail == 0) onload(); else onerror(); } paths.forEach(function(path) { var putRequest = files.put(FS.analyzePath(path).object.contents, path); putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() }; putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() }; }); transaction.onerror = onerror; }; openRequest.onerror = onerror; },loadFilesFromDB:function(paths, onload, onerror) { onload = onload || function(){}; onerror = onerror || function(){}; var indexedDB = FS.indexedDB(); try { var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); } catch (e) { return onerror(e); } openRequest.onupgradeneeded = onerror; // no database to load from openRequest.onsuccess = function openRequest_onsuccess() { var db = openRequest.result; try { var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly'); } catch(e) { onerror(e); return; } var files = transaction.objectStore(FS.DB_STORE_NAME); var ok = 0, fail = 0, total = paths.length; function finish() { if (fail == 0) onload(); else onerror(); } paths.forEach(function(path) { var getRequest = files.get(path); getRequest.onsuccess = function getRequest_onsuccess() { if (FS.analyzePath(path).exists) { FS.unlink(path); } FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true); ok++; if (ok + fail == total) finish(); }; getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() }; }); transaction.onerror = onerror; }; openRequest.onerror = onerror; },absolutePath:function() { abort('FS.absolutePath has been removed; use PATH_FS.resolve instead'); },createFolder:function() { abort('FS.createFolder has been removed; use FS.mkdir instead'); },createLink:function() { abort('FS.createLink has been removed; use FS.symlink instead'); },joinPath:function() { abort('FS.joinPath has been removed; use PATH.join instead'); },mmapAlloc:function() { abort('FS.mmapAlloc has been replaced by the top level function mmapAlloc'); },standardizePath:function() { abort('FS.standardizePath has been removed; use PATH.normalize instead'); }}; var SYSCALLS={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(dirfd, path) { if (path[0] !== '/') { // relative path var dir; if (dirfd === -100) { dir = FS.cwd(); } else { var dirstream = FS.getStream(dirfd); if (!dirstream) throw new FS.ErrnoError(8); dir = dirstream.path; } path = PATH.join2(dir, path); } return path; },doStat:function(func, path, buf) { try { var stat = func(path); } catch (e) { if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) { // an error occurred while trying to look up the path; we should just report ENOTDIR return -54; } throw e; } HEAP32[((buf)>>2)]=stat.dev; HEAP32[(((buf)+(4))>>2)]=0; HEAP32[(((buf)+(8))>>2)]=stat.ino; HEAP32[(((buf)+(12))>>2)]=stat.mode; HEAP32[(((buf)+(16))>>2)]=stat.nlink; HEAP32[(((buf)+(20))>>2)]=stat.uid; HEAP32[(((buf)+(24))>>2)]=stat.gid; HEAP32[(((buf)+(28))>>2)]=stat.rdev; HEAP32[(((buf)+(32))>>2)]=0; (tempI64 = [stat.size>>>0,(tempDouble=stat.size,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math.min((+(Math.floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(40))>>2)]=tempI64[0],HEAP32[(((buf)+(44))>>2)]=tempI64[1]); HEAP32[(((buf)+(48))>>2)]=4096; HEAP32[(((buf)+(52))>>2)]=stat.blocks; HEAP32[(((buf)+(56))>>2)]=(stat.atime.getTime() / 1000)|0; HEAP32[(((buf)+(60))>>2)]=0; HEAP32[(((buf)+(64))>>2)]=(stat.mtime.getTime() / 1000)|0; HEAP32[(((buf)+(68))>>2)]=0; HEAP32[(((buf)+(72))>>2)]=(stat.ctime.getTime() / 1000)|0; HEAP32[(((buf)+(76))>>2)]=0; (tempI64 = [stat.ino>>>0,(tempDouble=stat.ino,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math.min((+(Math.floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(80))>>2)]=tempI64[0],HEAP32[(((buf)+(84))>>2)]=tempI64[1]); return 0; },doMsync:function(addr, stream, len, flags, offset) { var buffer = HEAPU8.slice(addr, addr + len); FS.msync(stream, buffer, offset, len, flags); },doMkdir:function(path, mode) { // remove a trailing slash, if one - /a/b/ has basename of '', but // we want to create b in the context of this function path = PATH.normalize(path); if (path[path.length-1] === '/') path = path.substr(0, path.length-1); FS.mkdir(path, mode, 0); return 0; },doMknod:function(path, mode, dev) { // we don't want this in the JS API as it uses mknod to create all nodes. switch (mode & 61440) { case 32768: case 8192: case 24576: case 4096: case 49152: break; default: return -28; } FS.mknod(path, mode, dev); return 0; },doReadlink:function(path, buf, bufsize) { if (bufsize <= 0) return -28; var ret = FS.readlink(path); var len = Math.min(bufsize, lengthBytesUTF8(ret)); var endChar = HEAP8[buf+len]; stringToUTF8(ret, buf, bufsize+1); // readlink is one of the rare functions that write out a C string, but does never append a null to the output buffer(!) // stringToUTF8() always appends a null byte, so restore the character under the null byte after the write. HEAP8[buf+len] = endChar; return len; },doAccess:function(path, amode) { if (amode & ~7) { // need a valid mode return -28; } var node; var lookup = FS.lookupPath(path, { follow: true }); node = lookup.node; if (!node) { return -44; } var perms = ''; if (amode & 4) perms += 'r'; if (amode & 2) perms += 'w'; if (amode & 1) perms += 'x'; if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) { return -2; } return 0; },doDup:function(path, flags, suggestFD) { var suggest = FS.getStream(suggestFD); if (suggest) FS.close(suggest); return FS.open(path, flags, 0, suggestFD, suggestFD).fd; },doReadv:function(stream, iov, iovcnt, offset) { var ret = 0; for (var i = 0; i < iovcnt; i++) { var ptr = HEAP32[(((iov)+(i*8))>>2)]; var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; var curr = FS.read(stream, HEAP8,ptr, len, offset); if (curr < 0) return -1; ret += curr; if (curr < len) break; // nothing more to read } return ret; },doWritev:function(stream, iov, iovcnt, offset) { var ret = 0; for (var i = 0; i < iovcnt; i++) { var ptr = HEAP32[(((iov)+(i*8))>>2)]; var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; var curr = FS.write(stream, HEAP8,ptr, len, offset); if (curr < 0) return -1; ret += curr; } return ret; },varargs:undefined,get:function() { assert(SYSCALLS.varargs != undefined); SYSCALLS.varargs += 4; var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; return ret; },getStr:function(ptr) { var ret = UTF8ToString(ptr); return ret; },getStreamFromFD:function(fd) { var stream = FS.getStream(fd); if (!stream) throw new FS.ErrnoError(8); return stream; },get64:function(low, high) { if (low >= 0) assert(high === 0); else assert(high === -1); return low; }}; function ___sys_fcntl64(fd, cmd, varargs) {SYSCALLS.varargs = varargs; try { var stream = SYSCALLS.getStreamFromFD(fd); switch (cmd) { case 0: { var arg = SYSCALLS.get(); if (arg < 0) { return -28; } var newStream; newStream = FS.open(stream.path, stream.flags, 0, arg); return newStream.fd; } case 1: case 2: return 0; // FD_CLOEXEC makes no sense for a single process. case 3: return stream.flags; case 4: { var arg = SYSCALLS.get(); stream.flags |= arg; return 0; } case 12: /* case 12: Currently in musl F_GETLK64 has same value as F_GETLK, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ { var arg = SYSCALLS.get(); var offset = 0; // We're always unlocked. HEAP16[(((arg)+(offset))>>1)]=2; return 0; } case 13: case 14: /* case 13: Currently in musl F_SETLK64 has same value as F_SETLK, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ /* case 14: Currently in musl F_SETLKW64 has same value as F_SETLKW, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ return 0; // Pretend that the locking is successful. case 16: case 8: return -28; // These are for sockets. We don't have them fully implemented yet. case 9: // musl trusts getown return values, due to a bug where they must be, as they overlap with errors. just return -1 here, so fnctl() returns that, and we set errno ourselves. setErrNo(28); return -1; default: { return -28; } } } catch (e) { if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); return -e.errno; } } function ___sys_ioctl(fd, op, varargs) {SYSCALLS.varargs = varargs; try { var stream = SYSCALLS.getStreamFromFD(fd); switch (op) { case 21509: case 21505: { if (!stream.tty) return -59; return 0; } case 21510: case 21511: case 21512: case 21506: case 21507: case 21508: { if (!stream.tty) return -59; return 0; // no-op, not actually adjusting terminal settings } case 21519: { if (!stream.tty) return -59; var argp = SYSCALLS.get(); HEAP32[((argp)>>2)]=0; return 0; } case 21520: { if (!stream.tty) return -59; return -28; // not supported } case 21531: { var argp = SYSCALLS.get(); return FS.ioctl(stream, op, argp); } case 21523: { // TODO: in theory we should write to the winsize struct that gets // passed in, but for now musl doesn't read anything on it if (!stream.tty) return -59; return 0; } case 21524: { // TODO: technically, this ioctl call should change the window size. // but, since emscripten doesn't have any concept of a terminal window // yet, we'll just silently throw it away as we do TIOCGWINSZ if (!stream.tty) return -59; return 0; } default: abort('bad ioctl syscall ' + op); } } catch (e) { if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); return -e.errno; } } function ___sys_open(path, flags, varargs) {SYSCALLS.varargs = varargs; try { var pathname = SYSCALLS.getStr(path); var mode = SYSCALLS.get(); var stream = FS.open(pathname, flags, mode); return stream.fd; } catch (e) { if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); return -e.errno; } } function _abort() { abort(); } var _emscripten_get_now;if (ENVIRONMENT_IS_NODE) { _emscripten_get_now = function() { var t = process['hrtime'](); return t[0] * 1e3 + t[1] / 1e6; }; } else if (typeof dateNow !== 'undefined') { _emscripten_get_now = dateNow; } else _emscripten_get_now = function() { return performance.now(); } ; var _emscripten_get_now_is_monotonic=true;; function _clock_gettime(clk_id, tp) { // int clock_gettime(clockid_t clk_id, struct timespec *tp); var now; if (clk_id === 0) { now = Date.now(); } else if ((clk_id === 1 || clk_id === 4) && _emscripten_get_now_is_monotonic) { now = _emscripten_get_now(); } else { setErrNo(28); return -1; } HEAP32[((tp)>>2)]=(now/1000)|0; // seconds HEAP32[(((tp)+(4))>>2)]=((now % 1000)*1000*1000)|0; // nanoseconds return 0; } function _dlclose(handle) { abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking"); } function _emscripten_set_main_loop_timing(mode, value) { Browser.mainLoop.timingMode = mode; Browser.mainLoop.timingValue = value; if (!Browser.mainLoop.func) { console.error('emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.'); return 1; // Return non-zero on failure, can't set timing mode when there is no main loop. } if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) { Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() { var timeUntilNextTick = Math.max(0, Browser.mainLoop.tickStartTime + value - _emscripten_get_now())|0; setTimeout(Browser.mainLoop.runner, timeUntilNextTick); // doing this each time means that on exception, we stop }; Browser.mainLoop.method = 'timeout'; } else if (mode == 1 /*EM_TIMING_RAF*/) { Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() { Browser.requestAnimationFrame(Browser.mainLoop.runner); }; Browser.mainLoop.method = 'rAF'; } else if (mode == 2 /*EM_TIMING_SETIMMEDIATE*/) { if (typeof setImmediate === 'undefined') { // Emulate setImmediate. (note: not a complete polyfill, we don't emulate clearImmediate() to keep code size to minimum, since not needed) var setImmediates = []; var emscriptenMainLoopMessageId = 'setimmediate'; var Browser_setImmediate_messageHandler = function(event) { // When called in current thread or Worker, the main loop ID is structured slightly different to accommodate for --proxy-to-worker runtime listening to Worker events, // so check for both cases. if (event.data === emscriptenMainLoopMessageId || event.data.target === emscriptenMainLoopMessageId) { event.stopPropagation(); setImmediates.shift()(); } } addEventListener("message", Browser_setImmediate_messageHandler, true); setImmediate = /** @type{function(function(): ?, ...?): number} */(function Browser_emulated_setImmediate(func) { setImmediates.push(func); if (ENVIRONMENT_IS_WORKER) { if (Module['setImmediates'] === undefined) Module['setImmediates'] = []; Module['setImmediates'].push(func); postMessage({target: emscriptenMainLoopMessageId}); // In --proxy-to-worker, route the message via proxyClient.js } else postMessage(emscriptenMainLoopMessageId, "*"); // On the main thread, can just send the message to itself. }) } Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() { setImmediate(Browser.mainLoop.runner); }; Browser.mainLoop.method = 'immediate'; } return 0; } function setMainLoop(browserIterationFunc, fps, simulateInfiniteLoop, arg, noSetTiming) { noExitRuntime = true; assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'); Browser.mainLoop.func = browserIterationFunc; Browser.mainLoop.arg = arg; var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop; Browser.mainLoop.runner = function Browser_mainLoop_runner() { if (ABORT) return; if (Browser.mainLoop.queue.length > 0) { var start = Date.now(); var blocker = Browser.mainLoop.queue.shift(); blocker.func(blocker.arg); if (Browser.mainLoop.remainingBlockers) { var remaining = Browser.mainLoop.remainingBlockers; var next = remaining%1 == 0 ? remaining-1 : Math.floor(remaining); if (blocker.counted) { Browser.mainLoop.remainingBlockers = next; } else { // not counted, but move the progress along a tiny bit next = next + 0.5; // do not steal all the next one's progress Browser.mainLoop.remainingBlockers = (8*remaining + next)/9; } } console.log('main loop blocker "' + blocker.name + '" took ' + (Date.now() - start) + ' ms'); //, left: ' + Browser.mainLoop.remainingBlockers); Browser.mainLoop.updateStatus(); // catches pause/resume main loop from blocker execution if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; setTimeout(Browser.mainLoop.runner, 0); return; } // catch pauses from non-main loop sources if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; // Implement very basic swap interval control Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0; if (Browser.mainLoop.timingMode == 1/*EM_TIMING_RAF*/ && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) { // Not the scheduled time to render this frame - skip. Browser.mainLoop.scheduler(); return; } else if (Browser.mainLoop.timingMode == 0/*EM_TIMING_SETTIMEOUT*/) { Browser.mainLoop.tickStartTime = _emscripten_get_now(); } // Signal GL rendering layer that processing of a new frame is about to start. This helps it optimize // VBO double-buffering and reduce GPU stalls. if (Browser.mainLoop.method === 'timeout' && Module.ctx) { warnOnce('Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!'); Browser.mainLoop.method = ''; // just warn once per call to set main loop } Browser.mainLoop.runIter(browserIterationFunc); checkStackCookie(); // catch pauses from the main loop itself if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; // Queue new audio data. This is important to be right after the main loop invocation, so that we will immediately be able // to queue the newest produced audio samples. // TODO: Consider adding pre- and post- rAF callbacks so that GL.newRenderingFrameStarted() and SDL.audio.queueNewAudioData() // do not need to be hardcoded into this function, but can be more generic. if (typeof SDL === 'object' && SDL.audio && SDL.audio.queueNewAudioData) SDL.audio.queueNewAudioData(); Browser.mainLoop.scheduler(); } if (!noSetTiming) { if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) Browser.mainLoop.scheduler(); } if (simulateInfiniteLoop) { throw 'unwind'; } } var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function() { Browser.mainLoop.scheduler = null; Browser.mainLoop.currentlyRunningMainloop++; // Incrementing this signals the previous main loop that it's now become old, and it must return. },resume:function() { Browser.mainLoop.currentlyRunningMainloop++; var timingMode = Browser.mainLoop.timingMode; var timingValue = Browser.mainLoop.timingValue; var func = Browser.mainLoop.func; Browser.mainLoop.func = null; setMainLoop(func, 0, false, Browser.mainLoop.arg, true /* do not set timing and call scheduler, we will do it on the next lines */); _emscripten_set_main_loop_timing(timingMode, timingValue); Browser.mainLoop.scheduler(); },updateStatus:function() { if (Module['setStatus']) { var message = Module['statusMessage'] || 'Please wait...'; var remaining = Browser.mainLoop.remainingBlockers; var expected = Browser.mainLoop.expectedBlockers; if (remaining) { if (remaining < expected) { Module['setStatus'](message + ' (' + (expected - remaining) + '/' + expected + ')'); } else { Module['setStatus'](message); } } else { Module['setStatus'](''); } } },runIter:function(func) { if (ABORT) return; if (Module['preMainLoop']) { var preRet = Module['preMainLoop'](); if (preRet === false) { return; // |return false| skips a frame } } try { func(); } catch (e) { if (e instanceof ExitStatus) { return; } else if (e == 'unwind') { return; } else { if (e && typeof e === 'object' && e.stack) err('exception thrown: ' + [e, e.stack]); throw e; } } if (Module['postMainLoop']) Module['postMainLoop'](); }},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function() { if (!Module["preloadPlugins"]) Module["preloadPlugins"] = []; // needs to exist even in workers if (Browser.initted) return; Browser.initted = true; try { new Blob(); Browser.hasBlobConstructor = true; } catch(e) { Browser.hasBlobConstructor = false; console.log("warning: no blob constructor, cannot create blobs with mimetypes"); } Browser.BlobBuilder = typeof MozBlobBuilder != "undefined" ? MozBlobBuilder : (typeof WebKitBlobBuilder != "undefined" ? WebKitBlobBuilder : (!Browser.hasBlobConstructor ? console.log("warning: no BlobBuilder") : null)); Browser.URLObject = typeof window != "undefined" ? (window.URL ? window.URL : window.webkitURL) : undefined; if (!Module.noImageDecoding && typeof Browser.URLObject === 'undefined') { console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."); Module.noImageDecoding = true; } // Support for plugins that can process preloaded files. You can add more of these to // your app by creating and appending to Module.preloadPlugins. // // Each plugin is asked if it can handle a file based on the file's name. If it can, // it is given the file's raw data. When it is done, it calls a callback with the file's // (possibly modified) data. For example, a plugin might decompress a file, or it // might create some side data structure for use later (like an Image element, etc.). var imagePlugin = {}; imagePlugin['canHandle'] = function imagePlugin_canHandle(name) { return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name); }; imagePlugin['handle'] = function imagePlugin_handle(byteArray, name, onload, onerror) { var b = null; if (Browser.hasBlobConstructor) { try { b = new Blob([byteArray], { type: Browser.getMimetype(name) }); if (b.size !== byteArray.length) { // Safari bug #118630 // Safari's Blob can only take an ArrayBuffer b = new Blob([(new Uint8Array(byteArray)).buffer], { type: Browser.getMimetype(name) }); } } catch(e) { warnOnce('Blob constructor present but fails: ' + e + '; falling back to blob builder'); } } if (!b) { var bb = new Browser.BlobBuilder(); bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range b = bb.getBlob(); } var url = Browser.URLObject.createObjectURL(b); assert(typeof url == 'string', 'createObjectURL must return a url as a string'); var img = new Image(); img.onload = function img_onload() { assert(img.complete, 'Image ' + name + ' could not be decoded'); var canvas = document.createElement('canvas'); canvas.width = img.width; canvas.height = img.height; var ctx = canvas.getContext('2d'); ctx.drawImage(img, 0, 0); Module["preloadedImages"][name] = canvas; Browser.URLObject.revokeObjectURL(url); if (onload) onload(byteArray); }; img.onerror = function img_onerror(event) { console.log('Image ' + url + ' could not be decoded'); if (onerror) onerror(); }; img.src = url; }; Module['preloadPlugins'].push(imagePlugin); var audioPlugin = {}; audioPlugin['canHandle'] = function audioPlugin_canHandle(name) { return !Module.noAudioDecoding && name.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 }; }; audioPlugin['handle'] = function audioPlugin_handle(byteArray, name, onload, onerror) { var done = false; function finish(audio) { if (done) return; done = true; Module["preloadedAudios"][name] = audio; if (onload) onload(byteArray); } function fail() { if (done) return; done = true; Module["preloadedAudios"][name] = new Audio(); // empty shim if (onerror) onerror(); } if (Browser.hasBlobConstructor) { try { var b = new Blob([byteArray], { type: Browser.getMimetype(name) }); } catch(e) { return fail(); } var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this! assert(typeof url == 'string', 'createObjectURL must return a url as a string'); var audio = new Audio(); audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926 audio.onerror = function audio_onerror(event) { if (done) return; console.log('warning: browser could not fully decode audio ' + name + ', trying slower base64 approach'); function encode64(data) { var BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; var PAD = '='; var ret = ''; var leftchar = 0; var leftbits = 0; for (var i = 0; i < data.length; i++) { leftchar = (leftchar << 8) | data[i]; leftbits += 8; while (leftbits >= 6) { var curr = (leftchar >> (leftbits-6)) & 0x3f; leftbits -= 6; ret += BASE[curr]; } } if (leftbits == 2) { ret += BASE[(leftchar&3) << 4]; ret += PAD + PAD; } else if (leftbits == 4) { ret += BASE[(leftchar&0xf) << 2]; ret += PAD; } return ret; } audio.src = 'data:audio/x-' + name.substr(-3) + ';base64,' + encode64(byteArray); finish(audio); // we don't wait for confirmation this worked - but it's worth trying }; audio.src = url; // workaround for chrome bug 124926 - we do not always get oncanplaythrough or onerror Browser.safeSetTimeout(function() { finish(audio); // try to use it even though it is not necessarily ready to play }, 10000); } else { return fail(); } }; Module['preloadPlugins'].push(audioPlugin); // Canvas event setup function pointerLockChange() { Browser.pointerLock = document['pointerLockElement'] === Module['canvas'] || document['mozPointerLockElement'] === Module['canvas'] || document['webkitPointerLockElement'] === Module['canvas'] || document['msPointerLockElement'] === Module['canvas']; } var canvas = Module['canvas']; if (canvas) { // forced aspect ratio can be enabled by defining 'forcedAspectRatio' on Module // Module['forcedAspectRatio'] = 4 / 3; canvas.requestPointerLock = canvas['requestPointerLock'] || canvas['mozRequestPointerLock'] || canvas['webkitRequestPointerLock'] || canvas['msRequestPointerLock'] || function(){}; canvas.exitPointerLock = document['exitPointerLock'] || document['mozExitPointerLock'] || document['webkitExitPointerLock'] || document['msExitPointerLock'] || function(){}; // no-op if function does not exist canvas.exitPointerLock = canvas.exitPointerLock.bind(document); document.addEventListener('pointerlockchange', pointerLockChange, false); document.addEventListener('mozpointerlockchange', pointerLockChange, false); document.addEventListener('webkitpointerlockchange', pointerLockChange, false); document.addEventListener('mspointerlockchange', pointerLockChange, false); if (Module['elementPointerLock']) { canvas.addEventListener("click", function(ev) { if (!Browser.pointerLock && Module['canvas'].requestPointerLock) { Module['canvas'].requestPointerLock(); ev.preventDefault(); } }, false); } } },createContext:function(canvas, useWebGL, setInModule, webGLContextAttributes) { if (useWebGL && Module.ctx && canvas == Module.canvas) return Module.ctx; // no need to recreate GL context if it's already been created for this canvas. var ctx; var contextHandle; if (useWebGL) { // For GLES2/desktop GL compatibility, adjust a few defaults to be different to WebGL defaults, so that they align better with the desktop defaults. var contextAttributes = { antialias: false, alpha: false, majorVersion: (typeof WebGL2RenderingContext !== 'undefined') ? 2 : 1, }; if (webGLContextAttributes) { for (var attribute in webGLContextAttributes) { contextAttributes[attribute] = webGLContextAttributes[attribute]; } } // This check of existence of GL is here to satisfy Closure compiler, which yells if variable GL is referenced below but GL object is not // actually compiled in because application is not doing any GL operations. TODO: Ideally if GL is not being used, this function // Browser.createContext() should not even be emitted. if (typeof GL !== 'undefined') { contextHandle = GL.createContext(canvas, contextAttributes); if (contextHandle) { ctx = GL.getContext(contextHandle).GLctx; } } } else { ctx = canvas.getContext('2d'); } if (!ctx) return null; if (setInModule) { if (!useWebGL) assert(typeof GLctx === 'undefined', 'cannot set in module if GLctx is used, but we are a non-GL context that would replace it'); Module.ctx = ctx; if (useWebGL) GL.makeContextCurrent(contextHandle); Module.useWebGL = useWebGL; Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() }); Browser.init(); } return ctx; },destroyContext:function(canvas, useWebGL, setInModule) {},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer, resizeCanvas) { Browser.lockPointer = lockPointer; Browser.resizeCanvas = resizeCanvas; if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; var canvas = Module['canvas']; function fullscreenChange() { Browser.isFullscreen = false; var canvasContainer = canvas.parentNode; if ((document['fullscreenElement'] || document['mozFullScreenElement'] || document['msFullscreenElement'] || document['webkitFullscreenElement'] || document['webkitCurrentFullScreenElement']) === canvasContainer) { canvas.exitFullscreen = Browser.exitFullscreen; if (Browser.lockPointer) canvas.requestPointerLock(); Browser.isFullscreen = true; if (Browser.resizeCanvas) { Browser.setFullscreenCanvasSize(); } else { Browser.updateCanvasDimensions(canvas); } } else { // remove the full screen specific parent of the canvas again to restore the HTML structure from before going full screen canvasContainer.parentNode.insertBefore(canvas, canvasContainer); canvasContainer.parentNode.removeChild(canvasContainer); if (Browser.resizeCanvas) { Browser.setWindowedCanvasSize(); } else { Browser.updateCanvasDimensions(canvas); } } if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullscreen); if (Module['onFullscreen']) Module['onFullscreen'](Browser.isFullscreen); } if (!Browser.fullscreenHandlersInstalled) { Browser.fullscreenHandlersInstalled = true; document.addEventListener('fullscreenchange', fullscreenChange, false); document.addEventListener('mozfullscreenchange', fullscreenChange, false); document.addEventListener('webkitfullscreenchange', fullscreenChange, false); document.addEventListener('MSFullscreenChange', fullscreenChange, false); } // create a new parent to ensure the canvas has no siblings. this allows browsers to optimize full screen performance when its parent is the full screen root var canvasContainer = document.createElement("div"); canvas.parentNode.insertBefore(canvasContainer, canvas); canvasContainer.appendChild(canvas); // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size) canvasContainer.requestFullscreen = canvasContainer['requestFullscreen'] || canvasContainer['mozRequestFullScreen'] || canvasContainer['msRequestFullscreen'] || (canvasContainer['webkitRequestFullscreen'] ? function() { canvasContainer['webkitRequestFullscreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null) || (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null); canvasContainer.requestFullscreen(); },requestFullScreen:function() { abort('Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)'); },exitFullscreen:function() { // This is workaround for chrome. Trying to exit from fullscreen // not in fullscreen state will cause "TypeError: Document not active" // in chrome. See https://github.com/emscripten-core/emscripten/pull/8236 if (!Browser.isFullscreen) { return false; } var CFS = document['exitFullscreen'] || document['cancelFullScreen'] || document['mozCancelFullScreen'] || document['msExitFullscreen'] || document['webkitCancelFullScreen'] || (function() {}); CFS.apply(document, []); return true; },nextRAF:0,fakeRequestAnimationFrame:function(func) { // try to keep 60fps between calls to here var now = Date.now(); if (Browser.nextRAF === 0) { Browser.nextRAF = now + 1000/60; } else { while (now + 2 >= Browser.nextRAF) { // fudge a little, to avoid timer jitter causing us to do lots of delay:0 Browser.nextRAF += 1000/60; } } var delay = Math.max(Browser.nextRAF - now, 0); setTimeout(func, delay); },requestAnimationFrame:function(func) { if (typeof requestAnimationFrame === 'function') { requestAnimationFrame(func); return; } var RAF = Browser.fakeRequestAnimationFrame; RAF(func); },safeCallback:function(func) { return function() { if (!ABORT) return func.apply(null, arguments); }; },allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function() { Browser.allowAsyncCallbacks = false; },resumeAsyncCallbacks:function() { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now Browser.allowAsyncCallbacks = true; if (Browser.queuedAsyncCallbacks.length > 0) { var callbacks = Browser.queuedAsyncCallbacks; Browser.queuedAsyncCallbacks = []; callbacks.forEach(function(func) { func(); }); } },safeRequestAnimationFrame:function(func) { return Browser.requestAnimationFrame(function() { if (ABORT) return; if (Browser.allowAsyncCallbacks) { func(); } else { Browser.queuedAsyncCallbacks.push(func); } }); },safeSetTimeout:function(func, timeout) { noExitRuntime = true; return setTimeout(function() { if (ABORT) return; if (Browser.allowAsyncCallbacks) { func(); } else { Browser.queuedAsyncCallbacks.push(func); } }, timeout); },safeSetInterval:function(func, timeout) { noExitRuntime = true; return setInterval(function() { if (ABORT) return; if (Browser.allowAsyncCallbacks) { func(); } // drop it on the floor otherwise, next interval will kick in }, timeout); },getMimetype:function(name) { return { 'jpg': 'image/jpeg', 'jpeg': 'image/jpeg', 'png': 'image/png', 'bmp': 'image/bmp', 'ogg': 'audio/ogg', 'wav': 'audio/wav', 'mp3': 'audio/mpeg' }[name.substr(name.lastIndexOf('.')+1)]; },getUserMedia:function(func) { if(!window.getUserMedia) { window.getUserMedia = navigator['getUserMedia'] || navigator['mozGetUserMedia']; } window.getUserMedia(func); },getMovementX:function(event) { return event['movementX'] || event['mozMovementX'] || event['webkitMovementX'] || 0; },getMovementY:function(event) { return event['movementY'] || event['mozMovementY'] || event['webkitMovementY'] || 0; },getMouseWheelDelta:function(event) { var delta = 0; switch (event.type) { case 'DOMMouseScroll': // 3 lines make up a step delta = event.detail / 3; break; case 'mousewheel': // 120 units make up a step delta = event.wheelDelta / 120; break; case 'wheel': delta = event.deltaY switch(event.deltaMode) { case 0: // DOM_DELTA_PIXEL: 100 pixels make up a step delta /= 100; break; case 1: // DOM_DELTA_LINE: 3 lines make up a step delta /= 3; break; case 2: // DOM_DELTA_PAGE: A page makes up 80 steps delta *= 80; break; default: throw 'unrecognized mouse wheel delta mode: ' + event.deltaMode; } break; default: throw 'unrecognized mouse wheel event: ' + event.type; } return delta; },mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event) { // event should be mousemove, mousedown or mouseup if (Browser.pointerLock) { // When the pointer is locked, calculate the coordinates // based on the movement of the mouse. // Workaround for Firefox bug 764498 if (event.type != 'mousemove' && ('mozMovementX' in event)) { Browser.mouseMovementX = Browser.mouseMovementY = 0; } else { Browser.mouseMovementX = Browser.getMovementX(event); Browser.mouseMovementY = Browser.getMovementY(event); } // check if SDL is available if (typeof SDL != "undefined") { Browser.mouseX = SDL.mouseX + Browser.mouseMovementX; Browser.mouseY = SDL.mouseY + Browser.mouseMovementY; } else { // just add the mouse delta to the current absolut mouse position // FIXME: ideally this should be clamped against the canvas size and zero Browser.mouseX += Browser.mouseMovementX; Browser.mouseY += Browser.mouseMovementY; } } else { // Otherwise, calculate the movement based on the changes // in the coordinates. var rect = Module["canvas"].getBoundingClientRect(); var cw = Module["canvas"].width; var ch = Module["canvas"].height; // Neither .scrollX or .pageXOffset are defined in a spec, but // we prefer .scrollX because it is currently in a spec draft. // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/) var scrollX = ((typeof window.scrollX !== 'undefined') ? window.scrollX : window.pageXOffset); var scrollY = ((typeof window.scrollY !== 'undefined') ? window.scrollY : window.pageYOffset); // If this assert lands, it's likely because the browser doesn't support scrollX or pageXOffset // and we have no viable fallback. assert((typeof scrollX !== 'undefined') && (typeof scrollY !== 'undefined'), 'Unable to retrieve scroll position, mouse positions likely broken.'); if (event.type === 'touchstart' || event.type === 'touchend' || event.type === 'touchmove') { var touch = event.touch; if (touch === undefined) { return; // the "touch" property is only defined in SDL } var adjustedX = touch.pageX - (scrollX + rect.left); var adjustedY = touch.pageY - (scrollY + rect.top); adjustedX = adjustedX * (cw / rect.width); adjustedY = adjustedY * (ch / rect.height); var coords = { x: adjustedX, y: adjustedY }; if (event.type === 'touchstart') { Browser.lastTouches[touch.identifier] = coords; Browser.touches[touch.identifier] = coords; } else if (event.type === 'touchend' || event.type === 'touchmove') { var last = Browser.touches[touch.identifier]; if (!last) last = coords; Browser.lastTouches[touch.identifier] = last; Browser.touches[touch.identifier] = coords; } return; } var x = event.pageX - (scrollX + rect.left); var y = event.pageY - (scrollY + rect.top); // the canvas might be CSS-scaled compared to its backbuffer; // SDL-using content will want mouse coordinates in terms // of backbuffer units. x = x * (cw / rect.width); y = y * (ch / rect.height); Browser.mouseMovementX = x - Browser.mouseX; Browser.mouseMovementY = y - Browser.mouseY; Browser.mouseX = x; Browser.mouseY = y; } },asyncLoad:function(url, onload, onerror, noRunDep) { var dep = !noRunDep ? getUniqueRunDependency('al ' + url) : ''; readAsync(url, function(arrayBuffer) { assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).'); onload(new Uint8Array(arrayBuffer)); if (dep) removeRunDependency(dep); }, function(event) { if (onerror) { onerror(); } else { throw 'Loading data file "' + url + '" failed.'; } }); if (dep) addRunDependency(dep); },resizeListeners:[],updateResizeListeners:function() { var canvas = Module['canvas']; Browser.resizeListeners.forEach(function(listener) { listener(canvas.width, canvas.height); }); },setCanvasSize:function(width, height, noUpdates) { var canvas = Module['canvas']; Browser.updateCanvasDimensions(canvas, width, height); if (!noUpdates) Browser.updateResizeListeners(); },windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function() { // check if SDL is available if (typeof SDL != "undefined") { var flags = HEAPU32[((SDL.screen)>>2)]; flags = flags | 0x00800000; // set SDL_FULLSCREEN flag HEAP32[((SDL.screen)>>2)]=flags } Browser.updateCanvasDimensions(Module['canvas']); Browser.updateResizeListeners(); },setWindowedCanvasSize:function() { // check if SDL is available if (typeof SDL != "undefined") { var flags = HEAPU32[((SDL.screen)>>2)]; flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag HEAP32[((SDL.screen)>>2)]=flags } Browser.updateCanvasDimensions(Module['canvas']); Browser.updateResizeListeners(); },updateCanvasDimensions:function(canvas, wNative, hNative) { if (wNative && hNative) { canvas.widthNative = wNative; canvas.heightNative = hNative; } else { wNative = canvas.widthNative; hNative = canvas.heightNative; } var w = wNative; var h = hNative; if (Module['forcedAspectRatio'] && Module['forcedAspectRatio'] > 0) { if (w/h < Module['forcedAspectRatio']) { w = Math.round(h * Module['forcedAspectRatio']); } else { h = Math.round(w / Module['forcedAspectRatio']); } } if (((document['fullscreenElement'] || document['mozFullScreenElement'] || document['msFullscreenElement'] || document['webkitFullscreenElement'] || document['webkitCurrentFullScreenElement']) === canvas.parentNode) && (typeof screen != 'undefined')) { var factor = Math.min(screen.width / w, screen.height / h); w = Math.round(w * factor); h = Math.round(h * factor); } if (Browser.resizeCanvas) { if (canvas.width != w) canvas.width = w; if (canvas.height != h) canvas.height = h; if (typeof canvas.style != 'undefined') { canvas.style.removeProperty( "width"); canvas.style.removeProperty("height"); } } else { if (canvas.width != wNative) canvas.width = wNative; if (canvas.height != hNative) canvas.height = hNative; if (typeof canvas.style != 'undefined') { if (w != wNative || h != hNative) { canvas.style.setProperty( "width", w + "px", "important"); canvas.style.setProperty("height", h + "px", "important"); } else { canvas.style.removeProperty( "width"); canvas.style.removeProperty("height"); } } } },wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function() { var handle = Browser.nextWgetRequestHandle; Browser.nextWgetRequestHandle++; return handle; }}; var EGL={errorCode:12288,defaultDisplayInitialized:false,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:false,depth:false,stencil:false,antialias:false},stringCache:{},setErrorCode:function(code) { EGL.errorCode = code; },chooseConfig:function(display, attribList, config, config_size, numConfigs) { if (display != 62000 /* Magic ID for Emscripten 'default display' */) { EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); return 0; } if (attribList) { // read attribList if it is non-null for(;;) { var param = HEAP32[((attribList)>>2)]; if (param == 0x3021 /*EGL_ALPHA_SIZE*/) { var alphaSize = HEAP32[(((attribList)+(4))>>2)]; EGL.contextAttributes.alpha = (alphaSize > 0); } else if (param == 0x3025 /*EGL_DEPTH_SIZE*/) { var depthSize = HEAP32[(((attribList)+(4))>>2)]; EGL.contextAttributes.depth = (depthSize > 0); } else if (param == 0x3026 /*EGL_STENCIL_SIZE*/) { var stencilSize = HEAP32[(((attribList)+(4))>>2)]; EGL.contextAttributes.stencil = (stencilSize > 0); } else if (param == 0x3031 /*EGL_SAMPLES*/) { var samples = HEAP32[(((attribList)+(4))>>2)]; EGL.contextAttributes.antialias = (samples > 0); } else if (param == 0x3032 /*EGL_SAMPLE_BUFFERS*/) { var samples = HEAP32[(((attribList)+(4))>>2)]; EGL.contextAttributes.antialias = (samples == 1); } else if (param == 0x3100 /*EGL_CONTEXT_PRIORITY_LEVEL_IMG*/) { var requestedPriority = HEAP32[(((attribList)+(4))>>2)]; EGL.contextAttributes.lowLatency = (requestedPriority != 0x3103 /*EGL_CONTEXT_PRIORITY_LOW_IMG*/); } else if (param == 0x3038 /*EGL_NONE*/) { break; } attribList += 8; } } if ((!config || !config_size) && !numConfigs) { EGL.setErrorCode(0x300C /* EGL_BAD_PARAMETER */); return 0; } if (numConfigs) { HEAP32[((numConfigs)>>2)]=1; // Total number of supported configs: 1. } if (config && config_size > 0) { HEAP32[((config)>>2)]=62002; } EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); return 1; }}; function _eglBindAPI(api) { if (api == 0x30A0 /* EGL_OPENGL_ES_API */) { EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); return 1; } else { // if (api == 0x30A1 /* EGL_OPENVG_API */ || api == 0x30A2 /* EGL_OPENGL_API */) { EGL.setErrorCode(0x300C /* EGL_BAD_PARAMETER */); return 0; } } function _eglChooseConfig(display, attrib_list, configs, config_size, numConfigs) { return EGL.chooseConfig(display, attrib_list, configs, config_size, numConfigs); } function __webgl_enable_ANGLE_instanced_arrays(ctx) { // Extension available in WebGL 1 from Firefox 26 and Google Chrome 30 onwards. Core feature in WebGL 2. var ext = ctx.getExtension('ANGLE_instanced_arrays'); if (ext) { ctx['vertexAttribDivisor'] = function(index, divisor) { ext['vertexAttribDivisorANGLE'](index, divisor); }; ctx['drawArraysInstanced'] = function(mode, first, count, primcount) { ext['drawArraysInstancedANGLE'](mode, first, count, primcount); }; ctx['drawElementsInstanced'] = function(mode, count, type, indices, primcount) { ext['drawElementsInstancedANGLE'](mode, count, type, indices, primcount); }; return 1; } } function __webgl_enable_OES_vertex_array_object(ctx) { // Extension available in WebGL 1 from Firefox 25 and WebKit 536.28/desktop Safari 6.0.3 onwards. Core feature in WebGL 2. var ext = ctx.getExtension('OES_vertex_array_object'); if (ext) { ctx['createVertexArray'] = function() { return ext['createVertexArrayOES'](); }; ctx['deleteVertexArray'] = function(vao) { ext['deleteVertexArrayOES'](vao); }; ctx['bindVertexArray'] = function(vao) { ext['bindVertexArrayOES'](vao); }; ctx['isVertexArray'] = function(vao) { return ext['isVertexArrayOES'](vao); }; return 1; } } function __webgl_enable_WEBGL_draw_buffers(ctx) { // Extension available in WebGL 1 from Firefox 28 onwards. Core feature in WebGL 2. var ext = ctx.getExtension('WEBGL_draw_buffers'); if (ext) { ctx['drawBuffers'] = function(n, bufs) { ext['drawBuffersWEBGL'](n, bufs); }; return 1; } } function __webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(ctx) { // Closure is expected to be allowed to minify the '.dibvbi' property, so not accessing it quoted. return !!(ctx.dibvbi = ctx.getExtension('WEBGL_draw_instanced_base_vertex_base_instance')); } function __webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(ctx) { // Closure is expected to be allowed to minify the '.mdibvbi' property, so not accessing it quoted. return !!(ctx.mdibvbi = ctx.getExtension('WEBGL_multi_draw_instanced_base_vertex_base_instance')); } function __webgl_enable_WEBGL_multi_draw(ctx) { // Closure is expected to be allowed to minify the '.multiDrawWebgl' property, so not accessing it quoted. return !!(ctx.multiDrawWebgl = ctx.getExtension('WEBGL_multi_draw')); } var GL={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},timerQueriesEXT:[],queries:[],samplers:[],transformFeedbacks:[],syncs:[],programInfos:{},stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function recordError(errorCode) { if (!GL.lastError) { GL.lastError = errorCode; } },getNewId:function(table) { var ret = GL.counter++; for (var i = table.length; i < ret; i++) { table[i] = null; } return ret; },getSource:function(shader, count, string, length) { var source = ''; for (var i = 0; i < count; ++i) { var len = length ? HEAP32[(((length)+(i*4))>>2)] : -1; source += UTF8ToString(HEAP32[(((string)+(i*4))>>2)], len < 0 ? undefined : len); } return source; },createContext:function(canvas, webGLContextAttributes) { var ctx = (webGLContextAttributes.majorVersion > 1) ? canvas.getContext("webgl2", webGLContextAttributes) : (canvas.getContext("webgl", webGLContextAttributes) // https://caniuse.com/#feat=webgl ); if (!ctx) return 0; var handle = GL.registerContext(ctx, webGLContextAttributes); return handle; },registerContext:function(ctx, webGLContextAttributes) { // without pthreads a context is just an integer ID var handle = GL.getNewId(GL.contexts); var context = { handle: handle, attributes: webGLContextAttributes, version: webGLContextAttributes.majorVersion, GLctx: ctx }; // Store the created context object so that we can access the context given a canvas without having to pass the parameters again. if (ctx.canvas) ctx.canvas.GLctxObject = context; GL.contexts[handle] = context; if (typeof webGLContextAttributes.enableExtensionsByDefault === 'undefined' || webGLContextAttributes.enableExtensionsByDefault) { GL.initExtensions(context); } return handle; },makeContextCurrent:function(contextHandle) { GL.currentContext = GL.contexts[contextHandle]; // Active Emscripten GL layer context object. Module.ctx = GLctx = GL.currentContext && GL.currentContext.GLctx; // Active WebGL context object. return !(contextHandle && !GLctx); },getContext:function(contextHandle) { return GL.contexts[contextHandle]; },deleteContext:function(contextHandle) { if (GL.currentContext === GL.contexts[contextHandle]) GL.currentContext = null; if (typeof JSEvents === 'object') JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas); // Release all JS event handlers on the DOM element that the GL context is associated with since the context is now deleted. if (GL.contexts[contextHandle] && GL.contexts[contextHandle].GLctx.canvas) GL.contexts[contextHandle].GLctx.canvas.GLctxObject = undefined; // Make sure the canvas object no longer refers to the context object so there are no GC surprises. GL.contexts[contextHandle] = null; },initExtensions:function(context) { // If this function is called without a specific context object, init the extensions of the currently active context. if (!context) context = GL.currentContext; if (context.initExtensionsDone) return; context.initExtensionsDone = true; var GLctx = context.GLctx; // Detect the presence of a few extensions manually, this GL interop layer itself will need to know if they exist. // Extensions that are only available in WebGL 1 (the calls will be no-ops if called on a WebGL 2 context active) __webgl_enable_ANGLE_instanced_arrays(GLctx); __webgl_enable_OES_vertex_array_object(GLctx); __webgl_enable_WEBGL_draw_buffers(GLctx); // Extensions that are available from WebGL >= 2 (no-op if called on a WebGL 1 context active) __webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx); __webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx); GLctx.disjointTimerQueryExt = GLctx.getExtension("EXT_disjoint_timer_query"); __webgl_enable_WEBGL_multi_draw(GLctx); // These are the 'safe' feature-enabling extensions that don't add any performance impact related to e.g. debugging, and // should be enabled by default so that client GLES2/GL code will not need to go through extra hoops to get its stuff working. // As new extensions are ratified at http://www.khronos.org/registry/webgl/extensions/ , feel free to add your new extensions // here, as long as they don't produce a performance impact for users that might not be using those extensions. // E.g. debugging-related extensions should probably be off by default. var automaticallyEnabledExtensions = [ // Khronos ratified WebGL extensions ordered by number (no debug extensions): "OES_texture_float", "OES_texture_half_float", "OES_standard_derivatives", "OES_vertex_array_object", "WEBGL_compressed_texture_s3tc", "WEBGL_depth_texture", "OES_element_index_uint", "EXT_texture_filter_anisotropic", "EXT_frag_depth", "WEBGL_draw_buffers", "ANGLE_instanced_arrays", "OES_texture_float_linear", "OES_texture_half_float_linear", "EXT_blend_minmax", "EXT_shader_texture_lod", "EXT_texture_norm16", // Community approved WebGL extensions ordered by number: "WEBGL_compressed_texture_pvrtc", "EXT_color_buffer_half_float", "WEBGL_color_buffer_float", "EXT_sRGB", "WEBGL_compressed_texture_etc1", "EXT_disjoint_timer_query", "WEBGL_compressed_texture_etc", "WEBGL_compressed_texture_astc", "EXT_color_buffer_float", "WEBGL_compressed_texture_s3tc_srgb", "EXT_disjoint_timer_query_webgl2", // Old style prefixed forms of extensions (but still currently used on e.g. iPhone Xs as // tested on iOS 12.4.1): "WEBKIT_WEBGL_compressed_texture_pvrtc"]; function shouldEnableAutomatically(extension) { var ret = false; automaticallyEnabledExtensions.forEach(function(include) { if (extension.indexOf(include) != -1) { ret = true; } }); return ret; } var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. exts.forEach(function(ext) { if (automaticallyEnabledExtensions.indexOf(ext) != -1) { GLctx.getExtension(ext); // Calling .getExtension enables that extension permanently, no need to store the return value to be enabled. } }); },populateUniformTable:function(program) { var p = GL.programs[program]; var ptable = GL.programInfos[program] = { uniforms: {}, maxUniformLength: 0, // This is eagerly computed below, since we already enumerate all uniforms anyway. maxAttributeLength: -1, // This is lazily computed and cached, computed when/if first asked, "-1" meaning not computed yet. maxUniformBlockNameLength: -1 // Lazily computed as well }; var utable = ptable.uniforms; // A program's uniform table maps the string name of an uniform to an integer location of that uniform. // The global GL.uniforms map maps integer locations to WebGLUniformLocations. var numUniforms = GLctx.getProgramParameter(p, 0x8B86/*GL_ACTIVE_UNIFORMS*/); for (var i = 0; i < numUniforms; ++i) { var u = GLctx.getActiveUniform(p, i); var name = u.name; ptable.maxUniformLength = Math.max(ptable.maxUniformLength, name.length+1); // If we are dealing with an array, e.g. vec4 foo[3], strip off the array index part to canonicalize that "foo", "foo[]", // and "foo[0]" will mean the same. Loop below will populate foo[1] and foo[2]. if (name.slice(-1) == ']') { name = name.slice(0, name.lastIndexOf('[')); } // Optimize memory usage slightly: If we have an array of uniforms, e.g. 'vec3 colors[3];', then // only store the string 'colors' in utable, and 'colors[0]', 'colors[1]' and 'colors[2]' will be parsed as 'colors'+i. // Note that for the GL.uniforms table, we still need to fetch the all WebGLUniformLocations for all the indices. var loc = GLctx.getUniformLocation(p, name); if (loc) { var id = GL.getNewId(GL.uniforms); utable[name] = [u.size, id]; GL.uniforms[id] = loc; for (var j = 1; j < u.size; ++j) { var n = name + '['+j+']'; loc = GLctx.getUniformLocation(p, n); id = GL.getNewId(GL.uniforms); GL.uniforms[id] = loc; } } } }}; function _eglCreateContext(display, config, hmm, contextAttribs) { if (display != 62000 /* Magic ID for Emscripten 'default display' */) { EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); return 0; } // EGL 1.4 spec says default EGL_CONTEXT_CLIENT_VERSION is GLES1, but this is not supported by Emscripten. // So user must pass EGL_CONTEXT_CLIENT_VERSION == 2 to initialize EGL. var glesContextVersion = 1; for(;;) { var param = HEAP32[((contextAttribs)>>2)]; if (param == 0x3098 /*EGL_CONTEXT_CLIENT_VERSION*/) { glesContextVersion = HEAP32[(((contextAttribs)+(4))>>2)]; } else if (param == 0x3038 /*EGL_NONE*/) { break; } else { /* EGL1.4 specifies only EGL_CONTEXT_CLIENT_VERSION as supported attribute */ EGL.setErrorCode(0x3004 /*EGL_BAD_ATTRIBUTE*/); return 0; } contextAttribs += 8; } if (glesContextVersion < 2 || glesContextVersion > 3) { EGL.setErrorCode(0x3005 /* EGL_BAD_CONFIG */); return 0; /* EGL_NO_CONTEXT */ } EGL.contextAttributes.majorVersion = glesContextVersion - 1; // WebGL 1 is GLES 2, WebGL2 is GLES3 EGL.contextAttributes.minorVersion = 0; EGL.context = GL.createContext(Module['canvas'], EGL.contextAttributes); if (EGL.context != 0) { EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); // Run callbacks so that GL emulation works GL.makeContextCurrent(EGL.context); Module.useWebGL = true; Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() }); // Note: This function only creates a context, but it shall not make it active. GL.makeContextCurrent(null); return 62004; // Magic ID for Emscripten EGLContext } else { EGL.setErrorCode(0x3009 /* EGL_BAD_MATCH */); // By the EGL 1.4 spec, an implementation that does not support GLES2 (WebGL in this case), this error code is set. return 0; /* EGL_NO_CONTEXT */ } } function _eglCreateWindowSurface(display, config, win, attrib_list) { if (display != 62000 /* Magic ID for Emscripten 'default display' */) { EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); return 0; } if (config != 62002 /* Magic ID for the only EGLConfig supported by Emscripten */) { EGL.setErrorCode(0x3005 /* EGL_BAD_CONFIG */); return 0; } // TODO: Examine attrib_list! Parameters that can be present there are: // - EGL_RENDER_BUFFER (must be EGL_BACK_BUFFER) // - EGL_VG_COLORSPACE (can't be set) // - EGL_VG_ALPHA_FORMAT (can't be set) EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); return 62006; /* Magic ID for Emscripten 'default surface' */ } function _eglDestroyContext(display, context) { if (display != 62000 /* Magic ID for Emscripten 'default display' */) { EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); return 0; } if (context != 62004 /* Magic ID for Emscripten EGLContext */) { EGL.setErrorCode(0x3006 /* EGL_BAD_CONTEXT */); return 0; } GL.deleteContext(EGL.context); EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); if (EGL.currentContext == context) { EGL.currentContext = 0; } return 1 /* EGL_TRUE */; } function _eglDestroySurface(display, surface) { if (display != 62000 /* Magic ID for Emscripten 'default display' */) { EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); return 0; } if (surface != 62006 /* Magic ID for the only EGLSurface supported by Emscripten */) { EGL.setErrorCode(0x300D /* EGL_BAD_SURFACE */); return 1; } if (EGL.currentReadSurface == surface) { EGL.currentReadSurface = 0; } if (EGL.currentDrawSurface == surface) { EGL.currentDrawSurface = 0; } EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); return 1; /* Magic ID for Emscripten 'default surface' */ } function _eglGetConfigAttrib(display, config, attribute, value) { if (display != 62000 /* Magic ID for Emscripten 'default display' */) { EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); return 0; } if (config != 62002 /* Magic ID for the only EGLConfig supported by Emscripten */) { EGL.setErrorCode(0x3005 /* EGL_BAD_CONFIG */); return 0; } if (!value) { EGL.setErrorCode(0x300C /* EGL_BAD_PARAMETER */); return 0; } EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); switch(attribute) { case 0x3020: // EGL_BUFFER_SIZE HEAP32[((value)>>2)]=EGL.contextAttributes.alpha ? 32 : 24; return 1; case 0x3021: // EGL_ALPHA_SIZE HEAP32[((value)>>2)]=EGL.contextAttributes.alpha ? 8 : 0; return 1; case 0x3022: // EGL_BLUE_SIZE HEAP32[((value)>>2)]=8; return 1; case 0x3023: // EGL_GREEN_SIZE HEAP32[((value)>>2)]=8; return 1; case 0x3024: // EGL_RED_SIZE HEAP32[((value)>>2)]=8; return 1; case 0x3025: // EGL_DEPTH_SIZE HEAP32[((value)>>2)]=EGL.contextAttributes.depth ? 24 : 0; return 1; case 0x3026: // EGL_STENCIL_SIZE HEAP32[((value)>>2)]=EGL.contextAttributes.stencil ? 8 : 0; return 1; case 0x3027: // EGL_CONFIG_CAVEAT // We can return here one of EGL_NONE (0x3038), EGL_SLOW_CONFIG (0x3050) or EGL_NON_CONFORMANT_CONFIG (0x3051). HEAP32[((value)>>2)]=0x3038; return 1; case 0x3028: // EGL_CONFIG_ID HEAP32[((value)>>2)]=62002; return 1; case 0x3029: // EGL_LEVEL HEAP32[((value)>>2)]=0; return 1; case 0x302A: // EGL_MAX_PBUFFER_HEIGHT HEAP32[((value)>>2)]=4096; return 1; case 0x302B: // EGL_MAX_PBUFFER_PIXELS HEAP32[((value)>>2)]=16777216; return 1; case 0x302C: // EGL_MAX_PBUFFER_WIDTH HEAP32[((value)>>2)]=4096; return 1; case 0x302D: // EGL_NATIVE_RENDERABLE HEAP32[((value)>>2)]=0; return 1; case 0x302E: // EGL_NATIVE_VISUAL_ID HEAP32[((value)>>2)]=0; return 1; case 0x302F: // EGL_NATIVE_VISUAL_TYPE HEAP32[((value)>>2)]=0x3038; return 1; case 0x3031: // EGL_SAMPLES HEAP32[((value)>>2)]=EGL.contextAttributes.antialias ? 4 : 0; return 1; case 0x3032: // EGL_SAMPLE_BUFFERS HEAP32[((value)>>2)]=EGL.contextAttributes.antialias ? 1 : 0; return 1; case 0x3033: // EGL_SURFACE_TYPE HEAP32[((value)>>2)]=0x4; return 1; case 0x3034: // EGL_TRANSPARENT_TYPE // If this returns EGL_TRANSPARENT_RGB (0x3052), transparency is used through color-keying. No such thing applies to Emscripten canvas. HEAP32[((value)>>2)]=0x3038; return 1; case 0x3035: // EGL_TRANSPARENT_BLUE_VALUE case 0x3036: // EGL_TRANSPARENT_GREEN_VALUE case 0x3037: // EGL_TRANSPARENT_RED_VALUE // "If EGL_TRANSPARENT_TYPE is EGL_NONE, then the values for EGL_TRANSPARENT_RED_VALUE, EGL_TRANSPARENT_GREEN_VALUE, and EGL_TRANSPARENT_BLUE_VALUE are undefined." HEAP32[((value)>>2)]=-1; return 1; case 0x3039: // EGL_BIND_TO_TEXTURE_RGB case 0x303A: // EGL_BIND_TO_TEXTURE_RGBA HEAP32[((value)>>2)]=0; return 1; case 0x303B: // EGL_MIN_SWAP_INTERVAL HEAP32[((value)>>2)]=0; return 1; case 0x303C: // EGL_MAX_SWAP_INTERVAL HEAP32[((value)>>2)]=1; return 1; case 0x303D: // EGL_LUMINANCE_SIZE case 0x303E: // EGL_ALPHA_MASK_SIZE HEAP32[((value)>>2)]=0; return 1; case 0x303F: // EGL_COLOR_BUFFER_TYPE // EGL has two types of buffers: EGL_RGB_BUFFER and EGL_LUMINANCE_BUFFER. HEAP32[((value)>>2)]=0x308E; return 1; case 0x3040: // EGL_RENDERABLE_TYPE // A bit combination of EGL_OPENGL_ES_BIT,EGL_OPENVG_BIT,EGL_OPENGL_ES2_BIT and EGL_OPENGL_BIT. HEAP32[((value)>>2)]=0x4; return 1; case 0x3042: // EGL_CONFORMANT // "EGL_CONFORMANT is a mask indicating if a client API context created with respect to the corresponding EGLConfig will pass the required conformance tests for that API." HEAP32[((value)>>2)]=0; return 1; default: EGL.setErrorCode(0x3004 /* EGL_BAD_ATTRIBUTE */); return 0; } } function _eglGetDisplay(nativeDisplayType) { EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); // Note: As a 'conformant' implementation of EGL, we would prefer to init here only if the user // calls this function with EGL_DEFAULT_DISPLAY. Other display IDs would be preferred to be unsupported // and EGL_NO_DISPLAY returned. Uncomment the following code lines to do this. // Instead, an alternative route has been preferred, namely that the Emscripten EGL implementation // "emulates" X11, and eglGetDisplay is expected to accept/receive a pointer to an X11 Display object. // Therefore, be lax and allow anything to be passed in, and return the magic handle to our default EGLDisplay object. // if (nativeDisplayType == 0 /* EGL_DEFAULT_DISPLAY */) { return 62000; // Magic ID for Emscripten 'default display' // } // else // return 0; // EGL_NO_DISPLAY } function _eglGetError() { return EGL.errorCode; } function _eglGetProcAddress(name_) { return _emscripten_GetProcAddress(name_); } function _eglInitialize(display, majorVersion, minorVersion) { if (display == 62000 /* Magic ID for Emscripten 'default display' */) { if (majorVersion) { HEAP32[((majorVersion)>>2)]=1; // Advertise EGL Major version: '1' } if (minorVersion) { HEAP32[((minorVersion)>>2)]=4; // Advertise EGL Minor version: '4' } EGL.defaultDisplayInitialized = true; EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); return 1; } else { EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); return 0; } } function _eglMakeCurrent(display, draw, read, context) { if (display != 62000 /* Magic ID for Emscripten 'default display' */) { EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); return 0 /* EGL_FALSE */; } //\todo An EGL_NOT_INITIALIZED error is generated if EGL is not initialized for dpy. if (context != 0 && context != 62004 /* Magic ID for Emscripten EGLContext */) { EGL.setErrorCode(0x3006 /* EGL_BAD_CONTEXT */); return 0; } if ((read != 0 && read != 62006) || (draw != 0 && draw != 62006 /* Magic ID for Emscripten 'default surface' */)) { EGL.setErrorCode(0x300D /* EGL_BAD_SURFACE */); return 0; } GL.makeContextCurrent(context ? EGL.context : null); EGL.currentContext = context; EGL.currentDrawSurface = draw; EGL.currentReadSurface = read; EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); return 1 /* EGL_TRUE */; } function _eglQueryString(display, name) { if (display != 62000 /* Magic ID for Emscripten 'default display' */) { EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); return 0; } //\todo An EGL_NOT_INITIALIZED error is generated if EGL is not initialized for dpy. EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); if (EGL.stringCache[name]) return EGL.stringCache[name]; var ret; switch(name) { case 0x3053 /* EGL_VENDOR */: ret = allocateUTF8("Emscripten"); break; case 0x3054 /* EGL_VERSION */: ret = allocateUTF8("1.4 Emscripten EGL"); break; case 0x3055 /* EGL_EXTENSIONS */: ret = allocateUTF8(""); break; // Currently not supporting any EGL extensions. case 0x308D /* EGL_CLIENT_APIS */: ret = allocateUTF8("OpenGL_ES"); break; default: EGL.setErrorCode(0x300C /* EGL_BAD_PARAMETER */); return 0; } EGL.stringCache[name] = ret; return ret; } function _eglSwapBuffers() { if (!EGL.defaultDisplayInitialized) { EGL.setErrorCode(0x3001 /* EGL_NOT_INITIALIZED */); } else if (!Module.ctx) { EGL.setErrorCode(0x3002 /* EGL_BAD_ACCESS */); } else if (Module.ctx.isContextLost()) { EGL.setErrorCode(0x300E /* EGL_CONTEXT_LOST */); } else { // According to documentation this does an implicit flush. // Due to discussion at https://github.com/emscripten-core/emscripten/pull/1871 // the flush was removed since this _may_ result in slowing code down. //_glFlush(); EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); return 1 /* EGL_TRUE */; } return 0 /* EGL_FALSE */; } function _eglSwapInterval(display, interval) { if (display != 62000 /* Magic ID for Emscripten 'default display' */) { EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); return 0; } if (interval == 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 0); else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, interval); EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); return 1; } function _eglTerminate(display) { if (display != 62000 /* Magic ID for Emscripten 'default display' */) { EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); return 0; } EGL.currentContext = 0; EGL.currentReadSurface = 0; EGL.currentDrawSurface = 0; EGL.defaultDisplayInitialized = false; EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); return 1; } function _eglWaitClient() { EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); return 1; } function _eglWaitGL( ) { return _eglWaitClient(); } function _eglWaitNative(nativeEngineId) { EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); return 1; } function _emscripten_asm_const_int(code, sigPtr, argbuf) { var args = readAsmConstArgs(sigPtr, argbuf); return ASM_CONSTS[code].apply(null, args); } var JSEvents={inEventHandler:0,removeAllEventListeners:function() { for(var i = JSEvents.eventHandlers.length-1; i >= 0; --i) { JSEvents._removeHandler(i); } JSEvents.eventHandlers = []; JSEvents.deferredCalls = []; },registerRemoveEventListeners:function() { if (!JSEvents.removeEventListenersRegistered) { __ATEXIT__.push(JSEvents.removeAllEventListeners); JSEvents.removeEventListenersRegistered = true; } },deferredCalls:[],deferCall:function(targetFunction, precedence, argsList) { function arraysHaveEqualContent(arrA, arrB) { if (arrA.length != arrB.length) return false; for(var i in arrA) { if (arrA[i] != arrB[i]) return false; } return true; } // Test if the given call was already queued, and if so, don't add it again. for(var i in JSEvents.deferredCalls) { var call = JSEvents.deferredCalls[i]; if (call.targetFunction == targetFunction && arraysHaveEqualContent(call.argsList, argsList)) { return; } } JSEvents.deferredCalls.push({ targetFunction: targetFunction, precedence: precedence, argsList: argsList }); JSEvents.deferredCalls.sort(function(x,y) { return x.precedence < y.precedence; }); },removeDeferredCalls:function(targetFunction) { for(var i = 0; i < JSEvents.deferredCalls.length; ++i) { if (JSEvents.deferredCalls[i].targetFunction == targetFunction) { JSEvents.deferredCalls.splice(i, 1); --i; } } },canPerformEventHandlerRequests:function() { return JSEvents.inEventHandler && JSEvents.currentEventHandler.allowsDeferredCalls; },runDeferredCalls:function() { if (!JSEvents.canPerformEventHandlerRequests()) { return; } for(var i = 0; i < JSEvents.deferredCalls.length; ++i) { var call = JSEvents.deferredCalls[i]; JSEvents.deferredCalls.splice(i, 1); --i; call.targetFunction.apply(null, call.argsList); } },eventHandlers:[],removeAllHandlersOnTarget:function(target, eventTypeString) { for(var i = 0; i < JSEvents.eventHandlers.length; ++i) { if (JSEvents.eventHandlers[i].target == target && (!eventTypeString || eventTypeString == JSEvents.eventHandlers[i].eventTypeString)) { JSEvents._removeHandler(i--); } } },_removeHandler:function(i) { var h = JSEvents.eventHandlers[i]; h.target.removeEventListener(h.eventTypeString, h.eventListenerFunc, h.useCapture); JSEvents.eventHandlers.splice(i, 1); },registerOrRemoveHandler:function(eventHandler) { var jsEventHandler = function jsEventHandler(event) { // Increment nesting count for the event handler. ++JSEvents.inEventHandler; JSEvents.currentEventHandler = eventHandler; // Process any old deferred calls the user has placed. JSEvents.runDeferredCalls(); // Process the actual event, calls back to user C code handler. eventHandler.handlerFunc(event); // Process any new deferred calls that were placed right now from this event handler. JSEvents.runDeferredCalls(); // Out of event handler - restore nesting count. --JSEvents.inEventHandler; }; if (eventHandler.callbackfunc) { eventHandler.eventListenerFunc = jsEventHandler; eventHandler.target.addEventListener(eventHandler.eventTypeString, jsEventHandler, eventHandler.useCapture); JSEvents.eventHandlers.push(eventHandler); JSEvents.registerRemoveEventListeners(); } else { for(var i = 0; i < JSEvents.eventHandlers.length; ++i) { if (JSEvents.eventHandlers[i].target == eventHandler.target && JSEvents.eventHandlers[i].eventTypeString == eventHandler.eventTypeString) { JSEvents._removeHandler(i--); } } } },getNodeNameForTarget:function(target) { if (!target) return ''; if (target == window) return '#window'; if (target == screen) return '#screen'; return (target && target.nodeName) ? target.nodeName : ''; },fullscreenEnabled:function() { return document.fullscreenEnabled // Safari 13.0.3 on macOS Catalina 10.15.1 still ships with prefixed webkitFullscreenEnabled. // TODO: If Safari at some point ships with unprefixed version, update the version check above. || document.webkitFullscreenEnabled ; }}; var __currentFullscreenStrategy={}; function maybeCStringToJsString(cString) { // "cString > 2" checks if the input is a number, and isn't of the special // values we accept here, EMSCRIPTEN_EVENT_TARGET_* (which map to 0, 1, 2). // In other words, if cString > 2 then it's a pointer to a valid place in // memory, and points to a C string. return cString > 2 ? UTF8ToString(cString) : cString; } var specialHTMLTargets=[0, typeof document !== 'undefined' ? document : 0, typeof window !== 'undefined' ? window : 0]; function findEventTarget(target) { target = maybeCStringToJsString(target); var domElement = specialHTMLTargets[target] || (typeof document !== 'undefined' ? document.querySelector(target) : undefined); return domElement; } function findCanvasEventTarget(target) { return findEventTarget(target); } function _emscripten_get_canvas_element_size(target, width, height) { var canvas = findCanvasEventTarget(target); if (!canvas) return -4; HEAP32[((width)>>2)]=canvas.width; HEAP32[((height)>>2)]=canvas.height; } function __get_canvas_element_size(target) { var stackTop = stackSave(); var w = stackAlloc(8); var h = w + 4; var targetInt = stackAlloc(target.id.length+1); stringToUTF8(target.id, targetInt, target.id.length+1); var ret = _emscripten_get_canvas_element_size(targetInt, w, h); var size = [HEAP32[((w)>>2)], HEAP32[((h)>>2)]]; stackRestore(stackTop); return size; } function _emscripten_set_canvas_element_size(target, width, height) { var canvas = findCanvasEventTarget(target); if (!canvas) return -4; canvas.width = width; canvas.height = height; return 0; } function __set_canvas_element_size(target, width, height) { if (!target.controlTransferredOffscreen) { target.width = width; target.height = height; } else { // This function is being called from high-level JavaScript code instead of asm.js/Wasm, // and it needs to synchronously proxy over to another thread, so marshal the string onto the heap to do the call. var stackTop = stackSave(); var targetInt = stackAlloc(target.id.length+1); stringToUTF8(target.id, targetInt, target.id.length+1); _emscripten_set_canvas_element_size(targetInt, width, height); stackRestore(stackTop); } } function __registerRestoreOldStyle(canvas) { var canvasSize = __get_canvas_element_size(canvas); var oldWidth = canvasSize[0]; var oldHeight = canvasSize[1]; var oldCssWidth = canvas.style.width; var oldCssHeight = canvas.style.height; var oldBackgroundColor = canvas.style.backgroundColor; // Chrome reads color from here. var oldDocumentBackgroundColor = document.body.style.backgroundColor; // IE11 reads color from here. // Firefox always has black background color. var oldPaddingLeft = canvas.style.paddingLeft; // Chrome, FF, Safari var oldPaddingRight = canvas.style.paddingRight; var oldPaddingTop = canvas.style.paddingTop; var oldPaddingBottom = canvas.style.paddingBottom; var oldMarginLeft = canvas.style.marginLeft; // IE11 var oldMarginRight = canvas.style.marginRight; var oldMarginTop = canvas.style.marginTop; var oldMarginBottom = canvas.style.marginBottom; var oldDocumentBodyMargin = document.body.style.margin; var oldDocumentOverflow = document.documentElement.style.overflow; // Chrome, Firefox var oldDocumentScroll = document.body.scroll; // IE var oldImageRendering = canvas.style.imageRendering; function restoreOldStyle() { var fullscreenElement = document.fullscreenElement || document.webkitFullscreenElement || document.msFullscreenElement ; if (!fullscreenElement) { document.removeEventListener('fullscreenchange', restoreOldStyle); // Unprefixed Fullscreen API shipped in Chromium 71 (https://bugs.chromium.org/p/chromium/issues/detail?id=383813) // As of Safari 13.0.3 on macOS Catalina 10.15.1 still ships with prefixed webkitfullscreenchange. TODO: revisit this check once Safari ships unprefixed version. document.removeEventListener('webkitfullscreenchange', restoreOldStyle); __set_canvas_element_size(canvas, oldWidth, oldHeight); canvas.style.width = oldCssWidth; canvas.style.height = oldCssHeight; canvas.style.backgroundColor = oldBackgroundColor; // Chrome // IE11 hack: assigning 'undefined' or an empty string to document.body.style.backgroundColor has no effect, so first assign back the default color // before setting the undefined value. Setting undefined value is also important, or otherwise we would later treat that as something that the user // had explicitly set so subsequent fullscreen transitions would not set background color properly. if (!oldDocumentBackgroundColor) document.body.style.backgroundColor = 'white'; document.body.style.backgroundColor = oldDocumentBackgroundColor; // IE11 canvas.style.paddingLeft = oldPaddingLeft; // Chrome, FF, Safari canvas.style.paddingRight = oldPaddingRight; canvas.style.paddingTop = oldPaddingTop; canvas.style.paddingBottom = oldPaddingBottom; canvas.style.marginLeft = oldMarginLeft; // IE11 canvas.style.marginRight = oldMarginRight; canvas.style.marginTop = oldMarginTop; canvas.style.marginBottom = oldMarginBottom; document.body.style.margin = oldDocumentBodyMargin; document.documentElement.style.overflow = oldDocumentOverflow; // Chrome, Firefox document.body.scroll = oldDocumentScroll; // IE canvas.style.imageRendering = oldImageRendering; if (canvas.GLctxObject) canvas.GLctxObject.GLctx.viewport(0, 0, oldWidth, oldHeight); if (__currentFullscreenStrategy.canvasResizedCallback) { wasmTable.get(__currentFullscreenStrategy.canvasResizedCallback)(37, 0, __currentFullscreenStrategy.canvasResizedCallbackUserData); } } } document.addEventListener('fullscreenchange', restoreOldStyle); // Unprefixed Fullscreen API shipped in Chromium 71 (https://bugs.chromium.org/p/chromium/issues/detail?id=383813) // As of Safari 13.0.3 on macOS Catalina 10.15.1 still ships with prefixed webkitfullscreenchange. TODO: revisit this check once Safari ships unprefixed version. document.addEventListener('webkitfullscreenchange', restoreOldStyle); return restoreOldStyle; } function __setLetterbox(element, topBottom, leftRight) { // Cannot use margin to specify letterboxes in FF or Chrome, since those ignore margins in fullscreen mode. element.style.paddingLeft = element.style.paddingRight = leftRight + 'px'; element.style.paddingTop = element.style.paddingBottom = topBottom + 'px'; } function __getBoundingClientRect(e) { return specialHTMLTargets.indexOf(e) < 0 ? e.getBoundingClientRect() : {'left':0,'top':0}; } function _JSEvents_resizeCanvasForFullscreen(target, strategy) { var restoreOldStyle = __registerRestoreOldStyle(target); var cssWidth = strategy.softFullscreen ? innerWidth : screen.width; var cssHeight = strategy.softFullscreen ? innerHeight : screen.height; var rect = __getBoundingClientRect(target); var windowedCssWidth = rect.width; var windowedCssHeight = rect.height; var canvasSize = __get_canvas_element_size(target); var windowedRttWidth = canvasSize[0]; var windowedRttHeight = canvasSize[1]; if (strategy.scaleMode == 3) { __setLetterbox(target, (cssHeight - windowedCssHeight) / 2, (cssWidth - windowedCssWidth) / 2); cssWidth = windowedCssWidth; cssHeight = windowedCssHeight; } else if (strategy.scaleMode == 2) { if (cssWidth*windowedRttHeight < windowedRttWidth*cssHeight) { var desiredCssHeight = windowedRttHeight * cssWidth / windowedRttWidth; __setLetterbox(target, (cssHeight - desiredCssHeight) / 2, 0); cssHeight = desiredCssHeight; } else { var desiredCssWidth = windowedRttWidth * cssHeight / windowedRttHeight; __setLetterbox(target, 0, (cssWidth - desiredCssWidth) / 2); cssWidth = desiredCssWidth; } } // If we are adding padding, must choose a background color or otherwise Chrome will give the // padding a default white color. Do it only if user has not customized their own background color. if (!target.style.backgroundColor) target.style.backgroundColor = 'black'; // IE11 does the same, but requires the color to be set in the document body. if (!document.body.style.backgroundColor) document.body.style.backgroundColor = 'black'; // IE11 // Firefox always shows black letterboxes independent of style color. target.style.width = cssWidth + 'px'; target.style.height = cssHeight + 'px'; if (strategy.filteringMode == 1) { target.style.imageRendering = 'optimizeSpeed'; target.style.imageRendering = '-moz-crisp-edges'; target.style.imageRendering = '-o-crisp-edges'; target.style.imageRendering = '-webkit-optimize-contrast'; target.style.imageRendering = 'optimize-contrast'; target.style.imageRendering = 'crisp-edges'; target.style.imageRendering = 'pixelated'; } var dpiScale = (strategy.canvasResolutionScaleMode == 2) ? devicePixelRatio : 1; if (strategy.canvasResolutionScaleMode != 0) { var newWidth = (cssWidth * dpiScale)|0; var newHeight = (cssHeight * dpiScale)|0; __set_canvas_element_size(target, newWidth, newHeight); if (target.GLctxObject) target.GLctxObject.GLctx.viewport(0, 0, newWidth, newHeight); } return restoreOldStyle; } function _JSEvents_requestFullscreen(target, strategy) { // EMSCRIPTEN_FULLSCREEN_SCALE_DEFAULT + EMSCRIPTEN_FULLSCREEN_CANVAS_SCALE_NONE is a mode where no extra logic is performed to the DOM elements. if (strategy.scaleMode != 0 || strategy.canvasResolutionScaleMode != 0) { _JSEvents_resizeCanvasForFullscreen(target, strategy); } if (target.requestFullscreen) { target.requestFullscreen(); } else if (target.webkitRequestFullscreen) { target.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); } else { return JSEvents.fullscreenEnabled() ? -3 : -1; } __currentFullscreenStrategy = strategy; if (strategy.canvasResizedCallback) { wasmTable.get(strategy.canvasResizedCallback)(37, 0, strategy.canvasResizedCallbackUserData); } return 0; } function _emscripten_exit_fullscreen() { if (!JSEvents.fullscreenEnabled()) return -1; // Make sure no queued up calls will fire after this. JSEvents.removeDeferredCalls(_JSEvents_requestFullscreen); var d = specialHTMLTargets[1]; if (d.exitFullscreen) { d.fullscreenElement && d.exitFullscreen(); } else if (d.webkitExitFullscreen) { d.webkitFullscreenElement && d.webkitExitFullscreen(); } else { return -1; } return 0; } function __requestPointerLock(target) { if (target.requestPointerLock) { target.requestPointerLock(); } else if (target.msRequestPointerLock) { target.msRequestPointerLock(); } else { // document.body is known to accept pointer lock, so use that to differentiate if the user passed a bad element, // or if the whole browser just doesn't support the feature. if (document.body.requestPointerLock || document.body.msRequestPointerLock ) { return -3; } else { return -1; } } return 0; } function _emscripten_exit_pointerlock() { // Make sure no queued up calls will fire after this. JSEvents.removeDeferredCalls(__requestPointerLock); if (document.exitPointerLock) { document.exitPointerLock(); } else if (document.msExitPointerLock) { document.msExitPointerLock(); } else { return -1; } return 0; } function _emscripten_get_device_pixel_ratio() { return (typeof devicePixelRatio === 'number' && devicePixelRatio) || 1.0; } function _emscripten_get_element_css_size(target, width, height) { target = findEventTarget(target); if (!target) return -4; var rect = __getBoundingClientRect(target); HEAPF64[((width)>>3)]=rect.width; HEAPF64[((height)>>3)]=rect.height; return 0; } function __fillGamepadEventData(eventStruct, e) { HEAPF64[((eventStruct)>>3)]=e.timestamp; for(var i = 0; i < e.axes.length; ++i) { HEAPF64[(((eventStruct+i*8)+(16))>>3)]=e.axes[i]; } for(var i = 0; i < e.buttons.length; ++i) { if (typeof(e.buttons[i]) === 'object') { HEAPF64[(((eventStruct+i*8)+(528))>>3)]=e.buttons[i].value; } else { HEAPF64[(((eventStruct+i*8)+(528))>>3)]=e.buttons[i]; } } for(var i = 0; i < e.buttons.length; ++i) { if (typeof(e.buttons[i]) === 'object') { HEAP32[(((eventStruct+i*4)+(1040))>>2)]=e.buttons[i].pressed; } else { // Assigning a boolean to HEAP32, that's ok, but Closure would like to warn about it: /** @suppress {checkTypes} */ HEAP32[(((eventStruct+i*4)+(1040))>>2)]=e.buttons[i] == 1; } } HEAP32[(((eventStruct)+(1296))>>2)]=e.connected; HEAP32[(((eventStruct)+(1300))>>2)]=e.index; HEAP32[(((eventStruct)+(8))>>2)]=e.axes.length; HEAP32[(((eventStruct)+(12))>>2)]=e.buttons.length; stringToUTF8(e.id, eventStruct + 1304, 64); stringToUTF8(e.mapping, eventStruct + 1368, 64); } function _emscripten_get_gamepad_status(index, gamepadState) { if (!JSEvents.lastGamepadState) throw 'emscripten_get_gamepad_status() can only be called after having first called emscripten_sample_gamepad_data() and that function has returned EMSCRIPTEN_RESULT_SUCCESS!'; // INVALID_PARAM is returned on a Gamepad index that never was there. if (index < 0 || index >= JSEvents.lastGamepadState.length) return -5; // NO_DATA is returned on a Gamepad index that was removed. // For previously disconnected gamepads there should be an empty slot (null/undefined/false) at the index. // This is because gamepads must keep their original position in the array. // For example, removing the first of two gamepads produces [null/undefined/false, gamepad]. if (!JSEvents.lastGamepadState[index]) return -7; __fillGamepadEventData(gamepadState, JSEvents.lastGamepadState[index]); return 0; } function _emscripten_get_num_gamepads() { if (!JSEvents.lastGamepadState) throw 'emscripten_get_num_gamepads() can only be called after having first called emscripten_sample_gamepad_data() and that function has returned EMSCRIPTEN_RESULT_SUCCESS!'; // N.B. Do not call emscripten_get_num_gamepads() unless having first called emscripten_sample_gamepad_data(), and that has returned EMSCRIPTEN_RESULT_SUCCESS. // Otherwise the following line will throw an exception. return JSEvents.lastGamepadState.length; } function _emscripten_get_preloaded_image_data(path, w, h) { if ((path | 0) === path) path = UTF8ToString(path); path = PATH_FS.resolve(path); var canvas = Module["preloadedImages"][path]; if (canvas) { var ctx = canvas.getContext("2d"); var image = ctx.getImageData(0, 0, canvas.width, canvas.height); var buf = _malloc(canvas.width * canvas.height * 4); HEAPU8.set(image.data, buf); HEAP32[((w)>>2)]=canvas.width; HEAP32[((h)>>2)]=canvas.height; return buf; } return 0; } function _emscripten_get_preloaded_image_data_from_FILE(file, w, h) { var fd = Module['_fileno'](file); var stream = FS.getStream(fd); if (stream) { return _emscripten_get_preloaded_image_data(stream.path, w, h); } return 0; } function _emscripten_glActiveTexture(x0) { GLctx['activeTexture'](x0) } function _emscripten_glAttachShader(program, shader) { GLctx.attachShader(GL.programs[program], GL.shaders[shader]); } function _emscripten_glBeginQuery(target, id) { GLctx['beginQuery'](target, GL.queries[id]); } function _emscripten_glBeginQueryEXT(target, id) { GLctx.disjointTimerQueryExt['beginQueryEXT'](target, GL.timerQueriesEXT[id]); } function _emscripten_glBeginTransformFeedback(x0) { GLctx['beginTransformFeedback'](x0) } function _emscripten_glBindAttribLocation(program, index, name) { GLctx.bindAttribLocation(GL.programs[program], index, UTF8ToString(name)); } function _emscripten_glBindBuffer(target, buffer) { if (target == 0x88EB /*GL_PIXEL_PACK_BUFFER*/) { // In WebGL 2 glReadPixels entry point, we need to use a different WebGL 2 API function call when a buffer is bound to // GL_PIXEL_PACK_BUFFER_BINDING point, so must keep track whether that binding point is non-null to know what is // the proper API function to call. GLctx.currentPixelPackBufferBinding = buffer; } else if (target == 0x88EC /*GL_PIXEL_UNPACK_BUFFER*/) { // In WebGL 2 gl(Compressed)Tex(Sub)Image[23]D entry points, we need to // use a different WebGL 2 API function call when a buffer is bound to // GL_PIXEL_UNPACK_BUFFER_BINDING point, so must keep track whether that // binding point is non-null to know what is the proper API function to // call. GLctx.currentPixelUnpackBufferBinding = buffer; } GLctx.bindBuffer(target, GL.buffers[buffer]); } function _emscripten_glBindBufferBase(target, index, buffer) { GLctx['bindBufferBase'](target, index, GL.buffers[buffer]); } function _emscripten_glBindBufferRange(target, index, buffer, offset, ptrsize) { GLctx['bindBufferRange'](target, index, GL.buffers[buffer], offset, ptrsize); } function _emscripten_glBindFramebuffer(target, framebuffer) { GLctx.bindFramebuffer(target, GL.framebuffers[framebuffer]); } function _emscripten_glBindRenderbuffer(target, renderbuffer) { GLctx.bindRenderbuffer(target, GL.renderbuffers[renderbuffer]); } function _emscripten_glBindSampler(unit, sampler) { GLctx['bindSampler'](unit, GL.samplers[sampler]); } function _emscripten_glBindTexture(target, texture) { GLctx.bindTexture(target, GL.textures[texture]); } function _emscripten_glBindTransformFeedback(target, id) { GLctx['bindTransformFeedback'](target, GL.transformFeedbacks[id]); } function _emscripten_glBindVertexArray(vao) { GLctx['bindVertexArray'](GL.vaos[vao]); } function _emscripten_glBindVertexArrayOES(vao) { GLctx['bindVertexArray'](GL.vaos[vao]); } function _emscripten_glBlendColor(x0, x1, x2, x3) { GLctx['blendColor'](x0, x1, x2, x3) } function _emscripten_glBlendEquation(x0) { GLctx['blendEquation'](x0) } function _emscripten_glBlendEquationSeparate(x0, x1) { GLctx['blendEquationSeparate'](x0, x1) } function _emscripten_glBlendFunc(x0, x1) { GLctx['blendFunc'](x0, x1) } function _emscripten_glBlendFuncSeparate(x0, x1, x2, x3) { GLctx['blendFuncSeparate'](x0, x1, x2, x3) } function _emscripten_glBlitFramebuffer(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) { GLctx['blitFramebuffer'](x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) } function _emscripten_glBufferData(target, size, data, usage) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. if (data) { GLctx.bufferData(target, HEAPU8, usage, data, size); } else { GLctx.bufferData(target, size, usage); } } else { // N.b. here first form specifies a heap subarray, second form an integer size, so the ?: code here is polymorphic. It is advised to avoid // randomly mixing both uses in calling code, to avoid any potential JS engine JIT issues. GLctx.bufferData(target, data ? HEAPU8.subarray(data, data+size) : size, usage); } } function _emscripten_glBufferSubData(target, offset, size, data) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. GLctx.bufferSubData(target, offset, HEAPU8, data, size); return; } GLctx.bufferSubData(target, offset, HEAPU8.subarray(data, data+size)); } function _emscripten_glCheckFramebufferStatus(x0) { return GLctx['checkFramebufferStatus'](x0) } function _emscripten_glClear(x0) { GLctx['clear'](x0) } function _emscripten_glClearBufferfi(x0, x1, x2, x3) { GLctx['clearBufferfi'](x0, x1, x2, x3) } function _emscripten_glClearBufferfv(buffer, drawbuffer, value) { GLctx['clearBufferfv'](buffer, drawbuffer, HEAPF32, value>>2); } function _emscripten_glClearBufferiv(buffer, drawbuffer, value) { GLctx['clearBufferiv'](buffer, drawbuffer, HEAP32, value>>2); } function _emscripten_glClearBufferuiv(buffer, drawbuffer, value) { GLctx['clearBufferuiv'](buffer, drawbuffer, HEAPU32, value>>2); } function _emscripten_glClearColor(x0, x1, x2, x3) { GLctx['clearColor'](x0, x1, x2, x3) } function _emscripten_glClearDepthf(x0) { GLctx['clearDepth'](x0) } function _emscripten_glClearStencil(x0) { GLctx['clearStencil'](x0) } function convertI32PairToI53(lo, hi) { // This function should not be getting called with too large unsigned numbers // in high part (if hi >= 0x7FFFFFFFF, one should have been calling // convertU32PairToI53()) assert(hi === (hi|0)); return (lo >>> 0) + hi * 4294967296; } function _emscripten_glClientWaitSync(sync, flags, timeoutLo, timeoutHi) { // WebGL2 vs GLES3 differences: in GLES3, the timeout parameter is a uint64, where 0xFFFFFFFFFFFFFFFFULL means GL_TIMEOUT_IGNORED. // In JS, there's no 64-bit value types, so instead timeout is taken to be signed, and GL_TIMEOUT_IGNORED is given value -1. // Inherently the value accepted in the timeout is lossy, and can't take in arbitrary u64 bit pattern (but most likely doesn't matter) // See https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.15 return GLctx.clientWaitSync(GL.syncs[sync], flags, convertI32PairToI53(timeoutLo, timeoutHi)); } function _emscripten_glColorMask(red, green, blue, alpha) { GLctx.colorMask(!!red, !!green, !!blue, !!alpha); } function _emscripten_glCompileShader(shader) { GLctx.compileShader(GL.shaders[shader]); } function _emscripten_glCompressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. if (GLctx.currentPixelUnpackBufferBinding) { GLctx['compressedTexImage2D'](target, level, internalFormat, width, height, border, imageSize, data); } else { GLctx['compressedTexImage2D'](target, level, internalFormat, width, height, border, HEAPU8, data, imageSize); } return; } GLctx['compressedTexImage2D'](target, level, internalFormat, width, height, border, data ? HEAPU8.subarray((data),(data+imageSize)) : null); } function _emscripten_glCompressedTexImage3D(target, level, internalFormat, width, height, depth, border, imageSize, data) { if (GLctx.currentPixelUnpackBufferBinding) { GLctx['compressedTexImage3D'](target, level, internalFormat, width, height, depth, border, imageSize, data); } else { GLctx['compressedTexImage3D'](target, level, internalFormat, width, height, depth, border, HEAPU8, data, imageSize); } } function _emscripten_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. if (GLctx.currentPixelUnpackBufferBinding) { GLctx['compressedTexSubImage2D'](target, level, xoffset, yoffset, width, height, format, imageSize, data); } else { GLctx['compressedTexSubImage2D'](target, level, xoffset, yoffset, width, height, format, HEAPU8, data, imageSize); } return; } GLctx['compressedTexSubImage2D'](target, level, xoffset, yoffset, width, height, format, data ? HEAPU8.subarray((data),(data+imageSize)) : null); } function _emscripten_glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data) { if (GLctx.currentPixelUnpackBufferBinding) { GLctx['compressedTexSubImage3D'](target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); } else { GLctx['compressedTexSubImage3D'](target, level, xoffset, yoffset, zoffset, width, height, depth, format, HEAPU8, data, imageSize); } } function _emscripten_glCopyBufferSubData(x0, x1, x2, x3, x4) { GLctx['copyBufferSubData'](x0, x1, x2, x3, x4) } function _emscripten_glCopyTexImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { GLctx['copyTexImage2D'](x0, x1, x2, x3, x4, x5, x6, x7) } function _emscripten_glCopyTexSubImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { GLctx['copyTexSubImage2D'](x0, x1, x2, x3, x4, x5, x6, x7) } function _emscripten_glCopyTexSubImage3D(x0, x1, x2, x3, x4, x5, x6, x7, x8) { GLctx['copyTexSubImage3D'](x0, x1, x2, x3, x4, x5, x6, x7, x8) } function _emscripten_glCreateProgram() { var id = GL.getNewId(GL.programs); var program = GLctx.createProgram(); program.name = id; GL.programs[id] = program; return id; } function _emscripten_glCreateShader(shaderType) { var id = GL.getNewId(GL.shaders); GL.shaders[id] = GLctx.createShader(shaderType); return id; } function _emscripten_glCullFace(x0) { GLctx['cullFace'](x0) } function _emscripten_glDeleteBuffers(n, buffers) { for (var i = 0; i < n; i++) { var id = HEAP32[(((buffers)+(i*4))>>2)]; var buffer = GL.buffers[id]; // From spec: "glDeleteBuffers silently ignores 0's and names that do not // correspond to existing buffer objects." if (!buffer) continue; GLctx.deleteBuffer(buffer); buffer.name = 0; GL.buffers[id] = null; if (id == GLctx.currentPixelPackBufferBinding) GLctx.currentPixelPackBufferBinding = 0; if (id == GLctx.currentPixelUnpackBufferBinding) GLctx.currentPixelUnpackBufferBinding = 0; } } function _emscripten_glDeleteFramebuffers(n, framebuffers) { for (var i = 0; i < n; ++i) { var id = HEAP32[(((framebuffers)+(i*4))>>2)]; var framebuffer = GL.framebuffers[id]; if (!framebuffer) continue; // GL spec: "glDeleteFramebuffers silently ignores 0s and names that do not correspond to existing framebuffer objects". GLctx.deleteFramebuffer(framebuffer); framebuffer.name = 0; GL.framebuffers[id] = null; } } function _emscripten_glDeleteProgram(id) { if (!id) return; var program = GL.programs[id]; if (!program) { // glDeleteProgram actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } GLctx.deleteProgram(program); program.name = 0; GL.programs[id] = null; GL.programInfos[id] = null; } function _emscripten_glDeleteQueries(n, ids) { for (var i = 0; i < n; i++) { var id = HEAP32[(((ids)+(i*4))>>2)]; var query = GL.queries[id]; if (!query) continue; // GL spec: "unused names in ids are ignored, as is the name zero." GLctx['deleteQuery'](query); GL.queries[id] = null; } } function _emscripten_glDeleteQueriesEXT(n, ids) { for (var i = 0; i < n; i++) { var id = HEAP32[(((ids)+(i*4))>>2)]; var query = GL.timerQueriesEXT[id]; if (!query) continue; // GL spec: "unused names in ids are ignored, as is the name zero." GLctx.disjointTimerQueryExt['deleteQueryEXT'](query); GL.timerQueriesEXT[id] = null; } } function _emscripten_glDeleteRenderbuffers(n, renderbuffers) { for (var i = 0; i < n; i++) { var id = HEAP32[(((renderbuffers)+(i*4))>>2)]; var renderbuffer = GL.renderbuffers[id]; if (!renderbuffer) continue; // GL spec: "glDeleteRenderbuffers silently ignores 0s and names that do not correspond to existing renderbuffer objects". GLctx.deleteRenderbuffer(renderbuffer); renderbuffer.name = 0; GL.renderbuffers[id] = null; } } function _emscripten_glDeleteSamplers(n, samplers) { for (var i = 0; i < n; i++) { var id = HEAP32[(((samplers)+(i*4))>>2)]; var sampler = GL.samplers[id]; if (!sampler) continue; GLctx['deleteSampler'](sampler); sampler.name = 0; GL.samplers[id] = null; } } function _emscripten_glDeleteShader(id) { if (!id) return; var shader = GL.shaders[id]; if (!shader) { // glDeleteShader actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } GLctx.deleteShader(shader); GL.shaders[id] = null; } function _emscripten_glDeleteSync(id) { if (!id) return; var sync = GL.syncs[id]; if (!sync) { // glDeleteSync signals an error when deleting a nonexisting object, unlike some other GL delete functions. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } GLctx.deleteSync(sync); sync.name = 0; GL.syncs[id] = null; } function _emscripten_glDeleteTextures(n, textures) { for (var i = 0; i < n; i++) { var id = HEAP32[(((textures)+(i*4))>>2)]; var texture = GL.textures[id]; if (!texture) continue; // GL spec: "glDeleteTextures silently ignores 0s and names that do not correspond to existing textures". GLctx.deleteTexture(texture); texture.name = 0; GL.textures[id] = null; } } function _emscripten_glDeleteTransformFeedbacks(n, ids) { for (var i = 0; i < n; i++) { var id = HEAP32[(((ids)+(i*4))>>2)]; var transformFeedback = GL.transformFeedbacks[id]; if (!transformFeedback) continue; // GL spec: "unused names in ids are ignored, as is the name zero." GLctx['deleteTransformFeedback'](transformFeedback); transformFeedback.name = 0; GL.transformFeedbacks[id] = null; } } function _emscripten_glDeleteVertexArrays(n, vaos) { for (var i = 0; i < n; i++) { var id = HEAP32[(((vaos)+(i*4))>>2)]; GLctx['deleteVertexArray'](GL.vaos[id]); GL.vaos[id] = null; } } function _emscripten_glDeleteVertexArraysOES(n, vaos) { for (var i = 0; i < n; i++) { var id = HEAP32[(((vaos)+(i*4))>>2)]; GLctx['deleteVertexArray'](GL.vaos[id]); GL.vaos[id] = null; } } function _emscripten_glDepthFunc(x0) { GLctx['depthFunc'](x0) } function _emscripten_glDepthMask(flag) { GLctx.depthMask(!!flag); } function _emscripten_glDepthRangef(x0, x1) { GLctx['depthRange'](x0, x1) } function _emscripten_glDetachShader(program, shader) { GLctx.detachShader(GL.programs[program], GL.shaders[shader]); } function _emscripten_glDisable(x0) { GLctx['disable'](x0) } function _emscripten_glDisableVertexAttribArray(index) { GLctx.disableVertexAttribArray(index); } function _emscripten_glDrawArrays(mode, first, count) { GLctx.drawArrays(mode, first, count); } function _emscripten_glDrawArraysInstanced(mode, first, count, primcount) { GLctx['drawArraysInstanced'](mode, first, count, primcount); } function _emscripten_glDrawArraysInstancedANGLE(mode, first, count, primcount) { GLctx['drawArraysInstanced'](mode, first, count, primcount); } function _emscripten_glDrawArraysInstancedARB(mode, first, count, primcount) { GLctx['drawArraysInstanced'](mode, first, count, primcount); } function _emscripten_glDrawArraysInstancedEXT(mode, first, count, primcount) { GLctx['drawArraysInstanced'](mode, first, count, primcount); } function _emscripten_glDrawArraysInstancedNV(mode, first, count, primcount) { GLctx['drawArraysInstanced'](mode, first, count, primcount); } var tempFixedLengthArray=[]; function _emscripten_glDrawBuffers(n, bufs) { var bufArray = tempFixedLengthArray[n]; for (var i = 0; i < n; i++) { bufArray[i] = HEAP32[(((bufs)+(i*4))>>2)]; } GLctx['drawBuffers'](bufArray); } function _emscripten_glDrawBuffersEXT(n, bufs) { var bufArray = tempFixedLengthArray[n]; for (var i = 0; i < n; i++) { bufArray[i] = HEAP32[(((bufs)+(i*4))>>2)]; } GLctx['drawBuffers'](bufArray); } function _emscripten_glDrawBuffersWEBGL(n, bufs) { var bufArray = tempFixedLengthArray[n]; for (var i = 0; i < n; i++) { bufArray[i] = HEAP32[(((bufs)+(i*4))>>2)]; } GLctx['drawBuffers'](bufArray); } function _emscripten_glDrawElements(mode, count, type, indices) { GLctx.drawElements(mode, count, type, indices); } function _emscripten_glDrawElementsInstanced(mode, count, type, indices, primcount) { GLctx['drawElementsInstanced'](mode, count, type, indices, primcount); } function _emscripten_glDrawElementsInstancedANGLE(mode, count, type, indices, primcount) { GLctx['drawElementsInstanced'](mode, count, type, indices, primcount); } function _emscripten_glDrawElementsInstancedARB(mode, count, type, indices, primcount) { GLctx['drawElementsInstanced'](mode, count, type, indices, primcount); } function _emscripten_glDrawElementsInstancedEXT(mode, count, type, indices, primcount) { GLctx['drawElementsInstanced'](mode, count, type, indices, primcount); } function _emscripten_glDrawElementsInstancedNV(mode, count, type, indices, primcount) { GLctx['drawElementsInstanced'](mode, count, type, indices, primcount); } function _glDrawElements(mode, count, type, indices) { GLctx.drawElements(mode, count, type, indices); } function _emscripten_glDrawRangeElements(mode, start, end, count, type, indices) { // TODO: This should be a trivial pass-though function registered at the bottom of this page as // glFuncs[6][1] += ' drawRangeElements'; // but due to https://bugzilla.mozilla.org/show_bug.cgi?id=1202427, // we work around by ignoring the range. _glDrawElements(mode, count, type, indices); } function _emscripten_glEnable(x0) { GLctx['enable'](x0) } function _emscripten_glEnableVertexAttribArray(index) { GLctx.enableVertexAttribArray(index); } function _emscripten_glEndQuery(x0) { GLctx['endQuery'](x0) } function _emscripten_glEndQueryEXT(target) { GLctx.disjointTimerQueryExt['endQueryEXT'](target); } function _emscripten_glEndTransformFeedback() { GLctx['endTransformFeedback']() } function _emscripten_glFenceSync(condition, flags) { var sync = GLctx.fenceSync(condition, flags); if (sync) { var id = GL.getNewId(GL.syncs); sync.name = id; GL.syncs[id] = sync; return id; } else { return 0; // Failed to create a sync object } } function _emscripten_glFinish() { GLctx['finish']() } function _emscripten_glFlush() { GLctx['flush']() } function _emscripten_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer) { GLctx.framebufferRenderbuffer(target, attachment, renderbuffertarget, GL.renderbuffers[renderbuffer]); } function _emscripten_glFramebufferTexture2D(target, attachment, textarget, texture, level) { GLctx.framebufferTexture2D(target, attachment, textarget, GL.textures[texture], level); } function _emscripten_glFramebufferTextureLayer(target, attachment, texture, level, layer) { GLctx.framebufferTextureLayer(target, attachment, GL.textures[texture], level, layer); } function _emscripten_glFrontFace(x0) { GLctx['frontFace'](x0) } function __glGenObject(n, buffers, createFunction, objectTable ) { for (var i = 0; i < n; i++) { var buffer = GLctx[createFunction](); var id = buffer && GL.getNewId(objectTable); if (buffer) { buffer.name = id; objectTable[id] = buffer; } else { GL.recordError(0x502 /* GL_INVALID_OPERATION */); } HEAP32[(((buffers)+(i*4))>>2)]=id; } } function _emscripten_glGenBuffers(n, buffers) { __glGenObject(n, buffers, 'createBuffer', GL.buffers ); } function _emscripten_glGenFramebuffers(n, ids) { __glGenObject(n, ids, 'createFramebuffer', GL.framebuffers ); } function _emscripten_glGenQueries(n, ids) { __glGenObject(n, ids, 'createQuery', GL.queries ); } function _emscripten_glGenQueriesEXT(n, ids) { for (var i = 0; i < n; i++) { var query = GLctx.disjointTimerQueryExt['createQueryEXT'](); if (!query) { GL.recordError(0x502 /* GL_INVALID_OPERATION */); while(i < n) HEAP32[(((ids)+(i++*4))>>2)]=0; return; } var id = GL.getNewId(GL.timerQueriesEXT); query.name = id; GL.timerQueriesEXT[id] = query; HEAP32[(((ids)+(i*4))>>2)]=id; } } function _emscripten_glGenRenderbuffers(n, renderbuffers) { __glGenObject(n, renderbuffers, 'createRenderbuffer', GL.renderbuffers ); } function _emscripten_glGenSamplers(n, samplers) { __glGenObject(n, samplers, 'createSampler', GL.samplers ); } function _emscripten_glGenTextures(n, textures) { __glGenObject(n, textures, 'createTexture', GL.textures ); } function _emscripten_glGenTransformFeedbacks(n, ids) { __glGenObject(n, ids, 'createTransformFeedback', GL.transformFeedbacks ); } function _emscripten_glGenVertexArrays(n, arrays) { __glGenObject(n, arrays, 'createVertexArray', GL.vaos ); } function _emscripten_glGenVertexArraysOES(n, arrays) { __glGenObject(n, arrays, 'createVertexArray', GL.vaos ); } function _emscripten_glGenerateMipmap(x0) { GLctx['generateMipmap'](x0) } function __glGetActiveAttribOrUniform(funcName, program, index, bufSize, length, size, type, name) { program = GL.programs[program]; var info = GLctx[funcName](program, index); if (info) { // If an error occurs, nothing will be written to length, size and type and name. var numBytesWrittenExclNull = name && stringToUTF8(info.name, name, bufSize); if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; if (size) HEAP32[((size)>>2)]=info.size; if (type) HEAP32[((type)>>2)]=info.type; } } function _emscripten_glGetActiveAttrib(program, index, bufSize, length, size, type, name) { __glGetActiveAttribOrUniform('getActiveAttrib', program, index, bufSize, length, size, type, name); } function _emscripten_glGetActiveUniform(program, index, bufSize, length, size, type, name) { __glGetActiveAttribOrUniform('getActiveUniform', program, index, bufSize, length, size, type, name); } function _emscripten_glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName) { program = GL.programs[program]; var result = GLctx['getActiveUniformBlockName'](program, uniformBlockIndex); if (!result) return; // If an error occurs, nothing will be written to uniformBlockName or length. if (uniformBlockName && bufSize > 0) { var numBytesWrittenExclNull = stringToUTF8(result, uniformBlockName, bufSize); if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; } else { if (length) HEAP32[((length)>>2)]=0; } } function _emscripten_glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params) { if (!params) { // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if params == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } program = GL.programs[program]; switch(pname) { case 0x8A41: /* GL_UNIFORM_BLOCK_NAME_LENGTH */ var name = GLctx['getActiveUniformBlockName'](program, uniformBlockIndex); HEAP32[((params)>>2)]=name.length+1; return; default: var result = GLctx['getActiveUniformBlockParameter'](program, uniformBlockIndex, pname); if (!result) return; // If an error occurs, nothing will be written to params. if (typeof result == 'number') { HEAP32[((params)>>2)]=result; } else { for (var i = 0; i < result.length; i++) { HEAP32[(((params)+(i*4))>>2)]=result[i]; } } } } function _emscripten_glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params) { if (!params) { // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if params == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } if (uniformCount > 0 && uniformIndices == 0) { GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } program = GL.programs[program]; var ids = []; for (var i = 0; i < uniformCount; i++) { ids.push(HEAP32[(((uniformIndices)+(i*4))>>2)]); } var result = GLctx['getActiveUniforms'](program, ids, pname); if (!result) return; // GL spec: If an error is generated, nothing is written out to params. var len = result.length; for (var i = 0; i < len; i++) { HEAP32[(((params)+(i*4))>>2)]=result[i]; } } function _emscripten_glGetAttachedShaders(program, maxCount, count, shaders) { var result = GLctx.getAttachedShaders(GL.programs[program]); var len = result.length; if (len > maxCount) { len = maxCount; } HEAP32[((count)>>2)]=len; for (var i = 0; i < len; ++i) { var id = GL.shaders.indexOf(result[i]); HEAP32[(((shaders)+(i*4))>>2)]=id; } } function _emscripten_glGetAttribLocation(program, name) { return GLctx.getAttribLocation(GL.programs[program], UTF8ToString(name)); } function readI53FromI64(ptr) { return HEAPU32[ptr>>2] + HEAP32[ptr+4>>2] * 4294967296; } function readI53FromU64(ptr) { return HEAPU32[ptr>>2] + HEAPU32[ptr+4>>2] * 4294967296; } function writeI53ToI64(ptr, num) { HEAPU32[ptr>>2] = num; HEAPU32[ptr+4>>2] = (num - HEAPU32[ptr>>2])/4294967296; var deserialized = (num >= 0) ? readI53FromU64(ptr) : readI53FromI64(ptr); if (deserialized != num) warnOnce('writeI53ToI64() out of range: serialized JS Number ' + num + ' to Wasm heap as bytes lo=0x' + HEAPU32[ptr>>2].toString(16) + ', hi=0x' + HEAPU32[ptr+4>>2].toString(16) + ', which deserializes back to ' + deserialized + ' instead!'); } function emscriptenWebGLGet(name_, p, type) { // Guard against user passing a null pointer. // Note that GLES2 spec does not say anything about how passing a null pointer should be treated. // Testing on desktop core GL 3, the application crashes on glGetIntegerv to a null pointer, but // better to report an error instead of doing anything random. if (!p) { GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } var ret = undefined; switch(name_) { // Handle a few trivial GLES values case 0x8DFA: // GL_SHADER_COMPILER ret = 1; break; case 0x8DF8: // GL_SHADER_BINARY_FORMATS if (type != 0 && type != 1) { GL.recordError(0x500); // GL_INVALID_ENUM } return; // Do not write anything to the out pointer, since no binary formats are supported. case 0x87FE: // GL_NUM_PROGRAM_BINARY_FORMATS case 0x8DF9: // GL_NUM_SHADER_BINARY_FORMATS ret = 0; break; case 0x86A2: // GL_NUM_COMPRESSED_TEXTURE_FORMATS // WebGL doesn't have GL_NUM_COMPRESSED_TEXTURE_FORMATS (it's obsolete since GL_COMPRESSED_TEXTURE_FORMATS returns a JS array that can be queried for length), // so implement it ourselves to allow C++ GLES2 code get the length. var formats = GLctx.getParameter(0x86A3 /*GL_COMPRESSED_TEXTURE_FORMATS*/); ret = formats ? formats.length : 0; break; case 0x821D: // GL_NUM_EXTENSIONS if (GL.currentContext.version < 2) { GL.recordError(0x502 /* GL_INVALID_OPERATION */); // Calling GLES3/WebGL2 function with a GLES2/WebGL1 context return; } // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. var exts = GLctx.getSupportedExtensions() || []; ret = 2 * exts.length; // each extension is duplicated, first in unprefixed WebGL form, and then a second time with "GL_" prefix. break; case 0x821B: // GL_MAJOR_VERSION case 0x821C: // GL_MINOR_VERSION if (GL.currentContext.version < 2) { GL.recordError(0x500); // GL_INVALID_ENUM return; } ret = name_ == 0x821B ? 3 : 0; // return version 3.0 break; } if (ret === undefined) { var result = GLctx.getParameter(name_); switch (typeof(result)) { case "number": ret = result; break; case "boolean": ret = result ? 1 : 0; break; case "string": GL.recordError(0x500); // GL_INVALID_ENUM return; case "object": if (result === null) { // null is a valid result for some (e.g., which buffer is bound - perhaps nothing is bound), but otherwise // can mean an invalid name_, which we need to report as an error switch(name_) { case 0x8894: // ARRAY_BUFFER_BINDING case 0x8B8D: // CURRENT_PROGRAM case 0x8895: // ELEMENT_ARRAY_BUFFER_BINDING case 0x8CA6: // FRAMEBUFFER_BINDING or DRAW_FRAMEBUFFER_BINDING case 0x8CA7: // RENDERBUFFER_BINDING case 0x8069: // TEXTURE_BINDING_2D case 0x85B5: // WebGL 2 GL_VERTEX_ARRAY_BINDING, or WebGL 1 extension OES_vertex_array_object GL_VERTEX_ARRAY_BINDING_OES case 0x8F36: // COPY_READ_BUFFER_BINDING or COPY_READ_BUFFER case 0x8F37: // COPY_WRITE_BUFFER_BINDING or COPY_WRITE_BUFFER case 0x88ED: // PIXEL_PACK_BUFFER_BINDING case 0x88EF: // PIXEL_UNPACK_BUFFER_BINDING case 0x8CAA: // READ_FRAMEBUFFER_BINDING case 0x8919: // SAMPLER_BINDING case 0x8C1D: // TEXTURE_BINDING_2D_ARRAY case 0x806A: // TEXTURE_BINDING_3D case 0x8E25: // TRANSFORM_FEEDBACK_BINDING case 0x8C8F: // TRANSFORM_FEEDBACK_BUFFER_BINDING case 0x8A28: // UNIFORM_BUFFER_BINDING case 0x8514: { // TEXTURE_BINDING_CUBE_MAP ret = 0; break; } default: { GL.recordError(0x500); // GL_INVALID_ENUM return; } } } else if (result instanceof Float32Array || result instanceof Uint32Array || result instanceof Int32Array || result instanceof Array) { for (var i = 0; i < result.length; ++i) { switch (type) { case 0: HEAP32[(((p)+(i*4))>>2)]=result[i]; break; case 2: HEAPF32[(((p)+(i*4))>>2)]=result[i]; break; case 4: HEAP8[(((p)+(i))>>0)]=result[i] ? 1 : 0; break; } } return; } else { try { ret = result.name | 0; } catch(e) { GL.recordError(0x500); // GL_INVALID_ENUM err('GL_INVALID_ENUM in glGet' + type + 'v: Unknown object returned from WebGL getParameter(' + name_ + ')! (error: ' + e + ')'); return; } } break; default: GL.recordError(0x500); // GL_INVALID_ENUM err('GL_INVALID_ENUM in glGet' + type + 'v: Native code calling glGet' + type + 'v(' + name_ + ') and it returns ' + result + ' of type ' + typeof(result) + '!'); return; } } switch (type) { case 1: writeI53ToI64(p, ret); break; case 0: HEAP32[((p)>>2)]=ret; break; case 2: HEAPF32[((p)>>2)]=ret; break; case 4: HEAP8[((p)>>0)]=ret ? 1 : 0; break; } } function _emscripten_glGetBooleanv(name_, p) { emscriptenWebGLGet(name_, p, 4); } function _emscripten_glGetBufferParameteri64v(target, value, data) { if (!data) { // GLES2 specification does not specify how to behave if data is a null pointer. Since calling this function does not make sense // if data == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } writeI53ToI64(data, GLctx.getBufferParameter(target, value)); } function _emscripten_glGetBufferParameteriv(target, value, data) { if (!data) { // GLES2 specification does not specify how to behave if data is a null pointer. Since calling this function does not make sense // if data == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } HEAP32[((data)>>2)]=GLctx.getBufferParameter(target, value); } function _emscripten_glGetError() { var error = GLctx.getError() || GL.lastError; GL.lastError = 0/*GL_NO_ERROR*/; return error; } function _emscripten_glGetFloatv(name_, p) { emscriptenWebGLGet(name_, p, 2); } function _emscripten_glGetFragDataLocation(program, name) { return GLctx['getFragDataLocation'](GL.programs[program], UTF8ToString(name)); } function _emscripten_glGetFramebufferAttachmentParameteriv(target, attachment, pname, params) { var result = GLctx.getFramebufferAttachmentParameter(target, attachment, pname); if (result instanceof WebGLRenderbuffer || result instanceof WebGLTexture) { result = result.name | 0; } HEAP32[((params)>>2)]=result; } function emscriptenWebGLGetIndexed(target, index, data, type) { if (!data) { // GLES2 specification does not specify how to behave if data is a null pointer. Since calling this function does not make sense // if data == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } var result = GLctx['getIndexedParameter'](target, index); var ret; switch (typeof result) { case 'boolean': ret = result ? 1 : 0; break; case 'number': ret = result; break; case 'object': if (result === null) { switch (target) { case 0x8C8F: // TRANSFORM_FEEDBACK_BUFFER_BINDING case 0x8A28: // UNIFORM_BUFFER_BINDING ret = 0; break; default: { GL.recordError(0x500); // GL_INVALID_ENUM return; } } } else if (result instanceof WebGLBuffer) { ret = result.name | 0; } else { GL.recordError(0x500); // GL_INVALID_ENUM return; } break; default: GL.recordError(0x500); // GL_INVALID_ENUM return; } switch (type) { case 1: writeI53ToI64(data, ret); break; case 0: HEAP32[((data)>>2)]=ret; break; case 2: HEAPF32[((data)>>2)]=ret; break; case 4: HEAP8[((data)>>0)]=ret ? 1 : 0; break; default: throw 'internal emscriptenWebGLGetIndexed() error, bad type: ' + type; } } function _emscripten_glGetInteger64i_v(target, index, data) { emscriptenWebGLGetIndexed(target, index, data, 1); } function _emscripten_glGetInteger64v(name_, p) { emscriptenWebGLGet(name_, p, 1); } function _emscripten_glGetIntegeri_v(target, index, data) { emscriptenWebGLGetIndexed(target, index, data, 0); } function _emscripten_glGetIntegerv(name_, p) { emscriptenWebGLGet(name_, p, 0); } function _emscripten_glGetInternalformativ(target, internalformat, pname, bufSize, params) { if (bufSize < 0) { GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } if (!params) { // GLES3 specification does not specify how to behave if values is a null pointer. Since calling this function does not make sense // if values == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } var ret = GLctx['getInternalformatParameter'](target, internalformat, pname); if (ret === null) return; for (var i = 0; i < ret.length && i < bufSize; ++i) { HEAP32[(((params)+(i))>>2)]=ret[i]; } } function _emscripten_glGetProgramBinary(program, bufSize, length, binaryFormat, binary) { GL.recordError(0x502/*GL_INVALID_OPERATION*/); } function _emscripten_glGetProgramInfoLog(program, maxLength, length, infoLog) { var log = GLctx.getProgramInfoLog(GL.programs[program]); if (log === null) log = '(unknown error)'; var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; } function _emscripten_glGetProgramiv(program, pname, p) { if (!p) { // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } if (program >= GL.counter) { GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } var ptable = GL.programInfos[program]; if (!ptable) { GL.recordError(0x502 /* GL_INVALID_OPERATION */); return; } if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH var log = GLctx.getProgramInfoLog(GL.programs[program]); if (log === null) log = '(unknown error)'; HEAP32[((p)>>2)]=log.length + 1; } else if (pname == 0x8B87 /* GL_ACTIVE_UNIFORM_MAX_LENGTH */) { HEAP32[((p)>>2)]=ptable.maxUniformLength; } else if (pname == 0x8B8A /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */) { if (ptable.maxAttributeLength == -1) { program = GL.programs[program]; var numAttribs = GLctx.getProgramParameter(program, 0x8B89/*GL_ACTIVE_ATTRIBUTES*/); ptable.maxAttributeLength = 0; // Spec says if there are no active attribs, 0 must be returned. for (var i = 0; i < numAttribs; ++i) { var activeAttrib = GLctx.getActiveAttrib(program, i); ptable.maxAttributeLength = Math.max(ptable.maxAttributeLength, activeAttrib.name.length+1); } } HEAP32[((p)>>2)]=ptable.maxAttributeLength; } else if (pname == 0x8A35 /* GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */) { if (ptable.maxUniformBlockNameLength == -1) { program = GL.programs[program]; var numBlocks = GLctx.getProgramParameter(program, 0x8A36/*GL_ACTIVE_UNIFORM_BLOCKS*/); ptable.maxUniformBlockNameLength = 0; for (var i = 0; i < numBlocks; ++i) { var activeBlockName = GLctx.getActiveUniformBlockName(program, i); ptable.maxUniformBlockNameLength = Math.max(ptable.maxUniformBlockNameLength, activeBlockName.length+1); } } HEAP32[((p)>>2)]=ptable.maxUniformBlockNameLength; } else { HEAP32[((p)>>2)]=GLctx.getProgramParameter(GL.programs[program], pname); } } function _emscripten_glGetQueryObjecti64vEXT(id, pname, params) { if (!params) { // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } var query = GL.timerQueriesEXT[id]; var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); var ret; if (typeof param == 'boolean') { ret = param ? 1 : 0; } else { ret = param; } writeI53ToI64(params, ret); } function _emscripten_glGetQueryObjectivEXT(id, pname, params) { if (!params) { // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } var query = GL.timerQueriesEXT[id]; var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); var ret; if (typeof param == 'boolean') { ret = param ? 1 : 0; } else { ret = param; } HEAP32[((params)>>2)]=ret; } function _emscripten_glGetQueryObjectui64vEXT(id, pname, params) { if (!params) { // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } var query = GL.timerQueriesEXT[id]; var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); var ret; if (typeof param == 'boolean') { ret = param ? 1 : 0; } else { ret = param; } writeI53ToI64(params, ret); } function _emscripten_glGetQueryObjectuiv(id, pname, params) { if (!params) { // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } var query = GL.queries[id]; var param = GLctx['getQueryParameter'](query, pname); var ret; if (typeof param == 'boolean') { ret = param ? 1 : 0; } else { ret = param; } HEAP32[((params)>>2)]=ret; } function _emscripten_glGetQueryObjectuivEXT(id, pname, params) { if (!params) { // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } var query = GL.timerQueriesEXT[id]; var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); var ret; if (typeof param == 'boolean') { ret = param ? 1 : 0; } else { ret = param; } HEAP32[((params)>>2)]=ret; } function _emscripten_glGetQueryiv(target, pname, params) { if (!params) { // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } HEAP32[((params)>>2)]=GLctx['getQuery'](target, pname); } function _emscripten_glGetQueryivEXT(target, pname, params) { if (!params) { // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } HEAP32[((params)>>2)]=GLctx.disjointTimerQueryExt['getQueryEXT'](target, pname); } function _emscripten_glGetRenderbufferParameteriv(target, pname, params) { if (!params) { // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if params == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } HEAP32[((params)>>2)]=GLctx.getRenderbufferParameter(target, pname); } function _emscripten_glGetSamplerParameterfv(sampler, pname, params) { if (!params) { // GLES3 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } sampler = GL.samplers[sampler]; HEAPF32[((params)>>2)]=GLctx['getSamplerParameter'](sampler, pname); } function _emscripten_glGetSamplerParameteriv(sampler, pname, params) { if (!params) { // GLES3 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } sampler = GL.samplers[sampler]; HEAP32[((params)>>2)]=GLctx['getSamplerParameter'](sampler, pname); } function _emscripten_glGetShaderInfoLog(shader, maxLength, length, infoLog) { var log = GLctx.getShaderInfoLog(GL.shaders[shader]); if (log === null) log = '(unknown error)'; var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; } function _emscripten_glGetShaderPrecisionFormat(shaderType, precisionType, range, precision) { var result = GLctx.getShaderPrecisionFormat(shaderType, precisionType); HEAP32[((range)>>2)]=result.rangeMin; HEAP32[(((range)+(4))>>2)]=result.rangeMax; HEAP32[((precision)>>2)]=result.precision; } function _emscripten_glGetShaderSource(shader, bufSize, length, source) { var result = GLctx.getShaderSource(GL.shaders[shader]); if (!result) return; // If an error occurs, nothing will be written to length or source. var numBytesWrittenExclNull = (bufSize > 0 && source) ? stringToUTF8(result, source, bufSize) : 0; if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; } function _emscripten_glGetShaderiv(shader, pname, p) { if (!p) { // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH var log = GLctx.getShaderInfoLog(GL.shaders[shader]); if (log === null) log = '(unknown error)'; // The GLES2 specification says that if the shader has an empty info log, // a value of 0 is returned. Otherwise the log has a null char appended. // (An empty string is falsey, so we can just check that instead of // looking at log.length.) var logLength = log ? log.length + 1 : 0; HEAP32[((p)>>2)]=logLength; } else if (pname == 0x8B88) { // GL_SHADER_SOURCE_LENGTH var source = GLctx.getShaderSource(GL.shaders[shader]); // source may be a null, or the empty string, both of which are falsey // values that we report a 0 length for. var sourceLength = source ? source.length + 1 : 0; HEAP32[((p)>>2)]=sourceLength; } else { HEAP32[((p)>>2)]=GLctx.getShaderParameter(GL.shaders[shader], pname); } } function stringToNewUTF8(jsString) { var length = lengthBytesUTF8(jsString)+1; var cString = _malloc(length); stringToUTF8(jsString, cString, length); return cString; } function _emscripten_glGetString(name_) { if (GL.stringCache[name_]) return GL.stringCache[name_]; var ret; switch(name_) { case 0x1F03 /* GL_EXTENSIONS */: var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. exts = exts.concat(exts.map(function(e) { return "GL_" + e; })); ret = stringToNewUTF8(exts.join(' ')); break; case 0x1F00 /* GL_VENDOR */: case 0x1F01 /* GL_RENDERER */: case 0x9245 /* UNMASKED_VENDOR_WEBGL */: case 0x9246 /* UNMASKED_RENDERER_WEBGL */: var s = GLctx.getParameter(name_); if (!s) { GL.recordError(0x500/*GL_INVALID_ENUM*/); } ret = stringToNewUTF8(s); break; case 0x1F02 /* GL_VERSION */: var glVersion = GLctx.getParameter(0x1F02 /*GL_VERSION*/); // return GLES version string corresponding to the version of the WebGL context if (GL.currentContext.version >= 2) glVersion = 'OpenGL ES 3.0 (' + glVersion + ')'; else { glVersion = 'OpenGL ES 2.0 (' + glVersion + ')'; } ret = stringToNewUTF8(glVersion); break; case 0x8B8C /* GL_SHADING_LANGUAGE_VERSION */: var glslVersion = GLctx.getParameter(0x8B8C /*GL_SHADING_LANGUAGE_VERSION*/); // extract the version number 'N.M' from the string 'WebGL GLSL ES N.M ...' var ver_re = /^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/; var ver_num = glslVersion.match(ver_re); if (ver_num !== null) { if (ver_num[1].length == 3) ver_num[1] = ver_num[1] + '0'; // ensure minor version has 2 digits glslVersion = 'OpenGL ES GLSL ES ' + ver_num[1] + ' (' + glslVersion + ')'; } ret = stringToNewUTF8(glslVersion); break; default: GL.recordError(0x500/*GL_INVALID_ENUM*/); return 0; } GL.stringCache[name_] = ret; return ret; } function _emscripten_glGetStringi(name, index) { if (GL.currentContext.version < 2) { GL.recordError(0x502 /* GL_INVALID_OPERATION */); // Calling GLES3/WebGL2 function with a GLES2/WebGL1 context return 0; } var stringiCache = GL.stringiCache[name]; if (stringiCache) { if (index < 0 || index >= stringiCache.length) { GL.recordError(0x501/*GL_INVALID_VALUE*/); return 0; } return stringiCache[index]; } switch(name) { case 0x1F03 /* GL_EXTENSIONS */: var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. exts = exts.concat(exts.map(function(e) { return "GL_" + e; })); exts = exts.map(function(e) { return stringToNewUTF8(e); }); stringiCache = GL.stringiCache[name] = exts; if (index < 0 || index >= stringiCache.length) { GL.recordError(0x501/*GL_INVALID_VALUE*/); return 0; } return stringiCache[index]; default: GL.recordError(0x500/*GL_INVALID_ENUM*/); return 0; } } function _emscripten_glGetSynciv(sync, pname, bufSize, length, values) { if (bufSize < 0) { // GLES3 specification does not specify how to behave if bufSize < 0, however in the spec wording for glGetInternalformativ, it does say that GL_INVALID_VALUE should be raised, // so raise GL_INVALID_VALUE here as well. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } if (!values) { // GLES3 specification does not specify how to behave if values is a null pointer. Since calling this function does not make sense // if values == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } var ret = GLctx.getSyncParameter(GL.syncs[sync], pname); HEAP32[((length)>>2)]=ret; if (ret !== null && length) HEAP32[((length)>>2)]=1; // Report a single value outputted. } function _emscripten_glGetTexParameterfv(target, pname, params) { if (!params) { // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } HEAPF32[((params)>>2)]=GLctx.getTexParameter(target, pname); } function _emscripten_glGetTexParameteriv(target, pname, params) { if (!params) { // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } HEAP32[((params)>>2)]=GLctx.getTexParameter(target, pname); } function _emscripten_glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name) { program = GL.programs[program]; var info = GLctx['getTransformFeedbackVarying'](program, index); if (!info) return; // If an error occurred, the return parameters length, size, type and name will be unmodified. if (name && bufSize > 0) { var numBytesWrittenExclNull = stringToUTF8(info.name, name, bufSize); if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; } else { if (length) HEAP32[((length)>>2)]=0; } if (size) HEAP32[((size)>>2)]=info.size; if (type) HEAP32[((type)>>2)]=info.type; } function _emscripten_glGetUniformBlockIndex(program, uniformBlockName) { return GLctx['getUniformBlockIndex'](GL.programs[program], UTF8ToString(uniformBlockName)); } function _emscripten_glGetUniformIndices(program, uniformCount, uniformNames, uniformIndices) { if (!uniformIndices) { // GLES2 specification does not specify how to behave if uniformIndices is a null pointer. Since calling this function does not make sense // if uniformIndices == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } if (uniformCount > 0 && (uniformNames == 0 || uniformIndices == 0)) { GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } program = GL.programs[program]; var names = []; for (var i = 0; i < uniformCount; i++) names.push(UTF8ToString(HEAP32[(((uniformNames)+(i*4))>>2)])); var result = GLctx['getUniformIndices'](program, names); if (!result) return; // GL spec: If an error is generated, nothing is written out to uniformIndices. var len = result.length; for (var i = 0; i < len; i++) { HEAP32[(((uniformIndices)+(i*4))>>2)]=result[i]; } } /** @suppress {checkTypes} */ function jstoi_q(str) { return parseInt(str); } function _emscripten_glGetUniformLocation(program, name) { name = UTF8ToString(name); var arrayIndex = 0; // If user passed an array accessor "[index]", parse the array index off the accessor. if (name[name.length - 1] == ']') { var leftBrace = name.lastIndexOf('['); arrayIndex = name[leftBrace+1] != ']' ? jstoi_q(name.slice(leftBrace + 1)) : 0; // "index]", parseInt will ignore the ']' at the end; but treat "foo[]" as "foo[0]" name = name.slice(0, leftBrace); } var uniformInfo = GL.programInfos[program] && GL.programInfos[program].uniforms[name]; // returns pair [ dimension_of_uniform_array, uniform_location ] if (uniformInfo && arrayIndex >= 0 && arrayIndex < uniformInfo[0]) { // Check if user asked for an out-of-bounds element, i.e. for 'vec4 colors[3];' user could ask for 'colors[10]' which should return -1. return uniformInfo[1] + arrayIndex; } else { return -1; } } /** @suppress{checkTypes} */ function emscriptenWebGLGetUniform(program, location, params, type) { if (!params) { // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if params == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } var data = GLctx.getUniform(GL.programs[program], GL.uniforms[location]); if (typeof data == 'number' || typeof data == 'boolean') { switch (type) { case 0: HEAP32[((params)>>2)]=data; break; case 2: HEAPF32[((params)>>2)]=data; break; } } else { for (var i = 0; i < data.length; i++) { switch (type) { case 0: HEAP32[(((params)+(i*4))>>2)]=data[i]; break; case 2: HEAPF32[(((params)+(i*4))>>2)]=data[i]; break; } } } } function _emscripten_glGetUniformfv(program, location, params) { emscriptenWebGLGetUniform(program, location, params, 2); } function _emscripten_glGetUniformiv(program, location, params) { emscriptenWebGLGetUniform(program, location, params, 0); } function _emscripten_glGetUniformuiv(program, location, params) { emscriptenWebGLGetUniform(program, location, params, 0); } /** @suppress{checkTypes} */ function emscriptenWebGLGetVertexAttrib(index, pname, params, type) { if (!params) { // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense // if params == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } var data = GLctx.getVertexAttrib(index, pname); if (pname == 0x889F/*VERTEX_ATTRIB_ARRAY_BUFFER_BINDING*/) { HEAP32[((params)>>2)]=data && data["name"]; } else if (typeof data == 'number' || typeof data == 'boolean') { switch (type) { case 0: HEAP32[((params)>>2)]=data; break; case 2: HEAPF32[((params)>>2)]=data; break; case 5: HEAP32[((params)>>2)]=Math.fround(data); break; } } else { for (var i = 0; i < data.length; i++) { switch (type) { case 0: HEAP32[(((params)+(i*4))>>2)]=data[i]; break; case 2: HEAPF32[(((params)+(i*4))>>2)]=data[i]; break; case 5: HEAP32[(((params)+(i*4))>>2)]=Math.fround(data[i]); break; } } } } function _emscripten_glGetVertexAttribIiv(index, pname, params) { // N.B. This function may only be called if the vertex attribute was specified using the function glVertexAttribI4iv(), // otherwise the results are undefined. (GLES3 spec 6.1.12) emscriptenWebGLGetVertexAttrib(index, pname, params, 0); } function _emscripten_glGetVertexAttribIuiv(index, pname, params) { // N.B. This function may only be called if the vertex attribute was specified using the function glVertexAttribI4iv(), // otherwise the results are undefined. (GLES3 spec 6.1.12) emscriptenWebGLGetVertexAttrib(index, pname, params, 0); } function _emscripten_glGetVertexAttribPointerv(index, pname, pointer) { if (!pointer) { // GLES2 specification does not specify how to behave if pointer is a null pointer. Since calling this function does not make sense // if pointer == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } HEAP32[((pointer)>>2)]=GLctx.getVertexAttribOffset(index, pname); } function _emscripten_glGetVertexAttribfv(index, pname, params) { // N.B. This function may only be called if the vertex attribute was specified using the function glVertexAttrib*f(), // otherwise the results are undefined. (GLES3 spec 6.1.12) emscriptenWebGLGetVertexAttrib(index, pname, params, 2); } function _emscripten_glGetVertexAttribiv(index, pname, params) { // N.B. This function may only be called if the vertex attribute was specified using the function glVertexAttrib*f(), // otherwise the results are undefined. (GLES3 spec 6.1.12) emscriptenWebGLGetVertexAttrib(index, pname, params, 5); } function _emscripten_glHint(x0, x1) { GLctx['hint'](x0, x1) } function _emscripten_glInvalidateFramebuffer(target, numAttachments, attachments) { var list = tempFixedLengthArray[numAttachments]; for (var i = 0; i < numAttachments; i++) { list[i] = HEAP32[(((attachments)+(i*4))>>2)]; } GLctx['invalidateFramebuffer'](target, list); } function _emscripten_glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height) { var list = tempFixedLengthArray[numAttachments]; for (var i = 0; i < numAttachments; i++) { list[i] = HEAP32[(((attachments)+(i*4))>>2)]; } GLctx['invalidateSubFramebuffer'](target, list, x, y, width, height); } function _emscripten_glIsBuffer(buffer) { var b = GL.buffers[buffer]; if (!b) return 0; return GLctx.isBuffer(b); } function _emscripten_glIsEnabled(x0) { return GLctx['isEnabled'](x0) } function _emscripten_glIsFramebuffer(framebuffer) { var fb = GL.framebuffers[framebuffer]; if (!fb) return 0; return GLctx.isFramebuffer(fb); } function _emscripten_glIsProgram(program) { program = GL.programs[program]; if (!program) return 0; return GLctx.isProgram(program); } function _emscripten_glIsQuery(id) { var query = GL.queries[id]; if (!query) return 0; return GLctx['isQuery'](query); } function _emscripten_glIsQueryEXT(id) { var query = GL.timerQueriesEXT[id]; if (!query) return 0; return GLctx.disjointTimerQueryExt['isQueryEXT'](query); } function _emscripten_glIsRenderbuffer(renderbuffer) { var rb = GL.renderbuffers[renderbuffer]; if (!rb) return 0; return GLctx.isRenderbuffer(rb); } function _emscripten_glIsSampler(id) { var sampler = GL.samplers[id]; if (!sampler) return 0; return GLctx['isSampler'](sampler); } function _emscripten_glIsShader(shader) { var s = GL.shaders[shader]; if (!s) return 0; return GLctx.isShader(s); } function _emscripten_glIsSync(sync) { return GLctx.isSync(GL.syncs[sync]); } function _emscripten_glIsTexture(id) { var texture = GL.textures[id]; if (!texture) return 0; return GLctx.isTexture(texture); } function _emscripten_glIsTransformFeedback(id) { return GLctx['isTransformFeedback'](GL.transformFeedbacks[id]); } function _emscripten_glIsVertexArray(array) { var vao = GL.vaos[array]; if (!vao) return 0; return GLctx['isVertexArray'](vao); } function _emscripten_glIsVertexArrayOES(array) { var vao = GL.vaos[array]; if (!vao) return 0; return GLctx['isVertexArray'](vao); } function _emscripten_glLineWidth(x0) { GLctx['lineWidth'](x0) } function _emscripten_glLinkProgram(program) { GLctx.linkProgram(GL.programs[program]); GL.populateUniformTable(program); } function _emscripten_glPauseTransformFeedback() { GLctx['pauseTransformFeedback']() } function _emscripten_glPixelStorei(pname, param) { if (pname == 0xCF5 /* GL_UNPACK_ALIGNMENT */) { GL.unpackAlignment = param; } GLctx.pixelStorei(pname, param); } function _emscripten_glPolygonOffset(x0, x1) { GLctx['polygonOffset'](x0, x1) } function _emscripten_glProgramBinary(program, binaryFormat, binary, length) { GL.recordError(0x500/*GL_INVALID_ENUM*/); } function _emscripten_glProgramParameteri(program, pname, value) { GL.recordError(0x500/*GL_INVALID_ENUM*/); } function _emscripten_glQueryCounterEXT(id, target) { GLctx.disjointTimerQueryExt['queryCounterEXT'](GL.timerQueriesEXT[id], target); } function _emscripten_glReadBuffer(x0) { GLctx['readBuffer'](x0) } function computeUnpackAlignedImageSize(width, height, sizePerPixel, alignment) { function roundedToNextMultipleOf(x, y) { return (x + y - 1) & -y; } var plainRowSize = width * sizePerPixel; var alignedRowSize = roundedToNextMultipleOf(plainRowSize, alignment); return height * alignedRowSize; } function __colorChannelsInGlTextureFormat(format) { // Micro-optimizations for size: map format to size by subtracting smallest enum value (0x1902) from all values first. // Also omit the most common size value (1) from the list, which is assumed by formats not on the list. var colorChannels = { // 0x1902 /* GL_DEPTH_COMPONENT */ - 0x1902: 1, // 0x1906 /* GL_ALPHA */ - 0x1902: 1, 5: 3, 6: 4, // 0x1909 /* GL_LUMINANCE */ - 0x1902: 1, 8: 2, 29502: 3, 29504: 4, // 0x1903 /* GL_RED */ - 0x1902: 1, 26917: 2, 26918: 2, // 0x8D94 /* GL_RED_INTEGER */ - 0x1902: 1, 29846: 3, 29847: 4 }; return colorChannels[format - 0x1902]||1; } function heapObjectForWebGLType(type) { // Micro-optimization for size: Subtract lowest GL enum number (0x1400/* GL_BYTE */) from type to compare // smaller values for the heap, for shorter generated code size. // Also the type HEAPU16 is not tested for explicitly, but any unrecognized type will return out HEAPU16. // (since most types are HEAPU16) type -= 0x1400; if (type == 0) return HEAP8; if (type == 1) return HEAPU8; if (type == 2) return HEAP16; if (type == 4) return HEAP32; if (type == 6) return HEAPF32; if (type == 5 || type == 28922 || type == 28520 || type == 30779 || type == 30782 ) return HEAPU32; return HEAPU16; } function heapAccessShiftForWebGLHeap(heap) { return 31 - Math.clz32(heap.BYTES_PER_ELEMENT); } function emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) { var heap = heapObjectForWebGLType(type); var shift = heapAccessShiftForWebGLHeap(heap); var byteSize = 1<<shift; var sizePerPixel = __colorChannelsInGlTextureFormat(format) * byteSize; var bytes = computeUnpackAlignedImageSize(width, height, sizePerPixel, GL.unpackAlignment); return heap.subarray(pixels >> shift, pixels + bytes >> shift); } function _emscripten_glReadPixels(x, y, width, height, format, type, pixels) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. if (GLctx.currentPixelPackBufferBinding) { GLctx.readPixels(x, y, width, height, format, type, pixels); } else { var heap = heapObjectForWebGLType(type); GLctx.readPixels(x, y, width, height, format, type, heap, pixels >> heapAccessShiftForWebGLHeap(heap)); } return; } var pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, format); if (!pixelData) { GL.recordError(0x500/*GL_INVALID_ENUM*/); return; } GLctx.readPixels(x, y, width, height, format, type, pixelData); } function _emscripten_glReleaseShaderCompiler() { // NOP (as allowed by GLES 2.0 spec) } function _emscripten_glRenderbufferStorage(x0, x1, x2, x3) { GLctx['renderbufferStorage'](x0, x1, x2, x3) } function _emscripten_glRenderbufferStorageMultisample(x0, x1, x2, x3, x4) { GLctx['renderbufferStorageMultisample'](x0, x1, x2, x3, x4) } function _emscripten_glResumeTransformFeedback() { GLctx['resumeTransformFeedback']() } function _emscripten_glSampleCoverage(value, invert) { GLctx.sampleCoverage(value, !!invert); } function _emscripten_glSamplerParameterf(sampler, pname, param) { GLctx['samplerParameterf'](GL.samplers[sampler], pname, param); } function _emscripten_glSamplerParameterfv(sampler, pname, params) { var param = HEAPF32[((params)>>2)]; GLctx['samplerParameterf'](GL.samplers[sampler], pname, param); } function _emscripten_glSamplerParameteri(sampler, pname, param) { GLctx['samplerParameteri'](GL.samplers[sampler], pname, param); } function _emscripten_glSamplerParameteriv(sampler, pname, params) { var param = HEAP32[((params)>>2)]; GLctx['samplerParameteri'](GL.samplers[sampler], pname, param); } function _emscripten_glScissor(x0, x1, x2, x3) { GLctx['scissor'](x0, x1, x2, x3) } function _emscripten_glShaderBinary() { GL.recordError(0x500/*GL_INVALID_ENUM*/); } function _emscripten_glShaderSource(shader, count, string, length) { var source = GL.getSource(shader, count, string, length); GLctx.shaderSource(GL.shaders[shader], source); } function _emscripten_glStencilFunc(x0, x1, x2) { GLctx['stencilFunc'](x0, x1, x2) } function _emscripten_glStencilFuncSeparate(x0, x1, x2, x3) { GLctx['stencilFuncSeparate'](x0, x1, x2, x3) } function _emscripten_glStencilMask(x0) { GLctx['stencilMask'](x0) } function _emscripten_glStencilMaskSeparate(x0, x1) { GLctx['stencilMaskSeparate'](x0, x1) } function _emscripten_glStencilOp(x0, x1, x2) { GLctx['stencilOp'](x0, x1, x2) } function _emscripten_glStencilOpSeparate(x0, x1, x2, x3) { GLctx['stencilOpSeparate'](x0, x1, x2, x3) } function _emscripten_glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. if (GLctx.currentPixelUnpackBufferBinding) { GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels); } else if (pixels) { var heap = heapObjectForWebGLType(type); GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, heap, pixels >> heapAccessShiftForWebGLHeap(heap)); } else { GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, null); } return; } GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) : null); } function _emscripten_glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels) { if (GLctx.currentPixelUnpackBufferBinding) { GLctx['texImage3D'](target, level, internalFormat, width, height, depth, border, format, type, pixels); } else if (pixels) { var heap = heapObjectForWebGLType(type); GLctx['texImage3D'](target, level, internalFormat, width, height, depth, border, format, type, heap, pixels >> heapAccessShiftForWebGLHeap(heap)); } else { GLctx['texImage3D'](target, level, internalFormat, width, height, depth, border, format, type, null); } } function _emscripten_glTexParameterf(x0, x1, x2) { GLctx['texParameterf'](x0, x1, x2) } function _emscripten_glTexParameterfv(target, pname, params) { var param = HEAPF32[((params)>>2)]; GLctx.texParameterf(target, pname, param); } function _emscripten_glTexParameteri(x0, x1, x2) { GLctx['texParameteri'](x0, x1, x2) } function _emscripten_glTexParameteriv(target, pname, params) { var param = HEAP32[((params)>>2)]; GLctx.texParameteri(target, pname, param); } function _emscripten_glTexStorage2D(x0, x1, x2, x3, x4) { GLctx['texStorage2D'](x0, x1, x2, x3, x4) } function _emscripten_glTexStorage3D(x0, x1, x2, x3, x4, x5) { GLctx['texStorage3D'](x0, x1, x2, x3, x4, x5) } function _emscripten_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. if (GLctx.currentPixelUnpackBufferBinding) { GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); } else if (pixels) { var heap = heapObjectForWebGLType(type); GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, heap, pixels >> heapAccessShiftForWebGLHeap(heap)); } else { GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, null); } return; } var pixelData = null; if (pixels) pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, 0); GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixelData); } function _emscripten_glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels) { if (GLctx.currentPixelUnpackBufferBinding) { GLctx['texSubImage3D'](target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); } else if (pixels) { var heap = heapObjectForWebGLType(type); GLctx['texSubImage3D'](target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, heap, pixels >> heapAccessShiftForWebGLHeap(heap)); } else { GLctx['texSubImage3D'](target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, null); } } function _emscripten_glTransformFeedbackVaryings(program, count, varyings, bufferMode) { program = GL.programs[program]; var vars = []; for (var i = 0; i < count; i++) vars.push(UTF8ToString(HEAP32[(((varyings)+(i*4))>>2)])); GLctx['transformFeedbackVaryings'](program, vars, bufferMode); } function _emscripten_glUniform1f(location, v0) { GLctx.uniform1f(GL.uniforms[location], v0); } var miniTempWebGLFloatBuffers=[]; function _emscripten_glUniform1fv(location, count, value) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. GLctx.uniform1fv(GL.uniforms[location], HEAPF32, value>>2, count); return; } if (count <= 288) { // avoid allocation when uploading few enough uniforms var view = miniTempWebGLFloatBuffers[count-1]; for (var i = 0; i < count; ++i) { view[i] = HEAPF32[(((value)+(4*i))>>2)]; } } else { var view = HEAPF32.subarray((value)>>2,(value+count*4)>>2); } GLctx.uniform1fv(GL.uniforms[location], view); } function _emscripten_glUniform1i(location, v0) { GLctx.uniform1i(GL.uniforms[location], v0); } var __miniTempWebGLIntBuffers=[]; function _emscripten_glUniform1iv(location, count, value) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. GLctx.uniform1iv(GL.uniforms[location], HEAP32, value>>2, count); return; } if (count <= 288) { // avoid allocation when uploading few enough uniforms var view = __miniTempWebGLIntBuffers[count-1]; for (var i = 0; i < count; ++i) { view[i] = HEAP32[(((value)+(4*i))>>2)]; } } else { var view = HEAP32.subarray((value)>>2,(value+count*4)>>2); } GLctx.uniform1iv(GL.uniforms[location], view); } function _emscripten_glUniform1ui(location, v0) { GLctx.uniform1ui(GL.uniforms[location], v0); } function _emscripten_glUniform1uiv(location, count, value) { GLctx.uniform1uiv(GL.uniforms[location], HEAPU32, value>>2, count); } function _emscripten_glUniform2f(location, v0, v1) { GLctx.uniform2f(GL.uniforms[location], v0, v1); } function _emscripten_glUniform2fv(location, count, value) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. GLctx.uniform2fv(GL.uniforms[location], HEAPF32, value>>2, count*2); return; } if (count <= 144) { // avoid allocation when uploading few enough uniforms var view = miniTempWebGLFloatBuffers[2*count-1]; for (var i = 0; i < 2*count; i += 2) { view[i] = HEAPF32[(((value)+(4*i))>>2)]; view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; } } else { var view = HEAPF32.subarray((value)>>2,(value+count*8)>>2); } GLctx.uniform2fv(GL.uniforms[location], view); } function _emscripten_glUniform2i(location, v0, v1) { GLctx.uniform2i(GL.uniforms[location], v0, v1); } function _emscripten_glUniform2iv(location, count, value) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. GLctx.uniform2iv(GL.uniforms[location], HEAP32, value>>2, count*2); return; } if (count <= 144) { // avoid allocation when uploading few enough uniforms var view = __miniTempWebGLIntBuffers[2*count-1]; for (var i = 0; i < 2*count; i += 2) { view[i] = HEAP32[(((value)+(4*i))>>2)]; view[i+1] = HEAP32[(((value)+(4*i+4))>>2)]; } } else { var view = HEAP32.subarray((value)>>2,(value+count*8)>>2); } GLctx.uniform2iv(GL.uniforms[location], view); } function _emscripten_glUniform2ui(location, v0, v1) { GLctx.uniform2ui(GL.uniforms[location], v0, v1); } function _emscripten_glUniform2uiv(location, count, value) { GLctx.uniform2uiv(GL.uniforms[location], HEAPU32, value>>2, count*2); } function _emscripten_glUniform3f(location, v0, v1, v2) { GLctx.uniform3f(GL.uniforms[location], v0, v1, v2); } function _emscripten_glUniform3fv(location, count, value) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. GLctx.uniform3fv(GL.uniforms[location], HEAPF32, value>>2, count*3); return; } if (count <= 96) { // avoid allocation when uploading few enough uniforms var view = miniTempWebGLFloatBuffers[3*count-1]; for (var i = 0; i < 3*count; i += 3) { view[i] = HEAPF32[(((value)+(4*i))>>2)]; view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; } } else { var view = HEAPF32.subarray((value)>>2,(value+count*12)>>2); } GLctx.uniform3fv(GL.uniforms[location], view); } function _emscripten_glUniform3i(location, v0, v1, v2) { GLctx.uniform3i(GL.uniforms[location], v0, v1, v2); } function _emscripten_glUniform3iv(location, count, value) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. GLctx.uniform3iv(GL.uniforms[location], HEAP32, value>>2, count*3); return; } if (count <= 96) { // avoid allocation when uploading few enough uniforms var view = __miniTempWebGLIntBuffers[3*count-1]; for (var i = 0; i < 3*count; i += 3) { view[i] = HEAP32[(((value)+(4*i))>>2)]; view[i+1] = HEAP32[(((value)+(4*i+4))>>2)]; view[i+2] = HEAP32[(((value)+(4*i+8))>>2)]; } } else { var view = HEAP32.subarray((value)>>2,(value+count*12)>>2); } GLctx.uniform3iv(GL.uniforms[location], view); } function _emscripten_glUniform3ui(location, v0, v1, v2) { GLctx.uniform3ui(GL.uniforms[location], v0, v1, v2); } function _emscripten_glUniform3uiv(location, count, value) { GLctx.uniform3uiv(GL.uniforms[location], HEAPU32, value>>2, count*3); } function _emscripten_glUniform4f(location, v0, v1, v2, v3) { GLctx.uniform4f(GL.uniforms[location], v0, v1, v2, v3); } function _emscripten_glUniform4fv(location, count, value) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. GLctx.uniform4fv(GL.uniforms[location], HEAPF32, value>>2, count*4); return; } if (count <= 72) { // avoid allocation when uploading few enough uniforms var view = miniTempWebGLFloatBuffers[4*count-1]; // hoist the heap out of the loop for size and for pthreads+growth. var heap = HEAPF32; value >>= 2; for (var i = 0; i < 4 * count; i += 4) { var dst = value + i; view[i] = heap[dst]; view[i + 1] = heap[dst + 1]; view[i + 2] = heap[dst + 2]; view[i + 3] = heap[dst + 3]; } } else { var view = HEAPF32.subarray((value)>>2,(value+count*16)>>2); } GLctx.uniform4fv(GL.uniforms[location], view); } function _emscripten_glUniform4i(location, v0, v1, v2, v3) { GLctx.uniform4i(GL.uniforms[location], v0, v1, v2, v3); } function _emscripten_glUniform4iv(location, count, value) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. GLctx.uniform4iv(GL.uniforms[location], HEAP32, value>>2, count*4); return; } if (count <= 72) { // avoid allocation when uploading few enough uniforms var view = __miniTempWebGLIntBuffers[4*count-1]; for (var i = 0; i < 4*count; i += 4) { view[i] = HEAP32[(((value)+(4*i))>>2)]; view[i+1] = HEAP32[(((value)+(4*i+4))>>2)]; view[i+2] = HEAP32[(((value)+(4*i+8))>>2)]; view[i+3] = HEAP32[(((value)+(4*i+12))>>2)]; } } else { var view = HEAP32.subarray((value)>>2,(value+count*16)>>2); } GLctx.uniform4iv(GL.uniforms[location], view); } function _emscripten_glUniform4ui(location, v0, v1, v2, v3) { GLctx.uniform4ui(GL.uniforms[location], v0, v1, v2, v3); } function _emscripten_glUniform4uiv(location, count, value) { GLctx.uniform4uiv(GL.uniforms[location], HEAPU32, value>>2, count*4); } function _emscripten_glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding) { program = GL.programs[program]; GLctx['uniformBlockBinding'](program, uniformBlockIndex, uniformBlockBinding); } function _emscripten_glUniformMatrix2fv(location, count, transpose, value) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. GLctx.uniformMatrix2fv(GL.uniforms[location], !!transpose, HEAPF32, value>>2, count*4); return; } if (count <= 72) { // avoid allocation when uploading few enough uniforms var view = miniTempWebGLFloatBuffers[4*count-1]; for (var i = 0; i < 4*count; i += 4) { view[i] = HEAPF32[(((value)+(4*i))>>2)]; view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; } } else { var view = HEAPF32.subarray((value)>>2,(value+count*16)>>2); } GLctx.uniformMatrix2fv(GL.uniforms[location], !!transpose, view); } function _emscripten_glUniformMatrix2x3fv(location, count, transpose, value) { GLctx.uniformMatrix2x3fv(GL.uniforms[location], !!transpose, HEAPF32, value>>2, count*6); } function _emscripten_glUniformMatrix2x4fv(location, count, transpose, value) { GLctx.uniformMatrix2x4fv(GL.uniforms[location], !!transpose, HEAPF32, value>>2, count*8); } function _emscripten_glUniformMatrix3fv(location, count, transpose, value) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. GLctx.uniformMatrix3fv(GL.uniforms[location], !!transpose, HEAPF32, value>>2, count*9); return; } if (count <= 32) { // avoid allocation when uploading few enough uniforms var view = miniTempWebGLFloatBuffers[9*count-1]; for (var i = 0; i < 9*count; i += 9) { view[i] = HEAPF32[(((value)+(4*i))>>2)]; view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; view[i+4] = HEAPF32[(((value)+(4*i+16))>>2)]; view[i+5] = HEAPF32[(((value)+(4*i+20))>>2)]; view[i+6] = HEAPF32[(((value)+(4*i+24))>>2)]; view[i+7] = HEAPF32[(((value)+(4*i+28))>>2)]; view[i+8] = HEAPF32[(((value)+(4*i+32))>>2)]; } } else { var view = HEAPF32.subarray((value)>>2,(value+count*36)>>2); } GLctx.uniformMatrix3fv(GL.uniforms[location], !!transpose, view); } function _emscripten_glUniformMatrix3x2fv(location, count, transpose, value) { GLctx.uniformMatrix3x2fv(GL.uniforms[location], !!transpose, HEAPF32, value>>2, count*6); } function _emscripten_glUniformMatrix3x4fv(location, count, transpose, value) { GLctx.uniformMatrix3x4fv(GL.uniforms[location], !!transpose, HEAPF32, value>>2, count*12); } function _emscripten_glUniformMatrix4fv(location, count, transpose, value) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. GLctx.uniformMatrix4fv(GL.uniforms[location], !!transpose, HEAPF32, value>>2, count*16); return; } if (count <= 18) { // avoid allocation when uploading few enough uniforms var view = miniTempWebGLFloatBuffers[16*count-1]; // hoist the heap out of the loop for size and for pthreads+growth. var heap = HEAPF32; value >>= 2; for (var i = 0; i < 16 * count; i += 16) { var dst = value + i; view[i] = heap[dst]; view[i + 1] = heap[dst + 1]; view[i + 2] = heap[dst + 2]; view[i + 3] = heap[dst + 3]; view[i + 4] = heap[dst + 4]; view[i + 5] = heap[dst + 5]; view[i + 6] = heap[dst + 6]; view[i + 7] = heap[dst + 7]; view[i + 8] = heap[dst + 8]; view[i + 9] = heap[dst + 9]; view[i + 10] = heap[dst + 10]; view[i + 11] = heap[dst + 11]; view[i + 12] = heap[dst + 12]; view[i + 13] = heap[dst + 13]; view[i + 14] = heap[dst + 14]; view[i + 15] = heap[dst + 15]; } } else { var view = HEAPF32.subarray((value)>>2,(value+count*64)>>2); } GLctx.uniformMatrix4fv(GL.uniforms[location], !!transpose, view); } function _emscripten_glUniformMatrix4x2fv(location, count, transpose, value) { GLctx.uniformMatrix4x2fv(GL.uniforms[location], !!transpose, HEAPF32, value>>2, count*8); } function _emscripten_glUniformMatrix4x3fv(location, count, transpose, value) { GLctx.uniformMatrix4x3fv(GL.uniforms[location], !!transpose, HEAPF32, value>>2, count*12); } function _emscripten_glUseProgram(program) { GLctx.useProgram(GL.programs[program]); } function _emscripten_glValidateProgram(program) { GLctx.validateProgram(GL.programs[program]); } function _emscripten_glVertexAttrib1f(x0, x1) { GLctx['vertexAttrib1f'](x0, x1) } function _emscripten_glVertexAttrib1fv(index, v) { GLctx.vertexAttrib1f(index, HEAPF32[v>>2]); } function _emscripten_glVertexAttrib2f(x0, x1, x2) { GLctx['vertexAttrib2f'](x0, x1, x2) } function _emscripten_glVertexAttrib2fv(index, v) { GLctx.vertexAttrib2f(index, HEAPF32[v>>2], HEAPF32[v+4>>2]); } function _emscripten_glVertexAttrib3f(x0, x1, x2, x3) { GLctx['vertexAttrib3f'](x0, x1, x2, x3) } function _emscripten_glVertexAttrib3fv(index, v) { GLctx.vertexAttrib3f(index, HEAPF32[v>>2], HEAPF32[v+4>>2], HEAPF32[v+8>>2]); } function _emscripten_glVertexAttrib4f(x0, x1, x2, x3, x4) { GLctx['vertexAttrib4f'](x0, x1, x2, x3, x4) } function _emscripten_glVertexAttrib4fv(index, v) { GLctx.vertexAttrib4f(index, HEAPF32[v>>2], HEAPF32[v+4>>2], HEAPF32[v+8>>2], HEAPF32[v+12>>2]); } function _emscripten_glVertexAttribDivisor(index, divisor) { GLctx['vertexAttribDivisor'](index, divisor); } function _emscripten_glVertexAttribDivisorANGLE(index, divisor) { GLctx['vertexAttribDivisor'](index, divisor); } function _emscripten_glVertexAttribDivisorARB(index, divisor) { GLctx['vertexAttribDivisor'](index, divisor); } function _emscripten_glVertexAttribDivisorEXT(index, divisor) { GLctx['vertexAttribDivisor'](index, divisor); } function _emscripten_glVertexAttribDivisorNV(index, divisor) { GLctx['vertexAttribDivisor'](index, divisor); } function _emscripten_glVertexAttribI4i(x0, x1, x2, x3, x4) { GLctx['vertexAttribI4i'](x0, x1, x2, x3, x4) } function _emscripten_glVertexAttribI4iv(index, v) { GLctx.vertexAttribI4i(index, HEAP32[v>>2], HEAP32[v+4>>2], HEAP32[v+8>>2], HEAP32[v+12>>2]); } function _emscripten_glVertexAttribI4ui(x0, x1, x2, x3, x4) { GLctx['vertexAttribI4ui'](x0, x1, x2, x3, x4) } function _emscripten_glVertexAttribI4uiv(index, v) { GLctx.vertexAttribI4ui(index, HEAPU32[v>>2], HEAPU32[v+4>>2], HEAPU32[v+8>>2], HEAPU32[v+12>>2]); } function _emscripten_glVertexAttribIPointer(index, size, type, stride, ptr) { GLctx['vertexAttribIPointer'](index, size, type, stride, ptr); } function _emscripten_glVertexAttribPointer(index, size, type, normalized, stride, ptr) { GLctx.vertexAttribPointer(index, size, type, !!normalized, stride, ptr); } function _emscripten_glViewport(x0, x1, x2, x3) { GLctx['viewport'](x0, x1, x2, x3) } function _emscripten_glWaitSync(sync, flags, timeoutLo, timeoutHi) { // See WebGL2 vs GLES3 difference on GL_TIMEOUT_IGNORED above (https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.15) GLctx.waitSync(GL.syncs[sync], flags, convertI32PairToI53(timeoutLo, timeoutHi)); } function _emscripten_has_asyncify() { return 0; } function _longjmp(env, value) { _setThrew(env, value || 1); throw 'longjmp'; } function _emscripten_longjmp(a0,a1 ) { return _longjmp(a0,a1); } function _emscripten_memcpy_big(dest, src, num) { HEAPU8.copyWithin(dest, src, src + num); } function __emscripten_do_request_fullscreen(target, strategy) { if (!JSEvents.fullscreenEnabled()) return -1; target = findEventTarget(target); if (!target) return -4; if (!target.requestFullscreen && !target.webkitRequestFullscreen ) { return -3; } var canPerformRequests = JSEvents.canPerformEventHandlerRequests(); // Queue this function call if we're not currently in an event handler and the user saw it appropriate to do so. if (!canPerformRequests) { if (strategy.deferUntilInEventHandler) { JSEvents.deferCall(_JSEvents_requestFullscreen, 1 /* priority over pointer lock */, [target, strategy]); return 1; } else { return -2; } } return _JSEvents_requestFullscreen(target, strategy); } function _emscripten_request_fullscreen_strategy(target, deferUntilInEventHandler, fullscreenStrategy) { var strategy = { scaleMode: HEAP32[((fullscreenStrategy)>>2)], canvasResolutionScaleMode: HEAP32[(((fullscreenStrategy)+(4))>>2)], filteringMode: HEAP32[(((fullscreenStrategy)+(8))>>2)], deferUntilInEventHandler: deferUntilInEventHandler, canvasResizedCallback: HEAP32[(((fullscreenStrategy)+(12))>>2)], canvasResizedCallbackUserData: HEAP32[(((fullscreenStrategy)+(16))>>2)] }; return __emscripten_do_request_fullscreen(target, strategy); } function _emscripten_request_pointerlock(target, deferUntilInEventHandler) { target = findEventTarget(target); if (!target) return -4; if (!target.requestPointerLock && !target.msRequestPointerLock ) { return -1; } var canPerformRequests = JSEvents.canPerformEventHandlerRequests(); // Queue this function call if we're not currently in an event handler and the user saw it appropriate to do so. if (!canPerformRequests) { if (deferUntilInEventHandler) { JSEvents.deferCall(__requestPointerLock, 2 /* priority below fullscreen */, [target]); return 1; } else { return -2; } } return __requestPointerLock(target); } function _emscripten_get_heap_size() { return HEAPU8.length; } function abortOnCannotGrowMemory(requestedSize) { abort('Cannot enlarge memory arrays to size ' + requestedSize + ' bytes (OOM). Either (1) compile with -s INITIAL_MEMORY=X with X higher than the current value ' + HEAP8.length + ', (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 '); } function _emscripten_resize_heap(requestedSize) { requestedSize = requestedSize >>> 0; abortOnCannotGrowMemory(requestedSize); } function _emscripten_sample_gamepad_data() { return (JSEvents.lastGamepadState = (navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : null))) ? 0 : -1; } function __registerBeforeUnloadEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString) { var beforeUnloadEventHandlerFunc = function(ev) { var e = ev || event; // Note: This is always called on the main browser thread, since it needs synchronously return a value! var confirmationMessage = wasmTable.get(callbackfunc)(eventTypeId, 0, userData); if (confirmationMessage) { confirmationMessage = UTF8ToString(confirmationMessage); } if (confirmationMessage) { e.preventDefault(); e.returnValue = confirmationMessage; return confirmationMessage; } }; var eventHandler = { target: findEventTarget(target), eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: beforeUnloadEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); } function _emscripten_set_beforeunload_callback_on_thread(userData, callbackfunc, targetThread) { if (typeof onbeforeunload === 'undefined') return -1; // beforeunload callback can only be registered on the main browser thread, because the page will go away immediately after returning from the handler, // and there is no time to start proxying it anywhere. if (targetThread !== 1) return -5; __registerBeforeUnloadEventCallback(2, userData, true, callbackfunc, 28, "beforeunload"); return 0; } function __registerFocusEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.focusEvent) JSEvents.focusEvent = _malloc( 256 ); var focusEventHandlerFunc = function(ev) { var e = ev || event; var nodeName = JSEvents.getNodeNameForTarget(e.target); var id = e.target.id ? e.target.id : ''; var focusEvent = JSEvents.focusEvent; stringToUTF8(nodeName, focusEvent + 0, 128); stringToUTF8(id, focusEvent + 128, 128); if (wasmTable.get(callbackfunc)(eventTypeId, focusEvent, userData)) e.preventDefault(); }; var eventHandler = { target: findEventTarget(target), eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: focusEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); } function _emscripten_set_blur_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerFocusEventCallback(target, userData, useCapture, callbackfunc, 12, "blur", targetThread); return 0; } function _emscripten_set_element_css_size(target, width, height) { target = findEventTarget(target); if (!target) return -4; target.style.width = width + "px"; target.style.height = height + "px"; return 0; } function _emscripten_set_focus_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerFocusEventCallback(target, userData, useCapture, callbackfunc, 13, "focus", targetThread); return 0; } function __fillFullscreenChangeEventData(eventStruct) { var fullscreenElement = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement; var isFullscreen = !!fullscreenElement; /** @suppress{checkTypes} */ HEAP32[((eventStruct)>>2)]=isFullscreen; HEAP32[(((eventStruct)+(4))>>2)]=JSEvents.fullscreenEnabled(); // If transitioning to fullscreen, report info about the element that is now fullscreen. // If transitioning to windowed mode, report info about the element that just was fullscreen. var reportedElement = isFullscreen ? fullscreenElement : JSEvents.previousFullscreenElement; var nodeName = JSEvents.getNodeNameForTarget(reportedElement); var id = (reportedElement && reportedElement.id) ? reportedElement.id : ''; stringToUTF8(nodeName, eventStruct + 8, 128); stringToUTF8(id, eventStruct + 136, 128); HEAP32[(((eventStruct)+(264))>>2)]=reportedElement ? reportedElement.clientWidth : 0; HEAP32[(((eventStruct)+(268))>>2)]=reportedElement ? reportedElement.clientHeight : 0; HEAP32[(((eventStruct)+(272))>>2)]=screen.width; HEAP32[(((eventStruct)+(276))>>2)]=screen.height; if (isFullscreen) { JSEvents.previousFullscreenElement = fullscreenElement; } } function __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.fullscreenChangeEvent) JSEvents.fullscreenChangeEvent = _malloc( 280 ); var fullscreenChangeEventhandlerFunc = function(ev) { var e = ev || event; var fullscreenChangeEvent = JSEvents.fullscreenChangeEvent; __fillFullscreenChangeEventData(fullscreenChangeEvent); if (wasmTable.get(callbackfunc)(eventTypeId, fullscreenChangeEvent, userData)) e.preventDefault(); }; var eventHandler = { target: target, eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: fullscreenChangeEventhandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); } function _emscripten_set_fullscreenchange_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { if (!JSEvents.fullscreenEnabled()) return -1; target = findEventTarget(target); if (!target) return -4; __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "fullscreenchange", targetThread); // Unprefixed Fullscreen API shipped in Chromium 71 (https://bugs.chromium.org/p/chromium/issues/detail?id=383813) // As of Safari 13.0.3 on macOS Catalina 10.15.1 still ships with prefixed webkitfullscreenchange. TODO: revisit this check once Safari ships unprefixed version. __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "webkitfullscreenchange", targetThread); return 0; } function __registerGamepadEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.gamepadEvent) JSEvents.gamepadEvent = _malloc( 1432 ); var gamepadEventHandlerFunc = function(ev) { var e = ev || event; var gamepadEvent = JSEvents.gamepadEvent; __fillGamepadEventData(gamepadEvent, e["gamepad"]); if (wasmTable.get(callbackfunc)(eventTypeId, gamepadEvent, userData)) e.preventDefault(); }; var eventHandler = { target: findEventTarget(target), allowsDeferredCalls: true, eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: gamepadEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); } function _emscripten_set_gamepadconnected_callback_on_thread(userData, useCapture, callbackfunc, targetThread) { if (!navigator.getGamepads && !navigator.webkitGetGamepads) return -1; __registerGamepadEventCallback(2, userData, useCapture, callbackfunc, 26, "gamepadconnected", targetThread); return 0; } function _emscripten_set_gamepaddisconnected_callback_on_thread(userData, useCapture, callbackfunc, targetThread) { if (!navigator.getGamepads && !navigator.webkitGetGamepads) return -1; __registerGamepadEventCallback(2, userData, useCapture, callbackfunc, 27, "gamepaddisconnected", targetThread); return 0; } function __registerKeyEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.keyEvent) JSEvents.keyEvent = _malloc( 164 ); var keyEventHandlerFunc = function(e) { assert(e); var keyEventData = JSEvents.keyEvent; var idx = keyEventData >> 2; HEAP32[idx + 0] = e.location; HEAP32[idx + 1] = e.ctrlKey; HEAP32[idx + 2] = e.shiftKey; HEAP32[idx + 3] = e.altKey; HEAP32[idx + 4] = e.metaKey; HEAP32[idx + 5] = e.repeat; HEAP32[idx + 6] = e.charCode; HEAP32[idx + 7] = e.keyCode; HEAP32[idx + 8] = e.which; stringToUTF8(e.key || '', keyEventData + 36, 32); stringToUTF8(e.code || '', keyEventData + 68, 32); stringToUTF8(e.char || '', keyEventData + 100, 32); stringToUTF8(e.locale || '', keyEventData + 132, 32); if (wasmTable.get(callbackfunc)(eventTypeId, keyEventData, userData)) e.preventDefault(); }; var eventHandler = { target: findEventTarget(target), allowsDeferredCalls: true, eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: keyEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); } function _emscripten_set_keydown_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerKeyEventCallback(target, userData, useCapture, callbackfunc, 2, "keydown", targetThread); return 0; } function _emscripten_set_keypress_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerKeyEventCallback(target, userData, useCapture, callbackfunc, 1, "keypress", targetThread); return 0; } function _emscripten_set_keyup_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerKeyEventCallback(target, userData, useCapture, callbackfunc, 3, "keyup", targetThread); return 0; } /** @param {number|boolean=} noSetTiming */ function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg, noSetTiming) { var browserIterationFunc = function() { wasmTable.get(func)(); }; setMainLoop(browserIterationFunc, fps, simulateInfiniteLoop, arg, noSetTiming); } function __fillMouseEventData(eventStruct, e, target) { assert(eventStruct % 4 == 0); var idx = eventStruct >> 2; HEAP32[idx + 0] = e.screenX; HEAP32[idx + 1] = e.screenY; HEAP32[idx + 2] = e.clientX; HEAP32[idx + 3] = e.clientY; HEAP32[idx + 4] = e.ctrlKey; HEAP32[idx + 5] = e.shiftKey; HEAP32[idx + 6] = e.altKey; HEAP32[idx + 7] = e.metaKey; HEAP16[idx*2 + 16] = e.button; HEAP16[idx*2 + 17] = e.buttons; HEAP32[idx + 9] = e["movementX"] ; HEAP32[idx + 10] = e["movementY"] ; var rect = __getBoundingClientRect(target); HEAP32[idx + 11] = e.clientX - rect.left; HEAP32[idx + 12] = e.clientY - rect.top; } function __registerMouseEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.mouseEvent) JSEvents.mouseEvent = _malloc( 64 ); target = findEventTarget(target); var mouseEventHandlerFunc = function(ev) { var e = ev || event; // TODO: Make this access thread safe, or this could update live while app is reading it. __fillMouseEventData(JSEvents.mouseEvent, e, target); if (wasmTable.get(callbackfunc)(eventTypeId, JSEvents.mouseEvent, userData)) e.preventDefault(); }; var eventHandler = { target: target, allowsDeferredCalls: eventTypeString != 'mousemove' && eventTypeString != 'mouseenter' && eventTypeString != 'mouseleave', // Mouse move events do not allow fullscreen/pointer lock requests to be handled in them! eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: mouseEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); } function _emscripten_set_mousedown_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerMouseEventCallback(target, userData, useCapture, callbackfunc, 5, "mousedown", targetThread); return 0; } function _emscripten_set_mouseenter_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerMouseEventCallback(target, userData, useCapture, callbackfunc, 33, "mouseenter", targetThread); return 0; } function _emscripten_set_mouseleave_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerMouseEventCallback(target, userData, useCapture, callbackfunc, 34, "mouseleave", targetThread); return 0; } function _emscripten_set_mousemove_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerMouseEventCallback(target, userData, useCapture, callbackfunc, 8, "mousemove", targetThread); return 0; } function _emscripten_set_mouseup_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerMouseEventCallback(target, userData, useCapture, callbackfunc, 6, "mouseup", targetThread); return 0; } function __fillPointerlockChangeEventData(eventStruct) { var pointerLockElement = document.pointerLockElement || document.mozPointerLockElement || document.webkitPointerLockElement || document.msPointerLockElement; var isPointerlocked = !!pointerLockElement; /** @suppress {checkTypes} */ HEAP32[((eventStruct)>>2)]=isPointerlocked; var nodeName = JSEvents.getNodeNameForTarget(pointerLockElement); var id = (pointerLockElement && pointerLockElement.id) ? pointerLockElement.id : ''; stringToUTF8(nodeName, eventStruct + 4, 128); stringToUTF8(id, eventStruct + 132, 128); } function __registerPointerlockChangeEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.pointerlockChangeEvent) JSEvents.pointerlockChangeEvent = _malloc( 260 ); var pointerlockChangeEventHandlerFunc = function(ev) { var e = ev || event; var pointerlockChangeEvent = JSEvents.pointerlockChangeEvent; __fillPointerlockChangeEventData(pointerlockChangeEvent); if (wasmTable.get(callbackfunc)(eventTypeId, pointerlockChangeEvent, userData)) e.preventDefault(); }; var eventHandler = { target: target, eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: pointerlockChangeEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); } /** @suppress {missingProperties} */ function _emscripten_set_pointerlockchange_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { // TODO: Currently not supported in pthreads or in --proxy-to-worker mode. (In pthreads mode, document object is not defined) if (!document || !document.body || (!document.body.requestPointerLock && !document.body.mozRequestPointerLock && !document.body.webkitRequestPointerLock && !document.body.msRequestPointerLock)) { return -1; } target = findEventTarget(target); if (!target) return -4; __registerPointerlockChangeEventCallback(target, userData, useCapture, callbackfunc, 20, "pointerlockchange", targetThread); __registerPointerlockChangeEventCallback(target, userData, useCapture, callbackfunc, 20, "mozpointerlockchange", targetThread); __registerPointerlockChangeEventCallback(target, userData, useCapture, callbackfunc, 20, "webkitpointerlockchange", targetThread); __registerPointerlockChangeEventCallback(target, userData, useCapture, callbackfunc, 20, "mspointerlockchange", targetThread); return 0; } function __registerUiEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.uiEvent) JSEvents.uiEvent = _malloc( 36 ); target = findEventTarget(target); var uiEventHandlerFunc = function(ev) { var e = ev || event; if (e.target != target) { // Never take ui events such as scroll via a 'bubbled' route, but always from the direct element that // was targeted. Otherwise e.g. if app logs a message in response to a page scroll, the Emscripten log // message box could cause to scroll, generating a new (bubbled) scroll message, causing a new log print, // causing a new scroll, etc.. return; } var b = document.body; // Take document.body to a variable, Closure compiler does not outline access to it on its own. if (!b) { // During a page unload 'body' can be null, with "Cannot read property 'clientWidth' of null" being thrown return; } var uiEvent = JSEvents.uiEvent; HEAP32[((uiEvent)>>2)]=e.detail; HEAP32[(((uiEvent)+(4))>>2)]=b.clientWidth; HEAP32[(((uiEvent)+(8))>>2)]=b.clientHeight; HEAP32[(((uiEvent)+(12))>>2)]=innerWidth; HEAP32[(((uiEvent)+(16))>>2)]=innerHeight; HEAP32[(((uiEvent)+(20))>>2)]=outerWidth; HEAP32[(((uiEvent)+(24))>>2)]=outerHeight; HEAP32[(((uiEvent)+(28))>>2)]=pageXOffset; HEAP32[(((uiEvent)+(32))>>2)]=pageYOffset; if (wasmTable.get(callbackfunc)(eventTypeId, uiEvent, userData)) e.preventDefault(); }; var eventHandler = { target: target, eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: uiEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); } function _emscripten_set_resize_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerUiEventCallback(target, userData, useCapture, callbackfunc, 10, "resize", targetThread); return 0; } function __registerTouchEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.touchEvent) JSEvents.touchEvent = _malloc( 1684 ); target = findEventTarget(target); var touchEventHandlerFunc = function(e) { assert(e); var touches = {}; var et = e.touches; for(var i = 0; i < et.length; ++i) { var touch = et[i]; // Verify that browser does not recycle touch objects with old stale data, but reports new ones each time. assert(!touch.isChanged); assert(!touch.onTarget); touches[touch.identifier] = touch; } et = e.changedTouches; for(var i = 0; i < et.length; ++i) { var touch = et[i]; // Verify that browser does not recycle touch objects with old stale data, but reports new ones each time. assert(!touch.onTarget); touch.isChanged = 1; touches[touch.identifier] = touch; } et = e.targetTouches; for(var i = 0; i < et.length; ++i) { touches[et[i].identifier].onTarget = 1; } var touchEvent = JSEvents.touchEvent; var idx = touchEvent>>2; // Pre-shift the ptr to index to HEAP32 to save code size HEAP32[idx + 1] = e.ctrlKey; HEAP32[idx + 2] = e.shiftKey; HEAP32[idx + 3] = e.altKey; HEAP32[idx + 4] = e.metaKey; idx += 5; // Advance to the start of the touch array. var targetRect = __getBoundingClientRect(target); var numTouches = 0; for(var i in touches) { var t = touches[i]; HEAP32[idx + 0] = t.identifier; HEAP32[idx + 1] = t.screenX; HEAP32[idx + 2] = t.screenY; HEAP32[idx + 3] = t.clientX; HEAP32[idx + 4] = t.clientY; HEAP32[idx + 5] = t.pageX; HEAP32[idx + 6] = t.pageY; HEAP32[idx + 7] = t.isChanged; HEAP32[idx + 8] = t.onTarget; HEAP32[idx + 9] = t.clientX - targetRect.left; HEAP32[idx + 10] = t.clientY - targetRect.top; idx += 13; if (++numTouches > 31) { break; } } HEAP32[((touchEvent)>>2)]=numTouches; if (wasmTable.get(callbackfunc)(eventTypeId, touchEvent, userData)) e.preventDefault(); }; var eventHandler = { target: target, allowsDeferredCalls: eventTypeString == 'touchstart' || eventTypeString == 'touchend', eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: touchEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); } function _emscripten_set_touchcancel_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 25, "touchcancel", targetThread); return 0; } function _emscripten_set_touchend_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 23, "touchend", targetThread); return 0; } function _emscripten_set_touchmove_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 24, "touchmove", targetThread); return 0; } function _emscripten_set_touchstart_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 22, "touchstart", targetThread); return 0; } function __fillVisibilityChangeEventData(eventStruct) { var visibilityStates = [ "hidden", "visible", "prerender", "unloaded" ]; var visibilityState = visibilityStates.indexOf(document.visibilityState); // Assigning a boolean to HEAP32 with expected type coercion. /** @suppress {checkTypes} */ HEAP32[((eventStruct)>>2)]=document.hidden; HEAP32[(((eventStruct)+(4))>>2)]=visibilityState; } function __registerVisibilityChangeEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.visibilityChangeEvent) JSEvents.visibilityChangeEvent = _malloc( 8 ); var visibilityChangeEventHandlerFunc = function(ev) { var e = ev || event; var visibilityChangeEvent = JSEvents.visibilityChangeEvent; __fillVisibilityChangeEventData(visibilityChangeEvent); if (wasmTable.get(callbackfunc)(eventTypeId, visibilityChangeEvent, userData)) e.preventDefault(); }; var eventHandler = { target: target, eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: visibilityChangeEventHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); } function _emscripten_set_visibilitychange_callback_on_thread(userData, useCapture, callbackfunc, targetThread) { if (!specialHTMLTargets[1]) { return -4; } __registerVisibilityChangeEventCallback(specialHTMLTargets[1], userData, useCapture, callbackfunc, 21, "visibilitychange", targetThread); return 0; } function __registerWheelEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { if (!JSEvents.wheelEvent) JSEvents.wheelEvent = _malloc( 96 ); // The DOM Level 3 events spec event 'wheel' var wheelHandlerFunc = function(ev) { var e = ev || event; var wheelEvent = JSEvents.wheelEvent; __fillMouseEventData(wheelEvent, e, target); HEAPF64[(((wheelEvent)+(64))>>3)]=e["deltaX"]; HEAPF64[(((wheelEvent)+(72))>>3)]=e["deltaY"]; HEAPF64[(((wheelEvent)+(80))>>3)]=e["deltaZ"]; HEAP32[(((wheelEvent)+(88))>>2)]=e["deltaMode"]; if (wasmTable.get(callbackfunc)(eventTypeId, wheelEvent, userData)) e.preventDefault(); }; var eventHandler = { target: target, allowsDeferredCalls: true, eventTypeString: eventTypeString, callbackfunc: callbackfunc, handlerFunc: wheelHandlerFunc, useCapture: useCapture }; JSEvents.registerOrRemoveHandler(eventHandler); } function _emscripten_set_wheel_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { target = findEventTarget(target); if (typeof target.onwheel !== 'undefined') { __registerWheelEventCallback(target, userData, useCapture, callbackfunc, 9, "wheel", targetThread); return 0; } else { return -1; } } function _emscripten_sleep() { throw 'Please compile your program with async support in order to use asynchronous operations like emscripten_sleep'; } var ENV={}; function getExecutableName() { return thisProgram || './this.program'; } function getEnvStrings() { if (!getEnvStrings.strings) { // Default values. // Browser language detection #8751 var lang = ((typeof navigator === 'object' && navigator.languages && navigator.languages[0]) || 'C').replace('-', '_') + '.UTF-8'; var env = { 'USER': 'web_user', 'LOGNAME': 'web_user', 'PATH': '/', 'PWD': '/', 'HOME': '/home/web_user', 'LANG': lang, '_': getExecutableName() }; // Apply the user-provided values, if any. for (var x in ENV) { env[x] = ENV[x]; } var strings = []; for (var x in env) { strings.push(x + '=' + env[x]); } getEnvStrings.strings = strings; } return getEnvStrings.strings; } function _environ_get(__environ, environ_buf) { var bufSize = 0; getEnvStrings().forEach(function(string, i) { var ptr = environ_buf + bufSize; HEAP32[(((__environ)+(i * 4))>>2)]=ptr; writeAsciiToMemory(string, ptr); bufSize += string.length + 1; }); return 0; } function _environ_sizes_get(penviron_count, penviron_buf_size) { var strings = getEnvStrings(); HEAP32[((penviron_count)>>2)]=strings.length; var bufSize = 0; strings.forEach(function(string) { bufSize += string.length + 1; }); HEAP32[((penviron_buf_size)>>2)]=bufSize; return 0; } function _fd_close(fd) {try { var stream = SYSCALLS.getStreamFromFD(fd); FS.close(stream); return 0; } catch (e) { if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); return e.errno; } } function _fd_read(fd, iov, iovcnt, pnum) {try { var stream = SYSCALLS.getStreamFromFD(fd); var num = SYSCALLS.doReadv(stream, iov, iovcnt); HEAP32[((pnum)>>2)]=num return 0; } catch (e) { if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); return e.errno; } } function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {try { var stream = SYSCALLS.getStreamFromFD(fd); var HIGH_OFFSET = 0x100000000; // 2^32 // use an unsigned operator on low and shift high by 32-bits var offset = offset_high * HIGH_OFFSET + (offset_low >>> 0); var DOUBLE_LIMIT = 0x20000000000000; // 2^53 // we also check for equality since DOUBLE_LIMIT + 1 == DOUBLE_LIMIT if (offset <= -DOUBLE_LIMIT || offset >= DOUBLE_LIMIT) { return -61; } FS.llseek(stream, offset, whence); (tempI64 = [stream.position>>>0,(tempDouble=stream.position,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math.min((+(Math.floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((newOffset)>>2)]=tempI64[0],HEAP32[(((newOffset)+(4))>>2)]=tempI64[1]); if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state return 0; } catch (e) { if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); return e.errno; } } function _fd_write(fd, iov, iovcnt, pnum) {try { var stream = SYSCALLS.getStreamFromFD(fd); var num = SYSCALLS.doWritev(stream, iov, iovcnt); HEAP32[((pnum)>>2)]=num return 0; } catch (e) { if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); return e.errno; } } function _getTempRet0() { return (getTempRet0() | 0); } function _gettimeofday(ptr) { var now = Date.now(); HEAP32[((ptr)>>2)]=(now/1000)|0; // seconds HEAP32[(((ptr)+(4))>>2)]=((now % 1000)*1000)|0; // microseconds return 0; } function _glAttachShader(program, shader) { GLctx.attachShader(GL.programs[program], GL.shaders[shader]); } function _glBindBuffer(target, buffer) { if (target == 0x88EB /*GL_PIXEL_PACK_BUFFER*/) { // In WebGL 2 glReadPixels entry point, we need to use a different WebGL 2 API function call when a buffer is bound to // GL_PIXEL_PACK_BUFFER_BINDING point, so must keep track whether that binding point is non-null to know what is // the proper API function to call. GLctx.currentPixelPackBufferBinding = buffer; } else if (target == 0x88EC /*GL_PIXEL_UNPACK_BUFFER*/) { // In WebGL 2 gl(Compressed)Tex(Sub)Image[23]D entry points, we need to // use a different WebGL 2 API function call when a buffer is bound to // GL_PIXEL_UNPACK_BUFFER_BINDING point, so must keep track whether that // binding point is non-null to know what is the proper API function to // call. GLctx.currentPixelUnpackBufferBinding = buffer; } GLctx.bindBuffer(target, GL.buffers[buffer]); } function _glBlendFunc(x0, x1) { GLctx['blendFunc'](x0, x1) } function _glBufferData(target, size, data, usage) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. if (data) { GLctx.bufferData(target, HEAPU8, usage, data, size); } else { GLctx.bufferData(target, size, usage); } } else { // N.b. here first form specifies a heap subarray, second form an integer size, so the ?: code here is polymorphic. It is advised to avoid // randomly mixing both uses in calling code, to avoid any potential JS engine JIT issues. GLctx.bufferData(target, data ? HEAPU8.subarray(data, data+size) : size, usage); } } function _glClear(x0) { GLctx['clear'](x0) } function _glClearColor(x0, x1, x2, x3) { GLctx['clearColor'](x0, x1, x2, x3) } function _glCompileShader(shader) { GLctx.compileShader(GL.shaders[shader]); } function _glCreateProgram() { var id = GL.getNewId(GL.programs); var program = GLctx.createProgram(); program.name = id; GL.programs[id] = program; return id; } function _glCreateShader(shaderType) { var id = GL.getNewId(GL.shaders); GL.shaders[id] = GLctx.createShader(shaderType); return id; } function _glDeleteProgram(id) { if (!id) return; var program = GL.programs[id]; if (!program) { // glDeleteProgram actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } GLctx.deleteProgram(program); program.name = 0; GL.programs[id] = null; GL.programInfos[id] = null; } function _glDeleteShader(id) { if (!id) return; var shader = GL.shaders[id]; if (!shader) { // glDeleteShader actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } GLctx.deleteShader(shader); GL.shaders[id] = null; } function _glDrawArrays(mode, first, count) { GLctx.drawArrays(mode, first, count); } function _glEnable(x0) { GLctx['enable'](x0) } function _glEnableVertexAttribArray(index) { GLctx.enableVertexAttribArray(index); } function _glGenBuffers(n, buffers) { __glGenObject(n, buffers, 'createBuffer', GL.buffers ); } function _glGetAttribLocation(program, name) { return GLctx.getAttribLocation(GL.programs[program], UTF8ToString(name)); } function _glGetProgramiv(program, pname, p) { if (!p) { // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } if (program >= GL.counter) { GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } var ptable = GL.programInfos[program]; if (!ptable) { GL.recordError(0x502 /* GL_INVALID_OPERATION */); return; } if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH var log = GLctx.getProgramInfoLog(GL.programs[program]); if (log === null) log = '(unknown error)'; HEAP32[((p)>>2)]=log.length + 1; } else if (pname == 0x8B87 /* GL_ACTIVE_UNIFORM_MAX_LENGTH */) { HEAP32[((p)>>2)]=ptable.maxUniformLength; } else if (pname == 0x8B8A /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */) { if (ptable.maxAttributeLength == -1) { program = GL.programs[program]; var numAttribs = GLctx.getProgramParameter(program, 0x8B89/*GL_ACTIVE_ATTRIBUTES*/); ptable.maxAttributeLength = 0; // Spec says if there are no active attribs, 0 must be returned. for (var i = 0; i < numAttribs; ++i) { var activeAttrib = GLctx.getActiveAttrib(program, i); ptable.maxAttributeLength = Math.max(ptable.maxAttributeLength, activeAttrib.name.length+1); } } HEAP32[((p)>>2)]=ptable.maxAttributeLength; } else if (pname == 0x8A35 /* GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */) { if (ptable.maxUniformBlockNameLength == -1) { program = GL.programs[program]; var numBlocks = GLctx.getProgramParameter(program, 0x8A36/*GL_ACTIVE_UNIFORM_BLOCKS*/); ptable.maxUniformBlockNameLength = 0; for (var i = 0; i < numBlocks; ++i) { var activeBlockName = GLctx.getActiveUniformBlockName(program, i); ptable.maxUniformBlockNameLength = Math.max(ptable.maxUniformBlockNameLength, activeBlockName.length+1); } } HEAP32[((p)>>2)]=ptable.maxUniformBlockNameLength; } else { HEAP32[((p)>>2)]=GLctx.getProgramParameter(GL.programs[program], pname); } } function _glGetShaderiv(shader, pname, p) { if (!p) { // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense // if p == null, issue a GL error to notify user about it. GL.recordError(0x501 /* GL_INVALID_VALUE */); return; } if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH var log = GLctx.getShaderInfoLog(GL.shaders[shader]); if (log === null) log = '(unknown error)'; // The GLES2 specification says that if the shader has an empty info log, // a value of 0 is returned. Otherwise the log has a null char appended. // (An empty string is falsey, so we can just check that instead of // looking at log.length.) var logLength = log ? log.length + 1 : 0; HEAP32[((p)>>2)]=logLength; } else if (pname == 0x8B88) { // GL_SHADER_SOURCE_LENGTH var source = GLctx.getShaderSource(GL.shaders[shader]); // source may be a null, or the empty string, both of which are falsey // values that we report a 0 length for. var sourceLength = source ? source.length + 1 : 0; HEAP32[((p)>>2)]=sourceLength; } else { HEAP32[((p)>>2)]=GLctx.getShaderParameter(GL.shaders[shader], pname); } } function _glGetUniformLocation(program, name) { name = UTF8ToString(name); var arrayIndex = 0; // If user passed an array accessor "[index]", parse the array index off the accessor. if (name[name.length - 1] == ']') { var leftBrace = name.lastIndexOf('['); arrayIndex = name[leftBrace+1] != ']' ? jstoi_q(name.slice(leftBrace + 1)) : 0; // "index]", parseInt will ignore the ']' at the end; but treat "foo[]" as "foo[0]" name = name.slice(0, leftBrace); } var uniformInfo = GL.programInfos[program] && GL.programInfos[program].uniforms[name]; // returns pair [ dimension_of_uniform_array, uniform_location ] if (uniformInfo && arrayIndex >= 0 && arrayIndex < uniformInfo[0]) { // Check if user asked for an out-of-bounds element, i.e. for 'vec4 colors[3];' user could ask for 'colors[10]' which should return -1. return uniformInfo[1] + arrayIndex; } else { return -1; } } function _glLinkProgram(program) { GLctx.linkProgram(GL.programs[program]); GL.populateUniformTable(program); } function _glShaderSource(shader, count, string, length) { var source = GL.getSource(shader, count, string, length); GLctx.shaderSource(GL.shaders[shader], source); } function _glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels) { if (GL.currentContext.version >= 2) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible. if (GLctx.currentPixelUnpackBufferBinding) { GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels); } else if (pixels) { var heap = heapObjectForWebGLType(type); GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, heap, pixels >> heapAccessShiftForWebGLHeap(heap)); } else { GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, null); } return; } GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) : null); } function _glUniform4f(location, v0, v1, v2, v3) { GLctx.uniform4f(GL.uniforms[location], v0, v1, v2, v3); } function _glUseProgram(program) { GLctx.useProgram(GL.programs[program]); } function _glVertexAttribPointer(index, size, type, normalized, stride, ptr) { GLctx.vertexAttribPointer(index, size, type, !!normalized, stride, ptr); } function _usleep(useconds) { // int usleep(useconds_t useconds); // http://pubs.opengroup.org/onlinepubs/000095399/functions/usleep.html // We're single-threaded, so use a busy loop. Super-ugly. var start = _emscripten_get_now(); while (_emscripten_get_now() - start < useconds / 1000) { // Do nothing. } } function _nanosleep(rqtp, rmtp) { // int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); if (rqtp === 0) { setErrNo(28); return -1; } var seconds = HEAP32[((rqtp)>>2)]; var nanoseconds = HEAP32[(((rqtp)+(4))>>2)]; if (nanoseconds < 0 || nanoseconds > 999999999 || seconds < 0) { setErrNo(28); return -1; } if (rmtp !== 0) { HEAP32[((rmtp)>>2)]=0; HEAP32[(((rmtp)+(4))>>2)]=0; } return _usleep((seconds * 1e6) + (nanoseconds / 1000)); } function _setTempRet0($i) { setTempRet0(($i) | 0); } function _sigaction(signum, act, oldact) { //int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); err('Calling stub instead of sigaction()'); return 0; } var __sigalrm_handler=0; function _signal(sig, func) { if (sig == 14) { __sigalrm_handler = func; } else { err('Calling stub instead of signal()'); } return 0; } var readAsmConstArgsArray=[]; function readAsmConstArgs(sigPtr, buf) { // Nobody should have mutated _readAsmConstArgsArray underneath us to be something else than an array. assert(Array.isArray(readAsmConstArgsArray)); // The input buffer is allocated on the stack, so it must be stack-aligned. assert(buf % 16 == 0); readAsmConstArgsArray.length = 0; var ch; // Most arguments are i32s, so shift the buffer pointer so it is a plain // index into HEAP32. buf >>= 2; while (ch = HEAPU8[sigPtr++]) { assert(ch === 100/*'d'*/ || ch === 102/*'f'*/ || ch === 105 /*'i'*/); // A double takes two 32-bit slots, and must also be aligned - the backend // will emit padding to avoid that. var double = ch < 105; if (double && (buf & 1)) buf++; readAsmConstArgsArray.push(double ? HEAPF64[buf++ >> 1] : HEAP32[buf]); ++buf; } return readAsmConstArgsArray; } var FSNode = /** @constructor */ function(parent, name, mode, rdev) { if (!parent) { parent = this; // root node sets parent to itself } this.parent = parent; this.mount = parent.mount; this.mounted = null; this.id = FS.nextInode++; this.name = name; this.mode = mode; this.node_ops = {}; this.stream_ops = {}; this.rdev = rdev; }; var readMode = 292/*292*/ | 73/*73*/; var writeMode = 146/*146*/; Object.defineProperties(FSNode.prototype, { read: { get: /** @this{FSNode} */function() { return (this.mode & readMode) === readMode; }, set: /** @this{FSNode} */function(val) { val ? this.mode |= readMode : this.mode &= ~readMode; } }, write: { get: /** @this{FSNode} */function() { return (this.mode & writeMode) === writeMode; }, set: /** @this{FSNode} */function(val) { val ? this.mode |= writeMode : this.mode &= ~writeMode; } }, isFolder: { get: /** @this{FSNode} */function() { return FS.isDir(this.mode); } }, isDevice: { get: /** @this{FSNode} */function() { return FS.isChrdev(this.mode); } } }); FS.FSNode = FSNode; FS.staticInit();Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createDevice"] = FS.createDevice;Module["FS_unlink"] = FS.unlink;; Module["requestFullscreen"] = function Module_requestFullscreen(lockPointer, resizeCanvas) { Browser.requestFullscreen(lockPointer, resizeCanvas) }; Module["requestFullScreen"] = function Module_requestFullScreen() { Browser.requestFullScreen() }; Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) { Browser.requestAnimationFrame(func) }; Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) }; Module["pauseMainLoop"] = function Module_pauseMainLoop() { Browser.mainLoop.pause() }; Module["resumeMainLoop"] = function Module_resumeMainLoop() { Browser.mainLoop.resume() }; Module["getUserMedia"] = function Module_getUserMedia() { Browser.getUserMedia() } Module["createContext"] = function Module_createContext(canvas, useWebGL, setInModule, webGLContextAttributes) { return Browser.createContext(canvas, useWebGL, setInModule, webGLContextAttributes) }; var GLctx;; for (var i = 0; i < 32; ++i) tempFixedLengthArray.push(new Array(i));; var miniTempWebGLFloatBuffersStorage = new Float32Array(288); for (/**@suppress{duplicate}*/var i = 0; i < 288; ++i) { miniTempWebGLFloatBuffers[i] = miniTempWebGLFloatBuffersStorage.subarray(0, i+1); } ; var __miniTempWebGLIntBuffersStorage = new Int32Array(288); for (/**@suppress{duplicate}*/var i = 0; i < 288; ++i) { __miniTempWebGLIntBuffers[i] = __miniTempWebGLIntBuffersStorage.subarray(0, i+1); } ; var ASSERTIONS = true; /** @type {function(string, boolean=, number=)} */ function intArrayFromString(stringy, dontAddNull, length) { var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; var u8array = new Array(len); var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); if (dontAddNull) u8array.length = numBytesWritten; return u8array; } function intArrayToString(array) { var ret = []; for (var i = 0; i < array.length; i++) { var chr = array[i]; if (chr > 0xFF) { if (ASSERTIONS) { assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ') at offset ' + i + ' not in 0x00-0xFF.'); } chr &= 0xFF; } ret.push(String.fromCharCode(chr)); } return ret.join(''); } __ATINIT__.push({ func: function() { ___wasm_call_ctors() } }); var asmLibraryArg = { "__sys_fcntl64": ___sys_fcntl64, "__sys_ioctl": ___sys_ioctl, "__sys_open": ___sys_open, "abort": _abort, "clock_gettime": _clock_gettime, "dlclose": _dlclose, "eglBindAPI": _eglBindAPI, "eglChooseConfig": _eglChooseConfig, "eglCreateContext": _eglCreateContext, "eglCreateWindowSurface": _eglCreateWindowSurface, "eglDestroyContext": _eglDestroyContext, "eglDestroySurface": _eglDestroySurface, "eglGetConfigAttrib": _eglGetConfigAttrib, "eglGetDisplay": _eglGetDisplay, "eglGetError": _eglGetError, "eglGetProcAddress": _eglGetProcAddress, "eglInitialize": _eglInitialize, "eglMakeCurrent": _eglMakeCurrent, "eglQueryString": _eglQueryString, "eglSwapBuffers": _eglSwapBuffers, "eglSwapInterval": _eglSwapInterval, "eglTerminate": _eglTerminate, "eglWaitGL": _eglWaitGL, "eglWaitNative": _eglWaitNative, "emscripten_asm_const_int": _emscripten_asm_const_int, "emscripten_exit_fullscreen": _emscripten_exit_fullscreen, "emscripten_exit_pointerlock": _emscripten_exit_pointerlock, "emscripten_get_device_pixel_ratio": _emscripten_get_device_pixel_ratio, "emscripten_get_element_css_size": _emscripten_get_element_css_size, "emscripten_get_gamepad_status": _emscripten_get_gamepad_status, "emscripten_get_num_gamepads": _emscripten_get_num_gamepads, "emscripten_get_preloaded_image_data": _emscripten_get_preloaded_image_data, "emscripten_get_preloaded_image_data_from_FILE": _emscripten_get_preloaded_image_data_from_FILE, "emscripten_glActiveTexture": _emscripten_glActiveTexture, "emscripten_glAttachShader": _emscripten_glAttachShader, "emscripten_glBeginQuery": _emscripten_glBeginQuery, "emscripten_glBeginQueryEXT": _emscripten_glBeginQueryEXT, "emscripten_glBeginTransformFeedback": _emscripten_glBeginTransformFeedback, "emscripten_glBindAttribLocation": _emscripten_glBindAttribLocation, "emscripten_glBindBuffer": _emscripten_glBindBuffer, "emscripten_glBindBufferBase": _emscripten_glBindBufferBase, "emscripten_glBindBufferRange": _emscripten_glBindBufferRange, "emscripten_glBindFramebuffer": _emscripten_glBindFramebuffer, "emscripten_glBindRenderbuffer": _emscripten_glBindRenderbuffer, "emscripten_glBindSampler": _emscripten_glBindSampler, "emscripten_glBindTexture": _emscripten_glBindTexture, "emscripten_glBindTransformFeedback": _emscripten_glBindTransformFeedback, "emscripten_glBindVertexArray": _emscripten_glBindVertexArray, "emscripten_glBindVertexArrayOES": _emscripten_glBindVertexArrayOES, "emscripten_glBlendColor": _emscripten_glBlendColor, "emscripten_glBlendEquation": _emscripten_glBlendEquation, "emscripten_glBlendEquationSeparate": _emscripten_glBlendEquationSeparate, "emscripten_glBlendFunc": _emscripten_glBlendFunc, "emscripten_glBlendFuncSeparate": _emscripten_glBlendFuncSeparate, "emscripten_glBlitFramebuffer": _emscripten_glBlitFramebuffer, "emscripten_glBufferData": _emscripten_glBufferData, "emscripten_glBufferSubData": _emscripten_glBufferSubData, "emscripten_glCheckFramebufferStatus": _emscripten_glCheckFramebufferStatus, "emscripten_glClear": _emscripten_glClear, "emscripten_glClearBufferfi": _emscripten_glClearBufferfi, "emscripten_glClearBufferfv": _emscripten_glClearBufferfv, "emscripten_glClearBufferiv": _emscripten_glClearBufferiv, "emscripten_glClearBufferuiv": _emscripten_glClearBufferuiv, "emscripten_glClearColor": _emscripten_glClearColor, "emscripten_glClearDepthf": _emscripten_glClearDepthf, "emscripten_glClearStencil": _emscripten_glClearStencil, "emscripten_glClientWaitSync": _emscripten_glClientWaitSync, "emscripten_glColorMask": _emscripten_glColorMask, "emscripten_glCompileShader": _emscripten_glCompileShader, "emscripten_glCompressedTexImage2D": _emscripten_glCompressedTexImage2D, "emscripten_glCompressedTexImage3D": _emscripten_glCompressedTexImage3D, "emscripten_glCompressedTexSubImage2D": _emscripten_glCompressedTexSubImage2D, "emscripten_glCompressedTexSubImage3D": _emscripten_glCompressedTexSubImage3D, "emscripten_glCopyBufferSubData": _emscripten_glCopyBufferSubData, "emscripten_glCopyTexImage2D": _emscripten_glCopyTexImage2D, "emscripten_glCopyTexSubImage2D": _emscripten_glCopyTexSubImage2D, "emscripten_glCopyTexSubImage3D": _emscripten_glCopyTexSubImage3D, "emscripten_glCreateProgram": _emscripten_glCreateProgram, "emscripten_glCreateShader": _emscripten_glCreateShader, "emscripten_glCullFace": _emscripten_glCullFace, "emscripten_glDeleteBuffers": _emscripten_glDeleteBuffers, "emscripten_glDeleteFramebuffers": _emscripten_glDeleteFramebuffers, "emscripten_glDeleteProgram": _emscripten_glDeleteProgram, "emscripten_glDeleteQueries": _emscripten_glDeleteQueries, "emscripten_glDeleteQueriesEXT": _emscripten_glDeleteQueriesEXT, "emscripten_glDeleteRenderbuffers": _emscripten_glDeleteRenderbuffers, "emscripten_glDeleteSamplers": _emscripten_glDeleteSamplers, "emscripten_glDeleteShader": _emscripten_glDeleteShader, "emscripten_glDeleteSync": _emscripten_glDeleteSync, "emscripten_glDeleteTextures": _emscripten_glDeleteTextures, "emscripten_glDeleteTransformFeedbacks": _emscripten_glDeleteTransformFeedbacks, "emscripten_glDeleteVertexArrays": _emscripten_glDeleteVertexArrays, "emscripten_glDeleteVertexArraysOES": _emscripten_glDeleteVertexArraysOES, "emscripten_glDepthFunc": _emscripten_glDepthFunc, "emscripten_glDepthMask": _emscripten_glDepthMask, "emscripten_glDepthRangef": _emscripten_glDepthRangef, "emscripten_glDetachShader": _emscripten_glDetachShader, "emscripten_glDisable": _emscripten_glDisable, "emscripten_glDisableVertexAttribArray": _emscripten_glDisableVertexAttribArray, "emscripten_glDrawArrays": _emscripten_glDrawArrays, "emscripten_glDrawArraysInstanced": _emscripten_glDrawArraysInstanced, "emscripten_glDrawArraysInstancedANGLE": _emscripten_glDrawArraysInstancedANGLE, "emscripten_glDrawArraysInstancedARB": _emscripten_glDrawArraysInstancedARB, "emscripten_glDrawArraysInstancedEXT": _emscripten_glDrawArraysInstancedEXT, "emscripten_glDrawArraysInstancedNV": _emscripten_glDrawArraysInstancedNV, "emscripten_glDrawBuffers": _emscripten_glDrawBuffers, "emscripten_glDrawBuffersEXT": _emscripten_glDrawBuffersEXT, "emscripten_glDrawBuffersWEBGL": _emscripten_glDrawBuffersWEBGL, "emscripten_glDrawElements": _emscripten_glDrawElements, "emscripten_glDrawElementsInstanced": _emscripten_glDrawElementsInstanced, "emscripten_glDrawElementsInstancedANGLE": _emscripten_glDrawElementsInstancedANGLE, "emscripten_glDrawElementsInstancedARB": _emscripten_glDrawElementsInstancedARB, "emscripten_glDrawElementsInstancedEXT": _emscripten_glDrawElementsInstancedEXT, "emscripten_glDrawElementsInstancedNV": _emscripten_glDrawElementsInstancedNV, "emscripten_glDrawRangeElements": _emscripten_glDrawRangeElements, "emscripten_glEnable": _emscripten_glEnable, "emscripten_glEnableVertexAttribArray": _emscripten_glEnableVertexAttribArray, "emscripten_glEndQuery": _emscripten_glEndQuery, "emscripten_glEndQueryEXT": _emscripten_glEndQueryEXT, "emscripten_glEndTransformFeedback": _emscripten_glEndTransformFeedback, "emscripten_glFenceSync": _emscripten_glFenceSync, "emscripten_glFinish": _emscripten_glFinish, "emscripten_glFlush": _emscripten_glFlush, "emscripten_glFramebufferRenderbuffer": _emscripten_glFramebufferRenderbuffer, "emscripten_glFramebufferTexture2D": _emscripten_glFramebufferTexture2D, "emscripten_glFramebufferTextureLayer": _emscripten_glFramebufferTextureLayer, "emscripten_glFrontFace": _emscripten_glFrontFace, "emscripten_glGenBuffers": _emscripten_glGenBuffers, "emscripten_glGenFramebuffers": _emscripten_glGenFramebuffers, "emscripten_glGenQueries": _emscripten_glGenQueries, "emscripten_glGenQueriesEXT": _emscripten_glGenQueriesEXT, "emscripten_glGenRenderbuffers": _emscripten_glGenRenderbuffers, "emscripten_glGenSamplers": _emscripten_glGenSamplers, "emscripten_glGenTextures": _emscripten_glGenTextures, "emscripten_glGenTransformFeedbacks": _emscripten_glGenTransformFeedbacks, "emscripten_glGenVertexArrays": _emscripten_glGenVertexArrays, "emscripten_glGenVertexArraysOES": _emscripten_glGenVertexArraysOES, "emscripten_glGenerateMipmap": _emscripten_glGenerateMipmap, "emscripten_glGetActiveAttrib": _emscripten_glGetActiveAttrib, "emscripten_glGetActiveUniform": _emscripten_glGetActiveUniform, "emscripten_glGetActiveUniformBlockName": _emscripten_glGetActiveUniformBlockName, "emscripten_glGetActiveUniformBlockiv": _emscripten_glGetActiveUniformBlockiv, "emscripten_glGetActiveUniformsiv": _emscripten_glGetActiveUniformsiv, "emscripten_glGetAttachedShaders": _emscripten_glGetAttachedShaders, "emscripten_glGetAttribLocation": _emscripten_glGetAttribLocation, "emscripten_glGetBooleanv": _emscripten_glGetBooleanv, "emscripten_glGetBufferParameteri64v": _emscripten_glGetBufferParameteri64v, "emscripten_glGetBufferParameteriv": _emscripten_glGetBufferParameteriv, "emscripten_glGetError": _emscripten_glGetError, "emscripten_glGetFloatv": _emscripten_glGetFloatv, "emscripten_glGetFragDataLocation": _emscripten_glGetFragDataLocation, "emscripten_glGetFramebufferAttachmentParameteriv": _emscripten_glGetFramebufferAttachmentParameteriv, "emscripten_glGetInteger64i_v": _emscripten_glGetInteger64i_v, "emscripten_glGetInteger64v": _emscripten_glGetInteger64v, "emscripten_glGetIntegeri_v": _emscripten_glGetIntegeri_v, "emscripten_glGetIntegerv": _emscripten_glGetIntegerv, "emscripten_glGetInternalformativ": _emscripten_glGetInternalformativ, "emscripten_glGetProgramBinary": _emscripten_glGetProgramBinary, "emscripten_glGetProgramInfoLog": _emscripten_glGetProgramInfoLog, "emscripten_glGetProgramiv": _emscripten_glGetProgramiv, "emscripten_glGetQueryObjecti64vEXT": _emscripten_glGetQueryObjecti64vEXT, "emscripten_glGetQueryObjectivEXT": _emscripten_glGetQueryObjectivEXT, "emscripten_glGetQueryObjectui64vEXT": _emscripten_glGetQueryObjectui64vEXT, "emscripten_glGetQueryObjectuiv": _emscripten_glGetQueryObjectuiv, "emscripten_glGetQueryObjectuivEXT": _emscripten_glGetQueryObjectuivEXT, "emscripten_glGetQueryiv": _emscripten_glGetQueryiv, "emscripten_glGetQueryivEXT": _emscripten_glGetQueryivEXT, "emscripten_glGetRenderbufferParameteriv": _emscripten_glGetRenderbufferParameteriv, "emscripten_glGetSamplerParameterfv": _emscripten_glGetSamplerParameterfv, "emscripten_glGetSamplerParameteriv": _emscripten_glGetSamplerParameteriv, "emscripten_glGetShaderInfoLog": _emscripten_glGetShaderInfoLog, "emscripten_glGetShaderPrecisionFormat": _emscripten_glGetShaderPrecisionFormat, "emscripten_glGetShaderSource": _emscripten_glGetShaderSource, "emscripten_glGetShaderiv": _emscripten_glGetShaderiv, "emscripten_glGetString": _emscripten_glGetString, "emscripten_glGetStringi": _emscripten_glGetStringi, "emscripten_glGetSynciv": _emscripten_glGetSynciv, "emscripten_glGetTexParameterfv": _emscripten_glGetTexParameterfv, "emscripten_glGetTexParameteriv": _emscripten_glGetTexParameteriv, "emscripten_glGetTransformFeedbackVarying": _emscripten_glGetTransformFeedbackVarying, "emscripten_glGetUniformBlockIndex": _emscripten_glGetUniformBlockIndex, "emscripten_glGetUniformIndices": _emscripten_glGetUniformIndices, "emscripten_glGetUniformLocation": _emscripten_glGetUniformLocation, "emscripten_glGetUniformfv": _emscripten_glGetUniformfv, "emscripten_glGetUniformiv": _emscripten_glGetUniformiv, "emscripten_glGetUniformuiv": _emscripten_glGetUniformuiv, "emscripten_glGetVertexAttribIiv": _emscripten_glGetVertexAttribIiv, "emscripten_glGetVertexAttribIuiv": _emscripten_glGetVertexAttribIuiv, "emscripten_glGetVertexAttribPointerv": _emscripten_glGetVertexAttribPointerv, "emscripten_glGetVertexAttribfv": _emscripten_glGetVertexAttribfv, "emscripten_glGetVertexAttribiv": _emscripten_glGetVertexAttribiv, "emscripten_glHint": _emscripten_glHint, "emscripten_glInvalidateFramebuffer": _emscripten_glInvalidateFramebuffer, "emscripten_glInvalidateSubFramebuffer": _emscripten_glInvalidateSubFramebuffer, "emscripten_glIsBuffer": _emscripten_glIsBuffer, "emscripten_glIsEnabled": _emscripten_glIsEnabled, "emscripten_glIsFramebuffer": _emscripten_glIsFramebuffer, "emscripten_glIsProgram": _emscripten_glIsProgram, "emscripten_glIsQuery": _emscripten_glIsQuery, "emscripten_glIsQueryEXT": _emscripten_glIsQueryEXT, "emscripten_glIsRenderbuffer": _emscripten_glIsRenderbuffer, "emscripten_glIsSampler": _emscripten_glIsSampler, "emscripten_glIsShader": _emscripten_glIsShader, "emscripten_glIsSync": _emscripten_glIsSync, "emscripten_glIsTexture": _emscripten_glIsTexture, "emscripten_glIsTransformFeedback": _emscripten_glIsTransformFeedback, "emscripten_glIsVertexArray": _emscripten_glIsVertexArray, "emscripten_glIsVertexArrayOES": _emscripten_glIsVertexArrayOES, "emscripten_glLineWidth": _emscripten_glLineWidth, "emscripten_glLinkProgram": _emscripten_glLinkProgram, "emscripten_glPauseTransformFeedback": _emscripten_glPauseTransformFeedback, "emscripten_glPixelStorei": _emscripten_glPixelStorei, "emscripten_glPolygonOffset": _emscripten_glPolygonOffset, "emscripten_glProgramBinary": _emscripten_glProgramBinary, "emscripten_glProgramParameteri": _emscripten_glProgramParameteri, "emscripten_glQueryCounterEXT": _emscripten_glQueryCounterEXT, "emscripten_glReadBuffer": _emscripten_glReadBuffer, "emscripten_glReadPixels": _emscripten_glReadPixels, "emscripten_glReleaseShaderCompiler": _emscripten_glReleaseShaderCompiler, "emscripten_glRenderbufferStorage": _emscripten_glRenderbufferStorage, "emscripten_glRenderbufferStorageMultisample": _emscripten_glRenderbufferStorageMultisample, "emscripten_glResumeTransformFeedback": _emscripten_glResumeTransformFeedback, "emscripten_glSampleCoverage": _emscripten_glSampleCoverage, "emscripten_glSamplerParameterf": _emscripten_glSamplerParameterf, "emscripten_glSamplerParameterfv": _emscripten_glSamplerParameterfv, "emscripten_glSamplerParameteri": _emscripten_glSamplerParameteri, "emscripten_glSamplerParameteriv": _emscripten_glSamplerParameteriv, "emscripten_glScissor": _emscripten_glScissor, "emscripten_glShaderBinary": _emscripten_glShaderBinary, "emscripten_glShaderSource": _emscripten_glShaderSource, "emscripten_glStencilFunc": _emscripten_glStencilFunc, "emscripten_glStencilFuncSeparate": _emscripten_glStencilFuncSeparate, "emscripten_glStencilMask": _emscripten_glStencilMask, "emscripten_glStencilMaskSeparate": _emscripten_glStencilMaskSeparate, "emscripten_glStencilOp": _emscripten_glStencilOp, "emscripten_glStencilOpSeparate": _emscripten_glStencilOpSeparate, "emscripten_glTexImage2D": _emscripten_glTexImage2D, "emscripten_glTexImage3D": _emscripten_glTexImage3D, "emscripten_glTexParameterf": _emscripten_glTexParameterf, "emscripten_glTexParameterfv": _emscripten_glTexParameterfv, "emscripten_glTexParameteri": _emscripten_glTexParameteri, "emscripten_glTexParameteriv": _emscripten_glTexParameteriv, "emscripten_glTexStorage2D": _emscripten_glTexStorage2D, "emscripten_glTexStorage3D": _emscripten_glTexStorage3D, "emscripten_glTexSubImage2D": _emscripten_glTexSubImage2D, "emscripten_glTexSubImage3D": _emscripten_glTexSubImage3D, "emscripten_glTransformFeedbackVaryings": _emscripten_glTransformFeedbackVaryings, "emscripten_glUniform1f": _emscripten_glUniform1f, "emscripten_glUniform1fv": _emscripten_glUniform1fv, "emscripten_glUniform1i": _emscripten_glUniform1i, "emscripten_glUniform1iv": _emscripten_glUniform1iv, "emscripten_glUniform1ui": _emscripten_glUniform1ui, "emscripten_glUniform1uiv": _emscripten_glUniform1uiv, "emscripten_glUniform2f": _emscripten_glUniform2f, "emscripten_glUniform2fv": _emscripten_glUniform2fv, "emscripten_glUniform2i": _emscripten_glUniform2i, "emscripten_glUniform2iv": _emscripten_glUniform2iv, "emscripten_glUniform2ui": _emscripten_glUniform2ui, "emscripten_glUniform2uiv": _emscripten_glUniform2uiv, "emscripten_glUniform3f": _emscripten_glUniform3f, "emscripten_glUniform3fv": _emscripten_glUniform3fv, "emscripten_glUniform3i": _emscripten_glUniform3i, "emscripten_glUniform3iv": _emscripten_glUniform3iv, "emscripten_glUniform3ui": _emscripten_glUniform3ui, "emscripten_glUniform3uiv": _emscripten_glUniform3uiv, "emscripten_glUniform4f": _emscripten_glUniform4f, "emscripten_glUniform4fv": _emscripten_glUniform4fv, "emscripten_glUniform4i": _emscripten_glUniform4i, "emscripten_glUniform4iv": _emscripten_glUniform4iv, "emscripten_glUniform4ui": _emscripten_glUniform4ui, "emscripten_glUniform4uiv": _emscripten_glUniform4uiv, "emscripten_glUniformBlockBinding": _emscripten_glUniformBlockBinding, "emscripten_glUniformMatrix2fv": _emscripten_glUniformMatrix2fv, "emscripten_glUniformMatrix2x3fv": _emscripten_glUniformMatrix2x3fv, "emscripten_glUniformMatrix2x4fv": _emscripten_glUniformMatrix2x4fv, "emscripten_glUniformMatrix3fv": _emscripten_glUniformMatrix3fv, "emscripten_glUniformMatrix3x2fv": _emscripten_glUniformMatrix3x2fv, "emscripten_glUniformMatrix3x4fv": _emscripten_glUniformMatrix3x4fv, "emscripten_glUniformMatrix4fv": _emscripten_glUniformMatrix4fv, "emscripten_glUniformMatrix4x2fv": _emscripten_glUniformMatrix4x2fv, "emscripten_glUniformMatrix4x3fv": _emscripten_glUniformMatrix4x3fv, "emscripten_glUseProgram": _emscripten_glUseProgram, "emscripten_glValidateProgram": _emscripten_glValidateProgram, "emscripten_glVertexAttrib1f": _emscripten_glVertexAttrib1f, "emscripten_glVertexAttrib1fv": _emscripten_glVertexAttrib1fv, "emscripten_glVertexAttrib2f": _emscripten_glVertexAttrib2f, "emscripten_glVertexAttrib2fv": _emscripten_glVertexAttrib2fv, "emscripten_glVertexAttrib3f": _emscripten_glVertexAttrib3f, "emscripten_glVertexAttrib3fv": _emscripten_glVertexAttrib3fv, "emscripten_glVertexAttrib4f": _emscripten_glVertexAttrib4f, "emscripten_glVertexAttrib4fv": _emscripten_glVertexAttrib4fv, "emscripten_glVertexAttribDivisor": _emscripten_glVertexAttribDivisor, "emscripten_glVertexAttribDivisorANGLE": _emscripten_glVertexAttribDivisorANGLE, "emscripten_glVertexAttribDivisorARB": _emscripten_glVertexAttribDivisorARB, "emscripten_glVertexAttribDivisorEXT": _emscripten_glVertexAttribDivisorEXT, "emscripten_glVertexAttribDivisorNV": _emscripten_glVertexAttribDivisorNV, "emscripten_glVertexAttribI4i": _emscripten_glVertexAttribI4i, "emscripten_glVertexAttribI4iv": _emscripten_glVertexAttribI4iv, "emscripten_glVertexAttribI4ui": _emscripten_glVertexAttribI4ui, "emscripten_glVertexAttribI4uiv": _emscripten_glVertexAttribI4uiv, "emscripten_glVertexAttribIPointer": _emscripten_glVertexAttribIPointer, "emscripten_glVertexAttribPointer": _emscripten_glVertexAttribPointer, "emscripten_glViewport": _emscripten_glViewport, "emscripten_glWaitSync": _emscripten_glWaitSync, "emscripten_has_asyncify": _emscripten_has_asyncify, "emscripten_longjmp": _emscripten_longjmp, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_request_fullscreen_strategy": _emscripten_request_fullscreen_strategy, "emscripten_request_pointerlock": _emscripten_request_pointerlock, "emscripten_resize_heap": _emscripten_resize_heap, "emscripten_sample_gamepad_data": _emscripten_sample_gamepad_data, "emscripten_set_beforeunload_callback_on_thread": _emscripten_set_beforeunload_callback_on_thread, "emscripten_set_blur_callback_on_thread": _emscripten_set_blur_callback_on_thread, "emscripten_set_canvas_element_size": _emscripten_set_canvas_element_size, "emscripten_set_element_css_size": _emscripten_set_element_css_size, "emscripten_set_focus_callback_on_thread": _emscripten_set_focus_callback_on_thread, "emscripten_set_fullscreenchange_callback_on_thread": _emscripten_set_fullscreenchange_callback_on_thread, "emscripten_set_gamepadconnected_callback_on_thread": _emscripten_set_gamepadconnected_callback_on_thread, "emscripten_set_gamepaddisconnected_callback_on_thread": _emscripten_set_gamepaddisconnected_callback_on_thread, "emscripten_set_keydown_callback_on_thread": _emscripten_set_keydown_callback_on_thread, "emscripten_set_keypress_callback_on_thread": _emscripten_set_keypress_callback_on_thread, "emscripten_set_keyup_callback_on_thread": _emscripten_set_keyup_callback_on_thread, "emscripten_set_main_loop": _emscripten_set_main_loop, "emscripten_set_mousedown_callback_on_thread": _emscripten_set_mousedown_callback_on_thread, "emscripten_set_mouseenter_callback_on_thread": _emscripten_set_mouseenter_callback_on_thread, "emscripten_set_mouseleave_callback_on_thread": _emscripten_set_mouseleave_callback_on_thread, "emscripten_set_mousemove_callback_on_thread": _emscripten_set_mousemove_callback_on_thread, "emscripten_set_mouseup_callback_on_thread": _emscripten_set_mouseup_callback_on_thread, "emscripten_set_pointerlockchange_callback_on_thread": _emscripten_set_pointerlockchange_callback_on_thread, "emscripten_set_resize_callback_on_thread": _emscripten_set_resize_callback_on_thread, "emscripten_set_touchcancel_callback_on_thread": _emscripten_set_touchcancel_callback_on_thread, "emscripten_set_touchend_callback_on_thread": _emscripten_set_touchend_callback_on_thread, "emscripten_set_touchmove_callback_on_thread": _emscripten_set_touchmove_callback_on_thread, "emscripten_set_touchstart_callback_on_thread": _emscripten_set_touchstart_callback_on_thread, "emscripten_set_visibilitychange_callback_on_thread": _emscripten_set_visibilitychange_callback_on_thread, "emscripten_set_wheel_callback_on_thread": _emscripten_set_wheel_callback_on_thread, "emscripten_sleep": _emscripten_sleep, "environ_get": _environ_get, "environ_sizes_get": _environ_sizes_get, "fd_close": _fd_close, "fd_read": _fd_read, "fd_seek": _fd_seek, "fd_write": _fd_write, "getTempRet0": _getTempRet0, "gettimeofday": _gettimeofday, "glAttachShader": _glAttachShader, "glBindBuffer": _glBindBuffer, "glBlendFunc": _glBlendFunc, "glBufferData": _glBufferData, "glClear": _glClear, "glClearColor": _glClearColor, "glCompileShader": _glCompileShader, "glCreateProgram": _glCreateProgram, "glCreateShader": _glCreateShader, "glDeleteProgram": _glDeleteProgram, "glDeleteShader": _glDeleteShader, "glDrawArrays": _glDrawArrays, "glEnable": _glEnable, "glEnableVertexAttribArray": _glEnableVertexAttribArray, "glGenBuffers": _glGenBuffers, "glGetAttribLocation": _glGetAttribLocation, "glGetProgramiv": _glGetProgramiv, "glGetShaderiv": _glGetShaderiv, "glGetUniformLocation": _glGetUniformLocation, "glLinkProgram": _glLinkProgram, "glShaderSource": _glShaderSource, "glTexImage2D": _glTexImage2D, "glUniform4f": _glUniform4f, "glUseProgram": _glUseProgram, "glVertexAttribPointer": _glVertexAttribPointer, "invoke_i": invoke_i, "invoke_ii": invoke_ii, "invoke_iii": invoke_iii, "invoke_iiii": invoke_iiii, "invoke_iiiii": invoke_iiiii, "invoke_iiiiii": invoke_iiiiii, "invoke_iiiiiiiii": invoke_iiiiiiiii, "invoke_iiiiiiiiii": invoke_iiiiiiiiii, "invoke_ji": invoke_ji, "invoke_jiji": invoke_jiji, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_viii": invoke_viii, "invoke_viiii": invoke_viiii, "memory": wasmMemory, "nanosleep": _nanosleep, "setTempRet0": _setTempRet0, "sigaction": _sigaction, "signal": _signal }; var asm = createWasm(); /** @type {function(...*):?} */ var ___wasm_call_ctors = Module["___wasm_call_ctors"] = createExportWrapper("__wasm_call_ctors"); /** @type {function(...*):?} */ var _main = Module["_main"] = createExportWrapper("main"); /** @type {function(...*):?} */ var _memcpy = Module["_memcpy"] = createExportWrapper("memcpy"); /** @type {function(...*):?} */ var _free = Module["_free"] = createExportWrapper("free"); /** @type {function(...*):?} */ var _malloc = Module["_malloc"] = createExportWrapper("malloc"); /** @type {function(...*):?} */ var _testSetjmp = Module["_testSetjmp"] = createExportWrapper("testSetjmp"); /** @type {function(...*):?} */ var _saveSetjmp = Module["_saveSetjmp"] = createExportWrapper("saveSetjmp"); /** @type {function(...*):?} */ var _memset = Module["_memset"] = createExportWrapper("memset"); /** @type {function(...*):?} */ var ___errno_location = Module["___errno_location"] = createExportWrapper("__errno_location"); /** @type {function(...*):?} */ var _fflush = Module["_fflush"] = createExportWrapper("fflush"); /** @type {function(...*):?} */ var _realloc = Module["_realloc"] = createExportWrapper("realloc"); /** @type {function(...*):?} */ var _strstr = Module["_strstr"] = createExportWrapper("strstr"); /** @type {function(...*):?} */ var _emscripten_GetProcAddress = Module["_emscripten_GetProcAddress"] = createExportWrapper("emscripten_GetProcAddress"); /** @type {function(...*):?} */ var _fileno = Module["_fileno"] = createExportWrapper("fileno"); /** @type {function(...*):?} */ var stackSave = Module["stackSave"] = createExportWrapper("stackSave"); /** @type {function(...*):?} */ var stackRestore = Module["stackRestore"] = createExportWrapper("stackRestore"); /** @type {function(...*):?} */ var stackAlloc = Module["stackAlloc"] = createExportWrapper("stackAlloc"); /** @type {function(...*):?} */ var _setThrew = Module["_setThrew"] = createExportWrapper("setThrew"); /** @type {function(...*):?} */ var dynCall_ji = Module["dynCall_ji"] = createExportWrapper("dynCall_ji"); /** @type {function(...*):?} */ var dynCall_jiji = Module["dynCall_jiji"] = createExportWrapper("dynCall_jiji"); function invoke_ii(index,a1) { var sp = stackSave(); try { return wasmTable.get(index)(a1); } catch(e) { stackRestore(sp); if (e !== e+0 && e !== 'longjmp') throw e; _setThrew(1, 0); } } function invoke_iiiii(index,a1,a2,a3,a4) { var sp = stackSave(); try { return wasmTable.get(index)(a1,a2,a3,a4); } catch(e) { stackRestore(sp); if (e !== e+0 && e !== 'longjmp') throw e; _setThrew(1, 0); } } function invoke_iiii(index,a1,a2,a3) { var sp = stackSave(); try { return wasmTable.get(index)(a1,a2,a3); } catch(e) { stackRestore(sp); if (e !== e+0 && e !== 'longjmp') throw e; _setThrew(1, 0); } } function invoke_vi(index,a1) { var sp = stackSave(); try { wasmTable.get(index)(a1); } catch(e) { stackRestore(sp); if (e !== e+0 && e !== 'longjmp') throw e; _setThrew(1, 0); } } function invoke_viii(index,a1,a2,a3) { var sp = stackSave(); try { wasmTable.get(index)(a1,a2,a3); } catch(e) { stackRestore(sp); if (e !== e+0 && e !== 'longjmp') throw e; _setThrew(1, 0); } } function invoke_vii(index,a1,a2) { var sp = stackSave(); try { wasmTable.get(index)(a1,a2); } catch(e) { stackRestore(sp); if (e !== e+0 && e !== 'longjmp') throw e; _setThrew(1, 0); } } function invoke_iii(index,a1,a2) { var sp = stackSave(); try { return wasmTable.get(index)(a1,a2); } catch(e) { stackRestore(sp); if (e !== e+0 && e !== 'longjmp') throw e; _setThrew(1, 0); } } function invoke_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9) { var sp = stackSave(); try { return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9); } catch(e) { stackRestore(sp); if (e !== e+0 && e !== 'longjmp') throw e; _setThrew(1, 0); } } function invoke_iiiiii(index,a1,a2,a3,a4,a5) { var sp = stackSave(); try { return wasmTable.get(index)(a1,a2,a3,a4,a5); } catch(e) { stackRestore(sp); if (e !== e+0 && e !== 'longjmp') throw e; _setThrew(1, 0); } } function invoke_iiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8) { var sp = stackSave(); try { return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8); } catch(e) { stackRestore(sp); if (e !== e+0 && e !== 'longjmp') throw e; _setThrew(1, 0); } } function invoke_i(index) { var sp = stackSave(); try { return wasmTable.get(index)(); } catch(e) { stackRestore(sp); if (e !== e+0 && e !== 'longjmp') throw e; _setThrew(1, 0); } } function invoke_viiii(index,a1,a2,a3,a4) { var sp = stackSave(); try { wasmTable.get(index)(a1,a2,a3,a4); } catch(e) { stackRestore(sp); if (e !== e+0 && e !== 'longjmp') throw e; _setThrew(1, 0); } } function invoke_ji(index,a1) { var sp = stackSave(); try { return dynCall_ji(index,a1); } catch(e) { stackRestore(sp); if (e !== e+0 && e !== 'longjmp') throw e; _setThrew(1, 0); } } function invoke_jiji(index,a1,a2,a3,a4) { var sp = stackSave(); try { return dynCall_jiji(index,a1,a2,a3,a4); } catch(e) { stackRestore(sp); if (e !== e+0 && e !== 'longjmp') throw e; _setThrew(1, 0); } } // === Auto-generated postamble setup entry stuff === if (!Object.getOwnPropertyDescriptor(Module, "intArrayFromString")) Module["intArrayFromString"] = function() { abort("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "intArrayToString")) Module["intArrayToString"] = function() { abort("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "ccall")) Module["ccall"] = function() { abort("'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "cwrap")) Module["cwrap"] = function() { abort("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "setValue")) Module["setValue"] = function() { abort("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "getValue")) Module["getValue"] = function() { abort("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "allocate")) Module["allocate"] = function() { abort("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "UTF8ArrayToString")) Module["UTF8ArrayToString"] = function() { abort("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "UTF8ToString")) Module["UTF8ToString"] = function() { abort("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8Array")) Module["stringToUTF8Array"] = function() { abort("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8")) Module["stringToUTF8"] = function() { abort("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF8")) Module["lengthBytesUTF8"] = function() { abort("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "stackTrace")) Module["stackTrace"] = function() { abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "addOnPreRun")) Module["addOnPreRun"] = function() { abort("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "addOnInit")) Module["addOnInit"] = function() { abort("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "addOnPreMain")) Module["addOnPreMain"] = function() { abort("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "addOnExit")) Module["addOnExit"] = function() { abort("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "addOnPostRun")) Module["addOnPostRun"] = function() { abort("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "writeStringToMemory")) Module["writeStringToMemory"] = function() { abort("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "writeArrayToMemory")) Module["writeArrayToMemory"] = function() { abort("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "writeAsciiToMemory")) Module["writeAsciiToMemory"] = function() { abort("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; Module["addRunDependency"] = addRunDependency; Module["removeRunDependency"] = removeRunDependency; if (!Object.getOwnPropertyDescriptor(Module, "FS_createFolder")) Module["FS_createFolder"] = function() { abort("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; Module["FS_createPath"] = FS.createPath; Module["FS_createDataFile"] = FS.createDataFile; Module["FS_createPreloadedFile"] = FS.createPreloadedFile; Module["FS_createLazyFile"] = FS.createLazyFile; if (!Object.getOwnPropertyDescriptor(Module, "FS_createLink")) Module["FS_createLink"] = function() { abort("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; Module["FS_createDevice"] = FS.createDevice; Module["FS_unlink"] = FS.unlink; if (!Object.getOwnPropertyDescriptor(Module, "getLEB")) Module["getLEB"] = function() { abort("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "getFunctionTables")) Module["getFunctionTables"] = function() { abort("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "alignFunctionTables")) Module["alignFunctionTables"] = function() { abort("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "registerFunctions")) Module["registerFunctions"] = function() { abort("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "addFunction")) Module["addFunction"] = function() { abort("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "removeFunction")) Module["removeFunction"] = function() { abort("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "getFuncWrapper")) Module["getFuncWrapper"] = function() { abort("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "prettyPrint")) Module["prettyPrint"] = function() { abort("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "makeBigInt")) Module["makeBigInt"] = function() { abort("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "dynCall")) Module["dynCall"] = function() { abort("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "getCompilerSetting")) Module["getCompilerSetting"] = function() { abort("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "print")) Module["print"] = function() { abort("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "printErr")) Module["printErr"] = function() { abort("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "getTempRet0")) Module["getTempRet0"] = function() { abort("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "setTempRet0")) Module["setTempRet0"] = function() { abort("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "callMain")) Module["callMain"] = function() { abort("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "abort")) Module["abort"] = function() { abort("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "stringToNewUTF8")) Module["stringToNewUTF8"] = function() { abort("'stringToNewUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "abortOnCannotGrowMemory")) Module["abortOnCannotGrowMemory"] = function() { abort("'abortOnCannotGrowMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "emscripten_realloc_buffer")) Module["emscripten_realloc_buffer"] = function() { abort("'emscripten_realloc_buffer' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "ENV")) Module["ENV"] = function() { abort("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "ERRNO_CODES")) Module["ERRNO_CODES"] = function() { abort("'ERRNO_CODES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "ERRNO_MESSAGES")) Module["ERRNO_MESSAGES"] = function() { abort("'ERRNO_MESSAGES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "setErrNo")) Module["setErrNo"] = function() { abort("'setErrNo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "DNS")) Module["DNS"] = function() { abort("'DNS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "getHostByName")) Module["getHostByName"] = function() { abort("'getHostByName' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "GAI_ERRNO_MESSAGES")) Module["GAI_ERRNO_MESSAGES"] = function() { abort("'GAI_ERRNO_MESSAGES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "Protocols")) Module["Protocols"] = function() { abort("'Protocols' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "Sockets")) Module["Sockets"] = function() { abort("'Sockets' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "getRandomDevice")) Module["getRandomDevice"] = function() { abort("'getRandomDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "traverseStack")) Module["traverseStack"] = function() { abort("'traverseStack' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "UNWIND_CACHE")) Module["UNWIND_CACHE"] = function() { abort("'UNWIND_CACHE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "withBuiltinMalloc")) Module["withBuiltinMalloc"] = function() { abort("'withBuiltinMalloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "readAsmConstArgsArray")) Module["readAsmConstArgsArray"] = function() { abort("'readAsmConstArgsArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "readAsmConstArgs")) Module["readAsmConstArgs"] = function() { abort("'readAsmConstArgs' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "mainThreadEM_ASM")) Module["mainThreadEM_ASM"] = function() { abort("'mainThreadEM_ASM' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "jstoi_q")) Module["jstoi_q"] = function() { abort("'jstoi_q' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "jstoi_s")) Module["jstoi_s"] = function() { abort("'jstoi_s' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "getExecutableName")) Module["getExecutableName"] = function() { abort("'getExecutableName' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "listenOnce")) Module["listenOnce"] = function() { abort("'listenOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "autoResumeAudioContext")) Module["autoResumeAudioContext"] = function() { abort("'autoResumeAudioContext' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "dynCallLegacy")) Module["dynCallLegacy"] = function() { abort("'dynCallLegacy' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "getDynCaller")) Module["getDynCaller"] = function() { abort("'getDynCaller' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "dynCall")) Module["dynCall"] = function() { abort("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "callRuntimeCallbacks")) Module["callRuntimeCallbacks"] = function() { abort("'callRuntimeCallbacks' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "abortStackOverflow")) Module["abortStackOverflow"] = function() { abort("'abortStackOverflow' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "reallyNegative")) Module["reallyNegative"] = function() { abort("'reallyNegative' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "unSign")) Module["unSign"] = function() { abort("'unSign' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "reSign")) Module["reSign"] = function() { abort("'reSign' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "formatString")) Module["formatString"] = function() { abort("'formatString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "PATH")) Module["PATH"] = function() { abort("'PATH' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "PATH_FS")) Module["PATH_FS"] = function() { abort("'PATH_FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "SYSCALLS")) Module["SYSCALLS"] = function() { abort("'SYSCALLS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "syscallMmap2")) Module["syscallMmap2"] = function() { abort("'syscallMmap2' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "syscallMunmap")) Module["syscallMunmap"] = function() { abort("'syscallMunmap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "JSEvents")) Module["JSEvents"] = function() { abort("'JSEvents' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "specialHTMLTargets")) Module["specialHTMLTargets"] = function() { abort("'specialHTMLTargets' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "maybeCStringToJsString")) Module["maybeCStringToJsString"] = function() { abort("'maybeCStringToJsString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "findEventTarget")) Module["findEventTarget"] = function() { abort("'findEventTarget' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "findCanvasEventTarget")) Module["findCanvasEventTarget"] = function() { abort("'findCanvasEventTarget' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "polyfillSetImmediate")) Module["polyfillSetImmediate"] = function() { abort("'polyfillSetImmediate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "demangle")) Module["demangle"] = function() { abort("'demangle' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "demangleAll")) Module["demangleAll"] = function() { abort("'demangleAll' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "jsStackTrace")) Module["jsStackTrace"] = function() { abort("'jsStackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "stackTrace")) Module["stackTrace"] = function() { abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "getEnvStrings")) Module["getEnvStrings"] = function() { abort("'getEnvStrings' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "checkWasiClock")) Module["checkWasiClock"] = function() { abort("'checkWasiClock' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "writeI53ToI64")) Module["writeI53ToI64"] = function() { abort("'writeI53ToI64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "writeI53ToI64Clamped")) Module["writeI53ToI64Clamped"] = function() { abort("'writeI53ToI64Clamped' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "writeI53ToI64Signaling")) Module["writeI53ToI64Signaling"] = function() { abort("'writeI53ToI64Signaling' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "writeI53ToU64Clamped")) Module["writeI53ToU64Clamped"] = function() { abort("'writeI53ToU64Clamped' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "writeI53ToU64Signaling")) Module["writeI53ToU64Signaling"] = function() { abort("'writeI53ToU64Signaling' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "readI53FromI64")) Module["readI53FromI64"] = function() { abort("'readI53FromI64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "readI53FromU64")) Module["readI53FromU64"] = function() { abort("'readI53FromU64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "convertI32PairToI53")) Module["convertI32PairToI53"] = function() { abort("'convertI32PairToI53' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "convertU32PairToI53")) Module["convertU32PairToI53"] = function() { abort("'convertU32PairToI53' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "exceptionLast")) Module["exceptionLast"] = function() { abort("'exceptionLast' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "exceptionCaught")) Module["exceptionCaught"] = function() { abort("'exceptionCaught' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "ExceptionInfoAttrs")) Module["ExceptionInfoAttrs"] = function() { abort("'ExceptionInfoAttrs' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "ExceptionInfo")) Module["ExceptionInfo"] = function() { abort("'ExceptionInfo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "CatchInfo")) Module["CatchInfo"] = function() { abort("'CatchInfo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "exception_addRef")) Module["exception_addRef"] = function() { abort("'exception_addRef' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "exception_decRef")) Module["exception_decRef"] = function() { abort("'exception_decRef' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "Browser")) Module["Browser"] = function() { abort("'Browser' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "funcWrappers")) Module["funcWrappers"] = function() { abort("'funcWrappers' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "getFuncWrapper")) Module["getFuncWrapper"] = function() { abort("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "setMainLoop")) Module["setMainLoop"] = function() { abort("'setMainLoop' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "FS")) Module["FS"] = function() { abort("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "mmapAlloc")) Module["mmapAlloc"] = function() { abort("'mmapAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "MEMFS")) Module["MEMFS"] = function() { abort("'MEMFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "TTY")) Module["TTY"] = function() { abort("'TTY' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "PIPEFS")) Module["PIPEFS"] = function() { abort("'PIPEFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "SOCKFS")) Module["SOCKFS"] = function() { abort("'SOCKFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "tempFixedLengthArray")) Module["tempFixedLengthArray"] = function() { abort("'tempFixedLengthArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "miniTempWebGLFloatBuffers")) Module["miniTempWebGLFloatBuffers"] = function() { abort("'miniTempWebGLFloatBuffers' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "heapObjectForWebGLType")) Module["heapObjectForWebGLType"] = function() { abort("'heapObjectForWebGLType' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "heapAccessShiftForWebGLHeap")) Module["heapAccessShiftForWebGLHeap"] = function() { abort("'heapAccessShiftForWebGLHeap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "GL")) Module["GL"] = function() { abort("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "emscriptenWebGLGet")) Module["emscriptenWebGLGet"] = function() { abort("'emscriptenWebGLGet' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "computeUnpackAlignedImageSize")) Module["computeUnpackAlignedImageSize"] = function() { abort("'computeUnpackAlignedImageSize' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "emscriptenWebGLGetTexPixelData")) Module["emscriptenWebGLGetTexPixelData"] = function() { abort("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "emscriptenWebGLGetUniform")) Module["emscriptenWebGLGetUniform"] = function() { abort("'emscriptenWebGLGetUniform' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "emscriptenWebGLGetVertexAttrib")) Module["emscriptenWebGLGetVertexAttrib"] = function() { abort("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "writeGLArray")) Module["writeGLArray"] = function() { abort("'writeGLArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "AL")) Module["AL"] = function() { abort("'AL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "SDL_unicode")) Module["SDL_unicode"] = function() { abort("'SDL_unicode' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "SDL_ttfContext")) Module["SDL_ttfContext"] = function() { abort("'SDL_ttfContext' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "SDL_audio")) Module["SDL_audio"] = function() { abort("'SDL_audio' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "SDL")) Module["SDL"] = function() { abort("'SDL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "SDL_gfx")) Module["SDL_gfx"] = function() { abort("'SDL_gfx' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "GLUT")) Module["GLUT"] = function() { abort("'GLUT' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "EGL")) Module["EGL"] = function() { abort("'EGL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "GLFW_Window")) Module["GLFW_Window"] = function() { abort("'GLFW_Window' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "GLFW")) Module["GLFW"] = function() { abort("'GLFW' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "GLEW")) Module["GLEW"] = function() { abort("'GLEW' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "IDBStore")) Module["IDBStore"] = function() { abort("'IDBStore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "runAndAbortIfError")) Module["runAndAbortIfError"] = function() { abort("'runAndAbortIfError' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "emscriptenWebGLGetIndexed")) Module["emscriptenWebGLGetIndexed"] = function() { abort("'emscriptenWebGLGetIndexed' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "warnOnce")) Module["warnOnce"] = function() { abort("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "stackSave")) Module["stackSave"] = function() { abort("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "stackRestore")) Module["stackRestore"] = function() { abort("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "stackAlloc")) Module["stackAlloc"] = function() { abort("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "AsciiToString")) Module["AsciiToString"] = function() { abort("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "stringToAscii")) Module["stringToAscii"] = function() { abort("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "UTF16ToString")) Module["UTF16ToString"] = function() { abort("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF16")) Module["stringToUTF16"] = function() { abort("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF16")) Module["lengthBytesUTF16"] = function() { abort("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "UTF32ToString")) Module["UTF32ToString"] = function() { abort("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF32")) Module["stringToUTF32"] = function() { abort("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF32")) Module["lengthBytesUTF32"] = function() { abort("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "allocateUTF8")) Module["allocateUTF8"] = function() { abort("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; if (!Object.getOwnPropertyDescriptor(Module, "allocateUTF8OnStack")) Module["allocateUTF8OnStack"] = function() { abort("'allocateUTF8OnStack' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; Module["writeStackCookie"] = writeStackCookie; Module["checkStackCookie"] = checkStackCookie; if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NORMAL")) Object.defineProperty(Module, "ALLOC_NORMAL", { configurable: true, get: function() { abort("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_STACK")) Object.defineProperty(Module, "ALLOC_STACK", { configurable: true, get: function() { abort("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); var calledRun; /** * @constructor * @this {ExitStatus} */ function ExitStatus(status) { this.name = "ExitStatus"; this.message = "Program terminated with exit(" + status + ")"; this.status = status; } var calledMain = false; dependenciesFulfilled = function runCaller() { // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) if (!calledRun) run(); if (!calledRun) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled }; function callMain(args) { assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'); assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called'); var entryFunction = Module['_main']; args = args || []; var argc = args.length+1; var argv = stackAlloc((argc + 1) * 4); HEAP32[argv >> 2] = allocateUTF8OnStack(thisProgram); for (var i = 1; i < argc; i++) { HEAP32[(argv >> 2) + i] = allocateUTF8OnStack(args[i - 1]); } HEAP32[(argv >> 2) + argc] = 0; try { var ret = entryFunction(argc, argv); // In PROXY_TO_PTHREAD builds, we should never exit the runtime below, as execution is asynchronously handed // off to a pthread. // if we're not running an evented main loop, it's time to exit exit(ret, /* implicit = */ true); } catch(e) { if (e instanceof ExitStatus) { // exit() throws this once it's done to make sure execution // has been stopped completely return; } else if (e == 'unwind') { // running an evented main loop, don't immediately exit noExitRuntime = true; return; } else { var toLog = e; if (e && typeof e === 'object' && e.stack) { toLog = [e, e.stack]; } err('exception thrown: ' + toLog); quit_(1, e); } } finally { calledMain = true; } } /** @type {function(Array=)} */ function run(args) { args = args || arguments_; if (runDependencies > 0) { return; } writeStackCookie(); preRun(); if (runDependencies > 0) return; // a preRun added a dependency, run will be called later function doRun() { // run may have just been called through dependencies being fulfilled just in this very frame, // or while the async setStatus time below was happening if (calledRun) return; calledRun = true; Module['calledRun'] = true; if (ABORT) return; initRuntime(); preMain(); if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); if (shouldRunNow) callMain(args); postRun(); } if (Module['setStatus']) { Module['setStatus']('Running...'); setTimeout(function() { setTimeout(function() { Module['setStatus'](''); }, 1); doRun(); }, 1); } else { doRun(); } checkStackCookie(); } Module['run'] = run; function checkUnflushedContent() { // Compiler settings do not allow exiting the runtime, so flushing // the streams is not possible. but in ASSERTIONS mode we check // if there was something to flush, and if so tell the user they // should request that the runtime be exitable. // Normally we would not even include flush() at all, but in ASSERTIONS // builds we do so just for this check, and here we see if there is any // content to flush, that is, we check if there would have been // something a non-ASSERTIONS build would have not seen. // How we flush the streams depends on whether we are in SYSCALLS_REQUIRE_FILESYSTEM=0 // mode (which has its own special function for this; otherwise, all // the code is inside libc) var print = out; var printErr = err; var has = false; out = err = function(x) { has = true; } try { // it doesn't matter if it fails var flush = Module['_fflush']; if (flush) flush(0); // also flush in the JS FS layer ['stdout', 'stderr'].forEach(function(name) { var info = FS.analyzePath('/dev/' + name); if (!info) return; var stream = info.object; var rdev = stream.rdev; var tty = TTY.ttys[rdev]; if (tty && tty.output && tty.output.length) { has = true; } }); } catch(e) {} out = print; err = printErr; if (has) { warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.'); } } /** @param {boolean|number=} implicit */ function exit(status, implicit) { checkUnflushedContent(); // if this is just main exit-ing implicitly, and the status is 0, then we // don't need to do anything here and can just leave. if the status is // non-zero, though, then we need to report it. // (we may have warned about this earlier, if a situation justifies doing so) if (implicit && noExitRuntime && status === 0) { return; } if (noExitRuntime) { // if exit() was called, we may warn the user if the runtime isn't actually being shut down if (!implicit) { var msg = 'program exited (with status: ' + status + '), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)'; err(msg); } } else { EXITSTATUS = status; exitRuntime(); if (Module['onExit']) Module['onExit'](status); ABORT = true; } quit_(status, new ExitStatus(status)); } if (Module['preInit']) { if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; while (Module['preInit'].length > 0) { Module['preInit'].pop()(); } } // shouldRunNow refers to calling main(), not run(). var shouldRunNow = true; if (Module['noInitialRun']) shouldRunNow = false; noExitRuntime = true; run();
var ClearCommand, Client, Connection, EventEmitter, ForwardCommand, FrameBufferCommand, GetDevicePathCommand, GetFeaturesCommand, GetPackagesCommand, GetPropertiesCommand, GetSerialNoCommand, GetStateCommand, HostConnectCommand, HostDevicesCommand, HostDevicesWithPathsCommand, HostDisconnectCommand, HostKillCommand, HostTrackDevicesCommand, HostTransportCommand, HostVersionCommand, InstallCommand, IsInstalledCommand, ListForwardsCommand, ListReversesCommand, LocalCommand, LogCommand, Logcat, LogcatCommand, Monkey, MonkeyCommand, Parser, ProcStat, Promise, RebootCommand, RemountCommand, ReverseCommand, RootCommand, ScreencapCommand, ShellCommand, StartActivityCommand, StartServiceCommand, Sync, SyncCommand, TcpCommand, TcpIpCommand, TcpUsbServer, TrackJdwpCommand, UninstallCommand, UsbCommand, WaitBootCompleteCommand, WaitForDeviceCommand, debug, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; Monkey = require('@devicefarmer/adbkit-monkey'); Logcat = require('@devicefarmer/adbkit-logcat'); Promise = require('bluebird'); EventEmitter = require('events').EventEmitter; debug = require('debug')('adb:client'); Connection = require('./connection'); Sync = require('./sync'); Parser = require('./parser'); ProcStat = require('./proc/stat'); HostVersionCommand = require('./command/host/version'); HostConnectCommand = require('./command/host/connect'); HostDevicesCommand = require('./command/host/devices'); HostDevicesWithPathsCommand = require('./command/host/deviceswithpaths'); HostDisconnectCommand = require('./command/host/disconnect'); HostTrackDevicesCommand = require('./command/host/trackdevices'); HostKillCommand = require('./command/host/kill'); HostTransportCommand = require('./command/host/transport'); ClearCommand = require('./command/host-transport/clear'); FrameBufferCommand = require('./command/host-transport/framebuffer'); GetFeaturesCommand = require('./command/host-transport/getfeatures'); GetPackagesCommand = require('./command/host-transport/getpackages'); GetPropertiesCommand = require('./command/host-transport/getproperties'); InstallCommand = require('./command/host-transport/install'); IsInstalledCommand = require('./command/host-transport/isinstalled'); ListReversesCommand = require('./command/host-transport/listreverses'); LocalCommand = require('./command/host-transport/local'); LogcatCommand = require('./command/host-transport/logcat'); LogCommand = require('./command/host-transport/log'); MonkeyCommand = require('./command/host-transport/monkey'); RebootCommand = require('./command/host-transport/reboot'); RemountCommand = require('./command/host-transport/remount'); RootCommand = require('./command/host-transport/root'); ReverseCommand = require('./command/host-transport/reverse'); ScreencapCommand = require('./command/host-transport/screencap'); ShellCommand = require('./command/host-transport/shell'); StartActivityCommand = require('./command/host-transport/startactivity'); StartServiceCommand = require('./command/host-transport/startservice'); SyncCommand = require('./command/host-transport/sync'); TcpCommand = require('./command/host-transport/tcp'); TcpIpCommand = require('./command/host-transport/tcpip'); TrackJdwpCommand = require('./command/host-transport/trackjdwp'); UninstallCommand = require('./command/host-transport/uninstall'); UsbCommand = require('./command/host-transport/usb'); WaitBootCompleteCommand = require('./command/host-transport/waitbootcomplete'); ForwardCommand = require('./command/host-serial/forward'); GetDevicePathCommand = require('./command/host-serial/getdevicepath'); GetSerialNoCommand = require('./command/host-serial/getserialno'); GetStateCommand = require('./command/host-serial/getstate'); ListForwardsCommand = require('./command/host-serial/listforwards'); WaitForDeviceCommand = require('./command/host-serial/waitfordevice'); TcpUsbServer = require('./tcpusb/server'); Client = (function(superClass) { var NoUserOptionError; extend(Client, superClass); function Client(options1) { var base, base1; this.options = options1 != null ? options1 : {}; (base = this.options).port || (base.port = 5037); (base1 = this.options).bin || (base1.bin = 'adb'); } Client.prototype.createTcpUsbBridge = function(serial, options) { return new TcpUsbServer(this, serial, options); }; Client.prototype.connection = function() { var connection; connection = new Connection(this.options); connection.on('error', (function(_this) { return function(err) { return _this.emit('error', err); }; })(this)); return connection.connect(); }; Client.prototype.version = function(callback) { return this.connection().then(function(conn) { return new HostVersionCommand(conn).execute(); }).nodeify(callback); }; Client.prototype.connect = function(host, port, callback) { var ref; if (port == null) { port = 5555; } if (typeof port === 'function') { callback = port; port = 5555; } if (host.indexOf(':') !== -1) { ref = host.split(':', 2), host = ref[0], port = ref[1]; } return this.connection().then(function(conn) { return new HostConnectCommand(conn).execute(host, port); }).nodeify(callback); }; Client.prototype.disconnect = function(host, port, callback) { var ref; if (port == null) { port = 5555; } if (typeof port === 'function') { callback = port; port = 5555; } if (host.indexOf(':') !== -1) { ref = host.split(':', 2), host = ref[0], port = ref[1]; } return this.connection().then(function(conn) { return new HostDisconnectCommand(conn).execute(host, port); }).nodeify(callback); }; Client.prototype.listDevices = function(callback) { return this.connection().then(function(conn) { return new HostDevicesCommand(conn).execute(); }).nodeify(callback); }; Client.prototype.listDevicesWithPaths = function(callback) { return this.connection().then(function(conn) { return new HostDevicesWithPathsCommand(conn).execute(); }).nodeify(callback); }; Client.prototype.trackDevices = function(callback) { return this.connection().then(function(conn) { return new HostTrackDevicesCommand(conn).execute(); }).nodeify(callback); }; Client.prototype.kill = function(callback) { return this.connection().then(function(conn) { return new HostKillCommand(conn).execute(); }).nodeify(callback); }; Client.prototype.getSerialNo = function(serial, callback) { return this.connection().then(function(conn) { return new GetSerialNoCommand(conn).execute(serial); }).nodeify(callback); }; Client.prototype.getDevicePath = function(serial, callback) { return this.connection().then(function(conn) { return new GetDevicePathCommand(conn).execute(serial); }).nodeify(callback); }; Client.prototype.getState = function(serial, callback) { return this.connection().then(function(conn) { return new GetStateCommand(conn).execute(serial); }).nodeify(callback); }; Client.prototype.getProperties = function(serial, callback) { return this.transport(serial).then(function(transport) { return new GetPropertiesCommand(transport).execute(); }).nodeify(callback); }; Client.prototype.getFeatures = function(serial, callback) { return this.transport(serial).then(function(transport) { return new GetFeaturesCommand(transport).execute(); }).nodeify(callback); }; Client.prototype.getPackages = function(serial, callback) { return this.transport(serial).then(function(transport) { return new GetPackagesCommand(transport).execute(); }).nodeify(callback); }; Client.prototype.getDHCPIpAddress = function(serial, iface, callback) { if (iface == null) { iface = 'wlan0'; } if (typeof iface === 'function') { callback = iface; iface = 'wlan0'; } return this.getProperties(serial).then(function(properties) { var ip; if (ip = properties["dhcp." + iface + ".ipaddress"]) { return ip; } throw new Error("Unable to find ipaddress for '" + iface + "'"); }); }; Client.prototype.forward = function(serial, local, remote, callback) { return this.connection().then(function(conn) { return new ForwardCommand(conn).execute(serial, local, remote); }).nodeify(callback); }; Client.prototype.listForwards = function(serial, callback) { return this.connection().then(function(conn) { return new ListForwardsCommand(conn).execute(serial); }).nodeify(callback); }; Client.prototype.reverse = function(serial, remote, local, callback) { return this.transport(serial).then(function(transport) { return new ReverseCommand(transport).execute(remote, local).nodeify(callback); }); }; Client.prototype.listReverses = function(serial, callback) { return this.transport(serial).then(function(transport) { return new ListReversesCommand(transport).execute(); }).nodeify(callback); }; Client.prototype.transport = function(serial, callback) { return this.connection().then(function(conn) { return new HostTransportCommand(conn).execute(serial)["return"](conn); }).nodeify(callback); }; Client.prototype.shell = function(serial, command, callback) { return this.transport(serial).then(function(transport) { return new ShellCommand(transport).execute(command); }).nodeify(callback); }; Client.prototype.reboot = function(serial, callback) { return this.transport(serial).then(function(transport) { return new RebootCommand(transport).execute(); }).nodeify(callback); }; Client.prototype.remount = function(serial, callback) { return this.transport(serial).then(function(transport) { return new RemountCommand(transport).execute(); }).nodeify(callback); }; Client.prototype.root = function(serial, callback) { return this.transport(serial).then(function(transport) { return new RootCommand(transport).execute(); }).nodeify(callback); }; Client.prototype.trackJdwp = function(serial, callback) { return this.transport(serial).then(function(transport) { return new TrackJdwpCommand(transport).execute(); }).nodeify(callback); }; Client.prototype.framebuffer = function(serial, format, callback) { if (format == null) { format = 'raw'; } if (typeof format === 'function') { callback = format; format = 'raw'; } return this.transport(serial).then(function(transport) { return new FrameBufferCommand(transport).execute(format); }).nodeify(callback); }; Client.prototype.screencap = function(serial, callback) { return this.transport(serial).then((function(_this) { return function(transport) { return new ScreencapCommand(transport).execute()["catch"](function(err) { debug("Emulating screencap command due to '" + err + "'"); return _this.framebuffer(serial, 'png'); }); }; })(this)).nodeify(callback); }; Client.prototype.openLocal = function(serial, path, callback) { return this.transport(serial).then(function(transport) { return new LocalCommand(transport).execute(path); }).nodeify(callback); }; Client.prototype.openLog = function(serial, name, callback) { return this.transport(serial).then(function(transport) { return new LogCommand(transport).execute(name); }).nodeify(callback); }; Client.prototype.openTcp = function(serial, port, host, callback) { if (typeof host === 'function') { callback = host; host = void 0; } return this.transport(serial).then(function(transport) { return new TcpCommand(transport).execute(port, host); }).nodeify(callback); }; Client.prototype.openMonkey = function(serial, port, callback) { var tryConnect; if (port == null) { port = 1080; } if (typeof port === 'function') { callback = port; port = 1080; } tryConnect = (function(_this) { return function(times) { return _this.openTcp(serial, port).then(function(stream) { return Monkey.connectStream(stream); })["catch"](function(err) { if (times -= 1) { debug("Monkey can't be reached, trying " + times + " more times"); return Promise.delay(100).then(function() { return tryConnect(times); }); } else { throw err; } }); }; })(this); return tryConnect(1)["catch"]((function(_this) { return function(err) { return _this.transport(serial).then(function(transport) { return new MonkeyCommand(transport).execute(port); }).then(function(out) { return tryConnect(20).then(function(monkey) { return monkey.once('end', function() { return out.end(); }); }); }); }; })(this)).nodeify(callback); }; Client.prototype.openLogcat = function(serial, options, callback) { if (typeof options === 'function') { callback = options; options = {}; } return this.transport(serial).then(function(transport) { return new LogcatCommand(transport).execute(options); }).then(function(stream) { return Logcat.readStream(stream, { fixLineFeeds: false }); }).nodeify(callback); }; Client.prototype.openProcStat = function(serial, callback) { return this.syncService(serial).then(function(sync) { return new ProcStat(sync); }).nodeify(callback); }; Client.prototype.clear = function(serial, pkg, callback) { return this.transport(serial).then(function(transport) { return new ClearCommand(transport).execute(pkg); }).nodeify(callback); }; Client.prototype.install = function(serial, apk, callback) { var temp; temp = Sync.temp(typeof apk === 'string' ? apk : '_stream.apk'); return this.push(serial, apk, temp).then((function(_this) { return function(transfer) { var endListener, errorListener, resolver; resolver = Promise.defer(); transfer.on('error', errorListener = function(err) { return resolver.reject(err); }); transfer.on('end', endListener = function() { return resolver.resolve(_this.installRemote(serial, temp)); }); return resolver.promise["finally"](function() { transfer.removeListener('error', errorListener); return transfer.removeListener('end', endListener); }); }; })(this)).nodeify(callback); }; Client.prototype.installRemote = function(serial, apk, callback) { return this.transport(serial).then((function(_this) { return function(transport) { return new InstallCommand(transport).execute(apk).then(function() { return _this.shell(serial, ['rm', '-f', apk]); }).then(function(stream) { return new Parser(stream).readAll(); }).then(function(out) { return true; }); }; })(this)).nodeify(callback); }; Client.prototype.uninstall = function(serial, pkg, callback) { return this.transport(serial).then(function(transport) { return new UninstallCommand(transport).execute(pkg); }).nodeify(callback); }; Client.prototype.isInstalled = function(serial, pkg, callback) { return this.transport(serial).then(function(transport) { return new IsInstalledCommand(transport).execute(pkg); }).nodeify(callback); }; Client.prototype.startActivity = function(serial, options, callback) { return this.transport(serial).then(function(transport) { return new StartActivityCommand(transport).execute(options); })["catch"](NoUserOptionError, (function(_this) { return function() { options.user = null; return _this.startActivity(serial, options); }; })(this)).nodeify(callback); }; Client.prototype.startService = function(serial, options, callback) { return this.transport(serial).then(function(transport) { if (!(options.user || options.user === null)) { options.user = 0; } return new StartServiceCommand(transport).execute(options); })["catch"](NoUserOptionError, (function(_this) { return function() { options.user = null; return _this.startService(serial, options); }; })(this)).nodeify(callback); }; Client.prototype.syncService = function(serial, callback) { return this.transport(serial).then(function(transport) { return new SyncCommand(transport).execute(); }).nodeify(callback); }; Client.prototype.stat = function(serial, path, callback) { return this.syncService(serial).then(function(sync) { return sync.stat(path)["finally"](function() { return sync.end(); }); }).nodeify(callback); }; Client.prototype.readdir = function(serial, path, callback) { return this.syncService(serial).then(function(sync) { return sync.readdir(path)["finally"](function() { return sync.end(); }); }).nodeify(callback); }; Client.prototype.pull = function(serial, path, callback) { return this.syncService(serial).then(function(sync) { return sync.pull(path).on('end', function() { return sync.end(); }); }).nodeify(callback); }; Client.prototype.push = function(serial, contents, path, mode, callback) { if (typeof mode === 'function') { callback = mode; mode = void 0; } return this.syncService(serial).then(function(sync) { return sync.push(contents, path, mode).on('end', function() { return sync.end(); }); }).nodeify(callback); }; Client.prototype.tcpip = function(serial, port, callback) { if (port == null) { port = 5555; } if (typeof port === 'function') { callback = port; port = 5555; } return this.transport(serial).then(function(transport) { return new TcpIpCommand(transport).execute(port); }).nodeify(callback); }; Client.prototype.usb = function(serial, callback) { return this.transport(serial).then(function(transport) { return new UsbCommand(transport).execute(); }).nodeify(callback); }; Client.prototype.waitBootComplete = function(serial, callback) { return this.transport(serial).then(function(transport) { return new WaitBootCompleteCommand(transport).execute(); }).nodeify(callback); }; Client.prototype.waitForDevice = function(serial, callback) { return this.connection().then(function(conn) { return new WaitForDeviceCommand(conn).execute(serial); }).nodeify(callback); }; NoUserOptionError = function(err) { return err.message.indexOf('--user') !== -1; }; return Client; })(EventEmitter); module.exports = Client;
const path = require('path') module.exports = { entry: ['./src/index.js'], output: { path: path.resolve('dist'), filename: 'bundle.js', }, module: { loaders: [ { exclude: /node_modules/, loader: 'babel-loader', }, ], }, resolve: { extensions: ['.js'], }, }
b=' Niao Jau Quan Zhe Lei Dang Jue Ling Ling Yan Yao Zhen Qi Ai Nu Mang Kan Jiu Yan Mian Yin Wan Yao Wa Pi Sui Kong Miu Hong Ming Ling Yi Shen Zuo Gu Tu Yong Wa Gui Hong Shi Xiong A Cheng Keng Yi Yang Ting Dou Cha Liu Qiu Xuan Shen Kuan Tong Qian Chou Wen Long An Kan Yao Fu Beng Lan Qia Dian Jiao Gui Xiong Ke Coeng Xian Wong Gong Ou Ke Ku Mei Hang Tian Gou Ma Liu Wei Wen Gong Tu Ning Mi Nup Rong Lang Qian Man Zhe Hua Yong Jin Mei Fu Tam Qu'
function RequestManager() { var _this = this; setInterval(function() { _this.tick(); }, 1000); this.requests = [] this.div = document.createElement("div"); this.div.classList.add("request_manager"); document.body.appendChild(this.div); } RequestManager.prototype.buildText = function(text, time) { return "<span>" + text + " <span class=\"yes\">Y</span> <span class=\"no\">N</span></span>"; } RequestManager.prototype.addRequest = function(id, text, time) { var request = {} request.div = document.createElement("div"); request.id = id; request.time = time - 1; request.text = text; request.div.innerHTML = this.buildText(text, time - 1); this.requests.push(request); this.div.appendChild(request.div); } RequestManager.prototype.respond = function(ok) { if (this.requests.length > 0) { var request = this.requests[0]; if (this.onResponse) this.onResponse(request.id, ok); this.div.removeChild(request.div); this.requests.splice(0, 1); } } RequestManager.prototype.tick = function() { for (var i = this.requests.length - 1; i >= 0; i--) { var request = this.requests[i]; request.time -= 1; request.div.innerHTML = this.buildText(request.text, request.time); if (request.time <= 0) { this.div.removeChild(request.div); this.requests.splice(i, 1); } } }
/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'indent', 'de', { indent: 'Einzug erhöhen', outdent: 'Einzug verringern' } );
/** * @author v.lugovsky * created on 23.12.2015 */ (function () { 'use strict'; angular.module('BlurAdmin.theme') .factory('baPanel', baPanel); /** @ngInject */ function baPanel() { /** Base baPanel directive */ return { restrict: 'A', transclude: true, template: function (elem, attrs) { var res = '<div class="panel-body" ng-transclude></div>'; var toAdd = ""; if (attrs.baPanelMeterId) { toAdd = '<span class="meter-refresh-warning"><span class="text-danger warning">not refreshing</span>&nbsp;&nbsp;|&nbsp;&nbsp;<a ui-sref="edit({resourceId: \'' + attrs.baPanelMeterId + '\'})">click to edit</a></span>'; } if (attrs.baPanelTitle) { var titleTpl = '<div class="panel-heading clearfix">' + toAdd + '<h3 class="panel-title">' + attrs.baPanelTitle + '</h3></div>'; res = titleTpl + res; // title should be before } return res; } }; } })();
module['exports'] = { silly: 'rainbow', input: 'grey', verbose: 'cyan', prompt: 'grey', info: 'green', data: 'grey', help: 'cyan', warn: 'yellow', debug: 'blue', error: 'red' };
define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};o.inherits(a,r),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function o(){var e=l.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var o="/"==e.charAt(1)?2:1;return 1==o?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==o&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==o?"":"end-")+"tag-open.xml",value:e.slice(0,o)},{type:"meta.tag.tag-name.xml",value:e.substr(o)}]},regex:"</?"+e,next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,r("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function r(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var a=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,l="[a-zA-Z\\$_\xa1-\uffff][a-zA-Z\\d\\$_\xa1-\uffff]*",u=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[i.getStartRule("doc-start"),r("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+l+")(\\.)(prototype)(\\.)("+l+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+l+")(\\.)("+l+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+l+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+l+")(\\.)("+l+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+l+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+l+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:l},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+l+")(\\.)("+l+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:l},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),r("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:l},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),e&&0==e.jsx||o.call(this)),this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};a.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var a=r[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new o(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,a=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(i,a),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var a=r.match(this.foldingStartMarker);if(a){var i=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,i);var s=e.getCommentFoldRange(n,i+a[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var a=r.match(this.foldingStopMarker);if(a){var i=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,i):e.getCommentFoldRange(n,i,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),o=n.search(/\S/),a=t,i=n.length;t+=1;for(var s=t,l=e.getLength();++t<l;){n=e.getLine(t);var u=n.search(/\S/);if(-1!==u){if(o>u)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=a)break;if(c.isMultiLine())t=c.end.row;else if(o==u)break}s=t}}return new r(a,i,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),a=e.getLength(),i=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<a;){t=e.getLine(n);var u=s.exec(t);if(u&&(u[1]?l--:l++,!l))break}var c=n;return c>i?new r(i,o,c,t.length):void 0}}.call(i.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),a=r.tokens,i=r.state;if(a.length&&"comment"==a[a.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),a=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",i=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":i,"support.constant":s,"support.type":a,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};o.inherits(m,r),t.CssHighlightRules=m}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var o={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},r=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"==typeof e[t]){var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});o.hasOwnProperty(n)||(o[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,o){this.completionsDefined||this.defineCompletions();var r=t.getTokenAt(n.row,n.column);if(!r)return[];if("ruleset"===e){var a=t.getLine(n.row).substr(0,n.column);return/:[^;]+$/.test(a)?(/([\w\-]+):[^:]*$/.test(a),this.getPropertyValueCompletions(e,t,n,o)):this.getPropertyCompletions(e,t,n,o)}return[]},this.getPropertyCompletions=function(e,t,n,r){var a=Object.keys(o);return a.map(function(e){return{caption:e,snippet:e+": $0",meta:"property",score:Number.MAX_VALUE}})},this.getPropertyValueCompletions=function(e,t,n,r){var a=t.getLine(n.row).substr(0,n.column),i=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!i)return[];var s=[];return i in o&&"object"==typeof o[i]&&(s=Object.keys(o[i])),s.map(function(e){return{caption:e,snippet:e,meta:"property value",score:Number.MAX_VALUE}})}}).call(r.prototype),t.CssCompletions=r}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),a=e("../../token_iterator").TokenIterator,i=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,o,r){if(":"===r){var i=n.getCursorPosition(),s=new a(o,i.row,i.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=o.doc.getLine(i.row),c=u.substring(i.column,i.column+1);if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(i.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&":"===i){var s=n.getCursorPosition(),l=new a(o,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=o.doc.getLine(r.start.row),g=c.substring(r.end.column,r.end.column+1);if(";"===g)return r.end.column++,r}}}),this.add("semicolon","insertion",function(e,t,n,o,r){if(";"===r){var a=n.getCursorPosition(),i=o.doc.getLine(a.row),s=i.substring(a.column,a.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};o.inherits(i,r),t.CssBehaviour=i}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,a=e("./css_highlight_rules").CssHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./css_completions").CssCompletions,u=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,g=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new u,this.$completer=new l,this.foldingRules=new c};o.inherits(g,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return o;var a=t.match(/^.*\{\s*$/);return a&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){ this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(g.prototype),t.Mode=g}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t="[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],xml_decl:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:"(?:"+t+":)?"+t},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+t+":)?"+t+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:"+t+":)?"+t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===a&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(</)("+n+"(?=\\s|>|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(r.prototype),o.inherits(a,r),t.XmlHighlightRules=a}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),a=e("./css_highlight_rules").CssHighlightRules,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=r.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(a,"css-","style"),this.embedTagRules(new i({jsx:!1}).getRules(),"js-","script"),this.constructor===u&&this.normalizeRules()};o.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,a){if('"'==a||"'"==a){var s=a,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),g=c.substring(u.column,u.column+1),d=new i(r,u.row,u.column),m=d.getCurrentToken();if(g==s&&(o(m,"attribute-value")||o(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;o(m,"tag-whitespace")||o(m,"whitespace");)m=d.stepBackward();var p=!g||g.match(/\s/);if(o(m,"attribute-equals")&&(p||">"==g)||o(m,"decl-attribute-equals")&&(p||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==a||"'"==a)){var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if(s==a)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,a){if(">"==a){var s=n.getSelectionRange().start,l=new i(r,s.row,s.column),u=l.getCurrentToken()||l.stepBackward();if(!u||!(o(u,"tag-name")||o(u,"tag-whitespace")||o(u,"attribute-name")||o(u,"attribute-equals")||o(u,"attribute-value")))return;if(o(u,"reference.attribute-value"))return;if(o(u,"attribute-value")){var c=u.value.charAt(0);if('"'==c||"'"==c){var g=u.value.charAt(u.value.length-1),d=l.getCurrentTokenColumn()+u.value.length;if(d>s.column||d==s.column&&c!=g)return}}for(;!o(u,"tag-name");)if(u=l.stepBackward(),"<"==u.value){u=l.stepForward();break}var m=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn();if(o(l.stepBackward(),"end-tag-open"))return;var h=u.value;if(m==s.row&&(h=h.substring(0,s.column-p)),this.voidElements.hasOwnProperty(h.toLowerCase()))return;return{text:"></"+h+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,o,r){if("\n"==r){var a=n.getCursorPosition(),s=o.getLine(a.row),l=new i(o,a.row,a.column),u=l.getCurrentToken();if(u&&-1!==u.type.indexOf("tag-close")){if("/>"==u.value)return;for(;u&&-1===u.type.indexOf("tag-name");)u=l.stepBackward();if(!u)return;var c=u.value,g=l.getCurrentTokenRow();if(u=l.stepBackward(),!u||-1!==u.type.indexOf("end-tag"))return;if(this.voidElements&&!this.voidElements[c]){var d=o.getTokenAt(a.row,a.column+1),s=o.getLine(g),m=this.$getIndent(s),p=m+o.getTabString();return d&&"</"===d.value?{text:"\n"+p+"\n"+m,selection:[1,p.length,1,p.length]}:{text:"\n"+p}}}}})});r.inherits(s,a),t.XmlBehaviour=s}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./fold_mode").FoldMode,a=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};o.inherits(a,r),function(){this.$getMode=function(e){"string"!=typeof e&&(e=e[0]);for(var t in this.subModes)if(0===e.indexOf(t))return this.subModes[t];return null},this.$tryMode=function(e,t,n,o){var r=this.$getMode(e);return r?r.getFoldWidget(t,n,o):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var o=this.$getMode(e.getState(n-1));return o&&o.getFoldWidget(e,t,n)||(o=this.$getMode(e.getState(n))),o&&o.getFoldWidget(e,t,n)||(o=this.defaultMode),o.getFoldWidgetRange(e,t,n)}}.call(a.prototype)}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),a=(e("../../lib/lang"),e("../../range").Range),i=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){i.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(l,i);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new u,a=0;a<n.length;a++){var i=n[a];if(o(i,"tag-open")){if(r.end.column=r.start.column+i.value.length,r.closing=o(i,"end-tag-open"),i=n[++a],!i)return null;for(r.tagName=i.value,r.end.column+=i.value.length,a++;a<n.length;a++)if(i=n[a],r.end.column+=i.value.length,o(i,"tag-close")){r.selfClosing="/>"==i.value;break}return r}if(o(i,"tag-close"))return r.selfClosing="/>"==i.value,r;r.start.column+=i.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var a=e.getTokens(t),i=0,s=0;s<a.length;s++){var l=a[s];if(i+=l.value.length,!(r>i)&&o(l,"end-tag-open")&&(l=a[s+1],l&&l.value==n))return!0}return!1},this._readTagForward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new u;do if(o(t,"tag-open"))n.closing=o(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn();else if(o(t,"tag-name"))n.tagName=t.value;else if(o(t,"tag-close"))return n.selfClosing="/>"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length,e.stepForward(),n;while(t=e.stepForward());return null},this._readTagBackward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new u;do{if(o(t,"tag-open"))return n.closing=o(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn(),e.stepBackward(),n;o(t,"tag-name")?n.tagName=t.value:o(t,"tag-close")&&(n.selfClosing="/>"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var o=this._getFirstTagInLine(e,n);if(!o)return null;var r,i=o.closing||o.selfClosing,l=[];if(i)for(var u=new s(e,n,o.end.column),c={row:n,column:o.start.column};r=this._readTagBackward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,a.fromPoints(r.start,r.end)}if(r.closing)l.push(r);else if(this._pop(l,r),0==l.length)return r.start.column+=r.tagName.length+2,r.start.row==r.end.row&&r.start.column<r.end.column&&(r.start.column=r.end.column),a.fromPoints(r.start,c)}else{var u=new s(e,n,o.start.column),g={row:n,column:o.start.column+o.tagName.length+2};for(o.start.row==o.end.row&&(g.column=o.end.column);r=this._readTagForward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,a.fromPoints(r.start,r.end)}if(r.closing){if(this._pop(l,r),0==l.length)return a.fromPoints(g,r.start)}else l.push(r)}}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./mixed").FoldMode,a=e("./xml").FoldMode,i=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){r.call(this,new a(e,t),{"js-":new i,"css-":new i})};o.inherits(s,r)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}function r(e,t){for(var n=new i(e,t.row,t.column),r=n.getCurrentToken();r&&!o(r,"tag-name");)r=n.stepBackward();return r?r.value:void 0}function a(e,t){for(var n=new i(e,t.row,t.column),r=n.getCurrentToken();r&&!o(r,"attribute-name");)r=n.stepBackward();return r?r.value:void 0}var i=e("../token_iterator").TokenIterator,s=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],l=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],u=s.concat(l),c={html:{manifest:1},head:{},title:{},base:{href:1,target:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},noscript:{href:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},section:{},nav:{},article:{pubdate:1},aside:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},header:{},footer:{},address:{},main:{},p:{},hr:{},pre:{},blockquote:{cite:1},ol:{start:1,reversed:1},ul:{},li:{value:1},dl:{},dt:{},dd:{},figure:{},figcaption:{},div:{},a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},em:{},strong:{},small:{},s:{},cite:{},q:{cite:1},dfn:{},abbr:{},data:{},time:{datetime:1},code:{},"var":{},samp:{},kbd:{},sub:{},sup:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{},bdo:{},span:{},br:{},wbr:{},ins:{cite:1,datetime:1},del:{cite:1,datetime:1},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},embed:{src:1,height:1,width:1,type:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},param:{name:1,value:1},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},source:{src:1,type:1,media:1},track:{kind:1,src:1,srclang:1,label:1,"default":1},canvas:{width:1,height:1},map:{name:1},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},svg:{},math:{},table:{summary:1},caption:{},colgroup:{span:1},col:{span:1},tbody:{},thead:{},tfoot:{},tr:{},td:{headers:1,rowspan:1,colspan:1},th:{headers:1,rowspan:1,colspan:1,scope:1},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},fieldset:{disabled:1,form:1,name:1},legend:{},label:{form:1,"for":1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},datalist:{},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},output:{"for":1,form:1,name:1},progress:{value:1,max:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},details:{open:1},summary:{},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},menu:{type:1,label:1},dialog:{open:1}},g=Object.keys(c),d=function(){};(function(){this.getCompletions=function(e,t,n,r){var a=t.getTokenAt(n.row,n.column);if(!a)return[];if(o(a,"tag-name")||o(a,"tag-open")||o(a,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(o(a,"tag-whitespace")||o(a,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(o(a,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var i=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(i)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,o){return g.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompletions=function(e,t,n,o){var a=r(t,n);if(!a)return[];var i=u;return a in c&&(i=i.concat(Object.keys(c[a]))),i.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})},this.getAttributeValueCompletions=function(e,t,n,o){var i=r(t,n),s=a(t,n);if(!i)return[];var l=[];return i in c&&s in c[i]&&"object"==typeof c[i][s]&&(l=Object.keys(c[i][s])),l.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:Number.MAX_VALUE}})},this.getHTMLEntityCompletions=function(e,t,n,o){var r=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return r.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:Number.MAX_VALUE}})}}).call(d.prototype),t.HtmlCompletions=d}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),a=e("./text").Mode,i=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new u,this.$completer=new g,this.createModeDelegates({"js-":i,"css-":s}),this.foldingRules=new c(this.voidElements,r.arrayToMap(p))};o.inherits(h,a),function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=r.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){if(this.constructor==h){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(h.prototype),t.Mode=h}),define("ace/mode/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(){var e=this.createKeywordMapper({"variable.language":"this",keyword:"abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic","constant.language":"null|true|false"},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:/'(?:.|\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n]))'/},{token:"string",start:'"',end:'"|$',next:[{token:"constant.language.escape",regex:/\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/},{token:"invalid",regex:/\\./}]},{token:"string",start:'@"',end:'"',next:[{token:"constant.language.escape",regex:'""'}]},{token:"string",start:/\$"/,end:'"|$',next:[{token:"constant.language.escape",regex:/\\(:?$)|{{/},{token:"constant.language.escape",regex:/\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/},{token:"invalid",regex:/\\./}]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"keyword",regex:"^\\s*#(if|else|elif|endif|define|undef|warning|error|line|region|endregion|pragma)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}]},this.embedRules(r,"doc-",[r.getEndRule("start")]),this.normalizeRules()};o.inherits(i,a),t.CSharpHighlightRules=i}),define("ace/mode/razor_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/html_highlight_rules","ace/mode/csharp_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),a=(e("./doc_comment_highlight_rules").DocCommentHighlightRules,e("./html_highlight_rules").HtmlHighlightRules),i=e("./csharp_highlight_rules").CSharpHighlightRules,s=function(){i.call(this);var e=function(e,t){return"function"==typeof t?t(e):t},t="in-braces";this.$rules.start.unshift({regex:"[\\[({]",onMatch:function(e,n,o){var r=/razor-[^\-]+-/.exec(n)[0];return o.unshift(e),o.unshift(r+t),this.next=r+t,"paren.lparen"}},{start:"@\\*",end:"\\*@",token:"comment"});var n={"{":"}","[":"]","(":")"};this.$rules[t]=r.deepCopy(this.$rules.start),this.$rules[t].unshift({regex:"[\\])}]",onMatch:function(t,o,r){var a=r[1];return n[a]!==t?"invalid.illegal":(r.shift(),r.shift(),this.next=e(t,r[0])||"start","paren.rparen")}})};o.inherits(s,i);var l=function(){a.call(this);var e={regex:"@[({]|@functions{",onMatch:function(e,t,n){return n.unshift(e),n.unshift("razor-block-start"),this.next="razor-block-start","punctuation.block.razor"}},t={"@{":"}","@(":")","@functions{":"}"},n={regex:"[})]",onMatch:function(e,n,o){var r=o[1];return t[r]!==e?"invalid.illegal":(o.shift(),o.shift(),this.next=o.shift()||"start","punctuation.block.razor")}},o={regex:"@(?![{(])",onMatch:function(e,t,n){return n.unshift("razor-short-start"),this.next="razor-short-start","punctuation.short.razor"}},r={token:"",regex:"(?=[^A-Za-z_\\.()\\[\\]])",next:"pop"},i=[{start:"@\\*",end:"\\*@",token:"comment"},{token:["meta.directive.razor","text","identifier"],regex:"^(\\s*@model)(\\s+)(.+)$"},e,o];for(var l in this.$rules)this.$rules[l].unshift.apply(this.$rules[l],i);this.embedRules(s,"razor-block-",[n],["start"]),this.embedRules(s,"razor-short-",[r],["start"]),this.normalizeRules()};o.inherits(l,a),t.RazorHighlightRules=l,t.RazorLangHighlightRules=s}),define("ace/mode/razor_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";var o=(e("../token_iterator").TokenIterator,["abstract","as","base","bool","break","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","else","enum","event","explicit","extern","false","finally","fixed","float","for","foreach","goto","if","implicit","in","int","interface","internal","is","lock","long","namespace","new","null","object","operator","out","override","params","private","protected","public","readonly","ref","return","sbyte","sealed","short","sizeof","stackalloc","static","string","struct","switch","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","void","volatile","while"]),r=["Html","Model","Url","Layout"],a=function(){};(function(){this.getCompletions=function(e,t,n,o){if(-1==e.lastIndexOf("razor-short-start")&&-1==e.lastIndexOf("razor-block-start"))return[];var r=t.getTokenAt(n.row,n.column);return r?-1!=e.lastIndexOf("razor-short-start")?this.getShortStartCompletions(e,t,n,o):-1!=e.lastIndexOf("razor-block-start")?this.getKeywordCompletions(e,t,n,o):void 0:[]},this.getShortStartCompletions=function(e,t,n,o){return r.map(function(e){return{value:e,meta:"keyword",score:Number.MAX_VALUE}})},this.getKeywordCompletions=function(e,t,n,a){return r.concat(o).map(function(e){return{value:e,meta:"keyword",score:Number.MAX_VALUE}})}}).call(a.prototype),t.RazorCompletions=a}),define("ace/mode/razor",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/razor_highlight_rules","ace/mode/razor_completions","ace/mode/html_completions"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./html").Mode,a=e("./razor_highlight_rules").RazorHighlightRules,i=e("./razor_completions").RazorCompletions,s=e("./html_completions").HtmlCompletions,l=function(){r.call(this),this.$highlightRules=new a,this.$completer=new i,this.$htmlCompleter=new s};o.inherits(l,r),function(){this.getCompletions=function(e,t,n,o){var r=this.$completer.getCompletions(e,t,n,o),a=this.$htmlCompleter.getCompletions(e,t,n,o);return r.concat(a)},this.createWorker=function(e){return null},this.$id="ace/mode/razor"}.call(l.prototype),t.Mode=l});
import requests import re import urllib2 prodid_re = re.compile("productionId=(.+?)[\"\']") stream_re = re.compile("<MediaFiles base=\"(.+?)\"") format_re = re.compile("mp4:production/priority/CATCHUP/.+?\\.mp4") srv_url = "http://mercury.itv.com/PlaylistService.svc" player_url = "http://mediaplayer.itv.com/2.18.1%2Bbuild.4af2e24ee8/ITVMediaPlayer.swf" def get(url, params=None): r = requests.get(url, params=params) if r.status_code >= 300: raise Exception("Request : '" + url + "' returned: " + str(r.status_code)) return r.text def _get_playlist(id): body = _soap_msg % id headers = { "Host":"mercury.itv.com", "Referer":"http://www.itv.com/mercury/Mercury_VideoPlayer.swf?v=1.6.479/[[DYNAMIC]]/2", "Content-type":"text/xml; charset=utf-8", "SOAPAction":"http://tempuri.org/PlaylistService/GetPlaylist" } r = requests.post(srv_url, data=body, headers=headers) if r.status_code >= 300: raise Exception("Request : '" + srv_url + "' returned: " + str(r.status_code)) return r.text def extract(url): page = get(url) matches = prodid_re.search(page) if not matches or len(matches.groups()) == 0: raise Exception("Unable to find production id") prodid = matches.group(1) prodid = urllib2.unquote(prodid) playlist = _get_playlist(prodid) matches = stream_re.search(playlist) if not matches or len(matches.groups()) == 0: if "InvalidGeoRegion" in playlist: raise Exception("Programme only available in UK") else: raise Exception("Unable to find rtmpe stream") stream = matches.group(1).replace('&amp;', '&') formats = format_re.findall(playlist) if not formats or len(formats) == 0: raise Exception("Unable to find play format") # First format is lowest quality and last is highest quality quality = formats[len(formats)-1] cmd = ['-r', stream, '--swfUrl', player_url, '--playpath', quality, '--swfVfy', player_url] return cmd _soap_msg = """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:itv="http://schemas.datacontract.org/2004/07/Itv.BB.Mercury.Common.Types" xmlns:com="http://schemas.itv.com/2009/05/Common"> <soapenv:Header/> <soapenv:Body> <tem:GetPlaylist> <tem:request> <itv:ProductionId>%s</itv:ProductionId> <itv:RequestGuid>FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF</itv:RequestGuid> <itv:Vodcrid> <com:Id/> <com:Partition>itv.com</com:Partition> </itv:Vodcrid> </tem:request> <tem:userInfo> <itv:Broadcaster>Itv</itv:Broadcaster> <itv:GeoLocationToken> <itv:Token/> </itv:GeoLocationToken> <itv:RevenueScienceValue>ITVPLAYER.12.18.4</itv:RevenueScienceValue> <itv:SessionId/> <itv:SsoToken/> <itv:UserToken/> </tem:userInfo> <tem:siteInfo> <itv:AdvertisingRestriction>None</itv:AdvertisingRestriction> <itv:AdvertisingSite>ITV</itv:AdvertisingSite> <itv:AdvertisingType>Any</itv:AdvertisingType> <itv:Area>ITVPLAYER.VIDEO</itv:Area> <itv:Category/> <itv:Platform>DotCom</itv:Platform> <itv:Site>ItvCom</itv:Site> </tem:siteInfo> <tem:deviceInfo> <itv:ScreenSize>Big</itv:ScreenSize> </tem:deviceInfo> <tem:playerInfo> <itv:Version>2</itv:Version> </tem:playerInfo> </tem:GetPlaylist> </soapenv:Body> </soapenv:Envelope>"""
/*! Built with http://stenciljs.com */ const{h:t}=window.App;import{c as e,d as n}from"./chunk-b59b7ee0.js";function o(t){let o,a,d=10*-r,u=0,f=!1;const l=new WeakMap;function p(t){d=e(t),m(t)}function v(){clearTimeout(a),o&&(w(!1),o=void 0),f=!0}function h(t){o||(f=!1,L(function(t){if(!t.composedPath)return t.target.closest("[ion-activable]");{const e=t.composedPath();for(let t=0;t<e.length-2;t++){const n=e[t];if(n.hasAttribute&&n.hasAttribute("ion-activable"))return n}}}(t),t))}function m(t){L(void 0,t),f&&t.cancelable&&t.preventDefault()}function L(t,e){if(t&&t===o)return;clearTimeout(a),a=void 0;const{x:s,y:r}=n(e);if(o){if(l.has(o))throw new Error("internal error");o.classList.contains(i)||b(o,s,r),w(!0)}if(t){const e=l.get(t);e&&(clearTimeout(e),l.delete(t)),t.classList.remove(i),a=setTimeout(()=>{b(t,s,r),a=void 0},c)}o=t}function b(t,e,n){u=Date.now(),t.classList.add(i);const o=function(t){if(t.shadowRoot){const e=t.shadowRoot.querySelector("ion-ripple-effect");if(e)return e}return t.querySelector("ion-ripple-effect")}(t);o&&o.addRipple&&o.addRipple(e,n)}function w(t){const e=o;if(!e)return;const n=s-Date.now()+u;if(t&&n>0){const t=setTimeout(()=>{e.classList.remove(i),l.delete(e)},s);l.set(e,t)}else e.classList.remove(i)}t.body.addEventListener("click",function(t){f&&(t.preventDefault(),t.stopPropagation())},!0),t.body.addEventListener("ionScrollStart",v),t.body.addEventListener("ionGestureCaptured",v),t.addEventListener("touchstart",function(t){d=e(t),h(t)},!0),t.addEventListener("touchcancel",p,!0),t.addEventListener("touchend",p,!0),t.addEventListener("mousedown",function(t){const n=e(t)-r;d<n&&h(t)},!0),t.addEventListener("mouseup",function(t){const n=e(t)-r;d<n&&m(t)},!0)}const i="activated",c=200,s=200,r=2500;export{o as startTapClick};
#!/usr/bin/env python3 import rospy import std_msgs.msg from geometry_msgs.msg import Twist from sensor_msgs.msg import RegionOfInterest as ROI import numpy as np w = 640 h = 640 pid_w = [0.5, 0, 0] # pid parameters of yaw channel pid_h = [0.8, 0, 0] # pid parameters of up channel pid_f = [0.8, 0, 0] # pid parameters of forward channel if __name__ == '__main__': rospy.init_node('pid', anonymous=True) sub = rospy.Subscriber("roi", ROI, callback) pub = rospy.Publisher('cmd_vel', Twist, queue_size=1) rospy.spin()
# coding: utf-8 """ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import inspect import pprint import re # noqa: F401 import six from petstore_api.configuration import Configuration class XmlItem(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'attribute_string': 'str', 'attribute_number': 'float', 'attribute_integer': 'int', 'attribute_boolean': 'bool', 'wrapped_array': 'list[int]', 'name_string': 'str', 'name_number': 'float', 'name_integer': 'int', 'name_boolean': 'bool', 'name_array': 'list[int]', 'name_wrapped_array': 'list[int]', 'prefix_string': 'str', 'prefix_number': 'float', 'prefix_integer': 'int', 'prefix_boolean': 'bool', 'prefix_array': 'list[int]', 'prefix_wrapped_array': 'list[int]', 'namespace_string': 'str', 'namespace_number': 'float', 'namespace_integer': 'int', 'namespace_boolean': 'bool', 'namespace_array': 'list[int]', 'namespace_wrapped_array': 'list[int]', 'prefix_ns_string': 'str', 'prefix_ns_number': 'float', 'prefix_ns_integer': 'int', 'prefix_ns_boolean': 'bool', 'prefix_ns_array': 'list[int]', 'prefix_ns_wrapped_array': 'list[int]' } attribute_map = { 'attribute_string': 'attribute_string', 'attribute_number': 'attribute_number', 'attribute_integer': 'attribute_integer', 'attribute_boolean': 'attribute_boolean', 'wrapped_array': 'wrapped_array', 'name_string': 'name_string', 'name_number': 'name_number', 'name_integer': 'name_integer', 'name_boolean': 'name_boolean', 'name_array': 'name_array', 'name_wrapped_array': 'name_wrapped_array', 'prefix_string': 'prefix_string', 'prefix_number': 'prefix_number', 'prefix_integer': 'prefix_integer', 'prefix_boolean': 'prefix_boolean', 'prefix_array': 'prefix_array', 'prefix_wrapped_array': 'prefix_wrapped_array', 'namespace_string': 'namespace_string', 'namespace_number': 'namespace_number', 'namespace_integer': 'namespace_integer', 'namespace_boolean': 'namespace_boolean', 'namespace_array': 'namespace_array', 'namespace_wrapped_array': 'namespace_wrapped_array', 'prefix_ns_string': 'prefix_ns_string', 'prefix_ns_number': 'prefix_ns_number', 'prefix_ns_integer': 'prefix_ns_integer', 'prefix_ns_boolean': 'prefix_ns_boolean', 'prefix_ns_array': 'prefix_ns_array', 'prefix_ns_wrapped_array': 'prefix_ns_wrapped_array' } def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None, local_vars_configuration=None): # noqa: E501 """XmlItem - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._attribute_string = None self._attribute_number = None self._attribute_integer = None self._attribute_boolean = None self._wrapped_array = None self._name_string = None self._name_number = None self._name_integer = None self._name_boolean = None self._name_array = None self._name_wrapped_array = None self._prefix_string = None self._prefix_number = None self._prefix_integer = None self._prefix_boolean = None self._prefix_array = None self._prefix_wrapped_array = None self._namespace_string = None self._namespace_number = None self._namespace_integer = None self._namespace_boolean = None self._namespace_array = None self._namespace_wrapped_array = None self._prefix_ns_string = None self._prefix_ns_number = None self._prefix_ns_integer = None self._prefix_ns_boolean = None self._prefix_ns_array = None self._prefix_ns_wrapped_array = None self.discriminator = None if attribute_string is not None: self.attribute_string = attribute_string if attribute_number is not None: self.attribute_number = attribute_number if attribute_integer is not None: self.attribute_integer = attribute_integer if attribute_boolean is not None: self.attribute_boolean = attribute_boolean if wrapped_array is not None: self.wrapped_array = wrapped_array if name_string is not None: self.name_string = name_string if name_number is not None: self.name_number = name_number if name_integer is not None: self.name_integer = name_integer if name_boolean is not None: self.name_boolean = name_boolean if name_array is not None: self.name_array = name_array if name_wrapped_array is not None: self.name_wrapped_array = name_wrapped_array if prefix_string is not None: self.prefix_string = prefix_string if prefix_number is not None: self.prefix_number = prefix_number if prefix_integer is not None: self.prefix_integer = prefix_integer if prefix_boolean is not None: self.prefix_boolean = prefix_boolean if prefix_array is not None: self.prefix_array = prefix_array if prefix_wrapped_array is not None: self.prefix_wrapped_array = prefix_wrapped_array if namespace_string is not None: self.namespace_string = namespace_string if namespace_number is not None: self.namespace_number = namespace_number if namespace_integer is not None: self.namespace_integer = namespace_integer if namespace_boolean is not None: self.namespace_boolean = namespace_boolean if namespace_array is not None: self.namespace_array = namespace_array if namespace_wrapped_array is not None: self.namespace_wrapped_array = namespace_wrapped_array if prefix_ns_string is not None: self.prefix_ns_string = prefix_ns_string if prefix_ns_number is not None: self.prefix_ns_number = prefix_ns_number if prefix_ns_integer is not None: self.prefix_ns_integer = prefix_ns_integer if prefix_ns_boolean is not None: self.prefix_ns_boolean = prefix_ns_boolean if prefix_ns_array is not None: self.prefix_ns_array = prefix_ns_array if prefix_ns_wrapped_array is not None: self.prefix_ns_wrapped_array = prefix_ns_wrapped_array @property def attribute_string(self): """Gets the attribute_string of this XmlItem. # noqa: E501 :return: The attribute_string of this XmlItem. # noqa: E501 :rtype: str """ return self._attribute_string @attribute_string.setter def attribute_string(self, attribute_string): """Sets the attribute_string of this XmlItem. :param attribute_string: The attribute_string of this XmlItem. # noqa: E501 :type attribute_string: str """ self._attribute_string = attribute_string @property def attribute_number(self): """Gets the attribute_number of this XmlItem. # noqa: E501 :return: The attribute_number of this XmlItem. # noqa: E501 :rtype: float """ return self._attribute_number @attribute_number.setter def attribute_number(self, attribute_number): """Sets the attribute_number of this XmlItem. :param attribute_number: The attribute_number of this XmlItem. # noqa: E501 :type attribute_number: float """ self._attribute_number = attribute_number @property def attribute_integer(self): """Gets the attribute_integer of this XmlItem. # noqa: E501 :return: The attribute_integer of this XmlItem. # noqa: E501 :rtype: int """ return self._attribute_integer @attribute_integer.setter def attribute_integer(self, attribute_integer): """Sets the attribute_integer of this XmlItem. :param attribute_integer: The attribute_integer of this XmlItem. # noqa: E501 :type attribute_integer: int """ self._attribute_integer = attribute_integer @property def attribute_boolean(self): """Gets the attribute_boolean of this XmlItem. # noqa: E501 :return: The attribute_boolean of this XmlItem. # noqa: E501 :rtype: bool """ return self._attribute_boolean @attribute_boolean.setter def attribute_boolean(self, attribute_boolean): """Sets the attribute_boolean of this XmlItem. :param attribute_boolean: The attribute_boolean of this XmlItem. # noqa: E501 :type attribute_boolean: bool """ self._attribute_boolean = attribute_boolean @property def wrapped_array(self): """Gets the wrapped_array of this XmlItem. # noqa: E501 :return: The wrapped_array of this XmlItem. # noqa: E501 :rtype: list[int] """ return self._wrapped_array @wrapped_array.setter def wrapped_array(self, wrapped_array): """Sets the wrapped_array of this XmlItem. :param wrapped_array: The wrapped_array of this XmlItem. # noqa: E501 :type wrapped_array: list[int] """ self._wrapped_array = wrapped_array @property def name_string(self): """Gets the name_string of this XmlItem. # noqa: E501 :return: The name_string of this XmlItem. # noqa: E501 :rtype: str """ return self._name_string @name_string.setter def name_string(self, name_string): """Sets the name_string of this XmlItem. :param name_string: The name_string of this XmlItem. # noqa: E501 :type name_string: str """ self._name_string = name_string @property def name_number(self): """Gets the name_number of this XmlItem. # noqa: E501 :return: The name_number of this XmlItem. # noqa: E501 :rtype: float """ return self._name_number @name_number.setter def name_number(self, name_number): """Sets the name_number of this XmlItem. :param name_number: The name_number of this XmlItem. # noqa: E501 :type name_number: float """ self._name_number = name_number @property def name_integer(self): """Gets the name_integer of this XmlItem. # noqa: E501 :return: The name_integer of this XmlItem. # noqa: E501 :rtype: int """ return self._name_integer @name_integer.setter def name_integer(self, name_integer): """Sets the name_integer of this XmlItem. :param name_integer: The name_integer of this XmlItem. # noqa: E501 :type name_integer: int """ self._name_integer = name_integer @property def name_boolean(self): """Gets the name_boolean of this XmlItem. # noqa: E501 :return: The name_boolean of this XmlItem. # noqa: E501 :rtype: bool """ return self._name_boolean @name_boolean.setter def name_boolean(self, name_boolean): """Sets the name_boolean of this XmlItem. :param name_boolean: The name_boolean of this XmlItem. # noqa: E501 :type name_boolean: bool """ self._name_boolean = name_boolean @property def name_array(self): """Gets the name_array of this XmlItem. # noqa: E501 :return: The name_array of this XmlItem. # noqa: E501 :rtype: list[int] """ return self._name_array @name_array.setter def name_array(self, name_array): """Sets the name_array of this XmlItem. :param name_array: The name_array of this XmlItem. # noqa: E501 :type name_array: list[int] """ self._name_array = name_array @property def name_wrapped_array(self): """Gets the name_wrapped_array of this XmlItem. # noqa: E501 :return: The name_wrapped_array of this XmlItem. # noqa: E501 :rtype: list[int] """ return self._name_wrapped_array @name_wrapped_array.setter def name_wrapped_array(self, name_wrapped_array): """Sets the name_wrapped_array of this XmlItem. :param name_wrapped_array: The name_wrapped_array of this XmlItem. # noqa: E501 :type name_wrapped_array: list[int] """ self._name_wrapped_array = name_wrapped_array @property def prefix_string(self): """Gets the prefix_string of this XmlItem. # noqa: E501 :return: The prefix_string of this XmlItem. # noqa: E501 :rtype: str """ return self._prefix_string @prefix_string.setter def prefix_string(self, prefix_string): """Sets the prefix_string of this XmlItem. :param prefix_string: The prefix_string of this XmlItem. # noqa: E501 :type prefix_string: str """ self._prefix_string = prefix_string @property def prefix_number(self): """Gets the prefix_number of this XmlItem. # noqa: E501 :return: The prefix_number of this XmlItem. # noqa: E501 :rtype: float """ return self._prefix_number @prefix_number.setter def prefix_number(self, prefix_number): """Sets the prefix_number of this XmlItem. :param prefix_number: The prefix_number of this XmlItem. # noqa: E501 :type prefix_number: float """ self._prefix_number = prefix_number @property def prefix_integer(self): """Gets the prefix_integer of this XmlItem. # noqa: E501 :return: The prefix_integer of this XmlItem. # noqa: E501 :rtype: int """ return self._prefix_integer @prefix_integer.setter def prefix_integer(self, prefix_integer): """Sets the prefix_integer of this XmlItem. :param prefix_integer: The prefix_integer of this XmlItem. # noqa: E501 :type prefix_integer: int """ self._prefix_integer = prefix_integer @property def prefix_boolean(self): """Gets the prefix_boolean of this XmlItem. # noqa: E501 :return: The prefix_boolean of this XmlItem. # noqa: E501 :rtype: bool """ return self._prefix_boolean @prefix_boolean.setter def prefix_boolean(self, prefix_boolean): """Sets the prefix_boolean of this XmlItem. :param prefix_boolean: The prefix_boolean of this XmlItem. # noqa: E501 :type prefix_boolean: bool """ self._prefix_boolean = prefix_boolean @property def prefix_array(self): """Gets the prefix_array of this XmlItem. # noqa: E501 :return: The prefix_array of this XmlItem. # noqa: E501 :rtype: list[int] """ return self._prefix_array @prefix_array.setter def prefix_array(self, prefix_array): """Sets the prefix_array of this XmlItem. :param prefix_array: The prefix_array of this XmlItem. # noqa: E501 :type prefix_array: list[int] """ self._prefix_array = prefix_array @property def prefix_wrapped_array(self): """Gets the prefix_wrapped_array of this XmlItem. # noqa: E501 :return: The prefix_wrapped_array of this XmlItem. # noqa: E501 :rtype: list[int] """ return self._prefix_wrapped_array @prefix_wrapped_array.setter def prefix_wrapped_array(self, prefix_wrapped_array): """Sets the prefix_wrapped_array of this XmlItem. :param prefix_wrapped_array: The prefix_wrapped_array of this XmlItem. # noqa: E501 :type prefix_wrapped_array: list[int] """ self._prefix_wrapped_array = prefix_wrapped_array @property def namespace_string(self): """Gets the namespace_string of this XmlItem. # noqa: E501 :return: The namespace_string of this XmlItem. # noqa: E501 :rtype: str """ return self._namespace_string @namespace_string.setter def namespace_string(self, namespace_string): """Sets the namespace_string of this XmlItem. :param namespace_string: The namespace_string of this XmlItem. # noqa: E501 :type namespace_string: str """ self._namespace_string = namespace_string @property def namespace_number(self): """Gets the namespace_number of this XmlItem. # noqa: E501 :return: The namespace_number of this XmlItem. # noqa: E501 :rtype: float """ return self._namespace_number @namespace_number.setter def namespace_number(self, namespace_number): """Sets the namespace_number of this XmlItem. :param namespace_number: The namespace_number of this XmlItem. # noqa: E501 :type namespace_number: float """ self._namespace_number = namespace_number @property def namespace_integer(self): """Gets the namespace_integer of this XmlItem. # noqa: E501 :return: The namespace_integer of this XmlItem. # noqa: E501 :rtype: int """ return self._namespace_integer @namespace_integer.setter def namespace_integer(self, namespace_integer): """Sets the namespace_integer of this XmlItem. :param namespace_integer: The namespace_integer of this XmlItem. # noqa: E501 :type namespace_integer: int """ self._namespace_integer = namespace_integer @property def namespace_boolean(self): """Gets the namespace_boolean of this XmlItem. # noqa: E501 :return: The namespace_boolean of this XmlItem. # noqa: E501 :rtype: bool """ return self._namespace_boolean @namespace_boolean.setter def namespace_boolean(self, namespace_boolean): """Sets the namespace_boolean of this XmlItem. :param namespace_boolean: The namespace_boolean of this XmlItem. # noqa: E501 :type namespace_boolean: bool """ self._namespace_boolean = namespace_boolean @property def namespace_array(self): """Gets the namespace_array of this XmlItem. # noqa: E501 :return: The namespace_array of this XmlItem. # noqa: E501 :rtype: list[int] """ return self._namespace_array @namespace_array.setter def namespace_array(self, namespace_array): """Sets the namespace_array of this XmlItem. :param namespace_array: The namespace_array of this XmlItem. # noqa: E501 :type namespace_array: list[int] """ self._namespace_array = namespace_array @property def namespace_wrapped_array(self): """Gets the namespace_wrapped_array of this XmlItem. # noqa: E501 :return: The namespace_wrapped_array of this XmlItem. # noqa: E501 :rtype: list[int] """ return self._namespace_wrapped_array @namespace_wrapped_array.setter def namespace_wrapped_array(self, namespace_wrapped_array): """Sets the namespace_wrapped_array of this XmlItem. :param namespace_wrapped_array: The namespace_wrapped_array of this XmlItem. # noqa: E501 :type namespace_wrapped_array: list[int] """ self._namespace_wrapped_array = namespace_wrapped_array @property def prefix_ns_string(self): """Gets the prefix_ns_string of this XmlItem. # noqa: E501 :return: The prefix_ns_string of this XmlItem. # noqa: E501 :rtype: str """ return self._prefix_ns_string @prefix_ns_string.setter def prefix_ns_string(self, prefix_ns_string): """Sets the prefix_ns_string of this XmlItem. :param prefix_ns_string: The prefix_ns_string of this XmlItem. # noqa: E501 :type prefix_ns_string: str """ self._prefix_ns_string = prefix_ns_string @property def prefix_ns_number(self): """Gets the prefix_ns_number of this XmlItem. # noqa: E501 :return: The prefix_ns_number of this XmlItem. # noqa: E501 :rtype: float """ return self._prefix_ns_number @prefix_ns_number.setter def prefix_ns_number(self, prefix_ns_number): """Sets the prefix_ns_number of this XmlItem. :param prefix_ns_number: The prefix_ns_number of this XmlItem. # noqa: E501 :type prefix_ns_number: float """ self._prefix_ns_number = prefix_ns_number @property def prefix_ns_integer(self): """Gets the prefix_ns_integer of this XmlItem. # noqa: E501 :return: The prefix_ns_integer of this XmlItem. # noqa: E501 :rtype: int """ return self._prefix_ns_integer @prefix_ns_integer.setter def prefix_ns_integer(self, prefix_ns_integer): """Sets the prefix_ns_integer of this XmlItem. :param prefix_ns_integer: The prefix_ns_integer of this XmlItem. # noqa: E501 :type prefix_ns_integer: int """ self._prefix_ns_integer = prefix_ns_integer @property def prefix_ns_boolean(self): """Gets the prefix_ns_boolean of this XmlItem. # noqa: E501 :return: The prefix_ns_boolean of this XmlItem. # noqa: E501 :rtype: bool """ return self._prefix_ns_boolean @prefix_ns_boolean.setter def prefix_ns_boolean(self, prefix_ns_boolean): """Sets the prefix_ns_boolean of this XmlItem. :param prefix_ns_boolean: The prefix_ns_boolean of this XmlItem. # noqa: E501 :type prefix_ns_boolean: bool """ self._prefix_ns_boolean = prefix_ns_boolean @property def prefix_ns_array(self): """Gets the prefix_ns_array of this XmlItem. # noqa: E501 :return: The prefix_ns_array of this XmlItem. # noqa: E501 :rtype: list[int] """ return self._prefix_ns_array @prefix_ns_array.setter def prefix_ns_array(self, prefix_ns_array): """Sets the prefix_ns_array of this XmlItem. :param prefix_ns_array: The prefix_ns_array of this XmlItem. # noqa: E501 :type prefix_ns_array: list[int] """ self._prefix_ns_array = prefix_ns_array @property def prefix_ns_wrapped_array(self): """Gets the prefix_ns_wrapped_array of this XmlItem. # noqa: E501 :return: The prefix_ns_wrapped_array of this XmlItem. # noqa: E501 :rtype: list[int] """ return self._prefix_ns_wrapped_array @prefix_ns_wrapped_array.setter def prefix_ns_wrapped_array(self, prefix_ns_wrapped_array): """Sets the prefix_ns_wrapped_array of this XmlItem. :param prefix_ns_wrapped_array: The prefix_ns_wrapped_array of this XmlItem. # noqa: E501 :type prefix_ns_wrapped_array: list[int] """ self._prefix_ns_wrapped_array = prefix_ns_wrapped_array def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} def convert(x): if hasattr(x, "to_dict"): args = inspect.getargspec(x.to_dict).args if len(args) == 1: return x.to_dict() else: return x.to_dict(serialize) else: return x for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( lambda x: convert(x), value )) elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], convert(item[1])), value.items() )) else: result[attr] = convert(value) return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, XmlItem): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, XmlItem): return True return self.to_dict() != other.to_dict()