redux-persist
Advanced tools
Comparing version 6.0.0-pre1 to 6.0.0-pre2
@@ -111,301 +111,2 @@ (function (global, factory) { | ||
var LIBRARY = require('./_library'); | ||
var global$1 = require('./_global'); | ||
var ctx = require('./_ctx'); | ||
var classof = require('./_classof'); | ||
var $export = require('./_export'); | ||
var isObject = require('./_is-object'); | ||
var aFunction = require('./_a-function'); | ||
var anInstance = require('./_an-instance'); | ||
var forOf = require('./_for-of'); | ||
var speciesConstructor = require('./_species-constructor'); | ||
var task = require('./_task').set; | ||
var microtask = require('./_microtask')(); | ||
var newPromiseCapabilityModule = require('./_new-promise-capability'); | ||
var perform = require('./_perform'); | ||
var userAgent = require('./_user-agent'); | ||
var promiseResolve = require('./_promise-resolve'); | ||
var PROMISE = 'Promise'; | ||
var TypeError$1 = global$1.TypeError; | ||
var process = global$1.process; | ||
var versions = process && process.versions; | ||
var v8 = versions && versions.v8 || ''; | ||
var $Promise = global$1[PROMISE]; | ||
var isNode = classof(process) == 'process'; | ||
var empty = function () { /* empty */ }; | ||
var Internal; | ||
var newGenericPromiseCapability; | ||
var OwnPromiseCapability; | ||
var Wrapper; | ||
var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; | ||
var USE_NATIVE = !!function () { | ||
try { | ||
// correct subclassing with @@species support | ||
var promise = $Promise.resolve(1); | ||
var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) { | ||
exec(empty, empty); | ||
}; | ||
// unhandled rejections tracking support, NodeJS Promise without it fails @@species test | ||
return (isNode || typeof PromiseRejectionEvent == 'function') | ||
&& promise.then(empty) instanceof FakePromise | ||
// v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables | ||
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565 | ||
// we can't detect it synchronously, so just check versions | ||
&& v8.indexOf('6.6') !== 0 | ||
&& userAgent.indexOf('Chrome/66') === -1; | ||
} catch (e) { /* empty */ } | ||
}(); | ||
// helpers | ||
var isThenable = function (it) { | ||
var then; | ||
return isObject(it) && typeof (then = it.then) == 'function' ? then : false; | ||
}; | ||
var notify = function (promise, isReject) { | ||
if (promise._n) return; | ||
promise._n = true; | ||
var chain = promise._c; | ||
microtask(function () { | ||
var value = promise._v; | ||
var ok = promise._s == 1; | ||
var i = 0; | ||
var run = function (reaction) { | ||
var handler = ok ? reaction.ok : reaction.fail; | ||
var resolve = reaction.resolve; | ||
var reject = reaction.reject; | ||
var domain = reaction.domain; | ||
var result, then, exited; | ||
try { | ||
if (handler) { | ||
if (!ok) { | ||
if (promise._h == 2) onHandleUnhandled(promise); | ||
promise._h = 1; | ||
} | ||
if (handler === true) result = value; | ||
else { | ||
if (domain) domain.enter(); | ||
result = handler(value); // may throw | ||
if (domain) { | ||
domain.exit(); | ||
exited = true; | ||
} | ||
} | ||
if (result === reaction.promise) { | ||
reject(TypeError$1('Promise-chain cycle')); | ||
} else if (then = isThenable(result)) { | ||
then.call(result, resolve, reject); | ||
} else resolve(result); | ||
} else reject(value); | ||
} catch (e) { | ||
if (domain && !exited) domain.exit(); | ||
reject(e); | ||
} | ||
}; | ||
while (chain.length > i) run(chain[i++]); // variable length - can't use forEach | ||
promise._c = []; | ||
promise._n = false; | ||
if (isReject && !promise._h) onUnhandled(promise); | ||
}); | ||
}; | ||
var onUnhandled = function (promise) { | ||
task.call(global$1, function () { | ||
var value = promise._v; | ||
var unhandled = isUnhandled(promise); | ||
var result, handler, console; | ||
if (unhandled) { | ||
result = perform(function () { | ||
if (isNode) { | ||
process.emit('unhandledRejection', value, promise); | ||
} else if (handler = global$1.onunhandledrejection) { | ||
handler({ promise: promise, reason: value }); | ||
} else if ((console = global$1.console) && console.error) { | ||
console.error('Unhandled promise rejection', value); | ||
} | ||
}); | ||
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should | ||
promise._h = isNode || isUnhandled(promise) ? 2 : 1; | ||
} promise._a = undefined; | ||
if (unhandled && result.e) throw result.v; | ||
}); | ||
}; | ||
var isUnhandled = function (promise) { | ||
return promise._h !== 1 && (promise._a || promise._c).length === 0; | ||
}; | ||
var onHandleUnhandled = function (promise) { | ||
task.call(global$1, function () { | ||
var handler; | ||
if (isNode) { | ||
process.emit('rejectionHandled', promise); | ||
} else if (handler = global$1.onrejectionhandled) { | ||
handler({ promise: promise, reason: promise._v }); | ||
} | ||
}); | ||
}; | ||
var $reject = function (value) { | ||
var promise = this; | ||
if (promise._d) return; | ||
promise._d = true; | ||
promise = promise._w || promise; // unwrap | ||
promise._v = value; | ||
promise._s = 2; | ||
if (!promise._a) promise._a = promise._c.slice(); | ||
notify(promise, true); | ||
}; | ||
var $resolve = function (value) { | ||
var promise = this; | ||
var then; | ||
if (promise._d) return; | ||
promise._d = true; | ||
promise = promise._w || promise; // unwrap | ||
try { | ||
if (promise === value) throw TypeError$1("Promise can't be resolved itself"); | ||
if (then = isThenable(value)) { | ||
microtask(function () { | ||
var wrapper = { _w: promise, _d: false }; // wrap | ||
try { | ||
then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); | ||
} catch (e) { | ||
$reject.call(wrapper, e); | ||
} | ||
}); | ||
} else { | ||
promise._v = value; | ||
promise._s = 1; | ||
notify(promise, false); | ||
} | ||
} catch (e) { | ||
$reject.call({ _w: promise, _d: false }, e); // wrap | ||
} | ||
}; | ||
// constructor polyfill | ||
if (!USE_NATIVE) { | ||
// 25.4.3.1 Promise(executor) | ||
$Promise = function Promise(executor) { | ||
anInstance(this, $Promise, PROMISE, '_h'); | ||
aFunction(executor); | ||
Internal.call(this); | ||
try { | ||
executor(ctx($resolve, this, 1), ctx($reject, this, 1)); | ||
} catch (err) { | ||
$reject.call(this, err); | ||
} | ||
}; | ||
// eslint-disable-next-line no-unused-vars | ||
Internal = function Promise(executor) { | ||
this._c = []; // <- awaiting reactions | ||
this._a = undefined; // <- checked in isUnhandled reactions | ||
this._s = 0; // <- state | ||
this._d = false; // <- done | ||
this._v = undefined; // <- value | ||
this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled | ||
this._n = false; // <- notify | ||
}; | ||
Internal.prototype = require('./_redefine-all')($Promise.prototype, { | ||
// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) | ||
then: function then(onFulfilled, onRejected) { | ||
var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); | ||
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; | ||
reaction.fail = typeof onRejected == 'function' && onRejected; | ||
reaction.domain = isNode ? process.domain : undefined; | ||
this._c.push(reaction); | ||
if (this._a) this._a.push(reaction); | ||
if (this._s) notify(this, false); | ||
return reaction.promise; | ||
}, | ||
// 25.4.5.1 Promise.prototype.catch(onRejected) | ||
'catch': function (onRejected) { | ||
return this.then(undefined, onRejected); | ||
} | ||
}); | ||
OwnPromiseCapability = function () { | ||
var promise = new Internal(); | ||
this.promise = promise; | ||
this.resolve = ctx($resolve, promise, 1); | ||
this.reject = ctx($reject, promise, 1); | ||
}; | ||
newPromiseCapabilityModule.f = newPromiseCapability = function (C) { | ||
return C === $Promise || C === Wrapper | ||
? new OwnPromiseCapability(C) | ||
: newGenericPromiseCapability(C); | ||
}; | ||
} | ||
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); | ||
require('./_set-to-string-tag')($Promise, PROMISE); | ||
require('./_set-species')(PROMISE); | ||
Wrapper = require('./_core')[PROMISE]; | ||
// statics | ||
$export($export.S + $export.F * !USE_NATIVE, PROMISE, { | ||
// 25.4.4.5 Promise.reject(r) | ||
reject: function reject(r) { | ||
var capability = newPromiseCapability(this); | ||
var $$reject = capability.reject; | ||
$$reject(r); | ||
return capability.promise; | ||
} | ||
}); | ||
$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { | ||
// 25.4.4.6 Promise.resolve(x) | ||
resolve: function resolve(x) { | ||
return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); | ||
} | ||
}); | ||
$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) { | ||
$Promise.all(iter)['catch'](empty); | ||
})), PROMISE, { | ||
// 25.4.4.1 Promise.all(iterable) | ||
all: function all(iterable) { | ||
var C = this; | ||
var capability = newPromiseCapability(C); | ||
var resolve = capability.resolve; | ||
var reject = capability.reject; | ||
var result = perform(function () { | ||
var values = []; | ||
var index = 0; | ||
var remaining = 1; | ||
forOf(iterable, false, function (promise) { | ||
var $index = index++; | ||
var alreadyCalled = false; | ||
values.push(undefined); | ||
remaining++; | ||
C.resolve(promise).then(function (value) { | ||
if (alreadyCalled) return; | ||
alreadyCalled = true; | ||
values[$index] = value; | ||
--remaining || resolve(values); | ||
}, reject); | ||
}); | ||
--remaining || resolve(values); | ||
}); | ||
if (result.e) reject(result.v); | ||
return capability.promise; | ||
}, | ||
// 25.4.4.4 Promise.race(iterable) | ||
race: function race(iterable) { | ||
var C = this; | ||
var capability = newPromiseCapability(C); | ||
var reject = capability.reject; | ||
var result = perform(function () { | ||
forOf(iterable, false, function (promise) { | ||
C.resolve(promise).then(capability.resolve, reject); | ||
}); | ||
}); | ||
if (result.e) reject(result.v); | ||
return capability.promise; | ||
} | ||
}); | ||
// 19.1.3.6 Object.prototype.toString() | ||
var classof$1 = require('./_classof'); | ||
var test = {}; | ||
test[require('./_wks')('toStringTag')] = 'z'; | ||
if (test + '' != '[object z]') { | ||
require('./_redefine')(Object.prototype, 'toString', function toString() { | ||
return '[object ' + classof$1(this) + ']'; | ||
}, true); | ||
} | ||
var KEY_PREFIX = 'persist:'; | ||
@@ -420,105 +121,2 @@ var FLUSH = 'persist/FLUSH'; | ||
var $iterators = require('./es6.array.iterator'); | ||
var getKeys = require('./_object-keys'); | ||
var redefine = require('./_redefine'); | ||
var global$2 = require('./_global'); | ||
var hide = require('./_hide'); | ||
var Iterators = require('./_iterators'); | ||
var wks = require('./_wks'); | ||
var ITERATOR = wks('iterator'); | ||
var TO_STRING_TAG = wks('toStringTag'); | ||
var ArrayValues = Iterators.Array; | ||
var DOMIterables = { | ||
CSSRuleList: true, // TODO: Not spec compliant, should be false. | ||
CSSStyleDeclaration: false, | ||
CSSValueList: false, | ||
ClientRectList: false, | ||
DOMRectList: false, | ||
DOMStringList: false, | ||
DOMTokenList: true, | ||
DataTransferItemList: false, | ||
FileList: false, | ||
HTMLAllCollection: false, | ||
HTMLCollection: false, | ||
HTMLFormElement: false, | ||
HTMLSelectElement: false, | ||
MediaList: true, // TODO: Not spec compliant, should be false. | ||
MimeTypeArray: false, | ||
NamedNodeMap: false, | ||
NodeList: true, | ||
PaintRequestList: false, | ||
Plugin: false, | ||
PluginArray: false, | ||
SVGLengthList: false, | ||
SVGNumberList: false, | ||
SVGPathSegList: false, | ||
SVGPointList: false, | ||
SVGStringList: false, | ||
SVGTransformList: false, | ||
SourceBufferList: false, | ||
StyleSheetList: true, // TODO: Not spec compliant, should be false. | ||
TextTrackCueList: false, | ||
TextTrackList: false, | ||
TouchList: false | ||
}; | ||
for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { | ||
var NAME = collections[i]; | ||
var explicit = DOMIterables[NAME]; | ||
var Collection = global$2[NAME]; | ||
var proto = Collection && Collection.prototype; | ||
var key; | ||
if (proto) { | ||
if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); | ||
if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); | ||
Iterators[NAME] = ArrayValues; | ||
if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); | ||
} | ||
} | ||
var addToUnscopables = require('./_add-to-unscopables'); | ||
var step = require('./_iter-step'); | ||
var Iterators$1 = require('./_iterators'); | ||
var toIObject = require('./_to-iobject'); | ||
// 22.1.3.4 Array.prototype.entries() | ||
// 22.1.3.13 Array.prototype.keys() | ||
// 22.1.3.29 Array.prototype.values() | ||
// 22.1.3.30 Array.prototype[@@iterator]() | ||
module.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) { | ||
this._t = toIObject(iterated); // target | ||
this._i = 0; // next index | ||
this._k = kind; // kind | ||
// 22.1.5.2.1 %ArrayIteratorPrototype%.next() | ||
}, function () { | ||
var O = this._t; | ||
var kind = this._k; | ||
var index = this._i++; | ||
if (!O || index >= O.length) { | ||
this._t = undefined; | ||
return step(1); | ||
} | ||
if (kind == 'keys') return step(0, index); | ||
if (kind == 'values') return step(0, O[index]); | ||
return step(0, [index, O[index]]); | ||
}, 'values'); | ||
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) | ||
Iterators$1.Arguments = Iterators$1.Array; | ||
addToUnscopables('keys'); | ||
addToUnscopables('values'); | ||
addToUnscopables('entries'); | ||
// 19.1.2.14 Object.keys(O) | ||
var toObject = require('./_to-object'); | ||
var $keys = require('./_object-keys'); | ||
require('./_object-sap')('keys', function () { | ||
return function keys(it) { | ||
return $keys(toObject(it)); | ||
}; | ||
}); | ||
/* | ||
@@ -565,10 +163,10 @@ autoMergeLevel1: | ||
if (!config.serialize) { | ||
serialize = defaultSerialize; | ||
if (config.serialize === false) { | ||
serialize = function serialize(x) { | ||
return x; | ||
}; | ||
} else if (typeof config.serialize === 'function') { | ||
serialize = config.serialize; | ||
} else { | ||
serialize = function serialize(x) { | ||
return x; | ||
}; | ||
serialize = defaultSerialize; | ||
} | ||
@@ -689,10 +287,10 @@ | ||
if (!config.deserialize) { | ||
deserialize = defaultDeserialize; | ||
if (config.deserialize === false) { | ||
deserialize = function deserialize(x) { | ||
return x; | ||
}; | ||
} else if (typeof config.deserialize === 'function') { | ||
deserialize = config.deserialize; | ||
} else { | ||
deserialize = function deserialize(x) { | ||
return x; | ||
}; | ||
deserialize = defaultDeserialize; | ||
} | ||
@@ -1417,19 +1015,2 @@ | ||
var $at = require('./_string-at')(true); | ||
// 21.1.3.27 String.prototype[@@iterator]() | ||
require('./_iter-define')(String, 'String', function (iterated) { | ||
this._t = String(iterated); // target | ||
this._i = 0; // next index | ||
// 21.1.5.2.1 %StringIteratorPrototype%.next() | ||
}, function () { | ||
var O = this._t; | ||
var index = this._i; | ||
var point; | ||
if (index >= O.length) return { value: undefined, done: true }; | ||
point = $at(O, index); | ||
this._i += point.length; | ||
return { value: point, done: false }; | ||
}); | ||
var initialState = { | ||
@@ -1544,25 +1125,2 @@ registry: [], | ||
var $export$1 = require('./_export'); | ||
var aFunction$1 = require('./_a-function'); | ||
var toObject$1 = require('./_to-object'); | ||
var fails = require('./_fails'); | ||
var $sort = [].sort; | ||
var test$1 = [1, 2, 3]; | ||
$export$1($export$1.P + $export$1.F * (fails(function () { | ||
// IE8- | ||
test$1.sort(undefined); | ||
}) || !fails(function () { | ||
// V8 bug | ||
test$1.sort(null); | ||
// Old WebKit | ||
}) || !require('./_strict-method')($sort)), 'Array', { | ||
// 22.1.3.25 Array.prototype.sort(comparefn) | ||
sort: function sort(comparefn) { | ||
return comparefn === undefined | ||
? $sort.call(toObject$1(this)) | ||
: $sort.call(toObject$1(this), aFunction$1(comparefn)); | ||
} | ||
}); | ||
function createMigrate(migrations, config) { | ||
@@ -1569,0 +1127,0 @@ var _ref = config || {}, |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.ReduxPersist={})}(this,function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}function i(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;o.length>n;n++)0>t.indexOf(r=o[n])&&(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;o.length>n;n++)0>t.indexOf(r=o[n])&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function o(e){return function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);e.length>t;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var s,u,c,a,f=require("./_library"),l=require("./_global"),d=require("./_ctx"),h=require("./_classof"),p=require("./_export"),y=require("./_is-object"),v=require("./_a-function"),_=require("./_an-instance"),b=require("./_for-of"),m=require("./_species-constructor"),g=require("./_task").set,S=require("./_microtask")(),E=require("./_new-promise-capability"),w=require("./_perform"),O=require("./_user-agent"),P=require("./_promise-resolve"),j=l.TypeError,k=l.process,x=k&&k.versions,q=x&&x.v8||"",T=l.Promise,R="process"==h(k),I=function(){},L=u=E.f,A=!!function(){try{var e=T.resolve(1),t=(e.constructor={})[require("./_wks")("species")]=function(e){e(I,I)};return(R||"function"==typeof PromiseRejectionEvent)&&e.then(I)instanceof t&&0!==q.indexOf("6.6")&&-1===O.indexOf("Chrome/66")}catch(e){}}(),N=function(e){var t;return!(!y(e)||"function"!=typeof(t=e.then))&&t},C=function(e,t){if(!e._n){e._n=!0;var r=e._c;S(function(){for(var n=e._v,i=1==e._s,o=0,s=function(t){var r,o,s,u=i?t.ok:t.fail,c=t.resolve,a=t.reject,f=t.domain;try{u?(i||(2==e._h&&G(e),e._h=1),!0===u?r=n:(f&&f.enter(),r=u(n),f&&(f.exit(),s=!0)),r===t.promise?a(j("Promise-chain cycle")):(o=N(r))?o.call(r,c,a):c(r)):a(n)}catch(e){f&&!s&&f.exit(),a(e)}};r.length>o;)s(r[o++]);e._c=[],e._n=!1,t&&!e._h&&F(e)})}},F=function(e){g.call(l,function(){var t,r,n,i=e._v,o=M(e);if(o&&(t=w(function(){R?k.emit("unhandledRejection",i,e):(r=l.onunhandledrejection)?r({promise:e,reason:i}):(n=l.console)&&n.error&&n.error("Unhandled promise rejection",i)}),e._h=R||M(e)?2:1),e._a=void 0,o&&t.e)throw t.v})},M=function(e){return 1!==e._h&&0===(e._a||e._c).length},G=function(e){g.call(l,function(){var t;R?k.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})})},U=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),C(t,!0))},H=function(e){var t,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw j("Promise can't be resolved itself");(t=N(e))?S(function(){var n={_w:r,_d:!1};try{t.call(e,d(H,n,1),d(U,n,1))}catch(e){U.call(n,e)}}):(r._v=e,r._s=1,C(r,!1))}catch(e){U.call({_w:r,_d:!1},e)}}};A||(T=function(e){_(this,T,"Promise","_h"),v(e),s.call(this);try{e(d(H,this,1),d(U,this,1))}catch(e){U.call(this,e)}},(s=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=require("./_redefine-all")(T.prototype,{then:function(e,t){var r=L(m(this,T));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=R?k.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&C(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),c=function(){var e=new s;this.promise=e,this.resolve=d(H,e,1),this.reject=d(U,e,1)},E.f=L=function(e){return e===T||e===a?new c(e):u(e)}),p(p.G+p.W+p.F*!A,{Promise:T}),require("./_set-to-string-tag")(T,"Promise"),require("./_set-species")("Promise"),a=require("./_core").Promise,p(p.S+p.F*!A,"Promise",{reject:function(e){var t=L(this);return(0,t.reject)(e),t.promise}}),p(p.S+p.F*(f||!A),"Promise",{resolve:function(e){return P(f&&this===a?T:this,e)}}),p(p.S+p.F*!(A&&require("./_iter-detect")(function(e){T.all(e).catch(I)})),"Promise",{all:function(e){var t=this,r=L(t),n=r.resolve,i=r.reject,o=w(function(){var r=[],o=0,s=1;b(e,!1,function(e){var u=o++,c=!1;r.push(void 0),s++,t.resolve(e).then(function(e){c||(c=!0,r[u]=e,--s||n(r))},i)}),--s||n(r)});return o.e&&i(o.v),r.promise},race:function(e){var t=this,r=L(t),n=r.reject,i=w(function(){b(e,!1,function(e){t.resolve(e).then(r.resolve,n)})});return i.e&&n(i.v),r.promise}});var z=require("./_classof"),D={};D[require("./_wks")("toStringTag")]="z",D+""!="[object z]"&&require("./_redefine")(Object.prototype,"toString",function(){return"[object "+z(this)+"]"},!0);for(var V="persist:",Y="persist/FLUSH",B="persist/REHYDRATE",K="persist/PAUSE",W="persist/PERSIST",J="persist/PURGE",X="persist/REGISTER",Q=-1,Z=require("./es6.array.iterator"),$=require("./_object-keys"),ee=require("./_redefine"),te=require("./_global"),re=require("./_hide"),ne=require("./_iterators"),ie=require("./_wks"),oe=ie("iterator"),se=ie("toStringTag"),ue=ne.Array,ce={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},ae=$(ce),fe=0;ae.length>fe;fe++){var le,de=ae[fe],he=ce[de],pe=te[de],ye=pe&&pe.prototype;if(ye&&(ye[oe]||re(ye,oe,ue),ye[se]||re(ye,se,de),ne[de]=ue,he))for(le in Z)ye[le]||ee(ye,le,Z[le],!0)}var ve=require("./_add-to-unscopables"),_e=require("./_iter-step"),be=require("./_iterators"),me=require("./_to-iobject");module.exports=require("./_iter-define")(Array,"Array",function(e,t){this._t=me(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return e&&e.length>r?_e(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]]):(this._t=void 0,_e(1))},"values"),be.Arguments=be.Array,ve("keys"),ve("values"),ve("entries");var ge=require("./_to-object"),Se=require("./_object-keys");function Ee(e,r,i,o){var s=n({},i);return e&&"object"===t(e)&&Object.keys(e).forEach(function(t){"_persist"!==t&&r[t]===i[t]&&(s[t]=e[t])}),s}function we(e){var t,r=e.blacklist||null,n=e.whitelist||null,i=e.transforms||[],o=e.throttle||0,s="".concat(void 0!==e.keyPrefix?e.keyPrefix:V).concat(e.key),u=e.storage;t=e.serialize?"function"==typeof e.serialize?e.serialize:function(e){return e}:Oe;var c=e.writeFailHandler||null,a={},f={},l=[],d=null,h=null;function p(){if(0===l.length)return d&&clearInterval(d),void(d=null);var e=l.shift(),r=i.reduce(function(t,r){return r.in(t,e,a)},a[e]);if(void 0!==r)try{f[e]=t(r)}catch(e){console.error("redux-persist/createPersistoid: error serializing state",e)}else delete f[e];0===l.length&&(Object.keys(f).forEach(function(e){void 0===a[e]&&delete f[e]}),h=u.setItem(s,t(f)).catch(v))}function y(e){return(!n||-1!==n.indexOf(e)||"_persist"===e)&&(!r||-1===r.indexOf(e))}function v(e){c&&c(e)}return{update:function(e){Object.keys(e).forEach(function(t){y(t)&&a[t]!==e[t]&&-1===l.indexOf(t)&&l.push(t)}),Object.keys(a).forEach(function(t){void 0===e[t]&&y(t)&&-1===l.indexOf(t)&&void 0!==a[t]&&l.push(t)}),null===d&&(d=setInterval(p,o)),a=e},flush:function(){for(;0!==l.length;)p();return h||Promise.resolve()}}}function Oe(e){return JSON.stringify(e)}function Pe(e){var t,r=e.transforms||[],n="".concat(void 0!==e.keyPrefix?e.keyPrefix:V).concat(e.key);return t=e.deserialize?"function"==typeof e.deserialize?e.deserialize:function(e){return e}:je,e.storage.getItem(n).then(function(e){if(e)try{var n={},i=t(e);return Object.keys(i).forEach(function(e){n[e]=r.reduceRight(function(t,r){return r.out(t,e,i)},t(i[e]))}),n}catch(e){throw e}})}function je(e){return JSON.parse(e)}function ke(e){var t=e.storage,r="".concat(void 0!==e.keyPrefix?e.keyPrefix:V).concat(e.key);return t.removeItem(r,xe)}function xe(e){0}require("./_object-sap")("keys",function(){return function(e){return Se(ge(e))}});var qe=5e3;function Te(e,t){var r=void 0!==e.version?e.version:Q,o=void 0===e.stateReconciler?Ee:e.stateReconciler,s=e.getStoredState||Pe,u=void 0!==e.timeout?e.timeout:qe,c=null,a=!1,f=!0,l=function(e){return e._persist.rehydrated&&c&&!f&&c.update(e),e};return function(d,h){var p=d||{},y=p._persist,v=i(p,["_persist"]);if(h.type===W){var _=!1,b=function(t,r){_||(h.rehydrate(e.key,t,r),_=!0)};if(u&&setTimeout(function(){!_&&b(void 0,Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},u),f=!1,c||(c=we(e)),y)return d;if("function"!=typeof h.rehydrate||"function"!=typeof h.register)throw Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return h.register(e.key),s(e).then(function(t){(e.migrate||function(e,t){return Promise.resolve(e)})(t,r).then(function(e){b(e)},function(e){b(void 0,e)})},function(e){b(void 0,e)}),n({},t(v,h),{_persist:{version:r,rehydrated:!1}})}if(h.type===J)return a=!0,h.result(ke(e)),n({},t(v,h),{_persist:y});if(h.type===Y)return h.result(c&&c.flush()),n({},t(v,h),{_persist:y});if(h.type===K)f=!0;else if(h.type===B){if(a)return n({},v,{_persist:n({},y,{rehydrated:!0})});if(h.key===e.key){var m=t(v,h),g=h.payload,S=n({},!1!==o&&void 0!==g?o(g,d,m,e):m,{_persist:n({},y,{rehydrated:!0})});return l(S)}}if(!y)return t(d,h);var E=t(v,h);return E===v?d:l(n({},E,{_persist:y}))}}var Re=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")()),Ie=function(){return Math.random().toString(36).substring(7).split("").join(".")},Le={INIT:"@@redux/INIT"+Ie(),REPLACE:"@@redux/REPLACE"+Ie(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ie()}};function Ae(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(Ae)(e,t)}if("function"!=typeof e)throw Error("Expected the reducer to be a function.");var i=e,o=t,s=[],u=s,c=!1;function a(){u===s&&(u=s.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 o}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#subscribe(listener) for more details.");var t=!0;return a(),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#subscribe(listener) for more details.");t=!1,a();var r=u.indexOf(e);u.splice(r,1)}}}function d(e){if(!function(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}(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,o=i(o,e)}finally{c=!1}for(var t=s=u,r=0;t.length>r;r++){(0,t[r])()}return e}return d({type:Le.INIT}),(n={dispatch:d,subscribe:l,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw Error("Expected the nextReducer to be a function.");i=e,d({type:Le.REPLACE})}})[Re]=function(){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)}}})[Re]=function(){return this},e},n}function Ne(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 Ce(e){for(var t=Object.keys(e),r={},n=0;t.length>n;n++){var i=t[n];"function"==typeof e[i]&&(r[i]=e[i])}var o,s=Object.keys(r);try{!function(e){Object.keys(e).forEach(function(t){var r=e[t];if(void 0===r(void 0,{type:Le.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:Le.PROBE_UNKNOWN_ACTION()}))throw Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+Le.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){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var n=!1,i={},u=0;s.length>u;u++){var c=s[u],a=e[c],f=(0,r[c])(a,t);if(void 0===f){var l=Ne(c,t);throw Error(l)}i[c]=f,n=n||f!==a}return n?i:e}}function Fe(e,r,i,o){var s=n({},i);return e&&"object"===t(e)&&Object.keys(e).forEach(function(o){var u;"_persist"!==o&&(r[o]===i[o]&&(s[o]=null===(u=i[o])||Array.isArray(u)||"object"!==t(u)?e[o]:n({},s[o],e[o])))}),s}var Me=require("./_string-at")(!0);require("./_iter-define")(String,"String",function(e){this._t=e+"",this._i=0},function(){var e,t=this._t,r=this._i;return t.length>r?(e=Me(t,r),this._i+=e.length,{value:e,done:!1}):{value:void 0,done:!0}});var Ge={registry:[],bootstrapped:!1},Ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ge,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case X:return n({},e,{registry:[].concat(o(e.registry),[t.key])});case B:var r=e.registry.indexOf(t.key),i=o(e.registry);return i.splice(r,1),n({},e,{registry:i,bootstrapped:0===i.length});default:return e}};var He=require("./_export"),ze=require("./_a-function"),De=require("./_to-object"),Ve=require("./_fails"),Ye=[].sort,Be=[1,2,3];He(He.P+He.F*(Ve(function(){Be.sort(void 0)})||!Ve(function(){Be.sort(null)})||!require("./_strict-method")(Ye)),"Array",{sort:function(e){return void 0===e?Ye.call(De(this)):Ye.call(De(this),ze(e))}}),e.persistReducer=Te,e.persistCombineReducers=function(e,t){return e.stateReconciler=void 0===e.stateReconciler?Fe:e.stateReconciler,Te(e,Ce(t))},e.persistStore=function(e,t,r){var i=r||!1,o=Ae(Ue,Ge,t?t.enhancer:void 0),s=function(e){o.dispatch({type:X,key:e})},u=function(t,r,n){var s={type:B,payload:r,err:n,key:t};e.dispatch(s),o.dispatch(s),i&&c.getState().bootstrapped&&(i(),i=!1)},c=n({},o,{purge:function(){var t=[];return e.dispatch({type:J,result:function(e){t.push(e)}}),Promise.all(t)},flush:function(){var t=[];return e.dispatch({type:Y,result:function(e){t.push(e)}}),Promise.all(t)},pause:function(){e.dispatch({type:K})},persist:function(){e.dispatch({type:W,register:s,rehydrate:u})}});return c.persist(),c},e.createMigrate=function(e,t){return function(t,r){if(!t)return Promise.resolve(void 0);var n=t._persist&&void 0!==t._persist.version?t._persist.version:Q;if(n===r)return Promise.resolve(t);if(n>r)return Promise.resolve(t);var i=Object.keys(e).map(function(e){return parseInt(e)}).filter(function(e){return r>=e&&e>n}).sort(function(e,t){return e-t});try{var o=i.reduce(function(t,r){return e[r](t)},t);return Promise.resolve(o)}catch(e){return Promise.reject(e)}}},e.createTransform=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.whitelist||null,i=r.blacklist||null;function o(e){return!(!n||-1!==n.indexOf(e))||!(!i||-1===i.indexOf(e))}return{in:function(t,r,n){return!o(r)&&e?e(t,r,n):t},out:function(e,r,n){return!o(r)&&t?t(e,r,n):e}}},e.getStoredState=Pe,e.createPersistoid=we,e.purgeStoredState=ke,e.KEY_PREFIX=V,e.FLUSH=Y,e.REHYDRATE=B,e.PAUSE=K,e.PERSIST=W,e.PURGE=J,e.REGISTER=X,e.DEFAULT_VERSION=Q,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.ReduxPersist={})}(this,function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){r(e,t,n[t])})}return e}function o(e,t){if(null==e)return{};var r,n,o=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,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;i.length>n;n++)0>t.indexOf(r=i[n])&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function i(e){return function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);e.length>t;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var u="persist:",s="persist/FLUSH",c="persist/REHYDRATE",a="persist/PAUSE",f="persist/PERSIST",l="persist/PURGE",d="persist/REGISTER",p=-1;function y(e,r,o,i){var u=n({},o);return e&&"object"===t(e)&&Object.keys(e).forEach(function(t){"_persist"!==t&&r[t]===o[t]&&(u[t]=e[t])}),u}function h(e){var t,r=e.blacklist||null,n=e.whitelist||null,o=e.transforms||[],i=e.throttle||0,s="".concat(void 0!==e.keyPrefix?e.keyPrefix:u).concat(e.key),c=e.storage;t=!1===e.serialize?function(e){return e}:"function"==typeof e.serialize?e.serialize:v;var a=e.writeFailHandler||null,f={},l={},d=[],p=null,y=null;function h(){if(0===d.length)return p&&clearInterval(p),void(p=null);var e=d.shift(),r=o.reduce(function(t,r){return r.in(t,e,f)},f[e]);if(void 0!==r)try{l[e]=t(r)}catch(e){console.error("redux-persist/createPersistoid: error serializing state",e)}else delete l[e];0===d.length&&(Object.keys(l).forEach(function(e){void 0===f[e]&&delete l[e]}),y=c.setItem(s,t(l)).catch(m))}function b(e){return(!n||-1!==n.indexOf(e)||"_persist"===e)&&(!r||-1===r.indexOf(e))}function m(e){a&&a(e)}return{update:function(e){Object.keys(e).forEach(function(t){b(t)&&f[t]!==e[t]&&-1===d.indexOf(t)&&d.push(t)}),Object.keys(f).forEach(function(t){void 0===e[t]&&b(t)&&-1===d.indexOf(t)&&void 0!==f[t]&&d.push(t)}),null===p&&(p=setInterval(h,i)),f=e},flush:function(){for(;0!==d.length;)h();return y||Promise.resolve()}}}function v(e){return JSON.stringify(e)}function b(e){var t,r=e.transforms||[],n="".concat(void 0!==e.keyPrefix?e.keyPrefix:u).concat(e.key);return t=!1===e.deserialize?function(e){return e}:"function"==typeof e.deserialize?e.deserialize:m,e.storage.getItem(n).then(function(e){if(e)try{var n={},o=t(e);return Object.keys(o).forEach(function(e){n[e]=r.reduceRight(function(t,r){return r.out(t,e,o)},t(o[e]))}),n}catch(e){throw e}})}function m(e){return JSON.parse(e)}function g(e){var t=e.storage,r="".concat(void 0!==e.keyPrefix?e.keyPrefix:u).concat(e.key);return t.removeItem(r,E)}function E(e){0}var O=5e3;function w(e,t){var r=void 0!==e.version?e.version:p,i=void 0===e.stateReconciler?y:e.stateReconciler,u=e.getStoredState||b,d=void 0!==e.timeout?e.timeout:O,v=null,m=!1,E=!0,w=function(e){return e._persist.rehydrated&&v&&!E&&v.update(e),e};return function(p,y){var b=p||{},O=b._persist,x=o(b,["_persist"]);if(y.type===f){var P=!1,S=function(t,r){P||(y.rehydrate(e.key,t,r),P=!0)};if(d&&setTimeout(function(){!P&&S(void 0,Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},d),E=!1,v||(v=h(e)),O)return p;if("function"!=typeof y.rehydrate||"function"!=typeof y.register)throw Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return y.register(e.key),u(e).then(function(t){(e.migrate||function(e,t){return Promise.resolve(e)})(t,r).then(function(e){S(e)},function(e){S(void 0,e)})},function(e){S(void 0,e)}),n({},t(x,y),{_persist:{version:r,rehydrated:!1}})}if(y.type===l)return m=!0,y.result(g(e)),n({},t(x,y),{_persist:O});if(y.type===s)return y.result(v&&v.flush()),n({},t(x,y),{_persist:O});if(y.type===a)E=!0;else if(y.type===c){if(m)return n({},x,{_persist:n({},O,{rehydrated:!0})});if(y.key===e.key){var k=t(x,y),j=y.payload,I=n({},!1!==i&&void 0!==j?i(j,p,k,e):k,{_persist:n({},O,{rehydrated:!0})});return w(I)}}if(!O)return t(p,y);var R=t(x,y);return R===x?p:w(n({},R,{_persist:O}))}}var x=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")()),P=function(){return Math.random().toString(36).substring(7).split("").join(".")},S={INIT:"@@redux/INIT"+P(),REPLACE:"@@redux/REPLACE"+P(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+P()}};function k(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(k)(e,t)}if("function"!=typeof e)throw Error("Expected the reducer to be a function.");var o=e,i=t,u=[],s=u,c=!1;function a(){s===u&&(s=u.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#subscribe(listener) for more details.");var t=!0;return a(),s.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#subscribe(listener) for more details.");t=!1,a();var r=s.indexOf(e);s.splice(r,1)}}}function d(e){if(!function(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}(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=u=s,r=0;t.length>r;r++){(0,t[r])()}return e}return d({type:S.INIT}),(n={dispatch:d,subscribe:l,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw Error("Expected the nextReducer to be a function.");o=e,d({type:S.REPLACE})}})[x]=function(){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)}}})[x]=function(){return this},e},n}function j(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 I(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,u=Object.keys(r);try{!function(e){Object.keys(e).forEach(function(t){var r=e[t];if(void 0===r(void 0,{type:S.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:S.PROBE_UNKNOWN_ACTION()}))throw Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+S.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={},s=0;u.length>s;s++){var c=u[s],a=e[c],f=(0,r[c])(a,t);if(void 0===f){var l=j(c,t);throw Error(l)}o[c]=f,n=n||f!==a}return n?o:e}}function R(e,r,o,i){var u=n({},o);return e&&"object"===t(e)&&Object.keys(e).forEach(function(i){var s;"_persist"!==i&&(r[i]===o[i]&&(u[i]=null===(s=o[i])||Array.isArray(s)||"object"!==t(s)?e[i]:n({},u[i],e[i])))}),u}var T={registry:[],bootstrapped:!1},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case d:return n({},e,{registry:[].concat(i(e.registry),[t.key])});case c:var r=e.registry.indexOf(t.key),o=i(e.registry);return o.splice(r,1),n({},e,{registry:o,bootstrapped:0===o.length});default:return e}};e.persistReducer=w,e.persistCombineReducers=function(e,t){return e.stateReconciler=void 0===e.stateReconciler?R:e.stateReconciler,w(e,I(t))},e.persistStore=function(e,t,r){var o=r||!1,i=k(_,T,t?t.enhancer:void 0),u=function(e){i.dispatch({type:d,key:e})},p=function(t,r,n){var u={type:c,payload:r,err:n,key:t};e.dispatch(u),i.dispatch(u),o&&y.getState().bootstrapped&&(o(),o=!1)},y=n({},i,{purge:function(){var t=[];return e.dispatch({type:l,result:function(e){t.push(e)}}),Promise.all(t)},flush:function(){var t=[];return e.dispatch({type:s,result:function(e){t.push(e)}}),Promise.all(t)},pause:function(){e.dispatch({type:a})},persist:function(){e.dispatch({type:f,register:u,rehydrate:p})}});return y.persist(),y},e.createMigrate=function(e,t){return function(t,r){if(!t)return Promise.resolve(void 0);var n=t._persist&&void 0!==t._persist.version?t._persist.version:p;if(n===r)return Promise.resolve(t);if(n>r)return Promise.resolve(t);var o=Object.keys(e).map(function(e){return parseInt(e)}).filter(function(e){return r>=e&&e>n}).sort(function(e,t){return e-t});try{var i=o.reduce(function(t,r){return e[r](t)},t);return Promise.resolve(i)}catch(e){return Promise.reject(e)}}},e.createTransform=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.whitelist||null,o=r.blacklist||null;function i(e){return!(!n||-1!==n.indexOf(e))||!(!o||-1===o.indexOf(e))}return{in:function(t,r,n){return!i(r)&&e?e(t,r,n):t},out:function(e,r,n){return!i(r)&&t?t(e,r,n):e}}},e.getStoredState=b,e.createPersistoid=h,e.purgeStoredState=g,e.KEY_PREFIX=u,e.FLUSH=s,e.REHYDRATE=c,e.PAUSE=a,e.PERSIST=f,e.PURGE=l,e.REGISTER=d,e.DEFAULT_VERSION=p,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=redux-persist.min.js.map |
@@ -1,7 +0,1 @@ | ||
import "core-js/modules/web.dom.iterable"; | ||
import "core-js/modules/es6.array.iterator"; | ||
import "core-js/modules/es6.object.keys"; | ||
import "core-js/modules/es6.array.sort"; | ||
import "core-js/modules/es6.promise"; | ||
import "core-js/modules/es6.object.to-string"; | ||
import { DEFAULT_VERSION } from './constants'; | ||
@@ -8,0 +2,0 @@ export default function createMigrate(migrations, config) { |
@@ -1,6 +0,1 @@ | ||
import "core-js/modules/es6.promise"; | ||
import "core-js/modules/web.dom.iterable"; | ||
import "core-js/modules/es6.array.iterator"; | ||
import "core-js/modules/es6.object.to-string"; | ||
import "core-js/modules/es6.object.keys"; | ||
import { KEY_PREFIX, REHYDRATE } from './constants'; | ||
@@ -18,10 +13,10 @@ // @TODO remove once flow < 0.63 support is no longer required. | ||
if (!config.serialize) { | ||
serialize = defaultSerialize; | ||
if (config.serialize === false) { | ||
serialize = function serialize(x) { | ||
return x; | ||
}; | ||
} else if (typeof config.serialize === 'function') { | ||
serialize = config.serialize; | ||
} else { | ||
serialize = function serialize(x) { | ||
return x; | ||
}; | ||
serialize = defaultSerialize; | ||
} | ||
@@ -28,0 +23,0 @@ |
@@ -1,5 +0,1 @@ | ||
import "core-js/modules/web.dom.iterable"; | ||
import "core-js/modules/es6.array.iterator"; | ||
import "core-js/modules/es6.object.to-string"; | ||
import "core-js/modules/es6.object.keys"; | ||
import { KEY_PREFIX } from './constants'; | ||
@@ -13,10 +9,10 @@ export default function getStoredState(config) { | ||
if (!config.deserialize) { | ||
deserialize = defaultDeserialize; | ||
if (config.deserialize === false) { | ||
deserialize = function deserialize(x) { | ||
return x; | ||
}; | ||
} else if (typeof config.deserialize === 'function') { | ||
deserialize = config.deserialize; | ||
} else { | ||
deserialize = function deserialize(x) { | ||
return x; | ||
}; | ||
deserialize = defaultDeserialize; | ||
} | ||
@@ -23,0 +19,0 @@ |
@@ -1,9 +0,1 @@ | ||
import "core-js/modules/es6.object.keys"; | ||
import "core-js/modules/es7.symbol.async-iterator"; | ||
import "core-js/modules/es6.symbol"; | ||
import "core-js/modules/web.dom.iterable"; | ||
import "core-js/modules/es6.array.iterator"; | ||
import "core-js/modules/es6.promise"; | ||
import "core-js/modules/es6.object.to-string"; | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
@@ -10,0 +2,0 @@ |
@@ -1,8 +0,1 @@ | ||
import "core-js/modules/es7.symbol.async-iterator"; | ||
import "core-js/modules/es6.symbol"; | ||
import "core-js/modules/es6.object.set-prototype-of"; | ||
import "core-js/modules/es6.promise"; | ||
import "core-js/modules/es6.object.to-string"; | ||
import "core-js/modules/es7.promise.finally"; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
@@ -9,0 +2,0 @@ |
@@ -1,8 +0,1 @@ | ||
import "core-js/modules/es6.symbol"; | ||
import "core-js/modules/web.dom.iterable"; | ||
import "core-js/modules/es6.array.iterator"; | ||
import "core-js/modules/es6.object.keys"; | ||
import "core-js/modules/es6.promise"; | ||
import "core-js/modules/es6.object.to-string"; | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
@@ -9,0 +2,0 @@ |
@@ -1,12 +0,1 @@ | ||
import "core-js/modules/es6.array.from"; | ||
import "core-js/modules/es6.regexp.to-string"; | ||
import "core-js/modules/es7.symbol.async-iterator"; | ||
import "core-js/modules/es6.symbol"; | ||
import "core-js/modules/es6.object.keys"; | ||
import "core-js/modules/es6.promise"; | ||
import "core-js/modules/web.dom.iterable"; | ||
import "core-js/modules/es6.array.iterator"; | ||
import "core-js/modules/es6.object.to-string"; | ||
import "core-js/modules/es6.string.iterator"; | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } | ||
@@ -25,3 +14,2 @@ | ||
import { createStore } from 'redux'; | ||
import persistReducer from './persistReducer'; | ||
import { FLUSH, PAUSE, PERSIST, PURGE, REGISTER, REHYDRATE } from './constants'; | ||
@@ -28,0 +16,0 @@ var initialState = { |
@@ -1,8 +0,1 @@ | ||
import "core-js/modules/es7.symbol.async-iterator"; | ||
import "core-js/modules/es6.symbol"; | ||
import "core-js/modules/web.dom.iterable"; | ||
import "core-js/modules/es6.array.iterator"; | ||
import "core-js/modules/es6.object.to-string"; | ||
import "core-js/modules/es6.object.keys"; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
@@ -9,0 +2,0 @@ |
@@ -1,8 +0,1 @@ | ||
import "core-js/modules/es7.symbol.async-iterator"; | ||
import "core-js/modules/es6.symbol"; | ||
import "core-js/modules/web.dom.iterable"; | ||
import "core-js/modules/es6.array.iterator"; | ||
import "core-js/modules/es6.object.to-string"; | ||
import "core-js/modules/es6.object.keys"; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
@@ -9,0 +2,0 @@ |
@@ -1,3 +0,1 @@ | ||
import "core-js/modules/es6.promise"; | ||
import "core-js/modules/es6.object.to-string"; | ||
import getStorage from './getStorage'; | ||
@@ -4,0 +2,0 @@ export default function createWebStorage(type) { |
@@ -1,4 +0,1 @@ | ||
import "core-js/modules/es7.symbol.async-iterator"; | ||
import "core-js/modules/es6.symbol"; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
@@ -5,0 +2,0 @@ |
@@ -6,14 +6,2 @@ "use strict"; | ||
require("core-js/modules/web.dom.iterable"); | ||
require("core-js/modules/es6.array.iterator"); | ||
require("core-js/modules/es6.object.keys"); | ||
require("core-js/modules/es6.array.sort"); | ||
require("core-js/modules/es6.promise"); | ||
require("core-js/modules/es6.object.to-string"); | ||
var _constants = require("./constants"); | ||
@@ -20,0 +8,0 @@ |
@@ -6,12 +6,2 @@ "use strict"; | ||
require("core-js/modules/es6.promise"); | ||
require("core-js/modules/web.dom.iterable"); | ||
require("core-js/modules/es6.array.iterator"); | ||
require("core-js/modules/es6.object.to-string"); | ||
require("core-js/modules/es6.object.keys"); | ||
var _constants = require("./constants"); | ||
@@ -30,10 +20,10 @@ | ||
if (!config.serialize) { | ||
serialize = defaultSerialize; | ||
if (config.serialize === false) { | ||
serialize = function serialize(x) { | ||
return x; | ||
}; | ||
} else if (typeof config.serialize === 'function') { | ||
serialize = config.serialize; | ||
} else { | ||
serialize = function serialize(x) { | ||
return x; | ||
}; | ||
serialize = defaultSerialize; | ||
} | ||
@@ -40,0 +30,0 @@ |
@@ -6,10 +6,2 @@ "use strict"; | ||
require("core-js/modules/web.dom.iterable"); | ||
require("core-js/modules/es6.array.iterator"); | ||
require("core-js/modules/es6.object.to-string"); | ||
require("core-js/modules/es6.object.keys"); | ||
var _constants = require("./constants"); | ||
@@ -24,10 +16,10 @@ | ||
if (!config.deserialize) { | ||
deserialize = defaultDeserialize; | ||
if (config.deserialize === false) { | ||
deserialize = function deserialize(x) { | ||
return x; | ||
}; | ||
} else if (typeof config.deserialize === 'function') { | ||
deserialize = config.deserialize; | ||
} else { | ||
deserialize = function deserialize(x) { | ||
return x; | ||
}; | ||
deserialize = defaultDeserialize; | ||
} | ||
@@ -34,0 +26,0 @@ |
"use strict"; | ||
require("core-js/modules/web.dom.iterable"); | ||
require("core-js/modules/es6.array.iterator"); | ||
require("core-js/modules/es6.object.to-string"); | ||
require("core-js/modules/es6.object.keys"); | ||
exports.__esModule = true; | ||
@@ -12,0 +4,0 @@ var _exportNames = { |
@@ -6,16 +6,2 @@ "use strict"; | ||
require("core-js/modules/es6.object.keys"); | ||
require("core-js/modules/es7.symbol.async-iterator"); | ||
require("core-js/modules/es6.symbol"); | ||
require("core-js/modules/web.dom.iterable"); | ||
require("core-js/modules/es6.array.iterator"); | ||
require("core-js/modules/es6.promise"); | ||
require("core-js/modules/es6.object.to-string"); | ||
var _getStoredState = _interopRequireDefault(require("../getStoredState")); | ||
@@ -22,0 +8,0 @@ |
@@ -6,14 +6,2 @@ "use strict"; | ||
require("core-js/modules/es7.symbol.async-iterator"); | ||
require("core-js/modules/es6.symbol"); | ||
require("core-js/modules/es6.object.set-prototype-of"); | ||
require("core-js/modules/es6.promise"); | ||
require("core-js/modules/es6.object.to-string"); | ||
require("core-js/modules/es7.promise.finally"); | ||
var _react = _interopRequireWildcard(require("react")); | ||
@@ -20,0 +8,0 @@ |
@@ -6,14 +6,2 @@ "use strict"; | ||
require("core-js/modules/es6.symbol"); | ||
require("core-js/modules/web.dom.iterable"); | ||
require("core-js/modules/es6.array.iterator"); | ||
require("core-js/modules/es6.object.keys"); | ||
require("core-js/modules/es6.promise"); | ||
require("core-js/modules/es6.object.to-string"); | ||
var _constants = require("./constants"); | ||
@@ -20,0 +8,0 @@ |
@@ -6,30 +6,6 @@ "use strict"; | ||
require("core-js/modules/es6.array.from"); | ||
require("core-js/modules/es6.regexp.to-string"); | ||
require("core-js/modules/es7.symbol.async-iterator"); | ||
require("core-js/modules/es6.symbol"); | ||
require("core-js/modules/es6.object.keys"); | ||
require("core-js/modules/es6.promise"); | ||
require("core-js/modules/web.dom.iterable"); | ||
require("core-js/modules/es6.array.iterator"); | ||
require("core-js/modules/es6.object.to-string"); | ||
require("core-js/modules/es6.string.iterator"); | ||
var _redux = require("redux"); | ||
var _persistReducer = _interopRequireDefault(require("./persistReducer")); | ||
var _constants = require("./constants"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } | ||
@@ -36,0 +12,0 @@ |
@@ -6,14 +6,2 @@ "use strict"; | ||
require("core-js/modules/es7.symbol.async-iterator"); | ||
require("core-js/modules/es6.symbol"); | ||
require("core-js/modules/web.dom.iterable"); | ||
require("core-js/modules/es6.array.iterator"); | ||
require("core-js/modules/es6.object.to-string"); | ||
require("core-js/modules/es6.object.keys"); | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
@@ -20,0 +8,0 @@ |
@@ -6,14 +6,2 @@ "use strict"; | ||
require("core-js/modules/es7.symbol.async-iterator"); | ||
require("core-js/modules/es6.symbol"); | ||
require("core-js/modules/web.dom.iterable"); | ||
require("core-js/modules/es6.array.iterator"); | ||
require("core-js/modules/es6.object.to-string"); | ||
require("core-js/modules/es6.object.keys"); | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
@@ -20,0 +8,0 @@ |
@@ -6,6 +6,2 @@ "use strict"; | ||
require("core-js/modules/es6.promise"); | ||
require("core-js/modules/es6.object.to-string"); | ||
var _getStorage = _interopRequireDefault(require("./getStorage")); | ||
@@ -12,0 +8,0 @@ |
@@ -6,6 +6,2 @@ "use strict"; | ||
require("core-js/modules/es7.symbol.async-iterator"); | ||
require("core-js/modules/es6.symbol"); | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
@@ -12,0 +8,0 @@ |
{ | ||
"name": "redux-persist", | ||
"version": "6.0.0-pre1", | ||
"version": "6.0.0-pre2", | ||
"description": "persist and rehydrate redux stores", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -236,3 +236,3 @@ # Redux Persist | ||
- **sessionStorage** `import storageSession from 'redux-persist/lib/storage/session'` | ||
- **AsyncStorage** react-native `import { AsyncStorage } from '@react-native-community/async-storage'` | ||
- **AsyncStorage** react-native `import AsyncStorage from '@react-native-community/async-storage'` | ||
- **[localForage](https://github.com/mozilla/localForage)** recommended for web | ||
@@ -239,0 +239,0 @@ - **[electron storage](https://github.com/psperber/redux-persist-electron-storage)** Electron support via [electron store](https://github.com/sindresorhus/electron-store) |
@@ -20,8 +20,8 @@ // @flow | ||
let serialize | ||
if (!config.serialize) { | ||
serialize = defaultSerialize | ||
if (config.serialize === false) { | ||
serialize = x => x | ||
} else if (typeof config.serialize === 'function') { | ||
serialize = config.serialize | ||
} else { | ||
serialize = x => x | ||
serialize = defaultSerialize | ||
} | ||
@@ -28,0 +28,0 @@ const writeFailHandler = config.writeFailHandler || null |
@@ -17,8 +17,8 @@ // @flow | ||
let deserialize | ||
if (!config.deserialize) { | ||
deserialize = defaultDeserialize | ||
if (config.deserialize === false) { | ||
deserialize = x => x | ||
} else if (typeof config.deserialize === 'function') { | ||
deserialize = config.deserialize | ||
} else { | ||
deserialize = x => x | ||
deserialize = defaultDeserialize | ||
} | ||
@@ -25,0 +25,0 @@ return storage.getItem(storageKey).then(serialized => { |
@@ -14,3 +14,2 @@ // @flow | ||
import { createStore } from 'redux' | ||
import persistReducer from './persistReducer' | ||
import { FLUSH, PAUSE, PERSIST, PURGE, REGISTER, REHYDRATE } from './constants' | ||
@@ -17,0 +16,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1
57
0
407296
4260