@pandacss/node 0.0.0-dev-20221121152823

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,3659 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esm = (fn, res) => function __init() {
9
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
+ };
11
+ var __commonJS = (cb, mod) => function __require() {
12
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
+ };
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
+ mod
29
+ ));
30
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
+
32
+ // ../../node_modules/.pnpm/tsup@6.5.0_typescript@4.8.4/node_modules/tsup/assets/cjs_shims.js
33
+ var getImportMetaUrl, importMetaUrl;
34
+ var init_cjs_shims = __esm({
35
+ "../../node_modules/.pnpm/tsup@6.5.0_typescript@4.8.4/node_modules/tsup/assets/cjs_shims.js"() {
36
+ getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
37
+ importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
38
+ }
39
+ });
40
+
41
+ // ../../node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js
42
+ var require_eastasianwidth = __commonJS({
43
+ "../../node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js"(exports, module2) {
44
+ init_cjs_shims();
45
+ var eaw = {};
46
+ if ("undefined" == typeof module2) {
47
+ window.eastasianwidth = eaw;
48
+ } else {
49
+ module2.exports = eaw;
50
+ }
51
+ eaw.eastAsianWidth = function(character) {
52
+ var x = character.charCodeAt(0);
53
+ var y = character.length == 2 ? character.charCodeAt(1) : 0;
54
+ var codePoint = x;
55
+ if (55296 <= x && x <= 56319 && (56320 <= y && y <= 57343)) {
56
+ x &= 1023;
57
+ y &= 1023;
58
+ codePoint = x << 10 | y;
59
+ codePoint += 65536;
60
+ }
61
+ if (12288 == codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510) {
62
+ return "F";
63
+ }
64
+ if (8361 == codePoint || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518) {
65
+ return "H";
66
+ }
67
+ if (4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141) {
68
+ return "W";
69
+ }
70
+ if (32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 == codePoint || 175 == codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630) {
71
+ return "Na";
72
+ }
73
+ if (161 == codePoint || 164 == codePoint || 167 <= codePoint && codePoint <= 168 || 170 == codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 == codePoint || 208 == codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 == codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 == codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 == codePoint || 254 == codePoint || 257 == codePoint || 273 == codePoint || 275 == codePoint || 283 == codePoint || 294 <= codePoint && codePoint <= 295 || 299 == codePoint || 305 <= codePoint && codePoint <= 307 || 312 == codePoint || 319 <= codePoint && codePoint <= 322 || 324 == codePoint || 328 <= codePoint && codePoint <= 331 || 333 == codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 == codePoint || 462 == codePoint || 464 == codePoint || 466 == codePoint || 468 == codePoint || 470 == codePoint || 472 == codePoint || 474 == codePoint || 476 == codePoint || 593 == codePoint || 609 == codePoint || 708 == codePoint || 711 == codePoint || 713 <= codePoint && codePoint <= 715 || 717 == codePoint || 720 == codePoint || 728 <= codePoint && codePoint <= 731 || 733 == codePoint || 735 == codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 == codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 == codePoint || 8208 == codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 == codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 == codePoint || 8251 == codePoint || 8254 == codePoint || 8308 == codePoint || 8319 == codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 == codePoint || 8451 == codePoint || 8453 == codePoint || 8457 == codePoint || 8467 == codePoint || 8470 == codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 == codePoint || 8491 == codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 == codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 == codePoint || 8660 == codePoint || 8679 == codePoint || 8704 == codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 == codePoint || 8719 == codePoint || 8721 == codePoint || 8725 == codePoint || 8730 == codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 == codePoint || 8741 == codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 == codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 == codePoint || 8780 == codePoint || 8786 == codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 == codePoint || 8857 == codePoint || 8869 == codePoint || 8895 == codePoint || 8978 == codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 == codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 == codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 == codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 == codePoint || 9758 == codePoint || 9792 == codePoint || 9794 == codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 == codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 == codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 == codePoint || 10071 == codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 == codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109) {
74
+ return "A";
75
+ }
76
+ return "N";
77
+ };
78
+ eaw.characterLength = function(character) {
79
+ var code = this.eastAsianWidth(character);
80
+ if (code == "F" || code == "W" || code == "A") {
81
+ return 2;
82
+ } else {
83
+ return 1;
84
+ }
85
+ };
86
+ function stringToArray(string) {
87
+ return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
88
+ }
89
+ eaw.length = function(string) {
90
+ var characters = stringToArray(string);
91
+ var len = 0;
92
+ for (var i = 0; i < characters.length; i++) {
93
+ len = len + this.characterLength(characters[i]);
94
+ }
95
+ return len;
96
+ };
97
+ eaw.slice = function(text, start, end) {
98
+ textLen = eaw.length(text);
99
+ start = start ? start : 0;
100
+ end = end ? end : 1;
101
+ if (start < 0) {
102
+ start = textLen + start;
103
+ }
104
+ if (end < 0) {
105
+ end = textLen + end;
106
+ }
107
+ var result = "";
108
+ var eawLen = 0;
109
+ var chars = stringToArray(text);
110
+ for (var i = 0; i < chars.length; i++) {
111
+ var char = chars[i];
112
+ var charLen = eaw.length(char);
113
+ if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
114
+ if (eawLen + charLen <= end) {
115
+ result += char;
116
+ } else {
117
+ break;
118
+ }
119
+ }
120
+ eawLen += charLen;
121
+ }
122
+ return result;
123
+ };
124
+ }
125
+ });
126
+
127
+ // ../../node_modules/.pnpm/emoji-regex@9.2.2/node_modules/emoji-regex/index.js
128
+ var require_emoji_regex = __commonJS({
129
+ "../../node_modules/.pnpm/emoji-regex@9.2.2/node_modules/emoji-regex/index.js"(exports, module2) {
130
+ "use strict";
131
+ init_cjs_shims();
132
+ module2.exports = function() {
133
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
134
+ };
135
+ }
136
+ });
137
+
138
+ // ../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/boxes.json
139
+ var require_boxes = __commonJS({
140
+ "../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/boxes.json"(exports, module2) {
141
+ module2.exports = {
142
+ single: {
143
+ topLeft: "\u250C",
144
+ top: "\u2500",
145
+ topRight: "\u2510",
146
+ right: "\u2502",
147
+ bottomRight: "\u2518",
148
+ bottom: "\u2500",
149
+ bottomLeft: "\u2514",
150
+ left: "\u2502"
151
+ },
152
+ double: {
153
+ topLeft: "\u2554",
154
+ top: "\u2550",
155
+ topRight: "\u2557",
156
+ right: "\u2551",
157
+ bottomRight: "\u255D",
158
+ bottom: "\u2550",
159
+ bottomLeft: "\u255A",
160
+ left: "\u2551"
161
+ },
162
+ round: {
163
+ topLeft: "\u256D",
164
+ top: "\u2500",
165
+ topRight: "\u256E",
166
+ right: "\u2502",
167
+ bottomRight: "\u256F",
168
+ bottom: "\u2500",
169
+ bottomLeft: "\u2570",
170
+ left: "\u2502"
171
+ },
172
+ bold: {
173
+ topLeft: "\u250F",
174
+ top: "\u2501",
175
+ topRight: "\u2513",
176
+ right: "\u2503",
177
+ bottomRight: "\u251B",
178
+ bottom: "\u2501",
179
+ bottomLeft: "\u2517",
180
+ left: "\u2503"
181
+ },
182
+ singleDouble: {
183
+ topLeft: "\u2553",
184
+ top: "\u2500",
185
+ topRight: "\u2556",
186
+ right: "\u2551",
187
+ bottomRight: "\u255C",
188
+ bottom: "\u2500",
189
+ bottomLeft: "\u2559",
190
+ left: "\u2551"
191
+ },
192
+ doubleSingle: {
193
+ topLeft: "\u2552",
194
+ top: "\u2550",
195
+ topRight: "\u2555",
196
+ right: "\u2502",
197
+ bottomRight: "\u255B",
198
+ bottom: "\u2550",
199
+ bottomLeft: "\u2558",
200
+ left: "\u2502"
201
+ },
202
+ classic: {
203
+ topLeft: "+",
204
+ top: "-",
205
+ topRight: "+",
206
+ right: "|",
207
+ bottomRight: "+",
208
+ bottom: "-",
209
+ bottomLeft: "+",
210
+ left: "|"
211
+ },
212
+ arrow: {
213
+ topLeft: "\u2198",
214
+ top: "\u2193",
215
+ topRight: "\u2199",
216
+ right: "\u2190",
217
+ bottomRight: "\u2196",
218
+ bottom: "\u2191",
219
+ bottomLeft: "\u2197",
220
+ left: "\u2192"
221
+ }
222
+ };
223
+ }
224
+ });
225
+
226
+ // ../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/index.js
227
+ var require_cli_boxes = __commonJS({
228
+ "../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/index.js"(exports, module2) {
229
+ "use strict";
230
+ init_cjs_shims();
231
+ var cliBoxes2 = require_boxes();
232
+ module2.exports = cliBoxes2;
233
+ module2.exports.default = cliBoxes2;
234
+ }
235
+ });
236
+
237
+ // ../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
238
+ var require_ansi_regex = __commonJS({
239
+ "../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports, module2) {
240
+ "use strict";
241
+ init_cjs_shims();
242
+ module2.exports = ({ onlyFirst = false } = {}) => {
243
+ const pattern = [
244
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
245
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
246
+ ].join("|");
247
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
248
+ };
249
+ }
250
+ });
251
+
252
+ // ../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
253
+ var require_strip_ansi = __commonJS({
254
+ "../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports, module2) {
255
+ "use strict";
256
+ init_cjs_shims();
257
+ var ansiRegex2 = require_ansi_regex();
258
+ module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex2(), "") : string;
259
+ }
260
+ });
261
+
262
+ // ../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
263
+ var require_is_fullwidth_code_point = __commonJS({
264
+ "../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports, module2) {
265
+ "use strict";
266
+ init_cjs_shims();
267
+ var isFullwidthCodePoint = (codePoint) => {
268
+ if (Number.isNaN(codePoint)) {
269
+ return false;
270
+ }
271
+ if (codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141)) {
272
+ return true;
273
+ }
274
+ return false;
275
+ };
276
+ module2.exports = isFullwidthCodePoint;
277
+ module2.exports.default = isFullwidthCodePoint;
278
+ }
279
+ });
280
+
281
+ // ../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
282
+ var require_emoji_regex2 = __commonJS({
283
+ "../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports, module2) {
284
+ "use strict";
285
+ init_cjs_shims();
286
+ module2.exports = function() {
287
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
288
+ };
289
+ }
290
+ });
291
+
292
+ // ../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js
293
+ var require_string_width = __commonJS({
294
+ "../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports, module2) {
295
+ "use strict";
296
+ init_cjs_shims();
297
+ var stripAnsi2 = require_strip_ansi();
298
+ var isFullwidthCodePoint = require_is_fullwidth_code_point();
299
+ var emojiRegex2 = require_emoji_regex2();
300
+ var stringWidth2 = (string) => {
301
+ if (typeof string !== "string" || string.length === 0) {
302
+ return 0;
303
+ }
304
+ string = stripAnsi2(string);
305
+ if (string.length === 0) {
306
+ return 0;
307
+ }
308
+ string = string.replace(emojiRegex2(), " ");
309
+ let width = 0;
310
+ for (let i = 0; i < string.length; i++) {
311
+ const code = string.codePointAt(i);
312
+ if (code <= 31 || code >= 127 && code <= 159) {
313
+ continue;
314
+ }
315
+ if (code >= 768 && code <= 879) {
316
+ continue;
317
+ }
318
+ if (code > 65535) {
319
+ i++;
320
+ }
321
+ width += isFullwidthCodePoint(code) ? 2 : 1;
322
+ }
323
+ return width;
324
+ };
325
+ module2.exports = stringWidth2;
326
+ module2.exports.default = stringWidth2;
327
+ }
328
+ });
329
+
330
+ // ../../node_modules/.pnpm/ansi-align@3.0.1/node_modules/ansi-align/index.js
331
+ var require_ansi_align = __commonJS({
332
+ "../../node_modules/.pnpm/ansi-align@3.0.1/node_modules/ansi-align/index.js"(exports, module2) {
333
+ "use strict";
334
+ init_cjs_shims();
335
+ var stringWidth2 = require_string_width();
336
+ function ansiAlign2(text, opts) {
337
+ if (!text)
338
+ return text;
339
+ opts = opts || {};
340
+ const align = opts.align || "center";
341
+ if (align === "left")
342
+ return text;
343
+ const split = opts.split || "\n";
344
+ const pad = opts.pad || " ";
345
+ const widthDiffFn = align !== "right" ? halfDiff : fullDiff;
346
+ let returnString = false;
347
+ if (!Array.isArray(text)) {
348
+ returnString = true;
349
+ text = String(text).split(split);
350
+ }
351
+ let width;
352
+ let maxWidth = 0;
353
+ text = text.map(function(str) {
354
+ str = String(str);
355
+ width = stringWidth2(str);
356
+ maxWidth = Math.max(width, maxWidth);
357
+ return {
358
+ str,
359
+ width
360
+ };
361
+ }).map(function(obj) {
362
+ return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str;
363
+ });
364
+ return returnString ? text.join(split) : text;
365
+ }
366
+ ansiAlign2.left = function left(text) {
367
+ return ansiAlign2(text, { align: "left" });
368
+ };
369
+ ansiAlign2.center = function center(text) {
370
+ return ansiAlign2(text, { align: "center" });
371
+ };
372
+ ansiAlign2.right = function right(text) {
373
+ return ansiAlign2(text, { align: "right" });
374
+ };
375
+ module2.exports = ansiAlign2;
376
+ function halfDiff(maxWidth, curWidth) {
377
+ return Math.floor((maxWidth - curWidth) / 2);
378
+ }
379
+ function fullDiff(maxWidth, curWidth) {
380
+ return maxWidth - curWidth;
381
+ }
382
+ }
383
+ });
384
+
385
+ // src/index.ts
386
+ var src_exports = {};
387
+ __export(src_exports, {
388
+ Builder: () => Builder,
389
+ createContext: () => createContext,
390
+ discardDuplicate: () => import_core5.discardDuplicate,
391
+ emitAndExtract: () => emitAndExtract,
392
+ emitArtifacts: () => emitArtifacts,
393
+ execCommand: () => execCommand,
394
+ generate: () => generate5,
395
+ loadConfigAndCreateContext: () => loadConfigAndCreateContext,
396
+ setupConfig: () => setupConfig,
397
+ setupPostcss: () => setupPostcss
398
+ });
399
+ module.exports = __toCommonJS(src_exports);
400
+ init_cjs_shims();
401
+ var import_core5 = require("@pandacss/core");
402
+
403
+ // src/artifacts.ts
404
+ init_cjs_shims();
405
+
406
+ // src/chunks.ts
407
+ init_cjs_shims();
408
+ var import_core = require("@pandacss/core");
409
+ var import_logger2 = require("@pandacss/logger");
410
+
411
+ // src/extract.ts
412
+ init_cjs_shims();
413
+ var import_logger = require("@pandacss/logger");
414
+ function extractFile(ctx, file) {
415
+ import_logger.logger.debug({ type: "file:extract", file });
416
+ let data;
417
+ let result;
418
+ const done = import_logger.logger.time.debug("Extracted", (0, import_logger.quote)(file));
419
+ try {
420
+ const source = ctx.getSourceFile(file);
421
+ data = ctx.parseSourceFile(source);
422
+ } catch (error) {
423
+ import_logger.logger.error({ err: error });
424
+ }
425
+ if (data) {
426
+ result = ctx.collectStyles(data, file);
427
+ }
428
+ if (result) {
429
+ done();
430
+ }
431
+ return result;
432
+ }
433
+ function extractFiles(ctx) {
434
+ return ctx.extract(async (file) => {
435
+ const result = extractFile(ctx, file);
436
+ if (result) {
437
+ await ctx.chunks.write(file, result.css);
438
+ return result;
439
+ }
440
+ });
441
+ }
442
+
443
+ // src/chunks.ts
444
+ async function extractChunks(ctx) {
445
+ const sheet = new import_core.Stylesheet(ctx.context(), {
446
+ content: [
447
+ "@layer reset, base, tokens, recipes, utilities;",
448
+ ctx.preflight && "@import './reset.css';",
449
+ !ctx.tokens.isEmpty && "@import './tokens/index.css';",
450
+ ctx.keyframes && "@import './tokens/keyframes.css';"
451
+ ].filter(Boolean).join("\n\n")
452
+ });
453
+ const files = ctx.chunks.getFiles();
454
+ await Promise.all(
455
+ files.map(async (file) => {
456
+ const css2 = await ctx.chunks.readFile(file);
457
+ sheet.append(css2);
458
+ })
459
+ );
460
+ return sheet.toCss({ minify: ctx.minify });
461
+ }
462
+ async function bundleChunks(ctx) {
463
+ const css2 = await extractChunks(ctx);
464
+ await ctx.write(ctx.outdir, [{ file: "styles.css", code: css2 }]);
465
+ }
466
+ async function writeFileChunk(ctx, file) {
467
+ import_logger2.logger.info(`File changed: ${file}`);
468
+ const result = extractFile(ctx, file);
469
+ if (result) {
470
+ await ctx.chunks.write(result.file, result.css);
471
+ }
472
+ }
473
+
474
+ // src/generators/index.ts
475
+ init_cjs_shims();
476
+ var import_fs2 = require("fs");
477
+ var import_look_it_up = require("look-it-up");
478
+ var import_outdent19 = __toESM(require("outdent"));
479
+ var import_path2 = require("path");
480
+
481
+ // src/generators/conditions.ts
482
+ init_cjs_shims();
483
+ var import_shared = require("@pandacss/shared");
484
+ var import_outdent = __toESM(require("outdent"));
485
+ function generateConditions(ctx) {
486
+ const keys = Object.keys(ctx.conditions.values).concat("_", "base");
487
+ return {
488
+ js: import_outdent.default`
489
+ const conditions = new Set([${keys.map((key) => JSON.stringify(key))}])
490
+
491
+ export function isCondition(value){
492
+ return conditions.has(value) || /^@|&|&$/.test(value)
493
+ }
494
+
495
+ export function sortConditions(paths){
496
+ return paths.sort((a, b) => {
497
+ const aa = isCondition(a)
498
+ const bb = isCondition(b)
499
+ if (aa && !bb) return 1
500
+ if (!aa && bb) return -1
501
+ return 0
502
+ })
503
+ }
504
+ `,
505
+ dts: import_outdent.default`
506
+ export type Condition = ${(0, import_shared.unionType)(keys)}
507
+ export type Conditions = Record<Condition, string>
508
+ `
509
+ };
510
+ }
511
+
512
+ // src/generators/css-fn.ts
513
+ init_cjs_shims();
514
+ var import_outdent2 = require("outdent");
515
+ var stringify = (v) => JSON.stringify(Object.fromEntries(v), null, 2);
516
+ function generateCssFn(ctx) {
517
+ const { utility, hash } = ctx;
518
+ const { separator } = utility;
519
+ return {
520
+ dts: import_outdent2.outdent`
521
+ import { CssObject } from '../types'
522
+ export declare function css(styles: CssObject): string
523
+ `,
524
+ js: import_outdent2.outdent`
525
+ import { createCss, withoutSpace } from "../helpers"
526
+ import { sortConditions } from "./conditions"
527
+
528
+ const classNameMap = ${stringify(utility.entries())}
529
+ const shorthands = ${stringify(utility.shorthands)}
530
+
531
+ const hasShorthand = ${utility.hasShorthand ? "true" : "false"}
532
+
533
+ const resolveShorthand = (prop) => shorthands[prop] || prop
534
+
535
+ function transform(prop, value) {
536
+ let key = resolveShorthand(prop)
537
+ let propKey = classNameMap[key] || prop
538
+ let className = \`$\{propKey}${separator}$\{withoutSpace(value)}\`
539
+ return { className }
540
+ }
541
+
542
+ const context = {
543
+ transform,
544
+ conditions: { shift: sortConditions },
545
+ hash: ${hash ? "true" : "false"},
546
+ hasShorthand,
547
+ resolveShorthand,
548
+ }
549
+
550
+ export const css = createCss(context)
551
+ `
552
+ };
553
+ }
554
+
555
+ // src/generators/css-map.ts
556
+ init_cjs_shims();
557
+ var import_outdent3 = require("outdent");
558
+ function generateCssMap() {
559
+ return {
560
+ js: import_outdent3.outdent`
561
+ import { css } from "./css"
562
+
563
+ export function cssMap(obj){
564
+ return (...args) => {
565
+ const finalCss = args.reduce((acc, arg) => {
566
+ Object.assign(acc, obj[arg]);
567
+ return acc;
568
+ }, {})
569
+ return css(finalCss);
570
+ }
571
+ }
572
+ `,
573
+ dts: import_outdent3.outdent`
574
+ import { CssObject } from "../types"
575
+
576
+ export declare function cssMap<T extends string>(obj: Record<T, CssObject>): (...args: Array<T>) => string;
577
+ `
578
+ };
579
+ }
580
+
581
+ // src/generators/cx.ts
582
+ init_cjs_shims();
583
+ var import_outdent4 = __toESM(require("outdent"));
584
+ function generateCx() {
585
+ return {
586
+ js: import_outdent4.default`
587
+ function cx() {
588
+ let str = '',
589
+ i = 0,
590
+ arg
591
+
592
+ while (i < arguments.length) {
593
+ if ((arg = arguments[i++]) && typeof arg === 'string') {
594
+ str && (str += ' ')
595
+ str += arg
596
+ }
597
+ }
598
+ return str
599
+ }
600
+
601
+ export { cx }
602
+ `,
603
+ dts: import_outdent4.default`
604
+ type Argument = string | boolean | null | undefined
605
+ export declare function cx(...args: Argument[]): string
606
+ `
607
+ };
608
+ }
609
+
610
+ // src/generators/get-entrypoint.ts
611
+ init_cjs_shims();
612
+ var import_module = require("module");
613
+ var import_path = require("path");
614
+ var req = typeof globalThis.require === "function" ? globalThis.require : (0, import_module.createRequire)(importMetaUrl);
615
+ function getEntrypoint(pkg, file) {
616
+ const { dev, prod = dev } = file;
617
+ const entry = req.resolve(pkg);
618
+ const isDist = entry.includes("dist");
619
+ const isType = pkg.includes("/types");
620
+ if (isType) {
621
+ return (0, import_path.join)((0, import_path.dirname)(entry), dev);
622
+ }
623
+ if (!isDist) {
624
+ return (0, import_path.join)((0, import_path.dirname)(entry), "src", dev);
625
+ }
626
+ return (0, import_path.join)((0, import_path.dirname)(entry), prod);
627
+ }
628
+
629
+ // src/generators/global-css.ts
630
+ init_cjs_shims();
631
+ var import_outdent5 = require("outdent");
632
+ function generateGlobalCss() {
633
+ return {
634
+ js: import_outdent5.outdent`
635
+ export function globalCss(styles){
636
+ void styles
637
+ }
638
+ `,
639
+ dts: import_outdent5.outdent`
640
+ import { Properties } from '../types/csstype'
641
+
642
+ export type GlobalCss = Record<string, Properties>
643
+
644
+ export declare function globalCss(styles: GlobalCss): void;
645
+ `
646
+ };
647
+ }
648
+
649
+ // src/generators/is-valid-prop.ts
650
+ init_cjs_shims();
651
+ var import_fs = require("fs");
652
+ function generateisValidProp(ctx) {
653
+ const filePath = getEntrypoint("@pandacss/is-valid-prop", { dev: "index.ts", prod: "index.mjs" });
654
+ let content = (0, import_fs.readFileSync)(filePath, "utf8");
655
+ content = content.replace(
656
+ "var userGenerated = []",
657
+ `var userGenerated = [${ctx.properties.map((key) => JSON.stringify(key)).join(",")}]`
658
+ );
659
+ return {
660
+ js: content
661
+ };
662
+ }
663
+
664
+ // src/generators/jsx/index.ts
665
+ init_cjs_shims();
666
+
667
+ // src/generators/jsx/preact-jsx.ts
668
+ init_cjs_shims();
669
+ var import_shared2 = require("@pandacss/shared");
670
+ var import_outdent6 = require("outdent");
671
+ function generatePreactJsxFactory(ctx) {
672
+ const name = ctx.jsxFactory;
673
+ const upperName = (0, import_shared2.capitalize)(name);
674
+ return {
675
+ dts: import_outdent6.outdent`
676
+ import type { ComponentProps, JSX } from 'preact'
677
+ import type { CssProperties, CssObject } from '../types'
678
+
679
+ type Element = keyof JSX.IntrinsicElements
680
+
681
+ type Merge<P, T> = Omit<P, 'color'> & T;
682
+
683
+ export type HTML${upperName}Props<T extends Element> = Merge<ComponentProps<T>, CssProperties> & { css?: CssObject }
684
+
685
+ type JSXFactory = {
686
+ [K in Element]: (props: HTML${upperName}Props<K>) => JSX.Element
687
+ }
688
+
689
+ export declare const ${name}: JSXFactory
690
+ `,
691
+ js: import_outdent6.outdent`
692
+ import { h } from 'preact';
693
+ import { forwardRef } from 'preact/compat';
694
+ import { isCssProperty } from './is-valid-prop'
695
+ import { css } from '../css'
696
+
697
+ function cx(...args) {
698
+ return args.filter(Boolean).join(' ')
699
+ }
700
+
701
+ function splitProps(props) {
702
+ const styleProps = {}
703
+ const elementProps = {}
704
+
705
+ for (const [key, value] of Object.entries(props)) {
706
+ if (isCssProperty(key)) {
707
+ styleProps[key] = value
708
+ } else {
709
+ elementProps[key] = value
710
+ }
711
+ }
712
+
713
+ return [styleProps, elementProps]
714
+ }
715
+
716
+ function styled(Dynamic) {
717
+ const ${upperName}Component = forwardRef((props, ref) => {
718
+ const { as: Element = Dynamic, ...restProps } = props
719
+
720
+ const [styleProps, elementProps] = splitProps(restProps)
721
+
722
+ const classes = () => {
723
+ const { css: cssStyles, ...otherStyles } = styleProps
724
+ const atomicClass = css({ ...otherStyles, ...cssStyles })
725
+ return cx(atomicClass, elementProps.className)
726
+ }
727
+
728
+ return h(Element, { ...elementProps, ref, className: classes() });
729
+ })
730
+
731
+ ${upperName}Component.displayName = \`${name}.\${Dynamic}\`
732
+ return ${upperName}Component
733
+ }
734
+
735
+ function createFactory() {
736
+ const cache = new Map()
737
+
738
+ return new Proxy(Object.create(null), {
739
+ get(_, el) {
740
+ if (!cache.has(el)) {
741
+ cache.set(el, styled(el))
742
+ }
743
+ return cache.get(el)
744
+ },
745
+ })
746
+ }
747
+
748
+ export const ${name} = createFactory();
749
+ `
750
+ };
751
+ }
752
+
753
+ // src/generators/jsx/preact-pattern.ts
754
+ init_cjs_shims();
755
+ var import_shared3 = require("@pandacss/shared");
756
+ var import_outdent7 = require("outdent");
757
+ function generate(name, pattern, jsxFactory) {
758
+ const upperName = (0, import_shared3.capitalize)(name);
759
+ const jsxName = pattern.jsx ?? upperName;
760
+ const keys = Object.keys(pattern.properties ?? {});
761
+ return {
762
+ name: (0, import_shared3.dashCase)(name),
763
+ js: import_outdent7.outdent`
764
+ import { forwardRef } from 'preact/compat'
765
+ import { ${jsxFactory} } from './factory'
766
+ import { config } from '../patterns/${(0, import_shared3.dashCase)(name)}'
767
+
768
+ export const ${jsxName} = forwardRef(function ${jsxName}(props, ref) {
769
+ const { ${keys.join(", ")}, ...restProps } = props
770
+ const styleProps = config.transform({${keys.join(", ")}})
771
+ return <${jsxFactory}.div ref={ref} {...styleProps} {...restProps} />
772
+ })
773
+ `,
774
+ dts: import_outdent7.outdent`
775
+ import { ComponentProps, JSX, ComponentChildren } from 'preact';
776
+ import { ${upperName}Options } from '../patterns/${(0, import_shared3.dashCase)(name)}'
777
+ import { CssObject } from '../types'
778
+
779
+ type ElementType = keyof JSX.IntrinsicElements
780
+ type PropsWithChildren<T> = T & { children?: ComponentChildren }
781
+
782
+ type Merge<T, U> = Omit<T, keyof U> & U
783
+ type PropsOf<C extends ElementType> = ComponentProps<C>
784
+ type StyleProps = CssObject & { css?: CssObject }
785
+
786
+ type Polymorphic<C extends ElementType = 'div', P = {}> = StyleProps &
787
+ Merge<PropsWithChildren<PropsOf<C>>, P & { as?: C; color?: string }>
788
+
789
+ type ${jsxName}Props<C extends ElementType> = Polymorphic<C, ${upperName}Options>
790
+
791
+ export declare function ${jsxName}<V extends ElementType>(props: ${jsxName}Props<V>): JSX.Element
792
+ `
793
+ };
794
+ }
795
+ function generatePreactJsxPattern(ctx) {
796
+ if (!ctx.hasPattern)
797
+ return [];
798
+ return Object.entries(ctx.patterns).map(([name, pattern]) => generate(name, pattern, ctx.jsxFactory));
799
+ }
800
+
801
+ // src/generators/jsx/react-jsx.ts
802
+ init_cjs_shims();
803
+ var import_shared4 = require("@pandacss/shared");
804
+ var import_outdent8 = require("outdent");
805
+ function generateReactJsxFactory(ctx) {
806
+ const name = ctx.jsxFactory;
807
+ const upperName = (0, import_shared4.capitalize)(name);
808
+ return {
809
+ dts: import_outdent8.outdent`
810
+ import type { ComponentProps } from "react"
811
+ import type { CssProperties, CssObject } from "../types"
812
+
813
+ type Element = keyof JSX.IntrinsicElements
814
+
815
+ type Merge<P, T> = Omit<P, "color"> & T;
816
+
817
+ export type HTML${upperName}Props<T extends Element> = Merge<ComponentProps<T>, CssProperties> & { css?: CssObject }
818
+
819
+ type JSXFactory = {
820
+ [K in Element]: (props: HTML${upperName}Props<K>) => JSX.Element
821
+ }
822
+
823
+ export declare const ${name}: JSXFactory
824
+ `,
825
+ js: import_outdent8.outdent`
826
+ import { forwardRef } from 'react'
827
+ import { isCssProperty } from './is-valid-prop'
828
+ import { css } from '../css'
829
+
830
+ function cx(...args) {
831
+ return args.filter(Boolean).join(' ')
832
+ }
833
+
834
+ function splitProps(props) {
835
+ const styleProps = {}
836
+ const elementProps = {}
837
+
838
+ for (const [key, value] of Object.entries(props)) {
839
+ if (isCssProperty(key)) {
840
+ styleProps[key] = value
841
+ } else {
842
+ elementProps[key] = value
843
+ }
844
+ }
845
+
846
+ return [styleProps, elementProps]
847
+ }
848
+
849
+ function styled(Dynamic) {
850
+ const ${upperName}Component = forwardRef((props, ref) => {
851
+ const { as: Element = Dynamic, ...restProps } = props
852
+
853
+ const [styleProps, elementProps] = splitProps(restProps)
854
+
855
+ const classes = () => {
856
+ const { css: cssStyles, ...otherStyles } = styleProps
857
+ const atomicClass = css({ ...otherStyles, ...cssStyles })
858
+ return cx(atomicClass, elementProps.className)
859
+ }
860
+
861
+ return <Element ref={ref} {...elementProps} className={classes()} />
862
+ })
863
+
864
+ ${upperName}Component.displayName = \`${name}.\${Dynamic}\`
865
+ return ${upperName}Component
866
+ }
867
+
868
+ function createFactory() {
869
+ const cache = new Map()
870
+
871
+ return new Proxy(Object.create(null), {
872
+ get(_, el) {
873
+ if (!cache.has(el)) {
874
+ cache.set(el, styled(el))
875
+ }
876
+ return cache.get(el)
877
+ },
878
+ })
879
+ }
880
+
881
+ export const ${name} = createFactory();
882
+ `
883
+ };
884
+ }
885
+
886
+ // src/generators/jsx/react-pattern.ts
887
+ init_cjs_shims();
888
+ var import_shared5 = require("@pandacss/shared");
889
+ var import_outdent9 = require("outdent");
890
+ function generate2(name, pattern, jsxFactory) {
891
+ const upperName = (0, import_shared5.capitalize)(name);
892
+ const jsxName = pattern.jsx ?? upperName;
893
+ const keys = Object.keys(pattern.properties ?? {});
894
+ return {
895
+ name: (0, import_shared5.dashCase)(name),
896
+ js: import_outdent9.outdent`
897
+ import { forwardRef } from 'react'
898
+ import { ${jsxFactory} } from './factory'
899
+ import { config } from '../patterns/${(0, import_shared5.dashCase)(name)}'
900
+
901
+ export const ${jsxName} = forwardRef(function ${jsxName}(props, ref) {
902
+ const { ${keys.join(", ")}, ...restProps } = props
903
+ const styleProps = config.transform({${keys.join(", ")}})
904
+ return <${jsxFactory}.div ref={ref} {...styleProps} {...restProps} />
905
+ })
906
+ `,
907
+ dts: import_outdent9.outdent`
908
+ import { ComponentProps, ElementType, PropsWithChildren } from 'react'
909
+ import { ${upperName}Options } from '../patterns/${(0, import_shared5.dashCase)(name)}'
910
+ import { CssObject } from '../types'
911
+
912
+ type Merge<T, U> = Omit<T, keyof U> & U
913
+ type PropsOf<C extends ElementType> = ComponentProps<C>
914
+ type StyleProps = CssObject & { css?: CssObject }
915
+
916
+ type Polymorphic<C extends ElementType = 'div', P = {}> = StyleProps &
917
+ Merge<PropsWithChildren<PropsOf<C>>, P & { as?: C; color?: string }>
918
+
919
+ type ${jsxName}Props<C extends ElementType> = Polymorphic<C, ${upperName}Options>
920
+
921
+ export declare function ${jsxName}<V extends ElementType>(props: ${jsxName}Props<V>): JSX.Element
922
+ `
923
+ };
924
+ }
925
+ function generateReactJsxPattern(ctx) {
926
+ if (!ctx.hasPattern)
927
+ return [];
928
+ return Object.entries(ctx.patterns).map(([name, pattern]) => generate2(name, pattern, ctx.jsxFactory));
929
+ }
930
+
931
+ // src/generators/jsx/solid-jsx.ts
932
+ init_cjs_shims();
933
+ var import_shared6 = require("@pandacss/shared");
934
+ var import_outdent10 = require("outdent");
935
+ function generateSolidJsxFactory(ctx) {
936
+ const name = ctx.jsxFactory;
937
+ const upperName = (0, import_shared6.capitalize)(name);
938
+ return {
939
+ dts: import_outdent10.outdent`
940
+ import type { JSX } from 'solid-js'
941
+ import type { CssProperties, CssObject } from '../types'
942
+
943
+ type Element = keyof JSX.IntrinsicElements
944
+
945
+ type Merge<P, T> = Omit<P, 'color'> & T;
946
+
947
+ export type HTML${upperName}Props<T extends Element> = Merge<JSX.IntrinsicElements[T], CssProperties> & { css?: CssObject }
948
+
949
+ type JSXFactory = {
950
+ [K in Element]: (props: HTML${upperName}Props<K>) => JSX.Element
951
+ }
952
+
953
+ export declare const ${name}: JSXFactory
954
+ `,
955
+ js: import_outdent10.outdent`
956
+ import { Dynamic } from 'solid-js/web';
957
+ import { mergeProps, splitProps } from 'solid-js';
958
+ import { allCssProperties } from './is-valid-prop'
959
+ import { css } from '../css'
960
+
961
+ function cx(...args) {
962
+ return args.filter(Boolean).join(' ')
963
+ }
964
+
965
+ function styled(element) {
966
+ return function ${upperName}Component(props) {
967
+ const mergedProps = mergeProps({ as: element }, props)
968
+
969
+ const [localProps, styleProps, elementProps] = splitProps(
970
+ mergedProps,
971
+ ['as', 'class', 'className'],
972
+ allCssProperties
973
+ )
974
+
975
+ const classes = () => {
976
+ const { css: cssStyles, ...otherStyles } = styleProps
977
+ const atomicClass = css({ ...otherStyles, ...cssStyles })
978
+ return cx(atomicClass, localProps.class, localProps.className)
979
+ }
980
+
981
+ return <Dynamic component={localProps.as} {...elementProps} class={classes()} />
982
+ }
983
+ }
984
+
985
+ function createFactory() {
986
+ const cache = new Map();
987
+
988
+ return new Proxy(Object.create(null), {
989
+ get(_, el) {
990
+ if (!cache.has(el)) {
991
+ cache.set(el, styled(el));
992
+ }
993
+ return cache.get(el);
994
+ },
995
+ })
996
+ }
997
+
998
+ export const ${name} = createFactory();
999
+ `
1000
+ };
1001
+ }
1002
+
1003
+ // src/generators/jsx/solid-pattern.ts
1004
+ init_cjs_shims();
1005
+ var import_shared7 = require("@pandacss/shared");
1006
+ var import_outdent11 = require("outdent");
1007
+ function generate3(name, pattern, jsxFactory) {
1008
+ const upperName = (0, import_shared7.capitalize)(name);
1009
+ const jsxName = pattern.jsx ?? upperName;
1010
+ const keys = Object.keys(pattern.properties ?? {});
1011
+ return {
1012
+ name: (0, import_shared7.dashCase)(name),
1013
+ js: import_outdent11.outdent`
1014
+ import { splitProps } from 'solid-js'
1015
+ import { ${jsxFactory} } from './factory'
1016
+ import { config } from '../patterns/${(0, import_shared7.dashCase)(name)}'
1017
+
1018
+ export function ${jsxName}(props) {
1019
+ const [patternProps, restProps] = splitProps(props, [${keys.map((v) => JSON.stringify(v)).join(", ")}]);
1020
+ const styleProps = config.transform(patternProps)
1021
+ return <${jsxFactory}.div {...styleProps} {...restProps} />
1022
+ }
1023
+ `,
1024
+ dts: import_outdent11.outdent`
1025
+ import { ComponentProps, JSX } from 'solid-js'
1026
+ import { ${upperName}Options } from '../patterns/${(0, import_shared7.dashCase)(name)}'
1027
+ import { CssObject } from '../types'
1028
+
1029
+ type ElementType = keyof JSX.IntrinsicElements
1030
+ type PropsOf<C extends ElementType> = ComponentProps<C>
1031
+ type StyleProps = CssObject & { css?: CssObject }
1032
+ type Merge<T, U> = Omit<T, keyof U> & U
1033
+
1034
+ type Polymorphic<C extends ElementType = 'div', P = {}> = StyleProps &
1035
+ Merge<PropsOf<C>, P & { as?: C; color?: string }>
1036
+
1037
+ type ${jsxName}Props<C extends ElementType> = Polymorphic<C, ${upperName}Options>
1038
+
1039
+ export declare function ${jsxName}<V extends ElementType>(props: ${jsxName}Props<V>): JSX.Element
1040
+ `
1041
+ };
1042
+ }
1043
+ function generateSolidJsxPattern(ctx) {
1044
+ if (!ctx.hasPattern)
1045
+ return [];
1046
+ return Object.entries(ctx.patterns).map(([name, pattern]) => generate3(name, pattern, ctx.jsxFactory));
1047
+ }
1048
+
1049
+ // src/generators/jsx/index.ts
1050
+ var factoryMap = {
1051
+ react: generateReactJsxFactory,
1052
+ solid: generateSolidJsxFactory,
1053
+ preact: generatePreactJsxFactory
1054
+ };
1055
+ function generateJsxFactory(ctx) {
1056
+ return factoryMap[ctx.jsxFramework](ctx);
1057
+ }
1058
+ var patternMap = {
1059
+ react: generateReactJsxPattern,
1060
+ solid: generateSolidJsxPattern,
1061
+ preact: generatePreactJsxPattern
1062
+ };
1063
+ function generateJsxPatterns(ctx) {
1064
+ return patternMap[ctx.jsxFramework](ctx);
1065
+ }
1066
+
1067
+ // src/generators/pattern.ts
1068
+ init_cjs_shims();
1069
+ var import_shared8 = require("@pandacss/shared");
1070
+ var import_outdent12 = require("outdent");
1071
+ var import_telejson = require("telejson");
1072
+ var import_ts_pattern = require("ts-pattern");
1073
+ function generate4(name, pattern) {
1074
+ const { properties, transform, strict } = pattern;
1075
+ return {
1076
+ name: (0, import_shared8.dashCase)(name),
1077
+ dts: import_outdent12.outdent`
1078
+ import { CssObject, ConditionalValue } from "../types"
1079
+ import { Properties } from "../types/csstype"
1080
+ import { Tokens } from "../types/token"
1081
+
1082
+ export type ${(0, import_shared8.capitalize)(name)}Options = {
1083
+ ${Object.keys(properties ?? {}).map((key) => {
1084
+ const value = properties[key];
1085
+ return (0, import_ts_pattern.match)(value).with({ type: "property" }, (value2) => {
1086
+ return `${key}?: CssObject["${value2.value}"]`;
1087
+ }).with({ type: "token" }, (value2) => {
1088
+ if (value2.property) {
1089
+ return `${key}?: ConditionalValue<Tokens["${value2.value}"] | Properties["${value2.property}"]>`;
1090
+ }
1091
+ return `${key}?: ConditionalValue<Tokens["${value2.value}"]>`;
1092
+ }).with({ type: "enum" }, (value2) => {
1093
+ return `${key}?: ConditionalValue<${(0, import_shared8.unionType)(value2.value)}>`;
1094
+ }).otherwise(() => {
1095
+ return `${key}?: ConditionalValue<${value.type}>`;
1096
+ });
1097
+ }).join("\n ")}
1098
+ }
1099
+
1100
+ ${strict ? import_outdent12.outdent`export declare function ${name}(options: ${(0, import_shared8.capitalize)(name)}Options): string` : import_outdent12.outdent`
1101
+ type Merge<T> = Omit<CssObject, keyof T> & T
1102
+ export declare function ${name}(options: Merge<${(0, import_shared8.capitalize)(name)}Options>): string
1103
+ `}
1104
+
1105
+ `,
1106
+ js: import_outdent12.outdent`
1107
+ import { mapObject } from "../helpers"
1108
+ import { css } from "../css"
1109
+
1110
+ export const config = ${(0, import_telejson.stringify)({ transform })}
1111
+
1112
+ export const ${name} = (styles) => css(config.transform(styles, { map: mapObject }))
1113
+ `.replace(/"_function_([^|]*)\|(.*)"/, "$2").replace(/\\"/g, '"').replace("return", "; return").replace(";;", ";")
1114
+ };
1115
+ }
1116
+ function generatePattern(ctx) {
1117
+ if (!ctx.hasPattern)
1118
+ return;
1119
+ return Object.entries(ctx.patterns).map(([name, pattern]) => generate4(name, pattern));
1120
+ }
1121
+
1122
+ // src/generators/prop-types.ts
1123
+ init_cjs_shims();
1124
+ var import_outdent13 = require("outdent");
1125
+ function generatePropTypes(utility) {
1126
+ const result = [
1127
+ import_outdent13.outdent`
1128
+ import { Properties as CSSProperties } from "./csstype"
1129
+
1130
+ type BasePropTypes = {`
1131
+ ];
1132
+ const types = utility.getTypes();
1133
+ for (const [prop, values] of types.entries()) {
1134
+ result.push(` ${prop}: ${values.join(" | ")};`);
1135
+ }
1136
+ result.push("}", "\n");
1137
+ result.push(`
1138
+ type CssProp<T> = T extends keyof CSSProperties ? CSSProperties[T] : (string & {})
1139
+
1140
+ type BaseProp<T> = T extends keyof BasePropTypes ? BasePropTypes[T] : (string & {})
1141
+
1142
+ type Shorthand<T> = CssProp<T> | BaseProp<T>
1143
+
1144
+ export type PropTypes = BasePropTypes & {
1145
+ `);
1146
+ utility.shorthands.forEach((value, key) => {
1147
+ result.push(` ${key}: Shorthand<${JSON.stringify(value)}>;`);
1148
+ });
1149
+ result.push("}");
1150
+ return result.join("\n");
1151
+ }
1152
+
1153
+ // src/generators/recipe.ts
1154
+ init_cjs_shims();
1155
+ var import_shared9 = require("@pandacss/shared");
1156
+ var import_outdent14 = require("outdent");
1157
+ function generateRecipes(ctx) {
1158
+ const { recipes = {}, hash, hasRecipes, utility } = ctx;
1159
+ const { separator } = utility;
1160
+ if (!hasRecipes)
1161
+ return;
1162
+ const js = [
1163
+ import_outdent14.outdent`
1164
+ import { createCss, withoutSpace } from "../helpers"
1165
+
1166
+ const createRecipe = (name) => {
1167
+ return (styles) => {
1168
+ const transform = (prop, value) => {
1169
+ if (value === '__ignore__') {
1170
+ return { className: name }
1171
+ }
1172
+
1173
+ value = withoutSpace(value)
1174
+ return { className: \`\${name}--\${prop}${separator}\${value}\` }
1175
+ }
1176
+
1177
+ const context = ${hash ? "{ transform, hash: true }" : "{ transform }"}
1178
+ const css = createCss(context)
1179
+
1180
+ return css({ [name]: '__ignore__' , ...styles })
1181
+ }
1182
+ }
1183
+ `
1184
+ ];
1185
+ const dts = [""];
1186
+ Object.values(recipes).forEach((recipe) => {
1187
+ js.push(import_outdent14.outdent`
1188
+ export const ${recipe.name} = createRecipe('${recipe.name}')
1189
+ `);
1190
+ dts.push(import_outdent14.outdent`
1191
+ import { ConditionalValue } from "../types"
1192
+
1193
+ export type ${(0, import_shared9.capitalize)(recipe.name)}Value = {
1194
+ ${Object.keys(recipe.variants ?? {}).map((key) => {
1195
+ const value = recipe.variants[key];
1196
+ const keys = Object.keys(value);
1197
+ return `${key}?: ConditionalValue<${(0, import_shared9.unionType)(keys)}>`;
1198
+ }).join("\n")}
1199
+ }
1200
+
1201
+ export declare function ${recipe.name}(value: ${(0, import_shared9.capitalize)(recipe.name)}Value): string
1202
+ `);
1203
+ });
1204
+ return {
1205
+ js: import_outdent14.outdent.string(js.join("\n\n")),
1206
+ dts: import_outdent14.outdent.string(dts.join("\n\n"))
1207
+ };
1208
+ }
1209
+
1210
+ // src/generators/reset.ts
1211
+ init_cjs_shims();
1212
+ var css = (v) => v[0];
1213
+ var reset = css`
1214
+ * {
1215
+ margin: 0;
1216
+ }
1217
+
1218
+ *,
1219
+ *::before,
1220
+ *::after {
1221
+ box-sizing: border-box;
1222
+ border-width: 0;
1223
+ border-style: solid;
1224
+ }
1225
+
1226
+ html,
1227
+ body {
1228
+ height: 100%;
1229
+ }
1230
+
1231
+ body {
1232
+ line-height: 1.5;
1233
+ -webkit-text-size-adjust: 100%;
1234
+ -webkit-font-smoothing: antialiased;
1235
+ }
1236
+
1237
+ img {
1238
+ border-style: none;
1239
+ }
1240
+
1241
+ img,
1242
+ picture,
1243
+ video,
1244
+ canvas,
1245
+ svg {
1246
+ display: block;
1247
+ max-width: 100%;
1248
+ }
1249
+
1250
+ input,
1251
+ button,
1252
+ textarea,
1253
+ select {
1254
+ font: inherit;
1255
+ }
1256
+
1257
+ p,
1258
+ h1,
1259
+ h2,
1260
+ h3,
1261
+ h4,
1262
+ h5,
1263
+ h6 {
1264
+ overflow-wrap: break-word;
1265
+ }
1266
+
1267
+ ::-webkit-search-decoration {
1268
+ -webkit-appearance: none;
1269
+ }
1270
+
1271
+ ::-webkit-file-upload-button {
1272
+ -webkit-appearance: button;
1273
+ font: inherit;
1274
+ }
1275
+
1276
+ ::-webkit-inner-spin-button,
1277
+ ::-webkit-outer-spin-button {
1278
+ height: auto;
1279
+ }
1280
+
1281
+ code,
1282
+ kbd,
1283
+ pre,
1284
+ samp {
1285
+ font-size: 1em;
1286
+ }
1287
+
1288
+ table {
1289
+ border-collapse: collapse;
1290
+ }
1291
+
1292
+ textarea {
1293
+ resize: vertical;
1294
+ }
1295
+
1296
+ sub {
1297
+ bottom: -0.25em;
1298
+ }
1299
+
1300
+ sup {
1301
+ top: -0.5em;
1302
+ }
1303
+ `;
1304
+ function generateReset() {
1305
+ return `@layer reset {
1306
+ ${reset}
1307
+ }`;
1308
+ }
1309
+
1310
+ // src/generators/token-css.ts
1311
+ init_cjs_shims();
1312
+ var import_core2 = require("@pandacss/core");
1313
+ var import_outdent15 = require("outdent");
1314
+ var import_ts_pattern2 = require("ts-pattern");
1315
+ function generateKeyframes(keyframes) {
1316
+ if (keyframes) {
1317
+ return (0, import_core2.toKeyframeCss)(keyframes);
1318
+ }
1319
+ }
1320
+ var getConditionMessage = (value) => import_outdent15.outdent`
1321
+ It seems you provided an invalid condition for semantic tokens.
1322
+
1323
+ - You provided: \`${value}\`
1324
+
1325
+ Valid conditions are those that reference a parent selectors or at-rules.
1326
+ @media (min-width: 768px), or .dark &
1327
+ `;
1328
+ function generateTokenCss(ctx, varRoot) {
1329
+ const root = varRoot ?? ctx.cssVarRoot;
1330
+ const conditions = ctx.conditions;
1331
+ const results = [];
1332
+ for (const [key, values] of ctx.tokens.vars.entries()) {
1333
+ const varsObj = Object.fromEntries(values);
1334
+ if (Object.keys(varsObj).length === 0)
1335
+ continue;
1336
+ if (key === "base") {
1337
+ const { css: css3 } = (0, import_core2.toCss)({ [root]: varsObj });
1338
+ results.push(css3);
1339
+ } else {
1340
+ const cond = conditions.normalize(key);
1341
+ const css3 = (0, import_ts_pattern2.match)(cond).with({ type: "parent-nesting" }, (cond2) => {
1342
+ const selector = cond2.value.replace(/\s&/g, "");
1343
+ const { css: css4 } = (0, import_core2.toCss)(varsObj);
1344
+ return `${selector} {
1345
+ ${css4};
1346
+ }`;
1347
+ }).with({ type: "at-rule" }, (cond2) => {
1348
+ const selector = cond2.rawValue;
1349
+ const { css: css4 } = (0, import_core2.toCss)(varsObj);
1350
+ return `${selector} {
1351
+ ${root} {
1352
+ ${css4};
1353
+ }
1354
+ }`;
1355
+ }).with(import_ts_pattern2.P.nullish, () => {
1356
+ }).otherwise((cond2) => {
1357
+ if (cond2) {
1358
+ throw new Error(getConditionMessage(cond2.raw));
1359
+ }
1360
+ });
1361
+ if (css3) {
1362
+ results.push(css3);
1363
+ }
1364
+ }
1365
+ }
1366
+ const css2 = results.join("\n\n") + "\n\n";
1367
+ return `@layer tokens {
1368
+ ${css2}
1369
+ }
1370
+ `;
1371
+ }
1372
+
1373
+ // src/generators/token-dts.ts
1374
+ init_cjs_shims();
1375
+ var import_shared10 = require("@pandacss/shared");
1376
+ var import_outdent16 = require("outdent");
1377
+ var import_pluralize = require("pluralize");
1378
+ function generateTokenDts(dict) {
1379
+ const set = /* @__PURE__ */ new Set();
1380
+ set.add(`export type Token = ${dict.isEmpty ? "string" : (0, import_shared10.unionType)(dict.allNames)}`);
1381
+ const interfaceSet = /* @__PURE__ */ new Set(["export interface Tokens {"]);
1382
+ if (dict.isEmpty) {
1383
+ interfaceSet.add("[token: string]: string");
1384
+ } else {
1385
+ for (const [key, value] of dict.categoryMap.entries()) {
1386
+ const typeName = (0, import_shared10.capitalize)((0, import_pluralize.singular)(key));
1387
+ set.add(`export type ${typeName} = ${(0, import_shared10.unionType)(value.keys())}`);
1388
+ set.add(`export type Palette = ${(0, import_shared10.unionType)(Object.keys(dict.palettes))}`);
1389
+ interfaceSet.add(` ${key}: ${typeName}`);
1390
+ }
1391
+ }
1392
+ interfaceSet.add("}");
1393
+ set.add(Array.from(interfaceSet).join("\n"));
1394
+ return import_outdent16.outdent.string(Array.from(set).join("\n\n"));
1395
+ }
1396
+
1397
+ // src/generators/token-js.ts
1398
+ init_cjs_shims();
1399
+ var import_outdent17 = __toESM(require("outdent"));
1400
+ function generateTokenJs(dict) {
1401
+ const map = /* @__PURE__ */ new Map();
1402
+ dict.allTokens.forEach((token) => {
1403
+ const { varRef } = token.extensions;
1404
+ const value = token.isConditional ? varRef : token.value;
1405
+ map.set(token.name, { value, variable: varRef });
1406
+ });
1407
+ const obj = Object.fromEntries(map);
1408
+ return {
1409
+ js: import_outdent17.default`
1410
+ const tokens = ${JSON.stringify(obj, null, 2)}
1411
+
1412
+ function getToken(path) {
1413
+ const { value } = tokens[path] || {}
1414
+ return value
1415
+ }
1416
+
1417
+ function getTokenVar(path) {
1418
+ const { variable } = tokens[path] || {}
1419
+ return variable
1420
+ }
1421
+ `,
1422
+ dts: import_outdent17.default`
1423
+ import { Token } from "../types/token"
1424
+ export declare function getToken(path: Token): string
1425
+ export declare function getTokenVar(path: Token): string
1426
+ `
1427
+ };
1428
+ }
1429
+
1430
+ // src/generators/types.ts
1431
+ init_cjs_shims();
1432
+ var import_fs_extra = require("fs-extra");
1433
+ var import_outdent18 = __toESM(require("outdent"));
1434
+ function getType(file) {
1435
+ const filepath = getEntrypoint("@pandacss/types", { dev: file });
1436
+ return (0, import_fs_extra.readFileSync)(filepath, "utf8");
1437
+ }
1438
+ function generateCssType(ctx) {
1439
+ const strict = ctx.strictTokens;
1440
+ return {
1441
+ cssType: getType("csstype.d.ts"),
1442
+ pandaCssType: getType("panda-csstype.d.ts"),
1443
+ publicType: import_outdent18.default`
1444
+ import { PandaCssObject, PandaConditionalValue, ConditionCssProperties } from './panda-csstype'
1445
+ import { PropTypes } from './prop-type'
1446
+ import { Conditions } from './conditions'
1447
+
1448
+ export type CssObject = ${strict ? "PandaCssObject<Conditions, PropTypes, true>" : "PandaCssObject<Conditions, PropTypes>"}
1449
+
1450
+ export type ConditionalValue<Value> = PandaConditionalValue<Conditions, Value>
1451
+
1452
+ export type CssProperties = ${strict ? "ConditionCssProperties<Conditions, PropTypes, true>" : "ConditionCssProperties<Conditions, PropTypes>"}
1453
+ `
1454
+ };
1455
+ }
1456
+
1457
+ // src/generators/index.ts
1458
+ function setupHelpers(ctx) {
1459
+ const sharedMjs = getEntrypoint("@pandacss/shared", { dev: "shared.mjs" });
1460
+ const code = (0, import_fs2.readFileSync)(sharedMjs, "utf-8");
1461
+ return {
1462
+ dir: ctx.outdir,
1463
+ files: [{ file: "helpers.js", code }]
1464
+ };
1465
+ }
1466
+ function setupKeyframes(ctx) {
1467
+ const code = generateKeyframes(ctx.keyframes);
1468
+ return {
1469
+ dir: ctx.paths.token,
1470
+ files: [{ file: "keyframes.css", code }]
1471
+ };
1472
+ }
1473
+ function setupDesignTokens(ctx) {
1474
+ if (ctx.tokens.isEmpty) {
1475
+ return { files: [] };
1476
+ }
1477
+ const code = generateTokenJs(ctx.tokens);
1478
+ const css2 = generateTokenCss(ctx);
1479
+ return {
1480
+ dir: ctx.paths.token,
1481
+ files: [
1482
+ { file: "index.css", code: css2 },
1483
+ { file: "index.d.ts", code: code.dts },
1484
+ { file: "index.js", code: code.js }
1485
+ ]
1486
+ };
1487
+ }
1488
+ function setupGlobalCss(ctx) {
1489
+ const code = generateGlobalCss();
1490
+ return {
1491
+ dir: ctx.paths.css,
1492
+ files: [
1493
+ { file: "global-css.js", code: code.js },
1494
+ { file: "global-css.d.ts", code: code.dts }
1495
+ ]
1496
+ };
1497
+ }
1498
+ function setupTypes(ctx) {
1499
+ const code = generateCssType(ctx);
1500
+ const conditions = generateConditions(ctx);
1501
+ return {
1502
+ dir: ctx.paths.types,
1503
+ files: [
1504
+ { file: "csstype.d.ts", code: code.cssType },
1505
+ { file: "panda-csstype.d.ts", code: code.pandaCssType },
1506
+ { file: "index.d.ts", code: code.publicType },
1507
+ { file: "token.d.ts", code: generateTokenDts(ctx.tokens) },
1508
+ { file: "prop-type.d.ts", code: generatePropTypes(ctx.utility) },
1509
+ { file: "conditions.d.ts", code: conditions.dts }
1510
+ ]
1511
+ };
1512
+ }
1513
+ function setupCss(ctx) {
1514
+ const code = generateCssFn(ctx);
1515
+ const conditions = generateConditions(ctx);
1516
+ return {
1517
+ dir: ctx.paths.css,
1518
+ files: [
1519
+ { file: "conditions.js", code: conditions.js },
1520
+ { file: "css.js", code: code.js },
1521
+ { file: "css.d.ts", code: code.dts }
1522
+ ]
1523
+ };
1524
+ }
1525
+ function setupCssMap(ctx) {
1526
+ const code = generateCssMap();
1527
+ return {
1528
+ dir: ctx.paths.css,
1529
+ files: [
1530
+ { file: "css-map.js", code: code.js },
1531
+ { file: "css-map.d.ts", code: code.dts }
1532
+ ]
1533
+ };
1534
+ }
1535
+ function setupCx(ctx) {
1536
+ const code = generateCx();
1537
+ return {
1538
+ dir: ctx.paths.css,
1539
+ files: [
1540
+ { file: "cx.js", code: code.js },
1541
+ { file: "cx.d.ts", code: code.dts }
1542
+ ]
1543
+ };
1544
+ }
1545
+ function setupRecipes(ctx) {
1546
+ const code = generateRecipes(ctx);
1547
+ if (!code) {
1548
+ return { files: [] };
1549
+ }
1550
+ return {
1551
+ dir: ctx.paths.recipe,
1552
+ files: [
1553
+ { file: "index.js", code: code.js },
1554
+ { file: "index.d.ts", code: code.dts }
1555
+ ]
1556
+ };
1557
+ }
1558
+ function setupPatterns(ctx) {
1559
+ const files = generatePattern(ctx);
1560
+ if (!files) {
1561
+ return { files: [] };
1562
+ }
1563
+ const indexCode = import_outdent19.default.string(files.map((file) => `export * from './${file.name}'`).join("\n"));
1564
+ return {
1565
+ dir: ctx.paths.pattern,
1566
+ files: [
1567
+ ...files.map((file) => ({ file: `${file.name}.js`, code: file.js })),
1568
+ ...files.map((file) => ({ file: `${file.name}.d.ts`, code: file.dts })),
1569
+ { file: "index.js", code: indexCode },
1570
+ { file: "index.d.ts", code: indexCode }
1571
+ ]
1572
+ };
1573
+ }
1574
+ function setupJsx(ctx) {
1575
+ if (!ctx.jsxFramework)
1576
+ return { files: [] };
1577
+ const isValidProp = generateisValidProp(ctx);
1578
+ const factory = generateJsxFactory(ctx);
1579
+ const patterns = generateJsxPatterns(ctx);
1580
+ const indexCode = import_outdent19.default`
1581
+ export * from './factory'
1582
+ ${import_outdent19.default.string(patterns.map((file) => `export * from './${file.name}'`).join("\n"))}
1583
+ `;
1584
+ return {
1585
+ dir: ctx.paths.jsx,
1586
+ files: [
1587
+ ...patterns.map((file) => ({ file: `${file.name}.jsx`, code: file.js })),
1588
+ ...patterns.map((file) => ({ file: `${file.name}.d.ts`, code: file.dts })),
1589
+ { file: "is-valid-prop.js", code: isValidProp.js },
1590
+ { file: "factory.d.ts", code: factory.dts },
1591
+ { file: "factory.jsx", code: factory.js },
1592
+ { file: "index.d.ts", code: indexCode },
1593
+ { file: "index.jsx", code: indexCode }
1594
+ ]
1595
+ };
1596
+ }
1597
+ function setupCssIndex(ctx) {
1598
+ const code = import_outdent19.default`
1599
+ export * from './css'
1600
+ export * from './cx'
1601
+ export * from './global-css'
1602
+ export * from './css-map'
1603
+ `;
1604
+ return {
1605
+ dir: ctx.paths.css,
1606
+ files: [
1607
+ { file: "index.js", code },
1608
+ { file: "index.d.ts", code }
1609
+ ]
1610
+ };
1611
+ }
1612
+ function setupReset(ctx) {
1613
+ if (!ctx.preflight)
1614
+ return { files: [] };
1615
+ const code = generateReset();
1616
+ return { files: [{ file: "reset.css", code }] };
1617
+ }
1618
+ function setupGitIgnore(ctx) {
1619
+ const txt = import_outdent19.default`## CSS Panda
1620
+ ${ctx.outdir}
1621
+ `;
1622
+ const file = (0, import_look_it_up.lookItUpSync)(".gitignore");
1623
+ if (!file)
1624
+ return {
1625
+ dir: ctx.cwd,
1626
+ files: [{ file: ".gitignore", code: txt }]
1627
+ };
1628
+ let content = (0, import_fs2.readFileSync)(file, "utf-8");
1629
+ if (!content.includes(ctx.outdir)) {
1630
+ content += txt;
1631
+ }
1632
+ return {
1633
+ dir: (0, import_path2.dirname)(file),
1634
+ files: [{ file: ".gitignore", code: content }]
1635
+ };
1636
+ }
1637
+ function generateSystem(ctx) {
1638
+ return [
1639
+ setupHelpers(ctx),
1640
+ setupDesignTokens(ctx),
1641
+ setupKeyframes(ctx),
1642
+ setupTypes(ctx),
1643
+ setupCssMap(ctx),
1644
+ setupCx(ctx),
1645
+ setupCss(ctx),
1646
+ setupGlobalCss(ctx),
1647
+ setupRecipes(ctx),
1648
+ setupPatterns(ctx),
1649
+ setupCssIndex(ctx),
1650
+ setupJsx(ctx),
1651
+ setupReset(ctx),
1652
+ setupGitIgnore(ctx)
1653
+ ];
1654
+ }
1655
+
1656
+ // src/messages.ts
1657
+ init_cjs_shims();
1658
+ var import_logger3 = require("@pandacss/logger");
1659
+ var import_outdent20 = require("outdent");
1660
+
1661
+ // src/cli-box.ts
1662
+ init_cjs_shims();
1663
+
1664
+ // ../../node_modules/.pnpm/boxen@7.0.0/node_modules/boxen/index.js
1665
+ init_cjs_shims();
1666
+ var import_node_process2 = __toESM(require("process"), 1);
1667
+
1668
+ // ../../node_modules/.pnpm/string-width@5.1.2/node_modules/string-width/index.js
1669
+ init_cjs_shims();
1670
+
1671
+ // ../../node_modules/.pnpm/strip-ansi@7.0.1/node_modules/strip-ansi/index.js
1672
+ init_cjs_shims();
1673
+
1674
+ // ../../node_modules/.pnpm/ansi-regex@6.0.1/node_modules/ansi-regex/index.js
1675
+ init_cjs_shims();
1676
+ function ansiRegex({ onlyFirst = false } = {}) {
1677
+ const pattern = [
1678
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
1679
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
1680
+ ].join("|");
1681
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
1682
+ }
1683
+
1684
+ // ../../node_modules/.pnpm/strip-ansi@7.0.1/node_modules/strip-ansi/index.js
1685
+ function stripAnsi(string) {
1686
+ if (typeof string !== "string") {
1687
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
1688
+ }
1689
+ return string.replace(ansiRegex(), "");
1690
+ }
1691
+
1692
+ // ../../node_modules/.pnpm/string-width@5.1.2/node_modules/string-width/index.js
1693
+ var import_eastasianwidth = __toESM(require_eastasianwidth(), 1);
1694
+ var import_emoji_regex = __toESM(require_emoji_regex(), 1);
1695
+ function stringWidth(string, options = {}) {
1696
+ if (typeof string !== "string" || string.length === 0) {
1697
+ return 0;
1698
+ }
1699
+ options = {
1700
+ ambiguousIsNarrow: true,
1701
+ ...options
1702
+ };
1703
+ string = stripAnsi(string);
1704
+ if (string.length === 0) {
1705
+ return 0;
1706
+ }
1707
+ string = string.replace((0, import_emoji_regex.default)(), " ");
1708
+ const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
1709
+ let width = 0;
1710
+ for (const character of string) {
1711
+ const codePoint = character.codePointAt(0);
1712
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
1713
+ continue;
1714
+ }
1715
+ if (codePoint >= 768 && codePoint <= 879) {
1716
+ continue;
1717
+ }
1718
+ const code = import_eastasianwidth.default.eastAsianWidth(character);
1719
+ switch (code) {
1720
+ case "F":
1721
+ case "W":
1722
+ width += 2;
1723
+ break;
1724
+ case "A":
1725
+ width += ambiguousCharacterWidth;
1726
+ break;
1727
+ default:
1728
+ width += 1;
1729
+ }
1730
+ }
1731
+ return width;
1732
+ }
1733
+
1734
+ // ../../node_modules/.pnpm/chalk@5.0.1/node_modules/chalk/source/index.js
1735
+ init_cjs_shims();
1736
+
1737
+ // ../../node_modules/.pnpm/chalk@5.0.1/node_modules/chalk/source/vendor/ansi-styles/index.js
1738
+ init_cjs_shims();
1739
+ var ANSI_BACKGROUND_OFFSET = 10;
1740
+ var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
1741
+ var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
1742
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
1743
+ function assembleStyles() {
1744
+ const codes = /* @__PURE__ */ new Map();
1745
+ const styles2 = {
1746
+ modifier: {
1747
+ reset: [0, 0],
1748
+ bold: [1, 22],
1749
+ dim: [2, 22],
1750
+ italic: [3, 23],
1751
+ underline: [4, 24],
1752
+ overline: [53, 55],
1753
+ inverse: [7, 27],
1754
+ hidden: [8, 28],
1755
+ strikethrough: [9, 29]
1756
+ },
1757
+ color: {
1758
+ black: [30, 39],
1759
+ red: [31, 39],
1760
+ green: [32, 39],
1761
+ yellow: [33, 39],
1762
+ blue: [34, 39],
1763
+ magenta: [35, 39],
1764
+ cyan: [36, 39],
1765
+ white: [37, 39],
1766
+ blackBright: [90, 39],
1767
+ redBright: [91, 39],
1768
+ greenBright: [92, 39],
1769
+ yellowBright: [93, 39],
1770
+ blueBright: [94, 39],
1771
+ magentaBright: [95, 39],
1772
+ cyanBright: [96, 39],
1773
+ whiteBright: [97, 39]
1774
+ },
1775
+ bgColor: {
1776
+ bgBlack: [40, 49],
1777
+ bgRed: [41, 49],
1778
+ bgGreen: [42, 49],
1779
+ bgYellow: [43, 49],
1780
+ bgBlue: [44, 49],
1781
+ bgMagenta: [45, 49],
1782
+ bgCyan: [46, 49],
1783
+ bgWhite: [47, 49],
1784
+ bgBlackBright: [100, 49],
1785
+ bgRedBright: [101, 49],
1786
+ bgGreenBright: [102, 49],
1787
+ bgYellowBright: [103, 49],
1788
+ bgBlueBright: [104, 49],
1789
+ bgMagentaBright: [105, 49],
1790
+ bgCyanBright: [106, 49],
1791
+ bgWhiteBright: [107, 49]
1792
+ }
1793
+ };
1794
+ styles2.color.gray = styles2.color.blackBright;
1795
+ styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
1796
+ styles2.color.grey = styles2.color.blackBright;
1797
+ styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
1798
+ for (const [groupName, group] of Object.entries(styles2)) {
1799
+ for (const [styleName, style] of Object.entries(group)) {
1800
+ styles2[styleName] = {
1801
+ open: `\x1B[${style[0]}m`,
1802
+ close: `\x1B[${style[1]}m`
1803
+ };
1804
+ group[styleName] = styles2[styleName];
1805
+ codes.set(style[0], style[1]);
1806
+ }
1807
+ Object.defineProperty(styles2, groupName, {
1808
+ value: group,
1809
+ enumerable: false
1810
+ });
1811
+ }
1812
+ Object.defineProperty(styles2, "codes", {
1813
+ value: codes,
1814
+ enumerable: false
1815
+ });
1816
+ styles2.color.close = "\x1B[39m";
1817
+ styles2.bgColor.close = "\x1B[49m";
1818
+ styles2.color.ansi = wrapAnsi16();
1819
+ styles2.color.ansi256 = wrapAnsi256();
1820
+ styles2.color.ansi16m = wrapAnsi16m();
1821
+ styles2.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
1822
+ styles2.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
1823
+ styles2.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
1824
+ Object.defineProperties(styles2, {
1825
+ rgbToAnsi256: {
1826
+ value: (red, green, blue) => {
1827
+ if (red === green && green === blue) {
1828
+ if (red < 8) {
1829
+ return 16;
1830
+ }
1831
+ if (red > 248) {
1832
+ return 231;
1833
+ }
1834
+ return Math.round((red - 8) / 247 * 24) + 232;
1835
+ }
1836
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
1837
+ },
1838
+ enumerable: false
1839
+ },
1840
+ hexToRgb: {
1841
+ value: (hex) => {
1842
+ const matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));
1843
+ if (!matches) {
1844
+ return [0, 0, 0];
1845
+ }
1846
+ let { colorString } = matches.groups;
1847
+ if (colorString.length === 3) {
1848
+ colorString = [...colorString].map((character) => character + character).join("");
1849
+ }
1850
+ const integer = Number.parseInt(colorString, 16);
1851
+ return [
1852
+ integer >> 16 & 255,
1853
+ integer >> 8 & 255,
1854
+ integer & 255
1855
+ ];
1856
+ },
1857
+ enumerable: false
1858
+ },
1859
+ hexToAnsi256: {
1860
+ value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
1861
+ enumerable: false
1862
+ },
1863
+ ansi256ToAnsi: {
1864
+ value: (code) => {
1865
+ if (code < 8) {
1866
+ return 30 + code;
1867
+ }
1868
+ if (code < 16) {
1869
+ return 90 + (code - 8);
1870
+ }
1871
+ let red;
1872
+ let green;
1873
+ let blue;
1874
+ if (code >= 232) {
1875
+ red = ((code - 232) * 10 + 8) / 255;
1876
+ green = red;
1877
+ blue = red;
1878
+ } else {
1879
+ code -= 16;
1880
+ const remainder = code % 36;
1881
+ red = Math.floor(code / 36) / 5;
1882
+ green = Math.floor(remainder / 6) / 5;
1883
+ blue = remainder % 6 / 5;
1884
+ }
1885
+ const value = Math.max(red, green, blue) * 2;
1886
+ if (value === 0) {
1887
+ return 30;
1888
+ }
1889
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
1890
+ if (value === 2) {
1891
+ result += 60;
1892
+ }
1893
+ return result;
1894
+ },
1895
+ enumerable: false
1896
+ },
1897
+ rgbToAnsi: {
1898
+ value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)),
1899
+ enumerable: false
1900
+ },
1901
+ hexToAnsi: {
1902
+ value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
1903
+ enumerable: false
1904
+ }
1905
+ });
1906
+ return styles2;
1907
+ }
1908
+ var ansiStyles = assembleStyles();
1909
+ var ansi_styles_default = ansiStyles;
1910
+
1911
+ // ../../node_modules/.pnpm/chalk@5.0.1/node_modules/chalk/source/vendor/supports-color/index.js
1912
+ init_cjs_shims();
1913
+ var import_node_process = __toESM(require("process"), 1);
1914
+ var import_node_os = __toESM(require("os"), 1);
1915
+ var import_node_tty = __toESM(require("tty"), 1);
1916
+ function hasFlag(flag, argv = import_node_process.default.argv) {
1917
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
1918
+ const position = argv.indexOf(prefix + flag);
1919
+ const terminatorPosition = argv.indexOf("--");
1920
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
1921
+ }
1922
+ var { env } = import_node_process.default;
1923
+ var flagForceColor;
1924
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
1925
+ flagForceColor = 0;
1926
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
1927
+ flagForceColor = 1;
1928
+ }
1929
+ function envForceColor() {
1930
+ if ("FORCE_COLOR" in env) {
1931
+ if (env.FORCE_COLOR === "true") {
1932
+ return 1;
1933
+ }
1934
+ if (env.FORCE_COLOR === "false") {
1935
+ return 0;
1936
+ }
1937
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
1938
+ }
1939
+ }
1940
+ function translateLevel(level) {
1941
+ if (level === 0) {
1942
+ return false;
1943
+ }
1944
+ return {
1945
+ level,
1946
+ hasBasic: true,
1947
+ has256: level >= 2,
1948
+ has16m: level >= 3
1949
+ };
1950
+ }
1951
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
1952
+ const noFlagForceColor = envForceColor();
1953
+ if (noFlagForceColor !== void 0) {
1954
+ flagForceColor = noFlagForceColor;
1955
+ }
1956
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
1957
+ if (forceColor === 0) {
1958
+ return 0;
1959
+ }
1960
+ if (sniffFlags) {
1961
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
1962
+ return 3;
1963
+ }
1964
+ if (hasFlag("color=256")) {
1965
+ return 2;
1966
+ }
1967
+ }
1968
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
1969
+ return 0;
1970
+ }
1971
+ const min = forceColor || 0;
1972
+ if (env.TERM === "dumb") {
1973
+ return min;
1974
+ }
1975
+ if (import_node_process.default.platform === "win32") {
1976
+ const osRelease = import_node_os.default.release().split(".");
1977
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
1978
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
1979
+ }
1980
+ return 1;
1981
+ }
1982
+ if ("CI" in env) {
1983
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
1984
+ return 1;
1985
+ }
1986
+ return min;
1987
+ }
1988
+ if ("TEAMCITY_VERSION" in env) {
1989
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
1990
+ }
1991
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) {
1992
+ return 1;
1993
+ }
1994
+ if (env.COLORTERM === "truecolor") {
1995
+ return 3;
1996
+ }
1997
+ if ("TERM_PROGRAM" in env) {
1998
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
1999
+ switch (env.TERM_PROGRAM) {
2000
+ case "iTerm.app":
2001
+ return version >= 3 ? 3 : 2;
2002
+ case "Apple_Terminal":
2003
+ return 2;
2004
+ }
2005
+ }
2006
+ if (/-256(color)?$/i.test(env.TERM)) {
2007
+ return 2;
2008
+ }
2009
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
2010
+ return 1;
2011
+ }
2012
+ if ("COLORTERM" in env) {
2013
+ return 1;
2014
+ }
2015
+ return min;
2016
+ }
2017
+ function createSupportsColor(stream, options = {}) {
2018
+ const level = _supportsColor(stream, {
2019
+ streamIsTTY: stream && stream.isTTY,
2020
+ ...options
2021
+ });
2022
+ return translateLevel(level);
2023
+ }
2024
+ var supportsColor = {
2025
+ stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
2026
+ stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
2027
+ };
2028
+ var supports_color_default = supportsColor;
2029
+
2030
+ // ../../node_modules/.pnpm/chalk@5.0.1/node_modules/chalk/source/utilities.js
2031
+ init_cjs_shims();
2032
+ function stringReplaceAll(string, substring, replacer) {
2033
+ let index = string.indexOf(substring);
2034
+ if (index === -1) {
2035
+ return string;
2036
+ }
2037
+ const substringLength = substring.length;
2038
+ let endIndex = 0;
2039
+ let returnValue = "";
2040
+ do {
2041
+ returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
2042
+ endIndex = index + substringLength;
2043
+ index = string.indexOf(substring, endIndex);
2044
+ } while (index !== -1);
2045
+ returnValue += string.slice(endIndex);
2046
+ return returnValue;
2047
+ }
2048
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
2049
+ let endIndex = 0;
2050
+ let returnValue = "";
2051
+ do {
2052
+ const gotCR = string[index - 1] === "\r";
2053
+ returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
2054
+ endIndex = index + 1;
2055
+ index = string.indexOf("\n", endIndex);
2056
+ } while (index !== -1);
2057
+ returnValue += string.slice(endIndex);
2058
+ return returnValue;
2059
+ }
2060
+
2061
+ // ../../node_modules/.pnpm/chalk@5.0.1/node_modules/chalk/source/index.js
2062
+ var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
2063
+ var GENERATOR = Symbol("GENERATOR");
2064
+ var STYLER = Symbol("STYLER");
2065
+ var IS_EMPTY = Symbol("IS_EMPTY");
2066
+ var levelMapping = [
2067
+ "ansi",
2068
+ "ansi",
2069
+ "ansi256",
2070
+ "ansi16m"
2071
+ ];
2072
+ var styles = /* @__PURE__ */ Object.create(null);
2073
+ var applyOptions = (object, options = {}) => {
2074
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
2075
+ throw new Error("The `level` option should be an integer from 0 to 3");
2076
+ }
2077
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
2078
+ object.level = options.level === void 0 ? colorLevel : options.level;
2079
+ };
2080
+ var chalkFactory = (options) => {
2081
+ const chalk2 = (...strings) => strings.join(" ");
2082
+ applyOptions(chalk2, options);
2083
+ Object.setPrototypeOf(chalk2, createChalk.prototype);
2084
+ return chalk2;
2085
+ };
2086
+ function createChalk(options) {
2087
+ return chalkFactory(options);
2088
+ }
2089
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
2090
+ for (const [styleName, style] of Object.entries(ansi_styles_default)) {
2091
+ styles[styleName] = {
2092
+ get() {
2093
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
2094
+ Object.defineProperty(this, styleName, { value: builder });
2095
+ return builder;
2096
+ }
2097
+ };
2098
+ }
2099
+ styles.visible = {
2100
+ get() {
2101
+ const builder = createBuilder(this, this[STYLER], true);
2102
+ Object.defineProperty(this, "visible", { value: builder });
2103
+ return builder;
2104
+ }
2105
+ };
2106
+ var getModelAnsi = (model, level, type, ...arguments_) => {
2107
+ if (model === "rgb") {
2108
+ if (level === "ansi16m") {
2109
+ return ansi_styles_default[type].ansi16m(...arguments_);
2110
+ }
2111
+ if (level === "ansi256") {
2112
+ return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
2113
+ }
2114
+ return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
2115
+ }
2116
+ if (model === "hex") {
2117
+ return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
2118
+ }
2119
+ return ansi_styles_default[type][model](...arguments_);
2120
+ };
2121
+ var usedModels = ["rgb", "hex", "ansi256"];
2122
+ for (const model of usedModels) {
2123
+ styles[model] = {
2124
+ get() {
2125
+ const { level } = this;
2126
+ return function(...arguments_) {
2127
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
2128
+ return createBuilder(this, styler, this[IS_EMPTY]);
2129
+ };
2130
+ }
2131
+ };
2132
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
2133
+ styles[bgModel] = {
2134
+ get() {
2135
+ const { level } = this;
2136
+ return function(...arguments_) {
2137
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
2138
+ return createBuilder(this, styler, this[IS_EMPTY]);
2139
+ };
2140
+ }
2141
+ };
2142
+ }
2143
+ var proto = Object.defineProperties(() => {
2144
+ }, {
2145
+ ...styles,
2146
+ level: {
2147
+ enumerable: true,
2148
+ get() {
2149
+ return this[GENERATOR].level;
2150
+ },
2151
+ set(level) {
2152
+ this[GENERATOR].level = level;
2153
+ }
2154
+ }
2155
+ });
2156
+ var createStyler = (open, close, parent) => {
2157
+ let openAll;
2158
+ let closeAll;
2159
+ if (parent === void 0) {
2160
+ openAll = open;
2161
+ closeAll = close;
2162
+ } else {
2163
+ openAll = parent.openAll + open;
2164
+ closeAll = close + parent.closeAll;
2165
+ }
2166
+ return {
2167
+ open,
2168
+ close,
2169
+ openAll,
2170
+ closeAll,
2171
+ parent
2172
+ };
2173
+ };
2174
+ var createBuilder = (self, _styler, _isEmpty) => {
2175
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
2176
+ Object.setPrototypeOf(builder, proto);
2177
+ builder[GENERATOR] = self;
2178
+ builder[STYLER] = _styler;
2179
+ builder[IS_EMPTY] = _isEmpty;
2180
+ return builder;
2181
+ };
2182
+ var applyStyle = (self, string) => {
2183
+ if (self.level <= 0 || !string) {
2184
+ return self[IS_EMPTY] ? "" : string;
2185
+ }
2186
+ let styler = self[STYLER];
2187
+ if (styler === void 0) {
2188
+ return string;
2189
+ }
2190
+ const { openAll, closeAll } = styler;
2191
+ if (string.includes("\x1B")) {
2192
+ while (styler !== void 0) {
2193
+ string = stringReplaceAll(string, styler.close, styler.open);
2194
+ styler = styler.parent;
2195
+ }
2196
+ }
2197
+ const lfIndex = string.indexOf("\n");
2198
+ if (lfIndex !== -1) {
2199
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
2200
+ }
2201
+ return openAll + string + closeAll;
2202
+ };
2203
+ Object.defineProperties(createChalk.prototype, styles);
2204
+ var chalk = createChalk();
2205
+ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
2206
+ var source_default = chalk;
2207
+
2208
+ // ../../node_modules/.pnpm/widest-line@4.0.1/node_modules/widest-line/index.js
2209
+ init_cjs_shims();
2210
+ function widestLine(string) {
2211
+ let lineWidth = 0;
2212
+ for (const line of string.split("\n")) {
2213
+ lineWidth = Math.max(lineWidth, stringWidth(line));
2214
+ }
2215
+ return lineWidth;
2216
+ }
2217
+
2218
+ // ../../node_modules/.pnpm/boxen@7.0.0/node_modules/boxen/index.js
2219
+ var import_cli_boxes = __toESM(require_cli_boxes(), 1);
2220
+
2221
+ // ../../node_modules/.pnpm/camelcase@7.0.0/node_modules/camelcase/index.js
2222
+ init_cjs_shims();
2223
+ var UPPERCASE = /[\p{Lu}]/u;
2224
+ var LOWERCASE = /[\p{Ll}]/u;
2225
+ var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
2226
+ var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
2227
+ var SEPARATORS = /[_.\- ]+/;
2228
+ var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
2229
+ var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
2230
+ var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
2231
+ var preserveCamelCase = (string, toLowerCase, toUpperCase) => {
2232
+ let isLastCharLower = false;
2233
+ let isLastCharUpper = false;
2234
+ let isLastLastCharUpper = false;
2235
+ for (let index = 0; index < string.length; index++) {
2236
+ const character = string[index];
2237
+ if (isLastCharLower && UPPERCASE.test(character)) {
2238
+ string = string.slice(0, index) + "-" + string.slice(index);
2239
+ isLastCharLower = false;
2240
+ isLastLastCharUpper = isLastCharUpper;
2241
+ isLastCharUpper = true;
2242
+ index++;
2243
+ } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {
2244
+ string = string.slice(0, index - 1) + "-" + string.slice(index - 1);
2245
+ isLastLastCharUpper = isLastCharUpper;
2246
+ isLastCharUpper = false;
2247
+ isLastCharLower = true;
2248
+ } else {
2249
+ isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
2250
+ isLastLastCharUpper = isLastCharUpper;
2251
+ isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
2252
+ }
2253
+ }
2254
+ return string;
2255
+ };
2256
+ var preserveConsecutiveUppercase = (input, toLowerCase) => {
2257
+ LEADING_CAPITAL.lastIndex = 0;
2258
+ return input.replace(LEADING_CAPITAL, (m1) => toLowerCase(m1));
2259
+ };
2260
+ var postProcess = (input, toUpperCase) => {
2261
+ SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
2262
+ NUMBERS_AND_IDENTIFIER.lastIndex = 0;
2263
+ return input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m) => toUpperCase(m));
2264
+ };
2265
+ function camelCase(input, options) {
2266
+ if (!(typeof input === "string" || Array.isArray(input))) {
2267
+ throw new TypeError("Expected the input to be `string | string[]`");
2268
+ }
2269
+ options = {
2270
+ pascalCase: false,
2271
+ preserveConsecutiveUppercase: false,
2272
+ ...options
2273
+ };
2274
+ if (Array.isArray(input)) {
2275
+ input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
2276
+ } else {
2277
+ input = input.trim();
2278
+ }
2279
+ if (input.length === 0) {
2280
+ return "";
2281
+ }
2282
+ const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
2283
+ const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
2284
+ if (input.length === 1) {
2285
+ if (SEPARATORS.test(input)) {
2286
+ return "";
2287
+ }
2288
+ return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
2289
+ }
2290
+ const hasUpperCase = input !== toLowerCase(input);
2291
+ if (hasUpperCase) {
2292
+ input = preserveCamelCase(input, toLowerCase, toUpperCase);
2293
+ }
2294
+ input = input.replace(LEADING_SEPARATORS, "");
2295
+ input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
2296
+ if (options.pascalCase) {
2297
+ input = toUpperCase(input.charAt(0)) + input.slice(1);
2298
+ }
2299
+ return postProcess(input, toUpperCase);
2300
+ }
2301
+
2302
+ // ../../node_modules/.pnpm/boxen@7.0.0/node_modules/boxen/index.js
2303
+ var import_ansi_align = __toESM(require_ansi_align(), 1);
2304
+
2305
+ // ../../node_modules/.pnpm/wrap-ansi@8.0.1/node_modules/wrap-ansi/index.js
2306
+ init_cjs_shims();
2307
+
2308
+ // ../../node_modules/.pnpm/ansi-styles@6.1.1/node_modules/ansi-styles/index.js
2309
+ init_cjs_shims();
2310
+ var ANSI_BACKGROUND_OFFSET2 = 10;
2311
+ var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
2312
+ var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
2313
+ var wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
2314
+ function assembleStyles2() {
2315
+ const codes = /* @__PURE__ */ new Map();
2316
+ const styles2 = {
2317
+ modifier: {
2318
+ reset: [0, 0],
2319
+ bold: [1, 22],
2320
+ dim: [2, 22],
2321
+ italic: [3, 23],
2322
+ underline: [4, 24],
2323
+ overline: [53, 55],
2324
+ inverse: [7, 27],
2325
+ hidden: [8, 28],
2326
+ strikethrough: [9, 29]
2327
+ },
2328
+ color: {
2329
+ black: [30, 39],
2330
+ red: [31, 39],
2331
+ green: [32, 39],
2332
+ yellow: [33, 39],
2333
+ blue: [34, 39],
2334
+ magenta: [35, 39],
2335
+ cyan: [36, 39],
2336
+ white: [37, 39],
2337
+ blackBright: [90, 39],
2338
+ redBright: [91, 39],
2339
+ greenBright: [92, 39],
2340
+ yellowBright: [93, 39],
2341
+ blueBright: [94, 39],
2342
+ magentaBright: [95, 39],
2343
+ cyanBright: [96, 39],
2344
+ whiteBright: [97, 39]
2345
+ },
2346
+ bgColor: {
2347
+ bgBlack: [40, 49],
2348
+ bgRed: [41, 49],
2349
+ bgGreen: [42, 49],
2350
+ bgYellow: [43, 49],
2351
+ bgBlue: [44, 49],
2352
+ bgMagenta: [45, 49],
2353
+ bgCyan: [46, 49],
2354
+ bgWhite: [47, 49],
2355
+ bgBlackBright: [100, 49],
2356
+ bgRedBright: [101, 49],
2357
+ bgGreenBright: [102, 49],
2358
+ bgYellowBright: [103, 49],
2359
+ bgBlueBright: [104, 49],
2360
+ bgMagentaBright: [105, 49],
2361
+ bgCyanBright: [106, 49],
2362
+ bgWhiteBright: [107, 49]
2363
+ }
2364
+ };
2365
+ styles2.color.gray = styles2.color.blackBright;
2366
+ styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
2367
+ styles2.color.grey = styles2.color.blackBright;
2368
+ styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
2369
+ for (const [groupName, group] of Object.entries(styles2)) {
2370
+ for (const [styleName, style] of Object.entries(group)) {
2371
+ styles2[styleName] = {
2372
+ open: `\x1B[${style[0]}m`,
2373
+ close: `\x1B[${style[1]}m`
2374
+ };
2375
+ group[styleName] = styles2[styleName];
2376
+ codes.set(style[0], style[1]);
2377
+ }
2378
+ Object.defineProperty(styles2, groupName, {
2379
+ value: group,
2380
+ enumerable: false
2381
+ });
2382
+ }
2383
+ Object.defineProperty(styles2, "codes", {
2384
+ value: codes,
2385
+ enumerable: false
2386
+ });
2387
+ styles2.color.close = "\x1B[39m";
2388
+ styles2.bgColor.close = "\x1B[49m";
2389
+ styles2.color.ansi = wrapAnsi162();
2390
+ styles2.color.ansi256 = wrapAnsi2562();
2391
+ styles2.color.ansi16m = wrapAnsi16m2();
2392
+ styles2.bgColor.ansi = wrapAnsi162(ANSI_BACKGROUND_OFFSET2);
2393
+ styles2.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET2);
2394
+ styles2.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET2);
2395
+ Object.defineProperties(styles2, {
2396
+ rgbToAnsi256: {
2397
+ value: (red, green, blue) => {
2398
+ if (red === green && green === blue) {
2399
+ if (red < 8) {
2400
+ return 16;
2401
+ }
2402
+ if (red > 248) {
2403
+ return 231;
2404
+ }
2405
+ return Math.round((red - 8) / 247 * 24) + 232;
2406
+ }
2407
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
2408
+ },
2409
+ enumerable: false
2410
+ },
2411
+ hexToRgb: {
2412
+ value: (hex) => {
2413
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
2414
+ if (!matches) {
2415
+ return [0, 0, 0];
2416
+ }
2417
+ let [colorString] = matches;
2418
+ if (colorString.length === 3) {
2419
+ colorString = [...colorString].map((character) => character + character).join("");
2420
+ }
2421
+ const integer = Number.parseInt(colorString, 16);
2422
+ return [
2423
+ integer >> 16 & 255,
2424
+ integer >> 8 & 255,
2425
+ integer & 255
2426
+ ];
2427
+ },
2428
+ enumerable: false
2429
+ },
2430
+ hexToAnsi256: {
2431
+ value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
2432
+ enumerable: false
2433
+ },
2434
+ ansi256ToAnsi: {
2435
+ value: (code) => {
2436
+ if (code < 8) {
2437
+ return 30 + code;
2438
+ }
2439
+ if (code < 16) {
2440
+ return 90 + (code - 8);
2441
+ }
2442
+ let red;
2443
+ let green;
2444
+ let blue;
2445
+ if (code >= 232) {
2446
+ red = ((code - 232) * 10 + 8) / 255;
2447
+ green = red;
2448
+ blue = red;
2449
+ } else {
2450
+ code -= 16;
2451
+ const remainder = code % 36;
2452
+ red = Math.floor(code / 36) / 5;
2453
+ green = Math.floor(remainder / 6) / 5;
2454
+ blue = remainder % 6 / 5;
2455
+ }
2456
+ const value = Math.max(red, green, blue) * 2;
2457
+ if (value === 0) {
2458
+ return 30;
2459
+ }
2460
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
2461
+ if (value === 2) {
2462
+ result += 60;
2463
+ }
2464
+ return result;
2465
+ },
2466
+ enumerable: false
2467
+ },
2468
+ rgbToAnsi: {
2469
+ value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)),
2470
+ enumerable: false
2471
+ },
2472
+ hexToAnsi: {
2473
+ value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
2474
+ enumerable: false
2475
+ }
2476
+ });
2477
+ return styles2;
2478
+ }
2479
+ var ansiStyles2 = assembleStyles2();
2480
+ var ansi_styles_default2 = ansiStyles2;
2481
+
2482
+ // ../../node_modules/.pnpm/wrap-ansi@8.0.1/node_modules/wrap-ansi/index.js
2483
+ var ESCAPES = /* @__PURE__ */ new Set([
2484
+ "\x1B",
2485
+ "\x9B"
2486
+ ]);
2487
+ var END_CODE = 39;
2488
+ var ANSI_ESCAPE_BELL = "\x07";
2489
+ var ANSI_CSI = "[";
2490
+ var ANSI_OSC = "]";
2491
+ var ANSI_SGR_TERMINATOR = "m";
2492
+ var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
2493
+ var wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
2494
+ var wrapAnsiHyperlink = (uri) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`;
2495
+ var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
2496
+ var wrapWord = (rows, word, columns) => {
2497
+ const characters = [...word];
2498
+ let isInsideEscape = false;
2499
+ let isInsideLinkEscape = false;
2500
+ let visible = stringWidth(stripAnsi(rows[rows.length - 1]));
2501
+ for (const [index, character] of characters.entries()) {
2502
+ const characterLength = stringWidth(character);
2503
+ if (visible + characterLength <= columns) {
2504
+ rows[rows.length - 1] += character;
2505
+ } else {
2506
+ rows.push(character);
2507
+ visible = 0;
2508
+ }
2509
+ if (ESCAPES.has(character)) {
2510
+ isInsideEscape = true;
2511
+ isInsideLinkEscape = characters.slice(index + 1).join("").startsWith(ANSI_ESCAPE_LINK);
2512
+ }
2513
+ if (isInsideEscape) {
2514
+ if (isInsideLinkEscape) {
2515
+ if (character === ANSI_ESCAPE_BELL) {
2516
+ isInsideEscape = false;
2517
+ isInsideLinkEscape = false;
2518
+ }
2519
+ } else if (character === ANSI_SGR_TERMINATOR) {
2520
+ isInsideEscape = false;
2521
+ }
2522
+ continue;
2523
+ }
2524
+ visible += characterLength;
2525
+ if (visible === columns && index < characters.length - 1) {
2526
+ rows.push("");
2527
+ visible = 0;
2528
+ }
2529
+ }
2530
+ if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
2531
+ rows[rows.length - 2] += rows.pop();
2532
+ }
2533
+ };
2534
+ var stringVisibleTrimSpacesRight = (string) => {
2535
+ const words = string.split(" ");
2536
+ let last = words.length;
2537
+ while (last > 0) {
2538
+ if (stringWidth(words[last - 1]) > 0) {
2539
+ break;
2540
+ }
2541
+ last--;
2542
+ }
2543
+ if (last === words.length) {
2544
+ return string;
2545
+ }
2546
+ return words.slice(0, last).join(" ") + words.slice(last).join("");
2547
+ };
2548
+ var exec = (string, columns, options = {}) => {
2549
+ if (options.trim !== false && string.trim() === "") {
2550
+ return "";
2551
+ }
2552
+ let returnValue = "";
2553
+ let escapeCode;
2554
+ let escapeUrl;
2555
+ const lengths = wordLengths(string);
2556
+ let rows = [""];
2557
+ for (const [index, word] of string.split(" ").entries()) {
2558
+ if (options.trim !== false) {
2559
+ rows[rows.length - 1] = rows[rows.length - 1].trimStart();
2560
+ }
2561
+ let rowLength = stringWidth(rows[rows.length - 1]);
2562
+ if (index !== 0) {
2563
+ if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
2564
+ rows.push("");
2565
+ rowLength = 0;
2566
+ }
2567
+ if (rowLength > 0 || options.trim === false) {
2568
+ rows[rows.length - 1] += " ";
2569
+ rowLength++;
2570
+ }
2571
+ }
2572
+ if (options.hard && lengths[index] > columns) {
2573
+ const remainingColumns = columns - rowLength;
2574
+ const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
2575
+ const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
2576
+ if (breaksStartingNextLine < breaksStartingThisLine) {
2577
+ rows.push("");
2578
+ }
2579
+ wrapWord(rows, word, columns);
2580
+ continue;
2581
+ }
2582
+ if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
2583
+ if (options.wordWrap === false && rowLength < columns) {
2584
+ wrapWord(rows, word, columns);
2585
+ continue;
2586
+ }
2587
+ rows.push("");
2588
+ }
2589
+ if (rowLength + lengths[index] > columns && options.wordWrap === false) {
2590
+ wrapWord(rows, word, columns);
2591
+ continue;
2592
+ }
2593
+ rows[rows.length - 1] += word;
2594
+ }
2595
+ if (options.trim !== false) {
2596
+ rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
2597
+ }
2598
+ const pre = [...rows.join("\n")];
2599
+ for (const [index, character] of pre.entries()) {
2600
+ returnValue += character;
2601
+ if (ESCAPES.has(character)) {
2602
+ const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join("")) || { groups: {} };
2603
+ if (groups.code !== void 0) {
2604
+ const code2 = Number.parseFloat(groups.code);
2605
+ escapeCode = code2 === END_CODE ? void 0 : code2;
2606
+ } else if (groups.uri !== void 0) {
2607
+ escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
2608
+ }
2609
+ }
2610
+ const code = ansi_styles_default2.codes.get(Number(escapeCode));
2611
+ if (pre[index + 1] === "\n") {
2612
+ if (escapeUrl) {
2613
+ returnValue += wrapAnsiHyperlink("");
2614
+ }
2615
+ if (escapeCode && code) {
2616
+ returnValue += wrapAnsiCode(code);
2617
+ }
2618
+ } else if (character === "\n") {
2619
+ if (escapeCode && code) {
2620
+ returnValue += wrapAnsiCode(escapeCode);
2621
+ }
2622
+ if (escapeUrl) {
2623
+ returnValue += wrapAnsiHyperlink(escapeUrl);
2624
+ }
2625
+ }
2626
+ }
2627
+ return returnValue;
2628
+ };
2629
+ function wrapAnsi(string, columns, options) {
2630
+ return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
2631
+ }
2632
+
2633
+ // ../../node_modules/.pnpm/boxen@7.0.0/node_modules/boxen/index.js
2634
+ var import_cli_boxes2 = __toESM(require_cli_boxes(), 1);
2635
+ var NEWLINE = "\n";
2636
+ var PAD = " ";
2637
+ var BORDERS_WIDTH = 2;
2638
+ var terminalColumns = () => {
2639
+ const { env: env2, stdout, stderr } = import_node_process2.default;
2640
+ if (stdout?.columns) {
2641
+ return stdout.columns;
2642
+ }
2643
+ if (stderr?.columns) {
2644
+ return stderr.columns;
2645
+ }
2646
+ if (env2.COLUMNS) {
2647
+ return Number.parseInt(env2.COLUMNS, 10);
2648
+ }
2649
+ return 80;
2650
+ };
2651
+ var getObject = (detail) => typeof detail === "number" ? {
2652
+ top: detail,
2653
+ right: detail * 3,
2654
+ bottom: detail,
2655
+ left: detail * 3
2656
+ } : {
2657
+ top: 0,
2658
+ right: 0,
2659
+ bottom: 0,
2660
+ left: 0,
2661
+ ...detail
2662
+ };
2663
+ var getBorderChars = (borderStyle) => {
2664
+ const sides = [
2665
+ "topLeft",
2666
+ "topRight",
2667
+ "bottomRight",
2668
+ "bottomLeft",
2669
+ "left",
2670
+ "right",
2671
+ "top",
2672
+ "bottom"
2673
+ ];
2674
+ let characters;
2675
+ if (typeof borderStyle === "string") {
2676
+ characters = import_cli_boxes.default[borderStyle];
2677
+ if (!characters) {
2678
+ throw new TypeError(`Invalid border style: ${borderStyle}`);
2679
+ }
2680
+ } else {
2681
+ if (typeof borderStyle?.vertical === "string") {
2682
+ borderStyle.left = borderStyle.vertical;
2683
+ borderStyle.right = borderStyle.vertical;
2684
+ }
2685
+ if (typeof borderStyle?.horizontal === "string") {
2686
+ borderStyle.top = borderStyle.horizontal;
2687
+ borderStyle.bottom = borderStyle.horizontal;
2688
+ }
2689
+ for (const side of sides) {
2690
+ if (!borderStyle[side] || typeof borderStyle[side] !== "string") {
2691
+ throw new TypeError(`Invalid border style: ${side}`);
2692
+ }
2693
+ }
2694
+ characters = borderStyle;
2695
+ }
2696
+ return characters;
2697
+ };
2698
+ var makeTitle = (text, horizontal, alignement) => {
2699
+ let title = "";
2700
+ const textWidth = stringWidth(text);
2701
+ switch (alignement) {
2702
+ case "left":
2703
+ title = text + horizontal.slice(textWidth);
2704
+ break;
2705
+ case "right":
2706
+ title = horizontal.slice(textWidth) + text;
2707
+ break;
2708
+ default:
2709
+ horizontal = horizontal.slice(textWidth);
2710
+ if (horizontal.length % 2 === 1) {
2711
+ horizontal = horizontal.slice(Math.floor(horizontal.length / 2));
2712
+ title = horizontal.slice(1) + text + horizontal;
2713
+ } else {
2714
+ horizontal = horizontal.slice(horizontal.length / 2);
2715
+ title = horizontal + text + horizontal;
2716
+ }
2717
+ break;
2718
+ }
2719
+ return title;
2720
+ };
2721
+ var makeContentText = (text, { padding, width, textAlignment, height }) => {
2722
+ text = (0, import_ansi_align.default)(text, { align: textAlignment });
2723
+ let lines = text.split(NEWLINE);
2724
+ const textWidth = widestLine(text);
2725
+ const max = width - padding.left - padding.right;
2726
+ if (textWidth > max) {
2727
+ const newLines = [];
2728
+ for (const line of lines) {
2729
+ const createdLines = wrapAnsi(line, max, { hard: true });
2730
+ const alignedLines = (0, import_ansi_align.default)(createdLines, { align: textAlignment });
2731
+ const alignedLinesArray = alignedLines.split("\n");
2732
+ const longestLength = Math.max(...alignedLinesArray.map((s) => stringWidth(s)));
2733
+ for (const alignedLine of alignedLinesArray) {
2734
+ let paddedLine;
2735
+ switch (textAlignment) {
2736
+ case "center":
2737
+ paddedLine = PAD.repeat((max - longestLength) / 2) + alignedLine;
2738
+ break;
2739
+ case "right":
2740
+ paddedLine = PAD.repeat(max - longestLength) + alignedLine;
2741
+ break;
2742
+ default:
2743
+ paddedLine = alignedLine;
2744
+ break;
2745
+ }
2746
+ newLines.push(paddedLine);
2747
+ }
2748
+ }
2749
+ lines = newLines;
2750
+ }
2751
+ if (textAlignment === "center" && textWidth < max) {
2752
+ lines = lines.map((line) => PAD.repeat((max - textWidth) / 2) + line);
2753
+ } else if (textAlignment === "right" && textWidth < max) {
2754
+ lines = lines.map((line) => PAD.repeat(max - textWidth) + line);
2755
+ }
2756
+ const paddingLeft = PAD.repeat(padding.left);
2757
+ const paddingRight = PAD.repeat(padding.right);
2758
+ lines = lines.map((line) => paddingLeft + line + paddingRight);
2759
+ lines = lines.map((line) => {
2760
+ if (width - stringWidth(line) > 0) {
2761
+ switch (textAlignment) {
2762
+ case "center":
2763
+ return line + PAD.repeat(width - stringWidth(line));
2764
+ case "right":
2765
+ return line + PAD.repeat(width - stringWidth(line));
2766
+ default:
2767
+ return line + PAD.repeat(width - stringWidth(line));
2768
+ }
2769
+ }
2770
+ return line;
2771
+ });
2772
+ if (padding.top > 0) {
2773
+ lines = [...Array.from({ length: padding.top }).fill(PAD.repeat(width)), ...lines];
2774
+ }
2775
+ if (padding.bottom > 0) {
2776
+ lines = [...lines, ...Array.from({ length: padding.bottom }).fill(PAD.repeat(width))];
2777
+ }
2778
+ if (height && lines.length > height) {
2779
+ lines = lines.slice(0, height);
2780
+ } else if (height && lines.length < height) {
2781
+ lines = [...lines, ...Array.from({ length: height - lines.length }).fill(PAD.repeat(width))];
2782
+ }
2783
+ return lines.join(NEWLINE);
2784
+ };
2785
+ var boxContent = (content, contentWidth, options) => {
2786
+ const colorizeBorder = (border) => {
2787
+ const newBorder = options.borderColor ? getColorFn(options.borderColor)(border) : border;
2788
+ return options.dimBorder ? source_default.dim(newBorder) : newBorder;
2789
+ };
2790
+ const colorizeContent = (content2) => options.backgroundColor ? getBGColorFn(options.backgroundColor)(content2) : content2;
2791
+ const chars = getBorderChars(options.borderStyle);
2792
+ const columns = terminalColumns();
2793
+ let marginLeft = PAD.repeat(options.margin.left);
2794
+ if (options.float === "center") {
2795
+ const marginWidth = Math.max((columns - contentWidth - BORDERS_WIDTH) / 2, 0);
2796
+ marginLeft = PAD.repeat(marginWidth);
2797
+ } else if (options.float === "right") {
2798
+ const marginWidth = Math.max(columns - contentWidth - options.margin.right - BORDERS_WIDTH, 0);
2799
+ marginLeft = PAD.repeat(marginWidth);
2800
+ }
2801
+ const top = colorizeBorder(NEWLINE.repeat(options.margin.top) + marginLeft + chars.topLeft + (options.title ? makeTitle(options.title, chars.top.repeat(contentWidth), options.titleAlignment) : chars.top.repeat(contentWidth)) + chars.topRight);
2802
+ const bottom = colorizeBorder(marginLeft + chars.bottomLeft + chars.bottom.repeat(contentWidth) + chars.bottomRight + NEWLINE.repeat(options.margin.bottom));
2803
+ const LINE_SEPARATOR = contentWidth + BORDERS_WIDTH + options.margin.left >= columns ? "" : NEWLINE;
2804
+ const lines = content.split(NEWLINE);
2805
+ const middle = lines.map((line) => marginLeft + colorizeBorder(chars.left) + colorizeContent(line) + colorizeBorder(chars.right)).join(LINE_SEPARATOR);
2806
+ return top + LINE_SEPARATOR + middle + LINE_SEPARATOR + bottom;
2807
+ };
2808
+ var sanitizeOptions = (options) => {
2809
+ if (options.fullscreen && import_node_process2.default?.stdout) {
2810
+ let newDimensions = [import_node_process2.default.stdout.columns, import_node_process2.default.stdout.rows];
2811
+ if (typeof options.fullscreen === "function") {
2812
+ newDimensions = options.fullscreen(...newDimensions);
2813
+ }
2814
+ if (!options.width) {
2815
+ options.width = newDimensions[0];
2816
+ }
2817
+ if (!options.height) {
2818
+ options.height = newDimensions[1];
2819
+ }
2820
+ }
2821
+ if (options.width) {
2822
+ options.width = Math.max(1, options.width - BORDERS_WIDTH);
2823
+ }
2824
+ if (options.height) {
2825
+ options.height = Math.max(1, options.height - BORDERS_WIDTH);
2826
+ }
2827
+ return options;
2828
+ };
2829
+ var determineDimensions = (text, options) => {
2830
+ options = sanitizeOptions(options);
2831
+ const widthOverride = options.width !== void 0;
2832
+ const columns = terminalColumns();
2833
+ const maxWidth = columns - options.margin.left - options.margin.right - BORDERS_WIDTH;
2834
+ const widest = widestLine(wrapAnsi(text, columns - BORDERS_WIDTH, { hard: true, trim: false })) + options.padding.left + options.padding.right;
2835
+ if (options.title && widthOverride) {
2836
+ options.title = options.title.slice(0, Math.max(0, options.width - 2));
2837
+ if (options.title) {
2838
+ options.title = ` ${options.title} `;
2839
+ }
2840
+ } else if (options.title) {
2841
+ options.title = options.title.slice(0, Math.max(0, maxWidth - 2));
2842
+ if (options.title) {
2843
+ options.title = ` ${options.title} `;
2844
+ if (stringWidth(options.title) > widest) {
2845
+ options.width = stringWidth(options.title);
2846
+ }
2847
+ }
2848
+ }
2849
+ options.width = options.width ? options.width : widest;
2850
+ if (!widthOverride) {
2851
+ if (options.margin.left && options.margin.right && options.width > maxWidth) {
2852
+ const spaceForMargins = columns - options.width - BORDERS_WIDTH;
2853
+ const multiplier = spaceForMargins / (options.margin.left + options.margin.right);
2854
+ options.margin.left = Math.max(0, Math.floor(options.margin.left * multiplier));
2855
+ options.margin.right = Math.max(0, Math.floor(options.margin.right * multiplier));
2856
+ }
2857
+ options.width = Math.min(options.width, columns - BORDERS_WIDTH - options.margin.left - options.margin.right);
2858
+ }
2859
+ if (options.width - (options.padding.left + options.padding.right) <= 0) {
2860
+ options.padding.left = 0;
2861
+ options.padding.right = 0;
2862
+ }
2863
+ if (options.height && options.height - (options.padding.top + options.padding.bottom) <= 0) {
2864
+ options.padding.top = 0;
2865
+ options.padding.bottom = 0;
2866
+ }
2867
+ return options;
2868
+ };
2869
+ var isHex = (color) => color.match(/^#(?:[0-f]{3}){1,2}$/i);
2870
+ var isColorValid = (color) => typeof color === "string" && (source_default[color] ?? isHex(color));
2871
+ var getColorFn = (color) => isHex(color) ? source_default.hex(color) : source_default[color];
2872
+ var getBGColorFn = (color) => isHex(color) ? source_default.bgHex(color) : source_default[camelCase(["bg", color])];
2873
+ function boxen(text, options) {
2874
+ options = {
2875
+ padding: 0,
2876
+ borderStyle: "single",
2877
+ dimBorder: false,
2878
+ textAlignment: "left",
2879
+ float: "left",
2880
+ titleAlignment: "left",
2881
+ ...options
2882
+ };
2883
+ if (options.align) {
2884
+ options.textAlignment = options.align;
2885
+ }
2886
+ if (options.borderColor && !isColorValid(options.borderColor)) {
2887
+ throw new Error(`${options.borderColor} is not a valid borderColor`);
2888
+ }
2889
+ if (options.backgroundColor && !isColorValid(options.backgroundColor)) {
2890
+ throw new Error(`${options.backgroundColor} is not a valid backgroundColor`);
2891
+ }
2892
+ options.padding = getObject(options.padding);
2893
+ options.margin = getObject(options.margin);
2894
+ options = determineDimensions(text, options);
2895
+ text = makeContentText(text, options);
2896
+ return boxContent(text, options.width, options);
2897
+ }
2898
+
2899
+ // src/cli-box.ts
2900
+ function cliBox(str, title) {
2901
+ return boxen(str, {
2902
+ padding: { left: 3, right: 3, top: 1, bottom: 1 },
2903
+ borderColor: "magenta",
2904
+ borderStyle: "round",
2905
+ title,
2906
+ titleAlignment: "center"
2907
+ });
2908
+ }
2909
+
2910
+ // src/messages.ts
2911
+ var tick = import_logger3.colors.green().bold("\u2714\uFE0F");
2912
+ function artifactsGeneratedMessage(ctx) {
2913
+ return [
2914
+ import_outdent20.outdent`
2915
+ ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/css")}: the css function to author styles
2916
+ `,
2917
+ ctx.hasTokens && import_outdent20.outdent`
2918
+ ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/tokens")}: the css variables and js function to query your tokens
2919
+ `,
2920
+ ctx.hasPattern && import_outdent20.outdent`
2921
+ ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/patterns")}: functions to implement common css patterns
2922
+ `,
2923
+ ctx.hasRecipes && import_outdent20.outdent`
2924
+ ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/recipes")}: functions to create multi-variant styles
2925
+ `,
2926
+ ctx.jsxFramework && import_outdent20.outdent`
2927
+ ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/jsx")}: style prop powered elements for ${ctx.jsxFramework}
2928
+ `,
2929
+ "\n"
2930
+ ].filter(Boolean).join("\n");
2931
+ }
2932
+ function configExistsMessage(cmd) {
2933
+ return import_outdent20.outdent`
2934
+ \n
2935
+ It looks like you already have panda created\`.
2936
+
2937
+ You can now run ${(0, import_logger3.quote)(cmd, " panda --watch")}.
2938
+
2939
+ `;
2940
+ }
2941
+ function thankYouMessage() {
2942
+ return import_outdent20.outdent`
2943
+
2944
+ 🚀 Thanks for choosing ${import_logger3.colors.cyan("Panda")} to write your css.
2945
+
2946
+ You are set up to start using Panda!
2947
+
2948
+ `;
2949
+ }
2950
+ var randomWords = ["Sweet", "Divine", "Pandalicious", "Super"];
2951
+ var pickRandom = (arr) => arr[Math.floor(Math.random() * arr.length)];
2952
+ function scaffoldCompleteMessage() {
2953
+ return cliBox(
2954
+ import_outdent20.outdent`
2955
+
2956
+ ${import_logger3.colors.bold().cyan("Next steps:")}
2957
+
2958
+ [1] Create a ${(0, import_logger3.quote)("index.css")} file in your project that contains:
2959
+
2960
+ @layer reset, base, tokens, recipes, utilities;
2961
+
2962
+
2963
+ [2] Import the ${(0, import_logger3.quote)("index.css")} file at the root of your project.
2964
+
2965
+ `,
2966
+ `\u{1F43C} ${pickRandom(randomWords)}! \u2728`
2967
+ );
2968
+ }
2969
+
2970
+ // src/artifacts.ts
2971
+ async function emitArtifacts(ctx) {
2972
+ if (ctx.clean)
2973
+ await ctx.cleanOutdir();
2974
+ const tasks = generateSystem(ctx).map((file) => ctx.writeOutput(file));
2975
+ await Promise.all(tasks);
2976
+ return artifactsGeneratedMessage(ctx) + scaffoldCompleteMessage();
2977
+ }
2978
+ async function emitAndExtract(ctx) {
2979
+ await emitArtifacts(ctx);
2980
+ await extractFiles(ctx);
2981
+ await bundleChunks(ctx);
2982
+ }
2983
+ function getBaseCss(ctx) {
2984
+ const css2 = [generateReset(), generateTokenCss(ctx), generateKeyframes(ctx.keyframes)];
2985
+ return css2.join("\n");
2986
+ }
2987
+
2988
+ // src/builder.ts
2989
+ init_cjs_shims();
2990
+ var import_core4 = require("@pandacss/core");
2991
+ var import_error2 = require("@pandacss/error");
2992
+ var import_logger5 = require("@pandacss/logger");
2993
+ var import_shared12 = require("@pandacss/shared");
2994
+ var import_fs4 = require("fs");
2995
+ var import_fs_extra3 = require("fs-extra");
2996
+ var import_path5 = require("path");
2997
+
2998
+ // src/config.ts
2999
+ init_cjs_shims();
3000
+ var import_config = require("@pandacss/config");
3001
+ var import_look_it_up2 = require("look-it-up");
3002
+
3003
+ // src/context.ts
3004
+ init_cjs_shims();
3005
+ var import_ast = require("@pandacss/ast");
3006
+ var import_core3 = require("@pandacss/core");
3007
+ var import_error = require("@pandacss/error");
3008
+ var import_logger4 = require("@pandacss/logger");
3009
+ var import_shared11 = require("@pandacss/shared");
3010
+ var import_token_dictionary = require("@pandacss/token-dictionary");
3011
+ var import_fast_glob = __toESM(require("fast-glob"));
3012
+ var import_fs3 = require("fs");
3013
+ var import_fs_extra2 = require("fs-extra");
3014
+ var import_promises = require("fs/promises");
3015
+ var import_path3 = require("path");
3016
+ var import_postcss = __toESM(require("postcss"));
3017
+ var helpers = {
3018
+ map: import_shared11.mapObject
3019
+ };
3020
+ var fileSystem = {
3021
+ read: (path) => {
3022
+ return (0, import_promises.readFile)(path, "utf-8");
3023
+ },
3024
+ write: (path, code) => {
3025
+ return (0, import_promises.writeFile)(path, code);
3026
+ },
3027
+ rm: (path) => {
3028
+ return (0, import_promises.unlink)(path);
3029
+ }
3030
+ };
3031
+ function createContext(conf, io = fileSystem) {
3032
+ const { config } = conf;
3033
+ const {
3034
+ cwd: _cwd = process.cwd(),
3035
+ breakpoints = {},
3036
+ conditions: _conditions = {},
3037
+ tokens: _tokens = {},
3038
+ semanticTokens = {},
3039
+ cssVar,
3040
+ outdir,
3041
+ exclude: _exclude = [],
3042
+ patterns = {},
3043
+ recipes = {},
3044
+ utilities = {},
3045
+ textStyles,
3046
+ layerStyles,
3047
+ hash,
3048
+ jsxFactory = "panda",
3049
+ jsxFramework,
3050
+ globalCss,
3051
+ separator
3052
+ } = config;
3053
+ const cwd = (0, import_path3.resolve)(_cwd);
3054
+ const exclude = [".git", "node_modules", "test-results"].concat(_exclude);
3055
+ const tokens = new import_token_dictionary.TokenDictionary({
3056
+ tokens: _tokens,
3057
+ semanticTokens,
3058
+ prefix: cssVar?.prefix
3059
+ });
3060
+ const utility = new import_core3.Utility({
3061
+ tokens,
3062
+ config: utilities,
3063
+ separator
3064
+ });
3065
+ const conditions = new import_core3.Conditions({
3066
+ conditions: _conditions,
3067
+ breakpoints
3068
+ });
3069
+ (0, import_core3.assignCompositions)(
3070
+ { conditions, utility },
3071
+ (0, import_shared11.compact)({
3072
+ textStyle: textStyles,
3073
+ layerStyle: layerStyles
3074
+ })
3075
+ );
3076
+ const context = () => ({
3077
+ root: import_postcss.default.root(),
3078
+ breakpoints,
3079
+ conditions,
3080
+ hash,
3081
+ helpers,
3082
+ utility,
3083
+ hasShorthand: utility.hasShorthand,
3084
+ resolveShorthand(prop) {
3085
+ return utility.resolveShorthand(prop);
3086
+ },
3087
+ transform(prop, value) {
3088
+ return utility.resolve(prop, value);
3089
+ }
3090
+ });
3091
+ function getPattern(name) {
3092
+ const pattern = patterns[name];
3093
+ if (!pattern) {
3094
+ throw new import_error.NotFoundError({ type: "pattern", name });
3095
+ }
3096
+ return pattern;
3097
+ }
3098
+ function execPattern(name, data) {
3099
+ const pattern = getPattern(name);
3100
+ return pattern.transform?.(data, helpers) ?? {};
3101
+ }
3102
+ const patternNodes = Object.entries(patterns).map(([name, pattern]) => ({
3103
+ name: pattern.jsx ?? (0, import_shared11.capitalize)(name),
3104
+ props: Object.keys(pattern.properties),
3105
+ baseName: name
3106
+ }));
3107
+ function getPatternFnName(jsx) {
3108
+ return patternNodes.find((node) => node.name === jsx)?.baseName ?? (0, import_shared11.uncapitalize)(jsx);
3109
+ }
3110
+ function getRecipe(name) {
3111
+ const recipe = recipes[name];
3112
+ if (!recipe) {
3113
+ throw new import_error.NotFoundError({ type: "recipe", name });
3114
+ }
3115
+ return recipe;
3116
+ }
3117
+ const properties = Array.from(/* @__PURE__ */ new Set(["css", ...utility.keys(), ...conditions.keys()]));
3118
+ function isProperty(prop) {
3119
+ const regex = new RegExp("^(?:" + properties.join("|") + ")$");
3120
+ return regex.test(prop);
3121
+ }
3122
+ function getPath(str) {
3123
+ return (0, import_path3.join)(cwd, outdir, str);
3124
+ }
3125
+ function absPath(str) {
3126
+ return (0, import_path3.isAbsolute)(str) ? str : (0, import_path3.join)(cwd, str);
3127
+ }
3128
+ const paths = {
3129
+ config: getPath("config.js"),
3130
+ css: getPath("css"),
3131
+ token: getPath("tokens"),
3132
+ types: getPath("types"),
3133
+ recipe: getPath("recipes"),
3134
+ pattern: getPath("patterns"),
3135
+ chunk: getPath("chunks"),
3136
+ outCss: getPath("styles.css"),
3137
+ jsx: getPath("jsx")
3138
+ };
3139
+ async function write(dir, options) {
3140
+ await (0, import_fs_extra2.ensureDir)(dir);
3141
+ return Promise.all(
3142
+ options.map(async ({ file, code }) => {
3143
+ const absPath2 = (0, import_path3.join)(dir, file);
3144
+ if (code) {
3145
+ return io.write(absPath2, code);
3146
+ }
3147
+ })
3148
+ );
3149
+ }
3150
+ function cleanOutdir() {
3151
+ return (0, import_fs_extra2.emptyDir)(outdir);
3152
+ }
3153
+ function writeOutput(output) {
3154
+ const { dir = outdir, files: files2 } = output;
3155
+ return write(dir, files2);
3156
+ }
3157
+ const chunks = {
3158
+ dir: paths.chunk,
3159
+ readFile(file) {
3160
+ let fileName = chunks.format(file);
3161
+ fileName = (0, import_path3.join)(paths.chunk, fileName);
3162
+ if (!(0, import_fs_extra2.existsSync)(fileName)) {
3163
+ return Promise.resolve("");
3164
+ }
3165
+ return io.read(fileName);
3166
+ },
3167
+ getFiles() {
3168
+ return (0, import_fs3.readdirSync)(chunks.dir);
3169
+ },
3170
+ format(file) {
3171
+ return (0, import_path3.relative)(cwd, file).replaceAll(import_path3.sep, "__").replace((0, import_path3.extname)(file), ".css");
3172
+ },
3173
+ async write(file, css2) {
3174
+ const fileName = chunks.format(file);
3175
+ const oldCss = await chunks.readFile(file);
3176
+ const newCss = (0, import_core3.discardDuplicate)([oldCss.trim(), css2.trim()].filter(Boolean).join("\n\n"));
3177
+ import_logger4.logger.debug({ type: "chunk:write", file, path: fileName });
3178
+ return write(paths.chunk, [{ file: fileName, code: newCss }]);
3179
+ },
3180
+ rm(file) {
3181
+ const fileName = chunks.format(file);
3182
+ return io.rm((0, import_path3.join)(paths.chunk, fileName));
3183
+ },
3184
+ glob: [`${paths.chunk}/**/*.css`]
3185
+ };
3186
+ function getFiles() {
3187
+ return import_fast_glob.default.sync(config.include, { cwd, ignore: config.exclude, absolute: true });
3188
+ }
3189
+ const files = getFiles();
3190
+ const importMap = {
3191
+ css: `${outdir}/css`,
3192
+ recipe: `${outdir}/recipes`,
3193
+ pattern: `${outdir}/patterns`,
3194
+ jsx: `${outdir}/jsx`
3195
+ };
3196
+ const tsProject = (0, import_ast.createProject)();
3197
+ tsProject.addSourceFilesAtPaths(files);
3198
+ const parseSourceFile = (0, import_ast.createParser)({
3199
+ importMap,
3200
+ jsx: {
3201
+ factory: jsxFactory,
3202
+ isStyleProp: isProperty,
3203
+ nodes: patternNodes
3204
+ }
3205
+ });
3206
+ function collectStyles(collector, file) {
3207
+ const sheet = new import_core3.Stylesheet(context());
3208
+ if (globalCss) {
3209
+ sheet.addGlobalCss(globalCss);
3210
+ }
3211
+ collector.globalCss.forEach((result) => {
3212
+ sheet.processGlobalCss(result.data);
3213
+ });
3214
+ collector.css.forEach((result) => {
3215
+ sheet.processAtomic(result.data);
3216
+ });
3217
+ collector.cssMap.forEach((result) => {
3218
+ for (const data of Object.values(result.data)) {
3219
+ sheet.processAtomic(data);
3220
+ }
3221
+ });
3222
+ collector.jsx.forEach((result) => {
3223
+ const { data, type, name } = result;
3224
+ const { css: css2 = {}, ...rest } = data;
3225
+ const styles2 = { ...css2, ...rest };
3226
+ if (name && type === "pattern") {
3227
+ collector.setPattern(getPatternFnName(name), { data: styles2 });
3228
+ } else {
3229
+ sheet.processAtomic(styles2);
3230
+ }
3231
+ });
3232
+ collector.recipe.forEach((result, name) => {
3233
+ try {
3234
+ for (const item of result) {
3235
+ sheet.processRecipe(getRecipe(name), item.data);
3236
+ }
3237
+ } catch (error) {
3238
+ import_logger4.logger.error({ err: error });
3239
+ }
3240
+ });
3241
+ collector.pattern.forEach((result, name) => {
3242
+ try {
3243
+ for (const item of result) {
3244
+ const styles2 = execPattern(name, item.data);
3245
+ sheet.processAtomic(styles2);
3246
+ }
3247
+ } catch (error) {
3248
+ import_logger4.logger.error({ err: error });
3249
+ }
3250
+ });
3251
+ if (collector.isEmpty) {
3252
+ return;
3253
+ }
3254
+ return {
3255
+ css: sheet.toCss({ minify: config.minify }),
3256
+ file: chunks.format(file)
3257
+ };
3258
+ }
3259
+ function extract(fn) {
3260
+ return Promise.all(files.map(fn));
3261
+ }
3262
+ return {
3263
+ ...config,
3264
+ config,
3265
+ configPath: conf.path,
3266
+ cwd,
3267
+ conf,
3268
+ chunks,
3269
+ files,
3270
+ helpers,
3271
+ context,
3272
+ exclude,
3273
+ conditions,
3274
+ importMap,
3275
+ reloadSourceFiles() {
3276
+ const files2 = getFiles();
3277
+ for (const file of files2) {
3278
+ const source = tsProject.getSourceFile(file);
3279
+ if (source) {
3280
+ source.refreshFromFileSystemSync();
3281
+ } else {
3282
+ tsProject.addSourceFileAtPath(file);
3283
+ }
3284
+ }
3285
+ },
3286
+ getSourceFile(file) {
3287
+ return tsProject.getSourceFile(absPath(file));
3288
+ },
3289
+ addSourceFile(file) {
3290
+ return tsProject.addSourceFileAtPath(absPath(file));
3291
+ },
3292
+ removeSourceFile(file) {
3293
+ const sourceFile = tsProject.getSourceFile(absPath(file));
3294
+ if (sourceFile) {
3295
+ return tsProject.removeSourceFile(sourceFile);
3296
+ }
3297
+ },
3298
+ parseSourceFile,
3299
+ getPath,
3300
+ paths,
3301
+ write,
3302
+ writeOutput,
3303
+ cleanOutdir,
3304
+ tokens,
3305
+ hasTokens: !tokens.isEmpty,
3306
+ utility,
3307
+ collectStyles,
3308
+ patterns,
3309
+ hasPattern: Object.keys(patterns).length > 0,
3310
+ getPattern,
3311
+ execPattern,
3312
+ patternNodes,
3313
+ getPatternFnName,
3314
+ recipes,
3315
+ getRecipe,
3316
+ hasRecipes: Object.keys(recipes).length > 0,
3317
+ jsxFramework,
3318
+ jsxFactory,
3319
+ cssVarRoot: config.cssVar?.root ?? ":where(:root, :host)",
3320
+ properties,
3321
+ isProperty,
3322
+ extract
3323
+ };
3324
+ }
3325
+
3326
+ // src/config.ts
3327
+ var configs = [".ts", ".js", ".mjs", ".cjs"];
3328
+ function findConfig() {
3329
+ for (const config of configs) {
3330
+ const result = (0, import_look_it_up2.lookItUpSync)(`panda.config${config}`);
3331
+ if (result) {
3332
+ return result;
3333
+ }
3334
+ }
3335
+ }
3336
+ async function loadConfigAndCreateContext(options = {}) {
3337
+ const { cwd = process.cwd(), config, configPath } = options;
3338
+ const conf = await (0, import_config.loadConfigFile)({ cwd, file: configPath });
3339
+ if (config) {
3340
+ Object.assign(conf.config, config);
3341
+ }
3342
+ return createContext(conf);
3343
+ }
3344
+
3345
+ // src/glob.ts
3346
+ init_cjs_shims();
3347
+ var import_glob_parent = __toESM(require("glob-parent"));
3348
+ var import_is_glob = __toESM(require("is-glob"));
3349
+ var import_path4 = require("path");
3350
+ function parseGlob(pattern) {
3351
+ let glob2 = pattern;
3352
+ const base = (0, import_glob_parent.default)(pattern);
3353
+ if (base !== ".") {
3354
+ glob2 = pattern.substring(base.length);
3355
+ if (glob2.charAt(0) === "/") {
3356
+ glob2 = glob2.substring(1);
3357
+ }
3358
+ }
3359
+ if (glob2.substring(0, 2) === "./") {
3360
+ glob2 = glob2.substring(2);
3361
+ }
3362
+ if (glob2.charAt(0) === "/") {
3363
+ glob2 = glob2.substring(1);
3364
+ }
3365
+ return { base, glob: glob2 };
3366
+ }
3367
+ function parseDependency(fileOrGlob) {
3368
+ if (fileOrGlob.startsWith("!")) {
3369
+ return null;
3370
+ }
3371
+ let message = null;
3372
+ if ((0, import_is_glob.default)(fileOrGlob)) {
3373
+ const { base, glob: glob2 } = parseGlob(fileOrGlob);
3374
+ message = { type: "dir-dependency", dir: (0, import_path4.resolve)(base), glob: glob2 };
3375
+ } else {
3376
+ message = { type: "dependency", file: (0, import_path4.resolve)(fileOrGlob) };
3377
+ }
3378
+ if (message.type === "dir-dependency" && process.env.ROLLUP_WATCH === "true") {
3379
+ message = { type: "dependency", file: message.dir };
3380
+ }
3381
+ return message;
3382
+ }
3383
+
3384
+ // src/builder.ts
3385
+ var contextCache = /* @__PURE__ */ new Map();
3386
+ var builderCache = /* @__PURE__ */ new WeakMap();
3387
+ function getConfigHash() {
3388
+ const file = findConfig();
3389
+ if (!file) {
3390
+ throw new import_error2.ConfigNotFoundError();
3391
+ }
3392
+ return (0, import_shared12.toHash)((0, import_fs4.readFileSync)(file, "utf-8"));
3393
+ }
3394
+ var Builder = class {
3395
+ fileModifiedMap = /* @__PURE__ */ new Map();
3396
+ fileMap = /* @__PURE__ */ new Map();
3397
+ context;
3398
+ configChanged = true;
3399
+ updateFile(file, css2) {
3400
+ const oldCss = this.fileMap?.get(file) ?? "";
3401
+ const newCss = (0, import_core4.discardDuplicate)(oldCss + css2);
3402
+ this.fileMap?.set(file, newCss);
3403
+ }
3404
+ async setup() {
3405
+ const configHash = getConfigHash();
3406
+ const cachedContext = contextCache.get(configHash);
3407
+ if (cachedContext) {
3408
+ cachedContext.reloadSourceFiles();
3409
+ this.context = cachedContext;
3410
+ this.fileMap = builderCache.get(cachedContext).fileMap;
3411
+ this.fileModifiedMap = builderCache.get(cachedContext).fileModifiedMap;
3412
+ } else {
3413
+ this.context = await loadConfigAndCreateContext();
3414
+ this.fileMap = /* @__PURE__ */ new Map([["base.css", getBaseCss(this.context)]]);
3415
+ this.fileModifiedMap = /* @__PURE__ */ new Map();
3416
+ contextCache.set(configHash, this.context);
3417
+ builderCache.set(this.context, { fileMap: this.fileMap, fileModifiedMap: this.fileModifiedMap });
3418
+ }
3419
+ }
3420
+ ensure() {
3421
+ if (!this.context)
3422
+ throw new Error("context not loaded");
3423
+ return this.context;
3424
+ }
3425
+ async extract() {
3426
+ const ctx = this.ensure();
3427
+ const done = import_logger5.logger.time.info("Extracted in");
3428
+ await ctx.extract(async (file) => {
3429
+ const mtime = (0, import_fs4.existsSync)(file) ? (0, import_fs_extra3.statSync)(file).mtimeMs : -Infinity;
3430
+ const isUnchanged = this.fileModifiedMap.has(file) && mtime === this.fileModifiedMap.get(file);
3431
+ if (isUnchanged)
3432
+ return;
3433
+ const result = extractFile(ctx, file);
3434
+ if (!result)
3435
+ return;
3436
+ this.fileModifiedMap.set(file, mtime);
3437
+ this.updateFile(file, result.css);
3438
+ return result;
3439
+ });
3440
+ done();
3441
+ }
3442
+ toString() {
3443
+ return Array.from(this.fileMap.values()).join("");
3444
+ }
3445
+ write(root) {
3446
+ const prev = root.toString();
3447
+ root.removeAll();
3448
+ const css2 = (0, import_core4.discardDuplicate)(prev + this.toString());
3449
+ root.append(css2);
3450
+ }
3451
+ registerDependency(fn) {
3452
+ const ctx = this.ensure();
3453
+ for (const fileOrGlob of ctx.config.include) {
3454
+ const dependency = parseDependency(fileOrGlob);
3455
+ if (dependency) {
3456
+ fn(dependency);
3457
+ }
3458
+ }
3459
+ for (const file of ctx.conf.dependencies) {
3460
+ fn({ type: "dependency", file: (0, import_path5.resolve)(file) });
3461
+ }
3462
+ }
3463
+ };
3464
+
3465
+ // src/exec.ts
3466
+ init_cjs_shims();
3467
+ var import_logger6 = require("@pandacss/logger");
3468
+ var import_child_process = require("child_process");
3469
+ var import_preferred_pm = __toESM(require("preferred-pm"));
3470
+ async function execCommand(cmd, cwd) {
3471
+ const manager = await (0, import_preferred_pm.default)(cwd);
3472
+ const pm = manager?.name ?? "npm";
3473
+ const args = cmd.split(" ");
3474
+ if (pm === "npm") {
3475
+ args.unshift("run");
3476
+ }
3477
+ const check = (0, import_child_process.spawnSync)(pm, args, { cwd, stdio: "pipe" });
3478
+ if (check.status !== 0) {
3479
+ import_logger6.logger.error(check.stderr.toString());
3480
+ }
3481
+ }
3482
+
3483
+ // src/generate.ts
3484
+ init_cjs_shims();
3485
+
3486
+ // src/watch.ts
3487
+ init_cjs_shims();
3488
+ var import_logger7 = require("@pandacss/logger");
3489
+ var import_chokidar = __toESM(require("chokidar"));
3490
+ var import_path6 = require("path");
3491
+ function createWatcher(files, options = {}) {
3492
+ const { ignore, cwd = process.cwd(), poll } = options;
3493
+ const coalesce = poll || process.platform === "win32";
3494
+ const watcher = import_chokidar.default.watch(files, {
3495
+ usePolling: poll,
3496
+ cwd,
3497
+ ignoreInitial: true,
3498
+ ignorePermissionErrors: true,
3499
+ ignored: ignore,
3500
+ awaitWriteFinish: coalesce ? { stabilityThreshold: 50, pollInterval: 10 } : false
3501
+ });
3502
+ import_logger7.logger.debug({
3503
+ type: "file:watcher",
3504
+ msg: `watching [${files}]`
3505
+ });
3506
+ process.once("SIGINT", async () => {
3507
+ await watcher.close();
3508
+ });
3509
+ return watcher;
3510
+ }
3511
+ async function createConfigWatcher(conf) {
3512
+ return createWatcher(conf.dependencies);
3513
+ }
3514
+ async function createContentWatcher(ctx, callback) {
3515
+ const { include, cwd, exclude } = ctx;
3516
+ const watcher = createWatcher(include, {
3517
+ cwd,
3518
+ ignore: exclude
3519
+ });
3520
+ watcher.on("all", async (event, file) => {
3521
+ import_logger7.logger.debug({ type: `file:${event}`, file });
3522
+ ctx.removeSourceFile(file);
3523
+ if (event === "unlink") {
3524
+ ctx.chunks.rm(file);
3525
+ } else {
3526
+ ctx.addSourceFile(file);
3527
+ await callback(file);
3528
+ }
3529
+ });
3530
+ return watcher;
3531
+ }
3532
+ async function createAssetWatcher(ctx, callback) {
3533
+ const { cwd } = ctx;
3534
+ const watcher = createWatcher([(0, import_path6.join)(ctx.paths.chunk, "**/*.css")], { cwd });
3535
+ watcher.on("all", async (event, file) => {
3536
+ import_logger7.logger.debug({ type: `asset:${event}`, file });
3537
+ await callback();
3538
+ });
3539
+ return watcher;
3540
+ }
3541
+ process.setMaxListeners(Infinity);
3542
+ async function watch(ctx, options) {
3543
+ const chunkDirWatcher = await createAssetWatcher(ctx, options.onAssetChange);
3544
+ const contentWatcher = await createContentWatcher(ctx, options.onContentChange);
3545
+ const configWatcher = await createConfigWatcher(ctx.conf);
3546
+ async function close() {
3547
+ await configWatcher.close();
3548
+ await chunkDirWatcher.close();
3549
+ await contentWatcher.close();
3550
+ }
3551
+ configWatcher.on("change", async () => {
3552
+ await close();
3553
+ import_logger7.logger.info("Config changed, restarting...");
3554
+ await options.onConfigChange();
3555
+ });
3556
+ }
3557
+ process.on("unhandledRejection", (reason) => {
3558
+ import_logger7.logger.error({ err: reason });
3559
+ });
3560
+ process.on("uncaughtException", (err) => {
3561
+ import_logger7.logger.error({ err });
3562
+ });
3563
+
3564
+ // src/generate.ts
3565
+ async function generate5(config, configPath) {
3566
+ const ctx = await loadConfigAndCreateContext({ config, configPath });
3567
+ await emitAndExtract(ctx);
3568
+ if (ctx.watch) {
3569
+ process.stdin.on("end", () => process.exit());
3570
+ await watch(ctx, {
3571
+ onConfigChange: () => {
3572
+ return generate5(config, configPath);
3573
+ },
3574
+ onAssetChange() {
3575
+ return bundleChunks(ctx);
3576
+ },
3577
+ onContentChange: (file) => {
3578
+ return writeFileChunk(ctx, file);
3579
+ }
3580
+ });
3581
+ }
3582
+ }
3583
+
3584
+ // src/scaffold.ts
3585
+ init_cjs_shims();
3586
+ var import_logger8 = require("@pandacss/logger");
3587
+ var import_fs_extra4 = require("fs-extra");
3588
+ var import_look_it_up3 = require("look-it-up");
3589
+ var import_outdent21 = require("outdent");
3590
+ var import_path7 = require("path");
3591
+ var import_preferred_pm2 = __toESM(require("preferred-pm"));
3592
+ async function setupConfig(cwd, { force }) {
3593
+ const configFile = findConfig();
3594
+ const pmResult = await (0, import_preferred_pm2.default)(cwd);
3595
+ const pm = pmResult?.name ?? "npm";
3596
+ const cmd = pm === "npm" ? "npm run" : pm;
3597
+ const isTs = (0, import_look_it_up3.lookItUpSync)("tsconfig.json", cwd);
3598
+ const file = isTs ? "panda.config.ts" : "panda.config.mjs";
3599
+ import_logger8.logger.info({ type: "init", msg: `creating panda config file: ${(0, import_logger8.quote)(file)}` });
3600
+ if (!force && configFile) {
3601
+ import_logger8.logger.warn("config exists", configExistsMessage(cmd));
3602
+ } else {
3603
+ const content = import_outdent21.outdent`
3604
+ import { defineConfig } from "css-panda"
3605
+ import { utilities, breakpoints, conditions, keyframes, tokens, patterns } from "css-panda/presets"
3606
+
3607
+ export default defineConfig({
3608
+ // whether to use css reset
3609
+ preflight: true,
3610
+ // where to look for your css declarations
3611
+ include: ["./src/**/*.{tsx,jsx}", "./pages/**/*.{jsx,tsx}"],
3612
+ // files to exclude
3613
+ exclude: [],
3614
+ // The output directory for system
3615
+ outdir: "design-system",
3616
+ // Add your css conditions here (&:hover, &:focus, etc)
3617
+ conditions,
3618
+ // Add your tokens here
3619
+ tokens,
3620
+ // Add your semantic tokens here
3621
+ semanticTokens: {},
3622
+ // Add your keyframes here (spin, fade, etc)
3623
+ keyframes,
3624
+ // Add your breakpoints here (sm, md, lg, xl)
3625
+ breakpoints,
3626
+ // Add your css property utilities here (mt, ml, etc)
3627
+ utilities,
3628
+ // Add your css patterns here (stack, grid, etc)
3629
+ patterns,
3630
+ })
3631
+ `;
3632
+ await (0, import_fs_extra4.writeFile)((0, import_path7.join)(cwd, file), content);
3633
+ import_logger8.logger.log(thankYouMessage());
3634
+ }
3635
+ }
3636
+ async function setupPostcss(cwd) {
3637
+ import_logger8.logger.info({ type: "init", msg: `creating postcss config file: ${(0, import_logger8.quote)("postcss.config.cjs")}` });
3638
+ const content = import_outdent21.outdent`
3639
+ module.exports = {
3640
+ plugins: {
3641
+ 'css-panda/postcss': {},
3642
+ },
3643
+ }
3644
+ `;
3645
+ await (0, import_fs_extra4.writeFile)((0, import_path7.join)(cwd, "postcss.config.cjs"), content);
3646
+ }
3647
+ // Annotate the CommonJS export names for ESM import in node:
3648
+ 0 && (module.exports = {
3649
+ Builder,
3650
+ createContext,
3651
+ discardDuplicate,
3652
+ emitAndExtract,
3653
+ emitArtifacts,
3654
+ execCommand,
3655
+ generate,
3656
+ loadConfigAndCreateContext,
3657
+ setupConfig,
3658
+ setupPostcss
3659
+ });