@silvery/examples 0.17.3 → 0.17.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/UPNG-Cy7ViL8f.mjs +5074 -0
  2. package/dist/__vite-browser-external-2447137e-BML7CYau.mjs +4 -0
  3. package/dist/_banner-DLPxCqVy.mjs +44 -0
  4. package/dist/ansi-CCE2pVS0.mjs +16397 -0
  5. package/dist/apng-HhhBjRGt.mjs +68 -0
  6. package/dist/apng-mwUQbTTF.mjs +3 -0
  7. package/dist/apps/aichat/index.mjs +1299 -0
  8. package/dist/apps/app-todo.mjs +139 -0
  9. package/dist/apps/async-data.mjs +204 -0
  10. package/dist/apps/cli-wizard.mjs +339 -0
  11. package/dist/apps/clipboard.mjs +198 -0
  12. package/dist/apps/components.mjs +864 -0
  13. package/dist/apps/data-explorer.mjs +483 -0
  14. package/dist/apps/dev-tools.mjs +397 -0
  15. package/dist/apps/explorer.mjs +698 -0
  16. package/dist/apps/gallery.mjs +766 -0
  17. package/dist/apps/inline-bench.mjs +115 -0
  18. package/dist/apps/kanban.mjs +280 -0
  19. package/dist/apps/layout-ref.mjs +187 -0
  20. package/dist/apps/outline.mjs +203 -0
  21. package/dist/apps/paste-demo.mjs +189 -0
  22. package/dist/apps/scroll.mjs +86 -0
  23. package/dist/apps/search-filter.mjs +287 -0
  24. package/dist/apps/selection.mjs +355 -0
  25. package/dist/apps/spatial-focus-demo.mjs +388 -0
  26. package/dist/apps/task-list.mjs +258 -0
  27. package/dist/apps/terminal-caps-demo.mjs +315 -0
  28. package/dist/apps/terminal.mjs +872 -0
  29. package/dist/apps/text-selection-demo.mjs +254 -0
  30. package/dist/apps/textarea.mjs +178 -0
  31. package/dist/apps/theme.mjs +661 -0
  32. package/dist/apps/transform.mjs +215 -0
  33. package/dist/apps/virtual-10k.mjs +422 -0
  34. package/dist/assets/resvgjs.darwin-arm64-BtufyGW1.node +0 -0
  35. package/dist/backends-Bahh9mKN.mjs +1179 -0
  36. package/dist/backends-CCtCDQ94.mjs +3 -0
  37. package/dist/{cli.mjs → bin/cli.mjs} +15 -19
  38. package/dist/chunk-BSw8zbkd.mjs +37 -0
  39. package/dist/components/counter.mjs +48 -0
  40. package/dist/components/hello.mjs +31 -0
  41. package/dist/components/progress-bar.mjs +59 -0
  42. package/dist/components/select-list.mjs +85 -0
  43. package/dist/components/spinner.mjs +57 -0
  44. package/dist/components/text-input.mjs +62 -0
  45. package/dist/components/virtual-list.mjs +51 -0
  46. package/dist/flexily-zero-adapter-UB-ra8fR.mjs +3374 -0
  47. package/dist/gif-BZaqPPVX.mjs +3 -0
  48. package/dist/gif-BtnXuxLF.mjs +71 -0
  49. package/dist/gifenc-CLRW41dk.mjs +728 -0
  50. package/dist/jsx-runtime-dMs_8fNu.mjs +241 -0
  51. package/dist/key-mapping-5oYQdAQE.mjs +3 -0
  52. package/dist/key-mapping-D4LR1go6.mjs +130 -0
  53. package/dist/layout/dashboard.mjs +1204 -0
  54. package/dist/layout/live-resize.mjs +303 -0
  55. package/dist/layout/overflow.mjs +70 -0
  56. package/dist/layout/text-layout.mjs +335 -0
  57. package/dist/node-NuJ94BWl.mjs +1083 -0
  58. package/dist/plugins-D1KtkT4a.mjs +3057 -0
  59. package/dist/resvg-js-C_8Wps1F.mjs +201 -0
  60. package/dist/src-BTEVGpd9.mjs +23538 -0
  61. package/dist/src-CUUOuRH6.mjs +5322 -0
  62. package/dist/src-CzfRafCQ.mjs +814 -0
  63. package/dist/usingCtx-CsEf0xO3.mjs +57 -0
  64. package/dist/yoga-adapter-BVtQ5OJR.mjs +237 -0
  65. package/package.json +18 -13
  66. package/_banner.tsx +0 -60
  67. package/apps/aichat/components.tsx +0 -469
  68. package/apps/aichat/index.tsx +0 -220
  69. package/apps/aichat/script.ts +0 -460
  70. package/apps/aichat/state.ts +0 -325
  71. package/apps/aichat/types.ts +0 -19
  72. package/apps/app-todo.tsx +0 -201
  73. package/apps/async-data.tsx +0 -196
  74. package/apps/cli-wizard.tsx +0 -332
  75. package/apps/clipboard.tsx +0 -183
  76. package/apps/components.tsx +0 -658
  77. package/apps/data-explorer.tsx +0 -490
  78. package/apps/dev-tools.tsx +0 -395
  79. package/apps/explorer.tsx +0 -731
  80. package/apps/gallery.tsx +0 -653
  81. package/apps/inline-bench.tsx +0 -138
  82. package/apps/kanban.tsx +0 -265
  83. package/apps/layout-ref.tsx +0 -173
  84. package/apps/outline.tsx +0 -160
  85. package/apps/panes/index.tsx +0 -203
  86. package/apps/paste-demo.tsx +0 -185
  87. package/apps/scroll.tsx +0 -80
  88. package/apps/search-filter.tsx +0 -240
  89. package/apps/selection.tsx +0 -346
  90. package/apps/spatial-focus-demo.tsx +0 -372
  91. package/apps/task-list.tsx +0 -271
  92. package/apps/terminal-caps-demo.tsx +0 -317
  93. package/apps/terminal.tsx +0 -784
  94. package/apps/text-selection-demo.tsx +0 -193
  95. package/apps/textarea.tsx +0 -155
  96. package/apps/theme.tsx +0 -515
  97. package/apps/transform.tsx +0 -229
  98. package/apps/virtual-10k.tsx +0 -405
  99. package/apps/vterm-demo/index.tsx +0 -216
  100. package/components/counter.tsx +0 -49
  101. package/components/hello.tsx +0 -38
  102. package/components/progress-bar.tsx +0 -52
  103. package/components/select-list.tsx +0 -54
  104. package/components/spinner.tsx +0 -44
  105. package/components/text-input.tsx +0 -61
  106. package/components/virtual-list.tsx +0 -56
  107. package/dist/cli.d.mts +0 -1
  108. package/dist/cli.mjs.map +0 -1
  109. package/layout/dashboard.tsx +0 -953
  110. package/layout/live-resize.tsx +0 -282
  111. package/layout/overflow.tsx +0 -51
  112. package/layout/text-layout.tsx +0 -283
@@ -0,0 +1,814 @@
1
+ import { i as __require, t as __commonJSMin } from "./chunk-BSw8zbkd.mjs";
2
+ //#region ../../../node_modules/.bun/ms@2.1.3/node_modules/ms/index.js
3
+ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
+ /**
5
+ * Helpers.
6
+ */
7
+ var s = 1e3;
8
+ var m = s * 60;
9
+ var h = m * 60;
10
+ var d = h * 24;
11
+ var w = d * 7;
12
+ var y = d * 365.25;
13
+ /**
14
+ * Parse or format the given `val`.
15
+ *
16
+ * Options:
17
+ *
18
+ * - `long` verbose formatting [false]
19
+ *
20
+ * @param {String|Number} val
21
+ * @param {Object} [options]
22
+ * @throws {Error} throw an error if val is not a non-empty string or a number
23
+ * @return {String|Number}
24
+ * @api public
25
+ */
26
+ module.exports = function(val, options) {
27
+ options = options || {};
28
+ var type = typeof val;
29
+ if (type === "string" && val.length > 0) return parse(val);
30
+ else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val) : fmtShort(val);
31
+ throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
32
+ };
33
+ /**
34
+ * Parse the given `str` and return milliseconds.
35
+ *
36
+ * @param {String} str
37
+ * @return {Number}
38
+ * @api private
39
+ */
40
+ function parse(str) {
41
+ str = String(str);
42
+ if (str.length > 100) return;
43
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
44
+ if (!match) return;
45
+ var n = parseFloat(match[1]);
46
+ switch ((match[2] || "ms").toLowerCase()) {
47
+ case "years":
48
+ case "year":
49
+ case "yrs":
50
+ case "yr":
51
+ case "y": return n * y;
52
+ case "weeks":
53
+ case "week":
54
+ case "w": return n * w;
55
+ case "days":
56
+ case "day":
57
+ case "d": return n * d;
58
+ case "hours":
59
+ case "hour":
60
+ case "hrs":
61
+ case "hr":
62
+ case "h": return n * h;
63
+ case "minutes":
64
+ case "minute":
65
+ case "mins":
66
+ case "min":
67
+ case "m": return n * m;
68
+ case "seconds":
69
+ case "second":
70
+ case "secs":
71
+ case "sec":
72
+ case "s": return n * s;
73
+ case "milliseconds":
74
+ case "millisecond":
75
+ case "msecs":
76
+ case "msec":
77
+ case "ms": return n;
78
+ default: return;
79
+ }
80
+ }
81
+ /**
82
+ * Short format for `ms`.
83
+ *
84
+ * @param {Number} ms
85
+ * @return {String}
86
+ * @api private
87
+ */
88
+ function fmtShort(ms) {
89
+ var msAbs = Math.abs(ms);
90
+ if (msAbs >= d) return Math.round(ms / d) + "d";
91
+ if (msAbs >= h) return Math.round(ms / h) + "h";
92
+ if (msAbs >= m) return Math.round(ms / m) + "m";
93
+ if (msAbs >= s) return Math.round(ms / s) + "s";
94
+ return ms + "ms";
95
+ }
96
+ /**
97
+ * Long format for `ms`.
98
+ *
99
+ * @param {Number} ms
100
+ * @return {String}
101
+ * @api private
102
+ */
103
+ function fmtLong(ms) {
104
+ var msAbs = Math.abs(ms);
105
+ if (msAbs >= d) return plural(ms, msAbs, d, "day");
106
+ if (msAbs >= h) return plural(ms, msAbs, h, "hour");
107
+ if (msAbs >= m) return plural(ms, msAbs, m, "minute");
108
+ if (msAbs >= s) return plural(ms, msAbs, s, "second");
109
+ return ms + " ms";
110
+ }
111
+ /**
112
+ * Pluralization helper.
113
+ */
114
+ function plural(ms, msAbs, n, name) {
115
+ var isPlural = msAbs >= n * 1.5;
116
+ return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
117
+ }
118
+ }));
119
+ //#endregion
120
+ //#region ../../../node_modules/.bun/debug@4.4.3/node_modules/debug/src/common.js
121
+ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
122
+ /**
123
+ * This is the common logic for both the Node.js and web browser
124
+ * implementations of `debug()`.
125
+ */
126
+ function setup(env) {
127
+ createDebug.debug = createDebug;
128
+ createDebug.default = createDebug;
129
+ createDebug.coerce = coerce;
130
+ createDebug.disable = disable;
131
+ createDebug.enable = enable;
132
+ createDebug.enabled = enabled;
133
+ createDebug.humanize = require_ms();
134
+ createDebug.destroy = destroy;
135
+ Object.keys(env).forEach((key) => {
136
+ createDebug[key] = env[key];
137
+ });
138
+ /**
139
+ * The currently active debug mode names, and names to skip.
140
+ */
141
+ createDebug.names = [];
142
+ createDebug.skips = [];
143
+ /**
144
+ * Map of special "%n" handling functions, for the debug "format" argument.
145
+ *
146
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
147
+ */
148
+ createDebug.formatters = {};
149
+ /**
150
+ * Selects a color for a debug namespace
151
+ * @param {String} namespace The namespace string for the debug instance to be colored
152
+ * @return {Number|String} An ANSI color code for the given namespace
153
+ * @api private
154
+ */
155
+ function selectColor(namespace) {
156
+ let hash = 0;
157
+ for (let i = 0; i < namespace.length; i++) {
158
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
159
+ hash |= 0;
160
+ }
161
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
162
+ }
163
+ createDebug.selectColor = selectColor;
164
+ /**
165
+ * Create a debugger with the given `namespace`.
166
+ *
167
+ * @param {String} namespace
168
+ * @return {Function}
169
+ * @api public
170
+ */
171
+ function createDebug(namespace) {
172
+ let prevTime;
173
+ let enableOverride = null;
174
+ let namespacesCache;
175
+ let enabledCache;
176
+ function debug(...args) {
177
+ if (!debug.enabled) return;
178
+ const self = debug;
179
+ const curr = Number(/* @__PURE__ */ new Date());
180
+ self.diff = curr - (prevTime || curr);
181
+ self.prev = prevTime;
182
+ self.curr = curr;
183
+ prevTime = curr;
184
+ args[0] = createDebug.coerce(args[0]);
185
+ if (typeof args[0] !== "string") args.unshift("%O");
186
+ let index = 0;
187
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
188
+ if (match === "%%") return "%";
189
+ index++;
190
+ const formatter = createDebug.formatters[format];
191
+ if (typeof formatter === "function") {
192
+ const val = args[index];
193
+ match = formatter.call(self, val);
194
+ args.splice(index, 1);
195
+ index--;
196
+ }
197
+ return match;
198
+ });
199
+ createDebug.formatArgs.call(self, args);
200
+ (self.log || createDebug.log).apply(self, args);
201
+ }
202
+ debug.namespace = namespace;
203
+ debug.useColors = createDebug.useColors();
204
+ debug.color = createDebug.selectColor(namespace);
205
+ debug.extend = extend;
206
+ debug.destroy = createDebug.destroy;
207
+ Object.defineProperty(debug, "enabled", {
208
+ enumerable: true,
209
+ configurable: false,
210
+ get: () => {
211
+ if (enableOverride !== null) return enableOverride;
212
+ if (namespacesCache !== createDebug.namespaces) {
213
+ namespacesCache = createDebug.namespaces;
214
+ enabledCache = createDebug.enabled(namespace);
215
+ }
216
+ return enabledCache;
217
+ },
218
+ set: (v) => {
219
+ enableOverride = v;
220
+ }
221
+ });
222
+ if (typeof createDebug.init === "function") createDebug.init(debug);
223
+ return debug;
224
+ }
225
+ function extend(namespace, delimiter) {
226
+ const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
227
+ newDebug.log = this.log;
228
+ return newDebug;
229
+ }
230
+ /**
231
+ * Enables a debug mode by namespaces. This can include modes
232
+ * separated by a colon and wildcards.
233
+ *
234
+ * @param {String} namespaces
235
+ * @api public
236
+ */
237
+ function enable(namespaces) {
238
+ createDebug.save(namespaces);
239
+ createDebug.namespaces = namespaces;
240
+ createDebug.names = [];
241
+ createDebug.skips = [];
242
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
243
+ for (const ns of split) if (ns[0] === "-") createDebug.skips.push(ns.slice(1));
244
+ else createDebug.names.push(ns);
245
+ }
246
+ /**
247
+ * Checks if the given string matches a namespace template, honoring
248
+ * asterisks as wildcards.
249
+ *
250
+ * @param {String} search
251
+ * @param {String} template
252
+ * @return {Boolean}
253
+ */
254
+ function matchesTemplate(search, template) {
255
+ let searchIndex = 0;
256
+ let templateIndex = 0;
257
+ let starIndex = -1;
258
+ let matchIndex = 0;
259
+ while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) if (template[templateIndex] === "*") {
260
+ starIndex = templateIndex;
261
+ matchIndex = searchIndex;
262
+ templateIndex++;
263
+ } else {
264
+ searchIndex++;
265
+ templateIndex++;
266
+ }
267
+ else if (starIndex !== -1) {
268
+ templateIndex = starIndex + 1;
269
+ matchIndex++;
270
+ searchIndex = matchIndex;
271
+ } else return false;
272
+ while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++;
273
+ return templateIndex === template.length;
274
+ }
275
+ /**
276
+ * Disable debug output.
277
+ *
278
+ * @return {String} namespaces
279
+ * @api public
280
+ */
281
+ function disable() {
282
+ const namespaces = [...createDebug.names, ...createDebug.skips.map((namespace) => "-" + namespace)].join(",");
283
+ createDebug.enable("");
284
+ return namespaces;
285
+ }
286
+ /**
287
+ * Returns true if the given mode name is enabled, false otherwise.
288
+ *
289
+ * @param {String} name
290
+ * @return {Boolean}
291
+ * @api public
292
+ */
293
+ function enabled(name) {
294
+ for (const skip of createDebug.skips) if (matchesTemplate(name, skip)) return false;
295
+ for (const ns of createDebug.names) if (matchesTemplate(name, ns)) return true;
296
+ return false;
297
+ }
298
+ /**
299
+ * Coerce `val`.
300
+ *
301
+ * @param {Mixed} val
302
+ * @return {Mixed}
303
+ * @api private
304
+ */
305
+ function coerce(val) {
306
+ if (val instanceof Error) return val.stack || val.message;
307
+ return val;
308
+ }
309
+ /**
310
+ * XXX DO NOT USE. This is a temporary stub function.
311
+ * XXX It WILL be removed in the next major release.
312
+ */
313
+ function destroy() {
314
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
315
+ }
316
+ createDebug.enable(createDebug.load());
317
+ return createDebug;
318
+ }
319
+ module.exports = setup;
320
+ }));
321
+ //#endregion
322
+ //#region ../../../node_modules/.bun/debug@4.4.3/node_modules/debug/src/browser.js
323
+ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
324
+ /**
325
+ * This is the web browser implementation of `debug()`.
326
+ */
327
+ exports.formatArgs = formatArgs;
328
+ exports.save = save;
329
+ exports.load = load;
330
+ exports.useColors = useColors;
331
+ exports.storage = localstorage();
332
+ exports.destroy = (() => {
333
+ let warned = false;
334
+ return () => {
335
+ if (!warned) {
336
+ warned = true;
337
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
338
+ }
339
+ };
340
+ })();
341
+ /**
342
+ * Colors.
343
+ */
344
+ exports.colors = [
345
+ "#0000CC",
346
+ "#0000FF",
347
+ "#0033CC",
348
+ "#0033FF",
349
+ "#0066CC",
350
+ "#0066FF",
351
+ "#0099CC",
352
+ "#0099FF",
353
+ "#00CC00",
354
+ "#00CC33",
355
+ "#00CC66",
356
+ "#00CC99",
357
+ "#00CCCC",
358
+ "#00CCFF",
359
+ "#3300CC",
360
+ "#3300FF",
361
+ "#3333CC",
362
+ "#3333FF",
363
+ "#3366CC",
364
+ "#3366FF",
365
+ "#3399CC",
366
+ "#3399FF",
367
+ "#33CC00",
368
+ "#33CC33",
369
+ "#33CC66",
370
+ "#33CC99",
371
+ "#33CCCC",
372
+ "#33CCFF",
373
+ "#6600CC",
374
+ "#6600FF",
375
+ "#6633CC",
376
+ "#6633FF",
377
+ "#66CC00",
378
+ "#66CC33",
379
+ "#9900CC",
380
+ "#9900FF",
381
+ "#9933CC",
382
+ "#9933FF",
383
+ "#99CC00",
384
+ "#99CC33",
385
+ "#CC0000",
386
+ "#CC0033",
387
+ "#CC0066",
388
+ "#CC0099",
389
+ "#CC00CC",
390
+ "#CC00FF",
391
+ "#CC3300",
392
+ "#CC3333",
393
+ "#CC3366",
394
+ "#CC3399",
395
+ "#CC33CC",
396
+ "#CC33FF",
397
+ "#CC6600",
398
+ "#CC6633",
399
+ "#CC9900",
400
+ "#CC9933",
401
+ "#CCCC00",
402
+ "#CCCC33",
403
+ "#FF0000",
404
+ "#FF0033",
405
+ "#FF0066",
406
+ "#FF0099",
407
+ "#FF00CC",
408
+ "#FF00FF",
409
+ "#FF3300",
410
+ "#FF3333",
411
+ "#FF3366",
412
+ "#FF3399",
413
+ "#FF33CC",
414
+ "#FF33FF",
415
+ "#FF6600",
416
+ "#FF6633",
417
+ "#FF9900",
418
+ "#FF9933",
419
+ "#FFCC00",
420
+ "#FFCC33"
421
+ ];
422
+ /**
423
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
424
+ * and the Firebug extension (any Firefox version) are known
425
+ * to support "%c" CSS customizations.
426
+ *
427
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
428
+ */
429
+ function useColors() {
430
+ if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return true;
431
+ if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return false;
432
+ let m;
433
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
434
+ }
435
+ /**
436
+ * Colorize log arguments if enabled.
437
+ *
438
+ * @api public
439
+ */
440
+ function formatArgs(args) {
441
+ args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
442
+ if (!this.useColors) return;
443
+ const c = "color: " + this.color;
444
+ args.splice(1, 0, c, "color: inherit");
445
+ let index = 0;
446
+ let lastC = 0;
447
+ args[0].replace(/%[a-zA-Z%]/g, (match) => {
448
+ if (match === "%%") return;
449
+ index++;
450
+ if (match === "%c") lastC = index;
451
+ });
452
+ args.splice(lastC, 0, c);
453
+ }
454
+ /**
455
+ * Invokes `console.debug()` when available.
456
+ * No-op when `console.debug` is not a "function".
457
+ * If `console.debug` is not available, falls back
458
+ * to `console.log`.
459
+ *
460
+ * @api public
461
+ */
462
+ exports.log = console.debug || console.log || (() => {});
463
+ /**
464
+ * Save `namespaces`.
465
+ *
466
+ * @param {String} namespaces
467
+ * @api private
468
+ */
469
+ function save(namespaces) {
470
+ try {
471
+ if (namespaces) exports.storage.setItem("debug", namespaces);
472
+ else exports.storage.removeItem("debug");
473
+ } catch (error) {}
474
+ }
475
+ /**
476
+ * Load `namespaces`.
477
+ *
478
+ * @return {String} returns the previously persisted debug modes
479
+ * @api private
480
+ */
481
+ function load() {
482
+ let r;
483
+ try {
484
+ r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
485
+ } catch (error) {}
486
+ if (!r && typeof process !== "undefined" && "env" in process) r = process.env.DEBUG;
487
+ return r;
488
+ }
489
+ /**
490
+ * Localstorage attempts to return the localstorage.
491
+ *
492
+ * This is necessary because safari throws
493
+ * when a user disables cookies/localstorage
494
+ * and you attempt to access it.
495
+ *
496
+ * @return {LocalStorage}
497
+ * @api private
498
+ */
499
+ function localstorage() {
500
+ try {
501
+ return localStorage;
502
+ } catch (error) {}
503
+ }
504
+ module.exports = require_common()(exports);
505
+ const { formatters } = module.exports;
506
+ /**
507
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
508
+ */
509
+ formatters.j = function(v) {
510
+ try {
511
+ return JSON.stringify(v);
512
+ } catch (error) {
513
+ return "[UnexpectedJSONParseError]: " + error.message;
514
+ }
515
+ };
516
+ }));
517
+ //#endregion
518
+ //#region ../../../node_modules/.bun/has-flag@4.0.0/node_modules/has-flag/index.js
519
+ var require_has_flag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
520
+ module.exports = (flag, argv = process.argv) => {
521
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
522
+ const position = argv.indexOf(prefix + flag);
523
+ const terminatorPosition = argv.indexOf("--");
524
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
525
+ };
526
+ }));
527
+ //#endregion
528
+ //#region ../../../node_modules/.bun/supports-color@7.2.0/node_modules/supports-color/index.js
529
+ var require_supports_color = /* @__PURE__ */ __commonJSMin(((exports, module) => {
530
+ const os = __require("os");
531
+ const tty$1 = __require("tty");
532
+ const hasFlag = require_has_flag();
533
+ const { env } = process;
534
+ let forceColor;
535
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) forceColor = 0;
536
+ else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) forceColor = 1;
537
+ if ("FORCE_COLOR" in env) if (env.FORCE_COLOR === "true") forceColor = 1;
538
+ else if (env.FORCE_COLOR === "false") forceColor = 0;
539
+ else forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
540
+ function translateLevel(level) {
541
+ if (level === 0) return false;
542
+ return {
543
+ level,
544
+ hasBasic: true,
545
+ has256: level >= 2,
546
+ has16m: level >= 3
547
+ };
548
+ }
549
+ function supportsColor(haveStream, streamIsTTY) {
550
+ if (forceColor === 0) return 0;
551
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
552
+ if (hasFlag("color=256")) return 2;
553
+ if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
554
+ const min = forceColor || 0;
555
+ if (env.TERM === "dumb") return min;
556
+ if (process.platform === "win32") {
557
+ const osRelease = os.release().split(".");
558
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
559
+ return 1;
560
+ }
561
+ if ("CI" in env) {
562
+ if ([
563
+ "TRAVIS",
564
+ "CIRCLECI",
565
+ "APPVEYOR",
566
+ "GITLAB_CI",
567
+ "GITHUB_ACTIONS",
568
+ "BUILDKITE"
569
+ ].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
570
+ return min;
571
+ }
572
+ if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
573
+ if (env.COLORTERM === "truecolor") return 3;
574
+ if ("TERM_PROGRAM" in env) {
575
+ const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
576
+ switch (env.TERM_PROGRAM) {
577
+ case "iTerm.app": return version >= 3 ? 3 : 2;
578
+ case "Apple_Terminal": return 2;
579
+ }
580
+ }
581
+ if (/-256(color)?$/i.test(env.TERM)) return 2;
582
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
583
+ if ("COLORTERM" in env) return 1;
584
+ return min;
585
+ }
586
+ function getSupportLevel(stream) {
587
+ return translateLevel(supportsColor(stream, stream && stream.isTTY));
588
+ }
589
+ module.exports = {
590
+ supportsColor: getSupportLevel,
591
+ stdout: translateLevel(supportsColor(true, tty$1.isatty(1))),
592
+ stderr: translateLevel(supportsColor(true, tty$1.isatty(2)))
593
+ };
594
+ }));
595
+ //#endregion
596
+ //#region ../../../node_modules/.bun/debug@4.4.3/node_modules/debug/src/node.js
597
+ var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
598
+ /**
599
+ * Module dependencies.
600
+ */
601
+ const tty = __require("tty");
602
+ const util = __require("util");
603
+ /**
604
+ * This is the Node.js implementation of `debug()`.
605
+ */
606
+ exports.init = init;
607
+ exports.log = log;
608
+ exports.formatArgs = formatArgs;
609
+ exports.save = save;
610
+ exports.load = load;
611
+ exports.useColors = useColors;
612
+ exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
613
+ /**
614
+ * Colors.
615
+ */
616
+ exports.colors = [
617
+ 6,
618
+ 2,
619
+ 3,
620
+ 4,
621
+ 5,
622
+ 1
623
+ ];
624
+ try {
625
+ const supportsColor = require_supports_color();
626
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) exports.colors = [
627
+ 20,
628
+ 21,
629
+ 26,
630
+ 27,
631
+ 32,
632
+ 33,
633
+ 38,
634
+ 39,
635
+ 40,
636
+ 41,
637
+ 42,
638
+ 43,
639
+ 44,
640
+ 45,
641
+ 56,
642
+ 57,
643
+ 62,
644
+ 63,
645
+ 68,
646
+ 69,
647
+ 74,
648
+ 75,
649
+ 76,
650
+ 77,
651
+ 78,
652
+ 79,
653
+ 80,
654
+ 81,
655
+ 92,
656
+ 93,
657
+ 98,
658
+ 99,
659
+ 112,
660
+ 113,
661
+ 128,
662
+ 129,
663
+ 134,
664
+ 135,
665
+ 148,
666
+ 149,
667
+ 160,
668
+ 161,
669
+ 162,
670
+ 163,
671
+ 164,
672
+ 165,
673
+ 166,
674
+ 167,
675
+ 168,
676
+ 169,
677
+ 170,
678
+ 171,
679
+ 172,
680
+ 173,
681
+ 178,
682
+ 179,
683
+ 184,
684
+ 185,
685
+ 196,
686
+ 197,
687
+ 198,
688
+ 199,
689
+ 200,
690
+ 201,
691
+ 202,
692
+ 203,
693
+ 204,
694
+ 205,
695
+ 206,
696
+ 207,
697
+ 208,
698
+ 209,
699
+ 214,
700
+ 215,
701
+ 220,
702
+ 221
703
+ ];
704
+ } catch (error) {}
705
+ /**
706
+ * Build up the default `inspectOpts` object from the environment variables.
707
+ *
708
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
709
+ */
710
+ exports.inspectOpts = Object.keys(process.env).filter((key) => {
711
+ return /^debug_/i.test(key);
712
+ }).reduce((obj, key) => {
713
+ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
714
+ return k.toUpperCase();
715
+ });
716
+ let val = process.env[key];
717
+ if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
718
+ else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
719
+ else if (val === "null") val = null;
720
+ else val = Number(val);
721
+ obj[prop] = val;
722
+ return obj;
723
+ }, {});
724
+ /**
725
+ * Is stdout a TTY? Colored output is enabled when `true`.
726
+ */
727
+ function useColors() {
728
+ return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
729
+ }
730
+ /**
731
+ * Adds ANSI color escape codes if enabled.
732
+ *
733
+ * @api public
734
+ */
735
+ function formatArgs(args) {
736
+ const { namespace: name, useColors } = this;
737
+ if (useColors) {
738
+ const c = this.color;
739
+ const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
740
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
741
+ args[0] = prefix + args[0].split("\n").join("\n" + prefix);
742
+ args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
743
+ } else args[0] = getDate() + name + " " + args[0];
744
+ }
745
+ function getDate() {
746
+ if (exports.inspectOpts.hideDate) return "";
747
+ return (/* @__PURE__ */ new Date()).toISOString() + " ";
748
+ }
749
+ /**
750
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
751
+ */
752
+ function log(...args) {
753
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + "\n");
754
+ }
755
+ /**
756
+ * Save `namespaces`.
757
+ *
758
+ * @param {String} namespaces
759
+ * @api private
760
+ */
761
+ function save(namespaces) {
762
+ if (namespaces) process.env.DEBUG = namespaces;
763
+ else delete process.env.DEBUG;
764
+ }
765
+ /**
766
+ * Load `namespaces`.
767
+ *
768
+ * @return {String} returns the previously persisted debug modes
769
+ * @api private
770
+ */
771
+ function load() {
772
+ return process.env.DEBUG;
773
+ }
774
+ /**
775
+ * Init logic for `debug` instances.
776
+ *
777
+ * Create a new `inspectOpts` object in case `useColors` is set
778
+ * differently for a particular `debug` instance.
779
+ */
780
+ function init(debug) {
781
+ debug.inspectOpts = {};
782
+ const keys = Object.keys(exports.inspectOpts);
783
+ for (let i = 0; i < keys.length; i++) debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
784
+ }
785
+ module.exports = require_common()(exports);
786
+ const { formatters } = module.exports;
787
+ /**
788
+ * Map %o to `util.inspect()`, all on a single line.
789
+ */
790
+ formatters.o = function(v) {
791
+ this.inspectOpts.colors = this.useColors;
792
+ return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
793
+ };
794
+ /**
795
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
796
+ */
797
+ formatters.O = function(v) {
798
+ this.inspectOpts.colors = this.useColors;
799
+ return util.inspect(v, this.inspectOpts);
800
+ };
801
+ }));
802
+ //#endregion
803
+ //#region ../../../node_modules/.bun/debug@4.4.3/node_modules/debug/src/index.js
804
+ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
805
+ /**
806
+ * Detect Electron renderer / nwjs process, which is node, but we should
807
+ * treat as a browser.
808
+ */
809
+ if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) module.exports = require_browser();
810
+ else module.exports = require_node();
811
+ }));
812
+ //#endregion
813
+ export default require_src();
814
+ export {};