Comparing version 4.0.17 to 4.0.18
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-redux")):"function"==typeof define&&define.amd?define(["exports","react","react-redux"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Speedux={},e.React,e["React Redux"])}(this,(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t);function i(){return(i=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function a(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function u(e){var t={exports:{}};return e(t,t.exports),t.exports}var c=u((function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=Object.create((t&&t.prototype instanceof v?t:v).prototype),i=new I(n||[]);return o._invoke=function(e,t,r){var n=l;return function(o,i){if(n===d)throw Error("Generator is already running");if(n===p){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=_(a,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=f(e,t,r);if("normal"===c.type){if(n=r.done?p:h,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=p,r.method="throw",r.arg=c.arg)}}}(e,r,i),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var l="suspendedStart",h="suspendedYield",d="executing",p="completed",y={};function v(){}function b(){}function g(){}var m={};m[i]=function(){return this};var w=Object.getPrototypeOf,O=w&&w(w(T([])));O&&O!==r&&n.call(O,i)&&(m=O);var E=g.prototype=v.prototype=Object.create(m);function j(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(l).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function _(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=f(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function R(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function T(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:L}}function L(){return{value:t,done:!0}}return b.prototype=E.constructor=g,g.constructor=b,b.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},j(x.prototype),x.prototype[a]=function(){return this},e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(E),c(E,u,"Generator"),E[i]=function(){return this},E.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(this.prev>=a.tryLoc){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(a.catchLoc>this.prev)return o(a.catchLoc,!0);if(a.finallyLoc>this.prev)return o(a.finallyLoc)}else if(c){if(a.catchLoc>this.prev)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(a.finallyLoc>this.prev)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(this.prev>=o.tryLoc&&n.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}!i||"break"!==e&&"continue"!==e||i.tryLoc>t||t>i.finallyLoc||(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));function s(){}function f(){}f.resetWarningCache=s;var l=u((function(e){e.exports=function(){function e(e,t,r,n,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:f,resetWarningCache:s};return r.PropTypes=r,r}()}));var h=function(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()),d=function(){return Math.random().toString(36).substring(7).split("").join(".")},p={INIT:"@@redux/INIT"+d(),REPLACE:"@@redux/REPLACE"+d(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+d()}};function y(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function v(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw Error("Expected the enhancer to be a function.");return r(v)(e,t)}if("function"!=typeof e)throw Error("Expected the reducer to be a function.");var o=e,i=t,a=[],u=a,c=!1;function s(){u===a&&(u=a.slice())}function f(){if(c)throw Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function l(e){if("function"!=typeof e)throw Error("Expected the listener to be a function.");if(c)throw Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return s(),u.push(e),function(){if(t){if(c)throw Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,s();var r=u.indexOf(e);u.splice(r,1),a=null}}}function d(e){if(!y(e))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(c)throw Error("Reducers may not dispatch actions.");try{c=!0,i=o(i,e)}finally{c=!1}for(var t=a=u,r=0;t.length>r;r++){(0,t[r])()}return e}function b(e){if("function"!=typeof e)throw Error("Expected the nextReducer to be a function.");o=e,d({type:p.REPLACE})}function g(){var e,t=l;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function r(){e.next&&e.next(f())}return r(),{unsubscribe:t(r)}}})[h]=function(){return this},e}return d({type:p.INIT}),(n={dispatch:d,subscribe:l,getState:f,replaceReducer:b})[h]=g,n}function b(e,t){var r=t&&t.type;return"Given "+(r&&'action "'+r+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function g(e){for(var t=Object.keys(e),r={},n=0;t.length>n;n++){var o=t[n];"function"==typeof e[o]&&(r[o]=e[o])}var i,a=Object.keys(r);try{!function(e){Object.keys(e).forEach((function(t){var r=e[t];if(void 0===r(void 0,{type:p.INIT}))throw Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===r(void 0,{type:p.PROBE_UNKNOWN_ACTION()}))throw Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+p.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(r)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var n=!1,o={},u=0;a.length>u;u++){var c=a[u],s=e[c],f=(0,r[c])(s,t);if(void 0===f){var l=b(c,t);throw Error(l)}o[c]=f,n=n||f!==s}return(n=n||a.length!==Object.keys(e).length)?o:e}}function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r}function O(e){for(var t=1;arguments.length>t;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(r,!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function E(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var j=function(e){return Object.prototype.toString.call(e).toLowerCase().replace(/\[object\s|\]/g,"")},x=function e(t,r,n){void 0===n&&(n=!1);var o=j(t),a=(arguments.length>3?arguments.length-3:0)>0,u=arguments.length>3?arguments[3]:void 0;if("array"!==o&&"object"!==o)return t;var c=t;if(n||("array"===o&&(c=[].concat(t)),"object"===o&&(c=i({},t))),""===r)return a?c:void 0;if("*"===r){if(a){if("array"===o)if(void 0===u)for(;c.length;)e(c,0,!0,u);else{var s=c,f=s.length;c.forEach((function(t,r){var o=f-1-r,i=u;if("function"===j(u)&&(i=u(c[o])),void 0===i)e(c,o,!0,void 0);else{var a=e(c,o,n,i);c[o]=a[o]}}))}else"object"===o&&Object.keys(c).forEach((function(t){return e(c,t,!0,u)}));return c}if("array"===o)return c;if("object"===o)return Object.values(c)}if(a){var l=u;return"function"===j(l)&&(l=l(c[r])),void 0===l&&"array"===o?c.splice(r,1):void 0===l&&"object"===o?delete c[r]:c[r]=l,c}return c[r]},_=function e(t,r,n){void 0===n&&(n=!1);var o=j(t),a=(arguments.length>3?arguments.length-3:0)>0,u=arguments.length>3?arguments[3]:void 0,c=(""+r).replace(/^\[|\]$/g,"");if(1===(c=(c=(c=c.replace(/\[|\]/g,".")).replace(/\.{2,}/g,".")).split(".")).length)return a?x(t,c[0],n,u):x(t,c[0],n);var s=t;n||("array"===o&&(s=[].concat(t)),"object"===o&&(s=i({},t)));var f=c[0],l=c.slice(1).join(".");if(a)return"*"===f?("array"===o&&s.forEach((function(t,r){s[r]=e(t,l,n,u)})),"object"===o&&Object.keys(s).forEach((function(t){s[t]=e(s[t],l,n,u)})),s):(void 0===s[f]&&(s[f]={}),s[f]=e(s[f],l,n,u),s);if("*"===f){if("array"===o)return s.map((function(t){return e(t,l,n)}));if("object"===o)return Object.values(s).map((function(t){return e(t,l,n)}))}return e(s[f]||{},l,n)},R=function(e){var t=e.replace(/[^\w\s_-]/g,"").replace(/^[A-Z]+$/,(function(e){return e.toLowerCase()}));return/(.*?)[\s_-]/.test(t)?t.replace(/[\s_-]|[a-z](?=[A-Z])/g,(function(e){return/[\s_-]/.test(e)?":":e+":"})).split(":").map((function(e,t){return 0===t?e.toLowerCase():""+e[0].toUpperCase()+e.slice(1).toLowerCase()})).join(""):t},S=function(e){return R(e).replace(/[a-z](?=[A-Z])/g,(function(e){return e[0]+"_"})).toLowerCase()},I=function e(t){var r=j(t);if("object"===r||"array"===r){var n="array"===r?[]:{};return Object.keys(t).forEach((function(r){n[r]=["object","array"].includes(j(t[r]))?e(t[r]):t[r]})),n}return t},T={reducers:{},subscribers:{},sagas:{},middlewares:[],combinedInitialState:{},create:function(){return this.storeInstance?this.storeInstance:this.buildInstance()},buildInstance:function(){var e="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__():function(e){return e};return this.devTools=this.devTools||E(e),this.storeInstance=v(this.getRootReducer(),E.apply(void 0,this.middlewares.concat([this.devTools]))),this.storeInstance},getRootReducer:function(){return this.rootReducer?this.rootReducer:this.buildRootReducer()},buildRootReducer:function(){var e=this,t=i({},this.reducers);0===Object.keys(t).length&&(t.$_foo=function(e){return void 0===e&&(e={}),e});var r=g(t);return this.rootReducer=function(t,n){void 0===t&&(t=e.combinedInitialState),void 0===n&&(n=null),e.cachedState=t;var o=r(t,n);return e.cachedState=o,e.subscribers[n.type]&&e.subscribers[n.type].forEach((function(e){e(n)})),o},this.rootReducer},update:function(){return this.storeInstance.replaceReducer(this.buildRootReducer())},useReducer:function(e,t,r){this.reducers[e]=t,this.combinedInitialState[e]=r},resetReducers:function(){this.reducers={},this.combinedInitialState={}},subscribe:function(e,t){var r;this.subscribers[e]=null!=(r=this.subscribers[e])?r:[],this.subscribers[e].includes(t)||this.subscribers[e].push(t)},unsubscribe:function(e,t){this.subscribers[e]=this.subscribers[e].filter((function(e){return e!==t}))},useMiddleware:function(e){this.middlewares.unshift(function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return function(e){return function(){var r=e.apply(void 0,arguments),n=function(){throw Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return O({},r,{dispatch:n=E.apply(void 0,i)(r.dispatch)})}}}(e))},resetMiddlewares:function(){this.middlewares=[]},useSaga:function(e,t){this.sagas[e]=t},useSagas:function(e){var t=this;Object.keys(e).forEach((function(r){return t.useSaga(r,e[r])}))},resetSagas:function(){this.sagas={}},reset:function(){this.resetReducers(),this.resetMiddlewares(),this.resetSagas(),delete this.rootReducer,delete this.storeInstance,delete this.registeredNames},getState:function(e){return function(e,t){return"string"===j(e)?_(t,e):"object"===j(e)?Object.keys(e).reduce((function(r,n){var o;return i({},r,((o={})[n]=_(t,e[n]),o))}),{}):t}(e,this.cachedState)},getInstance:function(){return this.storeInstance},registerName:function(e){(void 0===this.registeredNames&&(this.registeredNames={}),!0===this.registeredNames[e])?(0,console.warn)("Duplicate name: "+e+". This name has already been used to connect another component, please use a different name."):T.registeredNames[e]=!0}},L=function(e){var t=R(e);return S(t).toUpperCase()};T.create();var P=function(){return T.getInstance()},N={actions:{},handlers:{}},k=function(e,t){void 0===t&&(t={});T.useReducer(e,(function(r,n){var o,a,u,c,s=null!=r?r:t,f=n.type.replace(/^@@|\/.*?$/g,""),l=(o=n.type.replace(/^.*?\//,""),a=S(o),R(a.toLowerCase())),h=N.actions[e][l],d=!!h&&"action";if(console.log("callback",h),!h){var p,y=N.handlers[e];d=!!(h=null!=(p=y[n.type])?p:y[f+"."+l])&&"handler"}if(h){var v=h.apply(void 0,{action:n.args,handler:[n]}[d]),b=j(v),g={};return"object"===b&&(g=v),"function"===b&&(g=v(s[e])),u=s,Object.keys(c=g).reduce((function(e,t){return _(e,t,!1,c[t])}),i({},u))}return s}),t),T.update()},A=function(e){return function(){for(var t={},r=arguments.length,n=Array(r),o=0;r>o;o++)n[o]=arguments[o];if("object"===j(n[0]))t=I(n[0]);else if("string"===j(n[0])){if(e)t.type="@@"+e+"/"+L(n[0]);else if(/^([^.]*?)\.([^.]*?)$/.test(n[0])){var i=n[0].split("."),a=i[0],u=i[1];t.type="@@"+a+"/"+L(u)}else t.type=n[0];t.payload={},n.length>1&&(t.args=n.slice(1))}return T.getInstance().dispatch(t)}},C=function(e){var t=e.store,n=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;i.length>n;n++)0>t.indexOf(r=i[n])&&(o[r]=e[r]);return o}(e,["store"]);void 0!==t&&(0,console.warn)("The `store` prop passed to the Provider component will be ignored. Use functions `useReducer` and `useMiddleware` to customize the store.");return o.default.createElement(r.Provider,i({},n,{store:P()}))};C.propTypes={store:l.any},C.defaultProps={store:void 0},C.displayName="withStore(Provider)",e.Provider=C,e.createGlobalState=function(e){var t=e.name,r=e.state,n=void 0===r?{}:r,o=e.actions,i=e.handlers,a=void 0===i?{}:i;N.actions[t]=void 0===o?{}:o,N.handlers[t]=a,k(t,n)},e.getStore=P,e.useActions=function(e){var t={},r=A(e);return Object.keys(N.actions[e]).forEach((function(e){t[e]=function(){for(var t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];r.apply(void 0,[e].concat(n))}})),t},e.useDispatch=A,e.useGenerator=function(e){var r=t.useRef(),n=t.useRef(),o=t.useRef(e()),i=t.useState(),u=i[0],s=i[1],f=function(){var e,t=(e=c.mark((function e(){var t;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=o.current.next(n.current)).value instanceof Promise?t.value.then((function(e){n.current=e})).catch((function(e){n.current=e})).finally((function(){t.done||s(t)})):(r.current=t.value,t.done||s(t));case 2:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){a(i,n,o,u,c,"next",e)}function c(e){a(i,n,o,u,c,"throw",e)}u(void 0)}))});return function(){return t.apply(this,arguments)}}();return t.useEffect((function(){u&&f()}),[u]),[r.current,f]},e.useGlobalState=function(e,t){return t&&k(e,t),r.useSelector((function(t){var r;return null!=(r=t[e])?r:t}))},e.useHandler=function(e,r){var n=e;if(/^(.*?)\.(.*?)$/.test(e)){var o=e.split(".");n="@@"+o[0]+"/"+L(o[1])}t.useEffect((function(){return T.subscribe(n,r),function(){T.unsubscribe(n,r)}}),[])},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-redux")):"function"==typeof define&&define.amd?define(["exports","react","react-redux"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Speedux={},e.React,e["React Redux"])}(this,(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t);function i(){return(i=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function a(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function u(e){var t={exports:{}};return e(t,t.exports),t.exports}var c=u((function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=Object.create((t&&t.prototype instanceof v?t:v).prototype),i=new I(n||[]);return o._invoke=function(e,t,r){var n=l;return function(o,i){if(n===d)throw Error("Generator is already running");if(n===p){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=_(a,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=f(e,t,r);if("normal"===c.type){if(n=r.done?p:h,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=p,r.method="throw",r.arg=c.arg)}}}(e,r,i),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var l="suspendedStart",h="suspendedYield",d="executing",p="completed",y={};function v(){}function b(){}function g(){}var m={};m[i]=function(){return this};var w=Object.getPrototypeOf,O=w&&w(w(T([])));O&&O!==r&&n.call(O,i)&&(m=O);var E=g.prototype=v.prototype=Object.create(m);function j(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(l).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function _(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=f(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:L}}function L(){return{value:t,done:!0}}return b.prototype=E.constructor=g,g.constructor=b,b.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},j(x.prototype),x.prototype[a]=function(){return this},e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(E),c(E,u,"Generator"),E[i]=function(){return this},E.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(this.prev>=a.tryLoc){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(a.catchLoc>this.prev)return o(a.catchLoc,!0);if(a.finallyLoc>this.prev)return o(a.finallyLoc)}else if(c){if(a.catchLoc>this.prev)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(a.finallyLoc>this.prev)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(this.prev>=o.tryLoc&&n.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}!i||"break"!==e&&"continue"!==e||i.tryLoc>t||t>i.finallyLoc||(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;R(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));function s(){}function f(){}f.resetWarningCache=s;var l=u((function(e){e.exports=function(){function e(e,t,r,n,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:f,resetWarningCache:s};return r.PropTypes=r,r}()}));var h=function(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()),d=function(){return Math.random().toString(36).substring(7).split("").join(".")},p={INIT:"@@redux/INIT"+d(),REPLACE:"@@redux/REPLACE"+d(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+d()}};function y(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function v(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw Error("Expected the enhancer to be a function.");return r(v)(e,t)}if("function"!=typeof e)throw Error("Expected the reducer to be a function.");var o=e,i=t,a=[],u=a,c=!1;function s(){u===a&&(u=a.slice())}function f(){if(c)throw Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function l(e){if("function"!=typeof e)throw Error("Expected the listener to be a function.");if(c)throw Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return s(),u.push(e),function(){if(t){if(c)throw Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,s();var r=u.indexOf(e);u.splice(r,1),a=null}}}function d(e){if(!y(e))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(c)throw Error("Reducers may not dispatch actions.");try{c=!0,i=o(i,e)}finally{c=!1}for(var t=a=u,r=0;t.length>r;r++){(0,t[r])()}return e}function b(e){if("function"!=typeof e)throw Error("Expected the nextReducer to be a function.");o=e,d({type:p.REPLACE})}function g(){var e,t=l;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function r(){e.next&&e.next(f())}return r(),{unsubscribe:t(r)}}})[h]=function(){return this},e}return d({type:p.INIT}),(n={dispatch:d,subscribe:l,getState:f,replaceReducer:b})[h]=g,n}function b(e,t){var r=t&&t.type;return"Given "+(r&&'action "'+r+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function g(e){for(var t=Object.keys(e),r={},n=0;t.length>n;n++){var o=t[n];"function"==typeof e[o]&&(r[o]=e[o])}var i,a=Object.keys(r);try{!function(e){Object.keys(e).forEach((function(t){var r=e[t];if(void 0===r(void 0,{type:p.INIT}))throw Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===r(void 0,{type:p.PROBE_UNKNOWN_ACTION()}))throw Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+p.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(r)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var n=!1,o={},u=0;a.length>u;u++){var c=a[u],s=e[c],f=(0,r[c])(s,t);if(void 0===f){var l=b(c,t);throw Error(l)}o[c]=f,n=n||f!==s}return(n=n||a.length!==Object.keys(e).length)?o:e}}function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r}function O(e){for(var t=1;arguments.length>t;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(r,!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function E(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var j=function(e){return Object.prototype.toString.call(e).toLowerCase().replace(/\[object\s|\]/g,"")},x=function e(t,r,n){void 0===n&&(n=!1);var o=j(t),a=(arguments.length>3?arguments.length-3:0)>0,u=arguments.length>3?arguments[3]:void 0;if("array"!==o&&"object"!==o)return t;var c=t;if(n||("array"===o&&(c=[].concat(t)),"object"===o&&(c=i({},t))),""===r)return a?c:void 0;if("*"===r){if(a){if("array"===o)if(void 0===u)for(;c.length;)e(c,0,!0,u);else{var s=c,f=s.length;c.forEach((function(t,r){var o=f-1-r,i=u;if("function"===j(u)&&(i=u(c[o])),void 0===i)e(c,o,!0,void 0);else{var a=e(c,o,n,i);c[o]=a[o]}}))}else"object"===o&&Object.keys(c).forEach((function(t){return e(c,t,!0,u)}));return c}if("array"===o)return c;if("object"===o)return Object.values(c)}if(a){var l=u;return"function"===j(l)&&(l=l(c[r])),void 0===l&&"array"===o?c.splice(r,1):void 0===l&&"object"===o?delete c[r]:c[r]=l,c}return c[r]},_=function e(t,r,n){void 0===n&&(n=!1);var o=j(t),a=(arguments.length>3?arguments.length-3:0)>0,u=arguments.length>3?arguments[3]:void 0,c=(""+r).replace(/^\[|\]$/g,"");if(1===(c=(c=(c=c.replace(/\[|\]/g,".")).replace(/\.{2,}/g,".")).split(".")).length)return a?x(t,c[0],n,u):x(t,c[0],n);var s=t;n||("array"===o&&(s=[].concat(t)),"object"===o&&(s=i({},t)));var f=c[0],l=c.slice(1).join(".");if(a)return"*"===f?("array"===o&&s.forEach((function(t,r){s[r]=e(t,l,n,u)})),"object"===o&&Object.keys(s).forEach((function(t){s[t]=e(s[t],l,n,u)})),s):(void 0===s[f]&&(s[f]={}),s[f]=e(s[f],l,n,u),s);if("*"===f){if("array"===o)return s.map((function(t){return e(t,l,n)}));if("object"===o)return Object.values(s).map((function(t){return e(t,l,n)}))}return e(s[f]||{},l,n)},S=function(e){var t=e.replace(/[^\w\s_-]/g,"").replace(/^[A-Z]+$/,(function(e){return e.toLowerCase()}));return/(.*?)[\s_-]/.test(t)?t.replace(/[\s_-]|[a-z](?=[A-Z])/g,(function(e){return/[\s_-]/.test(e)?":":e+":"})).split(":").map((function(e,t){return 0===t?e.toLowerCase():""+e[0].toUpperCase()+e.slice(1).toLowerCase()})).join(""):t},R=function(e){return S(e).replace(/[a-z](?=[A-Z])/g,(function(e){return e[0]+"_"})).toLowerCase()},I=function e(t){var r=j(t);if("object"===r||"array"===r){var n="array"===r?[]:{};return Object.keys(t).forEach((function(r){n[r]=["object","array"].includes(j(t[r]))?e(t[r]):t[r]})),n}return t},T={reducers:{},subscribers:{},sagas:{},middlewares:[],combinedInitialState:{},create:function(){return this.storeInstance?this.storeInstance:this.buildInstance()},buildInstance:function(){var e="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__():function(e){return e};return this.devTools=this.devTools||E(e),this.storeInstance=v(this.getRootReducer(),E.apply(void 0,this.middlewares.concat([this.devTools]))),this.storeInstance},getRootReducer:function(){return this.rootReducer?this.rootReducer:this.buildRootReducer()},buildRootReducer:function(){var e=this,t=i({},this.reducers);0===Object.keys(t).length&&(t.$_foo=function(e){return void 0===e&&(e={}),e});var r=g(t);return this.rootReducer=function(t,n){void 0===t&&(t=e.combinedInitialState),void 0===n&&(n=null),e.cachedState=t;var o=r(t,n);return e.cachedState=o,e.subscribers[n.type]&&e.subscribers[n.type].forEach((function(e){e(n)})),o},this.rootReducer},update:function(){return this.storeInstance.replaceReducer(this.buildRootReducer())},useReducer:function(e,t,r){this.reducers[e]=t,this.combinedInitialState[e]=r},resetReducers:function(){this.reducers={},this.combinedInitialState={}},subscribe:function(e,t){var r;this.subscribers[e]=null!=(r=this.subscribers[e])?r:[],this.subscribers[e].includes(t)||this.subscribers[e].push(t)},unsubscribe:function(e,t){this.subscribers[e]=this.subscribers[e].filter((function(e){return e!==t}))},useMiddleware:function(e){this.middlewares.unshift(function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return function(e){return function(){var r=e.apply(void 0,arguments),n=function(){throw Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return O({},r,{dispatch:n=E.apply(void 0,i)(r.dispatch)})}}}(e))},resetMiddlewares:function(){this.middlewares=[]},useSaga:function(e,t){this.sagas[e]=t},useSagas:function(e){var t=this;Object.keys(e).forEach((function(r){return t.useSaga(r,e[r])}))},resetSagas:function(){this.sagas={}},reset:function(){this.resetReducers(),this.resetMiddlewares(),this.resetSagas(),delete this.rootReducer,delete this.storeInstance,delete this.registeredNames},getState:function(e){return function(e,t){return"string"===j(e)?_(t,e):"object"===j(e)?Object.keys(e).reduce((function(r,n){var o;return i({},r,((o={})[n]=_(t,e[n]),o))}),{}):t}(e,this.cachedState)},getInstance:function(){return this.storeInstance},registerName:function(e){(void 0===this.registeredNames&&(this.registeredNames={}),!0===this.registeredNames[e])?(0,console.warn)("Duplicate name: "+e+". This name has already been used to connect another component, please use a different name."):T.registeredNames[e]=!0}},L=function(e){var t=S(e);return R(t).toUpperCase()};T.create();var P=function(){return T.getInstance()},N={actions:{},handlers:{}},k=function(e,t){void 0===t&&(t={});T.useReducer(e,(function(r,n){var o,a,u,c,s=null!=r?r:t,f=n.type.replace(/^@@|\/.*?$/g,""),l=(o=n.type.replace(/^.*?\//,""),a=R(o),S(a.toLowerCase())),h=N.actions[e][l],d=!!h&&"action";if(!h){var p,y=N.handlers[e];d=!!(h=null!=(p=y[n.type])?p:y[f+"."+l])&&"handler"}if(h){var v=h.apply(void 0,{action:n.args,handler:[n]}[d]),b=j(v);console.log(v,b,"function"==typeof v[Symbol.iterator]);var g={};return"object"===b&&(g=v),"function"===b&&(g=v(s[e])),u=s,Object.keys(c=g).reduce((function(e,t){return _(e,t,!1,c[t])}),i({},u))}return s}),t),T.update()},A=function(e){return function(){for(var t={},r=arguments.length,n=Array(r),o=0;r>o;o++)n[o]=arguments[o];if("object"===j(n[0]))t=I(n[0]);else if("string"===j(n[0])){if(e)t.type="@@"+e+"/"+L(n[0]);else if(/^([^.]*?)\.([^.]*?)$/.test(n[0])){var i=n[0].split("."),a=i[0],u=i[1];t.type="@@"+a+"/"+L(u)}else t.type=n[0];t.payload={},n.length>1&&(t.args=n.slice(1))}return T.getInstance().dispatch(t)}},C=function(e){var t=e.store,n=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;i.length>n;n++)0>t.indexOf(r=i[n])&&(o[r]=e[r]);return o}(e,["store"]);void 0!==t&&(0,console.warn)("The `store` prop passed to the Provider component will be ignored. Use functions `useReducer` and `useMiddleware` to customize the store.");return o.default.createElement(r.Provider,i({},n,{store:P()}))};C.propTypes={store:l.any},C.defaultProps={store:void 0},C.displayName="withStore(Provider)",e.Provider=C,e.createGlobalState=function(e){var t=e.name,r=e.state,n=void 0===r?{}:r,o=e.actions,i=e.handlers,a=void 0===i?{}:i;N.actions[t]=void 0===o?{}:o,N.handlers[t]=a,k(t,n)},e.getStore=P,e.useActions=function(e){var t={},r=A(e);return Object.keys(N.actions[e]).forEach((function(e){t[e]=function(){for(var t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];r.apply(void 0,[e].concat(n))}})),t},e.useDispatch=A,e.useGenerator=function(e){var r=t.useRef(),n=t.useRef(),o=t.useRef(e()),i=t.useState(),u=i[0],s=i[1],f=function(){var e,t=(e=c.mark((function e(){var t;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=o.current.next(n.current)).value instanceof Promise?t.value.then((function(e){n.current=e})).catch((function(e){n.current=e})).finally((function(){t.done||s(t)})):(r.current=t.value,t.done||s(t));case 2:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){a(i,n,o,u,c,"next",e)}function c(e){a(i,n,o,u,c,"throw",e)}u(void 0)}))});return function(){return t.apply(this,arguments)}}();return t.useEffect((function(){u&&f()}),[u]),[r.current,f]},e.useGlobalState=function(e,t){return t&&k(e,t),r.useSelector((function(t){var r;return null!=(r=t[e])?r:t}))},e.useHandler=function(e,r){var n=e;if(/^(.*?)\.(.*?)$/.test(e)){var o=e.split(".");n="@@"+o[0]+"/"+L(o[1])}t.useEffect((function(){return T.subscribe(n,r),function(){T.unsubscribe(n,r)}}),[])},Object.defineProperty(e,"__esModule",{value:!0})})); |
@@ -93,3 +93,2 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
var callbackType = callback ? 'action' : false; | ||
console.log('callback', callback); // console.log('is gen', typeof callback[Symbol.iterator] === 'function') | ||
@@ -111,2 +110,3 @@ if (!callback) { | ||
var callbackResultType = helpers.getObjectType(callbackResult); | ||
console.log(callbackResult, callbackResultType, typeof callbackResult[Symbol.iterator] === 'function'); | ||
var stateFragment = {}; | ||
@@ -113,0 +113,0 @@ if (callbackResultType === 'object') stateFragment = callbackResult; |
@@ -113,3 +113,2 @@ "use strict"; | ||
var callbackType = callback ? 'action' : false; | ||
console.log('callback', callback); // console.log('is gen', typeof callback[Symbol.iterator] === 'function') | ||
@@ -131,2 +130,3 @@ if (!callback) { | ||
var callbackResultType = helpers.getObjectType(callbackResult); | ||
console.log(callbackResult, callbackResultType, typeof callbackResult[Symbol.iterator] === 'function'); | ||
var stateFragment = {}; | ||
@@ -133,0 +133,0 @@ if (callbackResultType === 'object') stateFragment = callbackResult; |
{ | ||
"name": "badburger", | ||
"version": "4.0.17", | ||
"version": "4.0.18", | ||
"description": "An opinionated state management library based on Redux.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -79,6 +79,2 @@ /** | ||
console.log('callback', callback) | ||
// console.log('is gen', typeof callback[Symbol.iterator] === 'function') | ||
if (!callback) { | ||
@@ -95,2 +91,4 @@ const handlers = lookbook.handlers[name]; | ||
console.log(callbackResult, callbackResultType, typeof callbackResult[Symbol.iterator] === 'function') | ||
let stateFragment = {}; | ||
@@ -97,0 +95,0 @@ if (callbackResultType === 'object') stateFragment = callbackResult; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
374071
8400