@tscircuit/common 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs DELETED
@@ -1,2785 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
- var __pow = Math.pow;
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
- var __spreadValues = (a, b) => {
12
- for (var prop in b || (b = {}))
13
- if (__hasOwnProp.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- }
20
- return a;
21
- };
22
- var __objRest = (source, exclude) => {
23
- var target = {};
24
- for (var prop in source)
25
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
26
- target[prop] = source[prop];
27
- if (source != null && __getOwnPropSymbols)
28
- for (var prop of __getOwnPropSymbols(source)) {
29
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
30
- target[prop] = source[prop];
31
- }
32
- return target;
33
- };
34
- var __commonJS = (cb, mod) => function __require() {
35
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
36
- };
37
- var __copyProps = (to, from, except, desc) => {
38
- if (from && typeof from === "object" || typeof from === "function") {
39
- for (let key of __getOwnPropNames(from))
40
- if (!__hasOwnProp.call(to, key) && key !== except)
41
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
42
- }
43
- return to;
44
- };
45
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
46
- // If the importer is in node compatibility mode or this is not an ESM
47
- // file that has been converted to a CommonJS file using a Babel-
48
- // compatible transform (i.e. "__esModule" has not been set), then set
49
- // "default" to the CommonJS "module.exports" for node compatibility.
50
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
51
- mod
52
- ));
53
-
54
- // node_modules/react/cjs/react-jsx-runtime.production.js
55
- var require_react_jsx_runtime_production = __commonJS({
56
- "node_modules/react/cjs/react-jsx-runtime.production.js"(exports) {
57
- "use strict";
58
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element");
59
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
60
- function jsxProd(type, config, maybeKey) {
61
- var key = null;
62
- void 0 !== maybeKey && (key = "" + maybeKey);
63
- void 0 !== config.key && (key = "" + config.key);
64
- if ("key" in config) {
65
- maybeKey = {};
66
- for (var propName in config)
67
- "key" !== propName && (maybeKey[propName] = config[propName]);
68
- } else maybeKey = config;
69
- config = maybeKey.ref;
70
- return {
71
- $$typeof: REACT_ELEMENT_TYPE,
72
- type,
73
- key,
74
- ref: void 0 !== config ? config : null,
75
- props: maybeKey
76
- };
77
- }
78
- exports.Fragment = REACT_FRAGMENT_TYPE;
79
- exports.jsx = jsxProd;
80
- exports.jsxs = jsxProd;
81
- }
82
- });
83
-
84
- // node_modules/react/cjs/react.production.js
85
- var require_react_production = __commonJS({
86
- "node_modules/react/cjs/react.production.js"(exports) {
87
- "use strict";
88
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element");
89
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
90
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
91
- var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
92
- var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
93
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
94
- var REACT_CONTEXT_TYPE = Symbol.for("react.context");
95
- var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
96
- var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
97
- var REACT_MEMO_TYPE = Symbol.for("react.memo");
98
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
99
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
100
- function getIteratorFn(maybeIterable) {
101
- if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
102
- maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
103
- return "function" === typeof maybeIterable ? maybeIterable : null;
104
- }
105
- var ReactNoopUpdateQueue = {
106
- isMounted: function() {
107
- return false;
108
- },
109
- enqueueForceUpdate: function() {
110
- },
111
- enqueueReplaceState: function() {
112
- },
113
- enqueueSetState: function() {
114
- }
115
- };
116
- var assign = Object.assign;
117
- var emptyObject = {};
118
- function Component(props, context, updater) {
119
- this.props = props;
120
- this.context = context;
121
- this.refs = emptyObject;
122
- this.updater = updater || ReactNoopUpdateQueue;
123
- }
124
- Component.prototype.isReactComponent = {};
125
- Component.prototype.setState = function(partialState, callback) {
126
- if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
127
- throw Error(
128
- "takes an object of state variables to update or a function which returns an object of state variables."
129
- );
130
- this.updater.enqueueSetState(this, partialState, callback, "setState");
131
- };
132
- Component.prototype.forceUpdate = function(callback) {
133
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
134
- };
135
- function ComponentDummy() {
136
- }
137
- ComponentDummy.prototype = Component.prototype;
138
- function PureComponent(props, context, updater) {
139
- this.props = props;
140
- this.context = context;
141
- this.refs = emptyObject;
142
- this.updater = updater || ReactNoopUpdateQueue;
143
- }
144
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
145
- pureComponentPrototype.constructor = PureComponent;
146
- assign(pureComponentPrototype, Component.prototype);
147
- pureComponentPrototype.isPureReactComponent = true;
148
- var isArrayImpl = Array.isArray;
149
- var ReactSharedInternals = { H: null, A: null, T: null, S: null, V: null };
150
- var hasOwnProperty = Object.prototype.hasOwnProperty;
151
- function ReactElement2(type, key, self, source, owner, props) {
152
- self = props.ref;
153
- return {
154
- $$typeof: REACT_ELEMENT_TYPE,
155
- type,
156
- key,
157
- ref: void 0 !== self ? self : null,
158
- props
159
- };
160
- }
161
- function cloneAndReplaceKey(oldElement, newKey) {
162
- return ReactElement2(
163
- oldElement.type,
164
- newKey,
165
- void 0,
166
- void 0,
167
- void 0,
168
- oldElement.props
169
- );
170
- }
171
- function isValidElement(object) {
172
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
173
- }
174
- function escape(key) {
175
- var escaperLookup = { "=": "=0", ":": "=2" };
176
- return "$" + key.replace(/[=:]/g, function(match) {
177
- return escaperLookup[match];
178
- });
179
- }
180
- var userProvidedKeyEscapeRegex = /\/+/g;
181
- function getElementKey(element, index) {
182
- return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36);
183
- }
184
- function noop$1() {
185
- }
186
- function resolveThenable(thenable) {
187
- switch (thenable.status) {
188
- case "fulfilled":
189
- return thenable.value;
190
- case "rejected":
191
- throw thenable.reason;
192
- default:
193
- switch ("string" === typeof thenable.status ? thenable.then(noop$1, noop$1) : (thenable.status = "pending", thenable.then(
194
- function(fulfilledValue) {
195
- "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
196
- },
197
- function(error) {
198
- "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
199
- }
200
- )), thenable.status) {
201
- case "fulfilled":
202
- return thenable.value;
203
- case "rejected":
204
- throw thenable.reason;
205
- }
206
- }
207
- throw thenable;
208
- }
209
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
210
- var type = typeof children;
211
- if ("undefined" === type || "boolean" === type) children = null;
212
- var invokeCallback = false;
213
- if (null === children) invokeCallback = true;
214
- else
215
- switch (type) {
216
- case "bigint":
217
- case "string":
218
- case "number":
219
- invokeCallback = true;
220
- break;
221
- case "object":
222
- switch (children.$$typeof) {
223
- case REACT_ELEMENT_TYPE:
224
- case REACT_PORTAL_TYPE:
225
- invokeCallback = true;
226
- break;
227
- case REACT_LAZY_TYPE:
228
- return invokeCallback = children._init, mapIntoArray(
229
- invokeCallback(children._payload),
230
- array,
231
- escapedPrefix,
232
- nameSoFar,
233
- callback
234
- );
235
- }
236
- }
237
- if (invokeCallback)
238
- 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) {
239
- return c;
240
- })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(
241
- callback,
242
- escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(
243
- userProvidedKeyEscapeRegex,
244
- "$&/"
245
- ) + "/") + invokeCallback
246
- )), array.push(callback)), 1;
247
- invokeCallback = 0;
248
- var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
249
- if (isArrayImpl(children))
250
- for (var i = 0; i < children.length; i++)
251
- nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
252
- nameSoFar,
253
- array,
254
- escapedPrefix,
255
- type,
256
- callback
257
- );
258
- else if (i = getIteratorFn(children), "function" === typeof i)
259
- for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
260
- nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
261
- nameSoFar,
262
- array,
263
- escapedPrefix,
264
- type,
265
- callback
266
- );
267
- else if ("object" === type) {
268
- if ("function" === typeof children.then)
269
- return mapIntoArray(
270
- resolveThenable(children),
271
- array,
272
- escapedPrefix,
273
- nameSoFar,
274
- callback
275
- );
276
- array = String(children);
277
- throw Error(
278
- "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."
279
- );
280
- }
281
- return invokeCallback;
282
- }
283
- function mapChildren(children, func, context) {
284
- if (null == children) return children;
285
- var result = [], count = 0;
286
- mapIntoArray(children, result, "", "", function(child) {
287
- return func.call(context, child, count++);
288
- });
289
- return result;
290
- }
291
- function lazyInitializer(payload) {
292
- if (-1 === payload._status) {
293
- var ctor = payload._result;
294
- ctor = ctor();
295
- ctor.then(
296
- function(moduleObject) {
297
- if (0 === payload._status || -1 === payload._status)
298
- payload._status = 1, payload._result = moduleObject;
299
- },
300
- function(error) {
301
- if (0 === payload._status || -1 === payload._status)
302
- payload._status = 2, payload._result = error;
303
- }
304
- );
305
- -1 === payload._status && (payload._status = 0, payload._result = ctor);
306
- }
307
- if (1 === payload._status) return payload._result.default;
308
- throw payload._result;
309
- }
310
- var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
311
- if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
312
- var event = new window.ErrorEvent("error", {
313
- bubbles: true,
314
- cancelable: true,
315
- message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
316
- error
317
- });
318
- if (!window.dispatchEvent(event)) return;
319
- } else if ("object" === typeof process && "function" === typeof process.emit) {
320
- process.emit("uncaughtException", error);
321
- return;
322
- }
323
- console.error(error);
324
- };
325
- function noop() {
326
- }
327
- exports.Children = {
328
- map: mapChildren,
329
- forEach: function(children, forEachFunc, forEachContext) {
330
- mapChildren(
331
- children,
332
- function() {
333
- forEachFunc.apply(this, arguments);
334
- },
335
- forEachContext
336
- );
337
- },
338
- count: function(children) {
339
- var n = 0;
340
- mapChildren(children, function() {
341
- n++;
342
- });
343
- return n;
344
- },
345
- toArray: function(children) {
346
- return mapChildren(children, function(child) {
347
- return child;
348
- }) || [];
349
- },
350
- only: function(children) {
351
- if (!isValidElement(children))
352
- throw Error(
353
- "React.Children.only expected to receive a single React element child."
354
- );
355
- return children;
356
- }
357
- };
358
- exports.Component = Component;
359
- exports.Fragment = REACT_FRAGMENT_TYPE;
360
- exports.Profiler = REACT_PROFILER_TYPE;
361
- exports.PureComponent = PureComponent;
362
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
363
- exports.Suspense = REACT_SUSPENSE_TYPE;
364
- exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
365
- exports.__COMPILER_RUNTIME = {
366
- __proto__: null,
367
- c: function(size) {
368
- return ReactSharedInternals.H.useMemoCache(size);
369
- }
370
- };
371
- exports.cache = function(fn) {
372
- return function() {
373
- return fn.apply(null, arguments);
374
- };
375
- };
376
- exports.cloneElement = function(element, config, children) {
377
- if (null === element || void 0 === element)
378
- throw Error(
379
- "The argument must be a React element, but you passed " + element + "."
380
- );
381
- var props = assign({}, element.props), key = element.key, owner = void 0;
382
- if (null != config)
383
- for (propName in void 0 !== config.ref && (owner = void 0), void 0 !== config.key && (key = "" + config.key), config)
384
- !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
385
- var propName = arguments.length - 2;
386
- if (1 === propName) props.children = children;
387
- else if (1 < propName) {
388
- for (var childArray = Array(propName), i = 0; i < propName; i++)
389
- childArray[i] = arguments[i + 2];
390
- props.children = childArray;
391
- }
392
- return ReactElement2(element.type, key, void 0, void 0, owner, props);
393
- };
394
- exports.createContext = function(defaultValue) {
395
- defaultValue = {
396
- $$typeof: REACT_CONTEXT_TYPE,
397
- _currentValue: defaultValue,
398
- _currentValue2: defaultValue,
399
- _threadCount: 0,
400
- Provider: null,
401
- Consumer: null
402
- };
403
- defaultValue.Provider = defaultValue;
404
- defaultValue.Consumer = {
405
- $$typeof: REACT_CONSUMER_TYPE,
406
- _context: defaultValue
407
- };
408
- return defaultValue;
409
- };
410
- exports.createElement = function(type, config, children) {
411
- var propName, props = {}, key = null;
412
- if (null != config)
413
- for (propName in void 0 !== config.key && (key = "" + config.key), config)
414
- hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]);
415
- var childrenLength = arguments.length - 2;
416
- if (1 === childrenLength) props.children = children;
417
- else if (1 < childrenLength) {
418
- for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
419
- childArray[i] = arguments[i + 2];
420
- props.children = childArray;
421
- }
422
- if (type && type.defaultProps)
423
- for (propName in childrenLength = type.defaultProps, childrenLength)
424
- void 0 === props[propName] && (props[propName] = childrenLength[propName]);
425
- return ReactElement2(type, key, void 0, void 0, null, props);
426
- };
427
- exports.createRef = function() {
428
- return { current: null };
429
- };
430
- exports.forwardRef = function(render) {
431
- return { $$typeof: REACT_FORWARD_REF_TYPE, render };
432
- };
433
- exports.isValidElement = isValidElement;
434
- exports.lazy = function(ctor) {
435
- return {
436
- $$typeof: REACT_LAZY_TYPE,
437
- _payload: { _status: -1, _result: ctor },
438
- _init: lazyInitializer
439
- };
440
- };
441
- exports.memo = function(type, compare) {
442
- return {
443
- $$typeof: REACT_MEMO_TYPE,
444
- type,
445
- compare: void 0 === compare ? null : compare
446
- };
447
- };
448
- exports.startTransition = function(scope) {
449
- var prevTransition = ReactSharedInternals.T, currentTransition = {};
450
- ReactSharedInternals.T = currentTransition;
451
- try {
452
- var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
453
- null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
454
- "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
455
- } catch (error) {
456
- reportGlobalError(error);
457
- } finally {
458
- ReactSharedInternals.T = prevTransition;
459
- }
460
- };
461
- exports.unstable_useCacheRefresh = function() {
462
- return ReactSharedInternals.H.useCacheRefresh();
463
- };
464
- exports.use = function(usable) {
465
- return ReactSharedInternals.H.use(usable);
466
- };
467
- exports.useActionState = function(action, initialState, permalink) {
468
- return ReactSharedInternals.H.useActionState(action, initialState, permalink);
469
- };
470
- exports.useCallback = function(callback, deps) {
471
- return ReactSharedInternals.H.useCallback(callback, deps);
472
- };
473
- exports.useContext = function(Context) {
474
- return ReactSharedInternals.H.useContext(Context);
475
- };
476
- exports.useDebugValue = function() {
477
- };
478
- exports.useDeferredValue = function(value, initialValue) {
479
- return ReactSharedInternals.H.useDeferredValue(value, initialValue);
480
- };
481
- exports.useEffect = function(create, createDeps, update) {
482
- var dispatcher = ReactSharedInternals.H;
483
- if ("function" === typeof update)
484
- throw Error(
485
- "useEffect CRUD overload is not enabled in this build of React."
486
- );
487
- return dispatcher.useEffect(create, createDeps);
488
- };
489
- exports.useId = function() {
490
- return ReactSharedInternals.H.useId();
491
- };
492
- exports.useImperativeHandle = function(ref, create, deps) {
493
- return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
494
- };
495
- exports.useInsertionEffect = function(create, deps) {
496
- return ReactSharedInternals.H.useInsertionEffect(create, deps);
497
- };
498
- exports.useLayoutEffect = function(create, deps) {
499
- return ReactSharedInternals.H.useLayoutEffect(create, deps);
500
- };
501
- exports.useMemo = function(create, deps) {
502
- return ReactSharedInternals.H.useMemo(create, deps);
503
- };
504
- exports.useOptimistic = function(passthrough, reducer) {
505
- return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
506
- };
507
- exports.useReducer = function(reducer, initialArg, init) {
508
- return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
509
- };
510
- exports.useRef = function(initialValue) {
511
- return ReactSharedInternals.H.useRef(initialValue);
512
- };
513
- exports.useState = function(initialState) {
514
- return ReactSharedInternals.H.useState(initialState);
515
- };
516
- exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
517
- return ReactSharedInternals.H.useSyncExternalStore(
518
- subscribe,
519
- getSnapshot,
520
- getServerSnapshot
521
- );
522
- };
523
- exports.useTransition = function() {
524
- return ReactSharedInternals.H.useTransition();
525
- };
526
- exports.version = "19.1.1";
527
- }
528
- });
529
-
530
- // node_modules/react/cjs/react.development.js
531
- var require_react_development = __commonJS({
532
- "node_modules/react/cjs/react.development.js"(exports, module) {
533
- "use strict";
534
- "production" !== process.env.NODE_ENV && (function() {
535
- function defineDeprecationWarning(methodName, info) {
536
- Object.defineProperty(Component.prototype, methodName, {
537
- get: function() {
538
- console.warn(
539
- "%s(...) is deprecated in plain JavaScript React classes. %s",
540
- info[0],
541
- info[1]
542
- );
543
- }
544
- });
545
- }
546
- function getIteratorFn(maybeIterable) {
547
- if (null === maybeIterable || "object" !== typeof maybeIterable)
548
- return null;
549
- maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
550
- return "function" === typeof maybeIterable ? maybeIterable : null;
551
- }
552
- function warnNoop(publicInstance, callerName) {
553
- publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
554
- var warningKey = publicInstance + "." + callerName;
555
- didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error(
556
- "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.",
557
- callerName,
558
- publicInstance
559
- ), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
560
- }
561
- function Component(props, context, updater) {
562
- this.props = props;
563
- this.context = context;
564
- this.refs = emptyObject;
565
- this.updater = updater || ReactNoopUpdateQueue;
566
- }
567
- function ComponentDummy() {
568
- }
569
- function PureComponent(props, context, updater) {
570
- this.props = props;
571
- this.context = context;
572
- this.refs = emptyObject;
573
- this.updater = updater || ReactNoopUpdateQueue;
574
- }
575
- function testStringCoercion(value) {
576
- return "" + value;
577
- }
578
- function checkKeyStringCoercion(value) {
579
- try {
580
- testStringCoercion(value);
581
- var JSCompiler_inline_result = false;
582
- } catch (e) {
583
- JSCompiler_inline_result = true;
584
- }
585
- if (JSCompiler_inline_result) {
586
- JSCompiler_inline_result = console;
587
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
588
- var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
589
- JSCompiler_temp_const.call(
590
- JSCompiler_inline_result,
591
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
592
- JSCompiler_inline_result$jscomp$0
593
- );
594
- return testStringCoercion(value);
595
- }
596
- }
597
- function getComponentNameFromType(type) {
598
- if (null == type) return null;
599
- if ("function" === typeof type)
600
- return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
601
- if ("string" === typeof type) return type;
602
- switch (type) {
603
- case REACT_FRAGMENT_TYPE:
604
- return "Fragment";
605
- case REACT_PROFILER_TYPE:
606
- return "Profiler";
607
- case REACT_STRICT_MODE_TYPE:
608
- return "StrictMode";
609
- case REACT_SUSPENSE_TYPE:
610
- return "Suspense";
611
- case REACT_SUSPENSE_LIST_TYPE:
612
- return "SuspenseList";
613
- case REACT_ACTIVITY_TYPE:
614
- return "Activity";
615
- }
616
- if ("object" === typeof type)
617
- switch ("number" === typeof type.tag && console.error(
618
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
619
- ), type.$$typeof) {
620
- case REACT_PORTAL_TYPE:
621
- return "Portal";
622
- case REACT_CONTEXT_TYPE:
623
- return (type.displayName || "Context") + ".Provider";
624
- case REACT_CONSUMER_TYPE:
625
- return (type._context.displayName || "Context") + ".Consumer";
626
- case REACT_FORWARD_REF_TYPE:
627
- var innerType = type.render;
628
- type = type.displayName;
629
- type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
630
- return type;
631
- case REACT_MEMO_TYPE:
632
- return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
633
- case REACT_LAZY_TYPE:
634
- innerType = type._payload;
635
- type = type._init;
636
- try {
637
- return getComponentNameFromType(type(innerType));
638
- } catch (x) {
639
- }
640
- }
641
- return null;
642
- }
643
- function getTaskName(type) {
644
- if (type === REACT_FRAGMENT_TYPE) return "<>";
645
- if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
646
- return "<...>";
647
- try {
648
- var name = getComponentNameFromType(type);
649
- return name ? "<" + name + ">" : "<...>";
650
- } catch (x) {
651
- return "<...>";
652
- }
653
- }
654
- function getOwner() {
655
- var dispatcher = ReactSharedInternals.A;
656
- return null === dispatcher ? null : dispatcher.getOwner();
657
- }
658
- function UnknownOwner() {
659
- return Error("react-stack-top-frame");
660
- }
661
- function hasValidKey(config) {
662
- if (hasOwnProperty.call(config, "key")) {
663
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
664
- if (getter && getter.isReactWarning) return false;
665
- }
666
- return void 0 !== config.key;
667
- }
668
- function defineKeyPropWarningGetter(props, displayName) {
669
- function warnAboutAccessingKey() {
670
- specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
671
- "%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)",
672
- displayName
673
- ));
674
- }
675
- warnAboutAccessingKey.isReactWarning = true;
676
- Object.defineProperty(props, "key", {
677
- get: warnAboutAccessingKey,
678
- configurable: true
679
- });
680
- }
681
- function elementRefGetterWithDeprecationWarning() {
682
- var componentName = getComponentNameFromType(this.type);
683
- didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
684
- "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."
685
- ));
686
- componentName = this.props.ref;
687
- return void 0 !== componentName ? componentName : null;
688
- }
689
- function ReactElement2(type, key, self, source, owner, props, debugStack, debugTask) {
690
- self = props.ref;
691
- type = {
692
- $$typeof: REACT_ELEMENT_TYPE,
693
- type,
694
- key,
695
- props,
696
- _owner: owner
697
- };
698
- null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", {
699
- enumerable: false,
700
- get: elementRefGetterWithDeprecationWarning
701
- }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
702
- type._store = {};
703
- Object.defineProperty(type._store, "validated", {
704
- configurable: false,
705
- enumerable: false,
706
- writable: true,
707
- value: 0
708
- });
709
- Object.defineProperty(type, "_debugInfo", {
710
- configurable: false,
711
- enumerable: false,
712
- writable: true,
713
- value: null
714
- });
715
- Object.defineProperty(type, "_debugStack", {
716
- configurable: false,
717
- enumerable: false,
718
- writable: true,
719
- value: debugStack
720
- });
721
- Object.defineProperty(type, "_debugTask", {
722
- configurable: false,
723
- enumerable: false,
724
- writable: true,
725
- value: debugTask
726
- });
727
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
728
- return type;
729
- }
730
- function cloneAndReplaceKey(oldElement, newKey) {
731
- newKey = ReactElement2(
732
- oldElement.type,
733
- newKey,
734
- void 0,
735
- void 0,
736
- oldElement._owner,
737
- oldElement.props,
738
- oldElement._debugStack,
739
- oldElement._debugTask
740
- );
741
- oldElement._store && (newKey._store.validated = oldElement._store.validated);
742
- return newKey;
743
- }
744
- function isValidElement(object) {
745
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
746
- }
747
- function escape(key) {
748
- var escaperLookup = { "=": "=0", ":": "=2" };
749
- return "$" + key.replace(/[=:]/g, function(match) {
750
- return escaperLookup[match];
751
- });
752
- }
753
- function getElementKey(element, index) {
754
- return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
755
- }
756
- function noop$1() {
757
- }
758
- function resolveThenable(thenable) {
759
- switch (thenable.status) {
760
- case "fulfilled":
761
- return thenable.value;
762
- case "rejected":
763
- throw thenable.reason;
764
- default:
765
- switch ("string" === typeof thenable.status ? thenable.then(noop$1, noop$1) : (thenable.status = "pending", thenable.then(
766
- function(fulfilledValue) {
767
- "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
768
- },
769
- function(error) {
770
- "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
771
- }
772
- )), thenable.status) {
773
- case "fulfilled":
774
- return thenable.value;
775
- case "rejected":
776
- throw thenable.reason;
777
- }
778
- }
779
- throw thenable;
780
- }
781
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
782
- var type = typeof children;
783
- if ("undefined" === type || "boolean" === type) children = null;
784
- var invokeCallback = false;
785
- if (null === children) invokeCallback = true;
786
- else
787
- switch (type) {
788
- case "bigint":
789
- case "string":
790
- case "number":
791
- invokeCallback = true;
792
- break;
793
- case "object":
794
- switch (children.$$typeof) {
795
- case REACT_ELEMENT_TYPE:
796
- case REACT_PORTAL_TYPE:
797
- invokeCallback = true;
798
- break;
799
- case REACT_LAZY_TYPE:
800
- return invokeCallback = children._init, mapIntoArray(
801
- invokeCallback(children._payload),
802
- array,
803
- escapedPrefix,
804
- nameSoFar,
805
- callback
806
- );
807
- }
808
- }
809
- if (invokeCallback) {
810
- invokeCallback = children;
811
- callback = callback(invokeCallback);
812
- var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
813
- isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
814
- return c;
815
- })) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(
816
- callback,
817
- escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(
818
- userProvidedKeyEscapeRegex,
819
- "$&/"
820
- ) + "/") + childKey
821
- ), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
822
- return 1;
823
- }
824
- invokeCallback = 0;
825
- childKey = "" === nameSoFar ? "." : nameSoFar + ":";
826
- if (isArrayImpl(children))
827
- for (var i = 0; i < children.length; i++)
828
- nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
829
- nameSoFar,
830
- array,
831
- escapedPrefix,
832
- type,
833
- callback
834
- );
835
- else if (i = getIteratorFn(children), "function" === typeof i)
836
- for (i === children.entries && (didWarnAboutMaps || console.warn(
837
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
838
- ), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
839
- nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
840
- nameSoFar,
841
- array,
842
- escapedPrefix,
843
- type,
844
- callback
845
- );
846
- else if ("object" === type) {
847
- if ("function" === typeof children.then)
848
- return mapIntoArray(
849
- resolveThenable(children),
850
- array,
851
- escapedPrefix,
852
- nameSoFar,
853
- callback
854
- );
855
- array = String(children);
856
- throw Error(
857
- "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."
858
- );
859
- }
860
- return invokeCallback;
861
- }
862
- function mapChildren(children, func, context) {
863
- if (null == children) return children;
864
- var result = [], count = 0;
865
- mapIntoArray(children, result, "", "", function(child) {
866
- return func.call(context, child, count++);
867
- });
868
- return result;
869
- }
870
- function lazyInitializer(payload) {
871
- if (-1 === payload._status) {
872
- var ctor = payload._result;
873
- ctor = ctor();
874
- ctor.then(
875
- function(moduleObject) {
876
- if (0 === payload._status || -1 === payload._status)
877
- payload._status = 1, payload._result = moduleObject;
878
- },
879
- function(error) {
880
- if (0 === payload._status || -1 === payload._status)
881
- payload._status = 2, payload._result = error;
882
- }
883
- );
884
- -1 === payload._status && (payload._status = 0, payload._result = ctor);
885
- }
886
- if (1 === payload._status)
887
- return ctor = payload._result, void 0 === ctor && console.error(
888
- "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?",
889
- ctor
890
- ), "default" in ctor || console.error(
891
- "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
892
- ctor
893
- ), ctor.default;
894
- throw payload._result;
895
- }
896
- function resolveDispatcher() {
897
- var dispatcher = ReactSharedInternals.H;
898
- null === dispatcher && console.error(
899
- "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."
900
- );
901
- return dispatcher;
902
- }
903
- function noop() {
904
- }
905
- function enqueueTask(task) {
906
- if (null === enqueueTaskImpl)
907
- try {
908
- var requireString = ("require" + Math.random()).slice(0, 7);
909
- enqueueTaskImpl = (module && module[requireString]).call(
910
- module,
911
- "timers"
912
- ).setImmediate;
913
- } catch (_err) {
914
- enqueueTaskImpl = function(callback) {
915
- false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error(
916
- "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."
917
- ));
918
- var channel = new MessageChannel();
919
- channel.port1.onmessage = callback;
920
- channel.port2.postMessage(void 0);
921
- };
922
- }
923
- return enqueueTaskImpl(task);
924
- }
925
- function aggregateErrors(errors) {
926
- return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
927
- }
928
- function popActScope(prevActQueue, prevActScopeDepth) {
929
- prevActScopeDepth !== actScopeDepth - 1 && console.error(
930
- "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
931
- );
932
- actScopeDepth = prevActScopeDepth;
933
- }
934
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
935
- var queue = ReactSharedInternals.actQueue;
936
- if (null !== queue)
937
- if (0 !== queue.length)
938
- try {
939
- flushActQueue(queue);
940
- enqueueTask(function() {
941
- return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
942
- });
943
- return;
944
- } catch (error) {
945
- ReactSharedInternals.thrownErrors.push(error);
946
- }
947
- else ReactSharedInternals.actQueue = null;
948
- 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
949
- }
950
- function flushActQueue(queue) {
951
- if (!isFlushing) {
952
- isFlushing = true;
953
- var i = 0;
954
- try {
955
- for (; i < queue.length; i++) {
956
- var callback = queue[i];
957
- do {
958
- ReactSharedInternals.didUsePromise = false;
959
- var continuation = callback(false);
960
- if (null !== continuation) {
961
- if (ReactSharedInternals.didUsePromise) {
962
- queue[i] = callback;
963
- queue.splice(0, i);
964
- return;
965
- }
966
- callback = continuation;
967
- } else break;
968
- } while (1);
969
- }
970
- queue.length = 0;
971
- } catch (error) {
972
- queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
973
- } finally {
974
- isFlushing = false;
975
- }
976
- }
977
- }
978
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
979
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
980
- Symbol.for("react.provider");
981
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
982
- isMounted: function() {
983
- return false;
984
- },
985
- enqueueForceUpdate: function(publicInstance) {
986
- warnNoop(publicInstance, "forceUpdate");
987
- },
988
- enqueueReplaceState: function(publicInstance) {
989
- warnNoop(publicInstance, "replaceState");
990
- },
991
- enqueueSetState: function(publicInstance) {
992
- warnNoop(publicInstance, "setState");
993
- }
994
- }, assign = Object.assign, emptyObject = {};
995
- Object.freeze(emptyObject);
996
- Component.prototype.isReactComponent = {};
997
- Component.prototype.setState = function(partialState, callback) {
998
- if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
999
- throw Error(
1000
- "takes an object of state variables to update or a function which returns an object of state variables."
1001
- );
1002
- this.updater.enqueueSetState(this, partialState, callback, "setState");
1003
- };
1004
- Component.prototype.forceUpdate = function(callback) {
1005
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
1006
- };
1007
- var deprecatedAPIs = {
1008
- isMounted: [
1009
- "isMounted",
1010
- "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
1011
- ],
1012
- replaceState: [
1013
- "replaceState",
1014
- "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
1015
- ]
1016
- }, fnName;
1017
- for (fnName in deprecatedAPIs)
1018
- deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
1019
- ComponentDummy.prototype = Component.prototype;
1020
- deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
1021
- deprecatedAPIs.constructor = PureComponent;
1022
- assign(deprecatedAPIs, Component.prototype);
1023
- deprecatedAPIs.isPureReactComponent = true;
1024
- var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = {
1025
- H: null,
1026
- A: null,
1027
- T: null,
1028
- S: null,
1029
- V: null,
1030
- actQueue: null,
1031
- isBatchingLegacy: false,
1032
- didScheduleLegacyUpdate: false,
1033
- didUsePromise: false,
1034
- thrownErrors: [],
1035
- getCurrentStack: null,
1036
- recentlyCreatedOwnerStacks: 0
1037
- }, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
1038
- return null;
1039
- };
1040
- deprecatedAPIs = {
1041
- react_stack_bottom_frame: function(callStackForError) {
1042
- return callStackForError();
1043
- }
1044
- };
1045
- var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
1046
- var didWarnAboutElementRef = {};
1047
- var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
1048
- deprecatedAPIs,
1049
- UnknownOwner
1050
- )();
1051
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
1052
- var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
1053
- if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
1054
- var event = new window.ErrorEvent("error", {
1055
- bubbles: true,
1056
- cancelable: true,
1057
- message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
1058
- error
1059
- });
1060
- if (!window.dispatchEvent(event)) return;
1061
- } else if ("object" === typeof process && "function" === typeof process.emit) {
1062
- process.emit("uncaughtException", error);
1063
- return;
1064
- }
1065
- console.error(error);
1066
- }, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
1067
- queueMicrotask(function() {
1068
- return queueMicrotask(callback);
1069
- });
1070
- } : enqueueTask;
1071
- deprecatedAPIs = Object.freeze({
1072
- __proto__: null,
1073
- c: function(size) {
1074
- return resolveDispatcher().useMemoCache(size);
1075
- }
1076
- });
1077
- exports.Children = {
1078
- map: mapChildren,
1079
- forEach: function(children, forEachFunc, forEachContext) {
1080
- mapChildren(
1081
- children,
1082
- function() {
1083
- forEachFunc.apply(this, arguments);
1084
- },
1085
- forEachContext
1086
- );
1087
- },
1088
- count: function(children) {
1089
- var n = 0;
1090
- mapChildren(children, function() {
1091
- n++;
1092
- });
1093
- return n;
1094
- },
1095
- toArray: function(children) {
1096
- return mapChildren(children, function(child) {
1097
- return child;
1098
- }) || [];
1099
- },
1100
- only: function(children) {
1101
- if (!isValidElement(children))
1102
- throw Error(
1103
- "React.Children.only expected to receive a single React element child."
1104
- );
1105
- return children;
1106
- }
1107
- };
1108
- exports.Component = Component;
1109
- exports.Fragment = REACT_FRAGMENT_TYPE;
1110
- exports.Profiler = REACT_PROFILER_TYPE;
1111
- exports.PureComponent = PureComponent;
1112
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
1113
- exports.Suspense = REACT_SUSPENSE_TYPE;
1114
- exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
1115
- exports.__COMPILER_RUNTIME = deprecatedAPIs;
1116
- exports.act = function(callback) {
1117
- var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
1118
- actScopeDepth++;
1119
- var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
1120
- try {
1121
- var result = callback();
1122
- } catch (error) {
1123
- ReactSharedInternals.thrownErrors.push(error);
1124
- }
1125
- if (0 < ReactSharedInternals.thrownErrors.length)
1126
- throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
1127
- if (null !== result && "object" === typeof result && "function" === typeof result.then) {
1128
- var thenable = result;
1129
- queueSeveralMicrotasks(function() {
1130
- didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
1131
- "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 () => ...);"
1132
- ));
1133
- });
1134
- return {
1135
- then: function(resolve, reject) {
1136
- didAwaitActCall = true;
1137
- thenable.then(
1138
- function(returnValue) {
1139
- popActScope(prevActQueue, prevActScopeDepth);
1140
- if (0 === prevActScopeDepth) {
1141
- try {
1142
- flushActQueue(queue), enqueueTask(function() {
1143
- return recursivelyFlushAsyncActWork(
1144
- returnValue,
1145
- resolve,
1146
- reject
1147
- );
1148
- });
1149
- } catch (error$0) {
1150
- ReactSharedInternals.thrownErrors.push(error$0);
1151
- }
1152
- if (0 < ReactSharedInternals.thrownErrors.length) {
1153
- var _thrownError = aggregateErrors(
1154
- ReactSharedInternals.thrownErrors
1155
- );
1156
- ReactSharedInternals.thrownErrors.length = 0;
1157
- reject(_thrownError);
1158
- }
1159
- } else resolve(returnValue);
1160
- },
1161
- function(error) {
1162
- popActScope(prevActQueue, prevActScopeDepth);
1163
- 0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
1164
- ReactSharedInternals.thrownErrors
1165
- ), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
1166
- }
1167
- );
1168
- }
1169
- };
1170
- }
1171
- var returnValue$jscomp$0 = result;
1172
- popActScope(prevActQueue, prevActScopeDepth);
1173
- 0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
1174
- didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
1175
- "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(() => ...)"
1176
- ));
1177
- }), ReactSharedInternals.actQueue = null);
1178
- if (0 < ReactSharedInternals.thrownErrors.length)
1179
- throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
1180
- return {
1181
- then: function(resolve, reject) {
1182
- didAwaitActCall = true;
1183
- 0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
1184
- return recursivelyFlushAsyncActWork(
1185
- returnValue$jscomp$0,
1186
- resolve,
1187
- reject
1188
- );
1189
- })) : resolve(returnValue$jscomp$0);
1190
- }
1191
- };
1192
- };
1193
- exports.cache = function(fn) {
1194
- return function() {
1195
- return fn.apply(null, arguments);
1196
- };
1197
- };
1198
- exports.captureOwnerStack = function() {
1199
- var getCurrentStack = ReactSharedInternals.getCurrentStack;
1200
- return null === getCurrentStack ? null : getCurrentStack();
1201
- };
1202
- exports.cloneElement = function(element, config, children) {
1203
- if (null === element || void 0 === element)
1204
- throw Error(
1205
- "The argument must be a React element, but you passed " + element + "."
1206
- );
1207
- var props = assign({}, element.props), key = element.key, owner = element._owner;
1208
- if (null != config) {
1209
- var JSCompiler_inline_result;
1210
- a: {
1211
- if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
1212
- config,
1213
- "ref"
1214
- ).get) && JSCompiler_inline_result.isReactWarning) {
1215
- JSCompiler_inline_result = false;
1216
- break a;
1217
- }
1218
- JSCompiler_inline_result = void 0 !== config.ref;
1219
- }
1220
- JSCompiler_inline_result && (owner = getOwner());
1221
- hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
1222
- for (propName in config)
1223
- !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
1224
- }
1225
- var propName = arguments.length - 2;
1226
- if (1 === propName) props.children = children;
1227
- else if (1 < propName) {
1228
- JSCompiler_inline_result = Array(propName);
1229
- for (var i = 0; i < propName; i++)
1230
- JSCompiler_inline_result[i] = arguments[i + 2];
1231
- props.children = JSCompiler_inline_result;
1232
- }
1233
- props = ReactElement2(
1234
- element.type,
1235
- key,
1236
- void 0,
1237
- void 0,
1238
- owner,
1239
- props,
1240
- element._debugStack,
1241
- element._debugTask
1242
- );
1243
- for (key = 2; key < arguments.length; key++)
1244
- owner = arguments[key], isValidElement(owner) && owner._store && (owner._store.validated = 1);
1245
- return props;
1246
- };
1247
- exports.createContext = function(defaultValue) {
1248
- defaultValue = {
1249
- $$typeof: REACT_CONTEXT_TYPE,
1250
- _currentValue: defaultValue,
1251
- _currentValue2: defaultValue,
1252
- _threadCount: 0,
1253
- Provider: null,
1254
- Consumer: null
1255
- };
1256
- defaultValue.Provider = defaultValue;
1257
- defaultValue.Consumer = {
1258
- $$typeof: REACT_CONSUMER_TYPE,
1259
- _context: defaultValue
1260
- };
1261
- defaultValue._currentRenderer = null;
1262
- defaultValue._currentRenderer2 = null;
1263
- return defaultValue;
1264
- };
1265
- exports.createElement = function(type, config, children) {
1266
- for (var i = 2; i < arguments.length; i++) {
1267
- var node = arguments[i];
1268
- isValidElement(node) && node._store && (node._store.validated = 1);
1269
- }
1270
- i = {};
1271
- node = null;
1272
- if (null != config)
1273
- for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
1274
- "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"
1275
- )), hasValidKey(config) && (checkKeyStringCoercion(config.key), node = "" + config.key), config)
1276
- hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
1277
- var childrenLength = arguments.length - 2;
1278
- if (1 === childrenLength) i.children = children;
1279
- else if (1 < childrenLength) {
1280
- for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
1281
- childArray[_i] = arguments[_i + 2];
1282
- Object.freeze && Object.freeze(childArray);
1283
- i.children = childArray;
1284
- }
1285
- if (type && type.defaultProps)
1286
- for (propName in childrenLength = type.defaultProps, childrenLength)
1287
- void 0 === i[propName] && (i[propName] = childrenLength[propName]);
1288
- node && defineKeyPropWarningGetter(
1289
- i,
1290
- "function" === typeof type ? type.displayName || type.name || "Unknown" : type
1291
- );
1292
- var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1293
- return ReactElement2(
1294
- type,
1295
- node,
1296
- void 0,
1297
- void 0,
1298
- getOwner(),
1299
- i,
1300
- propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1301
- propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1302
- );
1303
- };
1304
- exports.createRef = function() {
1305
- var refObject = { current: null };
1306
- Object.seal(refObject);
1307
- return refObject;
1308
- };
1309
- exports.forwardRef = function(render) {
1310
- null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
1311
- "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
1312
- ) : "function" !== typeof render ? console.error(
1313
- "forwardRef requires a render function but was given %s.",
1314
- null === render ? "null" : typeof render
1315
- ) : 0 !== render.length && 2 !== render.length && console.error(
1316
- "forwardRef render functions accept exactly two parameters: props and ref. %s",
1317
- 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
1318
- );
1319
- null != render && null != render.defaultProps && console.error(
1320
- "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
1321
- );
1322
- var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
1323
- Object.defineProperty(elementType, "displayName", {
1324
- enumerable: false,
1325
- configurable: true,
1326
- get: function() {
1327
- return ownName;
1328
- },
1329
- set: function(name) {
1330
- ownName = name;
1331
- render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
1332
- }
1333
- });
1334
- return elementType;
1335
- };
1336
- exports.isValidElement = isValidElement;
1337
- exports.lazy = function(ctor) {
1338
- return {
1339
- $$typeof: REACT_LAZY_TYPE,
1340
- _payload: { _status: -1, _result: ctor },
1341
- _init: lazyInitializer
1342
- };
1343
- };
1344
- exports.memo = function(type, compare) {
1345
- null == type && console.error(
1346
- "memo: The first argument must be a component. Instead received: %s",
1347
- null === type ? "null" : typeof type
1348
- );
1349
- compare = {
1350
- $$typeof: REACT_MEMO_TYPE,
1351
- type,
1352
- compare: void 0 === compare ? null : compare
1353
- };
1354
- var ownName;
1355
- Object.defineProperty(compare, "displayName", {
1356
- enumerable: false,
1357
- configurable: true,
1358
- get: function() {
1359
- return ownName;
1360
- },
1361
- set: function(name) {
1362
- ownName = name;
1363
- type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
1364
- }
1365
- });
1366
- return compare;
1367
- };
1368
- exports.startTransition = function(scope) {
1369
- var prevTransition = ReactSharedInternals.T, currentTransition = {};
1370
- ReactSharedInternals.T = currentTransition;
1371
- currentTransition._updatedFibers = /* @__PURE__ */ new Set();
1372
- try {
1373
- var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
1374
- null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
1375
- "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
1376
- } catch (error) {
1377
- reportGlobalError(error);
1378
- } finally {
1379
- null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
1380
- "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."
1381
- )), ReactSharedInternals.T = prevTransition;
1382
- }
1383
- };
1384
- exports.unstable_useCacheRefresh = function() {
1385
- return resolveDispatcher().useCacheRefresh();
1386
- };
1387
- exports.use = function(usable) {
1388
- return resolveDispatcher().use(usable);
1389
- };
1390
- exports.useActionState = function(action, initialState, permalink) {
1391
- return resolveDispatcher().useActionState(
1392
- action,
1393
- initialState,
1394
- permalink
1395
- );
1396
- };
1397
- exports.useCallback = function(callback, deps) {
1398
- return resolveDispatcher().useCallback(callback, deps);
1399
- };
1400
- exports.useContext = function(Context) {
1401
- var dispatcher = resolveDispatcher();
1402
- Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
1403
- "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
1404
- );
1405
- return dispatcher.useContext(Context);
1406
- };
1407
- exports.useDebugValue = function(value, formatterFn) {
1408
- return resolveDispatcher().useDebugValue(value, formatterFn);
1409
- };
1410
- exports.useDeferredValue = function(value, initialValue) {
1411
- return resolveDispatcher().useDeferredValue(value, initialValue);
1412
- };
1413
- exports.useEffect = function(create, createDeps, update) {
1414
- null == create && console.warn(
1415
- "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1416
- );
1417
- var dispatcher = resolveDispatcher();
1418
- if ("function" === typeof update)
1419
- throw Error(
1420
- "useEffect CRUD overload is not enabled in this build of React."
1421
- );
1422
- return dispatcher.useEffect(create, createDeps);
1423
- };
1424
- exports.useId = function() {
1425
- return resolveDispatcher().useId();
1426
- };
1427
- exports.useImperativeHandle = function(ref, create, deps) {
1428
- return resolveDispatcher().useImperativeHandle(ref, create, deps);
1429
- };
1430
- exports.useInsertionEffect = function(create, deps) {
1431
- null == create && console.warn(
1432
- "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1433
- );
1434
- return resolveDispatcher().useInsertionEffect(create, deps);
1435
- };
1436
- exports.useLayoutEffect = function(create, deps) {
1437
- null == create && console.warn(
1438
- "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1439
- );
1440
- return resolveDispatcher().useLayoutEffect(create, deps);
1441
- };
1442
- exports.useMemo = function(create, deps) {
1443
- return resolveDispatcher().useMemo(create, deps);
1444
- };
1445
- exports.useOptimistic = function(passthrough, reducer) {
1446
- return resolveDispatcher().useOptimistic(passthrough, reducer);
1447
- };
1448
- exports.useReducer = function(reducer, initialArg, init) {
1449
- return resolveDispatcher().useReducer(reducer, initialArg, init);
1450
- };
1451
- exports.useRef = function(initialValue) {
1452
- return resolveDispatcher().useRef(initialValue);
1453
- };
1454
- exports.useState = function(initialState) {
1455
- return resolveDispatcher().useState(initialState);
1456
- };
1457
- exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
1458
- return resolveDispatcher().useSyncExternalStore(
1459
- subscribe,
1460
- getSnapshot,
1461
- getServerSnapshot
1462
- );
1463
- };
1464
- exports.useTransition = function() {
1465
- return resolveDispatcher().useTransition();
1466
- };
1467
- exports.version = "19.1.1";
1468
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1469
- })();
1470
- }
1471
- });
1472
-
1473
- // node_modules/react/index.js
1474
- var require_react = __commonJS({
1475
- "node_modules/react/index.js"(exports, module) {
1476
- "use strict";
1477
- if (process.env.NODE_ENV === "production") {
1478
- module.exports = require_react_production();
1479
- } else {
1480
- module.exports = require_react_development();
1481
- }
1482
- }
1483
- });
1484
-
1485
- // node_modules/react/cjs/react-jsx-runtime.development.js
1486
- var require_react_jsx_runtime_development = __commonJS({
1487
- "node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
1488
- "use strict";
1489
- "production" !== process.env.NODE_ENV && (function() {
1490
- function getComponentNameFromType(type) {
1491
- if (null == type) return null;
1492
- if ("function" === typeof type)
1493
- return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
1494
- if ("string" === typeof type) return type;
1495
- switch (type) {
1496
- case REACT_FRAGMENT_TYPE:
1497
- return "Fragment";
1498
- case REACT_PROFILER_TYPE:
1499
- return "Profiler";
1500
- case REACT_STRICT_MODE_TYPE:
1501
- return "StrictMode";
1502
- case REACT_SUSPENSE_TYPE:
1503
- return "Suspense";
1504
- case REACT_SUSPENSE_LIST_TYPE:
1505
- return "SuspenseList";
1506
- case REACT_ACTIVITY_TYPE:
1507
- return "Activity";
1508
- }
1509
- if ("object" === typeof type)
1510
- switch ("number" === typeof type.tag && console.error(
1511
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
1512
- ), type.$$typeof) {
1513
- case REACT_PORTAL_TYPE:
1514
- return "Portal";
1515
- case REACT_CONTEXT_TYPE:
1516
- return (type.displayName || "Context") + ".Provider";
1517
- case REACT_CONSUMER_TYPE:
1518
- return (type._context.displayName || "Context") + ".Consumer";
1519
- case REACT_FORWARD_REF_TYPE:
1520
- var innerType = type.render;
1521
- type = type.displayName;
1522
- type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
1523
- return type;
1524
- case REACT_MEMO_TYPE:
1525
- return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
1526
- case REACT_LAZY_TYPE:
1527
- innerType = type._payload;
1528
- type = type._init;
1529
- try {
1530
- return getComponentNameFromType(type(innerType));
1531
- } catch (x) {
1532
- }
1533
- }
1534
- return null;
1535
- }
1536
- function testStringCoercion(value) {
1537
- return "" + value;
1538
- }
1539
- function checkKeyStringCoercion(value) {
1540
- try {
1541
- testStringCoercion(value);
1542
- var JSCompiler_inline_result = false;
1543
- } catch (e) {
1544
- JSCompiler_inline_result = true;
1545
- }
1546
- if (JSCompiler_inline_result) {
1547
- JSCompiler_inline_result = console;
1548
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
1549
- var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
1550
- JSCompiler_temp_const.call(
1551
- JSCompiler_inline_result,
1552
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
1553
- JSCompiler_inline_result$jscomp$0
1554
- );
1555
- return testStringCoercion(value);
1556
- }
1557
- }
1558
- function getTaskName(type) {
1559
- if (type === REACT_FRAGMENT_TYPE) return "<>";
1560
- if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
1561
- return "<...>";
1562
- try {
1563
- var name = getComponentNameFromType(type);
1564
- return name ? "<" + name + ">" : "<...>";
1565
- } catch (x) {
1566
- return "<...>";
1567
- }
1568
- }
1569
- function getOwner() {
1570
- var dispatcher = ReactSharedInternals.A;
1571
- return null === dispatcher ? null : dispatcher.getOwner();
1572
- }
1573
- function UnknownOwner() {
1574
- return Error("react-stack-top-frame");
1575
- }
1576
- function hasValidKey(config) {
1577
- if (hasOwnProperty.call(config, "key")) {
1578
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
1579
- if (getter && getter.isReactWarning) return false;
1580
- }
1581
- return void 0 !== config.key;
1582
- }
1583
- function defineKeyPropWarningGetter(props, displayName) {
1584
- function warnAboutAccessingKey() {
1585
- specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
1586
- "%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)",
1587
- displayName
1588
- ));
1589
- }
1590
- warnAboutAccessingKey.isReactWarning = true;
1591
- Object.defineProperty(props, "key", {
1592
- get: warnAboutAccessingKey,
1593
- configurable: true
1594
- });
1595
- }
1596
- function elementRefGetterWithDeprecationWarning() {
1597
- var componentName = getComponentNameFromType(this.type);
1598
- didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
1599
- "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."
1600
- ));
1601
- componentName = this.props.ref;
1602
- return void 0 !== componentName ? componentName : null;
1603
- }
1604
- function ReactElement2(type, key, self, source, owner, props, debugStack, debugTask) {
1605
- self = props.ref;
1606
- type = {
1607
- $$typeof: REACT_ELEMENT_TYPE,
1608
- type,
1609
- key,
1610
- props,
1611
- _owner: owner
1612
- };
1613
- null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", {
1614
- enumerable: false,
1615
- get: elementRefGetterWithDeprecationWarning
1616
- }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
1617
- type._store = {};
1618
- Object.defineProperty(type._store, "validated", {
1619
- configurable: false,
1620
- enumerable: false,
1621
- writable: true,
1622
- value: 0
1623
- });
1624
- Object.defineProperty(type, "_debugInfo", {
1625
- configurable: false,
1626
- enumerable: false,
1627
- writable: true,
1628
- value: null
1629
- });
1630
- Object.defineProperty(type, "_debugStack", {
1631
- configurable: false,
1632
- enumerable: false,
1633
- writable: true,
1634
- value: debugStack
1635
- });
1636
- Object.defineProperty(type, "_debugTask", {
1637
- configurable: false,
1638
- enumerable: false,
1639
- writable: true,
1640
- value: debugTask
1641
- });
1642
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
1643
- return type;
1644
- }
1645
- function jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self, debugStack, debugTask) {
1646
- var children = config.children;
1647
- if (void 0 !== children)
1648
- if (isStaticChildren)
1649
- if (isArrayImpl(children)) {
1650
- for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
1651
- validateChildKeys(children[isStaticChildren]);
1652
- Object.freeze && Object.freeze(children);
1653
- } else
1654
- console.error(
1655
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
1656
- );
1657
- else validateChildKeys(children);
1658
- if (hasOwnProperty.call(config, "key")) {
1659
- children = getComponentNameFromType(type);
1660
- var keys = Object.keys(config).filter(function(k) {
1661
- return "key" !== k;
1662
- });
1663
- isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
1664
- didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
1665
- 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
1666
- isStaticChildren,
1667
- children,
1668
- keys,
1669
- children
1670
- ), didWarnAboutKeySpread[children + isStaticChildren] = true);
1671
- }
1672
- children = null;
1673
- void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
1674
- hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
1675
- if ("key" in config) {
1676
- maybeKey = {};
1677
- for (var propName in config)
1678
- "key" !== propName && (maybeKey[propName] = config[propName]);
1679
- } else maybeKey = config;
1680
- children && defineKeyPropWarningGetter(
1681
- maybeKey,
1682
- "function" === typeof type ? type.displayName || type.name || "Unknown" : type
1683
- );
1684
- return ReactElement2(
1685
- type,
1686
- children,
1687
- self,
1688
- source,
1689
- getOwner(),
1690
- maybeKey,
1691
- debugStack,
1692
- debugTask
1693
- );
1694
- }
1695
- function validateChildKeys(node) {
1696
- "object" === typeof node && null !== node && node.$$typeof === REACT_ELEMENT_TYPE && node._store && (node._store.validated = 1);
1697
- }
1698
- var React2 = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
1699
- Symbol.for("react.provider");
1700
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
1701
- return null;
1702
- };
1703
- React2 = {
1704
- react_stack_bottom_frame: function(callStackForError) {
1705
- return callStackForError();
1706
- }
1707
- };
1708
- var specialPropKeyWarningShown;
1709
- var didWarnAboutElementRef = {};
1710
- var unknownOwnerDebugStack = React2.react_stack_bottom_frame.bind(
1711
- React2,
1712
- UnknownOwner
1713
- )();
1714
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
1715
- var didWarnAboutKeySpread = {};
1716
- exports.Fragment = REACT_FRAGMENT_TYPE;
1717
- exports.jsx = function(type, config, maybeKey, source, self) {
1718
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1719
- return jsxDEVImpl(
1720
- type,
1721
- config,
1722
- maybeKey,
1723
- false,
1724
- source,
1725
- self,
1726
- trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1727
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1728
- );
1729
- };
1730
- exports.jsxs = function(type, config, maybeKey, source, self) {
1731
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1732
- return jsxDEVImpl(
1733
- type,
1734
- config,
1735
- maybeKey,
1736
- true,
1737
- source,
1738
- self,
1739
- trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1740
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1741
- );
1742
- };
1743
- })();
1744
- }
1745
- });
1746
-
1747
- // node_modules/react/jsx-runtime.js
1748
- var require_jsx_runtime = __commonJS({
1749
- "node_modules/react/jsx-runtime.js"(exports, module) {
1750
- "use strict";
1751
- if (process.env.NODE_ENV === "production") {
1752
- module.exports = require_react_jsx_runtime_production();
1753
- } else {
1754
- module.exports = require_react_jsx_runtime_development();
1755
- }
1756
- }
1757
- });
1758
-
1759
- // Common Boards/ArduinoShield/ArduinoShieldFootprint.tsx
1760
- var import_jsx_runtime = __toESM(require_jsx_runtime());
1761
- var ArduinoShieldFootprint = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("footprint", { children: [
1762
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1763
- "platedhole",
1764
- {
1765
- holeDiameter: "1.016mm",
1766
- portHints: ["pin1"],
1767
- pcbX: 31.75,
1768
- pcbY: -23.99,
1769
- outerDiameter: "1.88mm",
1770
- shape: "circle"
1771
- }
1772
- ),
1773
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1774
- "platedhole",
1775
- {
1776
- holeDiameter: "1.016mm",
1777
- portHints: ["pin2"],
1778
- pcbX: 29.19,
1779
- pcbY: -23.99,
1780
- outerDiameter: "1.88mm",
1781
- shape: "circle"
1782
- }
1783
- ),
1784
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1785
- "platedhole",
1786
- {
1787
- holeDiameter: "1.016mm",
1788
- portHints: ["pin3"],
1789
- pcbX: 26.63,
1790
- pcbY: -23.99,
1791
- outerDiameter: "1.88mm",
1792
- shape: "circle"
1793
- }
1794
- ),
1795
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1796
- "platedhole",
1797
- {
1798
- holeDiameter: "1.016mm",
1799
- portHints: ["pin4"],
1800
- pcbX: 24.07,
1801
- pcbY: -23.99,
1802
- outerDiameter: "1.88mm",
1803
- shape: "circle"
1804
- }
1805
- ),
1806
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1807
- "platedhole",
1808
- {
1809
- holeDiameter: "1.016mm",
1810
- portHints: ["pin5"],
1811
- pcbX: 21.51,
1812
- pcbY: -23.99,
1813
- outerDiameter: "1.88mm",
1814
- shape: "circle"
1815
- }
1816
- ),
1817
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1818
- "platedhole",
1819
- {
1820
- holeDiameter: "1.016mm",
1821
- portHints: ["pin6"],
1822
- pcbX: 18.95,
1823
- pcbY: -23.99,
1824
- outerDiameter: "1.88mm",
1825
- shape: "circle"
1826
- }
1827
- ),
1828
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "A0", fontSize: 0.8, pcbX: 31.75, pcbY: -21.99 }),
1829
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "A1", fontSize: 0.8, pcbX: 29.19, pcbY: -21.99 }),
1830
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "A2", fontSize: 0.8, pcbX: 26.63, pcbY: -21.99 }),
1831
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "A3", fontSize: 0.8, pcbX: 24.07, pcbY: -21.99 }),
1832
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "A4", fontSize: 0.8, pcbX: 21.51, pcbY: -21.99 }),
1833
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "A5", fontSize: 0.8, pcbX: 18.95, pcbY: -21.99 }),
1834
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1835
- "platedhole",
1836
- {
1837
- holeDiameter: "1.016mm",
1838
- portHints: ["pin7"],
1839
- pcbX: 13.91,
1840
- pcbY: -23.99,
1841
- outerDiameter: "1.88mm",
1842
- shape: "circle"
1843
- }
1844
- ),
1845
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1846
- "platedhole",
1847
- {
1848
- holeDiameter: "1.016mm",
1849
- portHints: ["pin8"],
1850
- pcbX: 11.35,
1851
- pcbY: -23.99,
1852
- outerDiameter: "1.88mm",
1853
- shape: "circle"
1854
- }
1855
- ),
1856
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1857
- "platedhole",
1858
- {
1859
- holeDiameter: "1.016mm",
1860
- portHints: ["pin9"],
1861
- pcbX: 8.79,
1862
- pcbY: -23.99,
1863
- outerDiameter: "1.88mm",
1864
- shape: "circle"
1865
- }
1866
- ),
1867
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1868
- "platedhole",
1869
- {
1870
- holeDiameter: "1.016mm",
1871
- portHints: ["pin10"],
1872
- pcbX: 6.23,
1873
- pcbY: -23.99,
1874
- outerDiameter: "1.88mm",
1875
- shape: "circle"
1876
- }
1877
- ),
1878
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1879
- "platedhole",
1880
- {
1881
- holeDiameter: "1.016mm",
1882
- portHints: ["pin11"],
1883
- pcbX: 3.67,
1884
- pcbY: -23.99,
1885
- outerDiameter: "1.88mm",
1886
- shape: "circle"
1887
- }
1888
- ),
1889
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1890
- "platedhole",
1891
- {
1892
- holeDiameter: "1.016mm",
1893
- portHints: ["pin12"],
1894
- pcbX: 1.11,
1895
- pcbY: -23.99,
1896
- outerDiameter: "1.88mm",
1897
- shape: "circle"
1898
- }
1899
- ),
1900
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1901
- "platedhole",
1902
- {
1903
- holeDiameter: "1.016mm",
1904
- portHints: ["pin13"],
1905
- pcbX: -1.11,
1906
- pcbY: -23.99,
1907
- outerDiameter: "1.88mm",
1908
- shape: "circle"
1909
- }
1910
- ),
1911
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1912
- "platedhole",
1913
- {
1914
- holeDiameter: "1.016mm",
1915
- portHints: ["pin14"],
1916
- pcbX: -3.67,
1917
- pcbY: -23.99,
1918
- outerDiameter: "1.88mm",
1919
- shape: "circle"
1920
- }
1921
- ),
1922
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "VIN", fontSize: 0.8, pcbX: 13.91, pcbY: -21.99 }),
1923
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "GND1", fontSize: 0.8, pcbX: 11.35, pcbY: -21.99 }),
1924
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "GND0", fontSize: 0.8, pcbX: 8.79, pcbY: -21.99 }),
1925
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "V5", fontSize: 0.8, pcbX: 6.23, pcbY: -21.99 }),
1926
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "V3_3", fontSize: 0.8, pcbX: 3.67, pcbY: -21.99 }),
1927
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "RES", fontSize: 0.8, pcbX: 1.11, pcbY: -21.99 }),
1928
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "IOREF", fontSize: 0.8, pcbX: -1.11, pcbY: -21.99 }),
1929
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "NC", fontSize: 0.8, pcbX: -3.67, pcbY: -21.99 }),
1930
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1931
- "platedhole",
1932
- {
1933
- holeDiameter: "1.016mm",
1934
- portHints: ["pin15"],
1935
- pcbX: 31.75,
1936
- pcbY: 23.99,
1937
- outerDiameter: "1.88mm",
1938
- shape: "circle"
1939
- }
1940
- ),
1941
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1942
- "platedhole",
1943
- {
1944
- holeDiameter: "1.016mm",
1945
- portHints: ["pin16"],
1946
- pcbX: 29.19,
1947
- pcbY: 23.99,
1948
- outerDiameter: "1.88mm",
1949
- shape: "circle"
1950
- }
1951
- ),
1952
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1953
- "platedhole",
1954
- {
1955
- holeDiameter: "1.016mm",
1956
- portHints: ["pin17"],
1957
- pcbX: 26.63,
1958
- pcbY: 23.99,
1959
- outerDiameter: "1.88mm",
1960
- shape: "circle"
1961
- }
1962
- ),
1963
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1964
- "platedhole",
1965
- {
1966
- holeDiameter: "1.016mm",
1967
- portHints: ["pin18"],
1968
- pcbX: 24.07,
1969
- pcbY: 23.99,
1970
- outerDiameter: "1.88mm",
1971
- shape: "circle"
1972
- }
1973
- ),
1974
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1975
- "platedhole",
1976
- {
1977
- holeDiameter: "1.016mm",
1978
- portHints: ["pin19"],
1979
- pcbX: 21.51,
1980
- pcbY: 23.99,
1981
- outerDiameter: "1.88mm",
1982
- shape: "circle"
1983
- }
1984
- ),
1985
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1986
- "platedhole",
1987
- {
1988
- holeDiameter: "1.016mm",
1989
- portHints: ["pin20"],
1990
- pcbX: 18.95,
1991
- pcbY: 23.99,
1992
- outerDiameter: "1.88mm",
1993
- shape: "circle"
1994
- }
1995
- ),
1996
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1997
- "platedhole",
1998
- {
1999
- holeDiameter: "1.016mm",
2000
- portHints: ["pin21"],
2001
- pcbX: 16.39,
2002
- pcbY: 23.99,
2003
- outerDiameter: "1.88mm",
2004
- shape: "circle"
2005
- }
2006
- ),
2007
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2008
- "platedhole",
2009
- {
2010
- holeDiameter: "1.016mm",
2011
- portHints: ["pin22"],
2012
- pcbX: 13.83,
2013
- pcbY: 23.99,
2014
- outerDiameter: "1.88mm",
2015
- shape: "circle"
2016
- }
2017
- ),
2018
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "D7", fontSize: 0.8, pcbX: 13.83, pcbY: 22.2 }),
2019
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "D6", fontSize: 0.8, pcbX: 16.39, pcbY: 22.2 }),
2020
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "D5", fontSize: 0.8, pcbX: 18.95, pcbY: 22.2 }),
2021
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "D4", fontSize: 0.8, pcbX: 21.51, pcbY: 22.2 }),
2022
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "D3", fontSize: 0.8, pcbX: 24.07, pcbY: 22.2 }),
2023
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "D2", fontSize: 0.8, pcbX: 26.63, pcbY: 22.2 }),
2024
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "TX", fontSize: 0.8, pcbX: 29.19, pcbY: 22.2 }),
2025
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "RX", fontSize: 0.8, pcbX: 31.75, pcbY: 22.2 }),
2026
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2027
- "platedhole",
2028
- {
2029
- holeDiameter: "1.016mm",
2030
- portHints: ["pin23"],
2031
- pcbX: 9.96,
2032
- pcbY: 23.99,
2033
- outerDiameter: "1.88mm",
2034
- shape: "circle"
2035
- }
2036
- ),
2037
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2038
- "platedhole",
2039
- {
2040
- holeDiameter: "1.016mm",
2041
- portHints: ["pin24"],
2042
- pcbX: 7.4,
2043
- pcbY: 23.99,
2044
- outerDiameter: "1.88mm",
2045
- shape: "circle"
2046
- }
2047
- ),
2048
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2049
- "platedhole",
2050
- {
2051
- holeDiameter: "1.016mm",
2052
- portHints: ["pin25"],
2053
- pcbX: 4.84,
2054
- pcbY: 23.99,
2055
- outerDiameter: "1.88mm",
2056
- shape: "circle"
2057
- }
2058
- ),
2059
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2060
- "platedhole",
2061
- {
2062
- holeDiameter: "1.016mm",
2063
- portHints: ["pin26"],
2064
- pcbX: 2.28,
2065
- pcbY: 23.99,
2066
- outerDiameter: "1.88mm",
2067
- shape: "circle"
2068
- }
2069
- ),
2070
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2071
- "platedhole",
2072
- {
2073
- holeDiameter: "1.016mm",
2074
- portHints: ["pin27"],
2075
- pcbX: -0.28,
2076
- pcbY: 23.99,
2077
- outerDiameter: "1.88mm",
2078
- shape: "circle"
2079
- }
2080
- ),
2081
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2082
- "platedhole",
2083
- {
2084
- holeDiameter: "1.016mm",
2085
- portHints: ["pin28"],
2086
- pcbX: -2.82,
2087
- pcbY: 23.99,
2088
- outerDiameter: "1.88mm",
2089
- shape: "circle"
2090
- }
2091
- ),
2092
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2093
- "platedhole",
2094
- {
2095
- holeDiameter: "1.016mm",
2096
- portHints: ["pin29"],
2097
- pcbX: -5.36,
2098
- pcbY: 23.99,
2099
- outerDiameter: "1.88mm",
2100
- shape: "circle"
2101
- }
2102
- ),
2103
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2104
- "platedhole",
2105
- {
2106
- holeDiameter: "1.016mm",
2107
- portHints: ["pin30"],
2108
- pcbX: -7.9,
2109
- pcbY: 23.99,
2110
- outerDiameter: "1.88mm",
2111
- shape: "circle"
2112
- }
2113
- ),
2114
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2115
- "platedhole",
2116
- {
2117
- holeDiameter: "1.016mm",
2118
- portHints: ["pin31"],
2119
- pcbX: -10.46,
2120
- pcbY: 23.99,
2121
- outerDiameter: "1.88mm",
2122
- shape: "circle"
2123
- }
2124
- ),
2125
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2126
- "platedhole",
2127
- {
2128
- holeDiameter: "1.016mm",
2129
- portHints: ["pin32"],
2130
- pcbX: -12.9,
2131
- pcbY: 23.99,
2132
- outerDiameter: "1.88mm",
2133
- shape: "circle"
2134
- }
2135
- ),
2136
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "D8", fontSize: 0.8, pcbX: 9.96, pcbY: 22.2 }),
2137
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "D9", fontSize: 0.8, pcbX: 7.4, pcbY: 22.2 }),
2138
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "D10", fontSize: 0.8, pcbX: 4.84, pcbY: 22.2 }),
2139
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "D11", fontSize: 0.8, pcbX: 2.28, pcbY: 22.2 }),
2140
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "D12", fontSize: 0.8, pcbX: -0.28, pcbY: 22.2 }),
2141
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "D13", fontSize: 0.8, pcbX: -2.82, pcbY: 22.2 }),
2142
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "GND2", fontSize: 0.8, pcbX: -5.36, pcbY: 22.2 }),
2143
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "AREF", fontSize: 0.8, pcbX: -7.9, pcbY: 22.2 }),
2144
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "SDA", fontSize: 0.8, pcbX: -10.46, pcbY: 22.2 }),
2145
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("silkscreentext", { text: "SCL", fontSize: 0.8, pcbX: -12.9, pcbY: 22.2 })
2146
- ] });
2147
-
2148
- // Common Boards/ArduinoShield/ArduinoShield.circuit.tsx
2149
- var import_jsx_runtime2 = __toESM(require_jsx_runtime());
2150
- var ArduinoShield = (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2151
- "board",
2152
- {
2153
- outline: [
2154
- { x: -34.29, y: 26.67 },
2155
- // top-left corner
2156
- { x: 32.29, y: 26.67 },
2157
- // top-right (sharp)
2158
- { x: 34.29, y: 24.67 },
2159
- // top-right (sharp)
2160
- { x: 34.29, y: 13.89 },
2161
- // start top slanted transition
2162
- { x: 36.83, y: 11.35 },
2163
- // outward notch top
2164
- { x: 36.83, y: -21.35 },
2165
- // outward notch bottom
2166
- { x: 34.29, y: -23.89 },
2167
- // end bottom slanted transition
2168
- { x: 34.29, y: -26.67 },
2169
- // bottom-right corner
2170
- { x: -34.29, y: -26.67 }
2171
- // bottom-left corner
2172
- ],
2173
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("group", { children: [
2174
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2175
- "chip",
2176
- {
2177
- name: props.name,
2178
- pinLabels: {
2179
- pin1: "A0",
2180
- pin2: "A1",
2181
- pin3: "A2",
2182
- pin4: "A3",
2183
- pin5: "A4",
2184
- pin6: "A5",
2185
- pin7: "VIN",
2186
- pin8: "NC",
2187
- pin9: "IOREF",
2188
- pin10: "RES",
2189
- pin11: "V3_3",
2190
- pin12: "V5",
2191
- pin13: "GND0",
2192
- pin14: "GND1",
2193
- pin15: "RX",
2194
- pin16: "TX",
2195
- pin17: "D2",
2196
- pin18: "D3",
2197
- pin19: "D4",
2198
- pin20: "D5",
2199
- pin21: "D6",
2200
- pin22: "D7",
2201
- pin23: "D8",
2202
- pin24: "D9",
2203
- pin25: "D10",
2204
- pin26: "D11",
2205
- pin27: "D12",
2206
- pin28: "D13",
2207
- pin29: "GND2",
2208
- pin30: "AREF",
2209
- pin31: "SDA",
2210
- pin32: "SCL"
2211
- },
2212
- schWidth: 1.5,
2213
- schPinArrangement: {
2214
- leftSide: {
2215
- direction: "top-to-bottom",
2216
- pins: [
2217
- "A0",
2218
- "A1",
2219
- "A2",
2220
- "A3",
2221
- "A4",
2222
- "A5",
2223
- "IOREF",
2224
- "RES",
2225
- "VIN",
2226
- "V5",
2227
- "V3_3",
2228
- "AREF",
2229
- "GND0",
2230
- "GND1",
2231
- "GND2"
2232
- ]
2233
- },
2234
- rightSide: {
2235
- direction: "top-to-bottom",
2236
- pins: [
2237
- "RX",
2238
- "TX",
2239
- "D2",
2240
- "D3",
2241
- "D4",
2242
- "D5",
2243
- "D6",
2244
- "D7",
2245
- "D8",
2246
- "D9",
2247
- "D10",
2248
- "D11",
2249
- "D12",
2250
- "D13",
2251
- "SDA",
2252
- "SCL"
2253
- ]
2254
- }
2255
- },
2256
- schPinStyle: {
2257
- pin6: {
2258
- marginBottom: 0.5
2259
- },
2260
- pin16: {
2261
- marginBottom: 0.3
2262
- }
2263
- },
2264
- footprint: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ArduinoShieldFootprint, {})
2265
- }
2266
- ),
2267
- props.children
2268
- ] })
2269
- }
2270
- );
2271
-
2272
- // Common Boards/MicroModBoard/MicroModBoardFootprint.tsx
2273
- var import_react = __toESM(require_react());
2274
- var import_jsx_runtime3 = __toESM(require_jsx_runtime());
2275
- var createSmtPad = (props) => import_react.default.createElement("smtpad", props);
2276
- var createPlatedHole = (props) => import_react.default.createElement("platedhole", props);
2277
- var MicroModBoardFootprint = ({
2278
- variant = "processor"
2279
- }) => {
2280
- const padWidth = 0.35;
2281
- const topPadHeight = 1.45;
2282
- const bottomPadHeight = 1.95;
2283
- const pitch = 0.5;
2284
- const pcbYValue = variant === "processor" ? -9.725 : -31.225;
2285
- const generatePads = () => {
2286
- const pads = [];
2287
- let x = 9.25;
2288
- for (let pn = 1; pn <= 75; pn += 2) {
2289
- if (pn >= 24 && pn <= 31) {
2290
- x -= pitch;
2291
- continue;
2292
- }
2293
- pads.push(
2294
- createSmtPad({
2295
- portHints: [`pin${pn}`],
2296
- width: padWidth,
2297
- height: topPadHeight,
2298
- pcbX: x,
2299
- pcbY: pcbYValue,
2300
- layer: "top",
2301
- shape: "rect"
2302
- })
2303
- );
2304
- x -= pitch;
2305
- }
2306
- x = 9;
2307
- for (let pn = 2; pn <= 74; pn += 2) {
2308
- if (pn >= 24 && pn <= 31) {
2309
- x -= pitch;
2310
- continue;
2311
- }
2312
- pads.push(
2313
- createSmtPad({
2314
- portHints: [`pin${pn}`],
2315
- width: padWidth,
2316
- height: bottomPadHeight,
2317
- pcbX: x,
2318
- pcbY: pcbYValue + 0.25,
2319
- layer: "bottom",
2320
- shape: "rect"
2321
- })
2322
- );
2323
- x -= pitch;
2324
- }
2325
- return pads;
2326
- };
2327
- const mountingHoles = variant === "function" ? [
2328
- createPlatedHole({
2329
- portHints: ["HOLE_PAD_1"],
2330
- holeDiameter: 3.82,
2331
- outerDiameter: 5.62,
2332
- pcbX: -19,
2333
- pcbY: 11.5,
2334
- shape: "circle"
2335
- }),
2336
- createPlatedHole({
2337
- portHints: ["HOLE_PAD_2"],
2338
- holeDiameter: 3.82,
2339
- outerDiameter: 5.62,
2340
- pcbX: 19,
2341
- pcbY: 11.5,
2342
- shape: "circle"
2343
- })
2344
- ] : createPlatedHole({
2345
- portHints: ["HOLE_PAD_1"],
2346
- holeDiameter: 3.82,
2347
- outerDiameter: 5.62,
2348
- pcbX: 4.2,
2349
- pcbY: 11,
2350
- shape: "circle"
2351
- });
2352
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("footprint", { children: [
2353
- generatePads(),
2354
- Array.isArray(mountingHoles) ? mountingHoles : [mountingHoles]
2355
- ] });
2356
- };
2357
-
2358
- // util/outlineBuilder.ts
2359
- var OutlineBuilder = class {
2360
- constructor(startX, startY) {
2361
- this.points = [];
2362
- this.lastDirection = null;
2363
- this.currentX = startX;
2364
- this.currentY = startY;
2365
- this.points.push({ x: startX, y: startY });
2366
- }
2367
- updateDirection(x, y) {
2368
- if (x > this.currentX) this.lastDirection = "right";
2369
- else if (x < this.currentX) this.lastDirection = "left";
2370
- else if (y > this.currentY) this.lastDirection = "down";
2371
- else if (y < this.currentY) this.lastDirection = "up";
2372
- }
2373
- lineTo(x, y) {
2374
- if (x !== this.currentX || y !== this.currentY) {
2375
- this.updateDirection(x, y);
2376
- this.currentX = x;
2377
- this.currentY = y;
2378
- this.points.push({ x, y });
2379
- }
2380
- return this;
2381
- }
2382
- // helper: convert cardinal direction to unit vector
2383
- dirToUnit(dir) {
2384
- switch (dir) {
2385
- case "right":
2386
- return { x: 1, y: 0 };
2387
- case "left":
2388
- return { x: -1, y: 0 };
2389
- case "down":
2390
- return { x: 0, y: 1 };
2391
- case "up":
2392
- return { x: 0, y: -1 };
2393
- }
2394
- }
2395
- // helper: compute outgoing unit & direction given lastDirection and turn
2396
- outgoingFor(last, turn) {
2397
- switch (last) {
2398
- case "right":
2399
- return turn === "cw" ? { unit: { x: 0, y: 1 }, dir: "down" } : { unit: { x: 0, y: -1 }, dir: "up" };
2400
- case "left":
2401
- return turn === "cw" ? { unit: { x: 0, y: -1 }, dir: "up" } : { unit: { x: 0, y: 1 }, dir: "down" };
2402
- case "down":
2403
- return turn === "cw" ? { unit: { x: -1, y: 0 }, dir: "left" } : { unit: { x: 1, y: 0 }, dir: "right" };
2404
- case "up":
2405
- return turn === "cw" ? { unit: { x: 1, y: 0 }, dir: "right" } : { unit: { x: -1, y: 0 }, dir: "left" };
2406
- }
2407
- }
2408
- corner({ radius, turn }) {
2409
- if (this.points.length < 2) {
2410
- throw new Error("Need at least two points to create a corner");
2411
- }
2412
- if (!this.lastDirection) {
2413
- throw new Error(
2414
- "Cannot create a corner without a known incoming direction"
2415
- );
2416
- }
2417
- const ix = this.currentX;
2418
- const iy = this.currentY;
2419
- const prevIndex = this.points.length - 2;
2420
- const prevPoint = this.points[prevIndex];
2421
- this.points.pop();
2422
- const incomingUnit = this.dirToUnit(this.lastDirection);
2423
- const { unit: outgoingUnit, dir: outgoingDir } = this.outgoingFor(
2424
- this.lastDirection,
2425
- turn
2426
- );
2427
- const dxPrev = ix - prevPoint.x;
2428
- const dyPrev = iy - prevPoint.y;
2429
- const distPrev = Math.hypot(dxPrev, dyPrev);
2430
- const r = Math.min(radius, distPrev);
2431
- const startX = ix - incomingUnit.x * r;
2432
- const startY = iy - incomingUnit.y * r;
2433
- const endX = ix + outgoingUnit.x * r;
2434
- const endY = iy + outgoingUnit.y * r;
2435
- const inVec = { x: -incomingUnit.x, y: -incomingUnit.y };
2436
- const outVec = { x: outgoingUnit.x, y: outgoingUnit.y };
2437
- const bisector = { x: inVec.x + outVec.x, y: inVec.y + outVec.y };
2438
- const bisLen = Math.hypot(bisector.x, bisector.y);
2439
- let dot = inVec.x * outVec.x + inVec.y * outVec.y;
2440
- dot = Math.max(-1, Math.min(1, dot));
2441
- const angle = Math.acos(dot);
2442
- if (bisLen < 1e-9 || Math.abs(Math.sin(angle / 2)) < 1e-9) {
2443
- this.points.push({ x: ix, y: iy });
2444
- this.currentX = ix;
2445
- this.currentY = iy;
2446
- return this;
2447
- }
2448
- const offset = r / Math.sin(angle / 2);
2449
- const bisUnit = { x: bisector.x / bisLen, y: bisector.y / bisLen };
2450
- const centerX = ix + bisUnit.x * offset;
2451
- const centerY = iy + bisUnit.y * offset;
2452
- const startAngle = Math.atan2(startY - centerY, startX - centerX);
2453
- const endAngle = Math.atan2(endY - centerY, endX - centerX);
2454
- let angleDelta = endAngle - startAngle;
2455
- while (angleDelta <= -Math.PI) angleDelta += 2 * Math.PI;
2456
- while (angleDelta > Math.PI) angleDelta -= 2 * Math.PI;
2457
- const lastAfterPop = this.points[this.points.length - 1];
2458
- const almostEqual = (a, b) => Math.abs(a - b) < 1e-9;
2459
- if (!lastAfterPop || !almostEqual(lastAfterPop.x, startX) || !almostEqual(lastAfterPop.y, startY)) {
2460
- this.points.push({ x: startX, y: startY });
2461
- }
2462
- const segments = 8;
2463
- for (let i = 1; i <= segments; i++) {
2464
- const t = i / segments;
2465
- const angle2 = startAngle + angleDelta * t;
2466
- const x = centerX + r * Math.cos(angle2);
2467
- const y = centerY + r * Math.sin(angle2);
2468
- this.points.push({ x, y });
2469
- }
2470
- const last = this.points[this.points.length - 1];
2471
- this.currentX = last.x;
2472
- this.currentY = last.y;
2473
- this.lastDirection = outgoingDir;
2474
- return this;
2475
- }
2476
- arcTo(x, y, { radius, sweep = true, segments = 16 }) {
2477
- const start = { x: this.currentX, y: this.currentY };
2478
- const end = { x, y };
2479
- const mx = (start.x + end.x) / 2;
2480
- const my = (start.y + end.y) / 2;
2481
- const dx = end.x - start.x;
2482
- const dy = end.y - start.y;
2483
- const dist = Math.sqrt(dx * dx + dy * dy);
2484
- if (dist === 0) return this;
2485
- const h = Math.sqrt(Math.max(0, radius * radius - __pow(dist / 2, 2)));
2486
- const perpX = -dy / dist;
2487
- const perpY = dx / dist;
2488
- const cx = mx + (sweep ? 1 : -1) * perpX * h;
2489
- const cy = my + (sweep ? 1 : -1) * perpY * h;
2490
- const startAngle = Math.atan2(start.y - cy, start.x - cx);
2491
- const endAngle = Math.atan2(end.y - cy, end.x - cx);
2492
- let sweepAngle = endAngle - startAngle;
2493
- if (sweep && sweepAngle < 0) sweepAngle += 2 * Math.PI;
2494
- if (!sweep && sweepAngle > 0) sweepAngle -= 2 * Math.PI;
2495
- for (let i = 1; i <= segments; i++) {
2496
- const t = i / segments;
2497
- const angle = startAngle + sweepAngle * t;
2498
- const px = cx + radius * Math.cos(angle);
2499
- const py = cy + radius * Math.sin(angle);
2500
- this.points.push({ x: px, y: py });
2501
- }
2502
- this.currentX = end.x;
2503
- this.currentY = end.y;
2504
- return this;
2505
- }
2506
- toArray() {
2507
- return [...this.points];
2508
- }
2509
- };
2510
- var outlineBuilder = (x, y) => {
2511
- return new OutlineBuilder(x, y);
2512
- };
2513
-
2514
- // Common Boards/MicroModBoard/outlines/boardOutlines.ts
2515
- var processorOutline = outlineBuilder(-9, 11).lineTo(11, 11).corner({ radius: 1, turn: "ccw" }).lineTo(11, -7).corner({ radius: 0.5, turn: "ccw" }).lineTo(10, -7).corner({ radius: 0.5, turn: "cw" }).lineTo(10, -11).lineTo(3.28, -11).lineTo(3.28, -8).arcTo(2.08, -8, { radius: 0.6, sweep: true }).lineTo(2.08, -11).lineTo(-10, -11).lineTo(-10, -7).corner({ radius: 0.5, turn: "cw" }).lineTo(-11, -7).corner({ radius: 0.5, turn: "ccw" }).lineTo(-11, 11).corner({ radius: 1, turn: "ccw" }).toArray();
2516
- var functionOutline = outlineBuilder(0, 32.5).lineTo(19, 32.5).corner({ radius: 1, turn: "ccw" }).lineTo(19, -28.5).corner({ radius: 0.5, turn: "ccw" }).lineTo(10, -28.5).corner({ radius: 0.5, turn: "cw" }).lineTo(10, -32.5).lineTo(3.28, -32.5).lineTo(3.28, -29.5).arcTo(2.08, -29.5, { radius: 0.6, sweep: true }).lineTo(2.08, -32.5).lineTo(-10, -32.5).lineTo(-10, -28.5).corner({ radius: 0.5, turn: "cw" }).lineTo(-19, -28.5).corner({ radius: 0.5, turn: "ccw" }).lineTo(-19, 32.5).corner({ radius: 1, turn: "ccw" }).toArray();
2517
-
2518
- // Common Boards/MicroModBoard/MicroModBoard.tsx
2519
- var import_jsx_runtime4 = __toESM(require_jsx_runtime());
2520
- var MicroModBoard = (_a) => {
2521
- var _b = _a, {
2522
- variant = "processor"
2523
- } = _b, props = __objRest(_b, [
2524
- "variant"
2525
- ]);
2526
- let outline;
2527
- const pinLabels = __spreadValues({
2528
- pin2: ["V3_3_1"],
2529
- pin74: ["V3_3_2"],
2530
- pin6: ["N_RESET"],
2531
- pin11: ["N_BOOT"],
2532
- pin4: ["V3_3_EN"],
2533
- pin72: ["RTC_V3"],
2534
- pin9: ["USB_VIN"],
2535
- pin5: ["USB_D_N"],
2536
- pin3: ["USB_D_P"],
2537
- pin37: ["USBHOST_D_N"],
2538
- pin35: ["USBHOST_D_P"],
2539
- pin43: ["CAN_TX"],
2540
- pin41: ["CAN_RX"],
2541
- pin23: ["SWDIO"],
2542
- pin21: ["SWDCK"],
2543
- pin58: ["AUD_MCLK"],
2544
- pin56: ["AUD_OUT"],
2545
- pin54: ["AUD_IN"],
2546
- pin52: ["AUD_LRCLK"],
2547
- pin50: ["AUD_BCLK"],
2548
- pin14: ["I2C_SCL"],
2549
- pin12: ["I2C_SDA"],
2550
- pin16: ["I2C_N_INT"],
2551
- pin53: ["I2C_SCL1"],
2552
- pin51: ["I2C_SDA1"],
2553
- pin49: ["BATT_VIN_3"],
2554
- pin1: ["GND1"],
2555
- pin7: ["GND2"],
2556
- pin33: ["GND3"],
2557
- pin36: ["GND4"],
2558
- pin39: ["GND5"],
2559
- pin45: ["GND6"],
2560
- pin75: ["GND7"],
2561
- pin60: ["SPI_SCK1"],
2562
- pin62: ["SPI_SDO1"],
2563
- pin64: ["SPI_SDI1"],
2564
- pin66: ["SDIO_DATA1"],
2565
- pin68: ["SDIO_DATA2"],
2566
- pin70: ["SPI_N_CS1"],
2567
- pin57: ["SPI_SCK"],
2568
- pin59: ["SPI_SDO"],
2569
- pin61: ["SPI_SDI"],
2570
- pin55: ["SPI_N_CS"],
2571
- pin34: ["A0"],
2572
- pin38: ["A1"],
2573
- pin32: ["PWM0"],
2574
- pin47: ["PWM1"],
2575
- pin10: ["D0"],
2576
- pin18: ["D1"],
2577
- pin17: ["TX1"],
2578
- pin19: ["RX1"],
2579
- pin13: ["RTS1"],
2580
- pin15: ["CTS1"],
2581
- pin22: ["TX2"],
2582
- pin20: ["RX2"],
2583
- pin40: ["G0"],
2584
- pin42: ["G1"],
2585
- pin44: ["G2"],
2586
- pin46: ["G3"],
2587
- pin48: ["G4"],
2588
- pin73: ["G5"],
2589
- pin71: ["G6", "PWR_EN"],
2590
- pin69: ["G7"],
2591
- pin67: ["G8"],
2592
- pin65: ["G9"],
2593
- pin63: ["G10"],
2594
- pin8: ["G11"],
2595
- pin76: ["HOLE_PAD_1"]
2596
- }, variant === "function" ? { pin77: ["HOLE_PAD_2"] } : {});
2597
- outline = variant === "processor" ? processorOutline : functionOutline;
2598
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("board", { outline, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("group", { children: [
2599
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2600
- "chip",
2601
- {
2602
- name: props.name,
2603
- footprint: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(MicroModBoardFootprint, { variant }),
2604
- schWidth: 2.8,
2605
- pinLabels,
2606
- schPinArrangement: {
2607
- leftSide: {
2608
- direction: "top-to-bottom",
2609
- pins: [
2610
- "V3_3_1",
2611
- "V3_3_2",
2612
- "N_RESET",
2613
- "N_BOOT",
2614
- "V3_3_EN",
2615
- "RTC_V3",
2616
- "USB_VIN",
2617
- "USB_D_N",
2618
- "USB_D_P",
2619
- "USBHOST_D_N",
2620
- "USBHOST_D_P",
2621
- "CAN_TX",
2622
- "CAN_RX",
2623
- "SWDIO",
2624
- "SWDCK",
2625
- "AUD_MCLK",
2626
- "AUD_OUT",
2627
- "AUD_IN",
2628
- "AUD_LRCLK",
2629
- "AUD_BCLK",
2630
- "I2C_SCL",
2631
- "I2C_SDA",
2632
- "I2C_N_INT",
2633
- "I2C_SCL1",
2634
- "I2C_SDA1",
2635
- "BATT_VIN_3",
2636
- "GND1",
2637
- "GND2",
2638
- "GND3",
2639
- "GND4",
2640
- "GND5",
2641
- "GND6",
2642
- "GND7"
2643
- ]
2644
- },
2645
- rightSide: {
2646
- direction: "top-to-bottom",
2647
- pins: [
2648
- "SPI_SCK1",
2649
- "SPI_SDO1",
2650
- "SPI_SDI1",
2651
- "SDIO_DATA1",
2652
- "SDIO_DATA2",
2653
- "SPI_N_CS1",
2654
- "SPI_SCK",
2655
- "SPI_SDO",
2656
- "SPI_SDI",
2657
- "SPI_N_CS",
2658
- "A0",
2659
- "A1",
2660
- "PWM0",
2661
- "PWM1",
2662
- "D0",
2663
- "D1",
2664
- "TX1",
2665
- "RX1",
2666
- "RTS1",
2667
- "CTS1",
2668
- "TX2",
2669
- "RX2",
2670
- "G0",
2671
- "G1",
2672
- "G2",
2673
- "G3",
2674
- "G4",
2675
- "G5",
2676
- "G6",
2677
- "G7",
2678
- "G8",
2679
- "G9",
2680
- "G10",
2681
- "G11",
2682
- "HOLE_PAD_1",
2683
- ...variant === "function" ? ["HOLE_PAD_2"] : []
2684
- ]
2685
- }
2686
- },
2687
- schPinStyle: {
2688
- pin11: {
2689
- marginBottom: 0.3
2690
- },
2691
- pin72: {
2692
- marginBottom: 0.3
2693
- },
2694
- pin3: {
2695
- marginBottom: 0.3
2696
- },
2697
- pin35: {
2698
- marginBottom: 0.3
2699
- },
2700
- pin41: {
2701
- marginBottom: 0.3
2702
- },
2703
- pin21: {
2704
- marginBottom: 0.3
2705
- },
2706
- pin50: {
2707
- marginBottom: 0.3
2708
- },
2709
- pin51: {
2710
- marginBottom: 0.3
2711
- },
2712
- pin49: {
2713
- marginBottom: 0.4
2714
- },
2715
- pin70: {
2716
- marginBottom: 0.3
2717
- },
2718
- pin55: {
2719
- marginBottom: 0.3
2720
- },
2721
- pin18: {
2722
- marginBottom: 0.6
2723
- },
2724
- pin20: {
2725
- marginBottom: 1
2726
- },
2727
- pin8: {
2728
- marginBottom: 0.3
2729
- }
2730
- }
2731
- }
2732
- ),
2733
- props.children
2734
- ] }) });
2735
- };
2736
- export {
2737
- ArduinoShield,
2738
- MicroModBoard
2739
- };
2740
- /*! Bundled license information:
2741
-
2742
- react/cjs/react-jsx-runtime.production.js:
2743
- (**
2744
- * @license React
2745
- * react-jsx-runtime.production.js
2746
- *
2747
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2748
- *
2749
- * This source code is licensed under the MIT license found in the
2750
- * LICENSE file in the root directory of this source tree.
2751
- *)
2752
-
2753
- react/cjs/react.production.js:
2754
- (**
2755
- * @license React
2756
- * react.production.js
2757
- *
2758
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2759
- *
2760
- * This source code is licensed under the MIT license found in the
2761
- * LICENSE file in the root directory of this source tree.
2762
- *)
2763
-
2764
- react/cjs/react.development.js:
2765
- (**
2766
- * @license React
2767
- * react.development.js
2768
- *
2769
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2770
- *
2771
- * This source code is licensed under the MIT license found in the
2772
- * LICENSE file in the root directory of this source tree.
2773
- *)
2774
-
2775
- react/cjs/react-jsx-runtime.development.js:
2776
- (**
2777
- * @license React
2778
- * react-jsx-runtime.development.js
2779
- *
2780
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2781
- *
2782
- * This source code is licensed under the MIT license found in the
2783
- * LICENSE file in the root directory of this source tree.
2784
- *)
2785
- */