hyperframes 0.8.139 → 0.8.141

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 (200) hide show
  1. package/dist/{add-VYJQ4S3P.js → add-KH2CF4FD.js} +20 -22
  2. package/dist/{animatedGifPrep-IBMW6FZB.js → animatedGifPrep-QO4BSKR7.js} +15 -8
  3. package/dist/{asset-FLSUS73X.js → asset-4RDZILVJ.js} +3 -3
  4. package/dist/{assetCataloger-TGD7TRCR.js → assetCataloger-WGR4LYYN.js} +6 -3
  5. package/dist/{auth-EZXIN4M4.js → auth-WYQCOYE5.js} +7 -7
  6. package/dist/{autoUpdate-ZPMY5T3X.js → autoUpdate-PC5TN3NL.js} +2 -2
  7. package/dist/{backgroundChecks-JIDTAUFE.js → backgroundChecks-7M3T44EP.js} +3 -3
  8. package/dist/backgroundChecksWorker.js +3 -3
  9. package/dist/{batchRender-FNZ6TJYY.js → batchRender-GOLLOE4V.js} +11 -8
  10. package/dist/beat-analyzer.global.js +5 -2
  11. package/dist/{beats-EAA4U3YN.js → beats-XJ7WP6QS.js} +24 -17
  12. package/dist/{benchmark-KKZQVK2Y.js → benchmark-HCGFBEZJ.js} +20 -23
  13. package/dist/{browser-ZIVVJLJT.js → browser-VQKO2FKG.js} +14 -28
  14. package/dist/{bundleWithLocalizedFonts-2XWC3PEM.js → bundleWithLocalizedFonts-FH7PHTTX.js} +5 -5
  15. package/dist/{capture-EFYPXI42.js → capture-TFZZSF6F.js} +22 -15
  16. package/dist/{capture-MKJHABUL.js → capture-XD3P3YQR.js} +2 -2
  17. package/dist/{catalog-EWX4BBI2.js → catalog-4S33QWJJ.js} +28 -30
  18. package/dist/{catch-up-FJFH7T4W.js → catch-up-RW7YXXNT.js} +11 -25
  19. package/dist/{check-YJNVDCBP.js → check-XVTRRN4Y.js} +72 -54
  20. package/dist/{checkBrowser-I6SPPEGD.js → checkBrowser-HZXJ2EDU.js} +81 -36
  21. package/dist/chunk-24OWOBQH.js +3656 -0
  22. package/dist/{chunk-OENM2JVZ.js → chunk-34TXESM7.js} +3 -3
  23. package/dist/{chunk-GWV2Y36Q.js → chunk-35RSNI77.js} +5 -106
  24. package/dist/{chunk-BC3OY2ED.js → chunk-3A5AAPMP.js} +1 -1
  25. package/dist/{chunk-U3HX7WE6.js → chunk-3NBKW2QJ.js} +1 -1
  26. package/dist/{chunk-A4X2YWNQ.js → chunk-4BB7V6AI.js} +38 -301
  27. package/dist/{chunk-EJ7OWYF2.js → chunk-6E6CM7WS.js} +19 -163
  28. package/dist/{chunk-CDMB3PRC.js → chunk-6IFXWJDX.js} +7 -7
  29. package/dist/{chunk-Z67RZ4XO.js → chunk-6Q6FR4KH.js} +279 -1968
  30. package/dist/{chunk-R4QIE6UY.js → chunk-7M4KAPAA.js} +92 -31
  31. package/dist/{chunk-25DHUDOK.js → chunk-7XTZVLE6.js} +12 -3
  32. package/dist/chunk-A4KQZXZI.js +116 -0
  33. package/dist/{chunk-DUQJF7FK.js → chunk-A7YQNIQT.js} +8 -8
  34. package/dist/{chunk-XOZ3J3LB.js → chunk-AVWEIOEN.js} +1 -1
  35. package/dist/{chunk-UQXOHEQ7.js → chunk-BM5PX3DJ.js} +4 -4
  36. package/dist/{chunk-SHB5VDMH.js → chunk-BRITLL56.js} +1 -1
  37. package/dist/{chunk-JX7Y57YY.js → chunk-E4BSCXMU.js} +1 -1
  38. package/dist/{chunk-QXOFUKBF.js → chunk-E6SDW5FV.js} +168 -165
  39. package/dist/{chunk-JH556Q42.js → chunk-EDYBFSPE.js} +2 -2
  40. package/dist/{chunk-R7LWDIKB.js → chunk-EKA4ZZBI.js} +1 -1
  41. package/dist/chunk-FXMKHHPO.js +123 -0
  42. package/dist/chunk-G75ENCEZ.js +283 -0
  43. package/dist/{chunk-PLNWWGE7.js → chunk-GQJZORQP.js} +1 -1
  44. package/dist/{chunk-U3GEXWI5.js → chunk-GS6FE3IW.js} +1 -1
  45. package/dist/{chunk-Y6W4DVPS.js → chunk-HKCNZITN.js} +1 -1
  46. package/dist/{chunk-HOIHGPWO.js → chunk-IKVBTDLO.js} +1 -1
  47. package/dist/{chunk-YOL4QRSL.js → chunk-INI3TM6I.js} +2 -2
  48. package/dist/{chunk-SIKMUO45.js → chunk-IO7ZIDRP.js} +12 -12
  49. package/dist/{chunk-W7SAWBQC.js → chunk-IV7EI5E2.js} +1 -1
  50. package/dist/{chunk-TCWL4BKK.js → chunk-IYFKBFTW.js} +1 -1
  51. package/dist/{chunk-JIIIBTN2.js → chunk-J5IPIQU2.js} +1 -1
  52. package/dist/chunk-JFKL3WAE.js +161 -0
  53. package/dist/{chunk-IBRZUVTH.js → chunk-K2GOFLTX.js} +2 -2
  54. package/dist/{chunk-X3TMMIDP.js → chunk-KFH6UD26.js} +8 -8
  55. package/dist/{chunk-O6K5DWXM.js → chunk-KOEWEFHK.js} +1 -1
  56. package/dist/{chunk-VTVS4IIP.js → chunk-L3JSAB4L.js} +2 -2
  57. package/dist/{chunk-3RT6D4P6.js → chunk-N77KD7ZZ.js} +1 -1
  58. package/dist/{chunk-FLRCVYNE.js → chunk-NORZWWLK.js} +2 -2
  59. package/dist/{chunk-4VZBKOQJ.js → chunk-O3SKIXQK.js} +1 -1
  60. package/dist/{chunk-PFI3VD77.js → chunk-OLDDJS3S.js} +10 -10
  61. package/dist/{chunk-UGI77E35.js → chunk-P6E4HFFU.js} +167 -61
  62. package/dist/{chunk-GIDHR5OL.js → chunk-Q65ZQFF2.js} +1 -1
  63. package/dist/chunk-QZ3AZTXI.js +1740 -0
  64. package/dist/{chunk-NTIOLSFE.js → chunk-R7UDXKI3.js} +3 -3
  65. package/dist/{chunk-7SI7GCX6.js → chunk-RCFCZT5O.js} +6 -6
  66. package/dist/{chunk-DW32KBHN.js → chunk-RPYPW5NN.js} +13 -13
  67. package/dist/chunk-SYKKFAUW.js +3711 -0
  68. package/dist/chunk-T76PLPD6.js +57 -0
  69. package/dist/{chunk-JTAYFSLO.js → chunk-TC2FBZJZ.js} +1 -1
  70. package/dist/{chunk-Q73ISOVQ.js → chunk-U7E736AJ.js} +1 -1
  71. package/dist/chunk-USDEMXXL.js +110 -0
  72. package/dist/{chunk-UMWROSIP.js → chunk-W6HTOVHU.js} +2 -2
  73. package/dist/{chunk-STA43FMY.js → chunk-WY5OODN5.js} +71 -3855
  74. package/dist/{chunk-EZ2P7LAP.js → chunk-XDSOIJC3.js} +8 -8
  75. package/dist/{chunk-ZTZ7NCJT.js → chunk-XTFJOR3K.js} +1 -1
  76. package/dist/{chunk-CDJ7FPPJ.js → chunk-XWVGSEUT.js} +1 -1
  77. package/dist/chunk-YA62XGXS.js +45 -0
  78. package/dist/{chunk-EH4VUY27.js → chunk-YURXPGAM.js} +2 -2
  79. package/dist/{clean-P4KTCOUA.js → clean-L2E4VD57.js} +29 -20
  80. package/dist/cli.js +55 -55
  81. package/dist/{cloud-PDY7S4HU.js → cloud-IDUQRYLO.js} +7 -7
  82. package/dist/{cloudrun-54MA2W5H.js → cloudrun-R3JXWXGG.js} +11 -8
  83. package/dist/commands/layout-audit.browser.js +37 -8
  84. package/dist/commands/motion-signature.browser.js +51 -2
  85. package/dist/{compare-LDWVSPC5.js → compare-VYBWSP3Y.js} +40 -31
  86. package/dist/{compiler-CWSZ4W7J.js → compiler-ACHWOU5N.js} +7 -3
  87. package/dist/{component-FIEGC22U.js → component-PYYV2V3F.js} +4 -4
  88. package/dist/{compositions-JR7PX356.js → compositions-B5GQSXH7.js} +23 -16
  89. package/dist/{delete-FXA2IHOS.js → delete-EAX2U3WI.js} +8 -8
  90. package/dist/{deterministicFonts-GTITFRSJ.js → deterministicFonts-F6WIVL2W.js} +1 -1
  91. package/dist/{dist-OJTEVNJR.js → dist-NZSQCYOF.js} +3 -1
  92. package/dist/{dist-4JZWRWS6.js → dist-ROUDWGLO.js} +27 -15
  93. package/dist/{doctor-OTDHPM6K.js → doctor-PJX7MLFG.js} +20 -13
  94. package/dist/{events-UAFTI24U.js → events-SBC54MHO.js} +6 -22
  95. package/dist/{events-6T7M2VCO.js → events-YFFXKAQQ.js} +10 -23
  96. package/dist/{feedback-ZGZODHB6.js → feedback-UETLWREV.js} +67 -45
  97. package/dist/{figma-D26EJ7ZB.js → figma-QDSJPIRW.js} +6 -6
  98. package/dist/fontLocalizeCli.js +18 -11
  99. package/dist/{get-IAREU7IK.js → get-B5TS6C7H.js} +8 -8
  100. package/dist/{gpuPolicy-NS7WZRDJ.js → gpuPolicy-LYOVBAJP.js} +15 -8
  101. package/dist/{grade-compare-ZXHFHCD2.js → grade-compare-LBIHMAUN.js} +40 -31
  102. package/dist/{help-RVNYHW3N.js → help-XBP6A6LT.js} +4 -4
  103. package/dist/{history-THP4VNMF.js → history-2S42ZXKL.js} +12 -30
  104. package/dist/hyperframe-runtime.js +59 -59
  105. package/dist/hyperframe.manifest.json +1 -1
  106. package/dist/hyperframe.runtime.iife.js +59 -59
  107. package/dist/hyperframes-player.global.js +3 -3
  108. package/dist/{info-EOFRHN5A.js → info-I2VDAWT7.js} +17 -20
  109. package/dist/{init-YLIJE4CG.js → init-BGHSDODI.js} +48 -41
  110. package/dist/{inspect-3D56ONJD.js → inspect-MZK5B5RP.js} +39 -30
  111. package/dist/{installer-GRR2GDZK.js → installer-LL4QAKFW.js} +8 -5
  112. package/dist/{keyframes-NXNCTQPK.js → keyframes-2EBF7OSS.js} +14 -25
  113. package/dist/{lambda-VGRZD7TR.js → lambda-XKFPAOFE.js} +16 -13
  114. package/dist/{layout-Z5DOS6DU.js → layout-TP5ERKEF.js} +39 -30
  115. package/dist/{lint-YD6NJGR2.js → lint-FQ6CEI7E.js} +17 -23
  116. package/dist/{lintProject-ANMPLBIT.js → lintProject-LM3XZRPZ.js} +3 -1
  117. package/dist/{list-XGDKILYN.js → list-FRNUJXZ3.js} +8 -8
  118. package/dist/{login-GD5SA4RD.js → login-C25QU3BQ.js} +9 -9
  119. package/dist/{logout-Q654A3SI.js → logout-GJXZQKOA.js} +5 -5
  120. package/dist/{media-treatment-TY4X4GQQ.js → media-treatment-DCANGWSV.js} +21 -20
  121. package/dist/{models-MXRDH4WJ.js → models-GOD6ARB3.js} +19 -12
  122. package/dist/{motionShot-6LKR3C2E.js → motionShot-FSKETANX.js} +22 -15
  123. package/dist/{normalize-O76AC4HE.js → normalize-IGLHCWTF.js} +0 -4
  124. package/dist/{normalize-audio-5ADDZKPJ.js → normalize-audio-C2IM7OID.js} +13 -26
  125. package/dist/{open-JXAMO325.js → open-VVISXIII.js} +11 -25
  126. package/dist/{pipeline-Q5MOPIIX.js → pipeline-7YHZPYIS.js} +15 -8
  127. package/dist/{play-3SPH5GWZ.js → play-DSELK7G3.js} +38 -32
  128. package/dist/{preflight-2PWAPKWC.js → preflight-Y5DN5D37.js} +3 -18
  129. package/dist/{present-ZTJQDKXZ.js → present-N72YFDKP.js} +32 -26
  130. package/dist/{preview-4A3XZR6J.js → preview-XTYN4NJ2.js} +33 -26
  131. package/dist/{producer-5ZKKKQPB.js → producer-NDCU3MHK.js} +1 -1
  132. package/dist/{projectConfig-WA4CS4SN.js → projectConfig-MH4QU4AC.js} +10 -7
  133. package/dist/{publication-CLG2FRRI.js → publication-KUSHI5MG.js} +6 -3
  134. package/dist/{publish-YTT2WMXO.js → publish-3XEEFWMF.js} +27 -20
  135. package/dist/{refresh-K24ETHMA.js → refresh-MFITBIKV.js} +5 -5
  136. package/dist/{remove-background-W35INR3B.js → remove-background-2QKJ7XOD.js} +22 -15
  137. package/dist/{render-WUBFQMAH.js → render-2DVYTVLQ.js} +52 -32
  138. package/dist/{render-7A4P5WMU.js → render-75E342ZU.js} +10 -7
  139. package/dist/{render-KICXUPNR.js → render-S73DW4KK.js} +23 -26
  140. package/dist/{render-batch-N7EFGE6S.js → render-batch-YURBS54Q.js} +11 -8
  141. package/dist/{renderCancellation-LYQPPFAO.js → renderCancellation-373ASJTO.js} +15 -8
  142. package/dist/renderSetupWorker.js +4 -2
  143. package/dist/{resolver-YTT2NENF.js → resolver-FE3GBZ4T.js} +8 -5
  144. package/dist/{sherpa-353MW4UV.js → sherpa-B2D3AGP6.js} +16 -9
  145. package/dist/skills/hyperframes/references/capability-menu.md +1 -1
  146. package/dist/skills/hyperframes-cli/SKILL.md +5 -0
  147. package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +1 -1
  148. package/dist/skills/hyperframes-cli/references/preview-render.md +1 -1
  149. package/dist/skills/media-use/SKILL.md +9 -5
  150. package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +47 -4
  151. package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +125 -18
  152. package/dist/skills/media-use/audio/scripts/lib/host-audio.mjs +28 -0
  153. package/dist/skills/media-use/audio/scripts/lib/host-audio.test.mjs +106 -0
  154. package/dist/skills/media-use/references/setup-providers.md +16 -2
  155. package/dist/skills/media-use/scripts/lib/heygen-cli.mjs +21 -1
  156. package/dist/skills/media-use/scripts/lib/heygen-cli.test.mjs +14 -0
  157. package/dist/skills/media-use/scripts/resolve.mjs +11 -6
  158. package/dist/{skills-2XJIOEBT.js → skills-ICJ22CZZ.js} +15 -30
  159. package/dist/{skillsUpdateCheck-LMCCWGNO.js → skillsUpdateCheck-GXZN56I5.js} +3 -3
  160. package/dist/{snapshot-WBRSTLJ2.js → snapshot-XHKOAWF4.js} +41 -32
  161. package/dist/{src-ZS3BLTZ5.js → src-74PFDTDX.js} +17 -10
  162. package/dist/{src-YWFJILQF.js → src-I7UC3JTL.js} +19 -11
  163. package/dist/{staticProjectServer-4VKVHPNG.js → staticProjectServer-2DGKD6TF.js} +24 -16
  164. package/dist/{status-73MBN37B.js → status-JA6SKQVH.js} +7 -24
  165. package/dist/studio/assets/hyperframes-player-5Vx2AiUz.js +473 -0
  166. package/dist/studio/assets/{index-DsEkE5_G.js → index-BAnh7cSQ.js} +1 -1
  167. package/dist/studio/assets/{index-Br1Whc0f.js → index-C0thd4eM.js} +204 -204
  168. package/dist/studio/assets/{index-BmIPrb8I.js → index-P8fgj_Xa.js} +1 -1
  169. package/dist/studio/{chunk-E422JDF5.js → chunk-H2DUOXTF.js} +2 -1
  170. package/dist/studio/index.d.ts +19 -3
  171. package/dist/studio/index.html +1 -1
  172. package/dist/studio/index.js +6518 -5813
  173. package/dist/studio/index.js.map +1 -1
  174. package/dist/studio/player.js +1 -1
  175. package/dist/{studio-api-5V4TVSQV.js → studio-api-PROBO7JG.js} +40 -28
  176. package/dist/{studioServer-M5XY3HYC.js → studioServer-ID6UV2NE.js} +100 -69
  177. package/dist/{system-RCRNX5VF.js → system-OQLOGGPJ.js} +2 -19
  178. package/dist/{telemetry-LOBRQGUD.js → telemetry-65LFHIWH.js} +8 -23
  179. package/dist/{timeline-3JCP6PXU.js → timeline-6UV3JJXD.js} +32 -22
  180. package/dist/{tokens-MLMIJBVF.js → tokens-HIL4TZXI.js} +3 -3
  181. package/dist/{transcribe-KNFXDEAX.js → transcribe-TIO6W3EQ.js} +16 -9
  182. package/dist/{transcribe-POH25ZPX.js → transcribe-V7F6QDSN.js} +20 -44
  183. package/dist/{updateCheck-5ITBSBST.js → updateCheck-GZELANMA.js} +2 -2
  184. package/dist/{upgrade-K6OK4FKT.js → upgrade-BX3KDDZJ.js} +5 -5
  185. package/dist/{urlDownloader-TJJQKADT.js → urlDownloader-R76OHFIE.js} +14 -7
  186. package/dist/{validate-PPPOBJHB.js → validate-7UX4I443.js} +26 -19
  187. package/dist/{video-OB22HWXZ.js → video-RVGYEFQU.js} +18 -11
  188. package/package.json +1 -1
  189. package/dist/chunk-HYYSJI5D.js +0 -3742
  190. package/dist/studio/assets/hyperframes-player-CckOoCJ8.js +0 -473
  191. package/dist/{chunk-I465DBM6.js → chunk-246MOR5U.js} +3 -3
  192. package/dist/{deploy-MX76RZ36.js → deploy-5G4Z6LPA.js} +1 -1
  193. package/dist/{destroy-H2TZBYHH.js → destroy-GFQLTIY3.js} +1 -1
  194. package/dist/{docs-QAPJEGLS.js → docs-MPOM3PHH.js} +3 -3
  195. package/dist/{policies-FSDZVS2E.js → policies-4FEXMXPK.js} +3 -3
  196. package/dist/{progress-FBIEEB7Y.js → progress-5AM2MZ7V.js} +3 -3
  197. package/dist/{sites-TNVKZS73.js → sites-HZMADOA3.js} +1 -1
  198. package/dist/studio/{chunk-E422JDF5.js.map → chunk-H2DUOXTF.js.map} +0 -0
  199. package/dist/{telemetry-2YC4SGQU.js → telemetry-W5AKPI4R.js} +3 -3
  200. package/dist/{tts-FU35O6YB.js → tts-TOHSPWEG.js} +4 -4
@@ -0,0 +1,3656 @@
1
+ import { createRequire as __hf_createRequire } from "node:module";
2
+ import { fileURLToPath as __hf_fileURLToPath } from "node:url";
3
+ import { dirname as __hf_dirname } from "node:path";
4
+ var require = __hf_createRequire(import.meta.url);
5
+ var __filename = __hf_fileURLToPath(import.meta.url);
6
+ var __dirname = __hf_dirname(__filename);
7
+ import {
8
+ __commonJS,
9
+ __require
10
+ } from "./chunk-M2WBOQ2Q.js";
11
+
12
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/unesc.js
13
+ var require_unesc = __commonJS({
14
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/unesc.js"(exports) {
15
+ "use strict";
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.default = unesc;
18
+ function gobbleHex(str) {
19
+ var lower = str.toLowerCase();
20
+ var hex = "";
21
+ var spaceTerminated = false;
22
+ for (var i = 0; i < 6 && lower[i] !== void 0; i++) {
23
+ var code = lower.charCodeAt(i);
24
+ var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57;
25
+ spaceTerminated = code === 32;
26
+ if (!valid) {
27
+ break;
28
+ }
29
+ hex += lower[i];
30
+ }
31
+ if (hex.length === 0) {
32
+ return void 0;
33
+ }
34
+ var codePoint = parseInt(hex, 16);
35
+ var isSurrogate = codePoint >= 55296 && codePoint <= 57343;
36
+ if (isSurrogate || codePoint === 0 || codePoint > 1114111) {
37
+ return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)];
38
+ }
39
+ return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)];
40
+ }
41
+ var CONTAINS_ESCAPE = /\\/;
42
+ function unesc(str) {
43
+ var needToProcess = CONTAINS_ESCAPE.test(str);
44
+ if (!needToProcess) {
45
+ return str;
46
+ }
47
+ var ret = "";
48
+ for (var i = 0; i < str.length; i++) {
49
+ if (str[i] === "\\") {
50
+ var gobbled = gobbleHex(str.slice(i + 1, i + 7));
51
+ if (gobbled !== void 0) {
52
+ ret += gobbled[0];
53
+ i += gobbled[1];
54
+ continue;
55
+ }
56
+ if (str[i + 1] === "\\") {
57
+ ret += "\\";
58
+ i++;
59
+ continue;
60
+ }
61
+ if (str.length === i + 1) {
62
+ ret += str[i];
63
+ }
64
+ continue;
65
+ }
66
+ ret += str[i];
67
+ }
68
+ return ret;
69
+ }
70
+ }
71
+ });
72
+
73
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/getProp.js
74
+ var require_getProp = __commonJS({
75
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/getProp.js"(exports) {
76
+ "use strict";
77
+ Object.defineProperty(exports, "__esModule", { value: true });
78
+ exports.default = getProp;
79
+ function getProp(obj) {
80
+ var props = [];
81
+ for (var _i = 1; _i < arguments.length; _i++) {
82
+ props[_i - 1] = arguments[_i];
83
+ }
84
+ while (props.length > 0) {
85
+ var prop = props.shift();
86
+ if (!obj[prop]) {
87
+ return void 0;
88
+ }
89
+ obj = obj[prop];
90
+ }
91
+ return obj;
92
+ }
93
+ }
94
+ });
95
+
96
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/ensureObject.js
97
+ var require_ensureObject = __commonJS({
98
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/ensureObject.js"(exports) {
99
+ "use strict";
100
+ Object.defineProperty(exports, "__esModule", { value: true });
101
+ exports.default = ensureObject;
102
+ function ensureObject(obj) {
103
+ var props = [];
104
+ for (var _i = 1; _i < arguments.length; _i++) {
105
+ props[_i - 1] = arguments[_i];
106
+ }
107
+ while (props.length > 0) {
108
+ var prop = props.shift();
109
+ if (!obj[prop]) {
110
+ obj[prop] = {};
111
+ }
112
+ obj = obj[prop];
113
+ }
114
+ }
115
+ }
116
+ });
117
+
118
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/stripComments.js
119
+ var require_stripComments = __commonJS({
120
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/stripComments.js"(exports) {
121
+ "use strict";
122
+ Object.defineProperty(exports, "__esModule", { value: true });
123
+ exports.default = stripComments;
124
+ function stripComments(str) {
125
+ var s = "";
126
+ var commentStart = str.indexOf("/*");
127
+ var lastEnd = 0;
128
+ while (commentStart >= 0) {
129
+ s = s + str.slice(lastEnd, commentStart);
130
+ var commentEnd = str.indexOf("*/", commentStart + 2);
131
+ if (commentEnd < 0) {
132
+ return s;
133
+ }
134
+ lastEnd = commentEnd + 2;
135
+ commentStart = str.indexOf("/*", lastEnd);
136
+ }
137
+ s = s + str.slice(lastEnd);
138
+ return s;
139
+ }
140
+ }
141
+ });
142
+
143
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/maxNestingDepth.js
144
+ var require_maxNestingDepth = __commonJS({
145
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/maxNestingDepth.js"(exports) {
146
+ "use strict";
147
+ Object.defineProperty(exports, "__esModule", { value: true });
148
+ exports.MAX_NESTING_DEPTH = void 0;
149
+ exports.default = resolveMaxNestingDepth;
150
+ exports.MAX_NESTING_DEPTH = 256;
151
+ function resolveMaxNestingDepth(value) {
152
+ return Number.isSafeInteger(value) && value >= 0 ? value : exports.MAX_NESTING_DEPTH;
153
+ }
154
+ }
155
+ });
156
+
157
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/index.js
158
+ var require_util = __commonJS({
159
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/index.js"(exports) {
160
+ "use strict";
161
+ var __importDefault = exports && exports.__importDefault || function(mod) {
162
+ return mod && mod.__esModule ? mod : { "default": mod };
163
+ };
164
+ Object.defineProperty(exports, "__esModule", { value: true });
165
+ exports.MAX_NESTING_DEPTH = exports.resolveMaxNestingDepth = exports.stripComments = exports.ensureObject = exports.getProp = exports.unesc = void 0;
166
+ var unesc_1 = require_unesc();
167
+ Object.defineProperty(exports, "unesc", { enumerable: true, get: function() {
168
+ return __importDefault(unesc_1).default;
169
+ } });
170
+ var getProp_1 = require_getProp();
171
+ Object.defineProperty(exports, "getProp", { enumerable: true, get: function() {
172
+ return __importDefault(getProp_1).default;
173
+ } });
174
+ var ensureObject_1 = require_ensureObject();
175
+ Object.defineProperty(exports, "ensureObject", { enumerable: true, get: function() {
176
+ return __importDefault(ensureObject_1).default;
177
+ } });
178
+ var stripComments_1 = require_stripComments();
179
+ Object.defineProperty(exports, "stripComments", { enumerable: true, get: function() {
180
+ return __importDefault(stripComments_1).default;
181
+ } });
182
+ var maxNestingDepth_1 = require_maxNestingDepth();
183
+ Object.defineProperty(exports, "resolveMaxNestingDepth", { enumerable: true, get: function() {
184
+ return __importDefault(maxNestingDepth_1).default;
185
+ } });
186
+ Object.defineProperty(exports, "MAX_NESTING_DEPTH", { enumerable: true, get: function() {
187
+ return maxNestingDepth_1.MAX_NESTING_DEPTH;
188
+ } });
189
+ }
190
+ });
191
+
192
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/node.js
193
+ var require_node = __commonJS({
194
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/node.js"(exports) {
195
+ "use strict";
196
+ Object.defineProperty(exports, "__esModule", { value: true });
197
+ var util_1 = require_util();
198
+ var cloneNode = function(obj, parent, depth) {
199
+ if (depth === void 0) {
200
+ depth = 0;
201
+ }
202
+ if (depth > util_1.MAX_NESTING_DEPTH) {
203
+ throw new Error("Cannot clone selector: nesting depth exceeds the maximum of ".concat(util_1.MAX_NESTING_DEPTH, "."));
204
+ }
205
+ if (typeof obj !== "object" || obj === null) {
206
+ return obj;
207
+ }
208
+ var cloned = new obj.constructor();
209
+ for (var i in obj) {
210
+ if (!obj.hasOwnProperty(i)) {
211
+ continue;
212
+ }
213
+ var value = obj[i];
214
+ var type = typeof value;
215
+ if (i === "parent" && type === "object") {
216
+ if (parent) {
217
+ cloned[i] = parent;
218
+ }
219
+ } else if (value instanceof Array) {
220
+ cloned[i] = value.map(function(j) {
221
+ return cloneNode(j, cloned, depth + 1);
222
+ });
223
+ } else {
224
+ cloned[i] = cloneNode(value, cloned, depth + 1);
225
+ }
226
+ }
227
+ return cloned;
228
+ };
229
+ var Node = (
230
+ /** @class */
231
+ (function() {
232
+ function Node2(opts) {
233
+ if (opts === void 0) {
234
+ opts = {};
235
+ }
236
+ Object.assign(this, opts);
237
+ this.spaces = this.spaces || {};
238
+ this.spaces.before = this.spaces.before || "";
239
+ this.spaces.after = this.spaces.after || "";
240
+ }
241
+ Node2.prototype.remove = function() {
242
+ if (this.parent) {
243
+ this.parent.removeChild(this);
244
+ }
245
+ this.parent = void 0;
246
+ return this;
247
+ };
248
+ Node2.prototype.replaceWith = function() {
249
+ if (this.parent) {
250
+ for (var index in arguments) {
251
+ this.parent.insertBefore(this, arguments[index]);
252
+ }
253
+ this.remove();
254
+ }
255
+ return this;
256
+ };
257
+ Node2.prototype.next = function() {
258
+ return this.parent.at(this.parent.index(this) + 1);
259
+ };
260
+ Node2.prototype.prev = function() {
261
+ return this.parent.at(this.parent.index(this) - 1);
262
+ };
263
+ Node2.prototype.clone = function(overrides) {
264
+ if (overrides === void 0) {
265
+ overrides = {};
266
+ }
267
+ var cloned = cloneNode(this);
268
+ for (var name in overrides) {
269
+ cloned[name] = overrides[name];
270
+ }
271
+ return cloned;
272
+ };
273
+ Node2.prototype.appendToPropertyAndEscape = function(name, value, valueEscaped) {
274
+ if (!this.raws) {
275
+ this.raws = {};
276
+ }
277
+ var originalValue = this[name];
278
+ var originalEscaped = this.raws[name];
279
+ this[name] = originalValue + value;
280
+ if (originalEscaped || valueEscaped !== value) {
281
+ this.raws[name] = (originalEscaped || originalValue) + valueEscaped;
282
+ } else {
283
+ delete this.raws[name];
284
+ }
285
+ };
286
+ Node2.prototype.setPropertyAndEscape = function(name, value, valueEscaped) {
287
+ if (!this.raws) {
288
+ this.raws = {};
289
+ }
290
+ this[name] = value;
291
+ this.raws[name] = valueEscaped;
292
+ };
293
+ Node2.prototype.setPropertyWithoutEscape = function(name, value) {
294
+ this[name] = value;
295
+ if (this.raws) {
296
+ delete this.raws[name];
297
+ }
298
+ };
299
+ Node2.prototype.isAtPosition = function(line, column) {
300
+ if (this.source && this.source.start && this.source.end) {
301
+ if (this.source.start.line > line) {
302
+ return false;
303
+ }
304
+ if (this.source.end.line < line) {
305
+ return false;
306
+ }
307
+ if (this.source.start.line === line && this.source.start.column > column) {
308
+ return false;
309
+ }
310
+ if (this.source.end.line === line && this.source.end.column < column) {
311
+ return false;
312
+ }
313
+ return true;
314
+ }
315
+ return void 0;
316
+ };
317
+ Node2.prototype.stringifyProperty = function(name) {
318
+ return this.raws && this.raws[name] || this[name];
319
+ };
320
+ Object.defineProperty(Node2.prototype, "rawSpaceBefore", {
321
+ get: function() {
322
+ var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before;
323
+ if (rawSpace === void 0) {
324
+ rawSpace = this.spaces && this.spaces.before;
325
+ }
326
+ return rawSpace || "";
327
+ },
328
+ set: function(raw) {
329
+ (0, util_1.ensureObject)(this, "raws", "spaces");
330
+ this.raws.spaces.before = raw;
331
+ },
332
+ enumerable: false,
333
+ configurable: true
334
+ });
335
+ Object.defineProperty(Node2.prototype, "rawSpaceAfter", {
336
+ get: function() {
337
+ var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after;
338
+ if (rawSpace === void 0) {
339
+ rawSpace = this.spaces.after;
340
+ }
341
+ return rawSpace || "";
342
+ },
343
+ set: function(raw) {
344
+ (0, util_1.ensureObject)(this, "raws", "spaces");
345
+ this.raws.spaces.after = raw;
346
+ },
347
+ enumerable: false,
348
+ configurable: true
349
+ });
350
+ Node2.prototype.valueToString = function() {
351
+ return String(this.stringifyProperty("value"));
352
+ };
353
+ Node2.prototype.toString = function() {
354
+ return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join("");
355
+ };
356
+ Node2.prototype._stringify = function() {
357
+ return this.toString();
358
+ };
359
+ return Node2;
360
+ })()
361
+ );
362
+ exports.default = Node;
363
+ }
364
+ });
365
+
366
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/types.js
367
+ var require_types = __commonJS({
368
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/types.js"(exports) {
369
+ "use strict";
370
+ Object.defineProperty(exports, "__esModule", { value: true });
371
+ exports.UNIVERSAL = exports.ATTRIBUTE = exports.CLASS = exports.COMBINATOR = exports.COMMENT = exports.ID = exports.NESTING = exports.PSEUDO = exports.ROOT = exports.SELECTOR = exports.STRING = exports.TAG = void 0;
372
+ exports.TAG = "tag";
373
+ exports.STRING = "string";
374
+ exports.SELECTOR = "selector";
375
+ exports.ROOT = "root";
376
+ exports.PSEUDO = "pseudo";
377
+ exports.NESTING = "nesting";
378
+ exports.ID = "id";
379
+ exports.COMMENT = "comment";
380
+ exports.COMBINATOR = "combinator";
381
+ exports.CLASS = "class";
382
+ exports.ATTRIBUTE = "attribute";
383
+ exports.UNIVERSAL = "universal";
384
+ }
385
+ });
386
+
387
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/container.js
388
+ var require_container = __commonJS({
389
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/container.js"(exports) {
390
+ "use strict";
391
+ var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
392
+ var extendStatics = function(d, b) {
393
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
394
+ d2.__proto__ = b2;
395
+ } || function(d2, b2) {
396
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
397
+ };
398
+ return extendStatics(d, b);
399
+ };
400
+ return function(d, b) {
401
+ if (typeof b !== "function" && b !== null)
402
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
403
+ extendStatics(d, b);
404
+ function __() {
405
+ this.constructor = d;
406
+ }
407
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
408
+ };
409
+ })();
410
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
411
+ if (k2 === void 0) k2 = k;
412
+ var desc = Object.getOwnPropertyDescriptor(m, k);
413
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
414
+ desc = { enumerable: true, get: function() {
415
+ return m[k];
416
+ } };
417
+ }
418
+ Object.defineProperty(o, k2, desc);
419
+ }) : (function(o, m, k, k2) {
420
+ if (k2 === void 0) k2 = k;
421
+ o[k2] = m[k];
422
+ }));
423
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
424
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
425
+ }) : function(o, v) {
426
+ o["default"] = v;
427
+ });
428
+ var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function() {
429
+ var ownKeys = function(o) {
430
+ ownKeys = Object.getOwnPropertyNames || function(o2) {
431
+ var ar = [];
432
+ for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
433
+ return ar;
434
+ };
435
+ return ownKeys(o);
436
+ };
437
+ return function(mod) {
438
+ if (mod && mod.__esModule) return mod;
439
+ var result = {};
440
+ if (mod != null) {
441
+ for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
442
+ }
443
+ __setModuleDefault(result, mod);
444
+ return result;
445
+ };
446
+ })();
447
+ var __values = exports && exports.__values || function(o) {
448
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
449
+ if (m) return m.call(o);
450
+ if (o && typeof o.length === "number") return {
451
+ next: function() {
452
+ if (o && i >= o.length) o = void 0;
453
+ return { value: o && o[i++], done: !o };
454
+ }
455
+ };
456
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
457
+ };
458
+ var __read = exports && exports.__read || function(o, n) {
459
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
460
+ if (!m) return o;
461
+ var i = m.call(o), r, ar = [], e;
462
+ try {
463
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
464
+ } catch (error) {
465
+ e = { error };
466
+ } finally {
467
+ try {
468
+ if (r && !r.done && (m = i["return"])) m.call(i);
469
+ } finally {
470
+ if (e) throw e.error;
471
+ }
472
+ }
473
+ return ar;
474
+ };
475
+ var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
476
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
477
+ if (ar || !(i in from)) {
478
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
479
+ ar[i] = from[i];
480
+ }
481
+ }
482
+ return to.concat(ar || Array.prototype.slice.call(from));
483
+ };
484
+ var __importDefault = exports && exports.__importDefault || function(mod) {
485
+ return mod && mod.__esModule ? mod : { "default": mod };
486
+ };
487
+ Object.defineProperty(exports, "__esModule", { value: true });
488
+ var util_1 = require_util();
489
+ var node_1 = __importDefault(require_node());
490
+ var types = __importStar(require_types());
491
+ var Container = (
492
+ /** @class */
493
+ (function(_super) {
494
+ __extends(Container2, _super);
495
+ function Container2(opts) {
496
+ var _this = _super.call(this, opts) || this;
497
+ if (!_this.nodes) {
498
+ _this.nodes = [];
499
+ }
500
+ return _this;
501
+ }
502
+ Container2.prototype.append = function(selector) {
503
+ selector.parent = this;
504
+ this.nodes.push(selector);
505
+ return this;
506
+ };
507
+ Container2.prototype.prepend = function(selector) {
508
+ selector.parent = this;
509
+ this.nodes.unshift(selector);
510
+ for (var id in this.indexes) {
511
+ this.indexes[id]++;
512
+ }
513
+ return this;
514
+ };
515
+ Container2.prototype.at = function(index) {
516
+ return this.nodes[index];
517
+ };
518
+ Container2.prototype.index = function(child) {
519
+ if (typeof child === "number") {
520
+ return child;
521
+ }
522
+ return this.nodes.indexOf(child);
523
+ };
524
+ Object.defineProperty(Container2.prototype, "first", {
525
+ get: function() {
526
+ return this.at(0);
527
+ },
528
+ enumerable: false,
529
+ configurable: true
530
+ });
531
+ Object.defineProperty(Container2.prototype, "last", {
532
+ get: function() {
533
+ return this.at(this.length - 1);
534
+ },
535
+ enumerable: false,
536
+ configurable: true
537
+ });
538
+ Object.defineProperty(Container2.prototype, "length", {
539
+ get: function() {
540
+ return this.nodes.length;
541
+ },
542
+ enumerable: false,
543
+ configurable: true
544
+ });
545
+ Container2.prototype.removeChild = function(child) {
546
+ child = this.index(child);
547
+ this.at(child).parent = void 0;
548
+ this.nodes.splice(child, 1);
549
+ var index;
550
+ for (var id in this.indexes) {
551
+ index = this.indexes[id];
552
+ if (index >= child) {
553
+ this.indexes[id] = index - 1;
554
+ }
555
+ }
556
+ return this;
557
+ };
558
+ Container2.prototype.removeAll = function() {
559
+ var e_1, _a;
560
+ try {
561
+ for (var _b = __values(this.nodes), _c = _b.next(); !_c.done; _c = _b.next()) {
562
+ var node = _c.value;
563
+ node.parent = void 0;
564
+ }
565
+ } catch (e_1_1) {
566
+ e_1 = { error: e_1_1 };
567
+ } finally {
568
+ try {
569
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
570
+ } finally {
571
+ if (e_1) throw e_1.error;
572
+ }
573
+ }
574
+ this.nodes = [];
575
+ return this;
576
+ };
577
+ Container2.prototype.empty = function() {
578
+ return this.removeAll();
579
+ };
580
+ Container2.prototype.insertAfter = function(oldNode, newNode) {
581
+ var _a;
582
+ newNode.parent = this;
583
+ var oldIndex = this.index(oldNode);
584
+ var resetNode = [];
585
+ for (var i = 2; i < arguments.length; i++) {
586
+ resetNode.push(arguments[i]);
587
+ }
588
+ (_a = this.nodes).splice.apply(_a, __spreadArray([oldIndex + 1, 0, newNode], __read(resetNode), false));
589
+ newNode.parent = this;
590
+ var index;
591
+ for (var id in this.indexes) {
592
+ index = this.indexes[id];
593
+ if (oldIndex < index) {
594
+ this.indexes[id] = index + arguments.length - 1;
595
+ }
596
+ }
597
+ return this;
598
+ };
599
+ Container2.prototype.insertBefore = function(oldNode, newNode) {
600
+ var _a;
601
+ newNode.parent = this;
602
+ var oldIndex = this.index(oldNode);
603
+ var resetNode = [];
604
+ for (var i = 2; i < arguments.length; i++) {
605
+ resetNode.push(arguments[i]);
606
+ }
607
+ (_a = this.nodes).splice.apply(_a, __spreadArray([oldIndex, 0, newNode], __read(resetNode), false));
608
+ newNode.parent = this;
609
+ var index;
610
+ for (var id in this.indexes) {
611
+ index = this.indexes[id];
612
+ if (index >= oldIndex) {
613
+ this.indexes[id] = index + arguments.length - 1;
614
+ }
615
+ }
616
+ return this;
617
+ };
618
+ Container2.prototype._findChildAtPosition = function(line, col) {
619
+ var found = void 0;
620
+ this.each(function(node) {
621
+ if (node.atPosition) {
622
+ var foundChild = node.atPosition(line, col);
623
+ if (foundChild) {
624
+ found = foundChild;
625
+ return false;
626
+ }
627
+ } else if (node.isAtPosition(line, col)) {
628
+ found = node;
629
+ return false;
630
+ }
631
+ });
632
+ return found;
633
+ };
634
+ Container2.prototype.atPosition = function(line, col) {
635
+ if (this.isAtPosition(line, col)) {
636
+ return this._findChildAtPosition(line, col) || this;
637
+ } else {
638
+ return void 0;
639
+ }
640
+ };
641
+ Container2.prototype._inferEndPosition = function() {
642
+ if (this.last && this.last.source && this.last.source.end) {
643
+ this.source = this.source || {};
644
+ this.source.end = this.source.end || {};
645
+ Object.assign(this.source.end, this.last.source.end);
646
+ }
647
+ };
648
+ Container2.prototype.each = function(callback) {
649
+ if (!this.lastEach) {
650
+ this.lastEach = 0;
651
+ }
652
+ if (!this.indexes) {
653
+ this.indexes = {};
654
+ }
655
+ this.lastEach++;
656
+ var id = this.lastEach;
657
+ this.indexes[id] = 0;
658
+ if (!this.length) {
659
+ return void 0;
660
+ }
661
+ var index, result;
662
+ while (this.indexes[id] < this.length) {
663
+ index = this.indexes[id];
664
+ result = callback(this.at(index), index);
665
+ if (result === false) {
666
+ break;
667
+ }
668
+ this.indexes[id] += 1;
669
+ }
670
+ delete this.indexes[id];
671
+ if (result === false) {
672
+ return false;
673
+ }
674
+ };
675
+ Container2.prototype.walk = function(callback, depth) {
676
+ if (depth === void 0) {
677
+ depth = 0;
678
+ }
679
+ if (depth > util_1.MAX_NESTING_DEPTH) {
680
+ throw new Error("Cannot walk selector: nesting depth exceeds the maximum of ".concat(util_1.MAX_NESTING_DEPTH, "."));
681
+ }
682
+ return this.each(function(node, i) {
683
+ var result = callback(node, i);
684
+ if (result !== false && node.length) {
685
+ result = node.walk(callback, depth + 1);
686
+ }
687
+ if (result === false) {
688
+ return false;
689
+ }
690
+ });
691
+ };
692
+ Container2.prototype.walkAttributes = function(callback) {
693
+ var _this = this;
694
+ return this.walk(function(selector) {
695
+ if (selector.type === types.ATTRIBUTE) {
696
+ return callback.call(_this, selector);
697
+ }
698
+ });
699
+ };
700
+ Container2.prototype.walkClasses = function(callback) {
701
+ var _this = this;
702
+ return this.walk(function(selector) {
703
+ if (selector.type === types.CLASS) {
704
+ return callback.call(_this, selector);
705
+ }
706
+ });
707
+ };
708
+ Container2.prototype.walkCombinators = function(callback) {
709
+ var _this = this;
710
+ return this.walk(function(selector) {
711
+ if (selector.type === types.COMBINATOR) {
712
+ return callback.call(_this, selector);
713
+ }
714
+ });
715
+ };
716
+ Container2.prototype.walkComments = function(callback) {
717
+ var _this = this;
718
+ return this.walk(function(selector) {
719
+ if (selector.type === types.COMMENT) {
720
+ return callback.call(_this, selector);
721
+ }
722
+ });
723
+ };
724
+ Container2.prototype.walkIds = function(callback) {
725
+ var _this = this;
726
+ return this.walk(function(selector) {
727
+ if (selector.type === types.ID) {
728
+ return callback.call(_this, selector);
729
+ }
730
+ });
731
+ };
732
+ Container2.prototype.walkNesting = function(callback) {
733
+ var _this = this;
734
+ return this.walk(function(selector) {
735
+ if (selector.type === types.NESTING) {
736
+ return callback.call(_this, selector);
737
+ }
738
+ });
739
+ };
740
+ Container2.prototype.walkPseudos = function(callback) {
741
+ var _this = this;
742
+ return this.walk(function(selector) {
743
+ if (selector.type === types.PSEUDO) {
744
+ return callback.call(_this, selector);
745
+ }
746
+ });
747
+ };
748
+ Container2.prototype.walkTags = function(callback) {
749
+ var _this = this;
750
+ return this.walk(function(selector) {
751
+ if (selector.type === types.TAG) {
752
+ return callback.call(_this, selector);
753
+ }
754
+ });
755
+ };
756
+ Container2.prototype.walkUniversals = function(callback) {
757
+ var _this = this;
758
+ return this.walk(function(selector) {
759
+ if (selector.type === types.UNIVERSAL) {
760
+ return callback.call(_this, selector);
761
+ }
762
+ });
763
+ };
764
+ Container2.prototype.split = function(callback) {
765
+ var _this = this;
766
+ var current = [];
767
+ return this.reduce(function(memo, node, index) {
768
+ var split = callback.call(_this, node);
769
+ current.push(node);
770
+ if (split) {
771
+ memo.push(current);
772
+ current = [];
773
+ } else if (index === _this.length - 1) {
774
+ memo.push(current);
775
+ }
776
+ return memo;
777
+ }, []);
778
+ };
779
+ Container2.prototype.map = function(callback) {
780
+ return this.nodes.map(callback);
781
+ };
782
+ Container2.prototype.reduce = function(callback, memo) {
783
+ return this.nodes.reduce(callback, memo);
784
+ };
785
+ Container2.prototype.every = function(callback) {
786
+ return this.nodes.every(callback);
787
+ };
788
+ Container2.prototype.some = function(callback) {
789
+ return this.nodes.some(callback);
790
+ };
791
+ Container2.prototype.filter = function(callback) {
792
+ return this.nodes.filter(callback);
793
+ };
794
+ Container2.prototype.sort = function(callback) {
795
+ return this.nodes.sort(callback);
796
+ };
797
+ Container2.prototype.toString = function(options) {
798
+ if (options === void 0) {
799
+ options = {};
800
+ }
801
+ return this._stringify(options, 0, (0, util_1.resolveMaxNestingDepth)(options.maxNestingDepth));
802
+ };
803
+ Container2.prototype._stringify = function(options, depth, max) {
804
+ var _this = this;
805
+ return this.map(function(child) {
806
+ return _this._stringifyChild(child, options, depth, max);
807
+ }).join("");
808
+ };
809
+ Container2.prototype._stringifyChild = function(child, options, depth, max) {
810
+ return typeof child._stringify === "function" ? child._stringify(options, depth, max) : String(child);
811
+ };
812
+ return Container2;
813
+ })(node_1.default)
814
+ );
815
+ exports.default = Container;
816
+ }
817
+ });
818
+
819
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/root.js
820
+ var require_root = __commonJS({
821
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/root.js"(exports) {
822
+ "use strict";
823
+ var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
824
+ var extendStatics = function(d, b) {
825
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
826
+ d2.__proto__ = b2;
827
+ } || function(d2, b2) {
828
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
829
+ };
830
+ return extendStatics(d, b);
831
+ };
832
+ return function(d, b) {
833
+ if (typeof b !== "function" && b !== null)
834
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
835
+ extendStatics(d, b);
836
+ function __() {
837
+ this.constructor = d;
838
+ }
839
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
840
+ };
841
+ })();
842
+ var __importDefault = exports && exports.__importDefault || function(mod) {
843
+ return mod && mod.__esModule ? mod : { "default": mod };
844
+ };
845
+ Object.defineProperty(exports, "__esModule", { value: true });
846
+ var container_1 = __importDefault(require_container());
847
+ var types_1 = require_types();
848
+ var Root = (
849
+ /** @class */
850
+ (function(_super) {
851
+ __extends(Root2, _super);
852
+ function Root2(opts) {
853
+ var _this = _super.call(this, opts) || this;
854
+ _this.type = types_1.ROOT;
855
+ return _this;
856
+ }
857
+ Root2.prototype._stringify = function(options, depth, max) {
858
+ var _this = this;
859
+ var str = this.reduce(function(memo, selector) {
860
+ memo.push(_this._stringifyChild(selector, options, depth, max));
861
+ return memo;
862
+ }, []).join(",");
863
+ return this.trailingComma ? str + "," : str;
864
+ };
865
+ Root2.prototype.error = function(message, options) {
866
+ if (this._error) {
867
+ return this._error(message, options);
868
+ } else {
869
+ return new Error(message);
870
+ }
871
+ };
872
+ Object.defineProperty(Root2.prototype, "errorGenerator", {
873
+ set: function(handler) {
874
+ this._error = handler;
875
+ },
876
+ enumerable: false,
877
+ configurable: true
878
+ });
879
+ return Root2;
880
+ })(container_1.default)
881
+ );
882
+ exports.default = Root;
883
+ }
884
+ });
885
+
886
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/selector.js
887
+ var require_selector = __commonJS({
888
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/selector.js"(exports) {
889
+ "use strict";
890
+ var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
891
+ var extendStatics = function(d, b) {
892
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
893
+ d2.__proto__ = b2;
894
+ } || function(d2, b2) {
895
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
896
+ };
897
+ return extendStatics(d, b);
898
+ };
899
+ return function(d, b) {
900
+ if (typeof b !== "function" && b !== null)
901
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
902
+ extendStatics(d, b);
903
+ function __() {
904
+ this.constructor = d;
905
+ }
906
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
907
+ };
908
+ })();
909
+ var __importDefault = exports && exports.__importDefault || function(mod) {
910
+ return mod && mod.__esModule ? mod : { "default": mod };
911
+ };
912
+ Object.defineProperty(exports, "__esModule", { value: true });
913
+ var container_1 = __importDefault(require_container());
914
+ var types_1 = require_types();
915
+ var Selector = (
916
+ /** @class */
917
+ (function(_super) {
918
+ __extends(Selector2, _super);
919
+ function Selector2(opts) {
920
+ var _this = _super.call(this, opts) || this;
921
+ _this.type = types_1.SELECTOR;
922
+ return _this;
923
+ }
924
+ return Selector2;
925
+ })(container_1.default)
926
+ );
927
+ exports.default = Selector;
928
+ }
929
+ });
930
+
931
+ // ../../node_modules/.bun/cssesc@3.0.0/node_modules/cssesc/cssesc.js
932
+ var require_cssesc = __commonJS({
933
+ "../../node_modules/.bun/cssesc@3.0.0/node_modules/cssesc/cssesc.js"(exports, module) {
934
+ "use strict";
935
+ var object = {};
936
+ var hasOwnProperty = object.hasOwnProperty;
937
+ var merge = function merge2(options, defaults) {
938
+ if (!options) {
939
+ return defaults;
940
+ }
941
+ var result = {};
942
+ for (var key in defaults) {
943
+ result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];
944
+ }
945
+ return result;
946
+ };
947
+ var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/;
948
+ var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/;
949
+ var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
950
+ var cssesc = function cssesc2(string, options) {
951
+ options = merge(options, cssesc2.options);
952
+ if (options.quotes != "single" && options.quotes != "double") {
953
+ options.quotes = "single";
954
+ }
955
+ var quote = options.quotes == "double" ? '"' : "'";
956
+ var isIdentifier = options.isIdentifier;
957
+ var firstChar = string.charAt(0);
958
+ var output = "";
959
+ var counter = 0;
960
+ var length = string.length;
961
+ while (counter < length) {
962
+ var character = string.charAt(counter++);
963
+ var codePoint = character.charCodeAt();
964
+ var value = void 0;
965
+ if (codePoint < 32 || codePoint > 126) {
966
+ if (codePoint >= 55296 && codePoint <= 56319 && counter < length) {
967
+ var extra = string.charCodeAt(counter++);
968
+ if ((extra & 64512) == 56320) {
969
+ codePoint = ((codePoint & 1023) << 10) + (extra & 1023) + 65536;
970
+ } else {
971
+ counter--;
972
+ }
973
+ }
974
+ value = "\\" + codePoint.toString(16).toUpperCase() + " ";
975
+ } else {
976
+ if (options.escapeEverything) {
977
+ if (regexAnySingleEscape.test(character)) {
978
+ value = "\\" + character;
979
+ } else {
980
+ value = "\\" + codePoint.toString(16).toUpperCase() + " ";
981
+ }
982
+ } else if (/[\t\n\f\r\x0B]/.test(character)) {
983
+ value = "\\" + codePoint.toString(16).toUpperCase() + " ";
984
+ } else if (character == "\\" || !isIdentifier && (character == '"' && quote == character || character == "'" && quote == character) || isIdentifier && regexSingleEscape.test(character)) {
985
+ value = "\\" + character;
986
+ } else {
987
+ value = character;
988
+ }
989
+ }
990
+ output += value;
991
+ }
992
+ if (isIdentifier) {
993
+ if (/^-[-\d]/.test(output)) {
994
+ output = "\\-" + output.slice(1);
995
+ } else if (/\d/.test(firstChar)) {
996
+ output = "\\3" + firstChar + " " + output.slice(1);
997
+ }
998
+ }
999
+ output = output.replace(regexExcessiveSpaces, function($0, $1, $2) {
1000
+ if ($1 && $1.length % 2) {
1001
+ return $0;
1002
+ }
1003
+ return ($1 || "") + $2;
1004
+ });
1005
+ if (!isIdentifier && options.wrap) {
1006
+ return quote + output + quote;
1007
+ }
1008
+ return output;
1009
+ };
1010
+ cssesc.options = {
1011
+ "escapeEverything": false,
1012
+ "isIdentifier": false,
1013
+ "quotes": "single",
1014
+ "wrap": false
1015
+ };
1016
+ cssesc.version = "3.0.0";
1017
+ module.exports = cssesc;
1018
+ }
1019
+ });
1020
+
1021
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/className.js
1022
+ var require_className = __commonJS({
1023
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/className.js"(exports) {
1024
+ "use strict";
1025
+ var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
1026
+ var extendStatics = function(d, b) {
1027
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
1028
+ d2.__proto__ = b2;
1029
+ } || function(d2, b2) {
1030
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
1031
+ };
1032
+ return extendStatics(d, b);
1033
+ };
1034
+ return function(d, b) {
1035
+ if (typeof b !== "function" && b !== null)
1036
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1037
+ extendStatics(d, b);
1038
+ function __() {
1039
+ this.constructor = d;
1040
+ }
1041
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1042
+ };
1043
+ })();
1044
+ var __importDefault = exports && exports.__importDefault || function(mod) {
1045
+ return mod && mod.__esModule ? mod : { "default": mod };
1046
+ };
1047
+ Object.defineProperty(exports, "__esModule", { value: true });
1048
+ var cssesc_1 = __importDefault(require_cssesc());
1049
+ var util_1 = require_util();
1050
+ var node_1 = __importDefault(require_node());
1051
+ var types_1 = require_types();
1052
+ var ClassName = (
1053
+ /** @class */
1054
+ (function(_super) {
1055
+ __extends(ClassName2, _super);
1056
+ function ClassName2(opts) {
1057
+ var _this = _super.call(this, opts) || this;
1058
+ _this.type = types_1.CLASS;
1059
+ _this._constructed = true;
1060
+ return _this;
1061
+ }
1062
+ Object.defineProperty(ClassName2.prototype, "value", {
1063
+ get: function() {
1064
+ return this._value;
1065
+ },
1066
+ set: function(v) {
1067
+ if (this._constructed) {
1068
+ var escaped = (0, cssesc_1.default)(v, { isIdentifier: true });
1069
+ if (escaped !== v) {
1070
+ (0, util_1.ensureObject)(this, "raws");
1071
+ this.raws.value = escaped;
1072
+ } else if (this.raws) {
1073
+ delete this.raws.value;
1074
+ }
1075
+ }
1076
+ this._value = v;
1077
+ },
1078
+ enumerable: false,
1079
+ configurable: true
1080
+ });
1081
+ ClassName2.prototype.valueToString = function() {
1082
+ return "." + _super.prototype.valueToString.call(this);
1083
+ };
1084
+ return ClassName2;
1085
+ })(node_1.default)
1086
+ );
1087
+ exports.default = ClassName;
1088
+ }
1089
+ });
1090
+
1091
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/comment.js
1092
+ var require_comment = __commonJS({
1093
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/comment.js"(exports) {
1094
+ "use strict";
1095
+ var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
1096
+ var extendStatics = function(d, b) {
1097
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
1098
+ d2.__proto__ = b2;
1099
+ } || function(d2, b2) {
1100
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
1101
+ };
1102
+ return extendStatics(d, b);
1103
+ };
1104
+ return function(d, b) {
1105
+ if (typeof b !== "function" && b !== null)
1106
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1107
+ extendStatics(d, b);
1108
+ function __() {
1109
+ this.constructor = d;
1110
+ }
1111
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1112
+ };
1113
+ })();
1114
+ var __importDefault = exports && exports.__importDefault || function(mod) {
1115
+ return mod && mod.__esModule ? mod : { "default": mod };
1116
+ };
1117
+ Object.defineProperty(exports, "__esModule", { value: true });
1118
+ var node_1 = __importDefault(require_node());
1119
+ var types_1 = require_types();
1120
+ var Comment = (
1121
+ /** @class */
1122
+ (function(_super) {
1123
+ __extends(Comment2, _super);
1124
+ function Comment2(opts) {
1125
+ var _this = _super.call(this, opts) || this;
1126
+ _this.type = types_1.COMMENT;
1127
+ return _this;
1128
+ }
1129
+ return Comment2;
1130
+ })(node_1.default)
1131
+ );
1132
+ exports.default = Comment;
1133
+ }
1134
+ });
1135
+
1136
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/id.js
1137
+ var require_id = __commonJS({
1138
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/id.js"(exports) {
1139
+ "use strict";
1140
+ var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
1141
+ var extendStatics = function(d, b) {
1142
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
1143
+ d2.__proto__ = b2;
1144
+ } || function(d2, b2) {
1145
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
1146
+ };
1147
+ return extendStatics(d, b);
1148
+ };
1149
+ return function(d, b) {
1150
+ if (typeof b !== "function" && b !== null)
1151
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1152
+ extendStatics(d, b);
1153
+ function __() {
1154
+ this.constructor = d;
1155
+ }
1156
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1157
+ };
1158
+ })();
1159
+ var __importDefault = exports && exports.__importDefault || function(mod) {
1160
+ return mod && mod.__esModule ? mod : { "default": mod };
1161
+ };
1162
+ Object.defineProperty(exports, "__esModule", { value: true });
1163
+ var node_1 = __importDefault(require_node());
1164
+ var types_1 = require_types();
1165
+ var ID = (
1166
+ /** @class */
1167
+ (function(_super) {
1168
+ __extends(ID2, _super);
1169
+ function ID2(opts) {
1170
+ var _this = _super.call(this, opts) || this;
1171
+ _this.type = types_1.ID;
1172
+ return _this;
1173
+ }
1174
+ ID2.prototype.valueToString = function() {
1175
+ return "#" + _super.prototype.valueToString.call(this);
1176
+ };
1177
+ return ID2;
1178
+ })(node_1.default)
1179
+ );
1180
+ exports.default = ID;
1181
+ }
1182
+ });
1183
+
1184
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/namespace.js
1185
+ var require_namespace = __commonJS({
1186
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/namespace.js"(exports) {
1187
+ "use strict";
1188
+ var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
1189
+ var extendStatics = function(d, b) {
1190
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
1191
+ d2.__proto__ = b2;
1192
+ } || function(d2, b2) {
1193
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
1194
+ };
1195
+ return extendStatics(d, b);
1196
+ };
1197
+ return function(d, b) {
1198
+ if (typeof b !== "function" && b !== null)
1199
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1200
+ extendStatics(d, b);
1201
+ function __() {
1202
+ this.constructor = d;
1203
+ }
1204
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1205
+ };
1206
+ })();
1207
+ var __importDefault = exports && exports.__importDefault || function(mod) {
1208
+ return mod && mod.__esModule ? mod : { "default": mod };
1209
+ };
1210
+ Object.defineProperty(exports, "__esModule", { value: true });
1211
+ var cssesc_1 = __importDefault(require_cssesc());
1212
+ var util_1 = require_util();
1213
+ var node_1 = __importDefault(require_node());
1214
+ var Namespace = (
1215
+ /** @class */
1216
+ (function(_super) {
1217
+ __extends(Namespace2, _super);
1218
+ function Namespace2() {
1219
+ return _super !== null && _super.apply(this, arguments) || this;
1220
+ }
1221
+ Object.defineProperty(Namespace2.prototype, "namespace", {
1222
+ get: function() {
1223
+ return this._namespace;
1224
+ },
1225
+ set: function(namespace) {
1226
+ if (namespace === true || namespace === "*" || namespace === "&") {
1227
+ this._namespace = namespace;
1228
+ if (this.raws) {
1229
+ delete this.raws.namespace;
1230
+ }
1231
+ return;
1232
+ }
1233
+ var escaped = (0, cssesc_1.default)(namespace, { isIdentifier: true });
1234
+ this._namespace = namespace;
1235
+ if (escaped !== namespace) {
1236
+ (0, util_1.ensureObject)(this, "raws");
1237
+ this.raws.namespace = escaped;
1238
+ } else if (this.raws) {
1239
+ delete this.raws.namespace;
1240
+ }
1241
+ },
1242
+ enumerable: false,
1243
+ configurable: true
1244
+ });
1245
+ Object.defineProperty(Namespace2.prototype, "ns", {
1246
+ get: function() {
1247
+ return this._namespace;
1248
+ },
1249
+ set: function(namespace) {
1250
+ this.namespace = namespace;
1251
+ },
1252
+ enumerable: false,
1253
+ configurable: true
1254
+ });
1255
+ Object.defineProperty(Namespace2.prototype, "namespaceString", {
1256
+ get: function() {
1257
+ if (this.namespace) {
1258
+ var ns = this.stringifyProperty("namespace");
1259
+ if (ns === true) {
1260
+ return "";
1261
+ } else {
1262
+ return ns;
1263
+ }
1264
+ } else {
1265
+ return "";
1266
+ }
1267
+ },
1268
+ enumerable: false,
1269
+ configurable: true
1270
+ });
1271
+ Namespace2.prototype.qualifiedName = function(value) {
1272
+ if (this.namespace) {
1273
+ return "".concat(this.namespaceString, "|").concat(value);
1274
+ } else {
1275
+ return value;
1276
+ }
1277
+ };
1278
+ Namespace2.prototype.valueToString = function() {
1279
+ return this.qualifiedName(_super.prototype.valueToString.call(this));
1280
+ };
1281
+ return Namespace2;
1282
+ })(node_1.default)
1283
+ );
1284
+ exports.default = Namespace;
1285
+ }
1286
+ });
1287
+
1288
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/tag.js
1289
+ var require_tag = __commonJS({
1290
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/tag.js"(exports) {
1291
+ "use strict";
1292
+ var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
1293
+ var extendStatics = function(d, b) {
1294
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
1295
+ d2.__proto__ = b2;
1296
+ } || function(d2, b2) {
1297
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
1298
+ };
1299
+ return extendStatics(d, b);
1300
+ };
1301
+ return function(d, b) {
1302
+ if (typeof b !== "function" && b !== null)
1303
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1304
+ extendStatics(d, b);
1305
+ function __() {
1306
+ this.constructor = d;
1307
+ }
1308
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1309
+ };
1310
+ })();
1311
+ var __importDefault = exports && exports.__importDefault || function(mod) {
1312
+ return mod && mod.__esModule ? mod : { "default": mod };
1313
+ };
1314
+ Object.defineProperty(exports, "__esModule", { value: true });
1315
+ var namespace_1 = __importDefault(require_namespace());
1316
+ var types_1 = require_types();
1317
+ var Tag = (
1318
+ /** @class */
1319
+ (function(_super) {
1320
+ __extends(Tag2, _super);
1321
+ function Tag2(opts) {
1322
+ var _this = _super.call(this, opts) || this;
1323
+ _this.type = types_1.TAG;
1324
+ return _this;
1325
+ }
1326
+ return Tag2;
1327
+ })(namespace_1.default)
1328
+ );
1329
+ exports.default = Tag;
1330
+ }
1331
+ });
1332
+
1333
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/string.js
1334
+ var require_string = __commonJS({
1335
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/string.js"(exports) {
1336
+ "use strict";
1337
+ var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
1338
+ var extendStatics = function(d, b) {
1339
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
1340
+ d2.__proto__ = b2;
1341
+ } || function(d2, b2) {
1342
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
1343
+ };
1344
+ return extendStatics(d, b);
1345
+ };
1346
+ return function(d, b) {
1347
+ if (typeof b !== "function" && b !== null)
1348
+ throw new TypeError("Class extends value " + String2(b) + " is not a constructor or null");
1349
+ extendStatics(d, b);
1350
+ function __() {
1351
+ this.constructor = d;
1352
+ }
1353
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1354
+ };
1355
+ })();
1356
+ var __importDefault = exports && exports.__importDefault || function(mod) {
1357
+ return mod && mod.__esModule ? mod : { "default": mod };
1358
+ };
1359
+ Object.defineProperty(exports, "__esModule", { value: true });
1360
+ var node_1 = __importDefault(require_node());
1361
+ var types_1 = require_types();
1362
+ var String2 = (
1363
+ /** @class */
1364
+ (function(_super) {
1365
+ __extends(String3, _super);
1366
+ function String3(opts) {
1367
+ var _this = _super.call(this, opts) || this;
1368
+ _this.type = types_1.STRING;
1369
+ return _this;
1370
+ }
1371
+ return String3;
1372
+ })(node_1.default)
1373
+ );
1374
+ exports.default = String2;
1375
+ }
1376
+ });
1377
+
1378
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/pseudo.js
1379
+ var require_pseudo = __commonJS({
1380
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/pseudo.js"(exports) {
1381
+ "use strict";
1382
+ var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
1383
+ var extendStatics = function(d, b) {
1384
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
1385
+ d2.__proto__ = b2;
1386
+ } || function(d2, b2) {
1387
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
1388
+ };
1389
+ return extendStatics(d, b);
1390
+ };
1391
+ return function(d, b) {
1392
+ if (typeof b !== "function" && b !== null)
1393
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1394
+ extendStatics(d, b);
1395
+ function __() {
1396
+ this.constructor = d;
1397
+ }
1398
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1399
+ };
1400
+ })();
1401
+ var __importDefault = exports && exports.__importDefault || function(mod) {
1402
+ return mod && mod.__esModule ? mod : { "default": mod };
1403
+ };
1404
+ Object.defineProperty(exports, "__esModule", { value: true });
1405
+ var container_1 = __importDefault(require_container());
1406
+ var types_1 = require_types();
1407
+ var Pseudo = (
1408
+ /** @class */
1409
+ (function(_super) {
1410
+ __extends(Pseudo2, _super);
1411
+ function Pseudo2(opts) {
1412
+ var _this = _super.call(this, opts) || this;
1413
+ _this.type = types_1.PSEUDO;
1414
+ return _this;
1415
+ }
1416
+ Pseudo2.prototype._stringify = function(options, depth, max) {
1417
+ var _this = this;
1418
+ if (depth >= max) {
1419
+ throw new Error("Cannot serialize selector: nesting depth exceeds the maximum of ".concat(max, "."));
1420
+ }
1421
+ var params = this.length ? "(" + this.map(function(child) {
1422
+ return _this._stringifyChild(child, options, depth + 1, max);
1423
+ }).join(",") + ")" : "";
1424
+ return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join("");
1425
+ };
1426
+ return Pseudo2;
1427
+ })(container_1.default)
1428
+ );
1429
+ exports.default = Pseudo;
1430
+ }
1431
+ });
1432
+
1433
+ // ../../node_modules/.bun/util-deprecate@1.0.2/node_modules/util-deprecate/node.js
1434
+ var require_node2 = __commonJS({
1435
+ "../../node_modules/.bun/util-deprecate@1.0.2/node_modules/util-deprecate/node.js"(exports, module) {
1436
+ "use strict";
1437
+ module.exports = __require("util").deprecate;
1438
+ }
1439
+ });
1440
+
1441
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/attribute.js
1442
+ var require_attribute = __commonJS({
1443
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/attribute.js"(exports) {
1444
+ "use strict";
1445
+ var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
1446
+ var extendStatics = function(d, b) {
1447
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
1448
+ d2.__proto__ = b2;
1449
+ } || function(d2, b2) {
1450
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
1451
+ };
1452
+ return extendStatics(d, b);
1453
+ };
1454
+ return function(d, b) {
1455
+ if (typeof b !== "function" && b !== null)
1456
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1457
+ extendStatics(d, b);
1458
+ function __() {
1459
+ this.constructor = d;
1460
+ }
1461
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1462
+ };
1463
+ })();
1464
+ var __importDefault = exports && exports.__importDefault || function(mod) {
1465
+ return mod && mod.__esModule ? mod : { "default": mod };
1466
+ };
1467
+ var _a;
1468
+ Object.defineProperty(exports, "__esModule", { value: true });
1469
+ exports.unescapeValue = unescapeValue;
1470
+ var cssesc_1 = __importDefault(require_cssesc());
1471
+ var unesc_1 = __importDefault(require_unesc());
1472
+ var namespace_1 = __importDefault(require_namespace());
1473
+ var types_1 = require_types();
1474
+ var deprecate = require_node2();
1475
+ var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/;
1476
+ var warnOfDeprecatedValueAssignment = deprecate(function() {
1477
+ }, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead.");
1478
+ var warnOfDeprecatedQuotedAssignment = deprecate(function() {
1479
+ }, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead.");
1480
+ var warnOfDeprecatedConstructor = deprecate(function() {
1481
+ }, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");
1482
+ function unescapeValue(value) {
1483
+ var deprecatedUsage = false;
1484
+ var quoteMark = null;
1485
+ var unescaped = value;
1486
+ var m = unescaped.match(WRAPPED_IN_QUOTES);
1487
+ if (m) {
1488
+ quoteMark = m[1];
1489
+ unescaped = m[2];
1490
+ }
1491
+ unescaped = (0, unesc_1.default)(unescaped);
1492
+ if (unescaped !== value) {
1493
+ deprecatedUsage = true;
1494
+ }
1495
+ return {
1496
+ deprecatedUsage,
1497
+ unescaped,
1498
+ quoteMark
1499
+ };
1500
+ }
1501
+ function handleDeprecatedContructorOpts(opts) {
1502
+ if (opts.quoteMark !== void 0) {
1503
+ return opts;
1504
+ }
1505
+ if (opts.value === void 0) {
1506
+ return opts;
1507
+ }
1508
+ warnOfDeprecatedConstructor();
1509
+ var _a2 = unescapeValue(opts.value), quoteMark = _a2.quoteMark, unescaped = _a2.unescaped;
1510
+ if (!opts.raws) {
1511
+ opts.raws = {};
1512
+ }
1513
+ if (opts.raws.value === void 0) {
1514
+ opts.raws.value = opts.value;
1515
+ }
1516
+ opts.value = unescaped;
1517
+ opts.quoteMark = quoteMark;
1518
+ return opts;
1519
+ }
1520
+ var Attribute = (
1521
+ /** @class */
1522
+ (function(_super) {
1523
+ __extends(Attribute2, _super);
1524
+ function Attribute2(opts) {
1525
+ if (opts === void 0) {
1526
+ opts = {};
1527
+ }
1528
+ var _this = _super.call(this, handleDeprecatedContructorOpts(opts)) || this;
1529
+ _this.type = types_1.ATTRIBUTE;
1530
+ _this.raws = _this.raws || {};
1531
+ Object.defineProperty(_this.raws, "unquoted", {
1532
+ get: deprecate(function() {
1533
+ return _this.value;
1534
+ }, "attr.raws.unquoted is deprecated. Call attr.value instead."),
1535
+ set: deprecate(function() {
1536
+ return _this.value;
1537
+ }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")
1538
+ });
1539
+ _this._constructed = true;
1540
+ return _this;
1541
+ }
1542
+ Attribute2.prototype.getQuotedValue = function(options) {
1543
+ if (options === void 0) {
1544
+ options = {};
1545
+ }
1546
+ var quoteMark = this._determineQuoteMark(options);
1547
+ var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark];
1548
+ var escaped = (0, cssesc_1.default)(this._value, cssescopts);
1549
+ return escaped;
1550
+ };
1551
+ Attribute2.prototype._determineQuoteMark = function(options) {
1552
+ return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options);
1553
+ };
1554
+ Attribute2.prototype.setValue = function(value, options) {
1555
+ if (options === void 0) {
1556
+ options = {};
1557
+ }
1558
+ this._value = value;
1559
+ this._quoteMark = this._determineQuoteMark(options);
1560
+ this._syncRawValue();
1561
+ };
1562
+ Attribute2.prototype.smartQuoteMark = function(options) {
1563
+ var v = this.value;
1564
+ var numSingleQuotes = v.replace(/[^']/g, "").length;
1565
+ var numDoubleQuotes = v.replace(/[^"]/g, "").length;
1566
+ if (numSingleQuotes + numDoubleQuotes === 0) {
1567
+ var escaped = (0, cssesc_1.default)(v, { isIdentifier: true });
1568
+ if (escaped === v) {
1569
+ return Attribute2.NO_QUOTE;
1570
+ } else {
1571
+ var pref = this.preferredQuoteMark(options);
1572
+ if (pref === Attribute2.NO_QUOTE) {
1573
+ var quote = this.quoteMark || options.quoteMark || Attribute2.DOUBLE_QUOTE;
1574
+ var opts = CSSESC_QUOTE_OPTIONS[quote];
1575
+ var quoteValue = (0, cssesc_1.default)(v, opts);
1576
+ if (quoteValue.length < escaped.length) {
1577
+ return quote;
1578
+ }
1579
+ }
1580
+ return pref;
1581
+ }
1582
+ } else if (numDoubleQuotes === numSingleQuotes) {
1583
+ return this.preferredQuoteMark(options);
1584
+ } else if (numDoubleQuotes < numSingleQuotes) {
1585
+ return Attribute2.DOUBLE_QUOTE;
1586
+ } else {
1587
+ return Attribute2.SINGLE_QUOTE;
1588
+ }
1589
+ };
1590
+ Attribute2.prototype.preferredQuoteMark = function(options) {
1591
+ var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark;
1592
+ if (quoteMark === void 0) {
1593
+ quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark;
1594
+ }
1595
+ if (quoteMark === void 0) {
1596
+ quoteMark = Attribute2.DOUBLE_QUOTE;
1597
+ }
1598
+ return quoteMark;
1599
+ };
1600
+ Object.defineProperty(Attribute2.prototype, "quoted", {
1601
+ get: function() {
1602
+ var qm = this.quoteMark;
1603
+ return qm === "'" || qm === '"';
1604
+ },
1605
+ set: function(value) {
1606
+ warnOfDeprecatedQuotedAssignment();
1607
+ },
1608
+ enumerable: false,
1609
+ configurable: true
1610
+ });
1611
+ Object.defineProperty(Attribute2.prototype, "quoteMark", {
1612
+ /**
1613
+ * returns a single (`'`) or double (`"`) quote character if the value is quoted.
1614
+ * returns `null` if the value is not quoted.
1615
+ * returns `undefined` if the quotation state is unknown (this can happen when
1616
+ * the attribute is constructed without specifying a quote mark.)
1617
+ */
1618
+ get: function() {
1619
+ return this._quoteMark;
1620
+ },
1621
+ /**
1622
+ * Set the quote mark to be used by this attribute's value.
1623
+ * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute
1624
+ * value is updated accordingly.
1625
+ *
1626
+ * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted.
1627
+ */
1628
+ set: function(quoteMark) {
1629
+ if (!this._constructed) {
1630
+ this._quoteMark = quoteMark;
1631
+ return;
1632
+ }
1633
+ if (this._quoteMark !== quoteMark) {
1634
+ this._quoteMark = quoteMark;
1635
+ this._syncRawValue();
1636
+ }
1637
+ },
1638
+ enumerable: false,
1639
+ configurable: true
1640
+ });
1641
+ Attribute2.prototype._syncRawValue = function() {
1642
+ var rawValue = (0, cssesc_1.default)(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]);
1643
+ if (rawValue === this._value) {
1644
+ if (this.raws) {
1645
+ delete this.raws.value;
1646
+ }
1647
+ } else {
1648
+ this.raws.value = rawValue;
1649
+ }
1650
+ };
1651
+ Object.defineProperty(Attribute2.prototype, "qualifiedAttribute", {
1652
+ get: function() {
1653
+ return this.qualifiedName(this.raws.attribute || this.attribute);
1654
+ },
1655
+ enumerable: false,
1656
+ configurable: true
1657
+ });
1658
+ Object.defineProperty(Attribute2.prototype, "insensitiveFlag", {
1659
+ get: function() {
1660
+ return this.insensitive ? "i" : "";
1661
+ },
1662
+ enumerable: false,
1663
+ configurable: true
1664
+ });
1665
+ Object.defineProperty(Attribute2.prototype, "value", {
1666
+ get: function() {
1667
+ return this._value;
1668
+ },
1669
+ /**
1670
+ * Before 3.0, the value had to be set to an escaped value including any wrapped
1671
+ * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value
1672
+ * is unescaped during parsing and any quote marks are removed.
1673
+ *
1674
+ * Because the ambiguity of this semantic change, if you set `attr.value = newValue`,
1675
+ * a deprecation warning is raised when the new value contains any characters that would
1676
+ * require escaping (including if it contains wrapped quotes).
1677
+ *
1678
+ * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe
1679
+ * how the new value is quoted.
1680
+ */
1681
+ set: function(v) {
1682
+ if (this._constructed) {
1683
+ var _a2 = unescapeValue(v), deprecatedUsage = _a2.deprecatedUsage, unescaped = _a2.unescaped, quoteMark = _a2.quoteMark;
1684
+ if (deprecatedUsage) {
1685
+ warnOfDeprecatedValueAssignment();
1686
+ }
1687
+ if (unescaped === this._value && quoteMark === this._quoteMark) {
1688
+ return;
1689
+ }
1690
+ this._value = unescaped;
1691
+ this._quoteMark = quoteMark;
1692
+ this._syncRawValue();
1693
+ } else {
1694
+ this._value = v;
1695
+ }
1696
+ },
1697
+ enumerable: false,
1698
+ configurable: true
1699
+ });
1700
+ Object.defineProperty(Attribute2.prototype, "insensitive", {
1701
+ get: function() {
1702
+ return this._insensitive;
1703
+ },
1704
+ /**
1705
+ * Set the case insensitive flag.
1706
+ * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag`
1707
+ * of the attribute is updated accordingly.
1708
+ *
1709
+ * @param {true | false} insensitive true if the attribute should match case-insensitively.
1710
+ */
1711
+ set: function(insensitive) {
1712
+ if (!insensitive) {
1713
+ this._insensitive = false;
1714
+ if (this.raws && (this.raws.insensitiveFlag === "I" || this.raws.insensitiveFlag === "i")) {
1715
+ this.raws.insensitiveFlag = void 0;
1716
+ }
1717
+ }
1718
+ this._insensitive = insensitive;
1719
+ },
1720
+ enumerable: false,
1721
+ configurable: true
1722
+ });
1723
+ Object.defineProperty(Attribute2.prototype, "attribute", {
1724
+ get: function() {
1725
+ return this._attribute;
1726
+ },
1727
+ set: function(name) {
1728
+ this._handleEscapes("attribute", name);
1729
+ this._attribute = name;
1730
+ },
1731
+ enumerable: false,
1732
+ configurable: true
1733
+ });
1734
+ Attribute2.prototype._handleEscapes = function(prop, value) {
1735
+ if (this._constructed) {
1736
+ var escaped = (0, cssesc_1.default)(value, { isIdentifier: true });
1737
+ if (escaped !== value) {
1738
+ this.raws[prop] = escaped;
1739
+ } else {
1740
+ delete this.raws[prop];
1741
+ }
1742
+ }
1743
+ };
1744
+ Attribute2.prototype._spacesFor = function(name) {
1745
+ var attrSpaces = { before: "", after: "" };
1746
+ var spaces = this.spaces[name] || {};
1747
+ var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {};
1748
+ return Object.assign(attrSpaces, spaces, rawSpaces);
1749
+ };
1750
+ Attribute2.prototype._stringFor = function(name, spaceName, concat) {
1751
+ if (spaceName === void 0) {
1752
+ spaceName = name;
1753
+ }
1754
+ if (concat === void 0) {
1755
+ concat = defaultAttrConcat;
1756
+ }
1757
+ var attrSpaces = this._spacesFor(spaceName);
1758
+ return concat(this.stringifyProperty(name), attrSpaces);
1759
+ };
1760
+ Attribute2.prototype.offsetOf = function(name) {
1761
+ var count = 1;
1762
+ var attributeSpaces = this._spacesFor("attribute");
1763
+ count += attributeSpaces.before.length;
1764
+ if (name === "namespace" || name === "ns") {
1765
+ return this.namespace ? count : -1;
1766
+ }
1767
+ if (name === "attributeNS") {
1768
+ return count;
1769
+ }
1770
+ count += this.namespaceString.length;
1771
+ if (this.namespace) {
1772
+ count += 1;
1773
+ }
1774
+ if (name === "attribute") {
1775
+ return count;
1776
+ }
1777
+ count += this.stringifyProperty("attribute").length;
1778
+ count += attributeSpaces.after.length;
1779
+ var operatorSpaces = this._spacesFor("operator");
1780
+ count += operatorSpaces.before.length;
1781
+ var operator = this.stringifyProperty("operator");
1782
+ if (name === "operator") {
1783
+ return operator ? count : -1;
1784
+ }
1785
+ count += operator.length;
1786
+ count += operatorSpaces.after.length;
1787
+ var valueSpaces = this._spacesFor("value");
1788
+ count += valueSpaces.before.length;
1789
+ var value = this.stringifyProperty("value");
1790
+ if (name === "value") {
1791
+ return value ? count : -1;
1792
+ }
1793
+ count += value.length;
1794
+ count += valueSpaces.after.length;
1795
+ var insensitiveSpaces = this._spacesFor("insensitive");
1796
+ count += insensitiveSpaces.before.length;
1797
+ if (name === "insensitive") {
1798
+ return this.insensitive ? count : -1;
1799
+ }
1800
+ return -1;
1801
+ };
1802
+ Attribute2.prototype.toString = function() {
1803
+ var _this = this;
1804
+ var selector = [this.rawSpaceBefore, "["];
1805
+ selector.push(this._stringFor("qualifiedAttribute", "attribute"));
1806
+ if (this.operator && (this.value || this.value === "")) {
1807
+ selector.push(this._stringFor("operator"));
1808
+ selector.push(this._stringFor("value"));
1809
+ selector.push(this._stringFor("insensitiveFlag", "insensitive", function(attrValue, attrSpaces) {
1810
+ if (attrValue.length > 0 && !_this.quoted && attrSpaces.before.length === 0 && !(_this.spaces.value && _this.spaces.value.after)) {
1811
+ attrSpaces.before = " ";
1812
+ }
1813
+ return defaultAttrConcat(attrValue, attrSpaces);
1814
+ }));
1815
+ }
1816
+ selector.push("]");
1817
+ selector.push(this.rawSpaceAfter);
1818
+ return selector.join("");
1819
+ };
1820
+ Attribute2.NO_QUOTE = null;
1821
+ Attribute2.SINGLE_QUOTE = "'";
1822
+ Attribute2.DOUBLE_QUOTE = '"';
1823
+ return Attribute2;
1824
+ })(namespace_1.default)
1825
+ );
1826
+ exports.default = Attribute;
1827
+ var CSSESC_QUOTE_OPTIONS = (_a = {
1828
+ "'": { quotes: "single", wrap: true },
1829
+ '"': { quotes: "double", wrap: true }
1830
+ }, _a[null] = { isIdentifier: true }, _a);
1831
+ function defaultAttrConcat(attrValue, attrSpaces) {
1832
+ return "".concat(attrSpaces.before).concat(attrValue).concat(attrSpaces.after);
1833
+ }
1834
+ }
1835
+ });
1836
+
1837
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/universal.js
1838
+ var require_universal = __commonJS({
1839
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/universal.js"(exports) {
1840
+ "use strict";
1841
+ var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
1842
+ var extendStatics = function(d, b) {
1843
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
1844
+ d2.__proto__ = b2;
1845
+ } || function(d2, b2) {
1846
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
1847
+ };
1848
+ return extendStatics(d, b);
1849
+ };
1850
+ return function(d, b) {
1851
+ if (typeof b !== "function" && b !== null)
1852
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1853
+ extendStatics(d, b);
1854
+ function __() {
1855
+ this.constructor = d;
1856
+ }
1857
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1858
+ };
1859
+ })();
1860
+ var __importDefault = exports && exports.__importDefault || function(mod) {
1861
+ return mod && mod.__esModule ? mod : { "default": mod };
1862
+ };
1863
+ Object.defineProperty(exports, "__esModule", { value: true });
1864
+ var namespace_1 = __importDefault(require_namespace());
1865
+ var types_1 = require_types();
1866
+ var Universal = (
1867
+ /** @class */
1868
+ (function(_super) {
1869
+ __extends(Universal2, _super);
1870
+ function Universal2(opts) {
1871
+ var _this = _super.call(this, opts) || this;
1872
+ _this.type = types_1.UNIVERSAL;
1873
+ _this.value = "*";
1874
+ return _this;
1875
+ }
1876
+ return Universal2;
1877
+ })(namespace_1.default)
1878
+ );
1879
+ exports.default = Universal;
1880
+ }
1881
+ });
1882
+
1883
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/combinator.js
1884
+ var require_combinator = __commonJS({
1885
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/combinator.js"(exports) {
1886
+ "use strict";
1887
+ var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
1888
+ var extendStatics = function(d, b) {
1889
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
1890
+ d2.__proto__ = b2;
1891
+ } || function(d2, b2) {
1892
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
1893
+ };
1894
+ return extendStatics(d, b);
1895
+ };
1896
+ return function(d, b) {
1897
+ if (typeof b !== "function" && b !== null)
1898
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1899
+ extendStatics(d, b);
1900
+ function __() {
1901
+ this.constructor = d;
1902
+ }
1903
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1904
+ };
1905
+ })();
1906
+ var __importDefault = exports && exports.__importDefault || function(mod) {
1907
+ return mod && mod.__esModule ? mod : { "default": mod };
1908
+ };
1909
+ Object.defineProperty(exports, "__esModule", { value: true });
1910
+ var node_1 = __importDefault(require_node());
1911
+ var types_1 = require_types();
1912
+ var Combinator = (
1913
+ /** @class */
1914
+ (function(_super) {
1915
+ __extends(Combinator2, _super);
1916
+ function Combinator2(opts) {
1917
+ var _this = _super.call(this, opts) || this;
1918
+ _this.type = types_1.COMBINATOR;
1919
+ return _this;
1920
+ }
1921
+ return Combinator2;
1922
+ })(node_1.default)
1923
+ );
1924
+ exports.default = Combinator;
1925
+ }
1926
+ });
1927
+
1928
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/nesting.js
1929
+ var require_nesting = __commonJS({
1930
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/nesting.js"(exports) {
1931
+ "use strict";
1932
+ var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
1933
+ var extendStatics = function(d, b) {
1934
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
1935
+ d2.__proto__ = b2;
1936
+ } || function(d2, b2) {
1937
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
1938
+ };
1939
+ return extendStatics(d, b);
1940
+ };
1941
+ return function(d, b) {
1942
+ if (typeof b !== "function" && b !== null)
1943
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1944
+ extendStatics(d, b);
1945
+ function __() {
1946
+ this.constructor = d;
1947
+ }
1948
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1949
+ };
1950
+ })();
1951
+ var __importDefault = exports && exports.__importDefault || function(mod) {
1952
+ return mod && mod.__esModule ? mod : { "default": mod };
1953
+ };
1954
+ Object.defineProperty(exports, "__esModule", { value: true });
1955
+ var node_1 = __importDefault(require_node());
1956
+ var types_1 = require_types();
1957
+ var Nesting = (
1958
+ /** @class */
1959
+ (function(_super) {
1960
+ __extends(Nesting2, _super);
1961
+ function Nesting2(opts) {
1962
+ var _this = _super.call(this, opts) || this;
1963
+ _this.type = types_1.NESTING;
1964
+ _this.value = "&";
1965
+ return _this;
1966
+ }
1967
+ return Nesting2;
1968
+ })(node_1.default)
1969
+ );
1970
+ exports.default = Nesting;
1971
+ }
1972
+ });
1973
+
1974
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/sortAscending.js
1975
+ var require_sortAscending = __commonJS({
1976
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/sortAscending.js"(exports) {
1977
+ "use strict";
1978
+ Object.defineProperty(exports, "__esModule", { value: true });
1979
+ exports.default = sortAscending;
1980
+ function sortAscending(list) {
1981
+ return list.sort(function(a, b) {
1982
+ return a - b;
1983
+ });
1984
+ }
1985
+ }
1986
+ });
1987
+
1988
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/tokenTypes.js
1989
+ var require_tokenTypes = __commonJS({
1990
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/tokenTypes.js"(exports) {
1991
+ "use strict";
1992
+ Object.defineProperty(exports, "__esModule", { value: true });
1993
+ exports.combinator = exports.word = exports.comment = exports.str = exports.tab = exports.newline = exports.feed = exports.cr = exports.backslash = exports.bang = exports.slash = exports.doubleQuote = exports.singleQuote = exports.space = exports.greaterThan = exports.pipe = exports.equals = exports.plus = exports.caret = exports.tilde = exports.dollar = exports.closeSquare = exports.openSquare = exports.closeParenthesis = exports.openParenthesis = exports.semicolon = exports.colon = exports.comma = exports.at = exports.asterisk = exports.ampersand = void 0;
1994
+ exports.ampersand = 38;
1995
+ exports.asterisk = 42;
1996
+ exports.at = 64;
1997
+ exports.comma = 44;
1998
+ exports.colon = 58;
1999
+ exports.semicolon = 59;
2000
+ exports.openParenthesis = 40;
2001
+ exports.closeParenthesis = 41;
2002
+ exports.openSquare = 91;
2003
+ exports.closeSquare = 93;
2004
+ exports.dollar = 36;
2005
+ exports.tilde = 126;
2006
+ exports.caret = 94;
2007
+ exports.plus = 43;
2008
+ exports.equals = 61;
2009
+ exports.pipe = 124;
2010
+ exports.greaterThan = 62;
2011
+ exports.space = 32;
2012
+ exports.singleQuote = 39;
2013
+ exports.doubleQuote = 34;
2014
+ exports.slash = 47;
2015
+ exports.bang = 33;
2016
+ exports.backslash = 92;
2017
+ exports.cr = 13;
2018
+ exports.feed = 12;
2019
+ exports.newline = 10;
2020
+ exports.tab = 9;
2021
+ exports.str = exports.singleQuote;
2022
+ exports.comment = -1;
2023
+ exports.word = -2;
2024
+ exports.combinator = -3;
2025
+ }
2026
+ });
2027
+
2028
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/tokenize.js
2029
+ var require_tokenize = __commonJS({
2030
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/tokenize.js"(exports) {
2031
+ "use strict";
2032
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
2033
+ if (k2 === void 0) k2 = k;
2034
+ var desc = Object.getOwnPropertyDescriptor(m, k);
2035
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2036
+ desc = { enumerable: true, get: function() {
2037
+ return m[k];
2038
+ } };
2039
+ }
2040
+ Object.defineProperty(o, k2, desc);
2041
+ }) : (function(o, m, k, k2) {
2042
+ if (k2 === void 0) k2 = k;
2043
+ o[k2] = m[k];
2044
+ }));
2045
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
2046
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
2047
+ }) : function(o, v) {
2048
+ o["default"] = v;
2049
+ });
2050
+ var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function() {
2051
+ var ownKeys = function(o) {
2052
+ ownKeys = Object.getOwnPropertyNames || function(o2) {
2053
+ var ar = [];
2054
+ for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
2055
+ return ar;
2056
+ };
2057
+ return ownKeys(o);
2058
+ };
2059
+ return function(mod) {
2060
+ if (mod && mod.__esModule) return mod;
2061
+ var result = {};
2062
+ if (mod != null) {
2063
+ for (var k = ownKeys(mod), i2 = 0; i2 < k.length; i2++) if (k[i2] !== "default") __createBinding(result, mod, k[i2]);
2064
+ }
2065
+ __setModuleDefault(result, mod);
2066
+ return result;
2067
+ };
2068
+ })();
2069
+ var _a;
2070
+ var _b;
2071
+ Object.defineProperty(exports, "__esModule", { value: true });
2072
+ exports.FIELDS = void 0;
2073
+ exports.default = tokenize;
2074
+ var t = __importStar(require_tokenTypes());
2075
+ var unescapable = (_a = {}, _a[t.tab] = true, _a[t.newline] = true, _a[t.cr] = true, _a[t.feed] = true, _a);
2076
+ var wordDelimiters = (_b = {}, _b[t.space] = true, _b[t.tab] = true, _b[t.newline] = true, _b[t.cr] = true, _b[t.feed] = true, _b[t.ampersand] = true, _b[t.asterisk] = true, _b[t.bang] = true, _b[t.comma] = true, _b[t.colon] = true, _b[t.semicolon] = true, _b[t.openParenthesis] = true, _b[t.closeParenthesis] = true, _b[t.openSquare] = true, _b[t.closeSquare] = true, _b[t.singleQuote] = true, _b[t.doubleQuote] = true, _b[t.plus] = true, _b[t.pipe] = true, _b[t.tilde] = true, _b[t.greaterThan] = true, _b[t.equals] = true, _b[t.dollar] = true, _b[t.caret] = true, _b[t.slash] = true, _b);
2077
+ var hex = {};
2078
+ var hexChars = "0123456789abcdefABCDEF";
2079
+ for (i = 0; i < hexChars.length; i++) {
2080
+ hex[hexChars.charCodeAt(i)] = true;
2081
+ }
2082
+ var i;
2083
+ function consumeWord(css, start) {
2084
+ var next = start;
2085
+ var code;
2086
+ do {
2087
+ code = css.charCodeAt(next);
2088
+ if (wordDelimiters[code]) {
2089
+ return next - 1;
2090
+ } else if (code === t.backslash) {
2091
+ next = consumeEscape(css, next) + 1;
2092
+ } else {
2093
+ next++;
2094
+ }
2095
+ } while (next < css.length);
2096
+ return next - 1;
2097
+ }
2098
+ function consumeEscape(css, start) {
2099
+ var next = start;
2100
+ var code = css.charCodeAt(next + 1);
2101
+ if (unescapable[code]) {
2102
+ } else if (hex[code]) {
2103
+ var hexDigits = 0;
2104
+ do {
2105
+ next++;
2106
+ hexDigits++;
2107
+ code = css.charCodeAt(next + 1);
2108
+ } while (hex[code] && hexDigits < 6);
2109
+ if (hexDigits < 6 && code === t.space) {
2110
+ next++;
2111
+ }
2112
+ } else {
2113
+ next++;
2114
+ }
2115
+ return next;
2116
+ }
2117
+ exports.FIELDS = {
2118
+ TYPE: 0,
2119
+ START_LINE: 1,
2120
+ START_COL: 2,
2121
+ END_LINE: 3,
2122
+ END_COL: 4,
2123
+ START_POS: 5,
2124
+ END_POS: 6
2125
+ };
2126
+ function tokenize(input) {
2127
+ var tokens = [];
2128
+ var css = input.css.valueOf();
2129
+ var length = css.length;
2130
+ var offset = -1;
2131
+ var line = 1;
2132
+ var start = 0;
2133
+ var end = 0;
2134
+ var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType;
2135
+ function unclosed(what, fix) {
2136
+ if (input.safe) {
2137
+ css += fix;
2138
+ next = css.length - 1;
2139
+ } else {
2140
+ throw input.error("Unclosed " + what, line, start - offset, start);
2141
+ }
2142
+ }
2143
+ while (start < length) {
2144
+ code = css.charCodeAt(start);
2145
+ if (code === t.newline) {
2146
+ offset = start;
2147
+ line += 1;
2148
+ }
2149
+ switch (code) {
2150
+ case t.space:
2151
+ case t.tab:
2152
+ case t.newline:
2153
+ case t.cr:
2154
+ case t.feed:
2155
+ next = start;
2156
+ do {
2157
+ next += 1;
2158
+ code = css.charCodeAt(next);
2159
+ if (code === t.newline) {
2160
+ offset = next;
2161
+ line += 1;
2162
+ }
2163
+ } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed);
2164
+ tokenType = t.space;
2165
+ endLine = line;
2166
+ endColumn = next - offset - 1;
2167
+ end = next;
2168
+ break;
2169
+ case t.plus:
2170
+ case t.greaterThan:
2171
+ case t.tilde:
2172
+ case t.pipe:
2173
+ next = start;
2174
+ do {
2175
+ next += 1;
2176
+ code = css.charCodeAt(next);
2177
+ } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe);
2178
+ tokenType = t.combinator;
2179
+ endLine = line;
2180
+ endColumn = start - offset;
2181
+ end = next;
2182
+ break;
2183
+ // Consume these characters as single tokens.
2184
+ case t.asterisk:
2185
+ case t.ampersand:
2186
+ case t.bang:
2187
+ case t.comma:
2188
+ case t.equals:
2189
+ case t.dollar:
2190
+ case t.caret:
2191
+ case t.openSquare:
2192
+ case t.closeSquare:
2193
+ case t.colon:
2194
+ case t.semicolon:
2195
+ case t.openParenthesis:
2196
+ case t.closeParenthesis:
2197
+ next = start;
2198
+ tokenType = code;
2199
+ endLine = line;
2200
+ endColumn = start - offset;
2201
+ end = next + 1;
2202
+ break;
2203
+ case t.singleQuote:
2204
+ case t.doubleQuote:
2205
+ quote = code === t.singleQuote ? "'" : '"';
2206
+ next = start;
2207
+ do {
2208
+ escaped = false;
2209
+ next = css.indexOf(quote, next + 1);
2210
+ if (next === -1) {
2211
+ unclosed("quote", quote);
2212
+ }
2213
+ escapePos = next;
2214
+ while (css.charCodeAt(escapePos - 1) === t.backslash) {
2215
+ escapePos -= 1;
2216
+ escaped = !escaped;
2217
+ }
2218
+ } while (escaped);
2219
+ tokenType = t.str;
2220
+ endLine = line;
2221
+ endColumn = start - offset;
2222
+ end = next + 1;
2223
+ break;
2224
+ default:
2225
+ if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) {
2226
+ next = css.indexOf("*/", start + 2) + 1;
2227
+ if (next === 0) {
2228
+ unclosed("comment", "*/");
2229
+ }
2230
+ content = css.slice(start, next + 1);
2231
+ lines = content.split("\n");
2232
+ last = lines.length - 1;
2233
+ if (last > 0) {
2234
+ nextLine = line + last;
2235
+ nextOffset = next - lines[last].length;
2236
+ } else {
2237
+ nextLine = line;
2238
+ nextOffset = offset;
2239
+ }
2240
+ tokenType = t.comment;
2241
+ line = nextLine;
2242
+ endLine = nextLine;
2243
+ endColumn = next - nextOffset;
2244
+ } else if (code === t.slash) {
2245
+ next = start;
2246
+ tokenType = code;
2247
+ endLine = line;
2248
+ endColumn = start - offset;
2249
+ end = next + 1;
2250
+ } else {
2251
+ next = consumeWord(css, start);
2252
+ tokenType = t.word;
2253
+ endLine = line;
2254
+ endColumn = next - offset;
2255
+ }
2256
+ end = next + 1;
2257
+ break;
2258
+ }
2259
+ tokens.push([
2260
+ tokenType,
2261
+ // [0] Token type
2262
+ line,
2263
+ // [1] Starting line
2264
+ start - offset,
2265
+ // [2] Starting column
2266
+ endLine,
2267
+ // [3] Ending line
2268
+ endColumn,
2269
+ // [4] Ending column
2270
+ start,
2271
+ // [5] Start position / Source index
2272
+ end
2273
+ // [6] End position
2274
+ ]);
2275
+ if (nextOffset) {
2276
+ offset = nextOffset;
2277
+ nextOffset = null;
2278
+ }
2279
+ start = end;
2280
+ }
2281
+ return tokens;
2282
+ }
2283
+ }
2284
+ });
2285
+
2286
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/parser.js
2287
+ var require_parser = __commonJS({
2288
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/parser.js"(exports) {
2289
+ "use strict";
2290
+ var __assign = exports && exports.__assign || function() {
2291
+ __assign = Object.assign || function(t) {
2292
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
2293
+ s = arguments[i];
2294
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
2295
+ t[p] = s[p];
2296
+ }
2297
+ return t;
2298
+ };
2299
+ return __assign.apply(this, arguments);
2300
+ };
2301
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
2302
+ if (k2 === void 0) k2 = k;
2303
+ var desc = Object.getOwnPropertyDescriptor(m, k);
2304
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2305
+ desc = { enumerable: true, get: function() {
2306
+ return m[k];
2307
+ } };
2308
+ }
2309
+ Object.defineProperty(o, k2, desc);
2310
+ }) : (function(o, m, k, k2) {
2311
+ if (k2 === void 0) k2 = k;
2312
+ o[k2] = m[k];
2313
+ }));
2314
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
2315
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
2316
+ }) : function(o, v) {
2317
+ o["default"] = v;
2318
+ });
2319
+ var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function() {
2320
+ var ownKeys = function(o) {
2321
+ ownKeys = Object.getOwnPropertyNames || function(o2) {
2322
+ var ar = [];
2323
+ for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
2324
+ return ar;
2325
+ };
2326
+ return ownKeys(o);
2327
+ };
2328
+ return function(mod) {
2329
+ if (mod && mod.__esModule) return mod;
2330
+ var result = {};
2331
+ if (mod != null) {
2332
+ for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
2333
+ }
2334
+ __setModuleDefault(result, mod);
2335
+ return result;
2336
+ };
2337
+ })();
2338
+ var __read = exports && exports.__read || function(o, n) {
2339
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
2340
+ if (!m) return o;
2341
+ var i = m.call(o), r, ar = [], e;
2342
+ try {
2343
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
2344
+ } catch (error) {
2345
+ e = { error };
2346
+ } finally {
2347
+ try {
2348
+ if (r && !r.done && (m = i["return"])) m.call(i);
2349
+ } finally {
2350
+ if (e) throw e.error;
2351
+ }
2352
+ }
2353
+ return ar;
2354
+ };
2355
+ var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
2356
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
2357
+ if (ar || !(i in from)) {
2358
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
2359
+ ar[i] = from[i];
2360
+ }
2361
+ }
2362
+ return to.concat(ar || Array.prototype.slice.call(from));
2363
+ };
2364
+ var __importDefault = exports && exports.__importDefault || function(mod) {
2365
+ return mod && mod.__esModule ? mod : { "default": mod };
2366
+ };
2367
+ var _a;
2368
+ var _b;
2369
+ Object.defineProperty(exports, "__esModule", { value: true });
2370
+ var root_1 = __importDefault(require_root());
2371
+ var selector_1 = __importDefault(require_selector());
2372
+ var className_1 = __importDefault(require_className());
2373
+ var comment_1 = __importDefault(require_comment());
2374
+ var id_1 = __importDefault(require_id());
2375
+ var tag_1 = __importDefault(require_tag());
2376
+ var string_1 = __importDefault(require_string());
2377
+ var pseudo_1 = __importDefault(require_pseudo());
2378
+ var attribute_1 = __importStar(require_attribute());
2379
+ var universal_1 = __importDefault(require_universal());
2380
+ var combinator_1 = __importDefault(require_combinator());
2381
+ var nesting_1 = __importDefault(require_nesting());
2382
+ var sortAscending_1 = __importDefault(require_sortAscending());
2383
+ var tokenize_1 = __importStar(require_tokenize());
2384
+ var tokens = __importStar(require_tokenTypes());
2385
+ var types = __importStar(require_types());
2386
+ var util_1 = require_util();
2387
+ var WHITESPACE_TOKENS = (_a = {}, _a[tokens.space] = true, _a[tokens.cr] = true, _a[tokens.feed] = true, _a[tokens.newline] = true, _a[tokens.tab] = true, _a);
2388
+ var WHITESPACE_EQUIV_TOKENS = __assign(__assign({}, WHITESPACE_TOKENS), (_b = {}, _b[tokens.comment] = true, _b));
2389
+ function tokenStart(token) {
2390
+ return {
2391
+ line: token[tokenize_1.FIELDS.START_LINE],
2392
+ column: token[tokenize_1.FIELDS.START_COL]
2393
+ };
2394
+ }
2395
+ function tokenEnd(token) {
2396
+ return {
2397
+ line: token[tokenize_1.FIELDS.END_LINE],
2398
+ column: token[tokenize_1.FIELDS.END_COL]
2399
+ };
2400
+ }
2401
+ function getSource(startLine, startColumn, endLine, endColumn) {
2402
+ return {
2403
+ start: {
2404
+ line: startLine,
2405
+ column: startColumn
2406
+ },
2407
+ end: {
2408
+ line: endLine,
2409
+ column: endColumn
2410
+ }
2411
+ };
2412
+ }
2413
+ function getTokenSource(token) {
2414
+ return getSource(token[tokenize_1.FIELDS.START_LINE], token[tokenize_1.FIELDS.START_COL], token[tokenize_1.FIELDS.END_LINE], token[tokenize_1.FIELDS.END_COL]);
2415
+ }
2416
+ function getTokenSourceSpan(startToken, endToken) {
2417
+ if (!startToken) {
2418
+ return void 0;
2419
+ }
2420
+ return getSource(startToken[tokenize_1.FIELDS.START_LINE], startToken[tokenize_1.FIELDS.START_COL], endToken[tokenize_1.FIELDS.END_LINE], endToken[tokenize_1.FIELDS.END_COL]);
2421
+ }
2422
+ function unescapeProp(node, prop) {
2423
+ var value = node[prop];
2424
+ if (typeof value !== "string") {
2425
+ return;
2426
+ }
2427
+ if (value.indexOf("\\") !== -1) {
2428
+ (0, util_1.ensureObject)(node, "raws");
2429
+ node[prop] = (0, util_1.unesc)(value);
2430
+ if (node.raws[prop] === void 0) {
2431
+ node.raws[prop] = value;
2432
+ }
2433
+ }
2434
+ return node;
2435
+ }
2436
+ function indexesOf(array, item) {
2437
+ var i = -1;
2438
+ var indexes = [];
2439
+ while ((i = array.indexOf(item, i + 1)) !== -1) {
2440
+ indexes.push(i);
2441
+ }
2442
+ return indexes;
2443
+ }
2444
+ function uniqs() {
2445
+ var list = Array.prototype.concat.apply([], arguments);
2446
+ return list.filter(function(item, i) {
2447
+ return i === list.indexOf(item);
2448
+ });
2449
+ }
2450
+ var Parser = (
2451
+ /** @class */
2452
+ (function() {
2453
+ function Parser2(rule, options) {
2454
+ if (options === void 0) {
2455
+ options = {};
2456
+ }
2457
+ this.rule = rule;
2458
+ this.options = Object.assign({ lossy: false, safe: false }, options);
2459
+ this.position = 0;
2460
+ this.nestingDepth = 0;
2461
+ this.maxNestingDepth = (0, util_1.resolveMaxNestingDepth)(this.options.maxNestingDepth);
2462
+ this.css = typeof this.rule === "string" ? this.rule : this.rule.selector;
2463
+ this.tokens = (0, tokenize_1.default)({
2464
+ css: this.css,
2465
+ error: this._errorGenerator(),
2466
+ safe: this.options.safe
2467
+ });
2468
+ var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]);
2469
+ this.root = new root_1.default({ source: rootSource });
2470
+ this.root.errorGenerator = this._errorGenerator();
2471
+ var selector = new selector_1.default({
2472
+ source: { start: { line: 1, column: 1 } },
2473
+ sourceIndex: 0
2474
+ });
2475
+ this.root.append(selector);
2476
+ this.current = selector;
2477
+ this.loop();
2478
+ }
2479
+ Parser2.prototype._errorGenerator = function() {
2480
+ var _this = this;
2481
+ return function(message, errorOptions) {
2482
+ if (typeof _this.rule === "string") {
2483
+ return new Error(message);
2484
+ }
2485
+ return _this.rule.error(message, errorOptions);
2486
+ };
2487
+ };
2488
+ Parser2.prototype.attribute = function() {
2489
+ var attr = [];
2490
+ var startingToken = this.currToken;
2491
+ this.position++;
2492
+ while (this.position < this.tokens.length && this.currToken[tokenize_1.FIELDS.TYPE] !== tokens.closeSquare) {
2493
+ attr.push(this.currToken);
2494
+ this.position++;
2495
+ }
2496
+ if (this.currToken[tokenize_1.FIELDS.TYPE] !== tokens.closeSquare) {
2497
+ return this.expected("closing square bracket", this.currToken[tokenize_1.FIELDS.START_POS]);
2498
+ }
2499
+ var len = attr.length;
2500
+ var node = {
2501
+ source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]),
2502
+ sourceIndex: startingToken[tokenize_1.FIELDS.START_POS]
2503
+ };
2504
+ if (len === 1 && !~[tokens.word].indexOf(attr[0][tokenize_1.FIELDS.TYPE])) {
2505
+ return this.expected("attribute", attr[0][tokenize_1.FIELDS.START_POS]);
2506
+ }
2507
+ var pos = 0;
2508
+ var spaceBefore = "";
2509
+ var commentBefore = "";
2510
+ var lastAdded = null;
2511
+ var spaceAfterMeaningfulToken = false;
2512
+ while (pos < len) {
2513
+ var token = attr[pos];
2514
+ var content = this.content(token);
2515
+ var next = attr[pos + 1];
2516
+ switch (token[tokenize_1.FIELDS.TYPE]) {
2517
+ case tokens.space:
2518
+ spaceAfterMeaningfulToken = true;
2519
+ if (this.options.lossy) {
2520
+ break;
2521
+ }
2522
+ if (lastAdded) {
2523
+ (0, util_1.ensureObject)(node, "spaces", lastAdded);
2524
+ var prevContent = node.spaces[lastAdded].after || "";
2525
+ node.spaces[lastAdded].after = prevContent + content;
2526
+ var existingComment = (0, util_1.getProp)(node, "raws", "spaces", lastAdded, "after") || null;
2527
+ if (existingComment) {
2528
+ node.raws.spaces[lastAdded].after = existingComment + content;
2529
+ }
2530
+ } else {
2531
+ spaceBefore = spaceBefore + content;
2532
+ commentBefore = commentBefore + content;
2533
+ }
2534
+ break;
2535
+ case tokens.asterisk:
2536
+ if (next[tokenize_1.FIELDS.TYPE] === tokens.equals) {
2537
+ node.operator = content;
2538
+ lastAdded = "operator";
2539
+ } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) {
2540
+ if (spaceBefore) {
2541
+ (0, util_1.ensureObject)(node, "spaces", "attribute");
2542
+ node.spaces.attribute.before = spaceBefore;
2543
+ spaceBefore = "";
2544
+ }
2545
+ if (commentBefore) {
2546
+ (0, util_1.ensureObject)(node, "raws", "spaces", "attribute");
2547
+ node.raws.spaces.attribute.before = spaceBefore;
2548
+ commentBefore = "";
2549
+ }
2550
+ node.namespace = (node.namespace || "") + content;
2551
+ var rawValue = (0, util_1.getProp)(node, "raws", "namespace") || null;
2552
+ if (rawValue) {
2553
+ node.raws.namespace += content;
2554
+ }
2555
+ lastAdded = "namespace";
2556
+ }
2557
+ spaceAfterMeaningfulToken = false;
2558
+ break;
2559
+ case tokens.dollar:
2560
+ if (lastAdded === "value") {
2561
+ var oldRawValue = (0, util_1.getProp)(node, "raws", "value");
2562
+ node.value += "$";
2563
+ if (oldRawValue) {
2564
+ node.raws.value = oldRawValue + "$";
2565
+ }
2566
+ break;
2567
+ }
2568
+ // Falls through
2569
+ case tokens.caret:
2570
+ if (next[tokenize_1.FIELDS.TYPE] === tokens.equals) {
2571
+ node.operator = content;
2572
+ lastAdded = "operator";
2573
+ }
2574
+ spaceAfterMeaningfulToken = false;
2575
+ break;
2576
+ case tokens.combinator:
2577
+ if (content === "~" && next[tokenize_1.FIELDS.TYPE] === tokens.equals) {
2578
+ node.operator = content;
2579
+ lastAdded = "operator";
2580
+ }
2581
+ if (content !== "|") {
2582
+ spaceAfterMeaningfulToken = false;
2583
+ break;
2584
+ }
2585
+ if (next[tokenize_1.FIELDS.TYPE] === tokens.equals) {
2586
+ node.operator = content;
2587
+ lastAdded = "operator";
2588
+ } else if (!node.namespace && !node.attribute) {
2589
+ node.namespace = true;
2590
+ }
2591
+ spaceAfterMeaningfulToken = false;
2592
+ break;
2593
+ case tokens.word:
2594
+ if (next && this.content(next) === "|" && attr[pos + 2] && attr[pos + 2][tokenize_1.FIELDS.TYPE] !== tokens.equals && // this look-ahead probably fails with comment nodes involved.
2595
+ !node.operator && !node.namespace) {
2596
+ node.namespace = content;
2597
+ lastAdded = "namespace";
2598
+ } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) {
2599
+ if (spaceBefore) {
2600
+ (0, util_1.ensureObject)(node, "spaces", "attribute");
2601
+ node.spaces.attribute.before = spaceBefore;
2602
+ spaceBefore = "";
2603
+ }
2604
+ if (commentBefore) {
2605
+ (0, util_1.ensureObject)(node, "raws", "spaces", "attribute");
2606
+ node.raws.spaces.attribute.before = commentBefore;
2607
+ commentBefore = "";
2608
+ }
2609
+ node.attribute = (node.attribute || "") + content;
2610
+ var rawValue = (0, util_1.getProp)(node, "raws", "attribute") || null;
2611
+ if (rawValue) {
2612
+ node.raws.attribute += content;
2613
+ }
2614
+ lastAdded = "attribute";
2615
+ } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) {
2616
+ var unescaped_1 = (0, util_1.unesc)(content);
2617
+ var oldRawValue = (0, util_1.getProp)(node, "raws", "value") || "";
2618
+ var oldValue = node.value || "";
2619
+ node.value = oldValue + unescaped_1;
2620
+ node.quoteMark = null;
2621
+ if (unescaped_1 !== content || oldRawValue) {
2622
+ (0, util_1.ensureObject)(node, "raws");
2623
+ node.raws.value = (oldRawValue || oldValue) + content;
2624
+ }
2625
+ lastAdded = "value";
2626
+ } else {
2627
+ var insensitive = content === "i" || content === "I";
2628
+ if ((node.value || node.value === "") && (node.quoteMark || spaceAfterMeaningfulToken)) {
2629
+ node.insensitive = insensitive;
2630
+ if (!insensitive || content === "I") {
2631
+ (0, util_1.ensureObject)(node, "raws");
2632
+ node.raws.insensitiveFlag = content;
2633
+ }
2634
+ lastAdded = "insensitive";
2635
+ if (spaceBefore) {
2636
+ (0, util_1.ensureObject)(node, "spaces", "insensitive");
2637
+ node.spaces.insensitive.before = spaceBefore;
2638
+ spaceBefore = "";
2639
+ }
2640
+ if (commentBefore) {
2641
+ (0, util_1.ensureObject)(node, "raws", "spaces", "insensitive");
2642
+ node.raws.spaces.insensitive.before = commentBefore;
2643
+ commentBefore = "";
2644
+ }
2645
+ } else if (node.value || node.value === "") {
2646
+ lastAdded = "value";
2647
+ node.value += content;
2648
+ if (node.raws.value) {
2649
+ node.raws.value += content;
2650
+ }
2651
+ }
2652
+ }
2653
+ spaceAfterMeaningfulToken = false;
2654
+ break;
2655
+ case tokens.str:
2656
+ if (!node.attribute || !node.operator) {
2657
+ return this.error("Expected an attribute followed by an operator preceding the string.", {
2658
+ index: token[tokenize_1.FIELDS.START_POS]
2659
+ });
2660
+ }
2661
+ var _a2 = (0, attribute_1.unescapeValue)(content), unescaped = _a2.unescaped, quoteMark = _a2.quoteMark;
2662
+ node.value = unescaped;
2663
+ node.quoteMark = quoteMark;
2664
+ lastAdded = "value";
2665
+ (0, util_1.ensureObject)(node, "raws");
2666
+ node.raws.value = content;
2667
+ spaceAfterMeaningfulToken = false;
2668
+ break;
2669
+ case tokens.equals:
2670
+ if (!node.attribute) {
2671
+ return this.expected("attribute", token[tokenize_1.FIELDS.START_POS], content);
2672
+ }
2673
+ if (node.value) {
2674
+ return this.error('Unexpected "=" found; an operator was already defined.', {
2675
+ index: token[tokenize_1.FIELDS.START_POS]
2676
+ });
2677
+ }
2678
+ node.operator = node.operator ? node.operator + content : content;
2679
+ lastAdded = "operator";
2680
+ spaceAfterMeaningfulToken = false;
2681
+ break;
2682
+ case tokens.comment:
2683
+ if (lastAdded) {
2684
+ if (spaceAfterMeaningfulToken || next && next[tokenize_1.FIELDS.TYPE] === tokens.space || lastAdded === "insensitive") {
2685
+ var lastComment = (0, util_1.getProp)(node, "spaces", lastAdded, "after") || "";
2686
+ var rawLastComment = (0, util_1.getProp)(node, "raws", "spaces", lastAdded, "after") || lastComment;
2687
+ (0, util_1.ensureObject)(node, "raws", "spaces", lastAdded);
2688
+ node.raws.spaces[lastAdded].after = rawLastComment + content;
2689
+ } else {
2690
+ var lastValue = node[lastAdded] || "";
2691
+ var rawLastValue = (0, util_1.getProp)(node, "raws", lastAdded) || lastValue;
2692
+ (0, util_1.ensureObject)(node, "raws");
2693
+ node.raws[lastAdded] = rawLastValue + content;
2694
+ }
2695
+ } else {
2696
+ commentBefore = commentBefore + content;
2697
+ }
2698
+ break;
2699
+ default:
2700
+ return this.error('Unexpected "'.concat(content, '" found.'), { index: token[tokenize_1.FIELDS.START_POS] });
2701
+ }
2702
+ pos++;
2703
+ }
2704
+ unescapeProp(node, "attribute");
2705
+ unescapeProp(node, "namespace");
2706
+ this.newNode(new attribute_1.default(node));
2707
+ this.position++;
2708
+ };
2709
+ Parser2.prototype.parseWhitespaceEquivalentTokens = function(stopPosition) {
2710
+ if (stopPosition < 0) {
2711
+ stopPosition = this.tokens.length;
2712
+ }
2713
+ var startPosition = this.position;
2714
+ var nodes = [];
2715
+ var space = "";
2716
+ var lastComment = void 0;
2717
+ do {
2718
+ if (WHITESPACE_TOKENS[this.currToken[tokenize_1.FIELDS.TYPE]]) {
2719
+ if (!this.options.lossy) {
2720
+ space += this.content();
2721
+ }
2722
+ } else if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.comment) {
2723
+ var spaces = {};
2724
+ if (space) {
2725
+ spaces.before = space;
2726
+ space = "";
2727
+ }
2728
+ lastComment = new comment_1.default({
2729
+ value: this.content(),
2730
+ source: getTokenSource(this.currToken),
2731
+ sourceIndex: this.currToken[tokenize_1.FIELDS.START_POS],
2732
+ spaces
2733
+ });
2734
+ nodes.push(lastComment);
2735
+ }
2736
+ } while (++this.position < stopPosition);
2737
+ if (space) {
2738
+ if (lastComment) {
2739
+ lastComment.spaces.after = space;
2740
+ } else if (!this.options.lossy) {
2741
+ var firstToken = this.tokens[startPosition];
2742
+ var lastToken = this.tokens[this.position - 1];
2743
+ nodes.push(new string_1.default({
2744
+ value: "",
2745
+ source: getSource(firstToken[tokenize_1.FIELDS.START_LINE], firstToken[tokenize_1.FIELDS.START_COL], lastToken[tokenize_1.FIELDS.END_LINE], lastToken[tokenize_1.FIELDS.END_COL]),
2746
+ sourceIndex: firstToken[tokenize_1.FIELDS.START_POS],
2747
+ spaces: { before: space, after: "" }
2748
+ }));
2749
+ }
2750
+ }
2751
+ return nodes;
2752
+ };
2753
+ Parser2.prototype.convertWhitespaceNodesToSpace = function(nodes, requiredSpace) {
2754
+ var _this = this;
2755
+ if (requiredSpace === void 0) {
2756
+ requiredSpace = false;
2757
+ }
2758
+ var space = "";
2759
+ var rawSpace = "";
2760
+ nodes.forEach(function(n) {
2761
+ var spaceBefore = _this.lossySpace(n.spaces.before, requiredSpace);
2762
+ var rawSpaceBefore = _this.lossySpace(n.rawSpaceBefore, requiredSpace);
2763
+ space += spaceBefore + _this.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0);
2764
+ rawSpace += spaceBefore + n.value + _this.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0);
2765
+ });
2766
+ if (rawSpace === space) {
2767
+ rawSpace = void 0;
2768
+ }
2769
+ var result = { space, rawSpace };
2770
+ return result;
2771
+ };
2772
+ Parser2.prototype.isNamedCombinator = function(position) {
2773
+ if (position === void 0) {
2774
+ position = this.position;
2775
+ }
2776
+ return this.tokens[position + 0] && this.tokens[position + 0][tokenize_1.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][tokenize_1.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][tokenize_1.FIELDS.TYPE] === tokens.slash;
2777
+ };
2778
+ Parser2.prototype.namedCombinator = function() {
2779
+ if (this.isNamedCombinator()) {
2780
+ var nameRaw = this.content(this.tokens[this.position + 1]);
2781
+ var name = (0, util_1.unesc)(nameRaw).toLowerCase();
2782
+ var raws = {};
2783
+ if (name !== nameRaw) {
2784
+ raws.value = "/".concat(nameRaw, "/");
2785
+ }
2786
+ var node = new combinator_1.default({
2787
+ value: "/".concat(name, "/"),
2788
+ source: getSource(this.currToken[tokenize_1.FIELDS.START_LINE], this.currToken[tokenize_1.FIELDS.START_COL], this.tokens[this.position + 2][tokenize_1.FIELDS.END_LINE], this.tokens[this.position + 2][tokenize_1.FIELDS.END_COL]),
2789
+ sourceIndex: this.currToken[tokenize_1.FIELDS.START_POS],
2790
+ raws
2791
+ });
2792
+ this.position = this.position + 3;
2793
+ return node;
2794
+ } else {
2795
+ this.unexpected();
2796
+ }
2797
+ };
2798
+ Parser2.prototype.combinator = function() {
2799
+ var _this = this;
2800
+ if (this.content() === "|") {
2801
+ return this.namespace();
2802
+ }
2803
+ var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);
2804
+ if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][tokenize_1.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][tokenize_1.FIELDS.TYPE] === tokens.closeParenthesis) {
2805
+ var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
2806
+ if (nodes.length > 0) {
2807
+ var last = this.current.last;
2808
+ if (last) {
2809
+ var _a2 = this.convertWhitespaceNodesToSpace(nodes), space = _a2.space, rawSpace = _a2.rawSpace;
2810
+ if (rawSpace !== void 0) {
2811
+ last.rawSpaceAfter += rawSpace;
2812
+ }
2813
+ last.spaces.after += space;
2814
+ } else {
2815
+ nodes.forEach(function(n) {
2816
+ return _this.newNode(n);
2817
+ });
2818
+ }
2819
+ }
2820
+ return;
2821
+ }
2822
+ var firstToken = this.currToken;
2823
+ var spaceOrDescendantSelectorNodes = void 0;
2824
+ if (nextSigTokenPos > this.position) {
2825
+ spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
2826
+ }
2827
+ var node;
2828
+ if (this.isNamedCombinator()) {
2829
+ node = this.namedCombinator();
2830
+ } else if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.combinator) {
2831
+ node = new combinator_1.default({
2832
+ value: this.content(),
2833
+ source: getTokenSource(this.currToken),
2834
+ sourceIndex: this.currToken[tokenize_1.FIELDS.START_POS]
2835
+ });
2836
+ this.position++;
2837
+ } else if (WHITESPACE_TOKENS[this.currToken[tokenize_1.FIELDS.TYPE]]) {
2838
+ } else if (!spaceOrDescendantSelectorNodes) {
2839
+ this.unexpected();
2840
+ }
2841
+ if (node) {
2842
+ if (spaceOrDescendantSelectorNodes) {
2843
+ var _b2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), space = _b2.space, rawSpace = _b2.rawSpace;
2844
+ node.spaces.before = space;
2845
+ node.rawSpaceBefore = rawSpace;
2846
+ }
2847
+ } else {
2848
+ var _c = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), space = _c.space, rawSpace = _c.rawSpace;
2849
+ if (!rawSpace) {
2850
+ rawSpace = space;
2851
+ }
2852
+ var spaces = {};
2853
+ var raws = { spaces: {} };
2854
+ if (space.endsWith(" ") && rawSpace.endsWith(" ")) {
2855
+ spaces.before = space.slice(0, space.length - 1);
2856
+ raws.spaces.before = rawSpace.slice(0, rawSpace.length - 1);
2857
+ } else if (space[0] === " " && rawSpace[0] === " ") {
2858
+ spaces.after = space.slice(1);
2859
+ raws.spaces.after = rawSpace.slice(1);
2860
+ } else {
2861
+ raws.value = rawSpace;
2862
+ }
2863
+ node = new combinator_1.default({
2864
+ value: " ",
2865
+ source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]),
2866
+ sourceIndex: firstToken[tokenize_1.FIELDS.START_POS],
2867
+ spaces,
2868
+ raws
2869
+ });
2870
+ }
2871
+ if (this.currToken && this.currToken[tokenize_1.FIELDS.TYPE] === tokens.space) {
2872
+ node.spaces.after = this.optionalSpace(this.content());
2873
+ this.position++;
2874
+ }
2875
+ return this.newNode(node);
2876
+ };
2877
+ Parser2.prototype.comma = function() {
2878
+ if (this.position === this.tokens.length - 1) {
2879
+ this.root.trailingComma = true;
2880
+ this.position++;
2881
+ return;
2882
+ }
2883
+ this.current._inferEndPosition();
2884
+ var selector = new selector_1.default({
2885
+ source: {
2886
+ start: tokenStart(this.tokens[this.position + 1])
2887
+ },
2888
+ sourceIndex: this.tokens[this.position + 1][tokenize_1.FIELDS.START_POS]
2889
+ });
2890
+ this.current.parent.append(selector);
2891
+ this.current = selector;
2892
+ this.position++;
2893
+ };
2894
+ Parser2.prototype.comment = function() {
2895
+ var current = this.currToken;
2896
+ this.newNode(new comment_1.default({
2897
+ value: this.content(),
2898
+ source: getTokenSource(current),
2899
+ sourceIndex: current[tokenize_1.FIELDS.START_POS]
2900
+ }));
2901
+ this.position++;
2902
+ };
2903
+ Parser2.prototype.error = function(message, opts) {
2904
+ throw this.root.error(message, opts);
2905
+ };
2906
+ Parser2.prototype.missingBackslash = function() {
2907
+ return this.error("Expected a backslash preceding the semicolon.", {
2908
+ index: this.currToken[tokenize_1.FIELDS.START_POS]
2909
+ });
2910
+ };
2911
+ Parser2.prototype.missingParenthesis = function() {
2912
+ return this.expected("opening parenthesis", this.currToken[tokenize_1.FIELDS.START_POS]);
2913
+ };
2914
+ Parser2.prototype.missingSquareBracket = function() {
2915
+ return this.expected("opening square bracket", this.currToken[tokenize_1.FIELDS.START_POS]);
2916
+ };
2917
+ Parser2.prototype.unexpected = function() {
2918
+ return this.error("Unexpected '".concat(this.content(), "'. Escaping special characters with \\ may help."), this.currToken[tokenize_1.FIELDS.START_POS]);
2919
+ };
2920
+ Parser2.prototype.unexpectedPipe = function() {
2921
+ return this.error("Unexpected '|'.", this.currToken[tokenize_1.FIELDS.START_POS]);
2922
+ };
2923
+ Parser2.prototype.namespace = function() {
2924
+ var before = this.prevToken && this.content(this.prevToken) || true;
2925
+ if (this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.word) {
2926
+ this.position++;
2927
+ return this.word(before);
2928
+ } else if (this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.asterisk) {
2929
+ this.position++;
2930
+ return this.universal(before);
2931
+ }
2932
+ this.unexpectedPipe();
2933
+ };
2934
+ Parser2.prototype.nesting = function() {
2935
+ if (this.nextToken) {
2936
+ var nextContent = this.content(this.nextToken);
2937
+ if (nextContent === "|") {
2938
+ this.position++;
2939
+ return;
2940
+ }
2941
+ }
2942
+ var current = this.currToken;
2943
+ this.newNode(new nesting_1.default({
2944
+ value: this.content(),
2945
+ source: getTokenSource(current),
2946
+ sourceIndex: current[tokenize_1.FIELDS.START_POS]
2947
+ }));
2948
+ this.position++;
2949
+ };
2950
+ Parser2.prototype.parentheses = function() {
2951
+ var last = this.current.last;
2952
+ var unbalanced = 1;
2953
+ this.position++;
2954
+ if (last && last.type === types.PSEUDO) {
2955
+ var selector = new selector_1.default({
2956
+ source: { start: tokenStart(this.tokens[this.position]) },
2957
+ sourceIndex: this.tokens[this.position][tokenize_1.FIELDS.START_POS]
2958
+ });
2959
+ var cache = this.current;
2960
+ last.append(selector);
2961
+ this.current = selector;
2962
+ this.nestingDepth++;
2963
+ try {
2964
+ if (this.nestingDepth > this.maxNestingDepth) {
2965
+ this.error("Cannot parse selector: nesting depth exceeds the maximum of ".concat(this.maxNestingDepth, "."), { index: this.currToken[tokenize_1.FIELDS.START_POS] });
2966
+ }
2967
+ while (this.position < this.tokens.length && unbalanced) {
2968
+ if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.openParenthesis) {
2969
+ unbalanced++;
2970
+ }
2971
+ if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.closeParenthesis) {
2972
+ unbalanced--;
2973
+ }
2974
+ if (unbalanced) {
2975
+ this.parse();
2976
+ } else {
2977
+ this.current.source.end = tokenEnd(this.currToken);
2978
+ this.current.parent.source.end = tokenEnd(this.currToken);
2979
+ this.position++;
2980
+ }
2981
+ }
2982
+ } finally {
2983
+ this.nestingDepth--;
2984
+ }
2985
+ this.current = cache;
2986
+ } else {
2987
+ var parenStart = this.currToken;
2988
+ var parenValue = "(";
2989
+ var parenEnd = void 0;
2990
+ while (this.position < this.tokens.length && unbalanced) {
2991
+ if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.openParenthesis) {
2992
+ unbalanced++;
2993
+ }
2994
+ if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.closeParenthesis) {
2995
+ unbalanced--;
2996
+ }
2997
+ parenEnd = this.currToken;
2998
+ parenValue += this.parseParenthesisToken(this.currToken);
2999
+ this.position++;
3000
+ }
3001
+ if (last) {
3002
+ last.appendToPropertyAndEscape("value", parenValue, parenValue);
3003
+ } else {
3004
+ this.newNode(new string_1.default({
3005
+ value: parenValue,
3006
+ source: getSource(parenStart[tokenize_1.FIELDS.START_LINE], parenStart[tokenize_1.FIELDS.START_COL], parenEnd[tokenize_1.FIELDS.END_LINE], parenEnd[tokenize_1.FIELDS.END_COL]),
3007
+ sourceIndex: parenStart[tokenize_1.FIELDS.START_POS]
3008
+ }));
3009
+ }
3010
+ }
3011
+ if (unbalanced) {
3012
+ return this.expected("closing parenthesis", this.currToken[tokenize_1.FIELDS.START_POS]);
3013
+ }
3014
+ };
3015
+ Parser2.prototype.pseudo = function() {
3016
+ var _this = this;
3017
+ var pseudoStr = "";
3018
+ var startingToken = this.currToken;
3019
+ while (this.currToken && this.currToken[tokenize_1.FIELDS.TYPE] === tokens.colon) {
3020
+ pseudoStr += this.content();
3021
+ this.position++;
3022
+ }
3023
+ if (!this.currToken) {
3024
+ return this.expected(["pseudo-class", "pseudo-element"], this.position - 1);
3025
+ }
3026
+ if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.word) {
3027
+ this.splitWord(false, function(first, length) {
3028
+ pseudoStr += first;
3029
+ _this.newNode(new pseudo_1.default({
3030
+ value: pseudoStr,
3031
+ source: getTokenSourceSpan(startingToken, _this.currToken),
3032
+ sourceIndex: startingToken[tokenize_1.FIELDS.START_POS]
3033
+ }));
3034
+ if (length > 1 && _this.nextToken && _this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.openParenthesis) {
3035
+ _this.error("Misplaced parenthesis.", {
3036
+ index: _this.nextToken[tokenize_1.FIELDS.START_POS]
3037
+ });
3038
+ }
3039
+ });
3040
+ } else {
3041
+ return this.expected(["pseudo-class", "pseudo-element"], this.currToken[tokenize_1.FIELDS.START_POS]);
3042
+ }
3043
+ };
3044
+ Parser2.prototype.space = function() {
3045
+ var content = this.content();
3046
+ if (this.position === 0 || this.prevToken[tokenize_1.FIELDS.TYPE] === tokens.comma || this.prevToken[tokenize_1.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function(node) {
3047
+ return node.type === "comment";
3048
+ })) {
3049
+ this.spaces = this.optionalSpace(content);
3050
+ this.position++;
3051
+ } else if (this.position === this.tokens.length - 1 || this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.comma || this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.closeParenthesis) {
3052
+ this.current.last.spaces.after = this.optionalSpace(content);
3053
+ this.position++;
3054
+ } else {
3055
+ this.combinator();
3056
+ }
3057
+ };
3058
+ Parser2.prototype.string = function() {
3059
+ var current = this.currToken;
3060
+ this.newNode(new string_1.default({
3061
+ value: this.content(),
3062
+ source: getTokenSource(current),
3063
+ sourceIndex: current[tokenize_1.FIELDS.START_POS]
3064
+ }));
3065
+ this.position++;
3066
+ };
3067
+ Parser2.prototype.universal = function(namespace) {
3068
+ var nextToken = this.nextToken;
3069
+ if (nextToken && this.content(nextToken) === "|") {
3070
+ this.position++;
3071
+ return this.namespace();
3072
+ }
3073
+ var current = this.currToken;
3074
+ this.newNode(new universal_1.default({
3075
+ value: this.content(),
3076
+ source: getTokenSource(current),
3077
+ sourceIndex: current[tokenize_1.FIELDS.START_POS]
3078
+ }), namespace);
3079
+ this.position++;
3080
+ };
3081
+ Parser2.prototype.splitWord = function(namespace, firstCallback) {
3082
+ var _this = this;
3083
+ var nextToken = this.nextToken;
3084
+ var word = this.content();
3085
+ while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[tokenize_1.FIELDS.TYPE])) {
3086
+ this.position++;
3087
+ var current = this.content();
3088
+ word += current;
3089
+ if (current.lastIndexOf("\\") === current.length - 1) {
3090
+ var next = this.nextToken;
3091
+ if (next && next[tokenize_1.FIELDS.TYPE] === tokens.space) {
3092
+ word += this.requiredSpace(this.content(next));
3093
+ this.position++;
3094
+ }
3095
+ }
3096
+ nextToken = this.nextToken;
3097
+ }
3098
+ var hasClass = indexesOf(word, ".").filter(function(i) {
3099
+ var escapedDot = word[i - 1] === "\\";
3100
+ var isKeyframesPercent = /^\d+\.\d+%$/.test(word);
3101
+ return !escapedDot && !isKeyframesPercent;
3102
+ });
3103
+ var hasId = indexesOf(word, "#").filter(function(i) {
3104
+ return word[i - 1] !== "\\";
3105
+ });
3106
+ var interpolations = indexesOf(word, "#{");
3107
+ if (interpolations.length) {
3108
+ hasId = hasId.filter(function(hashIndex) {
3109
+ return !~interpolations.indexOf(hashIndex);
3110
+ });
3111
+ }
3112
+ var indices = (0, sortAscending_1.default)(uniqs(__spreadArray(__spreadArray([0], __read(hasClass), false), __read(hasId), false)));
3113
+ indices.forEach(function(ind, i) {
3114
+ var index = indices[i + 1] || word.length;
3115
+ var value = word.slice(ind, index);
3116
+ if (i === 0 && firstCallback) {
3117
+ return firstCallback.call(_this, value, indices.length);
3118
+ }
3119
+ var node;
3120
+ var current2 = _this.currToken;
3121
+ var sourceIndex = current2[tokenize_1.FIELDS.START_POS] + indices[i];
3122
+ var source = getSource(current2[1], current2[2] + ind, current2[3], current2[2] + (index - 1));
3123
+ if (~hasClass.indexOf(ind)) {
3124
+ var classNameOpts = {
3125
+ value: value.slice(1),
3126
+ source,
3127
+ sourceIndex
3128
+ };
3129
+ node = new className_1.default(unescapeProp(classNameOpts, "value"));
3130
+ } else if (~hasId.indexOf(ind)) {
3131
+ var idOpts = {
3132
+ value: value.slice(1),
3133
+ source,
3134
+ sourceIndex
3135
+ };
3136
+ node = new id_1.default(unescapeProp(idOpts, "value"));
3137
+ } else {
3138
+ var tagOpts = {
3139
+ value,
3140
+ source,
3141
+ sourceIndex
3142
+ };
3143
+ unescapeProp(tagOpts, "value");
3144
+ node = new tag_1.default(tagOpts);
3145
+ }
3146
+ _this.newNode(node, namespace);
3147
+ namespace = null;
3148
+ });
3149
+ this.position++;
3150
+ };
3151
+ Parser2.prototype.word = function(namespace) {
3152
+ var nextToken = this.nextToken;
3153
+ if (nextToken && this.content(nextToken) === "|") {
3154
+ this.position++;
3155
+ return this.namespace();
3156
+ }
3157
+ return this.splitWord(namespace);
3158
+ };
3159
+ Parser2.prototype.loop = function() {
3160
+ while (this.position < this.tokens.length) {
3161
+ this.parse(true);
3162
+ }
3163
+ this.current._inferEndPosition();
3164
+ return this.root;
3165
+ };
3166
+ Parser2.prototype.parse = function(throwOnParenthesis) {
3167
+ switch (this.currToken[tokenize_1.FIELDS.TYPE]) {
3168
+ case tokens.space:
3169
+ this.space();
3170
+ break;
3171
+ case tokens.comment:
3172
+ this.comment();
3173
+ break;
3174
+ case tokens.openParenthesis:
3175
+ this.parentheses();
3176
+ break;
3177
+ case tokens.closeParenthesis:
3178
+ if (throwOnParenthesis) {
3179
+ this.missingParenthesis();
3180
+ }
3181
+ break;
3182
+ case tokens.openSquare:
3183
+ this.attribute();
3184
+ break;
3185
+ case tokens.dollar:
3186
+ case tokens.caret:
3187
+ case tokens.equals:
3188
+ case tokens.word:
3189
+ this.word();
3190
+ break;
3191
+ case tokens.colon:
3192
+ this.pseudo();
3193
+ break;
3194
+ case tokens.comma:
3195
+ this.comma();
3196
+ break;
3197
+ case tokens.asterisk:
3198
+ this.universal();
3199
+ break;
3200
+ case tokens.ampersand:
3201
+ this.nesting();
3202
+ break;
3203
+ case tokens.slash:
3204
+ case tokens.combinator:
3205
+ this.combinator();
3206
+ break;
3207
+ case tokens.str:
3208
+ this.string();
3209
+ break;
3210
+ // These cases throw; no break needed.
3211
+ case tokens.closeSquare:
3212
+ this.missingSquareBracket();
3213
+ case tokens.semicolon:
3214
+ this.missingBackslash();
3215
+ default:
3216
+ this.unexpected();
3217
+ }
3218
+ };
3219
+ Parser2.prototype.expected = function(description, index, found) {
3220
+ if (Array.isArray(description)) {
3221
+ var last = description.pop();
3222
+ description = "".concat(description.join(", "), " or ").concat(last);
3223
+ }
3224
+ var an = /^[aeiou]/.test(description[0]) ? "an" : "a";
3225
+ if (!found) {
3226
+ return this.error("Expected ".concat(an, " ").concat(description, "."), { index });
3227
+ }
3228
+ return this.error("Expected ".concat(an, " ").concat(description, ', found "').concat(found, '" instead.'), { index });
3229
+ };
3230
+ Parser2.prototype.requiredSpace = function(space) {
3231
+ return this.options.lossy ? " " : space;
3232
+ };
3233
+ Parser2.prototype.optionalSpace = function(space) {
3234
+ return this.options.lossy ? "" : space;
3235
+ };
3236
+ Parser2.prototype.lossySpace = function(space, required) {
3237
+ if (this.options.lossy) {
3238
+ return required ? " " : "";
3239
+ } else {
3240
+ return space;
3241
+ }
3242
+ };
3243
+ Parser2.prototype.parseParenthesisToken = function(token) {
3244
+ var content = this.content(token);
3245
+ if (token[tokenize_1.FIELDS.TYPE] === tokens.space) {
3246
+ return this.requiredSpace(content);
3247
+ } else {
3248
+ return content;
3249
+ }
3250
+ };
3251
+ Parser2.prototype.newNode = function(node, namespace) {
3252
+ if (namespace) {
3253
+ if (/^ +$/.test(namespace)) {
3254
+ if (!this.options.lossy) {
3255
+ this.spaces = (this.spaces || "") + namespace;
3256
+ }
3257
+ namespace = true;
3258
+ }
3259
+ node.namespace = namespace;
3260
+ unescapeProp(node, "namespace");
3261
+ }
3262
+ if (this.spaces) {
3263
+ node.spaces.before = this.spaces;
3264
+ this.spaces = "";
3265
+ }
3266
+ return this.current.append(node);
3267
+ };
3268
+ Parser2.prototype.content = function(token) {
3269
+ if (token === void 0) {
3270
+ token = this.currToken;
3271
+ }
3272
+ return this.css.slice(token[tokenize_1.FIELDS.START_POS], token[tokenize_1.FIELDS.END_POS]);
3273
+ };
3274
+ Object.defineProperty(Parser2.prototype, "currToken", {
3275
+ get: function() {
3276
+ return this.tokens[this.position];
3277
+ },
3278
+ enumerable: false,
3279
+ configurable: true
3280
+ });
3281
+ Object.defineProperty(Parser2.prototype, "nextToken", {
3282
+ get: function() {
3283
+ return this.tokens[this.position + 1];
3284
+ },
3285
+ enumerable: false,
3286
+ configurable: true
3287
+ });
3288
+ Object.defineProperty(Parser2.prototype, "prevToken", {
3289
+ get: function() {
3290
+ return this.tokens[this.position - 1];
3291
+ },
3292
+ enumerable: false,
3293
+ configurable: true
3294
+ });
3295
+ Parser2.prototype.locateNextMeaningfulToken = function(startPosition) {
3296
+ if (startPosition === void 0) {
3297
+ startPosition = this.position + 1;
3298
+ }
3299
+ var searchPosition = startPosition;
3300
+ while (searchPosition < this.tokens.length) {
3301
+ if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][tokenize_1.FIELDS.TYPE]]) {
3302
+ searchPosition++;
3303
+ continue;
3304
+ } else {
3305
+ return searchPosition;
3306
+ }
3307
+ }
3308
+ return -1;
3309
+ };
3310
+ return Parser2;
3311
+ })()
3312
+ );
3313
+ exports.default = Parser;
3314
+ }
3315
+ });
3316
+
3317
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/processor.js
3318
+ var require_processor = __commonJS({
3319
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/processor.js"(exports) {
3320
+ "use strict";
3321
+ var __importDefault = exports && exports.__importDefault || function(mod) {
3322
+ return mod && mod.__esModule ? mod : { "default": mod };
3323
+ };
3324
+ Object.defineProperty(exports, "__esModule", { value: true });
3325
+ var parser_1 = __importDefault(require_parser());
3326
+ var Processor = (
3327
+ /** @class */
3328
+ (function() {
3329
+ function Processor2(func, options) {
3330
+ this.func = func || function noop() {
3331
+ };
3332
+ this.funcRes = null;
3333
+ this.options = options;
3334
+ }
3335
+ Processor2.prototype._shouldUpdateSelector = function(rule, options) {
3336
+ if (options === void 0) {
3337
+ options = {};
3338
+ }
3339
+ var merged = Object.assign({}, this.options, options);
3340
+ if (merged.updateSelector === false) {
3341
+ return false;
3342
+ } else {
3343
+ return typeof rule !== "string";
3344
+ }
3345
+ };
3346
+ Processor2.prototype._isLossy = function(options) {
3347
+ if (options === void 0) {
3348
+ options = {};
3349
+ }
3350
+ var merged = Object.assign({}, this.options, options);
3351
+ if (merged.lossless === false) {
3352
+ return true;
3353
+ } else {
3354
+ return false;
3355
+ }
3356
+ };
3357
+ Processor2.prototype._root = function(rule, options) {
3358
+ if (options === void 0) {
3359
+ options = {};
3360
+ }
3361
+ var parser = new parser_1.default(rule, this._parseOptions(options));
3362
+ return parser.root;
3363
+ };
3364
+ Processor2.prototype._parseOptions = function(options) {
3365
+ var merged = Object.assign({}, this.options, options);
3366
+ return {
3367
+ lossy: this._isLossy(merged),
3368
+ maxNestingDepth: merged.maxNestingDepth
3369
+ };
3370
+ };
3371
+ Processor2.prototype._stringifyOptions = function(options) {
3372
+ var merged = Object.assign({}, this.options, options);
3373
+ return {
3374
+ maxNestingDepth: merged.maxNestingDepth
3375
+ };
3376
+ };
3377
+ Processor2.prototype._run = function(rule, options) {
3378
+ var _this = this;
3379
+ if (options === void 0) {
3380
+ options = {};
3381
+ }
3382
+ return new Promise(function(resolve, reject) {
3383
+ try {
3384
+ var root_1 = _this._root(rule, options);
3385
+ Promise.resolve(_this.func(root_1)).then(function(transform) {
3386
+ var string = void 0;
3387
+ if (_this._shouldUpdateSelector(rule, options)) {
3388
+ string = root_1.toString(_this._stringifyOptions(options));
3389
+ rule.selector = string;
3390
+ }
3391
+ return { transform, root: root_1, string };
3392
+ }).then(resolve, reject);
3393
+ } catch (e) {
3394
+ reject(e);
3395
+ return;
3396
+ }
3397
+ });
3398
+ };
3399
+ Processor2.prototype._runSync = function(rule, options) {
3400
+ if (options === void 0) {
3401
+ options = {};
3402
+ }
3403
+ var root = this._root(rule, options);
3404
+ var transform = this.func(root);
3405
+ if (transform && typeof transform.then === "function") {
3406
+ throw new Error("Selector processor returned a promise to a synchronous call.");
3407
+ }
3408
+ var string = void 0;
3409
+ if (options.updateSelector && typeof rule !== "string") {
3410
+ string = root.toString(this._stringifyOptions(options));
3411
+ rule.selector = string;
3412
+ }
3413
+ return { transform, root, string };
3414
+ };
3415
+ Processor2.prototype.ast = function(rule, options) {
3416
+ return this._run(rule, options).then(function(result) {
3417
+ return result.root;
3418
+ });
3419
+ };
3420
+ Processor2.prototype.astSync = function(rule, options) {
3421
+ return this._runSync(rule, options).root;
3422
+ };
3423
+ Processor2.prototype.transform = function(rule, options) {
3424
+ return this._run(rule, options).then(function(result) {
3425
+ return result.transform;
3426
+ });
3427
+ };
3428
+ Processor2.prototype.transformSync = function(rule, options) {
3429
+ return this._runSync(rule, options).transform;
3430
+ };
3431
+ Processor2.prototype.process = function(rule, options) {
3432
+ var _this = this;
3433
+ return this._run(rule, options).then(function(result) {
3434
+ return result.string || result.root.toString(_this._stringifyOptions(options));
3435
+ });
3436
+ };
3437
+ Processor2.prototype.processSync = function(rule, options) {
3438
+ var result = this._runSync(rule, options);
3439
+ return result.string || result.root.toString(this._stringifyOptions(options));
3440
+ };
3441
+ return Processor2;
3442
+ })()
3443
+ );
3444
+ exports.default = Processor;
3445
+ }
3446
+ });
3447
+
3448
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/constructors.js
3449
+ var require_constructors = __commonJS({
3450
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/constructors.js"(exports) {
3451
+ "use strict";
3452
+ var __importDefault = exports && exports.__importDefault || function(mod) {
3453
+ return mod && mod.__esModule ? mod : { "default": mod };
3454
+ };
3455
+ Object.defineProperty(exports, "__esModule", { value: true });
3456
+ exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0;
3457
+ var attribute_1 = __importDefault(require_attribute());
3458
+ var className_1 = __importDefault(require_className());
3459
+ var combinator_1 = __importDefault(require_combinator());
3460
+ var comment_1 = __importDefault(require_comment());
3461
+ var id_1 = __importDefault(require_id());
3462
+ var nesting_1 = __importDefault(require_nesting());
3463
+ var pseudo_1 = __importDefault(require_pseudo());
3464
+ var root_1 = __importDefault(require_root());
3465
+ var selector_1 = __importDefault(require_selector());
3466
+ var string_1 = __importDefault(require_string());
3467
+ var tag_1 = __importDefault(require_tag());
3468
+ var universal_1 = __importDefault(require_universal());
3469
+ var attribute = function(opts) {
3470
+ return new attribute_1.default(opts);
3471
+ };
3472
+ exports.attribute = attribute;
3473
+ var className = function(opts) {
3474
+ return new className_1.default(opts);
3475
+ };
3476
+ exports.className = className;
3477
+ var combinator = function(opts) {
3478
+ return new combinator_1.default(opts);
3479
+ };
3480
+ exports.combinator = combinator;
3481
+ var comment = function(opts) {
3482
+ return new comment_1.default(opts);
3483
+ };
3484
+ exports.comment = comment;
3485
+ var id = function(opts) {
3486
+ return new id_1.default(opts);
3487
+ };
3488
+ exports.id = id;
3489
+ var nesting = function(opts) {
3490
+ return new nesting_1.default(opts);
3491
+ };
3492
+ exports.nesting = nesting;
3493
+ var pseudo = function(opts) {
3494
+ return new pseudo_1.default(opts);
3495
+ };
3496
+ exports.pseudo = pseudo;
3497
+ var root = function(opts) {
3498
+ return new root_1.default(opts);
3499
+ };
3500
+ exports.root = root;
3501
+ var selector = function(opts) {
3502
+ return new selector_1.default(opts);
3503
+ };
3504
+ exports.selector = selector;
3505
+ var string = function(opts) {
3506
+ return new string_1.default(opts);
3507
+ };
3508
+ exports.string = string;
3509
+ var tag = function(opts) {
3510
+ return new tag_1.default(opts);
3511
+ };
3512
+ exports.tag = tag;
3513
+ var universal = function(opts) {
3514
+ return new universal_1.default(opts);
3515
+ };
3516
+ exports.universal = universal;
3517
+ }
3518
+ });
3519
+
3520
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/guards.js
3521
+ var require_guards = __commonJS({
3522
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/guards.js"(exports) {
3523
+ "use strict";
3524
+ var _a;
3525
+ Object.defineProperty(exports, "__esModule", { value: true });
3526
+ exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = exports.isPseudo = exports.isNesting = exports.isIdentifier = exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0;
3527
+ exports.isNode = isNode;
3528
+ exports.isPseudoElement = isPseudoElement;
3529
+ exports.isPseudoClass = isPseudoClass;
3530
+ exports.isContainer = isContainer;
3531
+ exports.isNamespace = isNamespace;
3532
+ var types_1 = require_types();
3533
+ var IS_TYPE = (_a = {}, _a[types_1.ATTRIBUTE] = true, _a[types_1.CLASS] = true, _a[types_1.COMBINATOR] = true, _a[types_1.COMMENT] = true, _a[types_1.ID] = true, _a[types_1.NESTING] = true, _a[types_1.PSEUDO] = true, _a[types_1.ROOT] = true, _a[types_1.SELECTOR] = true, _a[types_1.STRING] = true, _a[types_1.TAG] = true, _a[types_1.UNIVERSAL] = true, _a);
3534
+ function isNode(node) {
3535
+ return typeof node === "object" && IS_TYPE[node.type];
3536
+ }
3537
+ function isNodeType(type, node) {
3538
+ return isNode(node) && node.type === type;
3539
+ }
3540
+ exports.isAttribute = isNodeType.bind(null, types_1.ATTRIBUTE);
3541
+ exports.isClassName = isNodeType.bind(null, types_1.CLASS);
3542
+ exports.isCombinator = isNodeType.bind(null, types_1.COMBINATOR);
3543
+ exports.isComment = isNodeType.bind(null, types_1.COMMENT);
3544
+ exports.isIdentifier = isNodeType.bind(null, types_1.ID);
3545
+ exports.isNesting = isNodeType.bind(null, types_1.NESTING);
3546
+ exports.isPseudo = isNodeType.bind(null, types_1.PSEUDO);
3547
+ exports.isRoot = isNodeType.bind(null, types_1.ROOT);
3548
+ exports.isSelector = isNodeType.bind(null, types_1.SELECTOR);
3549
+ exports.isString = isNodeType.bind(null, types_1.STRING);
3550
+ exports.isTag = isNodeType.bind(null, types_1.TAG);
3551
+ exports.isUniversal = isNodeType.bind(null, types_1.UNIVERSAL);
3552
+ function isPseudoElement(node) {
3553
+ return (0, exports.isPseudo)(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line");
3554
+ }
3555
+ function isPseudoClass(node) {
3556
+ return (0, exports.isPseudo)(node) && !isPseudoElement(node);
3557
+ }
3558
+ function isContainer(node) {
3559
+ return !!(isNode(node) && node.walk);
3560
+ }
3561
+ function isNamespace(node) {
3562
+ return (0, exports.isAttribute)(node) || (0, exports.isTag)(node);
3563
+ }
3564
+ }
3565
+ });
3566
+
3567
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/index.js
3568
+ var require_selectors = __commonJS({
3569
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/index.js"(exports) {
3570
+ "use strict";
3571
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
3572
+ if (k2 === void 0) k2 = k;
3573
+ var desc = Object.getOwnPropertyDescriptor(m, k);
3574
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
3575
+ desc = { enumerable: true, get: function() {
3576
+ return m[k];
3577
+ } };
3578
+ }
3579
+ Object.defineProperty(o, k2, desc);
3580
+ }) : (function(o, m, k, k2) {
3581
+ if (k2 === void 0) k2 = k;
3582
+ o[k2] = m[k];
3583
+ }));
3584
+ var __exportStar = exports && exports.__exportStar || function(m, exports2) {
3585
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
3586
+ };
3587
+ Object.defineProperty(exports, "__esModule", { value: true });
3588
+ __exportStar(require_types(), exports);
3589
+ __exportStar(require_constructors(), exports);
3590
+ __exportStar(require_guards(), exports);
3591
+ }
3592
+ });
3593
+
3594
+ // ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/index.js
3595
+ var require_dist = __commonJS({
3596
+ "../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/index.js"(exports, module) {
3597
+ "use strict";
3598
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
3599
+ if (k2 === void 0) k2 = k;
3600
+ var desc = Object.getOwnPropertyDescriptor(m, k);
3601
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
3602
+ desc = { enumerable: true, get: function() {
3603
+ return m[k];
3604
+ } };
3605
+ }
3606
+ Object.defineProperty(o, k2, desc);
3607
+ }) : (function(o, m, k, k2) {
3608
+ if (k2 === void 0) k2 = k;
3609
+ o[k2] = m[k];
3610
+ }));
3611
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
3612
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
3613
+ }) : function(o, v) {
3614
+ o["default"] = v;
3615
+ });
3616
+ var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function() {
3617
+ var ownKeys = function(o) {
3618
+ ownKeys = Object.getOwnPropertyNames || function(o2) {
3619
+ var ar = [];
3620
+ for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
3621
+ return ar;
3622
+ };
3623
+ return ownKeys(o);
3624
+ };
3625
+ return function(mod) {
3626
+ if (mod && mod.__esModule) return mod;
3627
+ var result = {};
3628
+ if (mod != null) {
3629
+ for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
3630
+ }
3631
+ __setModuleDefault(result, mod);
3632
+ return result;
3633
+ };
3634
+ })();
3635
+ var __importDefault = exports && exports.__importDefault || function(mod) {
3636
+ return mod && mod.__esModule ? mod : { "default": mod };
3637
+ };
3638
+ var processor_1 = __importDefault(require_processor());
3639
+ var selectors = __importStar(require_selectors());
3640
+ var parser = function(processor) {
3641
+ return new processor_1.default(processor);
3642
+ };
3643
+ Object.assign(parser, selectors);
3644
+ delete parser.__esModule;
3645
+ module.exports = parser;
3646
+ }
3647
+ });
3648
+
3649
+ export {
3650
+ require_dist
3651
+ };
3652
+ /*! Bundled license information:
3653
+
3654
+ cssesc/cssesc.js:
3655
+ (*! https://mths.be/cssesc v3.0.0 by @mathias *)
3656
+ */