Socket
Socket
Sign inDemoInstall

immer

Package Overview
Dependencies
Maintainers
2
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immer - npm Package Compare versions

Comparing version 6.0.6 to 6.0.7

4

dist/immer.cjs.development.js

@@ -1673,5 +1673,3 @@ 'use strict';

if (state.copy_) {
state.copy_.add(value);
} else if (!state.base_.has(value)) {
if (!this.has(value)) {
prepareSetCopy(state);

@@ -1678,0 +1676,0 @@ markChanged(state.scope_.immer_, state);

@@ -1,2 +0,2 @@

function t(t){for(var n=arguments.length,r=Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function n(t){return!!t&&!!t[q]}function r(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var n=Object.getPrototypeOf(t);return!n||n===Object.prototype}(t)||Array.isArray(t)||!!t[X]||!!t.constructor[X]||a(t)||c(t))}function e(t,n,r){void 0===r&&(r=!1),0===i(t)?(r?Object.keys:G)(t).forEach((function(r){return n(r,t[r],t)})):t.forEach((function(r,e){return n(e,r,t)}))}function i(t){var n=t[q];return n?n.t>3?n.t-4:n.t:Array.isArray(t)?1:a(t)?2:c(t)?3:0}function u(t,n){return 2===i(t)?t.has(n):Object.prototype.hasOwnProperty.call(t,n)}function o(t,n){return 2===i(t)?t.get(n):t[n]}function f(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}function a(t){return $&&t instanceof Map}function c(t){return C&&t instanceof Set}function s(t){return t.i||t.u}function v(n,r){if(void 0===r&&(r=!1),Array.isArray(n))return n.slice();var i=Object.create(Object.getPrototypeOf(n));return e(n,(function(e){if(e!==q){var u=Object.getOwnPropertyDescriptor(n,e),o=u.value;u.get&&(r||t(1),o=u.get.call(n)),u.enumerable?i[e]=o:Object.defineProperty(i,e,{value:o,writable:!0,configurable:!0})}})),i}function p(t,u){n(t)||l(t)||!r(t)||(i(t)>1&&(t.set=t.add=t.clear=t.delete=h),Object.freeze(t),u&&e(t,(function(t,n){return p(n,!0)}),!0))}function h(){t(2)}function l(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function d(n){var r=H[n];return r||t(19,n),r}function _(t,n){H[t]=n}function y(){return K}function b(t,n){n&&(d("Patches"),t.o=[],t.s=[],t.v=n)}function m(t){j(t),t.p.forEach(x),t.p=null}function j(t){t===K&&(K=t.h)}function O(t){return K={p:[],h:K,l:t,_:!0,m:0}}function x(t){var n=t[q];0===n.t||1===n.t?n.j():n.O=!0}function w(n,e){e.m=e.p.length;var i=e.p[0],u=void 0!==n&&n!==i;return e.l.S||d("ES5").P(e,n,u),u?(i[q].M&&(m(e),t(4)),r(n)&&(n=S(e,n),e.h||M(e,n)),e.o&&d("Patches").g(i[q],n,e.o,e.s)):n=S(e,i,[]),m(e),e.o&&e.v(e.o,e.s),n!==W?n:void 0}function S(t,n,r){if(l(n))return n;var i=n[q];if(!i)return e(n,(function(e,u){return P(t,i,n,e,u,r)}),!0),n;if(i.A!==t)return n;if(!i.M)return M(t,i.u,!0),i.u;if(!i.R){i.R=!0,i.A.m--;var u=4===i.t||5===i.t?i.i=v(i.k,!0):i.i;e(u,(function(n,e){return P(t,i,u,n,e,r)})),M(t,u,!1),r&&t.o&&d("Patches").F(i,r,t.o,t.s)}return i.i}function P(t,e,a,c,s,v){if(n(s)){var p=S(t,s,v&&e&&3!==e.t&&!u(e.D,c)?v.concat(c):void 0);if(l=c,d=p,2===(_=i(h=a))?h.set(l,d):3===_?(h.delete(l),h.add(d)):h[l]=d,!n(p))return;t._=!1}var h,l,d,_;if((!e||!f(s,o(e.u,c)))&&r(s)){if(!t.l.J&&t.m<1)return;S(t,s),e&&e.A.h||M(t,s)}}function M(t,n,r){void 0===r&&(r=!1),t.l.J&&t._&&p(n,r)}function g(t,n){var r=t[q],e=Reflect.getOwnPropertyDescriptor(r?s(r):t,n);return e&&e.value}function A(t){if(!t.M){if(t.M=!0,0===t.t||1===t.t){var n=t.i=v(t.u);e(t.p,(function(t,r){n[t]=r})),t.p=void 0}t.h&&A(t.h)}}function z(t){t.i||(t.i=v(t.u))}function E(t,n,r){var e=a(n)?d("MapSet").K(n,r):c(n)?d("MapSet").N(n,r):t.S?function(t,n){var r=Array.isArray(t),e={t:r?1:0,A:n?n.A:y(),M:!1,R:!1,D:{},h:n,u:t,k:null,p:{},i:null,j:null,$:!1},i=e,u=L;r&&(i=[e],u=Q);var o=Proxy.revocable(i,u),f=o.revoke,a=o.proxy;return e.k=a,e.j=f,a}(n,r):d("ES5").C(n,r);return(r?r.A:y()).p.push(e),e}function R(t,n){t.S?A(n):d("ES5").I(n)}function k(){function i(t,n){var r=t[q];if(r&&!r.W){r.W=!0;var e=t[n];return r.W=!1,e}return t[n]}function o(t){t.M||(t.M=!0,t.h&&o(t.h))}function a(t){t.i||(t.i=c(t.u))}function c(t){var n=t&&t[q];if(n){n.W=!0;var r=v(n.k,!0);return n.W=!1,r}return v(t)}function p(t){for(var n=t.length-1;n>=0;n--){var r=t[n][q];if(!r.M)switch(r.t){case 5:l(r)&&o(r);break;case 4:h(r)&&o(r)}}}function h(t){for(var n=t.u,r=t.k,e=Object.keys(r),i=e.length-1;i>=0;i--){var o=e[i],a=n[o];if(void 0===a&&!u(n,o))return!0;var c=r[o],s=c&&c[q];if(s?s.u!==a:!f(c,a))return!0}return e.length!==Object.keys(n).length}function l(t){var n=t.k;if(n.length!==t.u.length)return!0;var r=Object.getOwnPropertyDescriptor(n,n.length-1);return!(!r||r.get)}function d(n){n.O&&t(3,JSON.stringify(s(n)))}var b={};_("ES5",{C:function(t,n){var u=Array.isArray(t),v=c(t);e(v,(function(n){!function(t,n,e){var u=b[n];u?u.enumerable=e:b[n]=u={enumerable:e,get:function(){return function(t,n){d(t);var e=i(s(t),n);return t.W?e:e===i(t.u,n)&&r(e)?(a(t),t.i[n]=E(t.A.l,e,t)):e}(this[q],n)},set:function(t){!function(t,n,r){if(d(t),t.D[n]=!0,!t.M){if(f(r,i(s(t),n)))return;o(t),a(t)}t.i[n]=r}(this[q],n,t)}},Object.defineProperty(t,n,u)}(v,n,u||function(t,n){var r=Object.getOwnPropertyDescriptor(t,n);return!(!r||!r.enumerable)}(t,n))}));var p={t:u?5:4,A:n?n.A:y(),M:!1,W:!1,R:!1,D:{},h:n,u:t,k:v,i:null,O:!1,$:!1};return Object.defineProperty(v,q,{value:p,writable:!0}),v},I:o,P:function(t,r,i){t.p.forEach((function(t){t[q].W=!0})),i?n(r)&&r[q].A===t&&p(t.p):(t.o&&function t(n){if(n&&"object"==typeof n){var r=n[q];if(r){var i=r.u,f=r.k,a=r.D,c=r.t;if(4===c)e(f,(function(n){n!==q&&(void 0!==i[n]||u(i,n)?a[n]||t(f[n]):(a[n]=!0,o(r)))})),e(i,(function(t){void 0!==f[t]||u(f,t)||(a[t]=!1,o(r))}));else if(5===c){if(l(r)&&(o(r),a.length=!0),f.length<i.length)for(var s=f.length;s<i.length;s++)a[s]=!1;else for(var v=i.length;v<f.length;v++)a[v]=!0;for(var p=Math.min(f.length,i.length),h=0;h<p;h++)void 0===a[h]&&t(f[h])}}}}(t.p[0]),p(t.p))}})}function F(){function r(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(r);if(a(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],r(t[1])]})));if(c(t))return new Set(Array.from(t).map(r));var n=Object.create(Object.getPrototypeOf(t));for(var e in t)n[e]=r(t[e]);return n}function f(t){return n(t)?r(t):t}var s="add";_("Patches",{X:function(n,e){return e.forEach((function(e){for(var u=e.path,f=e.op,a=n,c=0;c<u.length-1;c++)"object"!=typeof(a=o(a,u[c]))&&t(15,u.join("/"));var v=i(a),p=r(e.value),h=u[u.length-1];switch(f){case"replace":switch(v){case 2:return a.set(h,p);case 3:t(16);default:return a[h]=p}case s:switch(v){case 1:return a.splice(h,0,p);case 2:return a.set(h,p);case 3:return a.add(p);default:return a[h]=p}case"remove":switch(v){case 1:return a.splice(h,1);case 2:return a.delete(h);case 3:return a.delete(e.value);default:return delete a[h]}default:t(17,f)}})),n},F:function(t,n,r,i){switch(t.t){case 0:case 4:case 2:return function(t,n,r,i){var a=t.u,c=t.i;e(t.D,(function(t,e){var v=o(a,t),p=o(c,t),h=e?u(a,t)?"replace":s:"remove";if(v!==p||"replace"!==h){var l=n.concat(t);r.push("remove"===h?{op:h,path:l}:{op:h,path:l,value:p}),i.push(h===s?{op:"remove",path:l}:"remove"===h?{op:s,path:l,value:f(v)}:{op:"replace",path:l,value:f(v)})}}))}(t,n,r,i);case 5:case 1:return function(t,n,r,e){var i=t.u,u=t.D,o=t.i;if(o.length<i.length){var a=[o,i];i=a[0],o=a[1];var c=[e,r];r=c[0],e=c[1]}for(var v=o.length-i.length,p=0;i[p]===o[p]&&p<i.length;)++p;for(var h=i.length;h>p&&i[h-1]===o[h+v-1];)--h;for(var l=p;l<h;++l)if(u[l]&&o[l]!==i[l]){var d=n.concat([l]);r.push({op:"replace",path:d,value:f(o[l])}),e.push({op:"replace",path:d,value:f(i[l])})}for(var _=r.length,y=h+v-1;y>=h;--y){var b=n.concat([y]);r[_+y-h]={op:s,path:b,value:f(o[y])},e.push({op:"remove",path:b})}}(t,n,r,i);case 3:return function(t,n,r,e){var i=t.u,u=t.i,o=0;i.forEach((function(t){if(!u.has(t)){var i=n.concat([o]);r.push({op:"remove",path:i,value:t}),e.unshift({op:s,path:i,value:t})}o++})),o=0,u.forEach((function(t){if(!i.has(t)){var u=n.concat([o]);r.push({op:s,path:u,value:t}),e.unshift({op:"remove",path:u,value:t})}o++}))}(t,n,r,i)}},g:function(t,n,r,e){r.push({op:"replace",path:[],value:n}),e.push({op:"replace",path:[],value:t.u})}})}function D(){function n(t,n){function r(){this.constructor=t}o(t,n),t.prototype=(r.prototype=n.prototype,new r)}function e(t){t.i||(t.D=new Map,t.i=new Map(t.u))}function i(t){t.i||(t.i=new Set,t.u.forEach((function(n){if(r(n)){var e=E(t.A.l,n,t);t.p.set(n,e),t.i.add(e)}else t.i.add(n)})))}function u(n){n.O&&t(3,JSON.stringify(s(n)))}var o=function(t,n){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(t,n)},f=function(){function t(t,n){return this[q]={t:2,h:n,A:n?n.A:y(),M:!1,R:!1,i:void 0,D:void 0,u:t,k:this,$:!1,O:!1},this}n(t,Map);var i=t.prototype;return Object.defineProperty(i,"size",{get:function(){return s(this[q]).size}}),i.has=function(t){return s(this[q]).has(t)},i.set=function(t,n){var r=this[q];return u(r),s(r).get(t)!==n&&(e(r),R(r.A.l,r),r.D.set(t,!0),r.i.set(t,n),r.D.set(t,!0)),this},i.delete=function(t){if(!this.has(t))return!1;var n=this[q];return u(n),e(n),R(n.A.l,n),n.D.set(t,!1),n.i.delete(t),!0},i.clear=function(){var t=this[q];return u(t),e(t),R(t.A.l,t),t.D=new Map,t.i.clear()},i.forEach=function(t,n){var r=this;s(this[q]).forEach((function(e,i){t.call(n,r.get(i),i,r)}))},i.get=function(t){var n=this[q];u(n);var i=s(n).get(t);if(n.R||!r(i))return i;if(i!==n.u.get(t))return i;var o=E(n.A.l,i,n);return e(n),n.i.set(t,o),o},i.keys=function(){return s(this[q]).keys()},i.values=function(){var t,n=this,r=this.keys();return(t={})[B]=function(){return n.values()},t.next=function(){var t=r.next();return t.done?t:{done:!1,value:n.get(t.value)}},t},i.entries=function(){var t,n=this,r=this.keys();return(t={})[B]=function(){return n.entries()},t.next=function(){var t=r.next();if(t.done)return t;var e=n.get(t.value);return{done:!1,value:[t.value,e]}},t},i[B]=function(){return this.entries()},t}(),a=function(){function t(t,n){return this[q]={t:3,h:n,A:n?n.A:y(),M:!1,R:!1,i:void 0,u:t,k:this,p:new Map,O:!1,$:!1},this}n(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return s(this[q]).size}}),r.has=function(t){var n=this[q];return u(n),n.i?!!n.i.has(t)||!(!n.p.has(t)||!n.i.has(n.p.get(t))):n.u.has(t)},r.add=function(t){var n=this[q];return u(n),n.i?n.i.add(t):n.u.has(t)||(i(n),R(n.A.l,n),n.i.add(t)),this},r.delete=function(t){if(!this.has(t))return!1;var n=this[q];return u(n),i(n),R(n.A.l,n),n.i.delete(t)||!!n.p.has(t)&&n.i.delete(n.p.get(t))},r.clear=function(){var t=this[q];return u(t),i(t),R(t.A.l,t),t.i.clear()},r.values=function(){var t=this[q];return u(t),i(t),t.i.values()},r.entries=function(){var t=this[q];return u(t),i(t),t.i.entries()},r.keys=function(){return this.values()},r[B]=function(){return this.values()},r.forEach=function(t,n){for(var r=this.values(),e=r.next();!e.done;)t.call(n,e.value,e.value,this),e=r.next()},t}();_("MapSet",{K:function(t,n){return new f(t,n)},N:function(t,n){return new a(t,n)}})}var J;Object.defineProperty(exports,"__esModule",{value:!0});var K,N="undefined"!=typeof Symbol,$="undefined"!=typeof Map,C="undefined"!=typeof Set,I="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,W=N?Symbol("immer-nothing"):((J={})["immer-nothing"]=!0,J),X=N?Symbol("immer-draftable"):"__$immer_draftable",q=N?Symbol("immer-state"):"__$immer_state",B=N?Symbol.iterator:"@@iterator",G="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,H={},L={get:function(t,n){if(n===q)return t;var e=t.p;if(!t.M&&u(e,n))return e[n];var i=s(t)[n];if(t.R||!r(i))return i;if(t.M){if(i!==g(t.u,n))return i;e=t.i}return e[n]=E(t.A.l,i,t)},has:function(t,n){return n in s(t)},ownKeys:function(t){return Reflect.ownKeys(s(t))},set:function(t,n,r){if(!t.M){var e=g(t.u,n);if(r?f(e,r)||r===t.p[n]:f(e,r)&&n in t.u)return!0;z(t),A(t)}return t.D[n]=!0,t.i[n]=r,!0},deleteProperty:function(t,n){return void 0!==g(t.u,n)||n in t.u?(t.D[n]=!1,z(t),A(t)):t.D[n]&&delete t.D[n],t.i&&delete t.i[n],!0},getOwnPropertyDescriptor:function(t,n){var r=s(t),e=Reflect.getOwnPropertyDescriptor(r,n);return e&&(e.writable=!0,e.configurable=1!==t.t||"length"!==n),e},defineProperty:function(){t(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.u)},setPrototypeOf:function(){t(12)}},Q={};e(L,(function(t,n){Q[t]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}})),Q.deleteProperty=function(t,n){return L.deleteProperty.call(this,t[0],n)},Q.set=function(t,n,r){return L.set.call(this,t[0],n,r,t[0])};var T=function(){function e(t){this.S=I,this.J=!1,"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var i=e.prototype;return i.produce=function(n,e,i){if("function"==typeof n&&"function"!=typeof e){var u=e;e=n;var o=this;return function(t){var n=this;void 0===t&&(t=u);for(var r=arguments.length,i=Array(r>1?r-1:0),f=1;f<r;f++)i[f-1]=arguments[f];return o.produce(t,(function(t){var r;return(r=e).call.apply(r,[n,t].concat(i))}))}}var f;if("function"!=typeof e&&t(6),void 0!==i&&"function"!=typeof i&&t(7),r(n)){var a=O(this),c=E(this,n,void 0),s=!0;try{f=e(c),s=!1}finally{s?m(a):j(a)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(t){return b(a,i),w(t,a)}),(function(t){throw m(a),t})):(b(a,i),w(f,a))}if((f=e(n))!==W)return void 0===f&&(f=n),this.J&&p(f,!0),f},i.produceWithPatches=function(t,n){var r,e,i=this;return"function"==typeof t?function(n){for(var r=arguments.length,e=Array(r>1?r-1:0),u=1;u<r;u++)e[u-1]=arguments[u];return i.produceWithPatches(n,(function(n){return t.apply(void 0,[n].concat(e))}))}:[this.produce(t,n,(function(t,n){r=t,e=n})),r,e]},i.createDraft=function(n){r(n)||t(8);var e=O(this),i=E(this,n,void 0);return i[q].$=!0,j(e),i},i.finishDraft=function(t,n){var r=(t&&t[q]).A;return b(r,n),w(void 0,r)},i.setAutoFreeze=function(t){this.J=t},i.setUseProxies=function(n){I||t(20),this.S=n},i.applyPatches=function(t,r){var e;for(e=r.length-1;e>=0;e--){var i=r[e];if(0===i.path.length&&"replace"===i.op){t=i.value;break}}var u=d("Patches").X;return n(t)?u(t,r):this.produce(t,(function(t){return u(t,r.slice(e+1))}))},e}(),U=new T,V=U.produce,Y=U.produceWithPatches.bind(U),Z=U.setAutoFreeze.bind(U),tt=U.setUseProxies.bind(U),nt=U.applyPatches.bind(U),rt=U.createDraft.bind(U),et=U.finishDraft.bind(U);exports.Immer=T,exports.applyPatches=nt,exports.castDraft=function(t){return t},exports.castImmutable=function(t){return t},exports.createDraft=rt,exports.default=V,exports.enableAllPlugins=function(){k(),D(),F()},exports.enableES5=k,exports.enableMapSet=D,exports.enablePatches=F,exports.finishDraft=et,exports.immerable=X,exports.isDraft=n,exports.isDraftable=r,exports.nothing=W,exports.original=function(t){if(t&&t[q])return t[q].u},exports.produce=V,exports.produceWithPatches=Y,exports.setAutoFreeze=Z,exports.setUseProxies=tt;
function t(t){for(var n=arguments.length,r=Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function n(t){return!!t&&!!t[q]}function r(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var n=Object.getPrototypeOf(t);return!n||n===Object.prototype}(t)||Array.isArray(t)||!!t[X]||!!t.constructor[X]||a(t)||c(t))}function e(t,n,r){void 0===r&&(r=!1),0===i(t)?(r?Object.keys:G)(t).forEach((function(r){return n(r,t[r],t)})):t.forEach((function(r,e){return n(e,r,t)}))}function i(t){var n=t[q];return n?n.t>3?n.t-4:n.t:Array.isArray(t)?1:a(t)?2:c(t)?3:0}function u(t,n){return 2===i(t)?t.has(n):Object.prototype.hasOwnProperty.call(t,n)}function o(t,n){return 2===i(t)?t.get(n):t[n]}function f(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}function a(t){return $&&t instanceof Map}function c(t){return C&&t instanceof Set}function s(t){return t.i||t.u}function v(n,r){if(void 0===r&&(r=!1),Array.isArray(n))return n.slice();var i=Object.create(Object.getPrototypeOf(n));return e(n,(function(e){if(e!==q){var u=Object.getOwnPropertyDescriptor(n,e),o=u.value;u.get&&(r||t(1),o=u.get.call(n)),u.enumerable?i[e]=o:Object.defineProperty(i,e,{value:o,writable:!0,configurable:!0})}})),i}function p(t,u){n(t)||l(t)||!r(t)||(i(t)>1&&(t.set=t.add=t.clear=t.delete=h),Object.freeze(t),u&&e(t,(function(t,n){return p(n,!0)}),!0))}function h(){t(2)}function l(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function d(n){var r=H[n];return r||t(19,n),r}function _(t,n){H[t]=n}function y(){return K}function b(t,n){n&&(d("Patches"),t.o=[],t.s=[],t.v=n)}function m(t){j(t),t.p.forEach(x),t.p=null}function j(t){t===K&&(K=t.h)}function O(t){return K={p:[],h:K,l:t,_:!0,m:0}}function x(t){var n=t[q];0===n.t||1===n.t?n.j():n.O=!0}function w(n,e){e.m=e.p.length;var i=e.p[0],u=void 0!==n&&n!==i;return e.l.S||d("ES5").P(e,n,u),u?(i[q].M&&(m(e),t(4)),r(n)&&(n=S(e,n),e.h||M(e,n)),e.o&&d("Patches").g(i[q],n,e.o,e.s)):n=S(e,i,[]),m(e),e.o&&e.v(e.o,e.s),n!==W?n:void 0}function S(t,n,r){if(l(n))return n;var i=n[q];if(!i)return e(n,(function(e,u){return P(t,i,n,e,u,r)}),!0),n;if(i.A!==t)return n;if(!i.M)return M(t,i.u,!0),i.u;if(!i.R){i.R=!0,i.A.m--;var u=4===i.t||5===i.t?i.i=v(i.k,!0):i.i;e(u,(function(n,e){return P(t,i,u,n,e,r)})),M(t,u,!1),r&&t.o&&d("Patches").F(i,r,t.o,t.s)}return i.i}function P(t,e,a,c,s,v){if(n(s)){var p=S(t,s,v&&e&&3!==e.t&&!u(e.D,c)?v.concat(c):void 0);if(l=c,d=p,2===(_=i(h=a))?h.set(l,d):3===_?(h.delete(l),h.add(d)):h[l]=d,!n(p))return;t._=!1}var h,l,d,_;if((!e||!f(s,o(e.u,c)))&&r(s)){if(!t.l.J&&t.m<1)return;S(t,s),e&&e.A.h||M(t,s)}}function M(t,n,r){void 0===r&&(r=!1),t.l.J&&t._&&p(n,r)}function g(t,n){var r=t[q],e=Reflect.getOwnPropertyDescriptor(r?s(r):t,n);return e&&e.value}function A(t){if(!t.M){if(t.M=!0,0===t.t||1===t.t){var n=t.i=v(t.u);e(t.p,(function(t,r){n[t]=r})),t.p=void 0}t.h&&A(t.h)}}function z(t){t.i||(t.i=v(t.u))}function E(t,n,r){var e=a(n)?d("MapSet").K(n,r):c(n)?d("MapSet").N(n,r):t.S?function(t,n){var r=Array.isArray(t),e={t:r?1:0,A:n?n.A:y(),M:!1,R:!1,D:{},h:n,u:t,k:null,p:{},i:null,j:null,$:!1},i=e,u=L;r&&(i=[e],u=Q);var o=Proxy.revocable(i,u),f=o.revoke,a=o.proxy;return e.k=a,e.j=f,a}(n,r):d("ES5").C(n,r);return(r?r.A:y()).p.push(e),e}function R(t,n){t.S?A(n):d("ES5").I(n)}function k(){function i(t,n){var r=t[q];if(r&&!r.W){r.W=!0;var e=t[n];return r.W=!1,e}return t[n]}function o(t){t.M||(t.M=!0,t.h&&o(t.h))}function a(t){t.i||(t.i=c(t.u))}function c(t){var n=t&&t[q];if(n){n.W=!0;var r=v(n.k,!0);return n.W=!1,r}return v(t)}function p(t){for(var n=t.length-1;n>=0;n--){var r=t[n][q];if(!r.M)switch(r.t){case 5:l(r)&&o(r);break;case 4:h(r)&&o(r)}}}function h(t){for(var n=t.u,r=t.k,e=Object.keys(r),i=e.length-1;i>=0;i--){var o=e[i],a=n[o];if(void 0===a&&!u(n,o))return!0;var c=r[o],s=c&&c[q];if(s?s.u!==a:!f(c,a))return!0}return e.length!==Object.keys(n).length}function l(t){var n=t.k;if(n.length!==t.u.length)return!0;var r=Object.getOwnPropertyDescriptor(n,n.length-1);return!(!r||r.get)}function d(n){n.O&&t(3,JSON.stringify(s(n)))}var b={};_("ES5",{C:function(t,n){var u=Array.isArray(t),v=c(t);e(v,(function(n){!function(t,n,e){var u=b[n];u?u.enumerable=e:b[n]=u={enumerable:e,get:function(){return function(t,n){d(t);var e=i(s(t),n);return t.W?e:e===i(t.u,n)&&r(e)?(a(t),t.i[n]=E(t.A.l,e,t)):e}(this[q],n)},set:function(t){!function(t,n,r){if(d(t),t.D[n]=!0,!t.M){if(f(r,i(s(t),n)))return;o(t),a(t)}t.i[n]=r}(this[q],n,t)}},Object.defineProperty(t,n,u)}(v,n,u||function(t,n){var r=Object.getOwnPropertyDescriptor(t,n);return!(!r||!r.enumerable)}(t,n))}));var p={t:u?5:4,A:n?n.A:y(),M:!1,W:!1,R:!1,D:{},h:n,u:t,k:v,i:null,O:!1,$:!1};return Object.defineProperty(v,q,{value:p,writable:!0}),v},I:o,P:function(t,r,i){t.p.forEach((function(t){t[q].W=!0})),i?n(r)&&r[q].A===t&&p(t.p):(t.o&&function t(n){if(n&&"object"==typeof n){var r=n[q];if(r){var i=r.u,f=r.k,a=r.D,c=r.t;if(4===c)e(f,(function(n){n!==q&&(void 0!==i[n]||u(i,n)?a[n]||t(f[n]):(a[n]=!0,o(r)))})),e(i,(function(t){void 0!==f[t]||u(f,t)||(a[t]=!1,o(r))}));else if(5===c){if(l(r)&&(o(r),a.length=!0),f.length<i.length)for(var s=f.length;s<i.length;s++)a[s]=!1;else for(var v=i.length;v<f.length;v++)a[v]=!0;for(var p=Math.min(f.length,i.length),h=0;h<p;h++)void 0===a[h]&&t(f[h])}}}}(t.p[0]),p(t.p))}})}function F(){function r(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(r);if(a(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],r(t[1])]})));if(c(t))return new Set(Array.from(t).map(r));var n=Object.create(Object.getPrototypeOf(t));for(var e in t)n[e]=r(t[e]);return n}function f(t){return n(t)?r(t):t}var s="add";_("Patches",{X:function(n,e){return e.forEach((function(e){for(var u=e.path,f=e.op,a=n,c=0;c<u.length-1;c++)"object"!=typeof(a=o(a,u[c]))&&t(15,u.join("/"));var v=i(a),p=r(e.value),h=u[u.length-1];switch(f){case"replace":switch(v){case 2:return a.set(h,p);case 3:t(16);default:return a[h]=p}case s:switch(v){case 1:return a.splice(h,0,p);case 2:return a.set(h,p);case 3:return a.add(p);default:return a[h]=p}case"remove":switch(v){case 1:return a.splice(h,1);case 2:return a.delete(h);case 3:return a.delete(e.value);default:return delete a[h]}default:t(17,f)}})),n},F:function(t,n,r,i){switch(t.t){case 0:case 4:case 2:return function(t,n,r,i){var a=t.u,c=t.i;e(t.D,(function(t,e){var v=o(a,t),p=o(c,t),h=e?u(a,t)?"replace":s:"remove";if(v!==p||"replace"!==h){var l=n.concat(t);r.push("remove"===h?{op:h,path:l}:{op:h,path:l,value:p}),i.push(h===s?{op:"remove",path:l}:"remove"===h?{op:s,path:l,value:f(v)}:{op:"replace",path:l,value:f(v)})}}))}(t,n,r,i);case 5:case 1:return function(t,n,r,e){var i=t.u,u=t.D,o=t.i;if(o.length<i.length){var a=[o,i];i=a[0],o=a[1];var c=[e,r];r=c[0],e=c[1]}for(var v=o.length-i.length,p=0;i[p]===o[p]&&p<i.length;)++p;for(var h=i.length;h>p&&i[h-1]===o[h+v-1];)--h;for(var l=p;l<h;++l)if(u[l]&&o[l]!==i[l]){var d=n.concat([l]);r.push({op:"replace",path:d,value:f(o[l])}),e.push({op:"replace",path:d,value:f(i[l])})}for(var _=r.length,y=h+v-1;y>=h;--y){var b=n.concat([y]);r[_+y-h]={op:s,path:b,value:f(o[y])},e.push({op:"remove",path:b})}}(t,n,r,i);case 3:return function(t,n,r,e){var i=t.u,u=t.i,o=0;i.forEach((function(t){if(!u.has(t)){var i=n.concat([o]);r.push({op:"remove",path:i,value:t}),e.unshift({op:s,path:i,value:t})}o++})),o=0,u.forEach((function(t){if(!i.has(t)){var u=n.concat([o]);r.push({op:s,path:u,value:t}),e.unshift({op:"remove",path:u,value:t})}o++}))}(t,n,r,i)}},g:function(t,n,r,e){r.push({op:"replace",path:[],value:n}),e.push({op:"replace",path:[],value:t.u})}})}function D(){function n(t,n){function r(){this.constructor=t}o(t,n),t.prototype=(r.prototype=n.prototype,new r)}function e(t){t.i||(t.D=new Map,t.i=new Map(t.u))}function i(t){t.i||(t.i=new Set,t.u.forEach((function(n){if(r(n)){var e=E(t.A.l,n,t);t.p.set(n,e),t.i.add(e)}else t.i.add(n)})))}function u(n){n.O&&t(3,JSON.stringify(s(n)))}var o=function(t,n){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(t,n)},f=function(){function t(t,n){return this[q]={t:2,h:n,A:n?n.A:y(),M:!1,R:!1,i:void 0,D:void 0,u:t,k:this,$:!1,O:!1},this}n(t,Map);var i=t.prototype;return Object.defineProperty(i,"size",{get:function(){return s(this[q]).size}}),i.has=function(t){return s(this[q]).has(t)},i.set=function(t,n){var r=this[q];return u(r),s(r).get(t)!==n&&(e(r),R(r.A.l,r),r.D.set(t,!0),r.i.set(t,n),r.D.set(t,!0)),this},i.delete=function(t){if(!this.has(t))return!1;var n=this[q];return u(n),e(n),R(n.A.l,n),n.D.set(t,!1),n.i.delete(t),!0},i.clear=function(){var t=this[q];return u(t),e(t),R(t.A.l,t),t.D=new Map,t.i.clear()},i.forEach=function(t,n){var r=this;s(this[q]).forEach((function(e,i){t.call(n,r.get(i),i,r)}))},i.get=function(t){var n=this[q];u(n);var i=s(n).get(t);if(n.R||!r(i))return i;if(i!==n.u.get(t))return i;var o=E(n.A.l,i,n);return e(n),n.i.set(t,o),o},i.keys=function(){return s(this[q]).keys()},i.values=function(){var t,n=this,r=this.keys();return(t={})[B]=function(){return n.values()},t.next=function(){var t=r.next();return t.done?t:{done:!1,value:n.get(t.value)}},t},i.entries=function(){var t,n=this,r=this.keys();return(t={})[B]=function(){return n.entries()},t.next=function(){var t=r.next();if(t.done)return t;var e=n.get(t.value);return{done:!1,value:[t.value,e]}},t},i[B]=function(){return this.entries()},t}(),a=function(){function t(t,n){return this[q]={t:3,h:n,A:n?n.A:y(),M:!1,R:!1,i:void 0,u:t,k:this,p:new Map,O:!1,$:!1},this}n(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return s(this[q]).size}}),r.has=function(t){var n=this[q];return u(n),n.i?!!n.i.has(t)||!(!n.p.has(t)||!n.i.has(n.p.get(t))):n.u.has(t)},r.add=function(t){var n=this[q];return u(n),this.has(t)||(i(n),R(n.A.l,n),n.i.add(t)),this},r.delete=function(t){if(!this.has(t))return!1;var n=this[q];return u(n),i(n),R(n.A.l,n),n.i.delete(t)||!!n.p.has(t)&&n.i.delete(n.p.get(t))},r.clear=function(){var t=this[q];return u(t),i(t),R(t.A.l,t),t.i.clear()},r.values=function(){var t=this[q];return u(t),i(t),t.i.values()},r.entries=function(){var t=this[q];return u(t),i(t),t.i.entries()},r.keys=function(){return this.values()},r[B]=function(){return this.values()},r.forEach=function(t,n){for(var r=this.values(),e=r.next();!e.done;)t.call(n,e.value,e.value,this),e=r.next()},t}();_("MapSet",{K:function(t,n){return new f(t,n)},N:function(t,n){return new a(t,n)}})}var J;Object.defineProperty(exports,"__esModule",{value:!0});var K,N="undefined"!=typeof Symbol,$="undefined"!=typeof Map,C="undefined"!=typeof Set,I="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,W=N?Symbol("immer-nothing"):((J={})["immer-nothing"]=!0,J),X=N?Symbol("immer-draftable"):"__$immer_draftable",q=N?Symbol("immer-state"):"__$immer_state",B=N?Symbol.iterator:"@@iterator",G="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,H={},L={get:function(t,n){if(n===q)return t;var e=t.p;if(!t.M&&u(e,n))return e[n];var i=s(t)[n];if(t.R||!r(i))return i;if(t.M){if(i!==g(t.u,n))return i;e=t.i}return e[n]=E(t.A.l,i,t)},has:function(t,n){return n in s(t)},ownKeys:function(t){return Reflect.ownKeys(s(t))},set:function(t,n,r){if(!t.M){var e=g(t.u,n);if(r?f(e,r)||r===t.p[n]:f(e,r)&&n in t.u)return!0;z(t),A(t)}return t.D[n]=!0,t.i[n]=r,!0},deleteProperty:function(t,n){return void 0!==g(t.u,n)||n in t.u?(t.D[n]=!1,z(t),A(t)):t.D[n]&&delete t.D[n],t.i&&delete t.i[n],!0},getOwnPropertyDescriptor:function(t,n){var r=s(t),e=Reflect.getOwnPropertyDescriptor(r,n);return e&&(e.writable=!0,e.configurable=1!==t.t||"length"!==n),e},defineProperty:function(){t(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.u)},setPrototypeOf:function(){t(12)}},Q={};e(L,(function(t,n){Q[t]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}})),Q.deleteProperty=function(t,n){return L.deleteProperty.call(this,t[0],n)},Q.set=function(t,n,r){return L.set.call(this,t[0],n,r,t[0])};var T=function(){function e(t){this.S=I,this.J=!1,"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var i=e.prototype;return i.produce=function(n,e,i){if("function"==typeof n&&"function"!=typeof e){var u=e;e=n;var o=this;return function(t){var n=this;void 0===t&&(t=u);for(var r=arguments.length,i=Array(r>1?r-1:0),f=1;f<r;f++)i[f-1]=arguments[f];return o.produce(t,(function(t){var r;return(r=e).call.apply(r,[n,t].concat(i))}))}}var f;if("function"!=typeof e&&t(6),void 0!==i&&"function"!=typeof i&&t(7),r(n)){var a=O(this),c=E(this,n,void 0),s=!0;try{f=e(c),s=!1}finally{s?m(a):j(a)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(t){return b(a,i),w(t,a)}),(function(t){throw m(a),t})):(b(a,i),w(f,a))}if((f=e(n))!==W)return void 0===f&&(f=n),this.J&&p(f,!0),f},i.produceWithPatches=function(t,n){var r,e,i=this;return"function"==typeof t?function(n){for(var r=arguments.length,e=Array(r>1?r-1:0),u=1;u<r;u++)e[u-1]=arguments[u];return i.produceWithPatches(n,(function(n){return t.apply(void 0,[n].concat(e))}))}:[this.produce(t,n,(function(t,n){r=t,e=n})),r,e]},i.createDraft=function(n){r(n)||t(8);var e=O(this),i=E(this,n,void 0);return i[q].$=!0,j(e),i},i.finishDraft=function(t,n){var r=(t&&t[q]).A;return b(r,n),w(void 0,r)},i.setAutoFreeze=function(t){this.J=t},i.setUseProxies=function(n){I||t(20),this.S=n},i.applyPatches=function(t,r){var e;for(e=r.length-1;e>=0;e--){var i=r[e];if(0===i.path.length&&"replace"===i.op){t=i.value;break}}var u=d("Patches").X;return n(t)?u(t,r):this.produce(t,(function(t){return u(t,r.slice(e+1))}))},e}(),U=new T,V=U.produce,Y=U.produceWithPatches.bind(U),Z=U.setAutoFreeze.bind(U),tt=U.setUseProxies.bind(U),nt=U.applyPatches.bind(U),rt=U.createDraft.bind(U),et=U.finishDraft.bind(U);exports.Immer=T,exports.applyPatches=nt,exports.castDraft=function(t){return t},exports.castImmutable=function(t){return t},exports.createDraft=rt,exports.default=V,exports.enableAllPlugins=function(){k(),D(),F()},exports.enableES5=k,exports.enableMapSet=D,exports.enablePatches=F,exports.finishDraft=et,exports.immerable=X,exports.isDraft=n,exports.isDraftable=r,exports.nothing=W,exports.original=function(t){if(t&&t[q])return t[q].u},exports.produce=V,exports.produceWithPatches=Y,exports.setAutoFreeze=Z,exports.setUseProxies=tt;
//# sourceMappingURL=immer.cjs.production.min.js.map

@@ -1,2 +0,2 @@

function n(n){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;e<t;e++)r[e-1]=arguments[e];if("production"!==process.env.NODE_ENV){var i=L[n],o=i?"function"==typeof i?i.apply(null,r):i:"unknown error nr: "+n;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+n+(r.length?" "+r.join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function t(n){return!!n&&!!n[G]}function r(n){return!!n&&(function(n){if(!n||"object"!=typeof n)return!1;var t=Object.getPrototypeOf(n);return!t||t===Object.prototype}(n)||Array.isArray(n)||!!n[B]||!!n.constructor[B]||c(n)||s(n))}function e(n){if(n&&n[G])return n[G].t}function i(n,t,r){void 0===r&&(r=!1),0===o(n)?(r?Object.keys:Q)(n).forEach((function(r){return t(r,n[r],n)})):n.forEach((function(r,e){return t(e,r,n)}))}function o(n){var t=n[G];return t?t.i>3?t.i-4:t.i:Array.isArray(n)?1:c(n)?2:s(n)?3:0}function u(n,t){return 2===o(n)?n.has(t):Object.prototype.hasOwnProperty.call(n,t)}function a(n,t){return 2===o(n)?n.get(t):n[t]}function f(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function c(n){return U&&n instanceof Map}function s(n){return W&&n instanceof Set}function v(n){return n.o||n.t}function p(t,r){if(void 0===r&&(r=!1),Array.isArray(t))return t.slice();var e=Object.create(Object.getPrototypeOf(t));return i(t,(function(i){if(i!==G){var o=Object.getOwnPropertyDescriptor(t,i),u=o.value;o.get&&(r||n(1),u=o.get.call(t)),o.enumerable?e[i]=u:Object.defineProperty(e,i,{value:u,writable:!0,configurable:!0})}})),e}function d(n,e){t(n)||h(n)||!r(n)||(o(n)>1&&(n.set=n.add=n.clear=n.delete=l),Object.freeze(n),e&&i(n,(function(n,t){return d(t,!0)}),!0))}function l(){n(2)}function h(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function y(t){var r=V[t];return r||n("production"!==process.env.NODE_ENV?18:19,t),r}function b(n,t){V[n]=t}function m(){return"production"===process.env.NODE_ENV||K||n(0),K}function _(n,t){t&&(y("Patches"),n.u=[],n.s=[],n.v=t)}function j(n){O(n),n.p.forEach(w),n.p=null}function O(n){n===K&&(K=n.l)}function g(n){return K={p:[],l:K,h:n,m:!0,_:0}}function w(n){var t=n[G];0===t.i||1===t.i?t.j():t.O=!0}function S(t,e){e._=e.p.length;var i=e.p[0],o=void 0!==t&&t!==i;return e.h.g||y("ES5").S(e,t,o),o?(i[G].P&&(j(e),n(4)),r(t)&&(t=P(e,t),e.l||A(e,t)),e.u&&y("Patches").M(i[G],t,e.u,e.s)):t=P(e,i,[]),j(e),e.u&&e.v(e.u,e.s),t!==q?t:void 0}function P(n,t,r){if(h(t))return t;var e=t[G];if(!e)return i(t,(function(i,o){return M(n,e,t,i,o,r)}),!0),t;if(e.A!==n)return t;if(!e.P)return A(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=p(e.k,!0):e.o;i(o,(function(t,i){return M(n,e,o,t,i,r)})),A(n,o,!1),r&&n.u&&y("Patches").R(e,r,n.u,n.s)}return e.o}function M(e,i,c,s,v,p){if("production"!==process.env.NODE_ENV&&v===c&&n(5),t(v)){var d=P(e,v,p&&i&&3!==i.i&&!u(i.D,s)?p.concat(s):void 0);if(h=s,y=d,2===(b=o(l=c))?l.set(h,y):3===b?(l.delete(h),l.add(y)):l[h]=y,!t(d))return;e.m=!1}var l,h,y,b;if((!i||!f(v,a(i.t,s)))&&r(v)){if(!e.h.N&&e._<1)return;P(e,v),i&&i.A.l||A(e,v)}}function A(n,t,r){void 0===r&&(r=!1),n.h.N&&n.m&&d(t,r)}function z(n,t){var r=n[G],e=Reflect.getOwnPropertyDescriptor(r?v(r):n,t);return e&&e.value}function x(n){if(!n.P){if(n.P=!0,0===n.i||1===n.i){var t=n.o=p(n.t);i(n.p,(function(n,r){t[n]=r})),n.p=void 0}n.l&&x(n.l)}}function I(n){n.o||(n.o=p(n.t))}function E(n,t,r){var e=c(t)?y("MapSet").T(t,r):s(t)?y("MapSet").F(t,r):n.g?function(n,t){var r=Array.isArray(n),e={i:r?1:0,A:t?t.A:m(),P:!1,I:!1,D:{},l:t,t:n,k:null,p:{},o:null,j:null,C:!1},i=e,o=Y;r&&(i=[e],o=Z);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(t,r):y("ES5").J(t,r);return(r?r.A:m()).p.push(e),e}function k(n,t){n.g?x(t):y("ES5").K(t)}function R(){function e(n,t){var r=n[G];if(r&&!r.$){r.$=!0;var e=n[t];return r.$=!1,e}return n[t]}function o(n){n.P||(n.P=!0,n.l&&o(n.l))}function a(n){n.o||(n.o=c(n.t))}function c(n){var t=n&&n[G];if(t){t.$=!0;var r=p(t.k,!0);return t.$=!1,r}return p(n)}function s(n){for(var t=n.length-1;t>=0;t--){var r=n[t][G];if(!r.P)switch(r.i){case 5:l(r)&&o(r);break;case 4:d(r)&&o(r)}}}function d(n){for(var t=n.t,r=n.k,e=Object.keys(r),i=e.length-1;i>=0;i--){var o=e[i],a=t[o];if(void 0===a&&!u(t,o))return!0;var c=r[o],s=c&&c[G];if(s?s.t!==a:!f(c,a))return!0}return e.length!==Object.keys(t).length}function l(n){var t=n.k;if(t.length!==n.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}function h(t){t.O&&n(3,JSON.stringify(v(t)))}var y={};b("ES5",{J:function(n,t){var u=Array.isArray(n),s=c(n);i(s,(function(t){!function(n,t,i){var u=y[t];u?u.enumerable=i:y[t]=u={enumerable:i,get:function(){return function(n,t){h(n);var i=e(v(n),t);return n.$?i:i===e(n.t,t)&&r(i)?(a(n),n.o[t]=E(n.A.h,i,n)):i}(this[G],t)},set:function(n){!function(n,t,r){if(h(n),n.D[t]=!0,!n.P){if(f(r,e(v(n),t)))return;o(n),a(n)}n.o[t]=r}(this[G],t,n)}},Object.defineProperty(n,t,u)}(s,t,u||function(n,t){var r=Object.getOwnPropertyDescriptor(n,t);return!(!r||!r.enumerable)}(n,t))}));var p={i:u?5:4,A:t?t.A:m(),P:!1,$:!1,I:!1,D:{},l:t,t:n,k:s,o:null,O:!1,C:!1};return Object.defineProperty(s,G,{value:p,writable:!0}),s},K:o,S:function(n,r,e){n.p.forEach((function(n){n[G].$=!0})),e?t(r)&&r[G].A===n&&s(n.p):(n.u&&function n(t){if(t&&"object"==typeof t){var r=t[G];if(r){var e=r.t,a=r.k,f=r.D,c=r.i;if(4===c)i(a,(function(t){t!==G&&(void 0!==e[t]||u(e,t)?f[t]||n(a[t]):(f[t]=!0,o(r)))})),i(e,(function(n){void 0!==a[n]||u(a,n)||(f[n]=!1,o(r))}));else if(5===c){if(l(r)&&(o(r),f.length=!0),a.length<e.length)for(var s=a.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<a.length;v++)f[v]=!0;for(var p=Math.min(a.length,e.length),d=0;d<p;d++)void 0===f[d]&&n(a[d])}}}}(n.p[0]),s(n.p))}})}function D(){function r(n){if(!n||"object"!=typeof n)return n;if(Array.isArray(n))return n.map(r);if(c(n))return new Map(Array.from(n.entries()).map((function(n){return[n[0],r(n[1])]})));if(s(n))return new Set(Array.from(n).map(r));var t=Object.create(Object.getPrototypeOf(n));for(var e in n)t[e]=r(n[e]);return t}function e(n){return t(n)?r(n):n}var f="add";b("Patches",{U:function(t,e){return e.forEach((function(e){for(var i=e.path,u=e.op,c=t,s=0;s<i.length-1;s++)"object"!=typeof(c=a(c,i[s]))&&n(15,i.join("/"));var v=o(c),p=r(e.value),d=i[i.length-1];switch(u){case"replace":switch(v){case 2:return c.set(d,p);case 3:n(16);default:return c[d]=p}case f:switch(v){case 1:return c.splice(d,0,p);case 2:return c.set(d,p);case 3:return c.add(p);default:return c[d]=p}case"remove":switch(v){case 1:return c.splice(d,1);case 2:return c.delete(d);case 3:return c.delete(e.value);default:return delete c[d]}default:n(17,u)}})),t},R:function(n,t,r,o){switch(n.i){case 0:case 4:case 2:return function(n,t,r,o){var c=n.t,s=n.o;i(n.D,(function(n,i){var v=a(c,n),p=a(s,n),d=i?u(c,n)?"replace":f:"remove";if(v!==p||"replace"!==d){var l=t.concat(n);r.push("remove"===d?{op:d,path:l}:{op:d,path:l,value:p}),o.push(d===f?{op:"remove",path:l}:"remove"===d?{op:f,path:l,value:e(v)}:{op:"replace",path:l,value:e(v)})}}))}(n,t,r,o);case 5:case 1:return function(n,t,r,i){var o=n.t,u=n.D,a=n.o;if(a.length<o.length){var c=[a,o];o=c[0],a=c[1];var s=[i,r];r=s[0],i=s[1]}for(var v=a.length-o.length,p=0;o[p]===a[p]&&p<o.length;)++p;for(var d=o.length;d>p&&o[d-1]===a[d+v-1];)--d;for(var l=p;l<d;++l)if(u[l]&&a[l]!==o[l]){var h=t.concat([l]);r.push({op:"replace",path:h,value:e(a[l])}),i.push({op:"replace",path:h,value:e(o[l])})}for(var y=r.length,b=d+v-1;b>=d;--b){var m=t.concat([b]);r[y+b-d]={op:f,path:m,value:e(a[b])},i.push({op:"remove",path:m})}}(n,t,r,o);case 3:return function(n,t,r,e){var i=n.t,o=n.o,u=0;i.forEach((function(n){if(!o.has(n)){var i=t.concat([u]);r.push({op:"remove",path:i,value:n}),e.unshift({op:f,path:i,value:n})}u++})),u=0,o.forEach((function(n){if(!i.has(n)){var o=t.concat([u]);r.push({op:f,path:o,value:n}),e.unshift({op:"remove",path:o,value:n})}u++}))}(n,t,r,o)}},M:function(n,t,r,e){r.push({op:"replace",path:[],value:t}),e.push({op:"replace",path:[],value:n.t})}})}function N(){function t(n,t){function r(){this.constructor=n}u(n,t),n.prototype=(r.prototype=t.prototype,new r)}function e(n){n.o||(n.D=new Map,n.o=new Map(n.t))}function i(n){n.o||(n.o=new Set,n.t.forEach((function(t){if(r(t)){var e=E(n.A.h,t,n);n.p.set(t,e),n.o.add(e)}else n.o.add(t)})))}function o(t){t.O&&n(3,JSON.stringify(v(t)))}var u=function(n,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])})(n,t)},a=function(){function n(n,t){return this[G]={i:2,l:t,A:t?t.A:m(),P:!1,I:!1,o:void 0,D:void 0,t:n,k:this,C:!1,O:!1},this}t(n,Map);var i=n.prototype;return Object.defineProperty(i,"size",{get:function(){return v(this[G]).size}}),i.has=function(n){return v(this[G]).has(n)},i.set=function(n,t){var r=this[G];return o(r),v(r).get(n)!==t&&(e(r),k(r.A.h,r),r.D.set(n,!0),r.o.set(n,t),r.D.set(n,!0)),this},i.delete=function(n){if(!this.has(n))return!1;var t=this[G];return o(t),e(t),k(t.A.h,t),t.D.set(n,!1),t.o.delete(n),!0},i.clear=function(){var n=this[G];return o(n),e(n),k(n.A.h,n),n.D=new Map,n.o.clear()},i.forEach=function(n,t){var r=this;v(this[G]).forEach((function(e,i){n.call(t,r.get(i),i,r)}))},i.get=function(n){var t=this[G];o(t);var i=v(t).get(n);if(t.I||!r(i))return i;if(i!==t.t.get(n))return i;var u=E(t.A.h,i,t);return e(t),t.o.set(n,u),u},i.keys=function(){return v(this[G]).keys()},i.values=function(){var n,t=this,r=this.keys();return(n={})[H]=function(){return t.values()},n.next=function(){var n=r.next();return n.done?n:{done:!1,value:t.get(n.value)}},n},i.entries=function(){var n,t=this,r=this.keys();return(n={})[H]=function(){return t.entries()},n.next=function(){var n=r.next();if(n.done)return n;var e=t.get(n.value);return{done:!1,value:[n.value,e]}},n},i[H]=function(){return this.entries()},n}(),f=function(){function n(n,t){return this[G]={i:3,l:t,A:t?t.A:m(),P:!1,I:!1,o:void 0,t:n,k:this,p:new Map,O:!1,C:!1},this}t(n,Set);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return v(this[G]).size}}),r.has=function(n){var t=this[G];return o(t),t.o?!!t.o.has(n)||!(!t.p.has(n)||!t.o.has(t.p.get(n))):t.t.has(n)},r.add=function(n){var t=this[G];return o(t),t.o?t.o.add(n):t.t.has(n)||(i(t),k(t.A.h,t),t.o.add(n)),this},r.delete=function(n){if(!this.has(n))return!1;var t=this[G];return o(t),i(t),k(t.A.h,t),t.o.delete(n)||!!t.p.has(n)&&t.o.delete(t.p.get(n))},r.clear=function(){var n=this[G];return o(n),i(n),k(n.A.h,n),n.o.clear()},r.values=function(){var n=this[G];return o(n),i(n),n.o.values()},r.entries=function(){var n=this[G];return o(n),i(n),n.o.entries()},r.keys=function(){return this.values()},r[H]=function(){return this.values()},r.forEach=function(n,t){for(var r=this.values(),e=r.next();!e.done;)n.call(t,e.value,e.value,this),e=r.next()},n}();b("MapSet",{T:function(n,t){return new a(n,t)},F:function(n,t){return new f(n,t)}})}function T(){R(),N(),D()}function F(n){return n}function C(n){return n}var J,K,$="undefined"!=typeof Symbol,U="undefined"!=typeof Map,W="undefined"!=typeof Set,X="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,q=$?Symbol("immer-nothing"):((J={})["immer-nothing"]=!0,J),B=$?Symbol("immer-draftable"):"__$immer_draftable",G=$?Symbol("immer-state"):"__$immer_state",H=$?Symbol.iterator:"@@iterator",L={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return"Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return"Unsupported patch operation: "+n},18:function(n){return"The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},19:function(n){return"plugin not loaded: "+n},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available"},Q="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,V={},Y={get:function(n,t){if(t===G)return n;var e=n.p;if(!n.P&&u(e,t))return e[t];var i=v(n)[t];if(n.I||!r(i))return i;if(n.P){if(i!==z(n.t,t))return i;e=n.o}return e[t]=E(n.A.h,i,n)},has:function(n,t){return t in v(n)},ownKeys:function(n){return Reflect.ownKeys(v(n))},set:function(n,t,r){if(!n.P){var e=z(n.t,t);if(r?f(e,r)||r===n.p[t]:f(e,r)&&t in n.t)return!0;I(n),x(n)}return n.D[t]=!0,n.o[t]=r,!0},deleteProperty:function(n,t){return void 0!==z(n.t,t)||t in n.t?(n.D[t]=!1,I(n),x(n)):n.D[t]&&delete n.D[t],n.o&&delete n.o[t],!0},getOwnPropertyDescriptor:function(n,t){var r=v(n),e=Reflect.getOwnPropertyDescriptor(r,t);return e&&(e.writable=!0,e.configurable=1!==n.i||"length"!==t),e},defineProperty:function(){n(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12)}},Z={};i(Y,(function(n,t){Z[n]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Z.deleteProperty=function(t,r){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(r))&&n(13),Y.deleteProperty.call(this,t[0],r)},Z.set=function(t,r,e){return"production"!==process.env.NODE_ENV&&"length"!==r&&isNaN(parseInt(r))&&n(14),Y.set.call(this,t[0],r,e,t[0])};var nn=function(){function e(n){this.g=X,this.N="production"!==process.env.NODE_ENV,"boolean"==typeof(null==n?void 0:n.useProxies)&&this.setUseProxies(n.useProxies),"boolean"==typeof(null==n?void 0:n.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var i=e.prototype;return i.produce=function(t,e,i){if("function"==typeof t&&"function"!=typeof e){var o=e;e=t;var u=this;return function(n){var t=this;void 0===n&&(n=o);for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return u.produce(n,(function(n){var r;return(r=e).call.apply(r,[t,n].concat(i))}))}}var a;if("function"!=typeof e&&n(6),void 0!==i&&"function"!=typeof i&&n(7),r(t)){var f=g(this),c=E(this,t,void 0),s=!0;try{a=e(c),s=!1}finally{s?j(f):O(f)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(n){return _(f,i),S(n,f)}),(function(n){throw j(f),n})):(_(f,i),S(a,f))}if((a=e(t))!==q)return void 0===a&&(a=t),this.N&&d(a,!0),a},i.produceWithPatches=function(n,t){var r,e,i=this;return"function"==typeof n?function(t){for(var r=arguments.length,e=Array(r>1?r-1:0),o=1;o<r;o++)e[o-1]=arguments[o];return i.produceWithPatches(t,(function(t){return n.apply(void 0,[t].concat(e))}))}:[this.produce(n,t,(function(n,t){r=n,e=t})),r,e]},i.createDraft=function(t){r(t)||n(8);var e=g(this),i=E(this,t,void 0);return i[G].C=!0,O(e),i},i.finishDraft=function(t,r){var e=t&&t[G];"production"!==process.env.NODE_ENV&&(e&&e.C||n(9),e.I&&n(10));var i=e.A;return _(i,r),S(void 0,i)},i.setAutoFreeze=function(n){this.N=n},i.setUseProxies=function(t){X||n(20),this.g=t},i.applyPatches=function(n,r){var e;for(e=r.length-1;e>=0;e--){var i=r[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}var o=y("Patches").U;return t(n)?o(n,r):this.produce(n,(function(n){return o(n,r.slice(e+1))}))},e}(),tn=new nn,rn=tn.produce,en=tn.produceWithPatches.bind(tn),on=tn.setAutoFreeze.bind(tn),un=tn.setUseProxies.bind(tn),an=tn.applyPatches.bind(tn),fn=tn.createDraft.bind(tn),cn=tn.finishDraft.bind(tn);export default rn;export{nn as Immer,an as applyPatches,F as castDraft,C as castImmutable,fn as createDraft,T as enableAllPlugins,R as enableES5,N as enableMapSet,D as enablePatches,cn as finishDraft,B as immerable,t as isDraft,r as isDraftable,q as nothing,e as original,rn as produce,en as produceWithPatches,on as setAutoFreeze,un as setUseProxies};
function n(n){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;e<t;e++)r[e-1]=arguments[e];if("production"!==process.env.NODE_ENV){var i=L[n],o=i?"function"==typeof i?i.apply(null,r):i:"unknown error nr: "+n;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+n+(r.length?" "+r.join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function t(n){return!!n&&!!n[G]}function r(n){return!!n&&(function(n){if(!n||"object"!=typeof n)return!1;var t=Object.getPrototypeOf(n);return!t||t===Object.prototype}(n)||Array.isArray(n)||!!n[B]||!!n.constructor[B]||c(n)||s(n))}function e(n){if(n&&n[G])return n[G].t}function i(n,t,r){void 0===r&&(r=!1),0===o(n)?(r?Object.keys:Q)(n).forEach((function(r){return t(r,n[r],n)})):n.forEach((function(r,e){return t(e,r,n)}))}function o(n){var t=n[G];return t?t.i>3?t.i-4:t.i:Array.isArray(n)?1:c(n)?2:s(n)?3:0}function u(n,t){return 2===o(n)?n.has(t):Object.prototype.hasOwnProperty.call(n,t)}function a(n,t){return 2===o(n)?n.get(t):n[t]}function f(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function c(n){return U&&n instanceof Map}function s(n){return W&&n instanceof Set}function v(n){return n.o||n.t}function p(t,r){if(void 0===r&&(r=!1),Array.isArray(t))return t.slice();var e=Object.create(Object.getPrototypeOf(t));return i(t,(function(i){if(i!==G){var o=Object.getOwnPropertyDescriptor(t,i),u=o.value;o.get&&(r||n(1),u=o.get.call(t)),o.enumerable?e[i]=u:Object.defineProperty(e,i,{value:u,writable:!0,configurable:!0})}})),e}function d(n,e){t(n)||h(n)||!r(n)||(o(n)>1&&(n.set=n.add=n.clear=n.delete=l),Object.freeze(n),e&&i(n,(function(n,t){return d(t,!0)}),!0))}function l(){n(2)}function h(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function y(t){var r=V[t];return r||n("production"!==process.env.NODE_ENV?18:19,t),r}function b(n,t){V[n]=t}function m(){return"production"===process.env.NODE_ENV||K||n(0),K}function _(n,t){t&&(y("Patches"),n.u=[],n.s=[],n.v=t)}function j(n){O(n),n.p.forEach(w),n.p=null}function O(n){n===K&&(K=n.l)}function g(n){return K={p:[],l:K,h:n,m:!0,_:0}}function w(n){var t=n[G];0===t.i||1===t.i?t.j():t.O=!0}function S(t,e){e._=e.p.length;var i=e.p[0],o=void 0!==t&&t!==i;return e.h.g||y("ES5").S(e,t,o),o?(i[G].P&&(j(e),n(4)),r(t)&&(t=P(e,t),e.l||A(e,t)),e.u&&y("Patches").M(i[G],t,e.u,e.s)):t=P(e,i,[]),j(e),e.u&&e.v(e.u,e.s),t!==q?t:void 0}function P(n,t,r){if(h(t))return t;var e=t[G];if(!e)return i(t,(function(i,o){return M(n,e,t,i,o,r)}),!0),t;if(e.A!==n)return t;if(!e.P)return A(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=p(e.k,!0):e.o;i(o,(function(t,i){return M(n,e,o,t,i,r)})),A(n,o,!1),r&&n.u&&y("Patches").R(e,r,n.u,n.s)}return e.o}function M(e,i,c,s,v,p){if("production"!==process.env.NODE_ENV&&v===c&&n(5),t(v)){var d=P(e,v,p&&i&&3!==i.i&&!u(i.D,s)?p.concat(s):void 0);if(h=s,y=d,2===(b=o(l=c))?l.set(h,y):3===b?(l.delete(h),l.add(y)):l[h]=y,!t(d))return;e.m=!1}var l,h,y,b;if((!i||!f(v,a(i.t,s)))&&r(v)){if(!e.h.N&&e._<1)return;P(e,v),i&&i.A.l||A(e,v)}}function A(n,t,r){void 0===r&&(r=!1),n.h.N&&n.m&&d(t,r)}function z(n,t){var r=n[G],e=Reflect.getOwnPropertyDescriptor(r?v(r):n,t);return e&&e.value}function x(n){if(!n.P){if(n.P=!0,0===n.i||1===n.i){var t=n.o=p(n.t);i(n.p,(function(n,r){t[n]=r})),n.p=void 0}n.l&&x(n.l)}}function I(n){n.o||(n.o=p(n.t))}function E(n,t,r){var e=c(t)?y("MapSet").T(t,r):s(t)?y("MapSet").F(t,r):n.g?function(n,t){var r=Array.isArray(n),e={i:r?1:0,A:t?t.A:m(),P:!1,I:!1,D:{},l:t,t:n,k:null,p:{},o:null,j:null,C:!1},i=e,o=Y;r&&(i=[e],o=Z);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(t,r):y("ES5").J(t,r);return(r?r.A:m()).p.push(e),e}function k(n,t){n.g?x(t):y("ES5").K(t)}function R(){function e(n,t){var r=n[G];if(r&&!r.$){r.$=!0;var e=n[t];return r.$=!1,e}return n[t]}function o(n){n.P||(n.P=!0,n.l&&o(n.l))}function a(n){n.o||(n.o=c(n.t))}function c(n){var t=n&&n[G];if(t){t.$=!0;var r=p(t.k,!0);return t.$=!1,r}return p(n)}function s(n){for(var t=n.length-1;t>=0;t--){var r=n[t][G];if(!r.P)switch(r.i){case 5:l(r)&&o(r);break;case 4:d(r)&&o(r)}}}function d(n){for(var t=n.t,r=n.k,e=Object.keys(r),i=e.length-1;i>=0;i--){var o=e[i],a=t[o];if(void 0===a&&!u(t,o))return!0;var c=r[o],s=c&&c[G];if(s?s.t!==a:!f(c,a))return!0}return e.length!==Object.keys(t).length}function l(n){var t=n.k;if(t.length!==n.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}function h(t){t.O&&n(3,JSON.stringify(v(t)))}var y={};b("ES5",{J:function(n,t){var u=Array.isArray(n),s=c(n);i(s,(function(t){!function(n,t,i){var u=y[t];u?u.enumerable=i:y[t]=u={enumerable:i,get:function(){return function(n,t){h(n);var i=e(v(n),t);return n.$?i:i===e(n.t,t)&&r(i)?(a(n),n.o[t]=E(n.A.h,i,n)):i}(this[G],t)},set:function(n){!function(n,t,r){if(h(n),n.D[t]=!0,!n.P){if(f(r,e(v(n),t)))return;o(n),a(n)}n.o[t]=r}(this[G],t,n)}},Object.defineProperty(n,t,u)}(s,t,u||function(n,t){var r=Object.getOwnPropertyDescriptor(n,t);return!(!r||!r.enumerable)}(n,t))}));var p={i:u?5:4,A:t?t.A:m(),P:!1,$:!1,I:!1,D:{},l:t,t:n,k:s,o:null,O:!1,C:!1};return Object.defineProperty(s,G,{value:p,writable:!0}),s},K:o,S:function(n,r,e){n.p.forEach((function(n){n[G].$=!0})),e?t(r)&&r[G].A===n&&s(n.p):(n.u&&function n(t){if(t&&"object"==typeof t){var r=t[G];if(r){var e=r.t,a=r.k,f=r.D,c=r.i;if(4===c)i(a,(function(t){t!==G&&(void 0!==e[t]||u(e,t)?f[t]||n(a[t]):(f[t]=!0,o(r)))})),i(e,(function(n){void 0!==a[n]||u(a,n)||(f[n]=!1,o(r))}));else if(5===c){if(l(r)&&(o(r),f.length=!0),a.length<e.length)for(var s=a.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<a.length;v++)f[v]=!0;for(var p=Math.min(a.length,e.length),d=0;d<p;d++)void 0===f[d]&&n(a[d])}}}}(n.p[0]),s(n.p))}})}function D(){function r(n){if(!n||"object"!=typeof n)return n;if(Array.isArray(n))return n.map(r);if(c(n))return new Map(Array.from(n.entries()).map((function(n){return[n[0],r(n[1])]})));if(s(n))return new Set(Array.from(n).map(r));var t=Object.create(Object.getPrototypeOf(n));for(var e in n)t[e]=r(n[e]);return t}function e(n){return t(n)?r(n):n}var f="add";b("Patches",{U:function(t,e){return e.forEach((function(e){for(var i=e.path,u=e.op,c=t,s=0;s<i.length-1;s++)"object"!=typeof(c=a(c,i[s]))&&n(15,i.join("/"));var v=o(c),p=r(e.value),d=i[i.length-1];switch(u){case"replace":switch(v){case 2:return c.set(d,p);case 3:n(16);default:return c[d]=p}case f:switch(v){case 1:return c.splice(d,0,p);case 2:return c.set(d,p);case 3:return c.add(p);default:return c[d]=p}case"remove":switch(v){case 1:return c.splice(d,1);case 2:return c.delete(d);case 3:return c.delete(e.value);default:return delete c[d]}default:n(17,u)}})),t},R:function(n,t,r,o){switch(n.i){case 0:case 4:case 2:return function(n,t,r,o){var c=n.t,s=n.o;i(n.D,(function(n,i){var v=a(c,n),p=a(s,n),d=i?u(c,n)?"replace":f:"remove";if(v!==p||"replace"!==d){var l=t.concat(n);r.push("remove"===d?{op:d,path:l}:{op:d,path:l,value:p}),o.push(d===f?{op:"remove",path:l}:"remove"===d?{op:f,path:l,value:e(v)}:{op:"replace",path:l,value:e(v)})}}))}(n,t,r,o);case 5:case 1:return function(n,t,r,i){var o=n.t,u=n.D,a=n.o;if(a.length<o.length){var c=[a,o];o=c[0],a=c[1];var s=[i,r];r=s[0],i=s[1]}for(var v=a.length-o.length,p=0;o[p]===a[p]&&p<o.length;)++p;for(var d=o.length;d>p&&o[d-1]===a[d+v-1];)--d;for(var l=p;l<d;++l)if(u[l]&&a[l]!==o[l]){var h=t.concat([l]);r.push({op:"replace",path:h,value:e(a[l])}),i.push({op:"replace",path:h,value:e(o[l])})}for(var y=r.length,b=d+v-1;b>=d;--b){var m=t.concat([b]);r[y+b-d]={op:f,path:m,value:e(a[b])},i.push({op:"remove",path:m})}}(n,t,r,o);case 3:return function(n,t,r,e){var i=n.t,o=n.o,u=0;i.forEach((function(n){if(!o.has(n)){var i=t.concat([u]);r.push({op:"remove",path:i,value:n}),e.unshift({op:f,path:i,value:n})}u++})),u=0,o.forEach((function(n){if(!i.has(n)){var o=t.concat([u]);r.push({op:f,path:o,value:n}),e.unshift({op:"remove",path:o,value:n})}u++}))}(n,t,r,o)}},M:function(n,t,r,e){r.push({op:"replace",path:[],value:t}),e.push({op:"replace",path:[],value:n.t})}})}function N(){function t(n,t){function r(){this.constructor=n}u(n,t),n.prototype=(r.prototype=t.prototype,new r)}function e(n){n.o||(n.D=new Map,n.o=new Map(n.t))}function i(n){n.o||(n.o=new Set,n.t.forEach((function(t){if(r(t)){var e=E(n.A.h,t,n);n.p.set(t,e),n.o.add(e)}else n.o.add(t)})))}function o(t){t.O&&n(3,JSON.stringify(v(t)))}var u=function(n,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])})(n,t)},a=function(){function n(n,t){return this[G]={i:2,l:t,A:t?t.A:m(),P:!1,I:!1,o:void 0,D:void 0,t:n,k:this,C:!1,O:!1},this}t(n,Map);var i=n.prototype;return Object.defineProperty(i,"size",{get:function(){return v(this[G]).size}}),i.has=function(n){return v(this[G]).has(n)},i.set=function(n,t){var r=this[G];return o(r),v(r).get(n)!==t&&(e(r),k(r.A.h,r),r.D.set(n,!0),r.o.set(n,t),r.D.set(n,!0)),this},i.delete=function(n){if(!this.has(n))return!1;var t=this[G];return o(t),e(t),k(t.A.h,t),t.D.set(n,!1),t.o.delete(n),!0},i.clear=function(){var n=this[G];return o(n),e(n),k(n.A.h,n),n.D=new Map,n.o.clear()},i.forEach=function(n,t){var r=this;v(this[G]).forEach((function(e,i){n.call(t,r.get(i),i,r)}))},i.get=function(n){var t=this[G];o(t);var i=v(t).get(n);if(t.I||!r(i))return i;if(i!==t.t.get(n))return i;var u=E(t.A.h,i,t);return e(t),t.o.set(n,u),u},i.keys=function(){return v(this[G]).keys()},i.values=function(){var n,t=this,r=this.keys();return(n={})[H]=function(){return t.values()},n.next=function(){var n=r.next();return n.done?n:{done:!1,value:t.get(n.value)}},n},i.entries=function(){var n,t=this,r=this.keys();return(n={})[H]=function(){return t.entries()},n.next=function(){var n=r.next();if(n.done)return n;var e=t.get(n.value);return{done:!1,value:[n.value,e]}},n},i[H]=function(){return this.entries()},n}(),f=function(){function n(n,t){return this[G]={i:3,l:t,A:t?t.A:m(),P:!1,I:!1,o:void 0,t:n,k:this,p:new Map,O:!1,C:!1},this}t(n,Set);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return v(this[G]).size}}),r.has=function(n){var t=this[G];return o(t),t.o?!!t.o.has(n)||!(!t.p.has(n)||!t.o.has(t.p.get(n))):t.t.has(n)},r.add=function(n){var t=this[G];return o(t),this.has(n)||(i(t),k(t.A.h,t),t.o.add(n)),this},r.delete=function(n){if(!this.has(n))return!1;var t=this[G];return o(t),i(t),k(t.A.h,t),t.o.delete(n)||!!t.p.has(n)&&t.o.delete(t.p.get(n))},r.clear=function(){var n=this[G];return o(n),i(n),k(n.A.h,n),n.o.clear()},r.values=function(){var n=this[G];return o(n),i(n),n.o.values()},r.entries=function(){var n=this[G];return o(n),i(n),n.o.entries()},r.keys=function(){return this.values()},r[H]=function(){return this.values()},r.forEach=function(n,t){for(var r=this.values(),e=r.next();!e.done;)n.call(t,e.value,e.value,this),e=r.next()},n}();b("MapSet",{T:function(n,t){return new a(n,t)},F:function(n,t){return new f(n,t)}})}function T(){R(),N(),D()}function F(n){return n}function C(n){return n}var J,K,$="undefined"!=typeof Symbol,U="undefined"!=typeof Map,W="undefined"!=typeof Set,X="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,q=$?Symbol("immer-nothing"):((J={})["immer-nothing"]=!0,J),B=$?Symbol("immer-draftable"):"__$immer_draftable",G=$?Symbol("immer-state"):"__$immer_state",H=$?Symbol.iterator:"@@iterator",L={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return"Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return"Unsupported patch operation: "+n},18:function(n){return"The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},19:function(n){return"plugin not loaded: "+n},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available"},Q="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,V={},Y={get:function(n,t){if(t===G)return n;var e=n.p;if(!n.P&&u(e,t))return e[t];var i=v(n)[t];if(n.I||!r(i))return i;if(n.P){if(i!==z(n.t,t))return i;e=n.o}return e[t]=E(n.A.h,i,n)},has:function(n,t){return t in v(n)},ownKeys:function(n){return Reflect.ownKeys(v(n))},set:function(n,t,r){if(!n.P){var e=z(n.t,t);if(r?f(e,r)||r===n.p[t]:f(e,r)&&t in n.t)return!0;I(n),x(n)}return n.D[t]=!0,n.o[t]=r,!0},deleteProperty:function(n,t){return void 0!==z(n.t,t)||t in n.t?(n.D[t]=!1,I(n),x(n)):n.D[t]&&delete n.D[t],n.o&&delete n.o[t],!0},getOwnPropertyDescriptor:function(n,t){var r=v(n),e=Reflect.getOwnPropertyDescriptor(r,t);return e&&(e.writable=!0,e.configurable=1!==n.i||"length"!==t),e},defineProperty:function(){n(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12)}},Z={};i(Y,(function(n,t){Z[n]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Z.deleteProperty=function(t,r){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(r))&&n(13),Y.deleteProperty.call(this,t[0],r)},Z.set=function(t,r,e){return"production"!==process.env.NODE_ENV&&"length"!==r&&isNaN(parseInt(r))&&n(14),Y.set.call(this,t[0],r,e,t[0])};var nn=function(){function e(n){this.g=X,this.N="production"!==process.env.NODE_ENV,"boolean"==typeof(null==n?void 0:n.useProxies)&&this.setUseProxies(n.useProxies),"boolean"==typeof(null==n?void 0:n.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var i=e.prototype;return i.produce=function(t,e,i){if("function"==typeof t&&"function"!=typeof e){var o=e;e=t;var u=this;return function(n){var t=this;void 0===n&&(n=o);for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return u.produce(n,(function(n){var r;return(r=e).call.apply(r,[t,n].concat(i))}))}}var a;if("function"!=typeof e&&n(6),void 0!==i&&"function"!=typeof i&&n(7),r(t)){var f=g(this),c=E(this,t,void 0),s=!0;try{a=e(c),s=!1}finally{s?j(f):O(f)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(n){return _(f,i),S(n,f)}),(function(n){throw j(f),n})):(_(f,i),S(a,f))}if((a=e(t))!==q)return void 0===a&&(a=t),this.N&&d(a,!0),a},i.produceWithPatches=function(n,t){var r,e,i=this;return"function"==typeof n?function(t){for(var r=arguments.length,e=Array(r>1?r-1:0),o=1;o<r;o++)e[o-1]=arguments[o];return i.produceWithPatches(t,(function(t){return n.apply(void 0,[t].concat(e))}))}:[this.produce(n,t,(function(n,t){r=n,e=t})),r,e]},i.createDraft=function(t){r(t)||n(8);var e=g(this),i=E(this,t,void 0);return i[G].C=!0,O(e),i},i.finishDraft=function(t,r){var e=t&&t[G];"production"!==process.env.NODE_ENV&&(e&&e.C||n(9),e.I&&n(10));var i=e.A;return _(i,r),S(void 0,i)},i.setAutoFreeze=function(n){this.N=n},i.setUseProxies=function(t){X||n(20),this.g=t},i.applyPatches=function(n,r){var e;for(e=r.length-1;e>=0;e--){var i=r[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}var o=y("Patches").U;return t(n)?o(n,r):this.produce(n,(function(n){return o(n,r.slice(e+1))}))},e}(),tn=new nn,rn=tn.produce,en=tn.produceWithPatches.bind(tn),on=tn.setAutoFreeze.bind(tn),un=tn.setUseProxies.bind(tn),an=tn.applyPatches.bind(tn),fn=tn.createDraft.bind(tn),cn=tn.finishDraft.bind(tn);export default rn;export{nn as Immer,an as applyPatches,F as castDraft,C as castImmutable,fn as createDraft,T as enableAllPlugins,R as enableES5,N as enableMapSet,D as enablePatches,cn as finishDraft,B as immerable,t as isDraft,r as isDraftable,q as nothing,e as original,rn as produce,en as produceWithPatches,on as setAutoFreeze,un as setUseProxies};
//# sourceMappingURL=immer.esm.js.map

@@ -1675,5 +1675,3 @@ (function (global, factory) {

if (state.copy_) {
state.copy_.add(value);
} else if (!state.base_.has(value)) {
if (!this.has(value)) {
prepareSetCopy(state);

@@ -1680,0 +1678,0 @@ markChanged(state.scope_.immer_, state);

@@ -1,2 +0,2 @@

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).immer={})}(this,(function(n){function t(n){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;e<t;e++)r[e-1]=arguments[e];throw Error("[Immer] minified error nr: "+n+(r.length?" "+r.join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function r(n){return!!n&&!!n[B]}function e(n){return!!n&&(function(n){if(!n||"object"!=typeof n)return!1;var t=Object.getPrototypeOf(n);return!t||t===Object.prototype}(n)||Array.isArray(n)||!!n[q]||!!n.constructor[q]||c(n)||v(n))}function i(n,t,r){void 0===r&&(r=!1),0===u(n)?(r?Object.keys:H)(n).forEach((function(r){return t(r,n[r],n)})):n.forEach((function(r,e){return t(e,r,n)}))}function u(n){var t=n[B];return t?t.t>3?t.t-4:t.t:Array.isArray(n)?1:c(n)?2:v(n)?3:0}function o(n,t){return 2===u(n)?n.has(t):Object.prototype.hasOwnProperty.call(n,t)}function f(n,t){return 2===u(n)?n.get(t):n[t]}function a(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function c(n){return C&&n instanceof Map}function v(n){return I&&n instanceof Set}function s(n){return n.i||n.u}function p(n,r){if(void 0===r&&(r=!1),Array.isArray(n))return n.slice();var e=Object.create(Object.getPrototypeOf(n));return i(n,(function(i){if(i!==B){var u=Object.getOwnPropertyDescriptor(n,i),o=u.value;u.get&&(r||t(1),o=u.get.call(n)),u.enumerable?e[i]=o:Object.defineProperty(e,i,{value:o,writable:!0,configurable:!0})}})),e}function h(n,t){r(n)||d(n)||!e(n)||(u(n)>1&&(n.set=n.add=n.clear=n.delete=l),Object.freeze(n),t&&i(n,(function(n,t){return h(t,!0)}),!0))}function l(){t(2)}function d(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function _(n){var r=L[n];return r||t(19,n),r}function y(n,t){L[n]=t}function b(){return N}function m(n,t){t&&(_("Patches"),n.o=[],n.v=[],n.s=t)}function j(n){O(n),n.p.forEach(S),n.p=null}function O(n){n===N&&(N=n.h)}function w(n){return N={p:[],h:N,l:n,_:!0,m:0}}function S(n){var t=n[B];0===t.t||1===t.t?t.j():t.O=!0}function P(n,r){r.m=r.p.length;var i=r.p[0],u=void 0!==n&&n!==i;return r.l.S||_("ES5").P(r,n,u),u?(i[B].M&&(j(r),t(4)),e(n)&&(n=M(r,n),r.h||A(r,n)),r.o&&_("Patches").g(i[B],n,r.o,r.v)):n=M(r,i,[]),j(r),r.o&&r.s(r.o,r.v),n!==X?n:void 0}function M(n,t,r){if(d(t))return t;var e=t[B];if(!e)return i(t,(function(i,u){return g(n,e,t,i,u,r)}),!0),t;if(e.A!==n)return t;if(!e.M)return A(n,e.u,!0),e.u;if(!e.R){e.R=!0,e.A.m--;var u=4===e.t||5===e.t?e.i=p(e.k,!0):e.i;i(u,(function(t,i){return g(n,e,u,t,i,r)})),A(n,u,!1),r&&n.o&&_("Patches").F(e,r,n.o,n.v)}return e.i}function g(n,t,i,c,v,s){if(r(v)){var p=M(n,v,s&&t&&3!==t.t&&!o(t.D,c)?s.concat(c):void 0);if(l=c,d=p,2===(_=u(h=i))?h.set(l,d):3===_?(h.delete(l),h.add(d)):h[l]=d,!r(p))return;n._=!1}var h,l,d,_;if((!t||!a(v,f(t.u,c)))&&e(v)){if(!n.l.J&&n.m<1)return;M(n,v),t&&t.A.h||A(n,v)}}function A(n,t,r){void 0===r&&(r=!1),n.l.J&&n._&&h(t,r)}function z(n,t){var r=n[B],e=Reflect.getOwnPropertyDescriptor(r?s(r):n,t);return e&&e.value}function x(n){if(!n.M){if(n.M=!0,0===n.t||1===n.t){var t=n.i=p(n.u);i(n.p,(function(n,r){t[n]=r})),n.p=void 0}n.h&&x(n.h)}}function E(n){n.i||(n.i=p(n.u))}function R(n,t,r){var e=c(t)?_("MapSet").K(t,r):v(t)?_("MapSet").N(t,r):n.S?function(n,t){var r=Array.isArray(n),e={t:r?1:0,A:t?t.A:b(),M:!1,R:!1,D:{},h:t,u:n,k:null,p:{},i:null,j:null,$:!1},i=e,u=Q;r&&(i=[e],u=T);var o=Proxy.revocable(i,u),f=o.revoke,a=o.proxy;return e.k=a,e.j=f,a}(t,r):_("ES5").C(t,r);return(r?r.A:b()).p.push(e),e}function k(n,t){n.S?x(t):_("ES5").I(t)}function F(){function n(n,t){var r=n[B];if(r&&!r.W){r.W=!0;var e=n[t];return r.W=!1,e}return n[t]}function u(n){n.M||(n.M=!0,n.h&&u(n.h))}function f(n){n.i||(n.i=c(n.u))}function c(n){var t=n&&n[B];if(t){t.W=!0;var r=p(t.k,!0);return t.W=!1,r}return p(n)}function v(n){for(var t=n.length-1;t>=0;t--){var r=n[t][B];if(!r.M)switch(r.t){case 5:l(r)&&u(r);break;case 4:h(r)&&u(r)}}}function h(n){for(var t=n.u,r=n.k,e=Object.keys(r),i=e.length-1;i>=0;i--){var u=e[i],f=t[u];if(void 0===f&&!o(t,u))return!0;var c=r[u],v=c&&c[B];if(v?v.u!==f:!a(c,f))return!0}return e.length!==Object.keys(t).length}function l(n){var t=n.k;if(t.length!==n.u.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}function d(n){n.O&&t(3,JSON.stringify(s(n)))}var _={};y("ES5",{C:function(t,r){var o=Array.isArray(t),v=c(t);i(v,(function(r){!function(t,r,i){var o=_[r];o?o.enumerable=i:_[r]=o={enumerable:i,get:function(){return function(t,r){d(t);var i=n(s(t),r);return t.W?i:i===n(t.u,r)&&e(i)?(f(t),t.i[r]=R(t.A.l,i,t)):i}(this[B],r)},set:function(t){!function(t,r,e){if(d(t),t.D[r]=!0,!t.M){if(a(e,n(s(t),r)))return;u(t),f(t)}t.i[r]=e}(this[B],r,t)}},Object.defineProperty(t,r,o)}(v,r,o||function(n,t){var r=Object.getOwnPropertyDescriptor(n,t);return!(!r||!r.enumerable)}(t,r))}));var p={t:o?5:4,A:r?r.A:b(),M:!1,W:!1,R:!1,D:{},h:r,u:t,k:v,i:null,O:!1,$:!1};return Object.defineProperty(v,B,{value:p,writable:!0}),v},I:u,P:function(n,t,e){n.p.forEach((function(n){n[B].W=!0})),e?r(t)&&t[B].A===n&&v(n.p):(n.o&&function n(t){if(t&&"object"==typeof t){var r=t[B];if(r){var e=r.u,f=r.k,a=r.D,c=r.t;if(4===c)i(f,(function(t){t!==B&&(void 0!==e[t]||o(e,t)?a[t]||n(f[t]):(a[t]=!0,u(r)))})),i(e,(function(n){void 0!==f[n]||o(f,n)||(a[n]=!1,u(r))}));else if(5===c){if(l(r)&&(u(r),a.length=!0),f.length<e.length)for(var v=f.length;v<e.length;v++)a[v]=!1;else for(var s=e.length;s<f.length;s++)a[s]=!0;for(var p=Math.min(f.length,e.length),h=0;h<p;h++)void 0===a[h]&&n(f[h])}}}}(n.p[0]),v(n.p))}})}function D(){function n(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(n);if(c(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],n(t[1])]})));if(v(t))return new Set(Array.from(t).map(n));var r=Object.create(Object.getPrototypeOf(t));for(var e in t)r[e]=n(t[e]);return r}function e(t){return r(t)?n(t):t}var a="add";y("Patches",{X:function(r,e){return e.forEach((function(e){for(var i=e.path,o=e.op,c=r,v=0;v<i.length-1;v++)"object"!=typeof(c=f(c,i[v]))&&t(15,i.join("/"));var s=u(c),p=n(e.value),h=i[i.length-1];switch(o){case"replace":switch(s){case 2:return c.set(h,p);case 3:t(16);default:return c[h]=p}case a:switch(s){case 1:return c.splice(h,0,p);case 2:return c.set(h,p);case 3:return c.add(p);default:return c[h]=p}case"remove":switch(s){case 1:return c.splice(h,1);case 2:return c.delete(h);case 3:return c.delete(e.value);default:return delete c[h]}default:t(17,o)}})),r},F:function(n,t,r,u){switch(n.t){case 0:case 4:case 2:return function(n,t,r,u){var c=n.u,v=n.i;i(n.D,(function(n,i){var s=f(c,n),p=f(v,n),h=i?o(c,n)?"replace":a:"remove";if(s!==p||"replace"!==h){var l=t.concat(n);r.push("remove"===h?{op:h,path:l}:{op:h,path:l,value:p}),u.push(h===a?{op:"remove",path:l}:"remove"===h?{op:a,path:l,value:e(s)}:{op:"replace",path:l,value:e(s)})}}))}(n,t,r,u);case 5:case 1:return function(n,t,r,i){var u=n.u,o=n.D,f=n.i;if(f.length<u.length){var c=[f,u];u=c[0],f=c[1];var v=[i,r];r=v[0],i=v[1]}for(var s=f.length-u.length,p=0;u[p]===f[p]&&p<u.length;)++p;for(var h=u.length;h>p&&u[h-1]===f[h+s-1];)--h;for(var l=p;l<h;++l)if(o[l]&&f[l]!==u[l]){var d=t.concat([l]);r.push({op:"replace",path:d,value:e(f[l])}),i.push({op:"replace",path:d,value:e(u[l])})}for(var _=r.length,y=h+s-1;y>=h;--y){var b=t.concat([y]);r[_+y-h]={op:a,path:b,value:e(f[y])},i.push({op:"remove",path:b})}}(n,t,r,u);case 3:return function(n,t,r,e){var i=n.u,u=n.i,o=0;i.forEach((function(n){if(!u.has(n)){var i=t.concat([o]);r.push({op:"remove",path:i,value:n}),e.unshift({op:a,path:i,value:n})}o++})),o=0,u.forEach((function(n){if(!i.has(n)){var u=t.concat([o]);r.push({op:a,path:u,value:n}),e.unshift({op:"remove",path:u,value:n})}o++}))}(n,t,r,u)}},g:function(n,t,r,e){r.push({op:"replace",path:[],value:t}),e.push({op:"replace",path:[],value:n.u})}})}function J(){function n(n,t){function r(){this.constructor=n}o(n,t),n.prototype=(r.prototype=t.prototype,new r)}function r(n){n.i||(n.D=new Map,n.i=new Map(n.u))}function i(n){n.i||(n.i=new Set,n.u.forEach((function(t){if(e(t)){var r=R(n.A.l,t,n);n.p.set(t,r),n.i.add(r)}else n.i.add(t)})))}function u(n){n.O&&t(3,JSON.stringify(s(n)))}var o=function(n,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])})(n,t)},f=function(){function t(n,t){return this[B]={t:2,h:t,A:t?t.A:b(),M:!1,R:!1,i:void 0,D:void 0,u:n,k:this,$:!1,O:!1},this}n(t,Map);var i=t.prototype;return Object.defineProperty(i,"size",{get:function(){return s(this[B]).size}}),i.has=function(n){return s(this[B]).has(n)},i.set=function(n,t){var e=this[B];return u(e),s(e).get(n)!==t&&(r(e),k(e.A.l,e),e.D.set(n,!0),e.i.set(n,t),e.D.set(n,!0)),this},i.delete=function(n){if(!this.has(n))return!1;var t=this[B];return u(t),r(t),k(t.A.l,t),t.D.set(n,!1),t.i.delete(n),!0},i.clear=function(){var n=this[B];return u(n),r(n),k(n.A.l,n),n.D=new Map,n.i.clear()},i.forEach=function(n,t){var r=this;s(this[B]).forEach((function(e,i){n.call(t,r.get(i),i,r)}))},i.get=function(n){var t=this[B];u(t);var i=s(t).get(n);if(t.R||!e(i))return i;if(i!==t.u.get(n))return i;var o=R(t.A.l,i,t);return r(t),t.i.set(n,o),o},i.keys=function(){return s(this[B]).keys()},i.values=function(){var n,t=this,r=this.keys();return(n={})[G]=function(){return t.values()},n.next=function(){var n=r.next();return n.done?n:{done:!1,value:t.get(n.value)}},n},i.entries=function(){var n,t=this,r=this.keys();return(n={})[G]=function(){return t.entries()},n.next=function(){var n=r.next();if(n.done)return n;var e=t.get(n.value);return{done:!1,value:[n.value,e]}},n},i[G]=function(){return this.entries()},t}(),a=function(){function t(n,t){return this[B]={t:3,h:t,A:t?t.A:b(),M:!1,R:!1,i:void 0,u:n,k:this,p:new Map,O:!1,$:!1},this}n(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return s(this[B]).size}}),r.has=function(n){var t=this[B];return u(t),t.i?!!t.i.has(n)||!(!t.p.has(n)||!t.i.has(t.p.get(n))):t.u.has(n)},r.add=function(n){var t=this[B];return u(t),t.i?t.i.add(n):t.u.has(n)||(i(t),k(t.A.l,t),t.i.add(n)),this},r.delete=function(n){if(!this.has(n))return!1;var t=this[B];return u(t),i(t),k(t.A.l,t),t.i.delete(n)||!!t.p.has(n)&&t.i.delete(t.p.get(n))},r.clear=function(){var n=this[B];return u(n),i(n),k(n.A.l,n),n.i.clear()},r.values=function(){var n=this[B];return u(n),i(n),n.i.values()},r.entries=function(){var n=this[B];return u(n),i(n),n.i.entries()},r.keys=function(){return this.values()},r[G]=function(){return this.values()},r.forEach=function(n,t){for(var r=this.values(),e=r.next();!e.done;)n.call(t,e.value,e.value,this),e=r.next()},t}();y("MapSet",{K:function(n,t){return new f(n,t)},N:function(n,t){return new a(n,t)}})}var K,N,$="undefined"!=typeof Symbol,C="undefined"!=typeof Map,I="undefined"!=typeof Set,W="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,X=$?Symbol("immer-nothing"):((K={})["immer-nothing"]=!0,K),q=$?Symbol("immer-draftable"):"__$immer_draftable",B=$?Symbol("immer-state"):"__$immer_state",G=$?Symbol.iterator:"@@iterator",H="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,L={},Q={get:function(n,t){if(t===B)return n;var r=n.p;if(!n.M&&o(r,t))return r[t];var i=s(n)[t];if(n.R||!e(i))return i;if(n.M){if(i!==z(n.u,t))return i;r=n.i}return r[t]=R(n.A.l,i,n)},has:function(n,t){return t in s(n)},ownKeys:function(n){return Reflect.ownKeys(s(n))},set:function(n,t,r){if(!n.M){var e=z(n.u,t);if(r?a(e,r)||r===n.p[t]:a(e,r)&&t in n.u)return!0;E(n),x(n)}return n.D[t]=!0,n.i[t]=r,!0},deleteProperty:function(n,t){return void 0!==z(n.u,t)||t in n.u?(n.D[t]=!1,E(n),x(n)):n.D[t]&&delete n.D[t],n.i&&delete n.i[t],!0},getOwnPropertyDescriptor:function(n,t){var r=s(n),e=Reflect.getOwnPropertyDescriptor(r,t);return e&&(e.writable=!0,e.configurable=1!==n.t||"length"!==t),e},defineProperty:function(){t(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.u)},setPrototypeOf:function(){t(12)}},T={};i(Q,(function(n,t){T[n]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),T.deleteProperty=function(n,t){return Q.deleteProperty.call(this,n[0],t)},T.set=function(n,t,r){return Q.set.call(this,n[0],t,r,n[0])};var U=function(){function n(n){this.S=W,this.J=!1,"boolean"==typeof(null==n?void 0:n.useProxies)&&this.setUseProxies(n.useProxies),"boolean"==typeof(null==n?void 0:n.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var i=n.prototype;return i.produce=function(n,r,i){if("function"==typeof n&&"function"!=typeof r){var u=r;r=n;var o=this;return function(n){var t=this;void 0===n&&(n=u);for(var e=arguments.length,i=Array(e>1?e-1:0),f=1;f<e;f++)i[f-1]=arguments[f];return o.produce(n,(function(n){var e;return(e=r).call.apply(e,[t,n].concat(i))}))}}var f;if("function"!=typeof r&&t(6),void 0!==i&&"function"!=typeof i&&t(7),e(n)){var a=w(this),c=R(this,n,void 0),v=!0;try{f=r(c),v=!1}finally{v?j(a):O(a)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return m(a,i),P(n,a)}),(function(n){throw j(a),n})):(m(a,i),P(f,a))}if((f=r(n))!==X)return void 0===f&&(f=n),this.J&&h(f,!0),f},i.produceWithPatches=function(n,t){var r,e,i=this;return"function"==typeof n?function(t){for(var r=arguments.length,e=Array(r>1?r-1:0),u=1;u<r;u++)e[u-1]=arguments[u];return i.produceWithPatches(t,(function(t){return n.apply(void 0,[t].concat(e))}))}:[this.produce(n,t,(function(n,t){r=n,e=t})),r,e]},i.createDraft=function(n){e(n)||t(8);var r=w(this),i=R(this,n,void 0);return i[B].$=!0,O(r),i},i.finishDraft=function(n,t){var r=(n&&n[B]).A;return m(r,t),P(void 0,r)},i.setAutoFreeze=function(n){this.J=n},i.setUseProxies=function(n){W||t(20),this.S=n},i.applyPatches=function(n,t){var e;for(e=t.length-1;e>=0;e--){var i=t[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}var u=_("Patches").X;return r(n)?u(n,t):this.produce(n,(function(n){return u(n,t.slice(e+1))}))},n}(),V=new U,Y=V.produce,Z=V.produceWithPatches.bind(V),nn=V.setAutoFreeze.bind(V),tn=V.setUseProxies.bind(V),rn=V.applyPatches.bind(V),en=V.createDraft.bind(V),un=V.finishDraft.bind(V);n.Immer=U,n.applyPatches=rn,n.castDraft=function(n){return n},n.castImmutable=function(n){return n},n.createDraft=en,n.default=Y,n.enableAllPlugins=function(){F(),J(),D()},n.enableES5=F,n.enableMapSet=J,n.enablePatches=D,n.finishDraft=un,n.immerable=q,n.isDraft=r,n.isDraftable=e,n.nothing=X,n.original=function(n){if(n&&n[B])return n[B].u},n.produce=Y,n.produceWithPatches=Z,n.setAutoFreeze=nn,n.setUseProxies=tn,Object.defineProperty(n,"__esModule",{value:!0})}));
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).immer={})}(this,(function(n){function t(n){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;e<t;e++)r[e-1]=arguments[e];throw Error("[Immer] minified error nr: "+n+(r.length?" "+r.join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function r(n){return!!n&&!!n[B]}function e(n){return!!n&&(function(n){if(!n||"object"!=typeof n)return!1;var t=Object.getPrototypeOf(n);return!t||t===Object.prototype}(n)||Array.isArray(n)||!!n[q]||!!n.constructor[q]||c(n)||v(n))}function i(n,t,r){void 0===r&&(r=!1),0===u(n)?(r?Object.keys:H)(n).forEach((function(r){return t(r,n[r],n)})):n.forEach((function(r,e){return t(e,r,n)}))}function u(n){var t=n[B];return t?t.t>3?t.t-4:t.t:Array.isArray(n)?1:c(n)?2:v(n)?3:0}function o(n,t){return 2===u(n)?n.has(t):Object.prototype.hasOwnProperty.call(n,t)}function f(n,t){return 2===u(n)?n.get(t):n[t]}function a(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function c(n){return C&&n instanceof Map}function v(n){return I&&n instanceof Set}function s(n){return n.i||n.u}function p(n,r){if(void 0===r&&(r=!1),Array.isArray(n))return n.slice();var e=Object.create(Object.getPrototypeOf(n));return i(n,(function(i){if(i!==B){var u=Object.getOwnPropertyDescriptor(n,i),o=u.value;u.get&&(r||t(1),o=u.get.call(n)),u.enumerable?e[i]=o:Object.defineProperty(e,i,{value:o,writable:!0,configurable:!0})}})),e}function h(n,t){r(n)||d(n)||!e(n)||(u(n)>1&&(n.set=n.add=n.clear=n.delete=l),Object.freeze(n),t&&i(n,(function(n,t){return h(t,!0)}),!0))}function l(){t(2)}function d(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function _(n){var r=L[n];return r||t(19,n),r}function y(n,t){L[n]=t}function b(){return N}function m(n,t){t&&(_("Patches"),n.o=[],n.v=[],n.s=t)}function j(n){O(n),n.p.forEach(S),n.p=null}function O(n){n===N&&(N=n.h)}function w(n){return N={p:[],h:N,l:n,_:!0,m:0}}function S(n){var t=n[B];0===t.t||1===t.t?t.j():t.O=!0}function P(n,r){r.m=r.p.length;var i=r.p[0],u=void 0!==n&&n!==i;return r.l.S||_("ES5").P(r,n,u),u?(i[B].M&&(j(r),t(4)),e(n)&&(n=M(r,n),r.h||A(r,n)),r.o&&_("Patches").g(i[B],n,r.o,r.v)):n=M(r,i,[]),j(r),r.o&&r.s(r.o,r.v),n!==X?n:void 0}function M(n,t,r){if(d(t))return t;var e=t[B];if(!e)return i(t,(function(i,u){return g(n,e,t,i,u,r)}),!0),t;if(e.A!==n)return t;if(!e.M)return A(n,e.u,!0),e.u;if(!e.R){e.R=!0,e.A.m--;var u=4===e.t||5===e.t?e.i=p(e.k,!0):e.i;i(u,(function(t,i){return g(n,e,u,t,i,r)})),A(n,u,!1),r&&n.o&&_("Patches").F(e,r,n.o,n.v)}return e.i}function g(n,t,i,c,v,s){if(r(v)){var p=M(n,v,s&&t&&3!==t.t&&!o(t.D,c)?s.concat(c):void 0);if(l=c,d=p,2===(_=u(h=i))?h.set(l,d):3===_?(h.delete(l),h.add(d)):h[l]=d,!r(p))return;n._=!1}var h,l,d,_;if((!t||!a(v,f(t.u,c)))&&e(v)){if(!n.l.J&&n.m<1)return;M(n,v),t&&t.A.h||A(n,v)}}function A(n,t,r){void 0===r&&(r=!1),n.l.J&&n._&&h(t,r)}function z(n,t){var r=n[B],e=Reflect.getOwnPropertyDescriptor(r?s(r):n,t);return e&&e.value}function x(n){if(!n.M){if(n.M=!0,0===n.t||1===n.t){var t=n.i=p(n.u);i(n.p,(function(n,r){t[n]=r})),n.p=void 0}n.h&&x(n.h)}}function E(n){n.i||(n.i=p(n.u))}function R(n,t,r){var e=c(t)?_("MapSet").K(t,r):v(t)?_("MapSet").N(t,r):n.S?function(n,t){var r=Array.isArray(n),e={t:r?1:0,A:t?t.A:b(),M:!1,R:!1,D:{},h:t,u:n,k:null,p:{},i:null,j:null,$:!1},i=e,u=Q;r&&(i=[e],u=T);var o=Proxy.revocable(i,u),f=o.revoke,a=o.proxy;return e.k=a,e.j=f,a}(t,r):_("ES5").C(t,r);return(r?r.A:b()).p.push(e),e}function k(n,t){n.S?x(t):_("ES5").I(t)}function F(){function n(n,t){var r=n[B];if(r&&!r.W){r.W=!0;var e=n[t];return r.W=!1,e}return n[t]}function u(n){n.M||(n.M=!0,n.h&&u(n.h))}function f(n){n.i||(n.i=c(n.u))}function c(n){var t=n&&n[B];if(t){t.W=!0;var r=p(t.k,!0);return t.W=!1,r}return p(n)}function v(n){for(var t=n.length-1;t>=0;t--){var r=n[t][B];if(!r.M)switch(r.t){case 5:l(r)&&u(r);break;case 4:h(r)&&u(r)}}}function h(n){for(var t=n.u,r=n.k,e=Object.keys(r),i=e.length-1;i>=0;i--){var u=e[i],f=t[u];if(void 0===f&&!o(t,u))return!0;var c=r[u],v=c&&c[B];if(v?v.u!==f:!a(c,f))return!0}return e.length!==Object.keys(t).length}function l(n){var t=n.k;if(t.length!==n.u.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}function d(n){n.O&&t(3,JSON.stringify(s(n)))}var _={};y("ES5",{C:function(t,r){var o=Array.isArray(t),v=c(t);i(v,(function(r){!function(t,r,i){var o=_[r];o?o.enumerable=i:_[r]=o={enumerable:i,get:function(){return function(t,r){d(t);var i=n(s(t),r);return t.W?i:i===n(t.u,r)&&e(i)?(f(t),t.i[r]=R(t.A.l,i,t)):i}(this[B],r)},set:function(t){!function(t,r,e){if(d(t),t.D[r]=!0,!t.M){if(a(e,n(s(t),r)))return;u(t),f(t)}t.i[r]=e}(this[B],r,t)}},Object.defineProperty(t,r,o)}(v,r,o||function(n,t){var r=Object.getOwnPropertyDescriptor(n,t);return!(!r||!r.enumerable)}(t,r))}));var p={t:o?5:4,A:r?r.A:b(),M:!1,W:!1,R:!1,D:{},h:r,u:t,k:v,i:null,O:!1,$:!1};return Object.defineProperty(v,B,{value:p,writable:!0}),v},I:u,P:function(n,t,e){n.p.forEach((function(n){n[B].W=!0})),e?r(t)&&t[B].A===n&&v(n.p):(n.o&&function n(t){if(t&&"object"==typeof t){var r=t[B];if(r){var e=r.u,f=r.k,a=r.D,c=r.t;if(4===c)i(f,(function(t){t!==B&&(void 0!==e[t]||o(e,t)?a[t]||n(f[t]):(a[t]=!0,u(r)))})),i(e,(function(n){void 0!==f[n]||o(f,n)||(a[n]=!1,u(r))}));else if(5===c){if(l(r)&&(u(r),a.length=!0),f.length<e.length)for(var v=f.length;v<e.length;v++)a[v]=!1;else for(var s=e.length;s<f.length;s++)a[s]=!0;for(var p=Math.min(f.length,e.length),h=0;h<p;h++)void 0===a[h]&&n(f[h])}}}}(n.p[0]),v(n.p))}})}function D(){function n(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(n);if(c(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],n(t[1])]})));if(v(t))return new Set(Array.from(t).map(n));var r=Object.create(Object.getPrototypeOf(t));for(var e in t)r[e]=n(t[e]);return r}function e(t){return r(t)?n(t):t}var a="add";y("Patches",{X:function(r,e){return e.forEach((function(e){for(var i=e.path,o=e.op,c=r,v=0;v<i.length-1;v++)"object"!=typeof(c=f(c,i[v]))&&t(15,i.join("/"));var s=u(c),p=n(e.value),h=i[i.length-1];switch(o){case"replace":switch(s){case 2:return c.set(h,p);case 3:t(16);default:return c[h]=p}case a:switch(s){case 1:return c.splice(h,0,p);case 2:return c.set(h,p);case 3:return c.add(p);default:return c[h]=p}case"remove":switch(s){case 1:return c.splice(h,1);case 2:return c.delete(h);case 3:return c.delete(e.value);default:return delete c[h]}default:t(17,o)}})),r},F:function(n,t,r,u){switch(n.t){case 0:case 4:case 2:return function(n,t,r,u){var c=n.u,v=n.i;i(n.D,(function(n,i){var s=f(c,n),p=f(v,n),h=i?o(c,n)?"replace":a:"remove";if(s!==p||"replace"!==h){var l=t.concat(n);r.push("remove"===h?{op:h,path:l}:{op:h,path:l,value:p}),u.push(h===a?{op:"remove",path:l}:"remove"===h?{op:a,path:l,value:e(s)}:{op:"replace",path:l,value:e(s)})}}))}(n,t,r,u);case 5:case 1:return function(n,t,r,i){var u=n.u,o=n.D,f=n.i;if(f.length<u.length){var c=[f,u];u=c[0],f=c[1];var v=[i,r];r=v[0],i=v[1]}for(var s=f.length-u.length,p=0;u[p]===f[p]&&p<u.length;)++p;for(var h=u.length;h>p&&u[h-1]===f[h+s-1];)--h;for(var l=p;l<h;++l)if(o[l]&&f[l]!==u[l]){var d=t.concat([l]);r.push({op:"replace",path:d,value:e(f[l])}),i.push({op:"replace",path:d,value:e(u[l])})}for(var _=r.length,y=h+s-1;y>=h;--y){var b=t.concat([y]);r[_+y-h]={op:a,path:b,value:e(f[y])},i.push({op:"remove",path:b})}}(n,t,r,u);case 3:return function(n,t,r,e){var i=n.u,u=n.i,o=0;i.forEach((function(n){if(!u.has(n)){var i=t.concat([o]);r.push({op:"remove",path:i,value:n}),e.unshift({op:a,path:i,value:n})}o++})),o=0,u.forEach((function(n){if(!i.has(n)){var u=t.concat([o]);r.push({op:a,path:u,value:n}),e.unshift({op:"remove",path:u,value:n})}o++}))}(n,t,r,u)}},g:function(n,t,r,e){r.push({op:"replace",path:[],value:t}),e.push({op:"replace",path:[],value:n.u})}})}function J(){function n(n,t){function r(){this.constructor=n}o(n,t),n.prototype=(r.prototype=t.prototype,new r)}function r(n){n.i||(n.D=new Map,n.i=new Map(n.u))}function i(n){n.i||(n.i=new Set,n.u.forEach((function(t){if(e(t)){var r=R(n.A.l,t,n);n.p.set(t,r),n.i.add(r)}else n.i.add(t)})))}function u(n){n.O&&t(3,JSON.stringify(s(n)))}var o=function(n,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])})(n,t)},f=function(){function t(n,t){return this[B]={t:2,h:t,A:t?t.A:b(),M:!1,R:!1,i:void 0,D:void 0,u:n,k:this,$:!1,O:!1},this}n(t,Map);var i=t.prototype;return Object.defineProperty(i,"size",{get:function(){return s(this[B]).size}}),i.has=function(n){return s(this[B]).has(n)},i.set=function(n,t){var e=this[B];return u(e),s(e).get(n)!==t&&(r(e),k(e.A.l,e),e.D.set(n,!0),e.i.set(n,t),e.D.set(n,!0)),this},i.delete=function(n){if(!this.has(n))return!1;var t=this[B];return u(t),r(t),k(t.A.l,t),t.D.set(n,!1),t.i.delete(n),!0},i.clear=function(){var n=this[B];return u(n),r(n),k(n.A.l,n),n.D=new Map,n.i.clear()},i.forEach=function(n,t){var r=this;s(this[B]).forEach((function(e,i){n.call(t,r.get(i),i,r)}))},i.get=function(n){var t=this[B];u(t);var i=s(t).get(n);if(t.R||!e(i))return i;if(i!==t.u.get(n))return i;var o=R(t.A.l,i,t);return r(t),t.i.set(n,o),o},i.keys=function(){return s(this[B]).keys()},i.values=function(){var n,t=this,r=this.keys();return(n={})[G]=function(){return t.values()},n.next=function(){var n=r.next();return n.done?n:{done:!1,value:t.get(n.value)}},n},i.entries=function(){var n,t=this,r=this.keys();return(n={})[G]=function(){return t.entries()},n.next=function(){var n=r.next();if(n.done)return n;var e=t.get(n.value);return{done:!1,value:[n.value,e]}},n},i[G]=function(){return this.entries()},t}(),a=function(){function t(n,t){return this[B]={t:3,h:t,A:t?t.A:b(),M:!1,R:!1,i:void 0,u:n,k:this,p:new Map,O:!1,$:!1},this}n(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return s(this[B]).size}}),r.has=function(n){var t=this[B];return u(t),t.i?!!t.i.has(n)||!(!t.p.has(n)||!t.i.has(t.p.get(n))):t.u.has(n)},r.add=function(n){var t=this[B];return u(t),this.has(n)||(i(t),k(t.A.l,t),t.i.add(n)),this},r.delete=function(n){if(!this.has(n))return!1;var t=this[B];return u(t),i(t),k(t.A.l,t),t.i.delete(n)||!!t.p.has(n)&&t.i.delete(t.p.get(n))},r.clear=function(){var n=this[B];return u(n),i(n),k(n.A.l,n),n.i.clear()},r.values=function(){var n=this[B];return u(n),i(n),n.i.values()},r.entries=function(){var n=this[B];return u(n),i(n),n.i.entries()},r.keys=function(){return this.values()},r[G]=function(){return this.values()},r.forEach=function(n,t){for(var r=this.values(),e=r.next();!e.done;)n.call(t,e.value,e.value,this),e=r.next()},t}();y("MapSet",{K:function(n,t){return new f(n,t)},N:function(n,t){return new a(n,t)}})}var K,N,$="undefined"!=typeof Symbol,C="undefined"!=typeof Map,I="undefined"!=typeof Set,W="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,X=$?Symbol("immer-nothing"):((K={})["immer-nothing"]=!0,K),q=$?Symbol("immer-draftable"):"__$immer_draftable",B=$?Symbol("immer-state"):"__$immer_state",G=$?Symbol.iterator:"@@iterator",H="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,L={},Q={get:function(n,t){if(t===B)return n;var r=n.p;if(!n.M&&o(r,t))return r[t];var i=s(n)[t];if(n.R||!e(i))return i;if(n.M){if(i!==z(n.u,t))return i;r=n.i}return r[t]=R(n.A.l,i,n)},has:function(n,t){return t in s(n)},ownKeys:function(n){return Reflect.ownKeys(s(n))},set:function(n,t,r){if(!n.M){var e=z(n.u,t);if(r?a(e,r)||r===n.p[t]:a(e,r)&&t in n.u)return!0;E(n),x(n)}return n.D[t]=!0,n.i[t]=r,!0},deleteProperty:function(n,t){return void 0!==z(n.u,t)||t in n.u?(n.D[t]=!1,E(n),x(n)):n.D[t]&&delete n.D[t],n.i&&delete n.i[t],!0},getOwnPropertyDescriptor:function(n,t){var r=s(n),e=Reflect.getOwnPropertyDescriptor(r,t);return e&&(e.writable=!0,e.configurable=1!==n.t||"length"!==t),e},defineProperty:function(){t(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.u)},setPrototypeOf:function(){t(12)}},T={};i(Q,(function(n,t){T[n]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),T.deleteProperty=function(n,t){return Q.deleteProperty.call(this,n[0],t)},T.set=function(n,t,r){return Q.set.call(this,n[0],t,r,n[0])};var U=function(){function n(n){this.S=W,this.J=!1,"boolean"==typeof(null==n?void 0:n.useProxies)&&this.setUseProxies(n.useProxies),"boolean"==typeof(null==n?void 0:n.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var i=n.prototype;return i.produce=function(n,r,i){if("function"==typeof n&&"function"!=typeof r){var u=r;r=n;var o=this;return function(n){var t=this;void 0===n&&(n=u);for(var e=arguments.length,i=Array(e>1?e-1:0),f=1;f<e;f++)i[f-1]=arguments[f];return o.produce(n,(function(n){var e;return(e=r).call.apply(e,[t,n].concat(i))}))}}var f;if("function"!=typeof r&&t(6),void 0!==i&&"function"!=typeof i&&t(7),e(n)){var a=w(this),c=R(this,n,void 0),v=!0;try{f=r(c),v=!1}finally{v?j(a):O(a)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return m(a,i),P(n,a)}),(function(n){throw j(a),n})):(m(a,i),P(f,a))}if((f=r(n))!==X)return void 0===f&&(f=n),this.J&&h(f,!0),f},i.produceWithPatches=function(n,t){var r,e,i=this;return"function"==typeof n?function(t){for(var r=arguments.length,e=Array(r>1?r-1:0),u=1;u<r;u++)e[u-1]=arguments[u];return i.produceWithPatches(t,(function(t){return n.apply(void 0,[t].concat(e))}))}:[this.produce(n,t,(function(n,t){r=n,e=t})),r,e]},i.createDraft=function(n){e(n)||t(8);var r=w(this),i=R(this,n,void 0);return i[B].$=!0,O(r),i},i.finishDraft=function(n,t){var r=(n&&n[B]).A;return m(r,t),P(void 0,r)},i.setAutoFreeze=function(n){this.J=n},i.setUseProxies=function(n){W||t(20),this.S=n},i.applyPatches=function(n,t){var e;for(e=t.length-1;e>=0;e--){var i=t[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}var u=_("Patches").X;return r(n)?u(n,t):this.produce(n,(function(n){return u(n,t.slice(e+1))}))},n}(),V=new U,Y=V.produce,Z=V.produceWithPatches.bind(V),nn=V.setAutoFreeze.bind(V),tn=V.setUseProxies.bind(V),rn=V.applyPatches.bind(V),en=V.createDraft.bind(V),un=V.finishDraft.bind(V);n.Immer=U,n.applyPatches=rn,n.castDraft=function(n){return n},n.castImmutable=function(n){return n},n.createDraft=en,n.default=Y,n.enableAllPlugins=function(){F(),J(),D()},n.enableES5=F,n.enableMapSet=J,n.enablePatches=D,n.finishDraft=un,n.immerable=q,n.isDraft=r,n.isDraftable=e,n.nothing=X,n.original=function(n){if(n&&n[B])return n[B].u},n.produce=Y,n.produceWithPatches=Z,n.setAutoFreeze=nn,n.setUseProxies=tn,Object.defineProperty(n,"__esModule",{value:!0})}));
//# sourceMappingURL=immer.umd.production.min.js.map
{
"name": "immer",
"version": "6.0.6",
"version": "6.0.7",
"description": "Create your next immutable state by mutating the current one",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -244,5 +244,3 @@ // types only!

assertUnrevoked(state)
if (state.copy_) {
state.copy_.add(value)
} else if (!state.base_.has(value)) {
if (!this.has(value)) {
prepareSetCopy(state)

@@ -249,0 +247,0 @@ markChanged(state.scope_.immer_, state)

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc