storybook 10.1.0-alpha.9 → 10.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/dist/_browser-chunks/Color-FTG7SQDA.js +1097 -0
  2. package/dist/_browser-chunks/WithTooltip-LMROHDUP.js +1651 -0
  3. package/dist/_browser-chunks/chunk-2FRVAXCZ.js +7 -0
  4. package/dist/_browser-chunks/{chunk-FDWKXLBI.js → chunk-2XZMBGTA.js} +44 -109
  5. package/dist/_browser-chunks/chunk-3IAH5M2U.js +171 -0
  6. package/dist/_browser-chunks/chunk-3OXGAGBE.js +779 -0
  7. package/dist/_browser-chunks/{chunk-TMDZCWME.js → chunk-3PJE6VLG.js} +1 -3
  8. package/dist/_browser-chunks/{chunk-VAMFPZY3.js → chunk-45UGUKRX.js} +2 -7
  9. package/dist/_browser-chunks/chunk-6XWLIJQL.js +11 -0
  10. package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
  11. package/dist/_browser-chunks/chunk-AIOS4NGK.js +252 -0
  12. package/dist/_browser-chunks/chunk-AS2HQEYC.js +14 -0
  13. package/dist/_browser-chunks/chunk-AXG2BOBL.js +836 -0
  14. package/dist/_browser-chunks/{chunk-MH6AXFXB.js → chunk-CHUV5WSW.js} +0 -5
  15. package/dist/_browser-chunks/chunk-EUVGDK4H.js +93 -0
  16. package/dist/_browser-chunks/chunk-EZSQOHRI.js +18 -0
  17. package/dist/_browser-chunks/{chunk-CADGRH3P.js → chunk-FNXWN6IK.js} +3 -8
  18. package/dist/_browser-chunks/chunk-FQ7SLVLR.js +66 -0
  19. package/dist/_browser-chunks/chunk-GFLS4VP3.js +64 -0
  20. package/dist/_browser-chunks/chunk-GFY5R5EY.js +47 -0
  21. package/dist/_browser-chunks/{chunk-L2D73C6Z.js → chunk-H6XK3RSC.js} +13 -21
  22. package/dist/_browser-chunks/chunk-IPA5A322.js +71 -0
  23. package/dist/_browser-chunks/chunk-JP7NCOJX.js +37 -0
  24. package/dist/_browser-chunks/chunk-KJHJLCBK.js +11 -0
  25. package/dist/_browser-chunks/{chunk-OWPZQM2D.js → chunk-L4RMQ7D7.js} +60 -110
  26. package/dist/_browser-chunks/chunk-P4F4UVXX.js +951 -0
  27. package/dist/_browser-chunks/{chunk-AB7OOPUX.js → chunk-QKODTO7K.js} +0 -5
  28. package/dist/_browser-chunks/chunk-RP5RXKFU.js +2491 -0
  29. package/dist/_browser-chunks/chunk-SL75JR6Y.js +9 -0
  30. package/dist/_browser-chunks/chunk-SS2NHR7W.js +2969 -0
  31. package/dist/_browser-chunks/chunk-UD6FQLAF.js +1481 -0
  32. package/dist/_browser-chunks/chunk-VYJQ7RU5.js +2853 -0
  33. package/dist/_browser-chunks/chunk-WJYERY3R.js +136 -0
  34. package/dist/_browser-chunks/chunk-XJNX76GA.js +85 -0
  35. package/dist/_browser-chunks/{chunk-F4Q6SGTB.js → chunk-YKE5S47A.js} +177 -399
  36. package/dist/_browser-chunks/{chunk-SN4J4IQ3.js → chunk-ZUWEVLDX.js} +1 -7
  37. package/dist/_browser-chunks/{formatter-OMEEQ6HG.js → formatter-QJ4M4OGQ.js} +4 -9
  38. package/dist/_browser-chunks/{syntaxhighlighter-CAVLW7PM.js → syntaxhighlighter-IQDEPFLK.js} +704 -1848
  39. package/dist/_node-chunks/{builder-manager-SM3UWERX.js → builder-manager-BDAQHXFI.js} +510 -1019
  40. package/dist/_node-chunks/camelcase-3C7DZZPX.js +37 -0
  41. package/dist/_node-chunks/chunk-2IIQTGNE.js +6024 -0
  42. package/dist/_node-chunks/chunk-56U5LEMP.js +3043 -0
  43. package/dist/_node-chunks/chunk-7LIRCAQE.js +20 -0
  44. package/dist/_node-chunks/chunk-7RN6TXKP.js +603 -0
  45. package/dist/_node-chunks/chunk-7SJ7PZNL.js +4523 -0
  46. package/dist/_node-chunks/{chunk-HHSTA6QS.js → chunk-BG4RDXG7.js} +8 -10
  47. package/dist/_node-chunks/chunk-CBQKMXLQ.js +18 -0
  48. package/dist/_node-chunks/chunk-CN2IW2KQ.js +1564 -0
  49. package/dist/_node-chunks/chunk-CQMAU6UQ.js +943 -0
  50. package/dist/_node-chunks/{chunk-EBUEXRH5.js → chunk-D6ND3TVY.js} +116 -276
  51. package/dist/_node-chunks/chunk-DC355CYB.js +61 -0
  52. package/dist/_node-chunks/{chunk-SGM3ZCCT.js → chunk-EVK2SBW5.js} +292 -688
  53. package/dist/_node-chunks/chunk-IXWEUXJ2.js +119 -0
  54. package/dist/_node-chunks/{chunk-F6EFOEC7.js → chunk-KVRF22SH.js} +469 -983
  55. package/dist/_node-chunks/chunk-LEDP4QQW.js +919 -0
  56. package/dist/_node-chunks/{chunk-GHIBZRKD.js → chunk-MMVV6DGG.js} +8133 -8887
  57. package/dist/_node-chunks/chunk-O5CGEVRI.js +29 -0
  58. package/dist/_node-chunks/chunk-OZZO56XN.js +299 -0
  59. package/dist/_node-chunks/chunk-POT2EVGD.js +78 -0
  60. package/dist/_node-chunks/chunk-R5YGFSTV.js +3781 -0
  61. package/dist/_node-chunks/chunk-SQCTM2OS.js +23 -0
  62. package/dist/_node-chunks/chunk-UFOFO5H7.js +54 -0
  63. package/dist/_node-chunks/chunk-VBF7ALJF.js +72 -0
  64. package/dist/_node-chunks/chunk-W6MAMTUF.js +70 -0
  65. package/dist/_node-chunks/chunk-WURL4XOT.js +46662 -0
  66. package/dist/_node-chunks/chunk-XGK6MVKR.js +61 -0
  67. package/dist/_node-chunks/chunk-YV3GDSDT.js +765 -0
  68. package/dist/_node-chunks/{chunk-ATDHMMIZ.js → chunk-YWV55YW3.js} +15 -24
  69. package/dist/_node-chunks/dist-KEP4IFRN.js +121 -0
  70. package/dist/_node-chunks/globby-4WUBTDCN.js +3452 -0
  71. package/dist/_node-chunks/lib-JVOEKTYM.js +366 -0
  72. package/dist/_node-chunks/mdx-N42X6CFJ-C5WFYYXR.js +14329 -0
  73. package/dist/_node-chunks/p-limit-LDY632RS.js +116 -0
  74. package/dist/actions/decorator.js +21 -42
  75. package/dist/actions/index.js +3 -3
  76. package/dist/babel/index.d.ts +671 -335
  77. package/dist/babel/index.js +10 -11
  78. package/dist/bin/core.js +601 -1548
  79. package/dist/bin/dispatcher.js +36 -36
  80. package/dist/bin/loader.js +24 -38
  81. package/dist/channels/index.js +98 -234
  82. package/dist/cli/index.d.ts +1479 -133
  83. package/dist/cli/index.js +30 -8540
  84. package/dist/client-logger/index.js +31 -61
  85. package/dist/common/index.d.ts +139 -62
  86. package/dist/common/index.js +66 -51
  87. package/dist/components/index.d.ts +575 -273
  88. package/dist/components/index.js +14863 -4313
  89. package/dist/core-events/index.js +2 -66
  90. package/dist/core-server/index.d.ts +3 -2
  91. package/dist/core-server/index.js +2908 -8518
  92. package/dist/core-server/presets/common-manager.css +2 -2
  93. package/dist/core-server/presets/common-manager.js +2521 -5233
  94. package/dist/core-server/presets/common-override-preset.js +31 -60
  95. package/dist/core-server/presets/common-preset.js +663 -962
  96. package/dist/csf/index.js +534 -1179
  97. package/dist/csf-tools/index.js +9 -9
  98. package/dist/docs-tools/index.js +6 -6
  99. package/dist/highlight/index.js +2 -2
  100. package/dist/instrumenter/index.js +199 -415
  101. package/dist/manager/globals-runtime.js +59044 -67141
  102. package/dist/manager/globals.js +2 -3
  103. package/dist/manager/manager-stores.d.ts +1 -0
  104. package/dist/manager/manager-stores.js +23 -0
  105. package/dist/manager/runtime.js +11511 -10953
  106. package/dist/manager-api/index.d.ts +1811 -2
  107. package/dist/manager-api/index.js +1348 -2401
  108. package/dist/manager-errors.d.ts +9 -0
  109. package/dist/manager-errors.js +3 -3
  110. package/dist/mocking-utils/index.d.ts +1126 -0
  111. package/dist/mocking-utils/index.js +1181 -0
  112. package/dist/node-logger/index.d.ts +192 -24
  113. package/dist/node-logger/index.js +23 -4471
  114. package/dist/preview/globals.js +2 -3
  115. package/dist/preview/runtime.js +10799 -22393
  116. package/dist/preview-api/index.d.ts +68 -69
  117. package/dist/preview-api/index.js +13 -13
  118. package/dist/preview-errors.d.ts +9 -0
  119. package/dist/preview-errors.js +4 -4
  120. package/dist/router/index.js +347 -899
  121. package/dist/server-errors.d.ts +34 -1
  122. package/dist/server-errors.js +17 -10
  123. package/dist/telemetry/index.d.ts +24 -3
  124. package/dist/telemetry/index.js +25 -24
  125. package/dist/test/index.js +6131 -11916
  126. package/dist/theming/create.d.ts +1 -0
  127. package/dist/theming/create.js +4 -4
  128. package/dist/theming/index.d.ts +3366 -2599
  129. package/dist/theming/index.js +501 -1091
  130. package/dist/types/index.d.ts +72 -8
  131. package/dist/types/index.js +27 -12
  132. package/dist/viewport/index.js +3 -3
  133. package/package.json +26 -17
  134. package/dist/_browser-chunks/Color-7ZNS6F6B.js +0 -1676
  135. package/dist/_browser-chunks/WithTooltip-SK46ZJ2J.js +0 -13
  136. package/dist/_browser-chunks/chunk-6A7OIVEL.js +0 -66
  137. package/dist/_browser-chunks/chunk-B4A3ADP3.js +0 -3816
  138. package/dist/_browser-chunks/chunk-BOOOPFZF.js +0 -2335
  139. package/dist/_browser-chunks/chunk-FSBVR7H5.js +0 -106
  140. package/dist/_browser-chunks/chunk-FUOHXXZT.js +0 -23
  141. package/dist/_browser-chunks/chunk-GTKOCWCT.js +0 -17
  142. package/dist/_browser-chunks/chunk-HHW4FUMO.js +0 -12
  143. package/dist/_browser-chunks/chunk-JVSKG4YS.js +0 -4052
  144. package/dist/_browser-chunks/chunk-LASUB7TL.js +0 -76
  145. package/dist/_browser-chunks/chunk-LYCSRYYR.js +0 -101
  146. package/dist/_browser-chunks/chunk-NVV6MIOE.js +0 -243
  147. package/dist/_browser-chunks/chunk-OBXWFEPB.js +0 -852
  148. package/dist/_browser-chunks/chunk-OPCDBBL3.js +0 -48
  149. package/dist/_browser-chunks/chunk-PB6FZ3WE.js +0 -130
  150. package/dist/_browser-chunks/chunk-RNE2IUTB.js +0 -1300
  151. package/dist/_browser-chunks/chunk-RW5PKMWM.js +0 -4182
  152. package/dist/_browser-chunks/chunk-SYS437NN.js +0 -122
  153. package/dist/_browser-chunks/chunk-U46RQHA4.js +0 -12
  154. package/dist/_browser-chunks/chunk-UTNZYD2N.js +0 -311
  155. package/dist/_browser-chunks/chunk-VUAFL5XK.js +0 -20
  156. package/dist/_browser-chunks/chunk-XDGMHOV7.js +0 -2197
  157. package/dist/_browser-chunks/chunk-XW6KSYKF.js +0 -16
  158. package/dist/_browser-chunks/chunk-Y3M7TW6K.js +0 -1041
  159. package/dist/_browser-chunks/chunk-ZNRFDIVA.js +0 -233
  160. package/dist/_node-chunks/camelcase-H5QSGQLK.js +0 -18
  161. package/dist/_node-chunks/chunk-3THWHQOC.js +0 -61
  162. package/dist/_node-chunks/chunk-45YUOLTU.js +0 -69
  163. package/dist/_node-chunks/chunk-4QSNCPAU.js +0 -64656
  164. package/dist/_node-chunks/chunk-744PQSOU.js +0 -79
  165. package/dist/_node-chunks/chunk-74Z2U7QG.js +0 -1544
  166. package/dist/_node-chunks/chunk-7MB7TFPO.js +0 -1198
  167. package/dist/_node-chunks/chunk-A7GS4RFT.js +0 -697
  168. package/dist/_node-chunks/chunk-BIA3A5UM.js +0 -61
  169. package/dist/_node-chunks/chunk-C5G7CLWX.js +0 -1657
  170. package/dist/_node-chunks/chunk-DLFUKMYJ.js +0 -1531
  171. package/dist/_node-chunks/chunk-EMRGRXKT.js +0 -111
  172. package/dist/_node-chunks/chunk-EX46EHHY.js +0 -420
  173. package/dist/_node-chunks/chunk-F76QKNOJ.js +0 -304
  174. package/dist/_node-chunks/chunk-HDCRUTEF.js +0 -220
  175. package/dist/_node-chunks/chunk-HUYAOIPH.js +0 -90
  176. package/dist/_node-chunks/chunk-IBJZQZJC.js +0 -101
  177. package/dist/_node-chunks/chunk-KZN2RDDT.js +0 -6712
  178. package/dist/_node-chunks/chunk-LYUNFU3F.js +0 -4741
  179. package/dist/_node-chunks/chunk-N44SIS6K.js +0 -28
  180. package/dist/_node-chunks/chunk-NILZM6KR.js +0 -18
  181. package/dist/_node-chunks/chunk-PC4ZRP6W.js +0 -34
  182. package/dist/_node-chunks/chunk-TJNGOQUH.js +0 -4272
  183. package/dist/_node-chunks/chunk-UBSYLHIL.js +0 -1250
  184. package/dist/_node-chunks/chunk-UTCLXPOC.js +0 -1518
  185. package/dist/_node-chunks/chunk-WOXXODXP.js +0 -5029
  186. package/dist/_node-chunks/chunk-XC4MEUA6.js +0 -1586
  187. package/dist/_node-chunks/chunk-YRXXMKRR.js +0 -2256
  188. package/dist/_node-chunks/dist-SL73W244.js +0 -175
  189. package/dist/_node-chunks/globby-ZSHAUQZ5.js +0 -5222
  190. package/dist/_node-chunks/lib-U2VIPUTI.js +0 -518
  191. package/dist/_node-chunks/mdx-N42X6CFJ-ZLHD33JK.js +0 -22017
  192. package/dist/_node-chunks/p-limit-K5BS5MSV.js +0 -168
  193. package/dist/_node-chunks/plugin-5PD4YIUH.js +0 -129
  194. package/dist/_node-chunks/plugin-MONDT2WL.js +0 -159
  195. package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-EUZJRG3W.js +0 -69102
  196. package/dist/_node-chunks/webpack-mock-plugin-T4LDXEHE.js +0 -124
  197. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +0 -36
  198. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +0 -33
@@ -1,1531 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_jpweijb0qqj from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_jpweijb0qqj from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_jpweijb0qqj from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_jpweijb0qqj.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_jpweijb0qqj.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_jpweijb0qqj.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
- import {
13
- __commonJS,
14
- __name,
15
- __require
16
- } from "./chunk-3THWHQOC.js";
17
-
18
- // ../node_modules/picomatch/lib/constants.js
19
- var require_constants = __commonJS({
20
- "../node_modules/picomatch/lib/constants.js"(exports, module) {
21
- "use strict";
22
- var path = __require("path");
23
- var WIN_SLASH = "\\\\/";
24
- var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
25
- var DOT_LITERAL = "\\.";
26
- var PLUS_LITERAL = "\\+";
27
- var QMARK_LITERAL = "\\?";
28
- var SLASH_LITERAL = "\\/";
29
- var ONE_CHAR = "(?=.)";
30
- var QMARK = "[^/]";
31
- var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
32
- var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
33
- var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
34
- var NO_DOT = `(?!${DOT_LITERAL})`;
35
- var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
36
- var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
37
- var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
38
- var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
39
- var STAR = `${QMARK}*?`;
40
- var POSIX_CHARS = {
41
- DOT_LITERAL,
42
- PLUS_LITERAL,
43
- QMARK_LITERAL,
44
- SLASH_LITERAL,
45
- ONE_CHAR,
46
- QMARK,
47
- END_ANCHOR,
48
- DOTS_SLASH,
49
- NO_DOT,
50
- NO_DOTS,
51
- NO_DOT_SLASH,
52
- NO_DOTS_SLASH,
53
- QMARK_NO_DOT,
54
- STAR,
55
- START_ANCHOR
56
- };
57
- var WINDOWS_CHARS = {
58
- ...POSIX_CHARS,
59
- SLASH_LITERAL: `[${WIN_SLASH}]`,
60
- QMARK: WIN_NO_SLASH,
61
- STAR: `${WIN_NO_SLASH}*?`,
62
- DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
63
- NO_DOT: `(?!${DOT_LITERAL})`,
64
- NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
65
- NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
66
- NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
67
- QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
68
- START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
69
- END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
70
- };
71
- var POSIX_REGEX_SOURCE = {
72
- alnum: "a-zA-Z0-9",
73
- alpha: "a-zA-Z",
74
- ascii: "\\x00-\\x7F",
75
- blank: " \\t",
76
- cntrl: "\\x00-\\x1F\\x7F",
77
- digit: "0-9",
78
- graph: "\\x21-\\x7E",
79
- lower: "a-z",
80
- print: "\\x20-\\x7E ",
81
- punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
82
- space: " \\t\\r\\n\\v\\f",
83
- upper: "A-Z",
84
- word: "A-Za-z0-9_",
85
- xdigit: "A-Fa-f0-9"
86
- };
87
- module.exports = {
88
- MAX_LENGTH: 1024 * 64,
89
- POSIX_REGEX_SOURCE,
90
- // regular expressions
91
- REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
92
- REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
93
- REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
94
- REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
95
- REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
96
- REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
97
- // Replace globs with equivalent patterns to reduce parsing time.
98
- REPLACEMENTS: {
99
- "***": "*",
100
- "**/**": "**",
101
- "**/**/**": "**"
102
- },
103
- // Digits
104
- CHAR_0: 48,
105
- /* 0 */
106
- CHAR_9: 57,
107
- /* 9 */
108
- // Alphabet chars.
109
- CHAR_UPPERCASE_A: 65,
110
- /* A */
111
- CHAR_LOWERCASE_A: 97,
112
- /* a */
113
- CHAR_UPPERCASE_Z: 90,
114
- /* Z */
115
- CHAR_LOWERCASE_Z: 122,
116
- /* z */
117
- CHAR_LEFT_PARENTHESES: 40,
118
- /* ( */
119
- CHAR_RIGHT_PARENTHESES: 41,
120
- /* ) */
121
- CHAR_ASTERISK: 42,
122
- /* * */
123
- // Non-alphabetic chars.
124
- CHAR_AMPERSAND: 38,
125
- /* & */
126
- CHAR_AT: 64,
127
- /* @ */
128
- CHAR_BACKWARD_SLASH: 92,
129
- /* \ */
130
- CHAR_CARRIAGE_RETURN: 13,
131
- /* \r */
132
- CHAR_CIRCUMFLEX_ACCENT: 94,
133
- /* ^ */
134
- CHAR_COLON: 58,
135
- /* : */
136
- CHAR_COMMA: 44,
137
- /* , */
138
- CHAR_DOT: 46,
139
- /* . */
140
- CHAR_DOUBLE_QUOTE: 34,
141
- /* " */
142
- CHAR_EQUAL: 61,
143
- /* = */
144
- CHAR_EXCLAMATION_MARK: 33,
145
- /* ! */
146
- CHAR_FORM_FEED: 12,
147
- /* \f */
148
- CHAR_FORWARD_SLASH: 47,
149
- /* / */
150
- CHAR_GRAVE_ACCENT: 96,
151
- /* ` */
152
- CHAR_HASH: 35,
153
- /* # */
154
- CHAR_HYPHEN_MINUS: 45,
155
- /* - */
156
- CHAR_LEFT_ANGLE_BRACKET: 60,
157
- /* < */
158
- CHAR_LEFT_CURLY_BRACE: 123,
159
- /* { */
160
- CHAR_LEFT_SQUARE_BRACKET: 91,
161
- /* [ */
162
- CHAR_LINE_FEED: 10,
163
- /* \n */
164
- CHAR_NO_BREAK_SPACE: 160,
165
- /* \u00A0 */
166
- CHAR_PERCENT: 37,
167
- /* % */
168
- CHAR_PLUS: 43,
169
- /* + */
170
- CHAR_QUESTION_MARK: 63,
171
- /* ? */
172
- CHAR_RIGHT_ANGLE_BRACKET: 62,
173
- /* > */
174
- CHAR_RIGHT_CURLY_BRACE: 125,
175
- /* } */
176
- CHAR_RIGHT_SQUARE_BRACKET: 93,
177
- /* ] */
178
- CHAR_SEMICOLON: 59,
179
- /* ; */
180
- CHAR_SINGLE_QUOTE: 39,
181
- /* ' */
182
- CHAR_SPACE: 32,
183
- /* */
184
- CHAR_TAB: 9,
185
- /* \t */
186
- CHAR_UNDERSCORE: 95,
187
- /* _ */
188
- CHAR_VERTICAL_LINE: 124,
189
- /* | */
190
- CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
191
- /* \uFEFF */
192
- SEP: path.sep,
193
- /**
194
- * Create EXTGLOB_CHARS
195
- */
196
- extglobChars(chars) {
197
- return {
198
- "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
199
- "?": { type: "qmark", open: "(?:", close: ")?" },
200
- "+": { type: "plus", open: "(?:", close: ")+" },
201
- "*": { type: "star", open: "(?:", close: ")*" },
202
- "@": { type: "at", open: "(?:", close: ")" }
203
- };
204
- },
205
- /**
206
- * Create GLOB_CHARS
207
- */
208
- globChars(win32) {
209
- return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
210
- }
211
- };
212
- }
213
- });
214
-
215
- // ../node_modules/picomatch/lib/utils.js
216
- var require_utils = __commonJS({
217
- "../node_modules/picomatch/lib/utils.js"(exports) {
218
- "use strict";
219
- var path = __require("path");
220
- var win32 = process.platform === "win32";
221
- var {
222
- REGEX_BACKSLASH,
223
- REGEX_REMOVE_BACKSLASH,
224
- REGEX_SPECIAL_CHARS,
225
- REGEX_SPECIAL_CHARS_GLOBAL
226
- } = require_constants();
227
- exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
228
- exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
229
- exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
230
- exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
231
- exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
232
- exports.removeBackslashes = (str) => {
233
- return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
234
- return match === "\\" ? "" : match;
235
- });
236
- };
237
- exports.supportsLookbehinds = () => {
238
- const segs = process.version.slice(1).split(".").map(Number);
239
- if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) {
240
- return true;
241
- }
242
- return false;
243
- };
244
- exports.isWindows = (options) => {
245
- if (options && typeof options.windows === "boolean") {
246
- return options.windows;
247
- }
248
- return win32 === true || path.sep === "\\";
249
- };
250
- exports.escapeLast = (input, char, lastIdx) => {
251
- const idx = input.lastIndexOf(char, lastIdx);
252
- if (idx === -1) return input;
253
- if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1);
254
- return `${input.slice(0, idx)}\\${input.slice(idx)}`;
255
- };
256
- exports.removePrefix = (input, state = {}) => {
257
- let output = input;
258
- if (output.startsWith("./")) {
259
- output = output.slice(2);
260
- state.prefix = "./";
261
- }
262
- return output;
263
- };
264
- exports.wrapOutput = (input, state = {}, options = {}) => {
265
- const prepend = options.contains ? "" : "^";
266
- const append = options.contains ? "" : "$";
267
- let output = `${prepend}(?:${input})${append}`;
268
- if (state.negated === true) {
269
- output = `(?:^(?!${output}).*$)`;
270
- }
271
- return output;
272
- };
273
- }
274
- });
275
-
276
- // ../node_modules/picomatch/lib/scan.js
277
- var require_scan = __commonJS({
278
- "../node_modules/picomatch/lib/scan.js"(exports, module) {
279
- "use strict";
280
- var utils = require_utils();
281
- var {
282
- CHAR_ASTERISK,
283
- /* * */
284
- CHAR_AT,
285
- /* @ */
286
- CHAR_BACKWARD_SLASH,
287
- /* \ */
288
- CHAR_COMMA,
289
- /* , */
290
- CHAR_DOT,
291
- /* . */
292
- CHAR_EXCLAMATION_MARK,
293
- /* ! */
294
- CHAR_FORWARD_SLASH,
295
- /* / */
296
- CHAR_LEFT_CURLY_BRACE,
297
- /* { */
298
- CHAR_LEFT_PARENTHESES,
299
- /* ( */
300
- CHAR_LEFT_SQUARE_BRACKET,
301
- /* [ */
302
- CHAR_PLUS,
303
- /* + */
304
- CHAR_QUESTION_MARK,
305
- /* ? */
306
- CHAR_RIGHT_CURLY_BRACE,
307
- /* } */
308
- CHAR_RIGHT_PARENTHESES,
309
- /* ) */
310
- CHAR_RIGHT_SQUARE_BRACKET
311
- /* ] */
312
- } = require_constants();
313
- var isPathSeparator = /* @__PURE__ */ __name((code) => {
314
- return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
315
- }, "isPathSeparator");
316
- var depth = /* @__PURE__ */ __name((token) => {
317
- if (token.isPrefix !== true) {
318
- token.depth = token.isGlobstar ? Infinity : 1;
319
- }
320
- }, "depth");
321
- var scan = /* @__PURE__ */ __name((input, options) => {
322
- const opts = options || {};
323
- const length = input.length - 1;
324
- const scanToEnd = opts.parts === true || opts.scanToEnd === true;
325
- const slashes = [];
326
- const tokens = [];
327
- const parts = [];
328
- let str = input;
329
- let index = -1;
330
- let start = 0;
331
- let lastIndex = 0;
332
- let isBrace = false;
333
- let isBracket = false;
334
- let isGlob = false;
335
- let isExtglob = false;
336
- let isGlobstar = false;
337
- let braceEscaped = false;
338
- let backslashes = false;
339
- let negated = false;
340
- let negatedExtglob = false;
341
- let finished = false;
342
- let braces = 0;
343
- let prev;
344
- let code;
345
- let token = { value: "", depth: 0, isGlob: false };
346
- const eos = /* @__PURE__ */ __name(() => index >= length, "eos");
347
- const peek = /* @__PURE__ */ __name(() => str.charCodeAt(index + 1), "peek");
348
- const advance = /* @__PURE__ */ __name(() => {
349
- prev = code;
350
- return str.charCodeAt(++index);
351
- }, "advance");
352
- while (index < length) {
353
- code = advance();
354
- let next;
355
- if (code === CHAR_BACKWARD_SLASH) {
356
- backslashes = token.backslashes = true;
357
- code = advance();
358
- if (code === CHAR_LEFT_CURLY_BRACE) {
359
- braceEscaped = true;
360
- }
361
- continue;
362
- }
363
- if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
364
- braces++;
365
- while (eos() !== true && (code = advance())) {
366
- if (code === CHAR_BACKWARD_SLASH) {
367
- backslashes = token.backslashes = true;
368
- advance();
369
- continue;
370
- }
371
- if (code === CHAR_LEFT_CURLY_BRACE) {
372
- braces++;
373
- continue;
374
- }
375
- if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
376
- isBrace = token.isBrace = true;
377
- isGlob = token.isGlob = true;
378
- finished = true;
379
- if (scanToEnd === true) {
380
- continue;
381
- }
382
- break;
383
- }
384
- if (braceEscaped !== true && code === CHAR_COMMA) {
385
- isBrace = token.isBrace = true;
386
- isGlob = token.isGlob = true;
387
- finished = true;
388
- if (scanToEnd === true) {
389
- continue;
390
- }
391
- break;
392
- }
393
- if (code === CHAR_RIGHT_CURLY_BRACE) {
394
- braces--;
395
- if (braces === 0) {
396
- braceEscaped = false;
397
- isBrace = token.isBrace = true;
398
- finished = true;
399
- break;
400
- }
401
- }
402
- }
403
- if (scanToEnd === true) {
404
- continue;
405
- }
406
- break;
407
- }
408
- if (code === CHAR_FORWARD_SLASH) {
409
- slashes.push(index);
410
- tokens.push(token);
411
- token = { value: "", depth: 0, isGlob: false };
412
- if (finished === true) continue;
413
- if (prev === CHAR_DOT && index === start + 1) {
414
- start += 2;
415
- continue;
416
- }
417
- lastIndex = index + 1;
418
- continue;
419
- }
420
- if (opts.noext !== true) {
421
- const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK;
422
- if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
423
- isGlob = token.isGlob = true;
424
- isExtglob = token.isExtglob = true;
425
- finished = true;
426
- if (code === CHAR_EXCLAMATION_MARK && index === start) {
427
- negatedExtglob = true;
428
- }
429
- if (scanToEnd === true) {
430
- while (eos() !== true && (code = advance())) {
431
- if (code === CHAR_BACKWARD_SLASH) {
432
- backslashes = token.backslashes = true;
433
- code = advance();
434
- continue;
435
- }
436
- if (code === CHAR_RIGHT_PARENTHESES) {
437
- isGlob = token.isGlob = true;
438
- finished = true;
439
- break;
440
- }
441
- }
442
- continue;
443
- }
444
- break;
445
- }
446
- }
447
- if (code === CHAR_ASTERISK) {
448
- if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
449
- isGlob = token.isGlob = true;
450
- finished = true;
451
- if (scanToEnd === true) {
452
- continue;
453
- }
454
- break;
455
- }
456
- if (code === CHAR_QUESTION_MARK) {
457
- isGlob = token.isGlob = true;
458
- finished = true;
459
- if (scanToEnd === true) {
460
- continue;
461
- }
462
- break;
463
- }
464
- if (code === CHAR_LEFT_SQUARE_BRACKET) {
465
- while (eos() !== true && (next = advance())) {
466
- if (next === CHAR_BACKWARD_SLASH) {
467
- backslashes = token.backslashes = true;
468
- advance();
469
- continue;
470
- }
471
- if (next === CHAR_RIGHT_SQUARE_BRACKET) {
472
- isBracket = token.isBracket = true;
473
- isGlob = token.isGlob = true;
474
- finished = true;
475
- break;
476
- }
477
- }
478
- if (scanToEnd === true) {
479
- continue;
480
- }
481
- break;
482
- }
483
- if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
484
- negated = token.negated = true;
485
- start++;
486
- continue;
487
- }
488
- if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
489
- isGlob = token.isGlob = true;
490
- if (scanToEnd === true) {
491
- while (eos() !== true && (code = advance())) {
492
- if (code === CHAR_LEFT_PARENTHESES) {
493
- backslashes = token.backslashes = true;
494
- code = advance();
495
- continue;
496
- }
497
- if (code === CHAR_RIGHT_PARENTHESES) {
498
- finished = true;
499
- break;
500
- }
501
- }
502
- continue;
503
- }
504
- break;
505
- }
506
- if (isGlob === true) {
507
- finished = true;
508
- if (scanToEnd === true) {
509
- continue;
510
- }
511
- break;
512
- }
513
- }
514
- if (opts.noext === true) {
515
- isExtglob = false;
516
- isGlob = false;
517
- }
518
- let base = str;
519
- let prefix = "";
520
- let glob = "";
521
- if (start > 0) {
522
- prefix = str.slice(0, start);
523
- str = str.slice(start);
524
- lastIndex -= start;
525
- }
526
- if (base && isGlob === true && lastIndex > 0) {
527
- base = str.slice(0, lastIndex);
528
- glob = str.slice(lastIndex);
529
- } else if (isGlob === true) {
530
- base = "";
531
- glob = str;
532
- } else {
533
- base = str;
534
- }
535
- if (base && base !== "" && base !== "/" && base !== str) {
536
- if (isPathSeparator(base.charCodeAt(base.length - 1))) {
537
- base = base.slice(0, -1);
538
- }
539
- }
540
- if (opts.unescape === true) {
541
- if (glob) glob = utils.removeBackslashes(glob);
542
- if (base && backslashes === true) {
543
- base = utils.removeBackslashes(base);
544
- }
545
- }
546
- const state = {
547
- prefix,
548
- input,
549
- start,
550
- base,
551
- glob,
552
- isBrace,
553
- isBracket,
554
- isGlob,
555
- isExtglob,
556
- isGlobstar,
557
- negated,
558
- negatedExtglob
559
- };
560
- if (opts.tokens === true) {
561
- state.maxDepth = 0;
562
- if (!isPathSeparator(code)) {
563
- tokens.push(token);
564
- }
565
- state.tokens = tokens;
566
- }
567
- if (opts.parts === true || opts.tokens === true) {
568
- let prevIndex;
569
- for (let idx = 0; idx < slashes.length; idx++) {
570
- const n = prevIndex ? prevIndex + 1 : start;
571
- const i = slashes[idx];
572
- const value = input.slice(n, i);
573
- if (opts.tokens) {
574
- if (idx === 0 && start !== 0) {
575
- tokens[idx].isPrefix = true;
576
- tokens[idx].value = prefix;
577
- } else {
578
- tokens[idx].value = value;
579
- }
580
- depth(tokens[idx]);
581
- state.maxDepth += tokens[idx].depth;
582
- }
583
- if (idx !== 0 || value !== "") {
584
- parts.push(value);
585
- }
586
- prevIndex = i;
587
- }
588
- if (prevIndex && prevIndex + 1 < input.length) {
589
- const value = input.slice(prevIndex + 1);
590
- parts.push(value);
591
- if (opts.tokens) {
592
- tokens[tokens.length - 1].value = value;
593
- depth(tokens[tokens.length - 1]);
594
- state.maxDepth += tokens[tokens.length - 1].depth;
595
- }
596
- }
597
- state.slashes = slashes;
598
- state.parts = parts;
599
- }
600
- return state;
601
- }, "scan");
602
- module.exports = scan;
603
- }
604
- });
605
-
606
- // ../node_modules/picomatch/lib/parse.js
607
- var require_parse = __commonJS({
608
- "../node_modules/picomatch/lib/parse.js"(exports, module) {
609
- "use strict";
610
- var constants = require_constants();
611
- var utils = require_utils();
612
- var {
613
- MAX_LENGTH,
614
- POSIX_REGEX_SOURCE,
615
- REGEX_NON_SPECIAL_CHARS,
616
- REGEX_SPECIAL_CHARS_BACKREF,
617
- REPLACEMENTS
618
- } = constants;
619
- var expandRange = /* @__PURE__ */ __name((args, options) => {
620
- if (typeof options.expandRange === "function") {
621
- return options.expandRange(...args, options);
622
- }
623
- args.sort();
624
- const value = `[${args.join("-")}]`;
625
- try {
626
- new RegExp(value);
627
- } catch (ex) {
628
- return args.map((v) => utils.escapeRegex(v)).join("..");
629
- }
630
- return value;
631
- }, "expandRange");
632
- var syntaxError = /* @__PURE__ */ __name((type, char) => {
633
- return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
634
- }, "syntaxError");
635
- var parse = /* @__PURE__ */ __name((input, options) => {
636
- if (typeof input !== "string") {
637
- throw new TypeError("Expected a string");
638
- }
639
- input = REPLACEMENTS[input] || input;
640
- const opts = { ...options };
641
- const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
642
- let len = input.length;
643
- if (len > max) {
644
- throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
645
- }
646
- const bos = { type: "bos", value: "", output: opts.prepend || "" };
647
- const tokens = [bos];
648
- const capture = opts.capture ? "" : "?:";
649
- const win32 = utils.isWindows(options);
650
- const PLATFORM_CHARS = constants.globChars(win32);
651
- const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
652
- const {
653
- DOT_LITERAL,
654
- PLUS_LITERAL,
655
- SLASH_LITERAL,
656
- ONE_CHAR,
657
- DOTS_SLASH,
658
- NO_DOT,
659
- NO_DOT_SLASH,
660
- NO_DOTS_SLASH,
661
- QMARK,
662
- QMARK_NO_DOT,
663
- STAR,
664
- START_ANCHOR
665
- } = PLATFORM_CHARS;
666
- const globstar = /* @__PURE__ */ __name((opts2) => {
667
- return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
668
- }, "globstar");
669
- const nodot = opts.dot ? "" : NO_DOT;
670
- const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
671
- let star = opts.bash === true ? globstar(opts) : STAR;
672
- if (opts.capture) {
673
- star = `(${star})`;
674
- }
675
- if (typeof opts.noext === "boolean") {
676
- opts.noextglob = opts.noext;
677
- }
678
- const state = {
679
- input,
680
- index: -1,
681
- start: 0,
682
- dot: opts.dot === true,
683
- consumed: "",
684
- output: "",
685
- prefix: "",
686
- backtrack: false,
687
- negated: false,
688
- brackets: 0,
689
- braces: 0,
690
- parens: 0,
691
- quotes: 0,
692
- globstar: false,
693
- tokens
694
- };
695
- input = utils.removePrefix(input, state);
696
- len = input.length;
697
- const extglobs = [];
698
- const braces = [];
699
- const stack = [];
700
- let prev = bos;
701
- let value;
702
- const eos = /* @__PURE__ */ __name(() => state.index === len - 1, "eos");
703
- const peek = state.peek = (n = 1) => input[state.index + n];
704
- const advance = state.advance = () => input[++state.index] || "";
705
- const remaining = /* @__PURE__ */ __name(() => input.slice(state.index + 1), "remaining");
706
- const consume = /* @__PURE__ */ __name((value2 = "", num = 0) => {
707
- state.consumed += value2;
708
- state.index += num;
709
- }, "consume");
710
- const append = /* @__PURE__ */ __name((token) => {
711
- state.output += token.output != null ? token.output : token.value;
712
- consume(token.value);
713
- }, "append");
714
- const negate = /* @__PURE__ */ __name(() => {
715
- let count = 1;
716
- while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
717
- advance();
718
- state.start++;
719
- count++;
720
- }
721
- if (count % 2 === 0) {
722
- return false;
723
- }
724
- state.negated = true;
725
- state.start++;
726
- return true;
727
- }, "negate");
728
- const increment = /* @__PURE__ */ __name((type) => {
729
- state[type]++;
730
- stack.push(type);
731
- }, "increment");
732
- const decrement = /* @__PURE__ */ __name((type) => {
733
- state[type]--;
734
- stack.pop();
735
- }, "decrement");
736
- const push = /* @__PURE__ */ __name((tok) => {
737
- if (prev.type === "globstar") {
738
- const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
739
- const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
740
- if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
741
- state.output = state.output.slice(0, -prev.output.length);
742
- prev.type = "star";
743
- prev.value = "*";
744
- prev.output = star;
745
- state.output += prev.output;
746
- }
747
- }
748
- if (extglobs.length && tok.type !== "paren") {
749
- extglobs[extglobs.length - 1].inner += tok.value;
750
- }
751
- if (tok.value || tok.output) append(tok);
752
- if (prev && prev.type === "text" && tok.type === "text") {
753
- prev.value += tok.value;
754
- prev.output = (prev.output || "") + tok.value;
755
- return;
756
- }
757
- tok.prev = prev;
758
- tokens.push(tok);
759
- prev = tok;
760
- }, "push");
761
- const extglobOpen = /* @__PURE__ */ __name((type, value2) => {
762
- const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" };
763
- token.prev = prev;
764
- token.parens = state.parens;
765
- token.output = state.output;
766
- const output = (opts.capture ? "(" : "") + token.open;
767
- increment("parens");
768
- push({ type, value: value2, output: state.output ? "" : ONE_CHAR });
769
- push({ type: "paren", extglob: true, value: advance(), output });
770
- extglobs.push(token);
771
- }, "extglobOpen");
772
- const extglobClose = /* @__PURE__ */ __name((token) => {
773
- let output = token.close + (opts.capture ? ")" : "");
774
- let rest;
775
- if (token.type === "negate") {
776
- let extglobStar = star;
777
- if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
778
- extglobStar = globstar(opts);
779
- }
780
- if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
781
- output = token.close = `)$))${extglobStar}`;
782
- }
783
- if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
784
- const expression = parse(rest, { ...options, fastpaths: false }).output;
785
- output = token.close = `)${expression})${extglobStar})`;
786
- }
787
- if (token.prev.type === "bos") {
788
- state.negatedExtglob = true;
789
- }
790
- }
791
- push({ type: "paren", extglob: true, value, output });
792
- decrement("parens");
793
- }, "extglobClose");
794
- if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
795
- let backslashes = false;
796
- let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
797
- if (first === "\\") {
798
- backslashes = true;
799
- return m;
800
- }
801
- if (first === "?") {
802
- if (esc) {
803
- return esc + first + (rest ? QMARK.repeat(rest.length) : "");
804
- }
805
- if (index === 0) {
806
- return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
807
- }
808
- return QMARK.repeat(chars.length);
809
- }
810
- if (first === ".") {
811
- return DOT_LITERAL.repeat(chars.length);
812
- }
813
- if (first === "*") {
814
- if (esc) {
815
- return esc + first + (rest ? star : "");
816
- }
817
- return star;
818
- }
819
- return esc ? m : `\\${m}`;
820
- });
821
- if (backslashes === true) {
822
- if (opts.unescape === true) {
823
- output = output.replace(/\\/g, "");
824
- } else {
825
- output = output.replace(/\\+/g, (m) => {
826
- return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
827
- });
828
- }
829
- }
830
- if (output === input && opts.contains === true) {
831
- state.output = input;
832
- return state;
833
- }
834
- state.output = utils.wrapOutput(output, state, options);
835
- return state;
836
- }
837
- while (!eos()) {
838
- value = advance();
839
- if (value === "\0") {
840
- continue;
841
- }
842
- if (value === "\\") {
843
- const next = peek();
844
- if (next === "/" && opts.bash !== true) {
845
- continue;
846
- }
847
- if (next === "." || next === ";") {
848
- continue;
849
- }
850
- if (!next) {
851
- value += "\\";
852
- push({ type: "text", value });
853
- continue;
854
- }
855
- const match = /^\\+/.exec(remaining());
856
- let slashes = 0;
857
- if (match && match[0].length > 2) {
858
- slashes = match[0].length;
859
- state.index += slashes;
860
- if (slashes % 2 !== 0) {
861
- value += "\\";
862
- }
863
- }
864
- if (opts.unescape === true) {
865
- value = advance();
866
- } else {
867
- value += advance();
868
- }
869
- if (state.brackets === 0) {
870
- push({ type: "text", value });
871
- continue;
872
- }
873
- }
874
- if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
875
- if (opts.posix !== false && value === ":") {
876
- const inner = prev.value.slice(1);
877
- if (inner.includes("[")) {
878
- prev.posix = true;
879
- if (inner.includes(":")) {
880
- const idx = prev.value.lastIndexOf("[");
881
- const pre = prev.value.slice(0, idx);
882
- const rest2 = prev.value.slice(idx + 2);
883
- const posix = POSIX_REGEX_SOURCE[rest2];
884
- if (posix) {
885
- prev.value = pre + posix;
886
- state.backtrack = true;
887
- advance();
888
- if (!bos.output && tokens.indexOf(prev) === 1) {
889
- bos.output = ONE_CHAR;
890
- }
891
- continue;
892
- }
893
- }
894
- }
895
- }
896
- if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
897
- value = `\\${value}`;
898
- }
899
- if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
900
- value = `\\${value}`;
901
- }
902
- if (opts.posix === true && value === "!" && prev.value === "[") {
903
- value = "^";
904
- }
905
- prev.value += value;
906
- append({ value });
907
- continue;
908
- }
909
- if (state.quotes === 1 && value !== '"') {
910
- value = utils.escapeRegex(value);
911
- prev.value += value;
912
- append({ value });
913
- continue;
914
- }
915
- if (value === '"') {
916
- state.quotes = state.quotes === 1 ? 0 : 1;
917
- if (opts.keepQuotes === true) {
918
- push({ type: "text", value });
919
- }
920
- continue;
921
- }
922
- if (value === "(") {
923
- increment("parens");
924
- push({ type: "paren", value });
925
- continue;
926
- }
927
- if (value === ")") {
928
- if (state.parens === 0 && opts.strictBrackets === true) {
929
- throw new SyntaxError(syntaxError("opening", "("));
930
- }
931
- const extglob = extglobs[extglobs.length - 1];
932
- if (extglob && state.parens === extglob.parens + 1) {
933
- extglobClose(extglobs.pop());
934
- continue;
935
- }
936
- push({ type: "paren", value, output: state.parens ? ")" : "\\)" });
937
- decrement("parens");
938
- continue;
939
- }
940
- if (value === "[") {
941
- if (opts.nobracket === true || !remaining().includes("]")) {
942
- if (opts.nobracket !== true && opts.strictBrackets === true) {
943
- throw new SyntaxError(syntaxError("closing", "]"));
944
- }
945
- value = `\\${value}`;
946
- } else {
947
- increment("brackets");
948
- }
949
- push({ type: "bracket", value });
950
- continue;
951
- }
952
- if (value === "]") {
953
- if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
954
- push({ type: "text", value, output: `\\${value}` });
955
- continue;
956
- }
957
- if (state.brackets === 0) {
958
- if (opts.strictBrackets === true) {
959
- throw new SyntaxError(syntaxError("opening", "["));
960
- }
961
- push({ type: "text", value, output: `\\${value}` });
962
- continue;
963
- }
964
- decrement("brackets");
965
- const prevValue = prev.value.slice(1);
966
- if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
967
- value = `/${value}`;
968
- }
969
- prev.value += value;
970
- append({ value });
971
- if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
972
- continue;
973
- }
974
- const escaped = utils.escapeRegex(prev.value);
975
- state.output = state.output.slice(0, -prev.value.length);
976
- if (opts.literalBrackets === true) {
977
- state.output += escaped;
978
- prev.value = escaped;
979
- continue;
980
- }
981
- prev.value = `(${capture}${escaped}|${prev.value})`;
982
- state.output += prev.value;
983
- continue;
984
- }
985
- if (value === "{" && opts.nobrace !== true) {
986
- increment("braces");
987
- const open = {
988
- type: "brace",
989
- value,
990
- output: "(",
991
- outputIndex: state.output.length,
992
- tokensIndex: state.tokens.length
993
- };
994
- braces.push(open);
995
- push(open);
996
- continue;
997
- }
998
- if (value === "}") {
999
- const brace = braces[braces.length - 1];
1000
- if (opts.nobrace === true || !brace) {
1001
- push({ type: "text", value, output: value });
1002
- continue;
1003
- }
1004
- let output = ")";
1005
- if (brace.dots === true) {
1006
- const arr = tokens.slice();
1007
- const range = [];
1008
- for (let i = arr.length - 1; i >= 0; i--) {
1009
- tokens.pop();
1010
- if (arr[i].type === "brace") {
1011
- break;
1012
- }
1013
- if (arr[i].type !== "dots") {
1014
- range.unshift(arr[i].value);
1015
- }
1016
- }
1017
- output = expandRange(range, opts);
1018
- state.backtrack = true;
1019
- }
1020
- if (brace.comma !== true && brace.dots !== true) {
1021
- const out = state.output.slice(0, brace.outputIndex);
1022
- const toks = state.tokens.slice(brace.tokensIndex);
1023
- brace.value = brace.output = "\\{";
1024
- value = output = "\\}";
1025
- state.output = out;
1026
- for (const t of toks) {
1027
- state.output += t.output || t.value;
1028
- }
1029
- }
1030
- push({ type: "brace", value, output });
1031
- decrement("braces");
1032
- braces.pop();
1033
- continue;
1034
- }
1035
- if (value === "|") {
1036
- if (extglobs.length > 0) {
1037
- extglobs[extglobs.length - 1].conditions++;
1038
- }
1039
- push({ type: "text", value });
1040
- continue;
1041
- }
1042
- if (value === ",") {
1043
- let output = value;
1044
- const brace = braces[braces.length - 1];
1045
- if (brace && stack[stack.length - 1] === "braces") {
1046
- brace.comma = true;
1047
- output = "|";
1048
- }
1049
- push({ type: "comma", value, output });
1050
- continue;
1051
- }
1052
- if (value === "/") {
1053
- if (prev.type === "dot" && state.index === state.start + 1) {
1054
- state.start = state.index + 1;
1055
- state.consumed = "";
1056
- state.output = "";
1057
- tokens.pop();
1058
- prev = bos;
1059
- continue;
1060
- }
1061
- push({ type: "slash", value, output: SLASH_LITERAL });
1062
- continue;
1063
- }
1064
- if (value === ".") {
1065
- if (state.braces > 0 && prev.type === "dot") {
1066
- if (prev.value === ".") prev.output = DOT_LITERAL;
1067
- const brace = braces[braces.length - 1];
1068
- prev.type = "dots";
1069
- prev.output += value;
1070
- prev.value += value;
1071
- brace.dots = true;
1072
- continue;
1073
- }
1074
- if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
1075
- push({ type: "text", value, output: DOT_LITERAL });
1076
- continue;
1077
- }
1078
- push({ type: "dot", value, output: DOT_LITERAL });
1079
- continue;
1080
- }
1081
- if (value === "?") {
1082
- const isGroup = prev && prev.value === "(";
1083
- if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1084
- extglobOpen("qmark", value);
1085
- continue;
1086
- }
1087
- if (prev && prev.type === "paren") {
1088
- const next = peek();
1089
- let output = value;
1090
- if (next === "<" && !utils.supportsLookbehinds()) {
1091
- throw new Error("Node.js v10 or higher is required for regex lookbehinds");
1092
- }
1093
- if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
1094
- output = `\\${value}`;
1095
- }
1096
- push({ type: "text", value, output });
1097
- continue;
1098
- }
1099
- if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
1100
- push({ type: "qmark", value, output: QMARK_NO_DOT });
1101
- continue;
1102
- }
1103
- push({ type: "qmark", value, output: QMARK });
1104
- continue;
1105
- }
1106
- if (value === "!") {
1107
- if (opts.noextglob !== true && peek() === "(") {
1108
- if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
1109
- extglobOpen("negate", value);
1110
- continue;
1111
- }
1112
- }
1113
- if (opts.nonegate !== true && state.index === 0) {
1114
- negate();
1115
- continue;
1116
- }
1117
- }
1118
- if (value === "+") {
1119
- if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1120
- extglobOpen("plus", value);
1121
- continue;
1122
- }
1123
- if (prev && prev.value === "(" || opts.regex === false) {
1124
- push({ type: "plus", value, output: PLUS_LITERAL });
1125
- continue;
1126
- }
1127
- if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
1128
- push({ type: "plus", value });
1129
- continue;
1130
- }
1131
- push({ type: "plus", value: PLUS_LITERAL });
1132
- continue;
1133
- }
1134
- if (value === "@") {
1135
- if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1136
- push({ type: "at", extglob: true, value, output: "" });
1137
- continue;
1138
- }
1139
- push({ type: "text", value });
1140
- continue;
1141
- }
1142
- if (value !== "*") {
1143
- if (value === "$" || value === "^") {
1144
- value = `\\${value}`;
1145
- }
1146
- const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
1147
- if (match) {
1148
- value += match[0];
1149
- state.index += match[0].length;
1150
- }
1151
- push({ type: "text", value });
1152
- continue;
1153
- }
1154
- if (prev && (prev.type === "globstar" || prev.star === true)) {
1155
- prev.type = "star";
1156
- prev.star = true;
1157
- prev.value += value;
1158
- prev.output = star;
1159
- state.backtrack = true;
1160
- state.globstar = true;
1161
- consume(value);
1162
- continue;
1163
- }
1164
- let rest = remaining();
1165
- if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
1166
- extglobOpen("star", value);
1167
- continue;
1168
- }
1169
- if (prev.type === "star") {
1170
- if (opts.noglobstar === true) {
1171
- consume(value);
1172
- continue;
1173
- }
1174
- const prior = prev.prev;
1175
- const before = prior.prev;
1176
- const isStart = prior.type === "slash" || prior.type === "bos";
1177
- const afterStar = before && (before.type === "star" || before.type === "globstar");
1178
- if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
1179
- push({ type: "star", value, output: "" });
1180
- continue;
1181
- }
1182
- const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
1183
- const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
1184
- if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
1185
- push({ type: "star", value, output: "" });
1186
- continue;
1187
- }
1188
- while (rest.slice(0, 3) === "/**") {
1189
- const after = input[state.index + 4];
1190
- if (after && after !== "/") {
1191
- break;
1192
- }
1193
- rest = rest.slice(3);
1194
- consume("/**", 3);
1195
- }
1196
- if (prior.type === "bos" && eos()) {
1197
- prev.type = "globstar";
1198
- prev.value += value;
1199
- prev.output = globstar(opts);
1200
- state.output = prev.output;
1201
- state.globstar = true;
1202
- consume(value);
1203
- continue;
1204
- }
1205
- if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
1206
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
1207
- prior.output = `(?:${prior.output}`;
1208
- prev.type = "globstar";
1209
- prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
1210
- prev.value += value;
1211
- state.globstar = true;
1212
- state.output += prior.output + prev.output;
1213
- consume(value);
1214
- continue;
1215
- }
1216
- if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
1217
- const end = rest[1] !== void 0 ? "|$" : "";
1218
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
1219
- prior.output = `(?:${prior.output}`;
1220
- prev.type = "globstar";
1221
- prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
1222
- prev.value += value;
1223
- state.output += prior.output + prev.output;
1224
- state.globstar = true;
1225
- consume(value + advance());
1226
- push({ type: "slash", value: "/", output: "" });
1227
- continue;
1228
- }
1229
- if (prior.type === "bos" && rest[0] === "/") {
1230
- prev.type = "globstar";
1231
- prev.value += value;
1232
- prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
1233
- state.output = prev.output;
1234
- state.globstar = true;
1235
- consume(value + advance());
1236
- push({ type: "slash", value: "/", output: "" });
1237
- continue;
1238
- }
1239
- state.output = state.output.slice(0, -prev.output.length);
1240
- prev.type = "globstar";
1241
- prev.output = globstar(opts);
1242
- prev.value += value;
1243
- state.output += prev.output;
1244
- state.globstar = true;
1245
- consume(value);
1246
- continue;
1247
- }
1248
- const token = { type: "star", value, output: star };
1249
- if (opts.bash === true) {
1250
- token.output = ".*?";
1251
- if (prev.type === "bos" || prev.type === "slash") {
1252
- token.output = nodot + token.output;
1253
- }
1254
- push(token);
1255
- continue;
1256
- }
1257
- if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
1258
- token.output = value;
1259
- push(token);
1260
- continue;
1261
- }
1262
- if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
1263
- if (prev.type === "dot") {
1264
- state.output += NO_DOT_SLASH;
1265
- prev.output += NO_DOT_SLASH;
1266
- } else if (opts.dot === true) {
1267
- state.output += NO_DOTS_SLASH;
1268
- prev.output += NO_DOTS_SLASH;
1269
- } else {
1270
- state.output += nodot;
1271
- prev.output += nodot;
1272
- }
1273
- if (peek() !== "*") {
1274
- state.output += ONE_CHAR;
1275
- prev.output += ONE_CHAR;
1276
- }
1277
- }
1278
- push(token);
1279
- }
1280
- while (state.brackets > 0) {
1281
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
1282
- state.output = utils.escapeLast(state.output, "[");
1283
- decrement("brackets");
1284
- }
1285
- while (state.parens > 0) {
1286
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")"));
1287
- state.output = utils.escapeLast(state.output, "(");
1288
- decrement("parens");
1289
- }
1290
- while (state.braces > 0) {
1291
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}"));
1292
- state.output = utils.escapeLast(state.output, "{");
1293
- decrement("braces");
1294
- }
1295
- if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
1296
- push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` });
1297
- }
1298
- if (state.backtrack === true) {
1299
- state.output = "";
1300
- for (const token of state.tokens) {
1301
- state.output += token.output != null ? token.output : token.value;
1302
- if (token.suffix) {
1303
- state.output += token.suffix;
1304
- }
1305
- }
1306
- }
1307
- return state;
1308
- }, "parse");
1309
- parse.fastpaths = (input, options) => {
1310
- const opts = { ...options };
1311
- const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
1312
- const len = input.length;
1313
- if (len > max) {
1314
- throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
1315
- }
1316
- input = REPLACEMENTS[input] || input;
1317
- const win32 = utils.isWindows(options);
1318
- const {
1319
- DOT_LITERAL,
1320
- SLASH_LITERAL,
1321
- ONE_CHAR,
1322
- DOTS_SLASH,
1323
- NO_DOT,
1324
- NO_DOTS,
1325
- NO_DOTS_SLASH,
1326
- STAR,
1327
- START_ANCHOR
1328
- } = constants.globChars(win32);
1329
- const nodot = opts.dot ? NO_DOTS : NO_DOT;
1330
- const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
1331
- const capture = opts.capture ? "" : "?:";
1332
- const state = { negated: false, prefix: "" };
1333
- let star = opts.bash === true ? ".*?" : STAR;
1334
- if (opts.capture) {
1335
- star = `(${star})`;
1336
- }
1337
- const globstar = /* @__PURE__ */ __name((opts2) => {
1338
- if (opts2.noglobstar === true) return star;
1339
- return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
1340
- }, "globstar");
1341
- const create = /* @__PURE__ */ __name((str) => {
1342
- switch (str) {
1343
- case "*":
1344
- return `${nodot}${ONE_CHAR}${star}`;
1345
- case ".*":
1346
- return `${DOT_LITERAL}${ONE_CHAR}${star}`;
1347
- case "*.*":
1348
- return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
1349
- case "*/*":
1350
- return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
1351
- case "**":
1352
- return nodot + globstar(opts);
1353
- case "**/*":
1354
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
1355
- case "**/*.*":
1356
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
1357
- case "**/.*":
1358
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
1359
- default: {
1360
- const match = /^(.*?)\.(\w+)$/.exec(str);
1361
- if (!match) return;
1362
- const source2 = create(match[1]);
1363
- if (!source2) return;
1364
- return source2 + DOT_LITERAL + match[2];
1365
- }
1366
- }
1367
- }, "create");
1368
- const output = utils.removePrefix(input, state);
1369
- let source = create(output);
1370
- if (source && opts.strictSlashes !== true) {
1371
- source += `${SLASH_LITERAL}?`;
1372
- }
1373
- return source;
1374
- };
1375
- module.exports = parse;
1376
- }
1377
- });
1378
-
1379
- // ../node_modules/picomatch/lib/picomatch.js
1380
- var require_picomatch = __commonJS({
1381
- "../node_modules/picomatch/lib/picomatch.js"(exports, module) {
1382
- "use strict";
1383
- var path = __require("path");
1384
- var scan = require_scan();
1385
- var parse = require_parse();
1386
- var utils = require_utils();
1387
- var constants = require_constants();
1388
- var isObject = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject");
1389
- var picomatch = /* @__PURE__ */ __name((glob, options, returnState = false) => {
1390
- if (Array.isArray(glob)) {
1391
- const fns = glob.map((input) => picomatch(input, options, returnState));
1392
- const arrayMatcher = /* @__PURE__ */ __name((str) => {
1393
- for (const isMatch of fns) {
1394
- const state2 = isMatch(str);
1395
- if (state2) return state2;
1396
- }
1397
- return false;
1398
- }, "arrayMatcher");
1399
- return arrayMatcher;
1400
- }
1401
- const isState = isObject(glob) && glob.tokens && glob.input;
1402
- if (glob === "" || typeof glob !== "string" && !isState) {
1403
- throw new TypeError("Expected pattern to be a non-empty string");
1404
- }
1405
- const opts = options || {};
1406
- const posix = utils.isWindows(options);
1407
- const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
1408
- const state = regex.state;
1409
- delete regex.state;
1410
- let isIgnored = /* @__PURE__ */ __name(() => false, "isIgnored");
1411
- if (opts.ignore) {
1412
- const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
1413
- isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
1414
- }
1415
- const matcher = /* @__PURE__ */ __name((input, returnObject = false) => {
1416
- const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
1417
- const result = { glob, state, regex, posix, input, output, match, isMatch };
1418
- if (typeof opts.onResult === "function") {
1419
- opts.onResult(result);
1420
- }
1421
- if (isMatch === false) {
1422
- result.isMatch = false;
1423
- return returnObject ? result : false;
1424
- }
1425
- if (isIgnored(input)) {
1426
- if (typeof opts.onIgnore === "function") {
1427
- opts.onIgnore(result);
1428
- }
1429
- result.isMatch = false;
1430
- return returnObject ? result : false;
1431
- }
1432
- if (typeof opts.onMatch === "function") {
1433
- opts.onMatch(result);
1434
- }
1435
- return returnObject ? result : true;
1436
- }, "matcher");
1437
- if (returnState) {
1438
- matcher.state = state;
1439
- }
1440
- return matcher;
1441
- }, "picomatch");
1442
- picomatch.test = (input, regex, options, { glob, posix } = {}) => {
1443
- if (typeof input !== "string") {
1444
- throw new TypeError("Expected input to be a string");
1445
- }
1446
- if (input === "") {
1447
- return { isMatch: false, output: "" };
1448
- }
1449
- const opts = options || {};
1450
- const format = opts.format || (posix ? utils.toPosixSlashes : null);
1451
- let match = input === glob;
1452
- let output = match && format ? format(input) : input;
1453
- if (match === false) {
1454
- output = format ? format(input) : input;
1455
- match = output === glob;
1456
- }
1457
- if (match === false || opts.capture === true) {
1458
- if (opts.matchBase === true || opts.basename === true) {
1459
- match = picomatch.matchBase(input, regex, options, posix);
1460
- } else {
1461
- match = regex.exec(output);
1462
- }
1463
- }
1464
- return { isMatch: Boolean(match), match, output };
1465
- };
1466
- picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
1467
- const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
1468
- return regex.test(path.basename(input));
1469
- };
1470
- picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
1471
- picomatch.parse = (pattern, options) => {
1472
- if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
1473
- return parse(pattern, { ...options, fastpaths: false });
1474
- };
1475
- picomatch.scan = (input, options) => scan(input, options);
1476
- picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
1477
- if (returnOutput === true) {
1478
- return state.output;
1479
- }
1480
- const opts = options || {};
1481
- const prepend = opts.contains ? "" : "^";
1482
- const append = opts.contains ? "" : "$";
1483
- let source = `${prepend}(?:${state.output})${append}`;
1484
- if (state && state.negated === true) {
1485
- source = `^(?!${source}).*$`;
1486
- }
1487
- const regex = picomatch.toRegex(source, options);
1488
- if (returnState === true) {
1489
- regex.state = state;
1490
- }
1491
- return regex;
1492
- };
1493
- picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
1494
- if (!input || typeof input !== "string") {
1495
- throw new TypeError("Expected a non-empty string");
1496
- }
1497
- let parsed = { negated: false, fastpaths: true };
1498
- if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
1499
- parsed.output = parse.fastpaths(input, options);
1500
- }
1501
- if (!parsed.output) {
1502
- parsed = parse(input, options);
1503
- }
1504
- return picomatch.compileRe(parsed, options, returnOutput, returnState);
1505
- };
1506
- picomatch.toRegex = (source, options) => {
1507
- try {
1508
- const opts = options || {};
1509
- return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
1510
- } catch (err) {
1511
- if (options && options.debug === true) throw err;
1512
- return /$^/;
1513
- }
1514
- };
1515
- picomatch.constants = constants;
1516
- module.exports = picomatch;
1517
- }
1518
- });
1519
-
1520
- // ../node_modules/picomatch/index.js
1521
- var require_picomatch2 = __commonJS({
1522
- "../node_modules/picomatch/index.js"(exports, module) {
1523
- "use strict";
1524
- module.exports = require_picomatch();
1525
- }
1526
- });
1527
-
1528
- export {
1529
- require_utils,
1530
- require_picomatch2 as require_picomatch
1531
- };