create-xmlui-app 0.12.26 → 0.12.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/dist/default/ts/gitignore +0 -31
- package/dist/default/ts/index.html +0 -14
- package/dist/default/ts/index.ts +0 -9
- package/dist/default/ts/public/mockServiceWorker.js +0 -307
- package/dist/default/ts/public/resources/favicon.ico +0 -0
- package/dist/default/ts/public/resources/xmlui-logo.svg +0 -9
- package/dist/default/ts/public/serve.json +0 -8
- package/dist/default/ts/src/Main.xmlui +0 -37
- package/dist/default/ts/src/components/ApiAware.xmlui +0 -9
- package/dist/default/ts/src/components/Home.xmlui +0 -17
- package/dist/default/ts/src/components/IncButton.xmlui +0 -6
- package/dist/default/ts/src/components/PagePanel.xmlui +0 -5
- package/dist/default/ts/src/config.ts +0 -12
- package/dist/index.js +0 -64
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-xmlui-app",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.28",
|
|
4
4
|
"scripts": {
|
|
5
|
-
"dev": "mkdir -p dist && cp -r templates/default dist/ && ncc build ./index.ts -w -o dist/",
|
|
6
|
-
"build": "ncc build ./index.ts -o dist/ --minify --no-cache --no-source-map-register && cp -r templates/default dist/",
|
|
5
|
+
"dev": "mkdir -p dist && cp -r templates/default templates/minimal templates/docs templates/blog dist/ && ncc build ./index.ts -w -o dist/",
|
|
6
|
+
"build": "ncc build ./index.ts -o dist/ --minify --no-cache --no-source-map-register && cp -r templates/default templates/minimal templates/docs templates/blog dist/",
|
|
7
7
|
"prepublishOnly": "npm run build"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Logs
|
|
2
|
-
logs
|
|
3
|
-
*.log
|
|
4
|
-
npm-debug.log*
|
|
5
|
-
yarn-debug.log*
|
|
6
|
-
yarn-error.log*
|
|
7
|
-
pnpm-debug.log*
|
|
8
|
-
lerna-debug.log*
|
|
9
|
-
|
|
10
|
-
node_modules
|
|
11
|
-
dist
|
|
12
|
-
dist-ssr
|
|
13
|
-
*.local
|
|
14
|
-
|
|
15
|
-
# Editor directories and files
|
|
16
|
-
.vscode/*
|
|
17
|
-
!.vscode/extensions.json
|
|
18
|
-
.idea
|
|
19
|
-
.DS_Store
|
|
20
|
-
*.suo
|
|
21
|
-
*.ntvs*
|
|
22
|
-
*.njsproj
|
|
23
|
-
*.sln
|
|
24
|
-
*.sw?
|
|
25
|
-
/test-results/
|
|
26
|
-
/playwright-report/
|
|
27
|
-
/playwright/.cache/
|
|
28
|
-
|
|
29
|
-
.env.local
|
|
30
|
-
.env.production
|
|
31
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/resources/favicon.ico" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<script>window.__PUBLIC_PATH = '/'</script>
|
|
8
|
-
<base href="/">
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<div id="root"></div>
|
|
12
|
-
<script type="module" src="/index.ts"></script>
|
|
13
|
-
</body>
|
|
14
|
-
</html>
|
package/dist/default/ts/index.ts
DELETED
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Mock Service Worker.
|
|
6
|
-
* @see https://github.com/mswjs/msw
|
|
7
|
-
* - Please do NOT modify this file.
|
|
8
|
-
* - Please do NOT serve this file on production.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
const PACKAGE_VERSION = '2.8.4'
|
|
12
|
-
const INTEGRITY_CHECKSUM = '00729d72e3b82faf54ca8b9621dbb96f'
|
|
13
|
-
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
|
|
14
|
-
const activeClientIds = new Set()
|
|
15
|
-
|
|
16
|
-
self.addEventListener('install', function () {
|
|
17
|
-
self.skipWaiting()
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
self.addEventListener('activate', function (event) {
|
|
21
|
-
event.waitUntil(self.clients.claim())
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
self.addEventListener('message', async function (event) {
|
|
25
|
-
const clientId = event.source.id
|
|
26
|
-
|
|
27
|
-
if (!clientId || !self.clients) {
|
|
28
|
-
return
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const client = await self.clients.get(clientId)
|
|
32
|
-
|
|
33
|
-
if (!client) {
|
|
34
|
-
return
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const allClients = await self.clients.matchAll({
|
|
38
|
-
type: 'window',
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
switch (event.data) {
|
|
42
|
-
case 'KEEPALIVE_REQUEST': {
|
|
43
|
-
sendToClient(client, {
|
|
44
|
-
type: 'KEEPALIVE_RESPONSE',
|
|
45
|
-
})
|
|
46
|
-
break
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
case 'INTEGRITY_CHECK_REQUEST': {
|
|
50
|
-
sendToClient(client, {
|
|
51
|
-
type: 'INTEGRITY_CHECK_RESPONSE',
|
|
52
|
-
payload: {
|
|
53
|
-
packageVersion: PACKAGE_VERSION,
|
|
54
|
-
checksum: INTEGRITY_CHECKSUM,
|
|
55
|
-
},
|
|
56
|
-
})
|
|
57
|
-
break
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
case 'MOCK_ACTIVATE': {
|
|
61
|
-
activeClientIds.add(clientId)
|
|
62
|
-
|
|
63
|
-
sendToClient(client, {
|
|
64
|
-
type: 'MOCKING_ENABLED',
|
|
65
|
-
payload: {
|
|
66
|
-
client: {
|
|
67
|
-
id: client.id,
|
|
68
|
-
frameType: client.frameType,
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
})
|
|
72
|
-
break
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
case 'MOCK_DEACTIVATE': {
|
|
76
|
-
activeClientIds.delete(clientId)
|
|
77
|
-
break
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
case 'CLIENT_CLOSED': {
|
|
81
|
-
activeClientIds.delete(clientId)
|
|
82
|
-
|
|
83
|
-
const remainingClients = allClients.filter((client) => {
|
|
84
|
-
return client.id !== clientId
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
// Unregister itself when there are no more clients
|
|
88
|
-
if (remainingClients.length === 0) {
|
|
89
|
-
self.registration.unregister()
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
break
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
self.addEventListener('fetch', function (event) {
|
|
98
|
-
const { request } = event
|
|
99
|
-
|
|
100
|
-
// Bypass navigation requests.
|
|
101
|
-
if (request.mode === 'navigate') {
|
|
102
|
-
return
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// Opening the DevTools triggers the "only-if-cached" request
|
|
106
|
-
// that cannot be handled by the worker. Bypass such requests.
|
|
107
|
-
if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') {
|
|
108
|
-
return
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Bypass all requests when there are no active clients.
|
|
112
|
-
// Prevents the self-unregistered worked from handling requests
|
|
113
|
-
// after it's been deleted (still remains active until the next reload).
|
|
114
|
-
if (activeClientIds.size === 0) {
|
|
115
|
-
return
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Generate unique request ID.
|
|
119
|
-
const requestId = crypto.randomUUID()
|
|
120
|
-
event.respondWith(handleRequest(event, requestId))
|
|
121
|
-
})
|
|
122
|
-
|
|
123
|
-
async function handleRequest(event, requestId) {
|
|
124
|
-
const client = await resolveMainClient(event)
|
|
125
|
-
const response = await getResponse(event, client, requestId)
|
|
126
|
-
|
|
127
|
-
// Send back the response clone for the "response:*" life-cycle events.
|
|
128
|
-
// Ensure MSW is active and ready to handle the message, otherwise
|
|
129
|
-
// this message will pend indefinitely.
|
|
130
|
-
if (client && activeClientIds.has(client.id)) {
|
|
131
|
-
;(async function () {
|
|
132
|
-
const responseClone = response.clone()
|
|
133
|
-
|
|
134
|
-
sendToClient(
|
|
135
|
-
client,
|
|
136
|
-
{
|
|
137
|
-
type: 'RESPONSE',
|
|
138
|
-
payload: {
|
|
139
|
-
requestId,
|
|
140
|
-
isMockedResponse: IS_MOCKED_RESPONSE in response,
|
|
141
|
-
type: responseClone.type,
|
|
142
|
-
status: responseClone.status,
|
|
143
|
-
statusText: responseClone.statusText,
|
|
144
|
-
body: responseClone.body,
|
|
145
|
-
headers: Object.fromEntries(responseClone.headers.entries()),
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
[responseClone.body],
|
|
149
|
-
)
|
|
150
|
-
})()
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
return response
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// Resolve the main client for the given event.
|
|
157
|
-
// Client that issues a request doesn't necessarily equal the client
|
|
158
|
-
// that registered the worker. It's with the latter the worker should
|
|
159
|
-
// communicate with during the response resolving phase.
|
|
160
|
-
async function resolveMainClient(event) {
|
|
161
|
-
const client = await self.clients.get(event.clientId)
|
|
162
|
-
|
|
163
|
-
if (activeClientIds.has(event.clientId)) {
|
|
164
|
-
return client
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
if (client?.frameType === 'top-level') {
|
|
168
|
-
return client
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
const allClients = await self.clients.matchAll({
|
|
172
|
-
type: 'window',
|
|
173
|
-
})
|
|
174
|
-
|
|
175
|
-
return allClients
|
|
176
|
-
.filter((client) => {
|
|
177
|
-
// Get only those clients that are currently visible.
|
|
178
|
-
return client.visibilityState === 'visible'
|
|
179
|
-
})
|
|
180
|
-
.find((client) => {
|
|
181
|
-
// Find the client ID that's recorded in the
|
|
182
|
-
// set of clients that have registered the worker.
|
|
183
|
-
return activeClientIds.has(client.id)
|
|
184
|
-
})
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
async function getResponse(event, client, requestId) {
|
|
188
|
-
const { request } = event
|
|
189
|
-
|
|
190
|
-
// Clone the request because it might've been already used
|
|
191
|
-
// (i.e. its body has been read and sent to the client).
|
|
192
|
-
const requestClone = request.clone()
|
|
193
|
-
|
|
194
|
-
function passthrough() {
|
|
195
|
-
// Cast the request headers to a new Headers instance
|
|
196
|
-
// so the headers can be manipulated with.
|
|
197
|
-
const headers = new Headers(requestClone.headers)
|
|
198
|
-
|
|
199
|
-
// Remove the "accept" header value that marked this request as passthrough.
|
|
200
|
-
// This prevents request alteration and also keeps it compliant with the
|
|
201
|
-
// user-defined CORS policies.
|
|
202
|
-
const acceptHeader = headers.get('accept')
|
|
203
|
-
if (acceptHeader) {
|
|
204
|
-
const values = acceptHeader.split(',').map((value) => value.trim())
|
|
205
|
-
const filteredValues = values.filter(
|
|
206
|
-
(value) => value !== 'msw/passthrough',
|
|
207
|
-
)
|
|
208
|
-
|
|
209
|
-
if (filteredValues.length > 0) {
|
|
210
|
-
headers.set('accept', filteredValues.join(', '))
|
|
211
|
-
} else {
|
|
212
|
-
headers.delete('accept')
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
return fetch(requestClone, { headers })
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// Bypass mocking when the client is not active.
|
|
220
|
-
if (!client) {
|
|
221
|
-
return passthrough()
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
// Bypass initial page load requests (i.e. static assets).
|
|
225
|
-
// The absence of the immediate/parent client in the map of the active clients
|
|
226
|
-
// means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet
|
|
227
|
-
// and is not ready to handle requests.
|
|
228
|
-
if (!activeClientIds.has(client.id)) {
|
|
229
|
-
return passthrough()
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// Notify the client that a request has been intercepted.
|
|
233
|
-
const requestBuffer = await request.arrayBuffer()
|
|
234
|
-
const clientMessage = await sendToClient(
|
|
235
|
-
client,
|
|
236
|
-
{
|
|
237
|
-
type: 'REQUEST',
|
|
238
|
-
payload: {
|
|
239
|
-
id: requestId,
|
|
240
|
-
url: request.url,
|
|
241
|
-
mode: request.mode,
|
|
242
|
-
method: request.method,
|
|
243
|
-
headers: Object.fromEntries(request.headers.entries()),
|
|
244
|
-
cache: request.cache,
|
|
245
|
-
credentials: request.credentials,
|
|
246
|
-
destination: request.destination,
|
|
247
|
-
integrity: request.integrity,
|
|
248
|
-
redirect: request.redirect,
|
|
249
|
-
referrer: request.referrer,
|
|
250
|
-
referrerPolicy: request.referrerPolicy,
|
|
251
|
-
body: requestBuffer,
|
|
252
|
-
keepalive: request.keepalive,
|
|
253
|
-
},
|
|
254
|
-
},
|
|
255
|
-
[requestBuffer],
|
|
256
|
-
)
|
|
257
|
-
|
|
258
|
-
switch (clientMessage.type) {
|
|
259
|
-
case 'MOCK_RESPONSE': {
|
|
260
|
-
return respondWithMock(clientMessage.data)
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
case 'PASSTHROUGH': {
|
|
264
|
-
return passthrough()
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
return passthrough()
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
function sendToClient(client, message, transferrables = []) {
|
|
272
|
-
return new Promise((resolve, reject) => {
|
|
273
|
-
const channel = new MessageChannel()
|
|
274
|
-
|
|
275
|
-
channel.port1.onmessage = (event) => {
|
|
276
|
-
if (event.data && event.data.error) {
|
|
277
|
-
return reject(event.data.error)
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
resolve(event.data)
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
client.postMessage(
|
|
284
|
-
message,
|
|
285
|
-
[channel.port2].concat(transferrables.filter(Boolean)),
|
|
286
|
-
)
|
|
287
|
-
})
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
async function respondWithMock(response) {
|
|
291
|
-
// Setting response status code to 0 is a no-op.
|
|
292
|
-
// However, when responding with a "Response.error()", the produced Response
|
|
293
|
-
// instance will have status code set to 0. Since it's not possible to create
|
|
294
|
-
// a Response instance with status code 0, handle that use-case separately.
|
|
295
|
-
if (response.status === 0) {
|
|
296
|
-
return Response.error()
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
const mockedResponse = new Response(response.body, response)
|
|
300
|
-
|
|
301
|
-
Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, {
|
|
302
|
-
value: true,
|
|
303
|
-
enumerable: true,
|
|
304
|
-
})
|
|
305
|
-
|
|
306
|
-
return mockedResponse
|
|
307
|
-
}
|
|
Binary file
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<svg width="115" height="35" viewBox="0 0 46 14" fill="none"
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path d="M19.8926 3.32031V9.57227H23.4199C23.7012 9.57227 23.916 9.64062 24.0645 9.77734C24.2168 9.91406 24.293 10.0859 24.293 10.293C24.293 10.5039 24.2188 10.6758 24.0703 10.8086C23.9219 10.9375 23.7051 11.002 23.4199 11.002H19.2188C18.8398 11.002 18.5664 10.918 18.3984 10.75C18.2344 10.582 18.1523 10.3105 18.1523 9.93555V3.32031C18.1523 2.96875 18.2305 2.70508 18.3867 2.5293C18.5469 2.35352 18.7559 2.26562 19.0137 2.26562C19.2754 2.26562 19.4863 2.35352 19.6465 2.5293C19.8105 2.70117 19.8926 2.96484 19.8926 3.32031Z" fill="#008EE5" />
|
|
4
|
-
<path d="M11.0918 9.70898L9.71484 4.23633V10.166C9.71484 10.4941 9.64062 10.7402 9.49219 10.9043C9.34766 11.0684 9.1543 11.1504 8.91211 11.1504C8.67773 11.1504 8.48633 11.0703 8.33789 10.9102C8.18945 10.7461 8.11523 10.498 8.11523 10.166V3.36914C8.11523 2.99414 8.21289 2.74219 8.4082 2.61328C8.60352 2.48047 8.86719 2.41406 9.19922 2.41406H9.73828C10.0625 2.41406 10.2969 2.44336 10.4414 2.50195C10.5898 2.56055 10.6992 2.66602 10.7695 2.81836C10.8398 2.9707 10.9199 3.21875 11.0098 3.5625L12.2578 8.26758L13.5059 3.5625C13.5957 3.21875 13.6758 2.9707 13.7461 2.81836C13.8164 2.66602 13.9238 2.56055 14.0684 2.50195C14.2168 2.44336 14.4531 2.41406 14.7773 2.41406H15.3164C15.6484 2.41406 15.9121 2.48047 16.1074 2.61328C16.3027 2.74219 16.4004 2.99414 16.4004 3.36914V10.166C16.4004 10.4941 16.3262 10.7402 16.1777 10.9043C16.0332 11.0684 15.8379 11.1504 15.5918 11.1504C15.3613 11.1504 15.1719 11.0684 15.0234 10.9043C14.875 10.7402 14.8008 10.4941 14.8008 10.166V4.23633L13.4238 9.70898C13.334 10.0645 13.2598 10.3262 13.2012 10.4941C13.1465 10.6582 13.043 10.8086 12.8906 10.9453C12.7383 11.082 12.5273 11.1504 12.2578 11.1504C12.0547 11.1504 11.8828 11.1055 11.7422 11.0156C11.6016 10.9297 11.4922 10.8184 11.4141 10.6816C11.3359 10.5449 11.2734 10.3945 11.2266 10.2305C11.1836 10.0625 11.1387 9.88867 11.0918 9.70898Z" fill="#008EE5" />
|
|
5
|
-
<path d="M0.621094 9.33203L2.54297 6.52539L0.925781 4.0293C0.773438 3.78711 0.658203 3.58008 0.580078 3.4082C0.505859 3.23242 0.46875 3.06445 0.46875 2.9043C0.46875 2.74023 0.541016 2.59375 0.685547 2.46484C0.833984 2.33203 1.01367 2.26562 1.22461 2.26562C1.4668 2.26562 1.6543 2.33789 1.78711 2.48242C1.92383 2.62305 2.11133 2.88672 2.34961 3.27344L3.63867 5.35938L5.01562 3.27344C5.12891 3.09766 5.22461 2.94727 5.30273 2.82227C5.38477 2.69727 5.46289 2.59375 5.53711 2.51172C5.61133 2.42969 5.69336 2.36914 5.7832 2.33008C5.87695 2.28711 5.98438 2.26562 6.10547 2.26562C6.32422 2.26562 6.50195 2.33203 6.63867 2.46484C6.7793 2.59375 6.84961 2.74805 6.84961 2.92773C6.84961 3.18945 6.69922 3.54492 6.39844 3.99414L4.70508 6.52539L6.52734 9.33203C6.69141 9.57812 6.81055 9.7832 6.88477 9.94727C6.95898 10.1074 6.99609 10.2598 6.99609 10.4043C6.99609 10.541 6.96289 10.666 6.89648 10.7793C6.83008 10.8926 6.73633 10.9824 6.61523 11.0488C6.49414 11.1152 6.35742 11.1484 6.20508 11.1484C6.04102 11.1484 5.90234 11.1133 5.78906 11.043C5.67578 10.9766 5.58398 10.8926 5.51367 10.791C5.44336 10.6895 5.3125 10.4922 5.12109 10.1992L3.60938 7.82031L2.00391 10.2695C1.87891 10.4648 1.78906 10.6016 1.73438 10.6797C1.68359 10.7578 1.62109 10.834 1.54688 10.9082C1.47266 10.9824 1.38477 11.041 1.2832 11.084C1.18164 11.127 1.0625 11.1484 0.925781 11.1484C0.714844 11.1484 0.539062 11.084 0.398438 10.9551C0.261719 10.8262 0.193359 10.6387 0.193359 10.3926C0.193359 10.1035 0.335938 9.75 0.621094 9.33203Z" fill="#008EE5" />
|
|
6
|
-
<rect x="27" width="19" height="14" rx="2" fill="#008EE5" />
|
|
7
|
-
<path d="M40.125 10.0879V3.32031C40.125 2.96875 40.2051 2.70508 40.3652 2.5293C40.5254 2.35352 40.7324 2.26562 40.9863 2.26562C41.248 2.26562 41.459 2.35352 41.6191 2.5293C41.7832 2.70117 41.8652 2.96484 41.8652 3.32031V10.0879C41.8652 10.4434 41.7832 10.709 41.6191 10.8848C41.459 11.0605 41.248 11.1484 40.9863 11.1484C40.7363 11.1484 40.5293 11.0605 40.3652 10.8848C40.2051 10.7051 40.125 10.4395 40.125 10.0879Z" fill="white" />
|
|
8
|
-
<path d="M30.9492 7.45117V3.32031C30.9492 2.96875 31.0273 2.70508 31.1836 2.5293C31.3438 2.35352 31.5527 2.26562 31.8105 2.26562C32.0801 2.26562 32.293 2.35352 32.4492 2.5293C32.6094 2.70508 32.6895 2.96875 32.6895 3.32031V7.54492C32.6895 8.02539 32.7422 8.42773 32.8477 8.75195C32.957 9.07227 33.1484 9.32227 33.4219 9.50195C33.6953 9.67773 34.0781 9.76562 34.5703 9.76562C35.25 9.76562 35.7305 9.58594 36.0117 9.22656C36.293 8.86328 36.4336 8.31445 36.4336 7.58008V3.32031C36.4336 2.96484 36.5117 2.70117 36.668 2.5293C36.8242 2.35352 37.0332 2.26562 37.2949 2.26562C37.5566 2.26562 37.7676 2.35352 37.9277 2.5293C38.0918 2.70117 38.1738 2.96484 38.1738 3.32031V7.45117C38.1738 8.12305 38.1074 8.68359 37.9746 9.13281C37.8457 9.58203 37.5996 9.97656 37.2363 10.3164C36.9238 10.6055 36.5605 10.8164 36.1465 10.9492C35.7324 11.082 35.248 11.1484 34.6934 11.1484C34.0332 11.1484 33.4648 11.0781 32.9883 10.9375C32.5117 10.793 32.123 10.5723 31.8223 10.2754C31.5215 9.97461 31.3008 9.5918 31.1602 9.12695C31.0195 8.6582 30.9492 8.09961 30.9492 7.45117Z" fill="white" />
|
|
9
|
-
</svg>
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<App layout="condensed-sticky">
|
|
2
|
-
<AppHeader>
|
|
3
|
-
<SpaceFiller />
|
|
4
|
-
<ToneChangerButton />
|
|
5
|
-
</AppHeader>
|
|
6
|
-
<NavPanel>
|
|
7
|
-
<NavLink label="Home" to="/" icon="home"/>
|
|
8
|
-
<NavLink label="Simple" to="/simple" />
|
|
9
|
-
<NavLink label="API-Aware" to="/apiaware" />
|
|
10
|
-
<NavLink label="Composable" to="/composable" />
|
|
11
|
-
</NavPanel>
|
|
12
|
-
<Pages>
|
|
13
|
-
<Page url="/">
|
|
14
|
-
<Home />
|
|
15
|
-
</Page>
|
|
16
|
-
<Page url="/simple">
|
|
17
|
-
<PagePanel>
|
|
18
|
-
<Button label="Click to increment: {count}" var.count="{0}" onClick="count++" />
|
|
19
|
-
</PagePanel>
|
|
20
|
-
</Page>
|
|
21
|
-
<Page url="/apiaware">
|
|
22
|
-
<ApiAware />
|
|
23
|
-
</Page>
|
|
24
|
-
<Page url="/composable">
|
|
25
|
-
<PagePanel>
|
|
26
|
-
<VStack padding="1rem" gap="1rem">
|
|
27
|
-
<IncButton />
|
|
28
|
-
<IncButton label="Click me too" />
|
|
29
|
-
<IncButton label="And me" />
|
|
30
|
-
</VStack>
|
|
31
|
-
</PagePanel>
|
|
32
|
-
</Page>
|
|
33
|
-
</Pages>
|
|
34
|
-
<Footer>
|
|
35
|
-
Powered by XMLUI
|
|
36
|
-
</Footer>
|
|
37
|
-
</App>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<Component name="Home">
|
|
2
|
-
<PagePanel>
|
|
3
|
-
<Markdown>
|
|
4
|
-
<![CDATA[
|
|
5
|
-
# Welcome to XMLUI!
|
|
6
|
-
|
|
7
|
-
XMLUI is a declarative UI framework with a simple markup allowing you to create web
|
|
8
|
-
apps directly bound to REST APIs on the backend.
|
|
9
|
-
|
|
10
|
-
- Simple
|
|
11
|
-
- API-Aware
|
|
12
|
-
- Composable
|
|
13
|
-
- Themeable
|
|
14
|
-
]]>
|
|
15
|
-
</Markdown>
|
|
16
|
-
</PagePanel>
|
|
17
|
-
</Component>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { StandaloneAppDescription } from "xmlui";
|
|
2
|
-
|
|
3
|
-
const App: StandaloneAppDescription = {
|
|
4
|
-
name: "Tutorial",
|
|
5
|
-
version: "0.0.1",
|
|
6
|
-
resources: {
|
|
7
|
-
logo: "resources/xmlui-logo.svg",
|
|
8
|
-
favicon: "resources/favicon.ico",
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default App;
|
package/dist/index.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
(()=>{var t={1088:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const s=r(7147);e.FILE_SYSTEM_ADAPTER={lstat:s.lstat,stat:s.stat,lstatSync:s.lstatSync,statSync:s.statSync,readdir:s.readdir,readdirSync:s.readdirSync};function createFileSystemAdapter(t){if(t===undefined){return e.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}e.createFileSystemAdapter=createFileSystemAdapter},4919:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const r=process.versions.node.split(".");if(r[0]===undefined||r[1]===undefined){throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`)}const s=Number.parseInt(r[0],10);const i=Number.parseInt(r[1],10);const n=10;const o=10;const a=s>n;const l=s===n&&i>=o;e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=a||l},7552:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Settings=e.scandirSync=e.scandir=void 0;const s=r(7091);const i=r(1328);const n=r(3022);e.Settings=n.default;function scandir(t,e,r){if(typeof e==="function"){s.read(t,getSettings(),e);return}s.read(t,getSettings(e),r)}e.scandir=scandir;function scandirSync(t,e){const r=getSettings(e);return i.read(t,r)}e.scandirSync=scandirSync;function getSettings(t={}){if(t instanceof n.default){return t}return new n.default(t)}},7091:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.readdir=e.readdirWithFileTypes=e.read=void 0;const s=r(2580);const i=r(1188);const n=r(4919);const o=r(8047);const a=r(4845);function read(t,e,r){if(!e.stats&&n.IS_SUPPORT_READDIR_WITH_FILE_TYPES){readdirWithFileTypes(t,e,r);return}readdir(t,e,r)}e.read=read;function readdirWithFileTypes(t,e,r){e.fs.readdir(t,{withFileTypes:true},((s,n)=>{if(s!==null){callFailureCallback(r,s);return}const o=n.map((r=>({dirent:r,name:r.name,path:a.joinPathSegments(t,r.name,e.pathSegmentSeparator)})));if(!e.followSymbolicLinks){callSuccessCallback(r,o);return}const l=o.map((t=>makeRplTaskEntry(t,e)));i(l,((t,e)=>{if(t!==null){callFailureCallback(r,t);return}callSuccessCallback(r,e)}))}))}e.readdirWithFileTypes=readdirWithFileTypes;function makeRplTaskEntry(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,((s,i)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){r(s);return}r(null,t);return}t.dirent=o.fs.createDirentFromStats(t.name,i);r(null,t)}))}}function readdir(t,e,r){e.fs.readdir(t,((n,l)=>{if(n!==null){callFailureCallback(r,n);return}const u=l.map((r=>{const i=a.joinPathSegments(t,r,e.pathSegmentSeparator);return t=>{s.stat(i,e.fsStatSettings,((s,n)=>{if(s!==null){t(s);return}const a={name:r,path:i,dirent:o.fs.createDirentFromStats(r,n)};if(e.stats){a.stats=n}t(null,a)}))}}));i(u,((t,e)=>{if(t!==null){callFailureCallback(r,t);return}callSuccessCallback(r,e)}))}))}e.readdir=readdir;function callFailureCallback(t,e){t(e)}function callSuccessCallback(t,e){t(null,e)}},4845:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.joinPathSegments=void 0;function joinPathSegments(t,e,r){if(t.endsWith(r)){return t+e}return t+r+e}e.joinPathSegments=joinPathSegments},1328:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.readdir=e.readdirWithFileTypes=e.read=void 0;const s=r(2580);const i=r(4919);const n=r(8047);const o=r(4845);function read(t,e){if(!e.stats&&i.IS_SUPPORT_READDIR_WITH_FILE_TYPES){return readdirWithFileTypes(t,e)}return readdir(t,e)}e.read=read;function readdirWithFileTypes(t,e){const r=e.fs.readdirSync(t,{withFileTypes:true});return r.map((r=>{const s={dirent:r,name:r.name,path:o.joinPathSegments(t,r.name,e.pathSegmentSeparator)};if(s.dirent.isSymbolicLink()&&e.followSymbolicLinks){try{const t=e.fs.statSync(s.path);s.dirent=n.fs.createDirentFromStats(s.name,t)}catch(t){if(e.throwErrorOnBrokenSymbolicLink){throw t}}}return s}))}e.readdirWithFileTypes=readdirWithFileTypes;function readdir(t,e){const r=e.fs.readdirSync(t);return r.map((r=>{const i=o.joinPathSegments(t,r,e.pathSegmentSeparator);const a=s.statSync(i,e.fsStatSettings);const l={name:r,path:i,dirent:n.fs.createDirentFromStats(r,a)};if(e.stats){l.stats=a}return l}))}e.readdir=readdir},3022:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1017);const i=r(2580);const n=r(1088);class Settings{constructor(t={}){this._options=t;this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,false);this.fs=n.createFileSystemAdapter(this._options.fs);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,s.sep);this.stats=this._getValue(this._options.stats,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true);this.fsStatSettings=new i.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return t!==null&&t!==void 0?t:e}}e["default"]=Settings},7876:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createDirentFromStats=void 0;class DirentFromStats{constructor(t,e){this.name=t;this.isBlockDevice=e.isBlockDevice.bind(e);this.isCharacterDevice=e.isCharacterDevice.bind(e);this.isDirectory=e.isDirectory.bind(e);this.isFIFO=e.isFIFO.bind(e);this.isFile=e.isFile.bind(e);this.isSocket=e.isSocket.bind(e);this.isSymbolicLink=e.isSymbolicLink.bind(e)}}function createDirentFromStats(t,e){return new DirentFromStats(t,e)}e.createDirentFromStats=createDirentFromStats},8047:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.fs=void 0;const s=r(7876);e.fs=s},7650:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const s=r(7147);e.FILE_SYSTEM_ADAPTER={lstat:s.lstat,stat:s.stat,lstatSync:s.lstatSync,statSync:s.statSync};function createFileSystemAdapter(t){if(t===undefined){return e.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}e.createFileSystemAdapter=createFileSystemAdapter},2580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.statSync=e.stat=e.Settings=void 0;const s=r(5939);const i=r(105);const n=r(2466);e.Settings=n.default;function stat(t,e,r){if(typeof e==="function"){s.read(t,getSettings(),e);return}s.read(t,getSettings(e),r)}e.stat=stat;function statSync(t,e){const r=getSettings(e);return i.read(t,r)}e.statSync=statSync;function getSettings(t={}){if(t instanceof n.default){return t}return new n.default(t)}},5939:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.read=void 0;function read(t,e,r){e.fs.lstat(t,((s,i)=>{if(s!==null){callFailureCallback(r,s);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){callSuccessCallback(r,i);return}e.fs.stat(t,((t,s)=>{if(t!==null){if(e.throwErrorOnBrokenSymbolicLink){callFailureCallback(r,t);return}callSuccessCallback(r,i);return}if(e.markSymbolicLink){s.isSymbolicLink=()=>true}callSuccessCallback(r,s)}))}))}e.read=read;function callFailureCallback(t,e){t(e)}function callSuccessCallback(t,e){t(null,e)}},105:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.read=void 0;function read(t,e){const r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink){return r}try{const r=e.fs.statSync(t);if(e.markSymbolicLink){r.isSymbolicLink=()=>true}return r}catch(t){if(!e.throwErrorOnBrokenSymbolicLink){return r}throw t}}e.read=read},2466:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7650);class Settings{constructor(t={}){this._options=t;this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,true);this.fs=s.createFileSystemAdapter(this._options.fs);this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true)}_getValue(t,e){return t!==null&&t!==void 0?t:e}}e["default"]=Settings},803:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Settings=e.walkStream=e.walkSync=e.walk=void 0;const s=r(6887);const i=r(7499);const n=r(6875);const o=r(8265);e.Settings=o.default;function walk(t,e,r){if(typeof e==="function"){new s.default(t,getSettings()).read(e);return}new s.default(t,getSettings(e)).read(r)}e.walk=walk;function walkSync(t,e){const r=getSettings(e);const s=new n.default(t,r);return s.read()}e.walkSync=walkSync;function walkStream(t,e){const r=getSettings(e);const s=new i.default(t,r);return s.read()}e.walkStream=walkStream;function getSettings(t={}){if(t instanceof o.default){return t}return new o.default(t)}},6887:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(6203);class AsyncProvider{constructor(t,e){this._root=t;this._settings=e;this._reader=new s.default(this._root,this._settings);this._storage=[]}read(t){this._reader.onError((e=>{callFailureCallback(t,e)}));this._reader.onEntry((t=>{this._storage.push(t)}));this._reader.onEnd((()=>{callSuccessCallback(t,this._storage)}));this._reader.read()}}e["default"]=AsyncProvider;function callFailureCallback(t,e){t(e)}function callSuccessCallback(t,e){t(null,e)}},7499:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2781);const i=r(6203);class StreamProvider{constructor(t,e){this._root=t;this._settings=e;this._reader=new i.default(this._root,this._settings);this._stream=new s.Readable({objectMode:true,read:()=>{},destroy:()=>{if(!this._reader.isDestroyed){this._reader.destroy()}}})}read(){this._reader.onError((t=>{this._stream.emit("error",t)}));this._reader.onEntry((t=>{this._stream.push(t)}));this._reader.onEnd((()=>{this._stream.push(null)}));this._reader.read();return this._stream}}e["default"]=StreamProvider},6875:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1214);class SyncProvider{constructor(t,e){this._root=t;this._settings=e;this._reader=new s.default(this._root,this._settings)}read(){return this._reader.read()}}e["default"]=SyncProvider},6203:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2361);const i=r(7552);const n=r(4309);const o=r(7628);const a=r(3402);class AsyncReader extends a.default{constructor(t,e){super(t,e);this._settings=e;this._scandir=i.scandir;this._emitter=new s.EventEmitter;this._queue=n(this._worker.bind(this),this._settings.concurrency);this._isFatalError=false;this._isDestroyed=false;this._queue.drain=()=>{if(!this._isFatalError){this._emitter.emit("end")}}}read(){this._isFatalError=false;this._isDestroyed=false;setImmediate((()=>{this._pushToQueue(this._root,this._settings.basePath)}));return this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed){throw new Error("The reader is already destroyed")}this._isDestroyed=true;this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,e){const r={directory:t,base:e};this._queue.push(r,(t=>{if(t!==null){this._handleError(t)}}))}_worker(t,e){this._scandir(t.directory,this._settings.fsScandirSettings,((r,s)=>{if(r!==null){e(r,undefined);return}for(const e of s){this._handleEntry(e,t.base)}e(null,undefined)}))}_handleError(t){if(this._isDestroyed||!o.isFatalError(this._settings,t)){return}this._isFatalError=true;this._isDestroyed=true;this._emitter.emit("error",t)}_handleEntry(t,e){if(this._isDestroyed||this._isFatalError){return}const r=t.path;if(e!==undefined){t.path=o.joinPathSegments(e,t.name,this._settings.pathSegmentSeparator)}if(o.isAppliedFilter(this._settings.entryFilter,t)){this._emitEntry(t)}if(t.dirent.isDirectory()&&o.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(r,e===undefined?undefined:t.path)}}_emitEntry(t){this._emitter.emit("entry",t)}}e["default"]=AsyncReader},7628:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.joinPathSegments=e.replacePathSegmentSeparator=e.isAppliedFilter=e.isFatalError=void 0;function isFatalError(t,e){if(t.errorFilter===null){return true}return!t.errorFilter(e)}e.isFatalError=isFatalError;function isAppliedFilter(t,e){return t===null||t(e)}e.isAppliedFilter=isAppliedFilter;function replacePathSegmentSeparator(t,e){return t.split(/[/\\]/).join(e)}e.replacePathSegmentSeparator=replacePathSegmentSeparator;function joinPathSegments(t,e,r){if(t===""){return e}if(t.endsWith(r)){return t+e}return t+r+e}e.joinPathSegments=joinPathSegments},3402:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7628);class Reader{constructor(t,e){this._root=t;this._settings=e;this._root=s.replacePathSegmentSeparator(t,e.pathSegmentSeparator)}}e["default"]=Reader},1214:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7552);const i=r(7628);const n=r(3402);class SyncReader extends n.default{constructor(){super(...arguments);this._scandir=s.scandirSync;this._storage=[];this._queue=new Set}read(){this._pushToQueue(this._root,this._settings.basePath);this._handleQueue();return this._storage}_pushToQueue(t,e){this._queue.add({directory:t,base:e})}_handleQueue(){for(const t of this._queue.values()){this._handleDirectory(t.directory,t.base)}}_handleDirectory(t,e){try{const r=this._scandir(t,this._settings.fsScandirSettings);for(const t of r){this._handleEntry(t,e)}}catch(t){this._handleError(t)}}_handleError(t){if(!i.isFatalError(this._settings,t)){return}throw t}_handleEntry(t,e){const r=t.path;if(e!==undefined){t.path=i.joinPathSegments(e,t.name,this._settings.pathSegmentSeparator)}if(i.isAppliedFilter(this._settings.entryFilter,t)){this._pushToStorage(t)}if(t.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(r,e===undefined?undefined:t.path)}}_pushToStorage(t){this._storage.push(t)}}e["default"]=SyncReader},8265:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1017);const i=r(7552);class Settings{constructor(t={}){this._options=t;this.basePath=this._getValue(this._options.basePath,undefined);this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY);this.deepFilter=this._getValue(this._options.deepFilter,null);this.entryFilter=this._getValue(this._options.entryFilter,null);this.errorFilter=this._getValue(this._options.errorFilter,null);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,s.sep);this.fsScandirSettings=new i.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return t!==null&&t!==void 0?t:e}}e["default"]=Settings},538:(t,e,r)=>{"use strict";const s=r(9200);const i=r(3668);const n=r(5961);const o=r(9594);const braces=(t,e={})=>{let r=[];if(Array.isArray(t)){for(const s of t){const t=braces.create(s,e);if(Array.isArray(t)){r.push(...t)}else{r.push(t)}}}else{r=[].concat(braces.create(t,e))}if(e&&e.expand===true&&e.nodupes===true){r=[...new Set(r)]}return r};braces.parse=(t,e={})=>o(t,e);braces.stringify=(t,e={})=>{if(typeof t==="string"){return s(braces.parse(t,e),e)}return s(t,e)};braces.compile=(t,e={})=>{if(typeof t==="string"){t=braces.parse(t,e)}return i(t,e)};braces.expand=(t,e={})=>{if(typeof t==="string"){t=braces.parse(t,e)}let r=n(t,e);if(e.noempty===true){r=r.filter(Boolean)}if(e.nodupes===true){r=[...new Set(r)]}return r};braces.create=(t,e={})=>{if(t===""||t.length<3){return[t]}return e.expand!==true?braces.compile(t,e):braces.expand(t,e)};t.exports=braces},3668:(t,e,r)=>{"use strict";const s=r(3488);const i=r(4691);const compile=(t,e={})=>{const walk=(t,r={})=>{const n=i.isInvalidBrace(r);const o=t.invalid===true&&e.escapeInvalid===true;const a=n===true||o===true;const l=e.escapeInvalid===true?"\\":"";let u="";if(t.isOpen===true){return l+t.value}if(t.isClose===true){console.log("node.isClose",l,t.value);return l+t.value}if(t.type==="open"){return a?l+t.value:"("}if(t.type==="close"){return a?l+t.value:")"}if(t.type==="comma"){return t.prev.type==="comma"?"":a?t.value:"|"}if(t.value){return t.value}if(t.nodes&&t.ranges>0){const r=i.reduce(t.nodes);const n=s(...r,{...e,wrap:false,toRegex:true,strictZeros:true});if(n.length!==0){return r.length>1&&n.length>1?`(${n})`:n}}if(t.nodes){for(const e of t.nodes){u+=walk(e,t)}}return u};return walk(t)};t.exports=compile},5529:t=>{"use strict";t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},5961:(t,e,r)=>{"use strict";const s=r(3488);const i=r(9200);const n=r(4691);const append=(t="",e="",r=false)=>{const s=[];t=[].concat(t);e=[].concat(e);if(!e.length)return t;if(!t.length){return r?n.flatten(e).map((t=>`{${t}}`)):e}for(const i of t){if(Array.isArray(i)){for(const t of i){s.push(append(t,e,r))}}else{for(let t of e){if(r===true&&typeof t==="string")t=`{${t}}`;s.push(Array.isArray(t)?append(i,t,r):i+t)}}}return n.flatten(s)};const expand=(t,e={})=>{const r=e.rangeLimit===undefined?1e3:e.rangeLimit;const walk=(t,o={})=>{t.queue=[];let a=o;let l=o.queue;while(a.type!=="brace"&&a.type!=="root"&&a.parent){a=a.parent;l=a.queue}if(t.invalid||t.dollar){l.push(append(l.pop(),i(t,e)));return}if(t.type==="brace"&&t.invalid!==true&&t.nodes.length===2){l.push(append(l.pop(),["{}"]));return}if(t.nodes&&t.ranges>0){const o=n.reduce(t.nodes);if(n.exceedsLimit(...o,e.step,r)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let a=s(...o,e);if(a.length===0){a=i(t,e)}l.push(append(l.pop(),a));t.nodes=[];return}const u=n.encloseBrace(t);let c=t.queue;let h=t;while(h.type!=="brace"&&h.type!=="root"&&h.parent){h=h.parent;c=h.queue}for(let e=0;e<t.nodes.length;e++){const r=t.nodes[e];if(r.type==="comma"&&t.type==="brace"){if(e===1)c.push("");c.push("");continue}if(r.type==="close"){l.push(append(l.pop(),c,u));continue}if(r.value&&r.type!=="open"){c.push(append(c.pop(),r.value));continue}if(r.nodes){walk(r,t)}}return c};return n.flatten(walk(t))};t.exports=expand},9594:(t,e,r)=>{"use strict";const s=r(9200);const{MAX_LENGTH:i,CHAR_BACKSLASH:n,CHAR_BACKTICK:o,CHAR_COMMA:a,CHAR_DOT:l,CHAR_LEFT_PARENTHESES:u,CHAR_RIGHT_PARENTHESES:c,CHAR_LEFT_CURLY_BRACE:h,CHAR_RIGHT_CURLY_BRACE:f,CHAR_LEFT_SQUARE_BRACKET:d,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:g,CHAR_SINGLE_QUOTE:m,CHAR_NO_BREAK_SPACE:y,CHAR_ZERO_WIDTH_NOBREAK_SPACE:v}=r(5529);const parse=(t,e={})=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}const r=e||{};const b=typeof r.maxLength==="number"?Math.min(i,r.maxLength):i;if(t.length>b){throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${b})`)}const _={type:"root",input:t,nodes:[]};const S=[_];let w=_;let x=_;let P=0;const E=t.length;let A=0;let k=0;let R;const advance=()=>t[A++];const push=t=>{if(t.type==="text"&&x.type==="dot"){x.type="text"}if(x&&x.type==="text"&&t.type==="text"){x.value+=t.value;return}w.nodes.push(t);t.parent=w;t.prev=x;x=t;return t};push({type:"bos"});while(A<E){w=S[S.length-1];R=advance();if(R===v||R===y){continue}if(R===n){push({type:"text",value:(e.keepEscaping?R:"")+advance()});continue}if(R===p){push({type:"text",value:"\\"+R});continue}if(R===d){P++;let t;while(A<E&&(t=advance())){R+=t;if(t===d){P++;continue}if(t===n){R+=advance();continue}if(t===p){P--;if(P===0){break}}}push({type:"text",value:R});continue}if(R===u){w=push({type:"paren",nodes:[]});S.push(w);push({type:"text",value:R});continue}if(R===c){if(w.type!=="paren"){push({type:"text",value:R});continue}w=S.pop();push({type:"text",value:R});w=S[S.length-1];continue}if(R===g||R===m||R===o){const t=R;let r;if(e.keepQuotes!==true){R=""}while(A<E&&(r=advance())){if(r===n){R+=r+advance();continue}if(r===t){if(e.keepQuotes===true)R+=r;break}R+=r}push({type:"text",value:R});continue}if(R===h){k++;const t=x.value&&x.value.slice(-1)==="$"||w.dollar===true;const e={type:"brace",open:true,close:false,dollar:t,depth:k,commas:0,ranges:0,nodes:[]};w=push(e);S.push(w);push({type:"open",value:R});continue}if(R===f){if(w.type!=="brace"){push({type:"text",value:R});continue}const t="close";w=S.pop();w.close=true;push({type:t,value:R});k--;w=S[S.length-1];continue}if(R===a&&k>0){if(w.ranges>0){w.ranges=0;const t=w.nodes.shift();w.nodes=[t,{type:"text",value:s(w)}]}push({type:"comma",value:R});w.commas++;continue}if(R===l&&k>0&&w.commas===0){const t=w.nodes;if(k===0||t.length===0){push({type:"text",value:R});continue}if(x.type==="dot"){w.range=[];x.value+=R;x.type="range";if(w.nodes.length!==3&&w.nodes.length!==5){w.invalid=true;w.ranges=0;x.type="text";continue}w.ranges++;w.args=[];continue}if(x.type==="range"){t.pop();const e=t[t.length-1];e.value+=x.value+R;x=e;w.ranges--;continue}push({type:"dot",value:R});continue}push({type:"text",value:R})}do{w=S.pop();if(w.type!=="root"){w.nodes.forEach((t=>{if(!t.nodes){if(t.type==="open")t.isOpen=true;if(t.type==="close")t.isClose=true;if(!t.nodes)t.type="text";t.invalid=true}}));const t=S[S.length-1];const e=t.nodes.indexOf(w);t.nodes.splice(e,1,...w.nodes)}}while(S.length>0);push({type:"eos"});return _};t.exports=parse},9200:(t,e,r)=>{"use strict";const s=r(4691);t.exports=(t,e={})=>{const stringify=(t,r={})=>{const i=e.escapeInvalid&&s.isInvalidBrace(r);const n=t.invalid===true&&e.escapeInvalid===true;let o="";if(t.value){if((i||n)&&s.isOpenOrClose(t)){return"\\"+t.value}return t.value}if(t.value){return t.value}if(t.nodes){for(const e of t.nodes){o+=stringify(e)}}return o};return stringify(t)}},4691:(t,e)=>{"use strict";e.isInteger=t=>{if(typeof t==="number"){return Number.isInteger(t)}if(typeof t==="string"&&t.trim()!==""){return Number.isInteger(Number(t))}return false};e.find=(t,e)=>t.nodes.find((t=>t.type===e));e.exceedsLimit=(t,r,s=1,i)=>{if(i===false)return false;if(!e.isInteger(t)||!e.isInteger(r))return false;return(Number(r)-Number(t))/Number(s)>=i};e.escapeNode=(t,e=0,r)=>{const s=t.nodes[e];if(!s)return;if(r&&s.type===r||s.type==="open"||s.type==="close"){if(s.escaped!==true){s.value="\\"+s.value;s.escaped=true}}};e.encloseBrace=t=>{if(t.type!=="brace")return false;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}return false};e.isInvalidBrace=t=>{if(t.type!=="brace")return false;if(t.invalid===true||t.dollar)return true;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}if(t.open!==true||t.close!==true){t.invalid=true;return true}return false};e.isOpenOrClose=t=>{if(t.type==="open"||t.type==="close"){return true}return t.open===true||t.close===true};e.reduce=t=>t.reduce(((t,e)=>{if(e.type==="text")t.push(e.value);if(e.type==="range")e.type="text";return t}),[]);e.flatten=(...t)=>{const e=[];const flat=t=>{for(let r=0;r<t.length;r++){const s=t[r];if(Array.isArray(s)){flat(s);continue}if(s!==undefined){e.push(s)}}return e};flat(t);return e}},8018:(t,e,r)=>{var s=r(2361).EventEmitter;var i=r(2081).spawn;var n=r(1017);var o=n.dirname;var a=n.basename;var l=r(7147);r(3837).inherits(Command,s);e=t.exports=new Command;e.Command=Command;e.Option=Option;function Option(t,e){this.flags=t;this.required=t.indexOf("<")>=0;this.optional=t.indexOf("[")>=0;this.bool=t.indexOf("-no-")===-1;t=t.split(/[ ,|]+/);if(t.length>1&&!/^[[<]/.test(t[1]))this.short=t.shift();this.long=t.shift();this.description=e||""}Option.prototype.name=function(){return this.long.replace("--","").replace("no-","")};Option.prototype.attributeName=function(){return camelcase(this.name())};Option.prototype.is=function(t){return this.short===t||this.long===t};function Command(t){this.commands=[];this.options=[];this._execs={};this._allowUnknownOption=false;this._args=[];this._name=t||""}Command.prototype.command=function(t,e,r){if(typeof e==="object"&&e!==null){r=e;e=null}r=r||{};var s=t.split(/ +/);var i=new Command(s.shift());if(e){i.description(e);this.executables=true;this._execs[i._name]=true;if(r.isDefault)this.defaultExecutable=i._name}i._noHelp=!!r.noHelp;this.commands.push(i);i.parseExpectedArgs(s);i.parent=this;if(e)return this;return i};Command.prototype.arguments=function(t){return this.parseExpectedArgs(t.split(/ +/))};Command.prototype.addImplicitHelpCommand=function(){this.command("help [cmd]","display help for [cmd]")};Command.prototype.parseExpectedArgs=function(t){if(!t.length)return;var e=this;t.forEach((function(t){var r={required:false,name:"",variadic:false};switch(t[0]){case"<":r.required=true;r.name=t.slice(1,-1);break;case"[":r.name=t.slice(1,-1);break}if(r.name.length>3&&r.name.slice(-3)==="..."){r.variadic=true;r.name=r.name.slice(0,-3)}if(r.name){e._args.push(r)}}));return this};Command.prototype.action=function(t){var e=this;var listener=function(r,s){r=r||[];s=s||[];var i=e.parseOptions(s);outputHelpIfNecessary(e,i.unknown);if(i.unknown.length>0){e.unknownOption(i.unknown[0])}if(i.args.length)r=i.args.concat(r);e._args.forEach((function(t,s){if(t.required&&r[s]==null){e.missingArgument(t.name)}else if(t.variadic){if(s!==e._args.length-1){e.variadicArgNotLast(t.name)}r[s]=r.splice(s)}}));if(e._args.length){r[e._args.length]=e}else{r.push(e)}t.apply(e,r)};var r=this.parent||this;var s=r===this?"*":this._name;r.on("command:"+s,listener);if(this._alias)r.on("command:"+this._alias,listener);return this};Command.prototype.option=function(t,e,r,s){var i=this,n=new Option(t,e),o=n.name(),a=n.attributeName();if(typeof r!=="function"){if(r instanceof RegExp){var l=r;r=function(t,e){var r=l.exec(t);return r?r[0]:e}}else{s=r;r=null}}if(!n.bool||n.optional||n.required){if(!n.bool)s=true;if(s!==undefined){i[a]=s;n.defaultValue=s}}this.options.push(n);this.on("option:"+o,(function(t){if(t!==null&&r){t=r(t,i[a]===undefined?s:i[a])}if(typeof i[a]==="boolean"||typeof i[a]==="undefined"){if(t==null){i[a]=n.bool?s||true:false}else{i[a]=t}}else if(t!==null){i[a]=t}}));return this};Command.prototype.allowUnknownOption=function(t){this._allowUnknownOption=arguments.length===0||t;return this};Command.prototype.parse=function(t){if(this.executables)this.addImplicitHelpCommand();this.rawArgs=t;this._name=this._name||a(t[1],".js");if(this.executables&&t.length<3&&!this.defaultExecutable){t.push("--help")}var e=this.parseOptions(this.normalize(t.slice(2)));var r=this.args=e.args;var s=this.parseArgs(this.args,e.unknown);var i=s.args[0];var n=null;if(i){n=this.commands.filter((function(t){return t.alias()===i}))[0]}if(this._execs[i]&&typeof this._execs[i]!=="function"){return this.executeSubCommand(t,r,e.unknown)}else if(n){r[0]=n._name;return this.executeSubCommand(t,r,e.unknown)}else if(this.defaultExecutable){r.unshift(this.defaultExecutable);return this.executeSubCommand(t,r,e.unknown)}return s};Command.prototype.executeSubCommand=function(t,e,r){e=e.concat(r);if(!e.length)this.help();if(e[0]==="help"&&e.length===1)this.help();if(e[0]==="help"){e[0]=e[1];e[1]="--help"}var s=t[1];var u=a(s,n.extname(s))+"-"+e[0];var c;var h=l.realpathSync(s);c=o(h);var f=n.join(c,u);var d=false;if(exists(f+".js")){u=f+".js";d=true}else if(exists(f+".ts")){u=f+".ts";d=true}else if(exists(f)){u=f}e=e.slice(1);var p;if(process.platform!=="win32"){if(d){e.unshift(u);e=(process.execArgv||[]).concat(e);p=i(process.argv[0],e,{stdio:"inherit",customFds:[0,1,2]})}else{p=i(u,e,{stdio:"inherit",customFds:[0,1,2]})}}else{e.unshift(u);p=i(process.execPath,e,{stdio:"inherit"})}var g=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];g.forEach((function(t){process.on(t,(function(){if(p.killed===false&&p.exitCode===null){p.kill(t)}}))}));p.on("close",process.exit.bind(process));p.on("error",(function(t){if(t.code==="ENOENT"){console.error("error: %s(1) does not exist, try --help",u)}else if(t.code==="EACCES"){console.error("error: %s(1) not executable. try chmod or run with root",u)}process.exit(1)}));this.runningCommand=p};Command.prototype.normalize=function(t){var e=[],r,s,i;for(var n=0,o=t.length;n<o;++n){r=t[n];if(n>0){s=this.optionFor(t[n-1])}if(r==="--"){e=e.concat(t.slice(n));break}else if(s&&s.required){e.push(r)}else if(r.length>1&&r[0]==="-"&&r[1]!=="-"){r.slice(1).split("").forEach((function(t){e.push("-"+t)}))}else if(/^--/.test(r)&&~(i=r.indexOf("="))){e.push(r.slice(0,i),r.slice(i+1))}else{e.push(r)}}return e};Command.prototype.parseArgs=function(t,e){var r;if(t.length){r=t[0];if(this.listeners("command:"+r).length){this.emit("command:"+t.shift(),t,e)}else{this.emit("command:*",t)}}else{outputHelpIfNecessary(this,e);if(e.length>0){this.unknownOption(e[0])}if(this.commands.length===0&&this._args.filter((function(t){return t.required})).length===0){this.emit("command:*")}}return this};Command.prototype.optionFor=function(t){for(var e=0,r=this.options.length;e<r;++e){if(this.options[e].is(t)){return this.options[e]}}};Command.prototype.parseOptions=function(t){var e=[],r=t.length,s,i,n;var o=[];for(var a=0;a<r;++a){n=t[a];if(s){e.push(n);continue}if(n==="--"){s=true;continue}i=this.optionFor(n);if(i){if(i.required){n=t[++a];if(n==null)return this.optionMissingArgument(i);this.emit("option:"+i.name(),n)}else if(i.optional){n=t[a+1];if(n==null||n[0]==="-"&&n!=="-"){n=null}else{++a}this.emit("option:"+i.name(),n)}else{this.emit("option:"+i.name())}continue}if(n.length>1&&n[0]==="-"){o.push(n);if(a+1<t.length&&t[a+1][0]!=="-"){o.push(t[++a])}continue}e.push(n)}return{args:e,unknown:o}};Command.prototype.opts=function(){var t={},e=this.options.length;for(var r=0;r<e;r++){var s=this.options[r].attributeName();t[s]=s===this._versionOptionName?this._version:this[s]}return t};Command.prototype.missingArgument=function(t){console.error("error: missing required argument `%s'",t);process.exit(1)};Command.prototype.optionMissingArgument=function(t,e){if(e){console.error("error: option `%s' argument missing, got `%s'",t.flags,e)}else{console.error("error: option `%s' argument missing",t.flags)}process.exit(1)};Command.prototype.unknownOption=function(t){if(this._allowUnknownOption)return;console.error("error: unknown option `%s'",t);process.exit(1)};Command.prototype.variadicArgNotLast=function(t){console.error("error: variadic arguments must be last `%s'",t);process.exit(1)};Command.prototype.version=function(t,e){if(arguments.length===0)return this._version;this._version=t;e=e||"-V, --version";var r=new Option(e,"output the version number");this._versionOptionName=r.long.substr(2)||"version";this.options.push(r);this.on("option:"+this._versionOptionName,(function(){process.stdout.write(t+"\n");process.exit(0)}));return this};Command.prototype.description=function(t,e){if(arguments.length===0)return this._description;this._description=t;this._argsDescription=e;return this};Command.prototype.alias=function(t){var e=this;if(this.commands.length!==0){e=this.commands[this.commands.length-1]}if(arguments.length===0)return e._alias;if(t===e._name)throw new Error("Command alias can't be the same as its name");e._alias=t;return this};Command.prototype.usage=function(t){var e=this._args.map((function(t){return humanReadableArgName(t)}));var r="[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+e.join(" "):"");if(arguments.length===0)return this._usage||r;this._usage=t;return this};Command.prototype.name=function(t){if(arguments.length===0)return this._name;this._name=t;return this};Command.prototype.prepareCommands=function(){return this.commands.filter((function(t){return!t._noHelp})).map((function(t){var e=t._args.map((function(t){return humanReadableArgName(t)})).join(" ");return[t._name+(t._alias?"|"+t._alias:"")+(t.options.length?" [options]":"")+(e?" "+e:""),t._description]}))};Command.prototype.largestCommandLength=function(){var t=this.prepareCommands();return t.reduce((function(t,e){return Math.max(t,e[0].length)}),0)};Command.prototype.largestOptionLength=function(){var t=[].slice.call(this.options);t.push({flags:"-h, --help"});return t.reduce((function(t,e){return Math.max(t,e.flags.length)}),0)};Command.prototype.largestArgLength=function(){return this._args.reduce((function(t,e){return Math.max(t,e.name.length)}),0)};Command.prototype.padWidth=function(){var t=this.largestOptionLength();if(this._argsDescription&&this._args.length){if(this.largestArgLength()>t){t=this.largestArgLength()}}if(this.commands&&this.commands.length){if(this.largestCommandLength()>t){t=this.largestCommandLength()}}return t};Command.prototype.optionHelp=function(){var t=this.padWidth();return this.options.map((function(e){return pad(e.flags,t)+" "+e.description+(e.bool&&e.defaultValue!==undefined?" (default: "+JSON.stringify(e.defaultValue)+")":"")})).concat([pad("-h, --help",t)+" "+"output usage information"]).join("\n")};Command.prototype.commandHelp=function(){if(!this.commands.length)return"";var t=this.prepareCommands();var e=this.padWidth();return["Commands:",t.map((function(t){var r=t[1]?" "+t[1]:"";return(r?pad(t[0],e):t[0])+r})).join("\n").replace(/^/gm," "),""].join("\n")};Command.prototype.helpInformation=function(){var t=[];if(this._description){t=[this._description,""];var e=this._argsDescription;if(e&&this._args.length){var r=this.padWidth();t.push("Arguments:");t.push("");this._args.forEach((function(s){t.push(" "+pad(s.name,r)+" "+e[s.name])}));t.push("")}}var s=this._name;if(this._alias){s=s+"|"+this._alias}var i=["Usage: "+s+" "+this.usage(),""];var n=[];var o=this.commandHelp();if(o)n=[o];var a=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return i.concat(t).concat(a).concat(n).join("\n")};Command.prototype.outputHelp=function(t){if(!t){t=function(t){return t}}process.stdout.write(t(this.helpInformation()));this.emit("--help")};Command.prototype.help=function(t){this.outputHelp(t);process.exit()};function camelcase(t){return t.split("-").reduce((function(t,e){return t+e[0].toUpperCase()+e.slice(1)}))}function pad(t,e){var r=Math.max(0,e-t.length);return t+Array(r+1).join(" ")}function outputHelpIfNecessary(t,e){e=e||[];for(var r=0;r<e.length;r++){if(e[r]==="--help"||e[r]==="-h"){t.outputHelp();process.exit(0)}}}function humanReadableArgName(t){var e=t.name+(t.variadic===true?"...":"");return t.required?"<"+e+">":"["+e+"]"}function exists(t){try{if(l.statSync(t).isFile()){return true}}catch(t){return false}}},5134:t=>{"use strict";
|
|
3
|
-
/*!
|
|
4
|
-
* @description Recursive object extending
|
|
5
|
-
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
|
6
|
-
* @license MIT
|
|
7
|
-
*
|
|
8
|
-
* The MIT License (MIT)
|
|
9
|
-
*
|
|
10
|
-
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
|
|
11
|
-
*
|
|
12
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
13
|
-
* this software and associated documentation files (the "Software"), to deal in
|
|
14
|
-
* the Software without restriction, including without limitation the rights to
|
|
15
|
-
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
16
|
-
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
17
|
-
* subject to the following conditions:
|
|
18
|
-
*
|
|
19
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
* copies or substantial portions of the Software.
|
|
21
|
-
*
|
|
22
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
24
|
-
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
25
|
-
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
26
|
-
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
27
|
-
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
-
*/function isSpecificValue(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp?true:false}function cloneSpecificValue(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);t.copy(e);return e}else if(t instanceof Date){return new Date(t.getTime())}else if(t instanceof RegExp){return new RegExp(t)}else{throw new Error("Unexpected situation")}}function deepCloneArray(t){var r=[];t.forEach((function(t,s){if(typeof t==="object"&&t!==null){if(Array.isArray(t)){r[s]=deepCloneArray(t)}else if(isSpecificValue(t)){r[s]=cloneSpecificValue(t)}else{r[s]=e({},t)}}else{r[s]=t}}));return r}function safeGetProperty(t,e){return e==="__proto__"?undefined:t[e]}var e=t.exports=function(){if(arguments.length<1||typeof arguments[0]!=="object"){return false}if(arguments.length<2){return arguments[0]}var t=arguments[0];var r=Array.prototype.slice.call(arguments,1);var s,i,n;r.forEach((function(r){if(typeof r!=="object"||r===null||Array.isArray(r)){return}Object.keys(r).forEach((function(n){i=safeGetProperty(t,n);s=safeGetProperty(r,n);if(s===t){return}else if(typeof s!=="object"||s===null){t[n]=s;return}else if(Array.isArray(s)){t[n]=deepCloneArray(s);return}else if(isSpecificValue(s)){t[n]=cloneSpecificValue(s);return}else if(typeof i!=="object"||i===null||Array.isArray(i)){t[n]=e({},s);return}else{t[n]=e(i,s);return}}))}));return t}},7058:(t,e,r)=>{"use strict";var s=r(4042);var i=r(1017).posix.dirname;var n=r(2037).platform()==="win32";var o="/";var a=/\\/g;var l=/[\{\[].*[\}\]]$/;var u=/(^|[^\\])([\{\[]|\([^\)]+$)/;var c=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=function globParent(t,e){var r=Object.assign({flipBackslashes:true},e);if(r.flipBackslashes&&n&&t.indexOf(o)<0){t=t.replace(a,o)}if(l.test(t)){t+=o}t+="a";do{t=i(t)}while(s(t)||u.test(t));return t.replace(c,"$1")}},3909:(t,e,r)=>{"use strict";const s=r(132);const i=r(8363);const n=r(342);const o=r(98);const a=r(7960);const l=r(7956);async function FastGlob(t,e){assertPatternsInput(t);const r=getWorks(t,i.default,e);const s=await Promise.all(r);return l.array.flatten(s)}(function(t){t.glob=t;t.globSync=sync;t.globStream=stream;t.async=t;function sync(t,e){assertPatternsInput(t);const r=getWorks(t,o.default,e);return l.array.flatten(r)}t.sync=sync;function stream(t,e){assertPatternsInput(t);const r=getWorks(t,n.default,e);return l.stream.merge(r)}t.stream=stream;function generateTasks(t,e){assertPatternsInput(t);const r=[].concat(t);const i=new a.default(e);return s.generate(r,i)}t.generateTasks=generateTasks;function isDynamicPattern(t,e){assertPatternsInput(t);const r=new a.default(e);return l.pattern.isDynamicPattern(t,r)}t.isDynamicPattern=isDynamicPattern;function escapePath(t){assertPatternsInput(t);return l.path.escape(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return l.path.convertPathToPattern(t)}t.convertPathToPattern=convertPathToPattern;let e;(function(t){function escapePath(t){assertPatternsInput(t);return l.path.escapePosixPath(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return l.path.convertPosixPathToPattern(t)}t.convertPathToPattern=convertPathToPattern})(e=t.posix||(t.posix={}));let r;(function(t){function escapePath(t){assertPatternsInput(t);return l.path.escapeWindowsPath(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return l.path.convertWindowsPathToPattern(t)}t.convertPathToPattern=convertPathToPattern})(r=t.win32||(t.win32={}))})(FastGlob||(FastGlob={}));function getWorks(t,e,r){const i=[].concat(t);const n=new a.default(r);const o=s.generate(i,n);const l=new e(n);return o.map(l.read,l)}function assertPatternsInput(t){const e=[].concat(t);const r=e.every((t=>l.string.isString(t)&&!l.string.isEmpty(t)));if(!r){throw new TypeError("Patterns must be a string (non empty) or an array of strings")}}t.exports=FastGlob},132:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.convertPatternGroupToTask=e.convertPatternGroupsToTasks=e.groupPatternsByBaseDirectory=e.getNegativePatternsAsPositive=e.getPositivePatterns=e.convertPatternsToTasks=e.generate=void 0;const s=r(7956);function generate(t,e){const r=processPatterns(t,e);const i=processPatterns(e.ignore,e);const n=getPositivePatterns(r);const o=getNegativePatternsAsPositive(r,i);const a=n.filter((t=>s.pattern.isStaticPattern(t,e)));const l=n.filter((t=>s.pattern.isDynamicPattern(t,e)));const u=convertPatternsToTasks(a,o,false);const c=convertPatternsToTasks(l,o,true);return u.concat(c)}e.generate=generate;function processPatterns(t,e){let r=t;if(e.braceExpansion){r=s.pattern.expandPatternsWithBraceExpansion(r)}if(e.baseNameMatch){r=r.map((t=>t.includes("/")?t:`**/${t}`))}return r.map((t=>s.pattern.removeDuplicateSlashes(t)))}function convertPatternsToTasks(t,e,r){const i=[];const n=s.pattern.getPatternsOutsideCurrentDirectory(t);const o=s.pattern.getPatternsInsideCurrentDirectory(t);const a=groupPatternsByBaseDirectory(n);const l=groupPatternsByBaseDirectory(o);i.push(...convertPatternGroupsToTasks(a,e,r));if("."in l){i.push(convertPatternGroupToTask(".",o,e,r))}else{i.push(...convertPatternGroupsToTasks(l,e,r))}return i}e.convertPatternsToTasks=convertPatternsToTasks;function getPositivePatterns(t){return s.pattern.getPositivePatterns(t)}e.getPositivePatterns=getPositivePatterns;function getNegativePatternsAsPositive(t,e){const r=s.pattern.getNegativePatterns(t).concat(e);const i=r.map(s.pattern.convertToPositivePattern);return i}e.getNegativePatternsAsPositive=getNegativePatternsAsPositive;function groupPatternsByBaseDirectory(t){const e={};return t.reduce(((t,e)=>{const r=s.pattern.getBaseDirectory(e);if(r in t){t[r].push(e)}else{t[r]=[e]}return t}),e)}e.groupPatternsByBaseDirectory=groupPatternsByBaseDirectory;function convertPatternGroupsToTasks(t,e,r){return Object.keys(t).map((s=>convertPatternGroupToTask(s,t[s],e,r)))}e.convertPatternGroupsToTasks=convertPatternGroupsToTasks;function convertPatternGroupToTask(t,e,r,i){return{dynamic:i,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(s.pattern.convertToNegativePattern))}}e.convertPatternGroupToTask=convertPatternGroupToTask},8363:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1104);const i=r(5306);class ProviderAsync extends i.default{constructor(){super(...arguments);this._reader=new s.default(this._settings)}async read(t){const e=this._getRootDirectory(t);const r=this._getReaderOptions(t);const s=await this.api(e,t,r);return s.map((t=>r.transform(t)))}api(t,e,r){if(e.dynamic){return this._reader.dynamic(t,r)}return this._reader.static(e.patterns,r)}}e["default"]=ProviderAsync},5357:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7956);const i=r(5349);class DeepFilter{constructor(t,e){this._settings=t;this._micromatchOptions=e}getFilter(t,e,r){const s=this._getMatcher(e);const i=this._getNegativePatternsRe(r);return e=>this._filter(t,e,s,i)}_getMatcher(t){return new i.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const e=t.filter(s.pattern.isAffectDepthOfReadingPattern);return s.pattern.convertPatternsToRe(e,this._micromatchOptions)}_filter(t,e,r,i){if(this._isSkippedByDeep(t,e.path)){return false}if(this._isSkippedSymbolicLink(e)){return false}const n=s.path.removeLeadingDotSegment(e.path);if(this._isSkippedByPositivePatterns(n,r)){return false}return this._isSkippedByNegativePatterns(n,i)}_isSkippedByDeep(t,e){if(this._settings.deep===Infinity){return false}return this._getEntryLevel(t,e)>=this._settings.deep}_getEntryLevel(t,e){const r=e.split("/").length;if(t===""){return r}const s=t.split("/").length;return r-s}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,e){return!this._settings.baseNameMatch&&!e.match(t)}_isSkippedByNegativePatterns(t,e){return!s.pattern.matchAny(t,e)}}e["default"]=DeepFilter},9929:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7956);class EntryFilter{constructor(t,e){this._settings=t;this._micromatchOptions=e;this.index=new Map}getFilter(t,e){const r=s.pattern.convertPatternsToRe(t,this._micromatchOptions);const i=s.pattern.convertPatternsToRe(e,Object.assign(Object.assign({},this._micromatchOptions),{dot:true}));return t=>this._filter(t,r,i)}_filter(t,e,r){const i=s.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(i)){return false}if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t)){return false}if(this._isSkippedByAbsoluteNegativePatterns(i,r)){return false}const n=t.dirent.isDirectory();const o=this._isMatchToPatterns(i,e,n)&&!this._isMatchToPatterns(i,r,n);if(this._settings.unique&&o){this._createIndexRecord(i)}return o}_isDuplicateEntry(t){return this.index.has(t)}_createIndexRecord(t){this.index.set(t,undefined)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(t,e){if(!this._settings.absolute){return false}const r=s.path.makeAbsolute(this._settings.cwd,t);return s.pattern.matchAny(r,e)}_isMatchToPatterns(t,e,r){const i=s.pattern.matchAny(t,e);if(!i&&r){return s.pattern.matchAny(t+"/",e)}return i}}e["default"]=EntryFilter},299:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7956);class ErrorFilter{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return s.errno.isEnoentCodeError(t)||this._settings.suppressErrors}}e["default"]=ErrorFilter},90:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7956);class Matcher{constructor(t,e,r){this._patterns=t;this._settings=e;this._micromatchOptions=r;this._storage=[];this._fillStorage()}_fillStorage(){for(const t of this._patterns){const e=this._getPatternSegments(t);const r=this._splitSegmentsIntoSections(e);this._storage.push({complete:r.length<=1,pattern:t,segments:e,sections:r})}}_getPatternSegments(t){const e=s.pattern.getPatternParts(t,this._micromatchOptions);return e.map((t=>{const e=s.pattern.isDynamicPattern(t,this._settings);if(!e){return{dynamic:false,pattern:t}}return{dynamic:true,pattern:t,patternRe:s.pattern.makeRe(t,this._micromatchOptions)}}))}_splitSegmentsIntoSections(t){return s.array.splitWhen(t,(t=>t.dynamic&&s.pattern.hasGlobStar(t.pattern)))}}e["default"]=Matcher},5349:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(90);class PartialMatcher extends s.default{match(t){const e=t.split("/");const r=e.length;const s=this._storage.filter((t=>!t.complete||t.segments.length>r));for(const t of s){const s=t.sections[0];if(!t.complete&&r>s.length){return true}const i=e.every(((e,r)=>{const s=t.segments[r];if(s.dynamic&&s.patternRe.test(e)){return true}if(!s.dynamic&&s.pattern===e){return true}return false}));if(i){return true}}return false}}e["default"]=PartialMatcher},5306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1017);const i=r(5357);const n=r(9929);const o=r(299);const a=r(9769);class Provider{constructor(t){this._settings=t;this.errorFilter=new o.default(this._settings);this.entryFilter=new n.default(this._settings,this._getMicromatchOptions());this.deepFilter=new i.default(this._settings,this._getMicromatchOptions());this.entryTransformer=new a.default(this._settings)}_getRootDirectory(t){return s.resolve(this._settings.cwd,t.base)}_getReaderOptions(t){const e=t.base==="."?"":t.base;return{basePath:e,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(e,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:true,strictSlashes:false}}}e["default"]=Provider},342:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2781);const i=r(722);const n=r(5306);class ProviderStream extends n.default{constructor(){super(...arguments);this._reader=new i.default(this._settings)}read(t){const e=this._getRootDirectory(t);const r=this._getReaderOptions(t);const i=this.api(e,t,r);const n=new s.Readable({objectMode:true,read:()=>{}});i.once("error",(t=>n.emit("error",t))).on("data",(t=>n.emit("data",r.transform(t)))).once("end",(()=>n.emit("end")));n.once("close",(()=>i.destroy()));return n}api(t,e,r){if(e.dynamic){return this._reader.dynamic(t,r)}return this._reader.static(e.patterns,r)}}e["default"]=ProviderStream},98:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(5623);const i=r(5306);class ProviderSync extends i.default{constructor(){super(...arguments);this._reader=new s.default(this._settings)}read(t){const e=this._getRootDirectory(t);const r=this._getReaderOptions(t);const s=this.api(e,t,r);return s.map(r.transform)}api(t,e,r){if(e.dynamic){return this._reader.dynamic(t,r)}return this._reader.static(e.patterns,r)}}e["default"]=ProviderSync},9769:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7956);class EntryTransformer{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let e=t.path;if(this._settings.absolute){e=s.path.makeAbsolute(this._settings.cwd,e);e=s.path.unixify(e)}if(this._settings.markDirectories&&t.dirent.isDirectory()){e+="/"}if(!this._settings.objectMode){return e}return Object.assign(Object.assign({},t),{path:e})}}e["default"]=EntryTransformer},1104:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(803);const i=r(1762);const n=r(722);class ReaderAsync extends i.default{constructor(){super(...arguments);this._walkAsync=s.walk;this._readerStream=new n.default(this._settings)}dynamic(t,e){return new Promise(((r,s)=>{this._walkAsync(t,e,((t,e)=>{if(t===null){r(e)}else{s(t)}}))}))}async static(t,e){const r=[];const s=this._readerStream.static(t,e);return new Promise(((t,e)=>{s.once("error",e);s.on("data",(t=>r.push(t)));s.once("end",(()=>t(r)))}))}}e["default"]=ReaderAsync},1762:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1017);const i=r(2580);const n=r(7956);class Reader{constructor(t){this._settings=t;this._fsStatSettings=new i.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return s.resolve(this._settings.cwd,t)}_makeEntry(t,e){const r={name:e,path:e,dirent:n.fs.createDirentFromStats(e,t)};if(this._settings.stats){r.stats=t}return r}_isFatalError(t){return!n.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}}e["default"]=Reader},722:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2781);const i=r(2580);const n=r(803);const o=r(1762);class ReaderStream extends o.default{constructor(){super(...arguments);this._walkStream=n.walkStream;this._stat=i.stat}dynamic(t,e){return this._walkStream(t,e)}static(t,e){const r=t.map(this._getFullEntryPath,this);const i=new s.PassThrough({objectMode:true});i._write=(s,n,o)=>this._getEntry(r[s],t[s],e).then((t=>{if(t!==null&&e.entryFilter(t)){i.push(t)}if(s===r.length-1){i.end()}o()})).catch(o);for(let t=0;t<r.length;t++){i.write(t)}return i}_getEntry(t,e,r){return this._getStat(t).then((t=>this._makeEntry(t,e))).catch((t=>{if(r.errorFilter(t)){return null}throw t}))}_getStat(t){return new Promise(((e,r)=>{this._stat(t,this._fsStatSettings,((t,s)=>t===null?e(s):r(t)))}))}}e["default"]=ReaderStream},5623:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2580);const i=r(803);const n=r(1762);class ReaderSync extends n.default{constructor(){super(...arguments);this._walkSync=i.walkSync;this._statSync=s.statSync}dynamic(t,e){return this._walkSync(t,e)}static(t,e){const r=[];for(const s of t){const t=this._getFullEntryPath(s);const i=this._getEntry(t,s,e);if(i===null||!e.entryFilter(i)){continue}r.push(i)}return r}_getEntry(t,e,r){try{const r=this._getStat(t);return this._makeEntry(r,e)}catch(t){if(r.errorFilter(t)){return null}throw t}}_getStat(t){return this._statSync(t,this._fsStatSettings)}}e["default"]=ReaderSync},7960:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const s=r(7147);const i=r(2037);const n=Math.max(i.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:s.lstat,lstatSync:s.lstatSync,stat:s.stat,statSync:s.statSync,readdir:s.readdir,readdirSync:s.readdirSync};class Settings{constructor(t={}){this._options=t;this.absolute=this._getValue(this._options.absolute,false);this.baseNameMatch=this._getValue(this._options.baseNameMatch,false);this.braceExpansion=this._getValue(this._options.braceExpansion,true);this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,true);this.concurrency=this._getValue(this._options.concurrency,n);this.cwd=this._getValue(this._options.cwd,process.cwd());this.deep=this._getValue(this._options.deep,Infinity);this.dot=this._getValue(this._options.dot,false);this.extglob=this._getValue(this._options.extglob,true);this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,true);this.fs=this._getFileSystemMethods(this._options.fs);this.globstar=this._getValue(this._options.globstar,true);this.ignore=this._getValue(this._options.ignore,[]);this.markDirectories=this._getValue(this._options.markDirectories,false);this.objectMode=this._getValue(this._options.objectMode,false);this.onlyDirectories=this._getValue(this._options.onlyDirectories,false);this.onlyFiles=this._getValue(this._options.onlyFiles,true);this.stats=this._getValue(this._options.stats,false);this.suppressErrors=this._getValue(this._options.suppressErrors,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,false);this.unique=this._getValue(this._options.unique,true);if(this.onlyDirectories){this.onlyFiles=false}if(this.stats){this.objectMode=true}this.ignore=[].concat(this.ignore)}_getValue(t,e){return t===undefined?e:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}e["default"]=Settings},8689:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.splitWhen=e.flatten=void 0;function flatten(t){return t.reduce(((t,e)=>[].concat(t,e)),[])}e.flatten=flatten;function splitWhen(t,e){const r=[[]];let s=0;for(const i of t){if(e(i)){s++;r[s]=[]}else{r[s].push(i)}}return r}e.splitWhen=splitWhen},3940:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.isEnoentCodeError=void 0;function isEnoentCodeError(t){return t.code==="ENOENT"}e.isEnoentCodeError=isEnoentCodeError},9562:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createDirentFromStats=void 0;class DirentFromStats{constructor(t,e){this.name=t;this.isBlockDevice=e.isBlockDevice.bind(e);this.isCharacterDevice=e.isCharacterDevice.bind(e);this.isDirectory=e.isDirectory.bind(e);this.isFIFO=e.isFIFO.bind(e);this.isFile=e.isFile.bind(e);this.isSocket=e.isSocket.bind(e);this.isSymbolicLink=e.isSymbolicLink.bind(e)}}function createDirentFromStats(t,e){return new DirentFromStats(t,e)}e.createDirentFromStats=createDirentFromStats},7956:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.string=e.stream=e.pattern=e.path=e.fs=e.errno=e.array=void 0;const s=r(8689);e.array=s;const i=r(3940);e.errno=i;const n=r(9562);e.fs=n;const o=r(9128);e.path=o;const a=r(8655);e.pattern=a;const l=r(5114);e.stream=l;const u=r(3050);e.string=u},9128:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.convertPosixPathToPattern=e.convertWindowsPathToPattern=e.convertPathToPattern=e.escapePosixPath=e.escapeWindowsPath=e.escape=e.removeLeadingDotSegment=e.makeAbsolute=e.unixify=void 0;const s=r(2037);const i=r(1017);const n=s.platform()==="win32";const o=2;const a=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;const l=/(\\?)([(){}]|^!|[!+@](?=\())/g;const u=/^\\\\([.?])/;const c=/\\(?![!()+@{}])/g;function unixify(t){return t.replace(/\\/g,"/")}e.unixify=unixify;function makeAbsolute(t,e){return i.resolve(t,e)}e.makeAbsolute=makeAbsolute;function removeLeadingDotSegment(t){if(t.charAt(0)==="."){const e=t.charAt(1);if(e==="/"||e==="\\"){return t.slice(o)}}return t}e.removeLeadingDotSegment=removeLeadingDotSegment;e.escape=n?escapeWindowsPath:escapePosixPath;function escapeWindowsPath(t){return t.replace(l,"\\$2")}e.escapeWindowsPath=escapeWindowsPath;function escapePosixPath(t){return t.replace(a,"\\$2")}e.escapePosixPath=escapePosixPath;e.convertPathToPattern=n?convertWindowsPathToPattern:convertPosixPathToPattern;function convertWindowsPathToPattern(t){return escapeWindowsPath(t).replace(u,"//$1").replace(c,"/")}e.convertWindowsPathToPattern=convertWindowsPathToPattern;function convertPosixPathToPattern(t){return escapePosixPath(t)}e.convertPosixPathToPattern=convertPosixPathToPattern},8655:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.removeDuplicateSlashes=e.matchAny=e.convertPatternsToRe=e.makeRe=e.getPatternParts=e.expandBraceExpansion=e.expandPatternsWithBraceExpansion=e.isAffectDepthOfReadingPattern=e.endsWithSlashGlobStar=e.hasGlobStar=e.getBaseDirectory=e.isPatternRelatedToParentDirectory=e.getPatternsOutsideCurrentDirectory=e.getPatternsInsideCurrentDirectory=e.getPositivePatterns=e.getNegativePatterns=e.isPositivePattern=e.isNegativePattern=e.convertToNegativePattern=e.convertToPositivePattern=e.isDynamicPattern=e.isStaticPattern=void 0;const s=r(1017);const i=r(7058);const n=r(9015);const o="**";const a="\\";const l=/[*?]|^!/;const u=/\[[^[]*]/;const c=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;const h=/[!*+?@]\([^(]*\)/;const f=/,|\.\./;const d=/(?!^)\/{2,}/g;function isStaticPattern(t,e={}){return!isDynamicPattern(t,e)}e.isStaticPattern=isStaticPattern;function isDynamicPattern(t,e={}){if(t===""){return false}if(e.caseSensitiveMatch===false||t.includes(a)){return true}if(l.test(t)||u.test(t)||c.test(t)){return true}if(e.extglob!==false&&h.test(t)){return true}if(e.braceExpansion!==false&&hasBraceExpansion(t)){return true}return false}e.isDynamicPattern=isDynamicPattern;function hasBraceExpansion(t){const e=t.indexOf("{");if(e===-1){return false}const r=t.indexOf("}",e+1);if(r===-1){return false}const s=t.slice(e,r);return f.test(s)}function convertToPositivePattern(t){return isNegativePattern(t)?t.slice(1):t}e.convertToPositivePattern=convertToPositivePattern;function convertToNegativePattern(t){return"!"+t}e.convertToNegativePattern=convertToNegativePattern;function isNegativePattern(t){return t.startsWith("!")&&t[1]!=="("}e.isNegativePattern=isNegativePattern;function isPositivePattern(t){return!isNegativePattern(t)}e.isPositivePattern=isPositivePattern;function getNegativePatterns(t){return t.filter(isNegativePattern)}e.getNegativePatterns=getNegativePatterns;function getPositivePatterns(t){return t.filter(isPositivePattern)}e.getPositivePatterns=getPositivePatterns;function getPatternsInsideCurrentDirectory(t){return t.filter((t=>!isPatternRelatedToParentDirectory(t)))}e.getPatternsInsideCurrentDirectory=getPatternsInsideCurrentDirectory;function getPatternsOutsideCurrentDirectory(t){return t.filter(isPatternRelatedToParentDirectory)}e.getPatternsOutsideCurrentDirectory=getPatternsOutsideCurrentDirectory;function isPatternRelatedToParentDirectory(t){return t.startsWith("..")||t.startsWith("./..")}e.isPatternRelatedToParentDirectory=isPatternRelatedToParentDirectory;function getBaseDirectory(t){return i(t,{flipBackslashes:false})}e.getBaseDirectory=getBaseDirectory;function hasGlobStar(t){return t.includes(o)}e.hasGlobStar=hasGlobStar;function endsWithSlashGlobStar(t){return t.endsWith("/"+o)}e.endsWithSlashGlobStar=endsWithSlashGlobStar;function isAffectDepthOfReadingPattern(t){const e=s.basename(t);return endsWithSlashGlobStar(t)||isStaticPattern(e)}e.isAffectDepthOfReadingPattern=isAffectDepthOfReadingPattern;function expandPatternsWithBraceExpansion(t){return t.reduce(((t,e)=>t.concat(expandBraceExpansion(e))),[])}e.expandPatternsWithBraceExpansion=expandPatternsWithBraceExpansion;function expandBraceExpansion(t){const e=n.braces(t,{expand:true,nodupes:true});e.sort(((t,e)=>t.length-e.length));return e.filter((t=>t!==""))}e.expandBraceExpansion=expandBraceExpansion;function getPatternParts(t,e){let{parts:r}=n.scan(t,Object.assign(Object.assign({},e),{parts:true}));if(r.length===0){r=[t]}if(r[0].startsWith("/")){r[0]=r[0].slice(1);r.unshift("")}return r}e.getPatternParts=getPatternParts;function makeRe(t,e){return n.makeRe(t,e)}e.makeRe=makeRe;function convertPatternsToRe(t,e){return t.map((t=>makeRe(t,e)))}e.convertPatternsToRe=convertPatternsToRe;function matchAny(t,e){return e.some((e=>e.test(t)))}e.matchAny=matchAny;function removeDuplicateSlashes(t){return t.replace(d,"/")}e.removeDuplicateSlashes=removeDuplicateSlashes},5114:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.merge=void 0;const s=r(2375);function merge(t){const e=s(t);t.forEach((t=>{t.once("error",(t=>e.emit("error",t)))}));e.once("close",(()=>propagateCloseEventToSources(t)));e.once("end",(()=>propagateCloseEventToSources(t)));return e}e.merge=merge;function propagateCloseEventToSources(t){t.forEach((t=>t.emit("close")))}},3050:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.isEmpty=e.isString=void 0;function isString(t){return typeof t==="string"}e.isString=isString;function isEmpty(t){return t===""}e.isEmpty=isEmpty},3488:(t,e,r)=>{"use strict";
|
|
29
|
-
/*!
|
|
30
|
-
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
31
|
-
*
|
|
32
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
33
|
-
* Licensed under the MIT License.
|
|
34
|
-
*/const s=r(3837);const i=r(887);const isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);const transform=t=>e=>t===true?Number(e):String(e);const isValidValue=t=>typeof t==="number"||typeof t==="string"&&t!=="";const isNumber=t=>Number.isInteger(+t);const zeros=t=>{let e=`${t}`;let r=-1;if(e[0]==="-")e=e.slice(1);if(e==="0")return false;while(e[++r]==="0");return r>0};const stringify=(t,e,r)=>{if(typeof t==="string"||typeof e==="string"){return true}return r.stringify===true};const pad=(t,e,r)=>{if(e>0){let r=t[0]==="-"?"-":"";if(r)t=t.slice(1);t=r+t.padStart(r?e-1:e,"0")}if(r===false){return String(t)}return t};const toMaxLen=(t,e)=>{let r=t[0]==="-"?"-":"";if(r){t=t.slice(1);e--}while(t.length<e)t="0"+t;return r?"-"+t:t};const toSequence=(t,e,r)=>{t.negatives.sort(((t,e)=>t<e?-1:t>e?1:0));t.positives.sort(((t,e)=>t<e?-1:t>e?1:0));let s=e.capture?"":"?:";let i="";let n="";let o;if(t.positives.length){i=t.positives.map((t=>toMaxLen(String(t),r))).join("|")}if(t.negatives.length){n=`-(${s}${t.negatives.map((t=>toMaxLen(String(t),r))).join("|")})`}if(i&&n){o=`${i}|${n}`}else{o=i||n}if(e.wrap){return`(${s}${o})`}return o};const toRange=(t,e,r,s)=>{if(r){return i(t,e,{wrap:false,...s})}let n=String.fromCharCode(t);if(t===e)return n;let o=String.fromCharCode(e);return`[${n}-${o}]`};const toRegex=(t,e,r)=>{if(Array.isArray(t)){let e=r.wrap===true;let s=r.capture?"":"?:";return e?`(${s}${t.join("|")})`:t.join("|")}return i(t,e,r)};const rangeError=(...t)=>new RangeError("Invalid range arguments: "+s.inspect(...t));const invalidRange=(t,e,r)=>{if(r.strictRanges===true)throw rangeError([t,e]);return[]};const invalidStep=(t,e)=>{if(e.strictRanges===true){throw new TypeError(`Expected step "${t}" to be a number`)}return[]};const fillNumbers=(t,e,r=1,s={})=>{let i=Number(t);let n=Number(e);if(!Number.isInteger(i)||!Number.isInteger(n)){if(s.strictRanges===true)throw rangeError([t,e]);return[]}if(i===0)i=0;if(n===0)n=0;let o=i>n;let a=String(t);let l=String(e);let u=String(r);r=Math.max(Math.abs(r),1);let c=zeros(a)||zeros(l)||zeros(u);let h=c?Math.max(a.length,l.length,u.length):0;let f=c===false&&stringify(t,e,s)===false;let d=s.transform||transform(f);if(s.toRegex&&r===1){return toRange(toMaxLen(t,h),toMaxLen(e,h),true,s)}let p={negatives:[],positives:[]};let push=t=>p[t<0?"negatives":"positives"].push(Math.abs(t));let g=[];let m=0;while(o?i>=n:i<=n){if(s.toRegex===true&&r>1){push(i)}else{g.push(pad(d(i,m),h,f))}i=o?i-r:i+r;m++}if(s.toRegex===true){return r>1?toSequence(p,s,h):toRegex(g,null,{wrap:false,...s})}return g};const fillLetters=(t,e,r=1,s={})=>{if(!isNumber(t)&&t.length>1||!isNumber(e)&&e.length>1){return invalidRange(t,e,s)}let i=s.transform||(t=>String.fromCharCode(t));let n=`${t}`.charCodeAt(0);let o=`${e}`.charCodeAt(0);let a=n>o;let l=Math.min(n,o);let u=Math.max(n,o);if(s.toRegex&&r===1){return toRange(l,u,false,s)}let c=[];let h=0;while(a?n>=o:n<=o){c.push(i(n,h));n=a?n-r:n+r;h++}if(s.toRegex===true){return toRegex(c,null,{wrap:false,options:s})}return c};const fill=(t,e,r,s={})=>{if(e==null&&isValidValue(t)){return[t]}if(!isValidValue(t)||!isValidValue(e)){return invalidRange(t,e,s)}if(typeof r==="function"){return fill(t,e,1,{transform:r})}if(isObject(r)){return fill(t,e,0,r)}let i={...s};if(i.capture===true)i.wrap=true;r=r||i.step||1;if(!isNumber(r)){if(r!=null&&!isObject(r))return invalidStep(r,i);return fill(t,e,1,r)}if(isNumber(t)&&isNumber(e)){return fillNumbers(t,e,r,i)}return fillLetters(t,e,Math.max(Math.abs(r),1),i)};t.exports=fill},1923:(t,e)=>{e.parse=e.decode=decode;e.stringify=e.encode=encode;e.safe=safe;e.unsafe=unsafe;var r=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(t,e){var s=[];var i="";if(typeof e==="string"){e={section:e,whitespace:false}}else{e=e||{};e.whitespace=e.whitespace===true}var n=e.whitespace?" = ":"=";Object.keys(t).forEach((function(e,o,a){var l=t[e];if(l&&Array.isArray(l)){l.forEach((function(t){i+=safe(e+"[]")+n+safe(t)+"\n"}))}else if(l&&typeof l==="object")s.push(e);else i+=safe(e)+n+safe(l)+r}));if(e.section&&i.length)i="["+safe(e.section)+"]"+r+i;s.forEach((function(s,n,o){var a=dotSplit(s).join("\\.");var l=(e.section?e.section+".":"")+a;var u=encode(t[s],{section:l,whitespace:e.whitespace});if(i.length&&u.length)i+=r;i+=u}));return i}function dotSplit(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(t){return t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function decode(t){var e={};var r=e;var s=null;var i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var n=t.split(/[\r\n]+/g);n.forEach((function(t,n,o){if(!t||t.match(/^\s*[;#]/))return;var a=t.match(i);if(!a)return;if(a[1]!==undefined){s=unsafe(a[1]);if(s==="__proto__"){r={};return}r=e[s]=e[s]||{};return}var l=unsafe(a[2]);if(l==="__proto__")return;var u=a[3]?unsafe(a[4]):true;switch(u){case"true":case"false":case"null":u=JSON.parse(u)}if(l.length>2&&l.slice(-2)==="[]"){l=l.substring(0,l.length-2);if(l==="__proto__")return;if(!r[l])r[l]=[];else if(!Array.isArray(r[l]))r[l]=[r[l]]}if(Array.isArray(r[l]))r[l].push(u);else r[l]=u}));Object.keys(e).filter((function(t,r,s){if(!e[t]||typeof e[t]!=="object"||Array.isArray(e[t]))return false;var i=dotSplit(t);var n=e;var o=i.pop();var a=o.replace(/\\\./g,".");i.forEach((function(t,e,r){if(t==="__proto__")return;if(!n[t]||typeof n[t]!=="object")n[t]={};n=n[t]}));if(n===e&&a===o)return false;n[a]=e[t];return true})).forEach((function(t,r,s){delete e[t]}));return e}function isQuoted(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function safe(t){return typeof t!=="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&isQuoted(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(t,e){t=(t||"").trim();if(isQuoted(t)){if(t.charAt(0)==="'")t=t.substr(1,t.length-2);try{t=JSON.parse(t)}catch(t){}}else{var r=false;var s="";for(var i=0,n=t.length;i<n;i++){var o=t.charAt(i);if(r){if("\\;#".indexOf(o)!==-1)s+=o;else s+="\\"+o;r=false}else if(";#".indexOf(o)!==-1)break;else if(o==="\\")r=true;else s+=o}if(r)s+="\\";return s.trim()}return t}},6546:t=>{
|
|
35
|
-
/*!
|
|
36
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
39
|
-
* Licensed under the MIT License.
|
|
40
|
-
*/
|
|
41
|
-
t.exports=function isExtglob(t){if(typeof t!=="string"||t===""){return false}var e;while(e=/(\\).|([@?!+*]\(.*\))/g.exec(t)){if(e[2])return true;t=t.slice(e.index+e[0].length)}return false}},4042:(t,e,r)=>{
|
|
42
|
-
/*!
|
|
43
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
44
|
-
*
|
|
45
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
46
|
-
* Released under the MIT License.
|
|
47
|
-
*/
|
|
48
|
-
var s=r(6546);var i={"{":"}","(":")","[":"]"};var strictCheck=function(t){if(t[0]==="!"){return true}var e=0;var r=-2;var s=-2;var n=-2;var o=-2;var a=-2;while(e<t.length){if(t[e]==="*"){return true}if(t[e+1]==="?"&&/[\].+)]/.test(t[e])){return true}if(s!==-1&&t[e]==="["&&t[e+1]!=="]"){if(s<e){s=t.indexOf("]",e)}if(s>e){if(a===-1||a>s){return true}a=t.indexOf("\\",e);if(a===-1||a>s){return true}}}if(n!==-1&&t[e]==="{"&&t[e+1]!=="}"){n=t.indexOf("}",e);if(n>e){a=t.indexOf("\\",e);if(a===-1||a>n){return true}}}if(o!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"){o=t.indexOf(")",e);if(o>e){a=t.indexOf("\\",e);if(a===-1||a>o){return true}}}if(r!==-1&&t[e]==="("&&t[e+1]!=="|"){if(r<e){r=t.indexOf("|",e)}if(r!==-1&&t[r+1]!==")"){o=t.indexOf(")",r);if(o>r){a=t.indexOf("\\",r);if(a===-1||a>o){return true}}}}if(t[e]==="\\"){var l=t[e+1];e+=2;var u=i[l];if(u){var c=t.indexOf(u,e);if(c!==-1){e=c+1}}if(t[e]==="!"){return true}}else{e++}}return false};var relaxedCheck=function(t){if(t[0]==="!"){return true}var e=0;while(e<t.length){if(/[*?{}()[\]]/.test(t[e])){return true}if(t[e]==="\\"){var r=t[e+1];e+=2;var s=i[r];if(s){var n=t.indexOf(s,e);if(n!==-1){e=n+1}}if(t[e]==="!"){return true}}else{e++}}return false};t.exports=function isGlob(t,e){if(typeof t!=="string"||t===""){return false}if(s(t)){return true}var r=strictCheck;if(e&&e.strict===false){r=relaxedCheck}return r(t)}},6110:t=>{"use strict";
|
|
49
|
-
/*!
|
|
50
|
-
* is-number <https://github.com/jonschlinkert/is-number>
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
53
|
-
* Released under the MIT License.
|
|
54
|
-
*/t.exports=function(t){if(typeof t==="number"){return t-t===0}if(typeof t==="string"&&t.trim()!==""){return Number.isFinite?Number.isFinite(+t):isFinite(+t)}return false}},228:(t,e,r)=>{var s=r(7147);var i;if(process.platform==="win32"||global.TESTING_WINDOWS){i=r(7214)}else{i=r(5211)}t.exports=isexe;isexe.sync=sync;function isexe(t,e,r){if(typeof e==="function"){r=e;e={}}if(!r){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(r,s){isexe(t,e||{},(function(t,e){if(t){s(t)}else{r(e)}}))}))}i(t,e||{},(function(t,s){if(t){if(t.code==="EACCES"||e&&e.ignoreErrors){t=null;s=false}}r(t,s)}))}function sync(t,e){try{return i.sync(t,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES"){return false}else{throw t}}}},5211:(t,e,r)=>{t.exports=isexe;isexe.sync=sync;var s=r(7147);function isexe(t,e,r){s.stat(t,(function(t,s){r(t,t?false:checkStat(s,e))}))}function sync(t,e){return checkStat(s.statSync(t),e)}function checkStat(t,e){return t.isFile()&&checkMode(t,e)}function checkMode(t,e){var r=t.mode;var s=t.uid;var i=t.gid;var n=e.uid!==undefined?e.uid:process.getuid&&process.getuid();var o=e.gid!==undefined?e.gid:process.getgid&&process.getgid();var a=parseInt("100",8);var l=parseInt("010",8);var u=parseInt("001",8);var c=a|l;var h=r&u||r&l&&i===o||r&a&&s===n||r&c&&n===0;return h}},7214:(t,e,r)=>{t.exports=isexe;isexe.sync=sync;var s=r(7147);function checkPathExt(t,e){var r=e.pathExt!==undefined?e.pathExt:process.env.PATHEXT;if(!r){return true}r=r.split(";");if(r.indexOf("")!==-1){return true}for(var s=0;s<r.length;s++){var i=r[s].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i){return true}}return false}function checkStat(t,e,r){if(!t.isSymbolicLink()&&!t.isFile()){return false}return checkPathExt(e,r)}function isexe(t,e,r){s.stat(t,(function(s,i){r(s,s?false:checkStat(i,t,e))}))}function sync(t,e){return checkStat(s.statSync(t),t,e)}},9439:t=>{"use strict";const{FORCE_COLOR:e,NODE_DISABLE_COLORS:r,TERM:s}=process.env;const i={enabled:!r&&s!=="dumb"&&e!=="0",reset:init(0,0),bold:init(1,22),dim:init(2,22),italic:init(3,23),underline:init(4,24),inverse:init(7,27),hidden:init(8,28),strikethrough:init(9,29),black:init(30,39),red:init(31,39),green:init(32,39),yellow:init(33,39),blue:init(34,39),magenta:init(35,39),cyan:init(36,39),white:init(37,39),gray:init(90,39),grey:init(90,39),bgBlack:init(40,49),bgRed:init(41,49),bgGreen:init(42,49),bgYellow:init(43,49),bgBlue:init(44,49),bgMagenta:init(45,49),bgCyan:init(46,49),bgWhite:init(47,49)};function run(t,e){let r=0,s,i="",n="";for(;r<t.length;r++){s=t[r];i+=s.open;n+=s.close;if(e.includes(s.close)){e=e.replace(s.rgx,s.close+s.open)}}return i+e+n}function chain(t,e){let r={has:t,keys:e};r.reset=i.reset.bind(r);r.bold=i.bold.bind(r);r.dim=i.dim.bind(r);r.italic=i.italic.bind(r);r.underline=i.underline.bind(r);r.inverse=i.inverse.bind(r);r.hidden=i.hidden.bind(r);r.strikethrough=i.strikethrough.bind(r);r.black=i.black.bind(r);r.red=i.red.bind(r);r.green=i.green.bind(r);r.yellow=i.yellow.bind(r);r.blue=i.blue.bind(r);r.magenta=i.magenta.bind(r);r.cyan=i.cyan.bind(r);r.white=i.white.bind(r);r.gray=i.gray.bind(r);r.grey=i.grey.bind(r);r.bgBlack=i.bgBlack.bind(r);r.bgRed=i.bgRed.bind(r);r.bgGreen=i.bgGreen.bind(r);r.bgYellow=i.bgYellow.bind(r);r.bgBlue=i.bgBlue.bind(r);r.bgMagenta=i.bgMagenta.bind(r);r.bgCyan=i.bgCyan.bind(r);r.bgWhite=i.bgWhite.bind(r);return r}function init(t,e){let r={open:`[${t}m`,close:`[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(e){if(this!==void 0&&this.has!==void 0){this.has.includes(t)||(this.has.push(t),this.keys.push(r));return e===void 0?this:i.enabled?run(this.keys,e+""):e+""}return e===void 0?chain([t],[r]):i.enabled?run([r],e+""):e+""}}t.exports=i},2375:(t,e,r)=>{"use strict";const s=r(2781);const i=s.PassThrough;const n=Array.prototype.slice;t.exports=merge2;function merge2(){const t=[];const e=n.call(arguments);let r=false;let s=e[e.length-1];if(s&&!Array.isArray(s)&&s.pipe==null){e.pop()}else{s={}}const o=s.end!==false;const a=s.pipeError===true;if(s.objectMode==null){s.objectMode=true}if(s.highWaterMark==null){s.highWaterMark=64*1024}const l=i(s);function addStream(){for(let e=0,r=arguments.length;e<r;e++){t.push(pauseStreams(arguments[e],s))}mergeStream();return this}function mergeStream(){if(r){return}r=true;let e=t.shift();if(!e){process.nextTick(endStream);return}if(!Array.isArray(e)){e=[e]}let s=e.length+1;function next(){if(--s>0){return}r=false;mergeStream()}function pipe(t){function onend(){t.removeListener("merge2UnpipeEnd",onend);t.removeListener("end",onend);if(a){t.removeListener("error",onerror)}next()}function onerror(t){l.emit("error",t)}if(t._readableState.endEmitted){return next()}t.on("merge2UnpipeEnd",onend);t.on("end",onend);if(a){t.on("error",onerror)}t.pipe(l,{end:false});t.resume()}for(let t=0;t<e.length;t++){pipe(e[t])}next()}function endStream(){r=false;l.emit("queueDrain");if(o){l.end()}}l.setMaxListeners(0);l.add=addStream;l.on("unpipe",(function(t){t.emit("merge2UnpipeEnd")}));if(e.length){addStream.apply(null,e)}return l}function pauseStreams(t,e){if(!Array.isArray(t)){if(!t._readableState&&t.pipe){t=t.pipe(i(e))}if(!t._readableState||!t.pause||!t.pipe){throw new Error("Only readable stream can be merged.")}t.pause()}else{for(let r=0,s=t.length;r<s;r++){t[r]=pauseStreams(t[r],e)}}return t}},9015:(t,e,r)=>{"use strict";const s=r(3837);const i=r(538);const n=r(9138);const o=r(2924);const isEmptyString=t=>t===""||t==="./";const hasBraces=t=>{const e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1};const micromatch=(t,e,r)=>{e=[].concat(e);t=[].concat(t);let s=new Set;let i=new Set;let o=new Set;let a=0;let onResult=t=>{o.add(t.output);if(r&&r.onResult){r.onResult(t)}};for(let o=0;o<e.length;o++){let l=n(String(e[o]),{...r,onResult:onResult},true);let u=l.state.negated||l.state.negatedExtglob;if(u)a++;for(let e of t){let t=l(e,true);let r=u?!t.isMatch:t.isMatch;if(!r)continue;if(u){s.add(t.output)}else{s.delete(t.output);i.add(t.output)}}}let l=a===e.length?[...o]:[...i];let u=l.filter((t=>!s.has(t)));if(r&&u.length===0){if(r.failglob===true){throw new Error(`No matches found for "${e.join(", ")}"`)}if(r.nonull===true||r.nullglob===true){return r.unescape?e.map((t=>t.replace(/\\/g,""))):e}}return u};micromatch.match=micromatch;micromatch.matcher=(t,e)=>n(t,e);micromatch.isMatch=(t,e,r)=>n(e,r)(t);micromatch.any=micromatch.isMatch;micromatch.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set;let i=[];let onResult=t=>{if(r.onResult)r.onResult(t);i.push(t.output)};let n=new Set(micromatch(t,e,{...r,onResult:onResult}));for(let t of i){if(!n.has(t)){s.add(t)}}return[...s]};micromatch.contains=(t,e,r)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${s.inspect(t)}"`)}if(Array.isArray(e)){return e.some((e=>micromatch.contains(t,e,r)))}if(typeof e==="string"){if(isEmptyString(t)||isEmptyString(e)){return false}if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e)){return true}}return micromatch.isMatch(t,e,{...r,contains:true})};micromatch.matchKeys=(t,e,r)=>{if(!o.isObject(t)){throw new TypeError("Expected the first argument to be an object")}let s=micromatch(Object.keys(t),e,r);let i={};for(let e of s)i[e]=t[e];return i};micromatch.some=(t,e,r)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),r);if(s.some((t=>e(t)))){return true}}return false};micromatch.every=(t,e,r)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),r);if(!s.every((t=>e(t)))){return false}}return true};micromatch.all=(t,e,r)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${s.inspect(t)}"`)}return[].concat(e).every((e=>n(e,r)(t)))};micromatch.capture=(t,e,r)=>{let s=o.isWindows(r);let i=n.makeRe(String(t),{...r,capture:true});let a=i.exec(s?o.toPosixSlashes(e):e);if(a){return a.slice(1).map((t=>t===void 0?"":t))}};micromatch.makeRe=(...t)=>n.makeRe(...t);micromatch.scan=(...t)=>n.scan(...t);micromatch.parse=(t,e)=>{let r=[];for(let s of[].concat(t||[])){for(let t of i(String(s),e)){r.push(n.parse(t,e))}}return r};micromatch.braces=(t,e)=>{if(typeof t!=="string")throw new TypeError("Expected a string");if(e&&e.nobrace===true||!hasBraces(t)){return[t]}return i(t,e)};micromatch.braceExpand=(t,e)=>{if(typeof t!=="string")throw new TypeError("Expected a string");return micromatch.braces(t,{...e,expand:true})};micromatch.hasBraces=hasBraces;t.exports=micromatch},5912:t=>{"use strict";function hasKey(t,e){var r=t;e.slice(0,-1).forEach((function(t){r=r[t]||{}}));var s=e[e.length-1];return s in r}function isNumber(t){if(typeof t==="number"){return true}if(/^0x[0-9a-f]+$/i.test(t)){return true}return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function isConstructorOrProto(t,e){return e==="constructor"&&typeof t[e]==="function"||e==="__proto__"}t.exports=function(t,e){if(!e){e={}}var r={bools:{},strings:{},unknownFn:null};if(typeof e.unknown==="function"){r.unknownFn=e.unknown}if(typeof e.boolean==="boolean"&&e.boolean){r.allBools=true}else{[].concat(e.boolean).filter(Boolean).forEach((function(t){r.bools[t]=true}))}var s={};function aliasIsBoolean(t){return s[t].some((function(t){return r.bools[t]}))}Object.keys(e.alias||{}).forEach((function(t){s[t]=[].concat(e.alias[t]);s[t].forEach((function(e){s[e]=[t].concat(s[t].filter((function(t){return e!==t})))}))}));[].concat(e.string).filter(Boolean).forEach((function(t){r.strings[t]=true;if(s[t]){[].concat(s[t]).forEach((function(t){r.strings[t]=true}))}}));var i=e.default||{};var n={_:[]};function argDefined(t,e){return r.allBools&&/^--[^=]+$/.test(e)||r.strings[t]||r.bools[t]||s[t]}function setKey(t,e,s){var i=t;for(var n=0;n<e.length-1;n++){var o=e[n];if(isConstructorOrProto(i,o)){return}if(i[o]===undefined){i[o]={}}if(i[o]===Object.prototype||i[o]===Number.prototype||i[o]===String.prototype){i[o]={}}if(i[o]===Array.prototype){i[o]=[]}i=i[o]}var a=e[e.length-1];if(isConstructorOrProto(i,a)){return}if(i===Object.prototype||i===Number.prototype||i===String.prototype){i={}}if(i===Array.prototype){i=[]}if(i[a]===undefined||r.bools[a]||typeof i[a]==="boolean"){i[a]=s}else if(Array.isArray(i[a])){i[a].push(s)}else{i[a]=[i[a],s]}}function setArg(t,e,i){if(i&&r.unknownFn&&!argDefined(t,i)){if(r.unknownFn(i)===false){return}}var o=!r.strings[t]&&isNumber(e)?Number(e):e;setKey(n,t.split("."),o);(s[t]||[]).forEach((function(t){setKey(n,t.split("."),o)}))}Object.keys(r.bools).forEach((function(t){setArg(t,i[t]===undefined?false:i[t])}));var o=[];if(t.indexOf("--")!==-1){o=t.slice(t.indexOf("--")+1);t=t.slice(0,t.indexOf("--"))}for(var a=0;a<t.length;a++){var l=t[a];var u;var c;if(/^--.+=/.test(l)){var h=l.match(/^--([^=]+)=([\s\S]*)$/);u=h[1];var f=h[2];if(r.bools[u]){f=f!=="false"}setArg(u,f,l)}else if(/^--no-.+/.test(l)){u=l.match(/^--no-(.+)/)[1];setArg(u,false,l)}else if(/^--.+/.test(l)){u=l.match(/^--(.+)/)[1];c=t[a+1];if(c!==undefined&&!/^(-|--)[^-]/.test(c)&&!r.bools[u]&&!r.allBools&&(s[u]?!aliasIsBoolean(u):true)){setArg(u,c,l);a+=1}else if(/^(true|false)$/.test(c)){setArg(u,c==="true",l);a+=1}else{setArg(u,r.strings[u]?"":true,l)}}else if(/^-[^-]+/.test(l)){var d=l.slice(1,-1).split("");var p=false;for(var g=0;g<d.length;g++){c=l.slice(g+2);if(c==="-"){setArg(d[g],c,l);continue}if(/[A-Za-z]/.test(d[g])&&c[0]==="="){setArg(d[g],c.slice(1),l);p=true;break}if(/[A-Za-z]/.test(d[g])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(c)){setArg(d[g],c,l);p=true;break}if(d[g+1]&&d[g+1].match(/\W/)){setArg(d[g],l.slice(g+2),l);p=true;break}else{setArg(d[g],r.strings[d[g]]?"":true,l)}}u=l.slice(-1)[0];if(!p&&u!=="-"){if(t[a+1]&&!/^(-|--)[^-]/.test(t[a+1])&&!r.bools[u]&&(s[u]?!aliasIsBoolean(u):true)){setArg(u,t[a+1],l);a+=1}else if(t[a+1]&&/^(true|false)$/.test(t[a+1])){setArg(u,t[a+1]==="true",l);a+=1}else{setArg(u,r.strings[u]?"":true,l)}}}else{if(!r.unknownFn||r.unknownFn(l)!==false){n._.push(r.strings._||!isNumber(l)?l:Number(l))}if(e.stopEarly){n._.push.apply(n._,t.slice(a+1));break}}}Object.keys(i).forEach((function(t){if(!hasKey(n,t.split("."))){setKey(n,t.split("."),i[t]);(s[t]||[]).forEach((function(e){setKey(n,e.split("."),i[t])}))}}));if(e["--"]){n["--"]=o.slice()}else{o.forEach((function(t){n._.push(t)}))}return n}},2170:t=>{"use strict";const pathKey=(t={})=>{const e=t.env||process.env;const r=t.platform||process.platform;if(r!=="win32"){return"PATH"}return Object.keys(e).reverse().find((t=>t.toUpperCase()==="PATH"))||"Path"};t.exports=pathKey;t.exports["default"]=pathKey},9138:(t,e,r)=>{"use strict";t.exports=r(4755)},8223:(t,e,r)=>{"use strict";const s=r(1017);const i="\\\\/";const n=`[^${i}]`;const o=0;const a="\\.";const l="\\+";const u="\\?";const c="\\/";const h="(?=.)";const f="[^/]";const d=`(?:${c}|$)`;const p=`(?:^|${c})`;const g=`${a}{1,2}${d}`;const m=`(?!${a})`;const y=`(?!${p}${g})`;const v=`(?!${a}{0,1}${d})`;const b=`(?!${g})`;const _=`[^.${c}]`;const S=`${f}*?`;const w={DOT_LITERAL:a,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:c,ONE_CHAR:h,QMARK:f,END_ANCHOR:d,DOTS_SLASH:g,NO_DOT:m,NO_DOTS:y,NO_DOT_SLASH:v,NO_DOTS_SLASH:b,QMARK_NO_DOT:_,STAR:S,START_ANCHOR:p};const x={...w,SLASH_LITERAL:`[${i}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${a}{1,2}(?:[${i}]|$)`,NO_DOT:`(?!${a})`,NO_DOTS:`(?!(?:^|[${i}])${a}{1,2}(?:[${i}]|$))`,NO_DOT_SLASH:`(?!${a}{0,1}(?:[${i}]|$))`,NO_DOTS_SLASH:`(?!${a}{1,2}(?:[${i}]|$))`,QMARK_NO_DOT:`[^.${i}]`,START_ANCHOR:`(?:^|[${i}])`,END_ANCHOR:`(?:[${i}]|$)`};const P={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};t.exports={DEFAULT_MAX_EXTGLOB_RECURSION:o,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:P,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:s.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===true?x:w}}},1833:(t,e,r)=>{"use strict";const s=r(8223);const i=r(2924);const{MAX_LENGTH:n,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:l,REPLACEMENTS:u}=s;const expandRange=(t,e)=>{if(typeof e.expandRange==="function"){return e.expandRange(...t,e)}t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch(e){return t.map((t=>i.escapeRegex(t))).join("..")}return r};const syntaxError=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`;const splitTopLevel=t=>{const e=[];let r=0;let s=0;let i=0;let n="";let o=false;for(const a of t){if(o===true){n+=a;o=false;continue}if(a==="\\"){n+=a;o=true;continue}if(a==='"'){i=i===1?0:1;n+=a;continue}if(i===0){if(a==="["){r++}else if(a==="]"&&r>0){r--}else if(r===0){if(a==="("){s++}else if(a===")"&&s>0){s--}else if(a==="|"&&s===0){e.push(n);n="";continue}}}n+=a}e.push(n);return e};const isPlainBranch=t=>{let e=false;for(const r of t){if(e===true){e=false;continue}if(r==="\\"){e=true;continue}if(/[?*+@!()[\]{}]/.test(r)){return false}}return true};const normalizeSimpleBranch=t=>{let e=t.trim();let r=true;while(r===true){r=false;if(/^@\([^\\()[\]{}|]+\)$/.test(e)){e=e.slice(2,-1);r=true}}if(!isPlainBranch(e)){return}return e.replace(/\\(.)/g,"$1")};const hasRepeatedCharPrefixOverlap=t=>{const e=t.map(normalizeSimpleBranch).filter(Boolean);for(let t=0;t<e.length;t++){for(let r=t+1;r<e.length;r++){const s=e[t];const i=e[r];const n=s[0];if(!n||s!==n.repeat(s.length)||i!==n.repeat(i.length)){continue}if(s===i||s.startsWith(i)||i.startsWith(s)){return true}}}return false};const parseRepeatedExtglob=(t,e=true)=>{if(t[0]!=="+"&&t[0]!=="*"||t[1]!=="("){return}let r=0;let s=0;let i=0;let n=false;for(let o=1;o<t.length;o++){const a=t[o];if(n===true){n=false;continue}if(a==="\\"){n=true;continue}if(a==='"'){i=i===1?0:1;continue}if(i===1){continue}if(a==="["){r++;continue}if(a==="]"&&r>0){r--;continue}if(r>0){continue}if(a==="("){s++;continue}if(a===")"){s--;if(s===0){if(e===true&&o!==t.length-1){return}return{type:t[0],body:t.slice(2,o),end:o}}}}};const getStarExtglobSequenceOutput=t=>{let e=0;const r=[];while(e<t.length){const s=parseRepeatedExtglob(t.slice(e),false);if(!s||s.type!=="*"){return}const i=splitTopLevel(s.body).map((t=>t.trim()));if(i.length!==1){return}const n=normalizeSimpleBranch(i[0]);if(!n||n.length!==1){return}r.push(n);e+=s.end+1}if(r.length<1){return}const s=r.length===1?i.escapeRegex(r[0]):`[${r.map((t=>i.escapeRegex(t))).join("")}]`;return`${s}*`};const repeatedExtglobRecursion=t=>{let e=0;let r=t.trim();let s=parseRepeatedExtglob(r);while(s){e++;r=s.body.trim();s=parseRepeatedExtglob(r)}return e};const analyzeRepeatedExtglob=(t,e)=>{if(e.maxExtglobRecursion===false){return{risky:false}}const r=typeof e.maxExtglobRecursion==="number"?e.maxExtglobRecursion:s.DEFAULT_MAX_EXTGLOB_RECURSION;const i=splitTopLevel(t).map((t=>t.trim()));if(i.length>1){if(i.some((t=>t===""))||i.some((t=>/^[*?]+$/.test(t)))||hasRepeatedCharPrefixOverlap(i)){return{risky:true}}}for(const t of i){const e=getStarExtglobSequenceOutput(t);if(e){return{risky:true,safeOutput:e}}if(repeatedExtglobRecursion(t)>r){return{risky:true}}}return{risky:false}};const parse=(t,e)=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}t=u[t]||t;const r={...e};const c=typeof r.maxLength==="number"?Math.min(n,r.maxLength):n;let h=t.length;if(h>c){throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${c}`)}const f={type:"bos",value:"",output:r.prepend||""};const d=[f];const p=r.capture?"":"?:";const g=i.isWindows(e);const m=s.globChars(g);const y=s.extglobChars(m);const{DOT_LITERAL:v,PLUS_LITERAL:b,SLASH_LITERAL:_,ONE_CHAR:S,DOTS_SLASH:w,NO_DOT:x,NO_DOT_SLASH:P,NO_DOTS_SLASH:E,QMARK:A,QMARK_NO_DOT:k,STAR:R,START_ANCHOR:C}=m;const globstar=t=>`(${p}(?:(?!${C}${t.dot?w:v}).)*?)`;const O=r.dot?"":x;const T=r.dot?A:k;let $=r.bash===true?globstar(r):R;if(r.capture){$=`(${$})`}if(typeof r.noext==="boolean"){r.noextglob=r.noext}const M={input:t,index:-1,start:0,dot:r.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:d};t=i.removePrefix(t,M);h=t.length;const D=[];const L=[];const I=[];let F=f;let H;const eos=()=>M.index===h-1;const N=M.peek=(e=1)=>t[M.index+e];const j=M.advance=()=>t[++M.index]||"";const remaining=()=>t.slice(M.index+1);const consume=(t="",e=0)=>{M.consumed+=t;M.index+=e};const append=t=>{M.output+=t.output!=null?t.output:t.value;consume(t.value)};const negate=()=>{let t=1;while(N()==="!"&&(N(2)!=="("||N(3)==="?")){j();M.start++;t++}if(t%2===0){return false}M.negated=true;M.start++;return true};const increment=t=>{M[t]++;I.push(t)};const decrement=t=>{M[t]--;I.pop()};const push=t=>{if(F.type==="globstar"){const e=M.braces>0&&(t.type==="comma"||t.type==="brace");const r=t.extglob===true||D.length&&(t.type==="pipe"||t.type==="paren");if(t.type!=="slash"&&t.type!=="paren"&&!e&&!r){M.output=M.output.slice(0,-F.output.length);F.type="star";F.value="*";F.output=$;M.output+=F.output}}if(D.length&&t.type!=="paren"){D[D.length-1].inner+=t.value}if(t.value||t.output)append(t);if(F&&F.type==="text"&&t.type==="text"){F.value+=t.value;F.output=(F.output||"")+t.value;return}t.prev=F;d.push(t);F=t};const extglobOpen=(t,e)=>{const s={...y[e],conditions:1,inner:""};s.prev=F;s.parens=M.parens;s.output=M.output;s.startIndex=M.index;s.tokensIndex=d.length;const i=(r.capture?"(":"")+s.open;increment("parens");push({type:t,value:e,output:M.output?"":S});push({type:"paren",extglob:true,value:j(),output:i});D.push(s)};const extglobClose=s=>{const n=t.slice(s.startIndex,M.index+1);const o=t.slice(s.startIndex+2,M.index);const a=analyzeRepeatedExtglob(o,r);if((s.type==="plus"||s.type==="star")&&a.risky){const t=a.safeOutput?(s.output?"":S)+(r.capture?`(${a.safeOutput})`:a.safeOutput):undefined;const e=d[s.tokensIndex];e.type="text";e.value=n;e.output=t||i.escapeRegex(n);for(let t=s.tokensIndex+1;t<d.length;t++){d[t].value="";d[t].output="";delete d[t].suffix}M.output=s.output+e.output;M.backtrack=true;push({type:"paren",extglob:true,value:H,output:""});decrement("parens");return}let l=s.close+(r.capture?")":"");let u;if(s.type==="negate"){let t=$;if(s.inner&&s.inner.length>1&&s.inner.includes("/")){t=globstar(r)}if(t!==$||eos()||/^\)+$/.test(remaining())){l=s.close=`)$))${t}`}if(s.inner.includes("*")&&(u=remaining())&&/^\.[^\\/.]+$/.test(u)){const r=parse(u,{...e,fastpaths:false}).output;l=s.close=`)${r})${t})`}if(s.prev.type==="bos"){M.negatedExtglob=true}}push({type:"paren",extglob:true,value:H,output:l});decrement("parens")};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let s=false;let n=t.replace(l,((t,e,r,i,n,o)=>{if(i==="\\"){s=true;return t}if(i==="?"){if(e){return e+i+(n?A.repeat(n.length):"")}if(o===0){return T+(n?A.repeat(n.length):"")}return A.repeat(r.length)}if(i==="."){return v.repeat(r.length)}if(i==="*"){if(e){return e+i+(n?$:"")}return $}return e?t:`\\${t}`}));if(s===true){if(r.unescape===true){n=n.replace(/\\/g,"")}else{n=n.replace(/\\+/g,(t=>t.length%2===0?"\\\\":t?"\\":""))}}if(n===t&&r.contains===true){M.output=t;return M}M.output=i.wrapOutput(n,M,e);return M}while(!eos()){H=j();if(H==="\0"){continue}if(H==="\\"){const t=N();if(t==="/"&&r.bash!==true){continue}if(t==="."||t===";"){continue}if(!t){H+="\\";push({type:"text",value:H});continue}const e=/^\\+/.exec(remaining());let s=0;if(e&&e[0].length>2){s=e[0].length;M.index+=s;if(s%2!==0){H+="\\"}}if(r.unescape===true){H=j()}else{H+=j()}if(M.brackets===0){push({type:"text",value:H});continue}}if(M.brackets>0&&(H!=="]"||F.value==="["||F.value==="[^")){if(r.posix!==false&&H===":"){const t=F.value.slice(1);if(t.includes("[")){F.posix=true;if(t.includes(":")){const t=F.value.lastIndexOf("[");const e=F.value.slice(0,t);const r=F.value.slice(t+2);const s=o[r];if(s){F.value=e+s;M.backtrack=true;j();if(!f.output&&d.indexOf(F)===1){f.output=S}continue}}}}if(H==="["&&N()!==":"||H==="-"&&N()==="]"){H=`\\${H}`}if(H==="]"&&(F.value==="["||F.value==="[^")){H=`\\${H}`}if(r.posix===true&&H==="!"&&F.value==="["){H="^"}F.value+=H;append({value:H});continue}if(M.quotes===1&&H!=='"'){H=i.escapeRegex(H);F.value+=H;append({value:H});continue}if(H==='"'){M.quotes=M.quotes===1?0:1;if(r.keepQuotes===true){push({type:"text",value:H})}continue}if(H==="("){increment("parens");push({type:"paren",value:H});continue}if(H===")"){if(M.parens===0&&r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const t=D[D.length-1];if(t&&M.parens===t.parens+1){extglobClose(D.pop());continue}push({type:"paren",value:H,output:M.parens?")":"\\)"});decrement("parens");continue}if(H==="["){if(r.nobracket===true||!remaining().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}H=`\\${H}`}else{increment("brackets")}push({type:"bracket",value:H});continue}if(H==="]"){if(r.nobracket===true||F&&F.type==="bracket"&&F.value.length===1){push({type:"text",value:H,output:`\\${H}`});continue}if(M.brackets===0){if(r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:H,output:`\\${H}`});continue}decrement("brackets");const t=F.value.slice(1);if(F.posix!==true&&t[0]==="^"&&!t.includes("/")){H=`/${H}`}F.value+=H;append({value:H});if(r.literalBrackets===false||i.hasRegexChars(t)){continue}const e=i.escapeRegex(F.value);M.output=M.output.slice(0,-F.value.length);if(r.literalBrackets===true){M.output+=e;F.value=e;continue}F.value=`(${p}${e}|${F.value})`;M.output+=F.value;continue}if(H==="{"&&r.nobrace!==true){increment("braces");const t={type:"brace",value:H,output:"(",outputIndex:M.output.length,tokensIndex:M.tokens.length};L.push(t);push(t);continue}if(H==="}"){const t=L[L.length-1];if(r.nobrace===true||!t){push({type:"text",value:H,output:H});continue}let e=")";if(t.dots===true){const t=d.slice();const s=[];for(let e=t.length-1;e>=0;e--){d.pop();if(t[e].type==="brace"){break}if(t[e].type!=="dots"){s.unshift(t[e].value)}}e=expandRange(s,r);M.backtrack=true}if(t.comma!==true&&t.dots!==true){const r=M.output.slice(0,t.outputIndex);const s=M.tokens.slice(t.tokensIndex);t.value=t.output="\\{";H=e="\\}";M.output=r;for(const t of s){M.output+=t.output||t.value}}push({type:"brace",value:H,output:e});decrement("braces");L.pop();continue}if(H==="|"){if(D.length>0){D[D.length-1].conditions++}push({type:"text",value:H});continue}if(H===","){let t=H;const e=L[L.length-1];if(e&&I[I.length-1]==="braces"){e.comma=true;t="|"}push({type:"comma",value:H,output:t});continue}if(H==="/"){if(F.type==="dot"&&M.index===M.start+1){M.start=M.index+1;M.consumed="";M.output="";d.pop();F=f;continue}push({type:"slash",value:H,output:_});continue}if(H==="."){if(M.braces>0&&F.type==="dot"){if(F.value===".")F.output=v;const t=L[L.length-1];F.type="dots";F.output+=H;F.value+=H;t.dots=true;continue}if(M.braces+M.parens===0&&F.type!=="bos"&&F.type!=="slash"){push({type:"text",value:H,output:v});continue}push({type:"dot",value:H,output:v});continue}if(H==="?"){const t=F&&F.value==="(";if(!t&&r.noextglob!==true&&N()==="("&&N(2)!=="?"){extglobOpen("qmark",H);continue}if(F&&F.type==="paren"){const t=N();let e=H;if(t==="<"&&!i.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(F.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(remaining())){e=`\\${H}`}push({type:"text",value:H,output:e});continue}if(r.dot!==true&&(F.type==="slash"||F.type==="bos")){push({type:"qmark",value:H,output:k});continue}push({type:"qmark",value:H,output:A});continue}if(H==="!"){if(r.noextglob!==true&&N()==="("){if(N(2)!=="?"||!/[!=<:]/.test(N(3))){extglobOpen("negate",H);continue}}if(r.nonegate!==true&&M.index===0){negate();continue}}if(H==="+"){if(r.noextglob!==true&&N()==="("&&N(2)!=="?"){extglobOpen("plus",H);continue}if(F&&F.value==="("||r.regex===false){push({type:"plus",value:H,output:b});continue}if(F&&(F.type==="bracket"||F.type==="paren"||F.type==="brace")||M.parens>0){push({type:"plus",value:H});continue}push({type:"plus",value:b});continue}if(H==="@"){if(r.noextglob!==true&&N()==="("&&N(2)!=="?"){push({type:"at",extglob:true,value:H,output:""});continue}push({type:"text",value:H});continue}if(H!=="*"){if(H==="$"||H==="^"){H=`\\${H}`}const t=a.exec(remaining());if(t){H+=t[0];M.index+=t[0].length}push({type:"text",value:H});continue}if(F&&(F.type==="globstar"||F.star===true)){F.type="star";F.star=true;F.value+=H;F.output=$;M.backtrack=true;M.globstar=true;consume(H);continue}let e=remaining();if(r.noextglob!==true&&/^\([^?]/.test(e)){extglobOpen("star",H);continue}if(F.type==="star"){if(r.noglobstar===true){consume(H);continue}const s=F.prev;const i=s.prev;const n=s.type==="slash"||s.type==="bos";const o=i&&(i.type==="star"||i.type==="globstar");if(r.bash===true&&(!n||e[0]&&e[0]!=="/")){push({type:"star",value:H,output:""});continue}const a=M.braces>0&&(s.type==="comma"||s.type==="brace");const l=D.length&&(s.type==="pipe"||s.type==="paren");if(!n&&s.type!=="paren"&&!a&&!l){push({type:"star",value:H,output:""});continue}while(e.slice(0,3)==="/**"){const r=t[M.index+4];if(r&&r!=="/"){break}e=e.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){F.type="globstar";F.value+=H;F.output=globstar(r);M.output=F.output;M.globstar=true;consume(H);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!o&&eos()){M.output=M.output.slice(0,-(s.output+F.output).length);s.output=`(?:${s.output}`;F.type="globstar";F.output=globstar(r)+(r.strictSlashes?")":"|$)");F.value+=H;M.globstar=true;M.output+=s.output+F.output;consume(H);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&e[0]==="/"){const t=e[1]!==void 0?"|$":"";M.output=M.output.slice(0,-(s.output+F.output).length);s.output=`(?:${s.output}`;F.type="globstar";F.output=`${globstar(r)}${_}|${_}${t})`;F.value+=H;M.output+=s.output+F.output;M.globstar=true;consume(H+j());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&e[0]==="/"){F.type="globstar";F.value+=H;F.output=`(?:^|${_}|${globstar(r)}${_})`;M.output=F.output;M.globstar=true;consume(H+j());push({type:"slash",value:"/",output:""});continue}M.output=M.output.slice(0,-F.output.length);F.type="globstar";F.output=globstar(r);F.value+=H;M.output+=F.output;M.globstar=true;consume(H);continue}const s={type:"star",value:H,output:$};if(r.bash===true){s.output=".*?";if(F.type==="bos"||F.type==="slash"){s.output=O+s.output}push(s);continue}if(F&&(F.type==="bracket"||F.type==="paren")&&r.regex===true){s.output=H;push(s);continue}if(M.index===M.start||F.type==="slash"||F.type==="dot"){if(F.type==="dot"){M.output+=P;F.output+=P}else if(r.dot===true){M.output+=E;F.output+=E}else{M.output+=O;F.output+=O}if(N()!=="*"){M.output+=S;F.output+=S}}push(s)}while(M.brackets>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));M.output=i.escapeLast(M.output,"[");decrement("brackets")}while(M.parens>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));M.output=i.escapeLast(M.output,"(");decrement("parens")}while(M.braces>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));M.output=i.escapeLast(M.output,"{");decrement("braces")}if(r.strictSlashes!==true&&(F.type==="star"||F.type==="bracket")){push({type:"maybe_slash",value:"",output:`${_}?`})}if(M.backtrack===true){M.output="";for(const t of M.tokens){M.output+=t.output!=null?t.output:t.value;if(t.suffix){M.output+=t.suffix}}}return M};parse.fastpaths=(t,e)=>{const r={...e};const o=typeof r.maxLength==="number"?Math.min(n,r.maxLength):n;const a=t.length;if(a>o){throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`)}t=u[t]||t;const l=i.isWindows(e);const{DOT_LITERAL:c,SLASH_LITERAL:h,ONE_CHAR:f,DOTS_SLASH:d,NO_DOT:p,NO_DOTS:g,NO_DOTS_SLASH:m,STAR:y,START_ANCHOR:v}=s.globChars(l);const b=r.dot?g:p;const _=r.dot?m:p;const S=r.capture?"":"?:";const w={negated:false,prefix:""};let x=r.bash===true?".*?":y;if(r.capture){x=`(${x})`}const globstar=t=>{if(t.noglobstar===true)return x;return`(${S}(?:(?!${v}${t.dot?d:c}).)*?)`};const create=t=>{switch(t){case"*":return`${b}${f}${x}`;case".*":return`${c}${f}${x}`;case"*.*":return`${b}${x}${c}${f}${x}`;case"*/*":return`${b}${x}${h}${f}${_}${x}`;case"**":return b+globstar(r);case"**/*":return`(?:${b}${globstar(r)}${h})?${_}${f}${x}`;case"**/*.*":return`(?:${b}${globstar(r)}${h})?${_}${x}${c}${f}${x}`;case"**/.*":return`(?:${b}${globstar(r)}${h})?${c}${f}${x}`;default:{const e=/^(.*?)\.(\w+)$/.exec(t);if(!e)return;const r=create(e[1]);if(!r)return;return r+c+e[2]}}};const P=i.removePrefix(t,w);let E=create(P);if(E&&r.strictSlashes!==true){E+=`${h}?`}return E};t.exports=parse},4755:(t,e,r)=>{"use strict";const s=r(1017);const i=r(2017);const n=r(1833);const o=r(2924);const a=r(8223);const isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);const picomatch=(t,e,r=false)=>{if(Array.isArray(t)){const s=t.map((t=>picomatch(t,e,r)));const arrayMatcher=t=>{for(const e of s){const r=e(t);if(r)return r}return false};return arrayMatcher}const s=isObject(t)&&t.tokens&&t.input;if(t===""||typeof t!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const i=e||{};const n=o.isWindows(e);const a=s?picomatch.compileRe(t,e):picomatch.makeRe(t,e,false,true);const l=a.state;delete a.state;let isIgnored=()=>false;if(i.ignore){const t={...e,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(i.ignore,t,r)}const matcher=(r,s=false)=>{const{isMatch:o,match:u,output:c}=picomatch.test(r,a,e,{glob:t,posix:n});const h={glob:t,state:l,regex:a,posix:n,input:r,output:c,match:u,isMatch:o};if(typeof i.onResult==="function"){i.onResult(h)}if(o===false){h.isMatch=false;return s?h:false}if(isIgnored(r)){if(typeof i.onIgnore==="function"){i.onIgnore(h)}h.isMatch=false;return s?h:false}if(typeof i.onMatch==="function"){i.onMatch(h)}return s?h:true};if(r){matcher.state=l}return matcher};picomatch.test=(t,e,r,{glob:s,posix:i}={})=>{if(typeof t!=="string"){throw new TypeError("Expected input to be a string")}if(t===""){return{isMatch:false,output:""}}const n=r||{};const a=n.format||(i?o.toPosixSlashes:null);let l=t===s;let u=l&&a?a(t):t;if(l===false){u=a?a(t):t;l=u===s}if(l===false||n.capture===true){if(n.matchBase===true||n.basename===true){l=picomatch.matchBase(t,e,r,i)}else{l=e.exec(u)}}return{isMatch:Boolean(l),match:l,output:u}};picomatch.matchBase=(t,e,r,i=o.isWindows(r))=>{const n=e instanceof RegExp?e:picomatch.makeRe(e,r);return n.test(s.basename(t))};picomatch.isMatch=(t,e,r)=>picomatch(e,r)(t);picomatch.parse=(t,e)=>{if(Array.isArray(t))return t.map((t=>picomatch.parse(t,e)));return n(t,{...e,fastpaths:false})};picomatch.scan=(t,e)=>i(t,e);picomatch.compileRe=(t,e,r=false,s=false)=>{if(r===true){return t.output}const i=e||{};const n=i.contains?"":"^";const o=i.contains?"":"$";let a=`${n}(?:${t.output})${o}`;if(t&&t.negated===true){a=`^(?!${a}).*$`}const l=picomatch.toRegex(a,e);if(s===true){l.state=t}return l};picomatch.makeRe=(t,e={},r=false,s=false)=>{if(!t||typeof t!=="string"){throw new TypeError("Expected a non-empty string")}let i={negated:false,fastpaths:true};if(e.fastpaths!==false&&(t[0]==="."||t[0]==="*")){i.output=n.fastpaths(t,e)}if(!i.output){i=n(t,e)}return picomatch.compileRe(i,e,r,s)};picomatch.toRegex=(t,e)=>{try{const r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(t){if(e&&e.debug===true)throw t;return/$^/}};picomatch.constants=a;t.exports=picomatch},2017:(t,e,r)=>{"use strict";const s=r(2924);const{CHAR_ASTERISK:i,CHAR_AT:n,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:l,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:c,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:f,CHAR_LEFT_SQUARE_BRACKET:d,CHAR_PLUS:p,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:y,CHAR_RIGHT_SQUARE_BRACKET:v}=r(8223);const isPathSeparator=t=>t===c||t===o;const depth=t=>{if(t.isPrefix!==true){t.depth=t.isGlobstar?Infinity:1}};const scan=(t,e)=>{const r=e||{};const b=t.length-1;const _=r.parts===true||r.scanToEnd===true;const S=[];const w=[];const x=[];let P=t;let E=-1;let A=0;let k=0;let R=false;let C=false;let O=false;let T=false;let $=false;let M=false;let D=false;let L=false;let I=false;let F=false;let H=0;let N;let j;let B={value:"",depth:0,isGlob:false};const eos=()=>E>=b;const peek=()=>P.charCodeAt(E+1);const advance=()=>{N=j;return P.charCodeAt(++E)};while(E<b){j=advance();let t;if(j===o){D=B.backslashes=true;j=advance();if(j===h){M=true}continue}if(M===true||j===h){H++;while(eos()!==true&&(j=advance())){if(j===o){D=B.backslashes=true;advance();continue}if(j===h){H++;continue}if(M!==true&&j===l&&(j=advance())===l){R=B.isBrace=true;O=B.isGlob=true;F=true;if(_===true){continue}break}if(M!==true&&j===a){R=B.isBrace=true;O=B.isGlob=true;F=true;if(_===true){continue}break}if(j===m){H--;if(H===0){M=false;R=B.isBrace=true;F=true;break}}}if(_===true){continue}break}if(j===c){S.push(E);w.push(B);B={value:"",depth:0,isGlob:false};if(F===true)continue;if(N===l&&E===A+1){A+=2;continue}k=E+1;continue}if(r.noext!==true){const t=j===p||j===n||j===i||j===g||j===u;if(t===true&&peek()===f){O=B.isGlob=true;T=B.isExtglob=true;F=true;if(j===u&&E===A){I=true}if(_===true){while(eos()!==true&&(j=advance())){if(j===o){D=B.backslashes=true;j=advance();continue}if(j===y){O=B.isGlob=true;F=true;break}}continue}break}}if(j===i){if(N===i)$=B.isGlobstar=true;O=B.isGlob=true;F=true;if(_===true){continue}break}if(j===g){O=B.isGlob=true;F=true;if(_===true){continue}break}if(j===d){while(eos()!==true&&(t=advance())){if(t===o){D=B.backslashes=true;advance();continue}if(t===v){C=B.isBracket=true;O=B.isGlob=true;F=true;break}}if(_===true){continue}break}if(r.nonegate!==true&&j===u&&E===A){L=B.negated=true;A++;continue}if(r.noparen!==true&&j===f){O=B.isGlob=true;if(_===true){while(eos()!==true&&(j=advance())){if(j===f){D=B.backslashes=true;j=advance();continue}if(j===y){F=true;break}}continue}break}if(O===true){F=true;if(_===true){continue}break}}if(r.noext===true){T=false;O=false}let G=P;let U="";let W="";if(A>0){U=P.slice(0,A);P=P.slice(A);k-=A}if(G&&O===true&&k>0){G=P.slice(0,k);W=P.slice(k)}else if(O===true){G="";W=P}else{G=P}if(G&&G!==""&&G!=="/"&&G!==P){if(isPathSeparator(G.charCodeAt(G.length-1))){G=G.slice(0,-1)}}if(r.unescape===true){if(W)W=s.removeBackslashes(W);if(G&&D===true){G=s.removeBackslashes(G)}}const V={prefix:U,input:t,start:A,base:G,glob:W,isBrace:R,isBracket:C,isGlob:O,isExtglob:T,isGlobstar:$,negated:L,negatedExtglob:I};if(r.tokens===true){V.maxDepth=0;if(!isPathSeparator(j)){w.push(B)}V.tokens=w}if(r.parts===true||r.tokens===true){let e;for(let s=0;s<S.length;s++){const i=e?e+1:A;const n=S[s];const o=t.slice(i,n);if(r.tokens){if(s===0&&A!==0){w[s].isPrefix=true;w[s].value=U}else{w[s].value=o}depth(w[s]);V.maxDepth+=w[s].depth}if(s!==0||o!==""){x.push(o)}e=n}if(e&&e+1<t.length){const s=t.slice(e+1);x.push(s);if(r.tokens){w[w.length-1].value=s;depth(w[w.length-1]);V.maxDepth+=w[w.length-1].depth}}V.slashes=S;V.parts=x}return V};t.exports=scan},2924:(t,e,r)=>{"use strict";const s=r(1017);const i=process.platform==="win32";const{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:l}=r(8223);e.isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);e.hasRegexChars=t=>a.test(t);e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t);e.escapeRegex=t=>t.replace(l,"\\$1");e.toPosixSlashes=t=>t.replace(n,"/");e.removeBackslashes=t=>t.replace(o,(t=>t==="\\"?"":t));e.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);if(t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10){return true}return false};e.isWindows=t=>{if(t&&typeof t.windows==="boolean"){return t.windows}return i===true||s.sep==="\\"};e.escapeLast=(t,r,s)=>{const i=t.lastIndexOf(r,s);if(i===-1)return t;if(t[i-1]==="\\")return e.escapeLast(t,r,i-1);return`${t.slice(0,i)}\\${t.slice(i)}`};e.removePrefix=(t,e={})=>{let r=t;if(r.startsWith("./")){r=r.slice(2);e.prefix="./"}return r};e.wrapOutput=(t,e={},r={})=>{const s=r.contains?"":"^";const i=r.contains?"":"$";let n=`${s}(?:${t})${i}`;if(e.negated===true){n=`(?:^(?!${n}).*$)`}return n}},399:t=>{"use strict";class DatePart{constructor({token:t,date:e,parts:r,locales:s}){this.token=t;this.date=e||new Date;this.parts=r||[this];this.locales=s||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((e,r)=>r>t&&e instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const e=t.indexOf(this);return t.find(((t,r)=>r>e&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},7967:(t,e,r)=>{"use strict";const s=r(399);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends s{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let e=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?e+1:this.token==="ddd"?this.locales.weekdaysShort[e]:this.token==="dddd"?this.locales.weekdays[e]:t}}t.exports=Day},4102:(t,e,r)=>{"use strict";const s=r(399);class Hours extends s{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},7517:(t,e,r)=>{"use strict";t.exports={DatePart:r(399),Meridiem:r(4128),Day:r(7967),Hours:r(4102),Milliseconds:r(6945),Minutes:r(7829),Month:r(8608),Seconds:r(812),Year:r(5227)}},4128:(t,e,r)=>{"use strict";const s=r(399);class Meridiem extends s{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},6945:(t,e,r)=>{"use strict";const s=r(399);class Milliseconds extends s{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},7829:(t,e,r)=>{"use strict";const s=r(399);class Minutes extends s{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},8608:(t,e,r)=>{"use strict";const s=r(399);class Month extends s{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let e=this.token.length;return e===2?String(t+1).padStart(2,"0"):e===3?this.locales.monthsShort[t]:e===4?this.locales.months[t]:String(t+1)}}t.exports=Month},812:(t,e,r)=>{"use strict";const s=r(399);class Seconds extends s{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},5227:(t,e,r)=>{"use strict";const s=r(399);class Year extends s{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},935:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor;const a=r(2800),l=a.style,u=a.clear,c=a.figures,h=a.strip;const getVal=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]);const getTitle=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]);const getIndex=(t,e)=>{const r=t.findIndex((t=>t.value===e||t.title===e));return r>-1?r:undefined};class AutocompletePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.fallback=t.fallback||(t.initial!==undefined?`${c.pointerSmall} ${getTitle(this.choices,this.initial)}`:`${c.pointerSmall} ${t.noMatches||"no matches found"}`);this.suggestions=[[]];this.page=0;this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=l.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=u("");this.complete(this.render);this.render()}moveSelect(t){this.select=t;if(this.suggestions[this.page].length>0){this.value=getVal(this.suggestions[this.page],t)}else{this.value=this.initial!==undefined?getVal(this.choices,this.initial):null}this.fire()}complete(t){var e=this;return _asyncToGenerator((function*(){const r=e.completing=e.suggest(e.input,e.choices);const s=yield r;if(e.completing!==r)return;e.suggestions=s.map(((t,e,r)=>({title:getTitle(r,e),value:getVal(r,e)}))).reduce(((t,r)=>{if(t[t.length-1].length<e.limit)t[t.length-1].push(r);else t.push([r]);return t}),[[]]);e.isFallback=false;e.completing=false;if(!e.suggestions[e.page])e.page=0;if(!e.suggestions.length&&e.fallback){const t=getIndex(e.choices,e.fallback);e.suggestions=[[]];if(t!==undefined)e.suggestions[0].push({title:getTitle(e.choices,t),value:getVal(e.choices,t)});e.isFallback=true}const i=Math.max(s.length-1,0);e.moveSelect(Math.min(i,e.select));t&&t()}))()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,e){let r=this.input.slice(0,this.cursor);let s=this.input.slice(this.cursor);this.input=`${r}${t}${s}`;this.cursor=r.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let e=this.input.slice(this.cursor);this.input=`${t}${e}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let e=this.input.slice(this.cursor+1);this.input=`${t}${e}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions[this.page].length-1);this.render()}up(){if(this.select<=0)return this.bell();this.moveSelect(this.select-1);this.render()}down(){if(this.select>=this.suggestions[this.page].length-1)return this.bell();this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions[this.page].length-1){this.page=(this.page+1)%this.suggestions.length;this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){if(this.page>=this.suggestions.length-1)return this.bell();this.page++;this.moveSelect(0);this.render()}prevPage(){if(this.page<=0)return this.bell();this.page--;this.moveSelect(0);this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}render(){if(this.closed)return;super.render();if(this.lineCount)this.out.write(o.down(this.lineCount));let t=s.bold(`${l.symbol(this.done,this.aborted)} ${this.msg} `)+`${l.delimiter(this.completing)} `;let e=h(t).length;if(this.done&&this.suggestions[this.page][this.select]){t+=`${this.suggestions[this.page][this.select].title}`}else{this.rendered=`${this.transform.render(this.input)}`;e+=this.rendered.length;t+=this.rendered}if(!this.done){this.lineCount=this.suggestions[this.page].length;let e=this.suggestions[this.page].reduce(((t,e,r)=>t+`\n${r===this.select?s.cyan(e.title):e.title}`),"");if(e&&!this.isFallback){t+=e;if(this.suggestions.length>1){this.lineCount++;t+=s.blue(`\nPage ${this.page+1}/${this.suggestions.length}`)}}else{const e=getIndex(this.choices,this.fallback);const r=e!==undefined?getTitle(this.choices,e):this.fallback;t+=`\n${s.gray(r)}`;this.lineCount++}}this.out.write(this.clear+t);this.clear=u(t);if(this.lineCount&&!this.done){let t=o.up(this.lineCount);t+=o.left+o.to(e);t+=o.move(-this.rendered.length+this.cursor*this.scale);this.out.write(t)}}}t.exports=AutocompletePrompt},2040:(t,e,r)=>{"use strict";const s=r(9439);const i=r(332),n=i.cursor;const o=r(4047);const a=r(2800),l=a.clear,u=a.style,c=a.figures;class AutocompleteMultiselectPrompt extends o{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=l("");this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const e=this.filteredOptions.findIndex((e=>e===t));this.cursor=e<0?0:e;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,e){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){return`\nInstructions:\n ${c.arrowUp}/${c.arrowDown}: Highlight option\n ${c.arrowLeft}/${c.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n `}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:s.gray("Enter something to filter")}\n`}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(c.radioOn):c.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);super.render();let t=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=l(t)}}t.exports=AutocompleteMultiselectPrompt},5680:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style;const a=r(332),l=a.erase,u=a.cursor;class ConfirmPrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,e){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);super.render();this.out.write(l.line+u.to(0)+[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:s.gray(this.initialValue?this.yesOption:this.noOption)].join(" "))}}t.exports=ConfirmPrompt},3031:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear,l=n.figures,u=n.strip;const c=r(332),h=c.erase,f=c.cursor;const d=r(7517),p=d.DatePart,g=d.Meridiem,m=d.Day,y=d.Hours,v=d.Milliseconds,b=d.Minutes,_=d.Month,S=d.Seconds,w=d.Year;const x=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const P={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new m(t),3:t=>new _(t),4:t=>new w(t),5:t=>new g(t),6:t=>new y(t),7:t=>new b(t),8:t=>new S(t),9:t=>new v(t)};const E={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(E,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=a("");this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let e;this.parts=[];while(e=x.exec(t)){let t=e.shift();let r=e.findIndex((t=>t!=null));this.parts.push(r in P?P[r]({token:e[r]||t,date:this.date,parts:this.parts,locales:this.locales}):e[r]||t)}let r=this.parts.reduce(((t,e)=>{if(typeof e==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=e;else t.push(e);return t}),[]);this.parts.splice(0);this.parts.push(...r);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof p)));this.fire();this.render()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let e=yield t.validator(t.value);if(typeof e==="string"){t.errorMsg=e;e=false}t.error=!e}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color="red";t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof p)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(f.hide);else this.out.write(h.lines(1));super.render();let t=h.line+(this.lines?h.down(this.lines):"")+f.to(0);this.lines=0;let e="";if(this.error){let t=this.errorMsg.split("\n");e=t.reduce(((t,e,r)=>t+`\n${r?` `:l.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(false),this.parts.reduce(((t,e,r)=>t.concat(r===this.cursor&&!this.done?s.cyan().underline(e.toString()):e)),[]).join("")].join(" ");let i="";if(this.lines){i+=f.up(this.lines);i+=f.left+f.to(u(r).length)}this.out.write(t+r+e+i)}}t.exports=DatePrompt},9956:(t,e,r)=>{"use strict";t.exports={TextPrompt:r(5430),SelectPrompt:r(8856),TogglePrompt:r(9692),DatePrompt:r(3031),NumberPrompt:r(8831),MultiselectPrompt:r(4047),AutocompletePrompt:r(935),AutocompleteMultiselectPrompt:r(2040),ConfirmPrompt:r(5680)}},4047:(t,e,r)=>{"use strict";const s=r(9439);const i=r(332),n=i.cursor;const o=r(5876);const a=r(2800),l=a.clear,u=a.figures,c=a.style;class MultiselectPrompt extends o{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.value=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=l("");if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}_(t,e){if(t===" "){this.handleSpaceToggle()}else{return this.bell()}}renderInstructions(){return`\nInstructions:\n ${u.arrowUp}/${u.arrowDown}: Highlight option\n ${u.arrowLeft}/${u.arrowRight}/[space]: Toggle selection\n enter/return: Complete answer\n `}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(u.radioOn):u.radioOff)+" "+i}paginateOptions(t){const e=this.cursor;let r=t.map(((t,r)=>this.renderOption(e,t,r)));const i=10;let n=r;let o="";if(r.length===0){return s.red("No matches for this query.")}else if(r.length>i){let a=e-i/2;let l=e+i/2;if(a<0){a=0;l=i}else if(l>t.length){l=t.length;a=l-i}n=r.slice(a,l);o=s.dim("(Move up and down to reveal more choices)")}return"\n"+n.join("\n")+"\n"+o}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);super.render();let t=[c.symbol(this.done,this.aborted),s.bold(this.msg),c.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=l(t)}}t.exports=MultiselectPrompt},8831:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor,a=n.erase;const l=r(2800),u=l.style,c=l.clear,h=l.figures,f=l.strip;const d=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r};class NumberPrompt extends i{constructor(t={}){super(t);this.transform=u.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=s.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||d.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let e=yield t.validator(t.value);if(typeof e===`string`){t.errorMsg=e;e=false}t.error=!e}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color=`red`;t.fire();t.render();return}let e=t.value;t.value=e!==``?e:t.initial;t.done=true;t.aborted=false;t.error=false;t.fire();t.render();t.out.write(`\n`);t.close()}))()}up(){this.typed=``;if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,e){if(!this.valid(t))return this.bell();const r=Date.now();if(r-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=r;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;super.render();let t=a.line+(this.lines?a.down(this.lines):``)+o.to(0);this.lines=0;let e=``;if(this.error){let t=this.errorMsg.split(`\n`);e+=t.reduce(((t,e,r)=>t+`\n${r?` `:h.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=!this.done||!this.done&&!this.placeholder;let i=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(this.done),r?s[this.color]().underline(this.rendered):this.rendered].join(` `);let n=``;if(this.lines){n+=o.up(this.lines);n+=o.left+o.to(f(i).length)}this.out.write(t+i+e+n)}}t.exports=NumberPrompt},5876:(t,e,r)=>{"use strict";const s=r(4521);const i=r(2800),n=i.action;const o=r(2361);const a=r(332),l=a.beep,u=a.cursor;const c=r(9439);class Prompt extends o{constructor(t={}){super();this.firstRender=true;this.in=t.in||process.stdin;this.out=t.out||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const e=s.createInterface(this.in);s.emitKeypressEvents(this.in,e);if(this.in.isTTY)this.in.setRawMode(true);const keypress=(t,e)=>{let r=n(e);if(r===false){this._&&this._(t,e)}else if(typeof this[r]==="function"){this[r](e)}else{this.bell()}};this.close=()=>{this.out.write(u.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);e.close();this.emit(this.aborted?"abort":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted})}bell(){this.out.write(l)}render(){this.onRender(c);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},8856:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear,l=n.figures;const u=r(332),c=u.erase,h=u.cursor;class SelectPrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.value=(this.choices[this.cursor]||{}).value;this.clear=a("");this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0)return this.bell();this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)return this.bell();this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,e){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(c.lines(this.choices.length+1));super.render();this.out.write([o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(false),this.done?this.selection.title:this.selection.disabled?s.yellow(this.warn):s.gray(this.hint)].join(" "));if(!this.done){this.out.write("\n"+this.choices.map(((t,e)=>{let r,i;if(t.disabled){r=this.cursor===e?s.gray().underline(t.title):s.strikethrough().gray(t.title);i=this.cursor===e?s.bold().gray(l.pointer)+" ":" "}else{r=this.cursor===e?s.cyan().underline(t.title):t.title;i=this.cursor===e?s.cyan(l.pointer)+" ":" "}return`${i} ${r}`})).join("\n"))}}}t.exports=SelectPrompt},5430:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor;const a=r(2800),l=a.style,u=a.clear,c=a.strip,h=a.figures;class TextPrompt extends i{constructor(t={}){super(t);this.transform=l.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.clear=u(``);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=s.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.fire();this.render()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let e=yield t.validator(t.value);if(typeof e===`string`){t.errorMsg=e;e=false}t.error=!e}))()}submit(){var t=this;return _asyncToGenerator((function*(){t.value=t.value||t.initial;yield t.validate();if(t.error){t.red=true;t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t}_(t,e){let r=this.value.slice(0,this.cursor);let s=this.value.slice(this.cursor);this.value=`${r}${t}${s}`;this.red=false;this.cursor=this.placeholder?0:r.length+1;this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.value.slice(0,this.cursor-1);let e=this.value.slice(this.cursor);this.value=`${t}${e}`;this.red=false;this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let e=this.value.slice(this.cursor+1);this.value=`${t}${e}`;this.red=false;this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}render(){if(this.closed)return;super.render();let t=(this.lines?o.down(this.lines):``)+this.clear;this.lines=0;let e=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(` `);let r=``;if(this.error){let t=this.errorMsg.split(`\n`);r+=t.reduce(((t,e,r)=>t+=`\n${r?" ":h.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let i=``;if(this.lines){i+=o.up(this.lines);i+=o.left+o.to(c(e).length)}i+=o.move(this.placeholder?-this.initial.length*this.scale:-this.rendered.length+this.cursor*this.scale);this.out.write(t+e+r+i);this.clear=u(e+r)}}t.exports=TextPrompt},9692:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear;const l=r(332),u=l.cursor,c=l.erase;class TogglePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,e){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);super.render();this.out.write(c.lines(this.first?1:this.msg.split(/\n/g).length)+u.to(0)+[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.value?this.inactive:s.cyan().underline(this.inactive),s.gray("/"),this.value?s.cyan().underline(this.active):this.active].join(" "))}}t.exports=TogglePrompt},6598:(t,e,r)=>{"use strict";function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};var s=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){s=s.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))}s.forEach((function(e){_defineProperty(t,e,r[e])}))}return t}function _defineProperty(t,e,r){if(e in t){Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true})}else{t[e]=r}return t}function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(4591);const i=["suggest","format","onState","validate","onRender"];const noop=()=>{};function prompt(){return _prompt.apply(this,arguments)}function _prompt(){_prompt=_asyncToGenerator((function*(t=[],{onSubmit:e=noop,onCancel:r=noop}={}){const n={};const o=prompt._override||{};t=[].concat(t);let a,l,u,c,h;const f=function(){var t=_asyncToGenerator((function*(t,e,r=false){if(!r&&t.validate&&t.validate(e)!==true){return}return t.format?yield t.format(e,n):e}));return function getFormattedAnswer(e,r){return t.apply(this,arguments)}}();var d=true;var p=false;var g=undefined;try{for(var m=t[Symbol.iterator](),y;!(d=(y=m.next()).done);d=true){l=y.value;var v=l;c=v.name;h=v.type;for(let t in l){if(i.includes(t))continue;let e=l[t];l[t]=typeof e==="function"?yield e(a,_objectSpread({},n),l):e}if(typeof l.message!=="string"){throw new Error("prompt message is required")}var b=l;c=b.name;h=b.type;if(!h)continue;if(s[h]===void 0){throw new Error(`prompt type (${h}) is not defined`)}if(o[l.name]!==undefined){a=yield f(l,o[l.name]);if(a!==undefined){n[c]=a;continue}}try{a=prompt._injected?getInjectedAnswer(prompt._injected):yield s[h](l);n[c]=a=yield f(l,a,true);u=yield e(l,a,n)}catch(t){u=!(yield r(l,n))}if(u)return n}}catch(t){p=true;g=t}finally{try{if(!d&&m.return!=null){m.return()}}finally{if(p){throw g}}}return n}));return _prompt.apply(this,arguments)}function getInjectedAnswer(t){const e=t.shift();if(e instanceof Error){throw e}return e}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:s,inject:inject,override:override})},4591:(t,e,r)=>{"use strict";const s=e;const i=r(9956);const noop=t=>t;function toPrompt(t,e,r={}){return new Promise(((s,n)=>{const o=new i[t](e);const a=r.onAbort||noop;const l=r.onSubmit||noop;o.on("state",e.onState||noop);o.on("submit",(t=>s(l(t))));o.on("abort",(t=>n(a(t))))}))}s.text=t=>toPrompt("TextPrompt",t);s.password=t=>{t.style="password";return s.text(t)};s.invisible=t=>{t.style="invisible";return s.text(t)};s.number=t=>toPrompt("NumberPrompt",t);s.date=t=>toPrompt("DatePrompt",t);s.confirm=t=>toPrompt("ConfirmPrompt",t);s.list=t=>{const e=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(e).map((t=>t.trim()))})};s.toggle=t=>toPrompt("TogglePrompt",t);s.select=t=>toPrompt("SelectPrompt",t);s.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};s.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,e)=>Promise.resolve(e.filter((e=>e.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));s.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},8692:t=>{"use strict";t.exports=t=>{if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"abort";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},3513:(t,e,r)=>{"use strict";const s=r(8760);const i=r(332),n=i.erase,o=i.cursor;const width=t=>[...s(t)].length;t.exports=function(t,e=process.stdout.columns){if(!e)return n.line+o.to(0);let r=0;const s=t.split(/\r?\n/);var i=true;var a=false;var l=undefined;try{for(var u=s[Symbol.iterator](),c;!(i=(c=u.next()).done);i=true){let t=c.value;r+=1+Math.floor(Math.max(width(t)-1,0)/e)}}catch(t){a=true;l=t}finally{try{if(!i&&u.return!=null){u.return()}}finally{if(a){throw l}}}return(n.line+o.prevLine()).repeat(r-1)+n.line+o.to(0)}},6217:t=>{"use strict";const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const s=process.platform==="win32"?r:e;t.exports=s},2800:(t,e,r)=>{"use strict";t.exports={action:r(8692),clear:r(3513),style:r(5012),strip:r(8760),figures:r(6217)}},8760:t=>{"use strict";t.exports=t=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const r=new RegExp(e,"g");return typeof t==="string"?t.replace(r,""):t}},5012:(t,e,r)=>{"use strict";const s=r(9439);const i=r(6217);const n=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>n[t]||n.default;const o=Object.freeze({aborted:s.red(i.cross),done:s.green(i.tick),default:s.cyan("?")});const symbol=(t,e)=>e?o.aborted:t?o.done:o.default;const delimiter=t=>s.gray(t?i.ellipsis:i.pointerSmall);const item=(t,e)=>s.gray(t?e?i.pointerSmall:"+":i.line);t.exports={styles:n,render:render,symbols:o,symbol:symbol,delimiter:delimiter,item:item}},1112:(t,e,r)=>{function isNodeLT(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let e=0,r=process.versions.node.split(".").map(Number);for(;e<t.length;e++){if(r[e]>t[e])return false;if(t[e]>r[e])return true}return false}t.exports=isNodeLT("8.6.0")?r(6598):r(9590)},8994:t=>{"use strict";class DatePart{constructor({token:t,date:e,parts:r,locales:s}){this.token=t;this.date=e||new Date;this.parts=r||[this];this.locales=s||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((e,r)=>r>t&&e instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const e=t.indexOf(this);return t.find(((t,r)=>r>e&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},5513:(t,e,r)=>{"use strict";const s=r(8994);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends s{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let e=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?e+1:this.token==="ddd"?this.locales.weekdaysShort[e]:this.token==="dddd"?this.locales.weekdays[e]:t}}t.exports=Day},9270:(t,e,r)=>{"use strict";const s=r(8994);class Hours extends s{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},1190:(t,e,r)=>{"use strict";t.exports={DatePart:r(8994),Meridiem:r(8135),Day:r(5513),Hours:r(9270),Milliseconds:r(2397),Minutes:r(9246),Month:r(5763),Seconds:r(5579),Year:r(4191)}},8135:(t,e,r)=>{"use strict";const s=r(8994);class Meridiem extends s{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},2397:(t,e,r)=>{"use strict";const s=r(8994);class Milliseconds extends s{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},9246:(t,e,r)=>{"use strict";const s=r(8994);class Minutes extends s{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},5763:(t,e,r)=>{"use strict";const s=r(8994);class Month extends s{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let e=this.token.length;return e===2?String(t+1).padStart(2,"0"):e===3?this.locales.monthsShort[t]:e===4?this.locales.months[t]:String(t+1)}}t.exports=Month},5579:(t,e,r)=>{"use strict";const s=r(8994);class Seconds extends s{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},4191:(t,e,r)=>{"use strict";const s=r(8994);class Year extends s{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},514:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{cursor:n}=r(332);const{style:o,clear:a,figures:l,strip:u}=r(9807);const getVal=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]);const getTitle=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]);const getIndex=(t,e)=>{const r=t.findIndex((t=>t.value===e||t.title===e));return r>-1?r:undefined};class AutocompletePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.fallback=t.fallback||(t.initial!==undefined?`${l.pointerSmall} ${getTitle(this.choices,this.initial)}`:`${l.pointerSmall} ${t.noMatches||"no matches found"}`);this.suggestions=[[]];this.page=0;this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=o.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=a("");this.complete(this.render);this.render()}moveSelect(t){this.select=t;if(this.suggestions[this.page].length>0){this.value=getVal(this.suggestions[this.page],t)}else{this.value=this.initial!==undefined?getVal(this.choices,this.initial):null}this.fire()}async complete(t){const e=this.completing=this.suggest(this.input,this.choices);const r=await e;if(this.completing!==e)return;this.suggestions=r.map(((t,e,r)=>({title:getTitle(r,e),value:getVal(r,e)}))).reduce(((t,e)=>{if(t[t.length-1].length<this.limit)t[t.length-1].push(e);else t.push([e]);return t}),[[]]);this.isFallback=false;this.completing=false;if(!this.suggestions[this.page])this.page=0;if(!this.suggestions.length&&this.fallback){const t=getIndex(this.choices,this.fallback);this.suggestions=[[]];if(t!==undefined)this.suggestions[0].push({title:getTitle(this.choices,t),value:getVal(this.choices,t)});this.isFallback=true}const s=Math.max(r.length-1,0);this.moveSelect(Math.min(s,this.select));t&&t()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,e){let r=this.input.slice(0,this.cursor);let s=this.input.slice(this.cursor);this.input=`${r}${t}${s}`;this.cursor=r.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let e=this.input.slice(this.cursor);this.input=`${t}${e}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let e=this.input.slice(this.cursor+1);this.input=`${t}${e}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions[this.page].length-1);this.render()}up(){if(this.select<=0)return this.bell();this.moveSelect(this.select-1);this.render()}down(){if(this.select>=this.suggestions[this.page].length-1)return this.bell();this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions[this.page].length-1){this.page=(this.page+1)%this.suggestions.length;this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){if(this.page>=this.suggestions.length-1)return this.bell();this.page++;this.moveSelect(0);this.render()}prevPage(){if(this.page<=0)return this.bell();this.page--;this.moveSelect(0);this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}render(){if(this.closed)return;super.render();if(this.lineCount)this.out.write(n.down(this.lineCount));let t=s.bold(`${o.symbol(this.done,this.aborted)} ${this.msg} `)+`${o.delimiter(this.completing)} `;let e=u(t).length;if(this.done&&this.suggestions[this.page][this.select]){t+=`${this.suggestions[this.page][this.select].title}`}else{this.rendered=`${this.transform.render(this.input)}`;e+=this.rendered.length;t+=this.rendered}if(!this.done){this.lineCount=this.suggestions[this.page].length;let e=this.suggestions[this.page].reduce(((t,e,r)=>t+`\n${r===this.select?s.cyan(e.title):e.title}`),"");if(e&&!this.isFallback){t+=e;if(this.suggestions.length>1){this.lineCount++;t+=s.blue(`\nPage ${this.page+1}/${this.suggestions.length}`)}}else{const e=getIndex(this.choices,this.fallback);const r=e!==undefined?getTitle(this.choices,e):this.fallback;t+=`\n${s.gray(r)}`;this.lineCount++}}this.out.write(this.clear+t);this.clear=a(t);if(this.lineCount&&!this.done){let t=n.up(this.lineCount);t+=n.left+n.to(e);t+=n.move(-this.rendered.length+this.cursor*this.scale);this.out.write(t)}}}t.exports=AutocompletePrompt},7685:(t,e,r)=>{"use strict";const s=r(9439);const{cursor:i}=r(332);const n=r(92);const{clear:o,style:a,figures:l}=r(9807);class AutocompleteMultiselectPrompt extends n{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=o("");this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const e=this.filteredOptions.findIndex((e=>e===t));this.cursor=e<0?0:e;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,e){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){return`\nInstructions:\n ${l.arrowUp}/${l.arrowDown}: Highlight option\n ${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n `}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:s.gray("Enter something to filter")}\n`}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(l.radioOn):l.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);super.render();let t=[a.symbol(this.done,this.aborted),s.bold(this.msg),a.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=o(t)}}t.exports=AutocompleteMultiselectPrompt},3037:(t,e,r)=>{const s=r(9439);const i=r(9126);const{style:n}=r(9807);const{erase:o,cursor:a}=r(332);class ConfirmPrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,e){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();this.out.write(o.line+a.to(0)+[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:s.gray(this.initialValue?this.yesOption:this.noOption)].join(" "))}}t.exports=ConfirmPrompt},5048:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{style:n,clear:o,figures:a,strip:l}=r(9807);const{erase:u,cursor:c}=r(332);const{DatePart:h,Meridiem:f,Day:d,Hours:p,Milliseconds:g,Minutes:m,Month:y,Seconds:v,Year:b}=r(1190);const _=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const S={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new d(t),3:t=>new y(t),4:t=>new b(t),5:t=>new f(t),6:t=>new p(t),7:t=>new m(t),8:t=>new v(t),9:t=>new g(t)};const w={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(w,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=o("");this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let e;this.parts=[];while(e=_.exec(t)){let t=e.shift();let r=e.findIndex((t=>t!=null));this.parts.push(r in S?S[r]({token:e[r]||t,date:this.date,parts:this.parts,locales:this.locales}):e[r]||t)}let r=this.parts.reduce(((t,e)=>{if(typeof e==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=e;else t.push(e);return t}),[]);this.parts.splice(0);this.parts.push(...r);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof h)));this.fire();this.render()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t==="string"){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color="red";this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof h)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(c.hide);else this.out.write(u.lines(1));super.render();let t=u.line+(this.lines?u.down(this.lines):"")+c.to(0);this.lines=0;let e="";if(this.error){let t=this.errorMsg.split("\n");e=t.reduce(((t,e,r)=>t+`\n${r?` `:a.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(false),this.parts.reduce(((t,e,r)=>t.concat(r===this.cursor&&!this.done?s.cyan().underline(e.toString()):e)),[]).join("")].join(" ");let i="";if(this.lines){i+=c.up(this.lines);i+=c.left+c.to(l(r).length)}this.out.write(t+r+e+i)}}t.exports=DatePrompt},6529:(t,e,r)=>{"use strict";t.exports={TextPrompt:r(1551),SelectPrompt:r(6515),TogglePrompt:r(181),DatePrompt:r(5048),NumberPrompt:r(3686),MultiselectPrompt:r(92),AutocompletePrompt:r(514),AutocompleteMultiselectPrompt:r(7685),ConfirmPrompt:r(3037)}},92:(t,e,r)=>{"use strict";const s=r(9439);const{cursor:i}=r(332);const n=r(9126);const{clear:o,figures:a,style:l}=r(9807);class MultiselectPrompt extends n{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.value=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=o("");if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}_(t,e){if(t===" "){this.handleSpaceToggle()}else{return this.bell()}}renderInstructions(){return`\nInstructions:\n ${a.arrowUp}/${a.arrowDown}: Highlight option\n ${a.arrowLeft}/${a.arrowRight}/[space]: Toggle selection\n enter/return: Complete answer\n `}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(a.radioOn):a.radioOff)+" "+i}paginateOptions(t){const e=this.cursor;let r=t.map(((t,r)=>this.renderOption(e,t,r)));const i=10;let n=r;let o="";if(r.length===0){return s.red("No matches for this query.")}else if(r.length>i){let a=e-i/2;let l=e+i/2;if(a<0){a=0;l=i}else if(l>t.length){l=t.length;a=l-i}n=r.slice(a,l);o=s.dim("(Move up and down to reveal more choices)")}return"\n"+n.join("\n")+"\n"+o}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);super.render();let t=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=o(t)}}t.exports=MultiselectPrompt},3686:(t,e,r)=>{const s=r(9439);const i=r(9126);const{cursor:n,erase:o}=r(332);const{style:a,clear:l,figures:u,strip:c}=r(9807);const h=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r};class NumberPrompt extends i{constructor(t={}){super(t);this.transform=a.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=s.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||h.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color=`red`;this.fire();this.render();return}let t=this.value;this.value=t!==``?t:this.initial;this.done=true;this.aborted=false;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}up(){this.typed=``;if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,e){if(!this.valid(t))return this.bell();const r=Date.now();if(r-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=r;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;super.render();let t=o.line+(this.lines?o.down(this.lines):``)+n.to(0);this.lines=0;let e=``;if(this.error){let t=this.errorMsg.split(`\n`);e+=t.reduce(((t,e,r)=>t+`\n${r?` `:u.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=!this.done||!this.done&&!this.placeholder;let i=[a.symbol(this.done,this.aborted),s.bold(this.msg),a.delimiter(this.done),r?s[this.color]().underline(this.rendered):this.rendered].join(` `);let l=``;if(this.lines){l+=n.up(this.lines);l+=n.left+n.to(c(i).length)}this.out.write(t+i+e+l)}}t.exports=NumberPrompt},9126:(t,e,r)=>{"use strict";const s=r(4521);const{action:i}=r(9807);const n=r(2361);const{beep:o,cursor:a}=r(332);const l=r(9439);class Prompt extends n{constructor(t={}){super();this.firstRender=true;this.in=t.in||process.stdin;this.out=t.out||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const e=s.createInterface(this.in);s.emitKeypressEvents(this.in,e);if(this.in.isTTY)this.in.setRawMode(true);const keypress=(t,e)=>{let r=i(e);if(r===false){this._&&this._(t,e)}else if(typeof this[r]==="function"){this[r](e)}else{this.bell()}};this.close=()=>{this.out.write(a.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);e.close();this.emit(this.aborted?"abort":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted})}bell(){this.out.write(o)}render(){this.onRender(l);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},6515:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{style:n,clear:o,figures:a}=r(9807);const{erase:l,cursor:u}=r(332);class SelectPrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.value=(this.choices[this.cursor]||{}).value;this.clear=o("");this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0)return this.bell();this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)return this.bell();this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,e){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);else this.out.write(l.lines(this.choices.length+1));super.render();this.out.write([n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(false),this.done?this.selection.title:this.selection.disabled?s.yellow(this.warn):s.gray(this.hint)].join(" "));if(!this.done){this.out.write("\n"+this.choices.map(((t,e)=>{let r,i;if(t.disabled){r=this.cursor===e?s.gray().underline(t.title):s.strikethrough().gray(t.title);i=this.cursor===e?s.bold().gray(a.pointer)+" ":" "}else{r=this.cursor===e?s.cyan().underline(t.title):t.title;i=this.cursor===e?s.cyan(a.pointer)+" ":" "}return`${i} ${r}`})).join("\n"))}}}t.exports=SelectPrompt},1551:(t,e,r)=>{const s=r(9439);const i=r(9126);const{cursor:n}=r(332);const{style:o,clear:a,strip:l,figures:u}=r(9807);class TextPrompt extends i{constructor(t={}){super(t);this.transform=o.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.clear=a(``);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=s.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.fire();this.render()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){this.value=this.value||this.initial;await this.validate();if(this.error){this.red=true;this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t}_(t,e){let r=this.value.slice(0,this.cursor);let s=this.value.slice(this.cursor);this.value=`${r}${t}${s}`;this.red=false;this.cursor=this.placeholder?0:r.length+1;this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.value.slice(0,this.cursor-1);let e=this.value.slice(this.cursor);this.value=`${t}${e}`;this.red=false;this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let e=this.value.slice(this.cursor+1);this.value=`${t}${e}`;this.red=false;this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}render(){if(this.closed)return;super.render();let t=(this.lines?n.down(this.lines):``)+this.clear;this.lines=0;let e=[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(` `);let r=``;if(this.error){let t=this.errorMsg.split(`\n`);r+=t.reduce(((t,e,r)=>t+=`\n${r?" ":u.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let i=``;if(this.lines){i+=n.up(this.lines);i+=n.left+n.to(l(e).length)}i+=n.move(this.placeholder?-this.initial.length*this.scale:-this.rendered.length+this.cursor*this.scale);this.out.write(t+e+r+i);this.clear=a(e+r)}}t.exports=TextPrompt},181:(t,e,r)=>{const s=r(9439);const i=r(9126);const{style:n,clear:o}=r(9807);const{cursor:a,erase:l}=r(332);class TogglePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,e){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();this.out.write(l.lines(this.first?1:this.msg.split(/\n/g).length)+a.to(0)+[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(this.done),this.value?this.inactive:s.cyan().underline(this.inactive),s.gray("/"),this.value?s.cyan().underline(this.active):this.active].join(" "))}}t.exports=TogglePrompt},9590:(t,e,r)=>{"use strict";const s=r(4450);const i=["suggest","format","onState","validate","onRender"];const noop=()=>{};async function prompt(t=[],{onSubmit:e=noop,onCancel:r=noop}={}){const n={};const o=prompt._override||{};t=[].concat(t);let a,l,u,c,h;const getFormattedAnswer=async(t,e,r=false)=>{if(!r&&t.validate&&t.validate(e)!==true){return}return t.format?await t.format(e,n):e};for(l of t){({name:c,type:h}=l);for(let t in l){if(i.includes(t))continue;let e=l[t];l[t]=typeof e==="function"?await e(a,{...n},l):e}if(typeof l.message!=="string"){throw new Error("prompt message is required")}({name:c,type:h}=l);if(!h)continue;if(s[h]===void 0){throw new Error(`prompt type (${h}) is not defined`)}if(o[l.name]!==undefined){a=await getFormattedAnswer(l,o[l.name]);if(a!==undefined){n[c]=a;continue}}try{a=prompt._injected?getInjectedAnswer(prompt._injected):await s[h](l);n[c]=a=await getFormattedAnswer(l,a,true);u=await e(l,a,n)}catch(t){u=!await r(l,n)}if(u)return n}return n}function getInjectedAnswer(t){const e=t.shift();if(e instanceof Error){throw e}return e}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:s,inject:inject,override:override})},4450:(t,e,r)=>{"use strict";const s=e;const i=r(6529);const noop=t=>t;function toPrompt(t,e,r={}){return new Promise(((s,n)=>{const o=new i[t](e);const a=r.onAbort||noop;const l=r.onSubmit||noop;o.on("state",e.onState||noop);o.on("submit",(t=>s(l(t))));o.on("abort",(t=>n(a(t))))}))}s.text=t=>toPrompt("TextPrompt",t);s.password=t=>{t.style="password";return s.text(t)};s.invisible=t=>{t.style="invisible";return s.text(t)};s.number=t=>toPrompt("NumberPrompt",t);s.date=t=>toPrompt("DatePrompt",t);s.confirm=t=>toPrompt("ConfirmPrompt",t);s.list=t=>{const e=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(e).map((t=>t.trim()))})};s.toggle=t=>toPrompt("TogglePrompt",t);s.select=t=>toPrompt("SelectPrompt",t);s.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};s.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,e)=>Promise.resolve(e.filter((e=>e.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));s.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},8573:t=>{"use strict";t.exports=t=>{if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"abort";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},6747:(t,e,r)=>{"use strict";const s=r(2714);const{erase:i,cursor:n}=r(332);const width=t=>[...s(t)].length;t.exports=function(t,e=process.stdout.columns){if(!e)return i.line+n.to(0);let r=0;const s=t.split(/\r?\n/);for(let t of s){r+=1+Math.floor(Math.max(width(t)-1,0)/e)}return(i.line+n.prevLine()).repeat(r-1)+i.line+n.to(0)}},3034:t=>{"use strict";const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const s=process.platform==="win32"?r:e;t.exports=s},9807:(t,e,r)=>{"use strict";t.exports={action:r(8573),clear:r(6747),style:r(7357),strip:r(2714),figures:r(3034)}},2714:t=>{"use strict";t.exports=t=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const r=new RegExp(e,"g");return typeof t==="string"?t.replace(r,""):t}},7357:(t,e,r)=>{"use strict";const s=r(9439);const i=r(3034);const n=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>n[t]||n.default;const o=Object.freeze({aborted:s.red(i.cross),done:s.green(i.tick),default:s.cyan("?")});const symbol=(t,e)=>e?o.aborted:t?o.done:o.default;const delimiter=t=>s.gray(t?i.ellipsis:i.pointerSmall);const item=(t,e)=>s.gray(t?e?i.pointerSmall:"+":i.line);t.exports={styles:n,render:render,symbols:o,symbol:symbol,delimiter:delimiter,item:item}},3135:t=>{
|
|
55
|
-
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
56
|
-
let e;t.exports=typeof queueMicrotask==="function"?queueMicrotask.bind(typeof window!=="undefined"?window:global):t=>(e||(e=Promise.resolve())).then(t).catch((t=>setTimeout((()=>{throw t}),0)))},8271:(t,e,r)=>{var s=r(7563);var i=r(1017).join;var n=r(5134);var o="/etc";var a=process.platform==="win32";var l=a?process.env.USERPROFILE:process.env.HOME;t.exports=function(t,e,u,c){if("string"!==typeof t)throw new Error("rc(name): name *must* be string");if(!u)u=r(5912)(process.argv.slice(2));e=("string"===typeof e?s.json(e):e)||{};c=c||s.parse;var h=s.env(t+"_");var f=[e];var d=[];function addConfigFile(t){if(d.indexOf(t)>=0)return;var e=s.file(t);if(e){f.push(c(e));d.push(t)}}if(!a)[i(o,t,"config"),i(o,t+"rc")].forEach(addConfigFile);if(l)[i(l,".config",t,"config"),i(l,".config",t),i(l,"."+t,"config"),i(l,"."+t+"rc")].forEach(addConfigFile);addConfigFile(s.find("."+t+"rc"));if(h.config)addConfigFile(h.config);if(u.config)addConfigFile(u.config);return n.apply(null,f.concat([h,u,d.length?{configs:d,config:d[d.length-1]}:undefined]))}},7563:(t,e,r)=>{"use strict";var s=r(7147);var i=r(1923);var n=r(1017);var o=r(6397);var a=e.parse=function(t){if(/^\s*{/.test(t))return JSON.parse(o(t));return i.parse(t)};var l=e.file=function(){var t=[].slice.call(arguments).filter((function(t){return t!=null}));for(var e in t)if("string"!==typeof t[e])return;var r=n.join.apply(null,t);var i;try{return s.readFileSync(r,"utf-8")}catch(t){return}};var u=e.json=function(){var t=l.apply(null,arguments);return t?a(t):null};var c=e.env=function(t,e){e=e||process.env;var r={};var s=t.length;for(var i in e){if(i.toLowerCase().indexOf(t.toLowerCase())===0){var n=i.substring(s).split("__");var o;while((o=n.indexOf(""))>-1){n.splice(o,1)}var a=r;n.forEach((function _buildSubObj(t,r){if(!t||typeof a!=="object")return;if(r===n.length-1)a[t]=e[i];if(a[t]===undefined)a[t]={};a=a[t]}))}}return r};var h=e.find=function(){var t=n.join.apply(null,[].slice.call(arguments));function find(t,e){var r=n.join(t,e);try{s.statSync(r);return r}catch(r){if(n.dirname(t)!==t)return find(n.dirname(t),e)}}return find(process.cwd(),t)}},6397:t=>{"use strict";var e=1;var r=2;function stripWithoutWhitespace(){return""}function stripWithWhitespace(t,e,r){return t.slice(e,r).replace(/\S/g," ")}t.exports=function(t,s){s=s||{};var i;var n;var o=false;var a=false;var l=0;var u="";var c=s.whitespace===false?stripWithoutWhitespace:stripWithWhitespace;for(var h=0;h<t.length;h++){i=t[h];n=t[h+1];if(!a&&i==='"'){var f=t[h-1]==="\\"&&t[h-2]!=="\\";if(!f){o=!o}}if(o){continue}if(!a&&i+n==="//"){u+=t.slice(l,h);l=h;a=e;h++}else if(a===e&&i+n==="\r\n"){h++;a=false;u+=c(t,l,h);l=h;continue}else if(a===e&&i==="\n"){a=false;u+=c(t,l,h);l=h}else if(!a&&i+n==="/*"){u+=t.slice(l,h);l=h;a=r;h++;continue}else if(a===r&&i+n==="*/"){h++;a=false;u+=c(t,l,h+1);l=h+1;continue}}return u+(a?c(t.substr(l)):t.substr(l))}},4955:(t,e,r)=>{const s=r(3118).Buffer;function decodeBase64(t){return s.from(t,"base64").toString("utf8")}function encodeBase64(t){return s.from(t,"utf8").toString("base64")}t.exports={decodeBase64:decodeBase64,encodeBase64:encodeBase64}},1384:(t,e,r)=>{var s=r(7310);var i=r(4955);var n=i.decodeBase64;var o=i.encodeBase64;var a=":_authToken";var l=":username";var u=":_password";t.exports=function(){var t;var e;if(arguments.length>=2){t=arguments[0];e=arguments[1]}else if(typeof arguments[0]==="string"){t=arguments[0]}else{e=arguments[0]}e=e||{};e.npmrc=e.npmrc||r(8271)("npm",{registry:"https://registry.npmjs.org/"});t=t||e.npmrc.registry;return getRegistryAuthInfo(t,e)||getLegacyAuthInfo(e.npmrc)};function getRegistryAuthInfo(t,e){var r=s.parse(t,false,true);var i;while(i!=="/"&&r.pathname!==i){i=r.pathname||"/";var n="//"+r.host+i.replace(/\/$/,"");var o=getAuthInfoForUrl(n,e.npmrc);if(o){return o}if(!e.recursive){return/\/$/.test(t)?undefined:getRegistryAuthInfo(s.resolve(t,"."),e)}r.pathname=s.resolve(normalizePath(i),"..")||"/"}return undefined}function getLegacyAuthInfo(t){if(t._auth){return{token:t._auth,type:"Basic"}}return undefined}function normalizePath(t){return t[t.length-1]==="/"?t:t+"/"}function getAuthInfoForUrl(t,e){var r=getBearerToken(e[t+a]||e[t+"/"+a]);if(r){return r}var s=e[t+l]||e[t+"/"+l];var i=e[t+u]||e[t+"/"+u];var n=getTokenForUsernameAndPassword(s,i);if(n){return n}return undefined}function getBearerToken(t){if(!t){return undefined}var e=t.replace(/^\$\{?([^}]*)\}?$/,(function(t,e){return process.env[e]}));return{token:e,type:"Bearer"}}function getTokenForUsernameAndPassword(t,e){if(!t||!e){return undefined}var r=n(e.replace(/^\$\{?([^}]*)\}?$/,(function(t,e){return process.env[e]})));var s=o(t+":"+r);return{token:s,type:"Basic",password:r,username:t}}},2447:(t,e,r)=>{"use strict";t.exports=function(t){var e=r(8271)("npm",{registry:"https://registry.npmjs.org/"});var s=e[t+":registry"]||e.registry;return s.slice(-1)==="/"?s:s+"/"}},7226:t=>{"use strict";function reusify(t){var e=new t;var r=e;function get(){var s=e;if(s.next){e=s.next}else{e=new t;r=e}s.next=null;return s}function release(t){r.next=t;r=t}return{get:get,release:release}}t.exports=reusify},1188:(t,e,r)=>{
|
|
57
|
-
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
58
|
-
t.exports=runParallel;const s=r(3135);function runParallel(t,e){let r,i,n;let o=true;if(Array.isArray(t)){r=[];i=t.length}else{n=Object.keys(t);r={};i=n.length}function done(t){function end(){if(e)e(t,r);e=null}if(o)s(end);else end()}function each(t,e,s){r[t]=s;if(--i===0||e){done(e)}}if(!i){done(null)}else if(n){n.forEach((function(e){t[e]((function(t,r){each(e,t,r)}))}))}else{t.forEach((function(t,e){t((function(t,r){each(e,t,r)}))}))}o=false}},3118:(t,e,r)=>{var s=r(4300);var i=s.Buffer;function copyProps(t,e){for(var r in t){e[r]=t[r]}}if(i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow){t.exports=s}else{copyProps(s,e);e.Buffer=SafeBuffer}function SafeBuffer(t,e,r){return i(t,e,r)}copyProps(i,SafeBuffer);SafeBuffer.from=function(t,e,r){if(typeof t==="number"){throw new TypeError("Argument must not be a number")}return i(t,e,r)};SafeBuffer.alloc=function(t,e,r){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}var s=i(t);if(e!==undefined){if(typeof r==="string"){s.fill(e,r)}else{s.fill(e)}}else{s.fill(0)}return s};SafeBuffer.allocUnsafe=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return i(t)};SafeBuffer.allocUnsafeSlow=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return s.SlowBuffer(t)}},4970:(t,e,r)=>{"use strict";const s=r(1504);t.exports=(t="")=>{const e=t.match(s);if(!e){return null}const[r,i]=e[0].replace(/#! ?/,"").split(" ");const n=r.split("/").pop();if(n==="env"){return i}return i?`${n} ${i}`:n}},1504:t=>{"use strict";t.exports=/^#!(.*)/},332:t=>{"use strict";const e="";const r=`${e}[`;const s="";const i={to(t,e){if(!e)return`${r}${t+1}G`;return`${r}${e+1};${t+1}H`},move(t,e){let s="";if(t<0)s+=`${r}${-t}D`;else if(t>0)s+=`${r}${t}C`;if(e<0)s+=`${r}${-e}A`;else if(e>0)s+=`${r}${e}B`;return s},up:(t=1)=>`${r}${t}A`,down:(t=1)=>`${r}${t}B`,forward:(t=1)=>`${r}${t}C`,backward:(t=1)=>`${r}${t}D`,nextLine:(t=1)=>`${r}E`.repeat(t),prevLine:(t=1)=>`${r}F`.repeat(t),left:`${r}G`,hide:`${r}?25l`,show:`${r}?25h`,save:`${e}7`,restore:`${e}8`};const n={up:(t=1)=>`${r}S`.repeat(t),down:(t=1)=>`${r}T`.repeat(t)};const o={screen:`${r}2J`,up:(t=1)=>`${r}1J`.repeat(t),down:(t=1)=>`${r}J`.repeat(t),line:`${r}2K`,lineEnd:`${r}K`,lineStart:`${r}1K`,lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?i.up():"");if(t)e+=i.left;return e}};t.exports={cursor:i,scroll:n,erase:o,beep:s}},887:(t,e,r)=>{"use strict";
|
|
59
|
-
/*!
|
|
60
|
-
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
61
|
-
*
|
|
62
|
-
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
63
|
-
* Released under the MIT License.
|
|
64
|
-
*/const s=r(6110);const toRegexRange=(t,e,r)=>{if(s(t)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(e===void 0||t===e){return String(t)}if(s(e)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let i={relaxZeros:true,...r};if(typeof i.strictZeros==="boolean"){i.relaxZeros=i.strictZeros===false}let n=String(i.relaxZeros);let o=String(i.shorthand);let a=String(i.capture);let l=String(i.wrap);let u=t+":"+e+"="+n+o+a+l;if(toRegexRange.cache.hasOwnProperty(u)){return toRegexRange.cache[u].result}let c=Math.min(t,e);let h=Math.max(t,e);if(Math.abs(c-h)===1){let r=t+"|"+e;if(i.capture){return`(${r})`}if(i.wrap===false){return r}return`(?:${r})`}let f=hasPadding(t)||hasPadding(e);let d={min:t,max:e,a:c,b:h};let p=[];let g=[];if(f){d.isPadded=f;d.maxLen=String(d.max).length}if(c<0){let t=h<0?Math.abs(h):1;g=splitToPatterns(t,Math.abs(c),d,i);c=d.a=0}if(h>=0){p=splitToPatterns(c,h,d,i)}d.negatives=g;d.positives=p;d.result=collatePatterns(g,p,i);if(i.capture===true){d.result=`(${d.result})`}else if(i.wrap!==false&&p.length+g.length>1){d.result=`(?:${d.result})`}toRegexRange.cache[u]=d;return d.result};function collatePatterns(t,e,r){let s=filterPatterns(t,e,"-",false,r)||[];let i=filterPatterns(e,t,"",false,r)||[];let n=filterPatterns(t,e,"-?",true,r)||[];let o=s.concat(n).concat(i);return o.join("|")}function splitToRanges(t,e){let r=1;let s=1;let i=countNines(t,r);let n=new Set([e]);while(t<=i&&i<=e){n.add(i);r+=1;i=countNines(t,r)}i=countZeros(e+1,s)-1;while(t<i&&i<=e){n.add(i);s+=1;i=countZeros(e+1,s)-1}n=[...n];n.sort(compare);return n}function rangeToPattern(t,e,r){if(t===e){return{pattern:t,count:[],digits:0}}let s=zip(t,e);let i=s.length;let n="";let o=0;for(let t=0;t<i;t++){let[e,i]=s[t];if(e===i){n+=e}else if(e!=="0"||i!=="9"){n+=toCharacterClass(e,i,r)}else{o++}}if(o){n+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:n,count:[o],digits:i}}function splitToPatterns(t,e,r,s){let i=splitToRanges(t,e);let n=[];let o=t;let a;for(let t=0;t<i.length;t++){let e=i[t];let l=rangeToPattern(String(o),String(e),s);let u="";if(!r.isPadded&&a&&a.pattern===l.pattern){if(a.count.length>1){a.count.pop()}a.count.push(l.count[0]);a.string=a.pattern+toQuantifier(a.count);o=e+1;continue}if(r.isPadded){u=padZeros(e,r,s)}l.string=u+l.pattern+toQuantifier(l.count);n.push(l);o=e+1;a=l}return n}function filterPatterns(t,e,r,s,i){let n=[];for(let i of t){let{string:t}=i;if(!s&&!contains(e,"string",t)){n.push(r+t)}if(s&&contains(e,"string",t)){n.push(r+t)}}return n}function zip(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function compare(t,e){return t>e?1:e>t?-1:0}function contains(t,e,r){return t.some((t=>t[e]===r))}function countNines(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function countZeros(t,e){return t-t%Math.pow(10,e)}function toQuantifier(t){let[e=0,r=""]=t;if(r||e>1){return`{${e+(r?","+r:"")}}`}return""}function toCharacterClass(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function hasPadding(t){return/^-?(0+)\d/.test(t)}function padZeros(t,e,r){if(!e.isPadded){return t}let s=Math.abs(e.maxLen-String(t).length);let i=r.relaxZeros!==false;switch(s){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:{return i?`0{0,${s}}`:`0{${s}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};t.exports=toRegexRange},5418:(t,e,r)=>{const{URL:s}=r(7310);const{join:i}=r(1017);const n=r(7147);const{promisify:o}=r(3837);const{tmpdir:a}=r(2037);const l=r(2447);const u=o(n.writeFile);const c=o(n.mkdir);const h=o(n.readFile);const compareVersions=(t,e)=>t.localeCompare(e,"en-US",{numeric:true});const encode=t=>encodeURIComponent(t).replace(/^%40/,"@");const getFile=async(t,e)=>{const r=a();const s=i(r,"update-check");if(!n.existsSync(s)){await c(s)}let o=`${t.name}-${e}.json`;if(t.scope){o=`${t.scope}-${o}`}return i(s,o)};const evaluateCache=async(t,e,r)=>{if(n.existsSync(t)){const s=await h(t,"utf8");const{lastUpdate:i,latest:n}=JSON.parse(s);const o=i+r;if(o>e){return{shouldCheck:false,latest:n}}}return{shouldCheck:true,latest:null}};const updateCache=async(t,e,r)=>{const s=JSON.stringify({latest:e,lastUpdate:r});await u(t,s,"utf8")};const loadPackage=(t,e)=>new Promise(((s,i)=>{const n={host:t.hostname,path:t.pathname,port:t.port,headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},timeout:2e3};if(e){n.headers.authorization=`${e.type} ${e.token}`}const{get:o}=r(t.protocol==="https:"?5687:3685);o(n,(t=>{const{statusCode:e}=t;if(e!==200){const r=new Error(`Request failed with code ${e}`);r.code=e;i(r);t.resume();return}let r="";t.setEncoding("utf8");t.on("data",(t=>{r+=t}));t.on("end",(()=>{try{const t=JSON.parse(r);s(t)}catch(t){i(t)}}))})).on("error",i).on("timeout",i)}));const getMostRecent=async({full:t,scope:e},i)=>{const n=l(e);const o=new s(t,n);let a=null;try{a=await loadPackage(o)}catch(t){if(t.code&&String(t.code).startsWith(4)){const t=r(1384);const e=t(n,{recursive:true});a=await loadPackage(o,e)}else{throw t}}const u=a["dist-tags"][i];if(!u){throw new Error(`Distribution tag ${i} is not available`)}return u};const f={interval:36e5,distTag:"latest"};const getDetails=t=>{const e={full:encode(t)};if(t.includes("/")){const r=t.split("/");e.scope=r[0];e.name=r[1]}else{e.scope=null;e.name=t}return e};t.exports=async(t,e)=>{if(typeof t!=="object"){throw new Error("The first parameter should be your package.json file content")}const r=getDetails(t.name);const s=Date.now();const{distTag:i,interval:n}=Object.assign({},f,e);const o=await getFile(r,i);let a=null;let l=true;({shouldCheck:l,latest:a}=await evaluateCache(o,s,n));if(l){a=await getMostRecent(r,i);await updateCache(o,a,s)}const u=compareVersions(t.version,a);if(u===-1){return{latest:a,fromCache:!l}}return null}},5880:(t,e,r)=>{"use strict";var s=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var i=r(5462);var n=["node_modules","favicon.ico"];var o=t.exports=function(t){var e=[];var r=[];if(t===null){r.push("name cannot be null");return done(e,r)}if(t===undefined){r.push("name cannot be undefined");return done(e,r)}if(typeof t!=="string"){r.push("name must be a string");return done(e,r)}if(!t.length){r.push("name length must be greater than zero")}if(t.match(/^\./)){r.push("name cannot start with a period")}if(t.match(/^_/)){r.push("name cannot start with an underscore")}if(t.trim()!==t){r.push("name cannot contain leading or trailing spaces")}n.forEach((function(e){if(t.toLowerCase()===e){r.push(e+" is a blacklisted name")}}));i.forEach((function(r){if(t.toLowerCase()===r){e.push(r+" is a core module name")}}));if(t.length>214){e.push("name can no longer contain more than 214 characters")}if(t.toLowerCase()!==t){e.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(t.split("/").slice(-1)[0])){e.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(t)!==t){var o=t.match(s);if(o){var a=o[1];var l=o[2];if(encodeURIComponent(a)===a&&encodeURIComponent(l)===l){return done(e,r)}}r.push("name can only contain URL-friendly characters")}return done(e,r)};o.scopedPackagePattern=s;var done=function(t,e){var r={validForNewPackages:e.length===0&&t.length===0,validForOldPackages:e.length===0,warnings:t,errors:e};if(!r.warnings.length)delete r.warnings;if(!r.errors.length)delete r.errors;return r}},8201:(t,e,r)=>{const s=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const i=r(1017);const n=s?";":":";const o=r(228);const getNotFoundError=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"});const getPathInfo=(t,e)=>{const r=e.colon||n;const i=t.match(/\//)||s&&t.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)];const o=s?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=s?o.split(r):[""];if(s){if(t.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:i,pathExt:a,pathExtExe:o}};const which=(t,e,r)=>{if(typeof e==="function"){r=e;e={}}if(!e)e={};const{pathEnv:s,pathExt:n,pathExtExe:a}=getPathInfo(t,e);const l=[];const step=r=>new Promise(((n,o)=>{if(r===s.length)return e.all&&l.length?n(l):o(getNotFoundError(t));const a=s[r];const u=/^".*"$/.test(a)?a.slice(1,-1):a;const c=i.join(u,t);const h=!u&&/^\.[\\\/]/.test(t)?t.slice(0,2)+c:c;n(subStep(h,r,0))}));const subStep=(t,r,s)=>new Promise(((i,u)=>{if(s===n.length)return i(step(r+1));const c=n[s];o(t+c,{pathExt:a},((n,o)=>{if(!n&&o){if(e.all)l.push(t+c);else return i(t+c)}return i(subStep(t,r,s+1))}))}));return r?step(0).then((t=>r(null,t)),r):step(0)};const whichSync=(t,e)=>{e=e||{};const{pathEnv:r,pathExt:s,pathExtExe:n}=getPathInfo(t,e);const a=[];for(let l=0;l<r.length;l++){const u=r[l];const c=/^".*"$/.test(u)?u.slice(1,-1):u;const h=i.join(c,t);const f=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+h:h;for(let t=0;t<s.length;t++){const r=f+s[t];try{const t=o.sync(r,{pathExt:n});if(t){if(e.all)a.push(r);else return r}}catch(t){}}}if(e.all&&a.length)return a;if(e.nothrow)return null;throw getNotFoundError(t)};t.exports=which;which.sync=whichSync},7618:(t,e,r)=>{"use strict";const s=r(2081);const i=r(4527);const n=r(2773);function spawn(t,e,r){const o=i(t,e,r);const a=s.spawn(o.command,o.args,o.options);n.hookChildProcess(a,o);return a}function spawnSync(t,e,r){const o=i(t,e,r);const a=s.spawnSync(o.command,o.args,o.options);a.error=a.error||n.verifyENOENTSync(a.status,o);return a}t.exports=spawn;t.exports.spawn=spawn;t.exports.sync=spawnSync;t.exports._parse=i;t.exports._enoent=n},2773:t=>{"use strict";const e=process.platform==="win32";function notFoundError(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function hookChildProcess(t,r){if(!e){return}const s=t.emit;t.emit=function(e,i){if(e==="exit"){const e=verifyENOENT(i,r);if(e){return s.call(t,"error",e)}}return s.apply(t,arguments)}}function verifyENOENT(t,r){if(e&&t===1&&!r.file){return notFoundError(r.original,"spawn")}return null}function verifyENOENTSync(t,r){if(e&&t===1&&!r.file){return notFoundError(r.original,"spawnSync")}return null}t.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},4527:(t,e,r)=>{"use strict";const s=r(1017);const i=r(7231);const n=r(1880);const o=r(2655);const a=process.platform==="win32";const l=/\.(?:com|exe)$/i;const u=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(t){t.file=i(t);const e=t.file&&o(t.file);if(e){t.args.unshift(t.file);t.command=e;return i(t)}return t.file}function parseNonShell(t){if(!a){return t}const e=detectShebang(t);const r=!l.test(e);if(t.options.forceShell||r){const r=u.test(e);t.command=s.normalize(t.command);t.command=n.command(t.command);t.args=t.args.map((t=>n.argument(t,r)));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`];t.command=process.env.comspec||"cmd.exe";t.options.windowsVerbatimArguments=true}return t}function parse(t,e,r){if(e&&!Array.isArray(e)){r=e;e=null}e=e?e.slice(0):[];r=Object.assign({},r);const s={command:t,args:e,options:r,file:undefined,original:{command:t,args:e}};return r.shell?s:parseNonShell(s)}t.exports=parse},1880:t=>{"use strict";const e=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(t){t=t.replace(e,"^$1");return t}function escapeArgument(t,r){t=`${t}`;t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"');t=t.replace(/(?=(\\+?)?)\1$/,"$1$1");t=`"${t}"`;t=t.replace(e,"^$1");if(r){t=t.replace(e,"^$1")}return t}t.exports.command=escapeCommand;t.exports.argument=escapeArgument},2655:(t,e,r)=>{"use strict";const s=r(7147);const i=r(4970);function readShebang(t){const e=150;const r=Buffer.alloc(e);let n;try{n=s.openSync(t,"r");s.readSync(n,r,0,e,0);s.closeSync(n)}catch(t){}return i(r.toString())}t.exports=readShebang},7231:(t,e,r)=>{"use strict";const s=r(1017);const i=r(8201);const n=r(2170);function resolveCommandAttempt(t,e){const r=t.options.env||process.env;const o=process.cwd();const a=t.options.cwd!=null;const l=a&&process.chdir!==undefined&&!process.chdir.disabled;if(l){try{process.chdir(t.options.cwd)}catch(t){}}let u;try{u=i.sync(t.command,{path:r[n({env:r})],pathExt:e?s.delimiter:undefined})}catch(t){}finally{if(l){process.chdir(o)}}if(u){u=s.resolve(a?t.options.cwd:"",u)}return u}function resolveCommand(t){return resolveCommandAttempt(t)||resolveCommandAttempt(t,true)}t.exports=resolveCommand},8276:(t,e,r)=>{let s=r(6224);let i=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||s.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env);let formatter=(t,e,r=t)=>s=>{let i=""+s;let n=i.indexOf(e,t.length);return~n?t+replaceClose(i,e,r,n)+e:t+i+e};let replaceClose=(t,e,r,s)=>{let i=t.substring(0,s)+r;let n=t.substring(s+e.length);let o=n.indexOf(e);return~o?i+replaceClose(n,e,r,o):i+n};let createColors=(t=i)=>({isColorSupported:t,reset:t?t=>`[0m${t}[0m`:String,bold:t?formatter("[1m","[22m","[22m[1m"):String,dim:t?formatter("[2m","[22m","[22m[2m"):String,italic:t?formatter("[3m","[23m"):String,underline:t?formatter("[4m","[24m"):String,inverse:t?formatter("[7m","[27m"):String,hidden:t?formatter("[8m","[28m"):String,strikethrough:t?formatter("[9m","[29m"):String,black:t?formatter("[30m","[39m"):String,red:t?formatter("[31m","[39m"):String,green:t?formatter("[32m","[39m"):String,yellow:t?formatter("[33m","[39m"):String,blue:t?formatter("[34m","[39m"):String,magenta:t?formatter("[35m","[39m"):String,cyan:t?formatter("[36m","[39m"):String,white:t?formatter("[37m","[39m"):String,gray:t?formatter("[90m","[39m"):String,bgBlack:t?formatter("[40m","[49m"):String,bgRed:t?formatter("[41m","[49m"):String,bgGreen:t?formatter("[42m","[49m"):String,bgYellow:t?formatter("[43m","[49m"):String,bgBlue:t?formatter("[44m","[49m"):String,bgMagenta:t?formatter("[45m","[49m"):String,bgCyan:t?formatter("[46m","[49m"):String,bgWhite:t?formatter("[47m","[49m"):String});t.exports=createColors();t.exports.createColors=createColors},7019:(t,e,r)=>{"use strict";r.r(e);var s=r(8276);var i=r(8018);var n=r.n(i);var o=r(1017);var a=r.n(o);var l=r(1112);var u=r.n(l);var c=r(5418);var h=r.n(c);var f=r(7147);var d=r.n(f);function makeDir(t,e={recursive:true}){return d().promises.mkdir(t,e)}var p=r(2081);function isInGitRepository(){try{(0,p.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(t){}return false}function isInMercurialRepository(){try{(0,p.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(t){}return false}function isDefaultBranchSet(){try{(0,p.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch(t){}return false}function tryGitInit(t){let e=false;try{(0,p.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,p.execSync)("git init",{stdio:"ignore"});e=true;if(!isDefaultBranchSet()){(0,p.execSync)("git checkout -b main",{stdio:"ignore"})}(0,p.execSync)("git add -A",{stdio:"ignore"});(0,p.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch(r){if(e){try{d().rmSync(a().join(t,".git"),{recursive:true,force:true})}catch(t){}}return false}}function isFolderEmpty(t,e){const r=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];const i=d().readdirSync(t).filter((t=>!r.includes(t))).filter((t=>!/\.iml$/.test(t)));if(i.length>0){console.log(`The directory ${(0,s.green)(e)} contains files that could conflict:`);console.log();for(const e of i){try{const r=d().lstatSync(a().join(t,e));if(r.isDirectory()){console.log(` ${(0,s.blue)(e)}/`)}else{console.log(` ${e}`)}}catch{console.log(` ${e}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}async function isWriteable(t){try{await d().promises.access(t,(d().constants||d()).W_OK);return true}catch(t){return false}}var g=r(7618);var m=r.n(g);async function install(t){let e=["install"];return new Promise(((r,s)=>{const i=m()(t,e,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});i.on("close",(i=>{if(i!==0){s({command:`${t} ${e.join(" ")}`});return}r()}))}))}var y=r(3909);const identity=t=>t;const copy=async(t,e,{cwd:r,rename:s=identity,parents:i=true}={})=>{const n=typeof t==="string"?[t]:t;if(n.length===0||!e){throw new TypeError("`src` and `dest` are required")}const o=await(0,y.async)(n,{cwd:r,dot:true,absolute:false,stats:false});const l=r?a().resolve(r,e):e;return Promise.all(o.map((async t=>{const e=a().dirname(t);const n=s(a().basename(t));const o=r?a().resolve(r,t):t;const u=i?a().join(l,e,n):a().join(l,n);await d().promises.mkdir(a().dirname(u),{recursive:true});return d().promises.copyFile(o,u)})))};var v=r(2037);var b=r.n(v);const _=require("fs/promises");var S=r.n(_);const w=JSON.parse('{"name":"create-xmlui-app","version":"0.12.26","scripts":{"dev":"mkdir -p dist && cp -r templates/default dist/ && ncc build ./index.ts -w -o dist/","build":"ncc build ./index.ts -o dist/ --minify --no-cache --no-source-map-register && cp -r templates/default dist/","prepublishOnly":"npm run build"},"bin":{"create-xmlui-app":"./dist/index.js"},"files":["dist"],"devDependencies":{"@types/cross-spawn":"6.0.0","@types/node":"^20.2.5","@types/prompts":"2.0.1","@types/validate-npm-package-name":"3.0.0","@vercel/ncc":"0.34.0","fast-glob":"3.3.1","commander":"2.20.0","cross-spawn":"7.0.5","picocolors":"1.0.0","prompts":"2.1.0","update-check":"1.5.4","validate-npm-package-name":"3.0.0"},"engines":{"node":">=18.12.0"},"repository":{"url":"https://github.com/xmlui-com/xmlui.git"}}');const installTemplate=async({appName:t,root:e,packageManager:r,template:i,useGit:n})=>{console.log((0,s.bold)(`Using ${r}.`));console.log("\nInitializing project with template:",i,"\n");const o=a().join(__dirname,i,"ts");const l=["**"];if(!n){l.push("!gitignore")}await copy(l,e,{parents:true,cwd:o,rename(t){switch(t){case"gitignore":case"eslintrc.json":{return`.${t}`}case"README-template.md":{return"README.md"}default:{return t}}}});const u={name:t,version:"0.1.0",private:true,scripts:{start:"xmlui start",build:"xmlui build",preview:"xmlui preview","build-prod":"npm run build -- --prod","release-ci":"npm run build-prod && xmlui zip-dist"},dependencies:{xmlui:w.version}};await S().writeFile(a().join(e,"package.json"),JSON.stringify(u,null,2)+b().EOL);console.log("\nInstalling dependencies:");for(const t in u.dependencies)console.log(`- ${(0,s.cyan)(t)}`);console.log();await install(r)};async function createApp({appPath:t,packageManager:e,useGit:r}){const i="default";const n=a().resolve(t);if(!await isWriteable(a().dirname(n))){console.error("The application path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const o=a().basename(n);await makeDir(n);if(!isFolderEmpty(n,o)){process.exit(1)}console.log(`Creating a new UI Engine app in ${(0,s.green)(n)}.`);console.log();process.chdir(n);await installTemplate({appName:o,root:n,template:i,packageManager:e,useGit:r});if(r&&tryGitInit(n)){console.log("Initialized a git repository.");console.log()}console.log(`${(0,s.green)("Success!")} Created ${o} at ${t}`);console.log()}var x=r(5880);var P=r.n(x);function validateNpmName(t){const e=P()(t);if(e.validForNewPackages){return{valid:true}}return{valid:false,problems:[...e.errors||[],...e.warnings||[]]}}let E="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=t=>{if(t.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const A=new(n().Command)(w.name).version(w.version).arguments("<project-directory>").usage(`${(0,s.green)("<project-directory>")} [options]`).action((t=>{E=t})).option("--use-git",`Explicitly tell the CLI to initialize a git repository`).allowUnknownOption().parse(process.argv);const k="npm";async function run(){if(typeof E==="string"){E=E.trim()}if(!E){const t=await u()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:t=>{const e=validateNpmName(a().basename(a().resolve(t)));if(e.valid){return true}return"Invalid project name: "+e.problems[0]}});if(typeof t.path==="string"){E=t.path.trim()}}if(!E){console.log("\nPlease specify the project directory:\n"+` ${(0,s.cyan)(A.name())} ${(0,s.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,s.cyan)(A.name())} ${(0,s.green)("my-xmlui-app")}\n\n`+`Run ${(0,s.cyan)(`${A.name()} --help`)} to see all options.`);process.exit(1)}const t=a().resolve(E);const e=a().basename(t);const{valid:r,problems:i}=validateNpmName(e);if(!r){console.error(`Could not create a project called ${(0,s.red)(`"${e}"`)} because of npm naming restrictions:`);i.forEach((t=>console.error(` ${(0,s.red)((0,s.bold)("*"))} ${t}`)));process.exit(1)}const n=a().resolve(t);const o=a().basename(n);const l=d().existsSync(n);if(l&&!isFolderEmpty(n,o)){process.exit(1)}if(A.useGit===undefined){const{useGit:t}=await u()({type:"toggle",name:"useGit",message:`Would you like to initialize a git repository?`,initial:false,active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});A.useGit=Boolean(t)}await createApp({appPath:t,packageManager:k,useGit:!!A.useGit})}const R=h()(w).catch((()=>null));async function notifyUpdate(){try{const t=await R;if(t===null||t===void 0?void 0:t.latest){const t="npm i -g create-xmlui-app";console.log((0,s.yellow)((0,s.bold)("A new version of `create-xmlui-app` is available!"))+"\n"+"You can update by running: "+(0,s.cyan)(t)+"\n")}process.exit()}catch{}}run().then(notifyUpdate).catch((async t=>{console.log();console.log("Aborting installation.");if(t.command){console.log(` ${(0,s.cyan)(t.command)} has failed.`)}else{console.log((0,s.red)("Unexpected error. Please report it as a bug:")+"\n",t)}console.log();await notifyUpdate();process.exit(1)}))},4300:t=>{"use strict";t.exports=require("buffer")},2081:t=>{"use strict";t.exports=require("child_process")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},4521:t=>{"use strict";t.exports=require("readline")},2781:t=>{"use strict";t.exports=require("stream")},6224:t=>{"use strict";t.exports=require("tty")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},4309:(t,e,r)=>{"use strict";var s=r(7226);function fastqueue(t,e,r){if(typeof t==="function"){r=e;e=t;t=null}if(!(r>=1)){throw new Error("fastqueue concurrency must be equal to or greater than 1")}var i=s(Task);var n=null;var o=null;var a=0;var l=null;var u={push:push,drain:noop,saturated:noop,pause:pause,paused:false,get concurrency(){return r},set concurrency(t){if(!(t>=1)){throw new Error("fastqueue concurrency must be equal to or greater than 1")}r=t;if(u.paused)return;for(;n&&a<r;){a++;release()}},running:running,resume:resume,idle:idle,length:length,getQueue:getQueue,unshift:unshift,empty:noop,kill:kill,killAndDrain:killAndDrain,error:error,abort:abort};return u;function running(){return a}function pause(){u.paused=true}function length(){var t=n;var e=0;while(t){t=t.next;e++}return e}function getQueue(){var t=n;var e=[];while(t){e.push(t.value);t=t.next}return e}function resume(){if(!u.paused)return;u.paused=false;if(n===null){a++;release();return}for(;n&&a<r;){a++;release()}}function idle(){return a===0&&u.length()===0}function push(s,c){var h=i.get();h.context=t;h.release=release;h.value=s;h.callback=c||noop;h.errorHandler=l;if(a>=r||u.paused){if(o){o.next=h;o=h}else{n=h;o=h;u.saturated()}}else{a++;e.call(t,h.value,h.worked)}}function unshift(s,c){var h=i.get();h.context=t;h.release=release;h.value=s;h.callback=c||noop;h.errorHandler=l;if(a>=r||u.paused){if(n){h.next=n;n=h}else{n=h;o=h;u.saturated()}}else{a++;e.call(t,h.value,h.worked)}}function release(s){if(s){i.release(s)}var l=n;if(l&&a<=r){if(!u.paused){if(o===n){o=null}n=l.next;l.next=null;e.call(t,l.value,l.worked);if(o===null){u.empty()}}else{a--}}else if(--a===0){u.drain()}}function kill(){n=null;o=null;u.drain=noop}function killAndDrain(){n=null;o=null;u.drain();u.drain=noop}function abort(){var t=n;n=null;o=null;while(t){var e=t.next;var r=t.callback;var s=t.errorHandler;var i=t.value;var a=t.context;t.value=null;t.callback=noop;t.errorHandler=null;if(s){s(new Error("abort"),i)}r.call(a,new Error("abort"));t.release(t);t=e}u.drain=noop}function error(t){l=t}}function noop(){}function Task(){this.value=null;this.callback=noop;this.next=null;this.release=noop;this.context=null;this.errorHandler=null;var t=this;this.worked=function worked(e,r){var s=t.callback;var i=t.errorHandler;var n=t.value;t.value=null;t.callback=noop;if(t.errorHandler){i(e,n)}s.call(t.context,e,r);t.release(t)}}function queueAsPromised(t,e,r){if(typeof t==="function"){r=e;e=t;t=null}function asyncWrapper(t,r){e.call(this,t).then((function(t){r(null,t)}),r)}var s=fastqueue(t,asyncWrapper,r);var i=s.push;var n=s.unshift;s.push=push;s.unshift=unshift;s.drained=drained;return s;function push(t){var e=new Promise((function(e,r){i(t,(function(t,s){if(t){r(t);return}e(s)}))}));e.catch(noop);return e}function unshift(t){var e=new Promise((function(e,r){n(t,(function(t,s){if(t){r(t);return}e(s)}))}));e.catch(noop);return e}function drained(){var t=new Promise((function(t){process.nextTick((function(){if(s.idle()){t()}else{var e=s.drain;s.drain=function(){if(typeof e==="function")e();t();s.drain=e}}}))}));return t}}t.exports=fastqueue;t.exports.promise=queueAsPromised},5462:t=>{"use strict";t.exports=JSON.parse('["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"]')}};var e={};function __nccwpck_require__(r){var s=e[r];if(s!==undefined){return s.exports}var i=e[r]={exports:{}};var n=true;try{t[r](i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete e[r]}return i.exports}(()=>{__nccwpck_require__.n=t=>{var e=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(e,{a:e});return e}})();(()=>{__nccwpck_require__.d=(t,e)=>{for(var r in e){if(__nccwpck_require__.o(e,r)&&!__nccwpck_require__.o(t,r)){Object.defineProperty(t,r,{enumerable:true,get:e[r]})}}}})();(()=>{__nccwpck_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(7019);module.exports=r})();
|