diff --git a/CHANGELOG.md b/CHANGELOG.md index f7109f4c26..d6cdb76e7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ All notable changes to `dash` will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [1.7.0] - 2019-11-27 +### Added +- [#967](https://github.com/plotly/dash/pull/967) Add support for defining +clientside JavaScript callbacks via inline strings. +- [#1020](https://github.com/plotly/dash/pull/1020) Allow `visit_and_snapshot` API in `dash.testing.browser` to stay on the page so you can run other checks. + +### Changed +- [#1026](https://github.com/plotly/dash/pull/1026) Better error message when you forget to wrap multiple `children` in an array, and they get passed to other props. + +### Fixed +- [#1018](https://github.com/plotly/dash/pull/1006) Fix the `dash.testing` **stop** API with process application runner in Python2. Use `kill()` instead of `communicate()` to avoid hanging. +- [#1027](https://github.com/plotly/dash/pull/1027) Fix bug with renderer callback lock never resolving with non-rendered async component using the asyncDecorator + ## [1.6.1] - 2019-11-14 ### Fixed - [#1006](https://github.com/plotly/dash/pull/1006) Fix IE11 / ES5 compatibility and validation issues diff --git a/dash-renderer/dash_renderer/__init__.py b/dash-renderer/dash_renderer/__init__.py index e5d3435c4b..19748f2e43 100644 --- a/dash-renderer/dash_renderer/__init__.py +++ b/dash-renderer/dash_renderer/__init__.py @@ -1,7 +1,7 @@ import sys __file__ -__version__ = "1.2.0" +__version__ = "1.2.2" _js_dist_dependencies = [ { @@ -42,7 +42,7 @@ { "relative_package_path": "{}.min.js".format(__name__), "dev_package_path": "{}.dev.js".format(__name__), - "external_url": "https://unpkg.com/dash-renderer@1.2.0" + "external_url": "https://unpkg.com/dash-renderer@1.2.2" "/dash_renderer/dash_renderer.min.js", "namespace": "dash_renderer", }, diff --git a/dash-renderer/dash_renderer/dash_renderer.dev.js b/dash-renderer/dash_renderer/dash_renderer.dev.js index dfc8e42da2..503519be4c 100644 --- a/dash-renderer/dash_renderer/dash_renderer.dev.js +++ b/dash-renderer/dash_renderer/dash_renderer.dev.js @@ -29629,7 +29629,6 @@ function (_Component) { if (Object(ramda__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(layout)) { var finalLayout = Object(_persistence__WEBPACK_IMPORTED_MODULE_7__["applyPersistence"])(layoutRequest.content, dispatch); dispatch(Object(_actions_index__WEBPACK_IMPORTED_MODULE_6__["setLayout"])(finalLayout)); - dispatch(Object(_actions_index__WEBPACK_IMPORTED_MODULE_6__["setAppIsReady"])()); } else if (Object(ramda__WEBPACK_IMPORTED_MODULE_1__["isNil"])(paths)) { dispatch(Object(_actions_index__WEBPACK_IMPORTED_MODULE_6__["computePaths"])({ subTree: layout, @@ -30391,8 +30390,7 @@ var actionList = { SET_APP_LIFECYCLE: 'SET_APP_LIFECYCLE', SET_CONFIG: 'SET_CONFIG', ON_ERROR: 'ON_ERROR', - SET_HOOKS: 'SET_HOOKS', - SET_APP_READY: 'SET_APP_READY' + SET_HOOKS: 'SET_HOOKS' }; var getAction = function getAction(action) { if (actionList[action]) { @@ -30408,7 +30406,7 @@ var getAction = function getAction(action) { /*!******************************!*\ !*** ./src/actions/index.js ***! \******************************/ -/*! exports provided: updateProps, setRequestQueue, computeGraphs, computePaths, setAppLifecycle, setConfig, setHooks, setLayout, onError, setAppIsReady, hydrateInitialOutputs, getCSRFHeader, redo, undo, revert, notifyObservers, handleAsyncError, serialize */ +/*! exports provided: updateProps, setRequestQueue, computeGraphs, computePaths, setAppLifecycle, setConfig, setHooks, setLayout, onError, hydrateInitialOutputs, getCSRFHeader, redo, undo, revert, notifyObservers, handleAsyncError, serialize */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -30441,9 +30439,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils */ "./src/utils.js"); /* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../constants/constants */ "./src/constants/constants.js"); /* harmony import */ var _persistence__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../persistence */ "./src/persistence.js"); -/* harmony import */ var _setAppReadyState__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./setAppReadyState */ "./src/actions/setAppReadyState.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setAppIsReady", function() { return _setAppReadyState__WEBPACK_IMPORTED_MODULE_9__["default"]; }); - +/* harmony import */ var _isAppReady__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./isAppReady */ "./src/actions/isAppReady.js"); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } @@ -30482,7 +30478,6 @@ var setConfig = Object(redux_actions__WEBPACK_IMPORTED_MODULE_1__["createAction" var setHooks = Object(redux_actions__WEBPACK_IMPORTED_MODULE_1__["createAction"])(Object(_constants__WEBPACK_IMPORTED_MODULE_4__["getAction"])('SET_HOOKS')); var setLayout = Object(redux_actions__WEBPACK_IMPORTED_MODULE_1__["createAction"])(Object(_constants__WEBPACK_IMPORTED_MODULE_4__["getAction"])('SET_LAYOUT')); var onError = Object(redux_actions__WEBPACK_IMPORTED_MODULE_1__["createAction"])(Object(_constants__WEBPACK_IMPORTED_MODULE_4__["getAction"])('ON_ERROR')); - function hydrateInitialOutputs() { return function (dispatch, getState) { triggerDefaultState(dispatch, getState); @@ -30632,24 +30627,14 @@ function reduceInputIds(nodeIds, InputGraph) { function notifyObservers(payload) { return function _callee(dispatch, getState) { - var id, props, excludedOutputs, _getState2, graphs, isAppReady, requestQueue, InputGraph, outputObservers, changedProps, depOrder, queuedObservers, newRequestQueue, promises, i, outputIdAndProp, requestUid; + var id, props, excludedOutputs, _getState2, dependenciesRequest, graphs, layout, paths, requestQueue, InputGraph, outputObservers, changedProps, depOrder, queuedObservers, deps, ids, newRequestQueue, promises, i, outputIdAndProp, requestUid; return regeneratorRuntime.async(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: id = payload.id, props = payload.props, excludedOutputs = payload.excludedOutputs; - _getState2 = getState(), graphs = _getState2.graphs, isAppReady = _getState2.isAppReady, requestQueue = _getState2.requestQueue; - - if (!(isAppReady !== true)) { - _context.next = 5; - break; - } - - _context.next = 5; - return regeneratorRuntime.awrap(isAppReady); - - case 5: + _getState2 = getState(), dependenciesRequest = _getState2.dependenciesRequest, graphs = _getState2.graphs, layout = _getState2.layout, paths = _getState2.paths, requestQueue = _getState2.requestQueue; InputGraph = graphs.InputGraph; /* * Figure out all of the output id's that depend on this input. @@ -30687,13 +30672,13 @@ function notifyObservers(payload) { } if (!Object(ramda__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(outputObservers)) { - _context.next = 12; + _context.next = 9; break; } return _context.abrupt("return"); - case 12: + case 9: /* * There may be several components that depend on this input. * And some components may depend on other components before @@ -30780,12 +30765,35 @@ function notifyObservers(payload) { queuedObservers.push(outputIdAndProp); } }); + /** + * Determine the id of all components used as input or state in the callbacks + * triggered by the props change. + * + * Wait for all components associated to these ids to be ready before initiating + * the callbacks. + */ + + deps = queuedObservers.map(function (output) { + return dependenciesRequest.content.find(function (dependency) { + return dependency.output === output; + }); + }); + ids = Object(ramda__WEBPACK_IMPORTED_MODULE_0__["uniq"])(Object(ramda__WEBPACK_IMPORTED_MODULE_0__["flatten"])(deps.map(function (dep) { + return [dep.inputs.map(function (input) { + return input.id; + }), dep.state.map(function (state) { + return state.id; + })]; + }))); + _context.next = 17; + return regeneratorRuntime.awrap(Object(_isAppReady__WEBPACK_IMPORTED_MODULE_9__["default"])(layout, paths, ids)); + + case 17: /* * record the set of output IDs that will eventually need to be * updated in a queue. not all of these requests will be fired in this * action */ - newRequestQueue = queuedObservers.map(function (i) { return { controllerId: i, @@ -30809,7 +30817,7 @@ function notifyObservers(payload) { return _context.abrupt("return", Promise.all(promises)); - case 21: + case 22: case "end": return _context.stop(); } @@ -31277,8 +31285,6 @@ function updateOutput(outputIdAndProp, getState, requestUid, dispatch, changedPr updateOutput(idAndProp, getState, requestUid, dispatch, changedPropIds); }); } - - dispatch(Object(_setAppReadyState__WEBPACK_IMPORTED_MODULE_9__["default"])()); } }; @@ -31338,138 +31344,45 @@ function serialize(state) { /***/ }), -/***/ "./src/actions/setAppReadyState.js": -/*!*****************************************!*\ - !*** ./src/actions/setAppReadyState.js ***! - \*****************************************/ +/***/ "./src/actions/isAppReady.js": +/*!***********************************!*\ + !*** ./src/actions/isAppReady.js ***! + \***********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); -/* harmony import */ var redux_actions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! redux-actions */ "./node_modules/redux-actions/lib/index.js"); -/* harmony import */ var redux_actions__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(redux_actions__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _isSimpleComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../isSimpleComponent */ "./src/isSimpleComponent.js"); -/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../registry */ "./src/registry.js"); -/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constants */ "./src/actions/constants.js"); -/* harmony import */ var _plotly_dash_component_plugins__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @plotly/dash-component-plugins */ "./node_modules/@plotly/dash-component-plugins/dist/index.js"); -/* harmony import */ var _plotly_dash_component_plugins__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_plotly_dash_component_plugins__WEBPACK_IMPORTED_MODULE_5__); -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } - -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } - -function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } - -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } - - - +/* harmony import */ var _plotly_dash_component_plugins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @plotly/dash-component-plugins */ "./node_modules/@plotly/dash-component-plugins/dist/index.js"); +/* harmony import */ var _plotly_dash_component_plugins__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_plotly_dash_component_plugins__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../registry */ "./src/registry.js"); +/* harmony default export */ __webpack_exports__["default"] = (function (layout, paths, targets) { + var promises = []; + targets.forEach(function (id) { + var pathOfId = paths[id]; - -var isAppReady = function isAppReady(layout) { - var queue = [layout]; - var res = {}; - /* Would be much simpler if the Registry was aware of what it contained... */ - - while (queue.length) { - var elementLayout = queue.shift(); - - if (!elementLayout) { - continue; + if (!pathOfId) { + return; } - var children = elementLayout.props && elementLayout.props.children; - var namespace = elementLayout.namespace; - var type = elementLayout.type; - res[namespace] = res[namespace] || {}; - res[namespace][type] = type; + var target = Object(ramda__WEBPACK_IMPORTED_MODULE_0__["path"])(pathOfId, layout); - if (children) { - var filteredChildren = Object(ramda__WEBPACK_IMPORTED_MODULE_0__["filter"])(function (child) { - return !Object(_isSimpleComponent__WEBPACK_IMPORTED_MODULE_2__["default"])(child); - }, Array.isArray(children) ? children : [children]); - queue.push.apply(queue, _toConsumableArray(filteredChildren)); + if (!target) { + return; } - } - var promises = []; - Object.entries(res).forEach(function (_ref) { - var _ref2 = _slicedToArray(_ref, 2), - namespace = _ref2[0], - item = _ref2[1]; - - Object.entries(item).forEach(function (_ref3) { - var _ref4 = _slicedToArray(_ref3, 1), - type = _ref4[0]; - - var component = _registry__WEBPACK_IMPORTED_MODULE_3__["default"].resolve({ - namespace: namespace, - type: type - }); - var ready = Object(_plotly_dash_component_plugins__WEBPACK_IMPORTED_MODULE_5__["isReady"])(component); + var component = _registry__WEBPACK_IMPORTED_MODULE_2__["default"].resolve(target); + var ready = Object(_plotly_dash_component_plugins__WEBPACK_IMPORTED_MODULE_1__["isReady"])(component); - if (ready && typeof ready.then === 'function') { - promises.push(ready); - } - }); + if (ready && typeof ready.then === 'function') { + promises.push(ready); + } }); return promises.length ? Promise.all(promises) : true; -}; - -var setAction = Object(redux_actions__WEBPACK_IMPORTED_MODULE_1__["createAction"])(Object(_constants__WEBPACK_IMPORTED_MODULE_4__["getAction"])('SET_APP_READY')); -/* harmony default export */ __webpack_exports__["default"] = (function () { - return function _callee(dispatch, getState) { - var ready; - return regeneratorRuntime.async(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - ready = isAppReady(getState().layout); - - if (!(ready === true)) { - _context.next = 5; - break; - } - - /* All async is ready */ - dispatch(setAction(true)); - _context.next = 9; - break; - - case 5: - /* Waiting on async */ - dispatch(setAction(ready)); - _context.next = 8; - return regeneratorRuntime.awrap(ready); - - case 8: - /** - * All known async is ready. - * - * Callbacks were blocked while waiting, we can safely - * assume that no update to layout happened to invalidate. - */ - dispatch(setAction(true)); - - case 9: - case "end": - return _context.stop(); - } - } - }); - }; }); /***/ }), @@ -34585,31 +34498,6 @@ var customHooks = function customHooks() { /***/ }), -/***/ "./src/reducers/isAppReady.js": -/*!************************************!*\ - !*** ./src/reducers/isAppReady.js ***! - \************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return config; }); -/* harmony import */ var _actions_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../actions/constants */ "./src/actions/constants.js"); - -function config() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - var action = arguments.length > 1 ? arguments[1] : undefined; - - if (action.type === Object(_actions_constants__WEBPACK_IMPORTED_MODULE_0__["getAction"])('SET_APP_READY')) { - return action.payload; - } - - return state; -} - -/***/ }), - /***/ "./src/reducers/layout.js": /*!********************************!*\ !*** ./src/reducers/layout.js ***! @@ -34720,17 +34608,16 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createReducer", function() { return createReducer; }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! redux */ "./node_modules/redux/es/index.js"); -/* harmony import */ var _isAppReady__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isAppReady */ "./src/reducers/isAppReady.js"); -/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layout */ "./src/reducers/layout.js"); -/* harmony import */ var _dependencyGraph__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dependencyGraph */ "./src/reducers/dependencyGraph.js"); -/* harmony import */ var _paths__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./paths */ "./src/reducers/paths.js"); -/* harmony import */ var _requestQueue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./requestQueue */ "./src/reducers/requestQueue.js"); -/* harmony import */ var _appLifecycle__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./appLifecycle */ "./src/reducers/appLifecycle.js"); -/* harmony import */ var _history__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./history */ "./src/reducers/history.js"); -/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./error */ "./src/reducers/error.js"); -/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./hooks */ "./src/reducers/hooks.js"); -/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./api */ "./src/reducers/api.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./config */ "./src/reducers/config.js"); +/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./layout */ "./src/reducers/layout.js"); +/* harmony import */ var _dependencyGraph__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dependencyGraph */ "./src/reducers/dependencyGraph.js"); +/* harmony import */ var _paths__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./paths */ "./src/reducers/paths.js"); +/* harmony import */ var _requestQueue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./requestQueue */ "./src/reducers/requestQueue.js"); +/* harmony import */ var _appLifecycle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./appLifecycle */ "./src/reducers/appLifecycle.js"); +/* harmony import */ var _history__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./history */ "./src/reducers/history.js"); +/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./error */ "./src/reducers/error.js"); +/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./hooks */ "./src/reducers/hooks.js"); +/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./api */ "./src/reducers/api.js"); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./config */ "./src/reducers/config.js"); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } @@ -34753,24 +34640,22 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr - var apiRequests = ['dependenciesRequest', 'layoutRequest', 'reloadRequest', 'loginRequest']; function mainReducer() { var parts = { - appLifecycle: _appLifecycle__WEBPACK_IMPORTED_MODULE_7__["default"], - isAppReady: _isAppReady__WEBPACK_IMPORTED_MODULE_2__["default"], - layout: _layout__WEBPACK_IMPORTED_MODULE_3__["default"], - graphs: _dependencyGraph__WEBPACK_IMPORTED_MODULE_4__["default"], - paths: _paths__WEBPACK_IMPORTED_MODULE_5__["default"], - requestQueue: _requestQueue__WEBPACK_IMPORTED_MODULE_6__["default"], - config: _config__WEBPACK_IMPORTED_MODULE_12__["default"], - history: _history__WEBPACK_IMPORTED_MODULE_8__["default"], - error: _error__WEBPACK_IMPORTED_MODULE_9__["default"], - hooks: _hooks__WEBPACK_IMPORTED_MODULE_10__["default"] + appLifecycle: _appLifecycle__WEBPACK_IMPORTED_MODULE_6__["default"], + layout: _layout__WEBPACK_IMPORTED_MODULE_2__["default"], + graphs: _dependencyGraph__WEBPACK_IMPORTED_MODULE_3__["default"], + paths: _paths__WEBPACK_IMPORTED_MODULE_4__["default"], + requestQueue: _requestQueue__WEBPACK_IMPORTED_MODULE_5__["default"], + config: _config__WEBPACK_IMPORTED_MODULE_11__["default"], + history: _history__WEBPACK_IMPORTED_MODULE_7__["default"], + error: _error__WEBPACK_IMPORTED_MODULE_8__["default"], + hooks: _hooks__WEBPACK_IMPORTED_MODULE_9__["default"] }; Object(ramda__WEBPACK_IMPORTED_MODULE_0__["forEach"])(function (r) { - parts[r] = Object(_api__WEBPACK_IMPORTED_MODULE_11__["default"])(r); + parts[r] = Object(_api__WEBPACK_IMPORTED_MODULE_10__["default"])(r); }, apiRequests); return Object(redux__WEBPACK_IMPORTED_MODULE_1__["combineReducers"])(parts); } diff --git a/dash-renderer/dash_renderer/dash_renderer.min.js b/dash-renderer/dash_renderer/dash_renderer.min.js index 675db05955..91599b10c7 100644 --- a/dash-renderer/dash_renderer/dash_renderer.min.js +++ b/dash-renderer/dash_renderer/dash_renderer.min.js @@ -1,4 +1,4 @@ -window.dash_renderer=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=59)}([function(e,t){e.exports=window.React},function(e,t){e.exports=window.PropTypes},,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(r(79)),i=n(r(19)),a=n(r(85));t.createAction=o.default,t.handleAction=i.default,t.handleActions=a.default},function(e,t,r){"use strict";t.__esModule=!0,t.connect=t.Provider=void 0;var n=i(r(61)),o=i(r(62));function i(e){return e&&e.__esModule?e:{default:e}}t.Provider=n.default,t.connect=o.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if(r)return[e,t];return e},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"==typeof e&&n.test(e)};var n=/-webkit-|-moz-|-ms-/;e.exports=t.default},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return g}));var n=r(30),o=r.n(n),i=r(31),a=r.n(i),s=r(11),u=r.n(s),c=r(32),f=r(45),l=r(12),p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d=o()(c.a),y=a()(f.a,d);var h=void 0,m=void 0;function v(t){var r=t||e&&e.navigator&&e.navigator.userAgent;return m&&r===h||(m="all"===r?{prefix:d,prefixedKeyframes:"keyframes"}:new y({userAgent:r}),h=r),m}function b(e){return v(e).prefixedKeyframes||"keyframes"}function g(e,t){var r=function(e){return Object.keys(e).reduce((function(t,r){var n=e[r];return Array.isArray(n)?n=n.join(";"+r+":"):n&&"object"===(void 0===n?"undefined":p(n))&&"function"==typeof n.toString&&(n=n.toString()),t[r]=n,t}),{})}(e);return function(e){return Object.keys(e).reduce((function(t,r){var n=e[r];return Array.isArray(n)&&(n=u.a.canUseDOM?n[n.length-1].toString():n.join(";"+Object(l.a)(r)+":")),t[r]=n,t}),{})}(v(t).prefix(r))}}).call(this,r(9))},function(e,t,r){"use strict";r.r(t);var n=r(27),o="object"==typeof self&&self&&self.Object===Object&&self,i=(n.a||o||Function("return this")()).Symbol,a=Object.prototype,s=a.hasOwnProperty,u=a.toString,c=i?i.toStringTag:void 0;var f=function(e){var t=s.call(e,c),r=e[c];try{e[c]=void 0;var n=!0}catch(e){}var o=u.call(e);return n&&(t?e[c]=r:delete e[c]),o},l=Object.prototype.toString;var p=function(e){return l.call(e)},d="[object Null]",y="[object Undefined]",h=i?i.toStringTag:void 0;var m=function(e){return null==e?void 0===e?y:d:h&&h in Object(e)?f(e):p(e)};var v=function(e,t){return function(r){return e(t(r))}}(Object.getPrototypeOf,Object);var b=function(e){return null!=e&&"object"==typeof e},g="[object Object]",_=Function.prototype,w=Object.prototype,O=_.toString,S=w.hasOwnProperty,x=O.call(Object);var k=function(e){if(!b(e)||m(e)!=g)return!1;var t=v(e);if(null===t)return!0;var r=S.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&O.call(r)==x},j=r(14),P={INIT:"@@redux/INIT"};function E(e,t,r){var n;if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(E)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var o=e,i=t,a=[],s=a,u=!1;function c(){s===a&&(s=a.slice())}function f(){return i}function l(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return c(),s.push(e),function(){if(t){t=!1,c();var r=s.indexOf(e);s.splice(r,1)}}}function p(e){if(!k(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(u)throw new Error("Reducers may not dispatch actions.");try{u=!0,i=o(i,e)}finally{u=!1}for(var t=a=s,r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(a)throw a;for(var n=!1,o={},s=0;st?e:t+1}e.exports=e.exports.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e+""+r+n().toString(36)+t},e.exports.process=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e+r+n().toString(36)+t},e.exports.time=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e+n().toString(36)+t}}).call(this,r(88))},function(e,t,r){var n; +window.dash_renderer=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=59)}([function(e,t){e.exports=window.React},function(e,t){e.exports=window.PropTypes},,function(e,t,r){"use strict";t.__esModule=!0,t.connect=t.Provider=void 0;var n=i(r(61)),o=i(r(62));function i(e){return e&&e.__esModule?e:{default:e}}t.Provider=n.default,t.connect=o.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(r(79)),i=n(r(19)),a=n(r(85));t.createAction=o.default,t.handleAction=i.default,t.handleActions=a.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if(r)return[e,t];return e},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"==typeof e&&n.test(e)};var n=/-webkit-|-moz-|-ms-/;e.exports=t.default},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return g}));var n=r(30),o=r.n(n),i=r(31),a=r.n(i),s=r(11),u=r.n(s),c=r(32),f=r(45),l=r(12),p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d=o()(c.a),y=a()(f.a,d);var h=void 0,m=void 0;function v(t){var r=t||e&&e.navigator&&e.navigator.userAgent;return m&&r===h||(m="all"===r?{prefix:d,prefixedKeyframes:"keyframes"}:new y({userAgent:r}),h=r),m}function b(e){return v(e).prefixedKeyframes||"keyframes"}function g(e,t){var r=function(e){return Object.keys(e).reduce((function(t,r){var n=e[r];return Array.isArray(n)?n=n.join(";"+r+":"):n&&"object"===(void 0===n?"undefined":p(n))&&"function"==typeof n.toString&&(n=n.toString()),t[r]=n,t}),{})}(e);return function(e){return Object.keys(e).reduce((function(t,r){var n=e[r];return Array.isArray(n)&&(n=u.a.canUseDOM?n[n.length-1].toString():n.join(";"+Object(l.a)(r)+":")),t[r]=n,t}),{})}(v(t).prefix(r))}}).call(this,r(9))},function(e,t,r){"use strict";r.r(t);var n=r(27),o="object"==typeof self&&self&&self.Object===Object&&self,i=(n.a||o||Function("return this")()).Symbol,a=Object.prototype,s=a.hasOwnProperty,u=a.toString,c=i?i.toStringTag:void 0;var f=function(e){var t=s.call(e,c),r=e[c];try{e[c]=void 0;var n=!0}catch(e){}var o=u.call(e);return n&&(t?e[c]=r:delete e[c]),o},l=Object.prototype.toString;var p=function(e){return l.call(e)},d="[object Null]",y="[object Undefined]",h=i?i.toStringTag:void 0;var m=function(e){return null==e?void 0===e?y:d:h&&h in Object(e)?f(e):p(e)};var v=function(e,t){return function(r){return e(t(r))}}(Object.getPrototypeOf,Object);var b=function(e){return null!=e&&"object"==typeof e},g="[object Object]",_=Function.prototype,w=Object.prototype,O=_.toString,S=w.hasOwnProperty,x=O.call(Object);var k=function(e){if(!b(e)||m(e)!=g)return!1;var t=v(e);if(null===t)return!0;var r=S.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&O.call(r)==x},j=r(14),P={INIT:"@@redux/INIT"};function E(e,t,r){var n;if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(E)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var o=e,i=t,a=[],s=a,u=!1;function c(){s===a&&(s=a.slice())}function f(){return i}function l(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return c(),s.push(e),function(){if(t){t=!1,c();var r=s.indexOf(e);s.splice(r,1)}}}function p(e){if(!k(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(u)throw new Error("Reducers may not dispatch actions.");try{u=!0,i=o(i,e)}finally{u=!1}for(var t=a=s,r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(a)throw a;for(var n=!1,o={},s=0;st?e:t+1}e.exports=e.exports.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e+""+r+n().toString(36)+t},e.exports.process=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e+r+n().toString(36)+t},e.exports.time=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e+n().toString(36)+t}}).call(this,r(88))},function(e,t,r){var n; /*! Copyright (c) 2015 Jed Watson. Based on code that is Copyright 2013-2015, Facebook, Inc. @@ -17,4 +17,4 @@ window.dash_renderer=function(e){var t={};function r(n){if(t[n])return t[n].expo * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,f=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,y=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.fundamental"):60117,g=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case l:case p:case a:case u:case s:case y:return e;default:switch(e=e&&e.$$typeof){case f:case d:case c:return e;default:return t}}case v:case m:case i:return t}}}function O(e){return w(e)===p}t.typeOf=w,t.AsyncMode=l,t.ConcurrentMode=p,t.ContextConsumer=f,t.ContextProvider=c,t.Element=o,t.ForwardRef=d,t.Fragment=a,t.Lazy=v,t.Memo=m,t.Portal=i,t.Profiler=u,t.StrictMode=s,t.Suspense=y,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===u||e===s||e===y||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===c||e.$$typeof===f||e.$$typeof===d||e.$$typeof===b||e.$$typeof===g||e.$$typeof===_)},t.isAsyncMode=function(e){return O(e)||w(e)===l},t.isConcurrentMode=O,t.isContextConsumer=function(e){return w(e)===f},t.isContextProvider=function(e){return w(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return w(e)===d},t.isFragment=function(e){return w(e)===a},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===u},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===y}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o,i,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,i,a,s],f=0;(u=new Error(t.replace(/%s/g,(function(){return c[f++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t,r){"use strict";function n(e){return e}t.__esModule=!0,t.default=function(e,t,r){var o="function"==typeof t?t:n;return function(){for(var t=arguments.length,n=Array(t),i=0;i-1}},function(e,t,r){var n=r(82),o=r(20),i=r(83),a="[object Object]";var s=Object.prototype,u=s.hasOwnProperty,c=s.toString;e.exports=function(e){var t,r;return!(!function(e){return!!e&&"object"==typeof e}(e)||c.call(e)!=a||o(e)||!(u.call(e,"constructor")||"function"!=typeof(t=e.constructor)||t instanceof t))&&(n(e,(function(e,t){r=t}),i),void 0===r||u.call(e,r))}},function(e,t){var r,n=function(e,t,n){for(var o=-1,i=Object(e),a=n(e),s=a.length;s--;){var u=a[r?s:++o];if(!1===t(i[u],u,i))break}return e};e.exports=n},function(e,t,r){var n=r(20),o=r(84),i=/^\d+$/,a=Object.prototype.hasOwnProperty,s=9007199254740991;function u(e,t){return e="number"==typeof e||i.test(e)?+e:-1,t=null==t?s:t,e>-1&&e%1==0&&e-1&&e%1==0&&e<=s}(i)&&(o(e)||n(e))&&i||0;for(var c=e.constructor,f=-1,l="function"==typeof c&&c.prototype===e,p=Array(i),d=i>0;++f-1&&e%1==0&&e<=y}(e.length)&&"[object Array]"==l.call(e)};e.exports=h},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e,t){var r=i.default(e).map((function(t){return o.default(t,e[t])}));return void 0!==t?function(e,n){return void 0===e&&(e=t),a.default.apply(void 0,r)(e,n)}:a.default.apply(void 0,r)};var o=n(r(19)),i=n(r(86)),a=n(r(87));e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){if("undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys)return Reflect.ownKeys(e);var t=Object.getOwnPropertyNames(e);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e)));return t},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=arguments.length,t=Array(e),r=0;r1)for(var r=1;rt.osVersion&&(t.browserVersion=t.osVersion);"android"===t.browserName&&t.chrome&&t.browserVersion>37&&(t.browserName="and_chr");"android"===t.browserName&&t.osVersion<5&&(t.browserVersion=t.osVersion);"android"===t.browserName&&t.samsungBrowser&&(t.browserName="and_chr",t.browserVersion=44);return t};var n,o=r(91),i=(n=o)&&n.__esModule?n:{default:n};var a={chrome:"Webkit",safari:"Webkit",ios:"Webkit",android:"Webkit",phantom:"Webkit",opera:"Webkit",webos:"Webkit",blackberry:"Webkit",bada:"Webkit",tizen:"Webkit",chromium:"Webkit",vivaldi:"Webkit",firefox:"Moz",seamoney:"Moz",sailfish:"Moz",msie:"ms",msedge:"ms"},s={chrome:"chrome",chromium:"chrome",safari:"safari",firfox:"firefox",msedge:"edge",opera:"opera",vivaldi:"opera",msie:"ie"};e.exports=t.default},function(e,t,r){var n;n=function(){var e=!0;function t(t){function r(e){var r=t.match(e);return r&&r.length>1&&r[1]||""}function n(e){var r=t.match(e);return r&&r.length>1&&r[2]||""}var o,a=r(/(ipod|iphone|ipad)/i).toLowerCase(),s=!/like android/i.test(t)&&/android/i.test(t),u=/nexus\s*[0-6]\s*/i.test(t),c=!u&&/nexus\s*[0-9]+/i.test(t),f=/CrOS/.test(t),l=/silk/i.test(t),p=/sailfish/i.test(t),d=/tizen/i.test(t),y=/(web|hpw)(o|0)s/i.test(t),h=/windows phone/i.test(t),m=(/SamsungBrowser/i.test(t),!h&&/windows/i.test(t)),v=!a&&!l&&/macintosh/i.test(t),b=!s&&!p&&!d&&!y&&/linux/i.test(t),g=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),_=r(/version\/(\d+(\.\d+)?)/i),w=/tablet/i.test(t)&&!/tablet pc/i.test(t),O=!w&&/[^-]mobi/i.test(t),S=/xbox/i.test(t);/opera/i.test(t)?o={name:"Opera",opera:e,version:_||r(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(t)?o={name:"Opera",opera:e,version:r(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||_}:/SamsungBrowser/i.test(t)?o={name:"Samsung Internet for Android",samsungBrowser:e,version:_||r(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(t)?o={name:"NAVER Whale browser",whale:e,version:r(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(t)?o={name:"MZ Browser",mzbrowser:e,version:r(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(t)?o={name:"Opera Coast",coast:e,version:_||r(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(t)?o={name:"Focus",focus:e,version:r(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(t)?o={name:"Yandex Browser",yandexbrowser:e,version:_||r(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(t)?o={name:"UC Browser",ucbrowser:e,version:r(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(t)?o={name:"Maxthon",maxthon:e,version:r(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(t)?o={name:"Epiphany",epiphany:e,version:r(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(t)?o={name:"Puffin",puffin:e,version:r(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(t)?o={name:"Sleipnir",sleipnir:e,version:r(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(t)?o={name:"K-Meleon",kMeleon:e,version:r(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:h?(o={name:"Windows Phone",osname:"Windows Phone",windowsphone:e},g?(o.msedge=e,o.version=g):(o.msie=e,o.version=r(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?o={name:"Internet Explorer",msie:e,version:r(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:f?o={name:"Chrome",osname:"Chrome OS",chromeos:e,chromeBook:e,chrome:e,version:r(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(t)?o={name:"Microsoft Edge",msedge:e,version:g}:/vivaldi/i.test(t)?o={name:"Vivaldi",vivaldi:e,version:r(/vivaldi\/(\d+(\.\d+)?)/i)||_}:p?o={name:"Sailfish",osname:"Sailfish OS",sailfish:e,version:r(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?o={name:"SeaMonkey",seamonkey:e,version:r(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(t)?(o={name:"Firefox",firefox:e,version:r(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(o.firefoxos=e,o.osname="Firefox OS")):l?o={name:"Amazon Silk",silk:e,version:r(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(t)?o={name:"PhantomJS",phantom:e,version:r(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(t)?o={name:"SlimerJS",slimer:e,version:r(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?o={name:"BlackBerry",osname:"BlackBerry OS",blackberry:e,version:_||r(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:y?(o={name:"WebOS",osname:"WebOS",webos:e,version:_||r(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(o.touchpad=e)):/bada/i.test(t)?o={name:"Bada",osname:"Bada",bada:e,version:r(/dolfin\/(\d+(\.\d+)?)/i)}:d?o={name:"Tizen",osname:"Tizen",tizen:e,version:r(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||_}:/qupzilla/i.test(t)?o={name:"QupZilla",qupzilla:e,version:r(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||_}:/chromium/i.test(t)?o={name:"Chromium",chromium:e,version:r(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||_}:/chrome|crios|crmo/i.test(t)?o={name:"Chrome",chrome:e,version:r(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:s?o={name:"Android",version:_}:/safari|applewebkit/i.test(t)?(o={name:"Safari",safari:e},_&&(o.version=_)):a?(o={name:"iphone"==a?"iPhone":"ipad"==a?"iPad":"iPod"},_&&(o.version=_)):o=/googlebot/i.test(t)?{name:"Googlebot",googlebot:e,version:r(/googlebot\/(\d+(\.\d+))/i)||_}:{name:r(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!o.msedge&&/(apple)?webkit/i.test(t)?(/(apple)?webkit\/537\.36/i.test(t)?(o.name=o.name||"Blink",o.blink=e):(o.name=o.name||"Webkit",o.webkit=e),!o.version&&_&&(o.version=_)):!o.opera&&/gecko\//i.test(t)&&(o.name=o.name||"Gecko",o.gecko=e,o.version=o.version||r(/gecko\/(\d+(\.\d+)?)/i)),o.windowsphone||!s&&!o.silk?!o.windowsphone&&a?(o[a]=e,o.ios=e,o.osname="iOS"):v?(o.mac=e,o.osname="macOS"):S?(o.xbox=e,o.osname="Xbox"):m?(o.windows=e,o.osname="Windows"):b&&(o.linux=e,o.osname="Linux"):(o.android=e,o.osname="Android");var x="";o.windows?x=function(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}(r(/Windows ((NT|XP)( \d\d?.\d)?)/i)):o.windowsphone?x=r(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):o.mac?x=(x=r(/Mac OS X (\d+([_\.\s]\d+)*)/i)).replace(/[_\s]/g,"."):a?x=(x=r(/os (\d+([_\s]\d+)*) like mac os x/i)).replace(/[_\s]/g,"."):s?x=r(/android[ \/-](\d+(\.\d+)*)/i):o.webos?x=r(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):o.blackberry?x=r(/rim\stablet\sos\s(\d+(\.\d+)*)/i):o.bada?x=r(/bada\/(\d+(\.\d+)*)/i):o.tizen&&(x=r(/tizen[\/\s](\d+(\.\d+)*)/i)),x&&(o.osversion=x);var k=!o.windows&&x.split(".")[0];return w||c||"ipad"==a||s&&(3==k||k>=4&&!O)||o.silk?o.tablet=e:(O||"iphone"==a||"ipod"==a||s||u||o.blackberry||o.webos||o.bada)&&(o.mobile=e),o.msedge||o.msie&&o.version>=10||o.yandexbrowser&&o.version>=15||o.vivaldi&&o.version>=1||o.chrome&&o.version>=20||o.samsungBrowser&&o.version>=4||o.whale&&1===i([o.version,"1.0"])||o.mzbrowser&&1===i([o.version,"6.0"])||o.focus&&1===i([o.version,"1.0"])||o.firefox&&o.version>=20||o.safari&&o.version>=6||o.opera&&o.version>=10||o.ios&&o.osversion&&o.osversion.split(".")[0]>=6||o.blackberry&&o.version>=10.1||o.chromium&&o.version>=20?o.a=e:o.msie&&o.version<10||o.chrome&&o.version<20||o.firefox&&o.version<20||o.safari&&o.version<6||o.opera&&o.version<10||o.ios&&o.osversion&&o.osversion.split(".")[0]<6||o.chromium&&o.version<20?o.c=e:o.x=e,o}var r=t("undefined"!=typeof navigator&&navigator.userAgent||"");function n(e){return e.split(".").length}function o(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r=0;){if(r[0][t]>r[1][t])return 1;if(r[0][t]!==r[1][t])return-1;if(0===t)return 0}}function a(e,n,o){var a=r;"string"==typeof n&&(o=n,n=void 0),void 0===n&&(n=!1),o&&(a=t(o));var s=""+a.version;for(var u in e)if(e.hasOwnProperty(u)&&a[u]){if("string"!=typeof e[u])throw new Error("Browser version in the minVersion map should be a string: "+u+": "+String(e));return i([s,e[u]])<0}return n}return r.test=function(e){for(var t=0;t=0&&"[object Array]"===Object.prototype.toString.call(e)};function d(e,t){return function(){var r=arguments.length;if(0===r)return t();var n=arguments[r-1];return p(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,r-1))}}function y(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function h(e){return function t(r){return 0===arguments.length||y(r)?t:e.apply(this,arguments)}}function m(e){return function t(r,n){switch(arguments.length){case 0:return t;case 1:return y(r)?t:h((function(t){return e(r,t)}));default:return y(r)&&y(n)?t:y(r)?h((function(t){return e(t,n)})):y(n)?h((function(t){return e(r,t)})):e(r,n)}}}var v=m(d("forEach",(function(e,t){for(var r=t.length,n=0;n0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))})),x=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();function k(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,r){return t.apply(this,arguments)};case 3:return function(e,r,n){return t.apply(this,arguments)};case 4:return function(e,r,n,o){return t.apply(this,arguments)};case 5:return function(e,r,n,o,i){return t.apply(this,arguments)};case 6:return function(e,r,n,o,i,a){return t.apply(this,arguments)};case 7:return function(e,r,n,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,r,n,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,r,n,o,i,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,r,n,o,i,a,s,u,c,f){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}var j=m((function(e,t){return k(e.length,(function(){return e.apply(t,arguments)}))}));function P(e,t,r){for(var n=r.next();!n.done;){if((t=e["@@transducer/step"](t,n.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=r.next()}return e["@@transducer/result"](t)}function E(e,t,r,n){return e["@@transducer/result"](r[n](j(e["@@transducer/step"],e),t))}var T="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function C(e,t,r){if("function"==typeof e&&(e=function(e){return new x(e)}(e)),S(r))return function(e,t,r){for(var n=0,o=r.length;n=0;)D(t=U[r],e)&&!W(n,t)&&(n[n.length]=t),r-=1;return n})):h((function(e){return Object(e)!==e?[]:Object.keys(e)})),z=m(g(["filter"],I,(function(e,t){return w(t)?C((function(r,n){return e(t[n])&&(r[n]=t[n]),r}),{},L(t)):_(e,t)})));function G(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function K(e,t,r){for(var n=0,o=r.length;n=0;){if(r[s]===e)return n[s]===t;s-=1}switch(a){case"Map":return e.size===t.size&&H(e.entries(),t.entries(),r.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&H(e.values(),t.values(),r.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=L(e);if(u.length!==L(t).length)return!1;var c=r.concat([e]),f=n.concat([t]);for(s=u.length-1;s>=0;){var l=u[s];if(!D(l,t)||!$(t[l],e[l],c,f))return!1;s-=1}return!0}var Y=m((function(e,t){return $(e,t,[],[])})),X=h((function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():p(e)?[]:O(e)?"":w(e)?{}:B(e)?function(){return arguments}():void 0})),Z=h((function(e){return null!=e&&Y(e,X(e))})),J=function(e){return{value:e,"fantasy-land/map":function(){return this}}},ee=m((function(e,t){return e(J)(t).value}));function te(e){return function t(r,n,o){switch(arguments.length){case 0:return t;case 1:return y(r)?t:m((function(t,n){return e(r,t,n)}));case 2:return y(r)&&y(n)?t:y(r)?m((function(t,r){return e(t,n,r)})):y(n)?m((function(t,n){return e(r,t,n)})):h((function(t){return e(r,n,t)}));default:return y(r)&&y(n)&&y(o)?t:y(r)&&y(n)?m((function(t,r){return e(t,r,o)})):y(r)&&y(o)?m((function(t,r){return e(t,n,r)})):y(n)&&y(o)?m((function(t,n){return e(r,t,n)})):y(r)?h((function(t){return e(t,n,o)})):y(n)?h((function(t){return e(r,t,o)})):y(o)?h((function(t){return e(r,n,t)})):e(r,n,o)}}}var re=Number.isInteger||function(e){return e<<0===e},ne=te((function(e,t,r){var n={};for(var o in r)n[o]=r[o];return n[e]=t,n})),oe=h((function(e){return null==e})),ie=te((function e(t,r,n){if(0===t.length)return r;var o=t[0];if(t.length>1){var i=!oe(n)&&D(o,n)?n[o]:re(t[1])?[]:{};r=e(Array.prototype.slice.call(t,1),r,i)}if(re(o)&&p(n)){var a=[].concat(n);return a[o]=r,a}return ne(o,r,n)}));function ae(e,t){for(var r=0,n=t.length,o=Array(n);r=arguments.length)?u=r[s]:(u=arguments[i],i+=1),o[s]=u,y(u)||(a-=1),s+=1}return a<=0?n.apply(this,o):k(a,e(t,o,n))}}(e,[],t))})),fe=m(g(["fantasy-land/map","map"],ue,(function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return ce(t.length,(function(){return e.call(this,t.apply(this,arguments))}));case"[object Object]":return C((function(r,n){return r[n]=e(t[n]),r}),{},L(t));default:return ae(e,t)}}))),le=m((function(e,t){return function(r){return function(n){return fe((function(e){return t(e,n)}),r(e(n)))}}})),pe=m((function(e,t){for(var r=t,n=0;n=0}function me(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var ve=function(e){return(e<10?"0":"")+e},be="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+ve(e.getUTCMonth()+1)+"-"+ve(e.getUTCDate())+"T"+ve(e.getUTCHours())+":"+ve(e.getUTCMinutes())+":"+ve(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};var ge=m((function(e,t){return z((r=e,function(){return!r.apply(this,arguments)}),t);var r}));var _e=h((function(e){return function e(t,r){var n=function(n){var o=r.concat([t]);return he(n,o)?"":e(n,o)},o=function(e,t){return ae((function(t){return me(t)+": "+n(e[t])}),t.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+ae(n,t).join(", ")+"))";case"[object Array]":return"["+ae(n,t).concat(o(t,ge((function(e){return/^\d+$/.test(e)}),L(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+n(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?n(NaN):me(be(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+n(t.valueOf())+")":1/t==-1/0?"-0":t.toString(10);case"[object String]":return"object"==typeof t?"new String("+n(t.valueOf())+")":me(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var i=t.toString();if("[object Object]"!==i)return i}return"{"+o(t,L(t)).join(", ")+"}"}}(e,[])})),we=m((function(e,t){if(p(e)){if(p(t))return e.concat(t);throw new TypeError(_e(t)+" is not an array")}if(O(e)){if(O(t))return e+t;throw new TypeError(_e(t)+" is not a string")}if(null!=e&&ye(e["fantasy-land/concat"]))return e["fantasy-land/concat"](t);if(null!=e&&ye(e.concat))return e.concat(t);throw new TypeError(_e(e)+' does not have a method named "concat" or "fantasy-land/concat"')})),Oe={ON_PROP_CHANGE:"ON_PROP_CHANGE",SET_REQUEST_QUEUE:"SET_REQUEST_QUEUE",COMPUTE_GRAPHS:"COMPUTE_GRAPHS",COMPUTE_PATHS:"COMPUTE_PATHS",SET_LAYOUT:"SET_LAYOUT",SET_APP_LIFECYCLE:"SET_APP_LIFECYCLE",SET_CONFIG:"SET_CONFIG",ON_ERROR:"ON_ERROR",SET_HOOKS:"SET_HOOKS",SET_APP_READY:"SET_APP_READY"},Se=function(e){if(Oe[e])return Oe[e];throw new Error("".concat(e," is not defined."))};function xe(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===Se("SET_APP_READY")?t.payload:e}var ke=m(he);function je(e,t){var r;t=t||[];var n=(e=e||[]).length,o=t.length,i=[];for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(t.type===Se("SET_LAYOUT"))return t.payload;if(ke(t.type,["UNDO_PROP_CHANGE","REDO_PROP_CHANGE",Se("ON_PROP_CHANGE")])){var r=Pe("props",t.payload.itempath),n=ee(de(r),e),o=Te(n,t.payload.props);return ie(r,o,e)}return e},Ae=r(15),Re=m((function(e,t){if(0===e.length)return!1;for(var r=t,n=0;n0&&void 0!==arguments[0]?arguments[0]:Fe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"COMPUTE_GRAPHS":var r=t.payload,n=new Ae.DepGraph,o=new Ae.DepGraph;return r.forEach((function(e){var t,r=e.output,i=e.inputs;"Object"===Q(r)?t="".concat(r.id,".").concat(r.property):(t=r,Ne(r)?Be(r).forEach((function(e){o.addNode(e),i.forEach((function(t){var r="".concat(t.id,".").concat(t.property);o.hasNode(r)||o.addNode(r),o.addDependency(r,e)}))})):(o.addNode(r),i.forEach((function(e){var t="".concat(e.id,".").concat(e.property);o.hasNode(t)||o.addNode(t),o.addDependency(t,r)})))),i.forEach((function(e){var r="".concat(e.id,".").concat(e.property);n.addNode(t),n.hasNode(r)||n.addNode(r),n.addDependency(r,t)}))})),{InputGraph:n,MultiGraph:o};default:return e}},qe=te(C),We=h((function(e){return ce(e.length,(function(t,r){var n=Array.prototype.slice.call(arguments,0);return n[0]=r,n[1]=t,e.apply(this,n)}))})),Le=m((function(e,t){return t>e?t:e})),ze=m((function(e,t){return pe([e],t)})),Ge=m((function(e,t){return fe(ze(e),t)})),Ke=h((function(e){return ce(qe(Le,0,Ge("length",e)),(function(){for(var t=0,r=e.length;t2&&void 0!==arguments[2]?arguments[2]:[];if(r(t,n),rt(t)){var o=Je(n,["props","children"]);Array.isArray(t.props.children)?t.props.children.forEach((function(t,n){e(t,r,Pe(n,o))})):e(t.props.children,r,o)}else Ve(Array,t)&&t.forEach((function(t,o){e(t,r,Pe(o,n))}))};var ot=m((function(e,t){for(var r={},n={},o=0,i=e.length;o0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Se("COMPUTE_PATHS"):var r,n=t.payload,o=n.subTree,i=n.startingPath,a=e;if(oe(e)&&(a={}),Z(i))r=Te({},a);else{var s=z((function(e){return Y(i,He(0,i.length,a[e]))}),L(a));r=ot(s,a)}return nt(o,(function(e,t){tt(e)&&(r[e.props.id]=we(i,t))})),r;default:return e}};function at(e,t,r,n){var o,i=function(o){for(var i=t.length,a=0;a0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_REQUEST_QUEUE":return st(t.payload);default:return e}};function ct(e){var t={STARTED:"STARTED",HYDRATED:"HYDRATED"};if(t[e])return t[e];throw new Error("".concat(e," is not a valid app state."))}var ft=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct("STARTED"),t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Se("SET_APP_LIFECYCLE"):return ct(t.payload);default:return e}};function lt(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:pt;switch((arguments.length>1?arguments[1]:void 0).type){case"UNDO":var t=e.past,r=e.present,n=e.future,o=t[t.length-1];return{past:t.slice(0,t.length-1),present:o,future:[r].concat(lt(n))};case"REDO":var i=e.past,a=e.present,s=e.future,u=s[0],c=s.slice(1);return{past:[].concat(lt(i),[a]),present:u,future:c};case"REVERT":var f=e.past,l=e.future,p=f[f.length-1];return{past:f.slice(0,f.length-1),present:p,future:lt(l)};default:return e}};function yt(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:ht,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ON_ERROR":return"frontEnd"===t.payload.type?{frontEnd:[Te(t.payload,{timestamp:new Date})].concat(yt(e.frontEnd)),backEnd:e.backEnd}:"backEnd"===t.payload.type?{frontEnd:e.frontEnd,backEnd:[Te(t.payload,{timestamp:new Date})].concat(yt(e.backEnd))}:e;default:return e}}var vt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{request_pre:null,request_post:null,bear:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_HOOKS":return t.payload;default:return e}};function bt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return t.type===Se("SET_CONFIG")?t.payload:e}function gt(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e;if(t.type===r){var o=t.payload,i=o.id,a=o.status,s=o.content,u={status:a,content:s};n=Array.isArray(i)?ie(i,u,e):i?ne(i,u,e):Te(e,u)}return n})}),wt),Object(u.combineReducers)(e)}function St(e,t,r){var n,o=r.graphs,i=r.layout,a=r.paths,s=o.InputGraph,u=z(Y(e),a);if(!Z(u)){var c=L(u)[0];n={id:c,props:{}},L(t).forEach((function(e){var t="".concat(c,".").concat(e);s.hasNode(t)&&s.dependenciesOf(t).length>0&&(n.props[e]=ee(de(we(a[c],["props",e])),i))}))}return n}function xt(){return function(e){return function(t,r){var n=t||{},o=n.history,i=n.config,a=n.hooks,s=t;return"RELOAD"===r.type?s={history:o,config:i,hooks:a}:"SET_CONFIG"===r.type&&(s={hooks:a}),e(s,r)}}((e=Ot(),function(t,r){if("ON_PROP_CHANGE"===r.type){var n=r.payload,o=St(n.itempath,n.props,t);o&&!Z(o.props)&&(t.history.present=o)}var i=e(t,r);if("ON_PROP_CHANGE"===r.type&&"response"!==r.payload.source){var a=r.payload,s=St(a.itempath,a.props,i);s&&!Z(s.props)&&(i.history={past:[].concat(gt(i.history.past),[t.history.present]),present:s,future:[]})}return i}));var e}var kt=function(e){if(_t&&!e)return _t;var t=xt();return _t=Object(u.createStore)(t,Object(u.applyMiddleware)(l)),e||(window.store=_t),_t},jt=r(1),Pt=r.n(jt),Et={resolve:function(e){var t=e.type,r=e.namespace,n=window[r];if(n){if(n[t])return n[t];throw new Error("Component ".concat(t," not found in ").concat(r))}throw new Error("".concat(r," was not found."))}};var Tt=h((function(e){var t,r=[];for(t in e)r[r.length]=t;return r})),Ct=m((function(e,t){for(var r={},n=0;nt.length?(r=e,n=t):(r=t,n=e),Kt(_(We(he)(r),n))})),Qt=function(){function e(e,t){this.xf=t,this.f=e,this.idx=-1,this.found=!1}return e.prototype["@@transducer/init"]=A,e.prototype["@@transducer/result"]=function(e){return this.found||(e=this.xf["@@transducer/step"](e,-1)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.idx+=1,this.f(t)&&(this.found=!0,e=Dt(this.xf["@@transducer/step"](e,this.idx))),e},e}(),Ht=m(g([],m((function(e,t){return new Qt(e,t)})),(function(e,t){for(var r=0,n=t.length;r=r.length||e<-r.length)return r;var n=(e<0?r.length:0)+e,o=je(r);return o[n]=t(r[n]),o})),Xt=m((function(e,t){return Ee({},t,e)})),Zt=te((function(e,t,r){var n,o={};for(n in t)D(n,t)&&(o[n]=D(n,r)?e(n,t[n],r[n]):t[n]);for(n in r)D(n,r)&&!D(n,o)&&(o[n]=r[n]);return o})),Jt=te((function e(t,r,n){return Zt((function(r,n,o){return w(n)&&w(o)?e(t,n,o):t(r,n,o)}),r,n)})),er=m((function(e,t){return Jt((function(e,t,r){return r}),e,t)})),tr=function(){function e(e,t){this.xf=t,this.f=e,this.idx=-1,this.lastIdx=-1}return e.prototype["@@transducer/init"]=A,e.prototype["@@transducer/result"]=function(e){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](e,this.lastIdx))},e.prototype["@@transducer/step"]=function(e,t){return this.idx+=1,this.f(t)&&(this.lastIdx=this.idx),e},e}(),rr=m(g([],m((function(e,t){return new tr(e,t)})),(function(e,t){for(var r=t.length-1;r>=0;){if(e(t[r]))return r;r-=1}return-1}))),nr=r(3),or=r(28),ir=r.n(or),ar={OK:200,PREVENT_UPDATE:204,CLIENTSIDE_ERROR:"CLIENTSIDE_ERROR"},sr=h((function(e){return function(){return e}})),ur=function(e){return{value:e,map:function(t){return ur(t(e))}}},cr=te((function(e,t,r){return e((function(e){return ur(t(e))}))(r).value})),fr=te((function(e,t,r){return cr(e,sr(t),r)})),lr=r(10),pr=r.n(lr);function dr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function yr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hr(e,t){for(var r=0;r0&&0===n.dependantsOf(e).length&&Me(r,t().paths)&&a.push(e)})),un(a,n).forEach((function(r){var n=Kr(r.input.split("."),2),o=n[0],i=n[1],a=de(we(t().paths[o],["props",i])),s=ee(a,t().layout);e(cn({id:o,props:Gr({},i,s),excludedOutputs:r.excludedOutputs}))}))}(e,t),e(Yr(ct("HYDRATED")))}}function rn(){return{"X-CSRFToken":ir.a.parse(document.cookie)._csrf_token}}var nn=Object(nr.createAction)("UNDO")();var on=Object(nr.createAction)("REVERT")();function an(){return sn(on)}function sn(e){return function(t,r){var n=r().history;t(e);var o=n.past[n.past.length-1];t(Object(nr.createAction)("UNDO_PROP_CHANGE")({itempath:r().paths[o.id],props:o.props})),t(cn({id:o.id,props:o.props}))}}function un(e,t){var r=e.map((function(e){return{input:e,outputs:t.dependenciesOf(e),excludedOutputs:[]}})),n=Ft((function(e,t){return t.outputs.length-e.outputs.length}),r);return n.forEach((function(e,t){var r=qt(Ge("outputs",He(0,t,n)));e.outputs.forEach((function(t){ke(t,r)&&e.excludedOutputs.push(t)}))})),n}function cn(e){return function(t,r){var n,o,i,a,s,u,c,f,l,p,d,y,h,m,v,b,g;return regeneratorRuntime.async((function(_){for(;;)switch(_.prev=_.next){case 0:if(n=e.id,o=e.props,i=e.excludedOutputs,a=r(),s=a.graphs,u=a.isAppReady,c=a.requestQueue,!0===u){_.next=5;break}return _.next=5,regeneratorRuntime.awrap(u);case 5:if(f=s.InputGraph,l=[],(p=L(o)).forEach((function(e){var t="".concat(n,".").concat(e);f.hasNode(t)&&f.dependenciesOf(t).forEach((function(e){ke(e,l)||l.push(e)}))})),i&&(l=ge(We(ke)(i),l)),!Z(l)){_.next=12;break}return _.abrupt("return");case 12:for(d=f.overallOrder(),l=Ft((function(e,t){return d.indexOf(t)-d.indexOf(e)}),l),y=[],l.forEach((function(e){var t;t=Ne(e)?Be(e).map((function(e){return e.split(".")[0]})):[e.split(".")[0]];var n=f.dependantsOf(e),o=Vt(y,n),i=Bt((function(e){return ke(e.controllerId,n)&&"loading"===e.status}),c);0===o.length&&Bt((function(e){return Me(e,r().paths)}))(t)&&!i&&y.push(e)})),h=y.map((function(e){return{controllerId:e,status:"loading",uid:De(),requestTime:Date.now()}})),t(Qr(we(c,h))),m=[],v=0;v=i}));n(Qr(u))}},y=Kr(e.split("."),2),h=y[0],m=(y[1],{output:e,changedPropIds:o}),b=c.content.find((function(t){return t.output===e})),g=b.inputs,_=b.state,w=b.clientside_function,O=L(t().paths);m.inputs=g.map((function(e){if(!ke(e.id,O))throw new ReferenceError("An invalid input object was used in an `Input` of a Dash callback. The id of this object is `"+e.id+"` and the property is `"+e.property+"`. The list of ids in the current layout is `["+O.join(", ")+"]`");var r=de(we(t().paths[e.id],["props",e.property]));return{id:e.id,property:e.property,value:ee(r,s)}}));var S=g.map((function(e){return"".concat(e.id,".").concat(e.property)}));function x(e,r){var o=t(),i=o.layout,a=o.paths[e];if(!a)return!1;var s=Rr({props:function(e,t,r){var n=Ar(e),o=n.canPersist,i=n.id,a=n.props,s=n.persistence,u=n.persisted_props,c=n.persistence_type,f=n.element,l=function(e,r){return e in t?t[e]:r},p=l("persistence",s);if(!o||!s&&!p)return t;var d=l("persistence_type",c),y=l("persisted_props",u),h=p!==s||d!==c||y!==u,m=function(e){return!(e.split(".")[0]in t)},b={},g=a;if(h&&s){var _=Pr(c,r);v((function(e){return Ir(Cr(i,e,s),_,f,a,e,b,Mr)}),z(m,u)),g=Te(a,b)}if(p){var w=Pr(d,r);h&&v((function(e){return Ir(Cr(i,e,p),w,f,g,e,b)}),z(m,y));var O=f.persistenceTransforms||{};for(var S in t){var x=O[S];if(x)for(var k in x)w.removeItem(Cr(i,"".concat(S,".").concat(k),p));else w.removeItem(Cr(i,S,p))}}return h?Te(t,b):t}(pe(a,i),r,n)},n).props;return n(Vr({itempath:a,props:s,source:"response"})),s}if(m.changedPropIds=o.filter((function(e){return ke(e,S)})),_.length>0&&(m.state=_.map((function(e){if(!ke(e.id,O))throw new ReferenceError("An invalid input object was used in a `State` object of a Dash callback. The id of this object is `"+e.id+"` and the property is `"+e.property+"`. The list of ids in the current layout is `["+O.join(", ")+"]`");var r=de(we(t().paths[e.id],["props",e.property]));return{id:e.id,property:e.property,value:ee(r,s)}}))),w){var k,j=function(e,t){var r=Kr(e.split("."),2),o=r[0],i=Gr({},r[1],t);if(d(!1,ar.OK),t!==window.dash_clientside.no_update){var a=x(o,i);a&&n(cn({id:o,props:a}))}};window.dash_clientside||(window.dash_clientside={}),window.dash_clientside.no_update||(Object.defineProperty(window.dash_clientside,"no_update",{value:{description:"Return to prevent updating an Output."},writable:!1}),Object.defineProperty(window.dash_clientside,"PreventUpdate",{value:{description:"Throw to prevent updating all Outputs."},writable:!1}));try{var P;k=(P=window.dash_clientside[w.namespace])[w.function_name].apply(P,zr(Ge("value",m.inputs)).concat(zr(Me("state",m)?Ge("value",m.state):[])))}catch(e){return e===window.dash_clientside.PreventUpdate?void d(!0,ar.PREVENT_UPDATE):(console.error("The following error occurred while executing ".concat(w.namespace,".").concat(w.function_name," ")+'in order to update component "'.concat(m.output,'" ⋁⋁⋁')),console.error(e),void d(!0,ar.CLIENTSIDE_ERROR))}return"Promise"===Q(k)?(console.error("The clientside function "+"".concat(w.namespace,".").concat(w.function_name," ")+"returned a Promise instead of a value. Promises are not supported in Dash clientside right now, but may be in the future."),void d(!0,ar.CLIENTSIDE_ERROR)):void(Ne(m.output)?Be(m.output).forEach((function(e,t){j(e,k[t])})):j(m.output,k))}return null!==f.request_pre&&f.request_pre(m),fetch("".concat(Ie(a),"_dash-update-component"),er(a.fetch,{method:"POST",headers:rn(),body:JSON.stringify(m)})).then((function(r){var i=function(){return rr($t("controllerId",e),t().requestQueue)>p()};if(r.status!==ar.OK){if(d(!0,r.status),r.status===ar.PREVENT_UPDATE)return;throw r}i()?d(!0,r.status):r.json().then((function(a){if(i())d(!0,r.status);else{d(!1,r.status),null!==f.request_post&&f.request_post(m,a.response);var s=a.multi,u=function(e){var r=Kr(e,2),i=r[0],a=r[1],u=s?i:h,c=x(u,a);if(c&&(n(cn({id:u,props:c})),Me("children",c))){var f=c.children;if(n($r({subTree:f,startingPath:we(t().paths[u],["props","children"])})),ke(Q(f),["Array","Object"])&&!Z(f)){var p={};nt(f,(function(e){(function(e){return"Object"===Q(e)&&Me("props",e)&&Me("id",e.props)})(e)&&L(e.props).forEach((function(t){var r="".concat(e.props.id,".").concat(t);Me(r,l.nodes)&&(p[r]={id:e.props.id,props:Gr({},t,e.props[t])})}))}));var d=[];L(p).forEach((function(e){0===l.dependenciesOf(e).length&&0===Vt(l.dependantsOf(e),L(p)).length&&(d.push(e),delete p[e])}));var y=un(L(p),l),m=l.overallOrder();Ft((function(e,t){return m.indexOf(e.input)-m.indexOf(t.input)}),y).forEach((function(e){var t=p[e.input];t.excludedOutputs=e.excludedOutputs,n(cn(t))})),d.forEach((function(e){var r=De();n(Qr(Pe({controllerId:null,status:"loading",uid:r,requestTime:Date.now()},t().requestQueue))),fn(e,t,r,n,o)}))}n(Lr())}};s?Object.entries(a.response).forEach(u):u([e,a.response.props])}}))})).catch((function(e){ln(e,"Callback error updating ".concat(Ne(m.output)?Be(m.output).join(", "):m.output),n)}))}function ln(e,t,r){(e&&"function"==typeof e.text?e.text():Promise.resolve(e)).then((function(e){r(en({type:"backEnd",error:{message:t,html:e}}))}))}var pn=function(){function e(e,t){for(var r=0;r-1&&t._listeners.splice(r,1)}}}},{key:"addCSS",value:function(e){var t=this;return this._cssSet[e]||(this._cssSet[e]=!0,this._emitChange()),{remove:function(){delete t._cssSet[e],t._emitChange()}}}},{key:"getCSS",value:function(){return Object.keys(this._cssSet).join("\n")}},{key:"_emitChange",value:function(){this._listeners.forEach((function(e){return e()}))}}]),e}(),yn={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};function hn(e,t){return!yn[e]&&"number"==typeof t&&0!==t?t+"px":t}function mn(e,t){return Object.keys(e).reduce((function(r,n){return r[n]=t(e[n],n),r}),{})}function vn(e){return mn(e,(function(t,r){return hn(r,e[r])+" !important"}))}var bn=r(12),gn=r(7);function _n(e,t,r){if(!t)return"";var n,o=mn(t,(function(e,t){return hn(t,e)})),i=Object(gn.b)(o,r),a=Object(bn.b)(i);return e+"{"+(n=a,Object.keys(n).map((function(e){return e+": "+n[e]+";"})).join("\n"))+"}"}var wn=function(e){return null==e?"main":e.toString()},On=function(e,t,r){var n=wn(t);return!!e&&!!e._radiumStyleState&&!!e._radiumStyleState[n]&&e._radiumStyleState[n][r]},Sn=function(e){return"string"==typeof e.ref?e.ref:e.key},xn=function(e){return e._lastRadiumState||e.state&&e.state._radiumStyleState||{}};function kn(e){if(!e)return"";for(var t=5381,r=e.length-1;r;)t=33*t^e.charCodeAt(r),r-=1;return(t>>>0).toString(16)}var jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Pn(e){return e&&e.constructor===Object&&e.toString===Object.prototype.toString}function En(e){var t={};return e.forEach((function(e){e&&"object"===(void 0===e?"undefined":jn(e))&&(Array.isArray(e)&&(e=En(e)),Object.keys(e).forEach((function(r){if(Pn(e[r])&&Pn(t[r])){if(0===r.indexOf("@media"))for(var n=r;;)if(!t[n+=" "])return void(t[n]=e[r]);t[r]=En([t[r],e[r]])}else t[r]=e[r]})))})),t}Object.assign,"function"==typeof Symbol&&Symbol.iterator;var Tn=function(){};var Cn=function(e){var t=e.style,r=e.mergeStyles;return{style:Array.isArray(t)?r(t):t}};var An=[],Rn=!1;function Mn(){An.forEach((function(e){e()}))}var In=function(e){return-1===An.indexOf(e)&&An.push(e),Rn||(window.addEventListener("mouseup",Mn),Rn=!0),{remove:function(){var t=An.indexOf(e);An.splice(t,1),0===An.length&&Rn&&(window.removeEventListener("mouseup",Mn),Rn=!1)}}},Dn=function(e){return":hover"===e||":active"===e||":focus"===e},Nn=function(e){var t=e.ExecutionEnvironment,r=e.getComponentField,n=e.getState,o=e.mergeStyles,i=e.props,a=e.setState,s=e.style,u={},c={};if(s[":hover"]){var f=i.onMouseEnter;c.onMouseEnter=function(e){f&&f(e),a(":hover",!0)};var l=i.onMouseLeave;c.onMouseLeave=function(e){l&&l(e),a(":hover",!1)}}if(s[":active"]){var p=i.onMouseDown;c.onMouseDown=function(e){p&&p(e),u._lastMouseDown=Date.now(),a(":active","viamousedown")};var d=i.onKeyDown;c.onKeyDown=function(e){d&&d(e)," "!==e.key&&"Enter"!==e.key||a(":active","viakeydown")};var y=i.onKeyUp;c.onKeyUp=function(e){y&&y(e)," "!==e.key&&"Enter"!==e.key||a(":active",!1)}}if(s[":focus"]){var h=i.onFocus;c.onFocus=function(e){h&&h(e),a(":focus",!0)};var m=i.onBlur;c.onBlur=function(e){m&&m(e),a(":focus",!1)}}s[":active"]&&!r("_radiumMouseUpListener")&&t.canUseEventListeners&&(u._radiumMouseUpListener=In((function(){Object.keys(r("state")._radiumStyleState).forEach((function(e){"viamousedown"===n(":active",e)&&a(":active",!1,e)}))})));var v=i.disabled?[s[":disabled"]]:Object.keys(s).filter((function(e){return Dn(e)&&n(e)})).map((function(e){return s[e]})),b=o([s].concat(v));return b=Object.keys(b).reduce((function(e,t){return Dn(t)||":disabled"===t||(e[t]=b[t]),e}),{}),{componentFields:u,props:c,style:b}},Bn=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:Kn,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments[5];if(!i){var a=xn(e);i=Object.keys(a).reduce((function(e,t){return"main"!==t&&(e[t]=!0),e}),{})}if(!t||t.props&&t.props["data-radium"]||o&&!Hn(t))return{extraStateKeyMap:i,element:t};var s=$n({children:t.props.children,component:e,config:r,existingKeyMap:n,extraStateKeyMap:i}),u=Yn({component:e,config:r,existingKeyMap:n,extraStateKeyMap:i,props:t.props});if(u=Xn({component:e,config:r,existingKeyMap:n,props:u,renderedElement:t}),s===t.props.children&&u===t.props)return{extraStateKeyMap:i,element:t};var c=Zn(t,u!==t.props?u:{},s);return{extraStateKeyMap:i,element:c}},to=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0},ro=function(){function e(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};if("function"!=typeof e){var i=no({},o,e);return function(e){return fo(e,i)}}var a=e,s=a;(function(e){return"function"==typeof e&&/^\s*class\s+/.test(e.toString())})(s)&&(s=function(e){function t(){return co(new(Function.prototype.bind.apply(e,[null].concat(Array.prototype.slice.call(arguments)))),this),this}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":oo(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(s)),function(e){return!(e.render||e.prototype&&e.prototype.render)}(s)&&((s=function(e){function t(){return io(this,t),ao(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return so(t,e),ro(t,[{key:"render",value:function(){return a(this.props,this.context)}}]),t}(n.Component)).displayName=a.displayName||a.name);var u=(r=t=function(e){function t(){io(this,t);var e=ao(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.state=e.state||{},e.state._radiumStyleState={},e._radiumIsMounted=!0,e}return so(t,e),ro(t,[{key:"componentWillUnmount",value:function(){to(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this)&&to(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this),this._radiumIsMounted=!1,this._radiumMouseUpListener&&this._radiumMouseUpListener.remove(),this._radiumMediaQueryListenersByQuery&&Object.keys(this._radiumMediaQueryListenersByQuery).forEach((function(e){this._radiumMediaQueryListenersByQuery[e].remove()}),this)}},{key:"getChildContext",value:function(){var e=to(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getChildContext",this)?to(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getChildContext",this).call(this):{};if(!this.props.radiumConfig)return e;var r=no({},e);return this.props.radiumConfig&&(r._radiumConfig=this.props.radiumConfig),r}},{key:"render",value:function(){var e=to(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this),r=this.props.radiumConfig||this.context._radiumConfig||o;o&&r!==o&&(r=no({},o,r));var n=eo(this,e,r),i=n.extraStateKeyMap,a=n.element;return this._extraRadiumStateKeys=Object.keys(i),a}},{key:"componentDidUpdate",value:function(e,r){if(to(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidUpdate",this)&&to(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidUpdate",this).call(this,e,r),this._extraRadiumStateKeys.length>0){var n=this._extraRadiumStateKeys.reduce((function(e,t){e[t];return function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,[t])}),xn(this));this._lastRadiumState=n,this.setState({_radiumStyleState:n})}}}]),t}(s),t._isRadiumEnhanced=!0,r);return co(a,u),u.propTypes&&u.propTypes.style&&(u.propTypes=no({},u.propTypes,{style:Pt.a.oneOfType([Pt.a.array,Pt.a.object])})),u.displayName=a.displayName||a.name||"Component",u.contextTypes=no({},u.contextTypes,{_radiumConfig:Pt.a.object,_radiumStyleKeeper:Pt.a.instanceOf(dn)}),u.childContextTypes=no({},u.childContextTypes,{_radiumConfig:Pt.a.object,_radiumStyleKeeper:Pt.a.instanceOf(dn)}),u}var lo,po,yo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ho=function(){function e(e,t){for(var r=0;r=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["radiumConfig"]));return o.a.createElement("div",t,this.props.children,o.a.createElement(_o,null))}}]),t}(n.PureComponent);So.contextTypes={_radiumConfig:Pt.a.object,_radiumStyleKeeper:Pt.a.instanceOf(dn)},So.childContextTypes={_radiumStyleKeeper:Pt.a.instanceOf(dn)};var xo=So=fo(So);function ko(e){return fo(e)}ko.Plugins=qn,ko.Style=bo,ko.StyleRoot=xo,ko.getState=On,ko.keyframes=function(e,t){return{__radiumKeyframes:!0,__process:function(r){var n=Object(gn.a)(r),o=Object.keys(e).map((function(t){return _n(t,e[t],r)})).join("\n"),i=(t?t+"-":"")+"radium-animation-"+kn(o);return{css:"@"+n+" "+i+" {\n"+o+"\n}\n",animationName:i}}}};var jo=ko;function Po(e){return(Po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Eo(e,t){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return fetch(e,er(t,{method:"POST",headers:rn(),body:r?JSON.stringify(r):null}))}};function ii(e,t,r,n,o){return function(i,a){var s=a().config,u="".concat(Ie(s)).concat(e);return i({type:r,payload:{id:n,status:"loading"}}),oi[t](u,s.fetch,o).then((function(e){var t=e.headers.get("content-type");return t&&-1!==t.indexOf("application/json")?e.json().then((function(t){return i({type:r,payload:{status:e.status,content:t,id:n}}),t})):i({type:r,payload:{id:n,status:e.status}})})).catch((function(t){ln(t,"Error from API call: "+e,i)}))}}function ai(e){return(ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function si(e,t){for(var r=0;r0?i:null,r.future.length>0?a:null))}Oi.propTypes={history:Pt.a.object,dispatch:Pt.a.func};var Si=Object(s.connect)((function(e){return{history:e.history}}),(function(e){return{dispatch:e}}))(jo(Oi)),xi=h((function(e){return function(t,r){return e(t,r)?-1:e(r,t)?1:0}})),ki=m((function(e,t){return e0){var y=document.createElement("link");y.href="".concat(f.url,"?m=").concat(f.modified),y.type="text/css",y.rel="stylesheet",this._head.appendChild(y)}}}catch(e){a=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw s}}o||window.top.location.reload()}else 500===r.status&&(this._retry>this.state.max_retry&&(this.clearInterval(),window.alert("\n Reloader failed after ".concat(this._retry," times.\n Please check your application for errors.\n "))),this._retry++)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.dispatch,r=e.reloadRequest,n=this.state,o=n.disabled,i=n.interval;if(!o&&!this.state.intervalId){var a=window.setInterval((function(){"loading"!==r.status&&t(ii("_reload-hash","GET","reloadRequest"))}),i);this.setState({intervalId:a})}}},{key:"componentWillUnmount",value:function(){!this.state.disabled&&this.state.intervalId&&this.clearInterval()}},{key:"render",value:function(){return null}}])&&Pi(r.prototype,n),o&&Pi(r,o),t}(o.a.Component);Ai.defaultProps={},Ai.propTypes={id:Pt.a.string,config:Pt.a.object,reloadRequest:Pt.a.object,dispatch:Pt.a.func,interval:Pt.a.number};var Ri=Object(s.connect)((function(e){return{config:e.config,reloadRequest:e.reloadRequest}}),(function(e){return{dispatch:e}}))(Ai);function Mi(e){return(Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ii(e,t){for(var r=0;r-1}},function(e,t,r){var n=r(82),o=r(20),i=r(83),a="[object Object]";var s=Object.prototype,u=s.hasOwnProperty,c=s.toString;e.exports=function(e){var t,r;return!(!function(e){return!!e&&"object"==typeof e}(e)||c.call(e)!=a||o(e)||!(u.call(e,"constructor")||"function"!=typeof(t=e.constructor)||t instanceof t))&&(n(e,(function(e,t){r=t}),i),void 0===r||u.call(e,r))}},function(e,t){var r,n=function(e,t,n){for(var o=-1,i=Object(e),a=n(e),s=a.length;s--;){var u=a[r?s:++o];if(!1===t(i[u],u,i))break}return e};e.exports=n},function(e,t,r){var n=r(20),o=r(84),i=/^\d+$/,a=Object.prototype.hasOwnProperty,s=9007199254740991;function u(e,t){return e="number"==typeof e||i.test(e)?+e:-1,t=null==t?s:t,e>-1&&e%1==0&&e-1&&e%1==0&&e<=s}(i)&&(o(e)||n(e))&&i||0;for(var c=e.constructor,f=-1,l="function"==typeof c&&c.prototype===e,p=Array(i),d=i>0;++f-1&&e%1==0&&e<=y}(e.length)&&"[object Array]"==l.call(e)};e.exports=h},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e,t){var r=i.default(e).map((function(t){return o.default(t,e[t])}));return void 0!==t?function(e,n){return void 0===e&&(e=t),a.default.apply(void 0,r)(e,n)}:a.default.apply(void 0,r)};var o=n(r(19)),i=n(r(86)),a=n(r(87));e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){if("undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys)return Reflect.ownKeys(e);var t=Object.getOwnPropertyNames(e);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e)));return t},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=arguments.length,t=Array(e),r=0;r1)for(var r=1;rt.osVersion&&(t.browserVersion=t.osVersion);"android"===t.browserName&&t.chrome&&t.browserVersion>37&&(t.browserName="and_chr");"android"===t.browserName&&t.osVersion<5&&(t.browserVersion=t.osVersion);"android"===t.browserName&&t.samsungBrowser&&(t.browserName="and_chr",t.browserVersion=44);return t};var n,o=r(91),i=(n=o)&&n.__esModule?n:{default:n};var a={chrome:"Webkit",safari:"Webkit",ios:"Webkit",android:"Webkit",phantom:"Webkit",opera:"Webkit",webos:"Webkit",blackberry:"Webkit",bada:"Webkit",tizen:"Webkit",chromium:"Webkit",vivaldi:"Webkit",firefox:"Moz",seamoney:"Moz",sailfish:"Moz",msie:"ms",msedge:"ms"},s={chrome:"chrome",chromium:"chrome",safari:"safari",firfox:"firefox",msedge:"edge",opera:"opera",vivaldi:"opera",msie:"ie"};e.exports=t.default},function(e,t,r){var n;n=function(){var e=!0;function t(t){function r(e){var r=t.match(e);return r&&r.length>1&&r[1]||""}function n(e){var r=t.match(e);return r&&r.length>1&&r[2]||""}var o,a=r(/(ipod|iphone|ipad)/i).toLowerCase(),s=!/like android/i.test(t)&&/android/i.test(t),u=/nexus\s*[0-6]\s*/i.test(t),c=!u&&/nexus\s*[0-9]+/i.test(t),f=/CrOS/.test(t),l=/silk/i.test(t),p=/sailfish/i.test(t),d=/tizen/i.test(t),y=/(web|hpw)(o|0)s/i.test(t),h=/windows phone/i.test(t),m=(/SamsungBrowser/i.test(t),!h&&/windows/i.test(t)),v=!a&&!l&&/macintosh/i.test(t),b=!s&&!p&&!d&&!y&&/linux/i.test(t),g=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),_=r(/version\/(\d+(\.\d+)?)/i),w=/tablet/i.test(t)&&!/tablet pc/i.test(t),O=!w&&/[^-]mobi/i.test(t),S=/xbox/i.test(t);/opera/i.test(t)?o={name:"Opera",opera:e,version:_||r(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(t)?o={name:"Opera",opera:e,version:r(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||_}:/SamsungBrowser/i.test(t)?o={name:"Samsung Internet for Android",samsungBrowser:e,version:_||r(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(t)?o={name:"NAVER Whale browser",whale:e,version:r(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(t)?o={name:"MZ Browser",mzbrowser:e,version:r(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(t)?o={name:"Opera Coast",coast:e,version:_||r(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(t)?o={name:"Focus",focus:e,version:r(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(t)?o={name:"Yandex Browser",yandexbrowser:e,version:_||r(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(t)?o={name:"UC Browser",ucbrowser:e,version:r(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(t)?o={name:"Maxthon",maxthon:e,version:r(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(t)?o={name:"Epiphany",epiphany:e,version:r(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(t)?o={name:"Puffin",puffin:e,version:r(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(t)?o={name:"Sleipnir",sleipnir:e,version:r(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(t)?o={name:"K-Meleon",kMeleon:e,version:r(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:h?(o={name:"Windows Phone",osname:"Windows Phone",windowsphone:e},g?(o.msedge=e,o.version=g):(o.msie=e,o.version=r(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?o={name:"Internet Explorer",msie:e,version:r(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:f?o={name:"Chrome",osname:"Chrome OS",chromeos:e,chromeBook:e,chrome:e,version:r(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(t)?o={name:"Microsoft Edge",msedge:e,version:g}:/vivaldi/i.test(t)?o={name:"Vivaldi",vivaldi:e,version:r(/vivaldi\/(\d+(\.\d+)?)/i)||_}:p?o={name:"Sailfish",osname:"Sailfish OS",sailfish:e,version:r(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?o={name:"SeaMonkey",seamonkey:e,version:r(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(t)?(o={name:"Firefox",firefox:e,version:r(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(o.firefoxos=e,o.osname="Firefox OS")):l?o={name:"Amazon Silk",silk:e,version:r(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(t)?o={name:"PhantomJS",phantom:e,version:r(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(t)?o={name:"SlimerJS",slimer:e,version:r(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?o={name:"BlackBerry",osname:"BlackBerry OS",blackberry:e,version:_||r(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:y?(o={name:"WebOS",osname:"WebOS",webos:e,version:_||r(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(o.touchpad=e)):/bada/i.test(t)?o={name:"Bada",osname:"Bada",bada:e,version:r(/dolfin\/(\d+(\.\d+)?)/i)}:d?o={name:"Tizen",osname:"Tizen",tizen:e,version:r(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||_}:/qupzilla/i.test(t)?o={name:"QupZilla",qupzilla:e,version:r(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||_}:/chromium/i.test(t)?o={name:"Chromium",chromium:e,version:r(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||_}:/chrome|crios|crmo/i.test(t)?o={name:"Chrome",chrome:e,version:r(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:s?o={name:"Android",version:_}:/safari|applewebkit/i.test(t)?(o={name:"Safari",safari:e},_&&(o.version=_)):a?(o={name:"iphone"==a?"iPhone":"ipad"==a?"iPad":"iPod"},_&&(o.version=_)):o=/googlebot/i.test(t)?{name:"Googlebot",googlebot:e,version:r(/googlebot\/(\d+(\.\d+))/i)||_}:{name:r(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!o.msedge&&/(apple)?webkit/i.test(t)?(/(apple)?webkit\/537\.36/i.test(t)?(o.name=o.name||"Blink",o.blink=e):(o.name=o.name||"Webkit",o.webkit=e),!o.version&&_&&(o.version=_)):!o.opera&&/gecko\//i.test(t)&&(o.name=o.name||"Gecko",o.gecko=e,o.version=o.version||r(/gecko\/(\d+(\.\d+)?)/i)),o.windowsphone||!s&&!o.silk?!o.windowsphone&&a?(o[a]=e,o.ios=e,o.osname="iOS"):v?(o.mac=e,o.osname="macOS"):S?(o.xbox=e,o.osname="Xbox"):m?(o.windows=e,o.osname="Windows"):b&&(o.linux=e,o.osname="Linux"):(o.android=e,o.osname="Android");var x="";o.windows?x=function(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}(r(/Windows ((NT|XP)( \d\d?.\d)?)/i)):o.windowsphone?x=r(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):o.mac?x=(x=r(/Mac OS X (\d+([_\.\s]\d+)*)/i)).replace(/[_\s]/g,"."):a?x=(x=r(/os (\d+([_\s]\d+)*) like mac os x/i)).replace(/[_\s]/g,"."):s?x=r(/android[ \/-](\d+(\.\d+)*)/i):o.webos?x=r(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):o.blackberry?x=r(/rim\stablet\sos\s(\d+(\.\d+)*)/i):o.bada?x=r(/bada\/(\d+(\.\d+)*)/i):o.tizen&&(x=r(/tizen[\/\s](\d+(\.\d+)*)/i)),x&&(o.osversion=x);var k=!o.windows&&x.split(".")[0];return w||c||"ipad"==a||s&&(3==k||k>=4&&!O)||o.silk?o.tablet=e:(O||"iphone"==a||"ipod"==a||s||u||o.blackberry||o.webos||o.bada)&&(o.mobile=e),o.msedge||o.msie&&o.version>=10||o.yandexbrowser&&o.version>=15||o.vivaldi&&o.version>=1||o.chrome&&o.version>=20||o.samsungBrowser&&o.version>=4||o.whale&&1===i([o.version,"1.0"])||o.mzbrowser&&1===i([o.version,"6.0"])||o.focus&&1===i([o.version,"1.0"])||o.firefox&&o.version>=20||o.safari&&o.version>=6||o.opera&&o.version>=10||o.ios&&o.osversion&&o.osversion.split(".")[0]>=6||o.blackberry&&o.version>=10.1||o.chromium&&o.version>=20?o.a=e:o.msie&&o.version<10||o.chrome&&o.version<20||o.firefox&&o.version<20||o.safari&&o.version<6||o.opera&&o.version<10||o.ios&&o.osversion&&o.osversion.split(".")[0]<6||o.chromium&&o.version<20?o.c=e:o.x=e,o}var r=t("undefined"!=typeof navigator&&navigator.userAgent||"");function n(e){return e.split(".").length}function o(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r=0;){if(r[0][t]>r[1][t])return 1;if(r[0][t]!==r[1][t])return-1;if(0===t)return 0}}function a(e,n,o){var a=r;"string"==typeof n&&(o=n,n=void 0),void 0===n&&(n=!1),o&&(a=t(o));var s=""+a.version;for(var u in e)if(e.hasOwnProperty(u)&&a[u]){if("string"!=typeof e[u])throw new Error("Browser version in the minVersion map should be a string: "+u+": "+String(e));return i([s,e[u]])<0}return n}return r.test=function(e){for(var t=0;t=0&&"[object Array]"===Object.prototype.toString.call(e)};function d(e,t){return function(){var r=arguments.length;if(0===r)return t();var n=arguments[r-1];return p(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,r-1))}}function y(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function h(e){return function t(r){return 0===arguments.length||y(r)?t:e.apply(this,arguments)}}function m(e){return function t(r,n){switch(arguments.length){case 0:return t;case 1:return y(r)?t:h((function(t){return e(r,t)}));default:return y(r)&&y(n)?t:y(r)?h((function(t){return e(t,n)})):y(n)?h((function(t){return e(r,t)})):e(r,n)}}}var v=m(d("forEach",(function(e,t){for(var r=t.length,n=0;n0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))})),x=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();function k(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,r){return t.apply(this,arguments)};case 3:return function(e,r,n){return t.apply(this,arguments)};case 4:return function(e,r,n,o){return t.apply(this,arguments)};case 5:return function(e,r,n,o,i){return t.apply(this,arguments)};case 6:return function(e,r,n,o,i,a){return t.apply(this,arguments)};case 7:return function(e,r,n,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,r,n,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,r,n,o,i,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,r,n,o,i,a,s,u,c,f){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}var j=m((function(e,t){return k(e.length,(function(){return e.apply(t,arguments)}))}));function P(e,t,r){for(var n=r.next();!n.done;){if((t=e["@@transducer/step"](t,n.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=r.next()}return e["@@transducer/result"](t)}function E(e,t,r,n){return e["@@transducer/result"](r[n](j(e["@@transducer/step"],e),t))}var T="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function C(e,t,r){if("function"==typeof e&&(e=function(e){return new x(e)}(e)),S(r))return function(e,t,r){for(var n=0,o=r.length;n=0;)D(t=U[r],e)&&!W(n,t)&&(n[n.length]=t),r-=1;return n})):h((function(e){return Object(e)!==e?[]:Object.keys(e)})),z=m(g(["filter"],I,(function(e,t){return w(t)?C((function(r,n){return e(t[n])&&(r[n]=t[n]),r}),{},L(t)):_(e,t)})));function G(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function K(e,t,r){for(var n=0,o=r.length;n=0;){if(r[s]===e)return n[s]===t;s-=1}switch(a){case"Map":return e.size===t.size&&H(e.entries(),t.entries(),r.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&H(e.values(),t.values(),r.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=L(e);if(u.length!==L(t).length)return!1;var c=r.concat([e]),f=n.concat([t]);for(s=u.length-1;s>=0;){var l=u[s];if(!D(l,t)||!$(t[l],e[l],c,f))return!1;s-=1}return!0}var Y=m((function(e,t){return $(e,t,[],[])})),X=h((function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():p(e)?[]:O(e)?"":w(e)?{}:B(e)?function(){return arguments}():void 0})),Z=h((function(e){return null!=e&&Y(e,X(e))})),J=function(e){return{value:e,"fantasy-land/map":function(){return this}}},ee=m((function(e,t){return e(J)(t).value}));function te(e){return function t(r,n,o){switch(arguments.length){case 0:return t;case 1:return y(r)?t:m((function(t,n){return e(r,t,n)}));case 2:return y(r)&&y(n)?t:y(r)?m((function(t,r){return e(t,n,r)})):y(n)?m((function(t,n){return e(r,t,n)})):h((function(t){return e(r,n,t)}));default:return y(r)&&y(n)&&y(o)?t:y(r)&&y(n)?m((function(t,r){return e(t,r,o)})):y(r)&&y(o)?m((function(t,r){return e(t,n,r)})):y(n)&&y(o)?m((function(t,n){return e(r,t,n)})):y(r)?h((function(t){return e(t,n,o)})):y(n)?h((function(t){return e(r,t,o)})):y(o)?h((function(t){return e(r,n,t)})):e(r,n,o)}}}var re=Number.isInteger||function(e){return e<<0===e},ne=te((function(e,t,r){var n={};for(var o in r)n[o]=r[o];return n[e]=t,n})),oe=h((function(e){return null==e})),ie=te((function e(t,r,n){if(0===t.length)return r;var o=t[0];if(t.length>1){var i=!oe(n)&&D(o,n)?n[o]:re(t[1])?[]:{};r=e(Array.prototype.slice.call(t,1),r,i)}if(re(o)&&p(n)){var a=[].concat(n);return a[o]=r,a}return ne(o,r,n)}));function ae(e,t){for(var r=0,n=t.length,o=Array(n);r=arguments.length)?u=r[s]:(u=arguments[i],i+=1),o[s]=u,y(u)||(a-=1),s+=1}return a<=0?n.apply(this,o):k(a,e(t,o,n))}}(e,[],t))})),fe=m(g(["fantasy-land/map","map"],ue,(function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return ce(t.length,(function(){return e.call(this,t.apply(this,arguments))}));case"[object Object]":return C((function(r,n){return r[n]=e(t[n]),r}),{},L(t));default:return ae(e,t)}}))),le=m((function(e,t){return function(r){return function(n){return fe((function(e){return t(e,n)}),r(e(n)))}}})),pe=m((function(e,t){for(var r=t,n=0;n=0}function me(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var ve=function(e){return(e<10?"0":"")+e},be="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+ve(e.getUTCMonth()+1)+"-"+ve(e.getUTCDate())+"T"+ve(e.getUTCHours())+":"+ve(e.getUTCMinutes())+":"+ve(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};var ge=m((function(e,t){return z((r=e,function(){return!r.apply(this,arguments)}),t);var r}));var _e=h((function(e){return function e(t,r){var n=function(n){var o=r.concat([t]);return he(n,o)?"":e(n,o)},o=function(e,t){return ae((function(t){return me(t)+": "+n(e[t])}),t.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+ae(n,t).join(", ")+"))";case"[object Array]":return"["+ae(n,t).concat(o(t,ge((function(e){return/^\d+$/.test(e)}),L(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+n(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?n(NaN):me(be(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+n(t.valueOf())+")":1/t==-1/0?"-0":t.toString(10);case"[object String]":return"object"==typeof t?"new String("+n(t.valueOf())+")":me(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var i=t.toString();if("[object Object]"!==i)return i}return"{"+o(t,L(t)).join(", ")+"}"}}(e,[])})),we=m((function(e,t){if(p(e)){if(p(t))return e.concat(t);throw new TypeError(_e(t)+" is not an array")}if(O(e)){if(O(t))return e+t;throw new TypeError(_e(t)+" is not a string")}if(null!=e&&ye(e["fantasy-land/concat"]))return e["fantasy-land/concat"](t);if(null!=e&&ye(e.concat))return e.concat(t);throw new TypeError(_e(e)+' does not have a method named "concat" or "fantasy-land/concat"')})),Oe=m(he);function Se(e,t){var r;t=t||[];var n=(e=e||[]).length,o=t.length,i=[];for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(t.type===Ee("SET_LAYOUT"))return t.payload;if(Oe(t.type,["UNDO_PROP_CHANGE","REDO_PROP_CHANGE",Ee("ON_PROP_CHANGE")])){var r=xe("props",t.payload.itempath),n=ee(de(r),e),o=je(n,t.payload.props);return ie(r,o,e)}return e},Ce=r(15),Ae=m((function(e,t){if(0===e.length)return!1;for(var r=t,n=0;n0&&void 0!==arguments[0]?arguments[0]:Be,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"COMPUTE_GRAPHS":var r=t.payload,n=new Ce.DepGraph,o=new Ce.DepGraph;return r.forEach((function(e){var t,r=e.output,i=e.inputs;"Object"===Q(r)?t="".concat(r.id,".").concat(r.property):(t=r,De(r)?Ne(r).forEach((function(e){o.addNode(e),i.forEach((function(t){var r="".concat(t.id,".").concat(t.property);o.hasNode(r)||o.addNode(r),o.addDependency(r,e)}))})):(o.addNode(r),i.forEach((function(e){var t="".concat(e.id,".").concat(e.property);o.hasNode(t)||o.addNode(t),o.addDependency(t,r)})))),i.forEach((function(e){var r="".concat(e.id,".").concat(e.property);n.addNode(t),n.hasNode(r)||n.addNode(r),n.addDependency(r,t)}))})),{InputGraph:n,MultiGraph:o};default:return e}},Ue=te(C),qe=h((function(e){return ce(e.length,(function(t,r){var n=Array.prototype.slice.call(arguments,0);return n[0]=r,n[1]=t,e.apply(this,n)}))})),We=m((function(e,t){return t>e?t:e})),Le=m((function(e,t){return pe([e],t)})),ze=m((function(e,t){return fe(Le(e),t)})),Ge=h((function(e){return ce(Ue(We,0,ze("length",e)),(function(){for(var t=0,r=e.length;t2&&void 0!==arguments[2]?arguments[2]:[];if(r(t,n),tt(t)){var o=Ze(n,["props","children"]);Array.isArray(t.props.children)?t.props.children.forEach((function(t,n){e(t,r,xe(n,o))})):e(t.props.children,r,o)}else Ke(Array,t)&&t.forEach((function(t,o){e(t,r,xe(o,n))}))};var nt=m((function(e,t){for(var r={},n={},o=0,i=e.length;o0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ee("COMPUTE_PATHS"):var r,n=t.payload,o=n.subTree,i=n.startingPath,a=e;if(oe(e)&&(a={}),Z(i))r=je({},a);else{var s=z((function(e){return Y(i,Qe(0,i.length,a[e]))}),L(a));r=nt(s,a)}return rt(o,(function(e,t){et(e)&&(r[e.props.id]=we(i,t))})),r;default:return e}};function it(e,t,r,n){var o,i=function(o){for(var i=t.length,a=0;a0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_REQUEST_QUEUE":return at(t.payload);default:return e}};function ut(e){var t={STARTED:"STARTED",HYDRATED:"HYDRATED"};if(t[e])return t[e];throw new Error("".concat(e," is not a valid app state."))}var ct=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ut("STARTED"),t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ee("SET_APP_LIFECYCLE"):return ut(t.payload);default:return e}};function ft(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:lt;switch((arguments.length>1?arguments[1]:void 0).type){case"UNDO":var t=e.past,r=e.present,n=e.future,o=t[t.length-1];return{past:t.slice(0,t.length-1),present:o,future:[r].concat(ft(n))};case"REDO":var i=e.past,a=e.present,s=e.future,u=s[0],c=s.slice(1);return{past:[].concat(ft(i),[a]),present:u,future:c};case"REVERT":var f=e.past,l=e.future,p=f[f.length-1];return{past:f.slice(0,f.length-1),present:p,future:ft(l)};default:return e}};function dt(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:yt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ON_ERROR":return"frontEnd"===t.payload.type?{frontEnd:[je(t.payload,{timestamp:new Date})].concat(dt(e.frontEnd)),backEnd:e.backEnd}:"backEnd"===t.payload.type?{frontEnd:e.frontEnd,backEnd:[je(t.payload,{timestamp:new Date})].concat(dt(e.backEnd))}:e;default:return e}}var mt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{request_pre:null,request_post:null,bear:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_HOOKS":return t.payload;default:return e}};function vt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return t.type===Ee("SET_CONFIG")?t.payload:e}function bt(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e;if(t.type===r){var o=t.payload,i=o.id,a=o.status,s=o.content,u={status:a,content:s};n=Array.isArray(i)?ie(i,u,e):i?ne(i,u,e):je(e,u)}return n})}),_t),Object(u.combineReducers)(e)}function Ot(e,t,r){var n,o=r.graphs,i=r.layout,a=r.paths,s=o.InputGraph,u=z(Y(e),a);if(!Z(u)){var c=L(u)[0];n={id:c,props:{}},L(t).forEach((function(e){var t="".concat(c,".").concat(e);s.hasNode(t)&&s.dependenciesOf(t).length>0&&(n.props[e]=ee(de(we(a[c],["props",e])),i))}))}return n}function St(){return function(e){return function(t,r){var n=t||{},o=n.history,i=n.config,a=n.hooks,s=t;return"RELOAD"===r.type?s={history:o,config:i,hooks:a}:"SET_CONFIG"===r.type&&(s={hooks:a}),e(s,r)}}((e=wt(),function(t,r){if("ON_PROP_CHANGE"===r.type){var n=r.payload,o=Ot(n.itempath,n.props,t);o&&!Z(o.props)&&(t.history.present=o)}var i=e(t,r);if("ON_PROP_CHANGE"===r.type&&"response"!==r.payload.source){var a=r.payload,s=Ot(a.itempath,a.props,i);s&&!Z(s.props)&&(i.history={past:[].concat(bt(i.history.past),[t.history.present]),present:s,future:[]})}return i}));var e}var xt=function(e){if(gt&&!e)return gt;var t=St();return gt=Object(u.createStore)(t,Object(u.applyMiddleware)(l)),e||(window.store=gt),gt},kt=r(1),jt=r.n(kt),Pt={resolve:function(e){var t=e.type,r=e.namespace,n=window[r];if(n){if(n[t])return n[t];throw new Error("Component ".concat(t," not found in ").concat(r))}throw new Error("".concat(r," was not found."))}};var Et=h((function(e){var t,r=[];for(t in e)r[r.length]=t;return r})),Tt=m((function(e,t){for(var r={},n=0;nt.length?(r=e,n=t):(r=t,n=e),Gt(_(qe(he)(r),n))})),Vt=function(){function e(e,t){this.xf=t,this.f=e,this.idx=-1,this.found=!1}return e.prototype["@@transducer/init"]=A,e.prototype["@@transducer/result"]=function(e){return this.found||(e=this.xf["@@transducer/step"](e,-1)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.idx+=1,this.f(t)&&(this.found=!0,e=It(this.xf["@@transducer/step"](e,this.idx))),e},e}(),Qt=m(g([],m((function(e,t){return new Vt(e,t)})),(function(e,t){for(var r=0,n=t.length;r=r.length||e<-r.length)return r;var n=(e<0?r.length:0)+e,o=Se(r);return o[n]=t(r[n]),o})),Yt=m((function(e,t){return ke({},t,e)})),Xt=te((function(e,t,r){var n,o={};for(n in t)D(n,t)&&(o[n]=D(n,r)?e(n,t[n],r[n]):t[n]);for(n in r)D(n,r)&&!D(n,o)&&(o[n]=r[n]);return o})),Zt=te((function e(t,r,n){return Xt((function(r,n,o){return w(n)&&w(o)?e(t,n,o):t(r,n,o)}),r,n)})),Jt=m((function(e,t){return Zt((function(e,t,r){return r}),e,t)})),er=function(){function e(e,t){this.xf=t,this.f=e,this.idx=-1,this.lastIdx=-1}return e.prototype["@@transducer/init"]=A,e.prototype["@@transducer/result"]=function(e){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](e,this.lastIdx))},e.prototype["@@transducer/step"]=function(e,t){return this.idx+=1,this.f(t)&&(this.lastIdx=this.idx),e},e}(),tr=m(g([],m((function(e,t){return new er(e,t)})),(function(e,t){for(var r=t.length-1;r>=0;){if(e(t[r]))return r;r-=1}return-1}))),rr=r(4),nr=r(28),or=r.n(nr),ir={OK:200,PREVENT_UPDATE:204,CLIENTSIDE_ERROR:"CLIENTSIDE_ERROR"},ar=h((function(e){return function(){return e}})),sr=function(e){return{value:e,map:function(t){return sr(t(e))}}},ur=te((function(e,t,r){return e((function(e){return sr(t(e))}))(r).value})),cr=te((function(e,t,r){return ur(e,ar(t),r)})),fr=r(10),lr=r.n(fr);function pr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function dr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yr(e,t){for(var r=0;r0&&0===n.dependantsOf(e).length&&Re(r,t().paths)&&a.push(e)})),en(a,n).forEach((function(r){var n=Fr(r.input.split("."),2),o=n[0],i=n[1],a=de(we(t().paths[o],["props",i])),s=ee(a,t().layout);e(tn({id:o,props:Br({},i,s),excludedOutputs:r.excludedOutputs}))}))}(e,t),e(zr(ut("HYDRATED")))}}function $r(){return{"X-CSRFToken":or.a.parse(document.cookie)._csrf_token}}var Yr=Object(rr.createAction)("UNDO")();var Xr=Object(rr.createAction)("REVERT")();function Zr(){return Jr(Xr)}function Jr(e){return function(t,r){var n=r().history;t(e);var o=n.past[n.past.length-1];t(Object(rr.createAction)("UNDO_PROP_CHANGE")({itempath:r().paths[o.id],props:o.props})),t(tn({id:o.id,props:o.props}))}}function en(e,t){var r=e.map((function(e){return{input:e,outputs:t.dependenciesOf(e),excludedOutputs:[]}})),n=Bt((function(e,t){return t.outputs.length-e.outputs.length}),r);return n.forEach((function(e,t){var r=Ut(ze("outputs",Qe(0,t,n)));e.outputs.forEach((function(t){Oe(t,r)&&e.excludedOutputs.push(t)}))})),n}function tn(e){return function(t,r){var n,o,i,a,s,u,c,f,l,p,d,y,h,m,v,b,g,_,w,O,S;return regeneratorRuntime.async((function(x){for(;;)switch(x.prev=x.next){case 0:if(n=e.id,o=e.props,i=e.excludedOutputs,a=r(),s=a.dependenciesRequest,u=a.graphs,c=a.layout,f=a.paths,l=a.requestQueue,p=u.InputGraph,d=[],(y=L(o)).forEach((function(e){var t="".concat(n,".").concat(e);p.hasNode(t)&&p.dependenciesOf(t).forEach((function(e){Oe(e,d)||d.push(e)}))})),i&&(d=ge(qe(Oe)(i),d)),!Z(d)){x.next=9;break}return x.abrupt("return");case 9:return h=p.overallOrder(),d=Bt((function(e,t){return h.indexOf(t)-h.indexOf(e)}),d),m=[],d.forEach((function(e){var t;t=De(e)?Ne(e).map((function(e){return e.split(".")[0]})):[e.split(".")[0]];var n=p.dependantsOf(e),o=Kt(m,n),i=Nt((function(e){return Oe(e.controllerId,n)&&"loading"===e.status}),l);0===o.length&&Nt((function(e){return Re(e,r().paths)}))(t)&&!i&&m.push(e)})),v=m.map((function(e){return s.content.find((function(t){return t.output===e}))})),b=Gt(Ut(v.map((function(e){return[e.inputs.map((function(e){return e.id})),e.state.map((function(e){return e.id}))]})))),x.next=17,regeneratorRuntime.awrap(Dr(c,f,b));case 17:for(g=m.map((function(e){return{controllerId:e,status:"loading",uid:Ie(),requestTime:Date.now()}})),t(qr(we(l,g))),_=[],w=0;w=i}));n(qr(u))}},y=Fr(e.split("."),2),h=y[0],m=(y[1],{output:e,changedPropIds:o}),b=c.content.find((function(t){return t.output===e})),g=b.inputs,_=b.state,w=b.clientside_function,O=L(t().paths);m.inputs=g.map((function(e){if(!Oe(e.id,O))throw new ReferenceError("An invalid input object was used in an `Input` of a Dash callback. The id of this object is `"+e.id+"` and the property is `"+e.property+"`. The list of ids in the current layout is `["+O.join(", ")+"]`");var r=de(we(t().paths[e.id],["props",e.property]));return{id:e.id,property:e.property,value:ee(r,s)}}));var S=g.map((function(e){return"".concat(e.id,".").concat(e.property)}));function x(e,r){var o=t(),i=o.layout,a=o.paths[e];if(!a)return!1;var s=Ar({props:function(e,t,r){var n=Cr(e),o=n.canPersist,i=n.id,a=n.props,s=n.persistence,u=n.persisted_props,c=n.persistence_type,f=n.element,l=function(e,r){return e in t?t[e]:r},p=l("persistence",s);if(!o||!s&&!p)return t;var d=l("persistence_type",c),y=l("persisted_props",u),h=p!==s||d!==c||y!==u,m=function(e){return!(e.split(".")[0]in t)},b={},g=a;if(h&&s){var _=jr(c,r);v((function(e){return Mr(Tr(i,e,s),_,f,a,e,b,Rr)}),z(m,u)),g=je(a,b)}if(p){var w=jr(d,r);h&&v((function(e){return Mr(Tr(i,e,p),w,f,g,e,b)}),z(m,y));var O=f.persistenceTransforms||{};for(var S in t){var x=O[S];if(x)for(var k in x)w.removeItem(Tr(i,"".concat(S,".").concat(k),p));else w.removeItem(Tr(i,S,p))}}return h?je(t,b):t}(pe(a,i),r,n)},n).props;return n(Ur({itempath:a,props:s,source:"response"})),s}if(m.changedPropIds=o.filter((function(e){return Oe(e,S)})),_.length>0&&(m.state=_.map((function(e){if(!Oe(e.id,O))throw new ReferenceError("An invalid input object was used in a `State` object of a Dash callback. The id of this object is `"+e.id+"` and the property is `"+e.property+"`. The list of ids in the current layout is `["+O.join(", ")+"]`");var r=de(we(t().paths[e.id],["props",e.property]));return{id:e.id,property:e.property,value:ee(r,s)}}))),w){var k,j=function(e,t){var r=Fr(e.split("."),2),o=r[0],i=Br({},r[1],t);if(d(!1,ir.OK),t!==window.dash_clientside.no_update){var a=x(o,i);a&&n(tn({id:o,props:a}))}};window.dash_clientside||(window.dash_clientside={}),window.dash_clientside.no_update||(Object.defineProperty(window.dash_clientside,"no_update",{value:{description:"Return to prevent updating an Output."},writable:!1}),Object.defineProperty(window.dash_clientside,"PreventUpdate",{value:{description:"Throw to prevent updating all Outputs."},writable:!1}));try{var P;k=(P=window.dash_clientside[w.namespace])[w.function_name].apply(P,Nr(ze("value",m.inputs)).concat(Nr(Re("state",m)?ze("value",m.state):[])))}catch(e){return e===window.dash_clientside.PreventUpdate?void d(!0,ir.PREVENT_UPDATE):(console.error("The following error occurred while executing ".concat(w.namespace,".").concat(w.function_name," ")+'in order to update component "'.concat(m.output,'" ⋁⋁⋁')),console.error(e),void d(!0,ir.CLIENTSIDE_ERROR))}return"Promise"===Q(k)?(console.error("The clientside function "+"".concat(w.namespace,".").concat(w.function_name," ")+"returned a Promise instead of a value. Promises are not supported in Dash clientside right now, but may be in the future."),void d(!0,ir.CLIENTSIDE_ERROR)):void(De(m.output)?Ne(m.output).forEach((function(e,t){j(e,k[t])})):j(m.output,k))}return null!==f.request_pre&&f.request_pre(m),fetch("".concat(Me(a),"_dash-update-component"),Jt(a.fetch,{method:"POST",headers:$r(),body:JSON.stringify(m)})).then((function(r){var i=function(){return tr(Ht("controllerId",e),t().requestQueue)>p()};if(r.status!==ir.OK){if(d(!0,r.status),r.status===ir.PREVENT_UPDATE)return;throw r}i()?d(!0,r.status):r.json().then((function(a){if(i())d(!0,r.status);else{d(!1,r.status),null!==f.request_post&&f.request_post(m,a.response);var s=a.multi,u=function(e){var r=Fr(e,2),i=r[0],a=r[1],u=s?i:h,c=x(u,a);if(c&&(n(tn({id:u,props:c})),Re("children",c))){var f=c.children;if(n(Lr({subTree:f,startingPath:we(t().paths[u],["props","children"])})),Oe(Q(f),["Array","Object"])&&!Z(f)){var p={};rt(f,(function(e){(function(e){return"Object"===Q(e)&&Re("props",e)&&Re("id",e.props)})(e)&&L(e.props).forEach((function(t){var r="".concat(e.props.id,".").concat(t);Re(r,l.nodes)&&(p[r]={id:e.props.id,props:Br({},t,e.props[t])})}))}));var d=[];L(p).forEach((function(e){0===l.dependenciesOf(e).length&&0===Kt(l.dependantsOf(e),L(p)).length&&(d.push(e),delete p[e])}));var y=en(L(p),l),m=l.overallOrder();Bt((function(e,t){return m.indexOf(e.input)-m.indexOf(t.input)}),y).forEach((function(e){var t=p[e.input];t.excludedOutputs=e.excludedOutputs,n(tn(t))})),d.forEach((function(e){var r=Ie();n(qr(xe({controllerId:null,status:"loading",uid:r,requestTime:Date.now()},t().requestQueue))),rn(e,t,r,n,o)}))}}};s?Object.entries(a.response).forEach(u):u([e,a.response.props])}}))})).catch((function(e){nn(e,"Callback error updating ".concat(De(m.output)?Ne(m.output).join(", "):m.output),n)}))}function nn(e,t,r){(e&&"function"==typeof e.text?e.text():Promise.resolve(e)).then((function(e){r(Qr({type:"backEnd",error:{message:t,html:e}}))}))}var on=["String","Number","Null","Boolean"],an=function(e){return Oe(Q(e),on)},sn=function(){function e(e,t){for(var r=0;r-1&&t._listeners.splice(r,1)}}}},{key:"addCSS",value:function(e){var t=this;return this._cssSet[e]||(this._cssSet[e]=!0,this._emitChange()),{remove:function(){delete t._cssSet[e],t._emitChange()}}}},{key:"getCSS",value:function(){return Object.keys(this._cssSet).join("\n")}},{key:"_emitChange",value:function(){this._listeners.forEach((function(e){return e()}))}}]),e}(),cn={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};function fn(e,t){return!cn[e]&&"number"==typeof t&&0!==t?t+"px":t}function ln(e,t){return Object.keys(e).reduce((function(r,n){return r[n]=t(e[n],n),r}),{})}function pn(e){return ln(e,(function(t,r){return fn(r,e[r])+" !important"}))}var dn=r(12),yn=r(7);function hn(e,t,r){if(!t)return"";var n,o=ln(t,(function(e,t){return fn(t,e)})),i=Object(yn.b)(o,r),a=Object(dn.b)(i);return e+"{"+(n=a,Object.keys(n).map((function(e){return e+": "+n[e]+";"})).join("\n"))+"}"}var mn=function(e){return null==e?"main":e.toString()},vn=function(e,t,r){var n=mn(t);return!!e&&!!e._radiumStyleState&&!!e._radiumStyleState[n]&&e._radiumStyleState[n][r]},bn=function(e){return"string"==typeof e.ref?e.ref:e.key},gn=function(e){return e._lastRadiumState||e.state&&e.state._radiumStyleState||{}};function _n(e){if(!e)return"";for(var t=5381,r=e.length-1;r;)t=33*t^e.charCodeAt(r),r-=1;return(t>>>0).toString(16)}var wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function On(e){return e&&e.constructor===Object&&e.toString===Object.prototype.toString}function Sn(e){var t={};return e.forEach((function(e){e&&"object"===(void 0===e?"undefined":wn(e))&&(Array.isArray(e)&&(e=Sn(e)),Object.keys(e).forEach((function(r){if(On(e[r])&&On(t[r])){if(0===r.indexOf("@media"))for(var n=r;;)if(!t[n+=" "])return void(t[n]=e[r]);t[r]=Sn([t[r],e[r]])}else t[r]=e[r]})))})),t}Object.assign,"function"==typeof Symbol&&Symbol.iterator;var xn=function(){};var kn=function(e){var t=e.style,r=e.mergeStyles;return{style:Array.isArray(t)?r(t):t}};var jn=[],Pn=!1;function En(){jn.forEach((function(e){e()}))}var Tn=function(e){return-1===jn.indexOf(e)&&jn.push(e),Pn||(window.addEventListener("mouseup",En),Pn=!0),{remove:function(){var t=jn.indexOf(e);jn.splice(t,1),0===jn.length&&Pn&&(window.removeEventListener("mouseup",En),Pn=!1)}}},Cn=function(e){return":hover"===e||":active"===e||":focus"===e},An=function(e){var t=e.ExecutionEnvironment,r=e.getComponentField,n=e.getState,o=e.mergeStyles,i=e.props,a=e.setState,s=e.style,u={},c={};if(s[":hover"]){var f=i.onMouseEnter;c.onMouseEnter=function(e){f&&f(e),a(":hover",!0)};var l=i.onMouseLeave;c.onMouseLeave=function(e){l&&l(e),a(":hover",!1)}}if(s[":active"]){var p=i.onMouseDown;c.onMouseDown=function(e){p&&p(e),u._lastMouseDown=Date.now(),a(":active","viamousedown")};var d=i.onKeyDown;c.onKeyDown=function(e){d&&d(e)," "!==e.key&&"Enter"!==e.key||a(":active","viakeydown")};var y=i.onKeyUp;c.onKeyUp=function(e){y&&y(e)," "!==e.key&&"Enter"!==e.key||a(":active",!1)}}if(s[":focus"]){var h=i.onFocus;c.onFocus=function(e){h&&h(e),a(":focus",!0)};var m=i.onBlur;c.onBlur=function(e){m&&m(e),a(":focus",!1)}}s[":active"]&&!r("_radiumMouseUpListener")&&t.canUseEventListeners&&(u._radiumMouseUpListener=Tn((function(){Object.keys(r("state")._radiumStyleState).forEach((function(e){"viamousedown"===n(":active",e)&&a(":active",!1,e)}))})));var v=i.disabled?[s[":disabled"]]:Object.keys(s).filter((function(e){return Cn(e)&&n(e)})).map((function(e){return s[e]})),b=o([s].concat(v));return b=Object.keys(b).reduce((function(e,t){return Cn(t)||":disabled"===t||(e[t]=b[t]),e}),{}),{componentFields:u,props:c,style:b}},Rn=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:qn,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments[5];if(!i){var a=gn(e);i=Object.keys(a).reduce((function(e,t){return"main"!==t&&(e[t]=!0),e}),{})}if(!t||t.props&&t.props["data-radium"]||o&&!zn(t))return{extraStateKeyMap:i,element:t};var s=Gn({children:t.props.children,component:e,config:r,existingKeyMap:n,extraStateKeyMap:i}),u=Kn({component:e,config:r,existingKeyMap:n,extraStateKeyMap:i,props:t.props});if(u=Vn({component:e,config:r,existingKeyMap:n,props:u,renderedElement:t}),s===t.props.children&&u===t.props)return{extraStateKeyMap:i,element:t};var c=Qn(t,u!==t.props?u:{},s);return{extraStateKeyMap:i,element:c}},Yn=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0},Xn=function(){function e(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};if("function"!=typeof e){var i=Zn({},o,e);return function(e){return io(e,i)}}var a=e,s=a;(function(e){return"function"==typeof e&&/^\s*class\s+/.test(e.toString())})(s)&&(s=function(e){function t(){return oo(new(Function.prototype.bind.apply(e,[null].concat(Array.prototype.slice.call(arguments)))),this),this}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":Jn(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(s)),function(e){return!(e.render||e.prototype&&e.prototype.render)}(s)&&((s=function(e){function t(){return eo(this,t),to(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ro(t,e),Xn(t,[{key:"render",value:function(){return a(this.props,this.context)}}]),t}(n.Component)).displayName=a.displayName||a.name);var u=(r=t=function(e){function t(){eo(this,t);var e=to(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.state=e.state||{},e.state._radiumStyleState={},e._radiumIsMounted=!0,e}return ro(t,e),Xn(t,[{key:"componentWillUnmount",value:function(){Yn(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this)&&Yn(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this),this._radiumIsMounted=!1,this._radiumMouseUpListener&&this._radiumMouseUpListener.remove(),this._radiumMediaQueryListenersByQuery&&Object.keys(this._radiumMediaQueryListenersByQuery).forEach((function(e){this._radiumMediaQueryListenersByQuery[e].remove()}),this)}},{key:"getChildContext",value:function(){var e=Yn(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getChildContext",this)?Yn(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getChildContext",this).call(this):{};if(!this.props.radiumConfig)return e;var r=Zn({},e);return this.props.radiumConfig&&(r._radiumConfig=this.props.radiumConfig),r}},{key:"render",value:function(){var e=Yn(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this),r=this.props.radiumConfig||this.context._radiumConfig||o;o&&r!==o&&(r=Zn({},o,r));var n=$n(this,e,r),i=n.extraStateKeyMap,a=n.element;return this._extraRadiumStateKeys=Object.keys(i),a}},{key:"componentDidUpdate",value:function(e,r){if(Yn(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidUpdate",this)&&Yn(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidUpdate",this).call(this,e,r),this._extraRadiumStateKeys.length>0){var n=this._extraRadiumStateKeys.reduce((function(e,t){e[t];return function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,[t])}),gn(this));this._lastRadiumState=n,this.setState({_radiumStyleState:n})}}}]),t}(s),t._isRadiumEnhanced=!0,r);return oo(a,u),u.propTypes&&u.propTypes.style&&(u.propTypes=Zn({},u.propTypes,{style:jt.a.oneOfType([jt.a.array,jt.a.object])})),u.displayName=a.displayName||a.name||"Component",u.contextTypes=Zn({},u.contextTypes,{_radiumConfig:jt.a.object,_radiumStyleKeeper:jt.a.instanceOf(un)}),u.childContextTypes=Zn({},u.childContextTypes,{_radiumConfig:jt.a.object,_radiumStyleKeeper:jt.a.instanceOf(un)}),u}var ao,so,uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},co=function(){function e(e,t){for(var r=0;r=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["radiumConfig"]));return o.a.createElement("div",t,this.props.children,o.a.createElement(ho,null))}}]),t}(n.PureComponent);bo.contextTypes={_radiumConfig:jt.a.object,_radiumStyleKeeper:jt.a.instanceOf(un)},bo.childContextTypes={_radiumStyleKeeper:jt.a.instanceOf(un)};var go=bo=io(bo);function _o(e){return io(e)}_o.Plugins=Dn,_o.Style=po,_o.StyleRoot=go,_o.getState=vn,_o.keyframes=function(e,t){return{__radiumKeyframes:!0,__process:function(r){var n=Object(yn.a)(r),o=Object.keys(e).map((function(t){return hn(t,e[t],r)})).join("\n"),i=(t?t+"-":"")+"radium-animation-"+_n(o);return{css:"@"+n+" "+i+" {\n"+o+"\n}\n",animationName:i}}}};var wo=_o;function Oo(e){return(Oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function So(e,t){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return fetch(e,Jt(t,{method:"POST",headers:$r(),body:r?JSON.stringify(r):null}))}};function ei(e,t,r,n,o){return function(i,a){var s=a().config,u="".concat(Me(s)).concat(e);return i({type:r,payload:{id:n,status:"loading"}}),Jo[t](u,s.fetch,o).then((function(e){var t=e.headers.get("content-type");return t&&-1!==t.indexOf("application/json")?e.json().then((function(t){return i({type:r,payload:{status:e.status,content:t,id:n}}),t})):i({type:r,payload:{id:n,status:e.status}})})).catch((function(t){nn(t,"Error from API call: "+e,i)}))}}function ti(e){return(ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ri(e,t){for(var r=0;r0?i:null,r.future.length>0?a:null))}vi.propTypes={history:jt.a.object,dispatch:jt.a.func};var bi=Object(s.connect)((function(e){return{history:e.history}}),(function(e){return{dispatch:e}}))(wo(vi)),gi=h((function(e){return function(t,r){return e(t,r)?-1:e(r,t)?1:0}})),_i=m((function(e,t){return e0){var y=document.createElement("link");y.href="".concat(f.url,"?m=").concat(f.modified),y.type="text/css",y.rel="stylesheet",this._head.appendChild(y)}}}catch(e){a=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw s}}o||window.top.location.reload()}else 500===r.status&&(this._retry>this.state.max_retry&&(this.clearInterval(),window.alert("\n Reloader failed after ".concat(this._retry," times.\n Please check your application for errors.\n "))),this._retry++)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.dispatch,r=e.reloadRequest,n=this.state,o=n.disabled,i=n.interval;if(!o&&!this.state.intervalId){var a=window.setInterval((function(){"loading"!==r.status&&t(ei("_reload-hash","GET","reloadRequest"))}),i);this.setState({intervalId:a})}}},{key:"componentWillUnmount",value:function(){!this.state.disabled&&this.state.intervalId&&this.clearInterval()}},{key:"render",value:function(){return null}}])&&Oi(r.prototype,n),o&&Oi(r,o),t}(o.a.Component);ji.defaultProps={},ji.propTypes={id:jt.a.string,config:jt.a.object,reloadRequest:jt.a.object,dispatch:jt.a.func,interval:jt.a.number};var Pi=Object(s.connect)((function(e){return{config:e.config,reloadRequest:e.reloadRequest}}),(function(e){return{dispatch:e}}))(ji);function Ei(e){return(Ei="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ti(e,t){for(var r=0;r { diff --git a/dash-renderer/src/actions/index.js b/dash-renderer/src/actions/index.js index 029220af9c..c6c9b6c772 100644 --- a/dash-renderer/src/actions/index.js +++ b/dash-renderer/src/actions/index.js @@ -23,6 +23,7 @@ import { slice, sort, type, + uniq, view, } from 'ramda'; import {createAction} from 'redux-actions'; @@ -33,7 +34,8 @@ import cookie from 'cookie'; import {uid, urlBase, isMultiOutputProp, parseMultipleOutputs} from '../utils'; import {STATUS} from '../constants/constants'; import {applyPersistence, prunePersistence} from '../persistence'; -import setAppIsReady from './setAppReadyState'; + +import isAppReady from './isAppReady'; export const updateProps = createAction(getAction('ON_PROP_CHANGE')); export const setRequestQueue = createAction(getAction('SET_REQUEST_QUEUE')); @@ -45,8 +47,6 @@ export const setHooks = createAction(getAction('SET_HOOKS')); export const setLayout = createAction(getAction('SET_LAYOUT')); export const onError = createAction(getAction('ON_ERROR')); -export {setAppIsReady}; - export function hydrateInitialOutputs() { return function(dispatch, getState) { triggerDefaultState(dispatch, getState); @@ -221,11 +221,13 @@ export function notifyObservers(payload) { return async function(dispatch, getState) { const {id, props, excludedOutputs} = payload; - const {graphs, isAppReady, requestQueue} = getState(); - - if (isAppReady !== true) { - await isAppReady; - } + const { + dependenciesRequest, + graphs, + layout, + paths, + requestQueue, + } = getState(); const {InputGraph} = graphs; /* @@ -365,6 +367,30 @@ export function notifyObservers(payload) { } }); + /** + * Determine the id of all components used as input or state in the callbacks + * triggered by the props change. + * + * Wait for all components associated to these ids to be ready before initiating + * the callbacks. + */ + const deps = queuedObservers.map(output => + dependenciesRequest.content.find( + dependency => dependency.output === output + ) + ); + + const ids = uniq( + flatten( + deps.map(dep => [ + dep.inputs.map(input => input.id), + dep.state.map(state => state.id), + ]) + ) + ); + + await isAppReady(layout, paths, ids); + /* * record the set of output IDs that will eventually need to be * updated in a queue. not all of these requests will be fired in this @@ -950,8 +976,6 @@ function updateOutput( ); }); } - - dispatch(setAppIsReady()); } }; if (multi) { diff --git a/dash-renderer/src/actions/isAppReady.js b/dash-renderer/src/actions/isAppReady.js new file mode 100644 index 0000000000..c83019da54 --- /dev/null +++ b/dash-renderer/src/actions/isAppReady.js @@ -0,0 +1,28 @@ +import {path} from 'ramda'; +import {isReady} from '@plotly/dash-component-plugins'; + +import Registry from '../registry'; + +export default (layout, paths, targets) => { + const promises = []; + targets.forEach(id => { + const pathOfId = paths[id]; + if (!pathOfId) { + return; + } + + const target = path(pathOfId, layout); + if (!target) { + return; + } + + const component = Registry.resolve(target); + const ready = isReady(component); + + if (ready && typeof ready.then === 'function') { + promises.push(ready); + } + }); + + return promises.length ? Promise.all(promises) : true; +}; diff --git a/dash-renderer/src/actions/setAppReadyState.js b/dash-renderer/src/actions/setAppReadyState.js deleted file mode 100644 index eeccacd8a9..0000000000 --- a/dash-renderer/src/actions/setAppReadyState.js +++ /dev/null @@ -1,77 +0,0 @@ -import {filter} from 'ramda'; -import {createAction} from 'redux-actions'; - -import isSimpleComponent from '../isSimpleComponent'; -import Registry from './../registry'; -import {getAction} from './constants'; -import {isReady} from '@plotly/dash-component-plugins'; - -const isAppReady = layout => { - const queue = [layout]; - - const res = {}; - - /* Would be much simpler if the Registry was aware of what it contained... */ - while (queue.length) { - const elementLayout = queue.shift(); - if (!elementLayout) { - continue; - } - - const children = elementLayout.props && elementLayout.props.children; - const namespace = elementLayout.namespace; - const type = elementLayout.type; - - res[namespace] = res[namespace] || {}; - res[namespace][type] = type; - - if (children) { - const filteredChildren = filter( - child => !isSimpleComponent(child), - Array.isArray(children) ? children : [children] - ); - - queue.push(...filteredChildren); - } - } - - const promises = []; - Object.entries(res).forEach(([namespace, item]) => { - Object.entries(item).forEach(([type]) => { - const component = Registry.resolve({ - namespace, - type, - }); - - const ready = isReady(component); - - if (ready && typeof ready.then === 'function') { - promises.push(ready); - } - }); - }); - - return promises.length ? Promise.all(promises) : true; -}; - -const setAction = createAction(getAction('SET_APP_READY')); - -export default () => async (dispatch, getState) => { - const ready = isAppReady(getState().layout); - - if (ready === true) { - /* All async is ready */ - dispatch(setAction(true)); - } else { - /* Waiting on async */ - dispatch(setAction(ready)); - await ready; - /** - * All known async is ready. - * - * Callbacks were blocked while waiting, we can safely - * assume that no update to layout happened to invalidate. - */ - dispatch(setAction(true)); - } -}; diff --git a/dash-renderer/src/reducers/isAppReady.js b/dash-renderer/src/reducers/isAppReady.js deleted file mode 100644 index 2dd86ece71..0000000000 --- a/dash-renderer/src/reducers/isAppReady.js +++ /dev/null @@ -1,8 +0,0 @@ -import {getAction} from '../actions/constants'; - -export default function config(state = false, action) { - if (action.type === getAction('SET_APP_READY')) { - return action.payload; - } - return state; -} diff --git a/dash-renderer/src/reducers/reducer.js b/dash-renderer/src/reducers/reducer.js index 22af71779b..1123134675 100644 --- a/dash-renderer/src/reducers/reducer.js +++ b/dash-renderer/src/reducers/reducer.js @@ -10,7 +10,6 @@ import { view, } from 'ramda'; import {combineReducers} from 'redux'; -import isAppReady from './isAppReady'; import layout from './layout'; import graphs from './dependencyGraph'; import paths from './paths'; @@ -32,7 +31,6 @@ export const apiRequests = [ function mainReducer() { const parts = { appLifecycle, - isAppReady, layout, graphs, paths, diff --git a/dash-renderer/tests/isAppReady.test.js b/dash-renderer/tests/isAppReady.test.js new file mode 100644 index 0000000000..a85ea81240 --- /dev/null +++ b/dash-renderer/tests/isAppReady.test.js @@ -0,0 +1,50 @@ +import isAppReady from "../src/actions/isAppReady"; + +const WAIT = 1000; + +describe('isAppReady', () => { + let resolve; + beforeEach(() => { + const promise = new Promise(r => { + resolve = r; + }); + + window.__components = { + a: { _dashprivate_isLazyComponentReady: promise }, + b: {} + }; + }); + + it('executes if app is ready', async () => { + let done = false; + Promise.resolve(isAppReady( + [{ namespace: '__components', type: 'b', props: { id: 'comp1' } }], + { comp1: [0] }, + ['comp1'] + )).then(() => { + done = true + }); + + await new Promise(r => setTimeout(r, WAIT)); + expect(done).toEqual(true); + }); + + it('waits on app to be ready', async () => { + let done = false; + Promise.resolve(isAppReady( + [{ namespace: '__components', type: 'a', props: { id: 'comp1' } }], + { comp1: [0] }, + ['comp1'] + )).then(() => { + done = true + }); + + await new Promise(r => setTimeout(r, WAIT)); + expect(done).toEqual(false); + + resolve(); + + await new Promise(r => setTimeout(r, WAIT)); + expect(done).toEqual(true); + }); +}); \ No newline at end of file diff --git a/dash-renderer/tests/notifyObservers.test.js b/dash-renderer/tests/notifyObservers.test.js deleted file mode 100644 index 3c023ab006..0000000000 --- a/dash-renderer/tests/notifyObservers.test.js +++ /dev/null @@ -1,66 +0,0 @@ -import { notifyObservers } from "../src/actions"; - -const WAIT = 1000; - -describe('notifyObservers', () => { - const thunk = notifyObservers({ - id: 'id', - props: {}, - undefined - }); - - it('executes if app is ready', async () => { - let done = false; - thunk( - () => { }, - () => ({ - graphs: { - InputGraph: { - hasNode: () => false, - dependenciesOf: () => [], - dependantsOf: () => [], - overallOrder: () => 0 - } - }, - isAppReady: true, - requestQueue: [] - }) - ).then(() => { done = true; }); - - await new Promise(r => setTimeout(r, 0)); - expect(done).toEqual(true); - }); - - it('waits on app to be ready', async () => { - let resolve; - const isAppReady = new Promise(r => { - resolve = r; - }); - - let done = false; - thunk( - () => { }, - () => ({ - graphs: { - InputGraph: { - hasNode: () => false, - dependenciesOf: () => [], - dependantsOf: () => [], - overallOrder: () => 0 - } - }, - isAppReady, - requestQueue: [] - }) - ).then(() => { done = true; }); - - await new Promise(r => setTimeout(r, WAIT)); - expect(done).toEqual(false); - - resolve(); - - await new Promise(r => setTimeout(r, WAIT)); - expect(done).toEqual(true); - }); - -}); \ No newline at end of file diff --git a/dash/dash.py b/dash/dash.py index 2f2c98e4d4..d509ea987c 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -307,6 +307,9 @@ def __init__( # list of dependencies self.callback_map = {} + # list of inline scripts + self._inline_scripts = [] + # index_string has special setter so can't go in config self._index_string = "" self.index_string = index_string @@ -636,6 +639,10 @@ def _generate_scripts_html(self): if isinstance(src, dict) else ''.format(src) for src in srcs + ] + + [ + ''.format(src) + for src in self._inline_scripts ] ) @@ -1194,13 +1201,14 @@ def clientside_callback( (JavaScript) function instead of a Python function. Unlike `@app.calllback`, `clientside_callback` is not a decorator: - it takes a + it takes either a `dash.dependencies.ClientsideFunction(namespace, function_name)` argument that describes which JavaScript function to call (Dash will look for the JavaScript function at - `window[namespace][function_name]`). + `window.dash_clientside[namespace][function_name]`), or it may take + a string argument that contains the clientside function source. - For example: + For example, when using a `dash.dependencies.ClientsideFunction`: ``` app.clientside_callback( ClientsideFunction('my_clientside_library', 'my_function'), @@ -1211,16 +1219,17 @@ def clientside_callback( ``` With this signature, Dash's front-end will call - `window.my_clientside_library.my_function` with the current - values of the `value` properties of the components - `my-input` and `another-input` whenever those values change. - - Include a JavaScript file by including it your `assets/` folder. - The file can be named anything but you'll need to assign the - function's namespace to the `window`. For example, this file might - look like: + `window.dash_clientside.my_clientside_library.my_function` with the + current values of the `value` properties of the components `my-input` + and `another-input` whenever those values change. + + Include a JavaScript file by including it your `assets/` folder. The + file can be named anything but you'll need to assign the function's + namespace to the `window.dash_clientside` namespace. For example, + this file might look: ``` - window.my_clientside_library = { + window.dash_clientside = window.dash_clientside || {}; + window.dash_clientside.my_clientside_library = { my_function: function(input_value_1, input_value_2) { return ( parseFloat(input_value_1, 10) + @@ -1229,10 +1238,54 @@ def clientside_callback( } } ``` + + Alternatively, you can pass the JavaScript source directly to + `clientside_callback`. In this case, the same example would look like: + ``` + app.clientside_callback( + ''' + function(input_value_1, input_value_2) { + return ( + parseFloat(input_value_1, 10) + + parseFloat(input_value_2, 10) + ); + } + ''', + Output('my-div' 'children'), + [Input('my-input', 'value'), + Input('another-input', 'value')] + ) + ``` """ self._validate_callback(output, inputs, state) callback_id = _create_callback_id(output) + # If JS source is explicitly given, create a namespace and function + # name, then inject the code. + if isinstance(clientside_function, str): + + out0 = output + if isinstance(output, (list, tuple)): + out0 = output[0] + + namespace = '_dashprivate_{}'.format(out0.component_id) + function_name = '{}'.format(out0.component_property) + + self._inline_scripts.append( + """ + var clientside = window.dash_clientside = window.dash_clientside || {{}}; + var ns = clientside["{0}"] = clientside["{0}"] || {{}}; + ns["{1}"] = {2}; + """.format(namespace.replace('"', '\\"'), + function_name.replace('"', '\\"'), + clientside_function) + ) + + # Callback is stored in an external asset. + else: + namespace = clientside_function.namespace + function_name = clientside_function.function_name + self.callback_map[callback_id] = { "inputs": [ {"id": c.component_id, "property": c.component_property} @@ -1243,8 +1296,8 @@ def clientside_callback( for c in state ], "clientside_function": { - "namespace": clientside_function.namespace, - "function_name": clientside_function.function_name, + "namespace": namespace, + "function_name": function_name, }, } diff --git a/dash/dependencies.py b/dash/dependencies.py index 314cf7db75..3d9b583c1a 100644 --- a/dash/dependencies.py +++ b/dash/dependencies.py @@ -36,6 +36,9 @@ class ClientsideFunction: # pylint: disable=too-few-public-methods def __init__(self, namespace=None, function_name=None): + if namespace.startswith('_dashprivate_'): + raise ValueError("Namespaces cannot start with '_dashprivate_'.") + if namespace in ['PreventUpdate', 'no_update']: raise ValueError('"{}" is a forbidden namespace in' ' dash_clientside.'.format(namespace)) diff --git a/dash/development/base_component.py b/dash/development/base_component.py index 070c4adc90..3318a76d86 100644 --- a/dash/development/base_component.py +++ b/dash/development/base_component.py @@ -94,6 +94,14 @@ def __init__(self, **kwargs): ", ".join(sorted(self._prop_names)) ) ) + + if k != "children" and isinstance(v, Component): + raise TypeError( + "Component detected as a prop other than `children`\n" + + "Did you forget to wrap multiple `children` in an array?\n" + + "Prop {} has value {}\n".format(k, repr(v)) + ) + setattr(self, k, v) def to_plotly_json(self): diff --git a/dash/testing/application_runners.py b/dash/testing/application_runners.py index 616ff03f53..c1b935372f 100644 --- a/dash/testing/application_runners.py +++ b/dash/testing/application_runners.py @@ -95,6 +95,7 @@ def __exit__(self, exc_type, exc_val, traceback): self.stop_timeout ) ) + logger.info("__exit__ complete") @property def url(self): @@ -231,6 +232,7 @@ def start( def stop(self): if self.proc: try: + logger.info("proc.terminate with pid %s", self.proc.pid) self.proc.terminate() if utils.PY3: # pylint:disable=no-member @@ -238,8 +240,9 @@ def stop(self): # pylint: disable=unexpected-keyword-arg self.proc.communicate(timeout=self.stop_timeout) else: - _except = OSError - self.proc.communicate() + _except = Exception + logger.info('ruthless kill the process to avoid zombie') + self.proc.kill() except _except: logger.exception( "subprocess terminate not success, trying to kill " @@ -247,6 +250,7 @@ def stop(self): ) self.proc.kill() self.proc.communicate() + logger.info('process stop completes!') class RRunner(ProcessRunner): diff --git a/dash/testing/browser.py b/dash/testing/browser.py index 44dba546bb..e89b894867 100644 --- a/dash/testing/browser.py +++ b/dash/testing/browser.py @@ -106,7 +106,12 @@ def __exit__(self, exc_type, exc_val, traceback): logger.exception("percy runner failed to finalize properly") def visit_and_snapshot( - self, resource_path, hook_id, wait_for_callbacks=True, assert_check=True + self, + resource_path, + hook_id, + wait_for_callbacks=True, + assert_check=True, + stay_on_page=False ): try: path = resource_path.lstrip("/") @@ -121,7 +126,8 @@ def visit_and_snapshot( assert not self.driver.find_elements_by_css_selector( "div.dash-debug-alert" ), "devtools should not raise an error alert" - self.driver.back() + if not stay_on_page: + self.driver.back() except WebDriverException as e: logger.exception("snapshot at resource %s error", path) raise e diff --git a/dash/testing/plugin.py b/dash/testing/plugin.py index 894cccad80..c42c36e9fb 100644 --- a/dash/testing/plugin.py +++ b/dash/testing/plugin.py @@ -1,11 +1,9 @@ # pylint: disable=missing-docstring,redefined-outer-name -import warnings +import pytest from .consts import SELENIUM_GRID_DEFAULT try: - import pytest - from dash.testing.application_runners import ( ThreadedRunner, ProcessRunner, @@ -14,9 +12,7 @@ from dash.testing.browser import Browser from dash.testing.composite import DashComposite, DashRComposite except ImportError: - warnings.warn("run `pip install dash[testing]` if you need dash.testing") - -WEBDRIVERS = {"Chrome", "Firefox"} + pass def pytest_addoption(parser): @@ -24,7 +20,7 @@ def pytest_addoption(parser): dash.addoption( "--webdriver", - choices=tuple(WEBDRIVERS), + choices=("Chrome", "Firefox"), default="Chrome", help="Name of the selenium driver to use", ) @@ -51,8 +47,8 @@ def pytest_addoption(parser): dash.addoption( "--percy-assets", action="store", - default='tests/assets', - help="configure how Percy will discover your app's assets" + default="tests/assets", + help="configure how Percy will discover your app's assets", ) dash.addoption( diff --git a/dash/version.py b/dash/version.py index bb64aa4720..0e1a38d3c2 100644 --- a/dash/version.py +++ b/dash/version.py @@ -1 +1 @@ -__version__ = '1.6.1' +__version__ = '1.7.0' diff --git a/requires-install.txt b/requires-install.txt index b9a4514f96..edecbff40b 100644 --- a/requires-install.txt +++ b/requires-install.txt @@ -1,8 +1,8 @@ Flask>=1.0.2 flask-compress plotly -dash_renderer==1.2.1 -dash-core-components==1.5.1 +dash_renderer==1.2.2 +dash-core-components==1.6.0 dash-html-components==1.0.2 dash-table==4.5.1 future \ No newline at end of file diff --git a/setup.py b/setup.py index 68557bb43b..c352eae627 100644 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ def read_req_file(req_type): long_description=io.open("README.md", encoding="utf-8").read(), long_description_content_type="text/markdown", install_requires=read_req_file("install"), + python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*", extras_require={ "dev": read_req_file("dev"), "testing": read_req_file("testing"), diff --git a/tests/integration/callbacks/test_basic_callback.py b/tests/integration/callbacks/test_basic_callback.py index c94d29dd1c..48fd53a7b6 100644 --- a/tests/integration/callbacks/test_basic_callback.py +++ b/tests/integration/callbacks/test_basic_callback.py @@ -4,8 +4,10 @@ import dash_core_components as dcc import dash_html_components as html +import dash_table import dash -from dash.dependencies import Input, Output +from dash.dependencies import Input, Output, State +from dash.exceptions import PreventUpdate def test_cbsc001_simple_callback(dash_duo): @@ -140,3 +142,35 @@ def update_input(value): dash_duo.percy_snapshot(name="callback-generating-function-2") assert dash_duo.get_logs() == [], "console is clean" + + +def test_cbsc003_callback_with_unloaded_async_component(dash_duo): + app = dash.Dash() + app.layout = html.Div( + children=[ + dcc.Tabs( + children=[ + dcc.Tab( + children=[ + html.Button(id="btn", children="Update Input"), + html.Div(id="output", children=["Hello"]), + ] + ), + dcc.Tab(children=dash_table.DataTable(id="other-table")), + ] + ) + ] + ) + + @app.callback(Output("output", "children"), [Input("btn", "n_clicks")]) + def update_graph(n_clicks): + if n_clicks is None: + raise PreventUpdate + + return "Bye" + + dash_duo.start_server(app) + + dash_duo.find_element('#btn').click() + assert dash_duo.find_element('#output').text == "Bye" + assert dash_duo.get_logs() == [] diff --git a/tests/integration/clientside/test_clientside.py b/tests/integration/clientside/test_clientside.py index 83d8057ecf..d610d18be9 100644 --- a/tests/integration/clientside/test_clientside.py +++ b/tests/integration/clientside/test_clientside.py @@ -262,7 +262,6 @@ def test_clsd005_clientside_fails_when_returning_a_promise(dash_duo): dash_duo.wait_for_text_to_equal("#side-effect", "side effect") dash_duo.wait_for_text_to_equal("#output", "output") - def test_clsd006_PreventUpdate(dash_duo): app = Dash(__name__, assets_folder="assets") @@ -307,7 +306,7 @@ def test_clsd006_PreventUpdate(dash_duo): dash_duo.wait_for_text_to_equal("#third", '3') -def test_clsd006_no_update(dash_duo): +def test_clsd007_no_update(dash_duo): app = Dash(__name__, assets_folder="assets") app.layout = html.Div( @@ -344,3 +343,45 @@ def test_clsd006_no_update(dash_duo): dash_duo.wait_for_text_to_equal("#first", '111') dash_duo.wait_for_text_to_equal("#second", '3') dash_duo.wait_for_text_to_equal("#third", '4') + +def test_clsd008_clientside_inline_source(dash_duo): + app = Dash(__name__, assets_folder="assets") + + app.layout = html.Div( + [ + dcc.Input(id="input"), + html.Div(id="output-clientside"), + html.Div(id="output-serverside"), + ] + ) + + @app.callback( + Output("output-serverside", "children"), [Input("input", "value")] + ) + def update_output(value): + return 'Server says "{}"'.format(value) + + app.clientside_callback( + """ + function (value) { + return 'Client says "' + value + '"'; + } + """, + Output("output-clientside", "children"), + [Input("input", "value")], + ) + + dash_duo.start_server(app) + + dash_duo.wait_for_text_to_equal("#output-serverside", 'Server says "None"') + dash_duo.wait_for_text_to_equal( + "#output-clientside", 'Client says "undefined"' + ) + + dash_duo.find_element("#input").send_keys("hello world") + dash_duo.wait_for_text_to_equal( + "#output-serverside", 'Server says "hello world"' + ) + dash_duo.wait_for_text_to_equal( + "#output-clientside", 'Client says "hello world"' + ) diff --git a/tests/integration/devtools/test_devtools_error_handling.py b/tests/integration/devtools/test_devtools_error_handling.py index e62fe31077..167ae4ee5b 100644 --- a/tests/integration/devtools/test_devtools_error_handling.py +++ b/tests/integration/devtools/test_devtools_error_handling.py @@ -186,6 +186,8 @@ def update_output(n_clicks): dev_tools_hot_reload=False, ) + dash_duo.wait_for_element('.js-plotly-plot .main-svg') + dash_duo.find_element("#button").click() dash_duo.wait_for_text_to_equal(dash_duo.devtools_error_count_locator, "1") dash_duo.percy_snapshot("devtools - validation exception - closed") diff --git a/tests/integration/test_render.py b/tests/integration/test_render.py index ea1915bc7f..04e4bbc3c2 100644 --- a/tests/integration/test_render.py +++ b/tests/integration/test_render.py @@ -972,11 +972,11 @@ def render_content(tab): )[0].click() graph_1_expected_clickdata = { - "points": [{"curveNumber": 0, "pointNumber": 1, "pointIndex": 1, "x": 2, "y": 10}] + "points": [{"curveNumber": 0, "pointNumber": 1, "pointIndex": 1, "x": 2, "y": 10, "label": 2, "value": 10}] } graph_2_expected_clickdata = { - "points": [{"curveNumber": 0, "pointNumber": 1, "pointIndex": 1, "x": 3, "y": 10}] + "points": [{"curveNumber": 0, "pointNumber": 1, "pointIndex": 1, "x": 3, "y": 10, "label": 3, "value": 10}] } self.wait_for_text_to_equal('#graph1_info', json.dumps(graph_1_expected_clickdata)) diff --git a/tests/unit/development/test_base_component.py b/tests/unit/development/test_base_component.py index a2984b65d4..6da20789e3 100644 --- a/tests/unit/development/test_base_component.py +++ b/tests/unit/development/test_base_component.py @@ -4,6 +4,7 @@ import pytest from dash.development.base_component import Component +import dash_html_components as html Component._prop_names = ("id", "a", "children", "style") Component._type = "TestComponent" @@ -36,23 +37,23 @@ def nested_tree(): return c, c1, c2, c3, c4, c5 -def test_init(): +def test_debc001_init(): Component(a=3) -def test_get_item_with_children(): +def test_debc002_get_item_with_children(): c1 = Component(id="1") c2 = Component(children=[c1]) assert c2["1"] == c1 -def test_get_item_with_children_as_component_instead_of_list(): +def test_debc003_get_item_with_children_as_component_instead_of_list(): c1 = Component(id="1") c2 = Component(id="2", children=c1) assert c2["1"] == c1 -def test_get_item_with_nested_children_one_branch(): +def test_debc004_get_item_with_nested_children_one_branch(): c1 = Component(id="1") c2 = Component(id="2", children=[c1]) c3 = Component(children=[c2]) @@ -61,7 +62,7 @@ def test_get_item_with_nested_children_one_branch(): assert c3["1"] == c1 -def test_get_item_with_nested_children_two_branches(): +def test_debc005_get_item_with_nested_children_two_branches(): c1 = Component(id="1") c2 = Component(id="2", children=[c1]) c3 = Component(id="3") @@ -75,7 +76,7 @@ def test_get_item_with_nested_children_two_branches(): assert c5["3"] == c3 -def test_get_item_with_nested_children_with_mixed_strings_and_without_lists(): +def test_debc006_get_item_with_full_tree(): c, c1, c2, c3, c4, c5 = nested_tree() keys = [k for k in c] @@ -90,7 +91,7 @@ def test_get_item_with_nested_children_with_mixed_strings_and_without_lists(): c["x"] -def test_len_with_nested_children_with_mixed_strings_and_without_lists(): +def test_debc007_len_with_full_tree(): c = nested_tree()[0] assert ( len(c) == 5 + 5 + 1 @@ -98,7 +99,7 @@ def test_len_with_nested_children_with_mixed_strings_and_without_lists(): components, 2 strings + 2 numbers + none in c2, and 1 string in c1" -def test_set_item_with_nested_children_with_mixed_strings_and_without_lists(): +def test_debc008_set_item_anywhere_in_tree(): keys = ["0.0", "0.1", "0.1.x", "0.1.x.x", "0.1.x.x.0"] c = nested_tree()[0] @@ -110,7 +111,7 @@ def test_set_item_with_nested_children_with_mixed_strings_and_without_lists(): assert c[new_id] == new_component -def test_del_item_with_nested_children_with_mixed_strings_and_without_lists(): +def test_debc009_del_item_full_tree(): c = nested_tree()[0] keys = reversed([k for k in c]) for key in keys: @@ -120,13 +121,13 @@ def test_del_item_with_nested_children_with_mixed_strings_and_without_lists(): c[key] -def test_traverse_with_nested_children_with_mixed_strings_and_without_lists(): +def test_debc010_traverse_full_tree(): c, c1, c2, c3, c4, c5 = nested_tree() elements = [i for i in c._traverse()] assert elements == c.children + [c3] + [c2] + c2.children -def test_traverse_with_tuples(): +def test_debc011_traverse_with_tuples(): c, c1, c2, c3, c4, c5 = nested_tree() c2.children = tuple(c2.children) c.children = tuple(c.children) @@ -134,7 +135,7 @@ def test_traverse_with_tuples(): assert elements == list(c.children) + [c3] + [c2] + list(c2.children) -def test_to_plotly_json_with_nested_children_with_mixed_strings_and_without_lists(): +def test_debc012_to_plotly_json_full_tree(): c = nested_tree()[0] Component._namespace Component._type @@ -194,7 +195,7 @@ def test_to_plotly_json_with_nested_children_with_mixed_strings_and_without_list assert res == expected -def test_get_item_raises_key_if_id_doesnt_exist(): +def test_debc013_get_item_raises_key_if_id_doesnt_exist(): c = Component() with pytest.raises(KeyError): c["1"] @@ -212,7 +213,7 @@ def test_get_item_raises_key_if_id_doesnt_exist(): c3["0"] -def test_set_item(): +def test_debc014_set_item(): c1a = Component(id="1", children="Hello world") c2 = Component(id="2", children=c1a) assert c2["1"] == c1a @@ -222,7 +223,7 @@ def test_set_item(): assert c2["1"] == c1b -def test_set_item_with_children_as_list(): +def test_debc015_set_item_with_children_as_list(): c1 = Component(id="1") c2 = Component(id="2", children=[c1]) assert c2["1"] == c1 @@ -231,7 +232,7 @@ def test_set_item_with_children_as_list(): assert c2["3"] == c3 -def test_set_item_with_nested_children(): +def test_debc016_set_item_with_nested_children(): c1 = Component(id="1") c2 = Component(id="2", children=[c1]) c3 = Component(id="3") @@ -256,14 +257,14 @@ def test_set_item_with_nested_children(): c5["1"] -def test_set_item_raises_key_error(): +def test_debc017_set_item_raises_key_error(): c1 = Component(id="1") c2 = Component(id="2", children=[c1]) with pytest.raises(KeyError): c2["3"] = Component(id="3") -def test_del_item_from_list(): +def test_debc018_del_item_from_list(): c1 = Component(id="1") c2 = Component(id="2") c3 = Component(id="3", children=[c1, c2]) @@ -280,7 +281,7 @@ def test_del_item_from_list(): assert c3.children == [] -def test_del_item_from_class(): +def test_debc019_del_item_from_class(): c1 = Component(id="1") c2 = Component(id="2", children=c1) assert c2["1"] == c1 @@ -291,7 +292,7 @@ def test_del_item_from_class(): assert c2.children is None -def test_to_plotly_json_without_children(): +def test_debc020_to_plotly_json_without_children(): c = Component(id="a") c._prop_names = ("id",) c._type = "MyComponent" @@ -303,7 +304,7 @@ def test_to_plotly_json_without_children(): } -def test_to_plotly_json_with_null_arguments(): +def test_debc021_to_plotly_json_with_null_arguments(): c = Component(id="a") c._prop_names = ("id", "style") c._type = "MyComponent" @@ -325,7 +326,7 @@ def test_to_plotly_json_with_null_arguments(): } -def test_to_plotly_json_with_children(): +def test_debc022_to_plotly_json_with_children(): c = Component(id="a", children="Hello World") c._prop_names = ("id", "children") c._type = "MyComponent" @@ -341,7 +342,7 @@ def test_to_plotly_json_with_children(): } -def test_to_plotly_json_with_wildcards(): +def test_debc023_to_plotly_json_with_wildcards(): c = Component( id="a", **{"aria-expanded": "true", "data-toggle": "toggled", "data-none": None} ) @@ -360,7 +361,7 @@ def test_to_plotly_json_with_wildcards(): } -def test_len(): +def test_debc024_len(): assert len(Component()) == 0 assert len(Component(children="Hello World")) == 1 assert len(Component(children=Component())) == 1 @@ -368,7 +369,7 @@ def test_len(): assert len(Component(children=[Component(children=Component()), Component()])) == 3 -def test_iter(): +def test_debc025_iter(): # The mixin methods from MutableMapping were cute but probably never # used - at least not by us. Test that they're gone @@ -418,3 +419,19 @@ def test_iter(): assert k in keys, "iteration produces key " + k assert len(keys) == len(keys2), "iteration produces no extra keys" + + +def test_debc026_component_not_children(): + children = [Component(id='a'), html.Div(id='b'), 'c', 1] + for i in range(len(children)): + # cycle through each component in each position + children = children[1:] + [children[0]] + + # use html.Div because only real components accept positional args + html.Div(children) + # the first arg is children, and a single component works there + html.Div(children[0], id='x') + + with pytest.raises(TypeError): + # If you forget the `[]` around children you get this: + html.Div(children[0], children[1], children[2], children[3])