gemi 0.53.0 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/dist/app/index.js +2 -2
  2. package/dist/app/index.js.map +1 -1
  3. package/dist/bin/gemi.js +1456 -5
  4. package/dist/bin/gemi.js.map +9 -5
  5. package/dist/broadcasting/index.js +1 -1
  6. package/dist/bun/plugin.js +2 -2
  7. package/dist/bun/plugin.js.map +1 -1
  8. package/dist/bun/preload.js +2 -2
  9. package/dist/bun/preload.js.map +1 -1
  10. package/dist/{chunk-msz8rngs.js → chunk-004bcmsa.js} +2 -2
  11. package/dist/chunk-004bcmsa.js.map +10 -0
  12. package/dist/chunk-07t0dmdg.js +4 -0
  13. package/dist/{chunk-faa987e4.js.map → chunk-07t0dmdg.js.map} +2 -2
  14. package/dist/{chunk-cg53h5ht.js → chunk-0weeq0ke.js} +2 -2
  15. package/dist/{chunk-cg53h5ht.js.map → chunk-0weeq0ke.js.map} +1 -1
  16. package/dist/chunk-113khwbw.js +5 -0
  17. package/dist/{chunk-2qn472j4.js.map → chunk-113khwbw.js.map} +1 -1
  18. package/dist/{chunk-tmk4zfz9.js → chunk-1sh6kqjn.js} +3 -3
  19. package/dist/{chunk-tmk4zfz9.js.map → chunk-1sh6kqjn.js.map} +1 -1
  20. package/dist/{chunk-2gw6cyyj.js → chunk-1snh7yc4.js} +2 -2
  21. package/dist/{chunk-2gw6cyyj.js.map → chunk-1snh7yc4.js.map} +1 -1
  22. package/dist/chunk-26r8dcxd.js +6 -0
  23. package/dist/{chunk-ffre1z8s.js.map → chunk-26r8dcxd.js.map} +2 -2
  24. package/dist/{chunk-ebcgdv00.js → chunk-2pt6kyn9.js} +3 -3
  25. package/dist/{chunk-ebcgdv00.js.map → chunk-2pt6kyn9.js.map} +1 -1
  26. package/dist/{chunk-1pqfmw5h.js → chunk-2zmz3pjk.js} +3 -3
  27. package/dist/{chunk-1pqfmw5h.js.map → chunk-2zmz3pjk.js.map} +1 -1
  28. package/dist/{chunk-zhsaz9cr.js → chunk-3bw1jk21.js} +1 -1
  29. package/dist/chunk-4qkzdyj7.js +4 -0
  30. package/dist/{chunk-0h3jr9d9.js.map → chunk-4qkzdyj7.js.map} +1 -1
  31. package/dist/{chunk-d1ahbza9.js → chunk-50vm7x98.js} +3 -3
  32. package/dist/{chunk-d1ahbza9.js.map → chunk-50vm7x98.js.map} +1 -1
  33. package/dist/{chunk-qyaqg07q.js → chunk-6j1z2cqt.js} +2 -2
  34. package/dist/{chunk-qyaqg07q.js.map → chunk-6j1z2cqt.js.map} +1 -1
  35. package/dist/chunk-6rhebm18.js +5 -0
  36. package/dist/chunk-6rhebm18.js.map +10 -0
  37. package/dist/{chunk-rq770c71.js → chunk-71m47kad.js} +2 -2
  38. package/dist/{chunk-rq770c71.js.map → chunk-71m47kad.js.map} +1 -1
  39. package/dist/{chunk-0h3jr9d9.js → chunk-7f5ad759.js} +2 -2
  40. package/dist/{chunk-4e61qbp4.js.map → chunk-7f5ad759.js.map} +1 -1
  41. package/dist/chunk-85av4ncy.js +4 -0
  42. package/dist/{chunk-3d3nmr5g.js.map → chunk-85av4ncy.js.map} +2 -2
  43. package/dist/{chunk-23g7qdpg.js → chunk-9taz1h3t.js} +3 -3
  44. package/dist/{chunk-23g7qdpg.js.map → chunk-9taz1h3t.js.map} +1 -1
  45. package/dist/{chunk-ppt296ye.js → chunk-agabw2w1.js} +2 -2
  46. package/dist/{chunk-ppt296ye.js.map → chunk-agabw2w1.js.map} +1 -1
  47. package/dist/{chunk-092pj2j2.js → chunk-bb3zvxsf.js} +3 -3
  48. package/dist/{chunk-092pj2j2.js.map → chunk-bb3zvxsf.js.map} +1 -1
  49. package/dist/{chunk-h7jv3ame.js → chunk-br8ten26.js} +2 -2
  50. package/dist/{chunk-h7jv3ame.js.map → chunk-br8ten26.js.map} +1 -1
  51. package/dist/{chunk-4e61qbp4.js → chunk-bzhtymvv.js} +2 -2
  52. package/dist/{chunk-8p6rqegw.js.map → chunk-bzhtymvv.js.map} +1 -1
  53. package/dist/{chunk-68w225rv.js → chunk-c0wcsmpj.js} +2 -2
  54. package/dist/{chunk-68w225rv.js.map → chunk-c0wcsmpj.js.map} +1 -1
  55. package/dist/{chunk-xsmt86n3.js → chunk-c22vcxty.js} +2 -2
  56. package/dist/{chunk-xsmt86n3.js.map → chunk-c22vcxty.js.map} +1 -1
  57. package/dist/{chunk-07jtzbf0.js → chunk-c2pv3ah8.js} +2 -2
  58. package/dist/{chunk-07jtzbf0.js.map → chunk-c2pv3ah8.js.map} +2 -2
  59. package/dist/{chunk-q09mmr05.js → chunk-cz3szqhq.js} +2 -2
  60. package/dist/{chunk-q09mmr05.js.map → chunk-cz3szqhq.js.map} +1 -1
  61. package/dist/{chunk-69w4egkg.js → chunk-dwx2y7br.js} +4 -4
  62. package/dist/{chunk-69w4egkg.js.map → chunk-dwx2y7br.js.map} +1 -1
  63. package/dist/{chunk-2sfz64xh.js → chunk-dxw8k6f1.js} +2 -2
  64. package/dist/{chunk-2sfz64xh.js.map → chunk-dxw8k6f1.js.map} +1 -1
  65. package/dist/chunk-e3mggavt.js +5 -0
  66. package/dist/chunk-e3mggavt.js.map +11 -0
  67. package/dist/{chunk-j1knf8gv.js → chunk-efsk1wy0.js} +3 -3
  68. package/dist/{chunk-j1knf8gv.js.map → chunk-efsk1wy0.js.map} +1 -1
  69. package/dist/{chunk-t4n25km9.js → chunk-f13f68c0.js} +2 -2
  70. package/dist/{chunk-t4n25km9.js.map → chunk-f13f68c0.js.map} +1 -1
  71. package/dist/{chunk-vv72kw74.js → chunk-f418jh9k.js} +2 -2
  72. package/dist/{chunk-vv72kw74.js.map → chunk-f418jh9k.js.map} +1 -1
  73. package/dist/chunk-f4e7fh95.js +17 -0
  74. package/dist/chunk-f4e7fh95.js.map +14 -0
  75. package/dist/{chunk-ewgv1j8q.js → chunk-fcqc3e3r.js} +2 -2
  76. package/dist/{chunk-ewgv1j8q.js.map → chunk-fcqc3e3r.js.map} +1 -1
  77. package/dist/{chunk-3y9nf09k.js → chunk-g5tj10p8.js} +2 -2
  78. package/dist/{chunk-3y9nf09k.js.map → chunk-g5tj10p8.js.map} +1 -1
  79. package/dist/chunk-gn9zjgep.js +5 -0
  80. package/dist/chunk-gn9zjgep.js.map +10 -0
  81. package/dist/{chunk-5s45prj5.js → chunk-h7mcwfg5.js} +4 -4
  82. package/dist/{chunk-5s45prj5.js.map → chunk-h7mcwfg5.js.map} +1 -1
  83. package/dist/chunk-hk067634.js +4 -0
  84. package/dist/{chunk-vnjvd82s.js.map → chunk-hk067634.js.map} +2 -2
  85. package/dist/{chunk-qx6sahe0.js → chunk-hrrmxreg.js} +2 -2
  86. package/dist/{chunk-qx6sahe0.js.map → chunk-hrrmxreg.js.map} +1 -1
  87. package/dist/{chunk-p22rkf1g.js → chunk-jb022m7n.js} +2 -2
  88. package/dist/{chunk-p22rkf1g.js.map → chunk-jb022m7n.js.map} +1 -1
  89. package/dist/chunk-jb2nst6v.js +4 -0
  90. package/dist/{chunk-6scjrbw7.js.map → chunk-jb2nst6v.js.map} +2 -2
  91. package/dist/{chunk-kxzwem3g.js → chunk-jdgvdddd.js} +2 -2
  92. package/dist/{chunk-kxzwem3g.js.map → chunk-jdgvdddd.js.map} +1 -1
  93. package/dist/{chunk-2yth3kk2.js → chunk-jp4pf3yt.js} +4 -4
  94. package/dist/{chunk-2yth3kk2.js.map → chunk-jp4pf3yt.js.map} +1 -1
  95. package/dist/chunk-k14dmqwh.js +5 -0
  96. package/dist/{chunk-92793zh4.js.map → chunk-k14dmqwh.js.map} +4 -3
  97. package/dist/{chunk-tkv6cw94.js → chunk-k8endm5j.js} +3 -3
  98. package/dist/{chunk-tkv6cw94.js.map → chunk-k8endm5j.js.map} +1 -1
  99. package/dist/chunk-kkkqyvwv.js +81 -0
  100. package/dist/{chunk-ear03axe.js.map → chunk-kkkqyvwv.js.map} +7 -5
  101. package/dist/{chunk-cmq5t8p9.js → chunk-kv2ep453.js} +3 -3
  102. package/dist/{chunk-cmq5t8p9.js.map → chunk-kv2ep453.js.map} +1 -1
  103. package/dist/{chunk-z4q1ty6w.js → chunk-kz39hphm.js} +3 -3
  104. package/dist/{chunk-z4q1ty6w.js.map → chunk-kz39hphm.js.map} +1 -1
  105. package/dist/{chunk-kaxvw75w.js → chunk-ms8qd7da.js} +3 -3
  106. package/dist/{chunk-kaxvw75w.js.map → chunk-ms8qd7da.js.map} +1 -1
  107. package/dist/{chunk-ttzkn1qd.js → chunk-n1tkn8gv.js} +2 -2
  108. package/dist/{chunk-ttzkn1qd.js.map → chunk-n1tkn8gv.js.map} +1 -1
  109. package/dist/chunk-nncwsdzz.js +5 -0
  110. package/dist/chunk-nncwsdzz.js.map +10 -0
  111. package/dist/{chunk-7s1g3v1y.js → chunk-pgjk5ft3.js} +3 -3
  112. package/dist/{chunk-7s1g3v1y.js.map → chunk-pgjk5ft3.js.map} +1 -1
  113. package/dist/{chunk-tztqkat2.js → chunk-r06rxn19.js} +2 -2
  114. package/dist/{chunk-tztqkat2.js.map → chunk-r06rxn19.js.map} +1 -1
  115. package/dist/chunk-r9z5rrk0.js +4 -0
  116. package/dist/{chunk-1ab1ptq5.js.map → chunk-r9z5rrk0.js.map} +2 -2
  117. package/dist/{chunk-h5g05qwb.js → chunk-s6e7cvek.js} +2 -2
  118. package/dist/{chunk-h5g05qwb.js.map → chunk-s6e7cvek.js.map} +1 -1
  119. package/dist/{chunk-qjnv2rkh.js → chunk-sqp7kn7h.js} +3 -3
  120. package/dist/{chunk-qjnv2rkh.js.map → chunk-sqp7kn7h.js.map} +1 -1
  121. package/dist/{chunk-mt2755rs.js → chunk-w6gb9gc5.js} +3 -3
  122. package/dist/{chunk-mt2755rs.js.map → chunk-w6gb9gc5.js.map} +1 -1
  123. package/dist/{chunk-ha7n1c94.js → chunk-xxw0gz4q.js} +2 -2
  124. package/dist/{chunk-ha7n1c94.js.map → chunk-xxw0gz4q.js.map} +1 -1
  125. package/dist/chunk-ywr2vd5r.js +5 -0
  126. package/dist/{chunk-9279y4af.js.map → chunk-ywr2vd5r.js.map} +2 -2
  127. package/dist/{chunk-fbp5vapa.js → chunk-zckj6bs6.js} +3 -3
  128. package/dist/{chunk-fbp5vapa.js.map → chunk-zckj6bs6.js.map} +2 -2
  129. package/dist/chunks/{ThemeProvider-CTX9LOFC.js → ThemeProvider-Bk1eZymb.js} +186 -3
  130. package/dist/chunks/ThemeProvider-Bk1eZymb.js.map +1 -0
  131. package/dist/client/ComponentContext.d.ts.map +1 -1
  132. package/dist/client/DictionarySinkContext.d.ts +10 -0
  133. package/dist/client/DictionarySinkContext.d.ts.map +1 -0
  134. package/dist/client/createRoot.d.ts.map +1 -1
  135. package/dist/client/index.d.ts +2 -0
  136. package/dist/client/index.d.ts.map +1 -1
  137. package/dist/client/index.js +187 -8
  138. package/dist/client/index.js.map +1 -1
  139. package/dist/client/useDictionary.d.ts +34 -0
  140. package/dist/client/useDictionary.d.ts.map +1 -0
  141. package/dist/client/useDictionary.test-d.d.ts +2 -0
  142. package/dist/client/useDictionary.test-d.d.ts.map +1 -0
  143. package/dist/client/useTranslator.d.ts +8 -0
  144. package/dist/client/useTranslator.d.ts.map +1 -1
  145. package/dist/config/index.js +1 -1
  146. package/dist/console/run.js +2 -2
  147. package/dist/console/run.js.map +1 -1
  148. package/dist/container/index.js +2 -2
  149. package/dist/container/index.js.map +1 -1
  150. package/dist/database/index.js +2 -2
  151. package/dist/database/index.js.map +1 -1
  152. package/dist/email/index.js +2 -2
  153. package/dist/email/index.js.map +1 -1
  154. package/dist/facades/Lang.d.ts.map +1 -1
  155. package/dist/facades/index.js +2 -2
  156. package/dist/facades/index.js.map +1 -1
  157. package/dist/foundation/index.js +2 -2
  158. package/dist/foundation/index.js.map +1 -1
  159. package/dist/http/index.js +2 -2
  160. package/dist/http/index.js.map +1 -1
  161. package/dist/i18n/Dictionary.d.ts +7 -0
  162. package/dist/i18n/Dictionary.d.ts.map +1 -1
  163. package/dist/i18n/Translator.d.ts +12 -0
  164. package/dist/i18n/Translator.d.ts.map +1 -1
  165. package/dist/i18n/config.d.ts +6 -0
  166. package/dist/i18n/config.d.ts.map +1 -1
  167. package/dist/i18n/defineDictionary.d.ts +65 -0
  168. package/dist/i18n/defineDictionary.d.ts.map +1 -0
  169. package/dist/i18n/dictionaryRegistry.d.ts +85 -0
  170. package/dist/i18n/dictionaryRegistry.d.ts.map +1 -0
  171. package/dist/i18n/dictionaryRuntime.d.ts +16 -0
  172. package/dist/i18n/dictionaryRuntime.d.ts.map +1 -0
  173. package/dist/i18n/dictionaryRuntime.js +4 -0
  174. package/dist/i18n/dictionaryRuntime.js.map +9 -0
  175. package/dist/i18n/dictionaryShape.d.ts +66 -0
  176. package/dist/i18n/dictionaryShape.d.ts.map +1 -0
  177. package/dist/i18n/dictionarySink.d.ts +31 -0
  178. package/dist/i18n/dictionarySink.d.ts.map +1 -0
  179. package/dist/i18n/index.d.ts +3 -0
  180. package/dist/i18n/index.d.ts.map +1 -1
  181. package/dist/i18n/index.js +2 -2
  182. package/dist/i18n/index.js.map +5 -4
  183. package/dist/i18n/translate.d.ts +21 -0
  184. package/dist/i18n/translate.d.ts.map +1 -0
  185. package/dist/internal/gemiExternals.d.ts +1 -1
  186. package/dist/internal/gemiExternals.d.ts.map +1 -1
  187. package/dist/kernel/index.js +2 -2
  188. package/dist/kernel/index.js.map +2 -2
  189. package/dist/orm/index.js +2 -2
  190. package/dist/orm/index.js.map +2 -2
  191. package/dist/server/index.js +2 -2
  192. package/dist/server/index.js.map +1 -1
  193. package/dist/services/index.js +4 -4
  194. package/dist/services/index.js.map +2 -2
  195. package/dist/services/router/ViewRouteDispatcher.d.ts.map +1 -1
  196. package/dist/services/router/streamQueryInjection.d.ts +9 -1
  197. package/dist/services/router/streamQueryInjection.d.ts.map +1 -1
  198. package/dist/support/index.js +2 -2
  199. package/dist/support/index.js.map +1 -1
  200. package/dist/testing/index.js +1 -1
  201. package/dist/vite/__vite-browser-external-S5EYS4bz.mjs +7 -0
  202. package/dist/vite/api_vite-DSBC5Nzy.mjs +5 -0
  203. package/dist/vite/browser-DFEUWTkA.mjs +6086 -0
  204. package/dist/vite/build-C0lmnz6d.mjs +5326 -0
  205. package/dist/vite/index.mjs +1349 -1
  206. package/dist/vite/lib-TT6NqN6b.mjs +363 -0
  207. package/dist/vite/lib-U4DF62jt.mjs +48846 -0
  208. package/dist/vite/main-Drp2rSLR.mjs +2123 -0
  209. package/dist/vite/node-BgyIm-M7.mjs +17799 -0
  210. package/dist/vite/node-yGkKTK1d.mjs +789 -0
  211. package/dist/vite/postcss-hCXrlC4m.mjs +3515 -0
  212. package/dist/vite/postcss-import-rYEe0OKc.mjs +448 -0
  213. package/dist/vite/prompt--dNycKSZ-BmZ8jzP_.mjs +889 -0
  214. package/dist/vite/rolldown-runtime-B4lejLz5.mjs +37 -0
  215. package/package.json +3 -1
  216. package/dist/chunk-1ab1ptq5.js +0 -4
  217. package/dist/chunk-2qn472j4.js +0 -5
  218. package/dist/chunk-3d3nmr5g.js +0 -4
  219. package/dist/chunk-6scjrbw7.js +0 -4
  220. package/dist/chunk-88pq4gmf.js +0 -5
  221. package/dist/chunk-88pq4gmf.js.map +0 -10
  222. package/dist/chunk-8p6rqegw.js +0 -4
  223. package/dist/chunk-92793zh4.js +0 -5
  224. package/dist/chunk-9279y4af.js +0 -5
  225. package/dist/chunk-bq4w14a6.js +0 -5
  226. package/dist/chunk-bq4w14a6.js.map +0 -10
  227. package/dist/chunk-ear03axe.js +0 -81
  228. package/dist/chunk-faa987e4.js +0 -4
  229. package/dist/chunk-ffre1z8s.js +0 -6
  230. package/dist/chunk-msz8rngs.js.map +0 -10
  231. package/dist/chunk-vnjvd82s.js +0 -4
  232. package/dist/chunk-xw44bwnh.js +0 -5
  233. package/dist/chunk-xw44bwnh.js.map +0 -11
  234. package/dist/chunk-y4djde42.js +0 -5
  235. package/dist/chunk-y4djde42.js.map +0 -11
  236. package/dist/chunks/ThemeProvider-CTX9LOFC.js.map +0 -1
  237. /package/dist/{chunk-zhsaz9cr.js.map → chunk-3bw1jk21.js.map} +0 -0
@@ -0,0 +1,3515 @@
1
+ import { i as __toESM, t as __commonJSMin } from "./rolldown-runtime-B4lejLz5.mjs";
2
+ import { t as require___vite_browser_external } from "./__vite-browser-external-S5EYS4bz.mjs";
3
+ //#region ../../node_modules/.bun/picocolors@1.1.1/node_modules/picocolors/picocolors.browser.js
4
+ var require_picocolors_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5
+ var x = String;
6
+ var create = function() {
7
+ return {
8
+ isColorSupported: false,
9
+ reset: x,
10
+ bold: x,
11
+ dim: x,
12
+ italic: x,
13
+ underline: x,
14
+ inverse: x,
15
+ hidden: x,
16
+ strikethrough: x,
17
+ black: x,
18
+ red: x,
19
+ green: x,
20
+ yellow: x,
21
+ blue: x,
22
+ magenta: x,
23
+ cyan: x,
24
+ white: x,
25
+ gray: x,
26
+ bgBlack: x,
27
+ bgRed: x,
28
+ bgGreen: x,
29
+ bgYellow: x,
30
+ bgBlue: x,
31
+ bgMagenta: x,
32
+ bgCyan: x,
33
+ bgWhite: x,
34
+ blackBright: x,
35
+ redBright: x,
36
+ greenBright: x,
37
+ yellowBright: x,
38
+ blueBright: x,
39
+ magentaBright: x,
40
+ cyanBright: x,
41
+ whiteBright: x,
42
+ bgBlackBright: x,
43
+ bgRedBright: x,
44
+ bgGreenBright: x,
45
+ bgYellowBright: x,
46
+ bgBlueBright: x,
47
+ bgMagentaBright: x,
48
+ bgCyanBright: x,
49
+ bgWhiteBright: x
50
+ };
51
+ };
52
+ module.exports = create();
53
+ module.exports.createColors = create;
54
+ }));
55
+ //#endregion
56
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/css-syntax-error.js
57
+ var require_css_syntax_error = /* @__PURE__ */ __commonJSMin(((exports, module) => {
58
+ var pico = require_picocolors_browser();
59
+ var terminalHighlight = require___vite_browser_external();
60
+ var CssSyntaxError = class CssSyntaxError extends Error {
61
+ constructor(message, line, column, source, file, plugin) {
62
+ super(message);
63
+ this.name = "CssSyntaxError";
64
+ this.reason = message;
65
+ if (file) this.file = file;
66
+ if (source) this.source = source;
67
+ if (plugin) this.plugin = plugin;
68
+ if (typeof line !== "undefined" && typeof column !== "undefined") if (typeof line === "number") {
69
+ this.line = line;
70
+ this.column = column;
71
+ } else {
72
+ this.line = line.line;
73
+ this.column = line.column;
74
+ this.endLine = column.line;
75
+ this.endColumn = column.column;
76
+ }
77
+ this.setMessage();
78
+ if (Error.captureStackTrace) Error.captureStackTrace(this, CssSyntaxError);
79
+ }
80
+ setMessage() {
81
+ this.message = this.plugin ? this.plugin + ": " : "";
82
+ this.message += this.file ? this.file : "<css input>";
83
+ if (typeof this.line !== "undefined") this.message += ":" + this.line + ":" + this.column;
84
+ this.message += ": " + this.reason;
85
+ }
86
+ showSourceCode(color) {
87
+ if (!this.source) return "";
88
+ let css = this.source;
89
+ if (color == null) color = pico.isColorSupported;
90
+ let aside = (text) => text;
91
+ let mark = (text) => text;
92
+ let highlight = (text) => text;
93
+ if (color) {
94
+ let { bold, gray, red } = pico.createColors(true);
95
+ mark = (text) => bold(red(text));
96
+ aside = (text) => gray(text);
97
+ if (terminalHighlight) highlight = (text) => terminalHighlight(text);
98
+ }
99
+ let lines = css.split(/\r?\n/);
100
+ let start = Math.max(this.line - 3, 0);
101
+ let end = Math.min(this.line + 2, lines.length);
102
+ let maxWidth = String(end).length;
103
+ return lines.slice(start, end).map((line, index) => {
104
+ let number = start + 1 + index;
105
+ let gutter = " " + (" " + number).slice(-maxWidth) + " | ";
106
+ if (number === this.line) {
107
+ if (line.length > 160) {
108
+ let padding = 20;
109
+ let subLineStart = Math.max(0, this.column - padding);
110
+ let subLineEnd = Math.max(this.column + padding, this.endColumn + padding);
111
+ let subLine = line.slice(subLineStart, subLineEnd);
112
+ let spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, Math.min(this.column - 1, padding - 1)).replace(/[^\t]/g, " ");
113
+ return mark(">") + aside(gutter) + highlight(subLine) + "\n " + spacing + mark("^");
114
+ }
115
+ let spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, this.column - 1).replace(/[^\t]/g, " ");
116
+ return mark(">") + aside(gutter) + highlight(line) + "\n " + spacing + mark("^");
117
+ }
118
+ return " " + aside(gutter) + highlight(line);
119
+ }).join("\n");
120
+ }
121
+ toString() {
122
+ let code = this.showSourceCode();
123
+ if (code) code = "\n\n" + code + "\n";
124
+ return this.name + ": " + this.message + code;
125
+ }
126
+ };
127
+ module.exports = CssSyntaxError;
128
+ CssSyntaxError.default = CssSyntaxError;
129
+ }));
130
+ //#endregion
131
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/stringifier.js
132
+ var require_stringifier = /* @__PURE__ */ __commonJSMin(((exports, module) => {
133
+ var STYLE_TAG = /(<)(\/?style\b)/gi;
134
+ var COMMENT_OPEN = /(<)(!--)/g;
135
+ function escapeHTMLInCSS(str) {
136
+ if (typeof str !== "string") return str;
137
+ if (!str.includes("<")) return str;
138
+ return str.replace(STYLE_TAG, "\\3c $2").replace(COMMENT_OPEN, "\\3c $2");
139
+ }
140
+ var DEFAULT_RAW = {
141
+ after: "\n",
142
+ beforeClose: "\n",
143
+ beforeComment: "\n",
144
+ beforeDecl: "\n",
145
+ beforeOpen: " ",
146
+ beforeRule: "\n",
147
+ colon: ": ",
148
+ commentLeft: " ",
149
+ commentRight: " ",
150
+ emptyBody: "",
151
+ indent: " ",
152
+ semicolon: false
153
+ };
154
+ function capitalize(str) {
155
+ return str[0].toUpperCase() + str.slice(1);
156
+ }
157
+ function atruleStart(str, node) {
158
+ let name = "@" + node.name;
159
+ let params = node.params ? str.rawValue(node, "params") : "";
160
+ if (typeof node.raws.afterName !== "undefined") name += node.raws.afterName;
161
+ else if (params) name += " ";
162
+ return name + params;
163
+ }
164
+ function pushBody(str, stack, node) {
165
+ let nodes = node.nodes;
166
+ let last = nodes.length - 1;
167
+ while (last > 0) {
168
+ if (nodes[last].type !== "comment") break;
169
+ last -= 1;
170
+ }
171
+ let semicolon = str.raw(node, "semicolon");
172
+ let isDocument = node.type === "document";
173
+ for (let i = nodes.length - 1; i >= 0; i--) stack.push({
174
+ document: isDocument,
175
+ node: nodes[i],
176
+ semicolon: last !== i || semicolon
177
+ });
178
+ }
179
+ function pushBlock(str, stack, node, start) {
180
+ let between = str.raw(node, "between", "beforeOpen");
181
+ str.builder(escapeHTMLInCSS(start + between) + "{", node, "start");
182
+ let hasNodes = node.nodes && node.nodes.length;
183
+ let close = () => {
184
+ let after = hasNodes ? str.raw(node, "after") : str.raw(node, "after", "emptyBody");
185
+ if (after) str.builder(escapeHTMLInCSS(after));
186
+ str.builder("}", node, "end");
187
+ if (node.type === "rule" && node.raws.ownSemicolon) str.builder(escapeHTMLInCSS(node.raws.ownSemicolon), node, "end");
188
+ };
189
+ if (hasNodes) {
190
+ stack.push(close);
191
+ pushBody(str, stack, node);
192
+ } else close();
193
+ }
194
+ var Stringifier = class Stringifier {
195
+ constructor(builder) {
196
+ this.builder = builder;
197
+ }
198
+ atrule(node, semicolon) {
199
+ let start = atruleStart(this, node);
200
+ if (node.nodes) this.block(node, start);
201
+ else {
202
+ let end = (node.raws.between || "") + (semicolon ? ";" : "");
203
+ this.builder(escapeHTMLInCSS(start + end), node);
204
+ }
205
+ }
206
+ beforeAfter(node, detect) {
207
+ let value;
208
+ if (node.type === "decl") value = this.raw(node, null, "beforeDecl");
209
+ else if (node.type === "comment") value = this.raw(node, null, "beforeComment");
210
+ else if (detect === "before") value = this.raw(node, null, "beforeRule");
211
+ else value = this.raw(node, null, "beforeClose");
212
+ let buf = node.parent;
213
+ let depth = 0;
214
+ while (buf && buf.type !== "root") {
215
+ depth += 1;
216
+ buf = buf.parent;
217
+ }
218
+ if (value.includes("\n")) {
219
+ let indent = this.raw(node, null, "indent");
220
+ if (indent.length) for (let step = 0; step < depth; step++) value += indent;
221
+ }
222
+ return value;
223
+ }
224
+ block(node, start) {
225
+ let between = this.raw(node, "between", "beforeOpen");
226
+ this.builder(escapeHTMLInCSS(start + between) + "{", node, "start");
227
+ let after;
228
+ if (node.nodes && node.nodes.length) {
229
+ this.body(node);
230
+ after = this.raw(node, "after");
231
+ } else after = this.raw(node, "after", "emptyBody");
232
+ if (after) this.builder(escapeHTMLInCSS(after));
233
+ this.builder("}", node, "end");
234
+ }
235
+ body(node) {
236
+ let proto = Stringifier.prototype;
237
+ let expandable = [
238
+ "atrule",
239
+ "block",
240
+ "body",
241
+ "rule",
242
+ "stringify"
243
+ ].every((method) => this[method] === proto[method]);
244
+ let stack = [];
245
+ pushBody(this, stack, node);
246
+ while (stack.length > 0) {
247
+ let entry = stack.pop();
248
+ if (typeof entry === "function") {
249
+ entry();
250
+ continue;
251
+ }
252
+ let child = entry.node;
253
+ let before = this.raw(child, "before");
254
+ if (before) this.builder(entry.document ? before : escapeHTMLInCSS(before));
255
+ if (expandable && child.type === "rule") pushBlock(this, stack, child, this.rawValue(child, "selector"));
256
+ else if (expandable && child.type === "atrule" && child.nodes) pushBlock(this, stack, child, atruleStart(this, child));
257
+ else this.stringify(child, entry.semicolon);
258
+ }
259
+ }
260
+ comment(node) {
261
+ let left = this.raw(node, "left", "commentLeft");
262
+ let right = this.raw(node, "right", "commentRight");
263
+ this.builder(escapeHTMLInCSS("/*" + left + node.text + right + "*/"), node);
264
+ }
265
+ decl(node, semicolon) {
266
+ let raws = node.raws;
267
+ let between = this.raw(node, "between", "colon");
268
+ let string = node.prop + between + this.rawValue(node, "value");
269
+ if (node.important) string += raws.important || " !important";
270
+ if (semicolon) string += ";";
271
+ this.builder(escapeHTMLInCSS(string), node);
272
+ }
273
+ document(node) {
274
+ this.body(node);
275
+ }
276
+ raw(node, own, detect) {
277
+ let value;
278
+ if (!detect) detect = own;
279
+ if (own) {
280
+ value = node.raws[own];
281
+ if (typeof value !== "undefined") return value;
282
+ }
283
+ let parent = node.parent;
284
+ if (detect === "before") {
285
+ if (!parent || parent.type === "root" && parent.first === node) return "";
286
+ if (parent && parent.type === "document") return "";
287
+ }
288
+ if (!parent) return DEFAULT_RAW[detect];
289
+ let root = node.root();
290
+ let cache = root.rawCache || (root.rawCache = {});
291
+ if (typeof cache[detect] !== "undefined") return cache[detect];
292
+ if (detect === "before" || detect === "after") return this.beforeAfter(node, detect);
293
+ else {
294
+ let method = "raw" + capitalize(detect);
295
+ if (this[method]) value = this[method](root, node);
296
+ else root.walk((i) => {
297
+ value = i.raws[own];
298
+ if (typeof value !== "undefined") return false;
299
+ });
300
+ }
301
+ if (typeof value === "undefined") value = DEFAULT_RAW[detect];
302
+ cache[detect] = value;
303
+ return value;
304
+ }
305
+ rawBeforeClose(root) {
306
+ let value;
307
+ root.walk((i) => {
308
+ if (i.nodes && i.nodes.length > 0) {
309
+ if (typeof i.raws.after !== "undefined") {
310
+ value = i.raws.after;
311
+ if (value.includes("\n")) value = value.replace(/[^\n]+$/, "");
312
+ return false;
313
+ }
314
+ }
315
+ });
316
+ if (value) value = value.replace(/\S/g, "");
317
+ return value;
318
+ }
319
+ rawBeforeComment(root, node) {
320
+ let value;
321
+ root.walkComments((i) => {
322
+ if (typeof i.raws.before !== "undefined") {
323
+ value = i.raws.before;
324
+ if (value.includes("\n")) value = value.replace(/[^\n]+$/, "");
325
+ return false;
326
+ }
327
+ });
328
+ if (typeof value === "undefined") value = this.raw(node, null, "beforeDecl");
329
+ else if (value) value = value.replace(/\S/g, "");
330
+ return value;
331
+ }
332
+ rawBeforeDecl(root, node) {
333
+ let value;
334
+ root.walkDecls((i) => {
335
+ if (typeof i.raws.before !== "undefined") {
336
+ value = i.raws.before;
337
+ if (value.includes("\n")) value = value.replace(/[^\n]+$/, "");
338
+ return false;
339
+ }
340
+ });
341
+ if (typeof value === "undefined") value = this.raw(node, null, "beforeRule");
342
+ else if (value) value = value.replace(/\S/g, "");
343
+ return value;
344
+ }
345
+ rawBeforeOpen(root) {
346
+ let value;
347
+ root.walk((i) => {
348
+ if (i.type !== "decl") {
349
+ value = i.raws.between;
350
+ if (typeof value !== "undefined") return false;
351
+ }
352
+ });
353
+ return value;
354
+ }
355
+ rawBeforeRule(root) {
356
+ let value;
357
+ root.walk((i) => {
358
+ if (i.nodes && (i.parent !== root || root.first !== i)) {
359
+ if (typeof i.raws.before !== "undefined") {
360
+ value = i.raws.before;
361
+ if (value.includes("\n")) value = value.replace(/[^\n]+$/, "");
362
+ return false;
363
+ }
364
+ }
365
+ });
366
+ if (value) value = value.replace(/\S/g, "");
367
+ return value;
368
+ }
369
+ rawColon(root) {
370
+ let value;
371
+ root.walkDecls((i) => {
372
+ if (typeof i.raws.between !== "undefined") {
373
+ value = i.raws.between.replace(/[^\s:]/g, "");
374
+ return false;
375
+ }
376
+ });
377
+ return value;
378
+ }
379
+ rawEmptyBody(root) {
380
+ let value;
381
+ root.walk((i) => {
382
+ if (i.nodes && i.nodes.length === 0) {
383
+ value = i.raws.after;
384
+ if (typeof value !== "undefined") return false;
385
+ }
386
+ });
387
+ return value;
388
+ }
389
+ rawIndent(root) {
390
+ if (root.raws.indent) return root.raws.indent;
391
+ let value;
392
+ root.walk((i) => {
393
+ let p = i.parent;
394
+ if (p && p !== root && p.parent && p.parent === root) {
395
+ if (typeof i.raws.before !== "undefined") {
396
+ let parts = i.raws.before.split("\n");
397
+ value = parts[parts.length - 1];
398
+ value = value.replace(/\S/g, "");
399
+ return false;
400
+ }
401
+ }
402
+ });
403
+ return value;
404
+ }
405
+ rawSemicolon(root) {
406
+ let value;
407
+ root.walk((i) => {
408
+ if (i.nodes && i.nodes.length && i.last.type === "decl") {
409
+ value = i.raws.semicolon;
410
+ if (typeof value !== "undefined") return false;
411
+ }
412
+ });
413
+ return value;
414
+ }
415
+ rawValue(node, prop) {
416
+ let value = node[prop];
417
+ let raw = node.raws[prop];
418
+ if (raw && raw.value === value) return raw.raw;
419
+ return value;
420
+ }
421
+ root(node) {
422
+ this.body(node);
423
+ if (node.raws.after) {
424
+ let after = node.raws.after;
425
+ let isDocument = node.parent && node.parent.type === "document";
426
+ this.builder(isDocument ? after : escapeHTMLInCSS(after));
427
+ }
428
+ }
429
+ rule(node) {
430
+ this.block(node, this.rawValue(node, "selector"));
431
+ if (node.raws.ownSemicolon) this.builder(escapeHTMLInCSS(node.raws.ownSemicolon), node, "end");
432
+ }
433
+ stringify(node, semicolon) {
434
+ /* c8 ignore start */
435
+ if (!this[node.type]) throw new Error("Unknown AST node type " + node.type + ". Maybe you need to change PostCSS stringifier.");
436
+ /* c8 ignore stop */
437
+ this[node.type](node, semicolon);
438
+ }
439
+ };
440
+ module.exports = Stringifier;
441
+ Stringifier.default = Stringifier;
442
+ }));
443
+ //#endregion
444
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/stringify.js
445
+ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
446
+ var Stringifier = require_stringifier();
447
+ function stringify(node, builder) {
448
+ new Stringifier(builder).stringify(node);
449
+ }
450
+ module.exports = stringify;
451
+ stringify.default = stringify;
452
+ }));
453
+ //#endregion
454
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/symbols.js
455
+ var require_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
456
+ module.exports.isClean = Symbol("isClean");
457
+ module.exports.my = Symbol("my");
458
+ }));
459
+ //#endregion
460
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/node.js
461
+ var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
462
+ var CssSyntaxError = require_css_syntax_error();
463
+ var Stringifier = require_stringifier();
464
+ var stringify = require_stringify();
465
+ var { isClean, my } = require_symbols();
466
+ function cloneNode(obj, parent) {
467
+ let cloned = new obj.constructor();
468
+ let stack = [[
469
+ obj,
470
+ cloned,
471
+ parent
472
+ ]];
473
+ while (stack.length > 0) {
474
+ let [source, target, targetParent] = stack.pop();
475
+ for (let i in source) {
476
+ if (!Object.prototype.hasOwnProperty.call(source, i))
477
+ /* c8 ignore next 2 */
478
+ continue;
479
+ if (i === "proxyCache") continue;
480
+ let value = source[i];
481
+ let type = typeof value;
482
+ if (i === "parent" && type === "object") {
483
+ if (targetParent) target[i] = targetParent;
484
+ } else if (i === "source") target[i] = value;
485
+ else if (Array.isArray(value)) {
486
+ let children = [];
487
+ target[i] = children;
488
+ for (let j of value) {
489
+ let childClone = new j.constructor();
490
+ children.push(childClone);
491
+ stack.push([
492
+ j,
493
+ childClone,
494
+ target
495
+ ]);
496
+ }
497
+ } else {
498
+ if (type === "object" && value !== null) {
499
+ let valueClone = new value.constructor();
500
+ stack.push([
501
+ value,
502
+ valueClone,
503
+ void 0
504
+ ]);
505
+ value = valueClone;
506
+ }
507
+ target[i] = value;
508
+ }
509
+ }
510
+ }
511
+ return cloned;
512
+ }
513
+ function sourceOffset(inputCSS, position) {
514
+ if (position && typeof position.offset !== "undefined") return position.offset;
515
+ let column = 1;
516
+ let line = 1;
517
+ let offset = 0;
518
+ for (let i = 0; i < inputCSS.length; i++) {
519
+ if (line === position.line && column === position.column) {
520
+ offset = i;
521
+ break;
522
+ }
523
+ if (inputCSS[i] === "\n") {
524
+ column = 1;
525
+ line += 1;
526
+ } else column += 1;
527
+ }
528
+ return offset;
529
+ }
530
+ var Node = class Node {
531
+ get proxyOf() {
532
+ return this;
533
+ }
534
+ constructor(defaults = {}) {
535
+ this.raws = {};
536
+ this[isClean] = false;
537
+ this[my] = true;
538
+ for (let name of Object.keys(defaults)) {
539
+ if (name === "__proto__") continue;
540
+ if (name === "nodes") {
541
+ this.nodes = [];
542
+ for (let node of defaults[name]) if (typeof node.clone === "function" && node.parent) this.append(node.clone());
543
+ else this.append(node);
544
+ } else this[name] = defaults[name];
545
+ }
546
+ }
547
+ addToError(error) {
548
+ error.postcssNode = this;
549
+ if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) {
550
+ let s = this.source;
551
+ error.stack = error.stack.replace(/\n\s{4}at /, `$&${s.input.from}:${s.start.line}:${s.start.column}$&`);
552
+ }
553
+ return error;
554
+ }
555
+ after(add) {
556
+ this.parent.insertAfter(this, add);
557
+ return this;
558
+ }
559
+ assign(overrides = {}) {
560
+ for (let name in overrides) this[name] = overrides[name];
561
+ return this;
562
+ }
563
+ before(add) {
564
+ this.parent.insertBefore(this, add);
565
+ return this;
566
+ }
567
+ cleanRaws(keepBetween) {
568
+ delete this.raws.before;
569
+ delete this.raws.after;
570
+ if (!keepBetween) delete this.raws.between;
571
+ }
572
+ clone(overrides = {}) {
573
+ let cloned = cloneNode(this);
574
+ for (let name in overrides) cloned[name] = overrides[name];
575
+ return cloned;
576
+ }
577
+ cloneAfter(overrides = {}) {
578
+ let cloned = this.clone(overrides);
579
+ this.parent.insertAfter(this, cloned);
580
+ return cloned;
581
+ }
582
+ cloneBefore(overrides = {}) {
583
+ let cloned = this.clone(overrides);
584
+ this.parent.insertBefore(this, cloned);
585
+ return cloned;
586
+ }
587
+ error(message, opts = {}) {
588
+ if (this.source) {
589
+ let { end, start } = this.rangeBy(opts);
590
+ return this.source.input.error(message, {
591
+ column: start.column,
592
+ line: start.line
593
+ }, {
594
+ column: end.column,
595
+ line: end.line
596
+ }, opts);
597
+ }
598
+ return new CssSyntaxError(message);
599
+ }
600
+ getProxyProcessor() {
601
+ return {
602
+ get(node, prop) {
603
+ if (prop === "proxyOf") return node;
604
+ else if (prop === "root") return () => node.root().toProxy();
605
+ else return node[prop];
606
+ },
607
+ set(node, prop, value) {
608
+ if (node[prop] === value) return true;
609
+ node[prop] = value;
610
+ if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || prop === "text") node.markDirty();
611
+ return true;
612
+ }
613
+ };
614
+ }
615
+ /* c8 ignore next 3 */
616
+ markClean() {
617
+ this[isClean] = true;
618
+ }
619
+ markDirty() {
620
+ if (this[isClean]) {
621
+ this[isClean] = false;
622
+ let next = this;
623
+ while (next = next.parent) next[isClean] = false;
624
+ }
625
+ }
626
+ next() {
627
+ if (!this.parent) return void 0;
628
+ let index = this.parent.index(this);
629
+ return this.parent.nodes[index + 1];
630
+ }
631
+ positionBy(opts = {}) {
632
+ let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
633
+ let pos = {
634
+ column: this.source.start.column,
635
+ line: this.source.start.line,
636
+ offset: sourceOffset(inputString, this.source.start)
637
+ };
638
+ if (opts.index) pos = this.positionInside(opts.index);
639
+ else if (opts.word) {
640
+ let index = inputString.slice(sourceOffset(inputString, this.source.start), sourceOffset(inputString, this.source.end)).indexOf(opts.word);
641
+ if (index !== -1) pos = this.positionInside(index);
642
+ }
643
+ return pos;
644
+ }
645
+ positionInside(index) {
646
+ let column = this.source.start.column;
647
+ let line = this.source.start.line;
648
+ let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
649
+ let offset = sourceOffset(inputString, this.source.start);
650
+ let end = offset + index;
651
+ for (let i = offset; i < end; i++) if (inputString[i] === "\n") {
652
+ column = 1;
653
+ line += 1;
654
+ } else column += 1;
655
+ return {
656
+ column,
657
+ line,
658
+ offset: end
659
+ };
660
+ }
661
+ prev() {
662
+ if (!this.parent) return void 0;
663
+ let index = this.parent.index(this);
664
+ return this.parent.nodes[index - 1];
665
+ }
666
+ rangeBy(opts = {}) {
667
+ let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
668
+ let start = {
669
+ column: this.source.start.column,
670
+ line: this.source.start.line,
671
+ offset: sourceOffset(inputString, this.source.start)
672
+ };
673
+ let end = this.source.end ? {
674
+ column: this.source.end.column + 1,
675
+ line: this.source.end.line,
676
+ offset: typeof this.source.end.offset === "number" ? this.source.end.offset : sourceOffset(inputString, this.source.end) + 1
677
+ } : {
678
+ column: start.column + 1,
679
+ line: start.line,
680
+ offset: start.offset + 1
681
+ };
682
+ if (opts.word) {
683
+ let index = inputString.slice(sourceOffset(inputString, this.source.start), sourceOffset(inputString, this.source.end)).indexOf(opts.word);
684
+ if (index !== -1) {
685
+ start = this.positionInside(index);
686
+ end = this.positionInside(index + opts.word.length);
687
+ }
688
+ } else {
689
+ if (opts.start) start = {
690
+ column: opts.start.column,
691
+ line: opts.start.line,
692
+ offset: sourceOffset(inputString, opts.start)
693
+ };
694
+ else if (typeof opts.index === "number") start = this.positionInside(opts.index);
695
+ if (opts.end) end = {
696
+ column: opts.end.column,
697
+ line: opts.end.line,
698
+ offset: sourceOffset(inputString, opts.end)
699
+ };
700
+ else if (typeof opts.endIndex === "number") end = this.positionInside(opts.endIndex);
701
+ else if (typeof opts.index === "number") end = this.positionInside(opts.index + 1);
702
+ }
703
+ if (end.line < start.line || end.line === start.line && end.column <= start.column) end = {
704
+ column: start.column + 1,
705
+ line: start.line,
706
+ offset: start.offset + 1
707
+ };
708
+ return {
709
+ end,
710
+ start
711
+ };
712
+ }
713
+ raw(prop, defaultType) {
714
+ return new Stringifier().raw(this, prop, defaultType);
715
+ }
716
+ remove() {
717
+ if (this.parent) this.parent.removeChild(this);
718
+ this.parent = void 0;
719
+ return this;
720
+ }
721
+ replaceWith(...nodes) {
722
+ if (this.parent) {
723
+ let bookmark = this;
724
+ let foundSelf = false;
725
+ for (let node of nodes) if (node === this) foundSelf = true;
726
+ else if (foundSelf) {
727
+ this.parent.insertAfter(bookmark, node);
728
+ bookmark = node;
729
+ } else this.parent.insertBefore(bookmark, node);
730
+ if (!foundSelf) this.remove();
731
+ }
732
+ return this;
733
+ }
734
+ root() {
735
+ let result = this;
736
+ while (result.parent && result.parent.type !== "document") result = result.parent;
737
+ return result;
738
+ }
739
+ toJSON(_, inputs) {
740
+ let emitInputs = inputs == null;
741
+ inputs = inputs || /* @__PURE__ */ new Map();
742
+ let holderOfRoot = [];
743
+ let queue = [[
744
+ this,
745
+ holderOfRoot,
746
+ 0
747
+ ]];
748
+ for (let step = 0; step < queue.length; step++) {
749
+ let [node, holder, key] = queue[step];
750
+ let fixed = {};
751
+ holder[key] = fixed;
752
+ for (let name in node) {
753
+ if (!Object.prototype.hasOwnProperty.call(node, name))
754
+ /* c8 ignore next 2 */
755
+ continue;
756
+ if (name === "parent" || name === "proxyCache") continue;
757
+ let value = node[name];
758
+ if (Array.isArray(value)) {
759
+ let fixedArray = [];
760
+ fixed[name] = fixedArray;
761
+ for (let i = 0; i < value.length; i++) {
762
+ let item = value[i];
763
+ if (typeof item === "object" && item.toJSON) if (item.toJSON === Node.prototype.toJSON) queue.push([
764
+ item,
765
+ fixedArray,
766
+ i
767
+ ]);
768
+ else fixedArray[i] = item.toJSON(null, inputs);
769
+ else fixedArray[i] = item;
770
+ }
771
+ } else if (typeof value === "object" && value.toJSON) if (value.toJSON === Node.prototype.toJSON) queue.push([
772
+ value,
773
+ fixed,
774
+ name
775
+ ]);
776
+ else fixed[name] = value.toJSON(null, inputs);
777
+ else if (name === "source") {
778
+ if (value == null) continue;
779
+ let inputId = inputs.get(value.input);
780
+ if (inputId == null) {
781
+ inputId = inputs.size;
782
+ inputs.set(value.input, inputId);
783
+ }
784
+ fixed[name] = {
785
+ end: value.end,
786
+ inputId,
787
+ start: value.start
788
+ };
789
+ } else fixed[name] = value;
790
+ }
791
+ }
792
+ let fixed = holderOfRoot[0];
793
+ if (emitInputs) fixed.inputs = [...inputs.keys()].map((input) => input.toJSON());
794
+ return fixed;
795
+ }
796
+ toProxy() {
797
+ if (!this.proxyCache) this.proxyCache = new Proxy(this, this.getProxyProcessor());
798
+ return this.proxyCache;
799
+ }
800
+ toString(stringifier = stringify) {
801
+ if (stringifier.stringify) stringifier = stringifier.stringify;
802
+ let result = "";
803
+ stringifier(this, (i) => {
804
+ result += i;
805
+ });
806
+ return result;
807
+ }
808
+ warn(result, text, opts = {}) {
809
+ let data = { node: this };
810
+ for (let i in opts) data[i] = opts[i];
811
+ return result.warn(text, data);
812
+ }
813
+ };
814
+ module.exports = Node;
815
+ Node.default = Node;
816
+ }));
817
+ //#endregion
818
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/comment.js
819
+ var require_comment = /* @__PURE__ */ __commonJSMin(((exports, module) => {
820
+ var Node = require_node();
821
+ var Comment = class extends Node {
822
+ constructor(defaults) {
823
+ super(defaults);
824
+ this.type = "comment";
825
+ }
826
+ };
827
+ module.exports = Comment;
828
+ Comment.default = Comment;
829
+ }));
830
+ //#endregion
831
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/declaration.js
832
+ var require_declaration = /* @__PURE__ */ __commonJSMin(((exports, module) => {
833
+ var Node = require_node();
834
+ var Declaration = class extends Node {
835
+ get variable() {
836
+ return this.prop.startsWith("--") || this.prop[0] === "$";
837
+ }
838
+ constructor(defaults) {
839
+ if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") defaults = {
840
+ ...defaults,
841
+ value: String(defaults.value)
842
+ };
843
+ super(defaults);
844
+ this.type = "decl";
845
+ }
846
+ };
847
+ module.exports = Declaration;
848
+ Declaration.default = Declaration;
849
+ }));
850
+ //#endregion
851
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/container.js
852
+ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
853
+ var Comment = require_comment();
854
+ var Declaration = require_declaration();
855
+ var Node = require_node();
856
+ var { isClean, my } = require_symbols();
857
+ var AtRule;
858
+ var parse;
859
+ var Root;
860
+ var Rule;
861
+ function cleanSource(nodes) {
862
+ let stack = nodes.slice();
863
+ while (stack.length > 0) {
864
+ let node = stack.pop();
865
+ delete node.source;
866
+ if (node.nodes) {
867
+ node.nodes = node.nodes.slice();
868
+ for (let i of node.nodes) stack.push(i);
869
+ }
870
+ }
871
+ return nodes.slice();
872
+ }
873
+ function markTreeDirty(node) {
874
+ let stack = [node];
875
+ while (stack.length > 0) {
876
+ let next = stack.pop();
877
+ next[isClean] = false;
878
+ if (next.proxyOf.nodes) for (let i of next.proxyOf.nodes) stack.push(i);
879
+ }
880
+ }
881
+ var Container = class Container extends Node {
882
+ get first() {
883
+ if (!this.proxyOf.nodes) return void 0;
884
+ return this.proxyOf.nodes[0];
885
+ }
886
+ get last() {
887
+ if (!this.proxyOf.nodes) return void 0;
888
+ return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
889
+ }
890
+ append(...children) {
891
+ for (let child of children) {
892
+ let nodes = this.normalize(child, this.last);
893
+ for (let node of nodes) this.proxyOf.nodes.push(node);
894
+ }
895
+ this.markDirty();
896
+ return this;
897
+ }
898
+ cleanRaws(keepBetween) {
899
+ let stack = [this];
900
+ while (stack.length > 0) {
901
+ let node = stack.pop();
902
+ if (node !== this && node.cleanRaws !== Container.prototype.cleanRaws) {
903
+ node.cleanRaws(keepBetween);
904
+ continue;
905
+ }
906
+ Node.prototype.cleanRaws.call(node, keepBetween);
907
+ if (node.nodes) for (let child of node.nodes) stack.push(child);
908
+ }
909
+ }
910
+ each(callback) {
911
+ if (!this.proxyOf.nodes) return void 0;
912
+ let iterator = this.getIterator();
913
+ let index, result;
914
+ while (this.indexes[iterator] < this.proxyOf.nodes.length) {
915
+ index = this.indexes[iterator];
916
+ result = callback(this.proxyOf.nodes[index], index);
917
+ if (result === false) break;
918
+ this.indexes[iterator] += 1;
919
+ }
920
+ delete this.indexes[iterator];
921
+ return result;
922
+ }
923
+ every(condition) {
924
+ return this.nodes.every(condition);
925
+ }
926
+ getIterator() {
927
+ if (!this.lastEach) this.lastEach = 0;
928
+ if (!this.indexes) this.indexes = {};
929
+ this.lastEach += 1;
930
+ let iterator = this.lastEach;
931
+ this.indexes[iterator] = 0;
932
+ return iterator;
933
+ }
934
+ getProxyProcessor() {
935
+ return {
936
+ get(node, prop) {
937
+ if (prop === "proxyOf") return node;
938
+ else if (!node[prop]) return node[prop];
939
+ else if (prop === "each" || typeof prop === "string" && prop.startsWith("walk")) return (...args) => {
940
+ return node[prop](...args.map((i) => {
941
+ if (typeof i === "function") return (child, index) => i(child.toProxy(), index);
942
+ else return i;
943
+ }));
944
+ };
945
+ else if (prop === "every" || prop === "some") return (cb) => {
946
+ return node[prop]((child, ...other) => cb(child.toProxy(), ...other));
947
+ };
948
+ else if (prop === "root") return () => node.root().toProxy();
949
+ else if (prop === "nodes") return node.nodes.map((i) => i.toProxy());
950
+ else if (prop === "first" || prop === "last") return node[prop].toProxy();
951
+ else return node[prop];
952
+ },
953
+ set(node, prop, value) {
954
+ if (node[prop] === value) return true;
955
+ node[prop] = value;
956
+ if (prop === "name" || prop === "params" || prop === "selector") node.markDirty();
957
+ return true;
958
+ }
959
+ };
960
+ }
961
+ index(child) {
962
+ if (typeof child === "number") return child;
963
+ if (child.proxyOf) child = child.proxyOf;
964
+ return this.proxyOf.nodes.indexOf(child);
965
+ }
966
+ insertAfter(exist, add) {
967
+ let existIndex = this.index(exist);
968
+ let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
969
+ existIndex = this.index(exist);
970
+ for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node);
971
+ let index;
972
+ for (let id in this.indexes) {
973
+ index = this.indexes[id];
974
+ if (existIndex < index) this.indexes[id] = index + nodes.length;
975
+ }
976
+ this.markDirty();
977
+ return this;
978
+ }
979
+ insertBefore(exist, add) {
980
+ let existIndex = this.index(exist);
981
+ let type = existIndex === 0 ? "prepend" : false;
982
+ let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse();
983
+ existIndex = this.index(exist);
984
+ for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node);
985
+ let index;
986
+ for (let id in this.indexes) {
987
+ index = this.indexes[id];
988
+ if (existIndex <= index) this.indexes[id] = index + nodes.length;
989
+ }
990
+ this.markDirty();
991
+ return this;
992
+ }
993
+ normalize(nodes, sample) {
994
+ if (typeof nodes === "string") nodes = cleanSource(parse(nodes).nodes);
995
+ else if (typeof nodes === "undefined") nodes = [];
996
+ else if (Array.isArray(nodes)) {
997
+ nodes = nodes.slice(0);
998
+ for (let i of nodes) if (i.parent) i.parent.removeChild(i, "ignore");
999
+ } else if (nodes.type === "root" && this.type !== "document") {
1000
+ nodes = nodes.nodes.slice(0);
1001
+ for (let i of nodes) if (i.parent) i.parent.removeChild(i, "ignore");
1002
+ } else if (nodes.type) nodes = [nodes];
1003
+ else if (nodes.prop) {
1004
+ if (typeof nodes.value === "undefined") throw new Error("Value field is missed in node creation");
1005
+ else if (typeof nodes.value !== "string") nodes.value = String(nodes.value);
1006
+ nodes = [new Declaration(nodes)];
1007
+ } else if (nodes.selector || nodes.selectors) nodes = [new Rule(nodes)];
1008
+ else if (nodes.name) nodes = [new AtRule(nodes)];
1009
+ else if (nodes.text) nodes = [new Comment(nodes)];
1010
+ else throw new Error("Unknown node type in node creation");
1011
+ return nodes.map((i) => {
1012
+ /* c8 ignore next */
1013
+ if (!i[my]) Container.rebuild(i);
1014
+ i = i.proxyOf;
1015
+ if (i.parent) i.parent.removeChild(i);
1016
+ if (i[isClean]) markTreeDirty(i);
1017
+ if (!i.raws) i.raws = {};
1018
+ if (typeof i.raws.before === "undefined") {
1019
+ if (sample && typeof sample.raws.before !== "undefined") i.raws.before = sample.raws.before.replace(/\S/g, "");
1020
+ }
1021
+ i.parent = this.proxyOf;
1022
+ return i;
1023
+ });
1024
+ }
1025
+ prepend(...children) {
1026
+ children = children.reverse();
1027
+ for (let child of children) {
1028
+ let nodes = this.normalize(child, this.first, "prepend").reverse();
1029
+ for (let node of nodes) this.proxyOf.nodes.unshift(node);
1030
+ for (let id in this.indexes) this.indexes[id] = this.indexes[id] + nodes.length;
1031
+ }
1032
+ this.markDirty();
1033
+ return this;
1034
+ }
1035
+ push(child) {
1036
+ child.parent = this;
1037
+ this.proxyOf.nodes.push(child);
1038
+ return this;
1039
+ }
1040
+ removeAll() {
1041
+ for (let node of this.proxyOf.nodes) node.parent = void 0;
1042
+ this.proxyOf.nodes = [];
1043
+ this.markDirty();
1044
+ return this;
1045
+ }
1046
+ removeChild(child) {
1047
+ child = this.index(child);
1048
+ this.proxyOf.nodes[child].parent = void 0;
1049
+ this.proxyOf.nodes.splice(child, 1);
1050
+ let index;
1051
+ for (let id in this.indexes) {
1052
+ index = this.indexes[id];
1053
+ if (index >= child) this.indexes[id] = index - 1;
1054
+ }
1055
+ this.markDirty();
1056
+ return this;
1057
+ }
1058
+ replaceValues(pattern, opts, callback) {
1059
+ if (!callback) {
1060
+ callback = opts;
1061
+ opts = {};
1062
+ }
1063
+ this.walkDecls((decl) => {
1064
+ if (opts.props && !opts.props.includes(decl.prop)) return;
1065
+ if (opts.fast && !decl.value.includes(opts.fast)) return;
1066
+ decl.value = decl.value.replace(pattern, callback);
1067
+ });
1068
+ this.markDirty();
1069
+ return this;
1070
+ }
1071
+ some(condition) {
1072
+ return this.nodes.some(condition);
1073
+ }
1074
+ walk(callback) {
1075
+ if (!this.proxyOf.nodes) return void 0;
1076
+ let stack = [{
1077
+ iterator: this.getIterator(),
1078
+ node: this.proxyOf
1079
+ }];
1080
+ while (stack.length > 0) {
1081
+ let { iterator, node } = stack[stack.length - 1];
1082
+ let index = node.indexes[iterator];
1083
+ if (index >= node.proxyOf.nodes.length) {
1084
+ delete node.indexes[iterator];
1085
+ stack.pop();
1086
+ let parent = stack[stack.length - 1];
1087
+ if (parent) parent.node.indexes[parent.iterator] += 1;
1088
+ continue;
1089
+ }
1090
+ let child = node.proxyOf.nodes[index];
1091
+ let result;
1092
+ try {
1093
+ result = callback(child, index);
1094
+ } catch (e) {
1095
+ throw child.addToError(e);
1096
+ }
1097
+ if (result === false) {
1098
+ for (let opened of stack) delete opened.node.indexes[opened.iterator];
1099
+ return false;
1100
+ }
1101
+ if (child.walk && child.proxyOf.nodes) stack.push({
1102
+ iterator: child.getIterator(),
1103
+ node: child
1104
+ });
1105
+ else node.indexes[iterator] += 1;
1106
+ }
1107
+ }
1108
+ walkAtRules(name, callback) {
1109
+ if (!callback) {
1110
+ callback = name;
1111
+ return this.walk((child, i) => {
1112
+ if (child.type === "atrule") return callback(child, i);
1113
+ });
1114
+ }
1115
+ if (name instanceof RegExp) return this.walk((child, i) => {
1116
+ if (child.type === "atrule" && name.test(child.name)) return callback(child, i);
1117
+ });
1118
+ return this.walk((child, i) => {
1119
+ if (child.type === "atrule" && child.name === name) return callback(child, i);
1120
+ });
1121
+ }
1122
+ walkComments(callback) {
1123
+ return this.walk((child, i) => {
1124
+ if (child.type === "comment") return callback(child, i);
1125
+ });
1126
+ }
1127
+ walkDecls(prop, callback) {
1128
+ if (!callback) {
1129
+ callback = prop;
1130
+ return this.walk((child, i) => {
1131
+ if (child.type === "decl") return callback(child, i);
1132
+ });
1133
+ }
1134
+ if (prop instanceof RegExp) return this.walk((child, i) => {
1135
+ if (child.type === "decl" && prop.test(child.prop)) return callback(child, i);
1136
+ });
1137
+ return this.walk((child, i) => {
1138
+ if (child.type === "decl" && child.prop === prop) return callback(child, i);
1139
+ });
1140
+ }
1141
+ walkRules(selector, callback) {
1142
+ if (!callback) {
1143
+ callback = selector;
1144
+ return this.walk((child, i) => {
1145
+ if (child.type === "rule") return callback(child, i);
1146
+ });
1147
+ }
1148
+ if (selector instanceof RegExp) return this.walk((child, i) => {
1149
+ if (child.type === "rule" && selector.test(child.selector)) return callback(child, i);
1150
+ });
1151
+ return this.walk((child, i) => {
1152
+ if (child.type === "rule" && child.selector === selector) return callback(child, i);
1153
+ });
1154
+ }
1155
+ };
1156
+ Container.registerParse = (dependant) => {
1157
+ parse = dependant;
1158
+ };
1159
+ Container.registerRule = (dependant) => {
1160
+ Rule = dependant;
1161
+ };
1162
+ Container.registerAtRule = (dependant) => {
1163
+ AtRule = dependant;
1164
+ };
1165
+ Container.registerRoot = (dependant) => {
1166
+ Root = dependant;
1167
+ };
1168
+ module.exports = Container;
1169
+ Container.default = Container;
1170
+ /* c8 ignore start */
1171
+ Container.rebuild = (node) => {
1172
+ let stack = [node];
1173
+ while (stack.length > 0) {
1174
+ let next = stack.pop();
1175
+ if (next.type === "atrule") Object.setPrototypeOf(next, AtRule.prototype);
1176
+ else if (next.type === "rule") Object.setPrototypeOf(next, Rule.prototype);
1177
+ else if (next.type === "decl") Object.setPrototypeOf(next, Declaration.prototype);
1178
+ else if (next.type === "comment") Object.setPrototypeOf(next, Comment.prototype);
1179
+ else if (next.type === "root") Object.setPrototypeOf(next, Root.prototype);
1180
+ next[my] = true;
1181
+ if (next.nodes) for (let child of next.nodes) stack.push(child);
1182
+ }
1183
+ };
1184
+ }));
1185
+ /* c8 ignore stop */
1186
+ //#endregion
1187
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/at-rule.js
1188
+ var require_at_rule = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1189
+ var Container = require_container();
1190
+ var AtRule = class extends Container {
1191
+ constructor(defaults) {
1192
+ super(defaults);
1193
+ this.type = "atrule";
1194
+ }
1195
+ append(...children) {
1196
+ if (!this.proxyOf.nodes) this.nodes = [];
1197
+ return super.append(...children);
1198
+ }
1199
+ prepend(...children) {
1200
+ if (!this.proxyOf.nodes) this.nodes = [];
1201
+ return super.prepend(...children);
1202
+ }
1203
+ };
1204
+ module.exports = AtRule;
1205
+ AtRule.default = AtRule;
1206
+ Container.registerAtRule(AtRule);
1207
+ }));
1208
+ //#endregion
1209
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/document.js
1210
+ var require_document = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1211
+ var Container = require_container();
1212
+ var LazyResult;
1213
+ var Processor;
1214
+ var Document = class extends Container {
1215
+ constructor(defaults) {
1216
+ super({
1217
+ type: "document",
1218
+ ...defaults
1219
+ });
1220
+ if (!this.nodes) this.nodes = [];
1221
+ }
1222
+ toResult(opts = {}) {
1223
+ return new LazyResult(new Processor(), this, opts).stringify();
1224
+ }
1225
+ };
1226
+ Document.registerLazyResult = (dependant) => {
1227
+ LazyResult = dependant;
1228
+ };
1229
+ Document.registerProcessor = (dependant) => {
1230
+ Processor = dependant;
1231
+ };
1232
+ module.exports = Document;
1233
+ Document.default = Document;
1234
+ }));
1235
+ //#endregion
1236
+ //#region ../../node_modules/.bun/nanoid@3.3.16/node_modules/nanoid/non-secure/index.cjs
1237
+ var require_non_secure = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1238
+ var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
1239
+ var customAlphabet = (alphabet, defaultSize = 21) => {
1240
+ return (size = defaultSize) => {
1241
+ let id = "";
1242
+ let i = size | 0;
1243
+ while (i-- > 0) id += alphabet[Math.random() * alphabet.length | 0];
1244
+ return id;
1245
+ };
1246
+ };
1247
+ var nanoid = (size = 21) => {
1248
+ let id = "";
1249
+ let i = size | 0;
1250
+ while (i-- > 0) id += urlAlphabet[Math.random() * 64 | 0];
1251
+ return id;
1252
+ };
1253
+ module.exports = {
1254
+ nanoid,
1255
+ customAlphabet
1256
+ };
1257
+ }));
1258
+ //#endregion
1259
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/previous-map.js
1260
+ var require_previous_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1261
+ var { existsSync, readFileSync } = require___vite_browser_external();
1262
+ var { dirname, isAbsolute, join, relative, sep } = require___vite_browser_external();
1263
+ var { SourceMapConsumer, SourceMapGenerator } = require___vite_browser_external();
1264
+ function fromBase64(str) {
1265
+ if (Buffer) return Buffer.from(str, "base64").toString();
1266
+ else
1267
+ /* c8 ignore next 2 */
1268
+ return window.atob(str);
1269
+ }
1270
+ var PreviousMap = class {
1271
+ constructor(css, opts) {
1272
+ if (opts.map === false) return;
1273
+ if (opts.unsafeMap) this.unsafeMap = true;
1274
+ this.loadAnnotation(css);
1275
+ this.inline = this.startWith(this.annotation, "data:");
1276
+ let prev = opts.map ? opts.map.prev : void 0;
1277
+ let text = this.loadMap(opts.from, prev);
1278
+ if (!this.mapFile && opts.from) this.mapFile = opts.from;
1279
+ if (this.mapFile) this.root = dirname(this.mapFile);
1280
+ if (text) this.text = text;
1281
+ }
1282
+ consumer() {
1283
+ if (!this.consumerCache) this.consumerCache = new SourceMapConsumer(this.json || this.text);
1284
+ return this.consumerCache;
1285
+ }
1286
+ decodeInline(text) {
1287
+ let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/;
1288
+ let baseUri = /^data:application\/json;base64,/;
1289
+ let uriMatch = text.match(/^data:application\/json;charset=utf-?8,/) || text.match(/^data:application\/json,/);
1290
+ if (uriMatch) return decodeURIComponent(text.substr(uriMatch[0].length));
1291
+ let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri);
1292
+ if (baseUriMatch) return fromBase64(text.substr(baseUriMatch[0].length));
1293
+ let encoding = text.slice(22);
1294
+ encoding = encoding.slice(0, encoding.indexOf(","));
1295
+ throw new Error("Unsupported source map encoding " + encoding);
1296
+ }
1297
+ getAnnotationURL(sourceMapString) {
1298
+ return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim();
1299
+ }
1300
+ isMap(map) {
1301
+ if (typeof map !== "object") return false;
1302
+ return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections);
1303
+ }
1304
+ loadAnnotation(css) {
1305
+ let comments = css.match(/\/\*\s*# sourceMappingURL=/g);
1306
+ if (!comments) return;
1307
+ let start = css.lastIndexOf(comments.pop());
1308
+ let end = css.indexOf("*/", start);
1309
+ if (start > -1 && end > -1) this.annotation = this.getAnnotationURL(css.substring(start, end));
1310
+ }
1311
+ loadFile(path, cssFile, trusted) {
1312
+ if (!trusted && !this.unsafeMap) {
1313
+ if (!/\.map$/i.test(path)) return;
1314
+ if (cssFile) {
1315
+ let relativePath = relative(dirname(cssFile), path);
1316
+ if (relativePath === ".." || relativePath.startsWith(".." + sep) || isAbsolute(relativePath)) return;
1317
+ }
1318
+ }
1319
+ this.root = dirname(path);
1320
+ if (existsSync(path)) {
1321
+ this.mapFile = path;
1322
+ return readFileSync(path, "utf-8").toString().trim();
1323
+ }
1324
+ }
1325
+ loadMap(file, prev) {
1326
+ if (prev === false) return false;
1327
+ if (prev) if (typeof prev === "string") return prev;
1328
+ else if (typeof prev === "function") {
1329
+ let prevPath = prev(file);
1330
+ if (prevPath) {
1331
+ let map = this.loadFile(prevPath, file, true);
1332
+ if (!map) throw new Error("Unable to load previous source map: " + prevPath.toString());
1333
+ return map;
1334
+ }
1335
+ } else if (prev instanceof SourceMapConsumer) return SourceMapGenerator.fromSourceMap(prev).toString();
1336
+ else if (prev instanceof SourceMapGenerator) return prev.toString();
1337
+ else if (this.isMap(prev)) return JSON.stringify(prev);
1338
+ else throw new Error("Unsupported previous source map format: " + prev.toString());
1339
+ else if (this.inline) return this.decodeInline(this.annotation);
1340
+ else if (this.annotation) {
1341
+ let map = this.annotation;
1342
+ if (file) map = join(dirname(file), map);
1343
+ let unknown = this.loadFile(map, file, false);
1344
+ if (unknown) try {
1345
+ /* c8 ignore next 4 */
1346
+ this.json = JSON.parse(unknown.replace(/^\)]}'[^\n]*\n/, ""));
1347
+ } catch {
1348
+ return;
1349
+ }
1350
+ return unknown;
1351
+ }
1352
+ }
1353
+ startWith(string, start) {
1354
+ if (!string) return false;
1355
+ return string.substr(0, start.length) === start;
1356
+ }
1357
+ withContent() {
1358
+ return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
1359
+ }
1360
+ };
1361
+ module.exports = PreviousMap;
1362
+ PreviousMap.default = PreviousMap;
1363
+ }));
1364
+ //#endregion
1365
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/input.js
1366
+ var require_input = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1367
+ var { nanoid } = require_non_secure();
1368
+ var { isAbsolute, resolve } = require___vite_browser_external();
1369
+ var { SourceMapConsumer, SourceMapGenerator } = require___vite_browser_external();
1370
+ var { fileURLToPath, pathToFileURL } = require___vite_browser_external();
1371
+ var CssSyntaxError = require_css_syntax_error();
1372
+ var PreviousMap = require_previous_map();
1373
+ var terminalHighlight = require___vite_browser_external();
1374
+ var lineToIndexCache = Symbol("lineToIndexCache");
1375
+ var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
1376
+ var pathAvailable = Boolean(resolve && isAbsolute);
1377
+ function getLineToIndex(input) {
1378
+ if (input[lineToIndexCache]) return input[lineToIndexCache];
1379
+ let lines = input.css.split("\n");
1380
+ let lineToIndex = new Array(lines.length);
1381
+ let prevIndex = 0;
1382
+ for (let i = 0, l = lines.length; i < l; i++) {
1383
+ lineToIndex[i] = prevIndex;
1384
+ prevIndex += lines[i].length + 1;
1385
+ }
1386
+ input[lineToIndexCache] = lineToIndex;
1387
+ return lineToIndex;
1388
+ }
1389
+ var Input = class {
1390
+ get from() {
1391
+ return this.file || this.id;
1392
+ }
1393
+ constructor(css, opts = {}) {
1394
+ if (css === null || typeof css === "undefined" || typeof css === "object" && !css.toString) throw new Error(`PostCSS received ${css} instead of CSS string`);
1395
+ this.css = css.toString();
1396
+ if (this.css[0] === "" || this.css[0] === "￾") {
1397
+ this.hasBOM = true;
1398
+ this.css = this.css.slice(1);
1399
+ } else this.hasBOM = false;
1400
+ this.document = this.css;
1401
+ if (opts.document) this.document = opts.document.toString();
1402
+ if (opts.from) if (!pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute(opts.from)) this.file = opts.from;
1403
+ else this.file = resolve(opts.from);
1404
+ if (pathAvailable && sourceMapAvailable) {
1405
+ let map = new PreviousMap(this.css, opts);
1406
+ if (map.text) {
1407
+ this.map = map;
1408
+ let file = map.consumer().file;
1409
+ if (!this.file && file) this.file = this.mapResolve(file);
1410
+ }
1411
+ }
1412
+ if (!this.file) this.id = "<input css " + nanoid(6) + ">";
1413
+ if (this.map) this.map.file = this.from;
1414
+ }
1415
+ error(message, line, column, opts = {}) {
1416
+ let endColumn, endLine, endOffset, offset, result;
1417
+ if (line && typeof line === "object") {
1418
+ let start = line;
1419
+ let end = column;
1420
+ if (typeof start.offset === "number") {
1421
+ offset = start.offset;
1422
+ let pos = this.fromOffset(offset);
1423
+ line = pos.line;
1424
+ column = pos.col;
1425
+ } else {
1426
+ line = start.line;
1427
+ column = start.column;
1428
+ offset = this.fromLineAndColumn(line, column);
1429
+ }
1430
+ if (typeof end.offset === "number") {
1431
+ endOffset = end.offset;
1432
+ let pos = this.fromOffset(endOffset);
1433
+ endLine = pos.line;
1434
+ endColumn = pos.col;
1435
+ } else {
1436
+ endLine = end.line;
1437
+ endColumn = end.column;
1438
+ endOffset = this.fromLineAndColumn(end.line, end.column);
1439
+ }
1440
+ } else if (!column) {
1441
+ offset = line;
1442
+ let pos = this.fromOffset(offset);
1443
+ line = pos.line;
1444
+ column = pos.col;
1445
+ } else offset = this.fromLineAndColumn(line, column);
1446
+ let origin = this.origin(line, column, endLine, endColumn);
1447
+ if (origin) result = new CssSyntaxError(message, origin.endLine === void 0 ? origin.line : {
1448
+ column: origin.column,
1449
+ line: origin.line
1450
+ }, origin.endLine === void 0 ? origin.column : {
1451
+ column: origin.endColumn,
1452
+ line: origin.endLine
1453
+ }, origin.source, origin.file, opts.plugin);
1454
+ else result = new CssSyntaxError(message, endLine === void 0 ? line : {
1455
+ column,
1456
+ line
1457
+ }, endLine === void 0 ? column : {
1458
+ column: endColumn,
1459
+ line: endLine
1460
+ }, this.css, this.file, opts.plugin);
1461
+ result.input = {
1462
+ column,
1463
+ endColumn,
1464
+ endLine,
1465
+ endOffset,
1466
+ line,
1467
+ offset,
1468
+ source: this.css
1469
+ };
1470
+ if (this.file) {
1471
+ if (pathToFileURL) result.input.url = pathToFileURL(this.file).toString();
1472
+ result.input.file = this.file;
1473
+ }
1474
+ return result;
1475
+ }
1476
+ fromLineAndColumn(line, column) {
1477
+ return getLineToIndex(this)[line - 1] + column - 1;
1478
+ }
1479
+ fromOffset(offset) {
1480
+ let lineToIndex = getLineToIndex(this);
1481
+ let lastLine = lineToIndex[lineToIndex.length - 1];
1482
+ let min = 0;
1483
+ if (offset >= lastLine) min = lineToIndex.length - 1;
1484
+ else {
1485
+ let max = lineToIndex.length - 2;
1486
+ let mid;
1487
+ while (min < max) {
1488
+ mid = min + (max - min >> 1);
1489
+ if (offset < lineToIndex[mid]) max = mid - 1;
1490
+ else if (offset >= lineToIndex[mid + 1]) min = mid + 1;
1491
+ else {
1492
+ min = mid;
1493
+ break;
1494
+ }
1495
+ }
1496
+ }
1497
+ return {
1498
+ col: offset - lineToIndex[min] + 1,
1499
+ line: min + 1
1500
+ };
1501
+ }
1502
+ mapResolve(file) {
1503
+ if (/^\w+:\/\//.test(file)) return file;
1504
+ return resolve(this.map.consumer().sourceRoot || this.map.root || ".", file);
1505
+ }
1506
+ origin(line, column, endLine, endColumn) {
1507
+ if (!this.map) return false;
1508
+ let consumer = this.map.consumer();
1509
+ let from = consumer.originalPositionFor({
1510
+ column: column - 1,
1511
+ line
1512
+ });
1513
+ if (!from.source) return false;
1514
+ let to;
1515
+ if (typeof endLine === "number") {
1516
+ let toPosition = consumer.originalPositionFor({
1517
+ column: endColumn - 1,
1518
+ line: endLine
1519
+ });
1520
+ if (toPosition.source) to = toPosition;
1521
+ }
1522
+ let fromUrl;
1523
+ if (isAbsolute(from.source)) fromUrl = pathToFileURL(from.source);
1524
+ else fromUrl = new URL(from.source, this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile));
1525
+ let result = {
1526
+ column: from.column + 1,
1527
+ endColumn: to && to.column + 1,
1528
+ endLine: to && to.line,
1529
+ line: from.line,
1530
+ url: fromUrl.toString()
1531
+ };
1532
+ if (fromUrl.protocol === "file:") if (fileURLToPath) result.file = fileURLToPath(fromUrl);
1533
+ else
1534
+ /* c8 ignore next 2 */
1535
+ throw new Error(`file: protocol is not available in this PostCSS build`);
1536
+ let source = consumer.sourceContentFor(from.source);
1537
+ if (source) result.source = source;
1538
+ return result;
1539
+ }
1540
+ toJSON() {
1541
+ let json = {};
1542
+ for (let name of [
1543
+ "hasBOM",
1544
+ "css",
1545
+ "file",
1546
+ "id"
1547
+ ]) if (this[name] != null) json[name] = this[name];
1548
+ if (this.map) {
1549
+ json.map = { ...this.map };
1550
+ if (json.map.consumerCache) json.map.consumerCache = void 0;
1551
+ }
1552
+ return json;
1553
+ }
1554
+ };
1555
+ module.exports = Input;
1556
+ Input.default = Input;
1557
+ if (terminalHighlight && terminalHighlight.registerInput) terminalHighlight.registerInput(Input);
1558
+ }));
1559
+ //#endregion
1560
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/root.js
1561
+ var require_root = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1562
+ var Container = require_container();
1563
+ var LazyResult;
1564
+ var Processor;
1565
+ var Root = class extends Container {
1566
+ constructor(defaults) {
1567
+ super(defaults);
1568
+ this.type = "root";
1569
+ if (!this.nodes) this.nodes = [];
1570
+ }
1571
+ normalize(child, sample, type) {
1572
+ let keepBefore = /* @__PURE__ */ new Set();
1573
+ for (let node of Array.isArray(child) ? child : [child]) if (node && typeof node === "object" && !node.parent && node.raws && typeof node.raws.before !== "undefined") keepBefore.add(node.raws);
1574
+ let nodes = super.normalize(child);
1575
+ if (sample) {
1576
+ if (type === "prepend") if (this.nodes.length > 1) sample.raws.before = this.nodes[1].raws.before;
1577
+ else delete sample.raws.before;
1578
+ else if (this.first !== sample) {
1579
+ for (let node of nodes) if (!keepBefore.has(node.raws)) node.raws.before = sample.raws.before;
1580
+ }
1581
+ }
1582
+ return nodes;
1583
+ }
1584
+ removeChild(child, ignore) {
1585
+ let index = this.index(child);
1586
+ if (!ignore && index === 0 && this.nodes.length > 1) this.nodes[1].raws.before = this.nodes[index].raws.before;
1587
+ return super.removeChild(child);
1588
+ }
1589
+ toResult(opts = {}) {
1590
+ return new LazyResult(new Processor(), this, opts).stringify();
1591
+ }
1592
+ };
1593
+ Root.registerLazyResult = (dependant) => {
1594
+ LazyResult = dependant;
1595
+ };
1596
+ Root.registerProcessor = (dependant) => {
1597
+ Processor = dependant;
1598
+ };
1599
+ module.exports = Root;
1600
+ Root.default = Root;
1601
+ Container.registerRoot(Root);
1602
+ }));
1603
+ //#endregion
1604
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/list.js
1605
+ var require_list = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1606
+ var list = {
1607
+ comma(string) {
1608
+ return list.split(string, [","], true);
1609
+ },
1610
+ space(string) {
1611
+ return list.split(string, [
1612
+ " ",
1613
+ "\n",
1614
+ " "
1615
+ ]);
1616
+ },
1617
+ split(string, separators, last) {
1618
+ let array = [];
1619
+ let current = "";
1620
+ let split = false;
1621
+ let func = 0;
1622
+ let inQuote = false;
1623
+ let prevQuote = "";
1624
+ let escape = false;
1625
+ for (let letter of string) {
1626
+ if (escape) escape = false;
1627
+ else if (letter === "\\") escape = true;
1628
+ else if (inQuote) {
1629
+ if (letter === prevQuote) inQuote = false;
1630
+ } else if (letter === "\"" || letter === "'") {
1631
+ inQuote = true;
1632
+ prevQuote = letter;
1633
+ } else if (letter === "(") func += 1;
1634
+ else if (letter === ")") {
1635
+ if (func > 0) func -= 1;
1636
+ } else if (func === 0) {
1637
+ if (separators.includes(letter)) split = true;
1638
+ }
1639
+ if (split) {
1640
+ if (current !== "") array.push(current.trim());
1641
+ current = "";
1642
+ split = false;
1643
+ } else current += letter;
1644
+ }
1645
+ if (last || current !== "") array.push(current.trim());
1646
+ return array;
1647
+ }
1648
+ };
1649
+ module.exports = list;
1650
+ list.default = list;
1651
+ }));
1652
+ //#endregion
1653
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/rule.js
1654
+ var require_rule = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1655
+ var Container = require_container();
1656
+ var list = require_list();
1657
+ var Rule = class extends Container {
1658
+ get selectors() {
1659
+ return list.comma(this.selector);
1660
+ }
1661
+ set selectors(values) {
1662
+ let match = this.selector ? this.selector.match(/,\s*/) : null;
1663
+ let sep = match ? match[0] : "," + this.raw("between", "beforeOpen");
1664
+ this.selector = values.join(sep);
1665
+ }
1666
+ constructor(defaults) {
1667
+ super(defaults);
1668
+ this.type = "rule";
1669
+ if (!this.nodes) this.nodes = [];
1670
+ }
1671
+ };
1672
+ module.exports = Rule;
1673
+ Rule.default = Rule;
1674
+ Container.registerRule(Rule);
1675
+ }));
1676
+ //#endregion
1677
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/fromJSON.js
1678
+ var require_fromJSON = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1679
+ var AtRule = require_at_rule();
1680
+ var Comment = require_comment();
1681
+ var Declaration = require_declaration();
1682
+ var Input = require_input();
1683
+ var PreviousMap = require_previous_map();
1684
+ var Root = require_root();
1685
+ var Rule = require_rule();
1686
+ function hydrateInputs(json, inputs) {
1687
+ if (!json.inputs) return inputs;
1688
+ return json.inputs.map((input) => {
1689
+ let inputHydrated = {
1690
+ ...input,
1691
+ __proto__: Input.prototype
1692
+ };
1693
+ if (inputHydrated.map) inputHydrated.map = {
1694
+ ...inputHydrated.map,
1695
+ __proto__: PreviousMap.prototype
1696
+ };
1697
+ return inputHydrated;
1698
+ });
1699
+ }
1700
+ function constructNode(json, inputs, children) {
1701
+ let defaults = { ...json };
1702
+ delete defaults.inputs;
1703
+ delete defaults.nodes;
1704
+ if (defaults.source) {
1705
+ let { inputId, ...source } = defaults.source;
1706
+ defaults.source = source;
1707
+ if (inputId != null) defaults.source.input = inputs[inputId];
1708
+ }
1709
+ let node;
1710
+ if (defaults.type === "root") node = new Root(defaults);
1711
+ else if (defaults.type === "decl") node = new Declaration(defaults);
1712
+ else if (defaults.type === "rule") node = new Rule(defaults);
1713
+ else if (defaults.type === "comment") node = new Comment(defaults);
1714
+ else if (defaults.type === "atrule") node = new AtRule(defaults);
1715
+ else throw new Error("Unknown node type: " + json.type);
1716
+ if (children) {
1717
+ node.nodes = children;
1718
+ for (let child of children) child.parent = node;
1719
+ }
1720
+ return node;
1721
+ }
1722
+ function fromJSON(json, inputs) {
1723
+ if (Array.isArray(json)) return json.map((n) => fromJSON(n));
1724
+ let result;
1725
+ let stack = [{
1726
+ childIndex: 0,
1727
+ children: [],
1728
+ inputs: hydrateInputs(json, inputs),
1729
+ json
1730
+ }];
1731
+ while (stack.length > 0) {
1732
+ let frame = stack[stack.length - 1];
1733
+ let jsonNodes = frame.json.nodes;
1734
+ if (jsonNodes && frame.childIndex < jsonNodes.length) {
1735
+ let childJson = jsonNodes[frame.childIndex];
1736
+ frame.childIndex += 1;
1737
+ stack.push({
1738
+ childIndex: 0,
1739
+ children: [],
1740
+ inputs: hydrateInputs(childJson, frame.inputs),
1741
+ json: childJson
1742
+ });
1743
+ continue;
1744
+ }
1745
+ stack.pop();
1746
+ let node = constructNode(frame.json, frame.inputs, jsonNodes ? frame.children : void 0);
1747
+ if (stack.length > 0) stack[stack.length - 1].children.push(node);
1748
+ else result = node;
1749
+ }
1750
+ return result;
1751
+ }
1752
+ module.exports = fromJSON;
1753
+ fromJSON.default = fromJSON;
1754
+ }));
1755
+ //#endregion
1756
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/map-generator.js
1757
+ var require_map_generator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1758
+ var { dirname, relative, resolve, sep } = require___vite_browser_external();
1759
+ var { SourceMapConsumer, SourceMapGenerator } = require___vite_browser_external();
1760
+ var { pathToFileURL } = require___vite_browser_external();
1761
+ var Input = require_input();
1762
+ var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
1763
+ var pathAvailable = Boolean(dirname && resolve && relative && sep);
1764
+ var MapGenerator = class {
1765
+ constructor(stringify, root, opts, cssString) {
1766
+ this.stringify = stringify;
1767
+ this.mapOpts = opts.map || {};
1768
+ this.root = root;
1769
+ this.opts = opts;
1770
+ this.css = cssString;
1771
+ this.originalCSS = cssString;
1772
+ this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute;
1773
+ this.memoizedFileURLs = /* @__PURE__ */ new Map();
1774
+ this.memoizedPaths = /* @__PURE__ */ new Map();
1775
+ this.memoizedURLs = /* @__PURE__ */ new Map();
1776
+ }
1777
+ addAnnotation() {
1778
+ let content;
1779
+ if (this.isInline()) content = "data:application/json;base64," + this.toBase64(this.map.toString());
1780
+ else if (typeof this.mapOpts.annotation === "string") content = this.mapOpts.annotation;
1781
+ else if (typeof this.mapOpts.annotation === "function") content = this.mapOpts.annotation(this.opts.to, this.root);
1782
+ else content = this.outputFile() + ".map";
1783
+ let eol = "\n";
1784
+ if (this.css.includes("\r\n")) eol = "\r\n";
1785
+ this.css += eol + "/*# sourceMappingURL=" + content + " */";
1786
+ }
1787
+ applyPrevMaps() {
1788
+ for (let prev of this.previous()) {
1789
+ let from = this.toUrl(this.path(prev.file));
1790
+ let root = prev.root || dirname(prev.file);
1791
+ let map;
1792
+ if (this.mapOpts.sourcesContent === false) {
1793
+ map = new SourceMapConsumer(prev.text);
1794
+ if (map.sourcesContent) map.sourcesContent = null;
1795
+ } else map = prev.consumer();
1796
+ this.map.applySourceMap(map, from, this.toUrl(this.path(root)));
1797
+ }
1798
+ }
1799
+ clearAnnotation() {
1800
+ if (this.mapOpts.annotation === false) return;
1801
+ if (this.root) {
1802
+ let node;
1803
+ for (let i = this.root.nodes.length - 1; i >= 0; i--) {
1804
+ node = this.root.nodes[i];
1805
+ if (node.type !== "comment") continue;
1806
+ if (node.text.startsWith("# sourceMappingURL=")) this.root.removeChild(i);
1807
+ }
1808
+ } else if (this.css) {
1809
+ let startIndex;
1810
+ while ((startIndex = this.css.lastIndexOf("/*#")) !== -1) {
1811
+ let endIndex = this.css.indexOf("*/", startIndex + 3);
1812
+ if (endIndex === -1) break;
1813
+ while (startIndex > 0 && this.css[startIndex - 1] === "\n") startIndex--;
1814
+ this.css = this.css.slice(0, startIndex) + this.css.slice(endIndex + 2);
1815
+ }
1816
+ }
1817
+ }
1818
+ generate() {
1819
+ this.clearAnnotation();
1820
+ if (pathAvailable && sourceMapAvailable && this.isMap()) return this.generateMap();
1821
+ else {
1822
+ let result = "";
1823
+ this.stringify(this.root, (i) => {
1824
+ result += i;
1825
+ });
1826
+ return [result];
1827
+ }
1828
+ }
1829
+ generateMap() {
1830
+ if (this.root) this.generateString();
1831
+ else if (this.previous().length === 1) {
1832
+ let prev = this.previous()[0].consumer();
1833
+ prev.file = this.outputFile();
1834
+ this.map = SourceMapGenerator.fromSourceMap(prev, { ignoreInvalidMapping: true });
1835
+ } else {
1836
+ this.map = new SourceMapGenerator({
1837
+ file: this.outputFile(),
1838
+ ignoreInvalidMapping: true
1839
+ });
1840
+ this.map.addMapping({
1841
+ generated: {
1842
+ column: 0,
1843
+ line: 1
1844
+ },
1845
+ original: {
1846
+ column: 0,
1847
+ line: 1
1848
+ },
1849
+ source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
1850
+ });
1851
+ }
1852
+ if (this.isSourcesContent()) this.setSourcesContent();
1853
+ if (this.root && this.previous().length > 0) this.applyPrevMaps();
1854
+ if (this.isAnnotation()) this.addAnnotation();
1855
+ if (this.isInline()) return [this.css];
1856
+ else return [this.css, this.map];
1857
+ }
1858
+ generateString() {
1859
+ this.css = "";
1860
+ this.map = new SourceMapGenerator({
1861
+ file: this.outputFile(),
1862
+ ignoreInvalidMapping: true
1863
+ });
1864
+ let line = 1;
1865
+ let column = 1;
1866
+ let noSource = "<no source>";
1867
+ let mapping = {
1868
+ generated: {
1869
+ column: 0,
1870
+ line: 0
1871
+ },
1872
+ original: {
1873
+ column: 0,
1874
+ line: 0
1875
+ },
1876
+ source: ""
1877
+ };
1878
+ let last, lines;
1879
+ this.stringify(this.root, (str, node, type) => {
1880
+ this.css += str;
1881
+ if (node && type !== "end") {
1882
+ mapping.generated.line = line;
1883
+ mapping.generated.column = column - 1;
1884
+ if (node.source && node.source.start) {
1885
+ mapping.source = this.sourcePath(node);
1886
+ mapping.original.line = node.source.start.line;
1887
+ mapping.original.column = node.source.start.column - 1;
1888
+ this.map.addMapping(mapping);
1889
+ } else {
1890
+ mapping.source = noSource;
1891
+ mapping.original.line = 1;
1892
+ mapping.original.column = 0;
1893
+ this.map.addMapping(mapping);
1894
+ }
1895
+ }
1896
+ lines = str.match(/\n/g);
1897
+ if (lines) {
1898
+ line += lines.length;
1899
+ last = str.lastIndexOf("\n");
1900
+ column = str.length - last;
1901
+ } else column += str.length;
1902
+ if (node && type !== "start") {
1903
+ let p = node.parent || { raws: {} };
1904
+ if (!(node.type === "decl" || node.type === "atrule" && !node.nodes) || node !== p.last || p.raws.semicolon) if (node.source && node.source.end) {
1905
+ mapping.source = this.sourcePath(node);
1906
+ mapping.original.line = node.source.end.line;
1907
+ mapping.original.column = node.source.end.column - 1;
1908
+ mapping.generated.line = line;
1909
+ mapping.generated.column = column - 2;
1910
+ this.map.addMapping(mapping);
1911
+ } else {
1912
+ mapping.source = noSource;
1913
+ mapping.original.line = 1;
1914
+ mapping.original.column = 0;
1915
+ mapping.generated.line = line;
1916
+ mapping.generated.column = column - 1;
1917
+ this.map.addMapping(mapping);
1918
+ }
1919
+ }
1920
+ });
1921
+ }
1922
+ isAnnotation() {
1923
+ if (this.isInline()) return true;
1924
+ if (typeof this.mapOpts.annotation !== "undefined") return this.mapOpts.annotation;
1925
+ if (this.previous().length) return this.previous().some((i) => i.annotation);
1926
+ return true;
1927
+ }
1928
+ isInline() {
1929
+ if (typeof this.mapOpts.inline !== "undefined") return this.mapOpts.inline;
1930
+ let annotation = this.mapOpts.annotation;
1931
+ if (typeof annotation !== "undefined" && annotation !== true) return false;
1932
+ if (this.previous().length) return this.previous().some((i) => i.inline);
1933
+ return true;
1934
+ }
1935
+ isMap() {
1936
+ if (typeof this.opts.map !== "undefined") return !!this.opts.map;
1937
+ return this.previous().length > 0;
1938
+ }
1939
+ isSourcesContent() {
1940
+ if (typeof this.mapOpts.sourcesContent !== "undefined") return this.mapOpts.sourcesContent;
1941
+ if (this.previous().length) return this.previous().some((i) => i.withContent());
1942
+ return true;
1943
+ }
1944
+ outputFile() {
1945
+ if (this.opts.to) return this.path(this.opts.to);
1946
+ else if (this.opts.from) return this.path(this.opts.from);
1947
+ else return "to.css";
1948
+ }
1949
+ path(file) {
1950
+ if (this.mapOpts.absolute) return file;
1951
+ if (file.charCodeAt(0) === 60) return file;
1952
+ if (/^\w+:\/\//.test(file)) return file;
1953
+ let cached = this.memoizedPaths.get(file);
1954
+ if (cached) return cached;
1955
+ let from = this.opts.to ? dirname(this.opts.to) : ".";
1956
+ if (typeof this.mapOpts.annotation === "string") from = dirname(resolve(from, this.mapOpts.annotation));
1957
+ let path = relative(from, file);
1958
+ this.memoizedPaths.set(file, path);
1959
+ return path;
1960
+ }
1961
+ previous() {
1962
+ if (!this.previousMaps) {
1963
+ this.previousMaps = [];
1964
+ if (this.root) this.root.walk((node) => {
1965
+ if (node.source && node.source.input.map) {
1966
+ let map = node.source.input.map;
1967
+ if (!this.previousMaps.includes(map)) this.previousMaps.push(map);
1968
+ }
1969
+ });
1970
+ else {
1971
+ let input = new Input(this.originalCSS, this.opts);
1972
+ if (input.map) this.previousMaps.push(input.map);
1973
+ }
1974
+ }
1975
+ return this.previousMaps;
1976
+ }
1977
+ setSourcesContent() {
1978
+ let already = {};
1979
+ if (this.root) this.root.walk((node) => {
1980
+ if (node.source) {
1981
+ let from = node.source.input.from;
1982
+ if (from && !already[from]) {
1983
+ already[from] = true;
1984
+ let fromUrl = this.usesFileUrls ? this.toFileUrl(from) : this.toUrl(this.path(from));
1985
+ this.map.setSourceContent(fromUrl, node.source.input.css);
1986
+ }
1987
+ }
1988
+ });
1989
+ else if (this.css) {
1990
+ let from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>";
1991
+ this.map.setSourceContent(from, this.css);
1992
+ }
1993
+ }
1994
+ sourcePath(node) {
1995
+ if (this.mapOpts.from) return this.toUrl(this.mapOpts.from);
1996
+ else if (this.usesFileUrls) return this.toFileUrl(node.source.input.from);
1997
+ else return this.toUrl(this.path(node.source.input.from));
1998
+ }
1999
+ toBase64(str) {
2000
+ if (Buffer) return Buffer.from(str).toString("base64");
2001
+ else return window.btoa(unescape(encodeURIComponent(str)));
2002
+ }
2003
+ toFileUrl(path) {
2004
+ let cached = this.memoizedFileURLs.get(path);
2005
+ if (cached) return cached;
2006
+ if (pathToFileURL) {
2007
+ let fileURL = pathToFileURL(path).toString();
2008
+ this.memoizedFileURLs.set(path, fileURL);
2009
+ return fileURL;
2010
+ } else throw new Error("`map.absolute` option is not available in this PostCSS build");
2011
+ }
2012
+ toUrl(path) {
2013
+ let cached = this.memoizedURLs.get(path);
2014
+ if (cached) return cached;
2015
+ if (sep === "\\") path = path.replace(/\\/g, "/");
2016
+ let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent);
2017
+ this.memoizedURLs.set(path, url);
2018
+ return url;
2019
+ }
2020
+ };
2021
+ module.exports = MapGenerator;
2022
+ }));
2023
+ //#endregion
2024
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/tokenize.js
2025
+ var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2026
+ var SINGLE_QUOTE = "'".charCodeAt(0);
2027
+ var DOUBLE_QUOTE = "\"".charCodeAt(0);
2028
+ var BACKSLASH = "\\".charCodeAt(0);
2029
+ var SLASH = "/".charCodeAt(0);
2030
+ var NEWLINE = "\n".charCodeAt(0);
2031
+ var SPACE = " ".charCodeAt(0);
2032
+ var FEED = "\f".charCodeAt(0);
2033
+ var TAB = " ".charCodeAt(0);
2034
+ var CR = "\r".charCodeAt(0);
2035
+ var OPEN_SQUARE = "[".charCodeAt(0);
2036
+ var CLOSE_SQUARE = "]".charCodeAt(0);
2037
+ var OPEN_PARENTHESES = "(".charCodeAt(0);
2038
+ var CLOSE_PARENTHESES = ")".charCodeAt(0);
2039
+ var OPEN_CURLY = "{".charCodeAt(0);
2040
+ var CLOSE_CURLY = "}".charCodeAt(0);
2041
+ var SEMICOLON = ";".charCodeAt(0);
2042
+ var ASTERISK = "*".charCodeAt(0);
2043
+ var COLON = ":".charCodeAt(0);
2044
+ var AT = "@".charCodeAt(0);
2045
+ var RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g;
2046
+ var RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g;
2047
+ var RE_BAD_BRACKET = /.[\r\n"'(/\\]/;
2048
+ var RE_HEX_ESCAPE = /[\da-f]/i;
2049
+ module.exports = function tokenizer(input, options = {}) {
2050
+ let css = input.css.valueOf();
2051
+ let ignore = options.ignoreErrors;
2052
+ let code, content, escape, next, quote;
2053
+ let currentToken, escaped, escapePos, n, prev;
2054
+ let length = css.length;
2055
+ let pos = 0;
2056
+ let buffer = [];
2057
+ let returned = [];
2058
+ let lastBadParen = -1;
2059
+ function position() {
2060
+ return pos;
2061
+ }
2062
+ function unclosed(what) {
2063
+ throw input.error("Unclosed " + what, pos);
2064
+ }
2065
+ function endOfFile() {
2066
+ return returned.length === 0 && pos >= length;
2067
+ }
2068
+ function nextToken(opts) {
2069
+ if (returned.length) return returned.pop();
2070
+ if (pos >= length) return;
2071
+ let ignoreUnclosed = opts ? opts.ignoreUnclosed : false;
2072
+ code = css.charCodeAt(pos);
2073
+ switch (code) {
2074
+ case NEWLINE:
2075
+ case SPACE:
2076
+ case TAB:
2077
+ case CR:
2078
+ case FEED:
2079
+ next = pos;
2080
+ do {
2081
+ next += 1;
2082
+ code = css.charCodeAt(next);
2083
+ } while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED);
2084
+ currentToken = ["space", css.slice(pos, next)];
2085
+ pos = next - 1;
2086
+ break;
2087
+ case OPEN_SQUARE:
2088
+ case CLOSE_SQUARE:
2089
+ case OPEN_CURLY:
2090
+ case CLOSE_CURLY:
2091
+ case COLON:
2092
+ case SEMICOLON:
2093
+ case CLOSE_PARENTHESES: {
2094
+ let controlChar = String.fromCharCode(code);
2095
+ currentToken = [
2096
+ controlChar,
2097
+ controlChar,
2098
+ pos
2099
+ ];
2100
+ break;
2101
+ }
2102
+ case OPEN_PARENTHESES:
2103
+ prev = buffer.length ? buffer.pop()[1] : "";
2104
+ n = css.charCodeAt(pos + 1);
2105
+ if (prev === "url" && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE && n !== SPACE && n !== NEWLINE && n !== TAB && n !== FEED && n !== CR) {
2106
+ next = pos;
2107
+ do {
2108
+ escaped = false;
2109
+ next = css.indexOf(")", next + 1);
2110
+ if (next === -1) if (ignore || ignoreUnclosed) {
2111
+ next = pos;
2112
+ break;
2113
+ } else unclosed("bracket");
2114
+ escapePos = next;
2115
+ while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
2116
+ escapePos -= 1;
2117
+ escaped = !escaped;
2118
+ }
2119
+ } while (escaped);
2120
+ currentToken = [
2121
+ "brackets",
2122
+ css.slice(pos, next + 1),
2123
+ pos,
2124
+ next
2125
+ ];
2126
+ pos = next;
2127
+ } else if (pos <= lastBadParen) currentToken = [
2128
+ "(",
2129
+ "(",
2130
+ pos
2131
+ ];
2132
+ else {
2133
+ next = css.indexOf(")", pos + 1);
2134
+ content = css.slice(pos, next + 1);
2135
+ if (next === -1 || RE_BAD_BRACKET.test(content)) {
2136
+ lastBadParen = next === -1 ? length : next;
2137
+ currentToken = [
2138
+ "(",
2139
+ "(",
2140
+ pos
2141
+ ];
2142
+ } else {
2143
+ currentToken = [
2144
+ "brackets",
2145
+ content,
2146
+ pos,
2147
+ next
2148
+ ];
2149
+ pos = next;
2150
+ }
2151
+ }
2152
+ break;
2153
+ case SINGLE_QUOTE:
2154
+ case DOUBLE_QUOTE:
2155
+ quote = code === SINGLE_QUOTE ? "'" : "\"";
2156
+ next = pos;
2157
+ do {
2158
+ escaped = false;
2159
+ next = css.indexOf(quote, next + 1);
2160
+ if (next === -1) if (ignore || ignoreUnclosed) {
2161
+ next = pos + 1;
2162
+ break;
2163
+ } else unclosed("string");
2164
+ escapePos = next;
2165
+ while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
2166
+ escapePos -= 1;
2167
+ escaped = !escaped;
2168
+ }
2169
+ } while (escaped);
2170
+ currentToken = [
2171
+ "string",
2172
+ css.slice(pos, next + 1),
2173
+ pos,
2174
+ next
2175
+ ];
2176
+ pos = next;
2177
+ break;
2178
+ case AT:
2179
+ RE_AT_END.lastIndex = pos + 1;
2180
+ RE_AT_END.test(css);
2181
+ if (RE_AT_END.lastIndex === 0) next = css.length - 1;
2182
+ else next = RE_AT_END.lastIndex - 2;
2183
+ currentToken = [
2184
+ "at-word",
2185
+ css.slice(pos, next + 1),
2186
+ pos,
2187
+ next
2188
+ ];
2189
+ pos = next;
2190
+ break;
2191
+ case BACKSLASH:
2192
+ next = pos;
2193
+ escape = true;
2194
+ while (css.charCodeAt(next + 1) === BACKSLASH) {
2195
+ next += 1;
2196
+ escape = !escape;
2197
+ }
2198
+ code = css.charCodeAt(next + 1);
2199
+ if (escape && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) {
2200
+ next += 1;
2201
+ if (RE_HEX_ESCAPE.test(css.charAt(next))) {
2202
+ while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) next += 1;
2203
+ if (css.charCodeAt(next + 1) === SPACE) next += 1;
2204
+ }
2205
+ }
2206
+ currentToken = [
2207
+ "word",
2208
+ css.slice(pos, next + 1),
2209
+ pos,
2210
+ next
2211
+ ];
2212
+ pos = next;
2213
+ break;
2214
+ default:
2215
+ if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {
2216
+ next = css.indexOf("*/", pos + 2) + 1;
2217
+ if (next === 0) if (ignore || ignoreUnclosed) next = css.length;
2218
+ else unclosed("comment");
2219
+ currentToken = [
2220
+ "comment",
2221
+ css.slice(pos, next + 1),
2222
+ pos,
2223
+ next
2224
+ ];
2225
+ pos = next;
2226
+ } else {
2227
+ RE_WORD_END.lastIndex = pos + 1;
2228
+ RE_WORD_END.test(css);
2229
+ if (RE_WORD_END.lastIndex === 0) next = css.length - 1;
2230
+ else next = RE_WORD_END.lastIndex - 2;
2231
+ currentToken = [
2232
+ "word",
2233
+ css.slice(pos, next + 1),
2234
+ pos,
2235
+ next
2236
+ ];
2237
+ buffer.push(currentToken);
2238
+ pos = next;
2239
+ }
2240
+ break;
2241
+ }
2242
+ pos++;
2243
+ return currentToken;
2244
+ }
2245
+ function back(token) {
2246
+ returned.push(token);
2247
+ }
2248
+ return {
2249
+ back,
2250
+ endOfFile,
2251
+ nextToken,
2252
+ position
2253
+ };
2254
+ };
2255
+ }));
2256
+ //#endregion
2257
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/parser.js
2258
+ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2259
+ var AtRule = require_at_rule();
2260
+ var Comment = require_comment();
2261
+ var Declaration = require_declaration();
2262
+ var Root = require_root();
2263
+ var Rule = require_rule();
2264
+ var tokenizer = require_tokenize();
2265
+ var SAFE_COMMENT_NEIGHBOR = {
2266
+ empty: true,
2267
+ space: true
2268
+ };
2269
+ function findLastWithPosition(tokens) {
2270
+ for (let i = tokens.length - 1; i >= 0; i--) {
2271
+ let token = tokens[i];
2272
+ let pos = token[3] || token[2];
2273
+ if (pos) return pos;
2274
+ }
2275
+ }
2276
+ function tokensToString(tokens, from, to) {
2277
+ let result = "";
2278
+ for (let i = from; i < to; i++) result += tokens[i][1];
2279
+ return result;
2280
+ }
2281
+ var Parser = class {
2282
+ constructor(input) {
2283
+ this.input = input;
2284
+ this.root = new Root();
2285
+ this.current = this.root;
2286
+ this.spaces = "";
2287
+ this.semicolon = false;
2288
+ this.createTokenizer();
2289
+ this.root.source = {
2290
+ input,
2291
+ start: {
2292
+ column: 1,
2293
+ line: 1,
2294
+ offset: 0
2295
+ }
2296
+ };
2297
+ }
2298
+ atrule(token) {
2299
+ let node = new AtRule();
2300
+ node.name = token[1].slice(1);
2301
+ if (node.name === "") this.unnamedAtrule(node, token);
2302
+ this.init(node, token[2]);
2303
+ let type;
2304
+ let prev;
2305
+ let shift;
2306
+ let last = false;
2307
+ let open = false;
2308
+ let params = [];
2309
+ let brackets = [];
2310
+ while (!this.tokenizer.endOfFile()) {
2311
+ token = this.tokenizer.nextToken();
2312
+ type = token[0];
2313
+ if (type === "(" || type === "[") brackets.push(type === "(" ? ")" : "]");
2314
+ else if (type === "{" && brackets.length > 0) brackets.push("}");
2315
+ else if (type === brackets[brackets.length - 1]) brackets.pop();
2316
+ if (brackets.length === 0) if (type === ";") {
2317
+ node.source.end = this.getPosition(token[2]);
2318
+ node.source.end.offset++;
2319
+ this.semicolon = true;
2320
+ break;
2321
+ } else if (type === "{") {
2322
+ open = true;
2323
+ break;
2324
+ } else if (type === "}") {
2325
+ if (params.length > 0) {
2326
+ shift = params.length - 1;
2327
+ prev = params[shift];
2328
+ while (prev && prev[0] === "space") prev = params[--shift];
2329
+ if (prev) {
2330
+ node.source.end = this.getPosition(prev[3] || prev[2]);
2331
+ node.source.end.offset++;
2332
+ }
2333
+ }
2334
+ this.end(token);
2335
+ break;
2336
+ } else params.push(token);
2337
+ else params.push(token);
2338
+ if (this.tokenizer.endOfFile()) {
2339
+ last = true;
2340
+ break;
2341
+ }
2342
+ }
2343
+ node.raws.between = this.spacesAndCommentsFromEnd(params);
2344
+ if (params.length) {
2345
+ node.raws.afterName = this.spacesAndCommentsFromStart(params);
2346
+ this.raw(node, "params", params);
2347
+ if (last) {
2348
+ token = params[params.length - 1];
2349
+ node.source.end = this.getPosition(token[3] || token[2]);
2350
+ node.source.end.offset++;
2351
+ this.spaces = node.raws.between;
2352
+ node.raws.between = "";
2353
+ }
2354
+ } else {
2355
+ node.raws.afterName = "";
2356
+ node.params = "";
2357
+ }
2358
+ if (open) {
2359
+ node.nodes = [];
2360
+ this.current = node;
2361
+ }
2362
+ }
2363
+ checkMissedSemicolon(tokens) {
2364
+ let colon = this.colon(tokens);
2365
+ if (colon === false) return;
2366
+ let founded = 0;
2367
+ let token;
2368
+ for (let j = colon - 1; j >= 0; j--) {
2369
+ token = tokens[j];
2370
+ if (token[0] !== "space") {
2371
+ founded += 1;
2372
+ if (founded === 2) break;
2373
+ }
2374
+ }
2375
+ throw this.input.error("Missed semicolon", token[0] === "word" ? token[3] + 1 : token[2]);
2376
+ }
2377
+ colon(tokens) {
2378
+ let brackets = 0;
2379
+ let prev, token, type;
2380
+ for (let [i, element] of tokens.entries()) {
2381
+ token = element;
2382
+ type = token[0];
2383
+ if (type === "(") brackets += 1;
2384
+ if (type === ")") brackets -= 1;
2385
+ if (brackets === 0 && type === ":") if (!prev) this.doubleColon(token);
2386
+ else if (prev[0] === "word" && prev[1] === "progid") continue;
2387
+ else return i;
2388
+ prev = token;
2389
+ }
2390
+ return false;
2391
+ }
2392
+ comment(token) {
2393
+ let node = new Comment();
2394
+ this.init(node, token[2]);
2395
+ node.source.end = this.getPosition(token[3] || token[2]);
2396
+ node.source.end.offset++;
2397
+ let text = token[1].slice(2, -2);
2398
+ if (!text.trim()) {
2399
+ node.text = "";
2400
+ node.raws.left = text;
2401
+ node.raws.right = "";
2402
+ } else {
2403
+ let match = text.match(/^(\s*)([^]*\S)(\s*)$/);
2404
+ node.text = match[2];
2405
+ node.raws.left = match[1];
2406
+ node.raws.right = match[3];
2407
+ }
2408
+ }
2409
+ createTokenizer() {
2410
+ this.tokenizer = tokenizer(this.input);
2411
+ }
2412
+ decl(tokens, customProperty) {
2413
+ let node = new Declaration();
2414
+ this.init(node, tokens[0][2]);
2415
+ let last = tokens[tokens.length - 1];
2416
+ if (last[0] === ";") {
2417
+ this.semicolon = true;
2418
+ tokens.pop();
2419
+ }
2420
+ node.source.end = this.getPosition(last[3] || last[2] || findLastWithPosition(tokens));
2421
+ node.source.end.offset++;
2422
+ let start = 0;
2423
+ while (tokens[start][0] !== "word") {
2424
+ if (start === tokens.length - 1) this.unknownWord([tokens[start]]);
2425
+ start++;
2426
+ }
2427
+ node.raws.before += tokensToString(tokens, 0, start);
2428
+ node.source.start = this.getPosition(tokens[start][2]);
2429
+ let propStart = start;
2430
+ while (start < tokens.length) {
2431
+ let type = tokens[start][0];
2432
+ if (type === ":" || type === "space" || type === "comment") break;
2433
+ start++;
2434
+ }
2435
+ node.prop = tokensToString(tokens, propStart, start);
2436
+ let betweenStart = start;
2437
+ let token;
2438
+ while (start < tokens.length) {
2439
+ token = tokens[start];
2440
+ start++;
2441
+ if (token[0] === ":") break;
2442
+ if (token[0] === "word" && /\w/.test(token[1])) this.unknownWord([token]);
2443
+ }
2444
+ node.raws.between = tokensToString(tokens, betweenStart, start);
2445
+ if (node.prop[0] === "_" || node.prop[0] === "*") {
2446
+ node.raws.before += node.prop[0];
2447
+ node.prop = node.prop.slice(1);
2448
+ }
2449
+ let firstSpacesStart = start;
2450
+ while (start < tokens.length) {
2451
+ let next = tokens[start][0];
2452
+ if (next !== "space" && next !== "comment") break;
2453
+ start++;
2454
+ }
2455
+ let firstSpaces = tokens.slice(firstSpacesStart, start);
2456
+ tokens = tokens.slice(start);
2457
+ this.precheckMissedSemicolon(tokens);
2458
+ for (let i = tokens.length - 1; i >= 0; i--) {
2459
+ token = tokens[i];
2460
+ if (token[1].toLowerCase() === "!important") {
2461
+ node.important = true;
2462
+ let string = this.stringFrom(tokens, i);
2463
+ string = this.spacesFromEnd(tokens) + string;
2464
+ if (string !== " !important") node.raws.important = string;
2465
+ break;
2466
+ } else if (token[1].toLowerCase() === "important") {
2467
+ let cache = tokens.slice(0);
2468
+ let str = "";
2469
+ for (let j = i; j > 0; j--) {
2470
+ let type = cache[j][0];
2471
+ if (str.trim().startsWith("!") && type !== "space") break;
2472
+ str = cache.pop()[1] + str;
2473
+ }
2474
+ if (str.trim().startsWith("!")) {
2475
+ node.important = true;
2476
+ node.raws.important = str;
2477
+ tokens = cache;
2478
+ }
2479
+ }
2480
+ if (token[0] !== "space" && token[0] !== "comment") break;
2481
+ }
2482
+ if (tokens.some((i) => i[0] !== "space" && i[0] !== "comment")) {
2483
+ node.raws.between += firstSpaces.map((i) => i[1]).join("");
2484
+ firstSpaces = [];
2485
+ }
2486
+ this.raw(node, "value", firstSpaces.concat(tokens), customProperty);
2487
+ if (node.value.includes(":") && !customProperty) this.checkMissedSemicolon(tokens);
2488
+ }
2489
+ doubleColon(token) {
2490
+ throw this.input.error("Double colon", { offset: token[2] }, { offset: token[2] + token[1].length });
2491
+ }
2492
+ emptyRule(token) {
2493
+ let node = new Rule();
2494
+ this.init(node, token[2]);
2495
+ node.selector = "";
2496
+ node.raws.between = "";
2497
+ this.current = node;
2498
+ }
2499
+ end(token) {
2500
+ if (this.current.nodes && this.current.nodes.length) this.current.raws.semicolon = this.semicolon;
2501
+ this.semicolon = false;
2502
+ this.current.raws.after = (this.current.raws.after || "") + this.spaces;
2503
+ this.spaces = "";
2504
+ if (this.current.parent) {
2505
+ this.current.source.end = this.getPosition(token[2]);
2506
+ this.current.source.end.offset++;
2507
+ this.current = this.current.parent;
2508
+ } else this.unexpectedClose(token);
2509
+ }
2510
+ endFile() {
2511
+ if (this.current.parent) this.unclosedBlock();
2512
+ if (this.current.nodes && this.current.nodes.length) this.current.raws.semicolon = this.semicolon;
2513
+ this.current.raws.after = (this.current.raws.after || "") + this.spaces;
2514
+ this.root.source.end = this.getPosition(this.tokenizer.position());
2515
+ }
2516
+ freeSemicolon(token) {
2517
+ this.spaces += token[1];
2518
+ if (this.current.nodes) {
2519
+ let prev = this.current.nodes[this.current.nodes.length - 1];
2520
+ if (prev && prev.type === "rule" && !prev.raws.ownSemicolon) {
2521
+ prev.raws.ownSemicolon = this.spaces;
2522
+ this.spaces = "";
2523
+ prev.source.end = this.getPosition(token[2]);
2524
+ prev.source.end.offset += prev.raws.ownSemicolon.length;
2525
+ }
2526
+ }
2527
+ }
2528
+ getPosition(offset) {
2529
+ let pos = this.input.fromOffset(offset);
2530
+ return {
2531
+ column: pos.col,
2532
+ line: pos.line,
2533
+ offset
2534
+ };
2535
+ }
2536
+ init(node, offset) {
2537
+ this.current.push(node);
2538
+ node.source = {
2539
+ input: this.input,
2540
+ start: this.getPosition(offset)
2541
+ };
2542
+ node.raws.before = this.spaces;
2543
+ this.spaces = "";
2544
+ if (node.type !== "comment") this.semicolon = false;
2545
+ }
2546
+ other(start) {
2547
+ let end = false;
2548
+ let type = null;
2549
+ let colon = false;
2550
+ let bracket = null;
2551
+ let brackets = [];
2552
+ let customProperty = start[1].startsWith("--");
2553
+ let tokens = [];
2554
+ let token = start;
2555
+ while (token) {
2556
+ type = token[0];
2557
+ tokens.push(token);
2558
+ if (type === "(" || type === "[") {
2559
+ if (!bracket) bracket = token;
2560
+ brackets.push(type === "(" ? ")" : "]");
2561
+ } else if (customProperty && colon && type === "{") {
2562
+ if (!bracket) bracket = token;
2563
+ brackets.push("}");
2564
+ } else if (brackets.length === 0) {
2565
+ if (type === ";") if (colon) {
2566
+ this.decl(tokens, customProperty);
2567
+ return;
2568
+ } else break;
2569
+ else if (type === "{") {
2570
+ this.rule(tokens);
2571
+ return;
2572
+ } else if (type === "}") {
2573
+ this.tokenizer.back(tokens.pop());
2574
+ end = true;
2575
+ break;
2576
+ } else if (type === ":") colon = true;
2577
+ } else if (type === brackets[brackets.length - 1]) {
2578
+ brackets.pop();
2579
+ if (brackets.length === 0) bracket = null;
2580
+ }
2581
+ token = this.tokenizer.nextToken();
2582
+ }
2583
+ if (this.tokenizer.endOfFile()) end = true;
2584
+ if (brackets.length > 0) this.unclosedBracket(bracket);
2585
+ if (end && colon) {
2586
+ if (!customProperty) while (tokens.length) {
2587
+ token = tokens[tokens.length - 1][0];
2588
+ if (token !== "space" && token !== "comment") break;
2589
+ this.tokenizer.back(tokens.pop());
2590
+ }
2591
+ this.decl(tokens, customProperty);
2592
+ } else this.unknownWord(tokens);
2593
+ }
2594
+ parse() {
2595
+ let token;
2596
+ while (!this.tokenizer.endOfFile()) {
2597
+ token = this.tokenizer.nextToken();
2598
+ switch (token[0]) {
2599
+ case "space":
2600
+ this.spaces += token[1];
2601
+ break;
2602
+ case ";":
2603
+ this.freeSemicolon(token);
2604
+ break;
2605
+ case "}":
2606
+ this.end(token);
2607
+ break;
2608
+ case "comment":
2609
+ this.comment(token);
2610
+ break;
2611
+ case "at-word":
2612
+ this.atrule(token);
2613
+ break;
2614
+ case "{":
2615
+ this.emptyRule(token);
2616
+ break;
2617
+ default:
2618
+ this.other(token);
2619
+ break;
2620
+ }
2621
+ }
2622
+ this.endFile();
2623
+ }
2624
+ precheckMissedSemicolon() {}
2625
+ raw(node, prop, tokens, customProperty) {
2626
+ let token, type;
2627
+ let length = tokens.length;
2628
+ let value = "";
2629
+ let clean = true;
2630
+ let next, prev;
2631
+ for (let i = 0; i < length; i += 1) {
2632
+ token = tokens[i];
2633
+ type = token[0];
2634
+ if (type === "space" && i === length - 1 && !customProperty) clean = false;
2635
+ else if (type === "comment") {
2636
+ prev = tokens[i - 1] ? tokens[i - 1][0] : "empty";
2637
+ next = tokens[i + 1] ? tokens[i + 1][0] : "empty";
2638
+ if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) if (value.slice(-1) === ",") clean = false;
2639
+ else value += token[1];
2640
+ else clean = false;
2641
+ } else value += token[1];
2642
+ }
2643
+ if (!clean) {
2644
+ let raw = tokens.reduce((all, i) => all + i[1], "");
2645
+ node.raws[prop] = {
2646
+ raw,
2647
+ value
2648
+ };
2649
+ }
2650
+ node[prop] = value;
2651
+ }
2652
+ rule(tokens) {
2653
+ tokens.pop();
2654
+ let node = new Rule();
2655
+ this.init(node, tokens[0][2]);
2656
+ node.raws.between = this.spacesAndCommentsFromEnd(tokens);
2657
+ this.raw(node, "selector", tokens);
2658
+ this.current = node;
2659
+ }
2660
+ spacesAndCommentsFromEnd(tokens) {
2661
+ let lastTokenType;
2662
+ let spaces = "";
2663
+ while (tokens.length) {
2664
+ lastTokenType = tokens[tokens.length - 1][0];
2665
+ if (lastTokenType !== "space" && lastTokenType !== "comment") break;
2666
+ spaces = tokens.pop()[1] + spaces;
2667
+ }
2668
+ return spaces;
2669
+ }
2670
+ spacesAndCommentsFromStart(tokens) {
2671
+ let next;
2672
+ let spaces = "";
2673
+ while (tokens.length) {
2674
+ next = tokens[0][0];
2675
+ if (next !== "space" && next !== "comment") break;
2676
+ spaces += tokens.shift()[1];
2677
+ }
2678
+ return spaces;
2679
+ }
2680
+ spacesFromEnd(tokens) {
2681
+ let lastTokenType;
2682
+ let spaces = "";
2683
+ while (tokens.length) {
2684
+ lastTokenType = tokens[tokens.length - 1][0];
2685
+ if (lastTokenType !== "space") break;
2686
+ spaces = tokens.pop()[1] + spaces;
2687
+ }
2688
+ return spaces;
2689
+ }
2690
+ stringFrom(tokens, from) {
2691
+ let result = "";
2692
+ for (let i = from; i < tokens.length; i++) result += tokens[i][1];
2693
+ tokens.splice(from, tokens.length - from);
2694
+ return result;
2695
+ }
2696
+ unclosedBlock() {
2697
+ let pos = this.current.source.start;
2698
+ throw this.input.error("Unclosed block", pos.line, pos.column);
2699
+ }
2700
+ unclosedBracket(bracket) {
2701
+ throw this.input.error("Unclosed bracket", { offset: bracket[2] }, { offset: bracket[2] + 1 });
2702
+ }
2703
+ unexpectedClose(token) {
2704
+ throw this.input.error("Unexpected }", { offset: token[2] }, { offset: token[2] + 1 });
2705
+ }
2706
+ unknownWord(tokens) {
2707
+ throw this.input.error("Unknown word " + tokens[0][1], { offset: tokens[0][2] }, { offset: tokens[0][2] + tokens[0][1].length });
2708
+ }
2709
+ unnamedAtrule(node, token) {
2710
+ throw this.input.error("At-rule without name", { offset: token[2] }, { offset: token[2] + token[1].length });
2711
+ }
2712
+ };
2713
+ module.exports = Parser;
2714
+ }));
2715
+ //#endregion
2716
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/parse.js
2717
+ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2718
+ var Container = require_container();
2719
+ var Input = require_input();
2720
+ var Parser = require_parser();
2721
+ function parse(css, opts) {
2722
+ let parser = new Parser(new Input(css, opts));
2723
+ try {
2724
+ parser.parse();
2725
+ } catch (e) {
2726
+ if (process.env.NODE_ENV !== "production") {
2727
+ if (e.name === "CssSyntaxError" && opts && opts.from) {
2728
+ if (/\.scss$/i.test(opts.from)) e.message += "\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser";
2729
+ else if (/\.sass/i.test(opts.from)) e.message += "\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser";
2730
+ else if (/\.less$/i.test(opts.from)) e.message += "\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser";
2731
+ }
2732
+ }
2733
+ throw e;
2734
+ }
2735
+ return parser.root;
2736
+ }
2737
+ module.exports = parse;
2738
+ parse.default = parse;
2739
+ Container.registerParse(parse);
2740
+ }));
2741
+ //#endregion
2742
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/warning.js
2743
+ var require_warning = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2744
+ var Warning = class {
2745
+ constructor(text, opts = {}) {
2746
+ this.type = "warning";
2747
+ this.text = text;
2748
+ if (opts.node && opts.node.source) {
2749
+ let range = opts.node.rangeBy(opts);
2750
+ this.line = range.start.line;
2751
+ this.column = range.start.column;
2752
+ this.endLine = range.end.line;
2753
+ this.endColumn = range.end.column;
2754
+ }
2755
+ for (let opt in opts) this[opt] = opts[opt];
2756
+ }
2757
+ toString() {
2758
+ if (this.node) return this.node.error(this.text, {
2759
+ index: this.index,
2760
+ plugin: this.plugin,
2761
+ word: this.word
2762
+ }).message;
2763
+ if (this.plugin) return this.plugin + ": " + this.text;
2764
+ return this.text;
2765
+ }
2766
+ };
2767
+ module.exports = Warning;
2768
+ Warning.default = Warning;
2769
+ }));
2770
+ //#endregion
2771
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/result.js
2772
+ var require_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2773
+ var Warning = require_warning();
2774
+ var Result = class {
2775
+ get content() {
2776
+ return this.css;
2777
+ }
2778
+ constructor(processor, root, opts) {
2779
+ this.processor = processor;
2780
+ this.messages = [];
2781
+ this.root = root;
2782
+ this.opts = opts;
2783
+ this.css = "";
2784
+ this.map = void 0;
2785
+ }
2786
+ toString() {
2787
+ return this.css;
2788
+ }
2789
+ warn(text, opts = {}) {
2790
+ if (!opts.plugin) {
2791
+ if (this.lastPlugin && this.lastPlugin.postcssPlugin) opts.plugin = this.lastPlugin.postcssPlugin;
2792
+ }
2793
+ let warning = new Warning(text, opts);
2794
+ this.messages.push(warning);
2795
+ return warning;
2796
+ }
2797
+ warnings() {
2798
+ return this.messages.filter((i) => i.type === "warning");
2799
+ }
2800
+ };
2801
+ module.exports = Result;
2802
+ Result.default = Result;
2803
+ }));
2804
+ //#endregion
2805
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/warn-once.js
2806
+ var require_warn_once = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2807
+ var printed = {};
2808
+ module.exports = function warnOnce(message) {
2809
+ if (printed[message]) return;
2810
+ printed[message] = true;
2811
+ if (typeof console !== "undefined" && console.warn) console.warn(message);
2812
+ };
2813
+ }));
2814
+ //#endregion
2815
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/lazy-result.js
2816
+ var require_lazy_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2817
+ var Container = require_container();
2818
+ var Document = require_document();
2819
+ var MapGenerator = require_map_generator();
2820
+ var parse = require_parse();
2821
+ var Result = require_result();
2822
+ var Root = require_root();
2823
+ var stringify = require_stringify();
2824
+ var { isClean, my } = require_symbols();
2825
+ var warnOnce = require_warn_once();
2826
+ var TYPE_TO_CLASS_NAME = {
2827
+ atrule: "AtRule",
2828
+ comment: "Comment",
2829
+ decl: "Declaration",
2830
+ document: "Document",
2831
+ root: "Root",
2832
+ rule: "Rule"
2833
+ };
2834
+ var PLUGIN_PROPS = {
2835
+ AtRule: true,
2836
+ AtRuleExit: true,
2837
+ Comment: true,
2838
+ CommentExit: true,
2839
+ Declaration: true,
2840
+ DeclarationExit: true,
2841
+ Document: true,
2842
+ DocumentExit: true,
2843
+ Once: true,
2844
+ OnceExit: true,
2845
+ postcssPlugin: true,
2846
+ prepare: true,
2847
+ Root: true,
2848
+ RootExit: true,
2849
+ Rule: true,
2850
+ RuleExit: true
2851
+ };
2852
+ var NOT_VISITORS = {
2853
+ Once: true,
2854
+ postcssPlugin: true,
2855
+ prepare: true
2856
+ };
2857
+ var CHILDREN = 0;
2858
+ function isPromise(obj) {
2859
+ return typeof obj === "object" && typeof obj.then === "function";
2860
+ }
2861
+ function getEvents(node) {
2862
+ let key = false;
2863
+ let type = TYPE_TO_CLASS_NAME[node.type];
2864
+ if (node.type === "decl") key = node.prop.toLowerCase();
2865
+ else if (node.type === "atrule") key = node.name.toLowerCase();
2866
+ if (key && node.append) return [
2867
+ type,
2868
+ type + "-" + key,
2869
+ CHILDREN,
2870
+ type + "Exit",
2871
+ type + "Exit-" + key
2872
+ ];
2873
+ else if (key) return [
2874
+ type,
2875
+ type + "-" + key,
2876
+ type + "Exit",
2877
+ type + "Exit-" + key
2878
+ ];
2879
+ else if (node.append) return [
2880
+ type,
2881
+ CHILDREN,
2882
+ type + "Exit"
2883
+ ];
2884
+ else return [type, type + "Exit"];
2885
+ }
2886
+ function toStack(node) {
2887
+ let events;
2888
+ if (node.type === "document") events = [
2889
+ "Document",
2890
+ CHILDREN,
2891
+ "DocumentExit"
2892
+ ];
2893
+ else if (node.type === "root") events = [
2894
+ "Root",
2895
+ CHILDREN,
2896
+ "RootExit"
2897
+ ];
2898
+ else events = getEvents(node);
2899
+ return {
2900
+ eventIndex: 0,
2901
+ events,
2902
+ iterator: 0,
2903
+ node,
2904
+ visitorIndex: 0,
2905
+ visitors: []
2906
+ };
2907
+ }
2908
+ function cleanMarks(node) {
2909
+ let stack = [node];
2910
+ while (stack.length > 0) {
2911
+ let next = stack.pop();
2912
+ next[isClean] = false;
2913
+ if (next.nodes) for (let i of next.nodes) stack.push(i);
2914
+ }
2915
+ return node;
2916
+ }
2917
+ var postcss = {};
2918
+ var LazyResult = class LazyResult {
2919
+ get content() {
2920
+ return this.stringify().content;
2921
+ }
2922
+ get css() {
2923
+ return this.stringify().css;
2924
+ }
2925
+ get map() {
2926
+ return this.stringify().map;
2927
+ }
2928
+ get messages() {
2929
+ return this.sync().messages;
2930
+ }
2931
+ get opts() {
2932
+ return this.result.opts;
2933
+ }
2934
+ get processor() {
2935
+ return this.result.processor;
2936
+ }
2937
+ get root() {
2938
+ return this.sync().root;
2939
+ }
2940
+ get [Symbol.toStringTag]() {
2941
+ return "LazyResult";
2942
+ }
2943
+ constructor(processor, css, opts) {
2944
+ this.stringified = false;
2945
+ this.processed = false;
2946
+ let root;
2947
+ if (typeof css === "object" && css !== null && (css.type === "root" || css.type === "document")) root = cleanMarks(css);
2948
+ else if (css instanceof LazyResult || css instanceof Result) {
2949
+ root = cleanMarks(css.root);
2950
+ if (css.map) {
2951
+ if (typeof opts.map === "undefined") opts.map = {};
2952
+ if (!opts.map.inline) opts.map.inline = false;
2953
+ opts.map.prev = css.map;
2954
+ }
2955
+ } else {
2956
+ let parser = parse;
2957
+ if (opts.syntax) parser = opts.syntax.parse;
2958
+ if (opts.parser) parser = opts.parser;
2959
+ if (parser.parse) parser = parser.parse;
2960
+ try {
2961
+ root = parser(css, opts);
2962
+ } catch (error) {
2963
+ this.processed = true;
2964
+ this.error = error;
2965
+ }
2966
+ if (root && !root[my])
2967
+ /* c8 ignore next 2 */
2968
+ Container.rebuild(root);
2969
+ }
2970
+ this.result = new Result(processor, root, opts);
2971
+ this.helpers = {
2972
+ ...postcss,
2973
+ postcss,
2974
+ result: this.result
2975
+ };
2976
+ this.plugins = this.processor.plugins.map((plugin) => {
2977
+ if (typeof plugin === "object" && plugin.prepare) return {
2978
+ ...plugin,
2979
+ ...plugin.prepare(this.result)
2980
+ };
2981
+ else return plugin;
2982
+ });
2983
+ }
2984
+ async() {
2985
+ if (this.error) return Promise.reject(this.error);
2986
+ if (this.processed) return Promise.resolve(this.result);
2987
+ if (!this.processing) this.processing = this.runAsync();
2988
+ return this.processing;
2989
+ }
2990
+ catch(onRejected) {
2991
+ return this.async().catch(onRejected);
2992
+ }
2993
+ finally(onFinally) {
2994
+ return this.async().then(onFinally, onFinally);
2995
+ }
2996
+ getAsyncError() {
2997
+ throw new Error("Use process(css).then(cb) to work with async plugins");
2998
+ }
2999
+ handleError(error, node) {
3000
+ let plugin = this.result.lastPlugin;
3001
+ try {
3002
+ if (node) node.addToError(error);
3003
+ this.error = error;
3004
+ if (error.name === "CssSyntaxError" && !error.plugin) {
3005
+ error.plugin = plugin.postcssPlugin;
3006
+ error.setMessage();
3007
+ } else if (plugin.postcssVersion) {
3008
+ if (process.env.NODE_ENV !== "production") {
3009
+ let pluginName = plugin.postcssPlugin;
3010
+ let pluginVer = plugin.postcssVersion;
3011
+ let runtimeVer = this.result.processor.version;
3012
+ let a = pluginVer.split(".");
3013
+ let b = runtimeVer.split(".");
3014
+ if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) console.error("Unknown error from PostCSS plugin. Your current PostCSS version is " + runtimeVer + ", but " + pluginName + " uses " + pluginVer + ". Perhaps this is the source of the error below.");
3015
+ }
3016
+ }
3017
+ } catch (err) {
3018
+ /* c8 ignore next 3 */
3019
+ if (console && console.error) console.error(err);
3020
+ }
3021
+ return error;
3022
+ }
3023
+ prepareVisitors() {
3024
+ this.listeners = {};
3025
+ let add = (plugin, type, cb) => {
3026
+ if (!this.listeners[type]) this.listeners[type] = [];
3027
+ this.listeners[type].push([plugin, cb]);
3028
+ };
3029
+ for (let plugin of this.plugins) if (typeof plugin === "object") for (let event in plugin) {
3030
+ if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) throw new Error(`Unknown event ${event} in ${plugin.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
3031
+ if (!NOT_VISITORS[event]) {
3032
+ if (typeof plugin[event] === "object") for (let filter in plugin[event]) if (filter === "*") add(plugin, event, plugin[event][filter]);
3033
+ else add(plugin, event + "-" + filter.toLowerCase(), plugin[event][filter]);
3034
+ else if (typeof plugin[event] === "function") add(plugin, event, plugin[event]);
3035
+ }
3036
+ }
3037
+ this.hasListener = Object.keys(this.listeners).length > 0;
3038
+ }
3039
+ async runAsync() {
3040
+ this.plugin = 0;
3041
+ for (let i = 0; i < this.plugins.length; i++) {
3042
+ let plugin = this.plugins[i];
3043
+ let promise = this.runOnRoot(plugin);
3044
+ if (isPromise(promise)) try {
3045
+ await promise;
3046
+ } catch (error) {
3047
+ throw this.handleError(error);
3048
+ }
3049
+ }
3050
+ this.prepareVisitors();
3051
+ if (this.hasListener) {
3052
+ let root = this.result.root;
3053
+ while (!root[isClean]) {
3054
+ root[isClean] = true;
3055
+ let stack = [toStack(root)];
3056
+ while (stack.length > 0) {
3057
+ let promise = this.visitTick(stack);
3058
+ if (isPromise(promise)) try {
3059
+ await promise;
3060
+ } catch (e) {
3061
+ let node = stack[stack.length - 1].node;
3062
+ throw this.handleError(e, node);
3063
+ }
3064
+ }
3065
+ }
3066
+ if (this.listeners.OnceExit) for (let [plugin, visitor] of this.listeners.OnceExit) {
3067
+ this.result.lastPlugin = plugin;
3068
+ try {
3069
+ if (root.type === "document") {
3070
+ let roots = root.nodes.map((subRoot) => visitor(subRoot, this.helpers));
3071
+ await Promise.all(roots);
3072
+ } else await visitor(root, this.helpers);
3073
+ } catch (e) {
3074
+ throw this.handleError(e);
3075
+ }
3076
+ }
3077
+ }
3078
+ this.processed = true;
3079
+ return this.stringify();
3080
+ }
3081
+ runOnRoot(plugin) {
3082
+ this.result.lastPlugin = plugin;
3083
+ try {
3084
+ if (typeof plugin === "object" && plugin.Once) {
3085
+ if (this.result.root.type === "document") {
3086
+ let roots = this.result.root.nodes.map((root) => plugin.Once(root, this.helpers));
3087
+ if (isPromise(roots[0])) return Promise.all(roots);
3088
+ return roots;
3089
+ }
3090
+ return plugin.Once(this.result.root, this.helpers);
3091
+ } else if (typeof plugin === "function") return plugin(this.result.root, this.result);
3092
+ } catch (error) {
3093
+ throw this.handleError(error);
3094
+ }
3095
+ }
3096
+ stringify() {
3097
+ if (this.error) throw this.error;
3098
+ if (this.stringified) return this.result;
3099
+ this.stringified = true;
3100
+ this.sync();
3101
+ let opts = this.result.opts;
3102
+ let str = stringify;
3103
+ if (opts.syntax) str = opts.syntax.stringify;
3104
+ if (opts.stringifier) str = opts.stringifier;
3105
+ if (str.stringify) str = str.stringify;
3106
+ let rootSource = this.result.root.source;
3107
+ if (opts.map === void 0 && !(rootSource && rootSource.input && rootSource.input.map)) {
3108
+ let result = "";
3109
+ str(this.result.root, (i) => {
3110
+ result += i;
3111
+ });
3112
+ this.result.css = result;
3113
+ return this.result;
3114
+ }
3115
+ let data = new MapGenerator(str, this.result.root, this.result.opts).generate();
3116
+ this.result.css = data[0];
3117
+ this.result.map = data[1];
3118
+ return this.result;
3119
+ }
3120
+ sync() {
3121
+ if (this.error) throw this.error;
3122
+ if (this.processed) return this.result;
3123
+ this.processed = true;
3124
+ if (this.processing) throw this.getAsyncError();
3125
+ for (let plugin of this.plugins) if (isPromise(this.runOnRoot(plugin))) throw this.getAsyncError();
3126
+ this.prepareVisitors();
3127
+ if (this.hasListener) {
3128
+ let root = this.result.root;
3129
+ while (!root[isClean]) {
3130
+ root[isClean] = true;
3131
+ this.walkSync(root);
3132
+ }
3133
+ if (this.listeners.OnceExit) if (root.type === "document") for (let subRoot of root.nodes) this.visitSync(this.listeners.OnceExit, subRoot);
3134
+ else this.visitSync(this.listeners.OnceExit, root);
3135
+ }
3136
+ return this.result;
3137
+ }
3138
+ then(onFulfilled, onRejected) {
3139
+ if (process.env.NODE_ENV !== "production") {
3140
+ if (!("from" in this.opts)) warnOnce("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.");
3141
+ }
3142
+ return this.async().then(onFulfilled, onRejected);
3143
+ }
3144
+ toString() {
3145
+ return this.css;
3146
+ }
3147
+ visitSync(visitors, node) {
3148
+ for (let [plugin, visitor] of visitors) {
3149
+ this.result.lastPlugin = plugin;
3150
+ let promise;
3151
+ try {
3152
+ promise = visitor(node, this.helpers);
3153
+ } catch (e) {
3154
+ throw this.handleError(e, node.proxyOf);
3155
+ }
3156
+ if (node.type !== "root" && node.type !== "document" && !node.parent) return true;
3157
+ if (isPromise(promise)) throw this.getAsyncError();
3158
+ }
3159
+ }
3160
+ visitTick(stack) {
3161
+ let visit = stack[stack.length - 1];
3162
+ let { node, visitors } = visit;
3163
+ if (node.type !== "root" && node.type !== "document" && !node.parent) {
3164
+ stack.pop();
3165
+ return;
3166
+ }
3167
+ if (visitors.length > 0 && visit.visitorIndex < visitors.length) {
3168
+ let [plugin, visitor] = visitors[visit.visitorIndex];
3169
+ visit.visitorIndex += 1;
3170
+ if (visit.visitorIndex === visitors.length) {
3171
+ visit.visitors = [];
3172
+ visit.visitorIndex = 0;
3173
+ }
3174
+ this.result.lastPlugin = plugin;
3175
+ try {
3176
+ return visitor(node.toProxy(), this.helpers);
3177
+ } catch (e) {
3178
+ throw this.handleError(e, node);
3179
+ }
3180
+ }
3181
+ if (visit.iterator !== 0) {
3182
+ let iterator = visit.iterator;
3183
+ let child;
3184
+ while (child = node.nodes[node.indexes[iterator]]) {
3185
+ node.indexes[iterator] += 1;
3186
+ if (!child[isClean]) {
3187
+ child[isClean] = true;
3188
+ stack.push(toStack(child));
3189
+ return;
3190
+ }
3191
+ }
3192
+ visit.iterator = 0;
3193
+ delete node.indexes[iterator];
3194
+ }
3195
+ let events = visit.events;
3196
+ while (visit.eventIndex < events.length) {
3197
+ let event = events[visit.eventIndex];
3198
+ visit.eventIndex += 1;
3199
+ if (event === CHILDREN) {
3200
+ if (node.nodes && node.nodes.length) {
3201
+ node[isClean] = true;
3202
+ visit.iterator = node.getIterator();
3203
+ }
3204
+ return;
3205
+ } else if (this.listeners[event]) {
3206
+ visit.visitors = this.listeners[event];
3207
+ return;
3208
+ }
3209
+ }
3210
+ stack.pop();
3211
+ }
3212
+ walkSync(node) {
3213
+ node[isClean] = true;
3214
+ let stack = [{
3215
+ eventIndex: 0,
3216
+ events: getEvents(node),
3217
+ iterator: 0,
3218
+ node
3219
+ }];
3220
+ while (stack.length > 0) {
3221
+ let visit = stack[stack.length - 1];
3222
+ let visitNode = visit.node;
3223
+ if (visit.iterator !== 0) {
3224
+ let iterator = visit.iterator;
3225
+ let child;
3226
+ let descended = false;
3227
+ while (child = visitNode.nodes[visitNode.indexes[iterator]]) {
3228
+ visitNode.indexes[iterator] += 1;
3229
+ if (!child[isClean]) {
3230
+ child[isClean] = true;
3231
+ stack.push({
3232
+ eventIndex: 0,
3233
+ events: getEvents(child),
3234
+ iterator: 0,
3235
+ node: child
3236
+ });
3237
+ descended = true;
3238
+ break;
3239
+ }
3240
+ }
3241
+ if (descended) continue;
3242
+ visit.iterator = 0;
3243
+ delete visitNode.indexes[iterator];
3244
+ }
3245
+ if (visit.eventIndex < visit.events.length) {
3246
+ let event = visit.events[visit.eventIndex];
3247
+ visit.eventIndex += 1;
3248
+ if (event === CHILDREN) {
3249
+ if (visitNode.nodes && visitNode.nodes.length) visit.iterator = visitNode.getIterator();
3250
+ } else {
3251
+ let visitors = this.listeners[event];
3252
+ if (visitors) {
3253
+ if (this.visitSync(visitors, visitNode.toProxy())) stack.pop();
3254
+ }
3255
+ }
3256
+ continue;
3257
+ }
3258
+ stack.pop();
3259
+ }
3260
+ }
3261
+ warnings() {
3262
+ return this.sync().warnings();
3263
+ }
3264
+ };
3265
+ LazyResult.registerPostcss = (dependant) => {
3266
+ postcss = dependant;
3267
+ };
3268
+ module.exports = LazyResult;
3269
+ LazyResult.default = LazyResult;
3270
+ Root.registerLazyResult(LazyResult);
3271
+ Document.registerLazyResult(LazyResult);
3272
+ }));
3273
+ //#endregion
3274
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/no-work-result.js
3275
+ var require_no_work_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3276
+ var MapGenerator = require_map_generator();
3277
+ var parse = require_parse();
3278
+ var Result = require_result();
3279
+ var stringify = require_stringify();
3280
+ var warnOnce = require_warn_once();
3281
+ var NoWorkResult = class {
3282
+ get content() {
3283
+ return this.result.css;
3284
+ }
3285
+ get css() {
3286
+ return this.result.css;
3287
+ }
3288
+ get map() {
3289
+ return this.result.map;
3290
+ }
3291
+ get messages() {
3292
+ return [];
3293
+ }
3294
+ get opts() {
3295
+ return this.result.opts;
3296
+ }
3297
+ get processor() {
3298
+ return this.result.processor;
3299
+ }
3300
+ get root() {
3301
+ if (this._root) return this._root;
3302
+ let root;
3303
+ let parser = parse;
3304
+ try {
3305
+ root = parser(this._css, this._opts);
3306
+ } catch (error) {
3307
+ this.error = error;
3308
+ }
3309
+ if (this.error) throw this.error;
3310
+ else {
3311
+ this._root = root;
3312
+ return root;
3313
+ }
3314
+ }
3315
+ get [Symbol.toStringTag]() {
3316
+ return "NoWorkResult";
3317
+ }
3318
+ constructor(processor, css, opts) {
3319
+ css = css.toString();
3320
+ this.stringified = false;
3321
+ this._processor = processor;
3322
+ this._css = css;
3323
+ this._opts = opts;
3324
+ this._map = void 0;
3325
+ let str = stringify;
3326
+ this.result = new Result(this._processor, void 0, this._opts);
3327
+ this.result.css = css;
3328
+ let self = this;
3329
+ Object.defineProperty(this.result, "root", { get() {
3330
+ return self.root;
3331
+ } });
3332
+ let map = new MapGenerator(str, void 0, this._opts, css);
3333
+ if (map.isMap()) {
3334
+ let [generatedCSS, generatedMap] = map.generate();
3335
+ if (generatedCSS) this.result.css = generatedCSS;
3336
+ if (generatedMap) this.result.map = generatedMap;
3337
+ } else {
3338
+ map.clearAnnotation();
3339
+ this.result.css = map.css;
3340
+ }
3341
+ }
3342
+ async() {
3343
+ if (this.error) return Promise.reject(this.error);
3344
+ return Promise.resolve(this.result);
3345
+ }
3346
+ catch(onRejected) {
3347
+ return this.async().catch(onRejected);
3348
+ }
3349
+ finally(onFinally) {
3350
+ return this.async().then(onFinally, onFinally);
3351
+ }
3352
+ sync() {
3353
+ if (this.error) throw this.error;
3354
+ return this.result;
3355
+ }
3356
+ then(onFulfilled, onRejected) {
3357
+ if (process.env.NODE_ENV !== "production") {
3358
+ if (!("from" in this._opts)) warnOnce("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.");
3359
+ }
3360
+ return this.async().then(onFulfilled, onRejected);
3361
+ }
3362
+ toString() {
3363
+ return this._css;
3364
+ }
3365
+ warnings() {
3366
+ return [];
3367
+ }
3368
+ };
3369
+ module.exports = NoWorkResult;
3370
+ NoWorkResult.default = NoWorkResult;
3371
+ }));
3372
+ //#endregion
3373
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/processor.js
3374
+ var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3375
+ var Document = require_document();
3376
+ var LazyResult = require_lazy_result();
3377
+ var NoWorkResult = require_no_work_result();
3378
+ var Root = require_root();
3379
+ var Processor = class {
3380
+ constructor(plugins = []) {
3381
+ this.version = "8.5.19";
3382
+ this.plugins = this.normalize(plugins);
3383
+ }
3384
+ normalize(plugins) {
3385
+ let normalized = [];
3386
+ for (let i of plugins) {
3387
+ if (i.postcss === true) i = i();
3388
+ else if (i.postcss) i = i.postcss;
3389
+ if (typeof i === "object" && Array.isArray(i.plugins)) normalized = normalized.concat(i.plugins);
3390
+ else if (typeof i === "object" && i.postcssPlugin) normalized.push(i);
3391
+ else if (typeof i === "function") normalized.push(i);
3392
+ else if (typeof i === "object" && (i.parse || i.stringify)) {
3393
+ if (process.env.NODE_ENV !== "production") throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.");
3394
+ } else throw new Error(i + " is not a PostCSS plugin");
3395
+ }
3396
+ return normalized;
3397
+ }
3398
+ process(css, opts = {}) {
3399
+ if (!this.plugins.length && !opts.parser && !opts.stringifier && !opts.syntax) return new NoWorkResult(this, css, opts);
3400
+ else return new LazyResult(this, css, opts);
3401
+ }
3402
+ use(plugin) {
3403
+ this.plugins = this.plugins.concat(this.normalize([plugin]));
3404
+ return this;
3405
+ }
3406
+ };
3407
+ module.exports = Processor;
3408
+ Processor.default = Processor;
3409
+ Root.registerProcessor(Processor);
3410
+ Document.registerProcessor(Processor);
3411
+ }));
3412
+ //#endregion
3413
+ //#region ../../node_modules/.bun/postcss@8.5.19/node_modules/postcss/lib/postcss.mjs
3414
+ var import_postcss = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
3415
+ var AtRule = require_at_rule();
3416
+ var Comment = require_comment();
3417
+ var Container = require_container();
3418
+ var CssSyntaxError = require_css_syntax_error();
3419
+ var Declaration = require_declaration();
3420
+ var Document = require_document();
3421
+ var fromJSON = require_fromJSON();
3422
+ var Input = require_input();
3423
+ var LazyResult = require_lazy_result();
3424
+ var list = require_list();
3425
+ var Node = require_node();
3426
+ var parse = require_parse();
3427
+ var Processor = require_processor();
3428
+ var Result = require_result();
3429
+ var Root = require_root();
3430
+ var Rule = require_rule();
3431
+ var stringify = require_stringify();
3432
+ var Warning = require_warning();
3433
+ function postcss(...plugins) {
3434
+ if (plugins.length === 1 && Array.isArray(plugins[0])) plugins = plugins[0];
3435
+ return new Processor(plugins);
3436
+ }
3437
+ postcss.plugin = function plugin(name, initializer) {
3438
+ let warningPrinted = false;
3439
+ function creator(...args) {
3440
+ if (console && console.warn && !warningPrinted) {
3441
+ warningPrinted = true;
3442
+ console.warn(name + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration");
3443
+ if (process.env.LANG && process.env.LANG.startsWith("cn"))
3444
+ /* c8 ignore next 7 */
3445
+ console.warn(name + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");
3446
+ }
3447
+ let transformer = initializer(...args);
3448
+ transformer.postcssPlugin = name;
3449
+ transformer.postcssVersion = new Processor().version;
3450
+ return transformer;
3451
+ }
3452
+ let cache;
3453
+ Object.defineProperty(creator, "postcss", { get() {
3454
+ if (!cache) cache = creator();
3455
+ return cache;
3456
+ } });
3457
+ creator.process = function(css, processOpts, pluginOpts) {
3458
+ return postcss([creator(pluginOpts)]).process(css, processOpts);
3459
+ };
3460
+ return creator;
3461
+ };
3462
+ postcss.stringify = stringify;
3463
+ postcss.parse = parse;
3464
+ postcss.fromJSON = fromJSON;
3465
+ postcss.list = list;
3466
+ postcss.comment = (defaults) => new Comment(defaults);
3467
+ postcss.atRule = (defaults) => new AtRule(defaults);
3468
+ postcss.decl = (defaults) => new Declaration(defaults);
3469
+ postcss.rule = (defaults) => new Rule(defaults);
3470
+ postcss.root = (defaults) => new Root(defaults);
3471
+ postcss.document = (defaults) => new Document(defaults);
3472
+ postcss.CssSyntaxError = CssSyntaxError;
3473
+ postcss.Declaration = Declaration;
3474
+ postcss.Container = Container;
3475
+ postcss.Processor = Processor;
3476
+ postcss.Document = Document;
3477
+ postcss.Comment = Comment;
3478
+ postcss.Warning = Warning;
3479
+ postcss.AtRule = AtRule;
3480
+ postcss.Result = Result;
3481
+ postcss.Input = Input;
3482
+ postcss.Rule = Rule;
3483
+ postcss.Root = Root;
3484
+ postcss.Node = Node;
3485
+ LazyResult.registerPostcss(postcss);
3486
+ module.exports = postcss;
3487
+ postcss.default = postcss;
3488
+ })))(), 1);
3489
+ var postcss_default = import_postcss.default;
3490
+ var stringify = import_postcss.default.stringify;
3491
+ var fromJSON = import_postcss.default.fromJSON;
3492
+ var plugin = import_postcss.default.plugin;
3493
+ var parse = import_postcss.default.parse;
3494
+ var list = import_postcss.default.list;
3495
+ var document = import_postcss.default.document;
3496
+ var comment = import_postcss.default.comment;
3497
+ var atRule = import_postcss.default.atRule;
3498
+ var rule = import_postcss.default.rule;
3499
+ var decl = import_postcss.default.decl;
3500
+ var root = import_postcss.default.root;
3501
+ var CssSyntaxError = import_postcss.default.CssSyntaxError;
3502
+ var Declaration = import_postcss.default.Declaration;
3503
+ var Container = import_postcss.default.Container;
3504
+ var Processor = import_postcss.default.Processor;
3505
+ var Document = import_postcss.default.Document;
3506
+ var Comment = import_postcss.default.Comment;
3507
+ var Warning = import_postcss.default.Warning;
3508
+ var AtRule = import_postcss.default.AtRule;
3509
+ var Result = import_postcss.default.Result;
3510
+ var Input = import_postcss.default.Input;
3511
+ var Rule = import_postcss.default.Rule;
3512
+ var Root = import_postcss.default.Root;
3513
+ var Node = import_postcss.default.Node;
3514
+ //#endregion
3515
+ export { AtRule, Comment, Container, CssSyntaxError, Declaration, Document, Input, Node, Processor, Result, Root, Rule, Warning, atRule, comment, decl, postcss_default as default, document, fromJSON, list, parse, plugin, root, rule, stringify };