Created
February 15, 2017 13:54
-
-
Save gavofyork/cbb7da4e5888ce836d5de9acc20ce743 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /******/ (function(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; | |
| /******/ // identity function for calling harmony imports with the correct context | |
| /******/ __webpack_require__.i = function(value) { return value; }; | |
| /******/ // 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 = 150); | |
| /******/ }) | |
| /************************************************************************/ | |
| /******/ ([ | |
| /* 0 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var store = __webpack_require__(28)('wks') | |
| , uid = __webpack_require__(24) | |
| , Symbol = __webpack_require__(1).Symbol | |
| , USE_SYMBOL = typeof Symbol == 'function'; | |
| var $exports = module.exports = function(name){ | |
| return store[name] || (store[name] = | |
| USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); | |
| }; | |
| $exports.store = store; | |
| /***/ }), | |
| /* 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 : Function('return this')(); | |
| if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef | |
| /***/ }), | |
| /* 2 */ | |
| /***/ (function(module, exports) { | |
| var core = module.exports = {version: '2.4.0'}; | |
| if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef | |
| /***/ }), | |
| /* 3 */ | |
| /***/ (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; | |
| }; | |
| /***/ }), | |
| /* 4 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| // Thank's IE8 for his funny defineProperty | |
| module.exports = !__webpack_require__(14)(function(){ | |
| return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; | |
| }); | |
| /***/ }), | |
| /* 5 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var dP = __webpack_require__(6) | |
| , createDesc = __webpack_require__(21); | |
| module.exports = __webpack_require__(4) ? function(object, key, value){ | |
| return dP.f(object, key, createDesc(1, value)); | |
| } : function(object, key, value){ | |
| object[key] = value; | |
| return object; | |
| }; | |
| /***/ }), | |
| /* 6 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var anObject = __webpack_require__(3) | |
| , IE8_DOM_DEFINE = __webpack_require__(40) | |
| , toPrimitive = __webpack_require__(37) | |
| , dP = Object.defineProperty; | |
| exports.f = __webpack_require__(4) ? 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; | |
| }; | |
| /***/ }), | |
| /* 7 */ | |
| /***/ (function(module, exports) { | |
| var hasOwnProperty = {}.hasOwnProperty; | |
| module.exports = function(it, key){ | |
| return hasOwnProperty.call(it, key); | |
| }; | |
| /***/ }), | |
| /* 8 */ | |
| /***/ (function(module, exports) { | |
| module.exports = {}; | |
| /***/ }), | |
| /* 9 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| // to indexed object, toObject with fallback for non-array-like ES3 strings | |
| var IObject = __webpack_require__(41) | |
| , defined = __webpack_require__(18); | |
| module.exports = function(it){ | |
| return IObject(defined(it)); | |
| }; | |
| /***/ }), | |
| /* 10 */ | |
| /***/ (function(module, exports) { | |
| module.exports = function(it){ | |
| return typeof it === 'object' ? it !== null : typeof it === 'function'; | |
| }; | |
| /***/ }), | |
| /* 11 */ | |
| /***/ (function(module, exports) { | |
| var toString = {}.toString; | |
| module.exports = function(it){ | |
| return toString.call(it).slice(8, -1); | |
| }; | |
| /***/ }), | |
| /* 12 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var global = __webpack_require__(1) | |
| , core = __webpack_require__(2) | |
| , ctx = __webpack_require__(13) | |
| , hide = __webpack_require__(5) | |
| , PROTOTYPE = 'prototype'; | |
| var $export = function(type, name, source){ | |
| var IS_FORCED = type & $export.F | |
| , IS_GLOBAL = type & $export.G | |
| , IS_STATIC = type & $export.S | |
| , IS_PROTO = type & $export.P | |
| , IS_BIND = type & $export.B | |
| , IS_WRAP = type & $export.W | |
| , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) | |
| , expProto = exports[PROTOTYPE] | |
| , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] | |
| , key, own, out; | |
| if(IS_GLOBAL)source = name; | |
| for(key in source){ | |
| // contains in native | |
| own = !IS_FORCED && target && target[key] !== undefined; | |
| if(own && key in exports)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, __webpack_require__) { | |
| // optional / simple context binding | |
| var aFunction = __webpack_require__(17); | |
| 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); | |
| }; | |
| }; | |
| /***/ }), | |
| /* 14 */ | |
| /***/ (function(module, exports) { | |
| module.exports = function(exec){ | |
| try { | |
| return !!exec(); | |
| } catch(e){ | |
| return true; | |
| } | |
| }; | |
| /***/ }), | |
| /* 15 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var def = __webpack_require__(6).f | |
| , has = __webpack_require__(7) | |
| , TAG = __webpack_require__(0)('toStringTag'); | |
| module.exports = function(it, tag, stat){ | |
| if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); | |
| }; | |
| /***/ }), | |
| /* 16 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| // 19.1.2.14 / 15.2.3.14 Object.keys(O) | |
| var $keys = __webpack_require__(42) | |
| , enumBugKeys = __webpack_require__(27); | |
| module.exports = Object.keys || function keys(O){ | |
| return $keys(O, enumBugKeys); | |
| }; | |
| /***/ }), | |
| /* 17 */ | |
| /***/ (function(module, exports) { | |
| module.exports = function(it){ | |
| if(typeof it != 'function')throw TypeError(it + ' is not a function!'); | |
| return it; | |
| }; | |
| /***/ }), | |
| /* 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, __webpack_require__) { | |
| var isObject = __webpack_require__(10) | |
| , document = __webpack_require__(1).document | |
| // in old IE typeof document.createElement is 'object' | |
| , is = isObject(document) && isObject(document.createElement); | |
| module.exports = function(it){ | |
| return is ? document.createElement(it) : {}; | |
| }; | |
| /***/ }), | |
| /* 20 */ | |
| /***/ (function(module, exports) { | |
| module.exports = true; | |
| /***/ }), | |
| /* 21 */ | |
| /***/ (function(module, exports) { | |
| module.exports = function(bitmap, value){ | |
| return { | |
| enumerable : !(bitmap & 1), | |
| configurable: !(bitmap & 2), | |
| writable : !(bitmap & 4), | |
| value : value | |
| }; | |
| }; | |
| /***/ }), | |
| /* 22 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var shared = __webpack_require__(28)('keys') | |
| , uid = __webpack_require__(24); | |
| module.exports = function(key){ | |
| return shared[key] || (shared[key] = uid(key)); | |
| }; | |
| /***/ }), | |
| /* 23 */ | |
| /***/ (function(module, exports) { | |
| // 7.1.4 ToInteger | |
| var ceil = Math.ceil | |
| , floor = Math.floor; | |
| module.exports = function(it){ | |
| return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); | |
| }; | |
| /***/ }), | |
| /* 24 */ | |
| /***/ (function(module, exports) { | |
| var id = 0 | |
| , px = Math.random(); | |
| module.exports = function(key){ | |
| return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); | |
| }; | |
| /***/ }), | |
| /* 25 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| module.exports = { "default": __webpack_require__(50), __esModule: true }; | |
| /***/ }), | |
| /* 26 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| Object.defineProperty(exports, "__esModule", { value: true });exports.EV_BAR_CODE = exports.EV_SIGNER_BAR = exports.EV_TOKEN = exports.EV_WEB3_ACCOUNTS_RESPONSE = exports.EV_WEB3_ACCOUNTS_REQUEST = exports.EV_WEB3_RESPONSE = exports.EV_WEB3_REQUEST = exports.DAPPS = exports.UI = exports.TRANSPORT_UNINITIALIZED = undefined;var _promise = __webpack_require__(25);var _promise2 = _interopRequireDefault(_promise);exports. | |
| getRetryTimeout = getRetryTimeout;exports. | |
| isEnabled = isEnabled;function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var TRANSPORT_UNINITIALIZED = exports.TRANSPORT_UNINITIALIZED = 'Transport uninitialized';var UI = exports.UI = '127.0.0.1:8180';var DAPPS = exports.DAPPS = '127.0.0.1:8080';var EV_WEB3_REQUEST = exports.EV_WEB3_REQUEST = 'parity.web3.request';var EV_WEB3_RESPONSE = exports.EV_WEB3_RESPONSE = 'parity.web3.response';var EV_WEB3_ACCOUNTS_REQUEST = exports.EV_WEB3_ACCOUNTS_REQUEST = 'parity.web3.accounts.request';var EV_WEB3_ACCOUNTS_RESPONSE = exports.EV_WEB3_ACCOUNTS_RESPONSE = 'parity.web3.accounts.response';var EV_TOKEN = exports.EV_TOKEN = 'parity.token';var EV_SIGNER_BAR = exports.EV_SIGNER_BAR = 'parity.signer.bar';var EV_BAR_CODE = exports.EV_BAR_CODE = 'parity.signer.bar.code'; /** | |
| * Exponential Timeout for Retries | |
| * | |
| * @see http://dthain.blogspot.de/2009/02/exponential-backoff-in-distributed.html | |
| */function getRetryTimeout(retries) {// R between 1 and 2 | |
| var R = Math.random() + 1; // Initial timeout (100ms) | |
| var T = 100; // Exponential Factor | |
| var F = 2; // Max timeout (4s) | |
| var M = 4000; // Current number of retries | |
| var N = retries;return Math.min(R * T * Math.pow(F, N), M);}function isEnabled() {return new _promise2.default(function (resolve) {chrome.runtime.sendMessage({ action: 'isEnabled' }, function (enabled) {resolve(enabled);});});} | |
| /***/ }), | |
| /* 27 */ | |
| /***/ (function(module, exports) { | |
| // IE 8- don't enum bug keys | |
| module.exports = ( | |
| 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' | |
| ).split(','); | |
| /***/ }), | |
| /* 28 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var global = __webpack_require__(1) | |
| , SHARED = '__core-js_shared__' | |
| , store = global[SHARED] || (global[SHARED] = {}); | |
| module.exports = function(key){ | |
| return store[key] || (store[key] = {}); | |
| }; | |
| /***/ }), | |
| /* 29 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| exports.__esModule = true; | |
| exports.default = function (instance, Constructor) { | |
| if (!(instance instanceof Constructor)) { | |
| throw new TypeError("Cannot call a class as a function"); | |
| } | |
| }; | |
| /***/ }), | |
| /* 30 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| exports.__esModule = true; | |
| var _defineProperty = __webpack_require__(49); | |
| var _defineProperty2 = _interopRequireDefault(_defineProperty); | |
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
| exports.default = 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; | |
| (0, _defineProperty2.default)(target, descriptor.key, descriptor); | |
| } | |
| } | |
| return function (Constructor, protoProps, staticProps) { | |
| if (protoProps) defineProperties(Constructor.prototype, protoProps); | |
| if (staticProps) defineProperties(Constructor, staticProps); | |
| return Constructor; | |
| }; | |
| }(); | |
| /***/ }), | |
| /* 31 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| // getting tag from 19.1.3.6 Object.prototype.toString() | |
| var cof = __webpack_require__(11) | |
| , TAG = __webpack_require__(0)('toStringTag') | |
| // ES3 wrong here | |
| , 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; | |
| }; | |
| /***/ }), | |
| /* 32 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| module.exports = __webpack_require__(1).document && document.documentElement; | |
| /***/ }), | |
| /* 33 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| var LIBRARY = __webpack_require__(20) | |
| , $export = __webpack_require__(12) | |
| , redefine = __webpack_require__(43) | |
| , hide = __webpack_require__(5) | |
| , has = __webpack_require__(7) | |
| , Iterators = __webpack_require__(8) | |
| , $iterCreate = __webpack_require__(58) | |
| , setToStringTag = __webpack_require__(15) | |
| , getPrototypeOf = __webpack_require__(45) | |
| , ITERATOR = __webpack_require__(0)('iterator') | |
| , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` | |
| , FF_ITERATOR = '@@iterator' | |
| , KEYS = 'keys' | |
| , 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' | |
| , DEF_VALUES = DEFAULT == VALUES | |
| , VALUES_BUG = false | |
| , proto = Base.prototype | |
| , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] | |
| , $default = $native || getMethod(DEFAULT) | |
| , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined | |
| , $anyNative = NAME == 'Array' ? proto.entries || $native : $native | |
| , methods, key, IteratorPrototype; | |
| // Fix native | |
| if($anyNative){ | |
| IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); | |
| if(IteratorPrototype !== Object.prototype){ | |
| // Set @@toStringTag to native iterators | |
| setToStringTag(IteratorPrototype, TAG, true); | |
| // fix for some old engines | |
| if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); | |
| } | |
| } | |
| // fix Array#{values, @@iterator}.name in V8 / FF | |
| if(DEF_VALUES && $native && $native.name !== VALUES){ | |
| VALUES_BUG = true; | |
| $default = function values(){ return $native.call(this); }; | |
| } | |
| // Define iterator | |
| if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ | |
| hide(proto, ITERATOR, $default); | |
| } | |
| // Plug for library | |
| Iterators[NAME] = $default; | |
| Iterators[TAG] = returnThis; | |
| if(DEFAULT){ | |
| methods = { | |
| values: DEF_VALUES ? $default : getMethod(VALUES), | |
| keys: IS_SET ? $default : getMethod(KEYS), | |
| entries: $entries | |
| }; | |
| if(FORCED)for(key in methods){ | |
| if(!(key in proto))redefine(proto, key, methods[key]); | |
| } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); | |
| } | |
| return methods; | |
| }; | |
| /***/ }), | |
| /* 34 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var ctx = __webpack_require__(13) | |
| , invoke = __webpack_require__(55) | |
| , html = __webpack_require__(32) | |
| , cel = __webpack_require__(19) | |
| , global = __webpack_require__(1) | |
| , process = global.process | |
| , setTask = global.setImmediate | |
| , clearTask = global.clearImmediate | |
| , MessageChannel = global.MessageChannel | |
| , counter = 0 | |
| , queue = {} | |
| , ONREADYSTATECHANGE = 'onreadystatechange' | |
| , defer, channel, port; | |
| var run = function(){ | |
| var id = +this; | |
| if(queue.hasOwnProperty(id)){ | |
| var fn = queue[id]; | |
| delete queue[id]; | |
| fn(); | |
| } | |
| }; | |
| var listener = function(event){ | |
| run.call(event.data); | |
| }; | |
| // Node.js 0.9+ & IE10+ has setImmediate, otherwise: | |
| if(!setTask || !clearTask){ | |
| setTask = function setImmediate(fn){ | |
| var args = [], i = 1; | |
| while(arguments.length > i)args.push(arguments[i++]); | |
| queue[++counter] = function(){ | |
| invoke(typeof fn == 'function' ? fn : Function(fn), args); | |
| }; | |
| defer(counter); | |
| return counter; | |
| }; | |
| clearTask = function clearImmediate(id){ | |
| delete queue[id]; | |
| }; | |
| // Node.js 0.8- | |
| if(__webpack_require__(11)(process) == 'process'){ | |
| defer = function(id){ | |
| process.nextTick(ctx(run, id, 1)); | |
| }; | |
| // Browsers with MessageChannel, includes WebWorkers | |
| } else if(MessageChannel){ | |
| channel = new MessageChannel; | |
| port = channel.port2; | |
| channel.port1.onmessage = listener; | |
| defer = ctx(port.postMessage, port, 1); | |
| // Browsers with postMessage, skip WebWorkers | |
| // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' | |
| } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ | |
| defer = function(id){ | |
| global.postMessage(id + '', '*'); | |
| }; | |
| global.addEventListener('message', listener, false); | |
| // IE8- | |
| } else if(ONREADYSTATECHANGE in cel('script')){ | |
| defer = function(id){ | |
| html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ | |
| html.removeChild(this); | |
| run.call(id); | |
| }; | |
| }; | |
| // Rest old browsers | |
| } else { | |
| defer = function(id){ | |
| setTimeout(ctx(run, id, 1), 0); | |
| }; | |
| } | |
| } | |
| module.exports = { | |
| set: setTask, | |
| clear: clearTask | |
| }; | |
| /***/ }), | |
| /* 35 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| // 7.1.15 ToLength | |
| var toInteger = __webpack_require__(23) | |
| , min = Math.min; | |
| module.exports = function(it){ | |
| return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 | |
| }; | |
| /***/ }), | |
| /* 36 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| // 7.1.13 ToObject(argument) | |
| var defined = __webpack_require__(18); | |
| module.exports = function(it){ | |
| return Object(defined(it)); | |
| }; | |
| /***/ }), | |
| /* 37 */ | |
| /***/ (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"); | |
| }; | |
| /***/ }), | |
| /* 38 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) | |
| var anObject = __webpack_require__(3) | |
| , dPs = __webpack_require__(62) | |
| , enumBugKeys = __webpack_require__(27) | |
| , IE_PROTO = __webpack_require__(22)('IE_PROTO') | |
| , Empty = function(){ /* empty */ } | |
| , 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__(19)('iframe') | |
| , i = enumBugKeys.length | |
| , lt = '<' | |
| , gt = '>' | |
| , iframeDocument; | |
| iframe.style.display = 'none'; | |
| __webpack_require__(32).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); | |
| }; | |
| /***/ }), | |
| /* 39 */ | |
| /***/ (function(module, exports) { | |
| exports.f = {}.propertyIsEnumerable; | |
| /***/ }), | |
| /* 40 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| module.exports = !__webpack_require__(4) && !__webpack_require__(14)(function(){ | |
| return Object.defineProperty(__webpack_require__(19)('div'), 'a', {get: function(){ return 7; }}).a != 7; | |
| }); | |
| /***/ }), | |
| /* 41 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| // fallback for non-array-like ES3 and non-enumerable old V8 strings | |
| var cof = __webpack_require__(11); | |
| module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ | |
| return cof(it) == 'String' ? it.split('') : Object(it); | |
| }; | |
| /***/ }), | |
| /* 42 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var has = __webpack_require__(7) | |
| , toIObject = __webpack_require__(9) | |
| , arrayIndexOf = __webpack_require__(53)(false) | |
| , IE_PROTO = __webpack_require__(22)('IE_PROTO'); | |
| module.exports = function(object, names){ | |
| var O = toIObject(object) | |
| , i = 0 | |
| , result = [] | |
| , key; | |
| for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); | |
| // Don't enum bug & hidden keys | |
| while(names.length > i)if(has(O, key = names[i++])){ | |
| ~arrayIndexOf(result, key) || result.push(key); | |
| } | |
| return result; | |
| }; | |
| /***/ }), | |
| /* 43 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| module.exports = __webpack_require__(5); | |
| /***/ }), | |
| /* 44 */ | |
| /***/ (function(module, exports) { | |
| exports.f = Object.getOwnPropertySymbols; | |
| /***/ }), | |
| /* 45 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) | |
| var has = __webpack_require__(7) | |
| , toObject = __webpack_require__(36) | |
| , IE_PROTO = __webpack_require__(22)('IE_PROTO') | |
| , ObjectProto = Object.prototype; | |
| module.exports = Object.getPrototypeOf || function(O){ | |
| O = toObject(O); | |
| if(has(O, IE_PROTO))return O[IE_PROTO]; | |
| if(typeof O.constructor == 'function' && O instanceof O.constructor){ | |
| return O.constructor.prototype; | |
| } return O instanceof Object ? ObjectProto : null; | |
| }; | |
| /***/ }), | |
| /* 46 */ | |
| /***/ (function(module, exports) { | |
| /***/ }), | |
| /* 47 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| var $at = __webpack_require__(66)(true); | |
| // 21.1.3.27 String.prototype[@@iterator]() | |
| __webpack_require__(33)(String, 'String', function(iterated){ | |
| this._t = String(iterated); // target | |
| this._i = 0; // next index | |
| // 21.1.5.2.1 %StringIteratorPrototype%.next() | |
| }, function(){ | |
| var O = this._t | |
| , index = this._i | |
| , point; | |
| if(index >= O.length)return {value: undefined, done: true}; | |
| point = $at(O, index); | |
| this._i += point.length; | |
| return {value: point, done: false}; | |
| }); | |
| /***/ }), | |
| /* 48 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| __webpack_require__(69); | |
| var global = __webpack_require__(1) | |
| , hide = __webpack_require__(5) | |
| , Iterators = __webpack_require__(8) | |
| , TO_STRING_TAG = __webpack_require__(0)('toStringTag'); | |
| for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ | |
| var NAME = collections[i] | |
| , Collection = global[NAME] | |
| , proto = Collection && Collection.prototype; | |
| if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); | |
| Iterators[NAME] = Iterators.Array; | |
| } | |
| /***/ }), | |
| /* 49 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| module.exports = { "default": __webpack_require__(75), __esModule: true }; | |
| /***/ }), | |
| /* 50 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| __webpack_require__(46); | |
| __webpack_require__(47); | |
| __webpack_require__(48); | |
| __webpack_require__(70); | |
| module.exports = __webpack_require__(2).Promise; | |
| /***/ }), | |
| /* 51 */ | |
| /***/ (function(module, exports) { | |
| module.exports = function(){ /* empty */ }; | |
| /***/ }), | |
| /* 52 */ | |
| /***/ (function(module, exports) { | |
| module.exports = function(it, Constructor, name, forbiddenField){ | |
| if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ | |
| throw TypeError(name + ': incorrect invocation!'); | |
| } return it; | |
| }; | |
| /***/ }), | |
| /* 53 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| // false -> Array#indexOf | |
| // true -> Array#includes | |
| var toIObject = __webpack_require__(9) | |
| , toLength = __webpack_require__(35) | |
| , toIndex = __webpack_require__(67); | |
| module.exports = function(IS_INCLUDES){ | |
| return function($this, el, fromIndex){ | |
| var O = toIObject($this) | |
| , length = toLength(O.length) | |
| , index = toIndex(fromIndex, length) | |
| , value; | |
| // Array#includes uses SameValueZero equality algorithm | |
| if(IS_INCLUDES && el != el)while(length > index){ | |
| value = O[index++]; | |
| if(value != value)return true; | |
| // Array#toIndex ignores holes, Array#includes - not | |
| } else for(;length > index; index++)if(IS_INCLUDES || index in O){ | |
| if(O[index] === el)return IS_INCLUDES || index || 0; | |
| } return !IS_INCLUDES && -1; | |
| }; | |
| }; | |
| /***/ }), | |
| /* 54 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var ctx = __webpack_require__(13) | |
| , call = __webpack_require__(57) | |
| , isArrayIter = __webpack_require__(56) | |
| , anObject = __webpack_require__(3) | |
| , toLength = __webpack_require__(35) | |
| , getIterFn = __webpack_require__(68) | |
| , BREAK = {} | |
| , RETURN = {}; | |
| var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ | |
| var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) | |
| , f = ctx(fn, that, entries ? 2 : 1) | |
| , index = 0 | |
| , length, step, iterator, result; | |
| if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); | |
| // fast case for arrays with default iterator | |
| if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ | |
| result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); | |
| if(result === BREAK || result === RETURN)return result; | |
| } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ | |
| result = call(iterator, f, step.value, entries); | |
| if(result === BREAK || result === RETURN)return result; | |
| } | |
| }; | |
| exports.BREAK = BREAK; | |
| exports.RETURN = RETURN; | |
| /***/ }), | |
| /* 55 */ | |
| /***/ (function(module, exports) { | |
| // fast apply, http://jsperf.lnkit.com/fast-apply/5 | |
| module.exports = function(fn, args, that){ | |
| var un = that === undefined; | |
| switch(args.length){ | |
| case 0: return un ? fn() | |
| : fn.call(that); | |
| case 1: return un ? fn(args[0]) | |
| : fn.call(that, args[0]); | |
| case 2: return un ? fn(args[0], args[1]) | |
| : fn.call(that, args[0], args[1]); | |
| case 3: return un ? fn(args[0], args[1], args[2]) | |
| : fn.call(that, args[0], args[1], args[2]); | |
| case 4: return un ? fn(args[0], args[1], args[2], args[3]) | |
| : fn.call(that, args[0], args[1], args[2], args[3]); | |
| } return fn.apply(that, args); | |
| }; | |
| /***/ }), | |
| /* 56 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| // check on default Array iterator | |
| var Iterators = __webpack_require__(8) | |
| , ITERATOR = __webpack_require__(0)('iterator') | |
| , ArrayProto = Array.prototype; | |
| module.exports = function(it){ | |
| return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); | |
| }; | |
| /***/ }), | |
| /* 57 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| // call something on iterator step with safe closing on error | |
| var anObject = __webpack_require__(3); | |
| 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; | |
| } | |
| }; | |
| /***/ }), | |
| /* 58 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| var create = __webpack_require__(38) | |
| , descriptor = __webpack_require__(21) | |
| , setToStringTag = __webpack_require__(15) | |
| , IteratorPrototype = {}; | |
| // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() | |
| __webpack_require__(5)(IteratorPrototype, __webpack_require__(0)('iterator'), function(){ return this; }); | |
| module.exports = function(Constructor, NAME, next){ | |
| Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); | |
| setToStringTag(Constructor, NAME + ' Iterator'); | |
| }; | |
| /***/ }), | |
| /* 59 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var ITERATOR = __webpack_require__(0)('iterator') | |
| , SAFE_CLOSING = false; | |
| try { | |
| var riter = [7][ITERATOR](); | |
| riter['return'] = function(){ SAFE_CLOSING = true; }; | |
| Array.from(riter, function(){ throw 2; }); | |
| } catch(e){ /* empty */ } | |
| module.exports = function(exec, skipClosing){ | |
| if(!skipClosing && !SAFE_CLOSING)return false; | |
| var safe = false; | |
| try { | |
| var arr = [7] | |
| , iter = arr[ITERATOR](); | |
| iter.next = function(){ return {done: safe = true}; }; | |
| arr[ITERATOR] = function(){ return iter; }; | |
| exec(arr); | |
| } catch(e){ /* empty */ } | |
| return safe; | |
| }; | |
| /***/ }), | |
| /* 60 */ | |
| /***/ (function(module, exports) { | |
| module.exports = function(done, value){ | |
| return {value: value, done: !!done}; | |
| }; | |
| /***/ }), | |
| /* 61 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var global = __webpack_require__(1) | |
| , macrotask = __webpack_require__(34).set | |
| , Observer = global.MutationObserver || global.WebKitMutationObserver | |
| , process = global.process | |
| , Promise = global.Promise | |
| , isNode = __webpack_require__(11)(process) == 'process'; | |
| module.exports = function(){ | |
| var head, last, notify; | |
| var flush = function(){ | |
| var parent, fn; | |
| if(isNode && (parent = process.domain))parent.exit(); | |
| while(head){ | |
| fn = head.fn; | |
| head = head.next; | |
| try { | |
| fn(); | |
| } catch(e){ | |
| if(head)notify(); | |
| else last = undefined; | |
| throw e; | |
| } | |
| } last = undefined; | |
| if(parent)parent.enter(); | |
| }; | |
| // Node.js | |
| if(isNode){ | |
| notify = function(){ | |
| process.nextTick(flush); | |
| }; | |
| // browsers with MutationObserver | |
| } else if(Observer){ | |
| var toggle = true | |
| , node = document.createTextNode(''); | |
| new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new | |
| notify = function(){ | |
| node.data = toggle = !toggle; | |
| }; | |
| // environments with maybe non-completely correct, but existent Promise | |
| } else if(Promise && Promise.resolve){ | |
| var promise = Promise.resolve(); | |
| notify = function(){ | |
| promise.then(flush); | |
| }; | |
| // for other environments - macrotask based on: | |
| // - setImmediate | |
| // - MessageChannel | |
| // - window.postMessag | |
| // - onreadystatechange | |
| // - setTimeout | |
| } else { | |
| notify = function(){ | |
| // strange IE + webpack dev server bug - use .call(global) | |
| macrotask.call(global, flush); | |
| }; | |
| } | |
| return function(fn){ | |
| var task = {fn: fn, next: undefined}; | |
| if(last)last.next = task; | |
| if(!head){ | |
| head = task; | |
| notify(); | |
| } last = task; | |
| }; | |
| }; | |
| /***/ }), | |
| /* 62 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var dP = __webpack_require__(6) | |
| , anObject = __webpack_require__(3) | |
| , getKeys = __webpack_require__(16); | |
| module.exports = __webpack_require__(4) ? Object.defineProperties : function defineProperties(O, Properties){ | |
| anObject(O); | |
| var keys = getKeys(Properties) | |
| , length = keys.length | |
| , i = 0 | |
| , P; | |
| while(length > i)dP.f(O, P = keys[i++], Properties[P]); | |
| return O; | |
| }; | |
| /***/ }), | |
| /* 63 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var hide = __webpack_require__(5); | |
| module.exports = function(target, src, safe){ | |
| for(var key in src){ | |
| if(safe && target[key])target[key] = src[key]; | |
| else hide(target, key, src[key]); | |
| } return target; | |
| }; | |
| /***/ }), | |
| /* 64 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| var global = __webpack_require__(1) | |
| , core = __webpack_require__(2) | |
| , dP = __webpack_require__(6) | |
| , DESCRIPTORS = __webpack_require__(4) | |
| , SPECIES = __webpack_require__(0)('species'); | |
| module.exports = function(KEY){ | |
| var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; | |
| if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { | |
| configurable: true, | |
| get: function(){ return this; } | |
| }); | |
| }; | |
| /***/ }), | |
| /* 65 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| // 7.3.20 SpeciesConstructor(O, defaultConstructor) | |
| var anObject = __webpack_require__(3) | |
| , aFunction = __webpack_require__(17) | |
| , SPECIES = __webpack_require__(0)('species'); | |
| module.exports = function(O, D){ | |
| var C = anObject(O).constructor, S; | |
| return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); | |
| }; | |
| /***/ }), | |
| /* 66 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var toInteger = __webpack_require__(23) | |
| , defined = __webpack_require__(18); | |
| // true -> String#at | |
| // false -> String#codePointAt | |
| module.exports = function(TO_STRING){ | |
| return function(that, pos){ | |
| var s = String(defined(that)) | |
| , i = toInteger(pos) | |
| , l = s.length | |
| , a, b; | |
| if(i < 0 || i >= l)return TO_STRING ? '' : undefined; | |
| a = s.charCodeAt(i); | |
| return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff | |
| ? TO_STRING ? s.charAt(i) : a | |
| : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; | |
| }; | |
| }; | |
| /***/ }), | |
| /* 67 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var toInteger = __webpack_require__(23) | |
| , max = Math.max | |
| , min = Math.min; | |
| module.exports = function(index, length){ | |
| index = toInteger(index); | |
| return index < 0 ? max(index + length, 0) : min(index, length); | |
| }; | |
| /***/ }), | |
| /* 68 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| var classof = __webpack_require__(31) | |
| , ITERATOR = __webpack_require__(0)('iterator') | |
| , Iterators = __webpack_require__(8); | |
| module.exports = __webpack_require__(2).getIteratorMethod = function(it){ | |
| if(it != undefined)return it[ITERATOR] | |
| || it['@@iterator'] | |
| || Iterators[classof(it)]; | |
| }; | |
| /***/ }), | |
| /* 69 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| var addToUnscopables = __webpack_require__(51) | |
| , step = __webpack_require__(60) | |
| , Iterators = __webpack_require__(8) | |
| , toIObject = __webpack_require__(9); | |
| // 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__(33)(Array, 'Array', function(iterated, kind){ | |
| this._t = toIObject(iterated); // target | |
| this._i = 0; // next index | |
| this._k = kind; // kind | |
| // 22.1.5.2.1 %ArrayIteratorPrototype%.next() | |
| }, function(){ | |
| var O = this._t | |
| , kind = this._k | |
| , index = this._i++; | |
| if(!O || index >= O.length){ | |
| this._t = undefined; | |
| return step(1); | |
| } | |
| if(kind == 'keys' )return step(0, index); | |
| if(kind == 'values')return step(0, O[index]); | |
| return step(0, [index, O[index]]); | |
| }, 'values'); | |
| // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) | |
| Iterators.Arguments = Iterators.Array; | |
| addToUnscopables('keys'); | |
| addToUnscopables('values'); | |
| addToUnscopables('entries'); | |
| /***/ }), | |
| /* 70 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| var LIBRARY = __webpack_require__(20) | |
| , global = __webpack_require__(1) | |
| , ctx = __webpack_require__(13) | |
| , classof = __webpack_require__(31) | |
| , $export = __webpack_require__(12) | |
| , isObject = __webpack_require__(10) | |
| , aFunction = __webpack_require__(17) | |
| , anInstance = __webpack_require__(52) | |
| , forOf = __webpack_require__(54) | |
| , speciesConstructor = __webpack_require__(65) | |
| , task = __webpack_require__(34).set | |
| , microtask = __webpack_require__(61)() | |
| , PROMISE = 'Promise' | |
| , TypeError = global.TypeError | |
| , process = global.process | |
| , $Promise = global[PROMISE] | |
| , process = global.process | |
| , isNode = classof(process) == 'process' | |
| , empty = function(){ /* empty */ } | |
| , Internal, GenericPromiseCapability, Wrapper; | |
| var USE_NATIVE = !!function(){ | |
| try { | |
| // correct subclassing with @@species support | |
| var promise = $Promise.resolve(1) | |
| , FakePromise = (promise.constructor = {})[__webpack_require__(0)('species')] = function(exec){ exec(empty, empty); }; | |
| // unhandled rejections tracking support, NodeJS Promise without it fails @@species test | |
| return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; | |
| } catch(e){ /* empty */ } | |
| }(); | |
| // helpers | |
| var sameConstructor = function(a, b){ | |
| // with library wrapper special case | |
| return a === b || a === $Promise && b === Wrapper; | |
| }; | |
| var isThenable = function(it){ | |
| var then; | |
| return isObject(it) && typeof (then = it.then) == 'function' ? then : false; | |
| }; | |
| var newPromiseCapability = function(C){ | |
| return sameConstructor($Promise, C) | |
| ? new PromiseCapability(C) | |
| : new GenericPromiseCapability(C); | |
| }; | |
| var PromiseCapability = GenericPromiseCapability = function(C){ | |
| var resolve, reject; | |
| this.promise = new C(function($$resolve, $$reject){ | |
| if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); | |
| resolve = $$resolve; | |
| reject = $$reject; | |
| }); | |
| this.resolve = aFunction(resolve); | |
| this.reject = aFunction(reject); | |
| }; | |
| var perform = function(exec){ | |
| try { | |
| exec(); | |
| } catch(e){ | |
| return {error: e}; | |
| } | |
| }; | |
| var notify = function(promise, isReject){ | |
| if(promise._n)return; | |
| promise._n = true; | |
| var chain = promise._c; | |
| microtask(function(){ | |
| var value = promise._v | |
| , ok = promise._s == 1 | |
| , i = 0; | |
| var run = function(reaction){ | |
| var handler = ok ? reaction.ok : reaction.fail | |
| , resolve = reaction.resolve | |
| , reject = reaction.reject | |
| , domain = reaction.domain | |
| , result, then; | |
| try { | |
| if(handler){ | |
| if(!ok){ | |
| if(promise._h == 2)onHandleUnhandled(promise); | |
| promise._h = 1; | |
| } | |
| if(handler === true)result = value; | |
| else { | |
| if(domain)domain.enter(); | |
| result = handler(value); | |
| if(domain)domain.exit(); | |
| } | |
| if(result === reaction.promise){ | |
| reject(TypeError('Promise-chain cycle')); | |
| } else if(then = isThenable(result)){ | |
| then.call(result, resolve, reject); | |
| } else resolve(result); | |
| } else reject(value); | |
| } catch(e){ | |
| reject(e); | |
| } | |
| }; | |
| while(chain.length > i)run(chain[i++]); // variable length - can't use forEach | |
| promise._c = []; | |
| promise._n = false; | |
| if(isReject && !promise._h)onUnhandled(promise); | |
| }); | |
| }; | |
| var onUnhandled = function(promise){ | |
| task.call(global, function(){ | |
| var value = promise._v | |
| , abrupt, handler, console; | |
| if(isUnhandled(promise)){ | |
| abrupt = perform(function(){ | |
| if(isNode){ | |
| process.emit('unhandledRejection', value, promise); | |
| } else if(handler = global.onunhandledrejection){ | |
| handler({promise: promise, reason: value}); | |
| } else if((console = global.console) && console.error){ | |
| console.error('Unhandled promise rejection', value); | |
| } | |
| }); | |
| // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should | |
| promise._h = isNode || isUnhandled(promise) ? 2 : 1; | |
| } promise._a = undefined; | |
| if(abrupt)throw abrupt.error; | |
| }); | |
| }; | |
| var isUnhandled = function(promise){ | |
| if(promise._h == 1)return false; | |
| var chain = promise._a || promise._c | |
| , i = 0 | |
| , reaction; | |
| while(chain.length > i){ | |
| reaction = chain[i++]; | |
| if(reaction.fail || !isUnhandled(reaction.promise))return false; | |
| } return true; | |
| }; | |
| var onHandleUnhandled = function(promise){ | |
| task.call(global, function(){ | |
| var handler; | |
| if(isNode){ | |
| process.emit('rejectionHandled', promise); | |
| } else if(handler = global.onrejectionhandled){ | |
| handler({promise: promise, reason: promise._v}); | |
| } | |
| }); | |
| }; | |
| var $reject = function(value){ | |
| var promise = this; | |
| if(promise._d)return; | |
| promise._d = true; | |
| promise = promise._w || promise; // unwrap | |
| promise._v = value; | |
| promise._s = 2; | |
| if(!promise._a)promise._a = promise._c.slice(); | |
| notify(promise, true); | |
| }; | |
| var $resolve = function(value){ | |
| var promise = this | |
| , then; | |
| if(promise._d)return; | |
| promise._d = true; | |
| promise = promise._w || promise; // unwrap | |
| try { | |
| if(promise === value)throw TypeError("Promise can't be resolved itself"); | |
| if(then = isThenable(value)){ | |
| microtask(function(){ | |
| var wrapper = {_w: promise, _d: false}; // wrap | |
| try { | |
| then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); | |
| } catch(e){ | |
| $reject.call(wrapper, e); | |
| } | |
| }); | |
| } else { | |
| promise._v = value; | |
| promise._s = 1; | |
| notify(promise, false); | |
| } | |
| } catch(e){ | |
| $reject.call({_w: promise, _d: false}, e); // wrap | |
| } | |
| }; | |
| // constructor polyfill | |
| if(!USE_NATIVE){ | |
| // 25.4.3.1 Promise(executor) | |
| $Promise = function Promise(executor){ | |
| anInstance(this, $Promise, PROMISE, '_h'); | |
| aFunction(executor); | |
| Internal.call(this); | |
| try { | |
| executor(ctx($resolve, this, 1), ctx($reject, this, 1)); | |
| } catch(err){ | |
| $reject.call(this, err); | |
| } | |
| }; | |
| Internal = function Promise(executor){ | |
| this._c = []; // <- awaiting reactions | |
| this._a = undefined; // <- checked in isUnhandled reactions | |
| this._s = 0; // <- state | |
| this._d = false; // <- done | |
| this._v = undefined; // <- value | |
| this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled | |
| this._n = false; // <- notify | |
| }; | |
| Internal.prototype = __webpack_require__(63)($Promise.prototype, { | |
| // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) | |
| then: function then(onFulfilled, onRejected){ | |
| var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); | |
| reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; | |
| reaction.fail = typeof onRejected == 'function' && onRejected; | |
| reaction.domain = isNode ? process.domain : undefined; | |
| this._c.push(reaction); | |
| if(this._a)this._a.push(reaction); | |
| if(this._s)notify(this, false); | |
| return reaction.promise; | |
| }, | |
| // 25.4.5.1 Promise.prototype.catch(onRejected) | |
| 'catch': function(onRejected){ | |
| return this.then(undefined, onRejected); | |
| } | |
| }); | |
| PromiseCapability = function(){ | |
| var promise = new Internal; | |
| this.promise = promise; | |
| this.resolve = ctx($resolve, promise, 1); | |
| this.reject = ctx($reject, promise, 1); | |
| }; | |
| } | |
| $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); | |
| __webpack_require__(15)($Promise, PROMISE); | |
| __webpack_require__(64)(PROMISE); | |
| Wrapper = __webpack_require__(2)[PROMISE]; | |
| // statics | |
| $export($export.S + $export.F * !USE_NATIVE, PROMISE, { | |
| // 25.4.4.5 Promise.reject(r) | |
| reject: function reject(r){ | |
| var capability = newPromiseCapability(this) | |
| , $$reject = capability.reject; | |
| $$reject(r); | |
| return capability.promise; | |
| } | |
| }); | |
| $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { | |
| // 25.4.4.6 Promise.resolve(x) | |
| resolve: function resolve(x){ | |
| // instanceof instead of internal slot check because we should fix it without replacement native Promise core | |
| if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; | |
| var capability = newPromiseCapability(this) | |
| , $$resolve = capability.resolve; | |
| $$resolve(x); | |
| return capability.promise; | |
| } | |
| }); | |
| $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(59)(function(iter){ | |
| $Promise.all(iter)['catch'](empty); | |
| })), PROMISE, { | |
| // 25.4.4.1 Promise.all(iterable) | |
| all: function all(iterable){ | |
| var C = this | |
| , capability = newPromiseCapability(C) | |
| , resolve = capability.resolve | |
| , reject = capability.reject; | |
| var abrupt = perform(function(){ | |
| var values = [] | |
| , index = 0 | |
| , remaining = 1; | |
| forOf(iterable, false, function(promise){ | |
| var $index = index++ | |
| , alreadyCalled = false; | |
| values.push(undefined); | |
| remaining++; | |
| C.resolve(promise).then(function(value){ | |
| if(alreadyCalled)return; | |
| alreadyCalled = true; | |
| values[$index] = value; | |
| --remaining || resolve(values); | |
| }, reject); | |
| }); | |
| --remaining || resolve(values); | |
| }); | |
| if(abrupt)reject(abrupt.error); | |
| return capability.promise; | |
| }, | |
| // 25.4.4.4 Promise.race(iterable) | |
| race: function race(iterable){ | |
| var C = this | |
| , capability = newPromiseCapability(C) | |
| , reject = capability.reject; | |
| var abrupt = perform(function(){ | |
| forOf(iterable, false, function(promise){ | |
| C.resolve(promise).then(capability.resolve, reject); | |
| }); | |
| }); | |
| if(abrupt)reject(abrupt.error); | |
| return capability.promise; | |
| } | |
| }); | |
| /***/ }), | |
| /* 71 */, | |
| /* 72 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| Object.defineProperty(exports, "__esModule", { value: true });exports.default = undefined;var _defineProperty2 = __webpack_require__(73);var _defineProperty3 = _interopRequireDefault(_defineProperty2);var _promise = __webpack_require__(25);var _promise2 = _interopRequireDefault(_promise);var _extends2 = __webpack_require__(74);var _extends3 = _interopRequireDefault(_extends2);var _classCallCheck2 = __webpack_require__(29);var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);var _createClass2 = __webpack_require__(30);var _createClass3 = _interopRequireDefault(_createClass2);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} // Copyright 2015-2017 Parity Technologies (UK) Ltd. | |
| // This file is part of Parity. | |
| // Parity is free software: you can redistribute it and/or modify | |
| // it under the terms of the GNU General Public License as published by | |
| // the Free Software Foundation, either version 3 of the License, or | |
| // (at your option) any later version. | |
| // Parity 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 General Public License for more details. | |
| // You should have received a copy of the GNU General Public License | |
| // along with Parity. If not, see <http://www.gnu.org/licenses/>. | |
| var CONFIG_KEY = 'parity::config';var | |
| Config = function () {function Config() {(0, _classCallCheck3.default)(this, Config);}(0, _createClass3.default)(Config, null, [{ key: 'set', value: function set( | |
| data) { | |
| return Config.get(). | |
| then(function (config) { | |
| var nextConfig = (0, _extends3.default)({}, | |
| config, | |
| data); | |
| return new _promise2.default(function (resolve) { | |
| chrome.storage.local.set((0, _defineProperty3.default)({}, | |
| CONFIG_KEY, nextConfig), | |
| function () { | |
| resolve(); | |
| }); | |
| }); | |
| }); | |
| } }, { key: 'get', value: function get() | |
| { | |
| return new _promise2.default(function (resolve) { | |
| chrome.storage.local.get(CONFIG_KEY, function () {var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| resolve(data[CONFIG_KEY] || {}); | |
| }); | |
| }); | |
| } }]);return Config;}();exports.default = Config; | |
| /***/ }), | |
| /* 73 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| exports.__esModule = true; | |
| var _defineProperty = __webpack_require__(49); | |
| 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; | |
| }; | |
| /***/ }), | |
| /* 74 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| exports.__esModule = true; | |
| var _assign = __webpack_require__(80); | |
| var _assign2 = _interopRequireDefault(_assign); | |
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
| exports.default = _assign2.default || 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; | |
| }; | |
| /***/ }), | |
| /* 75 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| __webpack_require__(78); | |
| var $Object = __webpack_require__(2).Object; | |
| module.exports = function defineProperty(it, key, desc){ | |
| return $Object.defineProperty(it, key, desc); | |
| }; | |
| /***/ }), | |
| /* 76 */, | |
| /* 77 */, | |
| /* 78 */ | |
| /***/ (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__(4), 'Object', {defineProperty: __webpack_require__(6).f}); | |
| /***/ }), | |
| /* 79 */, | |
| /* 80 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| module.exports = { "default": __webpack_require__(83), __esModule: true }; | |
| /***/ }), | |
| /* 81 */, | |
| /* 82 */, | |
| /* 83 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| __webpack_require__(90); | |
| module.exports = __webpack_require__(2).Object.assign; | |
| /***/ }), | |
| /* 84 */, | |
| /* 85 */, | |
| /* 86 */, | |
| /* 87 */, | |
| /* 88 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| // 19.1.2.1 Object.assign(target, source, ...) | |
| var getKeys = __webpack_require__(16) | |
| , gOPS = __webpack_require__(44) | |
| , pIE = __webpack_require__(39) | |
| , toObject = __webpack_require__(36) | |
| , IObject = __webpack_require__(41) | |
| , $assign = Object.assign; | |
| // should work with symbols and should have deterministic property order (V8 bug) | |
| module.exports = !$assign || __webpack_require__(14)(function(){ | |
| var A = {} | |
| , B = {} | |
| , S = Symbol() | |
| , K = 'abcdefghijklmnopqrst'; | |
| A[S] = 7; | |
| K.split('').forEach(function(k){ B[k] = k; }); | |
| return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; | |
| }) ? function assign(target, source){ // eslint-disable-line no-unused-vars | |
| var T = toObject(target) | |
| , aLen = arguments.length | |
| , index = 1 | |
| , getSymbols = gOPS.f | |
| , isEnum = pIE.f; | |
| while(aLen > index){ | |
| var S = IObject(arguments[index++]) | |
| , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) | |
| , length = keys.length | |
| , j = 0 | |
| , key; | |
| while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; | |
| } return T; | |
| } : $assign; | |
| /***/ }), | |
| /* 89 */, | |
| /* 90 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| // 19.1.3.1 Object.assign(target, source) | |
| var $export = __webpack_require__(12); | |
| $export($export.S + $export.F, 'Object', {assign: __webpack_require__(88)}); | |
| /***/ }), | |
| /* 91 */, | |
| /* 92 */, | |
| /* 93 */, | |
| /* 94 */, | |
| /* 95 */, | |
| /* 96 */, | |
| /* 97 */, | |
| /* 98 */, | |
| /* 99 */, | |
| /* 100 */, | |
| /* 101 */, | |
| /* 102 */, | |
| /* 103 */, | |
| /* 104 */, | |
| /* 105 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| Object.defineProperty(exports, "__esModule", { value: true });var _promise = __webpack_require__(25);var _promise2 = _interopRequireDefault(_promise);exports. | |
| createSecureTransport = createSecureTransport;var _shared = __webpack_require__(26);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} /** | |
| * Creates a secureTransport, that can be used by injected ParityBar | |
| */function createSecureTransport() {var id = 0;var isConnected = true; | |
| var data = {}; | |
| var listeners = {}; | |
| var port = chrome.runtime.connect({ name: 'secureApi' }); | |
| port.onMessage.addListener(function (msg) {var | |
| id = msg.id,err = msg.err,payload = msg.payload; | |
| if (!data[id]) { | |
| console.warn('Unexpected response received: ', id, msg); | |
| return; | |
| }var _data$id = | |
| data[id],resolve = _data$id.resolve,reject = _data$id.reject; | |
| delete data[id]; | |
| if (err || payload.error) { | |
| var wasConnected = isConnected; | |
| isConnected = err !== _shared.TRANSPORT_UNINITIALIZED; | |
| if (wasConnected && !isConnected) { | |
| listeners['close'].forEach(function (listener) {return listener();}); | |
| } | |
| reject(err || payload.error); | |
| } else { | |
| isConnected = true; | |
| resolve(payload.result); | |
| } | |
| }); | |
| return { | |
| execute: function execute(method) {for (var _len = arguments.length, params = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {params[_key - 1] = arguments[_key];} | |
| return new _promise2.default(function (resolve, reject) { | |
| id++; | |
| data[id] = { resolve: resolve, reject: reject, method: method, params: params }; | |
| var request = { | |
| jsonrpc: '2.0', | |
| id: id, | |
| method: method, | |
| params: params }; | |
| port.postMessage({ | |
| id: id, | |
| type: _shared.EV_WEB3_REQUEST, | |
| payload: request }); | |
| }); | |
| }, | |
| on: function on(event, callback, context) { | |
| listeners[event] = listeners[event] || []; | |
| listeners[event].push(callback.bind(context)); | |
| }, | |
| get isConnected() { | |
| return isConnected; | |
| } }; | |
| } // Copyright 2015-2017 Parity Technologies (UK) Ltd. | |
| // This file is part of Parity. | |
| // Parity is free software: you can redistribute it and/or modify | |
| // it under the terms of the GNU General Public License as published by | |
| // the Free Software Foundation, either version 3 of the License, or | |
| // (at your option) any later version. | |
| // Parity 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 General Public License for more details. | |
| // You should have received a copy of the GNU General Public License | |
| // along with Parity. If not, see <http://www.gnu.org/licenses/>. | |
| /* | |
| * NOTE: Executed in extension context | |
| */ | |
| /***/ }), | |
| /* 106 */, | |
| /* 107 */, | |
| /* 108 */, | |
| /* 109 */, | |
| /* 110 */, | |
| /* 111 */, | |
| /* 112 */, | |
| /* 113 */, | |
| /* 114 */, | |
| /* 115 */, | |
| /* 116 */, | |
| /* 117 */, | |
| /* 118 */, | |
| /* 119 */, | |
| /* 120 */, | |
| /* 121 */, | |
| /* 122 */, | |
| /* 123 */, | |
| /* 124 */, | |
| /* 125 */, | |
| /* 126 */, | |
| /* 127 */, | |
| /* 128 */, | |
| /* 129 */, | |
| /* 130 */, | |
| /* 131 */, | |
| /* 132 */, | |
| /* 133 */, | |
| /* 134 */, | |
| /* 135 */, | |
| /* 136 */, | |
| /* 137 */, | |
| /* 138 */, | |
| /* 139 */, | |
| /* 140 */, | |
| /* 141 */, | |
| /* 142 */, | |
| /* 143 */, | |
| /* 144 */, | |
| /* 145 */, | |
| /* 146 */, | |
| /* 147 */, | |
| /* 148 */, | |
| /* 149 */, | |
| /* 150 */ | |
| /***/ (function(module, exports, __webpack_require__) { | |
| "use strict"; | |
| var _secureTransport = __webpack_require__(105); | |
| var _shared = __webpack_require__(26); | |
| var _config = __webpack_require__(72);var _config2 = _interopRequireDefault(_config);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} | |
| (0, _shared.isEnabled)(). | |
| then(function (enabled) { | |
| if (enabled && window.location.protocol === 'chrome-extension:') { | |
| window.secureTransport = (0, _secureTransport.createSecureTransport)(); | |
| _config2.default.get().then(function (config) { | |
| window.backgroundSeed = config.backgroundSeed; | |
| loadScripts(); | |
| }); | |
| handleResizeEvents(); | |
| } | |
| }); | |
| /** | |
| * Propagates opening events to upper frame | |
| */ // Copyright 2015-2017 Parity Technologies (UK) Ltd. | |
| // This file is part of Parity. | |
| // Parity is free software: you can redistribute it and/or modify | |
| // it under the terms of the GNU General Public License as published by | |
| // the Free Software Foundation, either version 3 of the License, or | |
| // (at your option) any later version. | |
| // Parity 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 General Public License for more details. | |
| // You should have received a copy of the GNU General Public License | |
| // along with Parity. If not, see <http://www.gnu.org/licenses/>. | |
| /** | |
| * NOTE: This part is executed on embedded Parity Bar | |
| * | |
| * Since we are executing in context of chrome extension | |
| * we have access to chrome.* APIs | |
| */function handleResizeEvents() {document.body.addEventListener('parity.bar.visibility', function (ev) {document.querySelector('#container > div > div').style.maxHeight = '100vh';window.parent.postMessage({ type: _shared.EV_SIGNER_BAR, opened: ev.detail.opened }, '*');});} /** | |
| * Loads ParityBar scripts from running node. | |
| */function loadScripts() {// We need to use `port` here cause the response is asynchronous. | |
| var port = chrome.runtime.connect({ name: 'barScripts' });port.onMessage.addListener(function (code) {if (!code.success) {var $loading = document.querySelector('#container .loading');var $link = document.createElement('a'); | |
| $link.href = code.ui + '/#/signer'; | |
| $link.target = '_blank'; | |
| $link.innerHTML = 'Your Parity version is older than 1.5. <br />You need to open the UI to sign transactions.'; | |
| $loading.classList.add('version'); | |
| $loading.innerHTML = ''; | |
| $loading.appendChild($link); | |
| return; | |
| } | |
| var $script = document.createElement('script'); | |
| var $styles = document.createElement('link'); | |
| $script.src = code.scripts; | |
| $styles.rel = 'stylesheet'; | |
| $styles.href = code.styles; | |
| document.head.appendChild($styles); | |
| document.body.appendChild($script); | |
| port.disconnect(); | |
| }); | |
| port.postMessage({ | |
| type: _shared.EV_BAR_CODE }); | |
| } | |
| /***/ }) | |
| /******/ ]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment