redux-astroglide 0.1.20 → 0.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,9 +1,63 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react-redux'), require('react')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react-redux', 'react'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["redux-astroglide"] = {}, global.reactRedux, global.react));
5
- })(this, (function (exports, reactRedux, react) { 'use strict';
6
-
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react-redux')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react-redux'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["redux-astroglide"] = {}, global.reactRedux));
5
+ })(this, (function (exports, reactRedux) { 'use strict';
6
+
7
+ function _arrayLikeToArray(r, a) {
8
+ (null == a || a > r.length) && (a = r.length);
9
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
10
+ return n;
11
+ }
12
+ function _arrayWithoutHoles(r) {
13
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
14
+ }
15
+ function _classCallCheck(a, n) {
16
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
17
+ }
18
+ function _construct(t, e, r) {
19
+ if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
20
+ var o = [null];
21
+ o.push.apply(o, e);
22
+ var p = new (t.bind.apply(t, o))();
23
+ return r && _setPrototypeOf(p, r.prototype), p;
24
+ }
25
+ function _defineProperties(e, r) {
26
+ for (var t = 0; t < r.length; t++) {
27
+ var o = r[t];
28
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
29
+ }
30
+ }
31
+ function _createClass(e, r, t) {
32
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
33
+ writable: !1
34
+ }), e;
35
+ }
36
+ function _defineProperty$1(e, r, t) {
37
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
38
+ value: t,
39
+ enumerable: !0,
40
+ configurable: !0,
41
+ writable: !0
42
+ }) : e[r] = t, e;
43
+ }
44
+ function _isNativeReflectConstruct() {
45
+ try {
46
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
47
+ } catch (t) {}
48
+ return (_isNativeReflectConstruct = function () {
49
+ return !!t;
50
+ })();
51
+ }
52
+ function _iterableToArray(r) {
53
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
54
+ }
55
+ function _nonIterableSpread() {
56
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
57
+ }
58
+ function _objectDestructuringEmpty(t) {
59
+ if (null == t) throw new TypeError("Cannot destructure " + t);
60
+ }
7
61
  function ownKeys$1(e, r) {
8
62
  var t = Object.keys(e);
9
63
  if (Object.getOwnPropertySymbols) {
@@ -25,152 +79,63 @@
25
79
  }
26
80
  return e;
27
81
  }
28
- function _typeof$1(o) {
29
- "@babel/helpers - typeof";
30
-
31
- return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
32
- return typeof o;
33
- } : function (o) {
34
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
35
- }, _typeof$1(o);
36
- }
37
- function _classCallCheck(instance, Constructor) {
38
- if (!(instance instanceof Constructor)) {
39
- throw new TypeError("Cannot call a class as a function");
40
- }
41
- }
42
- function _defineProperties(target, props) {
43
- for (var i = 0; i < props.length; i++) {
44
- var descriptor = props[i];
45
- descriptor.enumerable = descriptor.enumerable || false;
46
- descriptor.configurable = true;
47
- if ("value" in descriptor) descriptor.writable = true;
48
- Object.defineProperty(target, _toPropertyKey$1(descriptor.key), descriptor);
49
- }
50
- }
51
- function _createClass(Constructor, protoProps, staticProps) {
52
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
53
- if (staticProps) _defineProperties(Constructor, staticProps);
54
- Object.defineProperty(Constructor, "prototype", {
55
- writable: false
56
- });
57
- return Constructor;
58
- }
59
- function _defineProperty$1(obj, key, value) {
60
- key = _toPropertyKey$1(key);
61
- if (key in obj) {
62
- Object.defineProperty(obj, key, {
63
- value: value,
64
- enumerable: true,
65
- configurable: true,
66
- writable: true
67
- });
68
- } else {
69
- obj[key] = value;
70
- }
71
- return obj;
72
- }
73
- function _setPrototypeOf(o, p) {
74
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
75
- o.__proto__ = p;
76
- return o;
77
- };
78
- return _setPrototypeOf(o, p);
79
- }
80
- function _isNativeReflectConstruct() {
81
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
82
- if (Reflect.construct.sham) return false;
83
- if (typeof Proxy === "function") return true;
84
- try {
85
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
86
- return true;
87
- } catch (e) {
88
- return false;
82
+ function _objectWithoutProperties(e, t) {
83
+ if (null == e) return {};
84
+ var o,
85
+ r,
86
+ i = _objectWithoutPropertiesLoose(e, t);
87
+ if (Object.getOwnPropertySymbols) {
88
+ var n = Object.getOwnPropertySymbols(e);
89
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
89
90
  }
91
+ return i;
90
92
  }
91
- function _construct(Parent, args, Class) {
92
- if (_isNativeReflectConstruct()) {
93
- _construct = Reflect.construct.bind();
94
- } else {
95
- _construct = function _construct(Parent, args, Class) {
96
- var a = [null];
97
- a.push.apply(a, args);
98
- var Constructor = Function.bind.apply(Parent, a);
99
- var instance = new Constructor();
100
- if (Class) _setPrototypeOf(instance, Class.prototype);
101
- return instance;
102
- };
93
+ function _objectWithoutPropertiesLoose(r, e) {
94
+ if (null == r) return {};
95
+ var t = {};
96
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
97
+ if (-1 !== e.indexOf(n)) continue;
98
+ t[n] = r[n];
103
99
  }
104
- return _construct.apply(null, arguments);
100
+ return t;
105
101
  }
106
- function _objectDestructuringEmpty(obj) {
107
- if (obj == null) throw new TypeError("Cannot destructure " + obj);
102
+ function _setPrototypeOf(t, e) {
103
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
104
+ return t.__proto__ = e, t;
105
+ }, _setPrototypeOf(t, e);
108
106
  }
109
- function _objectWithoutPropertiesLoose(source, excluded) {
110
- if (source == null) return {};
111
- var target = {};
112
- var sourceKeys = Object.keys(source);
113
- var key, i;
114
- for (i = 0; i < sourceKeys.length; i++) {
115
- key = sourceKeys[i];
116
- if (excluded.indexOf(key) >= 0) continue;
117
- target[key] = source[key];
118
- }
119
- return target;
107
+ function _toConsumableArray(r) {
108
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
120
109
  }
121
- function _objectWithoutProperties(source, excluded) {
122
- if (source == null) return {};
123
- var target = _objectWithoutPropertiesLoose(source, excluded);
124
- var key, i;
125
- if (Object.getOwnPropertySymbols) {
126
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
127
- for (i = 0; i < sourceSymbolKeys.length; i++) {
128
- key = sourceSymbolKeys[i];
129
- if (excluded.indexOf(key) >= 0) continue;
130
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
131
- target[key] = source[key];
132
- }
110
+ function _toPrimitive(t, r) {
111
+ if ("object" != typeof t || !t) return t;
112
+ var e = t[Symbol.toPrimitive];
113
+ if (void 0 !== e) {
114
+ var i = e.call(t, r || "default");
115
+ if ("object" != typeof i) return i;
116
+ throw new TypeError("@@toPrimitive must return a primitive value.");
133
117
  }
134
- return target;
135
- }
136
- function _toConsumableArray(arr) {
137
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
118
+ return ("string" === r ? String : Number)(t);
138
119
  }
139
- function _arrayWithoutHoles(arr) {
140
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
120
+ function _toPropertyKey(t) {
121
+ var i = _toPrimitive(t, "string");
122
+ return "symbol" == typeof i ? i : i + "";
141
123
  }
142
- function _iterableToArray(iter) {
143
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
144
- }
145
- function _unsupportedIterableToArray(o, minLen) {
146
- if (!o) return;
147
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
148
- var n = Object.prototype.toString.call(o).slice(8, -1);
149
- if (n === "Object" && o.constructor) n = o.constructor.name;
150
- if (n === "Map" || n === "Set") return Array.from(o);
151
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
152
- }
153
- function _arrayLikeToArray(arr, len) {
154
- if (len == null || len > arr.length) len = arr.length;
155
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
156
- return arr2;
157
- }
158
- function _nonIterableSpread() {
159
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
124
+ function _typeof$1(o) {
125
+ "@babel/helpers - typeof";
126
+
127
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
128
+ return typeof o;
129
+ } : function (o) {
130
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
131
+ }, _typeof$1(o);
160
132
  }
161
- function _toPrimitive$1(input, hint) {
162
- if (typeof input !== "object" || input === null) return input;
163
- var prim = input[Symbol.toPrimitive];
164
- if (prim !== undefined) {
165
- var res = prim.call(input, hint || "default");
166
- if (typeof res !== "object") return res;
167
- throw new TypeError("@@toPrimitive must return a primitive value.");
133
+ function _unsupportedIterableToArray(r, a) {
134
+ if (r) {
135
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
136
+ var t = {}.toString.call(r).slice(8, -1);
137
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
168
138
  }
169
- return (hint === "string" ? String : Number)(input);
170
- }
171
- function _toPropertyKey$1(arg) {
172
- var key = _toPrimitive$1(arg, "string");
173
- return typeof key === "symbol" ? key : String(key);
174
139
  }
175
140
 
176
141
  function n(n){for(var r=arguments.length,t=Array(r>1?r-1:0),e=1;e<r;e++)t[e-1]=arguments[e];if("production"!==process.env.NODE_ENV){var i=Y[n],o=i?"function"==typeof i?i.apply(null,t):i:"unknown error nr: "+n;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+n+(t.length?" "+t.map((function(n){return "'"+n+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function r(n){return !!n&&!!n[Q]}function t(n){var r;return !!n&&(function(n){if(!n||"object"!=typeof n)return !1;var r=Object.getPrototypeOf(n);if(null===r)return !0;var t=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return t===Object||"function"==typeof t&&Function.toString.call(t)===Z}(n)||Array.isArray(n)||!!n[L]||!!(null===(r=n.constructor)||void 0===r?void 0:r[L])||s(n)||v(n))}function i(n,r,t){void 0===t&&(t=!1),0===o(n)?(t?Object.keys:nn)(n).forEach((function(e){t&&"symbol"==typeof e||r(e,n[e],n);})):n.forEach((function(t,e){return r(e,t,n)}));}function o(n){var r=n[Q];return r?r.i>3?r.i-4:r.i:Array.isArray(n)?1:s(n)?2:v(n)?3:0}function u(n,r){return 2===o(n)?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function a(n,r){return 2===o(n)?n.get(r):n[r]}function f(n,r,t){var e=o(n);2===e?n.set(r,t):3===e?n.add(t):n[r]=t;}function c(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var r=rn(n);delete r[Q];for(var t=nn(r),e=0;e<t.length;e++){var i=t[e],o=r[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]});}return Object.create(Object.getPrototypeOf(n),r)}function d(n,e){return void 0===e&&(e=!1),y(n)||r(n)||!t(n)||(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,r){return d(r,!0)}),!0)),n}function h(){n(2);}function y(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function b(r){var t=tn[r];return t||n(18,r),t}function m(n,r){tn[n]||(tn[n]=r);}function _(){return "production"===process.env.NODE_ENV||U||n(0),U}function j(n,r){r&&(b("Patches"),n.u=[],n.s=[],n.v=r);}function g(n){O(n),n.p.forEach(S),n.p=null;}function O(n){n===U&&(U=n.l);}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var r=n[Q];0===r.i||1===r.i?r.j():r.g=!0;}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.O||b("ES5").S(e,r,o),o?(i[Q].P&&(g(e),n(4)),t(r)&&(r=M(e,r),e.l||x(e,r)),e.u&&b("Patches").M(i[Q].t,r,e.u,e.s)):r=M(e,i,[]),g(e),e.u&&e.v(e.u,e.s),r!==H?r:void 0}function M(n,r,t){if(y(r))return r;var e=r[Q];if(!e)return i(r,(function(i,o){return A(n,e,r,i,o,t)}),!0),r;if(e.A!==n)return r;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o,u=o,a=!1;3===e.i&&(u=new Set(o),o.clear(),a=!0),i(u,(function(r,i){return A(n,e,o,r,i,t,a)})),x(n,o,!1),t&&n.u&&b("Patches").N(e,t,n.u,n.s);}return e.o}function A(e,i,o,a,c,s,v){if("production"!==process.env.NODE_ENV&&c===o&&n(5),r(c)){var p=M(e,c,s&&i&&3!==i.i&&!u(i.R,a)?s.concat(a):void 0);if(f(o,a,p),!r(p))return;e.m=!1;}else v&&o.add(c);if(t(c)&&!y(c)){if(!e.h.D&&e._<1)return;M(e,c),i&&i.A.l||x(e,c);}}function x(n,r,t){void 0===t&&(t=!1),!n.l&&n.h.D&&n.m&&d(r,t);}function z(n,r){var t=n[Q];return (t?p(t):n)[r]}function I(n,r){if(r in n)for(var t=Object.getPrototypeOf(n);t;){var e=Object.getOwnPropertyDescriptor(t,r);if(e)return e;t=Object.getPrototypeOf(t);}}function k(n){n.P||(n.P=!0,n.l&&k(n.l));}function E(n){n.o||(n.o=l(n.t));}function N(n,r,t){var e=s(r)?b("MapSet").F(r,t):v(r)?b("MapSet").T(r,t):n.O?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,R:{},l:r,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;t&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(r,t):b("ES5").J(r,t);return (t?t.A:_()).p.push(e),e}function R(e){return r(e)||n(22,e),function n(r){if(!t(r))return r;var e,u=r[Q],c=o(r);if(u){if(!u.P&&(u.i<4||!b("ES5").K(u)))return u.t;u.I=!0,e=D(r,c),u.I=!1;}else e=D(r,c);return i(e,(function(r,t){u&&a(u.t,r)===t||f(e,r,n(t));})),3===c?new Set(e):e}(e)}function D(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function F(){function t(n,r){var t=s[n];return t?t.enumerable=r:s[n]=t={configurable:!0,enumerable:r,get:function(){var r=this[Q];return "production"!==process.env.NODE_ENV&&f(r),en.get(r,n)},set:function(r){var t=this[Q];"production"!==process.env.NODE_ENV&&f(t),en.set(t,n,r);}},t}function e(n){for(var r=n.length-1;r>=0;r--){var t=n[r][Q];if(!t.P)switch(t.i){case 5:a(t)&&k(t);break;case 4:o(t)&&k(t);}}}function o(n){for(var r=n.t,t=n.k,e=nn(t),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q){var a=r[o];if(void 0===a&&!u(r,o))return !0;var f=t[o],s=f&&f[Q];if(s?s.t!==a:!c(f,a))return !0}}var v=!!r[Q];return e.length!==nn(r).length+(v?0:1)}function a(n){var r=n.k;if(r.length!==n.t.length)return !0;var t=Object.getOwnPropertyDescriptor(r,r.length-1);if(t&&!t.get)return !0;for(var e=0;e<r.length;e++)if(!r.hasOwnProperty(e))return !0;return !1}function f(r){r.g&&n(3,JSON.stringify(p(r)));}var s={};m("ES5",{J:function(n,r){var e=Array.isArray(n),i=function(n,r){if(n){for(var e=Array(r.length),i=0;i<r.length;i++)Object.defineProperty(e,""+i,t(i,!0));return e}var o=rn(r);delete o[Q];for(var u=nn(o),a=0;a<u.length;a++){var f=u[a];o[f]=t(f,n||!!o[f].enumerable);}return Object.create(Object.getPrototypeOf(r),o)}(e,n),o={i:e?5:4,A:r?r.A:_(),P:!1,I:!1,R:{},l:r,t:n,k:i,o:null,g:!1,C:!1};return Object.defineProperty(i,Q,{value:o,writable:!0}),i},S:function(n,t,o){o?r(t)&&t[Q].A===n&&e(n.p):(n.u&&function n(r){if(r&&"object"==typeof r){var t=r[Q];if(t){var e=t.t,o=t.k,f=t.R,c=t.i;if(4===c)i(o,(function(r){r!==Q&&(void 0!==e[r]||u(e,r)?f[r]||n(o[r]):(f[r]=!0,k(t)));})),i(e,(function(n){void 0!==o[n]||u(o,n)||(f[n]=!1,k(t));}));else if(5===c){if(a(t)&&(k(t),f.length=!0),o.length<e.length)for(var s=o.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<o.length;v++)f[v]=!0;for(var p=Math.min(o.length,e.length),l=0;l<p;l++)o.hasOwnProperty(l)||(f[l]=!0),void 0===f[l]&&n(o[l]);}}}}(n.p[0]),e(n.p));},K:function(n){return 4===n.i?o(n):a(n)}});}var G,U,W="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),X="undefined"!=typeof Map,q="undefined"!=typeof Set,B="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=W?Symbol.for("immer-nothing"):((G={})["immer-nothing"]=!0,G),L=W?Symbol.for("immer-draftable"):"__$immer_draftable",Q=W?Symbol.for("immer-state"):"__$immer_state",Y={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."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(n){return "produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+n+"'"},22:function(n){return "'current' expects a draft, got: "+n},23:function(n){return "'original' expects a draft, got: "+n},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},Z=""+Object.prototype.constructor,nn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,rn=Object.getOwnPropertyDescriptors||function(n){var r={};return nn(n).forEach((function(t){r[t]=Object.getOwnPropertyDescriptor(n,t);})),r},tn={},en={get:function(n,r){if(r===Q)return n;var e=p(n);if(!u(e,r))return function(n,r,t){var e,i=I(r,t);return i?"value"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,r);var i=e[r];return n.I||!t(i)?i:i===z(n.t,r)?(E(n),n.o[r]=N(n.A.h,i,n)):i},has:function(n,r){return r in p(n)},ownKeys:function(n){return Reflect.ownKeys(p(n))},set:function(n,r,t){var e=I(p(n),r);if(null==e?void 0:e.set)return e.set.call(n.k,t),!0;if(!n.P){var i=z(p(n),r),o=null==i?void 0:i[Q];if(o&&o.t===t)return n.o[r]=t,n.R[r]=!1,!0;if(c(t,i)&&(void 0!==t||u(n.t,r)))return !0;E(n),k(n);}return n.o[r]===t&&(void 0!==t||r in n.o)||Number.isNaN(t)&&Number.isNaN(n.o[r])||(n.o[r]=t,n.R[r]=!0),!0},deleteProperty:function(n,r){return void 0!==z(n.t,r)||r in n.t?(n.R[r]=!1,E(n),k(n)):delete n.R[r],n.o&&delete n.o[r],!0},getOwnPropertyDescriptor:function(n,r){var t=p(n),e=Reflect.getOwnPropertyDescriptor(t,r);return e?{writable:!0,configurable:1!==n.i||"length"!==r,enumerable:e.enumerable,value:t[r]}:e},defineProperty:function(){n(11);},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12);}},on={};i(en,(function(n,r){on[n]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)};})),on.deleteProperty=function(r,t){return "production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&n(13),on.set.call(this,r,t,void 0)},on.set=function(r,t,e){return "production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&n(14),en.set.call(this,r[0],t,e,r[0])};var un=function(){function e(r){var e=this;this.O=B,this.D=!0,this.produce=function(r,i,o){if("function"==typeof r&&"function"!=typeof i){var u=i;i=r;var a=e;return function(n){var r=this;void 0===n&&(n=u);for(var t=arguments.length,e=Array(t>1?t-1:0),o=1;o<t;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var t;return (t=i).call.apply(t,[r,n].concat(e))}))}}var f;if("function"!=typeof i&&n(6),void 0!==o&&"function"!=typeof o&&n(7),t(r)){var c=w(e),s=N(e,r,void 0),v=!0;try{f=i(s),v=!1;}finally{v?g(c):O(c);}return "undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw g(c),n})):(j(c,o),P(f,c))}if(!r||"object"!=typeof r){if(void 0===(f=i(r))&&(f=r),f===H&&(f=void 0),e.D&&d(f,!0),o){var p=[],l=[];b("Patches").M(r,f,p,l),o(p,l);}return f}n(21,r);},this.produceWithPatches=function(n,r){if("function"==typeof n)return function(r){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];return e.produceWithPatches(r,(function(r){return n.apply(void 0,[r].concat(i))}))};var t,i,o=e.produce(n,r,(function(n,r){t=n,i=r;}));return "undefined"!=typeof Promise&&o instanceof Promise?o.then((function(n){return [n,t,i]})):[o,t,i]},"boolean"==typeof(null==r?void 0:r.useProxies)&&this.setUseProxies(r.useProxies),"boolean"==typeof(null==r?void 0:r.autoFreeze)&&this.setAutoFreeze(r.autoFreeze);}var i=e.prototype;return i.createDraft=function(e){t(e)||n(8),r(e)&&(e=R(e));var i=w(this),o=N(this,e,void 0);return o[Q].C=!0,O(i),o},i.finishDraft=function(r,t){var e=r&&r[Q];"production"!==process.env.NODE_ENV&&(e&&e.C||n(9),e.I&&n(10));var i=e.A;return j(i,t),P(void 0,i)},i.setAutoFreeze=function(n){this.D=n;},i.setUseProxies=function(r){r&&!B&&n(20),this.O=r;},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}}e>-1&&(t=t.slice(e+1));var o=b("Patches").$;return r(n)?o(n,t):this.produce(n,(function(n){return o(n,t)}))},e}(),an=new un,fn=an.produce;an.produceWithPatches.bind(an);an.setAutoFreeze.bind(an);an.setUseProxies.bind(an);an.applyPatches.bind(an);an.createDraft.bind(an);an.finishDraft.bind(an);
@@ -185,35 +150,29 @@
185
150
  }, _typeof(o);
186
151
  }
187
152
 
188
- function _toPrimitive(input, hint) {
189
- if (_typeof(input) !== "object" || input === null) return input;
190
- var prim = input[Symbol.toPrimitive];
191
- if (prim !== undefined) {
192
- var res = prim.call(input, hint || "default");
193
- if (_typeof(res) !== "object") return res;
153
+ function toPrimitive(t, r) {
154
+ if ("object" != _typeof(t) || !t) return t;
155
+ var e = t[Symbol.toPrimitive];
156
+ if (void 0 !== e) {
157
+ var i = e.call(t, r || "default");
158
+ if ("object" != _typeof(i)) return i;
194
159
  throw new TypeError("@@toPrimitive must return a primitive value.");
195
160
  }
196
- return (hint === "string" ? String : Number)(input);
161
+ return ("string" === r ? String : Number)(t);
197
162
  }
198
163
 
199
- function _toPropertyKey(arg) {
200
- var key = _toPrimitive(arg, "string");
201
- return _typeof(key) === "symbol" ? key : String(key);
164
+ function toPropertyKey(t) {
165
+ var i = toPrimitive(t, "string");
166
+ return "symbol" == _typeof(i) ? i : i + "";
202
167
  }
203
168
 
204
- function _defineProperty(obj, key, value) {
205
- key = _toPropertyKey(key);
206
- if (key in obj) {
207
- Object.defineProperty(obj, key, {
208
- value: value,
209
- enumerable: true,
210
- configurable: true,
211
- writable: true
212
- });
213
- } else {
214
- obj[key] = value;
215
- }
216
- return obj;
169
+ function _defineProperty(e, r, t) {
170
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
171
+ value: t,
172
+ enumerable: !0,
173
+ configurable: !0,
174
+ writable: !0
175
+ }) : e[r] = t, e;
217
176
  }
218
177
 
219
178
  function ownKeys(e, r) {
@@ -600,7 +559,6 @@
600
559
  throw new Error(message);
601
560
  } catch (e) {} // eslint-disable-line no-empty
602
561
  }
603
-
604
562
  function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
605
563
  var reducerKeys = Object.keys(reducers);
606
564
  var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
@@ -2146,7 +2104,7 @@
2146
2104
  };
2147
2105
  });
2148
2106
  var displayedWarning = false;
2149
- var AC = typeof AbortController !== "undefined" ? AbortController : ( /** @class */function () {
2107
+ var AC = typeof AbortController !== "undefined" ? AbortController : (/** @class */function () {
2150
2108
  function class_1() {
2151
2109
  this.signal = {
2152
2110
  aborted: false,
@@ -4347,14 +4305,14 @@
4347
4305
  root = _root;
4348
4306
 
4349
4307
  /* Built-in method references that are verified to be native. */
4350
- var WeakMap$1 = getNative(root, 'WeakMap');
4351
- var _WeakMap = WeakMap$1;
4308
+ var WeakMap$2 = getNative(root, 'WeakMap');
4309
+ var _WeakMap = WeakMap$2;
4352
4310
 
4353
4311
  var DataView = _DataView,
4354
4312
  Map$1 = _Map,
4355
4313
  Promise$1 = _Promise,
4356
4314
  Set$1 = _Set,
4357
- WeakMap = _WeakMap,
4315
+ WeakMap$1 = _WeakMap,
4358
4316
  baseGetTag$1 = _baseGetTag,
4359
4317
  toSource = _toSource;
4360
4318
 
@@ -4371,7 +4329,7 @@
4371
4329
  mapCtorString = toSource(Map$1),
4372
4330
  promiseCtorString = toSource(Promise$1),
4373
4331
  setCtorString = toSource(Set$1),
4374
- weakMapCtorString = toSource(WeakMap);
4332
+ weakMapCtorString = toSource(WeakMap$1);
4375
4333
 
4376
4334
  /**
4377
4335
  * Gets the `toStringTag` of `value`.
@@ -4383,7 +4341,7 @@
4383
4341
  var getTag$1 = baseGetTag$1;
4384
4342
 
4385
4343
  // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
4386
- if (DataView && getTag$1(new DataView(new ArrayBuffer(1))) != dataViewTag || Map$1 && getTag$1(new Map$1()) != mapTag || Promise$1 && getTag$1(Promise$1.resolve()) != promiseTag || Set$1 && getTag$1(new Set$1()) != setTag || WeakMap && getTag$1(new WeakMap()) != weakMapTag) {
4344
+ if (DataView && getTag$1(new DataView(new ArrayBuffer(1))) != dataViewTag || Map$1 && getTag$1(new Map$1()) != mapTag || Promise$1 && getTag$1(Promise$1.resolve()) != promiseTag || Set$1 && getTag$1(new Set$1()) != setTag || WeakMap$1 && getTag$1(new WeakMap$1()) != weakMapTag) {
4387
4345
  getTag$1 = function (value) {
4388
4346
  var result = baseGetTag$1(value),
4389
4347
  Ctor = result == objectTag$1 ? value.constructor : undefined,
@@ -5681,181 +5639,2953 @@
5681
5639
  const currentNextFn = next;
5682
5640
  next = compose(middleware(store))(currentNextFn); // wrap the previous `next` function with this new one, a la redux
5683
5641
  };
5684
-
5685
5642
  return action => next(action);
5686
5643
  };
5687
5644
 
5688
- var useAction = function useAction(action, deps) {
5689
- return useActions([action], deps)[0];
5690
- };
5691
- var useActions = function useActions(actions, deps) {
5692
- var dispatch = reactRedux.useDispatch();
5693
- return react.useMemo(function () {
5694
- if (Array.isArray(actions)) {
5695
- return actions.map(function (a) {
5696
- return bindActionCreators(a, dispatch);
5697
- });
5645
+ var react = {exports: {}};
5646
+
5647
+ var react_production_min = {};
5648
+
5649
+ /**
5650
+ * @license React
5651
+ * react.production.min.js
5652
+ *
5653
+ * Copyright (c) Facebook, Inc. and its affiliates.
5654
+ *
5655
+ * This source code is licensed under the MIT license found in the
5656
+ * LICENSE file in the root directory of this source tree.
5657
+ */
5658
+ var hasRequiredReact_production_min;
5659
+ function requireReact_production_min() {
5660
+ if (hasRequiredReact_production_min) return react_production_min;
5661
+ hasRequiredReact_production_min = 1;
5662
+ var l = Symbol.for("react.element"),
5663
+ n = Symbol.for("react.portal"),
5664
+ p = Symbol.for("react.fragment"),
5665
+ q = Symbol.for("react.strict_mode"),
5666
+ r = Symbol.for("react.profiler"),
5667
+ t = Symbol.for("react.provider"),
5668
+ u = Symbol.for("react.context"),
5669
+ v = Symbol.for("react.forward_ref"),
5670
+ w = Symbol.for("react.suspense"),
5671
+ x = Symbol.for("react.memo"),
5672
+ y = Symbol.for("react.lazy"),
5673
+ z = Symbol.iterator;
5674
+ function A(a) {
5675
+ if (null === a || "object" !== typeof a) return null;
5676
+ a = z && a[z] || a["@@iterator"];
5677
+ return "function" === typeof a ? a : null;
5678
+ }
5679
+ var B = {
5680
+ isMounted: function () {
5681
+ return !1;
5682
+ },
5683
+ enqueueForceUpdate: function () {},
5684
+ enqueueReplaceState: function () {},
5685
+ enqueueSetState: function () {}
5686
+ },
5687
+ C = Object.assign,
5688
+ D = {};
5689
+ function E(a, b, e) {
5690
+ this.props = a;
5691
+ this.context = b;
5692
+ this.refs = D;
5693
+ this.updater = e || B;
5694
+ }
5695
+ E.prototype.isReactComponent = {};
5696
+ E.prototype.setState = function (a, b) {
5697
+ if ("object" !== typeof a && "function" !== typeof a && null != a) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
5698
+ this.updater.enqueueSetState(this, a, b, "setState");
5699
+ };
5700
+ E.prototype.forceUpdate = function (a) {
5701
+ this.updater.enqueueForceUpdate(this, a, "forceUpdate");
5702
+ };
5703
+ function F() {}
5704
+ F.prototype = E.prototype;
5705
+ function G(a, b, e) {
5706
+ this.props = a;
5707
+ this.context = b;
5708
+ this.refs = D;
5709
+ this.updater = e || B;
5710
+ }
5711
+ var H = G.prototype = new F();
5712
+ H.constructor = G;
5713
+ C(H, E.prototype);
5714
+ H.isPureReactComponent = !0;
5715
+ var I = Array.isArray,
5716
+ J = Object.prototype.hasOwnProperty,
5717
+ K = {
5718
+ current: null
5719
+ },
5720
+ L = {
5721
+ key: !0,
5722
+ ref: !0,
5723
+ __self: !0,
5724
+ __source: !0
5725
+ };
5726
+ function M(a, b, e) {
5727
+ var d,
5728
+ c = {},
5729
+ k = null,
5730
+ h = null;
5731
+ if (null != b) for (d in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (k = "" + b.key), b) J.call(b, d) && !L.hasOwnProperty(d) && (c[d] = b[d]);
5732
+ var g = arguments.length - 2;
5733
+ if (1 === g) c.children = e;else if (1 < g) {
5734
+ for (var f = Array(g), m = 0; m < g; m++) f[m] = arguments[m + 2];
5735
+ c.children = f;
5698
5736
  }
5699
- return bindActionCreators(actions, dispatch);
5700
- }, /* eslint-disable-next-line react-hooks/exhaustive-deps */
5701
- deps ? [dispatch].concat(_toConsumableArray(deps)) : [dispatch]);
5702
- };
5703
-
5704
- var asyncReducers = {}; // placeholder for injected reducers
5705
-
5706
- var injectReducer = function injectReducer(store) {
5707
- var staticReducers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5708
- var key = arguments.length > 2 ? arguments[2] : undefined;
5709
- var asyncReducer = arguments.length > 3 ? arguments[3] : undefined;
5710
- if (!asyncReducers[key]) {
5711
- asyncReducers[key] = asyncReducer;
5712
- store.replaceReducer(combineReducers(_objectSpread2$1(_objectSpread2$1({}, staticReducers), asyncReducers)));
5737
+ if (a && a.defaultProps) for (d in g = a.defaultProps, g) void 0 === c[d] && (c[d] = g[d]);
5738
+ return {
5739
+ $$typeof: l,
5740
+ type: a,
5741
+ key: k,
5742
+ ref: h,
5743
+ props: c,
5744
+ _owner: K.current
5745
+ };
5713
5746
  }
5714
- };
5715
- var injectSlice = function injectSlice(store, staticReducers, slice) {
5716
- return injectReducer(store, staticReducers, slice.name, slice.reducer);
5717
- };
5718
- var getSetterActionName = function getSetterActionName(name) {
5719
- return "set".concat(upperFirst_1(name));
5720
- };
5721
- var makeSetterReducersFromInitialState = function makeSetterReducersFromInitialState(initialState, config, pluginsData) {
5722
- var reducer = {};
5723
- Object.keys(initialState).forEach(function (name) {
5724
- var key = getSetterActionName(name);
5725
- reducer[key] = function (state, action) {
5726
- var value = action.payload;
5727
- pluginsData[name].forEach(function (_ref) {
5728
- var data = _ref.data,
5729
- plugin = _ref.plugin;
5730
- value = plugin.update(value, _objectSpread2$1({
5731
- state: state,
5732
- config: plugin.config,
5733
- draft: state
5734
- }, data)); // provide both state. and draft. apis so fewer users complain
5747
+ function N(a, b) {
5748
+ return {
5749
+ $$typeof: l,
5750
+ type: a.type,
5751
+ key: b,
5752
+ ref: a.ref,
5753
+ props: a.props,
5754
+ _owner: a._owner
5755
+ };
5756
+ }
5757
+ function O(a) {
5758
+ return "object" === typeof a && null !== a && a.$$typeof === l;
5759
+ }
5760
+ function escape(a) {
5761
+ var b = {
5762
+ "=": "=0",
5763
+ ":": "=2"
5764
+ };
5765
+ return "$" + a.replace(/[=:]/g, function (a) {
5766
+ return b[a];
5767
+ });
5768
+ }
5769
+ var P = /\/+/g;
5770
+ function Q(a, b) {
5771
+ return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b.toString(36);
5772
+ }
5773
+ function R(a, b, e, d, c) {
5774
+ var k = typeof a;
5775
+ if ("undefined" === k || "boolean" === k) a = null;
5776
+ var h = !1;
5777
+ if (null === a) h = !0;else switch (k) {
5778
+ case "string":
5779
+ case "number":
5780
+ h = !0;
5781
+ break;
5782
+ case "object":
5783
+ switch (a.$$typeof) {
5784
+ case l:
5785
+ case n:
5786
+ h = !0;
5787
+ }
5788
+ }
5789
+ if (h) return h = a, c = c(h), a = "" === d ? "." + Q(h, 0) : d, I(c) ? (e = "", null != a && (e = a.replace(P, "$&/") + "/"), R(c, b, e, "", function (a) {
5790
+ return a;
5791
+ })) : null != c && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace(P, "$&/") + "/") + a)), b.push(c)), 1;
5792
+ h = 0;
5793
+ d = "" === d ? "." : d + ":";
5794
+ if (I(a)) for (var g = 0; g < a.length; g++) {
5795
+ k = a[g];
5796
+ var f = d + Q(k, g);
5797
+ h += R(k, b, e, f, c);
5798
+ } else if (f = A(a), "function" === typeof f) for (a = f.call(a), g = 0; !(k = a.next()).done;) k = k.value, f = d + Q(k, g++), h += R(k, b, e, f, c);else if ("object" === k) throw b = String(a), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b ? "object with keys {" + Object.keys(a).join(", ") + "}" : b) + "). If you meant to render a collection of children, use an array instead.");
5799
+ return h;
5800
+ }
5801
+ function S(a, b, e) {
5802
+ if (null == a) return a;
5803
+ var d = [],
5804
+ c = 0;
5805
+ R(a, d, "", "", function (a) {
5806
+ return b.call(e, a, c++);
5807
+ });
5808
+ return d;
5809
+ }
5810
+ function T(a) {
5811
+ if (-1 === a._status) {
5812
+ var b = a._result;
5813
+ b = b();
5814
+ b.then(function (b) {
5815
+ if (0 === a._status || -1 === a._status) a._status = 1, a._result = b;
5816
+ }, function (b) {
5817
+ if (0 === a._status || -1 === a._status) a._status = 2, a._result = b;
5735
5818
  });
5736
-
5737
- state[name] = value;
5819
+ -1 === a._status && (a._status = 0, a._result = b);
5820
+ }
5821
+ if (1 === a._status) return a._result.default;
5822
+ throw a._result;
5823
+ }
5824
+ var U = {
5825
+ current: null
5826
+ },
5827
+ V = {
5828
+ transition: null
5829
+ },
5830
+ W = {
5831
+ ReactCurrentDispatcher: U,
5832
+ ReactCurrentBatchConfig: V,
5833
+ ReactCurrentOwner: K
5738
5834
  };
5739
- });
5740
- return reducer;
5741
- };
5742
-
5743
- /* eslint-enable react/forbid-foreign-prop-types */
5744
-
5745
- var plugin = function plugin(_ref) {
5746
- var constructorFn = _ref.constructor,
5747
- setup = _ref.setup,
5748
- getInitialValue = _ref.getInitialValue,
5749
- update = _ref.update,
5750
- _ref$config = _ref.config,
5751
- config = _ref$config === void 0 ? {} : _ref$config;
5752
- return /*#__PURE__*/function () {
5753
- function _class(value) {
5754
- _classCallCheck(this, _class);
5755
- this.value = value;
5756
- this.setup = setup || this.setup;
5757
- this.getInitialValue = getInitialValue || this.getInitialValue;
5758
- this.update = update || this.update;
5759
- this.config = config;
5760
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
5761
- args[_key - 1] = arguments[_key];
5762
- }
5763
- constructorFn === null || constructorFn === void 0 || constructorFn.call.apply(constructorFn, [this, value].concat(args));
5835
+ function X() {
5836
+ throw Error("act(...) is not supported in production builds of React.");
5837
+ }
5838
+ react_production_min.Children = {
5839
+ map: S,
5840
+ forEach: function (a, b, e) {
5841
+ S(a, function () {
5842
+ b.apply(this, arguments);
5843
+ }, e);
5844
+ },
5845
+ count: function (a) {
5846
+ var b = 0;
5847
+ S(a, function () {
5848
+ b++;
5849
+ });
5850
+ return b;
5851
+ },
5852
+ toArray: function (a) {
5853
+ return S(a, function (a) {
5854
+ return a;
5855
+ }) || [];
5856
+ },
5857
+ only: function (a) {
5858
+ if (!O(a)) throw Error("React.Children.only expected to receive a single React element child.");
5859
+ return a;
5764
5860
  }
5765
-
5766
- // either the initial state value or the next plugin
5767
- _createClass(_class, [{
5768
- key: "getValue",
5769
- value: function getValue() {
5770
- return this.value;
5771
- }
5772
- }, {
5773
- key: "setValue",
5774
- value: function setValue(value) {
5775
- this.value = value;
5776
- }
5777
- }, {
5778
- key: "setConfig",
5779
- value: function setConfig(config) {
5780
- this.config = _objectSpread2$1(_objectSpread2$1({}, this.config), config);
5781
- }
5782
- }, {
5783
- key: "setup",
5784
- value: function setup(item, _ref2) {
5785
- _objectDestructuringEmpty(_ref2);
5786
- return {
5787
- plugin: item
5788
- };
5789
- }
5790
- }, {
5791
- key: "getInitialValue",
5792
- value: function getInitialValue(value, _ref3) {
5793
- _objectDestructuringEmpty(_ref3);
5794
- return value;
5795
- }
5796
- }, {
5797
- key: "update",
5798
- value: function update(value, _ref4) {
5799
- _objectDestructuringEmpty(_ref4);
5800
- return value;
5801
- }
5802
- }]);
5803
- return _class;
5804
- }();
5805
- };
5806
- var addPlugin = function addPlugin(config) {
5807
- var Class = plugin(config);
5808
- plugins.push(Class);
5809
- return function () {
5810
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
5811
- args[_key2] = arguments[_key2];
5861
+ };
5862
+ react_production_min.Component = E;
5863
+ react_production_min.Fragment = p;
5864
+ react_production_min.Profiler = r;
5865
+ react_production_min.PureComponent = G;
5866
+ react_production_min.StrictMode = q;
5867
+ react_production_min.Suspense = w;
5868
+ react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W;
5869
+ react_production_min.act = X;
5870
+ react_production_min.cloneElement = function (a, b, e) {
5871
+ if (null === a || void 0 === a) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + ".");
5872
+ var d = C({}, a.props),
5873
+ c = a.key,
5874
+ k = a.ref,
5875
+ h = a._owner;
5876
+ if (null != b) {
5877
+ void 0 !== b.ref && (k = b.ref, h = K.current);
5878
+ void 0 !== b.key && (c = "" + b.key);
5879
+ if (a.type && a.type.defaultProps) var g = a.type.defaultProps;
5880
+ for (f in b) J.call(b, f) && !L.hasOwnProperty(f) && (d[f] = void 0 === b[f] && void 0 !== g ? g[f] : b[f]);
5812
5881
  }
5813
- return _construct(Class, args);
5882
+ var f = arguments.length - 2;
5883
+ if (1 === f) d.children = e;else if (1 < f) {
5884
+ g = Array(f);
5885
+ for (var m = 0; m < f; m++) g[m] = arguments[m + 2];
5886
+ d.children = g;
5887
+ }
5888
+ return {
5889
+ $$typeof: l,
5890
+ type: a.type,
5891
+ key: c,
5892
+ ref: k,
5893
+ props: d,
5894
+ _owner: h
5895
+ };
5814
5896
  };
5815
- };
5816
- var addPlugins = function addPlugins() {
5817
- for (var _len3 = arguments.length, configs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
5818
- configs[_key3] = arguments[_key3];
5819
- }
5820
- return configs.map(addPlugin);
5821
- };
5822
- var plugins = [];
5823
-
5824
- var makeSelectorHook = function makeSelectorHook(selector) {
5825
- return function () {
5826
- return reactRedux.useSelector(selector, reactRedux.shallowEqual);
5897
+ react_production_min.createContext = function (a) {
5898
+ a = {
5899
+ $$typeof: u,
5900
+ _currentValue: a,
5901
+ _currentValue2: a,
5902
+ _threadCount: 0,
5903
+ Provider: null,
5904
+ Consumer: null,
5905
+ _defaultValue: null,
5906
+ _globalName: null
5907
+ };
5908
+ a.Provider = {
5909
+ $$typeof: t,
5910
+ _context: a
5911
+ };
5912
+ return a.Consumer = a;
5827
5913
  };
5828
- };
5829
- var createSelectorUpdateHook = function createSelectorUpdateHook(selector, action) {
5830
- return function () {
5831
- return [reactRedux.useSelector(selector), useAction(action, undefined)];
5914
+ react_production_min.createElement = M;
5915
+ react_production_min.createFactory = function (a) {
5916
+ var b = M.bind(null, a);
5917
+ b.type = a;
5918
+ return b;
5832
5919
  };
5833
- };
5834
- var createSelectorHook = function createSelectorHook() {
5835
- // creates a redux selector and a react hook that produce identical results
5836
- var selector = createDraftSafeSelector.apply(void 0, arguments);
5837
- var hook = makeSelectorHook(selector);
5838
- hook.select = selector;
5839
- return hook;
5840
- };
5841
- var configure$1 = function configure(store) {
5842
- var makeDomainSelector = function makeDomainSelector(name, initialState) {
5843
- return function (state) {
5844
- return (state === null || state === void 0 ? void 0 : state[name]) || initialState;
5920
+ react_production_min.createRef = function () {
5921
+ return {
5922
+ current: null
5845
5923
  };
5846
5924
  };
5847
- var makeDomainSelectorFromSlice = function makeDomainSelectorFromSlice(slice) {
5848
- return makeDomainSelector(slice.name, slice.getInitialState());
5925
+ react_production_min.forwardRef = function (a) {
5926
+ return {
5927
+ $$typeof: v,
5928
+ render: a
5929
+ };
5849
5930
  };
5850
- var selectProp = function selectProp(name, defaultValue) {
5851
- return function (substate) {
5852
- return get_1(substate, name, defaultValue);
5931
+ react_production_min.isValidElement = O;
5932
+ react_production_min.lazy = function (a) {
5933
+ return {
5934
+ $$typeof: y,
5935
+ _payload: {
5936
+ _status: -1,
5937
+ _result: a
5938
+ },
5939
+ _init: T
5853
5940
  };
5854
5941
  };
5855
- var makePropertySelectorHookFactory = function makePropertySelectorHookFactory(baseSelector, slice) {
5856
- return function (names) {
5857
- // to be used in conjunction with singlePropReducer to mimic the useState api,
5858
- // but for individual pieces of redux state rather than component state
5942
+ react_production_min.memo = function (a, b) {
5943
+ return {
5944
+ $$typeof: x,
5945
+ type: a,
5946
+ compare: void 0 === b ? null : b
5947
+ };
5948
+ };
5949
+ react_production_min.startTransition = function (a) {
5950
+ var b = V.transition;
5951
+ V.transition = {};
5952
+ try {
5953
+ a();
5954
+ } finally {
5955
+ V.transition = b;
5956
+ }
5957
+ };
5958
+ react_production_min.unstable_act = X;
5959
+ react_production_min.useCallback = function (a, b) {
5960
+ return U.current.useCallback(a, b);
5961
+ };
5962
+ react_production_min.useContext = function (a) {
5963
+ return U.current.useContext(a);
5964
+ };
5965
+ react_production_min.useDebugValue = function () {};
5966
+ react_production_min.useDeferredValue = function (a) {
5967
+ return U.current.useDeferredValue(a);
5968
+ };
5969
+ react_production_min.useEffect = function (a, b) {
5970
+ return U.current.useEffect(a, b);
5971
+ };
5972
+ react_production_min.useId = function () {
5973
+ return U.current.useId();
5974
+ };
5975
+ react_production_min.useImperativeHandle = function (a, b, e) {
5976
+ return U.current.useImperativeHandle(a, b, e);
5977
+ };
5978
+ react_production_min.useInsertionEffect = function (a, b) {
5979
+ return U.current.useInsertionEffect(a, b);
5980
+ };
5981
+ react_production_min.useLayoutEffect = function (a, b) {
5982
+ return U.current.useLayoutEffect(a, b);
5983
+ };
5984
+ react_production_min.useMemo = function (a, b) {
5985
+ return U.current.useMemo(a, b);
5986
+ };
5987
+ react_production_min.useReducer = function (a, b, e) {
5988
+ return U.current.useReducer(a, b, e);
5989
+ };
5990
+ react_production_min.useRef = function (a) {
5991
+ return U.current.useRef(a);
5992
+ };
5993
+ react_production_min.useState = function (a) {
5994
+ return U.current.useState(a);
5995
+ };
5996
+ react_production_min.useSyncExternalStore = function (a, b, e) {
5997
+ return U.current.useSyncExternalStore(a, b, e);
5998
+ };
5999
+ react_production_min.useTransition = function () {
6000
+ return U.current.useTransition();
6001
+ };
6002
+ react_production_min.version = "18.3.1";
6003
+ return react_production_min;
6004
+ }
6005
+
6006
+ var react_development = {exports: {}};
6007
+
6008
+ /**
6009
+ * @license React
6010
+ * react.development.js
6011
+ *
6012
+ * Copyright (c) Facebook, Inc. and its affiliates.
6013
+ *
6014
+ * This source code is licensed under the MIT license found in the
6015
+ * LICENSE file in the root directory of this source tree.
6016
+ */
6017
+ var hasRequiredReact_development;
6018
+ function requireReact_development() {
6019
+ if (hasRequiredReact_development) return react_development.exports;
6020
+ hasRequiredReact_development = 1;
6021
+ (function (module, exports) {
6022
+
6023
+ if (process.env.NODE_ENV !== "production") {
6024
+ (function () {
6025
+
6026
+ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
6027
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === 'function') {
6028
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
6029
+ }
6030
+ var ReactVersion = '18.3.1';
6031
+
6032
+ // ATTENTION
6033
+ // When adding new symbols to this file,
6034
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
6035
+ // The Symbol used to tag the ReactElement-like types.
6036
+ var REACT_ELEMENT_TYPE = Symbol.for('react.element');
6037
+ var REACT_PORTAL_TYPE = Symbol.for('react.portal');
6038
+ var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
6039
+ var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
6040
+ var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
6041
+ var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
6042
+ var REACT_CONTEXT_TYPE = Symbol.for('react.context');
6043
+ var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
6044
+ var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
6045
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
6046
+ var REACT_MEMO_TYPE = Symbol.for('react.memo');
6047
+ var REACT_LAZY_TYPE = Symbol.for('react.lazy');
6048
+ var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
6049
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
6050
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
6051
+ function getIteratorFn(maybeIterable) {
6052
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
6053
+ return null;
6054
+ }
6055
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
6056
+ if (typeof maybeIterator === 'function') {
6057
+ return maybeIterator;
6058
+ }
6059
+ return null;
6060
+ }
6061
+
6062
+ /**
6063
+ * Keeps track of the current dispatcher.
6064
+ */
6065
+ var ReactCurrentDispatcher = {
6066
+ /**
6067
+ * @internal
6068
+ * @type {ReactComponent}
6069
+ */
6070
+ current: null
6071
+ };
6072
+
6073
+ /**
6074
+ * Keeps track of the current batch's configuration such as how long an update
6075
+ * should suspend for if it needs to.
6076
+ */
6077
+ var ReactCurrentBatchConfig = {
6078
+ transition: null
6079
+ };
6080
+ var ReactCurrentActQueue = {
6081
+ current: null,
6082
+ // Used to reproduce behavior of `batchedUpdates` in legacy mode.
6083
+ isBatchingLegacy: false,
6084
+ didScheduleLegacyUpdate: false
6085
+ };
6086
+
6087
+ /**
6088
+ * Keeps track of the current owner.
6089
+ *
6090
+ * The current owner is the component who should own any components that are
6091
+ * currently being constructed.
6092
+ */
6093
+ var ReactCurrentOwner = {
6094
+ /**
6095
+ * @internal
6096
+ * @type {ReactComponent}
6097
+ */
6098
+ current: null
6099
+ };
6100
+ var ReactDebugCurrentFrame = {};
6101
+ var currentExtraStackFrame = null;
6102
+ function setExtraStackFrame(stack) {
6103
+ {
6104
+ currentExtraStackFrame = stack;
6105
+ }
6106
+ }
6107
+ {
6108
+ ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
6109
+ {
6110
+ currentExtraStackFrame = stack;
6111
+ }
6112
+ }; // Stack implementation injected by the current renderer.
6113
+
6114
+ ReactDebugCurrentFrame.getCurrentStack = null;
6115
+ ReactDebugCurrentFrame.getStackAddendum = function () {
6116
+ var stack = ''; // Add an extra top frame while an element is being validated
6117
+
6118
+ if (currentExtraStackFrame) {
6119
+ stack += currentExtraStackFrame;
6120
+ } // Delegate to the injected renderer-specific implementation
6121
+
6122
+ var impl = ReactDebugCurrentFrame.getCurrentStack;
6123
+ if (impl) {
6124
+ stack += impl() || '';
6125
+ }
6126
+ return stack;
6127
+ };
6128
+ }
6129
+
6130
+ // -----------------------------------------------------------------------------
6131
+
6132
+ var enableScopeAPI = false; // Experimental Create Event Handle API.
6133
+ var enableCacheElement = false;
6134
+ var enableTransitionTracing = false; // No known bugs, but needs performance testing
6135
+
6136
+ var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
6137
+ // stuff. Intended to enable React core members to more easily debug scheduling
6138
+ // issues in DEV builds.
6139
+
6140
+ var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
6141
+
6142
+ var ReactSharedInternals = {
6143
+ ReactCurrentDispatcher: ReactCurrentDispatcher,
6144
+ ReactCurrentBatchConfig: ReactCurrentBatchConfig,
6145
+ ReactCurrentOwner: ReactCurrentOwner
6146
+ };
6147
+ {
6148
+ ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
6149
+ ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
6150
+ }
6151
+
6152
+ // by calls to these methods by a Babel plugin.
6153
+ //
6154
+ // In PROD (or in packages without access to React internals),
6155
+ // they are left as they are instead.
6156
+
6157
+ function warn(format) {
6158
+ {
6159
+ {
6160
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
6161
+ args[_key - 1] = arguments[_key];
6162
+ }
6163
+ printWarning('warn', format, args);
6164
+ }
6165
+ }
6166
+ }
6167
+ function error(format) {
6168
+ {
6169
+ {
6170
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
6171
+ args[_key2 - 1] = arguments[_key2];
6172
+ }
6173
+ printWarning('error', format, args);
6174
+ }
6175
+ }
6176
+ }
6177
+ function printWarning(level, format, args) {
6178
+ // When changing this logic, you might want to also
6179
+ // update consoleWithStackDev.www.js as well.
6180
+ {
6181
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
6182
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
6183
+ if (stack !== '') {
6184
+ format += '%s';
6185
+ args = args.concat([stack]);
6186
+ } // eslint-disable-next-line react-internal/safe-string-coercion
6187
+
6188
+ var argsWithFormat = args.map(function (item) {
6189
+ return String(item);
6190
+ }); // Careful: RN currently depends on this prefix
6191
+
6192
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
6193
+ // breaks IE9: https://github.com/facebook/react/issues/13610
6194
+ // eslint-disable-next-line react-internal/no-production-logging
6195
+
6196
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
6197
+ }
6198
+ }
6199
+ var didWarnStateUpdateForUnmountedComponent = {};
6200
+ function warnNoop(publicInstance, callerName) {
6201
+ {
6202
+ var _constructor = publicInstance.constructor;
6203
+ var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
6204
+ var warningKey = componentName + "." + callerName;
6205
+ if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
6206
+ return;
6207
+ }
6208
+ error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
6209
+ didWarnStateUpdateForUnmountedComponent[warningKey] = true;
6210
+ }
6211
+ }
6212
+ /**
6213
+ * This is the abstract API for an update queue.
6214
+ */
6215
+
6216
+ var ReactNoopUpdateQueue = {
6217
+ /**
6218
+ * Checks whether or not this composite component is mounted.
6219
+ * @param {ReactClass} publicInstance The instance we want to test.
6220
+ * @return {boolean} True if mounted, false otherwise.
6221
+ * @protected
6222
+ * @final
6223
+ */
6224
+ isMounted: function (publicInstance) {
6225
+ return false;
6226
+ },
6227
+ /**
6228
+ * Forces an update. This should only be invoked when it is known with
6229
+ * certainty that we are **not** in a DOM transaction.
6230
+ *
6231
+ * You may want to call this when you know that some deeper aspect of the
6232
+ * component's state has changed but `setState` was not called.
6233
+ *
6234
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
6235
+ * `componentWillUpdate` and `componentDidUpdate`.
6236
+ *
6237
+ * @param {ReactClass} publicInstance The instance that should rerender.
6238
+ * @param {?function} callback Called after component is updated.
6239
+ * @param {?string} callerName name of the calling function in the public API.
6240
+ * @internal
6241
+ */
6242
+ enqueueForceUpdate: function (publicInstance, callback, callerName) {
6243
+ warnNoop(publicInstance, 'forceUpdate');
6244
+ },
6245
+ /**
6246
+ * Replaces all of the state. Always use this or `setState` to mutate state.
6247
+ * You should treat `this.state` as immutable.
6248
+ *
6249
+ * There is no guarantee that `this.state` will be immediately updated, so
6250
+ * accessing `this.state` after calling this method may return the old value.
6251
+ *
6252
+ * @param {ReactClass} publicInstance The instance that should rerender.
6253
+ * @param {object} completeState Next state.
6254
+ * @param {?function} callback Called after component is updated.
6255
+ * @param {?string} callerName name of the calling function in the public API.
6256
+ * @internal
6257
+ */
6258
+ enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
6259
+ warnNoop(publicInstance, 'replaceState');
6260
+ },
6261
+ /**
6262
+ * Sets a subset of the state. This only exists because _pendingState is
6263
+ * internal. This provides a merging strategy that is not available to deep
6264
+ * properties which is confusing. TODO: Expose pendingState or don't use it
6265
+ * during the merge.
6266
+ *
6267
+ * @param {ReactClass} publicInstance The instance that should rerender.
6268
+ * @param {object} partialState Next partial state to be merged with state.
6269
+ * @param {?function} callback Called after component is updated.
6270
+ * @param {?string} Name of the calling function in the public API.
6271
+ * @internal
6272
+ */
6273
+ enqueueSetState: function (publicInstance, partialState, callback, callerName) {
6274
+ warnNoop(publicInstance, 'setState');
6275
+ }
6276
+ };
6277
+ var assign = Object.assign;
6278
+ var emptyObject = {};
6279
+ {
6280
+ Object.freeze(emptyObject);
6281
+ }
6282
+ /**
6283
+ * Base class helpers for the updating state of a component.
6284
+ */
6285
+
6286
+ function Component(props, context, updater) {
6287
+ this.props = props;
6288
+ this.context = context; // If a component has string refs, we will assign a different object later.
6289
+
6290
+ this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
6291
+ // renderer.
6292
+
6293
+ this.updater = updater || ReactNoopUpdateQueue;
6294
+ }
6295
+ Component.prototype.isReactComponent = {};
6296
+ /**
6297
+ * Sets a subset of the state. Always use this to mutate
6298
+ * state. You should treat `this.state` as immutable.
6299
+ *
6300
+ * There is no guarantee that `this.state` will be immediately updated, so
6301
+ * accessing `this.state` after calling this method may return the old value.
6302
+ *
6303
+ * There is no guarantee that calls to `setState` will run synchronously,
6304
+ * as they may eventually be batched together. You can provide an optional
6305
+ * callback that will be executed when the call to setState is actually
6306
+ * completed.
6307
+ *
6308
+ * When a function is provided to setState, it will be called at some point in
6309
+ * the future (not synchronously). It will be called with the up to date
6310
+ * component arguments (state, props, context). These values can be different
6311
+ * from this.* because your function may be called after receiveProps but before
6312
+ * shouldComponentUpdate, and this new state, props, and context will not yet be
6313
+ * assigned to this.
6314
+ *
6315
+ * @param {object|function} partialState Next partial state or function to
6316
+ * produce next partial state to be merged with current state.
6317
+ * @param {?function} callback Called after state is updated.
6318
+ * @final
6319
+ * @protected
6320
+ */
6321
+
6322
+ Component.prototype.setState = function (partialState, callback) {
6323
+ if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {
6324
+ throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');
6325
+ }
6326
+ this.updater.enqueueSetState(this, partialState, callback, 'setState');
6327
+ };
6328
+ /**
6329
+ * Forces an update. This should only be invoked when it is known with
6330
+ * certainty that we are **not** in a DOM transaction.
6331
+ *
6332
+ * You may want to call this when you know that some deeper aspect of the
6333
+ * component's state has changed but `setState` was not called.
6334
+ *
6335
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
6336
+ * `componentWillUpdate` and `componentDidUpdate`.
6337
+ *
6338
+ * @param {?function} callback Called after update is complete.
6339
+ * @final
6340
+ * @protected
6341
+ */
6342
+
6343
+ Component.prototype.forceUpdate = function (callback) {
6344
+ this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
6345
+ };
6346
+ /**
6347
+ * Deprecated APIs. These APIs used to exist on classic React classes but since
6348
+ * we would like to deprecate them, we're not going to move them over to this
6349
+ * modern base class. Instead, we define a getter that warns if it's accessed.
6350
+ */
6351
+
6352
+ {
6353
+ var deprecatedAPIs = {
6354
+ isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
6355
+ replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
6356
+ };
6357
+ var defineDeprecationWarning = function (methodName, info) {
6358
+ Object.defineProperty(Component.prototype, methodName, {
6359
+ get: function () {
6360
+ warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
6361
+ return undefined;
6362
+ }
6363
+ });
6364
+ };
6365
+ for (var fnName in deprecatedAPIs) {
6366
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
6367
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
6368
+ }
6369
+ }
6370
+ }
6371
+ function ComponentDummy() {}
6372
+ ComponentDummy.prototype = Component.prototype;
6373
+ /**
6374
+ * Convenience component with default shallow equality check for sCU.
6375
+ */
6376
+
6377
+ function PureComponent(props, context, updater) {
6378
+ this.props = props;
6379
+ this.context = context; // If a component has string refs, we will assign a different object later.
6380
+
6381
+ this.refs = emptyObject;
6382
+ this.updater = updater || ReactNoopUpdateQueue;
6383
+ }
6384
+ var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
6385
+ pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
6386
+
6387
+ assign(pureComponentPrototype, Component.prototype);
6388
+ pureComponentPrototype.isPureReactComponent = true;
6389
+
6390
+ // an immutable object with a single mutable value
6391
+ function createRef() {
6392
+ var refObject = {
6393
+ current: null
6394
+ };
6395
+ {
6396
+ Object.seal(refObject);
6397
+ }
6398
+ return refObject;
6399
+ }
6400
+ var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
6401
+
6402
+ function isArray(a) {
6403
+ return isArrayImpl(a);
6404
+ }
6405
+
6406
+ /*
6407
+ * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
6408
+ * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
6409
+ *
6410
+ * The functions in this module will throw an easier-to-understand,
6411
+ * easier-to-debug exception with a clear errors message message explaining the
6412
+ * problem. (Instead of a confusing exception thrown inside the implementation
6413
+ * of the `value` object).
6414
+ */
6415
+ // $FlowFixMe only called in DEV, so void return is not possible.
6416
+ function typeName(value) {
6417
+ {
6418
+ // toStringTag is needed for namespaced types like Temporal.Instant
6419
+ var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
6420
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
6421
+ return type;
6422
+ }
6423
+ } // $FlowFixMe only called in DEV, so void return is not possible.
6424
+
6425
+ function willCoercionThrow(value) {
6426
+ {
6427
+ try {
6428
+ testStringCoercion(value);
6429
+ return false;
6430
+ } catch (e) {
6431
+ return true;
6432
+ }
6433
+ }
6434
+ }
6435
+ function testStringCoercion(value) {
6436
+ // If you ended up here by following an exception call stack, here's what's
6437
+ // happened: you supplied an object or symbol value to React (as a prop, key,
6438
+ // DOM attribute, CSS property, string ref, etc.) and when React tried to
6439
+ // coerce it to a string using `'' + value`, an exception was thrown.
6440
+ //
6441
+ // The most common types that will cause this exception are `Symbol` instances
6442
+ // and Temporal objects like `Temporal.Instant`. But any object that has a
6443
+ // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
6444
+ // exception. (Library authors do this to prevent users from using built-in
6445
+ // numeric operators like `+` or comparison operators like `>=` because custom
6446
+ // methods are needed to perform accurate arithmetic or comparison.)
6447
+ //
6448
+ // To fix the problem, coerce this object or symbol value to a string before
6449
+ // passing it to React. The most reliable way is usually `String(value)`.
6450
+ //
6451
+ // To find which value is throwing, check the browser or debugger console.
6452
+ // Before this exception was thrown, there should be `console.error` output
6453
+ // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
6454
+ // problem and how that type was used: key, atrribute, input value prop, etc.
6455
+ // In most cases, this console output also shows the component and its
6456
+ // ancestor components where the exception happened.
6457
+ //
6458
+ // eslint-disable-next-line react-internal/safe-string-coercion
6459
+ return '' + value;
6460
+ }
6461
+ function checkKeyStringCoercion(value) {
6462
+ {
6463
+ if (willCoercionThrow(value)) {
6464
+ error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
6465
+ return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
6466
+ }
6467
+ }
6468
+ }
6469
+ function getWrappedName(outerType, innerType, wrapperName) {
6470
+ var displayName = outerType.displayName;
6471
+ if (displayName) {
6472
+ return displayName;
6473
+ }
6474
+ var functionName = innerType.displayName || innerType.name || '';
6475
+ return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
6476
+ } // Keep in sync with react-reconciler/getComponentNameFromFiber
6477
+
6478
+ function getContextName(type) {
6479
+ return type.displayName || 'Context';
6480
+ } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
6481
+
6482
+ function getComponentNameFromType(type) {
6483
+ if (type == null) {
6484
+ // Host root, text node or just invalid type.
6485
+ return null;
6486
+ }
6487
+ {
6488
+ if (typeof type.tag === 'number') {
6489
+ error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
6490
+ }
6491
+ }
6492
+ if (typeof type === 'function') {
6493
+ return type.displayName || type.name || null;
6494
+ }
6495
+ if (typeof type === 'string') {
6496
+ return type;
6497
+ }
6498
+ switch (type) {
6499
+ case REACT_FRAGMENT_TYPE:
6500
+ return 'Fragment';
6501
+ case REACT_PORTAL_TYPE:
6502
+ return 'Portal';
6503
+ case REACT_PROFILER_TYPE:
6504
+ return 'Profiler';
6505
+ case REACT_STRICT_MODE_TYPE:
6506
+ return 'StrictMode';
6507
+ case REACT_SUSPENSE_TYPE:
6508
+ return 'Suspense';
6509
+ case REACT_SUSPENSE_LIST_TYPE:
6510
+ return 'SuspenseList';
6511
+ }
6512
+ if (typeof type === 'object') {
6513
+ switch (type.$$typeof) {
6514
+ case REACT_CONTEXT_TYPE:
6515
+ var context = type;
6516
+ return getContextName(context) + '.Consumer';
6517
+ case REACT_PROVIDER_TYPE:
6518
+ var provider = type;
6519
+ return getContextName(provider._context) + '.Provider';
6520
+ case REACT_FORWARD_REF_TYPE:
6521
+ return getWrappedName(type, type.render, 'ForwardRef');
6522
+ case REACT_MEMO_TYPE:
6523
+ var outerName = type.displayName || null;
6524
+ if (outerName !== null) {
6525
+ return outerName;
6526
+ }
6527
+ return getComponentNameFromType(type.type) || 'Memo';
6528
+ case REACT_LAZY_TYPE:
6529
+ {
6530
+ var lazyComponent = type;
6531
+ var payload = lazyComponent._payload;
6532
+ var init = lazyComponent._init;
6533
+ try {
6534
+ return getComponentNameFromType(init(payload));
6535
+ } catch (x) {
6536
+ return null;
6537
+ }
6538
+ }
6539
+
6540
+ // eslint-disable-next-line no-fallthrough
6541
+ }
6542
+ }
6543
+ return null;
6544
+ }
6545
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
6546
+ var RESERVED_PROPS = {
6547
+ key: true,
6548
+ ref: true,
6549
+ __self: true,
6550
+ __source: true
6551
+ };
6552
+ var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
6553
+ {
6554
+ didWarnAboutStringRefs = {};
6555
+ }
6556
+ function hasValidRef(config) {
6557
+ {
6558
+ if (hasOwnProperty.call(config, 'ref')) {
6559
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
6560
+ if (getter && getter.isReactWarning) {
6561
+ return false;
6562
+ }
6563
+ }
6564
+ }
6565
+ return config.ref !== undefined;
6566
+ }
6567
+ function hasValidKey(config) {
6568
+ {
6569
+ if (hasOwnProperty.call(config, 'key')) {
6570
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
6571
+ if (getter && getter.isReactWarning) {
6572
+ return false;
6573
+ }
6574
+ }
6575
+ }
6576
+ return config.key !== undefined;
6577
+ }
6578
+ function defineKeyPropWarningGetter(props, displayName) {
6579
+ var warnAboutAccessingKey = function () {
6580
+ {
6581
+ if (!specialPropKeyWarningShown) {
6582
+ specialPropKeyWarningShown = true;
6583
+ error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
6584
+ }
6585
+ }
6586
+ };
6587
+ warnAboutAccessingKey.isReactWarning = true;
6588
+ Object.defineProperty(props, 'key', {
6589
+ get: warnAboutAccessingKey,
6590
+ configurable: true
6591
+ });
6592
+ }
6593
+ function defineRefPropWarningGetter(props, displayName) {
6594
+ var warnAboutAccessingRef = function () {
6595
+ {
6596
+ if (!specialPropRefWarningShown) {
6597
+ specialPropRefWarningShown = true;
6598
+ error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
6599
+ }
6600
+ }
6601
+ };
6602
+ warnAboutAccessingRef.isReactWarning = true;
6603
+ Object.defineProperty(props, 'ref', {
6604
+ get: warnAboutAccessingRef,
6605
+ configurable: true
6606
+ });
6607
+ }
6608
+ function warnIfStringRefCannotBeAutoConverted(config) {
6609
+ {
6610
+ if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
6611
+ var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
6612
+ if (!didWarnAboutStringRefs[componentName]) {
6613
+ error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
6614
+ didWarnAboutStringRefs[componentName] = true;
6615
+ }
6616
+ }
6617
+ }
6618
+ }
6619
+ /**
6620
+ * Factory method to create a new React element. This no longer adheres to
6621
+ * the class pattern, so do not use new to call it. Also, instanceof check
6622
+ * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
6623
+ * if something is a React Element.
6624
+ *
6625
+ * @param {*} type
6626
+ * @param {*} props
6627
+ * @param {*} key
6628
+ * @param {string|object} ref
6629
+ * @param {*} owner
6630
+ * @param {*} self A *temporary* helper to detect places where `this` is
6631
+ * different from the `owner` when React.createElement is called, so that we
6632
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
6633
+ * functions, and as long as `this` and owner are the same, there will be no
6634
+ * change in behavior.
6635
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
6636
+ * indicating filename, line number, and/or other information.
6637
+ * @internal
6638
+ */
6639
+
6640
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
6641
+ var element = {
6642
+ // This tag allows us to uniquely identify this as a React Element
6643
+ $$typeof: REACT_ELEMENT_TYPE,
6644
+ // Built-in properties that belong on the element
6645
+ type: type,
6646
+ key: key,
6647
+ ref: ref,
6648
+ props: props,
6649
+ // Record the component responsible for creating this element.
6650
+ _owner: owner
6651
+ };
6652
+ {
6653
+ // The validation flag is currently mutative. We put it on
6654
+ // an external backing store so that we can freeze the whole object.
6655
+ // This can be replaced with a WeakMap once they are implemented in
6656
+ // commonly used development environments.
6657
+ element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
6658
+ // the validation flag non-enumerable (where possible, which should
6659
+ // include every environment we run tests in), so the test framework
6660
+ // ignores it.
6661
+
6662
+ Object.defineProperty(element._store, 'validated', {
6663
+ configurable: false,
6664
+ enumerable: false,
6665
+ writable: true,
6666
+ value: false
6667
+ }); // self and source are DEV only properties.
6668
+
6669
+ Object.defineProperty(element, '_self', {
6670
+ configurable: false,
6671
+ enumerable: false,
6672
+ writable: false,
6673
+ value: self
6674
+ }); // Two elements created in two different places should be considered
6675
+ // equal for testing purposes and therefore we hide it from enumeration.
6676
+
6677
+ Object.defineProperty(element, '_source', {
6678
+ configurable: false,
6679
+ enumerable: false,
6680
+ writable: false,
6681
+ value: source
6682
+ });
6683
+ if (Object.freeze) {
6684
+ Object.freeze(element.props);
6685
+ Object.freeze(element);
6686
+ }
6687
+ }
6688
+ return element;
6689
+ };
6690
+ /**
6691
+ * Create and return a new ReactElement of the given type.
6692
+ * See https://reactjs.org/docs/react-api.html#createelement
6693
+ */
6694
+
6695
+ function createElement(type, config, children) {
6696
+ var propName; // Reserved names are extracted
6697
+
6698
+ var props = {};
6699
+ var key = null;
6700
+ var ref = null;
6701
+ var self = null;
6702
+ var source = null;
6703
+ if (config != null) {
6704
+ if (hasValidRef(config)) {
6705
+ ref = config.ref;
6706
+ {
6707
+ warnIfStringRefCannotBeAutoConverted(config);
6708
+ }
6709
+ }
6710
+ if (hasValidKey(config)) {
6711
+ {
6712
+ checkKeyStringCoercion(config.key);
6713
+ }
6714
+ key = '' + config.key;
6715
+ }
6716
+ self = config.__self === undefined ? null : config.__self;
6717
+ source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
6718
+
6719
+ for (propName in config) {
6720
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
6721
+ props[propName] = config[propName];
6722
+ }
6723
+ }
6724
+ } // Children can be more than one argument, and those are transferred onto
6725
+ // the newly allocated props object.
6726
+
6727
+ var childrenLength = arguments.length - 2;
6728
+ if (childrenLength === 1) {
6729
+ props.children = children;
6730
+ } else if (childrenLength > 1) {
6731
+ var childArray = Array(childrenLength);
6732
+ for (var i = 0; i < childrenLength; i++) {
6733
+ childArray[i] = arguments[i + 2];
6734
+ }
6735
+ {
6736
+ if (Object.freeze) {
6737
+ Object.freeze(childArray);
6738
+ }
6739
+ }
6740
+ props.children = childArray;
6741
+ } // Resolve default props
6742
+
6743
+ if (type && type.defaultProps) {
6744
+ var defaultProps = type.defaultProps;
6745
+ for (propName in defaultProps) {
6746
+ if (props[propName] === undefined) {
6747
+ props[propName] = defaultProps[propName];
6748
+ }
6749
+ }
6750
+ }
6751
+ {
6752
+ if (key || ref) {
6753
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
6754
+ if (key) {
6755
+ defineKeyPropWarningGetter(props, displayName);
6756
+ }
6757
+ if (ref) {
6758
+ defineRefPropWarningGetter(props, displayName);
6759
+ }
6760
+ }
6761
+ }
6762
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
6763
+ }
6764
+ function cloneAndReplaceKey(oldElement, newKey) {
6765
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
6766
+ return newElement;
6767
+ }
6768
+ /**
6769
+ * Clone and return a new ReactElement using element as the starting point.
6770
+ * See https://reactjs.org/docs/react-api.html#cloneelement
6771
+ */
6772
+
6773
+ function cloneElement(element, config, children) {
6774
+ if (element === null || element === undefined) {
6775
+ throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
6776
+ }
6777
+ var propName; // Original props are copied
6778
+
6779
+ var props = assign({}, element.props); // Reserved names are extracted
6780
+
6781
+ var key = element.key;
6782
+ var ref = element.ref; // Self is preserved since the owner is preserved.
6783
+
6784
+ var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
6785
+ // transpiler, and the original source is probably a better indicator of the
6786
+ // true owner.
6787
+
6788
+ var source = element._source; // Owner will be preserved, unless ref is overridden
6789
+
6790
+ var owner = element._owner;
6791
+ if (config != null) {
6792
+ if (hasValidRef(config)) {
6793
+ // Silently steal the ref from the parent.
6794
+ ref = config.ref;
6795
+ owner = ReactCurrentOwner.current;
6796
+ }
6797
+ if (hasValidKey(config)) {
6798
+ {
6799
+ checkKeyStringCoercion(config.key);
6800
+ }
6801
+ key = '' + config.key;
6802
+ } // Remaining properties override existing props
6803
+
6804
+ var defaultProps;
6805
+ if (element.type && element.type.defaultProps) {
6806
+ defaultProps = element.type.defaultProps;
6807
+ }
6808
+ for (propName in config) {
6809
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
6810
+ if (config[propName] === undefined && defaultProps !== undefined) {
6811
+ // Resolve default props
6812
+ props[propName] = defaultProps[propName];
6813
+ } else {
6814
+ props[propName] = config[propName];
6815
+ }
6816
+ }
6817
+ }
6818
+ } // Children can be more than one argument, and those are transferred onto
6819
+ // the newly allocated props object.
6820
+
6821
+ var childrenLength = arguments.length - 2;
6822
+ if (childrenLength === 1) {
6823
+ props.children = children;
6824
+ } else if (childrenLength > 1) {
6825
+ var childArray = Array(childrenLength);
6826
+ for (var i = 0; i < childrenLength; i++) {
6827
+ childArray[i] = arguments[i + 2];
6828
+ }
6829
+ props.children = childArray;
6830
+ }
6831
+ return ReactElement(element.type, key, ref, self, source, owner, props);
6832
+ }
6833
+ /**
6834
+ * Verifies the object is a ReactElement.
6835
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
6836
+ * @param {?object} object
6837
+ * @return {boolean} True if `object` is a ReactElement.
6838
+ * @final
6839
+ */
6840
+
6841
+ function isValidElement(object) {
6842
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
6843
+ }
6844
+ var SEPARATOR = '.';
6845
+ var SUBSEPARATOR = ':';
6846
+ /**
6847
+ * Escape and wrap key so it is safe to use as a reactid
6848
+ *
6849
+ * @param {string} key to be escaped.
6850
+ * @return {string} the escaped key.
6851
+ */
6852
+
6853
+ function escape(key) {
6854
+ var escapeRegex = /[=:]/g;
6855
+ var escaperLookup = {
6856
+ '=': '=0',
6857
+ ':': '=2'
6858
+ };
6859
+ var escapedString = key.replace(escapeRegex, function (match) {
6860
+ return escaperLookup[match];
6861
+ });
6862
+ return '$' + escapedString;
6863
+ }
6864
+ /**
6865
+ * TODO: Test that a single child and an array with one item have the same key
6866
+ * pattern.
6867
+ */
6868
+
6869
+ var didWarnAboutMaps = false;
6870
+ var userProvidedKeyEscapeRegex = /\/+/g;
6871
+ function escapeUserProvidedKey(text) {
6872
+ return text.replace(userProvidedKeyEscapeRegex, '$&/');
6873
+ }
6874
+ /**
6875
+ * Generate a key string that identifies a element within a set.
6876
+ *
6877
+ * @param {*} element A element that could contain a manual key.
6878
+ * @param {number} index Index that is used if a manual key is not provided.
6879
+ * @return {string}
6880
+ */
6881
+
6882
+ function getElementKey(element, index) {
6883
+ // Do some typechecking here since we call this blindly. We want to ensure
6884
+ // that we don't block potential future ES APIs.
6885
+ if (typeof element === 'object' && element !== null && element.key != null) {
6886
+ // Explicit key
6887
+ {
6888
+ checkKeyStringCoercion(element.key);
6889
+ }
6890
+ return escape('' + element.key);
6891
+ } // Implicit key determined by the index in the set
6892
+
6893
+ return index.toString(36);
6894
+ }
6895
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
6896
+ var type = typeof children;
6897
+ if (type === 'undefined' || type === 'boolean') {
6898
+ // All of the above are perceived as null.
6899
+ children = null;
6900
+ }
6901
+ var invokeCallback = false;
6902
+ if (children === null) {
6903
+ invokeCallback = true;
6904
+ } else {
6905
+ switch (type) {
6906
+ case 'string':
6907
+ case 'number':
6908
+ invokeCallback = true;
6909
+ break;
6910
+ case 'object':
6911
+ switch (children.$$typeof) {
6912
+ case REACT_ELEMENT_TYPE:
6913
+ case REACT_PORTAL_TYPE:
6914
+ invokeCallback = true;
6915
+ }
6916
+ }
6917
+ }
6918
+ if (invokeCallback) {
6919
+ var _child = children;
6920
+ var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
6921
+ // so that it's consistent if the number of children grows:
6922
+
6923
+ var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
6924
+ if (isArray(mappedChild)) {
6925
+ var escapedChildKey = '';
6926
+ if (childKey != null) {
6927
+ escapedChildKey = escapeUserProvidedKey(childKey) + '/';
6928
+ }
6929
+ mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
6930
+ return c;
6931
+ });
6932
+ } else if (mappedChild != null) {
6933
+ if (isValidElement(mappedChild)) {
6934
+ {
6935
+ // The `if` statement here prevents auto-disabling of the safe
6936
+ // coercion ESLint rule, so we must manually disable it below.
6937
+ // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
6938
+ if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
6939
+ checkKeyStringCoercion(mappedChild.key);
6940
+ }
6941
+ }
6942
+ mappedChild = cloneAndReplaceKey(mappedChild,
6943
+ // Keep both the (mapped) and old keys if they differ, just as
6944
+ // traverseAllChildren used to do for objects as children
6945
+ escapedPrefix + (
6946
+ // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
6947
+ mappedChild.key && (!_child || _child.key !== mappedChild.key) ?
6948
+ // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
6949
+ // eslint-disable-next-line react-internal/safe-string-coercion
6950
+ escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
6951
+ }
6952
+ array.push(mappedChild);
6953
+ }
6954
+ return 1;
6955
+ }
6956
+ var child;
6957
+ var nextName;
6958
+ var subtreeCount = 0; // Count of children found in the current subtree.
6959
+
6960
+ var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
6961
+ if (isArray(children)) {
6962
+ for (var i = 0; i < children.length; i++) {
6963
+ child = children[i];
6964
+ nextName = nextNamePrefix + getElementKey(child, i);
6965
+ subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
6966
+ }
6967
+ } else {
6968
+ var iteratorFn = getIteratorFn(children);
6969
+ if (typeof iteratorFn === 'function') {
6970
+ var iterableChildren = children;
6971
+ {
6972
+ // Warn about using Maps as children
6973
+ if (iteratorFn === iterableChildren.entries) {
6974
+ if (!didWarnAboutMaps) {
6975
+ warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
6976
+ }
6977
+ didWarnAboutMaps = true;
6978
+ }
6979
+ }
6980
+ var iterator = iteratorFn.call(iterableChildren);
6981
+ var step;
6982
+ var ii = 0;
6983
+ while (!(step = iterator.next()).done) {
6984
+ child = step.value;
6985
+ nextName = nextNamePrefix + getElementKey(child, ii++);
6986
+ subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
6987
+ }
6988
+ } else if (type === 'object') {
6989
+ // eslint-disable-next-line react-internal/safe-string-coercion
6990
+ var childrenString = String(children);
6991
+ throw new Error("Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.');
6992
+ }
6993
+ }
6994
+ return subtreeCount;
6995
+ }
6996
+
6997
+ /**
6998
+ * Maps children that are typically specified as `props.children`.
6999
+ *
7000
+ * See https://reactjs.org/docs/react-api.html#reactchildrenmap
7001
+ *
7002
+ * The provided mapFunction(child, index) will be called for each
7003
+ * leaf child.
7004
+ *
7005
+ * @param {?*} children Children tree container.
7006
+ * @param {function(*, int)} func The map function.
7007
+ * @param {*} context Context for mapFunction.
7008
+ * @return {object} Object containing the ordered map of results.
7009
+ */
7010
+ function mapChildren(children, func, context) {
7011
+ if (children == null) {
7012
+ return children;
7013
+ }
7014
+ var result = [];
7015
+ var count = 0;
7016
+ mapIntoArray(children, result, '', '', function (child) {
7017
+ return func.call(context, child, count++);
7018
+ });
7019
+ return result;
7020
+ }
7021
+ /**
7022
+ * Count the number of children that are typically specified as
7023
+ * `props.children`.
7024
+ *
7025
+ * See https://reactjs.org/docs/react-api.html#reactchildrencount
7026
+ *
7027
+ * @param {?*} children Children tree container.
7028
+ * @return {number} The number of children.
7029
+ */
7030
+
7031
+ function countChildren(children) {
7032
+ var n = 0;
7033
+ mapChildren(children, function () {
7034
+ n++; // Don't return anything
7035
+ });
7036
+ return n;
7037
+ }
7038
+
7039
+ /**
7040
+ * Iterates through children that are typically specified as `props.children`.
7041
+ *
7042
+ * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
7043
+ *
7044
+ * The provided forEachFunc(child, index) will be called for each
7045
+ * leaf child.
7046
+ *
7047
+ * @param {?*} children Children tree container.
7048
+ * @param {function(*, int)} forEachFunc
7049
+ * @param {*} forEachContext Context for forEachContext.
7050
+ */
7051
+ function forEachChildren(children, forEachFunc, forEachContext) {
7052
+ mapChildren(children, function () {
7053
+ forEachFunc.apply(this, arguments); // Don't return anything.
7054
+ }, forEachContext);
7055
+ }
7056
+ /**
7057
+ * Flatten a children object (typically specified as `props.children`) and
7058
+ * return an array with appropriately re-keyed children.
7059
+ *
7060
+ * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
7061
+ */
7062
+
7063
+ function toArray(children) {
7064
+ return mapChildren(children, function (child) {
7065
+ return child;
7066
+ }) || [];
7067
+ }
7068
+ /**
7069
+ * Returns the first child in a collection of children and verifies that there
7070
+ * is only one child in the collection.
7071
+ *
7072
+ * See https://reactjs.org/docs/react-api.html#reactchildrenonly
7073
+ *
7074
+ * The current implementation of this function assumes that a single child gets
7075
+ * passed without a wrapper, but the purpose of this helper function is to
7076
+ * abstract away the particular structure of children.
7077
+ *
7078
+ * @param {?object} children Child collection structure.
7079
+ * @return {ReactElement} The first and only `ReactElement` contained in the
7080
+ * structure.
7081
+ */
7082
+
7083
+ function onlyChild(children) {
7084
+ if (!isValidElement(children)) {
7085
+ throw new Error('React.Children.only expected to receive a single React element child.');
7086
+ }
7087
+ return children;
7088
+ }
7089
+ function createContext(defaultValue) {
7090
+ // TODO: Second argument used to be an optional `calculateChangedBits`
7091
+ // function. Warn to reserve for future use?
7092
+ var context = {
7093
+ $$typeof: REACT_CONTEXT_TYPE,
7094
+ // As a workaround to support multiple concurrent renderers, we categorize
7095
+ // some renderers as primary and others as secondary. We only expect
7096
+ // there to be two concurrent renderers at most: React Native (primary) and
7097
+ // Fabric (secondary); React DOM (primary) and React ART (secondary).
7098
+ // Secondary renderers store their context values on separate fields.
7099
+ _currentValue: defaultValue,
7100
+ _currentValue2: defaultValue,
7101
+ // Used to track how many concurrent renderers this context currently
7102
+ // supports within in a single renderer. Such as parallel server rendering.
7103
+ _threadCount: 0,
7104
+ // These are circular
7105
+ Provider: null,
7106
+ Consumer: null,
7107
+ // Add these to use same hidden class in VM as ServerContext
7108
+ _defaultValue: null,
7109
+ _globalName: null
7110
+ };
7111
+ context.Provider = {
7112
+ $$typeof: REACT_PROVIDER_TYPE,
7113
+ _context: context
7114
+ };
7115
+ var hasWarnedAboutUsingNestedContextConsumers = false;
7116
+ var hasWarnedAboutUsingConsumerProvider = false;
7117
+ var hasWarnedAboutDisplayNameOnConsumer = false;
7118
+ {
7119
+ // A separate object, but proxies back to the original context object for
7120
+ // backwards compatibility. It has a different $$typeof, so we can properly
7121
+ // warn for the incorrect usage of Context as a Consumer.
7122
+ var Consumer = {
7123
+ $$typeof: REACT_CONTEXT_TYPE,
7124
+ _context: context
7125
+ }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
7126
+
7127
+ Object.defineProperties(Consumer, {
7128
+ Provider: {
7129
+ get: function () {
7130
+ if (!hasWarnedAboutUsingConsumerProvider) {
7131
+ hasWarnedAboutUsingConsumerProvider = true;
7132
+ error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
7133
+ }
7134
+ return context.Provider;
7135
+ },
7136
+ set: function (_Provider) {
7137
+ context.Provider = _Provider;
7138
+ }
7139
+ },
7140
+ _currentValue: {
7141
+ get: function () {
7142
+ return context._currentValue;
7143
+ },
7144
+ set: function (_currentValue) {
7145
+ context._currentValue = _currentValue;
7146
+ }
7147
+ },
7148
+ _currentValue2: {
7149
+ get: function () {
7150
+ return context._currentValue2;
7151
+ },
7152
+ set: function (_currentValue2) {
7153
+ context._currentValue2 = _currentValue2;
7154
+ }
7155
+ },
7156
+ _threadCount: {
7157
+ get: function () {
7158
+ return context._threadCount;
7159
+ },
7160
+ set: function (_threadCount) {
7161
+ context._threadCount = _threadCount;
7162
+ }
7163
+ },
7164
+ Consumer: {
7165
+ get: function () {
7166
+ if (!hasWarnedAboutUsingNestedContextConsumers) {
7167
+ hasWarnedAboutUsingNestedContextConsumers = true;
7168
+ error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
7169
+ }
7170
+ return context.Consumer;
7171
+ }
7172
+ },
7173
+ displayName: {
7174
+ get: function () {
7175
+ return context.displayName;
7176
+ },
7177
+ set: function (displayName) {
7178
+ if (!hasWarnedAboutDisplayNameOnConsumer) {
7179
+ warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
7180
+ hasWarnedAboutDisplayNameOnConsumer = true;
7181
+ }
7182
+ }
7183
+ }
7184
+ }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
7185
+
7186
+ context.Consumer = Consumer;
7187
+ }
7188
+ {
7189
+ context._currentRenderer = null;
7190
+ context._currentRenderer2 = null;
7191
+ }
7192
+ return context;
7193
+ }
7194
+ var Uninitialized = -1;
7195
+ var Pending = 0;
7196
+ var Resolved = 1;
7197
+ var Rejected = 2;
7198
+ function lazyInitializer(payload) {
7199
+ if (payload._status === Uninitialized) {
7200
+ var ctor = payload._result;
7201
+ var thenable = ctor(); // Transition to the next state.
7202
+ // This might throw either because it's missing or throws. If so, we treat it
7203
+ // as still uninitialized and try again next time. Which is the same as what
7204
+ // happens if the ctor or any wrappers processing the ctor throws. This might
7205
+ // end up fixing it if the resolution was a concurrency bug.
7206
+
7207
+ thenable.then(function (moduleObject) {
7208
+ if (payload._status === Pending || payload._status === Uninitialized) {
7209
+ // Transition to the next state.
7210
+ var resolved = payload;
7211
+ resolved._status = Resolved;
7212
+ resolved._result = moduleObject;
7213
+ }
7214
+ }, function (error) {
7215
+ if (payload._status === Pending || payload._status === Uninitialized) {
7216
+ // Transition to the next state.
7217
+ var rejected = payload;
7218
+ rejected._status = Rejected;
7219
+ rejected._result = error;
7220
+ }
7221
+ });
7222
+ if (payload._status === Uninitialized) {
7223
+ // In case, we're still uninitialized, then we're waiting for the thenable
7224
+ // to resolve. Set it as pending in the meantime.
7225
+ var pending = payload;
7226
+ pending._status = Pending;
7227
+ pending._result = thenable;
7228
+ }
7229
+ }
7230
+ if (payload._status === Resolved) {
7231
+ var moduleObject = payload._result;
7232
+ {
7233
+ if (moduleObject === undefined) {
7234
+ error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' +
7235
+ // Break up imports to avoid accidentally parsing them as dependencies.
7236
+ 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))\n\n" + 'Did you accidentally put curly braces around the import?', moduleObject);
7237
+ }
7238
+ }
7239
+ {
7240
+ if (!('default' in moduleObject)) {
7241
+ error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' +
7242
+ // Break up imports to avoid accidentally parsing them as dependencies.
7243
+ 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
7244
+ }
7245
+ }
7246
+ return moduleObject.default;
7247
+ } else {
7248
+ throw payload._result;
7249
+ }
7250
+ }
7251
+ function lazy(ctor) {
7252
+ var payload = {
7253
+ // We use these fields to store the result.
7254
+ _status: Uninitialized,
7255
+ _result: ctor
7256
+ };
7257
+ var lazyType = {
7258
+ $$typeof: REACT_LAZY_TYPE,
7259
+ _payload: payload,
7260
+ _init: lazyInitializer
7261
+ };
7262
+ {
7263
+ // In production, this would just set it on the object.
7264
+ var defaultProps;
7265
+ var propTypes; // $FlowFixMe
7266
+
7267
+ Object.defineProperties(lazyType, {
7268
+ defaultProps: {
7269
+ configurable: true,
7270
+ get: function () {
7271
+ return defaultProps;
7272
+ },
7273
+ set: function (newDefaultProps) {
7274
+ error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
7275
+ defaultProps = newDefaultProps; // Match production behavior more closely:
7276
+ // $FlowFixMe
7277
+
7278
+ Object.defineProperty(lazyType, 'defaultProps', {
7279
+ enumerable: true
7280
+ });
7281
+ }
7282
+ },
7283
+ propTypes: {
7284
+ configurable: true,
7285
+ get: function () {
7286
+ return propTypes;
7287
+ },
7288
+ set: function (newPropTypes) {
7289
+ error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
7290
+ propTypes = newPropTypes; // Match production behavior more closely:
7291
+ // $FlowFixMe
7292
+
7293
+ Object.defineProperty(lazyType, 'propTypes', {
7294
+ enumerable: true
7295
+ });
7296
+ }
7297
+ }
7298
+ });
7299
+ }
7300
+ return lazyType;
7301
+ }
7302
+ function forwardRef(render) {
7303
+ {
7304
+ if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
7305
+ error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
7306
+ } else if (typeof render !== 'function') {
7307
+ error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
7308
+ } else {
7309
+ if (render.length !== 0 && render.length !== 2) {
7310
+ error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
7311
+ }
7312
+ }
7313
+ if (render != null) {
7314
+ if (render.defaultProps != null || render.propTypes != null) {
7315
+ error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
7316
+ }
7317
+ }
7318
+ }
7319
+ var elementType = {
7320
+ $$typeof: REACT_FORWARD_REF_TYPE,
7321
+ render: render
7322
+ };
7323
+ {
7324
+ var ownName;
7325
+ Object.defineProperty(elementType, 'displayName', {
7326
+ enumerable: false,
7327
+ configurable: true,
7328
+ get: function () {
7329
+ return ownName;
7330
+ },
7331
+ set: function (name) {
7332
+ ownName = name; // The inner component shouldn't inherit this display name in most cases,
7333
+ // because the component may be used elsewhere.
7334
+ // But it's nice for anonymous functions to inherit the name,
7335
+ // so that our component-stack generation logic will display their frames.
7336
+ // An anonymous function generally suggests a pattern like:
7337
+ // React.forwardRef((props, ref) => {...});
7338
+ // This kind of inner function is not used elsewhere so the side effect is okay.
7339
+
7340
+ if (!render.name && !render.displayName) {
7341
+ render.displayName = name;
7342
+ }
7343
+ }
7344
+ });
7345
+ }
7346
+ return elementType;
7347
+ }
7348
+ var REACT_MODULE_REFERENCE;
7349
+ {
7350
+ REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
7351
+ }
7352
+ function isValidElementType(type) {
7353
+ if (typeof type === 'string' || typeof type === 'function') {
7354
+ return true;
7355
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
7356
+
7357
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
7358
+ return true;
7359
+ }
7360
+ if (typeof type === 'object' && type !== null) {
7361
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE ||
7362
+ // This needs to include all possible module reference object
7363
+ // types supported by any Flight configuration anywhere since
7364
+ // we don't know which Flight build this will end up being used
7365
+ // with.
7366
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
7367
+ return true;
7368
+ }
7369
+ }
7370
+ return false;
7371
+ }
7372
+ function memo(type, compare) {
7373
+ {
7374
+ if (!isValidElementType(type)) {
7375
+ error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
7376
+ }
7377
+ }
7378
+ var elementType = {
7379
+ $$typeof: REACT_MEMO_TYPE,
7380
+ type: type,
7381
+ compare: compare === undefined ? null : compare
7382
+ };
7383
+ {
7384
+ var ownName;
7385
+ Object.defineProperty(elementType, 'displayName', {
7386
+ enumerable: false,
7387
+ configurable: true,
7388
+ get: function () {
7389
+ return ownName;
7390
+ },
7391
+ set: function (name) {
7392
+ ownName = name; // The inner component shouldn't inherit this display name in most cases,
7393
+ // because the component may be used elsewhere.
7394
+ // But it's nice for anonymous functions to inherit the name,
7395
+ // so that our component-stack generation logic will display their frames.
7396
+ // An anonymous function generally suggests a pattern like:
7397
+ // React.memo((props) => {...});
7398
+ // This kind of inner function is not used elsewhere so the side effect is okay.
7399
+
7400
+ if (!type.name && !type.displayName) {
7401
+ type.displayName = name;
7402
+ }
7403
+ }
7404
+ });
7405
+ }
7406
+ return elementType;
7407
+ }
7408
+ function resolveDispatcher() {
7409
+ var dispatcher = ReactCurrentDispatcher.current;
7410
+ {
7411
+ if (dispatcher === null) {
7412
+ error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
7413
+ }
7414
+ } // Will result in a null access error if accessed outside render phase. We
7415
+ // intentionally don't throw our own error because this is in a hot path.
7416
+ // Also helps ensure this is inlined.
7417
+
7418
+ return dispatcher;
7419
+ }
7420
+ function useContext(Context) {
7421
+ var dispatcher = resolveDispatcher();
7422
+ {
7423
+ // TODO: add a more generic warning for invalid values.
7424
+ if (Context._context !== undefined) {
7425
+ var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
7426
+ // and nobody should be using this in existing code.
7427
+
7428
+ if (realContext.Consumer === Context) {
7429
+ error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
7430
+ } else if (realContext.Provider === Context) {
7431
+ error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
7432
+ }
7433
+ }
7434
+ }
7435
+ return dispatcher.useContext(Context);
7436
+ }
7437
+ function useState(initialState) {
7438
+ var dispatcher = resolveDispatcher();
7439
+ return dispatcher.useState(initialState);
7440
+ }
7441
+ function useReducer(reducer, initialArg, init) {
7442
+ var dispatcher = resolveDispatcher();
7443
+ return dispatcher.useReducer(reducer, initialArg, init);
7444
+ }
7445
+ function useRef(initialValue) {
7446
+ var dispatcher = resolveDispatcher();
7447
+ return dispatcher.useRef(initialValue);
7448
+ }
7449
+ function useEffect(create, deps) {
7450
+ var dispatcher = resolveDispatcher();
7451
+ return dispatcher.useEffect(create, deps);
7452
+ }
7453
+ function useInsertionEffect(create, deps) {
7454
+ var dispatcher = resolveDispatcher();
7455
+ return dispatcher.useInsertionEffect(create, deps);
7456
+ }
7457
+ function useLayoutEffect(create, deps) {
7458
+ var dispatcher = resolveDispatcher();
7459
+ return dispatcher.useLayoutEffect(create, deps);
7460
+ }
7461
+ function useCallback(callback, deps) {
7462
+ var dispatcher = resolveDispatcher();
7463
+ return dispatcher.useCallback(callback, deps);
7464
+ }
7465
+ function useMemo(create, deps) {
7466
+ var dispatcher = resolveDispatcher();
7467
+ return dispatcher.useMemo(create, deps);
7468
+ }
7469
+ function useImperativeHandle(ref, create, deps) {
7470
+ var dispatcher = resolveDispatcher();
7471
+ return dispatcher.useImperativeHandle(ref, create, deps);
7472
+ }
7473
+ function useDebugValue(value, formatterFn) {
7474
+ {
7475
+ var dispatcher = resolveDispatcher();
7476
+ return dispatcher.useDebugValue(value, formatterFn);
7477
+ }
7478
+ }
7479
+ function useTransition() {
7480
+ var dispatcher = resolveDispatcher();
7481
+ return dispatcher.useTransition();
7482
+ }
7483
+ function useDeferredValue(value) {
7484
+ var dispatcher = resolveDispatcher();
7485
+ return dispatcher.useDeferredValue(value);
7486
+ }
7487
+ function useId() {
7488
+ var dispatcher = resolveDispatcher();
7489
+ return dispatcher.useId();
7490
+ }
7491
+ function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
7492
+ var dispatcher = resolveDispatcher();
7493
+ return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
7494
+ }
7495
+
7496
+ // Helpers to patch console.logs to avoid logging during side-effect free
7497
+ // replaying on render function. This currently only patches the object
7498
+ // lazily which won't cover if the log function was extracted eagerly.
7499
+ // We could also eagerly patch the method.
7500
+ var disabledDepth = 0;
7501
+ var prevLog;
7502
+ var prevInfo;
7503
+ var prevWarn;
7504
+ var prevError;
7505
+ var prevGroup;
7506
+ var prevGroupCollapsed;
7507
+ var prevGroupEnd;
7508
+ function disabledLog() {}
7509
+ disabledLog.__reactDisabledLog = true;
7510
+ function disableLogs() {
7511
+ {
7512
+ if (disabledDepth === 0) {
7513
+ /* eslint-disable react-internal/no-production-logging */
7514
+ prevLog = console.log;
7515
+ prevInfo = console.info;
7516
+ prevWarn = console.warn;
7517
+ prevError = console.error;
7518
+ prevGroup = console.group;
7519
+ prevGroupCollapsed = console.groupCollapsed;
7520
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
7521
+
7522
+ var props = {
7523
+ configurable: true,
7524
+ enumerable: true,
7525
+ value: disabledLog,
7526
+ writable: true
7527
+ }; // $FlowFixMe Flow thinks console is immutable.
7528
+
7529
+ Object.defineProperties(console, {
7530
+ info: props,
7531
+ log: props,
7532
+ warn: props,
7533
+ error: props,
7534
+ group: props,
7535
+ groupCollapsed: props,
7536
+ groupEnd: props
7537
+ });
7538
+ /* eslint-enable react-internal/no-production-logging */
7539
+ }
7540
+ disabledDepth++;
7541
+ }
7542
+ }
7543
+ function reenableLogs() {
7544
+ {
7545
+ disabledDepth--;
7546
+ if (disabledDepth === 0) {
7547
+ /* eslint-disable react-internal/no-production-logging */
7548
+ var props = {
7549
+ configurable: true,
7550
+ enumerable: true,
7551
+ writable: true
7552
+ }; // $FlowFixMe Flow thinks console is immutable.
7553
+
7554
+ Object.defineProperties(console, {
7555
+ log: assign({}, props, {
7556
+ value: prevLog
7557
+ }),
7558
+ info: assign({}, props, {
7559
+ value: prevInfo
7560
+ }),
7561
+ warn: assign({}, props, {
7562
+ value: prevWarn
7563
+ }),
7564
+ error: assign({}, props, {
7565
+ value: prevError
7566
+ }),
7567
+ group: assign({}, props, {
7568
+ value: prevGroup
7569
+ }),
7570
+ groupCollapsed: assign({}, props, {
7571
+ value: prevGroupCollapsed
7572
+ }),
7573
+ groupEnd: assign({}, props, {
7574
+ value: prevGroupEnd
7575
+ })
7576
+ });
7577
+ /* eslint-enable react-internal/no-production-logging */
7578
+ }
7579
+ if (disabledDepth < 0) {
7580
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
7581
+ }
7582
+ }
7583
+ }
7584
+ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
7585
+ var prefix;
7586
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
7587
+ {
7588
+ if (prefix === undefined) {
7589
+ // Extract the VM specific prefix used by each line.
7590
+ try {
7591
+ throw Error();
7592
+ } catch (x) {
7593
+ var match = x.stack.trim().match(/\n( *(at )?)/);
7594
+ prefix = match && match[1] || '';
7595
+ }
7596
+ } // We use the prefix to ensure our stacks line up with native stack frames.
7597
+
7598
+ return '\n' + prefix + name;
7599
+ }
7600
+ }
7601
+ var reentry = false;
7602
+ var componentFrameCache;
7603
+ {
7604
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
7605
+ componentFrameCache = new PossiblyWeakMap();
7606
+ }
7607
+ function describeNativeComponentFrame(fn, construct) {
7608
+ // If something asked for a stack inside a fake render, it should get ignored.
7609
+ if (!fn || reentry) {
7610
+ return '';
7611
+ }
7612
+ {
7613
+ var frame = componentFrameCache.get(fn);
7614
+ if (frame !== undefined) {
7615
+ return frame;
7616
+ }
7617
+ }
7618
+ var control;
7619
+ reentry = true;
7620
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
7621
+
7622
+ Error.prepareStackTrace = undefined;
7623
+ var previousDispatcher;
7624
+ {
7625
+ previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
7626
+ // for warnings.
7627
+
7628
+ ReactCurrentDispatcher$1.current = null;
7629
+ disableLogs();
7630
+ }
7631
+ try {
7632
+ // This should throw.
7633
+ if (construct) {
7634
+ // Something should be setting the props in the constructor.
7635
+ var Fake = function () {
7636
+ throw Error();
7637
+ }; // $FlowFixMe
7638
+
7639
+ Object.defineProperty(Fake.prototype, 'props', {
7640
+ set: function () {
7641
+ // We use a throwing setter instead of frozen or non-writable props
7642
+ // because that won't throw in a non-strict mode function.
7643
+ throw Error();
7644
+ }
7645
+ });
7646
+ if (typeof Reflect === 'object' && Reflect.construct) {
7647
+ // We construct a different control for this case to include any extra
7648
+ // frames added by the construct call.
7649
+ try {
7650
+ Reflect.construct(Fake, []);
7651
+ } catch (x) {
7652
+ control = x;
7653
+ }
7654
+ Reflect.construct(fn, [], Fake);
7655
+ } else {
7656
+ try {
7657
+ Fake.call();
7658
+ } catch (x) {
7659
+ control = x;
7660
+ }
7661
+ fn.call(Fake.prototype);
7662
+ }
7663
+ } else {
7664
+ try {
7665
+ throw Error();
7666
+ } catch (x) {
7667
+ control = x;
7668
+ }
7669
+ fn();
7670
+ }
7671
+ } catch (sample) {
7672
+ // This is inlined manually because closure doesn't do it for us.
7673
+ if (sample && control && typeof sample.stack === 'string') {
7674
+ // This extracts the first frame from the sample that isn't also in the control.
7675
+ // Skipping one frame that we assume is the frame that calls the two.
7676
+ var sampleLines = sample.stack.split('\n');
7677
+ var controlLines = control.stack.split('\n');
7678
+ var s = sampleLines.length - 1;
7679
+ var c = controlLines.length - 1;
7680
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
7681
+ // We expect at least one stack frame to be shared.
7682
+ // Typically this will be the root most one. However, stack frames may be
7683
+ // cut off due to maximum stack limits. In this case, one maybe cut off
7684
+ // earlier than the other. We assume that the sample is longer or the same
7685
+ // and there for cut off earlier. So we should find the root most frame in
7686
+ // the sample somewhere in the control.
7687
+ c--;
7688
+ }
7689
+ for (; s >= 1 && c >= 0; s--, c--) {
7690
+ // Next we find the first one that isn't the same which should be the
7691
+ // frame that called our sample function and the control.
7692
+ if (sampleLines[s] !== controlLines[c]) {
7693
+ // In V8, the first line is describing the message but other VMs don't.
7694
+ // If we're about to return the first line, and the control is also on the same
7695
+ // line, that's a pretty good indicator that our sample threw at same line as
7696
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
7697
+ // This can happen if you passed a class to function component, or non-function.
7698
+ if (s !== 1 || c !== 1) {
7699
+ do {
7700
+ s--;
7701
+ c--; // We may still have similar intermediate frames from the construct call.
7702
+ // The next one that isn't the same should be our match though.
7703
+
7704
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
7705
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
7706
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
7707
+ // but we have a user-provided "displayName"
7708
+ // splice it in to make the stack more readable.
7709
+
7710
+ if (fn.displayName && _frame.includes('<anonymous>')) {
7711
+ _frame = _frame.replace('<anonymous>', fn.displayName);
7712
+ }
7713
+ {
7714
+ if (typeof fn === 'function') {
7715
+ componentFrameCache.set(fn, _frame);
7716
+ }
7717
+ } // Return the line we found.
7718
+
7719
+ return _frame;
7720
+ }
7721
+ } while (s >= 1 && c >= 0);
7722
+ }
7723
+ break;
7724
+ }
7725
+ }
7726
+ }
7727
+ } finally {
7728
+ reentry = false;
7729
+ {
7730
+ ReactCurrentDispatcher$1.current = previousDispatcher;
7731
+ reenableLogs();
7732
+ }
7733
+ Error.prepareStackTrace = previousPrepareStackTrace;
7734
+ } // Fallback to just using the name if we couldn't make it throw.
7735
+
7736
+ var name = fn ? fn.displayName || fn.name : '';
7737
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
7738
+ {
7739
+ if (typeof fn === 'function') {
7740
+ componentFrameCache.set(fn, syntheticFrame);
7741
+ }
7742
+ }
7743
+ return syntheticFrame;
7744
+ }
7745
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
7746
+ {
7747
+ return describeNativeComponentFrame(fn, false);
7748
+ }
7749
+ }
7750
+ function shouldConstruct(Component) {
7751
+ var prototype = Component.prototype;
7752
+ return !!(prototype && prototype.isReactComponent);
7753
+ }
7754
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
7755
+ if (type == null) {
7756
+ return '';
7757
+ }
7758
+ if (typeof type === 'function') {
7759
+ {
7760
+ return describeNativeComponentFrame(type, shouldConstruct(type));
7761
+ }
7762
+ }
7763
+ if (typeof type === 'string') {
7764
+ return describeBuiltInComponentFrame(type);
7765
+ }
7766
+ switch (type) {
7767
+ case REACT_SUSPENSE_TYPE:
7768
+ return describeBuiltInComponentFrame('Suspense');
7769
+ case REACT_SUSPENSE_LIST_TYPE:
7770
+ return describeBuiltInComponentFrame('SuspenseList');
7771
+ }
7772
+ if (typeof type === 'object') {
7773
+ switch (type.$$typeof) {
7774
+ case REACT_FORWARD_REF_TYPE:
7775
+ return describeFunctionComponentFrame(type.render);
7776
+ case REACT_MEMO_TYPE:
7777
+ // Memo may contain any component type so we recursively resolve it.
7778
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
7779
+ case REACT_LAZY_TYPE:
7780
+ {
7781
+ var lazyComponent = type;
7782
+ var payload = lazyComponent._payload;
7783
+ var init = lazyComponent._init;
7784
+ try {
7785
+ // Lazy may contain any component type so we recursively resolve it.
7786
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
7787
+ } catch (x) {}
7788
+ }
7789
+ }
7790
+ }
7791
+ return '';
7792
+ }
7793
+ var loggedTypeFailures = {};
7794
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
7795
+ function setCurrentlyValidatingElement(element) {
7796
+ {
7797
+ if (element) {
7798
+ var owner = element._owner;
7799
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
7800
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
7801
+ } else {
7802
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
7803
+ }
7804
+ }
7805
+ }
7806
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
7807
+ {
7808
+ // $FlowFixMe This is okay but Flow doesn't know it.
7809
+ var has = Function.call.bind(hasOwnProperty);
7810
+ for (var typeSpecName in typeSpecs) {
7811
+ if (has(typeSpecs, typeSpecName)) {
7812
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
7813
+ // fail the render phase where it didn't fail before. So we log it.
7814
+ // After these have been cleaned up, we'll let them throw.
7815
+
7816
+ try {
7817
+ // This is intentionally an invariant that gets caught. It's the same
7818
+ // behavior as without this statement except with a better message.
7819
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
7820
+ // eslint-disable-next-line react-internal/prod-error-codes
7821
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
7822
+ err.name = 'Invariant Violation';
7823
+ throw err;
7824
+ }
7825
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
7826
+ } catch (ex) {
7827
+ error$1 = ex;
7828
+ }
7829
+ if (error$1 && !(error$1 instanceof Error)) {
7830
+ setCurrentlyValidatingElement(element);
7831
+ error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
7832
+ setCurrentlyValidatingElement(null);
7833
+ }
7834
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
7835
+ // Only monitor this failure once because there tends to be a lot of the
7836
+ // same error.
7837
+ loggedTypeFailures[error$1.message] = true;
7838
+ setCurrentlyValidatingElement(element);
7839
+ error('Failed %s type: %s', location, error$1.message);
7840
+ setCurrentlyValidatingElement(null);
7841
+ }
7842
+ }
7843
+ }
7844
+ }
7845
+ }
7846
+ function setCurrentlyValidatingElement$1(element) {
7847
+ {
7848
+ if (element) {
7849
+ var owner = element._owner;
7850
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
7851
+ setExtraStackFrame(stack);
7852
+ } else {
7853
+ setExtraStackFrame(null);
7854
+ }
7855
+ }
7856
+ }
7857
+ var propTypesMisspellWarningShown;
7858
+ {
7859
+ propTypesMisspellWarningShown = false;
7860
+ }
7861
+ function getDeclarationErrorAddendum() {
7862
+ if (ReactCurrentOwner.current) {
7863
+ var name = getComponentNameFromType(ReactCurrentOwner.current.type);
7864
+ if (name) {
7865
+ return '\n\nCheck the render method of `' + name + '`.';
7866
+ }
7867
+ }
7868
+ return '';
7869
+ }
7870
+ function getSourceInfoErrorAddendum(source) {
7871
+ if (source !== undefined) {
7872
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
7873
+ var lineNumber = source.lineNumber;
7874
+ return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
7875
+ }
7876
+ return '';
7877
+ }
7878
+ function getSourceInfoErrorAddendumForProps(elementProps) {
7879
+ if (elementProps !== null && elementProps !== undefined) {
7880
+ return getSourceInfoErrorAddendum(elementProps.__source);
7881
+ }
7882
+ return '';
7883
+ }
7884
+ /**
7885
+ * Warn if there's no key explicitly set on dynamic arrays of children or
7886
+ * object keys are not valid. This allows us to keep track of children between
7887
+ * updates.
7888
+ */
7889
+
7890
+ var ownerHasKeyUseWarning = {};
7891
+ function getCurrentComponentErrorInfo(parentType) {
7892
+ var info = getDeclarationErrorAddendum();
7893
+ if (!info) {
7894
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
7895
+ if (parentName) {
7896
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
7897
+ }
7898
+ }
7899
+ return info;
7900
+ }
7901
+ /**
7902
+ * Warn if the element doesn't have an explicit key assigned to it.
7903
+ * This element is in an array. The array could grow and shrink or be
7904
+ * reordered. All children that haven't already been validated are required to
7905
+ * have a "key" property assigned to it. Error statuses are cached so a warning
7906
+ * will only be shown once.
7907
+ *
7908
+ * @internal
7909
+ * @param {ReactElement} element Element that requires a key.
7910
+ * @param {*} parentType element's parent's type.
7911
+ */
7912
+
7913
+ function validateExplicitKey(element, parentType) {
7914
+ if (!element._store || element._store.validated || element.key != null) {
7915
+ return;
7916
+ }
7917
+ element._store.validated = true;
7918
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
7919
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
7920
+ return;
7921
+ }
7922
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
7923
+ // property, it may be the creator of the child that's responsible for
7924
+ // assigning it a key.
7925
+
7926
+ var childOwner = '';
7927
+ if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
7928
+ // Give the component that originally created this child.
7929
+ childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
7930
+ }
7931
+ {
7932
+ setCurrentlyValidatingElement$1(element);
7933
+ error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
7934
+ setCurrentlyValidatingElement$1(null);
7935
+ }
7936
+ }
7937
+ /**
7938
+ * Ensure that every element either is passed in a static location, in an
7939
+ * array with an explicit keys property defined, or in an object literal
7940
+ * with valid key property.
7941
+ *
7942
+ * @internal
7943
+ * @param {ReactNode} node Statically passed child of any type.
7944
+ * @param {*} parentType node's parent's type.
7945
+ */
7946
+
7947
+ function validateChildKeys(node, parentType) {
7948
+ if (typeof node !== 'object') {
7949
+ return;
7950
+ }
7951
+ if (isArray(node)) {
7952
+ for (var i = 0; i < node.length; i++) {
7953
+ var child = node[i];
7954
+ if (isValidElement(child)) {
7955
+ validateExplicitKey(child, parentType);
7956
+ }
7957
+ }
7958
+ } else if (isValidElement(node)) {
7959
+ // This element was passed in a valid location.
7960
+ if (node._store) {
7961
+ node._store.validated = true;
7962
+ }
7963
+ } else if (node) {
7964
+ var iteratorFn = getIteratorFn(node);
7965
+ if (typeof iteratorFn === 'function') {
7966
+ // Entry iterators used to provide implicit keys,
7967
+ // but now we print a separate warning for them later.
7968
+ if (iteratorFn !== node.entries) {
7969
+ var iterator = iteratorFn.call(node);
7970
+ var step;
7971
+ while (!(step = iterator.next()).done) {
7972
+ if (isValidElement(step.value)) {
7973
+ validateExplicitKey(step.value, parentType);
7974
+ }
7975
+ }
7976
+ }
7977
+ }
7978
+ }
7979
+ }
7980
+ /**
7981
+ * Given an element, validate that its props follow the propTypes definition,
7982
+ * provided by the type.
7983
+ *
7984
+ * @param {ReactElement} element
7985
+ */
7986
+
7987
+ function validatePropTypes(element) {
7988
+ {
7989
+ var type = element.type;
7990
+ if (type === null || type === undefined || typeof type === 'string') {
7991
+ return;
7992
+ }
7993
+ var propTypes;
7994
+ if (typeof type === 'function') {
7995
+ propTypes = type.propTypes;
7996
+ } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE ||
7997
+ // Note: Memo only checks outer props here.
7998
+ // Inner props are checked in the reconciler.
7999
+ type.$$typeof === REACT_MEMO_TYPE)) {
8000
+ propTypes = type.propTypes;
8001
+ } else {
8002
+ return;
8003
+ }
8004
+ if (propTypes) {
8005
+ // Intentionally inside to avoid triggering lazy initializers:
8006
+ var name = getComponentNameFromType(type);
8007
+ checkPropTypes(propTypes, element.props, 'prop', name, element);
8008
+ } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
8009
+ propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
8010
+
8011
+ var _name = getComponentNameFromType(type);
8012
+ error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
8013
+ }
8014
+ if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
8015
+ error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
8016
+ }
8017
+ }
8018
+ }
8019
+ /**
8020
+ * Given a fragment, validate that it can only be provided with fragment props
8021
+ * @param {ReactElement} fragment
8022
+ */
8023
+
8024
+ function validateFragmentProps(fragment) {
8025
+ {
8026
+ var keys = Object.keys(fragment.props);
8027
+ for (var i = 0; i < keys.length; i++) {
8028
+ var key = keys[i];
8029
+ if (key !== 'children' && key !== 'key') {
8030
+ setCurrentlyValidatingElement$1(fragment);
8031
+ error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
8032
+ setCurrentlyValidatingElement$1(null);
8033
+ break;
8034
+ }
8035
+ }
8036
+ if (fragment.ref !== null) {
8037
+ setCurrentlyValidatingElement$1(fragment);
8038
+ error('Invalid attribute `ref` supplied to `React.Fragment`.');
8039
+ setCurrentlyValidatingElement$1(null);
8040
+ }
8041
+ }
8042
+ }
8043
+ function createElementWithValidation(type, props, children) {
8044
+ var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
8045
+ // succeed and there will likely be errors in render.
8046
+
8047
+ if (!validType) {
8048
+ var info = '';
8049
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
8050
+ info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
8051
+ }
8052
+ var sourceInfo = getSourceInfoErrorAddendumForProps(props);
8053
+ if (sourceInfo) {
8054
+ info += sourceInfo;
8055
+ } else {
8056
+ info += getDeclarationErrorAddendum();
8057
+ }
8058
+ var typeString;
8059
+ if (type === null) {
8060
+ typeString = 'null';
8061
+ } else if (isArray(type)) {
8062
+ typeString = 'array';
8063
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
8064
+ typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
8065
+ info = ' Did you accidentally export a JSX literal instead of a component?';
8066
+ } else {
8067
+ typeString = typeof type;
8068
+ }
8069
+ {
8070
+ error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
8071
+ }
8072
+ }
8073
+ var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
8074
+ // TODO: Drop this when these are no longer allowed as the type argument.
8075
+
8076
+ if (element == null) {
8077
+ return element;
8078
+ } // Skip key warning if the type isn't valid since our key validation logic
8079
+ // doesn't expect a non-string/function type and can throw confusing errors.
8080
+ // We don't want exception behavior to differ between dev and prod.
8081
+ // (Rendering will throw with a helpful message and as soon as the type is
8082
+ // fixed, the key warnings will appear.)
8083
+
8084
+ if (validType) {
8085
+ for (var i = 2; i < arguments.length; i++) {
8086
+ validateChildKeys(arguments[i], type);
8087
+ }
8088
+ }
8089
+ if (type === REACT_FRAGMENT_TYPE) {
8090
+ validateFragmentProps(element);
8091
+ } else {
8092
+ validatePropTypes(element);
8093
+ }
8094
+ return element;
8095
+ }
8096
+ var didWarnAboutDeprecatedCreateFactory = false;
8097
+ function createFactoryWithValidation(type) {
8098
+ var validatedFactory = createElementWithValidation.bind(null, type);
8099
+ validatedFactory.type = type;
8100
+ {
8101
+ if (!didWarnAboutDeprecatedCreateFactory) {
8102
+ didWarnAboutDeprecatedCreateFactory = true;
8103
+ warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
8104
+ } // Legacy hook: remove it
8105
+
8106
+ Object.defineProperty(validatedFactory, 'type', {
8107
+ enumerable: false,
8108
+ get: function () {
8109
+ warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
8110
+ Object.defineProperty(this, 'type', {
8111
+ value: type
8112
+ });
8113
+ return type;
8114
+ }
8115
+ });
8116
+ }
8117
+ return validatedFactory;
8118
+ }
8119
+ function cloneElementWithValidation(element, props, children) {
8120
+ var newElement = cloneElement.apply(this, arguments);
8121
+ for (var i = 2; i < arguments.length; i++) {
8122
+ validateChildKeys(arguments[i], newElement.type);
8123
+ }
8124
+ validatePropTypes(newElement);
8125
+ return newElement;
8126
+ }
8127
+ function startTransition(scope, options) {
8128
+ var prevTransition = ReactCurrentBatchConfig.transition;
8129
+ ReactCurrentBatchConfig.transition = {};
8130
+ var currentTransition = ReactCurrentBatchConfig.transition;
8131
+ {
8132
+ ReactCurrentBatchConfig.transition._updatedFibers = new Set();
8133
+ }
8134
+ try {
8135
+ scope();
8136
+ } finally {
8137
+ ReactCurrentBatchConfig.transition = prevTransition;
8138
+ {
8139
+ if (prevTransition === null && currentTransition._updatedFibers) {
8140
+ var updatedFibersCount = currentTransition._updatedFibers.size;
8141
+ if (updatedFibersCount > 10) {
8142
+ warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');
8143
+ }
8144
+ currentTransition._updatedFibers.clear();
8145
+ }
8146
+ }
8147
+ }
8148
+ }
8149
+ var didWarnAboutMessageChannel = false;
8150
+ var enqueueTaskImpl = null;
8151
+ function enqueueTask(task) {
8152
+ if (enqueueTaskImpl === null) {
8153
+ try {
8154
+ // read require off the module object to get around the bundlers.
8155
+ // we don't want them to detect a require and bundle a Node polyfill.
8156
+ var requireString = ('require' + Math.random()).slice(0, 7);
8157
+ var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
8158
+ // version of setImmediate, bypassing fake timers if any.
8159
+
8160
+ enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
8161
+ } catch (_err) {
8162
+ // we're in a browser
8163
+ // we can't use regular timers because they may still be faked
8164
+ // so we try MessageChannel+postMessage instead
8165
+ enqueueTaskImpl = function (callback) {
8166
+ {
8167
+ if (didWarnAboutMessageChannel === false) {
8168
+ didWarnAboutMessageChannel = true;
8169
+ if (typeof MessageChannel === 'undefined') {
8170
+ error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');
8171
+ }
8172
+ }
8173
+ }
8174
+ var channel = new MessageChannel();
8175
+ channel.port1.onmessage = callback;
8176
+ channel.port2.postMessage(undefined);
8177
+ };
8178
+ }
8179
+ }
8180
+ return enqueueTaskImpl(task);
8181
+ }
8182
+ var actScopeDepth = 0;
8183
+ var didWarnNoAwaitAct = false;
8184
+ function act(callback) {
8185
+ {
8186
+ // `act` calls can be nested, so we track the depth. This represents the
8187
+ // number of `act` scopes on the stack.
8188
+ var prevActScopeDepth = actScopeDepth;
8189
+ actScopeDepth++;
8190
+ if (ReactCurrentActQueue.current === null) {
8191
+ // This is the outermost `act` scope. Initialize the queue. The reconciler
8192
+ // will detect the queue and use it instead of Scheduler.
8193
+ ReactCurrentActQueue.current = [];
8194
+ }
8195
+ var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
8196
+ var result;
8197
+ try {
8198
+ // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only
8199
+ // set to `true` while the given callback is executed, not for updates
8200
+ // triggered during an async event, because this is how the legacy
8201
+ // implementation of `act` behaved.
8202
+ ReactCurrentActQueue.isBatchingLegacy = true;
8203
+ result = callback(); // Replicate behavior of original `act` implementation in legacy mode,
8204
+ // which flushed updates immediately after the scope function exits, even
8205
+ // if it's an async function.
8206
+
8207
+ if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
8208
+ var queue = ReactCurrentActQueue.current;
8209
+ if (queue !== null) {
8210
+ ReactCurrentActQueue.didScheduleLegacyUpdate = false;
8211
+ flushActQueue(queue);
8212
+ }
8213
+ }
8214
+ } catch (error) {
8215
+ popActScope(prevActScopeDepth);
8216
+ throw error;
8217
+ } finally {
8218
+ ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
8219
+ }
8220
+ if (result !== null && typeof result === 'object' && typeof result.then === 'function') {
8221
+ var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait
8222
+ // for it to resolve before exiting the current scope.
8223
+
8224
+ var wasAwaited = false;
8225
+ var thenable = {
8226
+ then: function (resolve, reject) {
8227
+ wasAwaited = true;
8228
+ thenableResult.then(function (returnValue) {
8229
+ popActScope(prevActScopeDepth);
8230
+ if (actScopeDepth === 0) {
8231
+ // We've exited the outermost act scope. Recursively flush the
8232
+ // queue until there's no remaining work.
8233
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
8234
+ } else {
8235
+ resolve(returnValue);
8236
+ }
8237
+ }, function (error) {
8238
+ // The callback threw an error.
8239
+ popActScope(prevActScopeDepth);
8240
+ reject(error);
8241
+ });
8242
+ }
8243
+ };
8244
+ {
8245
+ if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {
8246
+ // eslint-disable-next-line no-undef
8247
+ Promise.resolve().then(function () {}).then(function () {
8248
+ if (!wasAwaited) {
8249
+ didWarnNoAwaitAct = true;
8250
+ error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');
8251
+ }
8252
+ });
8253
+ }
8254
+ }
8255
+ return thenable;
8256
+ } else {
8257
+ var returnValue = result; // The callback is not an async function. Exit the current scope
8258
+ // immediately, without awaiting.
8259
+
8260
+ popActScope(prevActScopeDepth);
8261
+ if (actScopeDepth === 0) {
8262
+ // Exiting the outermost act scope. Flush the queue.
8263
+ var _queue = ReactCurrentActQueue.current;
8264
+ if (_queue !== null) {
8265
+ flushActQueue(_queue);
8266
+ ReactCurrentActQueue.current = null;
8267
+ } // Return a thenable. If the user awaits it, we'll flush again in
8268
+ // case additional work was scheduled by a microtask.
8269
+
8270
+ var _thenable = {
8271
+ then: function (resolve, reject) {
8272
+ // Confirm we haven't re-entered another `act` scope, in case
8273
+ // the user does something weird like await the thenable
8274
+ // multiple times.
8275
+ if (ReactCurrentActQueue.current === null) {
8276
+ // Recursively flush the queue until there's no remaining work.
8277
+ ReactCurrentActQueue.current = [];
8278
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
8279
+ } else {
8280
+ resolve(returnValue);
8281
+ }
8282
+ }
8283
+ };
8284
+ return _thenable;
8285
+ } else {
8286
+ // Since we're inside a nested `act` scope, the returned thenable
8287
+ // immediately resolves. The outer scope will flush the queue.
8288
+ var _thenable2 = {
8289
+ then: function (resolve, reject) {
8290
+ resolve(returnValue);
8291
+ }
8292
+ };
8293
+ return _thenable2;
8294
+ }
8295
+ }
8296
+ }
8297
+ }
8298
+ function popActScope(prevActScopeDepth) {
8299
+ {
8300
+ if (prevActScopeDepth !== actScopeDepth - 1) {
8301
+ error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
8302
+ }
8303
+ actScopeDepth = prevActScopeDepth;
8304
+ }
8305
+ }
8306
+ function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
8307
+ {
8308
+ var queue = ReactCurrentActQueue.current;
8309
+ if (queue !== null) {
8310
+ try {
8311
+ flushActQueue(queue);
8312
+ enqueueTask(function () {
8313
+ if (queue.length === 0) {
8314
+ // No additional work was scheduled. Finish.
8315
+ ReactCurrentActQueue.current = null;
8316
+ resolve(returnValue);
8317
+ } else {
8318
+ // Keep flushing work until there's none left.
8319
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
8320
+ }
8321
+ });
8322
+ } catch (error) {
8323
+ reject(error);
8324
+ }
8325
+ } else {
8326
+ resolve(returnValue);
8327
+ }
8328
+ }
8329
+ }
8330
+ var isFlushing = false;
8331
+ function flushActQueue(queue) {
8332
+ {
8333
+ if (!isFlushing) {
8334
+ // Prevent re-entrance.
8335
+ isFlushing = true;
8336
+ var i = 0;
8337
+ try {
8338
+ for (; i < queue.length; i++) {
8339
+ var callback = queue[i];
8340
+ do {
8341
+ callback = callback(true);
8342
+ } while (callback !== null);
8343
+ }
8344
+ queue.length = 0;
8345
+ } catch (error) {
8346
+ // If something throws, leave the remaining callbacks on the queue.
8347
+ queue = queue.slice(i + 1);
8348
+ throw error;
8349
+ } finally {
8350
+ isFlushing = false;
8351
+ }
8352
+ }
8353
+ }
8354
+ }
8355
+ var createElement$1 = createElementWithValidation;
8356
+ var cloneElement$1 = cloneElementWithValidation;
8357
+ var createFactory = createFactoryWithValidation;
8358
+ var Children = {
8359
+ map: mapChildren,
8360
+ forEach: forEachChildren,
8361
+ count: countChildren,
8362
+ toArray: toArray,
8363
+ only: onlyChild
8364
+ };
8365
+ exports.Children = Children;
8366
+ exports.Component = Component;
8367
+ exports.Fragment = REACT_FRAGMENT_TYPE;
8368
+ exports.Profiler = REACT_PROFILER_TYPE;
8369
+ exports.PureComponent = PureComponent;
8370
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
8371
+ exports.Suspense = REACT_SUSPENSE_TYPE;
8372
+ exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
8373
+ exports.act = act;
8374
+ exports.cloneElement = cloneElement$1;
8375
+ exports.createContext = createContext;
8376
+ exports.createElement = createElement$1;
8377
+ exports.createFactory = createFactory;
8378
+ exports.createRef = createRef;
8379
+ exports.forwardRef = forwardRef;
8380
+ exports.isValidElement = isValidElement;
8381
+ exports.lazy = lazy;
8382
+ exports.memo = memo;
8383
+ exports.startTransition = startTransition;
8384
+ exports.unstable_act = act;
8385
+ exports.useCallback = useCallback;
8386
+ exports.useContext = useContext;
8387
+ exports.useDebugValue = useDebugValue;
8388
+ exports.useDeferredValue = useDeferredValue;
8389
+ exports.useEffect = useEffect;
8390
+ exports.useId = useId;
8391
+ exports.useImperativeHandle = useImperativeHandle;
8392
+ exports.useInsertionEffect = useInsertionEffect;
8393
+ exports.useLayoutEffect = useLayoutEffect;
8394
+ exports.useMemo = useMemo;
8395
+ exports.useReducer = useReducer;
8396
+ exports.useRef = useRef;
8397
+ exports.useState = useState;
8398
+ exports.useSyncExternalStore = useSyncExternalStore;
8399
+ exports.useTransition = useTransition;
8400
+ exports.version = ReactVersion;
8401
+ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
8402
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === 'function') {
8403
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
8404
+ }
8405
+ })();
8406
+ }
8407
+ })(react_development, react_development.exports);
8408
+ return react_development.exports;
8409
+ }
8410
+
8411
+ (function (module) {
8412
+
8413
+ if (process.env.NODE_ENV === 'production') {
8414
+ module.exports = requireReact_production_min();
8415
+ } else {
8416
+ module.exports = requireReact_development();
8417
+ }
8418
+ })(react);
8419
+
8420
+ var useAction = function useAction(action, deps) {
8421
+ return useActions([action], deps)[0];
8422
+ };
8423
+ var useActions = function useActions(actions, deps) {
8424
+ var dispatch = reactRedux.useDispatch();
8425
+ return react.exports.useMemo(function () {
8426
+ if (Array.isArray(actions)) {
8427
+ return actions.map(function (a) {
8428
+ return bindActionCreators(a, dispatch);
8429
+ });
8430
+ }
8431
+ return bindActionCreators(actions, dispatch);
8432
+ }, /* eslint-disable-next-line react-hooks/exhaustive-deps */
8433
+ deps ? [dispatch].concat(_toConsumableArray(deps)) : [dispatch]);
8434
+ };
8435
+
8436
+ var asyncReducers = {}; // placeholder for injected reducers
8437
+
8438
+ var injectReducer = function injectReducer(store) {
8439
+ var staticReducers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8440
+ var key = arguments.length > 2 ? arguments[2] : undefined;
8441
+ var asyncReducer = arguments.length > 3 ? arguments[3] : undefined;
8442
+ if (!asyncReducers[key]) {
8443
+ asyncReducers[key] = asyncReducer;
8444
+ store.replaceReducer(combineReducers(_objectSpread2$1(_objectSpread2$1({}, staticReducers), asyncReducers)));
8445
+ }
8446
+ };
8447
+ var injectSlice = function injectSlice(store, staticReducers, slice) {
8448
+ return injectReducer(store, staticReducers, slice.name, slice.reducer);
8449
+ };
8450
+ var getSetterActionName = function getSetterActionName(name) {
8451
+ return "set".concat(upperFirst_1(name));
8452
+ };
8453
+ var makeSetterReducersFromInitialState = function makeSetterReducersFromInitialState(initialState, config, pluginsData) {
8454
+ var reducer = {};
8455
+ Object.keys(initialState).forEach(function (name) {
8456
+ var key = getSetterActionName(name);
8457
+ reducer[key] = function (state, action) {
8458
+ var value = action.payload;
8459
+ pluginsData[name].forEach(function (_ref) {
8460
+ var data = _ref.data,
8461
+ plugin = _ref.plugin;
8462
+ value = plugin.update(value, _objectSpread2$1({
8463
+ state: state,
8464
+ config: plugin.config,
8465
+ draft: state
8466
+ }, data)); // provide both state. and draft. apis so fewer users complain
8467
+ });
8468
+ state[name] = value;
8469
+ };
8470
+ });
8471
+ return reducer;
8472
+ };
8473
+
8474
+ /* eslint-enable react/forbid-foreign-prop-types */
8475
+
8476
+ var plugin = function plugin(_ref) {
8477
+ var constructorFn = _ref.constructor,
8478
+ setup = _ref.setup,
8479
+ getInitialValue = _ref.getInitialValue,
8480
+ update = _ref.update,
8481
+ _ref$config = _ref.config,
8482
+ config = _ref$config === void 0 ? {} : _ref$config;
8483
+ return /*#__PURE__*/function () {
8484
+ function _class(value) {
8485
+ _classCallCheck(this, _class);
8486
+ this.value = value;
8487
+ this.setup = setup || this.setup;
8488
+ this.getInitialValue = getInitialValue || this.getInitialValue;
8489
+ this.update = update || this.update;
8490
+ this.config = config;
8491
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
8492
+ args[_key - 1] = arguments[_key];
8493
+ }
8494
+ constructorFn === null || constructorFn === void 0 || constructorFn.call.apply(constructorFn, [this, value].concat(args));
8495
+ }
8496
+
8497
+ // either the initial state value or the next plugin
8498
+ return _createClass(_class, [{
8499
+ key: "getValue",
8500
+ value: function getValue() {
8501
+ return this.value;
8502
+ }
8503
+ }, {
8504
+ key: "setValue",
8505
+ value: function setValue(value) {
8506
+ this.value = value;
8507
+ }
8508
+ }, {
8509
+ key: "setConfig",
8510
+ value: function setConfig(config) {
8511
+ this.config = _objectSpread2$1(_objectSpread2$1({}, this.config), config);
8512
+ }
8513
+ }, {
8514
+ key: "setup",
8515
+ value: function setup(item, _ref2) {
8516
+ _objectDestructuringEmpty(_ref2);
8517
+ return {
8518
+ plugin: item
8519
+ };
8520
+ }
8521
+ }, {
8522
+ key: "getInitialValue",
8523
+ value: function getInitialValue(value, _ref3) {
8524
+ _objectDestructuringEmpty(_ref3);
8525
+ return value;
8526
+ }
8527
+ }, {
8528
+ key: "update",
8529
+ value: function update(value, _ref4) {
8530
+ _objectDestructuringEmpty(_ref4);
8531
+ return value;
8532
+ }
8533
+ }]);
8534
+ }();
8535
+ };
8536
+ var addPlugin = function addPlugin(config) {
8537
+ var Class = plugin(config);
8538
+ plugins.push(Class);
8539
+ return function () {
8540
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
8541
+ args[_key2] = arguments[_key2];
8542
+ }
8543
+ return _construct(Class, args);
8544
+ };
8545
+ };
8546
+ var addPlugins = function addPlugins() {
8547
+ for (var _len3 = arguments.length, configs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
8548
+ configs[_key3] = arguments[_key3];
8549
+ }
8550
+ return configs.map(addPlugin);
8551
+ };
8552
+ var plugins = [];
8553
+
8554
+ var makeSelectorHook = function makeSelectorHook(selector) {
8555
+ return function () {
8556
+ return reactRedux.useSelector(selector, reactRedux.shallowEqual);
8557
+ };
8558
+ };
8559
+ var createSelectorUpdateHook = function createSelectorUpdateHook(selector, action) {
8560
+ return function () {
8561
+ return [reactRedux.useSelector(selector), useAction(action, undefined)];
8562
+ };
8563
+ };
8564
+ var createSelectorHook = function createSelectorHook() {
8565
+ // creates a redux selector and a react hook that produce identical results
8566
+ var selector = createDraftSafeSelector.apply(void 0, arguments);
8567
+ var hook = makeSelectorHook(selector);
8568
+ hook.select = selector;
8569
+ return hook;
8570
+ };
8571
+ var configure$1 = function configure(store) {
8572
+ var makeDomainSelector = function makeDomainSelector(name, initialState) {
8573
+ return function (state) {
8574
+ return (state === null || state === void 0 ? void 0 : state[name]) || initialState;
8575
+ };
8576
+ };
8577
+ var makeDomainSelectorFromSlice = function makeDomainSelectorFromSlice(slice) {
8578
+ return makeDomainSelector(slice.name, slice.getInitialState());
8579
+ };
8580
+ var selectProp = function selectProp(name, defaultValue) {
8581
+ return function (substate) {
8582
+ return get_1(substate, name, defaultValue);
8583
+ };
8584
+ };
8585
+ var makePropertySelectorHookFactory = function makePropertySelectorHookFactory(baseSelector, slice) {
8586
+ return function (names) {
8587
+ // to be used in conjunction with singlePropReducer to mimic the useState api,
8588
+ // but for individual pieces of redux state rather than component state
5859
8589
  // usage:
5860
8590
  // selector.js:
5861
8591
  // const selectDomain = state => state?.[domain] || initialState;
@@ -6057,7 +8787,6 @@
6057
8787
  useAction(slice.actions.__override__slice__caution, undefined) // state overwriter
6058
8788
  ];
6059
8789
  };
6060
-
6061
8790
  hooks[domainHookKey].select = selectDomain;
6062
8791
  hooks[domainHookKey].update = updateFn;
6063
8792
  /* eslint-enable react-hooks/rules-of-hooks */