diff --git a/bin/pub/b28bed498f94f21d1f79.runtime.js b/bin/pub/b28bed498f94f21d1f79.runtime.js
new file mode 100644
index 00000000..e61ed956
--- /dev/null
+++ b/bin/pub/b28bed498f94f21d1f79.runtime.js
@@ -0,0 +1,150 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ // install a JSONP callback for chunk loading
+/******/ var parentJsonpFunction = window["webpackJsonp"];
+/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {
+/******/ // add "moreModules" to the modules object,
+/******/ // then flag all "chunkIds" as loaded and fire callback
+/******/ var moduleId, chunkId, i = 0, resolves = [], result;
+/******/ for(;i < chunkIds.length; i++) {
+/******/ chunkId = chunkIds[i];
+/******/ if(installedChunks[chunkId]) {
+/******/ resolves.push(installedChunks[chunkId][0]);
+/******/ }
+/******/ installedChunks[chunkId] = 0;
+/******/ }
+/******/ for(moduleId in moreModules) {
+/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
+/******/ modules[moduleId] = moreModules[moduleId];
+/******/ }
+/******/ }
+/******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);
+/******/ while(resolves.length) {
+/******/ resolves.shift()();
+/******/ }
+/******/ if(executeModules) {
+/******/ for(i=0; i < executeModules.length; i++) {
+/******/ result = __webpack_require__(__webpack_require__.s = executeModules[i]);
+/******/ }
+/******/ }
+/******/ return result;
+/******/ };
+/******/
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // objects to store loaded and loading chunks
+/******/ var installedChunks = {
+/******/ 2: 0
+/******/ };
+/******/
+/******/ // 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;
+/******/ }
+/******/
+/******/ // This file contains only the entry chunk.
+/******/ // The chunk loading function for additional chunks
+/******/ __webpack_require__.e = function requireEnsure(chunkId) {
+/******/ var installedChunkData = installedChunks[chunkId];
+/******/ if(installedChunkData === 0) {
+/******/ return new Promise(function(resolve) { resolve(); });
+/******/ }
+/******/
+/******/ // a Promise means "currently loading".
+/******/ if(installedChunkData) {
+/******/ return installedChunkData[2];
+/******/ }
+/******/
+/******/ // setup Promise in chunk cache
+/******/ var promise = new Promise(function(resolve, reject) {
+/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
+/******/ });
+/******/ installedChunkData[2] = promise;
+/******/
+/******/ // start chunk loading
+/******/ var head = document.getElementsByTagName('head')[0];
+/******/ var script = document.createElement('script');
+/******/ script.type = 'text/javascript';
+/******/ script.charset = 'utf-8';
+/******/ script.async = true;
+/******/ script.timeout = 120000;
+/******/
+/******/ if (__webpack_require__.nc) {
+/******/ script.setAttribute("nonce", __webpack_require__.nc);
+/******/ }
+/******/ script.src = __webpack_require__.p + "" + {"0":"c3641e5ea4e7e5a5080f","1":"171bbbc09a33e5dbb73c"}[chunkId] + "." + chunkId + ".js";
+/******/ var timeout = setTimeout(onScriptComplete, 120000);
+/******/ script.onerror = script.onload = onScriptComplete;
+/******/ function onScriptComplete() {
+/******/ // avoid mem leaks in IE.
+/******/ script.onerror = script.onload = null;
+/******/ clearTimeout(timeout);
+/******/ var chunk = installedChunks[chunkId];
+/******/ if(chunk !== 0) {
+/******/ if(chunk) {
+/******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
+/******/ }
+/******/ installedChunks[chunkId] = undefined;
+/******/ }
+/******/ };
+/******/ head.appendChild(script);
+/******/
+/******/ return promise;
+/******/ };
+/******/
+/******/ // 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 = "/";
+/******/
+/******/ // on error function for async loading
+/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
+/******/ })
+/************************************************************************/
+/******/ ([]);
\ No newline at end of file
diff --git a/bin/pub/c3641e5ea4e7e5a5080f.app.js b/bin/pub/c3641e5ea4e7e5a5080f.app.js
new file mode 100644
index 00000000..54857c91
--- /dev/null
+++ b/bin/pub/c3641e5ea4e7e5a5080f.app.js
@@ -0,0 +1,81510 @@
+webpackJsonp([0],[
+/* 0 */,
+/* 1 */,
+/* 2 */,
+/* 3 */,
+/* 4 */,
+/* 5 */,
+/* 6 */,
+/* 7 */,
+/* 8 */,
+/* 9 */,
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _defineProperty = __webpack_require__(239);
+
+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;
+ };
+}();
+
+/***/ }),
+/* 11 */,
+/* 12 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
+var module;
+// LICENSE_CODE ZON
+'use strict'; /*jslint node:true, react:true*/
+
+var _regenerator = __webpack_require__(18);
+
+var _regenerator2 = _interopRequireDefault(_regenerator);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(10);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(2);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _get2 = __webpack_require__(455);
+
+var _get3 = _interopRequireDefault(_get2);
+
+var _inherits2 = __webpack_require__(3);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _typeof2 = __webpack_require__(81);
+
+var _typeof3 = _interopRequireDefault(_typeof2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+
+var is_node = (typeof module === 'undefined' ? 'undefined' : (0, _typeof3.default)(module)) == 'object' && module.exports;
+if (is_node) ;
+
+!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0), __webpack_require__(41), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React, _etask, setdb) {
+
+ var LONG_CB_MS = 100;
+
+ // XXX krzysztof: copied from android/who/app/components, removed local
+ // dependency: zerr and event
+ // XXX arik: need test
+
+ var Pure_component = function (_React$PureComponent) {
+ (0, _inherits3.default)(Pure_component, _React$PureComponent);
+
+ function Pure_component(props) {
+ (0, _classCallCheck3.default)(this, Pure_component);
+
+ var _this = (0, _possibleConstructorReturn3.default)(this, (Pure_component.__proto__ || Object.getPrototypeOf(Pure_component)).call(this, props));
+
+ _this.listeners = {};
+ _this.comp_name = _this.constructor.name;
+ return _this;
+ }
+
+ (0, _createClass3.default)(Pure_component, [{
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ var t0 = Date.now();
+ if (this.sp) {
+ this.sp.return();
+ delete this.sp;
+ }
+ // XXX michaelg: 'let of' requires shim with babel+react+ie11
+ // requires further investigation, leave as is till 01-Feb-2018
+ /*for (let l of Object.values(this.listeners))
+ setdb.off(l);*/
+ Object.values(this.listeners).forEach(function (l) {
+ setdb.off(l);
+ });
+ if (this.willUnmount) this.willUnmount();
+ var t1 = Date.now();
+ if (this.debug && t1 - t0 > LONG_CB_MS) {
+ console.warn('long cb componentWillUnmount %s took %sms', this.comp_name, t1 - t0);
+ }
+ }
+ }, {
+ key: 'setdb_on',
+ value: function setdb_on(path, cb, opt) {
+ this.listeners[path] = setdb.on(path, cb, opt);
+ }
+ }, {
+ key: 'etask',
+ value: function etask(sp) {
+ if (!this.sp) this.sp = _etask('Component', /*#__PURE__*/_regenerator2.default.mark(function _callee() {
+ return _regenerator2.default.wrap(function _callee$(_context) {
+ while (1) {
+ switch (_context.prev = _context.next) {
+ case 0:
+ _context.next = 2;
+ return this.wait();
+
+ case 2:
+ case 'end':
+ return _context.stop();
+ }
+ }
+ }, _callee, this);
+ }));
+ if (sp.constructor.name != 'Etask') sp = _etask(sp);
+ this.sp.spawn(sp);
+ return sp;
+ }
+ }, {
+ key: 'setState',
+ value: function setState(updater, cb) {
+ var _this2 = this,
+ _arguments = arguments;
+
+ var t0 = void 0,
+ t1 = void 0,
+ t2 = void 0,
+ t3 = void 0;
+ if (this.debug) {
+ console.log('setState %s %s', this.comp_name, Object.keys(updater).join(', '));
+ t0 = Date.now();
+ }
+ (0, _get3.default)(Pure_component.prototype.__proto__ || Object.getPrototypeOf(Pure_component.prototype), 'setState', this).call(this, updater, function () {
+ t2 = Date.now();
+ if (cb) cb.apply(_this2, _arguments);
+ t3 = Date.now();
+ if (_this2.debug && t3 - t2 > LONG_CB_MS) {
+ console.warn('long cb setState %s cb %s took %sms', _this2.comp_name, cb && cb.name, t3 - t2);
+ }
+ if (_this2.debug && t3 - t0 > LONG_CB_MS) {
+ console.warn('long cb setState-done %s cb %s took %sms', _this2.comp_name, cb && cb.name, t3 - t0);
+ }
+ });
+ t1 = Date.now();
+ if (this.debug && t1 - t0 > LONG_CB_MS) {
+ console.warn('long cb setState %s took %sms', this.comp_name, t1 - t0);
+ }
+ }
+ }]);
+ return Pure_component;
+ }(React.PureComponent);
+
+ return Pure_component;
+}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+
+/***/ }),
+/* 13 */,
+/* 14 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/* unused harmony export bpfrpt_proptype_CellPosition */
+/* unused harmony export bpfrpt_proptype_CellRendererParams */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return bpfrpt_proptype_CellRenderer; });
+/* unused harmony export bpfrpt_proptype_CellCache */
+/* unused harmony export bpfrpt_proptype_StyleCache */
+/* unused harmony export bpfrpt_proptype_CellRangeRendererParams */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return bpfrpt_proptype_CellRangeRenderer; });
+/* unused harmony export bpfrpt_proptype_CellSizeGetter */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return bpfrpt_proptype_CellSize; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return bpfrpt_proptype_NoContentRenderer; });
+/* unused harmony export bpfrpt_proptype_Scroll */
+/* unused harmony export bpfrpt_proptype_ScrollbarPresenceChange */
+/* unused harmony export bpfrpt_proptype_RenderedSection */
+/* unused harmony export bpfrpt_proptype_OverscanIndicesGetterParams */
+/* unused harmony export bpfrpt_proptype_OverscanIndices */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return bpfrpt_proptype_OverscanIndicesGetter; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bpfrpt_proptype_Alignment; });
+/* unused harmony export bpfrpt_proptype_VisibleCellRange */
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__ = __webpack_require__(233);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(4);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
+
+
+
+var bpfrpt_proptype_CellPosition = process.env.NODE_ENV === 'production' ? null : {
+ columnIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ rowIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired
+};
+var bpfrpt_proptype_CellRendererParams = process.env.NODE_ENV === 'production' ? null : {
+ columnIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ isScrolling: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool.isRequired,
+ isVisible: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool.isRequired,
+ key: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string.isRequired,
+ parent: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired,
+ rowIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ style: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired
+};
+var bpfrpt_proptype_CellRenderer = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func;
+var bpfrpt_proptype_CellCache = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.objectOf(__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node.isRequired);
+var bpfrpt_proptype_StyleCache = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.objectOf(__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired);
+var bpfrpt_proptype_CellRangeRendererParams = process.env.NODE_ENV === 'production' ? null : {
+ cellCache: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.objectOf(__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node.isRequired).isRequired,
+ cellRenderer: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func.isRequired,
+ columnSizeAndPositionManager: function columnSizeAndPositionManager() {
+ return (typeof __WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__["a" /* default */] === 'function' ? __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.instanceOf(__WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__["a" /* default */]).isRequired : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.any.isRequired).apply(this, arguments);
+ },
+ columnStartIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ columnStopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ deferredMeasurementCache: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object,
+ horizontalOffsetAdjustment: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ isScrolling: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool.isRequired,
+ isScrollingOptOut: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool.isRequired,
+ parent: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired,
+ rowSizeAndPositionManager: function rowSizeAndPositionManager() {
+ return (typeof __WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__["a" /* default */] === 'function' ? __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.instanceOf(__WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__["a" /* default */]).isRequired : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.any.isRequired).apply(this, arguments);
+ },
+ rowStartIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ rowStopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ scrollLeft: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ scrollTop: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ styleCache: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.objectOf(__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired).isRequired,
+ verticalOffsetAdjustment: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ visibleColumnIndices: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired,
+ visibleRowIndices: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired
+};
+var bpfrpt_proptype_CellRangeRenderer = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func;
+var bpfrpt_proptype_CellSizeGetter = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func;
+var bpfrpt_proptype_CellSize = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number]);
+var bpfrpt_proptype_NoContentRenderer = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func;
+var bpfrpt_proptype_Scroll = process.env.NODE_ENV === 'production' ? null : {
+ clientHeight: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ clientWidth: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ scrollHeight: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ scrollLeft: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ scrollTop: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ scrollWidth: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired
+};
+var bpfrpt_proptype_ScrollbarPresenceChange = process.env.NODE_ENV === 'production' ? null : {
+ horizontal: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool.isRequired,
+ vertical: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool.isRequired,
+ size: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired
+};
+var bpfrpt_proptype_RenderedSection = process.env.NODE_ENV === 'production' ? null : {
+ columnOverscanStartIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ columnOverscanStopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ columnStartIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ columnStopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ rowOverscanStartIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ rowOverscanStopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ rowStartIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ rowStopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired
+};
+var bpfrpt_proptype_OverscanIndicesGetterParams = process.env.NODE_ENV === 'production' ? null : {
+ // One of SCROLL_DIRECTION_HORIZONTAL or SCROLL_DIRECTION_VERTICAL
+ direction: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf(['horizontal', 'vertical']).isRequired,
+
+
+ // One of SCROLL_DIRECTION_BACKWARD or SCROLL_DIRECTION_FORWARD
+ scrollDirection: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf([-1, 1]).isRequired,
+
+
+ // Number of rows or columns in the current axis
+ cellCount: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+
+
+ // Maximum number of cells to over-render in either direction
+ overscanCellsCount: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+
+
+ // Begin of range of visible cells
+ startIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+
+
+ // End of range of visible cells
+ stopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired
+};
+var bpfrpt_proptype_OverscanIndices = process.env.NODE_ENV === 'production' ? null : {
+ overscanStartIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired,
+ overscanStopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired
+};
+var bpfrpt_proptype_OverscanIndicesGetter = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func;
+var bpfrpt_proptype_Alignment = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf(['auto', 'end', 'start', 'center']);
+var bpfrpt_proptype_VisibleCellRange = process.env.NODE_ENV === 'production' ? null : {
+ start: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,
+ stop: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(8)))
+
+/***/ }),
+/* 15 */,
+/* 16 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// LICENSE_CODE ZON ISC
+ /*jslint react:true*/
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.Ext_tooltip = exports.Preset_description = exports.flag_with_title = exports.any_flag = exports.Logo = exports.Remove_icon = exports.Add_icon = exports.Link_icon = exports.Pagination_panel = exports.Nav = exports.Checkbox = exports.Labeled_controller = exports.Field_row_raw = exports.Note = exports.Cm_wrapper = exports.Copy_btn = exports.Form_controller = exports.with_proxy_ports = exports.Code = exports.Loader_small = exports.Loader = exports.Warning = exports.Warnings = exports.Tooltip_bytes = undefined;
+
+var _objectWithoutProperties2 = __webpack_require__(7);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
+var _extends2 = __webpack_require__(5);
+
+var _extends3 = _interopRequireDefault(_extends2);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(10);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(2);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(3);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _pure_component = __webpack_require__(12);
+
+var _pure_component2 = _interopRequireDefault(_pure_component);
+
+var _reactTooltip = __webpack_require__(122);
+
+var _reactTooltip2 = _interopRequireDefault(_reactTooltip);
+
+var _reactBootstrap = __webpack_require__(196);
+
+var _classnames = __webpack_require__(6);
+
+var _classnames2 = _interopRequireDefault(_classnames);
+
+var _codemirror = __webpack_require__(55);
+
+var _codemirror2 = _interopRequireDefault(_codemirror);
+
+__webpack_require__(94);
+
+__webpack_require__(105);
+
+var _jquery = __webpack_require__(13);
+
+var _jquery2 = _interopRequireDefault(_jquery);
+
+var _util = __webpack_require__(30);
+
+var _controls = __webpack_require__(74);
+
+var _tooltip = __webpack_require__(23);
+
+var _tooltip2 = _interopRequireDefault(_tooltip);
+
+var _i18n = __webpack_require__(19);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var Tooltip_bytes = exports.Tooltip_bytes = function Tooltip_bytes(_ref) {
+ var bytes = _ref.bytes,
+ chrome_style = _ref.chrome_style,
+ bytes_out = _ref.bytes_out,
+ bytes_in = _ref.bytes_in;
+
+ bytes = bytes || 0;
+ var tooltip = [0, 1, 2, 3].map(function (n) {
+ var bw = (0, _util.bytes_format)(bytes, n);
+ var bw_out = (0, _util.bytes_format)(bytes_out, n);
+ var bw_in = (0, _util.bytes_format)(bytes_in, n);
+ var details = bytes_out && bytes_in && '(' + bw_out + ' up | ' + bw_in + ' down)' || '';
+ return '
' + bw + ' ' + details + '
';
+ }).join('');
+ return _react2.default.createElement(
+ _tooltip2.default,
+ { title: bytes ? tooltip : '' },
+ _react2.default.createElement(
+ 'div',
+ { className: 'disp_value' },
+ (0, _util.bytes_format)(bytes) || '—'
+ )
+ );
+};var Warnings = exports.Warnings = function Warnings(props) {
+ return _react2.default.createElement(
+ 'div',
+ null,
+ (props.warnings || []).map(function (w, i) {
+ return _react2.default.createElement(Warning, { key: i, text: w.msg });
+ })
+ );
+};
+
+var Warning = exports.Warning = function Warning(props) {
+ return _react2.default.createElement(
+ 'div',
+ { className: 'warning' },
+ _react2.default.createElement('div', { className: 'warning_icon' }),
+ _react2.default.createElement(
+ 'div',
+ { className: 'text' },
+ props.text
+ )
+ );
+};
+
+var Loader = exports.Loader = function Loader(_ref2) {
+ var show = _ref2.show;
+
+ if (!show) return null;
+ return _react2.default.createElement(
+ 'div',
+ { className: 'loader_wrapper' },
+ _react2.default.createElement('div', { className: 'mask' }),
+ _react2.default.createElement(
+ 'div',
+ { className: 'loader' },
+ _react2.default.createElement('div', { className: 'spinner' })
+ )
+ );
+};
+
+var Loader_small = exports.Loader_small = function Loader_small(props) {
+ var show = props.show,
+ saving = props.saving,
+ loading_msg = props.loading_msg,
+ _props$std_msg = props.std_msg,
+ std_msg = _props$std_msg === undefined ? '' : _props$std_msg,
+ std_tooltip = props.std_tooltip;
+
+ saving = show || saving;
+ loading_msg = loading_msg || 'Saving...';
+ var msg = saving ? loading_msg : std_msg;
+ var tooltip = saving ? '' : std_tooltip;
+ return _react2.default.createElement(
+ 'div',
+ { className: 'loader_small' },
+ _react2.default.createElement('div', { className: (0, _classnames2.default)('spinner', { show: saving }) }),
+ _react2.default.createElement(
+ 'div',
+ { className: (0, _classnames2.default)('saving_label', { saving: saving }) },
+ _react2.default.createElement(
+ _tooltip2.default,
+ { title: tooltip },
+ msg
+ )
+ )
+ );
+};
+
+// XXX krzysztof: refactoring: reuse Copy_btn component
+var Code = exports.Code = (0, _i18n.with_tt)(['Copy to clipboard', 'Copy', 'Copied!'], function (_Pure_component) {
+ (0, _inherits3.default)(Code, _Pure_component);
+
+ function Code() {
+ (0, _classCallCheck3.default)(this, Code);
+ return (0, _possibleConstructorReturn3.default)(this, (Code.__proto__ || Object.getPrototypeOf(Code)).apply(this, arguments));
+ }
+
+ (0, _createClass3.default)(Code, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var t = this.props.t;
+
+ (0, _jquery2.default)(this.ref).find('.btn_copy').tooltip('show').attr('title', t['Copy to clipboard']).tooltip('fixTitle');
+ }
+ }, {
+ key: 'set_ref',
+ value: function set_ref(e) {
+ this.ref = e;
+ }
+ }, {
+ key: 'copy',
+ value: function copy() {
+ var t = this.props.t;
+
+ if (this.props.on_click) this.props.on_click();
+ var area = (0, _jquery2.default)(this.ref).children('textarea')[0];
+ var source = (0, _jquery2.default)(this.ref).children('.source')[0];
+ area.value = source.innerText;
+ area.select();
+ try {
+ document.execCommand('copy');
+ (0, _jquery2.default)(this.ref).find('.btn_copy').attr('title', t['Copied!']).tooltip('fixTitle').tooltip('show').attr('title', t['Copy to clipboard']).tooltip('fixTitle');
+ } catch (e) {
+ console.log('Oops, unable to copy');
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var t = this.props.t;
+
+ return _react2.default.createElement(
+ 'code',
+ { ref: this.set_ref.bind(this) },
+ _react2.default.createElement(
+ 'span',
+ { className: 'source' },
+ this.props.children
+ ),
+ _react2.default.createElement('textarea', { style: { position: 'fixed', top: '-1000px' } }),
+ _react2.default.createElement(
+ 'button',
+ { onClick: this.copy.bind(this), 'data-container': 'body',
+ className: 'btn btn_lpm btn_lpm_small btn_copy' },
+ t['Copy']
+ )
+ );
+ }
+ }]);
+ return Code;
+}(_pure_component2.default));
+
+var with_proxy_ports = exports.with_proxy_ports = function with_proxy_ports(Component) {
+ var port_select = function port_select(data) {
+ return function port_select_inner(props) {
+ return _react2.default.createElement(_controls.Select, { val: props.val,
+ data: data, on_change_wrapper: props.on_change,
+ disabled: props.disabled });
+ };
+ };
+
+ var With_proxy_ports = function (_Pure_component2) {
+ (0, _inherits3.default)(With_proxy_ports, _Pure_component2);
+
+ function With_proxy_ports() {
+ var _ref3;
+
+ var _temp, _this2, _ret;
+
+ (0, _classCallCheck3.default)(this, With_proxy_ports);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this2 = (0, _possibleConstructorReturn3.default)(this, (_ref3 = With_proxy_ports.__proto__ || Object.getPrototypeOf(With_proxy_ports)).call.apply(_ref3, [this].concat(args))), _this2), _this2.state = {}, _this2.port_select = port_select([]), _temp), (0, _possibleConstructorReturn3.default)(_this2, _ret);
+ }
+
+ (0, _createClass3.default)(With_proxy_ports, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var _this3 = this;
+
+ this.setdb_on('head.proxies_running', function (proxies) {
+ if (!proxies) return;
+ var ports = proxies.map(function (p) {
+ return p.port;
+ });
+ var ports_opt = proxies.map(function (p) {
+ var name = p.internal_name ? ' (' + p.internal_name + ')' : '';
+ var key = p.port + name;
+ return { key: key, value: p.port };
+ });
+ var def_port = ports[0];
+ _this3.port_select = port_select(ports_opt);
+ _this3.setState({ ports: ports, ports_opt: ports_opt, def_port: def_port,
+ ports_loaded: true });
+ });
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ if (!this.state.ports_loaded) return _react2.default.createElement(Loader, { show: true });
+ return _react2.default.createElement(Component, (0, _extends3.default)({}, this.props, { port_select: this.port_select,
+ def_port: this.state.def_port, ports: this.state.ports,
+ ports_opt: this.state.ports_opt }));
+ }
+ }]);
+ return With_proxy_ports;
+ }(_pure_component2.default);
+
+ return With_proxy_ports;
+};
+
+var Form_controller = exports.Form_controller = function Form_controller(props) {
+ var type = props.type;
+ if (type == 'select') return _react2.default.createElement(_controls.Select, props);else if (type == 'typeahead') return _react2.default.createElement(_controls.Typeahead_wrapper, props);else if (type == 'textarea') return _react2.default.createElement(_controls.Textarea, props);else if (type == 'json') return _react2.default.createElement(_controls.Json, props);else if (type == 'url') return _react2.default.createElement(_controls.Url_input, props);else if (type == 'regex') return _react2.default.createElement(_controls.Regex, props);else if (type == 'yes_no') return _react2.default.createElement(_controls.Yes_no, props);else if (type == 'select_number') return _react2.default.createElement(_controls.Select_number, props);else if (type == 'select_status') return _react2.default.createElement(_controls.Select_status, props);else if (type == 'pins') return _react2.default.createElement(_controls.Pins, props);
+ return _react2.default.createElement(_controls.Input, props);
+};
+
+var Copy_btn = exports.Copy_btn = (0, _i18n.with_tt)(['Copy to clipboard', 'Copy'], function (_Pure_component3) {
+ (0, _inherits3.default)(Copy_btn, _Pure_component3);
+
+ function Copy_btn() {
+ var _ref4;
+
+ var _temp2, _this4, _ret2;
+
+ (0, _classCallCheck3.default)(this, Copy_btn);
+
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
+
+ return _ret2 = (_temp2 = (_this4 = (0, _possibleConstructorReturn3.default)(this, (_ref4 = Copy_btn.__proto__ || Object.getPrototypeOf(Copy_btn)).call.apply(_ref4, [this].concat(args))), _this4), _this4.textarea = _react2.default.createRef(), _this4.btn = _react2.default.createRef(), _this4.copy = function () {
+ var t = _this4.props.t;
+
+ var txt = _this4.textarea.current;
+ var area = (0, _jquery2.default)(txt)[0];
+ area.value = _this4.props.val;
+ area.select();
+ try {
+ document.execCommand('copy');
+ (0, _jquery2.default)(_this4.btn.current).attr('title', 'Copied!').tooltip('fixTitle').tooltip('show').attr('title', t['Copy to clipboard']).tooltip('fixTitle');
+ } catch (e) {
+ console.log('Oops, unable to copy');
+ }
+ }, _temp2), (0, _possibleConstructorReturn3.default)(_this4, _ret2);
+ }
+
+ (0, _createClass3.default)(Copy_btn, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var t = this.props.t;
+
+ (0, _jquery2.default)(this.btn.current).tooltip('show').attr('title', t['Copy to clipboard']).tooltip('fixTitle');
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ return _react2.default.createElement(
+ 'div',
+ { className: 'copy_btn', style: this.props.style },
+ _react2.default.createElement(
+ 'button',
+ { onClick: this.copy, 'data-container': 'body',
+ style: this.props.inner_style,
+ ref: this.btn, className: 'btn btn_lpm btn_lpm_small btn_copy' },
+ this.props.title || 'Copy'
+ ),
+ _react2.default.createElement('textarea', { ref: this.textarea,
+ style: { position: 'fixed', top: '-1000px' } })
+ );
+ }
+ }]);
+ return Copy_btn;
+}(_pure_component2.default));
+
+var Cm_wrapper = exports.Cm_wrapper = function (_Pure_component4) {
+ (0, _inherits3.default)(Cm_wrapper, _Pure_component4);
+
+ function Cm_wrapper() {
+ var _ref5;
+
+ var _temp3, _this5, _ret3;
+
+ (0, _classCallCheck3.default)(this, Cm_wrapper);
+
+ for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
+ args[_key3] = arguments[_key3];
+ }
+
+ return _ret3 = (_temp3 = (_this5 = (0, _possibleConstructorReturn3.default)(this, (_ref5 = Cm_wrapper.__proto__ || Object.getPrototypeOf(Cm_wrapper)).call.apply(_ref5, [this].concat(args))), _this5), _this5.on_cm_change = function (cm) {
+ var new_val = cm.doc.getValue();
+ if (new_val == _this5.props.val) return;
+ _this5.props.on_change(new_val);
+ }, _this5.set_ref = function (ref) {
+ _this5.textarea = ref;
+ }, _temp3), (0, _possibleConstructorReturn3.default)(_this5, _ret3);
+ }
+
+ (0, _createClass3.default)(Cm_wrapper, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var opt = { mode: 'javascript' };
+ if (this.props.readonly) opt.readOnly = 'nocursor';
+ this.cm = _codemirror2.default.fromTextArea(this.textarea, opt);
+ this.cm.on('change', this.on_cm_change);
+ this.cm.setSize('100%', '100%');
+ this.cm.doc.setValue(this.props.val || '');
+ }
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate(prev_props) {
+ if (prev_props.val != this.props.val && this.cm.doc.getValue() != this.props.val) {
+ this.cm.doc.setValue(this.props.val || '');
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ return _react2.default.createElement(
+ 'div',
+ { className: 'code_mirror_wrapper' },
+ _react2.default.createElement(Copy_btn, { val: this.props.val }),
+ _react2.default.createElement('textarea', { ref: this.set_ref })
+ );
+ }
+ }]);
+ return Cm_wrapper;
+}(_pure_component2.default);
+
+var Note = exports.Note = function Note(props) {
+ return _react2.default.createElement(
+ 'div',
+ { className: 'note' },
+ _react2.default.createElement(
+ 'span',
+ null,
+ props.children
+ )
+ );
+};
+
+var Field_row_raw = function Field_row_raw(_ref6) {
+ var disabled = _ref6.disabled,
+ note = _ref6.note,
+ animated = _ref6.animated,
+ props = (0, _objectWithoutProperties3.default)(_ref6, ['disabled', 'note', 'animated']);
+
+ var classes = (0, _classnames2.default)('field_row', { disabled: disabled, note: note });
+ var inner_classes = (0, _classnames2.default)('field_row_inner', props.inner_class_name, { animated: animated });
+ return _react2.default.createElement(
+ 'div',
+ { className: 'field_row_wrapper' },
+ _react2.default.createElement(
+ 'div',
+ { className: classes },
+ _react2.default.createElement(
+ 'div',
+ { className: inner_classes, style: props.inner_style },
+ props.children
+ )
+ )
+ );
+};
+
+exports.Field_row_raw = Field_row_raw;
+var Labeled_controller = exports.Labeled_controller = function Labeled_controller(props) {
+ return _react2.default.createElement(
+ Field_row_raw,
+ { disabled: props.disabled, note: props.note,
+ animated: props.animated, inner_style: props.field_row_inner_style },
+ _react2.default.createElement(
+ _i18n.T,
+ null,
+ function (t) {
+ return _react2.default.createElement(
+ _react2.default.Fragment,
+ null,
+ _react2.default.createElement(
+ 'div',
+ { className: 'desc', style: props.desc_style },
+ _react2.default.createElement(
+ _tooltip2.default,
+ { title: t(props.tooltip) },
+ t(props.label)
+ )
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(
+ 'div',
+ { className: 'field', 'data-tip': true, 'data-for': props.id + 'tip' },
+ props.children || _react2.default.createElement(Form_controller, (0, _extends3.default)({ disabled: props.disabled }, props)),
+ props.sufix && _react2.default.createElement(
+ 'span',
+ { className: 'sufix' },
+ t(props.sufix)
+ ),
+ props.field_tooltip && _react2.default.createElement(
+ _reactTooltip2.default,
+ { id: props.id + 'tip', type: 'light', effect: 'solid',
+ delayHide: 30, delayUpdate: 300, place: 'right' },
+ t(props.field_tooltip)
+ )
+ ),
+ props.note && _react2.default.createElement(
+ Note,
+ null,
+ t(props.note)
+ )
+ )
+ );
+ }
+ )
+ );
+};
+
+var Checkbox = exports.Checkbox = function Checkbox(props) {
+ return _react2.default.createElement(
+ 'div',
+ { className: 'form-check' },
+ _react2.default.createElement(
+ 'label',
+ { className: 'form-check-label' },
+ _react2.default.createElement('input', { className: 'form-check-input', type: 'checkbox', value: props.value,
+ onChange: props.on_change, onClick: props.on_click,
+ checked: props.checked }),
+ props.text
+ )
+ );
+};
+
+var Nav = exports.Nav = function Nav(_ref7) {
+ var title = _ref7.title,
+ subtitle = _ref7.subtitle,
+ warning = _ref7.warning;
+ return _react2.default.createElement(
+ 'div',
+ { className: 'nav_header' },
+ _react2.default.createElement(
+ 'h3',
+ null,
+ _react2.default.createElement(
+ _i18n.T,
+ null,
+ title
+ )
+ ),
+ _react2.default.createElement(
+ 'div',
+ { className: 'subtitle' },
+ _react2.default.createElement(
+ _i18n.T,
+ null,
+ subtitle
+ )
+ ),
+ _react2.default.createElement(Warning_msg, { warning: warning })
+ );
+};
+
+var Warning_msg = function Warning_msg(_ref8) {
+ var warning = _ref8.warning;
+
+ if (!warning) return null;
+ return _react2.default.createElement(Warning, { text: warning });
+};
+
+var Pagination_panel = exports.Pagination_panel = function Pagination_panel(props) {
+ var entries = props.entries,
+ items_per_page = props.items_per_page,
+ cur_page = props.cur_page,
+ page_change = props.page_change,
+ children = props.children,
+ top = props.top,
+ bottom = props.bottom,
+ update_items_per_page = props.update_items_per_page,
+ max_buttons = props.max_buttons,
+ total = props.total;
+
+ total = total || entries && entries.length || 0;
+ var pagination = null;
+ if (total > items_per_page) {
+ var next = false;
+ var pages = Math.ceil(total / items_per_page);
+ if (cur_page + 1 < pages) next = 'Next';
+ pagination = _react2.default.createElement(_reactBootstrap.Pagination, { next: next, boundaryLinks: true,
+ activePage: cur_page + 1,
+ bsSize: 'small', onSelect: page_change,
+ items: pages, maxButtons: max_buttons || 5 });
+ }
+ var buttons = null;
+ if (top) buttons = _react2.default.createElement(
+ 'div',
+ { className: 'table_buttons' },
+ children
+ );
+ var display_opt = [10, 50, 100, 500, 1000];
+ var from = Math.min(cur_page * items_per_page + 1, total);
+ var to = Math.min((cur_page + 1) * items_per_page, total);
+ return _react2.default.createElement(
+ 'div',
+ { className: (0, _classnames2.default)('pagination_panel', { top: top, bottom: bottom }) },
+ pagination,
+ _react2.default.createElement(
+ 'div',
+ { className: 'numbers' },
+ _react2.default.createElement(
+ 'strong',
+ null,
+ from,
+ '-',
+ to
+ ),
+ ' of ',
+ _react2.default.createElement(
+ 'strong',
+ null,
+ total
+ )
+ ),
+ _react2.default.createElement(_controls.Select_number, { val: items_per_page, data: display_opt,
+ on_change_wrapper: update_items_per_page, 'default': 10 }),
+ buttons
+ );
+};
+
+var Link_icon = exports.Link_icon = function Link_icon(props) {
+ var tooltip = props.tooltip,
+ on_click = props.on_click,
+ id = props.id,
+ classes = props.classes,
+ disabled = props.disabled,
+ invisible = props.invisible,
+ small = props.small,
+ img = props.img;
+
+ if (invisible) tooltip = '';
+ if (disabled || invisible) on_click = function on_click() {
+ return null;
+ };
+ classes = (0, _classnames2.default)(classes, { small: small });
+ var icon = img ? _react2.default.createElement('div', { className: 'img_icon',
+ style: { backgroundImage: 'url(' + img + ')' } }) : _react2.default.createElement('i', { className: (0, _classnames2.default)('glyphicon', 'glyphicon-' + id) });
+ return _react2.default.createElement(
+ _i18n.T,
+ null,
+ function (t) {
+ return _react2.default.createElement(
+ _tooltip2.default,
+ { title: t(tooltip), key: id },
+ _react2.default.createElement(
+ 'span',
+ { className: (0, _classnames2.default)('link', 'icon_link', classes),
+ onClick: on_click },
+ icon
+ )
+ );
+ }
+ );
+};
+
+var Add_icon = exports.Add_icon = function Add_icon(_ref9) {
+ var click = _ref9.click,
+ tooltip = _ref9.tooltip;
+ return _react2.default.createElement(
+ _tooltip2.default,
+ { title: tooltip },
+ _react2.default.createElement(
+ 'span',
+ { className: 'link icon_link top right add_header', onClick: click },
+ _react2.default.createElement('i', { className: 'glyphicon glyphicon-plus' })
+ )
+ );
+};
+
+var Remove_icon = exports.Remove_icon = function Remove_icon(_ref10) {
+ var click = _ref10.click,
+ tooltip = _ref10.tooltip;
+ return _react2.default.createElement(
+ _tooltip2.default,
+ { title: tooltip },
+ _react2.default.createElement(
+ 'span',
+ { className: 'link icon_link top', onClick: click },
+ _react2.default.createElement('i', { className: 'glyphicon glyphicon-trash' })
+ )
+ );
+};
+
+var Logo = exports.Logo = function (_Pure_component5) {
+ (0, _inherits3.default)(Logo, _Pure_component5);
+
+ function Logo() {
+ var _ref11;
+
+ var _temp4, _this6, _ret4;
+
+ (0, _classCallCheck3.default)(this, Logo);
+
+ for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
+ args[_key4] = arguments[_key4];
+ }
+
+ return _ret4 = (_temp4 = (_this6 = (0, _possibleConstructorReturn3.default)(this, (_ref11 = Logo.__proto__ || Object.getPrototypeOf(Logo)).call.apply(_ref11, [this].concat(args))), _this6), _this6.state = {}, _temp4), (0, _possibleConstructorReturn3.default)(_this6, _ret4);
+ }
+
+ (0, _createClass3.default)(Logo, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var _this7 = this;
+
+ this.setdb_on('head.version', function (ver) {
+ return _this7.setState({ ver: ver });
+ });
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ return _react2.default.createElement(
+ 'div',
+ { className: 'nav_top' },
+ _react2.default.createElement('a', { href: 'https://luminati.io/cp', rel: 'noopener noreferrer',
+ target: '_blank', className: 'logo_big' }),
+ _react2.default.createElement(
+ 'div',
+ { className: 'version' },
+ 'V',
+ this.state.ver
+ ),
+ _react2.default.createElement(
+ 'div',
+ { className: 'nav_top_right' },
+ _react2.default.createElement(_i18n.Language, null)
+ )
+ );
+ }
+ }]);
+ return Logo;
+}(_pure_component2.default);
+
+var any_flag = exports.any_flag = _react2.default.createElement(
+ _i18n.T,
+ null,
+ function (t) {
+ return _react2.default.createElement(
+ _tooltip2.default,
+ { title: t('Any') },
+ _react2.default.createElement(
+ 'span',
+ null,
+ _react2.default.createElement('img', { src: '/img/flag_any_country.svg', style: { height: 18 } }),
+ _react2.default.createElement(
+ 'span',
+ { className: 'lit', style: { marginLeft: 2 } },
+ t('Any')
+ )
+ )
+ );
+ }
+);
+
+var flag_with_title = exports.flag_with_title = function flag_with_title(country, title) {
+ return _react2.default.createElement(
+ _tooltip2.default,
+ { title: country.toUpperCase() },
+ _react2.default.createElement(
+ 'span',
+ null,
+ _react2.default.createElement('span', { className: 'flag-icon flag-icon-' + country }),
+ _react2.default.createElement(
+ 'span',
+ { className: 'lit' },
+ title
+ )
+ )
+ );
+};
+
+var Preset_description = exports.Preset_description = function Preset_description(_ref12) {
+ var preset = _ref12.preset,
+ rule_clicked = _ref12.rule_clicked;
+
+ if (!preset) return null;
+ var rule_tip = 'Click to save a proxy port and move to this ' + 'configuration';
+ var desc = _util.presets[preset].subtitle.replace(/ +(?= )/g, '').replace(/\n /g, '\n');
+ return _react2.default.createElement(
+ _i18n.T,
+ null,
+ function (t) {
+ return _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(
+ 'div',
+ { className: 'desc' },
+ t(desc)
+ ),
+ _react2.default.createElement(
+ 'ul',
+ { className: 'bullets' },
+ (_util.presets[preset].rules || []).map(function (r) {
+ return _react2.default.createElement(
+ 'li',
+ { key: r.field },
+ _react2.default.createElement(
+ _tooltip2.default,
+ { title: t(rule_tip) },
+ _react2.default.createElement(
+ 'a',
+ { className: 'link', onClick: function onClick() {
+ return rule_clicked(r.field);
+ } },
+ t(r.label)
+ )
+ )
+ );
+ })
+ )
+ );
+ }
+ );
+};
+
+var Ext_tooltip = exports.Ext_tooltip = function Ext_tooltip() {
+ return _react2.default.createElement(
+ 'div',
+ null,
+ 'This feature is only available when using',
+ ' ',
+ _react2.default.createElement(
+ 'a',
+ { className: 'link', target: '_blank', href: 'https://luminati.io/cp/zones',
+ rel: 'noopener noreferrer' },
+ 'proxies by Luminati network'
+ )
+ );
+};
+
+/***/ }),
+/* 17 */,
+/* 18 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(238);
+
+
+/***/ }),
+/* 19 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// LICENSE_CODE ZON ISC
+ /*jslint react:true*/
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.Language = exports.set_lang = exports.langs = exports.with_tt = exports.T = undefined;
+
+var _defineProperty2 = __webpack_require__(35);
+
+var _defineProperty3 = _interopRequireDefault(_defineProperty2);
+
+var _extends3 = __webpack_require__(5);
+
+var _extends4 = _interopRequireDefault(_extends3);
+
+var _objectWithoutProperties2 = __webpack_require__(7);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(10);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(2);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(3);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _pure_component = __webpack_require__(12);
+
+var _pure_component2 = _interopRequireDefault(_pure_component);
+
+var _zh_CN = __webpack_require__(1409);
+
+var _zh_CN2 = _interopRequireDefault(_zh_CN);
+
+var _ru = __webpack_require__(1410);
+
+var _ru2 = _interopRequireDefault(_ru);
+
+var _setdb = __webpack_require__(22);
+
+var _setdb2 = _interopRequireDefault(_setdb);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var t = function t(key, translation) {
+ if (!key || !translation) return key;
+ if (!translation[key]) console.info('missing translation for \'%s\'', key);
+ return translation[key] || key;
+};
+
+// XXX krzysztof: try to reuse T from /www/locale/pub
+
+var T = exports.T = function (_Pure_component) {
+ (0, _inherits3.default)(T, _Pure_component);
+
+ function T() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, T);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = T.__proto__ || Object.getPrototypeOf(T)).call.apply(_ref, [this].concat(args))), _this), _this.state = {}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
+
+ (0, _createClass3.default)(T, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var _this2 = this;
+
+ this.setdb_on('i18n.translation', function (translation) {
+ if (translation === undefined) return;
+ _this2.setState({ translation: translation });
+ });
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var translation = this.state.translation;
+ var children = this.props.children;
+
+ if (typeof children == 'function') return children(function (key) {
+ return t(key, translation);
+ });
+ if (typeof children == 'string') return t(children.replace(/\s+/g, ' '), translation);
+ return null;
+ }
+ }]);
+ return T;
+}(_pure_component2.default);
+
+var with_tt = function with_tt(keys, Component) {
+ return function (_Pure_component2) {
+ (0, _inherits3.default)(_class2, _Pure_component2);
+
+ function _class2() {
+ var _ref2;
+
+ var _temp2, _this3, _ret2;
+
+ (0, _classCallCheck3.default)(this, _class2);
+
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
+
+ return _ret2 = (_temp2 = (_this3 = (0, _possibleConstructorReturn3.default)(this, (_ref2 = _class2.__proto__ || Object.getPrototypeOf(_class2)).call.apply(_ref2, [this].concat(args))), _this3), _this3.state = {}, _temp2), (0, _possibleConstructorReturn3.default)(_this3, _ret2);
+ }
+
+ (0, _createClass3.default)(_class2, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var _this4 = this;
+
+ this.setdb_on('i18n.translation', function (translation) {
+ if (translation === undefined) return;
+ _this4.setState({ translation: translation });
+ });
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var translation = this.state.translation;
+ var props = (0, _objectWithoutProperties3.default)(this.props, []);
+
+ var translations = keys.reduce(function (acc, k) {
+ var translated = t(k.replace(/\s+/g, ' '), translation);
+ return (0, _extends4.default)({}, acc, (0, _defineProperty3.default)({}, k, translated));
+ }, {});
+ return _react2.default.createElement(Component, (0, _extends4.default)({}, props, { t: translations }));
+ }
+ }]);
+ return _class2;
+ }(_pure_component2.default);
+};
+
+exports.with_tt = with_tt;
+var langs = exports.langs = {
+ en: { name: 'English', flag: 'gb' },
+ ru: { name: 'русский', flag: 'ru', t: _ru2.default },
+ cn: { name: '简体中文', flag: 'cn', t: _zh_CN2.default }
+};
+
+var set_lang = exports.set_lang = function set_lang(lang) {
+ _setdb2.default.set('i18n.translation', langs[lang].t || null);
+};
+
+var Language = exports.Language = function (_Pure_component3) {
+ (0, _inherits3.default)(Language, _Pure_component3);
+
+ function Language() {
+ var _ref3;
+
+ var _temp3, _this5, _ret3;
+
+ (0, _classCallCheck3.default)(this, Language);
+
+ for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
+ args[_key3] = arguments[_key3];
+ }
+
+ return _ret3 = (_temp3 = (_this5 = (0, _possibleConstructorReturn3.default)(this, (_ref3 = Language.__proto__ || Object.getPrototypeOf(Language)).call.apply(_ref3, [this].concat(args))), _this5), _this5.state = {}, _this5.set_lang = function (lang) {
+ _this5.setState({ lang: lang });
+ set_lang(lang);
+ var curr = window.localStorage.getItem('lang');
+ if (curr != lang) window.localStorage.setItem('lang', lang);
+ }, _temp3), (0, _possibleConstructorReturn3.default)(_this5, _ret3);
+ }
+
+ (0, _createClass3.default)(Language, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var _this6 = this;
+
+ var lang = window.localStorage.getItem('lang');
+ if (lang) return this.set_lang(lang);
+ this.setdb_on('head.conn', function (conn) {
+ if (!conn) return;
+ if (Object.keys(langs).includes(conn.current_country)) lang = conn.current_country;else lang = 'en';
+ _this6.set_lang(lang);
+ });
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _this7 = this;
+
+ if (!this.state.lang) return null;
+ return _react2.default.createElement(
+ 'div',
+ { className: 'dropdown' },
+ _react2.default.createElement(
+ 'a',
+ { className: 'link dropdown-toggle', 'data-toggle': 'dropdown' },
+ _react2.default.createElement(Lang_cell, { lang: this.state.lang })
+ ),
+ _react2.default.createElement(
+ 'ul',
+ { className: 'dropdown-menu dropdown-menu-right' },
+ Object.keys(langs).map(function (lang) {
+ return _react2.default.createElement(Lang_row, { set_lang: _this7.set_lang, key: lang, lang: lang });
+ })
+ )
+ );
+ }
+ }]);
+ return Language;
+}(_pure_component2.default);
+
+var Lang_row = function Lang_row(_ref4) {
+ var lang = _ref4.lang,
+ set_lang = _ref4.set_lang;
+ return _react2.default.createElement(
+ 'li',
+ { onClick: set_lang.bind(undefined, lang) },
+ _react2.default.createElement(
+ 'a',
+ null,
+ _react2.default.createElement(Lang_cell, { lang: lang })
+ )
+ );
+};
+
+var Lang_cell = function Lang_cell(_ref5) {
+ var lang = _ref5.lang;
+ return _react2.default.createElement(
+ _react2.default.Fragment,
+ null,
+ _react2.default.createElement('span', { className: 'flag-icon flag-icon-' + langs[lang].flag }),
+ langs[lang].name
+ );
+};
+
+/***/ }),
+/* 20 */,
+/* 21 */,
+/* 22 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
+var module;
+// LICENSE_CODE ZON
+'use strict'; /*jslint node:true, browser:true, es6:true*/
+(function(){
+
+var is_node_ff = typeof module=='object' && module.exports;
+var is_rn = (typeof global=='object' && !!global.nativeRequire) ||
+ (typeof navigator=='object' && navigator.product=='ReactNative');
+if (is_rn)
+{
+}
+else if (!is_node_ff)
+ ;
+else
+ ;
+!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(58), __webpack_require__(167)], __WEBPACK_AMD_DEFINE_FACTORY__ = ((_, EventEmitter)=>{
+
+const RECURSIVE = '.';
+
+const E = new EventEmitter();
+E.state = {};
+
+E.on = (path, fn, opt)=>{
+ opt = _.assign({recursive: false, init: true}, opt);
+ EventEmitter.prototype.on.call(E, path, fn);
+ if (opt.recursive)
+ EventEmitter.prototype.on.call(E, RECURSIVE+path, fn);
+ if (opt.init)
+ fn(E.get(path));
+ return {path, fn, recursive: opt.recursive};
+};
+
+E.off = listener=>{
+ EventEmitter.prototype.removeListener.call(E, listener.path, listener.fn);
+ if (listener.recursive)
+ {
+ EventEmitter.prototype.removeListener
+ .call(E, RECURSIVE+listener.path, listener.fn);
+ }
+};
+
+E.get = path=>_.get(E.state, path);
+
+E.set = (path, curr, opt)=>{
+ opt = _.assign({force_emit: false}, opt);
+ if (!opt.force_emit && _.get(E.state, path)===curr)
+ return;
+ _.set(E.state, path, curr);
+ E.emit_path(path);
+ // XXX colin/ilgiz: add recurisve notify when using recursive flag
+};
+
+E.delete = path=>E.set(path, undefined);
+
+E.emit_path = path=>{
+ E.emit(path, _.get(E.state, path));
+ path = path.split('.');
+ while (path.length>1)
+ {
+ path.pop();
+ let p = path.join('.');
+ E.emit(RECURSIVE+p, _.get(E.state, p));
+ }
+};
+
+E.clear = function(){
+ this.removeAllListeners();
+ this.state = {};
+};
+
+E.debug = function(){
+ window.setdb = E;
+};
+
+return E;
+
+}),
+ __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__)); }());
+
+
+/***/ }),
+/* 23 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// LICENSE_CODE ZON ISC
+ /*jslint react:true*/
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _typeof2 = __webpack_require__(81);
+
+var _typeof3 = _interopRequireDefault(_typeof2);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(10);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(2);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(3);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _pure_component = __webpack_require__(12);
+
+var _pure_component2 = _interopRequireDefault(_pure_component);
+
+var _jquery = __webpack_require__(13);
+
+var _jquery2 = _interopRequireDefault(_jquery);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var Tooltip = function (_Pure_component) {
+ (0, _inherits3.default)(Tooltip, _Pure_component);
+
+ function Tooltip() {
+ (0, _classCallCheck3.default)(this, Tooltip);
+ return (0, _possibleConstructorReturn3.default)(this, (Tooltip.__proto__ || Object.getPrototypeOf(Tooltip)).apply(this, arguments));
+ }
+
+ (0, _createClass3.default)(Tooltip, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ if (!this.ref) return;
+ (0, _jquery2.default)(this.ref).tooltip();
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ (0, _jquery2.default)(this.ref).tooltip('destroy');
+ }
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate() {
+ (0, _jquery2.default)(this.ref).attr('title', this.props.title).tooltip('fixTitle');
+ }
+ }, {
+ key: 'on_mouse_leave',
+ value: function on_mouse_leave() {
+ if (!this.ref) return;
+ (0, _jquery2.default)(this.ref).tooltip('hide');
+ }
+ }, {
+ key: 'set_ref',
+ value: function set_ref(e) {
+ this.ref = e;
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ if (this.props.children == undefined) return null;
+ if (!this.props.title) return this.props.children;
+ var classes = 'tooltip har_tooltip ' + (this.props.className || '');
+ var props = {
+ 'data-toggle': 'tooltip',
+ 'data-placement': this.props.placement || 'top',
+ 'data-container': 'body',
+ 'data-html': true,
+ 'data-template': '',
+ title: this.props.title,
+ ref: this.set_ref.bind(this),
+ onMouseLeave: this.on_mouse_leave.bind(this)
+ };
+ return _react2.default.Children.map(this.props.children, function (c) {
+ if (typeof c == 'number') c = '' + c;
+ if (typeof c == 'string' || (typeof c === 'undefined' ? 'undefined' : (0, _typeof3.default)(c)) == 'object' && c.type.name == 'T') return _react2.default.createElement('span', props, c);
+ return _react2.default.cloneElement(c, props);
+ });
+ }
+ }]);
+ return Tooltip;
+}(_pure_component2.default);
+
+exports.default = Tooltip;
+
+/***/ }),
+/* 24 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__ = __webpack_require__(474);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserRouter", function() { return __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(488);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "HashRouter", function() { return __WEBPACK_IMPORTED_MODULE_1__HashRouter__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(252);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return __WEBPACK_IMPORTED_MODULE_2__Link__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(489);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MemoryRouter", function() { return __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavLink__ = __webpack_require__(491);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NavLink", function() { return __WEBPACK_IMPORTED_MODULE_4__NavLink__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Prompt__ = __webpack_require__(493);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Prompt", function() { return __WEBPACK_IMPORTED_MODULE_5__Prompt__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(495);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(253);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(169);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_8__Router__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(497);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "StaticRouter", function() { return __WEBPACK_IMPORTED_MODULE_9__StaticRouter__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Switch__ = __webpack_require__(499);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return __WEBPACK_IMPORTED_MODULE_10__Switch__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__generatePath__ = __webpack_require__(501);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "generatePath", function() { return __WEBPACK_IMPORTED_MODULE_11__generatePath__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__matchPath__ = __webpack_require__(502);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "matchPath", function() { return __WEBPACK_IMPORTED_MODULE_12__matchPath__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__withRouter__ = __webpack_require__(503);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return __WEBPACK_IMPORTED_MODULE_13__withRouter__["a"]; });
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/***/ }),
+/* 25 */,
+/* 26 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
+var module;
+// LICENSE_CODE ZON ISC
+'use strict'; /*zlint node, br*/
+(function(){
+
+var is_node_ff = typeof module=='object' && module.exports;
+if (!is_node_ff)
+ ;
+else
+ ;
+!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(13), __webpack_require__(41), __webpack_require__(120), __webpack_require__(121),
+ __webpack_require__(1077), __webpack_require__(167)], __WEBPACK_AMD_DEFINE_RESULT__ = function($, etask, date, zescape, zerr, events){
+var E = ajax;
+var assign = Object.assign;
+E.events = new events.EventEmitter();
+E.json = function(opt){ return ajax(assign({}, opt, {json: 1})); };
+E.abort = function(aj){ aj.goto('abort'); };
+// XXX arik: need test
+function ajax(opt){
+ var timeout = opt.timeout||20*date.ms.SEC, slow = opt.slow||2*date.ms.SEC;
+ var retry = opt.retry, data = opt.data, qs = zescape.qs(opt.qs);
+ var url = zescape.uri(opt.url, qs), perr = opt.perr;
+ // opt.type is deprecated
+ var method = opt.method||opt.type||'GET';
+ var data_type = opt.json ? 'json' : 'text';
+ var t0 = Date.now();
+ var xhr;
+ zerr.debug('ajax('+data_type+') url '+url+' retry '+retry);
+ return etask([function(){
+ var ajopt = {dataType: data_type, type: method, url: url,
+ data: data, timeout: timeout, xhrFields: {}};
+ if (opt.headers)
+ ajopt.headers = opt.headers;
+ if (opt.content_type)
+ ajopt.contentType = opt.content_type;
+ if (opt.with_credentials)
+ ajopt.xhrFields.withCredentials = true;
+ if (opt.onprogress)
+ ajopt.xhrFields.onprogress = opt.onprogress;
+ if (opt.onuploadprogress)
+ {
+ ajopt.xhr = function(){
+ var _xhr = $.ajaxSettings.xhr();
+ _xhr.upload.onprogress = opt.onuploadprogress;
+ return _xhr;
+ };
+ }
+ if (opt.multipart)
+ {
+ ajopt.contentType = false;
+ ajopt.processData = false;
+ delete ajopt.dataType;
+ }
+ if (opt.async!==undefined)
+ ajopt.async = opt.async;
+ xhr = $.ajax(ajopt);
+ var _this = this;
+ xhr.done(function(v){
+ _this.continue(v); });
+ xhr.fail(function(_xhr, status_text, err){
+ if (data_type=='json' && _xhr && _xhr.status==200 &&
+ ['', 'ok', 'OK'].includes(_xhr.responseText))
+ {
+ _this.continue(null);
+ return;
+ }
+ if (!err && data_type=='text' && _xhr && _xhr.responseText)
+ err = _xhr.responseText;
+ _this.throw(err instanceof Error ? err : new Error(''+err));
+ });
+ return this.wait();
+ }, function catch$(err){
+ xhr = xhr||{};
+ zerr('ajax('+data_type+') failed url '+url+' data '+
+ zerr.json(data).substr(0, 200)+' status: '+xhr.status+' '+
+ xhr.statusText+'\nresponseText: '+
+ (xhr.responseText||'').substr(0, 200));
+ if (retry && (!opt.should_retry||opt.should_retry(err, xhr)))
+ return this.return(ajax(assign({}, opt, {retry: retry-1})));
+ if (xhr.statusText=='timeout')
+ E.events.emit('timeout', this);
+ if (opt.no_throw)
+ {
+ return {
+ err: err,
+ url: url,
+ method: method,
+ status: +xhr.status || 0,
+ data: get_res_data(xhr),
+ xhr: xhr,
+ // legacy
+ error: xhr.statusText||'no_status', message: xhr.responseText,
+ };
+ }
+ err.hola_info = {url: url, method: method, status: xhr.status,
+ data: get_res_data(xhr), response_text: xhr.responseText};
+ err.x_error = xhr.getResponseHeader('X-Luminati-Error') ||
+ xhr.getResponseHeader('X-Hola-Error');
+ throw err;
+ }, function(data){
+ var t = Date.now()-t0;
+ zerr[t>slow ? 'err' : 'debug'](
+ 'ajax('+data_type+') '+(t>slow ? 'SLOW ' : 'ok ')+t+'ms url '+url);
+ if (t>slow && perr)
+ perr({id: 'be_ajax_slow', info: t+'ms '+url});
+ if (E.do_op)
+ E.do_op(data&&data.do_op);
+ return this.return(data);
+ }, function abort(){
+ // reachable only via E.abort
+ xhr.abort();
+ }]);
+}
+
+['GET', 'POST', 'PUT', 'DELETE'].forEach(function(m){
+ E[m.toLowerCase()] = function(url, opt){
+ url = typeof url=='string' ? {url: url} : url;
+ opt = assign({method: m, json: 1}, url, opt);
+ if (!{get: 1, delete: 1}[opt.method.toLowerCase()]
+ && opt.data!=null && typeof opt.data!='string')
+ {
+ opt.content_type = opt.content_type||'application/json';
+ if (opt.content_type.startsWith('application/json'))
+ opt.data = JSON.stringify(opt.data);
+ }
+ return ajax(opt);
+ };
+});
+
+function get_res_data(xhr){
+ if (xhr.responseJSON!=null && xhr.responseJSON!=='')
+ return xhr.responseJSON;
+ var content_type = xhr.getResponseHeader('content-type')||'';
+ if (xhr.responseText && content_type.includes('application/json'))
+ {
+ try { return JSON.parse(xhr.responseText); }
+ catch(e){ }
+ }
+ return xhr.responseText||'';
+}
+
+return E; }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }());
+
+
+/***/ }),
+/* 27 */,
+/* 28 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(456), __esModule: true };
+
+/***/ }),
+/* 29 */,
+/* 30 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// LICENSE_CODE ZON ISC
+ /*jslint browser:true, es6:true*/
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.swagger_link_tester_url = exports.swagger_url = exports.presets = exports.get_static_country = exports.status_codes = exports.user_agents = exports.ga_event = exports.bytes_format = undefined;
+
+var _toConsumableArray2 = __webpack_require__(46);
+
+var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
+
+var _user_agent_gen = __webpack_require__(1225);
+
+var _user_agent_gen2 = _interopRequireDefault(_user_agent_gen);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var bytes_format = exports.bytes_format = function bytes_format(bytes, number) {
+ if (!bytes || isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '';
+ number = number != undefined ? number : Math.floor(Math.log(bytes) / Math.log(1000));
+ var precision = number ? 2 : 0;
+ var n = (bytes / Math.pow(1000, Math.floor(number))).toFixed(precision);
+ if (+n === 0) n = 0;
+ return n + ' ' + ['B', 'KB', 'MB', 'GB', 'TB', 'PB'][number];
+};var ga_event = exports.ga_event = function ga_event(category, action, label) {
+ if (!window.ga) return;
+ window.ga('send', 'event', category, action, label);
+};
+
+var formatted_user_agents = _user_agent_gen2.default.map(function (u) {
+ return {
+ key: u.name,
+ value: u.value
+ };
+});
+
+var user_agents = exports.user_agents = [{
+ key: 'None',
+ value: ''
+}].concat((0, _toConsumableArray3.default)(formatted_user_agents));
+
+var status_codes = exports.status_codes = {
+ 200: 'OK',
+ 201: 'Created',
+ 202: 'Accepted',
+ 203: 'Non-Authoritative Information',
+ 204: 'No Content',
+ 205: 'Reset Content',
+ 206: 'Partial Content',
+ 300: 'Multiple Choices',
+ 301: 'Moved Permanently',
+ 302: 'Found',
+ 303: 'See Other',
+ 304: 'Not Modified',
+ 305: 'Use Proxy',
+ 307: 'Temporary Redirect',
+ 400: 'Bad Request',
+ 401: 'Unauthorized',
+ 402: 'Payment Required',
+ 403: 'Forbidden',
+ 404: 'Not Found',
+ 405: 'Method Not Allowed',
+ 406: 'Not Acceptable',
+ 407: 'Proxy Authentication Required',
+ 408: 'Request Timeout',
+ 409: 'Conflict',
+ 410: 'Gone',
+ 411: 'Length Required',
+ 412: 'Precondition Failed',
+ 413: 'Request Entity Too Large',
+ 414: 'Request-URI Too Long',
+ 415: 'Unsupported Media Type',
+ 416: 'Requested Range Not Satisfiable',
+ 417: 'Expectation Failed',
+ 500: 'Internal Server Error',
+ 501: 'Not Implemented',
+ 502: 'Bad Gateway',
+ 503: 'Service Unavailable',
+ 504: 'Gateway Timeout',
+ 505: 'HTTP Version Not Supported'
+};
+
+var get_static_country = exports.get_static_country = function get_static_country(proxy, zones) {
+ if (!proxy || !proxy.zone || !zones || !zones.zones) return false;
+ var zone = zones.zones.find(function (z) {
+ return z.name == proxy.zone;
+ });
+ if (!zone) return false;
+ if (!zone.plan) return false;
+ if (zone.plan.type == 'static') return zone.plan.country || 'any';
+ if (['domain', 'domain_p'].includes(zone.plan.vips_type)) return zone.plan.vip_country || 'any';
+ return false;
+};
+
+var presets = {
+ session_long: {
+ default: true,
+ title: 'Long single session (IP)',
+ subtitle: 'All requests share the same long session (IP). For\n connecting a browser to Luminati, maintaining the same IP for as\n long as possible',
+ set: function set(opt) {
+ opt.pool_size = 1;
+ opt.session = true;
+ opt.proxy_resolve = true;
+ },
+ clean: function clean(opt) {
+ opt.pool_size = 0;
+ opt.proxy_resolve = false;
+ },
+ rules: [{ field: 'pool_size', label: 'Sets \'Pool size\' to 1' }, { field: 'proxy_resolve', label: 'Turns on \'Fixed super proxies\'' }],
+ disabled: {
+ sticky_ip: true,
+ session_random: true,
+ session: true,
+ pool_type: true,
+ seed: true,
+ pool_size: true,
+ proxy_resolve: true,
+ max_requests: true,
+ session_duration: true,
+ idle_pool: true,
+ pool_prefill: true
+ }
+ },
+ sticky_ip: {
+ title: 'Session (IP) per machine',
+ subtitle: 'Each requesting machine will have its own session (IP).\n For connecting several computers to a single Luminati Proxy\n Manager, each of them having its own single session (IP)',
+ set: function set(opt) {
+ opt.pool_size = 0;
+ opt.sticky_ip = true;
+ },
+ clean: function clean(opt) {
+ opt.max_requests = 0;
+ opt.session_duration = 0;
+ },
+ rules: [{ field: 'pool_size', label: 'Sets \'Pool size\' to 0' }, { field: 'sticky_ip', label: 'Enables \'Sticky Ip\'' }, { field: 'multiply', label: 'Disables \'Multiply\' options' }],
+ disabled: {
+ multiply: true,
+ multiply_ips: true,
+ multiply_vips: true,
+ sticky_ip: true,
+ session_random: true,
+ session: true,
+ pool_type: true,
+ seed: true,
+ pool_size: true,
+ idle_pool: true,
+ pool_prefill: true
+ }
+ },
+ rotating: {
+ title: 'Rotating (IPs)',
+ subtitle: 'For changing the IP on each request',
+ set: function set(opt) {
+ opt.pool_type = '';
+ opt.session = true;
+ opt.max_requests = opt.max_requests || 1;
+ },
+ clean: function clean(opt) {
+ opt.max_requests = 0;
+ opt.session_duration = 0;
+ opt.pool_size = 0;
+ },
+ rules: [{ field: 'multiply', label: 'Disables \'Multiply\' options' }, { field: 'max_requests', label: 'Sets \'Max requests\' to 1. It makes\n sense to choose any other positive number' }],
+ disabled: {
+ sticky_ip: true,
+ session_random: true,
+ session: true,
+ multiply: true,
+ multiply_ips: true,
+ multiply_vips: true,
+ pool_type: true,
+ seed: true,
+ idle_pool: true
+ }
+ },
+ high_performance: {
+ title: 'High performance',
+ subtitle: 'Maximum request speed',
+ set: function set(opt) {
+ opt.pool_size = 50;
+ opt.pool_type = '';
+ opt.proxy_count = 20;
+ opt.max_requests = 1;
+ opt.race_reqs = 2;
+ opt.session = true;
+ },
+ clean: function clean(opt) {
+ opt.pool_size = 0;
+ opt.proxy_count = '';
+ opt.race_reqs = '';
+ },
+ disabled: {
+ sticky_ip: true,
+ session_random: true,
+ session: true,
+ pool_type: true,
+ seed: true,
+ pool_size: true,
+ idle_pool: true
+ },
+ rules: [{ field: 'pool_size', label: 'Sets \'Pool size\' to 50' }, { field: 'race_reqs', label: 'Uses race requests' }, { field: 'proxy_count', label: 'Uses 20 different super proxies' }, { field: 'max_requests', label: 'Sets \'Max requests\' to 1. It makes\n sense to choose any other positive number' }]
+ },
+ rnd_usr_agent_and_cookie_header: {
+ title: 'Random User-Agent',
+ subtitle: 'Rotate User-Agent on each request',
+ set: function set(opt) {
+ opt.session = true;
+ opt.pool_type = '';
+ opt.session_duration = 0;
+ opt.random_user_agent = true;
+ opt.override_headers = true;
+ },
+ clean: function clean(opt) {
+ opt.pool_size = 0;
+ opt.random_user_agent = '';
+ opt.override_headers = false;
+ },
+ disabled: {
+ random_user_agent: true,
+ sticky_ip: true,
+ session_random: true,
+ session: true,
+ pool_type: true,
+ seed: true,
+ pool_size: true,
+ override_headers: true,
+ idle_pool: true,
+ pool_prefill: true
+ }
+ },
+ shop: {
+ title: 'Online shopping',
+ subtitle: 'Scrape data from shopping websites. This preset is\n configured for product pages but can be freely modified for any\n other use-cases',
+ set: function set(opt) {
+ opt.session = true;
+ opt.dns = 'remote';
+ opt.random_user_agent = true;
+ opt.override_headers = true;
+ opt.ssl = true;
+ opt.rules = opt.rules || [];
+ if (opt.rules.find(function (r) {
+ return r.action && r.action.process;
+ })) return;
+ opt.rules.push({
+ action: {
+ process: {
+ title: '$(\'#productTitle\').text()',
+ price: '$(\'#priceblock_ourprice\').text().trim()',
+ bullets: '$(\'#featurebullets_feature_div li span\')' + '.map(function(){ return $(this).text() })' + '.get()'
+ }
+ },
+ action_type: 'process',
+ trigger_type: 'url',
+ url: 'luminati.io|dp\\/[A-Z0-9]{10}'
+ });
+ },
+ clean: function clean(opt) {
+ opt.dns = '';
+ opt.random_user_agent = false;
+ if (!opt.rules) return;
+ opt.rules = opt.rules.filter(function (r) {
+ return !r.action || !r.action.process;
+ });
+ },
+ disabled: {
+ random_user_agent: true,
+ sticky_ip: true,
+ session_random: true,
+ session: true,
+ seed: true,
+ ssl: true,
+ idle_pool: true,
+ pool_prefill: true
+ },
+ rules: [{ field: 'dns', label: 'Sets DNS to resolve remotely' }, { field: 'random_user_agent',
+ label: 'Generates random User-Agent for each request' }, { field: 'trigger_type', label: 'Creates an explanatory rule for ' + 'post-processing each request to scrape data you need' }, { field: 'ssl', label: 'Enables SSL analyzing' }]
+ },
+ custom: {
+ title: 'Custom',
+ subtitle: 'Manually adjust all settings to your needs for advanced\n use cases',
+ set: function set(opt) {},
+ clean: function clean(opt) {
+ opt.session = null;
+ opt.pool_size = 0;
+ opt.pool_type = null;
+ opt.max_requests = 0;
+ opt.session_duration = 0;
+ opt.seed = '';
+ opt.idle_pool = true;
+ opt.pool_prefill = true;
+ }
+ }
+};
+for (var k in presets) {
+ presets[k].key = k;
+ presets[k].subtitle = presets[k].subtitle.replace(/\s+/g, ' ').replace(/\n/g, ' ');
+}
+exports.presets = presets;
+var swagger_url = exports.swagger_url = 'http://petstore.swagger.io/?url=https://' + 'raw.githubusercontent.com/luminati-io/luminati-proxy/master/lib/' + 'swagger.json#/Proxy';
+
+var swagger_link_tester_url = exports.swagger_link_tester_url = swagger_url + '/get_proxies__port__link_test_json';
+
+/***/ }),
+/* 31 */,
+/* 32 */,
+/* 33 */,
+/* 34 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Grid__ = __webpack_require__(401);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_0__Grid__["a"]; });
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__Grid__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__accessibilityOverscanIndicesGetter__ = __webpack_require__(1462);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__accessibilityOverscanIndicesGetter__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultCellRangeRenderer__ = __webpack_require__(403);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_2__defaultCellRangeRenderer__["a"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultOverscanIndicesGetter__ = __webpack_require__(402);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_3__defaultOverscanIndicesGetter__["c"]; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__types__ = __webpack_require__(14);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_4__types__["e"]; });
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_4__types__["a"]; });
+/* unused harmony reexport bpfrpt_proptype_CellPosition */
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_4__types__["d"]; });
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_4__types__["f"]; });
+/* unused harmony reexport bpfrpt_proptype_RenderedSection */
+/* unused harmony reexport bpfrpt_proptype_CellRendererParams */
+/* unused harmony reexport bpfrpt_proptype_Scroll */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/***/ }),
+/* 35 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _defineProperty = __webpack_require__(239);
+
+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;
+};
+
+/***/ }),
+/* 36 */,
+/* 37 */,
+/* 38 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
+/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flush", function() { return flush; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hydrate", function() { return hydrate; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cx", function() { return cx; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRegisteredStyles", function() { return getRegisteredStyles; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "injectGlobal", function() { return injectGlobal; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyframes", function() { return keyframes; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "css", function() { return css; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sheet", function() { return sheet; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "caches", function() { return caches; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_emotion__ = __webpack_require__(1234);
+
+
+var context = typeof global !== 'undefined' ? global : {};
+
+var _createEmotion = Object(__WEBPACK_IMPORTED_MODULE_0_create_emotion__["a" /* default */])(context),
+ flush = _createEmotion.flush,
+ hydrate = _createEmotion.hydrate,
+ cx = _createEmotion.cx,
+ merge = _createEmotion.merge,
+ getRegisteredStyles = _createEmotion.getRegisteredStyles,
+ injectGlobal = _createEmotion.injectGlobal,
+ keyframes = _createEmotion.keyframes,
+ css = _createEmotion.css,
+ sheet = _createEmotion.sheet,
+ caches = _createEmotion.caches;
+
+
+
+/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(43)))
+
+/***/ }),
+/* 39 */
+/***/ (function(module, exports) {
+
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+var isArray = Array.isArray;
+
+module.exports = isArray;
+
+
+/***/ }),
+/* 40 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// LICENSE_CODE ZON ISC
+ /*jslint react:true*/
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.Modal = exports.Modal_dialog = undefined;
+
+var _regenerator = __webpack_require__(18);
+
+var _regenerator2 = _interopRequireDefault(_regenerator);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(10);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(2);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(3);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _jquery = __webpack_require__(13);
+
+var _jquery2 = _interopRequireDefault(_jquery);
+
+var _classnames = __webpack_require__(6);
+
+var _classnames2 = _interopRequireDefault(_classnames);
+
+var _etask = __webpack_require__(41);
+
+var _etask2 = _interopRequireDefault(_etask);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var Modal_dialog = exports.Modal_dialog = function (_React$Component) {
+ (0, _inherits3.default)(Modal_dialog, _React$Component);
+
+ function Modal_dialog() {
+ var _ref;
+
+ var _temp, _this2, _ret;
+
+ (0, _classCallCheck3.default)(this, Modal_dialog);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this2 = (0, _possibleConstructorReturn3.default)(this, (_ref = Modal_dialog.__proto__ || Object.getPrototypeOf(Modal_dialog)).call.apply(_ref, [this].concat(args))), _this2), _this2.set_ref = function (e) {
+ _this2.ref = e;
+ }, _this2.stop = function (e) {
+ e.stopPropagation();
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this2, _ret);
+ }
+
+ (0, _createClass3.default)(Modal_dialog, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var _this3 = this;
+
+ (0, _jquery2.default)(this.ref).on('hide.bs.modal', function () {
+ _this3.props.cancel_clicked && _this3.props.cancel_clicked();
+ });
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(new_props) {
+ if (this.props.open == new_props.open) return;
+ if (new_props.open) (0, _jquery2.default)(this.ref).modal();else (0, _jquery2.default)(this.ref).modal('hide');
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ return _react2.default.createElement(
+ 'div',
+ { tabIndex: '-1', ref: this.set_ref, onClick: this.stop,
+ className: (0, _classnames2.default)('modal', 'fade', this.props.className) },
+ _react2.default.createElement(
+ 'div',
+ { className: 'modal-dialog' },
+ _react2.default.createElement(
+ 'div',
+ { className: 'modal-content' },
+ _react2.default.createElement(
+ 'div',
+ { className: 'modal-header' },
+ _react2.default.createElement('button', { className: 'close close_icon', 'data-dismiss': 'modal',
+ 'aria-label': 'Close' }),
+ _react2.default.createElement(
+ 'h4',
+ { className: 'modal-title' },
+ this.props.title
+ )
+ ),
+ this.props.children && _react2.default.createElement(
+ 'div',
+ { className: 'modal-body' },
+ this.props.children
+ ),
+ _react2.default.createElement(
+ 'div',
+ { className: 'modal-footer' },
+ _react2.default.createElement(Footer_default, { ok_clicked: this.props.ok_clicked,
+ ok_disabled: this.props.ok_disabled,
+ cancel_clicked: this.props.cancel_clicked,
+ no_cancel_btn: this.props.no_cancel_btn })
+ )
+ )
+ )
+ );
+ }
+ }]);
+ return Modal_dialog;
+}(_react2.default.Component);
+
+var Modal = exports.Modal = function (_React$Component2) {
+ (0, _inherits3.default)(Modal, _React$Component2);
+
+ function Modal() {
+ var _ref2;
+
+ var _temp2, _this4, _ret2;
+
+ (0, _classCallCheck3.default)(this, Modal);
+
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
+
+ return _ret2 = (_temp2 = (_this4 = (0, _possibleConstructorReturn3.default)(this, (_ref2 = Modal.__proto__ || Object.getPrototypeOf(Modal)).call.apply(_ref2, [this].concat(args))), _this4), _this4.on_dismiss = function () {
+ if (_this4.props.on_dismiss) _this4.props.on_dismiss();
+ }, _this4.set_ref = function (e) {
+ _this4.ref = e;
+ }, _temp2), (0, _possibleConstructorReturn3.default)(_this4, _ret2);
+ }
+
+ (0, _createClass3.default)(Modal, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var _this5 = this;
+
+ (0, _jquery2.default)(this.ref).on('hidden.bs.modal', function () {
+ _this5.props.on_hidden && _this5.props.on_hidden();
+ });
+ }
+ }, {
+ key: 'click_cancel',
+ value: function click_cancel() {
+ if (this.props.cancel_clicked) this.props.cancel_clicked();
+ (0, _jquery2.default)('#' + this.props.id).modal('hide');
+ }
+ }, {
+ key: 'click_ok',
+ value: function click_ok() {
+ if (!this.props.no_ok_close) (0, _jquery2.default)('#' + this.props.id).modal('hide');
+ var _this = this;
+ (0, _etask2.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
+ return _regenerator2.default.wrap(function _callee$(_context) {
+ while (1) {
+ switch (_context.prev = _context.next) {
+ case 0:
+ if (!_this.props.click_ok) {
+ _context.next = 3;
+ break;
+ }
+
+ _context.next = 3;
+ return _this.props.click_ok();
+
+ case 3:
+ case 'end':
+ return _context.stop();
+ }
+ }
+ }, _callee, this);
+ }));
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var footer = null;
+ if (!this.props.no_footer) {
+ footer = this.props.footer || _react2.default.createElement(Footer_default, { cancel_clicked: this.click_cancel.bind(this),
+ ok_href: this.props.ok_href,
+ ok_clicked: this.click_ok.bind(this),
+ ok_btn_title: this.props.ok_btn_title,
+ ok_btn_classes: this.props.ok_btn_classes,
+ no_cancel_btn: this.props.no_cancel_btn });
+ }
+ var header_classes = (0, _classnames2.default)('modal-header', { no_header: this.props.no_header });
+ return _react2.default.createElement(
+ 'div',
+ { id: this.props.id, tabIndex: '-1', ref: this.set_ref,
+ className: (0, _classnames2.default)('modal', 'fade', this.props.className) },
+ _react2.default.createElement(
+ 'div',
+ { className: 'modal-dialog' },
+ _react2.default.createElement(
+ 'div',
+ { className: 'modal-content' },
+ _react2.default.createElement(
+ 'div',
+ { className: header_classes },
+ !this.props.no_close && _react2.default.createElement('button', { className: 'close close_icon', 'data-dismiss': 'modal',
+ 'aria-label': 'Close', onClick: this.on_dismiss }),
+ !this.props.no_header && !this.props.custom_header && _react2.default.createElement(
+ 'h4',
+ { className: 'modal-title' },
+ this.props.title
+ ),
+ this.props.custom_header && this.props.custom_header
+ ),
+ this.props.children && _react2.default.createElement(
+ 'div',
+ { className: 'modal-body' },
+ this.props.children
+ ),
+ _react2.default.createElement(
+ 'div',
+ { className: 'modal-footer' },
+ footer
+ )
+ )
+ )
+ );
+ }
+ }]);
+ return Modal;
+}(_react2.default.Component);
+
+var Footer_default = function Footer_default(props) {
+ var ok_title = props.ok_btn_title || 'OK';
+ var ok_classes = props.ok_btn_classes || 'btn btn_lpm btn_lpm_primary ok';
+ return _react2.default.createElement(
+ 'div',
+ { className: 'default_footer' },
+ !props.no_cancel_btn && _react2.default.createElement(
+ 'button',
+ { onClick: props.cancel_clicked,
+ className: 'btn btn_lpm cancel' },
+ 'Cancel'
+ ),
+ props.ok_href && _react2.default.createElement(
+ 'a',
+ { href: props.ok_href, onClick: props.ok_clicked,
+ className: ok_classes },
+ ok_title
+ ),
+ !props.ok_href && _react2.default.createElement(
+ 'button',
+ { onClick: props.ok_clicked, className: ok_classes,
+ disabled: props.ok_disabled },
+ ok_title
+ )
+ );
+};
+
+/***/ }),
+/* 41 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
+var module;
+// LICENSE_CODE ZON ISC
+'use strict'; /*jslint node:true, browser:true*/
+(function(){
+var process, zerr, assert;
+var is_node = typeof module=='object' && module.exports && module.children;
+var is_rn = typeof global=='object' && !!global.nativeRequire ||
+ typeof navigator=='object' && navigator.product=='ReactNative';
+var is_ff_addon = typeof module=='object' && module.uri
+ && !module.uri.indexOf('resource://');
+if (!is_node)
+{
+ if (is_ff_addon)
+ ;
+ else if (is_rn)
+ {
+ }
+ else
+ ;
+ process = {
+ nextTick: function(fn){ setTimeout(fn, 0); },
+ env: {},
+ };
+ // XXX romank: use zerr.js
+ // XXX bahaa: require bext/pub/zerr.js for extensions
+ if (!is_ff_addon && !is_rn && self.hola && self.hola.zerr)
+ zerr = self.hola.zerr;
+ else
+ {
+ zerr = function(){ console.log.apply(console, arguments); };
+ zerr.perr = zerr;
+ zerr.debug = function(){};
+ zerr.is = function(){ return false; };
+ zerr.L = {DEBUG: 0};
+ }
+ if (!zerr.is)
+ zerr.is = function(){ return false; };
+}
+else
+{
+ require('./config.js');
+ process = global.process||require('_process');
+ zerr = require('./zerr.js');
+ assert = require('assert');
+ ;
+}
+// XXX odin: normally this would only be run for !is_node, but 'who' unittests
+// loads a stubbed assert
+if (typeof assert!='function')
+ assert = function(){}; // XXX romank: add proper assert
+// XXX yuval: /util/events.js -> events when node 6 (support prependListener)
+// is here
+!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(464), __webpack_require__(165), __webpack_require__(166)], __WEBPACK_AMD_DEFINE_RESULT__ = function(events, array, zutil){
+var E = Etask;
+var etask = Etask;
+var env = process.env, assign = Object.assign;
+E.use_bt = +env.ETASK_BT;
+E.root = [];
+E.assert_extra = +env.ETASK_ASSERT_EXTRA; // to debug internal etask bugs
+E.nextTick = process.nextTick;
+// XXX arik/romank: hack, rm set_zerr, get zerzerrusing require
+E.set_zerr = function(_zerr){ zerr = _zerr; };
+E.events = new events();
+var cb_pre, cb_post, cb_ctx, longcb_ms, perf_enable;
+E.perf_stat = {};
+// XXX romang: hack to import in react native
+if (is_rn)
+ E.etask = E;
+function _cb_pre(et){ return {start: Date.now()}; }
+function _cb_post(et, ctx){
+ ctx = ctx||cb_ctx;
+ var ms = Date.now()-ctx.start;
+ if (longcb_ms && ms>longcb_ms)
+ {
+ zerr('long cb '+ms+'ms: '+et.get_name()+', '
+ +et.run_state.f.toString().slice(0, 128));
+ }
+ if (perf_enable)
+ {
+ var name = et.get_name();
+ var perf = E.perf_stat[name] ||
+ (E.perf_stat[name] = {ms: 0, n: 0, max: 0});
+ if (perf.max2)
+ return type;
+ if (n[1].length)
+ type.label = n[1];
+ var f = n[0].split('_');
+ for (var j=0; j=child.length ? -1 : i;
+};
+E.prototype._set_wait_child = function(wait_retval){
+ var i, _this = this, child = wait_retval.child;
+ var cond = wait_retval.cond, wait_on;
+ assert(!cond || child=='any', 'condition supported only for "any" '+
+ 'option, you can add support if needed');
+ if (child=='any')
+ {
+ if (this._get_child_running()<0)
+ return true;
+ wait_on = function(){
+ _this.once('child', function(child){
+ if (!cond || cond.call(child, child.retval))
+ return _this._got_retval(wait_retval, {child: child});
+ if (_this._get_child_running()<0)
+ return _this._got_retval(wait_retval);
+ wait_on();
+ });
+ };
+ wait_on();
+ }
+ else if (child=='all')
+ {
+ if ((i = this._get_child_running())<0)
+ return true;
+ wait_on = function(child){
+ _this.once('child', function(child){
+ var i;
+ if ((i = _this._get_child_running())<0)
+ return _this._got_retval(wait_retval);
+ wait_on(_this.child[i]);
+ });
+ };
+ wait_on(this.child[i]);
+ }
+ else
+ {
+ assert(child, 'no child provided');
+ assert(this===child.parent, 'child does not belong to parent');
+ if (child.tm_completed)
+ return true;
+ child.once('finally', function(){
+ return _this._got_retval(wait_retval, {child: child}); });
+ }
+ this.emit_safe('wait_on_child');
+};
+
+E.prototype._got_retval = function(wait_retval, res){
+ if (this.wait_retval!==wait_retval || wait_retval.completed)
+ return;
+ wait_retval.completed = true;
+ // inline _next_run to reduce stack depth
+ if (!this._next(E._res2rv(res)))
+ this._run();
+};
+E.prototype.continue_fn = function(){
+ return this.continue.bind(this); };
+E.continue_depth = 0;
+E.prototype.continue = function(promise, sync){
+ this.wait_retval = undefined;
+ this._set_retval(promise);
+ if (this.tm_completed)
+ return promise;
+ if (this.down)
+ this.down._ecancel();
+ this._del_wait_timer();
+ var rv = {ret: promise, err: undefined};
+ if (this.running)
+ {
+ this.at_continue = rv;
+ return promise;
+ }
+ if (this._handle_rv(rv))
+ return rv.ret;
+ var _this = this;
+ if (E.is_final(promise) &&
+ (!E.continue_depth && !E.in_run.length || sync))
+ {
+ E.continue_depth++;
+ this._next_run(rv);
+ E.continue_depth--;
+ }
+ else // avoid high stack depth
+ E.nextTick(function(){ _this._next_run(rv); });
+ return promise;
+};
+
+E.prototype._ecancel = function(){
+ if (this.tm_completed)
+ return this;
+ this.emit_safe('cancel');
+ if (this.cancel!==undefined)
+ return this._call_safe(this.states[this.cancel].f);
+ if (this.cancelable)
+ return this.return();
+};
+
+E.prototype._ecancel_child = function(){
+ if (!this.child.length)
+ return;
+ // copy array, since ecancel has side affects and can modify array
+ var child = Array.from(this.child);
+ for (var i=0; i (/home/yoni/zon1/pkg/util/test.js:1740:7)
+ * with name: Etask.etask1_1 (/home/yoni/zon1/pkg/util/test.js:1741:11) */
+ var stack = this._stack instanceof Error ? this._stack.stack.split('\n') :
+ undefined;
+ var caller;
+ flags = flags||{};
+ if (stack)
+ {
+ caller = /^ at (.*)$/.exec(stack[4]);
+ caller = caller ? caller[1] : undefined;
+ }
+ var names = [];
+ if (this.name)
+ names.push(this.name);
+ if (caller && !(this.name && flags.SHORT_NAME))
+ names.push(caller);
+ if (!names.length)
+ names.push('noname');
+ return names.join(' ');
+};
+
+E.prototype.state_str = function(){
+ return this.cur_state+(this.next_state ? '->'+this.next_state : ''); };
+
+E.prototype.get_depth = function(){
+ var i=0, et = this;
+ for (; et; et = et.up, i++);
+ return i;
+};
+
+function trim_space(s){
+ if (s[s.length-1]!=' ')
+ return s;
+ return s.slice(0, -1);
+}
+function ms_to_str(ms){ // from date.js
+ var s = ''+ms;
+ return s.length<=3 ? s+'ms' : s.slice(0, -3)+'.'+s.slice(-3)+'s';
+}
+E.prototype.get_time_passed = function(){
+ return ms_to_str(Date.now()-this.tm_create); };
+E.prototype.get_time_completed = function(){
+ return ms_to_str(Date.now()-this.tm_completed); };
+E.prototype.get_info = function(){
+ var info = this.info, s = '', _i;
+ if (!info)
+ return '';
+ for (var i in info)
+ {
+ _i = info[i];
+ if (!_i)
+ continue;
+ if (s!=='')
+ s += ' ';
+ if (typeof _i=='function')
+ s += _i();
+ else
+ s += _i;
+ }
+ return trim_space(s);
+};
+
+// light-weight efficient etask/promise error value
+function Etask_err(err){ this.error = err || new Error(); }
+E.Etask_err = Etask_err;
+E.err = function(err){ return new Etask_err(err); };
+E.is_err = function(v){
+ return v instanceof Etask && v.error!==undefined ||
+ v instanceof Etask_err;
+};
+E.err_res = function(err, res){ return err ? E.err(err) : res; };
+E._res2rv = function(res){
+ return E.is_err(res) ? {ret: undefined, err: res.error}
+ : {ret: res, err: undefined};
+};
+E.is_final = function(v){
+ return !v || typeof v.then!='function' || v instanceof Etask_err ||
+ v instanceof Etask && !!v.tm_completed;
+};
+
+// promise compliant .then() implementation for Etask and Etask_err.
+// for unit-test comfort, also .otherwise(), .catch(), .ensure(), resolve() and
+// reject() are implemented.
+E.prototype.then = function(on_res, on_err){
+ var _this = this;
+ function on_done(){
+ if (!_this.error)
+ return !on_res ? _this.retval : on_res(_this.retval);
+ return !on_err ? E.err(_this.error) : on_err(_this.error);
+ }
+ if (this.tm_completed)
+ return etask('then_completed', [function(){ return on_done(); }]);
+ var then_wait = etask('then_wait', [function(){ return this.wait(); }]);
+ this.then_waiting.push(function(){
+ try { then_wait.continue(on_done()); }
+ catch(e){ then_wait.throw(e); }
+ });
+ return then_wait;
+};
+E.prototype.otherwise = E.prototype.catch = function(on_err){
+ return this.then(null, on_err); };
+E.prototype.ensure = function(on_ensure){
+ return this.then(function(res){ on_ensure(); return res; },
+ function(err){ on_ensure(); throw err; });
+};
+Etask_err.prototype.then = function(on_res, on_err){
+ var _this = this;
+ return etask('then_err', [function(){
+ return !on_err ? E.err(_this.error) : on_err(_this.error);
+ }]);
+};
+Etask_err.prototype.otherwise = Etask_err.prototype.catch = function(on_err){
+ return this.then(null, on_err); };
+Etask_err.prototype.ensure = function(on_ensure){
+ this.then(null, function(){ on_ensure(); });
+ return this;
+};
+E.resolve = function(res){ return etask([function(){ return res; }]); };
+E.reject = function(err){ return etask([function(){ throw err; }]); };
+
+E.prototype.wait_ext = function(promise){
+ if (!promise || typeof promise.then!='function')
+ return promise;
+ var wait = this.wait();
+ promise.then(wait.continue_fn(), wait.throw_fn());
+ return wait;
+};
+
+E.prototype.longname = function(flags){
+ flags = flags||{TIME: 1};
+ var s = '', _s;
+ if (this.running)
+ s += 'RUNNING ';
+ s += this.get_name(flags)+(!this.tm_completed ? '.'+this.state_str() : '')
+ +' ';
+ if (this.tm_completed)
+ s += 'COMPLETED'+(flags.TIME ? ' '+this.get_time_completed() : '')+' ';
+ if (flags.TIME)
+ s += this.get_time_passed()+' ';
+ if (_s = this.get_info())
+ s += _s+' ';
+ return trim_space(s);
+};
+E.prototype.stack = function(flags){
+ var et = this, s = '';
+ flags = assign({STACK: 1, RECURSIVE: 1, GUESS: 1}, flags);
+ while (et)
+ {
+ var _s = et.longname(flags)+'\n';
+ if (et.up)
+ et = et.up;
+ else if (et.parent)
+ {
+ _s = (et.parent_type=='call' ? 'CALL' : 'SPAWN')+' '+_s;
+ et = et.parent;
+ }
+ else if (et.parent_guess && flags.GUESS)
+ {
+ _s = 'SPAWN? '+_s;
+ et = et.parent_guess;
+ }
+ else
+ et = undefined;
+ if (flags.TOPDOWN)
+ s = _s+s;
+ else
+ s += _s;
+ }
+ return s;
+};
+E.prototype._ps = function(pre_first, pre_next, flags){
+ var i, s = '', task_trail, et = this, child_guess;
+ if (++flags.limit_n>=flags.LIMIT)
+ return flags.limit_n==flags.LIMIT ? '\nLIMIT '+flags.LIMIT+'\n': '';
+ /* get top-most et */
+ for (; et.up; et = et.up);
+ /* print the sp frames */
+ for (var first = 1; et; et = et.down, first = 0)
+ {
+ s += first ? pre_first : pre_next;
+ first = 0;
+ if (flags.MARK && (i = flags.MARK.sp.indexOf(et))>=0)
+ s += (flags.MARK.name[i]||'***')+' ';
+ s += et.longname(flags)+'\n';
+ if (flags.RECURSIVE)
+ {
+ var stack_trail = et.down ? '.' : ' ';
+ var child = et.child;
+ if (flags.GUESS)
+ child = child.concat(et.child_guess);
+ for (i = 0; i ' : '\\_ ';
+ s += child[i]._ps(pre_next+task_trail+child_guess,
+ pre_next+task_trail+' ', flags);
+ }
+ }
+ }
+ return s;
+};
+function ps_flags(flags){
+ var m, _m;
+ if (m = flags.MARK)
+ {
+ if (!Array.isArray(m))
+ _m = {sp: [m], name: []};
+ else if (!Array.isArray(flags.MARK[0]))
+ _m = {sp: m, name: []};
+ else
+ {
+ _m = {sp: [], name: []};
+ for (var i=0; i=a.length)
+ return this.return(a);
+ this.info.at = 'at '+i+'/'+a.length;
+ var _a = a[i];
+ if (_a instanceof Etask)
+ _a.spawn_parent();
+ return _a;
+ }, function(res){
+ if (this.error)
+ {
+ if (!opt.allow_fail)
+ return this.throw(this.error);
+ res = E.err(this.error);
+ }
+ a[i] = res;
+ i++;
+ return this.goto('loop');
+ }]);
+ }
+ else if (a_or_o instanceof Object)
+ {
+ var keys = Object.keys(a_or_o), o = {};
+ i = 0;
+ return etask({name: 'all_o', cancel: true}, [function(){
+ for (j=0; j=keys.length)
+ return this.return(o);
+ var _i = keys[i], _a = a_or_o[_i];
+ this.info.at = 'at '+_i+' '+i+'/'+keys.length;
+ if (_a instanceof Etask)
+ _a.spawn_parent();
+ return _a;
+ }, function(res){
+ if (this.error)
+ {
+ if (!opt.allow_fail)
+ return this.throw(this.error);
+ res = E.err(this.error);
+ }
+ o[keys[i]] = res;
+ i++;
+ return this.goto('loop');
+ }]);
+ }
+ assert(0, 'invalid type');
+};
+
+E.all_limit = function(limit, arr_iter, cb){
+ var at = 0;
+ var iter = !Array.isArray(arr_iter) ? arr_iter : function(){
+ if (at=limit)
+ return this.wait_child('any');
+ }, function done(){
+ return this.wait_child('all');
+ }]);
+};
+
+// _apply(opt, func[, _this], args)
+// _apply(opt, object, method, args)
+E._apply = function(opt, func, _this, args){
+ var func_name;
+ if (typeof _this=='string') // class with '.method' string call
+ {
+ assert(_this[0]=='.', 'invalid method '+_this);
+ var method = _this.slice(1), _class = func;
+ func = _class[method];
+ _this = _class;
+ assert(_this instanceof Object, 'invalid method .'+method);
+ func_name = method;
+ }
+ else if (Array.isArray(_this) && !args)
+ {
+ args = _this;
+ _this = null;
+ }
+ opt.name = opt.name||func_name||func.name;
+ return etask(opt, [function(){
+ var et = this, ret_sync, returned = 0;
+ args = Array.from(args);
+ args.push(function cb(err, res){
+ if (typeof opt.ret_sync=='string' && !returned)
+ {
+ // hack to wait for result
+ var a = arguments;
+ returned++;
+ return void E.nextTick(function(){ cb.apply(null, a); });
+ }
+ var nfn = opt.nfn===undefined || opt.nfn ? 1 : 0;
+ if (opt.ret_o)
+ {
+ var o = {}, i;
+ if (Array.isArray(opt.ret_o))
+ {
+ for (i=0; i=6.x.x
+ if (!done && gen && gen.return)
+ try { gen.return(); } catch(e){}
+ }]);
+};
+E.ef = function(err){ // error filter
+ if (zerr.on_exception)
+ zerr.on_exception(err);
+ return err;
+};
+// similar to setInterval
+// opt==10000 (or opt.ms==10000) - call states every 10 seconds
+// opt.mode=='smart' - default mode, like setInterval. If states take
+// longer than 'ms' to execute, next execution is delayed.
+// opt.mode=='fixed' - always sleep 10 seconds between states
+// opt.mode=='spawn' - spawn every 10 seconds
+E.interval = function(opt, states){
+ if (typeof opt=='number')
+ opt = {ms: opt};
+ if (opt.mode=='fixed')
+ {
+ return E.for(null, function(){ return etask.sleep(opt.ms); },
+ states);
+ }
+ if (opt.mode=='smart' || !opt.mode)
+ {
+ var now;
+ return E.for(function(){ now = Date.now(); return true; },
+ function(){
+ var delay = zutil.clamp(0, now+opt.ms-Date.now(), Infinity);
+ return etask.sleep(delay);
+ }, states);
+ }
+ if (opt.mode=='spawn')
+ {
+ var stopped = false;
+ return etask([function loop(){
+ etask([function try_catch$(){
+ return etask(states);
+ }, function(res){
+ if (!this.error)
+ return;
+ if (this.error.ebreak!==ebreak_obj)
+ return this.throw(this.error);
+ stopped = true;
+ }]);
+ }, function(){
+ if (stopped)
+ return this.return();
+ return etask.sleep(opt.ms);
+ }, function(){
+ if (stopped) // stopped during sleep by prev long iteration
+ return this.return();
+ return this.goto('loop');
+ }]);
+ }
+ throw new Error('unexpected mode '+opt.mode);
+};
+E._class = function(cls){
+ var proto = cls.prototype, keys = Object.getOwnPropertyNames(proto);
+ for (var i=0; i true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
+}
+
+module.exports = isObject;
+
+
+/***/ }),
+/* 63 */
+/***/ (function(module, exports) {
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return value != null && typeof value == 'object';
+}
+
+module.exports = isObjectLike;
+
+
+/***/ }),
+/* 64 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = warn;
+exports._resetWarned = _resetWarned;
+
+var _warning = __webpack_require__(1344);
+
+var _warning2 = _interopRequireDefault(_warning);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var warned = {}; /**
+ * This code is copied from: https://github.com/ReactTraining/react-router/blob/master/modules/routerWarning.js
+ */
+
+function warn(falseToWarn, message) {
+ // Only issue deprecation warnings once.
+ if (!falseToWarn && message.indexOf('deprecated') !== -1) {
+ if (warned[message]) {
+ return;
+ }
+ warned[message] = true;
+ }
+
+ message = '[react-bootstrap-typeahead] ' + message;
+
+ for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
+ args[_key - 2] = arguments[_key];
+ }
+
+ _warning2.default.apply(undefined, [falseToWarn, message].concat(args));
+}
+
+function _resetWarned() {
+ warned = {};
+}
+
+/***/ }),
+/* 65 */,
+/* 66 */,
+/* 67 */,
+/* 68 */,
+/* 69 */,
+/* 70 */,
+/* 71 */,
+/* 72 */,
+/* 73 */,
+/* 74 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// LICENSE_CODE ZON ISC
+ /*jslint react:true*/
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.Select_zone = exports.Input = exports.Select = exports.Typeahead_wrapper = exports.Textarea = exports.Url_input = exports.Json = exports.Regex = exports.Yes_no = exports.Select_number = exports.Select_status = exports.Pin_btn = exports.Pins = undefined;
+
+var _regenerator = __webpack_require__(18);
+
+var _regenerator2 = _interopRequireDefault(_regenerator);
+
+var _defineProperty2 = __webpack_require__(35);
+
+var _defineProperty3 = _interopRequireDefault(_defineProperty2);
+
+var _extends4 = __webpack_require__(5);
+
+var _extends5 = _interopRequireDefault(_extends4);
+
+var _toConsumableArray2 = __webpack_require__(46);
+
+var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(10);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(2);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(3);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _pure_component = __webpack_require__(12);
+
+var _pure_component2 = _interopRequireDefault(_pure_component);
+
+var _Creatable = __webpack_require__(1226);
+
+var _Creatable2 = _interopRequireDefault(_Creatable);
+
+var _reactTooltip = __webpack_require__(122);
+
+var _reactTooltip2 = _interopRequireDefault(_reactTooltip);
+
+var _reactRouterDom = __webpack_require__(24);
+
+var _classnames = __webpack_require__(6);
+
+var _classnames2 = _interopRequireDefault(_classnames);
+
+var _netmask = __webpack_require__(1255);
+
+var _reactBootstrapTypeahead = __webpack_require__(350);
+
+var _codemirror = __webpack_require__(55);
+
+var _codemirror2 = _interopRequireDefault(_codemirror);
+
+__webpack_require__(94);
+
+__webpack_require__(105);
+
+var _setdb = __webpack_require__(22);
+
+var _setdb2 = _interopRequireDefault(_setdb);
+
+var _ajax = __webpack_require__(26);
+
+var _ajax2 = _interopRequireDefault(_ajax);
+
+var _url = __webpack_require__(144);
+
+var _url2 = _interopRequireDefault(_url);
+
+var _tooltip = __webpack_require__(23);
+
+var _tooltip2 = _interopRequireDefault(_tooltip);
+
+var _i18n = __webpack_require__(19);
+
+var _common = __webpack_require__(16);
+
+var _zone_desc = __webpack_require__(227);
+
+var _zone_desc2 = _interopRequireDefault(_zone_desc);
+
+var _modals = __webpack_require__(40);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var Pins = exports.Pins = function (_Pure_component) {
+ (0, _inherits3.default)(Pins, _Pure_component);
+
+ function Pins() {
+ var _ref;
+
+ var _temp, _this2, _ret;
+
+ (0, _classCallCheck3.default)(this, Pins);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this2 = (0, _possibleConstructorReturn3.default)(this, (_ref = Pins.__proto__ || Object.getPrototypeOf(Pins)).call.apply(_ref, [this].concat(args))), _this2), _this2.state = { pins: [], max_id: 0, modal_open: false,
+ pending: _this2.props.pending || [] }, _this2.add_pin = function () {
+ var pin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
+
+ _this2.setState(function (prev) {
+ return {
+ pins: [].concat((0, _toConsumableArray3.default)(prev.pins), [{ id: prev.max_id + 1, val: pin, edit: true }]),
+ max_id: prev.max_id + 1
+ };
+ });
+ if (pin && _this2.state.pending.includes(pin)) _this2.setState({ pending: _this2.props.pending.filter(function (p) {
+ return p != pin;
+ }) });
+ }, _this2.add_empty_pin = function () {
+ _this2.add_pin('');
+ }, _this2.remove = function (id) {
+ _this2.setState(function (prev) {
+ return {
+ pins: prev.pins.filter(function (p) {
+ return p.id != id;
+ })
+ };
+ }, _this2.fire_on_change);
+ }, _this2.set_edit = function (id, edit) {
+ _this2.setState(function (prev) {
+ return {
+ pins: prev.pins.map(function (p) {
+ if (p.id != id) return p;
+ return (0, _extends5.default)({}, p, { edit: edit });
+ })
+ };
+ });
+ }, _this2.update_pin = function (id, val) {
+ _this2.setState(function (prev) {
+ return {
+ pins: prev.pins.map(function (p) {
+ if (p.id != id) return p;
+ return (0, _extends5.default)({}, p, { val: val });
+ })
+ };
+ });
+ }, _this2.fire_on_change = function () {
+ var val = _this2.state.pins.map(function (p) {
+ return p.val;
+ }).join(',');
+ _this2.props.on_change_wrapper(val);
+ }, _this2.save_pin = function (id, val) {
+ if (_this2.state.pins.find(function (p) {
+ return p.id != id && p.val == val;
+ })) return _this2.remove(id);
+ _this2.setState(function (prev) {
+ return {
+ pins: prev.pins.map(function (p) {
+ if (p.id != id) return p;
+ return (0, _extends5.default)({}, p, { val: val, edit: false });
+ })
+ };
+ }, _this2.fire_on_change);
+ }, _this2.dismiss_modal = function () {
+ return _this2.setState({ modal_open: false });
+ }, _this2.open_modal = function () {
+ return _this2.setState({ modal_open: true });
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this2, _ret);
+ }
+
+ (0, _createClass3.default)(Pins, [{
+ key: 'render',
+ value: function render() {
+ var _this3 = this;
+
+ var pending = this.state.pending;
+ var pending_btn_title = 'Add recent IPs (' + pending.length + ')';
+ return _react2.default.createElement(
+ 'div',
+ { className: 'pins_field' },
+ _react2.default.createElement(
+ 'div',
+ { className: 'pins' },
+ this.state.pins.map(function (p) {
+ return _react2.default.createElement(
+ Pin,
+ { key: p.id, update_pin: _this3.update_pin, id: p.id,
+ set_edit: _this3.set_edit, edit: p.edit,
+ exact: _this3.props.exact, save_pin: _this3.save_pin,
+ remove: _this3.remove },
+ p.val
+ );
+ })
+ ),
+ _react2.default.createElement(Pin_btn, { title: 'Add IP', tooltip: 'Add new IP to the list',
+ on_click: this.add_empty_pin }),
+ !!pending.length && _react2.default.createElement(Pin_btn, { on_click: this.open_modal, title: pending_btn_title }),
+ _react2.default.createElement(
+ _modals.Modal_dialog,
+ { title: 'Add recent IPs',
+ open: this.state.modal_open,
+ ok_clicked: this.dismiss_modal, no_cancel_btn: true },
+ pending.map(function (ip) {
+ return _react2.default.createElement(Add_pending_btn, { key: ip, ip: ip,
+ add_pin: _this3.add_pin });
+ }),
+ !pending.length && _react2.default.createElement(
+ 'span',
+ null,
+ 'No more pending IPs to whitelist'
+ )
+ )
+ );
+ }
+ }], [{
+ key: 'getDerivedStateFromProps',
+ value: function getDerivedStateFromProps(props, state) {
+ if (props.val == state.raw_val || !props.val) return null;
+ var ips = props.val.split(',');
+ return {
+ raw_val: props.val,
+ pins: ips.map(function (p, id) {
+ return { id: id, val: p, edit: false };
+ }),
+ max_id: ips.length
+ };
+ }
+ }]);
+ return Pins;
+}(_pure_component2.default);
+
+var Add_pending_btn = function Add_pending_btn(_ref2) {
+ var ip = _ref2.ip,
+ add_pin = _ref2.add_pin;
+ return _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(
+ 'span',
+ { style: { marginRight: 10 } },
+ ip
+ ),
+ _react2.default.createElement(Pin_btn, { title: 'Add IP', on_click: function on_click() {
+ return add_pin(ip);
+ } })
+ );
+};
+
+var Pin = function (_Pure_component2) {
+ (0, _inherits3.default)(Pin, _Pure_component2);
+
+ function Pin() {
+ var _ref3;
+
+ var _temp2, _this4, _ret2;
+
+ (0, _classCallCheck3.default)(this, Pin);
+
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
+
+ return _ret2 = (_temp2 = (_this4 = (0, _possibleConstructorReturn3.default)(this, (_ref3 = Pin.__proto__ || Object.getPrototypeOf(Pin)).call.apply(_ref3, [this].concat(args))), _this4), _this4.input = _react2.default.createRef(), _this4.edit = function () {
+ _this4.props.set_edit(_this4.props.id, true);
+ }, _this4.key_up = function (e) {
+ if (e.keyCode == 13) _this4.validate_and_save();
+ }, _this4.validate_and_save = function () {
+ var val = (_this4.props.children || '').trim();
+ if (_this4.props.exact) return _this4.props.save_pin(_this4.props.id, val);
+ try {
+ var netmask = new _netmask.Netmask(val);
+ val = netmask.base;
+ if (netmask.bitmask != 32) val += '/' + netmask.bitmask;
+ } catch (e) {
+ val = '';
+ }
+ if (!val) return _this4.props.remove(_this4.props.id);
+ _this4.props.save_pin(_this4.props.id, val);
+ }, _this4.on_change = function (e) {
+ return _this4.props.update_pin(_this4.props.id, e.target.value);
+ }, _this4.remove = function () {
+ return _this4.props.remove(_this4.props.id);
+ }, _this4.on_blur = function () {
+ return _this4.validate_and_save();
+ }, _temp2), (0, _possibleConstructorReturn3.default)(_this4, _ret2);
+ }
+
+ (0, _createClass3.default)(Pin, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this.input.current.focus();
+ }
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate() {
+ if (this.props.edit) this.input.current.focus();
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var children = this.props.children;
+
+ var input_classes = (0, _classnames2.default)({ hidden: !this.props.edit });
+ return _react2.default.createElement(
+ 'div',
+ { className: (0, _classnames2.default)('pin', { active: this.props.edit }) },
+ _react2.default.createElement(
+ 'div',
+ { className: 'x', onClick: this.remove },
+ _react2.default.createElement('div', { className: 'glyphicon glyphicon-remove' })
+ ),
+ _react2.default.createElement(
+ 'div',
+ { className: 'content', onClick: this.edit },
+ !this.props.edit && children,
+ _react2.default.createElement('input', { ref: this.input, type: 'text', value: children,
+ onChange: this.on_change, onBlur: this.on_blur,
+ className: input_classes, onKeyUp: this.key_up })
+ ),
+ this.props.edit && _react2.default.createElement(
+ 'div',
+ { className: 'v' },
+ _react2.default.createElement('div', { className: 'glyphicon glyphicon-ok' })
+ )
+ );
+ }
+ }]);
+ return Pin;
+}(_pure_component2.default);
+
+var Pin_btn = exports.Pin_btn = function Pin_btn(_ref4) {
+ var on_click = _ref4.on_click,
+ title = _ref4.title,
+ tooltip = _ref4.tooltip,
+ icon = _ref4.icon;
+ return _react2.default.createElement(
+ _tooltip2.default,
+ { title: tooltip },
+ _react2.default.createElement(
+ 'button',
+ { className: 'btn btn_lpm btn_lpm_small add_pin',
+ onClick: on_click },
+ title,
+ _react2.default.createElement('i', { className: 'glyphicon glyphicon-plus' })
+ )
+ );
+};
+
+var Select_status = exports.Select_status = function (_Pure_component3) {
+ (0, _inherits3.default)(Select_status, _Pure_component3);
+
+ function Select_status() {
+ var _ref5;
+
+ var _temp3, _this5, _ret3;
+
+ (0, _classCallCheck3.default)(this, Select_status);
+
+ for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
+ args[_key3] = arguments[_key3];
+ }
+
+ return _ret3 = (_temp3 = (_this5 = (0, _possibleConstructorReturn3.default)(this, (_ref5 = Select_status.__proto__ || Object.getPrototypeOf(Select_status)).call.apply(_ref5, [this].concat(args))), _this5), _this5.status_types = ['200', '2..', '403', '404', '500', '503', '(4|5)..'], _this5.value_to_option = function (value) {
+ if (!value) return { value: '', label: '--Select--' };
+ return { value: value, label: value };
+ }, _this5.on_change = function (e) {
+ return _this5.props.on_change_wrapper(e && e.value || '');
+ }, _temp3), (0, _possibleConstructorReturn3.default)(_this5, _ret3);
+ }
+
+ (0, _createClass3.default)(Select_status, [{
+ key: 'render',
+ value: function render() {
+ var options = this.status_types.map(this.value_to_option);
+ return _react2.default.createElement(Select_multiple, (0, _extends5.default)({}, this.props, {
+ class_name: 'status',
+ options: options,
+ on_change: this.on_change,
+ validation: function validation(v) {
+ return !!v;
+ },
+ value_to_option: this.value_to_option }));
+ }
+ }]);
+ return Select_status;
+}(_pure_component2.default);
+
+var Select_number = exports.Select_number = function (_Pure_component4) {
+ (0, _inherits3.default)(Select_number, _Pure_component4);
+
+ function Select_number() {
+ var _ref6;
+
+ var _temp4, _this6, _ret4;
+
+ (0, _classCallCheck3.default)(this, Select_number);
+
+ for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
+ args[_key4] = arguments[_key4];
+ }
+
+ return _ret4 = (_temp4 = (_this6 = (0, _possibleConstructorReturn3.default)(this, (_ref6 = Select_number.__proto__ || Object.getPrototypeOf(Select_number)).call.apply(_ref6, [this].concat(args))), _this6), _this6._fmt_num = function (n) {
+ return n && n.toLocaleString({ useGrouping: true }) || n;
+ }, _this6._get_data = function () {
+ return _this6.props.data ? _this6.props.data : _this6.opt_from_range();
+ }, _this6.value_to_option = function (value) {
+ if (value == null) return false;
+ var label = value == 0 ? 'Disabled' : _this6._fmt_num(+value);
+ return { value: value, label: label };
+ }, _this6.opt_from_range = function () {
+ var res = void 0;
+ if (_this6.props.range == 'medium') res = [0, 1, 10, 100, 1000];else if (_this6.props.range == 'ms') res = [0, 500, 2000, 5000, 10000];else res = [0, 1, 3, 5, 10, 20];
+ return res;
+ }, _this6.on_change = function (e) {
+ var value = e && +e.value || '';
+ var allow_zero = _this6._get_data().includes(0);
+ if (!value && !allow_zero) value = _this6.props.default || 1;
+ _this6.props.on_change_wrapper(value);
+ }, _this6.validation = function (s) {
+ return !!s && Number(s) == s;
+ }, _temp4), (0, _possibleConstructorReturn3.default)(_this6, _ret4);
+ }
+
+ (0, _createClass3.default)(Select_number, [{
+ key: 'render',
+ value: function render() {
+ var data = this._get_data();
+ var options = data.map(this.value_to_option);
+ return _react2.default.createElement(Select_multiple, (0, _extends5.default)({}, this.props, {
+ options: options,
+ on_change: this.on_change,
+ validation: this.validation,
+ value_to_option: this.value_to_option,
+ no_options_message: function no_options_message() {
+ return 'You can use only numbers here';
+ } }));
+ }
+ }]);
+ return Select_number;
+}(_pure_component2.default);
+
+var Select_multiple = function (_Pure_component5) {
+ (0, _inherits3.default)(Select_multiple, _Pure_component5);
+
+ function Select_multiple() {
+ var _ref7;
+
+ var _temp5, _this7, _ret5;
+
+ (0, _classCallCheck3.default)(this, Select_multiple);
+
+ for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
+ args[_key5] = arguments[_key5];
+ }
+
+ return _ret5 = (_temp5 = (_this7 = (0, _possibleConstructorReturn3.default)(this, (_ref7 = Select_multiple.__proto__ || Object.getPrototypeOf(Select_multiple)).call.apply(_ref7, [this].concat(args))), _this7), _this7.styles = {
+ option: function option(base, state) {
+ return (0, _extends5.default)({}, base, {
+ padding: '2px 12px',
+ 'background-color': state.isFocused ? '#f5f5f5' : 'white',
+ color: '#004d74'
+ });
+ },
+ control: function control(base, state) {
+ return {
+ display: 'flex',
+ height: 32,
+ 'border-radius': 3,
+ border: 'solid 1px',
+ 'border-color': state.isFocused ? '#004d74' : state.isDisabled ? '#e0e9ee' : '#ccdbe3',
+ 'background-color': state.isDisabled ? '#f5f5f5;' : 'white'
+ };
+ },
+ singleValue: function singleValue(base, state) {
+ return (0, _extends5.default)({}, base, {
+ color: state.isDisabled ? '#8e8e8e' : '#004d74'
+ });
+ }
+ }, _temp5), (0, _possibleConstructorReturn3.default)(_this7, _ret5);
+ }
+
+ (0, _createClass3.default)(Select_multiple, [{
+ key: 'render',
+ value: function render() {
+ return _react2.default.createElement(_Creatable2.default, { styles: this.styles,
+ className: (0, _classnames2.default)('select_multiple', this.props.class_name),
+ isClearable: true,
+ noOptionsMessage: this.props.no_options_message,
+ classNamePrefix: 'react_select',
+ value: this.props.value_to_option(this.props.val),
+ onChange: this.props.on_change,
+ simpleValue: true,
+ autoBlur: true,
+ options: this.props.options,
+ isValidNewOption: this.props.validation,
+ promptTextCreator: function promptTextCreator(l) {
+ return l;
+ },
+ pageSize: 9,
+ shouldKeyDownEventCreateNewOption: function shouldKeyDownEventCreateNewOption() {
+ return true;
+ },
+ placeholder: this.props.placeholder,
+ isDisabled: this.props.disabled,
+ onSelectResetsInput: !this.props.update_on_input });
+ }
+ }]);
+ return Select_multiple;
+}(_pure_component2.default);
+
+var Yes_no = exports.Yes_no = function (_Pure_component6) {
+ (0, _inherits3.default)(Yes_no, _Pure_component6);
+
+ function Yes_no() {
+ var _ref8;
+
+ var _temp6, _this8, _ret6;
+
+ (0, _classCallCheck3.default)(this, Yes_no);
+
+ for (var _len6 = arguments.length, args = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
+ args[_key6] = arguments[_key6];
+ }
+
+ return _ret6 = (_temp6 = (_this8 = (0, _possibleConstructorReturn3.default)(this, (_ref8 = Yes_no.__proto__ || Object.getPrototypeOf(Yes_no)).call.apply(_ref8, [this].concat(args))), _this8), _this8.options = function () {
+ var default_label = _this8.props.default ? 'Yes' : 'No';
+ return [{ key: 'No', value: false }, { key: 'Default (' + default_label + ')', value: '' }, { key: 'Yes', value: true }];
+ }, _temp6), (0, _possibleConstructorReturn3.default)(_this8, _ret6);
+ }
+
+ (0, _createClass3.default)(Yes_no, [{
+ key: 'render',
+ value: function render() {
+ return _react2.default.createElement(Select, (0, _extends5.default)({}, this.props, { data: this.options() }));
+ }
+ }]);
+ return Yes_no;
+}(_pure_component2.default);
+
+var Regex = exports.Regex = function (_Pure_component7) {
+ (0, _inherits3.default)(Regex, _Pure_component7);
+
+ function Regex() {
+ var _ref9;
+
+ var _temp7, _this9, _ret7;
+
+ (0, _classCallCheck3.default)(this, Regex);
+
+ for (var _len7 = arguments.length, args = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
+ args[_key7] = arguments[_key7];
+ }
+
+ return _ret7 = (_temp7 = (_this9 = (0, _possibleConstructorReturn3.default)(this, (_ref9 = Regex.__proto__ || Object.getPrototypeOf(Regex)).call.apply(_ref9, [this].concat(args))), _this9), _this9.state = { recognized: false, checked: {} }, _this9.formats = ['png', 'jpg', 'jpeg', 'svg', 'gif', 'mp3', 'mp4', 'avi'], _this9.classes = function (f) {
+ var active = _this9.state.recognized && _this9.state.checked[f];
+ return (0, _classnames2.default)('check', { active: active });
+ }, _this9.toggle = function (f) {
+ _this9.setState(function (prev) {
+ return { checked: (0, _extends5.default)({}, prev.checked, (0, _defineProperty3.default)({}, f, !prev.checked[f])) };
+ }, _this9.gen_regexp);
+ }, _this9.recognize_regexp = function () {
+ var m = _this9.props.val && _this9.props.val.match(/\\\.\((.+)\)\$/);
+ if (m && m[1]) {
+ var checked = m[1].split('|').reduce(function (acc, e) {
+ return (0, _extends5.default)({}, acc, (0, _defineProperty3.default)({}, e, true));
+ }, {});
+ _this9.setState({ recognized: true, checked: checked });
+ } else _this9.setState({ recognized: false, checked: {} });
+ }, _this9.gen_regexp = function () {
+ var formats = Object.keys(_this9.state.checked).filter(function (f) {
+ return _this9.state.checked[f];
+ }).join('|');
+ var regexp = '';
+ if (formats) regexp = '\\.(' + formats + ')$';
+ _this9.props.on_change_wrapper(regexp, _this9.props.id);
+ }, _this9.tip = function (f) {
+ if (_this9.state.checked[f]) return 'Remove file format ' + f + ' from regexp';
+ return 'Add file format ' + f + ' to regexp';
+ }, _this9.on_input_change = function (regexp) {
+ _this9.props.on_change_wrapper(regexp, _this9.props.id);
+ }, _temp7), (0, _possibleConstructorReturn3.default)(_this9, _ret7);
+ }
+
+ (0, _createClass3.default)(Regex, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this.recognize_regexp();
+ }
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate(prev_props) {
+ if (prev_props.val != this.props.val) this.recognize_regexp();
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _this10 = this;
+
+ var val = this.props.val || '';
+ return _react2.default.createElement(
+ 'div',
+ { className: 'regex_field' },
+ _react2.default.createElement(
+ 'div',
+ { className: 'regex_input' },
+ _react2.default.createElement(
+ 'div',
+ { className: 'tip_box active' },
+ _react2.default.createElement(
+ 'div',
+ { className: 'checks' },
+ this.formats.map(function (f) {
+ return _react2.default.createElement(
+ _tooltip2.default,
+ { key: f + !!_this10.state.checked[f],
+ title: _this10.tip(f) },
+ _react2.default.createElement(
+ 'button',
+ { onClick: _this10.toggle.bind(null, f),
+ className: _this10.classes(f),
+ disabled: _this10.props.disabled },
+ '.',
+ f
+ )
+ );
+ })
+ )
+ ),
+ _react2.default.createElement(Input, (0, _extends5.default)({ className: 'regex' }, this.props, { val: val, type: 'text',
+ on_change_wrapper: this.on_input_change }))
+ )
+ );
+ }
+ }]);
+ return Regex;
+}(_pure_component2.default);
+
+var Json = exports.Json = function (_Pure_component8) {
+ (0, _inherits3.default)(Json, _Pure_component8);
+
+ function Json() {
+ var _ref10;
+
+ var _temp8, _this11, _ret8;
+
+ (0, _classCallCheck3.default)(this, Json);
+
+ for (var _len8 = arguments.length, args = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
+ args[_key8] = arguments[_key8];
+ }
+
+ return _ret8 = (_temp8 = (_this11 = (0, _possibleConstructorReturn3.default)(this, (_ref10 = Json.__proto__ || Object.getPrototypeOf(Json)).call.apply(_ref10, [this].concat(args))), _this11), _this11.state = {}, _this11.on_cm_change = function (cm) {
+ var new_val = cm.doc.getValue();
+ var correct = true;
+ try {
+ JSON.parse(new_val);
+ } catch (e) {
+ correct = false;
+ }
+ if (correct) _this11.props.on_change_wrapper(new_val);
+ _this11.setState({ correct: correct });
+ }, _this11.set_ref = function (ref) {
+ _this11.textarea = ref;
+ }, _temp8), (0, _possibleConstructorReturn3.default)(_this11, _ret8);
+ }
+
+ (0, _createClass3.default)(Json, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this.cm = _codemirror2.default.fromTextArea(this.textarea, { mode: 'javascript' });
+ this.cm.on('change', this.on_cm_change);
+ this.cm.setSize('auto', '100%');
+ this.cm.doc.setValue(this.props.val);
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var classes = (0, _classnames2.default)('code_mirror_wrapper', 'json', { error: !this.state.correct });
+ return _react2.default.createElement(
+ _tooltip2.default,
+ { title: this.props.tooltip },
+ _react2.default.createElement(
+ 'div',
+ { className: classes },
+ _react2.default.createElement('textarea', { ref: this.set_ref })
+ )
+ );
+ }
+ }]);
+ return Json;
+}(_pure_component2.default);
+
+var Url_input = exports.Url_input = function (_Pure_component9) {
+ (0, _inherits3.default)(Url_input, _Pure_component9);
+
+ function Url_input(props) {
+ (0, _classCallCheck3.default)(this, Url_input);
+
+ var _this12 = (0, _possibleConstructorReturn3.default)(this, (Url_input.__proto__ || Object.getPrototypeOf(Url_input)).call(this, props));
+
+ _this12.on_url_change = function (url, id) {
+ var valid = _url2.default.is_valid_url(url);
+ if (valid) _this12.props.on_change_wrapper(url, id);
+ _this12.setState({ url: url, valid: valid });
+ };
+
+ _this12.state = { url: props.val, valid: true };
+ return _this12;
+ }
+
+ (0, _createClass3.default)(Url_input, [{
+ key: 'render',
+ value: function render() {
+ var input_props = Object.assign({}, this.props, {
+ val: this.state.url,
+ on_change_wrapper: this.on_url_change,
+ className: (0, _classnames2.default)({ error: !this.state.valid })
+ });
+ return _react2.default.createElement(Input, input_props);
+ }
+ }]);
+ return Url_input;
+}(_pure_component2.default);
+
+var Textarea = exports.Textarea = function Textarea(props) {
+ return _react2.default.createElement('textarea', { value: props.val, rows: props.rows || 3,
+ placeholder: props.placeholder,
+ onChange: function onChange(e) {
+ return props.on_change_wrapper(e.target.value);
+ } });
+};
+
+var Typeahead_wrapper = exports.Typeahead_wrapper = function Typeahead_wrapper(props) {
+ return _react2.default.createElement(_reactBootstrapTypeahead.Typeahead, { options: props.data, maxResults: 10,
+ minLength: 1, disabled: props.disabled, selectHintOnEnter: true,
+ onChange: props.on_change_wrapper, selected: props.val,
+ onInputChange: props.on_input_change, filterBy: props.filter_by });
+};
+
+var Select = exports.Select = function Select(props) {
+ var update = function update(val) {
+ if (val == 'true') val = true;else if (val == 'false') val = false;
+ if (props.on_change_wrapper) props.on_change_wrapper(val);
+ };
+ var conf = (props.data || []).find(function (c) {
+ return c.value == props.val;
+ });
+ return _react2.default.createElement(
+ _tooltip2.default,
+ { key: props.val, title: conf && conf.tooltip || '' },
+ _react2.default.createElement(
+ _i18n.T,
+ null,
+ function (t) {
+ return _react2.default.createElement(
+ 'select',
+ { value: '' + props.val,
+ onChange: function onChange(e) {
+ return update(e.target.value);
+ }, disabled: props.disabled },
+ (props.data || []).map(function (c, i) {
+ return _react2.default.createElement(
+ 'option',
+ { key: i, value: c.value },
+ t(c.key)
+ );
+ })
+ );
+ }
+ )
+ );
+};
+
+var Input = exports.Input = function Input(props) {
+ var update = function update(val) {
+ if (props.type == 'number' && val) val = Number(val);
+ if (props.on_change_wrapper) props.on_change_wrapper(val, props.id);
+ };
+ return _react2.default.createElement('input', { style: props.style,
+ type: props.type,
+ value: props.val,
+ disabled: props.disabled,
+ onChange: function onChange(e) {
+ return update(e.target.value);
+ },
+ className: props.className,
+ placeholder: props.placeholder,
+ onBlur: props.on_blur,
+ onKeyUp: props.on_key_up });
+};
+
+var Select_zone = exports.Select_zone = (0, _reactRouterDom.withRouter)(function (_Pure_component10) {
+ (0, _inherits3.default)(Select_zone, _Pure_component10);
+
+ function Select_zone() {
+ var _ref11;
+
+ var _temp9, _this13, _ret9;
+
+ (0, _classCallCheck3.default)(this, Select_zone);
+
+ for (var _len9 = arguments.length, args = Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
+ args[_key9] = arguments[_key9];
+ }
+
+ return _ret9 = (_temp9 = (_this13 = (0, _possibleConstructorReturn3.default)(this, (_ref11 = Select_zone.__proto__ || Object.getPrototypeOf(Select_zone)).call.apply(_ref11, [this].concat(args))), _this13), _this13.state = { refreshing_zones: false, zones: { zones: [] } }, _this13.refresh_zones = function () {
+ var _this = _this13;
+ _this13.etask( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
+ var result, zones;
+ return _regenerator2.default.wrap(function _callee$(_context) {
+ while (1) {
+ switch (_context.prev = _context.next) {
+ case 0:
+ this.on('uncaught', function () {
+ _this.setState({ refreshing_zones: false });
+ });
+ _this.setState({ refreshing_zones: true });
+ _context.next = 4;
+ return window.fetch('/api/refresh_zones', { method: 'POST' });
+
+ case 4:
+ result = _context.sent;
+
+ if (!(result.status != 200)) {
+ _context.next = 7;
+ break;
+ }
+
+ return _context.abrupt('return', _this.props.history.push({ pathname: '/login' }));
+
+ case 7:
+ _context.next = 9;
+ return _ajax2.default.json({ url: '/api/zones' });
+
+ case 9:
+ zones = _context.sent;
+
+ _this.setState({ refreshing_zones: false });
+ _setdb2.default.set('head.zones', zones);
+
+ case 12:
+ case 'end':
+ return _context.stop();
+ }
+ }
+ }, _callee, this);
+ }));
+ }, _temp9), (0, _possibleConstructorReturn3.default)(_this13, _ret9);
+ }
+
+ (0, _createClass3.default)(Select_zone, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var _this14 = this;
+
+ this.setdb_on('head.zones', function (zones) {
+ if (zones) _this14.setState({ zones: zones });
+ });
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _this15 = this;
+
+ var _props = this.props,
+ val = _props.val,
+ on_change_wrapper = _props.on_change_wrapper,
+ disabled = _props.disabled,
+ preview = _props.preview;
+
+ var tooltip = preview ? '' : this.props.tooltip;
+ var zone_opt = this.state.zones.zones.map(function (z) {
+ if (z.name == _this15.state.zones.def) return { key: 'Default (' + z.name + ')', value: z.name };
+ return { key: z.name, value: z.name };
+ });
+ return _react2.default.createElement(
+ 'div',
+ { className: 'select_zone' },
+ _react2.default.createElement(
+ _tooltip2.default,
+ { title: tooltip },
+ _react2.default.createElement(
+ 'span',
+ { 'data-tip': true, 'data-for': 'zone-tip' },
+ preview && _react2.default.createElement(
+ _reactTooltip2.default,
+ { id: 'zone-tip', type: 'light', effect: 'solid',
+ place: 'bottom', delayHide: 0, delayUpdate: 300 },
+ disabled ? _react2.default.createElement(_common.Ext_tooltip, null) : _react2.default.createElement(
+ 'div',
+ { className: 'zone_tooltip' },
+ _react2.default.createElement(_zone_desc2.default, { zone_name: val })
+ )
+ ),
+ _react2.default.createElement(Select, { val: val, type: 'select',
+ on_change_wrapper: on_change_wrapper, label: 'Default zone',
+ tooltip: tooltip, data: zone_opt, disabled: disabled })
+ )
+ ),
+ _react2.default.createElement(
+ _tooltip2.default,
+ { title: 'Refresh zones' },
+ _react2.default.createElement('div', { className: 'chrome_icon refresh',
+ style: { top: 3, position: 'relative' },
+ onClick: this.refresh_zones })
+ ),
+ _react2.default.createElement(_common.Loader, { show: this.state.refreshing_zones })
+ );
+ }
+ }]);
+ return Select_zone;
+}(_pure_component2.default));
+
+/***/ }),
+/* 75 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var Symbol = __webpack_require__(106),
+ getRawTag = __webpack_require__(1260),
+ objectToString = __webpack_require__(1261);
+
+/** `Object#toString` result references. */
+var nullTag = '[object Null]',
+ undefinedTag = '[object Undefined]';
+
+/** Built-in value references. */
+var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+/**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+function baseGetTag(value) {
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
+ return (symToStringTag && symToStringTag in Object(value))
+ ? getRawTag(value)
+ : objectToString(value);
+}
+
+module.exports = baseGetTag;
+
+
+/***/ }),
+/* 76 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseIsNative = __webpack_require__(1275),
+ getValue = __webpack_require__(1278);
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+}
+
+module.exports = getNative;
+
+
+/***/ }),
+/* 77 */,
+/* 78 */,
+/* 79 */,
+/* 80 */,
+/* 81 */,
+/* 82 */,
+/* 83 */,
+/* 84 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createBrowserHistory; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createHashHistory; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return createMemoryHistory; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return createLocation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return locationsAreEqual; });
+/* unused harmony export parsePath */
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return createPath; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = __webpack_require__(480);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_resolve_pathname__ = __webpack_require__(481);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_value_equal__ = __webpack_require__(482);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_tiny_warning__ = __webpack_require__(483);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_tiny_invariant__ = __webpack_require__(484);
+
+
+
+
+
+
+function addLeadingSlash(path) {
+ return path.charAt(0) === '/' ? path : '/' + path;
+}
+function stripLeadingSlash(path) {
+ return path.charAt(0) === '/' ? path.substr(1) : path;
+}
+function hasBasename(path, prefix) {
+ return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path);
+}
+function stripBasename(path, prefix) {
+ return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
+}
+function stripTrailingSlash(path) {
+ return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
+}
+function parsePath(path) {
+ var pathname = path || '/';
+ var search = '';
+ var hash = '';
+ var hashIndex = pathname.indexOf('#');
+
+ if (hashIndex !== -1) {
+ hash = pathname.substr(hashIndex);
+ pathname = pathname.substr(0, hashIndex);
+ }
+
+ var searchIndex = pathname.indexOf('?');
+
+ if (searchIndex !== -1) {
+ search = pathname.substr(searchIndex);
+ pathname = pathname.substr(0, searchIndex);
+ }
+
+ return {
+ pathname: pathname,
+ search: search === '?' ? '' : search,
+ hash: hash === '#' ? '' : hash
+ };
+}
+function createPath(location) {
+ var pathname = location.pathname,
+ search = location.search,
+ hash = location.hash;
+ var path = pathname || '/';
+ if (search && search !== '?') path += search.charAt(0) === '?' ? search : "?" + search;
+ if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : "#" + hash;
+ return path;
+}
+
+function createLocation(path, state, key, currentLocation) {
+ var location;
+
+ if (typeof path === 'string') {
+ // Two-arg form: push(path, state)
+ location = parsePath(path);
+ location.state = state;
+ } else {
+ // One-arg form: push(location)
+ location = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])({}, path);
+ if (location.pathname === undefined) location.pathname = '';
+
+ if (location.search) {
+ if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
+ } else {
+ location.search = '';
+ }
+
+ if (location.hash) {
+ if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
+ } else {
+ location.hash = '';
+ }
+
+ if (state !== undefined && location.state === undefined) location.state = state;
+ }
+
+ try {
+ location.pathname = decodeURI(location.pathname);
+ } catch (e) {
+ if (e instanceof URIError) {
+ throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
+ } else {
+ throw e;
+ }
+ }
+
+ if (key) location.key = key;
+
+ if (currentLocation) {
+ // Resolve incomplete/relative pathname relative to current location.
+ if (!location.pathname) {
+ location.pathname = currentLocation.pathname;
+ } else if (location.pathname.charAt(0) !== '/') {
+ location.pathname = Object(__WEBPACK_IMPORTED_MODULE_1_resolve_pathname__["a" /* default */])(location.pathname, currentLocation.pathname);
+ }
+ } else {
+ // When there is no prior location and pathname is empty, set it to /
+ if (!location.pathname) {
+ location.pathname = '/';
+ }
+ }
+
+ return location;
+}
+function locationsAreEqual(a, b) {
+ return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && Object(__WEBPACK_IMPORTED_MODULE_2_value_equal__["a" /* default */])(a.state, b.state);
+}
+
+function createTransitionManager() {
+ var prompt = null;
+
+ function setPrompt(nextPrompt) {
+ process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(prompt == null, 'A history supports only one prompt at a time') : void 0;
+ prompt = nextPrompt;
+ return function () {
+ if (prompt === nextPrompt) prompt = null;
+ };
+ }
+
+ function confirmTransitionTo(location, action, getUserConfirmation, callback) {
+ // TODO: If another transition starts while we're still confirming
+ // the previous one, we may end up in a weird state. Figure out the
+ // best way to handle this.
+ if (prompt != null) {
+ var result = typeof prompt === 'function' ? prompt(location, action) : prompt;
+
+ if (typeof result === 'string') {
+ if (typeof getUserConfirmation === 'function') {
+ getUserConfirmation(result, callback);
+ } else {
+ process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;
+ callback(true);
+ }
+ } else {
+ // Return false from a transition hook to cancel the transition.
+ callback(result !== false);
+ }
+ } else {
+ callback(true);
+ }
+ }
+
+ var listeners = [];
+
+ function appendListener(fn) {
+ var isActive = true;
+
+ function listener() {
+ if (isActive) fn.apply(void 0, arguments);
+ }
+
+ listeners.push(listener);
+ return function () {
+ isActive = false;
+ listeners = listeners.filter(function (item) {
+ return item !== listener;
+ });
+ };
+ }
+
+ function notifyListeners() {
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ listeners.forEach(function (listener) {
+ return listener.apply(void 0, args);
+ });
+ }
+
+ return {
+ setPrompt: setPrompt,
+ confirmTransitionTo: confirmTransitionTo,
+ appendListener: appendListener,
+ notifyListeners: notifyListeners
+ };
+}
+
+var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
+function getConfirmation(message, callback) {
+ callback(window.confirm(message)); // eslint-disable-line no-alert
+}
+/**
+ * Returns true if the HTML5 history API is supported. Taken from Modernizr.
+ *
+ * https://github.com/Modernizr/Modernizr/blob/master/LICENSE
+ * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
+ * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586
+ */
+
+function supportsHistory() {
+ var ua = window.navigator.userAgent;
+ if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;
+ return window.history && 'pushState' in window.history;
+}
+/**
+ * Returns true if browser fires popstate on hash change.
+ * IE10 and IE11 do not.
+ */
+
+function supportsPopStateOnHashChange() {
+ return window.navigator.userAgent.indexOf('Trident') === -1;
+}
+/**
+ * Returns false if using go(n) with hash history causes a full page reload.
+ */
+
+function supportsGoWithoutReloadUsingHash() {
+ return window.navigator.userAgent.indexOf('Firefox') === -1;
+}
+/**
+ * Returns true if a given popstate event is an extraneous WebKit event.
+ * Accounts for the fact that Chrome on iOS fires real popstate events
+ * containing undefined state when pressing the back button.
+ */
+
+function isExtraneousPopstateEvent(event) {
+ event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
+}
+
+var PopStateEvent = 'popstate';
+var HashChangeEvent = 'hashchange';
+
+function getHistoryState() {
+ try {
+ return window.history.state || {};
+ } catch (e) {
+ // IE 11 sometimes throws when accessing window.history.state
+ // See https://github.com/ReactTraining/history/pull/289
+ return {};
+ }
+}
+/**
+ * Creates a history object that uses the HTML5 history API including
+ * pushState, replaceState, and the popstate event.
+ */
+
+
+function createBrowserHistory(props) {
+ if (props === void 0) {
+ props = {};
+ }
+
+ !canUseDOM ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_4_tiny_invariant__["a" /* default */])(false, 'Browser history needs a DOM') : Object(__WEBPACK_IMPORTED_MODULE_4_tiny_invariant__["a" /* default */])(false) : void 0;
+ var globalHistory = window.history;
+ var canUseHistory = supportsHistory();
+ var needsHashChangeListener = !supportsPopStateOnHashChange();
+ var _props = props,
+ _props$forceRefresh = _props.forceRefresh,
+ forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,
+ _props$getUserConfirm = _props.getUserConfirmation,
+ getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
+ _props$keyLength = _props.keyLength,
+ keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
+ var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
+
+ function getDOMLocation(historyState) {
+ var _ref = historyState || {},
+ key = _ref.key,
+ state = _ref.state;
+
+ var _window$location = window.location,
+ pathname = _window$location.pathname,
+ search = _window$location.search,
+ hash = _window$location.hash;
+ var path = pathname + search + hash;
+ process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".') : void 0;
+ if (basename) path = stripBasename(path, basename);
+ return createLocation(path, state, key);
+ }
+
+ function createKey() {
+ return Math.random().toString(36).substr(2, keyLength);
+ }
+
+ var transitionManager = createTransitionManager();
+
+ function setState(nextState) {
+ Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState);
+
+ history.length = globalHistory.length;
+ transitionManager.notifyListeners(history.location, history.action);
+ }
+
+ function handlePopState(event) {
+ // Ignore extraneous popstate events in WebKit.
+ if (isExtraneousPopstateEvent(event)) return;
+ handlePop(getDOMLocation(event.state));
+ }
+
+ function handleHashChange() {
+ handlePop(getDOMLocation(getHistoryState()));
+ }
+
+ var forceNextPop = false;
+
+ function handlePop(location) {
+ if (forceNextPop) {
+ forceNextPop = false;
+ setState();
+ } else {
+ var action = 'POP';
+ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+ if (ok) {
+ setState({
+ action: action,
+ location: location
+ });
+ } else {
+ revertPop(location);
+ }
+ });
+ }
+ }
+
+ function revertPop(fromLocation) {
+ var toLocation = history.location; // TODO: We could probably make this more reliable by
+ // keeping a list of keys we've seen in sessionStorage.
+ // Instead, we just default to 0 for keys we don't know.
+
+ var toIndex = allKeys.indexOf(toLocation.key);
+ if (toIndex === -1) toIndex = 0;
+ var fromIndex = allKeys.indexOf(fromLocation.key);
+ if (fromIndex === -1) fromIndex = 0;
+ var delta = toIndex - fromIndex;
+
+ if (delta) {
+ forceNextPop = true;
+ go(delta);
+ }
+ }
+
+ var initialLocation = getDOMLocation(getHistoryState());
+ var allKeys = [initialLocation.key]; // Public interface
+
+ function createHref(location) {
+ return basename + createPath(location);
+ }
+
+ function push(path, state) {
+ process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
+ var action = 'PUSH';
+ var location = createLocation(path, state, createKey(), history.location);
+ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+ if (!ok) return;
+ var href = createHref(location);
+ var key = location.key,
+ state = location.state;
+
+ if (canUseHistory) {
+ globalHistory.pushState({
+ key: key,
+ state: state
+ }, null, href);
+
+ if (forceRefresh) {
+ window.location.href = href;
+ } else {
+ var prevIndex = allKeys.indexOf(history.location.key);
+ var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);
+ nextKeys.push(location.key);
+ allKeys = nextKeys;
+ setState({
+ action: action,
+ location: location
+ });
+ }
+ } else {
+ process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;
+ window.location.href = href;
+ }
+ });
+ }
+
+ function replace(path, state) {
+ process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
+ var action = 'REPLACE';
+ var location = createLocation(path, state, createKey(), history.location);
+ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+ if (!ok) return;
+ var href = createHref(location);
+ var key = location.key,
+ state = location.state;
+
+ if (canUseHistory) {
+ globalHistory.replaceState({
+ key: key,
+ state: state
+ }, null, href);
+
+ if (forceRefresh) {
+ window.location.replace(href);
+ } else {
+ var prevIndex = allKeys.indexOf(history.location.key);
+ if (prevIndex !== -1) allKeys[prevIndex] = location.key;
+ setState({
+ action: action,
+ location: location
+ });
+ }
+ } else {
+ process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;
+ window.location.replace(href);
+ }
+ });
+ }
+
+ function go(n) {
+ globalHistory.go(n);
+ }
+
+ function goBack() {
+ go(-1);
+ }
+
+ function goForward() {
+ go(1);
+ }
+
+ var listenerCount = 0;
+
+ function checkDOMListeners(delta) {
+ listenerCount += delta;
+
+ if (listenerCount === 1 && delta === 1) {
+ window.addEventListener(PopStateEvent, handlePopState);
+ if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);
+ } else if (listenerCount === 0) {
+ window.removeEventListener(PopStateEvent, handlePopState);
+ if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);
+ }
+ }
+
+ var isBlocked = false;
+
+ function block(prompt) {
+ if (prompt === void 0) {
+ prompt = false;
+ }
+
+ var unblock = transitionManager.setPrompt(prompt);
+
+ if (!isBlocked) {
+ checkDOMListeners(1);
+ isBlocked = true;
+ }
+
+ return function () {
+ if (isBlocked) {
+ isBlocked = false;
+ checkDOMListeners(-1);
+ }
+
+ return unblock();
+ };
+ }
+
+ function listen(listener) {
+ var unlisten = transitionManager.appendListener(listener);
+ checkDOMListeners(1);
+ return function () {
+ checkDOMListeners(-1);
+ unlisten();
+ };
+ }
+
+ var history = {
+ length: globalHistory.length,
+ action: 'POP',
+ location: initialLocation,
+ createHref: createHref,
+ push: push,
+ replace: replace,
+ go: go,
+ goBack: goBack,
+ goForward: goForward,
+ block: block,
+ listen: listen
+ };
+ return history;
+}
+
+var HashChangeEvent$1 = 'hashchange';
+var HashPathCoders = {
+ hashbang: {
+ encodePath: function encodePath(path) {
+ return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);
+ },
+ decodePath: function decodePath(path) {
+ return path.charAt(0) === '!' ? path.substr(1) : path;
+ }
+ },
+ noslash: {
+ encodePath: stripLeadingSlash,
+ decodePath: addLeadingSlash
+ },
+ slash: {
+ encodePath: addLeadingSlash,
+ decodePath: addLeadingSlash
+ }
+};
+
+function getHashPath() {
+ // We can't use window.location.hash here because it's not
+ // consistent across browsers - Firefox will pre-decode it!
+ var href = window.location.href;
+ var hashIndex = href.indexOf('#');
+ return hashIndex === -1 ? '' : href.substring(hashIndex + 1);
+}
+
+function pushHashPath(path) {
+ window.location.hash = path;
+}
+
+function replaceHashPath(path) {
+ var hashIndex = window.location.href.indexOf('#');
+ window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);
+}
+
+function createHashHistory(props) {
+ if (props === void 0) {
+ props = {};
+ }
+
+ !canUseDOM ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_4_tiny_invariant__["a" /* default */])(false, 'Hash history needs a DOM') : Object(__WEBPACK_IMPORTED_MODULE_4_tiny_invariant__["a" /* default */])(false) : void 0;
+ var globalHistory = window.history;
+ var canGoWithoutReload = supportsGoWithoutReloadUsingHash();
+ var _props = props,
+ _props$getUserConfirm = _props.getUserConfirmation,
+ getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
+ _props$hashType = _props.hashType,
+ hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;
+ var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
+ var _HashPathCoders$hashT = HashPathCoders[hashType],
+ encodePath = _HashPathCoders$hashT.encodePath,
+ decodePath = _HashPathCoders$hashT.decodePath;
+
+ function getDOMLocation() {
+ var path = decodePath(getHashPath());
+ process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".') : void 0;
+ if (basename) path = stripBasename(path, basename);
+ return createLocation(path);
+ }
+
+ var transitionManager = createTransitionManager();
+
+ function setState(nextState) {
+ Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState);
+
+ history.length = globalHistory.length;
+ transitionManager.notifyListeners(history.location, history.action);
+ }
+
+ var forceNextPop = false;
+ var ignorePath = null;
+
+ function handleHashChange() {
+ var path = getHashPath();
+ var encodedPath = encodePath(path);
+
+ if (path !== encodedPath) {
+ // Ensure we always have a properly-encoded hash.
+ replaceHashPath(encodedPath);
+ } else {
+ var location = getDOMLocation();
+ var prevLocation = history.location;
+ if (!forceNextPop && locationsAreEqual(prevLocation, location)) return; // A hashchange doesn't always == location change.
+
+ if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.
+
+ ignorePath = null;
+ handlePop(location);
+ }
+ }
+
+ function handlePop(location) {
+ if (forceNextPop) {
+ forceNextPop = false;
+ setState();
+ } else {
+ var action = 'POP';
+ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+ if (ok) {
+ setState({
+ action: action,
+ location: location
+ });
+ } else {
+ revertPop(location);
+ }
+ });
+ }
+ }
+
+ function revertPop(fromLocation) {
+ var toLocation = history.location; // TODO: We could probably make this more reliable by
+ // keeping a list of paths we've seen in sessionStorage.
+ // Instead, we just default to 0 for paths we don't know.
+
+ var toIndex = allPaths.lastIndexOf(createPath(toLocation));
+ if (toIndex === -1) toIndex = 0;
+ var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));
+ if (fromIndex === -1) fromIndex = 0;
+ var delta = toIndex - fromIndex;
+
+ if (delta) {
+ forceNextPop = true;
+ go(delta);
+ }
+ } // Ensure the hash is encoded properly before doing anything else.
+
+
+ var path = getHashPath();
+ var encodedPath = encodePath(path);
+ if (path !== encodedPath) replaceHashPath(encodedPath);
+ var initialLocation = getDOMLocation();
+ var allPaths = [createPath(initialLocation)]; // Public interface
+
+ function createHref(location) {
+ return '#' + encodePath(basename + createPath(location));
+ }
+
+ function push(path, state) {
+ process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;
+ var action = 'PUSH';
+ var location = createLocation(path, undefined, undefined, history.location);
+ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+ if (!ok) return;
+ var path = createPath(location);
+ var encodedPath = encodePath(basename + path);
+ var hashChanged = getHashPath() !== encodedPath;
+
+ if (hashChanged) {
+ // We cannot tell if a hashchange was caused by a PUSH, so we'd
+ // rather setState here and ignore the hashchange. The caveat here
+ // is that other hash histories in the page will consider it a POP.
+ ignorePath = path;
+ pushHashPath(encodedPath);
+ var prevIndex = allPaths.lastIndexOf(createPath(history.location));
+ var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);
+ nextPaths.push(path);
+ allPaths = nextPaths;
+ setState({
+ action: action,
+ location: location
+ });
+ } else {
+ process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;
+ setState();
+ }
+ });
+ }
+
+ function replace(path, state) {
+ process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;
+ var action = 'REPLACE';
+ var location = createLocation(path, undefined, undefined, history.location);
+ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+ if (!ok) return;
+ var path = createPath(location);
+ var encodedPath = encodePath(basename + path);
+ var hashChanged = getHashPath() !== encodedPath;
+
+ if (hashChanged) {
+ // We cannot tell if a hashchange was caused by a REPLACE, so we'd
+ // rather setState here and ignore the hashchange. The caveat here
+ // is that other hash histories in the page will consider it a POP.
+ ignorePath = path;
+ replaceHashPath(encodedPath);
+ }
+
+ var prevIndex = allPaths.indexOf(createPath(history.location));
+ if (prevIndex !== -1) allPaths[prevIndex] = path;
+ setState({
+ action: action,
+ location: location
+ });
+ });
+ }
+
+ function go(n) {
+ process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;
+ globalHistory.go(n);
+ }
+
+ function goBack() {
+ go(-1);
+ }
+
+ function goForward() {
+ go(1);
+ }
+
+ var listenerCount = 0;
+
+ function checkDOMListeners(delta) {
+ listenerCount += delta;
+
+ if (listenerCount === 1 && delta === 1) {
+ window.addEventListener(HashChangeEvent$1, handleHashChange);
+ } else if (listenerCount === 0) {
+ window.removeEventListener(HashChangeEvent$1, handleHashChange);
+ }
+ }
+
+ var isBlocked = false;
+
+ function block(prompt) {
+ if (prompt === void 0) {
+ prompt = false;
+ }
+
+ var unblock = transitionManager.setPrompt(prompt);
+
+ if (!isBlocked) {
+ checkDOMListeners(1);
+ isBlocked = true;
+ }
+
+ return function () {
+ if (isBlocked) {
+ isBlocked = false;
+ checkDOMListeners(-1);
+ }
+
+ return unblock();
+ };
+ }
+
+ function listen(listener) {
+ var unlisten = transitionManager.appendListener(listener);
+ checkDOMListeners(1);
+ return function () {
+ checkDOMListeners(-1);
+ unlisten();
+ };
+ }
+
+ var history = {
+ length: globalHistory.length,
+ action: 'POP',
+ location: initialLocation,
+ createHref: createHref,
+ push: push,
+ replace: replace,
+ go: go,
+ goBack: goBack,
+ goForward: goForward,
+ block: block,
+ listen: listen
+ };
+ return history;
+}
+
+function clamp(n, lowerBound, upperBound) {
+ return Math.min(Math.max(n, lowerBound), upperBound);
+}
+/**
+ * Creates a history object that stores locations in memory.
+ */
+
+
+function createMemoryHistory(props) {
+ if (props === void 0) {
+ props = {};
+ }
+
+ var _props = props,
+ getUserConfirmation = _props.getUserConfirmation,
+ _props$initialEntries = _props.initialEntries,
+ initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,
+ _props$initialIndex = _props.initialIndex,
+ initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,
+ _props$keyLength = _props.keyLength,
+ keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
+ var transitionManager = createTransitionManager();
+
+ function setState(nextState) {
+ Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState);
+
+ history.length = history.entries.length;
+ transitionManager.notifyListeners(history.location, history.action);
+ }
+
+ function createKey() {
+ return Math.random().toString(36).substr(2, keyLength);
+ }
+
+ var index = clamp(initialIndex, 0, initialEntries.length - 1);
+ var entries = initialEntries.map(function (entry) {
+ return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());
+ }); // Public interface
+
+ var createHref = createPath;
+
+ function push(path, state) {
+ process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
+ var action = 'PUSH';
+ var location = createLocation(path, state, createKey(), history.location);
+ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+ if (!ok) return;
+ var prevIndex = history.index;
+ var nextIndex = prevIndex + 1;
+ var nextEntries = history.entries.slice(0);
+
+ if (nextEntries.length > nextIndex) {
+ nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);
+ } else {
+ nextEntries.push(location);
+ }
+
+ setState({
+ action: action,
+ location: location,
+ index: nextIndex,
+ entries: nextEntries
+ });
+ });
+ }
+
+ function replace(path, state) {
+ process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
+ var action = 'REPLACE';
+ var location = createLocation(path, state, createKey(), history.location);
+ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+ if (!ok) return;
+ history.entries[history.index] = location;
+ setState({
+ action: action,
+ location: location
+ });
+ });
+ }
+
+ function go(n) {
+ var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);
+ var action = 'POP';
+ var location = history.entries[nextIndex];
+ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+ if (ok) {
+ setState({
+ action: action,
+ location: location,
+ index: nextIndex
+ });
+ } else {
+ // Mimic the behavior of DOM histories by
+ // causing a render after a cancelled POP.
+ setState();
+ }
+ });
+ }
+
+ function goBack() {
+ go(-1);
+ }
+
+ function goForward() {
+ go(1);
+ }
+
+ function canGo(n) {
+ var nextIndex = history.index + n;
+ return nextIndex >= 0 && nextIndex < history.entries.length;
+ }
+
+ function block(prompt) {
+ if (prompt === void 0) {
+ prompt = false;
+ }
+
+ return transitionManager.setPrompt(prompt);
+ }
+
+ function listen(listener) {
+ return transitionManager.appendListener(listener);
+ }
+
+ var history = {
+ length: entries.length,
+ action: 'POP',
+ location: entries[index],
+ index: index,
+ entries: entries,
+ createHref: createHref,
+ push: push,
+ replace: replace,
+ go: go,
+ goBack: goBack,
+ goForward: goForward,
+ canGo: canGo,
+ block: block,
+ listen: listen
+ };
+ return history;
+}
+
+
+
+/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(8)))
+
+/***/ }),
+/* 85 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2014-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+/**
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
+ */
+
+var __DEV__ = process.env.NODE_ENV !== 'production';
+
+var warning = function() {};
+
+if (__DEV__) {
+ var printWarning = function printWarning(format, args) {
+ var len = arguments.length;
+ args = new Array(len > 1 ? len - 1 : 0);
+ for (var key = 1; key < len; key++) {
+ args[key - 1] = arguments[key];
+ }
+ var argIndex = 0;
+ var message = 'Warning: ' +
+ format.replace(/%s/g, function() {
+ return args[argIndex++];
+ });
+ if (typeof console !== 'undefined') {
+ console.error(message);
+ }
+ try {
+ // --- Welcome to debugging React ---
+ // This error was thrown as a convenience so that you can use this stack
+ // to find the callsite that caused this warning to fire.
+ throw new Error(message);
+ } catch (x) {}
+ }
+
+ warning = function(condition, format, args) {
+ var len = arguments.length;
+ args = new Array(len > 2 ? len - 2 : 0);
+ for (var key = 2; key < len; key++) {
+ args[key - 2] = arguments[key];
+ }
+ if (format === undefined) {
+ throw new Error(
+ '`warning(condition, format, ...args)` requires a warning ' +
+ 'message argument'
+ );
+ }
+ if (!condition) {
+ printWarning.apply(null, [format].concat(args));
+ }
+ };
+}
+
+module.exports = warning;
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
+
+/***/ }),
+/* 86 */,
+/* 87 */,
+/* 88 */,
+/* 89 */,
+/* 90 */
+/***/ (function(module, exports) {
+
+//Types of elements found in the DOM
+module.exports = {
+ Text: "text", //Text
+ Directive: "directive", // ... ?>
+ Comment: "comment", //
+ Script: "script", //