woodsportal-client-sdk 1.1.4-dev.16 → 1.1.4-dev.17

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.
@@ -0,0 +1,1110 @@
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
+ __defProp(target, "default", { value: mod, enumerable: true }) ,
24
+ mod
25
+ ));
26
+
27
+ // node_modules/react/cjs/react.development.js
28
+ var require_react_development = __commonJS({
29
+ "node_modules/react/cjs/react.development.js"(exports$1, module) {
30
+ (function() {
31
+ function defineDeprecationWarning(methodName, info) {
32
+ Object.defineProperty(Component.prototype, methodName, {
33
+ get: function() {
34
+ console.warn(
35
+ "%s(...) is deprecated in plain JavaScript React classes. %s",
36
+ info[0],
37
+ info[1]
38
+ );
39
+ }
40
+ });
41
+ }
42
+ function getIteratorFn(maybeIterable) {
43
+ if (null === maybeIterable || "object" !== typeof maybeIterable)
44
+ return null;
45
+ maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
46
+ return "function" === typeof maybeIterable ? maybeIterable : null;
47
+ }
48
+ function warnNoop(publicInstance, callerName) {
49
+ publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
50
+ var warningKey = publicInstance + "." + callerName;
51
+ didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error(
52
+ "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.",
53
+ callerName,
54
+ publicInstance
55
+ ), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
56
+ }
57
+ function Component(props, context, updater) {
58
+ this.props = props;
59
+ this.context = context;
60
+ this.refs = emptyObject;
61
+ this.updater = updater || ReactNoopUpdateQueue;
62
+ }
63
+ function ComponentDummy() {
64
+ }
65
+ function PureComponent(props, context, updater) {
66
+ this.props = props;
67
+ this.context = context;
68
+ this.refs = emptyObject;
69
+ this.updater = updater || ReactNoopUpdateQueue;
70
+ }
71
+ function noop() {
72
+ }
73
+ function testStringCoercion(value) {
74
+ return "" + value;
75
+ }
76
+ function checkKeyStringCoercion(value) {
77
+ try {
78
+ testStringCoercion(value);
79
+ var JSCompiler_inline_result = false;
80
+ } catch (e) {
81
+ JSCompiler_inline_result = true;
82
+ }
83
+ if (JSCompiler_inline_result) {
84
+ JSCompiler_inline_result = console;
85
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
86
+ var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
87
+ JSCompiler_temp_const.call(
88
+ JSCompiler_inline_result,
89
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
90
+ JSCompiler_inline_result$jscomp$0
91
+ );
92
+ return testStringCoercion(value);
93
+ }
94
+ }
95
+ function getComponentNameFromType(type) {
96
+ if (null == type) return null;
97
+ if ("function" === typeof type)
98
+ return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
99
+ if ("string" === typeof type) return type;
100
+ switch (type) {
101
+ case REACT_FRAGMENT_TYPE:
102
+ return "Fragment";
103
+ case REACT_PROFILER_TYPE:
104
+ return "Profiler";
105
+ case REACT_STRICT_MODE_TYPE:
106
+ return "StrictMode";
107
+ case REACT_SUSPENSE_TYPE:
108
+ return "Suspense";
109
+ case REACT_SUSPENSE_LIST_TYPE:
110
+ return "SuspenseList";
111
+ case REACT_ACTIVITY_TYPE:
112
+ return "Activity";
113
+ }
114
+ if ("object" === typeof type)
115
+ switch ("number" === typeof type.tag && console.error(
116
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
117
+ ), type.$$typeof) {
118
+ case REACT_PORTAL_TYPE:
119
+ return "Portal";
120
+ case REACT_CONTEXT_TYPE:
121
+ return type.displayName || "Context";
122
+ case REACT_CONSUMER_TYPE:
123
+ return (type._context.displayName || "Context") + ".Consumer";
124
+ case REACT_FORWARD_REF_TYPE:
125
+ var innerType = type.render;
126
+ type = type.displayName;
127
+ type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
128
+ return type;
129
+ case REACT_MEMO_TYPE:
130
+ return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
131
+ case REACT_LAZY_TYPE:
132
+ innerType = type._payload;
133
+ type = type._init;
134
+ try {
135
+ return getComponentNameFromType(type(innerType));
136
+ } catch (x) {
137
+ }
138
+ }
139
+ return null;
140
+ }
141
+ function getTaskName(type) {
142
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
143
+ if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
144
+ return "<...>";
145
+ try {
146
+ var name = getComponentNameFromType(type);
147
+ return name ? "<" + name + ">" : "<...>";
148
+ } catch (x) {
149
+ return "<...>";
150
+ }
151
+ }
152
+ function getOwner() {
153
+ var dispatcher = ReactSharedInternals.A;
154
+ return null === dispatcher ? null : dispatcher.getOwner();
155
+ }
156
+ function UnknownOwner() {
157
+ return Error("react-stack-top-frame");
158
+ }
159
+ function hasValidKey(config) {
160
+ if (hasOwnProperty.call(config, "key")) {
161
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
162
+ if (getter && getter.isReactWarning) return false;
163
+ }
164
+ return void 0 !== config.key;
165
+ }
166
+ function defineKeyPropWarningGetter(props, displayName) {
167
+ function warnAboutAccessingKey() {
168
+ specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
169
+ "%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)",
170
+ displayName
171
+ ));
172
+ }
173
+ warnAboutAccessingKey.isReactWarning = true;
174
+ Object.defineProperty(props, "key", {
175
+ get: warnAboutAccessingKey,
176
+ configurable: true
177
+ });
178
+ }
179
+ function elementRefGetterWithDeprecationWarning() {
180
+ var componentName = getComponentNameFromType(this.type);
181
+ didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
182
+ "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."
183
+ ));
184
+ componentName = this.props.ref;
185
+ return void 0 !== componentName ? componentName : null;
186
+ }
187
+ function ReactElement(type, key, props, owner, debugStack, debugTask) {
188
+ var refProp = props.ref;
189
+ type = {
190
+ $$typeof: REACT_ELEMENT_TYPE,
191
+ type,
192
+ key,
193
+ props,
194
+ _owner: owner
195
+ };
196
+ null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
197
+ enumerable: false,
198
+ get: elementRefGetterWithDeprecationWarning
199
+ }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
200
+ type._store = {};
201
+ Object.defineProperty(type._store, "validated", {
202
+ configurable: false,
203
+ enumerable: false,
204
+ writable: true,
205
+ value: 0
206
+ });
207
+ Object.defineProperty(type, "_debugInfo", {
208
+ configurable: false,
209
+ enumerable: false,
210
+ writable: true,
211
+ value: null
212
+ });
213
+ Object.defineProperty(type, "_debugStack", {
214
+ configurable: false,
215
+ enumerable: false,
216
+ writable: true,
217
+ value: debugStack
218
+ });
219
+ Object.defineProperty(type, "_debugTask", {
220
+ configurable: false,
221
+ enumerable: false,
222
+ writable: true,
223
+ value: debugTask
224
+ });
225
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
226
+ return type;
227
+ }
228
+ function cloneAndReplaceKey(oldElement, newKey) {
229
+ newKey = ReactElement(
230
+ oldElement.type,
231
+ newKey,
232
+ oldElement.props,
233
+ oldElement._owner,
234
+ oldElement._debugStack,
235
+ oldElement._debugTask
236
+ );
237
+ oldElement._store && (newKey._store.validated = oldElement._store.validated);
238
+ return newKey;
239
+ }
240
+ function validateChildKeys(node) {
241
+ isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
242
+ }
243
+ function isValidElement(object) {
244
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
245
+ }
246
+ function escape(key) {
247
+ var escaperLookup = { "=": "=0", ":": "=2" };
248
+ return "$" + key.replace(/[=:]/g, function(match) {
249
+ return escaperLookup[match];
250
+ });
251
+ }
252
+ function getElementKey(element, index) {
253
+ return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
254
+ }
255
+ function resolveThenable(thenable) {
256
+ switch (thenable.status) {
257
+ case "fulfilled":
258
+ return thenable.value;
259
+ case "rejected":
260
+ throw thenable.reason;
261
+ default:
262
+ switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
263
+ function(fulfilledValue) {
264
+ "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
265
+ },
266
+ function(error) {
267
+ "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
268
+ }
269
+ )), thenable.status) {
270
+ case "fulfilled":
271
+ return thenable.value;
272
+ case "rejected":
273
+ throw thenable.reason;
274
+ }
275
+ }
276
+ throw thenable;
277
+ }
278
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
279
+ var type = typeof children;
280
+ if ("undefined" === type || "boolean" === type) children = null;
281
+ var invokeCallback = false;
282
+ if (null === children) invokeCallback = true;
283
+ else
284
+ switch (type) {
285
+ case "bigint":
286
+ case "string":
287
+ case "number":
288
+ invokeCallback = true;
289
+ break;
290
+ case "object":
291
+ switch (children.$$typeof) {
292
+ case REACT_ELEMENT_TYPE:
293
+ case REACT_PORTAL_TYPE:
294
+ invokeCallback = true;
295
+ break;
296
+ case REACT_LAZY_TYPE:
297
+ return invokeCallback = children._init, mapIntoArray(
298
+ invokeCallback(children._payload),
299
+ array,
300
+ escapedPrefix,
301
+ nameSoFar,
302
+ callback
303
+ );
304
+ }
305
+ }
306
+ if (invokeCallback) {
307
+ invokeCallback = children;
308
+ callback = callback(invokeCallback);
309
+ var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
310
+ isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
311
+ return c;
312
+ })) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(
313
+ callback,
314
+ escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(
315
+ userProvidedKeyEscapeRegex,
316
+ "$&/"
317
+ ) + "/") + childKey
318
+ ), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
319
+ return 1;
320
+ }
321
+ invokeCallback = 0;
322
+ childKey = "" === nameSoFar ? "." : nameSoFar + ":";
323
+ if (isArrayImpl(children))
324
+ for (var i = 0; i < children.length; i++)
325
+ nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
326
+ nameSoFar,
327
+ array,
328
+ escapedPrefix,
329
+ type,
330
+ callback
331
+ );
332
+ else if (i = getIteratorFn(children), "function" === typeof i)
333
+ for (i === children.entries && (didWarnAboutMaps || console.warn(
334
+ "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
335
+ ), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
336
+ nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
337
+ nameSoFar,
338
+ array,
339
+ escapedPrefix,
340
+ type,
341
+ callback
342
+ );
343
+ else if ("object" === type) {
344
+ if ("function" === typeof children.then)
345
+ return mapIntoArray(
346
+ resolveThenable(children),
347
+ array,
348
+ escapedPrefix,
349
+ nameSoFar,
350
+ callback
351
+ );
352
+ array = String(children);
353
+ throw Error(
354
+ "Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
355
+ );
356
+ }
357
+ return invokeCallback;
358
+ }
359
+ function mapChildren(children, func, context) {
360
+ if (null == children) return children;
361
+ var result = [], count = 0;
362
+ mapIntoArray(children, result, "", "", function(child) {
363
+ return func.call(context, child, count++);
364
+ });
365
+ return result;
366
+ }
367
+ function lazyInitializer(payload) {
368
+ if (-1 === payload._status) {
369
+ var ioInfo = payload._ioInfo;
370
+ null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
371
+ ioInfo = payload._result;
372
+ var thenable = ioInfo();
373
+ thenable.then(
374
+ function(moduleObject) {
375
+ if (0 === payload._status || -1 === payload._status) {
376
+ payload._status = 1;
377
+ payload._result = moduleObject;
378
+ var _ioInfo = payload._ioInfo;
379
+ null != _ioInfo && (_ioInfo.end = performance.now());
380
+ void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
381
+ }
382
+ },
383
+ function(error) {
384
+ if (0 === payload._status || -1 === payload._status) {
385
+ payload._status = 2;
386
+ payload._result = error;
387
+ var _ioInfo2 = payload._ioInfo;
388
+ null != _ioInfo2 && (_ioInfo2.end = performance.now());
389
+ void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
390
+ }
391
+ }
392
+ );
393
+ ioInfo = payload._ioInfo;
394
+ if (null != ioInfo) {
395
+ ioInfo.value = thenable;
396
+ var displayName = thenable.displayName;
397
+ "string" === typeof displayName && (ioInfo.name = displayName);
398
+ }
399
+ -1 === payload._status && (payload._status = 0, payload._result = thenable);
400
+ }
401
+ if (1 === payload._status)
402
+ return ioInfo = payload._result, void 0 === ioInfo && console.error(
403
+ "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?",
404
+ ioInfo
405
+ ), "default" in ioInfo || console.error(
406
+ "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
407
+ ioInfo
408
+ ), ioInfo.default;
409
+ throw payload._result;
410
+ }
411
+ function resolveDispatcher() {
412
+ var dispatcher = ReactSharedInternals.H;
413
+ null === dispatcher && console.error(
414
+ "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://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
415
+ );
416
+ return dispatcher;
417
+ }
418
+ function releaseAsyncTransition() {
419
+ ReactSharedInternals.asyncTransitions--;
420
+ }
421
+ function enqueueTask(task) {
422
+ if (null === enqueueTaskImpl)
423
+ try {
424
+ var requireString = ("require" + Math.random()).slice(0, 7);
425
+ enqueueTaskImpl = (module && module[requireString]).call(
426
+ module,
427
+ "timers"
428
+ ).setImmediate;
429
+ } catch (_err) {
430
+ enqueueTaskImpl = function(callback) {
431
+ false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error(
432
+ "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."
433
+ ));
434
+ var channel = new MessageChannel();
435
+ channel.port1.onmessage = callback;
436
+ channel.port2.postMessage(void 0);
437
+ };
438
+ }
439
+ return enqueueTaskImpl(task);
440
+ }
441
+ function aggregateErrors(errors) {
442
+ return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
443
+ }
444
+ function popActScope(prevActQueue, prevActScopeDepth) {
445
+ prevActScopeDepth !== actScopeDepth - 1 && console.error(
446
+ "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
447
+ );
448
+ actScopeDepth = prevActScopeDepth;
449
+ }
450
+ function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
451
+ var queue = ReactSharedInternals.actQueue;
452
+ if (null !== queue)
453
+ if (0 !== queue.length)
454
+ try {
455
+ flushActQueue(queue);
456
+ enqueueTask(function() {
457
+ return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
458
+ });
459
+ return;
460
+ } catch (error) {
461
+ ReactSharedInternals.thrownErrors.push(error);
462
+ }
463
+ else ReactSharedInternals.actQueue = null;
464
+ 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
465
+ }
466
+ function flushActQueue(queue) {
467
+ if (!isFlushing) {
468
+ isFlushing = true;
469
+ var i = 0;
470
+ try {
471
+ for (; i < queue.length; i++) {
472
+ var callback = queue[i];
473
+ do {
474
+ ReactSharedInternals.didUsePromise = false;
475
+ var continuation = callback(false);
476
+ if (null !== continuation) {
477
+ if (ReactSharedInternals.didUsePromise) {
478
+ queue[i] = callback;
479
+ queue.splice(0, i);
480
+ return;
481
+ }
482
+ callback = continuation;
483
+ } else break;
484
+ } while (1);
485
+ }
486
+ queue.length = 0;
487
+ } catch (error) {
488
+ queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
489
+ } finally {
490
+ isFlushing = false;
491
+ }
492
+ }
493
+ }
494
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
495
+ var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
496
+ isMounted: function() {
497
+ return false;
498
+ },
499
+ enqueueForceUpdate: function(publicInstance) {
500
+ warnNoop(publicInstance, "forceUpdate");
501
+ },
502
+ enqueueReplaceState: function(publicInstance) {
503
+ warnNoop(publicInstance, "replaceState");
504
+ },
505
+ enqueueSetState: function(publicInstance) {
506
+ warnNoop(publicInstance, "setState");
507
+ }
508
+ }, assign = Object.assign, emptyObject = {};
509
+ Object.freeze(emptyObject);
510
+ Component.prototype.isReactComponent = {};
511
+ Component.prototype.setState = function(partialState, callback) {
512
+ if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
513
+ throw Error(
514
+ "takes an object of state variables to update or a function which returns an object of state variables."
515
+ );
516
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
517
+ };
518
+ Component.prototype.forceUpdate = function(callback) {
519
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
520
+ };
521
+ var deprecatedAPIs = {
522
+ isMounted: [
523
+ "isMounted",
524
+ "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
525
+ ],
526
+ replaceState: [
527
+ "replaceState",
528
+ "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
529
+ ]
530
+ };
531
+ for (fnName in deprecatedAPIs)
532
+ deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
533
+ ComponentDummy.prototype = Component.prototype;
534
+ deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
535
+ deprecatedAPIs.constructor = PureComponent;
536
+ assign(deprecatedAPIs, Component.prototype);
537
+ deprecatedAPIs.isPureReactComponent = true;
538
+ var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = {
539
+ H: null,
540
+ A: null,
541
+ T: null,
542
+ S: null,
543
+ actQueue: null,
544
+ asyncTransitions: 0,
545
+ isBatchingLegacy: false,
546
+ didScheduleLegacyUpdate: false,
547
+ didUsePromise: false,
548
+ thrownErrors: [],
549
+ getCurrentStack: null,
550
+ recentlyCreatedOwnerStacks: 0
551
+ }, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
552
+ return null;
553
+ };
554
+ deprecatedAPIs = {
555
+ react_stack_bottom_frame: function(callStackForError) {
556
+ return callStackForError();
557
+ }
558
+ };
559
+ var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
560
+ var didWarnAboutElementRef = {};
561
+ var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
562
+ deprecatedAPIs,
563
+ UnknownOwner
564
+ )();
565
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
566
+ var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
567
+ if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
568
+ var event = new window.ErrorEvent("error", {
569
+ bubbles: true,
570
+ cancelable: true,
571
+ message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
572
+ error
573
+ });
574
+ if (!window.dispatchEvent(event)) return;
575
+ } else if ("object" === typeof process && "function" === typeof process.emit) {
576
+ process.emit("uncaughtException", error);
577
+ return;
578
+ }
579
+ console.error(error);
580
+ }, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
581
+ queueMicrotask(function() {
582
+ return queueMicrotask(callback);
583
+ });
584
+ } : enqueueTask;
585
+ deprecatedAPIs = Object.freeze({
586
+ __proto__: null,
587
+ c: function(size) {
588
+ return resolveDispatcher().useMemoCache(size);
589
+ }
590
+ });
591
+ var fnName = {
592
+ map: mapChildren,
593
+ forEach: function(children, forEachFunc, forEachContext) {
594
+ mapChildren(
595
+ children,
596
+ function() {
597
+ forEachFunc.apply(this, arguments);
598
+ },
599
+ forEachContext
600
+ );
601
+ },
602
+ count: function(children) {
603
+ var n = 0;
604
+ mapChildren(children, function() {
605
+ n++;
606
+ });
607
+ return n;
608
+ },
609
+ toArray: function(children) {
610
+ return mapChildren(children, function(child) {
611
+ return child;
612
+ }) || [];
613
+ },
614
+ only: function(children) {
615
+ if (!isValidElement(children))
616
+ throw Error(
617
+ "React.Children.only expected to receive a single React element child."
618
+ );
619
+ return children;
620
+ }
621
+ };
622
+ exports$1.Activity = REACT_ACTIVITY_TYPE;
623
+ exports$1.Children = fnName;
624
+ exports$1.Component = Component;
625
+ exports$1.Fragment = REACT_FRAGMENT_TYPE;
626
+ exports$1.Profiler = REACT_PROFILER_TYPE;
627
+ exports$1.PureComponent = PureComponent;
628
+ exports$1.StrictMode = REACT_STRICT_MODE_TYPE;
629
+ exports$1.Suspense = REACT_SUSPENSE_TYPE;
630
+ exports$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
631
+ exports$1.__COMPILER_RUNTIME = deprecatedAPIs;
632
+ exports$1.act = function(callback) {
633
+ var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
634
+ actScopeDepth++;
635
+ var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
636
+ try {
637
+ var result = callback();
638
+ } catch (error) {
639
+ ReactSharedInternals.thrownErrors.push(error);
640
+ }
641
+ if (0 < ReactSharedInternals.thrownErrors.length)
642
+ throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
643
+ if (null !== result && "object" === typeof result && "function" === typeof result.then) {
644
+ var thenable = result;
645
+ queueSeveralMicrotasks(function() {
646
+ didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
647
+ "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 () => ...);"
648
+ ));
649
+ });
650
+ return {
651
+ then: function(resolve, reject) {
652
+ didAwaitActCall = true;
653
+ thenable.then(
654
+ function(returnValue) {
655
+ popActScope(prevActQueue, prevActScopeDepth);
656
+ if (0 === prevActScopeDepth) {
657
+ try {
658
+ flushActQueue(queue), enqueueTask(function() {
659
+ return recursivelyFlushAsyncActWork(
660
+ returnValue,
661
+ resolve,
662
+ reject
663
+ );
664
+ });
665
+ } catch (error$0) {
666
+ ReactSharedInternals.thrownErrors.push(error$0);
667
+ }
668
+ if (0 < ReactSharedInternals.thrownErrors.length) {
669
+ var _thrownError = aggregateErrors(
670
+ ReactSharedInternals.thrownErrors
671
+ );
672
+ ReactSharedInternals.thrownErrors.length = 0;
673
+ reject(_thrownError);
674
+ }
675
+ } else resolve(returnValue);
676
+ },
677
+ function(error) {
678
+ popActScope(prevActQueue, prevActScopeDepth);
679
+ 0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
680
+ ReactSharedInternals.thrownErrors
681
+ ), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
682
+ }
683
+ );
684
+ }
685
+ };
686
+ }
687
+ var returnValue$jscomp$0 = result;
688
+ popActScope(prevActQueue, prevActScopeDepth);
689
+ 0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
690
+ didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
691
+ "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
692
+ ));
693
+ }), ReactSharedInternals.actQueue = null);
694
+ if (0 < ReactSharedInternals.thrownErrors.length)
695
+ throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
696
+ return {
697
+ then: function(resolve, reject) {
698
+ didAwaitActCall = true;
699
+ 0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
700
+ return recursivelyFlushAsyncActWork(
701
+ returnValue$jscomp$0,
702
+ resolve,
703
+ reject
704
+ );
705
+ })) : resolve(returnValue$jscomp$0);
706
+ }
707
+ };
708
+ };
709
+ exports$1.cache = function(fn) {
710
+ return function() {
711
+ return fn.apply(null, arguments);
712
+ };
713
+ };
714
+ exports$1.cacheSignal = function() {
715
+ return null;
716
+ };
717
+ exports$1.captureOwnerStack = function() {
718
+ var getCurrentStack = ReactSharedInternals.getCurrentStack;
719
+ return null === getCurrentStack ? null : getCurrentStack();
720
+ };
721
+ exports$1.cloneElement = function(element, config, children) {
722
+ if (null === element || void 0 === element)
723
+ throw Error(
724
+ "The argument must be a React element, but you passed " + element + "."
725
+ );
726
+ var props = assign({}, element.props), key = element.key, owner = element._owner;
727
+ if (null != config) {
728
+ var JSCompiler_inline_result;
729
+ a: {
730
+ if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
731
+ config,
732
+ "ref"
733
+ ).get) && JSCompiler_inline_result.isReactWarning) {
734
+ JSCompiler_inline_result = false;
735
+ break a;
736
+ }
737
+ JSCompiler_inline_result = void 0 !== config.ref;
738
+ }
739
+ JSCompiler_inline_result && (owner = getOwner());
740
+ hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
741
+ for (propName in config)
742
+ !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
743
+ }
744
+ var propName = arguments.length - 2;
745
+ if (1 === propName) props.children = children;
746
+ else if (1 < propName) {
747
+ JSCompiler_inline_result = Array(propName);
748
+ for (var i = 0; i < propName; i++)
749
+ JSCompiler_inline_result[i] = arguments[i + 2];
750
+ props.children = JSCompiler_inline_result;
751
+ }
752
+ props = ReactElement(
753
+ element.type,
754
+ key,
755
+ props,
756
+ owner,
757
+ element._debugStack,
758
+ element._debugTask
759
+ );
760
+ for (key = 2; key < arguments.length; key++)
761
+ validateChildKeys(arguments[key]);
762
+ return props;
763
+ };
764
+ exports$1.createContext = function(defaultValue) {
765
+ defaultValue = {
766
+ $$typeof: REACT_CONTEXT_TYPE,
767
+ _currentValue: defaultValue,
768
+ _currentValue2: defaultValue,
769
+ _threadCount: 0,
770
+ Provider: null,
771
+ Consumer: null
772
+ };
773
+ defaultValue.Provider = defaultValue;
774
+ defaultValue.Consumer = {
775
+ $$typeof: REACT_CONSUMER_TYPE,
776
+ _context: defaultValue
777
+ };
778
+ defaultValue._currentRenderer = null;
779
+ defaultValue._currentRenderer2 = null;
780
+ return defaultValue;
781
+ };
782
+ exports$1.createElement = function(type, config, children) {
783
+ for (var i = 2; i < arguments.length; i++)
784
+ validateChildKeys(arguments[i]);
785
+ i = {};
786
+ var key = null;
787
+ if (null != config)
788
+ for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
789
+ "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
790
+ )), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config)
791
+ hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
792
+ var childrenLength = arguments.length - 2;
793
+ if (1 === childrenLength) i.children = children;
794
+ else if (1 < childrenLength) {
795
+ for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
796
+ childArray[_i] = arguments[_i + 2];
797
+ Object.freeze && Object.freeze(childArray);
798
+ i.children = childArray;
799
+ }
800
+ if (type && type.defaultProps)
801
+ for (propName in childrenLength = type.defaultProps, childrenLength)
802
+ void 0 === i[propName] && (i[propName] = childrenLength[propName]);
803
+ key && defineKeyPropWarningGetter(
804
+ i,
805
+ "function" === typeof type ? type.displayName || type.name || "Unknown" : type
806
+ );
807
+ var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
808
+ return ReactElement(
809
+ type,
810
+ key,
811
+ i,
812
+ getOwner(),
813
+ propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
814
+ propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
815
+ );
816
+ };
817
+ exports$1.createRef = function() {
818
+ var refObject = { current: null };
819
+ Object.seal(refObject);
820
+ return refObject;
821
+ };
822
+ exports$1.forwardRef = function(render) {
823
+ null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
824
+ "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
825
+ ) : "function" !== typeof render ? console.error(
826
+ "forwardRef requires a render function but was given %s.",
827
+ null === render ? "null" : typeof render
828
+ ) : 0 !== render.length && 2 !== render.length && console.error(
829
+ "forwardRef render functions accept exactly two parameters: props and ref. %s",
830
+ 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
831
+ );
832
+ null != render && null != render.defaultProps && console.error(
833
+ "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
834
+ );
835
+ var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
836
+ Object.defineProperty(elementType, "displayName", {
837
+ enumerable: false,
838
+ configurable: true,
839
+ get: function() {
840
+ return ownName;
841
+ },
842
+ set: function(name) {
843
+ ownName = name;
844
+ render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
845
+ }
846
+ });
847
+ return elementType;
848
+ };
849
+ exports$1.isValidElement = isValidElement;
850
+ exports$1.lazy = function(ctor) {
851
+ ctor = { _status: -1, _result: ctor };
852
+ var lazyType = {
853
+ $$typeof: REACT_LAZY_TYPE,
854
+ _payload: ctor,
855
+ _init: lazyInitializer
856
+ }, ioInfo = {
857
+ name: "lazy",
858
+ start: -1,
859
+ end: -1,
860
+ value: null,
861
+ owner: null,
862
+ debugStack: Error("react-stack-top-frame"),
863
+ debugTask: console.createTask ? console.createTask("lazy()") : null
864
+ };
865
+ ctor._ioInfo = ioInfo;
866
+ lazyType._debugInfo = [{ awaited: ioInfo }];
867
+ return lazyType;
868
+ };
869
+ exports$1.memo = function(type, compare) {
870
+ null == type && console.error(
871
+ "memo: The first argument must be a component. Instead received: %s",
872
+ null === type ? "null" : typeof type
873
+ );
874
+ compare = {
875
+ $$typeof: REACT_MEMO_TYPE,
876
+ type,
877
+ compare: void 0 === compare ? null : compare
878
+ };
879
+ var ownName;
880
+ Object.defineProperty(compare, "displayName", {
881
+ enumerable: false,
882
+ configurable: true,
883
+ get: function() {
884
+ return ownName;
885
+ },
886
+ set: function(name) {
887
+ ownName = name;
888
+ type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
889
+ }
890
+ });
891
+ return compare;
892
+ };
893
+ exports$1.startTransition = function(scope) {
894
+ var prevTransition = ReactSharedInternals.T, currentTransition = {};
895
+ currentTransition._updatedFibers = /* @__PURE__ */ new Set();
896
+ ReactSharedInternals.T = currentTransition;
897
+ try {
898
+ var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
899
+ null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
900
+ "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
901
+ } catch (error) {
902
+ reportGlobalError(error);
903
+ } finally {
904
+ null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
905
+ "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."
906
+ )), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
907
+ "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
908
+ ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
909
+ }
910
+ };
911
+ exports$1.unstable_useCacheRefresh = function() {
912
+ return resolveDispatcher().useCacheRefresh();
913
+ };
914
+ exports$1.use = function(usable) {
915
+ return resolveDispatcher().use(usable);
916
+ };
917
+ exports$1.useActionState = function(action, initialState, permalink) {
918
+ return resolveDispatcher().useActionState(
919
+ action,
920
+ initialState,
921
+ permalink
922
+ );
923
+ };
924
+ exports$1.useCallback = function(callback, deps) {
925
+ return resolveDispatcher().useCallback(callback, deps);
926
+ };
927
+ exports$1.useContext = function(Context) {
928
+ var dispatcher = resolveDispatcher();
929
+ Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
930
+ "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
931
+ );
932
+ return dispatcher.useContext(Context);
933
+ };
934
+ exports$1.useDebugValue = function(value, formatterFn) {
935
+ return resolveDispatcher().useDebugValue(value, formatterFn);
936
+ };
937
+ exports$1.useDeferredValue = function(value, initialValue) {
938
+ return resolveDispatcher().useDeferredValue(value, initialValue);
939
+ };
940
+ exports$1.useEffect = function(create, deps) {
941
+ null == create && console.warn(
942
+ "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
943
+ );
944
+ return resolveDispatcher().useEffect(create, deps);
945
+ };
946
+ exports$1.useEffectEvent = function(callback) {
947
+ return resolveDispatcher().useEffectEvent(callback);
948
+ };
949
+ exports$1.useId = function() {
950
+ return resolveDispatcher().useId();
951
+ };
952
+ exports$1.useImperativeHandle = function(ref, create, deps) {
953
+ return resolveDispatcher().useImperativeHandle(ref, create, deps);
954
+ };
955
+ exports$1.useInsertionEffect = function(create, deps) {
956
+ null == create && console.warn(
957
+ "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
958
+ );
959
+ return resolveDispatcher().useInsertionEffect(create, deps);
960
+ };
961
+ exports$1.useLayoutEffect = function(create, deps) {
962
+ null == create && console.warn(
963
+ "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
964
+ );
965
+ return resolveDispatcher().useLayoutEffect(create, deps);
966
+ };
967
+ exports$1.useMemo = function(create, deps) {
968
+ return resolveDispatcher().useMemo(create, deps);
969
+ };
970
+ exports$1.useOptimistic = function(passthrough, reducer) {
971
+ return resolveDispatcher().useOptimistic(passthrough, reducer);
972
+ };
973
+ exports$1.useReducer = function(reducer, initialArg, init) {
974
+ return resolveDispatcher().useReducer(reducer, initialArg, init);
975
+ };
976
+ exports$1.useRef = function(initialValue) {
977
+ return resolveDispatcher().useRef(initialValue);
978
+ };
979
+ exports$1.useState = function(initialState) {
980
+ return resolveDispatcher().useState(initialState);
981
+ };
982
+ exports$1.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
983
+ return resolveDispatcher().useSyncExternalStore(
984
+ subscribe,
985
+ getSnapshot,
986
+ getServerSnapshot
987
+ );
988
+ };
989
+ exports$1.useTransition = function() {
990
+ return resolveDispatcher().useTransition();
991
+ };
992
+ exports$1.version = "19.2.6";
993
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
994
+ })();
995
+ }
996
+ });
997
+
998
+ // node_modules/react/index.js
999
+ var require_react = __commonJS({
1000
+ "node_modules/react/index.js"(exports$1, module) {
1001
+ {
1002
+ module.exports = require_react_development();
1003
+ }
1004
+ }
1005
+ });
1006
+
1007
+ // src/adapters/react/useStore.ts
1008
+ var import_react = __toESM(require_react());
1009
+
1010
+ // src/store2/store.ts
1011
+ function createStore(initialState) {
1012
+ let state = initialState;
1013
+ const listeners = /* @__PURE__ */ new Set();
1014
+ return {
1015
+ getState() {
1016
+ return state;
1017
+ },
1018
+ setState(partial) {
1019
+ state = {
1020
+ ...state,
1021
+ ...partial
1022
+ };
1023
+ listeners.forEach(
1024
+ (listener) => listener(state)
1025
+ );
1026
+ },
1027
+ subscribe(listener) {
1028
+ listeners.add(listener);
1029
+ return () => listeners.delete(listener);
1030
+ }
1031
+ };
1032
+ }
1033
+
1034
+ // src/store2/use-table.ts
1035
+ var tableStore = createStore({
1036
+ tableData: [],
1037
+ tablePrependData: []
1038
+ });
1039
+ var actions = {
1040
+ setTableData(response) {
1041
+ tableStore.setState({
1042
+ tableData: response
1043
+ });
1044
+ },
1045
+ async setTablePrependData(response) {
1046
+ const state = tableStore.getState();
1047
+ let rows = [];
1048
+ if (response === "loading") {
1049
+ const row = await state.tableData?.data?.results?.columns.reduce((acc, item) => {
1050
+ if (!item.hidden) {
1051
+ acc[item.key] = "loading";
1052
+ }
1053
+ return acc;
1054
+ }, {});
1055
+ rows = [row, ...state.tablePrependData];
1056
+ } else {
1057
+ const data = response?.data;
1058
+ if (!data) {
1059
+ tableStore.setState({
1060
+ tablePrependData: []
1061
+ });
1062
+ }
1063
+ const row = await Object.fromEntries(
1064
+ Object.entries(data).map(([key, value]) => [
1065
+ key,
1066
+ value?.value ?? value
1067
+ ])
1068
+ );
1069
+ rows = [...state.tablePrependData];
1070
+ if (rows.length > 0) {
1071
+ rows[0] = row;
1072
+ } else {
1073
+ rows.push(row);
1074
+ }
1075
+ }
1076
+ tableStore.setState({
1077
+ tablePrependData: rows
1078
+ });
1079
+ }
1080
+ };
1081
+
1082
+ // src/adapters/react/useStore.ts
1083
+ function useTable() {
1084
+ const state = (0, import_react.useSyncExternalStore)(
1085
+ tableStore.subscribe,
1086
+ tableStore.getState,
1087
+ tableStore.getState
1088
+ );
1089
+ return {
1090
+ ...state,
1091
+ ...actions
1092
+ };
1093
+ }
1094
+ /*! Bundled license information:
1095
+
1096
+ react/cjs/react.development.js:
1097
+ (**
1098
+ * @license React
1099
+ * react.development.js
1100
+ *
1101
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1102
+ *
1103
+ * This source code is licensed under the MIT license found in the
1104
+ * LICENSE file in the root directory of this source tree.
1105
+ *)
1106
+ */
1107
+
1108
+ export { useTable };
1109
+ //# sourceMappingURL=index.js.map
1110
+ //# sourceMappingURL=index.js.map