@poe-platform/safe-bash 0.1.782 → 0.1.783
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/README.md +40 -0
- package/dist/office-package/zip-sync.d.ts +2 -0
- package/dist/office-package/zip-sync.js +111 -0
- package/dist/safe-bash/chunks/chunk-4FDQJUFW.js +3464 -0
- package/dist/safe-bash/chunks/csvkit-K55OYAQC.js +1564 -0
- package/dist/safe-bash/chunks/ffmpeg-BEFTQ6DZ.js +60 -0
- package/dist/safe-bash/chunks/gh-HQWOWLWE.js +41 -0
- package/dist/safe-bash/chunks/git-UFNPAOYZ.js +52 -0
- package/dist/safe-bash/chunks/imagemagick-53BMHH6D.js +134 -0
- package/dist/safe-bash/chunks/implementation-QUTAAYMT.js +105 -0
- package/dist/safe-bash/chunks/pdfimages-4OYI6FLG.js +73 -0
- package/dist/safe-bash/chunks/pdfinfo-I7U6TQPP.js +153 -0
- package/dist/safe-bash/chunks/pdftk-SUA6FMHI.js +79 -0
- package/dist/safe-bash/chunks/pdftoppm-4C5DGEWX.js +139 -0
- package/dist/safe-bash/chunks/pdftotext-Y4WI225Y.js +118 -0
- package/dist/safe-bash/chunks/qpdf-IORB4RV5.js +68 -0
- package/dist/safe-bash/chunks/sips-WHAMJFEU.js +77 -0
- package/dist/safe-bash/chunks/soffice-SYEK6WJS.js +89 -0
- package/dist/safe-bash/chunks/wkhtmltopdf-ZIICWJLF.js +85 -0
- package/dist/safe-bash/command-chunks/chunk-2LP3VMPA.js +58 -0
- package/dist/safe-bash/command-chunks/{chunk-CG4JSOK2.js → chunk-3HDIDEUJ.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-4DSJDVBM.js +2897 -0
- package/dist/safe-bash/command-chunks/{chunk-GBHSE6ZO.js → chunk-5GRLAARV.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-7OKDCM5U.js +112 -0
- package/dist/safe-bash/command-chunks/{chunk-FH3D75FC.js → chunk-ADCGH6A7.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-MTKXVRXL.js → chunk-DREUDEQG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ADBFNLLK.js → chunk-FXYWQ6S4.js} +16 -14
- package/dist/safe-bash/command-chunks/{chunk-Y2KHC6TZ.js → chunk-IDKD76KR.js} +5 -3
- package/dist/safe-bash/command-chunks/{chunk-K6KBYLQC.js → chunk-JUDOV5MJ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3ZK5F23O.js → chunk-L3MLMXL4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-E5TEVROY.js → chunk-PFBJR2PY.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-YGYOVXTO.js → chunk-UUR2S7AD.js} +9 -5
- package/dist/safe-bash/command-chunks/chunk-VIVYKW7Q.js +101 -0
- package/dist/safe-bash/command-chunks/{chunk-I5GLTNVH.js → chunk-X4P42NYK.js} +2 -27
- package/dist/safe-bash/command-chunks/{chunk-XF6TXYLD.js → chunk-Z57TV6TC.js} +4 -54
- package/dist/safe-bash/command-chunks/{chunk-QDPRSPHQ.js → chunk-Z64BW7CG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-X3IVPNC3.js → chunk-Z7TYZG3A.js} +5 -3
- package/dist/safe-bash/command-chunks/{chunk-GZXLPWT5.js → chunk-ZF3ZVGQC.js} +259 -258
- package/dist/safe-bash/command-chunks/{pptx-ZL6L7KP2-QVZEYFUV.js → pptx-KY2OJWZW-76LBHCHD.js} +4 -3
- package/dist/safe-bash/commands/csvkit/index.d.ts +1 -8
- package/dist/safe-bash/commands/csvkit/index.js +5 -1639
- package/dist/safe-bash/commands/csvkit/sync.d.ts +9 -0
- package/dist/safe-bash/commands/csvkit/sync.js +1639 -0
- package/dist/safe-bash/commands/pandoc/implementation.d.ts +8 -0
- package/dist/safe-bash/commands/pandoc/implementation.js +92 -0
- package/dist/safe-bash/commands/pandoc/index.d.ts +2 -6
- package/dist/safe-bash/commands/pandoc/index.js +2 -90
- package/dist/safe-bash/core.browser.js +808 -6271
- package/dist/safe-bash/core.d.ts +17 -16
- package/dist/safe-bash/core.js +17 -16
- package/dist/safe-bash/lazy-gh.d.ts +10 -0
- package/dist/safe-bash/lazy-gh.js +30 -0
- package/dist/safe-bash/lazy-optional.d.ts +499 -0
- package/dist/safe-bash/lazy-optional.js +609 -0
- package/dist/safe-bash/plugins/composition.d.ts +1 -1
- package/dist/safe-bash/plugins/composition.js +1 -1
- package/dist/safe-bash/plugins/lazy-command.d.ts +9 -0
- package/dist/safe-bash/plugins/lazy-command.js +57 -0
- package/dist/safe-bash/shell/runtime.js +24 -25
- package/dist/safe-bash-command-csvkit/cli/lexical.d.ts +3 -0
- package/dist/safe-bash-command-csvkit/cli/parser.d.ts +1 -2
- package/dist/safe-bash-command-csvkit/codecs/python.js +3 -2
- package/dist/safe-bash-command-csvkit/codecs/utf8.js +2 -1
- package/dist/safe-bash-command-csvkit/index.js +453 -3270
- package/dist/safe-bash-command-csvkit/sync-support.d.ts +7 -0
- package/dist/safe-bash-command-csvkit/sync-support.js +31 -0
- package/dist/safe-bash-command-gh/index.js +25 -17
- package/dist/safe-bash-command-git/index.js +6 -10
- package/dist/safe-bash-command-imagemagick/index.js +2 -2
- package/dist/safe-bash-command-pandoc/citeproc-filters.js +4 -2
- package/dist/safe-bash-command-pandoc/command.js +8 -6
- package/dist/safe-bash-command-pandoc/index.js +8 -6
- package/dist/safe-bash-command-pandoc/lua-filters.js +3 -2
- package/dist/safe-bash-command-pandoc/options.d.ts +5 -0
- package/dist/safe-bash-command-pandoc/options.js +93 -0
- package/dist/safe-bash-command-sips/index.js +2 -2
- package/dist/safe-bash-command-soffice/index.d.ts +1 -2
- package/dist/safe-bash-command-soffice/index.js +22 -18
- package/dist/safe-bash-command-ssconvert/commands.js +2 -2
- package/dist/safe-bash-command-ssconvert/core.js +2 -2
- package/dist/safe-bash-command-ssconvert/formats/csv.js +2 -2
- package/dist/safe-bash-command-ssconvert/formats/xls.js +3 -3
- package/dist/safe-bash-command-ssconvert/formats/xlsx.js +3 -3
- package/dist/safe-bash-command-timeout/index.js +3 -3
- package/dist/safe-bash-command-yq/index.js +5 -5
- package/dist/safe-bash-compression-engine/bounded-codec.js +3 -3
- package/dist/safe-bash-compression-engine/codec-loader.js +2 -2
- package/dist/safe-bash-compression-engine/files.js +7 -7
- package/dist/safe-bash-compression-engine/index.js +6 -6
- package/dist/safe-bash-compression-engine/operand.js +7 -7
- package/dist/safe-bash-compression-engine/stream.js +6 -6
- package/dist/safe-bash-compression-engine/zstd-decode.js +5 -5
- package/dist/safe-bash-contracts/diagnostics.js +3 -3
- package/dist/safe-bash-contracts/escaping.js +9 -9
- package/dist/safe-bash-contracts/filesystem-descriptor.js +1 -1
- package/dist/safe-bash-contracts/filesystem-output.js +10 -10
- package/dist/safe-bash-contracts/index.js +40 -40
- package/dist/safe-bash-io-engine/commands/search/requirements.js +4 -4
- package/dist/safe-bash-io-engine/commands/text-programs/shared.js +4 -4
- package/dist/safe-bash-io-engine/internal.d.ts +9 -0
- package/dist/safe-bash-io-engine/internal.js +3 -3
- package/dist/safe-bash-query-engine/index.js +6 -6
- package/dist/safe-bash-query-engine/interpreter.js +5 -5
- package/dist/safe-bash-query-engine/query-core.js +6 -6
- package/dist/safe-bash-regex-engine/execution/bounded-provider.js +3 -3
- package/dist/safe-bash-regex-engine/index.js +2 -2
- package/dist/safe-bash-regex-engine/text/regex.js +2 -2
- package/dist/safe-bash-xml-engine/index.js +3 -3
- package/package.json +4 -4
- package/dist/safe-bash/command-chunks/{chunk-DC52GWRK.js → chunk-BUKYQBXO.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-QJ3ONEBI.js → chunk-DEH3CMGL.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-Y64PA6IA.js → chunk-KHZZ4V3L.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-I7PKIGII.js → chunk-QIRUOY2W.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-HQG2IBZL.js → chunk-TOSM3T3A.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-F4IQCXZG.js → chunk-VBZMCL23.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-J2NPH7DO.js → chunk-W2T7JWT3.js} +3 -3
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
readBiffRecords,
|
|
7
7
|
readCfb
|
|
8
8
|
} from "../safe-bash/command-chunks/chunk-KKJCKPTA.js";
|
|
9
|
-
import "../safe-bash/command-chunks/chunk-F4IQCXZG.js";
|
|
10
|
-
import "../safe-bash/command-chunks/chunk-FLMLM7Y4.js";
|
|
11
9
|
import "../safe-bash/command-chunks/chunk-KOM3FNCE.js";
|
|
10
|
+
import "../safe-bash/command-chunks/chunk-VBZMCL23.js";
|
|
12
11
|
import "../safe-bash/command-chunks/chunk-J7UMKBRK.js";
|
|
13
12
|
import "../safe-bash/command-chunks/chunk-6X2OX6IJ.js";
|
|
13
|
+
import "../safe-bash/command-chunks/chunk-FLMLM7Y4.js";
|
|
14
14
|
import "../safe-bash/command-chunks/chunk-RID3B5RE.js";
|
|
15
15
|
import "../safe-bash/command-chunks/chunk-WKPOGTZY.js";
|
|
16
16
|
import "../safe-bash/command-chunks/chunk-MED2BOOW.js";
|
|
@@ -24,16 +24,56 @@ import {
|
|
|
24
24
|
pythonCodecAliases,
|
|
25
25
|
pythonCodecs,
|
|
26
26
|
resolveCodec
|
|
27
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
27
|
+
} from "../safe-bash/command-chunks/chunk-Z7TYZG3A.js";
|
|
28
|
+
import {
|
|
29
|
+
utf8Codec
|
|
30
|
+
} from "../safe-bash/command-chunks/chunk-Z57TV6TC.js";
|
|
31
|
+
import {
|
|
32
|
+
CastError,
|
|
33
|
+
Decimal,
|
|
34
|
+
DecimalTrap,
|
|
35
|
+
DictionaryWriter,
|
|
36
|
+
POSSIBLE_DELIMITERS,
|
|
37
|
+
Writer,
|
|
38
|
+
bytesRepr,
|
|
39
|
+
castValue,
|
|
40
|
+
columnTypeOrder,
|
|
41
|
+
decimalZeroes,
|
|
42
|
+
defaultHeaders,
|
|
43
|
+
diagnosticReport,
|
|
44
|
+
emit,
|
|
45
|
+
fileException,
|
|
46
|
+
floatText,
|
|
47
|
+
inferTable,
|
|
48
|
+
inputWriteCell,
|
|
49
|
+
integer,
|
|
50
|
+
integerWhitespace,
|
|
51
|
+
jsonTable,
|
|
52
|
+
match,
|
|
53
|
+
normalizeHeaders,
|
|
54
|
+
numericField,
|
|
55
|
+
parseColumnIdentifiers,
|
|
56
|
+
pythonValueText,
|
|
57
|
+
readCsv,
|
|
58
|
+
readCsvRecoverable,
|
|
59
|
+
readCsvStream,
|
|
60
|
+
readTable,
|
|
61
|
+
repr,
|
|
62
|
+
sniff,
|
|
63
|
+
stripWhitespace,
|
|
64
|
+
temporalOrder,
|
|
65
|
+
upperText,
|
|
66
|
+
warningText,
|
|
67
|
+
writeCsvRow
|
|
68
|
+
} from "../safe-bash/command-chunks/chunk-4DSJDVBM.js";
|
|
28
69
|
import {
|
|
29
70
|
CsvkitBlocked,
|
|
30
71
|
CsvkitCleanupError,
|
|
31
72
|
CsvkitDiagnostic,
|
|
32
73
|
CsvkitOutputBudgetError,
|
|
33
74
|
CsvkitWorkBudgetError,
|
|
34
|
-
PythonException
|
|
35
|
-
|
|
36
|
-
} from "../safe-bash/command-chunks/chunk-XF6TXYLD.js";
|
|
75
|
+
PythonException
|
|
76
|
+
} from "../safe-bash/command-chunks/chunk-2LP3VMPA.js";
|
|
37
77
|
import {
|
|
38
78
|
createZipCodec
|
|
39
79
|
} from "../safe-bash/command-chunks/chunk-MKQVQMXO.js";
|
|
@@ -108,1623 +148,6 @@ function freezeDescriptor(value) {
|
|
|
108
148
|
|
|
109
149
|
// packages/safe-bash-command-csvkit/dist/commands/csvclean.js
|
|
110
150
|
init_buffer();
|
|
111
|
-
|
|
112
|
-
// packages/safe-bash-command-csvkit/dist/csv.js
|
|
113
|
-
init_buffer();
|
|
114
|
-
|
|
115
|
-
// packages/safe-bash-command-csvkit/dist/unicode-profile.js
|
|
116
|
-
init_buffer();
|
|
117
|
-
var decimalZeroes = [48, 1632, 1776, 1984, 2406, 2534, 2662, 2790, 2918, 3046, 3174, 3302, 3430, 3558, 3664, 3792, 3872, 4160, 4240, 6112, 6160, 6470, 6608, 6784, 6800, 6992, 7088, 7232, 7248, 42528, 43216, 43264, 43472, 43504, 43600, 44016, 65296, 66720, 68912, 68928, 69734, 69872, 69942, 70096, 70384, 70736, 70864, 71248, 71360, 71376, 71386, 71472, 71904, 72016, 72688, 72784, 73040, 73120, 73552, 90416, 92768, 92864, 93008, 93552, 118e3, 120782, 120792, 120802, 120812, 120822, 123200, 123632, 124144, 124401, 125264, 130032];
|
|
118
|
-
var integerWhitespace = [9, 10, 11, 12, 13, 32, 133, 160, 5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288];
|
|
119
|
-
var nonprintingRanges = [
|
|
120
|
-
[0, 31],
|
|
121
|
-
[127, 160],
|
|
122
|
-
[173, 173],
|
|
123
|
-
[888, 889],
|
|
124
|
-
[896, 899],
|
|
125
|
-
[907, 907],
|
|
126
|
-
[909, 909],
|
|
127
|
-
[930, 930],
|
|
128
|
-
[1328, 1328],
|
|
129
|
-
[1367, 1368],
|
|
130
|
-
[1419, 1420],
|
|
131
|
-
[1424, 1424],
|
|
132
|
-
[1480, 1487],
|
|
133
|
-
[1515, 1518],
|
|
134
|
-
[1525, 1541],
|
|
135
|
-
[1564, 1564],
|
|
136
|
-
[1757, 1757],
|
|
137
|
-
[1806, 1807],
|
|
138
|
-
[1867, 1868],
|
|
139
|
-
[1970, 1983],
|
|
140
|
-
[2043, 2044],
|
|
141
|
-
[2094, 2095],
|
|
142
|
-
[2111, 2111],
|
|
143
|
-
[2140, 2141],
|
|
144
|
-
[2143, 2143],
|
|
145
|
-
[2155, 2159],
|
|
146
|
-
[2191, 2198],
|
|
147
|
-
[2274, 2274],
|
|
148
|
-
[2436, 2436],
|
|
149
|
-
[2445, 2446],
|
|
150
|
-
[2449, 2450],
|
|
151
|
-
[2473, 2473],
|
|
152
|
-
[2481, 2481],
|
|
153
|
-
[2483, 2485],
|
|
154
|
-
[2490, 2491],
|
|
155
|
-
[2501, 2502],
|
|
156
|
-
[2505, 2506],
|
|
157
|
-
[2511, 2518],
|
|
158
|
-
[2520, 2523],
|
|
159
|
-
[2526, 2526],
|
|
160
|
-
[2532, 2533],
|
|
161
|
-
[2559, 2560],
|
|
162
|
-
[2564, 2564],
|
|
163
|
-
[2571, 2574],
|
|
164
|
-
[2577, 2578],
|
|
165
|
-
[2601, 2601],
|
|
166
|
-
[2609, 2609],
|
|
167
|
-
[2612, 2612],
|
|
168
|
-
[2615, 2615],
|
|
169
|
-
[2618, 2619],
|
|
170
|
-
[2621, 2621],
|
|
171
|
-
[2627, 2630],
|
|
172
|
-
[2633, 2634],
|
|
173
|
-
[2638, 2640],
|
|
174
|
-
[2642, 2648],
|
|
175
|
-
[2653, 2653],
|
|
176
|
-
[2655, 2661],
|
|
177
|
-
[2679, 2688],
|
|
178
|
-
[2692, 2692],
|
|
179
|
-
[2702, 2702],
|
|
180
|
-
[2706, 2706],
|
|
181
|
-
[2729, 2729],
|
|
182
|
-
[2737, 2737],
|
|
183
|
-
[2740, 2740],
|
|
184
|
-
[2746, 2747],
|
|
185
|
-
[2758, 2758],
|
|
186
|
-
[2762, 2762],
|
|
187
|
-
[2766, 2767],
|
|
188
|
-
[2769, 2783],
|
|
189
|
-
[2788, 2789],
|
|
190
|
-
[2802, 2808],
|
|
191
|
-
[2816, 2816],
|
|
192
|
-
[2820, 2820],
|
|
193
|
-
[2829, 2830],
|
|
194
|
-
[2833, 2834],
|
|
195
|
-
[2857, 2857],
|
|
196
|
-
[2865, 2865],
|
|
197
|
-
[2868, 2868],
|
|
198
|
-
[2874, 2875],
|
|
199
|
-
[2885, 2886],
|
|
200
|
-
[2889, 2890],
|
|
201
|
-
[2894, 2900],
|
|
202
|
-
[2904, 2907],
|
|
203
|
-
[2910, 2910],
|
|
204
|
-
[2916, 2917],
|
|
205
|
-
[2936, 2945],
|
|
206
|
-
[2948, 2948],
|
|
207
|
-
[2955, 2957],
|
|
208
|
-
[2961, 2961],
|
|
209
|
-
[2966, 2968],
|
|
210
|
-
[2971, 2971],
|
|
211
|
-
[2973, 2973],
|
|
212
|
-
[2976, 2978],
|
|
213
|
-
[2981, 2983],
|
|
214
|
-
[2987, 2989],
|
|
215
|
-
[3002, 3005],
|
|
216
|
-
[3011, 3013],
|
|
217
|
-
[3017, 3017],
|
|
218
|
-
[3022, 3023],
|
|
219
|
-
[3025, 3030],
|
|
220
|
-
[3032, 3045],
|
|
221
|
-
[3067, 3071],
|
|
222
|
-
[3085, 3085],
|
|
223
|
-
[3089, 3089],
|
|
224
|
-
[3113, 3113],
|
|
225
|
-
[3130, 3131],
|
|
226
|
-
[3141, 3141],
|
|
227
|
-
[3145, 3145],
|
|
228
|
-
[3150, 3156],
|
|
229
|
-
[3159, 3159],
|
|
230
|
-
[3163, 3164],
|
|
231
|
-
[3166, 3167],
|
|
232
|
-
[3172, 3173],
|
|
233
|
-
[3184, 3190],
|
|
234
|
-
[3213, 3213],
|
|
235
|
-
[3217, 3217],
|
|
236
|
-
[3241, 3241],
|
|
237
|
-
[3252, 3252],
|
|
238
|
-
[3258, 3259],
|
|
239
|
-
[3269, 3269],
|
|
240
|
-
[3273, 3273],
|
|
241
|
-
[3278, 3284],
|
|
242
|
-
[3287, 3292],
|
|
243
|
-
[3295, 3295],
|
|
244
|
-
[3300, 3301],
|
|
245
|
-
[3312, 3312],
|
|
246
|
-
[3316, 3327],
|
|
247
|
-
[3341, 3341],
|
|
248
|
-
[3345, 3345],
|
|
249
|
-
[3397, 3397],
|
|
250
|
-
[3401, 3401],
|
|
251
|
-
[3408, 3411],
|
|
252
|
-
[3428, 3429],
|
|
253
|
-
[3456, 3456],
|
|
254
|
-
[3460, 3460],
|
|
255
|
-
[3479, 3481],
|
|
256
|
-
[3506, 3506],
|
|
257
|
-
[3516, 3516],
|
|
258
|
-
[3518, 3519],
|
|
259
|
-
[3527, 3529],
|
|
260
|
-
[3531, 3534],
|
|
261
|
-
[3541, 3541],
|
|
262
|
-
[3543, 3543],
|
|
263
|
-
[3552, 3557],
|
|
264
|
-
[3568, 3569],
|
|
265
|
-
[3573, 3584],
|
|
266
|
-
[3643, 3646],
|
|
267
|
-
[3676, 3712],
|
|
268
|
-
[3715, 3715],
|
|
269
|
-
[3717, 3717],
|
|
270
|
-
[3723, 3723],
|
|
271
|
-
[3748, 3748],
|
|
272
|
-
[3750, 3750],
|
|
273
|
-
[3774, 3775],
|
|
274
|
-
[3781, 3781],
|
|
275
|
-
[3783, 3783],
|
|
276
|
-
[3791, 3791],
|
|
277
|
-
[3802, 3803],
|
|
278
|
-
[3808, 3839],
|
|
279
|
-
[3912, 3912],
|
|
280
|
-
[3949, 3952],
|
|
281
|
-
[3992, 3992],
|
|
282
|
-
[4029, 4029],
|
|
283
|
-
[4045, 4045],
|
|
284
|
-
[4059, 4095],
|
|
285
|
-
[4294, 4294],
|
|
286
|
-
[4296, 4300],
|
|
287
|
-
[4302, 4303],
|
|
288
|
-
[4681, 4681],
|
|
289
|
-
[4686, 4687],
|
|
290
|
-
[4695, 4695],
|
|
291
|
-
[4697, 4697],
|
|
292
|
-
[4702, 4703],
|
|
293
|
-
[4745, 4745],
|
|
294
|
-
[4750, 4751],
|
|
295
|
-
[4785, 4785],
|
|
296
|
-
[4790, 4791],
|
|
297
|
-
[4799, 4799],
|
|
298
|
-
[4801, 4801],
|
|
299
|
-
[4806, 4807],
|
|
300
|
-
[4823, 4823],
|
|
301
|
-
[4881, 4881],
|
|
302
|
-
[4886, 4887],
|
|
303
|
-
[4955, 4956],
|
|
304
|
-
[4989, 4991],
|
|
305
|
-
[5018, 5023],
|
|
306
|
-
[5110, 5111],
|
|
307
|
-
[5118, 5119],
|
|
308
|
-
[5760, 5760],
|
|
309
|
-
[5789, 5791],
|
|
310
|
-
[5881, 5887],
|
|
311
|
-
[5910, 5918],
|
|
312
|
-
[5943, 5951],
|
|
313
|
-
[5972, 5983],
|
|
314
|
-
[5997, 5997],
|
|
315
|
-
[6001, 6001],
|
|
316
|
-
[6004, 6015],
|
|
317
|
-
[6110, 6111],
|
|
318
|
-
[6122, 6127],
|
|
319
|
-
[6138, 6143],
|
|
320
|
-
[6158, 6158],
|
|
321
|
-
[6170, 6175],
|
|
322
|
-
[6265, 6271],
|
|
323
|
-
[6315, 6319],
|
|
324
|
-
[6390, 6399],
|
|
325
|
-
[6431, 6431],
|
|
326
|
-
[6444, 6447],
|
|
327
|
-
[6460, 6463],
|
|
328
|
-
[6465, 6467],
|
|
329
|
-
[6510, 6511],
|
|
330
|
-
[6517, 6527],
|
|
331
|
-
[6572, 6575],
|
|
332
|
-
[6602, 6607],
|
|
333
|
-
[6619, 6621],
|
|
334
|
-
[6684, 6685],
|
|
335
|
-
[6751, 6751],
|
|
336
|
-
[6781, 6782],
|
|
337
|
-
[6794, 6799],
|
|
338
|
-
[6810, 6815],
|
|
339
|
-
[6830, 6831],
|
|
340
|
-
[6863, 6911],
|
|
341
|
-
[6989, 6989],
|
|
342
|
-
[7156, 7163],
|
|
343
|
-
[7224, 7226],
|
|
344
|
-
[7242, 7244],
|
|
345
|
-
[7307, 7311],
|
|
346
|
-
[7355, 7356],
|
|
347
|
-
[7368, 7375],
|
|
348
|
-
[7419, 7423],
|
|
349
|
-
[7958, 7959],
|
|
350
|
-
[7966, 7967],
|
|
351
|
-
[8006, 8007],
|
|
352
|
-
[8014, 8015],
|
|
353
|
-
[8024, 8024],
|
|
354
|
-
[8026, 8026],
|
|
355
|
-
[8028, 8028],
|
|
356
|
-
[8030, 8030],
|
|
357
|
-
[8062, 8063],
|
|
358
|
-
[8117, 8117],
|
|
359
|
-
[8133, 8133],
|
|
360
|
-
[8148, 8149],
|
|
361
|
-
[8156, 8156],
|
|
362
|
-
[8176, 8177],
|
|
363
|
-
[8181, 8181],
|
|
364
|
-
[8191, 8207],
|
|
365
|
-
[8232, 8239],
|
|
366
|
-
[8287, 8303],
|
|
367
|
-
[8306, 8307],
|
|
368
|
-
[8335, 8335],
|
|
369
|
-
[8349, 8351],
|
|
370
|
-
[8385, 8399],
|
|
371
|
-
[8433, 8447],
|
|
372
|
-
[8588, 8591],
|
|
373
|
-
[9258, 9279],
|
|
374
|
-
[9291, 9311],
|
|
375
|
-
[11124, 11125],
|
|
376
|
-
[11158, 11158],
|
|
377
|
-
[11508, 11512],
|
|
378
|
-
[11558, 11558],
|
|
379
|
-
[11560, 11564],
|
|
380
|
-
[11566, 11567],
|
|
381
|
-
[11624, 11630],
|
|
382
|
-
[11633, 11646],
|
|
383
|
-
[11671, 11679],
|
|
384
|
-
[11687, 11687],
|
|
385
|
-
[11695, 11695],
|
|
386
|
-
[11703, 11703],
|
|
387
|
-
[11711, 11711],
|
|
388
|
-
[11719, 11719],
|
|
389
|
-
[11727, 11727],
|
|
390
|
-
[11735, 11735],
|
|
391
|
-
[11743, 11743],
|
|
392
|
-
[11870, 11903],
|
|
393
|
-
[11930, 11930],
|
|
394
|
-
[12020, 12031],
|
|
395
|
-
[12246, 12271],
|
|
396
|
-
[12288, 12288],
|
|
397
|
-
[12352, 12352],
|
|
398
|
-
[12439, 12440],
|
|
399
|
-
[12544, 12548],
|
|
400
|
-
[12592, 12592],
|
|
401
|
-
[12687, 12687],
|
|
402
|
-
[12774, 12782],
|
|
403
|
-
[12831, 12831],
|
|
404
|
-
[42125, 42127],
|
|
405
|
-
[42183, 42191],
|
|
406
|
-
[42540, 42559],
|
|
407
|
-
[42744, 42751],
|
|
408
|
-
[42958, 42959],
|
|
409
|
-
[42962, 42962],
|
|
410
|
-
[42964, 42964],
|
|
411
|
-
[42973, 42993],
|
|
412
|
-
[43053, 43055],
|
|
413
|
-
[43066, 43071],
|
|
414
|
-
[43128, 43135],
|
|
415
|
-
[43206, 43213],
|
|
416
|
-
[43226, 43231],
|
|
417
|
-
[43348, 43358],
|
|
418
|
-
[43389, 43391],
|
|
419
|
-
[43470, 43470],
|
|
420
|
-
[43482, 43485],
|
|
421
|
-
[43519, 43519],
|
|
422
|
-
[43575, 43583],
|
|
423
|
-
[43598, 43599],
|
|
424
|
-
[43610, 43611],
|
|
425
|
-
[43715, 43738],
|
|
426
|
-
[43767, 43776],
|
|
427
|
-
[43783, 43784],
|
|
428
|
-
[43791, 43792],
|
|
429
|
-
[43799, 43807],
|
|
430
|
-
[43815, 43815],
|
|
431
|
-
[43823, 43823],
|
|
432
|
-
[43884, 43887],
|
|
433
|
-
[44014, 44015],
|
|
434
|
-
[44026, 44031],
|
|
435
|
-
[55204, 55215],
|
|
436
|
-
[55239, 55242],
|
|
437
|
-
[55292, 63743],
|
|
438
|
-
[64110, 64111],
|
|
439
|
-
[64218, 64255],
|
|
440
|
-
[64263, 64274],
|
|
441
|
-
[64280, 64284],
|
|
442
|
-
[64311, 64311],
|
|
443
|
-
[64317, 64317],
|
|
444
|
-
[64319, 64319],
|
|
445
|
-
[64322, 64322],
|
|
446
|
-
[64325, 64325],
|
|
447
|
-
[64451, 64466],
|
|
448
|
-
[64912, 64913],
|
|
449
|
-
[64968, 64974],
|
|
450
|
-
[64976, 65007],
|
|
451
|
-
[65050, 65055],
|
|
452
|
-
[65107, 65107],
|
|
453
|
-
[65127, 65127],
|
|
454
|
-
[65132, 65135],
|
|
455
|
-
[65141, 65141],
|
|
456
|
-
[65277, 65280],
|
|
457
|
-
[65471, 65473],
|
|
458
|
-
[65480, 65481],
|
|
459
|
-
[65488, 65489],
|
|
460
|
-
[65496, 65497],
|
|
461
|
-
[65501, 65503],
|
|
462
|
-
[65511, 65511],
|
|
463
|
-
[65519, 65531],
|
|
464
|
-
[65534, 65535],
|
|
465
|
-
[65548, 65548],
|
|
466
|
-
[65575, 65575],
|
|
467
|
-
[65595, 65595],
|
|
468
|
-
[65598, 65598],
|
|
469
|
-
[65614, 65615],
|
|
470
|
-
[65630, 65663],
|
|
471
|
-
[65787, 65791],
|
|
472
|
-
[65795, 65798],
|
|
473
|
-
[65844, 65846],
|
|
474
|
-
[65935, 65935],
|
|
475
|
-
[65949, 65951],
|
|
476
|
-
[65953, 65999],
|
|
477
|
-
[66046, 66175],
|
|
478
|
-
[66205, 66207],
|
|
479
|
-
[66257, 66271],
|
|
480
|
-
[66300, 66303],
|
|
481
|
-
[66340, 66348],
|
|
482
|
-
[66379, 66383],
|
|
483
|
-
[66427, 66431],
|
|
484
|
-
[66462, 66462],
|
|
485
|
-
[66500, 66503],
|
|
486
|
-
[66518, 66559],
|
|
487
|
-
[66718, 66719],
|
|
488
|
-
[66730, 66735],
|
|
489
|
-
[66772, 66775],
|
|
490
|
-
[66812, 66815],
|
|
491
|
-
[66856, 66863],
|
|
492
|
-
[66916, 66926],
|
|
493
|
-
[66939, 66939],
|
|
494
|
-
[66955, 66955],
|
|
495
|
-
[66963, 66963],
|
|
496
|
-
[66966, 66966],
|
|
497
|
-
[66978, 66978],
|
|
498
|
-
[66994, 66994],
|
|
499
|
-
[67002, 67002],
|
|
500
|
-
[67005, 67007],
|
|
501
|
-
[67060, 67071],
|
|
502
|
-
[67383, 67391],
|
|
503
|
-
[67414, 67423],
|
|
504
|
-
[67432, 67455],
|
|
505
|
-
[67462, 67462],
|
|
506
|
-
[67505, 67505],
|
|
507
|
-
[67515, 67583],
|
|
508
|
-
[67590, 67591],
|
|
509
|
-
[67593, 67593],
|
|
510
|
-
[67638, 67638],
|
|
511
|
-
[67641, 67643],
|
|
512
|
-
[67645, 67646],
|
|
513
|
-
[67670, 67670],
|
|
514
|
-
[67743, 67750],
|
|
515
|
-
[67760, 67807],
|
|
516
|
-
[67827, 67827],
|
|
517
|
-
[67830, 67834],
|
|
518
|
-
[67868, 67870],
|
|
519
|
-
[67898, 67902],
|
|
520
|
-
[67904, 67967],
|
|
521
|
-
[68024, 68027],
|
|
522
|
-
[68048, 68049],
|
|
523
|
-
[68100, 68100],
|
|
524
|
-
[68103, 68107],
|
|
525
|
-
[68116, 68116],
|
|
526
|
-
[68120, 68120],
|
|
527
|
-
[68150, 68151],
|
|
528
|
-
[68155, 68158],
|
|
529
|
-
[68169, 68175],
|
|
530
|
-
[68185, 68191],
|
|
531
|
-
[68256, 68287],
|
|
532
|
-
[68327, 68330],
|
|
533
|
-
[68343, 68351],
|
|
534
|
-
[68406, 68408],
|
|
535
|
-
[68438, 68439],
|
|
536
|
-
[68467, 68471],
|
|
537
|
-
[68498, 68504],
|
|
538
|
-
[68509, 68520],
|
|
539
|
-
[68528, 68607],
|
|
540
|
-
[68681, 68735],
|
|
541
|
-
[68787, 68799],
|
|
542
|
-
[68851, 68857],
|
|
543
|
-
[68904, 68911],
|
|
544
|
-
[68922, 68927],
|
|
545
|
-
[68966, 68968],
|
|
546
|
-
[68998, 69005],
|
|
547
|
-
[69008, 69215],
|
|
548
|
-
[69247, 69247],
|
|
549
|
-
[69290, 69290],
|
|
550
|
-
[69294, 69295],
|
|
551
|
-
[69298, 69313],
|
|
552
|
-
[69317, 69371],
|
|
553
|
-
[69416, 69423],
|
|
554
|
-
[69466, 69487],
|
|
555
|
-
[69514, 69551],
|
|
556
|
-
[69580, 69599],
|
|
557
|
-
[69623, 69631],
|
|
558
|
-
[69710, 69713],
|
|
559
|
-
[69750, 69758],
|
|
560
|
-
[69821, 69821],
|
|
561
|
-
[69827, 69839],
|
|
562
|
-
[69865, 69871],
|
|
563
|
-
[69882, 69887],
|
|
564
|
-
[69941, 69941],
|
|
565
|
-
[69960, 69967],
|
|
566
|
-
[70007, 70015],
|
|
567
|
-
[70112, 70112],
|
|
568
|
-
[70133, 70143],
|
|
569
|
-
[70162, 70162],
|
|
570
|
-
[70210, 70271],
|
|
571
|
-
[70279, 70279],
|
|
572
|
-
[70281, 70281],
|
|
573
|
-
[70286, 70286],
|
|
574
|
-
[70302, 70302],
|
|
575
|
-
[70314, 70319],
|
|
576
|
-
[70379, 70383],
|
|
577
|
-
[70394, 70399],
|
|
578
|
-
[70404, 70404],
|
|
579
|
-
[70413, 70414],
|
|
580
|
-
[70417, 70418],
|
|
581
|
-
[70441, 70441],
|
|
582
|
-
[70449, 70449],
|
|
583
|
-
[70452, 70452],
|
|
584
|
-
[70458, 70458],
|
|
585
|
-
[70469, 70470],
|
|
586
|
-
[70473, 70474],
|
|
587
|
-
[70478, 70479],
|
|
588
|
-
[70481, 70486],
|
|
589
|
-
[70488, 70492],
|
|
590
|
-
[70500, 70501],
|
|
591
|
-
[70509, 70511],
|
|
592
|
-
[70517, 70527],
|
|
593
|
-
[70538, 70538],
|
|
594
|
-
[70540, 70541],
|
|
595
|
-
[70543, 70543],
|
|
596
|
-
[70582, 70582],
|
|
597
|
-
[70593, 70593],
|
|
598
|
-
[70595, 70596],
|
|
599
|
-
[70598, 70598],
|
|
600
|
-
[70603, 70603],
|
|
601
|
-
[70614, 70614],
|
|
602
|
-
[70617, 70624],
|
|
603
|
-
[70627, 70655],
|
|
604
|
-
[70748, 70748],
|
|
605
|
-
[70754, 70783],
|
|
606
|
-
[70856, 70863],
|
|
607
|
-
[70874, 71039],
|
|
608
|
-
[71094, 71095],
|
|
609
|
-
[71134, 71167],
|
|
610
|
-
[71237, 71247],
|
|
611
|
-
[71258, 71263],
|
|
612
|
-
[71277, 71295],
|
|
613
|
-
[71354, 71359],
|
|
614
|
-
[71370, 71375],
|
|
615
|
-
[71396, 71423],
|
|
616
|
-
[71451, 71452],
|
|
617
|
-
[71468, 71471],
|
|
618
|
-
[71495, 71679],
|
|
619
|
-
[71740, 71839],
|
|
620
|
-
[71923, 71934],
|
|
621
|
-
[71943, 71944],
|
|
622
|
-
[71946, 71947],
|
|
623
|
-
[71956, 71956],
|
|
624
|
-
[71959, 71959],
|
|
625
|
-
[71990, 71990],
|
|
626
|
-
[71993, 71994],
|
|
627
|
-
[72007, 72015],
|
|
628
|
-
[72026, 72095],
|
|
629
|
-
[72104, 72105],
|
|
630
|
-
[72152, 72153],
|
|
631
|
-
[72165, 72191],
|
|
632
|
-
[72264, 72271],
|
|
633
|
-
[72355, 72367],
|
|
634
|
-
[72441, 72447],
|
|
635
|
-
[72458, 72639],
|
|
636
|
-
[72674, 72687],
|
|
637
|
-
[72698, 72703],
|
|
638
|
-
[72713, 72713],
|
|
639
|
-
[72759, 72759],
|
|
640
|
-
[72774, 72783],
|
|
641
|
-
[72813, 72815],
|
|
642
|
-
[72848, 72849],
|
|
643
|
-
[72872, 72872],
|
|
644
|
-
[72887, 72959],
|
|
645
|
-
[72967, 72967],
|
|
646
|
-
[72970, 72970],
|
|
647
|
-
[73015, 73017],
|
|
648
|
-
[73019, 73019],
|
|
649
|
-
[73022, 73022],
|
|
650
|
-
[73032, 73039],
|
|
651
|
-
[73050, 73055],
|
|
652
|
-
[73062, 73062],
|
|
653
|
-
[73065, 73065],
|
|
654
|
-
[73103, 73103],
|
|
655
|
-
[73106, 73106],
|
|
656
|
-
[73113, 73119],
|
|
657
|
-
[73130, 73439],
|
|
658
|
-
[73465, 73471],
|
|
659
|
-
[73489, 73489],
|
|
660
|
-
[73531, 73533],
|
|
661
|
-
[73563, 73647],
|
|
662
|
-
[73649, 73663],
|
|
663
|
-
[73714, 73726],
|
|
664
|
-
[74650, 74751],
|
|
665
|
-
[74863, 74863],
|
|
666
|
-
[74869, 74879],
|
|
667
|
-
[75076, 77711],
|
|
668
|
-
[77811, 77823],
|
|
669
|
-
[78896, 78911],
|
|
670
|
-
[78934, 78943],
|
|
671
|
-
[82939, 82943],
|
|
672
|
-
[83527, 90367],
|
|
673
|
-
[90426, 92159],
|
|
674
|
-
[92729, 92735],
|
|
675
|
-
[92767, 92767],
|
|
676
|
-
[92778, 92781],
|
|
677
|
-
[92863, 92863],
|
|
678
|
-
[92874, 92879],
|
|
679
|
-
[92910, 92911],
|
|
680
|
-
[92918, 92927],
|
|
681
|
-
[92998, 93007],
|
|
682
|
-
[93018, 93018],
|
|
683
|
-
[93026, 93026],
|
|
684
|
-
[93048, 93052],
|
|
685
|
-
[93072, 93503],
|
|
686
|
-
[93562, 93759],
|
|
687
|
-
[93851, 93951],
|
|
688
|
-
[94027, 94030],
|
|
689
|
-
[94088, 94094],
|
|
690
|
-
[94112, 94175],
|
|
691
|
-
[94181, 94191],
|
|
692
|
-
[94194, 94207],
|
|
693
|
-
[100344, 100351],
|
|
694
|
-
[101590, 101630],
|
|
695
|
-
[101641, 110575],
|
|
696
|
-
[110580, 110580],
|
|
697
|
-
[110588, 110588],
|
|
698
|
-
[110591, 110591],
|
|
699
|
-
[110883, 110897],
|
|
700
|
-
[110899, 110927],
|
|
701
|
-
[110931, 110932],
|
|
702
|
-
[110934, 110947],
|
|
703
|
-
[110952, 110959],
|
|
704
|
-
[111356, 113663],
|
|
705
|
-
[113771, 113775],
|
|
706
|
-
[113789, 113791],
|
|
707
|
-
[113801, 113807],
|
|
708
|
-
[113818, 113819],
|
|
709
|
-
[113824, 117759],
|
|
710
|
-
[118010, 118015],
|
|
711
|
-
[118452, 118527],
|
|
712
|
-
[118574, 118575],
|
|
713
|
-
[118599, 118607],
|
|
714
|
-
[118724, 118783],
|
|
715
|
-
[119030, 119039],
|
|
716
|
-
[119079, 119080],
|
|
717
|
-
[119155, 119162],
|
|
718
|
-
[119275, 119295],
|
|
719
|
-
[119366, 119487],
|
|
720
|
-
[119508, 119519],
|
|
721
|
-
[119540, 119551],
|
|
722
|
-
[119639, 119647],
|
|
723
|
-
[119673, 119807],
|
|
724
|
-
[119893, 119893],
|
|
725
|
-
[119965, 119965],
|
|
726
|
-
[119968, 119969],
|
|
727
|
-
[119971, 119972],
|
|
728
|
-
[119975, 119976],
|
|
729
|
-
[119981, 119981],
|
|
730
|
-
[119994, 119994],
|
|
731
|
-
[119996, 119996],
|
|
732
|
-
[120004, 120004],
|
|
733
|
-
[120070, 120070],
|
|
734
|
-
[120075, 120076],
|
|
735
|
-
[120085, 120085],
|
|
736
|
-
[120093, 120093],
|
|
737
|
-
[120122, 120122],
|
|
738
|
-
[120127, 120127],
|
|
739
|
-
[120133, 120133],
|
|
740
|
-
[120135, 120137],
|
|
741
|
-
[120145, 120145],
|
|
742
|
-
[120486, 120487],
|
|
743
|
-
[120780, 120781],
|
|
744
|
-
[121484, 121498],
|
|
745
|
-
[121504, 121504],
|
|
746
|
-
[121520, 122623],
|
|
747
|
-
[122655, 122660],
|
|
748
|
-
[122667, 122879],
|
|
749
|
-
[122887, 122887],
|
|
750
|
-
[122905, 122906],
|
|
751
|
-
[122914, 122914],
|
|
752
|
-
[122917, 122917],
|
|
753
|
-
[122923, 122927],
|
|
754
|
-
[122990, 123022],
|
|
755
|
-
[123024, 123135],
|
|
756
|
-
[123181, 123183],
|
|
757
|
-
[123198, 123199],
|
|
758
|
-
[123210, 123213],
|
|
759
|
-
[123216, 123535],
|
|
760
|
-
[123567, 123583],
|
|
761
|
-
[123642, 123646],
|
|
762
|
-
[123648, 124111],
|
|
763
|
-
[124154, 124367],
|
|
764
|
-
[124411, 124414],
|
|
765
|
-
[124416, 124895],
|
|
766
|
-
[124903, 124903],
|
|
767
|
-
[124908, 124908],
|
|
768
|
-
[124911, 124911],
|
|
769
|
-
[124927, 124927],
|
|
770
|
-
[125125, 125126],
|
|
771
|
-
[125143, 125183],
|
|
772
|
-
[125260, 125263],
|
|
773
|
-
[125274, 125277],
|
|
774
|
-
[125280, 126064],
|
|
775
|
-
[126133, 126208],
|
|
776
|
-
[126270, 126463],
|
|
777
|
-
[126468, 126468],
|
|
778
|
-
[126496, 126496],
|
|
779
|
-
[126499, 126499],
|
|
780
|
-
[126501, 126502],
|
|
781
|
-
[126504, 126504],
|
|
782
|
-
[126515, 126515],
|
|
783
|
-
[126520, 126520],
|
|
784
|
-
[126522, 126522],
|
|
785
|
-
[126524, 126529],
|
|
786
|
-
[126531, 126534],
|
|
787
|
-
[126536, 126536],
|
|
788
|
-
[126538, 126538],
|
|
789
|
-
[126540, 126540],
|
|
790
|
-
[126544, 126544],
|
|
791
|
-
[126547, 126547],
|
|
792
|
-
[126549, 126550],
|
|
793
|
-
[126552, 126552],
|
|
794
|
-
[126554, 126554],
|
|
795
|
-
[126556, 126556],
|
|
796
|
-
[126558, 126558],
|
|
797
|
-
[126560, 126560],
|
|
798
|
-
[126563, 126563],
|
|
799
|
-
[126565, 126566],
|
|
800
|
-
[126571, 126571],
|
|
801
|
-
[126579, 126579],
|
|
802
|
-
[126584, 126584],
|
|
803
|
-
[126589, 126589],
|
|
804
|
-
[126591, 126591],
|
|
805
|
-
[126602, 126602],
|
|
806
|
-
[126620, 126624],
|
|
807
|
-
[126628, 126628],
|
|
808
|
-
[126634, 126634],
|
|
809
|
-
[126652, 126703],
|
|
810
|
-
[126706, 126975],
|
|
811
|
-
[127020, 127023],
|
|
812
|
-
[127124, 127135],
|
|
813
|
-
[127151, 127152],
|
|
814
|
-
[127168, 127168],
|
|
815
|
-
[127184, 127184],
|
|
816
|
-
[127222, 127231],
|
|
817
|
-
[127406, 127461],
|
|
818
|
-
[127491, 127503],
|
|
819
|
-
[127548, 127551],
|
|
820
|
-
[127561, 127567],
|
|
821
|
-
[127570, 127583],
|
|
822
|
-
[127590, 127743],
|
|
823
|
-
[128728, 128731],
|
|
824
|
-
[128749, 128751],
|
|
825
|
-
[128765, 128767],
|
|
826
|
-
[128887, 128890],
|
|
827
|
-
[128986, 128991],
|
|
828
|
-
[129004, 129007],
|
|
829
|
-
[129009, 129023],
|
|
830
|
-
[129036, 129039],
|
|
831
|
-
[129096, 129103],
|
|
832
|
-
[129114, 129119],
|
|
833
|
-
[129160, 129167],
|
|
834
|
-
[129198, 129199],
|
|
835
|
-
[129212, 129215],
|
|
836
|
-
[129218, 129279],
|
|
837
|
-
[129620, 129631],
|
|
838
|
-
[129646, 129647],
|
|
839
|
-
[129661, 129663],
|
|
840
|
-
[129674, 129678],
|
|
841
|
-
[129735, 129741],
|
|
842
|
-
[129757, 129758],
|
|
843
|
-
[129770, 129775],
|
|
844
|
-
[129785, 129791],
|
|
845
|
-
[129939, 129939],
|
|
846
|
-
[130042, 131071],
|
|
847
|
-
[173792, 173823],
|
|
848
|
-
[177978, 177983],
|
|
849
|
-
[178206, 178207],
|
|
850
|
-
[183970, 183983],
|
|
851
|
-
[191457, 191471],
|
|
852
|
-
[192094, 194559],
|
|
853
|
-
[195102, 196607],
|
|
854
|
-
[201547, 201551],
|
|
855
|
-
[205744, 917759],
|
|
856
|
-
[918e3, 1114111]
|
|
857
|
-
];
|
|
858
|
-
|
|
859
|
-
// packages/safe-bash-command-csvkit/dist/cli/parser.js
|
|
860
|
-
init_buffer();
|
|
861
|
-
|
|
862
|
-
// packages/safe-bash-command-csvkit/dist/match-files.js
|
|
863
|
-
init_buffer();
|
|
864
|
-
var MatchFileScope = class {
|
|
865
|
-
#admissions = [];
|
|
866
|
-
#closing;
|
|
867
|
-
#closes = /* @__PURE__ */ new Map();
|
|
868
|
-
#closed = false;
|
|
869
|
-
get closed() {
|
|
870
|
-
return this.#closed;
|
|
871
|
-
}
|
|
872
|
-
acquire(factory) {
|
|
873
|
-
if (this.#closed)
|
|
874
|
-
throw new TypeError("match-file scope closed");
|
|
875
|
-
const pending = Promise.resolve().then(factory);
|
|
876
|
-
this.#admissions.push(pending);
|
|
877
|
-
return pending;
|
|
878
|
-
}
|
|
879
|
-
close(file) {
|
|
880
|
-
let closing = this.#closes.get(file);
|
|
881
|
-
if (!closing) {
|
|
882
|
-
closing = Promise.resolve().then(() => file.close());
|
|
883
|
-
this.#closes.set(file, closing);
|
|
884
|
-
}
|
|
885
|
-
return closing;
|
|
886
|
-
}
|
|
887
|
-
dispose = () => {
|
|
888
|
-
this.#closed = true;
|
|
889
|
-
this.#closing ??= Promise.allSettled(this.#admissions).then(async (admissions) => {
|
|
890
|
-
const files = admissions.flatMap((admission) => admission.status === "fulfilled" ? [admission.value] : []);
|
|
891
|
-
const results = await Promise.allSettled(files.map((file) => this.close(file)));
|
|
892
|
-
const failures = results.flatMap((result) => result.status === "rejected" ? [result.reason] : []);
|
|
893
|
-
if (failures.length)
|
|
894
|
-
throw new AggregateError(failures, "match-file cleanup failed");
|
|
895
|
-
});
|
|
896
|
-
return this.#closing;
|
|
897
|
-
};
|
|
898
|
-
};
|
|
899
|
-
|
|
900
|
-
// packages/safe-bash-command-csvkit/dist/cli/parser.js
|
|
901
|
-
function repr(value) {
|
|
902
|
-
const quote = value.includes("'") && !value.includes('"') ? '"' : "'";
|
|
903
|
-
let text2 = quote;
|
|
904
|
-
for (const char of value) {
|
|
905
|
-
if (char === quote || char === "\\")
|
|
906
|
-
text2 += "\\" + char;
|
|
907
|
-
else if (char === "\n")
|
|
908
|
-
text2 += "\\n";
|
|
909
|
-
else if (char === "\r")
|
|
910
|
-
text2 += "\\r";
|
|
911
|
-
else if (char === " ")
|
|
912
|
-
text2 += "\\t";
|
|
913
|
-
else {
|
|
914
|
-
const codepoint = char.codePointAt(0);
|
|
915
|
-
if (nonprintingRanges.some(([start, end]) => codepoint >= start && codepoint <= end)) {
|
|
916
|
-
const width = codepoint <= 255 ? 2 : codepoint <= 65535 ? 4 : 8;
|
|
917
|
-
text2 += "\\" + (width === 2 ? "x" : width === 4 ? "u" : "U") + codepoint.toString(16).padStart(width, "0");
|
|
918
|
-
} else
|
|
919
|
-
text2 += char;
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
return text2 + quote;
|
|
923
|
-
}
|
|
924
|
-
function integer(text2, maxDigits = 4300) {
|
|
925
|
-
const characters = Array.from(text2);
|
|
926
|
-
let start = 0;
|
|
927
|
-
let end = characters.length;
|
|
928
|
-
while (start < end && integerWhitespace.includes(characters[start].codePointAt(0)))
|
|
929
|
-
start++;
|
|
930
|
-
while (end > start && integerWhitespace.includes(characters[end - 1].codePointAt(0)))
|
|
931
|
-
end--;
|
|
932
|
-
const value = characters.slice(start, end).join("");
|
|
933
|
-
let offset2 = value[0] === "+" || value[0] === "-" ? 1 : 0;
|
|
934
|
-
let digits2 = "";
|
|
935
|
-
let previousDigit = false;
|
|
936
|
-
const payload = Array.from(value.slice(offset2));
|
|
937
|
-
for (offset2 = 0; offset2 < payload.length; offset2++) {
|
|
938
|
-
const char = payload[offset2];
|
|
939
|
-
const codepoint = char.codePointAt(0);
|
|
940
|
-
const zero = decimalZeroes.find((zero2) => codepoint >= zero2 && codepoint <= zero2 + 9);
|
|
941
|
-
if (zero !== void 0) {
|
|
942
|
-
digits2 += String(codepoint - zero);
|
|
943
|
-
previousDigit = true;
|
|
944
|
-
} else if (char === "_" && previousDigit && offset2 + 1 < payload.length)
|
|
945
|
-
previousDigit = false;
|
|
946
|
-
else
|
|
947
|
-
return void 0;
|
|
948
|
-
}
|
|
949
|
-
if (!digits2 || !previousDigit || digits2.length > maxDigits)
|
|
950
|
-
return void 0;
|
|
951
|
-
const big = BigInt((value[0] === "-" ? "-" : "") + digits2);
|
|
952
|
-
const number2 = Number(big);
|
|
953
|
-
return Number.isSafeInteger(number2) ? number2 : big;
|
|
954
|
-
}
|
|
955
|
-
function negativeNumber(text2) {
|
|
956
|
-
if (!text2.startsWith("-") || text2.length === 1)
|
|
957
|
-
return false;
|
|
958
|
-
const first = Array.from(text2.slice(text2[1] === "." ? 2 : 1))[0];
|
|
959
|
-
if (first === void 0)
|
|
960
|
-
return false;
|
|
961
|
-
const point = first.codePointAt(0);
|
|
962
|
-
return decimalZeroes.some((zero) => point >= zero && point <= zero + 9);
|
|
963
|
-
}
|
|
964
|
-
function decodeArgument(bytes) {
|
|
965
|
-
let result = "";
|
|
966
|
-
for (let index = 0; index < bytes.length; ) {
|
|
967
|
-
const first = bytes[index];
|
|
968
|
-
if (first < 128) {
|
|
969
|
-
result += String.fromCharCode(first);
|
|
970
|
-
index++;
|
|
971
|
-
continue;
|
|
972
|
-
}
|
|
973
|
-
const width = first >= 194 && first <= 223 ? 2 : first >= 224 && first <= 239 ? 3 : first >= 240 && first <= 244 ? 4 : 0;
|
|
974
|
-
let valid2 = width !== 0 && index + width <= bytes.length;
|
|
975
|
-
let point = first & (width === 2 ? 31 : width === 3 ? 15 : 7);
|
|
976
|
-
for (let offset2 = 1; valid2 && offset2 < width; offset2++) {
|
|
977
|
-
const byte = bytes[index + offset2];
|
|
978
|
-
valid2 = byte >= 128 && byte <= 191;
|
|
979
|
-
if (offset2 === 1) {
|
|
980
|
-
if (first === 224 && byte < 160 || first === 237 && byte >= 160 || first === 240 && byte < 144 || first === 244 && byte >= 144)
|
|
981
|
-
valid2 = false;
|
|
982
|
-
}
|
|
983
|
-
point = point << 6 | byte & 63;
|
|
984
|
-
}
|
|
985
|
-
if (valid2) {
|
|
986
|
-
result += String.fromCodePoint(point);
|
|
987
|
-
index += width;
|
|
988
|
-
} else {
|
|
989
|
-
result += String.fromCharCode(56320 + first);
|
|
990
|
-
index++;
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
return result;
|
|
994
|
-
}
|
|
995
|
-
async function disposeAfterParse(files, signal, escapingFailure) {
|
|
996
|
-
try {
|
|
997
|
-
await files.dispose();
|
|
998
|
-
} catch (cleanupFailure) {
|
|
999
|
-
signal?.throwIfAborted();
|
|
1000
|
-
if (!escapingFailure)
|
|
1001
|
-
throw cleanupFailure;
|
|
1002
|
-
}
|
|
1003
|
-
signal?.throwIfAborted();
|
|
1004
|
-
}
|
|
1005
|
-
async function parseArguments(command, input, context) {
|
|
1006
|
-
context.signal?.throwIfAborted();
|
|
1007
|
-
const descriptor = commands.find((item) => item.name === command);
|
|
1008
|
-
if (!descriptor)
|
|
1009
|
-
throw new TypeError(`Unknown csvkit executable: ${command}`);
|
|
1010
|
-
const owned = new OwnedArguments(input, context.limits);
|
|
1011
|
-
const args = Array.from({ length: owned.length }, (_, index) => decodeArgument(owned.bytes(index)));
|
|
1012
|
-
const options = commandDefaults(descriptor, context.env);
|
|
1013
|
-
const flags = /* @__PURE__ */ new Map();
|
|
1014
|
-
for (const action of descriptor.actions)
|
|
1015
|
-
for (const flag of action.optionStrings)
|
|
1016
|
-
flags.set(flag, action);
|
|
1017
|
-
const positional = descriptor.actions.filter((action) => action.optionStrings.length === 0);
|
|
1018
|
-
const extras = [];
|
|
1019
|
-
let positionalIndex = 0;
|
|
1020
|
-
let terminated = false;
|
|
1021
|
-
const error = (message) => ({ kind: "exit", status: 2, stdout: "", stderr: descriptor.usage + command + ": error: " + message + "\n" });
|
|
1022
|
-
const optional = (arg) => {
|
|
1023
|
-
if (terminated || arg.length < 2 || !arg.startsWith("-"))
|
|
1024
|
-
return false;
|
|
1025
|
-
const flag = arg.split("=", 1)[0];
|
|
1026
|
-
if (flags.has(flag) || (arg.startsWith("--") ? [...flags.keys()].some((candidate) => candidate.startsWith(flag)) : flags.has(arg.slice(0, 2))))
|
|
1027
|
-
return true;
|
|
1028
|
-
return !negativeNumber(arg) && !arg.includes(" ");
|
|
1029
|
-
};
|
|
1030
|
-
const label = (action) => action.optionStrings.join("/") || action.dest;
|
|
1031
|
-
const files = new MatchFileScope();
|
|
1032
|
-
context.registerCleanup?.(files.dispose);
|
|
1033
|
-
let transferred = false;
|
|
1034
|
-
let escapingFailure = false;
|
|
1035
|
-
const convert2 = async (action, text2) => {
|
|
1036
|
-
if (action.type === "builtins.int") {
|
|
1037
|
-
if (action.dest === "field_size_limit" && text2 === "Infinity")
|
|
1038
|
-
return Infinity;
|
|
1039
|
-
const value = integer(text2);
|
|
1040
|
-
if (value === void 0)
|
|
1041
|
-
return error(`argument ${label(action)}: invalid int value: ${repr(text2)}`);
|
|
1042
|
-
if (action.choices && !action.choices.includes(value)) {
|
|
1043
|
-
return error(`argument ${label(action)}: invalid choice: ${repr(String(value))} (choose from ${action.choices.join(", ")})`);
|
|
1044
|
-
}
|
|
1045
|
-
return value;
|
|
1046
|
-
}
|
|
1047
|
-
if (action.choices && !action.choices.includes(text2)) {
|
|
1048
|
-
return error(`argument ${label(action)}: invalid choice: ${repr(text2)} (choose from ${action.choices.join(", ")})`);
|
|
1049
|
-
}
|
|
1050
|
-
if (action.type?.startsWith("FileType(")) {
|
|
1051
|
-
if (!context.openMatchFile)
|
|
1052
|
-
throw new CsvkitBlocked("csvgrep match-file opening capability");
|
|
1053
|
-
try {
|
|
1054
|
-
const file = await files.acquire(() => context.openMatchFile(text2));
|
|
1055
|
-
context.signal?.throwIfAborted();
|
|
1056
|
-
if (files.closed)
|
|
1057
|
-
throw new TypeError("match-file scope closed");
|
|
1058
|
-
return file;
|
|
1059
|
-
} catch (failure) {
|
|
1060
|
-
context.signal?.throwIfAborted();
|
|
1061
|
-
if (files.closed)
|
|
1062
|
-
throw failure;
|
|
1063
|
-
return error(`argument ${label(action)}: can't open ${repr(text2)}: ${failure instanceof Error ? failure.message : String(failure)}`);
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
1066
|
-
return text2;
|
|
1067
|
-
};
|
|
1068
|
-
const isExit = (value) => typeof value === "object" && value !== null && "kind" in value && value.kind === "exit";
|
|
1069
|
-
try {
|
|
1070
|
-
for (let index = 0; index < args.length; index++) {
|
|
1071
|
-
context.signal?.throwIfAborted();
|
|
1072
|
-
const token = args[index];
|
|
1073
|
-
if (token === "--" && !terminated) {
|
|
1074
|
-
terminated = true;
|
|
1075
|
-
if (!positional[positionalIndex])
|
|
1076
|
-
extras.push(token);
|
|
1077
|
-
continue;
|
|
1078
|
-
}
|
|
1079
|
-
if (!optional(token)) {
|
|
1080
|
-
const action2 = positional[positionalIndex];
|
|
1081
|
-
if (!action2) {
|
|
1082
|
-
extras.push(token);
|
|
1083
|
-
continue;
|
|
1084
|
-
}
|
|
1085
|
-
if (action2.nargs === "*") {
|
|
1086
|
-
const values = [token];
|
|
1087
|
-
while (index + 1 < args.length) {
|
|
1088
|
-
if (!terminated && args[index + 1] === "--") {
|
|
1089
|
-
terminated = true;
|
|
1090
|
-
index++;
|
|
1091
|
-
continue;
|
|
1092
|
-
}
|
|
1093
|
-
if (optional(args[index + 1]))
|
|
1094
|
-
break;
|
|
1095
|
-
values.push(args[++index]);
|
|
1096
|
-
}
|
|
1097
|
-
options[action2.dest] = values;
|
|
1098
|
-
} else {
|
|
1099
|
-
options[action2.dest] = token;
|
|
1100
|
-
if (!terminated && args[index + 1] === "--") {
|
|
1101
|
-
terminated = true;
|
|
1102
|
-
index++;
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
positionalIndex++;
|
|
1106
|
-
continue;
|
|
1107
|
-
}
|
|
1108
|
-
const equal = token.indexOf("=");
|
|
1109
|
-
let flag = equal === -1 ? token : token.slice(0, equal);
|
|
1110
|
-
let explicit = equal === -1 ? void 0 : token.slice(equal + 1);
|
|
1111
|
-
let equalsSeparator = equal !== -1;
|
|
1112
|
-
let action = flags.get(flag);
|
|
1113
|
-
if (!action && token.startsWith("--")) {
|
|
1114
|
-
const matches = [...flags.keys()].filter((candidate) => candidate.startsWith(flag));
|
|
1115
|
-
if (matches.length > 1)
|
|
1116
|
-
return error(`ambiguous option: ${token} could match ${matches.join(", ")}`);
|
|
1117
|
-
if (matches.length === 1) {
|
|
1118
|
-
flag = matches[0];
|
|
1119
|
-
action = flags.get(flag);
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
if (!action && !token.startsWith("--")) {
|
|
1123
|
-
flag = token.slice(0, 2);
|
|
1124
|
-
action = flags.get(flag);
|
|
1125
|
-
if (action) {
|
|
1126
|
-
explicit = token.slice(2) || void 0;
|
|
1127
|
-
equalsSeparator = false;
|
|
1128
|
-
}
|
|
1129
|
-
}
|
|
1130
|
-
if (!action) {
|
|
1131
|
-
extras.push(token);
|
|
1132
|
-
continue;
|
|
1133
|
-
}
|
|
1134
|
-
for (; ; ) {
|
|
1135
|
-
if (action.nargs === 0 && explicit !== void 0 && (token.startsWith("--") || equalsSeparator)) {
|
|
1136
|
-
return error(`argument ${label(action)}: ignored explicit argument ${repr(explicit)}`);
|
|
1137
|
-
}
|
|
1138
|
-
if (action.action === "_HelpAction")
|
|
1139
|
-
return { kind: "exit", status: 0, stdout: descriptor.help, stderr: "" };
|
|
1140
|
-
if (action.action === "_VersionAction")
|
|
1141
|
-
return { kind: "exit", status: 0, stdout: `${command} 2.2.0
|
|
1142
|
-
`, stderr: "" };
|
|
1143
|
-
if (action.nargs === 0) {
|
|
1144
|
-
options[action.dest] = action.const;
|
|
1145
|
-
if (explicit !== void 0) {
|
|
1146
|
-
if (token.startsWith("--") || equalsSeparator || explicit.startsWith("-"))
|
|
1147
|
-
return error(`argument ${label(action)}: ignored explicit argument ${repr(explicit)}`);
|
|
1148
|
-
const nextFlag = "-" + explicit[0];
|
|
1149
|
-
const nextAction = flags.get(nextFlag);
|
|
1150
|
-
if (!nextAction) {
|
|
1151
|
-
extras.push("-" + explicit);
|
|
1152
|
-
break;
|
|
1153
|
-
}
|
|
1154
|
-
action = nextAction;
|
|
1155
|
-
const remainder = explicit.slice(1);
|
|
1156
|
-
equalsSeparator = remainder.startsWith("=");
|
|
1157
|
-
explicit = equalsSeparator ? remainder.slice(1) : remainder || void 0;
|
|
1158
|
-
continue;
|
|
1159
|
-
}
|
|
1160
|
-
break;
|
|
1161
|
-
}
|
|
1162
|
-
const count = action.nargs === "+" ? void 0 : typeof action.nargs === "number" ? action.nargs : 1;
|
|
1163
|
-
if (explicit !== void 0 && count !== void 0 && count > 1)
|
|
1164
|
-
return error(`argument ${label(action)}: expected ${count} arguments`);
|
|
1165
|
-
const values = [];
|
|
1166
|
-
if (explicit !== void 0)
|
|
1167
|
-
values.push(explicit);
|
|
1168
|
-
else {
|
|
1169
|
-
while (index + 1 < args.length && args[index + 1] !== "--" && (typeof action.nargs === "number" || !optional(args[index + 1])) && (count === void 0 || values.length < count))
|
|
1170
|
-
values.push(args[++index]);
|
|
1171
|
-
}
|
|
1172
|
-
if (values.length === 0 || count !== void 0 && values.length !== count) {
|
|
1173
|
-
return error(`argument ${label(action)}: expected ${count === 1 ? "one argument" : count === void 0 ? "at least one argument" : `${count} arguments`}`);
|
|
1174
|
-
}
|
|
1175
|
-
const converted = [];
|
|
1176
|
-
for (const value2 of values) {
|
|
1177
|
-
const convertedValue = await convert2(action, value2);
|
|
1178
|
-
if (isExit(convertedValue))
|
|
1179
|
-
return convertedValue;
|
|
1180
|
-
converted.push(convertedValue);
|
|
1181
|
-
}
|
|
1182
|
-
const value = action.nargs === null ? converted[0] : converted;
|
|
1183
|
-
if (action.action === "_AppendAction") {
|
|
1184
|
-
const existing = options[action.dest];
|
|
1185
|
-
options[action.dest] = [...Array.isArray(existing) ? existing : [], value];
|
|
1186
|
-
} else
|
|
1187
|
-
options[action.dest] = value;
|
|
1188
|
-
break;
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
if (extras.length)
|
|
1192
|
-
return error("unrecognized arguments: " + extras.join(" "));
|
|
1193
|
-
context.signal?.throwIfAborted();
|
|
1194
|
-
if (files.closed)
|
|
1195
|
-
throw new TypeError("match-file scope closed");
|
|
1196
|
-
transferred = true;
|
|
1197
|
-
return { kind: "parsed", options: Object.freeze(options), dispose: files.dispose, matchFiles: files };
|
|
1198
|
-
} catch (failure) {
|
|
1199
|
-
escapingFailure = true;
|
|
1200
|
-
throw failure;
|
|
1201
|
-
} finally {
|
|
1202
|
-
if (!transferred)
|
|
1203
|
-
await disposeAfterParse(files, context.signal, escapingFailure);
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
// packages/safe-bash-command-csvkit/dist/csv.js
|
|
1208
|
-
function numericField(field) {
|
|
1209
|
-
const invalid2 = () => {
|
|
1210
|
-
throw new CsvkitDiagnostic(`ValueError: could not convert string to float: ${repr(field)}`);
|
|
1211
|
-
};
|
|
1212
|
-
const chars = Array.from(field);
|
|
1213
|
-
let first = 0;
|
|
1214
|
-
let last = chars.length;
|
|
1215
|
-
while (first < last && integerWhitespace.includes(chars[first].codePointAt(0)))
|
|
1216
|
-
first++;
|
|
1217
|
-
while (last > first && integerWhitespace.includes(chars[last - 1].codePointAt(0)))
|
|
1218
|
-
last--;
|
|
1219
|
-
let value = "";
|
|
1220
|
-
for (let index2 = first; index2 < last; index2++) {
|
|
1221
|
-
const char = chars[index2];
|
|
1222
|
-
const code = char.codePointAt(0);
|
|
1223
|
-
const zero = decimalZeroes.find((start) => code >= start && code < start + 10);
|
|
1224
|
-
value += zero === void 0 ? char : String(code - zero);
|
|
1225
|
-
}
|
|
1226
|
-
const lower = value.toLowerCase();
|
|
1227
|
-
const unsigned = lower[0] === "+" || lower[0] === "-" ? lower.slice(1) : lower;
|
|
1228
|
-
if (unsigned === "inf" || unsigned === "infinity")
|
|
1229
|
-
return lower[0] === "-" ? -Infinity : Infinity;
|
|
1230
|
-
if (unsigned === "nan")
|
|
1231
|
-
return NaN;
|
|
1232
|
-
const digit = (char) => char !== void 0 && char >= "0" && char <= "9";
|
|
1233
|
-
let normalized = "";
|
|
1234
|
-
for (let index2 = 0; index2 < value.length; index2++) {
|
|
1235
|
-
if (value[index2] === "_") {
|
|
1236
|
-
if (!digit(value[index2 - 1]) || !digit(value[index2 + 1]))
|
|
1237
|
-
invalid2();
|
|
1238
|
-
} else
|
|
1239
|
-
normalized += value[index2];
|
|
1240
|
-
}
|
|
1241
|
-
let index = normalized[0] === "+" || normalized[0] === "-" ? 1 : 0;
|
|
1242
|
-
let digits2 = 0;
|
|
1243
|
-
while (digit(normalized[index])) {
|
|
1244
|
-
index++;
|
|
1245
|
-
digits2++;
|
|
1246
|
-
}
|
|
1247
|
-
if (normalized[index] === ".") {
|
|
1248
|
-
index++;
|
|
1249
|
-
while (digit(normalized[index])) {
|
|
1250
|
-
index++;
|
|
1251
|
-
digits2++;
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
if (!digits2)
|
|
1255
|
-
invalid2();
|
|
1256
|
-
if (normalized[index] === "e" || normalized[index] === "E") {
|
|
1257
|
-
index++;
|
|
1258
|
-
if (normalized[index] === "+" || normalized[index] === "-")
|
|
1259
|
-
index++;
|
|
1260
|
-
const start = index;
|
|
1261
|
-
while (digit(normalized[index]))
|
|
1262
|
-
index++;
|
|
1263
|
-
if (index === start)
|
|
1264
|
-
invalid2();
|
|
1265
|
-
}
|
|
1266
|
-
if (index !== normalized.length)
|
|
1267
|
-
invalid2();
|
|
1268
|
-
return Number(normalized);
|
|
1269
|
-
}
|
|
1270
|
-
function character(value, fallback, name) {
|
|
1271
|
-
const result = value ?? fallback;
|
|
1272
|
-
if (Array.from(result).length !== 1)
|
|
1273
|
-
throw new CsvkitDiagnostic(`TypeError: "${name}" must be a unicode character${name === "delimiter" ? "" : " or None"}, not a string of length ${Array.from(result).length}`);
|
|
1274
|
-
return result;
|
|
1275
|
-
}
|
|
1276
|
-
function dialectCharacters(dialect) {
|
|
1277
|
-
const quoting = dialect.quoting ?? (dialect.quotechar === null ? 3 : 0);
|
|
1278
|
-
if (!Number.isInteger(quoting) || quoting < 0 || quoting > 5)
|
|
1279
|
-
throw new CsvkitDiagnostic('TypeError: bad "quoting" value');
|
|
1280
|
-
if (dialect.quotechar === null && quoting !== 3)
|
|
1281
|
-
throw new CsvkitDiagnostic("TypeError: quotechar must be set if quoting enabled");
|
|
1282
|
-
const delimiter = character(dialect.delimiter, ",", "delimiter");
|
|
1283
|
-
const quote = dialect.quotechar === null ? "" : character(dialect.quotechar, '"', "quotechar");
|
|
1284
|
-
const escape = dialect.escapechar === void 0 || dialect.escapechar === null ? void 0 : character(dialect.escapechar, "", "escapechar");
|
|
1285
|
-
for (const [name, value] of [["delimiter", delimiter], ["quotechar", quote], ["escapechar", escape]]) {
|
|
1286
|
-
if (value === "\r" || value === "\n" || name !== "delimiter" && value === " " && dialect.skipinitialspace)
|
|
1287
|
-
throw new CsvkitDiagnostic(`ValueError: bad ${name} value`);
|
|
1288
|
-
}
|
|
1289
|
-
if (delimiter === quote)
|
|
1290
|
-
throw new CsvkitDiagnostic("ValueError: bad delimiter or quotechar value");
|
|
1291
|
-
if (delimiter === escape)
|
|
1292
|
-
throw new CsvkitDiagnostic("ValueError: bad delimiter or escapechar value");
|
|
1293
|
-
if (escape === quote)
|
|
1294
|
-
throw new CsvkitDiagnostic("ValueError: bad escapechar or quotechar value");
|
|
1295
|
-
return { delimiter, quote, escape };
|
|
1296
|
-
}
|
|
1297
|
-
function createCsvParser(dialect, step, preserveNewlines = false, physicalLine, admitRow = () => {
|
|
1298
|
-
}) {
|
|
1299
|
-
const { delimiter, quote, escape } = dialectCharacters(dialect);
|
|
1300
|
-
let state = "start";
|
|
1301
|
-
let field = "";
|
|
1302
|
-
let length = 0;
|
|
1303
|
-
let cells = [];
|
|
1304
|
-
let wasQuoted = false;
|
|
1305
|
-
let line = 1;
|
|
1306
|
-
let active = false;
|
|
1307
|
-
let previousCR = false;
|
|
1308
|
-
let rowStarted = false;
|
|
1309
|
-
let finished = false;
|
|
1310
|
-
const append = (char) => {
|
|
1311
|
-
if (cells.length >= (dialect.columnBudget ?? Infinity))
|
|
1312
|
-
throw new CsvkitBlocked("column budget exceeded");
|
|
1313
|
-
length++;
|
|
1314
|
-
if (length > (dialect.fieldBudget ?? Infinity))
|
|
1315
|
-
throw new CsvkitBlocked("field character budget exceeded");
|
|
1316
|
-
if (length > (dialect.fieldLimit ?? Infinity))
|
|
1317
|
-
throw new CsvkitDiagnostic(`FieldSizeLimitError: CSV contains a field longer than the maximum length of ${dialect.fieldLimit} characters on line ${physicalLine?.() ?? line}. Try raising the maximum with the field_size_limit parameter, or try setting quoting=csv.QUOTE_NONE.`);
|
|
1318
|
-
field += char;
|
|
1319
|
-
};
|
|
1320
|
-
const finish = () => {
|
|
1321
|
-
if (cells.length >= (dialect.columnBudget ?? Infinity))
|
|
1322
|
-
throw new CsvkitBlocked("column budget exceeded");
|
|
1323
|
-
const quoting = dialect.quoting ?? 0;
|
|
1324
|
-
cells.push(!wasQuoted && !field && (quoting === 4 || quoting === 5) ? null : !wasQuoted && field && (quoting === 2 || quoting === 4) ? numericField(field) : field);
|
|
1325
|
-
field = "";
|
|
1326
|
-
length = 0;
|
|
1327
|
-
state = "start";
|
|
1328
|
-
wasQuoted = false;
|
|
1329
|
-
};
|
|
1330
|
-
let lastChar = "";
|
|
1331
|
-
return {
|
|
1332
|
-
get done() {
|
|
1333
|
-
return finished;
|
|
1334
|
-
},
|
|
1335
|
-
isIdle() {
|
|
1336
|
-
return !finished && !rowStarted && state === "start" && !previousCR && !active && cells.length === 0 && field.length === 0;
|
|
1337
|
-
},
|
|
1338
|
-
advancePlainLine() {
|
|
1339
|
-
lastChar = "\n";
|
|
1340
|
-
line++;
|
|
1341
|
-
},
|
|
1342
|
-
feed(char) {
|
|
1343
|
-
if (finished)
|
|
1344
|
-
return void 0;
|
|
1345
|
-
if (char === null) {
|
|
1346
|
-
finished = true;
|
|
1347
|
-
if (active) {
|
|
1348
|
-
if (state === "escaped" || state === "quotedEscape")
|
|
1349
|
-
append("\n");
|
|
1350
|
-
finish();
|
|
1351
|
-
const rec = { cells, line: physicalLine?.() ?? line - (lastChar === "\n" || lastChar === "\r" ? 1 : 0) };
|
|
1352
|
-
cells = [];
|
|
1353
|
-
return rec;
|
|
1354
|
-
}
|
|
1355
|
-
return void 0;
|
|
1356
|
-
}
|
|
1357
|
-
if (char === void 0) {
|
|
1358
|
-
if (!rowStarted) {
|
|
1359
|
-
admitRow();
|
|
1360
|
-
rowStarted = true;
|
|
1361
|
-
}
|
|
1362
|
-
previousCR = false;
|
|
1363
|
-
if (state === "escaped" || state === "quotedEscape") {
|
|
1364
|
-
append("\n");
|
|
1365
|
-
state = state === "escaped" ? "plain" : "quoted";
|
|
1366
|
-
return void 0;
|
|
1367
|
-
}
|
|
1368
|
-
if (state === "escapedNewline")
|
|
1369
|
-
return void 0;
|
|
1370
|
-
if (state === "quoted")
|
|
1371
|
-
return void 0;
|
|
1372
|
-
if (active || cells.length || field)
|
|
1373
|
-
finish();
|
|
1374
|
-
const rec = { cells, line: physicalLine?.() ?? line };
|
|
1375
|
-
cells = [];
|
|
1376
|
-
state = "start";
|
|
1377
|
-
active = false;
|
|
1378
|
-
rowStarted = false;
|
|
1379
|
-
return rec;
|
|
1380
|
-
}
|
|
1381
|
-
lastChar = char;
|
|
1382
|
-
step();
|
|
1383
|
-
const pairedLF = previousCR && char === "\n";
|
|
1384
|
-
if (pairedLF && !preserveNewlines) {
|
|
1385
|
-
previousCR = false;
|
|
1386
|
-
return void 0;
|
|
1387
|
-
}
|
|
1388
|
-
if (!rowStarted) {
|
|
1389
|
-
admitRow();
|
|
1390
|
-
rowStarted = true;
|
|
1391
|
-
}
|
|
1392
|
-
previousCR = char === "\r";
|
|
1393
|
-
if (previousCR && !preserveNewlines)
|
|
1394
|
-
char = "\n";
|
|
1395
|
-
const wasActive = active;
|
|
1396
|
-
active = true;
|
|
1397
|
-
let emitted;
|
|
1398
|
-
if (state === "escaped" || state === "quotedEscape") {
|
|
1399
|
-
append(char);
|
|
1400
|
-
state = state === "escaped" ? char === "\n" || char === "\r" ? "escapedNewline" : "plain" : "quoted";
|
|
1401
|
-
} else if (state === "quoted") {
|
|
1402
|
-
if (char === escape)
|
|
1403
|
-
state = "quotedEscape";
|
|
1404
|
-
else if (char === quote)
|
|
1405
|
-
state = dialect.doublequote === false ? "plain" : "after";
|
|
1406
|
-
else
|
|
1407
|
-
append(char);
|
|
1408
|
-
} else if (state === "after" && char === quote) {
|
|
1409
|
-
append(char);
|
|
1410
|
-
state = "quoted";
|
|
1411
|
-
} else if (char === "\n" || char === "\r") {
|
|
1412
|
-
if (wasActive || cells.length || field)
|
|
1413
|
-
finish();
|
|
1414
|
-
emitted = { cells, line: physicalLine?.() ?? line };
|
|
1415
|
-
cells = [];
|
|
1416
|
-
state = "start";
|
|
1417
|
-
active = false;
|
|
1418
|
-
rowStarted = false;
|
|
1419
|
-
} else if (state === "start" && char === " " && dialect.skipinitialspace) {
|
|
1420
|
-
} else if (char === delimiter)
|
|
1421
|
-
finish();
|
|
1422
|
-
else if (state === "after") {
|
|
1423
|
-
append(char);
|
|
1424
|
-
state = "plain";
|
|
1425
|
-
} else if (char === escape)
|
|
1426
|
-
state = "escaped";
|
|
1427
|
-
else if (state === "start" && char === quote && dialect.quoting !== 3) {
|
|
1428
|
-
state = "quoted";
|
|
1429
|
-
wasQuoted = true;
|
|
1430
|
-
} else {
|
|
1431
|
-
append(char);
|
|
1432
|
-
if (state !== "escapedNewline")
|
|
1433
|
-
state = "plain";
|
|
1434
|
-
}
|
|
1435
|
-
if ((char === "\n" || char === "\r") && !pairedLF)
|
|
1436
|
-
line++;
|
|
1437
|
-
return emitted;
|
|
1438
|
-
}
|
|
1439
|
-
};
|
|
1440
|
-
}
|
|
1441
|
-
function* readCsv(text2, dialect = {}, step = () => {
|
|
1442
|
-
}) {
|
|
1443
|
-
const parser = createCsvParser(dialect, step);
|
|
1444
|
-
for (const char of text2) {
|
|
1445
|
-
const next = parser.feed(char);
|
|
1446
|
-
if (next)
|
|
1447
|
-
yield next;
|
|
1448
|
-
}
|
|
1449
|
-
const end = parser.feed(null);
|
|
1450
|
-
if (end)
|
|
1451
|
-
yield end;
|
|
1452
|
-
}
|
|
1453
|
-
function readCsvRecoverable(text2, dialect, step) {
|
|
1454
|
-
let offset2 = 0;
|
|
1455
|
-
let lineEnd = 0;
|
|
1456
|
-
let line = 0;
|
|
1457
|
-
let done = false;
|
|
1458
|
-
let parser = createCsvParser(dialect, step, true, () => line);
|
|
1459
|
-
return {
|
|
1460
|
-
next() {
|
|
1461
|
-
if (done)
|
|
1462
|
-
return { done: true, value: void 0 };
|
|
1463
|
-
try {
|
|
1464
|
-
while (offset2 < text2.length) {
|
|
1465
|
-
if (offset2 === lineEnd) {
|
|
1466
|
-
line++;
|
|
1467
|
-
lineEnd = offset2;
|
|
1468
|
-
while (lineEnd < text2.length && text2[lineEnd] !== "\n" && text2[lineEnd] !== "\r") {
|
|
1469
|
-
step();
|
|
1470
|
-
lineEnd++;
|
|
1471
|
-
}
|
|
1472
|
-
if (text2[lineEnd] === "\r")
|
|
1473
|
-
lineEnd++;
|
|
1474
|
-
if (text2[lineEnd] === "\n")
|
|
1475
|
-
lineEnd++;
|
|
1476
|
-
}
|
|
1477
|
-
const char = String.fromCodePoint(text2.codePointAt(offset2));
|
|
1478
|
-
offset2 += char.length;
|
|
1479
|
-
const next = parser.feed(char);
|
|
1480
|
-
if (next) {
|
|
1481
|
-
offset2 = lineEnd;
|
|
1482
|
-
return { done: false, value: next };
|
|
1483
|
-
}
|
|
1484
|
-
}
|
|
1485
|
-
done = true;
|
|
1486
|
-
const end = parser.feed(null);
|
|
1487
|
-
return end ? { done: false, value: end } : { done: true, value: void 0 };
|
|
1488
|
-
} catch (failure) {
|
|
1489
|
-
if (failure instanceof CsvkitDiagnostic && !(failure instanceof CsvkitBlocked)) {
|
|
1490
|
-
offset2 = lineEnd;
|
|
1491
|
-
parser = createCsvParser(dialect, step, true, () => line);
|
|
1492
|
-
} else
|
|
1493
|
-
done = true;
|
|
1494
|
-
throw failure;
|
|
1495
|
-
}
|
|
1496
|
-
},
|
|
1497
|
-
return() {
|
|
1498
|
-
done = true;
|
|
1499
|
-
return { done: true, value: void 0 };
|
|
1500
|
-
}
|
|
1501
|
-
};
|
|
1502
|
-
}
|
|
1503
|
-
async function* readCsvStream(lines, dialect = {}, step = () => {
|
|
1504
|
-
}, admitRow = () => {
|
|
1505
|
-
}) {
|
|
1506
|
-
let physicalLine = 0;
|
|
1507
|
-
const parser = createCsvParser(dialect, step, true, () => physicalLine, admitRow);
|
|
1508
|
-
const { delimiter, quote, escape } = dialectCharacters(dialect);
|
|
1509
|
-
const quoting = dialect.quoting ?? (dialect.quotechar === null ? 3 : 0);
|
|
1510
|
-
const canFastPlain = (quoting === 0 || quoting === 1 || quoting === 3) && !dialect.skipinitialspace && escape === void 0 && delimiter.length === 1;
|
|
1511
|
-
const quoteCode = quote ? quote.charCodeAt(0) : -1;
|
|
1512
|
-
const colBudget = dialect.columnBudget ?? Infinity;
|
|
1513
|
-
const maxFieldLen = Math.min(dialect.fieldBudget ?? Infinity, dialect.fieldLimit ?? Infinity);
|
|
1514
|
-
try {
|
|
1515
|
-
for await (const text2 of lines) {
|
|
1516
|
-
physicalLine++;
|
|
1517
|
-
const len = text2.length;
|
|
1518
|
-
if (canFastPlain && len >= 2 && len <= maxFieldLen && text2.charCodeAt(len - 1) === 10 && parser.isIdle?.()) {
|
|
1519
|
-
let plainAscii = true;
|
|
1520
|
-
let fieldCount = 1;
|
|
1521
|
-
const delimCode = delimiter.charCodeAt(0);
|
|
1522
|
-
for (let i = 0; i < len - 1; i++) {
|
|
1523
|
-
const c = text2.charCodeAt(i);
|
|
1524
|
-
if (c >= 128 || c === 13 || c === 10 || c === quoteCode) {
|
|
1525
|
-
plainAscii = false;
|
|
1526
|
-
break;
|
|
1527
|
-
}
|
|
1528
|
-
if (c === delimCode)
|
|
1529
|
-
fieldCount++;
|
|
1530
|
-
}
|
|
1531
|
-
if (plainAscii && fieldCount <= colBudget) {
|
|
1532
|
-
for (let i = 0; i < len; i++)
|
|
1533
|
-
step();
|
|
1534
|
-
admitRow();
|
|
1535
|
-
parser.advancePlainLine?.();
|
|
1536
|
-
yield { cells: text2.slice(0, len - 1).split(delimiter), line: physicalLine };
|
|
1537
|
-
continue;
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
let offset2 = 0;
|
|
1541
|
-
let completed = false;
|
|
1542
|
-
for (const char of text2) {
|
|
1543
|
-
offset2 += char.length;
|
|
1544
|
-
const next = parser.feed(char);
|
|
1545
|
-
if (next) {
|
|
1546
|
-
for (const trailing of text2.slice(offset2))
|
|
1547
|
-
if (trailing !== "\n" && trailing !== "\r")
|
|
1548
|
-
throw new CsvkitDiagnostic("Error: new-line character seen in unquoted field - do you need to open the file with newline=''?");
|
|
1549
|
-
yield next;
|
|
1550
|
-
completed = true;
|
|
1551
|
-
break;
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
if (!completed) {
|
|
1555
|
-
const boundary = parser.feed(void 0);
|
|
1556
|
-
if (boundary) {
|
|
1557
|
-
yield boundary;
|
|
1558
|
-
}
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
const end = parser.feed(null);
|
|
1562
|
-
if (end)
|
|
1563
|
-
yield end;
|
|
1564
|
-
} finally {
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
function pythonValueText(value) {
|
|
1568
|
-
if (value === null)
|
|
1569
|
-
return "";
|
|
1570
|
-
if (typeof value === "boolean")
|
|
1571
|
-
return value ? "True" : "False";
|
|
1572
|
-
if (typeof value === "number") {
|
|
1573
|
-
if (Number.isNaN(value))
|
|
1574
|
-
return "nan";
|
|
1575
|
-
if (!Number.isFinite(value))
|
|
1576
|
-
return value < 0 ? "-inf" : "inf";
|
|
1577
|
-
if (Object.is(value, -0))
|
|
1578
|
-
return "-0.0";
|
|
1579
|
-
}
|
|
1580
|
-
if (typeof value !== "object")
|
|
1581
|
-
return String(value);
|
|
1582
|
-
if (value.kind !== "timedelta")
|
|
1583
|
-
return value.value;
|
|
1584
|
-
const day = 86400000000n;
|
|
1585
|
-
let days = value.microseconds / day;
|
|
1586
|
-
let remainder = value.microseconds % day;
|
|
1587
|
-
if (remainder < 0n) {
|
|
1588
|
-
days--;
|
|
1589
|
-
remainder += day;
|
|
1590
|
-
}
|
|
1591
|
-
if (days < -999999999n || days > 999999999n)
|
|
1592
|
-
throw new CsvkitDiagnostic("OverflowError: timedelta days out of range");
|
|
1593
|
-
const seconds = remainder / 1000000n;
|
|
1594
|
-
const micros = remainder % 1000000n;
|
|
1595
|
-
const time = `${seconds / 3600n}:${String(seconds / 60n % 60n).padStart(2, "0")}:${String(seconds % 60n).padStart(2, "0")}`;
|
|
1596
|
-
return (days ? `${days} day${days === 1n || days === -1n ? "" : "s"}, ` : "") + time + (micros ? `.${String(micros).padStart(6, "0")}` : "");
|
|
1597
|
-
}
|
|
1598
|
-
function writeCsvRow(row, dialect = {}, normalizeStrings = true, admission) {
|
|
1599
|
-
const { delimiter, quote, escape } = dialectCharacters(dialect);
|
|
1600
|
-
const end = dialect.lineterminator ?? "\n";
|
|
1601
|
-
const quoting = dialect.quoting ?? (dialect.quotechar === null ? 3 : 0);
|
|
1602
|
-
function* fragments() {
|
|
1603
|
-
for (let index = 0; index < row.length; index++) {
|
|
1604
|
-
const value = row[index];
|
|
1605
|
-
const field = pythonValueText(value);
|
|
1606
|
-
const normalized = typeof value === "string" && normalizeStrings;
|
|
1607
|
-
const numeric2 = typeof value === "number" || typeof value === "bigint" || typeof value === "boolean" || typeof value === "object" && (value?.kind === "decimal" || value?.kind === "float");
|
|
1608
|
-
let quoted2 = quoting === 1 || quoting === 2 && !numeric2 || quoting === 4 && typeof value === "string" || quoting === 5 && value !== null;
|
|
1609
|
-
for (const original of field) {
|
|
1610
|
-
admission?.step();
|
|
1611
|
-
const char = normalized && original === "\r" ? "\n" : original;
|
|
1612
|
-
const special = char === delimiter || char === quote || char === escape || char === "\r" || char === "\n" || end.includes(char);
|
|
1613
|
-
let escaped = char === escape;
|
|
1614
|
-
if (special && quoting === 3)
|
|
1615
|
-
escaped = true;
|
|
1616
|
-
else if (char === quote) {
|
|
1617
|
-
if (dialect.doublequote === false)
|
|
1618
|
-
escaped = true;
|
|
1619
|
-
if (!escaped)
|
|
1620
|
-
quoted2 = true;
|
|
1621
|
-
} else if (special && !escaped)
|
|
1622
|
-
quoted2 = true;
|
|
1623
|
-
if (escaped) {
|
|
1624
|
-
if (escape === void 0)
|
|
1625
|
-
throw new CsvkitDiagnostic("Error: need to escape, but no escapechar set");
|
|
1626
|
-
}
|
|
1627
|
-
}
|
|
1628
|
-
if (field === "" && delimiter === " " && dialect.skipinitialspace) {
|
|
1629
|
-
if (quoting === 3 || value === null && (quoting === 4 || quoting === 5))
|
|
1630
|
-
throw new CsvkitDiagnostic("Error: empty field must be quoted if delimiter is a space and skipinitialspace is true");
|
|
1631
|
-
quoted2 = true;
|
|
1632
|
-
}
|
|
1633
|
-
if (row.length === 1 && field === "" && !quoted2) {
|
|
1634
|
-
if (quoting === 3 || value === null && (quoting === 4 || quoting === 5))
|
|
1635
|
-
throw new CsvkitDiagnostic("Error: single empty field record must be quoted");
|
|
1636
|
-
quoted2 = true;
|
|
1637
|
-
}
|
|
1638
|
-
if (index)
|
|
1639
|
-
yield delimiter;
|
|
1640
|
-
if (quoted2)
|
|
1641
|
-
yield quote;
|
|
1642
|
-
for (const original of field) {
|
|
1643
|
-
admission?.step();
|
|
1644
|
-
const char = normalized && original === "\r" ? "\n" : original;
|
|
1645
|
-
const special = char === delimiter || char === quote || char === escape || char === "\r" || char === "\n" || end.includes(char);
|
|
1646
|
-
if (char === escape || special && quoting === 3 || char === quote && dialect.doublequote === false)
|
|
1647
|
-
yield escape;
|
|
1648
|
-
else if (char === quote)
|
|
1649
|
-
yield quote;
|
|
1650
|
-
yield char;
|
|
1651
|
-
}
|
|
1652
|
-
if (quoted2)
|
|
1653
|
-
yield quote;
|
|
1654
|
-
}
|
|
1655
|
-
yield end;
|
|
1656
|
-
}
|
|
1657
|
-
if (admission) {
|
|
1658
|
-
let bytes = 0, codeUnits = 0, high = false;
|
|
1659
|
-
for (const fragment of fragments()) {
|
|
1660
|
-
codeUnits += fragment.length;
|
|
1661
|
-
for (const char of fragment) {
|
|
1662
|
-
admission.step();
|
|
1663
|
-
const code = char.codePointAt(0);
|
|
1664
|
-
bytes += high && code >= 56320 && code <= 57343 ? 1 : code <= 127 ? 1 : code <= 2047 ? 2 : code <= 65535 ? 3 : 4;
|
|
1665
|
-
high = code >= 55296 && code <= 56319;
|
|
1666
|
-
}
|
|
1667
|
-
}
|
|
1668
|
-
admission.admit(bytes, codeUnits);
|
|
1669
|
-
}
|
|
1670
|
-
let result = "";
|
|
1671
|
-
for (const fragment of fragments())
|
|
1672
|
-
result += fragment;
|
|
1673
|
-
return result;
|
|
1674
|
-
}
|
|
1675
|
-
var Writer = class {
|
|
1676
|
-
#rows = 0;
|
|
1677
|
-
#options;
|
|
1678
|
-
constructor(options = {}) {
|
|
1679
|
-
dialectCharacters(options);
|
|
1680
|
-
this.#options = Object.freeze({ ...options });
|
|
1681
|
-
}
|
|
1682
|
-
writerow(row) {
|
|
1683
|
-
const cells = this.#options.lineNumbers ? [this.#rows === 0 ? "line_number" : this.#rows, ...row] : row;
|
|
1684
|
-
if (this.#options.lineNumbers)
|
|
1685
|
-
this.#rows++;
|
|
1686
|
-
return writeCsvRow(cells, this.#options);
|
|
1687
|
-
}
|
|
1688
|
-
*writerows(rows) {
|
|
1689
|
-
for (const row of rows)
|
|
1690
|
-
yield this.writerow(row);
|
|
1691
|
-
}
|
|
1692
|
-
};
|
|
1693
|
-
var DictionaryWriter = class {
|
|
1694
|
-
#rows = 0;
|
|
1695
|
-
#fields;
|
|
1696
|
-
#options;
|
|
1697
|
-
constructor(fieldnames, options = {}) {
|
|
1698
|
-
const action = options.extrasaction ?? "raise";
|
|
1699
|
-
if (!["raise", "ignore"].includes(action.toLowerCase()))
|
|
1700
|
-
throw new CsvkitDiagnostic(`ValueError: extrasaction (${action}) must be 'raise' or 'ignore'`);
|
|
1701
|
-
dialectCharacters(options);
|
|
1702
|
-
this.#options = Object.freeze({ ...options, extrasaction: action.toLowerCase() });
|
|
1703
|
-
this.#fields = Object.freeze(options.lineNumbers ? ["line_number", ...fieldnames] : [...fieldnames]);
|
|
1704
|
-
}
|
|
1705
|
-
writeheader() {
|
|
1706
|
-
return this.writerow(Object.fromEntries(this.#fields.map((field) => [field, field])));
|
|
1707
|
-
}
|
|
1708
|
-
writerow(row) {
|
|
1709
|
-
const values = Object.fromEntries(Object.entries(row).map(([key, value]) => [key, typeof value === "string" ? value.split("\r").join("\n") : value]));
|
|
1710
|
-
if (this.#options.lineNumbers) {
|
|
1711
|
-
values.line_number = this.#rows === 0 ? "line_number" : this.#rows;
|
|
1712
|
-
this.#rows++;
|
|
1713
|
-
}
|
|
1714
|
-
if (this.#options.extrasaction === "raise") {
|
|
1715
|
-
const extra = Object.keys(values).filter((key) => !this.#fields.includes(key));
|
|
1716
|
-
if (extra.length)
|
|
1717
|
-
throw new CsvkitDiagnostic(`ValueError: dict contains fields not in fieldnames: ${extra.map(repr).join(", ")}`);
|
|
1718
|
-
}
|
|
1719
|
-
return writeCsvRow(this.#fields.map((field) => Object.hasOwn(values, field) ? values[field] : this.#options.restval === void 0 ? "" : this.#options.restval), this.#options, false);
|
|
1720
|
-
}
|
|
1721
|
-
*writerows(rows) {
|
|
1722
|
-
for (const row of rows)
|
|
1723
|
-
yield this.writerow(row);
|
|
1724
|
-
}
|
|
1725
|
-
};
|
|
1726
|
-
|
|
1727
|
-
// packages/safe-bash-command-csvkit/dist/commands/csvclean.js
|
|
1728
151
|
var csvclean = {
|
|
1729
152
|
execute: clean,
|
|
1730
153
|
"name": "csvclean",
|
|
@@ -2296,1430 +719,47 @@ init_buffer();
|
|
|
2296
719
|
|
|
2297
720
|
// packages/safe-bash-command-csvkit/dist/columns.js
|
|
2298
721
|
init_buffer();
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
var lowerMappings = [[65, "a"], [66, "b"], [67, "c"], [68, "d"], [69, "e"], [70, "f"], [71, "g"], [72, "h"], [73, "i"], [74, "j"], [75, "k"], [76, "l"], [77, "m"], [78, "n"], [79, "o"], [80, "p"], [81, "q"], [82, "r"], [83, "s"], [84, "t"], [85, "u"], [86, "v"], [87, "w"], [88, "x"], [89, "y"], [90, "z"], [192, "\xE0"], [193, "\xE1"], [194, "\xE2"], [195, "\xE3"], [196, "\xE4"], [197, "\xE5"], [198, "\xE6"], [199, "\xE7"], [200, "\xE8"], [201, "\xE9"], [202, "\xEA"], [203, "\xEB"], [204, "\xEC"], [205, "\xED"], [206, "\xEE"], [207, "\xEF"], [208, "\xF0"], [209, "\xF1"], [210, "\xF2"], [211, "\xF3"], [212, "\xF4"], [213, "\xF5"], [214, "\xF6"], [216, "\xF8"], [217, "\xF9"], [218, "\xFA"], [219, "\xFB"], [220, "\xFC"], [221, "\xFD"], [222, "\xFE"], [256, "\u0101"], [258, "\u0103"], [260, "\u0105"], [262, "\u0107"], [264, "\u0109"], [266, "\u010B"], [268, "\u010D"], [270, "\u010F"], [272, "\u0111"], [274, "\u0113"], [276, "\u0115"], [278, "\u0117"], [280, "\u0119"], [282, "\u011B"], [284, "\u011D"], [286, "\u011F"], [288, "\u0121"], [290, "\u0123"], [292, "\u0125"], [294, "\u0127"], [296, "\u0129"], [298, "\u012B"], [300, "\u012D"], [302, "\u012F"], [304, "i\u0307"], [306, "\u0133"], [308, "\u0135"], [310, "\u0137"], [313, "\u013A"], [315, "\u013C"], [317, "\u013E"], [319, "\u0140"], [321, "\u0142"], [323, "\u0144"], [325, "\u0146"], [327, "\u0148"], [330, "\u014B"], [332, "\u014D"], [334, "\u014F"], [336, "\u0151"], [338, "\u0153"], [340, "\u0155"], [342, "\u0157"], [344, "\u0159"], [346, "\u015B"], [348, "\u015D"], [350, "\u015F"], [352, "\u0161"], [354, "\u0163"], [356, "\u0165"], [358, "\u0167"], [360, "\u0169"], [362, "\u016B"], [364, "\u016D"], [366, "\u016F"], [368, "\u0171"], [370, "\u0173"], [372, "\u0175"], [374, "\u0177"], [376, "\xFF"], [377, "\u017A"], [379, "\u017C"], [381, "\u017E"], [385, "\u0253"], [386, "\u0183"], [388, "\u0185"], [390, "\u0254"], [391, "\u0188"], [393, "\u0256"], [394, "\u0257"], [395, "\u018C"], [398, "\u01DD"], [399, "\u0259"], [400, "\u025B"], [401, "\u0192"], [403, "\u0260"], [404, "\u0263"], [406, "\u0269"], [407, "\u0268"], [408, "\u0199"], [412, "\u026F"], [413, "\u0272"], [415, "\u0275"], [416, "\u01A1"], [418, "\u01A3"], [420, "\u01A5"], [422, "\u0280"], [423, "\u01A8"], [425, "\u0283"], [428, "\u01AD"], [430, "\u0288"], [431, "\u01B0"], [433, "\u028A"], [434, "\u028B"], [435, "\u01B4"], [437, "\u01B6"], [439, "\u0292"], [440, "\u01B9"], [444, "\u01BD"], [452, "\u01C6"], [453, "\u01C6"], [455, "\u01C9"], [456, "\u01C9"], [458, "\u01CC"], [459, "\u01CC"], [461, "\u01CE"], [463, "\u01D0"], [465, "\u01D2"], [467, "\u01D4"], [469, "\u01D6"], [471, "\u01D8"], [473, "\u01DA"], [475, "\u01DC"], [478, "\u01DF"], [480, "\u01E1"], [482, "\u01E3"], [484, "\u01E5"], [486, "\u01E7"], [488, "\u01E9"], [490, "\u01EB"], [492, "\u01ED"], [494, "\u01EF"], [497, "\u01F3"], [498, "\u01F3"], [500, "\u01F5"], [502, "\u0195"], [503, "\u01BF"], [504, "\u01F9"], [506, "\u01FB"], [508, "\u01FD"], [510, "\u01FF"], [512, "\u0201"], [514, "\u0203"], [516, "\u0205"], [518, "\u0207"], [520, "\u0209"], [522, "\u020B"], [524, "\u020D"], [526, "\u020F"], [528, "\u0211"], [530, "\u0213"], [532, "\u0215"], [534, "\u0217"], [536, "\u0219"], [538, "\u021B"], [540, "\u021D"], [542, "\u021F"], [544, "\u019E"], [546, "\u0223"], [548, "\u0225"], [550, "\u0227"], [552, "\u0229"], [554, "\u022B"], [556, "\u022D"], [558, "\u022F"], [560, "\u0231"], [562, "\u0233"], [570, "\u2C65"], [571, "\u023C"], [573, "\u019A"], [574, "\u2C66"], [577, "\u0242"], [579, "\u0180"], [580, "\u0289"], [581, "\u028C"], [582, "\u0247"], [584, "\u0249"], [586, "\u024B"], [588, "\u024D"], [590, "\u024F"], [880, "\u0371"], [882, "\u0373"], [886, "\u0377"], [895, "\u03F3"], [902, "\u03AC"], [904, "\u03AD"], [905, "\u03AE"], [906, "\u03AF"], [908, "\u03CC"], [910, "\u03CD"], [911, "\u03CE"], [913, "\u03B1"], [914, "\u03B2"], [915, "\u03B3"], [916, "\u03B4"], [917, "\u03B5"], [918, "\u03B6"], [919, "\u03B7"], [920, "\u03B8"], [921, "\u03B9"], [922, "\u03BA"], [923, "\u03BB"], [924, "\u03BC"], [925, "\u03BD"], [926, "\u03BE"], [927, "\u03BF"], [928, "\u03C0"], [929, "\u03C1"], [931, "\u03C3"], [932, "\u03C4"], [933, "\u03C5"], [934, "\u03C6"], [935, "\u03C7"], [936, "\u03C8"], [937, "\u03C9"], [938, "\u03CA"], [939, "\u03CB"], [975, "\u03D7"], [984, "\u03D9"], [986, "\u03DB"], [988, "\u03DD"], [990, "\u03DF"], [992, "\u03E1"], [994, "\u03E3"], [996, "\u03E5"], [998, "\u03E7"], [1e3, "\u03E9"], [1002, "\u03EB"], [1004, "\u03ED"], [1006, "\u03EF"], [1012, "\u03B8"], [1015, "\u03F8"], [1017, "\u03F2"], [1018, "\u03FB"], [1021, "\u037B"], [1022, "\u037C"], [1023, "\u037D"], [1024, "\u0450"], [1025, "\u0451"], [1026, "\u0452"], [1027, "\u0453"], [1028, "\u0454"], [1029, "\u0455"], [1030, "\u0456"], [1031, "\u0457"], [1032, "\u0458"], [1033, "\u0459"], [1034, "\u045A"], [1035, "\u045B"], [1036, "\u045C"], [1037, "\u045D"], [1038, "\u045E"], [1039, "\u045F"], [1040, "\u0430"], [1041, "\u0431"], [1042, "\u0432"], [1043, "\u0433"], [1044, "\u0434"], [1045, "\u0435"], [1046, "\u0436"], [1047, "\u0437"], [1048, "\u0438"], [1049, "\u0439"], [1050, "\u043A"], [1051, "\u043B"], [1052, "\u043C"], [1053, "\u043D"], [1054, "\u043E"], [1055, "\u043F"], [1056, "\u0440"], [1057, "\u0441"], [1058, "\u0442"], [1059, "\u0443"], [1060, "\u0444"], [1061, "\u0445"], [1062, "\u0446"], [1063, "\u0447"], [1064, "\u0448"], [1065, "\u0449"], [1066, "\u044A"], [1067, "\u044B"], [1068, "\u044C"], [1069, "\u044D"], [1070, "\u044E"], [1071, "\u044F"], [1120, "\u0461"], [1122, "\u0463"], [1124, "\u0465"], [1126, "\u0467"], [1128, "\u0469"], [1130, "\u046B"], [1132, "\u046D"], [1134, "\u046F"], [1136, "\u0471"], [1138, "\u0473"], [1140, "\u0475"], [1142, "\u0477"], [1144, "\u0479"], [1146, "\u047B"], [1148, "\u047D"], [1150, "\u047F"], [1152, "\u0481"], [1162, "\u048B"], [1164, "\u048D"], [1166, "\u048F"], [1168, "\u0491"], [1170, "\u0493"], [1172, "\u0495"], [1174, "\u0497"], [1176, "\u0499"], [1178, "\u049B"], [1180, "\u049D"], [1182, "\u049F"], [1184, "\u04A1"], [1186, "\u04A3"], [1188, "\u04A5"], [1190, "\u04A7"], [1192, "\u04A9"], [1194, "\u04AB"], [1196, "\u04AD"], [1198, "\u04AF"], [1200, "\u04B1"], [1202, "\u04B3"], [1204, "\u04B5"], [1206, "\u04B7"], [1208, "\u04B9"], [1210, "\u04BB"], [1212, "\u04BD"], [1214, "\u04BF"], [1216, "\u04CF"], [1217, "\u04C2"], [1219, "\u04C4"], [1221, "\u04C6"], [1223, "\u04C8"], [1225, "\u04CA"], [1227, "\u04CC"], [1229, "\u04CE"], [1232, "\u04D1"], [1234, "\u04D3"], [1236, "\u04D5"], [1238, "\u04D7"], [1240, "\u04D9"], [1242, "\u04DB"], [1244, "\u04DD"], [1246, "\u04DF"], [1248, "\u04E1"], [1250, "\u04E3"], [1252, "\u04E5"], [1254, "\u04E7"], [1256, "\u04E9"], [1258, "\u04EB"], [1260, "\u04ED"], [1262, "\u04EF"], [1264, "\u04F1"], [1266, "\u04F3"], [1268, "\u04F5"], [1270, "\u04F7"], [1272, "\u04F9"], [1274, "\u04FB"], [1276, "\u04FD"], [1278, "\u04FF"], [1280, "\u0501"], [1282, "\u0503"], [1284, "\u0505"], [1286, "\u0507"], [1288, "\u0509"], [1290, "\u050B"], [1292, "\u050D"], [1294, "\u050F"], [1296, "\u0511"], [1298, "\u0513"], [1300, "\u0515"], [1302, "\u0517"], [1304, "\u0519"], [1306, "\u051B"], [1308, "\u051D"], [1310, "\u051F"], [1312, "\u0521"], [1314, "\u0523"], [1316, "\u0525"], [1318, "\u0527"], [1320, "\u0529"], [1322, "\u052B"], [1324, "\u052D"], [1326, "\u052F"], [1329, "\u0561"], [1330, "\u0562"], [1331, "\u0563"], [1332, "\u0564"], [1333, "\u0565"], [1334, "\u0566"], [1335, "\u0567"], [1336, "\u0568"], [1337, "\u0569"], [1338, "\u056A"], [1339, "\u056B"], [1340, "\u056C"], [1341, "\u056D"], [1342, "\u056E"], [1343, "\u056F"], [1344, "\u0570"], [1345, "\u0571"], [1346, "\u0572"], [1347, "\u0573"], [1348, "\u0574"], [1349, "\u0575"], [1350, "\u0576"], [1351, "\u0577"], [1352, "\u0578"], [1353, "\u0579"], [1354, "\u057A"], [1355, "\u057B"], [1356, "\u057C"], [1357, "\u057D"], [1358, "\u057E"], [1359, "\u057F"], [1360, "\u0580"], [1361, "\u0581"], [1362, "\u0582"], [1363, "\u0583"], [1364, "\u0584"], [1365, "\u0585"], [1366, "\u0586"], [4256, "\u2D00"], [4257, "\u2D01"], [4258, "\u2D02"], [4259, "\u2D03"], [4260, "\u2D04"], [4261, "\u2D05"], [4262, "\u2D06"], [4263, "\u2D07"], [4264, "\u2D08"], [4265, "\u2D09"], [4266, "\u2D0A"], [4267, "\u2D0B"], [4268, "\u2D0C"], [4269, "\u2D0D"], [4270, "\u2D0E"], [4271, "\u2D0F"], [4272, "\u2D10"], [4273, "\u2D11"], [4274, "\u2D12"], [4275, "\u2D13"], [4276, "\u2D14"], [4277, "\u2D15"], [4278, "\u2D16"], [4279, "\u2D17"], [4280, "\u2D18"], [4281, "\u2D19"], [4282, "\u2D1A"], [4283, "\u2D1B"], [4284, "\u2D1C"], [4285, "\u2D1D"], [4286, "\u2D1E"], [4287, "\u2D1F"], [4288, "\u2D20"], [4289, "\u2D21"], [4290, "\u2D22"], [4291, "\u2D23"], [4292, "\u2D24"], [4293, "\u2D25"], [4295, "\u2D27"], [4301, "\u2D2D"], [5024, "\uAB70"], [5025, "\uAB71"], [5026, "\uAB72"], [5027, "\uAB73"], [5028, "\uAB74"], [5029, "\uAB75"], [5030, "\uAB76"], [5031, "\uAB77"], [5032, "\uAB78"], [5033, "\uAB79"], [5034, "\uAB7A"], [5035, "\uAB7B"], [5036, "\uAB7C"], [5037, "\uAB7D"], [5038, "\uAB7E"], [5039, "\uAB7F"], [5040, "\uAB80"], [5041, "\uAB81"], [5042, "\uAB82"], [5043, "\uAB83"], [5044, "\uAB84"], [5045, "\uAB85"], [5046, "\uAB86"], [5047, "\uAB87"], [5048, "\uAB88"], [5049, "\uAB89"], [5050, "\uAB8A"], [5051, "\uAB8B"], [5052, "\uAB8C"], [5053, "\uAB8D"], [5054, "\uAB8E"], [5055, "\uAB8F"], [5056, "\uAB90"], [5057, "\uAB91"], [5058, "\uAB92"], [5059, "\uAB93"], [5060, "\uAB94"], [5061, "\uAB95"], [5062, "\uAB96"], [5063, "\uAB97"], [5064, "\uAB98"], [5065, "\uAB99"], [5066, "\uAB9A"], [5067, "\uAB9B"], [5068, "\uAB9C"], [5069, "\uAB9D"], [5070, "\uAB9E"], [5071, "\uAB9F"], [5072, "\uABA0"], [5073, "\uABA1"], [5074, "\uABA2"], [5075, "\uABA3"], [5076, "\uABA4"], [5077, "\uABA5"], [5078, "\uABA6"], [5079, "\uABA7"], [5080, "\uABA8"], [5081, "\uABA9"], [5082, "\uABAA"], [5083, "\uABAB"], [5084, "\uABAC"], [5085, "\uABAD"], [5086, "\uABAE"], [5087, "\uABAF"], [5088, "\uABB0"], [5089, "\uABB1"], [5090, "\uABB2"], [5091, "\uABB3"], [5092, "\uABB4"], [5093, "\uABB5"], [5094, "\uABB6"], [5095, "\uABB7"], [5096, "\uABB8"], [5097, "\uABB9"], [5098, "\uABBA"], [5099, "\uABBB"], [5100, "\uABBC"], [5101, "\uABBD"], [5102, "\uABBE"], [5103, "\uABBF"], [5104, "\u13F8"], [5105, "\u13F9"], [5106, "\u13FA"], [5107, "\u13FB"], [5108, "\u13FC"], [5109, "\u13FD"], [7305, "\u1C8A"], [7312, "\u10D0"], [7313, "\u10D1"], [7314, "\u10D2"], [7315, "\u10D3"], [7316, "\u10D4"], [7317, "\u10D5"], [7318, "\u10D6"], [7319, "\u10D7"], [7320, "\u10D8"], [7321, "\u10D9"], [7322, "\u10DA"], [7323, "\u10DB"], [7324, "\u10DC"], [7325, "\u10DD"], [7326, "\u10DE"], [7327, "\u10DF"], [7328, "\u10E0"], [7329, "\u10E1"], [7330, "\u10E2"], [7331, "\u10E3"], [7332, "\u10E4"], [7333, "\u10E5"], [7334, "\u10E6"], [7335, "\u10E7"], [7336, "\u10E8"], [7337, "\u10E9"], [7338, "\u10EA"], [7339, "\u10EB"], [7340, "\u10EC"], [7341, "\u10ED"], [7342, "\u10EE"], [7343, "\u10EF"], [7344, "\u10F0"], [7345, "\u10F1"], [7346, "\u10F2"], [7347, "\u10F3"], [7348, "\u10F4"], [7349, "\u10F5"], [7350, "\u10F6"], [7351, "\u10F7"], [7352, "\u10F8"], [7353, "\u10F9"], [7354, "\u10FA"], [7357, "\u10FD"], [7358, "\u10FE"], [7359, "\u10FF"], [7680, "\u1E01"], [7682, "\u1E03"], [7684, "\u1E05"], [7686, "\u1E07"], [7688, "\u1E09"], [7690, "\u1E0B"], [7692, "\u1E0D"], [7694, "\u1E0F"], [7696, "\u1E11"], [7698, "\u1E13"], [7700, "\u1E15"], [7702, "\u1E17"], [7704, "\u1E19"], [7706, "\u1E1B"], [7708, "\u1E1D"], [7710, "\u1E1F"], [7712, "\u1E21"], [7714, "\u1E23"], [7716, "\u1E25"], [7718, "\u1E27"], [7720, "\u1E29"], [7722, "\u1E2B"], [7724, "\u1E2D"], [7726, "\u1E2F"], [7728, "\u1E31"], [7730, "\u1E33"], [7732, "\u1E35"], [7734, "\u1E37"], [7736, "\u1E39"], [7738, "\u1E3B"], [7740, "\u1E3D"], [7742, "\u1E3F"], [7744, "\u1E41"], [7746, "\u1E43"], [7748, "\u1E45"], [7750, "\u1E47"], [7752, "\u1E49"], [7754, "\u1E4B"], [7756, "\u1E4D"], [7758, "\u1E4F"], [7760, "\u1E51"], [7762, "\u1E53"], [7764, "\u1E55"], [7766, "\u1E57"], [7768, "\u1E59"], [7770, "\u1E5B"], [7772, "\u1E5D"], [7774, "\u1E5F"], [7776, "\u1E61"], [7778, "\u1E63"], [7780, "\u1E65"], [7782, "\u1E67"], [7784, "\u1E69"], [7786, "\u1E6B"], [7788, "\u1E6D"], [7790, "\u1E6F"], [7792, "\u1E71"], [7794, "\u1E73"], [7796, "\u1E75"], [7798, "\u1E77"], [7800, "\u1E79"], [7802, "\u1E7B"], [7804, "\u1E7D"], [7806, "\u1E7F"], [7808, "\u1E81"], [7810, "\u1E83"], [7812, "\u1E85"], [7814, "\u1E87"], [7816, "\u1E89"], [7818, "\u1E8B"], [7820, "\u1E8D"], [7822, "\u1E8F"], [7824, "\u1E91"], [7826, "\u1E93"], [7828, "\u1E95"], [7838, "\xDF"], [7840, "\u1EA1"], [7842, "\u1EA3"], [7844, "\u1EA5"], [7846, "\u1EA7"], [7848, "\u1EA9"], [7850, "\u1EAB"], [7852, "\u1EAD"], [7854, "\u1EAF"], [7856, "\u1EB1"], [7858, "\u1EB3"], [7860, "\u1EB5"], [7862, "\u1EB7"], [7864, "\u1EB9"], [7866, "\u1EBB"], [7868, "\u1EBD"], [7870, "\u1EBF"], [7872, "\u1EC1"], [7874, "\u1EC3"], [7876, "\u1EC5"], [7878, "\u1EC7"], [7880, "\u1EC9"], [7882, "\u1ECB"], [7884, "\u1ECD"], [7886, "\u1ECF"], [7888, "\u1ED1"], [7890, "\u1ED3"], [7892, "\u1ED5"], [7894, "\u1ED7"], [7896, "\u1ED9"], [7898, "\u1EDB"], [7900, "\u1EDD"], [7902, "\u1EDF"], [7904, "\u1EE1"], [7906, "\u1EE3"], [7908, "\u1EE5"], [7910, "\u1EE7"], [7912, "\u1EE9"], [7914, "\u1EEB"], [7916, "\u1EED"], [7918, "\u1EEF"], [7920, "\u1EF1"], [7922, "\u1EF3"], [7924, "\u1EF5"], [7926, "\u1EF7"], [7928, "\u1EF9"], [7930, "\u1EFB"], [7932, "\u1EFD"], [7934, "\u1EFF"], [7944, "\u1F00"], [7945, "\u1F01"], [7946, "\u1F02"], [7947, "\u1F03"], [7948, "\u1F04"], [7949, "\u1F05"], [7950, "\u1F06"], [7951, "\u1F07"], [7960, "\u1F10"], [7961, "\u1F11"], [7962, "\u1F12"], [7963, "\u1F13"], [7964, "\u1F14"], [7965, "\u1F15"], [7976, "\u1F20"], [7977, "\u1F21"], [7978, "\u1F22"], [7979, "\u1F23"], [7980, "\u1F24"], [7981, "\u1F25"], [7982, "\u1F26"], [7983, "\u1F27"], [7992, "\u1F30"], [7993, "\u1F31"], [7994, "\u1F32"], [7995, "\u1F33"], [7996, "\u1F34"], [7997, "\u1F35"], [7998, "\u1F36"], [7999, "\u1F37"], [8008, "\u1F40"], [8009, "\u1F41"], [8010, "\u1F42"], [8011, "\u1F43"], [8012, "\u1F44"], [8013, "\u1F45"], [8025, "\u1F51"], [8027, "\u1F53"], [8029, "\u1F55"], [8031, "\u1F57"], [8040, "\u1F60"], [8041, "\u1F61"], [8042, "\u1F62"], [8043, "\u1F63"], [8044, "\u1F64"], [8045, "\u1F65"], [8046, "\u1F66"], [8047, "\u1F67"], [8072, "\u1F80"], [8073, "\u1F81"], [8074, "\u1F82"], [8075, "\u1F83"], [8076, "\u1F84"], [8077, "\u1F85"], [8078, "\u1F86"], [8079, "\u1F87"], [8088, "\u1F90"], [8089, "\u1F91"], [8090, "\u1F92"], [8091, "\u1F93"], [8092, "\u1F94"], [8093, "\u1F95"], [8094, "\u1F96"], [8095, "\u1F97"], [8104, "\u1FA0"], [8105, "\u1FA1"], [8106, "\u1FA2"], [8107, "\u1FA3"], [8108, "\u1FA4"], [8109, "\u1FA5"], [8110, "\u1FA6"], [8111, "\u1FA7"], [8120, "\u1FB0"], [8121, "\u1FB1"], [8122, "\u1F70"], [8123, "\u1F71"], [8124, "\u1FB3"], [8136, "\u1F72"], [8137, "\u1F73"], [8138, "\u1F74"], [8139, "\u1F75"], [8140, "\u1FC3"], [8152, "\u1FD0"], [8153, "\u1FD1"], [8154, "\u1F76"], [8155, "\u1F77"], [8168, "\u1FE0"], [8169, "\u1FE1"], [8170, "\u1F7A"], [8171, "\u1F7B"], [8172, "\u1FE5"], [8184, "\u1F78"], [8185, "\u1F79"], [8186, "\u1F7C"], [8187, "\u1F7D"], [8188, "\u1FF3"], [8486, "\u03C9"], [8490, "k"], [8491, "\xE5"], [8498, "\u214E"], [8544, "\u2170"], [8545, "\u2171"], [8546, "\u2172"], [8547, "\u2173"], [8548, "\u2174"], [8549, "\u2175"], [8550, "\u2176"], [8551, "\u2177"], [8552, "\u2178"], [8553, "\u2179"], [8554, "\u217A"], [8555, "\u217B"], [8556, "\u217C"], [8557, "\u217D"], [8558, "\u217E"], [8559, "\u217F"], [8579, "\u2184"], [9398, "\u24D0"], [9399, "\u24D1"], [9400, "\u24D2"], [9401, "\u24D3"], [9402, "\u24D4"], [9403, "\u24D5"], [9404, "\u24D6"], [9405, "\u24D7"], [9406, "\u24D8"], [9407, "\u24D9"], [9408, "\u24DA"], [9409, "\u24DB"], [9410, "\u24DC"], [9411, "\u24DD"], [9412, "\u24DE"], [9413, "\u24DF"], [9414, "\u24E0"], [9415, "\u24E1"], [9416, "\u24E2"], [9417, "\u24E3"], [9418, "\u24E4"], [9419, "\u24E5"], [9420, "\u24E6"], [9421, "\u24E7"], [9422, "\u24E8"], [9423, "\u24E9"], [11264, "\u2C30"], [11265, "\u2C31"], [11266, "\u2C32"], [11267, "\u2C33"], [11268, "\u2C34"], [11269, "\u2C35"], [11270, "\u2C36"], [11271, "\u2C37"], [11272, "\u2C38"], [11273, "\u2C39"], [11274, "\u2C3A"], [11275, "\u2C3B"], [11276, "\u2C3C"], [11277, "\u2C3D"], [11278, "\u2C3E"], [11279, "\u2C3F"], [11280, "\u2C40"], [11281, "\u2C41"], [11282, "\u2C42"], [11283, "\u2C43"], [11284, "\u2C44"], [11285, "\u2C45"], [11286, "\u2C46"], [11287, "\u2C47"], [11288, "\u2C48"], [11289, "\u2C49"], [11290, "\u2C4A"], [11291, "\u2C4B"], [11292, "\u2C4C"], [11293, "\u2C4D"], [11294, "\u2C4E"], [11295, "\u2C4F"], [11296, "\u2C50"], [11297, "\u2C51"], [11298, "\u2C52"], [11299, "\u2C53"], [11300, "\u2C54"], [11301, "\u2C55"], [11302, "\u2C56"], [11303, "\u2C57"], [11304, "\u2C58"], [11305, "\u2C59"], [11306, "\u2C5A"], [11307, "\u2C5B"], [11308, "\u2C5C"], [11309, "\u2C5D"], [11310, "\u2C5E"], [11311, "\u2C5F"], [11360, "\u2C61"], [11362, "\u026B"], [11363, "\u1D7D"], [11364, "\u027D"], [11367, "\u2C68"], [11369, "\u2C6A"], [11371, "\u2C6C"], [11373, "\u0251"], [11374, "\u0271"], [11375, "\u0250"], [11376, "\u0252"], [11378, "\u2C73"], [11381, "\u2C76"], [11390, "\u023F"], [11391, "\u0240"], [11392, "\u2C81"], [11394, "\u2C83"], [11396, "\u2C85"], [11398, "\u2C87"], [11400, "\u2C89"], [11402, "\u2C8B"], [11404, "\u2C8D"], [11406, "\u2C8F"], [11408, "\u2C91"], [11410, "\u2C93"], [11412, "\u2C95"], [11414, "\u2C97"], [11416, "\u2C99"], [11418, "\u2C9B"], [11420, "\u2C9D"], [11422, "\u2C9F"], [11424, "\u2CA1"], [11426, "\u2CA3"], [11428, "\u2CA5"], [11430, "\u2CA7"], [11432, "\u2CA9"], [11434, "\u2CAB"], [11436, "\u2CAD"], [11438, "\u2CAF"], [11440, "\u2CB1"], [11442, "\u2CB3"], [11444, "\u2CB5"], [11446, "\u2CB7"], [11448, "\u2CB9"], [11450, "\u2CBB"], [11452, "\u2CBD"], [11454, "\u2CBF"], [11456, "\u2CC1"], [11458, "\u2CC3"], [11460, "\u2CC5"], [11462, "\u2CC7"], [11464, "\u2CC9"], [11466, "\u2CCB"], [11468, "\u2CCD"], [11470, "\u2CCF"], [11472, "\u2CD1"], [11474, "\u2CD3"], [11476, "\u2CD5"], [11478, "\u2CD7"], [11480, "\u2CD9"], [11482, "\u2CDB"], [11484, "\u2CDD"], [11486, "\u2CDF"], [11488, "\u2CE1"], [11490, "\u2CE3"], [11499, "\u2CEC"], [11501, "\u2CEE"], [11506, "\u2CF3"], [42560, "\uA641"], [42562, "\uA643"], [42564, "\uA645"], [42566, "\uA647"], [42568, "\uA649"], [42570, "\uA64B"], [42572, "\uA64D"], [42574, "\uA64F"], [42576, "\uA651"], [42578, "\uA653"], [42580, "\uA655"], [42582, "\uA657"], [42584, "\uA659"], [42586, "\uA65B"], [42588, "\uA65D"], [42590, "\uA65F"], [42592, "\uA661"], [42594, "\uA663"], [42596, "\uA665"], [42598, "\uA667"], [42600, "\uA669"], [42602, "\uA66B"], [42604, "\uA66D"], [42624, "\uA681"], [42626, "\uA683"], [42628, "\uA685"], [42630, "\uA687"], [42632, "\uA689"], [42634, "\uA68B"], [42636, "\uA68D"], [42638, "\uA68F"], [42640, "\uA691"], [42642, "\uA693"], [42644, "\uA695"], [42646, "\uA697"], [42648, "\uA699"], [42650, "\uA69B"], [42786, "\uA723"], [42788, "\uA725"], [42790, "\uA727"], [42792, "\uA729"], [42794, "\uA72B"], [42796, "\uA72D"], [42798, "\uA72F"], [42802, "\uA733"], [42804, "\uA735"], [42806, "\uA737"], [42808, "\uA739"], [42810, "\uA73B"], [42812, "\uA73D"], [42814, "\uA73F"], [42816, "\uA741"], [42818, "\uA743"], [42820, "\uA745"], [42822, "\uA747"], [42824, "\uA749"], [42826, "\uA74B"], [42828, "\uA74D"], [42830, "\uA74F"], [42832, "\uA751"], [42834, "\uA753"], [42836, "\uA755"], [42838, "\uA757"], [42840, "\uA759"], [42842, "\uA75B"], [42844, "\uA75D"], [42846, "\uA75F"], [42848, "\uA761"], [42850, "\uA763"], [42852, "\uA765"], [42854, "\uA767"], [42856, "\uA769"], [42858, "\uA76B"], [42860, "\uA76D"], [42862, "\uA76F"], [42873, "\uA77A"], [42875, "\uA77C"], [42877, "\u1D79"], [42878, "\uA77F"], [42880, "\uA781"], [42882, "\uA783"], [42884, "\uA785"], [42886, "\uA787"], [42891, "\uA78C"], [42893, "\u0265"], [42896, "\uA791"], [42898, "\uA793"], [42902, "\uA797"], [42904, "\uA799"], [42906, "\uA79B"], [42908, "\uA79D"], [42910, "\uA79F"], [42912, "\uA7A1"], [42914, "\uA7A3"], [42916, "\uA7A5"], [42918, "\uA7A7"], [42920, "\uA7A9"], [42922, "\u0266"], [42923, "\u025C"], [42924, "\u0261"], [42925, "\u026C"], [42926, "\u026A"], [42928, "\u029E"], [42929, "\u0287"], [42930, "\u029D"], [42931, "\uAB53"], [42932, "\uA7B5"], [42934, "\uA7B7"], [42936, "\uA7B9"], [42938, "\uA7BB"], [42940, "\uA7BD"], [42942, "\uA7BF"], [42944, "\uA7C1"], [42946, "\uA7C3"], [42948, "\uA794"], [42949, "\u0282"], [42950, "\u1D8E"], [42951, "\uA7C8"], [42953, "\uA7CA"], [42955, "\u0264"], [42956, "\uA7CD"], [42960, "\uA7D1"], [42966, "\uA7D7"], [42968, "\uA7D9"], [42970, "\uA7DB"], [42972, "\u019B"], [42997, "\uA7F6"], [65313, "\uFF41"], [65314, "\uFF42"], [65315, "\uFF43"], [65316, "\uFF44"], [65317, "\uFF45"], [65318, "\uFF46"], [65319, "\uFF47"], [65320, "\uFF48"], [65321, "\uFF49"], [65322, "\uFF4A"], [65323, "\uFF4B"], [65324, "\uFF4C"], [65325, "\uFF4D"], [65326, "\uFF4E"], [65327, "\uFF4F"], [65328, "\uFF50"], [65329, "\uFF51"], [65330, "\uFF52"], [65331, "\uFF53"], [65332, "\uFF54"], [65333, "\uFF55"], [65334, "\uFF56"], [65335, "\uFF57"], [65336, "\uFF58"], [65337, "\uFF59"], [65338, "\uFF5A"], [66560, "\u{10428}"], [66561, "\u{10429}"], [66562, "\u{1042A}"], [66563, "\u{1042B}"], [66564, "\u{1042C}"], [66565, "\u{1042D}"], [66566, "\u{1042E}"], [66567, "\u{1042F}"], [66568, "\u{10430}"], [66569, "\u{10431}"], [66570, "\u{10432}"], [66571, "\u{10433}"], [66572, "\u{10434}"], [66573, "\u{10435}"], [66574, "\u{10436}"], [66575, "\u{10437}"], [66576, "\u{10438}"], [66577, "\u{10439}"], [66578, "\u{1043A}"], [66579, "\u{1043B}"], [66580, "\u{1043C}"], [66581, "\u{1043D}"], [66582, "\u{1043E}"], [66583, "\u{1043F}"], [66584, "\u{10440}"], [66585, "\u{10441}"], [66586, "\u{10442}"], [66587, "\u{10443}"], [66588, "\u{10444}"], [66589, "\u{10445}"], [66590, "\u{10446}"], [66591, "\u{10447}"], [66592, "\u{10448}"], [66593, "\u{10449}"], [66594, "\u{1044A}"], [66595, "\u{1044B}"], [66596, "\u{1044C}"], [66597, "\u{1044D}"], [66598, "\u{1044E}"], [66599, "\u{1044F}"], [66736, "\u{104D8}"], [66737, "\u{104D9}"], [66738, "\u{104DA}"], [66739, "\u{104DB}"], [66740, "\u{104DC}"], [66741, "\u{104DD}"], [66742, "\u{104DE}"], [66743, "\u{104DF}"], [66744, "\u{104E0}"], [66745, "\u{104E1}"], [66746, "\u{104E2}"], [66747, "\u{104E3}"], [66748, "\u{104E4}"], [66749, "\u{104E5}"], [66750, "\u{104E6}"], [66751, "\u{104E7}"], [66752, "\u{104E8}"], [66753, "\u{104E9}"], [66754, "\u{104EA}"], [66755, "\u{104EB}"], [66756, "\u{104EC}"], [66757, "\u{104ED}"], [66758, "\u{104EE}"], [66759, "\u{104EF}"], [66760, "\u{104F0}"], [66761, "\u{104F1}"], [66762, "\u{104F2}"], [66763, "\u{104F3}"], [66764, "\u{104F4}"], [66765, "\u{104F5}"], [66766, "\u{104F6}"], [66767, "\u{104F7}"], [66768, "\u{104F8}"], [66769, "\u{104F9}"], [66770, "\u{104FA}"], [66771, "\u{104FB}"], [66928, "\u{10597}"], [66929, "\u{10598}"], [66930, "\u{10599}"], [66931, "\u{1059A}"], [66932, "\u{1059B}"], [66933, "\u{1059C}"], [66934, "\u{1059D}"], [66935, "\u{1059E}"], [66936, "\u{1059F}"], [66937, "\u{105A0}"], [66938, "\u{105A1}"], [66940, "\u{105A3}"], [66941, "\u{105A4}"], [66942, "\u{105A5}"], [66943, "\u{105A6}"], [66944, "\u{105A7}"], [66945, "\u{105A8}"], [66946, "\u{105A9}"], [66947, "\u{105AA}"], [66948, "\u{105AB}"], [66949, "\u{105AC}"], [66950, "\u{105AD}"], [66951, "\u{105AE}"], [66952, "\u{105AF}"], [66953, "\u{105B0}"], [66954, "\u{105B1}"], [66956, "\u{105B3}"], [66957, "\u{105B4}"], [66958, "\u{105B5}"], [66959, "\u{105B6}"], [66960, "\u{105B7}"], [66961, "\u{105B8}"], [66962, "\u{105B9}"], [66964, "\u{105BB}"], [66965, "\u{105BC}"], [68736, "\u{10CC0}"], [68737, "\u{10CC1}"], [68738, "\u{10CC2}"], [68739, "\u{10CC3}"], [68740, "\u{10CC4}"], [68741, "\u{10CC5}"], [68742, "\u{10CC6}"], [68743, "\u{10CC7}"], [68744, "\u{10CC8}"], [68745, "\u{10CC9}"], [68746, "\u{10CCA}"], [68747, "\u{10CCB}"], [68748, "\u{10CCC}"], [68749, "\u{10CCD}"], [68750, "\u{10CCE}"], [68751, "\u{10CCF}"], [68752, "\u{10CD0}"], [68753, "\u{10CD1}"], [68754, "\u{10CD2}"], [68755, "\u{10CD3}"], [68756, "\u{10CD4}"], [68757, "\u{10CD5}"], [68758, "\u{10CD6}"], [68759, "\u{10CD7}"], [68760, "\u{10CD8}"], [68761, "\u{10CD9}"], [68762, "\u{10CDA}"], [68763, "\u{10CDB}"], [68764, "\u{10CDC}"], [68765, "\u{10CDD}"], [68766, "\u{10CDE}"], [68767, "\u{10CDF}"], [68768, "\u{10CE0}"], [68769, "\u{10CE1}"], [68770, "\u{10CE2}"], [68771, "\u{10CE3}"], [68772, "\u{10CE4}"], [68773, "\u{10CE5}"], [68774, "\u{10CE6}"], [68775, "\u{10CE7}"], [68776, "\u{10CE8}"], [68777, "\u{10CE9}"], [68778, "\u{10CEA}"], [68779, "\u{10CEB}"], [68780, "\u{10CEC}"], [68781, "\u{10CED}"], [68782, "\u{10CEE}"], [68783, "\u{10CEF}"], [68784, "\u{10CF0}"], [68785, "\u{10CF1}"], [68786, "\u{10CF2}"], [68944, "\u{10D70}"], [68945, "\u{10D71}"], [68946, "\u{10D72}"], [68947, "\u{10D73}"], [68948, "\u{10D74}"], [68949, "\u{10D75}"], [68950, "\u{10D76}"], [68951, "\u{10D77}"], [68952, "\u{10D78}"], [68953, "\u{10D79}"], [68954, "\u{10D7A}"], [68955, "\u{10D7B}"], [68956, "\u{10D7C}"], [68957, "\u{10D7D}"], [68958, "\u{10D7E}"], [68959, "\u{10D7F}"], [68960, "\u{10D80}"], [68961, "\u{10D81}"], [68962, "\u{10D82}"], [68963, "\u{10D83}"], [68964, "\u{10D84}"], [68965, "\u{10D85}"], [71840, "\u{118C0}"], [71841, "\u{118C1}"], [71842, "\u{118C2}"], [71843, "\u{118C3}"], [71844, "\u{118C4}"], [71845, "\u{118C5}"], [71846, "\u{118C6}"], [71847, "\u{118C7}"], [71848, "\u{118C8}"], [71849, "\u{118C9}"], [71850, "\u{118CA}"], [71851, "\u{118CB}"], [71852, "\u{118CC}"], [71853, "\u{118CD}"], [71854, "\u{118CE}"], [71855, "\u{118CF}"], [71856, "\u{118D0}"], [71857, "\u{118D1}"], [71858, "\u{118D2}"], [71859, "\u{118D3}"], [71860, "\u{118D4}"], [71861, "\u{118D5}"], [71862, "\u{118D6}"], [71863, "\u{118D7}"], [71864, "\u{118D8}"], [71865, "\u{118D9}"], [71866, "\u{118DA}"], [71867, "\u{118DB}"], [71868, "\u{118DC}"], [71869, "\u{118DD}"], [71870, "\u{118DE}"], [71871, "\u{118DF}"], [93760, "\u{16E60}"], [93761, "\u{16E61}"], [93762, "\u{16E62}"], [93763, "\u{16E63}"], [93764, "\u{16E64}"], [93765, "\u{16E65}"], [93766, "\u{16E66}"], [93767, "\u{16E67}"], [93768, "\u{16E68}"], [93769, "\u{16E69}"], [93770, "\u{16E6A}"], [93771, "\u{16E6B}"], [93772, "\u{16E6C}"], [93773, "\u{16E6D}"], [93774, "\u{16E6E}"], [93775, "\u{16E6F}"], [93776, "\u{16E70}"], [93777, "\u{16E71}"], [93778, "\u{16E72}"], [93779, "\u{16E73}"], [93780, "\u{16E74}"], [93781, "\u{16E75}"], [93782, "\u{16E76}"], [93783, "\u{16E77}"], [93784, "\u{16E78}"], [93785, "\u{16E79}"], [93786, "\u{16E7A}"], [93787, "\u{16E7B}"], [93788, "\u{16E7C}"], [93789, "\u{16E7D}"], [93790, "\u{16E7E}"], [93791, "\u{16E7F}"], [125184, "\u{1E922}"], [125185, "\u{1E923}"], [125186, "\u{1E924}"], [125187, "\u{1E925}"], [125188, "\u{1E926}"], [125189, "\u{1E927}"], [125190, "\u{1E928}"], [125191, "\u{1E929}"], [125192, "\u{1E92A}"], [125193, "\u{1E92B}"], [125194, "\u{1E92C}"], [125195, "\u{1E92D}"], [125196, "\u{1E92E}"], [125197, "\u{1E92F}"], [125198, "\u{1E930}"], [125199, "\u{1E931}"], [125200, "\u{1E932}"], [125201, "\u{1E933}"], [125202, "\u{1E934}"], [125203, "\u{1E935}"], [125204, "\u{1E936}"], [125205, "\u{1E937}"], [125206, "\u{1E938}"], [125207, "\u{1E939}"], [125208, "\u{1E93A}"], [125209, "\u{1E93B}"], [125210, "\u{1E93C}"], [125211, "\u{1E93D}"], [125212, "\u{1E93E}"], [125213, "\u{1E93F}"], [125214, "\u{1E940}"], [125215, "\u{1E941}"], [125216, "\u{1E942}"], [125217, "\u{1E943}"]];
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
// packages/safe-bash-command-csvkit/dist/unicode-upper-profile.js
|
|
2316
|
-
init_buffer();
|
|
2317
|
-
var upperMappings = [[97, "A"], [98, "B"], [99, "C"], [100, "D"], [101, "E"], [102, "F"], [103, "G"], [104, "H"], [105, "I"], [106, "J"], [107, "K"], [108, "L"], [109, "M"], [110, "N"], [111, "O"], [112, "P"], [113, "Q"], [114, "R"], [115, "S"], [116, "T"], [117, "U"], [118, "V"], [119, "W"], [120, "X"], [121, "Y"], [122, "Z"], [181, "\u039C"], [223, "SS"], [224, "\xC0"], [225, "\xC1"], [226, "\xC2"], [227, "\xC3"], [228, "\xC4"], [229, "\xC5"], [230, "\xC6"], [231, "\xC7"], [232, "\xC8"], [233, "\xC9"], [234, "\xCA"], [235, "\xCB"], [236, "\xCC"], [237, "\xCD"], [238, "\xCE"], [239, "\xCF"], [240, "\xD0"], [241, "\xD1"], [242, "\xD2"], [243, "\xD3"], [244, "\xD4"], [245, "\xD5"], [246, "\xD6"], [248, "\xD8"], [249, "\xD9"], [250, "\xDA"], [251, "\xDB"], [252, "\xDC"], [253, "\xDD"], [254, "\xDE"], [255, "\u0178"], [257, "\u0100"], [259, "\u0102"], [261, "\u0104"], [263, "\u0106"], [265, "\u0108"], [267, "\u010A"], [269, "\u010C"], [271, "\u010E"], [273, "\u0110"], [275, "\u0112"], [277, "\u0114"], [279, "\u0116"], [281, "\u0118"], [283, "\u011A"], [285, "\u011C"], [287, "\u011E"], [289, "\u0120"], [291, "\u0122"], [293, "\u0124"], [295, "\u0126"], [297, "\u0128"], [299, "\u012A"], [301, "\u012C"], [303, "\u012E"], [305, "I"], [307, "\u0132"], [309, "\u0134"], [311, "\u0136"], [314, "\u0139"], [316, "\u013B"], [318, "\u013D"], [320, "\u013F"], [322, "\u0141"], [324, "\u0143"], [326, "\u0145"], [328, "\u0147"], [329, "\u02BCN"], [331, "\u014A"], [333, "\u014C"], [335, "\u014E"], [337, "\u0150"], [339, "\u0152"], [341, "\u0154"], [343, "\u0156"], [345, "\u0158"], [347, "\u015A"], [349, "\u015C"], [351, "\u015E"], [353, "\u0160"], [355, "\u0162"], [357, "\u0164"], [359, "\u0166"], [361, "\u0168"], [363, "\u016A"], [365, "\u016C"], [367, "\u016E"], [369, "\u0170"], [371, "\u0172"], [373, "\u0174"], [375, "\u0176"], [378, "\u0179"], [380, "\u017B"], [382, "\u017D"], [383, "S"], [384, "\u0243"], [387, "\u0182"], [389, "\u0184"], [392, "\u0187"], [396, "\u018B"], [402, "\u0191"], [405, "\u01F6"], [409, "\u0198"], [410, "\u023D"], [411, "\uA7DC"], [414, "\u0220"], [417, "\u01A0"], [419, "\u01A2"], [421, "\u01A4"], [424, "\u01A7"], [429, "\u01AC"], [432, "\u01AF"], [436, "\u01B3"], [438, "\u01B5"], [441, "\u01B8"], [445, "\u01BC"], [447, "\u01F7"], [453, "\u01C4"], [454, "\u01C4"], [456, "\u01C7"], [457, "\u01C7"], [459, "\u01CA"], [460, "\u01CA"], [462, "\u01CD"], [464, "\u01CF"], [466, "\u01D1"], [468, "\u01D3"], [470, "\u01D5"], [472, "\u01D7"], [474, "\u01D9"], [476, "\u01DB"], [477, "\u018E"], [479, "\u01DE"], [481, "\u01E0"], [483, "\u01E2"], [485, "\u01E4"], [487, "\u01E6"], [489, "\u01E8"], [491, "\u01EA"], [493, "\u01EC"], [495, "\u01EE"], [496, "J\u030C"], [498, "\u01F1"], [499, "\u01F1"], [501, "\u01F4"], [505, "\u01F8"], [507, "\u01FA"], [509, "\u01FC"], [511, "\u01FE"], [513, "\u0200"], [515, "\u0202"], [517, "\u0204"], [519, "\u0206"], [521, "\u0208"], [523, "\u020A"], [525, "\u020C"], [527, "\u020E"], [529, "\u0210"], [531, "\u0212"], [533, "\u0214"], [535, "\u0216"], [537, "\u0218"], [539, "\u021A"], [541, "\u021C"], [543, "\u021E"], [547, "\u0222"], [549, "\u0224"], [551, "\u0226"], [553, "\u0228"], [555, "\u022A"], [557, "\u022C"], [559, "\u022E"], [561, "\u0230"], [563, "\u0232"], [572, "\u023B"], [575, "\u2C7E"], [576, "\u2C7F"], [578, "\u0241"], [583, "\u0246"], [585, "\u0248"], [587, "\u024A"], [589, "\u024C"], [591, "\u024E"], [592, "\u2C6F"], [593, "\u2C6D"], [594, "\u2C70"], [595, "\u0181"], [596, "\u0186"], [598, "\u0189"], [599, "\u018A"], [601, "\u018F"], [603, "\u0190"], [604, "\uA7AB"], [608, "\u0193"], [609, "\uA7AC"], [611, "\u0194"], [612, "\uA7CB"], [613, "\uA78D"], [614, "\uA7AA"], [616, "\u0197"], [617, "\u0196"], [618, "\uA7AE"], [619, "\u2C62"], [620, "\uA7AD"], [623, "\u019C"], [625, "\u2C6E"], [626, "\u019D"], [629, "\u019F"], [637, "\u2C64"], [640, "\u01A6"], [642, "\uA7C5"], [643, "\u01A9"], [647, "\uA7B1"], [648, "\u01AE"], [649, "\u0244"], [650, "\u01B1"], [651, "\u01B2"], [652, "\u0245"], [658, "\u01B7"], [669, "\uA7B2"], [670, "\uA7B0"], [837, "\u0399"], [881, "\u0370"], [883, "\u0372"], [887, "\u0376"], [891, "\u03FD"], [892, "\u03FE"], [893, "\u03FF"], [912, "\u0399\u0308\u0301"], [940, "\u0386"], [941, "\u0388"], [942, "\u0389"], [943, "\u038A"], [944, "\u03A5\u0308\u0301"], [945, "\u0391"], [946, "\u0392"], [947, "\u0393"], [948, "\u0394"], [949, "\u0395"], [950, "\u0396"], [951, "\u0397"], [952, "\u0398"], [953, "\u0399"], [954, "\u039A"], [955, "\u039B"], [956, "\u039C"], [957, "\u039D"], [958, "\u039E"], [959, "\u039F"], [960, "\u03A0"], [961, "\u03A1"], [962, "\u03A3"], [963, "\u03A3"], [964, "\u03A4"], [965, "\u03A5"], [966, "\u03A6"], [967, "\u03A7"], [968, "\u03A8"], [969, "\u03A9"], [970, "\u03AA"], [971, "\u03AB"], [972, "\u038C"], [973, "\u038E"], [974, "\u038F"], [976, "\u0392"], [977, "\u0398"], [981, "\u03A6"], [982, "\u03A0"], [983, "\u03CF"], [985, "\u03D8"], [987, "\u03DA"], [989, "\u03DC"], [991, "\u03DE"], [993, "\u03E0"], [995, "\u03E2"], [997, "\u03E4"], [999, "\u03E6"], [1001, "\u03E8"], [1003, "\u03EA"], [1005, "\u03EC"], [1007, "\u03EE"], [1008, "\u039A"], [1009, "\u03A1"], [1010, "\u03F9"], [1011, "\u037F"], [1013, "\u0395"], [1016, "\u03F7"], [1019, "\u03FA"], [1072, "\u0410"], [1073, "\u0411"], [1074, "\u0412"], [1075, "\u0413"], [1076, "\u0414"], [1077, "\u0415"], [1078, "\u0416"], [1079, "\u0417"], [1080, "\u0418"], [1081, "\u0419"], [1082, "\u041A"], [1083, "\u041B"], [1084, "\u041C"], [1085, "\u041D"], [1086, "\u041E"], [1087, "\u041F"], [1088, "\u0420"], [1089, "\u0421"], [1090, "\u0422"], [1091, "\u0423"], [1092, "\u0424"], [1093, "\u0425"], [1094, "\u0426"], [1095, "\u0427"], [1096, "\u0428"], [1097, "\u0429"], [1098, "\u042A"], [1099, "\u042B"], [1100, "\u042C"], [1101, "\u042D"], [1102, "\u042E"], [1103, "\u042F"], [1104, "\u0400"], [1105, "\u0401"], [1106, "\u0402"], [1107, "\u0403"], [1108, "\u0404"], [1109, "\u0405"], [1110, "\u0406"], [1111, "\u0407"], [1112, "\u0408"], [1113, "\u0409"], [1114, "\u040A"], [1115, "\u040B"], [1116, "\u040C"], [1117, "\u040D"], [1118, "\u040E"], [1119, "\u040F"], [1121, "\u0460"], [1123, "\u0462"], [1125, "\u0464"], [1127, "\u0466"], [1129, "\u0468"], [1131, "\u046A"], [1133, "\u046C"], [1135, "\u046E"], [1137, "\u0470"], [1139, "\u0472"], [1141, "\u0474"], [1143, "\u0476"], [1145, "\u0478"], [1147, "\u047A"], [1149, "\u047C"], [1151, "\u047E"], [1153, "\u0480"], [1163, "\u048A"], [1165, "\u048C"], [1167, "\u048E"], [1169, "\u0490"], [1171, "\u0492"], [1173, "\u0494"], [1175, "\u0496"], [1177, "\u0498"], [1179, "\u049A"], [1181, "\u049C"], [1183, "\u049E"], [1185, "\u04A0"], [1187, "\u04A2"], [1189, "\u04A4"], [1191, "\u04A6"], [1193, "\u04A8"], [1195, "\u04AA"], [1197, "\u04AC"], [1199, "\u04AE"], [1201, "\u04B0"], [1203, "\u04B2"], [1205, "\u04B4"], [1207, "\u04B6"], [1209, "\u04B8"], [1211, "\u04BA"], [1213, "\u04BC"], [1215, "\u04BE"], [1218, "\u04C1"], [1220, "\u04C3"], [1222, "\u04C5"], [1224, "\u04C7"], [1226, "\u04C9"], [1228, "\u04CB"], [1230, "\u04CD"], [1231, "\u04C0"], [1233, "\u04D0"], [1235, "\u04D2"], [1237, "\u04D4"], [1239, "\u04D6"], [1241, "\u04D8"], [1243, "\u04DA"], [1245, "\u04DC"], [1247, "\u04DE"], [1249, "\u04E0"], [1251, "\u04E2"], [1253, "\u04E4"], [1255, "\u04E6"], [1257, "\u04E8"], [1259, "\u04EA"], [1261, "\u04EC"], [1263, "\u04EE"], [1265, "\u04F0"], [1267, "\u04F2"], [1269, "\u04F4"], [1271, "\u04F6"], [1273, "\u04F8"], [1275, "\u04FA"], [1277, "\u04FC"], [1279, "\u04FE"], [1281, "\u0500"], [1283, "\u0502"], [1285, "\u0504"], [1287, "\u0506"], [1289, "\u0508"], [1291, "\u050A"], [1293, "\u050C"], [1295, "\u050E"], [1297, "\u0510"], [1299, "\u0512"], [1301, "\u0514"], [1303, "\u0516"], [1305, "\u0518"], [1307, "\u051A"], [1309, "\u051C"], [1311, "\u051E"], [1313, "\u0520"], [1315, "\u0522"], [1317, "\u0524"], [1319, "\u0526"], [1321, "\u0528"], [1323, "\u052A"], [1325, "\u052C"], [1327, "\u052E"], [1377, "\u0531"], [1378, "\u0532"], [1379, "\u0533"], [1380, "\u0534"], [1381, "\u0535"], [1382, "\u0536"], [1383, "\u0537"], [1384, "\u0538"], [1385, "\u0539"], [1386, "\u053A"], [1387, "\u053B"], [1388, "\u053C"], [1389, "\u053D"], [1390, "\u053E"], [1391, "\u053F"], [1392, "\u0540"], [1393, "\u0541"], [1394, "\u0542"], [1395, "\u0543"], [1396, "\u0544"], [1397, "\u0545"], [1398, "\u0546"], [1399, "\u0547"], [1400, "\u0548"], [1401, "\u0549"], [1402, "\u054A"], [1403, "\u054B"], [1404, "\u054C"], [1405, "\u054D"], [1406, "\u054E"], [1407, "\u054F"], [1408, "\u0550"], [1409, "\u0551"], [1410, "\u0552"], [1411, "\u0553"], [1412, "\u0554"], [1413, "\u0555"], [1414, "\u0556"], [1415, "\u0535\u0552"], [4304, "\u1C90"], [4305, "\u1C91"], [4306, "\u1C92"], [4307, "\u1C93"], [4308, "\u1C94"], [4309, "\u1C95"], [4310, "\u1C96"], [4311, "\u1C97"], [4312, "\u1C98"], [4313, "\u1C99"], [4314, "\u1C9A"], [4315, "\u1C9B"], [4316, "\u1C9C"], [4317, "\u1C9D"], [4318, "\u1C9E"], [4319, "\u1C9F"], [4320, "\u1CA0"], [4321, "\u1CA1"], [4322, "\u1CA2"], [4323, "\u1CA3"], [4324, "\u1CA4"], [4325, "\u1CA5"], [4326, "\u1CA6"], [4327, "\u1CA7"], [4328, "\u1CA8"], [4329, "\u1CA9"], [4330, "\u1CAA"], [4331, "\u1CAB"], [4332, "\u1CAC"], [4333, "\u1CAD"], [4334, "\u1CAE"], [4335, "\u1CAF"], [4336, "\u1CB0"], [4337, "\u1CB1"], [4338, "\u1CB2"], [4339, "\u1CB3"], [4340, "\u1CB4"], [4341, "\u1CB5"], [4342, "\u1CB6"], [4343, "\u1CB7"], [4344, "\u1CB8"], [4345, "\u1CB9"], [4346, "\u1CBA"], [4349, "\u1CBD"], [4350, "\u1CBE"], [4351, "\u1CBF"], [5112, "\u13F0"], [5113, "\u13F1"], [5114, "\u13F2"], [5115, "\u13F3"], [5116, "\u13F4"], [5117, "\u13F5"], [7296, "\u0412"], [7297, "\u0414"], [7298, "\u041E"], [7299, "\u0421"], [7300, "\u0422"], [7301, "\u0422"], [7302, "\u042A"], [7303, "\u0462"], [7304, "\uA64A"], [7306, "\u1C89"], [7545, "\uA77D"], [7549, "\u2C63"], [7566, "\uA7C6"], [7681, "\u1E00"], [7683, "\u1E02"], [7685, "\u1E04"], [7687, "\u1E06"], [7689, "\u1E08"], [7691, "\u1E0A"], [7693, "\u1E0C"], [7695, "\u1E0E"], [7697, "\u1E10"], [7699, "\u1E12"], [7701, "\u1E14"], [7703, "\u1E16"], [7705, "\u1E18"], [7707, "\u1E1A"], [7709, "\u1E1C"], [7711, "\u1E1E"], [7713, "\u1E20"], [7715, "\u1E22"], [7717, "\u1E24"], [7719, "\u1E26"], [7721, "\u1E28"], [7723, "\u1E2A"], [7725, "\u1E2C"], [7727, "\u1E2E"], [7729, "\u1E30"], [7731, "\u1E32"], [7733, "\u1E34"], [7735, "\u1E36"], [7737, "\u1E38"], [7739, "\u1E3A"], [7741, "\u1E3C"], [7743, "\u1E3E"], [7745, "\u1E40"], [7747, "\u1E42"], [7749, "\u1E44"], [7751, "\u1E46"], [7753, "\u1E48"], [7755, "\u1E4A"], [7757, "\u1E4C"], [7759, "\u1E4E"], [7761, "\u1E50"], [7763, "\u1E52"], [7765, "\u1E54"], [7767, "\u1E56"], [7769, "\u1E58"], [7771, "\u1E5A"], [7773, "\u1E5C"], [7775, "\u1E5E"], [7777, "\u1E60"], [7779, "\u1E62"], [7781, "\u1E64"], [7783, "\u1E66"], [7785, "\u1E68"], [7787, "\u1E6A"], [7789, "\u1E6C"], [7791, "\u1E6E"], [7793, "\u1E70"], [7795, "\u1E72"], [7797, "\u1E74"], [7799, "\u1E76"], [7801, "\u1E78"], [7803, "\u1E7A"], [7805, "\u1E7C"], [7807, "\u1E7E"], [7809, "\u1E80"], [7811, "\u1E82"], [7813, "\u1E84"], [7815, "\u1E86"], [7817, "\u1E88"], [7819, "\u1E8A"], [7821, "\u1E8C"], [7823, "\u1E8E"], [7825, "\u1E90"], [7827, "\u1E92"], [7829, "\u1E94"], [7830, "H\u0331"], [7831, "T\u0308"], [7832, "W\u030A"], [7833, "Y\u030A"], [7834, "A\u02BE"], [7835, "\u1E60"], [7841, "\u1EA0"], [7843, "\u1EA2"], [7845, "\u1EA4"], [7847, "\u1EA6"], [7849, "\u1EA8"], [7851, "\u1EAA"], [7853, "\u1EAC"], [7855, "\u1EAE"], [7857, "\u1EB0"], [7859, "\u1EB2"], [7861, "\u1EB4"], [7863, "\u1EB6"], [7865, "\u1EB8"], [7867, "\u1EBA"], [7869, "\u1EBC"], [7871, "\u1EBE"], [7873, "\u1EC0"], [7875, "\u1EC2"], [7877, "\u1EC4"], [7879, "\u1EC6"], [7881, "\u1EC8"], [7883, "\u1ECA"], [7885, "\u1ECC"], [7887, "\u1ECE"], [7889, "\u1ED0"], [7891, "\u1ED2"], [7893, "\u1ED4"], [7895, "\u1ED6"], [7897, "\u1ED8"], [7899, "\u1EDA"], [7901, "\u1EDC"], [7903, "\u1EDE"], [7905, "\u1EE0"], [7907, "\u1EE2"], [7909, "\u1EE4"], [7911, "\u1EE6"], [7913, "\u1EE8"], [7915, "\u1EEA"], [7917, "\u1EEC"], [7919, "\u1EEE"], [7921, "\u1EF0"], [7923, "\u1EF2"], [7925, "\u1EF4"], [7927, "\u1EF6"], [7929, "\u1EF8"], [7931, "\u1EFA"], [7933, "\u1EFC"], [7935, "\u1EFE"], [7936, "\u1F08"], [7937, "\u1F09"], [7938, "\u1F0A"], [7939, "\u1F0B"], [7940, "\u1F0C"], [7941, "\u1F0D"], [7942, "\u1F0E"], [7943, "\u1F0F"], [7952, "\u1F18"], [7953, "\u1F19"], [7954, "\u1F1A"], [7955, "\u1F1B"], [7956, "\u1F1C"], [7957, "\u1F1D"], [7968, "\u1F28"], [7969, "\u1F29"], [7970, "\u1F2A"], [7971, "\u1F2B"], [7972, "\u1F2C"], [7973, "\u1F2D"], [7974, "\u1F2E"], [7975, "\u1F2F"], [7984, "\u1F38"], [7985, "\u1F39"], [7986, "\u1F3A"], [7987, "\u1F3B"], [7988, "\u1F3C"], [7989, "\u1F3D"], [7990, "\u1F3E"], [7991, "\u1F3F"], [8e3, "\u1F48"], [8001, "\u1F49"], [8002, "\u1F4A"], [8003, "\u1F4B"], [8004, "\u1F4C"], [8005, "\u1F4D"], [8016, "\u03A5\u0313"], [8017, "\u1F59"], [8018, "\u03A5\u0313\u0300"], [8019, "\u1F5B"], [8020, "\u03A5\u0313\u0301"], [8021, "\u1F5D"], [8022, "\u03A5\u0313\u0342"], [8023, "\u1F5F"], [8032, "\u1F68"], [8033, "\u1F69"], [8034, "\u1F6A"], [8035, "\u1F6B"], [8036, "\u1F6C"], [8037, "\u1F6D"], [8038, "\u1F6E"], [8039, "\u1F6F"], [8048, "\u1FBA"], [8049, "\u1FBB"], [8050, "\u1FC8"], [8051, "\u1FC9"], [8052, "\u1FCA"], [8053, "\u1FCB"], [8054, "\u1FDA"], [8055, "\u1FDB"], [8056, "\u1FF8"], [8057, "\u1FF9"], [8058, "\u1FEA"], [8059, "\u1FEB"], [8060, "\u1FFA"], [8061, "\u1FFB"], [8064, "\u1F08\u0399"], [8065, "\u1F09\u0399"], [8066, "\u1F0A\u0399"], [8067, "\u1F0B\u0399"], [8068, "\u1F0C\u0399"], [8069, "\u1F0D\u0399"], [8070, "\u1F0E\u0399"], [8071, "\u1F0F\u0399"], [8072, "\u1F08\u0399"], [8073, "\u1F09\u0399"], [8074, "\u1F0A\u0399"], [8075, "\u1F0B\u0399"], [8076, "\u1F0C\u0399"], [8077, "\u1F0D\u0399"], [8078, "\u1F0E\u0399"], [8079, "\u1F0F\u0399"], [8080, "\u1F28\u0399"], [8081, "\u1F29\u0399"], [8082, "\u1F2A\u0399"], [8083, "\u1F2B\u0399"], [8084, "\u1F2C\u0399"], [8085, "\u1F2D\u0399"], [8086, "\u1F2E\u0399"], [8087, "\u1F2F\u0399"], [8088, "\u1F28\u0399"], [8089, "\u1F29\u0399"], [8090, "\u1F2A\u0399"], [8091, "\u1F2B\u0399"], [8092, "\u1F2C\u0399"], [8093, "\u1F2D\u0399"], [8094, "\u1F2E\u0399"], [8095, "\u1F2F\u0399"], [8096, "\u1F68\u0399"], [8097, "\u1F69\u0399"], [8098, "\u1F6A\u0399"], [8099, "\u1F6B\u0399"], [8100, "\u1F6C\u0399"], [8101, "\u1F6D\u0399"], [8102, "\u1F6E\u0399"], [8103, "\u1F6F\u0399"], [8104, "\u1F68\u0399"], [8105, "\u1F69\u0399"], [8106, "\u1F6A\u0399"], [8107, "\u1F6B\u0399"], [8108, "\u1F6C\u0399"], [8109, "\u1F6D\u0399"], [8110, "\u1F6E\u0399"], [8111, "\u1F6F\u0399"], [8112, "\u1FB8"], [8113, "\u1FB9"], [8114, "\u1FBA\u0399"], [8115, "\u0391\u0399"], [8116, "\u0386\u0399"], [8118, "\u0391\u0342"], [8119, "\u0391\u0342\u0399"], [8124, "\u0391\u0399"], [8126, "\u0399"], [8130, "\u1FCA\u0399"], [8131, "\u0397\u0399"], [8132, "\u0389\u0399"], [8134, "\u0397\u0342"], [8135, "\u0397\u0342\u0399"], [8140, "\u0397\u0399"], [8144, "\u1FD8"], [8145, "\u1FD9"], [8146, "\u0399\u0308\u0300"], [8147, "\u0399\u0308\u0301"], [8150, "\u0399\u0342"], [8151, "\u0399\u0308\u0342"], [8160, "\u1FE8"], [8161, "\u1FE9"], [8162, "\u03A5\u0308\u0300"], [8163, "\u03A5\u0308\u0301"], [8164, "\u03A1\u0313"], [8165, "\u1FEC"], [8166, "\u03A5\u0342"], [8167, "\u03A5\u0308\u0342"], [8178, "\u1FFA\u0399"], [8179, "\u03A9\u0399"], [8180, "\u038F\u0399"], [8182, "\u03A9\u0342"], [8183, "\u03A9\u0342\u0399"], [8188, "\u03A9\u0399"], [8526, "\u2132"], [8560, "\u2160"], [8561, "\u2161"], [8562, "\u2162"], [8563, "\u2163"], [8564, "\u2164"], [8565, "\u2165"], [8566, "\u2166"], [8567, "\u2167"], [8568, "\u2168"], [8569, "\u2169"], [8570, "\u216A"], [8571, "\u216B"], [8572, "\u216C"], [8573, "\u216D"], [8574, "\u216E"], [8575, "\u216F"], [8580, "\u2183"], [9424, "\u24B6"], [9425, "\u24B7"], [9426, "\u24B8"], [9427, "\u24B9"], [9428, "\u24BA"], [9429, "\u24BB"], [9430, "\u24BC"], [9431, "\u24BD"], [9432, "\u24BE"], [9433, "\u24BF"], [9434, "\u24C0"], [9435, "\u24C1"], [9436, "\u24C2"], [9437, "\u24C3"], [9438, "\u24C4"], [9439, "\u24C5"], [9440, "\u24C6"], [9441, "\u24C7"], [9442, "\u24C8"], [9443, "\u24C9"], [9444, "\u24CA"], [9445, "\u24CB"], [9446, "\u24CC"], [9447, "\u24CD"], [9448, "\u24CE"], [9449, "\u24CF"], [11312, "\u2C00"], [11313, "\u2C01"], [11314, "\u2C02"], [11315, "\u2C03"], [11316, "\u2C04"], [11317, "\u2C05"], [11318, "\u2C06"], [11319, "\u2C07"], [11320, "\u2C08"], [11321, "\u2C09"], [11322, "\u2C0A"], [11323, "\u2C0B"], [11324, "\u2C0C"], [11325, "\u2C0D"], [11326, "\u2C0E"], [11327, "\u2C0F"], [11328, "\u2C10"], [11329, "\u2C11"], [11330, "\u2C12"], [11331, "\u2C13"], [11332, "\u2C14"], [11333, "\u2C15"], [11334, "\u2C16"], [11335, "\u2C17"], [11336, "\u2C18"], [11337, "\u2C19"], [11338, "\u2C1A"], [11339, "\u2C1B"], [11340, "\u2C1C"], [11341, "\u2C1D"], [11342, "\u2C1E"], [11343, "\u2C1F"], [11344, "\u2C20"], [11345, "\u2C21"], [11346, "\u2C22"], [11347, "\u2C23"], [11348, "\u2C24"], [11349, "\u2C25"], [11350, "\u2C26"], [11351, "\u2C27"], [11352, "\u2C28"], [11353, "\u2C29"], [11354, "\u2C2A"], [11355, "\u2C2B"], [11356, "\u2C2C"], [11357, "\u2C2D"], [11358, "\u2C2E"], [11359, "\u2C2F"], [11361, "\u2C60"], [11365, "\u023A"], [11366, "\u023E"], [11368, "\u2C67"], [11370, "\u2C69"], [11372, "\u2C6B"], [11379, "\u2C72"], [11382, "\u2C75"], [11393, "\u2C80"], [11395, "\u2C82"], [11397, "\u2C84"], [11399, "\u2C86"], [11401, "\u2C88"], [11403, "\u2C8A"], [11405, "\u2C8C"], [11407, "\u2C8E"], [11409, "\u2C90"], [11411, "\u2C92"], [11413, "\u2C94"], [11415, "\u2C96"], [11417, "\u2C98"], [11419, "\u2C9A"], [11421, "\u2C9C"], [11423, "\u2C9E"], [11425, "\u2CA0"], [11427, "\u2CA2"], [11429, "\u2CA4"], [11431, "\u2CA6"], [11433, "\u2CA8"], [11435, "\u2CAA"], [11437, "\u2CAC"], [11439, "\u2CAE"], [11441, "\u2CB0"], [11443, "\u2CB2"], [11445, "\u2CB4"], [11447, "\u2CB6"], [11449, "\u2CB8"], [11451, "\u2CBA"], [11453, "\u2CBC"], [11455, "\u2CBE"], [11457, "\u2CC0"], [11459, "\u2CC2"], [11461, "\u2CC4"], [11463, "\u2CC6"], [11465, "\u2CC8"], [11467, "\u2CCA"], [11469, "\u2CCC"], [11471, "\u2CCE"], [11473, "\u2CD0"], [11475, "\u2CD2"], [11477, "\u2CD4"], [11479, "\u2CD6"], [11481, "\u2CD8"], [11483, "\u2CDA"], [11485, "\u2CDC"], [11487, "\u2CDE"], [11489, "\u2CE0"], [11491, "\u2CE2"], [11500, "\u2CEB"], [11502, "\u2CED"], [11507, "\u2CF2"], [11520, "\u10A0"], [11521, "\u10A1"], [11522, "\u10A2"], [11523, "\u10A3"], [11524, "\u10A4"], [11525, "\u10A5"], [11526, "\u10A6"], [11527, "\u10A7"], [11528, "\u10A8"], [11529, "\u10A9"], [11530, "\u10AA"], [11531, "\u10AB"], [11532, "\u10AC"], [11533, "\u10AD"], [11534, "\u10AE"], [11535, "\u10AF"], [11536, "\u10B0"], [11537, "\u10B1"], [11538, "\u10B2"], [11539, "\u10B3"], [11540, "\u10B4"], [11541, "\u10B5"], [11542, "\u10B6"], [11543, "\u10B7"], [11544, "\u10B8"], [11545, "\u10B9"], [11546, "\u10BA"], [11547, "\u10BB"], [11548, "\u10BC"], [11549, "\u10BD"], [11550, "\u10BE"], [11551, "\u10BF"], [11552, "\u10C0"], [11553, "\u10C1"], [11554, "\u10C2"], [11555, "\u10C3"], [11556, "\u10C4"], [11557, "\u10C5"], [11559, "\u10C7"], [11565, "\u10CD"], [42561, "\uA640"], [42563, "\uA642"], [42565, "\uA644"], [42567, "\uA646"], [42569, "\uA648"], [42571, "\uA64A"], [42573, "\uA64C"], [42575, "\uA64E"], [42577, "\uA650"], [42579, "\uA652"], [42581, "\uA654"], [42583, "\uA656"], [42585, "\uA658"], [42587, "\uA65A"], [42589, "\uA65C"], [42591, "\uA65E"], [42593, "\uA660"], [42595, "\uA662"], [42597, "\uA664"], [42599, "\uA666"], [42601, "\uA668"], [42603, "\uA66A"], [42605, "\uA66C"], [42625, "\uA680"], [42627, "\uA682"], [42629, "\uA684"], [42631, "\uA686"], [42633, "\uA688"], [42635, "\uA68A"], [42637, "\uA68C"], [42639, "\uA68E"], [42641, "\uA690"], [42643, "\uA692"], [42645, "\uA694"], [42647, "\uA696"], [42649, "\uA698"], [42651, "\uA69A"], [42787, "\uA722"], [42789, "\uA724"], [42791, "\uA726"], [42793, "\uA728"], [42795, "\uA72A"], [42797, "\uA72C"], [42799, "\uA72E"], [42803, "\uA732"], [42805, "\uA734"], [42807, "\uA736"], [42809, "\uA738"], [42811, "\uA73A"], [42813, "\uA73C"], [42815, "\uA73E"], [42817, "\uA740"], [42819, "\uA742"], [42821, "\uA744"], [42823, "\uA746"], [42825, "\uA748"], [42827, "\uA74A"], [42829, "\uA74C"], [42831, "\uA74E"], [42833, "\uA750"], [42835, "\uA752"], [42837, "\uA754"], [42839, "\uA756"], [42841, "\uA758"], [42843, "\uA75A"], [42845, "\uA75C"], [42847, "\uA75E"], [42849, "\uA760"], [42851, "\uA762"], [42853, "\uA764"], [42855, "\uA766"], [42857, "\uA768"], [42859, "\uA76A"], [42861, "\uA76C"], [42863, "\uA76E"], [42874, "\uA779"], [42876, "\uA77B"], [42879, "\uA77E"], [42881, "\uA780"], [42883, "\uA782"], [42885, "\uA784"], [42887, "\uA786"], [42892, "\uA78B"], [42897, "\uA790"], [42899, "\uA792"], [42900, "\uA7C4"], [42903, "\uA796"], [42905, "\uA798"], [42907, "\uA79A"], [42909, "\uA79C"], [42911, "\uA79E"], [42913, "\uA7A0"], [42915, "\uA7A2"], [42917, "\uA7A4"], [42919, "\uA7A6"], [42921, "\uA7A8"], [42933, "\uA7B4"], [42935, "\uA7B6"], [42937, "\uA7B8"], [42939, "\uA7BA"], [42941, "\uA7BC"], [42943, "\uA7BE"], [42945, "\uA7C0"], [42947, "\uA7C2"], [42952, "\uA7C7"], [42954, "\uA7C9"], [42957, "\uA7CC"], [42961, "\uA7D0"], [42967, "\uA7D6"], [42969, "\uA7D8"], [42971, "\uA7DA"], [42998, "\uA7F5"], [43859, "\uA7B3"], [43888, "\u13A0"], [43889, "\u13A1"], [43890, "\u13A2"], [43891, "\u13A3"], [43892, "\u13A4"], [43893, "\u13A5"], [43894, "\u13A6"], [43895, "\u13A7"], [43896, "\u13A8"], [43897, "\u13A9"], [43898, "\u13AA"], [43899, "\u13AB"], [43900, "\u13AC"], [43901, "\u13AD"], [43902, "\u13AE"], [43903, "\u13AF"], [43904, "\u13B0"], [43905, "\u13B1"], [43906, "\u13B2"], [43907, "\u13B3"], [43908, "\u13B4"], [43909, "\u13B5"], [43910, "\u13B6"], [43911, "\u13B7"], [43912, "\u13B8"], [43913, "\u13B9"], [43914, "\u13BA"], [43915, "\u13BB"], [43916, "\u13BC"], [43917, "\u13BD"], [43918, "\u13BE"], [43919, "\u13BF"], [43920, "\u13C0"], [43921, "\u13C1"], [43922, "\u13C2"], [43923, "\u13C3"], [43924, "\u13C4"], [43925, "\u13C5"], [43926, "\u13C6"], [43927, "\u13C7"], [43928, "\u13C8"], [43929, "\u13C9"], [43930, "\u13CA"], [43931, "\u13CB"], [43932, "\u13CC"], [43933, "\u13CD"], [43934, "\u13CE"], [43935, "\u13CF"], [43936, "\u13D0"], [43937, "\u13D1"], [43938, "\u13D2"], [43939, "\u13D3"], [43940, "\u13D4"], [43941, "\u13D5"], [43942, "\u13D6"], [43943, "\u13D7"], [43944, "\u13D8"], [43945, "\u13D9"], [43946, "\u13DA"], [43947, "\u13DB"], [43948, "\u13DC"], [43949, "\u13DD"], [43950, "\u13DE"], [43951, "\u13DF"], [43952, "\u13E0"], [43953, "\u13E1"], [43954, "\u13E2"], [43955, "\u13E3"], [43956, "\u13E4"], [43957, "\u13E5"], [43958, "\u13E6"], [43959, "\u13E7"], [43960, "\u13E8"], [43961, "\u13E9"], [43962, "\u13EA"], [43963, "\u13EB"], [43964, "\u13EC"], [43965, "\u13ED"], [43966, "\u13EE"], [43967, "\u13EF"], [64256, "FF"], [64257, "FI"], [64258, "FL"], [64259, "FFI"], [64260, "FFL"], [64261, "ST"], [64262, "ST"], [64275, "\u0544\u0546"], [64276, "\u0544\u0535"], [64277, "\u0544\u053B"], [64278, "\u054E\u0546"], [64279, "\u0544\u053D"], [65345, "\uFF21"], [65346, "\uFF22"], [65347, "\uFF23"], [65348, "\uFF24"], [65349, "\uFF25"], [65350, "\uFF26"], [65351, "\uFF27"], [65352, "\uFF28"], [65353, "\uFF29"], [65354, "\uFF2A"], [65355, "\uFF2B"], [65356, "\uFF2C"], [65357, "\uFF2D"], [65358, "\uFF2E"], [65359, "\uFF2F"], [65360, "\uFF30"], [65361, "\uFF31"], [65362, "\uFF32"], [65363, "\uFF33"], [65364, "\uFF34"], [65365, "\uFF35"], [65366, "\uFF36"], [65367, "\uFF37"], [65368, "\uFF38"], [65369, "\uFF39"], [65370, "\uFF3A"], [66600, "\u{10400}"], [66601, "\u{10401}"], [66602, "\u{10402}"], [66603, "\u{10403}"], [66604, "\u{10404}"], [66605, "\u{10405}"], [66606, "\u{10406}"], [66607, "\u{10407}"], [66608, "\u{10408}"], [66609, "\u{10409}"], [66610, "\u{1040A}"], [66611, "\u{1040B}"], [66612, "\u{1040C}"], [66613, "\u{1040D}"], [66614, "\u{1040E}"], [66615, "\u{1040F}"], [66616, "\u{10410}"], [66617, "\u{10411}"], [66618, "\u{10412}"], [66619, "\u{10413}"], [66620, "\u{10414}"], [66621, "\u{10415}"], [66622, "\u{10416}"], [66623, "\u{10417}"], [66624, "\u{10418}"], [66625, "\u{10419}"], [66626, "\u{1041A}"], [66627, "\u{1041B}"], [66628, "\u{1041C}"], [66629, "\u{1041D}"], [66630, "\u{1041E}"], [66631, "\u{1041F}"], [66632, "\u{10420}"], [66633, "\u{10421}"], [66634, "\u{10422}"], [66635, "\u{10423}"], [66636, "\u{10424}"], [66637, "\u{10425}"], [66638, "\u{10426}"], [66639, "\u{10427}"], [66776, "\u{104B0}"], [66777, "\u{104B1}"], [66778, "\u{104B2}"], [66779, "\u{104B3}"], [66780, "\u{104B4}"], [66781, "\u{104B5}"], [66782, "\u{104B6}"], [66783, "\u{104B7}"], [66784, "\u{104B8}"], [66785, "\u{104B9}"], [66786, "\u{104BA}"], [66787, "\u{104BB}"], [66788, "\u{104BC}"], [66789, "\u{104BD}"], [66790, "\u{104BE}"], [66791, "\u{104BF}"], [66792, "\u{104C0}"], [66793, "\u{104C1}"], [66794, "\u{104C2}"], [66795, "\u{104C3}"], [66796, "\u{104C4}"], [66797, "\u{104C5}"], [66798, "\u{104C6}"], [66799, "\u{104C7}"], [66800, "\u{104C8}"], [66801, "\u{104C9}"], [66802, "\u{104CA}"], [66803, "\u{104CB}"], [66804, "\u{104CC}"], [66805, "\u{104CD}"], [66806, "\u{104CE}"], [66807, "\u{104CF}"], [66808, "\u{104D0}"], [66809, "\u{104D1}"], [66810, "\u{104D2}"], [66811, "\u{104D3}"], [66967, "\u{10570}"], [66968, "\u{10571}"], [66969, "\u{10572}"], [66970, "\u{10573}"], [66971, "\u{10574}"], [66972, "\u{10575}"], [66973, "\u{10576}"], [66974, "\u{10577}"], [66975, "\u{10578}"], [66976, "\u{10579}"], [66977, "\u{1057A}"], [66979, "\u{1057C}"], [66980, "\u{1057D}"], [66981, "\u{1057E}"], [66982, "\u{1057F}"], [66983, "\u{10580}"], [66984, "\u{10581}"], [66985, "\u{10582}"], [66986, "\u{10583}"], [66987, "\u{10584}"], [66988, "\u{10585}"], [66989, "\u{10586}"], [66990, "\u{10587}"], [66991, "\u{10588}"], [66992, "\u{10589}"], [66993, "\u{1058A}"], [66995, "\u{1058C}"], [66996, "\u{1058D}"], [66997, "\u{1058E}"], [66998, "\u{1058F}"], [66999, "\u{10590}"], [67e3, "\u{10591}"], [67001, "\u{10592}"], [67003, "\u{10594}"], [67004, "\u{10595}"], [68800, "\u{10C80}"], [68801, "\u{10C81}"], [68802, "\u{10C82}"], [68803, "\u{10C83}"], [68804, "\u{10C84}"], [68805, "\u{10C85}"], [68806, "\u{10C86}"], [68807, "\u{10C87}"], [68808, "\u{10C88}"], [68809, "\u{10C89}"], [68810, "\u{10C8A}"], [68811, "\u{10C8B}"], [68812, "\u{10C8C}"], [68813, "\u{10C8D}"], [68814, "\u{10C8E}"], [68815, "\u{10C8F}"], [68816, "\u{10C90}"], [68817, "\u{10C91}"], [68818, "\u{10C92}"], [68819, "\u{10C93}"], [68820, "\u{10C94}"], [68821, "\u{10C95}"], [68822, "\u{10C96}"], [68823, "\u{10C97}"], [68824, "\u{10C98}"], [68825, "\u{10C99}"], [68826, "\u{10C9A}"], [68827, "\u{10C9B}"], [68828, "\u{10C9C}"], [68829, "\u{10C9D}"], [68830, "\u{10C9E}"], [68831, "\u{10C9F}"], [68832, "\u{10CA0}"], [68833, "\u{10CA1}"], [68834, "\u{10CA2}"], [68835, "\u{10CA3}"], [68836, "\u{10CA4}"], [68837, "\u{10CA5}"], [68838, "\u{10CA6}"], [68839, "\u{10CA7}"], [68840, "\u{10CA8}"], [68841, "\u{10CA9}"], [68842, "\u{10CAA}"], [68843, "\u{10CAB}"], [68844, "\u{10CAC}"], [68845, "\u{10CAD}"], [68846, "\u{10CAE}"], [68847, "\u{10CAF}"], [68848, "\u{10CB0}"], [68849, "\u{10CB1}"], [68850, "\u{10CB2}"], [68976, "\u{10D50}"], [68977, "\u{10D51}"], [68978, "\u{10D52}"], [68979, "\u{10D53}"], [68980, "\u{10D54}"], [68981, "\u{10D55}"], [68982, "\u{10D56}"], [68983, "\u{10D57}"], [68984, "\u{10D58}"], [68985, "\u{10D59}"], [68986, "\u{10D5A}"], [68987, "\u{10D5B}"], [68988, "\u{10D5C}"], [68989, "\u{10D5D}"], [68990, "\u{10D5E}"], [68991, "\u{10D5F}"], [68992, "\u{10D60}"], [68993, "\u{10D61}"], [68994, "\u{10D62}"], [68995, "\u{10D63}"], [68996, "\u{10D64}"], [68997, "\u{10D65}"], [71872, "\u{118A0}"], [71873, "\u{118A1}"], [71874, "\u{118A2}"], [71875, "\u{118A3}"], [71876, "\u{118A4}"], [71877, "\u{118A5}"], [71878, "\u{118A6}"], [71879, "\u{118A7}"], [71880, "\u{118A8}"], [71881, "\u{118A9}"], [71882, "\u{118AA}"], [71883, "\u{118AB}"], [71884, "\u{118AC}"], [71885, "\u{118AD}"], [71886, "\u{118AE}"], [71887, "\u{118AF}"], [71888, "\u{118B0}"], [71889, "\u{118B1}"], [71890, "\u{118B2}"], [71891, "\u{118B3}"], [71892, "\u{118B4}"], [71893, "\u{118B5}"], [71894, "\u{118B6}"], [71895, "\u{118B7}"], [71896, "\u{118B8}"], [71897, "\u{118B9}"], [71898, "\u{118BA}"], [71899, "\u{118BB}"], [71900, "\u{118BC}"], [71901, "\u{118BD}"], [71902, "\u{118BE}"], [71903, "\u{118BF}"], [93792, "\u{16E40}"], [93793, "\u{16E41}"], [93794, "\u{16E42}"], [93795, "\u{16E43}"], [93796, "\u{16E44}"], [93797, "\u{16E45}"], [93798, "\u{16E46}"], [93799, "\u{16E47}"], [93800, "\u{16E48}"], [93801, "\u{16E49}"], [93802, "\u{16E4A}"], [93803, "\u{16E4B}"], [93804, "\u{16E4C}"], [93805, "\u{16E4D}"], [93806, "\u{16E4E}"], [93807, "\u{16E4F}"], [93808, "\u{16E50}"], [93809, "\u{16E51}"], [93810, "\u{16E52}"], [93811, "\u{16E53}"], [93812, "\u{16E54}"], [93813, "\u{16E55}"], [93814, "\u{16E56}"], [93815, "\u{16E57}"], [93816, "\u{16E58}"], [93817, "\u{16E59}"], [93818, "\u{16E5A}"], [93819, "\u{16E5B}"], [93820, "\u{16E5C}"], [93821, "\u{16E5D}"], [93822, "\u{16E5E}"], [93823, "\u{16E5F}"], [125218, "\u{1E900}"], [125219, "\u{1E901}"], [125220, "\u{1E902}"], [125221, "\u{1E903}"], [125222, "\u{1E904}"], [125223, "\u{1E905}"], [125224, "\u{1E906}"], [125225, "\u{1E907}"], [125226, "\u{1E908}"], [125227, "\u{1E909}"], [125228, "\u{1E90A}"], [125229, "\u{1E90B}"], [125230, "\u{1E90C}"], [125231, "\u{1E90D}"], [125232, "\u{1E90E}"], [125233, "\u{1E90F}"], [125234, "\u{1E910}"], [125235, "\u{1E911}"], [125236, "\u{1E912}"], [125237, "\u{1E913}"], [125238, "\u{1E914}"], [125239, "\u{1E915}"], [125240, "\u{1E916}"], [125241, "\u{1E917}"], [125242, "\u{1E918}"], [125243, "\u{1E919}"], [125244, "\u{1E91A}"], [125245, "\u{1E91B}"], [125246, "\u{1E91C}"], [125247, "\u{1E91D}"], [125248, "\u{1E91E}"], [125249, "\u{1E91F}"], [125250, "\u{1E920}"], [125251, "\u{1E921}"]];
|
|
2318
|
-
|
|
2319
|
-
// packages/safe-bash-command-csvkit/dist/python-text.js
|
|
2320
|
-
var upperMap = new Map(upperMappings);
|
|
2321
|
-
function bytesRepr(value) {
|
|
2322
|
-
const quote = value.includes(39) && !value.includes(34) ? '"' : "'";
|
|
2323
|
-
let text2 = "b" + quote;
|
|
2324
|
-
for (const byte of value) {
|
|
2325
|
-
if (byte === 9)
|
|
2326
|
-
text2 += "\\t";
|
|
2327
|
-
else if (byte === 10)
|
|
2328
|
-
text2 += "\\n";
|
|
2329
|
-
else if (byte === 13)
|
|
2330
|
-
text2 += "\\r";
|
|
2331
|
-
else if (byte === 92 || byte === quote.charCodeAt(0))
|
|
2332
|
-
text2 += "\\" + String.fromCharCode(byte);
|
|
2333
|
-
else if (byte >= 32 && byte < 127)
|
|
2334
|
-
text2 += String.fromCharCode(byte);
|
|
2335
|
-
else
|
|
2336
|
-
text2 += "\\x" + byte.toString(16).padStart(2, "0");
|
|
2337
|
-
}
|
|
2338
|
-
return text2 + quote;
|
|
2339
|
-
}
|
|
2340
|
-
function upperText(value, step) {
|
|
2341
|
-
let result = "";
|
|
2342
|
-
for (const char of value) {
|
|
2343
|
-
step();
|
|
2344
|
-
result += upperMap.get(char.codePointAt(0)) ?? char;
|
|
722
|
+
async function printNames(runtime) {
|
|
723
|
+
if (runtime.options.no_header_row)
|
|
724
|
+
throw new CsvkitDiagnostic("RequiredHeaderError: You cannot use --no-header-row with the -n or --names options.");
|
|
725
|
+
const rows = runtime.records();
|
|
726
|
+
try {
|
|
727
|
+
const first = await rows.next();
|
|
728
|
+
if (first.done)
|
|
729
|
+
throw new CsvkitDiagnostic("StopIteration: ");
|
|
730
|
+
const offset = runtime.options.zero_based ? 0 : 1;
|
|
731
|
+
for (const [index, name] of first.value.cells.entries())
|
|
732
|
+
await runtime.write(`${String(index + offset).padStart(3)}: ${name}
|
|
733
|
+
`);
|
|
734
|
+
return 0;
|
|
735
|
+
} finally {
|
|
736
|
+
await rows.return(void 0);
|
|
2345
737
|
}
|
|
2346
|
-
return result;
|
|
2347
|
-
}
|
|
2348
|
-
function stripWhitespace(value) {
|
|
2349
|
-
const len = value.length;
|
|
2350
|
-
if (len === 0)
|
|
2351
|
-
return "";
|
|
2352
|
-
const c0 = value.charCodeAt(0);
|
|
2353
|
-
const cLast = value.charCodeAt(len - 1);
|
|
2354
|
-
if (c0 > 32 && c0 < 127 && cLast > 32 && cLast < 127)
|
|
2355
|
-
return value;
|
|
2356
|
-
const chars = Array.from(value);
|
|
2357
|
-
const whitespace2 = (char) => {
|
|
2358
|
-
const code = char.codePointAt(0);
|
|
2359
|
-
return integerWhitespace.includes(code) || code >= 28 && code <= 31;
|
|
2360
|
-
};
|
|
2361
|
-
let first = 0;
|
|
2362
|
-
let last = chars.length;
|
|
2363
|
-
while (first < last && whitespace2(chars[first]))
|
|
2364
|
-
first++;
|
|
2365
|
-
while (last > first && whitespace2(chars[last - 1]))
|
|
2366
|
-
last--;
|
|
2367
|
-
return chars.slice(first, last).join("");
|
|
2368
738
|
}
|
|
2369
|
-
var lowerMap = new Map(lowerMappings);
|
|
2370
|
-
function lowerText(value) {
|
|
2371
|
-
let ascii2 = true;
|
|
2372
|
-
let hasUpper = false;
|
|
2373
|
-
for (let i = 0; i < value.length; i++) {
|
|
2374
|
-
const c = value.charCodeAt(i);
|
|
2375
|
-
if (c >= 128) {
|
|
2376
|
-
ascii2 = false;
|
|
2377
|
-
break;
|
|
2378
|
-
}
|
|
2379
|
-
if (c >= 65 && c <= 90)
|
|
2380
|
-
hasUpper = true;
|
|
2381
|
-
}
|
|
2382
|
-
if (ascii2)
|
|
2383
|
-
return hasUpper ? value.toLowerCase() : value;
|
|
2384
|
-
const chars = Array.from(value);
|
|
2385
|
-
const within = (code, ranges) => {
|
|
2386
|
-
let lo = 0;
|
|
2387
|
-
let hi = ranges.length;
|
|
2388
|
-
while (lo < hi) {
|
|
2389
|
-
const mid = lo + hi >>> 1;
|
|
2390
|
-
const range = ranges[mid];
|
|
2391
|
-
if (code < range[0])
|
|
2392
|
-
hi = mid;
|
|
2393
|
-
else if (code > range[1])
|
|
2394
|
-
lo = mid + 1;
|
|
2395
|
-
else
|
|
2396
|
-
return true;
|
|
2397
|
-
}
|
|
2398
|
-
return false;
|
|
2399
|
-
};
|
|
2400
|
-
return chars.map((char, index) => {
|
|
2401
|
-
const code = char.codePointAt(0);
|
|
2402
|
-
if (code !== 931)
|
|
2403
|
-
return lowerMap.get(code) ?? char;
|
|
2404
|
-
const cased = (direction) => {
|
|
2405
|
-
for (let cursor = index + direction; cursor >= 0 && cursor < chars.length; cursor += direction) {
|
|
2406
|
-
const neighbor = chars[cursor].codePointAt(0);
|
|
2407
|
-
if (!within(neighbor, sigmaIgnorable))
|
|
2408
|
-
return within(neighbor, sigmaCased);
|
|
2409
|
-
}
|
|
2410
|
-
return false;
|
|
2411
|
-
};
|
|
2412
|
-
return cased(-1) && !cased(1) ? "\u03C2" : "\u03C3";
|
|
2413
|
-
}).join("");
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
// packages/safe-bash-command-csvkit/dist/diagnostics/index.js
|
|
2417
|
-
function diagnosticReport(failure, verbose, encoding) {
|
|
2418
|
-
let text2 = failure instanceof PythonException ? `${failure.exceptionClass}: ${failure.detail}` : failure.message;
|
|
2419
|
-
if (!(failure instanceof CsvkitBlocked) && failure.status === 1) {
|
|
2420
|
-
if (verbose) {
|
|
2421
|
-
if (!(failure instanceof PythonException) || !failure.traceback?.profile || !failure.traceback.frames.length || failure.traceback.frames.some((frame) => !frame.path || !frame.function || !Number.isSafeInteger(frame.line) || frame.line < 1))
|
|
2422
|
-
return { status: 78, stderr: "csvkit: unsupported or unqualified: frozen Python traceback frames and deployment identity\n" };
|
|
2423
|
-
text2 = "Traceback (most recent call last):\n";
|
|
2424
|
-
for (const frame of failure.traceback.frames) {
|
|
2425
|
-
text2 += ` File "${frame.path}", line ${frame.line}, in ${frame.function}
|
|
2426
|
-
`;
|
|
2427
|
-
const source = frame.source === void 0 ? "" : stripWhitespace(frame.source);
|
|
2428
|
-
if (source)
|
|
2429
|
-
text2 += ` ${source}
|
|
2430
|
-
`;
|
|
2431
|
-
}
|
|
2432
|
-
text2 += `${failure.exceptionClass}: ${failure.detail}`;
|
|
2433
|
-
} else if (failure instanceof PythonException && failure.exceptionClass === "UnicodeDecodeError") {
|
|
2434
|
-
text2 = `Your file is not "${encoding}" encoded. Please specify the correct encoding with the --encoding flag. Use the -v flag to see the complete error.`;
|
|
2435
|
-
}
|
|
2436
|
-
}
|
|
2437
|
-
return { status: failure.status, stderr: text2 + "\n" };
|
|
2438
|
-
}
|
|
2439
|
-
function fileException(failure, path) {
|
|
2440
|
-
if (failure instanceof CsvkitDiagnostic || typeof failure !== "object" || failure === null)
|
|
2441
|
-
return failure;
|
|
2442
|
-
const code = failure.code;
|
|
2443
|
-
const identities = {
|
|
2444
|
-
ENOENT: ["FileNotFoundError", 2, "No such file or directory"],
|
|
2445
|
-
EACCES: ["PermissionError", 13, "Permission denied"],
|
|
2446
|
-
EPERM: ["PermissionError", 1, "Operation not permitted"],
|
|
2447
|
-
EISDIR: ["IsADirectoryError", 21, "Is a directory"],
|
|
2448
|
-
ENOTDIR: ["NotADirectoryError", 20, "Not a directory"]
|
|
2449
|
-
};
|
|
2450
|
-
const identity = typeof code === "string" && Object.hasOwn(identities, code) ? identities[code] : void 0;
|
|
2451
|
-
return identity ? new PythonException(identity[0], `[Errno ${identity[1]}] ${identity[2]}: ${repr(path)}`) : failure;
|
|
2452
|
-
}
|
|
2453
|
-
function warningText(warning) {
|
|
2454
|
-
return `${warning.path}:${warning.line}: ${warning.category}: ${warning.message}
|
|
2455
|
-
` + (warning.source ? ` ${stripWhitespace(warning.source)}
|
|
2456
|
-
` : "");
|
|
2457
|
-
}
|
|
2458
|
-
|
|
2459
|
-
// packages/safe-bash-command-csvkit/dist/table/headers.js
|
|
2460
|
-
function defaultHeaders(count) {
|
|
2461
|
-
return Array.from({ length: count }, (_, index) => {
|
|
2462
|
-
let name = "";
|
|
2463
|
-
do {
|
|
2464
|
-
name = String.fromCharCode(97 + index % 26) + name;
|
|
2465
|
-
index = Math.floor(index / 26) - 1;
|
|
2466
|
-
} while (index >= 0);
|
|
2467
|
-
return name;
|
|
2468
|
-
});
|
|
2469
|
-
}
|
|
2470
|
-
var warningRegistries = /* @__PURE__ */ new WeakMap();
|
|
2471
|
-
async function normalizeHeaders(headers, runtime) {
|
|
2472
|
-
const generated = defaultHeaders(headers.length);
|
|
2473
|
-
const final = [];
|
|
2474
|
-
const seen = /* @__PURE__ */ new Set();
|
|
2475
|
-
const emitted = warningRegistries.get(runtime) ?? /* @__PURE__ */ new Set();
|
|
2476
|
-
warningRegistries.set(runtime, emitted);
|
|
2477
|
-
const warn = async (category, message, line, source) => {
|
|
2478
|
-
const profile = runtime.context.columnWarnings;
|
|
2479
|
-
if (profile?.suppressWarnings)
|
|
2480
|
-
return;
|
|
2481
|
-
if (!profile?.utilsPath)
|
|
2482
|
-
throw new CsvkitBlocked("Agate duplicate/unnamed column warning provenance");
|
|
2483
|
-
const identity = category + message;
|
|
2484
|
-
if (emitted.has(identity))
|
|
2485
|
-
return;
|
|
2486
|
-
runtime.retain(32 + identity.length * 2);
|
|
2487
|
-
emitted.add(identity);
|
|
2488
|
-
await runtime.write(warningText({ path: profile.utilsPath, category, message, line, source }), "stderr");
|
|
2489
|
-
};
|
|
2490
|
-
for (const [index, header] of headers.entries()) {
|
|
2491
|
-
runtime.step();
|
|
2492
|
-
const name = header || generated[index];
|
|
2493
|
-
if (!header)
|
|
2494
|
-
await warn("UnnamedColumnWarning", `Column ${index} has no name. Using "${name}".`, 272, "warn_unnamed_column(i, new_value)");
|
|
2495
|
-
let result = name;
|
|
2496
|
-
let duplicates = 0;
|
|
2497
|
-
while (seen.has(result)) {
|
|
2498
|
-
runtime.step();
|
|
2499
|
-
result = name + "_" + (++duplicates + 1);
|
|
2500
|
-
}
|
|
2501
|
-
if (duplicates)
|
|
2502
|
-
await warn("DuplicateColumnWarning", `Column name "${name}" already exists in Table. Column will be renamed to "${result}".`, 288, "warn_duplicate_column(new_value, final_value)");
|
|
2503
|
-
runtime.retain(32 + result.length * 2);
|
|
2504
|
-
seen.add(result);
|
|
2505
|
-
final.push(result);
|
|
2506
|
-
}
|
|
2507
|
-
return final;
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
|
-
// packages/safe-bash-command-csvkit/dist/table/selectors.js
|
|
2511
|
-
init_buffer();
|
|
2512
|
-
var digitRanges = [[178, 179], [185, 185], [4969, 4977], [6618, 6618], [8304, 8304], [8308, 8313], [8320, 8329], [9312, 9320], [9332, 9340], [9352, 9360], [9450, 9450], [9461, 9469], [9471, 9471], [10102, 10110], [10112, 10120], [10122, 10130], [68160, 68163], [69216, 69224], [69714, 69722], [127232, 127242]];
|
|
2513
|
-
function isDigit(token) {
|
|
2514
|
-
return token.length > 0 && Array.from(token).every((char) => {
|
|
2515
|
-
const point = char.codePointAt(0);
|
|
2516
|
-
return decimalZeroes.some((zero) => point >= zero && point <= zero + 9) || digitRanges.some(([first, last]) => point >= first && point <= last);
|
|
2517
|
-
});
|
|
2518
|
-
}
|
|
2519
|
-
function match(names, token, offset2 = 1, namesAreTuple = false) {
|
|
2520
|
-
if (typeof token === "string" && !isDigit(token) && names.includes(token))
|
|
2521
|
-
return names.indexOf(token);
|
|
2522
|
-
const value = typeof token === "bigint" ? token : integer(token);
|
|
2523
|
-
if (value === void 0)
|
|
2524
|
-
throw new CsvkitDiagnostic(`ColumnIdentifierError: Column '${token}' is invalid. It is neither an integer nor a column name. Column names are: ${names.map(repr).join(", ")}${namesAreTuple && names.length === 1 ? "," : ""}`);
|
|
2525
|
-
const index = Number(value) - offset2;
|
|
2526
|
-
if (index < 0)
|
|
2527
|
-
throw new CsvkitDiagnostic(`ColumnIdentifierError: Column ${value} is invalid. Columns are 1-based.`);
|
|
2528
|
-
if (index >= names.length)
|
|
2529
|
-
throw new CsvkitDiagnostic(`ColumnIdentifierError: Column ${value} is invalid. The last column is '${names.at(-1)}' at index ${names.length - 1 + offset2}.`);
|
|
2530
|
-
return index;
|
|
2531
|
-
}
|
|
2532
|
-
function parseColumnIdentifiers(ids, names, offset2 = 1, excludedColumns, step = () => {
|
|
2533
|
-
}, namesAreTuple = false) {
|
|
2534
|
-
if (!names.length)
|
|
2535
|
-
return [];
|
|
2536
|
-
const columns = [];
|
|
2537
|
-
if (ids) {
|
|
2538
|
-
for (const token of ids.split(",")) {
|
|
2539
|
-
step();
|
|
2540
|
-
try {
|
|
2541
|
-
columns.push(match(names, token, offset2, namesAreTuple));
|
|
2542
|
-
} catch (failure) {
|
|
2543
|
-
if (!(failure instanceof CsvkitDiagnostic))
|
|
2544
|
-
throw failure;
|
|
2545
|
-
const separator = token.includes(":") ? ":" : token.includes("-") ? "-" : void 0;
|
|
2546
|
-
if (!separator)
|
|
2547
|
-
throw failure;
|
|
2548
|
-
const index = token.indexOf(separator);
|
|
2549
|
-
const first = token.slice(0, index);
|
|
2550
|
-
const last = token.slice(index + 1);
|
|
2551
|
-
const start = first ? integer(first) : 1;
|
|
2552
|
-
const end = last ? integer(last) : names.length;
|
|
2553
|
-
if (start === void 0 || end === void 0)
|
|
2554
|
-
throw new CsvkitDiagnostic("ColumnIdentifierError: Invalid range %s. Ranges must be two integers separated by a - or : character.");
|
|
2555
|
-
for (let value = BigInt(start); value <= BigInt(end); value++) {
|
|
2556
|
-
step();
|
|
2557
|
-
columns.push(match(names, value, offset2));
|
|
2558
|
-
}
|
|
2559
|
-
}
|
|
2560
|
-
}
|
|
2561
|
-
} else {
|
|
2562
|
-
for (let index = 0; index < names.length; index++) {
|
|
2563
|
-
step();
|
|
2564
|
-
columns.push(index);
|
|
2565
|
-
}
|
|
2566
|
-
}
|
|
2567
|
-
const excludes = /* @__PURE__ */ new Set();
|
|
2568
|
-
if (excludedColumns) {
|
|
2569
|
-
for (const token of excludedColumns.split(",")) {
|
|
2570
|
-
step();
|
|
2571
|
-
try {
|
|
2572
|
-
excludes.add(match(names, token, offset2, namesAreTuple));
|
|
2573
|
-
} catch (failure) {
|
|
2574
|
-
if (!(failure instanceof CsvkitDiagnostic))
|
|
2575
|
-
throw failure;
|
|
2576
|
-
const separator = token.includes(":") ? ":" : token.includes("-") ? "-" : void 0;
|
|
2577
|
-
if (!separator)
|
|
2578
|
-
continue;
|
|
2579
|
-
const index = token.indexOf(separator);
|
|
2580
|
-
const first = token.slice(0, index);
|
|
2581
|
-
const last = token.slice(index + 1);
|
|
2582
|
-
const start = first ? integer(first) : 1;
|
|
2583
|
-
const end = last ? integer(last) : names.length - 1;
|
|
2584
|
-
if (start === void 0 || end === void 0)
|
|
2585
|
-
throw new CsvkitDiagnostic("ColumnIdentifierError: Invalid range %s. Ranges must be two integers separated by a - or : character.");
|
|
2586
|
-
for (let value = BigInt(start); value <= BigInt(end); value++) {
|
|
2587
|
-
step();
|
|
2588
|
-
excludes.add(match(names, value, offset2));
|
|
2589
|
-
}
|
|
2590
|
-
}
|
|
2591
|
-
}
|
|
2592
|
-
}
|
|
2593
|
-
return columns.filter((index) => {
|
|
2594
|
-
step();
|
|
2595
|
-
return !excludes.has(index);
|
|
2596
|
-
});
|
|
2597
|
-
}
|
|
2598
|
-
|
|
2599
|
-
// packages/safe-bash-command-csvkit/dist/columns.js
|
|
2600
|
-
async function printNames(runtime) {
|
|
2601
|
-
if (runtime.options.no_header_row)
|
|
2602
|
-
throw new CsvkitDiagnostic("RequiredHeaderError: You cannot use --no-header-row with the -n or --names options.");
|
|
2603
|
-
const rows = runtime.records();
|
|
2604
|
-
try {
|
|
2605
|
-
const first = await rows.next();
|
|
2606
|
-
if (first.done)
|
|
2607
|
-
throw new CsvkitDiagnostic("StopIteration: ");
|
|
2608
|
-
const offset2 = runtime.options.zero_based ? 0 : 1;
|
|
2609
|
-
for (const [index, name] of first.value.cells.entries())
|
|
2610
|
-
await runtime.write(`${String(index + offset2).padStart(3)}: ${name}
|
|
2611
|
-
`);
|
|
2612
|
-
return 0;
|
|
2613
|
-
} finally {
|
|
2614
|
-
await rows.return(void 0);
|
|
2615
|
-
}
|
|
2616
|
-
}
|
|
2617
|
-
|
|
2618
|
-
// packages/safe-bash-command-csvkit/dist/operations/input-cells.js
|
|
2619
|
-
init_buffer();
|
|
2620
|
-
|
|
2621
|
-
// packages/safe-bash-command-csvkit/dist/operations/json-table.js
|
|
2622
|
-
init_buffer();
|
|
2623
739
|
|
|
2624
|
-
// packages/safe-bash-command-csvkit/dist/
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
payload;
|
|
2639
|
-
constructor(negative, coefficient, exponent, special, payload = "") {
|
|
2640
|
-
this.negative = negative;
|
|
2641
|
-
this.coefficient = coefficient;
|
|
2642
|
-
this.exponent = exponent;
|
|
2643
|
-
this.special = special;
|
|
2644
|
-
this.payload = payload;
|
|
2645
|
-
}
|
|
2646
|
-
static parse(text2) {
|
|
2647
|
-
let ascii2 = "";
|
|
2648
|
-
for (const char of stripWhitespace(text2)) {
|
|
2649
|
-
if (char === "_")
|
|
740
|
+
// packages/safe-bash-command-csvkit/dist/commands/csvcut.js
|
|
741
|
+
async function cut(runtime) {
|
|
742
|
+
if (runtime.options.names_only)
|
|
743
|
+
return printNames(runtime);
|
|
744
|
+
await runtime.prompt();
|
|
745
|
+
let headers;
|
|
746
|
+
let columns = [];
|
|
747
|
+
for await (const record of runtime.records(void 0, void 0, void 0, void 0, void 0, true)) {
|
|
748
|
+
if (headers === void 0) {
|
|
749
|
+
const generated = Boolean(runtime.options.no_header_row);
|
|
750
|
+
headers = generated ? defaultHeaders(record.cells.length) : record.cells.map((cell2) => pythonValueText(inputWriteCell(cell2)));
|
|
751
|
+
columns = parseColumnIdentifiers(runtime.options.columns, headers, runtime.options.zero_based ? 0 : 1, runtime.options.not_columns, runtime.step, generated);
|
|
752
|
+
await runtime.row(columns.map((index) => headers[index]));
|
|
753
|
+
if (!generated)
|
|
2650
754
|
continue;
|
|
2651
|
-
const code = char.codePointAt(0);
|
|
2652
|
-
const zero = decimalZeroes.find((start) => code >= start && code < start + 10);
|
|
2653
|
-
ascii2 += zero === void 0 ? char : String(code - zero);
|
|
2654
|
-
}
|
|
2655
|
-
text2 = ascii2;
|
|
2656
|
-
const special = /^([+-]?)(Infinity|Inf|sNaN|NaN)(\d*)$/i.exec(text2);
|
|
2657
|
-
if (special) {
|
|
2658
|
-
const name = special[2].toLowerCase();
|
|
2659
|
-
if (name.startsWith("inf") && special[3])
|
|
2660
|
-
throw new DecimalTrap("InvalidOperation");
|
|
2661
|
-
return new _Decimal(special[1] === "-", 0n, 0, name.startsWith("inf") ? "Infinity" : name === "snan" ? "sNaN" : "NaN", special[3].replace(/^0+/, ""));
|
|
2662
|
-
}
|
|
2663
|
-
const match2 = /^([+-]?)(?:(\d+)(?:\.(\d*))?|\.(\d+))(?:[eE]([+-]?\d+))?$/.exec(text2);
|
|
2664
|
-
if (!match2)
|
|
2665
|
-
throw new DecimalTrap("InvalidOperation");
|
|
2666
|
-
const fraction = match2[3] ?? match2[4] ?? "";
|
|
2667
|
-
const digits2 = (match2[2] ?? "") + fraction;
|
|
2668
|
-
const exponent = BigInt(match2[5] ?? "0") - BigInt(fraction.length);
|
|
2669
|
-
if (!Number.isSafeInteger(Number(exponent)))
|
|
2670
|
-
throw new DecimalTrap("InvalidOperation");
|
|
2671
|
-
return new _Decimal(match2[1] === "-", BigInt(digits2), Number(exponent));
|
|
2672
|
-
}
|
|
2673
|
-
static finite(negative, coefficient, exponent, precision2 = 28) {
|
|
2674
|
-
let digits2 = coefficient.toString().length;
|
|
2675
|
-
if (digits2 > precision2) {
|
|
2676
|
-
const cut2 = digits2 - precision2;
|
|
2677
|
-
const divisor = 10n ** BigInt(cut2);
|
|
2678
|
-
const rest = coefficient % divisor;
|
|
2679
|
-
coefficient /= divisor;
|
|
2680
|
-
if (rest * 2n > divisor || rest * 2n === divisor && coefficient % 2n !== 0n)
|
|
2681
|
-
coefficient++;
|
|
2682
|
-
exponent += cut2;
|
|
2683
|
-
digits2 = coefficient.toString().length;
|
|
2684
|
-
if (digits2 > precision2) {
|
|
2685
|
-
coefficient /= 10n;
|
|
2686
|
-
exponent++;
|
|
2687
|
-
}
|
|
2688
|
-
}
|
|
2689
|
-
if (exponent + coefficient.toString().length - 1 > 999999)
|
|
2690
|
-
throw new DecimalTrap("Overflow");
|
|
2691
|
-
if (!Number.isSafeInteger(exponent))
|
|
2692
|
-
throw new DecimalTrap("InvalidOperation");
|
|
2693
|
-
return new _Decimal(negative, coefficient, exponent);
|
|
2694
|
-
}
|
|
2695
|
-
nan(other) {
|
|
2696
|
-
if (this.special === "sNaN" || other.special === "sNaN")
|
|
2697
|
-
throw new DecimalTrap("InvalidOperation");
|
|
2698
|
-
const value = this.special === "NaN" ? this : other.special === "NaN" ? other : void 0;
|
|
2699
|
-
return value && new _Decimal(value.negative, 0n, 0, "NaN", value.payload.slice(-28).replace(/^0+/, ""));
|
|
2700
|
-
}
|
|
2701
|
-
add(other) {
|
|
2702
|
-
const nan = this.nan(other);
|
|
2703
|
-
if (nan)
|
|
2704
|
-
return nan;
|
|
2705
|
-
if (this.special === "Infinity" || other.special === "Infinity") {
|
|
2706
|
-
if (this.special === other.special && this.negative !== other.negative)
|
|
2707
|
-
throw new DecimalTrap("InvalidOperation");
|
|
2708
|
-
return this.special ? this : other;
|
|
2709
|
-
}
|
|
2710
|
-
const exponent = Math.min(this.exponent, other.exponent);
|
|
2711
|
-
const a = this.coefficient * 10n ** BigInt(this.exponent - exponent) * (this.negative ? -1n : 1n);
|
|
2712
|
-
const b = other.coefficient * 10n ** BigInt(other.exponent - exponent) * (other.negative ? -1n : 1n);
|
|
2713
|
-
const sum = a + b;
|
|
2714
|
-
return _Decimal.finite(sum < 0n || sum === 0n && this.negative && other.negative, sum < 0n ? -sum : sum, exponent);
|
|
2715
|
-
}
|
|
2716
|
-
multiply(other) {
|
|
2717
|
-
const nan = this.nan(other);
|
|
2718
|
-
if (nan)
|
|
2719
|
-
return nan;
|
|
2720
|
-
const negative = this.negative !== other.negative;
|
|
2721
|
-
if (this.special || other.special) {
|
|
2722
|
-
if (!this.special && this.coefficient === 0n || !other.special && other.coefficient === 0n)
|
|
2723
|
-
throw new DecimalTrap("InvalidOperation");
|
|
2724
|
-
return new _Decimal(negative, 0n, 0, "Infinity");
|
|
2725
|
-
}
|
|
2726
|
-
return _Decimal.finite(negative, this.coefficient * other.coefficient, this.exponent + other.exponent);
|
|
2727
|
-
}
|
|
2728
|
-
/** CPython mpdecimal integer power: precision + exponent digits + 2. */
|
|
2729
|
-
square() {
|
|
2730
|
-
const nan = this.nan(this);
|
|
2731
|
-
if (nan)
|
|
2732
|
-
return nan;
|
|
2733
|
-
if (this.special)
|
|
2734
|
-
return new _Decimal(false, 0n, 0, "Infinity");
|
|
2735
|
-
if (this.coefficient === 0n)
|
|
2736
|
-
return new _Decimal(false, 0n, 0);
|
|
2737
|
-
const working = _Decimal.finite(false, this.coefficient * this.coefficient, this.exponent * 2, 31);
|
|
2738
|
-
return _Decimal.finite(false, working.coefficient, working.exponent);
|
|
2739
|
-
}
|
|
2740
|
-
divide(other) {
|
|
2741
|
-
const nan = this.nan(other);
|
|
2742
|
-
if (nan)
|
|
2743
|
-
return nan;
|
|
2744
|
-
const negative = this.negative !== other.negative;
|
|
2745
|
-
if (this.special && other.special)
|
|
2746
|
-
throw new DecimalTrap("InvalidOperation");
|
|
2747
|
-
if (this.special)
|
|
2748
|
-
return new _Decimal(negative, 0n, 0, "Infinity");
|
|
2749
|
-
if (other.special)
|
|
2750
|
-
return new _Decimal(negative, 0n, -1000026);
|
|
2751
|
-
if (other.coefficient === 0n)
|
|
2752
|
-
throw new DecimalTrap(this.coefficient === 0n ? "InvalidOperation" : "DivisionByZero");
|
|
2753
|
-
const preferred = this.exponent - other.exponent;
|
|
2754
|
-
if (this.coefficient === 0n)
|
|
2755
|
-
return _Decimal.finite(negative, 0n, preferred);
|
|
2756
|
-
const shift = Math.max(0, 29 + other.coefficient.toString().length - this.coefficient.toString().length);
|
|
2757
|
-
const numerator = this.coefficient * 10n ** BigInt(shift);
|
|
2758
|
-
let coefficient = numerator / other.coefficient;
|
|
2759
|
-
const remainder = numerator % other.coefficient;
|
|
2760
|
-
if (remainder !== 0n)
|
|
2761
|
-
coefficient = coefficient * 10n + 1n;
|
|
2762
|
-
let result = _Decimal.finite(negative, coefficient, preferred - shift - (remainder !== 0n ? 1 : 0));
|
|
2763
|
-
if (numerator % other.coefficient === 0n) {
|
|
2764
|
-
coefficient = result.coefficient;
|
|
2765
|
-
let exponent = result.exponent;
|
|
2766
|
-
while (exponent < preferred && coefficient % 10n === 0n) {
|
|
2767
|
-
coefficient /= 10n;
|
|
2768
|
-
exponent++;
|
|
2769
|
-
}
|
|
2770
|
-
result = new _Decimal(negative, coefficient, exponent);
|
|
2771
|
-
}
|
|
2772
|
-
return result;
|
|
2773
|
-
}
|
|
2774
|
-
compare(other) {
|
|
2775
|
-
if (this.special === "NaN" || this.special === "sNaN" || other.special === "NaN" || other.special === "sNaN")
|
|
2776
|
-
throw new DecimalTrap("InvalidOperation");
|
|
2777
|
-
if (this.special || other.special) {
|
|
2778
|
-
if (this.special === other.special && this.negative === other.negative)
|
|
2779
|
-
return 0;
|
|
2780
|
-
return this.special ? this.negative ? -1 : 1 : other.negative ? 1 : -1;
|
|
2781
|
-
}
|
|
2782
|
-
if (this.coefficient === 0n && other.coefficient === 0n)
|
|
2783
|
-
return 0;
|
|
2784
|
-
if (this.negative !== other.negative)
|
|
2785
|
-
return this.negative ? -1 : 1;
|
|
2786
|
-
const exponent = Math.min(this.exponent, other.exponent);
|
|
2787
|
-
const a = this.coefficient * 10n ** BigInt(this.exponent - exponent);
|
|
2788
|
-
const b = other.coefficient * 10n ** BigInt(other.exponent - exponent);
|
|
2789
|
-
return (a === b ? 0 : a < b ? -1 : 1) * (this.negative ? -1 : 1);
|
|
2790
|
-
}
|
|
2791
|
-
normalized() {
|
|
2792
|
-
const nan = this.nan(this);
|
|
2793
|
-
if (nan)
|
|
2794
|
-
return nan;
|
|
2795
|
-
if (this.special)
|
|
2796
|
-
return this;
|
|
2797
|
-
const rounded = _Decimal.finite(this.negative, this.coefficient, this.exponent);
|
|
2798
|
-
let coefficient = rounded.coefficient;
|
|
2799
|
-
let exponent = rounded.exponent;
|
|
2800
|
-
if (coefficient === 0n)
|
|
2801
|
-
return new _Decimal(this.negative, 0n, 0);
|
|
2802
|
-
while (coefficient % 10n === 0n) {
|
|
2803
|
-
coefficient /= 10n;
|
|
2804
|
-
exponent++;
|
|
2805
|
-
}
|
|
2806
|
-
return new _Decimal(this.negative, coefficient, exponent);
|
|
2807
|
-
}
|
|
2808
|
-
toString() {
|
|
2809
|
-
const sign = this.negative ? "-" : "";
|
|
2810
|
-
if (this.special)
|
|
2811
|
-
return sign + this.special + this.payload;
|
|
2812
|
-
const digits2 = this.coefficient.toString();
|
|
2813
|
-
const adjusted = this.exponent + digits2.length - 1;
|
|
2814
|
-
if (this.exponent > 0 || adjusted < -6)
|
|
2815
|
-
return sign + digits2[0] + (digits2.length > 1 ? "." + digits2.slice(1) : "") + "E" + (adjusted >= 0 ? "+" : "") + adjusted;
|
|
2816
|
-
const point = digits2.length + this.exponent;
|
|
2817
|
-
if (point > 0)
|
|
2818
|
-
return sign + digits2.slice(0, point) + (point < digits2.length ? "." + digits2.slice(point) : "");
|
|
2819
|
-
return sign + "0." + "0".repeat(-point) + digits2;
|
|
2820
|
-
}
|
|
2821
|
-
};
|
|
2822
|
-
|
|
2823
|
-
// packages/safe-bash-command-csvkit/dist/table/index.js
|
|
2824
|
-
init_buffer();
|
|
2825
|
-
|
|
2826
|
-
// packages/safe-bash-command-csvkit/dist/table/types.js
|
|
2827
|
-
init_buffer();
|
|
2828
|
-
|
|
2829
|
-
// packages/safe-bash-command-csvkit/dist/types/temporal.js
|
|
2830
|
-
init_buffer();
|
|
2831
|
-
var TemporalCastError = class extends Error {
|
|
2832
|
-
};
|
|
2833
|
-
var months = ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"];
|
|
2834
|
-
var weekdays = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
|
|
2835
|
-
var leap = (year) => year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
2836
|
-
var monthDays = (year, month) => [31, leap(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1] ?? 0;
|
|
2837
|
-
var pad = (value, width = 2) => String(value).padStart(width, "0");
|
|
2838
|
-
function valid(p) {
|
|
2839
|
-
return p.year >= 1 && p.year <= 9999 && p.month >= 1 && p.month <= 12 && p.day >= 1 && p.day <= monthDays(p.year, p.month) && p.hour >= 0 && p.hour < 24 && p.minute >= 0 && p.minute < 60 && p.second >= 0 && p.second < 60;
|
|
2840
|
-
}
|
|
2841
|
-
function dateText(p) {
|
|
2842
|
-
return `${pad(p.year, 4)}-${pad(p.month)}-${pad(p.day)}`;
|
|
2843
|
-
}
|
|
2844
|
-
function datetimeText(p) {
|
|
2845
|
-
return `${dateText(p)} ${pad(p.hour)}:${pad(p.minute)}:${pad(p.second)}${p.microsecond ? "." + pad(p.microsecond, 6) : ""}${p.offset ?? ""}`;
|
|
2846
|
-
}
|
|
2847
|
-
function base(year = 1900, month = 1, day = 1) {
|
|
2848
|
-
return { year, month, day, hour: 0, minute: 0, second: 0, microsecond: 0 };
|
|
2849
|
-
}
|
|
2850
|
-
function ordinal(year, month, day) {
|
|
2851
|
-
const previous = year - 1;
|
|
2852
|
-
let days = previous * 365 + Math.floor(previous / 4) - Math.floor(previous / 100) + Math.floor(previous / 400);
|
|
2853
|
-
for (let index = 1; index < month; index++)
|
|
2854
|
-
days += monthDays(year, index);
|
|
2855
|
-
return days + day;
|
|
2856
|
-
}
|
|
2857
|
-
function fromOrdinal(value) {
|
|
2858
|
-
if (value < 1 || value > ordinal(9999, 12, 31))
|
|
2859
|
-
throw new TemporalCastError();
|
|
2860
|
-
let year = Math.min(9999, Math.floor((value - 1) / 365.2425) + 1);
|
|
2861
|
-
while (ordinal(year, 1, 1) > value)
|
|
2862
|
-
year--;
|
|
2863
|
-
while (year < 9999 && ordinal(year + 1, 1, 1) <= value)
|
|
2864
|
-
year++;
|
|
2865
|
-
let month = 1;
|
|
2866
|
-
while (month < 12 && ordinal(year, month + 1, 1) <= value)
|
|
2867
|
-
month++;
|
|
2868
|
-
return base(year, month, value - ordinal(year, month, 1) + 1);
|
|
2869
|
-
}
|
|
2870
|
-
function offset(text2) {
|
|
2871
|
-
if (text2 === "Z")
|
|
2872
|
-
return "+00:00";
|
|
2873
|
-
const m = /^([+-])(\d{2}):?(\d{2})(?::?(\d{2})(?:\.(\d{1,6}))?)?$/.exec(text2);
|
|
2874
|
-
if (!m || Number(m[2]) > 23 || Number(m[3]) > 59 || Number(m[4] ?? 0) > 59)
|
|
2875
|
-
throw new TemporalCastError();
|
|
2876
|
-
const seconds = Number(m[4] ?? 0);
|
|
2877
|
-
const micros = Number((m[5] ?? "").padEnd(6, "0"));
|
|
2878
|
-
if (!Number(m[2]) && !Number(m[3]) && !seconds && !micros)
|
|
2879
|
-
return "+00:00";
|
|
2880
|
-
return `${m[1]}${m[2]}:${m[3]}${seconds || micros ? ":" + pad(seconds) : ""}${micros ? "." + pad(micros, 6) : ""}`;
|
|
2881
|
-
}
|
|
2882
|
-
function strptime(text2, format3, step) {
|
|
2883
|
-
const p = base();
|
|
2884
|
-
let position = 0;
|
|
2885
|
-
let ampm;
|
|
2886
|
-
let twelve = false;
|
|
2887
|
-
const seen = /* @__PURE__ */ new Set();
|
|
2888
|
-
const consume = (pattern) => {
|
|
2889
|
-
const match2 = pattern.exec(text2.slice(position));
|
|
2890
|
-
if (!match2)
|
|
2891
|
-
throw new TemporalCastError();
|
|
2892
|
-
position += match2[0].length;
|
|
2893
|
-
return match2[0];
|
|
2894
|
-
};
|
|
2895
|
-
for (let index = 0; index < format3.length; index++) {
|
|
2896
|
-
step();
|
|
2897
|
-
const char = format3[index];
|
|
2898
|
-
if (!stripWhitespace(char)) {
|
|
2899
|
-
while (index + 1 < format3.length && !stripWhitespace(format3[index + 1])) {
|
|
2900
|
-
step();
|
|
2901
|
-
index++;
|
|
2902
|
-
}
|
|
2903
|
-
const start = position;
|
|
2904
|
-
while (position < text2.length && !stripWhitespace(text2[position])) {
|
|
2905
|
-
step();
|
|
2906
|
-
position++;
|
|
2907
|
-
}
|
|
2908
|
-
if (start === position)
|
|
2909
|
-
throw new TemporalCastError();
|
|
2910
|
-
continue;
|
|
2911
|
-
}
|
|
2912
|
-
if (char !== "%") {
|
|
2913
|
-
if (text2[position++] !== char)
|
|
2914
|
-
throw new TemporalCastError();
|
|
2915
|
-
continue;
|
|
2916
|
-
}
|
|
2917
|
-
const directive = format3[++index];
|
|
2918
|
-
if (!directive)
|
|
2919
|
-
throw new TemporalCastError();
|
|
2920
|
-
if (seen.has(directive))
|
|
2921
|
-
throw new CsvkitBlocked(`strptime duplicate group name '${directive}'`);
|
|
2922
|
-
if (directive !== "%")
|
|
2923
|
-
seen.add(directive);
|
|
2924
|
-
switch (directive) {
|
|
2925
|
-
case "%":
|
|
2926
|
-
if (text2[position++] !== "%")
|
|
2927
|
-
throw new TemporalCastError();
|
|
2928
|
-
break;
|
|
2929
|
-
case "Y":
|
|
2930
|
-
p.year = Number(consume(/^\d{4}/));
|
|
2931
|
-
break;
|
|
2932
|
-
case "y": {
|
|
2933
|
-
const y = Number(consume(/^\d{2}/));
|
|
2934
|
-
p.year = y >= 69 ? 1900 + y : 2e3 + y;
|
|
2935
|
-
break;
|
|
2936
|
-
}
|
|
2937
|
-
case "m":
|
|
2938
|
-
p.month = Number(consume(/^(?:1[0-2]|0[1-9]|[1-9])/));
|
|
2939
|
-
break;
|
|
2940
|
-
case "d":
|
|
2941
|
-
p.day = Number(consume(/^(?:3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])/));
|
|
2942
|
-
break;
|
|
2943
|
-
case "H":
|
|
2944
|
-
p.hour = Number(consume(/^(?:2[0-3]|[01]\d|\d| \d)/));
|
|
2945
|
-
break;
|
|
2946
|
-
case "I":
|
|
2947
|
-
p.hour = Number(consume(/^(?:1[0-2]|0[1-9]|[1-9]| [1-9])/));
|
|
2948
|
-
twelve = true;
|
|
2949
|
-
if (p.hour < 1 || p.hour > 12)
|
|
2950
|
-
throw new TemporalCastError();
|
|
2951
|
-
break;
|
|
2952
|
-
case "M":
|
|
2953
|
-
p.minute = Number(consume(/^(?:[0-5]\d|\d)/));
|
|
2954
|
-
break;
|
|
2955
|
-
case "S":
|
|
2956
|
-
p.second = Number(consume(/^(?:6[01]|[0-5]\d|\d)/));
|
|
2957
|
-
break;
|
|
2958
|
-
case "f":
|
|
2959
|
-
p.microsecond = Number(consume(/^\d{1,6}/).padEnd(6, "0"));
|
|
2960
|
-
break;
|
|
2961
|
-
case "p":
|
|
2962
|
-
ampm = consume(/^(?:am|pm)/i).toLowerCase();
|
|
2963
|
-
break;
|
|
2964
|
-
case "b":
|
|
2965
|
-
case "B": {
|
|
2966
|
-
const name = consume(directive === "b" ? /^[a-z]{3}/i : /^[a-z]+/i).toLowerCase();
|
|
2967
|
-
p.month = months.findIndex((item) => directive === "b" ? item.slice(0, 3) === name : item === name) + 1;
|
|
2968
|
-
if (!p.month)
|
|
2969
|
-
throw new TemporalCastError();
|
|
2970
|
-
break;
|
|
2971
|
-
}
|
|
2972
|
-
case "a":
|
|
2973
|
-
case "A": {
|
|
2974
|
-
const name = consume(directive === "a" ? /^[a-z]{3}/i : /^[a-z]+/i).toLowerCase();
|
|
2975
|
-
if (!weekdays.some((item) => directive === "a" ? item.slice(0, 3) === name : item === name))
|
|
2976
|
-
throw new TemporalCastError();
|
|
2977
|
-
break;
|
|
2978
|
-
}
|
|
2979
|
-
case "z":
|
|
2980
|
-
p.offset = offset(consume(/^(?:Z|[+-]\d{2}:?\d{2}(?::?\d{2}(?:\.\d{1,6})?)?)/));
|
|
2981
|
-
break;
|
|
2982
|
-
case "Z":
|
|
2983
|
-
consume(/^(?:UTC|GMT)/i);
|
|
2984
|
-
break;
|
|
2985
|
-
default:
|
|
2986
|
-
throw new CsvkitBlocked(`strptime directive %${directive}`);
|
|
2987
|
-
}
|
|
2988
|
-
}
|
|
2989
|
-
if (position !== text2.length)
|
|
2990
|
-
throw new TemporalCastError();
|
|
2991
|
-
if (twelve)
|
|
2992
|
-
p.hour = p.hour % 12 + (ampm === "pm" ? 12 : 0);
|
|
2993
|
-
if (!valid(p))
|
|
2994
|
-
throw new TemporalCastError();
|
|
2995
|
-
return p;
|
|
2996
|
-
}
|
|
2997
|
-
function implicitDate(text2, source, step) {
|
|
2998
|
-
step();
|
|
2999
|
-
let normalized = "";
|
|
3000
|
-
for (const char of text2) {
|
|
3001
|
-
step();
|
|
3002
|
-
const code = char.codePointAt(0);
|
|
3003
|
-
if (integerWhitespace.includes(code) || code >= 28 && code <= 31) {
|
|
3004
|
-
if (!normalized.endsWith(" "))
|
|
3005
|
-
normalized += " ";
|
|
3006
|
-
} else
|
|
3007
|
-
normalized += char;
|
|
3008
|
-
}
|
|
3009
|
-
text2 = normalized;
|
|
3010
|
-
let m = /^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(text2);
|
|
3011
|
-
if (m) {
|
|
3012
|
-
const first = Number(m[1]);
|
|
3013
|
-
let year = first <= 31 ? Number(m[3]) : first;
|
|
3014
|
-
year += year < 50 ? 2e3 : year < 100 ? 1900 : 0;
|
|
3015
|
-
return base(year, first <= 31 ? first : Number(m[2]), first <= 31 ? Number(m[2]) : Number(m[3]));
|
|
3016
|
-
}
|
|
3017
|
-
m = /^(\d{1,2})\/(\d{1,2})(?:\/(\d{2}|\d{4}))?$/.exec(text2);
|
|
3018
|
-
if (m) {
|
|
3019
|
-
let year = m[3] ? Number(m[3]) : source.year;
|
|
3020
|
-
if (m[3]?.length === 2)
|
|
3021
|
-
year += year >= 50 ? 1900 : 2e3;
|
|
3022
|
-
const month = Number(m[1]);
|
|
3023
|
-
const day = Number(m[2]);
|
|
3024
|
-
if (!m[3] && (month < source.month || month === source.month && day < source.day))
|
|
3025
|
-
year++;
|
|
3026
|
-
if (!m[3] && year < 100)
|
|
3027
|
-
year += 2e3;
|
|
3028
|
-
return base(year, month, day);
|
|
3029
|
-
}
|
|
3030
|
-
m = /^([a-z]+) (\d{1,2})(?:,? (\d{4}))?$/i.exec(text2);
|
|
3031
|
-
if (m && months.some((name) => name === m[1].toLowerCase() || name.slice(0, 3) === m[1].toLowerCase())) {
|
|
3032
|
-
const month = months.findIndex((name) => name === m[1].toLowerCase() || name.slice(0, 3) === m[1].toLowerCase()) + 1;
|
|
3033
|
-
let year = m[3] ? Number(m[3]) : source.year;
|
|
3034
|
-
if (!m[3] && (month < source.month || month === source.month && Number(m[2]) < source.day))
|
|
3035
|
-
year++;
|
|
3036
|
-
return base(year, month, Number(m[2]));
|
|
3037
|
-
}
|
|
3038
|
-
const lower = text2.toLowerCase();
|
|
3039
|
-
const start = ordinal(source.year, source.month, source.day);
|
|
3040
|
-
if (["today", "tomorrow", "yesterday"].includes(lower))
|
|
3041
|
-
return fromOrdinal(start + (lower === "tomorrow" ? 1 : lower === "yesterday" ? -1 : 0));
|
|
3042
|
-
const weekday = weekdays.indexOf(lower);
|
|
3043
|
-
if (weekday >= 0)
|
|
3044
|
-
return fromOrdinal(start + ((weekday - (start - 1) % 7 + 7) % 7 || 7));
|
|
3045
|
-
if (lower === "next week")
|
|
3046
|
-
return fromOrdinal(start + 7);
|
|
3047
|
-
return void 0;
|
|
3048
|
-
}
|
|
3049
|
-
function temporalDate(type, text2, options, step) {
|
|
3050
|
-
const format3 = type === "Date" ? options.dateFormat : options.datetimeFormat;
|
|
3051
|
-
let nlpAbsent;
|
|
3052
|
-
const failure = () => {
|
|
3053
|
-
throw new TemporalCastError(format3 || type === "Date" && nlpAbsent ? `Value "${text2}" does not match date format.` : `Can not parse value "${text2}" as ${type === "Date" ? "date" : "datetime"}.`);
|
|
3054
|
-
};
|
|
3055
|
-
if (!format3 && ["second", "last"].includes(text2.toLowerCase()))
|
|
3056
|
-
return failure();
|
|
3057
|
-
if (format3 && options.locale && options.locale !== "en_US")
|
|
3058
|
-
throw new CsvkitBlocked(`LC_TIME strptime locale ${options.locale}`);
|
|
3059
|
-
if (options.locale && !["en_US", "en_US.UTF-8"].includes(options.locale))
|
|
3060
|
-
throw new CsvkitBlocked(`parsedatetime locale ${options.locale}`);
|
|
3061
|
-
let p;
|
|
3062
|
-
try {
|
|
3063
|
-
if (format3)
|
|
3064
|
-
p = strptime(text2, format3, step);
|
|
3065
|
-
else {
|
|
3066
|
-
if (/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)[eE][+-]?\d+$/.test(text2))
|
|
3067
|
-
throw new TemporalCastError();
|
|
3068
|
-
if (/^[+-]?\d+ days?, \d{1,2}:\d{2}:\d{2}(?:\.\d{1,6})?$/.test(text2))
|
|
3069
|
-
throw new TemporalCastError();
|
|
3070
|
-
if (/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)\s*(?:ms|us)$/i.test(text2))
|
|
3071
|
-
throw new TemporalCastError();
|
|
3072
|
-
const unit = /\d\s*([a-zſıİK]+)$/iu.exec(text2)?.[1];
|
|
3073
|
-
if (unit) {
|
|
3074
|
-
const folded = unit.replace(/[ſıİK]/gu, (char) => char === "\u017F" ? "s" : char === "\u212A" ? "k" : "i").toLowerCase();
|
|
3075
|
-
const aliases = ["seconds", "minutes", "second", "minute", "months", "hours", "weeks", "month", "years", "secs", "mins", "hour", "days", "week", "year", "sec", "min", "day", "mth", "hr", "dy", "wk", "yr", "s", "m", "h", "d", "w", "y"];
|
|
3076
|
-
if (type === "Date" && aliases.includes(folded) && /[ſı]/u.test(unit))
|
|
3077
|
-
throw new CsvkitDiagnostic(`KeyError: ${repr(lowerText(unit))}`);
|
|
3078
|
-
if (aliases.includes(folded) && (unit.includes("\u0130") || type === "DateTime" && /[ſı]/u.test(unit)))
|
|
3079
|
-
throw new TemporalCastError();
|
|
3080
|
-
}
|
|
3081
|
-
let source = base(1);
|
|
3082
|
-
if (type === "DateTime") {
|
|
3083
|
-
if (options.timezone && options.timezone !== "UTC")
|
|
3084
|
-
throw new CsvkitBlocked(`clock timezone ${options.timezone}`);
|
|
3085
|
-
if (options.now === void 0 && /^(?:today|tomorrow|yesterday|next week|monday|tuesday|wednesday|thursday|friday|saturday|sunday|\d{1,2}\/\d{1,2}|[a-z]+ \d{1,2})$/i.test(text2))
|
|
3086
|
-
throw new CsvkitBlocked("DateTime injected clock");
|
|
3087
|
-
if (options.now !== void 0 && !Number.isFinite(options.now))
|
|
3088
|
-
throw new CsvkitBlocked("DateTime clock range");
|
|
3089
|
-
source = fromOrdinal(Math.floor((options.now ?? 0) / 864e5) + ordinal(1970, 1, 1));
|
|
3090
|
-
}
|
|
3091
|
-
p = implicitDate(text2, source, step);
|
|
3092
|
-
const relative = /^([+-]?(?:\d+(?:\.\d*)?|\.\d+))\s*([a-zK]+)$/iu.exec(text2);
|
|
3093
|
-
if (!p && relative) {
|
|
3094
|
-
const unit2 = lowerText(relative[2]);
|
|
3095
|
-
if (["s", "sec", "secs", "second", "seconds", "m", "min", "mins", "minute", "minutes", "h", "hr", "hrs", "hour", "hours"].includes(unit2)) {
|
|
3096
|
-
nlpAbsent = false;
|
|
3097
|
-
throw new TemporalCastError();
|
|
3098
|
-
}
|
|
3099
|
-
if (["d", "dy", "dys", "day", "days", "w", "wk", "wks", "week", "weeks"].includes(unit2)) {
|
|
3100
|
-
const days = Number(relative[1]) * (unit2.startsWith("w") ? 7 : 1);
|
|
3101
|
-
if (!Number.isFinite(days))
|
|
3102
|
-
throw new TemporalCastError();
|
|
3103
|
-
nlpAbsent = false;
|
|
3104
|
-
p = fromOrdinal(ordinal(source.year, source.month, source.day) + Math.floor(days));
|
|
3105
|
-
}
|
|
3106
|
-
}
|
|
3107
|
-
nlpAbsent = !p && !/\d.*[-/:]|\b(?:today|tomorrow|yesterday|monday|tuesday|wednesday|thursday|friday|saturday|sunday)\b/i.test(text2);
|
|
3108
|
-
if (!p && type === "DateTime") {
|
|
3109
|
-
const m = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:[.,](\d+))?)?(Z|[+-]\d{2}:?\d{2})?$/.exec(text2);
|
|
3110
|
-
if (m) {
|
|
3111
|
-
p = { ...base(Number(m[1]), Number(m[2]), Number(m[3])), hour: Number(m[4]), minute: Number(m[5]), second: Number(m[6] ?? 0), microsecond: Number((m[7] ?? "").slice(0, 6).padEnd(6, "0")), ...m[8] ? { offset: offset(m[8]) } : {} };
|
|
3112
|
-
}
|
|
3113
|
-
}
|
|
3114
|
-
if (!p && !/^\d{4}-\d{2}-\d{2}[T ]/.test(text2) && /(?:\b(?:next|last|ago|week|month|year|day|hour|minute|second|noon|midnight|tonight)\b|\d.*[a-z])/i.test(text2))
|
|
3115
|
-
throw new CsvkitBlocked("parsedatetime expression " + repr(text2));
|
|
3116
|
-
}
|
|
3117
|
-
if (!p || !valid(p))
|
|
3118
|
-
failure();
|
|
3119
|
-
return { kind: type === "Date" ? "date" : "datetime", value: type === "Date" ? dateText(p) : datetimeText(p) };
|
|
3120
|
-
} catch (error) {
|
|
3121
|
-
if (error instanceof TemporalCastError) {
|
|
3122
|
-
if (!format3 && !p && type === "Date" && nlpAbsent === void 0)
|
|
3123
|
-
nlpAbsent = true;
|
|
3124
|
-
failure();
|
|
3125
|
-
}
|
|
3126
|
-
throw error;
|
|
3127
|
-
}
|
|
3128
|
-
}
|
|
3129
|
-
var DURATION_UNITS = ["(?:w|wks?|weeks?)", "(?:d|dys?|days?)", "(?:h|hrs?|hours?)", "(?:m|mins?|minutes?)", "(?:s|secs?|seconds?)"];
|
|
3130
|
-
var DURATION_NAMED = DURATION_UNITS.map((unit, index) => `(?:([\\d.]+)\\s*${unit}${index === 4 ? "" : "\\s*(?:[,/]\\s*)?"})?`).join("\\s*");
|
|
3131
|
-
var DURATION_PATTERNS = [
|
|
3132
|
-
new RegExp(`^\\s*${DURATION_NAMED}\\s*$`, "i"),
|
|
3133
|
-
/^(\d{1,2}):(\d{2}(?:\.\d+)?)$/,
|
|
3134
|
-
new RegExp(`^(?:([\\d.]+)\\s*${DURATION_UNITS[0]}\\s*(?:[,/]\\s*)?)?\\s*(?:([\\d.]+)\\s*${DURATION_UNITS[1]}\\s*(?:[,/]\\s*)?)?\\s*(\\d+):(\\d{2}):(\\d{2}(?:\\.\\d+)?)$`, "i"),
|
|
3135
|
-
/^(\d+):(\d{2}):(\d{2}):(\d{2}(?:\.\d+)?)$/,
|
|
3136
|
-
/^:(\d{2}(?:\.\d+)?)$/
|
|
3137
|
-
];
|
|
3138
|
-
var DURATION_MULTIPLIERS = [604800, 86400, 3600, 60, 1];
|
|
3139
|
-
function duration(text2, step) {
|
|
3140
|
-
step();
|
|
3141
|
-
let allAscii = true;
|
|
3142
|
-
for (let i = 0; i < text2.length; i++) {
|
|
3143
|
-
const c = text2.charCodeAt(i);
|
|
3144
|
-
if (c < 32 || c >= 127) {
|
|
3145
|
-
allAscii = false;
|
|
3146
|
-
break;
|
|
3147
|
-
}
|
|
3148
|
-
}
|
|
3149
|
-
let normalized;
|
|
3150
|
-
if (allAscii) {
|
|
3151
|
-
for (let i = 0; i < text2.length; i++)
|
|
3152
|
-
step();
|
|
3153
|
-
normalized = text2;
|
|
3154
|
-
} else {
|
|
3155
|
-
normalized = "";
|
|
3156
|
-
for (const char of text2) {
|
|
3157
|
-
step();
|
|
3158
|
-
const code = char.codePointAt(0);
|
|
3159
|
-
const zero = decimalZeroes.find((start) => code >= start && code < start + 10);
|
|
3160
|
-
normalized += zero !== void 0 ? String(code - zero) : integerWhitespace.includes(code) || code >= 28 && code <= 31 ? " " : char === "\u017F" ? "s" : char === "\u0130" || char === "\u0131" ? "i" : char === "\u212A" ? "k" : char;
|
|
3161
|
-
}
|
|
3162
|
-
}
|
|
3163
|
-
const sign = normalized[0] === "-" ? -1 : 1;
|
|
3164
|
-
const unsigned = stripWhitespace(["-", "+", "|"].includes(normalized[0] ?? "") ? normalized.slice(1) : normalized);
|
|
3165
|
-
let fields;
|
|
3166
|
-
for (let index = 0; index < DURATION_PATTERNS.length; index++) {
|
|
3167
|
-
const pattern = DURATION_PATTERNS[index];
|
|
3168
|
-
step();
|
|
3169
|
-
const m = pattern.exec(unsigned);
|
|
3170
|
-
if (!m || !m.slice(1).some(Boolean))
|
|
3171
|
-
continue;
|
|
3172
|
-
fields = index === 0 || index === 2 ? m.slice(1) : index === 1 ? [void 0, void 0, void 0, m[1], m[2]] : index === 3 ? [void 0, ...m.slice(1)] : [void 0, void 0, void 0, void 0, m[1]];
|
|
3173
|
-
break;
|
|
3174
|
-
}
|
|
3175
|
-
if (!fields)
|
|
3176
|
-
throw new TemporalCastError(`Can not parse value "${text2}" to as timedelta.`);
|
|
3177
|
-
const multipliers = DURATION_MULTIPLIERS;
|
|
3178
|
-
for (const field of fields)
|
|
3179
|
-
if (field && !/^\d+(?:\.\d*)?$|^\.\d+$/.test(field))
|
|
3180
|
-
throw new CsvkitDiagnostic(`ValueError: could not convert string to float: ${repr(field)}`);
|
|
3181
|
-
const integers = fields.every((value) => !value || /^\d+$/.test(value));
|
|
3182
|
-
let micros;
|
|
3183
|
-
if (integers)
|
|
3184
|
-
micros = BigInt(sign) * fields.reduce((total, field, index) => total + BigInt(field ?? 0) * BigInt(multipliers[index]), 0n) * 1000000n;
|
|
3185
|
-
else {
|
|
3186
|
-
let seconds;
|
|
3187
|
-
if (!fields[4] || /^\d+$/.test(fields[4]))
|
|
3188
|
-
seconds = sign * Math.trunc(fields.slice(0, 4).reduce((total, field, index) => total + Number(field ?? 0) * multipliers[index], 0)) + Number(fields[4] ?? 0);
|
|
3189
|
-
else
|
|
3190
|
-
seconds = sign * fields.reduce((total, field, index) => total + Number(field ?? 0) * multipliers[index], 0);
|
|
3191
|
-
if (!Number.isFinite(seconds) || Math.abs(seconds * 1e6) > Number.MAX_SAFE_INTEGER)
|
|
3192
|
-
throw new CsvkitBlocked("timedelta float range");
|
|
3193
|
-
const whole = Math.trunc(seconds);
|
|
3194
|
-
const value = (seconds - whole) * 1e6;
|
|
3195
|
-
const floor = Math.floor(value);
|
|
3196
|
-
const fraction = value - floor;
|
|
3197
|
-
micros = BigInt(whole) * 1000000n + BigInt(fraction > 0.5 || fraction === 0.5 && floor % 2 !== 0 ? floor + 1 : floor);
|
|
3198
|
-
}
|
|
3199
|
-
const days = micros < 0n ? (micros - 86399999999n) / 86400000000n : micros / 86400000000n;
|
|
3200
|
-
if (days < -999999999n || days > 999999999n)
|
|
3201
|
-
throw new CsvkitDiagnostic(`OverflowError: Python int too large to convert to C int`);
|
|
3202
|
-
return { kind: "timedelta", microseconds: micros };
|
|
3203
|
-
}
|
|
3204
|
-
function temporalOrder(value) {
|
|
3205
|
-
const m = /^(\d{4})-(\d{2})-(\d{2})(?: (\d{2}):(\d{2}):(\d{2})(?:\.(\d{6}))?([+-]\d{2}:\d{2}(?::\d{2}(?:\.\d{6})?)?)?)?$/.exec(value);
|
|
3206
|
-
if (!m)
|
|
3207
|
-
throw new CsvkitBlocked("temporal ordering offset profile");
|
|
3208
|
-
let result = BigInt(ordinal(Number(m[1]), Number(m[2]), Number(m[3]))) * 86400000000n + BigInt(Number(m[4] ?? 0) * 3600 + Number(m[5] ?? 0) * 60 + Number(m[6] ?? 0)) * 1000000n + BigInt(m[7] ?? 0);
|
|
3209
|
-
if (m[8]) {
|
|
3210
|
-
const zone = m[8];
|
|
3211
|
-
const seconds = Number(zone.slice(1, 3)) * 3600 + Number(zone.slice(4, 6)) * 60 + Number(zone.slice(7, 9) || 0);
|
|
3212
|
-
const micros = BigInt(seconds) * 1000000n + BigInt(zone.slice(10) || 0);
|
|
3213
|
-
result -= (zone[0] === "-" ? -1n : 1n) * micros;
|
|
3214
|
-
}
|
|
3215
|
-
return result;
|
|
3216
|
-
}
|
|
3217
|
-
|
|
3218
|
-
// packages/safe-bash-command-csvkit/dist/table/types.js
|
|
3219
|
-
function columnTypeOrder(options) {
|
|
3220
|
-
if (options.noInference)
|
|
3221
|
-
return ["Text"];
|
|
3222
|
-
if (options.numberTextOnly)
|
|
3223
|
-
return ["Number", "Text"];
|
|
3224
|
-
if (options.datetimeFormat)
|
|
3225
|
-
return ["Boolean", "TimeDelta", "Date", "DateTime", "Number", "Text"];
|
|
3226
|
-
if (options.dateFormat)
|
|
3227
|
-
return ["Boolean", "TimeDelta", "Date", "Number", "DateTime", "Text"];
|
|
3228
|
-
return ["Boolean", "Number", "TimeDelta", "Date", "DateTime", "Text"];
|
|
3229
|
-
}
|
|
3230
|
-
var CastError = class extends Error {
|
|
3231
|
-
};
|
|
3232
|
-
var DEFAULT_NULL_SET = /* @__PURE__ */ new Set(["", "na", "n/a", "none", "null", "."]);
|
|
3233
|
-
var CURRENCY_SYMBOLS = ["\u060B", "$", "\u0192", "\u17DB", "\xA5", "\u20A1", "\u20B1", "\xA3", "\u20AC", "\xA2", "\uFDFC", "\u20AA", "\u20A9", "\u20AD", "\u20AE", "\u20A6", "\u0E3F", "\u20A4", "\u20AB"];
|
|
3234
|
-
var BOOLEAN_TRUE_SET = /* @__PURE__ */ new Set(["yes", "y", "true", "t", "1"]);
|
|
3235
|
-
var BOOLEAN_FALSE_SET = /* @__PURE__ */ new Set(["no", "n", "false", "f", "0"]);
|
|
3236
|
-
function decimal(text2, options, step) {
|
|
3237
|
-
let allAscii = true;
|
|
3238
|
-
for (let i = 0; i < text2.length; i++) {
|
|
3239
|
-
if (text2.charCodeAt(i) >= 128) {
|
|
3240
|
-
allAscii = false;
|
|
3241
|
-
break;
|
|
3242
|
-
}
|
|
3243
|
-
}
|
|
3244
|
-
let ascii2;
|
|
3245
|
-
if (allAscii) {
|
|
3246
|
-
for (let i = 0; i < text2.length; i++)
|
|
3247
|
-
step();
|
|
3248
|
-
ascii2 = stripWhitespace(text2);
|
|
3249
|
-
if (ascii2.includes("_"))
|
|
3250
|
-
ascii2 = ascii2.replaceAll("_", "");
|
|
3251
|
-
} else {
|
|
3252
|
-
ascii2 = "";
|
|
3253
|
-
for (const char of text2) {
|
|
3254
|
-
step();
|
|
3255
|
-
const code = char.codePointAt(0);
|
|
3256
|
-
const zero = decimalZeroes.find((start) => code >= start && code < start + 10);
|
|
3257
|
-
ascii2 += zero === void 0 ? char : String(code - zero);
|
|
3258
755
|
}
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
return ascii2.startsWith("-") ? "-Infinity" : "Infinity";
|
|
3263
|
-
const nan = /^[+-]?nan(\d*)$/i.exec(ascii2);
|
|
3264
|
-
if (nan) {
|
|
3265
|
-
if (nan[1].length > (options.maxDecimalDigits ?? Infinity))
|
|
3266
|
-
throw new CsvkitBlocked("Decimal admission budget exceeded");
|
|
3267
|
-
return (ascii2.startsWith("-") ? "-" : "") + "NaN" + nan[1].slice(-28).replace(/^0+/, "");
|
|
3268
|
-
}
|
|
3269
|
-
if (/^[+-]?snan\d*$/i.test(ascii2))
|
|
3270
|
-
throw new CastError();
|
|
3271
|
-
const match2 = /^([+-]?)(?:(\d+)(?:\.(\d*))?|\.(\d+))(?:[eE]([+-]?\d+))?$/.exec(ascii2);
|
|
3272
|
-
if (!match2)
|
|
3273
|
-
throw new CastError();
|
|
3274
|
-
const fraction = match2[3] ?? match2[4] ?? "";
|
|
3275
|
-
if ((match2[2]?.length ?? 0) + fraction.length > (options.maxDecimalDigits ?? Infinity) || Math.abs(Number(match2[5] ?? 0)) > (options.maxDecimalExponent ?? Infinity))
|
|
3276
|
-
throw new CsvkitBlocked("Decimal admission budget exceeded");
|
|
3277
|
-
if (match2[2] !== void 0 && fraction.length === 0 && match2[5] === void 0 && !ascii2.includes(".") && match2[2].length <= 27 && (match2[2].length === 1 || match2[2].charCodeAt(0) !== 48)) {
|
|
3278
|
-
if (match2[2] === "0")
|
|
3279
|
-
return match2[1] === "-" ? "-0" : "0";
|
|
3280
|
-
return (match2[1] === "-" ? "-" : "") + match2[2];
|
|
756
|
+
const selected = columns.map((index) => record.cells[index] ?? null);
|
|
757
|
+
if (!runtime.options.delete_empty || selected.some((value) => typeof value === "number" ? value !== 0 : Boolean(value)))
|
|
758
|
+
await runtime.row(selected.map(inputWriteCell));
|
|
3281
759
|
}
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
}) {
|
|
3286
|
-
step();
|
|
3287
|
-
if (value === null)
|
|
3288
|
-
return null;
|
|
3289
|
-
if (type === "Text" && (!options.nullValues || options.nullValues.length === 0)) {
|
|
3290
|
-
if (options.blanks)
|
|
3291
|
-
return value;
|
|
3292
|
-
const len = value.length;
|
|
3293
|
-
if (len > 4) {
|
|
3294
|
-
const c0 = value.charCodeAt(0);
|
|
3295
|
-
const cLast = value.charCodeAt(len - 1);
|
|
3296
|
-
if (c0 > 32 && c0 < 128 && cLast > 32 && cLast < 128)
|
|
3297
|
-
return value;
|
|
3298
|
-
}
|
|
3299
|
-
}
|
|
3300
|
-
let text2 = stripWhitespace(value);
|
|
3301
|
-
if (type === "Boolean" && value.includes(","))
|
|
3302
|
-
text2 = stripWhitespace(value.replaceAll(",", ""));
|
|
3303
|
-
const lowered = lowerText(text2);
|
|
3304
|
-
if (!options.blanks && DEFAULT_NULL_SET.has(lowered))
|
|
3305
|
-
return null;
|
|
3306
|
-
if (options.nullValues && options.nullValues.length > 0 && options.nullValues.some((item) => lowerText(item) === lowered))
|
|
3307
|
-
return null;
|
|
3308
|
-
if (type === "Text")
|
|
3309
|
-
return value;
|
|
3310
|
-
if (type === "Boolean") {
|
|
3311
|
-
if (BOOLEAN_TRUE_SET.has(lowered))
|
|
3312
|
-
return true;
|
|
3313
|
-
if (BOOLEAN_FALSE_SET.has(lowered))
|
|
3314
|
-
return false;
|
|
3315
|
-
throw new CastError(`Can not convert value ${text2} to bool.`);
|
|
3316
|
-
}
|
|
3317
|
-
const { locale: numberLocale, ...temporalOptions } = options;
|
|
3318
|
-
if (type === "TimeDelta" || type === "Date" || type === "DateTime") {
|
|
3319
|
-
try {
|
|
3320
|
-
return type === "TimeDelta" ? duration(text2, step) : temporalDate(type, text2, temporalOptions, step);
|
|
3321
|
-
} catch (error) {
|
|
3322
|
-
if (error instanceof TemporalCastError)
|
|
3323
|
-
throw new CastError(error.message);
|
|
3324
|
-
throw error;
|
|
3325
|
-
}
|
|
3326
|
-
}
|
|
3327
|
-
const separators = { en_US: { group: ",", decimal: "." }, de_DE: { group: ".", decimal: "," } };
|
|
3328
|
-
const locale = numberLocale ?? "en_US";
|
|
3329
|
-
const symbols = separators[locale];
|
|
3330
|
-
if (!symbols)
|
|
3331
|
-
throw new CsvkitBlocked(`Agate Number locale ${locale}`);
|
|
3332
|
-
if (text2.startsWith("%") || text2.endsWith("%"))
|
|
3333
|
-
text2 = text2.replace(/^%+|%+$/g, "");
|
|
3334
|
-
const negative = text2.startsWith("-");
|
|
3335
|
-
if (negative)
|
|
3336
|
-
text2 = text2.slice(1);
|
|
3337
|
-
if (text2.length > 0) {
|
|
3338
|
-
const fCode = text2.charCodeAt(0);
|
|
3339
|
-
const lCode = text2.charCodeAt(text2.length - 1);
|
|
3340
|
-
if (fCode < 48 || fCode > 57 || lCode < 48 || lCode > 57) {
|
|
3341
|
-
for (const symbol of CURRENCY_SYMBOLS) {
|
|
3342
|
-
while (text2.startsWith(symbol)) {
|
|
3343
|
-
step();
|
|
3344
|
-
text2 = text2.slice(symbol.length);
|
|
3345
|
-
}
|
|
3346
|
-
while (text2.endsWith(symbol)) {
|
|
3347
|
-
step();
|
|
3348
|
-
text2 = text2.slice(0, -symbol.length);
|
|
3349
|
-
}
|
|
3350
|
-
}
|
|
3351
|
-
}
|
|
3352
|
-
}
|
|
3353
|
-
if (text2.includes(symbols.group))
|
|
3354
|
-
text2 = text2.replaceAll(symbols.group, "");
|
|
3355
|
-
if (symbols.decimal !== "." && text2.includes(symbols.decimal))
|
|
3356
|
-
text2 = text2.replaceAll(symbols.decimal, ".");
|
|
3357
|
-
if (options.noLeadingZeroes && text2.length > 1 && text2[0] === "0" && text2[1] !== ".")
|
|
3358
|
-
throw new CastError(`Can not parse value "${text2}" as Decimal without leading zeroes`);
|
|
3359
|
-
try {
|
|
3360
|
-
let value2 = decimal(text2, options, step);
|
|
3361
|
-
if (negative && !value2.includes("NaN"))
|
|
3362
|
-
value2 = value2.startsWith("-") ? value2.slice(1) : "-" + value2;
|
|
3363
|
-
return { kind: "decimal", value: value2 };
|
|
3364
|
-
} catch (error) {
|
|
3365
|
-
if (!(error instanceof CastError))
|
|
3366
|
-
throw error;
|
|
3367
|
-
throw new CastError(`Can not parse value "${text2}" as Decimal.`);
|
|
3368
|
-
}
|
|
3369
|
-
}
|
|
3370
|
-
function inferTable(headers, rows, options = {}, step = () => {
|
|
3371
|
-
}) {
|
|
3372
|
-
if (headers.some((name) => !name) || new Set(headers).size !== headers.length || !headers.length && rows.length)
|
|
3373
|
-
throw new CsvkitBlocked("Agate duplicate/unnamed column warning provenance");
|
|
3374
|
-
const order = options.limit === 0 ? ["Text"] : columnTypeOrder(options);
|
|
3375
|
-
const sample = options.limit ? rows.slice(0, options.limit) : rows;
|
|
3376
|
-
const hypotheses = headers.map(() => new Set(order));
|
|
3377
|
-
for (const row of sample) {
|
|
3378
|
-
for (const [index, candidates] of hypotheses.entries()) {
|
|
3379
|
-
step();
|
|
3380
|
-
if (candidates.size === 1 || row.length <= index)
|
|
3381
|
-
continue;
|
|
3382
|
-
for (const type of candidates) {
|
|
3383
|
-
if (type === "Text") {
|
|
3384
|
-
step();
|
|
3385
|
-
continue;
|
|
3386
|
-
}
|
|
3387
|
-
try {
|
|
3388
|
-
castValue(type, row[index], options, step);
|
|
3389
|
-
} catch (error) {
|
|
3390
|
-
if (!(error instanceof CastError))
|
|
3391
|
-
throw error;
|
|
3392
|
-
candidates.delete(type);
|
|
3393
|
-
}
|
|
3394
|
-
}
|
|
3395
|
-
}
|
|
3396
|
-
}
|
|
3397
|
-
const columns = headers.map((name, index) => {
|
|
3398
|
-
for (const type of order) {
|
|
3399
|
-
if (hypotheses[index].has(type))
|
|
3400
|
-
return { name, type };
|
|
3401
|
-
}
|
|
3402
|
-
throw new CsvkitBlocked("no compatible Agate column type");
|
|
3403
|
-
});
|
|
3404
|
-
const typedRows = rows.map((row, rowIndex) => {
|
|
3405
|
-
if (row.length > headers.length)
|
|
3406
|
-
throw new CsvkitDiagnostic(`ValueError: Row ${rowIndex} has ${row.length} values, but Table only has ${headers.length} columns.`);
|
|
3407
|
-
return columns.map((column, index) => {
|
|
3408
|
-
try {
|
|
3409
|
-
return castValue(column.type, row[index] ?? null, options.limit === 0 ? {} : options, step);
|
|
3410
|
-
} catch (error) {
|
|
3411
|
-
if (!(error instanceof CastError))
|
|
3412
|
-
throw error;
|
|
3413
|
-
throw new CsvkitDiagnostic(`CastError: ${error.message} Error at row ${rowIndex} column ${column.name}.`);
|
|
3414
|
-
}
|
|
3415
|
-
});
|
|
3416
|
-
});
|
|
3417
|
-
return { headers, columns, rows: typedRows, rawRows: rows };
|
|
3418
|
-
}
|
|
3419
|
-
|
|
3420
|
-
// packages/safe-bash-command-csvkit/dist/table/index.js
|
|
3421
|
-
async function readTable(runtime, path, rowLimit, normalize = false, lineNumbers = false, preserveCells = false) {
|
|
3422
|
-
const o = runtime.options;
|
|
3423
|
-
let headers;
|
|
3424
|
-
const rows = [];
|
|
3425
|
-
const recordLimit = rowLimit === void 0 ? void 0 : rowLimit + (o.no_header_row ? 0 : 1);
|
|
3426
|
-
const file = runtime.input(path);
|
|
3427
|
-
const records = preserveCells ? runtime.records(path, file, Number(o.skip_lines ?? 0), true, recordLimit, true) : runtime.records(path, file, Number(o.skip_lines ?? 0), true, recordLimit);
|
|
3428
|
-
for await (const record of records) {
|
|
3429
|
-
const values = record.cells.map((cell2) => pythonValueText(inputWriteCell(cell2)));
|
|
3430
|
-
const cells = lineNumbers ? [!o.no_header_row && record.line === 1 ? "line_numbers" : String(record.line - (o.no_header_row ? 0 : 1)), ...values] : values;
|
|
3431
|
-
if (cells.length > runtime.context.limits.maxColumns)
|
|
3432
|
-
throw new CsvkitBlocked("column budget exceeded");
|
|
3433
|
-
if (headers === void 0) {
|
|
3434
|
-
headers = o.no_header_row ? defaultHeaders(cells.length) : cells;
|
|
3435
|
-
if (normalize)
|
|
3436
|
-
headers = await normalizeHeaders(headers, runtime);
|
|
3437
|
-
if (headers.some((name) => !name) || new Set(headers).size !== headers.length)
|
|
3438
|
-
throw new CsvkitBlocked("Agate duplicate/unnamed column warning provenance");
|
|
3439
|
-
if (!o.no_header_row) {
|
|
3440
|
-
if (rowLimit === 0)
|
|
3441
|
-
break;
|
|
3442
|
-
continue;
|
|
3443
|
-
}
|
|
3444
|
-
}
|
|
3445
|
-
runtime.retain(64 + values.length * 16 + values.reduce((size, value) => size + value.length * 16 + 32, 0));
|
|
3446
|
-
rows.push(cells);
|
|
3447
|
-
if (rowLimit !== void 0 && rows.length >= rowLimit)
|
|
3448
|
-
break;
|
|
3449
|
-
}
|
|
3450
|
-
const options = {
|
|
3451
|
-
now: runtime.context.clock.now(),
|
|
3452
|
-
timezone: runtime.context.locale.timezone,
|
|
3453
|
-
noInference: Boolean(o.no_inference),
|
|
3454
|
-
numberTextOnly: o.out_quoting === 2,
|
|
3455
|
-
blanks: Boolean(o.blanks),
|
|
3456
|
-
nullValues: o.null_values ?? [],
|
|
3457
|
-
noLeadingZeroes: Boolean(o.no_leading_zeroes),
|
|
3458
|
-
maxDecimalDigits: runtime.context.limits.maxDecimalDigits,
|
|
3459
|
-
maxDecimalExponent: runtime.context.limits.maxDecimalExponent,
|
|
3460
|
-
...o.date_format ? { dateFormat: String(o.date_format) } : {},
|
|
3461
|
-
...o.datetime_format ? { datetimeFormat: String(o.datetime_format) } : {},
|
|
3462
|
-
...o.locale ? { locale: String(o.locale) } : {}
|
|
3463
|
-
};
|
|
3464
|
-
runtime.retain(64 + rows.length * (64 + (headers?.length ?? 0) * 64));
|
|
3465
|
-
return inferTable(headers ?? [], rows, options, runtime.step);
|
|
3466
|
-
}
|
|
3467
|
-
|
|
3468
|
-
// packages/safe-bash-command-csvkit/dist/operations/json-table.js
|
|
3469
|
-
function jsonString(value, runtime) {
|
|
3470
|
-
if (runtime.context.limits.maxRetainedBytes !== Infinity) {
|
|
3471
|
-
runtime.retain((value.length + 2) * 2);
|
|
3472
|
-
for (let index = 0; index < value.length; index++) {
|
|
3473
|
-
runtime.step();
|
|
3474
|
-
const code = value.charCodeAt(index);
|
|
3475
|
-
if (code === 34 || code === 92 || code >= 8 && code <= 10 || code === 12 || code === 13)
|
|
3476
|
-
runtime.retain(2);
|
|
3477
|
-
else if (code < 32)
|
|
3478
|
-
runtime.retain(10);
|
|
3479
|
-
else if (code >= 55296 && code <= 56319 && value.charCodeAt(index + 1) >= 56320 && value.charCodeAt(index + 1) <= 57343)
|
|
3480
|
-
index++;
|
|
3481
|
-
else if (code >= 55296 && code <= 57343)
|
|
3482
|
-
runtime.retain(10);
|
|
3483
|
-
}
|
|
3484
|
-
}
|
|
3485
|
-
return JSON.stringify(value);
|
|
3486
|
-
}
|
|
3487
|
-
function floatText(value) {
|
|
3488
|
-
if (Number.isNaN(value))
|
|
3489
|
-
return "NaN";
|
|
3490
|
-
if (!Number.isFinite(value))
|
|
3491
|
-
return value < 0 ? "-Infinity" : "Infinity";
|
|
3492
|
-
if (Object.is(value, -0))
|
|
3493
|
-
return "-0.0";
|
|
3494
|
-
const exponent = Number(value.toExponential().split("e")[1]);
|
|
3495
|
-
if (value !== 0 && (exponent < -4 || exponent >= 16)) {
|
|
3496
|
-
const [digits2, power] = value.toExponential().split("e");
|
|
3497
|
-
const exp = Number(power);
|
|
3498
|
-
return digits2 + "e" + (exp < 0 ? "-" : "+") + String(Math.abs(exp)).padStart(2, "0");
|
|
3499
|
-
}
|
|
3500
|
-
return String(value) + (Number.isInteger(value) ? ".0" : "");
|
|
3501
|
-
}
|
|
3502
|
-
async function emit(value, runtime, indent, depth = 0) {
|
|
3503
|
-
if (runtime.context.limits.maxOutputBytes !== Infinity || runtime.context.limits.maxWork !== Infinity || runtime.context.limits.maxRetainedBytes !== Infinity) {
|
|
3504
|
-
runtime.step();
|
|
3505
|
-
if (typeof value === "number") {
|
|
3506
|
-
await runtime.write(floatText(value));
|
|
3507
|
-
return;
|
|
3508
|
-
}
|
|
3509
|
-
if (value === null || typeof value === "string" || typeof value === "boolean") {
|
|
3510
|
-
await runtime.write(typeof value === "string" ? jsonString(value, runtime) : JSON.stringify(value));
|
|
3511
|
-
return;
|
|
3512
|
-
}
|
|
3513
|
-
if ("token" in value) {
|
|
3514
|
-
runtime.retain(value.token.length * 2);
|
|
3515
|
-
await runtime.write(value.token);
|
|
3516
|
-
return;
|
|
3517
|
-
}
|
|
3518
|
-
const object = value instanceof Map;
|
|
3519
|
-
const size = object ? value.size : value.length;
|
|
3520
|
-
runtime.retain(size * 32);
|
|
3521
|
-
await runtime.write(object ? "{" : "[");
|
|
3522
|
-
let index = 0;
|
|
3523
|
-
const entries = object ? value.entries() : value.entries();
|
|
3524
|
-
for (const [key, child2] of entries) {
|
|
3525
|
-
if (index++)
|
|
3526
|
-
await runtime.write(indent === null ? ", " : ",");
|
|
3527
|
-
if (indent !== null)
|
|
3528
|
-
await runtime.write("\n" + " ".repeat(indent * (depth + 1)));
|
|
3529
|
-
if (object)
|
|
3530
|
-
await runtime.write(jsonString(key, runtime) + ": ");
|
|
3531
|
-
await emit(child2, runtime, indent, depth + 1);
|
|
3532
|
-
}
|
|
3533
|
-
if (size && indent !== null)
|
|
3534
|
-
await runtime.write("\n" + " ".repeat(indent * depth));
|
|
3535
|
-
await runtime.write(object ? "}" : "]");
|
|
3536
|
-
return;
|
|
3537
|
-
}
|
|
3538
|
-
let buf = "";
|
|
3539
|
-
const flushIfNeeded = async () => {
|
|
3540
|
-
if (buf.length >= 32768) {
|
|
3541
|
-
const out = buf;
|
|
3542
|
-
buf = "";
|
|
3543
|
-
await runtime.write(out);
|
|
3544
|
-
}
|
|
3545
|
-
};
|
|
3546
|
-
const visitSync = (cur, d) => {
|
|
3547
|
-
runtime.step();
|
|
3548
|
-
if (typeof cur === "number") {
|
|
3549
|
-
buf += floatText(cur);
|
|
3550
|
-
return;
|
|
3551
|
-
}
|
|
3552
|
-
if (cur === null || typeof cur === "string" || typeof cur === "boolean") {
|
|
3553
|
-
buf += typeof cur === "string" ? jsonString(cur, runtime) : JSON.stringify(cur);
|
|
3554
|
-
return;
|
|
3555
|
-
}
|
|
3556
|
-
if ("token" in cur) {
|
|
3557
|
-
buf += cur.token;
|
|
3558
|
-
return;
|
|
3559
|
-
}
|
|
3560
|
-
if (cur instanceof Map) {
|
|
3561
|
-
runtime.retain(cur.size * 32);
|
|
3562
|
-
buf += "{";
|
|
3563
|
-
let index = 0;
|
|
3564
|
-
const childPad2 = indent !== null ? "\n" + " ".repeat(indent * (d + 1)) : "";
|
|
3565
|
-
for (const [key, child2] of cur.entries()) {
|
|
3566
|
-
if (index++)
|
|
3567
|
-
buf += indent === null ? ", " : ",";
|
|
3568
|
-
if (indent !== null)
|
|
3569
|
-
buf += childPad2;
|
|
3570
|
-
buf += jsonString(key, runtime) + ": ";
|
|
3571
|
-
visitSync(child2, d + 1);
|
|
3572
|
-
}
|
|
3573
|
-
if (cur.size && indent !== null)
|
|
3574
|
-
buf += "\n" + " ".repeat(indent * d);
|
|
3575
|
-
buf += "}";
|
|
3576
|
-
return;
|
|
3577
|
-
}
|
|
3578
|
-
const arr = cur;
|
|
3579
|
-
runtime.retain(arr.length * 32);
|
|
3580
|
-
buf += "[";
|
|
3581
|
-
const childPad = indent !== null ? "\n" + " ".repeat(indent * (d + 1)) : "";
|
|
3582
|
-
for (let index = 0; index < arr.length; index++) {
|
|
3583
|
-
if (index)
|
|
3584
|
-
buf += indent === null ? ", " : ",";
|
|
3585
|
-
if (indent !== null)
|
|
3586
|
-
buf += childPad;
|
|
3587
|
-
visitSync(arr[index], d + 1);
|
|
3588
|
-
}
|
|
3589
|
-
if (arr.length && indent !== null)
|
|
3590
|
-
buf += "\n" + " ".repeat(indent * d);
|
|
3591
|
-
buf += "]";
|
|
3592
|
-
};
|
|
3593
|
-
const visitAsync = async (cur, d) => {
|
|
3594
|
-
if (cur instanceof Map) {
|
|
3595
|
-
runtime.step();
|
|
3596
|
-
runtime.retain(cur.size * 32);
|
|
3597
|
-
await runtime.write("{");
|
|
3598
|
-
let index = 0;
|
|
3599
|
-
const childPad = indent !== null ? "\n" + " ".repeat(indent * (d + 1)) : "";
|
|
3600
|
-
for (const [key, child2] of cur.entries()) {
|
|
3601
|
-
if (index++)
|
|
3602
|
-
buf += indent === null ? ", " : ",";
|
|
3603
|
-
if (indent !== null)
|
|
3604
|
-
buf += childPad;
|
|
3605
|
-
buf += jsonString(key, runtime) + ": ";
|
|
3606
|
-
visitSync(child2, d + 1);
|
|
3607
|
-
if (buf.length >= 32768)
|
|
3608
|
-
await flushIfNeeded();
|
|
3609
|
-
}
|
|
3610
|
-
if (cur.size && indent !== null)
|
|
3611
|
-
buf += "\n" + " ".repeat(indent * d);
|
|
3612
|
-
buf += "}";
|
|
3613
|
-
return;
|
|
3614
|
-
}
|
|
3615
|
-
if (Array.isArray(cur)) {
|
|
3616
|
-
const arr = cur;
|
|
3617
|
-
runtime.step();
|
|
3618
|
-
runtime.retain(arr.length * 32);
|
|
3619
|
-
await runtime.write("[");
|
|
3620
|
-
const childPad = indent !== null ? "\n" + " ".repeat(indent * (d + 1)) : "";
|
|
3621
|
-
for (let index = 0; index < arr.length; index++) {
|
|
3622
|
-
if (index)
|
|
3623
|
-
buf += indent === null ? ", " : ",";
|
|
3624
|
-
if (indent !== null)
|
|
3625
|
-
buf += childPad;
|
|
3626
|
-
visitSync(arr[index], d + 1);
|
|
3627
|
-
if (buf.length >= 32768)
|
|
3628
|
-
await flushIfNeeded();
|
|
3629
|
-
}
|
|
3630
|
-
if (arr.length && indent !== null)
|
|
3631
|
-
buf += "\n" + " ".repeat(indent * d);
|
|
3632
|
-
buf += "]";
|
|
3633
|
-
return;
|
|
3634
|
-
}
|
|
3635
|
-
visitSync(cur, d);
|
|
3636
|
-
};
|
|
3637
|
-
await visitAsync(value, depth);
|
|
3638
|
-
if (buf.length > 0)
|
|
3639
|
-
await runtime.write(buf);
|
|
3640
|
-
}
|
|
3641
|
-
async function jsonTable(runtime, indent) {
|
|
3642
|
-
const table = await readTable(runtime, void 0, void 0, true);
|
|
3643
|
-
if (runtime.options.streamOutput && runtime.options.key !== null)
|
|
3644
|
-
throw new CsvkitDiagnostic("ValueError: key and newline may not be specified together.");
|
|
3645
|
-
if (runtime.options.streamOutput && runtime.options.indent !== null)
|
|
3646
|
-
throw new CsvkitDiagnostic("ValueError: newline and indent may not be specified together.");
|
|
3647
|
-
const jsonify = (value) => {
|
|
3648
|
-
if (typeof value !== "object" || value === null)
|
|
3649
|
-
return value;
|
|
3650
|
-
if (value.kind === "decimal")
|
|
3651
|
-
return value.value.includes("NaN") ? NaN : Number(value.value);
|
|
3652
|
-
if (value.kind === "datetime")
|
|
3653
|
-
return value.value.replace(" ", "T");
|
|
3654
|
-
return pythonValueText(value);
|
|
3655
|
-
};
|
|
3656
|
-
const rows = table.rows.map((row) => {
|
|
3657
|
-
runtime.step();
|
|
3658
|
-
runtime.retain(64 + table.headers.length * 64);
|
|
3659
|
-
return new Map(table.headers.map((name, index) => [name, jsonify(row[index])]));
|
|
3660
|
-
});
|
|
3661
|
-
let output = rows;
|
|
3662
|
-
if (runtime.options.key !== null) {
|
|
3663
|
-
const key = String(runtime.options.key);
|
|
3664
|
-
const column = table.headers.indexOf(key);
|
|
3665
|
-
if (column < 0 && rows.length)
|
|
3666
|
-
throw new CsvkitDiagnostic(`KeyError: ${repr(key)}`);
|
|
3667
|
-
const keyed = /* @__PURE__ */ new Map();
|
|
3668
|
-
for (const [index, row] of table.rows.entries()) {
|
|
3669
|
-
runtime.step();
|
|
3670
|
-
const cell2 = row[column];
|
|
3671
|
-
const value = cell2 === null ? "None" : typeof cell2 === "object" && cell2.kind === "decimal" ? Decimal.parse(cell2.value).normalized().toString() : pythonValueText(cell2);
|
|
3672
|
-
if (keyed.has(value))
|
|
3673
|
-
throw new CsvkitDiagnostic(`ValueError: Value ${value} is not unique in the key column.`);
|
|
3674
|
-
keyed.set(value, rows[index]);
|
|
3675
|
-
runtime.retain(96);
|
|
3676
|
-
}
|
|
3677
|
-
output = keyed;
|
|
3678
|
-
}
|
|
3679
|
-
if (indent !== null)
|
|
3680
|
-
runtime.retain(indent * 6);
|
|
3681
|
-
if (runtime.options.streamOutput) {
|
|
3682
|
-
for (const row of rows) {
|
|
3683
|
-
await emit(row, runtime, indent);
|
|
3684
|
-
await runtime.write("\n");
|
|
3685
|
-
}
|
|
3686
|
-
return 0;
|
|
3687
|
-
}
|
|
3688
|
-
await emit(output, runtime, indent);
|
|
3689
|
-
return 0;
|
|
3690
|
-
}
|
|
3691
|
-
|
|
3692
|
-
// packages/safe-bash-command-csvkit/dist/operations/input-cells.js
|
|
3693
|
-
function inputWriteCell(cell2) {
|
|
3694
|
-
return typeof cell2 === "number" ? {
|
|
3695
|
-
kind: "float",
|
|
3696
|
-
value: Number.isFinite(cell2) ? floatText(cell2) : pythonValueText(cell2)
|
|
3697
|
-
} : cell2;
|
|
3698
|
-
}
|
|
3699
|
-
|
|
3700
|
-
// packages/safe-bash-command-csvkit/dist/commands/csvcut.js
|
|
3701
|
-
async function cut(runtime) {
|
|
3702
|
-
if (runtime.options.names_only)
|
|
3703
|
-
return printNames(runtime);
|
|
3704
|
-
await runtime.prompt();
|
|
3705
|
-
let headers;
|
|
3706
|
-
let columns = [];
|
|
3707
|
-
for await (const record of runtime.records(void 0, void 0, void 0, void 0, void 0, true)) {
|
|
3708
|
-
if (headers === void 0) {
|
|
3709
|
-
const generated = Boolean(runtime.options.no_header_row);
|
|
3710
|
-
headers = generated ? defaultHeaders(record.cells.length) : record.cells.map((cell2) => pythonValueText(inputWriteCell(cell2)));
|
|
3711
|
-
columns = parseColumnIdentifiers(runtime.options.columns, headers, runtime.options.zero_based ? 0 : 1, runtime.options.not_columns, runtime.step, generated);
|
|
3712
|
-
await runtime.row(columns.map((index) => headers[index]));
|
|
3713
|
-
if (!generated)
|
|
3714
|
-
continue;
|
|
3715
|
-
}
|
|
3716
|
-
const selected = columns.map((index) => record.cells[index] ?? null);
|
|
3717
|
-
if (!runtime.options.delete_empty || selected.some((value) => typeof value === "number" ? value !== 0 : Boolean(value)))
|
|
3718
|
-
await runtime.row(selected.map(inputWriteCell));
|
|
3719
|
-
}
|
|
3720
|
-
if (headers === void 0)
|
|
3721
|
-
await runtime.row([]);
|
|
3722
|
-
return 0;
|
|
760
|
+
if (headers === void 0)
|
|
761
|
+
await runtime.row([]);
|
|
762
|
+
return 0;
|
|
3723
763
|
}
|
|
3724
764
|
var csvcut = {
|
|
3725
765
|
execute: cut,
|
|
@@ -4859,12 +1899,12 @@ function compilePythonSearch(pattern, step, maxWork, retain) {
|
|
|
4859
1899
|
yield* evaluate(child2, text2, position);
|
|
4860
1900
|
} else if (node.kind === "sequence") {
|
|
4861
1901
|
const nodes = node.nodes;
|
|
4862
|
-
function* sequence(index2,
|
|
1902
|
+
function* sequence(index2, offset) {
|
|
4863
1903
|
tick();
|
|
4864
1904
|
if (index2 === nodes.length)
|
|
4865
|
-
yield
|
|
1905
|
+
yield offset;
|
|
4866
1906
|
else
|
|
4867
|
-
for (const next of evaluate(nodes[index2], text2,
|
|
1907
|
+
for (const next of evaluate(nodes[index2], text2, offset))
|
|
4868
1908
|
yield* sequence(index2 + 1, next);
|
|
4869
1909
|
}
|
|
4870
1910
|
yield* sequence(0, position);
|
|
@@ -4875,9 +1915,9 @@ function compilePythonSearch(pattern, step, maxWork, retain) {
|
|
|
4875
1915
|
if (count >= node.min)
|
|
4876
1916
|
yield* positions;
|
|
4877
1917
|
const next = /* @__PURE__ */ new Set();
|
|
4878
|
-
for (const
|
|
4879
|
-
for (const end of evaluate(node.node, text2,
|
|
4880
|
-
if (end !==
|
|
1918
|
+
for (const offset of positions)
|
|
1919
|
+
for (const end of evaluate(node.node, text2, offset)) {
|
|
1920
|
+
if (end !== offset || count < node.min)
|
|
4881
1921
|
next.add(end);
|
|
4882
1922
|
}
|
|
4883
1923
|
positions = next;
|
|
@@ -10154,11 +7194,11 @@ function deriveSchema(runtime, table, name, dialect, connected) {
|
|
|
10154
7194
|
continue;
|
|
10155
7195
|
if (!Number.isFinite(Number(value.value)))
|
|
10156
7196
|
continue;
|
|
10157
|
-
const
|
|
10158
|
-
if (
|
|
7197
|
+
const decimal = Decimal.parse(value.value).normalized();
|
|
7198
|
+
if (decimal.special)
|
|
10159
7199
|
continue;
|
|
10160
|
-
whole = Math.max(whole,
|
|
10161
|
-
fractional = Math.max(fractional, -
|
|
7200
|
+
whole = Math.max(whole, decimal.coefficient.toString().length + decimal.exponent);
|
|
7201
|
+
fractional = Math.max(fractional, -decimal.exponent);
|
|
10162
7202
|
}
|
|
10163
7203
|
type += `(${dialect.numericPrecision}, ${Math.min(fractional, 28 - whole)})`;
|
|
10164
7204
|
}
|
|
@@ -10298,15 +7338,15 @@ function digits(text2, alphabet, prefixUnderscore = false) {
|
|
|
10298
7338
|
function numeric(text2) {
|
|
10299
7339
|
const sign = text2[0] === "-" ? -1 : 1;
|
|
10300
7340
|
const payload = text2[0] === "+" || text2[0] === "-" ? text2.slice(1) : text2;
|
|
10301
|
-
const
|
|
10302
|
-
if (["0x", "0o", "0b"].includes(
|
|
10303
|
-
const alphabet =
|
|
7341
|
+
const base = payload.slice(0, 2).toLowerCase();
|
|
7342
|
+
if (["0x", "0o", "0b"].includes(base)) {
|
|
7343
|
+
const alphabet = base === "0x" ? "0123456789abcdef" : base === "0o" ? "01234567" : "01";
|
|
10304
7344
|
if (payload.slice(2).includes("__"))
|
|
10305
|
-
syntax(`invalid ${
|
|
7345
|
+
syntax(`invalid ${base === "0x" ? "hexadecimal" : base === "0o" ? "octal" : "binary"} literal`);
|
|
10306
7346
|
const body2 = digits(payload.slice(2), alphabet, true);
|
|
10307
7347
|
if (body2.length > 4300)
|
|
10308
7348
|
blocked();
|
|
10309
|
-
const value2 = BigInt(
|
|
7349
|
+
const value2 = BigInt(base + body2) * BigInt(sign);
|
|
10310
7350
|
return Number.isSafeInteger(Number(value2)) ? Number(value2) : value2;
|
|
10311
7351
|
}
|
|
10312
7352
|
if (payload.includes("__"))
|
|
@@ -10733,7 +7773,7 @@ function sqlOptions(pairs, step) {
|
|
|
10733
7773
|
consume();
|
|
10734
7774
|
let value = raw;
|
|
10735
7775
|
if (typeof raw === "string") {
|
|
10736
|
-
for (let
|
|
7776
|
+
for (let offset = 0; offset < raw.length; offset += 256)
|
|
10737
7777
|
consume();
|
|
10738
7778
|
syntaxProfile(raw);
|
|
10739
7779
|
const text2 = raw.trim();
|
|
@@ -11016,12 +8056,12 @@ var LazyInput = class {
|
|
|
11016
8056
|
const peekLength = Math.min(size, profile.peekBytes);
|
|
11017
8057
|
this.retain(peekLength);
|
|
11018
8058
|
const peek = new Uint8Array(peekLength);
|
|
11019
|
-
let
|
|
8059
|
+
let offset = 0;
|
|
11020
8060
|
for (const chunk of this.#bytePrefix) {
|
|
11021
|
-
const part = chunk.subarray(0, peek.length -
|
|
11022
|
-
peek.set(part,
|
|
11023
|
-
|
|
11024
|
-
if (
|
|
8061
|
+
const part = chunk.subarray(0, peek.length - offset);
|
|
8062
|
+
peek.set(part, offset);
|
|
8063
|
+
offset += part.length;
|
|
8064
|
+
if (offset === peek.length)
|
|
11025
8065
|
break;
|
|
11026
8066
|
}
|
|
11027
8067
|
const text2 = await profile.decode(peek, this.encoding, this.signal);
|
|
@@ -11074,10 +8114,10 @@ var LazyInput = class {
|
|
|
11074
8114
|
}
|
|
11075
8115
|
this.retain(size);
|
|
11076
8116
|
const joined = new Uint8Array(size);
|
|
11077
|
-
let
|
|
8117
|
+
let offset = 0;
|
|
11078
8118
|
for (const chunk of bytes) {
|
|
11079
|
-
joined.set(chunk,
|
|
11080
|
-
|
|
8119
|
+
joined.set(chunk, offset);
|
|
8120
|
+
offset += chunk.length;
|
|
11081
8121
|
}
|
|
11082
8122
|
const text2 = await this.codec.decode(joined, this.encoding, this.signal);
|
|
11083
8123
|
chunks = (async function* () {
|
|
@@ -12879,13 +9919,13 @@ function frequencies(values, runtime) {
|
|
|
12879
9919
|
let key;
|
|
12880
9920
|
if (typeof value === "object" && value) {
|
|
12881
9921
|
if (value.kind === "decimal") {
|
|
12882
|
-
const
|
|
12883
|
-
key =
|
|
9922
|
+
const decimal = Decimal.parse(value.value).normalized();
|
|
9923
|
+
key = decimal.special === "NaN" ? "nan:" + index : decimal.coefficient === 0n && !decimal.special ? "decimal:0" : "decimal:" + decimal.toString();
|
|
12884
9924
|
} else if (value.kind === "timedelta")
|
|
12885
9925
|
key = "duration:" + value.microseconds;
|
|
12886
9926
|
else {
|
|
12887
|
-
const
|
|
12888
|
-
key = value.kind + ":" +
|
|
9927
|
+
const offset = value.kind === "datetime" && (value.value.slice(19).includes("+") || value.value.slice(19).includes("-")) ? "aware:" : "naive:";
|
|
9928
|
+
key = value.kind + ":" + offset + temporalOrder(value.value);
|
|
12889
9929
|
}
|
|
12890
9930
|
} else
|
|
12891
9931
|
key = typeof value + ":" + value;
|
|
@@ -12941,11 +9981,11 @@ function calculate(op, type, values, distinct, runtime) {
|
|
|
12941
9981
|
const spelling = value.value;
|
|
12942
9982
|
if (!Number.isFinite(Number(spelling)))
|
|
12943
9983
|
continue;
|
|
12944
|
-
const
|
|
12945
|
-
if (
|
|
9984
|
+
const decimal = Decimal.parse(spelling).normalized();
|
|
9985
|
+
if (decimal.special)
|
|
12946
9986
|
continue;
|
|
12947
|
-
whole = Math.max(whole,
|
|
12948
|
-
places = Math.max(places, -
|
|
9987
|
+
whole = Math.max(whole, decimal.coefficient.toString().length + decimal.exponent);
|
|
9988
|
+
places = Math.max(places, -decimal.exponent);
|
|
12949
9989
|
}
|
|
12950
9990
|
return Math.min(places, 28 - whole);
|
|
12951
9991
|
} else if ((op === "min" || op === "max") && ["Number", "Date", "DateTime", "TimeDelta"].includes(type)) {
|
|
@@ -12977,31 +10017,31 @@ function calculate(op, type, values, distinct, runtime) {
|
|
|
12977
10017
|
runtime.step();
|
|
12978
10018
|
return Decimal.parse(value.value);
|
|
12979
10019
|
});
|
|
12980
|
-
let
|
|
10020
|
+
let decimal;
|
|
12981
10021
|
if (op === "median") {
|
|
12982
10022
|
runtime.retain(4096 + numbers.length * 16);
|
|
12983
10023
|
const median = decimalPercentiles(numbers, runtime.step)[50];
|
|
12984
10024
|
if (!median)
|
|
12985
10025
|
return null;
|
|
12986
|
-
|
|
10026
|
+
decimal = median;
|
|
12987
10027
|
} else if (op === "stdev") {
|
|
12988
10028
|
const variance = sampleVariance(numbers, runtime.step);
|
|
12989
10029
|
if (!variance)
|
|
12990
10030
|
return null;
|
|
12991
|
-
|
|
10031
|
+
decimal = sqrt(variance, runtime);
|
|
12992
10032
|
} else {
|
|
12993
|
-
|
|
10033
|
+
decimal = Decimal.parse("0");
|
|
12994
10034
|
for (const number2 of numbers) {
|
|
12995
10035
|
runtime.step();
|
|
12996
|
-
|
|
10036
|
+
decimal = decimal.add(number2);
|
|
12997
10037
|
}
|
|
12998
10038
|
if (op !== "sum") {
|
|
12999
10039
|
if (!numbers.length)
|
|
13000
10040
|
return null;
|
|
13001
|
-
|
|
10041
|
+
decimal = decimal.divide(Decimal.parse(String(numbers.length)));
|
|
13002
10042
|
}
|
|
13003
10043
|
}
|
|
13004
|
-
result = { kind: "decimal", value:
|
|
10044
|
+
result = { kind: "decimal", value: decimal.toString() };
|
|
13005
10045
|
}
|
|
13006
10046
|
return runtime.options.json_output ? result : format2(result, runtime);
|
|
13007
10047
|
} catch (failure) {
|
|
@@ -13952,157 +10992,6 @@ init_buffer();
|
|
|
13952
10992
|
|
|
13953
10993
|
// packages/safe-bash-command-csvkit/dist/runtime.js
|
|
13954
10994
|
init_buffer();
|
|
13955
|
-
|
|
13956
|
-
// packages/safe-bash-command-csvkit/dist/csv/sniffer.js
|
|
13957
|
-
init_buffer();
|
|
13958
|
-
|
|
13959
|
-
// packages/safe-bash-command-csvkit/dist/csv/sniffer-quotes.js
|
|
13960
|
-
init_buffer();
|
|
13961
|
-
|
|
13962
|
-
// packages/safe-bash-command-csvkit/dist/csv/sniffer-unicode.js
|
|
13963
|
-
init_buffer();
|
|
13964
|
-
var PYTHON_WORD_CLASS = String.raw`\u{30}-\u{39}\u{41}-\u{5a}\u{5f}\u{61}-\u{7a}\u{aa}\u{b2}-\u{b3}\u{b5}\u{b9}-\u{ba}\u{bc}-\u{be}\u{c0}-\u{d6}\u{d8}-\u{f6}\u{f8}-\u{2c1}\u{2c6}-\u{2d1}\u{2e0}-\u{2e4}\u{2ec}\u{2ee}\u{370}-\u{374}\u{376}-\u{377}\u{37a}-\u{37d}\u{37f}\u{386}\u{388}-\u{38a}\u{38c}\u{38e}-\u{3a1}\u{3a3}-\u{3f5}\u{3f7}-\u{481}\u{48a}-\u{52f}\u{531}-\u{556}\u{559}\u{560}-\u{588}\u{5d0}-\u{5ea}\u{5ef}-\u{5f2}\u{620}-\u{64a}\u{660}-\u{669}\u{66e}-\u{66f}\u{671}-\u{6d3}\u{6d5}\u{6e5}-\u{6e6}\u{6ee}-\u{6fc}\u{6ff}\u{710}\u{712}-\u{72f}\u{74d}-\u{7a5}\u{7b1}\u{7c0}-\u{7ea}\u{7f4}-\u{7f5}\u{7fa}\u{800}-\u{815}\u{81a}\u{824}\u{828}\u{840}-\u{858}\u{860}-\u{86a}\u{870}-\u{887}\u{889}-\u{88e}\u{8a0}-\u{8c9}\u{904}-\u{939}\u{93d}\u{950}\u{958}-\u{961}\u{966}-\u{96f}\u{971}-\u{980}\u{985}-\u{98c}\u{98f}-\u{990}\u{993}-\u{9a8}\u{9aa}-\u{9b0}\u{9b2}\u{9b6}-\u{9b9}\u{9bd}\u{9ce}\u{9dc}-\u{9dd}\u{9df}-\u{9e1}\u{9e6}-\u{9f1}\u{9f4}-\u{9f9}\u{9fc}\u{a05}-\u{a0a}\u{a0f}-\u{a10}\u{a13}-\u{a28}\u{a2a}-\u{a30}\u{a32}-\u{a33}\u{a35}-\u{a36}\u{a38}-\u{a39}\u{a59}-\u{a5c}\u{a5e}\u{a66}-\u{a6f}\u{a72}-\u{a74}\u{a85}-\u{a8d}\u{a8f}-\u{a91}\u{a93}-\u{aa8}\u{aaa}-\u{ab0}\u{ab2}-\u{ab3}\u{ab5}-\u{ab9}\u{abd}\u{ad0}\u{ae0}-\u{ae1}\u{ae6}-\u{aef}\u{af9}\u{b05}-\u{b0c}\u{b0f}-\u{b10}\u{b13}-\u{b28}\u{b2a}-\u{b30}\u{b32}-\u{b33}\u{b35}-\u{b39}\u{b3d}\u{b5c}-\u{b5d}\u{b5f}-\u{b61}\u{b66}-\u{b6f}\u{b71}-\u{b77}\u{b83}\u{b85}-\u{b8a}\u{b8e}-\u{b90}\u{b92}-\u{b95}\u{b99}-\u{b9a}\u{b9c}\u{b9e}-\u{b9f}\u{ba3}-\u{ba4}\u{ba8}-\u{baa}\u{bae}-\u{bb9}\u{bd0}\u{be6}-\u{bf2}\u{c05}-\u{c0c}\u{c0e}-\u{c10}\u{c12}-\u{c28}\u{c2a}-\u{c39}\u{c3d}\u{c58}-\u{c5a}\u{c5d}\u{c60}-\u{c61}\u{c66}-\u{c6f}\u{c78}-\u{c7e}\u{c80}\u{c85}-\u{c8c}\u{c8e}-\u{c90}\u{c92}-\u{ca8}\u{caa}-\u{cb3}\u{cb5}-\u{cb9}\u{cbd}\u{cdd}-\u{cde}\u{ce0}-\u{ce1}\u{ce6}-\u{cef}\u{cf1}-\u{cf2}\u{d04}-\u{d0c}\u{d0e}-\u{d10}\u{d12}-\u{d3a}\u{d3d}\u{d4e}\u{d54}-\u{d56}\u{d58}-\u{d61}\u{d66}-\u{d78}\u{d7a}-\u{d7f}\u{d85}-\u{d96}\u{d9a}-\u{db1}\u{db3}-\u{dbb}\u{dbd}\u{dc0}-\u{dc6}\u{de6}-\u{def}\u{e01}-\u{e30}\u{e32}-\u{e33}\u{e40}-\u{e46}\u{e50}-\u{e59}\u{e81}-\u{e82}\u{e84}\u{e86}-\u{e8a}\u{e8c}-\u{ea3}\u{ea5}\u{ea7}-\u{eb0}\u{eb2}-\u{eb3}\u{ebd}\u{ec0}-\u{ec4}\u{ec6}\u{ed0}-\u{ed9}\u{edc}-\u{edf}\u{f00}\u{f20}-\u{f33}\u{f40}-\u{f47}\u{f49}-\u{f6c}\u{f88}-\u{f8c}\u{1000}-\u{102a}\u{103f}-\u{1049}\u{1050}-\u{1055}\u{105a}-\u{105d}\u{1061}\u{1065}-\u{1066}\u{106e}-\u{1070}\u{1075}-\u{1081}\u{108e}\u{1090}-\u{1099}\u{10a0}-\u{10c5}\u{10c7}\u{10cd}\u{10d0}-\u{10fa}\u{10fc}-\u{1248}\u{124a}-\u{124d}\u{1250}-\u{1256}\u{1258}\u{125a}-\u{125d}\u{1260}-\u{1288}\u{128a}-\u{128d}\u{1290}-\u{12b0}\u{12b2}-\u{12b5}\u{12b8}-\u{12be}\u{12c0}\u{12c2}-\u{12c5}\u{12c8}-\u{12d6}\u{12d8}-\u{1310}\u{1312}-\u{1315}\u{1318}-\u{135a}\u{1369}-\u{137c}\u{1380}-\u{138f}\u{13a0}-\u{13f5}\u{13f8}-\u{13fd}\u{1401}-\u{166c}\u{166f}-\u{167f}\u{1681}-\u{169a}\u{16a0}-\u{16ea}\u{16ee}-\u{16f8}\u{1700}-\u{1711}\u{171f}-\u{1731}\u{1740}-\u{1751}\u{1760}-\u{176c}\u{176e}-\u{1770}\u{1780}-\u{17b3}\u{17d7}\u{17dc}\u{17e0}-\u{17e9}\u{17f0}-\u{17f9}\u{1810}-\u{1819}\u{1820}-\u{1878}\u{1880}-\u{1884}\u{1887}-\u{18a8}\u{18aa}\u{18b0}-\u{18f5}\u{1900}-\u{191e}\u{1946}-\u{196d}\u{1970}-\u{1974}\u{1980}-\u{19ab}\u{19b0}-\u{19c9}\u{19d0}-\u{19da}\u{1a00}-\u{1a16}\u{1a20}-\u{1a54}\u{1a80}-\u{1a89}\u{1a90}-\u{1a99}\u{1aa7}\u{1b05}-\u{1b33}\u{1b45}-\u{1b4c}\u{1b50}-\u{1b59}\u{1b83}-\u{1ba0}\u{1bae}-\u{1be5}\u{1c00}-\u{1c23}\u{1c40}-\u{1c49}\u{1c4d}-\u{1c7d}\u{1c80}-\u{1c8a}\u{1c90}-\u{1cba}\u{1cbd}-\u{1cbf}\u{1ce9}-\u{1cec}\u{1cee}-\u{1cf3}\u{1cf5}-\u{1cf6}\u{1cfa}\u{1d00}-\u{1dbf}\u{1e00}-\u{1f15}\u{1f18}-\u{1f1d}\u{1f20}-\u{1f45}\u{1f48}-\u{1f4d}\u{1f50}-\u{1f57}\u{1f59}\u{1f5b}\u{1f5d}\u{1f5f}-\u{1f7d}\u{1f80}-\u{1fb4}\u{1fb6}-\u{1fbc}\u{1fbe}\u{1fc2}-\u{1fc4}\u{1fc6}-\u{1fcc}\u{1fd0}-\u{1fd3}\u{1fd6}-\u{1fdb}\u{1fe0}-\u{1fec}\u{1ff2}-\u{1ff4}\u{1ff6}-\u{1ffc}\u{2070}-\u{2071}\u{2074}-\u{2079}\u{207f}-\u{2089}\u{2090}-\u{209c}\u{2102}\u{2107}\u{210a}-\u{2113}\u{2115}\u{2119}-\u{211d}\u{2124}\u{2126}\u{2128}\u{212a}-\u{212d}\u{212f}-\u{2139}\u{213c}-\u{213f}\u{2145}-\u{2149}\u{214e}\u{2150}-\u{2189}\u{2460}-\u{249b}\u{24ea}-\u{24ff}\u{2776}-\u{2793}\u{2c00}-\u{2ce4}\u{2ceb}-\u{2cee}\u{2cf2}-\u{2cf3}\u{2cfd}\u{2d00}-\u{2d25}\u{2d27}\u{2d2d}\u{2d30}-\u{2d67}\u{2d6f}\u{2d80}-\u{2d96}\u{2da0}-\u{2da6}\u{2da8}-\u{2dae}\u{2db0}-\u{2db6}\u{2db8}-\u{2dbe}\u{2dc0}-\u{2dc6}\u{2dc8}-\u{2dce}\u{2dd0}-\u{2dd6}\u{2dd8}-\u{2dde}\u{2e2f}\u{3005}-\u{3007}\u{3021}-\u{3029}\u{3031}-\u{3035}\u{3038}-\u{303c}\u{3041}-\u{3096}\u{309d}-\u{309f}\u{30a1}-\u{30fa}\u{30fc}-\u{30ff}\u{3105}-\u{312f}\u{3131}-\u{318e}\u{3192}-\u{3195}\u{31a0}-\u{31bf}\u{31f0}-\u{31ff}\u{3220}-\u{3229}\u{3248}-\u{324f}\u{3251}-\u{325f}\u{3280}-\u{3289}\u{32b1}-\u{32bf}\u{3400}-\u{4dbf}\u{4e00}-\u{a48c}\u{a4d0}-\u{a4fd}\u{a500}-\u{a60c}\u{a610}-\u{a62b}\u{a640}-\u{a66e}\u{a67f}-\u{a69d}\u{a6a0}-\u{a6ef}\u{a717}-\u{a71f}\u{a722}-\u{a788}\u{a78b}-\u{a7cd}\u{a7d0}-\u{a7d1}\u{a7d3}\u{a7d5}-\u{a7dc}\u{a7f2}-\u{a801}\u{a803}-\u{a805}\u{a807}-\u{a80a}\u{a80c}-\u{a822}\u{a830}-\u{a835}\u{a840}-\u{a873}\u{a882}-\u{a8b3}\u{a8d0}-\u{a8d9}\u{a8f2}-\u{a8f7}\u{a8fb}\u{a8fd}-\u{a8fe}\u{a900}-\u{a925}\u{a930}-\u{a946}\u{a960}-\u{a97c}\u{a984}-\u{a9b2}\u{a9cf}-\u{a9d9}\u{a9e0}-\u{a9e4}\u{a9e6}-\u{a9fe}\u{aa00}-\u{aa28}\u{aa40}-\u{aa42}\u{aa44}-\u{aa4b}\u{aa50}-\u{aa59}\u{aa60}-\u{aa76}\u{aa7a}\u{aa7e}-\u{aaaf}\u{aab1}\u{aab5}-\u{aab6}\u{aab9}-\u{aabd}\u{aac0}\u{aac2}\u{aadb}-\u{aadd}\u{aae0}-\u{aaea}\u{aaf2}-\u{aaf4}\u{ab01}-\u{ab06}\u{ab09}-\u{ab0e}\u{ab11}-\u{ab16}\u{ab20}-\u{ab26}\u{ab28}-\u{ab2e}\u{ab30}-\u{ab5a}\u{ab5c}-\u{ab69}\u{ab70}-\u{abe2}\u{abf0}-\u{abf9}\u{ac00}-\u{d7a3}\u{d7b0}-\u{d7c6}\u{d7cb}-\u{d7fb}\u{f900}-\u{fa6d}\u{fa70}-\u{fad9}\u{fb00}-\u{fb06}\u{fb13}-\u{fb17}\u{fb1d}\u{fb1f}-\u{fb28}\u{fb2a}-\u{fb36}\u{fb38}-\u{fb3c}\u{fb3e}\u{fb40}-\u{fb41}\u{fb43}-\u{fb44}\u{fb46}-\u{fbb1}\u{fbd3}-\u{fd3d}\u{fd50}-\u{fd8f}\u{fd92}-\u{fdc7}\u{fdf0}-\u{fdfb}\u{fe70}-\u{fe74}\u{fe76}-\u{fefc}\u{ff10}-\u{ff19}\u{ff21}-\u{ff3a}\u{ff41}-\u{ff5a}\u{ff66}-\u{ffbe}\u{ffc2}-\u{ffc7}\u{ffca}-\u{ffcf}\u{ffd2}-\u{ffd7}\u{ffda}-\u{ffdc}\u{10000}-\u{1000b}\u{1000d}-\u{10026}\u{10028}-\u{1003a}\u{1003c}-\u{1003d}\u{1003f}-\u{1004d}\u{10050}-\u{1005d}\u{10080}-\u{100fa}\u{10107}-\u{10133}\u{10140}-\u{10178}\u{1018a}-\u{1018b}\u{10280}-\u{1029c}\u{102a0}-\u{102d0}\u{102e1}-\u{102fb}\u{10300}-\u{10323}\u{1032d}-\u{1034a}\u{10350}-\u{10375}\u{10380}-\u{1039d}\u{103a0}-\u{103c3}\u{103c8}-\u{103cf}\u{103d1}-\u{103d5}\u{10400}-\u{1049d}\u{104a0}-\u{104a9}\u{104b0}-\u{104d3}\u{104d8}-\u{104fb}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057a}\u{1057c}-\u{1058a}\u{1058c}-\u{10592}\u{10594}-\u{10595}\u{10597}-\u{105a1}\u{105a3}-\u{105b1}\u{105b3}-\u{105b9}\u{105bb}-\u{105bc}\u{105c0}-\u{105f3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107b0}\u{107b2}-\u{107ba}\u{10800}-\u{10805}\u{10808}\u{1080a}-\u{10835}\u{10837}-\u{10838}\u{1083c}\u{1083f}-\u{10855}\u{10858}-\u{10876}\u{10879}-\u{1089e}\u{108a7}-\u{108af}\u{108e0}-\u{108f2}\u{108f4}-\u{108f5}\u{108fb}-\u{1091b}\u{10920}-\u{10939}\u{10980}-\u{109b7}\u{109bc}-\u{109cf}\u{109d2}-\u{10a00}\u{10a10}-\u{10a13}\u{10a15}-\u{10a17}\u{10a19}-\u{10a35}\u{10a40}-\u{10a48}\u{10a60}-\u{10a7e}\u{10a80}-\u{10a9f}\u{10ac0}-\u{10ac7}\u{10ac9}-\u{10ae4}\u{10aeb}-\u{10aef}\u{10b00}-\u{10b35}\u{10b40}-\u{10b55}\u{10b58}-\u{10b72}\u{10b78}-\u{10b91}\u{10ba9}-\u{10baf}\u{10c00}-\u{10c48}\u{10c80}-\u{10cb2}\u{10cc0}-\u{10cf2}\u{10cfa}-\u{10d23}\u{10d30}-\u{10d39}\u{10d40}-\u{10d65}\u{10d6f}-\u{10d85}\u{10e60}-\u{10e7e}\u{10e80}-\u{10ea9}\u{10eb0}-\u{10eb1}\u{10ec2}-\u{10ec4}\u{10f00}-\u{10f27}\u{10f30}-\u{10f45}\u{10f51}-\u{10f54}\u{10f70}-\u{10f81}\u{10fb0}-\u{10fcb}\u{10fe0}-\u{10ff6}\u{11003}-\u{11037}\u{11052}-\u{1106f}\u{11071}-\u{11072}\u{11075}\u{11083}-\u{110af}\u{110d0}-\u{110e8}\u{110f0}-\u{110f9}\u{11103}-\u{11126}\u{11136}-\u{1113f}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111b2}\u{111c1}-\u{111c4}\u{111d0}-\u{111da}\u{111dc}\u{111e1}-\u{111f4}\u{11200}-\u{11211}\u{11213}-\u{1122b}\u{1123f}-\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128a}-\u{1128d}\u{1128f}-\u{1129d}\u{1129f}-\u{112a8}\u{112b0}-\u{112de}\u{112f0}-\u{112f9}\u{11305}-\u{1130c}\u{1130f}-\u{11310}\u{11313}-\u{11328}\u{1132a}-\u{11330}\u{11332}-\u{11333}\u{11335}-\u{11339}\u{1133d}\u{11350}\u{1135d}-\u{11361}\u{11380}-\u{11389}\u{1138b}\u{1138e}\u{11390}-\u{113b5}\u{113b7}\u{113d1}\u{113d3}\u{11400}-\u{11434}\u{11447}-\u{1144a}\u{11450}-\u{11459}\u{1145f}-\u{11461}\u{11480}-\u{114af}\u{114c4}-\u{114c5}\u{114c7}\u{114d0}-\u{114d9}\u{11580}-\u{115ae}\u{115d8}-\u{115db}\u{11600}-\u{1162f}\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116aa}\u{116b8}\u{116c0}-\u{116c9}\u{116d0}-\u{116e3}\u{11700}-\u{1171a}\u{11730}-\u{1173b}\u{11740}-\u{11746}\u{11800}-\u{1182b}\u{118a0}-\u{118f2}\u{118ff}-\u{11906}\u{11909}\u{1190c}-\u{11913}\u{11915}-\u{11916}\u{11918}-\u{1192f}\u{1193f}\u{11941}\u{11950}-\u{11959}\u{119a0}-\u{119a7}\u{119aa}-\u{119d0}\u{119e1}\u{119e3}\u{11a00}\u{11a0b}-\u{11a32}\u{11a3a}\u{11a50}\u{11a5c}-\u{11a89}\u{11a9d}\u{11ab0}-\u{11af8}\u{11bc0}-\u{11be0}\u{11bf0}-\u{11bf9}\u{11c00}-\u{11c08}\u{11c0a}-\u{11c2e}\u{11c40}\u{11c50}-\u{11c6c}\u{11c72}-\u{11c8f}\u{11d00}-\u{11d06}\u{11d08}-\u{11d09}\u{11d0b}-\u{11d30}\u{11d46}\u{11d50}-\u{11d59}\u{11d60}-\u{11d65}\u{11d67}-\u{11d68}\u{11d6a}-\u{11d89}\u{11d98}\u{11da0}-\u{11da9}\u{11ee0}-\u{11ef2}\u{11f02}\u{11f04}-\u{11f10}\u{11f12}-\u{11f33}\u{11f50}-\u{11f59}\u{11fb0}\u{11fc0}-\u{11fd4}\u{12000}-\u{12399}\u{12400}-\u{1246e}\u{12480}-\u{12543}\u{12f90}-\u{12ff0}\u{13000}-\u{1342f}\u{13441}-\u{13446}\u{13460}-\u{143fa}\u{14400}-\u{14646}\u{16100}-\u{1611d}\u{16130}-\u{16139}\u{16800}-\u{16a38}\u{16a40}-\u{16a5e}\u{16a60}-\u{16a69}\u{16a70}-\u{16abe}\u{16ac0}-\u{16ac9}\u{16ad0}-\u{16aed}\u{16b00}-\u{16b2f}\u{16b40}-\u{16b43}\u{16b50}-\u{16b59}\u{16b5b}-\u{16b61}\u{16b63}-\u{16b77}\u{16b7d}-\u{16b8f}\u{16d40}-\u{16d6c}\u{16d70}-\u{16d79}\u{16e40}-\u{16e96}\u{16f00}-\u{16f4a}\u{16f50}\u{16f93}-\u{16f9f}\u{16fe0}-\u{16fe1}\u{16fe3}\u{17000}-\u{187f7}\u{18800}-\u{18cd5}\u{18cff}-\u{18d08}\u{1aff0}-\u{1aff3}\u{1aff5}-\u{1affb}\u{1affd}-\u{1affe}\u{1b000}-\u{1b122}\u{1b132}\u{1b150}-\u{1b152}\u{1b155}\u{1b164}-\u{1b167}\u{1b170}-\u{1b2fb}\u{1bc00}-\u{1bc6a}\u{1bc70}-\u{1bc7c}\u{1bc80}-\u{1bc88}\u{1bc90}-\u{1bc99}\u{1ccf0}-\u{1ccf9}\u{1d2c0}-\u{1d2d3}\u{1d2e0}-\u{1d2f3}\u{1d360}-\u{1d378}\u{1d400}-\u{1d454}\u{1d456}-\u{1d49c}\u{1d49e}-\u{1d49f}\u{1d4a2}\u{1d4a5}-\u{1d4a6}\u{1d4a9}-\u{1d4ac}\u{1d4ae}-\u{1d4b9}\u{1d4bb}\u{1d4bd}-\u{1d4c3}\u{1d4c5}-\u{1d505}\u{1d507}-\u{1d50a}\u{1d50d}-\u{1d514}\u{1d516}-\u{1d51c}\u{1d51e}-\u{1d539}\u{1d53b}-\u{1d53e}\u{1d540}-\u{1d544}\u{1d546}\u{1d54a}-\u{1d550}\u{1d552}-\u{1d6a5}\u{1d6a8}-\u{1d6c0}\u{1d6c2}-\u{1d6da}\u{1d6dc}-\u{1d6fa}\u{1d6fc}-\u{1d714}\u{1d716}-\u{1d734}\u{1d736}-\u{1d74e}\u{1d750}-\u{1d76e}\u{1d770}-\u{1d788}\u{1d78a}-\u{1d7a8}\u{1d7aa}-\u{1d7c2}\u{1d7c4}-\u{1d7cb}\u{1d7ce}-\u{1d7ff}\u{1df00}-\u{1df1e}\u{1df25}-\u{1df2a}\u{1e030}-\u{1e06d}\u{1e100}-\u{1e12c}\u{1e137}-\u{1e13d}\u{1e140}-\u{1e149}\u{1e14e}\u{1e290}-\u{1e2ad}\u{1e2c0}-\u{1e2eb}\u{1e2f0}-\u{1e2f9}\u{1e4d0}-\u{1e4eb}\u{1e4f0}-\u{1e4f9}\u{1e5d0}-\u{1e5ed}\u{1e5f0}-\u{1e5fa}\u{1e7e0}-\u{1e7e6}\u{1e7e8}-\u{1e7eb}\u{1e7ed}-\u{1e7ee}\u{1e7f0}-\u{1e7fe}\u{1e800}-\u{1e8c4}\u{1e8c7}-\u{1e8cf}\u{1e900}-\u{1e943}\u{1e94b}\u{1e950}-\u{1e959}\u{1ec71}-\u{1ecab}\u{1ecad}-\u{1ecaf}\u{1ecb1}-\u{1ecb4}\u{1ed01}-\u{1ed2d}\u{1ed2f}-\u{1ed3d}\u{1ee00}-\u{1ee03}\u{1ee05}-\u{1ee1f}\u{1ee21}-\u{1ee22}\u{1ee24}\u{1ee27}\u{1ee29}-\u{1ee32}\u{1ee34}-\u{1ee37}\u{1ee39}\u{1ee3b}\u{1ee42}\u{1ee47}\u{1ee49}\u{1ee4b}\u{1ee4d}-\u{1ee4f}\u{1ee51}-\u{1ee52}\u{1ee54}\u{1ee57}\u{1ee59}\u{1ee5b}\u{1ee5d}\u{1ee5f}\u{1ee61}-\u{1ee62}\u{1ee64}\u{1ee67}-\u{1ee6a}\u{1ee6c}-\u{1ee72}\u{1ee74}-\u{1ee77}\u{1ee79}-\u{1ee7c}\u{1ee7e}\u{1ee80}-\u{1ee89}\u{1ee8b}-\u{1ee9b}\u{1eea1}-\u{1eea3}\u{1eea5}-\u{1eea9}\u{1eeab}-\u{1eebb}\u{1f100}-\u{1f10c}\u{1fbf0}-\u{1fbf9}\u{20000}-\u{2a6df}\u{2a700}-\u{2b739}\u{2b740}-\u{2b81d}\u{2b820}-\u{2cea1}\u{2ceb0}-\u{2ebe0}\u{2ebf0}-\u{2ee5d}\u{2f800}-\u{2fa1d}\u{30000}-\u{3134a}\u{31350}-\u{323af}`;
|
|
13965
|
-
|
|
13966
|
-
// packages/safe-bash-command-csvkit/dist/csv/sniffer-quotes.js
|
|
13967
|
-
function guessQuotes(sample, step) {
|
|
13968
|
-
const delimiterPattern = String.raw`[^${PYTHON_WORD_CLASS}\n"']`;
|
|
13969
|
-
const start = String.raw`(?:(?<![\s\S])|(?<=\n))`;
|
|
13970
|
-
const end = String.raw`(?=\n|(?![\s\S]))`;
|
|
13971
|
-
const patterns = [
|
|
13972
|
-
String.raw`(?<delim>${delimiterPattern})(?<space> ?)(?<quote>["']).*?\k<quote>\k<delim>`,
|
|
13973
|
-
String.raw`(?:${start}|\n)(?<quote>["']).*?\k<quote>(?<delim>${delimiterPattern})(?<space> ?)`,
|
|
13974
|
-
String.raw`(?<delim>${delimiterPattern})(?<space> ?)(?<quote>["']).*?\k<quote>(?:${end}|\n)`,
|
|
13975
|
-
String.raw`(?:${start}|\n)(?<quote>["']).*?\k<quote>(?:${end}|\n)`
|
|
13976
|
-
];
|
|
13977
|
-
const quotes = /* @__PURE__ */ new Map();
|
|
13978
|
-
const delimiters = /* @__PURE__ */ new Map();
|
|
13979
|
-
let spaces = 0;
|
|
13980
|
-
for (const pattern of patterns) {
|
|
13981
|
-
step();
|
|
13982
|
-
const expression = new RegExp(pattern, "gsu");
|
|
13983
|
-
for (; ; ) {
|
|
13984
|
-
step();
|
|
13985
|
-
const match2 = expression.exec(sample);
|
|
13986
|
-
if (!match2)
|
|
13987
|
-
break;
|
|
13988
|
-
const groups = match2.groups;
|
|
13989
|
-
const quote = groups.quote;
|
|
13990
|
-
quotes.set(quote, (quotes.get(quote) ?? 0) + 1);
|
|
13991
|
-
const delimiter2 = groups.delim;
|
|
13992
|
-
if (delimiter2 && [",", " ", ";", " ", ":", "|"].includes(delimiter2))
|
|
13993
|
-
delimiters.set(delimiter2, (delimiters.get(delimiter2) ?? 0) + 1);
|
|
13994
|
-
if (groups.space)
|
|
13995
|
-
spaces++;
|
|
13996
|
-
}
|
|
13997
|
-
if (quotes.size)
|
|
13998
|
-
break;
|
|
13999
|
-
}
|
|
14000
|
-
if (!quotes.size)
|
|
14001
|
-
return void 0;
|
|
14002
|
-
let quotechar = "";
|
|
14003
|
-
let quoteCount = -1;
|
|
14004
|
-
for (const [quote, count] of quotes) {
|
|
14005
|
-
step();
|
|
14006
|
-
if (count > quoteCount) {
|
|
14007
|
-
quotechar = quote;
|
|
14008
|
-
quoteCount = count;
|
|
14009
|
-
}
|
|
14010
|
-
}
|
|
14011
|
-
let delimiter = "";
|
|
14012
|
-
let delimiterCount = -1;
|
|
14013
|
-
for (const [candidate, count] of delimiters) {
|
|
14014
|
-
step();
|
|
14015
|
-
if (count > delimiterCount) {
|
|
14016
|
-
delimiter = candidate;
|
|
14017
|
-
delimiterCount = count;
|
|
14018
|
-
}
|
|
14019
|
-
}
|
|
14020
|
-
const escapedDelimiter = delimiter.replace(/[\\^$.*+?()[\]{}|-]/gu, "\\$&");
|
|
14021
|
-
const nonword = String.raw`[^${PYTHON_WORD_CLASS}]`;
|
|
14022
|
-
const doublequotePattern = String.raw`((${escapedDelimiter})|${start})${nonword}*${quotechar}[^${escapedDelimiter}\n]*${quotechar}[^${escapedDelimiter}\n]*${quotechar}${nonword}*((${escapedDelimiter})|${end})`;
|
|
14023
|
-
step();
|
|
14024
|
-
const doublequote = new RegExp(doublequotePattern, "u").test(sample);
|
|
14025
|
-
return { quotechar, delimiter, doublequote, skipinitialspace: delimiterCount === spaces };
|
|
14026
|
-
}
|
|
14027
|
-
|
|
14028
|
-
// packages/safe-bash-command-csvkit/dist/csv/sniffer.js
|
|
14029
|
-
var POSSIBLE_DELIMITERS = Object.freeze([",", " ", ";", " ", ":", "|"]);
|
|
14030
|
-
function sniff(sample, step = () => {
|
|
14031
|
-
}) {
|
|
14032
|
-
const quoted2 = guessQuotes(sample, step);
|
|
14033
|
-
let delimiter = quoted2?.delimiter;
|
|
14034
|
-
let skipinitialspace = quoted2?.skipinitialspace ?? false;
|
|
14035
|
-
if (!delimiter) {
|
|
14036
|
-
const lines = sample.split("\n").filter(Boolean);
|
|
14037
|
-
const chunkLength = Math.min(10, lines.length);
|
|
14038
|
-
const frequencies2 = /* @__PURE__ */ new Map();
|
|
14039
|
-
const candidates = /* @__PURE__ */ new Map();
|
|
14040
|
-
const count = (line, char) => {
|
|
14041
|
-
let total = 0;
|
|
14042
|
-
for (let index = 0; index < line.length; index++) {
|
|
14043
|
-
step();
|
|
14044
|
-
if (line[index] === char)
|
|
14045
|
-
total++;
|
|
14046
|
-
}
|
|
14047
|
-
return total;
|
|
14048
|
-
};
|
|
14049
|
-
for (let start = 0, iteration = 1; start < lines.length; start += chunkLength, iteration++) {
|
|
14050
|
-
for (const line of lines.slice(start, start + chunkLength)) {
|
|
14051
|
-
for (const char of [...POSSIBLE_DELIMITERS].sort()) {
|
|
14052
|
-
const frequency = count(line, char);
|
|
14053
|
-
const meta = frequencies2.get(char) ?? /* @__PURE__ */ new Map();
|
|
14054
|
-
meta.set(frequency, (meta.get(frequency) ?? 0) + 1);
|
|
14055
|
-
frequencies2.set(char, meta);
|
|
14056
|
-
}
|
|
14057
|
-
}
|
|
14058
|
-
const modes = /* @__PURE__ */ new Map();
|
|
14059
|
-
for (const [char, meta] of frequencies2) {
|
|
14060
|
-
let best = [0, 0];
|
|
14061
|
-
let total2 = 0;
|
|
14062
|
-
for (const entry of meta) {
|
|
14063
|
-
step();
|
|
14064
|
-
total2 += entry[1];
|
|
14065
|
-
if (entry[1] > best[1])
|
|
14066
|
-
best = entry;
|
|
14067
|
-
}
|
|
14068
|
-
if (meta.size === 1 && best[0] === 0)
|
|
14069
|
-
continue;
|
|
14070
|
-
modes.set(char, [best[0], best[1] * 2 - total2]);
|
|
14071
|
-
}
|
|
14072
|
-
const total = Math.min(chunkLength * iteration, lines.length);
|
|
14073
|
-
for (let consistency = 1; !candidates.size && consistency >= 0.9; consistency -= 0.01) {
|
|
14074
|
-
for (const [char, mode] of modes) {
|
|
14075
|
-
step();
|
|
14076
|
-
if (mode[0] > 0 && mode[1] > 0 && mode[1] / total >= consistency)
|
|
14077
|
-
candidates.set(char, mode);
|
|
14078
|
-
}
|
|
14079
|
-
}
|
|
14080
|
-
if (candidates.size === 1)
|
|
14081
|
-
break;
|
|
14082
|
-
}
|
|
14083
|
-
delimiter = POSSIBLE_DELIMITERS.find((char) => candidates.has(char));
|
|
14084
|
-
if (!delimiter)
|
|
14085
|
-
return void 0;
|
|
14086
|
-
const first = lines[0];
|
|
14087
|
-
let spaces = 0;
|
|
14088
|
-
for (let index = 0; index < first.length - 1; index++) {
|
|
14089
|
-
step();
|
|
14090
|
-
if (first[index] === delimiter && first[index + 1] === " ")
|
|
14091
|
-
spaces++;
|
|
14092
|
-
}
|
|
14093
|
-
skipinitialspace = count(first, delimiter) === spaces;
|
|
14094
|
-
}
|
|
14095
|
-
return {
|
|
14096
|
-
delimiter,
|
|
14097
|
-
quotechar: quoted2?.quotechar || '"',
|
|
14098
|
-
doublequote: quoted2?.doublequote ?? false,
|
|
14099
|
-
skipinitialspace,
|
|
14100
|
-
quoting: 0,
|
|
14101
|
-
lineterminator: "\r\n"
|
|
14102
|
-
};
|
|
14103
|
-
}
|
|
14104
|
-
|
|
14105
|
-
// packages/safe-bash-command-csvkit/dist/runtime.js
|
|
14106
10995
|
var sharedTextEncoder = new TextEncoder();
|
|
14107
10996
|
var Runtime = class {
|
|
14108
10997
|
context;
|
|
@@ -14615,11 +11504,11 @@ async function dbfFile(runtime, path, exact = false) {
|
|
|
14615
11504
|
}
|
|
14616
11505
|
runtime.retain(size);
|
|
14617
11506
|
const bytes = new Uint8Array(size);
|
|
14618
|
-
let
|
|
11507
|
+
let offset = 0;
|
|
14619
11508
|
for (const chunk of chunks) {
|
|
14620
11509
|
runtime.step();
|
|
14621
|
-
bytes.set(chunk,
|
|
14622
|
-
|
|
11510
|
+
bytes.set(chunk, offset);
|
|
11511
|
+
offset += chunk.length;
|
|
14623
11512
|
}
|
|
14624
11513
|
return { path, bytes };
|
|
14625
11514
|
}
|
|
@@ -14776,12 +11665,12 @@ async function parseDbfField(field, data, version, decode, memo, runtime) {
|
|
|
14776
11665
|
const day = view.getUint32(0, true);
|
|
14777
11666
|
if (!day)
|
|
14778
11667
|
return null;
|
|
14779
|
-
const
|
|
14780
|
-
if (
|
|
11668
|
+
const ordinal = day - 1721425;
|
|
11669
|
+
if (ordinal < 1)
|
|
14781
11670
|
throw new CsvkitDiagnostic("ValueError: ordinal must be >= 1");
|
|
14782
|
-
if (
|
|
14783
|
-
throw new CsvkitDiagnostic(`ValueError: year ${new Date((
|
|
14784
|
-
const date = new Date((
|
|
11671
|
+
if (ordinal > 3652059)
|
|
11672
|
+
throw new CsvkitDiagnostic(`ValueError: year ${new Date((ordinal - 719163) * 864e5).getUTCFullYear()} is out of range`);
|
|
11673
|
+
const date = new Date((ordinal - 719163) * 864e5 + view.getUint32(4, true));
|
|
14785
11674
|
if (date.getUTCFullYear() > 9999)
|
|
14786
11675
|
throw new CsvkitDiagnostic("OverflowError: date value out of range");
|
|
14787
11676
|
const text2 = date.toISOString().slice(0, 19).replace("T", " ");
|
|
@@ -14853,10 +11742,10 @@ function dbfTable(runtime, headers, rows) {
|
|
|
14853
11742
|
if (type === "Number")
|
|
14854
11743
|
return { kind: "decimal", value: Decimal.parse(value.value).toString() };
|
|
14855
11744
|
if (type === "Boolean" && value.kind !== "float") {
|
|
14856
|
-
const
|
|
14857
|
-
if (
|
|
11745
|
+
const decimal = Decimal.parse(value.value);
|
|
11746
|
+
if (decimal.coefficient === 0n)
|
|
14858
11747
|
return false;
|
|
14859
|
-
if (!
|
|
11748
|
+
if (!decimal.negative && decimal.exponent <= 0 && decimal.coefficient === 10n ** BigInt(-decimal.exponent))
|
|
14860
11749
|
return true;
|
|
14861
11750
|
}
|
|
14862
11751
|
return void 0;
|
|
@@ -14965,7 +11854,7 @@ async function dbfConversion(r) {
|
|
|
14965
11854
|
r.step();
|
|
14966
11855
|
r.retain(text2.length * 2 + 32);
|
|
14967
11856
|
let characters = 0;
|
|
14968
|
-
for (let
|
|
11857
|
+
for (let offset = 0; offset < text2.length; offset += text2.codePointAt(offset) > 65535 ? 2 : 1) {
|
|
14969
11858
|
r.step();
|
|
14970
11859
|
characters++;
|
|
14971
11860
|
codepoints++;
|
|
@@ -15308,10 +12197,10 @@ function jsonInputTable(runtime, headers, rows) {
|
|
|
15308
12197
|
return value;
|
|
15309
12198
|
if (["NaN", "Infinity", "-Infinity"].includes(value.token))
|
|
15310
12199
|
return void 0;
|
|
15311
|
-
const
|
|
15312
|
-
if (
|
|
12200
|
+
const decimal = Decimal.parse(jsonNumberText(value, runtime));
|
|
12201
|
+
if (decimal.coefficient === 0n)
|
|
15313
12202
|
return false;
|
|
15314
|
-
if (!
|
|
12203
|
+
if (!decimal.negative && decimal.exponent <= 0 && decimal.coefficient === 10n ** BigInt(-decimal.exponent))
|
|
15315
12204
|
return true;
|
|
15316
12205
|
return void 0;
|
|
15317
12206
|
};
|
|
@@ -15484,10 +12373,10 @@ function readCachedBiff(bytes, options) {
|
|
|
15484
12373
|
const checkPending = () => {
|
|
15485
12374
|
if (pending) invalidBiff("Expected STRING record after FORMULA");
|
|
15486
12375
|
};
|
|
15487
|
-
const parts = (index,
|
|
12376
|
+
const parts = (index, offset) => {
|
|
15488
12377
|
const data = records[index].data;
|
|
15489
12378
|
options.retain(64);
|
|
15490
|
-
const chunks = [new Binary(data.slice(
|
|
12379
|
+
const chunks = [new Binary(data.slice(offset, data.bytes.length - offset))];
|
|
15491
12380
|
while (records[index + 1]?.opcode === 60) {
|
|
15492
12381
|
options.work();
|
|
15493
12382
|
options.retain(64);
|
|
@@ -15512,12 +12401,12 @@ function readCachedBiff(bytes, options) {
|
|
|
15512
12401
|
for (let index = 0; index < records.length; index++) {
|
|
15513
12402
|
options.signal.throwIfAborted();
|
|
15514
12403
|
options.work();
|
|
15515
|
-
const { opcode, data, offset
|
|
12404
|
+
const { opcode, data, offset } = records[index];
|
|
15516
12405
|
if ([9, 521, 1033, 2057].includes(opcode)) {
|
|
15517
12406
|
checkPending();
|
|
15518
12407
|
revision = opcode === 9 ? 2 : opcode === 521 ? 3 : opcode === 1033 ? 4 : data.u16(0) === 1536 ? 8 : data.u16(0) === 1280 ? 5 : 0;
|
|
15519
12408
|
if (!revision) invalidBiff("unsupported cached BIFF revision");
|
|
15520
|
-
const type2 = data.u16(2), bound = bounds.get(
|
|
12409
|
+
const type2 = data.u16(2), bound = bounds.get(offset);
|
|
15521
12410
|
let sheet2;
|
|
15522
12411
|
if (type2 === 16 && (!scopes.length || scopes[scopes.length - 1].type === 256) && (bound === void 0 || bound.type === 0)) {
|
|
15523
12412
|
if (sheets.length >= options.limits.sheets) throw new SsconvertError("resource-limit", "BIFF sheets limit exceeded");
|
|
@@ -15525,7 +12414,7 @@ function readCachedBiff(bytes, options) {
|
|
|
15525
12414
|
options.retain(192 + name.length * 2);
|
|
15526
12415
|
sheet2 = { name, cells: [] };
|
|
15527
12416
|
sheets.push(sheet2);
|
|
15528
|
-
sheetOffsets.set(
|
|
12417
|
+
sheetOffsets.set(offset, sheet2);
|
|
15529
12418
|
}
|
|
15530
12419
|
options.retain(64);
|
|
15531
12420
|
scopes.push({ ...sheet2 ? { sheet: sheet2 } : {}, revision, type: type2 });
|
|
@@ -15566,7 +12455,7 @@ function readCachedBiff(bytes, options) {
|
|
|
15566
12455
|
continue;
|
|
15567
12456
|
}
|
|
15568
12457
|
if (opcode === 143 && revision === 4 && scope.type === 256) {
|
|
15569
|
-
const target =
|
|
12458
|
+
const target = offset + 4 + data.bytes.length, length = data.u32(0);
|
|
15570
12459
|
if (target + length > stream.length || !length) invalidBiff("invalid SHEETHDR length");
|
|
15571
12460
|
const name = cursor([new Binary(data.slice(5, data.bytes.length - 5))]).legacy(data.u8(4));
|
|
15572
12461
|
if (name !== legacyNames[bounds.size]) invalidBiff("SHEETHDR name differs from BOUNDSHEET");
|
|
@@ -15679,10 +12568,10 @@ function readCachedBiff(bytes, options) {
|
|
|
15679
12568
|
if (scopes.length) invalidBiff("missing EOF");
|
|
15680
12569
|
if (!bounds.size) return { sheets, date1904 };
|
|
15681
12570
|
const ordered = [];
|
|
15682
|
-
for (const [
|
|
12571
|
+
for (const [offset, bound] of bounds) {
|
|
15683
12572
|
options.work();
|
|
15684
12573
|
if (bound.type !== 0) continue;
|
|
15685
|
-
const sheet = sheetOffsets.get(
|
|
12574
|
+
const sheet = sheetOffsets.get(offset);
|
|
15686
12575
|
if (!sheet) invalidBiff("missing bound worksheet");
|
|
15687
12576
|
options.retain(8);
|
|
15688
12577
|
ordered.push(sheet);
|
|
@@ -15734,10 +12623,10 @@ function integer2(value, minimum = 0) {
|
|
|
15734
12623
|
if (!Number.isSafeInteger(result) || result < minimum) invalid("invalid workbook integer");
|
|
15735
12624
|
return result;
|
|
15736
12625
|
}
|
|
15737
|
-
function targetPath(
|
|
12626
|
+
function targetPath(base, target) {
|
|
15738
12627
|
if (target.includes("\\") || target.includes(":")) invalid("invalid package target");
|
|
15739
12628
|
const parts = [];
|
|
15740
|
-
for (const part of (target.startsWith("/") ? target :
|
|
12629
|
+
for (const part of (target.startsWith("/") ? target : base.slice(0, base.lastIndexOf("/") + 1) + target).split("/")) {
|
|
15741
12630
|
if (!part || part === ".") continue;
|
|
15742
12631
|
if (part === "..") {
|
|
15743
12632
|
if (!parts.length) invalid("package target escapes archive");
|
|
@@ -16027,10 +12916,10 @@ var WorkbookInput = class {
|
|
|
16027
12916
|
}
|
|
16028
12917
|
r.retain(size);
|
|
16029
12918
|
bytes = new Uint8Array(size);
|
|
16030
|
-
let
|
|
12919
|
+
let offset = 0;
|
|
16031
12920
|
for (const chunk of chunks) {
|
|
16032
|
-
bytes.set(chunk,
|
|
16033
|
-
|
|
12921
|
+
bytes.set(chunk, offset);
|
|
12922
|
+
offset += chunk.length;
|
|
16034
12923
|
}
|
|
16035
12924
|
if (streamed)
|
|
16036
12925
|
this.#stdin = bytes;
|
|
@@ -16276,10 +13165,10 @@ var WorkbookInput = class {
|
|
|
16276
13165
|
tables.set(name, table);
|
|
16277
13166
|
}
|
|
16278
13167
|
const path = r.options.input_path;
|
|
16279
|
-
const
|
|
13168
|
+
const base = !path || path === "-" ? "stdin" : path.slice(0, path.length - pathExtension(path).length);
|
|
16280
13169
|
let index = 0;
|
|
16281
13170
|
for (const [name, table] of tables) {
|
|
16282
|
-
const filename = `${
|
|
13171
|
+
const filename = `${base}_${r.options.use_sheet_names ? name : index}.csv`;
|
|
16283
13172
|
index++;
|
|
16284
13173
|
const rows = function* () {
|
|
16285
13174
|
const records = [table.headers, ...table.rows.map(csvifiedRow)];
|
|
@@ -17288,6 +14177,300 @@ var sql2csv = {
|
|
|
17288
14177
|
// packages/safe-bash-command-csvkit/dist/commands.js
|
|
17289
14178
|
var commands = Object.freeze([csvclean, csvcut, csvformat, csvgrep, csvjoin, csvjson, csvlook, csvpy, csvsort, csvsql, csvstack, csvstat, in2csv, sql2csv].map(freezeDescriptor));
|
|
17290
14179
|
|
|
14180
|
+
// packages/safe-bash-command-csvkit/dist/cli/parser.js
|
|
14181
|
+
init_buffer();
|
|
14182
|
+
|
|
14183
|
+
// packages/safe-bash-command-csvkit/dist/match-files.js
|
|
14184
|
+
init_buffer();
|
|
14185
|
+
var MatchFileScope = class {
|
|
14186
|
+
#admissions = [];
|
|
14187
|
+
#closing;
|
|
14188
|
+
#closes = /* @__PURE__ */ new Map();
|
|
14189
|
+
#closed = false;
|
|
14190
|
+
get closed() {
|
|
14191
|
+
return this.#closed;
|
|
14192
|
+
}
|
|
14193
|
+
acquire(factory) {
|
|
14194
|
+
if (this.#closed)
|
|
14195
|
+
throw new TypeError("match-file scope closed");
|
|
14196
|
+
const pending = Promise.resolve().then(factory);
|
|
14197
|
+
this.#admissions.push(pending);
|
|
14198
|
+
return pending;
|
|
14199
|
+
}
|
|
14200
|
+
close(file) {
|
|
14201
|
+
let closing = this.#closes.get(file);
|
|
14202
|
+
if (!closing) {
|
|
14203
|
+
closing = Promise.resolve().then(() => file.close());
|
|
14204
|
+
this.#closes.set(file, closing);
|
|
14205
|
+
}
|
|
14206
|
+
return closing;
|
|
14207
|
+
}
|
|
14208
|
+
dispose = () => {
|
|
14209
|
+
this.#closed = true;
|
|
14210
|
+
this.#closing ??= Promise.allSettled(this.#admissions).then(async (admissions) => {
|
|
14211
|
+
const files = admissions.flatMap((admission) => admission.status === "fulfilled" ? [admission.value] : []);
|
|
14212
|
+
const results = await Promise.allSettled(files.map((file) => this.close(file)));
|
|
14213
|
+
const failures = results.flatMap((result) => result.status === "rejected" ? [result.reason] : []);
|
|
14214
|
+
if (failures.length)
|
|
14215
|
+
throw new AggregateError(failures, "match-file cleanup failed");
|
|
14216
|
+
});
|
|
14217
|
+
return this.#closing;
|
|
14218
|
+
};
|
|
14219
|
+
};
|
|
14220
|
+
|
|
14221
|
+
// packages/safe-bash-command-csvkit/dist/cli/parser.js
|
|
14222
|
+
function negativeNumber(text2) {
|
|
14223
|
+
if (!text2.startsWith("-") || text2.length === 1)
|
|
14224
|
+
return false;
|
|
14225
|
+
const first = Array.from(text2.slice(text2[1] === "." ? 2 : 1))[0];
|
|
14226
|
+
if (first === void 0)
|
|
14227
|
+
return false;
|
|
14228
|
+
const point = first.codePointAt(0);
|
|
14229
|
+
return decimalZeroes.some((zero) => point >= zero && point <= zero + 9);
|
|
14230
|
+
}
|
|
14231
|
+
function decodeArgument(bytes) {
|
|
14232
|
+
let result = "";
|
|
14233
|
+
for (let index = 0; index < bytes.length; ) {
|
|
14234
|
+
const first = bytes[index];
|
|
14235
|
+
if (first < 128) {
|
|
14236
|
+
result += String.fromCharCode(first);
|
|
14237
|
+
index++;
|
|
14238
|
+
continue;
|
|
14239
|
+
}
|
|
14240
|
+
const width = first >= 194 && first <= 223 ? 2 : first >= 224 && first <= 239 ? 3 : first >= 240 && first <= 244 ? 4 : 0;
|
|
14241
|
+
let valid = width !== 0 && index + width <= bytes.length;
|
|
14242
|
+
let point = first & (width === 2 ? 31 : width === 3 ? 15 : 7);
|
|
14243
|
+
for (let offset = 1; valid && offset < width; offset++) {
|
|
14244
|
+
const byte = bytes[index + offset];
|
|
14245
|
+
valid = byte >= 128 && byte <= 191;
|
|
14246
|
+
if (offset === 1) {
|
|
14247
|
+
if (first === 224 && byte < 160 || first === 237 && byte >= 160 || first === 240 && byte < 144 || first === 244 && byte >= 144)
|
|
14248
|
+
valid = false;
|
|
14249
|
+
}
|
|
14250
|
+
point = point << 6 | byte & 63;
|
|
14251
|
+
}
|
|
14252
|
+
if (valid) {
|
|
14253
|
+
result += String.fromCodePoint(point);
|
|
14254
|
+
index += width;
|
|
14255
|
+
} else {
|
|
14256
|
+
result += String.fromCharCode(56320 + first);
|
|
14257
|
+
index++;
|
|
14258
|
+
}
|
|
14259
|
+
}
|
|
14260
|
+
return result;
|
|
14261
|
+
}
|
|
14262
|
+
async function disposeAfterParse(files, signal, escapingFailure) {
|
|
14263
|
+
try {
|
|
14264
|
+
await files.dispose();
|
|
14265
|
+
} catch (cleanupFailure) {
|
|
14266
|
+
signal?.throwIfAborted();
|
|
14267
|
+
if (!escapingFailure)
|
|
14268
|
+
throw cleanupFailure;
|
|
14269
|
+
}
|
|
14270
|
+
signal?.throwIfAborted();
|
|
14271
|
+
}
|
|
14272
|
+
async function parseArguments(command, input, context) {
|
|
14273
|
+
context.signal?.throwIfAborted();
|
|
14274
|
+
const descriptor = commands.find((item) => item.name === command);
|
|
14275
|
+
if (!descriptor)
|
|
14276
|
+
throw new TypeError(`Unknown csvkit executable: ${command}`);
|
|
14277
|
+
const owned = new OwnedArguments(input, context.limits);
|
|
14278
|
+
const args = Array.from({ length: owned.length }, (_, index) => decodeArgument(owned.bytes(index)));
|
|
14279
|
+
const options = commandDefaults(descriptor, context.env);
|
|
14280
|
+
const flags = /* @__PURE__ */ new Map();
|
|
14281
|
+
for (const action of descriptor.actions)
|
|
14282
|
+
for (const flag of action.optionStrings)
|
|
14283
|
+
flags.set(flag, action);
|
|
14284
|
+
const positional = descriptor.actions.filter((action) => action.optionStrings.length === 0);
|
|
14285
|
+
const extras = [];
|
|
14286
|
+
let positionalIndex = 0;
|
|
14287
|
+
let terminated = false;
|
|
14288
|
+
const error = (message) => ({ kind: "exit", status: 2, stdout: "", stderr: descriptor.usage + command + ": error: " + message + "\n" });
|
|
14289
|
+
const optional = (arg) => {
|
|
14290
|
+
if (terminated || arg.length < 2 || !arg.startsWith("-"))
|
|
14291
|
+
return false;
|
|
14292
|
+
const flag = arg.split("=", 1)[0];
|
|
14293
|
+
if (flags.has(flag) || (arg.startsWith("--") ? [...flags.keys()].some((candidate) => candidate.startsWith(flag)) : flags.has(arg.slice(0, 2))))
|
|
14294
|
+
return true;
|
|
14295
|
+
return !negativeNumber(arg) && !arg.includes(" ");
|
|
14296
|
+
};
|
|
14297
|
+
const label = (action) => action.optionStrings.join("/") || action.dest;
|
|
14298
|
+
const files = new MatchFileScope();
|
|
14299
|
+
context.registerCleanup?.(files.dispose);
|
|
14300
|
+
let transferred = false;
|
|
14301
|
+
let escapingFailure = false;
|
|
14302
|
+
const convert2 = async (action, text2) => {
|
|
14303
|
+
if (action.type === "builtins.int") {
|
|
14304
|
+
if (action.dest === "field_size_limit" && text2 === "Infinity")
|
|
14305
|
+
return Infinity;
|
|
14306
|
+
const value = integer(text2);
|
|
14307
|
+
if (value === void 0)
|
|
14308
|
+
return error(`argument ${label(action)}: invalid int value: ${repr(text2)}`);
|
|
14309
|
+
if (action.choices && !action.choices.includes(value)) {
|
|
14310
|
+
return error(`argument ${label(action)}: invalid choice: ${repr(String(value))} (choose from ${action.choices.join(", ")})`);
|
|
14311
|
+
}
|
|
14312
|
+
return value;
|
|
14313
|
+
}
|
|
14314
|
+
if (action.choices && !action.choices.includes(text2)) {
|
|
14315
|
+
return error(`argument ${label(action)}: invalid choice: ${repr(text2)} (choose from ${action.choices.join(", ")})`);
|
|
14316
|
+
}
|
|
14317
|
+
if (action.type?.startsWith("FileType(")) {
|
|
14318
|
+
if (!context.openMatchFile)
|
|
14319
|
+
throw new CsvkitBlocked("csvgrep match-file opening capability");
|
|
14320
|
+
try {
|
|
14321
|
+
const file = await files.acquire(() => context.openMatchFile(text2));
|
|
14322
|
+
context.signal?.throwIfAborted();
|
|
14323
|
+
if (files.closed)
|
|
14324
|
+
throw new TypeError("match-file scope closed");
|
|
14325
|
+
return file;
|
|
14326
|
+
} catch (failure) {
|
|
14327
|
+
context.signal?.throwIfAborted();
|
|
14328
|
+
if (files.closed)
|
|
14329
|
+
throw failure;
|
|
14330
|
+
return error(`argument ${label(action)}: can't open ${repr(text2)}: ${failure instanceof Error ? failure.message : String(failure)}`);
|
|
14331
|
+
}
|
|
14332
|
+
}
|
|
14333
|
+
return text2;
|
|
14334
|
+
};
|
|
14335
|
+
const isExit = (value) => typeof value === "object" && value !== null && "kind" in value && value.kind === "exit";
|
|
14336
|
+
try {
|
|
14337
|
+
for (let index = 0; index < args.length; index++) {
|
|
14338
|
+
context.signal?.throwIfAborted();
|
|
14339
|
+
const token = args[index];
|
|
14340
|
+
if (token === "--" && !terminated) {
|
|
14341
|
+
terminated = true;
|
|
14342
|
+
if (!positional[positionalIndex])
|
|
14343
|
+
extras.push(token);
|
|
14344
|
+
continue;
|
|
14345
|
+
}
|
|
14346
|
+
if (!optional(token)) {
|
|
14347
|
+
const action2 = positional[positionalIndex];
|
|
14348
|
+
if (!action2) {
|
|
14349
|
+
extras.push(token);
|
|
14350
|
+
continue;
|
|
14351
|
+
}
|
|
14352
|
+
if (action2.nargs === "*") {
|
|
14353
|
+
const values = [token];
|
|
14354
|
+
while (index + 1 < args.length) {
|
|
14355
|
+
if (!terminated && args[index + 1] === "--") {
|
|
14356
|
+
terminated = true;
|
|
14357
|
+
index++;
|
|
14358
|
+
continue;
|
|
14359
|
+
}
|
|
14360
|
+
if (optional(args[index + 1]))
|
|
14361
|
+
break;
|
|
14362
|
+
values.push(args[++index]);
|
|
14363
|
+
}
|
|
14364
|
+
options[action2.dest] = values;
|
|
14365
|
+
} else {
|
|
14366
|
+
options[action2.dest] = token;
|
|
14367
|
+
if (!terminated && args[index + 1] === "--") {
|
|
14368
|
+
terminated = true;
|
|
14369
|
+
index++;
|
|
14370
|
+
}
|
|
14371
|
+
}
|
|
14372
|
+
positionalIndex++;
|
|
14373
|
+
continue;
|
|
14374
|
+
}
|
|
14375
|
+
const equal = token.indexOf("=");
|
|
14376
|
+
let flag = equal === -1 ? token : token.slice(0, equal);
|
|
14377
|
+
let explicit = equal === -1 ? void 0 : token.slice(equal + 1);
|
|
14378
|
+
let equalsSeparator = equal !== -1;
|
|
14379
|
+
let action = flags.get(flag);
|
|
14380
|
+
if (!action && token.startsWith("--")) {
|
|
14381
|
+
const matches = [...flags.keys()].filter((candidate) => candidate.startsWith(flag));
|
|
14382
|
+
if (matches.length > 1)
|
|
14383
|
+
return error(`ambiguous option: ${token} could match ${matches.join(", ")}`);
|
|
14384
|
+
if (matches.length === 1) {
|
|
14385
|
+
flag = matches[0];
|
|
14386
|
+
action = flags.get(flag);
|
|
14387
|
+
}
|
|
14388
|
+
}
|
|
14389
|
+
if (!action && !token.startsWith("--")) {
|
|
14390
|
+
flag = token.slice(0, 2);
|
|
14391
|
+
action = flags.get(flag);
|
|
14392
|
+
if (action) {
|
|
14393
|
+
explicit = token.slice(2) || void 0;
|
|
14394
|
+
equalsSeparator = false;
|
|
14395
|
+
}
|
|
14396
|
+
}
|
|
14397
|
+
if (!action) {
|
|
14398
|
+
extras.push(token);
|
|
14399
|
+
continue;
|
|
14400
|
+
}
|
|
14401
|
+
for (; ; ) {
|
|
14402
|
+
if (action.nargs === 0 && explicit !== void 0 && (token.startsWith("--") || equalsSeparator)) {
|
|
14403
|
+
return error(`argument ${label(action)}: ignored explicit argument ${repr(explicit)}`);
|
|
14404
|
+
}
|
|
14405
|
+
if (action.action === "_HelpAction")
|
|
14406
|
+
return { kind: "exit", status: 0, stdout: descriptor.help, stderr: "" };
|
|
14407
|
+
if (action.action === "_VersionAction")
|
|
14408
|
+
return { kind: "exit", status: 0, stdout: `${command} 2.2.0
|
|
14409
|
+
`, stderr: "" };
|
|
14410
|
+
if (action.nargs === 0) {
|
|
14411
|
+
options[action.dest] = action.const;
|
|
14412
|
+
if (explicit !== void 0) {
|
|
14413
|
+
if (token.startsWith("--") || equalsSeparator || explicit.startsWith("-"))
|
|
14414
|
+
return error(`argument ${label(action)}: ignored explicit argument ${repr(explicit)}`);
|
|
14415
|
+
const nextFlag = "-" + explicit[0];
|
|
14416
|
+
const nextAction = flags.get(nextFlag);
|
|
14417
|
+
if (!nextAction) {
|
|
14418
|
+
extras.push("-" + explicit);
|
|
14419
|
+
break;
|
|
14420
|
+
}
|
|
14421
|
+
action = nextAction;
|
|
14422
|
+
const remainder = explicit.slice(1);
|
|
14423
|
+
equalsSeparator = remainder.startsWith("=");
|
|
14424
|
+
explicit = equalsSeparator ? remainder.slice(1) : remainder || void 0;
|
|
14425
|
+
continue;
|
|
14426
|
+
}
|
|
14427
|
+
break;
|
|
14428
|
+
}
|
|
14429
|
+
const count = action.nargs === "+" ? void 0 : typeof action.nargs === "number" ? action.nargs : 1;
|
|
14430
|
+
if (explicit !== void 0 && count !== void 0 && count > 1)
|
|
14431
|
+
return error(`argument ${label(action)}: expected ${count} arguments`);
|
|
14432
|
+
const values = [];
|
|
14433
|
+
if (explicit !== void 0)
|
|
14434
|
+
values.push(explicit);
|
|
14435
|
+
else {
|
|
14436
|
+
while (index + 1 < args.length && args[index + 1] !== "--" && (typeof action.nargs === "number" || !optional(args[index + 1])) && (count === void 0 || values.length < count))
|
|
14437
|
+
values.push(args[++index]);
|
|
14438
|
+
}
|
|
14439
|
+
if (values.length === 0 || count !== void 0 && values.length !== count) {
|
|
14440
|
+
return error(`argument ${label(action)}: expected ${count === 1 ? "one argument" : count === void 0 ? "at least one argument" : `${count} arguments`}`);
|
|
14441
|
+
}
|
|
14442
|
+
const converted = [];
|
|
14443
|
+
for (const value2 of values) {
|
|
14444
|
+
const convertedValue = await convert2(action, value2);
|
|
14445
|
+
if (isExit(convertedValue))
|
|
14446
|
+
return convertedValue;
|
|
14447
|
+
converted.push(convertedValue);
|
|
14448
|
+
}
|
|
14449
|
+
const value = action.nargs === null ? converted[0] : converted;
|
|
14450
|
+
if (action.action === "_AppendAction") {
|
|
14451
|
+
const existing = options[action.dest];
|
|
14452
|
+
options[action.dest] = [...Array.isArray(existing) ? existing : [], value];
|
|
14453
|
+
} else
|
|
14454
|
+
options[action.dest] = value;
|
|
14455
|
+
break;
|
|
14456
|
+
}
|
|
14457
|
+
}
|
|
14458
|
+
if (extras.length)
|
|
14459
|
+
return error("unrecognized arguments: " + extras.join(" "));
|
|
14460
|
+
context.signal?.throwIfAborted();
|
|
14461
|
+
if (files.closed)
|
|
14462
|
+
throw new TypeError("match-file scope closed");
|
|
14463
|
+
transferred = true;
|
|
14464
|
+
return { kind: "parsed", options: Object.freeze(options), dispose: files.dispose, matchFiles: files };
|
|
14465
|
+
} catch (failure) {
|
|
14466
|
+
escapingFailure = true;
|
|
14467
|
+
throw failure;
|
|
14468
|
+
} finally {
|
|
14469
|
+
if (!transferred)
|
|
14470
|
+
await disposeAfterParse(files, context.signal, escapingFailure);
|
|
14471
|
+
}
|
|
14472
|
+
}
|
|
14473
|
+
|
|
17291
14474
|
// packages/safe-bash-command-csvkit/dist/settings-admission.js
|
|
17292
14475
|
init_buffer();
|
|
17293
14476
|
var SettingsAdmission = class {
|
|
@@ -18435,7 +15618,7 @@ function installSqliteVfs(sqlite2, backend, clock, random) {
|
|
|
18435
15618
|
return code;
|
|
18436
15619
|
}
|
|
18437
15620
|
};
|
|
18438
|
-
const
|
|
15621
|
+
const offset = (value) => {
|
|
18439
15622
|
const n = Number(value);
|
|
18440
15623
|
if (!Number.isSafeInteger(n) || n < 0)
|
|
18441
15624
|
throw new RangeError("SQLite file offset");
|
|
@@ -18460,14 +15643,14 @@ function installSqliteVfs(sqlite2, backend, clock, random) {
|
|
|
18460
15643
|
try {
|
|
18461
15644
|
const bytes = wasm.heap8u().subarray(target, target + length);
|
|
18462
15645
|
bytes.fill(0);
|
|
18463
|
-
return files.get(pointer).file.read(bytes,
|
|
15646
|
+
return files.get(pointer).file.read(bytes, offset(position)) === length ? c.SQLITE_OK : c.SQLITE_IOERR_SHORT_READ;
|
|
18464
15647
|
} catch (error) {
|
|
18465
15648
|
failure = error;
|
|
18466
15649
|
return c.SQLITE_IOERR_READ;
|
|
18467
15650
|
}
|
|
18468
15651
|
},
|
|
18469
|
-
xWrite: (pointer, source, length, position) => guard(() => files.get(pointer).file.write(wasm.heap8u().subarray(source, source + length),
|
|
18470
|
-
xTruncate: (pointer, size) => guard(() => files.get(pointer).file.truncate(
|
|
15652
|
+
xWrite: (pointer, source, length, position) => guard(() => files.get(pointer).file.write(wasm.heap8u().subarray(source, source + length), offset(position)), c.SQLITE_IOERR_WRITE),
|
|
15653
|
+
xTruncate: (pointer, size) => guard(() => files.get(pointer).file.truncate(offset(size)), c.SQLITE_IOERR_TRUNCATE),
|
|
18471
15654
|
xSync: (pointer) => guard(() => files.get(pointer).file.sync(), c.SQLITE_IOERR_FSYNC),
|
|
18472
15655
|
xFileSize: (pointer, output) => guard(() => {
|
|
18473
15656
|
wasm.poke64(output, files.get(pointer).file.size());
|
|
@@ -19053,13 +16236,13 @@ function createMemorySqliteFileSystem(volume, options) {
|
|
|
19053
16236
|
throw new Error("SQLite memory file not writable");
|
|
19054
16237
|
};
|
|
19055
16238
|
return {
|
|
19056
|
-
read: (target,
|
|
19057
|
-
write(source,
|
|
16239
|
+
read: (target, offset) => volume.readSync(fd, target, 0, target.byteLength, offset),
|
|
16240
|
+
write(source, offset) {
|
|
19058
16241
|
writable();
|
|
19059
|
-
const size = Number(volume.fstatSync(fd).size), next = Math.max(size,
|
|
16242
|
+
const size = Number(volume.fstatSync(fd).size), next = Math.max(size, offset + source.byteLength);
|
|
19060
16243
|
account(path, next);
|
|
19061
16244
|
try {
|
|
19062
|
-
if (volume.writeSync(fd, source, 0, source.byteLength,
|
|
16245
|
+
if (volume.writeSync(fd, source, 0, source.byteLength, offset) !== source.byteLength)
|
|
19063
16246
|
throw new Error("SQLite short write");
|
|
19064
16247
|
} catch (error) {
|
|
19065
16248
|
account(path, Number(volume.fstatSync(fd).size));
|
|
@@ -19498,7 +16681,7 @@ var portableLocale = Object.freeze({
|
|
|
19498
16681
|
formatNumber(value, _locale, format3) {
|
|
19499
16682
|
const precisionText = format3.slice(2, -1);
|
|
19500
16683
|
const precision2 = Number(precisionText);
|
|
19501
|
-
if (!format3.startsWith("%.") || !format3.endsWith("f") || !precisionText || !Array.from(precisionText).every((
|
|
16684
|
+
if (!format3.startsWith("%.") || !format3.endsWith("f") || !precisionText || !Array.from(precisionText).every((character) => character >= "0" && character <= "9") || !Number.isSafeInteger(precision2) || precision2 > 100)
|
|
19502
16685
|
throw new CsvkitBlocked("portable locale supports %.Nf decimal formatting; bind locale for other formats");
|
|
19503
16686
|
const number2 = Number(value);
|
|
19504
16687
|
if (!Number.isFinite(number2))
|