@txnlab/use-wallet-solid 3.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4722 @@
1
+ import { ne, se, T, oe, R, y, te, p, a } from '../chunk/D5JCOGLV.mjs';
2
+ import { __commonJS, __toESM } from '../chunk/YXEL5RAT.mjs';
3
+
4
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/can-promise.js
5
+ var require_can_promise = __commonJS({
6
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/can-promise.js"(exports, module) {
7
+ module.exports = function() {
8
+ return typeof Promise === "function" && Promise.prototype && Promise.prototype.then;
9
+ };
10
+ }
11
+ });
12
+
13
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/utils.js
14
+ var require_utils = __commonJS({
15
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/utils.js"(exports) {
16
+ var toSJISFunction;
17
+ var CODEWORDS_COUNT = [
18
+ 0,
19
+ // Not used
20
+ 26,
21
+ 44,
22
+ 70,
23
+ 100,
24
+ 134,
25
+ 172,
26
+ 196,
27
+ 242,
28
+ 292,
29
+ 346,
30
+ 404,
31
+ 466,
32
+ 532,
33
+ 581,
34
+ 655,
35
+ 733,
36
+ 815,
37
+ 901,
38
+ 991,
39
+ 1085,
40
+ 1156,
41
+ 1258,
42
+ 1364,
43
+ 1474,
44
+ 1588,
45
+ 1706,
46
+ 1828,
47
+ 1921,
48
+ 2051,
49
+ 2185,
50
+ 2323,
51
+ 2465,
52
+ 2611,
53
+ 2761,
54
+ 2876,
55
+ 3034,
56
+ 3196,
57
+ 3362,
58
+ 3532,
59
+ 3706
60
+ ];
61
+ exports.getSymbolSize = function getSymbolSize(version) {
62
+ if (!version)
63
+ throw new Error('"version" cannot be null or undefined');
64
+ if (version < 1 || version > 40)
65
+ throw new Error('"version" should be in range from 1 to 40');
66
+ return version * 4 + 17;
67
+ };
68
+ exports.getSymbolTotalCodewords = function getSymbolTotalCodewords(version) {
69
+ return CODEWORDS_COUNT[version];
70
+ };
71
+ exports.getBCHDigit = function(data2) {
72
+ let digit = 0;
73
+ while (data2 !== 0) {
74
+ digit++;
75
+ data2 >>>= 1;
76
+ }
77
+ return digit;
78
+ };
79
+ exports.setToSJISFunction = function setToSJISFunction(f2) {
80
+ if (typeof f2 !== "function") {
81
+ throw new Error('"toSJISFunc" is not a valid function.');
82
+ }
83
+ toSJISFunction = f2;
84
+ };
85
+ exports.isKanjiModeEnabled = function() {
86
+ return typeof toSJISFunction !== "undefined";
87
+ };
88
+ exports.toSJIS = function toSJIS(kanji) {
89
+ return toSJISFunction(kanji);
90
+ };
91
+ }
92
+ });
93
+
94
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/error-correction-level.js
95
+ var require_error_correction_level = __commonJS({
96
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/error-correction-level.js"(exports) {
97
+ exports.L = { bit: 1 };
98
+ exports.M = { bit: 0 };
99
+ exports.Q = { bit: 3 };
100
+ exports.H = { bit: 2 };
101
+ function fromString(string) {
102
+ if (typeof string !== "string") {
103
+ throw new Error("Param is not a string");
104
+ }
105
+ const lcStr = string.toLowerCase();
106
+ switch (lcStr) {
107
+ case "l":
108
+ case "low":
109
+ return exports.L;
110
+ case "m":
111
+ case "medium":
112
+ return exports.M;
113
+ case "q":
114
+ case "quartile":
115
+ return exports.Q;
116
+ case "h":
117
+ case "high":
118
+ return exports.H;
119
+ default:
120
+ throw new Error("Unknown EC Level: " + string);
121
+ }
122
+ }
123
+ exports.isValid = function isValid(level) {
124
+ return level && typeof level.bit !== "undefined" && level.bit >= 0 && level.bit < 4;
125
+ };
126
+ exports.from = function from(value, defaultValue) {
127
+ if (exports.isValid(value)) {
128
+ return value;
129
+ }
130
+ try {
131
+ return fromString(value);
132
+ } catch (e8) {
133
+ return defaultValue;
134
+ }
135
+ };
136
+ }
137
+ });
138
+
139
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/bit-buffer.js
140
+ var require_bit_buffer = __commonJS({
141
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/bit-buffer.js"(exports, module) {
142
+ function BitBuffer() {
143
+ this.buffer = [];
144
+ this.length = 0;
145
+ }
146
+ BitBuffer.prototype = {
147
+ get: function(index) {
148
+ const bufIndex = Math.floor(index / 8);
149
+ return (this.buffer[bufIndex] >>> 7 - index % 8 & 1) === 1;
150
+ },
151
+ put: function(num, length) {
152
+ for (let i5 = 0; i5 < length; i5++) {
153
+ this.putBit((num >>> length - i5 - 1 & 1) === 1);
154
+ }
155
+ },
156
+ getLengthInBits: function() {
157
+ return this.length;
158
+ },
159
+ putBit: function(bit) {
160
+ const bufIndex = Math.floor(this.length / 8);
161
+ if (this.buffer.length <= bufIndex) {
162
+ this.buffer.push(0);
163
+ }
164
+ if (bit) {
165
+ this.buffer[bufIndex] |= 128 >>> this.length % 8;
166
+ }
167
+ this.length++;
168
+ }
169
+ };
170
+ module.exports = BitBuffer;
171
+ }
172
+ });
173
+
174
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/bit-matrix.js
175
+ var require_bit_matrix = __commonJS({
176
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/bit-matrix.js"(exports, module) {
177
+ function BitMatrix(size) {
178
+ if (!size || size < 1) {
179
+ throw new Error("BitMatrix size must be defined and greater than 0");
180
+ }
181
+ this.size = size;
182
+ this.data = new Uint8Array(size * size);
183
+ this.reservedBit = new Uint8Array(size * size);
184
+ }
185
+ BitMatrix.prototype.set = function(row, col, value, reserved) {
186
+ const index = row * this.size + col;
187
+ this.data[index] = value;
188
+ if (reserved)
189
+ this.reservedBit[index] = true;
190
+ };
191
+ BitMatrix.prototype.get = function(row, col) {
192
+ return this.data[row * this.size + col];
193
+ };
194
+ BitMatrix.prototype.xor = function(row, col, value) {
195
+ this.data[row * this.size + col] ^= value;
196
+ };
197
+ BitMatrix.prototype.isReserved = function(row, col) {
198
+ return this.reservedBit[row * this.size + col];
199
+ };
200
+ module.exports = BitMatrix;
201
+ }
202
+ });
203
+
204
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/alignment-pattern.js
205
+ var require_alignment_pattern = __commonJS({
206
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/alignment-pattern.js"(exports) {
207
+ var getSymbolSize = require_utils().getSymbolSize;
208
+ exports.getRowColCoords = function getRowColCoords(version) {
209
+ if (version === 1)
210
+ return [];
211
+ const posCount = Math.floor(version / 7) + 2;
212
+ const size = getSymbolSize(version);
213
+ const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2;
214
+ const positions = [size - 7];
215
+ for (let i5 = 1; i5 < posCount - 1; i5++) {
216
+ positions[i5] = positions[i5 - 1] - intervals;
217
+ }
218
+ positions.push(6);
219
+ return positions.reverse();
220
+ };
221
+ exports.getPositions = function getPositions(version) {
222
+ const coords = [];
223
+ const pos = exports.getRowColCoords(version);
224
+ const posLength = pos.length;
225
+ for (let i5 = 0; i5 < posLength; i5++) {
226
+ for (let j2 = 0; j2 < posLength; j2++) {
227
+ if (i5 === 0 && j2 === 0 || // top-left
228
+ i5 === 0 && j2 === posLength - 1 || // bottom-left
229
+ i5 === posLength - 1 && j2 === 0) {
230
+ continue;
231
+ }
232
+ coords.push([pos[i5], pos[j2]]);
233
+ }
234
+ }
235
+ return coords;
236
+ };
237
+ }
238
+ });
239
+
240
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/finder-pattern.js
241
+ var require_finder_pattern = __commonJS({
242
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/finder-pattern.js"(exports) {
243
+ var getSymbolSize = require_utils().getSymbolSize;
244
+ var FINDER_PATTERN_SIZE = 7;
245
+ exports.getPositions = function getPositions(version) {
246
+ const size = getSymbolSize(version);
247
+ return [
248
+ // top-left
249
+ [0, 0],
250
+ // top-right
251
+ [size - FINDER_PATTERN_SIZE, 0],
252
+ // bottom-left
253
+ [0, size - FINDER_PATTERN_SIZE]
254
+ ];
255
+ };
256
+ }
257
+ });
258
+
259
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/mask-pattern.js
260
+ var require_mask_pattern = __commonJS({
261
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/mask-pattern.js"(exports) {
262
+ exports.Patterns = {
263
+ PATTERN000: 0,
264
+ PATTERN001: 1,
265
+ PATTERN010: 2,
266
+ PATTERN011: 3,
267
+ PATTERN100: 4,
268
+ PATTERN101: 5,
269
+ PATTERN110: 6,
270
+ PATTERN111: 7
271
+ };
272
+ var PenaltyScores = {
273
+ N1: 3,
274
+ N2: 3,
275
+ N3: 40,
276
+ N4: 10
277
+ };
278
+ exports.isValid = function isValid(mask) {
279
+ return mask != null && mask !== "" && !isNaN(mask) && mask >= 0 && mask <= 7;
280
+ };
281
+ exports.from = function from(value) {
282
+ return exports.isValid(value) ? parseInt(value, 10) : void 0;
283
+ };
284
+ exports.getPenaltyN1 = function getPenaltyN1(data2) {
285
+ const size = data2.size;
286
+ let points = 0;
287
+ let sameCountCol = 0;
288
+ let sameCountRow = 0;
289
+ let lastCol = null;
290
+ let lastRow = null;
291
+ for (let row = 0; row < size; row++) {
292
+ sameCountCol = sameCountRow = 0;
293
+ lastCol = lastRow = null;
294
+ for (let col = 0; col < size; col++) {
295
+ let module2 = data2.get(row, col);
296
+ if (module2 === lastCol) {
297
+ sameCountCol++;
298
+ } else {
299
+ if (sameCountCol >= 5)
300
+ points += PenaltyScores.N1 + (sameCountCol - 5);
301
+ lastCol = module2;
302
+ sameCountCol = 1;
303
+ }
304
+ module2 = data2.get(col, row);
305
+ if (module2 === lastRow) {
306
+ sameCountRow++;
307
+ } else {
308
+ if (sameCountRow >= 5)
309
+ points += PenaltyScores.N1 + (sameCountRow - 5);
310
+ lastRow = module2;
311
+ sameCountRow = 1;
312
+ }
313
+ }
314
+ if (sameCountCol >= 5)
315
+ points += PenaltyScores.N1 + (sameCountCol - 5);
316
+ if (sameCountRow >= 5)
317
+ points += PenaltyScores.N1 + (sameCountRow - 5);
318
+ }
319
+ return points;
320
+ };
321
+ exports.getPenaltyN2 = function getPenaltyN2(data2) {
322
+ const size = data2.size;
323
+ let points = 0;
324
+ for (let row = 0; row < size - 1; row++) {
325
+ for (let col = 0; col < size - 1; col++) {
326
+ const last = data2.get(row, col) + data2.get(row, col + 1) + data2.get(row + 1, col) + data2.get(row + 1, col + 1);
327
+ if (last === 4 || last === 0)
328
+ points++;
329
+ }
330
+ }
331
+ return points * PenaltyScores.N2;
332
+ };
333
+ exports.getPenaltyN3 = function getPenaltyN3(data2) {
334
+ const size = data2.size;
335
+ let points = 0;
336
+ let bitsCol = 0;
337
+ let bitsRow = 0;
338
+ for (let row = 0; row < size; row++) {
339
+ bitsCol = bitsRow = 0;
340
+ for (let col = 0; col < size; col++) {
341
+ bitsCol = bitsCol << 1 & 2047 | data2.get(row, col);
342
+ if (col >= 10 && (bitsCol === 1488 || bitsCol === 93))
343
+ points++;
344
+ bitsRow = bitsRow << 1 & 2047 | data2.get(col, row);
345
+ if (col >= 10 && (bitsRow === 1488 || bitsRow === 93))
346
+ points++;
347
+ }
348
+ }
349
+ return points * PenaltyScores.N3;
350
+ };
351
+ exports.getPenaltyN4 = function getPenaltyN4(data2) {
352
+ let darkCount = 0;
353
+ const modulesCount = data2.data.length;
354
+ for (let i5 = 0; i5 < modulesCount; i5++)
355
+ darkCount += data2.data[i5];
356
+ const k2 = Math.abs(Math.ceil(darkCount * 100 / modulesCount / 5) - 10);
357
+ return k2 * PenaltyScores.N4;
358
+ };
359
+ function getMaskAt(maskPattern, i5, j2) {
360
+ switch (maskPattern) {
361
+ case exports.Patterns.PATTERN000:
362
+ return (i5 + j2) % 2 === 0;
363
+ case exports.Patterns.PATTERN001:
364
+ return i5 % 2 === 0;
365
+ case exports.Patterns.PATTERN010:
366
+ return j2 % 3 === 0;
367
+ case exports.Patterns.PATTERN011:
368
+ return (i5 + j2) % 3 === 0;
369
+ case exports.Patterns.PATTERN100:
370
+ return (Math.floor(i5 / 2) + Math.floor(j2 / 3)) % 2 === 0;
371
+ case exports.Patterns.PATTERN101:
372
+ return i5 * j2 % 2 + i5 * j2 % 3 === 0;
373
+ case exports.Patterns.PATTERN110:
374
+ return (i5 * j2 % 2 + i5 * j2 % 3) % 2 === 0;
375
+ case exports.Patterns.PATTERN111:
376
+ return (i5 * j2 % 3 + (i5 + j2) % 2) % 2 === 0;
377
+ default:
378
+ throw new Error("bad maskPattern:" + maskPattern);
379
+ }
380
+ }
381
+ exports.applyMask = function applyMask(pattern, data2) {
382
+ const size = data2.size;
383
+ for (let col = 0; col < size; col++) {
384
+ for (let row = 0; row < size; row++) {
385
+ if (data2.isReserved(row, col))
386
+ continue;
387
+ data2.xor(row, col, getMaskAt(pattern, row, col));
388
+ }
389
+ }
390
+ };
391
+ exports.getBestMask = function getBestMask(data2, setupFormatFunc) {
392
+ const numPatterns = Object.keys(exports.Patterns).length;
393
+ let bestPattern = 0;
394
+ let lowerPenalty = Infinity;
395
+ for (let p3 = 0; p3 < numPatterns; p3++) {
396
+ setupFormatFunc(p3);
397
+ exports.applyMask(p3, data2);
398
+ const penalty = exports.getPenaltyN1(data2) + exports.getPenaltyN2(data2) + exports.getPenaltyN3(data2) + exports.getPenaltyN4(data2);
399
+ exports.applyMask(p3, data2);
400
+ if (penalty < lowerPenalty) {
401
+ lowerPenalty = penalty;
402
+ bestPattern = p3;
403
+ }
404
+ }
405
+ return bestPattern;
406
+ };
407
+ }
408
+ });
409
+
410
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/error-correction-code.js
411
+ var require_error_correction_code = __commonJS({
412
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/error-correction-code.js"(exports) {
413
+ var ECLevel = require_error_correction_level();
414
+ var EC_BLOCKS_TABLE = [
415
+ // L M Q H
416
+ 1,
417
+ 1,
418
+ 1,
419
+ 1,
420
+ 1,
421
+ 1,
422
+ 1,
423
+ 1,
424
+ 1,
425
+ 1,
426
+ 2,
427
+ 2,
428
+ 1,
429
+ 2,
430
+ 2,
431
+ 4,
432
+ 1,
433
+ 2,
434
+ 4,
435
+ 4,
436
+ 2,
437
+ 4,
438
+ 4,
439
+ 4,
440
+ 2,
441
+ 4,
442
+ 6,
443
+ 5,
444
+ 2,
445
+ 4,
446
+ 6,
447
+ 6,
448
+ 2,
449
+ 5,
450
+ 8,
451
+ 8,
452
+ 4,
453
+ 5,
454
+ 8,
455
+ 8,
456
+ 4,
457
+ 5,
458
+ 8,
459
+ 11,
460
+ 4,
461
+ 8,
462
+ 10,
463
+ 11,
464
+ 4,
465
+ 9,
466
+ 12,
467
+ 16,
468
+ 4,
469
+ 9,
470
+ 16,
471
+ 16,
472
+ 6,
473
+ 10,
474
+ 12,
475
+ 18,
476
+ 6,
477
+ 10,
478
+ 17,
479
+ 16,
480
+ 6,
481
+ 11,
482
+ 16,
483
+ 19,
484
+ 6,
485
+ 13,
486
+ 18,
487
+ 21,
488
+ 7,
489
+ 14,
490
+ 21,
491
+ 25,
492
+ 8,
493
+ 16,
494
+ 20,
495
+ 25,
496
+ 8,
497
+ 17,
498
+ 23,
499
+ 25,
500
+ 9,
501
+ 17,
502
+ 23,
503
+ 34,
504
+ 9,
505
+ 18,
506
+ 25,
507
+ 30,
508
+ 10,
509
+ 20,
510
+ 27,
511
+ 32,
512
+ 12,
513
+ 21,
514
+ 29,
515
+ 35,
516
+ 12,
517
+ 23,
518
+ 34,
519
+ 37,
520
+ 12,
521
+ 25,
522
+ 34,
523
+ 40,
524
+ 13,
525
+ 26,
526
+ 35,
527
+ 42,
528
+ 14,
529
+ 28,
530
+ 38,
531
+ 45,
532
+ 15,
533
+ 29,
534
+ 40,
535
+ 48,
536
+ 16,
537
+ 31,
538
+ 43,
539
+ 51,
540
+ 17,
541
+ 33,
542
+ 45,
543
+ 54,
544
+ 18,
545
+ 35,
546
+ 48,
547
+ 57,
548
+ 19,
549
+ 37,
550
+ 51,
551
+ 60,
552
+ 19,
553
+ 38,
554
+ 53,
555
+ 63,
556
+ 20,
557
+ 40,
558
+ 56,
559
+ 66,
560
+ 21,
561
+ 43,
562
+ 59,
563
+ 70,
564
+ 22,
565
+ 45,
566
+ 62,
567
+ 74,
568
+ 24,
569
+ 47,
570
+ 65,
571
+ 77,
572
+ 25,
573
+ 49,
574
+ 68,
575
+ 81
576
+ ];
577
+ var EC_CODEWORDS_TABLE = [
578
+ // L M Q H
579
+ 7,
580
+ 10,
581
+ 13,
582
+ 17,
583
+ 10,
584
+ 16,
585
+ 22,
586
+ 28,
587
+ 15,
588
+ 26,
589
+ 36,
590
+ 44,
591
+ 20,
592
+ 36,
593
+ 52,
594
+ 64,
595
+ 26,
596
+ 48,
597
+ 72,
598
+ 88,
599
+ 36,
600
+ 64,
601
+ 96,
602
+ 112,
603
+ 40,
604
+ 72,
605
+ 108,
606
+ 130,
607
+ 48,
608
+ 88,
609
+ 132,
610
+ 156,
611
+ 60,
612
+ 110,
613
+ 160,
614
+ 192,
615
+ 72,
616
+ 130,
617
+ 192,
618
+ 224,
619
+ 80,
620
+ 150,
621
+ 224,
622
+ 264,
623
+ 96,
624
+ 176,
625
+ 260,
626
+ 308,
627
+ 104,
628
+ 198,
629
+ 288,
630
+ 352,
631
+ 120,
632
+ 216,
633
+ 320,
634
+ 384,
635
+ 132,
636
+ 240,
637
+ 360,
638
+ 432,
639
+ 144,
640
+ 280,
641
+ 408,
642
+ 480,
643
+ 168,
644
+ 308,
645
+ 448,
646
+ 532,
647
+ 180,
648
+ 338,
649
+ 504,
650
+ 588,
651
+ 196,
652
+ 364,
653
+ 546,
654
+ 650,
655
+ 224,
656
+ 416,
657
+ 600,
658
+ 700,
659
+ 224,
660
+ 442,
661
+ 644,
662
+ 750,
663
+ 252,
664
+ 476,
665
+ 690,
666
+ 816,
667
+ 270,
668
+ 504,
669
+ 750,
670
+ 900,
671
+ 300,
672
+ 560,
673
+ 810,
674
+ 960,
675
+ 312,
676
+ 588,
677
+ 870,
678
+ 1050,
679
+ 336,
680
+ 644,
681
+ 952,
682
+ 1110,
683
+ 360,
684
+ 700,
685
+ 1020,
686
+ 1200,
687
+ 390,
688
+ 728,
689
+ 1050,
690
+ 1260,
691
+ 420,
692
+ 784,
693
+ 1140,
694
+ 1350,
695
+ 450,
696
+ 812,
697
+ 1200,
698
+ 1440,
699
+ 480,
700
+ 868,
701
+ 1290,
702
+ 1530,
703
+ 510,
704
+ 924,
705
+ 1350,
706
+ 1620,
707
+ 540,
708
+ 980,
709
+ 1440,
710
+ 1710,
711
+ 570,
712
+ 1036,
713
+ 1530,
714
+ 1800,
715
+ 570,
716
+ 1064,
717
+ 1590,
718
+ 1890,
719
+ 600,
720
+ 1120,
721
+ 1680,
722
+ 1980,
723
+ 630,
724
+ 1204,
725
+ 1770,
726
+ 2100,
727
+ 660,
728
+ 1260,
729
+ 1860,
730
+ 2220,
731
+ 720,
732
+ 1316,
733
+ 1950,
734
+ 2310,
735
+ 750,
736
+ 1372,
737
+ 2040,
738
+ 2430
739
+ ];
740
+ exports.getBlocksCount = function getBlocksCount(version, errorCorrectionLevel) {
741
+ switch (errorCorrectionLevel) {
742
+ case ECLevel.L:
743
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 0];
744
+ case ECLevel.M:
745
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 1];
746
+ case ECLevel.Q:
747
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 2];
748
+ case ECLevel.H:
749
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 3];
750
+ default:
751
+ return void 0;
752
+ }
753
+ };
754
+ exports.getTotalCodewordsCount = function getTotalCodewordsCount(version, errorCorrectionLevel) {
755
+ switch (errorCorrectionLevel) {
756
+ case ECLevel.L:
757
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0];
758
+ case ECLevel.M:
759
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1];
760
+ case ECLevel.Q:
761
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2];
762
+ case ECLevel.H:
763
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3];
764
+ default:
765
+ return void 0;
766
+ }
767
+ };
768
+ }
769
+ });
770
+
771
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/galois-field.js
772
+ var require_galois_field = __commonJS({
773
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/galois-field.js"(exports) {
774
+ var EXP_TABLE = new Uint8Array(512);
775
+ var LOG_TABLE = new Uint8Array(256);
776
+ (function initTables() {
777
+ let x2 = 1;
778
+ for (let i5 = 0; i5 < 255; i5++) {
779
+ EXP_TABLE[i5] = x2;
780
+ LOG_TABLE[x2] = i5;
781
+ x2 <<= 1;
782
+ if (x2 & 256) {
783
+ x2 ^= 285;
784
+ }
785
+ }
786
+ for (let i5 = 255; i5 < 512; i5++) {
787
+ EXP_TABLE[i5] = EXP_TABLE[i5 - 255];
788
+ }
789
+ })();
790
+ exports.log = function log(n7) {
791
+ if (n7 < 1)
792
+ throw new Error("log(" + n7 + ")");
793
+ return LOG_TABLE[n7];
794
+ };
795
+ exports.exp = function exp(n7) {
796
+ return EXP_TABLE[n7];
797
+ };
798
+ exports.mul = function mul(x2, y3) {
799
+ if (x2 === 0 || y3 === 0)
800
+ return 0;
801
+ return EXP_TABLE[LOG_TABLE[x2] + LOG_TABLE[y3]];
802
+ };
803
+ }
804
+ });
805
+
806
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/polynomial.js
807
+ var require_polynomial = __commonJS({
808
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/polynomial.js"(exports) {
809
+ var GF = require_galois_field();
810
+ exports.mul = function mul(p1, p22) {
811
+ const coeff = new Uint8Array(p1.length + p22.length - 1);
812
+ for (let i5 = 0; i5 < p1.length; i5++) {
813
+ for (let j2 = 0; j2 < p22.length; j2++) {
814
+ coeff[i5 + j2] ^= GF.mul(p1[i5], p22[j2]);
815
+ }
816
+ }
817
+ return coeff;
818
+ };
819
+ exports.mod = function mod(divident, divisor) {
820
+ let result = new Uint8Array(divident);
821
+ while (result.length - divisor.length >= 0) {
822
+ const coeff = result[0];
823
+ for (let i5 = 0; i5 < divisor.length; i5++) {
824
+ result[i5] ^= GF.mul(divisor[i5], coeff);
825
+ }
826
+ let offset = 0;
827
+ while (offset < result.length && result[offset] === 0)
828
+ offset++;
829
+ result = result.slice(offset);
830
+ }
831
+ return result;
832
+ };
833
+ exports.generateECPolynomial = function generateECPolynomial(degree) {
834
+ let poly = new Uint8Array([1]);
835
+ for (let i5 = 0; i5 < degree; i5++) {
836
+ poly = exports.mul(poly, new Uint8Array([1, GF.exp(i5)]));
837
+ }
838
+ return poly;
839
+ };
840
+ }
841
+ });
842
+
843
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/reed-solomon-encoder.js
844
+ var require_reed_solomon_encoder = __commonJS({
845
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/reed-solomon-encoder.js"(exports, module) {
846
+ var Polynomial = require_polynomial();
847
+ function ReedSolomonEncoder(degree) {
848
+ this.genPoly = void 0;
849
+ this.degree = degree;
850
+ if (this.degree)
851
+ this.initialize(this.degree);
852
+ }
853
+ ReedSolomonEncoder.prototype.initialize = function initialize(degree) {
854
+ this.degree = degree;
855
+ this.genPoly = Polynomial.generateECPolynomial(this.degree);
856
+ };
857
+ ReedSolomonEncoder.prototype.encode = function encode(data2) {
858
+ if (!this.genPoly) {
859
+ throw new Error("Encoder not initialized");
860
+ }
861
+ const paddedData = new Uint8Array(data2.length + this.degree);
862
+ paddedData.set(data2);
863
+ const remainder = Polynomial.mod(paddedData, this.genPoly);
864
+ const start = this.degree - remainder.length;
865
+ if (start > 0) {
866
+ const buff = new Uint8Array(this.degree);
867
+ buff.set(remainder, start);
868
+ return buff;
869
+ }
870
+ return remainder;
871
+ };
872
+ module.exports = ReedSolomonEncoder;
873
+ }
874
+ });
875
+
876
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/version-check.js
877
+ var require_version_check = __commonJS({
878
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/version-check.js"(exports) {
879
+ exports.isValid = function isValid(version) {
880
+ return !isNaN(version) && version >= 1 && version <= 40;
881
+ };
882
+ }
883
+ });
884
+
885
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/regex.js
886
+ var require_regex = __commonJS({
887
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/regex.js"(exports) {
888
+ var numeric = "[0-9]+";
889
+ var alphanumeric = "[A-Z $%*+\\-./:]+";
890
+ var kanji = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
891
+ kanji = kanji.replace(/u/g, "\\u");
892
+ var byte = "(?:(?![A-Z0-9 $%*+\\-./:]|" + kanji + ")(?:.|[\r\n]))+";
893
+ exports.KANJI = new RegExp(kanji, "g");
894
+ exports.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
895
+ exports.BYTE = new RegExp(byte, "g");
896
+ exports.NUMERIC = new RegExp(numeric, "g");
897
+ exports.ALPHANUMERIC = new RegExp(alphanumeric, "g");
898
+ var TEST_KANJI = new RegExp("^" + kanji + "$");
899
+ var TEST_NUMERIC = new RegExp("^" + numeric + "$");
900
+ var TEST_ALPHANUMERIC = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
901
+ exports.testKanji = function testKanji(str) {
902
+ return TEST_KANJI.test(str);
903
+ };
904
+ exports.testNumeric = function testNumeric(str) {
905
+ return TEST_NUMERIC.test(str);
906
+ };
907
+ exports.testAlphanumeric = function testAlphanumeric(str) {
908
+ return TEST_ALPHANUMERIC.test(str);
909
+ };
910
+ }
911
+ });
912
+
913
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/mode.js
914
+ var require_mode = __commonJS({
915
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/mode.js"(exports) {
916
+ var VersionCheck = require_version_check();
917
+ var Regex = require_regex();
918
+ exports.NUMERIC = {
919
+ id: "Numeric",
920
+ bit: 1 << 0,
921
+ ccBits: [10, 12, 14]
922
+ };
923
+ exports.ALPHANUMERIC = {
924
+ id: "Alphanumeric",
925
+ bit: 1 << 1,
926
+ ccBits: [9, 11, 13]
927
+ };
928
+ exports.BYTE = {
929
+ id: "Byte",
930
+ bit: 1 << 2,
931
+ ccBits: [8, 16, 16]
932
+ };
933
+ exports.KANJI = {
934
+ id: "Kanji",
935
+ bit: 1 << 3,
936
+ ccBits: [8, 10, 12]
937
+ };
938
+ exports.MIXED = {
939
+ bit: -1
940
+ };
941
+ exports.getCharCountIndicator = function getCharCountIndicator(mode, version) {
942
+ if (!mode.ccBits)
943
+ throw new Error("Invalid mode: " + mode);
944
+ if (!VersionCheck.isValid(version)) {
945
+ throw new Error("Invalid version: " + version);
946
+ }
947
+ if (version >= 1 && version < 10)
948
+ return mode.ccBits[0];
949
+ else if (version < 27)
950
+ return mode.ccBits[1];
951
+ return mode.ccBits[2];
952
+ };
953
+ exports.getBestModeForData = function getBestModeForData(dataStr) {
954
+ if (Regex.testNumeric(dataStr))
955
+ return exports.NUMERIC;
956
+ else if (Regex.testAlphanumeric(dataStr))
957
+ return exports.ALPHANUMERIC;
958
+ else if (Regex.testKanji(dataStr))
959
+ return exports.KANJI;
960
+ else
961
+ return exports.BYTE;
962
+ };
963
+ exports.toString = function toString(mode) {
964
+ if (mode && mode.id)
965
+ return mode.id;
966
+ throw new Error("Invalid mode");
967
+ };
968
+ exports.isValid = function isValid(mode) {
969
+ return mode && mode.bit && mode.ccBits;
970
+ };
971
+ function fromString(string) {
972
+ if (typeof string !== "string") {
973
+ throw new Error("Param is not a string");
974
+ }
975
+ const lcStr = string.toLowerCase();
976
+ switch (lcStr) {
977
+ case "numeric":
978
+ return exports.NUMERIC;
979
+ case "alphanumeric":
980
+ return exports.ALPHANUMERIC;
981
+ case "kanji":
982
+ return exports.KANJI;
983
+ case "byte":
984
+ return exports.BYTE;
985
+ default:
986
+ throw new Error("Unknown mode: " + string);
987
+ }
988
+ }
989
+ exports.from = function from(value, defaultValue) {
990
+ if (exports.isValid(value)) {
991
+ return value;
992
+ }
993
+ try {
994
+ return fromString(value);
995
+ } catch (e8) {
996
+ return defaultValue;
997
+ }
998
+ };
999
+ }
1000
+ });
1001
+
1002
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/version.js
1003
+ var require_version = __commonJS({
1004
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/version.js"(exports) {
1005
+ var Utils = require_utils();
1006
+ var ECCode = require_error_correction_code();
1007
+ var ECLevel = require_error_correction_level();
1008
+ var Mode = require_mode();
1009
+ var VersionCheck = require_version_check();
1010
+ var G18 = 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0;
1011
+ var G18_BCH = Utils.getBCHDigit(G18);
1012
+ function getBestVersionForDataLength(mode, length, errorCorrectionLevel) {
1013
+ for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
1014
+ if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {
1015
+ return currentVersion;
1016
+ }
1017
+ }
1018
+ return void 0;
1019
+ }
1020
+ function getReservedBitsCount(mode, version) {
1021
+ return Mode.getCharCountIndicator(mode, version) + 4;
1022
+ }
1023
+ function getTotalBitsFromDataArray(segments, version) {
1024
+ let totalBits = 0;
1025
+ segments.forEach(function(data2) {
1026
+ const reservedBits = getReservedBitsCount(data2.mode, version);
1027
+ totalBits += reservedBits + data2.getBitsLength();
1028
+ });
1029
+ return totalBits;
1030
+ }
1031
+ function getBestVersionForMixedData(segments, errorCorrectionLevel) {
1032
+ for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
1033
+ const length = getTotalBitsFromDataArray(segments, currentVersion);
1034
+ if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) {
1035
+ return currentVersion;
1036
+ }
1037
+ }
1038
+ return void 0;
1039
+ }
1040
+ exports.from = function from(value, defaultValue) {
1041
+ if (VersionCheck.isValid(value)) {
1042
+ return parseInt(value, 10);
1043
+ }
1044
+ return defaultValue;
1045
+ };
1046
+ exports.getCapacity = function getCapacity(version, errorCorrectionLevel, mode) {
1047
+ if (!VersionCheck.isValid(version)) {
1048
+ throw new Error("Invalid QR Code version");
1049
+ }
1050
+ if (typeof mode === "undefined")
1051
+ mode = Mode.BYTE;
1052
+ const totalCodewords = Utils.getSymbolTotalCodewords(version);
1053
+ const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel);
1054
+ const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8;
1055
+ if (mode === Mode.MIXED)
1056
+ return dataTotalCodewordsBits;
1057
+ const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version);
1058
+ switch (mode) {
1059
+ case Mode.NUMERIC:
1060
+ return Math.floor(usableBits / 10 * 3);
1061
+ case Mode.ALPHANUMERIC:
1062
+ return Math.floor(usableBits / 11 * 2);
1063
+ case Mode.KANJI:
1064
+ return Math.floor(usableBits / 13);
1065
+ case Mode.BYTE:
1066
+ default:
1067
+ return Math.floor(usableBits / 8);
1068
+ }
1069
+ };
1070
+ exports.getBestVersionForData = function getBestVersionForData(data2, errorCorrectionLevel) {
1071
+ let seg;
1072
+ const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M);
1073
+ if (Array.isArray(data2)) {
1074
+ if (data2.length > 1) {
1075
+ return getBestVersionForMixedData(data2, ecl);
1076
+ }
1077
+ if (data2.length === 0) {
1078
+ return 1;
1079
+ }
1080
+ seg = data2[0];
1081
+ } else {
1082
+ seg = data2;
1083
+ }
1084
+ return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl);
1085
+ };
1086
+ exports.getEncodedBits = function getEncodedBits(version) {
1087
+ if (!VersionCheck.isValid(version) || version < 7) {
1088
+ throw new Error("Invalid QR Code version");
1089
+ }
1090
+ let d3 = version << 12;
1091
+ while (Utils.getBCHDigit(d3) - G18_BCH >= 0) {
1092
+ d3 ^= G18 << Utils.getBCHDigit(d3) - G18_BCH;
1093
+ }
1094
+ return version << 12 | d3;
1095
+ };
1096
+ }
1097
+ });
1098
+
1099
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/format-info.js
1100
+ var require_format_info = __commonJS({
1101
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/format-info.js"(exports) {
1102
+ var Utils = require_utils();
1103
+ var G15 = 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0;
1104
+ var G15_MASK = 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1;
1105
+ var G15_BCH = Utils.getBCHDigit(G15);
1106
+ exports.getEncodedBits = function getEncodedBits(errorCorrectionLevel, mask) {
1107
+ const data2 = errorCorrectionLevel.bit << 3 | mask;
1108
+ let d3 = data2 << 10;
1109
+ while (Utils.getBCHDigit(d3) - G15_BCH >= 0) {
1110
+ d3 ^= G15 << Utils.getBCHDigit(d3) - G15_BCH;
1111
+ }
1112
+ return (data2 << 10 | d3) ^ G15_MASK;
1113
+ };
1114
+ }
1115
+ });
1116
+
1117
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/numeric-data.js
1118
+ var require_numeric_data = __commonJS({
1119
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/numeric-data.js"(exports, module) {
1120
+ var Mode = require_mode();
1121
+ function NumericData(data2) {
1122
+ this.mode = Mode.NUMERIC;
1123
+ this.data = data2.toString();
1124
+ }
1125
+ NumericData.getBitsLength = function getBitsLength(length) {
1126
+ return 10 * Math.floor(length / 3) + (length % 3 ? length % 3 * 3 + 1 : 0);
1127
+ };
1128
+ NumericData.prototype.getLength = function getLength() {
1129
+ return this.data.length;
1130
+ };
1131
+ NumericData.prototype.getBitsLength = function getBitsLength() {
1132
+ return NumericData.getBitsLength(this.data.length);
1133
+ };
1134
+ NumericData.prototype.write = function write(bitBuffer) {
1135
+ let i5, group, value;
1136
+ for (i5 = 0; i5 + 3 <= this.data.length; i5 += 3) {
1137
+ group = this.data.substr(i5, 3);
1138
+ value = parseInt(group, 10);
1139
+ bitBuffer.put(value, 10);
1140
+ }
1141
+ const remainingNum = this.data.length - i5;
1142
+ if (remainingNum > 0) {
1143
+ group = this.data.substr(i5);
1144
+ value = parseInt(group, 10);
1145
+ bitBuffer.put(value, remainingNum * 3 + 1);
1146
+ }
1147
+ };
1148
+ module.exports = NumericData;
1149
+ }
1150
+ });
1151
+
1152
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/alphanumeric-data.js
1153
+ var require_alphanumeric_data = __commonJS({
1154
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/alphanumeric-data.js"(exports, module) {
1155
+ var Mode = require_mode();
1156
+ var ALPHA_NUM_CHARS = [
1157
+ "0",
1158
+ "1",
1159
+ "2",
1160
+ "3",
1161
+ "4",
1162
+ "5",
1163
+ "6",
1164
+ "7",
1165
+ "8",
1166
+ "9",
1167
+ "A",
1168
+ "B",
1169
+ "C",
1170
+ "D",
1171
+ "E",
1172
+ "F",
1173
+ "G",
1174
+ "H",
1175
+ "I",
1176
+ "J",
1177
+ "K",
1178
+ "L",
1179
+ "M",
1180
+ "N",
1181
+ "O",
1182
+ "P",
1183
+ "Q",
1184
+ "R",
1185
+ "S",
1186
+ "T",
1187
+ "U",
1188
+ "V",
1189
+ "W",
1190
+ "X",
1191
+ "Y",
1192
+ "Z",
1193
+ " ",
1194
+ "$",
1195
+ "%",
1196
+ "*",
1197
+ "+",
1198
+ "-",
1199
+ ".",
1200
+ "/",
1201
+ ":"
1202
+ ];
1203
+ function AlphanumericData(data2) {
1204
+ this.mode = Mode.ALPHANUMERIC;
1205
+ this.data = data2;
1206
+ }
1207
+ AlphanumericData.getBitsLength = function getBitsLength(length) {
1208
+ return 11 * Math.floor(length / 2) + 6 * (length % 2);
1209
+ };
1210
+ AlphanumericData.prototype.getLength = function getLength() {
1211
+ return this.data.length;
1212
+ };
1213
+ AlphanumericData.prototype.getBitsLength = function getBitsLength() {
1214
+ return AlphanumericData.getBitsLength(this.data.length);
1215
+ };
1216
+ AlphanumericData.prototype.write = function write(bitBuffer) {
1217
+ let i5;
1218
+ for (i5 = 0; i5 + 2 <= this.data.length; i5 += 2) {
1219
+ let value = ALPHA_NUM_CHARS.indexOf(this.data[i5]) * 45;
1220
+ value += ALPHA_NUM_CHARS.indexOf(this.data[i5 + 1]);
1221
+ bitBuffer.put(value, 11);
1222
+ }
1223
+ if (this.data.length % 2) {
1224
+ bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i5]), 6);
1225
+ }
1226
+ };
1227
+ module.exports = AlphanumericData;
1228
+ }
1229
+ });
1230
+
1231
+ // ../../node_modules/.pnpm/encode-utf8@1.0.3/node_modules/encode-utf8/index.js
1232
+ var require_encode_utf8 = __commonJS({
1233
+ "../../node_modules/.pnpm/encode-utf8@1.0.3/node_modules/encode-utf8/index.js"(exports, module) {
1234
+ module.exports = function encodeUtf8(input) {
1235
+ var result = [];
1236
+ var size = input.length;
1237
+ for (var index = 0; index < size; index++) {
1238
+ var point = input.charCodeAt(index);
1239
+ if (point >= 55296 && point <= 56319 && size > index + 1) {
1240
+ var second = input.charCodeAt(index + 1);
1241
+ if (second >= 56320 && second <= 57343) {
1242
+ point = (point - 55296) * 1024 + second - 56320 + 65536;
1243
+ index += 1;
1244
+ }
1245
+ }
1246
+ if (point < 128) {
1247
+ result.push(point);
1248
+ continue;
1249
+ }
1250
+ if (point < 2048) {
1251
+ result.push(point >> 6 | 192);
1252
+ result.push(point & 63 | 128);
1253
+ continue;
1254
+ }
1255
+ if (point < 55296 || point >= 57344 && point < 65536) {
1256
+ result.push(point >> 12 | 224);
1257
+ result.push(point >> 6 & 63 | 128);
1258
+ result.push(point & 63 | 128);
1259
+ continue;
1260
+ }
1261
+ if (point >= 65536 && point <= 1114111) {
1262
+ result.push(point >> 18 | 240);
1263
+ result.push(point >> 12 & 63 | 128);
1264
+ result.push(point >> 6 & 63 | 128);
1265
+ result.push(point & 63 | 128);
1266
+ continue;
1267
+ }
1268
+ result.push(239, 191, 189);
1269
+ }
1270
+ return new Uint8Array(result).buffer;
1271
+ };
1272
+ }
1273
+ });
1274
+
1275
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/byte-data.js
1276
+ var require_byte_data = __commonJS({
1277
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/byte-data.js"(exports, module) {
1278
+ var encodeUtf8 = require_encode_utf8();
1279
+ var Mode = require_mode();
1280
+ function ByteData(data2) {
1281
+ this.mode = Mode.BYTE;
1282
+ if (typeof data2 === "string") {
1283
+ data2 = encodeUtf8(data2);
1284
+ }
1285
+ this.data = new Uint8Array(data2);
1286
+ }
1287
+ ByteData.getBitsLength = function getBitsLength(length) {
1288
+ return length * 8;
1289
+ };
1290
+ ByteData.prototype.getLength = function getLength() {
1291
+ return this.data.length;
1292
+ };
1293
+ ByteData.prototype.getBitsLength = function getBitsLength() {
1294
+ return ByteData.getBitsLength(this.data.length);
1295
+ };
1296
+ ByteData.prototype.write = function(bitBuffer) {
1297
+ for (let i5 = 0, l6 = this.data.length; i5 < l6; i5++) {
1298
+ bitBuffer.put(this.data[i5], 8);
1299
+ }
1300
+ };
1301
+ module.exports = ByteData;
1302
+ }
1303
+ });
1304
+
1305
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/kanji-data.js
1306
+ var require_kanji_data = __commonJS({
1307
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/kanji-data.js"(exports, module) {
1308
+ var Mode = require_mode();
1309
+ var Utils = require_utils();
1310
+ function KanjiData(data2) {
1311
+ this.mode = Mode.KANJI;
1312
+ this.data = data2;
1313
+ }
1314
+ KanjiData.getBitsLength = function getBitsLength(length) {
1315
+ return length * 13;
1316
+ };
1317
+ KanjiData.prototype.getLength = function getLength() {
1318
+ return this.data.length;
1319
+ };
1320
+ KanjiData.prototype.getBitsLength = function getBitsLength() {
1321
+ return KanjiData.getBitsLength(this.data.length);
1322
+ };
1323
+ KanjiData.prototype.write = function(bitBuffer) {
1324
+ let i5;
1325
+ for (i5 = 0; i5 < this.data.length; i5++) {
1326
+ let value = Utils.toSJIS(this.data[i5]);
1327
+ if (value >= 33088 && value <= 40956) {
1328
+ value -= 33088;
1329
+ } else if (value >= 57408 && value <= 60351) {
1330
+ value -= 49472;
1331
+ } else {
1332
+ throw new Error(
1333
+ "Invalid SJIS character: " + this.data[i5] + "\nMake sure your charset is UTF-8"
1334
+ );
1335
+ }
1336
+ value = (value >>> 8 & 255) * 192 + (value & 255);
1337
+ bitBuffer.put(value, 13);
1338
+ }
1339
+ };
1340
+ module.exports = KanjiData;
1341
+ }
1342
+ });
1343
+
1344
+ // ../../node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js
1345
+ var require_dijkstra = __commonJS({
1346
+ "../../node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js"(exports, module) {
1347
+ var dijkstra = {
1348
+ single_source_shortest_paths: function(graph, s5, d3) {
1349
+ var predecessors = {};
1350
+ var costs = {};
1351
+ costs[s5] = 0;
1352
+ var open = dijkstra.PriorityQueue.make();
1353
+ open.push(s5, 0);
1354
+ var closest, u3, v3, cost_of_s_to_u, adjacent_nodes, cost_of_e, cost_of_s_to_u_plus_cost_of_e, cost_of_s_to_v, first_visit;
1355
+ while (!open.empty()) {
1356
+ closest = open.pop();
1357
+ u3 = closest.value;
1358
+ cost_of_s_to_u = closest.cost;
1359
+ adjacent_nodes = graph[u3] || {};
1360
+ for (v3 in adjacent_nodes) {
1361
+ if (adjacent_nodes.hasOwnProperty(v3)) {
1362
+ cost_of_e = adjacent_nodes[v3];
1363
+ cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;
1364
+ cost_of_s_to_v = costs[v3];
1365
+ first_visit = typeof costs[v3] === "undefined";
1366
+ if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {
1367
+ costs[v3] = cost_of_s_to_u_plus_cost_of_e;
1368
+ open.push(v3, cost_of_s_to_u_plus_cost_of_e);
1369
+ predecessors[v3] = u3;
1370
+ }
1371
+ }
1372
+ }
1373
+ }
1374
+ if (typeof d3 !== "undefined" && typeof costs[d3] === "undefined") {
1375
+ var msg = ["Could not find a path from ", s5, " to ", d3, "."].join("");
1376
+ throw new Error(msg);
1377
+ }
1378
+ return predecessors;
1379
+ },
1380
+ extract_shortest_path_from_predecessor_list: function(predecessors, d3) {
1381
+ var nodes = [];
1382
+ var u3 = d3;
1383
+ while (u3) {
1384
+ nodes.push(u3);
1385
+ predecessors[u3];
1386
+ u3 = predecessors[u3];
1387
+ }
1388
+ nodes.reverse();
1389
+ return nodes;
1390
+ },
1391
+ find_path: function(graph, s5, d3) {
1392
+ var predecessors = dijkstra.single_source_shortest_paths(graph, s5, d3);
1393
+ return dijkstra.extract_shortest_path_from_predecessor_list(
1394
+ predecessors,
1395
+ d3
1396
+ );
1397
+ },
1398
+ /**
1399
+ * A very naive priority queue implementation.
1400
+ */
1401
+ PriorityQueue: {
1402
+ make: function(opts) {
1403
+ var T4 = dijkstra.PriorityQueue, t5 = {}, key;
1404
+ opts = opts || {};
1405
+ for (key in T4) {
1406
+ if (T4.hasOwnProperty(key)) {
1407
+ t5[key] = T4[key];
1408
+ }
1409
+ }
1410
+ t5.queue = [];
1411
+ t5.sorter = opts.sorter || T4.default_sorter;
1412
+ return t5;
1413
+ },
1414
+ default_sorter: function(a4, b2) {
1415
+ return a4.cost - b2.cost;
1416
+ },
1417
+ /**
1418
+ * Add a new item to the queue and ensure the highest priority element
1419
+ * is at the front of the queue.
1420
+ */
1421
+ push: function(value, cost) {
1422
+ var item = { value, cost };
1423
+ this.queue.push(item);
1424
+ this.queue.sort(this.sorter);
1425
+ },
1426
+ /**
1427
+ * Return the highest priority element in the queue.
1428
+ */
1429
+ pop: function() {
1430
+ return this.queue.shift();
1431
+ },
1432
+ empty: function() {
1433
+ return this.queue.length === 0;
1434
+ }
1435
+ }
1436
+ };
1437
+ if (typeof module !== "undefined") {
1438
+ module.exports = dijkstra;
1439
+ }
1440
+ }
1441
+ });
1442
+
1443
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/segments.js
1444
+ var require_segments = __commonJS({
1445
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/segments.js"(exports) {
1446
+ var Mode = require_mode();
1447
+ var NumericData = require_numeric_data();
1448
+ var AlphanumericData = require_alphanumeric_data();
1449
+ var ByteData = require_byte_data();
1450
+ var KanjiData = require_kanji_data();
1451
+ var Regex = require_regex();
1452
+ var Utils = require_utils();
1453
+ var dijkstra = require_dijkstra();
1454
+ function getStringByteLength(str) {
1455
+ return unescape(encodeURIComponent(str)).length;
1456
+ }
1457
+ function getSegments(regex, mode, str) {
1458
+ const segments = [];
1459
+ let result;
1460
+ while ((result = regex.exec(str)) !== null) {
1461
+ segments.push({
1462
+ data: result[0],
1463
+ index: result.index,
1464
+ mode,
1465
+ length: result[0].length
1466
+ });
1467
+ }
1468
+ return segments;
1469
+ }
1470
+ function getSegmentsFromString(dataStr) {
1471
+ const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr);
1472
+ const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr);
1473
+ let byteSegs;
1474
+ let kanjiSegs;
1475
+ if (Utils.isKanjiModeEnabled()) {
1476
+ byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr);
1477
+ kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr);
1478
+ } else {
1479
+ byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr);
1480
+ kanjiSegs = [];
1481
+ }
1482
+ const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs);
1483
+ return segs.sort(function(s1, s22) {
1484
+ return s1.index - s22.index;
1485
+ }).map(function(obj) {
1486
+ return {
1487
+ data: obj.data,
1488
+ mode: obj.mode,
1489
+ length: obj.length
1490
+ };
1491
+ });
1492
+ }
1493
+ function getSegmentBitsLength(length, mode) {
1494
+ switch (mode) {
1495
+ case Mode.NUMERIC:
1496
+ return NumericData.getBitsLength(length);
1497
+ case Mode.ALPHANUMERIC:
1498
+ return AlphanumericData.getBitsLength(length);
1499
+ case Mode.KANJI:
1500
+ return KanjiData.getBitsLength(length);
1501
+ case Mode.BYTE:
1502
+ return ByteData.getBitsLength(length);
1503
+ }
1504
+ }
1505
+ function mergeSegments(segs) {
1506
+ return segs.reduce(function(acc, curr) {
1507
+ const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null;
1508
+ if (prevSeg && prevSeg.mode === curr.mode) {
1509
+ acc[acc.length - 1].data += curr.data;
1510
+ return acc;
1511
+ }
1512
+ acc.push(curr);
1513
+ return acc;
1514
+ }, []);
1515
+ }
1516
+ function buildNodes(segs) {
1517
+ const nodes = [];
1518
+ for (let i5 = 0; i5 < segs.length; i5++) {
1519
+ const seg = segs[i5];
1520
+ switch (seg.mode) {
1521
+ case Mode.NUMERIC:
1522
+ nodes.push([
1523
+ seg,
1524
+ { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length },
1525
+ { data: seg.data, mode: Mode.BYTE, length: seg.length }
1526
+ ]);
1527
+ break;
1528
+ case Mode.ALPHANUMERIC:
1529
+ nodes.push([
1530
+ seg,
1531
+ { data: seg.data, mode: Mode.BYTE, length: seg.length }
1532
+ ]);
1533
+ break;
1534
+ case Mode.KANJI:
1535
+ nodes.push([
1536
+ seg,
1537
+ { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }
1538
+ ]);
1539
+ break;
1540
+ case Mode.BYTE:
1541
+ nodes.push([
1542
+ { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }
1543
+ ]);
1544
+ }
1545
+ }
1546
+ return nodes;
1547
+ }
1548
+ function buildGraph(nodes, version) {
1549
+ const table = {};
1550
+ const graph = { start: {} };
1551
+ let prevNodeIds = ["start"];
1552
+ for (let i5 = 0; i5 < nodes.length; i5++) {
1553
+ const nodeGroup = nodes[i5];
1554
+ const currentNodeIds = [];
1555
+ for (let j2 = 0; j2 < nodeGroup.length; j2++) {
1556
+ const node = nodeGroup[j2];
1557
+ const key = "" + i5 + j2;
1558
+ currentNodeIds.push(key);
1559
+ table[key] = { node, lastCount: 0 };
1560
+ graph[key] = {};
1561
+ for (let n7 = 0; n7 < prevNodeIds.length; n7++) {
1562
+ const prevNodeId = prevNodeIds[n7];
1563
+ if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {
1564
+ graph[prevNodeId][key] = getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) - getSegmentBitsLength(table[prevNodeId].lastCount, node.mode);
1565
+ table[prevNodeId].lastCount += node.length;
1566
+ } else {
1567
+ if (table[prevNodeId])
1568
+ table[prevNodeId].lastCount = node.length;
1569
+ graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) + 4 + Mode.getCharCountIndicator(node.mode, version);
1570
+ }
1571
+ }
1572
+ }
1573
+ prevNodeIds = currentNodeIds;
1574
+ }
1575
+ for (let n7 = 0; n7 < prevNodeIds.length; n7++) {
1576
+ graph[prevNodeIds[n7]].end = 0;
1577
+ }
1578
+ return { map: graph, table };
1579
+ }
1580
+ function buildSingleSegment(data2, modesHint) {
1581
+ let mode;
1582
+ const bestMode = Mode.getBestModeForData(data2);
1583
+ mode = Mode.from(modesHint, bestMode);
1584
+ if (mode !== Mode.BYTE && mode.bit < bestMode.bit) {
1585
+ throw new Error('"' + data2 + '" cannot be encoded with mode ' + Mode.toString(mode) + ".\n Suggested mode is: " + Mode.toString(bestMode));
1586
+ }
1587
+ if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) {
1588
+ mode = Mode.BYTE;
1589
+ }
1590
+ switch (mode) {
1591
+ case Mode.NUMERIC:
1592
+ return new NumericData(data2);
1593
+ case Mode.ALPHANUMERIC:
1594
+ return new AlphanumericData(data2);
1595
+ case Mode.KANJI:
1596
+ return new KanjiData(data2);
1597
+ case Mode.BYTE:
1598
+ return new ByteData(data2);
1599
+ }
1600
+ }
1601
+ exports.fromArray = function fromArray(array) {
1602
+ return array.reduce(function(acc, seg) {
1603
+ if (typeof seg === "string") {
1604
+ acc.push(buildSingleSegment(seg, null));
1605
+ } else if (seg.data) {
1606
+ acc.push(buildSingleSegment(seg.data, seg.mode));
1607
+ }
1608
+ return acc;
1609
+ }, []);
1610
+ };
1611
+ exports.fromString = function fromString(data2, version) {
1612
+ const segs = getSegmentsFromString(data2, Utils.isKanjiModeEnabled());
1613
+ const nodes = buildNodes(segs);
1614
+ const graph = buildGraph(nodes, version);
1615
+ const path = dijkstra.find_path(graph.map, "start", "end");
1616
+ const optimizedSegs = [];
1617
+ for (let i5 = 1; i5 < path.length - 1; i5++) {
1618
+ optimizedSegs.push(graph.table[path[i5]].node);
1619
+ }
1620
+ return exports.fromArray(mergeSegments(optimizedSegs));
1621
+ };
1622
+ exports.rawSplit = function rawSplit(data2) {
1623
+ return exports.fromArray(
1624
+ getSegmentsFromString(data2, Utils.isKanjiModeEnabled())
1625
+ );
1626
+ };
1627
+ }
1628
+ });
1629
+
1630
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/qrcode.js
1631
+ var require_qrcode = __commonJS({
1632
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/qrcode.js"(exports) {
1633
+ var Utils = require_utils();
1634
+ var ECLevel = require_error_correction_level();
1635
+ var BitBuffer = require_bit_buffer();
1636
+ var BitMatrix = require_bit_matrix();
1637
+ var AlignmentPattern = require_alignment_pattern();
1638
+ var FinderPattern = require_finder_pattern();
1639
+ var MaskPattern = require_mask_pattern();
1640
+ var ECCode = require_error_correction_code();
1641
+ var ReedSolomonEncoder = require_reed_solomon_encoder();
1642
+ var Version = require_version();
1643
+ var FormatInfo = require_format_info();
1644
+ var Mode = require_mode();
1645
+ var Segments = require_segments();
1646
+ function setupFinderPattern(matrix, version) {
1647
+ const size = matrix.size;
1648
+ const pos = FinderPattern.getPositions(version);
1649
+ for (let i5 = 0; i5 < pos.length; i5++) {
1650
+ const row = pos[i5][0];
1651
+ const col = pos[i5][1];
1652
+ for (let r4 = -1; r4 <= 7; r4++) {
1653
+ if (row + r4 <= -1 || size <= row + r4)
1654
+ continue;
1655
+ for (let c4 = -1; c4 <= 7; c4++) {
1656
+ if (col + c4 <= -1 || size <= col + c4)
1657
+ continue;
1658
+ if (r4 >= 0 && r4 <= 6 && (c4 === 0 || c4 === 6) || c4 >= 0 && c4 <= 6 && (r4 === 0 || r4 === 6) || r4 >= 2 && r4 <= 4 && c4 >= 2 && c4 <= 4) {
1659
+ matrix.set(row + r4, col + c4, true, true);
1660
+ } else {
1661
+ matrix.set(row + r4, col + c4, false, true);
1662
+ }
1663
+ }
1664
+ }
1665
+ }
1666
+ }
1667
+ function setupTimingPattern(matrix) {
1668
+ const size = matrix.size;
1669
+ for (let r4 = 8; r4 < size - 8; r4++) {
1670
+ const value = r4 % 2 === 0;
1671
+ matrix.set(r4, 6, value, true);
1672
+ matrix.set(6, r4, value, true);
1673
+ }
1674
+ }
1675
+ function setupAlignmentPattern(matrix, version) {
1676
+ const pos = AlignmentPattern.getPositions(version);
1677
+ for (let i5 = 0; i5 < pos.length; i5++) {
1678
+ const row = pos[i5][0];
1679
+ const col = pos[i5][1];
1680
+ for (let r4 = -2; r4 <= 2; r4++) {
1681
+ for (let c4 = -2; c4 <= 2; c4++) {
1682
+ if (r4 === -2 || r4 === 2 || c4 === -2 || c4 === 2 || r4 === 0 && c4 === 0) {
1683
+ matrix.set(row + r4, col + c4, true, true);
1684
+ } else {
1685
+ matrix.set(row + r4, col + c4, false, true);
1686
+ }
1687
+ }
1688
+ }
1689
+ }
1690
+ }
1691
+ function setupVersionInfo(matrix, version) {
1692
+ const size = matrix.size;
1693
+ const bits = Version.getEncodedBits(version);
1694
+ let row, col, mod;
1695
+ for (let i5 = 0; i5 < 18; i5++) {
1696
+ row = Math.floor(i5 / 3);
1697
+ col = i5 % 3 + size - 8 - 3;
1698
+ mod = (bits >> i5 & 1) === 1;
1699
+ matrix.set(row, col, mod, true);
1700
+ matrix.set(col, row, mod, true);
1701
+ }
1702
+ }
1703
+ function setupFormatInfo(matrix, errorCorrectionLevel, maskPattern) {
1704
+ const size = matrix.size;
1705
+ const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern);
1706
+ let i5, mod;
1707
+ for (i5 = 0; i5 < 15; i5++) {
1708
+ mod = (bits >> i5 & 1) === 1;
1709
+ if (i5 < 6) {
1710
+ matrix.set(i5, 8, mod, true);
1711
+ } else if (i5 < 8) {
1712
+ matrix.set(i5 + 1, 8, mod, true);
1713
+ } else {
1714
+ matrix.set(size - 15 + i5, 8, mod, true);
1715
+ }
1716
+ if (i5 < 8) {
1717
+ matrix.set(8, size - i5 - 1, mod, true);
1718
+ } else if (i5 < 9) {
1719
+ matrix.set(8, 15 - i5 - 1 + 1, mod, true);
1720
+ } else {
1721
+ matrix.set(8, 15 - i5 - 1, mod, true);
1722
+ }
1723
+ }
1724
+ matrix.set(size - 8, 8, 1, true);
1725
+ }
1726
+ function setupData(matrix, data2) {
1727
+ const size = matrix.size;
1728
+ let inc = -1;
1729
+ let row = size - 1;
1730
+ let bitIndex = 7;
1731
+ let byteIndex = 0;
1732
+ for (let col = size - 1; col > 0; col -= 2) {
1733
+ if (col === 6)
1734
+ col--;
1735
+ while (true) {
1736
+ for (let c4 = 0; c4 < 2; c4++) {
1737
+ if (!matrix.isReserved(row, col - c4)) {
1738
+ let dark = false;
1739
+ if (byteIndex < data2.length) {
1740
+ dark = (data2[byteIndex] >>> bitIndex & 1) === 1;
1741
+ }
1742
+ matrix.set(row, col - c4, dark);
1743
+ bitIndex--;
1744
+ if (bitIndex === -1) {
1745
+ byteIndex++;
1746
+ bitIndex = 7;
1747
+ }
1748
+ }
1749
+ }
1750
+ row += inc;
1751
+ if (row < 0 || size <= row) {
1752
+ row -= inc;
1753
+ inc = -inc;
1754
+ break;
1755
+ }
1756
+ }
1757
+ }
1758
+ }
1759
+ function createData(version, errorCorrectionLevel, segments) {
1760
+ const buffer = new BitBuffer();
1761
+ segments.forEach(function(data2) {
1762
+ buffer.put(data2.mode.bit, 4);
1763
+ buffer.put(data2.getLength(), Mode.getCharCountIndicator(data2.mode, version));
1764
+ data2.write(buffer);
1765
+ });
1766
+ const totalCodewords = Utils.getSymbolTotalCodewords(version);
1767
+ const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel);
1768
+ const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8;
1769
+ if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {
1770
+ buffer.put(0, 4);
1771
+ }
1772
+ while (buffer.getLengthInBits() % 8 !== 0) {
1773
+ buffer.putBit(0);
1774
+ }
1775
+ const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8;
1776
+ for (let i5 = 0; i5 < remainingByte; i5++) {
1777
+ buffer.put(i5 % 2 ? 17 : 236, 8);
1778
+ }
1779
+ return createCodewords(buffer, version, errorCorrectionLevel);
1780
+ }
1781
+ function createCodewords(bitBuffer, version, errorCorrectionLevel) {
1782
+ const totalCodewords = Utils.getSymbolTotalCodewords(version);
1783
+ const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel);
1784
+ const dataTotalCodewords = totalCodewords - ecTotalCodewords;
1785
+ const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel);
1786
+ const blocksInGroup2 = totalCodewords % ecTotalBlocks;
1787
+ const blocksInGroup1 = ecTotalBlocks - blocksInGroup2;
1788
+ const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks);
1789
+ const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks);
1790
+ const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1;
1791
+ const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1;
1792
+ const rs = new ReedSolomonEncoder(ecCount);
1793
+ let offset = 0;
1794
+ const dcData = new Array(ecTotalBlocks);
1795
+ const ecData = new Array(ecTotalBlocks);
1796
+ let maxDataSize = 0;
1797
+ const buffer = new Uint8Array(bitBuffer.buffer);
1798
+ for (let b2 = 0; b2 < ecTotalBlocks; b2++) {
1799
+ const dataSize = b2 < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2;
1800
+ dcData[b2] = buffer.slice(offset, offset + dataSize);
1801
+ ecData[b2] = rs.encode(dcData[b2]);
1802
+ offset += dataSize;
1803
+ maxDataSize = Math.max(maxDataSize, dataSize);
1804
+ }
1805
+ const data2 = new Uint8Array(totalCodewords);
1806
+ let index = 0;
1807
+ let i5, r4;
1808
+ for (i5 = 0; i5 < maxDataSize; i5++) {
1809
+ for (r4 = 0; r4 < ecTotalBlocks; r4++) {
1810
+ if (i5 < dcData[r4].length) {
1811
+ data2[index++] = dcData[r4][i5];
1812
+ }
1813
+ }
1814
+ }
1815
+ for (i5 = 0; i5 < ecCount; i5++) {
1816
+ for (r4 = 0; r4 < ecTotalBlocks; r4++) {
1817
+ data2[index++] = ecData[r4][i5];
1818
+ }
1819
+ }
1820
+ return data2;
1821
+ }
1822
+ function createSymbol(data2, version, errorCorrectionLevel, maskPattern) {
1823
+ let segments;
1824
+ if (Array.isArray(data2)) {
1825
+ segments = Segments.fromArray(data2);
1826
+ } else if (typeof data2 === "string") {
1827
+ let estimatedVersion = version;
1828
+ if (!estimatedVersion) {
1829
+ const rawSegments = Segments.rawSplit(data2);
1830
+ estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel);
1831
+ }
1832
+ segments = Segments.fromString(data2, estimatedVersion || 40);
1833
+ } else {
1834
+ throw new Error("Invalid data");
1835
+ }
1836
+ const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel);
1837
+ if (!bestVersion) {
1838
+ throw new Error("The amount of data is too big to be stored in a QR Code");
1839
+ }
1840
+ if (!version) {
1841
+ version = bestVersion;
1842
+ } else if (version < bestVersion) {
1843
+ throw new Error(
1844
+ "\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: " + bestVersion + ".\n"
1845
+ );
1846
+ }
1847
+ const dataBits = createData(version, errorCorrectionLevel, segments);
1848
+ const moduleCount = Utils.getSymbolSize(version);
1849
+ const modules = new BitMatrix(moduleCount);
1850
+ setupFinderPattern(modules, version);
1851
+ setupTimingPattern(modules);
1852
+ setupAlignmentPattern(modules, version);
1853
+ setupFormatInfo(modules, errorCorrectionLevel, 0);
1854
+ if (version >= 7) {
1855
+ setupVersionInfo(modules, version);
1856
+ }
1857
+ setupData(modules, dataBits);
1858
+ if (isNaN(maskPattern)) {
1859
+ maskPattern = MaskPattern.getBestMask(
1860
+ modules,
1861
+ setupFormatInfo.bind(null, modules, errorCorrectionLevel)
1862
+ );
1863
+ }
1864
+ MaskPattern.applyMask(maskPattern, modules);
1865
+ setupFormatInfo(modules, errorCorrectionLevel, maskPattern);
1866
+ return {
1867
+ modules,
1868
+ version,
1869
+ errorCorrectionLevel,
1870
+ maskPattern,
1871
+ segments
1872
+ };
1873
+ }
1874
+ exports.create = function create(data2, options) {
1875
+ if (typeof data2 === "undefined" || data2 === "") {
1876
+ throw new Error("No input text");
1877
+ }
1878
+ let errorCorrectionLevel = ECLevel.M;
1879
+ let version;
1880
+ let mask;
1881
+ if (typeof options !== "undefined") {
1882
+ errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M);
1883
+ version = Version.from(options.version);
1884
+ mask = MaskPattern.from(options.maskPattern);
1885
+ if (options.toSJISFunc) {
1886
+ Utils.setToSJISFunction(options.toSJISFunc);
1887
+ }
1888
+ }
1889
+ return createSymbol(data2, version, errorCorrectionLevel, mask);
1890
+ };
1891
+ }
1892
+ });
1893
+
1894
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/utils.js
1895
+ var require_utils2 = __commonJS({
1896
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/utils.js"(exports) {
1897
+ function hex2rgba(hex) {
1898
+ if (typeof hex === "number") {
1899
+ hex = hex.toString();
1900
+ }
1901
+ if (typeof hex !== "string") {
1902
+ throw new Error("Color should be defined as hex string");
1903
+ }
1904
+ let hexCode = hex.slice().replace("#", "").split("");
1905
+ if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {
1906
+ throw new Error("Invalid hex color: " + hex);
1907
+ }
1908
+ if (hexCode.length === 3 || hexCode.length === 4) {
1909
+ hexCode = Array.prototype.concat.apply([], hexCode.map(function(c4) {
1910
+ return [c4, c4];
1911
+ }));
1912
+ }
1913
+ if (hexCode.length === 6)
1914
+ hexCode.push("F", "F");
1915
+ const hexValue = parseInt(hexCode.join(""), 16);
1916
+ return {
1917
+ r: hexValue >> 24 & 255,
1918
+ g: hexValue >> 16 & 255,
1919
+ b: hexValue >> 8 & 255,
1920
+ a: hexValue & 255,
1921
+ hex: "#" + hexCode.slice(0, 6).join("")
1922
+ };
1923
+ }
1924
+ exports.getOptions = function getOptions2(options) {
1925
+ if (!options)
1926
+ options = {};
1927
+ if (!options.color)
1928
+ options.color = {};
1929
+ const margin = typeof options.margin === "undefined" || options.margin === null || options.margin < 0 ? 4 : options.margin;
1930
+ const width = options.width && options.width >= 21 ? options.width : void 0;
1931
+ const scale = options.scale || 4;
1932
+ return {
1933
+ width,
1934
+ scale: width ? 4 : scale,
1935
+ margin,
1936
+ color: {
1937
+ dark: hex2rgba(options.color.dark || "#000000ff"),
1938
+ light: hex2rgba(options.color.light || "#ffffffff")
1939
+ },
1940
+ type: options.type,
1941
+ rendererOpts: options.rendererOpts || {}
1942
+ };
1943
+ };
1944
+ exports.getScale = function getScale(qrSize, opts) {
1945
+ return opts.width && opts.width >= qrSize + opts.margin * 2 ? opts.width / (qrSize + opts.margin * 2) : opts.scale;
1946
+ };
1947
+ exports.getImageWidth = function getImageWidth(qrSize, opts) {
1948
+ const scale = exports.getScale(qrSize, opts);
1949
+ return Math.floor((qrSize + opts.margin * 2) * scale);
1950
+ };
1951
+ exports.qrToImageData = function qrToImageData(imgData, qr, opts) {
1952
+ const size = qr.modules.size;
1953
+ const data2 = qr.modules.data;
1954
+ const scale = exports.getScale(size, opts);
1955
+ const symbolSize = Math.floor((size + opts.margin * 2) * scale);
1956
+ const scaledMargin = opts.margin * scale;
1957
+ const palette = [opts.color.light, opts.color.dark];
1958
+ for (let i5 = 0; i5 < symbolSize; i5++) {
1959
+ for (let j2 = 0; j2 < symbolSize; j2++) {
1960
+ let posDst = (i5 * symbolSize + j2) * 4;
1961
+ let pxColor = opts.color.light;
1962
+ if (i5 >= scaledMargin && j2 >= scaledMargin && i5 < symbolSize - scaledMargin && j2 < symbolSize - scaledMargin) {
1963
+ const iSrc = Math.floor((i5 - scaledMargin) / scale);
1964
+ const jSrc = Math.floor((j2 - scaledMargin) / scale);
1965
+ pxColor = palette[data2[iSrc * size + jSrc] ? 1 : 0];
1966
+ }
1967
+ imgData[posDst++] = pxColor.r;
1968
+ imgData[posDst++] = pxColor.g;
1969
+ imgData[posDst++] = pxColor.b;
1970
+ imgData[posDst] = pxColor.a;
1971
+ }
1972
+ }
1973
+ };
1974
+ }
1975
+ });
1976
+
1977
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/canvas.js
1978
+ var require_canvas = __commonJS({
1979
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/canvas.js"(exports) {
1980
+ var Utils = require_utils2();
1981
+ function clearCanvas(ctx, canvas, size) {
1982
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
1983
+ if (!canvas.style)
1984
+ canvas.style = {};
1985
+ canvas.height = size;
1986
+ canvas.width = size;
1987
+ canvas.style.height = size + "px";
1988
+ canvas.style.width = size + "px";
1989
+ }
1990
+ function getCanvasElement() {
1991
+ try {
1992
+ return document.createElement("canvas");
1993
+ } catch (e8) {
1994
+ throw new Error("You need to specify a canvas element");
1995
+ }
1996
+ }
1997
+ exports.render = function render(qrData, canvas, options) {
1998
+ let opts = options;
1999
+ let canvasEl = canvas;
2000
+ if (typeof opts === "undefined" && (!canvas || !canvas.getContext)) {
2001
+ opts = canvas;
2002
+ canvas = void 0;
2003
+ }
2004
+ if (!canvas) {
2005
+ canvasEl = getCanvasElement();
2006
+ }
2007
+ opts = Utils.getOptions(opts);
2008
+ const size = Utils.getImageWidth(qrData.modules.size, opts);
2009
+ const ctx = canvasEl.getContext("2d");
2010
+ const image = ctx.createImageData(size, size);
2011
+ Utils.qrToImageData(image.data, qrData, opts);
2012
+ clearCanvas(ctx, canvasEl, size);
2013
+ ctx.putImageData(image, 0, 0);
2014
+ return canvasEl;
2015
+ };
2016
+ exports.renderToDataURL = function renderToDataURL(qrData, canvas, options) {
2017
+ let opts = options;
2018
+ if (typeof opts === "undefined" && (!canvas || !canvas.getContext)) {
2019
+ opts = canvas;
2020
+ canvas = void 0;
2021
+ }
2022
+ if (!opts)
2023
+ opts = {};
2024
+ const canvasEl = exports.render(qrData, canvas, opts);
2025
+ const type = opts.type || "image/png";
2026
+ const rendererOpts = opts.rendererOpts || {};
2027
+ return canvasEl.toDataURL(type, rendererOpts.quality);
2028
+ };
2029
+ }
2030
+ });
2031
+
2032
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/svg-tag.js
2033
+ var require_svg_tag = __commonJS({
2034
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/svg-tag.js"(exports) {
2035
+ var Utils = require_utils2();
2036
+ function getColorAttrib(color, attrib) {
2037
+ const alpha = color.a / 255;
2038
+ const str = attrib + '="' + color.hex + '"';
2039
+ return alpha < 1 ? str + " " + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"' : str;
2040
+ }
2041
+ function svgCmd(cmd, x2, y3) {
2042
+ let str = cmd + x2;
2043
+ if (typeof y3 !== "undefined")
2044
+ str += " " + y3;
2045
+ return str;
2046
+ }
2047
+ function qrToPath(data2, size, margin) {
2048
+ let path = "";
2049
+ let moveBy = 0;
2050
+ let newRow = false;
2051
+ let lineLength = 0;
2052
+ for (let i5 = 0; i5 < data2.length; i5++) {
2053
+ const col = Math.floor(i5 % size);
2054
+ const row = Math.floor(i5 / size);
2055
+ if (!col && !newRow)
2056
+ newRow = true;
2057
+ if (data2[i5]) {
2058
+ lineLength++;
2059
+ if (!(i5 > 0 && col > 0 && data2[i5 - 1])) {
2060
+ path += newRow ? svgCmd("M", col + margin, 0.5 + row + margin) : svgCmd("m", moveBy, 0);
2061
+ moveBy = 0;
2062
+ newRow = false;
2063
+ }
2064
+ if (!(col + 1 < size && data2[i5 + 1])) {
2065
+ path += svgCmd("h", lineLength);
2066
+ lineLength = 0;
2067
+ }
2068
+ } else {
2069
+ moveBy++;
2070
+ }
2071
+ }
2072
+ return path;
2073
+ }
2074
+ exports.render = function render(qrData, options, cb) {
2075
+ const opts = Utils.getOptions(options);
2076
+ const size = qrData.modules.size;
2077
+ const data2 = qrData.modules.data;
2078
+ const qrcodesize = size + opts.margin * 2;
2079
+ const bg = !opts.color.light.a ? "" : "<path " + getColorAttrib(opts.color.light, "fill") + ' d="M0 0h' + qrcodesize + "v" + qrcodesize + 'H0z"/>';
2080
+ const path = "<path " + getColorAttrib(opts.color.dark, "stroke") + ' d="' + qrToPath(data2, size, opts.margin) + '"/>';
2081
+ const viewBox = 'viewBox="0 0 ' + qrcodesize + " " + qrcodesize + '"';
2082
+ const width = !opts.width ? "" : 'width="' + opts.width + '" height="' + opts.width + '" ';
2083
+ const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg + path + "</svg>\n";
2084
+ if (typeof cb === "function") {
2085
+ cb(null, svgTag);
2086
+ }
2087
+ return svgTag;
2088
+ };
2089
+ }
2090
+ });
2091
+
2092
+ // ../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/browser.js
2093
+ var require_browser = __commonJS({
2094
+ "../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/browser.js"(exports) {
2095
+ var canPromise = require_can_promise();
2096
+ var QRCode = require_qrcode();
2097
+ var CanvasRenderer = require_canvas();
2098
+ var SvgRenderer = require_svg_tag();
2099
+ function renderCanvas(renderFunc, canvas, text, opts, cb) {
2100
+ const args = [].slice.call(arguments, 1);
2101
+ const argsNum = args.length;
2102
+ const isLastArgCb = typeof args[argsNum - 1] === "function";
2103
+ if (!isLastArgCb && !canPromise()) {
2104
+ throw new Error("Callback required as last argument");
2105
+ }
2106
+ if (isLastArgCb) {
2107
+ if (argsNum < 2) {
2108
+ throw new Error("Too few arguments provided");
2109
+ }
2110
+ if (argsNum === 2) {
2111
+ cb = text;
2112
+ text = canvas;
2113
+ canvas = opts = void 0;
2114
+ } else if (argsNum === 3) {
2115
+ if (canvas.getContext && typeof cb === "undefined") {
2116
+ cb = opts;
2117
+ opts = void 0;
2118
+ } else {
2119
+ cb = opts;
2120
+ opts = text;
2121
+ text = canvas;
2122
+ canvas = void 0;
2123
+ }
2124
+ }
2125
+ } else {
2126
+ if (argsNum < 1) {
2127
+ throw new Error("Too few arguments provided");
2128
+ }
2129
+ if (argsNum === 1) {
2130
+ text = canvas;
2131
+ canvas = opts = void 0;
2132
+ } else if (argsNum === 2 && !canvas.getContext) {
2133
+ opts = text;
2134
+ text = canvas;
2135
+ canvas = void 0;
2136
+ }
2137
+ return new Promise(function(resolve, reject) {
2138
+ try {
2139
+ const data2 = QRCode.create(text, opts);
2140
+ resolve(renderFunc(data2, canvas, opts));
2141
+ } catch (e8) {
2142
+ reject(e8);
2143
+ }
2144
+ });
2145
+ }
2146
+ try {
2147
+ const data2 = QRCode.create(text, opts);
2148
+ cb(null, renderFunc(data2, canvas, opts));
2149
+ } catch (e8) {
2150
+ cb(e8);
2151
+ }
2152
+ }
2153
+ exports.create = QRCode.create;
2154
+ exports.toCanvas = renderCanvas.bind(null, CanvasRenderer.render);
2155
+ exports.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL);
2156
+ exports.toString = renderCanvas.bind(null, function(data2, _3, opts) {
2157
+ return SvgRenderer.render(data2, opts);
2158
+ });
2159
+ }
2160
+ });
2161
+
2162
+ // ../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/css-tag.js
2163
+ var t = window;
2164
+ var e = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype;
2165
+ var s = Symbol();
2166
+ var n = /* @__PURE__ */ new WeakMap();
2167
+ var o = class {
2168
+ constructor(t5, e8, n7) {
2169
+ if (this._$cssResult$ = true, n7 !== s)
2170
+ throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
2171
+ this.cssText = t5, this.t = e8;
2172
+ }
2173
+ get styleSheet() {
2174
+ let t5 = this.o;
2175
+ const s5 = this.t;
2176
+ if (e && void 0 === t5) {
2177
+ const e8 = void 0 !== s5 && 1 === s5.length;
2178
+ e8 && (t5 = n.get(s5)), void 0 === t5 && ((this.o = t5 = new CSSStyleSheet()).replaceSync(this.cssText), e8 && n.set(s5, t5));
2179
+ }
2180
+ return t5;
2181
+ }
2182
+ toString() {
2183
+ return this.cssText;
2184
+ }
2185
+ };
2186
+ var r = (t5) => new o("string" == typeof t5 ? t5 : t5 + "", void 0, s);
2187
+ var i = (t5, ...e8) => {
2188
+ const n7 = 1 === t5.length ? t5[0] : e8.reduce((e9, s5, n8) => e9 + ((t6) => {
2189
+ if (true === t6._$cssResult$)
2190
+ return t6.cssText;
2191
+ if ("number" == typeof t6)
2192
+ return t6;
2193
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + t6 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
2194
+ })(s5) + t5[n8 + 1], t5[0]);
2195
+ return new o(n7, t5, s);
2196
+ };
2197
+ var S = (s5, n7) => {
2198
+ e ? s5.adoptedStyleSheets = n7.map((t5) => t5 instanceof CSSStyleSheet ? t5 : t5.styleSheet) : n7.forEach((e8) => {
2199
+ const n8 = document.createElement("style"), o7 = t.litNonce;
2200
+ void 0 !== o7 && n8.setAttribute("nonce", o7), n8.textContent = e8.cssText, s5.appendChild(n8);
2201
+ });
2202
+ };
2203
+ var c = e ? (t5) => t5 : (t5) => t5 instanceof CSSStyleSheet ? ((t6) => {
2204
+ let e8 = "";
2205
+ for (const s5 of t6.cssRules)
2206
+ e8 += s5.cssText;
2207
+ return r(e8);
2208
+ })(t5) : t5;
2209
+
2210
+ // ../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/reactive-element.js
2211
+ var s2;
2212
+ var e2 = window;
2213
+ var r2 = e2.trustedTypes;
2214
+ var h = r2 ? r2.emptyScript : "";
2215
+ var o2 = e2.reactiveElementPolyfillSupport;
2216
+ var n2 = { toAttribute(t5, i5) {
2217
+ switch (i5) {
2218
+ case Boolean:
2219
+ t5 = t5 ? h : null;
2220
+ break;
2221
+ case Object:
2222
+ case Array:
2223
+ t5 = null == t5 ? t5 : JSON.stringify(t5);
2224
+ }
2225
+ return t5;
2226
+ }, fromAttribute(t5, i5) {
2227
+ let s5 = t5;
2228
+ switch (i5) {
2229
+ case Boolean:
2230
+ s5 = null !== t5;
2231
+ break;
2232
+ case Number:
2233
+ s5 = null === t5 ? null : Number(t5);
2234
+ break;
2235
+ case Object:
2236
+ case Array:
2237
+ try {
2238
+ s5 = JSON.parse(t5);
2239
+ } catch (t6) {
2240
+ s5 = null;
2241
+ }
2242
+ }
2243
+ return s5;
2244
+ } };
2245
+ var a2 = (t5, i5) => i5 !== t5 && (i5 == i5 || t5 == t5);
2246
+ var l = { attribute: true, type: String, converter: n2, reflect: false, hasChanged: a2 };
2247
+ var d = "finalized";
2248
+ var u = class extends HTMLElement {
2249
+ constructor() {
2250
+ super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = false, this.hasUpdated = false, this._$El = null, this._$Eu();
2251
+ }
2252
+ static addInitializer(t5) {
2253
+ var i5;
2254
+ this.finalize(), (null !== (i5 = this.h) && void 0 !== i5 ? i5 : this.h = []).push(t5);
2255
+ }
2256
+ static get observedAttributes() {
2257
+ this.finalize();
2258
+ const t5 = [];
2259
+ return this.elementProperties.forEach((i5, s5) => {
2260
+ const e8 = this._$Ep(s5, i5);
2261
+ void 0 !== e8 && (this._$Ev.set(e8, s5), t5.push(e8));
2262
+ }), t5;
2263
+ }
2264
+ static createProperty(t5, i5 = l) {
2265
+ if (i5.state && (i5.attribute = false), this.finalize(), this.elementProperties.set(t5, i5), !i5.noAccessor && !this.prototype.hasOwnProperty(t5)) {
2266
+ const s5 = "symbol" == typeof t5 ? Symbol() : "__" + t5, e8 = this.getPropertyDescriptor(t5, s5, i5);
2267
+ void 0 !== e8 && Object.defineProperty(this.prototype, t5, e8);
2268
+ }
2269
+ }
2270
+ static getPropertyDescriptor(t5, i5, s5) {
2271
+ return { get() {
2272
+ return this[i5];
2273
+ }, set(e8) {
2274
+ const r4 = this[t5];
2275
+ this[i5] = e8, this.requestUpdate(t5, r4, s5);
2276
+ }, configurable: true, enumerable: true };
2277
+ }
2278
+ static getPropertyOptions(t5) {
2279
+ return this.elementProperties.get(t5) || l;
2280
+ }
2281
+ static finalize() {
2282
+ if (this.hasOwnProperty(d))
2283
+ return false;
2284
+ this[d] = true;
2285
+ const t5 = Object.getPrototypeOf(this);
2286
+ if (t5.finalize(), void 0 !== t5.h && (this.h = [...t5.h]), this.elementProperties = new Map(t5.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
2287
+ const t6 = this.properties, i5 = [...Object.getOwnPropertyNames(t6), ...Object.getOwnPropertySymbols(t6)];
2288
+ for (const s5 of i5)
2289
+ this.createProperty(s5, t6[s5]);
2290
+ }
2291
+ return this.elementStyles = this.finalizeStyles(this.styles), true;
2292
+ }
2293
+ static finalizeStyles(i5) {
2294
+ const s5 = [];
2295
+ if (Array.isArray(i5)) {
2296
+ const e8 = new Set(i5.flat(1 / 0).reverse());
2297
+ for (const i6 of e8)
2298
+ s5.unshift(c(i6));
2299
+ } else
2300
+ void 0 !== i5 && s5.push(c(i5));
2301
+ return s5;
2302
+ }
2303
+ static _$Ep(t5, i5) {
2304
+ const s5 = i5.attribute;
2305
+ return false === s5 ? void 0 : "string" == typeof s5 ? s5 : "string" == typeof t5 ? t5.toLowerCase() : void 0;
2306
+ }
2307
+ _$Eu() {
2308
+ var t5;
2309
+ this._$E_ = new Promise((t6) => this.enableUpdating = t6), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), null === (t5 = this.constructor.h) || void 0 === t5 || t5.forEach((t6) => t6(this));
2310
+ }
2311
+ addController(t5) {
2312
+ var i5, s5;
2313
+ (null !== (i5 = this._$ES) && void 0 !== i5 ? i5 : this._$ES = []).push(t5), void 0 !== this.renderRoot && this.isConnected && (null === (s5 = t5.hostConnected) || void 0 === s5 || s5.call(t5));
2314
+ }
2315
+ removeController(t5) {
2316
+ var i5;
2317
+ null === (i5 = this._$ES) || void 0 === i5 || i5.splice(this._$ES.indexOf(t5) >>> 0, 1);
2318
+ }
2319
+ _$Eg() {
2320
+ this.constructor.elementProperties.forEach((t5, i5) => {
2321
+ this.hasOwnProperty(i5) && (this._$Ei.set(i5, this[i5]), delete this[i5]);
2322
+ });
2323
+ }
2324
+ createRenderRoot() {
2325
+ var t5;
2326
+ const s5 = null !== (t5 = this.shadowRoot) && void 0 !== t5 ? t5 : this.attachShadow(this.constructor.shadowRootOptions);
2327
+ return S(s5, this.constructor.elementStyles), s5;
2328
+ }
2329
+ connectedCallback() {
2330
+ var t5;
2331
+ void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), null === (t5 = this._$ES) || void 0 === t5 || t5.forEach((t6) => {
2332
+ var i5;
2333
+ return null === (i5 = t6.hostConnected) || void 0 === i5 ? void 0 : i5.call(t6);
2334
+ });
2335
+ }
2336
+ enableUpdating(t5) {
2337
+ }
2338
+ disconnectedCallback() {
2339
+ var t5;
2340
+ null === (t5 = this._$ES) || void 0 === t5 || t5.forEach((t6) => {
2341
+ var i5;
2342
+ return null === (i5 = t6.hostDisconnected) || void 0 === i5 ? void 0 : i5.call(t6);
2343
+ });
2344
+ }
2345
+ attributeChangedCallback(t5, i5, s5) {
2346
+ this._$AK(t5, s5);
2347
+ }
2348
+ _$EO(t5, i5, s5 = l) {
2349
+ var e8;
2350
+ const r4 = this.constructor._$Ep(t5, s5);
2351
+ if (void 0 !== r4 && true === s5.reflect) {
2352
+ const h4 = (void 0 !== (null === (e8 = s5.converter) || void 0 === e8 ? void 0 : e8.toAttribute) ? s5.converter : n2).toAttribute(i5, s5.type);
2353
+ this._$El = t5, null == h4 ? this.removeAttribute(r4) : this.setAttribute(r4, h4), this._$El = null;
2354
+ }
2355
+ }
2356
+ _$AK(t5, i5) {
2357
+ var s5;
2358
+ const e8 = this.constructor, r4 = e8._$Ev.get(t5);
2359
+ if (void 0 !== r4 && this._$El !== r4) {
2360
+ const t6 = e8.getPropertyOptions(r4), h4 = "function" == typeof t6.converter ? { fromAttribute: t6.converter } : void 0 !== (null === (s5 = t6.converter) || void 0 === s5 ? void 0 : s5.fromAttribute) ? t6.converter : n2;
2361
+ this._$El = r4, this[r4] = h4.fromAttribute(i5, t6.type), this._$El = null;
2362
+ }
2363
+ }
2364
+ requestUpdate(t5, i5, s5) {
2365
+ let e8 = true;
2366
+ void 0 !== t5 && (((s5 = s5 || this.constructor.getPropertyOptions(t5)).hasChanged || a2)(this[t5], i5) ? (this._$AL.has(t5) || this._$AL.set(t5, i5), true === s5.reflect && this._$El !== t5 && (void 0 === this._$EC && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t5, s5))) : e8 = false), !this.isUpdatePending && e8 && (this._$E_ = this._$Ej());
2367
+ }
2368
+ async _$Ej() {
2369
+ this.isUpdatePending = true;
2370
+ try {
2371
+ await this._$E_;
2372
+ } catch (t6) {
2373
+ Promise.reject(t6);
2374
+ }
2375
+ const t5 = this.scheduleUpdate();
2376
+ return null != t5 && await t5, !this.isUpdatePending;
2377
+ }
2378
+ scheduleUpdate() {
2379
+ return this.performUpdate();
2380
+ }
2381
+ performUpdate() {
2382
+ var t5;
2383
+ if (!this.isUpdatePending)
2384
+ return;
2385
+ this.hasUpdated, this._$Ei && (this._$Ei.forEach((t6, i6) => this[i6] = t6), this._$Ei = void 0);
2386
+ let i5 = false;
2387
+ const s5 = this._$AL;
2388
+ try {
2389
+ i5 = this.shouldUpdate(s5), i5 ? (this.willUpdate(s5), null === (t5 = this._$ES) || void 0 === t5 || t5.forEach((t6) => {
2390
+ var i6;
2391
+ return null === (i6 = t6.hostUpdate) || void 0 === i6 ? void 0 : i6.call(t6);
2392
+ }), this.update(s5)) : this._$Ek();
2393
+ } catch (t6) {
2394
+ throw i5 = false, this._$Ek(), t6;
2395
+ }
2396
+ i5 && this._$AE(s5);
2397
+ }
2398
+ willUpdate(t5) {
2399
+ }
2400
+ _$AE(t5) {
2401
+ var i5;
2402
+ null === (i5 = this._$ES) || void 0 === i5 || i5.forEach((t6) => {
2403
+ var i6;
2404
+ return null === (i6 = t6.hostUpdated) || void 0 === i6 ? void 0 : i6.call(t6);
2405
+ }), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t5)), this.updated(t5);
2406
+ }
2407
+ _$Ek() {
2408
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false;
2409
+ }
2410
+ get updateComplete() {
2411
+ return this.getUpdateComplete();
2412
+ }
2413
+ getUpdateComplete() {
2414
+ return this._$E_;
2415
+ }
2416
+ shouldUpdate(t5) {
2417
+ return true;
2418
+ }
2419
+ update(t5) {
2420
+ void 0 !== this._$EC && (this._$EC.forEach((t6, i5) => this._$EO(i5, this[i5], t6)), this._$EC = void 0), this._$Ek();
2421
+ }
2422
+ updated(t5) {
2423
+ }
2424
+ firstUpdated(t5) {
2425
+ }
2426
+ };
2427
+ u[d] = true, u.elementProperties = /* @__PURE__ */ new Map(), u.elementStyles = [], u.shadowRootOptions = { mode: "open" }, null == o2 || o2({ ReactiveElement: u }), (null !== (s2 = e2.reactiveElementVersions) && void 0 !== s2 ? s2 : e2.reactiveElementVersions = []).push("1.6.3");
2428
+
2429
+ // ../../node_modules/.pnpm/lit-html@2.8.0/node_modules/lit-html/lit-html.js
2430
+ var t2;
2431
+ var i2 = window;
2432
+ var s3 = i2.trustedTypes;
2433
+ var e3 = s3 ? s3.createPolicy("lit-html", { createHTML: (t5) => t5 }) : void 0;
2434
+ var o3 = "$lit$";
2435
+ var n3 = `lit$${(Math.random() + "").slice(9)}$`;
2436
+ var l2 = "?" + n3;
2437
+ var h2 = `<${l2}>`;
2438
+ var r3 = document;
2439
+ var u2 = () => r3.createComment("");
2440
+ var d2 = (t5) => null === t5 || "object" != typeof t5 && "function" != typeof t5;
2441
+ var c2 = Array.isArray;
2442
+ var v = (t5) => c2(t5) || "function" == typeof (null == t5 ? void 0 : t5[Symbol.iterator]);
2443
+ var a3 = "[ \n\f\r]";
2444
+ var f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
2445
+ var _ = /-->/g;
2446
+ var m = />/g;
2447
+ var p2 = RegExp(`>|${a3}(?:([^\\s"'>=/]+)(${a3}*=${a3}*(?:[^
2448
+ \f\r"'\`<>=]|("|')|))|$)`, "g");
2449
+ var g = /'/g;
2450
+ var $ = /"/g;
2451
+ var y2 = /^(?:script|style|textarea|title)$/i;
2452
+ var w = (t5) => (i5, ...s5) => ({ _$litType$: t5, strings: i5, values: s5 });
2453
+ var x = w(1);
2454
+ var b = w(2);
2455
+ var T2 = Symbol.for("lit-noChange");
2456
+ var A = Symbol.for("lit-nothing");
2457
+ var E = /* @__PURE__ */ new WeakMap();
2458
+ var C = r3.createTreeWalker(r3, 129, null, false);
2459
+ function P(t5, i5) {
2460
+ if (!Array.isArray(t5) || !t5.hasOwnProperty("raw"))
2461
+ throw Error("invalid template strings array");
2462
+ return void 0 !== e3 ? e3.createHTML(i5) : i5;
2463
+ }
2464
+ var V = (t5, i5) => {
2465
+ const s5 = t5.length - 1, e8 = [];
2466
+ let l6, r4 = 2 === i5 ? "<svg>" : "", u3 = f;
2467
+ for (let i6 = 0; i6 < s5; i6++) {
2468
+ const s6 = t5[i6];
2469
+ let d3, c4, v3 = -1, a4 = 0;
2470
+ for (; a4 < s6.length && (u3.lastIndex = a4, c4 = u3.exec(s6), null !== c4); )
2471
+ a4 = u3.lastIndex, u3 === f ? "!--" === c4[1] ? u3 = _ : void 0 !== c4[1] ? u3 = m : void 0 !== c4[2] ? (y2.test(c4[2]) && (l6 = RegExp("</" + c4[2], "g")), u3 = p2) : void 0 !== c4[3] && (u3 = p2) : u3 === p2 ? ">" === c4[0] ? (u3 = null != l6 ? l6 : f, v3 = -1) : void 0 === c4[1] ? v3 = -2 : (v3 = u3.lastIndex - c4[2].length, d3 = c4[1], u3 = void 0 === c4[3] ? p2 : '"' === c4[3] ? $ : g) : u3 === $ || u3 === g ? u3 = p2 : u3 === _ || u3 === m ? u3 = f : (u3 = p2, l6 = void 0);
2472
+ const w2 = u3 === p2 && t5[i6 + 1].startsWith("/>") ? " " : "";
2473
+ r4 += u3 === f ? s6 + h2 : v3 >= 0 ? (e8.push(d3), s6.slice(0, v3) + o3 + s6.slice(v3) + n3 + w2) : s6 + n3 + (-2 === v3 ? (e8.push(void 0), i6) : w2);
2474
+ }
2475
+ return [P(t5, r4 + (t5[s5] || "<?>") + (2 === i5 ? "</svg>" : "")), e8];
2476
+ };
2477
+ var N = class _N {
2478
+ constructor({ strings: t5, _$litType$: i5 }, e8) {
2479
+ let h4;
2480
+ this.parts = [];
2481
+ let r4 = 0, d3 = 0;
2482
+ const c4 = t5.length - 1, v3 = this.parts, [a4, f2] = V(t5, i5);
2483
+ if (this.el = _N.createElement(a4, e8), C.currentNode = this.el.content, 2 === i5) {
2484
+ const t6 = this.el.content, i6 = t6.firstChild;
2485
+ i6.remove(), t6.append(...i6.childNodes);
2486
+ }
2487
+ for (; null !== (h4 = C.nextNode()) && v3.length < c4; ) {
2488
+ if (1 === h4.nodeType) {
2489
+ if (h4.hasAttributes()) {
2490
+ const t6 = [];
2491
+ for (const i6 of h4.getAttributeNames())
2492
+ if (i6.endsWith(o3) || i6.startsWith(n3)) {
2493
+ const s5 = f2[d3++];
2494
+ if (t6.push(i6), void 0 !== s5) {
2495
+ const t7 = h4.getAttribute(s5.toLowerCase() + o3).split(n3), i7 = /([.?@])?(.*)/.exec(s5);
2496
+ v3.push({ type: 1, index: r4, name: i7[2], strings: t7, ctor: "." === i7[1] ? H : "?" === i7[1] ? L : "@" === i7[1] ? z : k });
2497
+ } else
2498
+ v3.push({ type: 6, index: r4 });
2499
+ }
2500
+ for (const i6 of t6)
2501
+ h4.removeAttribute(i6);
2502
+ }
2503
+ if (y2.test(h4.tagName)) {
2504
+ const t6 = h4.textContent.split(n3), i6 = t6.length - 1;
2505
+ if (i6 > 0) {
2506
+ h4.textContent = s3 ? s3.emptyScript : "";
2507
+ for (let s5 = 0; s5 < i6; s5++)
2508
+ h4.append(t6[s5], u2()), C.nextNode(), v3.push({ type: 2, index: ++r4 });
2509
+ h4.append(t6[i6], u2());
2510
+ }
2511
+ }
2512
+ } else if (8 === h4.nodeType)
2513
+ if (h4.data === l2)
2514
+ v3.push({ type: 2, index: r4 });
2515
+ else {
2516
+ let t6 = -1;
2517
+ for (; -1 !== (t6 = h4.data.indexOf(n3, t6 + 1)); )
2518
+ v3.push({ type: 7, index: r4 }), t6 += n3.length - 1;
2519
+ }
2520
+ r4++;
2521
+ }
2522
+ }
2523
+ static createElement(t5, i5) {
2524
+ const s5 = r3.createElement("template");
2525
+ return s5.innerHTML = t5, s5;
2526
+ }
2527
+ };
2528
+ function S2(t5, i5, s5 = t5, e8) {
2529
+ var o7, n7, l6, h4;
2530
+ if (i5 === T2)
2531
+ return i5;
2532
+ let r4 = void 0 !== e8 ? null === (o7 = s5._$Co) || void 0 === o7 ? void 0 : o7[e8] : s5._$Cl;
2533
+ const u3 = d2(i5) ? void 0 : i5._$litDirective$;
2534
+ return (null == r4 ? void 0 : r4.constructor) !== u3 && (null === (n7 = null == r4 ? void 0 : r4._$AO) || void 0 === n7 || n7.call(r4, false), void 0 === u3 ? r4 = void 0 : (r4 = new u3(t5), r4._$AT(t5, s5, e8)), void 0 !== e8 ? (null !== (l6 = (h4 = s5)._$Co) && void 0 !== l6 ? l6 : h4._$Co = [])[e8] = r4 : s5._$Cl = r4), void 0 !== r4 && (i5 = S2(t5, r4._$AS(t5, i5.values), r4, e8)), i5;
2535
+ }
2536
+ var M = class {
2537
+ constructor(t5, i5) {
2538
+ this._$AV = [], this._$AN = void 0, this._$AD = t5, this._$AM = i5;
2539
+ }
2540
+ get parentNode() {
2541
+ return this._$AM.parentNode;
2542
+ }
2543
+ get _$AU() {
2544
+ return this._$AM._$AU;
2545
+ }
2546
+ u(t5) {
2547
+ var i5;
2548
+ const { el: { content: s5 }, parts: e8 } = this._$AD, o7 = (null !== (i5 = null == t5 ? void 0 : t5.creationScope) && void 0 !== i5 ? i5 : r3).importNode(s5, true);
2549
+ C.currentNode = o7;
2550
+ let n7 = C.nextNode(), l6 = 0, h4 = 0, u3 = e8[0];
2551
+ for (; void 0 !== u3; ) {
2552
+ if (l6 === u3.index) {
2553
+ let i6;
2554
+ 2 === u3.type ? i6 = new R2(n7, n7.nextSibling, this, t5) : 1 === u3.type ? i6 = new u3.ctor(n7, u3.name, u3.strings, this, t5) : 6 === u3.type && (i6 = new Z(n7, this, t5)), this._$AV.push(i6), u3 = e8[++h4];
2555
+ }
2556
+ l6 !== (null == u3 ? void 0 : u3.index) && (n7 = C.nextNode(), l6++);
2557
+ }
2558
+ return C.currentNode = r3, o7;
2559
+ }
2560
+ v(t5) {
2561
+ let i5 = 0;
2562
+ for (const s5 of this._$AV)
2563
+ void 0 !== s5 && (void 0 !== s5.strings ? (s5._$AI(t5, s5, i5), i5 += s5.strings.length - 2) : s5._$AI(t5[i5])), i5++;
2564
+ }
2565
+ };
2566
+ var R2 = class _R {
2567
+ constructor(t5, i5, s5, e8) {
2568
+ var o7;
2569
+ this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t5, this._$AB = i5, this._$AM = s5, this.options = e8, this._$Cp = null === (o7 = null == e8 ? void 0 : e8.isConnected) || void 0 === o7 || o7;
2570
+ }
2571
+ get _$AU() {
2572
+ var t5, i5;
2573
+ return null !== (i5 = null === (t5 = this._$AM) || void 0 === t5 ? void 0 : t5._$AU) && void 0 !== i5 ? i5 : this._$Cp;
2574
+ }
2575
+ get parentNode() {
2576
+ let t5 = this._$AA.parentNode;
2577
+ const i5 = this._$AM;
2578
+ return void 0 !== i5 && 11 === (null == t5 ? void 0 : t5.nodeType) && (t5 = i5.parentNode), t5;
2579
+ }
2580
+ get startNode() {
2581
+ return this._$AA;
2582
+ }
2583
+ get endNode() {
2584
+ return this._$AB;
2585
+ }
2586
+ _$AI(t5, i5 = this) {
2587
+ t5 = S2(this, t5, i5), d2(t5) ? t5 === A || null == t5 || "" === t5 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t5 !== this._$AH && t5 !== T2 && this._(t5) : void 0 !== t5._$litType$ ? this.g(t5) : void 0 !== t5.nodeType ? this.$(t5) : v(t5) ? this.T(t5) : this._(t5);
2588
+ }
2589
+ k(t5) {
2590
+ return this._$AA.parentNode.insertBefore(t5, this._$AB);
2591
+ }
2592
+ $(t5) {
2593
+ this._$AH !== t5 && (this._$AR(), this._$AH = this.k(t5));
2594
+ }
2595
+ _(t5) {
2596
+ this._$AH !== A && d2(this._$AH) ? this._$AA.nextSibling.data = t5 : this.$(r3.createTextNode(t5)), this._$AH = t5;
2597
+ }
2598
+ g(t5) {
2599
+ var i5;
2600
+ const { values: s5, _$litType$: e8 } = t5, o7 = "number" == typeof e8 ? this._$AC(t5) : (void 0 === e8.el && (e8.el = N.createElement(P(e8.h, e8.h[0]), this.options)), e8);
2601
+ if ((null === (i5 = this._$AH) || void 0 === i5 ? void 0 : i5._$AD) === o7)
2602
+ this._$AH.v(s5);
2603
+ else {
2604
+ const t6 = new M(o7, this), i6 = t6.u(this.options);
2605
+ t6.v(s5), this.$(i6), this._$AH = t6;
2606
+ }
2607
+ }
2608
+ _$AC(t5) {
2609
+ let i5 = E.get(t5.strings);
2610
+ return void 0 === i5 && E.set(t5.strings, i5 = new N(t5)), i5;
2611
+ }
2612
+ T(t5) {
2613
+ c2(this._$AH) || (this._$AH = [], this._$AR());
2614
+ const i5 = this._$AH;
2615
+ let s5, e8 = 0;
2616
+ for (const o7 of t5)
2617
+ e8 === i5.length ? i5.push(s5 = new _R(this.k(u2()), this.k(u2()), this, this.options)) : s5 = i5[e8], s5._$AI(o7), e8++;
2618
+ e8 < i5.length && (this._$AR(s5 && s5._$AB.nextSibling, e8), i5.length = e8);
2619
+ }
2620
+ _$AR(t5 = this._$AA.nextSibling, i5) {
2621
+ var s5;
2622
+ for (null === (s5 = this._$AP) || void 0 === s5 || s5.call(this, false, true, i5); t5 && t5 !== this._$AB; ) {
2623
+ const i6 = t5.nextSibling;
2624
+ t5.remove(), t5 = i6;
2625
+ }
2626
+ }
2627
+ setConnected(t5) {
2628
+ var i5;
2629
+ void 0 === this._$AM && (this._$Cp = t5, null === (i5 = this._$AP) || void 0 === i5 || i5.call(this, t5));
2630
+ }
2631
+ };
2632
+ var k = class {
2633
+ constructor(t5, i5, s5, e8, o7) {
2634
+ this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t5, this.name = i5, this._$AM = e8, this.options = o7, s5.length > 2 || "" !== s5[0] || "" !== s5[1] ? (this._$AH = Array(s5.length - 1).fill(new String()), this.strings = s5) : this._$AH = A;
2635
+ }
2636
+ get tagName() {
2637
+ return this.element.tagName;
2638
+ }
2639
+ get _$AU() {
2640
+ return this._$AM._$AU;
2641
+ }
2642
+ _$AI(t5, i5 = this, s5, e8) {
2643
+ const o7 = this.strings;
2644
+ let n7 = false;
2645
+ if (void 0 === o7)
2646
+ t5 = S2(this, t5, i5, 0), n7 = !d2(t5) || t5 !== this._$AH && t5 !== T2, n7 && (this._$AH = t5);
2647
+ else {
2648
+ const e9 = t5;
2649
+ let l6, h4;
2650
+ for (t5 = o7[0], l6 = 0; l6 < o7.length - 1; l6++)
2651
+ h4 = S2(this, e9[s5 + l6], i5, l6), h4 === T2 && (h4 = this._$AH[l6]), n7 || (n7 = !d2(h4) || h4 !== this._$AH[l6]), h4 === A ? t5 = A : t5 !== A && (t5 += (null != h4 ? h4 : "") + o7[l6 + 1]), this._$AH[l6] = h4;
2652
+ }
2653
+ n7 && !e8 && this.j(t5);
2654
+ }
2655
+ j(t5) {
2656
+ t5 === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t5 ? t5 : "");
2657
+ }
2658
+ };
2659
+ var H = class extends k {
2660
+ constructor() {
2661
+ super(...arguments), this.type = 3;
2662
+ }
2663
+ j(t5) {
2664
+ this.element[this.name] = t5 === A ? void 0 : t5;
2665
+ }
2666
+ };
2667
+ var I = s3 ? s3.emptyScript : "";
2668
+ var L = class extends k {
2669
+ constructor() {
2670
+ super(...arguments), this.type = 4;
2671
+ }
2672
+ j(t5) {
2673
+ t5 && t5 !== A ? this.element.setAttribute(this.name, I) : this.element.removeAttribute(this.name);
2674
+ }
2675
+ };
2676
+ var z = class extends k {
2677
+ constructor(t5, i5, s5, e8, o7) {
2678
+ super(t5, i5, s5, e8, o7), this.type = 5;
2679
+ }
2680
+ _$AI(t5, i5 = this) {
2681
+ var s5;
2682
+ if ((t5 = null !== (s5 = S2(this, t5, i5, 0)) && void 0 !== s5 ? s5 : A) === T2)
2683
+ return;
2684
+ const e8 = this._$AH, o7 = t5 === A && e8 !== A || t5.capture !== e8.capture || t5.once !== e8.once || t5.passive !== e8.passive, n7 = t5 !== A && (e8 === A || o7);
2685
+ o7 && this.element.removeEventListener(this.name, this, e8), n7 && this.element.addEventListener(this.name, this, t5), this._$AH = t5;
2686
+ }
2687
+ handleEvent(t5) {
2688
+ var i5, s5;
2689
+ "function" == typeof this._$AH ? this._$AH.call(null !== (s5 = null === (i5 = this.options) || void 0 === i5 ? void 0 : i5.host) && void 0 !== s5 ? s5 : this.element, t5) : this._$AH.handleEvent(t5);
2690
+ }
2691
+ };
2692
+ var Z = class {
2693
+ constructor(t5, i5, s5) {
2694
+ this.element = t5, this.type = 6, this._$AN = void 0, this._$AM = i5, this.options = s5;
2695
+ }
2696
+ get _$AU() {
2697
+ return this._$AM._$AU;
2698
+ }
2699
+ _$AI(t5) {
2700
+ S2(this, t5);
2701
+ }
2702
+ };
2703
+ var B = i2.litHtmlPolyfillSupport;
2704
+ null == B || B(N, R2), (null !== (t2 = i2.litHtmlVersions) && void 0 !== t2 ? t2 : i2.litHtmlVersions = []).push("2.8.0");
2705
+ var D = (t5, i5, s5) => {
2706
+ var e8, o7;
2707
+ const n7 = null !== (e8 = null == s5 ? void 0 : s5.renderBefore) && void 0 !== e8 ? e8 : i5;
2708
+ let l6 = n7._$litPart$;
2709
+ if (void 0 === l6) {
2710
+ const t6 = null !== (o7 = null == s5 ? void 0 : s5.renderBefore) && void 0 !== o7 ? o7 : null;
2711
+ n7._$litPart$ = l6 = new R2(i5.insertBefore(u2(), t6), t6, void 0, null != s5 ? s5 : {});
2712
+ }
2713
+ return l6._$AI(t5), l6;
2714
+ };
2715
+
2716
+ // ../../node_modules/.pnpm/lit-element@3.3.3/node_modules/lit-element/lit-element.js
2717
+ var l3;
2718
+ var o4;
2719
+ var s4 = class extends u {
2720
+ constructor() {
2721
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
2722
+ }
2723
+ createRenderRoot() {
2724
+ var t5, e8;
2725
+ const i5 = super.createRenderRoot();
2726
+ return null !== (t5 = (e8 = this.renderOptions).renderBefore) && void 0 !== t5 || (e8.renderBefore = i5.firstChild), i5;
2727
+ }
2728
+ update(t5) {
2729
+ const i5 = this.render();
2730
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t5), this._$Do = D(i5, this.renderRoot, this.renderOptions);
2731
+ }
2732
+ connectedCallback() {
2733
+ var t5;
2734
+ super.connectedCallback(), null === (t5 = this._$Do) || void 0 === t5 || t5.setConnected(true);
2735
+ }
2736
+ disconnectedCallback() {
2737
+ var t5;
2738
+ super.disconnectedCallback(), null === (t5 = this._$Do) || void 0 === t5 || t5.setConnected(false);
2739
+ }
2740
+ render() {
2741
+ return T2;
2742
+ }
2743
+ };
2744
+ s4.finalized = true, s4._$litElement$ = true, null === (l3 = globalThis.litElementHydrateSupport) || void 0 === l3 || l3.call(globalThis, { LitElement: s4 });
2745
+ var n4 = globalThis.litElementPolyfillSupport;
2746
+ null == n4 || n4({ LitElement: s4 });
2747
+ (null !== (o4 = globalThis.litElementVersions) && void 0 !== o4 ? o4 : globalThis.litElementVersions = []).push("3.3.3");
2748
+
2749
+ // ../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/custom-element.js
2750
+ var e4 = (e8) => (n7) => "function" == typeof n7 ? ((e9, n8) => (customElements.define(e9, n8), n8))(e8, n7) : ((e9, n8) => {
2751
+ const { kind: t5, elements: s5 } = n8;
2752
+ return { kind: t5, elements: s5, finisher(n9) {
2753
+ customElements.define(e9, n9);
2754
+ } };
2755
+ })(e8, n7);
2756
+
2757
+ // ../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/property.js
2758
+ var i3 = (i5, e8) => "method" === e8.kind && e8.descriptor && !("value" in e8.descriptor) ? { ...e8, finisher(n7) {
2759
+ n7.createProperty(e8.key, i5);
2760
+ } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e8.key, initializer() {
2761
+ "function" == typeof e8.initializer && (this[e8.key] = e8.initializer.call(this));
2762
+ }, finisher(n7) {
2763
+ n7.createProperty(e8.key, i5);
2764
+ } };
2765
+ var e5 = (i5, e8, n7) => {
2766
+ e8.constructor.createProperty(n7, i5);
2767
+ };
2768
+ function n5(n7) {
2769
+ return (t5, o7) => void 0 !== o7 ? e5(n7, t5, o7) : i3(n7, t5);
2770
+ }
2771
+
2772
+ // ../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/state.js
2773
+ function t3(t5) {
2774
+ return n5({ ...t5, state: true });
2775
+ }
2776
+
2777
+ // ../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js
2778
+ var n6;
2779
+ null != (null === (n6 = window.HTMLSlotElement) || void 0 === n6 ? void 0 : n6.prototype.assignedElements) ? (o7, n7) => o7.assignedElements(n7) : (o7, n7) => o7.assignedNodes(n7).filter((o8) => o8.nodeType === Node.ELEMENT_NODE);
2780
+
2781
+ // ../../node_modules/.pnpm/lit-html@2.8.0/node_modules/lit-html/directive.js
2782
+ var t4 = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 };
2783
+ var e7 = (t5) => (...e8) => ({ _$litDirective$: t5, values: e8 });
2784
+ var i4 = class {
2785
+ constructor(t5) {
2786
+ }
2787
+ get _$AU() {
2788
+ return this._$AM._$AU;
2789
+ }
2790
+ _$AT(t5, e8, i5) {
2791
+ this._$Ct = t5, this._$AM = e8, this._$Ci = i5;
2792
+ }
2793
+ _$AS(t5, e8) {
2794
+ return this.update(t5, e8);
2795
+ }
2796
+ update(t5, e8) {
2797
+ return this.render(...e8);
2798
+ }
2799
+ };
2800
+
2801
+ // ../../node_modules/.pnpm/lit-html@2.8.0/node_modules/lit-html/directives/class-map.js
2802
+ var o6 = e7(class extends i4 {
2803
+ constructor(t5) {
2804
+ var i5;
2805
+ if (super(t5), t5.type !== t4.ATTRIBUTE || "class" !== t5.name || (null === (i5 = t5.strings) || void 0 === i5 ? void 0 : i5.length) > 2)
2806
+ throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
2807
+ }
2808
+ render(t5) {
2809
+ return " " + Object.keys(t5).filter((i5) => t5[i5]).join(" ") + " ";
2810
+ }
2811
+ update(i5, [s5]) {
2812
+ var r4, o7;
2813
+ if (void 0 === this.it) {
2814
+ this.it = /* @__PURE__ */ new Set(), void 0 !== i5.strings && (this.nt = new Set(i5.strings.join(" ").split(/\s/).filter((t5) => "" !== t5)));
2815
+ for (const t5 in s5)
2816
+ s5[t5] && !(null === (r4 = this.nt) || void 0 === r4 ? void 0 : r4.has(t5)) && this.it.add(t5);
2817
+ return this.render(s5);
2818
+ }
2819
+ const e8 = i5.element.classList;
2820
+ this.it.forEach((t5) => {
2821
+ t5 in s5 || (e8.remove(t5), this.it.delete(t5));
2822
+ });
2823
+ for (const t5 in s5) {
2824
+ const i6 = !!s5[t5];
2825
+ i6 === this.it.has(t5) || (null === (o7 = this.nt) || void 0 === o7 ? void 0 : o7.has(t5)) || (i6 ? (e8.add(t5), this.it.add(t5)) : (e8.remove(t5), this.it.delete(t5)));
2826
+ }
2827
+ return T2;
2828
+ }
2829
+ });
2830
+
2831
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/array.es.js
2832
+ function addUniqueItem(array, item) {
2833
+ array.indexOf(item) === -1 && array.push(item);
2834
+ }
2835
+
2836
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/clamp.es.js
2837
+ var clamp = (min, max, v3) => Math.min(Math.max(v3, min), max);
2838
+
2839
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/defaults.es.js
2840
+ var defaults = {
2841
+ duration: 0.3,
2842
+ delay: 0,
2843
+ endDelay: 0,
2844
+ repeat: 0,
2845
+ easing: "ease"
2846
+ };
2847
+
2848
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/is-number.es.js
2849
+ var isNumber = (value) => typeof value === "number";
2850
+
2851
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/is-easing-list.es.js
2852
+ var isEasingList = (easing) => Array.isArray(easing) && !isNumber(easing[0]);
2853
+
2854
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/wrap.es.js
2855
+ var wrap = (min, max, v3) => {
2856
+ const rangeSize = max - min;
2857
+ return ((v3 - min) % rangeSize + rangeSize) % rangeSize + min;
2858
+ };
2859
+
2860
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/easing.es.js
2861
+ function getEasingForSegment(easing, i5) {
2862
+ return isEasingList(easing) ? easing[wrap(0, easing.length, i5)] : easing;
2863
+ }
2864
+
2865
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/mix.es.js
2866
+ var mix = (min, max, progress2) => -progress2 * min + progress2 * max + min;
2867
+
2868
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/noop.es.js
2869
+ var noop = () => {
2870
+ };
2871
+ var noopReturn = (v3) => v3;
2872
+
2873
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/progress.es.js
2874
+ var progress = (min, max, value) => max - min === 0 ? 1 : (value - min) / (max - min);
2875
+
2876
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/offset.es.js
2877
+ function fillOffset(offset, remaining) {
2878
+ const min = offset[offset.length - 1];
2879
+ for (let i5 = 1; i5 <= remaining; i5++) {
2880
+ const offsetProgress = progress(0, remaining, i5);
2881
+ offset.push(mix(min, 1, offsetProgress));
2882
+ }
2883
+ }
2884
+ function defaultOffset(length) {
2885
+ const offset = [0];
2886
+ fillOffset(offset, length - 1);
2887
+ return offset;
2888
+ }
2889
+
2890
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/interpolate.es.js
2891
+ function interpolate(output, input = defaultOffset(output.length), easing = noopReturn) {
2892
+ const length = output.length;
2893
+ const remainder = length - input.length;
2894
+ remainder > 0 && fillOffset(input, remainder);
2895
+ return (t5) => {
2896
+ let i5 = 0;
2897
+ for (; i5 < length - 2; i5++) {
2898
+ if (t5 < input[i5 + 1])
2899
+ break;
2900
+ }
2901
+ let progressInRange = clamp(0, 1, progress(input[i5], input[i5 + 1], t5));
2902
+ const segmentEasing = getEasingForSegment(easing, i5);
2903
+ progressInRange = segmentEasing(progressInRange);
2904
+ return mix(output[i5], output[i5 + 1], progressInRange);
2905
+ };
2906
+ }
2907
+
2908
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/is-cubic-bezier.es.js
2909
+ var isCubicBezier = (easing) => Array.isArray(easing) && isNumber(easing[0]);
2910
+
2911
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/is-easing-generator.es.js
2912
+ var isEasingGenerator = (easing) => typeof easing === "object" && Boolean(easing.createAnimation);
2913
+
2914
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/is-function.es.js
2915
+ var isFunction = (value) => typeof value === "function";
2916
+
2917
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/is-string.es.js
2918
+ var isString = (value) => typeof value === "string";
2919
+
2920
+ // ../../node_modules/.pnpm/@motionone+utils@10.16.3/node_modules/@motionone/utils/dist/time.es.js
2921
+ var time = {
2922
+ ms: (seconds) => seconds * 1e3,
2923
+ s: (milliseconds) => milliseconds / 1e3
2924
+ };
2925
+
2926
+ // ../../node_modules/.pnpm/@motionone+easing@10.16.3/node_modules/@motionone/easing/dist/cubic-bezier.es.js
2927
+ var calcBezier = (t5, a1, a22) => (((1 - 3 * a22 + 3 * a1) * t5 + (3 * a22 - 6 * a1)) * t5 + 3 * a1) * t5;
2928
+ var subdivisionPrecision = 1e-7;
2929
+ var subdivisionMaxIterations = 12;
2930
+ function binarySubdivide(x2, lowerBound, upperBound, mX1, mX2) {
2931
+ let currentX;
2932
+ let currentT;
2933
+ let i5 = 0;
2934
+ do {
2935
+ currentT = lowerBound + (upperBound - lowerBound) / 2;
2936
+ currentX = calcBezier(currentT, mX1, mX2) - x2;
2937
+ if (currentX > 0) {
2938
+ upperBound = currentT;
2939
+ } else {
2940
+ lowerBound = currentT;
2941
+ }
2942
+ } while (Math.abs(currentX) > subdivisionPrecision && ++i5 < subdivisionMaxIterations);
2943
+ return currentT;
2944
+ }
2945
+ function cubicBezier(mX1, mY1, mX2, mY2) {
2946
+ if (mX1 === mY1 && mX2 === mY2)
2947
+ return noopReturn;
2948
+ const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);
2949
+ return (t5) => t5 === 0 || t5 === 1 ? t5 : calcBezier(getTForX(t5), mY1, mY2);
2950
+ }
2951
+
2952
+ // ../../node_modules/.pnpm/@motionone+easing@10.16.3/node_modules/@motionone/easing/dist/steps.es.js
2953
+ var steps = (steps2, direction = "end") => (progress2) => {
2954
+ progress2 = direction === "end" ? Math.min(progress2, 0.999) : Math.max(progress2, 1e-3);
2955
+ const expanded = progress2 * steps2;
2956
+ const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
2957
+ return clamp(0, 1, rounded / steps2);
2958
+ };
2959
+
2960
+ // ../../node_modules/.pnpm/@motionone+animation@10.16.3/node_modules/@motionone/animation/dist/utils/easing.es.js
2961
+ var namedEasings = {
2962
+ ease: cubicBezier(0.25, 0.1, 0.25, 1),
2963
+ "ease-in": cubicBezier(0.42, 0, 1, 1),
2964
+ "ease-in-out": cubicBezier(0.42, 0, 0.58, 1),
2965
+ "ease-out": cubicBezier(0, 0, 0.58, 1)
2966
+ };
2967
+ var functionArgsRegex = /\((.*?)\)/;
2968
+ function getEasingFunction(definition) {
2969
+ if (isFunction(definition))
2970
+ return definition;
2971
+ if (isCubicBezier(definition))
2972
+ return cubicBezier(...definition);
2973
+ if (namedEasings[definition])
2974
+ return namedEasings[definition];
2975
+ if (definition.startsWith("steps")) {
2976
+ const args = functionArgsRegex.exec(definition);
2977
+ if (args) {
2978
+ const argsArray = args[1].split(",");
2979
+ return steps(parseFloat(argsArray[0]), argsArray[1].trim());
2980
+ }
2981
+ }
2982
+ return noopReturn;
2983
+ }
2984
+
2985
+ // ../../node_modules/.pnpm/@motionone+animation@10.16.3/node_modules/@motionone/animation/dist/Animation.es.js
2986
+ var Animation = class {
2987
+ constructor(output, keyframes = [0, 1], { easing, duration: initialDuration = defaults.duration, delay = defaults.delay, endDelay = defaults.endDelay, repeat = defaults.repeat, offset, direction = "normal" } = {}) {
2988
+ this.startTime = null;
2989
+ this.rate = 1;
2990
+ this.t = 0;
2991
+ this.cancelTimestamp = null;
2992
+ this.easing = noopReturn;
2993
+ this.duration = 0;
2994
+ this.totalDuration = 0;
2995
+ this.repeat = 0;
2996
+ this.playState = "idle";
2997
+ this.finished = new Promise((resolve, reject) => {
2998
+ this.resolve = resolve;
2999
+ this.reject = reject;
3000
+ });
3001
+ easing = easing || defaults.easing;
3002
+ if (isEasingGenerator(easing)) {
3003
+ const custom = easing.createAnimation(keyframes);
3004
+ easing = custom.easing;
3005
+ keyframes = custom.keyframes || keyframes;
3006
+ initialDuration = custom.duration || initialDuration;
3007
+ }
3008
+ this.repeat = repeat;
3009
+ this.easing = isEasingList(easing) ? noopReturn : getEasingFunction(easing);
3010
+ this.updateDuration(initialDuration);
3011
+ const interpolate$1 = interpolate(keyframes, offset, isEasingList(easing) ? easing.map(getEasingFunction) : noopReturn);
3012
+ this.tick = (timestamp) => {
3013
+ var _a;
3014
+ delay = delay;
3015
+ let t5 = 0;
3016
+ if (this.pauseTime !== void 0) {
3017
+ t5 = this.pauseTime;
3018
+ } else {
3019
+ t5 = (timestamp - this.startTime) * this.rate;
3020
+ }
3021
+ this.t = t5;
3022
+ t5 /= 1e3;
3023
+ t5 = Math.max(t5 - delay, 0);
3024
+ if (this.playState === "finished" && this.pauseTime === void 0) {
3025
+ t5 = this.totalDuration;
3026
+ }
3027
+ const progress2 = t5 / this.duration;
3028
+ let currentIteration = Math.floor(progress2);
3029
+ let iterationProgress = progress2 % 1;
3030
+ if (!iterationProgress && progress2 >= 1) {
3031
+ iterationProgress = 1;
3032
+ }
3033
+ iterationProgress === 1 && currentIteration--;
3034
+ const iterationIsOdd = currentIteration % 2;
3035
+ if (direction === "reverse" || direction === "alternate" && iterationIsOdd || direction === "alternate-reverse" && !iterationIsOdd) {
3036
+ iterationProgress = 1 - iterationProgress;
3037
+ }
3038
+ const p3 = t5 >= this.totalDuration ? 1 : Math.min(iterationProgress, 1);
3039
+ const latest = interpolate$1(this.easing(p3));
3040
+ output(latest);
3041
+ const isAnimationFinished = this.pauseTime === void 0 && (this.playState === "finished" || t5 >= this.totalDuration + endDelay);
3042
+ if (isAnimationFinished) {
3043
+ this.playState = "finished";
3044
+ (_a = this.resolve) === null || _a === void 0 ? void 0 : _a.call(this, latest);
3045
+ } else if (this.playState !== "idle") {
3046
+ this.frameRequestId = requestAnimationFrame(this.tick);
3047
+ }
3048
+ };
3049
+ this.play();
3050
+ }
3051
+ play() {
3052
+ const now = performance.now();
3053
+ this.playState = "running";
3054
+ if (this.pauseTime !== void 0) {
3055
+ this.startTime = now - this.pauseTime;
3056
+ } else if (!this.startTime) {
3057
+ this.startTime = now;
3058
+ }
3059
+ this.cancelTimestamp = this.startTime;
3060
+ this.pauseTime = void 0;
3061
+ this.frameRequestId = requestAnimationFrame(this.tick);
3062
+ }
3063
+ pause() {
3064
+ this.playState = "paused";
3065
+ this.pauseTime = this.t;
3066
+ }
3067
+ finish() {
3068
+ this.playState = "finished";
3069
+ this.tick(0);
3070
+ }
3071
+ stop() {
3072
+ var _a;
3073
+ this.playState = "idle";
3074
+ if (this.frameRequestId !== void 0) {
3075
+ cancelAnimationFrame(this.frameRequestId);
3076
+ }
3077
+ (_a = this.reject) === null || _a === void 0 ? void 0 : _a.call(this, false);
3078
+ }
3079
+ cancel() {
3080
+ this.stop();
3081
+ this.tick(this.cancelTimestamp);
3082
+ }
3083
+ reverse() {
3084
+ this.rate *= -1;
3085
+ }
3086
+ commitStyles() {
3087
+ }
3088
+ updateDuration(duration) {
3089
+ this.duration = duration;
3090
+ this.totalDuration = duration * (this.repeat + 1);
3091
+ }
3092
+ get currentTime() {
3093
+ return this.t;
3094
+ }
3095
+ set currentTime(t5) {
3096
+ if (this.pauseTime !== void 0 || this.rate === 0) {
3097
+ this.pauseTime = t5;
3098
+ } else {
3099
+ this.startTime = performance.now() - t5 / this.rate;
3100
+ }
3101
+ }
3102
+ get playbackRate() {
3103
+ return this.rate;
3104
+ }
3105
+ set playbackRate(rate) {
3106
+ this.rate = rate;
3107
+ }
3108
+ };
3109
+
3110
+ // ../../node_modules/.pnpm/hey-listen@1.0.8/node_modules/hey-listen/dist/hey-listen.es.js
3111
+ var invariant = function() {
3112
+ };
3113
+
3114
+ // ../../node_modules/.pnpm/@motionone+types@10.16.3/node_modules/@motionone/types/dist/MotionValue.es.js
3115
+ var MotionValue = class {
3116
+ setAnimation(animation) {
3117
+ this.animation = animation;
3118
+ animation === null || animation === void 0 ? void 0 : animation.finished.then(() => this.clearAnimation()).catch(() => {
3119
+ });
3120
+ }
3121
+ clearAnimation() {
3122
+ this.animation = this.generator = void 0;
3123
+ }
3124
+ };
3125
+
3126
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/data.es.js
3127
+ var data = /* @__PURE__ */ new WeakMap();
3128
+ function getAnimationData(element) {
3129
+ if (!data.has(element)) {
3130
+ data.set(element, {
3131
+ transforms: [],
3132
+ values: /* @__PURE__ */ new Map()
3133
+ });
3134
+ }
3135
+ return data.get(element);
3136
+ }
3137
+ function getMotionValue(motionValues, name) {
3138
+ if (!motionValues.has(name)) {
3139
+ motionValues.set(name, new MotionValue());
3140
+ }
3141
+ return motionValues.get(name);
3142
+ }
3143
+
3144
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/utils/transforms.es.js
3145
+ var axes = ["", "X", "Y", "Z"];
3146
+ var order = ["translate", "scale", "rotate", "skew"];
3147
+ var transformAlias = {
3148
+ x: "translateX",
3149
+ y: "translateY",
3150
+ z: "translateZ"
3151
+ };
3152
+ var rotation = {
3153
+ syntax: "<angle>",
3154
+ initialValue: "0deg",
3155
+ toDefaultUnit: (v3) => v3 + "deg"
3156
+ };
3157
+ var baseTransformProperties = {
3158
+ translate: {
3159
+ syntax: "<length-percentage>",
3160
+ initialValue: "0px",
3161
+ toDefaultUnit: (v3) => v3 + "px"
3162
+ },
3163
+ rotate: rotation,
3164
+ scale: {
3165
+ syntax: "<number>",
3166
+ initialValue: 1,
3167
+ toDefaultUnit: noopReturn
3168
+ },
3169
+ skew: rotation
3170
+ };
3171
+ var transformDefinitions = /* @__PURE__ */ new Map();
3172
+ var asTransformCssVar = (name) => `--motion-${name}`;
3173
+ var transforms = ["x", "y", "z"];
3174
+ order.forEach((name) => {
3175
+ axes.forEach((axis) => {
3176
+ transforms.push(name + axis);
3177
+ transformDefinitions.set(asTransformCssVar(name + axis), baseTransformProperties[name]);
3178
+ });
3179
+ });
3180
+ var compareTransformOrder = (a4, b2) => transforms.indexOf(a4) - transforms.indexOf(b2);
3181
+ var transformLookup = new Set(transforms);
3182
+ var isTransform = (name) => transformLookup.has(name);
3183
+ var addTransformToElement = (element, name) => {
3184
+ if (transformAlias[name])
3185
+ name = transformAlias[name];
3186
+ const { transforms: transforms2 } = getAnimationData(element);
3187
+ addUniqueItem(transforms2, name);
3188
+ element.style.transform = buildTransformTemplate(transforms2);
3189
+ };
3190
+ var buildTransformTemplate = (transforms2) => transforms2.sort(compareTransformOrder).reduce(transformListToString, "").trim();
3191
+ var transformListToString = (template, name) => `${template} ${name}(var(${asTransformCssVar(name)}))`;
3192
+
3193
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/utils/css-var.es.js
3194
+ var isCssVar = (name) => name.startsWith("--");
3195
+ var registeredProperties = /* @__PURE__ */ new Set();
3196
+ function registerCssVariable(name) {
3197
+ if (registeredProperties.has(name))
3198
+ return;
3199
+ registeredProperties.add(name);
3200
+ try {
3201
+ const { syntax, initialValue } = transformDefinitions.has(name) ? transformDefinitions.get(name) : {};
3202
+ CSS.registerProperty({
3203
+ name,
3204
+ inherits: false,
3205
+ syntax,
3206
+ initialValue
3207
+ });
3208
+ } catch (e8) {
3209
+ }
3210
+ }
3211
+
3212
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/utils/feature-detection.es.js
3213
+ var testAnimation = (keyframes, options) => document.createElement("div").animate(keyframes, options);
3214
+ var featureTests = {
3215
+ cssRegisterProperty: () => typeof CSS !== "undefined" && Object.hasOwnProperty.call(CSS, "registerProperty"),
3216
+ waapi: () => Object.hasOwnProperty.call(Element.prototype, "animate"),
3217
+ partialKeyframes: () => {
3218
+ try {
3219
+ testAnimation({ opacity: [1] });
3220
+ } catch (e8) {
3221
+ return false;
3222
+ }
3223
+ return true;
3224
+ },
3225
+ finished: () => Boolean(testAnimation({ opacity: [0, 1] }, { duration: 1e-3 }).finished),
3226
+ linearEasing: () => {
3227
+ try {
3228
+ testAnimation({ opacity: 0 }, { easing: "linear(0, 1)" });
3229
+ } catch (e8) {
3230
+ return false;
3231
+ }
3232
+ return true;
3233
+ }
3234
+ };
3235
+ var results = {};
3236
+ var supports = {};
3237
+ for (const key in featureTests) {
3238
+ supports[key] = () => {
3239
+ if (results[key] === void 0)
3240
+ results[key] = featureTests[key]();
3241
+ return results[key];
3242
+ };
3243
+ }
3244
+
3245
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/utils/easing.es.js
3246
+ var resolution = 0.015;
3247
+ var generateLinearEasingPoints = (easing, duration) => {
3248
+ let points = "";
3249
+ const numPoints = Math.round(duration / resolution);
3250
+ for (let i5 = 0; i5 < numPoints; i5++) {
3251
+ points += easing(progress(0, numPoints - 1, i5)) + ", ";
3252
+ }
3253
+ return points.substring(0, points.length - 2);
3254
+ };
3255
+ var convertEasing = (easing, duration) => {
3256
+ if (isFunction(easing)) {
3257
+ return supports.linearEasing() ? `linear(${generateLinearEasingPoints(easing, duration)})` : defaults.easing;
3258
+ } else {
3259
+ return isCubicBezier(easing) ? cubicBezierAsString(easing) : easing;
3260
+ }
3261
+ };
3262
+ var cubicBezierAsString = ([a4, b2, c4, d3]) => `cubic-bezier(${a4}, ${b2}, ${c4}, ${d3})`;
3263
+
3264
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js
3265
+ function hydrateKeyframes(keyframes, readInitialValue) {
3266
+ for (let i5 = 0; i5 < keyframes.length; i5++) {
3267
+ if (keyframes[i5] === null) {
3268
+ keyframes[i5] = i5 ? keyframes[i5 - 1] : readInitialValue();
3269
+ }
3270
+ }
3271
+ return keyframes;
3272
+ }
3273
+ var keyframesList = (keyframes) => Array.isArray(keyframes) ? keyframes : [keyframes];
3274
+
3275
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js
3276
+ function getStyleName(key) {
3277
+ if (transformAlias[key])
3278
+ key = transformAlias[key];
3279
+ return isTransform(key) ? asTransformCssVar(key) : key;
3280
+ }
3281
+
3282
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/style.es.js
3283
+ var style = {
3284
+ get: (element, name) => {
3285
+ name = getStyleName(name);
3286
+ let value = isCssVar(name) ? element.style.getPropertyValue(name) : getComputedStyle(element)[name];
3287
+ if (!value && value !== 0) {
3288
+ const definition = transformDefinitions.get(name);
3289
+ if (definition)
3290
+ value = definition.initialValue;
3291
+ }
3292
+ return value;
3293
+ },
3294
+ set: (element, name, value) => {
3295
+ name = getStyleName(name);
3296
+ if (isCssVar(name)) {
3297
+ element.style.setProperty(name, value);
3298
+ } else {
3299
+ element.style[name] = value;
3300
+ }
3301
+ }
3302
+ };
3303
+
3304
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js
3305
+ function stopAnimation(animation, needsCommit = true) {
3306
+ if (!animation || animation.playState === "finished")
3307
+ return;
3308
+ try {
3309
+ if (animation.stop) {
3310
+ animation.stop();
3311
+ } else {
3312
+ needsCommit && animation.commitStyles();
3313
+ animation.cancel();
3314
+ }
3315
+ } catch (e8) {
3316
+ }
3317
+ }
3318
+
3319
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/utils/get-unit.es.js
3320
+ function getUnitConverter(keyframes, definition) {
3321
+ var _a;
3322
+ let toUnit = (definition === null || definition === void 0 ? void 0 : definition.toDefaultUnit) || noopReturn;
3323
+ const finalKeyframe = keyframes[keyframes.length - 1];
3324
+ if (isString(finalKeyframe)) {
3325
+ const unit = ((_a = finalKeyframe.match(/(-?[\d.]+)([a-z%]*)/)) === null || _a === void 0 ? void 0 : _a[2]) || "";
3326
+ if (unit)
3327
+ toUnit = (value) => value + unit;
3328
+ }
3329
+ return toUnit;
3330
+ }
3331
+
3332
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/animate-style.es.js
3333
+ function getDevToolsRecord() {
3334
+ return window.__MOTION_DEV_TOOLS_RECORD;
3335
+ }
3336
+ function animateStyle(element, key, keyframesDefinition, options = {}, AnimationPolyfill) {
3337
+ const record = getDevToolsRecord();
3338
+ const isRecording = options.record !== false && record;
3339
+ let animation;
3340
+ let { duration = defaults.duration, delay = defaults.delay, endDelay = defaults.endDelay, repeat = defaults.repeat, easing = defaults.easing, persist = false, direction, offset, allowWebkitAcceleration = false } = options;
3341
+ const data2 = getAnimationData(element);
3342
+ const valueIsTransform = isTransform(key);
3343
+ let canAnimateNatively = supports.waapi();
3344
+ valueIsTransform && addTransformToElement(element, key);
3345
+ const name = getStyleName(key);
3346
+ const motionValue = getMotionValue(data2.values, name);
3347
+ const definition = transformDefinitions.get(name);
3348
+ stopAnimation(motionValue.animation, !(isEasingGenerator(easing) && motionValue.generator) && options.record !== false);
3349
+ return () => {
3350
+ const readInitialValue = () => {
3351
+ var _a, _b;
3352
+ return (_b = (_a = style.get(element, name)) !== null && _a !== void 0 ? _a : definition === null || definition === void 0 ? void 0 : definition.initialValue) !== null && _b !== void 0 ? _b : 0;
3353
+ };
3354
+ let keyframes = hydrateKeyframes(keyframesList(keyframesDefinition), readInitialValue);
3355
+ const toUnit = getUnitConverter(keyframes, definition);
3356
+ if (isEasingGenerator(easing)) {
3357
+ const custom = easing.createAnimation(keyframes, key !== "opacity", readInitialValue, name, motionValue);
3358
+ easing = custom.easing;
3359
+ keyframes = custom.keyframes || keyframes;
3360
+ duration = custom.duration || duration;
3361
+ }
3362
+ if (isCssVar(name)) {
3363
+ if (supports.cssRegisterProperty()) {
3364
+ registerCssVariable(name);
3365
+ } else {
3366
+ canAnimateNatively = false;
3367
+ }
3368
+ }
3369
+ if (valueIsTransform && !supports.linearEasing() && (isFunction(easing) || isEasingList(easing) && easing.some(isFunction))) {
3370
+ canAnimateNatively = false;
3371
+ }
3372
+ if (canAnimateNatively) {
3373
+ if (definition) {
3374
+ keyframes = keyframes.map((value) => isNumber(value) ? definition.toDefaultUnit(value) : value);
3375
+ }
3376
+ if (keyframes.length === 1 && (!supports.partialKeyframes() || isRecording)) {
3377
+ keyframes.unshift(readInitialValue());
3378
+ }
3379
+ const animationOptions = {
3380
+ delay: time.ms(delay),
3381
+ duration: time.ms(duration),
3382
+ endDelay: time.ms(endDelay),
3383
+ easing: !isEasingList(easing) ? convertEasing(easing, duration) : void 0,
3384
+ direction,
3385
+ iterations: repeat + 1,
3386
+ fill: "both"
3387
+ };
3388
+ animation = element.animate({
3389
+ [name]: keyframes,
3390
+ offset,
3391
+ easing: isEasingList(easing) ? easing.map((thisEasing) => convertEasing(thisEasing, duration)) : void 0
3392
+ }, animationOptions);
3393
+ if (!animation.finished) {
3394
+ animation.finished = new Promise((resolve, reject) => {
3395
+ animation.onfinish = resolve;
3396
+ animation.oncancel = reject;
3397
+ });
3398
+ }
3399
+ const target = keyframes[keyframes.length - 1];
3400
+ animation.finished.then(() => {
3401
+ if (persist)
3402
+ return;
3403
+ style.set(element, name, target);
3404
+ animation.cancel();
3405
+ }).catch(noop);
3406
+ if (!allowWebkitAcceleration)
3407
+ animation.playbackRate = 1.000001;
3408
+ } else if (AnimationPolyfill && valueIsTransform) {
3409
+ keyframes = keyframes.map((value) => typeof value === "string" ? parseFloat(value) : value);
3410
+ if (keyframes.length === 1) {
3411
+ keyframes.unshift(parseFloat(readInitialValue()));
3412
+ }
3413
+ animation = new AnimationPolyfill((latest) => {
3414
+ style.set(element, name, toUnit ? toUnit(latest) : latest);
3415
+ }, keyframes, Object.assign(Object.assign({}, options), {
3416
+ duration,
3417
+ easing
3418
+ }));
3419
+ } else {
3420
+ const target = keyframes[keyframes.length - 1];
3421
+ style.set(element, name, definition && isNumber(target) ? definition.toDefaultUnit(target) : target);
3422
+ }
3423
+ if (isRecording) {
3424
+ record(element, key, keyframes, {
3425
+ duration,
3426
+ delay,
3427
+ easing,
3428
+ repeat,
3429
+ offset
3430
+ }, "motion-one");
3431
+ }
3432
+ motionValue.setAnimation(animation);
3433
+ return animation;
3434
+ };
3435
+ }
3436
+
3437
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/utils/options.es.js
3438
+ var getOptions = (options, key) => (
3439
+ /**
3440
+ * TODO: Make test for this
3441
+ * Always return a new object otherwise delay is overwritten by results of stagger
3442
+ * and this results in no stagger
3443
+ */
3444
+ options[key] ? Object.assign(Object.assign({}, options), options[key]) : Object.assign({}, options)
3445
+ );
3446
+
3447
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/utils/resolve-elements.es.js
3448
+ function resolveElements(elements, selectorCache) {
3449
+ var _a;
3450
+ if (typeof elements === "string") {
3451
+ if (selectorCache) {
3452
+ (_a = selectorCache[elements]) !== null && _a !== void 0 ? _a : selectorCache[elements] = document.querySelectorAll(elements);
3453
+ elements = selectorCache[elements];
3454
+ } else {
3455
+ elements = document.querySelectorAll(elements);
3456
+ }
3457
+ } else if (elements instanceof Element) {
3458
+ elements = [elements];
3459
+ }
3460
+ return Array.from(elements || []);
3461
+ }
3462
+
3463
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/utils/controls.es.js
3464
+ var createAnimation = (factory) => factory();
3465
+ var withControls = (animationFactory, options, duration = defaults.duration) => {
3466
+ return new Proxy({
3467
+ animations: animationFactory.map(createAnimation).filter(Boolean),
3468
+ duration,
3469
+ options
3470
+ }, controls);
3471
+ };
3472
+ var getActiveAnimation = (state) => state.animations[0];
3473
+ var controls = {
3474
+ get: (target, key) => {
3475
+ const activeAnimation = getActiveAnimation(target);
3476
+ switch (key) {
3477
+ case "duration":
3478
+ return target.duration;
3479
+ case "currentTime":
3480
+ return time.s((activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) || 0);
3481
+ case "playbackRate":
3482
+ case "playState":
3483
+ return activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key];
3484
+ case "finished":
3485
+ if (!target.finished) {
3486
+ target.finished = Promise.all(target.animations.map(selectFinished)).catch(noop);
3487
+ }
3488
+ return target.finished;
3489
+ case "stop":
3490
+ return () => {
3491
+ target.animations.forEach((animation) => stopAnimation(animation));
3492
+ };
3493
+ case "forEachNative":
3494
+ return (callback) => {
3495
+ target.animations.forEach((animation) => callback(animation, target));
3496
+ };
3497
+ default:
3498
+ return typeof (activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) === "undefined" ? void 0 : () => target.animations.forEach((animation) => animation[key]());
3499
+ }
3500
+ },
3501
+ set: (target, key, value) => {
3502
+ switch (key) {
3503
+ case "currentTime":
3504
+ value = time.ms(value);
3505
+ case "playbackRate":
3506
+ for (let i5 = 0; i5 < target.animations.length; i5++) {
3507
+ target.animations[i5][key] = value;
3508
+ }
3509
+ return true;
3510
+ }
3511
+ return false;
3512
+ }
3513
+ };
3514
+ var selectFinished = (animation) => animation.finished;
3515
+
3516
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/utils/stagger.es.js
3517
+ function resolveOption(option, i5, total) {
3518
+ return isFunction(option) ? option(i5, total) : option;
3519
+ }
3520
+
3521
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/create-animate.es.js
3522
+ function createAnimate(AnimatePolyfill) {
3523
+ return function animate3(elements, keyframes, options = {}) {
3524
+ elements = resolveElements(elements);
3525
+ const numElements = elements.length;
3526
+ invariant(Boolean(numElements), "No valid element provided.");
3527
+ invariant(Boolean(keyframes), "No keyframes defined.");
3528
+ const animationFactories = [];
3529
+ for (let i5 = 0; i5 < numElements; i5++) {
3530
+ const element = elements[i5];
3531
+ for (const key in keyframes) {
3532
+ const valueOptions = getOptions(options, key);
3533
+ valueOptions.delay = resolveOption(valueOptions.delay, i5, numElements);
3534
+ const animation = animateStyle(element, key, keyframes[key], valueOptions, AnimatePolyfill);
3535
+ animationFactories.push(animation);
3536
+ }
3537
+ }
3538
+ return withControls(
3539
+ animationFactories,
3540
+ options,
3541
+ /**
3542
+ * TODO:
3543
+ * If easing is set to spring or glide, duration will be dynamically
3544
+ * generated. Ideally we would dynamically generate this from
3545
+ * animation.effect.getComputedTiming().duration but this isn't
3546
+ * supported in iOS13 or our number polyfill. Perhaps it's possible
3547
+ * to Proxy animations returned from animateStyle that has duration
3548
+ * as a getter.
3549
+ */
3550
+ options.duration
3551
+ );
3552
+ };
3553
+ }
3554
+
3555
+ // ../../node_modules/.pnpm/@motionone+dom@10.16.4/node_modules/@motionone/dom/dist/animate/index.es.js
3556
+ var animate = createAnimate(Animation);
3557
+
3558
+ // ../../node_modules/.pnpm/motion@10.16.2/node_modules/motion/dist/animate.es.js
3559
+ function animateProgress(target, options = {}) {
3560
+ return withControls([
3561
+ () => {
3562
+ const animation = new Animation(target, [0, 1], options);
3563
+ animation.finished.catch(() => {
3564
+ });
3565
+ return animation;
3566
+ }
3567
+ ], options, options.duration);
3568
+ }
3569
+ function animate2(target, keyframesOrOptions, options) {
3570
+ const factory = isFunction(target) ? animateProgress : animate;
3571
+ return factory(target, keyframesOrOptions, options);
3572
+ }
3573
+
3574
+ // ../../node_modules/.pnpm/lit-html@2.8.0/node_modules/lit-html/directives/if-defined.js
3575
+ var l5 = (l6) => null != l6 ? l6 : A;
3576
+
3577
+ // ../../node_modules/.pnpm/@walletconnect+modal-ui@2.6.2_@types+react@18.2.70_react@18.2.0/node_modules/@walletconnect/modal-ui/dist/index.js
3578
+ var import_qrcode = __toESM(require_browser(), 1);
3579
+ var et = Object.defineProperty;
3580
+ var Be = Object.getOwnPropertySymbols;
3581
+ var tt = Object.prototype.hasOwnProperty;
3582
+ var ot = Object.prototype.propertyIsEnumerable;
3583
+ var Ue = (e8, o7, r4) => o7 in e8 ? et(e8, o7, { enumerable: true, configurable: true, writable: true, value: r4 }) : e8[o7] = r4;
3584
+ var ve = (e8, o7) => {
3585
+ for (var r4 in o7 || (o7 = {}))
3586
+ tt.call(o7, r4) && Ue(e8, r4, o7[r4]);
3587
+ if (Be)
3588
+ for (var r4 of Be(o7))
3589
+ ot.call(o7, r4) && Ue(e8, r4, o7[r4]);
3590
+ return e8;
3591
+ };
3592
+ function rt() {
3593
+ var e8;
3594
+ const o7 = (e8 = ne.state.themeMode) != null ? e8 : "dark", r4 = { light: { foreground: { 1: "rgb(20,20,20)", 2: "rgb(121,134,134)", 3: "rgb(158,169,169)" }, background: { 1: "rgb(255,255,255)", 2: "rgb(241,243,243)", 3: "rgb(228,231,231)" }, overlay: "rgba(0,0,0,0.1)" }, dark: { foreground: { 1: "rgb(228,231,231)", 2: "rgb(148,158,158)", 3: "rgb(110,119,119)" }, background: { 1: "rgb(20,20,20)", 2: "rgb(39,42,42)", 3: "rgb(59,64,64)" }, overlay: "rgba(255,255,255,0.1)" } }[o7];
3595
+ return { "--wcm-color-fg-1": r4.foreground[1], "--wcm-color-fg-2": r4.foreground[2], "--wcm-color-fg-3": r4.foreground[3], "--wcm-color-bg-1": r4.background[1], "--wcm-color-bg-2": r4.background[2], "--wcm-color-bg-3": r4.background[3], "--wcm-color-overlay": r4.overlay };
3596
+ }
3597
+ function He() {
3598
+ return { "--wcm-accent-color": "#3396FF", "--wcm-accent-fill-color": "#FFFFFF", "--wcm-z-index": "89", "--wcm-background-color": "#3396FF", "--wcm-background-border-radius": "8px", "--wcm-container-border-radius": "30px", "--wcm-wallet-icon-border-radius": "15px", "--wcm-wallet-icon-large-border-radius": "30px", "--wcm-wallet-icon-small-border-radius": "7px", "--wcm-input-border-radius": "28px", "--wcm-button-border-radius": "10px", "--wcm-notification-border-radius": "36px", "--wcm-secondary-button-border-radius": "28px", "--wcm-icon-button-border-radius": "50%", "--wcm-button-hover-highlight-border-radius": "10px", "--wcm-text-big-bold-size": "20px", "--wcm-text-big-bold-weight": "600", "--wcm-text-big-bold-line-height": "24px", "--wcm-text-big-bold-letter-spacing": "-0.03em", "--wcm-text-big-bold-text-transform": "none", "--wcm-text-xsmall-bold-size": "10px", "--wcm-text-xsmall-bold-weight": "700", "--wcm-text-xsmall-bold-line-height": "12px", "--wcm-text-xsmall-bold-letter-spacing": "0.02em", "--wcm-text-xsmall-bold-text-transform": "uppercase", "--wcm-text-xsmall-regular-size": "12px", "--wcm-text-xsmall-regular-weight": "600", "--wcm-text-xsmall-regular-line-height": "14px", "--wcm-text-xsmall-regular-letter-spacing": "-0.03em", "--wcm-text-xsmall-regular-text-transform": "none", "--wcm-text-small-thin-size": "14px", "--wcm-text-small-thin-weight": "500", "--wcm-text-small-thin-line-height": "16px", "--wcm-text-small-thin-letter-spacing": "-0.03em", "--wcm-text-small-thin-text-transform": "none", "--wcm-text-small-regular-size": "14px", "--wcm-text-small-regular-weight": "600", "--wcm-text-small-regular-line-height": "16px", "--wcm-text-small-regular-letter-spacing": "-0.03em", "--wcm-text-small-regular-text-transform": "none", "--wcm-text-medium-regular-size": "16px", "--wcm-text-medium-regular-weight": "600", "--wcm-text-medium-regular-line-height": "20px", "--wcm-text-medium-regular-letter-spacing": "-0.03em", "--wcm-text-medium-regular-text-transform": "none", "--wcm-font-family": "-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif", "--wcm-font-feature-settings": "'tnum' on, 'lnum' on, 'case' on", "--wcm-success-color": "rgb(38,181,98)", "--wcm-error-color": "rgb(242, 90, 103)", "--wcm-overlay-background-color": "rgba(0, 0, 0, 0.3)", "--wcm-overlay-backdrop-filter": "none" };
3599
+ }
3600
+ var h3 = { getPreset(e8) {
3601
+ return He()[e8];
3602
+ }, setTheme() {
3603
+ const e8 = document.querySelector(":root"), { themeVariables: o7 } = ne.state;
3604
+ if (e8) {
3605
+ const r4 = ve(ve(ve({}, rt()), He()), o7);
3606
+ Object.entries(r4).forEach(([a4, t5]) => e8.style.setProperty(a4, t5));
3607
+ }
3608
+ }, globalCss: i`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}` };
3609
+ var at = i`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;
3610
+ var lt = Object.defineProperty;
3611
+ var it = Object.getOwnPropertyDescriptor;
3612
+ var F = (e8, o7, r4, a4) => {
3613
+ for (var t5 = a4 > 1 ? void 0 : a4 ? it(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
3614
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
3615
+ return a4 && t5 && lt(o7, r4, t5), t5;
3616
+ };
3617
+ var T3 = class extends s4 {
3618
+ constructor() {
3619
+ super(...arguments), this.disabled = false, this.iconLeft = void 0, this.iconRight = void 0, this.onClick = () => null, this.variant = "default";
3620
+ }
3621
+ render() {
3622
+ const e8 = { "wcm-icon-left": this.iconLeft !== void 0, "wcm-icon-right": this.iconRight !== void 0, "wcm-ghost": this.variant === "ghost", "wcm-outline": this.variant === "outline" };
3623
+ let o7 = "inverse";
3624
+ return this.variant === "ghost" && (o7 = "secondary"), this.variant === "outline" && (o7 = "accent"), x`<button class="${o6(e8)}" ?disabled="${this.disabled}" @click="${this.onClick}">${this.iconLeft}<wcm-text variant="small-regular" color="${o7}"><slot></slot></wcm-text>${this.iconRight}</button>`;
3625
+ }
3626
+ };
3627
+ T3.styles = [h3.globalCss, at], F([n5({ type: Boolean })], T3.prototype, "disabled", 2), F([n5()], T3.prototype, "iconLeft", 2), F([n5()], T3.prototype, "iconRight", 2), F([n5()], T3.prototype, "onClick", 2), F([n5()], T3.prototype, "variant", 2), T3 = F([e4("wcm-button")], T3);
3628
+ var nt = i`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;
3629
+ var ct = Object.defineProperty;
3630
+ var st = Object.getOwnPropertyDescriptor;
3631
+ var ue = (e8, o7, r4, a4) => {
3632
+ for (var t5 = a4 > 1 ? void 0 : a4 ? st(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
3633
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
3634
+ return a4 && t5 && ct(o7, r4, t5), t5;
3635
+ };
3636
+ var ee = class extends s4 {
3637
+ constructor() {
3638
+ super(...arguments), this.disabled = false, this.variant = "primary";
3639
+ }
3640
+ render() {
3641
+ const e8 = { "wcm-secondary": this.variant === "secondary" };
3642
+ return x`<button ?disabled="${this.disabled}" class="${o6(e8)}"><slot></slot></button>`;
3643
+ }
3644
+ };
3645
+ ee.styles = [h3.globalCss, nt], ue([n5({ type: Boolean })], ee.prototype, "disabled", 2), ue([n5()], ee.prototype, "variant", 2), ee = ue([e4("wcm-button-big")], ee);
3646
+ var dt = i`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;
3647
+ var mt = Object.defineProperty;
3648
+ var ht = Object.getOwnPropertyDescriptor;
3649
+ var wt = (e8, o7, r4, a4) => {
3650
+ for (var t5 = a4 > 1 ? void 0 : a4 ? ht(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
3651
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
3652
+ return a4 && t5 && mt(o7, r4, t5), t5;
3653
+ };
3654
+ var be = class extends s4 {
3655
+ render() {
3656
+ return x`<div><slot></slot></div>`;
3657
+ }
3658
+ };
3659
+ be.styles = [h3.globalCss, dt], be = wt([e4("wcm-info-footer")], be);
3660
+ var v2 = { CROSS_ICON: b`<svg width="12" height="12" viewBox="0 0 12 12"><path d="M9.94 11A.75.75 0 1 0 11 9.94L7.414 6.353a.5.5 0 0 1 0-.708L11 2.061A.75.75 0 1 0 9.94 1L6.353 4.586a.5.5 0 0 1-.708 0L2.061 1A.75.75 0 0 0 1 2.06l3.586 3.586a.5.5 0 0 1 0 .708L1 9.939A.75.75 0 1 0 2.06 11l3.586-3.586a.5.5 0 0 1 .708 0L9.939 11Z" fill="#fff"/></svg>`, WALLET_CONNECT_LOGO: b`<svg width="178" height="29" viewBox="0 0 178 29" id="wcm-wc-logo"><path d="M10.683 7.926c5.284-5.17 13.85-5.17 19.134 0l.636.623a.652.652 0 0 1 0 .936l-2.176 2.129a.343.343 0 0 1-.478 0l-.875-.857c-3.686-3.607-9.662-3.607-13.348 0l-.937.918a.343.343 0 0 1-.479 0l-2.175-2.13a.652.652 0 0 1 0-.936l.698-.683Zm23.633 4.403 1.935 1.895a.652.652 0 0 1 0 .936l-8.73 8.543a.687.687 0 0 1-.956 0L20.37 17.64a.172.172 0 0 0-.239 0l-6.195 6.063a.687.687 0 0 1-.957 0l-8.73-8.543a.652.652 0 0 1 0-.936l1.936-1.895a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .239 0l6.195-6.064a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .24 0l6.195-6.064a.687.687 0 0 1 .956 0ZM48.093 20.948l2.338-9.355c.139-.515.258-1.07.416-1.942.12.872.258 1.427.357 1.942l2.022 9.355h4.181l3.528-13.874h-3.21l-1.943 8.523a24.825 24.825 0 0 0-.456 2.457c-.158-.931-.317-1.625-.495-2.438l-1.883-8.542h-4.201l-2.042 8.542a41.204 41.204 0 0 0-.475 2.438 41.208 41.208 0 0 0-.476-2.438l-1.903-8.542h-3.349l3.508 13.874h4.083ZM63.33 21.304c1.585 0 2.596-.654 3.11-1.605-.059.297-.078.595-.078.892v.357h2.655V15.22c0-2.735-1.248-4.32-4.3-4.32-2.636 0-4.36 1.466-4.52 3.487h2.914c.1-.891.734-1.426 1.705-1.426.911 0 1.407.515 1.407 1.11 0 .435-.258.693-1.03.792l-1.388.159c-2.061.257-3.825 1.01-3.825 3.19 0 1.982 1.645 3.092 3.35 3.092Zm.891-2.041c-.773 0-1.348-.436-1.348-1.19 0-.733.655-1.09 1.645-1.268l.674-.119c.575-.118.892-.218 1.09-.396v.912c0 1.228-.892 2.06-2.06 2.06ZM70.398 7.074v13.874h2.874V7.074h-2.874ZM74.934 7.074v13.874h2.874V7.074h-2.874ZM84.08 21.304c2.735 0 4.5-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922H81.92ZM94.92 21.146c.633 0 1.248-.1 1.525-.179v-2.18c-.218.04-.475.06-.693.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.338v-2.24h-2.338V7.788H91.47v3.448H89.37v2.24h2.1v4.201c0 2.3 1.15 3.469 3.45 3.469ZM104.62 21.304c3.924 0 6.302-2.299 6.599-5.608h-3.111c-.238 1.803-1.506 3.032-3.369 3.032-2.2 0-3.746-1.784-3.746-4.796 0-2.953 1.605-4.638 3.805-4.638 1.883 0 2.953 1.15 3.171 2.834h3.191c-.317-3.448-2.854-5.41-6.342-5.41-3.984 0-7.036 2.695-7.036 7.214 0 4.677 2.676 7.372 6.838 7.372ZM117.449 21.304c2.993 0 5.114-1.882 5.114-5.172 0-3.23-2.121-5.233-5.114-5.233-2.972 0-5.093 2.002-5.093 5.233 0 3.29 2.101 5.172 5.093 5.172Zm0-2.22c-1.327 0-2.18-1.09-2.18-2.952 0-1.903.892-2.973 2.18-2.973 1.308 0 2.2 1.07 2.2 2.973 0 1.862-.872 2.953-2.2 2.953ZM126.569 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.229-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM137.464 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.228-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM149.949 21.304c2.735 0 4.499-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922h-3.984ZM160.876 21.304c3.013 0 4.658-1.645 4.975-4.201h-2.874c-.099 1.07-.713 1.982-2.001 1.982-1.309 0-2.2-1.21-2.2-2.993 0-1.942 1.03-2.933 2.259-2.933 1.209 0 1.803.872 1.883 1.882h2.873c-.218-2.358-1.823-4.142-4.776-4.142-2.874 0-5.153 1.903-5.153 5.193 0 3.25 1.923 5.212 5.014 5.212ZM172.067 21.146c.634 0 1.248-.1 1.526-.179v-2.18c-.218.04-.476.06-.694.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.339v-2.24h-2.339V7.788h-2.854v3.448h-2.1v2.24h2.1v4.201c0 2.3 1.15 3.469 3.449 3.469Z" fill="#fff"/></svg>`, WALLET_CONNECT_ICON: b`<svg width="28" height="20" viewBox="0 0 28 20"><g clip-path="url(#a)"><path d="M7.386 6.482c3.653-3.576 9.575-3.576 13.228 0l.44.43a.451.451 0 0 1 0 .648L19.55 9.033a.237.237 0 0 1-.33 0l-.606-.592c-2.548-2.496-6.68-2.496-9.228 0l-.648.634a.237.237 0 0 1-.33 0L6.902 7.602a.451.451 0 0 1 0-.647l.483-.473Zm16.338 3.046 1.339 1.31a.451.451 0 0 1 0 .648l-6.035 5.909a.475.475 0 0 1-.662 0L14.083 13.2a.119.119 0 0 0-.166 0l-4.283 4.194a.475.475 0 0 1-.662 0l-6.035-5.91a.451.451 0 0 1 0-.647l1.338-1.31a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0Z" fill="#000000"/></g><defs><clipPath id="a"><path fill="#ffffff" d="M0 0h28v20H0z"/></clipPath></defs></svg>`, WALLET_CONNECT_ICON_COLORED: b`<svg width="96" height="96" fill="none"><path fill="#fff" d="M25.322 33.597c12.525-12.263 32.83-12.263 45.355 0l1.507 1.476a1.547 1.547 0 0 1 0 2.22l-5.156 5.048a.814.814 0 0 1-1.134 0l-2.074-2.03c-8.737-8.555-22.903-8.555-31.64 0l-2.222 2.175a.814.814 0 0 1-1.134 0l-5.156-5.049a1.547 1.547 0 0 1 0-2.22l1.654-1.62Zm56.019 10.44 4.589 4.494a1.547 1.547 0 0 1 0 2.22l-20.693 20.26a1.628 1.628 0 0 1-2.267 0L48.283 56.632a.407.407 0 0 0-.567 0L33.03 71.012a1.628 1.628 0 0 1-2.268 0L10.07 50.75a1.547 1.547 0 0 1 0-2.22l4.59-4.494a1.628 1.628 0 0 1 2.267 0l14.687 14.38c.156.153.41.153.567 0l14.685-14.38a1.628 1.628 0 0 1 2.268 0l14.687 14.38c.156.153.41.153.567 0l14.686-14.38a1.628 1.628 0 0 1 2.268 0Z"/><path stroke="#000" d="M25.672 33.954c12.33-12.072 32.325-12.072 44.655 0l1.508 1.476a1.047 1.047 0 0 1 0 1.506l-5.157 5.048a.314.314 0 0 1-.434 0l-2.074-2.03c-8.932-8.746-23.409-8.746-32.34 0l-2.222 2.174a.314.314 0 0 1-.434 0l-5.157-5.048a1.047 1.047 0 0 1 0-1.506l1.655-1.62Zm55.319 10.44 4.59 4.494a1.047 1.047 0 0 1 0 1.506l-20.694 20.26a1.128 1.128 0 0 1-1.568 0l-14.686-14.38a.907.907 0 0 0-1.267 0L32.68 70.655a1.128 1.128 0 0 1-1.568 0L10.42 50.394a1.047 1.047 0 0 1 0-1.506l4.59-4.493a1.128 1.128 0 0 1 1.567 0l14.687 14.379a.907.907 0 0 0 1.266 0l-.35-.357.35.357 14.686-14.38a1.128 1.128 0 0 1 1.568 0l14.687 14.38a.907.907 0 0 0 1.267 0l14.686-14.38a1.128 1.128 0 0 1 1.568 0Z"/></svg>`, BACK_ICON: b`<svg width="10" height="18" viewBox="0 0 10 18"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.735.179a.75.75 0 0 1 .087 1.057L2.92 8.192a1.25 1.25 0 0 0 0 1.617l5.902 6.956a.75.75 0 1 1-1.144.97L1.776 10.78a2.75 2.75 0 0 1 0-3.559L7.678.265A.75.75 0 0 1 8.735.18Z" fill="#fff"/></svg>`, COPY_ICON: b`<svg width="24" height="24" fill="none"><path fill="#fff" fill-rule="evenodd" d="M7.01 7.01c.03-1.545.138-2.5.535-3.28A5 5 0 0 1 9.73 1.545C10.8 1 12.2 1 15 1c2.8 0 4.2 0 5.27.545a5 5 0 0 1 2.185 2.185C23 4.8 23 6.2 23 9c0 2.8 0 4.2-.545 5.27a5 5 0 0 1-2.185 2.185c-.78.397-1.735.505-3.28.534l-.001.01c-.03 1.54-.138 2.493-.534 3.27a5 5 0 0 1-2.185 2.186C13.2 23 11.8 23 9 23c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C1 19.2 1 17.8 1 15c0-2.8 0-4.2.545-5.27A5 5 0 0 1 3.73 7.545C4.508 7.149 5.46 7.04 7 7.01h.01ZM15 15.5c-1.425 0-2.403-.001-3.162-.063-.74-.06-1.139-.172-1.427-.319a3.5 3.5 0 0 1-1.53-1.529c-.146-.288-.257-.686-.318-1.427C8.501 11.403 8.5 10.425 8.5 9c0-1.425.001-2.403.063-3.162.06-.74.172-1.139.318-1.427a3.5 3.5 0 0 1 1.53-1.53c.288-.146.686-.257 1.427-.318.759-.062 1.737-.063 3.162-.063 1.425 0 2.403.001 3.162.063.74.06 1.139.172 1.427.318a3.5 3.5 0 0 1 1.53 1.53c.146.288.257.686.318 1.427.062.759.063 1.737.063 3.162 0 1.425-.001 2.403-.063 3.162-.06.74-.172 1.139-.319 1.427a3.5 3.5 0 0 1-1.529 1.53c-.288.146-.686.257-1.427.318-.759.062-1.737.063-3.162.063ZM7 8.511c-.444.009-.825.025-1.162.052-.74.06-1.139.172-1.427.318a3.5 3.5 0 0 0-1.53 1.53c-.146.288-.257.686-.318 1.427-.062.759-.063 1.737-.063 3.162 0 1.425.001 2.403.063 3.162.06.74.172 1.139.318 1.427a3.5 3.5 0 0 0 1.53 1.53c.288.146.686.257 1.427.318.759.062 1.737.063 3.162.063 1.425 0 2.403-.001 3.162-.063.74-.06 1.139-.172 1.427-.319a3.5 3.5 0 0 0 1.53-1.53c.146-.287.257-.685.318-1.426.027-.337.043-.718.052-1.162H15c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C7 13.2 7 11.8 7 9v-.489Z" clip-rule="evenodd"/></svg>`, RETRY_ICON: b`<svg width="15" height="16" viewBox="0 0 15 16"><path d="M6.464 2.03A.75.75 0 0 0 5.403.97L2.08 4.293a1 1 0 0 0 0 1.414L5.403 9.03a.75.75 0 0 0 1.06-1.06L4.672 6.177a.25.25 0 0 1 .177-.427h2.085a4 4 0 1 1-3.93 4.746c-.077-.407-.405-.746-.82-.746-.414 0-.755.338-.7.748a5.501 5.501 0 1 0 5.45-6.248H4.848a.25.25 0 0 1-.177-.427L6.464 2.03Z" fill="#fff"/></svg>`, DESKTOP_ICON: b`<svg width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 5.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C2.204 1 3.13 1 4.98 1h6.04c1.85 0 2.775 0 3.466.394a3 3 0 0 1 1.12 1.12C16 3.204 16 4.13 16 5.98v1.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C13.796 12 12.87 12 11.02 12H4.98c-1.85 0-2.775 0-3.466-.394a3 3 0 0 1-1.12-1.12C0 9.796 0 8.87 0 7.02V5.98ZM4.98 2.5h6.04c.953 0 1.568.001 2.034.043.446.04.608.108.69.154a1.5 1.5 0 0 1 .559.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033v1.04c0 .952-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.046-.243.114-.69.154-.466.042-1.08.043-2.033.043H4.98c-.952 0-1.568-.001-2.034-.043-.446-.04-.608-.108-.69-.154a1.5 1.5 0 0 1-.559-.56c-.046-.08-.114-.243-.154-.69-.042-.465-.043-1.08-.043-2.033V5.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.046.243-.114.69-.154.465-.042 1.08-.043 2.033-.043Z" fill="#fff"/><path d="M4 14.25a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`, MOBILE_ICON: b`<svg width="16" height="16" viewBox="0 0 16 16"><path d="M6.75 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3 4.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C5.204 0 6.136 0 8 0s2.795 0 3.486.394a3 3 0 0 1 1.12 1.12C13 2.204 13 3.13 13 4.98v6.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C10.796 16 9.864 16 8 16s-2.795 0-3.486-.394a3 3 0 0 1-1.12-1.12C3 13.796 3 12.87 3 11.02V4.98Zm8.5 0v6.04c0 .953-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.045-.242.113-.693.154-.47.042-1.091.043-2.05.043-.959 0-1.58-.001-2.05-.043-.45-.04-.613-.109-.693-.154a1.5 1.5 0 0 1-.56-.56c-.046-.08-.114-.243-.154-.69-.042-.466-.043-1.08-.043-2.033V4.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.045.243-.113.693-.154C6.42 1.501 7.041 1.5 8 1.5c.959 0 1.58.001 2.05.043.45.04.613.109.693.154a1.5 1.5 0 0 1 .56.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033Z" fill="#fff"/></svg>`, ARROW_DOWN_ICON: b`<svg width="14" height="14" viewBox="0 0 14 14"><path d="M2.28 7.47a.75.75 0 0 0-1.06 1.06l5.25 5.25a.75.75 0 0 0 1.06 0l5.25-5.25a.75.75 0 0 0-1.06-1.06l-3.544 3.543a.25.25 0 0 1-.426-.177V.75a.75.75 0 0 0-1.5 0v10.086a.25.25 0 0 1-.427.176L2.28 7.47Z" fill="#fff"/></svg>`, ARROW_UP_RIGHT_ICON: b`<svg width="15" height="14" fill="none"><path d="M4.5 1.75A.75.75 0 0 1 5.25 1H12a1.5 1.5 0 0 1 1.5 1.5v6.75a.75.75 0 0 1-1.5 0V4.164a.25.25 0 0 0-.427-.176L4.061 11.5A.75.75 0 0 1 3 10.44l7.513-7.513a.25.25 0 0 0-.177-.427H5.25a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`, ARROW_RIGHT_ICON: b`<svg width="6" height="14" viewBox="0 0 6 14"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.181 1.099a.75.75 0 0 1 1.024.279l2.433 4.258a2.75 2.75 0 0 1 0 2.729l-2.433 4.257a.75.75 0 1 1-1.303-.744L4.335 7.62a1.25 1.25 0 0 0 0-1.24L1.902 2.122a.75.75 0 0 1 .28-1.023Z" fill="#fff"/></svg>`, QRCODE_ICON: b`<svg width="25" height="24" viewBox="0 0 25 24"><path d="M23.748 9a.748.748 0 0 0 .748-.752c-.018-2.596-.128-4.07-.784-5.22a6 6 0 0 0-2.24-2.24c-1.15-.656-2.624-.766-5.22-.784a.748.748 0 0 0-.752.748c0 .414.335.749.748.752 1.015.007 1.82.028 2.494.088.995.09 1.561.256 1.988.5.7.398 1.28.978 1.679 1.678.243.427.41.993.498 1.988.061.675.082 1.479.09 2.493a.753.753 0 0 0 .75.749ZM3.527.788C4.677.132 6.152.022 8.747.004A.748.748 0 0 1 9.5.752a.753.753 0 0 1-.749.752c-1.014.007-1.818.028-2.493.088-.995.09-1.561.256-1.988.5-.7.398-1.28.978-1.679 1.678-.243.427-.41.993-.499 1.988-.06.675-.081 1.479-.088 2.493A.753.753 0 0 1 1.252 9a.748.748 0 0 1-.748-.752c.018-2.596.128-4.07.784-5.22a6 6 0 0 1 2.24-2.24ZM1.252 15a.748.748 0 0 0-.748.752c.018 2.596.128 4.07.784 5.22a6 6 0 0 0 2.24 2.24c1.15.656 2.624.766 5.22.784a.748.748 0 0 0 .752-.748.753.753 0 0 0-.749-.752c-1.014-.007-1.818-.028-2.493-.089-.995-.089-1.561-.255-1.988-.498a4.5 4.5 0 0 1-1.679-1.68c-.243-.426-.41-.992-.499-1.987-.06-.675-.081-1.479-.088-2.493A.753.753 0 0 0 1.252 15ZM22.996 15.749a.753.753 0 0 1 .752-.749c.415 0 .751.338.748.752-.018 2.596-.128 4.07-.784 5.22a6 6 0 0 1-2.24 2.24c-1.15.656-2.624.766-5.22.784a.748.748 0 0 1-.752-.748c0-.414.335-.749.748-.752 1.015-.007 1.82-.028 2.494-.089.995-.089 1.561-.255 1.988-.498a4.5 4.5 0 0 0 1.679-1.68c.243-.426.41-.992.498-1.987.061-.675.082-1.479.09-2.493Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 4a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 11h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 4H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1ZM13.5 6.5A2.5 2.5 0 0 1 16 4h2a2.5 2.5 0 0 1 2.5 2.5v2A2.5 2.5 0 0 1 18 11h-2a2.5 2.5 0 0 1-2.5-2.5v-2Zm2.5-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1ZM7 13a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 20h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 13H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1Z" fill="#fff"/><path d="M13.5 15.5c0-.465 0-.697.038-.89a2 2 0 0 1 1.572-1.572C15.303 13 15.535 13 16 13v2.5h-2.5ZM18 13c.465 0 .697 0 .89.038a2 2 0 0 1 1.572 1.572c.038.193.038.425.038.89H18V13ZM18 17.5h2.5c0 .465 0 .697-.038.89a2 2 0 0 1-1.572 1.572C18.697 20 18.465 20 18 20v-2.5ZM13.5 17.5H16V20c-.465 0-.697 0-.89-.038a2 2 0 0 1-1.572-1.572c-.038-.193-.038-.425-.038-.89Z" fill="#fff"/></svg>`, SCAN_ICON: b`<svg width="16" height="16" fill="none"><path fill="#fff" d="M10 15.216c0 .422.347.763.768.74 1.202-.064 2.025-.222 2.71-.613a5.001 5.001 0 0 0 1.865-1.866c.39-.684.549-1.507.613-2.709a.735.735 0 0 0-.74-.768.768.768 0 0 0-.76.732c-.009.157-.02.306-.032.447-.073.812-.206 1.244-.384 1.555-.31.545-.761.996-1.306 1.306-.311.178-.743.311-1.555.384-.141.013-.29.023-.447.032a.768.768 0 0 0-.732.76ZM10 .784c0 .407.325.737.732.76.157.009.306.02.447.032.812.073 1.244.206 1.555.384a3.5 3.5 0 0 1 1.306 1.306c.178.311.311.743.384 1.555.013.142.023.29.032.447a.768.768 0 0 0 .76.732.734.734 0 0 0 .74-.768c-.064-1.202-.222-2.025-.613-2.71A5 5 0 0 0 13.477.658c-.684-.39-1.507-.549-2.709-.613a.735.735 0 0 0-.768.74ZM5.232.044A.735.735 0 0 1 6 .784a.768.768 0 0 1-.732.76c-.157.009-.305.02-.447.032-.812.073-1.244.206-1.555.384A3.5 3.5 0 0 0 1.96 3.266c-.178.311-.311.743-.384 1.555-.013.142-.023.29-.032.447A.768.768 0 0 1 .784 6a.735.735 0 0 1-.74-.768c.064-1.202.222-2.025.613-2.71A5 5 0 0 1 2.523.658C3.207.267 4.03.108 5.233.044ZM5.268 14.456a.768.768 0 0 1 .732.76.734.734 0 0 1-.768.74c-1.202-.064-2.025-.222-2.71-.613a5 5 0 0 1-1.865-1.866c-.39-.684-.549-1.507-.613-2.709A.735.735 0 0 1 .784 10c.407 0 .737.325.76.732.009.157.02.306.032.447.073.812.206 1.244.384 1.555a3.5 3.5 0 0 0 1.306 1.306c.311.178.743.311 1.555.384.142.013.29.023.447.032Z"/></svg>`, CHECKMARK_ICON: b`<svg width="13" height="12" viewBox="0 0 13 12"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.155.132a.75.75 0 0 1 .232 1.035L5.821 11.535a1 1 0 0 1-1.626.09L.665 7.21a.75.75 0 1 1 1.17-.937L4.71 9.867a.25.25 0 0 0 .406-.023L11.12.364a.75.75 0 0 1 1.035-.232Z" fill="#fff"/></svg>`, SEARCH_ICON: b`<svg width="20" height="21"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.432 13.992c-.354-.353-.91-.382-1.35-.146a5.5 5.5 0 1 1 2.265-2.265c-.237.441-.208.997.145 1.35l3.296 3.296a.75.75 0 1 1-1.06 1.061l-3.296-3.296Zm.06-5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z" fill="#949E9E"/></svg>`, WALLET_PLACEHOLDER: b`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#q)"><path id="wallet-placeholder-fill" fill="#fff" d="M0 24.9c0-9.251 0-13.877 1.97-17.332a15 15 0 0 1 5.598-5.597C11.023 0 15.648 0 24.9 0h10.2c9.252 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.023 60 15.648 60 24.9v10.2c0 9.252 0 13.877-1.97 17.332a15.001 15.001 0 0 1-5.598 5.597C48.977 60 44.352 60 35.1 60H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.352 0 35.1V24.9Z"/><path id="wallet-placeholder-dash" stroke="#000" stroke-dasharray="4 4" stroke-width="1.5" d="M.04 41.708a231.598 231.598 0 0 1-.039-4.403l.75-.001L.75 35.1v-2.55H0v-5.1h.75V24.9l.001-2.204h-.75c.003-1.617.011-3.077.039-4.404l.75.016c.034-1.65.099-3.08.218-4.343l-.746-.07c.158-1.678.412-3.083.82-4.316l.713.236c.224-.679.497-1.296.827-1.875a14.25 14.25 0 0 1 1.05-1.585L3.076 5.9A15 15 0 0 1 5.9 3.076l.455.596a14.25 14.25 0 0 1 1.585-1.05c.579-.33 1.196-.603 1.875-.827l-.236-.712C10.812.674 12.217.42 13.895.262l.07.746C15.23.89 16.66.824 18.308.79l-.016-.75C19.62.012 21.08.004 22.695.001l.001.75L24.9.75h2.55V0h5.1v.75h2.55l2.204.001v-.75c1.617.003 3.077.011 4.404.039l-.016.75c1.65.034 3.08.099 4.343.218l.07-.746c1.678.158 3.083.412 4.316.82l-.236.713c.679.224 1.296.497 1.875.827a14.24 14.24 0 0 1 1.585 1.05l.455-.596A14.999 14.999 0 0 1 56.924 5.9l-.596.455c.384.502.735 1.032 1.05 1.585.33.579.602 1.196.827 1.875l.712-.236c.409 1.233.663 2.638.822 4.316l-.747.07c.119 1.264.184 2.694.218 4.343l.75-.016c.028 1.327.036 2.787.039 4.403l-.75.001.001 2.204v2.55H60v5.1h-.75v2.55l-.001 2.204h.75a231.431 231.431 0 0 1-.039 4.404l-.75-.016c-.034 1.65-.099 3.08-.218 4.343l.747.07c-.159 1.678-.413 3.083-.822 4.316l-.712-.236a10.255 10.255 0 0 1-.827 1.875 14.242 14.242 0 0 1-1.05 1.585l.596.455a14.997 14.997 0 0 1-2.824 2.824l-.455-.596c-.502.384-1.032.735-1.585 1.05-.579.33-1.196.602-1.875.827l.236.712c-1.233.409-2.638.663-4.316.822l-.07-.747c-1.264.119-2.694.184-4.343.218l.016.75c-1.327.028-2.787.036-4.403.039l-.001-.75-2.204.001h-2.55V60h-5.1v-.75H24.9l-2.204-.001v.75a231.431 231.431 0 0 1-4.404-.039l.016-.75c-1.65-.034-3.08-.099-4.343-.218l-.07.747c-1.678-.159-3.083-.413-4.316-.822l.236-.712a10.258 10.258 0 0 1-1.875-.827 14.252 14.252 0 0 1-1.585-1.05l-.455.596A14.999 14.999 0 0 1 3.076 54.1l.596-.455a14.24 14.24 0 0 1-1.05-1.585 10.259 10.259 0 0 1-.827-1.875l-.712.236C.674 49.188.42 47.783.262 46.105l.746-.07C.89 44.77.824 43.34.79 41.692l-.75.016Z"/><path fill="#fff" fill-rule="evenodd" d="M35.643 32.145c-.297-.743-.445-1.114-.401-1.275a.42.42 0 0 1 .182-.27c.134-.1.463-.1 1.123-.1.742 0 1.499.046 2.236-.05a6 6 0 0 0 5.166-5.166c.051-.39.051-.855.051-1.784 0-.928 0-1.393-.051-1.783a6 6 0 0 0-5.166-5.165c-.39-.052-.854-.052-1.783-.052h-7.72c-4.934 0-7.401 0-9.244 1.051a8 8 0 0 0-2.985 2.986C16.057 22.28 16.003 24.58 16 29 15.998 31.075 16 33.15 16 35.224A7.778 7.778 0 0 0 23.778 43H28.5c1.394 0 2.09 0 2.67-.116a6 6 0 0 0 4.715-4.714c.115-.58.115-1.301.115-2.744 0-1.31 0-1.964-.114-2.49a4.998 4.998 0 0 0-.243-.792Z" clip-rule="evenodd"/><path fill="#9EA9A9" fill-rule="evenodd" d="M37 18h-7.72c-2.494 0-4.266.002-5.647.126-1.361.122-2.197.354-2.854.728a6.5 6.5 0 0 0-2.425 2.426c-.375.657-.607 1.492-.729 2.853-.11 1.233-.123 2.777-.125 4.867 0 .7 0 1.05.097 1.181.096.13.182.181.343.2.163.02.518-.18 1.229-.581a6.195 6.195 0 0 1 3.053-.8H37c.977 0 1.32-.003 1.587-.038a4.5 4.5 0 0 0 3.874-3.874c.036-.268.039-.611.039-1.588 0-.976-.003-1.319-.038-1.587a4.5 4.5 0 0 0-3.875-3.874C38.32 18.004 37.977 18 37 18Zm-7.364 12.5h-7.414a4.722 4.722 0 0 0-4.722 4.723 6.278 6.278 0 0 0 6.278 6.278H28.5c1.466 0 1.98-.008 2.378-.087a4.5 4.5 0 0 0 3.535-3.536c.08-.397.087-.933.087-2.451 0-1.391-.009-1.843-.08-2.17a3.5 3.5 0 0 0-2.676-2.676c-.328-.072-.762-.08-2.108-.08Z" clip-rule="evenodd"/></g><defs><clipPath id="q"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`, GLOBE_ICON: b`<svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#fff" fill-rule="evenodd" d="M15.5 8a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Zm-2.113.75c.301 0 .535.264.47.558a6.01 6.01 0 0 1-2.867 3.896c-.203.116-.42-.103-.334-.32.409-1.018.691-2.274.797-3.657a.512.512 0 0 1 .507-.477h1.427Zm.47-2.058c.065.294-.169.558-.47.558H11.96a.512.512 0 0 1-.507-.477c-.106-1.383-.389-2.638-.797-3.656-.087-.217.13-.437.333-.32a6.01 6.01 0 0 1 2.868 3.895Zm-4.402.558c.286 0 .515-.24.49-.525-.121-1.361-.429-2.534-.83-3.393-.279-.6-.549-.93-.753-1.112a.535.535 0 0 0-.724 0c-.204.182-.474.513-.754 1.112-.4.859-.708 2.032-.828 3.393a.486.486 0 0 0 .49.525h2.909Zm-5.415 0c.267 0 .486-.21.507-.477.106-1.383.389-2.638.797-3.656.087-.217-.13-.437-.333-.32a6.01 6.01 0 0 0-2.868 3.895c-.065.294.169.558.47.558H4.04ZM2.143 9.308c-.065-.294.169-.558.47-.558H4.04c.267 0 .486.21.507.477.106 1.383.389 2.639.797 3.657.087.217-.13.436-.333.32a6.01 6.01 0 0 1-2.868-3.896Zm3.913-.033a.486.486 0 0 1 .49-.525h2.909c.286 0 .515.24.49.525-.121 1.361-.428 2.535-.83 3.394-.279.6-.549.93-.753 1.112a.535.535 0 0 1-.724 0c-.204-.182-.474-.513-.754-1.112-.4-.859-.708-2.033-.828-3.394Z" clip-rule="evenodd"/></svg>` };
3661
+ var pt = i`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;
3662
+ var gt = Object.defineProperty;
3663
+ var vt = Object.getOwnPropertyDescriptor;
3664
+ var ut = (e8, o7, r4, a4) => {
3665
+ for (var t5 = a4 > 1 ? void 0 : a4 ? vt(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
3666
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
3667
+ return a4 && t5 && gt(o7, r4, t5), t5;
3668
+ };
3669
+ var fe = class extends s4 {
3670
+ render() {
3671
+ return x`<div class="wcm-toolbar-placeholder"></div><div class="wcm-toolbar">${v2.WALLET_CONNECT_LOGO} <button @click="${se.close}">${v2.CROSS_ICON}</button></div>`;
3672
+ }
3673
+ };
3674
+ fe.styles = [h3.globalCss, pt], fe = ut([e4("wcm-modal-backcard")], fe);
3675
+ var bt = i`main{padding:20px;padding-top:0;width:100%}`;
3676
+ var ft = Object.defineProperty;
3677
+ var xt = Object.getOwnPropertyDescriptor;
3678
+ var yt = (e8, o7, r4, a4) => {
3679
+ for (var t5 = a4 > 1 ? void 0 : a4 ? xt(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
3680
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
3681
+ return a4 && t5 && ft(o7, r4, t5), t5;
3682
+ };
3683
+ var xe = class extends s4 {
3684
+ render() {
3685
+ return x`<main><slot></slot></main>`;
3686
+ }
3687
+ };
3688
+ xe.styles = [h3.globalCss, bt], xe = yt([e4("wcm-modal-content")], xe);
3689
+ var $t = i`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;
3690
+ var Ct = Object.defineProperty;
3691
+ var kt = Object.getOwnPropertyDescriptor;
3692
+ var Ot = (e8, o7, r4, a4) => {
3693
+ for (var t5 = a4 > 1 ? void 0 : a4 ? kt(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
3694
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
3695
+ return a4 && t5 && Ct(o7, r4, t5), t5;
3696
+ };
3697
+ var ye = class extends s4 {
3698
+ render() {
3699
+ return x`<footer><slot></slot></footer>`;
3700
+ }
3701
+ };
3702
+ ye.styles = [h3.globalCss, $t], ye = Ot([e4("wcm-modal-footer")], ye);
3703
+ var Wt = i`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;
3704
+ var It = Object.defineProperty;
3705
+ var Et = Object.getOwnPropertyDescriptor;
3706
+ var te2 = (e8, o7, r4, a4) => {
3707
+ for (var t5 = a4 > 1 ? void 0 : a4 ? Et(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
3708
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
3709
+ return a4 && t5 && It(o7, r4, t5), t5;
3710
+ };
3711
+ var S3 = class extends s4 {
3712
+ constructor() {
3713
+ super(...arguments), this.title = "", this.onAction = void 0, this.actionIcon = void 0, this.border = false;
3714
+ }
3715
+ backBtnTemplate() {
3716
+ return x`<button class="wcm-back-btn" @click="${T.goBack}">${v2.BACK_ICON}</button>`;
3717
+ }
3718
+ actionBtnTemplate() {
3719
+ return x`<button class="wcm-action-btn" @click="${this.onAction}">${this.actionIcon}</button>`;
3720
+ }
3721
+ render() {
3722
+ const e8 = { "wcm-border": this.border }, o7 = T.state.history.length > 1, r4 = this.title ? x`<wcm-text variant="big-bold">${this.title}</wcm-text>` : x`<slot></slot>`;
3723
+ return x`<header class="${o6(e8)}">${o7 ? this.backBtnTemplate() : null} ${r4} ${this.onAction ? this.actionBtnTemplate() : null}</header>`;
3724
+ }
3725
+ };
3726
+ S3.styles = [h3.globalCss, Wt], te2([n5()], S3.prototype, "title", 2), te2([n5()], S3.prototype, "onAction", 2), te2([n5()], S3.prototype, "actionIcon", 2), te2([n5({ type: Boolean })], S3.prototype, "border", 2), S3 = te2([e4("wcm-modal-header")], S3);
3727
+ var c3 = { MOBILE_BREAKPOINT: 600, WCM_RECENT_WALLET_DATA: "WCM_RECENT_WALLET_DATA", EXPLORER_WALLET_URL: "https://explorer.walletconnect.com/?type=wallet", getShadowRootElement(e8, o7) {
3728
+ const r4 = e8.renderRoot.querySelector(o7);
3729
+ if (!r4)
3730
+ throw new Error(`${o7} not found`);
3731
+ return r4;
3732
+ }, getWalletIcon({ id: e8, image_id: o7 }) {
3733
+ const { walletImages: r4 } = y.state;
3734
+ return r4 != null && r4[e8] ? r4[e8] : o7 ? te.getWalletImageUrl(o7) : "";
3735
+ }, getWalletName(e8, o7 = false) {
3736
+ return o7 && e8.length > 8 ? `${e8.substring(0, 8)}..` : e8;
3737
+ }, isMobileAnimation() {
3738
+ return window.innerWidth <= c3.MOBILE_BREAKPOINT;
3739
+ }, async preloadImage(e8) {
3740
+ const o7 = new Promise((r4, a4) => {
3741
+ const t5 = new Image();
3742
+ t5.onload = r4, t5.onerror = a4, t5.crossOrigin = "anonymous", t5.src = e8;
3743
+ });
3744
+ return Promise.race([o7, a.wait(3e3)]);
3745
+ }, getErrorMessage(e8) {
3746
+ return e8 instanceof Error ? e8.message : "Unknown Error";
3747
+ }, debounce(e8, o7 = 500) {
3748
+ let r4;
3749
+ return (...a4) => {
3750
+ function t5() {
3751
+ e8(...a4);
3752
+ }
3753
+ r4 && clearTimeout(r4), r4 = setTimeout(t5, o7);
3754
+ };
3755
+ }, handleMobileLinking(e8) {
3756
+ const { walletConnectUri: o7 } = p.state, { mobile: r4, name: a4 } = e8, t5 = r4?.native, l6 = r4?.universal;
3757
+ c3.setRecentWallet(e8);
3758
+ function i5(s5) {
3759
+ let $2 = "";
3760
+ t5 ? $2 = a.formatUniversalUrl(t5, s5, a4) : l6 && ($2 = a.formatNativeUrl(l6, s5, a4)), a.openHref($2, "_self");
3761
+ }
3762
+ o7 && i5(o7);
3763
+ }, handleAndroidLinking() {
3764
+ const { walletConnectUri: e8 } = p.state;
3765
+ e8 && (a.setWalletConnectAndroidDeepLink(e8), a.openHref(e8, "_self"));
3766
+ }, async handleUriCopy() {
3767
+ const { walletConnectUri: e8 } = p.state;
3768
+ if (e8)
3769
+ try {
3770
+ await navigator.clipboard.writeText(e8), oe.openToast("Link copied", "success");
3771
+ } catch {
3772
+ oe.openToast("Failed to copy", "error");
3773
+ }
3774
+ }, getCustomImageUrls() {
3775
+ const { walletImages: e8 } = y.state, o7 = Object.values(e8 ?? {});
3776
+ return Object.values(o7);
3777
+ }, truncate(e8, o7 = 8) {
3778
+ return e8.length <= o7 ? e8 : `${e8.substring(0, 4)}...${e8.substring(e8.length - 4)}`;
3779
+ }, setRecentWallet(e8) {
3780
+ try {
3781
+ localStorage.setItem(c3.WCM_RECENT_WALLET_DATA, JSON.stringify(e8));
3782
+ } catch {
3783
+ }
3784
+ }, getRecentWallet() {
3785
+ try {
3786
+ const e8 = localStorage.getItem(c3.WCM_RECENT_WALLET_DATA);
3787
+ return e8 ? JSON.parse(e8) : void 0;
3788
+ } catch {
3789
+ }
3790
+ }, caseSafeIncludes(e8, o7) {
3791
+ return e8.toUpperCase().includes(o7.toUpperCase());
3792
+ }, openWalletExplorerUrl() {
3793
+ a.openHref(c3.EXPLORER_WALLET_URL, "_blank");
3794
+ }, getCachedRouterWalletPlatforms() {
3795
+ const { desktop: e8, mobile: o7 } = a.getWalletRouterData(), r4 = Boolean(e8?.native), a4 = Boolean(e8?.universal), t5 = Boolean(o7?.native) || Boolean(o7?.universal);
3796
+ return { isDesktop: r4, isMobile: t5, isWeb: a4 };
3797
+ }, goToConnectingView(e8) {
3798
+ T.setData({ Wallet: e8 });
3799
+ const o7 = a.isMobile(), { isDesktop: r4, isWeb: a4, isMobile: t5 } = c3.getCachedRouterWalletPlatforms();
3800
+ o7 ? t5 ? T.push("MobileConnecting") : a4 ? T.push("WebConnecting") : T.push("InstallWallet") : r4 ? T.push("DesktopConnecting") : a4 ? T.push("WebConnecting") : t5 ? T.push("MobileQrcodeConnecting") : T.push("InstallWallet");
3801
+ } };
3802
+ var Mt = i`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;
3803
+ var Lt = Object.defineProperty;
3804
+ var Rt = Object.getOwnPropertyDescriptor;
3805
+ var $e = (e8, o7, r4, a4) => {
3806
+ for (var t5 = a4 > 1 ? void 0 : a4 ? Rt(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
3807
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
3808
+ return a4 && t5 && Lt(o7, r4, t5), t5;
3809
+ };
3810
+ var oe2 = class extends s4 {
3811
+ constructor() {
3812
+ super(), this.view = T.state.view, this.prevView = T.state.view, this.unsubscribe = void 0, this.oldHeight = "0px", this.resizeObserver = void 0, this.unsubscribe = T.subscribe((e8) => {
3813
+ this.view !== e8.view && this.onChangeRoute();
3814
+ });
3815
+ }
3816
+ firstUpdated() {
3817
+ this.resizeObserver = new ResizeObserver(([e8]) => {
3818
+ const o7 = `${e8.contentRect.height}px`;
3819
+ this.oldHeight !== "0px" && animate2(this.routerEl, { height: [this.oldHeight, o7] }, { duration: 0.2 }), this.oldHeight = o7;
3820
+ }), this.resizeObserver.observe(this.contentEl);
3821
+ }
3822
+ disconnectedCallback() {
3823
+ var e8, o7;
3824
+ (e8 = this.unsubscribe) == null || e8.call(this), (o7 = this.resizeObserver) == null || o7.disconnect();
3825
+ }
3826
+ get routerEl() {
3827
+ return c3.getShadowRootElement(this, ".wcm-router");
3828
+ }
3829
+ get contentEl() {
3830
+ return c3.getShadowRootElement(this, ".wcm-content");
3831
+ }
3832
+ viewTemplate() {
3833
+ switch (this.view) {
3834
+ case "ConnectWallet":
3835
+ return x`<wcm-connect-wallet-view></wcm-connect-wallet-view>`;
3836
+ case "DesktopConnecting":
3837
+ return x`<wcm-desktop-connecting-view></wcm-desktop-connecting-view>`;
3838
+ case "MobileConnecting":
3839
+ return x`<wcm-mobile-connecting-view></wcm-mobile-connecting-view>`;
3840
+ case "WebConnecting":
3841
+ return x`<wcm-web-connecting-view></wcm-web-connecting-view>`;
3842
+ case "MobileQrcodeConnecting":
3843
+ return x`<wcm-mobile-qr-connecting-view></wcm-mobile-qr-connecting-view>`;
3844
+ case "WalletExplorer":
3845
+ return x`<wcm-wallet-explorer-view></wcm-wallet-explorer-view>`;
3846
+ case "Qrcode":
3847
+ return x`<wcm-qrcode-view></wcm-qrcode-view>`;
3848
+ case "InstallWallet":
3849
+ return x`<wcm-install-wallet-view></wcm-install-wallet-view>`;
3850
+ default:
3851
+ return x`<div>Not Found</div>`;
3852
+ }
3853
+ }
3854
+ async onChangeRoute() {
3855
+ await animate2(this.routerEl, { opacity: [1, 0], scale: [1, 1.02] }, { duration: 0.15, delay: 0.1 }).finished, this.view = T.state.view, animate2(this.routerEl, { opacity: [0, 1], scale: [0.99, 1] }, { duration: 0.37, delay: 0.05 });
3856
+ }
3857
+ render() {
3858
+ return x`<div class="wcm-router"><div class="wcm-content">${this.viewTemplate()}</div></div>`;
3859
+ }
3860
+ };
3861
+ oe2.styles = [h3.globalCss, Mt], $e([t3()], oe2.prototype, "view", 2), $e([t3()], oe2.prototype, "prevView", 2), oe2 = $e([e4("wcm-modal-router")], oe2);
3862
+ var At = i`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;
3863
+ var Pt = Object.defineProperty;
3864
+ var Tt = Object.getOwnPropertyDescriptor;
3865
+ var ze = (e8, o7, r4, a4) => {
3866
+ for (var t5 = a4 > 1 ? void 0 : a4 ? Tt(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
3867
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
3868
+ return a4 && t5 && Pt(o7, r4, t5), t5;
3869
+ };
3870
+ var ne2 = class extends s4 {
3871
+ constructor() {
3872
+ super(), this.open = false, this.unsubscribe = void 0, this.timeout = void 0, this.unsubscribe = oe.subscribe((e8) => {
3873
+ e8.open ? (this.open = true, this.timeout = setTimeout(() => oe.closeToast(), 2200)) : (this.open = false, clearTimeout(this.timeout));
3874
+ });
3875
+ }
3876
+ disconnectedCallback() {
3877
+ var e8;
3878
+ (e8 = this.unsubscribe) == null || e8.call(this), clearTimeout(this.timeout), oe.closeToast();
3879
+ }
3880
+ render() {
3881
+ const { message: e8, variant: o7 } = oe.state, r4 = { "wcm-success": o7 === "success", "wcm-error": o7 === "error" };
3882
+ return this.open ? x`<div class="${o6(r4)}">${o7 === "success" ? v2.CHECKMARK_ICON : null} ${o7 === "error" ? v2.CROSS_ICON : null}<wcm-text variant="small-regular">${e8}</wcm-text></div>` : null;
3883
+ }
3884
+ };
3885
+ ne2.styles = [h3.globalCss, At], ze([t3()], ne2.prototype, "open", 2), ne2 = ze([e4("wcm-modal-toast")], ne2);
3886
+ var jt = 0.1;
3887
+ var Ve = 2.5;
3888
+ var A2 = 7;
3889
+ function Ce(e8, o7, r4) {
3890
+ return e8 === o7 ? false : (e8 - o7 < 0 ? o7 - e8 : e8 - o7) <= r4 + jt;
3891
+ }
3892
+ function _t(e8, o7) {
3893
+ const r4 = Array.prototype.slice.call(import_qrcode.default.create(e8, { errorCorrectionLevel: o7 }).modules.data, 0), a4 = Math.sqrt(r4.length);
3894
+ return r4.reduce((t5, l6, i5) => (i5 % a4 === 0 ? t5.push([l6]) : t5[t5.length - 1].push(l6)) && t5, []);
3895
+ }
3896
+ var Dt = { generate(e8, o7, r4) {
3897
+ const a4 = "#141414", t5 = "#ffffff", l6 = [], i5 = _t(e8, "Q"), s5 = o7 / i5.length, $2 = [{ x: 0, y: 0 }, { x: 1, y: 0 }, { x: 0, y: 1 }];
3898
+ $2.forEach(({ x: y3, y: u3 }) => {
3899
+ const O = (i5.length - A2) * s5 * y3, b2 = (i5.length - A2) * s5 * u3, E2 = 0.45;
3900
+ for (let M2 = 0; M2 < $2.length; M2 += 1) {
3901
+ const V2 = s5 * (A2 - M2 * 2);
3902
+ l6.push(b`<rect fill="${M2 % 2 === 0 ? a4 : t5}" height="${V2}" rx="${V2 * E2}" ry="${V2 * E2}" width="${V2}" x="${O + s5 * M2}" y="${b2 + s5 * M2}">`);
3903
+ }
3904
+ });
3905
+ const f2 = Math.floor((r4 + 25) / s5), Ne = i5.length / 2 - f2 / 2, Ze = i5.length / 2 + f2 / 2 - 1, Se = [];
3906
+ i5.forEach((y3, u3) => {
3907
+ y3.forEach((O, b2) => {
3908
+ if (i5[u3][b2] && !(u3 < A2 && b2 < A2 || u3 > i5.length - (A2 + 1) && b2 < A2 || u3 < A2 && b2 > i5.length - (A2 + 1)) && !(u3 > Ne && u3 < Ze && b2 > Ne && b2 < Ze)) {
3909
+ const E2 = u3 * s5 + s5 / 2, M2 = b2 * s5 + s5 / 2;
3910
+ Se.push([E2, M2]);
3911
+ }
3912
+ });
3913
+ });
3914
+ const J = {};
3915
+ return Se.forEach(([y3, u3]) => {
3916
+ J[y3] ? J[y3].push(u3) : J[y3] = [u3];
3917
+ }), Object.entries(J).map(([y3, u3]) => {
3918
+ const O = u3.filter((b2) => u3.every((E2) => !Ce(b2, E2, s5)));
3919
+ return [Number(y3), O];
3920
+ }).forEach(([y3, u3]) => {
3921
+ u3.forEach((O) => {
3922
+ l6.push(b`<circle cx="${y3}" cy="${O}" fill="${a4}" r="${s5 / Ve}">`);
3923
+ });
3924
+ }), Object.entries(J).filter(([y3, u3]) => u3.length > 1).map(([y3, u3]) => {
3925
+ const O = u3.filter((b2) => u3.some((E2) => Ce(b2, E2, s5)));
3926
+ return [Number(y3), O];
3927
+ }).map(([y3, u3]) => {
3928
+ u3.sort((b2, E2) => b2 < E2 ? -1 : 1);
3929
+ const O = [];
3930
+ for (const b2 of u3) {
3931
+ const E2 = O.find((M2) => M2.some((V2) => Ce(b2, V2, s5)));
3932
+ E2 ? E2.push(b2) : O.push([b2]);
3933
+ }
3934
+ return [y3, O.map((b2) => [b2[0], b2[b2.length - 1]])];
3935
+ }).forEach(([y3, u3]) => {
3936
+ u3.forEach(([O, b2]) => {
3937
+ l6.push(b`<line x1="${y3}" x2="${y3}" y1="${O}" y2="${b2}" stroke="${a4}" stroke-width="${s5 / (Ve / 2)}" stroke-linecap="round">`);
3938
+ });
3939
+ }), l6;
3940
+ } };
3941
+ var Nt = i`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;
3942
+ var Zt = Object.defineProperty;
3943
+ var St = Object.getOwnPropertyDescriptor;
3944
+ var q = (e8, o7, r4, a4) => {
3945
+ for (var t5 = a4 > 1 ? void 0 : a4 ? St(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
3946
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
3947
+ return a4 && t5 && Zt(o7, r4, t5), t5;
3948
+ };
3949
+ var j = class extends s4 {
3950
+ constructor() {
3951
+ super(...arguments), this.uri = "", this.size = 0, this.imageId = void 0, this.walletId = void 0, this.imageUrl = void 0;
3952
+ }
3953
+ svgTemplate() {
3954
+ const e8 = ne.state.themeMode === "light" ? this.size : this.size - 36;
3955
+ return b`<svg height="${e8}" width="${e8}">${Dt.generate(this.uri, e8, e8 / 4)}</svg>`;
3956
+ }
3957
+ render() {
3958
+ const e8 = { "wcm-dark": ne.state.themeMode === "dark" };
3959
+ return x`<div style="${`width: ${this.size}px`}" class="${o6(e8)}">${this.walletId || this.imageUrl ? x`<wcm-wallet-image walletId="${l5(this.walletId)}" imageId="${l5(this.imageId)}" imageUrl="${l5(this.imageUrl)}"></wcm-wallet-image>` : v2.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}</div>`;
3960
+ }
3961
+ };
3962
+ j.styles = [h3.globalCss, Nt], q([n5()], j.prototype, "uri", 2), q([n5({ type: Number })], j.prototype, "size", 2), q([n5()], j.prototype, "imageId", 2), q([n5()], j.prototype, "walletId", 2), q([n5()], j.prototype, "imageUrl", 2), j = q([e4("wcm-qrcode")], j);
3963
+ var Bt = i`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;
3964
+ var Ut = Object.defineProperty;
3965
+ var Ht = Object.getOwnPropertyDescriptor;
3966
+ var Fe = (e8, o7, r4, a4) => {
3967
+ for (var t5 = a4 > 1 ? void 0 : a4 ? Ht(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
3968
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
3969
+ return a4 && t5 && Ut(o7, r4, t5), t5;
3970
+ };
3971
+ var ce = class extends s4 {
3972
+ constructor() {
3973
+ super(...arguments), this.onChange = () => null;
3974
+ }
3975
+ render() {
3976
+ return x`<input type="text" @input="${this.onChange}" placeholder="Search wallets"> ${v2.SEARCH_ICON}`;
3977
+ }
3978
+ };
3979
+ ce.styles = [h3.globalCss, Bt], Fe([n5()], ce.prototype, "onChange", 2), ce = Fe([e4("wcm-search-input")], ce);
3980
+ var zt = i`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;
3981
+ var Vt = Object.defineProperty;
3982
+ var Ft = Object.getOwnPropertyDescriptor;
3983
+ var qt = (e8, o7, r4, a4) => {
3984
+ for (var t5 = a4 > 1 ? void 0 : a4 ? Ft(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
3985
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
3986
+ return a4 && t5 && Vt(o7, r4, t5), t5;
3987
+ };
3988
+ var ke = class extends s4 {
3989
+ render() {
3990
+ return x`<svg viewBox="0 0 50 50" width="24" height="24"><circle cx="25" cy="25" r="20" fill="none" stroke-width="4" stroke="#fff"/></svg>`;
3991
+ }
3992
+ };
3993
+ ke.styles = [h3.globalCss, zt], ke = qt([e4("wcm-spinner")], ke);
3994
+ var Qt = i`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;
3995
+ var Kt = Object.defineProperty;
3996
+ var Yt = Object.getOwnPropertyDescriptor;
3997
+ var Oe = (e8, o7, r4, a4) => {
3998
+ for (var t5 = a4 > 1 ? void 0 : a4 ? Yt(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
3999
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4000
+ return a4 && t5 && Kt(o7, r4, t5), t5;
4001
+ };
4002
+ var re = class extends s4 {
4003
+ constructor() {
4004
+ super(...arguments), this.variant = "medium-regular", this.color = "primary";
4005
+ }
4006
+ render() {
4007
+ const e8 = { "wcm-big-bold": this.variant === "big-bold", "wcm-medium-regular": this.variant === "medium-regular", "wcm-small-regular": this.variant === "small-regular", "wcm-small-thin": this.variant === "small-thin", "wcm-xsmall-regular": this.variant === "xsmall-regular", "wcm-xsmall-bold": this.variant === "xsmall-bold", "wcm-color-primary": this.color === "primary", "wcm-color-secondary": this.color === "secondary", "wcm-color-tertiary": this.color === "tertiary", "wcm-color-inverse": this.color === "inverse", "wcm-color-accnt": this.color === "accent", "wcm-color-error": this.color === "error" };
4008
+ return x`<span><slot class="${o6(e8)}"></slot></span>`;
4009
+ }
4010
+ };
4011
+ re.styles = [h3.globalCss, Qt], Oe([n5()], re.prototype, "variant", 2), Oe([n5()], re.prototype, "color", 2), re = Oe([e4("wcm-text")], re);
4012
+ var Gt = i`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;
4013
+ var Xt = Object.defineProperty;
4014
+ var Jt = Object.getOwnPropertyDescriptor;
4015
+ var _2 = (e8, o7, r4, a4) => {
4016
+ for (var t5 = a4 > 1 ? void 0 : a4 ? Jt(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4017
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4018
+ return a4 && t5 && Xt(o7, r4, t5), t5;
4019
+ };
4020
+ var L2 = class extends s4 {
4021
+ constructor() {
4022
+ super(...arguments), this.onClick = () => null, this.name = "", this.walletId = "", this.label = void 0, this.imageId = void 0, this.installed = false, this.recent = false;
4023
+ }
4024
+ sublabelTemplate() {
4025
+ return this.recent ? x`<wcm-text class="wcm-sublabel" variant="xsmall-bold" color="tertiary">RECENT</wcm-text>` : this.installed ? x`<wcm-text class="wcm-sublabel" variant="xsmall-bold" color="tertiary">INSTALLED</wcm-text>` : null;
4026
+ }
4027
+ handleClick() {
4028
+ R.click({ name: "WALLET_BUTTON", walletId: this.walletId }), this.onClick();
4029
+ }
4030
+ render() {
4031
+ var e8;
4032
+ return x`<button @click="${this.handleClick.bind(this)}"><div><wcm-wallet-image walletId="${this.walletId}" imageId="${l5(this.imageId)}"></wcm-wallet-image><wcm-text variant="xsmall-regular">${(e8 = this.label) != null ? e8 : c3.getWalletName(this.name, true)}</wcm-text>${this.sublabelTemplate()}</div></button>`;
4033
+ }
4034
+ };
4035
+ L2.styles = [h3.globalCss, Gt], _2([n5()], L2.prototype, "onClick", 2), _2([n5()], L2.prototype, "name", 2), _2([n5()], L2.prototype, "walletId", 2), _2([n5()], L2.prototype, "label", 2), _2([n5()], L2.prototype, "imageId", 2), _2([n5({ type: Boolean })], L2.prototype, "installed", 2), _2([n5({ type: Boolean })], L2.prototype, "recent", 2), L2 = _2([e4("wcm-wallet-button")], L2);
4036
+ var eo = i`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;
4037
+ var to = Object.defineProperty;
4038
+ var oo = Object.getOwnPropertyDescriptor;
4039
+ var se2 = (e8, o7, r4, a4) => {
4040
+ for (var t5 = a4 > 1 ? void 0 : a4 ? oo(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4041
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4042
+ return a4 && t5 && to(o7, r4, t5), t5;
4043
+ };
4044
+ var Q = class extends s4 {
4045
+ constructor() {
4046
+ super(...arguments), this.walletId = "", this.imageId = void 0, this.imageUrl = void 0;
4047
+ }
4048
+ render() {
4049
+ var e8;
4050
+ const o7 = (e8 = this.imageUrl) != null && e8.length ? this.imageUrl : c3.getWalletIcon({ id: this.walletId, image_id: this.imageId });
4051
+ return x`${o7.length ? x`<div><img crossorigin="anonymous" src="${o7}" alt="${this.id}"></div>` : v2.WALLET_PLACEHOLDER}`;
4052
+ }
4053
+ };
4054
+ Q.styles = [h3.globalCss, eo], se2([n5()], Q.prototype, "walletId", 2), se2([n5()], Q.prototype, "imageId", 2), se2([n5()], Q.prototype, "imageUrl", 2), Q = se2([e4("wcm-wallet-image")], Q);
4055
+ var ro = Object.defineProperty;
4056
+ var ao = Object.getOwnPropertyDescriptor;
4057
+ var qe = (e8, o7, r4, a4) => {
4058
+ for (var t5 = a4 > 1 ? void 0 : a4 ? ao(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4059
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4060
+ return a4 && t5 && ro(o7, r4, t5), t5;
4061
+ };
4062
+ var We = class extends s4 {
4063
+ constructor() {
4064
+ super(), this.preload = true, this.preloadData();
4065
+ }
4066
+ async loadImages(e8) {
4067
+ try {
4068
+ e8 != null && e8.length && await Promise.all(e8.map(async (o7) => c3.preloadImage(o7)));
4069
+ } catch {
4070
+ }
4071
+ }
4072
+ async preloadListings() {
4073
+ if (y.state.enableExplorer) {
4074
+ await te.getRecomendedWallets(), p.setIsDataLoaded(true);
4075
+ const { recomendedWallets: e8 } = te.state, o7 = e8.map((r4) => c3.getWalletIcon(r4));
4076
+ await this.loadImages(o7);
4077
+ } else
4078
+ p.setIsDataLoaded(true);
4079
+ }
4080
+ async preloadCustomImages() {
4081
+ const e8 = c3.getCustomImageUrls();
4082
+ await this.loadImages(e8);
4083
+ }
4084
+ async preloadData() {
4085
+ try {
4086
+ this.preload && (this.preload = false, await Promise.all([this.preloadListings(), this.preloadCustomImages()]));
4087
+ } catch (e8) {
4088
+ oe.openToast("Failed preloading", "error");
4089
+ }
4090
+ }
4091
+ };
4092
+ qe([t3()], We.prototype, "preload", 2), We = qe([e4("wcm-explorer-context")], We);
4093
+ var lo = Object.defineProperty;
4094
+ var io = Object.getOwnPropertyDescriptor;
4095
+ var no = (e8, o7, r4, a4) => {
4096
+ for (var t5 = a4 > 1 ? void 0 : a4 ? io(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4097
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4098
+ return a4 && t5 && lo(o7, r4, t5), t5;
4099
+ };
4100
+ var Qe = class extends s4 {
4101
+ constructor() {
4102
+ super(), this.unsubscribeTheme = void 0, h3.setTheme(), this.unsubscribeTheme = ne.subscribe(h3.setTheme);
4103
+ }
4104
+ disconnectedCallback() {
4105
+ var e8;
4106
+ (e8 = this.unsubscribeTheme) == null || e8.call(this);
4107
+ }
4108
+ };
4109
+ Qe = no([e4("wcm-theme-context")], Qe);
4110
+ var co = i`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;
4111
+ var so = Object.defineProperty;
4112
+ var mo = Object.getOwnPropertyDescriptor;
4113
+ var ho = (e8, o7, r4, a4) => {
4114
+ for (var t5 = a4 > 1 ? void 0 : a4 ? mo(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4115
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4116
+ return a4 && t5 && so(o7, r4, t5), t5;
4117
+ };
4118
+ var Ie = class extends s4 {
4119
+ onGoToQrcode() {
4120
+ T.push("Qrcode");
4121
+ }
4122
+ render() {
4123
+ const { recomendedWallets: e8 } = te.state, o7 = [...e8, ...e8], r4 = a.RECOMMENDED_WALLET_AMOUNT * 2;
4124
+ return x`<wcm-modal-header title="Connect your wallet" .onAction="${this.onGoToQrcode}" .actionIcon="${v2.QRCODE_ICON}"></wcm-modal-header><wcm-modal-content><div class="wcm-title">${v2.MOBILE_ICON}<wcm-text variant="small-regular" color="accent">WalletConnect</wcm-text></div><div class="wcm-slider"><div class="wcm-track">${[...Array(r4)].map((a4, t5) => {
4125
+ const l6 = o7[t5 % o7.length];
4126
+ return l6 ? x`<wcm-wallet-image walletId="${l6.id}" imageId="${l6.image_id}"></wcm-wallet-image>` : v2.WALLET_PLACEHOLDER;
4127
+ })}</div><wcm-button-big @click="${c3.handleAndroidLinking}"><wcm-text variant="medium-regular" color="inverse">Select Wallet</wcm-text></wcm-button-big></div></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">Choose WalletConnect to see supported apps on your device</wcm-text></wcm-info-footer>`;
4128
+ }
4129
+ };
4130
+ Ie.styles = [h3.globalCss, co], Ie = ho([e4("wcm-android-wallet-selection")], Ie);
4131
+ var wo = i`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;
4132
+ var po = Object.defineProperty;
4133
+ var go = Object.getOwnPropertyDescriptor;
4134
+ var K = (e8, o7, r4, a4) => {
4135
+ for (var t5 = a4 > 1 ? void 0 : a4 ? go(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4136
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4137
+ return a4 && t5 && po(o7, r4, t5), t5;
4138
+ };
4139
+ var D2 = class extends s4 {
4140
+ constructor() {
4141
+ super(...arguments), this.walletId = void 0, this.imageId = void 0, this.isError = false, this.isStale = false, this.label = "";
4142
+ }
4143
+ svgLoaderTemplate() {
4144
+ var e8, o7;
4145
+ const r4 = (o7 = (e8 = ne.state.themeVariables) == null ? void 0 : e8["--wcm-wallet-icon-large-border-radius"]) != null ? o7 : h3.getPreset("--wcm-wallet-icon-large-border-radius");
4146
+ let a4 = 0;
4147
+ r4.includes("%") ? a4 = 88 / 100 * parseInt(r4, 10) : a4 = parseInt(r4, 10), a4 *= 1.17;
4148
+ const t5 = 317 - a4 * 1.57, l6 = 425 - a4 * 1.8;
4149
+ return x`<svg viewBox="0 0 110 110" width="110" height="110"><rect id="wcm-loader" x="2" y="2" width="106" height="106" rx="${a4}"/><use xlink:href="#wcm-loader" stroke-dasharray="106 ${t5}" stroke-dashoffset="${l6}"></use></svg>`;
4150
+ }
4151
+ render() {
4152
+ const e8 = { "wcm-error": this.isError, "wcm-stale": this.isStale };
4153
+ return x`<div class="${o6(e8)}">${this.svgLoaderTemplate()}<wcm-wallet-image walletId="${l5(this.walletId)}" imageId="${l5(this.imageId)}"></wcm-wallet-image></div><wcm-text variant="medium-regular" color="${this.isError ? "error" : "primary"}">${this.isError ? "Connection declined" : this.label}</wcm-text>`;
4154
+ }
4155
+ };
4156
+ D2.styles = [h3.globalCss, wo], K([n5()], D2.prototype, "walletId", 2), K([n5()], D2.prototype, "imageId", 2), K([n5({ type: Boolean })], D2.prototype, "isError", 2), K([n5({ type: Boolean })], D2.prototype, "isStale", 2), K([n5()], D2.prototype, "label", 2), D2 = K([e4("wcm-connector-waiting")], D2);
4157
+ var G = { manualWallets() {
4158
+ var e8, o7;
4159
+ const { mobileWallets: r4, desktopWallets: a4 } = y.state, t5 = (e8 = G.recentWallet()) == null ? void 0 : e8.id, l6 = a.isMobile() ? r4 : a4, i5 = l6?.filter((s5) => t5 !== s5.id);
4160
+ return (o7 = a.isMobile() ? i5?.map(({ id: s5, name: $2, links: f2 }) => ({ id: s5, name: $2, mobile: f2, links: f2 })) : i5?.map(({ id: s5, name: $2, links: f2 }) => ({ id: s5, name: $2, desktop: f2, links: f2 }))) != null ? o7 : [];
4161
+ }, recentWallet() {
4162
+ return c3.getRecentWallet();
4163
+ }, recomendedWallets(e8 = false) {
4164
+ var o7;
4165
+ const r4 = e8 || (o7 = G.recentWallet()) == null ? void 0 : o7.id, { recomendedWallets: a4 } = te.state;
4166
+ return a4.filter((t5) => r4 !== t5.id);
4167
+ } };
4168
+ var Z2 = { onConnecting(e8) {
4169
+ c3.goToConnectingView(e8);
4170
+ }, manualWalletsTemplate() {
4171
+ return G.manualWallets().map((e8) => x`<wcm-wallet-button walletId="${e8.id}" name="${e8.name}" .onClick="${() => this.onConnecting(e8)}"></wcm-wallet-button>`);
4172
+ }, recomendedWalletsTemplate(e8 = false) {
4173
+ return G.recomendedWallets(e8).map((o7) => x`<wcm-wallet-button name="${o7.name}" walletId="${o7.id}" imageId="${o7.image_id}" .onClick="${() => this.onConnecting(o7)}"></wcm-wallet-button>`);
4174
+ }, recentWalletTemplate() {
4175
+ const e8 = G.recentWallet();
4176
+ if (e8)
4177
+ return x`<wcm-wallet-button name="${e8.name}" walletId="${e8.id}" imageId="${l5(e8.image_id)}" .recent="${true}" .onClick="${() => this.onConnecting(e8)}"></wcm-wallet-button>`;
4178
+ } };
4179
+ var vo = i`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;
4180
+ var uo = Object.defineProperty;
4181
+ var bo = Object.getOwnPropertyDescriptor;
4182
+ var fo = (e8, o7, r4, a4) => {
4183
+ for (var t5 = a4 > 1 ? void 0 : a4 ? bo(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4184
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4185
+ return a4 && t5 && uo(o7, r4, t5), t5;
4186
+ };
4187
+ var Ee = class extends s4 {
4188
+ render() {
4189
+ const { explorerExcludedWalletIds: e8, enableExplorer: o7 } = y.state, r4 = e8 !== "ALL" && o7, a4 = Z2.manualWalletsTemplate(), t5 = Z2.recomendedWalletsTemplate();
4190
+ let l6 = [Z2.recentWalletTemplate(), ...a4, ...t5];
4191
+ l6 = l6.filter(Boolean);
4192
+ const i5 = l6.length > 4 || r4;
4193
+ let s5 = [];
4194
+ i5 ? s5 = l6.slice(0, 3) : s5 = l6;
4195
+ const $2 = Boolean(s5.length);
4196
+ return x`<wcm-modal-header .border="${true}" title="Connect your wallet" .onAction="${c3.handleUriCopy}" .actionIcon="${v2.COPY_ICON}"></wcm-modal-header><wcm-modal-content><div class="wcm-mobile-title"><div class="wcm-subtitle">${v2.MOBILE_ICON}<wcm-text variant="small-regular" color="accent">Mobile</wcm-text></div><div class="wcm-subtitle">${v2.SCAN_ICON}<wcm-text variant="small-regular" color="secondary">Scan with your wallet</wcm-text></div></div><wcm-walletconnect-qr></wcm-walletconnect-qr></wcm-modal-content>${$2 ? x`<wcm-modal-footer><div class="wcm-desktop-title">${v2.DESKTOP_ICON}<wcm-text variant="small-regular" color="accent">Desktop</wcm-text></div><div class="wcm-grid">${s5} ${i5 ? x`<wcm-view-all-wallets-button></wcm-view-all-wallets-button>` : null}</div></wcm-modal-footer>` : null}`;
4197
+ }
4198
+ };
4199
+ Ee.styles = [h3.globalCss, vo], Ee = fo([e4("wcm-desktop-wallet-selection")], Ee);
4200
+ var xo = i`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;
4201
+ var yo = Object.defineProperty;
4202
+ var $o = Object.getOwnPropertyDescriptor;
4203
+ var Co = (e8, o7, r4, a4) => {
4204
+ for (var t5 = a4 > 1 ? void 0 : a4 ? $o(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4205
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4206
+ return a4 && t5 && yo(o7, r4, t5), t5;
4207
+ };
4208
+ var Me = class extends s4 {
4209
+ render() {
4210
+ const { termsOfServiceUrl: e8, privacyPolicyUrl: o7 } = y.state;
4211
+ return e8 ?? o7 ? x`<div><wcm-text variant="small-regular" color="secondary">By connecting your wallet to this app, you agree to the app's ${e8 ? x`<a href="${e8}" target="_blank" rel="noopener noreferrer">Terms of Service</a>` : null} ${e8 && o7 ? "and" : null} ${o7 ? x`<a href="${o7}" target="_blank" rel="noopener noreferrer">Privacy Policy</a>` : null}</wcm-text></div>` : null;
4212
+ }
4213
+ };
4214
+ Me.styles = [h3.globalCss, xo], Me = Co([e4("wcm-legal-notice")], Me);
4215
+ var ko = i`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;
4216
+ var Oo = Object.defineProperty;
4217
+ var Wo = Object.getOwnPropertyDescriptor;
4218
+ var Io = (e8, o7, r4, a4) => {
4219
+ for (var t5 = a4 > 1 ? void 0 : a4 ? Wo(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4220
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4221
+ return a4 && t5 && Oo(o7, r4, t5), t5;
4222
+ };
4223
+ var Le = class extends s4 {
4224
+ onQrcode() {
4225
+ T.push("Qrcode");
4226
+ }
4227
+ render() {
4228
+ const { explorerExcludedWalletIds: e8, enableExplorer: o7 } = y.state, r4 = e8 !== "ALL" && o7, a4 = Z2.manualWalletsTemplate(), t5 = Z2.recomendedWalletsTemplate();
4229
+ let l6 = [Z2.recentWalletTemplate(), ...a4, ...t5];
4230
+ l6 = l6.filter(Boolean);
4231
+ const i5 = l6.length > 8 || r4;
4232
+ let s5 = [];
4233
+ i5 ? s5 = l6.slice(0, 7) : s5 = l6;
4234
+ const $2 = Boolean(s5.length);
4235
+ return x`<wcm-modal-header title="Connect your wallet" .onAction="${this.onQrcode}" .actionIcon="${v2.QRCODE_ICON}"></wcm-modal-header>${$2 ? x`<wcm-modal-content><div>${s5} ${i5 ? x`<wcm-view-all-wallets-button></wcm-view-all-wallets-button>` : null}</div></wcm-modal-content>` : null}`;
4236
+ }
4237
+ };
4238
+ Le.styles = [h3.globalCss, ko], Le = Io([e4("wcm-mobile-wallet-selection")], Le);
4239
+ var Eo = i`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;
4240
+ var Mo = Object.defineProperty;
4241
+ var Lo = Object.getOwnPropertyDescriptor;
4242
+ var Re = (e8, o7, r4, a4) => {
4243
+ for (var t5 = a4 > 1 ? void 0 : a4 ? Lo(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4244
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4245
+ return a4 && t5 && Mo(o7, r4, t5), t5;
4246
+ };
4247
+ var ae = class extends s4 {
4248
+ constructor() {
4249
+ super(), this.open = false, this.active = false, this.unsubscribeModal = void 0, this.abortController = void 0, this.unsubscribeModal = se.subscribe((e8) => {
4250
+ e8.open ? this.onOpenModalEvent() : this.onCloseModalEvent();
4251
+ });
4252
+ }
4253
+ disconnectedCallback() {
4254
+ var e8;
4255
+ (e8 = this.unsubscribeModal) == null || e8.call(this);
4256
+ }
4257
+ get overlayEl() {
4258
+ return c3.getShadowRootElement(this, ".wcm-overlay");
4259
+ }
4260
+ get containerEl() {
4261
+ return c3.getShadowRootElement(this, ".wcm-container");
4262
+ }
4263
+ toggleBodyScroll(e8) {
4264
+ if (document.querySelector("body"))
4265
+ if (e8) {
4266
+ const o7 = document.getElementById("wcm-styles");
4267
+ o7?.remove();
4268
+ } else
4269
+ document.head.insertAdjacentHTML("beforeend", '<style id="wcm-styles">html,body{touch-action:none;overflow:hidden;overscroll-behavior:contain;}</style>');
4270
+ }
4271
+ onCloseModal(e8) {
4272
+ e8.target === e8.currentTarget && se.close();
4273
+ }
4274
+ onOpenModalEvent() {
4275
+ this.toggleBodyScroll(false), this.addKeyboardEvents(), this.open = true, setTimeout(async () => {
4276
+ const e8 = c3.isMobileAnimation() ? { y: ["50vh", "0vh"] } : { scale: [0.98, 1] }, o7 = 0.1, r4 = 0.2;
4277
+ await Promise.all([animate2(this.overlayEl, { opacity: [0, 1] }, { delay: o7, duration: r4 }).finished, animate2(this.containerEl, e8, { delay: o7, duration: r4 }).finished]), this.active = true;
4278
+ }, 0);
4279
+ }
4280
+ async onCloseModalEvent() {
4281
+ this.toggleBodyScroll(true), this.removeKeyboardEvents();
4282
+ const e8 = c3.isMobileAnimation() ? { y: ["0vh", "50vh"] } : { scale: [1, 0.98] }, o7 = 0.2;
4283
+ await Promise.all([animate2(this.overlayEl, { opacity: [1, 0] }, { duration: o7 }).finished, animate2(this.containerEl, e8, { duration: o7 }).finished]), this.containerEl.removeAttribute("style"), this.active = false, this.open = false;
4284
+ }
4285
+ addKeyboardEvents() {
4286
+ this.abortController = new AbortController(), window.addEventListener("keydown", (e8) => {
4287
+ var o7;
4288
+ e8.key === "Escape" ? se.close() : e8.key === "Tab" && ((o7 = e8.target) != null && o7.tagName.includes("wcm-") || this.containerEl.focus());
4289
+ }, this.abortController), this.containerEl.focus();
4290
+ }
4291
+ removeKeyboardEvents() {
4292
+ var e8;
4293
+ (e8 = this.abortController) == null || e8.abort(), this.abortController = void 0;
4294
+ }
4295
+ render() {
4296
+ const e8 = { "wcm-overlay": true, "wcm-active": this.active };
4297
+ return x`<wcm-explorer-context></wcm-explorer-context><wcm-theme-context></wcm-theme-context><div id="wcm-modal" class="${o6(e8)}" @click="${this.onCloseModal}" role="alertdialog" aria-modal="true"><div class="wcm-container" tabindex="0">${this.open ? x`<wcm-modal-backcard></wcm-modal-backcard><div class="wcm-card"><wcm-modal-router></wcm-modal-router><wcm-modal-toast></wcm-modal-toast></div>` : null}</div></div>`;
4298
+ }
4299
+ };
4300
+ ae.styles = [h3.globalCss, Eo], Re([t3()], ae.prototype, "open", 2), Re([t3()], ae.prototype, "active", 2), ae = Re([e4("wcm-modal")], ae);
4301
+ var Ro = i`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;
4302
+ var Ao = Object.defineProperty;
4303
+ var Po = Object.getOwnPropertyDescriptor;
4304
+ var le = (e8, o7, r4, a4) => {
4305
+ for (var t5 = a4 > 1 ? void 0 : a4 ? Po(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4306
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4307
+ return a4 && t5 && Ao(o7, r4, t5), t5;
4308
+ };
4309
+ var B2 = class extends s4 {
4310
+ constructor() {
4311
+ super(...arguments), this.isMobile = false, this.isDesktop = false, this.isWeb = false, this.isRetry = false;
4312
+ }
4313
+ onMobile() {
4314
+ a.isMobile() ? T.replace("MobileConnecting") : T.replace("MobileQrcodeConnecting");
4315
+ }
4316
+ onDesktop() {
4317
+ T.replace("DesktopConnecting");
4318
+ }
4319
+ onWeb() {
4320
+ T.replace("WebConnecting");
4321
+ }
4322
+ render() {
4323
+ return x`<div>${this.isRetry ? x`<slot></slot>` : null} ${this.isMobile ? x`<wcm-button .onClick="${this.onMobile}" .iconLeft="${v2.MOBILE_ICON}" variant="outline">Mobile</wcm-button>` : null} ${this.isDesktop ? x`<wcm-button .onClick="${this.onDesktop}" .iconLeft="${v2.DESKTOP_ICON}" variant="outline">Desktop</wcm-button>` : null} ${this.isWeb ? x`<wcm-button .onClick="${this.onWeb}" .iconLeft="${v2.GLOBE_ICON}" variant="outline">Web</wcm-button>` : null}</div>`;
4324
+ }
4325
+ };
4326
+ B2.styles = [h3.globalCss, Ro], le([n5({ type: Boolean })], B2.prototype, "isMobile", 2), le([n5({ type: Boolean })], B2.prototype, "isDesktop", 2), le([n5({ type: Boolean })], B2.prototype, "isWeb", 2), le([n5({ type: Boolean })], B2.prototype, "isRetry", 2), B2 = le([e4("wcm-platform-selection")], B2);
4327
+ var To = i`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;
4328
+ var jo = Object.defineProperty;
4329
+ var _o = Object.getOwnPropertyDescriptor;
4330
+ var Do = (e8, o7, r4, a4) => {
4331
+ for (var t5 = a4 > 1 ? void 0 : a4 ? _o(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4332
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4333
+ return a4 && t5 && jo(o7, r4, t5), t5;
4334
+ };
4335
+ var Ae = class extends s4 {
4336
+ onClick() {
4337
+ T.push("WalletExplorer");
4338
+ }
4339
+ render() {
4340
+ const { recomendedWallets: e8 } = te.state, o7 = G.manualWallets(), r4 = [...e8, ...o7].reverse().slice(0, 4);
4341
+ return x`<button @click="${this.onClick}"><div class="wcm-icons">${r4.map((a4) => {
4342
+ const t5 = c3.getWalletIcon(a4);
4343
+ if (t5)
4344
+ return x`<img crossorigin="anonymous" src="${t5}">`;
4345
+ const l6 = c3.getWalletIcon({ id: a4.id });
4346
+ return l6 ? x`<img crossorigin="anonymous" src="${l6}">` : v2.WALLET_PLACEHOLDER;
4347
+ })} ${[...Array(4 - r4.length)].map(() => v2.WALLET_PLACEHOLDER)}</div><wcm-text variant="xsmall-regular">View All</wcm-text></button>`;
4348
+ }
4349
+ };
4350
+ Ae.styles = [h3.globalCss, To], Ae = Do([e4("wcm-view-all-wallets-button")], Ae);
4351
+ var No = i`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;
4352
+ var Zo = Object.defineProperty;
4353
+ var So = Object.getOwnPropertyDescriptor;
4354
+ var de = (e8, o7, r4, a4) => {
4355
+ for (var t5 = a4 > 1 ? void 0 : a4 ? So(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4356
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4357
+ return a4 && t5 && Zo(o7, r4, t5), t5;
4358
+ };
4359
+ var Y = class extends s4 {
4360
+ constructor() {
4361
+ super(), this.walletId = "", this.imageId = "", this.uri = "", setTimeout(() => {
4362
+ const { walletConnectUri: e8 } = p.state;
4363
+ this.uri = e8;
4364
+ }, 0);
4365
+ }
4366
+ get overlayEl() {
4367
+ return c3.getShadowRootElement(this, ".wcm-qr-container");
4368
+ }
4369
+ render() {
4370
+ return x`<div class="wcm-qr-container">${this.uri ? x`<wcm-qrcode size="${this.overlayEl.offsetWidth}" uri="${this.uri}" walletId="${l5(this.walletId)}" imageId="${l5(this.imageId)}"></wcm-qrcode>` : x`<wcm-spinner></wcm-spinner>`}</div>`;
4371
+ }
4372
+ };
4373
+ Y.styles = [h3.globalCss, No], de([n5()], Y.prototype, "walletId", 2), de([n5()], Y.prototype, "imageId", 2), de([t3()], Y.prototype, "uri", 2), Y = de([e4("wcm-walletconnect-qr")], Y);
4374
+ var Bo = Object.defineProperty;
4375
+ var Uo = Object.getOwnPropertyDescriptor;
4376
+ var Ho = (e8, o7, r4, a4) => {
4377
+ for (var t5 = a4 > 1 ? void 0 : a4 ? Uo(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4378
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4379
+ return a4 && t5 && Bo(o7, r4, t5), t5;
4380
+ };
4381
+ var Pe = class extends s4 {
4382
+ viewTemplate() {
4383
+ return a.isAndroid() ? x`<wcm-android-wallet-selection></wcm-android-wallet-selection>` : a.isMobile() ? x`<wcm-mobile-wallet-selection></wcm-mobile-wallet-selection>` : x`<wcm-desktop-wallet-selection></wcm-desktop-wallet-selection>`;
4384
+ }
4385
+ render() {
4386
+ return x`${this.viewTemplate()}<wcm-legal-notice></wcm-legal-notice>`;
4387
+ }
4388
+ };
4389
+ Pe.styles = [h3.globalCss], Pe = Ho([e4("wcm-connect-wallet-view")], Pe);
4390
+ var zo = i`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;
4391
+ var Vo = Object.defineProperty;
4392
+ var Fo = Object.getOwnPropertyDescriptor;
4393
+ var Ke = (e8, o7, r4, a4) => {
4394
+ for (var t5 = a4 > 1 ? void 0 : a4 ? Fo(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4395
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4396
+ return a4 && t5 && Vo(o7, r4, t5), t5;
4397
+ };
4398
+ var me = class extends s4 {
4399
+ constructor() {
4400
+ super(), this.isError = false, this.openDesktopApp();
4401
+ }
4402
+ onFormatAndRedirect(e8) {
4403
+ const { desktop: o7, name: r4 } = a.getWalletRouterData(), a4 = o7?.native;
4404
+ if (a4) {
4405
+ const t5 = a.formatNativeUrl(a4, e8, r4);
4406
+ a.openHref(t5, "_self");
4407
+ }
4408
+ }
4409
+ openDesktopApp() {
4410
+ const { walletConnectUri: e8 } = p.state, o7 = a.getWalletRouterData();
4411
+ c3.setRecentWallet(o7), e8 && this.onFormatAndRedirect(e8);
4412
+ }
4413
+ render() {
4414
+ const { name: e8, id: o7, image_id: r4 } = a.getWalletRouterData(), { isMobile: a4, isWeb: t5 } = c3.getCachedRouterWalletPlatforms();
4415
+ return x`<wcm-modal-header title="${e8}" .onAction="${c3.handleUriCopy}" .actionIcon="${v2.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${o7}" imageId="${l5(r4)}" label="${`Continue in ${e8}...`}" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Connection can continue loading if ${e8} is not installed on your device`}</wcm-text><wcm-platform-selection .isMobile="${a4}" .isWeb="${t5}" .isRetry="${true}"><wcm-button .onClick="${this.openDesktopApp.bind(this)}" .iconRight="${v2.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection></wcm-info-footer>`;
4416
+ }
4417
+ };
4418
+ me.styles = [h3.globalCss, zo], Ke([t3()], me.prototype, "isError", 2), me = Ke([e4("wcm-desktop-connecting-view")], me);
4419
+ var qo = i`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;
4420
+ var Qo = Object.defineProperty;
4421
+ var Ko = Object.getOwnPropertyDescriptor;
4422
+ var Yo = (e8, o7, r4, a4) => {
4423
+ for (var t5 = a4 > 1 ? void 0 : a4 ? Ko(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4424
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4425
+ return a4 && t5 && Qo(o7, r4, t5), t5;
4426
+ };
4427
+ var Te = class extends s4 {
4428
+ onInstall(e8) {
4429
+ e8 && a.openHref(e8, "_blank");
4430
+ }
4431
+ render() {
4432
+ const { name: e8, id: o7, image_id: r4, homepage: a4 } = a.getWalletRouterData();
4433
+ return x`<wcm-modal-header title="${e8}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${o7}" imageId="${l5(r4)}" label="Not Detected" .isStale="${true}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Download ${e8} to continue. If multiple browser extensions are installed, disable non ${e8} ones and try again`}</wcm-text><wcm-button .onClick="${() => this.onInstall(a4)}" .iconLeft="${v2.ARROW_DOWN_ICON}">Download</wcm-button></wcm-info-footer>`;
4434
+ }
4435
+ };
4436
+ Te.styles = [h3.globalCss, qo], Te = Yo([e4("wcm-install-wallet-view")], Te);
4437
+ var Go = i`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;
4438
+ var Xo = Object.defineProperty;
4439
+ var Jo = Object.getOwnPropertyDescriptor;
4440
+ var Ye = (e8, o7, r4, a4) => {
4441
+ for (var t5 = a4 > 1 ? void 0 : a4 ? Jo(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4442
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4443
+ return a4 && t5 && Xo(o7, r4, t5), t5;
4444
+ };
4445
+ var he = class extends s4 {
4446
+ constructor() {
4447
+ super(), this.isError = false, this.openMobileApp();
4448
+ }
4449
+ onFormatAndRedirect(e8, o7 = false) {
4450
+ const { mobile: r4, name: a4 } = a.getWalletRouterData(), t5 = r4?.native, l6 = r4?.universal;
4451
+ if (t5 && !o7) {
4452
+ const i5 = a.formatNativeUrl(t5, e8, a4);
4453
+ a.openHref(i5, "_self");
4454
+ } else if (l6) {
4455
+ const i5 = a.formatUniversalUrl(l6, e8, a4);
4456
+ a.openHref(i5, "_self");
4457
+ }
4458
+ }
4459
+ openMobileApp(e8 = false) {
4460
+ const { walletConnectUri: o7 } = p.state, r4 = a.getWalletRouterData();
4461
+ c3.setRecentWallet(r4), o7 && this.onFormatAndRedirect(o7, e8);
4462
+ }
4463
+ onGoToAppStore(e8) {
4464
+ e8 && a.openHref(e8, "_blank");
4465
+ }
4466
+ render() {
4467
+ const { name: e8, id: o7, image_id: r4, app: a4, mobile: t5 } = a.getWalletRouterData(), { isWeb: l6 } = c3.getCachedRouterWalletPlatforms(), i5 = a4?.ios, s5 = t5?.universal;
4468
+ return x`<wcm-modal-header title="${e8}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${o7}" imageId="${l5(r4)}" label="Tap 'Open' to continue…" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer class="wcm-note"><wcm-platform-selection .isWeb="${l6}" .isRetry="${true}"><wcm-button .onClick="${() => this.openMobileApp(false)}" .iconRight="${v2.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection>${s5 ? x`<wcm-text color="secondary" variant="small-thin">Still doesn't work? <span tabindex="0" @click="${() => this.openMobileApp(true)}">Try this alternate link</span></wcm-text>` : null}</wcm-info-footer><wcm-info-footer class="wcm-app-store"><div><wcm-wallet-image walletId="${o7}" imageId="${l5(r4)}"></wcm-wallet-image><wcm-text>${`Get ${e8}`}</wcm-text></div><wcm-button .iconRight="${v2.ARROW_RIGHT_ICON}" .onClick="${() => this.onGoToAppStore(i5)}" variant="ghost">App Store</wcm-button></wcm-info-footer>`;
4469
+ }
4470
+ };
4471
+ he.styles = [h3.globalCss, Go], Ye([t3()], he.prototype, "isError", 2), he = Ye([e4("wcm-mobile-connecting-view")], he);
4472
+ var er = i`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;
4473
+ var tr = Object.defineProperty;
4474
+ var or = Object.getOwnPropertyDescriptor;
4475
+ var rr = (e8, o7, r4, a4) => {
4476
+ for (var t5 = a4 > 1 ? void 0 : a4 ? or(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4477
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4478
+ return a4 && t5 && tr(o7, r4, t5), t5;
4479
+ };
4480
+ var je = class extends s4 {
4481
+ render() {
4482
+ const { name: e8, id: o7, image_id: r4 } = a.getWalletRouterData(), { isDesktop: a4, isWeb: t5 } = c3.getCachedRouterWalletPlatforms();
4483
+ return x`<wcm-modal-header title="${e8}" .onAction="${c3.handleUriCopy}" .actionIcon="${v2.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-walletconnect-qr walletId="${o7}" imageId="${l5(r4)}"></wcm-walletconnect-qr></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Scan this QR Code with your phone's camera or inside ${e8} app`}</wcm-text><wcm-platform-selection .isDesktop="${a4}" .isWeb="${t5}"></wcm-platform-selection></wcm-info-footer>`;
4484
+ }
4485
+ };
4486
+ je.styles = [h3.globalCss, er], je = rr([e4("wcm-mobile-qr-connecting-view")], je);
4487
+ var ar = Object.defineProperty;
4488
+ var lr = Object.getOwnPropertyDescriptor;
4489
+ var ir = (e8, o7, r4, a4) => {
4490
+ for (var t5 = a4 > 1 ? void 0 : a4 ? lr(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4491
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4492
+ return a4 && t5 && ar(o7, r4, t5), t5;
4493
+ };
4494
+ var _e = class extends s4 {
4495
+ render() {
4496
+ return x`<wcm-modal-header title="Scan the code" .onAction="${c3.handleUriCopy}" .actionIcon="${v2.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-walletconnect-qr></wcm-walletconnect-qr></wcm-modal-content>`;
4497
+ }
4498
+ };
4499
+ _e.styles = [h3.globalCss], _e = ir([e4("wcm-qrcode-view")], _e);
4500
+ var nr = i`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;
4501
+ var cr = Object.defineProperty;
4502
+ var sr = Object.getOwnPropertyDescriptor;
4503
+ var ie = (e8, o7, r4, a4) => {
4504
+ for (var t5 = a4 > 1 ? void 0 : a4 ? sr(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4505
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4506
+ return a4 && t5 && cr(o7, r4, t5), t5;
4507
+ };
4508
+ var De = 40;
4509
+ var U = class extends s4 {
4510
+ constructor() {
4511
+ super(...arguments), this.loading = !te.state.wallets.listings.length, this.firstFetch = !te.state.wallets.listings.length, this.search = "", this.endReached = false, this.intersectionObserver = void 0, this.searchDebounce = c3.debounce((e8) => {
4512
+ e8.length >= 1 ? (this.firstFetch = true, this.endReached = false, this.search = e8, te.resetSearch(), this.fetchWallets()) : this.search && (this.search = "", this.endReached = this.isLastPage(), te.resetSearch());
4513
+ });
4514
+ }
4515
+ firstUpdated() {
4516
+ this.createPaginationObserver();
4517
+ }
4518
+ disconnectedCallback() {
4519
+ var e8;
4520
+ (e8 = this.intersectionObserver) == null || e8.disconnect();
4521
+ }
4522
+ get placeholderEl() {
4523
+ return c3.getShadowRootElement(this, ".wcm-placeholder-block");
4524
+ }
4525
+ createPaginationObserver() {
4526
+ this.intersectionObserver = new IntersectionObserver(([e8]) => {
4527
+ e8.isIntersecting && !(this.search && this.firstFetch) && this.fetchWallets();
4528
+ }), this.intersectionObserver.observe(this.placeholderEl);
4529
+ }
4530
+ isLastPage() {
4531
+ const { wallets: e8, search: o7 } = te.state, { listings: r4, total: a4 } = this.search ? o7 : e8;
4532
+ return a4 <= De || r4.length >= a4;
4533
+ }
4534
+ async fetchWallets() {
4535
+ var e8;
4536
+ const { wallets: o7, search: r4 } = te.state, { listings: a4, total: t5, page: l6 } = this.search ? r4 : o7;
4537
+ if (!this.endReached && (this.firstFetch || t5 > De && a4.length < t5))
4538
+ try {
4539
+ this.loading = true;
4540
+ const i5 = (e8 = p.state.chains) == null ? void 0 : e8.join(","), { listings: s5 } = await te.getWallets({ page: this.firstFetch ? 1 : l6 + 1, entries: De, search: this.search, version: 2, chains: i5 }), $2 = s5.map((f2) => c3.getWalletIcon(f2));
4541
+ await Promise.all([...$2.map(async (f2) => c3.preloadImage(f2)), a.wait(300)]), this.endReached = this.isLastPage();
4542
+ } catch (i5) {
4543
+ oe.openToast(c3.getErrorMessage(i5), "error");
4544
+ } finally {
4545
+ this.loading = false, this.firstFetch = false;
4546
+ }
4547
+ }
4548
+ onConnect(e8) {
4549
+ a.isAndroid() ? c3.handleMobileLinking(e8) : c3.goToConnectingView(e8);
4550
+ }
4551
+ onSearchChange(e8) {
4552
+ const { value: o7 } = e8.target;
4553
+ this.searchDebounce(o7);
4554
+ }
4555
+ render() {
4556
+ const { wallets: e8, search: o7 } = te.state, { listings: r4 } = this.search ? o7 : e8, a4 = this.loading && !r4.length, t5 = this.search.length >= 3;
4557
+ let l6 = Z2.manualWalletsTemplate(), i5 = Z2.recomendedWalletsTemplate(true);
4558
+ t5 && (l6 = l6.filter(({ values: f2 }) => c3.caseSafeIncludes(f2[0], this.search)), i5 = i5.filter(({ values: f2 }) => c3.caseSafeIncludes(f2[0], this.search)));
4559
+ const s5 = !this.loading && !r4.length && !i5.length, $2 = { "wcm-loading": a4, "wcm-end-reached": this.endReached || !this.loading, "wcm-empty": s5 };
4560
+ return x`<wcm-modal-header><wcm-search-input .onChange="${this.onSearchChange.bind(this)}"></wcm-search-input></wcm-modal-header><wcm-modal-content class="${o6($2)}"><div class="wcm-grid">${a4 ? null : l6} ${a4 ? null : i5} ${a4 ? null : r4.map((f2) => x`${f2 ? x`<wcm-wallet-button imageId="${f2.image_id}" name="${f2.name}" walletId="${f2.id}" .onClick="${() => this.onConnect(f2)}"></wcm-wallet-button>` : null}`)}</div><div class="wcm-placeholder-block">${s5 ? x`<wcm-text variant="big-bold" color="secondary">No results found</wcm-text>` : null} ${!s5 && this.loading ? x`<wcm-spinner></wcm-spinner>` : null}</div></wcm-modal-content>`;
4561
+ }
4562
+ };
4563
+ U.styles = [h3.globalCss, nr], ie([t3()], U.prototype, "loading", 2), ie([t3()], U.prototype, "firstFetch", 2), ie([t3()], U.prototype, "search", 2), ie([t3()], U.prototype, "endReached", 2), U = ie([e4("wcm-wallet-explorer-view")], U);
4564
+ var dr = i`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;
4565
+ var mr = Object.defineProperty;
4566
+ var hr = Object.getOwnPropertyDescriptor;
4567
+ var Ge = (e8, o7, r4, a4) => {
4568
+ for (var t5 = a4 > 1 ? void 0 : a4 ? hr(o7, r4) : o7, l6 = e8.length - 1, i5; l6 >= 0; l6--)
4569
+ (i5 = e8[l6]) && (t5 = (a4 ? i5(o7, r4, t5) : i5(t5)) || t5);
4570
+ return a4 && t5 && mr(o7, r4, t5), t5;
4571
+ };
4572
+ var we = class extends s4 {
4573
+ constructor() {
4574
+ super(), this.isError = false, this.openWebWallet();
4575
+ }
4576
+ onFormatAndRedirect(e8) {
4577
+ const { desktop: o7, name: r4 } = a.getWalletRouterData(), a4 = o7?.universal;
4578
+ if (a4) {
4579
+ const t5 = a.formatUniversalUrl(a4, e8, r4);
4580
+ a.openHref(t5, "_blank");
4581
+ }
4582
+ }
4583
+ openWebWallet() {
4584
+ const { walletConnectUri: e8 } = p.state, o7 = a.getWalletRouterData();
4585
+ c3.setRecentWallet(o7), e8 && this.onFormatAndRedirect(e8);
4586
+ }
4587
+ render() {
4588
+ const { name: e8, id: o7, image_id: r4 } = a.getWalletRouterData(), { isMobile: a4, isDesktop: t5 } = c3.getCachedRouterWalletPlatforms(), l6 = a.isMobile();
4589
+ return x`<wcm-modal-header title="${e8}" .onAction="${c3.handleUriCopy}" .actionIcon="${v2.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${o7}" imageId="${l5(r4)}" label="${`Continue in ${e8}...`}" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`${e8} web app has opened in a new tab. Go there, accept the connection, and come back`}</wcm-text><wcm-platform-selection .isMobile="${a4}" .isDesktop="${l6 ? false : t5}" .isRetry="${true}"><wcm-button .onClick="${this.openWebWallet.bind(this)}" .iconRight="${v2.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection></wcm-info-footer>`;
4590
+ }
4591
+ };
4592
+ we.styles = [h3.globalCss, dr], Ge([t3()], we.prototype, "isError", 2), we = Ge([e4("wcm-web-connecting-view")], we);
4593
+ /*! Bundled license information:
4594
+
4595
+ @lit/reactive-element/css-tag.js:
4596
+ (**
4597
+ * @license
4598
+ * Copyright 2019 Google LLC
4599
+ * SPDX-License-Identifier: BSD-3-Clause
4600
+ *)
4601
+
4602
+ @lit/reactive-element/reactive-element.js:
4603
+ (**
4604
+ * @license
4605
+ * Copyright 2017 Google LLC
4606
+ * SPDX-License-Identifier: BSD-3-Clause
4607
+ *)
4608
+
4609
+ lit-html/lit-html.js:
4610
+ (**
4611
+ * @license
4612
+ * Copyright 2017 Google LLC
4613
+ * SPDX-License-Identifier: BSD-3-Clause
4614
+ *)
4615
+
4616
+ lit-element/lit-element.js:
4617
+ (**
4618
+ * @license
4619
+ * Copyright 2017 Google LLC
4620
+ * SPDX-License-Identifier: BSD-3-Clause
4621
+ *)
4622
+
4623
+ lit-html/is-server.js:
4624
+ (**
4625
+ * @license
4626
+ * Copyright 2022 Google LLC
4627
+ * SPDX-License-Identifier: BSD-3-Clause
4628
+ *)
4629
+
4630
+ @lit/reactive-element/decorators/custom-element.js:
4631
+ (**
4632
+ * @license
4633
+ * Copyright 2017 Google LLC
4634
+ * SPDX-License-Identifier: BSD-3-Clause
4635
+ *)
4636
+
4637
+ @lit/reactive-element/decorators/property.js:
4638
+ (**
4639
+ * @license
4640
+ * Copyright 2017 Google LLC
4641
+ * SPDX-License-Identifier: BSD-3-Clause
4642
+ *)
4643
+
4644
+ @lit/reactive-element/decorators/state.js:
4645
+ (**
4646
+ * @license
4647
+ * Copyright 2017 Google LLC
4648
+ * SPDX-License-Identifier: BSD-3-Clause
4649
+ *)
4650
+
4651
+ @lit/reactive-element/decorators/base.js:
4652
+ (**
4653
+ * @license
4654
+ * Copyright 2017 Google LLC
4655
+ * SPDX-License-Identifier: BSD-3-Clause
4656
+ *)
4657
+
4658
+ @lit/reactive-element/decorators/event-options.js:
4659
+ (**
4660
+ * @license
4661
+ * Copyright 2017 Google LLC
4662
+ * SPDX-License-Identifier: BSD-3-Clause
4663
+ *)
4664
+
4665
+ @lit/reactive-element/decorators/query.js:
4666
+ (**
4667
+ * @license
4668
+ * Copyright 2017 Google LLC
4669
+ * SPDX-License-Identifier: BSD-3-Clause
4670
+ *)
4671
+
4672
+ @lit/reactive-element/decorators/query-all.js:
4673
+ (**
4674
+ * @license
4675
+ * Copyright 2017 Google LLC
4676
+ * SPDX-License-Identifier: BSD-3-Clause
4677
+ *)
4678
+
4679
+ @lit/reactive-element/decorators/query-async.js:
4680
+ (**
4681
+ * @license
4682
+ * Copyright 2017 Google LLC
4683
+ * SPDX-License-Identifier: BSD-3-Clause
4684
+ *)
4685
+
4686
+ @lit/reactive-element/decorators/query-assigned-elements.js:
4687
+ (**
4688
+ * @license
4689
+ * Copyright 2021 Google LLC
4690
+ * SPDX-License-Identifier: BSD-3-Clause
4691
+ *)
4692
+
4693
+ @lit/reactive-element/decorators/query-assigned-nodes.js:
4694
+ (**
4695
+ * @license
4696
+ * Copyright 2017 Google LLC
4697
+ * SPDX-License-Identifier: BSD-3-Clause
4698
+ *)
4699
+
4700
+ lit-html/directive.js:
4701
+ (**
4702
+ * @license
4703
+ * Copyright 2017 Google LLC
4704
+ * SPDX-License-Identifier: BSD-3-Clause
4705
+ *)
4706
+
4707
+ lit-html/directives/class-map.js:
4708
+ (**
4709
+ * @license
4710
+ * Copyright 2018 Google LLC
4711
+ * SPDX-License-Identifier: BSD-3-Clause
4712
+ *)
4713
+
4714
+ lit-html/directives/if-defined.js:
4715
+ (**
4716
+ * @license
4717
+ * Copyright 2018 Google LLC
4718
+ * SPDX-License-Identifier: BSD-3-Clause
4719
+ *)
4720
+ */
4721
+
4722
+ export { ae as WcmModal, j as WcmQrCode };