poe-code 15.0.15 → 15.0.17
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/dist/metafile.json +1 -1
- package/package.json +13 -1
- package/packages/safe-bash/dist/chunks/chunk-A4UXQKWZ.js +2609 -0
- package/packages/safe-bash/dist/chunks/chunk-A4UXQKWZ.js.map +7 -0
- package/packages/safe-bash/dist/chunks/chunk-MVVKEMEG.js +1069 -0
- package/packages/safe-bash/dist/chunks/chunk-MVVKEMEG.js.map +7 -0
- package/packages/safe-bash/dist/commands/iconv/codec.d.ts +10 -0
- package/packages/safe-bash/dist/commands/iconv/codec.d.ts.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/codec.js +200 -0
- package/packages/safe-bash/dist/commands/iconv/codec.js.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/command.d.ts +4 -0
- package/packages/safe-bash/dist/commands/iconv/command.d.ts.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/command.js +116 -0
- package/packages/safe-bash/dist/commands/iconv/command.js.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/index.browser.js +15 -0
- package/packages/safe-bash/dist/commands/iconv/index.browser.js.map +7 -0
- package/packages/safe-bash/dist/commands/iconv/index.d.ts +7 -0
- package/packages/safe-bash/dist/commands/iconv/index.d.ts.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/index.js +11 -0
- package/packages/safe-bash/dist/commands/iconv/index.js.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/internal.d.ts +54 -0
- package/packages/safe-bash/dist/commands/iconv/internal.d.ts.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/internal.js +154 -0
- package/packages/safe-bash/dist/commands/iconv/internal.js.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/lifecycle.d.ts +24 -0
- package/packages/safe-bash/dist/commands/iconv/lifecycle.d.ts.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/lifecycle.js +111 -0
- package/packages/safe-bash/dist/commands/iconv/lifecycle.js.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/options.d.ts +11 -0
- package/packages/safe-bash/dist/commands/iconv/options.d.ts.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/options.js +82 -0
- package/packages/safe-bash/dist/commands/iconv/options.js.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/reader.d.ts +21 -0
- package/packages/safe-bash/dist/commands/iconv/reader.d.ts.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/reader.js +192 -0
- package/packages/safe-bash/dist/commands/iconv/reader.js.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/transliterations.d.ts +2 -0
- package/packages/safe-bash/dist/commands/iconv/transliterations.d.ts.map +1 -0
- package/packages/safe-bash/dist/commands/iconv/transliterations.js +1785 -0
- package/packages/safe-bash/dist/commands/iconv/transliterations.js.map +1 -0
- package/packages/safe-bash/dist/commands/line-endings/command.d.ts +5 -0
- package/packages/safe-bash/dist/commands/line-endings/command.d.ts.map +1 -0
- package/packages/safe-bash/dist/commands/line-endings/command.js +320 -0
- package/packages/safe-bash/dist/commands/line-endings/command.js.map +1 -0
- package/packages/safe-bash/dist/commands/line-endings/convert.d.ts +11 -0
- package/packages/safe-bash/dist/commands/line-endings/convert.d.ts.map +1 -0
- package/packages/safe-bash/dist/commands/line-endings/convert.js +196 -0
- package/packages/safe-bash/dist/commands/line-endings/convert.js.map +1 -0
- package/packages/safe-bash/dist/commands/line-endings/index.browser.js +18 -0
- package/packages/safe-bash/dist/commands/line-endings/index.browser.js.map +7 -0
- package/packages/safe-bash/dist/commands/line-endings/index.d.ts +7 -0
- package/packages/safe-bash/dist/commands/line-endings/index.d.ts.map +1 -0
- package/packages/safe-bash/dist/commands/line-endings/index.js +9 -0
- package/packages/safe-bash/dist/commands/line-endings/index.js.map +1 -0
- package/packages/safe-bash/dist/commands/line-endings/internal.d.ts +67 -0
- package/packages/safe-bash/dist/commands/line-endings/internal.d.ts.map +1 -0
- package/packages/safe-bash/dist/commands/line-endings/internal.js +144 -0
- package/packages/safe-bash/dist/commands/line-endings/internal.js.map +1 -0
- package/packages/safe-bash/dist/commands/line-endings/io.d.ts +53 -0
- package/packages/safe-bash/dist/commands/line-endings/io.d.ts.map +1 -0
- package/packages/safe-bash/dist/commands/line-endings/io.js +267 -0
- package/packages/safe-bash/dist/commands/line-endings/io.js.map +1 -0
- package/packages/safe-bash/dist/commands/line-endings/stage.d.ts +30 -0
- package/packages/safe-bash/dist/commands/line-endings/stage.d.ts.map +1 -0
- package/packages/safe-bash/dist/commands/line-endings/stage.js +159 -0
- package/packages/safe-bash/dist/commands/line-endings/stage.js.map +1 -0
- package/packages/safe-bash/dist/core.browser.js +23 -1
- package/packages/safe-bash/dist/core.browser.js.map +2 -2
- package/packages/safe-bash/dist/core.d.ts +2 -0
- package/packages/safe-bash/dist/core.d.ts.map +1 -1
- package/packages/safe-bash/dist/core.js +2 -0
- package/packages/safe-bash/dist/core.js.map +1 -1
- package/packages/safe-bash/dist/plugins/composition.d.ts +4 -0
- package/packages/safe-bash/dist/plugins/composition.d.ts.map +1 -1
- package/packages/safe-bash/dist/plugins/composition.js +5 -1
- package/packages/safe-bash/dist/plugins/composition.js.map +1 -1
|
@@ -0,0 +1,2609 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolvePath
|
|
3
|
+
} from "./chunk-DPJWEGIX.js";
|
|
4
|
+
import {
|
|
5
|
+
createOutputOperation
|
|
6
|
+
} from "./chunk-PZMJ4EC3.js";
|
|
7
|
+
import {
|
|
8
|
+
FsError,
|
|
9
|
+
PublicDiagnostic,
|
|
10
|
+
getCommandArguments,
|
|
11
|
+
outputFailure,
|
|
12
|
+
shellValueByteLength,
|
|
13
|
+
shellValueBytes,
|
|
14
|
+
yieldTurn
|
|
15
|
+
} from "./chunk-5VBLSPNM.js";
|
|
16
|
+
import {
|
|
17
|
+
init_platform
|
|
18
|
+
} from "./chunk-2KL6W6NB.js";
|
|
19
|
+
|
|
20
|
+
// packages/safe-bash/src/commands/iconv/index.ts
|
|
21
|
+
init_platform();
|
|
22
|
+
|
|
23
|
+
// packages/safe-bash/src/commands/iconv/command.ts
|
|
24
|
+
init_platform();
|
|
25
|
+
|
|
26
|
+
// packages/safe-bash/src/commands/iconv/internal.ts
|
|
27
|
+
init_platform();
|
|
28
|
+
function settings(options) {
|
|
29
|
+
const limits = {
|
|
30
|
+
maxArguments: 4096,
|
|
31
|
+
maxArgumentBytes: 65536,
|
|
32
|
+
maxInputBytes: 8388608,
|
|
33
|
+
maxBufferedBytes: 33554432,
|
|
34
|
+
maxOutputBytes: 67108864,
|
|
35
|
+
maxDiagnosticBytes: 65536,
|
|
36
|
+
maxWork: 134217728,
|
|
37
|
+
maxChunks: 65536,
|
|
38
|
+
maxEmptyChunks: 4096,
|
|
39
|
+
...options.limits
|
|
40
|
+
};
|
|
41
|
+
for (const [name, value] of Object.entries(limits)) {
|
|
42
|
+
if (!Number.isSafeInteger(value) || value < 1) throw new RangeError(`Invalid iconv limit: ${name}`);
|
|
43
|
+
}
|
|
44
|
+
return Object.freeze(limits);
|
|
45
|
+
}
|
|
46
|
+
var IconvError = class extends PublicDiagnostic {
|
|
47
|
+
constructor(message, status = 1) {
|
|
48
|
+
super(message);
|
|
49
|
+
this.status = status;
|
|
50
|
+
}
|
|
51
|
+
status;
|
|
52
|
+
};
|
|
53
|
+
function raw(value) {
|
|
54
|
+
let result = "";
|
|
55
|
+
for (let offset = 0; offset < value.length; offset += 4096) result += String.fromCharCode(...value.subarray(offset, offset + 4096));
|
|
56
|
+
return result;
|
|
57
|
+
}
|
|
58
|
+
function pathText(value) {
|
|
59
|
+
try {
|
|
60
|
+
return new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(Uint8Array.from(value, (character) => character.charCodeAt(0)));
|
|
61
|
+
} catch {
|
|
62
|
+
throw new IconvError("filesystem paths must be valid UTF-8");
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
var Budget = class {
|
|
66
|
+
constructor(context, limits, signal, callerSignal, admission) {
|
|
67
|
+
this.context = context;
|
|
68
|
+
this.limits = limits;
|
|
69
|
+
this.signal = signal;
|
|
70
|
+
this.callerSignal = callerSignal;
|
|
71
|
+
this.admission = admission;
|
|
72
|
+
}
|
|
73
|
+
context;
|
|
74
|
+
limits;
|
|
75
|
+
signal;
|
|
76
|
+
callerSignal;
|
|
77
|
+
admission;
|
|
78
|
+
work = 0;
|
|
79
|
+
checkpoint = 0;
|
|
80
|
+
retained = 0;
|
|
81
|
+
input = 0;
|
|
82
|
+
output = 0;
|
|
83
|
+
diagnostics = 0;
|
|
84
|
+
chunks = 0;
|
|
85
|
+
empties = 0;
|
|
86
|
+
assertOpen() {
|
|
87
|
+
this.signal.throwIfAborted();
|
|
88
|
+
if (this.admission.closed) throw new IconvError("command is closed");
|
|
89
|
+
}
|
|
90
|
+
check(value, maximum, label) {
|
|
91
|
+
if (!Number.isSafeInteger(value) || value < 0 || value > maximum) throw new IconvError(`${label} limit exceeded`);
|
|
92
|
+
}
|
|
93
|
+
charge(amount = 1) {
|
|
94
|
+
this.assertOpen();
|
|
95
|
+
this.check(this.work + amount, this.limits.maxWork, "work");
|
|
96
|
+
this.work += amount;
|
|
97
|
+
}
|
|
98
|
+
async checkpointWork() {
|
|
99
|
+
this.assertOpen();
|
|
100
|
+
if (this.work - this.checkpoint >= 4096) {
|
|
101
|
+
this.checkpoint = this.work;
|
|
102
|
+
await yieldTurn(this.callerSignal);
|
|
103
|
+
this.assertOpen();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
retain(amount) {
|
|
107
|
+
this.check(this.retained + amount, this.limits.maxBufferedBytes, "buffered bytes");
|
|
108
|
+
this.retained += amount;
|
|
109
|
+
}
|
|
110
|
+
snapshotMaximum() {
|
|
111
|
+
return Math.min(this.limits.maxInputBytes - this.input, Math.floor((this.limits.maxBufferedBytes - this.retained) / 2));
|
|
112
|
+
}
|
|
113
|
+
inputBytes(amount) {
|
|
114
|
+
this.check(this.input + amount, this.limits.maxInputBytes, "input bytes");
|
|
115
|
+
this.input += amount;
|
|
116
|
+
this.check(++this.chunks, this.limits.maxChunks, "input chunks");
|
|
117
|
+
if (!amount) this.check(++this.empties, this.limits.maxEmptyChunks, "empty input chunks");
|
|
118
|
+
this.charge(amount + 1);
|
|
119
|
+
}
|
|
120
|
+
emitted(amount, diagnostic) {
|
|
121
|
+
if (diagnostic) {
|
|
122
|
+
this.check(this.diagnostics + amount, this.limits.maxDiagnosticBytes, "diagnostic bytes");
|
|
123
|
+
this.diagnostics += amount;
|
|
124
|
+
} else {
|
|
125
|
+
this.check(this.output + amount, this.limits.maxOutputBytes, "output bytes");
|
|
126
|
+
this.charge(amount);
|
|
127
|
+
this.output += amount;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
arguments() {
|
|
131
|
+
this.assertOpen();
|
|
132
|
+
const args = this.context.args;
|
|
133
|
+
this.assertOpen();
|
|
134
|
+
const count = args.length;
|
|
135
|
+
this.assertOpen();
|
|
136
|
+
this.check(count, this.limits.maxArguments, "argument count");
|
|
137
|
+
const argumentValues = this.context.argumentValues;
|
|
138
|
+
this.assertOpen();
|
|
139
|
+
const carrier = argumentValues === void 0 ? void 0 : getCommandArguments({ args, argumentValues });
|
|
140
|
+
this.assertOpen();
|
|
141
|
+
this.retain(count * 64 + 128);
|
|
142
|
+
const snapshot = [];
|
|
143
|
+
let units = 0, total = 0;
|
|
144
|
+
for (let index = 0; index < count; index++) {
|
|
145
|
+
const argument = args[index];
|
|
146
|
+
this.assertOpen();
|
|
147
|
+
if (typeof argument !== "string") throw new IconvError("arguments must be strings");
|
|
148
|
+
units += argument.length;
|
|
149
|
+
this.check(units, this.limits.maxArgumentBytes, "argument bytes");
|
|
150
|
+
this.charge(argument.length + 1);
|
|
151
|
+
for (let offset = 0; offset < argument.length; offset++) {
|
|
152
|
+
const unit = argument.charCodeAt(offset);
|
|
153
|
+
if (unit >= 55296 && unit <= 56319) {
|
|
154
|
+
const next = argument.charCodeAt(++offset);
|
|
155
|
+
if (!(next >= 56320 && next <= 57343)) throw new IconvError("arguments must contain well-formed Unicode");
|
|
156
|
+
} else if (unit >= 56320 && unit <= 57343) throw new IconvError("arguments must contain well-formed Unicode");
|
|
157
|
+
}
|
|
158
|
+
const size = shellValueByteLength(carrier ? carrier.values[index] : argument);
|
|
159
|
+
total += size;
|
|
160
|
+
this.check(total, this.limits.maxArgumentBytes, "argument bytes");
|
|
161
|
+
this.charge(size);
|
|
162
|
+
this.retain(size * 8);
|
|
163
|
+
snapshot.push(argument);
|
|
164
|
+
}
|
|
165
|
+
return (carrier ?? getCommandArguments({ args: snapshot })).values.map((argument) => {
|
|
166
|
+
this.charge(shellValueByteLength(argument));
|
|
167
|
+
const value = shellValueBytes(argument);
|
|
168
|
+
if (value.includes(0)) throw new IconvError("NUL is not supported in arguments");
|
|
169
|
+
return raw(value);
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
// packages/safe-bash/src/commands/iconv/lifecycle.ts
|
|
175
|
+
init_platform();
|
|
176
|
+
var Lifecycle = class {
|
|
177
|
+
constructor(budget, output, stdout) {
|
|
178
|
+
this.budget = budget;
|
|
179
|
+
this.stdout = stdout;
|
|
180
|
+
output.registerCleanup(() => this.close());
|
|
181
|
+
}
|
|
182
|
+
budget;
|
|
183
|
+
stdout;
|
|
184
|
+
pending = /* @__PURE__ */ new Set();
|
|
185
|
+
cleanups = /* @__PURE__ */ new Set();
|
|
186
|
+
closing;
|
|
187
|
+
diagnosticDestination;
|
|
188
|
+
diagnosticCancellation;
|
|
189
|
+
cleanup(action) {
|
|
190
|
+
this.assertOpen();
|
|
191
|
+
this.cleanups.add(action);
|
|
192
|
+
}
|
|
193
|
+
forget(action) {
|
|
194
|
+
this.cleanups.delete(action);
|
|
195
|
+
}
|
|
196
|
+
assertOpen() {
|
|
197
|
+
this.budget.assertOpen();
|
|
198
|
+
if (this.closing) throw new IconvError("command is closed");
|
|
199
|
+
}
|
|
200
|
+
assertDiagnosticOpen() {
|
|
201
|
+
this.budget.callerSignal.throwIfAborted();
|
|
202
|
+
const consumer = this.diagnosticDestination?.consumer;
|
|
203
|
+
if (consumer?.aborted) {
|
|
204
|
+
this.diagnosticCancellation = { reason: consumer.reason };
|
|
205
|
+
consumer.throwIfAborted();
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
async operation(action, diagnostic = false) {
|
|
209
|
+
if (diagnostic) this.assertDiagnosticOpen();
|
|
210
|
+
else this.assertOpen();
|
|
211
|
+
if (this.closing || this.budget.admission.closed) throw new IconvError("command is closed");
|
|
212
|
+
if (!diagnostic) this.budget.charge();
|
|
213
|
+
const pending = Promise.resolve().then(() => {
|
|
214
|
+
if (diagnostic) this.assertDiagnosticOpen();
|
|
215
|
+
else this.assertOpen();
|
|
216
|
+
return action();
|
|
217
|
+
});
|
|
218
|
+
this.pending.add(pending);
|
|
219
|
+
try {
|
|
220
|
+
const value = await pending;
|
|
221
|
+
if (diagnostic) this.assertDiagnosticOpen();
|
|
222
|
+
else this.assertOpen();
|
|
223
|
+
return value;
|
|
224
|
+
} finally {
|
|
225
|
+
this.pending.delete(pending);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
close() {
|
|
229
|
+
return this.closing ??= Promise.resolve().then(async () => {
|
|
230
|
+
while (this.pending.size) await Promise.allSettled([...this.pending]);
|
|
231
|
+
const failures = [];
|
|
232
|
+
for (const cleanup of this.cleanups) {
|
|
233
|
+
try {
|
|
234
|
+
await cleanup();
|
|
235
|
+
} catch (error) {
|
|
236
|
+
failures.push(error);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
if (failures.length === 1) throw failures[0];
|
|
240
|
+
if (failures.length > 1) throw new AggregateError(failures, "iconv cleanup failed");
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
async write(value, diagnostic = false) {
|
|
244
|
+
this.budget.emitted(value.length, diagnostic);
|
|
245
|
+
await this.operation(async () => {
|
|
246
|
+
let destination;
|
|
247
|
+
if (diagnostic) {
|
|
248
|
+
if (!this.diagnosticDestination) {
|
|
249
|
+
const sink = this.budget.context.stderr;
|
|
250
|
+
this.assertDiagnosticOpen();
|
|
251
|
+
const capability = sink.ownedOutput;
|
|
252
|
+
this.assertDiagnosticOpen();
|
|
253
|
+
const consumer = capability?.consumerClosed;
|
|
254
|
+
this.diagnosticDestination = { destination: capability ?? sink, consumer };
|
|
255
|
+
}
|
|
256
|
+
this.assertDiagnosticOpen();
|
|
257
|
+
destination = this.diagnosticDestination.destination;
|
|
258
|
+
} else {
|
|
259
|
+
destination = this.stdout;
|
|
260
|
+
this.assertOpen();
|
|
261
|
+
}
|
|
262
|
+
const write = destination.write;
|
|
263
|
+
if (diagnostic) this.assertDiagnosticOpen();
|
|
264
|
+
else this.assertOpen();
|
|
265
|
+
await Reflect.apply(write, destination, [value]);
|
|
266
|
+
}, diagnostic);
|
|
267
|
+
}
|
|
268
|
+
async diagnostic(message) {
|
|
269
|
+
this.budget.check(message.length * 3 + 8, this.budget.limits.maxDiagnosticBytes, "diagnostic bytes");
|
|
270
|
+
await this.write(new TextEncoder().encode(`iconv: ${message}
|
|
271
|
+
`), true);
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
// packages/safe-bash/src/commands/iconv/reader.ts
|
|
276
|
+
init_platform();
|
|
277
|
+
var typedArrayPrototype = Object.getPrototypeOf(Uint8Array.prototype);
|
|
278
|
+
var viewBuffer = Object.getOwnPropertyDescriptor(typedArrayPrototype, "buffer").get;
|
|
279
|
+
var viewOffset = Object.getOwnPropertyDescriptor(typedArrayPrototype, "byteOffset").get;
|
|
280
|
+
var viewLength = Object.getOwnPropertyDescriptor(typedArrayPrototype, "byteLength").get;
|
|
281
|
+
var Reader = class {
|
|
282
|
+
constructor(name, lifecycle) {
|
|
283
|
+
this.name = name;
|
|
284
|
+
this.lifecycle = lifecycle;
|
|
285
|
+
lifecycle.budget.retain(256);
|
|
286
|
+
lifecycle.cleanup(this.close);
|
|
287
|
+
}
|
|
288
|
+
name;
|
|
289
|
+
lifecycle;
|
|
290
|
+
iterator;
|
|
291
|
+
ended = false;
|
|
292
|
+
retained = 0;
|
|
293
|
+
closed;
|
|
294
|
+
chunks = [];
|
|
295
|
+
content;
|
|
296
|
+
readError;
|
|
297
|
+
stage = "open";
|
|
298
|
+
close = () => this.closed ??= Promise.resolve().then(async () => {
|
|
299
|
+
try {
|
|
300
|
+
if (!this.ended) await this.iterator?.return?.();
|
|
301
|
+
} finally {
|
|
302
|
+
this.iterator = void 0;
|
|
303
|
+
this.content = void 0;
|
|
304
|
+
this.chunks.length = 0;
|
|
305
|
+
this.lifecycle.budget.retain(-this.retained - 256);
|
|
306
|
+
this.retained = 0;
|
|
307
|
+
this.lifecycle.forget(this.close);
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
copy(value) {
|
|
311
|
+
if (!(value instanceof Uint8Array)) throw new TypeError("iconv input requires bytes");
|
|
312
|
+
const buffer = viewBuffer.call(value);
|
|
313
|
+
const offset = viewOffset.call(value);
|
|
314
|
+
const size = viewLength.call(value);
|
|
315
|
+
this.lifecycle.assertOpen();
|
|
316
|
+
this.lifecycle.budget.inputBytes(size);
|
|
317
|
+
this.lifecycle.budget.retain(size);
|
|
318
|
+
try {
|
|
319
|
+
const copy = new Uint8Array(new Uint8Array(buffer, offset, size));
|
|
320
|
+
this.retained += size;
|
|
321
|
+
return copy;
|
|
322
|
+
} catch (error) {
|
|
323
|
+
this.lifecycle.budget.retain(-size);
|
|
324
|
+
throw error;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
async open() {
|
|
328
|
+
const { budget } = this.lifecycle;
|
|
329
|
+
await this.lifecycle.operation(async () => {
|
|
330
|
+
let source;
|
|
331
|
+
let needsAcquisitionCleanup = false;
|
|
332
|
+
if (this.name === "-") {
|
|
333
|
+
source = budget.context.stdin;
|
|
334
|
+
this.stage = "read";
|
|
335
|
+
} else {
|
|
336
|
+
if (this.name === "") throw new FsError("ENOENT", { path: "" });
|
|
337
|
+
const cwd = budget.context.cwd;
|
|
338
|
+
this.lifecycle.assertOpen();
|
|
339
|
+
const path = resolvePath(cwd, pathText(this.name));
|
|
340
|
+
const fs = budget.context.fs;
|
|
341
|
+
this.lifecycle.assertOpen();
|
|
342
|
+
const statMethod = fs.stat;
|
|
343
|
+
this.lifecycle.assertOpen();
|
|
344
|
+
const stat = await Reflect.apply(statMethod, fs, [path, { signal: budget.signal }]);
|
|
345
|
+
this.lifecycle.assertOpen();
|
|
346
|
+
const type = stat.type;
|
|
347
|
+
this.lifecycle.assertOpen();
|
|
348
|
+
if (this.name.endsWith("/") && type !== "directory") throw new FsError("ENOTDIR", { path });
|
|
349
|
+
this.stage = "read";
|
|
350
|
+
if (type === "directory") {
|
|
351
|
+
this.readError = new FsError("EISDIR", { path });
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
if (type !== "file" && type !== "character") throw new FsError("ENOTSUP", { path });
|
|
355
|
+
const capabilitiesFor = fs.capabilitiesFor;
|
|
356
|
+
this.lifecycle.assertOpen();
|
|
357
|
+
const selected = capabilitiesFor ? await Reflect.apply(capabilitiesFor, fs, [path, { signal: budget.signal }]) : void 0;
|
|
358
|
+
this.lifecycle.assertOpen();
|
|
359
|
+
const capabilities = selected ?? fs.capabilities;
|
|
360
|
+
this.lifecycle.assertOpen();
|
|
361
|
+
const streamingRead = capabilities.streamingRead;
|
|
362
|
+
this.lifecycle.assertOpen();
|
|
363
|
+
const readStream = fs.readStream;
|
|
364
|
+
this.lifecycle.assertOpen();
|
|
365
|
+
if (readStream && streamingRead !== false) {
|
|
366
|
+
source = Reflect.apply(readStream, fs, [path, { signal: budget.signal, chunkSize: 16384 }]);
|
|
367
|
+
needsAcquisitionCleanup = budget.signal.aborted || budget.admission.closed;
|
|
368
|
+
} else {
|
|
369
|
+
const maximum = budget.snapshotMaximum();
|
|
370
|
+
const size = stat.size;
|
|
371
|
+
this.lifecycle.assertOpen();
|
|
372
|
+
budget.check(size, maximum, "buffered input bytes");
|
|
373
|
+
budget.retain(maximum);
|
|
374
|
+
try {
|
|
375
|
+
const readFile = fs.readFile;
|
|
376
|
+
this.lifecycle.assertOpen();
|
|
377
|
+
const content = await Reflect.apply(readFile, fs, [path, { signal: budget.signal, maxBytes: maximum }]);
|
|
378
|
+
this.lifecycle.assertOpen();
|
|
379
|
+
if (!(content instanceof Uint8Array)) throw new TypeError("iconv input requires bytes");
|
|
380
|
+
const length = viewLength.call(content);
|
|
381
|
+
this.lifecycle.assertOpen();
|
|
382
|
+
budget.check(length, maximum, "buffered input bytes");
|
|
383
|
+
this.content = this.copy(content);
|
|
384
|
+
this.ended = true;
|
|
385
|
+
} finally {
|
|
386
|
+
budget.retain(-maximum);
|
|
387
|
+
}
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
if (!needsAcquisitionCleanup) this.lifecycle.assertOpen();
|
|
392
|
+
const factory = source[Symbol.asyncIterator];
|
|
393
|
+
if (!needsAcquisitionCleanup) this.lifecycle.assertOpen();
|
|
394
|
+
this.iterator = Reflect.apply(factory, source, []);
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
async all() {
|
|
398
|
+
if (this.readError) throw this.readError;
|
|
399
|
+
if (this.content) return this.content;
|
|
400
|
+
const { budget } = this.lifecycle;
|
|
401
|
+
let length = 0;
|
|
402
|
+
while (!this.ended) {
|
|
403
|
+
const result = await this.lifecycle.operation(() => {
|
|
404
|
+
const iterator = this.iterator;
|
|
405
|
+
const next = iterator.next;
|
|
406
|
+
this.lifecycle.assertOpen();
|
|
407
|
+
return Reflect.apply(next, iterator, []);
|
|
408
|
+
});
|
|
409
|
+
const done = result.done;
|
|
410
|
+
this.lifecycle.assertOpen();
|
|
411
|
+
if (done) {
|
|
412
|
+
this.ended = true;
|
|
413
|
+
this.iterator = void 0;
|
|
414
|
+
break;
|
|
415
|
+
}
|
|
416
|
+
const value = result.value;
|
|
417
|
+
this.lifecycle.assertOpen();
|
|
418
|
+
const owned = this.copy(value);
|
|
419
|
+
budget.retain(64);
|
|
420
|
+
this.retained += 64;
|
|
421
|
+
this.chunks.push(owned);
|
|
422
|
+
length += owned.length;
|
|
423
|
+
await budget.checkpointWork();
|
|
424
|
+
}
|
|
425
|
+
budget.retain(length);
|
|
426
|
+
this.retained += length;
|
|
427
|
+
const content = new Uint8Array(length);
|
|
428
|
+
let offset = 0;
|
|
429
|
+
for (const chunk of this.chunks) {
|
|
430
|
+
content.set(chunk, offset);
|
|
431
|
+
offset += chunk.length;
|
|
432
|
+
budget.charge(chunk.length + 1);
|
|
433
|
+
await budget.checkpointWork();
|
|
434
|
+
}
|
|
435
|
+
budget.retain(-length - this.chunks.length * 64);
|
|
436
|
+
this.retained -= length + this.chunks.length * 64;
|
|
437
|
+
this.chunks.length = 0;
|
|
438
|
+
this.content = content;
|
|
439
|
+
return content;
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
function fsDetail(error) {
|
|
443
|
+
const details = {
|
|
444
|
+
EACCES: "Permission denied",
|
|
445
|
+
EPERM: "Operation not permitted",
|
|
446
|
+
ENOENT: "No such file or directory",
|
|
447
|
+
EISDIR: "Is a directory",
|
|
448
|
+
ENOTDIR: "Not a directory",
|
|
449
|
+
EIO: "Input/output error",
|
|
450
|
+
ELOOP: "Too many levels of symbolic links",
|
|
451
|
+
ENAMETOOLONG: "File name too long",
|
|
452
|
+
ENOTSUP: "Operation not supported"
|
|
453
|
+
};
|
|
454
|
+
return details[error.code] ?? error.message;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
// packages/safe-bash/src/commands/iconv/options.ts
|
|
458
|
+
init_platform();
|
|
459
|
+
function encoding(value) {
|
|
460
|
+
const key = value.toUpperCase();
|
|
461
|
+
const aliases = {
|
|
462
|
+
ASCII: "ascii",
|
|
463
|
+
"US-ASCII": "ascii",
|
|
464
|
+
"ANSI_X3.4-1968": "ascii",
|
|
465
|
+
LATIN1: "latin1",
|
|
466
|
+
"LATIN-1": "latin1",
|
|
467
|
+
"ISO-8859-1": "latin1",
|
|
468
|
+
"ISO8859-1": "latin1",
|
|
469
|
+
UTF8: "utf8",
|
|
470
|
+
"UTF-8": "utf8",
|
|
471
|
+
UTF16: "utf16",
|
|
472
|
+
"UTF-16": "utf16",
|
|
473
|
+
UTF16LE: "utf16le",
|
|
474
|
+
"UTF-16LE": "utf16le",
|
|
475
|
+
UTF16BE: "utf16be",
|
|
476
|
+
"UTF-16BE": "utf16be"
|
|
477
|
+
};
|
|
478
|
+
if (key.includes("//")) throw new IconvError(`unsupported encoding suffix: ${value}`);
|
|
479
|
+
const result = Object.hasOwn(aliases, key) ? aliases[key] : void 0;
|
|
480
|
+
if (!result) throw new IconvError(`unsupported encoding: ${value}`);
|
|
481
|
+
return result;
|
|
482
|
+
}
|
|
483
|
+
function parse(budget) {
|
|
484
|
+
const args = budget.arguments();
|
|
485
|
+
let from, to, discard = false, ended = false;
|
|
486
|
+
const files = [];
|
|
487
|
+
for (let index = 0; index < args.length; index++) {
|
|
488
|
+
const argument = args[index];
|
|
489
|
+
budget.charge(argument.length + 1);
|
|
490
|
+
if (ended || argument === "-" || !argument.startsWith("-")) {
|
|
491
|
+
files.push(argument);
|
|
492
|
+
continue;
|
|
493
|
+
}
|
|
494
|
+
if (argument === "--") {
|
|
495
|
+
ended = true;
|
|
496
|
+
continue;
|
|
497
|
+
}
|
|
498
|
+
if (argument.startsWith("--")) throw new IconvError(`unsupported option: ${argument}`, 64);
|
|
499
|
+
for (let offset = 1; offset < argument.length; offset++) {
|
|
500
|
+
const flag = argument[offset];
|
|
501
|
+
if (flag === "c") {
|
|
502
|
+
discard = true;
|
|
503
|
+
continue;
|
|
504
|
+
}
|
|
505
|
+
if (flag !== "f" && flag !== "t") throw new IconvError(`invalid option -- '${flag}'`, 64);
|
|
506
|
+
const value = argument.slice(offset + 1) || args[++index];
|
|
507
|
+
if (value === void 0) throw new IconvError(`option requires an argument -- '${flag}'`, 64);
|
|
508
|
+
if (flag === "f") from = value;
|
|
509
|
+
else to = value;
|
|
510
|
+
break;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
const transliterate = to?.toUpperCase().endsWith("//TRANSLIT") ?? false;
|
|
514
|
+
if (transliterate) to = to.slice(0, -10);
|
|
515
|
+
if (from === void 0 || to === void 0 || transliterate) {
|
|
516
|
+
const env = budget.context.env;
|
|
517
|
+
budget.assertOpen();
|
|
518
|
+
let locale = "";
|
|
519
|
+
for (const name of ["LC_ALL", "LC_CTYPE", "LANG"]) {
|
|
520
|
+
locale = env[name] || "";
|
|
521
|
+
budget.assertOpen();
|
|
522
|
+
budget.check(locale.length, budget.limits.maxArgumentBytes, "locale bytes");
|
|
523
|
+
budget.charge(locale.length + 1);
|
|
524
|
+
if (locale) break;
|
|
525
|
+
}
|
|
526
|
+
locale ||= "C";
|
|
527
|
+
if (transliterate && locale !== "C" && locale !== "POSIX") throw new IconvError(`unsupported transliteration locale: ${locale}; supported: C, POSIX, or unset`);
|
|
528
|
+
let fallback;
|
|
529
|
+
if (locale === "C" || locale === "POSIX") fallback = "ASCII";
|
|
530
|
+
else if (locale === "C.UTF-8" || locale === "C.utf8") fallback = "UTF-8";
|
|
531
|
+
else throw new IconvError(`unsupported default encoding locale: ${locale}; specify -f and -t`);
|
|
532
|
+
from ??= fallback;
|
|
533
|
+
to ??= fallback;
|
|
534
|
+
}
|
|
535
|
+
return { from: encoding(from), to: encoding(to), discard, transliterate, files: files.length ? files : ["-"] };
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// packages/safe-bash/src/commands/iconv/codec.ts
|
|
539
|
+
init_platform();
|
|
540
|
+
|
|
541
|
+
// packages/safe-bash/src/commands/iconv/transliterations.ts
|
|
542
|
+
init_platform();
|
|
543
|
+
var cTransliterations = Object.freeze({
|
|
544
|
+
160: " ",
|
|
545
|
+
169: "(C)",
|
|
546
|
+
171: "<<",
|
|
547
|
+
173: "-",
|
|
548
|
+
174: "(R)",
|
|
549
|
+
181: "u",
|
|
550
|
+
184: ",",
|
|
551
|
+
187: ">>",
|
|
552
|
+
188: " 1/4 ",
|
|
553
|
+
189: " 1/2 ",
|
|
554
|
+
190: " 3/4 ",
|
|
555
|
+
198: "AE",
|
|
556
|
+
215: "x",
|
|
557
|
+
223: "ss",
|
|
558
|
+
230: "ae",
|
|
559
|
+
306: "IJ",
|
|
560
|
+
307: "ij",
|
|
561
|
+
329: "'n",
|
|
562
|
+
338: "OE",
|
|
563
|
+
339: "oe",
|
|
564
|
+
383: "s",
|
|
565
|
+
455: "LJ",
|
|
566
|
+
456: "Lj",
|
|
567
|
+
457: "lj",
|
|
568
|
+
458: "NJ",
|
|
569
|
+
459: "Nj",
|
|
570
|
+
460: "nj",
|
|
571
|
+
497: "DZ",
|
|
572
|
+
498: "Dz",
|
|
573
|
+
499: "dz",
|
|
574
|
+
700: "'",
|
|
575
|
+
710: "^",
|
|
576
|
+
712: "'",
|
|
577
|
+
715: "`",
|
|
578
|
+
717: "_",
|
|
579
|
+
720: ":",
|
|
580
|
+
732: "~",
|
|
581
|
+
880: "H",
|
|
582
|
+
881: "h",
|
|
583
|
+
882: "SS",
|
|
584
|
+
883: "ss",
|
|
585
|
+
884: "#",
|
|
586
|
+
885: "#`",
|
|
587
|
+
886: "W",
|
|
588
|
+
887: "w",
|
|
589
|
+
890: "i",
|
|
590
|
+
891: "s",
|
|
591
|
+
892: "s",
|
|
592
|
+
893: "s",
|
|
593
|
+
895: "J",
|
|
594
|
+
900: "`",
|
|
595
|
+
901: "`",
|
|
596
|
+
902: "A",
|
|
597
|
+
903: ";",
|
|
598
|
+
904: "E",
|
|
599
|
+
905: "I",
|
|
600
|
+
906: "I",
|
|
601
|
+
908: "O",
|
|
602
|
+
910: "Y",
|
|
603
|
+
911: "O",
|
|
604
|
+
912: "I",
|
|
605
|
+
913: "A",
|
|
606
|
+
914: "V",
|
|
607
|
+
915: "G",
|
|
608
|
+
916: "D",
|
|
609
|
+
917: "E",
|
|
610
|
+
918: "Z",
|
|
611
|
+
919: "I",
|
|
612
|
+
920: "TH",
|
|
613
|
+
921: "I",
|
|
614
|
+
922: "K",
|
|
615
|
+
923: "L",
|
|
616
|
+
924: "M",
|
|
617
|
+
925: "N",
|
|
618
|
+
926: "X",
|
|
619
|
+
927: "O",
|
|
620
|
+
928: "P",
|
|
621
|
+
929: "R",
|
|
622
|
+
931: "S",
|
|
623
|
+
932: "T",
|
|
624
|
+
933: "Y",
|
|
625
|
+
934: "F",
|
|
626
|
+
935: "CH",
|
|
627
|
+
936: "PS",
|
|
628
|
+
937: "O",
|
|
629
|
+
938: "I",
|
|
630
|
+
939: "Y",
|
|
631
|
+
940: "a",
|
|
632
|
+
941: "e",
|
|
633
|
+
942: "i",
|
|
634
|
+
943: "i",
|
|
635
|
+
944: "y",
|
|
636
|
+
945: "a",
|
|
637
|
+
946: "v",
|
|
638
|
+
947: "g",
|
|
639
|
+
948: "d",
|
|
640
|
+
949: "e",
|
|
641
|
+
950: "z",
|
|
642
|
+
951: "i",
|
|
643
|
+
952: "th",
|
|
644
|
+
953: "i",
|
|
645
|
+
954: "k",
|
|
646
|
+
955: "l",
|
|
647
|
+
956: "m",
|
|
648
|
+
957: "n",
|
|
649
|
+
958: "x",
|
|
650
|
+
959: "o",
|
|
651
|
+
960: "p",
|
|
652
|
+
961: "r",
|
|
653
|
+
962: "s",
|
|
654
|
+
963: "s",
|
|
655
|
+
964: "t",
|
|
656
|
+
965: "y",
|
|
657
|
+
966: "f",
|
|
658
|
+
967: "ch",
|
|
659
|
+
968: "ps",
|
|
660
|
+
969: "o",
|
|
661
|
+
970: "i",
|
|
662
|
+
971: "y",
|
|
663
|
+
972: "o",
|
|
664
|
+
973: "y",
|
|
665
|
+
974: "o",
|
|
666
|
+
975: "&",
|
|
667
|
+
976: "b",
|
|
668
|
+
977: "th",
|
|
669
|
+
978: "Y`",
|
|
670
|
+
979: "Y`",
|
|
671
|
+
980: "Y`",
|
|
672
|
+
981: "f",
|
|
673
|
+
982: "p",
|
|
674
|
+
983: "&",
|
|
675
|
+
984: "Q",
|
|
676
|
+
985: "q",
|
|
677
|
+
986: "6",
|
|
678
|
+
987: "6",
|
|
679
|
+
988: "W",
|
|
680
|
+
989: "w",
|
|
681
|
+
990: "90",
|
|
682
|
+
991: "90",
|
|
683
|
+
992: "900",
|
|
684
|
+
993: "900",
|
|
685
|
+
994: "SH",
|
|
686
|
+
995: "sh",
|
|
687
|
+
996: "F",
|
|
688
|
+
997: "f",
|
|
689
|
+
998: "KH",
|
|
690
|
+
999: "kh",
|
|
691
|
+
1e3: "H",
|
|
692
|
+
1001: "h",
|
|
693
|
+
1002: "DJ",
|
|
694
|
+
1003: "dj",
|
|
695
|
+
1004: "GJ",
|
|
696
|
+
1005: "gj",
|
|
697
|
+
1006: "TI",
|
|
698
|
+
1007: "ti",
|
|
699
|
+
1008: "k",
|
|
700
|
+
1009: "r",
|
|
701
|
+
1010: "s",
|
|
702
|
+
1011: "j",
|
|
703
|
+
1012: "TH",
|
|
704
|
+
1013: "e",
|
|
705
|
+
1014: "e",
|
|
706
|
+
1015: "SH",
|
|
707
|
+
1016: "sh",
|
|
708
|
+
1017: "S",
|
|
709
|
+
1018: "S",
|
|
710
|
+
1019: "s",
|
|
711
|
+
1020: "r",
|
|
712
|
+
1021: "S",
|
|
713
|
+
1022: "S",
|
|
714
|
+
1023: "S",
|
|
715
|
+
1025: "YO",
|
|
716
|
+
1026: "DJ",
|
|
717
|
+
1027: "G`",
|
|
718
|
+
1028: "YE",
|
|
719
|
+
1029: "Z`",
|
|
720
|
+
1030: "I",
|
|
721
|
+
1031: "YI",
|
|
722
|
+
1032: "J",
|
|
723
|
+
1033: "L`",
|
|
724
|
+
1034: "N`",
|
|
725
|
+
1035: "TSH",
|
|
726
|
+
1036: "K`",
|
|
727
|
+
1038: "U`",
|
|
728
|
+
1039: "DH",
|
|
729
|
+
1040: "A",
|
|
730
|
+
1041: "B",
|
|
731
|
+
1042: "V",
|
|
732
|
+
1043: "G",
|
|
733
|
+
1044: "D",
|
|
734
|
+
1045: "E",
|
|
735
|
+
1046: "ZH",
|
|
736
|
+
1047: "Z",
|
|
737
|
+
1048: "I",
|
|
738
|
+
1049: "J",
|
|
739
|
+
1050: "K",
|
|
740
|
+
1051: "L",
|
|
741
|
+
1052: "M",
|
|
742
|
+
1053: "N",
|
|
743
|
+
1054: "O",
|
|
744
|
+
1055: "P",
|
|
745
|
+
1056: "R",
|
|
746
|
+
1057: "S",
|
|
747
|
+
1058: "T",
|
|
748
|
+
1059: "U",
|
|
749
|
+
1060: "F",
|
|
750
|
+
1061: "X",
|
|
751
|
+
1062: "CZ",
|
|
752
|
+
1063: "CH",
|
|
753
|
+
1064: "SH",
|
|
754
|
+
1065: "SHH",
|
|
755
|
+
1066: "A`",
|
|
756
|
+
1067: "Y`",
|
|
757
|
+
1068: "`",
|
|
758
|
+
1069: "E`",
|
|
759
|
+
1070: "YU",
|
|
760
|
+
1071: "YA",
|
|
761
|
+
1072: "a",
|
|
762
|
+
1073: "b",
|
|
763
|
+
1074: "v",
|
|
764
|
+
1075: "g",
|
|
765
|
+
1076: "d",
|
|
766
|
+
1077: "e",
|
|
767
|
+
1078: "zh",
|
|
768
|
+
1079: "z",
|
|
769
|
+
1080: "i",
|
|
770
|
+
1081: "j",
|
|
771
|
+
1082: "k",
|
|
772
|
+
1083: "l",
|
|
773
|
+
1084: "m",
|
|
774
|
+
1085: "n",
|
|
775
|
+
1086: "o",
|
|
776
|
+
1087: "p",
|
|
777
|
+
1088: "r",
|
|
778
|
+
1089: "s",
|
|
779
|
+
1090: "t",
|
|
780
|
+
1091: "u",
|
|
781
|
+
1092: "f",
|
|
782
|
+
1093: "x",
|
|
783
|
+
1094: "cz",
|
|
784
|
+
1095: "ch",
|
|
785
|
+
1096: "sh",
|
|
786
|
+
1097: "shh",
|
|
787
|
+
1098: "``",
|
|
788
|
+
1099: "y`",
|
|
789
|
+
1100: "`",
|
|
790
|
+
1101: "e`",
|
|
791
|
+
1102: "yu",
|
|
792
|
+
1103: "ya",
|
|
793
|
+
1105: "yo",
|
|
794
|
+
1106: "dj",
|
|
795
|
+
1107: "g`",
|
|
796
|
+
1108: "ye",
|
|
797
|
+
1109: "z`",
|
|
798
|
+
1110: "i",
|
|
799
|
+
1111: "yi",
|
|
800
|
+
1112: "j",
|
|
801
|
+
1113: "l`",
|
|
802
|
+
1114: "n`",
|
|
803
|
+
1115: "tsh",
|
|
804
|
+
1116: "k`",
|
|
805
|
+
1118: "u`",
|
|
806
|
+
1119: "dh",
|
|
807
|
+
1130: "O`",
|
|
808
|
+
1131: "o`",
|
|
809
|
+
1138: "FH",
|
|
810
|
+
1139: "fh",
|
|
811
|
+
1140: "YH",
|
|
812
|
+
1141: "yh",
|
|
813
|
+
1164: "E`",
|
|
814
|
+
1165: "e`",
|
|
815
|
+
1168: "G`",
|
|
816
|
+
1169: "g`",
|
|
817
|
+
1170: "GH",
|
|
818
|
+
1171: "gh",
|
|
819
|
+
1172: "GH",
|
|
820
|
+
1173: "gh",
|
|
821
|
+
1174: "ZH`",
|
|
822
|
+
1175: "zh`",
|
|
823
|
+
1178: "K`",
|
|
824
|
+
1179: "k`",
|
|
825
|
+
1182: "K`",
|
|
826
|
+
1183: "k`",
|
|
827
|
+
1186: "N`",
|
|
828
|
+
1187: "n`",
|
|
829
|
+
1188: "NG",
|
|
830
|
+
1189: "ng",
|
|
831
|
+
1190: "P`",
|
|
832
|
+
1191: "p`",
|
|
833
|
+
1192: "O`",
|
|
834
|
+
1193: "o`",
|
|
835
|
+
1194: "C`",
|
|
836
|
+
1195: "C`",
|
|
837
|
+
1196: "T`",
|
|
838
|
+
1197: "t`",
|
|
839
|
+
1198: "U",
|
|
840
|
+
1199: "u",
|
|
841
|
+
1202: "H`",
|
|
842
|
+
1203: "h`",
|
|
843
|
+
1204: "TCZ",
|
|
844
|
+
1205: "tcz",
|
|
845
|
+
1210: "SH`",
|
|
846
|
+
1211: "sh`",
|
|
847
|
+
1212: "CH`",
|
|
848
|
+
1213: "ch`",
|
|
849
|
+
1214: "CH`",
|
|
850
|
+
1215: "ch`",
|
|
851
|
+
1216: "i",
|
|
852
|
+
1217: "ZH`",
|
|
853
|
+
1218: "zh`",
|
|
854
|
+
1227: "CH`",
|
|
855
|
+
1228: "ch`",
|
|
856
|
+
1232: "A`",
|
|
857
|
+
1233: "a`",
|
|
858
|
+
1234: "A`",
|
|
859
|
+
1235: "a`",
|
|
860
|
+
1238: "E`",
|
|
861
|
+
1239: "e`",
|
|
862
|
+
1240: "A`",
|
|
863
|
+
1241: "a`",
|
|
864
|
+
1244: "ZH`",
|
|
865
|
+
1245: "zh`",
|
|
866
|
+
1246: "Z`",
|
|
867
|
+
1247: "z`",
|
|
868
|
+
1248: "Z`",
|
|
869
|
+
1249: "z`",
|
|
870
|
+
1252: "I`",
|
|
871
|
+
1253: "i`",
|
|
872
|
+
1254: "O`",
|
|
873
|
+
1255: "o`",
|
|
874
|
+
1256: "O`",
|
|
875
|
+
1257: "o`",
|
|
876
|
+
1264: "U`",
|
|
877
|
+
1265: "u`",
|
|
878
|
+
1266: "U`",
|
|
879
|
+
1267: "u`",
|
|
880
|
+
1268: "CH`",
|
|
881
|
+
1269: "ch`",
|
|
882
|
+
1272: "Y`",
|
|
883
|
+
1273: "y`",
|
|
884
|
+
8194: " ",
|
|
885
|
+
8195: " ",
|
|
886
|
+
8196: " ",
|
|
887
|
+
8197: " ",
|
|
888
|
+
8198: " ",
|
|
889
|
+
8200: " ",
|
|
890
|
+
8201: " ",
|
|
891
|
+
8202: " ",
|
|
892
|
+
8203: "",
|
|
893
|
+
8208: "-",
|
|
894
|
+
8209: "-",
|
|
895
|
+
8210: "-",
|
|
896
|
+
8211: "-",
|
|
897
|
+
8212: "--",
|
|
898
|
+
8213: "-",
|
|
899
|
+
8216: "'",
|
|
900
|
+
8217: "'",
|
|
901
|
+
8218: ",",
|
|
902
|
+
8219: "'",
|
|
903
|
+
8220: '"',
|
|
904
|
+
8221: '"',
|
|
905
|
+
8222: ",,",
|
|
906
|
+
8223: '"',
|
|
907
|
+
8224: "+",
|
|
908
|
+
8226: "o",
|
|
909
|
+
8228: ".",
|
|
910
|
+
8229: "..",
|
|
911
|
+
8230: "...",
|
|
912
|
+
8239: " ",
|
|
913
|
+
8245: "`",
|
|
914
|
+
8246: "``",
|
|
915
|
+
8247: "```",
|
|
916
|
+
8249: "<",
|
|
917
|
+
8250: ">",
|
|
918
|
+
8252: "!!",
|
|
919
|
+
8260: "/",
|
|
920
|
+
8263: "??",
|
|
921
|
+
8264: "?!",
|
|
922
|
+
8265: "!?",
|
|
923
|
+
8287: " ",
|
|
924
|
+
8288: "",
|
|
925
|
+
8289: "",
|
|
926
|
+
8290: "",
|
|
927
|
+
8291: "",
|
|
928
|
+
8353: "C=",
|
|
929
|
+
8360: "Rs",
|
|
930
|
+
8364: "EUR",
|
|
931
|
+
8377: "INR",
|
|
932
|
+
8448: "a/c",
|
|
933
|
+
8449: "a/s",
|
|
934
|
+
8450: "C",
|
|
935
|
+
8453: "c/o",
|
|
936
|
+
8454: "c/u",
|
|
937
|
+
8458: "g",
|
|
938
|
+
8459: "H",
|
|
939
|
+
8460: "H",
|
|
940
|
+
8461: "H",
|
|
941
|
+
8462: "h",
|
|
942
|
+
8464: "I",
|
|
943
|
+
8465: "I",
|
|
944
|
+
8466: "L",
|
|
945
|
+
8467: "l",
|
|
946
|
+
8469: "N",
|
|
947
|
+
8470: "No",
|
|
948
|
+
8473: "P",
|
|
949
|
+
8474: "Q",
|
|
950
|
+
8475: "R",
|
|
951
|
+
8476: "R",
|
|
952
|
+
8477: "R",
|
|
953
|
+
8481: "TEL",
|
|
954
|
+
8482: "(TM)",
|
|
955
|
+
8484: "Z",
|
|
956
|
+
8486: "Ohm",
|
|
957
|
+
8488: "Z",
|
|
958
|
+
8492: "B",
|
|
959
|
+
8493: "C",
|
|
960
|
+
8494: "e",
|
|
961
|
+
8495: "e",
|
|
962
|
+
8496: "E",
|
|
963
|
+
8497: "F",
|
|
964
|
+
8499: "M",
|
|
965
|
+
8500: "o",
|
|
966
|
+
8505: "i",
|
|
967
|
+
8517: "D",
|
|
968
|
+
8518: "d",
|
|
969
|
+
8519: "e",
|
|
970
|
+
8520: "i",
|
|
971
|
+
8521: "j",
|
|
972
|
+
8531: " 1/3 ",
|
|
973
|
+
8532: " 2/3 ",
|
|
974
|
+
8533: " 1/5 ",
|
|
975
|
+
8534: " 2/5 ",
|
|
976
|
+
8535: " 3/5 ",
|
|
977
|
+
8536: " 4/5 ",
|
|
978
|
+
8537: " 1/6 ",
|
|
979
|
+
8538: " 5/6 ",
|
|
980
|
+
8539: " 1/8 ",
|
|
981
|
+
8540: " 3/8 ",
|
|
982
|
+
8541: " 5/8 ",
|
|
983
|
+
8542: " 7/8 ",
|
|
984
|
+
8543: " 1/",
|
|
985
|
+
8544: "I",
|
|
986
|
+
8545: "II",
|
|
987
|
+
8546: "III",
|
|
988
|
+
8547: "IV",
|
|
989
|
+
8548: "V",
|
|
990
|
+
8549: "VI",
|
|
991
|
+
8550: "VII",
|
|
992
|
+
8551: "VIII",
|
|
993
|
+
8552: "IX",
|
|
994
|
+
8553: "X",
|
|
995
|
+
8554: "XI",
|
|
996
|
+
8555: "XII",
|
|
997
|
+
8556: "L",
|
|
998
|
+
8557: "C",
|
|
999
|
+
8558: "D",
|
|
1000
|
+
8559: "M",
|
|
1001
|
+
8560: "i",
|
|
1002
|
+
8561: "ii",
|
|
1003
|
+
8562: "iii",
|
|
1004
|
+
8563: "iv",
|
|
1005
|
+
8564: "v",
|
|
1006
|
+
8565: "vi",
|
|
1007
|
+
8566: "vii",
|
|
1008
|
+
8567: "viii",
|
|
1009
|
+
8568: "ix",
|
|
1010
|
+
8569: "x",
|
|
1011
|
+
8570: "xi",
|
|
1012
|
+
8571: "xii",
|
|
1013
|
+
8572: "l",
|
|
1014
|
+
8573: "c",
|
|
1015
|
+
8574: "d",
|
|
1016
|
+
8575: "m",
|
|
1017
|
+
8592: "<-",
|
|
1018
|
+
8594: "->",
|
|
1019
|
+
8596: "<->",
|
|
1020
|
+
8656: "<=",
|
|
1021
|
+
8658: "=>",
|
|
1022
|
+
8660: "<=>",
|
|
1023
|
+
8722: "-",
|
|
1024
|
+
8725: "/",
|
|
1025
|
+
8726: "\\",
|
|
1026
|
+
8727: "*",
|
|
1027
|
+
8739: "|",
|
|
1028
|
+
8758: ":",
|
|
1029
|
+
8764: "~",
|
|
1030
|
+
8804: "<=",
|
|
1031
|
+
8805: ">=",
|
|
1032
|
+
8810: "<<",
|
|
1033
|
+
8811: ">>",
|
|
1034
|
+
8920: "<<<",
|
|
1035
|
+
8921: ">>>",
|
|
1036
|
+
9216: "NUL",
|
|
1037
|
+
9217: "SOH",
|
|
1038
|
+
9218: "STX",
|
|
1039
|
+
9219: "ETX",
|
|
1040
|
+
9220: "EOT",
|
|
1041
|
+
9221: "ENQ",
|
|
1042
|
+
9222: "ACK",
|
|
1043
|
+
9223: "BEL",
|
|
1044
|
+
9224: "BS",
|
|
1045
|
+
9225: "HT",
|
|
1046
|
+
9226: "LF",
|
|
1047
|
+
9227: "VT",
|
|
1048
|
+
9228: "FF",
|
|
1049
|
+
9229: "CR",
|
|
1050
|
+
9230: "SO",
|
|
1051
|
+
9231: "SI",
|
|
1052
|
+
9232: "DLE",
|
|
1053
|
+
9233: "DC1",
|
|
1054
|
+
9234: "DC2",
|
|
1055
|
+
9235: "DC3",
|
|
1056
|
+
9236: "DC4",
|
|
1057
|
+
9237: "NAK",
|
|
1058
|
+
9238: "SYN",
|
|
1059
|
+
9239: "ETB",
|
|
1060
|
+
9240: "CAN",
|
|
1061
|
+
9241: "EM",
|
|
1062
|
+
9242: "SUB",
|
|
1063
|
+
9243: "ESC",
|
|
1064
|
+
9244: "FS",
|
|
1065
|
+
9245: "GS",
|
|
1066
|
+
9246: "RS",
|
|
1067
|
+
9247: "US",
|
|
1068
|
+
9248: "SP",
|
|
1069
|
+
9249: "DEL",
|
|
1070
|
+
9251: "_",
|
|
1071
|
+
9252: "NL",
|
|
1072
|
+
9312: "(1)",
|
|
1073
|
+
9313: "(2)",
|
|
1074
|
+
9314: "(3)",
|
|
1075
|
+
9315: "(4)",
|
|
1076
|
+
9316: "(5)",
|
|
1077
|
+
9317: "(6)",
|
|
1078
|
+
9318: "(7)",
|
|
1079
|
+
9319: "(8)",
|
|
1080
|
+
9320: "(9)",
|
|
1081
|
+
9321: "(10)",
|
|
1082
|
+
9322: "(11)",
|
|
1083
|
+
9323: "(12)",
|
|
1084
|
+
9324: "(13)",
|
|
1085
|
+
9325: "(14)",
|
|
1086
|
+
9326: "(15)",
|
|
1087
|
+
9327: "(16)",
|
|
1088
|
+
9328: "(17)",
|
|
1089
|
+
9329: "(18)",
|
|
1090
|
+
9330: "(19)",
|
|
1091
|
+
9331: "(20)",
|
|
1092
|
+
9332: "(1)",
|
|
1093
|
+
9333: "(2)",
|
|
1094
|
+
9334: "(3)",
|
|
1095
|
+
9335: "(4)",
|
|
1096
|
+
9336: "(5)",
|
|
1097
|
+
9337: "(6)",
|
|
1098
|
+
9338: "(7)",
|
|
1099
|
+
9339: "(8)",
|
|
1100
|
+
9340: "(9)",
|
|
1101
|
+
9341: "(10)",
|
|
1102
|
+
9342: "(11)",
|
|
1103
|
+
9343: "(12)",
|
|
1104
|
+
9344: "(13)",
|
|
1105
|
+
9345: "(14)",
|
|
1106
|
+
9346: "(15)",
|
|
1107
|
+
9347: "(16)",
|
|
1108
|
+
9348: "(17)",
|
|
1109
|
+
9349: "(18)",
|
|
1110
|
+
9350: "(19)",
|
|
1111
|
+
9351: "(20)",
|
|
1112
|
+
9352: "1.",
|
|
1113
|
+
9353: "2.",
|
|
1114
|
+
9354: "3.",
|
|
1115
|
+
9355: "4.",
|
|
1116
|
+
9356: "5.",
|
|
1117
|
+
9357: "6.",
|
|
1118
|
+
9358: "7.",
|
|
1119
|
+
9359: "8.",
|
|
1120
|
+
9360: "9.",
|
|
1121
|
+
9361: "10.",
|
|
1122
|
+
9362: "11.",
|
|
1123
|
+
9363: "12.",
|
|
1124
|
+
9364: "13.",
|
|
1125
|
+
9365: "14.",
|
|
1126
|
+
9366: "15.",
|
|
1127
|
+
9367: "16.",
|
|
1128
|
+
9368: "17.",
|
|
1129
|
+
9369: "18.",
|
|
1130
|
+
9370: "19.",
|
|
1131
|
+
9371: "20.",
|
|
1132
|
+
9372: "(a)",
|
|
1133
|
+
9373: "(b)",
|
|
1134
|
+
9374: "(c)",
|
|
1135
|
+
9375: "(d)",
|
|
1136
|
+
9376: "(e)",
|
|
1137
|
+
9377: "(f)",
|
|
1138
|
+
9378: "(g)",
|
|
1139
|
+
9379: "(h)",
|
|
1140
|
+
9380: "(i)",
|
|
1141
|
+
9381: "(j)",
|
|
1142
|
+
9382: "(k)",
|
|
1143
|
+
9383: "(l)",
|
|
1144
|
+
9384: "(m)",
|
|
1145
|
+
9385: "(n)",
|
|
1146
|
+
9386: "(o)",
|
|
1147
|
+
9387: "(p)",
|
|
1148
|
+
9388: "(q)",
|
|
1149
|
+
9389: "(r)",
|
|
1150
|
+
9390: "(s)",
|
|
1151
|
+
9391: "(t)",
|
|
1152
|
+
9392: "(u)",
|
|
1153
|
+
9393: "(v)",
|
|
1154
|
+
9394: "(w)",
|
|
1155
|
+
9395: "(x)",
|
|
1156
|
+
9396: "(y)",
|
|
1157
|
+
9397: "(z)",
|
|
1158
|
+
9398: "(A)",
|
|
1159
|
+
9399: "(B)",
|
|
1160
|
+
9400: "(C)",
|
|
1161
|
+
9401: "(D)",
|
|
1162
|
+
9402: "(E)",
|
|
1163
|
+
9403: "(F)",
|
|
1164
|
+
9404: "(G)",
|
|
1165
|
+
9405: "(H)",
|
|
1166
|
+
9406: "(I)",
|
|
1167
|
+
9407: "(J)",
|
|
1168
|
+
9408: "(K)",
|
|
1169
|
+
9409: "(L)",
|
|
1170
|
+
9410: "(M)",
|
|
1171
|
+
9411: "(N)",
|
|
1172
|
+
9412: "(O)",
|
|
1173
|
+
9413: "(P)",
|
|
1174
|
+
9414: "(Q)",
|
|
1175
|
+
9415: "(R)",
|
|
1176
|
+
9416: "(S)",
|
|
1177
|
+
9417: "(T)",
|
|
1178
|
+
9418: "(U)",
|
|
1179
|
+
9419: "(V)",
|
|
1180
|
+
9420: "(W)",
|
|
1181
|
+
9421: "(X)",
|
|
1182
|
+
9422: "(Y)",
|
|
1183
|
+
9423: "(Z)",
|
|
1184
|
+
9424: "(a)",
|
|
1185
|
+
9425: "(b)",
|
|
1186
|
+
9426: "(c)",
|
|
1187
|
+
9427: "(d)",
|
|
1188
|
+
9428: "(e)",
|
|
1189
|
+
9429: "(f)",
|
|
1190
|
+
9430: "(g)",
|
|
1191
|
+
9431: "(h)",
|
|
1192
|
+
9432: "(i)",
|
|
1193
|
+
9433: "(j)",
|
|
1194
|
+
9434: "(k)",
|
|
1195
|
+
9435: "(l)",
|
|
1196
|
+
9436: "(m)",
|
|
1197
|
+
9437: "(n)",
|
|
1198
|
+
9438: "(o)",
|
|
1199
|
+
9439: "(p)",
|
|
1200
|
+
9440: "(q)",
|
|
1201
|
+
9441: "(r)",
|
|
1202
|
+
9442: "(s)",
|
|
1203
|
+
9443: "(t)",
|
|
1204
|
+
9444: "(u)",
|
|
1205
|
+
9445: "(v)",
|
|
1206
|
+
9446: "(w)",
|
|
1207
|
+
9447: "(x)",
|
|
1208
|
+
9448: "(y)",
|
|
1209
|
+
9449: "(z)",
|
|
1210
|
+
9450: "(0)",
|
|
1211
|
+
9472: "-",
|
|
1212
|
+
9474: "|",
|
|
1213
|
+
9484: "+",
|
|
1214
|
+
9488: "+",
|
|
1215
|
+
9492: "+",
|
|
1216
|
+
9496: "+",
|
|
1217
|
+
9500: "+",
|
|
1218
|
+
9508: "+",
|
|
1219
|
+
9516: "+",
|
|
1220
|
+
9524: "+",
|
|
1221
|
+
9532: "+",
|
|
1222
|
+
9702: "o",
|
|
1223
|
+
10868: "::=",
|
|
1224
|
+
10869: "==",
|
|
1225
|
+
10870: "===",
|
|
1226
|
+
12288: " ",
|
|
1227
|
+
12448: "=",
|
|
1228
|
+
12881: "(21)",
|
|
1229
|
+
12882: "(22)",
|
|
1230
|
+
12883: "(23)",
|
|
1231
|
+
12884: "(24)",
|
|
1232
|
+
12885: "(25)",
|
|
1233
|
+
12886: "(26)",
|
|
1234
|
+
12887: "(27)",
|
|
1235
|
+
12888: "(28)",
|
|
1236
|
+
12889: "(29)",
|
|
1237
|
+
12890: "(30)",
|
|
1238
|
+
12891: "(31)",
|
|
1239
|
+
12892: "(32)",
|
|
1240
|
+
12893: "(33)",
|
|
1241
|
+
12894: "(34)",
|
|
1242
|
+
12895: "(35)",
|
|
1243
|
+
12977: "(36)",
|
|
1244
|
+
12978: "(37)",
|
|
1245
|
+
12979: "(38)",
|
|
1246
|
+
12980: "(39)",
|
|
1247
|
+
12981: "(40)",
|
|
1248
|
+
12982: "(41)",
|
|
1249
|
+
12983: "(42)",
|
|
1250
|
+
12984: "(43)",
|
|
1251
|
+
12985: "(44)",
|
|
1252
|
+
12986: "(45)",
|
|
1253
|
+
12987: "(46)",
|
|
1254
|
+
12988: "(47)",
|
|
1255
|
+
12989: "(48)",
|
|
1256
|
+
12990: "(49)",
|
|
1257
|
+
12991: "(50)",
|
|
1258
|
+
13169: "hPa",
|
|
1259
|
+
13170: "da",
|
|
1260
|
+
13171: "AU",
|
|
1261
|
+
13172: "bar",
|
|
1262
|
+
13173: "oV",
|
|
1263
|
+
13174: "pc",
|
|
1264
|
+
13184: "pA",
|
|
1265
|
+
13185: "nA",
|
|
1266
|
+
13186: "uA",
|
|
1267
|
+
13187: "mA",
|
|
1268
|
+
13188: "kA",
|
|
1269
|
+
13189: "KB",
|
|
1270
|
+
13190: "MB",
|
|
1271
|
+
13191: "GB",
|
|
1272
|
+
13192: "cal",
|
|
1273
|
+
13193: "kcal",
|
|
1274
|
+
13194: "pF",
|
|
1275
|
+
13195: "nF",
|
|
1276
|
+
13196: "uF",
|
|
1277
|
+
13197: "ug",
|
|
1278
|
+
13198: "mg",
|
|
1279
|
+
13199: "kg",
|
|
1280
|
+
13200: "Hz",
|
|
1281
|
+
13201: "kHz",
|
|
1282
|
+
13202: "MHz",
|
|
1283
|
+
13203: "GHz",
|
|
1284
|
+
13204: "THz",
|
|
1285
|
+
13205: "ul",
|
|
1286
|
+
13206: "ml",
|
|
1287
|
+
13207: "dl",
|
|
1288
|
+
13208: "kl",
|
|
1289
|
+
13209: "fm",
|
|
1290
|
+
13210: "nm",
|
|
1291
|
+
13211: "um",
|
|
1292
|
+
13212: "mm",
|
|
1293
|
+
13213: "cm",
|
|
1294
|
+
13214: "km",
|
|
1295
|
+
13215: "mm^2",
|
|
1296
|
+
13216: "cm^2",
|
|
1297
|
+
13217: "m^2",
|
|
1298
|
+
13218: "km^2",
|
|
1299
|
+
13219: "mm^3",
|
|
1300
|
+
13220: "cm^3",
|
|
1301
|
+
13221: "m^3",
|
|
1302
|
+
13222: "km^3",
|
|
1303
|
+
13223: "m/s",
|
|
1304
|
+
13224: "m/s^2",
|
|
1305
|
+
13225: "Pa",
|
|
1306
|
+
13226: "kPa",
|
|
1307
|
+
13227: "MPa",
|
|
1308
|
+
13228: "GPa",
|
|
1309
|
+
13229: "rad",
|
|
1310
|
+
13230: "rad/s",
|
|
1311
|
+
13231: "rad/s^2",
|
|
1312
|
+
13232: "ps",
|
|
1313
|
+
13233: "ns",
|
|
1314
|
+
13234: "us",
|
|
1315
|
+
13235: "ms",
|
|
1316
|
+
13236: "pV",
|
|
1317
|
+
13237: "nV",
|
|
1318
|
+
13238: "uV",
|
|
1319
|
+
13239: "mV",
|
|
1320
|
+
13240: "kV",
|
|
1321
|
+
13241: "MV",
|
|
1322
|
+
13242: "pW",
|
|
1323
|
+
13243: "nW",
|
|
1324
|
+
13244: "uW",
|
|
1325
|
+
13245: "mW",
|
|
1326
|
+
13246: "kW",
|
|
1327
|
+
13247: "MW",
|
|
1328
|
+
13250: "a.m.",
|
|
1329
|
+
13251: "Bq",
|
|
1330
|
+
13252: "cc",
|
|
1331
|
+
13253: "cd",
|
|
1332
|
+
13254: "C/kg",
|
|
1333
|
+
13255: "Co.",
|
|
1334
|
+
13256: "dB",
|
|
1335
|
+
13257: "Gy",
|
|
1336
|
+
13258: "ha",
|
|
1337
|
+
13259: "HP",
|
|
1338
|
+
13260: "in",
|
|
1339
|
+
13261: "KK",
|
|
1340
|
+
13262: "KM",
|
|
1341
|
+
13263: "kt",
|
|
1342
|
+
13264: "lm",
|
|
1343
|
+
13265: "ln",
|
|
1344
|
+
13266: "log",
|
|
1345
|
+
13267: "lx",
|
|
1346
|
+
13268: "mb",
|
|
1347
|
+
13269: "mil",
|
|
1348
|
+
13270: "mol",
|
|
1349
|
+
13271: "PH",
|
|
1350
|
+
13272: "p.m.",
|
|
1351
|
+
13273: "PPM",
|
|
1352
|
+
13274: "PR",
|
|
1353
|
+
13275: "sr",
|
|
1354
|
+
13276: "Sv",
|
|
1355
|
+
13277: "Wb",
|
|
1356
|
+
64256: "ff",
|
|
1357
|
+
64257: "fi",
|
|
1358
|
+
64258: "fl",
|
|
1359
|
+
64259: "ffi",
|
|
1360
|
+
64260: "ffl",
|
|
1361
|
+
64262: "st",
|
|
1362
|
+
64297: "+",
|
|
1363
|
+
65024: "",
|
|
1364
|
+
65025: "",
|
|
1365
|
+
65026: "",
|
|
1366
|
+
65027: "",
|
|
1367
|
+
65028: "",
|
|
1368
|
+
65029: "",
|
|
1369
|
+
65030: "",
|
|
1370
|
+
65031: "",
|
|
1371
|
+
65032: "",
|
|
1372
|
+
65033: "",
|
|
1373
|
+
65034: "",
|
|
1374
|
+
65035: "",
|
|
1375
|
+
65036: "",
|
|
1376
|
+
65037: "",
|
|
1377
|
+
65038: "",
|
|
1378
|
+
65039: "",
|
|
1379
|
+
65101: "_",
|
|
1380
|
+
65102: "_",
|
|
1381
|
+
65103: "_",
|
|
1382
|
+
65104: ",",
|
|
1383
|
+
65106: ".",
|
|
1384
|
+
65108: ";",
|
|
1385
|
+
65109: ":",
|
|
1386
|
+
65111: "!",
|
|
1387
|
+
65113: "(",
|
|
1388
|
+
65114: ")",
|
|
1389
|
+
65115: "{",
|
|
1390
|
+
65116: "}",
|
|
1391
|
+
65119: "#",
|
|
1392
|
+
65120: "&",
|
|
1393
|
+
65121: "*",
|
|
1394
|
+
65122: "+",
|
|
1395
|
+
65123: "-",
|
|
1396
|
+
65124: "<",
|
|
1397
|
+
65125: ">",
|
|
1398
|
+
65126: "=",
|
|
1399
|
+
65128: "\\",
|
|
1400
|
+
65129: "$",
|
|
1401
|
+
65130: "%",
|
|
1402
|
+
65131: "@",
|
|
1403
|
+
65279: "",
|
|
1404
|
+
65281: "!",
|
|
1405
|
+
65282: '"',
|
|
1406
|
+
65283: "#",
|
|
1407
|
+
65284: "$",
|
|
1408
|
+
65285: "%",
|
|
1409
|
+
65286: "&",
|
|
1410
|
+
65287: "'",
|
|
1411
|
+
65288: "(",
|
|
1412
|
+
65289: ")",
|
|
1413
|
+
65290: "*",
|
|
1414
|
+
65291: "+",
|
|
1415
|
+
65292: ",",
|
|
1416
|
+
65293: "-",
|
|
1417
|
+
65294: ".",
|
|
1418
|
+
65295: "/",
|
|
1419
|
+
65296: "0",
|
|
1420
|
+
65297: "1",
|
|
1421
|
+
65298: "2",
|
|
1422
|
+
65299: "3",
|
|
1423
|
+
65300: "4",
|
|
1424
|
+
65301: "5",
|
|
1425
|
+
65302: "6",
|
|
1426
|
+
65303: "7",
|
|
1427
|
+
65304: "8",
|
|
1428
|
+
65305: "9",
|
|
1429
|
+
65306: ":",
|
|
1430
|
+
65307: ";",
|
|
1431
|
+
65308: "<",
|
|
1432
|
+
65309: "=",
|
|
1433
|
+
65310: ">",
|
|
1434
|
+
65312: "@",
|
|
1435
|
+
65313: "A",
|
|
1436
|
+
65314: "B",
|
|
1437
|
+
65315: "C",
|
|
1438
|
+
65316: "D",
|
|
1439
|
+
65317: "E",
|
|
1440
|
+
65318: "F",
|
|
1441
|
+
65319: "G",
|
|
1442
|
+
65320: "H",
|
|
1443
|
+
65321: "I",
|
|
1444
|
+
65322: "J",
|
|
1445
|
+
65323: "K",
|
|
1446
|
+
65324: "L",
|
|
1447
|
+
65325: "M",
|
|
1448
|
+
65326: "N",
|
|
1449
|
+
65327: "O",
|
|
1450
|
+
65328: "P",
|
|
1451
|
+
65329: "Q",
|
|
1452
|
+
65330: "R",
|
|
1453
|
+
65331: "S",
|
|
1454
|
+
65332: "T",
|
|
1455
|
+
65333: "U",
|
|
1456
|
+
65334: "V",
|
|
1457
|
+
65335: "W",
|
|
1458
|
+
65336: "X",
|
|
1459
|
+
65337: "Y",
|
|
1460
|
+
65338: "Z",
|
|
1461
|
+
65339: "[",
|
|
1462
|
+
65340: "\\",
|
|
1463
|
+
65341: "]",
|
|
1464
|
+
65342: "^",
|
|
1465
|
+
65343: "_",
|
|
1466
|
+
65344: "`",
|
|
1467
|
+
65345: "a",
|
|
1468
|
+
65346: "b",
|
|
1469
|
+
65347: "c",
|
|
1470
|
+
65348: "d",
|
|
1471
|
+
65349: "e",
|
|
1472
|
+
65350: "f",
|
|
1473
|
+
65351: "g",
|
|
1474
|
+
65352: "h",
|
|
1475
|
+
65353: "i",
|
|
1476
|
+
65354: "j",
|
|
1477
|
+
65355: "k",
|
|
1478
|
+
65356: "l",
|
|
1479
|
+
65357: "m",
|
|
1480
|
+
65358: "n",
|
|
1481
|
+
65359: "o",
|
|
1482
|
+
65360: "p",
|
|
1483
|
+
65361: "q",
|
|
1484
|
+
65362: "r",
|
|
1485
|
+
65363: "s",
|
|
1486
|
+
65364: "t",
|
|
1487
|
+
65365: "u",
|
|
1488
|
+
65366: "v",
|
|
1489
|
+
65367: "w",
|
|
1490
|
+
65368: "x",
|
|
1491
|
+
65369: "y",
|
|
1492
|
+
65370: "z",
|
|
1493
|
+
65371: "{",
|
|
1494
|
+
65372: "|",
|
|
1495
|
+
65373: "}",
|
|
1496
|
+
65374: "~",
|
|
1497
|
+
119808: "A",
|
|
1498
|
+
119809: "B",
|
|
1499
|
+
119810: "C",
|
|
1500
|
+
119811: "D",
|
|
1501
|
+
119812: "E",
|
|
1502
|
+
119813: "F",
|
|
1503
|
+
119814: "G",
|
|
1504
|
+
119815: "H",
|
|
1505
|
+
119816: "I",
|
|
1506
|
+
119817: "J",
|
|
1507
|
+
119818: "K",
|
|
1508
|
+
119819: "L",
|
|
1509
|
+
119820: "M",
|
|
1510
|
+
119821: "N",
|
|
1511
|
+
119822: "O",
|
|
1512
|
+
119823: "P",
|
|
1513
|
+
119824: "Q",
|
|
1514
|
+
119825: "R",
|
|
1515
|
+
119826: "S",
|
|
1516
|
+
119827: "T",
|
|
1517
|
+
119828: "U",
|
|
1518
|
+
119829: "V",
|
|
1519
|
+
119830: "W",
|
|
1520
|
+
119831: "X",
|
|
1521
|
+
119832: "Y",
|
|
1522
|
+
119833: "Z",
|
|
1523
|
+
119834: "a",
|
|
1524
|
+
119835: "b",
|
|
1525
|
+
119836: "c",
|
|
1526
|
+
119837: "d",
|
|
1527
|
+
119838: "e",
|
|
1528
|
+
119839: "f",
|
|
1529
|
+
119840: "g",
|
|
1530
|
+
119841: "h",
|
|
1531
|
+
119842: "i",
|
|
1532
|
+
119843: "j",
|
|
1533
|
+
119844: "k",
|
|
1534
|
+
119845: "l",
|
|
1535
|
+
119846: "m",
|
|
1536
|
+
119847: "n",
|
|
1537
|
+
119848: "o",
|
|
1538
|
+
119849: "p",
|
|
1539
|
+
119850: "q",
|
|
1540
|
+
119851: "r",
|
|
1541
|
+
119852: "s",
|
|
1542
|
+
119853: "t",
|
|
1543
|
+
119854: "u",
|
|
1544
|
+
119855: "v",
|
|
1545
|
+
119856: "w",
|
|
1546
|
+
119857: "x",
|
|
1547
|
+
119858: "y",
|
|
1548
|
+
119859: "z",
|
|
1549
|
+
119860: "A",
|
|
1550
|
+
119861: "B",
|
|
1551
|
+
119862: "C",
|
|
1552
|
+
119863: "D",
|
|
1553
|
+
119864: "E",
|
|
1554
|
+
119865: "F",
|
|
1555
|
+
119866: "G",
|
|
1556
|
+
119867: "H",
|
|
1557
|
+
119868: "I",
|
|
1558
|
+
119869: "J",
|
|
1559
|
+
119870: "K",
|
|
1560
|
+
119871: "L",
|
|
1561
|
+
119872: "M",
|
|
1562
|
+
119873: "N",
|
|
1563
|
+
119874: "O",
|
|
1564
|
+
119875: "P",
|
|
1565
|
+
119876: "Q",
|
|
1566
|
+
119877: "R",
|
|
1567
|
+
119878: "S",
|
|
1568
|
+
119879: "T",
|
|
1569
|
+
119880: "U",
|
|
1570
|
+
119881: "V",
|
|
1571
|
+
119882: "W",
|
|
1572
|
+
119883: "X",
|
|
1573
|
+
119884: "Y",
|
|
1574
|
+
119885: "Z",
|
|
1575
|
+
119886: "a",
|
|
1576
|
+
119887: "b",
|
|
1577
|
+
119888: "c",
|
|
1578
|
+
119889: "d",
|
|
1579
|
+
119890: "e",
|
|
1580
|
+
119891: "f",
|
|
1581
|
+
119892: "g",
|
|
1582
|
+
119894: "i",
|
|
1583
|
+
119895: "j",
|
|
1584
|
+
119896: "k",
|
|
1585
|
+
119897: "l",
|
|
1586
|
+
119898: "m",
|
|
1587
|
+
119899: "n",
|
|
1588
|
+
119900: "o",
|
|
1589
|
+
119901: "p",
|
|
1590
|
+
119902: "q",
|
|
1591
|
+
119903: "r",
|
|
1592
|
+
119904: "s",
|
|
1593
|
+
119905: "t",
|
|
1594
|
+
119906: "u",
|
|
1595
|
+
119907: "v",
|
|
1596
|
+
119908: "w",
|
|
1597
|
+
119909: "x",
|
|
1598
|
+
119910: "y",
|
|
1599
|
+
119911: "z",
|
|
1600
|
+
119912: "A",
|
|
1601
|
+
119913: "B",
|
|
1602
|
+
119914: "C",
|
|
1603
|
+
119915: "D",
|
|
1604
|
+
119916: "E",
|
|
1605
|
+
119917: "F",
|
|
1606
|
+
119918: "G",
|
|
1607
|
+
119919: "H",
|
|
1608
|
+
119920: "I",
|
|
1609
|
+
119921: "J",
|
|
1610
|
+
119922: "K",
|
|
1611
|
+
119923: "L",
|
|
1612
|
+
119924: "M",
|
|
1613
|
+
119925: "N",
|
|
1614
|
+
119926: "O",
|
|
1615
|
+
119927: "P",
|
|
1616
|
+
119928: "Q",
|
|
1617
|
+
119929: "R",
|
|
1618
|
+
119930: "S",
|
|
1619
|
+
119931: "T",
|
|
1620
|
+
119932: "U",
|
|
1621
|
+
119933: "V",
|
|
1622
|
+
119934: "W",
|
|
1623
|
+
119935: "X",
|
|
1624
|
+
119936: "Y",
|
|
1625
|
+
119937: "Z",
|
|
1626
|
+
119938: "a",
|
|
1627
|
+
119939: "b",
|
|
1628
|
+
119940: "c",
|
|
1629
|
+
119941: "d",
|
|
1630
|
+
119942: "e",
|
|
1631
|
+
119943: "f",
|
|
1632
|
+
119944: "g",
|
|
1633
|
+
119945: "h",
|
|
1634
|
+
119946: "i",
|
|
1635
|
+
119947: "j",
|
|
1636
|
+
119948: "k",
|
|
1637
|
+
119949: "l",
|
|
1638
|
+
119950: "m",
|
|
1639
|
+
119951: "n",
|
|
1640
|
+
119952: "o",
|
|
1641
|
+
119953: "p",
|
|
1642
|
+
119954: "q",
|
|
1643
|
+
119955: "r",
|
|
1644
|
+
119956: "s",
|
|
1645
|
+
119957: "t",
|
|
1646
|
+
119958: "u",
|
|
1647
|
+
119959: "v",
|
|
1648
|
+
119960: "w",
|
|
1649
|
+
119961: "x",
|
|
1650
|
+
119962: "y",
|
|
1651
|
+
119963: "z",
|
|
1652
|
+
119964: "A",
|
|
1653
|
+
119966: "C",
|
|
1654
|
+
119967: "D",
|
|
1655
|
+
119970: "G",
|
|
1656
|
+
119973: "J",
|
|
1657
|
+
119974: "K",
|
|
1658
|
+
119977: "N",
|
|
1659
|
+
119978: "O",
|
|
1660
|
+
119979: "P",
|
|
1661
|
+
119980: "Q",
|
|
1662
|
+
119982: "S",
|
|
1663
|
+
119983: "T",
|
|
1664
|
+
119984: "U",
|
|
1665
|
+
119985: "V",
|
|
1666
|
+
119986: "W",
|
|
1667
|
+
119987: "X",
|
|
1668
|
+
119988: "Y",
|
|
1669
|
+
119989: "Z",
|
|
1670
|
+
119990: "a",
|
|
1671
|
+
119991: "b",
|
|
1672
|
+
119992: "c",
|
|
1673
|
+
119993: "d",
|
|
1674
|
+
119995: "f",
|
|
1675
|
+
119997: "h",
|
|
1676
|
+
119998: "i",
|
|
1677
|
+
119999: "j",
|
|
1678
|
+
12e4: "k",
|
|
1679
|
+
120002: "m",
|
|
1680
|
+
120003: "n",
|
|
1681
|
+
120005: "p",
|
|
1682
|
+
120006: "q",
|
|
1683
|
+
120007: "r",
|
|
1684
|
+
120008: "s",
|
|
1685
|
+
120009: "t",
|
|
1686
|
+
120010: "u",
|
|
1687
|
+
120011: "v",
|
|
1688
|
+
120012: "w",
|
|
1689
|
+
120013: "x",
|
|
1690
|
+
120014: "y",
|
|
1691
|
+
120015: "z",
|
|
1692
|
+
120016: "A",
|
|
1693
|
+
120017: "B",
|
|
1694
|
+
120018: "C",
|
|
1695
|
+
120019: "D",
|
|
1696
|
+
120020: "E",
|
|
1697
|
+
120021: "F",
|
|
1698
|
+
120022: "G",
|
|
1699
|
+
120023: "H",
|
|
1700
|
+
120024: "I",
|
|
1701
|
+
120025: "J",
|
|
1702
|
+
120026: "K",
|
|
1703
|
+
120027: "L",
|
|
1704
|
+
120028: "M",
|
|
1705
|
+
120029: "N",
|
|
1706
|
+
120030: "O",
|
|
1707
|
+
120031: "P",
|
|
1708
|
+
120032: "Q",
|
|
1709
|
+
120033: "R",
|
|
1710
|
+
120034: "S",
|
|
1711
|
+
120035: "T",
|
|
1712
|
+
120036: "U",
|
|
1713
|
+
120037: "V",
|
|
1714
|
+
120038: "W",
|
|
1715
|
+
120039: "X",
|
|
1716
|
+
120040: "Y",
|
|
1717
|
+
120041: "Z",
|
|
1718
|
+
120042: "a",
|
|
1719
|
+
120043: "b",
|
|
1720
|
+
120044: "c",
|
|
1721
|
+
120045: "d",
|
|
1722
|
+
120046: "e",
|
|
1723
|
+
120047: "f",
|
|
1724
|
+
120048: "g",
|
|
1725
|
+
120049: "h",
|
|
1726
|
+
120050: "i",
|
|
1727
|
+
120051: "j",
|
|
1728
|
+
120052: "k",
|
|
1729
|
+
120053: "l",
|
|
1730
|
+
120054: "m",
|
|
1731
|
+
120055: "n",
|
|
1732
|
+
120056: "o",
|
|
1733
|
+
120057: "p",
|
|
1734
|
+
120058: "q",
|
|
1735
|
+
120059: "r",
|
|
1736
|
+
120060: "s",
|
|
1737
|
+
120061: "t",
|
|
1738
|
+
120062: "u",
|
|
1739
|
+
120063: "v",
|
|
1740
|
+
120064: "w",
|
|
1741
|
+
120065: "x",
|
|
1742
|
+
120066: "y",
|
|
1743
|
+
120067: "z",
|
|
1744
|
+
120068: "A",
|
|
1745
|
+
120069: "B",
|
|
1746
|
+
120071: "D",
|
|
1747
|
+
120072: "E",
|
|
1748
|
+
120073: "F",
|
|
1749
|
+
120074: "G",
|
|
1750
|
+
120077: "J",
|
|
1751
|
+
120078: "K",
|
|
1752
|
+
120079: "L",
|
|
1753
|
+
120080: "M",
|
|
1754
|
+
120081: "N",
|
|
1755
|
+
120082: "O",
|
|
1756
|
+
120083: "P",
|
|
1757
|
+
120084: "Q",
|
|
1758
|
+
120086: "S",
|
|
1759
|
+
120087: "T",
|
|
1760
|
+
120088: "U",
|
|
1761
|
+
120089: "V",
|
|
1762
|
+
120090: "W",
|
|
1763
|
+
120091: "X",
|
|
1764
|
+
120092: "Y",
|
|
1765
|
+
120094: "a",
|
|
1766
|
+
120095: "b",
|
|
1767
|
+
120096: "c",
|
|
1768
|
+
120097: "d",
|
|
1769
|
+
120098: "e",
|
|
1770
|
+
120099: "f",
|
|
1771
|
+
120100: "g",
|
|
1772
|
+
120101: "h",
|
|
1773
|
+
120102: "i",
|
|
1774
|
+
120103: "j",
|
|
1775
|
+
120104: "k",
|
|
1776
|
+
120105: "l",
|
|
1777
|
+
120106: "m",
|
|
1778
|
+
120107: "n",
|
|
1779
|
+
120108: "o",
|
|
1780
|
+
120109: "p",
|
|
1781
|
+
120110: "q",
|
|
1782
|
+
120111: "r",
|
|
1783
|
+
120112: "s",
|
|
1784
|
+
120113: "t",
|
|
1785
|
+
120114: "u",
|
|
1786
|
+
120115: "v",
|
|
1787
|
+
120116: "w",
|
|
1788
|
+
120117: "x",
|
|
1789
|
+
120118: "y",
|
|
1790
|
+
120119: "z",
|
|
1791
|
+
120120: "A",
|
|
1792
|
+
120121: "B",
|
|
1793
|
+
120123: "D",
|
|
1794
|
+
120124: "E",
|
|
1795
|
+
120125: "F",
|
|
1796
|
+
120126: "G",
|
|
1797
|
+
120128: "I",
|
|
1798
|
+
120129: "J",
|
|
1799
|
+
120130: "K",
|
|
1800
|
+
120131: "L",
|
|
1801
|
+
120132: "M",
|
|
1802
|
+
120134: "O",
|
|
1803
|
+
120138: "S",
|
|
1804
|
+
120139: "T",
|
|
1805
|
+
120140: "U",
|
|
1806
|
+
120141: "V",
|
|
1807
|
+
120142: "W",
|
|
1808
|
+
120143: "X",
|
|
1809
|
+
120144: "Y",
|
|
1810
|
+
120146: "a",
|
|
1811
|
+
120147: "b",
|
|
1812
|
+
120148: "c",
|
|
1813
|
+
120149: "d",
|
|
1814
|
+
120150: "e",
|
|
1815
|
+
120151: "f",
|
|
1816
|
+
120152: "g",
|
|
1817
|
+
120153: "h",
|
|
1818
|
+
120154: "i",
|
|
1819
|
+
120155: "j",
|
|
1820
|
+
120156: "k",
|
|
1821
|
+
120157: "l",
|
|
1822
|
+
120158: "m",
|
|
1823
|
+
120159: "n",
|
|
1824
|
+
120160: "o",
|
|
1825
|
+
120161: "p",
|
|
1826
|
+
120162: "q",
|
|
1827
|
+
120163: "r",
|
|
1828
|
+
120164: "s",
|
|
1829
|
+
120165: "t",
|
|
1830
|
+
120166: "u",
|
|
1831
|
+
120167: "v",
|
|
1832
|
+
120168: "w",
|
|
1833
|
+
120169: "x",
|
|
1834
|
+
120170: "y",
|
|
1835
|
+
120171: "z",
|
|
1836
|
+
120172: "A",
|
|
1837
|
+
120173: "B",
|
|
1838
|
+
120174: "C",
|
|
1839
|
+
120175: "D",
|
|
1840
|
+
120176: "E",
|
|
1841
|
+
120177: "F",
|
|
1842
|
+
120178: "G",
|
|
1843
|
+
120179: "H",
|
|
1844
|
+
120180: "I",
|
|
1845
|
+
120181: "J",
|
|
1846
|
+
120182: "K",
|
|
1847
|
+
120183: "L",
|
|
1848
|
+
120184: "M",
|
|
1849
|
+
120185: "N",
|
|
1850
|
+
120186: "O",
|
|
1851
|
+
120187: "P",
|
|
1852
|
+
120188: "Q",
|
|
1853
|
+
120189: "R",
|
|
1854
|
+
120190: "S",
|
|
1855
|
+
120191: "T",
|
|
1856
|
+
120192: "U",
|
|
1857
|
+
120193: "V",
|
|
1858
|
+
120194: "W",
|
|
1859
|
+
120195: "X",
|
|
1860
|
+
120196: "Y",
|
|
1861
|
+
120197: "Z",
|
|
1862
|
+
120198: "a",
|
|
1863
|
+
120199: "b",
|
|
1864
|
+
120200: "c",
|
|
1865
|
+
120201: "d",
|
|
1866
|
+
120202: "e",
|
|
1867
|
+
120203: "f",
|
|
1868
|
+
120204: "g",
|
|
1869
|
+
120205: "h",
|
|
1870
|
+
120206: "i",
|
|
1871
|
+
120207: "j",
|
|
1872
|
+
120208: "k",
|
|
1873
|
+
120209: "l",
|
|
1874
|
+
120210: "m",
|
|
1875
|
+
120211: "n",
|
|
1876
|
+
120212: "o",
|
|
1877
|
+
120213: "p",
|
|
1878
|
+
120214: "q",
|
|
1879
|
+
120215: "r",
|
|
1880
|
+
120216: "s",
|
|
1881
|
+
120217: "t",
|
|
1882
|
+
120218: "u",
|
|
1883
|
+
120219: "v",
|
|
1884
|
+
120220: "w",
|
|
1885
|
+
120221: "x",
|
|
1886
|
+
120222: "y",
|
|
1887
|
+
120223: "z",
|
|
1888
|
+
120224: "A",
|
|
1889
|
+
120225: "B",
|
|
1890
|
+
120226: "C",
|
|
1891
|
+
120227: "D",
|
|
1892
|
+
120228: "E",
|
|
1893
|
+
120229: "F",
|
|
1894
|
+
120230: "G",
|
|
1895
|
+
120231: "H",
|
|
1896
|
+
120232: "I",
|
|
1897
|
+
120233: "J",
|
|
1898
|
+
120234: "K",
|
|
1899
|
+
120235: "L",
|
|
1900
|
+
120236: "M",
|
|
1901
|
+
120237: "N",
|
|
1902
|
+
120238: "O",
|
|
1903
|
+
120239: "P",
|
|
1904
|
+
120240: "Q",
|
|
1905
|
+
120241: "R",
|
|
1906
|
+
120242: "S",
|
|
1907
|
+
120243: "T",
|
|
1908
|
+
120244: "U",
|
|
1909
|
+
120245: "V",
|
|
1910
|
+
120246: "W",
|
|
1911
|
+
120247: "X",
|
|
1912
|
+
120248: "Y",
|
|
1913
|
+
120249: "Z",
|
|
1914
|
+
120250: "a",
|
|
1915
|
+
120251: "b",
|
|
1916
|
+
120252: "c",
|
|
1917
|
+
120253: "d",
|
|
1918
|
+
120254: "e",
|
|
1919
|
+
120255: "f",
|
|
1920
|
+
120256: "g",
|
|
1921
|
+
120257: "h",
|
|
1922
|
+
120258: "i",
|
|
1923
|
+
120259: "j",
|
|
1924
|
+
120260: "k",
|
|
1925
|
+
120261: "l",
|
|
1926
|
+
120262: "m",
|
|
1927
|
+
120263: "n",
|
|
1928
|
+
120264: "o",
|
|
1929
|
+
120265: "p",
|
|
1930
|
+
120266: "q",
|
|
1931
|
+
120267: "r",
|
|
1932
|
+
120268: "s",
|
|
1933
|
+
120269: "t",
|
|
1934
|
+
120270: "u",
|
|
1935
|
+
120271: "v",
|
|
1936
|
+
120272: "w",
|
|
1937
|
+
120273: "x",
|
|
1938
|
+
120274: "y",
|
|
1939
|
+
120275: "z",
|
|
1940
|
+
120276: "A",
|
|
1941
|
+
120277: "B",
|
|
1942
|
+
120278: "C",
|
|
1943
|
+
120279: "D",
|
|
1944
|
+
120280: "E",
|
|
1945
|
+
120281: "F",
|
|
1946
|
+
120282: "G",
|
|
1947
|
+
120283: "H",
|
|
1948
|
+
120284: "I",
|
|
1949
|
+
120285: "J",
|
|
1950
|
+
120286: "K",
|
|
1951
|
+
120287: "L",
|
|
1952
|
+
120288: "M",
|
|
1953
|
+
120289: "N",
|
|
1954
|
+
120290: "O",
|
|
1955
|
+
120291: "P",
|
|
1956
|
+
120292: "Q",
|
|
1957
|
+
120293: "R",
|
|
1958
|
+
120294: "S",
|
|
1959
|
+
120295: "T",
|
|
1960
|
+
120296: "U",
|
|
1961
|
+
120297: "V",
|
|
1962
|
+
120298: "W",
|
|
1963
|
+
120299: "X",
|
|
1964
|
+
120300: "Y",
|
|
1965
|
+
120301: "Z",
|
|
1966
|
+
120302: "a",
|
|
1967
|
+
120303: "b",
|
|
1968
|
+
120304: "c",
|
|
1969
|
+
120305: "d",
|
|
1970
|
+
120306: "e",
|
|
1971
|
+
120307: "f",
|
|
1972
|
+
120308: "g",
|
|
1973
|
+
120309: "h",
|
|
1974
|
+
120310: "i",
|
|
1975
|
+
120311: "j",
|
|
1976
|
+
120312: "k",
|
|
1977
|
+
120313: "l",
|
|
1978
|
+
120314: "m",
|
|
1979
|
+
120315: "n",
|
|
1980
|
+
120316: "o",
|
|
1981
|
+
120317: "p",
|
|
1982
|
+
120318: "q",
|
|
1983
|
+
120319: "r",
|
|
1984
|
+
120320: "s",
|
|
1985
|
+
120321: "t",
|
|
1986
|
+
120322: "u",
|
|
1987
|
+
120323: "v",
|
|
1988
|
+
120324: "w",
|
|
1989
|
+
120325: "x",
|
|
1990
|
+
120326: "y",
|
|
1991
|
+
120327: "z",
|
|
1992
|
+
120328: "A",
|
|
1993
|
+
120329: "B",
|
|
1994
|
+
120330: "C",
|
|
1995
|
+
120331: "D",
|
|
1996
|
+
120332: "E",
|
|
1997
|
+
120333: "F",
|
|
1998
|
+
120334: "G",
|
|
1999
|
+
120335: "H",
|
|
2000
|
+
120336: "I",
|
|
2001
|
+
120337: "J",
|
|
2002
|
+
120338: "K",
|
|
2003
|
+
120339: "L",
|
|
2004
|
+
120340: "M",
|
|
2005
|
+
120341: "N",
|
|
2006
|
+
120342: "O",
|
|
2007
|
+
120343: "P",
|
|
2008
|
+
120344: "Q",
|
|
2009
|
+
120345: "R",
|
|
2010
|
+
120346: "S",
|
|
2011
|
+
120347: "T",
|
|
2012
|
+
120348: "U",
|
|
2013
|
+
120349: "V",
|
|
2014
|
+
120350: "W",
|
|
2015
|
+
120351: "X",
|
|
2016
|
+
120352: "Y",
|
|
2017
|
+
120353: "Z",
|
|
2018
|
+
120354: "a",
|
|
2019
|
+
120355: "b",
|
|
2020
|
+
120356: "c",
|
|
2021
|
+
120357: "d",
|
|
2022
|
+
120358: "e",
|
|
2023
|
+
120359: "f",
|
|
2024
|
+
120360: "g",
|
|
2025
|
+
120361: "h",
|
|
2026
|
+
120362: "i",
|
|
2027
|
+
120363: "j",
|
|
2028
|
+
120364: "k",
|
|
2029
|
+
120365: "l",
|
|
2030
|
+
120366: "m",
|
|
2031
|
+
120367: "n",
|
|
2032
|
+
120368: "o",
|
|
2033
|
+
120369: "p",
|
|
2034
|
+
120370: "q",
|
|
2035
|
+
120371: "r",
|
|
2036
|
+
120372: "s",
|
|
2037
|
+
120373: "t",
|
|
2038
|
+
120374: "u",
|
|
2039
|
+
120375: "v",
|
|
2040
|
+
120376: "w",
|
|
2041
|
+
120377: "x",
|
|
2042
|
+
120378: "y",
|
|
2043
|
+
120379: "z",
|
|
2044
|
+
120380: "A",
|
|
2045
|
+
120381: "B",
|
|
2046
|
+
120382: "C",
|
|
2047
|
+
120383: "D",
|
|
2048
|
+
120384: "E",
|
|
2049
|
+
120385: "F",
|
|
2050
|
+
120386: "G",
|
|
2051
|
+
120387: "H",
|
|
2052
|
+
120388: "I",
|
|
2053
|
+
120389: "J",
|
|
2054
|
+
120390: "K",
|
|
2055
|
+
120391: "L",
|
|
2056
|
+
120392: "M",
|
|
2057
|
+
120393: "N",
|
|
2058
|
+
120394: "O",
|
|
2059
|
+
120395: "P",
|
|
2060
|
+
120396: "Q",
|
|
2061
|
+
120397: "R",
|
|
2062
|
+
120398: "S",
|
|
2063
|
+
120399: "T",
|
|
2064
|
+
120400: "U",
|
|
2065
|
+
120401: "V",
|
|
2066
|
+
120402: "W",
|
|
2067
|
+
120403: "X",
|
|
2068
|
+
120404: "Y",
|
|
2069
|
+
120405: "Z",
|
|
2070
|
+
120406: "a",
|
|
2071
|
+
120407: "b",
|
|
2072
|
+
120408: "c",
|
|
2073
|
+
120409: "d",
|
|
2074
|
+
120410: "e",
|
|
2075
|
+
120411: "f",
|
|
2076
|
+
120412: "g",
|
|
2077
|
+
120413: "h",
|
|
2078
|
+
120414: "i",
|
|
2079
|
+
120415: "j",
|
|
2080
|
+
120416: "k",
|
|
2081
|
+
120417: "l",
|
|
2082
|
+
120418: "m",
|
|
2083
|
+
120419: "n",
|
|
2084
|
+
120420: "o",
|
|
2085
|
+
120421: "p",
|
|
2086
|
+
120422: "q",
|
|
2087
|
+
120423: "r",
|
|
2088
|
+
120424: "s",
|
|
2089
|
+
120425: "t",
|
|
2090
|
+
120426: "u",
|
|
2091
|
+
120427: "v",
|
|
2092
|
+
120428: "w",
|
|
2093
|
+
120429: "x",
|
|
2094
|
+
120430: "y",
|
|
2095
|
+
120431: "z",
|
|
2096
|
+
120432: "A",
|
|
2097
|
+
120433: "B",
|
|
2098
|
+
120434: "C",
|
|
2099
|
+
120435: "D",
|
|
2100
|
+
120436: "E",
|
|
2101
|
+
120437: "F",
|
|
2102
|
+
120438: "G",
|
|
2103
|
+
120439: "H",
|
|
2104
|
+
120440: "I",
|
|
2105
|
+
120441: "J",
|
|
2106
|
+
120442: "K",
|
|
2107
|
+
120443: "L",
|
|
2108
|
+
120444: "M",
|
|
2109
|
+
120445: "N",
|
|
2110
|
+
120446: "O",
|
|
2111
|
+
120447: "P",
|
|
2112
|
+
120448: "Q",
|
|
2113
|
+
120449: "R",
|
|
2114
|
+
120450: "S",
|
|
2115
|
+
120451: "T",
|
|
2116
|
+
120452: "U",
|
|
2117
|
+
120453: "V",
|
|
2118
|
+
120454: "W",
|
|
2119
|
+
120455: "X",
|
|
2120
|
+
120456: "Y",
|
|
2121
|
+
120457: "Z",
|
|
2122
|
+
120458: "a",
|
|
2123
|
+
120459: "b",
|
|
2124
|
+
120460: "c",
|
|
2125
|
+
120461: "d",
|
|
2126
|
+
120462: "e",
|
|
2127
|
+
120463: "f",
|
|
2128
|
+
120464: "g",
|
|
2129
|
+
120465: "h",
|
|
2130
|
+
120466: "i",
|
|
2131
|
+
120467: "j",
|
|
2132
|
+
120468: "k",
|
|
2133
|
+
120469: "l",
|
|
2134
|
+
120470: "m",
|
|
2135
|
+
120471: "n",
|
|
2136
|
+
120472: "o",
|
|
2137
|
+
120473: "p",
|
|
2138
|
+
120474: "q",
|
|
2139
|
+
120475: "r",
|
|
2140
|
+
120476: "s",
|
|
2141
|
+
120477: "t",
|
|
2142
|
+
120478: "u",
|
|
2143
|
+
120479: "v",
|
|
2144
|
+
120480: "w",
|
|
2145
|
+
120481: "x",
|
|
2146
|
+
120482: "y",
|
|
2147
|
+
120483: "z",
|
|
2148
|
+
120782: "0",
|
|
2149
|
+
120783: "1",
|
|
2150
|
+
120784: "2",
|
|
2151
|
+
120785: "3",
|
|
2152
|
+
120786: "4",
|
|
2153
|
+
120787: "5",
|
|
2154
|
+
120788: "6",
|
|
2155
|
+
120789: "7",
|
|
2156
|
+
120790: "8",
|
|
2157
|
+
120791: "9",
|
|
2158
|
+
120792: "0",
|
|
2159
|
+
120793: "1",
|
|
2160
|
+
120794: "2",
|
|
2161
|
+
120795: "3",
|
|
2162
|
+
120796: "4",
|
|
2163
|
+
120797: "5",
|
|
2164
|
+
120798: "6",
|
|
2165
|
+
120799: "7",
|
|
2166
|
+
120800: "8",
|
|
2167
|
+
120801: "9",
|
|
2168
|
+
120802: "0",
|
|
2169
|
+
120803: "1",
|
|
2170
|
+
120804: "2",
|
|
2171
|
+
120805: "3",
|
|
2172
|
+
120806: "4",
|
|
2173
|
+
120807: "5",
|
|
2174
|
+
120808: "6",
|
|
2175
|
+
120809: "7",
|
|
2176
|
+
120810: "8",
|
|
2177
|
+
120811: "9",
|
|
2178
|
+
120812: "0",
|
|
2179
|
+
120813: "1",
|
|
2180
|
+
120814: "2",
|
|
2181
|
+
120815: "3",
|
|
2182
|
+
120816: "4",
|
|
2183
|
+
120817: "5",
|
|
2184
|
+
120818: "6",
|
|
2185
|
+
120819: "7",
|
|
2186
|
+
120820: "8",
|
|
2187
|
+
120821: "9",
|
|
2188
|
+
120822: "0",
|
|
2189
|
+
120823: "1",
|
|
2190
|
+
120824: "2",
|
|
2191
|
+
120825: "3",
|
|
2192
|
+
120826: "4",
|
|
2193
|
+
120827: "5",
|
|
2194
|
+
120828: "6",
|
|
2195
|
+
120829: "7",
|
|
2196
|
+
120830: "8",
|
|
2197
|
+
120831: "9",
|
|
2198
|
+
917504: "",
|
|
2199
|
+
917505: "",
|
|
2200
|
+
917506: "",
|
|
2201
|
+
917507: "",
|
|
2202
|
+
917508: "",
|
|
2203
|
+
917509: "",
|
|
2204
|
+
917510: "",
|
|
2205
|
+
917511: "",
|
|
2206
|
+
917512: "",
|
|
2207
|
+
917513: "",
|
|
2208
|
+
917514: "",
|
|
2209
|
+
917515: "",
|
|
2210
|
+
917516: "",
|
|
2211
|
+
917517: "",
|
|
2212
|
+
917518: "",
|
|
2213
|
+
917519: "",
|
|
2214
|
+
917520: "",
|
|
2215
|
+
917521: "",
|
|
2216
|
+
917522: "",
|
|
2217
|
+
917523: "",
|
|
2218
|
+
917524: "",
|
|
2219
|
+
917525: "",
|
|
2220
|
+
917526: "",
|
|
2221
|
+
917527: "",
|
|
2222
|
+
917528: "",
|
|
2223
|
+
917529: "",
|
|
2224
|
+
917530: "",
|
|
2225
|
+
917531: "",
|
|
2226
|
+
917532: "",
|
|
2227
|
+
917533: "",
|
|
2228
|
+
917534: "",
|
|
2229
|
+
917535: "",
|
|
2230
|
+
917536: "",
|
|
2231
|
+
917537: "",
|
|
2232
|
+
917538: "",
|
|
2233
|
+
917539: "",
|
|
2234
|
+
917540: "",
|
|
2235
|
+
917541: "",
|
|
2236
|
+
917542: "",
|
|
2237
|
+
917543: "",
|
|
2238
|
+
917544: "",
|
|
2239
|
+
917545: "",
|
|
2240
|
+
917546: "",
|
|
2241
|
+
917547: "",
|
|
2242
|
+
917548: "",
|
|
2243
|
+
917549: "",
|
|
2244
|
+
917550: "",
|
|
2245
|
+
917551: "",
|
|
2246
|
+
917552: "",
|
|
2247
|
+
917553: "",
|
|
2248
|
+
917554: "",
|
|
2249
|
+
917555: "",
|
|
2250
|
+
917556: "",
|
|
2251
|
+
917557: "",
|
|
2252
|
+
917558: "",
|
|
2253
|
+
917559: "",
|
|
2254
|
+
917560: "",
|
|
2255
|
+
917561: "",
|
|
2256
|
+
917562: "",
|
|
2257
|
+
917563: "",
|
|
2258
|
+
917564: "",
|
|
2259
|
+
917565: "",
|
|
2260
|
+
917566: "",
|
|
2261
|
+
917567: "",
|
|
2262
|
+
917568: "",
|
|
2263
|
+
917569: "",
|
|
2264
|
+
917570: "",
|
|
2265
|
+
917571: "",
|
|
2266
|
+
917572: "",
|
|
2267
|
+
917573: "",
|
|
2268
|
+
917574: "",
|
|
2269
|
+
917575: "",
|
|
2270
|
+
917576: "",
|
|
2271
|
+
917577: "",
|
|
2272
|
+
917578: "",
|
|
2273
|
+
917579: "",
|
|
2274
|
+
917580: "",
|
|
2275
|
+
917581: "",
|
|
2276
|
+
917582: "",
|
|
2277
|
+
917583: "",
|
|
2278
|
+
917584: "",
|
|
2279
|
+
917585: "",
|
|
2280
|
+
917586: "",
|
|
2281
|
+
917587: "",
|
|
2282
|
+
917588: "",
|
|
2283
|
+
917589: "",
|
|
2284
|
+
917590: "",
|
|
2285
|
+
917591: "",
|
|
2286
|
+
917592: "",
|
|
2287
|
+
917593: "",
|
|
2288
|
+
917594: "",
|
|
2289
|
+
917595: "",
|
|
2290
|
+
917596: "",
|
|
2291
|
+
917597: "",
|
|
2292
|
+
917598: "",
|
|
2293
|
+
917599: "",
|
|
2294
|
+
917600: "",
|
|
2295
|
+
917601: "",
|
|
2296
|
+
917602: "",
|
|
2297
|
+
917603: "",
|
|
2298
|
+
917604: "",
|
|
2299
|
+
917605: "",
|
|
2300
|
+
917606: "",
|
|
2301
|
+
917607: "",
|
|
2302
|
+
917608: "",
|
|
2303
|
+
917609: "",
|
|
2304
|
+
917610: "",
|
|
2305
|
+
917611: "",
|
|
2306
|
+
917612: "",
|
|
2307
|
+
917613: "",
|
|
2308
|
+
917614: "",
|
|
2309
|
+
917615: "",
|
|
2310
|
+
917616: "",
|
|
2311
|
+
917617: "",
|
|
2312
|
+
917618: "",
|
|
2313
|
+
917619: "",
|
|
2314
|
+
917620: "",
|
|
2315
|
+
917621: "",
|
|
2316
|
+
917622: "",
|
|
2317
|
+
917623: "",
|
|
2318
|
+
917624: "",
|
|
2319
|
+
917625: "",
|
|
2320
|
+
917626: "",
|
|
2321
|
+
917627: "",
|
|
2322
|
+
917628: "",
|
|
2323
|
+
917629: "",
|
|
2324
|
+
917630: "",
|
|
2325
|
+
917631: ""
|
|
2326
|
+
});
|
|
2327
|
+
|
|
2328
|
+
// packages/safe-bash/src/commands/iconv/codec.ts
|
|
2329
|
+
function decode(input, offset, encoding2, swap) {
|
|
2330
|
+
const first = input[offset];
|
|
2331
|
+
if (encoding2 === "ascii") return first < 128 ? { count: 1, value: first } : { count: 1, error: "illegal" };
|
|
2332
|
+
if (encoding2 === "latin1") return { count: 1, value: first };
|
|
2333
|
+
if (encoding2 === "utf8") {
|
|
2334
|
+
if (first < 128) return { count: 1, value: first };
|
|
2335
|
+
let count = 0, value = 0;
|
|
2336
|
+
if (first >= 194 && first < 224) {
|
|
2337
|
+
count = 2;
|
|
2338
|
+
value = first & 31;
|
|
2339
|
+
} else if (first >= 224 && first < 240) {
|
|
2340
|
+
count = 3;
|
|
2341
|
+
value = first & 15;
|
|
2342
|
+
} else if (first >= 240 && first < 248) {
|
|
2343
|
+
count = 4;
|
|
2344
|
+
value = first & 7;
|
|
2345
|
+
} else if (first >= 248 && first < 252) {
|
|
2346
|
+
count = 5;
|
|
2347
|
+
value = first & 3;
|
|
2348
|
+
} else if (first >= 252 && first < 254) {
|
|
2349
|
+
count = 6;
|
|
2350
|
+
value = first & 1;
|
|
2351
|
+
} else {
|
|
2352
|
+
count = 1;
|
|
2353
|
+
while (count < 5 && offset + count < input.length && (input[offset + count] & 192) === 128) count++;
|
|
2354
|
+
return { count, error: "illegal" };
|
|
2355
|
+
}
|
|
2356
|
+
for (let index = 1; index < count; index++) {
|
|
2357
|
+
if (offset + index >= input.length) return { count: 0, error: "incomplete" };
|
|
2358
|
+
const byte = input[offset + index];
|
|
2359
|
+
if ((byte & 192) !== 128) return { count: index, error: "illegal" };
|
|
2360
|
+
value = value * 64 + (byte & 63);
|
|
2361
|
+
}
|
|
2362
|
+
if (count > 2 && value < 2 ** (5 * count - 4) || value >= 55296 && value <= 57343) return { count, error: "illegal" };
|
|
2363
|
+
return { count, value };
|
|
2364
|
+
}
|
|
2365
|
+
if (offset + 1 >= input.length) return { count: 0, error: "incomplete" };
|
|
2366
|
+
const big = encoding2 === "utf16be" || encoding2 === "utf16" && swap;
|
|
2367
|
+
const word = big ? first * 256 + input[offset + 1] : first + input[offset + 1] * 256;
|
|
2368
|
+
if (word < 55296 || word > 57343) return { count: 2, value: word };
|
|
2369
|
+
if (word >= 56320) return { count: 2, error: "illegal" };
|
|
2370
|
+
if (offset + 3 >= input.length) return { count: 0, error: "incomplete" };
|
|
2371
|
+
const next = big ? input[offset + 2] * 256 + input[offset + 3] : input[offset + 2] + input[offset + 3] * 256;
|
|
2372
|
+
if (next < 56320 || next > 57343) return { count: 2, error: "illegal" };
|
|
2373
|
+
return { count: 4, value: 65536 + (word - 55296) * 1024 + next - 56320 };
|
|
2374
|
+
}
|
|
2375
|
+
function encode(value, encoding2) {
|
|
2376
|
+
if (encoding2 === "ascii" || encoding2 === "latin1") {
|
|
2377
|
+
if (value < (encoding2 === "ascii" ? 128 : 256)) return [value];
|
|
2378
|
+
if (value >= 917504 && value <= 917631) return [];
|
|
2379
|
+
return void 0;
|
|
2380
|
+
}
|
|
2381
|
+
if (encoding2 === "utf8") {
|
|
2382
|
+
if (value < 128) return [value];
|
|
2383
|
+
let count = 2;
|
|
2384
|
+
while (count < 6 && value >= 2 ** (5 * count + 1)) count++;
|
|
2385
|
+
const result2 = new Array(count);
|
|
2386
|
+
for (let index = count - 1; index > 0; index--) {
|
|
2387
|
+
result2[index] = 128 | value & 63;
|
|
2388
|
+
value = Math.floor(value / 64);
|
|
2389
|
+
}
|
|
2390
|
+
result2[0] = 256 - 2 ** (8 - count) | value;
|
|
2391
|
+
return result2;
|
|
2392
|
+
}
|
|
2393
|
+
if (value > 1114111) return void 0;
|
|
2394
|
+
const words = value < 65536 ? [value] : [55296 + Math.floor((value - 65536) / 1024), 56320 + (value - 65536) % 1024];
|
|
2395
|
+
const result = [];
|
|
2396
|
+
for (const word of words) {
|
|
2397
|
+
if (encoding2 === "utf16be") result.push(word >> 8, word & 255);
|
|
2398
|
+
else result.push(word & 255, word >> 8);
|
|
2399
|
+
}
|
|
2400
|
+
return result;
|
|
2401
|
+
}
|
|
2402
|
+
async function convert(input, options, state, lifecycle) {
|
|
2403
|
+
const { budget } = lifecycle;
|
|
2404
|
+
budget.retain(32768 + 256);
|
|
2405
|
+
const buffer = new Uint8Array(32768);
|
|
2406
|
+
let used = 0, offset = 0, status = 0, batchCount = 0;
|
|
2407
|
+
let suppressed = false, targetSuppressed = false, started = false, firstTargetBatch = true;
|
|
2408
|
+
const flush = async () => {
|
|
2409
|
+
if (used) {
|
|
2410
|
+
await lifecycle.write(buffer.subarray(0, used));
|
|
2411
|
+
used = 0;
|
|
2412
|
+
status = 0;
|
|
2413
|
+
}
|
|
2414
|
+
};
|
|
2415
|
+
const flushFullOutput = async () => {
|
|
2416
|
+
await flush();
|
|
2417
|
+
batchCount = 1;
|
|
2418
|
+
suppressed = false;
|
|
2419
|
+
targetSuppressed = false;
|
|
2420
|
+
firstTargetBatch = false;
|
|
2421
|
+
};
|
|
2422
|
+
const append = async (bytes, transliterated = false) => {
|
|
2423
|
+
let recursiveBom = transliterated && firstTargetBatch && options.to === "utf16";
|
|
2424
|
+
if (buffer.length - used < bytes.length + (recursiveBom ? 2 : 0)) {
|
|
2425
|
+
await flushFullOutput();
|
|
2426
|
+
recursiveBom = false;
|
|
2427
|
+
}
|
|
2428
|
+
if (recursiveBom) {
|
|
2429
|
+
buffer[used++] = 255;
|
|
2430
|
+
buffer[used++] = 254;
|
|
2431
|
+
}
|
|
2432
|
+
buffer.set(bytes, used);
|
|
2433
|
+
used += bytes.length;
|
|
2434
|
+
};
|
|
2435
|
+
try {
|
|
2436
|
+
if (options.from === "utf16" && input.length >= 2) {
|
|
2437
|
+
if (input[0] === 254 && input[1] === 255) {
|
|
2438
|
+
state.swap = true;
|
|
2439
|
+
offset = 2;
|
|
2440
|
+
} else if (input[0] === 255 && input[1] === 254) offset = 2;
|
|
2441
|
+
}
|
|
2442
|
+
while (offset < input.length) {
|
|
2443
|
+
budget.charge(16);
|
|
2444
|
+
await budget.checkpointWork();
|
|
2445
|
+
const decoded = decode(input, offset, options.from, state.swap);
|
|
2446
|
+
let error;
|
|
2447
|
+
if ("error" in decoded) error = decoded.error;
|
|
2448
|
+
else {
|
|
2449
|
+
batchCount++;
|
|
2450
|
+
if (buffer.length - used < (options.to.startsWith("utf16") ? 2 : 1)) await flushFullOutput();
|
|
2451
|
+
if (!started && options.to === "utf16") await append([255, 254]);
|
|
2452
|
+
started = true;
|
|
2453
|
+
let bytes = encode(decoded.value, options.to);
|
|
2454
|
+
const transliterated = bytes === void 0 && options.transliterate;
|
|
2455
|
+
if (transliterated) {
|
|
2456
|
+
const replacement = Object.hasOwn(cTransliterations, decoded.value) ? cTransliterations[decoded.value] : "?";
|
|
2457
|
+
budget.charge(replacement.length + 1);
|
|
2458
|
+
bytes = [];
|
|
2459
|
+
for (const character of replacement) bytes.push(...encode(character.charCodeAt(0), options.to));
|
|
2460
|
+
}
|
|
2461
|
+
if (bytes === void 0) {
|
|
2462
|
+
error = "illegal";
|
|
2463
|
+
targetSuppressed = true;
|
|
2464
|
+
} else await append(bytes, transliterated);
|
|
2465
|
+
}
|
|
2466
|
+
if (error === "illegal" && options.discard) suppressed = true;
|
|
2467
|
+
else if (error) {
|
|
2468
|
+
await flush();
|
|
2469
|
+
await lifecycle.diagnostic(error === "illegal" ? `illegal input sequence at position ${offset}` : "incomplete character or shift sequence at end of buffer");
|
|
2470
|
+
return { status: 1, fatal: true };
|
|
2471
|
+
}
|
|
2472
|
+
offset += decoded.count;
|
|
2473
|
+
if (batchCount === 8160) {
|
|
2474
|
+
batchCount = 0;
|
|
2475
|
+
firstTargetBatch = false;
|
|
2476
|
+
if (targetSuppressed) {
|
|
2477
|
+
status = 1;
|
|
2478
|
+
await flush();
|
|
2479
|
+
suppressed = false;
|
|
2480
|
+
targetSuppressed = false;
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
}
|
|
2484
|
+
if (suppressed) status = 1;
|
|
2485
|
+
await flush();
|
|
2486
|
+
return { status, fatal: false };
|
|
2487
|
+
} finally {
|
|
2488
|
+
budget.retain(-32768 - 256);
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
|
|
2492
|
+
// packages/safe-bash/src/commands/iconv/command.ts
|
|
2493
|
+
async function transcode(options, lifecycle) {
|
|
2494
|
+
const state = { swap: false };
|
|
2495
|
+
let exitCode = 0, stdinUsed = false;
|
|
2496
|
+
for (const file of options.files) {
|
|
2497
|
+
if (file === "-" && stdinUsed) {
|
|
2498
|
+
await lifecycle.diagnostic("error while reading the input: Bad file descriptor");
|
|
2499
|
+
return 1;
|
|
2500
|
+
}
|
|
2501
|
+
if (file === "-") stdinUsed = true;
|
|
2502
|
+
const reader = new Reader(file, lifecycle);
|
|
2503
|
+
let fatal = false;
|
|
2504
|
+
try {
|
|
2505
|
+
await reader.open();
|
|
2506
|
+
const input = await reader.all();
|
|
2507
|
+
const result = await convert(input, options, state, lifecycle);
|
|
2508
|
+
exitCode ||= result.status;
|
|
2509
|
+
fatal = result.fatal;
|
|
2510
|
+
} catch (error) {
|
|
2511
|
+
lifecycle.budget.signal.throwIfAborted();
|
|
2512
|
+
if (!(error instanceof FsError)) throw error;
|
|
2513
|
+
exitCode = 1;
|
|
2514
|
+
fatal = reader.stage === "read";
|
|
2515
|
+
await lifecycle.diagnostic(fatal ? `error while reading the input: ${fsDetail(error)}` : `cannot open input file \`${file}': ${fsDetail(error)}`);
|
|
2516
|
+
}
|
|
2517
|
+
await lifecycle.operation(() => reader.close());
|
|
2518
|
+
if (fatal) break;
|
|
2519
|
+
}
|
|
2520
|
+
return exitCode;
|
|
2521
|
+
}
|
|
2522
|
+
async function execute(context, limits) {
|
|
2523
|
+
let lifecycle;
|
|
2524
|
+
const caller = context.signal;
|
|
2525
|
+
caller.throwIfAborted();
|
|
2526
|
+
const stdout = context.stdout;
|
|
2527
|
+
caller.throwIfAborted();
|
|
2528
|
+
const capability = stdout.ownedOutput;
|
|
2529
|
+
caller.throwIfAborted();
|
|
2530
|
+
const consumer = capability?.consumerClosed;
|
|
2531
|
+
caller.throwIfAborted();
|
|
2532
|
+
consumer?.throwIfAborted();
|
|
2533
|
+
const failureHandler = stdout[outputFailure];
|
|
2534
|
+
caller.throwIfAborted();
|
|
2535
|
+
consumer?.throwIfAborted();
|
|
2536
|
+
const registerCleanup = context.registerCleanup;
|
|
2537
|
+
caller.throwIfAborted();
|
|
2538
|
+
consumer?.throwIfAborted();
|
|
2539
|
+
const destination = capability ?? stdout;
|
|
2540
|
+
const write = async (value) => {
|
|
2541
|
+
lifecycle.assertOpen();
|
|
2542
|
+
const method = destination.write;
|
|
2543
|
+
lifecycle.assertOpen();
|
|
2544
|
+
await Reflect.apply(method, destination, [value]);
|
|
2545
|
+
};
|
|
2546
|
+
const captured = {
|
|
2547
|
+
write,
|
|
2548
|
+
...capability ? { ownedOutput: { consumerClosed: consumer, write } } : {},
|
|
2549
|
+
...failureHandler ? { [outputFailure]: failureHandler } : {}
|
|
2550
|
+
};
|
|
2551
|
+
const admission = { closed: false };
|
|
2552
|
+
const output = createOutputOperation({ signal: caller, ...registerCleanup ? { registerCleanup(cleanup) {
|
|
2553
|
+
caller.throwIfAborted();
|
|
2554
|
+
Reflect.apply(registerCleanup, context, [() => {
|
|
2555
|
+
admission.closed = true;
|
|
2556
|
+
return cleanup();
|
|
2557
|
+
}]);
|
|
2558
|
+
} } : {} }, captured);
|
|
2559
|
+
const budget = new Budget(context, limits, output.signal, caller, admission);
|
|
2560
|
+
let failure, primary;
|
|
2561
|
+
let exitCode = 0;
|
|
2562
|
+
try {
|
|
2563
|
+
lifecycle = new Lifecycle(budget, output, captured);
|
|
2564
|
+
exitCode = await transcode(parse(budget), lifecycle);
|
|
2565
|
+
} catch (error) {
|
|
2566
|
+
primary = { reason: error };
|
|
2567
|
+
if (error instanceof IconvError && !output.signal.aborted && lifecycle) {
|
|
2568
|
+
exitCode = error.status;
|
|
2569
|
+
try {
|
|
2570
|
+
await lifecycle.diagnostic(error.message);
|
|
2571
|
+
} catch (reporting) {
|
|
2572
|
+
failure = { reason: new AggregateError([error, reporting], "iconv failure reporting failed") };
|
|
2573
|
+
}
|
|
2574
|
+
} else failure = { reason: error };
|
|
2575
|
+
}
|
|
2576
|
+
try {
|
|
2577
|
+
await output.close();
|
|
2578
|
+
} catch (cleanup) {
|
|
2579
|
+
const previous = failure ?? primary;
|
|
2580
|
+
failure = { reason: previous ? new AggregateError([previous.reason, cleanup], "iconv execution and cleanup failed") : cleanup };
|
|
2581
|
+
}
|
|
2582
|
+
caller.throwIfAborted();
|
|
2583
|
+
output.signal.throwIfAborted();
|
|
2584
|
+
if (lifecycle?.diagnosticCancellation) throw lifecycle.diagnosticCancellation.reason;
|
|
2585
|
+
if (failure) throw failure.reason;
|
|
2586
|
+
return { exitCode };
|
|
2587
|
+
}
|
|
2588
|
+
function createIconvCommand(options = {}) {
|
|
2589
|
+
const limits = settings(options);
|
|
2590
|
+
return { name: "iconv", description: "Convert bytes between bounded ASCII, Latin-1, UTF-8 and UTF-16 encodings", execute: (context) => execute(context, limits) };
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2593
|
+
// packages/safe-bash/src/commands/iconv/index.ts
|
|
2594
|
+
function createIconvCommands(options = {}) {
|
|
2595
|
+
return [createIconvCommand(options)];
|
|
2596
|
+
}
|
|
2597
|
+
function iconvCommands(options = {}) {
|
|
2598
|
+
const commands = createIconvCommands(options);
|
|
2599
|
+
return { name: "iconv-commands", setup(host) {
|
|
2600
|
+
for (const command of commands) host.commands.register(command, { replace: options.replace ?? false });
|
|
2601
|
+
} };
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2604
|
+
export {
|
|
2605
|
+
createIconvCommand,
|
|
2606
|
+
createIconvCommands,
|
|
2607
|
+
iconvCommands
|
|
2608
|
+
};
|
|
2609
|
+
//# sourceMappingURL=chunk-A4UXQKWZ.js.map
|