@visulima/vis 1.0.0-alpha.30 → 1.0.0-alpha.32
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/CHANGELOG.md +17 -0
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/bin.js +290 -290
- package/dist/packem_chunks/bloom-status.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/config.js +15 -15
- package/dist/packem_chunks/doctor-probe.js +1 -1
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler22.js +1 -1
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler32.js +1 -1
- package/dist/packem_chunks/handler35.js +1 -1
- package/dist/packem_chunks/handler36.js +1 -1
- package/dist/packem_chunks/handler37.js +1 -1
- package/dist/packem_chunks/handler38.js +1 -1
- package/dist/packem_chunks/handler39.js +1 -1
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler42.js +1 -1
- package/dist/packem_chunks/handler43.js +1 -1
- package/dist/packem_chunks/handler44.js +1 -1
- package/dist/packem_chunks/handler45.js +1 -1
- package/dist/packem_chunks/handler46.js +1 -1
- package/dist/packem_chunks/handler47.js +1 -1
- package/dist/packem_chunks/handler48.js +1 -1
- package/dist/packem_chunks/handler49.js +1 -1
- package/dist/packem_chunks/handler50.js +1 -1
- package/dist/packem_chunks/handler51.js +37 -37
- package/dist/packem_chunks/handler52.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/prune.js +1 -1
- package/dist/packem_chunks/status.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_shared/Table-3pFgIUZ2-DABgc6rj.js +12 -0
- package/dist/packem_shared/{advisories-BxXiKFbL.js → advisories-CGKZo9Rx.js} +1 -1
- package/dist/packem_shared/{cyclonedx-BpGVHqSW.js → cyclonedx-BilSFCNY.js} +1 -1
- package/dist/packem_shared/{docker-CTE3s4LW.js → docker-EJiTY0Sz.js} +1 -1
- package/dist/packem_shared/{index-D1xC1Y_R.js → index-BnANMQ7k.js} +1 -1
- package/dist/packem_shared/{index-hoWfZmNo.js → index-K8aQuMvx.js} +1 -1
- package/dist/packem_shared/{lifecycle-CXaqPGAQ.js → lifecycle-Buigdp7P.js} +2 -2
- package/dist/packem_shared/{osv-bloom-DSZcHLsM.js → osv-bloom-0Vu8YRhg.js} +1 -1
- package/dist/packem_shared/{provenance-DkCA8BrN.js → provenance-D8vU1u2L.js} +1 -1
- package/dist/packem_shared/{registry-keys-Mixm4eAY.js → registry-keys-E3cZn4FI.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-D5E72FfN.js → resolve-explicit-cPzwdiEE.js} +1 -1
- package/dist/packem_shared/{s1ngularity-Qxc6tRRI.js → s1ngularity-DBcjspCC.js} +1 -1
- package/dist/packem_shared/{scan-progress-DVtCtI2z.js → scan-progress-CTVVf9WW.js} +1 -1
- package/dist/packem_shared/{signatures-byuFrtAH.js → signatures-ChTfrQvT.js} +1 -1
- package/dist/packem_shared/{typosquats-BiDxQj7R.js → typosquats-acxQ7blw.js} +1 -1
- package/dist/packem_shared/{watch-loop-C31Ar7BX.js → watch-loop-BpA_pxU9.js} +1 -1
- package/index.d.ts +201 -201
- package/index.js +52 -52
- package/package.json +10 -10
- package/dist/packem_shared/Table-DoSoazT6-DwnyTUsA.js +0 -12
package/index.js
CHANGED
|
@@ -81,8 +81,8 @@ function requireNative() {
|
|
|
81
81
|
try {
|
|
82
82
|
const binding = require('@visulima/vis-binding-android-arm64')
|
|
83
83
|
const bindingPackageVersion = require('@visulima/vis-binding-android-arm64/package.json').version
|
|
84
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
85
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
84
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
85
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
86
86
|
}
|
|
87
87
|
return binding
|
|
88
88
|
} catch (e) {
|
|
@@ -97,8 +97,8 @@ function requireNative() {
|
|
|
97
97
|
try {
|
|
98
98
|
const binding = require('@visulima/vis-binding-android-arm-eabi')
|
|
99
99
|
const bindingPackageVersion = require('@visulima/vis-binding-android-arm-eabi/package.json').version
|
|
100
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
101
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
100
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
101
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
102
102
|
}
|
|
103
103
|
return binding
|
|
104
104
|
} catch (e) {
|
|
@@ -118,8 +118,8 @@ function requireNative() {
|
|
|
118
118
|
try {
|
|
119
119
|
const binding = require('@visulima/vis-binding-win32-x64-gnu')
|
|
120
120
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-gnu/package.json').version
|
|
121
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
122
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
121
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
122
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
123
123
|
}
|
|
124
124
|
return binding
|
|
125
125
|
} catch (e) {
|
|
@@ -134,8 +134,8 @@ function requireNative() {
|
|
|
134
134
|
try {
|
|
135
135
|
const binding = require('@visulima/vis-binding-win32-x64-msvc')
|
|
136
136
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-msvc/package.json').version
|
|
137
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
138
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
137
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
138
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
139
139
|
}
|
|
140
140
|
return binding
|
|
141
141
|
} catch (e) {
|
|
@@ -151,8 +151,8 @@ function requireNative() {
|
|
|
151
151
|
try {
|
|
152
152
|
const binding = require('@visulima/vis-binding-win32-ia32-msvc')
|
|
153
153
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-ia32-msvc/package.json').version
|
|
154
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
155
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
154
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
155
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
156
156
|
}
|
|
157
157
|
return binding
|
|
158
158
|
} catch (e) {
|
|
@@ -167,8 +167,8 @@ function requireNative() {
|
|
|
167
167
|
try {
|
|
168
168
|
const binding = require('@visulima/vis-binding-win32-arm64-msvc')
|
|
169
169
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-arm64-msvc/package.json').version
|
|
170
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
171
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
170
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
171
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
172
172
|
}
|
|
173
173
|
return binding
|
|
174
174
|
} catch (e) {
|
|
@@ -186,8 +186,8 @@ function requireNative() {
|
|
|
186
186
|
try {
|
|
187
187
|
const binding = require('@visulima/vis-binding-darwin-universal')
|
|
188
188
|
const bindingPackageVersion = require('@visulima/vis-binding-darwin-universal/package.json').version
|
|
189
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
190
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
189
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
190
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
191
191
|
}
|
|
192
192
|
return binding
|
|
193
193
|
} catch (e) {
|
|
@@ -202,8 +202,8 @@ function requireNative() {
|
|
|
202
202
|
try {
|
|
203
203
|
const binding = require('@visulima/vis-binding-darwin-x64')
|
|
204
204
|
const bindingPackageVersion = require('@visulima/vis-binding-darwin-x64/package.json').version
|
|
205
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
206
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
205
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
206
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
207
207
|
}
|
|
208
208
|
return binding
|
|
209
209
|
} catch (e) {
|
|
@@ -218,8 +218,8 @@ function requireNative() {
|
|
|
218
218
|
try {
|
|
219
219
|
const binding = require('@visulima/vis-binding-darwin-arm64')
|
|
220
220
|
const bindingPackageVersion = require('@visulima/vis-binding-darwin-arm64/package.json').version
|
|
221
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
222
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
221
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
222
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
223
223
|
}
|
|
224
224
|
return binding
|
|
225
225
|
} catch (e) {
|
|
@@ -238,8 +238,8 @@ function requireNative() {
|
|
|
238
238
|
try {
|
|
239
239
|
const binding = require('@visulima/vis-binding-freebsd-x64')
|
|
240
240
|
const bindingPackageVersion = require('@visulima/vis-binding-freebsd-x64/package.json').version
|
|
241
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
241
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
242
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
243
243
|
}
|
|
244
244
|
return binding
|
|
245
245
|
} catch (e) {
|
|
@@ -254,8 +254,8 @@ function requireNative() {
|
|
|
254
254
|
try {
|
|
255
255
|
const binding = require('@visulima/vis-binding-freebsd-arm64')
|
|
256
256
|
const bindingPackageVersion = require('@visulima/vis-binding-freebsd-arm64/package.json').version
|
|
257
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
258
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
257
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
258
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
259
259
|
}
|
|
260
260
|
return binding
|
|
261
261
|
} catch (e) {
|
|
@@ -275,8 +275,8 @@ function requireNative() {
|
|
|
275
275
|
try {
|
|
276
276
|
const binding = require('@visulima/vis-binding-linux-x64-musl')
|
|
277
277
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-musl/package.json').version
|
|
278
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
279
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
278
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
279
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
280
280
|
}
|
|
281
281
|
return binding
|
|
282
282
|
} catch (e) {
|
|
@@ -291,8 +291,8 @@ function requireNative() {
|
|
|
291
291
|
try {
|
|
292
292
|
const binding = require('@visulima/vis-binding-linux-x64-gnu')
|
|
293
293
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-gnu/package.json').version
|
|
294
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
295
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
294
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
295
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
296
296
|
}
|
|
297
297
|
return binding
|
|
298
298
|
} catch (e) {
|
|
@@ -309,8 +309,8 @@ function requireNative() {
|
|
|
309
309
|
try {
|
|
310
310
|
const binding = require('@visulima/vis-binding-linux-arm64-musl')
|
|
311
311
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-musl/package.json').version
|
|
312
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
313
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
312
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
313
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
314
314
|
}
|
|
315
315
|
return binding
|
|
316
316
|
} catch (e) {
|
|
@@ -325,8 +325,8 @@ function requireNative() {
|
|
|
325
325
|
try {
|
|
326
326
|
const binding = require('@visulima/vis-binding-linux-arm64-gnu')
|
|
327
327
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-gnu/package.json').version
|
|
328
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
328
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
329
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
330
330
|
}
|
|
331
331
|
return binding
|
|
332
332
|
} catch (e) {
|
|
@@ -343,8 +343,8 @@ function requireNative() {
|
|
|
343
343
|
try {
|
|
344
344
|
const binding = require('@visulima/vis-binding-linux-arm-musleabihf')
|
|
345
345
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-musleabihf/package.json').version
|
|
346
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
347
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
346
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
347
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
348
348
|
}
|
|
349
349
|
return binding
|
|
350
350
|
} catch (e) {
|
|
@@ -359,8 +359,8 @@ function requireNative() {
|
|
|
359
359
|
try {
|
|
360
360
|
const binding = require('@visulima/vis-binding-linux-arm-gnueabihf')
|
|
361
361
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-gnueabihf/package.json').version
|
|
362
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
363
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
362
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
363
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
364
364
|
}
|
|
365
365
|
return binding
|
|
366
366
|
} catch (e) {
|
|
@@ -377,8 +377,8 @@ function requireNative() {
|
|
|
377
377
|
try {
|
|
378
378
|
const binding = require('@visulima/vis-binding-linux-loong64-musl')
|
|
379
379
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-musl/package.json').version
|
|
380
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
381
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
380
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
381
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
382
382
|
}
|
|
383
383
|
return binding
|
|
384
384
|
} catch (e) {
|
|
@@ -393,8 +393,8 @@ function requireNative() {
|
|
|
393
393
|
try {
|
|
394
394
|
const binding = require('@visulima/vis-binding-linux-loong64-gnu')
|
|
395
395
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-gnu/package.json').version
|
|
396
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
397
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
396
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
397
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
398
398
|
}
|
|
399
399
|
return binding
|
|
400
400
|
} catch (e) {
|
|
@@ -411,8 +411,8 @@ function requireNative() {
|
|
|
411
411
|
try {
|
|
412
412
|
const binding = require('@visulima/vis-binding-linux-riscv64-musl')
|
|
413
413
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-musl/package.json').version
|
|
414
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
415
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
414
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
415
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
416
416
|
}
|
|
417
417
|
return binding
|
|
418
418
|
} catch (e) {
|
|
@@ -427,8 +427,8 @@ function requireNative() {
|
|
|
427
427
|
try {
|
|
428
428
|
const binding = require('@visulima/vis-binding-linux-riscv64-gnu')
|
|
429
429
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-gnu/package.json').version
|
|
430
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
431
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
430
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
431
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
432
432
|
}
|
|
433
433
|
return binding
|
|
434
434
|
} catch (e) {
|
|
@@ -444,8 +444,8 @@ function requireNative() {
|
|
|
444
444
|
try {
|
|
445
445
|
const binding = require('@visulima/vis-binding-linux-ppc64-gnu')
|
|
446
446
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-ppc64-gnu/package.json').version
|
|
447
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
448
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
447
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
448
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
449
449
|
}
|
|
450
450
|
return binding
|
|
451
451
|
} catch (e) {
|
|
@@ -460,8 +460,8 @@ function requireNative() {
|
|
|
460
460
|
try {
|
|
461
461
|
const binding = require('@visulima/vis-binding-linux-s390x-gnu')
|
|
462
462
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-s390x-gnu/package.json').version
|
|
463
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
464
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
463
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
464
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
465
465
|
}
|
|
466
466
|
return binding
|
|
467
467
|
} catch (e) {
|
|
@@ -480,8 +480,8 @@ function requireNative() {
|
|
|
480
480
|
try {
|
|
481
481
|
const binding = require('@visulima/vis-binding-openharmony-arm64')
|
|
482
482
|
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm64/package.json').version
|
|
483
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
484
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
483
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
484
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
485
485
|
}
|
|
486
486
|
return binding
|
|
487
487
|
} catch (e) {
|
|
@@ -496,8 +496,8 @@ function requireNative() {
|
|
|
496
496
|
try {
|
|
497
497
|
const binding = require('@visulima/vis-binding-openharmony-x64')
|
|
498
498
|
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-x64/package.json').version
|
|
499
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
500
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
499
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
500
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
501
501
|
}
|
|
502
502
|
return binding
|
|
503
503
|
} catch (e) {
|
|
@@ -512,8 +512,8 @@ function requireNative() {
|
|
|
512
512
|
try {
|
|
513
513
|
const binding = require('@visulima/vis-binding-openharmony-arm')
|
|
514
514
|
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm/package.json').version
|
|
515
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
516
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
515
|
+
if (bindingPackageVersion !== '1.0.0-alpha.31' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
516
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
517
517
|
}
|
|
518
518
|
return binding
|
|
519
519
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/vis",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.32",
|
|
4
4
|
"description": "A monorepo dev toolkit — task runner, remote caching, security scanning, git hooks, and AI agent integrations — powered by @visulima/task-runner",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@visulima/secret-scanner": "1.0.0-alpha.5",
|
|
82
82
|
"@visulima/tabular": "4.0.0-alpha.13",
|
|
83
|
-
"@visulima/task-runner": "1.0.0-alpha.
|
|
83
|
+
"@visulima/task-runner": "1.0.0-alpha.20",
|
|
84
84
|
"@visulima/tui": "1.0.0-alpha.23",
|
|
85
85
|
"jiti": "^2.7.0",
|
|
86
86
|
"module-replacements": "^2.11.0",
|
|
@@ -110,14 +110,14 @@
|
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
"optionalDependencies": {
|
|
113
|
-
"@visulima/vis-binding-darwin-arm64": "1.0.0-alpha.
|
|
114
|
-
"@visulima/vis-binding-
|
|
115
|
-
"@visulima/vis-binding-linux-
|
|
116
|
-
"@visulima/vis-binding-linux-arm64-musl": "1.0.0-alpha.
|
|
117
|
-
"@visulima/vis-binding-
|
|
118
|
-
"@visulima/vis-binding-
|
|
119
|
-
"@visulima/vis-binding-win32-
|
|
120
|
-
"@visulima/vis-binding-
|
|
113
|
+
"@visulima/vis-binding-darwin-arm64": "1.0.0-alpha.32",
|
|
114
|
+
"@visulima/vis-binding-linux-arm64-gnu": "1.0.0-alpha.32",
|
|
115
|
+
"@visulima/vis-binding-linux-x64-gnu": "1.0.0-alpha.32",
|
|
116
|
+
"@visulima/vis-binding-linux-arm64-musl": "1.0.0-alpha.32",
|
|
117
|
+
"@visulima/vis-binding-darwin-x64": "1.0.0-alpha.32",
|
|
118
|
+
"@visulima/vis-binding-win32-arm64-msvc": "1.0.0-alpha.32",
|
|
119
|
+
"@visulima/vis-binding-win32-x64-msvc": "1.0.0-alpha.32",
|
|
120
|
+
"@visulima/vis-binding-linux-x64-musl": "1.0.0-alpha.32"
|
|
121
121
|
},
|
|
122
122
|
"engines": {
|
|
123
123
|
"node": "^22.14.0 || >=24.10.0"
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var Xe=Object.defineProperty;var O=(t,e)=>Xe(t,"name",{value:e,configurable:!0});import{createRequire as Qe}from"node:module";const ti=Qe(import.meta.url),at=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ei=O(t=>{if(typeof at<"u"&&at.versions&&at.versions.node){const[e,i]=at.versions.node.split(".").map(Number);if(e>22||e===22&&i>=3||e===20&&i>=16)return at.getBuiltinModule(t)}return ti(t)},"__cjs_getBuiltinModule"),{createRequire:ii}=ei("node:module"),wt=0,G=1,ct=2,V=3;var ri=Object.defineProperty,oi=O((t,e)=>ri(t,"name",{value:e,configurable:!0}),"p$2"),ni=Object.defineProperty,si=oi((t,e)=>ni(t,"name",{value:e,configurable:!0}),"_"),hi=Object.defineProperty,jt=si((t,e)=>hi(t,"name",{value:e,configurable:!0}),"u");const ai=/^-{1,2}(no-color|no-colors|color=false|color=never)$/,ci=/^-{1,2}(color=256)$/,li=/^-{1,2}(color=16m|color=full|color=truecolor)$/,di=/^-{1,2}(color|colors|color=true|color=always)$/,ui=/-mono|dumb/i,fi=/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/,mi=/-256(color)?$/i,gi=/^screen|^tmux|^xterm|^vt[1-5]\d\d|^ansi|color|mintty|rxvt|cygwin|linux/i,je=jt(t=>{const e=globalThis,i=e.Deno!=null,r=e.process??e.Deno??{},a=r.argv??r.args??[],s=jt(g=>{const w=a.indexOf("--"),f=a.findIndex(v=>g.test(v));return f!==-1&&(w===-1||f<w)},"oneOfFlags");let o={};try{o=i?r.env.toObject():r.env??{}}catch{}const h="FORCE_COLOR",n=h in o,c=o[h]??void 0,d=Object.prototype.toString.call(c).slice(8,-1)==="String",l=typeof c=="number";let u;if(c==="true")u=G;else if(c==="false")u=wt;else if(d&&c.length===0)u=G;else if(d&&c.length>0){const g=Number.parseInt(c,10);u=Number.isNaN(g)?void 0:Math.min(g,3)}else l&&(u=Number.isNaN(c)?void 0:Math.min(c,3));if(c!=="true"&&c!=="false"&&u!==void 0&&u<4)return u;if("NO_COLOR"in o||n&&u===0||s(ai))return wt;if(s(ci))return ct;if(s(li))return V;if(s(di))return G;const p=u??wt;if("TF_BUILD"in o&&"AGENT_NAME"in o)return G;if(o.TERM&&ui.test(o.TERM))return p;if((i?e.Deno.build.os:r.platform)==="win32")try{const g=(i?e.Deno.osRelease():r.os.release()).split(".");return Number(g[0])>=10&&Number(g[2])>=10586?Number(g[2])>=14931?V:ct:G}catch{}if("CI"in o)return["GITEA_ACTIONS","CIRCLECI","GITHUB_WORKFLOW","GITHUB_ACTIONS"].some(g=>g in o)?V:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(g=>g in o)||o.CI_NAME==="codeship"?G:p;if(o.TERMINAL_EMULATOR?.includes("JediTerm"))return V;if("TEAMCITY_VERSION"in o)return fi.test(o.TEAMCITY_VERSION)?G:wt;if(o.COLORTERM==="truecolor"||o.TERM==="xterm-kitty"||o.TERM==="xterm-ghostty"||o.TERM==="wezterm")return V;if("TERM_PROGRAM"in o){const g=Number.parseInt((o.TERM_PROGRAM_VERSION??"").split(".")[0],10);if(o.TERM_PROGRAM==="iTerm.app")return g>=3?V:ct;if(o.TERM_PROGRAM==="Apple_Terminal")return ct}if(mi.test(o.TERM))return ct;let m;return i?m=t==="out"?e.Deno.stdout.isTerminal():e.Deno.stderr.isTerminal():"PM2_HOME"in o&&"pm_id"in o?m=!0:m=!!r[`std${t}`]?.isTTY,m&&gi.test(o.TERM)||"COLORTERM"in o?G:p},"isColorSupportedFactory"),pi=jt(()=>je("out"),"isStdoutColorSupported");jt(()=>je("err"),"isStderrColorSupported");var wi=Object.defineProperty,Ce=O((t,e)=>wi(t,"name",{value:e,configurable:!0}),"B$1"),bi=Object.defineProperty,q=Ce((t,e)=>bi(t,"name",{value:e,configurable:!0}),"u"),yi=Object.defineProperty,xi=q((t,e)=>yi(t,"name",{value:e,configurable:!0}),"e$1");function Ot({onlyFirst:t=!1}={}){const e="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(e,t?void 0:"g")}O(Ot,"x");Ce(Ot,"N");q(Ot,"t$1");xi(Ot,"ansiRegex");var vi=Object.defineProperty,Bi=q((t,e)=>vi(t,"name",{value:e,configurable:!0}),"n$1");const z=Bi((t,e,i)=>e>t?e:Math.min(t,i),"clamp");var Ri=Object.defineProperty,Wi=q((t,e)=>Ri(t,"name",{value:e,configurable:!0}),"a$1");const Si=/^#?([a-f\d]{3}|[a-f\d]{6})$/i,Ii=Wi(t=>{let[,e]=Si.exec(t)??[];const i=e?e.length:0;if(i===3){const a=e.charAt(0),s=e.charAt(1),o=e.charAt(2);e=a+a+s+s+o+o}else if(i!==6)return[0,0,0];const r=Number.parseInt(e,16);return[r>>16&255,r>>8&255,r&255]},"convertHexToRgb");var Mi=Object.defineProperty,te=q((t,e)=>Mi(t,"name",{value:e,configurable:!0}),"e");const $e=te((t,e,i)=>t===e&&e===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/51)+6*Math.round(e/51)+Math.round(i/51),"rgbToAnsi256"),zt=te(t=>{let e,i,r;if(t<8)return 30+t;if(t<16)return 90+(t-8);if(t>=232)e=i=r=((t-232)*10+8)/255;else{t-=16;const o=t%36;e=Math.floor(t/36)/5,i=Math.floor(o/6)/5,r=o%6/5}const a=Math.max(e,i,r)*2;if(a===0)return 30;const s=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(e));return a===2?s+60:s},"ansi256To16"),he=te((t,e,i)=>zt($e(t,e,i)),"rgbToAnsi16");var Ai=Object.defineProperty,N=q((t,e)=>Ai(t,"name",{value:e,configurable:!0}),"b");const j=39,C=49,ae=10,Dt=pi(),Ee={close:"",open:""},y=Dt>0?(t,e)=>({close:`\x1B[${String(e)}m`,open:`\x1B[${String(t)}m`}):()=>Ee,ce=N(t=>(e,i,r)=>t($e(Number(e),Number(i),Number(r))),"createRgbFunction"),le=N(t=>e=>{const[i,r,a]=Ii(e);return t(i,r,a)},"createHexFunction");let Yt=N(t=>y(`38;5;${String(t)}`,j),"createAnsi256"),qt=N(t=>y(`48;5;${String(t)}`,C),"createBgAnsi256"),Ct=N((t,e,i)=>y(`38;2;${String(t)};${String(e)};${String(i)}`,j),"createRgb"),$t=N((t,e,i)=>y(`48;2;${String(t)};${String(e)};${String(i)}`,C),"createBgRgb");Dt===1?(Yt=N(t=>y(zt(Number(t)),j),"createAnsi256"),qt=N(t=>y(zt(Number(t))+ae,C),"createBgAnsi256"),Ct=N((t,e,i)=>y(he(Number(t),Number(e),Number(i)),j),"createRgb"),$t=N((t,e,i)=>y(he(Number(t),Number(e),Number(i))+ae,C),"createBgRgb")):Dt===2&&(Ct=ce(Yt),$t=ce(qt));const de={bold:y(1,22),dim:y(2,22),hidden:y(8,28),inverse:y(7,27),italic:y(3,23),overline:y(53,55),reset:y(0,0),strike:y(9,29),strikethrough:y(9,29),underline:y(4,24),visible:Ee},ue={bgBlack:y(40,C),bgBlackBright:y(100,C),bgBlue:y(44,C),bgBlueBright:y(104,C),bgCyan:y(46,C),bgCyanBright:y(106,C),bgGray:y(100,C),bgGreen:y(42,C),bgGreenBright:y(102,C),bgGrey:y(100,C),bgMagenta:y(45,C),bgMagentaBright:y(105,C),bgRed:y(41,C),bgRedBright:y(101,C),bgWhite:y(47,C),bgWhiteBright:y(107,C),bgYellow:y(43,C),bgYellowBright:y(103,C),black:y(30,j),blackBright:y(90,j),blue:y(34,j),blueBright:y(94,j),cyan:y(36,j),cyanBright:y(96,j),gray:y(90,j),green:y(32,j),greenBright:y(92,j),grey:y(90,j),magenta:y(35,j),magentaBright:y(95,j),red:y(31,j),redBright:y(91,j),white:y(37,j),whiteBright:y(97,j),yellow:y(33,j),yellowBright:y(93,j)},fe={bg:N(t=>qt(z(t,0,255)),"bg"),bgHex:le($t),bgRgb:N((t,e,i)=>$t(z(t,0,255),z(e,0,255),z(i,0,255)),"bgRgb"),fg:N(t=>Yt(z(t,0,255)),"fg"),hex:le(Ct),rgb:N((t,e,i)=>Ct(z(t,0,255),z(e,0,255),z(i,0,255)),"rgb")};var ji=Object.defineProperty,Ci=q((t,e)=>ji(t,"name",{value:e,configurable:!0}),"s");const $i=Ci((t,e,i)=>{if(e==="")return t;let r=t.indexOf(e);if(r<0)return t;const a=e.length;let s=0,o="";for(;~r;)o+=t.slice(s,r)+i,s=r+a,r=t.indexOf(e,s);return o+t.slice(s)},"stringReplaceAll");var Ei=Object.defineProperty,ut=q((t,e)=>Ei(t,"name",{value:e,configurable:!0}),"a");const Y={};let Ut=null;const Oi=ut((t,e,i)=>{if(!t)return"";let r;if(t.raw===void 0?r=String(t):r=String.raw(t,...e),r.includes("\x1B"))for(let a=i;a;a=a.props)r=$i(r,a.close,a.open);return r.includes(`
|
|
2
|
-
`)&&(r=r.replace(/(\r*\n)/g,`${i.closeStack}$1${i.openStack}`)),i.openStack+r+i.closeStack},"wrapText"),Kt=ut(({props:t},{close:e,open:i})=>{const r=(t?.openStack??"")+i,a=e+(t?.closeStack??""),s=ut((o,...h)=>Oi(o,h,s.props),"style");return Object.setPrototypeOf(s,Ut),s.props={close:e,closeStack:a,open:i,openStack:r,props:t},s.open=r,s.close=a,s},"createStyle"),Ni=ut(function(){const t=ut(e=>String(e),"self");t.strip=e=>e.replaceAll(Ot(),"");for(const e in ue)Y[e]={get(){const i=Kt(this,ue[e]);return Object.defineProperty(this,e,{value:i}),i}};for(const e in de)Y[e]={get(){const i=Kt(this,de[e]);return Object.defineProperty(this,e,{value:i}),i}};return Ut=Object.defineProperties({},Y),Object.setPrototypeOf(t,Ut),t},"Colorize");for(const t in fe)Y[t]={get(){return(...e)=>Kt(this,fe[t](...e))}};Y.ansi256=Y.fg;Y.bgAnsi256=Y.bg;const U=new Ni,mo=U.bold,go=U.cyan,po=U.dim,wo=U.green,bo=U.inverse,yo=U.magenta,xo=U.red,vo=U.yellow;var Ti=Object.defineProperty,J=O((t,e)=>Ti(t,"name",{value:e,configurable:!0}),"F"),ki=Object.defineProperty,S=J((t,e)=>ki(t,"name",{value:e,configurable:!0}),"W");const Li=ii(import.meta.url),ot=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ee=S(t=>{if(typeof ot<"u"&&ot.versions&&ot.versions.node){const[e,i]=ot.versions.node.split(".").map(Number);if(e>22||e===22&&i>=3||e===20&&i>=16)return ot.getBuiltinModule(t)}return Li(t)},"__cjs_getBuiltinModule"),Q=ot,{execFileSync:Fi}=ee("node:child_process"),dt=ee("node:fs"),Pi=ee("node:tty");var _i=Object.defineProperty,K=S((t,e)=>_i(t,"name",{value:e,configurable:!0}),"e$4");const Ji=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],Hi=12288,Gi=65510,Vi=[12288,12288,65281,65376,65504,65510],zi=8361,Di=65518,Yi=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],qi=32,Ui=10630,Ki=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],Zi=4352,Xi=262141,Oe=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],mt=K((t,e)=>{let i=0,r=Math.floor(t.length/2)-1;for(;i<=r;){const a=Math.floor((i+r)/2),s=a*2;if(e<t[s])r=a-1;else if(e>t[s+1])i=a+1;else return!0}return!1},"s"),me=19968,[Qi,tr]=Nt(Oe);function Nt(t){let e=t[0],i=t[1];for(let r=0;r<t.length;r+=2){const a=t[r],s=t[r+1];if(me>=a&&me<=s)return[a,s];s-a>i-e&&(e=a,i=s)}return[e,i]}O(Nt,"Et");J(Nt,"zt");S(Nt,"W$3");K(Nt,"W");const Ne=K(t=>t<161||t>1114109?!1:mt(Ji,t),"j"),Te=K(t=>t<Hi||t>Gi?!1:mt(Vi,t),"k"),er=K(t=>t<zi||t>Di?!1:mt(Yi,t),"p"),ir=K(t=>t<qi||t>Ui?!1:mt(Ki,t),"y"),ke=K(t=>t>=Qi&&t<=tr?!0:t<Zi||t>Xi?!1:mt(Oe,t),"A");function Tt(t){return Ne(t)?"ambiguous":Te(t)?"fullwidth":er(t)?"halfwidth":ir(t)?"narrow":ke(t)?"wide":"neutral"}O(Tt,"Ct");J(Tt,"Kt");S(Tt,"z$1");K(Tt,"E");var rr=Object.defineProperty,ie=S((t,e)=>rr(t,"name",{value:e,configurable:!0}),"i$3");function gt(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}O(gt,"ft");J(gt,"$t");S(gt,"r$3");ie(gt,"t");function pt(t){return gt(t),Tt(t)}O(pt,"mt");J(pt,"It");S(pt,"d$4");ie(pt,"u");function re(t,{ambiguousAsWide:e=!1}={}){return gt(t),Te(t)||ke(t)||e&&Ne(t)?2:1}O(re,"Zt");J(re,"Ne");S(re,"f$3");ie(re,"d");var or=Object.defineProperty,Le=S((t,e)=>or(t,"name",{value:e,configurable:!0}),"a$3");const Fe=String.raw,ge=Fe`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,nr=Le(()=>new RegExp(Fe`\p{RI}{2}|(?)${ge}(?:\u200D${ge})*`,"gu"),"a"),st=new Set(["\x1B",""]),kt="\x07",Pe="[",oe="m",ft="]8;;",sr=39,hr=/[\u200B\uFEFF\u2060-\u2064]/g,ar=new RegExp(`(?:\\${Pe}(?<code>\\d+)m|\\${ft}(?<uri>.*)${kt})`),cr=Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]])),X=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,pe=/\u001B\[(\d+(?:;\d+)*)?m[^\u001B]*(?:\u001B\[(?:\d+(?:;\d+)*)?m|$)/g,we=/\u001B\]8;[^\u0007\u001B]*(?:\u0007|\u001B\\)(.*?)\u001B\]8;;(?:\u0007|\u001B\\)/g,bt=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,It=nr();Le(t=>t.replace(It,""),"X");var lr=Object.defineProperty,Lt=S((t,e)=>lr(t,"name",{value:e,configurable:!0}),"m$2");const be=new Map,yt=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,Mt=Lt(t=>t>=32&&t<=126?"latin":t===8203||t===8204||t===8205||t===8288?"zero":t<=31||t>=127&&t<=159?"control":t>=160&&t<=255||t>=9472&&t<=9599?"latin":t>=4352&&t<=4607||t>=11904&&t<=40959||t>=44032&&t<=55215||t>=63744&&t<=64255||t>=65280&&t<=65519&&!(t>=65377&&t<=65439)||t>=12352&&t<=12543?"wide":t===8230?"latin":"other","I"),dr=Lt((t,e)=>{const i=Math.floor(t/65536),r=t%65536;let a=be.get(i);if(a||(a=new Map,be.set(i,a)),a.has(r))return a.get(r);let s;if(Mt(t)==="latin")s=e.width.regular;else if(Mt(t)==="control")s=e.width.control;else if(Mt(t)==="wide")s=e.width.wide;else switch(pt(t)){case"ambiguous":{s=e.width.ambiguousIsNarrow?e.width.regular:e.width.wide;break}case"fullwidth":{s=e.width.fullWidth;break}case"wide":{s=e.width.wide;break}default:s=e.width.regular}return a.set(r,s),s},"_"),ur=Lt(t=>t>=768&&t<=879||t>=6832&&t<=6911||t>=7616&&t<=7679||t>=8400&&t<=8447||t>=65056&&t<=65071||t>=917760&&t<=917999||t>=65024&&t<=65039||t>=3633&&t<=3642||t>=3655&&t<=3662||t>=3761&&t<=3769||t>=3771&&t<=3772||t>=3784&&t<=3789||t>=2304&&t<=2307||t>=2362&&t<=2383||t>=2385&&t<=2391||t>=2402&&t<=2403||t>=2433&&t<=2435||t>=2492&&t<=2500||t>=2509&&t<=2509||t>=2561&&t<=2563||t>=2620&&t<=2637||t>=1611&&t<=1631||t>=1648&&t<=1648||t>=1750&&t<=1773||t>=2276&&t<=2302||t>=1425&&t<=1469||t>=1471&&t<=1471||t>=1473&&t<=1474||t>=1476&&t<=1477||t>=1479&&t<=1479||t>=3893&&t<=3893||t>=3895&&t<=3895||t>=3897&&t<=3897||t>=3953&&t<=3966||t>=3968&&t<=3972||t>=3974&&t<=3975?!0:t>=768&&t<=777||t>=803&&t<=803,"B"),nt=Lt((t,e={})=>{if(!t||t.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const i={truncation:{countAnsiEscapeCodes:e.countAnsiEscapeCodes??!1,ellipsis:e.ellipsis??"",ellipsisWidth:e.ellipsisWidth??(e.ellipsis?nt(e.ellipsis,{...e,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:e.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:e.ambiguousIsNarrow??!1,ansi:e.ansiWidth??0,control:e.controlWidth??0,emoji:e.emojiWidth??2,fullWidth:e.fullWidth??2,halfWidth:e.halfWidth??1,regular:e.regularWidth??1,tab:e.tabWidth??8,wide:e.wideWidth??2}},r=Math.max(0,i.truncation.limit-i.truncation.ellipsisWidth),{length:a}=t,s=a>1e4;let o=0,h=0,n=a,c=!1;const d=t.includes("\x1B")||t.includes("");for(;o<a;){if(d&&(t[o]==="\x1B"||t[o]==="")){if(t.startsWith("\x1B]8;;",o)){const w="\x1B]8;;\x07",f=w.length,v=t.indexOf("\x07",o+5);if(v!==-1){const b=t.indexOf(w,v+1);if(b!==-1){const x=b+f,B=t.slice(v+1,b).replace(X,""),R=nt(B,{ambiguousIsNarrow:i.width.ambiguousIsNarrow,ansiWidth:i.width.ansi,controlWidth:i.width.control,countAnsiEscapeCodes:!1,ellipsis:i.truncation.ellipsis,ellipsisWidth:i.truncation.ellipsisWidth,emojiWidth:i.width.emoji,fullWidth:i.width.fullWidth,halfWidth:i.width.halfWidth,limit:Math.max(0,r-h),regularWidth:i.width.regular,tabWidth:i.width.tab,wideWidth:i.width.wide}),I=R.width;if(R.truncated)c=!0,n=Math.min(n,o);else if(h+I>r&&(n=Math.min(n,o),c=!0,h+I>i.truncation.limit))break;if(h+=I,o=x,c&&h>=i.truncation.limit)break;continue}}}if(X.lastIndex=o,X.test(t)){const w=X.lastIndex-o,f=i.truncation.countAnsiEscapeCodes?w:i.width.ansi;if(h+f>r&&(n=Math.min(n,o),h+f>i.truncation.limit)){c=!0;break}h+=f,o=X.lastIndex;continue}}const p=t.codePointAt(o);if(p===8203||p===65279||p>=8288&&p<=8292){o+=1;continue}if(p===9){if(h+i.width.tab>r&&(n=Math.min(n,o),h+i.width.tab>i.truncation.limit)){c=!0;break}h+=i.width.tab,o+=1;continue}if(yt.lastIndex=o,yt.test(t)){const w=(yt.lastIndex-o)*i.width.regular;if(h+w>r){const f=Math.floor((r-h)/i.width.regular);if(n=Math.min(n,o+f),h+w>i.truncation.limit){c=!0;break}}h+=w,o=yt.lastIndex;continue}if((p<=31||p>=127&&p<=159)&&(bt.lastIndex=o,bt.test(t))){const w=(bt.lastIndex-o)*i.width.control;if(h+w>r&&(n=Math.min(n,o+Math.floor((r-h)/i.width.control)),h+w>i.truncation.limit)){c=!0;break}h+=w,o=bt.lastIndex;continue}if(It.lastIndex=o,It.test(t)){if(h+i.width.emoji>r&&(n=Math.min(n,o),h+i.width.emoji>i.truncation.limit)){c=!0;break}h+=i.width.emoji,o=It.lastIndex;continue}const m=t.codePointAt(o)??0;if(ur(m)){o+=m>65535?2:1;continue}let g;if(s)g=dr(m,i);else switch(Mt(m)){case"control":{g=i.width.control;break}case"latin":{g=i.width.regular;break}case"wide":{g=i.width.wide;break}case"zero":{g=0;break}default:switch(pt(m)){case"ambiguous":{g=i.width.ambiguousIsNarrow?i.width.regular:i.width.wide;break}case"fullwidth":{g=i.width.fullWidth;break}case"wide":{g=i.width.wide;break}default:g=i.width.regular}}if(h+g>r&&(n=Math.min(n,o),h+g>i.truncation.limit)){c=!0;break}h+=g,o+=m>65535?2:1}let l=h,u=!1;return c&&i.truncation.limit>=i.truncation.ellipsisWidth&&(l=i.truncation.limit,u=!0),{ellipsed:u,index:c?n:a,truncated:c,width:l}},"O");var fr=Object.defineProperty,mr=S((t,e)=>fr(t,"name",{value:e,configurable:!0}),"e$1");const $=mr((t,e={})=>nt(t,{...e,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width,"d");var gr=Object.defineProperty,pr=S((t,e)=>gr(t,"name",{value:e,configurable:!0}),"s");let wr=class{static{O(this,"Ke")}static{J(this,"Ye")}static{S(this,"i")}static{pr(this,"s")}capacity;cache;constructor(t){this.capacity=t,this.cache=new Map}get(t){if(!this.cache.has(t))return;const e=this.cache.get(t);return this.cache.delete(t),this.cache.set(t,e),e}has(t){return this.cache.has(t)}set(t,e){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.capacity){const i=this.cache.keys().next().value;i!==void 0&&this.cache.delete(i)}this.cache.set(t,e)}delete(t){this.cache.delete(t)}clear(){this.cache.clear()}size(){return this.cache.size}};var br=Object.defineProperty,ht=S((t,e)=>br(t,"name",{value:e,configurable:!0}),"b$3");const ye=new wr(100),yr=new Intl.Segmenter("en",{granularity:"grapheme"}),xr=/^[\u0000-\u007F]*$/,vr=new Set(["0","22","23","24","27","28","29","39","49"]),Br=new Set(["1","3","4","7","8","9"]),xe=new Map([["22","1"],["23","3"],["24","4"],["27","7"],["28","8"],["29","9"]]),xt=ht(t=>t>="30"&&t<="37"||t>="90"&&t<="97"||t.startsWith("38;"),"b"),vt=ht(t=>t>="40"&&t<="47"||t>="100"&&t<="107"||t.startsWith("48;"),"S"),Rr=[{close:"\x1B[22m",open:"\x1B[1m"},{close:"\x1B[23m",open:"\x1B[3m"},{close:"\x1B[24m",open:"\x1B[4m"},{close:"\x1B[27m",open:"\x1B[7m"},{close:"\x1B[28m",open:"\x1B[8m"},{close:"\x1B[29m",open:"\x1B[9m"}],ve=ht((t,e)=>{let i=-1;for(const r of e){const a=t.indexOf(r);a!==-1&&(i===-1||a<i)&&(i=a)}return i},"R"),Wr=ht((t,e)=>{if(!t.includes("\x1B"))return[{after:"",before:"",content:t,visibleLength:$(t,e.width)}];const i=ye.get(t);if(i)return i;const r=[],a=[];let s=0,o;for(X.lastIndex=0;(o=X.exec(t))!==null;){const d=o[0];r.push(t.slice(s,o.index)),a.push(d),s=o.index+d.length}s<t.length&&r.push(t.slice(s));const h=[];for(const d of a){if(d==="\x1B[0m"||d==="\x1B]8;;\x07"){h.push(d);continue}if(d.startsWith("\x1B[")&&d.endsWith("m")){const l=d.slice(2,-1);if(vr.has(l)){h.push(d);continue}}}const n=new Set,c=[];for(const[d,l]of r.entries()){if(d>0&&a[d-1]){const m=a[d-1];if(m==="\x1B[0m")n.clear();else if(m==="\x1B]8;;\x07"){for(const g of n)if(g.startsWith("\x1B]8;;")&&!g.endsWith("\x1B]8;;\x07")){n.delete(g);break}}else if(m.startsWith("\x1B[")&&m.endsWith("m")){const g=m.slice(2,-1);if(g==="39"){for(const w of n)if(w.startsWith("\x1B[")&&w.endsWith("m")){const f=w.slice(2,-1);if(xt(f)){n.delete(w);break}}}else if(g==="49"){for(const w of n)if(w.startsWith("\x1B[")&&w.endsWith("m")){const f=w.slice(2,-1);if(vt(f)){n.delete(w);break}}}else if(xe.has(g)){const w=xe.get(g);for(const f of n)if(f===`\x1B[${w}m`){n.delete(f);break}}else{if(xt(g)){for(const w of n)if(w.startsWith("\x1B[")&&w.endsWith("m")){const f=w.slice(2,-1);if(xt(f)){n.delete(w);break}}}else if(vt(g)){for(const w of n)if(w.startsWith("\x1B[")&&w.endsWith("m")){const f=w.slice(2,-1);if(vt(f)){n.delete(w);break}}}else if(Br.has(g)){const w=`\x1B[${g}m`;n.has(w)&&n.delete(w)}n.add(m)}}else if(m.startsWith("\x1B]8;;")&&!m.endsWith("\x1B]8;;\x07")){for(const g of n)if(g.startsWith("\x1B]8;;")&&!g.endsWith("\x1B]8;;\x07")){n.delete(g);break}n.add(m)}}if(l==="")continue;let u="";if(n.size>0)if(h.includes("\x1B[0m"))u="\x1B[0m";else{const m=[];let g=!1;for(const b of n)if(b.startsWith("\x1B]8;;")&&!b.endsWith("\x1B]8;;\x07")){g=!0;break}g&&h.includes("\x1B]8;;\x07")&&m.push("\x1B]8;;\x07");let w=!1,f=!1;for(const b of n)if(b.startsWith("\x1B[")&&b.endsWith("m")){const x=b.slice(2,-1);xt(x)?w=!0:vt(x)&&(f=!0)}if(w&&f){const b=ve(t,["\x1B[3","\x1B[9","\x1B[38;"]),x=ve(t,["\x1B[4","\x1B[10","\x1B[48;"]);b>=0&&x>=0?b>x?m.push("\x1B[39m","\x1B[49m"):m.push("\x1B[49m","\x1B[39m"):m.push("\x1B[39m","\x1B[49m")}else w&&m.push("\x1B[39m"),f&&m.push("\x1B[49m");w&&f&&t.includes("\x1B[39m")&&t.includes("\x1B[49m")&&(t.indexOf("\x1B[39m")<t.indexOf("\x1B[49m")?(m.length-=2,m.push("\x1B[39m","\x1B[49m")):t.indexOf("\x1B[49m")<t.indexOf("\x1B[39m")&&(m.length-=2,m.push("\x1B[49m","\x1B[39m")));const v=Rr.filter(b=>n.has(b.open)).map(b=>({position:t.indexOf(b.open),style:b})).filter(b=>b.position>=0).toSorted((b,x)=>x.position-b.position);for(const b of v){const x=b;h.includes(x.style.close)&&m.push(x.style.close)}u=m.join("")}const p=[...n].join("");c.push({after:u,before:p,content:l,visibleLength:$(l,{fullWidth:1,wideWidth:1})})}return ye.set(t,c),c},"F"),Sr=ht((t,e,i,r)=>{const a=[...r.segmenter.segment(t)],s=[];let o=0,h=!1;for(const n of a){const c=$(n.segment,r.width),d=o,l=o+c;if(!h)if(d<e){o=l;continue}else h=!0;if(d>=i||l>i)break;s.push(n.segment),o=l}return s.join("")},"P"),D=ht((t,e=0,i=Number.MAX_SAFE_INTEGER,r={})=>{const a={segmenter:yr,...r};if(e>=i||t==="")return"";const s=$(t,a.width);if(e===0&&i>=s)return t;if(e<0||i<0)throw new RangeError("Negative indices aren't supported");if(!t.includes("\x1B"))return xr.test(t)?t.slice(e,i):Sr(t,e,i,a);if(pe.lastIndex=0,we.lastIndex=0,!pe.test(t)&&!we.test(t))return t;const o=Wr(t,a);if(o.length===0)return"";let h=0;const n=[];for(const[l,u]of o.entries()){const p=h,m=h+u.visibleLength;if(m>e&&p<i){const g=Math.max(0,e-p),w=Math.min(u.visibleLength,i-p);n.push({end:w,index:l,segment:u,start:g})}h=m}if(n.length===0)return"";const c=[],d=n[0].segment;c.push(d.before);for(let l=0;l<n.length;l++){const{end:u,segment:p,start:m}=n[l];if(m===0&&u===p.visibleLength)c.push(p.content);else{const g=[...a.segmenter.segment(p.content)];c.push(g.slice(m,u).map(w=>w.segment).join(""))}if(l<n.length-1){const g=n[l+1].segment,w=p.after,f=g.before;w!==f&&(w||f)&&c.push(w,f)}}return c.push(n.at(-1).segment.after),c.join("")},"T");var Ir=Object.defineProperty,Ft=S((t,e)=>Ir(t,"name",{value:e,configurable:!0}),"m$1");const Be="…",Mr=3,Bt=Ft((t,e,i=!1)=>{if(t.charAt(e)===" ")return e;const r=i?1:-1,a=Math.min(Mr,i?t.length-e:e);for(let s=1;s<=a;s++){const o=e+s*r;if(t.charAt(o)===" ")return o}return e},"u"),Rt=Ft((t,e,i)=>nt(t,{...i,ellipsis:"",ellipsisWidth:0,limit:e}).index,"f"),Wt=Ft((t,e,i)=>$(t.slice(0,e),i),"m"),Re=Ft((t,e,i={})=>{if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof t}`);if(typeof e!="number")throw new TypeError(`Expected \`limit\` to be a number, got ${typeof e}`);if(t===""||e<=0)return"";const r=t.normalize("NFC"),{ellipsis:a=Be,position:s="end",preferTruncationOnSpace:o=!1}=i;let h=i.ellipsisWidth??(a===Be?1:void 0);h??=nt(a,{...i.width,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width;const{width:n}=nt(r,{...i.width,ellipsis:a,ellipsisWidth:h});if(n<=e)return r;switch(s){case"end":{if(o){const c=e-h,d=Rt(r,c,i.width),l=Bt(r,d),u=Wt(r,l,i.width);return D(r,0,u,{width:i.width})+a}return D(r,0,e-h,{width:i.width})+a}case"middle":{const c=Math.floor(e/2),d=Math.max(0,e-h),l=Math.min(c,d),u=Math.max(0,d-l);if(o){const p=Rt(r,l,i.width),m=Bt(r,p),g=Wt(r,m,i.width),w=n-u,f=Rt(r,w,i.width),v=Bt(r,f,!0),b=Wt(r,v,i.width);return D(r,0,g,{width:i.width})+a+D(r,b,n,{width:i.width}).trim()}return D(r,0,l,{width:i.width})+a+D(r,n-u,n,{width:i.width})}case"start":{if(o){const c=n-e+h,d=Rt(r,c,i.width),l=Bt(r,d,!0),u=Wt(r,l,i.width);return a+D(r,u,n,{width:i.width}).trim()}return a+D(r,n-e+h,n,{width:i.width})}default:throw new Error(`Invalid position: expected 'start', 'middle' or 'end', got '${s}'`)}},"v");var Ar=Object.defineProperty,T=S((t,e)=>Ar(t,"name",{value:e,configurable:!0}),"p$2");const jr=/\x1B\[(\d+)m/;class _e{static{O(this,"ie")}static{J(this,"Qt")}static{S(this,"w")}static{T(this,"I")}activeForeground=void 0;activeBackground=void 0;activeFormatting=[];processEscape(e){const i=jr.exec(e);if(!i)return;const r=Number.parseInt(i[1],10);switch(r){case 0:{this.activeForeground=void 0,this.activeBackground=void 0,this.activeFormatting=[];break}case 39:{this.activeForeground=void 0;break}case 49:{this.activeBackground=void 0;break}default:if(r>=30&&r<=37||r>=90&&r<=97)this.activeForeground=e;else if(r>=40&&r<=47||r>=100&&r<=107)this.activeBackground=e;else if([1,2,3,4,7,8,9].includes(r))this.activeFormatting.push(e);else if([22,23,24,27,28,29].includes(r)){const a={22:"[1m",23:"[3m",24:"[4m",27:"[7m",28:"[8m",29:"[9m"}[r];a&&(this.activeFormatting=this.activeFormatting.filter(s=>!s.includes(a)))}}}getStartEscapesForAllActiveAttributes(){return[this.activeBackground,this.activeForeground,...this.activeFormatting].filter(Boolean).join("")}getEndEscapesForAllActiveAttributes(){const e=[];if(this.activeFormatting.length>0){const i={"\x1B[1m":"\x1B[22m","\x1B[2m":"\x1B[22m","\x1B[3m":"\x1B[23m","\x1B[4m":"\x1B[24m","\x1B[7m":"\x1B[27m","\x1B[8m":"\x1B[28m","\x1B[9m":"\x1B[29m"};[...this.activeFormatting].toReversed().forEach(r=>{const a=i[r];a&&e.push(a)})}return this.activeForeground&&e.push("\x1B[39m"),this.activeBackground&&e.push("\x1B[49m"),e.join("")}}const Cr=T((t,e)=>{if(!st.has(t[e]))return{isInsideEscape:!1,isInsideLinkEscape:!1};const i=!0,r=t.slice(e+1,e+1+ft.length).join("")===ft;return{isInsideEscape:i,isInsideLinkEscape:r}},"O"),$r=T((t,e={})=>{const i=new _e;let r="",a=!1,s="",o="",h=!1;const n=[...t];for(let c=0;c<n.length;c++){const d=n[c];if(d&&st.has(d)){if(r){const g=e.getWidth?.(r)??0,w={isEscapeSequence:!1,isGrapheme:!0,text:r,width:g};if(h&&(w.isHyperlink=!0,w.hyperlinkUrl=o),e.onSegment?.(w,i)===!1)return;r=""}a=!0,s=d;const p=Cr(n,c),{isInsideLinkEscape:m}=p;if(m){let g=c+1;for(o="";g<n.length;){const f=n[g];if(f===kt)break;o+=f,g+=1}o=o.slice(4);const w={hyperlinkUrl:o,isEscapeSequence:!0,isGrapheme:!1,isHyperlink:!0,isHyperlinkStart:!0,width:0};if(e.onSegment?.(w,i)===!1)return;c=g,h=!0,a=!1,s="";continue}if(c+1<n.length&&n[c+1]==="\\"&&h){const g={isEscapeSequence:!0,isGrapheme:!1,isHyperlink:!0,isHyperlinkEnd:!0,width:0};if(e.onSegment?.(g,i)===!1)return;h=!1,o="",c+=1,a=!1,s="";continue}}if(a){if(s!==d&&(s+=d),d===oe){a=!1,i.processEscape(s);const p={isEscapeSequence:!0,isGrapheme:!1,text:s,width:0};if(e.onSegment?.(p,i)===!1)return;s=""}continue}r+=d;const l=e.getWidth?.(r)??0,u={isEscapeSequence:!1,isGrapheme:!0,text:r,width:l};if(h&&(u.isHyperlink=!0,u.hyperlinkUrl=o),e.onSegment?.(u,i)===!1)return;r=""}if(r){const c=e.getWidth?.(r)??0,d={isEscapeSequence:!1,isGrapheme:!0,text:r,width:c};h&&(d.isHyperlink=!0,d.hyperlinkUrl=o),e.onSegment?.(d,i)}if(s){const c={isEscapeSequence:!0,isGrapheme:!1,text:s,width:0};e.onSegment?.(c,i)}},"P"),We=T(t=>`${st.values().next().value}${Pe}${String(t)}${oe}`,"k"),Se=T(t=>`${st.values().next().value}${ft}${t}${kt}`,"F"),Er=T(t=>{if(t.length===0)return"";if(t.length===1)return t[0];let e="",i,r;const a=t.join(`
|
|
3
|
-
`),s=[...a];let o=0;for(const[h,n]of s.entries()){if(e+=n,st.has(n)){const d=ar.exec(a.slice(o))?.groups??{};if(d.code!==void 0){const l=Number.parseFloat(d.code);i=l===sr?void 0:l}else d.uri!==void 0&&(r=d.uri.length===0?void 0:d.uri)}const c=cr.get(Number(i));s[h+1]===`
|
|
4
|
-
`?(r&&(e+=Se("")),i&&c&&(e+=We(c))):n===`
|
|
5
|
-
`&&(i&&c&&(e+=We(i)),r&&(e+=Se(r))),o+=n.length}return e},"q"),Je=/(?=\s)|(?<=\s)/,He=/^\s+$/,Gt=T(t=>{if(!t.includes("\x1B"))return t;let e=t;return t.includes("\x1B[30m")&&(e+="\x1B[39m"),t.includes("\x1B[42m")&&(e+="\x1B[49m"),e},"B"),tt=T(t=>{const e=t.split(" ");let i=e.length;for(;i>0&&$(e[i-1])===0;)i--;return i===e.length?t:e.slice(0,i).join(" ")+e.slice(i).join("")},"m"),Ge=T((t,e,i)=>{if(t.length===0)return[""];if(e<=0)return[t];const r=[],a=new _e;let s="",o=0,h=!1,n=!1,c="",d=0;for(;d<t.length;){const l=t[d];if(st.has(l)){h=!0,c=l,s+=l,n=t.startsWith(ft,d+1),d+=1;continue}if(h){c+=l,s+=l,n?l===kt&&(h=n=!1):l===oe&&(h=!1,a.processEscape(c)),d+=1;continue}const u=$(l),p=l===" ";if(u===0){s+=l,d+=1;continue}if(o+u>e&&(s&&r.push(s+a.getEndEscapesForAllActiveAttributes()),s=a.getStartEscapesForAllActiveAttributes(),o=$(s),p&&i)){for(;d<t.length&&t[d]===" ";)d+=1;continue}if(s+=l,o+=u,o===e&&d<t.length-1&&(r.push(s+a.getEndEscapesForAllActiveAttributes()),s=a.getStartEscapesForAllActiveAttributes(),o=$(s),d+1<t.length&&t[d+1]===" "&&i)){for(d+=1;d<t.length&&t[d]===" ";)d+=1;continue}d+=1}return s&&r.push(s+a.getEndEscapesForAllActiveAttributes()),i?r.map(l=>tt(l)):r},"b"),Or=T((t,e,i)=>{if(t.length===0)return[];const r=i?t.trim():t;if(r.length===0)return[];const a=[];let s="",o=0;return $r(r,{getWidth:$,onSegment:T((h,n)=>{const c=h.text??"";if(h.isEscapeSequence)s+=c;else{const d=c===" ";if(h.width===0)return s+=c,!0;if(o+h.width>e&&(s&&a.push(s),s=n.getStartEscapesForAllActiveAttributes(),o=0,d))return i||a.push(n.getStartEscapesForAllActiveAttributes()+c),!0;s+=c,o+=h.width}return!0},"onSegment")}),s&&a.push(s),i?a.map(h=>tt(h)):a},"G"),Nr=T((t,e,i)=>{if(t.length===0)return[];const r=i?t.trim():t;if(r.length===0)return[];const a=r.split(Je),s=[];let o="",h=0,n=0;for(;n<a.length;){const c=a[n],d=He.test(c),l=$(c);if(c.length===0){n+=1;continue}if(i&&d&&h===0){n+=1;continue}if(h+l>e&&h>0){i?s.push(tt(o)):s.push(o),o="",h=0;continue}o+=c,h+=l,n+=1}return o&&(i?s.push(tt(o)):s.push(o)),s},"j"),Tr=T((t,e,i)=>{if(t.length===0)return[];const r=i?t.trim():t;if(r.length===0)return[];const a=r.split(Je),s=[];let o="",h=0,n=0;for(;n<a.length;){const c=a[n],d=He.test(c),l=$(c);if(c.length===0){n+=1;continue}if(i&&d&&h===0){n+=1;continue}if(l>e){o&&s.push(Gt(i?tt(o):o));const u=Ge(c,e,i);if(u.length>0){for(let p=0;p<u.length-1;p+=1)s.push(u[p]);o=u.at(-1),h=$(o)}else o="",h=0;n+=1;continue}if(h+l>e&&h>0&&(s.push(Gt(i?tt(o):o)),o="",h=0,i&&d)){n+=1;continue}o+=c,h+=l,n+=1}return o&&s.push(Gt(i?tt(o):o)),s},"K"),St={BREAK_AT_CHARACTERS:"BREAK_AT_CHARACTERS",BREAK_WORDS:"BREAK_WORDS",PRESERVE_WORDS:"PRESERVE_WORDS",STRICT_WIDTH:"STRICT_WIDTH"},kr=T((t,e={})=>{const{removeZeroWidthCharacters:i=!0,trim:r=!0,width:a=80,wrapMode:s=St.PRESERVE_WORDS}=e;if(r&&t.trim()==="")return"";let o=t.normalize("NFC").replaceAll(`\r
|
|
6
|
-
`,`
|
|
7
|
-
`);return i&&(o=o.replaceAll(hr,"")),o.split(`
|
|
8
|
-
`).map(h=>{if(r&&h.trim()==="")return"";let n;switch(s){case St.BREAK_AT_CHARACTERS:{n=Or(h,a,r);break}case St.BREAK_WORDS:{n=Tr(h,a,r);break}case St.STRICT_WIDTH:{n=Ge(h,a,r);break}default:n=Nr(h,a,r)}return Er(n)}).join(`
|
|
9
|
-
`)},"V");var Lr=Object.defineProperty,Z=S((t,e)=>Lr(t,"name",{value:e,configurable:!0}),"n$3");const Ve=80,ze=24,Zt=Z((t,e,{shell:i,env:r}={})=>Fi(t,e,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:i,env:r}).trim(),"exec"),At=Z((t,e)=>({columns:Number.parseInt(t,10),rows:Number.parseInt(e,10)}),"create"),De=Z((t,e)=>{const{columns:i,rows:r}=At(t,e);if(!(Number.isNaN(i)||Number.isNaN(r))&&!(i===Ve&&r===ze))return{columns:i,rows:r}},"createIfNotDefault"),Fr=Z(()=>{if(Q.platform!=="linux")return!0;try{const t=dt.readFileSync("/proc/self/stat","utf8"),e=t.lastIndexOf(") ");if(e===-1)return!1;const i=t.slice(e+2).trim().split(/\s+/),r=Number.parseInt(i[2],10),a=Number.parseInt(i[5],10);return Number.isNaN(r)||Number.isNaN(a)||a<=0?!1:r===a}catch{return!1}},"isForegroundProcess");function Pt(){const{env:t,stdout:e,stderr:i}=Q;if(e?.columns&&e?.rows)return At(e.columns,e.rows);if(i?.columns&&i?.rows)return At(i.columns,i.rows);if(t.COLUMNS&&t.LINES)return At(t.COLUMNS,t.LINES);const r={columns:Ve,rows:ze};return Q.platform==="win32"?Vt()??r:Q.platform==="darwin"?Ie()??Vt()??r:Ie()??Vt()??Pr()??r}O(Pt,"At");J(Pt,"se");S(Pt,"O");Z(Pt,"terminalSize");const Ie=Z(()=>{try{const t=Q.platform==="darwin"?dt.constants.O_EVTONLY|dt.constants.O_NONBLOCK:dt.constants.O_NONBLOCK,{columns:e,rows:i}=Pi.WriteStream(dt.openSync("/dev/tty",t));return{columns:e,rows:i}}catch{}},"devTty"),Vt=Z(()=>{try{const t=Zt("tput",["cols"],{env:{TERM:"dumb",...Q.env}}),e=Zt("tput",["lines"],{env:{TERM:"dumb",...Q.env}});if(t&&e)return De(t,e)}catch{}},"tput"),Pr=Z(()=>{try{if(!Fr())return;const t=Zt("resize",["-u"]).match(/\d+/g);if(t.length===2)return De(t[0],t[1])}catch{}},"resize");var _r=Object.defineProperty,Ye=S((t,e)=>_r(t,"name",{value:e,configurable:!0}),"e");const it=Ye((t,e)=>{switch(e){case"bottom":return{body:t.bottomBody,join:t.bottomJoin,left:t.bottomLeft,right:t.bottomRight};case"middle":return{body:t.joinBody,join:t.joinJoin,left:t.joinLeft,right:t.joinRight};case"top":return{body:t.topBody,join:t.topJoin,left:t.topLeft,right:t.topRight};default:throw new Error(`Invalid borderType: ${String(e)}`)}},"getHorizontalBorderChars"),Jr=Ye(t=>({join:t.bodyJoin,left:t.bodyLeft,right:t.bodyRight}),"getVerticalBorderChars");var Hr=Object.defineProperty,Gr=S((t,e)=>Hr(t,"name",{value:e,configurable:!0}),"n$1");const Et=Gr((t,e,i)=>{let r=0;for(let a=0;a<i;a+=1)r+=t[e+a]??0;return i>1&&(r+=i-1),r},"calculateCellTotalWidth");var Vr=Object.defineProperty,zr=S((t,e)=>Vr(t,"name",{value:e,configurable:!0}),"a");const Xt=zr((t,e,i,r)=>{let a=e;for(;a>0&&t[a-1]?.[i]===r;)a-=1;let s=e;for(;s<t.length-1&&t[s+1]?.[i]===r;)s+=1;let o;const h=s-a+1;if(h===1)o=!0;else switch(r.vAlign){case"bottom":{o=e===s;break}case"middle":{const n=a+Math.floor(h/2);o=e===n;break}case"top":{o=e===a;break}default:o=e===a}return{firstRow:a,lastRow:s,showContent:o}},"determineCellVerticalPosition");var Dr=Object.defineProperty,Yr=S((t,e)=>Dr(t,"name",{value:e,configurable:!0}),"F");const qr=Yr((t,e,i,r,a)=>{if(t.length===0)return[];let s=t.length-1;for(let n=0;n<t.length;n+=1){const c=t[n];if(c){for(const[d,l]of c.entries())if(l&&a(t,n,d,l)===n){const u=Xt(t,n,d,l);s=Math.max(s,u.lastRow)}}}const o=Array.from({length:s+1}).fill(1);for(let n=0;n<t.length;n+=1){const c=t[n];if(c)for(let d=0;d<i.columns;d+=1){const l=c[d];if(l&&a(t,n,d,l)===n&&(l.rowSpan??1)===1){const u=l.colSpan??1,p=Et(e,d,u),m=r(l,p).length;o[n]=Math.max(o[n]??1,m)}}}const h=Array.from({length:o.length}).fill(!1);if(i.fixedRowHeights)for(let n=0;n<o.length;n+=1){let c;i.fixedRowHeights[n]!==void 0?c=i.fixedRowHeights[n]:i.fixedRowHeights.length===1&&i.fixedRowHeights[0]!==void 0&&(c=i.fixedRowHeights[0]),c!==void 0&&(o[n]=Math.max(1,c),h[n]=!0)}for(let n=0;n<t.length;n+=1){const c=t[n];if(c)for(let d=0;d<i.columns;d+=1){const l=c[d];if(l&&a(t,n,d,l)===n&&(l.rowSpan??1)>1){const u=l.colSpan??1,p=Et(e,d,u),m=r(l,p).length-1,g=Xt(t,n,d,l),{firstRow:w,lastRow:f}=g;let v=0,b=0;for(let B=w;B<=f&&B<o.length;B+=1)v+=o[B]??1,h[B]||(b+=1);const x=m-v;if(x>0)if(b>0){const B=Math.ceil(x/b);let R=0;for(let I=w;I<=f&&I<o.length;I+=1)if(!h[I]){const M=Math.min(B,x-R);if(o[I]=(o[I]??1)+M,R+=M,R>=x)break}}else console.warn(`[calculateRowHeights] Content of spanning cell exceeds fixed height allocated. Cell: ${JSON.stringify(l.content)}, Required: ${String(m)}, Allocated: ${String(v)} (fixed).`)}}}return o},"calculateRowHeights");var Ur=Object.defineProperty,Kr=S((t,e)=>Ur(t,"name",{value:e,configurable:!0}),"i");const rt=Kr((t,e,i,r)=>{let a=e;for(;a>0&&t[a-1]?.[i]===r;)a-=1;return a},"findFirstOccurrenceRow");var Zr=Object.defineProperty,Xr=S((t,e)=>Zr(t,"name",{value:e,configurable:!0}),"n");const Qt="__EMPTY__",Me=Xr(t=>{if(typeof t=="string")return{content:t};if(typeof t=="number"||typeof t=="bigint"||typeof t=="boolean")return{content:String(t)};if(t==null)return{content:Qt};if(typeof t=="object"&&"content"in t){let{content:e}=t;if(typeof e=="number"||typeof e=="bigint"||typeof e=="boolean")e=String(e);else if(e==null)e=Qt;else if(typeof e!="string")throw new TypeError(`Invalid item type in grid cell: expected string, number, null, undefined, or GridItem object, but received ${JSON.stringify(t)} (type: ${typeof t})`);return{...t,content:e}}throw new TypeError(`Invalid item type in grid cell: expected string, number, null, undefined, or GridItem object, but received ${JSON.stringify(t)} (type: ${typeof t})`)},"normalizeGridCell");var Qr=Object.defineProperty,to=S((t,e)=>Qr(t,"name",{value:e,configurable:!0}),"p");const eo=to((t,e,i,r,a)=>{const s=$(t),o=" ".repeat(Math.max(0,r)),h=" ".repeat(Math.max(0,a));if(s===0)return o+" ".repeat(Math.max(0,e))+h;const n=Math.max(0,e-s);switch(i){case"center":{const c=Math.floor(n/2),d=n-c;return o+" ".repeat(c)+t+" ".repeat(d)+h}case"right":return o+" ".repeat(n)+t+h;default:return o+t+" ".repeat(n)+h}},"padAndAlignContent");var io=Object.defineProperty,ne=S((t,e)=>io(t,"name",{value:e,configurable:!0}),"H");const lt=/\r?\n/,Ae=/\s+/,W=ne((t,e)=>!t||!e?t:typeof e=="function"?e(t):e.open+t+e.close,"applyColor");class _t{static{O(this,"bt")}static{J(this,"Mt")}static{S(this,"Grid")}static{ne(this,"Grid")}#t;#o=[];#e;#n=new WeakMap;#i=new WeakMap;static createGridLayout(){return[]}constructor(e){const i={autoColumns:1,autoFlow:"row",autoRows:1,balancedWidths:!1,gap:0,paddingLeft:1,paddingRight:1,rows:0,showBorders:e.border!==void 0,truncate:!1,truncateOverflow:!0,wordWrap:!1};let r;Array.isArray(e.fixedRowHeights)?r=e.fixedRowHeights:typeof e.fixedRowHeights=="number"&&(r=[e.fixedRowHeights]),this.#t={...i,...e,columns:e.columns,fixedRowHeights:r,showBorders:e.border!==void 0||(e.showBorders??!1)};let{terminalWidth:a}=this.#t;if(a===void 0){const{columns:s}=Pt();a=s}this.#e=a,this.#t.maxWidth&&(this.#t.maxWidth=Math.min(this.#t.maxWidth,this.#e))}addItem(e){return this.#o.push(Me(e)),this}addItems(e){return this.#o.push(...e.map(i=>Me(i))),this}setColumns(e){return this.#t.columns=e,this}setRows(e){return this.#t.rows=e,this}setBorder(e){return this.#t.border=e,this}setShowBorders(e){return this.#t.showBorders=e,this}setMaxWidth(e){return this.#t.maxWidth=e,this}toString(){const e=_t.createGridLayout();if(this.#n=new WeakMap,this.#i=new WeakMap,this.placeItems(e),e.length===0||e[0]?.length===0)return"";let i=this.calculateColumnWidths(e);const r=this.calculateTotalGridWidth(i),a=typeof this.#t.maxWidth=="number"&&this.#t.maxWidth>0?Math.min(this.#t.maxWidth,this.#e):this.#e;return r>a&&(i=this.adjustColumnWidthsForTerminal(i,r)),this.renderGrid(e,i)}placeItems(e){let i=0,r=0;const a=this.#t.rows>0?this.#t.rows:Number.POSITIVE_INFINITY;for(let s=0;s<this.#o.length;s+=1){const o=this.#o[s];if(o.content===Qt&&!(o.rowSpan&&o.rowSpan>1)&&!(o.colSpan&&o.colSpan>1)){if(this.#t.autoFlow==="row")r+=1,r>=this.#t.columns&&(r=0,i+=1);else{i+=1;const m=e.length>0?e.length:a;i>=m&&m!==Number.POSITIVE_INFINITY?(i=0,r+=1):e.length===0&&m===Number.POSITIVE_INFINITY&&(r+=1)}continue}const h=o.colSpan??1,n=o.rowSpan??1;let c=!1,d=i,l=r,u=0;const p=(e.length+n+5)*this.#t.columns;for(;!c&&d<a&&u<p;){for(u+=1;d+n>e.length;)e.push(Array.from({length:this.#t.columns}).fill(void 0));if(this.canPlaceItem(e,d,l,h,n))if(this.placeItem(e,d,l,o),c=!0,this.#t.autoFlow==="row")r=l+h,i=d,r>=this.#t.columns&&(r=0,i+=1);else{i=d+n,r=l;const m=e.length>0?e.length:a;i>=m&&(i=0,r+=1)}else if(this.#t.autoFlow==="row")l+=1,l>=this.#t.columns&&(l=0,d+=1);else{for(d+=1;d+n>e.length;)e.push(Array.from({length:this.#t.columns}).fill(void 0));const m=e.length>0?e.length:a;if(d>=m&&(d=0,l+=1,l>=this.#t.columns))break}}if(!c)if(console.warn(`@visulima/tabular: Could not find position for item: ${JSON.stringify(o)} after ${String(u)} attempts. Grid might be too small or layout impossible.`),this.#t.autoFlow==="row")r+=1,r>=this.#t.columns&&(r=0,i+=1);else{i+=1;const m=e.length>0?e.length:a;i>=m&&(i=0,r+=1)}if(u>=p)break}if(this.#t.rows===0)for(;e.length>0&&e.at(-1)?.every(s=>s===void 0);)e.pop()}canPlaceItem(e,i,r,a,s,o=!1){if(r+a>this.#t.columns)return!1;for(let h=i;h<i+s;h+=1)if(h<e.length){if(!e[h])return console.warn(`Grid layout unexpectedly missing row ${String(h)} during canPlaceItem check.`),!1;for(let n=r;n<r+a;n+=1)if(e[h]?.[n]!==void 0)return!1}else if(!o)return!1;return!0}computeWrappedContentWidth(e,i,r,a){let s=e;if(a){if(s>20){let o=0;for(const h of i){const n=h.split(Ae);for(const c of n)o=Math.max(o,Math.min($(c),r))}s=Math.min(s,Math.max(o+4,12))}}else{let o=0;for(const h of i){const n=h.split(Ae);for(const c of n)o=Math.max(o,Math.min($(c),r))}s=Math.min(s,Math.max(o+12,20))}return s}placeItem(e,i,r,a){const s=a.rowSpan??1,o=a.colSpan??1;for(let h=i;h<i+s;h+=1){for(;h>=e.length;)e.push(Array.from({length:this.#t.columns}).fill(void 0));for(let n=r;n<r+o;n+=1)n<this.#t.columns&&(e[h]||(console.error(`Logic error: Row ${String(h)} not found in placeItem despite check.`),e[h]=Array.from({length:this.#t.columns}).fill(void 0)),e[h][n]=a)}}calculateTotalGridWidth(e){let i=0;const r=this.#t.showBorders?this.#t.border:void 0;r&&(i+=r.bodyLeft.width,i+=r.bodyRight.width);const a=e.length,s=this.#t.showBorders?r?.bodyJoin.width??0:0,o=this.#t.gap;for(let h=0;h<a;h+=1)i+=e[h]??0,h<a-1&&(i+=o,i+=s);return i}adjustColumnWidthsForTerminal(e,i){const r=typeof this.#t.maxWidth=="number"&&this.#t.maxWidth>0?Math.min(this.#t.maxWidth??0,this.#e):this.#e;if(i<=r)return e;let a=0;const s=e.length,o=this.#t.showBorders?this.#t.border:void 0;if(o&&(a+=o.bodyLeft.width,a+=o.bodyRight.width),s>1){a+=(s-1)*this.#t.gap;const u=o?.bodyJoin.width??0;a+=(s-1)*u}if(a>=r)return Array.from({length:s}).fill(1);const h=r-a,n=e.reduce((u,p)=>u+p,0);if(n===0){const u=Math.floor(h/s);return Array.from({length:s}).fill(u)}const c=e.map(u=>{const p=u/n;return Math.max(1,Math.floor(h*p))});let d=c.reduce((u,p)=>u+p,0)-h;for(;d>0;){let u=-1;for(let p=0;p<c.length;p+=1)(c[p]??0)>1&&(u===-1||(c[p]??0)>(c[u]??0))&&(u=p);if(u===-1)break;c[u]-=1,d-=1}let l=h-c.reduce((u,p)=>u+p,0);if(l>0){const u=c.map((p,m)=>{const g=n>0?(e[m]??0)/n:1/s;return{index:m,remainder:h*g%1}}).toSorted((p,m)=>m.remainder-p.remainder);for(const p of u){if(l<=0)break;const{index:m}=p;c[m]!==void 0&&(c[m]+=1,l-=1)}}return c}calculateBalancedColumnWidths(e){const i=this.calculateMinimumColumnWidthsWithGrowableInfo(e),r=i.widths,{growableColumns:a}=i,s=typeof this.#t.maxWidth=="number"&&this.#t.maxWidth>0?Math.min(this.#t.maxWidth,this.#e):this.#e,o=this.#t.showBorders?this.#t.border:void 0;let h=0;if(o&&(h+=o.bodyLeft.width,h+=o.bodyRight.width),this.#t.columns>1){h+=(this.#t.columns-1)*this.#t.gap;const d=o?.bodyJoin.width??0;h+=(this.#t.columns-1)*d}const n=Math.max(0,s-h);if(r.reduce((d,l)=>d+l,0)>0){const d=Math.floor(n/this.#t.columns),l=Array.from({length:this.#t.columns}).fill(d),u=d*this.#t.columns;let p=n-u;for(let f=0;f<l.length&&p>0;f+=1)l[f]=(l[f]??0)+1,p-=1;const m=[];let g=0;for(let f=0;f<this.#t.columns;f+=1){const v=l[f]??0,b=r[f]??0,x=Math.max(v,b);m.push(x),g+=x}if(g>n){const f=n/g,v=m.map(B=>Math.max(3,Math.floor(B*f))),b=v.reduce((B,R)=>B+R,0);let x=n-b;for(let B=0;B<v.length&&x>0;B+=1)v[B]=(v[B]??0)+1,x-=1;return v}let w=n-g;if(w>0){const f=a.length>0?a:m.map((v,b)=>b);for(;w>0&&f.length>0;)for(const v of f){if(w<=0)break;m[v]=(m[v]??0)+1,w-=1}}return m}const c=Math.floor(n/this.#t.columns);return Array.from({length:this.#t.columns}).fill(c)}calculateMinimumColumnWidthsWithGrowableInfo(e){const i=Array.from({length:this.#t.columns}).fill(0),r=[],a=this.#t.paddingLeft+this.#t.paddingRight,s=this.#t.gap+(this.#t.showBorders?this.#t.border?.bodyJoin.width??0:0);for(let o=0;o<this.#t.columns;o+=1)for(let h=0;h<e.length;h+=1){const n=e[h]?.[o];if(!n||rt(e,h,o,n)!==h||o>0&&e[h]?.[o-1]===n)continue;const c=n.colSpan??1,d=n.maxWidth??Number.POSITIVE_INFINITY,l=String(n.content??"").split(lt),u=this.#t.wordWrap&&n.wordWrap!==!1;let p=0;for(const m of l)p=Math.max(p,Math.min($(m),d));p=this.computeWrappedContentWidth(p,l,d,u),c===1&&(i[o]=Math.max(i[o]??0,p+a),u&&!r.includes(o)&&r.push(o))}for(let o=0;o<e.length;o+=1)for(let h=0;h<this.#t.columns;h+=1){const n=e[o]?.[h];if(!n||rt(e,o,h,n)!==o||h>0&&e[o]?.[h-1]===n)continue;const c=n.colSpan??1;if(c>1){const d=n.maxWidth??Number.POSITIVE_INFINITY,l=String(n.content??"").split(lt),u=this.#t.wordWrap&&n.wordWrap!==!1;let p=0;for(const f of l)p=Math.max(p,Math.min($(f),d));p=this.computeWrappedContentWidth(p,l,d,u);const m=(c-1)*s,g=p+a+m;let w=0;for(let f=h;f<h+c;f+=1)w+=i[f]??0;if(g>w){const f=g-w,v=Math.ceil(f/c);for(let b=0;b<c&&h+b<this.#t.columns;b+=1)i[h+b]=Math.max(i[h+b]??0,v)}}}return{growableColumns:r,widths:i}}calculateColumnWidths(e){if(this.#t.fixedColumnWidths&&this.#t.fixedColumnWidths.length===this.#t.columns){const s=this.#t.fixedColumnWidths;if(!s.some(o=>o===void 0||!Number.isFinite(o)))return[...s];if(this.#t.balancedWidths){const o=Array.from({length:s.length}).fill(0),h=typeof this.#t.maxWidth=="number"&&this.#t.maxWidth>0?Math.min(this.#t.maxWidth,this.#e):this.#e,n=this.calculateTotalGridWidth(Array.from({length:o.length}).fill(0)),c=Math.max(0,h-n);let d=0;const l=[];for(const[m,g]of s.entries())typeof g=="number"&&Number.isFinite(g)?(o[m]=g,d+=g):l.push(m);let u=Math.max(0,c-d);const p=l.length>0?Math.floor(u/l.length):0;for(const m of l)o[m]=p;u-=p*l.length;for(const m of l){if(u<=0)break;o[m]+=1,u-=1}return o}}if(this.#t.balancedWidths)return this.calculateBalancedColumnWidths(e);const i=Array.from({length:this.#t.columns}).fill(0),r=this.#t.paddingLeft+this.#t.paddingRight,a=this.#t.gap+(this.#t.showBorders?this.#t.border?.bodyJoin.width??0:0);for(let s=0;s<this.#t.columns;s+=1)for(let o=0;o<e.length;o+=1){const h=e[o]?.[s];if(!h||rt(e,o,s,h)!==o||s>0&&e[o]?.[s-1]===h)continue;const n=h.colSpan??1,c=h.maxWidth??Number.POSITIVE_INFINITY,d=String(h.content??"").split(lt);let l=0;for(const u of d)l=Math.max(l,Math.min($(u),c));n===1&&(i[s]=Math.max(i[s]??0,l+r))}for(let s=0;s<e.length;s+=1)for(let o=0;o<this.#t.columns;o+=1){const h=e[s]?.[o];if(!h||rt(e,s,o,h)!==s||o>0&&e[s]?.[o-1]===h)continue;const n=h.colSpan??1;if(n>1){const c=h.maxWidth??Number.POSITIVE_INFINITY,d=String(h.content??"").split(lt),l=this.#t.wordWrap&&h.wordWrap!==!1;let u=0;for(const f of d)u=Math.max(u,Math.min($(f),c));u=this.computeWrappedContentWidth(u,d,c,l);let p=0;for(let f=o;f<o+n;f+=1)p+=i[f]??0;const m=n>1?(n-1)*a:0,g=u+r+m,w=p+m;if(g>w){const f=g-w,v=Math.floor(f/n);let b=0;for(let x=0;x<n&&o+x<this.#t.columns;x+=1){const B=Math.min(v,f-b);if(i[o+x]=(i[o+x]??0)+B,b+=B,b>=f)break}}}}if(this.#t.maxWidth){const s=this.calculateTotalGridWidth(i);if(s>this.#t.maxWidth)return this.adjustColumnWidthsForTerminal(i,s)}return i}renderVisualRowContent(e,i,r,a,s){const o=e[i];if(!o)return"";const h=this.#t.borderColor??this.#t.foregroundColor??void 0,n=[],c=this.#t.showBorders&&this.#t.border?Jr(this.#t.border):void 0,d=c&&c.left.width>0?c.left.char:"",l=c&&c.right.width>0?c.right.char:"",u=c&&c.join.width>0?c.join.char:"",p=" ".repeat(this.#t.gap);d&&n.push(W(W(d,h),this.#t.backgroundColor));let m=0;for(;m<this.#t.columns;){const g=o[m]??void 0;let w=1,f;if(g){const v=g.colSpan??1;w=v;const b=rt(e,i,m,g),x=Et(a,m,v),B=this.alignCellContent(g,x),R=B.length,I=this.getCachedCellVerticalPosition(e,i,m,g);I.firstRow!==b&&console.warn(`Mismatch between findFirstOccurrenceRow (${String(b)}) and determineCellVerticalPosition (${String(I.firstRow)})`);const M=s.slice(b,I.lastRow+1).reduce((A,F)=>A+F,0),E=I.lastRow-I.firstRow+1;let k=r,L=0;for(let A=b;A<i;A+=1)A<s.length&&(k+=s[A]??1),A<I.lastRow&&(L+=1);k+=L;const H=g.vAlign??"top";let _;switch(H){case"bottom":{let A=r;for(let P=b;P<i;P+=1)A+=s[P]??1;const F=M-R;_=A>=F?A-F:-1;break}case"middle":{const A=Math.round((M-R)/2);let F=r;for(let P=b;P<i;P+=1)F+=s[P]??1;_=F>=A&&F<A+R?F-A:-1;break}case"top":{_=k;break}default:_=k}const Jt=_>=0&&_<R;if(f=" ".repeat(Math.max(0,x)),Jt){let A=!1;H==="middle"&&E%2===0&&_===0&&(A=!0),A||(f=B[_]??f)}g.colSpan&&g.colSpan>1&&(f+=p.repeat(g.colSpan)),g.foregroundColor?f=W(f,g.foregroundColor):this.#t.foregroundColor&&(f=W(f,this.#t.foregroundColor)),g.backgroundColor?f=W(f,g.backgroundColor):this.#t.backgroundColor&&(f=W(f,this.#t.backgroundColor))}else{const v=this.#t.paddingLeft+this.#t.paddingRight,b=Math.max(0,(a[m]??0)-v),x=" ".repeat(this.#t.paddingLeft+b+this.#t.paddingRight);f=W(W(r===0?x:" ".repeat(x.length),this.#t.foregroundColor),this.#t.backgroundColor)}n.push(f),m+w<this.#t.columns&&(n.push(p),this.#t.showBorders&&u&&n.push(W(W(u,h),this.#t.backgroundColor)),this.#t.gap>0&&n.push(p)),m+=w}return l&&n.push(W(W(l,h),this.#t.backgroundColor)),n.join("")}alignCellContent(e,i){const r=this.#n.get(e);if(r?.has(i))return r.get(i);const{paddingLeft:a,paddingRight:s}=this.#t,o=a+s,h=i-o;if(h<=0){const l=[" ".repeat(o+this.#t.gap)];return r?r.set(i,l):this.#n.set(e,new Map([[i,l]])),l}let n;const c=String(e.content??"");if(n=c.includes(`
|
|
10
|
-
`)||c.includes("\r")?c.split(lt):[c],this.#t.wordWrap&&e.wordWrap!==!1){const l=typeof this.#t.wordWrap=="object"?this.#t.wordWrap:{},u=typeof e.wordWrap=="object"?e.wordWrap:l;n=kr(c,{...u,width:h}).split(`
|
|
11
|
-
`)}if(this.#t.truncate&&e.truncate!==!1){const l=typeof this.#t.truncate=="object"?this.#t.truncate:{},u=typeof e.truncate=="object"?e.truncate:l;n=n.map(p=>Re(p,h,u))}else this.#t.truncateOverflow&&(n=n.map(l=>$(l)>h?Re(l,h,{}):l));const d=n.map(l=>eo(l,h,e.hAlign??"left",a,s));return r?r.set(i,d):this.#n.set(e,new Map([[i,d]])),d}renderHorizontalBorder(e,i,r,a,s,o=-1){if(!this.#t.showBorders||!this.#t.border)return"";const h=this.#t.border,n=it(h,s),c=n.body.char,d=n.body.width,l=h.bodyJoin.char;if(s!=="middle"&&d===0)return"";let u=n.left.char,p=n.right.char;if(s==="middle"&&o!==-1){const f=e[r]?.[0]??void 0,v=e[o]?.[0]??void 0;f&&v&&f===v&&(u=l);const b=this.#t.columns-1,x=e[r]?.[b]??void 0,B=e[o]?.[b]??void 0;x&&B&&x===B&&(p=l)}const m=[],g=" ".repeat(this.#t.gap);u&&m.push(W(W(u,this.#t.borderColor),this.#t.backgroundColor));let w;for(let f=0;f<this.#t.columns;f+=1){const v=e[r]?.[f]??void 0,b=s==="middle"&&o!==-1?e[o]?.[f]??void 0:void 0;let x,B=!1;if(v&&(f===0||e[r]?.[f-1]!==v)&&(x=v,B=!0),v&&!B)continue;if(!v){const M=a[f]??0;if(w=d>0?c.repeat(M):" ".repeat(M),m.push(W(W(w,this.#t.borderColor),this.#t.backgroundColor)),f<this.#t.columns-1){const E=this.determineJoinChar(s,e,r,o,f,f+1);m.push(g),E.width>0&&m.push(W(W(E.char,this.#t.borderColor),this.#t.backgroundColor))}continue}const R=x?.colSpan??1;if(s==="middle"&&s==="middle"&&b&&v===b&&x){const M=x.vAlign==="middle",{firstRow:E,lastRow:k}=this.getCachedCellVerticalPosition(e,r,f,x),L=k-E+1,H=L%2===0,_=E+Math.ceil(L/2)-1,Jt=Et(a,f,R),A=this.alignCellContent(x,Jt),F=A.length;if(M&&H&&r===_)w=W(A[0]??"",this.#t.borderColor);else{let P=0;for(let et=E;et<=r;et+=1)P+=i[et]??1,et<r&&(P+=1);const Ht=P;if(Ht>=0&&Ht<F)w=W(A[Ht]??"",this.#t.foregroundColor);else{const et=a.slice(f,f+R).reduce((Ke,Ze)=>Ke+Ze,0)+(R-1)*(this.#t.gap+this.#t.border.bodyJoin.width);w=W(" ".repeat(et),this.#t.borderColor)}}m.push(W(w,this.#t.backgroundColor))}else{const M=[];for(let E=f;E<f+R;E+=1){const k=a[E]??0,L=d>0?c:" ";if(M.push(L.repeat(k+this.#t.gap)),E<f+R-1){const H=this.determineJoinChar(s,e,r,o,E,E+1);H.width>0&&M.push(H.char)}}w=M.join(""),m.push(W(W(w,this.#t.borderColor),this.#t.backgroundColor))}const I=f+R-1;if(I<this.#t.columns-1){const M=this.determineJoinChar(s,e,r,o,I,I+1);M.width>0&&m.push(W(W(M.char,this.#t.borderColor),this.#t.backgroundColor))}f+=R-1}return p&&m.push(W(W(p,this.#t.borderColor),this.#t.backgroundColor)),m.join("")}determineJoinChar(e,i,r,a,s,o=-1){if(!this.#t.showBorders||!this.#t.border)return{char:" ",width:this.#t.gap};const h=this.#t.border;if(e!=="middle"){const B=it(h,e),R=i[r]?.[s]??void 0,I=o===-1?s+1:o,M=i[r]?.[I]??void 0,E=R!==void 0&&M!==void 0&&R===M?B.body:B.join,{char:k,width:L}=E;return{char:k,width:L>0?L:this.#t.gap}}if(a===-1||o===-1)return{char:" ",width:this.#t.gap};const n=h.bodyJoin,c=i[r]?.[s]??void 0,d=i[a]?.[s]??void 0,l=i[r]?.[o]??void 0,u=i[a]?.[o]??void 0,p=c!==void 0&&d!==void 0&&c===d,m=l!==void 0&&u!==void 0&&l===u,g=c!==void 0&&l!==void 0&&c===l,w=d!==void 0&&u!==void 0&&d===u;let f;const v=it(h,"middle");p&&m?f=g?{char:" ",width:n.width}:n:p?f=h.joinLeft:m?f=h.joinRight:g&&w?f=v.body:g?f=h.topJoin:w?f=h.bottomJoin:f=h.joinJoin;const{char:b,width:x}=f;return{char:b,width:x>0?x:this.#t.gap}}renderGrid(e,i){if(e.length===0)return"";const r=[],a=qr(e,i,this.#t,this.alignCellContent.bind(this),rt),s=this.#t.showBorders&&this.#t.border?it(this.#t.border,"top"):void 0;s&&s.body.width>0&&r.push(this.renderHorizontalBorder(e,a,0,i,"top"));for(let h=0;h<e.length;h+=1){const n=a[h]??1;for(let d=0;d<n;d+=1)r.push(this.renderVisualRowContent(e,h,d,i,a));const c=this.#t.showBorders&&this.#t.border?it(this.#t.border,"middle"):void 0;if(h<e.length-1&&c&&c.body.width>0){const d=e[h],l=e[h+1];let u=!1;if(d&&l)for(let p=0;p<this.#t.columns;p+=1){const m=d[p],g=l[p];if(m!==g){u=!0;break}}u&&r.push(this.renderHorizontalBorder(e,a,h,i,"middle",h+1))}}const o=this.#t.showBorders&&this.#t.border?it(this.#t.border,"bottom"):void 0;return o&&o.body.width>0&&r.push(this.renderHorizontalBorder(e,a,e.length-1,i,"bottom")),r.join(`
|
|
12
|
-
`)}getCachedCellVerticalPosition(e,i,r,a){const s=this.#i.get(a);if(s)return s;const o=Xt(e,i,r,a);return this.#i.set(a,o),o}}ne(t=>new _t(t),"createGrid");const ro={bodyJoin:{char:"│",width:1},bodyLeft:{char:"│",width:1},bodyRight:{char:"│",width:1},bottomBody:{char:"─",width:1},bottomJoin:{char:"┴",width:1},bottomLeft:{char:"└",width:1},bottomRight:{char:"┘",width:1},joinBody:{char:"─",width:1},joinJoin:{char:"┼",width:1},joinLeft:{char:"├",width:1},joinRight:{char:"┤",width:1},topBody:{char:"─",width:1},topJoin:{char:"┬",width:1},topLeft:{char:"┌",width:1},topRight:{char:"┐",width:1}},Bo={bodyJoin:{char:" ",width:1},bodyLeft:{char:" ",width:1},bodyRight:{char:" ",width:1},bottomBody:{char:"-",width:1},bottomJoin:{char:"-",width:1},bottomLeft:{char:"-",width:1},bottomRight:{char:"-",width:1},joinBody:{char:"-",width:1},joinJoin:{char:"-",width:1},joinLeft:{char:"-",width:1},joinRight:{char:"-",width:1},topBody:{char:"-",width:1},topJoin:{char:"-",width:1},topLeft:{char:"-",width:1},topRight:{char:"-",width:1}},Ro={bodyJoin:{char:"║",width:1},bodyLeft:{char:"║",width:1},bodyRight:{char:"║",width:1},bottomBody:{char:"═",width:1},bottomJoin:{char:"╩",width:1},bottomLeft:{char:"╚",width:1},bottomRight:{char:"╝",width:1},joinBody:{char:"═",width:1},joinJoin:{char:"╬",width:1},joinLeft:{char:"╠",width:1},joinRight:{char:"╣",width:1},topBody:{char:"═",width:1},topJoin:{char:"╦",width:1},topLeft:{char:"╔",width:1},topRight:{char:"╗",width:1}},Wo={bodyJoin:{char:"│",width:1},bodyLeft:{char:"│",width:1},bodyRight:{char:"│",width:1},bottomBody:{char:"─",width:1},bottomJoin:{char:"┴",width:1},bottomLeft:{char:"╰",width:1},bottomRight:{char:"╯",width:1},joinBody:{char:"─",width:1},joinJoin:{char:"┼",width:1},joinLeft:{char:"├",width:1},joinRight:{char:"┤",width:1},topBody:{char:"─",width:1},topJoin:{char:"┬",width:1},topLeft:{char:"╭",width:1},topRight:{char:"╮",width:1}},So={bodyJoin:{char:"┊",width:1},bodyLeft:{char:"┊",width:1},bodyRight:{char:"┊",width:1},bottomBody:{char:"┈",width:1},bottomJoin:{char:"┴",width:1},bottomLeft:{char:"└",width:1},bottomRight:{char:"┘",width:1},joinBody:{char:"┈",width:1},joinJoin:{char:"┼",width:1},joinLeft:{char:"├",width:1},joinRight:{char:"┤",width:1},topBody:{char:"┈",width:1},topJoin:{char:"┬",width:1},topLeft:{char:"┌",width:1},topRight:{char:"┐",width:1}},Io={bodyJoin:{char:"|",width:1},bodyLeft:{char:"|",width:1},bodyRight:{char:"|",width:1},bottomBody:{char:"-",width:1},bottomJoin:{char:"|",width:1},bottomLeft:{char:"|",width:1},bottomRight:{char:"|",width:1},joinBody:{char:"-",width:1},joinJoin:{char:"|",width:1},joinLeft:{char:"|",width:1},joinRight:{char:"|",width:1},topBody:{char:"-",width:1},topJoin:{char:"|",width:1},topLeft:{char:"|",width:1},topRight:{char:"|",width:1}},Mo={bodyJoin:{char:"|",width:1},bodyLeft:{char:"|",width:1},bodyRight:{char:"|",width:1},bottomBody:{char:"-",width:1},bottomJoin:{char:"+",width:1},bottomLeft:{char:"+",width:1},bottomRight:{char:"+",width:1},joinBody:{char:"-",width:1},joinJoin:{char:"+",width:1},joinLeft:{char:"+",width:1},joinRight:{char:"+",width:1},topBody:{char:"-",width:1},topJoin:{char:"+",width:1},topLeft:{char:"+",width:1},topRight:{char:"+",width:1}},Ao={bodyJoin:{char:"",width:0},bodyLeft:{char:"",width:0},bodyRight:{char:"",width:0},bottomBody:{char:"",width:0},bottomJoin:{char:"",width:0},bottomLeft:{char:"",width:0},bottomRight:{char:"",width:0},joinBody:{char:"",width:0},joinJoin:{char:"",width:0},joinLeft:{char:"",width:0},joinRight:{char:"",width:0},topBody:{char:"",width:0},topJoin:{char:"",width:0},topLeft:{char:"",width:0},topRight:{char:"",width:0}},jo={bodyJoin:{char:"█",width:1},bodyLeft:{char:"█",width:1},bodyRight:{char:"█",width:1},bottomBody:{char:"█",width:1},bottomJoin:{char:"█",width:1},bottomLeft:{char:"█",width:1},bottomRight:{char:"█",width:1},joinBody:{char:"█",width:1},joinJoin:{char:"█",width:1},joinLeft:{char:"█",width:1},joinRight:{char:"█",width:1},topBody:{char:"█",width:1},topJoin:{char:"█",width:1},topLeft:{char:"█",width:1},topRight:{char:"█",width:1}},Co={bodyJoin:{char:"┃",width:1},bodyLeft:{char:"┃",width:1},bodyRight:{char:"┃",width:1},bottomBody:{char:"━",width:1},bottomJoin:{char:"┻",width:1},bottomLeft:{char:"┗",width:1},bottomRight:{char:"┛",width:1},joinBody:{char:"━",width:1},joinJoin:{char:"╋",width:1},joinLeft:{char:"┣",width:1},joinRight:{char:"┫",width:1},topBody:{char:"━",width:1},topJoin:{char:"┳",width:1},topLeft:{char:"┏",width:1},topRight:{char:"┓",width:1}};var oo=Object.defineProperty,qe=O((t,e)=>oo(t,"name",{value:e,configurable:!0}),"p"),no=Object.defineProperty,se=qe((t,e)=>no(t,"name",{value:e,configurable:!0}),"y"),so=Object.defineProperty,ho=se((t,e)=>so(t,"name",{value:e,configurable:!0}),"t");const ao=ho(t=>t.reduce((e,i)=>{if(i===null)return e+1;if(typeof i=="object"&&!Array.isArray(i)){const r=typeof i.colSpan=="number"?i.colSpan:1;return e+(r<=0?1:r)}return e+1},0),"computeRowLogicalWidth");var co=Object.defineProperty,Ue=se((t,e)=>co(t,"name",{value:e,configurable:!0}),"b");class lo{static{O(this,"H")}static{qe(this,"D")}static{se(this,"Table")}static{Ue(this,"Table")}#t;#o=[];#e=[];#n=[];#i=!0;#r=void 0;constructor(e={}){this.#t={...e,showFooter:e.showFooter??!0,showHeader:e.showHeader??!0,style:{border:ro,paddingLeft:1,paddingRight:1,...e.style}}}setHeaders(e){return e.length>0&&!Array.isArray(e[0])?this.#e=[e]:this.#e=e.map(i=>Array.isArray(i)?i:[i]),this.#i=!0,this.#r=void 0,this}setFooter(e){return e.length>0&&!Array.isArray(e[0])?this.#n=[e]:this.#n=e.map(i=>Array.isArray(i)?i:[i]),this.#i=!0,this.#r=void 0,this}addRow(e){if(!Array.isArray(e))throw new TypeError("Row must be an array");return this.#o.push(e),this.#i=!0,this.#r=void 0,this}addRows(...e){for(const i of e)this.addRow(i);return this.#i=!0,this.#r=void 0,this}toString(){if(!this.#i&&this.#r!==void 0)return this.#r;const e=this.#t.showHeader?this.#e:[],i=this.#t.showFooter?this.#n:[],r=[...e,...this.#o,...i];if(r.length===0)return this.#r="",this.#i=!1,"";let a=0;for(const l of r){const u=l;Array.isArray(u)?a=Math.max(a,ao(u)):console.error("Unexpected non-array element found while calculating columns:",u)}if(a===0)return this.#r="",this.#i=!1,"";let s;Array.isArray(this.#t.columnWidths)?s=this.#t.columnWidths.length>=a?this.#t.columnWidths.slice(0,a):[...this.#t.columnWidths,...Array.from({length:a-this.#t.columnWidths.length}).fill(void 0)]:typeof this.#t.columnWidths=="number"&&(s=Array.from({length:a}).fill(this.#t.columnWidths));let o;const h=r.length;if(Array.isArray(this.#t.rowHeights)?o=this.#t.rowHeights:typeof this.#t.rowHeights=="number"&&(o=Array.from({length:h}).fill(this.#t.rowHeights)),s&&Array.isArray(s)){const l=[...s];for(const u of r){const p=u;for(const[m,g]of p.entries()){let w={};if(typeof g=="object"&&g!==null&&!Array.isArray(g)){const{content:f,href:v,...b}=g;w=b}w.width!==void 0?l[m]=w.width:w.maxWidth!==void 0&&l[m]!==void 0&&(l[m]=Math.min(l[m],w.maxWidth))}}s=l}const n={autoFlow:"row",backgroundColor:this.#t.style?.backgroundColor,balancedWidths:this.#t.balancedWidths??!1,border:this.#t.style?.border,borderColor:this.#t.style?.borderColor,columns:a,fixedColumnWidths:s,fixedRowHeights:o,foregroundColor:this.#t.style?.foregroundColor,gap:this.#t.gap??0,maxWidth:this.#t.maxWidth,paddingLeft:this.#t.style?.paddingLeft,paddingRight:this.#t.style?.paddingRight,terminalWidth:this.#t.terminalWidth,truncate:this.#t.truncate??(s?.every(l=>typeof l=="number")||this.#t.maxWidth!==void 0&&!this.#t.balancedWidths),truncateOverflow:this.#t.truncateOverflow??!0,wordWrap:this.#t.wordWrap??!1},c=new _t(n),d=[];for(const[l,u]of r.entries()){const p=u;if(!Array.isArray(p)){console.error("Skipping non-array row while creating GridItems:",p);continue}const m=this.#t.showHeader?this.#e.length:0,g=this.#o.length,w=this.#t.showHeader&&l<m,f=this.#t.showFooter&&l>=m+g,v=w&&p.length===1&&a>1,b=f&&p.length===1&&a>1;for(const x of p){let B=x,R={};if(typeof B=="object"&&B!==null&&!Array.isArray(B)){const{content:k,href:L,...H}=B;B=L?`\x1B]8;;${L}\x1B\\${String(k)}\x1B]8;;\x1B\\`:k,R=H}v&&(R.colSpan=a),b&&(R.colSpan=a);const I=this.#t.transformTabToSpace&&typeof B=="string"?B.replaceAll(" "," ".repeat(this.#t.transformTabToSpace)):B,{maxWidth:M,width:E}=R;d.push({backgroundColor:R.backgroundColor,colSpan:R.colSpan,content:I,foregroundColor:R.foregroundColor,hAlign:R.hAlign,maxWidth:M,rowSpan:R.rowSpan,truncate:R.truncate??(M===void 0?void 0:!0),vAlign:R.vAlign,width:E,wordWrap:R.wordWrap})}}return c.addItems(d),this.#r=c.toString(),this.#i=!1,this.#r}}const $o=Ue(t=>new lo(t),"createTable");export{pi as B,po as E,lo as H,wo as I,$o as M,bo as N,yo as P,Co as R,xo as T,Io as a,Mo as c,So as d,vo as e,U as g,Bo as h,Ro as i,mo as j,Wo as o,go as q,Ao as r,ro as t,jo as w};
|