@nibssplc/cams-sdk-react 0.0.1-beta.16 → 0.0.1-beta.18

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.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React__default from 'react';
2
- import React__default__default, { useState, useRef, useEffect, useCallback, useMemo, useReducer, useContext } from 'react';
2
+ import React__default__default, { useState, useRef, useEffect, useCallback, useMemo, useReducer, useContext, createContext } from 'react';
3
3
  import { CAMSSessionManager, CAMSError, CAMSErrorType } from '@nibssplc/cams-sdk';
4
4
  export * from '@nibssplc/cams-sdk';
5
5
 
@@ -20,6 +20,29 @@ PERFORMANCE OF THIS SOFTWARE.
20
20
  /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
21
21
 
22
22
 
23
+ var __assign = function() {
24
+ __assign = Object.assign || function __assign(t) {
25
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
26
+ s = arguments[i];
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
28
+ }
29
+ return t;
30
+ };
31
+ return __assign.apply(this, arguments);
32
+ };
33
+
34
+ function __rest(s, e) {
35
+ var t = {};
36
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
37
+ t[p] = s[p];
38
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
39
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
40
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
41
+ t[p[i]] = s[p[i]];
42
+ }
43
+ return t;
44
+ }
45
+
23
46
  function __awaiter(thisArg, _arguments, P, generator) {
24
47
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
25
48
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -16811,26 +16834,47 @@ function useCAMSMSALAuth(options) {
16811
16834
 
16812
16835
  var jsxRuntime = {exports: {}};
16813
16836
 
16814
- var reactJsxRuntime_production_min = {};
16837
+ var reactJsxRuntime_production = {};
16815
16838
 
16816
16839
  /**
16817
16840
  * @license React
16818
- * react-jsx-runtime.production.min.js
16841
+ * react-jsx-runtime.production.js
16819
16842
  *
16820
- * Copyright (c) Facebook, Inc. and its affiliates.
16843
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
16821
16844
  *
16822
16845
  * This source code is licensed under the MIT license found in the
16823
16846
  * LICENSE file in the root directory of this source tree.
16824
16847
  */
16825
16848
 
16826
- var hasRequiredReactJsxRuntime_production_min;
16827
-
16828
- function requireReactJsxRuntime_production_min () {
16829
- if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
16830
- hasRequiredReactJsxRuntime_production_min = 1;
16831
- var f=React__default__default,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:true,ref:true,__self:true,__source:true};
16832
- function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a) void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
16833
- return reactJsxRuntime_production_min;
16849
+ var hasRequiredReactJsxRuntime_production;
16850
+
16851
+ function requireReactJsxRuntime_production () {
16852
+ if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
16853
+ hasRequiredReactJsxRuntime_production = 1;
16854
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
16855
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
16856
+ function jsxProd(type, config, maybeKey) {
16857
+ var key = null;
16858
+ void 0 !== maybeKey && (key = "" + maybeKey);
16859
+ void 0 !== config.key && (key = "" + config.key);
16860
+ if ("key" in config) {
16861
+ maybeKey = {};
16862
+ for (var propName in config)
16863
+ "key" !== propName && (maybeKey[propName] = config[propName]);
16864
+ } else maybeKey = config;
16865
+ config = maybeKey.ref;
16866
+ return {
16867
+ $$typeof: REACT_ELEMENT_TYPE,
16868
+ type: type,
16869
+ key: key,
16870
+ ref: void 0 !== config ? config : null,
16871
+ props: maybeKey
16872
+ };
16873
+ }
16874
+ reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
16875
+ reactJsxRuntime_production.jsx = jsxProd;
16876
+ reactJsxRuntime_production.jsxs = jsxProd;
16877
+ return reactJsxRuntime_production;
16834
16878
  }
16835
16879
 
16836
16880
  var reactJsxRuntime_development = {};
@@ -16839,7 +16883,7 @@ var reactJsxRuntime_development = {};
16839
16883
  * @license React
16840
16884
  * react-jsx-runtime.development.js
16841
16885
  *
16842
- * Copyright (c) Facebook, Inc. and its affiliates.
16886
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
16843
16887
  *
16844
16888
  * This source code is licensed under the MIT license found in the
16845
16889
  * LICENSE file in the root directory of this source tree.
@@ -16850,1334 +16894,383 @@ var hasRequiredReactJsxRuntime_development;
16850
16894
  function requireReactJsxRuntime_development () {
16851
16895
  if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
16852
16896
  hasRequiredReactJsxRuntime_development = 1;
16853
-
16854
- if (process.env.NODE_ENV !== "production") {
16855
- (function() {
16856
-
16857
- var React = React__default__default;
16858
-
16859
- // ATTENTION
16860
- // When adding new symbols to this file,
16861
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
16862
- // The Symbol used to tag the ReactElement-like types.
16863
- var REACT_ELEMENT_TYPE = Symbol.for('react.element');
16864
- var REACT_PORTAL_TYPE = Symbol.for('react.portal');
16865
- var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
16866
- var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
16867
- var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
16868
- var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
16869
- var REACT_CONTEXT_TYPE = Symbol.for('react.context');
16870
- var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
16871
- var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
16872
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
16873
- var REACT_MEMO_TYPE = Symbol.for('react.memo');
16874
- var REACT_LAZY_TYPE = Symbol.for('react.lazy');
16875
- var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
16876
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
16877
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
16878
- function getIteratorFn(maybeIterable) {
16879
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
16880
- return null;
16881
- }
16882
-
16883
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
16884
-
16885
- if (typeof maybeIterator === 'function') {
16886
- return maybeIterator;
16887
- }
16888
-
16889
- return null;
16890
- }
16891
-
16892
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
16893
-
16894
- function error(format) {
16895
- {
16896
- {
16897
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
16898
- args[_key2 - 1] = arguments[_key2];
16897
+ "production" !== process.env.NODE_ENV &&
16898
+ (function () {
16899
+ function getComponentNameFromType(type) {
16900
+ if (null == type) return null;
16901
+ if ("function" === typeof type)
16902
+ return type.$$typeof === REACT_CLIENT_REFERENCE
16903
+ ? null
16904
+ : type.displayName || type.name || null;
16905
+ if ("string" === typeof type) return type;
16906
+ switch (type) {
16907
+ case REACT_FRAGMENT_TYPE:
16908
+ return "Fragment";
16909
+ case REACT_PROFILER_TYPE:
16910
+ return "Profiler";
16911
+ case REACT_STRICT_MODE_TYPE:
16912
+ return "StrictMode";
16913
+ case REACT_SUSPENSE_TYPE:
16914
+ return "Suspense";
16915
+ case REACT_SUSPENSE_LIST_TYPE:
16916
+ return "SuspenseList";
16917
+ case REACT_ACTIVITY_TYPE:
16918
+ return "Activity";
16899
16919
  }
16900
-
16901
- printWarning('error', format, args);
16902
- }
16903
- }
16904
- }
16905
-
16906
- function printWarning(level, format, args) {
16907
- // When changing this logic, you might want to also
16908
- // update consoleWithStackDev.www.js as well.
16909
- {
16910
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
16911
- var stack = ReactDebugCurrentFrame.getStackAddendum();
16912
-
16913
- if (stack !== '') {
16914
- format += '%s';
16915
- args = args.concat([stack]);
16916
- } // eslint-disable-next-line react-internal/safe-string-coercion
16917
-
16918
-
16919
- var argsWithFormat = args.map(function (item) {
16920
- return String(item);
16921
- }); // Careful: RN currently depends on this prefix
16922
-
16923
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
16924
- // breaks IE9: https://github.com/facebook/react/issues/13610
16925
- // eslint-disable-next-line react-internal/no-production-logging
16926
-
16927
- Function.prototype.apply.call(console[level], console, argsWithFormat);
16928
- }
16929
- }
16930
-
16931
- // -----------------------------------------------------------------------------
16932
-
16933
- var enableScopeAPI = false; // Experimental Create Event Handle API.
16934
- var enableCacheElement = false;
16935
- var enableTransitionTracing = false; // No known bugs, but needs performance testing
16936
-
16937
- var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
16938
- // stuff. Intended to enable React core members to more easily debug scheduling
16939
- // issues in DEV builds.
16940
-
16941
- var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
16942
-
16943
- var REACT_MODULE_REFERENCE;
16944
-
16945
- {
16946
- REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
16947
- }
16948
-
16949
- function isValidElementType(type) {
16950
- if (typeof type === 'string' || typeof type === 'function') {
16951
- return true;
16952
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
16953
-
16954
-
16955
- 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 ) {
16956
- return true;
16957
- }
16958
-
16959
- if (typeof type === 'object' && type !== null) {
16960
- 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
16961
- // types supported by any Flight configuration anywhere since
16962
- // we don't know which Flight build this will end up being used
16963
- // with.
16964
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
16965
- return true;
16966
- }
16967
- }
16968
-
16969
- return false;
16970
- }
16971
-
16972
- function getWrappedName(outerType, innerType, wrapperName) {
16973
- var displayName = outerType.displayName;
16974
-
16975
- if (displayName) {
16976
- return displayName;
16977
- }
16978
-
16979
- var functionName = innerType.displayName || innerType.name || '';
16980
- return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
16981
- } // Keep in sync with react-reconciler/getComponentNameFromFiber
16982
-
16983
-
16984
- function getContextName(type) {
16985
- return type.displayName || 'Context';
16986
- } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
16987
-
16988
-
16989
- function getComponentNameFromType(type) {
16990
- if (type == null) {
16991
- // Host root, text node or just invalid type.
16992
- return null;
16993
- }
16994
-
16995
- {
16996
- if (typeof type.tag === 'number') {
16997
- error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
16998
- }
16999
- }
17000
-
17001
- if (typeof type === 'function') {
17002
- return type.displayName || type.name || null;
17003
- }
17004
-
17005
- if (typeof type === 'string') {
17006
- return type;
17007
- }
17008
-
17009
- switch (type) {
17010
- case REACT_FRAGMENT_TYPE:
17011
- return 'Fragment';
17012
-
17013
- case REACT_PORTAL_TYPE:
17014
- return 'Portal';
17015
-
17016
- case REACT_PROFILER_TYPE:
17017
- return 'Profiler';
17018
-
17019
- case REACT_STRICT_MODE_TYPE:
17020
- return 'StrictMode';
17021
-
17022
- case REACT_SUSPENSE_TYPE:
17023
- return 'Suspense';
17024
-
17025
- case REACT_SUSPENSE_LIST_TYPE:
17026
- return 'SuspenseList';
17027
-
17028
- }
17029
-
17030
- if (typeof type === 'object') {
17031
- switch (type.$$typeof) {
17032
- case REACT_CONTEXT_TYPE:
17033
- var context = type;
17034
- return getContextName(context) + '.Consumer';
17035
-
17036
- case REACT_PROVIDER_TYPE:
17037
- var provider = type;
17038
- return getContextName(provider._context) + '.Provider';
17039
-
17040
- case REACT_FORWARD_REF_TYPE:
17041
- return getWrappedName(type, type.render, 'ForwardRef');
17042
-
17043
- case REACT_MEMO_TYPE:
17044
- var outerName = type.displayName || null;
17045
-
17046
- if (outerName !== null) {
17047
- return outerName;
17048
- }
17049
-
17050
- return getComponentNameFromType(type.type) || 'Memo';
17051
-
17052
- case REACT_LAZY_TYPE:
17053
- {
17054
- var lazyComponent = type;
17055
- var payload = lazyComponent._payload;
17056
- var init = lazyComponent._init;
17057
-
17058
- try {
17059
- return getComponentNameFromType(init(payload));
17060
- } catch (x) {
17061
- return null;
17062
- }
16920
+ if ("object" === typeof type)
16921
+ switch (
16922
+ ("number" === typeof type.tag &&
16923
+ console.error(
16924
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
16925
+ ),
16926
+ type.$$typeof)
16927
+ ) {
16928
+ case REACT_PORTAL_TYPE:
16929
+ return "Portal";
16930
+ case REACT_CONTEXT_TYPE:
16931
+ return (type.displayName || "Context") + ".Provider";
16932
+ case REACT_CONSUMER_TYPE:
16933
+ return (type._context.displayName || "Context") + ".Consumer";
16934
+ case REACT_FORWARD_REF_TYPE:
16935
+ var innerType = type.render;
16936
+ type = type.displayName;
16937
+ type ||
16938
+ ((type = innerType.displayName || innerType.name || ""),
16939
+ (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
16940
+ return type;
16941
+ case REACT_MEMO_TYPE:
16942
+ return (
16943
+ (innerType = type.displayName || null),
16944
+ null !== innerType
16945
+ ? innerType
16946
+ : getComponentNameFromType(type.type) || "Memo"
16947
+ );
16948
+ case REACT_LAZY_TYPE:
16949
+ innerType = type._payload;
16950
+ type = type._init;
16951
+ try {
16952
+ return getComponentNameFromType(type(innerType));
16953
+ } catch (x) {}
17063
16954
  }
17064
-
17065
- // eslint-disable-next-line no-fallthrough
17066
- }
17067
- }
17068
-
17069
- return null;
17070
- }
17071
-
17072
- var assign = Object.assign;
17073
-
17074
- // Helpers to patch console.logs to avoid logging during side-effect free
17075
- // replaying on render function. This currently only patches the object
17076
- // lazily which won't cover if the log function was extracted eagerly.
17077
- // We could also eagerly patch the method.
17078
- var disabledDepth = 0;
17079
- var prevLog;
17080
- var prevInfo;
17081
- var prevWarn;
17082
- var prevError;
17083
- var prevGroup;
17084
- var prevGroupCollapsed;
17085
- var prevGroupEnd;
17086
-
17087
- function disabledLog() {}
17088
-
17089
- disabledLog.__reactDisabledLog = true;
17090
- function disableLogs() {
17091
- {
17092
- if (disabledDepth === 0) {
17093
- /* eslint-disable react-internal/no-production-logging */
17094
- prevLog = console.log;
17095
- prevInfo = console.info;
17096
- prevWarn = console.warn;
17097
- prevError = console.error;
17098
- prevGroup = console.group;
17099
- prevGroupCollapsed = console.groupCollapsed;
17100
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
17101
-
17102
- var props = {
17103
- configurable: true,
17104
- enumerable: true,
17105
- value: disabledLog,
17106
- writable: true
17107
- }; // $FlowFixMe Flow thinks console is immutable.
17108
-
17109
- Object.defineProperties(console, {
17110
- info: props,
17111
- log: props,
17112
- warn: props,
17113
- error: props,
17114
- group: props,
17115
- groupCollapsed: props,
17116
- groupEnd: props
17117
- });
17118
- /* eslint-enable react-internal/no-production-logging */
16955
+ return null;
17119
16956
  }
17120
-
17121
- disabledDepth++;
17122
- }
17123
- }
17124
- function reenableLogs() {
17125
- {
17126
- disabledDepth--;
17127
-
17128
- if (disabledDepth === 0) {
17129
- /* eslint-disable react-internal/no-production-logging */
17130
- var props = {
17131
- configurable: true,
17132
- enumerable: true,
17133
- writable: true
17134
- }; // $FlowFixMe Flow thinks console is immutable.
17135
-
17136
- Object.defineProperties(console, {
17137
- log: assign({}, props, {
17138
- value: prevLog
17139
- }),
17140
- info: assign({}, props, {
17141
- value: prevInfo
17142
- }),
17143
- warn: assign({}, props, {
17144
- value: prevWarn
17145
- }),
17146
- error: assign({}, props, {
17147
- value: prevError
17148
- }),
17149
- group: assign({}, props, {
17150
- value: prevGroup
17151
- }),
17152
- groupCollapsed: assign({}, props, {
17153
- value: prevGroupCollapsed
17154
- }),
17155
- groupEnd: assign({}, props, {
17156
- value: prevGroupEnd
17157
- })
17158
- });
17159
- /* eslint-enable react-internal/no-production-logging */
17160
- }
17161
-
17162
- if (disabledDepth < 0) {
17163
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
16957
+ function testStringCoercion(value) {
16958
+ return "" + value;
17164
16959
  }
17165
- }
17166
- }
17167
-
17168
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
17169
- var prefix;
17170
- function describeBuiltInComponentFrame(name, source, ownerFn) {
17171
- {
17172
- if (prefix === undefined) {
17173
- // Extract the VM specific prefix used by each line.
16960
+ function checkKeyStringCoercion(value) {
17174
16961
  try {
17175
- throw Error();
17176
- } catch (x) {
17177
- var match = x.stack.trim().match(/\n( *(at )?)/);
17178
- prefix = match && match[1] || '';
16962
+ testStringCoercion(value);
16963
+ var JSCompiler_inline_result = !1;
16964
+ } catch (e) {
16965
+ JSCompiler_inline_result = true;
17179
16966
  }
17180
- } // We use the prefix to ensure our stacks line up with native stack frames.
17181
-
17182
-
17183
- return '\n' + prefix + name;
17184
- }
17185
- }
17186
- var reentry = false;
17187
- var componentFrameCache;
17188
-
17189
- {
17190
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
17191
- componentFrameCache = new PossiblyWeakMap();
17192
- }
17193
-
17194
- function describeNativeComponentFrame(fn, construct) {
17195
- // If something asked for a stack inside a fake render, it should get ignored.
17196
- if ( !fn || reentry) {
17197
- return '';
17198
- }
17199
-
17200
- {
17201
- var frame = componentFrameCache.get(fn);
17202
-
17203
- if (frame !== undefined) {
17204
- return frame;
17205
- }
17206
- }
17207
-
17208
- var control;
17209
- reentry = true;
17210
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
17211
-
17212
- Error.prepareStackTrace = undefined;
17213
- var previousDispatcher;
17214
-
17215
- {
17216
- previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
17217
- // for warnings.
17218
-
17219
- ReactCurrentDispatcher.current = null;
17220
- disableLogs();
17221
- }
17222
-
17223
- try {
17224
- // This should throw.
17225
- if (construct) {
17226
- // Something should be setting the props in the constructor.
17227
- var Fake = function () {
17228
- throw Error();
17229
- }; // $FlowFixMe
17230
-
17231
-
17232
- Object.defineProperty(Fake.prototype, 'props', {
17233
- set: function () {
17234
- // We use a throwing setter instead of frozen or non-writable props
17235
- // because that won't throw in a non-strict mode function.
17236
- throw Error();
17237
- }
17238
- });
17239
-
17240
- if (typeof Reflect === 'object' && Reflect.construct) {
17241
- // We construct a different control for this case to include any extra
17242
- // frames added by the construct call.
17243
- try {
17244
- Reflect.construct(Fake, []);
17245
- } catch (x) {
17246
- control = x;
17247
- }
17248
-
17249
- Reflect.construct(fn, [], Fake);
17250
- } else {
17251
- try {
17252
- Fake.call();
17253
- } catch (x) {
17254
- control = x;
17255
- }
17256
-
17257
- fn.call(Fake.prototype);
16967
+ if (JSCompiler_inline_result) {
16968
+ JSCompiler_inline_result = console;
16969
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
16970
+ var JSCompiler_inline_result$jscomp$0 =
16971
+ ("function" === typeof Symbol &&
16972
+ Symbol.toStringTag &&
16973
+ value[Symbol.toStringTag]) ||
16974
+ value.constructor.name ||
16975
+ "Object";
16976
+ JSCompiler_temp_const.call(
16977
+ JSCompiler_inline_result,
16978
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
16979
+ JSCompiler_inline_result$jscomp$0
16980
+ );
16981
+ return testStringCoercion(value);
17258
16982
  }
17259
- } else {
16983
+ }
16984
+ function getTaskName(type) {
16985
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
16986
+ if (
16987
+ "object" === typeof type &&
16988
+ null !== type &&
16989
+ type.$$typeof === REACT_LAZY_TYPE
16990
+ )
16991
+ return "<...>";
17260
16992
  try {
17261
- throw Error();
16993
+ var name = getComponentNameFromType(type);
16994
+ return name ? "<" + name + ">" : "<...>";
17262
16995
  } catch (x) {
17263
- control = x;
17264
- }
17265
-
17266
- fn();
17267
- }
17268
- } catch (sample) {
17269
- // This is inlined manually because closure doesn't do it for us.
17270
- if (sample && control && typeof sample.stack === 'string') {
17271
- // This extracts the first frame from the sample that isn't also in the control.
17272
- // Skipping one frame that we assume is the frame that calls the two.
17273
- var sampleLines = sample.stack.split('\n');
17274
- var controlLines = control.stack.split('\n');
17275
- var s = sampleLines.length - 1;
17276
- var c = controlLines.length - 1;
17277
-
17278
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
17279
- // We expect at least one stack frame to be shared.
17280
- // Typically this will be the root most one. However, stack frames may be
17281
- // cut off due to maximum stack limits. In this case, one maybe cut off
17282
- // earlier than the other. We assume that the sample is longer or the same
17283
- // and there for cut off earlier. So we should find the root most frame in
17284
- // the sample somewhere in the control.
17285
- c--;
17286
- }
17287
-
17288
- for (; s >= 1 && c >= 0; s--, c--) {
17289
- // Next we find the first one that isn't the same which should be the
17290
- // frame that called our sample function and the control.
17291
- if (sampleLines[s] !== controlLines[c]) {
17292
- // In V8, the first line is describing the message but other VMs don't.
17293
- // If we're about to return the first line, and the control is also on the same
17294
- // line, that's a pretty good indicator that our sample threw at same line as
17295
- // the control. I.e. before we entered the sample frame. So we ignore this result.
17296
- // This can happen if you passed a class to function component, or non-function.
17297
- if (s !== 1 || c !== 1) {
17298
- do {
17299
- s--;
17300
- c--; // We may still have similar intermediate frames from the construct call.
17301
- // The next one that isn't the same should be our match though.
17302
-
17303
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
17304
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
17305
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
17306
- // but we have a user-provided "displayName"
17307
- // splice it in to make the stack more readable.
17308
-
17309
-
17310
- if (fn.displayName && _frame.includes('<anonymous>')) {
17311
- _frame = _frame.replace('<anonymous>', fn.displayName);
17312
- }
17313
-
17314
- {
17315
- if (typeof fn === 'function') {
17316
- componentFrameCache.set(fn, _frame);
17317
- }
17318
- } // Return the line we found.
17319
-
17320
-
17321
- return _frame;
17322
- }
17323
- } while (s >= 1 && c >= 0);
17324
- }
17325
-
17326
- break;
17327
- }
16996
+ return "<...>";
17328
16997
  }
17329
16998
  }
17330
- } finally {
17331
- reentry = false;
17332
-
17333
- {
17334
- ReactCurrentDispatcher.current = previousDispatcher;
17335
- reenableLogs();
16999
+ function getOwner() {
17000
+ var dispatcher = ReactSharedInternals.A;
17001
+ return null === dispatcher ? null : dispatcher.getOwner();
17336
17002
  }
17337
-
17338
- Error.prepareStackTrace = previousPrepareStackTrace;
17339
- } // Fallback to just using the name if we couldn't make it throw.
17340
-
17341
-
17342
- var name = fn ? fn.displayName || fn.name : '';
17343
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
17344
-
17345
- {
17346
- if (typeof fn === 'function') {
17347
- componentFrameCache.set(fn, syntheticFrame);
17003
+ function UnknownOwner() {
17004
+ return Error("react-stack-top-frame");
17348
17005
  }
17349
- }
17350
-
17351
- return syntheticFrame;
17352
- }
17353
- function describeFunctionComponentFrame(fn, source, ownerFn) {
17354
- {
17355
- return describeNativeComponentFrame(fn, false);
17356
- }
17357
- }
17358
-
17359
- function shouldConstruct(Component) {
17360
- var prototype = Component.prototype;
17361
- return !!(prototype && prototype.isReactComponent);
17362
- }
17363
-
17364
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
17365
-
17366
- if (type == null) {
17367
- return '';
17368
- }
17369
-
17370
- if (typeof type === 'function') {
17371
- {
17372
- return describeNativeComponentFrame(type, shouldConstruct(type));
17373
- }
17374
- }
17375
-
17376
- if (typeof type === 'string') {
17377
- return describeBuiltInComponentFrame(type);
17378
- }
17379
-
17380
- switch (type) {
17381
- case REACT_SUSPENSE_TYPE:
17382
- return describeBuiltInComponentFrame('Suspense');
17383
-
17384
- case REACT_SUSPENSE_LIST_TYPE:
17385
- return describeBuiltInComponentFrame('SuspenseList');
17386
- }
17387
-
17388
- if (typeof type === 'object') {
17389
- switch (type.$$typeof) {
17390
- case REACT_FORWARD_REF_TYPE:
17391
- return describeFunctionComponentFrame(type.render);
17392
-
17393
- case REACT_MEMO_TYPE:
17394
- // Memo may contain any component type so we recursively resolve it.
17395
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
17396
-
17397
- case REACT_LAZY_TYPE:
17398
- {
17399
- var lazyComponent = type;
17400
- var payload = lazyComponent._payload;
17401
- var init = lazyComponent._init;
17402
-
17403
- try {
17404
- // Lazy may contain any component type so we recursively resolve it.
17405
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
17406
- } catch (x) {}
17407
- }
17408
- }
17409
- }
17410
-
17411
- return '';
17412
- }
17413
-
17414
- var hasOwnProperty = Object.prototype.hasOwnProperty;
17415
-
17416
- var loggedTypeFailures = {};
17417
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
17418
-
17419
- function setCurrentlyValidatingElement(element) {
17420
- {
17421
- if (element) {
17422
- var owner = element._owner;
17423
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
17424
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
17425
- } else {
17426
- ReactDebugCurrentFrame.setExtraStackFrame(null);
17006
+ function hasValidKey(config) {
17007
+ if (hasOwnProperty.call(config, "key")) {
17008
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
17009
+ if (getter && getter.isReactWarning) return false;
17010
+ }
17011
+ return void 0 !== config.key;
17427
17012
  }
17428
- }
17429
- }
17430
-
17431
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
17432
- {
17433
- // $FlowFixMe This is okay but Flow doesn't know it.
17434
- var has = Function.call.bind(hasOwnProperty);
17435
-
17436
- for (var typeSpecName in typeSpecs) {
17437
- if (has(typeSpecs, typeSpecName)) {
17438
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
17439
- // fail the render phase where it didn't fail before. So we log it.
17440
- // After these have been cleaned up, we'll let them throw.
17441
-
17442
- try {
17443
- // This is intentionally an invariant that gets caught. It's the same
17444
- // behavior as without this statement except with a better message.
17445
- if (typeof typeSpecs[typeSpecName] !== 'function') {
17446
- // eslint-disable-next-line react-internal/prod-error-codes
17447
- 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`.');
17448
- err.name = 'Invariant Violation';
17449
- throw err;
17450
- }
17451
-
17452
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
17453
- } catch (ex) {
17454
- error$1 = ex;
17455
- }
17456
-
17457
- if (error$1 && !(error$1 instanceof Error)) {
17458
- setCurrentlyValidatingElement(element);
17459
-
17460
- 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);
17461
-
17462
- setCurrentlyValidatingElement(null);
17463
- }
17464
-
17465
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
17466
- // Only monitor this failure once because there tends to be a lot of the
17467
- // same error.
17468
- loggedTypeFailures[error$1.message] = true;
17469
- setCurrentlyValidatingElement(element);
17470
-
17471
- error('Failed %s type: %s', location, error$1.message);
17472
-
17473
- setCurrentlyValidatingElement(null);
17474
- }
17013
+ function defineKeyPropWarningGetter(props, displayName) {
17014
+ function warnAboutAccessingKey() {
17015
+ specialPropKeyWarningShown ||
17016
+ ((specialPropKeyWarningShown = true),
17017
+ console.error(
17018
+ "%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://react.dev/link/special-props)",
17019
+ displayName
17020
+ ));
17475
17021
  }
17022
+ warnAboutAccessingKey.isReactWarning = true;
17023
+ Object.defineProperty(props, "key", {
17024
+ get: warnAboutAccessingKey,
17025
+ configurable: true
17026
+ });
17476
17027
  }
17477
- }
17478
- }
17479
-
17480
- var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
17481
-
17482
- function isArray(a) {
17483
- return isArrayImpl(a);
17484
- }
17485
-
17486
- /*
17487
- * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
17488
- * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
17489
- *
17490
- * The functions in this module will throw an easier-to-understand,
17491
- * easier-to-debug exception with a clear errors message message explaining the
17492
- * problem. (Instead of a confusing exception thrown inside the implementation
17493
- * of the `value` object).
17494
- */
17495
- // $FlowFixMe only called in DEV, so void return is not possible.
17496
- function typeName(value) {
17497
- {
17498
- // toStringTag is needed for namespaced types like Temporal.Instant
17499
- var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
17500
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
17501
- return type;
17502
- }
17503
- } // $FlowFixMe only called in DEV, so void return is not possible.
17504
-
17505
-
17506
- function willCoercionThrow(value) {
17507
- {
17508
- try {
17509
- testStringCoercion(value);
17510
- return false;
17511
- } catch (e) {
17512
- return true;
17028
+ function elementRefGetterWithDeprecationWarning() {
17029
+ var componentName = getComponentNameFromType(this.type);
17030
+ didWarnAboutElementRef[componentName] ||
17031
+ ((didWarnAboutElementRef[componentName] = true),
17032
+ console.error(
17033
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
17034
+ ));
17035
+ componentName = this.props.ref;
17036
+ return void 0 !== componentName ? componentName : null;
17513
17037
  }
17514
- }
17515
- }
17516
-
17517
- function testStringCoercion(value) {
17518
- // If you ended up here by following an exception call stack, here's what's
17519
- // happened: you supplied an object or symbol value to React (as a prop, key,
17520
- // DOM attribute, CSS property, string ref, etc.) and when React tried to
17521
- // coerce it to a string using `'' + value`, an exception was thrown.
17522
- //
17523
- // The most common types that will cause this exception are `Symbol` instances
17524
- // and Temporal objects like `Temporal.Instant`. But any object that has a
17525
- // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
17526
- // exception. (Library authors do this to prevent users from using built-in
17527
- // numeric operators like `+` or comparison operators like `>=` because custom
17528
- // methods are needed to perform accurate arithmetic or comparison.)
17529
- //
17530
- // To fix the problem, coerce this object or symbol value to a string before
17531
- // passing it to React. The most reliable way is usually `String(value)`.
17532
- //
17533
- // To find which value is throwing, check the browser or debugger console.
17534
- // Before this exception was thrown, there should be `console.error` output
17535
- // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
17536
- // problem and how that type was used: key, atrribute, input value prop, etc.
17537
- // In most cases, this console output also shows the component and its
17538
- // ancestor components where the exception happened.
17539
- //
17540
- // eslint-disable-next-line react-internal/safe-string-coercion
17541
- return '' + value;
17542
- }
17543
- function checkKeyStringCoercion(value) {
17544
- {
17545
- if (willCoercionThrow(value)) {
17546
- error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
17547
-
17548
- return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
17038
+ function ReactElement(
17039
+ type,
17040
+ key,
17041
+ self,
17042
+ source,
17043
+ owner,
17044
+ props,
17045
+ debugStack,
17046
+ debugTask
17047
+ ) {
17048
+ self = props.ref;
17049
+ type = {
17050
+ $$typeof: REACT_ELEMENT_TYPE,
17051
+ type: type,
17052
+ key: key,
17053
+ props: props,
17054
+ _owner: owner
17055
+ };
17056
+ null !== (void 0 !== self ? self : null)
17057
+ ? Object.defineProperty(type, "ref", {
17058
+ enumerable: false,
17059
+ get: elementRefGetterWithDeprecationWarning
17060
+ })
17061
+ : Object.defineProperty(type, "ref", { enumerable: false, value: null });
17062
+ type._store = {};
17063
+ Object.defineProperty(type._store, "validated", {
17064
+ configurable: false,
17065
+ enumerable: false,
17066
+ writable: true,
17067
+ value: 0
17068
+ });
17069
+ Object.defineProperty(type, "_debugInfo", {
17070
+ configurable: false,
17071
+ enumerable: false,
17072
+ writable: true,
17073
+ value: null
17074
+ });
17075
+ Object.defineProperty(type, "_debugStack", {
17076
+ configurable: false,
17077
+ enumerable: false,
17078
+ writable: true,
17079
+ value: debugStack
17080
+ });
17081
+ Object.defineProperty(type, "_debugTask", {
17082
+ configurable: false,
17083
+ enumerable: false,
17084
+ writable: true,
17085
+ value: debugTask
17086
+ });
17087
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
17088
+ return type;
17549
17089
  }
17550
- }
17551
- }
17552
-
17553
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
17554
- var RESERVED_PROPS = {
17555
- key: true,
17556
- ref: true,
17557
- __self: true,
17558
- __source: true
17559
- };
17560
- var specialPropKeyWarningShown;
17561
- var specialPropRefWarningShown;
17562
-
17563
- function hasValidRef(config) {
17564
- {
17565
- if (hasOwnProperty.call(config, 'ref')) {
17566
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
17567
-
17568
- if (getter && getter.isReactWarning) {
17569
- return false;
17090
+ function jsxDEVImpl(
17091
+ type,
17092
+ config,
17093
+ maybeKey,
17094
+ isStaticChildren,
17095
+ source,
17096
+ self,
17097
+ debugStack,
17098
+ debugTask
17099
+ ) {
17100
+ var children = config.children;
17101
+ if (void 0 !== children)
17102
+ if (isStaticChildren)
17103
+ if (isArrayImpl(children)) {
17104
+ for (
17105
+ isStaticChildren = 0;
17106
+ isStaticChildren < children.length;
17107
+ isStaticChildren++
17108
+ )
17109
+ validateChildKeys(children[isStaticChildren]);
17110
+ Object.freeze && Object.freeze(children);
17111
+ } else
17112
+ console.error(
17113
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
17114
+ );
17115
+ else validateChildKeys(children);
17116
+ if (hasOwnProperty.call(config, "key")) {
17117
+ children = getComponentNameFromType(type);
17118
+ var keys = Object.keys(config).filter(function (k) {
17119
+ return "key" !== k;
17120
+ });
17121
+ isStaticChildren =
17122
+ 0 < keys.length
17123
+ ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
17124
+ : "{key: someKey}";
17125
+ didWarnAboutKeySpread[children + isStaticChildren] ||
17126
+ ((keys =
17127
+ 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
17128
+ console.error(
17129
+ 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
17130
+ isStaticChildren,
17131
+ children,
17132
+ keys,
17133
+ children
17134
+ ),
17135
+ (didWarnAboutKeySpread[children + isStaticChildren] = true));
17570
17136
  }
17137
+ children = null;
17138
+ void 0 !== maybeKey &&
17139
+ (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
17140
+ hasValidKey(config) &&
17141
+ (checkKeyStringCoercion(config.key), (children = "" + config.key));
17142
+ if ("key" in config) {
17143
+ maybeKey = {};
17144
+ for (var propName in config)
17145
+ "key" !== propName && (maybeKey[propName] = config[propName]);
17146
+ } else maybeKey = config;
17147
+ children &&
17148
+ defineKeyPropWarningGetter(
17149
+ maybeKey,
17150
+ "function" === typeof type
17151
+ ? type.displayName || type.name || "Unknown"
17152
+ : type
17153
+ );
17154
+ return ReactElement(
17155
+ type,
17156
+ children,
17157
+ self,
17158
+ source,
17159
+ getOwner(),
17160
+ maybeKey,
17161
+ debugStack,
17162
+ debugTask
17163
+ );
17571
17164
  }
17572
- }
17573
-
17574
- return config.ref !== undefined;
17575
- }
17576
-
17577
- function hasValidKey(config) {
17578
- {
17579
- if (hasOwnProperty.call(config, 'key')) {
17580
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
17581
-
17582
- if (getter && getter.isReactWarning) {
17583
- return false;
17584
- }
17165
+ function validateChildKeys(node) {
17166
+ "object" === typeof node &&
17167
+ null !== node &&
17168
+ node.$$typeof === REACT_ELEMENT_TYPE &&
17169
+ node._store &&
17170
+ (node._store.validated = 1);
17585
17171
  }
17586
- }
17587
-
17588
- return config.key !== undefined;
17589
- }
17590
-
17591
- function warnIfStringRefCannotBeAutoConverted(config, self) {
17592
- {
17593
- if (typeof config.ref === 'string' && ReactCurrentOwner.current && self) ;
17594
- }
17595
- }
17596
-
17597
- function defineKeyPropWarningGetter(props, displayName) {
17598
- {
17599
- var warnAboutAccessingKey = function () {
17600
- if (!specialPropKeyWarningShown) {
17601
- specialPropKeyWarningShown = true;
17602
-
17603
- 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);
17172
+ var React = React__default__default,
17173
+ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
17174
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
17175
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
17176
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
17177
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler");
17178
+ var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
17179
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
17180
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
17181
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
17182
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
17183
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
17184
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
17185
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
17186
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
17187
+ ReactSharedInternals =
17188
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
17189
+ hasOwnProperty = Object.prototype.hasOwnProperty,
17190
+ isArrayImpl = Array.isArray,
17191
+ createTask = console.createTask
17192
+ ? console.createTask
17193
+ : function () {
17194
+ return null;
17195
+ };
17196
+ React = {
17197
+ react_stack_bottom_frame: function (callStackForError) {
17198
+ return callStackForError();
17604
17199
  }
17605
17200
  };
17606
-
17607
- warnAboutAccessingKey.isReactWarning = true;
17608
- Object.defineProperty(props, 'key', {
17609
- get: warnAboutAccessingKey,
17610
- configurable: true
17611
- });
17612
- }
17613
- }
17614
-
17615
- function defineRefPropWarningGetter(props, displayName) {
17616
- {
17617
- var warnAboutAccessingRef = function () {
17618
- if (!specialPropRefWarningShown) {
17619
- specialPropRefWarningShown = true;
17620
-
17621
- 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);
17622
- }
17201
+ var specialPropKeyWarningShown;
17202
+ var didWarnAboutElementRef = {};
17203
+ var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
17204
+ React,
17205
+ UnknownOwner
17206
+ )();
17207
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
17208
+ var didWarnAboutKeySpread = {};
17209
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
17210
+ reactJsxRuntime_development.jsx = function (type, config, maybeKey, source, self) {
17211
+ var trackActualOwner =
17212
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
17213
+ return jsxDEVImpl(
17214
+ type,
17215
+ config,
17216
+ maybeKey,
17217
+ false,
17218
+ source,
17219
+ self,
17220
+ trackActualOwner
17221
+ ? Error("react-stack-top-frame")
17222
+ : unknownOwnerDebugStack,
17223
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
17224
+ );
17225
+ };
17226
+ reactJsxRuntime_development.jsxs = function (type, config, maybeKey, source, self) {
17227
+ var trackActualOwner =
17228
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
17229
+ return jsxDEVImpl(
17230
+ type,
17231
+ config,
17232
+ maybeKey,
17233
+ true,
17234
+ source,
17235
+ self,
17236
+ trackActualOwner
17237
+ ? Error("react-stack-top-frame")
17238
+ : unknownOwnerDebugStack,
17239
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
17240
+ );
17623
17241
  };
17624
-
17625
- warnAboutAccessingRef.isReactWarning = true;
17626
- Object.defineProperty(props, 'ref', {
17627
- get: warnAboutAccessingRef,
17628
- configurable: true
17629
- });
17630
- }
17631
- }
17632
- /**
17633
- * Factory method to create a new React element. This no longer adheres to
17634
- * the class pattern, so do not use new to call it. Also, instanceof check
17635
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
17636
- * if something is a React Element.
17637
- *
17638
- * @param {*} type
17639
- * @param {*} props
17640
- * @param {*} key
17641
- * @param {string|object} ref
17642
- * @param {*} owner
17643
- * @param {*} self A *temporary* helper to detect places where `this` is
17644
- * different from the `owner` when React.createElement is called, so that we
17645
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
17646
- * functions, and as long as `this` and owner are the same, there will be no
17647
- * change in behavior.
17648
- * @param {*} source An annotation object (added by a transpiler or otherwise)
17649
- * indicating filename, line number, and/or other information.
17650
- * @internal
17651
- */
17652
-
17653
-
17654
- var ReactElement = function (type, key, ref, self, source, owner, props) {
17655
- var element = {
17656
- // This tag allows us to uniquely identify this as a React Element
17657
- $$typeof: REACT_ELEMENT_TYPE,
17658
- // Built-in properties that belong on the element
17659
- type: type,
17660
- key: key,
17661
- ref: ref,
17662
- props: props,
17663
- // Record the component responsible for creating this element.
17664
- _owner: owner
17665
- };
17666
-
17667
- {
17668
- // The validation flag is currently mutative. We put it on
17669
- // an external backing store so that we can freeze the whole object.
17670
- // This can be replaced with a WeakMap once they are implemented in
17671
- // commonly used development environments.
17672
- element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
17673
- // the validation flag non-enumerable (where possible, which should
17674
- // include every environment we run tests in), so the test framework
17675
- // ignores it.
17676
-
17677
- Object.defineProperty(element._store, 'validated', {
17678
- configurable: false,
17679
- enumerable: false,
17680
- writable: true,
17681
- value: false
17682
- }); // self and source are DEV only properties.
17683
-
17684
- Object.defineProperty(element, '_self', {
17685
- configurable: false,
17686
- enumerable: false,
17687
- writable: false,
17688
- value: self
17689
- }); // Two elements created in two different places should be considered
17690
- // equal for testing purposes and therefore we hide it from enumeration.
17691
-
17692
- Object.defineProperty(element, '_source', {
17693
- configurable: false,
17694
- enumerable: false,
17695
- writable: false,
17696
- value: source
17697
- });
17698
-
17699
- if (Object.freeze) {
17700
- Object.freeze(element.props);
17701
- Object.freeze(element);
17702
- }
17703
- }
17704
-
17705
- return element;
17706
- };
17707
- /**
17708
- * https://github.com/reactjs/rfcs/pull/107
17709
- * @param {*} type
17710
- * @param {object} props
17711
- * @param {string} key
17712
- */
17713
-
17714
- function jsxDEV(type, config, maybeKey, source, self) {
17715
- {
17716
- var propName; // Reserved names are extracted
17717
-
17718
- var props = {};
17719
- var key = null;
17720
- var ref = null; // Currently, key can be spread in as a prop. This causes a potential
17721
- // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
17722
- // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
17723
- // but as an intermediary step, we will use jsxDEV for everything except
17724
- // <div {...props} key="Hi" />, because we aren't currently able to tell if
17725
- // key is explicitly declared to be undefined or not.
17726
-
17727
- if (maybeKey !== undefined) {
17728
- {
17729
- checkKeyStringCoercion(maybeKey);
17730
- }
17731
-
17732
- key = '' + maybeKey;
17733
- }
17734
-
17735
- if (hasValidKey(config)) {
17736
- {
17737
- checkKeyStringCoercion(config.key);
17738
- }
17739
-
17740
- key = '' + config.key;
17741
- }
17742
-
17743
- if (hasValidRef(config)) {
17744
- ref = config.ref;
17745
- warnIfStringRefCannotBeAutoConverted(config, self);
17746
- } // Remaining properties are added to a new props object
17747
-
17748
-
17749
- for (propName in config) {
17750
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
17751
- props[propName] = config[propName];
17752
- }
17753
- } // Resolve default props
17754
-
17755
-
17756
- if (type && type.defaultProps) {
17757
- var defaultProps = type.defaultProps;
17758
-
17759
- for (propName in defaultProps) {
17760
- if (props[propName] === undefined) {
17761
- props[propName] = defaultProps[propName];
17762
- }
17763
- }
17764
- }
17765
-
17766
- if (key || ref) {
17767
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
17768
-
17769
- if (key) {
17770
- defineKeyPropWarningGetter(props, displayName);
17771
- }
17772
-
17773
- if (ref) {
17774
- defineRefPropWarningGetter(props, displayName);
17775
- }
17776
- }
17777
-
17778
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
17779
- }
17780
- }
17781
-
17782
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
17783
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
17784
-
17785
- function setCurrentlyValidatingElement$1(element) {
17786
- {
17787
- if (element) {
17788
- var owner = element._owner;
17789
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
17790
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
17791
- } else {
17792
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
17793
- }
17794
- }
17795
- }
17796
-
17797
- var propTypesMisspellWarningShown;
17798
-
17799
- {
17800
- propTypesMisspellWarningShown = false;
17801
- }
17802
- /**
17803
- * Verifies the object is a ReactElement.
17804
- * See https://reactjs.org/docs/react-api.html#isvalidelement
17805
- * @param {?object} object
17806
- * @return {boolean} True if `object` is a ReactElement.
17807
- * @final
17808
- */
17809
-
17810
-
17811
- function isValidElement(object) {
17812
- {
17813
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
17814
- }
17815
- }
17816
-
17817
- function getDeclarationErrorAddendum() {
17818
- {
17819
- if (ReactCurrentOwner$1.current) {
17820
- var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
17821
-
17822
- if (name) {
17823
- return '\n\nCheck the render method of `' + name + '`.';
17824
- }
17825
- }
17826
-
17827
- return '';
17828
- }
17829
- }
17830
-
17831
- function getSourceInfoErrorAddendum(source) {
17832
- {
17833
-
17834
- return '';
17835
- }
17836
- }
17837
- /**
17838
- * Warn if there's no key explicitly set on dynamic arrays of children or
17839
- * object keys are not valid. This allows us to keep track of children between
17840
- * updates.
17841
- */
17842
-
17843
-
17844
- var ownerHasKeyUseWarning = {};
17845
-
17846
- function getCurrentComponentErrorInfo(parentType) {
17847
- {
17848
- var info = getDeclarationErrorAddendum();
17849
-
17850
- if (!info) {
17851
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
17852
-
17853
- if (parentName) {
17854
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
17855
- }
17856
- }
17857
-
17858
- return info;
17859
- }
17860
- }
17861
- /**
17862
- * Warn if the element doesn't have an explicit key assigned to it.
17863
- * This element is in an array. The array could grow and shrink or be
17864
- * reordered. All children that haven't already been validated are required to
17865
- * have a "key" property assigned to it. Error statuses are cached so a warning
17866
- * will only be shown once.
17867
- *
17868
- * @internal
17869
- * @param {ReactElement} element Element that requires a key.
17870
- * @param {*} parentType element's parent's type.
17871
- */
17872
-
17873
-
17874
- function validateExplicitKey(element, parentType) {
17875
- {
17876
- if (!element._store || element._store.validated || element.key != null) {
17877
- return;
17878
- }
17879
-
17880
- element._store.validated = true;
17881
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
17882
-
17883
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
17884
- return;
17885
- }
17886
-
17887
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
17888
- // property, it may be the creator of the child that's responsible for
17889
- // assigning it a key.
17890
-
17891
- var childOwner = '';
17892
-
17893
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
17894
- // Give the component that originally created this child.
17895
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
17896
- }
17897
-
17898
- setCurrentlyValidatingElement$1(element);
17899
-
17900
- 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);
17901
-
17902
- setCurrentlyValidatingElement$1(null);
17903
- }
17904
- }
17905
- /**
17906
- * Ensure that every element either is passed in a static location, in an
17907
- * array with an explicit keys property defined, or in an object literal
17908
- * with valid key property.
17909
- *
17910
- * @internal
17911
- * @param {ReactNode} node Statically passed child of any type.
17912
- * @param {*} parentType node's parent's type.
17913
- */
17914
-
17915
-
17916
- function validateChildKeys(node, parentType) {
17917
- {
17918
- if (typeof node !== 'object') {
17919
- return;
17920
- }
17921
-
17922
- if (isArray(node)) {
17923
- for (var i = 0; i < node.length; i++) {
17924
- var child = node[i];
17925
-
17926
- if (isValidElement(child)) {
17927
- validateExplicitKey(child, parentType);
17928
- }
17929
- }
17930
- } else if (isValidElement(node)) {
17931
- // This element was passed in a valid location.
17932
- if (node._store) {
17933
- node._store.validated = true;
17934
- }
17935
- } else if (node) {
17936
- var iteratorFn = getIteratorFn(node);
17937
-
17938
- if (typeof iteratorFn === 'function') {
17939
- // Entry iterators used to provide implicit keys,
17940
- // but now we print a separate warning for them later.
17941
- if (iteratorFn !== node.entries) {
17942
- var iterator = iteratorFn.call(node);
17943
- var step;
17944
-
17945
- while (!(step = iterator.next()).done) {
17946
- if (isValidElement(step.value)) {
17947
- validateExplicitKey(step.value, parentType);
17948
- }
17949
- }
17950
- }
17951
- }
17952
- }
17953
- }
17954
- }
17955
- /**
17956
- * Given an element, validate that its props follow the propTypes definition,
17957
- * provided by the type.
17958
- *
17959
- * @param {ReactElement} element
17960
- */
17961
-
17962
-
17963
- function validatePropTypes(element) {
17964
- {
17965
- var type = element.type;
17966
-
17967
- if (type === null || type === undefined || typeof type === 'string') {
17968
- return;
17969
- }
17970
-
17971
- var propTypes;
17972
-
17973
- if (typeof type === 'function') {
17974
- propTypes = type.propTypes;
17975
- } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
17976
- // Inner props are checked in the reconciler.
17977
- type.$$typeof === REACT_MEMO_TYPE)) {
17978
- propTypes = type.propTypes;
17979
- } else {
17980
- return;
17981
- }
17982
-
17983
- if (propTypes) {
17984
- // Intentionally inside to avoid triggering lazy initializers:
17985
- var name = getComponentNameFromType(type);
17986
- checkPropTypes(propTypes, element.props, 'prop', name, element);
17987
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
17988
- propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
17989
-
17990
- var _name = getComponentNameFromType(type);
17991
-
17992
- error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
17993
- }
17994
-
17995
- if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
17996
- error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
17997
- }
17998
- }
17999
- }
18000
- /**
18001
- * Given a fragment, validate that it can only be provided with fragment props
18002
- * @param {ReactElement} fragment
18003
- */
18004
-
18005
-
18006
- function validateFragmentProps(fragment) {
18007
- {
18008
- var keys = Object.keys(fragment.props);
18009
-
18010
- for (var i = 0; i < keys.length; i++) {
18011
- var key = keys[i];
18012
-
18013
- if (key !== 'children' && key !== 'key') {
18014
- setCurrentlyValidatingElement$1(fragment);
18015
-
18016
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
18017
-
18018
- setCurrentlyValidatingElement$1(null);
18019
- break;
18020
- }
18021
- }
18022
-
18023
- if (fragment.ref !== null) {
18024
- setCurrentlyValidatingElement$1(fragment);
18025
-
18026
- error('Invalid attribute `ref` supplied to `React.Fragment`.');
18027
-
18028
- setCurrentlyValidatingElement$1(null);
18029
- }
18030
- }
18031
- }
18032
-
18033
- var didWarnAboutKeySpread = {};
18034
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
18035
- {
18036
- var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
18037
- // succeed and there will likely be errors in render.
18038
-
18039
- if (!validType) {
18040
- var info = '';
18041
-
18042
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
18043
- 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.";
18044
- }
18045
-
18046
- var sourceInfo = getSourceInfoErrorAddendum();
18047
-
18048
- if (sourceInfo) {
18049
- info += sourceInfo;
18050
- } else {
18051
- info += getDeclarationErrorAddendum();
18052
- }
18053
-
18054
- var typeString;
18055
-
18056
- if (type === null) {
18057
- typeString = 'null';
18058
- } else if (isArray(type)) {
18059
- typeString = 'array';
18060
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
18061
- typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
18062
- info = ' Did you accidentally export a JSX literal instead of a component?';
18063
- } else {
18064
- typeString = typeof type;
18065
- }
18066
-
18067
- 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);
18068
- }
18069
-
18070
- var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
18071
- // TODO: Drop this when these are no longer allowed as the type argument.
18072
-
18073
- if (element == null) {
18074
- return element;
18075
- } // Skip key warning if the type isn't valid since our key validation logic
18076
- // doesn't expect a non-string/function type and can throw confusing errors.
18077
- // We don't want exception behavior to differ between dev and prod.
18078
- // (Rendering will throw with a helpful message and as soon as the type is
18079
- // fixed, the key warnings will appear.)
18080
-
18081
-
18082
- if (validType) {
18083
- var children = props.children;
18084
-
18085
- if (children !== undefined) {
18086
- if (isStaticChildren) {
18087
- if (isArray(children)) {
18088
- for (var i = 0; i < children.length; i++) {
18089
- validateChildKeys(children[i], type);
18090
- }
18091
-
18092
- if (Object.freeze) {
18093
- Object.freeze(children);
18094
- }
18095
- } else {
18096
- 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.');
18097
- }
18098
- } else {
18099
- validateChildKeys(children, type);
18100
- }
18101
- }
18102
- }
18103
-
18104
- {
18105
- if (hasOwnProperty.call(props, 'key')) {
18106
- var componentName = getComponentNameFromType(type);
18107
- var keys = Object.keys(props).filter(function (k) {
18108
- return k !== 'key';
18109
- });
18110
- var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
18111
-
18112
- if (!didWarnAboutKeySpread[componentName + beforeExample]) {
18113
- var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
18114
-
18115
- error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
18116
-
18117
- didWarnAboutKeySpread[componentName + beforeExample] = true;
18118
- }
18119
- }
18120
- }
18121
-
18122
- if (type === REACT_FRAGMENT_TYPE) {
18123
- validateFragmentProps(element);
18124
- } else {
18125
- validatePropTypes(element);
18126
- }
18127
-
18128
- return element;
18129
- }
18130
- } // These two functions exist to still get child warnings in dev
18131
- // even with the prod transform. This means that jsxDEV is purely
18132
- // opt-in behavior for better messages but that we won't stop
18133
- // giving you warnings if you use production apis.
18134
-
18135
- function jsxWithValidationStatic(type, props, key) {
18136
- {
18137
- return jsxWithValidation(type, props, key, true);
18138
- }
18139
- }
18140
- function jsxWithValidationDynamic(type, props, key) {
18141
- {
18142
- return jsxWithValidation(type, props, key, false);
18143
- }
18144
- }
18145
-
18146
- var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
18147
- // for now we can ship identical prod functions
18148
-
18149
- var jsxs = jsxWithValidationStatic ;
18150
-
18151
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
18152
- reactJsxRuntime_development.jsx = jsx;
18153
- reactJsxRuntime_development.jsxs = jsxs;
18154
17242
  })();
18155
- }
18156
17243
  return reactJsxRuntime_development;
18157
17244
  }
18158
17245
 
18159
17246
  if (process.env.NODE_ENV === 'production') {
18160
- jsxRuntime.exports = requireReactJsxRuntime_production_min();
17247
+ jsxRuntime.exports = requireReactJsxRuntime_production();
18161
17248
  } else {
18162
17249
  jsxRuntime.exports = requireReactJsxRuntime_development();
18163
17250
  }
18164
17251
 
18165
17252
  var jsxRuntimeExports = jsxRuntime.exports;
18166
17253
 
17254
+ var CAMSContext = createContext(null);
18167
17255
  function CAMSProvider(_a) {
18168
- var children = _a.children;
18169
- if (typeof window === 'undefined') {
17256
+ var children = _a.children, defaultConfig = _a.defaultConfig, authOptions = __rest(_a, ["children", "defaultConfig"]);
17257
+ var _b = useState(false), mounted = _b[0], setMounted = _b[1];
17258
+ var auth = useCAMSAuth(authOptions);
17259
+ useEffect(function () {
17260
+ setMounted(true);
17261
+ }, []);
17262
+ var value = useMemo(function () { return (__assign(__assign({}, auth), { defaultConfig: defaultConfig })); }, [auth, defaultConfig]);
17263
+ if (!mounted) {
18170
17264
  return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children });
18171
17265
  }
18172
- var ClientProvider = require('./CAMSProvider.client').CAMSProvider;
18173
- return jsxRuntimeExports.jsx(ClientProvider, { children: children });
17266
+ return (jsxRuntimeExports.jsx(CAMSContext.Provider, { value: value, children: children }));
18174
17267
  }
18175
17268
  function useCAMSContext() {
18176
- if (typeof window === 'undefined') {
18177
- throw new Error('useCAMSContext can only be used on the client side');
17269
+ var context = useContext(CAMSContext);
17270
+ if (!context) {
17271
+ throw new Error('useCAMSContext must be used within a CAMSProvider');
18178
17272
  }
18179
- var useClientContext = require('./CAMSProvider.client').useCAMSContext;
18180
- return useClientContext();
17273
+ return context;
18181
17274
  }
18182
17275
 
18183
17276
  function ProtectedRoute(_a) {