@ttoss/react-billing 0.1.1 → 0.1.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.
Files changed (3) hide show
  1. package/dist/esm/index.js +41 -4622
  2. package/dist/index.js +72 -4630
  3. package/package.json +5 -3
package/dist/esm/index.js CHANGED
@@ -1,4569 +1,16 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
2
  import * as React from 'react';
3
- var __create = Object.create;
4
3
  var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
4
  var __name = (target, value) => __defProp(target, "name", {
10
5
  value,
11
6
  configurable: true
12
7
  });
13
- var __commonJS = (cb, mod) => function __require() {
14
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
15
- exports: {}
16
- }).exports, mod), mod.exports;
17
- };
18
- var __copyProps = (to, from2, except, desc) => {
19
- if (from2 && typeof from2 === "object" || typeof from2 === "function") {
20
- for (let key of __getOwnPropNames(from2)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
21
- get: () => from2[key],
22
- enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable
23
- });
24
- }
25
- return to;
26
- };
27
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
28
- // If the importer is in node compatibility mode or this is not an ESM
29
- // file that has been converted to a CommonJS file using a Babel-
30
- // compatible transform (i.e. "__esModule" has not been set), then set
31
- // "default" to the CommonJS "module.exports" for node compatibility.
32
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
33
- value: mod,
34
- enumerable: true
35
- }) : target, mod));
36
8
 
37
- // ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js
38
- var require_react_is_production_min = __commonJS({
39
- "../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
40
- "use strict";
41
-
42
- var b = "function" === typeof Symbol && Symbol.for;
43
- var c = b ? Symbol.for("react.element") : 60103;
44
- var d = b ? Symbol.for("react.portal") : 60106;
45
- var e = b ? Symbol.for("react.fragment") : 60107;
46
- var f = b ? Symbol.for("react.strict_mode") : 60108;
47
- var g = b ? Symbol.for("react.profiler") : 60114;
48
- var h = b ? Symbol.for("react.provider") : 60109;
49
- var k = b ? Symbol.for("react.context") : 60110;
50
- var l = b ? Symbol.for("react.async_mode") : 60111;
51
- var m = b ? Symbol.for("react.concurrent_mode") : 60111;
52
- var n = b ? Symbol.for("react.forward_ref") : 60112;
53
- var p = b ? Symbol.for("react.suspense") : 60113;
54
- var q = b ? Symbol.for("react.suspense_list") : 60120;
55
- var r = b ? Symbol.for("react.memo") : 60115;
56
- var t = b ? Symbol.for("react.lazy") : 60116;
57
- var v = b ? Symbol.for("react.block") : 60121;
58
- var w = b ? Symbol.for("react.fundamental") : 60117;
59
- var x = b ? Symbol.for("react.responder") : 60118;
60
- var y = b ? Symbol.for("react.scope") : 60119;
61
- function z(a) {
62
- if ("object" === typeof a && null !== a) {
63
- var u = a.$$typeof;
64
- switch (u) {
65
- case c:
66
- switch (a = a.type, a) {
67
- case l:
68
- case m:
69
- case e:
70
- case g:
71
- case f:
72
- case p:
73
- return a;
74
- default:
75
- switch (a = a && a.$$typeof, a) {
76
- case k:
77
- case n:
78
- case t:
79
- case r:
80
- case h:
81
- return a;
82
- default:
83
- return u;
84
- }
85
- }
86
- case d:
87
- return u;
88
- }
89
- }
90
- }
91
- __name(z, "z");
92
- function A(a) {
93
- return z(a) === m;
94
- }
95
- __name(A, "A");
96
- exports.AsyncMode = l;
97
- exports.ConcurrentMode = m;
98
- exports.ContextConsumer = k;
99
- exports.ContextProvider = h;
100
- exports.Element = c;
101
- exports.ForwardRef = n;
102
- exports.Fragment = e;
103
- exports.Lazy = t;
104
- exports.Memo = r;
105
- exports.Portal = d;
106
- exports.Profiler = g;
107
- exports.StrictMode = f;
108
- exports.Suspense = p;
109
- exports.isAsyncMode = function (a) {
110
- return A(a) || z(a) === l;
111
- };
112
- exports.isConcurrentMode = A;
113
- exports.isContextConsumer = function (a) {
114
- return z(a) === k;
115
- };
116
- exports.isContextProvider = function (a) {
117
- return z(a) === h;
118
- };
119
- exports.isElement = function (a) {
120
- return "object" === typeof a && null !== a && a.$$typeof === c;
121
- };
122
- exports.isForwardRef = function (a) {
123
- return z(a) === n;
124
- };
125
- exports.isFragment = function (a) {
126
- return z(a) === e;
127
- };
128
- exports.isLazy = function (a) {
129
- return z(a) === t;
130
- };
131
- exports.isMemo = function (a) {
132
- return z(a) === r;
133
- };
134
- exports.isPortal = function (a) {
135
- return z(a) === d;
136
- };
137
- exports.isProfiler = function (a) {
138
- return z(a) === g;
139
- };
140
- exports.isStrictMode = function (a) {
141
- return z(a) === f;
142
- };
143
- exports.isSuspense = function (a) {
144
- return z(a) === p;
145
- };
146
- exports.isValidElementType = function (a) {
147
- return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
148
- };
149
- exports.typeOf = z;
150
- }
151
- });
152
-
153
- // ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js
154
- var require_react_is_development = __commonJS({
155
- "../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js"(exports) {
156
- "use strict";
157
-
158
- if (process.env.NODE_ENV !== "production") {
159
- (function () {
160
- "use strict";
161
-
162
- var hasSymbol = typeof Symbol === "function" && Symbol.for;
163
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
164
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
165
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
166
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
167
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
168
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
169
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
170
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
171
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
172
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
173
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
174
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
175
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
176
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
177
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
178
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
179
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
180
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
181
- function isValidElementType(type) {
182
- return typeof type === "string" || typeof type === "function" ||
183
- // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
184
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
185
- }
186
- __name(isValidElementType, "isValidElementType");
187
- function typeOf(object) {
188
- if (typeof object === "object" && object !== null) {
189
- var $$typeof = object.$$typeof;
190
- switch ($$typeof) {
191
- case REACT_ELEMENT_TYPE:
192
- var type = object.type;
193
- switch (type) {
194
- case REACT_ASYNC_MODE_TYPE:
195
- case REACT_CONCURRENT_MODE_TYPE:
196
- case REACT_FRAGMENT_TYPE:
197
- case REACT_PROFILER_TYPE:
198
- case REACT_STRICT_MODE_TYPE:
199
- case REACT_SUSPENSE_TYPE:
200
- return type;
201
- default:
202
- var $$typeofType = type && type.$$typeof;
203
- switch ($$typeofType) {
204
- case REACT_CONTEXT_TYPE:
205
- case REACT_FORWARD_REF_TYPE:
206
- case REACT_LAZY_TYPE:
207
- case REACT_MEMO_TYPE:
208
- case REACT_PROVIDER_TYPE:
209
- return $$typeofType;
210
- default:
211
- return $$typeof;
212
- }
213
- }
214
- case REACT_PORTAL_TYPE:
215
- return $$typeof;
216
- }
217
- }
218
- return void 0;
219
- }
220
- __name(typeOf, "typeOf");
221
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
222
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
223
- var ContextConsumer = REACT_CONTEXT_TYPE;
224
- var ContextProvider = REACT_PROVIDER_TYPE;
225
- var Element = REACT_ELEMENT_TYPE;
226
- var ForwardRef = REACT_FORWARD_REF_TYPE;
227
- var Fragment6 = REACT_FRAGMENT_TYPE;
228
- var Lazy = REACT_LAZY_TYPE;
229
- var Memo = REACT_MEMO_TYPE;
230
- var Portal = REACT_PORTAL_TYPE;
231
- var Profiler = REACT_PROFILER_TYPE;
232
- var StrictMode = REACT_STRICT_MODE_TYPE;
233
- var Suspense = REACT_SUSPENSE_TYPE;
234
- var hasWarnedAboutDeprecatedIsAsyncMode = false;
235
- function isAsyncMode(object) {
236
- {
237
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
238
- hasWarnedAboutDeprecatedIsAsyncMode = true;
239
- console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
240
- }
241
- }
242
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
243
- }
244
- __name(isAsyncMode, "isAsyncMode");
245
- function isConcurrentMode(object) {
246
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
247
- }
248
- __name(isConcurrentMode, "isConcurrentMode");
249
- function isContextConsumer(object) {
250
- return typeOf(object) === REACT_CONTEXT_TYPE;
251
- }
252
- __name(isContextConsumer, "isContextConsumer");
253
- function isContextProvider(object) {
254
- return typeOf(object) === REACT_PROVIDER_TYPE;
255
- }
256
- __name(isContextProvider, "isContextProvider");
257
- function isElement(object) {
258
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
259
- }
260
- __name(isElement, "isElement");
261
- function isForwardRef(object) {
262
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
263
- }
264
- __name(isForwardRef, "isForwardRef");
265
- function isFragment(object) {
266
- return typeOf(object) === REACT_FRAGMENT_TYPE;
267
- }
268
- __name(isFragment, "isFragment");
269
- function isLazy(object) {
270
- return typeOf(object) === REACT_LAZY_TYPE;
271
- }
272
- __name(isLazy, "isLazy");
273
- function isMemo(object) {
274
- return typeOf(object) === REACT_MEMO_TYPE;
275
- }
276
- __name(isMemo, "isMemo");
277
- function isPortal(object) {
278
- return typeOf(object) === REACT_PORTAL_TYPE;
279
- }
280
- __name(isPortal, "isPortal");
281
- function isProfiler(object) {
282
- return typeOf(object) === REACT_PROFILER_TYPE;
283
- }
284
- __name(isProfiler, "isProfiler");
285
- function isStrictMode(object) {
286
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
287
- }
288
- __name(isStrictMode, "isStrictMode");
289
- function isSuspense(object) {
290
- return typeOf(object) === REACT_SUSPENSE_TYPE;
291
- }
292
- __name(isSuspense, "isSuspense");
293
- exports.AsyncMode = AsyncMode;
294
- exports.ConcurrentMode = ConcurrentMode;
295
- exports.ContextConsumer = ContextConsumer;
296
- exports.ContextProvider = ContextProvider;
297
- exports.Element = Element;
298
- exports.ForwardRef = ForwardRef;
299
- exports.Fragment = Fragment6;
300
- exports.Lazy = Lazy;
301
- exports.Memo = Memo;
302
- exports.Portal = Portal;
303
- exports.Profiler = Profiler;
304
- exports.StrictMode = StrictMode;
305
- exports.Suspense = Suspense;
306
- exports.isAsyncMode = isAsyncMode;
307
- exports.isConcurrentMode = isConcurrentMode;
308
- exports.isContextConsumer = isContextConsumer;
309
- exports.isContextProvider = isContextProvider;
310
- exports.isElement = isElement;
311
- exports.isForwardRef = isForwardRef;
312
- exports.isFragment = isFragment;
313
- exports.isLazy = isLazy;
314
- exports.isMemo = isMemo;
315
- exports.isPortal = isPortal;
316
- exports.isProfiler = isProfiler;
317
- exports.isStrictMode = isStrictMode;
318
- exports.isSuspense = isSuspense;
319
- exports.isValidElementType = isValidElementType;
320
- exports.typeOf = typeOf;
321
- })();
322
- }
323
- }
324
- });
325
-
326
- // ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js
327
- var require_react_is = __commonJS({
328
- "../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js"(exports, module) {
329
- "use strict";
330
-
331
- if (process.env.NODE_ENV === "production") {
332
- module.exports = require_react_is_production_min();
333
- } else {
334
- module.exports = require_react_is_development();
335
- }
336
- }
337
- });
338
-
339
- // ../../node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
340
- var require_hoist_non_react_statics_cjs = __commonJS({
341
- "../../node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(exports, module) {
342
- "use strict";
343
-
344
- var reactIs = require_react_is();
345
- var REACT_STATICS = {
346
- childContextTypes: true,
347
- contextType: true,
348
- contextTypes: true,
349
- defaultProps: true,
350
- displayName: true,
351
- getDefaultProps: true,
352
- getDerivedStateFromError: true,
353
- getDerivedStateFromProps: true,
354
- mixins: true,
355
- propTypes: true,
356
- type: true
357
- };
358
- var KNOWN_STATICS = {
359
- name: true,
360
- length: true,
361
- prototype: true,
362
- caller: true,
363
- callee: true,
364
- arguments: true,
365
- arity: true
366
- };
367
- var FORWARD_REF_STATICS = {
368
- "$$typeof": true,
369
- render: true,
370
- defaultProps: true,
371
- displayName: true,
372
- propTypes: true
373
- };
374
- var MEMO_STATICS = {
375
- "$$typeof": true,
376
- compare: true,
377
- defaultProps: true,
378
- displayName: true,
379
- propTypes: true,
380
- type: true
381
- };
382
- var TYPE_STATICS = {};
383
- TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
384
- TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
385
- function getStatics(component) {
386
- if (reactIs.isMemo(component)) {
387
- return MEMO_STATICS;
388
- }
389
- return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS;
390
- }
391
- __name(getStatics, "getStatics");
392
- var defineProperty = Object.defineProperty;
393
- var getOwnPropertyNames = Object.getOwnPropertyNames;
394
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
395
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
396
- var getPrototypeOf = Object.getPrototypeOf;
397
- var objectPrototype = Object.prototype;
398
- function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
399
- if (typeof sourceComponent !== "string") {
400
- if (objectPrototype) {
401
- var inheritedComponent = getPrototypeOf(sourceComponent);
402
- if (inheritedComponent && inheritedComponent !== objectPrototype) {
403
- hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
404
- }
405
- }
406
- var keys = getOwnPropertyNames(sourceComponent);
407
- if (getOwnPropertySymbols) {
408
- keys = keys.concat(getOwnPropertySymbols(sourceComponent));
409
- }
410
- var targetStatics = getStatics(targetComponent);
411
- var sourceStatics = getStatics(sourceComponent);
412
- for (var i = 0; i < keys.length; ++i) {
413
- var key = keys[i];
414
- if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
415
- var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
416
- try {
417
- defineProperty(targetComponent, key, descriptor);
418
- } catch (e) {}
419
- }
420
- }
421
- }
422
- return targetComponent;
423
- }
424
- __name(hoistNonReactStatics, "hoistNonReactStatics");
425
- module.exports = hoistNonReactStatics;
426
- }
427
- });
428
-
429
- // ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/extends.js
430
- var require_extends = __commonJS({
431
- "../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/extends.js"(exports, module) {
432
- "use strict";
433
-
434
- function _extends2() {
435
- return module.exports = _extends2 = Object.assign ? Object.assign.bind() : function (n) {
436
- for (var e = 1; e < arguments.length; e++) {
437
- var t = arguments[e];
438
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
439
- }
440
- return n;
441
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends2.apply(null, arguments);
442
- }
443
- __name(_extends2, "_extends");
444
- module.exports = _extends2, module.exports.__esModule = true, module.exports["default"] = module.exports;
445
- }
446
- });
447
-
448
- // ../../node_modules/.pnpm/@iconify-icon+react@2.3.0_react@19.2.1/node_modules/@iconify-icon/react/dist/iconify.mjs
449
- import React2 from "react";
450
-
451
- // ../../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
452
- var defaultIconDimensions = Object.freeze({
453
- left: 0,
454
- top: 0,
455
- width: 16,
456
- height: 16
457
- });
458
- var defaultIconTransformations = Object.freeze({
459
- rotate: 0,
460
- vFlip: false,
461
- hFlip: false
462
- });
463
- var defaultIconProps = Object.freeze({
464
- ...defaultIconDimensions,
465
- ...defaultIconTransformations
466
- });
467
- var defaultExtendedIconProps = Object.freeze({
468
- ...defaultIconProps,
469
- body: "",
470
- hidden: false
471
- });
472
- var defaultIconSizeCustomisations = Object.freeze({
473
- width: null,
474
- height: null
475
- });
476
- var defaultIconCustomisations = Object.freeze({
477
- // Dimensions
478
- ...defaultIconSizeCustomisations,
479
- // Transformations
480
- ...defaultIconTransformations
481
- });
482
- function rotateFromString(value, defaultValue = 0) {
483
- const units = value.replace(/^-?[0-9.]*/, "");
484
- function cleanup(value2) {
485
- while (value2 < 0) {
486
- value2 += 4;
487
- }
488
- return value2 % 4;
489
- }
490
- __name(cleanup, "cleanup");
491
- if (units === "") {
492
- const num = parseInt(value);
493
- return isNaN(num) ? 0 : cleanup(num);
494
- } else if (units !== value) {
495
- let split = 0;
496
- switch (units) {
497
- case "%":
498
- split = 25;
499
- break;
500
- case "deg":
501
- split = 90;
502
- }
503
- if (split) {
504
- let num = parseFloat(value.slice(0, value.length - units.length));
505
- if (isNaN(num)) {
506
- return 0;
507
- }
508
- num = num / split;
509
- return num % 1 === 0 ? cleanup(num) : 0;
510
- }
511
- }
512
- return defaultValue;
513
- }
514
- __name(rotateFromString, "rotateFromString");
515
- var separator = /[\s,]+/;
516
- function flipFromString(custom, flip) {
517
- flip.split(separator).forEach(str => {
518
- const value = str.trim();
519
- switch (value) {
520
- case "horizontal":
521
- custom.hFlip = true;
522
- break;
523
- case "vertical":
524
- custom.vFlip = true;
525
- break;
526
- }
527
- });
528
- }
529
- __name(flipFromString, "flipFromString");
530
- var defaultCustomisations = {
531
- ...defaultIconCustomisations,
532
- preserveAspectRatio: ""
533
- };
534
- function getCustomisations(node2) {
535
- const customisations = {
536
- ...defaultCustomisations
537
- };
538
- const attr = /* @__PURE__ */__name((key, def) => node2.getAttribute(key) || def, "attr");
539
- customisations.width = attr("width", null);
540
- customisations.height = attr("height", null);
541
- customisations.rotate = rotateFromString(attr("rotate", ""));
542
- flipFromString(customisations, attr("flip", ""));
543
- customisations.preserveAspectRatio = attr("preserveAspectRatio", attr("preserveaspectratio", ""));
544
- return customisations;
545
- }
546
- __name(getCustomisations, "getCustomisations");
547
- function haveCustomisationsChanged(value1, value2) {
548
- for (const key in defaultCustomisations) {
549
- if (value1[key] !== value2[key]) {
550
- return true;
551
- }
552
- }
553
- return false;
554
- }
555
- __name(haveCustomisationsChanged, "haveCustomisationsChanged");
556
- var matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;
557
- var stringToIcon = /* @__PURE__ */__name((value, validate, allowSimpleName, provider = "") => {
558
- const colonSeparated = value.split(":");
559
- if (value.slice(0, 1) === "@") {
560
- if (colonSeparated.length < 2 || colonSeparated.length > 3) {
561
- return null;
562
- }
563
- provider = colonSeparated.shift().slice(1);
564
- }
565
- if (colonSeparated.length > 3 || !colonSeparated.length) {
566
- return null;
567
- }
568
- if (colonSeparated.length > 1) {
569
- const name2 = colonSeparated.pop();
570
- const prefix2 = colonSeparated.pop();
571
- const result = {
572
- // Allow provider without '@': "provider:prefix:name"
573
- provider: colonSeparated.length > 0 ? colonSeparated[0] : provider,
574
- prefix: prefix2,
575
- name: name2
576
- };
577
- return validate && !validateIconName(result) ? null : result;
578
- }
579
- const name = colonSeparated[0];
580
- const dashSeparated = name.split("-");
581
- if (dashSeparated.length > 1) {
582
- const result = {
583
- provider,
584
- prefix: dashSeparated.shift(),
585
- name: dashSeparated.join("-")
586
- };
587
- return validate && !validateIconName(result) ? null : result;
588
- }
589
- if (allowSimpleName && provider === "") {
590
- const result = {
591
- provider,
592
- prefix: "",
593
- name
594
- };
595
- return validate && !validateIconName(result, allowSimpleName) ? null : result;
596
- }
597
- return null;
598
- }, "stringToIcon");
599
- var validateIconName = /* @__PURE__ */__name((icon, allowSimpleName) => {
600
- if (!icon) {
601
- return false;
602
- }
603
- return !!(
604
- // Check prefix: cannot be empty, unless allowSimpleName is enabled
605
- // Check name: cannot be empty
606
- (allowSimpleName && icon.prefix === "" || !!icon.prefix) && !!icon.name);
607
- }, "validateIconName");
608
- function mergeIconTransformations(obj1, obj2) {
609
- const result = {};
610
- if (!obj1.hFlip !== !obj2.hFlip) {
611
- result.hFlip = true;
612
- }
613
- if (!obj1.vFlip !== !obj2.vFlip) {
614
- result.vFlip = true;
615
- }
616
- const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;
617
- if (rotate) {
618
- result.rotate = rotate;
619
- }
620
- return result;
621
- }
622
- __name(mergeIconTransformations, "mergeIconTransformations");
623
- function mergeIconData(parent, child) {
624
- const result = mergeIconTransformations(parent, child);
625
- for (const key in defaultExtendedIconProps) {
626
- if (key in defaultIconTransformations) {
627
- if (key in parent && !(key in result)) {
628
- result[key] = defaultIconTransformations[key];
629
- }
630
- } else if (key in child) {
631
- result[key] = child[key];
632
- } else if (key in parent) {
633
- result[key] = parent[key];
634
- }
635
- }
636
- return result;
637
- }
638
- __name(mergeIconData, "mergeIconData");
639
- function getIconsTree(data, names) {
640
- const icons = data.icons;
641
- const aliases2 = data.aliases || /* @__PURE__ */Object.create(null);
642
- const resolved = /* @__PURE__ */Object.create(null);
643
- function resolve(name) {
644
- if (icons[name]) {
645
- return resolved[name] = [];
646
- }
647
- if (!(name in resolved)) {
648
- resolved[name] = null;
649
- const parent = aliases2[name] && aliases2[name].parent;
650
- const value = parent && resolve(parent);
651
- if (value) {
652
- resolved[name] = [parent].concat(value);
653
- }
654
- }
655
- return resolved[name];
656
- }
657
- __name(resolve, "resolve");
658
- Object.keys(icons).concat(Object.keys(aliases2)).forEach(resolve);
659
- return resolved;
660
- }
661
- __name(getIconsTree, "getIconsTree");
662
- function internalGetIconData(data, name, tree) {
663
- const icons = data.icons;
664
- const aliases2 = data.aliases || /* @__PURE__ */Object.create(null);
665
- let currentProps = {};
666
- function parse2(name2) {
667
- currentProps = mergeIconData(icons[name2] || aliases2[name2], currentProps);
668
- }
669
- __name(parse2, "parse");
670
- parse2(name);
671
- tree.forEach(parse2);
672
- return mergeIconData(data, currentProps);
673
- }
674
- __name(internalGetIconData, "internalGetIconData");
675
- function parseIconSet(data, callback) {
676
- const names = [];
677
- if (typeof data !== "object" || typeof data.icons !== "object") {
678
- return names;
679
- }
680
- if (data.not_found instanceof Array) {
681
- data.not_found.forEach(name => {
682
- callback(name, null);
683
- names.push(name);
684
- });
685
- }
686
- const tree = getIconsTree(data);
687
- for (const name in tree) {
688
- const item = tree[name];
689
- if (item) {
690
- callback(name, internalGetIconData(data, name, item));
691
- names.push(name);
692
- }
693
- }
694
- return names;
695
- }
696
- __name(parseIconSet, "parseIconSet");
697
- var optionalPropertyDefaults = {
698
- provider: "",
699
- aliases: {},
700
- not_found: {},
701
- ...defaultIconDimensions
702
- };
703
- function checkOptionalProps(item, defaults) {
704
- for (const prop in defaults) {
705
- if (prop in item && typeof item[prop] !== typeof defaults[prop]) {
706
- return false;
707
- }
708
- }
709
- return true;
710
- }
711
- __name(checkOptionalProps, "checkOptionalProps");
712
- function quicklyValidateIconSet(obj) {
713
- if (typeof obj !== "object" || obj === null) {
714
- return null;
715
- }
716
- const data = obj;
717
- if (typeof data.prefix !== "string" || !obj.icons || typeof obj.icons !== "object") {
718
- return null;
719
- }
720
- if (!checkOptionalProps(obj, optionalPropertyDefaults)) {
721
- return null;
722
- }
723
- const icons = data.icons;
724
- for (const name in icons) {
725
- const icon = icons[name];
726
- if (
727
- // Name cannot be empty
728
- !name ||
729
- // Must have body
730
- typeof icon.body !== "string" ||
731
- // Check other props
732
- !checkOptionalProps(icon, defaultExtendedIconProps)) {
733
- return null;
734
- }
735
- }
736
- const aliases2 = data.aliases || /* @__PURE__ */Object.create(null);
737
- for (const name in aliases2) {
738
- const icon = aliases2[name];
739
- const parent = icon.parent;
740
- if (
741
- // Name cannot be empty
742
- !name ||
743
- // Parent must be set and point to existing icon
744
- typeof parent !== "string" || !icons[parent] && !aliases2[parent] ||
745
- // Check other props
746
- !checkOptionalProps(icon, defaultExtendedIconProps)) {
747
- return null;
748
- }
749
- }
750
- return data;
751
- }
752
- __name(quicklyValidateIconSet, "quicklyValidateIconSet");
753
- var dataStorage = /* @__PURE__ */Object.create(null);
754
- function newStorage(provider, prefix2) {
755
- return {
756
- provider,
757
- prefix: prefix2,
758
- icons: /* @__PURE__ */Object.create(null),
759
- missing: /* @__PURE__ */new Set()
760
- };
761
- }
762
- __name(newStorage, "newStorage");
763
- function getStorage(provider, prefix2) {
764
- const providerStorage = dataStorage[provider] || (dataStorage[provider] = /* @__PURE__ */Object.create(null));
765
- return providerStorage[prefix2] || (providerStorage[prefix2] = newStorage(provider, prefix2));
766
- }
767
- __name(getStorage, "getStorage");
768
- function addIconSet(storage2, data) {
769
- if (!quicklyValidateIconSet(data)) {
770
- return [];
771
- }
772
- return parseIconSet(data, (name, icon) => {
773
- if (icon) {
774
- storage2.icons[name] = icon;
775
- } else {
776
- storage2.missing.add(name);
777
- }
778
- });
779
- }
780
- __name(addIconSet, "addIconSet");
781
- function addIconToStorage(storage2, name, icon) {
782
- try {
783
- if (typeof icon.body === "string") {
784
- storage2.icons[name] = {
785
- ...icon
786
- };
787
- return true;
788
- }
789
- } catch (err) {}
790
- return false;
791
- }
792
- __name(addIconToStorage, "addIconToStorage");
793
- function listIcons$1(provider, prefix2) {
794
- let allIcons = [];
795
- const providers = typeof provider === "string" ? [provider] : Object.keys(dataStorage);
796
- providers.forEach(provider2 => {
797
- const prefixes = typeof provider2 === "string" && typeof prefix2 === "string" ? [prefix2] : Object.keys(dataStorage[provider2] || {});
798
- prefixes.forEach(prefix22 => {
799
- const storage2 = getStorage(provider2, prefix22);
800
- allIcons = allIcons.concat(Object.keys(storage2.icons).map(name => (provider2 !== "" ? "@" + provider2 + ":" : "") + prefix22 + ":" + name));
801
- });
802
- });
803
- return allIcons;
804
- }
805
- __name(listIcons$1, "listIcons$1");
806
- var simpleNames = false;
807
- function allowSimpleNames(allow) {
808
- if (typeof allow === "boolean") {
809
- simpleNames = allow;
810
- }
811
- return simpleNames;
812
- }
813
- __name(allowSimpleNames, "allowSimpleNames");
814
- function getIconData(name) {
815
- const icon = typeof name === "string" ? stringToIcon(name, true, simpleNames) : name;
816
- if (icon) {
817
- const storage2 = getStorage(icon.provider, icon.prefix);
818
- const iconName = icon.name;
819
- return storage2.icons[iconName] || (storage2.missing.has(iconName) ? null : void 0);
820
- }
821
- }
822
- __name(getIconData, "getIconData");
823
- function addIcon$1(name, data) {
824
- const icon = stringToIcon(name, true, simpleNames);
825
- if (!icon) {
826
- return false;
827
- }
828
- const storage2 = getStorage(icon.provider, icon.prefix);
829
- if (data) {
830
- return addIconToStorage(storage2, icon.name, data);
831
- } else {
832
- storage2.missing.add(icon.name);
833
- return true;
834
- }
835
- }
836
- __name(addIcon$1, "addIcon$1");
837
- function addCollection$1(data, provider) {
838
- if (typeof data !== "object") {
839
- return false;
840
- }
841
- if (typeof provider !== "string") {
842
- provider = data.provider || "";
843
- }
844
- if (simpleNames && !provider && !data.prefix) {
845
- let added = false;
846
- if (quicklyValidateIconSet(data)) {
847
- data.prefix = "";
848
- parseIconSet(data, (name, icon) => {
849
- if (addIcon$1(name, icon)) {
850
- added = true;
851
- }
852
- });
853
- }
854
- return added;
855
- }
856
- const prefix2 = data.prefix;
857
- if (!validateIconName({
858
- provider,
859
- prefix: prefix2,
860
- name: "a"
861
- })) {
862
- return false;
863
- }
864
- const storage2 = getStorage(provider, prefix2);
865
- return !!addIconSet(storage2, data);
866
- }
867
- __name(addCollection$1, "addCollection$1");
868
- function iconLoaded$1(name) {
869
- return !!getIconData(name);
870
- }
871
- __name(iconLoaded$1, "iconLoaded$1");
872
- function getIcon$1(name) {
873
- const result = getIconData(name);
874
- return result ? {
875
- ...defaultIconProps,
876
- ...result
877
- } : result;
878
- }
879
- __name(getIcon$1, "getIcon$1");
880
- function sortIcons(icons) {
881
- const result = {
882
- loaded: [],
883
- missing: [],
884
- pending: []
885
- };
886
- const storage2 = /* @__PURE__ */Object.create(null);
887
- icons.sort((a, b) => {
888
- if (a.provider !== b.provider) {
889
- return a.provider.localeCompare(b.provider);
890
- }
891
- if (a.prefix !== b.prefix) {
892
- return a.prefix.localeCompare(b.prefix);
893
- }
894
- return a.name.localeCompare(b.name);
895
- });
896
- let lastIcon = {
897
- provider: "",
898
- prefix: "",
899
- name: ""
900
- };
901
- icons.forEach(icon => {
902
- if (lastIcon.name === icon.name && lastIcon.prefix === icon.prefix && lastIcon.provider === icon.provider) {
903
- return;
904
- }
905
- lastIcon = icon;
906
- const provider = icon.provider;
907
- const prefix2 = icon.prefix;
908
- const name = icon.name;
909
- const providerStorage = storage2[provider] || (storage2[provider] = /* @__PURE__ */Object.create(null));
910
- const localStorage = providerStorage[prefix2] || (providerStorage[prefix2] = getStorage(provider, prefix2));
911
- let list;
912
- if (name in localStorage.icons) {
913
- list = result.loaded;
914
- } else if (prefix2 === "" || localStorage.missing.has(name)) {
915
- list = result.missing;
916
- } else {
917
- list = result.pending;
918
- }
919
- const item = {
920
- provider,
921
- prefix: prefix2,
922
- name
923
- };
924
- list.push(item);
925
- });
926
- return result;
927
- }
928
- __name(sortIcons, "sortIcons");
929
- function removeCallback(storages, id) {
930
- storages.forEach(storage2 => {
931
- const items = storage2.loaderCallbacks;
932
- if (items) {
933
- storage2.loaderCallbacks = items.filter(row => row.id !== id);
934
- }
935
- });
936
- }
937
- __name(removeCallback, "removeCallback");
938
- function updateCallbacks(storage2) {
939
- if (!storage2.pendingCallbacksFlag) {
940
- storage2.pendingCallbacksFlag = true;
941
- setTimeout(() => {
942
- storage2.pendingCallbacksFlag = false;
943
- const items = storage2.loaderCallbacks ? storage2.loaderCallbacks.slice(0) : [];
944
- if (!items.length) {
945
- return;
946
- }
947
- let hasPending = false;
948
- const provider = storage2.provider;
949
- const prefix2 = storage2.prefix;
950
- items.forEach(item => {
951
- const icons = item.icons;
952
- const oldLength = icons.pending.length;
953
- icons.pending = icons.pending.filter(icon => {
954
- if (icon.prefix !== prefix2) {
955
- return true;
956
- }
957
- const name = icon.name;
958
- if (storage2.icons[name]) {
959
- icons.loaded.push({
960
- provider,
961
- prefix: prefix2,
962
- name
963
- });
964
- } else if (storage2.missing.has(name)) {
965
- icons.missing.push({
966
- provider,
967
- prefix: prefix2,
968
- name
969
- });
970
- } else {
971
- hasPending = true;
972
- return true;
973
- }
974
- return false;
975
- });
976
- if (icons.pending.length !== oldLength) {
977
- if (!hasPending) {
978
- removeCallback([storage2], item.id);
979
- }
980
- item.callback(icons.loaded.slice(0), icons.missing.slice(0), icons.pending.slice(0), item.abort);
981
- }
982
- });
983
- });
984
- }
985
- }
986
- __name(updateCallbacks, "updateCallbacks");
987
- var idCounter = 0;
988
- function storeCallback(callback, icons, pendingSources) {
989
- const id = idCounter++;
990
- const abort = removeCallback.bind(null, pendingSources, id);
991
- if (!icons.pending.length) {
992
- return abort;
993
- }
994
- const item = {
995
- id,
996
- icons,
997
- callback,
998
- abort
999
- };
1000
- pendingSources.forEach(storage2 => {
1001
- (storage2.loaderCallbacks || (storage2.loaderCallbacks = [])).push(item);
1002
- });
1003
- return abort;
1004
- }
1005
- __name(storeCallback, "storeCallback");
1006
- var storage = /* @__PURE__ */Object.create(null);
1007
- function setAPIModule(provider, item) {
1008
- storage[provider] = item;
1009
- }
1010
- __name(setAPIModule, "setAPIModule");
1011
- function getAPIModule(provider) {
1012
- return storage[provider] || storage[""];
1013
- }
1014
- __name(getAPIModule, "getAPIModule");
1015
- function listToIcons(list, validate = true, simpleNames2 = false) {
1016
- const result = [];
1017
- list.forEach(item => {
1018
- const icon = typeof item === "string" ? stringToIcon(item, validate, simpleNames2) : item;
1019
- if (icon) {
1020
- result.push(icon);
1021
- }
1022
- });
1023
- return result;
1024
- }
1025
- __name(listToIcons, "listToIcons");
1026
- var defaultConfig = {
1027
- resources: [],
1028
- index: 0,
1029
- timeout: 2e3,
1030
- rotate: 750,
1031
- random: false,
1032
- dataAfterTimeout: false
1033
- };
1034
- function sendQuery(config, payload, query, done) {
1035
- const resourcesCount = config.resources.length;
1036
- const startIndex = config.random ? Math.floor(Math.random() * resourcesCount) : config.index;
1037
- let resources;
1038
- if (config.random) {
1039
- let list = config.resources.slice(0);
1040
- resources = [];
1041
- while (list.length > 1) {
1042
- const nextIndex = Math.floor(Math.random() * list.length);
1043
- resources.push(list[nextIndex]);
1044
- list = list.slice(0, nextIndex).concat(list.slice(nextIndex + 1));
1045
- }
1046
- resources = resources.concat(list);
1047
- } else {
1048
- resources = config.resources.slice(startIndex).concat(config.resources.slice(0, startIndex));
1049
- }
1050
- const startTime = Date.now();
1051
- let status = "pending";
1052
- let queriesSent = 0;
1053
- let lastError;
1054
- let timer = null;
1055
- let queue = [];
1056
- let doneCallbacks = [];
1057
- if (typeof done === "function") {
1058
- doneCallbacks.push(done);
1059
- }
1060
- function resetTimer() {
1061
- if (timer) {
1062
- clearTimeout(timer);
1063
- timer = null;
1064
- }
1065
- }
1066
- __name(resetTimer, "resetTimer");
1067
- function abort() {
1068
- if (status === "pending") {
1069
- status = "aborted";
1070
- }
1071
- resetTimer();
1072
- queue.forEach(item => {
1073
- if (item.status === "pending") {
1074
- item.status = "aborted";
1075
- }
1076
- });
1077
- queue = [];
1078
- }
1079
- __name(abort, "abort");
1080
- function subscribe(callback, overwrite) {
1081
- if (overwrite) {
1082
- doneCallbacks = [];
1083
- }
1084
- if (typeof callback === "function") {
1085
- doneCallbacks.push(callback);
1086
- }
1087
- }
1088
- __name(subscribe, "subscribe");
1089
- function getQueryStatus() {
1090
- return {
1091
- startTime,
1092
- payload,
1093
- status,
1094
- queriesSent,
1095
- queriesPending: queue.length,
1096
- subscribe,
1097
- abort
1098
- };
1099
- }
1100
- __name(getQueryStatus, "getQueryStatus");
1101
- function failQuery() {
1102
- status = "failed";
1103
- doneCallbacks.forEach(callback => {
1104
- callback(void 0, lastError);
1105
- });
1106
- }
1107
- __name(failQuery, "failQuery");
1108
- function clearQueue() {
1109
- queue.forEach(item => {
1110
- if (item.status === "pending") {
1111
- item.status = "aborted";
1112
- }
1113
- });
1114
- queue = [];
1115
- }
1116
- __name(clearQueue, "clearQueue");
1117
- function moduleResponse(item, response, data) {
1118
- const isError = response !== "success";
1119
- queue = queue.filter(queued => queued !== item);
1120
- switch (status) {
1121
- case "pending":
1122
- break;
1123
- case "failed":
1124
- if (isError || !config.dataAfterTimeout) {
1125
- return;
1126
- }
1127
- break;
1128
- default:
1129
- return;
1130
- }
1131
- if (response === "abort") {
1132
- lastError = data;
1133
- failQuery();
1134
- return;
1135
- }
1136
- if (isError) {
1137
- lastError = data;
1138
- if (!queue.length) {
1139
- if (!resources.length) {
1140
- failQuery();
1141
- } else {
1142
- execNext();
1143
- }
1144
- }
1145
- return;
1146
- }
1147
- resetTimer();
1148
- clearQueue();
1149
- if (!config.random) {
1150
- const index = config.resources.indexOf(item.resource);
1151
- if (index !== -1 && index !== config.index) {
1152
- config.index = index;
1153
- }
1154
- }
1155
- status = "completed";
1156
- doneCallbacks.forEach(callback => {
1157
- callback(data);
1158
- });
1159
- }
1160
- __name(moduleResponse, "moduleResponse");
1161
- function execNext() {
1162
- if (status !== "pending") {
1163
- return;
1164
- }
1165
- resetTimer();
1166
- const resource = resources.shift();
1167
- if (resource === void 0) {
1168
- if (queue.length) {
1169
- timer = setTimeout(() => {
1170
- resetTimer();
1171
- if (status === "pending") {
1172
- clearQueue();
1173
- failQuery();
1174
- }
1175
- }, config.timeout);
1176
- return;
1177
- }
1178
- failQuery();
1179
- return;
1180
- }
1181
- const item = {
1182
- status: "pending",
1183
- resource,
1184
- callback: /* @__PURE__ */__name((status2, data) => {
1185
- moduleResponse(item, status2, data);
1186
- }, "callback")
1187
- };
1188
- queue.push(item);
1189
- queriesSent++;
1190
- timer = setTimeout(execNext, config.rotate);
1191
- query(resource, payload, item.callback);
1192
- }
1193
- __name(execNext, "execNext");
1194
- setTimeout(execNext);
1195
- return getQueryStatus;
1196
- }
1197
- __name(sendQuery, "sendQuery");
1198
- function initRedundancy(cfg) {
1199
- const config = {
1200
- ...defaultConfig,
1201
- ...cfg
1202
- };
1203
- let queries = [];
1204
- function cleanup() {
1205
- queries = queries.filter(item => item().status === "pending");
1206
- }
1207
- __name(cleanup, "cleanup");
1208
- function query(payload, queryCallback, doneCallback) {
1209
- const query2 = sendQuery(config, payload, queryCallback, (data, error) => {
1210
- cleanup();
1211
- if (doneCallback) {
1212
- doneCallback(data, error);
1213
- }
1214
- });
1215
- queries.push(query2);
1216
- return query2;
1217
- }
1218
- __name(query, "query");
1219
- function find(callback) {
1220
- return queries.find(value => {
1221
- return callback(value);
1222
- }) || null;
1223
- }
1224
- __name(find, "find");
1225
- const instance = {
1226
- query,
1227
- find,
1228
- setIndex: /* @__PURE__ */__name(index => {
1229
- config.index = index;
1230
- }, "setIndex"),
1231
- getIndex: /* @__PURE__ */__name(() => config.index, "getIndex"),
1232
- cleanup
1233
- };
1234
- return instance;
1235
- }
1236
- __name(initRedundancy, "initRedundancy");
1237
- function createAPIConfig(source) {
1238
- let resources;
1239
- if (typeof source.resources === "string") {
1240
- resources = [source.resources];
1241
- } else {
1242
- resources = source.resources;
1243
- if (!(resources instanceof Array) || !resources.length) {
1244
- return null;
1245
- }
1246
- }
1247
- const result = {
1248
- // API hosts
1249
- resources,
1250
- // Root path
1251
- path: source.path || "/",
1252
- // URL length limit
1253
- maxURL: source.maxURL || 500,
1254
- // Timeout before next host is used.
1255
- rotate: source.rotate || 750,
1256
- // Timeout before failing query.
1257
- timeout: source.timeout || 5e3,
1258
- // Randomise default API end point.
1259
- random: source.random === true,
1260
- // Start index
1261
- index: source.index || 0,
1262
- // Receive data after time out (used if time out kicks in first, then API module sends data anyway).
1263
- dataAfterTimeout: source.dataAfterTimeout !== false
1264
- };
1265
- return result;
1266
- }
1267
- __name(createAPIConfig, "createAPIConfig");
1268
- var configStorage = /* @__PURE__ */Object.create(null);
1269
- var fallBackAPISources = ["https://api.simplesvg.com", "https://api.unisvg.com"];
1270
- var fallBackAPI = [];
1271
- while (fallBackAPISources.length > 0) {
1272
- if (fallBackAPISources.length === 1) {
1273
- fallBackAPI.push(fallBackAPISources.shift());
1274
- } else {
1275
- if (Math.random() > 0.5) {
1276
- fallBackAPI.push(fallBackAPISources.shift());
1277
- } else {
1278
- fallBackAPI.push(fallBackAPISources.pop());
1279
- }
1280
- }
1281
- }
1282
- configStorage[""] = createAPIConfig({
1283
- resources: ["https://api.iconify.design"].concat(fallBackAPI)
1284
- });
1285
- function addAPIProvider$1(provider, customConfig) {
1286
- const config = createAPIConfig(customConfig);
1287
- if (config === null) {
1288
- return false;
1289
- }
1290
- configStorage[provider] = config;
1291
- return true;
1292
- }
1293
- __name(addAPIProvider$1, "addAPIProvider$1");
1294
- function getAPIConfig(provider) {
1295
- return configStorage[provider];
1296
- }
1297
- __name(getAPIConfig, "getAPIConfig");
1298
- function listAPIProviders() {
1299
- return Object.keys(configStorage);
1300
- }
1301
- __name(listAPIProviders, "listAPIProviders");
1302
- function emptyCallback$1() {}
1303
- __name(emptyCallback$1, "emptyCallback$1");
1304
- var redundancyCache = /* @__PURE__ */Object.create(null);
1305
- function getRedundancyCache(provider) {
1306
- if (!redundancyCache[provider]) {
1307
- const config = getAPIConfig(provider);
1308
- if (!config) {
1309
- return;
1310
- }
1311
- const redundancy = initRedundancy(config);
1312
- const cachedReundancy = {
1313
- config,
1314
- redundancy
1315
- };
1316
- redundancyCache[provider] = cachedReundancy;
1317
- }
1318
- return redundancyCache[provider];
1319
- }
1320
- __name(getRedundancyCache, "getRedundancyCache");
1321
- function sendAPIQuery(target, query, callback) {
1322
- let redundancy;
1323
- let send2;
1324
- if (typeof target === "string") {
1325
- const api = getAPIModule(target);
1326
- if (!api) {
1327
- callback(void 0, 424);
1328
- return emptyCallback$1;
1329
- }
1330
- send2 = api.send;
1331
- const cached = getRedundancyCache(target);
1332
- if (cached) {
1333
- redundancy = cached.redundancy;
1334
- }
1335
- } else {
1336
- const config = createAPIConfig(target);
1337
- if (config) {
1338
- redundancy = initRedundancy(config);
1339
- const moduleKey = target.resources ? target.resources[0] : "";
1340
- const api = getAPIModule(moduleKey);
1341
- if (api) {
1342
- send2 = api.send;
1343
- }
1344
- }
1345
- }
1346
- if (!redundancy || !send2) {
1347
- callback(void 0, 424);
1348
- return emptyCallback$1;
1349
- }
1350
- return redundancy.query(query, send2, callback)().abort;
1351
- }
1352
- __name(sendAPIQuery, "sendAPIQuery");
1353
- function emptyCallback() {}
1354
- __name(emptyCallback, "emptyCallback");
1355
- function loadedNewIcons(storage2) {
1356
- if (!storage2.iconsLoaderFlag) {
1357
- storage2.iconsLoaderFlag = true;
1358
- setTimeout(() => {
1359
- storage2.iconsLoaderFlag = false;
1360
- updateCallbacks(storage2);
1361
- });
1362
- }
1363
- }
1364
- __name(loadedNewIcons, "loadedNewIcons");
1365
- function checkIconNamesForAPI(icons) {
1366
- const valid = [];
1367
- const invalid = [];
1368
- icons.forEach(name => {
1369
- (name.match(matchIconName) ? valid : invalid).push(name);
1370
- });
1371
- return {
1372
- valid,
1373
- invalid
1374
- };
1375
- }
1376
- __name(checkIconNamesForAPI, "checkIconNamesForAPI");
1377
- function parseLoaderResponse(storage2, icons, data) {
1378
- function checkMissing() {
1379
- const pending = storage2.pendingIcons;
1380
- icons.forEach(name => {
1381
- if (pending) {
1382
- pending.delete(name);
1383
- }
1384
- if (!storage2.icons[name]) {
1385
- storage2.missing.add(name);
1386
- }
1387
- });
1388
- }
1389
- __name(checkMissing, "checkMissing");
1390
- if (data && typeof data === "object") {
1391
- try {
1392
- const parsed = addIconSet(storage2, data);
1393
- if (!parsed.length) {
1394
- checkMissing();
1395
- return;
1396
- }
1397
- } catch (err) {
1398
- console.error(err);
1399
- }
1400
- }
1401
- checkMissing();
1402
- loadedNewIcons(storage2);
1403
- }
1404
- __name(parseLoaderResponse, "parseLoaderResponse");
1405
- function parsePossiblyAsyncResponse(response, callback) {
1406
- if (response instanceof Promise) {
1407
- response.then(data => {
1408
- callback(data);
1409
- }).catch(() => {
1410
- callback(null);
1411
- });
1412
- } else {
1413
- callback(response);
1414
- }
1415
- }
1416
- __name(parsePossiblyAsyncResponse, "parsePossiblyAsyncResponse");
1417
- function loadNewIcons(storage2, icons) {
1418
- if (!storage2.iconsToLoad) {
1419
- storage2.iconsToLoad = icons;
1420
- } else {
1421
- storage2.iconsToLoad = storage2.iconsToLoad.concat(icons).sort();
1422
- }
1423
- if (!storage2.iconsQueueFlag) {
1424
- storage2.iconsQueueFlag = true;
1425
- setTimeout(() => {
1426
- storage2.iconsQueueFlag = false;
1427
- const {
1428
- provider,
1429
- prefix: prefix2
1430
- } = storage2;
1431
- const icons2 = storage2.iconsToLoad;
1432
- delete storage2.iconsToLoad;
1433
- if (!icons2 || !icons2.length) {
1434
- return;
1435
- }
1436
- const customIconLoader = storage2.loadIcon;
1437
- if (storage2.loadIcons && (icons2.length > 1 || !customIconLoader)) {
1438
- parsePossiblyAsyncResponse(storage2.loadIcons(icons2, prefix2, provider), data => {
1439
- parseLoaderResponse(storage2, icons2, data);
1440
- });
1441
- return;
1442
- }
1443
- if (customIconLoader) {
1444
- icons2.forEach(name => {
1445
- const response = customIconLoader(name, prefix2, provider);
1446
- parsePossiblyAsyncResponse(response, data => {
1447
- const iconSet = data ? {
1448
- prefix: prefix2,
1449
- icons: {
1450
- [name]: data
1451
- }
1452
- } : null;
1453
- parseLoaderResponse(storage2, [name], iconSet);
1454
- });
1455
- });
1456
- return;
1457
- }
1458
- const {
1459
- valid,
1460
- invalid
1461
- } = checkIconNamesForAPI(icons2);
1462
- if (invalid.length) {
1463
- parseLoaderResponse(storage2, invalid, null);
1464
- }
1465
- if (!valid.length) {
1466
- return;
1467
- }
1468
- const api = prefix2.match(matchIconName) ? getAPIModule(provider) : null;
1469
- if (!api) {
1470
- parseLoaderResponse(storage2, valid, null);
1471
- return;
1472
- }
1473
- const params = api.prepare(provider, prefix2, valid);
1474
- params.forEach(item => {
1475
- sendAPIQuery(provider, item, data => {
1476
- parseLoaderResponse(storage2, item.icons, data);
1477
- });
1478
- });
1479
- });
1480
- }
1481
- }
1482
- __name(loadNewIcons, "loadNewIcons");
1483
- var loadIcons$1 = /* @__PURE__ */__name((icons, callback) => {
1484
- const cleanedIcons = listToIcons(icons, true, allowSimpleNames());
1485
- const sortedIcons = sortIcons(cleanedIcons);
1486
- if (!sortedIcons.pending.length) {
1487
- let callCallback = true;
1488
- if (callback) {
1489
- setTimeout(() => {
1490
- if (callCallback) {
1491
- callback(sortedIcons.loaded, sortedIcons.missing, sortedIcons.pending, emptyCallback);
1492
- }
1493
- });
1494
- }
1495
- return () => {
1496
- callCallback = false;
1497
- };
1498
- }
1499
- const newIcons = /* @__PURE__ */Object.create(null);
1500
- const sources = [];
1501
- let lastProvider, lastPrefix;
1502
- sortedIcons.pending.forEach(icon => {
1503
- const {
1504
- provider,
1505
- prefix: prefix2
1506
- } = icon;
1507
- if (prefix2 === lastPrefix && provider === lastProvider) {
1508
- return;
1509
- }
1510
- lastProvider = provider;
1511
- lastPrefix = prefix2;
1512
- sources.push(getStorage(provider, prefix2));
1513
- const providerNewIcons = newIcons[provider] || (newIcons[provider] = /* @__PURE__ */Object.create(null));
1514
- if (!providerNewIcons[prefix2]) {
1515
- providerNewIcons[prefix2] = [];
1516
- }
1517
- });
1518
- sortedIcons.pending.forEach(icon => {
1519
- const {
1520
- provider,
1521
- prefix: prefix2,
1522
- name
1523
- } = icon;
1524
- const storage2 = getStorage(provider, prefix2);
1525
- const pendingQueue = storage2.pendingIcons || (storage2.pendingIcons = /* @__PURE__ */new Set());
1526
- if (!pendingQueue.has(name)) {
1527
- pendingQueue.add(name);
1528
- newIcons[provider][prefix2].push(name);
1529
- }
1530
- });
1531
- sources.forEach(storage2 => {
1532
- const list = newIcons[storage2.provider][storage2.prefix];
1533
- if (list.length) {
1534
- loadNewIcons(storage2, list);
1535
- }
1536
- });
1537
- return callback ? storeCallback(callback, sortedIcons, sources) : emptyCallback;
1538
- }, "loadIcons$1");
1539
- var loadIcon$1 = /* @__PURE__ */__name(icon => {
1540
- return new Promise((fulfill, reject) => {
1541
- const iconObj = typeof icon === "string" ? stringToIcon(icon, true) : icon;
1542
- if (!iconObj) {
1543
- reject(icon);
1544
- return;
1545
- }
1546
- loadIcons$1([iconObj || icon], loaded => {
1547
- if (loaded.length && iconObj) {
1548
- const data = getIconData(iconObj);
1549
- if (data) {
1550
- fulfill({
1551
- ...defaultIconProps,
1552
- ...data
1553
- });
1554
- return;
1555
- }
1556
- }
1557
- reject(icon);
1558
- });
1559
- });
1560
- }, "loadIcon$1");
1561
- function testIconObject(value) {
1562
- try {
1563
- const obj = typeof value === "string" ? JSON.parse(value) : value;
1564
- if (typeof obj.body === "string") {
1565
- return {
1566
- ...obj
1567
- };
1568
- }
1569
- } catch (err) {}
1570
- }
1571
- __name(testIconObject, "testIconObject");
1572
- function parseIconValue(value, onload) {
1573
- if (typeof value === "object") {
1574
- const data2 = testIconObject(value);
1575
- return {
1576
- data: data2,
1577
- value
1578
- };
1579
- }
1580
- if (typeof value !== "string") {
1581
- return {
1582
- value
1583
- };
1584
- }
1585
- if (value.includes("{")) {
1586
- const data2 = testIconObject(value);
1587
- if (data2) {
1588
- return {
1589
- data: data2,
1590
- value
1591
- };
1592
- }
1593
- }
1594
- const name = stringToIcon(value, true, true);
1595
- if (!name) {
1596
- return {
1597
- value
1598
- };
1599
- }
1600
- const data = getIconData(name);
1601
- if (data !== void 0 || !name.prefix) {
1602
- return {
1603
- value,
1604
- name,
1605
- data
1606
- // could be 'null' -> icon is missing
1607
- };
1608
- }
1609
- const loading = loadIcons$1([name], () => onload(value, name, getIconData(name)));
1610
- return {
1611
- value,
1612
- name,
1613
- loading
1614
- };
1615
- }
1616
- __name(parseIconValue, "parseIconValue");
1617
- var isBuggedSafari = false;
1618
- try {
1619
- isBuggedSafari = navigator.vendor.indexOf("Apple") === 0;
1620
- } catch (err) {}
1621
- function getRenderMode(body, mode) {
1622
- switch (mode) {
1623
- // Force mode
1624
- case "svg":
1625
- case "bg":
1626
- case "mask":
1627
- return mode;
1628
- }
1629
- if (mode !== "style" && (isBuggedSafari || body.indexOf("<a") === -1)) {
1630
- return "svg";
1631
- }
1632
- return body.indexOf("currentColor") === -1 ? "bg" : "mask";
1633
- }
1634
- __name(getRenderMode, "getRenderMode");
1635
- var unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;
1636
- var unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
1637
- function calculateSize$1(size, ratio, precision) {
1638
- if (ratio === 1) {
1639
- return size;
1640
- }
1641
- precision = precision || 100;
1642
- if (typeof size === "number") {
1643
- return Math.ceil(size * ratio * precision) / precision;
1644
- }
1645
- if (typeof size !== "string") {
1646
- return size;
1647
- }
1648
- const oldParts = size.split(unitsSplit);
1649
- if (oldParts === null || !oldParts.length) {
1650
- return size;
1651
- }
1652
- const newParts = [];
1653
- let code = oldParts.shift();
1654
- let isNumber = unitsTest.test(code);
1655
- while (true) {
1656
- if (isNumber) {
1657
- const num = parseFloat(code);
1658
- if (isNaN(num)) {
1659
- newParts.push(code);
1660
- } else {
1661
- newParts.push(Math.ceil(num * ratio * precision) / precision);
1662
- }
1663
- } else {
1664
- newParts.push(code);
1665
- }
1666
- code = oldParts.shift();
1667
- if (code === void 0) {
1668
- return newParts.join("");
1669
- }
1670
- isNumber = !isNumber;
1671
- }
1672
- }
1673
- __name(calculateSize$1, "calculateSize$1");
1674
- function splitSVGDefs(content, tag = "defs") {
1675
- let defs = "";
1676
- const index = content.indexOf("<" + tag);
1677
- while (index >= 0) {
1678
- const start = content.indexOf(">", index);
1679
- const end = content.indexOf("</" + tag);
1680
- if (start === -1 || end === -1) {
1681
- break;
1682
- }
1683
- const endEnd = content.indexOf(">", end);
1684
- if (endEnd === -1) {
1685
- break;
1686
- }
1687
- defs += content.slice(start + 1, end).trim();
1688
- content = content.slice(0, index).trim() + content.slice(endEnd + 1);
1689
- }
1690
- return {
1691
- defs,
1692
- content
1693
- };
1694
- }
1695
- __name(splitSVGDefs, "splitSVGDefs");
1696
- function mergeDefsAndContent(defs, content) {
1697
- return defs ? "<defs>" + defs + "</defs>" + content : content;
1698
- }
1699
- __name(mergeDefsAndContent, "mergeDefsAndContent");
1700
- function wrapSVGContent(body, start, end) {
1701
- const split = splitSVGDefs(body);
1702
- return mergeDefsAndContent(split.defs, start + split.content + end);
1703
- }
1704
- __name(wrapSVGContent, "wrapSVGContent");
1705
- var isUnsetKeyword = /* @__PURE__ */__name(value => value === "unset" || value === "undefined" || value === "none", "isUnsetKeyword");
1706
- function iconToSVG(icon, customisations) {
1707
- const fullIcon = {
1708
- ...defaultIconProps,
1709
- ...icon
1710
- };
1711
- const fullCustomisations = {
1712
- ...defaultIconCustomisations,
1713
- ...customisations
1714
- };
1715
- const box = {
1716
- left: fullIcon.left,
1717
- top: fullIcon.top,
1718
- width: fullIcon.width,
1719
- height: fullIcon.height
1720
- };
1721
- let body = fullIcon.body;
1722
- [fullIcon, fullCustomisations].forEach(props => {
1723
- const transformations = [];
1724
- const hFlip = props.hFlip;
1725
- const vFlip = props.vFlip;
1726
- let rotation = props.rotate;
1727
- if (hFlip) {
1728
- if (vFlip) {
1729
- rotation += 2;
1730
- } else {
1731
- transformations.push("translate(" + (box.width + box.left).toString() + " " + (0 - box.top).toString() + ")");
1732
- transformations.push("scale(-1 1)");
1733
- box.top = box.left = 0;
1734
- }
1735
- } else if (vFlip) {
1736
- transformations.push("translate(" + (0 - box.left).toString() + " " + (box.height + box.top).toString() + ")");
1737
- transformations.push("scale(1 -1)");
1738
- box.top = box.left = 0;
1739
- }
1740
- let tempValue;
1741
- if (rotation < 0) {
1742
- rotation -= Math.floor(rotation / 4) * 4;
1743
- }
1744
- rotation = rotation % 4;
1745
- switch (rotation) {
1746
- case 1:
1747
- tempValue = box.height / 2 + box.top;
1748
- transformations.unshift("rotate(90 " + tempValue.toString() + " " + tempValue.toString() + ")");
1749
- break;
1750
- case 2:
1751
- transformations.unshift("rotate(180 " + (box.width / 2 + box.left).toString() + " " + (box.height / 2 + box.top).toString() + ")");
1752
- break;
1753
- case 3:
1754
- tempValue = box.width / 2 + box.left;
1755
- transformations.unshift("rotate(-90 " + tempValue.toString() + " " + tempValue.toString() + ")");
1756
- break;
1757
- }
1758
- if (rotation % 2 === 1) {
1759
- if (box.left !== box.top) {
1760
- tempValue = box.left;
1761
- box.left = box.top;
1762
- box.top = tempValue;
1763
- }
1764
- if (box.width !== box.height) {
1765
- tempValue = box.width;
1766
- box.width = box.height;
1767
- box.height = tempValue;
1768
- }
1769
- }
1770
- if (transformations.length) {
1771
- body = wrapSVGContent(body, '<g transform="' + transformations.join(" ") + '">', "</g>");
1772
- }
1773
- });
1774
- const customisationsWidth = fullCustomisations.width;
1775
- const customisationsHeight = fullCustomisations.height;
1776
- const boxWidth = box.width;
1777
- const boxHeight = box.height;
1778
- let width;
1779
- let height;
1780
- if (customisationsWidth === null) {
1781
- height = customisationsHeight === null ? "1em" : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
1782
- width = calculateSize$1(height, boxWidth / boxHeight);
1783
- } else {
1784
- width = customisationsWidth === "auto" ? boxWidth : customisationsWidth;
1785
- height = customisationsHeight === null ? calculateSize$1(width, boxHeight / boxWidth) : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
1786
- }
1787
- const attributes = {};
1788
- const setAttr = /* @__PURE__ */__name((prop, value) => {
1789
- if (!isUnsetKeyword(value)) {
1790
- attributes[prop] = value.toString();
1791
- }
1792
- }, "setAttr");
1793
- setAttr("width", width);
1794
- setAttr("height", height);
1795
- const viewBox = [box.left, box.top, boxWidth, boxHeight];
1796
- attributes.viewBox = viewBox.join(" ");
1797
- return {
1798
- attributes,
1799
- viewBox,
1800
- body
1801
- };
1802
- }
1803
- __name(iconToSVG, "iconToSVG");
1804
- function iconToHTML$1(body, attributes) {
1805
- let renderAttribsHTML = body.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
1806
- for (const attr in attributes) {
1807
- renderAttribsHTML += " " + attr + '="' + attributes[attr] + '"';
1808
- }
1809
- return '<svg xmlns="http://www.w3.org/2000/svg"' + renderAttribsHTML + ">" + body + "</svg>";
1810
- }
1811
- __name(iconToHTML$1, "iconToHTML$1");
1812
- function encodeSVGforURL(svg) {
1813
- return svg.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1814
- }
1815
- __name(encodeSVGforURL, "encodeSVGforURL");
1816
- function svgToData(svg) {
1817
- return "data:image/svg+xml," + encodeSVGforURL(svg);
1818
- }
1819
- __name(svgToData, "svgToData");
1820
- function svgToURL$1(svg) {
1821
- return 'url("' + svgToData(svg) + '")';
1822
- }
1823
- __name(svgToURL$1, "svgToURL$1");
1824
- var detectFetch = /* @__PURE__ */__name(() => {
1825
- let callback;
1826
- try {
1827
- callback = fetch;
1828
- if (typeof callback === "function") {
1829
- return callback;
1830
- }
1831
- } catch (err) {}
1832
- }, "detectFetch");
1833
- var fetchModule = detectFetch();
1834
- function setFetch(fetch2) {
1835
- fetchModule = fetch2;
1836
- }
1837
- __name(setFetch, "setFetch");
1838
- function getFetch() {
1839
- return fetchModule;
1840
- }
1841
- __name(getFetch, "getFetch");
1842
- function calculateMaxLength(provider, prefix2) {
1843
- const config = getAPIConfig(provider);
1844
- if (!config) {
1845
- return 0;
1846
- }
1847
- let result;
1848
- if (!config.maxURL) {
1849
- result = 0;
1850
- } else {
1851
- let maxHostLength = 0;
1852
- config.resources.forEach(item => {
1853
- const host = item;
1854
- maxHostLength = Math.max(maxHostLength, host.length);
1855
- });
1856
- const url = prefix2 + ".json?icons=";
1857
- result = config.maxURL - maxHostLength - config.path.length - url.length;
1858
- }
1859
- return result;
1860
- }
1861
- __name(calculateMaxLength, "calculateMaxLength");
1862
- function shouldAbort(status) {
1863
- return status === 404;
1864
- }
1865
- __name(shouldAbort, "shouldAbort");
1866
- var prepare = /* @__PURE__ */__name((provider, prefix2, icons) => {
1867
- const results = [];
1868
- const maxLength = calculateMaxLength(provider, prefix2);
1869
- const type = "icons";
1870
- let item = {
1871
- type,
1872
- provider,
1873
- prefix: prefix2,
1874
- icons: []
1875
- };
1876
- let length2 = 0;
1877
- icons.forEach((name, index) => {
1878
- length2 += name.length + 1;
1879
- if (length2 >= maxLength && index > 0) {
1880
- results.push(item);
1881
- item = {
1882
- type,
1883
- provider,
1884
- prefix: prefix2,
1885
- icons: []
1886
- };
1887
- length2 = name.length;
1888
- }
1889
- item.icons.push(name);
1890
- });
1891
- results.push(item);
1892
- return results;
1893
- }, "prepare");
1894
- function getPath(provider) {
1895
- if (typeof provider === "string") {
1896
- const config = getAPIConfig(provider);
1897
- if (config) {
1898
- return config.path;
1899
- }
1900
- }
1901
- return "/";
1902
- }
1903
- __name(getPath, "getPath");
1904
- var send = /* @__PURE__ */__name((host, params, callback) => {
1905
- if (!fetchModule) {
1906
- callback("abort", 424);
1907
- return;
1908
- }
1909
- let path = getPath(params.provider);
1910
- switch (params.type) {
1911
- case "icons":
1912
- {
1913
- const prefix2 = params.prefix;
1914
- const icons = params.icons;
1915
- const iconsList = icons.join(",");
1916
- const urlParams = new URLSearchParams({
1917
- icons: iconsList
1918
- });
1919
- path += prefix2 + ".json?" + urlParams.toString();
1920
- break;
1921
- }
1922
- case "custom":
1923
- {
1924
- const uri = params.uri;
1925
- path += uri.slice(0, 1) === "/" ? uri.slice(1) : uri;
1926
- break;
1927
- }
1928
- default:
1929
- callback("abort", 400);
1930
- return;
1931
- }
1932
- let defaultError = 503;
1933
- fetchModule(host + path).then(response => {
1934
- const status = response.status;
1935
- if (status !== 200) {
1936
- setTimeout(() => {
1937
- callback(shouldAbort(status) ? "abort" : "next", status);
1938
- });
1939
- return;
1940
- }
1941
- defaultError = 501;
1942
- return response.json();
1943
- }).then(data => {
1944
- if (typeof data !== "object" || data === null) {
1945
- setTimeout(() => {
1946
- if (data === 404) {
1947
- callback("abort", data);
1948
- } else {
1949
- callback("next", defaultError);
1950
- }
1951
- });
1952
- return;
1953
- }
1954
- setTimeout(() => {
1955
- callback("success", data);
1956
- });
1957
- }).catch(() => {
1958
- callback("next", defaultError);
1959
- });
1960
- }, "send");
1961
- var fetchAPIModule = {
1962
- prepare,
1963
- send
1964
- };
1965
- function setCustomIconsLoader$1(loader, prefix2, provider) {
1966
- getStorage(provider || "", prefix2).loadIcons = loader;
1967
- }
1968
- __name(setCustomIconsLoader$1, "setCustomIconsLoader$1");
1969
- function setCustomIconLoader$1(loader, prefix2, provider) {
1970
- getStorage(provider || "", prefix2).loadIcon = loader;
1971
- }
1972
- __name(setCustomIconLoader$1, "setCustomIconLoader$1");
1973
- var nodeAttr = "data-style";
1974
- var customStyle = "";
1975
- function appendCustomStyle(style) {
1976
- customStyle = style;
1977
- }
1978
- __name(appendCustomStyle, "appendCustomStyle");
1979
- function updateStyle(parent, inline) {
1980
- let styleNode = Array.from(parent.childNodes).find(node2 => node2.hasAttribute && node2.hasAttribute(nodeAttr));
1981
- if (!styleNode) {
1982
- styleNode = document.createElement("style");
1983
- styleNode.setAttribute(nodeAttr, nodeAttr);
1984
- parent.appendChild(styleNode);
1985
- }
1986
- styleNode.textContent = ":host{display:inline-block;vertical-align:" + (inline ? "-0.125em" : "0") + "}span,svg{display:block;margin:auto}" + customStyle;
1987
- }
1988
- __name(updateStyle, "updateStyle");
1989
- function exportFunctions() {
1990
- setAPIModule("", fetchAPIModule);
1991
- allowSimpleNames(true);
1992
- let _window;
1993
- try {
1994
- _window = window;
1995
- } catch (err) {}
1996
- if (_window) {
1997
- if (_window.IconifyPreload !== void 0) {
1998
- const preload = _window.IconifyPreload;
1999
- const err = "Invalid IconifyPreload syntax.";
2000
- if (typeof preload === "object" && preload !== null) {
2001
- (preload instanceof Array ? preload : [preload]).forEach(item => {
2002
- try {
2003
- if (
2004
- // Check if item is an object and not null/array
2005
- typeof item !== "object" || item === null || item instanceof Array ||
2006
- // Check for 'icons' and 'prefix'
2007
- typeof item.icons !== "object" || typeof item.prefix !== "string" ||
2008
- // Add icon set
2009
- !addCollection$1(item)) {
2010
- console.error(err);
2011
- }
2012
- } catch (e) {
2013
- console.error(err);
2014
- }
2015
- });
2016
- }
2017
- }
2018
- if (_window.IconifyProviders !== void 0) {
2019
- const providers = _window.IconifyProviders;
2020
- if (typeof providers === "object" && providers !== null) {
2021
- for (const key in providers) {
2022
- const err = "IconifyProviders[" + key + "] is invalid.";
2023
- try {
2024
- const value = providers[key];
2025
- if (typeof value !== "object" || !value || value.resources === void 0) {
2026
- continue;
2027
- }
2028
- if (!addAPIProvider$1(key, value)) {
2029
- console.error(err);
2030
- }
2031
- } catch (e) {
2032
- console.error(err);
2033
- }
2034
- }
2035
- }
2036
- }
2037
- }
2038
- const _api2 = {
2039
- getAPIConfig,
2040
- setAPIModule,
2041
- sendAPIQuery,
2042
- setFetch,
2043
- getFetch,
2044
- listAPIProviders
2045
- };
2046
- return {
2047
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2048
- enableCache: /* @__PURE__ */__name(storage2 => {}, "enableCache"),
2049
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2050
- disableCache: /* @__PURE__ */__name(storage2 => {}, "disableCache"),
2051
- iconLoaded: iconLoaded$1,
2052
- iconExists: iconLoaded$1,
2053
- // deprecated, kept to avoid breaking changes
2054
- getIcon: getIcon$1,
2055
- listIcons: listIcons$1,
2056
- addIcon: addIcon$1,
2057
- addCollection: addCollection$1,
2058
- calculateSize: calculateSize$1,
2059
- buildIcon: iconToSVG,
2060
- iconToHTML: iconToHTML$1,
2061
- svgToURL: svgToURL$1,
2062
- loadIcons: loadIcons$1,
2063
- loadIcon: loadIcon$1,
2064
- addAPIProvider: addAPIProvider$1,
2065
- setCustomIconLoader: setCustomIconLoader$1,
2066
- setCustomIconsLoader: setCustomIconsLoader$1,
2067
- appendCustomStyle,
2068
- _api: _api2
2069
- };
2070
- }
2071
- __name(exportFunctions, "exportFunctions");
2072
- var monotoneProps = {
2073
- "background-color": "currentColor"
2074
- };
2075
- var coloredProps = {
2076
- "background-color": "transparent"
2077
- };
2078
- var propsToAdd = {
2079
- image: "var(--svg)",
2080
- repeat: "no-repeat",
2081
- size: "100% 100%"
2082
- };
2083
- var propsToAddTo = {
2084
- "-webkit-mask": monotoneProps,
2085
- "mask": monotoneProps,
2086
- "background": coloredProps
2087
- };
2088
- for (const prefix2 in propsToAddTo) {
2089
- const list = propsToAddTo[prefix2];
2090
- for (const prop in propsToAdd) {
2091
- list[prefix2 + "-" + prop] = propsToAdd[prop];
2092
- }
2093
- }
2094
- function fixSize(value) {
2095
- return value ? value + (value.match(/^[-0-9.]+$/) ? "px" : "") : "inherit";
2096
- }
2097
- __name(fixSize, "fixSize");
2098
- function renderSPAN(data, icon, useMask) {
2099
- const node2 = document.createElement("span");
2100
- let body = data.body;
2101
- if (body.indexOf("<a") !== -1) {
2102
- body += "<!-- " + Date.now() + " -->";
2103
- }
2104
- const renderAttribs = data.attributes;
2105
- const html = iconToHTML$1(body, {
2106
- ...renderAttribs,
2107
- width: icon.width + "",
2108
- height: icon.height + ""
2109
- });
2110
- const url = svgToURL$1(html);
2111
- const svgStyle = node2.style;
2112
- const styles = {
2113
- "--svg": url,
2114
- "width": fixSize(renderAttribs.width),
2115
- "height": fixSize(renderAttribs.height),
2116
- ...(useMask ? monotoneProps : coloredProps)
2117
- };
2118
- for (const prop in styles) {
2119
- svgStyle.setProperty(prop, styles[prop]);
2120
- }
2121
- return node2;
2122
- }
2123
- __name(renderSPAN, "renderSPAN");
2124
- var policy;
2125
- function createPolicy() {
2126
- try {
2127
- policy = window.trustedTypes.createPolicy("iconify", {
2128
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
2129
- createHTML: /* @__PURE__ */__name(s => s, "createHTML")
2130
- });
2131
- } catch (err) {
2132
- policy = null;
2133
- }
2134
- }
2135
- __name(createPolicy, "createPolicy");
2136
- function cleanUpInnerHTML(html) {
2137
- if (policy === void 0) {
2138
- createPolicy();
2139
- }
2140
- return policy ? policy.createHTML(html) : html;
2141
- }
2142
- __name(cleanUpInnerHTML, "cleanUpInnerHTML");
2143
- function renderSVG(data) {
2144
- const node2 = document.createElement("span");
2145
- const attr = data.attributes;
2146
- let style = "";
2147
- if (!attr.width) {
2148
- style = "width: inherit;";
2149
- }
2150
- if (!attr.height) {
2151
- style += "height: inherit;";
2152
- }
2153
- if (style) {
2154
- attr.style = style;
2155
- }
2156
- const html = iconToHTML$1(data.body, attr);
2157
- node2.innerHTML = cleanUpInnerHTML(html);
2158
- return node2.firstChild;
2159
- }
2160
- __name(renderSVG, "renderSVG");
2161
- function findIconElement(parent) {
2162
- return Array.from(parent.childNodes).find(node2 => {
2163
- const tag = node2.tagName && node2.tagName.toUpperCase();
2164
- return tag === "SPAN" || tag === "SVG";
2165
- });
2166
- }
2167
- __name(findIconElement, "findIconElement");
2168
- function renderIcon(parent, state) {
2169
- const iconData = state.icon.data;
2170
- const customisations = state.customisations;
2171
- const renderData = iconToSVG(iconData, customisations);
2172
- if (customisations.preserveAspectRatio) {
2173
- renderData.attributes["preserveAspectRatio"] = customisations.preserveAspectRatio;
2174
- }
2175
- const mode = state.renderedMode;
2176
- let node2;
2177
- switch (mode) {
2178
- case "svg":
2179
- node2 = renderSVG(renderData);
2180
- break;
2181
- default:
2182
- node2 = renderSPAN(renderData, {
2183
- ...defaultIconProps,
2184
- ...iconData
2185
- }, mode === "mask");
2186
- }
2187
- const oldNode = findIconElement(parent);
2188
- if (oldNode) {
2189
- if (node2.tagName === "SPAN" && oldNode.tagName === node2.tagName) {
2190
- oldNode.setAttribute("style", node2.getAttribute("style"));
2191
- } else {
2192
- parent.replaceChild(node2, oldNode);
2193
- }
2194
- } else {
2195
- parent.appendChild(node2);
2196
- }
2197
- }
2198
- __name(renderIcon, "renderIcon");
2199
- function setPendingState(icon, inline, lastState) {
2200
- const lastRender = lastState && (lastState.rendered ? lastState : lastState.lastRender);
2201
- return {
2202
- rendered: false,
2203
- inline,
2204
- icon,
2205
- lastRender
2206
- };
2207
- }
2208
- __name(setPendingState, "setPendingState");
2209
- function defineIconifyIcon(name = "iconify-icon") {
2210
- let customElements;
2211
- let ParentClass;
2212
- try {
2213
- customElements = window.customElements;
2214
- ParentClass = window.HTMLElement;
2215
- } catch (err) {
2216
- return;
2217
- }
2218
- if (!customElements || !ParentClass) {
2219
- return;
2220
- }
2221
- const ConflictingClass = customElements.get(name);
2222
- if (ConflictingClass) {
2223
- return ConflictingClass;
2224
- }
2225
- const attributes = [
2226
- // Icon
2227
- "icon",
2228
- // Mode
2229
- "mode", "inline", "noobserver",
2230
- // Customisations
2231
- "width", "height", "rotate", "flip"];
2232
- const IconifyIcon = class extends ParentClass {
2233
- static {
2234
- __name(this, "IconifyIcon");
2235
- }
2236
- // Root
2237
- _shadowRoot;
2238
- // Initialised
2239
- _initialised = false;
2240
- // Icon state
2241
- _state;
2242
- // Attributes check queued
2243
- _checkQueued = false;
2244
- // Connected
2245
- _connected = false;
2246
- // Observer
2247
- _observer = null;
2248
- _visible = true;
2249
- /**
2250
- * Constructor
2251
- */
2252
- constructor() {
2253
- super();
2254
- const root = this._shadowRoot = this.attachShadow({
2255
- mode: "open"
2256
- });
2257
- const inline = this.hasAttribute("inline");
2258
- updateStyle(root, inline);
2259
- this._state = setPendingState({
2260
- value: ""
2261
- }, inline);
2262
- this._queueCheck();
2263
- }
2264
- /**
2265
- * Connected to DOM
2266
- */
2267
- connectedCallback() {
2268
- this._connected = true;
2269
- this.startObserver();
2270
- }
2271
- /**
2272
- * Disconnected from DOM
2273
- */
2274
- disconnectedCallback() {
2275
- this._connected = false;
2276
- this.stopObserver();
2277
- }
2278
- /**
2279
- * Observed attributes
2280
- */
2281
- static get observedAttributes() {
2282
- return attributes.slice(0);
2283
- }
2284
- /**
2285
- * Observed properties that are different from attributes
2286
- *
2287
- * Experimental! Need to test with various frameworks that support it
2288
- */
2289
- /*
2290
- static get properties() {
2291
- return {
2292
- inline: {
2293
- type: Boolean,
2294
- reflect: true,
2295
- },
2296
- // Not listing other attributes because they are strings or combination
2297
- // of string and another type. Cannot have multiple types
2298
- };
2299
- }
2300
- */
2301
- /**
2302
- * Attribute has changed
2303
- */
2304
- attributeChangedCallback(name2) {
2305
- switch (name2) {
2306
- case "inline":
2307
- {
2308
- const newInline = this.hasAttribute("inline");
2309
- const state = this._state;
2310
- if (newInline !== state.inline) {
2311
- state.inline = newInline;
2312
- updateStyle(this._shadowRoot, newInline);
2313
- }
2314
- break;
2315
- }
2316
- case "noobserver":
2317
- {
2318
- const value = this.hasAttribute("noobserver");
2319
- if (value) {
2320
- this.startObserver();
2321
- } else {
2322
- this.stopObserver();
2323
- }
2324
- break;
2325
- }
2326
- default:
2327
- this._queueCheck();
2328
- }
2329
- }
2330
- /**
2331
- * Get/set icon
2332
- */
2333
- get icon() {
2334
- const value = this.getAttribute("icon");
2335
- if (value && value.slice(0, 1) === "{") {
2336
- try {
2337
- return JSON.parse(value);
2338
- } catch (err) {}
2339
- }
2340
- return value;
2341
- }
2342
- set icon(value) {
2343
- if (typeof value === "object") {
2344
- value = JSON.stringify(value);
2345
- }
2346
- this.setAttribute("icon", value);
2347
- }
2348
- /**
2349
- * Get/set inline
2350
- */
2351
- get inline() {
2352
- return this.hasAttribute("inline");
2353
- }
2354
- set inline(value) {
2355
- if (value) {
2356
- this.setAttribute("inline", "true");
2357
- } else {
2358
- this.removeAttribute("inline");
2359
- }
2360
- }
2361
- /**
2362
- * Get/set observer
2363
- */
2364
- get observer() {
2365
- return this.hasAttribute("observer");
2366
- }
2367
- set observer(value) {
2368
- if (value) {
2369
- this.setAttribute("observer", "true");
2370
- } else {
2371
- this.removeAttribute("observer");
2372
- }
2373
- }
2374
- /**
2375
- * Restart animation
2376
- */
2377
- restartAnimation() {
2378
- const state = this._state;
2379
- if (state.rendered) {
2380
- const root = this._shadowRoot;
2381
- if (state.renderedMode === "svg") {
2382
- try {
2383
- root.lastChild.setCurrentTime(0);
2384
- return;
2385
- } catch (err) {}
2386
- }
2387
- renderIcon(root, state);
2388
- }
2389
- }
2390
- /**
2391
- * Get status
2392
- */
2393
- get status() {
2394
- const state = this._state;
2395
- return state.rendered ? "rendered" : state.icon.data === null ? "failed" : "loading";
2396
- }
2397
- /**
2398
- * Queue attributes re-check
2399
- */
2400
- _queueCheck() {
2401
- if (!this._checkQueued) {
2402
- this._checkQueued = true;
2403
- setTimeout(() => {
2404
- this._check();
2405
- });
2406
- }
2407
- }
2408
- /**
2409
- * Check for changes
2410
- */
2411
- _check() {
2412
- if (!this._checkQueued) {
2413
- return;
2414
- }
2415
- this._checkQueued = false;
2416
- const state = this._state;
2417
- const newIcon = this.getAttribute("icon");
2418
- if (newIcon !== state.icon.value) {
2419
- this._iconChanged(newIcon);
2420
- return;
2421
- }
2422
- if (!state.rendered || !this._visible) {
2423
- return;
2424
- }
2425
- const mode = this.getAttribute("mode");
2426
- const customisations = getCustomisations(this);
2427
- if (state.attrMode !== mode || haveCustomisationsChanged(state.customisations, customisations) || !findIconElement(this._shadowRoot)) {
2428
- this._renderIcon(state.icon, customisations, mode);
2429
- }
2430
- }
2431
- /**
2432
- * Icon value has changed
2433
- */
2434
- _iconChanged(newValue) {
2435
- const icon = parseIconValue(newValue, (value, name2, data) => {
2436
- const state = this._state;
2437
- if (state.rendered || this.getAttribute("icon") !== value) {
2438
- return;
2439
- }
2440
- const icon2 = {
2441
- value,
2442
- name: name2,
2443
- data
2444
- };
2445
- if (icon2.data) {
2446
- this._gotIconData(icon2);
2447
- } else {
2448
- state.icon = icon2;
2449
- }
2450
- });
2451
- if (icon.data) {
2452
- this._gotIconData(icon);
2453
- } else {
2454
- this._state = setPendingState(icon, this._state.inline, this._state);
2455
- }
2456
- }
2457
- /**
2458
- * Force render icon on state change
2459
- */
2460
- _forceRender() {
2461
- if (!this._visible) {
2462
- const node2 = findIconElement(this._shadowRoot);
2463
- if (node2) {
2464
- this._shadowRoot.removeChild(node2);
2465
- }
2466
- return;
2467
- }
2468
- this._queueCheck();
2469
- }
2470
- /**
2471
- * Got new icon data, icon is ready to (re)render
2472
- */
2473
- _gotIconData(icon) {
2474
- this._checkQueued = false;
2475
- this._renderIcon(icon, getCustomisations(this), this.getAttribute("mode"));
2476
- }
2477
- /**
2478
- * Re-render based on icon data
2479
- */
2480
- _renderIcon(icon, customisations, attrMode) {
2481
- const renderedMode = getRenderMode(icon.data.body, attrMode);
2482
- const inline = this._state.inline;
2483
- renderIcon(this._shadowRoot, this._state = {
2484
- rendered: true,
2485
- icon,
2486
- inline,
2487
- customisations,
2488
- attrMode,
2489
- renderedMode
2490
- });
2491
- }
2492
- /**
2493
- * Start observer
2494
- */
2495
- startObserver() {
2496
- if (!this._observer && !this.hasAttribute("noobserver")) {
2497
- try {
2498
- this._observer = new IntersectionObserver(entries => {
2499
- const intersecting = entries.some(entry => entry.isIntersecting);
2500
- if (intersecting !== this._visible) {
2501
- this._visible = intersecting;
2502
- this._forceRender();
2503
- }
2504
- });
2505
- this._observer.observe(this);
2506
- } catch (err) {
2507
- if (this._observer) {
2508
- try {
2509
- this._observer.disconnect();
2510
- } catch (err2) {}
2511
- this._observer = null;
2512
- }
2513
- }
2514
- }
2515
- }
2516
- /**
2517
- * Stop observer
2518
- */
2519
- stopObserver() {
2520
- if (this._observer) {
2521
- this._observer.disconnect();
2522
- this._observer = null;
2523
- this._visible = true;
2524
- if (this._connected) {
2525
- this._forceRender();
2526
- }
2527
- }
2528
- }
2529
- };
2530
- attributes.forEach(attr => {
2531
- if (!(attr in IconifyIcon.prototype)) {
2532
- Object.defineProperty(IconifyIcon.prototype, attr, {
2533
- get: /* @__PURE__ */__name(function () {
2534
- return this.getAttribute(attr);
2535
- }, "get"),
2536
- set: /* @__PURE__ */__name(function (value) {
2537
- if (value !== null) {
2538
- this.setAttribute(attr, value);
2539
- } else {
2540
- this.removeAttribute(attr);
2541
- }
2542
- }, "set")
2543
- });
2544
- }
2545
- });
2546
- const functions = exportFunctions();
2547
- for (const key in functions) {
2548
- IconifyIcon[key] = IconifyIcon.prototype[key] = functions[key];
2549
- }
2550
- customElements.define(name, IconifyIcon);
2551
- return IconifyIcon;
2552
- }
2553
- __name(defineIconifyIcon, "defineIconifyIcon");
2554
- var IconifyIconComponent = defineIconifyIcon() || exportFunctions();
2555
- var {
2556
- enableCache,
2557
- disableCache,
2558
- iconLoaded,
2559
- iconExists,
2560
- // deprecated, kept to avoid breaking changes
2561
- getIcon,
2562
- listIcons,
2563
- addIcon,
2564
- addCollection,
2565
- calculateSize,
2566
- buildIcon,
2567
- iconToHTML,
2568
- svgToURL,
2569
- loadIcons,
2570
- loadIcon,
2571
- setCustomIconLoader,
2572
- setCustomIconsLoader,
2573
- addAPIProvider,
2574
- _api
2575
- } = IconifyIconComponent;
2576
-
2577
- // ../../node_modules/.pnpm/@iconify-icon+react@2.3.0_react@19.2.1/node_modules/@iconify-icon/react/dist/iconify.mjs
2578
- var Icon = React2.forwardRef((props, ref) => {
2579
- const newProps = {
2580
- ...props,
2581
- ref
2582
- };
2583
- if (typeof props.icon === "object") {
2584
- newProps.icon = JSON.stringify(props.icon);
2585
- }
2586
- if (!props.inline) {
2587
- delete newProps.inline;
2588
- }
2589
- if (props.className) {
2590
- newProps["class"] = props.className;
2591
- }
2592
- return React2.createElement("iconify-icon", newProps);
2593
- });
2594
-
2595
- // ../react-icons/src/Icon.tsx
2596
- import * as React3 from "react";
2597
- var Icon2 = /* @__PURE__ */React3.forwardRef((props, ref) => {
2598
- return /* @__PURE__ */React3.createElement(Icon, {
2599
- ref,
2600
- "data-testid": "iconify-icon",
2601
- ...props
2602
- });
2603
- });
2604
- Icon2.displayName = "Icon";
2605
-
2606
- // ../ui/src/components/Button.tsx
2607
- import * as React8 from "react";
2608
-
2609
- // ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.2.7_react@19.2.1/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
2610
- import * as React5 from "react";
2611
- import { useContext as useContext2, forwardRef as forwardRef3 } from "react";
2612
-
2613
- // ../../node_modules/.pnpm/@emotion+sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
2614
- var isDevelopment = false;
2615
- function sheetForTag(tag) {
2616
- if (tag.sheet) {
2617
- return tag.sheet;
2618
- }
2619
- for (var i = 0; i < document.styleSheets.length; i++) {
2620
- if (document.styleSheets[i].ownerNode === tag) {
2621
- return document.styleSheets[i];
2622
- }
2623
- }
2624
- return void 0;
2625
- }
2626
- __name(sheetForTag, "sheetForTag");
2627
- function createStyleElement(options) {
2628
- var tag = document.createElement("style");
2629
- tag.setAttribute("data-emotion", options.key);
2630
- if (options.nonce !== void 0) {
2631
- tag.setAttribute("nonce", options.nonce);
2632
- }
2633
- tag.appendChild(document.createTextNode(""));
2634
- tag.setAttribute("data-s", "");
2635
- return tag;
2636
- }
2637
- __name(createStyleElement, "createStyleElement");
2638
- var StyleSheet = /* @__PURE__ */function () {
2639
- function StyleSheet2(options) {
2640
- var _this = this;
2641
- this._insertTag = function (tag) {
2642
- var before;
2643
- if (_this.tags.length === 0) {
2644
- if (_this.insertionPoint) {
2645
- before = _this.insertionPoint.nextSibling;
2646
- } else if (_this.prepend) {
2647
- before = _this.container.firstChild;
2648
- } else {
2649
- before = _this.before;
2650
- }
2651
- } else {
2652
- before = _this.tags[_this.tags.length - 1].nextSibling;
2653
- }
2654
- _this.container.insertBefore(tag, before);
2655
- _this.tags.push(tag);
2656
- };
2657
- this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy;
2658
- this.tags = [];
2659
- this.ctr = 0;
2660
- this.nonce = options.nonce;
2661
- this.key = options.key;
2662
- this.container = options.container;
2663
- this.prepend = options.prepend;
2664
- this.insertionPoint = options.insertionPoint;
2665
- this.before = null;
2666
- }
2667
- __name(StyleSheet2, "StyleSheet");
2668
- var _proto = StyleSheet2.prototype;
2669
- _proto.hydrate = /* @__PURE__ */__name(function hydrate(nodes) {
2670
- nodes.forEach(this._insertTag);
2671
- }, "hydrate");
2672
- _proto.insert = /* @__PURE__ */__name(function insert(rule) {
2673
- if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) {
2674
- this._insertTag(createStyleElement(this));
2675
- }
2676
- var tag = this.tags[this.tags.length - 1];
2677
- if (this.isSpeedy) {
2678
- var sheet = sheetForTag(tag);
2679
- try {
2680
- sheet.insertRule(rule, sheet.cssRules.length);
2681
- } catch (e) {}
2682
- } else {
2683
- tag.appendChild(document.createTextNode(rule));
2684
- }
2685
- this.ctr++;
2686
- }, "insert");
2687
- _proto.flush = /* @__PURE__ */__name(function flush() {
2688
- this.tags.forEach(function (tag) {
2689
- var _tag$parentNode;
2690
- return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
2691
- });
2692
- this.tags = [];
2693
- this.ctr = 0;
2694
- }, "flush");
2695
- return StyleSheet2;
2696
- }();
2697
-
2698
- // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js
2699
- var MS = "-ms-";
2700
- var MOZ = "-moz-";
2701
- var WEBKIT = "-webkit-";
2702
- var COMMENT = "comm";
2703
- var RULESET = "rule";
2704
- var DECLARATION = "decl";
2705
- var IMPORT = "@import";
2706
- var KEYFRAMES = "@keyframes";
2707
- var LAYER = "@layer";
2708
-
2709
- // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js
2710
- var abs = Math.abs;
2711
- var from = String.fromCharCode;
2712
- var assign = Object.assign;
2713
- function hash(value, length2) {
2714
- return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
2715
- }
2716
- __name(hash, "hash");
2717
- function trim(value) {
2718
- return value.trim();
2719
- }
2720
- __name(trim, "trim");
2721
- function match(value, pattern) {
2722
- return (value = pattern.exec(value)) ? value[0] : value;
2723
- }
2724
- __name(match, "match");
2725
- function replace(value, pattern, replacement) {
2726
- return value.replace(pattern, replacement);
2727
- }
2728
- __name(replace, "replace");
2729
- function indexof(value, search) {
2730
- return value.indexOf(search);
2731
- }
2732
- __name(indexof, "indexof");
2733
- function charat(value, index) {
2734
- return value.charCodeAt(index) | 0;
2735
- }
2736
- __name(charat, "charat");
2737
- function substr(value, begin, end) {
2738
- return value.slice(begin, end);
2739
- }
2740
- __name(substr, "substr");
2741
- function strlen(value) {
2742
- return value.length;
2743
- }
2744
- __name(strlen, "strlen");
2745
- function sizeof(value) {
2746
- return value.length;
2747
- }
2748
- __name(sizeof, "sizeof");
2749
- function append(value, array) {
2750
- return array.push(value), value;
2751
- }
2752
- __name(append, "append");
2753
- function combine(array, callback) {
2754
- return array.map(callback).join("");
2755
- }
2756
- __name(combine, "combine");
2757
-
2758
- // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Tokenizer.js
2759
- var line = 1;
2760
- var column = 1;
2761
- var length = 0;
2762
- var position = 0;
2763
- var character = 0;
2764
- var characters = "";
2765
- function node(value, root, parent, type, props, children, length2) {
2766
- return {
2767
- value,
2768
- root,
2769
- parent,
2770
- type,
2771
- props,
2772
- children,
2773
- line,
2774
- column,
2775
- length: length2,
2776
- return: ""
2777
- };
2778
- }
2779
- __name(node, "node");
2780
- function copy(root, props) {
2781
- return assign(node("", null, null, "", null, null, 0), root, {
2782
- length: -root.length
2783
- }, props);
2784
- }
2785
- __name(copy, "copy");
2786
- function char() {
2787
- return character;
2788
- }
2789
- __name(char, "char");
2790
- function prev() {
2791
- character = position > 0 ? charat(characters, --position) : 0;
2792
- if (column--, character === 10) column = 1, line--;
2793
- return character;
2794
- }
2795
- __name(prev, "prev");
2796
- function next() {
2797
- character = position < length ? charat(characters, position++) : 0;
2798
- if (column++, character === 10) column = 1, line++;
2799
- return character;
2800
- }
2801
- __name(next, "next");
2802
- function peek() {
2803
- return charat(characters, position);
2804
- }
2805
- __name(peek, "peek");
2806
- function caret() {
2807
- return position;
2808
- }
2809
- __name(caret, "caret");
2810
- function slice(begin, end) {
2811
- return substr(characters, begin, end);
2812
- }
2813
- __name(slice, "slice");
2814
- function token(type) {
2815
- switch (type) {
2816
- // \0 \t \n \r \s whitespace token
2817
- case 0:
2818
- case 9:
2819
- case 10:
2820
- case 13:
2821
- case 32:
2822
- return 5;
2823
- // ! + , / > @ ~ isolate token
2824
- case 33:
2825
- case 43:
2826
- case 44:
2827
- case 47:
2828
- case 62:
2829
- case 64:
2830
- case 126:
2831
- // ; { } breakpoint token
2832
- case 59:
2833
- case 123:
2834
- case 125:
2835
- return 4;
2836
- // : accompanied token
2837
- case 58:
2838
- return 3;
2839
- // " ' ( [ opening delimit token
2840
- case 34:
2841
- case 39:
2842
- case 40:
2843
- case 91:
2844
- return 2;
2845
- // ) ] closing delimit token
2846
- case 41:
2847
- case 93:
2848
- return 1;
2849
- }
2850
- return 0;
2851
- }
2852
- __name(token, "token");
2853
- function alloc(value) {
2854
- return line = column = 1, length = strlen(characters = value), position = 0, [];
2855
- }
2856
- __name(alloc, "alloc");
2857
- function dealloc(value) {
2858
- return characters = "", value;
2859
- }
2860
- __name(dealloc, "dealloc");
2861
- function delimit(type) {
2862
- return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
2863
- }
2864
- __name(delimit, "delimit");
2865
- function whitespace(type) {
2866
- while (character = peek()) if (character < 33) next();else break;
2867
- return token(type) > 2 || token(character) > 3 ? "" : " ";
2868
- }
2869
- __name(whitespace, "whitespace");
2870
- function escaping(index, count) {
2871
- while (--count && next()) if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97) break;
2872
- return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
2873
- }
2874
- __name(escaping, "escaping");
2875
- function delimiter(type) {
2876
- while (next()) switch (character) {
2877
- // ] ) " '
2878
- case type:
2879
- return position;
2880
- // " '
2881
- case 34:
2882
- case 39:
2883
- if (type !== 34 && type !== 39) delimiter(character);
2884
- break;
2885
- // (
2886
- case 40:
2887
- if (type === 41) delimiter(type);
2888
- break;
2889
- // \
2890
- case 92:
2891
- next();
2892
- break;
2893
- }
2894
- return position;
2895
- }
2896
- __name(delimiter, "delimiter");
2897
- function commenter(type, index) {
2898
- while (next()) if (type + character === 47 + 10) break;else if (type + character === 42 + 42 && peek() === 47) break;
2899
- return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
2900
- }
2901
- __name(commenter, "commenter");
2902
- function identifier(index) {
2903
- while (!token(peek())) next();
2904
- return slice(index, position);
2905
- }
2906
- __name(identifier, "identifier");
2907
-
2908
- // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Parser.js
2909
- function compile(value) {
2910
- return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
2911
- }
2912
- __name(compile, "compile");
2913
- function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
2914
- var index = 0;
2915
- var offset = 0;
2916
- var length2 = pseudo;
2917
- var atrule = 0;
2918
- var property = 0;
2919
- var previous = 0;
2920
- var variable = 1;
2921
- var scanning = 1;
2922
- var ampersand = 1;
2923
- var character2 = 0;
2924
- var type = "";
2925
- var props = rules;
2926
- var children = rulesets;
2927
- var reference = rule;
2928
- var characters2 = type;
2929
- while (scanning) switch (previous = character2, character2 = next()) {
2930
- // (
2931
- case 40:
2932
- if (previous != 108 && charat(characters2, length2 - 1) == 58) {
2933
- if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1) ampersand = -1;
2934
- break;
2935
- }
2936
- // " ' [
2937
- case 34:
2938
- case 39:
2939
- case 91:
2940
- characters2 += delimit(character2);
2941
- break;
2942
- // \t \n \r \s
2943
- case 9:
2944
- case 10:
2945
- case 13:
2946
- case 32:
2947
- characters2 += whitespace(previous);
2948
- break;
2949
- // \
2950
- case 92:
2951
- characters2 += escaping(caret() - 1, 7);
2952
- continue;
2953
- // /
2954
- case 47:
2955
- switch (peek()) {
2956
- case 42:
2957
- case 47:
2958
- append(comment(commenter(next(), caret()), root, parent), declarations);
2959
- break;
2960
- default:
2961
- characters2 += "/";
2962
- }
2963
- break;
2964
- // {
2965
- case 123 * variable:
2966
- points[index++] = strlen(characters2) * ampersand;
2967
- // } ; \0
2968
- case 125 * variable:
2969
- case 59:
2970
- case 0:
2971
- switch (character2) {
2972
- // \0 }
2973
- case 0:
2974
- case 125:
2975
- scanning = 0;
2976
- // ;
2977
- case 59 + offset:
2978
- if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
2979
- if (property > 0 && strlen(characters2) - length2) append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations);
2980
- break;
2981
- // @ ;
2982
- case 59:
2983
- characters2 += ";";
2984
- // { rule/at-rule
2985
- default:
2986
- append(reference = ruleset(characters2, root, parent, index, offset, rules, points, type, props = [], children = [], length2), rulesets);
2987
- if (character2 === 123) if (offset === 0) parse(characters2, root, reference, reference, props, rulesets, length2, points, children);else switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
2988
- // d l m s
2989
- case 100:
2990
- case 108:
2991
- case 109:
2992
- case 115:
2993
- parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2), children), rules, children, length2, points, rule ? props : children);
2994
- break;
2995
- default:
2996
- parse(characters2, reference, reference, reference, [""], children, 0, points, children);
2997
- }
2998
- }
2999
- index = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
3000
- break;
3001
- // :
3002
- case 58:
3003
- length2 = 1 + strlen(characters2), property = previous;
3004
- default:
3005
- if (variable < 1) {
3006
- if (character2 == 123) --variable;else if (character2 == 125 && variable++ == 0 && prev() == 125) continue;
3007
- }
3008
- switch (characters2 += from(character2), character2 * variable) {
3009
- // &
3010
- case 38:
3011
- ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
3012
- break;
3013
- // ,
3014
- case 44:
3015
- points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
3016
- break;
3017
- // @
3018
- case 64:
3019
- if (peek() === 45) characters2 += delimit(next());
3020
- atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
3021
- break;
3022
- // -
3023
- case 45:
3024
- if (previous === 45 && strlen(characters2) == 2) variable = 0;
3025
- }
3026
- }
3027
- return rulesets;
3028
- }
3029
- __name(parse, "parse");
3030
- function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length2) {
3031
- var post = offset - 1;
3032
- var rule = offset === 0 ? rules : [""];
3033
- var size = sizeof(rule);
3034
- for (var i = 0, j = 0, k = 0; i < index; ++i) for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x]))) props[k++] = z;
3035
- return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2);
3036
- }
3037
- __name(ruleset, "ruleset");
3038
- function comment(value, root, parent) {
3039
- return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0);
3040
- }
3041
- __name(comment, "comment");
3042
- function declaration(value, root, parent, length2) {
3043
- return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2);
3044
- }
3045
- __name(declaration, "declaration");
3046
-
3047
- // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Serializer.js
3048
- function serialize(children, callback) {
3049
- var output = "";
3050
- var length2 = sizeof(children);
3051
- for (var i = 0; i < length2; i++) output += callback(children[i], i, children, callback) || "";
3052
- return output;
3053
- }
3054
- __name(serialize, "serialize");
3055
- function stringify(element, index, children, callback) {
3056
- switch (element.type) {
3057
- case LAYER:
3058
- if (element.children.length) break;
3059
- case IMPORT:
3060
- case DECLARATION:
3061
- return element.return = element.return || element.value;
3062
- case COMMENT:
3063
- return "";
3064
- case KEYFRAMES:
3065
- return element.return = element.value + "{" + serialize(element.children, callback) + "}";
3066
- case RULESET:
3067
- element.value = element.props.join(",");
3068
- }
3069
- return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
3070
- }
3071
- __name(stringify, "stringify");
3072
-
3073
- // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Middleware.js
3074
- function middleware(collection) {
3075
- var length2 = sizeof(collection);
3076
- return function (element, index, children, callback) {
3077
- var output = "";
3078
- for (var i = 0; i < length2; i++) output += collection[i](element, index, children, callback) || "";
3079
- return output;
3080
- };
3081
- }
3082
- __name(middleware, "middleware");
3083
- function rulesheet(callback) {
3084
- return function (element) {
3085
- if (!element.root) {
3086
- if (element = element.return) callback(element);
3087
- }
3088
- };
3089
- }
3090
- __name(rulesheet, "rulesheet");
3091
-
3092
- // ../../node_modules/.pnpm/@emotion+weak-memoize@0.4.0/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
3093
- var weakMemoize = /* @__PURE__ */__name(function weakMemoize2(func) {
3094
- var cache = /* @__PURE__ */new WeakMap();
3095
- return function (arg) {
3096
- if (cache.has(arg)) {
3097
- return cache.get(arg);
3098
- }
3099
- var ret = func(arg);
3100
- cache.set(arg, ret);
3101
- return ret;
3102
- };
3103
- }, "weakMemoize");
3104
-
3105
- // ../../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
3106
- function memoize(fn) {
3107
- var cache = /* @__PURE__ */Object.create(null);
3108
- return function (arg) {
3109
- if (cache[arg] === void 0) cache[arg] = fn(arg);
3110
- return cache[arg];
3111
- };
3112
- }
3113
- __name(memoize, "memoize");
3114
-
3115
- // ../../node_modules/.pnpm/@emotion+cache@11.14.0/node_modules/@emotion/cache/dist/emotion-cache.esm.js
3116
- var isBrowser = typeof document !== "undefined";
3117
- var identifierWithPointTracking = /* @__PURE__ */__name(function identifierWithPointTracking2(begin, points, index) {
3118
- var previous = 0;
3119
- var character2 = 0;
3120
- while (true) {
3121
- previous = character2;
3122
- character2 = peek();
3123
- if (previous === 38 && character2 === 12) {
3124
- points[index] = 1;
3125
- }
3126
- if (token(character2)) {
3127
- break;
3128
- }
3129
- next();
3130
- }
3131
- return slice(begin, position);
3132
- }, "identifierWithPointTracking");
3133
- var toRules = /* @__PURE__ */__name(function toRules2(parsed, points) {
3134
- var index = -1;
3135
- var character2 = 44;
3136
- do {
3137
- switch (token(character2)) {
3138
- case 0:
3139
- if (character2 === 38 && peek() === 12) {
3140
- points[index] = 1;
3141
- }
3142
- parsed[index] += identifierWithPointTracking(position - 1, points, index);
3143
- break;
3144
- case 2:
3145
- parsed[index] += delimit(character2);
3146
- break;
3147
- case 4:
3148
- if (character2 === 44) {
3149
- parsed[++index] = peek() === 58 ? "&\f" : "";
3150
- points[index] = parsed[index].length;
3151
- break;
3152
- }
3153
- // fallthrough
3154
- default:
3155
- parsed[index] += from(character2);
3156
- }
3157
- } while (character2 = next());
3158
- return parsed;
3159
- }, "toRules");
3160
- var getRules = /* @__PURE__ */__name(function getRules2(value, points) {
3161
- return dealloc(toRules(alloc(value), points));
3162
- }, "getRules");
3163
- var fixedElements = /* @__PURE__ */new WeakMap();
3164
- var compat = /* @__PURE__ */__name(function compat2(element) {
3165
- if (element.type !== "rule" || !element.parent ||
3166
- // positive .length indicates that this rule contains pseudo
3167
- // negative .length indicates that this rule has been already prefixed
3168
- element.length < 1) {
3169
- return;
3170
- }
3171
- var value = element.value;
3172
- var parent = element.parent;
3173
- var isImplicitRule = element.column === parent.column && element.line === parent.line;
3174
- while (parent.type !== "rule") {
3175
- parent = parent.parent;
3176
- if (!parent) return;
3177
- }
3178
- if (element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) {
3179
- return;
3180
- }
3181
- if (isImplicitRule) {
3182
- return;
3183
- }
3184
- fixedElements.set(element, true);
3185
- var points = [];
3186
- var rules = getRules(value, points);
3187
- var parentRules = parent.props;
3188
- for (var i = 0, k = 0; i < rules.length; i++) {
3189
- for (var j = 0; j < parentRules.length; j++, k++) {
3190
- element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
3191
- }
3192
- }
3193
- }, "compat");
3194
- var removeLabel = /* @__PURE__ */__name(function removeLabel2(element) {
3195
- if (element.type === "decl") {
3196
- var value = element.value;
3197
- if (value.charCodeAt(0) === 108 &&
3198
- // charcode for b
3199
- value.charCodeAt(2) === 98) {
3200
- element["return"] = "";
3201
- element.value = "";
3202
- }
3203
- }
3204
- }, "removeLabel");
3205
- function prefix(value, length2) {
3206
- switch (hash(value, length2)) {
3207
- // color-adjust
3208
- case 5103:
3209
- return WEBKIT + "print-" + value + value;
3210
- // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
3211
- case 5737:
3212
- case 4201:
3213
- case 3177:
3214
- case 3433:
3215
- case 1641:
3216
- case 4457:
3217
- case 2921:
3218
- case 5572:
3219
- case 6356:
3220
- case 5844:
3221
- case 3191:
3222
- case 6645:
3223
- case 3005:
3224
- case 6391:
3225
- case 5879:
3226
- case 5623:
3227
- case 6135:
3228
- case 4599:
3229
- case 4855:
3230
- case 4215:
3231
- case 6389:
3232
- case 5109:
3233
- case 5365:
3234
- case 5621:
3235
- case 3829:
3236
- return WEBKIT + value + value;
3237
- // appearance, user-select, transform, hyphens, text-size-adjust
3238
- case 5349:
3239
- case 4246:
3240
- case 4810:
3241
- case 6968:
3242
- case 2756:
3243
- return WEBKIT + value + MOZ + value + MS + value + value;
3244
- // flex, flex-direction
3245
- case 6828:
3246
- case 4268:
3247
- return WEBKIT + value + MS + value + value;
3248
- // order
3249
- case 6165:
3250
- return WEBKIT + value + MS + "flex-" + value + value;
3251
- // align-items
3252
- case 5187:
3253
- return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
3254
- // align-self
3255
- case 5443:
3256
- return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/, "") + value;
3257
- // align-content
3258
- case 4675:
3259
- return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/, "") + value;
3260
- // flex-shrink
3261
- case 5548:
3262
- return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
3263
- // flex-basis
3264
- case 5292:
3265
- return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
3266
- // flex-grow
3267
- case 6060:
3268
- return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
3269
- // transition
3270
- case 4554:
3271
- return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
3272
- // cursor
3273
- case 6187:
3274
- return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
3275
- // background, background-image
3276
- case 5495:
3277
- case 3959:
3278
- return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
3279
- // justify-content
3280
- case 4968:
3281
- return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
3282
- // (margin|padding)-inline-(start|end)
3283
- case 4095:
3284
- case 3583:
3285
- case 4068:
3286
- case 2532:
3287
- return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
3288
- // (min|max)?(width|height|inline-size|block-size)
3289
- case 8116:
3290
- case 7059:
3291
- case 5753:
3292
- case 5535:
3293
- case 5445:
3294
- case 5701:
3295
- case 4933:
3296
- case 4677:
3297
- case 5533:
3298
- case 5789:
3299
- case 5021:
3300
- case 4765:
3301
- if (strlen(value) - 1 - length2 > 6) switch (charat(value, length2 + 1)) {
3302
- // (m)ax-content, (m)in-content
3303
- case 109:
3304
- if (charat(value, length2 + 4) !== 45) break;
3305
- // (f)ill-available, (f)it-content
3306
- case 102:
3307
- return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
3308
- // (s)tretch
3309
- case 115:
3310
- return ~indexof(value, "stretch") ? prefix(replace(value, "stretch", "fill-available"), length2) + value : value;
3311
- }
3312
- break;
3313
- // position: sticky
3314
- case 4949:
3315
- if (charat(value, length2 + 1) !== 115) break;
3316
- // display: (flex|inline-flex)
3317
- case 6444:
3318
- switch (charat(value, strlen(value) - 3 - (~indexof(value, "!important") && 10))) {
3319
- // stic(k)y
3320
- case 107:
3321
- return replace(value, ":", ":" + WEBKIT) + value;
3322
- // (inline-)?fl(e)x
3323
- case 101:
3324
- return replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
3325
- }
3326
- break;
3327
- // writing-mode
3328
- case 5936:
3329
- switch (charat(value, length2 + 11)) {
3330
- // vertical-l(r)
3331
- case 114:
3332
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
3333
- // vertical-r(l)
3334
- case 108:
3335
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
3336
- // horizontal(-)tb
3337
- case 45:
3338
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
3339
- }
3340
- return WEBKIT + value + MS + value + value;
3341
- }
3342
- return value;
3343
- }
3344
- __name(prefix, "prefix");
3345
- var prefixer = /* @__PURE__ */__name(function prefixer2(element, index, children, callback) {
3346
- if (element.length > -1) {
3347
- if (!element["return"]) switch (element.type) {
3348
- case DECLARATION:
3349
- element["return"] = prefix(element.value, element.length);
3350
- break;
3351
- case KEYFRAMES:
3352
- return serialize([copy(element, {
3353
- value: replace(element.value, "@", "@" + WEBKIT)
3354
- })], callback);
3355
- case RULESET:
3356
- if (element.length) return combine(element.props, function (value) {
3357
- switch (match(value, /(::plac\w+|:read-\w+)/)) {
3358
- // :read-(only|write)
3359
- case ":read-only":
3360
- case ":read-write":
3361
- return serialize([copy(element, {
3362
- props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")]
3363
- })], callback);
3364
- // :placeholder
3365
- case "::placeholder":
3366
- return serialize([copy(element, {
3367
- props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")]
3368
- }), copy(element, {
3369
- props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")]
3370
- }), copy(element, {
3371
- props: [replace(value, /:(plac\w+)/, MS + "input-$1")]
3372
- })], callback);
3373
- }
3374
- return "";
3375
- });
3376
- }
3377
- }
3378
- }, "prefixer");
3379
- var getServerStylisCache = isBrowser ? void 0 : weakMemoize(function () {
3380
- return memoize(function () {
3381
- return {};
3382
- });
3383
- });
3384
- var defaultStylisPlugins = [prefixer];
3385
- var createCache = /* @__PURE__ */__name(function createCache2(options) {
3386
- var key = options.key;
3387
- if (isBrowser && key === "css") {
3388
- var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])");
3389
- Array.prototype.forEach.call(ssrStyles, function (node2) {
3390
- var dataEmotionAttribute = node2.getAttribute("data-emotion");
3391
- if (dataEmotionAttribute.indexOf(" ") === -1) {
3392
- return;
3393
- }
3394
- document.head.appendChild(node2);
3395
- node2.setAttribute("data-s", "");
3396
- });
3397
- }
3398
- var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
3399
- var inserted = {};
3400
- var container;
3401
- var nodesToHydrate = [];
3402
- if (isBrowser) {
3403
- container = options.container || document.head;
3404
- Array.prototype.forEach.call(
3405
- // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
3406
- document.querySelectorAll('style[data-emotion^="' + key + ' "]'), function (node2) {
3407
- var attrib = node2.getAttribute("data-emotion").split(" ");
3408
- for (var i = 1; i < attrib.length; i++) {
3409
- inserted[attrib[i]] = true;
3410
- }
3411
- nodesToHydrate.push(node2);
3412
- });
3413
- }
3414
- var _insert;
3415
- var omnipresentPlugins = [compat, removeLabel];
3416
- if (!getServerStylisCache) {
3417
- var currentSheet;
3418
- var finalizingPlugins = [stringify, rulesheet(function (rule) {
3419
- currentSheet.insert(rule);
3420
- })];
3421
- var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
3422
- var stylis = /* @__PURE__ */__name(function stylis2(styles) {
3423
- return serialize(compile(styles), serializer);
3424
- }, "stylis");
3425
- _insert = /* @__PURE__ */__name(function insert(selector, serialized, sheet, shouldCache) {
3426
- currentSheet = sheet;
3427
- stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
3428
- if (shouldCache) {
3429
- cache.inserted[serialized.name] = true;
3430
- }
3431
- }, "insert");
3432
- } else {
3433
- var _finalizingPlugins = [stringify];
3434
- var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
3435
- var _stylis = /* @__PURE__ */__name(function _stylis2(styles) {
3436
- return serialize(compile(styles), _serializer);
3437
- }, "_stylis");
3438
- var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
3439
- var getRules3 = /* @__PURE__ */__name(function getRules4(selector, serialized) {
3440
- var name = serialized.name;
3441
- if (serverStylisCache[name] === void 0) {
3442
- serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
3443
- }
3444
- return serverStylisCache[name];
3445
- }, "getRules");
3446
- _insert = /* @__PURE__ */__name(function _insert2(selector, serialized, sheet, shouldCache) {
3447
- var name = serialized.name;
3448
- var rules = getRules3(selector, serialized);
3449
- if (cache.compat === void 0) {
3450
- if (shouldCache) {
3451
- cache.inserted[name] = true;
3452
- }
3453
- return rules;
3454
- } else {
3455
- if (shouldCache) {
3456
- cache.inserted[name] = rules;
3457
- } else {
3458
- return rules;
3459
- }
3460
- }
3461
- }, "_insert");
3462
- }
3463
- var cache = {
3464
- key,
3465
- sheet: new StyleSheet({
3466
- key,
3467
- container,
3468
- nonce: options.nonce,
3469
- speedy: options.speedy,
3470
- prepend: options.prepend,
3471
- insertionPoint: options.insertionPoint
3472
- }),
3473
- nonce: options.nonce,
3474
- inserted,
3475
- registered: {},
3476
- insert: _insert
3477
- };
3478
- cache.sheet.hydrate(nodesToHydrate);
3479
- return cache;
3480
- }, "createCache");
3481
-
3482
- // ../../node_modules/.pnpm/@emotion+utils@1.4.2/node_modules/@emotion/utils/dist/emotion-utils.esm.js
3483
- var isBrowser2 = typeof document !== "undefined";
3484
- function getRegisteredStyles(registered, registeredStyles, classNames) {
3485
- var rawClassName = "";
3486
- classNames.split(" ").forEach(function (className) {
3487
- if (registered[className] !== void 0) {
3488
- registeredStyles.push(registered[className] + ";");
3489
- } else if (className) {
3490
- rawClassName += className + " ";
3491
- }
3492
- });
3493
- return rawClassName;
3494
- }
3495
- __name(getRegisteredStyles, "getRegisteredStyles");
3496
- var registerStyles = /* @__PURE__ */__name(function registerStyles2(cache, serialized, isStringTag) {
3497
- var className = cache.key + "-" + serialized.name;
3498
- if (
3499
- // class name could be used further down
3500
- // the tree but if it's a string tag, we know it won't
3501
- // so we don't have to add it to registered cache.
3502
- // this improves memory usage since we can avoid storing the whole style string
3503
- (isStringTag === false ||
3504
- // we need to always store it if we're in compat mode and
3505
- // in node since emotion-server relies on whether a style is in
3506
- // the registered cache to know whether a style is global or not
3507
- // also, note that this check will be dead code eliminated in the browser
3508
- isBrowser2 === false && cache.compat !== void 0) && cache.registered[className] === void 0) {
3509
- cache.registered[className] = serialized.styles;
3510
- }
3511
- }, "registerStyles");
3512
- var insertStyles = /* @__PURE__ */__name(function insertStyles2(cache, serialized, isStringTag) {
3513
- registerStyles(cache, serialized, isStringTag);
3514
- var className = cache.key + "-" + serialized.name;
3515
- if (cache.inserted[serialized.name] === void 0) {
3516
- var stylesForSSR = "";
3517
- var current = serialized;
3518
- do {
3519
- var maybeStyles = cache.insert(serialized === current ? "." + className : "", current, cache.sheet, true);
3520
- if (!isBrowser2 && maybeStyles !== void 0) {
3521
- stylesForSSR += maybeStyles;
3522
- }
3523
- current = current.next;
3524
- } while (current !== void 0);
3525
- if (!isBrowser2 && stylesForSSR.length !== 0) {
3526
- return stylesForSSR;
3527
- }
3528
- }
3529
- }, "insertStyles");
3530
-
3531
- // ../../node_modules/.pnpm/@emotion+hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js
3532
- function murmur2(str) {
3533
- var h = 0;
3534
- var k,
3535
- i = 0,
3536
- len = str.length;
3537
- for (; len >= 4; ++i, len -= 4) {
3538
- k = str.charCodeAt(i) & 255 | (str.charCodeAt(++i) & 255) << 8 | (str.charCodeAt(++i) & 255) << 16 | (str.charCodeAt(++i) & 255) << 24;
3539
- k = /* Math.imul(k, m): */
3540
- (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16);
3541
- k ^= /* k >>> r: */
3542
- k >>> 24;
3543
- h = /* Math.imul(k, m): */
3544
- (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
3545
- (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
3546
- }
3547
- switch (len) {
3548
- case 3:
3549
- h ^= (str.charCodeAt(i + 2) & 255) << 16;
3550
- case 2:
3551
- h ^= (str.charCodeAt(i + 1) & 255) << 8;
3552
- case 1:
3553
- h ^= str.charCodeAt(i) & 255;
3554
- h = /* Math.imul(h, m): */
3555
- (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
3556
- }
3557
- h ^= h >>> 13;
3558
- h = /* Math.imul(h, m): */
3559
- (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
3560
- return ((h ^ h >>> 15) >>> 0).toString(36);
3561
- }
3562
- __name(murmur2, "murmur2");
3563
-
3564
- // ../../node_modules/.pnpm/@emotion+unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
3565
- var unitlessKeys = {
3566
- animationIterationCount: 1,
3567
- aspectRatio: 1,
3568
- borderImageOutset: 1,
3569
- borderImageSlice: 1,
3570
- borderImageWidth: 1,
3571
- boxFlex: 1,
3572
- boxFlexGroup: 1,
3573
- boxOrdinalGroup: 1,
3574
- columnCount: 1,
3575
- columns: 1,
3576
- flex: 1,
3577
- flexGrow: 1,
3578
- flexPositive: 1,
3579
- flexShrink: 1,
3580
- flexNegative: 1,
3581
- flexOrder: 1,
3582
- gridRow: 1,
3583
- gridRowEnd: 1,
3584
- gridRowSpan: 1,
3585
- gridRowStart: 1,
3586
- gridColumn: 1,
3587
- gridColumnEnd: 1,
3588
- gridColumnSpan: 1,
3589
- gridColumnStart: 1,
3590
- msGridRow: 1,
3591
- msGridRowSpan: 1,
3592
- msGridColumn: 1,
3593
- msGridColumnSpan: 1,
3594
- fontWeight: 1,
3595
- lineHeight: 1,
3596
- opacity: 1,
3597
- order: 1,
3598
- orphans: 1,
3599
- scale: 1,
3600
- tabSize: 1,
3601
- widows: 1,
3602
- zIndex: 1,
3603
- zoom: 1,
3604
- WebkitLineClamp: 1,
3605
- // SVG-related properties
3606
- fillOpacity: 1,
3607
- floodOpacity: 1,
3608
- stopOpacity: 1,
3609
- strokeDasharray: 1,
3610
- strokeDashoffset: 1,
3611
- strokeMiterlimit: 1,
3612
- strokeOpacity: 1,
3613
- strokeWidth: 1
3614
- };
3615
-
3616
- // ../../node_modules/.pnpm/@emotion+serialize@1.3.3/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js
3617
- var isDevelopment2 = false;
3618
- var hyphenateRegex = /[A-Z]|^ms/g;
3619
- var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
3620
- var isCustomProperty = /* @__PURE__ */__name(function isCustomProperty2(property) {
3621
- return property.charCodeAt(1) === 45;
3622
- }, "isCustomProperty");
3623
- var isProcessableValue = /* @__PURE__ */__name(function isProcessableValue2(value) {
3624
- return value != null && typeof value !== "boolean";
3625
- }, "isProcessableValue");
3626
- var processStyleName = /* @__PURE__ */memoize(function (styleName) {
3627
- return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, "-$&").toLowerCase();
3628
- });
3629
- var processStyleValue = /* @__PURE__ */__name(function processStyleValue2(key, value) {
3630
- switch (key) {
3631
- case "animation":
3632
- case "animationName":
3633
- {
3634
- if (typeof value === "string") {
3635
- return value.replace(animationRegex, function (match2, p1, p2) {
3636
- cursor = {
3637
- name: p1,
3638
- styles: p2,
3639
- next: cursor
3640
- };
3641
- return p1;
3642
- });
3643
- }
3644
- }
3645
- }
3646
- if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === "number" && value !== 0) {
3647
- return value + "px";
3648
- }
3649
- return value;
3650
- }, "processStyleValue");
3651
- var noComponentSelectorMessage = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
3652
- function handleInterpolation(mergedProps, registered, interpolation) {
3653
- if (interpolation == null) {
3654
- return "";
3655
- }
3656
- var componentSelector = interpolation;
3657
- if (componentSelector.__emotion_styles !== void 0) {
3658
- return componentSelector;
3659
- }
3660
- switch (typeof interpolation) {
3661
- case "boolean":
3662
- {
3663
- return "";
3664
- }
3665
- case "object":
3666
- {
3667
- var keyframes = interpolation;
3668
- if (keyframes.anim === 1) {
3669
- cursor = {
3670
- name: keyframes.name,
3671
- styles: keyframes.styles,
3672
- next: cursor
3673
- };
3674
- return keyframes.name;
3675
- }
3676
- var serializedStyles = interpolation;
3677
- if (serializedStyles.styles !== void 0) {
3678
- var next2 = serializedStyles.next;
3679
- if (next2 !== void 0) {
3680
- while (next2 !== void 0) {
3681
- cursor = {
3682
- name: next2.name,
3683
- styles: next2.styles,
3684
- next: cursor
3685
- };
3686
- next2 = next2.next;
3687
- }
3688
- }
3689
- var styles = serializedStyles.styles + ";";
3690
- return styles;
3691
- }
3692
- return createStringFromObject(mergedProps, registered, interpolation);
3693
- }
3694
- case "function":
3695
- {
3696
- if (mergedProps !== void 0) {
3697
- var previousCursor = cursor;
3698
- var result = interpolation(mergedProps);
3699
- cursor = previousCursor;
3700
- return handleInterpolation(mergedProps, registered, result);
3701
- }
3702
- break;
3703
- }
3704
- }
3705
- var asString = interpolation;
3706
- if (registered == null) {
3707
- return asString;
3708
- }
3709
- var cached = registered[asString];
3710
- return cached !== void 0 ? cached : asString;
3711
- }
3712
- __name(handleInterpolation, "handleInterpolation");
3713
- function createStringFromObject(mergedProps, registered, obj) {
3714
- var string = "";
3715
- if (Array.isArray(obj)) {
3716
- for (var i = 0; i < obj.length; i++) {
3717
- string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
3718
- }
3719
- } else {
3720
- for (var key in obj) {
3721
- var value = obj[key];
3722
- if (typeof value !== "object") {
3723
- var asString = value;
3724
- if (registered != null && registered[asString] !== void 0) {
3725
- string += key + "{" + registered[asString] + "}";
3726
- } else if (isProcessableValue(asString)) {
3727
- string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
3728
- }
3729
- } else {
3730
- if (key === "NO_COMPONENT_SELECTOR" && isDevelopment2) {
3731
- throw new Error(noComponentSelectorMessage);
3732
- }
3733
- if (Array.isArray(value) && typeof value[0] === "string" && (registered == null || registered[value[0]] === void 0)) {
3734
- for (var _i = 0; _i < value.length; _i++) {
3735
- if (isProcessableValue(value[_i])) {
3736
- string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
3737
- }
3738
- }
3739
- } else {
3740
- var interpolated = handleInterpolation(mergedProps, registered, value);
3741
- switch (key) {
3742
- case "animation":
3743
- case "animationName":
3744
- {
3745
- string += processStyleName(key) + ":" + interpolated + ";";
3746
- break;
3747
- }
3748
- default:
3749
- {
3750
- string += key + "{" + interpolated + "}";
3751
- }
3752
- }
3753
- }
3754
- }
3755
- }
3756
- }
3757
- return string;
3758
- }
3759
- __name(createStringFromObject, "createStringFromObject");
3760
- var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g;
3761
- var cursor;
3762
- function serializeStyles(args, registered, mergedProps) {
3763
- if (args.length === 1 && typeof args[0] === "object" && args[0] !== null && args[0].styles !== void 0) {
3764
- return args[0];
3765
- }
3766
- var stringMode = true;
3767
- var styles = "";
3768
- cursor = void 0;
3769
- var strings = args[0];
3770
- if (strings == null || strings.raw === void 0) {
3771
- stringMode = false;
3772
- styles += handleInterpolation(mergedProps, registered, strings);
3773
- } else {
3774
- var asTemplateStringsArr = strings;
3775
- styles += asTemplateStringsArr[0];
3776
- }
3777
- for (var i = 1; i < args.length; i++) {
3778
- styles += handleInterpolation(mergedProps, registered, args[i]);
3779
- if (stringMode) {
3780
- var templateStringsArr = strings;
3781
- styles += templateStringsArr[i];
3782
- }
3783
- }
3784
- labelPattern.lastIndex = 0;
3785
- var identifierName = "";
3786
- var match2;
3787
- while ((match2 = labelPattern.exec(styles)) !== null) {
3788
- identifierName += "-" + match2[1];
3789
- }
3790
- var name = murmur2(styles) + identifierName;
3791
- return {
3792
- name,
3793
- styles,
3794
- next: cursor
3795
- };
3796
- }
3797
- __name(serializeStyles, "serializeStyles");
3798
-
3799
- // ../../node_modules/.pnpm/@emotion+use-insertion-effect-with-fallbacks@1.2.0_react@19.2.1/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js
3800
- import * as React4 from "react";
3801
- var isBrowser3 = typeof document !== "undefined";
3802
- var syncFallback = /* @__PURE__ */__name(function syncFallback2(create) {
3803
- return create();
3804
- }, "syncFallback");
3805
- var useInsertionEffect2 = React4["useInsertionEffect"] ? React4["useInsertionEffect"] : false;
3806
- var useInsertionEffectAlwaysWithSyncFallback = !isBrowser3 ? syncFallback : useInsertionEffect2 || syncFallback;
3807
-
3808
- // ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.2.7_react@19.2.1/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
3809
- var isDevelopment3 = false;
3810
- var isBrowser4 = typeof document !== "undefined";
3811
- var EmotionCacheContext = /* @__PURE__ */React5.createContext(
3812
- // because this module is primarily intended for the browser and node
3813
- // but it's also required in react native and similar environments sometimes
3814
- // and we could have a special build just for that
3815
- // but this is much easier and the native packages
3816
- // might use a different theme context in the future anyway
3817
- typeof HTMLElement !== "undefined" ? /* @__PURE__ */createCache({
3818
- key: "css"
3819
- }) : null);
3820
- var CacheProvider = EmotionCacheContext.Provider;
3821
- var withEmotionCache = /* @__PURE__ */__name(function withEmotionCache2(func) {
3822
- return /* @__PURE__ */forwardRef3(function (props, ref) {
3823
- var cache = useContext2(EmotionCacheContext);
3824
- return func(props, cache, ref);
3825
- });
3826
- }, "withEmotionCache");
3827
- if (!isBrowser4) {
3828
- withEmotionCache = /* @__PURE__ */__name(function withEmotionCache3(func) {
3829
- return function (props) {
3830
- var cache = useContext2(EmotionCacheContext);
3831
- if (cache === null) {
3832
- cache = createCache({
3833
- key: "css"
3834
- });
3835
- return /* @__PURE__ */React5.createElement(EmotionCacheContext.Provider, {
3836
- value: cache
3837
- }, func(props, cache));
3838
- } else {
3839
- return func(props, cache);
3840
- }
3841
- };
3842
- }, "withEmotionCache");
3843
- }
3844
- var ThemeContext = /* @__PURE__ */React5.createContext({});
3845
- var useTheme = /* @__PURE__ */__name(function useTheme2() {
3846
- return React5.useContext(ThemeContext);
3847
- }, "useTheme");
3848
- var hasOwn = {}.hasOwnProperty;
3849
- var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__";
3850
- var createEmotionProps = /* @__PURE__ */__name(function createEmotionProps2(type, props) {
3851
- var newProps = {};
3852
- for (var _key in props) {
3853
- if (hasOwn.call(props, _key)) {
3854
- newProps[_key] = props[_key];
3855
- }
3856
- }
3857
- newProps[typePropName] = type;
3858
- return newProps;
3859
- }, "createEmotionProps");
3860
- var Insertion = /* @__PURE__ */__name(function Insertion2(_ref) {
3861
- var cache = _ref.cache,
3862
- serialized = _ref.serialized,
3863
- isStringTag = _ref.isStringTag;
3864
- registerStyles(cache, serialized, isStringTag);
3865
- var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
3866
- return insertStyles(cache, serialized, isStringTag);
3867
- });
3868
- if (!isBrowser4 && rules !== void 0) {
3869
- var _ref2;
3870
- var serializedNames = serialized.name;
3871
- var next2 = serialized.next;
3872
- while (next2 !== void 0) {
3873
- serializedNames += " " + next2.name;
3874
- next2 = next2.next;
3875
- }
3876
- return /* @__PURE__ */React5.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
3877
- __html: rules
3878
- }, _ref2.nonce = cache.sheet.nonce, _ref2));
3879
- }
3880
- return null;
3881
- }, "Insertion");
3882
- var Emotion = /* @__PURE__ */withEmotionCache(function (props, cache, ref) {
3883
- var cssProp = props.css;
3884
- if (typeof cssProp === "string" && cache.registered[cssProp] !== void 0) {
3885
- cssProp = cache.registered[cssProp];
3886
- }
3887
- var WrappedComponent = props[typePropName];
3888
- var registeredStyles = [cssProp];
3889
- var className = "";
3890
- if (typeof props.className === "string") {
3891
- className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
3892
- } else if (props.className != null) {
3893
- className = props.className + " ";
3894
- }
3895
- var serialized = serializeStyles(registeredStyles, void 0, React5.useContext(ThemeContext));
3896
- className += cache.key + "-" + serialized.name;
3897
- var newProps = {};
3898
- for (var _key2 in props) {
3899
- if (hasOwn.call(props, _key2) && _key2 !== "css" && _key2 !== typePropName && !isDevelopment3) {
3900
- newProps[_key2] = props[_key2];
3901
- }
3902
- }
3903
- newProps.className = className;
3904
- if (ref) {
3905
- newProps.ref = ref;
3906
- }
3907
- return /* @__PURE__ */React5.createElement(React5.Fragment, null, /* @__PURE__ */React5.createElement(Insertion, {
3908
- cache,
3909
- serialized,
3910
- isStringTag: typeof WrappedComponent === "string"
3911
- }), /* @__PURE__ */React5.createElement(WrappedComponent, newProps));
3912
- });
3913
- var Emotion$1 = Emotion;
3914
-
3915
- // ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.2.7_react@19.2.1/node_modules/@emotion/react/dist/emotion-react.esm.js
3916
- import * as React6 from "react";
3917
- var import_extends2 = __toESM(require_extends());
3918
- var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
3919
- var jsx = /* @__PURE__ */__name(function jsx2(type, props) {
3920
- var args = arguments;
3921
- if (props == null || !hasOwn.call(props, "css")) {
3922
- return React6.createElement.apply(void 0, args);
3923
- }
3924
- var argsLength = args.length;
3925
- var createElementArgArray = new Array(argsLength);
3926
- createElementArgArray[0] = Emotion$1;
3927
- createElementArgArray[1] = createEmotionProps(type, props);
3928
- for (var i = 2; i < argsLength; i++) {
3929
- createElementArgArray[i] = args[i];
3930
- }
3931
- return React6.createElement.apply(null, createElementArgArray);
3932
- }, "jsx");
3933
- (function (_jsx) {
3934
- var JSX;
3935
- /* @__PURE__ */
3936
- (function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
3937
- })(jsx || (jsx = {}));
3938
-
3939
- // ../../node_modules/.pnpm/@theme-ui+css@0.17.2_@emotion+react@11.14.0_react@19.2.1_/node_modules/@theme-ui/css/dist/theme-ui-css.esm.js
3940
- var THEME_UI_DEFAULT_KEY = "__default";
3941
- var hasDefault = /* @__PURE__ */__name(x => {
3942
- return typeof x === "object" && x !== null && THEME_UI_DEFAULT_KEY in x;
3943
- }, "hasDefault");
3944
- function get(obj, path, fallback, p, undef) {
3945
- const pathArray = path && typeof path === "string" ? path.split(".") : [path];
3946
- for (p = 0; p < pathArray.length; p++) {
3947
- obj = obj ? obj[pathArray[p]] : undef;
3948
- }
3949
- if (obj === undef) return fallback;
3950
- return hasDefault(obj) ? obj[THEME_UI_DEFAULT_KEY] : obj;
3951
- }
3952
- __name(get, "get");
3953
- var getObjectWithVariants = /* @__PURE__ */__name((obj, theme) => {
3954
- if (obj && obj["variant"]) {
3955
- let result = {};
3956
- for (const key in obj) {
3957
- const x = obj[key];
3958
- if (key === "variant") {
3959
- const val = typeof x === "function" ? x(theme) : x;
3960
- const variant = getObjectWithVariants(get(theme, val), theme);
3961
- result = {
3962
- ...result,
3963
- ...variant
3964
- };
3965
- } else {
3966
- result[key] = x;
3967
- }
3968
- }
3969
- return result;
3970
- }
3971
- return obj;
3972
- }, "getObjectWithVariants");
3973
- var defaultBreakpoints = [40, 52, 64].map(n => n + "em");
3974
- var defaultTheme = {
3975
- space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
3976
- fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]
3977
- };
3978
- var aliases = {
3979
- bg: "backgroundColor",
3980
- m: "margin",
3981
- mt: "marginTop",
3982
- mr: "marginRight",
3983
- mb: "marginBottom",
3984
- ml: "marginLeft",
3985
- mx: "marginX",
3986
- my: "marginY",
3987
- p: "padding",
3988
- pt: "paddingTop",
3989
- pr: "paddingRight",
3990
- pb: "paddingBottom",
3991
- pl: "paddingLeft",
3992
- px: "paddingX",
3993
- py: "paddingY"
3994
- };
3995
- var multiples = {
3996
- marginX: ["marginLeft", "marginRight"],
3997
- marginY: ["marginTop", "marginBottom"],
3998
- paddingX: ["paddingLeft", "paddingRight"],
3999
- paddingY: ["paddingTop", "paddingBottom"],
4000
- scrollMarginX: ["scrollMarginLeft", "scrollMarginRight"],
4001
- scrollMarginY: ["scrollMarginTop", "scrollMarginBottom"],
4002
- scrollPaddingX: ["scrollPaddingLeft", "scrollPaddingRight"],
4003
- scrollPaddingY: ["scrollPaddingTop", "scrollPaddingBottom"],
4004
- size: ["width", "height"]
4005
- };
4006
- var scales = {
4007
- color: "colors",
4008
- background: "colors",
4009
- accentColor: "colors",
4010
- backgroundColor: "colors",
4011
- borderColor: "colors",
4012
- caretColor: "colors",
4013
- columnRuleColor: "colors",
4014
- outlineColor: "colors",
4015
- textDecorationColor: "colors",
4016
- opacity: "opacities",
4017
- transition: "transitions",
4018
- margin: "space",
4019
- marginTop: "space",
4020
- marginRight: "space",
4021
- marginBottom: "space",
4022
- marginLeft: "space",
4023
- marginX: "space",
4024
- marginY: "space",
4025
- marginBlock: "space",
4026
- marginBlockEnd: "space",
4027
- marginBlockStart: "space",
4028
- marginInline: "space",
4029
- marginInlineEnd: "space",
4030
- marginInlineStart: "space",
4031
- padding: "space",
4032
- paddingTop: "space",
4033
- paddingRight: "space",
4034
- paddingBottom: "space",
4035
- paddingLeft: "space",
4036
- paddingX: "space",
4037
- paddingY: "space",
4038
- paddingBlock: "space",
4039
- paddingBlockEnd: "space",
4040
- paddingBlockStart: "space",
4041
- paddingInline: "space",
4042
- paddingInlineEnd: "space",
4043
- paddingInlineStart: "space",
4044
- scrollMargin: "space",
4045
- scrollMarginTop: "space",
4046
- scrollMarginRight: "space",
4047
- scrollMarginBottom: "space",
4048
- scrollMarginLeft: "space",
4049
- scrollMarginX: "space",
4050
- scrollMarginY: "space",
4051
- scrollPadding: "space",
4052
- scrollPaddingTop: "space",
4053
- scrollPaddingRight: "space",
4054
- scrollPaddingBottom: "space",
4055
- scrollPaddingLeft: "space",
4056
- scrollPaddingX: "space",
4057
- scrollPaddingY: "space",
4058
- inset: "space",
4059
- insetBlock: "space",
4060
- insetBlockEnd: "space",
4061
- insetBlockStart: "space",
4062
- insetInline: "space",
4063
- insetInlineEnd: "space",
4064
- insetInlineStart: "space",
4065
- top: "space",
4066
- right: "space",
4067
- bottom: "space",
4068
- left: "space",
4069
- gridGap: "space",
4070
- gridColumnGap: "space",
4071
- gridRowGap: "space",
4072
- gap: "space",
4073
- columnGap: "space",
4074
- rowGap: "space",
4075
- fontFamily: "fonts",
4076
- fontSize: "fontSizes",
4077
- fontWeight: "fontWeights",
4078
- lineHeight: "lineHeights",
4079
- letterSpacing: "letterSpacings",
4080
- border: "borders",
4081
- borderTop: "borders",
4082
- borderRight: "borders",
4083
- borderBottom: "borders",
4084
- borderLeft: "borders",
4085
- borderWidth: "borderWidths",
4086
- borderStyle: "borderStyles",
4087
- borderRadius: "radii",
4088
- borderTopRightRadius: "radii",
4089
- borderTopLeftRadius: "radii",
4090
- borderBottomRightRadius: "radii",
4091
- borderBottomLeftRadius: "radii",
4092
- borderTopWidth: "borderWidths",
4093
- borderTopColor: "colors",
4094
- borderTopStyle: "borderStyles",
4095
- borderBottomWidth: "borderWidths",
4096
- borderBottomColor: "colors",
4097
- borderBottomStyle: "borderStyles",
4098
- borderLeftWidth: "borderWidths",
4099
- borderLeftColor: "colors",
4100
- borderLeftStyle: "borderStyles",
4101
- borderRightWidth: "borderWidths",
4102
- borderRightColor: "colors",
4103
- borderRightStyle: "borderStyles",
4104
- borderBlock: "borders",
4105
- borderBlockColor: "colors",
4106
- borderBlockEnd: "borders",
4107
- borderBlockEndColor: "colors",
4108
- borderBlockEndStyle: "borderStyles",
4109
- borderBlockEndWidth: "borderWidths",
4110
- borderBlockStart: "borders",
4111
- borderBlockStartColor: "colors",
4112
- borderBlockStartStyle: "borderStyles",
4113
- borderBlockStartWidth: "borderWidths",
4114
- borderBlockStyle: "borderStyles",
4115
- borderBlockWidth: "borderWidths",
4116
- borderEndEndRadius: "radii",
4117
- borderEndStartRadius: "radii",
4118
- borderInline: "borders",
4119
- borderInlineColor: "colors",
4120
- borderInlineEnd: "borders",
4121
- borderInlineEndColor: "colors",
4122
- borderInlineEndStyle: "borderStyles",
4123
- borderInlineEndWidth: "borderWidths",
4124
- borderInlineStart: "borders",
4125
- borderInlineStartColor: "colors",
4126
- borderInlineStartStyle: "borderStyles",
4127
- borderInlineStartWidth: "borderWidths",
4128
- borderInlineStyle: "borderStyles",
4129
- borderInlineWidth: "borderWidths",
4130
- borderStartEndRadius: "radii",
4131
- borderStartStartRadius: "radii",
4132
- columnRuleWidth: "borderWidths",
4133
- boxShadow: "shadows",
4134
- textShadow: "shadows",
4135
- zIndex: "zIndices",
4136
- width: "sizes",
4137
- minWidth: "sizes",
4138
- maxWidth: "sizes",
4139
- height: "sizes",
4140
- minHeight: "sizes",
4141
- maxHeight: "sizes",
4142
- flexBasis: "sizes",
4143
- size: "sizes",
4144
- blockSize: "sizes",
4145
- inlineSize: "sizes",
4146
- maxBlockSize: "sizes",
4147
- maxInlineSize: "sizes",
4148
- minBlockSize: "sizes",
4149
- minInlineSize: "sizes",
4150
- columnWidth: "sizes",
4151
- // svg
4152
- fill: "colors",
4153
- stroke: "colors"
4154
- };
4155
- var positiveOrNegative = /* @__PURE__ */__name((scale, value) => {
4156
- if (typeof value !== "number" || value >= 0) {
4157
- if (typeof value === "string" && value.startsWith("-")) {
4158
- const valueWithoutMinus = value.substring(1);
4159
- const n2 = get(scale, valueWithoutMinus, valueWithoutMinus);
4160
- if (typeof n2 === "number") {
4161
- return n2 * -1;
4162
- }
4163
- return `-${n2}`;
4164
- }
4165
- return get(scale, value, value);
4166
- }
4167
- const absolute = Math.abs(value);
4168
- const n = get(scale, absolute, absolute);
4169
- if (typeof n === "string") return "-" + n;
4170
- return Number(n) * -1;
4171
- }, "positiveOrNegative");
4172
- var transforms = ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "marginBlock", "marginBlockEnd", "marginBlockStart", "marginInline", "marginInlineEnd", "marginInlineStart", "top", "bottom", "left", "right"].reduce((acc, curr) => ({
4173
- ...acc,
4174
- [curr]: positiveOrNegative
4175
- }), {});
4176
- var responsive = /* @__PURE__ */__name(styles => theme => {
4177
- const next2 = {};
4178
- const breakpoints = theme && theme.breakpoints || defaultBreakpoints;
4179
- const mediaQueries = [null, ...breakpoints.map(n => n.includes("@media") ? n : `@media screen and (min-width: ${n})`)];
4180
- for (const k in styles) {
4181
- const key = k;
4182
- let value = styles[key];
4183
- if (typeof value === "function") {
4184
- value = value(theme || {});
4185
- }
4186
- if (value === false || value == null) {
4187
- continue;
4188
- }
4189
- if (!Array.isArray(value)) {
4190
- next2[key] = value;
4191
- continue;
4192
- }
4193
- for (let i = 0; i < value.slice(0, mediaQueries.length).length; i++) {
4194
- const media = mediaQueries[i];
4195
- if (!media) {
4196
- next2[key] = value[i];
4197
- continue;
4198
- }
4199
- next2[media] = next2[media] || {};
4200
- if (value[i] == null) continue;
4201
- next2[media][key] = value[i];
4202
- }
4203
- }
4204
- return next2;
4205
- }, "responsive");
4206
- var css = /* @__PURE__ */__name((args = {}) => (props = {}) => {
4207
- const theme = {
4208
- ...defaultTheme,
4209
- ...("theme" in props ? props.theme : props)
4210
- };
4211
- const obj = getObjectWithVariants(typeof args === "function" ? args(theme) : args, theme);
4212
- const styles = responsive(obj)(theme);
4213
- let result = {};
4214
- for (const key in styles) {
4215
- const x = styles[key];
4216
- const val = typeof x === "function" ? x(theme) : x;
4217
- if (val && typeof val === "object") {
4218
- if (hasDefault(val)) {
4219
- result[key] = val[THEME_UI_DEFAULT_KEY];
4220
- continue;
4221
- }
4222
- result[key] = css(val)(theme);
4223
- continue;
4224
- }
4225
- const prop = key in aliases ? aliases[key] : key;
4226
- const scaleName = prop in scales ? scales[prop] : void 0;
4227
- const scale = scaleName ? theme?.[scaleName] : get(theme, prop, {});
4228
- const transform = get(transforms, prop, get);
4229
- const value = transform(scale, val, val);
4230
- if (prop in multiples) {
4231
- const dirs = multiples[prop];
4232
- for (let i = 0; i < dirs.length; i++) {
4233
- result[dirs[i]] = value;
4234
- }
4235
- } else {
4236
- result[prop] = value;
4237
- }
4238
- }
4239
- return result;
4240
- }, "css");
4241
-
4242
- // ../../node_modules/.pnpm/@theme-ui+core@0.17.2_@emotion+react@11.14.0_@types+react@19.2.7_react@19.2.1__react@19.2.1/node_modules/@theme-ui/core/dist/parseProps-eab0b26e.esm.js
4243
- var getCSS = /* @__PURE__ */__name(props => theme => {
4244
- const styles = css(props.sx)(theme);
4245
- const raw = typeof props.css === "function" ? props.css(theme) : props.css;
4246
- return [styles, raw];
4247
- }, "getCSS");
4248
- function parseProps(props) {
4249
- if (!props || !props.sx && !props.css) return props;
4250
- const next2 = {};
4251
- for (let key in props) {
4252
- if (key === "sx") continue;
4253
- next2[key] = props[key];
4254
- }
4255
- next2.css = getCSS(props);
4256
- return next2;
4257
- }
4258
- __name(parseProps, "parseProps");
4259
-
4260
- // ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.2.7_react@19.2.1/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js
4261
- import * as ReactJSXRuntime from "react/jsx-runtime";
4262
- import "react";
4263
- var import_extends3 = __toESM(require_extends());
4264
- var import_hoist_non_react_statics2 = __toESM(require_hoist_non_react_statics_cjs());
4265
- var jsx4 = /* @__PURE__ */__name(function jsx5(type, props, key) {
4266
- if (!hasOwn.call(props, "css")) {
4267
- return ReactJSXRuntime.jsx(type, props, key);
4268
- }
4269
- return ReactJSXRuntime.jsx(Emotion$1, createEmotionProps(type, props), key);
4270
- }, "jsx");
4271
-
4272
- // ../../node_modules/.pnpm/@theme-ui+core@0.17.2_@emotion+react@11.14.0_@types+react@19.2.7_react@19.2.1__react@19.2.1/node_modules/@theme-ui/core/jsx-runtime/dist/theme-ui-core-jsx-runtime.esm.js
4273
- import { Fragment as Fragment4 } from "react";
4274
- var jsx6 = /* @__PURE__ */__name((type, props, key) => jsx4(type, parseProps(props), key), "jsx");
4275
-
4276
- // ../../node_modules/.pnpm/@theme-ui+components@0.17.2_@emotion+react@11.14.0_@types+react@19.2.7_react@19.2.1__@t_04e34f7905c3166fd726d8f6c6a0914f/node_modules/@theme-ui/components/dist/theme-ui-components.esm.js
4277
- import React7, { forwardRef as forwardRef4 } from "react";
4278
- var boxSystemProps = [
4279
- // space scale props (inherited from @styled-system/space)
4280
- "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "m", "mt", "mr", "mb", "ml", "mx", "my", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY", "p", "pt", "pr", "pb", "pl", "px", "py",
4281
- // color props (inherited from @styled-system/color)
4282
- "color", "backgroundColor", "bg", "opacity"];
4283
- var __isBoxStyledSystemProp = /* @__PURE__ */__name(prop => boxSystemProps.includes(prop), "__isBoxStyledSystemProp");
4284
- var pickSystemProps = /* @__PURE__ */__name(props => {
4285
- const res = {};
4286
- for (const key of boxSystemProps) {
4287
- res[key] = props[key];
4288
- }
4289
- return res;
4290
- }, "pickSystemProps");
4291
- var Box$1 = /* @__PURE__ */forwardRef4(/* @__PURE__ */__name(function Box(props, ref) {
4292
- const theme = useTheme();
4293
- const {
4294
- __themeKey = "variants",
4295
- __css,
4296
- variant,
4297
- css: cssProp,
4298
- sx,
4299
- as: Component = "div",
4300
- ...rest
4301
- } = props;
4302
- const baseStyles = {
4303
- boxSizing: "border-box",
4304
- margin: 0,
4305
- minWidth: 0
4306
- };
4307
- const __cssStyles = css(__css)(theme);
4308
- const variantInTheme = get(theme, `${__themeKey}.${variant}`) || get(theme, variant);
4309
- const variantStyles = variantInTheme && css(variantInTheme)(theme);
4310
- const sxPropStyles = css(sx)(theme);
4311
- const systemPropsStyles = css(pickSystemProps(rest))(theme);
4312
- const style = [baseStyles, __cssStyles, variantStyles, sxPropStyles, systemPropsStyles, cssProp];
4313
- boxSystemProps.forEach(name => {
4314
- delete rest[name];
4315
- });
4316
- return jsx6(Component, {
4317
- ref,
4318
- css: style,
4319
- ...rest
4320
- });
4321
- }, "Box"));
4322
- var Flex = /* @__PURE__ */React7.forwardRef(/* @__PURE__ */__name(function Flex2(props, ref) {
4323
- const {
4324
- sx
4325
- } = props;
4326
- return jsx6(Box$1, {
4327
- ref,
4328
- ...props,
4329
- sx: /* @__PURE__ */__name(theme => ({
4330
- display: "flex",
4331
- ...(typeof sx === "function" ? sx(theme) : sx)
4332
- }), "sx")
4333
- });
4334
- }, "Flex"));
4335
- var getProps = /* @__PURE__ */__name(test => props => {
4336
- const next2 = {};
4337
- for (const key in props) {
4338
- if (test(key || "")) next2[key] = props[key];
4339
- }
4340
- return next2;
4341
- }, "getProps");
4342
- var MRE = /^m[trblxy]?$/;
4343
- var getMargin = getProps(k => MRE.test(k));
4344
- var omitMargin = getProps(k => !MRE.test(k));
4345
- function __internalProps(props) {
4346
- return props;
4347
- }
4348
- __name(__internalProps, "__internalProps");
4349
- var Box2 = Box$1;
4350
- var Button = /* @__PURE__ */React7.forwardRef(/* @__PURE__ */__name(function Button2(props, ref) {
4351
- return jsx6(Box2, {
4352
- ref,
4353
- as: "button",
4354
- variant: "primary",
4355
- ...props,
4356
- ...__internalProps({
4357
- __themeKey: "buttons",
4358
- __css: {
4359
- appearance: "none",
4360
- display: props.hidden ? void 0 : "inline-block",
4361
- textAlign: "center",
4362
- lineHeight: "inherit",
4363
- textDecoration: "none",
4364
- fontSize: "inherit",
4365
- px: 3,
4366
- py: 2,
4367
- color: "white",
4368
- bg: "primary",
4369
- border: 0,
4370
- borderRadius: 4
4371
- }
4372
- })
4373
- });
4374
- }, "Button"));
4375
- var Text = /* @__PURE__ */React7.forwardRef(/* @__PURE__ */__name(function Text2(props, ref) {
4376
- return jsx6(Box$1, {
4377
- as: "span",
4378
- ref,
4379
- variant: "default",
4380
- ...props,
4381
- ...__internalProps({
4382
- __themeKey: "text"
4383
- })
4384
- });
4385
- }, "Text"));
4386
- var Heading = /* @__PURE__ */React7.forwardRef(/* @__PURE__ */__name(function Heading2(props, ref) {
4387
- return jsx6(Box$1, {
4388
- ref,
4389
- as: "h2",
4390
- variant: "heading",
4391
- ...props,
4392
- ...__internalProps({
4393
- __themeKey: "text",
4394
- __css: {
4395
- fontFamily: "heading",
4396
- fontWeight: "heading",
4397
- lineHeight: "heading"
4398
- }
4399
- })
4400
- });
4401
- }, "Heading"));
4402
- var Card = /* @__PURE__ */React7.forwardRef(/* @__PURE__ */__name(function Card2(props, ref) {
4403
- return jsx6(Box$1, {
4404
- ref,
4405
- variant: "primary",
4406
- ...props,
4407
- ...__internalProps({
4408
- __themeKey: "cards"
4409
- })
4410
- });
4411
- }, "Card"));
4412
- var SVG = /* @__PURE__ */React7.forwardRef(/* @__PURE__ */__name(function SVG2({
4413
- size = 24,
4414
- ...rest
4415
- }, ref) {
4416
- const svgProps = {
4417
- xmlns: "http://www.w3.org/2000/svg",
4418
- width: size,
4419
- height: size,
4420
- viewBox: "0 0 24 24",
4421
- fill: "currentcolor",
4422
- ...rest
4423
- };
4424
- return jsx6(Box$1, {
4425
- ref,
4426
- as: "svg",
4427
- ...svgProps
4428
- });
4429
- }, "SVG"));
4430
- SVG.displayName = "SVG";
4431
- var CloseIcon = jsx6("svg", {
4432
- xmlns: "http://www.w3.org/2000/svg",
4433
- width: "24",
4434
- height: "24",
4435
- fill: "currentColor",
4436
- viewBox: "0 0 24 24",
4437
- children: jsx6("path", {
4438
- d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
4439
- })
4440
- });
4441
- var getContainerProps = getProps(__isBoxStyledSystemProp);
4442
- var getIframeProps = getProps(str => !__isBoxStyledSystemProp(str));
4443
-
4444
- // ../ui/src/components/Button.tsx
4445
- var Button3 = /* @__PURE__ */React8.forwardRef((props, ref) => {
4446
- const {
4447
- children,
4448
- leftIcon,
4449
- rightIcon,
4450
- loading,
4451
- ...restProps
4452
- } = props;
4453
- return /* @__PURE__ */React8.createElement(Button, {
4454
- type: "button",
4455
- ...restProps,
4456
- ref,
4457
- sx: {
4458
- cursor: "pointer",
4459
- paddingX: "6",
4460
- paddingY: "4",
4461
- fontFamily: "body",
4462
- display: "inline-flex",
4463
- alignItems: "center",
4464
- gap: "4",
4465
- "&:disabled": {
4466
- cursor: "not-allowed"
4467
- },
4468
- ...restProps.sx
4469
- }
4470
- }, loading && /* @__PURE__ */React8.createElement(Icon2, {
4471
- inline: true,
4472
- icon: "three-dots-loading"
4473
- }), !loading && leftIcon && /* @__PURE__ */React8.createElement(Icon2, {
4474
- inline: true,
4475
- icon: leftIcon
4476
- }), children, rightIcon && /* @__PURE__ */React8.createElement(Icon2, {
4477
- inline: true,
4478
- icon: rightIcon
4479
- }));
4480
- });
4481
- Button3.displayName = "Button";
4482
-
4483
- // ../ui/src/components/Card.tsx
4484
- import * as React9 from "react";
4485
- var Card3 = /* @__PURE__ */__name(props => {
4486
- return /* @__PURE__ */React9.createElement(Card, {
4487
- ...props,
4488
- sx: {
4489
- backgroundColor: "display.background.secondary.default",
4490
- border: "md",
4491
- borderColor: "display.border.muted.default",
4492
- borderRadius: "lg",
4493
- display: "flex",
4494
- flexDirection: "column",
4495
- alignItems: "center",
4496
- width: "fit-content",
4497
- boxShadow: "2px 4px 8px #E5E7EB",
4498
- ...props.sx
4499
- }
4500
- });
4501
- }, "Card");
4502
- var CardTitle = /* @__PURE__ */__name(({
4503
- children,
4504
- ...props
4505
- }) => {
4506
- return /* @__PURE__ */React9.createElement(Box$1, {
4507
- ...props,
4508
- sx: {
4509
- paddingY: "4",
4510
- paddingX: "8",
4511
- width: "full",
4512
- borderBottom: "md",
4513
- borderBottomColor: "display.border.muted.default",
4514
- ...props.sx
4515
- }
4516
- }, children);
4517
- }, "CardTitle");
4518
- var CardBody = /* @__PURE__ */__name(({
4519
- children,
4520
- ...props
4521
- }) => {
4522
- return /* @__PURE__ */React9.createElement(Box$1, {
4523
- ...props,
4524
- sx: {
4525
- paddingY: "4",
4526
- paddingX: "8",
4527
- width: "full",
4528
- backgroundColor: "display.background.muted.default",
4529
- ...props.sx
4530
- }
4531
- }, children);
4532
- }, "CardBody");
4533
- var CardFooter = /* @__PURE__ */__name(({
4534
- children,
4535
- ...props
4536
- }) => {
4537
- return /* @__PURE__ */React9.createElement(Box$1, {
4538
- ...props,
4539
- sx: {
4540
- paddingY: "2",
4541
- paddingX: "8",
4542
- width: "full",
4543
- ...props.sx
4544
- }
4545
- }, children);
4546
- }, "CardFooter");
4547
- Card3.Title = CardTitle;
4548
- Card3.Body = CardBody;
4549
- Card3.Footer = CardFooter;
4550
-
4551
- // ../ui/src/components/Stack.tsx
4552
- var Stack = /* @__PURE__ */__name(props => {
4553
- return /* @__PURE__ */React.createElement(Flex, {
4554
- ...props,
4555
- sx: {
4556
- flexDirection: "column",
4557
- alignItems: "flex-start",
4558
- ...props.sx
4559
- }
4560
- });
4561
- }, "Stack");
4562
-
4563
- // ../../node_modules/.pnpm/@theme-ui+match-media@0.17.2_@theme-ui+core@0.17.2_@emotion+react@11.14.0_@types+react@_f8d5d2a429d84d480c0e8367788be412/node_modules/@theme-ui/match-media/dist/theme-ui-match-media.esm.js
4564
- import { useState, useEffect } from "react";
9
+ // src/components/PlanCard.tsx
10
+ import { Box as Box4, Card } from "@ttoss/ui";
4565
11
 
4566
12
  // src/components/PlanCardCtaSlot.tsx
13
+ import { Button, Flex } from "@ttoss/ui";
4567
14
  var PlanCardCtaSlot = /* @__PURE__ */__name(({
4568
15
  buttonProps
4569
16
  }) => {
@@ -4581,7 +28,7 @@ var PlanCardCtaSlot = /* @__PURE__ */__name(({
4581
28
  width: "full",
4582
29
  justifyContent: "center"
4583
30
  }
4584
- }, /* @__PURE__ */React.createElement(Button3, {
31
+ }, /* @__PURE__ */React.createElement(Button, {
4585
32
  ...restButtonProps,
4586
33
  variant: variant ?? "accent",
4587
34
  leftIcon,
@@ -4595,7 +42,9 @@ var PlanCardCtaSlot = /* @__PURE__ */__name(({
4595
42
  }, "PlanCardCtaSlot");
4596
43
 
4597
44
  // src/components/PlanCardFeaturesSlot.tsx
4598
- import * as React10 from "react";
45
+ import { Icon } from "@ttoss/react-icons";
46
+ import { Box, Flex as Flex2, Stack, Text } from "@ttoss/ui";
47
+ import * as React2 from "react";
4599
48
  var featuresTitle = "RECURSOS";
4600
49
  var PlanCardFeaturesSlot = /* @__PURE__ */__name(({
4601
50
  features,
@@ -4603,7 +52,7 @@ var PlanCardFeaturesSlot = /* @__PURE__ */__name(({
4603
52
  }) => {
4604
53
  const isEnterprise = variant === "enterprise";
4605
54
  const featureColor = isEnterprise ? "white" : "feedback.text.positive.default";
4606
- return /* @__PURE__ */React10.createElement(Box$1, {
55
+ return /* @__PURE__ */React2.createElement(Box, {
4607
56
  sx: {
4608
57
  paddingY: "4",
4609
58
  paddingX: "6",
@@ -4612,28 +61,28 @@ var PlanCardFeaturesSlot = /* @__PURE__ */__name(({
4612
61
  borderBottom: "md",
4613
62
  borderColor: "display.border.muted.default"
4614
63
  }
4615
- }, /* @__PURE__ */React10.createElement(Stack, {
64
+ }, /* @__PURE__ */React2.createElement(Stack, {
4616
65
  sx: {
4617
66
  gap: "5",
4618
67
  paddingY: "3"
4619
68
  }
4620
- }, /* @__PURE__ */React10.createElement(Flex, {
69
+ }, /* @__PURE__ */React2.createElement(Flex2, {
4621
70
  sx: {
4622
71
  letterSpacing: "widest",
4623
72
  color: isEnterprise ? "white" : "text"
4624
73
  }
4625
- }, featuresTitle), /* @__PURE__ */React10.createElement(Flex, {
74
+ }, featuresTitle), /* @__PURE__ */React2.createElement(Flex2, {
4626
75
  sx: {
4627
76
  flexDirection: "column",
4628
77
  gap: "3"
4629
78
  }
4630
79
  }, features.map((feature, index) => {
4631
- if (/* @__PURE__ */React10.isValidElement(feature)) {
4632
- return /* @__PURE__ */React10.createElement(React10.Fragment, {
80
+ if (/* @__PURE__ */React2.isValidElement(feature)) {
81
+ return /* @__PURE__ */React2.createElement(React2.Fragment, {
4633
82
  key: index
4634
83
  }, feature);
4635
84
  }
4636
- return /* @__PURE__ */React10.createElement(Flex, {
85
+ return /* @__PURE__ */React2.createElement(Flex2, {
4637
86
  key: index,
4638
87
  sx: {
4639
88
  fontSize: "sm",
@@ -4641,9 +90,9 @@ var PlanCardFeaturesSlot = /* @__PURE__ */__name(({
4641
90
  alignItems: "center",
4642
91
  gap: "3"
4643
92
  }
4644
- }, /* @__PURE__ */React10.createElement(Icon2, {
93
+ }, /* @__PURE__ */React2.createElement(Icon, {
4645
94
  icon: "fluent:checkmark-24-filled"
4646
- }), /* @__PURE__ */React10.createElement(Text, {
95
+ }), /* @__PURE__ */React2.createElement(Text, {
4647
96
  sx: {
4648
97
  fontSize: "sm",
4649
98
  color: featureColor,
@@ -4654,6 +103,7 @@ var PlanCardFeaturesSlot = /* @__PURE__ */__name(({
4654
103
  }, "PlanCardFeaturesSlot");
4655
104
 
4656
105
  // src/components/PlanCardHeaderSlot.tsx
106
+ import { Box as Box2, Flex as Flex3, Heading, Text as Text2 } from "@ttoss/ui";
4657
107
  var PlanCardHeaderSlot = /* @__PURE__ */__name(({
4658
108
  title,
4659
109
  subtitle,
@@ -4661,13 +111,13 @@ var PlanCardHeaderSlot = /* @__PURE__ */__name(({
4661
111
  variant = "default"
4662
112
  }) => {
4663
113
  const isEnterprise = variant === "enterprise";
4664
- return /* @__PURE__ */React.createElement(Box$1, {
114
+ return /* @__PURE__ */React.createElement(Box2, {
4665
115
  sx: {
4666
116
  paddingY: hasTopTag ? "4" : "8",
4667
117
  paddingX: "8",
4668
118
  width: "full"
4669
119
  }
4670
- }, /* @__PURE__ */React.createElement(Flex, {
120
+ }, /* @__PURE__ */React.createElement(Flex3, {
4671
121
  sx: {
4672
122
  flexDirection: "column",
4673
123
  gap: "2",
@@ -4679,7 +129,7 @@ var PlanCardHeaderSlot = /* @__PURE__ */__name(({
4679
129
  fontSize: "3xl",
4680
130
  color: isEnterprise ? "white" : "text"
4681
131
  }
4682
- }, title), subtitle && /* @__PURE__ */React.createElement(Text, {
132
+ }, title), subtitle && /* @__PURE__ */React.createElement(Text2, {
4683
133
  sx: {
4684
134
  fontSize: "sm",
4685
135
  color: isEnterprise ? "white" : "display.text.secondary.default"
@@ -4688,26 +138,28 @@ var PlanCardHeaderSlot = /* @__PURE__ */__name(({
4688
138
  }, "PlanCardHeaderSlot");
4689
139
 
4690
140
  // src/components/PlanCardMetadataSlot.tsx
141
+ import { Icon as Icon2 } from "@ttoss/react-icons";
142
+ import { Flex as Flex4, Stack as Stack2, Text as Text3 } from "@ttoss/ui";
4691
143
  var PlanCardMetadataSlot = /* @__PURE__ */__name(({
4692
144
  metadata,
4693
145
  variant = "default"
4694
146
  }) => {
4695
147
  const isEnterprise = variant === "enterprise";
4696
- return /* @__PURE__ */React.createElement(Stack, {
148
+ return /* @__PURE__ */React.createElement(Stack2, {
4697
149
  sx: {
4698
150
  width: "full",
4699
151
  gap: "6"
4700
152
  }
4701
153
  }, metadata.map(service => {
4702
154
  const serviceKey = service.id ?? service.key ?? service.label;
4703
- return /* @__PURE__ */React.createElement(Flex, {
155
+ return /* @__PURE__ */React.createElement(Flex4, {
4704
156
  key: serviceKey,
4705
157
  sx: {
4706
158
  gap: "3",
4707
159
  flexDirection: "column",
4708
160
  width: "full"
4709
161
  }
4710
- }, /* @__PURE__ */React.createElement(Flex, {
162
+ }, /* @__PURE__ */React.createElement(Flex4, {
4711
163
  sx: {
4712
164
  gap: "4",
4713
165
  alignItems: "center",
@@ -4716,12 +168,12 @@ var PlanCardMetadataSlot = /* @__PURE__ */__name(({
4716
168
  }
4717
169
  }, service.icon && /* @__PURE__ */React.createElement(Icon2, {
4718
170
  icon: service.icon
4719
- }), /* @__PURE__ */React.createElement(Text, {
171
+ }), /* @__PURE__ */React.createElement(Text3, {
4720
172
  sx: {
4721
173
  color: isEnterprise ? "white" : "display.text.secondary.default"
4722
174
  }
4723
175
  }, service.label + String.fromCharCode(58))), service.parameters.map(parameter => {
4724
- return /* @__PURE__ */React.createElement(Flex, {
176
+ return /* @__PURE__ */React.createElement(Flex4, {
4725
177
  key: parameter.name,
4726
178
  sx: {
4727
179
  paddingX: "6",
@@ -4730,7 +182,7 @@ var PlanCardMetadataSlot = /* @__PURE__ */__name(({
4730
182
  borderRadius: "lg",
4731
183
  width: "full"
4732
184
  }
4733
- }, /* @__PURE__ */React.createElement(Flex, {
185
+ }, /* @__PURE__ */React.createElement(Flex4, {
4734
186
  sx: {
4735
187
  width: "full",
4736
188
  display: "flex",
@@ -4738,12 +190,12 @@ var PlanCardMetadataSlot = /* @__PURE__ */__name(({
4738
190
  justifyContent: "space-between",
4739
191
  gap: "2"
4740
192
  }
4741
- }, /* @__PURE__ */React.createElement(Text, {
193
+ }, /* @__PURE__ */React.createElement(Text3, {
4742
194
  sx: {
4743
195
  fontSize: "sm",
4744
196
  textAlign: "center"
4745
197
  }
4746
- }, parameter.name), /* @__PURE__ */React.createElement(Text, {
198
+ }, parameter.name), /* @__PURE__ */React.createElement(Text3, {
4747
199
  sx: {
4748
200
  fontWeight: "semibold",
4749
201
  fontSize: "lg"
@@ -4754,12 +206,13 @@ var PlanCardMetadataSlot = /* @__PURE__ */__name(({
4754
206
  }, "PlanCardMetadataSlot");
4755
207
 
4756
208
  // src/components/PlanCardPriceSlot.tsx
209
+ import { Flex as Flex5, Text as Text4 } from "@ttoss/ui";
4757
210
  var PlanCardPriceSlot = /* @__PURE__ */__name(({
4758
211
  price,
4759
212
  variant = "default"
4760
213
  }) => {
4761
214
  const isEnterprise = variant === "enterprise";
4762
- return /* @__PURE__ */React.createElement(Flex, {
215
+ return /* @__PURE__ */React.createElement(Flex5, {
4763
216
  sx: {
4764
217
  paddingY: "6",
4765
218
  paddingX: "8",
@@ -4768,24 +221,24 @@ var PlanCardPriceSlot = /* @__PURE__ */__name(({
4768
221
  flexDirection: "column",
4769
222
  gap: "3"
4770
223
  }
4771
- }, /* @__PURE__ */React.createElement(Flex, {
224
+ }, /* @__PURE__ */React.createElement(Flex5, {
4772
225
  sx: {
4773
226
  alignItems: "baseline",
4774
227
  gap: "4",
4775
228
  justifyContent: "center"
4776
229
  }
4777
- }, /* @__PURE__ */React.createElement(Text, {
230
+ }, /* @__PURE__ */React.createElement(Text4, {
4778
231
  sx: {
4779
232
  fontSize: "4xl",
4780
233
  fontWeight: "bold",
4781
234
  color: isEnterprise ? "white" : "display.text.primary.default"
4782
235
  }
4783
- }, price.value), /* @__PURE__ */React.createElement(Text, {
236
+ }, price.value), /* @__PURE__ */React.createElement(Text4, {
4784
237
  sx: {
4785
238
  fontSize: "sm",
4786
239
  color: isEnterprise ? "white" : "display.text.secondary.default"
4787
240
  }
4788
- }, price.interval)), price.description && /* @__PURE__ */React.createElement(Text, {
241
+ }, price.interval)), price.description && /* @__PURE__ */React.createElement(Text4, {
4789
242
  sx: {
4790
243
  fontSize: "md",
4791
244
  color: isEnterprise ? "white" : "display.text.secondary.default"
@@ -4794,10 +247,11 @@ var PlanCardPriceSlot = /* @__PURE__ */__name(({
4794
247
  }, "PlanCardPriceSlot");
4795
248
 
4796
249
  // src/components/PlanCardTopTagSlot.tsx
250
+ import { Box as Box3 } from "@ttoss/ui";
4797
251
  var PlanCardTopTagSlot = /* @__PURE__ */__name(({
4798
252
  children
4799
253
  }) => {
4800
- return /* @__PURE__ */React.createElement(Box$1, {
254
+ return /* @__PURE__ */React.createElement(Box3, {
4801
255
  sx: {
4802
256
  padding: "4"
4803
257
  }
@@ -4818,7 +272,7 @@ var PlanCard = /* @__PURE__ */__name(props => {
4818
272
  ...cardProps
4819
273
  } = props;
4820
274
  const effectiveMetadataVariant = metadataVariant ?? variant;
4821
- return /* @__PURE__ */React.createElement(Card3, {
275
+ return /* @__PURE__ */React.createElement(Card, {
4822
276
  ...cardProps,
4823
277
  sx: {
4824
278
  width: "full",
@@ -4833,7 +287,7 @@ var PlanCard = /* @__PURE__ */__name(props => {
4833
287
  subtitle,
4834
288
  hasTopTag: Boolean(props.topTag),
4835
289
  variant
4836
- }), metadata.length > 0 && /* @__PURE__ */React.createElement(Box$1, {
290
+ }), metadata.length > 0 && /* @__PURE__ */React.createElement(Box4, {
4837
291
  sx: {
4838
292
  paddingY: "4",
4839
293
  paddingX: "8",
@@ -4853,39 +307,4 @@ var PlanCard = /* @__PURE__ */__name(props => {
4853
307
  variant
4854
308
  }));
4855
309
  }, "PlanCard");
4856
- export { PlanCard };
4857
- /*! Bundled license information:
4858
-
4859
- react-is/cjs/react-is.production.min.js:
4860
- (** @license React v16.13.1
4861
- * react-is.production.min.js
4862
- *
4863
- * Copyright (c) Facebook, Inc. and its affiliates.
4864
- *
4865
- * This source code is licensed under the MIT license found in the
4866
- * LICENSE file in the root directory of this source tree.
4867
- *)
4868
-
4869
- react-is/cjs/react-is.development.js:
4870
- (** @license React v16.13.1
4871
- * react-is.development.js
4872
- *
4873
- * Copyright (c) Facebook, Inc. and its affiliates.
4874
- *
4875
- * This source code is licensed under the MIT license found in the
4876
- * LICENSE file in the root directory of this source tree.
4877
- *)
4878
-
4879
- iconify-icon/dist/iconify-icon.mjs:
4880
- (**
4881
- * (c) Iconify
4882
- *
4883
- * For the full copyright and license information, please view the license.txt
4884
- * files at https://github.com/iconify/iconify
4885
- *
4886
- * Licensed under MIT.
4887
- *
4888
- * @license MIT
4889
- * @version 2.3.0
4890
- *)
4891
- */
310
+ export { PlanCard };