diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 56bef8c..0000000 --- a/.npmignore +++ /dev/null @@ -1 +0,0 @@ -examples/ \ No newline at end of file diff --git a/dist/frux.js b/dist/frux.js index 1abb74b..907ccd6 100644 --- a/dist/frux.js +++ b/dist/frux.js @@ -54,9 +54,7 @@ return /******/ (function(modules) { // webpackBootstrap /* 0 */ /***/ function(module, exports, __webpack_require__) { - /* WEBPACK VAR INJECTION */(function(process) {/* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require("D:\\frux\\node_modules\\react-hot-api\\modules\\index.js"), RootInstanceProvider = require("D:\\frux\\node_modules\\react-hot-loader\\RootInstanceProvider.js"), ReactMount = require("react/lib/ReactMount"), React = require("react"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () { - - 'use strict'; + /* WEBPACK VAR INJECTION */(function(process) {'use strict'; Object.defineProperty(exports, "__esModule", { value: true @@ -270,8 +268,6 @@ return /******/ (function(modules) { // webpackBootstrap reset: reset, connect: connect }; - - /* REACT HOT LOADER */ }).call(this); } finally { if (false) { (function () { var foundReactClasses = module.hot.data && module.hot.data.foundReactClasses || false; if (module.exports && module.makeHot) { var makeExportsHot = require("D:\\frux\\node_modules\\react-hot-loader\\makeExportsHot.js"); if (makeExportsHot(module, require("react"))) { foundReactClasses = true; } var shouldAcceptModule = true && foundReactClasses; if (shouldAcceptModule) { module.hot.accept(function (err) { if (err) { console.error("Cannot not apply hot update to " + "frux.js" + ": " + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, @@ -10576,8 +10572,6 @@ return /******/ (function(modules) { // webpackBootstrap /* 105 */ /***/ function(module, exports, __webpack_require__) { - /* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require("D:\\frux\\node_modules\\react-hot-api\\modules\\index.js"), RootInstanceProvider = require("D:\\frux\\node_modules\\react-hot-loader\\RootInstanceProvider.js"), ReactMount = require("react/lib/ReactMount"), React = require("react"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () { - 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -10612,8 +10606,6 @@ return /******/ (function(modules) { // webpackBootstrap return (0, _fluxStandardAction.isFSA)(value); } - /* REACT HOT LOADER */ }).call(this); } finally { if (false) { (function () { var foundReactClasses = module.hot.data && module.hot.data.foundReactClasses || false; if (module.exports && module.makeHot) { var makeExportsHot = require("D:\\frux\\node_modules\\react-hot-loader\\makeExportsHot.js"); if (makeExportsHot(module, require("react"))) { foundReactClasses = true; } var shouldAcceptModule = true && foundReactClasses; if (shouldAcceptModule) { module.hot.accept(function (err) { if (err) { console.error("Cannot not apply hot update to " + "utils.js" + ": " + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } } - /***/ }, /* 106 */ /***/ function(module, exports, __webpack_require__) { @@ -11954,8 +11946,6 @@ return /******/ (function(modules) { // webpackBootstrap /* 121 */ /***/ function(module, exports, __webpack_require__) { - /* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require("D:\\frux\\node_modules\\react-hot-api\\modules\\index.js"), RootInstanceProvider = require("D:\\frux\\node_modules\\react-hot-loader\\RootInstanceProvider.js"), ReactMount = require("react/lib/ReactMount"), React = require("react"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () { - 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -12014,8 +12004,6 @@ return /******/ (function(modules) { // webpackBootstrap return new _nuclearJs.Store(spec); } - /* REACT HOT LOADER */ }).call(this); } finally { if (false) { (function () { var foundReactClasses = module.hot.data && module.hot.data.foundReactClasses || false; if (module.exports && module.makeHot) { var makeExportsHot = require("D:\\frux\\node_modules\\react-hot-loader\\makeExportsHot.js"); if (makeExportsHot(module, require("react"))) { foundReactClasses = true; } var shouldAcceptModule = true && foundReactClasses; if (shouldAcceptModule) { module.hot.accept(function (err) { if (err) { console.error("Cannot not apply hot update to " + "create-store.js" + ": " + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } } - /***/ }, /* 122 */ /***/ function(module, exports, __webpack_require__) { @@ -12470,8 +12458,6 @@ return /******/ (function(modules) { // webpackBootstrap /* 131 */ /***/ function(module, exports, __webpack_require__) { - /* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require("D:\\frux\\node_modules\\react-hot-api\\modules\\index.js"), RootInstanceProvider = require("D:\\frux\\node_modules\\react-hot-loader\\RootInstanceProvider.js"), ReactMount = require("react/lib/ReactMount"), React = require("react"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () { - 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -12512,8 +12498,6 @@ return /******/ (function(modules) { // webpackBootstrap }; } - /* REACT HOT LOADER */ }).call(this); } finally { if (false) { (function () { var foundReactClasses = module.hot.data && module.hot.data.foundReactClasses || false; if (module.exports && module.makeHot) { var makeExportsHot = require("D:\\frux\\node_modules\\react-hot-loader\\makeExportsHot.js"); if (makeExportsHot(module, require("react"))) { foundReactClasses = true; } var shouldAcceptModule = true && foundReactClasses; if (shouldAcceptModule) { module.hot.accept(function (err) { if (err) { console.error("Cannot not apply hot update to " + "create-module.js" + ": " + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } } - /***/ }, /* 132 */ /***/ function(module, exports, __webpack_require__) { diff --git a/dist/frux.min.js b/dist/frux.min.js index 175452d..37a617f 100644 --- a/dist/frux.min.js +++ b/dist/frux.min.js @@ -1,4 +1,4 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports.frux=e(require("react"),require("react-dom")):t.frux=e(t.React,t.ReactDOM)}(this,function(t,e){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){(function(t){try{(function(){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function o(t){var e=t.displayName||t.name,r=t.getDataBindings;return(0,S["default"])((0,O["default"])(r),e+" component should implement 'getDataBindings' static method"),(0,M.connect)(function(t){return r(R)})(t)}function u(e,r){var n=b["default"].createElement(M.Provider,{reactor:k},e);return(0,S["default"])(e,"frux#mount: No component was provided."),t.env.IS_REACT_NATIVE?n:void(0,m.render)(n,r||(0,z.createMountingNode)())}function a(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];e.forEach(function(t){(0,S["default"])((0,O["default"])(t),"Check your middlewares and make sure they are all functions."),T.push(t)}),console.log(T)}function s(t,e){var r={actions:q,getters:R};e(t,r,k)}function c(t){var e=t.options,r=i(t,["options"]);return k=new y.Reactor(e),(0,j["default"])(r,function(t,e){(0,O["default"])(t)&&s(e,t)}),{actions:q,getters:R}}function f(t){var e=t.type,r=t.payload;k.dispatch(e,r)}function h(t){k.batch(t)}function p(t){return k.evaluate(t)}function l(t,e){return k.observe(t,e),{unobserve:function(){k.unobserve(t,e)}}}function v(t){return"string"==typeof t&&t?k.evaluateToJS([t]):k.serialize()}function _(t){k.loadState(t)}function d(){k.reset()}Object.defineProperty(e,"__esModule",{value:!0}),e.isImmutable=e.toImmutable=e.toJS=e.isGetter=e.isKeyPath=e.Immutable=void 0,e.dispatch=f,e.batch=h,e.evaluate=p,e.observe=l,e.serialize=v,e.loadState=_,e.reset=d;var y=r(2);Object.defineProperty(e,"Immutable",{enumerable:!0,get:function(){return y.Immutable}}),Object.defineProperty(e,"isKeyPath",{enumerable:!0,get:function(){return y.isKeyPath}}),Object.defineProperty(e,"isGetter",{enumerable:!0,get:function(){return y.isGetter}}),Object.defineProperty(e,"toJS",{enumerable:!0,get:function(){return y.toJS}}),Object.defineProperty(e,"toImmutable",{enumerable:!0,get:function(){return y.toImmutable}}),Object.defineProperty(e,"isImmutable",{enumerable:!0,get:function(){return y.isImmutable}});var g=r(3),b=n(g),m=r(4),w=r(5),S=n(w),x=r(6),O=n(x),I=r(8),j=n(I),z=r(105),M=r(112),E=r(121),D=n(E),A=r(131),P=n(A),k=null,q={},R={},T=[];e["default"]={use:a,initialize:c,mount:u,registerModule:s,createModule:P["default"],createStore:D["default"],dispatch:f,batch:h,evaluate:p,observe:l,loadState:_,serialize:v,reset:d,connect:o}}).call(this)}finally{}}).call(e,r(1))},function(t,e){function r(){c=!1,u.length?s=u.concat(s):f=-1,s.length&&n()}function n(){if(!c){var t=setTimeout(r);c=!0;for(var e=s.length;e;){for(u=s,s=[];++f1)for(var r=1;ri;i++)n[i]=t[i+e];return n}function o(t){return void 0===t.size&&(t.size=t.__iterate(a)),t.size}function u(t,e){if("number"!=typeof e){var r=+e;if(""+r!==e)return NaN;e=r}return 0>e?o(t)+e:e}function a(){return!0}function s(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function c(t,e){return h(t,e,0)}function f(t,e){return h(t,e,e)}function h(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function p(t){return d(t)?t:E(t)}function l(t){return y(t)?t:D(t)}function v(t){return g(t)?t:A(t)}function _(t){return d(t)&&!b(t)?t:P(t)}function d(t){return!(!t||!t[vr])}function y(t){return!(!t||!t[_r])}function g(t){return!(!t||!t[dr])}function b(t){return y(t)||g(t)}function m(t){return!(!t||!t[yr])}function w(t){this.next=t}function S(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function x(){return{value:void 0,done:!0}}function O(t){return!!z(t)}function I(t){return t&&"function"==typeof t.next}function j(t){var e=z(t);return e&&e.call(t)}function z(t){var e=t&&(wr&&t[wr]||t[Sr]);return"function"==typeof e?e:void 0}function M(t){return t&&"number"==typeof t.length}function E(t){return null===t||void 0===t?K():d(t)?t.toSeq():L(t)}function D(t){return null===t||void 0===t?K().toKeyedSeq():d(t)?y(t)?t.toSeq():t.fromEntrySeq():C(t)}function A(t){return null===t||void 0===t?K():d(t)?y(t)?t.entrySeq():t.toIndexedSeq():F(t)}function P(t){return(null===t||void 0===t?K():d(t)?y(t)?t.entrySeq():t:F(t)).toSetSeq()}function k(t){this._array=t,this.size=t.length}function q(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function R(t){this._iterable=t,this.size=t.length||t.size}function T(t){this._iterator=t,this._iteratorCache=[]}function U(t){return!(!t||!t[Or])}function K(){return Ir||(Ir=new k([]))}function C(t){var e=Array.isArray(t)?new k(t).fromEntrySeq():I(t)?new T(t).fromEntrySeq():O(t)?new R(t).fromEntrySeq():"object"==typeof t?new q(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function F(t){var e=B(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function L(t){var e=B(t)||"object"==typeof t&&new q(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function B(t){return M(t)?new k(t):I(t)?new T(t):O(t)?new R(t):void 0}function N(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var a=i[r?o-u:u];if(e(a[1],n?a[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,r)}function W(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,u=0;return new w(function(){var t=i[r?o-u:u];return u++>o?x():S(e,n?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,r)}function J(){throw TypeError("Abstract")}function V(){}function G(){}function $(){}function H(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function Z(t,e){return e?Y(e,t,"",{"":t}):X(t)}function Y(t,e,r,n){return Array.isArray(e)?t.call(n,r,A(e).map(function(r,n){return Y(t,r,n,e)})):Q(e)?t.call(n,r,D(e).map(function(r,n){return Y(t,r,n,e)})):e}function X(t){return Array.isArray(t)?A(t).map(X).toList():Q(t)?D(t).map(X).toMap():t}function Q(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return tt(r)}return"string"===e?t.length>kr?rt(t):nt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function rt(t){var e=Tr[t];return void 0===e&&(e=nt(t),Rr===qr&&(Rr=0,Tr={}),Rr++,Tr[t]=e),e}function nt(t){for(var e=0,r=0;r0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ut(t,e){if(!t)throw new Error(e)}function at(t){ut(t!==1/0,"Cannot perform this action with an infinite size.")}function st(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function ht(t){this._iter=t,this.size=t.size}function pt(t){var e=kt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=qt,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===mr){var n=t.__iterator(e,r);return new w(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===br?gr:br,r)},e}function lt(t,e,r){var n=kt(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,hr);return o===hr?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,u){return n(e.call(r,t,i,u),i,o)!==!1},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(mr,i);return new w(function(){var i=o.next();if(i.done)return i;var u=i.value,a=u[0];return S(n,a,e.call(r,u[1],a,t),i)})},n}function vt(t,e){var r=kt(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=pt(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.includes=function(e){return t.includes(e)},r.cacheResult=qt,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function _t(t,e,r,n){var i=kt(t);return n&&(i.has=function(n){var i=t.get(n,hr);return i!==hr&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,hr);return o!==hr&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,a=0;return t.__iterate(function(t,o,s){return e.call(r,t,o,s)?(a++,i(t,n?o:a-1,u)):void 0},o),a},i.__iteratorUncached=function(i,o){var u=t.__iterator(mr,o),a=0;return new w(function(){for(;;){var o=u.next();if(o.done)return o;var s=o.value,c=s[0],f=s[1];if(e.call(r,f,c,t))return S(i,n?c:a++,f,o)}})},i}function dt(t,e,r){var n=Ut().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function yt(t,e,r){var n=y(t),i=(m(t)?xe():Ut()).asMutable();t.__iterate(function(o,u){i.update(e.call(r,o,u,t),function(t){return t=t||[],t.push(n?[u,o]:o),t})});var o=Pt(t);return i.map(function(e){return Et(t,o(e))})}function gt(t,e,r,n){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==r&&(r=0|r),s(e,r,i))return t;var o=c(e,i),a=f(r,i);if(o!==o||a!==a)return gt(t.toSeq().cacheResult(),e,r,n);var h,p=a-o;p===p&&(h=0>p?0:p);var l=kt(t);return l.size=0===h?h:t.size&&h||void 0,!n&&U(t)&&h>=0&&(l.get=function(e,r){return e=u(this,e),e>=0&&h>e?t.get(e+o,r):r}),l.__iterateUncached=function(e,r){var i=this;if(0===h)return 0;if(r)return this.cacheResult().__iterate(e,r);var u=0,a=!0,s=0;return t.__iterate(function(t,r){return a&&(a=u++h)return x();var t=i.next();return n||e===br?t:e===gr?S(e,a-1,void 0,t):S(e,a-1,t.value[1],t)})},l}function bt(t,e,r){var n=kt(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var u=0;return t.__iterate(function(t,i,a){return e.call(r,t,i,a)&&++u&&n(t,i,o)}),u},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var u=t.__iterator(mr,i),a=!0;return new w(function(){if(!a)return x();var t=u.next();if(t.done)return t;var i=t.value,s=i[0],c=i[1];return e.call(r,c,s,o)?n===mr?t:S(n,s,c,t):(a=!1,x())})},n}function mt(t,e,r,n){var i=kt(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,s=0;return t.__iterate(function(t,o,c){return a&&(a=e.call(r,t,o,c))?void 0:(s++,i(t,n?o:s-1,u))}),s},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(mr,o),s=!0,c=0;return new w(function(){var t,o,f;do{if(t=a.next(),t.done)return n||i===br?t:i===gr?S(i,c++,void 0,t):S(i,c++,t.value[1],t);var h=t.value;o=h[0],f=h[1],s&&(s=e.call(r,f,o,u))}while(s);return i===mr?t:S(i,o,f,t)})},i}function wt(t,e){var r=y(t),n=[t].concat(e).map(function(t){return d(t)?r&&(t=l(t)):t=r?C(t):F(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&y(i)||g(t)&&g(i))return i}var o=new k(n);return r?o=o.toKeyedSeq():g(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),o}function St(t,e,r){var n=kt(t);return n.__iterateUncached=function(n,i){function o(t,s){var c=this;t.__iterate(function(t,i){return(!e||e>s)&&d(t)?o(t,s+1):n(t,r?i:u++,c)===!1&&(a=!0),!a},i)}var u=0,a=!1;return o(t,0),u},n.__iteratorUncached=function(n,i){var o=t.__iterator(n,i),u=[],a=0;return new w(function(){for(;o;){var t=o.next();if(t.done===!1){var s=t.value;if(n===mr&&(s=s[1]),e&&!(u.length0}function Mt(t,e,r){var n=kt(t);return n.size=new k(r).map(function(t){return t.size}).min(),n.__iterate=function(t,e){for(var r,n=this.__iterator(br,e),i=0;!(r=n.next()).done&&t(r.value,i++,this)!==!1;);return i},n.__iteratorUncached=function(t,n){var i=r.map(function(t){return t=p(t),j(n?t.reverse():t)}),o=0,u=!1;return new w(function(){var r;return u||(r=i.map(function(t){return t.next()}),u=r.some(function(t){return t.done})),u?x():S(t,o++,e.apply(null,r.map(function(t){return t.value})))})},n}function Et(t,e){return U(t)?e:t.constructor(e)}function Dt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function At(t){return at(t.size),o(t)}function Pt(t){return y(t)?l:g(t)?v:_}function kt(t){return Object.create((y(t)?D:g(t)?A:P).prototype)}function qt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):E.prototype.cacheResult.call(this)}function Rt(t,e){return t>e?1:e>t?-1:0}function Tt(t){var e=j(t);if(!e){if(!M(t))throw new TypeError("Expected iterable or array-like: "+t);e=j(p(t))}return e}function Ut(t){return null===t||void 0===t?$t():Kt(t)&&!m(t)?t:$t().withMutations(function(e){var r=l(t);at(r.size),r.forEach(function(t,r){return e.set(r,t)})})}function Kt(t){return!(!t||!t[Ur])}function Ct(t,e){this.ownerID=t,this.entries=e}function Ft(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function Lt(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function Bt(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function Nt(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function Wt(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Vt(t._root)}function Jt(t,e){return S(t,e[0],e[1])}function Vt(t,e){return{node:t,index:0,__prev:e}}function Gt(t,e,r,n){var i=Object.create(Kr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function $t(){return Cr||(Cr=Gt(0))}function Ht(t,r,n){var i,o;if(t._root){var u=e(pr),a=e(lr);if(i=Zt(t._root,t.__ownerID,0,void 0,r,n,u,a),!a.value)return t;o=t.size+(u.value?n===hr?-1:1:0)}else{if(n===hr)return t;o=1,i=new Ct(t.__ownerID,[[r,n]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Gt(o,i):$t()}function Zt(t,e,n,i,o,u,a,s){return t?t.update(e,n,i,o,u,a,s):u===hr?t:(r(s),r(a),new Nt(e,i,[o,u]))}function Yt(t){return t.constructor===Nt||t.constructor===Bt}function Xt(t,e,r,n,i){if(t.keyHash===n)return new Bt(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&fr,a=(0===r?n:n>>>r)&fr,s=u===a?[Xt(t,e,r+sr,n,i)]:(o=new Nt(e,n,i),a>u?[t,o]:[o,t]);return new Ft(e,1<a;a++,s<<=1){var f=e[a];void 0!==f&&a!==n&&(i|=s,u[o++]=f)}return new Ft(t,i,u)}function ee(t,e,r,n,i){for(var o=0,u=new Array(cr),a=0;0!==r;a++,r>>>=1)u[a]=1&r?e[o++]:void 0;return u[n]=i,new Lt(t,o+1,u)}function re(t,e,r){for(var n=[],i=0;i>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function ae(t,e,r,n){var o=n?t:i(t);return o[e]=r,o}function se(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=new Array(i),u=0,a=0;i>a;a++)a===e?(o[a]=r,u=-1):o[a]=t[a+u];return o}function ce(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,u=0;n>u;u++)u===e&&(o=1),i[u]=t[u+o];return i}function fe(t){var e=_e();if(null===t||void 0===t)return e;if(he(t))return t;var r=v(t),n=r.size;return 0===n?e:(at(n),n>0&&cr>n?ve(0,n,sr,null,new pe(r.toArray())):e.withMutations(function(t){t.setSize(n),r.forEach(function(e,r){return t.set(r,e)})}))}function he(t){return!(!t||!t[Nr])}function pe(t,e){this.array=t,this.ownerID=e}function le(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r)}function n(t,r){var n=r===a?s&&s.array:t&&t.array,i=r>o?0:o-r,c=u-r;return c>cr&&(c=cr),function(){if(i===c)return Vr;var t=e?--c:i++;return n&&n[t]}}function i(t,n,i){var a,s=t&&t.array,c=i>o?0:o-i>>n,f=(u-i>>n)+1;return f>cr&&(f=cr),function(){for(;;){if(a){var t=a();if(t!==Vr)return t;a=null}if(c===f)return Vr;var o=e?--f:c++;a=r(s&&s[o],n-sr,i+(o<=t.size||0>r)return t.withMutations(function(t){0>r?me(t,r).set(0,n):me(t,0,r+1).set(r,n)});r+=t._origin;var i=t._tail,o=t._root,a=e(lr);return r>=Se(t._capacity)?i=ye(i,t.__ownerID,0,r,n,a):o=ye(o,t.__ownerID,t._level,r,n,a),a.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):ve(t._origin,t._capacity,t._level,o,i):t}function ye(t,e,n,i,o,u){var a=i>>>n&fr,s=t&&a0){var f=t&&t.array[a],h=ye(f,e,n-sr,i,o,u);return h===f?t:(c=ge(t,e),c.array[a]=h,c)}return s&&t.array[a]===o?t:(r(u),c=ge(t,e),void 0===o&&a===c.array.length-1?c.array.pop():c.array[a]=o,c)}function ge(t,e){return e&&t&&e===t.ownerID?t:new pe(t?t.array.slice():[],e)}function be(t,e){if(e>=Se(t._capacity))return t._tail;if(e<1<0;)r=r.array[e>>>n&fr],n-=sr;return r}}function me(t,e,r){void 0!==e&&(e=0|e),void 0!==r&&(r=0|r);var i=t.__ownerID||new n,o=t._origin,u=t._capacity,a=o+e,s=void 0===r?u:0>r?u+r:o+r;if(a===o&&s===u)return t;if(a>=s)return t.clear();for(var c=t._level,f=t._root,h=0;0>a+h;)f=new pe(f&&f.array.length?[void 0,f]:[],i),c+=sr,h+=1<=1<l?be(t,s-1):l>p?new pe([],i):v;if(v&&l>p&&u>a&&v.array.length){f=ge(f,i);for(var d=f,y=c;y>sr;y-=sr){var g=p>>>y&fr;d=d.array[g]=ge(d.array[g],i)}d.array[p>>>sr&fr]=v}if(u>s&&(_=_&&_.removeAfter(i,0,s)),a>=l)a-=l,s-=l,c=sr,f=null,_=_&&_.removeBefore(i,0,a);else if(a>o||p>l){for(h=0;f;){var b=a>>>c&fr;if(b!==l>>>c&fr)break;b&&(h+=(1<o&&(f=f.removeBefore(i,c,a-h)),f&&p>l&&(f=f.removeAfter(i,c,l-h)),h&&(a-=h,s-=h)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=c,t._root=f,t._tail=_,t.__hash=void 0,t.__altered=!0,t):ve(a,s,c,f,_)}function we(t,e,r){for(var n=[],i=0,o=0;oi&&(i=a.size),d(u)||(a=a.map(function(t){return Z(t)})),n.push(a)}return i>t.size&&(t=t.setSize(i)),ie(t,e,n)}function Se(t){return cr>t?0:t-1>>>sr<=cr&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&a!==e}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=a===u.size-1?u.pop():u.set(a,void 0))}else if(s){if(r===u.get(a)[1])return t;n=o,i=u.set(a,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):Ie(n,i)}function Me(t){return null===t||void 0===t?Ae():Ee(t)?t:Ae().unshiftAll(t)}function Ee(t){return!(!t||!t[$r])}function De(t,e,r,n){var i=Object.create(Hr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Ae(){return Zr||(Zr=De(0))}function Pe(t){return null===t||void 0===t?Te():ke(t)&&!m(t)?t:Te().withMutations(function(e){var r=_(t);at(r.size),r.forEach(function(t){return e.add(t)})})}function ke(t){return!(!t||!t[Yr])}function qe(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Re(t,e){var r=Object.create(Xr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Te(){return Qr||(Qr=Re($t()))}function Ue(t){return null===t||void 0===t?Fe():Ke(t)?t:Fe().withMutations(function(e){var r=_(t);at(r.size),r.forEach(function(t){return e.add(t)})})}function Ke(t){return ke(t)&&m(t)}function Ce(t,e){var r=Object.create(tn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Fe(){return en||(en=Ce(je()))}function Le(t,e){var r,n=function(o){if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var u=Object.keys(t);We(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=Ut(o)},i=n.prototype=Object.create(rn);return i.constructor=n,n}function Be(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function Ne(t){return t._name||t.constructor.name||"Record"}function We(t,e){try{e.forEach(Je.bind(void 0,t))}catch(r){}}function Je(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){ut(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Ve(t,e){if(t===e)return!0;if(!d(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||y(t)!==y(e)||g(t)!==g(e)||m(t)!==m(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!b(t);if(m(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&H(i[1],t)&&(r||H(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,a=e.__iterate(function(e,n){return(r?t.has(e):i?H(e,t.get(n,hr)):H(t.get(n,hr),e))?void 0:(u=!1,!1)});return u&&t.size===a}function Ge(t,e,r){if(!(this instanceof Ge))return new Ge(t,e,r);if(ut(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(nn)return nn;nn=this}}function $e(t,e){if(!(this instanceof $e))return new $e(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(on)return on;on=this}}function He(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Ze(t,e){return e}function Ye(t,e){return[e,t]}function Xe(t){return function(){return!t.apply(this,arguments)}}function Qe(t){return function(){return-t.apply(this,arguments)}}function tr(t){return"string"==typeof t?JSON.stringify(t):t}function er(){return i(arguments)}function rr(t,e){return e>t?1:t>e?-1:0}function nr(t){if(t.size===1/0)return 0;var e=m(t),r=y(t),n=e?1:0,i=t.__iterate(r?e?function(t,e){n=31*n+or(et(t),et(e))|0}:function(t,e){n=n+or(et(t),et(e))|0}:e?function(t){n=31*n+et(t)|0}:function(t){n=n+et(t)|0});return ir(i,n)}function ir(t,e){return e=zr(e,3432918353),e=zr(e<<15|e>>>-15,461845907),e=zr(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=zr(e^e>>>16,2246822507),e=zr(e^e>>>13,3266489909),e=tt(e^e>>>16)}function or(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var ur=Array.prototype.slice,ar="delete",sr=5,cr=1<=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},k.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new w(function(){return i>n?x():S(t,i,r[e?n-i++:i++])})},t(q,D),q.prototype.get=function(t,e){ -return void 0===e||this.has(t)?this._object[t]:e},q.prototype.has=function(t){return this._object.hasOwnProperty(t)},q.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;i>=o;o++){var u=n[e?i-o:o];if(t(r[u],u,this)===!1)return o+1}return o},q.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new w(function(){var u=n[e?i-o:o];return o++>i?x():S(t,u,r[u])})},q.prototype[yr]=!0,t(R,A),R.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=j(r),i=0;if(I(n))for(var o;!(o=n.next()).done&&t(o.value,i++,this)!==!1;);return i},R.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=j(r);if(!I(n))return new w(x);var i=0;return new w(function(){var e=n.next();return e.done?e:S(t,i++,e.value)})},t(T,A),T.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;i=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return S(t,i,n[i++])})};var Ir;t(J,p),t(V,J),t(G,J),t($,J),J.Keyed=V,J.Indexed=G,J.Set=$;var jr,zr="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},Mr=Object.isExtensible,Er=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Dr="function"==typeof WeakMap;Dr&&(jr=new WeakMap);var Ar=0,Pr="__immutablehash__";"function"==typeof Symbol&&(Pr=Symbol(Pr));var kr=16,qr=255,Rr=0,Tr={};t(st,D),st.prototype.get=function(t,e){return this._iter.get(t,e)},st.prototype.has=function(t){return this._iter.has(t)},st.prototype.valueSeq=function(){return this._iter.valueSeq()},st.prototype.reverse=function(){var t=this,e=vt(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},st.prototype.map=function(t,e){var r=this,n=lt(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},st.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?At(this):0,function(i){return t(i,e?--r:r++,n)}),e)},st.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(br,e),n=e?At(this):0;return new w(function(){var i=r.next();return i.done?i:S(t,e?--n:n++,i.value,i)})},st.prototype[yr]=!0,t(ct,A),ct.prototype.includes=function(t){return this._iter.includes(t)},ct.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ct.prototype.__iterator=function(t,e){var r=this._iter.__iterator(br,e),n=0;return new w(function(){var e=r.next();return e.done?e:S(t,n++,e.value,e)})},t(ft,P),ft.prototype.has=function(t){return this._iter.includes(t)},ft.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},ft.prototype.__iterator=function(t,e){var r=this._iter.__iterator(br,e);return new w(function(){var e=r.next();return e.done?e:S(t,e.value,e.value,e)})},t(ht,D),ht.prototype.entrySeq=function(){return this._iter.toSeq()},ht.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){Dt(e);var n=d(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},ht.prototype.__iterator=function(t,e){var r=this._iter.__iterator(br,e);return new w(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){Dt(n);var i=d(n);return S(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ct.prototype.cacheResult=st.prototype.cacheResult=ft.prototype.cacheResult=ht.prototype.cacheResult=qt,t(Ut,V),Ut.prototype.toString=function(){return this.__toString("Map {","}")},Ut.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Ut.prototype.set=function(t,e){return Ht(this,t,e)},Ut.prototype.setIn=function(t,e){return this.updateIn(t,hr,function(){return e})},Ut.prototype.remove=function(t){return Ht(this,t,hr)},Ut.prototype.deleteIn=function(t){return this.updateIn(t,function(){return hr})},Ut.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},Ut.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=oe(this,Tt(t),e,r);return n===hr?void 0:n},Ut.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):$t()},Ut.prototype.merge=function(){return re(this,void 0,arguments)},Ut.prototype.mergeWith=function(t){var e=ur.call(arguments,1);return re(this,t,e)},Ut.prototype.mergeIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,$t(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},Ut.prototype.mergeDeep=function(){return re(this,ne(void 0),arguments)},Ut.prototype.mergeDeepWith=function(t){var e=ur.call(arguments,1);return re(this,ne(t),e)},Ut.prototype.mergeDeepIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,$t(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},Ut.prototype.sort=function(t){return xe(It(this,t))},Ut.prototype.sortBy=function(t,e){return xe(It(this,e,t))},Ut.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Ut.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new n)},Ut.prototype.asImmutable=function(){return this.__ensureOwner()},Ut.prototype.wasAltered=function(){return this.__altered},Ut.prototype.__iterator=function(t,e){return new Wt(this,t,e)},Ut.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},Ut.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Gt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ut.isMap=Kt;var Ur="@@__IMMUTABLE_MAP__@@",Kr=Ut.prototype;Kr[Ur]=!0,Kr[ar]=Kr.remove,Kr.removeIn=Kr.deleteIn,Ct.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(H(r,i[o][0]))return i[o][1];return n},Ct.prototype.update=function(t,e,n,o,u,a,s){for(var c=u===hr,f=this.entries,h=0,p=f.length;p>h&&!H(o,f[h][0]);h++);var l=p>h;if(l?f[h][1]===u:c)return this;if(r(s),(c||!l)&&r(a),!c||1!==f.length){if(!l&&!c&&f.length>=Fr)return Qt(t,f,o,u);var v=t&&t===this.ownerID,_=v?f:i(f);return l?c?h===p-1?_.pop():_[h]=_.pop():_[h]=[o,u]:_.push([o,u]),v?(this.entries=_,this):new Ct(t,_)}},Ft.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=1<<((0===t?e:e>>>t)&fr),o=this.bitmap;return 0===(o&i)?n:this.nodes[ue(o&i-1)].get(t+sr,e,r,n)},Ft.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var a=(0===e?r:r>>>e)&fr,s=1<=Lr)return ee(t,p,c,a,v);if(f&&!v&&2===p.length&&Yt(p[1^h]))return p[1^h];if(f&&v&&1===p.length&&Yt(v))return v;var _=t&&t===this.ownerID,d=f?v?c:c^s:c|s,y=f?v?ae(p,h,v,_):ce(p,h,_):se(p,h,v,_);return _?(this.bitmap=d,this.nodes=y,this):new Ft(t,d,y)},Lt.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=(0===t?e:e>>>t)&fr,o=this.nodes[i];return o?o.get(t+sr,e,r,n):n},Lt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var a=(0===e?r:r>>>e)&fr,s=i===hr,c=this.nodes,f=c[a];if(s&&!f)return this;var h=Zt(f,t,e+sr,r,n,i,o,u);if(h===f)return this;var p=this.count;if(f){if(!h&&(p--,Br>p))return te(t,c,p,a)}else p++;var l=t&&t===this.ownerID,v=ae(c,a,h,l);return l?(this.count=p,this.nodes=v,this):new Lt(t,p,v)},Bt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(H(r,i[o][0]))return i[o][1];return n},Bt.prototype.update=function(t,e,n,o,u,a,s){void 0===n&&(n=et(o));var c=u===hr;if(n!==this.keyHash)return c?this:(r(s),r(a),Xt(this,t,e,n,[o,u]));for(var f=this.entries,h=0,p=f.length;p>h&&!H(o,f[h][0]);h++);var l=p>h;if(l?f[h][1]===u:c)return this;if(r(s),(c||!l)&&r(a),c&&2===p)return new Nt(t,this.keyHash,f[1^h]);var v=t&&t===this.ownerID,_=v?f:i(f);return l?c?h===p-1?_.pop():_[h]=_.pop():_[h]=[o,u]:_.push([o,u]),v?(this.entries=_,this):new Bt(t,this.keyHash,_)},Nt.prototype.get=function(t,e,r,n){return H(r,this.entry[0])?this.entry[1]:n},Nt.prototype.update=function(t,e,n,i,o,u,a){var s=o===hr,c=H(i,this.entry[0]);return(c?o===this.entry[1]:s)?this:(r(a),s?void r(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new Nt(t,this.keyHash,[i,o]):(r(u),Xt(this,t,e,et(i),[i,o])))},Ct.prototype.iterate=Bt.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1},Ft.prototype.iterate=Lt.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},Nt.prototype.iterate=function(t,e){return t(this.entry)},t(Wt,w),Wt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return Jt(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return Jt(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return Jt(t,o.entry);e=this._stack=Vt(o,e)}continue}e=this._stack=this._stack.__prev}return x()};var Cr,Fr=cr/4,Lr=cr/2,Br=cr/4;t(fe,G),fe.of=function(){return this(arguments)},fe.prototype.toString=function(){return this.__toString("List [","]")},fe.prototype.get=function(t,e){if(t=u(this,t),t>=0&&t>>e&fr;if(n>=this.array.length)return new pe([],t);var i,o=0===n;if(e>0){var u=this.array[n];if(i=u&&u.removeBefore(t,e-sr,r),i===u&&o)return this}if(o&&!i)return this;var a=ge(this,t);if(!o)for(var s=0;n>s;s++)a.array[s]=void 0;return i&&(a.array[n]=i),a},pe.prototype.removeAfter=function(t,e,r){if(r===(e?1<>>e&fr;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n];if(i=o&&o.removeAfter(t,e-sr,r),i===o&&n===this.array.length-1)return this}var u=ge(this,t);return u.array.splice(n+1),i&&(u.array[n]=i),u};var Jr,Vr={};t(xe,Ut),xe.of=function(){return this(arguments)},xe.prototype.toString=function(){return this.__toString("OrderedMap {","}")},xe.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},xe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):je()},xe.prototype.set=function(t,e){return ze(this,t,e)},xe.prototype.remove=function(t){return ze(this,t,hr)},xe.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},xe.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},xe.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},xe.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Ie(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},xe.isOrderedMap=Oe,xe.prototype[yr]=!0,xe.prototype[ar]=xe.prototype.remove;var Gr;t(Me,G),Me.of=function(){return this(arguments)},Me.prototype.toString=function(){return this.__toString("Stack [","]")},Me.prototype.get=function(t,e){var r=this._head;for(t=u(this,t);r&&t--;)r=r.next;return r?r.value:e},Me.prototype.peek=function(){return this._head&&this._head.value},Me.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):De(t,e)},Me.prototype.pushAll=function(t){if(t=v(t),0===t.size)return this;at(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):De(e,r)},Me.prototype.pop=function(){return this.slice(1)},Me.prototype.unshift=function(){return this.push.apply(this,arguments)},Me.prototype.unshiftAll=function(t){return this.pushAll(t)},Me.prototype.shift=function(){return this.pop.apply(this,arguments)},Me.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ae()},Me.prototype.slice=function(t,e){if(s(t,e,this.size))return this;var r=c(t,this.size),n=f(e,this.size);if(n!==this.size)return G.prototype.slice.call(this,t,e);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):De(i,o)},Me.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?De(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Me.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},Me.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new w(function(){if(n){var e=n.value;return n=n.next,S(t,r++,e)}return x()})},Me.isStack=Ee;var $r="@@__IMMUTABLE_STACK__@@",Hr=Me.prototype;Hr[$r]=!0,Hr.withMutations=Kr.withMutations,Hr.asMutable=Kr.asMutable,Hr.asImmutable=Kr.asImmutable,Hr.wasAltered=Kr.wasAltered;var Zr;t(Pe,$),Pe.of=function(){return this(arguments)},Pe.fromKeys=function(t){return this(l(t).keySeq())},Pe.prototype.toString=function(){return this.__toString("Set {","}")},Pe.prototype.has=function(t){return this._map.has(t)},Pe.prototype.add=function(t){return qe(this,this._map.set(t,!0))},Pe.prototype.remove=function(t){return qe(this,this._map.remove(t))},Pe.prototype.clear=function(){return qe(this,this._map.clear())},Pe.prototype.union=function(){var t=ur.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var r=0;r1?" by "+this._step:"")+" ]"},Ge.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},Ge.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new Ge(0,0):new Ge(this.get(t,this._end),this.get(e,this._end),this._step))},Ge.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&r=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-n:n}return o},Ge.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new w(function(){var u=i;return i+=e?-n:n,o>r?x():S(t,o++,u)})},Ge.prototype.equals=function(t){return t instanceof Ge?this._start===t._start&&this._end===t._end&&this._step===t._step:Ve(this,t)};var nn;t($e,A),$e.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},$e.prototype.get=function(t,e){return this.has(t)?this._value:e},$e.prototype.includes=function(t){return H(this._value,t)},$e.prototype.slice=function(t,e){var r=this.size;return s(t,e,r)?this:new $e(this._value,f(e,r)-c(t,r))},$e.prototype.reverse=function(){return this},$e.prototype.indexOf=function(t){return H(this._value,t)?0:-1},$e.prototype.lastIndexOf=function(t){return H(this._value,t)?this.size:-1},$e.prototype.__iterate=function(t,e){for(var r=0;rt?this.count():this.size);var n=this.slice(0,t);return Et(this,1===r?n:n.concat(i(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return Et(this,St(this,t,!1))},get:function(t,e){return t=u(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t-1&&t%1===0&&t<=Number.MAX_VALUE}var i=Function.prototype.bind;e.isString=function(t){return"string"==typeof t||"[object String]"===r(t)},e.isArray=Array.isArray||function(t){return"[object Array]"===r(t)},"function"!=typeof/./&&"object"!=typeof Int8Array?e.isFunction=function(t){return"function"==typeof t||!1}:e.isFunction=function(t){return"[object Function]"===toString.call(t)},e.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},e.extend=function(t){var e=arguments.length;if(!t||2>e)return t||{};for(var r=1;e>r;r++)for(var n=arguments[r],i=Object.keys(n),o=i.length,u=0;o>u;u++){var a=i[u];t[a]=n[a]}return t},e.clone=function(t){return e.isObject(t)?e.isArray(t)?t.slice():e.extend({},t):t},e.each=function(t,e,r){var i,o,u=t?t.length:0,a=-1;if(r&&(o=e,e=function(t,e,n){return o.call(r,t,e,n)}),n(u))for(;++an;n++)r[n]=arguments[n];return new(i.apply(t,[null].concat(r)))};return e.__proto__=t,e.prototype=t.prototype,e}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return c["default"].Iterable.isIterable(t)}function o(t){return i(t)||!(0,f.isObject)(t)}function u(t){return i(t)?t.toJS():t; -}function a(t){return i(t)?t:c["default"].fromJS(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isImmutable=i,e.isImmutableValue=o,e.toJS=u,e.toImmutable=a;var s=r(3),c=n(s),f=r(4)},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e["default"]=t,e}function i(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var r=0;r0)){var e=this.reactorState.get("dirtyStores");if(0!==e.size){var r=c["default"].Set().withMutations(function(r){r.union(t.observerState.get("any")),e.forEach(function(e){var n=t.observerState.getIn(["stores",e]);n&&r.union(n)})});r.forEach(function(e){var r=t.observerState.getIn(["observersMap",e]);if(r){var n=r.get("getter"),i=r.get("handler"),o=l.evaluate(t.prevReactorState,n),u=l.evaluate(t.reactorState,n);t.prevReactorState=o.reactorState,t.reactorState=u.reactorState;var a=o.result,s=u.result;c["default"].is(a,s)||i.call(null,s)}});var n=l.resetDirtyStores(this.reactorState);this.prevReactorState=n,this.reactorState=n}}}},{key:"batchStart",value:function(){this.__batchDepth++}},{key:"batchEnd",value:function(){if(this.__batchDepth--,this.__batchDepth<=0){this.__isDispatching=!0;try{this.__notify()}catch(t){throw this.__isDispatching=!1,t}this.__isDispatching=!1}}}]),t}();e["default"]=(0,y.toFactory)(b),t.exports=e["default"]},function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){var r={};return(0,o.each)(e,function(e,n){r[n]=t.evaluate(e)}),r}Object.defineProperty(e,"__esModule",{value:!0});var o=r(4);e["default"]=function(t){return{getInitialState:function(){return i(t,this.getDataBindings())},componentDidMount:function(){var e=this;this.__unwatchFns=[],(0,o.each)(this.getDataBindings(),function(r,i){var o=t.observe(r,function(t){e.setState(n({},i,t))});e.__unwatchFns.push(o)})},componentWillUnmount:function(){for(;this.__unwatchFns.length;)this.__unwatchFns.shift()()}}},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return new P({result:t,reactorState:e})}function o(t,e){return t.withMutations(function(t){(0,A.each)(e,function(e,r){t.getIn(["stores",r])&&console.warn("Store already defined for id = "+r);var n=e.getInitialState();if(void 0===n&&f(t,"throwOnUndefinedStoreReturnValue"))throw new Error("Store getInitialState() must return a value, did you forget a return statement");if(f(t,"throwOnNonImmutableStore")&&!(0,M.isImmutableValue)(n))throw new Error("Store getInitialState() must return an immutable value, did you forget to call toImmutable");t.update("stores",function(t){return t.set(r,e)}).update("state",function(t){return t.set(r,n)}).update("dirtyStores",function(t){return t.add(r)}).update("storeStates",function(t){return x(t,[r])})}),S(t)})}function u(t,e){return t.withMutations(function(t){(0,A.each)(e,function(e,r){t.update("stores",function(t){return t.set(r,e)})})})}function a(t,e,r){if(void 0===e&&f(t,"throwOnUndefinedActionType"))throw new Error("`dispatch` cannot be called with an `undefined` action type.");var n=t.get("state"),i=t.get("dirtyStores"),o=n.withMutations(function(n){z["default"].dispatchStart(t,e,r),t.get("stores").forEach(function(o,u){var a=n.get(u),s=void 0;try{s=o.handle(a,e,r)}catch(c){throw z["default"].dispatchError(t,c.message),c}if(void 0===s&&f(t,"throwOnUndefinedStoreReturnValue")){var h="Store handler must return a value, did you forget a return statement";throw z["default"].dispatchError(t,h),new Error(h)}n.set(u,s),a!==s&&(i=i.add(u))}),z["default"].dispatchEnd(t,n,i)}),u=t.set("state",o).set("dirtyStores",i).update("storeStates",function(t){return x(t,i)});return S(u)}function s(t,e){var r=[],n=(0,M.toImmutable)({}).withMutations(function(n){(0,A.each)(e,function(e,i){var o=t.getIn(["stores",i]);if(o){var u=o.deserialize(e);void 0!==u&&(n.set(i,u),r.push(i))}})}),i=I["default"].Set(r);return t.update("state",function(t){return t.merge(n)}).update("dirtyStores",function(t){return t.union(i)}).update("storeStates",function(t){return x(t,r)})}function c(t,e,r){var n=e;(0,D.isKeyPath)(e)&&(e=(0,E.fromKeyPath)(e));var i=t.get("nextId"),o=(0,E.getStoreDeps)(e),u=I["default"].Map({id:i,storeDeps:o,getterKey:n,getter:e,handler:r}),a=void 0;return a=0===o.size?t.update("any",function(t){return t.add(i)}):t.withMutations(function(t){o.forEach(function(e){var r=["stores",e];t.hasIn(r)||t.setIn(r,I["default"].Set()),t.updateIn(["stores",e],function(t){return t.add(i)})})}),a=a.set("nextId",i+1).setIn(["observersMap",i],u),{observerState:a,entry:u}}function f(t,e){var r=t.getIn(["options",e]);if(void 0===r)throw new Error("Invalid option: "+e);return r}function h(t,e,r){var n=t.get("observersMap").filter(function(t){var n=t.get("getterKey"),i=!r||t.get("handler")===r;return i?(0,D.isKeyPath)(e)&&(0,D.isKeyPath)(n)?(0,D.isEqual)(e,n):e===n:!1});return t.withMutations(function(t){n.forEach(function(e){return p(t,e)})})}function p(t,e){return t.withMutations(function(t){var r=e.get("id"),n=e.get("storeDeps");0===n.size?t.update("any",function(t){return t.remove(r)}):n.forEach(function(e){t.updateIn(["stores",e],function(t){return t?t.remove(r):t})}),t.removeIn(["observersMap",r])})}function l(t){var e=t.get("state");return t.withMutations(function(t){var r=t.get("stores"),n=r.keySeq().toJS();r.forEach(function(r,n){var i=e.get(n),o=r.handleReset(i);if(void 0===o&&f(t,"throwOnUndefinedStoreReturnValue"))throw new Error("Store handleReset() must return a value, did you forget a return statement");if(f(t,"throwOnNonImmutableStore")&&!(0,M.isImmutableValue)(o))throw new Error("Store reset state must be an immutable value, did you forget to call toImmutable");t.setIn(["state",n],o)}),t.update("storeStates",function(t){return x(t,n)}),d(t)})}function v(t,e){var r=t.get("state");if((0,D.isKeyPath)(e))return i(r.getIn(e),t);if(!(0,E.isGetter)(e))throw new Error("evaluate must be passed a keyPath or Getter");if(b(t,e))return i(w(t,e),t);var n=(0,E.getDeps)(e).map(function(e){return v(t,e).result}),o=(0,E.getComputeFn)(e).apply(null,n);return i(o,m(t,e,o))}function _(t){var e={};return t.get("stores").forEach(function(r,n){var i=t.getIn(["state",n]),o=r.serialize(i);void 0!==o&&(e[n]=o)}),e}function d(t){return t.set("dirtyStores",I["default"].Set())}function y(t){return t}function g(t,e){var r=y(e);return t.getIn(["cache",r])}function b(t,e){var r=g(t,e);if(!r)return!1;var n=r.get("storeStates");return 0===n.size?!1:n.every(function(e,r){return t.getIn(["storeStates",r])===e})}function m(t,e,r){var n=y(e),i=t.get("dispatchId"),o=(0,E.getStoreDeps)(e),u=(0,M.toImmutable)({}).withMutations(function(e){o.forEach(function(r){var n=t.getIn(["storeStates",r]);e.set(r,n)})});return t.setIn(["cache",n],I["default"].Map({value:r,storeStates:u,dispatchId:i}))}function w(t,e){var r=y(e);return t.getIn(["cache",r,"value"])}function S(t){return t.update("dispatchId",function(t){return t+1})}function x(t,e){return t.withMutations(function(t){e.forEach(function(e){var r=t.has(e)?t.get(e)+1:1;t.set(e,r)})})}Object.defineProperty(e,"__esModule",{value:!0}),e.registerStores=o,e.replaceStores=u,e.dispatch=a,e.loadState=s,e.addObserver=c,e.getOption=f,e.removeObserver=h,e.removeObserverByEntry=p,e.reset=l,e.evaluate=v,e.serialize=_,e.resetDirtyStores=d;var O=r(3),I=n(O),j=r(9),z=n(j),M=r(5),E=r(10),D=r(11),A=r(4),P=I["default"].Record({result:null,reactorState:null})},function(t,e,r){"use strict";var n=r(8);e.dispatchStart=function(t,e,r){(0,n.getOption)(t,"logDispatches")&&console.group&&(console.groupCollapsed("Dispatch: %s",e),console.group("payload"),console.debug(r),console.groupEnd())},e.dispatchError=function(t,e){(0,n.getOption)(t,"logDispatches")&&console.group&&(console.debug("Dispatch error: "+e),console.groupEnd())},e.dispatchEnd=function(t,e,r){(0,n.getOption)(t,"logDispatches")&&console.group&&((0,n.getOption)(t,"logDirtyStores")&&console.log("Stores updated:",r.toList().toJS()),(0,n.getOption)(t,"logAppState")&&console.debug("Dispatch done, new state: ",e.toJS()),console.groupEnd())}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return(0,p.isArray)(t)&&(0,p.isFunction)(t[t.length-1])}function o(t){return t[t.length-1]}function u(t){return t.slice(0,t.length-1)}function a(t,e){e||(e=h["default"].Set());var r=h["default"].Set().withMutations(function(e){if(!i(t))throw new Error("getFlattenedDeps must be passed a Getter");u(t).forEach(function(t){if((0,l.isKeyPath)(t))e.add((0,f.List)(t));else{if(!i(t))throw new Error("Invalid getter, each dependency must be a KeyPath or Getter");e.union(a(t))}})});return e.union(r)}function s(t){if(!(0,l.isKeyPath)(t))throw new Error("Cannot create Getter from KeyPath: "+t);return[t,v]}function c(t){if(t.hasOwnProperty("__storeDeps"))return t.__storeDeps;var e=a(t).map(function(t){return t.first()}).filter(function(t){return!!t});return Object.defineProperty(t,"__storeDeps",{enumerable:!1,configurable:!1,writable:!1,value:e}),e}Object.defineProperty(e,"__esModule",{value:!0});var f=r(3),h=n(f),p=r(4),l=r(11),v=function(t){return t};e["default"]={isGetter:i,getComputeFn:o,getFlattenedDeps:a,getStoreDeps:c,getDeps:u,fromKeyPath:s},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return(0,s.isArray)(t)&&!(0,s.isFunction)(t[t.length-1])}function o(t,e){var r=a["default"].List(t),n=a["default"].List(e);return a["default"].is(r,n)}Object.defineProperty(e,"__esModule",{value:!0}),e.isKeyPath=i,e.isEqual=o;var u=r(3),a=n(u),s=r(4)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(3),i=(0,n.Map)({logDispatches:!1,logAppState:!1,logDirtyStores:!1,throwOnUndefinedActionType:!1,throwOnUndefinedStoreReturnValue:!1,throwOnNonImmutableStore:!1,throwOnDispatchInDispatch:!1});e.PROD_OPTIONS=i;var o=(0,n.Map)({logDispatches:!0,logAppState:!0,logDirtyStores:!0,throwOnUndefinedActionType:!0,throwOnUndefinedStoreReturnValue:!0,throwOnNonImmutableStore:!0,throwOnDispatchInDispatch:!0});e.DEBUG_OPTIONS=o;var u=(0,n.Record)({dispatchId:0,state:(0,n.Map)(),stores:(0,n.Map)(),cache:(0,n.Map)(),storeStates:(0,n.Map)(),dirtyStores:(0,n.Set)(),debug:!1,options:i});e.ReactorState=u;var a=(0,n.Record)({any:(0,n.Set)(),stores:(0,n.Map)({}),observersMap:(0,n.Map)({}),nextId:1});e.ObserverState=a}])})},function(e,r){e.exports=t},function(t,r){t.exports=e},function(t,e,r){(function(e){"use strict";var r=function(t,r,n,i,o,u,a,s){if("production"!==e.env.NODE_ENV&&void 0===r)throw new Error("invariant requires an error message argument");if(!t){var c;if(void 0===r)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,i,o,u,a,s],h=0;c=new Error(r.replace(/%s/g,function(){return f[h++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};t.exports=r}).call(e,r(1))},function(t,e,r){function n(t){var e=i(t)?s.call(t):"";return e==o||e==u}var i=r(7),o="[object Function]",u="[object GeneratorFunction]",a=Object.prototype,s=a.toString;t.exports=n},function(t,e){function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=r},function(t,e,r){function n(t,e){return"function"==typeof e&&a(t)?i(t,e):o(t,u(e))}var i=r(9),o=r(10),u=r(32),a=r(27);t.exports=n},function(t,e){function r(t,e){for(var r=-1,n=t.length;++r-1&&t%1==0&&n>=t}var n=9007199254740991;t.exports=r},function(t,e){function r(t){return!!t&&"object"==typeof t}t.exports=r},function(t,e){var r=Array.isArray;t.exports=r},function(t,e,r){function n(t){return"string"==typeof t||!i(t)&&o(t)&&s.call(t)==u}var i=r(27),o=r(26),u="[object String]",a=Object.prototype,s=a.toString;t.exports=n},function(t,e){function r(t,e){return t="number"==typeof t||i.test(t)?+t:-1,e=null==e?n:e,t>-1&&t%1==0&&e>t}var n=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=r},function(t,e){function r(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||n;return t===r}var n=Object.prototype;t.exports=r},function(t,e,r){function n(t,e){return function(r,n){if(null==r)return r;if(!i(r))return t(r,n);for(var o=r.length,u=e?o:-1,a=Object(r);(e?u--:++ur)return!1;var n=t.length-1;return r==n?t.pop():u.call(t,r,1),!0}var i=r(39),o=Array.prototype,u=o.splice;t.exports=n},function(t,e,r){function n(t,e){for(var r=t.length;r--;)if(i(t[r][0],e))return r;return-1}var i=r(40);t.exports=n},function(t,e){function r(t,e){return t===e||t!==t&&e!==e}t.exports=r},function(t,e,r){function n(t){var e=this.__data__,r=e.array;return r?i(r,t):e.map.get(t)}var i=r(42);t.exports=n},function(t,e,r){function n(t,e){var r=i(t,e);return 0>r?void 0:t[r][1]}var i=r(39);t.exports=n},function(t,e,r){function n(t){var e=this.__data__,r=e.array;return r?i(r,t):e.map.has(t)}var i=r(44);t.exports=n},function(t,e,r){function n(t,e){return i(t,e)>-1}var i=r(39);t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__,n=r.array;n&&(n.lengthn?t.push([e,r]):t[n][1]=r}var i=r(39);t.exports=n},function(t,e,r){function n(t,e,r){t[e]=i&&void 0===r?o:r}var i=r(49),o="__lodash_hash_undefined__";t.exports=n},function(t,e,r){function n(t,e,r,a,s){return t===e?!0:null==t||null==e||!o(t)&&!u(e)?t!==t&&e!==e:i(t,e,n,r,a,s)}var i=r(69),o=r(7),u=r(26);t.exports=n},function(t,e,r){function n(t,e,r,n,d,g){var b=c(t),m=c(e),w=v,S=v;b||(w=s(t),w=w==l?_:w),m||(S=s(e),S=S==l?_:S);var x=w==_&&!f(t),O=S==_&&!f(e),I=w==S;if(I&&!x)return g||(g=new i),b||h(t)?o(t,e,r,n,d,g):u(t,e,w,r,n,d,g);if(!(d&p)){var j=x&&y.call(t,"__wrapped__"),z=O&&y.call(e,"__wrapped__");if(j||z){var M=j?t.value():t,E=z?e.value():e;return g||(g=new i),r(M,E,n,d,g)}}return I?(g||(g=new i),a(t,e,r,n,d,g)):!1}var i=r(35),o=r(70),u=r(72),a=r(77),s=r(78),c=r(27),f=r(52),h=r(83),p=2,l="[object Arguments]",v="[object Array]",_="[object Object]",d=Object.prototype,y=d.hasOwnProperty;t.exports=n},function(t,e,r){function n(t,e,r,n,a,s){var c=-1,f=a&u,h=a&o,p=t.length,l=e.length;if(p!=l&&!(f&&l>p))return!1;var v=s.get(t);if(v)return v==e;var _=!0;for(s.set(t,e);++cr;)t=t[e[r++]];return r&&r==n?t:void 0}var i=r(93),o=r(98);t.exports=n},function(t,e,r){function n(t){return i(t)?t:o(t)}var i=r(27),o=r(94);t.exports=n},function(t,e,r){var n=r(95),i=r(96),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,u=/\\(\\)?/g,a=n(function(t){var e=[];return i(t).replace(o,function(t,r,n,i){e.push(n?i.replace(u,"$1"):r||t)}),e});t.exports=a},function(t,e,r){function n(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(o);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var u=t.apply(this,n);return r.cache=o.set(i,u),u};return r.cache=new(n.Cache||i),r}var i=r(46),o="Expected a function";n.Cache=i,t.exports=n},function(t,e,r){function n(t){if("string"==typeof t)return t;if(null==t)return"";if(o(t))return s?s.call(t):"";var e=t+"";return"0"==e&&1/t==-u?"-0":e}var i=r(73),o=r(97),u=1/0,a=i?i.prototype:void 0,s=a?a.toString:void 0;t.exports=n},function(t,e,r){function n(t){return"symbol"==typeof t||i(t)&&a.call(t)==o}var i=r(26),o="[object Symbol]",u=Object.prototype,a=u.toString;t.exports=n},function(t,e,r){function n(t,e){var r=typeof t;return"number"==r||"symbol"==r?!0:!i(t)&&(o(t)||a.test(t)||!u.test(t)||null!=e&&t in Object(e))}var i=r(27),o=r(97),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=n},function(t,e,r){function n(t,e){return null!=t&&o(t,e,i)}var i=r(100),o=r(101);t.exports=n},function(t,e){function r(t,e){return e in Object(t)}t.exports=r},function(t,e,r){function n(t,e,r){e=s(e,t)?[e]:i(e);for(var n,h=-1,p=e.length;++h-1}function o(t){return s["default"](t)&&"undefined"!=typeof t.type&&Object.keys(t).every(i)}function u(t){return t.error===!0}e.__esModule=!0,e.isFSA=o,e.isError=u;var a=r(107),s=n(a),c=["type","payload","error","meta"]},function(t,e,r){function n(t){return!!t&&"object"==typeof t}function i(t,e){return u(t,e,s)}function o(t){var e;if(!n(t)||p.call(t)!=c||a(t)||!h.call(t,"constructor")&&(e=t.constructor,"function"==typeof e&&!(e instanceof e)))return!1;var r;return i(t,function(t,e){r=e}),void 0===r||h.call(t,r)}var u=r(108),a=r(109),s=r(110),c="[object Object]",f=Object.prototype,h=f.hasOwnProperty,p=f.toString;t.exports=o},function(t,e){function r(t){return function(e,r,n){for(var i=-1,o=Object(e),u=n(e),a=u.length;a--;){var s=u[t?a:++i];if(r(o[s],s,o)===!1)break}return e}}var n=r();t.exports=n},function(t,e){function r(t){ -return function(e){return null==e?void 0:e[t]}}function n(t){return o(t)&&_.call(t,"callee")&&(!y.call(t,"callee")||d.call(t)==h)}function i(t){return null!=t&&a(g(t))&&!u(t)}function o(t){return c(t)&&i(t)}function u(t){var e=s(t)?d.call(t):"";return e==p||e==l}function a(t){return"number"==typeof t&&t>-1&&t%1==0&&f>=t}function s(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function c(t){return!!t&&"object"==typeof t}var f=9007199254740991,h="[object Arguments]",p="[object Function]",l="[object GeneratorFunction]",v=Object.prototype,_=v.hasOwnProperty,d=v.toString,y=v.propertyIsEnumerable,g=r("length");t.exports=n},function(t,e,r){function n(t,e){return t="number"==typeof t||c.test(t)?+t:-1,e=null==e?p:e,t>-1&&t%1==0&&e>t}function i(t){return"number"==typeof t&&t>-1&&t%1==0&&p>=t}function o(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function u(t){if(null==t)return[];o(t)||(t=Object(t));var e=t.length;e=e&&i(e)&&(s(t)||a(t))&&e||0;for(var r=t.constructor,u=-1,c="function"==typeof r&&r.prototype===t,f=Array(e),p=e>0;++u-1&&t%1==0&&y>=t}function o(t){return u(t)&&v.call(t)==c}function u(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function a(t){return null==t?!1:o(t)?_.test(p.call(t)):r(t)&&f.test(t)}var s="[object Array]",c="[object Function]",f=/^\[object .+?Constructor\]$/,h=Object.prototype,p=Function.prototype.toString,l=h.hasOwnProperty,v=h.toString,_=RegExp("^"+p.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),d=n(Array,"isArray"),y=9007199254740991,g=d||function(t){return r(t)&&i(t.length)&&v.call(t)==s};t.exports=g},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var i=r(113),o=n(i),u=r(116),a=n(u),s=r(117),c=n(s),f=r(118),h=n(f),p=r(120),l=n(p);e.connect=o["default"],e.Provider=a["default"],e.nuclearMixin=c["default"],e.provideReactor=h["default"],e.nuclearComponent=l["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t){return t.displayName||t.name||"Component"}function a(t){return function(e){var r=function(r){function n(t,e){i(this,n),r.call(this,t,e),this.reactor=t.reactor||e.reactor,this.unsubscribeFns=[],this.updatePropMap(t)}return o(n,r),n.prototype.resubscribe=function(t){this.unsubscribe(),this.updatePropMap(t),this.updateState(),this.subscribe()},n.prototype.componentWillMount=function(){this.updateState()},n.prototype.componentDidMount=function(){this.subscribe(this.props)},n.prototype.componentWillUnmount=function(){this.unsubscribe()},n.prototype.updatePropMap=function(e){this.propMap=t?t(e):{}},n.prototype.updateState=function(){var t=this.propMap,e={};for(var r in t){var n=t[r];e[r]=this.reactor.evaluate(n)}this.setState(e)},n.prototype.subscribe=function(){var t=this,e=this.propMap,r=function(r){var n=e[r],i=t.reactor.observe(n,function(e){var n;t.setState((n={},n[r]=e,n))});t.unsubscribeFns.push(i)};for(var n in e)r(n)},n.prototype.unsubscribe=function(){if(0!==this.unsubscribeFns.length)for(;this.unsubscribeFns.length>0;)this.unsubscribeFns.shift()()},n.prototype.render=function(){return c.createElement(e,s({reactor:this.reactor},this.props,this.state))},n}(c.Component);return r.displayName="Connect("+u(e)+")",r.WrappedComponent=e,r.contextTypes={reactor:h["default"]},r.propTypes={reactor:h["default"]},l["default"](r,e)}}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e` instead"),0===arguments.length||"function"!=typeof arguments[0]?(e=arguments[0],function(t){return i(t,e)}):i.apply(null,arguments)}e.__esModule=!0,e["default"]=o;var u=r(3),a=n(u),s=r(115),c=n(s),f=r(119),h=n(f);t.exports=e["default"]},function(t,e){"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=Object.assign||function(t,e){for(var o,u,a=r(t),s=1;s=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function o(t){var e=t.displayName||t.name,r=t.getDataBindings;return(0,S["default"])((0,O["default"])(r),e+" component should implement 'getDataBindings' static method"),(0,M.connect)(function(t){return r(R)})(t)}function u(e,r){var n=b["default"].createElement(M.Provider,{reactor:k},e);return(0,S["default"])(e,"frux#mount: No component was provided."),t.env.IS_REACT_NATIVE?n:void(0,m.render)(n,r||(0,z.createMountingNode)())}function a(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];e.forEach(function(t){(0,S["default"])((0,O["default"])(t),"Check your middlewares and make sure they are all functions."),T.push(t)}),console.log(T)}function s(t,e){var r={actions:q,getters:R};e(t,r,k)}function c(t){var e=t.options,r=i(t,["options"]);return k=new y.Reactor(e),(0,j["default"])(r,function(t,e){(0,O["default"])(t)&&s(e,t)}),{actions:q,getters:R}}function f(t){var e=t.type,r=t.payload;k.dispatch(e,r)}function h(t){k.batch(t)}function p(t){return k.evaluate(t)}function l(t,e){return k.observe(t,e),{unobserve:function(){k.unobserve(t,e)}}}function v(t){return"string"==typeof t&&t?k.evaluateToJS([t]):k.serialize()}function _(t){k.loadState(t)}function d(){k.reset()}Object.defineProperty(e,"__esModule",{value:!0}),e.isImmutable=e.toImmutable=e.toJS=e.isGetter=e.isKeyPath=e.Immutable=void 0,e.dispatch=f,e.batch=h,e.evaluate=p,e.observe=l,e.serialize=v,e.loadState=_,e.reset=d;var y=r(2);Object.defineProperty(e,"Immutable",{enumerable:!0,get:function(){return y.Immutable}}),Object.defineProperty(e,"isKeyPath",{enumerable:!0,get:function(){return y.isKeyPath}}),Object.defineProperty(e,"isGetter",{enumerable:!0,get:function(){return y.isGetter}}),Object.defineProperty(e,"toJS",{enumerable:!0,get:function(){return y.toJS}}),Object.defineProperty(e,"toImmutable",{enumerable:!0,get:function(){return y.toImmutable}}),Object.defineProperty(e,"isImmutable",{enumerable:!0,get:function(){return y.isImmutable}});var g=r(3),b=n(g),m=r(4),w=r(5),S=n(w),x=r(6),O=n(x),I=r(8),j=n(I),z=r(105),M=r(112),E=r(121),D=n(E),A=r(131),P=n(A),k=null,q={},R={},T=[];e["default"]={use:a,initialize:c,mount:u,registerModule:s,createModule:P["default"],createStore:D["default"],dispatch:f,batch:h,evaluate:p,observe:l,loadState:_,serialize:v,reset:d,connect:o}}).call(e,r(1))},function(t,e){function r(){c=!1,u.length?s=u.concat(s):f=-1,s.length&&n()}function n(){if(!c){var t=setTimeout(r);c=!0;for(var e=s.length;e;){for(u=s,s=[];++f1)for(var r=1;ri;i++)n[i]=t[i+e];return n}function o(t){return void 0===t.size&&(t.size=t.__iterate(a)),t.size}function u(t,e){if("number"!=typeof e){var r=+e;if(""+r!==e)return NaN;e=r}return 0>e?o(t)+e:e}function a(){return!0}function s(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function c(t,e){return h(t,e,0)}function f(t,e){return h(t,e,e)}function h(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function p(t){return d(t)?t:E(t)}function l(t){return y(t)?t:D(t)}function v(t){return g(t)?t:A(t)}function _(t){return d(t)&&!b(t)?t:P(t)}function d(t){return!(!t||!t[vr])}function y(t){return!(!t||!t[_r])}function g(t){return!(!t||!t[dr])}function b(t){return y(t)||g(t)}function m(t){return!(!t||!t[yr])}function w(t){this.next=t}function S(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function x(){return{value:void 0,done:!0}}function O(t){return!!z(t)}function I(t){return t&&"function"==typeof t.next}function j(t){var e=z(t);return e&&e.call(t)}function z(t){var e=t&&(wr&&t[wr]||t[Sr]);return"function"==typeof e?e:void 0}function M(t){return t&&"number"==typeof t.length}function E(t){return null===t||void 0===t?K():d(t)?t.toSeq():L(t)}function D(t){return null===t||void 0===t?K().toKeyedSeq():d(t)?y(t)?t.toSeq():t.fromEntrySeq():C(t)}function A(t){return null===t||void 0===t?K():d(t)?y(t)?t.entrySeq():t.toIndexedSeq():F(t)}function P(t){return(null===t||void 0===t?K():d(t)?y(t)?t.entrySeq():t:F(t)).toSetSeq()}function k(t){this._array=t,this.size=t.length}function q(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function R(t){this._iterable=t,this.size=t.length||t.size}function T(t){this._iterator=t,this._iteratorCache=[]}function U(t){return!(!t||!t[Or])}function K(){return Ir||(Ir=new k([]))}function C(t){var e=Array.isArray(t)?new k(t).fromEntrySeq():I(t)?new T(t).fromEntrySeq():O(t)?new R(t).fromEntrySeq():"object"==typeof t?new q(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function F(t){var e=B(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function L(t){var e=B(t)||"object"==typeof t&&new q(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function B(t){return M(t)?new k(t):I(t)?new T(t):O(t)?new R(t):void 0}function N(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var a=i[r?o-u:u];if(e(a[1],n?a[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,r)}function W(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,u=0;return new w(function(){var t=i[r?o-u:u];return u++>o?x():S(e,n?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,r)}function J(){throw TypeError("Abstract")}function V(){}function G(){}function $(){}function H(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function Z(t,e){return e?Y(e,t,"",{"":t}):X(t)}function Y(t,e,r,n){return Array.isArray(e)?t.call(n,r,A(e).map(function(r,n){return Y(t,r,n,e)})):Q(e)?t.call(n,r,D(e).map(function(r,n){return Y(t,r,n,e)})):e}function X(t){return Array.isArray(t)?A(t).map(X).toList():Q(t)?D(t).map(X).toMap():t}function Q(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return tt(r)}return"string"===e?t.length>kr?rt(t):nt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function rt(t){var e=Tr[t];return void 0===e&&(e=nt(t),Rr===qr&&(Rr=0,Tr={}),Rr++,Tr[t]=e),e}function nt(t){for(var e=0,r=0;r0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ut(t,e){if(!t)throw new Error(e)}function at(t){ut(t!==1/0,"Cannot perform this action with an infinite size.")}function st(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function ht(t){this._iter=t,this.size=t.size}function pt(t){var e=kt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=qt,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===mr){var n=t.__iterator(e,r);return new w(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===br?gr:br,r)},e}function lt(t,e,r){var n=kt(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,hr);return o===hr?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,u){return n(e.call(r,t,i,u),i,o)!==!1},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(mr,i);return new w(function(){var i=o.next();if(i.done)return i;var u=i.value,a=u[0];return S(n,a,e.call(r,u[1],a,t),i)})},n}function vt(t,e){var r=kt(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=pt(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.includes=function(e){return t.includes(e)},r.cacheResult=qt,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function _t(t,e,r,n){var i=kt(t);return n&&(i.has=function(n){var i=t.get(n,hr);return i!==hr&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,hr);return o!==hr&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,a=0;return t.__iterate(function(t,o,s){return e.call(r,t,o,s)?(a++,i(t,n?o:a-1,u)):void 0},o),a},i.__iteratorUncached=function(i,o){var u=t.__iterator(mr,o),a=0;return new w(function(){for(;;){var o=u.next();if(o.done)return o;var s=o.value,c=s[0],f=s[1];if(e.call(r,f,c,t))return S(i,n?c:a++,f,o)}})},i}function dt(t,e,r){var n=Ut().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function yt(t,e,r){var n=y(t),i=(m(t)?xe():Ut()).asMutable();t.__iterate(function(o,u){i.update(e.call(r,o,u,t),function(t){return t=t||[],t.push(n?[u,o]:o),t})});var o=Pt(t);return i.map(function(e){return Et(t,o(e))})}function gt(t,e,r,n){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==r&&(r=0|r),s(e,r,i))return t;var o=c(e,i),a=f(r,i);if(o!==o||a!==a)return gt(t.toSeq().cacheResult(),e,r,n);var h,p=a-o;p===p&&(h=0>p?0:p);var l=kt(t);return l.size=0===h?h:t.size&&h||void 0,!n&&U(t)&&h>=0&&(l.get=function(e,r){return e=u(this,e),e>=0&&h>e?t.get(e+o,r):r}),l.__iterateUncached=function(e,r){var i=this;if(0===h)return 0;if(r)return this.cacheResult().__iterate(e,r);var u=0,a=!0,s=0;return t.__iterate(function(t,r){return a&&(a=u++h)return x();var t=i.next();return n||e===br?t:e===gr?S(e,a-1,void 0,t):S(e,a-1,t.value[1],t)})},l}function bt(t,e,r){var n=kt(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var u=0;return t.__iterate(function(t,i,a){return e.call(r,t,i,a)&&++u&&n(t,i,o)}),u},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var u=t.__iterator(mr,i),a=!0;return new w(function(){if(!a)return x();var t=u.next();if(t.done)return t;var i=t.value,s=i[0],c=i[1];return e.call(r,c,s,o)?n===mr?t:S(n,s,c,t):(a=!1,x())})},n}function mt(t,e,r,n){var i=kt(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,s=0;return t.__iterate(function(t,o,c){return a&&(a=e.call(r,t,o,c))?void 0:(s++,i(t,n?o:s-1,u))}),s},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(mr,o),s=!0,c=0;return new w(function(){var t,o,f;do{if(t=a.next(),t.done)return n||i===br?t:i===gr?S(i,c++,void 0,t):S(i,c++,t.value[1],t);var h=t.value;o=h[0],f=h[1],s&&(s=e.call(r,f,o,u))}while(s);return i===mr?t:S(i,o,f,t)})},i}function wt(t,e){var r=y(t),n=[t].concat(e).map(function(t){return d(t)?r&&(t=l(t)):t=r?C(t):F(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&y(i)||g(t)&&g(i))return i}var o=new k(n);return r?o=o.toKeyedSeq():g(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),o}function St(t,e,r){var n=kt(t);return n.__iterateUncached=function(n,i){function o(t,s){var c=this;t.__iterate(function(t,i){return(!e||e>s)&&d(t)?o(t,s+1):n(t,r?i:u++,c)===!1&&(a=!0),!a},i)}var u=0,a=!1;return o(t,0),u},n.__iteratorUncached=function(n,i){var o=t.__iterator(n,i),u=[],a=0;return new w(function(){for(;o;){var t=o.next();if(t.done===!1){var s=t.value;if(n===mr&&(s=s[1]),e&&!(u.length0}function Mt(t,e,r){var n=kt(t);return n.size=new k(r).map(function(t){return t.size}).min(),n.__iterate=function(t,e){for(var r,n=this.__iterator(br,e),i=0;!(r=n.next()).done&&t(r.value,i++,this)!==!1;);return i},n.__iteratorUncached=function(t,n){var i=r.map(function(t){return t=p(t),j(n?t.reverse():t)}),o=0,u=!1;return new w(function(){var r;return u||(r=i.map(function(t){return t.next()}),u=r.some(function(t){return t.done})),u?x():S(t,o++,e.apply(null,r.map(function(t){return t.value})))})},n}function Et(t,e){return U(t)?e:t.constructor(e)}function Dt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function At(t){return at(t.size),o(t)}function Pt(t){return y(t)?l:g(t)?v:_}function kt(t){return Object.create((y(t)?D:g(t)?A:P).prototype)}function qt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):E.prototype.cacheResult.call(this)}function Rt(t,e){return t>e?1:e>t?-1:0}function Tt(t){var e=j(t);if(!e){if(!M(t))throw new TypeError("Expected iterable or array-like: "+t);e=j(p(t))}return e}function Ut(t){return null===t||void 0===t?$t():Kt(t)&&!m(t)?t:$t().withMutations(function(e){var r=l(t);at(r.size),r.forEach(function(t,r){return e.set(r,t)})})}function Kt(t){return!(!t||!t[Ur])}function Ct(t,e){this.ownerID=t,this.entries=e}function Ft(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function Lt(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function Bt(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function Nt(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function Wt(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Vt(t._root)}function Jt(t,e){return S(t,e[0],e[1])}function Vt(t,e){return{node:t,index:0,__prev:e}}function Gt(t,e,r,n){var i=Object.create(Kr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function $t(){return Cr||(Cr=Gt(0))}function Ht(t,r,n){var i,o;if(t._root){var u=e(pr),a=e(lr);if(i=Zt(t._root,t.__ownerID,0,void 0,r,n,u,a),!a.value)return t;o=t.size+(u.value?n===hr?-1:1:0)}else{if(n===hr)return t;o=1,i=new Ct(t.__ownerID,[[r,n]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Gt(o,i):$t()}function Zt(t,e,n,i,o,u,a,s){return t?t.update(e,n,i,o,u,a,s):u===hr?t:(r(s),r(a),new Nt(e,i,[o,u]))}function Yt(t){return t.constructor===Nt||t.constructor===Bt}function Xt(t,e,r,n,i){if(t.keyHash===n)return new Bt(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&fr,a=(0===r?n:n>>>r)&fr,s=u===a?[Xt(t,e,r+sr,n,i)]:(o=new Nt(e,n,i),a>u?[t,o]:[o,t]);return new Ft(e,1<a;a++,s<<=1){var f=e[a];void 0!==f&&a!==n&&(i|=s,u[o++]=f)}return new Ft(t,i,u)}function ee(t,e,r,n,i){for(var o=0,u=new Array(cr),a=0;0!==r;a++,r>>>=1)u[a]=1&r?e[o++]:void 0;return u[n]=i,new Lt(t,o+1,u)}function re(t,e,r){for(var n=[],i=0;i>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function ae(t,e,r,n){var o=n?t:i(t);return o[e]=r,o}function se(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=new Array(i),u=0,a=0;i>a;a++)a===e?(o[a]=r,u=-1):o[a]=t[a+u];return o}function ce(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,u=0;n>u;u++)u===e&&(o=1),i[u]=t[u+o];return i}function fe(t){var e=_e();if(null===t||void 0===t)return e;if(he(t))return t;var r=v(t),n=r.size;return 0===n?e:(at(n),n>0&&cr>n?ve(0,n,sr,null,new pe(r.toArray())):e.withMutations(function(t){t.setSize(n),r.forEach(function(e,r){return t.set(r,e)})}))}function he(t){return!(!t||!t[Nr])}function pe(t,e){this.array=t,this.ownerID=e}function le(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r)}function n(t,r){var n=r===a?s&&s.array:t&&t.array,i=r>o?0:o-r,c=u-r;return c>cr&&(c=cr),function(){if(i===c)return Vr;var t=e?--c:i++;return n&&n[t]}}function i(t,n,i){var a,s=t&&t.array,c=i>o?0:o-i>>n,f=(u-i>>n)+1;return f>cr&&(f=cr),function(){for(;;){if(a){var t=a();if(t!==Vr)return t;a=null}if(c===f)return Vr;var o=e?--f:c++;a=r(s&&s[o],n-sr,i+(o<=t.size||0>r)return t.withMutations(function(t){0>r?me(t,r).set(0,n):me(t,0,r+1).set(r,n)});r+=t._origin;var i=t._tail,o=t._root,a=e(lr);return r>=Se(t._capacity)?i=ye(i,t.__ownerID,0,r,n,a):o=ye(o,t.__ownerID,t._level,r,n,a),a.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):ve(t._origin,t._capacity,t._level,o,i):t}function ye(t,e,n,i,o,u){var a=i>>>n&fr,s=t&&a0){var f=t&&t.array[a],h=ye(f,e,n-sr,i,o,u);return h===f?t:(c=ge(t,e),c.array[a]=h,c)}return s&&t.array[a]===o?t:(r(u),c=ge(t,e),void 0===o&&a===c.array.length-1?c.array.pop():c.array[a]=o,c)}function ge(t,e){return e&&t&&e===t.ownerID?t:new pe(t?t.array.slice():[],e)}function be(t,e){if(e>=Se(t._capacity))return t._tail;if(e<1<0;)r=r.array[e>>>n&fr],n-=sr;return r}}function me(t,e,r){void 0!==e&&(e=0|e),void 0!==r&&(r=0|r);var i=t.__ownerID||new n,o=t._origin,u=t._capacity,a=o+e,s=void 0===r?u:0>r?u+r:o+r;if(a===o&&s===u)return t;if(a>=s)return t.clear();for(var c=t._level,f=t._root,h=0;0>a+h;)f=new pe(f&&f.array.length?[void 0,f]:[],i),c+=sr,h+=1<=1<l?be(t,s-1):l>p?new pe([],i):v;if(v&&l>p&&u>a&&v.array.length){f=ge(f,i);for(var d=f,y=c;y>sr;y-=sr){var g=p>>>y&fr;d=d.array[g]=ge(d.array[g],i)}d.array[p>>>sr&fr]=v}if(u>s&&(_=_&&_.removeAfter(i,0,s)),a>=l)a-=l,s-=l,c=sr,f=null,_=_&&_.removeBefore(i,0,a);else if(a>o||p>l){for(h=0;f;){var b=a>>>c&fr;if(b!==l>>>c&fr)break;b&&(h+=(1<o&&(f=f.removeBefore(i,c,a-h)),f&&p>l&&(f=f.removeAfter(i,c,l-h)),h&&(a-=h,s-=h)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=c,t._root=f,t._tail=_,t.__hash=void 0,t.__altered=!0,t):ve(a,s,c,f,_)}function we(t,e,r){for(var n=[],i=0,o=0;oi&&(i=a.size),d(u)||(a=a.map(function(t){return Z(t)})),n.push(a)}return i>t.size&&(t=t.setSize(i)),ie(t,e,n)}function Se(t){return cr>t?0:t-1>>>sr<=cr&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&a!==e}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=a===u.size-1?u.pop():u.set(a,void 0))}else if(s){if(r===u.get(a)[1])return t;n=o,i=u.set(a,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):Ie(n,i)}function Me(t){return null===t||void 0===t?Ae():Ee(t)?t:Ae().unshiftAll(t)}function Ee(t){return!(!t||!t[$r])}function De(t,e,r,n){var i=Object.create(Hr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Ae(){return Zr||(Zr=De(0))}function Pe(t){return null===t||void 0===t?Te():ke(t)&&!m(t)?t:Te().withMutations(function(e){var r=_(t);at(r.size),r.forEach(function(t){return e.add(t)})})}function ke(t){return!(!t||!t[Yr])}function qe(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Re(t,e){var r=Object.create(Xr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Te(){return Qr||(Qr=Re($t()))}function Ue(t){return null===t||void 0===t?Fe():Ke(t)?t:Fe().withMutations(function(e){var r=_(t);at(r.size),r.forEach(function(t){return e.add(t)})})}function Ke(t){return ke(t)&&m(t)}function Ce(t,e){var r=Object.create(tn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Fe(){return en||(en=Ce(je()))}function Le(t,e){var r,n=function(o){if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var u=Object.keys(t);We(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=Ut(o)},i=n.prototype=Object.create(rn);return i.constructor=n,n}function Be(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function Ne(t){return t._name||t.constructor.name||"Record"}function We(t,e){try{e.forEach(Je.bind(void 0,t))}catch(r){}}function Je(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){ut(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Ve(t,e){if(t===e)return!0;if(!d(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||y(t)!==y(e)||g(t)!==g(e)||m(t)!==m(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!b(t);if(m(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&H(i[1],t)&&(r||H(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,a=e.__iterate(function(e,n){return(r?t.has(e):i?H(e,t.get(n,hr)):H(t.get(n,hr),e))?void 0:(u=!1,!1)});return u&&t.size===a}function Ge(t,e,r){if(!(this instanceof Ge))return new Ge(t,e,r);if(ut(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(nn)return nn;nn=this}}function $e(t,e){if(!(this instanceof $e))return new $e(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(on)return on;on=this}}function He(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Ze(t,e){return e}function Ye(t,e){return[e,t]}function Xe(t){return function(){return!t.apply(this,arguments)}}function Qe(t){return function(){return-t.apply(this,arguments)}}function tr(t){return"string"==typeof t?JSON.stringify(t):t}function er(){return i(arguments)}function rr(t,e){return e>t?1:t>e?-1:0}function nr(t){if(t.size===1/0)return 0;var e=m(t),r=y(t),n=e?1:0,i=t.__iterate(r?e?function(t,e){n=31*n+or(et(t),et(e))|0}:function(t,e){n=n+or(et(t),et(e))|0}:e?function(t){n=31*n+et(t)|0}:function(t){n=n+et(t)|0});return ir(i,n)}function ir(t,e){return e=zr(e,3432918353),e=zr(e<<15|e>>>-15,461845907),e=zr(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=zr(e^e>>>16,2246822507),e=zr(e^e>>>13,3266489909),e=tt(e^e>>>16)}function or(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var ur=Array.prototype.slice,ar="delete",sr=5,cr=1<=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},k.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new w(function(){return i>n?x():S(t,i,r[e?n-i++:i++])})},t(q,D),q.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e; +},q.prototype.has=function(t){return this._object.hasOwnProperty(t)},q.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;i>=o;o++){var u=n[e?i-o:o];if(t(r[u],u,this)===!1)return o+1}return o},q.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new w(function(){var u=n[e?i-o:o];return o++>i?x():S(t,u,r[u])})},q.prototype[yr]=!0,t(R,A),R.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=j(r),i=0;if(I(n))for(var o;!(o=n.next()).done&&t(o.value,i++,this)!==!1;);return i},R.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=j(r);if(!I(n))return new w(x);var i=0;return new w(function(){var e=n.next();return e.done?e:S(t,i++,e.value)})},t(T,A),T.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;i=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return S(t,i,n[i++])})};var Ir;t(J,p),t(V,J),t(G,J),t($,J),J.Keyed=V,J.Indexed=G,J.Set=$;var jr,zr="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},Mr=Object.isExtensible,Er=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Dr="function"==typeof WeakMap;Dr&&(jr=new WeakMap);var Ar=0,Pr="__immutablehash__";"function"==typeof Symbol&&(Pr=Symbol(Pr));var kr=16,qr=255,Rr=0,Tr={};t(st,D),st.prototype.get=function(t,e){return this._iter.get(t,e)},st.prototype.has=function(t){return this._iter.has(t)},st.prototype.valueSeq=function(){return this._iter.valueSeq()},st.prototype.reverse=function(){var t=this,e=vt(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},st.prototype.map=function(t,e){var r=this,n=lt(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},st.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?At(this):0,function(i){return t(i,e?--r:r++,n)}),e)},st.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(br,e),n=e?At(this):0;return new w(function(){var i=r.next();return i.done?i:S(t,e?--n:n++,i.value,i)})},st.prototype[yr]=!0,t(ct,A),ct.prototype.includes=function(t){return this._iter.includes(t)},ct.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ct.prototype.__iterator=function(t,e){var r=this._iter.__iterator(br,e),n=0;return new w(function(){var e=r.next();return e.done?e:S(t,n++,e.value,e)})},t(ft,P),ft.prototype.has=function(t){return this._iter.includes(t)},ft.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},ft.prototype.__iterator=function(t,e){var r=this._iter.__iterator(br,e);return new w(function(){var e=r.next();return e.done?e:S(t,e.value,e.value,e)})},t(ht,D),ht.prototype.entrySeq=function(){return this._iter.toSeq()},ht.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){Dt(e);var n=d(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},ht.prototype.__iterator=function(t,e){var r=this._iter.__iterator(br,e);return new w(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){Dt(n);var i=d(n);return S(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ct.prototype.cacheResult=st.prototype.cacheResult=ft.prototype.cacheResult=ht.prototype.cacheResult=qt,t(Ut,V),Ut.prototype.toString=function(){return this.__toString("Map {","}")},Ut.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Ut.prototype.set=function(t,e){return Ht(this,t,e)},Ut.prototype.setIn=function(t,e){return this.updateIn(t,hr,function(){return e})},Ut.prototype.remove=function(t){return Ht(this,t,hr)},Ut.prototype.deleteIn=function(t){return this.updateIn(t,function(){return hr})},Ut.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},Ut.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=oe(this,Tt(t),e,r);return n===hr?void 0:n},Ut.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):$t()},Ut.prototype.merge=function(){return re(this,void 0,arguments)},Ut.prototype.mergeWith=function(t){var e=ur.call(arguments,1);return re(this,t,e)},Ut.prototype.mergeIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,$t(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},Ut.prototype.mergeDeep=function(){return re(this,ne(void 0),arguments)},Ut.prototype.mergeDeepWith=function(t){var e=ur.call(arguments,1);return re(this,ne(t),e)},Ut.prototype.mergeDeepIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,$t(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},Ut.prototype.sort=function(t){return xe(It(this,t))},Ut.prototype.sortBy=function(t,e){return xe(It(this,e,t))},Ut.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Ut.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new n)},Ut.prototype.asImmutable=function(){return this.__ensureOwner()},Ut.prototype.wasAltered=function(){return this.__altered},Ut.prototype.__iterator=function(t,e){return new Wt(this,t,e)},Ut.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},Ut.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Gt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ut.isMap=Kt;var Ur="@@__IMMUTABLE_MAP__@@",Kr=Ut.prototype;Kr[Ur]=!0,Kr[ar]=Kr.remove,Kr.removeIn=Kr.deleteIn,Ct.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(H(r,i[o][0]))return i[o][1];return n},Ct.prototype.update=function(t,e,n,o,u,a,s){for(var c=u===hr,f=this.entries,h=0,p=f.length;p>h&&!H(o,f[h][0]);h++);var l=p>h;if(l?f[h][1]===u:c)return this;if(r(s),(c||!l)&&r(a),!c||1!==f.length){if(!l&&!c&&f.length>=Fr)return Qt(t,f,o,u);var v=t&&t===this.ownerID,_=v?f:i(f);return l?c?h===p-1?_.pop():_[h]=_.pop():_[h]=[o,u]:_.push([o,u]),v?(this.entries=_,this):new Ct(t,_)}},Ft.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=1<<((0===t?e:e>>>t)&fr),o=this.bitmap;return 0===(o&i)?n:this.nodes[ue(o&i-1)].get(t+sr,e,r,n)},Ft.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var a=(0===e?r:r>>>e)&fr,s=1<=Lr)return ee(t,p,c,a,v);if(f&&!v&&2===p.length&&Yt(p[1^h]))return p[1^h];if(f&&v&&1===p.length&&Yt(v))return v;var _=t&&t===this.ownerID,d=f?v?c:c^s:c|s,y=f?v?ae(p,h,v,_):ce(p,h,_):se(p,h,v,_);return _?(this.bitmap=d,this.nodes=y,this):new Ft(t,d,y)},Lt.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=(0===t?e:e>>>t)&fr,o=this.nodes[i];return o?o.get(t+sr,e,r,n):n},Lt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var a=(0===e?r:r>>>e)&fr,s=i===hr,c=this.nodes,f=c[a];if(s&&!f)return this;var h=Zt(f,t,e+sr,r,n,i,o,u);if(h===f)return this;var p=this.count;if(f){if(!h&&(p--,Br>p))return te(t,c,p,a)}else p++;var l=t&&t===this.ownerID,v=ae(c,a,h,l);return l?(this.count=p,this.nodes=v,this):new Lt(t,p,v)},Bt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(H(r,i[o][0]))return i[o][1];return n},Bt.prototype.update=function(t,e,n,o,u,a,s){void 0===n&&(n=et(o));var c=u===hr;if(n!==this.keyHash)return c?this:(r(s),r(a),Xt(this,t,e,n,[o,u]));for(var f=this.entries,h=0,p=f.length;p>h&&!H(o,f[h][0]);h++);var l=p>h;if(l?f[h][1]===u:c)return this;if(r(s),(c||!l)&&r(a),c&&2===p)return new Nt(t,this.keyHash,f[1^h]);var v=t&&t===this.ownerID,_=v?f:i(f);return l?c?h===p-1?_.pop():_[h]=_.pop():_[h]=[o,u]:_.push([o,u]),v?(this.entries=_,this):new Bt(t,this.keyHash,_)},Nt.prototype.get=function(t,e,r,n){return H(r,this.entry[0])?this.entry[1]:n},Nt.prototype.update=function(t,e,n,i,o,u,a){var s=o===hr,c=H(i,this.entry[0]);return(c?o===this.entry[1]:s)?this:(r(a),s?void r(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new Nt(t,this.keyHash,[i,o]):(r(u),Xt(this,t,e,et(i),[i,o])))},Ct.prototype.iterate=Bt.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1},Ft.prototype.iterate=Lt.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},Nt.prototype.iterate=function(t,e){return t(this.entry)},t(Wt,w),Wt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return Jt(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return Jt(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return Jt(t,o.entry);e=this._stack=Vt(o,e)}continue}e=this._stack=this._stack.__prev}return x()};var Cr,Fr=cr/4,Lr=cr/2,Br=cr/4;t(fe,G),fe.of=function(){return this(arguments)},fe.prototype.toString=function(){return this.__toString("List [","]")},fe.prototype.get=function(t,e){if(t=u(this,t),t>=0&&t>>e&fr;if(n>=this.array.length)return new pe([],t);var i,o=0===n;if(e>0){var u=this.array[n];if(i=u&&u.removeBefore(t,e-sr,r),i===u&&o)return this}if(o&&!i)return this;var a=ge(this,t);if(!o)for(var s=0;n>s;s++)a.array[s]=void 0;return i&&(a.array[n]=i),a},pe.prototype.removeAfter=function(t,e,r){if(r===(e?1<>>e&fr;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n];if(i=o&&o.removeAfter(t,e-sr,r),i===o&&n===this.array.length-1)return this}var u=ge(this,t);return u.array.splice(n+1),i&&(u.array[n]=i),u};var Jr,Vr={};t(xe,Ut),xe.of=function(){return this(arguments)},xe.prototype.toString=function(){return this.__toString("OrderedMap {","}")},xe.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},xe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):je()},xe.prototype.set=function(t,e){return ze(this,t,e)},xe.prototype.remove=function(t){return ze(this,t,hr)},xe.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},xe.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},xe.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},xe.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Ie(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},xe.isOrderedMap=Oe,xe.prototype[yr]=!0,xe.prototype[ar]=xe.prototype.remove;var Gr;t(Me,G),Me.of=function(){return this(arguments)},Me.prototype.toString=function(){return this.__toString("Stack [","]")},Me.prototype.get=function(t,e){var r=this._head;for(t=u(this,t);r&&t--;)r=r.next;return r?r.value:e},Me.prototype.peek=function(){return this._head&&this._head.value},Me.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):De(t,e)},Me.prototype.pushAll=function(t){if(t=v(t),0===t.size)return this;at(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):De(e,r)},Me.prototype.pop=function(){return this.slice(1)},Me.prototype.unshift=function(){return this.push.apply(this,arguments)},Me.prototype.unshiftAll=function(t){return this.pushAll(t)},Me.prototype.shift=function(){return this.pop.apply(this,arguments)},Me.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ae()},Me.prototype.slice=function(t,e){if(s(t,e,this.size))return this;var r=c(t,this.size),n=f(e,this.size);if(n!==this.size)return G.prototype.slice.call(this,t,e);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):De(i,o)},Me.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?De(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Me.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},Me.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new w(function(){if(n){var e=n.value;return n=n.next,S(t,r++,e)}return x()})},Me.isStack=Ee;var $r="@@__IMMUTABLE_STACK__@@",Hr=Me.prototype;Hr[$r]=!0,Hr.withMutations=Kr.withMutations,Hr.asMutable=Kr.asMutable,Hr.asImmutable=Kr.asImmutable,Hr.wasAltered=Kr.wasAltered;var Zr;t(Pe,$),Pe.of=function(){return this(arguments)},Pe.fromKeys=function(t){return this(l(t).keySeq())},Pe.prototype.toString=function(){return this.__toString("Set {","}")},Pe.prototype.has=function(t){return this._map.has(t)},Pe.prototype.add=function(t){return qe(this,this._map.set(t,!0))},Pe.prototype.remove=function(t){return qe(this,this._map.remove(t))},Pe.prototype.clear=function(){return qe(this,this._map.clear())},Pe.prototype.union=function(){var t=ur.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var r=0;r1?" by "+this._step:"")+" ]"},Ge.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},Ge.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new Ge(0,0):new Ge(this.get(t,this._end),this.get(e,this._end),this._step))},Ge.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&r=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-n:n}return o},Ge.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new w(function(){var u=i;return i+=e?-n:n,o>r?x():S(t,o++,u)})},Ge.prototype.equals=function(t){return t instanceof Ge?this._start===t._start&&this._end===t._end&&this._step===t._step:Ve(this,t)};var nn;t($e,A),$e.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},$e.prototype.get=function(t,e){return this.has(t)?this._value:e},$e.prototype.includes=function(t){return H(this._value,t)},$e.prototype.slice=function(t,e){var r=this.size;return s(t,e,r)?this:new $e(this._value,f(e,r)-c(t,r))},$e.prototype.reverse=function(){return this},$e.prototype.indexOf=function(t){return H(this._value,t)?0:-1},$e.prototype.lastIndexOf=function(t){return H(this._value,t)?this.size:-1},$e.prototype.__iterate=function(t,e){for(var r=0;rt?this.count():this.size);var n=this.slice(0,t);return Et(this,1===r?n:n.concat(i(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return Et(this,St(this,t,!1))},get:function(t,e){return t=u(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t-1&&t%1===0&&t<=Number.MAX_VALUE}var i=Function.prototype.bind;e.isString=function(t){return"string"==typeof t||"[object String]"===r(t)},e.isArray=Array.isArray||function(t){return"[object Array]"===r(t)},"function"!=typeof/./&&"object"!=typeof Int8Array?e.isFunction=function(t){return"function"==typeof t||!1}:e.isFunction=function(t){return"[object Function]"===toString.call(t)},e.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},e.extend=function(t){var e=arguments.length;if(!t||2>e)return t||{};for(var r=1;e>r;r++)for(var n=arguments[r],i=Object.keys(n),o=i.length,u=0;o>u;u++){var a=i[u];t[a]=n[a]}return t},e.clone=function(t){return e.isObject(t)?e.isArray(t)?t.slice():e.extend({},t):t},e.each=function(t,e,r){var i,o,u=t?t.length:0,a=-1;if(r&&(o=e,e=function(t,e,n){return o.call(r,t,e,n)}),n(u))for(;++an;n++)r[n]=arguments[n];return new(i.apply(t,[null].concat(r)))};return e.__proto__=t,e.prototype=t.prototype,e}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return c["default"].Iterable.isIterable(t)}function o(t){return i(t)||!(0,f.isObject)(t)}function u(t){return i(t)?t.toJS():t}function a(t){return i(t)?t:c["default"].fromJS(t); +}Object.defineProperty(e,"__esModule",{value:!0}),e.isImmutable=i,e.isImmutableValue=o,e.toJS=u,e.toImmutable=a;var s=r(3),c=n(s),f=r(4)},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e["default"]=t,e}function i(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var r=0;r0)){var e=this.reactorState.get("dirtyStores");if(0!==e.size){var r=c["default"].Set().withMutations(function(r){r.union(t.observerState.get("any")),e.forEach(function(e){var n=t.observerState.getIn(["stores",e]);n&&r.union(n)})});r.forEach(function(e){var r=t.observerState.getIn(["observersMap",e]);if(r){var n=r.get("getter"),i=r.get("handler"),o=l.evaluate(t.prevReactorState,n),u=l.evaluate(t.reactorState,n);t.prevReactorState=o.reactorState,t.reactorState=u.reactorState;var a=o.result,s=u.result;c["default"].is(a,s)||i.call(null,s)}});var n=l.resetDirtyStores(this.reactorState);this.prevReactorState=n,this.reactorState=n}}}},{key:"batchStart",value:function(){this.__batchDepth++}},{key:"batchEnd",value:function(){if(this.__batchDepth--,this.__batchDepth<=0){this.__isDispatching=!0;try{this.__notify()}catch(t){throw this.__isDispatching=!1,t}this.__isDispatching=!1}}}]),t}();e["default"]=(0,y.toFactory)(b),t.exports=e["default"]},function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){var r={};return(0,o.each)(e,function(e,n){r[n]=t.evaluate(e)}),r}Object.defineProperty(e,"__esModule",{value:!0});var o=r(4);e["default"]=function(t){return{getInitialState:function(){return i(t,this.getDataBindings())},componentDidMount:function(){var e=this;this.__unwatchFns=[],(0,o.each)(this.getDataBindings(),function(r,i){var o=t.observe(r,function(t){e.setState(n({},i,t))});e.__unwatchFns.push(o)})},componentWillUnmount:function(){for(;this.__unwatchFns.length;)this.__unwatchFns.shift()()}}},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return new P({result:t,reactorState:e})}function o(t,e){return t.withMutations(function(t){(0,A.each)(e,function(e,r){t.getIn(["stores",r])&&console.warn("Store already defined for id = "+r);var n=e.getInitialState();if(void 0===n&&f(t,"throwOnUndefinedStoreReturnValue"))throw new Error("Store getInitialState() must return a value, did you forget a return statement");if(f(t,"throwOnNonImmutableStore")&&!(0,M.isImmutableValue)(n))throw new Error("Store getInitialState() must return an immutable value, did you forget to call toImmutable");t.update("stores",function(t){return t.set(r,e)}).update("state",function(t){return t.set(r,n)}).update("dirtyStores",function(t){return t.add(r)}).update("storeStates",function(t){return x(t,[r])})}),S(t)})}function u(t,e){return t.withMutations(function(t){(0,A.each)(e,function(e,r){t.update("stores",function(t){return t.set(r,e)})})})}function a(t,e,r){if(void 0===e&&f(t,"throwOnUndefinedActionType"))throw new Error("`dispatch` cannot be called with an `undefined` action type.");var n=t.get("state"),i=t.get("dirtyStores"),o=n.withMutations(function(n){z["default"].dispatchStart(t,e,r),t.get("stores").forEach(function(o,u){var a=n.get(u),s=void 0;try{s=o.handle(a,e,r)}catch(c){throw z["default"].dispatchError(t,c.message),c}if(void 0===s&&f(t,"throwOnUndefinedStoreReturnValue")){var h="Store handler must return a value, did you forget a return statement";throw z["default"].dispatchError(t,h),new Error(h)}n.set(u,s),a!==s&&(i=i.add(u))}),z["default"].dispatchEnd(t,n,i)}),u=t.set("state",o).set("dirtyStores",i).update("storeStates",function(t){return x(t,i)});return S(u)}function s(t,e){var r=[],n=(0,M.toImmutable)({}).withMutations(function(n){(0,A.each)(e,function(e,i){var o=t.getIn(["stores",i]);if(o){var u=o.deserialize(e);void 0!==u&&(n.set(i,u),r.push(i))}})}),i=I["default"].Set(r);return t.update("state",function(t){return t.merge(n)}).update("dirtyStores",function(t){return t.union(i)}).update("storeStates",function(t){return x(t,r)})}function c(t,e,r){var n=e;(0,D.isKeyPath)(e)&&(e=(0,E.fromKeyPath)(e));var i=t.get("nextId"),o=(0,E.getStoreDeps)(e),u=I["default"].Map({id:i,storeDeps:o,getterKey:n,getter:e,handler:r}),a=void 0;return a=0===o.size?t.update("any",function(t){return t.add(i)}):t.withMutations(function(t){o.forEach(function(e){var r=["stores",e];t.hasIn(r)||t.setIn(r,I["default"].Set()),t.updateIn(["stores",e],function(t){return t.add(i)})})}),a=a.set("nextId",i+1).setIn(["observersMap",i],u),{observerState:a,entry:u}}function f(t,e){var r=t.getIn(["options",e]);if(void 0===r)throw new Error("Invalid option: "+e);return r}function h(t,e,r){var n=t.get("observersMap").filter(function(t){var n=t.get("getterKey"),i=!r||t.get("handler")===r;return i?(0,D.isKeyPath)(e)&&(0,D.isKeyPath)(n)?(0,D.isEqual)(e,n):e===n:!1});return t.withMutations(function(t){n.forEach(function(e){return p(t,e)})})}function p(t,e){return t.withMutations(function(t){var r=e.get("id"),n=e.get("storeDeps");0===n.size?t.update("any",function(t){return t.remove(r)}):n.forEach(function(e){t.updateIn(["stores",e],function(t){return t?t.remove(r):t})}),t.removeIn(["observersMap",r])})}function l(t){var e=t.get("state");return t.withMutations(function(t){var r=t.get("stores"),n=r.keySeq().toJS();r.forEach(function(r,n){var i=e.get(n),o=r.handleReset(i);if(void 0===o&&f(t,"throwOnUndefinedStoreReturnValue"))throw new Error("Store handleReset() must return a value, did you forget a return statement");if(f(t,"throwOnNonImmutableStore")&&!(0,M.isImmutableValue)(o))throw new Error("Store reset state must be an immutable value, did you forget to call toImmutable");t.setIn(["state",n],o)}),t.update("storeStates",function(t){return x(t,n)}),d(t)})}function v(t,e){var r=t.get("state");if((0,D.isKeyPath)(e))return i(r.getIn(e),t);if(!(0,E.isGetter)(e))throw new Error("evaluate must be passed a keyPath or Getter");if(b(t,e))return i(w(t,e),t);var n=(0,E.getDeps)(e).map(function(e){return v(t,e).result}),o=(0,E.getComputeFn)(e).apply(null,n);return i(o,m(t,e,o))}function _(t){var e={};return t.get("stores").forEach(function(r,n){var i=t.getIn(["state",n]),o=r.serialize(i);void 0!==o&&(e[n]=o)}),e}function d(t){return t.set("dirtyStores",I["default"].Set())}function y(t){return t}function g(t,e){var r=y(e);return t.getIn(["cache",r])}function b(t,e){var r=g(t,e);if(!r)return!1;var n=r.get("storeStates");return 0===n.size?!1:n.every(function(e,r){return t.getIn(["storeStates",r])===e})}function m(t,e,r){var n=y(e),i=t.get("dispatchId"),o=(0,E.getStoreDeps)(e),u=(0,M.toImmutable)({}).withMutations(function(e){o.forEach(function(r){var n=t.getIn(["storeStates",r]);e.set(r,n)})});return t.setIn(["cache",n],I["default"].Map({value:r,storeStates:u,dispatchId:i}))}function w(t,e){var r=y(e);return t.getIn(["cache",r,"value"])}function S(t){return t.update("dispatchId",function(t){return t+1})}function x(t,e){return t.withMutations(function(t){e.forEach(function(e){var r=t.has(e)?t.get(e)+1:1;t.set(e,r)})})}Object.defineProperty(e,"__esModule",{value:!0}),e.registerStores=o,e.replaceStores=u,e.dispatch=a,e.loadState=s,e.addObserver=c,e.getOption=f,e.removeObserver=h,e.removeObserverByEntry=p,e.reset=l,e.evaluate=v,e.serialize=_,e.resetDirtyStores=d;var O=r(3),I=n(O),j=r(9),z=n(j),M=r(5),E=r(10),D=r(11),A=r(4),P=I["default"].Record({result:null,reactorState:null})},function(t,e,r){"use strict";var n=r(8);e.dispatchStart=function(t,e,r){(0,n.getOption)(t,"logDispatches")&&console.group&&(console.groupCollapsed("Dispatch: %s",e),console.group("payload"),console.debug(r),console.groupEnd())},e.dispatchError=function(t,e){(0,n.getOption)(t,"logDispatches")&&console.group&&(console.debug("Dispatch error: "+e),console.groupEnd())},e.dispatchEnd=function(t,e,r){(0,n.getOption)(t,"logDispatches")&&console.group&&((0,n.getOption)(t,"logDirtyStores")&&console.log("Stores updated:",r.toList().toJS()),(0,n.getOption)(t,"logAppState")&&console.debug("Dispatch done, new state: ",e.toJS()),console.groupEnd())}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return(0,p.isArray)(t)&&(0,p.isFunction)(t[t.length-1])}function o(t){return t[t.length-1]}function u(t){return t.slice(0,t.length-1)}function a(t,e){e||(e=h["default"].Set());var r=h["default"].Set().withMutations(function(e){if(!i(t))throw new Error("getFlattenedDeps must be passed a Getter");u(t).forEach(function(t){if((0,l.isKeyPath)(t))e.add((0,f.List)(t));else{if(!i(t))throw new Error("Invalid getter, each dependency must be a KeyPath or Getter");e.union(a(t))}})});return e.union(r)}function s(t){if(!(0,l.isKeyPath)(t))throw new Error("Cannot create Getter from KeyPath: "+t);return[t,v]}function c(t){if(t.hasOwnProperty("__storeDeps"))return t.__storeDeps;var e=a(t).map(function(t){return t.first()}).filter(function(t){return!!t});return Object.defineProperty(t,"__storeDeps",{enumerable:!1,configurable:!1,writable:!1,value:e}),e}Object.defineProperty(e,"__esModule",{value:!0});var f=r(3),h=n(f),p=r(4),l=r(11),v=function(t){return t};e["default"]={isGetter:i,getComputeFn:o,getFlattenedDeps:a,getStoreDeps:c,getDeps:u,fromKeyPath:s},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return(0,s.isArray)(t)&&!(0,s.isFunction)(t[t.length-1])}function o(t,e){var r=a["default"].List(t),n=a["default"].List(e);return a["default"].is(r,n)}Object.defineProperty(e,"__esModule",{value:!0}),e.isKeyPath=i,e.isEqual=o;var u=r(3),a=n(u),s=r(4)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(3),i=(0,n.Map)({logDispatches:!1,logAppState:!1,logDirtyStores:!1,throwOnUndefinedActionType:!1,throwOnUndefinedStoreReturnValue:!1,throwOnNonImmutableStore:!1,throwOnDispatchInDispatch:!1});e.PROD_OPTIONS=i;var o=(0,n.Map)({logDispatches:!0,logAppState:!0,logDirtyStores:!0,throwOnUndefinedActionType:!0,throwOnUndefinedStoreReturnValue:!0,throwOnNonImmutableStore:!0,throwOnDispatchInDispatch:!0});e.DEBUG_OPTIONS=o;var u=(0,n.Record)({dispatchId:0,state:(0,n.Map)(),stores:(0,n.Map)(),cache:(0,n.Map)(),storeStates:(0,n.Map)(),dirtyStores:(0,n.Set)(),debug:!1,options:i});e.ReactorState=u;var a=(0,n.Record)({any:(0,n.Set)(),stores:(0,n.Map)({}),observersMap:(0,n.Map)({}),nextId:1});e.ObserverState=a}])})},function(e,r){e.exports=t},function(t,r){t.exports=e},function(t,e,r){(function(e){"use strict";var r=function(t,r,n,i,o,u,a,s){if("production"!==e.env.NODE_ENV&&void 0===r)throw new Error("invariant requires an error message argument");if(!t){var c;if(void 0===r)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,i,o,u,a,s],h=0;c=new Error(r.replace(/%s/g,function(){return f[h++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};t.exports=r}).call(e,r(1))},function(t,e,r){function n(t){var e=i(t)?s.call(t):"";return e==o||e==u}var i=r(7),o="[object Function]",u="[object GeneratorFunction]",a=Object.prototype,s=a.toString;t.exports=n},function(t,e){function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=r},function(t,e,r){function n(t,e){return"function"==typeof e&&a(t)?i(t,e):o(t,u(e))}var i=r(9),o=r(10),u=r(32),a=r(27);t.exports=n},function(t,e){function r(t,e){for(var r=-1,n=t.length;++r-1&&t%1==0&&n>=t}var n=9007199254740991;t.exports=r},function(t,e){function r(t){return!!t&&"object"==typeof t}t.exports=r},function(t,e){var r=Array.isArray;t.exports=r},function(t,e,r){function n(t){return"string"==typeof t||!i(t)&&o(t)&&s.call(t)==u}var i=r(27),o=r(26),u="[object String]",a=Object.prototype,s=a.toString;t.exports=n},function(t,e){function r(t,e){return t="number"==typeof t||i.test(t)?+t:-1,e=null==e?n:e,t>-1&&t%1==0&&e>t}var n=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=r},function(t,e){function r(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||n;return t===r}var n=Object.prototype;t.exports=r},function(t,e,r){function n(t,e){return function(r,n){if(null==r)return r;if(!i(r))return t(r,n);for(var o=r.length,u=e?o:-1,a=Object(r);(e?u--:++ur)return!1;var n=t.length-1;return r==n?t.pop():u.call(t,r,1),!0}var i=r(39),o=Array.prototype,u=o.splice;t.exports=n},function(t,e,r){function n(t,e){for(var r=t.length;r--;)if(i(t[r][0],e))return r;return-1}var i=r(40);t.exports=n},function(t,e){function r(t,e){return t===e||t!==t&&e!==e}t.exports=r},function(t,e,r){function n(t){var e=this.__data__,r=e.array;return r?i(r,t):e.map.get(t)}var i=r(42);t.exports=n},function(t,e,r){function n(t,e){var r=i(t,e);return 0>r?void 0:t[r][1]}var i=r(39);t.exports=n},function(t,e,r){function n(t){var e=this.__data__,r=e.array;return r?i(r,t):e.map.has(t)}var i=r(44);t.exports=n},function(t,e,r){function n(t,e){return i(t,e)>-1}var i=r(39);t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__,n=r.array;n&&(n.lengthn?t.push([e,r]):t[n][1]=r}var i=r(39);t.exports=n},function(t,e,r){function n(t,e,r){t[e]=i&&void 0===r?o:r}var i=r(49),o="__lodash_hash_undefined__";t.exports=n},function(t,e,r){function n(t,e,r,a,s){return t===e?!0:null==t||null==e||!o(t)&&!u(e)?t!==t&&e!==e:i(t,e,n,r,a,s)}var i=r(69),o=r(7),u=r(26);t.exports=n},function(t,e,r){function n(t,e,r,n,d,g){var b=c(t),m=c(e),w=v,S=v;b||(w=s(t),w=w==l?_:w),m||(S=s(e),S=S==l?_:S);var x=w==_&&!f(t),O=S==_&&!f(e),I=w==S;if(I&&!x)return g||(g=new i),b||h(t)?o(t,e,r,n,d,g):u(t,e,w,r,n,d,g);if(!(d&p)){var j=x&&y.call(t,"__wrapped__"),z=O&&y.call(e,"__wrapped__");if(j||z){var M=j?t.value():t,E=z?e.value():e;return g||(g=new i),r(M,E,n,d,g)}}return I?(g||(g=new i),a(t,e,r,n,d,g)):!1}var i=r(35),o=r(70),u=r(72),a=r(77),s=r(78),c=r(27),f=r(52),h=r(83),p=2,l="[object Arguments]",v="[object Array]",_="[object Object]",d=Object.prototype,y=d.hasOwnProperty;t.exports=n},function(t,e,r){function n(t,e,r,n,a,s){var c=-1,f=a&u,h=a&o,p=t.length,l=e.length;if(p!=l&&!(f&&l>p))return!1;var v=s.get(t);if(v)return v==e;var _=!0;for(s.set(t,e);++cr;)t=t[e[r++]];return r&&r==n?t:void 0}var i=r(93),o=r(98);t.exports=n},function(t,e,r){function n(t){return i(t)?t:o(t)}var i=r(27),o=r(94);t.exports=n},function(t,e,r){var n=r(95),i=r(96),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,u=/\\(\\)?/g,a=n(function(t){var e=[];return i(t).replace(o,function(t,r,n,i){e.push(n?i.replace(u,"$1"):r||t)}),e});t.exports=a},function(t,e,r){function n(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(o);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var u=t.apply(this,n);return r.cache=o.set(i,u),u};return r.cache=new(n.Cache||i),r}var i=r(46),o="Expected a function";n.Cache=i,t.exports=n},function(t,e,r){function n(t){if("string"==typeof t)return t;if(null==t)return"";if(o(t))return s?s.call(t):"";var e=t+"";return"0"==e&&1/t==-u?"-0":e}var i=r(73),o=r(97),u=1/0,a=i?i.prototype:void 0,s=a?a.toString:void 0;t.exports=n},function(t,e,r){function n(t){return"symbol"==typeof t||i(t)&&a.call(t)==o}var i=r(26),o="[object Symbol]",u=Object.prototype,a=u.toString;t.exports=n},function(t,e,r){function n(t,e){var r=typeof t;return"number"==r||"symbol"==r?!0:!i(t)&&(o(t)||a.test(t)||!u.test(t)||null!=e&&t in Object(e))}var i=r(27),o=r(97),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=n},function(t,e,r){function n(t,e){return null!=t&&o(t,e,i)}var i=r(100),o=r(101);t.exports=n},function(t,e){function r(t,e){return e in Object(t)}t.exports=r},function(t,e,r){function n(t,e,r){e=s(e,t)?[e]:i(e);for(var n,h=-1,p=e.length;++h-1}function o(t){return s["default"](t)&&"undefined"!=typeof t.type&&Object.keys(t).every(i)}function u(t){return t.error===!0}e.__esModule=!0,e.isFSA=o,e.isError=u;var a=r(107),s=n(a),c=["type","payload","error","meta"]},function(t,e,r){function n(t){return!!t&&"object"==typeof t}function i(t,e){return u(t,e,s)}function o(t){var e;if(!n(t)||p.call(t)!=c||a(t)||!h.call(t,"constructor")&&(e=t.constructor,"function"==typeof e&&!(e instanceof e)))return!1;var r;return i(t,function(t,e){r=e}),void 0===r||h.call(t,r)}var u=r(108),a=r(109),s=r(110),c="[object Object]",f=Object.prototype,h=f.hasOwnProperty,p=f.toString;t.exports=o},function(t,e){function r(t){return function(e,r,n){for(var i=-1,o=Object(e),u=n(e),a=u.length;a--;){var s=u[t?a:++i];if(r(o[s],s,o)===!1)break}return e}}var n=r();t.exports=n},function(t,e){function r(t){return function(e){return null==e?void 0:e[t]}}function n(t){return o(t)&&_.call(t,"callee")&&(!y.call(t,"callee")||d.call(t)==h); +}function i(t){return null!=t&&a(g(t))&&!u(t)}function o(t){return c(t)&&i(t)}function u(t){var e=s(t)?d.call(t):"";return e==p||e==l}function a(t){return"number"==typeof t&&t>-1&&t%1==0&&f>=t}function s(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function c(t){return!!t&&"object"==typeof t}var f=9007199254740991,h="[object Arguments]",p="[object Function]",l="[object GeneratorFunction]",v=Object.prototype,_=v.hasOwnProperty,d=v.toString,y=v.propertyIsEnumerable,g=r("length");t.exports=n},function(t,e,r){function n(t,e){return t="number"==typeof t||c.test(t)?+t:-1,e=null==e?p:e,t>-1&&t%1==0&&e>t}function i(t){return"number"==typeof t&&t>-1&&t%1==0&&p>=t}function o(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function u(t){if(null==t)return[];o(t)||(t=Object(t));var e=t.length;e=e&&i(e)&&(s(t)||a(t))&&e||0;for(var r=t.constructor,u=-1,c="function"==typeof r&&r.prototype===t,f=Array(e),p=e>0;++u-1&&t%1==0&&y>=t}function o(t){return u(t)&&v.call(t)==c}function u(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function a(t){return null==t?!1:o(t)?_.test(p.call(t)):r(t)&&f.test(t)}var s="[object Array]",c="[object Function]",f=/^\[object .+?Constructor\]$/,h=Object.prototype,p=Function.prototype.toString,l=h.hasOwnProperty,v=h.toString,_=RegExp("^"+p.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),d=n(Array,"isArray"),y=9007199254740991,g=d||function(t){return r(t)&&i(t.length)&&v.call(t)==s};t.exports=g},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var i=r(113),o=n(i),u=r(116),a=n(u),s=r(117),c=n(s),f=r(118),h=n(f),p=r(120),l=n(p);e.connect=o["default"],e.Provider=a["default"],e.nuclearMixin=c["default"],e.provideReactor=h["default"],e.nuclearComponent=l["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t){return t.displayName||t.name||"Component"}function a(t){return function(e){var r=function(r){function n(t,e){i(this,n),r.call(this,t,e),this.reactor=t.reactor||e.reactor,this.unsubscribeFns=[],this.updatePropMap(t)}return o(n,r),n.prototype.resubscribe=function(t){this.unsubscribe(),this.updatePropMap(t),this.updateState(),this.subscribe()},n.prototype.componentWillMount=function(){this.updateState()},n.prototype.componentDidMount=function(){this.subscribe(this.props)},n.prototype.componentWillUnmount=function(){this.unsubscribe()},n.prototype.updatePropMap=function(e){this.propMap=t?t(e):{}},n.prototype.updateState=function(){var t=this.propMap,e={};for(var r in t){var n=t[r];e[r]=this.reactor.evaluate(n)}this.setState(e)},n.prototype.subscribe=function(){var t=this,e=this.propMap,r=function(r){var n=e[r],i=t.reactor.observe(n,function(e){var n;t.setState((n={},n[r]=e,n))});t.unsubscribeFns.push(i)};for(var n in e)r(n)},n.prototype.unsubscribe=function(){if(0!==this.unsubscribeFns.length)for(;this.unsubscribeFns.length>0;)this.unsubscribeFns.shift()()},n.prototype.render=function(){return c.createElement(e,s({reactor:this.reactor},this.props,this.state))},n}(c.Component);return r.displayName="Connect("+u(e)+")",r.WrappedComponent=e,r.contextTypes={reactor:h["default"]},r.propTypes={reactor:h["default"]},l["default"](r,e)}}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e` instead"),0===arguments.length||"function"!=typeof arguments[0]?(e=arguments[0],function(t){return i(t,e)}):i.apply(null,arguments)}e.__esModule=!0,e["default"]=o;var u=r(3),a=n(u),s=r(115),c=n(s),f=r(119),h=n(f);t.exports=e["default"]},function(t,e){"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=Object.assign||function(t,e){for(var o,u,a=r(t),s=1;s { - const { value, onAction, ...rest } = props; - const handler = () => onAction(value); - - return ( - - ); -} diff --git a/examples/calculator/components/calculator.js b/examples/calculator/components/calculator.js deleted file mode 100644 index d571b2a..0000000 --- a/examples/calculator/components/calculator.js +++ /dev/null @@ -1,212 +0,0 @@ -import ReactDOM from 'react-dom'; -import React, { Component } from 'react'; -import frux from 'frux'; -import Button from './button'; -import Result from './result'; -import { actions } from '../application-context'; -import './calculator.less'; - -const BACKSPACE = '\u232B'; - -class Calculator extends Component { - static getDataBindings(getters) { - return { - expression: getters.operations.expression - }; - } - - handleOperator(operator) { - actions.operations.sendOperator(operator); - } - - handleAppendNumber(value) { - actions.operations.inputNumber(value); - } - - handleKeyPress(event) { - const { keyCode, which } = event; - const char = String.fromCharCode(which); - const { inputNumber, computeResult, sendOperator } = actions.operations; - - if (event && event.preventDefault) { - event.preventDefault(); - } - - if (which >= 48 && which <= 57) { - return inputNumber(char); - } - - if ((which >= 42 && which <= 43) || (which >= 45 && which <= 47)) { - return sendOperator(char); - } - } - - handleKeyUp(event) { - const { keyCode } = event; - const { clear, deleteLast, computeResult } = actions.operations; - - if (event && event.preventDefault) { - event.preventDefault(); - } - - if (keyCode === 13) { - return computeResult(); - } - - if (keyCode === 27) { - return clear(); - } - - if (keyCode === 8) { - return deleteLast(); - } - } - - focusOnHiddenInput() { - this.input.focus(); - } - - componentDidMount() { - this.input = ReactDOM.findDOMNode(this.refs.Input); - this.focusOnHiddenInput(); - window.addEventListener('mouseup', this.focusOnHiddenInput.bind(this)); - } - - componentWillUnmount() { - window.removeEventListener('mouseup', this.focusOnHiddenInput.bind(this)); - } - - render() { - const { expression } = this.props; - - return ( -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
-
-
- - - -
- - - -
- - - -
- - - -
- - -
-
- ); - } -} - -export default frux.connect(Calculator); diff --git a/examples/calculator/components/calculator.less b/examples/calculator/components/calculator.less deleted file mode 100644 index 3bd2656..0000000 --- a/examples/calculator/components/calculator.less +++ /dev/null @@ -1,152 +0,0 @@ -@white: #ffffff; -@black: #000000; -@orange: #E74C3C; -@blue: #3498db; -@dark-gray: #aaaaaa; -@light-gray: #ecf0f1; -@dark-blue: #2c3e50; - -@font-primary: "Segoe UI"; -@font-symbols: "Segoe UI Symbol"; - -.user-select(@value: none) { - -moz-user-select: @value; - -webkit-user-select: @value; - -ms-user-select: @value; - user-select: @value; -} - -* { - font-family: @font-primary; -} - -html, -body { - height: 100%; - - font-size: 100%; - .user-select(); - - background-color: lighten(@dark-blue, 20%); -} - -.calculator-viewport { - position: absolute; - top: 50%; - left: 50%; - width: 330px; - height: 494px; - - margin-top: -248px; - margin-left: -160px; - - background-color: @dark-blue; - box-shadow: 0 0 42px fade(@black, 35%); -} - -table { - cursor: default; - - tr { - padding: 0; - margin: 0; - } - - td { - padding: 0; - margin: 0; - } -} - -.calculator-result { - padding: 0 9px; - background-color: @white; - - .expression { - height: 24px; - max-width: 308px; - - line-height: 32px; - text-align: right; - color: @dark-gray; - } - - .last { - display: block; - max-width: 308px; - height: 56px; - - font-size: 140%; - font-weight: bold; - line-height: 56px; - text-align: right; - color: @dark-blue; - } - - .operator { - margin: 0 4px; - } -} - -button { - width: 80px; - height: 80px; - margin: 0; - padding: 0; - - border: 0; - background-color: @light-gray; - font-size: 24px; - color: @dark-blue; - user-select: none; - color: @white; - background-color: lighten(@dark-blue, 10%); - - &:hover { - background-color: transparent; - } - - &:focus { - outline: 1px dotted darken(@white, 10%); - } - - &.equal { - color: @white; - background-color: @orange; - - &:hover { - background-color: darken(@orange, 10%); - } - } - - &.signs { - color: @white; - background-color: @blue; - - &:hover { - background-color: darken(@blue, 10%); - } - } - - &.backspace { - font-family: @font-symbols; - } - - &.wider { - width: 162px; - } -} - -.hidden { - position: absolute; - left: -9999px; - top: -9999px; - - width: 0; - height: 0; - - opacity: 0; - - outline: none; - overflow: hidden; -} diff --git a/examples/calculator/components/result.js b/examples/calculator/components/result.js deleted file mode 100644 index fa5f0eb..0000000 --- a/examples/calculator/components/result.js +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; - -const operators = { - 43: '+', - 45: '-', - 46: '.', - 42: '\u00D7', - 47: '\u00F7' -}; - -export default (props) => { - const { expression } = props; - - if (!expression || !expression.size) { - return ( -
-
-
- 0 -
-
- ); - } - - return ( -
-
-
- { - expression.map((item, index) => { - if (typeof item === 'string' && item !== '.') { - return ( - - {operators[item.charCodeAt(0)]} - - ); - } - - return ( - {item} - ); - }) - } -
-
- ); -} diff --git a/examples/calculator/index.html b/examples/calculator/index.html deleted file mode 100644 index 7e7c9d0..0000000 --- a/examples/calculator/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - Test - - - - - - - - diff --git a/examples/calculator/index.js b/examples/calculator/index.js deleted file mode 100644 index 24b7ce6..0000000 --- a/examples/calculator/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import frux from 'frux'; -import React from 'react'; -import Calculator from './components/calculator'; - -frux.mount(); diff --git a/examples/calculator/modules/operations/action-types.js b/examples/calculator/modules/operations/action-types.js deleted file mode 100644 index 83d688e..0000000 --- a/examples/calculator/modules/operations/action-types.js +++ /dev/null @@ -1,5 +0,0 @@ -export const SEND_OPERATOR = 'SEND_OPERATOR'; -export const INPUT_NUMBER = 'INPUT_NUMBER'; -export const DELETE_LAST = 'DELETE_LAST'; -export const COMPUTE_RESULT = 'COMPUTE_RESULT'; -export const CLEAR = 'CLEAR'; diff --git a/examples/calculator/modules/operations/actions.js b/examples/calculator/modules/operations/actions.js deleted file mode 100644 index 182512e..0000000 --- a/examples/calculator/modules/operations/actions.js +++ /dev/null @@ -1,39 +0,0 @@ -import { dispatch, batch } from 'frux'; -import { - SEND_OPERATOR, - INPUT_NUMBER, - DELETE_LAST, - COMPUTE_RESULT, - CLEAR -} from './action-types'; - -export function sendOperator(operator) { - return { - type: SEND_OPERATOR, - payload: { operator } - }; -} - -function inputNumberAction(payload) { - return { type: INPUT_NUMBER, payload }; -} - -export function inputNumber(number) { - return new Promise((resolve, reject) => { - window.setTimeout(() => { - resolve(() => inputNumberAction({ number })); - }, 1000); - }); -} - -export function deleteLast() { - return { type: DELETE_LAST }; -} - -export function computeResult() { - return { type: COMPUTE_RESULT }; -} - -export function clear() { - return { type: CLEAR }; -} diff --git a/examples/calculator/modules/operations/getters.js b/examples/calculator/modules/operations/getters.js deleted file mode 100644 index c2452e7..0000000 --- a/examples/calculator/modules/operations/getters.js +++ /dev/null @@ -1,4 +0,0 @@ -export const expression = [ - ['operations', 'expression'], - (data) => data -]; diff --git a/examples/calculator/modules/operations/handlers.js b/examples/calculator/modules/operations/handlers.js deleted file mode 100644 index 4fd656d..0000000 --- a/examples/calculator/modules/operations/handlers.js +++ /dev/null @@ -1,90 +0,0 @@ -import * as ActionTypes from './action-types'; - -const handleOperatorInsertion = (currentState, payload) => { - const { operator } = payload; - const expression = currentState.get('expression'); - const lastInExpresion = expression.last(); - - if (lastInExpresion === operator) { - return currentState; - } - - if (isNaN(lastInExpresion)) { - return currentState.withMutations((state) => { - const nextState = state.get('expression').pop(); - return state.set('expression', nextState.push(operator)); - }); - } - - return currentState.withMutations((state) => { - const expresion = state.get('expression'); - return state.set('expression', expresion.push(operator)); - }); -}; - - -const handleNumberInsertion = (currentState, payload) => { - const { number } = payload; - const expression = currentState.get('expression'); - const lastInExpresion = expression.last(); - const nextNumber = Number(number); - - if (lastInExpresion === 0) { - return currentState.withMutations((state) => { - const nextExpr = state.get('expression').clear(); - return state.set('expression', nextExpr.push(nextNumber)); - }); - } - - return currentState.withMutations((state) => { - const nextExpr = state.get('expression'); - return state.set('expression', nextExpr.push(nextNumber)); - }); -}; - -const handleComputeResult = (currentState) => { - const stringifiedExpr = currentState.get('expression').join(''); - const result = ( - eval(stringifiedExpr).toString().split('').map((item) => { - const number = Number(item); - - if (isNaN(item)) { - return item; - } - - return number; - }) - ); - - return currentState.withMutations((state) => { - const nextExpr = currentState.get('expression').clear(); - return state - .set('expression', nextExpr.concat(result)) - .set('result', result.join('')); - }); -}; - -const handleDeleteLast = (currentState, payload, initialState) => { - const expr = currentState.get('expression'); - const stringifiedExpr = expr.join(''); - const result = stringifiedExpr; - - if (result === currentState.get('result')) { - return initialState; - } - - return currentState.set('expression', expr.pop()); -}; - -const handleClear = (currentState, payload, initialState) => { - return initialState; -}; - - -export default { - [ActionTypes.SEND_OPERATOR]: handleOperatorInsertion, - [ActionTypes.INPUT_NUMBER]: handleNumberInsertion, - [ActionTypes.DELETE_LAST]: handleDeleteLast, - [ActionTypes.COMPUTE_RESULT]: handleComputeResult, - [ActionTypes.CLEAR]: handleClear -}; diff --git a/examples/calculator/modules/operations/index.js b/examples/calculator/modules/operations/index.js deleted file mode 100644 index 2fdf9b7..0000000 --- a/examples/calculator/modules/operations/index.js +++ /dev/null @@ -1,18 +0,0 @@ -import { Immutable } from 'nuclear-js'; -import frux from 'frux'; - -import handlers from './handlers'; -import * as actions from './actions'; -import * as getters from './getters'; - - -const initialState = { - expression: [0], - result: 0 -}; - -const stores = { - operations: frux.createStore(initialState, handlers) -}; - -export default frux.createModule({ stores, actions, getters }); diff --git a/examples/calculator/package.json b/examples/calculator/package.json deleted file mode 100644 index 3b36b71..0000000 --- a/examples/calculator/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "frux-counter-example", - "version": "1.0.0", - "description": "Frux counter example", - "main": "index.js", - "keywords": [ - "NuclearJS", - "frux" - ], - "author": "Raul Matei", - "license": "ISC", - "scripts": { - "start": "./node_modules/.bin/webpack-dev-server -d --hot --inline" - }, - "devDependencies": { - "babel-core": "^6.4.5", - "babel-loader": "^6.2.1", - "babel-preset-es2015": "^6.3.13", - "babel-preset-react": "^6.3.13", - "babel-preset-stage-0": "^6.3.13", - "css-loader": "^0.23.0", - "json-loader": "^0.5.4", - "less": "^2.5.3", - "less-loader": "^2.2.2", - "react-hot-loader": "^1.3.0", - "style-loader": "^0.13.0", - "webpack": "^1.12.12", - "webpack-dev-server": "^1.14.1" - } -} diff --git a/examples/calculator/webpack.config.js b/examples/calculator/webpack.config.js deleted file mode 100644 index b00d739..0000000 --- a/examples/calculator/webpack.config.js +++ /dev/null @@ -1,33 +0,0 @@ -var path = require('path'); - -module.exports = { - entry: { - javascript: './index' - }, - - output: { - filename: './dist/application.js' - }, - - module: { - loaders: [ - { - test: /\.js?$/, - exclude: /node_modules/, - loaders: ['react-hot', 'babel-loader'] - }, - - { - test: /\.less$/, - loader: "style!css!less" - } - ] - }, - - resolve: { - extensions: ['', '.js', '.jsx'], - alias: { - 'frux': path.join(__dirname, '../../', 'src/frux') - } - } -}; diff --git a/examples/counter/application-context.js b/examples/counter/application-context.js deleted file mode 100644 index 92ac993..0000000 --- a/examples/counter/application-context.js +++ /dev/null @@ -1,7 +0,0 @@ -import frux from 'frux'; -import counter from './modules/counter'; - -export const { actions, getters } = frux.initialize({ - options: { debug: true }, - counter -}); \ No newline at end of file diff --git a/examples/counter/components/counter.js b/examples/counter/components/counter.js deleted file mode 100644 index 9b099d9..0000000 --- a/examples/counter/components/counter.js +++ /dev/null @@ -1,77 +0,0 @@ -import React, { Component } from 'react'; -import frux from 'frux'; -import { actions } from '../application-context'; - -const commonStyles = { - width: 32, - height: 32, - marginLeft: 2, - color: 'white', - border: '0 none', - fontSize: 18 -}; - -const btnStyles = { - increment: { - ...commonStyles, - marginLeft: 0, - backgroundColor: 'green' - }, - - decrement: { - ...commonStyles, - backgroundColor: 'red' - }, - - reset: { - ...commonStyles, - width: 'auto', - color: '#ccc', - backgroundColor: 'transparent' - } -}; - -class Counter extends Component { - static getDataBindings(getters) { - return { - count: getters.counter.count - }; - } - - render() { - const { count } = this.props; - const shouldDisableDecrement = count === 0; - - return ( -
-

Count: {count}

- - - - - -
- ); - } -} - -export default frux.connect(Counter); diff --git a/examples/counter/index.html b/examples/counter/index.html deleted file mode 100644 index 7e7c9d0..0000000 --- a/examples/counter/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - Test - - - - - - - - diff --git a/examples/counter/index.js b/examples/counter/index.js deleted file mode 100644 index 2b1e693..0000000 --- a/examples/counter/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import frux from 'frux'; -import React from 'react'; -import Counter from './components/counter'; - -frux.mount(); \ No newline at end of file diff --git a/examples/counter/modules/counter/action-types.js b/examples/counter/modules/counter/action-types.js deleted file mode 100644 index 3a8c47a..0000000 --- a/examples/counter/modules/counter/action-types.js +++ /dev/null @@ -1,3 +0,0 @@ -export const INCREMENT = 'INCREMENT'; -export const DECREMENT = 'DECREMENT'; -export const RESET = 'RESET'; diff --git a/examples/counter/modules/counter/actions.js b/examples/counter/modules/counter/actions.js deleted file mode 100644 index b10fcd2..0000000 --- a/examples/counter/modules/counter/actions.js +++ /dev/null @@ -1,23 +0,0 @@ -import { dispatch } from 'frux'; -import { INCREMENT, DECREMENT, RESET } from './action-types'; - -export function increment() { - return dispatch({ - type: INCREMENT, - payload: null - }); -} - -export function decrement() { - return dispatch({ - type: DECREMENT, - payload: null - }); -} - -export function reset() { - return dispatch({ - type: RESET, - payload: null - }); -} diff --git a/examples/counter/modules/counter/getters.js b/examples/counter/modules/counter/getters.js deleted file mode 100644 index c6e968b..0000000 --- a/examples/counter/modules/counter/getters.js +++ /dev/null @@ -1,4 +0,0 @@ -export const count = [ - ['counter', 'count'], - (count) => count -]; diff --git a/examples/counter/modules/counter/handlers.js b/examples/counter/modules/counter/handlers.js deleted file mode 100644 index 83c11e6..0000000 --- a/examples/counter/modules/counter/handlers.js +++ /dev/null @@ -1,13 +0,0 @@ -export function increment(currentState) { - const count = currentState.get('count'); - return currentState.set('count', count + 1); -} - -export function decrement(currentState) { - const count = currentState.get('count'); - return currentState.set('count', count - 1); -} - -export function reset(currentState, payload, initialState) { - return initialState; -} diff --git a/examples/counter/modules/counter/index.js b/examples/counter/modules/counter/index.js deleted file mode 100644 index e0f1490..0000000 --- a/examples/counter/modules/counter/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import frux from 'frux'; - -import * as counterHandlers from './handlers'; -import * as actions from './actions'; -import * as getters from './getters'; - -const initialState = { - count: 0 -}; - -const stores = { - counter: frux.createStore(initialState, counterHandlers) -}; - -export default frux.createModule({ stores, actions, getters }); diff --git a/examples/counter/package.json b/examples/counter/package.json deleted file mode 100644 index 06390e0..0000000 --- a/examples/counter/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "frux-counter-example", - "version": "1.0.0", - "description": "Frux counter example", - "main": "index.js", - "keywords": [ - "NuclearJS", - "frux" - ], - "author": "Raul Matei", - "license": "ISC", - "scripts": { - "start": "./node_modules/.bin/webpack-dev-server -d --hot --inline" - }, - "dependencies": { - "frux": "^0.1.x", - "immutable": "^3.7.5", - "invariant": "^2.2.0", - "lodash": "^3.10.1", - "nuclear-js": "^1.2.1", - "nuclear-js-react-addons": "^0.2.0", - "react": "^0.14.3", - "react-dom": "^0.14.3" - }, - "devDependencies": { - "babel-core": "^6.2.4", - "babel-loader": "^6.2.0", - "babel-preset-es2015": "^6.2.4", - "babel-preset-react": "^6.2.4", - "babel-preset-stage-0": "^6.2.4", - "react-hot-loader": "^1.3.0", - "webpack": "^1.12.9", - "webpack-dev-server": "^1.14.0" - } -} diff --git a/examples/counter/webpack.config.js b/examples/counter/webpack.config.js deleted file mode 100644 index 38756df..0000000 --- a/examples/counter/webpack.config.js +++ /dev/null @@ -1,28 +0,0 @@ -var path = require('path'); - -module.exports = { - entry: { - javascript: './index' - }, - - output: { - filename: './dist/application.js' - }, - - module: { - loaders: [ - { - test: /\.js?$/, - exclude: /node_modules/, - loaders: ['react-hot', 'babel-loader'] - } - ] - }, - - resolve: { - extensions: ['', '.js', '.jsx'], - alias: { - 'frux': path.join(__dirname, '../../', 'src/frux') - } - } -}; diff --git a/package.json b/package.json index 9f40d78..6456245 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "frux", - "version": "0.4.0", + "version": "0.4.1", "description": "Simple wrapper over NuclearJS flux implementation", "main": "./dist/frux.js", "author": "Raul Matei", @@ -10,7 +10,7 @@ "url": "https://github.com/raulmatei/frux" }, "scripts": { - "build": "babel src --out-dir lib" + "build": "babel src --out-dir lib && webpack" }, "files": [ "lib", @@ -25,8 +25,8 @@ "nuclear-js-react-addons": "^0.4.0" }, "peerDependencies": { - "react": "^0.14 || ^15.0.0-rc || ^15.0.0", - "react-dom": "^0.14 || ^15.0.0-rc || ^15.0.0" + "react": ">=0.14", + "react-dom": ">=0.14" }, "devDependencies": { "babel-core": "^6.7.7", @@ -34,10 +34,8 @@ "babel-preset-es2015": "^6.6.0", "babel-preset-react": "^6.5.0", "babel-preset-stage-0": "^6.5.0", - "react": "^15.0.1", - "react-dom": "^15.0.1", - "react-hot-loader": "^1.3.0", - "webpack": "^1.13.0", - "webpack-dev-server": "^1.14.1" + "react": "^15.0.2", + "react-dom": "^15.0.2", + "webpack": "^1.13.0" } } diff --git a/webpack.config.js b/webpack.config.js index 5b57042..19c18fe 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -18,7 +18,7 @@ module.exports = { { test: /\.js?$/, exclude: /node_modules/, - loaders: ['react-hot', 'babel-loader'] + loaders: ['babel-loader'] } ] },