os-detect 1.0.1 → 2.0.1

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,1653 @@
1
+ "use strict";
2
+ var OsDetect = (() => {
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
10
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
11
+ }) : x)(function(x) {
12
+ if (typeof require !== "undefined") return require.apply(this, arguments);
13
+ throw Error('Dynamic require of "' + x + '" is not supported');
14
+ });
15
+ var __commonJS = (cb, mod) => function __require2() {
16
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
+ };
18
+ var __export = (target, all) => {
19
+ for (var name in all)
20
+ __defProp(target, name, { get: all[name], enumerable: true });
21
+ };
22
+ var __copyProps = (to, from, except, desc) => {
23
+ if (from && typeof from === "object" || typeof from === "function") {
24
+ for (let key of __getOwnPropNames(from))
25
+ if (!__hasOwnProp.call(to, key) && key !== except)
26
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
27
+ }
28
+ return to;
29
+ };
30
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
31
+ // If the importer is in node compatibility mode or this is not an ESM
32
+ // file that has been converted to a CommonJS file using a Babel-
33
+ // compatible transform (i.e. "__esModule" has not been set), then set
34
+ // "default" to the CommonJS "module.exports" for node compatibility.
35
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
36
+ mod
37
+ ));
38
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
39
+
40
+ // node_modules/react/cjs/react.production.js
41
+ var require_react_production = __commonJS({
42
+ "node_modules/react/cjs/react.production.js"(exports) {
43
+ "use strict";
44
+ var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element");
45
+ var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
46
+ var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
47
+ var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
48
+ var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
49
+ var REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer");
50
+ var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
51
+ var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
52
+ var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
53
+ var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
54
+ var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
55
+ var REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity");
56
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
57
+ function getIteratorFn(maybeIterable) {
58
+ if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
59
+ maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
60
+ return "function" === typeof maybeIterable ? maybeIterable : null;
61
+ }
62
+ var ReactNoopUpdateQueue = {
63
+ isMounted: function() {
64
+ return false;
65
+ },
66
+ enqueueForceUpdate: function() {
67
+ },
68
+ enqueueReplaceState: function() {
69
+ },
70
+ enqueueSetState: function() {
71
+ }
72
+ };
73
+ var assign = Object.assign;
74
+ var emptyObject = {};
75
+ function Component(props, context, updater) {
76
+ this.props = props;
77
+ this.context = context;
78
+ this.refs = emptyObject;
79
+ this.updater = updater || ReactNoopUpdateQueue;
80
+ }
81
+ Component.prototype.isReactComponent = {};
82
+ Component.prototype.setState = function(partialState, callback) {
83
+ if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
84
+ throw Error(
85
+ "takes an object of state variables to update or a function which returns an object of state variables."
86
+ );
87
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
88
+ };
89
+ Component.prototype.forceUpdate = function(callback) {
90
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
91
+ };
92
+ function ComponentDummy() {
93
+ }
94
+ ComponentDummy.prototype = Component.prototype;
95
+ function PureComponent(props, context, updater) {
96
+ this.props = props;
97
+ this.context = context;
98
+ this.refs = emptyObject;
99
+ this.updater = updater || ReactNoopUpdateQueue;
100
+ }
101
+ var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
102
+ pureComponentPrototype.constructor = PureComponent;
103
+ assign(pureComponentPrototype, Component.prototype);
104
+ pureComponentPrototype.isPureReactComponent = true;
105
+ var isArrayImpl = Array.isArray;
106
+ function noop() {
107
+ }
108
+ var ReactSharedInternals = { H: null, A: null, T: null, S: null };
109
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
110
+ function ReactElement(type, key, props) {
111
+ var refProp = props.ref;
112
+ return {
113
+ $$typeof: REACT_ELEMENT_TYPE,
114
+ type,
115
+ key,
116
+ ref: void 0 !== refProp ? refProp : null,
117
+ props
118
+ };
119
+ }
120
+ function cloneAndReplaceKey(oldElement, newKey) {
121
+ return ReactElement(oldElement.type, newKey, oldElement.props);
122
+ }
123
+ function isValidElement(object) {
124
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
125
+ }
126
+ function escape(key) {
127
+ var escaperLookup = { "=": "=0", ":": "=2" };
128
+ return "$" + key.replace(/[=:]/g, function(match) {
129
+ return escaperLookup[match];
130
+ });
131
+ }
132
+ var userProvidedKeyEscapeRegex = /\/+/g;
133
+ function getElementKey(element, index) {
134
+ return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36);
135
+ }
136
+ function resolveThenable(thenable) {
137
+ switch (thenable.status) {
138
+ case "fulfilled":
139
+ return thenable.value;
140
+ case "rejected":
141
+ throw thenable.reason;
142
+ default:
143
+ switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
144
+ function(fulfilledValue) {
145
+ "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
146
+ },
147
+ function(error) {
148
+ "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
149
+ }
150
+ )), thenable.status) {
151
+ case "fulfilled":
152
+ return thenable.value;
153
+ case "rejected":
154
+ throw thenable.reason;
155
+ }
156
+ }
157
+ throw thenable;
158
+ }
159
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
160
+ var type = typeof children;
161
+ if ("undefined" === type || "boolean" === type) children = null;
162
+ var invokeCallback = false;
163
+ if (null === children) invokeCallback = true;
164
+ else
165
+ switch (type) {
166
+ case "bigint":
167
+ case "string":
168
+ case "number":
169
+ invokeCallback = true;
170
+ break;
171
+ case "object":
172
+ switch (children.$$typeof) {
173
+ case REACT_ELEMENT_TYPE:
174
+ case REACT_PORTAL_TYPE:
175
+ invokeCallback = true;
176
+ break;
177
+ case REACT_LAZY_TYPE:
178
+ return invokeCallback = children._init, mapIntoArray(
179
+ invokeCallback(children._payload),
180
+ array,
181
+ escapedPrefix,
182
+ nameSoFar,
183
+ callback
184
+ );
185
+ }
186
+ }
187
+ if (invokeCallback)
188
+ return callback = callback(children), invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
189
+ return c;
190
+ })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(
191
+ callback,
192
+ escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(
193
+ userProvidedKeyEscapeRegex,
194
+ "$&/"
195
+ ) + "/") + invokeCallback
196
+ )), array.push(callback)), 1;
197
+ invokeCallback = 0;
198
+ var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
199
+ if (isArrayImpl(children))
200
+ for (var i = 0; i < children.length; i++)
201
+ nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
202
+ nameSoFar,
203
+ array,
204
+ escapedPrefix,
205
+ type,
206
+ callback
207
+ );
208
+ else if (i = getIteratorFn(children), "function" === typeof i)
209
+ for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
210
+ nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
211
+ nameSoFar,
212
+ array,
213
+ escapedPrefix,
214
+ type,
215
+ callback
216
+ );
217
+ else if ("object" === type) {
218
+ if ("function" === typeof children.then)
219
+ return mapIntoArray(
220
+ resolveThenable(children),
221
+ array,
222
+ escapedPrefix,
223
+ nameSoFar,
224
+ callback
225
+ );
226
+ array = String(children);
227
+ throw Error(
228
+ "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."
229
+ );
230
+ }
231
+ return invokeCallback;
232
+ }
233
+ function mapChildren(children, func, context) {
234
+ if (null == children) return children;
235
+ var result = [], count = 0;
236
+ mapIntoArray(children, result, "", "", function(child) {
237
+ return func.call(context, child, count++);
238
+ });
239
+ return result;
240
+ }
241
+ function lazyInitializer(payload) {
242
+ if (-1 === payload._status) {
243
+ var ctor = payload._result;
244
+ ctor = ctor();
245
+ ctor.then(
246
+ function(moduleObject) {
247
+ if (0 === payload._status || -1 === payload._status)
248
+ payload._status = 1, payload._result = moduleObject;
249
+ },
250
+ function(error) {
251
+ if (0 === payload._status || -1 === payload._status)
252
+ payload._status = 2, payload._result = error;
253
+ }
254
+ );
255
+ -1 === payload._status && (payload._status = 0, payload._result = ctor);
256
+ }
257
+ if (1 === payload._status) return payload._result.default;
258
+ throw payload._result;
259
+ }
260
+ var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
261
+ if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
262
+ var event = new window.ErrorEvent("error", {
263
+ bubbles: true,
264
+ cancelable: true,
265
+ message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
266
+ error
267
+ });
268
+ if (!window.dispatchEvent(event)) return;
269
+ } else if ("object" === typeof process && "function" === typeof process.emit) {
270
+ process.emit("uncaughtException", error);
271
+ return;
272
+ }
273
+ console.error(error);
274
+ };
275
+ var Children = {
276
+ map: mapChildren,
277
+ forEach: function(children, forEachFunc, forEachContext) {
278
+ mapChildren(
279
+ children,
280
+ function() {
281
+ forEachFunc.apply(this, arguments);
282
+ },
283
+ forEachContext
284
+ );
285
+ },
286
+ count: function(children) {
287
+ var n = 0;
288
+ mapChildren(children, function() {
289
+ n++;
290
+ });
291
+ return n;
292
+ },
293
+ toArray: function(children) {
294
+ return mapChildren(children, function(child) {
295
+ return child;
296
+ }) || [];
297
+ },
298
+ only: function(children) {
299
+ if (!isValidElement(children))
300
+ throw Error(
301
+ "React.Children.only expected to receive a single React element child."
302
+ );
303
+ return children;
304
+ }
305
+ };
306
+ exports.Activity = REACT_ACTIVITY_TYPE;
307
+ exports.Children = Children;
308
+ exports.Component = Component;
309
+ exports.Fragment = REACT_FRAGMENT_TYPE;
310
+ exports.Profiler = REACT_PROFILER_TYPE;
311
+ exports.PureComponent = PureComponent;
312
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
313
+ exports.Suspense = REACT_SUSPENSE_TYPE;
314
+ exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
315
+ exports.__COMPILER_RUNTIME = {
316
+ __proto__: null,
317
+ c: function(size) {
318
+ return ReactSharedInternals.H.useMemoCache(size);
319
+ }
320
+ };
321
+ exports.cache = function(fn) {
322
+ return function() {
323
+ return fn.apply(null, arguments);
324
+ };
325
+ };
326
+ exports.cacheSignal = function() {
327
+ return null;
328
+ };
329
+ exports.cloneElement = function(element, config, children) {
330
+ if (null === element || void 0 === element)
331
+ throw Error(
332
+ "The argument must be a React element, but you passed " + element + "."
333
+ );
334
+ var props = assign({}, element.props), key = element.key;
335
+ if (null != config)
336
+ for (propName in void 0 !== config.key && (key = "" + config.key), config)
337
+ !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
338
+ var propName = arguments.length - 2;
339
+ if (1 === propName) props.children = children;
340
+ else if (1 < propName) {
341
+ for (var childArray = Array(propName), i = 0; i < propName; i++)
342
+ childArray[i] = arguments[i + 2];
343
+ props.children = childArray;
344
+ }
345
+ return ReactElement(element.type, key, props);
346
+ };
347
+ exports.createContext = function(defaultValue) {
348
+ defaultValue = {
349
+ $$typeof: REACT_CONTEXT_TYPE,
350
+ _currentValue: defaultValue,
351
+ _currentValue2: defaultValue,
352
+ _threadCount: 0,
353
+ Provider: null,
354
+ Consumer: null
355
+ };
356
+ defaultValue.Provider = defaultValue;
357
+ defaultValue.Consumer = {
358
+ $$typeof: REACT_CONSUMER_TYPE,
359
+ _context: defaultValue
360
+ };
361
+ return defaultValue;
362
+ };
363
+ exports.createElement = function(type, config, children) {
364
+ var propName, props = {}, key = null;
365
+ if (null != config)
366
+ for (propName in void 0 !== config.key && (key = "" + config.key), config)
367
+ hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]);
368
+ var childrenLength = arguments.length - 2;
369
+ if (1 === childrenLength) props.children = children;
370
+ else if (1 < childrenLength) {
371
+ for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
372
+ childArray[i] = arguments[i + 2];
373
+ props.children = childArray;
374
+ }
375
+ if (type && type.defaultProps)
376
+ for (propName in childrenLength = type.defaultProps, childrenLength)
377
+ void 0 === props[propName] && (props[propName] = childrenLength[propName]);
378
+ return ReactElement(type, key, props);
379
+ };
380
+ exports.createRef = function() {
381
+ return { current: null };
382
+ };
383
+ exports.forwardRef = function(render) {
384
+ return { $$typeof: REACT_FORWARD_REF_TYPE, render };
385
+ };
386
+ exports.isValidElement = isValidElement;
387
+ exports.lazy = function(ctor) {
388
+ return {
389
+ $$typeof: REACT_LAZY_TYPE,
390
+ _payload: { _status: -1, _result: ctor },
391
+ _init: lazyInitializer
392
+ };
393
+ };
394
+ exports.memo = function(type, compare) {
395
+ return {
396
+ $$typeof: REACT_MEMO_TYPE,
397
+ type,
398
+ compare: void 0 === compare ? null : compare
399
+ };
400
+ };
401
+ exports.startTransition = function(scope) {
402
+ var prevTransition = ReactSharedInternals.T, currentTransition = {};
403
+ ReactSharedInternals.T = currentTransition;
404
+ try {
405
+ var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
406
+ null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
407
+ "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
408
+ } catch (error) {
409
+ reportGlobalError(error);
410
+ } finally {
411
+ null !== prevTransition && null !== currentTransition.types && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
412
+ }
413
+ };
414
+ exports.unstable_useCacheRefresh = function() {
415
+ return ReactSharedInternals.H.useCacheRefresh();
416
+ };
417
+ exports.use = function(usable) {
418
+ return ReactSharedInternals.H.use(usable);
419
+ };
420
+ exports.useActionState = function(action, initialState, permalink) {
421
+ return ReactSharedInternals.H.useActionState(action, initialState, permalink);
422
+ };
423
+ exports.useCallback = function(callback, deps) {
424
+ return ReactSharedInternals.H.useCallback(callback, deps);
425
+ };
426
+ exports.useContext = function(Context) {
427
+ return ReactSharedInternals.H.useContext(Context);
428
+ };
429
+ exports.useDebugValue = function() {
430
+ };
431
+ exports.useDeferredValue = function(value, initialValue) {
432
+ return ReactSharedInternals.H.useDeferredValue(value, initialValue);
433
+ };
434
+ exports.useEffect = function(create, deps) {
435
+ return ReactSharedInternals.H.useEffect(create, deps);
436
+ };
437
+ exports.useEffectEvent = function(callback) {
438
+ return ReactSharedInternals.H.useEffectEvent(callback);
439
+ };
440
+ exports.useId = function() {
441
+ return ReactSharedInternals.H.useId();
442
+ };
443
+ exports.useImperativeHandle = function(ref, create, deps) {
444
+ return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
445
+ };
446
+ exports.useInsertionEffect = function(create, deps) {
447
+ return ReactSharedInternals.H.useInsertionEffect(create, deps);
448
+ };
449
+ exports.useLayoutEffect = function(create, deps) {
450
+ return ReactSharedInternals.H.useLayoutEffect(create, deps);
451
+ };
452
+ exports.useMemo = function(create, deps) {
453
+ return ReactSharedInternals.H.useMemo(create, deps);
454
+ };
455
+ exports.useOptimistic = function(passthrough, reducer) {
456
+ return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
457
+ };
458
+ exports.useReducer = function(reducer, initialArg, init) {
459
+ return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
460
+ };
461
+ exports.useRef = function(initialValue) {
462
+ return ReactSharedInternals.H.useRef(initialValue);
463
+ };
464
+ exports.useState = function(initialState) {
465
+ return ReactSharedInternals.H.useState(initialState);
466
+ };
467
+ exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
468
+ return ReactSharedInternals.H.useSyncExternalStore(
469
+ subscribe,
470
+ getSnapshot,
471
+ getServerSnapshot
472
+ );
473
+ };
474
+ exports.useTransition = function() {
475
+ return ReactSharedInternals.H.useTransition();
476
+ };
477
+ exports.version = "19.2.4";
478
+ }
479
+ });
480
+
481
+ // node_modules/react/cjs/react.development.js
482
+ var require_react_development = __commonJS({
483
+ "node_modules/react/cjs/react.development.js"(exports, module) {
484
+ "use strict";
485
+ "production" !== process.env.NODE_ENV && (function() {
486
+ function defineDeprecationWarning(methodName, info) {
487
+ Object.defineProperty(Component.prototype, methodName, {
488
+ get: function() {
489
+ console.warn(
490
+ "%s(...) is deprecated in plain JavaScript React classes. %s",
491
+ info[0],
492
+ info[1]
493
+ );
494
+ }
495
+ });
496
+ }
497
+ function getIteratorFn(maybeIterable) {
498
+ if (null === maybeIterable || "object" !== typeof maybeIterable)
499
+ return null;
500
+ maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
501
+ return "function" === typeof maybeIterable ? maybeIterable : null;
502
+ }
503
+ function warnNoop(publicInstance, callerName) {
504
+ publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
505
+ var warningKey = publicInstance + "." + callerName;
506
+ didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error(
507
+ "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.",
508
+ callerName,
509
+ publicInstance
510
+ ), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
511
+ }
512
+ function Component(props, context, updater) {
513
+ this.props = props;
514
+ this.context = context;
515
+ this.refs = emptyObject;
516
+ this.updater = updater || ReactNoopUpdateQueue;
517
+ }
518
+ function ComponentDummy() {
519
+ }
520
+ function PureComponent(props, context, updater) {
521
+ this.props = props;
522
+ this.context = context;
523
+ this.refs = emptyObject;
524
+ this.updater = updater || ReactNoopUpdateQueue;
525
+ }
526
+ function noop() {
527
+ }
528
+ function testStringCoercion(value) {
529
+ return "" + value;
530
+ }
531
+ function checkKeyStringCoercion(value) {
532
+ try {
533
+ testStringCoercion(value);
534
+ var JSCompiler_inline_result = false;
535
+ } catch (e) {
536
+ JSCompiler_inline_result = true;
537
+ }
538
+ if (JSCompiler_inline_result) {
539
+ JSCompiler_inline_result = console;
540
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
541
+ var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
542
+ JSCompiler_temp_const.call(
543
+ JSCompiler_inline_result,
544
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
545
+ JSCompiler_inline_result$jscomp$0
546
+ );
547
+ return testStringCoercion(value);
548
+ }
549
+ }
550
+ function getComponentNameFromType(type) {
551
+ if (null == type) return null;
552
+ if ("function" === typeof type)
553
+ return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
554
+ if ("string" === typeof type) return type;
555
+ switch (type) {
556
+ case REACT_FRAGMENT_TYPE:
557
+ return "Fragment";
558
+ case REACT_PROFILER_TYPE:
559
+ return "Profiler";
560
+ case REACT_STRICT_MODE_TYPE:
561
+ return "StrictMode";
562
+ case REACT_SUSPENSE_TYPE:
563
+ return "Suspense";
564
+ case REACT_SUSPENSE_LIST_TYPE:
565
+ return "SuspenseList";
566
+ case REACT_ACTIVITY_TYPE:
567
+ return "Activity";
568
+ }
569
+ if ("object" === typeof type)
570
+ switch ("number" === typeof type.tag && console.error(
571
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
572
+ ), type.$$typeof) {
573
+ case REACT_PORTAL_TYPE:
574
+ return "Portal";
575
+ case REACT_CONTEXT_TYPE:
576
+ return type.displayName || "Context";
577
+ case REACT_CONSUMER_TYPE:
578
+ return (type._context.displayName || "Context") + ".Consumer";
579
+ case REACT_FORWARD_REF_TYPE:
580
+ var innerType = type.render;
581
+ type = type.displayName;
582
+ type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
583
+ return type;
584
+ case REACT_MEMO_TYPE:
585
+ return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
586
+ case REACT_LAZY_TYPE:
587
+ innerType = type._payload;
588
+ type = type._init;
589
+ try {
590
+ return getComponentNameFromType(type(innerType));
591
+ } catch (x) {
592
+ }
593
+ }
594
+ return null;
595
+ }
596
+ function getTaskName(type) {
597
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
598
+ if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
599
+ return "<...>";
600
+ try {
601
+ var name = getComponentNameFromType(type);
602
+ return name ? "<" + name + ">" : "<...>";
603
+ } catch (x) {
604
+ return "<...>";
605
+ }
606
+ }
607
+ function getOwner() {
608
+ var dispatcher = ReactSharedInternals.A;
609
+ return null === dispatcher ? null : dispatcher.getOwner();
610
+ }
611
+ function UnknownOwner() {
612
+ return Error("react-stack-top-frame");
613
+ }
614
+ function hasValidKey(config) {
615
+ if (hasOwnProperty.call(config, "key")) {
616
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
617
+ if (getter && getter.isReactWarning) return false;
618
+ }
619
+ return void 0 !== config.key;
620
+ }
621
+ function defineKeyPropWarningGetter(props, displayName) {
622
+ function warnAboutAccessingKey() {
623
+ specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
624
+ "%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)",
625
+ displayName
626
+ ));
627
+ }
628
+ warnAboutAccessingKey.isReactWarning = true;
629
+ Object.defineProperty(props, "key", {
630
+ get: warnAboutAccessingKey,
631
+ configurable: true
632
+ });
633
+ }
634
+ function elementRefGetterWithDeprecationWarning() {
635
+ var componentName = getComponentNameFromType(this.type);
636
+ didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
637
+ "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."
638
+ ));
639
+ componentName = this.props.ref;
640
+ return void 0 !== componentName ? componentName : null;
641
+ }
642
+ function ReactElement(type, key, props, owner, debugStack, debugTask) {
643
+ var refProp = props.ref;
644
+ type = {
645
+ $$typeof: REACT_ELEMENT_TYPE,
646
+ type,
647
+ key,
648
+ props,
649
+ _owner: owner
650
+ };
651
+ null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
652
+ enumerable: false,
653
+ get: elementRefGetterWithDeprecationWarning
654
+ }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
655
+ type._store = {};
656
+ Object.defineProperty(type._store, "validated", {
657
+ configurable: false,
658
+ enumerable: false,
659
+ writable: true,
660
+ value: 0
661
+ });
662
+ Object.defineProperty(type, "_debugInfo", {
663
+ configurable: false,
664
+ enumerable: false,
665
+ writable: true,
666
+ value: null
667
+ });
668
+ Object.defineProperty(type, "_debugStack", {
669
+ configurable: false,
670
+ enumerable: false,
671
+ writable: true,
672
+ value: debugStack
673
+ });
674
+ Object.defineProperty(type, "_debugTask", {
675
+ configurable: false,
676
+ enumerable: false,
677
+ writable: true,
678
+ value: debugTask
679
+ });
680
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
681
+ return type;
682
+ }
683
+ function cloneAndReplaceKey(oldElement, newKey) {
684
+ newKey = ReactElement(
685
+ oldElement.type,
686
+ newKey,
687
+ oldElement.props,
688
+ oldElement._owner,
689
+ oldElement._debugStack,
690
+ oldElement._debugTask
691
+ );
692
+ oldElement._store && (newKey._store.validated = oldElement._store.validated);
693
+ return newKey;
694
+ }
695
+ function validateChildKeys(node) {
696
+ 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));
697
+ }
698
+ function isValidElement(object) {
699
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
700
+ }
701
+ function escape(key) {
702
+ var escaperLookup = { "=": "=0", ":": "=2" };
703
+ return "$" + key.replace(/[=:]/g, function(match) {
704
+ return escaperLookup[match];
705
+ });
706
+ }
707
+ function getElementKey(element, index) {
708
+ return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
709
+ }
710
+ function resolveThenable(thenable) {
711
+ switch (thenable.status) {
712
+ case "fulfilled":
713
+ return thenable.value;
714
+ case "rejected":
715
+ throw thenable.reason;
716
+ default:
717
+ switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
718
+ function(fulfilledValue) {
719
+ "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
720
+ },
721
+ function(error) {
722
+ "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
723
+ }
724
+ )), thenable.status) {
725
+ case "fulfilled":
726
+ return thenable.value;
727
+ case "rejected":
728
+ throw thenable.reason;
729
+ }
730
+ }
731
+ throw thenable;
732
+ }
733
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
734
+ var type = typeof children;
735
+ if ("undefined" === type || "boolean" === type) children = null;
736
+ var invokeCallback = false;
737
+ if (null === children) invokeCallback = true;
738
+ else
739
+ switch (type) {
740
+ case "bigint":
741
+ case "string":
742
+ case "number":
743
+ invokeCallback = true;
744
+ break;
745
+ case "object":
746
+ switch (children.$$typeof) {
747
+ case REACT_ELEMENT_TYPE:
748
+ case REACT_PORTAL_TYPE:
749
+ invokeCallback = true;
750
+ break;
751
+ case REACT_LAZY_TYPE:
752
+ return invokeCallback = children._init, mapIntoArray(
753
+ invokeCallback(children._payload),
754
+ array,
755
+ escapedPrefix,
756
+ nameSoFar,
757
+ callback
758
+ );
759
+ }
760
+ }
761
+ if (invokeCallback) {
762
+ invokeCallback = children;
763
+ callback = callback(invokeCallback);
764
+ var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
765
+ isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
766
+ return c;
767
+ })) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(
768
+ callback,
769
+ escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(
770
+ userProvidedKeyEscapeRegex,
771
+ "$&/"
772
+ ) + "/") + childKey
773
+ ), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
774
+ return 1;
775
+ }
776
+ invokeCallback = 0;
777
+ childKey = "" === nameSoFar ? "." : nameSoFar + ":";
778
+ if (isArrayImpl(children))
779
+ for (var i = 0; i < children.length; i++)
780
+ nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
781
+ nameSoFar,
782
+ array,
783
+ escapedPrefix,
784
+ type,
785
+ callback
786
+ );
787
+ else if (i = getIteratorFn(children), "function" === typeof i)
788
+ for (i === children.entries && (didWarnAboutMaps || console.warn(
789
+ "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
790
+ ), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
791
+ nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
792
+ nameSoFar,
793
+ array,
794
+ escapedPrefix,
795
+ type,
796
+ callback
797
+ );
798
+ else if ("object" === type) {
799
+ if ("function" === typeof children.then)
800
+ return mapIntoArray(
801
+ resolveThenable(children),
802
+ array,
803
+ escapedPrefix,
804
+ nameSoFar,
805
+ callback
806
+ );
807
+ array = String(children);
808
+ throw Error(
809
+ "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."
810
+ );
811
+ }
812
+ return invokeCallback;
813
+ }
814
+ function mapChildren(children, func, context) {
815
+ if (null == children) return children;
816
+ var result = [], count = 0;
817
+ mapIntoArray(children, result, "", "", function(child) {
818
+ return func.call(context, child, count++);
819
+ });
820
+ return result;
821
+ }
822
+ function lazyInitializer(payload) {
823
+ if (-1 === payload._status) {
824
+ var ioInfo = payload._ioInfo;
825
+ null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
826
+ ioInfo = payload._result;
827
+ var thenable = ioInfo();
828
+ thenable.then(
829
+ function(moduleObject) {
830
+ if (0 === payload._status || -1 === payload._status) {
831
+ payload._status = 1;
832
+ payload._result = moduleObject;
833
+ var _ioInfo = payload._ioInfo;
834
+ null != _ioInfo && (_ioInfo.end = performance.now());
835
+ void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
836
+ }
837
+ },
838
+ function(error) {
839
+ if (0 === payload._status || -1 === payload._status) {
840
+ payload._status = 2;
841
+ payload._result = error;
842
+ var _ioInfo2 = payload._ioInfo;
843
+ null != _ioInfo2 && (_ioInfo2.end = performance.now());
844
+ void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
845
+ }
846
+ }
847
+ );
848
+ ioInfo = payload._ioInfo;
849
+ if (null != ioInfo) {
850
+ ioInfo.value = thenable;
851
+ var displayName = thenable.displayName;
852
+ "string" === typeof displayName && (ioInfo.name = displayName);
853
+ }
854
+ -1 === payload._status && (payload._status = 0, payload._result = thenable);
855
+ }
856
+ if (1 === payload._status)
857
+ return ioInfo = payload._result, void 0 === ioInfo && console.error(
858
+ "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?",
859
+ ioInfo
860
+ ), "default" in ioInfo || console.error(
861
+ "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
862
+ ioInfo
863
+ ), ioInfo.default;
864
+ throw payload._result;
865
+ }
866
+ function resolveDispatcher() {
867
+ var dispatcher = ReactSharedInternals.H;
868
+ null === dispatcher && console.error(
869
+ "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."
870
+ );
871
+ return dispatcher;
872
+ }
873
+ function releaseAsyncTransition() {
874
+ ReactSharedInternals.asyncTransitions--;
875
+ }
876
+ function enqueueTask(task) {
877
+ if (null === enqueueTaskImpl)
878
+ try {
879
+ var requireString = ("require" + Math.random()).slice(0, 7);
880
+ enqueueTaskImpl = (module && module[requireString]).call(
881
+ module,
882
+ "timers"
883
+ ).setImmediate;
884
+ } catch (_err) {
885
+ enqueueTaskImpl = function(callback) {
886
+ false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error(
887
+ "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."
888
+ ));
889
+ var channel = new MessageChannel();
890
+ channel.port1.onmessage = callback;
891
+ channel.port2.postMessage(void 0);
892
+ };
893
+ }
894
+ return enqueueTaskImpl(task);
895
+ }
896
+ function aggregateErrors(errors) {
897
+ return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
898
+ }
899
+ function popActScope(prevActQueue, prevActScopeDepth) {
900
+ prevActScopeDepth !== actScopeDepth - 1 && console.error(
901
+ "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
902
+ );
903
+ actScopeDepth = prevActScopeDepth;
904
+ }
905
+ function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
906
+ var queue = ReactSharedInternals.actQueue;
907
+ if (null !== queue)
908
+ if (0 !== queue.length)
909
+ try {
910
+ flushActQueue(queue);
911
+ enqueueTask(function() {
912
+ return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
913
+ });
914
+ return;
915
+ } catch (error) {
916
+ ReactSharedInternals.thrownErrors.push(error);
917
+ }
918
+ else ReactSharedInternals.actQueue = null;
919
+ 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
920
+ }
921
+ function flushActQueue(queue) {
922
+ if (!isFlushing) {
923
+ isFlushing = true;
924
+ var i = 0;
925
+ try {
926
+ for (; i < queue.length; i++) {
927
+ var callback = queue[i];
928
+ do {
929
+ ReactSharedInternals.didUsePromise = false;
930
+ var continuation = callback(false);
931
+ if (null !== continuation) {
932
+ if (ReactSharedInternals.didUsePromise) {
933
+ queue[i] = callback;
934
+ queue.splice(0, i);
935
+ return;
936
+ }
937
+ callback = continuation;
938
+ } else break;
939
+ } while (1);
940
+ }
941
+ queue.length = 0;
942
+ } catch (error) {
943
+ queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
944
+ } finally {
945
+ isFlushing = false;
946
+ }
947
+ }
948
+ }
949
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
950
+ 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 = {
951
+ isMounted: function() {
952
+ return false;
953
+ },
954
+ enqueueForceUpdate: function(publicInstance) {
955
+ warnNoop(publicInstance, "forceUpdate");
956
+ },
957
+ enqueueReplaceState: function(publicInstance) {
958
+ warnNoop(publicInstance, "replaceState");
959
+ },
960
+ enqueueSetState: function(publicInstance) {
961
+ warnNoop(publicInstance, "setState");
962
+ }
963
+ }, assign = Object.assign, emptyObject = {};
964
+ Object.freeze(emptyObject);
965
+ Component.prototype.isReactComponent = {};
966
+ Component.prototype.setState = function(partialState, callback) {
967
+ if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
968
+ throw Error(
969
+ "takes an object of state variables to update or a function which returns an object of state variables."
970
+ );
971
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
972
+ };
973
+ Component.prototype.forceUpdate = function(callback) {
974
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
975
+ };
976
+ var deprecatedAPIs = {
977
+ isMounted: [
978
+ "isMounted",
979
+ "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
980
+ ],
981
+ replaceState: [
982
+ "replaceState",
983
+ "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
984
+ ]
985
+ };
986
+ for (fnName in deprecatedAPIs)
987
+ deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
988
+ ComponentDummy.prototype = Component.prototype;
989
+ deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
990
+ deprecatedAPIs.constructor = PureComponent;
991
+ assign(deprecatedAPIs, Component.prototype);
992
+ deprecatedAPIs.isPureReactComponent = true;
993
+ var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = {
994
+ H: null,
995
+ A: null,
996
+ T: null,
997
+ S: null,
998
+ actQueue: null,
999
+ asyncTransitions: 0,
1000
+ isBatchingLegacy: false,
1001
+ didScheduleLegacyUpdate: false,
1002
+ didUsePromise: false,
1003
+ thrownErrors: [],
1004
+ getCurrentStack: null,
1005
+ recentlyCreatedOwnerStacks: 0
1006
+ }, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
1007
+ return null;
1008
+ };
1009
+ deprecatedAPIs = {
1010
+ react_stack_bottom_frame: function(callStackForError) {
1011
+ return callStackForError();
1012
+ }
1013
+ };
1014
+ var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
1015
+ var didWarnAboutElementRef = {};
1016
+ var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
1017
+ deprecatedAPIs,
1018
+ UnknownOwner
1019
+ )();
1020
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
1021
+ var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
1022
+ if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
1023
+ var event = new window.ErrorEvent("error", {
1024
+ bubbles: true,
1025
+ cancelable: true,
1026
+ message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
1027
+ error
1028
+ });
1029
+ if (!window.dispatchEvent(event)) return;
1030
+ } else if ("object" === typeof process && "function" === typeof process.emit) {
1031
+ process.emit("uncaughtException", error);
1032
+ return;
1033
+ }
1034
+ console.error(error);
1035
+ }, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
1036
+ queueMicrotask(function() {
1037
+ return queueMicrotask(callback);
1038
+ });
1039
+ } : enqueueTask;
1040
+ deprecatedAPIs = Object.freeze({
1041
+ __proto__: null,
1042
+ c: function(size) {
1043
+ return resolveDispatcher().useMemoCache(size);
1044
+ }
1045
+ });
1046
+ var fnName = {
1047
+ map: mapChildren,
1048
+ forEach: function(children, forEachFunc, forEachContext) {
1049
+ mapChildren(
1050
+ children,
1051
+ function() {
1052
+ forEachFunc.apply(this, arguments);
1053
+ },
1054
+ forEachContext
1055
+ );
1056
+ },
1057
+ count: function(children) {
1058
+ var n = 0;
1059
+ mapChildren(children, function() {
1060
+ n++;
1061
+ });
1062
+ return n;
1063
+ },
1064
+ toArray: function(children) {
1065
+ return mapChildren(children, function(child) {
1066
+ return child;
1067
+ }) || [];
1068
+ },
1069
+ only: function(children) {
1070
+ if (!isValidElement(children))
1071
+ throw Error(
1072
+ "React.Children.only expected to receive a single React element child."
1073
+ );
1074
+ return children;
1075
+ }
1076
+ };
1077
+ exports.Activity = REACT_ACTIVITY_TYPE;
1078
+ exports.Children = fnName;
1079
+ exports.Component = Component;
1080
+ exports.Fragment = REACT_FRAGMENT_TYPE;
1081
+ exports.Profiler = REACT_PROFILER_TYPE;
1082
+ exports.PureComponent = PureComponent;
1083
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
1084
+ exports.Suspense = REACT_SUSPENSE_TYPE;
1085
+ exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
1086
+ exports.__COMPILER_RUNTIME = deprecatedAPIs;
1087
+ exports.act = function(callback) {
1088
+ var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
1089
+ actScopeDepth++;
1090
+ var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
1091
+ try {
1092
+ var result = callback();
1093
+ } catch (error) {
1094
+ ReactSharedInternals.thrownErrors.push(error);
1095
+ }
1096
+ if (0 < ReactSharedInternals.thrownErrors.length)
1097
+ throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
1098
+ if (null !== result && "object" === typeof result && "function" === typeof result.then) {
1099
+ var thenable = result;
1100
+ queueSeveralMicrotasks(function() {
1101
+ didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
1102
+ "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 () => ...);"
1103
+ ));
1104
+ });
1105
+ return {
1106
+ then: function(resolve, reject) {
1107
+ didAwaitActCall = true;
1108
+ thenable.then(
1109
+ function(returnValue) {
1110
+ popActScope(prevActQueue, prevActScopeDepth);
1111
+ if (0 === prevActScopeDepth) {
1112
+ try {
1113
+ flushActQueue(queue), enqueueTask(function() {
1114
+ return recursivelyFlushAsyncActWork(
1115
+ returnValue,
1116
+ resolve,
1117
+ reject
1118
+ );
1119
+ });
1120
+ } catch (error$0) {
1121
+ ReactSharedInternals.thrownErrors.push(error$0);
1122
+ }
1123
+ if (0 < ReactSharedInternals.thrownErrors.length) {
1124
+ var _thrownError = aggregateErrors(
1125
+ ReactSharedInternals.thrownErrors
1126
+ );
1127
+ ReactSharedInternals.thrownErrors.length = 0;
1128
+ reject(_thrownError);
1129
+ }
1130
+ } else resolve(returnValue);
1131
+ },
1132
+ function(error) {
1133
+ popActScope(prevActQueue, prevActScopeDepth);
1134
+ 0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
1135
+ ReactSharedInternals.thrownErrors
1136
+ ), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
1137
+ }
1138
+ );
1139
+ }
1140
+ };
1141
+ }
1142
+ var returnValue$jscomp$0 = result;
1143
+ popActScope(prevActQueue, prevActScopeDepth);
1144
+ 0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
1145
+ didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
1146
+ "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(() => ...)"
1147
+ ));
1148
+ }), ReactSharedInternals.actQueue = null);
1149
+ if (0 < ReactSharedInternals.thrownErrors.length)
1150
+ throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
1151
+ return {
1152
+ then: function(resolve, reject) {
1153
+ didAwaitActCall = true;
1154
+ 0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
1155
+ return recursivelyFlushAsyncActWork(
1156
+ returnValue$jscomp$0,
1157
+ resolve,
1158
+ reject
1159
+ );
1160
+ })) : resolve(returnValue$jscomp$0);
1161
+ }
1162
+ };
1163
+ };
1164
+ exports.cache = function(fn) {
1165
+ return function() {
1166
+ return fn.apply(null, arguments);
1167
+ };
1168
+ };
1169
+ exports.cacheSignal = function() {
1170
+ return null;
1171
+ };
1172
+ exports.captureOwnerStack = function() {
1173
+ var getCurrentStack = ReactSharedInternals.getCurrentStack;
1174
+ return null === getCurrentStack ? null : getCurrentStack();
1175
+ };
1176
+ exports.cloneElement = function(element, config, children) {
1177
+ if (null === element || void 0 === element)
1178
+ throw Error(
1179
+ "The argument must be a React element, but you passed " + element + "."
1180
+ );
1181
+ var props = assign({}, element.props), key = element.key, owner = element._owner;
1182
+ if (null != config) {
1183
+ var JSCompiler_inline_result;
1184
+ a: {
1185
+ if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
1186
+ config,
1187
+ "ref"
1188
+ ).get) && JSCompiler_inline_result.isReactWarning) {
1189
+ JSCompiler_inline_result = false;
1190
+ break a;
1191
+ }
1192
+ JSCompiler_inline_result = void 0 !== config.ref;
1193
+ }
1194
+ JSCompiler_inline_result && (owner = getOwner());
1195
+ hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
1196
+ for (propName in config)
1197
+ !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
1198
+ }
1199
+ var propName = arguments.length - 2;
1200
+ if (1 === propName) props.children = children;
1201
+ else if (1 < propName) {
1202
+ JSCompiler_inline_result = Array(propName);
1203
+ for (var i = 0; i < propName; i++)
1204
+ JSCompiler_inline_result[i] = arguments[i + 2];
1205
+ props.children = JSCompiler_inline_result;
1206
+ }
1207
+ props = ReactElement(
1208
+ element.type,
1209
+ key,
1210
+ props,
1211
+ owner,
1212
+ element._debugStack,
1213
+ element._debugTask
1214
+ );
1215
+ for (key = 2; key < arguments.length; key++)
1216
+ validateChildKeys(arguments[key]);
1217
+ return props;
1218
+ };
1219
+ exports.createContext = function(defaultValue) {
1220
+ defaultValue = {
1221
+ $$typeof: REACT_CONTEXT_TYPE,
1222
+ _currentValue: defaultValue,
1223
+ _currentValue2: defaultValue,
1224
+ _threadCount: 0,
1225
+ Provider: null,
1226
+ Consumer: null
1227
+ };
1228
+ defaultValue.Provider = defaultValue;
1229
+ defaultValue.Consumer = {
1230
+ $$typeof: REACT_CONSUMER_TYPE,
1231
+ _context: defaultValue
1232
+ };
1233
+ defaultValue._currentRenderer = null;
1234
+ defaultValue._currentRenderer2 = null;
1235
+ return defaultValue;
1236
+ };
1237
+ exports.createElement = function(type, config, children) {
1238
+ for (var i = 2; i < arguments.length; i++)
1239
+ validateChildKeys(arguments[i]);
1240
+ i = {};
1241
+ var key = null;
1242
+ if (null != config)
1243
+ for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
1244
+ "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"
1245
+ )), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config)
1246
+ hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
1247
+ var childrenLength = arguments.length - 2;
1248
+ if (1 === childrenLength) i.children = children;
1249
+ else if (1 < childrenLength) {
1250
+ for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
1251
+ childArray[_i] = arguments[_i + 2];
1252
+ Object.freeze && Object.freeze(childArray);
1253
+ i.children = childArray;
1254
+ }
1255
+ if (type && type.defaultProps)
1256
+ for (propName in childrenLength = type.defaultProps, childrenLength)
1257
+ void 0 === i[propName] && (i[propName] = childrenLength[propName]);
1258
+ key && defineKeyPropWarningGetter(
1259
+ i,
1260
+ "function" === typeof type ? type.displayName || type.name || "Unknown" : type
1261
+ );
1262
+ var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1263
+ return ReactElement(
1264
+ type,
1265
+ key,
1266
+ i,
1267
+ getOwner(),
1268
+ propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1269
+ propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1270
+ );
1271
+ };
1272
+ exports.createRef = function() {
1273
+ var refObject = { current: null };
1274
+ Object.seal(refObject);
1275
+ return refObject;
1276
+ };
1277
+ exports.forwardRef = function(render) {
1278
+ null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
1279
+ "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
1280
+ ) : "function" !== typeof render ? console.error(
1281
+ "forwardRef requires a render function but was given %s.",
1282
+ null === render ? "null" : typeof render
1283
+ ) : 0 !== render.length && 2 !== render.length && console.error(
1284
+ "forwardRef render functions accept exactly two parameters: props and ref. %s",
1285
+ 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
1286
+ );
1287
+ null != render && null != render.defaultProps && console.error(
1288
+ "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
1289
+ );
1290
+ var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
1291
+ Object.defineProperty(elementType, "displayName", {
1292
+ enumerable: false,
1293
+ configurable: true,
1294
+ get: function() {
1295
+ return ownName;
1296
+ },
1297
+ set: function(name) {
1298
+ ownName = name;
1299
+ render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
1300
+ }
1301
+ });
1302
+ return elementType;
1303
+ };
1304
+ exports.isValidElement = isValidElement;
1305
+ exports.lazy = function(ctor) {
1306
+ ctor = { _status: -1, _result: ctor };
1307
+ var lazyType = {
1308
+ $$typeof: REACT_LAZY_TYPE,
1309
+ _payload: ctor,
1310
+ _init: lazyInitializer
1311
+ }, ioInfo = {
1312
+ name: "lazy",
1313
+ start: -1,
1314
+ end: -1,
1315
+ value: null,
1316
+ owner: null,
1317
+ debugStack: Error("react-stack-top-frame"),
1318
+ debugTask: console.createTask ? console.createTask("lazy()") : null
1319
+ };
1320
+ ctor._ioInfo = ioInfo;
1321
+ lazyType._debugInfo = [{ awaited: ioInfo }];
1322
+ return lazyType;
1323
+ };
1324
+ exports.memo = function(type, compare) {
1325
+ null == type && console.error(
1326
+ "memo: The first argument must be a component. Instead received: %s",
1327
+ null === type ? "null" : typeof type
1328
+ );
1329
+ compare = {
1330
+ $$typeof: REACT_MEMO_TYPE,
1331
+ type,
1332
+ compare: void 0 === compare ? null : compare
1333
+ };
1334
+ var ownName;
1335
+ Object.defineProperty(compare, "displayName", {
1336
+ enumerable: false,
1337
+ configurable: true,
1338
+ get: function() {
1339
+ return ownName;
1340
+ },
1341
+ set: function(name) {
1342
+ ownName = name;
1343
+ type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
1344
+ }
1345
+ });
1346
+ return compare;
1347
+ };
1348
+ exports.startTransition = function(scope) {
1349
+ var prevTransition = ReactSharedInternals.T, currentTransition = {};
1350
+ currentTransition._updatedFibers = /* @__PURE__ */ new Set();
1351
+ ReactSharedInternals.T = currentTransition;
1352
+ try {
1353
+ var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
1354
+ null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
1355
+ "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
1356
+ } catch (error) {
1357
+ reportGlobalError(error);
1358
+ } finally {
1359
+ null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
1360
+ "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."
1361
+ )), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
1362
+ "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."
1363
+ ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
1364
+ }
1365
+ };
1366
+ exports.unstable_useCacheRefresh = function() {
1367
+ return resolveDispatcher().useCacheRefresh();
1368
+ };
1369
+ exports.use = function(usable) {
1370
+ return resolveDispatcher().use(usable);
1371
+ };
1372
+ exports.useActionState = function(action, initialState, permalink) {
1373
+ return resolveDispatcher().useActionState(
1374
+ action,
1375
+ initialState,
1376
+ permalink
1377
+ );
1378
+ };
1379
+ exports.useCallback = function(callback, deps) {
1380
+ return resolveDispatcher().useCallback(callback, deps);
1381
+ };
1382
+ exports.useContext = function(Context) {
1383
+ var dispatcher = resolveDispatcher();
1384
+ Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
1385
+ "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
1386
+ );
1387
+ return dispatcher.useContext(Context);
1388
+ };
1389
+ exports.useDebugValue = function(value, formatterFn) {
1390
+ return resolveDispatcher().useDebugValue(value, formatterFn);
1391
+ };
1392
+ exports.useDeferredValue = function(value, initialValue) {
1393
+ return resolveDispatcher().useDeferredValue(value, initialValue);
1394
+ };
1395
+ exports.useEffect = function(create, deps) {
1396
+ null == create && console.warn(
1397
+ "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1398
+ );
1399
+ return resolveDispatcher().useEffect(create, deps);
1400
+ };
1401
+ exports.useEffectEvent = function(callback) {
1402
+ return resolveDispatcher().useEffectEvent(callback);
1403
+ };
1404
+ exports.useId = function() {
1405
+ return resolveDispatcher().useId();
1406
+ };
1407
+ exports.useImperativeHandle = function(ref, create, deps) {
1408
+ return resolveDispatcher().useImperativeHandle(ref, create, deps);
1409
+ };
1410
+ exports.useInsertionEffect = function(create, deps) {
1411
+ null == create && console.warn(
1412
+ "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1413
+ );
1414
+ return resolveDispatcher().useInsertionEffect(create, deps);
1415
+ };
1416
+ exports.useLayoutEffect = function(create, deps) {
1417
+ null == create && console.warn(
1418
+ "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1419
+ );
1420
+ return resolveDispatcher().useLayoutEffect(create, deps);
1421
+ };
1422
+ exports.useMemo = function(create, deps) {
1423
+ return resolveDispatcher().useMemo(create, deps);
1424
+ };
1425
+ exports.useOptimistic = function(passthrough, reducer) {
1426
+ return resolveDispatcher().useOptimistic(passthrough, reducer);
1427
+ };
1428
+ exports.useReducer = function(reducer, initialArg, init) {
1429
+ return resolveDispatcher().useReducer(reducer, initialArg, init);
1430
+ };
1431
+ exports.useRef = function(initialValue) {
1432
+ return resolveDispatcher().useRef(initialValue);
1433
+ };
1434
+ exports.useState = function(initialState) {
1435
+ return resolveDispatcher().useState(initialState);
1436
+ };
1437
+ exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
1438
+ return resolveDispatcher().useSyncExternalStore(
1439
+ subscribe,
1440
+ getSnapshot,
1441
+ getServerSnapshot
1442
+ );
1443
+ };
1444
+ exports.useTransition = function() {
1445
+ return resolveDispatcher().useTransition();
1446
+ };
1447
+ exports.version = "19.2.4";
1448
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1449
+ })();
1450
+ }
1451
+ });
1452
+
1453
+ // node_modules/react/index.js
1454
+ var require_react = __commonJS({
1455
+ "node_modules/react/index.js"(exports, module) {
1456
+ "use strict";
1457
+ if (process.env.NODE_ENV === "production") {
1458
+ module.exports = require_react_production();
1459
+ } else {
1460
+ module.exports = require_react_development();
1461
+ }
1462
+ }
1463
+ });
1464
+
1465
+ // src/react.ts
1466
+ var react_exports = {};
1467
+ __export(react_exports, {
1468
+ useIsWindows11: () => useIsWindows11,
1469
+ useOS: () => useOS
1470
+ });
1471
+ var import_react = __toESM(require_react());
1472
+
1473
+ // src/index.ts
1474
+ var cachedIsIOS;
1475
+ var cachedIsMacOS;
1476
+ var cachedIsAndroid;
1477
+ var cachedIsWindows;
1478
+ var cachedIsLinux;
1479
+ var cachedIsChromeOS;
1480
+ function getUADataPlatform() {
1481
+ if (typeof navigator === "undefined") return null;
1482
+ const uaData = navigator.userAgentData;
1483
+ if (uaData && typeof uaData.platform === "string") {
1484
+ return uaData.platform.toLowerCase();
1485
+ }
1486
+ return null;
1487
+ }
1488
+ function getNodePlatform() {
1489
+ if (typeof navigator !== "undefined") return null;
1490
+ if (typeof process === "undefined" || typeof process.platform !== "string") return null;
1491
+ return process.platform;
1492
+ }
1493
+ function detectIsIOS() {
1494
+ if (typeof cachedIsIOS === "boolean") return cachedIsIOS;
1495
+ if (typeof navigator === "undefined" || typeof window === "undefined") {
1496
+ return cachedIsIOS = false;
1497
+ }
1498
+ const platform = getUADataPlatform();
1499
+ if (platform !== null) {
1500
+ cachedIsIOS = platform === "ios";
1501
+ return cachedIsIOS;
1502
+ }
1503
+ const isClassicIOSUA = /iPhone|iPod/.test(navigator.userAgent);
1504
+ const isIPadUA = /iPad/.test(navigator.userAgent);
1505
+ const isIPadOS = /Macintosh/.test(navigator.userAgent) && typeof navigator.maxTouchPoints === "number" && navigator.maxTouchPoints > 1;
1506
+ cachedIsIOS = isClassicIOSUA || isIPadUA || isIPadOS;
1507
+ return cachedIsIOS;
1508
+ }
1509
+ function detectIsMacOS() {
1510
+ if (typeof cachedIsMacOS === "boolean") return cachedIsMacOS;
1511
+ const nodePlatform = getNodePlatform();
1512
+ if (nodePlatform !== null) {
1513
+ return cachedIsMacOS = nodePlatform === "darwin";
1514
+ }
1515
+ if (typeof navigator === "undefined") return cachedIsMacOS = false;
1516
+ const platform = getUADataPlatform();
1517
+ if (platform !== null) {
1518
+ cachedIsMacOS = platform === "macos";
1519
+ return cachedIsMacOS;
1520
+ }
1521
+ const isMacUA = /Macintosh|MacIntel|MacPPC|Mac68K/.test(navigator.userAgent);
1522
+ cachedIsMacOS = isMacUA && !detectIsIOS();
1523
+ return cachedIsMacOS;
1524
+ }
1525
+ function detectIsAndroid() {
1526
+ if (typeof cachedIsAndroid === "boolean") return cachedIsAndroid;
1527
+ const nodePlatform = getNodePlatform();
1528
+ if (nodePlatform !== null) {
1529
+ return cachedIsAndroid = nodePlatform === "android";
1530
+ }
1531
+ if (typeof navigator === "undefined") return cachedIsAndroid = false;
1532
+ const platform = getUADataPlatform();
1533
+ if (platform !== null) {
1534
+ cachedIsAndroid = platform === "android";
1535
+ return cachedIsAndroid;
1536
+ }
1537
+ cachedIsAndroid = /Android/.test(navigator.userAgent);
1538
+ return cachedIsAndroid;
1539
+ }
1540
+ function detectIsWindows() {
1541
+ if (typeof cachedIsWindows === "boolean") return cachedIsWindows;
1542
+ const nodePlatform = getNodePlatform();
1543
+ if (nodePlatform !== null) {
1544
+ return cachedIsWindows = nodePlatform === "win32";
1545
+ }
1546
+ if (typeof navigator === "undefined") return cachedIsWindows = false;
1547
+ const platform = getUADataPlatform();
1548
+ if (platform !== null) {
1549
+ cachedIsWindows = platform === "windows";
1550
+ return cachedIsWindows;
1551
+ }
1552
+ cachedIsWindows = /Win32|Win64|Windows|WinCE/.test(navigator.userAgent);
1553
+ return cachedIsWindows;
1554
+ }
1555
+ function detectIsChromeOS() {
1556
+ if (typeof cachedIsChromeOS === "boolean") return cachedIsChromeOS;
1557
+ if (typeof navigator === "undefined") return cachedIsChromeOS = false;
1558
+ const platform = getUADataPlatform();
1559
+ if (platform !== null) {
1560
+ cachedIsChromeOS = platform === "chrome os" || platform === "chromeos";
1561
+ return cachedIsChromeOS;
1562
+ }
1563
+ cachedIsChromeOS = /CrOS/.test(navigator.userAgent);
1564
+ return cachedIsChromeOS;
1565
+ }
1566
+ function detectIsLinux() {
1567
+ if (typeof cachedIsLinux === "boolean") return cachedIsLinux;
1568
+ const nodePlatform = getNodePlatform();
1569
+ if (nodePlatform !== null) {
1570
+ return cachedIsLinux = nodePlatform === "linux";
1571
+ }
1572
+ if (typeof navigator === "undefined") return cachedIsLinux = false;
1573
+ const platform = getUADataPlatform();
1574
+ if (platform !== null) {
1575
+ cachedIsLinux = platform === "linux";
1576
+ return cachedIsLinux;
1577
+ }
1578
+ cachedIsLinux = /Linux/.test(navigator.userAgent) && !detectIsAndroid() && !detectIsChromeOS();
1579
+ return cachedIsLinux;
1580
+ }
1581
+ async function detectIsWindows11() {
1582
+ var _a, _b;
1583
+ if (!detectIsWindows()) return false;
1584
+ if (typeof navigator === "undefined" && typeof process !== "undefined") {
1585
+ try {
1586
+ const { release } = await import("os");
1587
+ const buildNumber = parseInt((_a = release().split(".")[2]) != null ? _a : "0", 10);
1588
+ return buildNumber >= 22e3;
1589
+ } catch (e) {
1590
+ return false;
1591
+ }
1592
+ }
1593
+ try {
1594
+ const nav = navigator;
1595
+ if (!((_b = nav.userAgentData) == null ? void 0 : _b.getHighEntropyValues)) return false;
1596
+ const { platformVersion } = await nav.userAgentData.getHighEntropyValues([
1597
+ "platformVersion"
1598
+ ]);
1599
+ if (!platformVersion) return false;
1600
+ const majorVersion = parseInt(platformVersion.split(".")[0], 10);
1601
+ return majorVersion >= 13;
1602
+ } catch (e) {
1603
+ return false;
1604
+ }
1605
+ }
1606
+ function getOS() {
1607
+ if (detectIsIOS()) return "ios";
1608
+ if (detectIsAndroid()) return "android";
1609
+ if (detectIsChromeOS()) return "chromeos";
1610
+ if (detectIsLinux()) return "linux";
1611
+ if (detectIsMacOS()) return "macos";
1612
+ if (detectIsWindows()) return "windows";
1613
+ return "unknown";
1614
+ }
1615
+
1616
+ // src/react.ts
1617
+ function useOS() {
1618
+ const [os] = (0, import_react.useState)(() => getOS());
1619
+ return os;
1620
+ }
1621
+ function useIsWindows11() {
1622
+ const [isWin11, setIsWin11] = (0, import_react.useState)(null);
1623
+ (0, import_react.useEffect)(() => {
1624
+ detectIsWindows11().then(setIsWin11);
1625
+ }, []);
1626
+ return isWin11;
1627
+ }
1628
+ return __toCommonJS(react_exports);
1629
+ })();
1630
+ /*! Bundled license information:
1631
+
1632
+ react/cjs/react.production.js:
1633
+ (**
1634
+ * @license React
1635
+ * react.production.js
1636
+ *
1637
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1638
+ *
1639
+ * This source code is licensed under the MIT license found in the
1640
+ * LICENSE file in the root directory of this source tree.
1641
+ *)
1642
+
1643
+ react/cjs/react.development.js:
1644
+ (**
1645
+ * @license React
1646
+ * react.development.js
1647
+ *
1648
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1649
+ *
1650
+ * This source code is licensed under the MIT license found in the
1651
+ * LICENSE file in the root directory of this source tree.
1652
+ *)
1653
+ */