@fctc/interface-logic 1.0.4 → 1.0.6

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.mjs CHANGED
@@ -1,3094 +1,3 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __commonJS = (cb, mod) => function __require() {
8
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
- // If the importer is in node compatibility mode or this is not an ESM
20
- // file that has been converted to a CommonJS file using a Babel-
21
- // compatible transform (i.e. "__esModule" has not been set), then set
22
- // "default" to the CommonJS "module.exports" for node compatibility.
23
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
- mod
25
- ));
26
-
27
- // node_modules/react/cjs/react.production.min.js
28
- var require_react_production_min = __commonJS({
29
- "node_modules/react/cjs/react.production.min.js"(exports) {
30
- "use strict";
31
- var l = Symbol.for("react.element");
32
- var n = Symbol.for("react.portal");
33
- var p = Symbol.for("react.fragment");
34
- var q = Symbol.for("react.strict_mode");
35
- var r = Symbol.for("react.profiler");
36
- var t = Symbol.for("react.provider");
37
- var u = Symbol.for("react.context");
38
- var v = Symbol.for("react.forward_ref");
39
- var w = Symbol.for("react.suspense");
40
- var x = Symbol.for("react.memo");
41
- var y = Symbol.for("react.lazy");
42
- var z = Symbol.iterator;
43
- function A(a) {
44
- if (null === a || "object" !== typeof a) return null;
45
- a = z && a[z] || a["@@iterator"];
46
- return "function" === typeof a ? a : null;
47
- }
48
- var B = { isMounted: function() {
49
- return false;
50
- }, enqueueForceUpdate: function() {
51
- }, enqueueReplaceState: function() {
52
- }, enqueueSetState: function() {
53
- } };
54
- var C = Object.assign;
55
- var D = {};
56
- function E(a, b, e) {
57
- this.props = a;
58
- this.context = b;
59
- this.refs = D;
60
- this.updater = e || B;
61
- }
62
- E.prototype.isReactComponent = {};
63
- E.prototype.setState = function(a, b) {
64
- 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.");
65
- this.updater.enqueueSetState(this, a, b, "setState");
66
- };
67
- E.prototype.forceUpdate = function(a) {
68
- this.updater.enqueueForceUpdate(this, a, "forceUpdate");
69
- };
70
- function F() {
71
- }
72
- F.prototype = E.prototype;
73
- function G(a, b, e) {
74
- this.props = a;
75
- this.context = b;
76
- this.refs = D;
77
- this.updater = e || B;
78
- }
79
- var H = G.prototype = new F();
80
- H.constructor = G;
81
- C(H, E.prototype);
82
- H.isPureReactComponent = true;
83
- var I = Array.isArray;
84
- var J = Object.prototype.hasOwnProperty;
85
- var K = { current: null };
86
- var L = { key: true, ref: true, __self: true, __source: true };
87
- function M(a, b, e) {
88
- var d, c = {}, k = null, h = null;
89
- 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]);
90
- var g = arguments.length - 2;
91
- if (1 === g) c.children = e;
92
- else if (1 < g) {
93
- for (var f = Array(g), m = 0; m < g; m++) f[m] = arguments[m + 2];
94
- c.children = f;
95
- }
96
- if (a && a.defaultProps) for (d in g = a.defaultProps, g) void 0 === c[d] && (c[d] = g[d]);
97
- return { $$typeof: l, type: a, key: k, ref: h, props: c, _owner: K.current };
98
- }
99
- function N(a, b) {
100
- return { $$typeof: l, type: a.type, key: b, ref: a.ref, props: a.props, _owner: a._owner };
101
- }
102
- function O(a) {
103
- return "object" === typeof a && null !== a && a.$$typeof === l;
104
- }
105
- function escape(a) {
106
- var b = { "=": "=0", ":": "=2" };
107
- return "$" + a.replace(/[=:]/g, function(a2) {
108
- return b[a2];
109
- });
110
- }
111
- var P = /\/+/g;
112
- function Q(a, b) {
113
- return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b.toString(36);
114
- }
115
- function R(a, b, e, d, c) {
116
- var k = typeof a;
117
- if ("undefined" === k || "boolean" === k) a = null;
118
- var h = false;
119
- if (null === a) h = true;
120
- else switch (k) {
121
- case "string":
122
- case "number":
123
- h = true;
124
- break;
125
- case "object":
126
- switch (a.$$typeof) {
127
- case l:
128
- case n:
129
- h = true;
130
- }
131
- }
132
- 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(a2) {
133
- return a2;
134
- })) : null != c && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace(P, "$&/") + "/") + a)), b.push(c)), 1;
135
- h = 0;
136
- d = "" === d ? "." : d + ":";
137
- if (I(a)) for (var g = 0; g < a.length; g++) {
138
- k = a[g];
139
- var f = d + Q(k, g);
140
- h += R(k, b, e, f, c);
141
- }
142
- 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);
143
- 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.");
144
- return h;
145
- }
146
- function S(a, b, e) {
147
- if (null == a) return a;
148
- var d = [], c = 0;
149
- R(a, d, "", "", function(a2) {
150
- return b.call(e, a2, c++);
151
- });
152
- return d;
153
- }
154
- function T(a) {
155
- if (-1 === a._status) {
156
- var b = a._result;
157
- b = b();
158
- b.then(function(b2) {
159
- if (0 === a._status || -1 === a._status) a._status = 1, a._result = b2;
160
- }, function(b2) {
161
- if (0 === a._status || -1 === a._status) a._status = 2, a._result = b2;
162
- });
163
- -1 === a._status && (a._status = 0, a._result = b);
164
- }
165
- if (1 === a._status) return a._result.default;
166
- throw a._result;
167
- }
168
- var U = { current: null };
169
- var V = { transition: null };
170
- var W = { ReactCurrentDispatcher: U, ReactCurrentBatchConfig: V, ReactCurrentOwner: K };
171
- exports.Children = { map: S, forEach: function(a, b, e) {
172
- S(a, function() {
173
- b.apply(this, arguments);
174
- }, e);
175
- }, count: function(a) {
176
- var b = 0;
177
- S(a, function() {
178
- b++;
179
- });
180
- return b;
181
- }, toArray: function(a) {
182
- return S(a, function(a2) {
183
- return a2;
184
- }) || [];
185
- }, only: function(a) {
186
- if (!O(a)) throw Error("React.Children.only expected to receive a single React element child.");
187
- return a;
188
- } };
189
- exports.Component = E;
190
- exports.Fragment = p;
191
- exports.Profiler = r;
192
- exports.PureComponent = G;
193
- exports.StrictMode = q;
194
- exports.Suspense = w;
195
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W;
196
- exports.cloneElement = function(a, b, e) {
197
- if (null === a || void 0 === a) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + ".");
198
- var d = C({}, a.props), c = a.key, k = a.ref, h = a._owner;
199
- if (null != b) {
200
- void 0 !== b.ref && (k = b.ref, h = K.current);
201
- void 0 !== b.key && (c = "" + b.key);
202
- if (a.type && a.type.defaultProps) var g = a.type.defaultProps;
203
- for (f in b) J.call(b, f) && !L.hasOwnProperty(f) && (d[f] = void 0 === b[f] && void 0 !== g ? g[f] : b[f]);
204
- }
205
- var f = arguments.length - 2;
206
- if (1 === f) d.children = e;
207
- else if (1 < f) {
208
- g = Array(f);
209
- for (var m = 0; m < f; m++) g[m] = arguments[m + 2];
210
- d.children = g;
211
- }
212
- return { $$typeof: l, type: a.type, key: c, ref: k, props: d, _owner: h };
213
- };
214
- exports.createContext = function(a) {
215
- a = { $$typeof: u, _currentValue: a, _currentValue2: a, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null };
216
- a.Provider = { $$typeof: t, _context: a };
217
- return a.Consumer = a;
218
- };
219
- exports.createElement = M;
220
- exports.createFactory = function(a) {
221
- var b = M.bind(null, a);
222
- b.type = a;
223
- return b;
224
- };
225
- exports.createRef = function() {
226
- return { current: null };
227
- };
228
- exports.forwardRef = function(a) {
229
- return { $$typeof: v, render: a };
230
- };
231
- exports.isValidElement = O;
232
- exports.lazy = function(a) {
233
- return { $$typeof: y, _payload: { _status: -1, _result: a }, _init: T };
234
- };
235
- exports.memo = function(a, b) {
236
- return { $$typeof: x, type: a, compare: void 0 === b ? null : b };
237
- };
238
- exports.startTransition = function(a) {
239
- var b = V.transition;
240
- V.transition = {};
241
- try {
242
- a();
243
- } finally {
244
- V.transition = b;
245
- }
246
- };
247
- exports.unstable_act = function() {
248
- throw Error("act(...) is not supported in production builds of React.");
249
- };
250
- exports.useCallback = function(a, b) {
251
- return U.current.useCallback(a, b);
252
- };
253
- exports.useContext = function(a) {
254
- return U.current.useContext(a);
255
- };
256
- exports.useDebugValue = function() {
257
- };
258
- exports.useDeferredValue = function(a) {
259
- return U.current.useDeferredValue(a);
260
- };
261
- exports.useEffect = function(a, b) {
262
- return U.current.useEffect(a, b);
263
- };
264
- exports.useId = function() {
265
- return U.current.useId();
266
- };
267
- exports.useImperativeHandle = function(a, b, e) {
268
- return U.current.useImperativeHandle(a, b, e);
269
- };
270
- exports.useInsertionEffect = function(a, b) {
271
- return U.current.useInsertionEffect(a, b);
272
- };
273
- exports.useLayoutEffect = function(a, b) {
274
- return U.current.useLayoutEffect(a, b);
275
- };
276
- exports.useMemo = function(a, b) {
277
- return U.current.useMemo(a, b);
278
- };
279
- exports.useReducer = function(a, b, e) {
280
- return U.current.useReducer(a, b, e);
281
- };
282
- exports.useRef = function(a) {
283
- return U.current.useRef(a);
284
- };
285
- exports.useState = function(a) {
286
- return U.current.useState(a);
287
- };
288
- exports.useSyncExternalStore = function(a, b, e) {
289
- return U.current.useSyncExternalStore(a, b, e);
290
- };
291
- exports.useTransition = function() {
292
- return U.current.useTransition();
293
- };
294
- exports.version = "18.0.0-fc46dba67-20220329";
295
- }
296
- });
297
-
298
- // node_modules/react/cjs/react.development.js
299
- var require_react_development = __commonJS({
300
- "node_modules/react/cjs/react.development.js"(exports, module) {
301
- "use strict";
302
- if (process.env.NODE_ENV !== "production") {
303
- (function() {
304
- "use strict";
305
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
306
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
307
- }
308
- var ReactVersion = "18.0.0-fc46dba67-20220329";
309
- var REACT_ELEMENT_TYPE = Symbol.for("react.element");
310
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
311
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
312
- var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
313
- var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
314
- var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
315
- var REACT_CONTEXT_TYPE = Symbol.for("react.context");
316
- var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
317
- var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
318
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
319
- var REACT_MEMO_TYPE = Symbol.for("react.memo");
320
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
321
- var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
322
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
323
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
324
- function getIteratorFn(maybeIterable) {
325
- if (maybeIterable === null || typeof maybeIterable !== "object") {
326
- return null;
327
- }
328
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
329
- if (typeof maybeIterator === "function") {
330
- return maybeIterator;
331
- }
332
- return null;
333
- }
334
- var ReactCurrentDispatcher = {
335
- /**
336
- * @internal
337
- * @type {ReactComponent}
338
- */
339
- current: null
340
- };
341
- var ReactCurrentBatchConfig = {
342
- transition: null
343
- };
344
- var ReactCurrentActQueue = {
345
- current: null,
346
- // Used to reproduce behavior of `batchedUpdates` in legacy mode.
347
- isBatchingLegacy: false,
348
- didScheduleLegacyUpdate: false
349
- };
350
- var ReactCurrentOwner = {
351
- /**
352
- * @internal
353
- * @type {ReactComponent}
354
- */
355
- current: null
356
- };
357
- var ReactDebugCurrentFrame = {};
358
- var currentExtraStackFrame = null;
359
- function setExtraStackFrame(stack) {
360
- {
361
- currentExtraStackFrame = stack;
362
- }
363
- }
364
- {
365
- ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
366
- {
367
- currentExtraStackFrame = stack;
368
- }
369
- };
370
- ReactDebugCurrentFrame.getCurrentStack = null;
371
- ReactDebugCurrentFrame.getStackAddendum = function() {
372
- var stack = "";
373
- if (currentExtraStackFrame) {
374
- stack += currentExtraStackFrame;
375
- }
376
- var impl = ReactDebugCurrentFrame.getCurrentStack;
377
- if (impl) {
378
- stack += impl() || "";
379
- }
380
- return stack;
381
- };
382
- }
383
- var enableScopeAPI = false;
384
- var enableCacheElement = false;
385
- var enableTransitionTracing = false;
386
- var enableLegacyHidden = false;
387
- var enableDebugTracing = false;
388
- var ReactSharedInternals = {
389
- ReactCurrentDispatcher,
390
- ReactCurrentBatchConfig,
391
- ReactCurrentOwner
392
- };
393
- {
394
- ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
395
- ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
396
- }
397
- function warn(format) {
398
- {
399
- {
400
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
401
- args[_key - 1] = arguments[_key];
402
- }
403
- printWarning("warn", format, args);
404
- }
405
- }
406
- }
407
- function error(format) {
408
- {
409
- {
410
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
411
- args[_key2 - 1] = arguments[_key2];
412
- }
413
- printWarning("error", format, args);
414
- }
415
- }
416
- }
417
- function printWarning(level, format, args) {
418
- {
419
- var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
420
- var stack = ReactDebugCurrentFrame2.getStackAddendum();
421
- if (stack !== "") {
422
- format += "%s";
423
- args = args.concat([stack]);
424
- }
425
- var argsWithFormat = args.map(function(item) {
426
- return String(item);
427
- });
428
- argsWithFormat.unshift("Warning: " + format);
429
- Function.prototype.apply.call(console[level], console, argsWithFormat);
430
- }
431
- }
432
- var didWarnStateUpdateForUnmountedComponent = {};
433
- function warnNoop(publicInstance, callerName) {
434
- {
435
- var _constructor = publicInstance.constructor;
436
- var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass";
437
- var warningKey = componentName + "." + callerName;
438
- if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
439
- return;
440
- }
441
- 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);
442
- didWarnStateUpdateForUnmountedComponent[warningKey] = true;
443
- }
444
- }
445
- var ReactNoopUpdateQueue = {
446
- /**
447
- * Checks whether or not this composite component is mounted.
448
- * @param {ReactClass} publicInstance The instance we want to test.
449
- * @return {boolean} True if mounted, false otherwise.
450
- * @protected
451
- * @final
452
- */
453
- isMounted: function(publicInstance) {
454
- return false;
455
- },
456
- /**
457
- * Forces an update. This should only be invoked when it is known with
458
- * certainty that we are **not** in a DOM transaction.
459
- *
460
- * You may want to call this when you know that some deeper aspect of the
461
- * component's state has changed but `setState` was not called.
462
- *
463
- * This will not invoke `shouldComponentUpdate`, but it will invoke
464
- * `componentWillUpdate` and `componentDidUpdate`.
465
- *
466
- * @param {ReactClass} publicInstance The instance that should rerender.
467
- * @param {?function} callback Called after component is updated.
468
- * @param {?string} callerName name of the calling function in the public API.
469
- * @internal
470
- */
471
- enqueueForceUpdate: function(publicInstance, callback, callerName) {
472
- warnNoop(publicInstance, "forceUpdate");
473
- },
474
- /**
475
- * Replaces all of the state. Always use this or `setState` to mutate state.
476
- * You should treat `this.state` as immutable.
477
- *
478
- * There is no guarantee that `this.state` will be immediately updated, so
479
- * accessing `this.state` after calling this method may return the old value.
480
- *
481
- * @param {ReactClass} publicInstance The instance that should rerender.
482
- * @param {object} completeState Next state.
483
- * @param {?function} callback Called after component is updated.
484
- * @param {?string} callerName name of the calling function in the public API.
485
- * @internal
486
- */
487
- enqueueReplaceState: function(publicInstance, completeState, callback, callerName) {
488
- warnNoop(publicInstance, "replaceState");
489
- },
490
- /**
491
- * Sets a subset of the state. This only exists because _pendingState is
492
- * internal. This provides a merging strategy that is not available to deep
493
- * properties which is confusing. TODO: Expose pendingState or don't use it
494
- * during the merge.
495
- *
496
- * @param {ReactClass} publicInstance The instance that should rerender.
497
- * @param {object} partialState Next partial state to be merged with state.
498
- * @param {?function} callback Called after component is updated.
499
- * @param {?string} Name of the calling function in the public API.
500
- * @internal
501
- */
502
- enqueueSetState: function(publicInstance, partialState, callback, callerName) {
503
- warnNoop(publicInstance, "setState");
504
- }
505
- };
506
- var assign = Object.assign;
507
- var emptyObject = {};
508
- {
509
- Object.freeze(emptyObject);
510
- }
511
- function Component(props, context, updater) {
512
- this.props = props;
513
- this.context = context;
514
- this.refs = emptyObject;
515
- this.updater = updater || ReactNoopUpdateQueue;
516
- }
517
- Component.prototype.isReactComponent = {};
518
- Component.prototype.setState = function(partialState, callback) {
519
- if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) {
520
- throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
521
- }
522
- this.updater.enqueueSetState(this, partialState, callback, "setState");
523
- };
524
- Component.prototype.forceUpdate = function(callback) {
525
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
526
- };
527
- {
528
- var deprecatedAPIs = {
529
- isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
530
- replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
531
- };
532
- var defineDeprecationWarning = function(methodName, info) {
533
- Object.defineProperty(Component.prototype, methodName, {
534
- get: function() {
535
- warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
536
- return void 0;
537
- }
538
- });
539
- };
540
- for (var fnName in deprecatedAPIs) {
541
- if (deprecatedAPIs.hasOwnProperty(fnName)) {
542
- defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
543
- }
544
- }
545
- }
546
- function ComponentDummy() {
547
- }
548
- ComponentDummy.prototype = Component.prototype;
549
- function PureComponent(props, context, updater) {
550
- this.props = props;
551
- this.context = context;
552
- this.refs = emptyObject;
553
- this.updater = updater || ReactNoopUpdateQueue;
554
- }
555
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
556
- pureComponentPrototype.constructor = PureComponent;
557
- assign(pureComponentPrototype, Component.prototype);
558
- pureComponentPrototype.isPureReactComponent = true;
559
- function createRef() {
560
- var refObject = {
561
- current: null
562
- };
563
- {
564
- Object.seal(refObject);
565
- }
566
- return refObject;
567
- }
568
- var isArrayImpl = Array.isArray;
569
- function isArray(a) {
570
- return isArrayImpl(a);
571
- }
572
- function typeName(value) {
573
- {
574
- var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
575
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
576
- return type;
577
- }
578
- }
579
- function willCoercionThrow(value) {
580
- {
581
- try {
582
- testStringCoercion(value);
583
- return false;
584
- } catch (e) {
585
- return true;
586
- }
587
- }
588
- }
589
- function testStringCoercion(value) {
590
- return "" + value;
591
- }
592
- function checkKeyStringCoercion(value) {
593
- {
594
- if (willCoercionThrow(value)) {
595
- error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
596
- return testStringCoercion(value);
597
- }
598
- }
599
- }
600
- function getWrappedName(outerType, innerType, wrapperName) {
601
- var displayName = outerType.displayName;
602
- if (displayName) {
603
- return displayName;
604
- }
605
- var functionName = innerType.displayName || innerType.name || "";
606
- return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
607
- }
608
- function getContextName(type) {
609
- return type.displayName || "Context";
610
- }
611
- function getComponentNameFromType(type) {
612
- if (type == null) {
613
- return null;
614
- }
615
- {
616
- if (typeof type.tag === "number") {
617
- error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
618
- }
619
- }
620
- if (typeof type === "function") {
621
- return type.displayName || type.name || null;
622
- }
623
- if (typeof type === "string") {
624
- return type;
625
- }
626
- switch (type) {
627
- case REACT_FRAGMENT_TYPE:
628
- return "Fragment";
629
- case REACT_PORTAL_TYPE:
630
- return "Portal";
631
- case REACT_PROFILER_TYPE:
632
- return "Profiler";
633
- case REACT_STRICT_MODE_TYPE:
634
- return "StrictMode";
635
- case REACT_SUSPENSE_TYPE:
636
- return "Suspense";
637
- case REACT_SUSPENSE_LIST_TYPE:
638
- return "SuspenseList";
639
- }
640
- if (typeof type === "object") {
641
- switch (type.$$typeof) {
642
- case REACT_CONTEXT_TYPE:
643
- var context = type;
644
- return getContextName(context) + ".Consumer";
645
- case REACT_PROVIDER_TYPE:
646
- var provider = type;
647
- return getContextName(provider._context) + ".Provider";
648
- case REACT_FORWARD_REF_TYPE:
649
- return getWrappedName(type, type.render, "ForwardRef");
650
- case REACT_MEMO_TYPE:
651
- var outerName = type.displayName || null;
652
- if (outerName !== null) {
653
- return outerName;
654
- }
655
- return getComponentNameFromType(type.type) || "Memo";
656
- case REACT_LAZY_TYPE: {
657
- var lazyComponent = type;
658
- var payload = lazyComponent._payload;
659
- var init = lazyComponent._init;
660
- try {
661
- return getComponentNameFromType(init(payload));
662
- } catch (x) {
663
- return null;
664
- }
665
- }
666
- }
667
- }
668
- return null;
669
- }
670
- var hasOwnProperty = Object.prototype.hasOwnProperty;
671
- var RESERVED_PROPS = {
672
- key: true,
673
- ref: true,
674
- __self: true,
675
- __source: true
676
- };
677
- var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
678
- {
679
- didWarnAboutStringRefs = {};
680
- }
681
- function hasValidRef(config) {
682
- {
683
- if (hasOwnProperty.call(config, "ref")) {
684
- var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
685
- if (getter && getter.isReactWarning) {
686
- return false;
687
- }
688
- }
689
- }
690
- return config.ref !== void 0;
691
- }
692
- function hasValidKey(config) {
693
- {
694
- if (hasOwnProperty.call(config, "key")) {
695
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
696
- if (getter && getter.isReactWarning) {
697
- return false;
698
- }
699
- }
700
- }
701
- return config.key !== void 0;
702
- }
703
- function defineKeyPropWarningGetter(props, displayName) {
704
- var warnAboutAccessingKey = function() {
705
- {
706
- if (!specialPropKeyWarningShown) {
707
- specialPropKeyWarningShown = true;
708
- 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);
709
- }
710
- }
711
- };
712
- warnAboutAccessingKey.isReactWarning = true;
713
- Object.defineProperty(props, "key", {
714
- get: warnAboutAccessingKey,
715
- configurable: true
716
- });
717
- }
718
- function defineRefPropWarningGetter(props, displayName) {
719
- var warnAboutAccessingRef = function() {
720
- {
721
- if (!specialPropRefWarningShown) {
722
- specialPropRefWarningShown = true;
723
- 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);
724
- }
725
- }
726
- };
727
- warnAboutAccessingRef.isReactWarning = true;
728
- Object.defineProperty(props, "ref", {
729
- get: warnAboutAccessingRef,
730
- configurable: true
731
- });
732
- }
733
- function warnIfStringRefCannotBeAutoConverted(config) {
734
- {
735
- if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
736
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
737
- if (!didWarnAboutStringRefs[componentName]) {
738
- 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);
739
- didWarnAboutStringRefs[componentName] = true;
740
- }
741
- }
742
- }
743
- }
744
- var ReactElement = function(type, key, ref, self, source, owner, props) {
745
- var element = {
746
- // This tag allows us to uniquely identify this as a React Element
747
- $$typeof: REACT_ELEMENT_TYPE,
748
- // Built-in properties that belong on the element
749
- type,
750
- key,
751
- ref,
752
- props,
753
- // Record the component responsible for creating this element.
754
- _owner: owner
755
- };
756
- {
757
- element._store = {};
758
- Object.defineProperty(element._store, "validated", {
759
- configurable: false,
760
- enumerable: false,
761
- writable: true,
762
- value: false
763
- });
764
- Object.defineProperty(element, "_self", {
765
- configurable: false,
766
- enumerable: false,
767
- writable: false,
768
- value: self
769
- });
770
- Object.defineProperty(element, "_source", {
771
- configurable: false,
772
- enumerable: false,
773
- writable: false,
774
- value: source
775
- });
776
- if (Object.freeze) {
777
- Object.freeze(element.props);
778
- Object.freeze(element);
779
- }
780
- }
781
- return element;
782
- };
783
- function createElement(type, config, children) {
784
- var propName;
785
- var props = {};
786
- var key = null;
787
- var ref = null;
788
- var self = null;
789
- var source = null;
790
- if (config != null) {
791
- if (hasValidRef(config)) {
792
- ref = config.ref;
793
- {
794
- warnIfStringRefCannotBeAutoConverted(config);
795
- }
796
- }
797
- if (hasValidKey(config)) {
798
- {
799
- checkKeyStringCoercion(config.key);
800
- }
801
- key = "" + config.key;
802
- }
803
- self = config.__self === void 0 ? null : config.__self;
804
- source = config.__source === void 0 ? null : config.__source;
805
- for (propName in config) {
806
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
807
- props[propName] = config[propName];
808
- }
809
- }
810
- }
811
- var childrenLength = arguments.length - 2;
812
- if (childrenLength === 1) {
813
- props.children = children;
814
- } else if (childrenLength > 1) {
815
- var childArray = Array(childrenLength);
816
- for (var i = 0; i < childrenLength; i++) {
817
- childArray[i] = arguments[i + 2];
818
- }
819
- {
820
- if (Object.freeze) {
821
- Object.freeze(childArray);
822
- }
823
- }
824
- props.children = childArray;
825
- }
826
- if (type && type.defaultProps) {
827
- var defaultProps = type.defaultProps;
828
- for (propName in defaultProps) {
829
- if (props[propName] === void 0) {
830
- props[propName] = defaultProps[propName];
831
- }
832
- }
833
- }
834
- {
835
- if (key || ref) {
836
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
837
- if (key) {
838
- defineKeyPropWarningGetter(props, displayName);
839
- }
840
- if (ref) {
841
- defineRefPropWarningGetter(props, displayName);
842
- }
843
- }
844
- }
845
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
846
- }
847
- function cloneAndReplaceKey(oldElement, newKey) {
848
- var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
849
- return newElement;
850
- }
851
- function cloneElement(element, config, children) {
852
- if (element === null || element === void 0) {
853
- throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
854
- }
855
- var propName;
856
- var props = assign({}, element.props);
857
- var key = element.key;
858
- var ref = element.ref;
859
- var self = element._self;
860
- var source = element._source;
861
- var owner = element._owner;
862
- if (config != null) {
863
- if (hasValidRef(config)) {
864
- ref = config.ref;
865
- owner = ReactCurrentOwner.current;
866
- }
867
- if (hasValidKey(config)) {
868
- {
869
- checkKeyStringCoercion(config.key);
870
- }
871
- key = "" + config.key;
872
- }
873
- var defaultProps;
874
- if (element.type && element.type.defaultProps) {
875
- defaultProps = element.type.defaultProps;
876
- }
877
- for (propName in config) {
878
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
879
- if (config[propName] === void 0 && defaultProps !== void 0) {
880
- props[propName] = defaultProps[propName];
881
- } else {
882
- props[propName] = config[propName];
883
- }
884
- }
885
- }
886
- }
887
- var childrenLength = arguments.length - 2;
888
- if (childrenLength === 1) {
889
- props.children = children;
890
- } else if (childrenLength > 1) {
891
- var childArray = Array(childrenLength);
892
- for (var i = 0; i < childrenLength; i++) {
893
- childArray[i] = arguments[i + 2];
894
- }
895
- props.children = childArray;
896
- }
897
- return ReactElement(element.type, key, ref, self, source, owner, props);
898
- }
899
- function isValidElement(object) {
900
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
901
- }
902
- var SEPARATOR = ".";
903
- var SUBSEPARATOR = ":";
904
- function escape(key) {
905
- var escapeRegex = /[=:]/g;
906
- var escaperLookup = {
907
- "=": "=0",
908
- ":": "=2"
909
- };
910
- var escapedString = key.replace(escapeRegex, function(match) {
911
- return escaperLookup[match];
912
- });
913
- return "$" + escapedString;
914
- }
915
- var didWarnAboutMaps = false;
916
- var userProvidedKeyEscapeRegex = /\/+/g;
917
- function escapeUserProvidedKey(text) {
918
- return text.replace(userProvidedKeyEscapeRegex, "$&/");
919
- }
920
- function getElementKey(element, index) {
921
- if (typeof element === "object" && element !== null && element.key != null) {
922
- {
923
- checkKeyStringCoercion(element.key);
924
- }
925
- return escape("" + element.key);
926
- }
927
- return index.toString(36);
928
- }
929
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
930
- var type = typeof children;
931
- if (type === "undefined" || type === "boolean") {
932
- children = null;
933
- }
934
- var invokeCallback = false;
935
- if (children === null) {
936
- invokeCallback = true;
937
- } else {
938
- switch (type) {
939
- case "string":
940
- case "number":
941
- invokeCallback = true;
942
- break;
943
- case "object":
944
- switch (children.$$typeof) {
945
- case REACT_ELEMENT_TYPE:
946
- case REACT_PORTAL_TYPE:
947
- invokeCallback = true;
948
- }
949
- }
950
- }
951
- if (invokeCallback) {
952
- var _child = children;
953
- var mappedChild = callback(_child);
954
- var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
955
- if (isArray(mappedChild)) {
956
- var escapedChildKey = "";
957
- if (childKey != null) {
958
- escapedChildKey = escapeUserProvidedKey(childKey) + "/";
959
- }
960
- mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) {
961
- return c;
962
- });
963
- } else if (mappedChild != null) {
964
- if (isValidElement(mappedChild)) {
965
- {
966
- if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
967
- checkKeyStringCoercion(mappedChild.key);
968
- }
969
- }
970
- mappedChild = cloneAndReplaceKey(
971
- mappedChild,
972
- // Keep both the (mapped) and old keys if they differ, just as
973
- // traverseAllChildren used to do for objects as children
974
- escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
975
- (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? (
976
- // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
977
- // eslint-disable-next-line react-internal/safe-string-coercion
978
- escapeUserProvidedKey("" + mappedChild.key) + "/"
979
- ) : "") + childKey
980
- );
981
- }
982
- array.push(mappedChild);
983
- }
984
- return 1;
985
- }
986
- var child;
987
- var nextName;
988
- var subtreeCount = 0;
989
- var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
990
- if (isArray(children)) {
991
- for (var i = 0; i < children.length; i++) {
992
- child = children[i];
993
- nextName = nextNamePrefix + getElementKey(child, i);
994
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
995
- }
996
- } else {
997
- var iteratorFn = getIteratorFn(children);
998
- if (typeof iteratorFn === "function") {
999
- var iterableChildren = children;
1000
- {
1001
- if (iteratorFn === iterableChildren.entries) {
1002
- if (!didWarnAboutMaps) {
1003
- warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");
1004
- }
1005
- didWarnAboutMaps = true;
1006
- }
1007
- }
1008
- var iterator = iteratorFn.call(iterableChildren);
1009
- var step;
1010
- var ii = 0;
1011
- while (!(step = iterator.next()).done) {
1012
- child = step.value;
1013
- nextName = nextNamePrefix + getElementKey(child, ii++);
1014
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
1015
- }
1016
- } else if (type === "object") {
1017
- var childrenString = String(children);
1018
- 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.");
1019
- }
1020
- }
1021
- return subtreeCount;
1022
- }
1023
- function mapChildren(children, func, context) {
1024
- if (children == null) {
1025
- return children;
1026
- }
1027
- var result = [];
1028
- var count = 0;
1029
- mapIntoArray(children, result, "", "", function(child) {
1030
- return func.call(context, child, count++);
1031
- });
1032
- return result;
1033
- }
1034
- function countChildren(children) {
1035
- var n = 0;
1036
- mapChildren(children, function() {
1037
- n++;
1038
- });
1039
- return n;
1040
- }
1041
- function forEachChildren(children, forEachFunc, forEachContext) {
1042
- mapChildren(children, function() {
1043
- forEachFunc.apply(this, arguments);
1044
- }, forEachContext);
1045
- }
1046
- function toArray(children) {
1047
- return mapChildren(children, function(child) {
1048
- return child;
1049
- }) || [];
1050
- }
1051
- function onlyChild(children) {
1052
- if (!isValidElement(children)) {
1053
- throw new Error("React.Children.only expected to receive a single React element child.");
1054
- }
1055
- return children;
1056
- }
1057
- function createContext(defaultValue) {
1058
- var context = {
1059
- $$typeof: REACT_CONTEXT_TYPE,
1060
- // As a workaround to support multiple concurrent renderers, we categorize
1061
- // some renderers as primary and others as secondary. We only expect
1062
- // there to be two concurrent renderers at most: React Native (primary) and
1063
- // Fabric (secondary); React DOM (primary) and React ART (secondary).
1064
- // Secondary renderers store their context values on separate fields.
1065
- _currentValue: defaultValue,
1066
- _currentValue2: defaultValue,
1067
- // Used to track how many concurrent renderers this context currently
1068
- // supports within in a single renderer. Such as parallel server rendering.
1069
- _threadCount: 0,
1070
- // These are circular
1071
- Provider: null,
1072
- Consumer: null,
1073
- // Add these to use same hidden class in VM as ServerContext
1074
- _defaultValue: null,
1075
- _globalName: null
1076
- };
1077
- context.Provider = {
1078
- $$typeof: REACT_PROVIDER_TYPE,
1079
- _context: context
1080
- };
1081
- var hasWarnedAboutUsingNestedContextConsumers = false;
1082
- var hasWarnedAboutUsingConsumerProvider = false;
1083
- var hasWarnedAboutDisplayNameOnConsumer = false;
1084
- {
1085
- var Consumer = {
1086
- $$typeof: REACT_CONTEXT_TYPE,
1087
- _context: context
1088
- };
1089
- Object.defineProperties(Consumer, {
1090
- Provider: {
1091
- get: function() {
1092
- if (!hasWarnedAboutUsingConsumerProvider) {
1093
- hasWarnedAboutUsingConsumerProvider = true;
1094
- 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?");
1095
- }
1096
- return context.Provider;
1097
- },
1098
- set: function(_Provider) {
1099
- context.Provider = _Provider;
1100
- }
1101
- },
1102
- _currentValue: {
1103
- get: function() {
1104
- return context._currentValue;
1105
- },
1106
- set: function(_currentValue) {
1107
- context._currentValue = _currentValue;
1108
- }
1109
- },
1110
- _currentValue2: {
1111
- get: function() {
1112
- return context._currentValue2;
1113
- },
1114
- set: function(_currentValue2) {
1115
- context._currentValue2 = _currentValue2;
1116
- }
1117
- },
1118
- _threadCount: {
1119
- get: function() {
1120
- return context._threadCount;
1121
- },
1122
- set: function(_threadCount) {
1123
- context._threadCount = _threadCount;
1124
- }
1125
- },
1126
- Consumer: {
1127
- get: function() {
1128
- if (!hasWarnedAboutUsingNestedContextConsumers) {
1129
- hasWarnedAboutUsingNestedContextConsumers = true;
1130
- 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?");
1131
- }
1132
- return context.Consumer;
1133
- }
1134
- },
1135
- displayName: {
1136
- get: function() {
1137
- return context.displayName;
1138
- },
1139
- set: function(displayName) {
1140
- if (!hasWarnedAboutDisplayNameOnConsumer) {
1141
- warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName);
1142
- hasWarnedAboutDisplayNameOnConsumer = true;
1143
- }
1144
- }
1145
- }
1146
- });
1147
- context.Consumer = Consumer;
1148
- }
1149
- {
1150
- context._currentRenderer = null;
1151
- context._currentRenderer2 = null;
1152
- }
1153
- return context;
1154
- }
1155
- var Uninitialized = -1;
1156
- var Pending = 0;
1157
- var Resolved = 1;
1158
- var Rejected = 2;
1159
- function lazyInitializer(payload) {
1160
- if (payload._status === Uninitialized) {
1161
- var ctor = payload._result;
1162
- var thenable = ctor();
1163
- thenable.then(function(moduleObject2) {
1164
- if (payload._status === Pending || payload._status === Uninitialized) {
1165
- var resolved = payload;
1166
- resolved._status = Resolved;
1167
- resolved._result = moduleObject2;
1168
- }
1169
- }, function(error2) {
1170
- if (payload._status === Pending || payload._status === Uninitialized) {
1171
- var rejected = payload;
1172
- rejected._status = Rejected;
1173
- rejected._result = error2;
1174
- }
1175
- });
1176
- if (payload._status === Uninitialized) {
1177
- var pending = payload;
1178
- pending._status = Pending;
1179
- pending._result = thenable;
1180
- }
1181
- }
1182
- if (payload._status === Resolved) {
1183
- var moduleObject = payload._result;
1184
- {
1185
- if (moduleObject === void 0) {
1186
- error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject);
1187
- }
1188
- }
1189
- {
1190
- if (!("default" in moduleObject)) {
1191
- error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
1192
- }
1193
- }
1194
- return moduleObject.default;
1195
- } else {
1196
- throw payload._result;
1197
- }
1198
- }
1199
- function lazy(ctor) {
1200
- var payload = {
1201
- // We use these fields to store the result.
1202
- _status: Uninitialized,
1203
- _result: ctor
1204
- };
1205
- var lazyType = {
1206
- $$typeof: REACT_LAZY_TYPE,
1207
- _payload: payload,
1208
- _init: lazyInitializer
1209
- };
1210
- {
1211
- var defaultProps;
1212
- var propTypes;
1213
- Object.defineProperties(lazyType, {
1214
- defaultProps: {
1215
- configurable: true,
1216
- get: function() {
1217
- return defaultProps;
1218
- },
1219
- set: function(newDefaultProps) {
1220
- 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.");
1221
- defaultProps = newDefaultProps;
1222
- Object.defineProperty(lazyType, "defaultProps", {
1223
- enumerable: true
1224
- });
1225
- }
1226
- },
1227
- propTypes: {
1228
- configurable: true,
1229
- get: function() {
1230
- return propTypes;
1231
- },
1232
- set: function(newPropTypes) {
1233
- 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.");
1234
- propTypes = newPropTypes;
1235
- Object.defineProperty(lazyType, "propTypes", {
1236
- enumerable: true
1237
- });
1238
- }
1239
- }
1240
- });
1241
- }
1242
- return lazyType;
1243
- }
1244
- function forwardRef(render) {
1245
- {
1246
- if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
1247
- error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
1248
- } else if (typeof render !== "function") {
1249
- error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render);
1250
- } else {
1251
- if (render.length !== 0 && render.length !== 2) {
1252
- 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.");
1253
- }
1254
- }
1255
- if (render != null) {
1256
- if (render.defaultProps != null || render.propTypes != null) {
1257
- error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
1258
- }
1259
- }
1260
- }
1261
- var elementType = {
1262
- $$typeof: REACT_FORWARD_REF_TYPE,
1263
- render
1264
- };
1265
- {
1266
- var ownName;
1267
- Object.defineProperty(elementType, "displayName", {
1268
- enumerable: false,
1269
- configurable: true,
1270
- get: function() {
1271
- return ownName;
1272
- },
1273
- set: function(name) {
1274
- ownName = name;
1275
- if (!render.name && !render.displayName) {
1276
- render.displayName = name;
1277
- }
1278
- }
1279
- });
1280
- }
1281
- return elementType;
1282
- }
1283
- var REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
1284
- function isValidElementType(type) {
1285
- if (typeof type === "string" || typeof type === "function") {
1286
- return true;
1287
- }
1288
- 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) {
1289
- return true;
1290
- }
1291
- if (typeof type === "object" && type !== null) {
1292
- 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 || // This needs to include all possible module reference object
1293
- // types supported by any Flight configuration anywhere since
1294
- // we don't know which Flight build this will end up being used
1295
- // with.
1296
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
1297
- return true;
1298
- }
1299
- }
1300
- return false;
1301
- }
1302
- function memo(type, compare) {
1303
- {
1304
- if (!isValidElementType(type)) {
1305
- error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
1306
- }
1307
- }
1308
- var elementType = {
1309
- $$typeof: REACT_MEMO_TYPE,
1310
- type,
1311
- compare: compare === void 0 ? null : compare
1312
- };
1313
- {
1314
- var ownName;
1315
- Object.defineProperty(elementType, "displayName", {
1316
- enumerable: false,
1317
- configurable: true,
1318
- get: function() {
1319
- return ownName;
1320
- },
1321
- set: function(name) {
1322
- ownName = name;
1323
- if (!type.name && !type.displayName) {
1324
- type.displayName = name;
1325
- }
1326
- }
1327
- });
1328
- }
1329
- return elementType;
1330
- }
1331
- function resolveDispatcher() {
1332
- var dispatcher = ReactCurrentDispatcher.current;
1333
- {
1334
- if (dispatcher === null) {
1335
- 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:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");
1336
- }
1337
- }
1338
- return dispatcher;
1339
- }
1340
- function useContext(Context2) {
1341
- var dispatcher = resolveDispatcher();
1342
- {
1343
- if (Context2._context !== void 0) {
1344
- var realContext = Context2._context;
1345
- if (realContext.Consumer === Context2) {
1346
- 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?");
1347
- } else if (realContext.Provider === Context2) {
1348
- error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
1349
- }
1350
- }
1351
- }
1352
- return dispatcher.useContext(Context2);
1353
- }
1354
- function useState2(initialState10) {
1355
- var dispatcher = resolveDispatcher();
1356
- return dispatcher.useState(initialState10);
1357
- }
1358
- function useReducer(reducer, initialArg, init) {
1359
- var dispatcher = resolveDispatcher();
1360
- return dispatcher.useReducer(reducer, initialArg, init);
1361
- }
1362
- function useRef(initialValue) {
1363
- var dispatcher = resolveDispatcher();
1364
- return dispatcher.useRef(initialValue);
1365
- }
1366
- function useEffect2(create, deps) {
1367
- var dispatcher = resolveDispatcher();
1368
- return dispatcher.useEffect(create, deps);
1369
- }
1370
- function useInsertionEffect(create, deps) {
1371
- var dispatcher = resolveDispatcher();
1372
- return dispatcher.useInsertionEffect(create, deps);
1373
- }
1374
- function useLayoutEffect(create, deps) {
1375
- var dispatcher = resolveDispatcher();
1376
- return dispatcher.useLayoutEffect(create, deps);
1377
- }
1378
- function useCallback(callback, deps) {
1379
- var dispatcher = resolveDispatcher();
1380
- return dispatcher.useCallback(callback, deps);
1381
- }
1382
- function useMemo(create, deps) {
1383
- var dispatcher = resolveDispatcher();
1384
- return dispatcher.useMemo(create, deps);
1385
- }
1386
- function useImperativeHandle(ref, create, deps) {
1387
- var dispatcher = resolveDispatcher();
1388
- return dispatcher.useImperativeHandle(ref, create, deps);
1389
- }
1390
- function useDebugValue(value, formatterFn) {
1391
- {
1392
- var dispatcher = resolveDispatcher();
1393
- return dispatcher.useDebugValue(value, formatterFn);
1394
- }
1395
- }
1396
- function useTransition() {
1397
- var dispatcher = resolveDispatcher();
1398
- return dispatcher.useTransition();
1399
- }
1400
- function useDeferredValue(value) {
1401
- var dispatcher = resolveDispatcher();
1402
- return dispatcher.useDeferredValue(value);
1403
- }
1404
- function useId() {
1405
- var dispatcher = resolveDispatcher();
1406
- return dispatcher.useId();
1407
- }
1408
- function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
1409
- var dispatcher = resolveDispatcher();
1410
- return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1411
- }
1412
- var disabledDepth = 0;
1413
- var prevLog;
1414
- var prevInfo;
1415
- var prevWarn;
1416
- var prevError;
1417
- var prevGroup;
1418
- var prevGroupCollapsed;
1419
- var prevGroupEnd;
1420
- function disabledLog() {
1421
- }
1422
- disabledLog.__reactDisabledLog = true;
1423
- function disableLogs() {
1424
- {
1425
- if (disabledDepth === 0) {
1426
- prevLog = console.log;
1427
- prevInfo = console.info;
1428
- prevWarn = console.warn;
1429
- prevError = console.error;
1430
- prevGroup = console.group;
1431
- prevGroupCollapsed = console.groupCollapsed;
1432
- prevGroupEnd = console.groupEnd;
1433
- var props = {
1434
- configurable: true,
1435
- enumerable: true,
1436
- value: disabledLog,
1437
- writable: true
1438
- };
1439
- Object.defineProperties(console, {
1440
- info: props,
1441
- log: props,
1442
- warn: props,
1443
- error: props,
1444
- group: props,
1445
- groupCollapsed: props,
1446
- groupEnd: props
1447
- });
1448
- }
1449
- disabledDepth++;
1450
- }
1451
- }
1452
- function reenableLogs() {
1453
- {
1454
- disabledDepth--;
1455
- if (disabledDepth === 0) {
1456
- var props = {
1457
- configurable: true,
1458
- enumerable: true,
1459
- writable: true
1460
- };
1461
- Object.defineProperties(console, {
1462
- log: assign({}, props, {
1463
- value: prevLog
1464
- }),
1465
- info: assign({}, props, {
1466
- value: prevInfo
1467
- }),
1468
- warn: assign({}, props, {
1469
- value: prevWarn
1470
- }),
1471
- error: assign({}, props, {
1472
- value: prevError
1473
- }),
1474
- group: assign({}, props, {
1475
- value: prevGroup
1476
- }),
1477
- groupCollapsed: assign({}, props, {
1478
- value: prevGroupCollapsed
1479
- }),
1480
- groupEnd: assign({}, props, {
1481
- value: prevGroupEnd
1482
- })
1483
- });
1484
- }
1485
- if (disabledDepth < 0) {
1486
- error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1487
- }
1488
- }
1489
- }
1490
- var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
1491
- var prefix;
1492
- function describeBuiltInComponentFrame(name, source, ownerFn) {
1493
- {
1494
- if (prefix === void 0) {
1495
- try {
1496
- throw Error();
1497
- } catch (x) {
1498
- var match = x.stack.trim().match(/\n( *(at )?)/);
1499
- prefix = match && match[1] || "";
1500
- }
1501
- }
1502
- return "\n" + prefix + name;
1503
- }
1504
- }
1505
- var reentry = false;
1506
- var componentFrameCache;
1507
- {
1508
- var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
1509
- componentFrameCache = new PossiblyWeakMap();
1510
- }
1511
- function describeNativeComponentFrame(fn, construct) {
1512
- if (!fn || reentry) {
1513
- return "";
1514
- }
1515
- {
1516
- var frame = componentFrameCache.get(fn);
1517
- if (frame !== void 0) {
1518
- return frame;
1519
- }
1520
- }
1521
- var control;
1522
- reentry = true;
1523
- var previousPrepareStackTrace = Error.prepareStackTrace;
1524
- Error.prepareStackTrace = void 0;
1525
- var previousDispatcher;
1526
- {
1527
- previousDispatcher = ReactCurrentDispatcher$1.current;
1528
- ReactCurrentDispatcher$1.current = null;
1529
- disableLogs();
1530
- }
1531
- try {
1532
- if (construct) {
1533
- var Fake = function() {
1534
- throw Error();
1535
- };
1536
- Object.defineProperty(Fake.prototype, "props", {
1537
- set: function() {
1538
- throw Error();
1539
- }
1540
- });
1541
- if (typeof Reflect === "object" && Reflect.construct) {
1542
- try {
1543
- Reflect.construct(Fake, []);
1544
- } catch (x) {
1545
- control = x;
1546
- }
1547
- Reflect.construct(fn, [], Fake);
1548
- } else {
1549
- try {
1550
- Fake.call();
1551
- } catch (x) {
1552
- control = x;
1553
- }
1554
- fn.call(Fake.prototype);
1555
- }
1556
- } else {
1557
- try {
1558
- throw Error();
1559
- } catch (x) {
1560
- control = x;
1561
- }
1562
- fn();
1563
- }
1564
- } catch (sample) {
1565
- if (sample && control && typeof sample.stack === "string") {
1566
- var sampleLines = sample.stack.split("\n");
1567
- var controlLines = control.stack.split("\n");
1568
- var s = sampleLines.length - 1;
1569
- var c = controlLines.length - 1;
1570
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
1571
- c--;
1572
- }
1573
- for (; s >= 1 && c >= 0; s--, c--) {
1574
- if (sampleLines[s] !== controlLines[c]) {
1575
- if (s !== 1 || c !== 1) {
1576
- do {
1577
- s--;
1578
- c--;
1579
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
1580
- var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
1581
- if (fn.displayName && _frame.includes("<anonymous>")) {
1582
- _frame = _frame.replace("<anonymous>", fn.displayName);
1583
- }
1584
- {
1585
- if (typeof fn === "function") {
1586
- componentFrameCache.set(fn, _frame);
1587
- }
1588
- }
1589
- return _frame;
1590
- }
1591
- } while (s >= 1 && c >= 0);
1592
- }
1593
- break;
1594
- }
1595
- }
1596
- }
1597
- } finally {
1598
- reentry = false;
1599
- {
1600
- ReactCurrentDispatcher$1.current = previousDispatcher;
1601
- reenableLogs();
1602
- }
1603
- Error.prepareStackTrace = previousPrepareStackTrace;
1604
- }
1605
- var name = fn ? fn.displayName || fn.name : "";
1606
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
1607
- {
1608
- if (typeof fn === "function") {
1609
- componentFrameCache.set(fn, syntheticFrame);
1610
- }
1611
- }
1612
- return syntheticFrame;
1613
- }
1614
- function describeFunctionComponentFrame(fn, source, ownerFn) {
1615
- {
1616
- return describeNativeComponentFrame(fn, false);
1617
- }
1618
- }
1619
- function shouldConstruct(Component2) {
1620
- var prototype = Component2.prototype;
1621
- return !!(prototype && prototype.isReactComponent);
1622
- }
1623
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
1624
- if (type == null) {
1625
- return "";
1626
- }
1627
- if (typeof type === "function") {
1628
- {
1629
- return describeNativeComponentFrame(type, shouldConstruct(type));
1630
- }
1631
- }
1632
- if (typeof type === "string") {
1633
- return describeBuiltInComponentFrame(type);
1634
- }
1635
- switch (type) {
1636
- case REACT_SUSPENSE_TYPE:
1637
- return describeBuiltInComponentFrame("Suspense");
1638
- case REACT_SUSPENSE_LIST_TYPE:
1639
- return describeBuiltInComponentFrame("SuspenseList");
1640
- }
1641
- if (typeof type === "object") {
1642
- switch (type.$$typeof) {
1643
- case REACT_FORWARD_REF_TYPE:
1644
- return describeFunctionComponentFrame(type.render);
1645
- case REACT_MEMO_TYPE:
1646
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
1647
- case REACT_LAZY_TYPE: {
1648
- var lazyComponent = type;
1649
- var payload = lazyComponent._payload;
1650
- var init = lazyComponent._init;
1651
- try {
1652
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
1653
- } catch (x) {
1654
- }
1655
- }
1656
- }
1657
- }
1658
- return "";
1659
- }
1660
- var loggedTypeFailures = {};
1661
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
1662
- function setCurrentlyValidatingElement(element) {
1663
- {
1664
- if (element) {
1665
- var owner = element._owner;
1666
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1667
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
1668
- } else {
1669
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
1670
- }
1671
- }
1672
- }
1673
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
1674
- {
1675
- var has = Function.call.bind(hasOwnProperty);
1676
- for (var typeSpecName in typeSpecs) {
1677
- if (has(typeSpecs, typeSpecName)) {
1678
- var error$1 = void 0;
1679
- try {
1680
- if (typeof typeSpecs[typeSpecName] !== "function") {
1681
- 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`.");
1682
- err.name = "Invariant Violation";
1683
- throw err;
1684
- }
1685
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1686
- } catch (ex) {
1687
- error$1 = ex;
1688
- }
1689
- if (error$1 && !(error$1 instanceof Error)) {
1690
- setCurrentlyValidatingElement(element);
1691
- 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);
1692
- setCurrentlyValidatingElement(null);
1693
- }
1694
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
1695
- loggedTypeFailures[error$1.message] = true;
1696
- setCurrentlyValidatingElement(element);
1697
- error("Failed %s type: %s", location, error$1.message);
1698
- setCurrentlyValidatingElement(null);
1699
- }
1700
- }
1701
- }
1702
- }
1703
- }
1704
- function setCurrentlyValidatingElement$1(element) {
1705
- {
1706
- if (element) {
1707
- var owner = element._owner;
1708
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1709
- setExtraStackFrame(stack);
1710
- } else {
1711
- setExtraStackFrame(null);
1712
- }
1713
- }
1714
- }
1715
- var propTypesMisspellWarningShown;
1716
- {
1717
- propTypesMisspellWarningShown = false;
1718
- }
1719
- function getDeclarationErrorAddendum() {
1720
- if (ReactCurrentOwner.current) {
1721
- var name = getComponentNameFromType(ReactCurrentOwner.current.type);
1722
- if (name) {
1723
- return "\n\nCheck the render method of `" + name + "`.";
1724
- }
1725
- }
1726
- return "";
1727
- }
1728
- function getSourceInfoErrorAddendum(source) {
1729
- if (source !== void 0) {
1730
- var fileName = source.fileName.replace(/^.*[\\\/]/, "");
1731
- var lineNumber = source.lineNumber;
1732
- return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
1733
- }
1734
- return "";
1735
- }
1736
- function getSourceInfoErrorAddendumForProps(elementProps) {
1737
- if (elementProps !== null && elementProps !== void 0) {
1738
- return getSourceInfoErrorAddendum(elementProps.__source);
1739
- }
1740
- return "";
1741
- }
1742
- var ownerHasKeyUseWarning = {};
1743
- function getCurrentComponentErrorInfo(parentType) {
1744
- var info = getDeclarationErrorAddendum();
1745
- if (!info) {
1746
- var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
1747
- if (parentName) {
1748
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1749
- }
1750
- }
1751
- return info;
1752
- }
1753
- function validateExplicitKey(element, parentType) {
1754
- if (!element._store || element._store.validated || element.key != null) {
1755
- return;
1756
- }
1757
- element._store.validated = true;
1758
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1759
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1760
- return;
1761
- }
1762
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
1763
- var childOwner = "";
1764
- if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
1765
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
1766
- }
1767
- {
1768
- setCurrentlyValidatingElement$1(element);
1769
- 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);
1770
- setCurrentlyValidatingElement$1(null);
1771
- }
1772
- }
1773
- function validateChildKeys(node, parentType) {
1774
- if (typeof node !== "object") {
1775
- return;
1776
- }
1777
- if (isArray(node)) {
1778
- for (var i = 0; i < node.length; i++) {
1779
- var child = node[i];
1780
- if (isValidElement(child)) {
1781
- validateExplicitKey(child, parentType);
1782
- }
1783
- }
1784
- } else if (isValidElement(node)) {
1785
- if (node._store) {
1786
- node._store.validated = true;
1787
- }
1788
- } else if (node) {
1789
- var iteratorFn = getIteratorFn(node);
1790
- if (typeof iteratorFn === "function") {
1791
- if (iteratorFn !== node.entries) {
1792
- var iterator = iteratorFn.call(node);
1793
- var step;
1794
- while (!(step = iterator.next()).done) {
1795
- if (isValidElement(step.value)) {
1796
- validateExplicitKey(step.value, parentType);
1797
- }
1798
- }
1799
- }
1800
- }
1801
- }
1802
- }
1803
- function validatePropTypes(element) {
1804
- {
1805
- var type = element.type;
1806
- if (type === null || type === void 0 || typeof type === "string") {
1807
- return;
1808
- }
1809
- var propTypes;
1810
- if (typeof type === "function") {
1811
- propTypes = type.propTypes;
1812
- } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
1813
- // Inner props are checked in the reconciler.
1814
- type.$$typeof === REACT_MEMO_TYPE)) {
1815
- propTypes = type.propTypes;
1816
- } else {
1817
- return;
1818
- }
1819
- if (propTypes) {
1820
- var name = getComponentNameFromType(type);
1821
- checkPropTypes(propTypes, element.props, "prop", name, element);
1822
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
1823
- propTypesMisspellWarningShown = true;
1824
- var _name = getComponentNameFromType(type);
1825
- error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
1826
- }
1827
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
1828
- error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1829
- }
1830
- }
1831
- }
1832
- function validateFragmentProps(fragment) {
1833
- {
1834
- var keys = Object.keys(fragment.props);
1835
- for (var i = 0; i < keys.length; i++) {
1836
- var key = keys[i];
1837
- if (key !== "children" && key !== "key") {
1838
- setCurrentlyValidatingElement$1(fragment);
1839
- error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
1840
- setCurrentlyValidatingElement$1(null);
1841
- break;
1842
- }
1843
- }
1844
- if (fragment.ref !== null) {
1845
- setCurrentlyValidatingElement$1(fragment);
1846
- error("Invalid attribute `ref` supplied to `React.Fragment`.");
1847
- setCurrentlyValidatingElement$1(null);
1848
- }
1849
- }
1850
- }
1851
- function createElementWithValidation(type, props, children) {
1852
- var validType = isValidElementType(type);
1853
- if (!validType) {
1854
- var info = "";
1855
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
1856
- 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.";
1857
- }
1858
- var sourceInfo = getSourceInfoErrorAddendumForProps(props);
1859
- if (sourceInfo) {
1860
- info += sourceInfo;
1861
- } else {
1862
- info += getDeclarationErrorAddendum();
1863
- }
1864
- var typeString;
1865
- if (type === null) {
1866
- typeString = "null";
1867
- } else if (isArray(type)) {
1868
- typeString = "array";
1869
- } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
1870
- typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
1871
- info = " Did you accidentally export a JSX literal instead of a component?";
1872
- } else {
1873
- typeString = typeof type;
1874
- }
1875
- {
1876
- 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);
1877
- }
1878
- }
1879
- var element = createElement.apply(this, arguments);
1880
- if (element == null) {
1881
- return element;
1882
- }
1883
- if (validType) {
1884
- for (var i = 2; i < arguments.length; i++) {
1885
- validateChildKeys(arguments[i], type);
1886
- }
1887
- }
1888
- if (type === REACT_FRAGMENT_TYPE) {
1889
- validateFragmentProps(element);
1890
- } else {
1891
- validatePropTypes(element);
1892
- }
1893
- return element;
1894
- }
1895
- var didWarnAboutDeprecatedCreateFactory = false;
1896
- function createFactoryWithValidation(type) {
1897
- var validatedFactory = createElementWithValidation.bind(null, type);
1898
- validatedFactory.type = type;
1899
- {
1900
- if (!didWarnAboutDeprecatedCreateFactory) {
1901
- didWarnAboutDeprecatedCreateFactory = true;
1902
- warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");
1903
- }
1904
- Object.defineProperty(validatedFactory, "type", {
1905
- enumerable: false,
1906
- get: function() {
1907
- warn("Factory.type is deprecated. Access the class directly before passing it to createFactory.");
1908
- Object.defineProperty(this, "type", {
1909
- value: type
1910
- });
1911
- return type;
1912
- }
1913
- });
1914
- }
1915
- return validatedFactory;
1916
- }
1917
- function cloneElementWithValidation(element, props, children) {
1918
- var newElement = cloneElement.apply(this, arguments);
1919
- for (var i = 2; i < arguments.length; i++) {
1920
- validateChildKeys(arguments[i], newElement.type);
1921
- }
1922
- validatePropTypes(newElement);
1923
- return newElement;
1924
- }
1925
- function startTransition(scope, options) {
1926
- var prevTransition = ReactCurrentBatchConfig.transition;
1927
- ReactCurrentBatchConfig.transition = {};
1928
- var currentTransition = ReactCurrentBatchConfig.transition;
1929
- {
1930
- ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set();
1931
- }
1932
- try {
1933
- scope();
1934
- } finally {
1935
- ReactCurrentBatchConfig.transition = prevTransition;
1936
- {
1937
- if (prevTransition === null && currentTransition._updatedFibers) {
1938
- var updatedFibersCount = currentTransition._updatedFibers.size;
1939
- if (updatedFibersCount > 10) {
1940
- 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.");
1941
- }
1942
- currentTransition._updatedFibers.clear();
1943
- }
1944
- }
1945
- }
1946
- }
1947
- var didWarnAboutMessageChannel = false;
1948
- var enqueueTaskImpl = null;
1949
- function enqueueTask(task) {
1950
- if (enqueueTaskImpl === null) {
1951
- try {
1952
- var requireString = ("require" + Math.random()).slice(0, 7);
1953
- var nodeRequire = module && module[requireString];
1954
- enqueueTaskImpl = nodeRequire.call(module, "timers").setImmediate;
1955
- } catch (_err) {
1956
- enqueueTaskImpl = function(callback) {
1957
- {
1958
- if (didWarnAboutMessageChannel === false) {
1959
- didWarnAboutMessageChannel = true;
1960
- if (typeof MessageChannel === "undefined") {
1961
- 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.");
1962
- }
1963
- }
1964
- }
1965
- var channel = new MessageChannel();
1966
- channel.port1.onmessage = callback;
1967
- channel.port2.postMessage(void 0);
1968
- };
1969
- }
1970
- }
1971
- return enqueueTaskImpl(task);
1972
- }
1973
- var actScopeDepth = 0;
1974
- var didWarnNoAwaitAct = false;
1975
- function act(callback) {
1976
- {
1977
- var prevActScopeDepth = actScopeDepth;
1978
- actScopeDepth++;
1979
- if (ReactCurrentActQueue.current === null) {
1980
- ReactCurrentActQueue.current = [];
1981
- }
1982
- var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
1983
- var result;
1984
- try {
1985
- ReactCurrentActQueue.isBatchingLegacy = true;
1986
- result = callback();
1987
- if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
1988
- var queue = ReactCurrentActQueue.current;
1989
- if (queue !== null) {
1990
- ReactCurrentActQueue.didScheduleLegacyUpdate = false;
1991
- flushActQueue(queue);
1992
- }
1993
- }
1994
- } catch (error2) {
1995
- popActScope(prevActScopeDepth);
1996
- throw error2;
1997
- } finally {
1998
- ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
1999
- }
2000
- if (result !== null && typeof result === "object" && typeof result.then === "function") {
2001
- var thenableResult = result;
2002
- var wasAwaited = false;
2003
- var thenable = {
2004
- then: function(resolve, reject) {
2005
- wasAwaited = true;
2006
- thenableResult.then(function(returnValue2) {
2007
- popActScope(prevActScopeDepth);
2008
- if (actScopeDepth === 0) {
2009
- recursivelyFlushAsyncActWork(returnValue2, resolve, reject);
2010
- } else {
2011
- resolve(returnValue2);
2012
- }
2013
- }, function(error2) {
2014
- popActScope(prevActScopeDepth);
2015
- reject(error2);
2016
- });
2017
- }
2018
- };
2019
- {
2020
- if (!didWarnNoAwaitAct && typeof Promise !== "undefined") {
2021
- Promise.resolve().then(function() {
2022
- }).then(function() {
2023
- if (!wasAwaited) {
2024
- didWarnNoAwaitAct = true;
2025
- 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 () => ...);");
2026
- }
2027
- });
2028
- }
2029
- }
2030
- return thenable;
2031
- } else {
2032
- var returnValue = result;
2033
- popActScope(prevActScopeDepth);
2034
- if (actScopeDepth === 0) {
2035
- var _queue = ReactCurrentActQueue.current;
2036
- if (_queue !== null) {
2037
- flushActQueue(_queue);
2038
- ReactCurrentActQueue.current = null;
2039
- }
2040
- var _thenable = {
2041
- then: function(resolve, reject) {
2042
- if (ReactCurrentActQueue.current === null) {
2043
- ReactCurrentActQueue.current = [];
2044
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
2045
- } else {
2046
- resolve(returnValue);
2047
- }
2048
- }
2049
- };
2050
- return _thenable;
2051
- } else {
2052
- var _thenable2 = {
2053
- then: function(resolve, reject) {
2054
- resolve(returnValue);
2055
- }
2056
- };
2057
- return _thenable2;
2058
- }
2059
- }
2060
- }
2061
- }
2062
- function popActScope(prevActScopeDepth) {
2063
- {
2064
- if (prevActScopeDepth !== actScopeDepth - 1) {
2065
- error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
2066
- }
2067
- actScopeDepth = prevActScopeDepth;
2068
- }
2069
- }
2070
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
2071
- {
2072
- var queue = ReactCurrentActQueue.current;
2073
- if (queue !== null) {
2074
- try {
2075
- flushActQueue(queue);
2076
- enqueueTask(function() {
2077
- if (queue.length === 0) {
2078
- ReactCurrentActQueue.current = null;
2079
- resolve(returnValue);
2080
- } else {
2081
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
2082
- }
2083
- });
2084
- } catch (error2) {
2085
- reject(error2);
2086
- }
2087
- } else {
2088
- resolve(returnValue);
2089
- }
2090
- }
2091
- }
2092
- var isFlushing = false;
2093
- function flushActQueue(queue) {
2094
- {
2095
- if (!isFlushing) {
2096
- isFlushing = true;
2097
- var i = 0;
2098
- try {
2099
- for (; i < queue.length; i++) {
2100
- var callback = queue[i];
2101
- do {
2102
- callback = callback(true);
2103
- } while (callback !== null);
2104
- }
2105
- queue.length = 0;
2106
- } catch (error2) {
2107
- queue = queue.slice(i + 1);
2108
- throw error2;
2109
- } finally {
2110
- isFlushing = false;
2111
- }
2112
- }
2113
- }
2114
- }
2115
- var createElement$1 = createElementWithValidation;
2116
- var cloneElement$1 = cloneElementWithValidation;
2117
- var createFactory = createFactoryWithValidation;
2118
- var Children = {
2119
- map: mapChildren,
2120
- forEach: forEachChildren,
2121
- count: countChildren,
2122
- toArray,
2123
- only: onlyChild
2124
- };
2125
- exports.Children = Children;
2126
- exports.Component = Component;
2127
- exports.Fragment = REACT_FRAGMENT_TYPE;
2128
- exports.Profiler = REACT_PROFILER_TYPE;
2129
- exports.PureComponent = PureComponent;
2130
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
2131
- exports.Suspense = REACT_SUSPENSE_TYPE;
2132
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
2133
- exports.cloneElement = cloneElement$1;
2134
- exports.createContext = createContext;
2135
- exports.createElement = createElement$1;
2136
- exports.createFactory = createFactory;
2137
- exports.createRef = createRef;
2138
- exports.forwardRef = forwardRef;
2139
- exports.isValidElement = isValidElement;
2140
- exports.lazy = lazy;
2141
- exports.memo = memo;
2142
- exports.startTransition = startTransition;
2143
- exports.unstable_act = act;
2144
- exports.useCallback = useCallback;
2145
- exports.useContext = useContext;
2146
- exports.useDebugValue = useDebugValue;
2147
- exports.useDeferredValue = useDeferredValue;
2148
- exports.useEffect = useEffect2;
2149
- exports.useId = useId;
2150
- exports.useImperativeHandle = useImperativeHandle;
2151
- exports.useInsertionEffect = useInsertionEffect;
2152
- exports.useLayoutEffect = useLayoutEffect;
2153
- exports.useMemo = useMemo;
2154
- exports.useReducer = useReducer;
2155
- exports.useRef = useRef;
2156
- exports.useState = useState2;
2157
- exports.useSyncExternalStore = useSyncExternalStore;
2158
- exports.useTransition = useTransition;
2159
- exports.version = ReactVersion;
2160
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
2161
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
2162
- }
2163
- })();
2164
- }
2165
- }
2166
- });
2167
-
2168
- // node_modules/react/index.js
2169
- var require_react = __commonJS({
2170
- "node_modules/react/index.js"(exports, module) {
2171
- "use strict";
2172
- if (process.env.NODE_ENV === "production") {
2173
- module.exports = require_react_production_min();
2174
- } else {
2175
- module.exports = require_react_development();
2176
- }
2177
- }
2178
- });
2179
-
2180
- // node_modules/react/cjs/react-jsx-runtime.production.min.js
2181
- var require_react_jsx_runtime_production_min = __commonJS({
2182
- "node_modules/react/cjs/react-jsx-runtime.production.min.js"(exports) {
2183
- "use strict";
2184
- var f = require_react();
2185
- var k = Symbol.for("react.element");
2186
- var l = Symbol.for("react.fragment");
2187
- var m = Object.prototype.hasOwnProperty;
2188
- var n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;
2189
- var p = { key: true, ref: true, __self: true, __source: true };
2190
- function q(c, a, g) {
2191
- var b, d = {}, e = null, h = null;
2192
- void 0 !== g && (e = "" + g);
2193
- void 0 !== a.key && (e = "" + a.key);
2194
- void 0 !== a.ref && (h = a.ref);
2195
- for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
2196
- if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
2197
- return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
2198
- }
2199
- exports.Fragment = l;
2200
- exports.jsx = q;
2201
- exports.jsxs = q;
2202
- }
2203
- });
2204
-
2205
- // node_modules/react/cjs/react-jsx-runtime.development.js
2206
- var require_react_jsx_runtime_development = __commonJS({
2207
- "node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
2208
- "use strict";
2209
- if (process.env.NODE_ENV !== "production") {
2210
- (function() {
2211
- "use strict";
2212
- var React = require_react();
2213
- var REACT_ELEMENT_TYPE = Symbol.for("react.element");
2214
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
2215
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
2216
- var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
2217
- var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
2218
- var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
2219
- var REACT_CONTEXT_TYPE = Symbol.for("react.context");
2220
- var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
2221
- var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
2222
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
2223
- var REACT_MEMO_TYPE = Symbol.for("react.memo");
2224
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
2225
- var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
2226
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
2227
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
2228
- function getIteratorFn(maybeIterable) {
2229
- if (maybeIterable === null || typeof maybeIterable !== "object") {
2230
- return null;
2231
- }
2232
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
2233
- if (typeof maybeIterator === "function") {
2234
- return maybeIterator;
2235
- }
2236
- return null;
2237
- }
2238
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2239
- function error(format) {
2240
- {
2241
- {
2242
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2243
- args[_key2 - 1] = arguments[_key2];
2244
- }
2245
- printWarning("error", format, args);
2246
- }
2247
- }
2248
- }
2249
- function printWarning(level, format, args) {
2250
- {
2251
- var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
2252
- var stack = ReactDebugCurrentFrame2.getStackAddendum();
2253
- if (stack !== "") {
2254
- format += "%s";
2255
- args = args.concat([stack]);
2256
- }
2257
- var argsWithFormat = args.map(function(item) {
2258
- return String(item);
2259
- });
2260
- argsWithFormat.unshift("Warning: " + format);
2261
- Function.prototype.apply.call(console[level], console, argsWithFormat);
2262
- }
2263
- }
2264
- var enableScopeAPI = false;
2265
- var enableCacheElement = false;
2266
- var enableTransitionTracing = false;
2267
- var enableLegacyHidden = false;
2268
- var enableDebugTracing = false;
2269
- var REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
2270
- function isValidElementType(type) {
2271
- if (typeof type === "string" || typeof type === "function") {
2272
- return true;
2273
- }
2274
- 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) {
2275
- return true;
2276
- }
2277
- if (typeof type === "object" && type !== null) {
2278
- 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 || // This needs to include all possible module reference object
2279
- // types supported by any Flight configuration anywhere since
2280
- // we don't know which Flight build this will end up being used
2281
- // with.
2282
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
2283
- return true;
2284
- }
2285
- }
2286
- return false;
2287
- }
2288
- function getWrappedName(outerType, innerType, wrapperName) {
2289
- var displayName = outerType.displayName;
2290
- if (displayName) {
2291
- return displayName;
2292
- }
2293
- var functionName = innerType.displayName || innerType.name || "";
2294
- return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
2295
- }
2296
- function getContextName(type) {
2297
- return type.displayName || "Context";
2298
- }
2299
- function getComponentNameFromType(type) {
2300
- if (type == null) {
2301
- return null;
2302
- }
2303
- {
2304
- if (typeof type.tag === "number") {
2305
- error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
2306
- }
2307
- }
2308
- if (typeof type === "function") {
2309
- return type.displayName || type.name || null;
2310
- }
2311
- if (typeof type === "string") {
2312
- return type;
2313
- }
2314
- switch (type) {
2315
- case REACT_FRAGMENT_TYPE:
2316
- return "Fragment";
2317
- case REACT_PORTAL_TYPE:
2318
- return "Portal";
2319
- case REACT_PROFILER_TYPE:
2320
- return "Profiler";
2321
- case REACT_STRICT_MODE_TYPE:
2322
- return "StrictMode";
2323
- case REACT_SUSPENSE_TYPE:
2324
- return "Suspense";
2325
- case REACT_SUSPENSE_LIST_TYPE:
2326
- return "SuspenseList";
2327
- }
2328
- if (typeof type === "object") {
2329
- switch (type.$$typeof) {
2330
- case REACT_CONTEXT_TYPE:
2331
- var context = type;
2332
- return getContextName(context) + ".Consumer";
2333
- case REACT_PROVIDER_TYPE:
2334
- var provider = type;
2335
- return getContextName(provider._context) + ".Provider";
2336
- case REACT_FORWARD_REF_TYPE:
2337
- return getWrappedName(type, type.render, "ForwardRef");
2338
- case REACT_MEMO_TYPE:
2339
- var outerName = type.displayName || null;
2340
- if (outerName !== null) {
2341
- return outerName;
2342
- }
2343
- return getComponentNameFromType(type.type) || "Memo";
2344
- case REACT_LAZY_TYPE: {
2345
- var lazyComponent = type;
2346
- var payload = lazyComponent._payload;
2347
- var init = lazyComponent._init;
2348
- try {
2349
- return getComponentNameFromType(init(payload));
2350
- } catch (x) {
2351
- return null;
2352
- }
2353
- }
2354
- }
2355
- }
2356
- return null;
2357
- }
2358
- var assign = Object.assign;
2359
- var disabledDepth = 0;
2360
- var prevLog;
2361
- var prevInfo;
2362
- var prevWarn;
2363
- var prevError;
2364
- var prevGroup;
2365
- var prevGroupCollapsed;
2366
- var prevGroupEnd;
2367
- function disabledLog() {
2368
- }
2369
- disabledLog.__reactDisabledLog = true;
2370
- function disableLogs() {
2371
- {
2372
- if (disabledDepth === 0) {
2373
- prevLog = console.log;
2374
- prevInfo = console.info;
2375
- prevWarn = console.warn;
2376
- prevError = console.error;
2377
- prevGroup = console.group;
2378
- prevGroupCollapsed = console.groupCollapsed;
2379
- prevGroupEnd = console.groupEnd;
2380
- var props = {
2381
- configurable: true,
2382
- enumerable: true,
2383
- value: disabledLog,
2384
- writable: true
2385
- };
2386
- Object.defineProperties(console, {
2387
- info: props,
2388
- log: props,
2389
- warn: props,
2390
- error: props,
2391
- group: props,
2392
- groupCollapsed: props,
2393
- groupEnd: props
2394
- });
2395
- }
2396
- disabledDepth++;
2397
- }
2398
- }
2399
- function reenableLogs() {
2400
- {
2401
- disabledDepth--;
2402
- if (disabledDepth === 0) {
2403
- var props = {
2404
- configurable: true,
2405
- enumerable: true,
2406
- writable: true
2407
- };
2408
- Object.defineProperties(console, {
2409
- log: assign({}, props, {
2410
- value: prevLog
2411
- }),
2412
- info: assign({}, props, {
2413
- value: prevInfo
2414
- }),
2415
- warn: assign({}, props, {
2416
- value: prevWarn
2417
- }),
2418
- error: assign({}, props, {
2419
- value: prevError
2420
- }),
2421
- group: assign({}, props, {
2422
- value: prevGroup
2423
- }),
2424
- groupCollapsed: assign({}, props, {
2425
- value: prevGroupCollapsed
2426
- }),
2427
- groupEnd: assign({}, props, {
2428
- value: prevGroupEnd
2429
- })
2430
- });
2431
- }
2432
- if (disabledDepth < 0) {
2433
- error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
2434
- }
2435
- }
2436
- }
2437
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
2438
- var prefix;
2439
- function describeBuiltInComponentFrame(name, source, ownerFn) {
2440
- {
2441
- if (prefix === void 0) {
2442
- try {
2443
- throw Error();
2444
- } catch (x) {
2445
- var match = x.stack.trim().match(/\n( *(at )?)/);
2446
- prefix = match && match[1] || "";
2447
- }
2448
- }
2449
- return "\n" + prefix + name;
2450
- }
2451
- }
2452
- var reentry = false;
2453
- var componentFrameCache;
2454
- {
2455
- var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
2456
- componentFrameCache = new PossiblyWeakMap();
2457
- }
2458
- function describeNativeComponentFrame(fn, construct) {
2459
- if (!fn || reentry) {
2460
- return "";
2461
- }
2462
- {
2463
- var frame = componentFrameCache.get(fn);
2464
- if (frame !== void 0) {
2465
- return frame;
2466
- }
2467
- }
2468
- var control;
2469
- reentry = true;
2470
- var previousPrepareStackTrace = Error.prepareStackTrace;
2471
- Error.prepareStackTrace = void 0;
2472
- var previousDispatcher;
2473
- {
2474
- previousDispatcher = ReactCurrentDispatcher.current;
2475
- ReactCurrentDispatcher.current = null;
2476
- disableLogs();
2477
- }
2478
- try {
2479
- if (construct) {
2480
- var Fake = function() {
2481
- throw Error();
2482
- };
2483
- Object.defineProperty(Fake.prototype, "props", {
2484
- set: function() {
2485
- throw Error();
2486
- }
2487
- });
2488
- if (typeof Reflect === "object" && Reflect.construct) {
2489
- try {
2490
- Reflect.construct(Fake, []);
2491
- } catch (x) {
2492
- control = x;
2493
- }
2494
- Reflect.construct(fn, [], Fake);
2495
- } else {
2496
- try {
2497
- Fake.call();
2498
- } catch (x) {
2499
- control = x;
2500
- }
2501
- fn.call(Fake.prototype);
2502
- }
2503
- } else {
2504
- try {
2505
- throw Error();
2506
- } catch (x) {
2507
- control = x;
2508
- }
2509
- fn();
2510
- }
2511
- } catch (sample) {
2512
- if (sample && control && typeof sample.stack === "string") {
2513
- var sampleLines = sample.stack.split("\n");
2514
- var controlLines = control.stack.split("\n");
2515
- var s = sampleLines.length - 1;
2516
- var c = controlLines.length - 1;
2517
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
2518
- c--;
2519
- }
2520
- for (; s >= 1 && c >= 0; s--, c--) {
2521
- if (sampleLines[s] !== controlLines[c]) {
2522
- if (s !== 1 || c !== 1) {
2523
- do {
2524
- s--;
2525
- c--;
2526
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
2527
- var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
2528
- if (fn.displayName && _frame.includes("<anonymous>")) {
2529
- _frame = _frame.replace("<anonymous>", fn.displayName);
2530
- }
2531
- {
2532
- if (typeof fn === "function") {
2533
- componentFrameCache.set(fn, _frame);
2534
- }
2535
- }
2536
- return _frame;
2537
- }
2538
- } while (s >= 1 && c >= 0);
2539
- }
2540
- break;
2541
- }
2542
- }
2543
- }
2544
- } finally {
2545
- reentry = false;
2546
- {
2547
- ReactCurrentDispatcher.current = previousDispatcher;
2548
- reenableLogs();
2549
- }
2550
- Error.prepareStackTrace = previousPrepareStackTrace;
2551
- }
2552
- var name = fn ? fn.displayName || fn.name : "";
2553
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
2554
- {
2555
- if (typeof fn === "function") {
2556
- componentFrameCache.set(fn, syntheticFrame);
2557
- }
2558
- }
2559
- return syntheticFrame;
2560
- }
2561
- function describeFunctionComponentFrame(fn, source, ownerFn) {
2562
- {
2563
- return describeNativeComponentFrame(fn, false);
2564
- }
2565
- }
2566
- function shouldConstruct(Component) {
2567
- var prototype = Component.prototype;
2568
- return !!(prototype && prototype.isReactComponent);
2569
- }
2570
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
2571
- if (type == null) {
2572
- return "";
2573
- }
2574
- if (typeof type === "function") {
2575
- {
2576
- return describeNativeComponentFrame(type, shouldConstruct(type));
2577
- }
2578
- }
2579
- if (typeof type === "string") {
2580
- return describeBuiltInComponentFrame(type);
2581
- }
2582
- switch (type) {
2583
- case REACT_SUSPENSE_TYPE:
2584
- return describeBuiltInComponentFrame("Suspense");
2585
- case REACT_SUSPENSE_LIST_TYPE:
2586
- return describeBuiltInComponentFrame("SuspenseList");
2587
- }
2588
- if (typeof type === "object") {
2589
- switch (type.$$typeof) {
2590
- case REACT_FORWARD_REF_TYPE:
2591
- return describeFunctionComponentFrame(type.render);
2592
- case REACT_MEMO_TYPE:
2593
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
2594
- case REACT_LAZY_TYPE: {
2595
- var lazyComponent = type;
2596
- var payload = lazyComponent._payload;
2597
- var init = lazyComponent._init;
2598
- try {
2599
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2600
- } catch (x) {
2601
- }
2602
- }
2603
- }
2604
- }
2605
- return "";
2606
- }
2607
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2608
- var loggedTypeFailures = {};
2609
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2610
- function setCurrentlyValidatingElement(element) {
2611
- {
2612
- if (element) {
2613
- var owner = element._owner;
2614
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2615
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
2616
- } else {
2617
- ReactDebugCurrentFrame.setExtraStackFrame(null);
2618
- }
2619
- }
2620
- }
2621
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
2622
- {
2623
- var has = Function.call.bind(hasOwnProperty);
2624
- for (var typeSpecName in typeSpecs) {
2625
- if (has(typeSpecs, typeSpecName)) {
2626
- var error$1 = void 0;
2627
- try {
2628
- if (typeof typeSpecs[typeSpecName] !== "function") {
2629
- 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`.");
2630
- err.name = "Invariant Violation";
2631
- throw err;
2632
- }
2633
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
2634
- } catch (ex) {
2635
- error$1 = ex;
2636
- }
2637
- if (error$1 && !(error$1 instanceof Error)) {
2638
- setCurrentlyValidatingElement(element);
2639
- 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);
2640
- setCurrentlyValidatingElement(null);
2641
- }
2642
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
2643
- loggedTypeFailures[error$1.message] = true;
2644
- setCurrentlyValidatingElement(element);
2645
- error("Failed %s type: %s", location, error$1.message);
2646
- setCurrentlyValidatingElement(null);
2647
- }
2648
- }
2649
- }
2650
- }
2651
- }
2652
- var isArrayImpl = Array.isArray;
2653
- function isArray(a) {
2654
- return isArrayImpl(a);
2655
- }
2656
- function typeName(value) {
2657
- {
2658
- var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
2659
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
2660
- return type;
2661
- }
2662
- }
2663
- function willCoercionThrow(value) {
2664
- {
2665
- try {
2666
- testStringCoercion(value);
2667
- return false;
2668
- } catch (e) {
2669
- return true;
2670
- }
2671
- }
2672
- }
2673
- function testStringCoercion(value) {
2674
- return "" + value;
2675
- }
2676
- function checkKeyStringCoercion(value) {
2677
- {
2678
- if (willCoercionThrow(value)) {
2679
- error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
2680
- return testStringCoercion(value);
2681
- }
2682
- }
2683
- }
2684
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
2685
- var RESERVED_PROPS = {
2686
- key: true,
2687
- ref: true,
2688
- __self: true,
2689
- __source: true
2690
- };
2691
- var specialPropKeyWarningShown;
2692
- var specialPropRefWarningShown;
2693
- var didWarnAboutStringRefs;
2694
- {
2695
- didWarnAboutStringRefs = {};
2696
- }
2697
- function hasValidRef(config) {
2698
- {
2699
- if (hasOwnProperty.call(config, "ref")) {
2700
- var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
2701
- if (getter && getter.isReactWarning) {
2702
- return false;
2703
- }
2704
- }
2705
- }
2706
- return config.ref !== void 0;
2707
- }
2708
- function hasValidKey(config) {
2709
- {
2710
- if (hasOwnProperty.call(config, "key")) {
2711
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
2712
- if (getter && getter.isReactWarning) {
2713
- return false;
2714
- }
2715
- }
2716
- }
2717
- return config.key !== void 0;
2718
- }
2719
- function warnIfStringRefCannotBeAutoConverted(config, self) {
2720
- {
2721
- if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
2722
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
2723
- if (!didWarnAboutStringRefs[componentName]) {
2724
- 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', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
2725
- didWarnAboutStringRefs[componentName] = true;
2726
- }
2727
- }
2728
- }
2729
- }
2730
- function defineKeyPropWarningGetter(props, displayName) {
2731
- {
2732
- var warnAboutAccessingKey = function() {
2733
- if (!specialPropKeyWarningShown) {
2734
- specialPropKeyWarningShown = true;
2735
- 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);
2736
- }
2737
- };
2738
- warnAboutAccessingKey.isReactWarning = true;
2739
- Object.defineProperty(props, "key", {
2740
- get: warnAboutAccessingKey,
2741
- configurable: true
2742
- });
2743
- }
2744
- }
2745
- function defineRefPropWarningGetter(props, displayName) {
2746
- {
2747
- var warnAboutAccessingRef = function() {
2748
- if (!specialPropRefWarningShown) {
2749
- specialPropRefWarningShown = true;
2750
- 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);
2751
- }
2752
- };
2753
- warnAboutAccessingRef.isReactWarning = true;
2754
- Object.defineProperty(props, "ref", {
2755
- get: warnAboutAccessingRef,
2756
- configurable: true
2757
- });
2758
- }
2759
- }
2760
- var ReactElement = function(type, key, ref, self, source, owner, props) {
2761
- var element = {
2762
- // This tag allows us to uniquely identify this as a React Element
2763
- $$typeof: REACT_ELEMENT_TYPE,
2764
- // Built-in properties that belong on the element
2765
- type,
2766
- key,
2767
- ref,
2768
- props,
2769
- // Record the component responsible for creating this element.
2770
- _owner: owner
2771
- };
2772
- {
2773
- element._store = {};
2774
- Object.defineProperty(element._store, "validated", {
2775
- configurable: false,
2776
- enumerable: false,
2777
- writable: true,
2778
- value: false
2779
- });
2780
- Object.defineProperty(element, "_self", {
2781
- configurable: false,
2782
- enumerable: false,
2783
- writable: false,
2784
- value: self
2785
- });
2786
- Object.defineProperty(element, "_source", {
2787
- configurable: false,
2788
- enumerable: false,
2789
- writable: false,
2790
- value: source
2791
- });
2792
- if (Object.freeze) {
2793
- Object.freeze(element.props);
2794
- Object.freeze(element);
2795
- }
2796
- }
2797
- return element;
2798
- };
2799
- function jsxDEV(type, config, maybeKey, source, self) {
2800
- {
2801
- var propName;
2802
- var props = {};
2803
- var key = null;
2804
- var ref = null;
2805
- if (maybeKey !== void 0) {
2806
- {
2807
- checkKeyStringCoercion(maybeKey);
2808
- }
2809
- key = "" + maybeKey;
2810
- }
2811
- if (hasValidKey(config)) {
2812
- {
2813
- checkKeyStringCoercion(config.key);
2814
- }
2815
- key = "" + config.key;
2816
- }
2817
- if (hasValidRef(config)) {
2818
- ref = config.ref;
2819
- warnIfStringRefCannotBeAutoConverted(config, self);
2820
- }
2821
- for (propName in config) {
2822
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
2823
- props[propName] = config[propName];
2824
- }
2825
- }
2826
- if (type && type.defaultProps) {
2827
- var defaultProps = type.defaultProps;
2828
- for (propName in defaultProps) {
2829
- if (props[propName] === void 0) {
2830
- props[propName] = defaultProps[propName];
2831
- }
2832
- }
2833
- }
2834
- if (key || ref) {
2835
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
2836
- if (key) {
2837
- defineKeyPropWarningGetter(props, displayName);
2838
- }
2839
- if (ref) {
2840
- defineRefPropWarningGetter(props, displayName);
2841
- }
2842
- }
2843
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
2844
- }
2845
- }
2846
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
2847
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
2848
- function setCurrentlyValidatingElement$1(element) {
2849
- {
2850
- if (element) {
2851
- var owner = element._owner;
2852
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2853
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
2854
- } else {
2855
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
2856
- }
2857
- }
2858
- }
2859
- var propTypesMisspellWarningShown;
2860
- {
2861
- propTypesMisspellWarningShown = false;
2862
- }
2863
- function isValidElement(object) {
2864
- {
2865
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2866
- }
2867
- }
2868
- function getDeclarationErrorAddendum() {
2869
- {
2870
- if (ReactCurrentOwner$1.current) {
2871
- var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
2872
- if (name) {
2873
- return "\n\nCheck the render method of `" + name + "`.";
2874
- }
2875
- }
2876
- return "";
2877
- }
2878
- }
2879
- function getSourceInfoErrorAddendum(source) {
2880
- {
2881
- if (source !== void 0) {
2882
- var fileName = source.fileName.replace(/^.*[\\\/]/, "");
2883
- var lineNumber = source.lineNumber;
2884
- return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
2885
- }
2886
- return "";
2887
- }
2888
- }
2889
- var ownerHasKeyUseWarning = {};
2890
- function getCurrentComponentErrorInfo(parentType) {
2891
- {
2892
- var info = getDeclarationErrorAddendum();
2893
- if (!info) {
2894
- var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
2895
- if (parentName) {
2896
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
2897
- }
2898
- }
2899
- return info;
2900
- }
2901
- }
2902
- function validateExplicitKey(element, parentType) {
2903
- {
2904
- if (!element._store || element._store.validated || element.key != null) {
2905
- return;
2906
- }
2907
- element._store.validated = true;
2908
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2909
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
2910
- return;
2911
- }
2912
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
2913
- var childOwner = "";
2914
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
2915
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
2916
- }
2917
- setCurrentlyValidatingElement$1(element);
2918
- 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);
2919
- setCurrentlyValidatingElement$1(null);
2920
- }
2921
- }
2922
- function validateChildKeys(node, parentType) {
2923
- {
2924
- if (typeof node !== "object") {
2925
- return;
2926
- }
2927
- if (isArray(node)) {
2928
- for (var i = 0; i < node.length; i++) {
2929
- var child = node[i];
2930
- if (isValidElement(child)) {
2931
- validateExplicitKey(child, parentType);
2932
- }
2933
- }
2934
- } else if (isValidElement(node)) {
2935
- if (node._store) {
2936
- node._store.validated = true;
2937
- }
2938
- } else if (node) {
2939
- var iteratorFn = getIteratorFn(node);
2940
- if (typeof iteratorFn === "function") {
2941
- if (iteratorFn !== node.entries) {
2942
- var iterator = iteratorFn.call(node);
2943
- var step;
2944
- while (!(step = iterator.next()).done) {
2945
- if (isValidElement(step.value)) {
2946
- validateExplicitKey(step.value, parentType);
2947
- }
2948
- }
2949
- }
2950
- }
2951
- }
2952
- }
2953
- }
2954
- function validatePropTypes(element) {
2955
- {
2956
- var type = element.type;
2957
- if (type === null || type === void 0 || typeof type === "string") {
2958
- return;
2959
- }
2960
- var propTypes;
2961
- if (typeof type === "function") {
2962
- propTypes = type.propTypes;
2963
- } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
2964
- // Inner props are checked in the reconciler.
2965
- type.$$typeof === REACT_MEMO_TYPE)) {
2966
- propTypes = type.propTypes;
2967
- } else {
2968
- return;
2969
- }
2970
- if (propTypes) {
2971
- var name = getComponentNameFromType(type);
2972
- checkPropTypes(propTypes, element.props, "prop", name, element);
2973
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
2974
- propTypesMisspellWarningShown = true;
2975
- var _name = getComponentNameFromType(type);
2976
- error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
2977
- }
2978
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
2979
- error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2980
- }
2981
- }
2982
- }
2983
- function validateFragmentProps(fragment) {
2984
- {
2985
- var keys = Object.keys(fragment.props);
2986
- for (var i = 0; i < keys.length; i++) {
2987
- var key = keys[i];
2988
- if (key !== "children" && key !== "key") {
2989
- setCurrentlyValidatingElement$1(fragment);
2990
- error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
2991
- setCurrentlyValidatingElement$1(null);
2992
- break;
2993
- }
2994
- }
2995
- if (fragment.ref !== null) {
2996
- setCurrentlyValidatingElement$1(fragment);
2997
- error("Invalid attribute `ref` supplied to `React.Fragment`.");
2998
- setCurrentlyValidatingElement$1(null);
2999
- }
3000
- }
3001
- }
3002
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
3003
- {
3004
- var validType = isValidElementType(type);
3005
- if (!validType) {
3006
- var info = "";
3007
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
3008
- 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.";
3009
- }
3010
- var sourceInfo = getSourceInfoErrorAddendum(source);
3011
- if (sourceInfo) {
3012
- info += sourceInfo;
3013
- } else {
3014
- info += getDeclarationErrorAddendum();
3015
- }
3016
- var typeString;
3017
- if (type === null) {
3018
- typeString = "null";
3019
- } else if (isArray(type)) {
3020
- typeString = "array";
3021
- } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
3022
- typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
3023
- info = " Did you accidentally export a JSX literal instead of a component?";
3024
- } else {
3025
- typeString = typeof type;
3026
- }
3027
- error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
3028
- }
3029
- var element = jsxDEV(type, props, key, source, self);
3030
- if (element == null) {
3031
- return element;
3032
- }
3033
- if (validType) {
3034
- var children = props.children;
3035
- if (children !== void 0) {
3036
- if (isStaticChildren) {
3037
- if (isArray(children)) {
3038
- for (var i = 0; i < children.length; i++) {
3039
- validateChildKeys(children[i], type);
3040
- }
3041
- if (Object.freeze) {
3042
- Object.freeze(children);
3043
- }
3044
- } else {
3045
- error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
3046
- }
3047
- } else {
3048
- validateChildKeys(children, type);
3049
- }
3050
- }
3051
- }
3052
- if (type === REACT_FRAGMENT_TYPE) {
3053
- validateFragmentProps(element);
3054
- } else {
3055
- validatePropTypes(element);
3056
- }
3057
- return element;
3058
- }
3059
- }
3060
- function jsxWithValidationStatic(type, props, key) {
3061
- {
3062
- return jsxWithValidation(type, props, key, true);
3063
- }
3064
- }
3065
- function jsxWithValidationDynamic(type, props, key) {
3066
- {
3067
- return jsxWithValidation(type, props, key, false);
3068
- }
3069
- }
3070
- var jsx5 = jsxWithValidationDynamic;
3071
- var jsxs = jsxWithValidationStatic;
3072
- exports.Fragment = REACT_FRAGMENT_TYPE;
3073
- exports.jsx = jsx5;
3074
- exports.jsxs = jsxs;
3075
- })();
3076
- }
3077
- }
3078
- });
3079
-
3080
- // node_modules/react/jsx-runtime.js
3081
- var require_jsx_runtime = __commonJS({
3082
- "node_modules/react/jsx-runtime.js"(exports, module) {
3083
- "use strict";
3084
- if (process.env.NODE_ENV === "production") {
3085
- module.exports = require_react_jsx_runtime_production_min();
3086
- } else {
3087
- module.exports = require_react_jsx_runtime_development();
3088
- }
3089
- }
3090
- });
3091
-
3092
1
  // src/configs/axios-client.ts
3093
2
  import axios from "axios";
3094
3
 
@@ -3145,6 +54,9 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
3145
54
  UriConstants2["CREATE_UPDATE_PATH"] = `/create_update`;
3146
55
  UriConstants2["TWOFA_METHOD_PATH"] = `/id/api/v2/call`;
3147
56
  UriConstants2["SIGNIN_SSO"] = `/signin-sso/oauth`;
57
+ UriConstants2["GRANT_ACCESS"] = "/grant-access";
58
+ UriConstants2["TOKEN_BY_CODE"] = "/token";
59
+ UriConstants2["LOGOUT"] = "/logout";
3148
60
  return UriConstants2;
3149
61
  })(UriConstants || {});
3150
62
 
@@ -6050,6 +2962,25 @@ var copyTextToClipboard = async (text) => {
6050
2962
  }
6051
2963
  }
6052
2964
  };
2965
+ var updateTokenParamInOriginalRequest = (originalRequest, newAccessToken) => {
2966
+ if (!originalRequest.data) return originalRequest.data;
2967
+ if (typeof originalRequest.data === "string") {
2968
+ try {
2969
+ const parsedData = JSON.parse(originalRequest.data);
2970
+ if (parsedData.with_context && typeof parsedData.with_context === "object") {
2971
+ parsedData.with_context.token = newAccessToken;
2972
+ }
2973
+ return JSON.stringify(parsedData);
2974
+ } catch (e) {
2975
+ console.warn("Failed to parse originalRequest.data", e);
2976
+ return originalRequest.data;
2977
+ }
2978
+ }
2979
+ if (typeof originalRequest.data === "object" && originalRequest.data.with_context) {
2980
+ originalRequest.data.with_context.token = newAccessToken;
2981
+ }
2982
+ return originalRequest.data;
2983
+ };
6053
2984
  var isObjectEmpty = (obj) => {
6054
2985
  return Object.keys(obj).length === 0;
6055
2986
  };
@@ -6117,7 +3048,8 @@ var axiosClient = {
6117
3048
  });
6118
3049
  instance.interceptors.request.use(
6119
3050
  async (config2) => {
6120
- const token = await localStorage2.getAccessToken();
3051
+ const useRefreshToken = config2.useRefreshToken;
3052
+ const token = useRefreshToken ? await localStorage2.getRefreshToken() : await localStorage2.getAccessToken();
6121
3053
  if (token) {
6122
3054
  config2.headers["Authorization"] = "Bearer " + token;
6123
3055
  }
@@ -6143,7 +3075,7 @@ var axiosClient = {
6143
3075
  return data;
6144
3076
  };
6145
3077
  const originalRequest = error.config;
6146
- if ((error.response?.status === 403 || error.response?.status === 401 || error.response?.status === 404) && ["TOKEN_EXPIRED", "AUTHEN_FAIL", 401].includes(
3078
+ if ((error.response?.status === 403 || error.response?.status === 401 || error.response?.status === 404) && ["TOKEN_EXPIRED", "AUTHEN_FAIL", 401, "ERR_2FA_006"].includes(
6147
3079
  error.response.data.code
6148
3080
  )) {
6149
3081
  if (isRefreshing) {
@@ -6151,6 +3083,10 @@ var axiosClient = {
6151
3083
  failedQueue.push({ resolve, reject });
6152
3084
  }).then((token) => {
6153
3085
  originalRequest.headers["Authorization"] = "Bearer " + token;
3086
+ originalRequest.data = updateTokenParamInOriginalRequest(
3087
+ originalRequest,
3088
+ token
3089
+ );
6154
3090
  return instance.request(originalRequest);
6155
3091
  }).catch(async (err) => {
6156
3092
  if ((err.response?.status === 400 || err.response?.status === 401) && ["invalid_grant"].includes(err.response.data.error)) {
@@ -6175,11 +3111,11 @@ var axiosClient = {
6175
3111
  );
6176
3112
  return new Promise(function(resolve) {
6177
3113
  axios.post(
6178
- `${config.baseUrl}${"/authentication/oauth2/token" /* AUTH_TOKEN_PATH */}`,
3114
+ `${config.baseUrl}${config.refreshTokenEndpoint ?? "/authentication/oauth2/token" /* AUTH_TOKEN_PATH */}`,
6179
3115
  payload,
6180
3116
  {
6181
3117
  headers: {
6182
- "Content-Type": "multipart/form-data",
3118
+ "Content-Type": config.refreshTokenEndpoint ? "application/x-www-form-urlencoded" : "multipart/form-data",
6183
3119
  Authorization: `Bearer ${accessTokenExp}`
6184
3120
  }
6185
3121
  }
@@ -6189,10 +3125,14 @@ var axiosClient = {
6189
3125
  await localStorage2.setRefreshToken(data.refresh_token);
6190
3126
  axios.defaults.headers.common["Authorization"] = "Bearer " + data.access_token;
6191
3127
  originalRequest.headers["Authorization"] = "Bearer " + data.access_token;
3128
+ originalRequest.data = updateTokenParamInOriginalRequest(
3129
+ originalRequest,
3130
+ data.access_token
3131
+ );
6192
3132
  processQueue(null, data.access_token);
6193
3133
  resolve(instance.request(originalRequest));
6194
3134
  }).catch(async (err) => {
6195
- if (err && (err?.error_code === "AUTHEN_FAIL" || err?.error_code === "TOKEN_EXPIRED" || err?.error_code === "TOKEN_INCORRECT" || err?.code === "ERR_BAD_REQUEST")) {
3135
+ if (err && (err?.error_code === "AUTHEN_FAIL" || err?.error_code === "TOKEN_EXPIRED" || err?.error_code === "TOKEN_INCORRECT" || err?.code === "ERR_BAD_REQUEST") || err?.error_code === "ERR_2FA_006") {
6196
3136
  await clearAuthToken();
6197
3137
  }
6198
3138
  if (err && err.response) {
@@ -6900,6 +3840,7 @@ var EnvStore = class {
6900
3840
  db;
6901
3841
  localStorageUtils;
6902
3842
  sessionStorageUtils;
3843
+ refreshTokenEndpoint;
6903
3844
  constructor(envStore2, localStorageUtils2, sessionStorageUtils2) {
6904
3845
  this.envStore = envStore2;
6905
3846
  this.localStorageUtils = localStorageUtils2;
@@ -6916,6 +3857,7 @@ var EnvStore = class {
6916
3857
  this.companies = env2?.companies || [];
6917
3858
  this.user = env2?.user;
6918
3859
  this.db = env2?.db;
3860
+ this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
6919
3861
  }
6920
3862
  setupEnv(envConfig) {
6921
3863
  const dispatch = this.envStore.dispatch;
@@ -7257,6 +4199,38 @@ var AuthService = {
7257
4199
  async getProviders(db) {
7258
4200
  const env2 = getEnv();
7259
4201
  return env2?.requests?.get("/oauth/providers", { params: { db } });
4202
+ },
4203
+ async getAccessByCode(code) {
4204
+ const env2 = getEnv();
4205
+ const data = new URLSearchParams();
4206
+ data.append("code", code);
4207
+ data.append("grant_type", "authorization_code");
4208
+ data.append("client_id", env2?.config?.clientId || "");
4209
+ data.append("redirect_uri", env2?.config?.redirectUri || "");
4210
+ return env2?.requests?.post(
4211
+ `${env2?.baseUrl?.replace("/mms/", "/id/")}/${"/token" /* TOKEN_BY_CODE */}`,
4212
+ data,
4213
+ {
4214
+ headers: {
4215
+ "Content-Type": "application/x-www-form-urlencoded"
4216
+ }
4217
+ }
4218
+ );
4219
+ },
4220
+ async logout(data) {
4221
+ const env2 = getEnv();
4222
+ console.log(data);
4223
+ return env2?.requests?.post(
4224
+ "/logout" /* LOGOUT */,
4225
+ {},
4226
+ {
4227
+ headers: {
4228
+ "Content-Type": "application/json"
4229
+ },
4230
+ withCredentials: true,
4231
+ useRefreshToken: true
4232
+ }
4233
+ );
7260
4234
  }
7261
4235
  };
7262
4236
  var auth_service_default = AuthService;
@@ -8351,6 +5325,119 @@ var ViewService = {
8351
5325
  "Content-Type": "application/json"
8352
5326
  }
8353
5327
  });
5328
+ },
5329
+ async grantAccess({
5330
+ redirect_uri,
5331
+ state,
5332
+ client_id,
5333
+ scopes
5334
+ }) {
5335
+ const env2 = getEnv();
5336
+ const jsonData = {
5337
+ redirect_uri,
5338
+ state,
5339
+ client_id,
5340
+ scopes
5341
+ };
5342
+ return env2?.requests.post("/grant-access" /* GRANT_ACCESS */, jsonData, {
5343
+ headers: {
5344
+ "Content-Type": "application/json"
5345
+ },
5346
+ withCredentials: true
5347
+ });
5348
+ },
5349
+ async getFieldsViewSecurity({
5350
+ method,
5351
+ token,
5352
+ views
5353
+ }) {
5354
+ const env2 = getEnv();
5355
+ const jsonData = {
5356
+ method,
5357
+ kwargs: {
5358
+ views
5359
+ },
5360
+ with_context: {
5361
+ token
5362
+ }
5363
+ };
5364
+ return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
5365
+ headers: {
5366
+ "Content-Type": "application/json"
5367
+ }
5368
+ });
5369
+ },
5370
+ async settingsWebRead2fa({
5371
+ method,
5372
+ model,
5373
+ kwargs,
5374
+ token
5375
+ }) {
5376
+ const env2 = getEnv();
5377
+ const jsonData = {
5378
+ method,
5379
+ model,
5380
+ kwargs,
5381
+ with_context: {
5382
+ token
5383
+ }
5384
+ };
5385
+ return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
5386
+ headers: {
5387
+ "Content-Type": "application/json"
5388
+ }
5389
+ });
5390
+ },
5391
+ async requestSetupTotp({ method, token }) {
5392
+ const env2 = getEnv();
5393
+ const jsonData = {
5394
+ method,
5395
+ with_context: {
5396
+ token
5397
+ }
5398
+ };
5399
+ return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
5400
+ headers: {
5401
+ "Content-Type": "application/json"
5402
+ }
5403
+ });
5404
+ },
5405
+ async verifyTotp({
5406
+ method,
5407
+ action_token,
5408
+ code
5409
+ }) {
5410
+ const env2 = getEnv();
5411
+ const jsonData = {
5412
+ method,
5413
+ kwargs: {
5414
+ vals: {
5415
+ code
5416
+ }
5417
+ },
5418
+ with_context: {
5419
+ action_token
5420
+ }
5421
+ };
5422
+ return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
5423
+ headers: {
5424
+ "Content-Type": "application/json"
5425
+ }
5426
+ });
5427
+ },
5428
+ async removeTotpSetUp({ method, token }) {
5429
+ const env2 = getEnv();
5430
+ const jsonData = {
5431
+ method,
5432
+ with_context: {
5433
+ token
5434
+ }
5435
+ };
5436
+ return env2?.requests.post("/call" /* CALL_PATH */, jsonData, {
5437
+ headers: {
5438
+ "Content-Type": "application/json"
5439
+ }
5440
+ });
8354
5441
  }
8355
5442
  };
8356
5443
  var view_service_default = ViewService;
@@ -8465,19 +5552,41 @@ var useUpdatePassword = () => {
8465
5552
  };
8466
5553
  var use_update_password_default = useUpdatePassword;
8467
5554
 
8468
- // src/hooks/company/use-get-company-info.ts
5555
+ // src/hooks/auth/use-logout.ts
8469
5556
  import { useMutation as useMutation10 } from "@tanstack/react-query";
8470
- var useGetCompanyInfo = () => {
5557
+ var useLogout = () => {
8471
5558
  return useMutation10({
5559
+ mutationFn: (data) => {
5560
+ return auth_service_default.logout(data);
5561
+ }
5562
+ });
5563
+ };
5564
+ var use_logout_default = useLogout;
5565
+
5566
+ // src/hooks/auth/use-get-access-by-code.ts
5567
+ import { useMutation as useMutation11 } from "@tanstack/react-query";
5568
+ var useGetAccessByCode = () => {
5569
+ return useMutation11({
5570
+ mutationFn: ({ code }) => {
5571
+ return auth_service_default.getAccessByCode(code);
5572
+ }
5573
+ });
5574
+ };
5575
+ var use_get_access_by_code_default = useGetAccessByCode;
5576
+
5577
+ // src/hooks/company/use-get-company-info.ts
5578
+ import { useMutation as useMutation12 } from "@tanstack/react-query";
5579
+ var useGetCompanyInfo = () => {
5580
+ return useMutation12({
8472
5581
  mutationFn: (id) => company_service_default.getInfoCompany(id)
8473
5582
  });
8474
5583
  };
8475
5584
  var use_get_company_info_default = useGetCompanyInfo;
8476
5585
 
8477
5586
  // src/hooks/company/use-get-current-company.ts
8478
- import { useMutation as useMutation11 } from "@tanstack/react-query";
5587
+ import { useMutation as useMutation13 } from "@tanstack/react-query";
8479
5588
  var useGetCurrentCompany = () => {
8480
- return useMutation11({
5589
+ return useMutation13({
8481
5590
  mutationFn: () => company_service_default.getCurrentCompany()
8482
5591
  });
8483
5592
  };
@@ -8504,9 +5613,9 @@ var useGetListCompany = (companyIDs = []) => {
8504
5613
  var use_get_list_company_default = useGetListCompany;
8505
5614
 
8506
5615
  // src/hooks/excel/use-export-excel.ts
8507
- import { useMutation as useMutation12 } from "@tanstack/react-query";
5616
+ import { useMutation as useMutation14 } from "@tanstack/react-query";
8508
5617
  var useExportExcel = () => {
8509
- return useMutation12({
5618
+ return useMutation14({
8510
5619
  mutationFn: ({
8511
5620
  model,
8512
5621
  domain,
@@ -8531,9 +5640,9 @@ var useExportExcel = () => {
8531
5640
  var use_export_excel_default = useExportExcel;
8532
5641
 
8533
5642
  // src/hooks/excel/use-get-field-export.ts
8534
- import { useMutation as useMutation13 } from "@tanstack/react-query";
5643
+ import { useMutation as useMutation15 } from "@tanstack/react-query";
8535
5644
  var useGetFieldExport = () => {
8536
- return useMutation13({
5645
+ return useMutation15({
8537
5646
  mutationFn: ({
8538
5647
  ids,
8539
5648
  model,
@@ -8580,9 +5689,9 @@ var useGetFileExcel = ({ model }) => {
8580
5689
  var use_get_file_excel_default = useGetFileExcel;
8581
5690
 
8582
5691
  // src/hooks/excel/use-parse-preview.ts
8583
- import { useMutation as useMutation14 } from "@tanstack/react-query";
5692
+ import { useMutation as useMutation16 } from "@tanstack/react-query";
8584
5693
  var useParsePreview = () => {
8585
- return useMutation14({
5694
+ return useMutation16({
8586
5695
  mutationFn: ({
8587
5696
  id,
8588
5697
  selectedSheet,
@@ -8599,9 +5708,9 @@ var useParsePreview = () => {
8599
5708
  var use_parse_preview_default = useParsePreview;
8600
5709
 
8601
5710
  // src/hooks/excel/use-upload-file.ts
8602
- import { useMutation as useMutation15 } from "@tanstack/react-query";
5711
+ import { useMutation as useMutation17 } from "@tanstack/react-query";
8603
5712
  var useUploadFile = () => {
8604
- return useMutation15({
5713
+ return useMutation17({
8605
5714
  mutationFn: ({ formData }) => excel_service_default.uploadFile({
8606
5715
  formData
8607
5716
  })
@@ -8610,9 +5719,9 @@ var useUploadFile = () => {
8610
5719
  var use_upload_file_default = useUploadFile;
8611
5720
 
8612
5721
  // src/hooks/excel/use-upload-id-file.ts
8613
- import { useMutation as useMutation16 } from "@tanstack/react-query";
5722
+ import { useMutation as useMutation18 } from "@tanstack/react-query";
8614
5723
  var useUploadIdFile = () => {
8615
- return useMutation16({
5724
+ return useMutation18({
8616
5725
  mutationFn: ({ formData }) => excel_service_default.uploadIdFile({
8617
5726
  formData
8618
5727
  })
@@ -8621,9 +5730,9 @@ var useUploadIdFile = () => {
8621
5730
  var use_upload_id_file_default = useUploadIdFile;
8622
5731
 
8623
5732
  // src/hooks/excel/uss-execute-import.ts
8624
- import { useMutation as useMutation17 } from "@tanstack/react-query";
5733
+ import { useMutation as useMutation19 } from "@tanstack/react-query";
8625
5734
  var useExecuteImport = () => {
8626
- return useMutation17({
5735
+ return useMutation19({
8627
5736
  mutationFn: ({
8628
5737
  fields,
8629
5738
  columns,
@@ -8644,9 +5753,9 @@ var useExecuteImport = () => {
8644
5753
  var uss_execute_import_default = useExecuteImport;
8645
5754
 
8646
5755
  // src/hooks/form/use-change-status.ts
8647
- import { useMutation as useMutation18 } from "@tanstack/react-query";
5756
+ import { useMutation as useMutation20 } from "@tanstack/react-query";
8648
5757
  var useChangeStatus = () => {
8649
- return useMutation18({
5758
+ return useMutation20({
8650
5759
  mutationFn: ({ data }) => {
8651
5760
  return form_service_default.changeStatus({
8652
5761
  data
@@ -8657,9 +5766,9 @@ var useChangeStatus = () => {
8657
5766
  var use_change_status_default = useChangeStatus;
8658
5767
 
8659
5768
  // src/hooks/form/use-delete-comment.ts
8660
- import { useMutation as useMutation19 } from "@tanstack/react-query";
5769
+ import { useMutation as useMutation21 } from "@tanstack/react-query";
8661
5770
  var useDeleteComment = () => {
8662
- return useMutation19({
5771
+ return useMutation21({
8663
5772
  mutationFn: ({ data }) => form_service_default.deleteComment({
8664
5773
  data
8665
5774
  })
@@ -8724,9 +5833,9 @@ var useGetImage = ({
8724
5833
  var use_get_image_default = useGetImage;
8725
5834
 
8726
5835
  // src/hooks/form/use-send-comment.ts
8727
- import { useMutation as useMutation20 } from "@tanstack/react-query";
5836
+ import { useMutation as useMutation22 } from "@tanstack/react-query";
8728
5837
  var useSendComment = () => {
8729
- return useMutation20({
5838
+ return useMutation22({
8730
5839
  mutationFn: ({ data }) => form_service_default.sentComment({
8731
5840
  data
8732
5841
  })
@@ -8735,9 +5844,9 @@ var useSendComment = () => {
8735
5844
  var use_send_comment_default = useSendComment;
8736
5845
 
8737
5846
  // src/hooks/form/use-upload-image.ts
8738
- import { useMutation as useMutation21 } from "@tanstack/react-query";
5847
+ import { useMutation as useMutation23 } from "@tanstack/react-query";
8739
5848
  var useUploadImage = () => {
8740
- return useMutation21({
5849
+ return useMutation23({
8741
5850
  mutationFn: ({ data }) => form_service_default.uploadImage({
8742
5851
  data
8743
5852
  })
@@ -8746,9 +5855,9 @@ var useUploadImage = () => {
8746
5855
  var use_upload_image_default = useUploadImage;
8747
5856
 
8748
5857
  // src/hooks/model/use-delete.ts
8749
- import { useMutation as useMutation22 } from "@tanstack/react-query";
5858
+ import { useMutation as useMutation24 } from "@tanstack/react-query";
8750
5859
  var useDelete = () => {
8751
- return useMutation22({
5860
+ return useMutation24({
8752
5861
  mutationFn: ({ ids, model }) => model_service_default.delete({ ids, model })
8753
5862
  });
8754
5863
  };
@@ -8802,9 +5911,9 @@ var useGetCurrency = () => {
8802
5911
  var use_get_currency_default = useGetCurrency;
8803
5912
 
8804
5913
  // src/hooks/model/use-get-detail.ts
8805
- import { useMutation as useMutation23 } from "@tanstack/react-query";
5914
+ import { useMutation as useMutation25 } from "@tanstack/react-query";
8806
5915
  var useGetDetail = () => {
8807
- return useMutation23({
5916
+ return useMutation25({
8808
5917
  mutationFn: ({
8809
5918
  model,
8810
5919
  ids,
@@ -8997,9 +6106,9 @@ var useOdooDataTransform = () => {
8997
6106
  var use_odoo_data_transform_default = useOdooDataTransform;
8998
6107
 
8999
6108
  // src/hooks/model/use-onchange-form.ts
9000
- import { useMutation as useMutation24 } from "@tanstack/react-query";
6109
+ import { useMutation as useMutation26 } from "@tanstack/react-query";
9001
6110
  var useOnChangeForm = () => {
9002
- return useMutation24({
6111
+ return useMutation26({
9003
6112
  mutationFn: ({
9004
6113
  ids,
9005
6114
  model,
@@ -9020,9 +6129,9 @@ var useOnChangeForm = () => {
9020
6129
  var use_onchange_form_default = useOnChangeForm;
9021
6130
 
9022
6131
  // src/hooks/model/use-save.ts
9023
- import { useMutation as useMutation25 } from "@tanstack/react-query";
6132
+ import { useMutation as useMutation27 } from "@tanstack/react-query";
9024
6133
  var useSave = () => {
9025
- return useMutation25({
6134
+ return useMutation27({
9026
6135
  mutationFn: ({
9027
6136
  ids,
9028
6137
  model,
@@ -9035,18 +6144,18 @@ var useSave = () => {
9035
6144
  var use_save_default = useSave;
9036
6145
 
9037
6146
  // src/hooks/user/use-get-profile.ts
9038
- import { useMutation as useMutation26 } from "@tanstack/react-query";
6147
+ import { useMutation as useMutation28 } from "@tanstack/react-query";
9039
6148
  var useGetProfile = () => {
9040
- return useMutation26({
6149
+ return useMutation28({
9041
6150
  mutationFn: () => user_service_default.getProfile()
9042
6151
  });
9043
6152
  };
9044
6153
  var use_get_profile_default = useGetProfile;
9045
6154
 
9046
6155
  // src/hooks/user/use-get-user.ts
9047
- import { useMutation as useMutation27 } from "@tanstack/react-query";
6156
+ import { useMutation as useMutation29 } from "@tanstack/react-query";
9048
6157
  var useGetUser = () => {
9049
- return useMutation27({
6158
+ return useMutation29({
9050
6159
  mutationFn: ({ id, context }) => user_service_default.getUser({
9051
6160
  id,
9052
6161
  context
@@ -9056,9 +6165,9 @@ var useGetUser = () => {
9056
6165
  var use_get_user_default = useGetUser;
9057
6166
 
9058
6167
  // src/hooks/user/use-switch-locale.ts
9059
- import { useMutation as useMutation28 } from "@tanstack/react-query";
6168
+ import { useMutation as useMutation30 } from "@tanstack/react-query";
9060
6169
  var useSwitchLocale = () => {
9061
- return useMutation28({
6170
+ return useMutation30({
9062
6171
  mutationFn: ({ data }) => {
9063
6172
  return user_service_default.switchUserLocale({
9064
6173
  id: data.id,
@@ -9070,9 +6179,9 @@ var useSwitchLocale = () => {
9070
6179
  var use_switch_locale_default = useSwitchLocale;
9071
6180
 
9072
6181
  // src/hooks/view/use-button.ts
9073
- import { useMutation as useMutation29 } from "@tanstack/react-query";
6182
+ import { useMutation as useMutation31 } from "@tanstack/react-query";
9074
6183
  var useButton = () => {
9075
- return useMutation29({
6184
+ return useMutation31({
9076
6185
  mutationFn: ({
9077
6186
  model,
9078
6187
  ids,
@@ -9092,9 +6201,9 @@ var useButton = () => {
9092
6201
  var use_button_default = useButton;
9093
6202
 
9094
6203
  // src/hooks/view/use-duplicate-record.ts
9095
- import { useMutation as useMutation30 } from "@tanstack/react-query";
6204
+ import { useMutation as useMutation32 } from "@tanstack/react-query";
9096
6205
  var useDuplicateRecord = () => {
9097
- return useMutation30({
6206
+ return useMutation32({
9098
6207
  mutationFn: ({
9099
6208
  id,
9100
6209
  model,
@@ -9220,9 +6329,9 @@ var useGetMenu = (context, enabled) => {
9220
6329
  var use_get_menu_default = useGetMenu;
9221
6330
 
9222
6331
  // src/hooks/view/use-get-print-report.ts
9223
- import { useMutation as useMutation31 } from "@tanstack/react-query";
6332
+ import { useMutation as useMutation33 } from "@tanstack/react-query";
9224
6333
  var useGetPrintReport = () => {
9225
- return useMutation31({
6334
+ return useMutation33({
9226
6335
  mutationFn: ({ id }) => action_service_default.getPrintReportName({
9227
6336
  id
9228
6337
  })
@@ -9286,9 +6395,9 @@ var useGetView = (viewParams, actData) => {
9286
6395
  var use_get_view_default = useGetView;
9287
6396
 
9288
6397
  // src/hooks/view/use-load-action.ts
9289
- import { useMutation as useMutation32 } from "@tanstack/react-query";
6398
+ import { useMutation as useMutation34 } from "@tanstack/react-query";
9290
6399
  var useLoadAction = () => {
9291
- return useMutation32({
6400
+ return useMutation34({
9292
6401
  mutationFn: ({
9293
6402
  idAction,
9294
6403
  context
@@ -9314,9 +6423,9 @@ var useLoadMessage = () => {
9314
6423
  var use_load_message_default = useLoadMessage;
9315
6424
 
9316
6425
  // src/hooks/view/use-print.ts
9317
- import { useMutation as useMutation33 } from "@tanstack/react-query";
6426
+ import { useMutation as useMutation35 } from "@tanstack/react-query";
9318
6427
  var usePrint = () => {
9319
- return useMutation33({
6428
+ return useMutation35({
9320
6429
  mutationFn: ({ id, report, db }) => action_service_default.print({
9321
6430
  id,
9322
6431
  report,
@@ -9327,9 +6436,9 @@ var usePrint = () => {
9327
6436
  var use_print_default = usePrint;
9328
6437
 
9329
6438
  // src/hooks/view/use-remove-row.ts
9330
- import { useMutation as useMutation34 } from "@tanstack/react-query";
6439
+ import { useMutation as useMutation36 } from "@tanstack/react-query";
9331
6440
  var useRemoveRow = () => {
9332
- return useMutation34({
6441
+ return useMutation36({
9333
6442
  mutationFn: ({
9334
6443
  model,
9335
6444
  ids,
@@ -9361,9 +6470,9 @@ var useGetResequence = (model, resIds, context, offset) => {
9361
6470
  var use_resequence_default = useGetResequence;
9362
6471
 
9363
6472
  // src/hooks/view/use-run-action.ts
9364
- import { useMutation as useMutation35 } from "@tanstack/react-query";
6473
+ import { useMutation as useMutation37 } from "@tanstack/react-query";
9365
6474
  var useRunAction = () => {
9366
- return useMutation35({
6475
+ return useMutation37({
9367
6476
  mutationFn: ({
9368
6477
  idAction,
9369
6478
  context
@@ -9376,9 +6485,9 @@ var useRunAction = () => {
9376
6485
  var use_run_action_default = useRunAction;
9377
6486
 
9378
6487
  // src/hooks/view/use-signin-sso.ts
9379
- import { useMutation as useMutation36 } from "@tanstack/react-query";
6488
+ import { useMutation as useMutation38 } from "@tanstack/react-query";
9380
6489
  var useSignInSSO = () => {
9381
- return useMutation36({
6490
+ return useMutation38({
9382
6491
  mutationFn: ({
9383
6492
  redirect_uri,
9384
6493
  state,
@@ -9399,9 +6508,9 @@ var useSignInSSO = () => {
9399
6508
  var use_signin_sso_default = useSignInSSO;
9400
6509
 
9401
6510
  // src/hooks/view/use-verify-2FA.ts
9402
- import { useMutation as useMutation37 } from "@tanstack/react-query";
6511
+ import { useMutation as useMutation39 } from "@tanstack/react-query";
9403
6512
  var useVerify2FA = () => {
9404
- return useMutation37({
6513
+ return useMutation39({
9405
6514
  mutationFn: ({
9406
6515
  method,
9407
6516
  with_context,
@@ -9418,9 +6527,9 @@ var useVerify2FA = () => {
9418
6527
  var use_verify_2FA_default = useVerify2FA;
9419
6528
 
9420
6529
  // src/hooks/view/uset-get-2FA-method.ts
9421
- import { useMutation as useMutation38 } from "@tanstack/react-query";
6530
+ import { useMutation as useMutation40 } from "@tanstack/react-query";
9422
6531
  var useGet2FAMethods = () => {
9423
- return useMutation38({
6532
+ return useMutation40({
9424
6533
  mutationFn: ({
9425
6534
  method,
9426
6535
  with_context
@@ -9434,6 +6543,24 @@ var useGet2FAMethods = () => {
9434
6543
  };
9435
6544
  var uset_get_2FA_method_default = useGet2FAMethods;
9436
6545
 
6546
+ // src/hooks/view/use-get-fields-view-security.ts
6547
+ import { useMutation as useMutation41 } from "@tanstack/react-query";
6548
+
6549
+ // src/hooks/view/use-grant-access.ts
6550
+ import { useMutation as useMutation42 } from "@tanstack/react-query";
6551
+
6552
+ // src/hooks/view/use-remove-totp-setup.ts
6553
+ import { useMutation as useMutation43 } from "@tanstack/react-query";
6554
+
6555
+ // src/hooks/view/use-request-setup-totp.ts
6556
+ import { useMutation as useMutation44 } from "@tanstack/react-query";
6557
+
6558
+ // src/hooks/view/use-settings-web-read-2fa.ts
6559
+ import { useMutation as useMutation45 } from "@tanstack/react-query";
6560
+
6561
+ // src/hooks/view/use-verify-totp.ts
6562
+ import { useMutation as useMutation46 } from "@tanstack/react-query";
6563
+
9437
6564
  // src/models/company-model/index.ts
9438
6565
  var CompanyModel = class extends base_model_default {
9439
6566
  constructor(init) {
@@ -9460,8 +6587,8 @@ var UserModel = class extends base_model_default {
9460
6587
  var user_model_default = UserModel;
9461
6588
 
9462
6589
  // src/provider/react-query-provider.tsx
9463
- var import_jsx_runtime = __toESM(require_jsx_runtime());
9464
6590
  import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
6591
+ import { jsx } from "react/jsx-runtime";
9465
6592
  var ReactQueryProvider = ({ children }) => {
9466
6593
  const queryClient = new QueryClient({
9467
6594
  defaultOptions: {
@@ -9474,30 +6601,30 @@ var ReactQueryProvider = ({ children }) => {
9474
6601
  }
9475
6602
  }
9476
6603
  });
9477
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientProvider, { client: queryClient, children });
6604
+ return /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children });
9478
6605
  };
9479
6606
 
9480
6607
  // src/provider/redux-provider.tsx
9481
6608
  import { Provider } from "react-redux";
9482
- var import_jsx_runtime2 = __toESM(require_jsx_runtime());
6609
+ import { jsx as jsx2 } from "react/jsx-runtime";
9483
6610
  var ReduxProvider = ({ children }) => {
9484
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Provider, { store: envStore, children });
6611
+ return /* @__PURE__ */ jsx2(Provider, { store: envStore, children });
9485
6612
  };
9486
6613
 
9487
6614
  // src/provider/main-provider.tsx
9488
- var import_jsx_runtime3 = __toESM(require_jsx_runtime());
6615
+ import { jsx as jsx3 } from "react/jsx-runtime";
9489
6616
  var MainProvider = ({ children }) => {
9490
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ReduxProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ReactQueryProvider, { children }) });
6617
+ return /* @__PURE__ */ jsx3(ReduxProvider, { children: /* @__PURE__ */ jsx3(ReactQueryProvider, { children }) });
9491
6618
  };
9492
6619
 
9493
6620
  // src/provider/version-gate-provider.tsx
9494
- var import_react = __toESM(require_react());
6621
+ import { useEffect, useState } from "react";
9495
6622
  import { useQueryClient } from "@tanstack/react-query";
9496
- var import_jsx_runtime4 = __toESM(require_jsx_runtime());
6623
+ import { Fragment, jsx as jsx4 } from "react/jsx-runtime";
9497
6624
  var VersionGate = ({ children }) => {
9498
6625
  const queryClient = useQueryClient();
9499
- const [ready, setReady] = (0, import_react.useState)(false);
9500
- (0, import_react.useEffect)(() => {
6626
+ const [ready, setReady] = useState(false);
6627
+ useEffect(() => {
9501
6628
  const clearVersion = () => {
9502
6629
  queryClient.clear();
9503
6630
  localStorage.removeItem("__api_version__");
@@ -9524,7 +6651,7 @@ var VersionGate = ({ children }) => {
9524
6651
  return () => window.removeEventListener("keydown", onKey);
9525
6652
  }
9526
6653
  }, [queryClient]);
9527
- return ready ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children }) : null;
6654
+ return ready ? /* @__PURE__ */ jsx4(Fragment, { children }) : null;
9528
6655
  };
9529
6656
  export {
9530
6657
  action_service_default as ActionService,
@@ -9665,6 +6792,7 @@ export {
9665
6792
  stringToColor,
9666
6793
  toQueryString,
9667
6794
  updateSearchMap,
6795
+ updateTokenParamInOriginalRequest,
9668
6796
  useAppDispatch,
9669
6797
  useAppSelector,
9670
6798
  use_button_default as useButton,
@@ -9677,6 +6805,7 @@ export {
9677
6805
  use_forgot_password_default as useForgotPassword,
9678
6806
  use_forgotpassword_sso_default as useForgotPasswordSSO,
9679
6807
  uset_get_2FA_method_default as useGet2FAMethods,
6808
+ use_get_access_by_code_default as useGetAccessByCode,
9680
6809
  use_get_action_detail_default as useGetActionDetail,
9681
6810
  use_get_all_default as useGetAll,
9682
6811
  use_get_calendar_default as useGetCalendar,
@@ -9709,6 +6838,7 @@ export {
9709
6838
  use_load_message_default as useLoadMessage,
9710
6839
  use_login_credential_default as useLoginCredential,
9711
6840
  use_login_socical_default as useLoginSocial,
6841
+ use_logout_default as useLogout,
9712
6842
  use_model_default as useModel,
9713
6843
  use_odoo_data_transform_default as useOdooDataTransform,
9714
6844
  use_onchange_form_default as useOnChangeForm,
@@ -9730,49 +6860,3 @@ export {
9730
6860
  use_verify_2FA_default as useVerify2FA,
9731
6861
  validateAndParseDate
9732
6862
  };
9733
- /*! Bundled license information:
9734
-
9735
- react/cjs/react.production.min.js:
9736
- (**
9737
- * @license React
9738
- * react.production.min.js
9739
- *
9740
- * Copyright (c) Facebook, Inc. and its affiliates.
9741
- *
9742
- * This source code is licensed under the MIT license found in the
9743
- * LICENSE file in the root directory of this source tree.
9744
- *)
9745
-
9746
- react/cjs/react.development.js:
9747
- (**
9748
- * @license React
9749
- * react.development.js
9750
- *
9751
- * Copyright (c) Facebook, Inc. and its affiliates.
9752
- *
9753
- * This source code is licensed under the MIT license found in the
9754
- * LICENSE file in the root directory of this source tree.
9755
- *)
9756
-
9757
- react/cjs/react-jsx-runtime.production.min.js:
9758
- (**
9759
- * @license React
9760
- * react-jsx-runtime.production.min.js
9761
- *
9762
- * Copyright (c) Facebook, Inc. and its affiliates.
9763
- *
9764
- * This source code is licensed under the MIT license found in the
9765
- * LICENSE file in the root directory of this source tree.
9766
- *)
9767
-
9768
- react/cjs/react-jsx-runtime.development.js:
9769
- (**
9770
- * @license React
9771
- * react-jsx-runtime.development.js
9772
- *
9773
- * Copyright (c) Facebook, Inc. and its affiliates.
9774
- *
9775
- * This source code is licensed under the MIT license found in the
9776
- * LICENSE file in the root directory of this source tree.
9777
- *)
9778
- */