{"version":3,"file":"redux-toolkit.umd.min.js","sources":["redux-toolkit.umd.min.js"],"sourcesContent":["var t,e,n,r=this&&this.__extends||(t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)},function(e,n){if(\"function\"!=typeof n&&null!==n)throw new TypeError(\"Class extends value \"+String(n)+\" is not a constructor or null\");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),o=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},\"function\"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError(\"Generator is already executing.\");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1?e-1:0),r=1;r3?e.i-4:e.i:Array.isArray(t)?1:A(t)?2:S(t)?3:0}function j(t,e){return 2===O(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function P(t,e,n){var r=O(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n}function E(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function A(t){return Q&&t instanceof Map}function S(t){return Y&&t instanceof Set}function _(t){return t.o||t.t}function k(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=it(t);delete e[nt];for(var n=ot(e),r=0;r1&&(t.set=t.add=t.clear=t.delete=I),Object.freeze(t),e&&w(t,(function(t,e){return x(e,!0)}),!0)),t}function I(){h(2)}function D(t){return null==t||\"object\"!=typeof t||Object.isFrozen(t)}function T(t){var e=ut[t];return e||h(18,t),e}function N(){return n}function C(t,e){e&&(T(\"Patches\"),t.u=[],t.s=[],t.v=e)}function M(t){R(t),t.p.forEach(F),t.p=null}function R(t){t===n&&(n=t.l)}function q(t){return n={p:[],l:n,h:t,m:!0,_:0}}function F(t){var e=t[nt];0===e.i||1===e.i?e.j():e.O=!0}function z(t,e){e._=e.p.length;var n=e.p[0],r=void 0!==t&&t!==n;return e.h.g||T(\"ES5\").S(e,t,r),r?(n[nt].P&&(M(e),h(4)),b(t)&&(t=U(e,t),e.l||K(e,t)),e.u&&T(\"Patches\").M(n[nt].t,t,e.u,e.s)):t=U(e,n,[]),M(e),e.u&&e.v(e.u,e.s),t!==tt?t:void 0}function U(t,e,n){if(D(e))return e;var r=e[nt];if(!r)return w(e,(function(o,i){return L(t,r,e,o,i,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return K(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=k(r.k):r.o;w(3===r.i?new Set(o):o,(function(e,i){return L(t,r,o,e,i,n)})),K(t,o,!1),n&&t.u&&T(\"Patches\").R(r,n,t.u,t.s)}return r.o}function L(t,e,n,r,o,i){if(g(o)){var u=U(t,o,i&&e&&3!==e.i&&!j(e.D,r)?i.concat(r):void 0);if(P(n,r,u),!g(u))return;t.m=!1}if(b(o)&&!D(o)){if(!t.h.F&&t._<1)return;U(t,o),e&&e.A.l||K(t,o)}}function K(t,e,n){void 0===n&&(n=!1),t.h.F&&t.m&&x(e,n)}function W(t,e){var n=t[nt];return(n?_(n):t)[e]}function B(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function V(t){t.P||(t.P=!0,t.l&&V(t.l))}function X(t){t.o||(t.o=k(t.t))}function G(t,e,n){var r=A(e)?T(\"MapSet\").N(e,n):S(e)?T(\"MapSet\").T(e,n):t.g?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:N(),P:!1,I:!1,D:{},l:e,t:t,k:null,o:null,j:null,C:!1},o=r,i=ct;n&&(o=[r],i=at);var u=Proxy.revocable(o,i),c=u.revoke,a=u.proxy;return r.k=a,r.j=c,a}(e,n):T(\"ES5\").J(e,n);return(n?n.A:N()).p.push(r),r}function J(t){return g(t)||h(22,t),function t(e){if(!b(e))return e;var n,r=e[nt],o=O(e);if(r){if(!r.P&&(r.i<4||!T(\"ES5\").K(r)))return r.t;r.I=!0,n=$(e,o),r.I=!1}else n=$(e,o);return w(n,(function(e,o){r&&function(t,e){return 2===O(t)?t.get(e):t[e]}(r.t,e)===o||P(n,e,t(o))})),3===o?new Set(n):n}(t)}function $(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return k(t)}var H=\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol(\"x\"),Q=\"undefined\"!=typeof Map,Y=\"undefined\"!=typeof Set,Z=\"undefined\"!=typeof Proxy&&void 0!==Proxy.revocable&&\"undefined\"!=typeof Reflect,tt=H?Symbol.for(\"immer-nothing\"):((e={})[\"immer-nothing\"]=!0,e),et=H?Symbol.for(\"immer-draftable\"):\"__$immer_draftable\",nt=H?Symbol.for(\"immer-state\"):\"__$immer_state\",rt=(\"undefined\"!=typeof Symbol&&Symbol,\"\"+Object.prototype.constructor),ot=\"undefined\"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,it=Object.getOwnPropertyDescriptors||function(t){var e={};return ot(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},ut={},ct={get:function(t,e){if(e===nt)return t;var n,r,o,i=_(t);if(!j(i,e))return n=t,(o=B(i,e))?\"value\"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(n.k):void 0;var u=i[e];return t.I||!b(u)?u:u===W(t.t,e)?(X(t),t.o[e]=G(t.A.h,u,t)):u},has:function(t,e){return e in _(t)},ownKeys:function(t){return Reflect.ownKeys(_(t))},set:function(t,e,n){var r=B(_(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(!t.P){var o=W(_(t),e),i=null==o?void 0:o[nt];if(i&&i.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(E(n,o)&&(void 0!==n||j(t.t,e)))return!0;X(t),V(t)}return t.o[e]===n&&\"number\"!=typeof n&&(void 0!==n||e in t.o)||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==W(t.t,e)||e in t.t?(t.D[e]=!1,X(t),V(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=_(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||\"length\"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){h(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){h(12)}},at={};w(ct,(function(t,e){at[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),at.deleteProperty=function(t,e){return at.set.call(this,t,e,void 0)},at.set=function(t,e,n){return ct.set.call(this,t[0],e,n,t[0])};var ft=new(function(){function t(t){var e=this;this.g=Z,this.F=!0,this.produce=function(t,n,r){if(\"function\"==typeof t&&\"function\"!=typeof n){var o=n;n=t;var i=e;return function(t){var e=this;void 0===t&&(t=o);for(var r=arguments.length,u=Array(r>1?r-1:0),c=1;c1?r-1:0),i=1;i=0;n--){var r=e[n];if(0===r.path.length&&\"replace\"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));var o=T(\"Patches\").$;return g(t)?o(t,e):this.produce(t,(function(t){return o(t,e)}))},t}()),lt=ft.produce,st=(ft.produceWithPatches.bind(ft),ft.setAutoFreeze.bind(ft),ft.setUseProxies.bind(ft),ft.applyPatches.bind(ft),ft.createDraft.bind(ft),ft.finishDraft.bind(ft),lt);function dt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function vt(t){for(var e=1;e-1){var o=n[r];return r>0&&(n.splice(r,1),n.unshift(o)),o.value}return\"NOT_FOUND\"}return{get:r,put:function(e,o){\"NOT_FOUND\"===r(e)&&(n.unshift({key:e,value:o}),n.length>t&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(a,l);function d(){var e=s.get(arguments);if(\"NOT_FOUND\"===e){if(e=t.apply(null,arguments),f){var n=s.getEntries(),r=n.find((function(t){return f(t.value,e)}));r&&(e=r.value)}s.put(arguments,e)}return e}return d.clearCache=function(){return s.clear()},d}function xt(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every((function(t){return\"function\"==typeof t}))){var n=e.map((function(t){return\"function\"==typeof t?\"function \"+(t.name||\"unnamed\")+\"()\":typeof t})).join(\", \");throw new Error(\"createSelector expects all input-selectors to be functions, but received the following types: [\"+n+\"]\")}return e}function It(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r\",value:t};if(\"object\"!=typeof t||null===t)return!1;for(var u=null!=r?r(t):Object.entries(t),c=o.length>0,a=0,f=u;a=0)){if(!n(d))return{keyPath:p,value:d};if(\"object\"==typeof d&&(i=Lt(d,p,n,r,o)))return i}}return!1}function Kt(t){return void 0===t&&(t={}),function(){return function(t){return function(e){return t(e)}}}}function Wt(t){void 0===t&&(t={});var e=t.thunk,n=void 0===e||e,r=new Ft;return n&&r.push(\"boolean\"==typeof n?qt:qt.withExtraArgument(n.extraArgument)),r}function Bt(t){var e,n=function(t){return Wt(t)},r=t||{},o=r.reducer,u=void 0===o?void 0:o,c=r.middleware,a=void 0===c?n():c,f=r.devTools,l=void 0===f||f,s=r.preloadedState,d=void 0===s?void 0:s,v=r.enhancers,y=void 0===v?void 0:v;if(\"function\"==typeof u)e=u;else{if(!Ct(u))throw new Error('\"reducer\" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=jt(u)}var h=a;\"function\"==typeof h&&(h=h(n));var g=St.apply(void 0,h),b=At;l&&(b=Nt(p({trace:!1},\"object\"==typeof l&&l)));var m=[g];return Array.isArray(y)?m=i([g],y):\"function\"==typeof y&&(m=y(m)),wt(e,d,b.apply(void 0,m))}function Vt(t,e){function n(){for(var n=[],r=0;r-1}function Gt(t){return\"\"+t}function Jt(t){var e,n={},r=[],o={addCase:function(t,e){var r=\"string\"==typeof t?t:t.type;if(r in n)throw new Error(\"addCase cannot be called with two reducers for the same action type\");return n[r]=e,o},addMatcher:function(t,e){return r.push({matcher:t,reducer:e}),o},addDefaultCase:function(t){return e=t,o}};return t(o),[n,r,e]}function $t(t,e,n,r){void 0===n&&(n=[]);var o,u=\"function\"==typeof e?Jt(e):[e,n,r],c=u[0],a=u[1],f=u[2];if(\"function\"==typeof t)o=function(){return zt(t())};else{var l=zt(t);o=function(){return l}}function s(t,e){void 0===t&&(t=o());var n=i([c[e.type]],a.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===n.filter((function(t){return!!t})).length&&(n=[f]),n.reduce((function(t,n){if(n){var r;if(g(t))return void 0===(r=n(t,e))?t:r;if(b(t))return st(t,(function(t){return n(t,e)}));if(void 0===(r=n(t,e))){if(null===t)return t;throw Error(\"A case reducer on a non-draftable value must not return undefined\")}return r}return t}),t)}return s.getInitialState=o,s}function Ht(t){var e=t.name;if(!e)throw new Error(\"`name` is a required option for createSlice\");var n,r=\"function\"==typeof t.initialState?t.initialState:zt(t.initialState),o=t.reducers||{},i=Object.keys(o),u={},c={},a={};function f(){var e=\"function\"==typeof t.extraReducers?Jt(t.extraReducers):[t.extraReducers],n=e[0],o=e[1],i=void 0===o?[]:o,u=e[2],a=void 0===u?void 0:u,f=p(p({},void 0===n?{}:n),c);return $t(r,(function(t){for(var e in f)t.addCase(e,f[e]);for(var n=0,r=i;n0){var i=e.filter((function(e){return function(e,n,r){var o=Object.assign({},r.entities[n.id],n.changes),i=te(o,t),u=i!==n.id;return u&&(e[n.id]=i,delete r.entities[n.id]),r.entities[i]=o,u}(r,e,n)})).length>0;i&&(n.ids=Object.keys(n.entities))}}function u(e,r){var o=ne(e,t,r),u=o[0];i(o[1],r),n(u,r)}return{removeAll:(c=function(t){Object.assign(t,{ids:[],entities:{}})},a=Zt((function(t,e){return c(e)})),function(t){return a(t,void 0)}),addOne:Zt(e),addMany:Zt(n),setOne:Zt(r),setMany:Zt((function(t,e){for(var n=0,o=t=ee(t);n-1;return n&&r}function he(t){return\"function\"==typeof t[0]&&\"pending\"in t[0]&&\"fulfilled\"in t[0]&&\"rejected\"in t[0]}function ge(){for(var t=[],e=0;e0)for(var d=t.getState(),p=Array.from(n.values()),v=0,y=p;v=0;e--){var o=t[e][nt];if(!o.P)switch(o.i){case 5:r(o)&&V(o);break;case 4:n(o)&&V(o)}}}function n(t){for(var e=t.t,n=t.k,r=ot(n),o=r.length-1;o>=0;o--){var i=r[o];if(i!==nt){var u=e[i];if(void 0===u&&!j(e,i))return!0;var c=n[i],a=c&&c[nt];if(a?a.t!==u:!E(c,u))return!0}}var f=!!e[nt];return r.length!==ot(e).length+(f?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return!0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);if(n&&!n.get)return!0;for(var r=0;r