!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("deepmerge")):"function"==typeof define&&define.amd?define(["exports","deepmerge"],t):t((e=e||self).VuexPersistence={},e.deepmerge)}(this,function(r,s){"use strict";s=s&&s.hasOwnProperty("default")?s.default:s;var n=(e.prototype.enqueue=function(e){return this._queue.push(e),this._flushing?Promise.resolve():this.flushQueue()},e.prototype.flushQueue=function(){var t=this;this._flushing=!0;var r=function(){var e=t._queue.shift();if(e)return e.then(r);t._flushing=!1};return Promise.resolve(r())},e);function e(){this._queue=[],this._flushing=!1}var i={replaceArrays:{arrayMerge:function(e,t,r){return t}},concatArrays:{arrayMerge:function(e,t,r){return e.concat.apply(e,t)}}};function u(e,t,r){return s(e,t,i[r])}function t(e){var i=this;this._mutex=new n,this.subscriber=function(t){return function(e){return t.subscribe(e)}},void 0===e&&(e={}),this.key=null!=e.key?e.key:"vuex",this.subscribed=!1,this.supportCircular=e.supportCircular||!1,this.supportCircular&&(o=require("flatted")),this.mergeOption=e.mergeOption||"replaceArrays";var t=!0;try{window.localStorage.getItem("")}catch(e){t=!1}if(e.storage)this.storage=e.storage;else if(t)this.storage=window.localStorage;else{if(!r.MockStorage)throw new Error("Neither 'window' is defined, nor 'MockStorage' is available");this.storage=new r.MockStorage}this.reducer=null!=e.reducer?e.reducer:null==e.modules?function(e){return e}:function(s){return e.modules.reduce(function(e,t){var r;return u(e,((r={})[t]=s[t],r),i.mergeOption)},{})},this.filter=e.filter||function(e){return!0},this.strictMode=e.strictMode||!1,this.RESTORE_MUTATION=function(e,t){for(var r=u(e,t||{},this.mergeOption),s=0,i=Object.keys(r);s