xcstrings-cli 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +23 -0
  2. package/dist/index.js +1097 -1016
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,105 +1,105 @@
1
1
  #!/usr/bin/env node
2
- import Tr from "yargs";
3
- import { hideBin as Lr } from "yargs/helpers";
4
- import { resolve as Fe, relative as be } from "node:path";
5
- import { cosmiconfig as jr } from "cosmiconfig";
6
- import Be from "json5";
7
- import { select as Ir, checkbox as ln, confirm as Nr } from "@inquirer/prompts";
8
- import C from "chalk";
9
- import { readFile as Rr, writeFile as jn, readdir as In } from "node:fs/promises";
10
- import { XcodeProject as Mr } from "@bacons/xcode";
11
- const je = "xcstrings-cli", an = jr(je, {
2
+ import Lr from "yargs";
3
+ import { hideBin as jr } from "yargs/helpers";
4
+ import { resolve as Oe, relative as we } from "node:path";
5
+ import { cosmiconfig as Ir } from "cosmiconfig";
6
+ import De from "json5";
7
+ import { select as Nr, checkbox as on, confirm as Rr } from "@inquirer/prompts";
8
+ import k from "chalk";
9
+ import { readFile as Mr, writeFile as jn, readdir as In } from "node:fs/promises";
10
+ import { XcodeProject as Pr } from "@bacons/xcode";
11
+ const Le = "xcstrings-cli", ln = Ir(Le, {
12
12
  searchPlaces: [
13
- `${je}.json`,
14
- `${je}.json5`
13
+ `${Le}.json`,
14
+ `${Le}.json5`
15
15
  ],
16
16
  loaders: {
17
- ".json5": async (e, n) => Be.parse(n)
17
+ ".json5": async (e, n) => De.parse(n)
18
18
  },
19
19
  cache: !1
20
20
  });
21
- async function Ke(e) {
21
+ async function He(e) {
22
22
  if (e) {
23
- const r = await an.load(e);
23
+ const r = await ln.load(e);
24
24
  return r ? r.config : null;
25
25
  }
26
- const n = await an.search();
26
+ const n = await ln.search();
27
27
  return n ? n.config : null;
28
28
  }
29
- function cn(e, n) {
29
+ function an(e, n) {
30
30
  if (!e || e.length === 0) return null;
31
31
  for (const r of e)
32
32
  if (typeof r != "string" && r.alias === n)
33
33
  return r.path;
34
34
  return null;
35
35
  }
36
- async function Pr(e, n, r) {
37
- const i = n?.xcstringsPaths, t = i?.some((c) => typeof c != "string") ?? !1, l = e.startsWith("alias:") ? e.slice(6) : null;
38
- if (l) {
39
- const c = cn(i, l);
40
- if (!c)
41
- throw new Error(`Unknown alias: ${l}`);
42
- return c;
43
- }
44
- const o = cn(i, e);
45
- if (o)
46
- return o;
36
+ async function Dr(e, n, r) {
37
+ const i = n?.xcstringsPaths, t = i?.some((s) => typeof s != "string") ?? !1, o = e.startsWith("alias:") ? e.slice(6) : null;
38
+ if (o) {
39
+ const s = an(i, o);
40
+ if (!s)
41
+ throw new Error(`Unknown alias: ${o}`);
42
+ return s;
43
+ }
44
+ const l = an(i, e);
45
+ if (l)
46
+ return l;
47
47
  const a = !e.includes("/") && !e.endsWith(".xcstrings");
48
48
  if (t && a)
49
49
  throw new Error(`Unknown alias: ${e}`);
50
50
  if (e === r && i && i.length > 0) {
51
51
  if (i.length === 1) {
52
- const s = i[0];
53
- return typeof s == "string" ? s : s.path;
52
+ const u = i[0];
53
+ return typeof u == "string" ? u : u.path;
54
54
  }
55
- const c = i.map((s) => typeof s == "string" ? { name: s, value: s } : { name: `${s.alias} (${s.path})`, value: s.path });
56
- return await Ir({
55
+ const s = i.map((u) => typeof u == "string" ? { name: u, value: u } : { name: `${u.alias} (${u.path})`, value: u.path });
56
+ return await Nr({
57
57
  message: "Select xcstrings file:",
58
- choices: c
58
+ choices: s
59
59
  });
60
60
  }
61
61
  return e;
62
62
  }
63
63
  async function me(e) {
64
- const n = await Rr(e, "utf-8");
64
+ const n = await Mr(e, "utf-8");
65
65
  return JSON.parse(n);
66
66
  }
67
67
  async function Nn(e, n) {
68
- const r = JSON.stringify(n, null, 2), i = Dr(r);
68
+ const r = JSON.stringify(n, null, 2), i = Br(r);
69
69
  await jn(e, i + `
70
70
  `, "utf-8");
71
71
  }
72
- function Dr(e) {
72
+ function Br(e) {
73
73
  let n = "", r = !1, i = !1;
74
74
  for (let t = 0; t < e.length; t++) {
75
- const l = e[t];
76
- if (r && l === "\\" && !i) {
77
- i = !0, n += l;
75
+ const o = e[t];
76
+ if (r && o === "\\" && !i) {
77
+ i = !0, n += o;
78
78
  continue;
79
79
  }
80
80
  if (i) {
81
- i = !1, n += l;
81
+ i = !1, n += o;
82
82
  continue;
83
83
  }
84
- if (l === '"') {
85
- r = !r, n += l;
84
+ if (o === '"') {
85
+ r = !r, n += o;
86
86
  continue;
87
87
  }
88
- if (!r && l === ":") {
88
+ if (!r && o === ":") {
89
89
  n += " :";
90
90
  continue;
91
91
  }
92
- n += l;
92
+ n += o;
93
93
  }
94
94
  return n;
95
95
  }
96
- function Br(e) {
96
+ function $r(e) {
97
97
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
98
98
  }
99
- var ue = { exports: {} }, Ie, un;
99
+ var ce = { exports: {} }, je, sn;
100
100
  function Ur() {
101
- if (un) return Ie;
102
- un = 1;
101
+ if (sn) return je;
102
+ sn = 1;
103
103
  function e(r) {
104
104
  try {
105
105
  return JSON.stringify(r);
@@ -107,91 +107,91 @@ function Ur() {
107
107
  return '"[Circular]"';
108
108
  }
109
109
  }
110
- Ie = n;
110
+ je = n;
111
111
  function n(r, i, t) {
112
- var l = t && t.stringify || e, o = 1;
112
+ var o = t && t.stringify || e, l = 1;
113
113
  if (typeof r == "object" && r !== null) {
114
- var a = i.length + o;
114
+ var a = i.length + l;
115
115
  if (a === 1) return r;
116
- var c = new Array(a);
117
- c[0] = l(r);
118
- for (var u = 1; u < a; u++)
119
- c[u] = l(i[u]);
120
- return c.join(" ");
116
+ var s = new Array(a);
117
+ s[0] = o(r);
118
+ for (var c = 1; c < a; c++)
119
+ s[c] = o(i[c]);
120
+ return s.join(" ");
121
121
  }
122
122
  if (typeof r != "string")
123
123
  return r;
124
- var s = i.length;
125
- if (s === 0) return r;
126
- for (var f = "", g = 1 - o, h = -1, x = r && r.length || 0, d = 0; d < x; ) {
127
- if (r.charCodeAt(d) === 37 && d + 1 < x) {
128
- switch (h = h > -1 ? h : 0, r.charCodeAt(d + 1)) {
124
+ var u = i.length;
125
+ if (u === 0) return r;
126
+ for (var f = "", h = 1 - l, d = -1, m = r && r.length || 0, g = 0; g < m; ) {
127
+ if (r.charCodeAt(g) === 37 && g + 1 < m) {
128
+ switch (d = d > -1 ? d : 0, r.charCodeAt(g + 1)) {
129
129
  case 100:
130
130
  // 'd'
131
131
  case 102:
132
- if (g >= s || i[g] == null) break;
133
- h < d && (f += r.slice(h, d)), f += Number(i[g]), h = d + 2, d++;
132
+ if (h >= u || i[h] == null) break;
133
+ d < g && (f += r.slice(d, g)), f += Number(i[h]), d = g + 2, g++;
134
134
  break;
135
135
  case 105:
136
- if (g >= s || i[g] == null) break;
137
- h < d && (f += r.slice(h, d)), f += Math.floor(Number(i[g])), h = d + 2, d++;
136
+ if (h >= u || i[h] == null) break;
137
+ d < g && (f += r.slice(d, g)), f += Math.floor(Number(i[h])), d = g + 2, g++;
138
138
  break;
139
139
  case 79:
140
140
  // 'O'
141
141
  case 111:
142
142
  // 'o'
143
143
  case 106:
144
- if (g >= s || i[g] === void 0) break;
145
- h < d && (f += r.slice(h, d));
146
- var A = typeof i[g];
147
- if (A === "string") {
148
- f += "'" + i[g] + "'", h = d + 2, d++;
144
+ if (h >= u || i[h] === void 0) break;
145
+ d < g && (f += r.slice(d, g));
146
+ var b = typeof i[h];
147
+ if (b === "string") {
148
+ f += "'" + i[h] + "'", d = g + 2, g++;
149
149
  break;
150
150
  }
151
- if (A === "function") {
152
- f += i[g].name || "<anonymous>", h = d + 2, d++;
151
+ if (b === "function") {
152
+ f += i[h].name || "<anonymous>", d = g + 2, g++;
153
153
  break;
154
154
  }
155
- f += l(i[g]), h = d + 2, d++;
155
+ f += o(i[h]), d = g + 2, g++;
156
156
  break;
157
157
  case 115:
158
- if (g >= s)
158
+ if (h >= u)
159
159
  break;
160
- h < d && (f += r.slice(h, d)), f += String(i[g]), h = d + 2, d++;
160
+ d < g && (f += r.slice(d, g)), f += String(i[h]), d = g + 2, g++;
161
161
  break;
162
162
  case 37:
163
- h < d && (f += r.slice(h, d)), f += "%", h = d + 2, d++, g--;
163
+ d < g && (f += r.slice(d, g)), f += "%", d = g + 2, g++, h--;
164
164
  break;
165
165
  }
166
- ++g;
166
+ ++h;
167
167
  }
168
- ++d;
168
+ ++g;
169
169
  }
170
- return h === -1 ? r : (h < x && (f += r.slice(h)), f);
170
+ return d === -1 ? r : (d < m && (f += r.slice(d)), f);
171
171
  }
172
- return Ie;
172
+ return je;
173
173
  }
174
- var sn;
175
- function Yr() {
176
- if (sn) return ue.exports;
177
- sn = 1;
174
+ var cn;
175
+ function zr() {
176
+ if (cn) return ce.exports;
177
+ cn = 1;
178
178
  const e = Ur();
179
- ue.exports = s;
180
- const n = kr().console || {}, r = {
181
- mapHttpRequest: X,
182
- mapHttpResponse: X,
179
+ ce.exports = u;
180
+ const n = Or().console || {}, r = {
181
+ mapHttpRequest: Q,
182
+ mapHttpResponse: Q,
183
183
  wrapRequestSerializer: B,
184
184
  wrapResponseSerializer: B,
185
185
  wrapErrorSerializer: B,
186
- req: X,
187
- res: X,
188
- err: Y,
189
- errWithCause: Y
186
+ req: Q,
187
+ res: Q,
188
+ err: U,
189
+ errWithCause: U
190
190
  };
191
- function i(p, m) {
192
- return p === "silent" ? 1 / 0 : m.levels.values[p];
191
+ function i(p, y) {
192
+ return p === "silent" ? 1 / 0 : y.levels.values[p];
193
193
  }
194
- const t = Symbol("pino.logFuncs"), l = Symbol("pino.hierarchy"), o = {
194
+ const t = Symbol("pino.logFuncs"), o = Symbol("pino.hierarchy"), l = {
195
195
  error: "log",
196
196
  fatal: "error",
197
197
  warn: "error",
@@ -199,101 +199,101 @@ function Yr() {
199
199
  debug: "log",
200
200
  trace: "log"
201
201
  };
202
- function a(p, m) {
203
- const w = {
204
- logger: m,
205
- parent: p[l]
202
+ function a(p, y) {
203
+ const A = {
204
+ logger: y,
205
+ parent: p[o]
206
206
  };
207
- m[l] = w;
207
+ y[o] = A;
208
208
  }
209
- function c(p, m, w) {
210
- const S = {};
211
- m.forEach((_) => {
212
- S[_] = w[_] ? w[_] : n[_] || n[o[_] || "log"] || ce;
213
- }), p[t] = S;
209
+ function s(p, y, A) {
210
+ const E = {};
211
+ y.forEach((S) => {
212
+ E[S] = A[S] ? A[S] : n[S] || n[l[S] || "log"] || se;
213
+ }), p[t] = E;
214
214
  }
215
- function u(p, m) {
216
- return Array.isArray(p) ? p.filter(function(S) {
217
- return S !== "!stdSerializers.err";
218
- }) : p === !0 ? Object.keys(m) : !1;
215
+ function c(p, y) {
216
+ return Array.isArray(p) ? p.filter(function(E) {
217
+ return E !== "!stdSerializers.err";
218
+ }) : p === !0 ? Object.keys(y) : !1;
219
219
  }
220
- function s(p) {
220
+ function u(p) {
221
221
  p = p || {}, p.browser = p.browser || {};
222
- const m = p.browser.transmit;
223
- if (m && typeof m.send != "function")
222
+ const y = p.browser.transmit;
223
+ if (y && typeof y.send != "function")
224
224
  throw Error("pino: transmit option must have a send function");
225
- const w = p.browser.write || n;
225
+ const A = p.browser.write || n;
226
226
  p.browser.write && (p.browser.asObject = !0);
227
- const S = p.serializers || {}, _ = u(p.browser.serialize, S);
227
+ const E = p.serializers || {}, S = c(p.browser.serialize, E);
228
228
  let M = p.browser.serialize;
229
229
  Array.isArray(p.browser.serialize) && p.browser.serialize.indexOf("!stdSerializers.err") > -1 && (M = !1);
230
- const $ = Object.keys(p.customLevels || {}), k = ["error", "fatal", "warn", "info", "debug", "trace"].concat($);
231
- typeof w == "function" && k.forEach(function(P) {
232
- w[P] = w;
230
+ const H = Object.keys(p.customLevels || {}), _ = ["error", "fatal", "warn", "info", "debug", "trace"].concat(H);
231
+ typeof A == "function" && _.forEach(function(P) {
232
+ A[P] = A;
233
233
  }), (p.enabled === !1 || p.browser.disabled) && (p.level = "silent");
234
- const j = p.level || "info", b = Object.create(w);
235
- b.log || (b.log = ce), c(b, k, w), a({}, b), Object.defineProperty(b, "levelVal", {
236
- get: xe
237
- }), Object.defineProperty(b, "level", {
238
- get: Q,
239
- set: Or
234
+ const j = p.level || "info", w = Object.create(A);
235
+ w.log || (w.log = se), s(w, _, A), a({}, w), Object.defineProperty(w, "levelVal", {
236
+ get: ve
237
+ }), Object.defineProperty(w, "level", {
238
+ get: J,
239
+ set: Fr
240
240
  });
241
- const U = {
242
- transmit: m,
243
- serialize: _,
241
+ const $ = {
242
+ transmit: y,
243
+ serialize: S,
244
244
  asObject: p.browser.asObject,
245
245
  formatters: p.browser.formatters,
246
- levels: k,
246
+ levels: _,
247
247
  timestamp: ae(p)
248
248
  };
249
- b.levels = f(p), b.level = j, b.setMaxListeners = b.getMaxListeners = b.emit = b.addListener = b.on = b.prependListener = b.once = b.prependOnceListener = b.removeListener = b.removeAllListeners = b.listeners = b.listenerCount = b.eventNames = b.write = b.flush = ce, b.serializers = S, b._serialize = _, b._stdErrSerialize = M, b.child = Fr, m && (b._logEvent = W());
250
- function xe() {
249
+ w.levels = f(p), w.level = j, w.setMaxListeners = w.getMaxListeners = w.emit = w.addListener = w.on = w.prependListener = w.once = w.prependOnceListener = w.removeListener = w.removeAllListeners = w.listeners = w.listenerCount = w.eventNames = w.write = w.flush = se, w.serializers = E, w._serialize = S, w._stdErrSerialize = M, w.child = Tr, y && (w._logEvent = Y());
250
+ function ve() {
251
251
  return i(this.level, this);
252
252
  }
253
- function Q() {
253
+ function J() {
254
254
  return this._level;
255
255
  }
256
- function Or(P) {
256
+ function Fr(P) {
257
257
  if (P !== "silent" && !this.levels.values[P])
258
258
  throw Error("unknown level " + P);
259
- this._level = P, x(this, U, b, "error"), x(this, U, b, "fatal"), x(this, U, b, "warn"), x(this, U, b, "info"), x(this, U, b, "debug"), x(this, U, b, "trace"), $.forEach((J) => {
260
- x(this, U, b, J);
259
+ this._level = P, m(this, $, w, "error"), m(this, $, w, "fatal"), m(this, $, w, "warn"), m(this, $, w, "info"), m(this, $, w, "debug"), m(this, $, w, "trace"), H.forEach((Z) => {
260
+ m(this, $, w, Z);
261
261
  });
262
262
  }
263
- function Fr(P, J) {
263
+ function Tr(P, Z) {
264
264
  if (!P)
265
265
  throw new Error("missing bindings for child Pino");
266
- J = J || {}, _ && P.serializers && (J.serializers = P.serializers);
267
- const nn = J.serializers;
268
- if (_ && nn) {
269
- var ve = Object.assign({}, S, nn), rn = p.browser.serialize === !0 ? Object.keys(ve) : _;
270
- delete P.serializers, v([P], rn, ve, this._stdErrSerialize);
266
+ Z = Z || {}, S && P.serializers && (Z.serializers = P.serializers);
267
+ const en = Z.serializers;
268
+ if (S && en) {
269
+ var xe = Object.assign({}, E, en), nn = p.browser.serialize === !0 ? Object.keys(xe) : S;
270
+ delete P.serializers, x([P], nn, xe, this._stdErrSerialize);
271
271
  }
272
- function tn(on) {
273
- this._childLevel = (on._childLevel | 0) + 1, this.bindings = P, ve && (this.serializers = ve, this._serialize = rn), m && (this._logEvent = W(
274
- [].concat(on._logEvent.bindings, P)
272
+ function rn(tn) {
273
+ this._childLevel = (tn._childLevel | 0) + 1, this.bindings = P, xe && (this.serializers = xe, this._serialize = nn), y && (this._logEvent = Y(
274
+ [].concat(tn._logEvent.bindings, P)
275
275
  ));
276
276
  }
277
- tn.prototype = this;
278
- const Le = new tn(this);
279
- return a(this, Le), Le.level = this.level, Le;
277
+ rn.prototype = this;
278
+ const Te = new rn(this);
279
+ return a(this, Te), Te.level = this.level, Te;
280
280
  }
281
- return b;
281
+ return w;
282
282
  }
283
283
  function f(p) {
284
- const m = p.customLevels || {}, w = Object.assign({}, s.levels.values, m), S = Object.assign({}, s.levels.labels, g(m));
284
+ const y = p.customLevels || {}, A = Object.assign({}, u.levels.values, y), E = Object.assign({}, u.levels.labels, h(y));
285
285
  return {
286
- values: w,
287
- labels: S
286
+ values: A,
287
+ labels: E
288
288
  };
289
289
  }
290
- function g(p) {
291
- const m = {};
292
- return Object.keys(p).forEach(function(w) {
293
- m[p[w]] = w;
294
- }), m;
290
+ function h(p) {
291
+ const y = {};
292
+ return Object.keys(p).forEach(function(A) {
293
+ y[p[A]] = A;
294
+ }), y;
295
295
  }
296
- s.levels = {
296
+ u.levels = {
297
297
  values: {
298
298
  fatal: 60,
299
299
  error: 50,
@@ -310,90 +310,90 @@ function Yr() {
310
310
  50: "error",
311
311
  60: "fatal"
312
312
  }
313
- }, s.stdSerializers = r, s.stdTimeFunctions = Object.assign({}, { nullTime: Ze, epochTime: en, unixTime: Sr, isoTime: _r });
314
- function h(p) {
315
- const m = [];
316
- p.bindings && m.push(p.bindings);
317
- let w = p[l];
318
- for (; w.parent; )
319
- w = w.parent, w.logger.bindings && m.push(w.logger.bindings);
320
- return m.reverse();
321
- }
322
- function x(p, m, w, S) {
323
- if (Object.defineProperty(p, S, {
324
- value: i(p.level, w) > i(S, w) ? ce : w[t][S],
313
+ }, u.stdSerializers = r, u.stdTimeFunctions = Object.assign({}, { nullTime: Je, epochTime: Ze, unixTime: Sr, isoTime: _r });
314
+ function d(p) {
315
+ const y = [];
316
+ p.bindings && y.push(p.bindings);
317
+ let A = p[o];
318
+ for (; A.parent; )
319
+ A = A.parent, A.logger.bindings && y.push(A.logger.bindings);
320
+ return y.reverse();
321
+ }
322
+ function m(p, y, A, E) {
323
+ if (Object.defineProperty(p, E, {
324
+ value: i(p.level, A) > i(E, A) ? se : A[t][E],
325
325
  writable: !0,
326
326
  enumerable: !0,
327
327
  configurable: !0
328
- }), !m.transmit && p[S] === ce)
328
+ }), !y.transmit && p[E] === se)
329
329
  return;
330
- p[S] = A(p, m, w, S);
331
- const _ = h(p);
332
- _.length !== 0 && (p[S] = d(_, p[S]));
330
+ p[E] = b(p, y, A, E);
331
+ const S = d(p);
332
+ S.length !== 0 && (p[E] = g(S, p[E]));
333
333
  }
334
- function d(p, m) {
334
+ function g(p, y) {
335
335
  return function() {
336
- return m.apply(this, [...p, ...arguments]);
336
+ return y.apply(this, [...p, ...arguments]);
337
337
  };
338
338
  }
339
- function A(p, m, w, S) {
340
- return /* @__PURE__ */ (function(_) {
339
+ function b(p, y, A, E) {
340
+ return /* @__PURE__ */ (function(S) {
341
341
  return function() {
342
- const $ = m.timestamp(), k = new Array(arguments.length), j = Object.getPrototypeOf && Object.getPrototypeOf(this) === n ? n : this;
343
- for (var b = 0; b < k.length; b++) k[b] = arguments[b];
344
- if (m.serialize && !m.asObject && v(k, this._serialize, this.serializers, this._stdErrSerialize), m.asObject || m.formatters ? _.call(j, E(this, S, k, $, m.formatters)) : _.apply(j, k), m.transmit) {
345
- const U = m.transmit.level || p._level, xe = w.levels.values[U], Q = w.levels.values[S];
346
- if (Q < xe) return;
347
- K(this, {
348
- ts: $,
349
- methodLevel: S,
350
- methodValue: Q,
351
- transmitValue: w.levels.values[m.transmit.level || p._level],
352
- send: m.transmit.send,
353
- val: i(p._level, w)
354
- }, k);
342
+ const H = y.timestamp(), _ = new Array(arguments.length), j = Object.getPrototypeOf && Object.getPrototypeOf(this) === n ? n : this;
343
+ for (var w = 0; w < _.length; w++) _[w] = arguments[w];
344
+ if (y.serialize && !y.asObject && x(_, this._serialize, this.serializers, this._stdErrSerialize), y.asObject || y.formatters ? S.call(j, C(this, E, _, H, y.formatters)) : S.apply(j, _), y.transmit) {
345
+ const $ = y.transmit.level || p._level, ve = A.levels.values[$], J = A.levels.values[E];
346
+ if (J < ve) return;
347
+ W(this, {
348
+ ts: H,
349
+ methodLevel: E,
350
+ methodValue: J,
351
+ transmitValue: A.levels.values[y.transmit.level || p._level],
352
+ send: y.transmit.send,
353
+ val: i(p._level, A)
354
+ }, _);
355
355
  }
356
356
  };
357
- })(p[t][S]);
357
+ })(p[t][E]);
358
358
  }
359
- function E(p, m, w, S, _ = {}) {
359
+ function C(p, y, A, E, S = {}) {
360
360
  const {
361
- level: M = () => p.levels.values[m],
362
- log: $ = (Q) => Q
363
- } = _;
364
- p._serialize && v(w, p._serialize, p.serializers, p._stdErrSerialize);
365
- const k = w.slice();
366
- let j = k[0];
367
- const b = {};
368
- S && (b.time = S), b.level = M(m, p.levels.values[m]);
369
- let U = (p._childLevel | 0) + 1;
370
- if (U < 1 && (U = 1), j !== null && typeof j == "object") {
371
- for (; U-- && typeof k[0] == "object"; )
372
- Object.assign(b, k.shift());
373
- j = k.length ? e(k.shift(), k) : void 0;
374
- } else typeof j == "string" && (j = e(k.shift(), k));
375
- return j !== void 0 && (b.msg = j), $(b);
376
- }
377
- function v(p, m, w, S) {
378
- for (const _ in p)
379
- if (S && p[_] instanceof Error)
380
- p[_] = s.stdSerializers.err(p[_]);
381
- else if (typeof p[_] == "object" && !Array.isArray(p[_]))
382
- for (const M in p[_])
383
- m && m.indexOf(M) > -1 && M in w && (p[_][M] = w[M](p[_][M]));
384
- }
385
- function K(p, m, w) {
386
- const S = m.send, _ = m.ts, M = m.methodLevel, $ = m.methodValue, k = m.val, j = p._logEvent.bindings;
387
- v(
388
- w,
361
+ level: M = () => p.levels.values[y],
362
+ log: H = (J) => J
363
+ } = S;
364
+ p._serialize && x(A, p._serialize, p.serializers, p._stdErrSerialize);
365
+ const _ = A.slice();
366
+ let j = _[0];
367
+ const w = {};
368
+ E && (w.time = E), w.level = M(y, p.levels.values[y]);
369
+ let $ = (p._childLevel | 0) + 1;
370
+ if ($ < 1 && ($ = 1), j !== null && typeof j == "object") {
371
+ for (; $-- && typeof _[0] == "object"; )
372
+ Object.assign(w, _.shift());
373
+ j = _.length ? e(_.shift(), _) : void 0;
374
+ } else typeof j == "string" && (j = e(_.shift(), _));
375
+ return j !== void 0 && (w.msg = j), H(w);
376
+ }
377
+ function x(p, y, A, E) {
378
+ for (const S in p)
379
+ if (E && p[S] instanceof Error)
380
+ p[S] = u.stdSerializers.err(p[S]);
381
+ else if (typeof p[S] == "object" && !Array.isArray(p[S]))
382
+ for (const M in p[S])
383
+ y && y.indexOf(M) > -1 && M in A && (p[S][M] = A[M](p[S][M]));
384
+ }
385
+ function W(p, y, A) {
386
+ const E = y.send, S = y.ts, M = y.methodLevel, H = y.methodValue, _ = y.val, j = p._logEvent.bindings;
387
+ x(
388
+ A,
389
389
  p._serialize || Object.keys(p.serializers),
390
390
  p.serializers,
391
391
  p._stdErrSerialize === void 0 ? !0 : p._stdErrSerialize
392
- ), p._logEvent.ts = _, p._logEvent.messages = w.filter(function(b) {
393
- return j.indexOf(b) === -1;
394
- }), p._logEvent.level.label = M, p._logEvent.level.value = $, S(M, p._logEvent, k), p._logEvent = W(j);
392
+ ), p._logEvent.ts = S, p._logEvent.messages = A.filter(function(w) {
393
+ return j.indexOf(w) === -1;
394
+ }), p._logEvent.level.label = M, p._logEvent.level.value = H, E(M, p._logEvent, _), p._logEvent = Y(j);
395
395
  }
396
- function W(p) {
396
+ function Y(p) {
397
397
  return {
398
398
  ts: 0,
399
399
  messages: [],
@@ -401,31 +401,31 @@ function Yr() {
401
401
  level: { label: "", value: 0 }
402
402
  };
403
403
  }
404
- function Y(p) {
405
- const m = {
404
+ function U(p) {
405
+ const y = {
406
406
  type: p.constructor.name,
407
407
  msg: p.message,
408
408
  stack: p.stack
409
409
  };
410
- for (const w in p)
411
- m[w] === void 0 && (m[w] = p[w]);
412
- return m;
410
+ for (const A in p)
411
+ y[A] === void 0 && (y[A] = p[A]);
412
+ return y;
413
413
  }
414
414
  function ae(p) {
415
- return typeof p.timestamp == "function" ? p.timestamp : p.timestamp === !1 ? Ze : en;
415
+ return typeof p.timestamp == "function" ? p.timestamp : p.timestamp === !1 ? Je : Ze;
416
416
  }
417
- function X() {
417
+ function Q() {
418
418
  return {};
419
419
  }
420
420
  function B(p) {
421
421
  return p;
422
422
  }
423
- function ce() {
423
+ function se() {
424
424
  }
425
- function Ze() {
425
+ function Je() {
426
426
  return !1;
427
427
  }
428
- function en() {
428
+ function Ze() {
429
429
  return Date.now();
430
430
  }
431
431
  function Sr() {
@@ -434,9 +434,9 @@ function Yr() {
434
434
  function _r() {
435
435
  return new Date(Date.now()).toISOString();
436
436
  }
437
- function kr() {
438
- function p(m) {
439
- return typeof m < "u" && m;
437
+ function Or() {
438
+ function p(y) {
439
+ return typeof y < "u" && y;
440
440
  }
441
441
  try {
442
442
  return typeof globalThis < "u" || Object.defineProperty(Object.prototype, "globalThis", {
@@ -449,27 +449,27 @@ function Yr() {
449
449
  return p(self) || p(window) || p(this) || {};
450
450
  }
451
451
  }
452
- return ue.exports.default = s, ue.exports.pino = s, ue.exports;
452
+ return ce.exports.default = u, ce.exports.pino = u, ce.exports;
453
453
  }
454
- var zr = Yr();
455
- const $r = /* @__PURE__ */ Br(zr), ne = $r({
454
+ var Yr = zr();
455
+ const Hr = /* @__PURE__ */ $r(Yr), V = Hr({
456
456
  level: process.env.LOG_LEVEL || "info"
457
457
  });
458
- function Hr() {
458
+ function Kr() {
459
459
  return {
460
460
  command: "languages",
461
461
  describe: "List supported languages from xcodeproj or xcstrings",
462
462
  handler: async (e) => {
463
463
  const n = await Rn(e.path, e.config);
464
- ne.info(n.join(" "));
464
+ V.info(n.join(" "));
465
465
  }
466
466
  };
467
467
  }
468
- function Kr(e) {
469
- const n = Fe(e, "project.pbxproj");
470
- return (Mr.open(n).rootObject.props.knownRegions ?? []).filter((l) => l !== "Base").sort();
468
+ function Wr(e) {
469
+ const n = Oe(e, "project.pbxproj");
470
+ return (Pr.open(n).rootObject.props.knownRegions ?? []).filter((o) => o !== "Base").sort();
471
471
  }
472
- async function Wr(e) {
472
+ async function qr(e) {
473
473
  const n = await me(e), r = /* @__PURE__ */ new Set();
474
474
  if (!n.sourceLanguage)
475
475
  throw new Error('The xcstrings file is missing "sourceLanguage".');
@@ -477,8 +477,8 @@ async function Wr(e) {
477
477
  for (const i of Object.keys(n.strings)) {
478
478
  const t = n.strings[i];
479
479
  if (t.localizations)
480
- for (const l of Object.keys(t.localizations))
481
- r.add(l);
480
+ for (const o of Object.keys(t.localizations))
481
+ r.add(o);
482
482
  }
483
483
  return Array.from(r).sort();
484
484
  }
@@ -486,16 +486,16 @@ async function Rn(e, n) {
486
486
  const { sourceLanguage: r } = await me(e);
487
487
  if (!r)
488
488
  throw new Error('The xcstrings file is missing "sourceLanguage".');
489
- const i = await Ke(n);
489
+ const i = await He(n);
490
490
  if (i?.xcodeprojPaths && i.xcodeprojPaths.length > 0) {
491
- const o = /* @__PURE__ */ new Set();
492
- o.add(r);
491
+ const l = /* @__PURE__ */ new Set();
492
+ l.add(r);
493
493
  for (const a of i.xcodeprojPaths)
494
- Kr(a).forEach((u) => o.add(u));
495
- return Array.from(o).sort();
494
+ Wr(a).forEach((c) => l.add(c));
495
+ return Array.from(l).sort();
496
496
  }
497
- const t = await Wr(e), l = new Set(t);
498
- return l.add(r), Array.from(l).sort();
497
+ const t = await qr(e), o = new Set(t);
498
+ return o.add(r), Array.from(o).sort();
499
499
  }
500
500
  function Mn(e) {
501
501
  return typeof e > "u" || e === null;
@@ -503,32 +503,32 @@ function Mn(e) {
503
503
  function Gr(e) {
504
504
  return typeof e == "object" && e !== null;
505
505
  }
506
- function qr(e) {
506
+ function Vr(e) {
507
507
  return Array.isArray(e) ? e : Mn(e) ? [] : [e];
508
508
  }
509
- function Vr(e, n) {
510
- var r, i, t, l;
509
+ function Xr(e, n) {
510
+ var r, i, t, o;
511
511
  if (n)
512
- for (l = Object.keys(n), r = 0, i = l.length; r < i; r += 1)
513
- t = l[r], e[t] = n[t];
512
+ for (o = Object.keys(n), r = 0, i = o.length; r < i; r += 1)
513
+ t = o[r], e[t] = n[t];
514
514
  return e;
515
515
  }
516
- function Xr(e, n) {
516
+ function Qr(e, n) {
517
517
  var r = "", i;
518
518
  for (i = 0; i < n; i += 1)
519
519
  r += e;
520
520
  return r;
521
521
  }
522
- function Qr(e) {
522
+ function Jr(e) {
523
523
  return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
524
524
  }
525
- var Jr = Mn, Zr = Gr, ei = qr, ni = Xr, ri = Qr, ii = Vr, F = {
526
- isNothing: Jr,
527
- isObject: Zr,
528
- toArray: ei,
529
- repeat: ni,
530
- isNegativeZero: ri,
531
- extend: ii
525
+ var Zr = Mn, ei = Gr, ni = Vr, ri = Qr, ii = Jr, ti = Xr, F = {
526
+ isNothing: Zr,
527
+ isObject: ei,
528
+ toArray: ni,
529
+ repeat: ri,
530
+ isNegativeZero: ii,
531
+ extend: ti
532
532
  };
533
533
  function Pn(e, n) {
534
534
  var r = "", i = e.reason || "(unknown reason)";
@@ -545,47 +545,47 @@ fe.prototype.toString = function(n) {
545
545
  return this.name + ": " + Pn(this, n);
546
546
  };
547
547
  var I = fe;
548
- function Ne(e, n, r, i, t) {
549
- var l = "", o = "", a = Math.floor(t / 2) - 1;
550
- return i - n > a && (l = " ... ", n = i - a + l.length), r - i > a && (o = " ...", r = i + a - o.length), {
551
- str: l + e.slice(n, r).replace(/\t/g, "→") + o,
552
- pos: i - n + l.length
548
+ function Ie(e, n, r, i, t) {
549
+ var o = "", l = "", a = Math.floor(t / 2) - 1;
550
+ return i - n > a && (o = " ... ", n = i - a + o.length), r - i > a && (l = " ...", r = i + a - l.length), {
551
+ str: o + e.slice(n, r).replace(/\t/g, "→") + l,
552
+ pos: i - n + o.length
553
553
  // relative position
554
554
  };
555
555
  }
556
- function Re(e, n) {
556
+ function Ne(e, n) {
557
557
  return F.repeat(" ", n - e.length) + e;
558
558
  }
559
- function ti(e, n) {
559
+ function oi(e, n) {
560
560
  if (n = Object.create(n || null), !e.buffer) return null;
561
561
  n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2);
562
- for (var r = /\r?\n|\r|\0/g, i = [0], t = [], l, o = -1; l = r.exec(e.buffer); )
563
- t.push(l.index), i.push(l.index + l[0].length), e.position <= l.index && o < 0 && (o = i.length - 2);
564
- o < 0 && (o = i.length - 1);
565
- var a = "", c, u, s = Math.min(e.line + n.linesAfter, t.length).toString().length, f = n.maxLength - (n.indent + s + 3);
566
- for (c = 1; c <= n.linesBefore && !(o - c < 0); c++)
567
- u = Ne(
562
+ for (var r = /\r?\n|\r|\0/g, i = [0], t = [], o, l = -1; o = r.exec(e.buffer); )
563
+ t.push(o.index), i.push(o.index + o[0].length), e.position <= o.index && l < 0 && (l = i.length - 2);
564
+ l < 0 && (l = i.length - 1);
565
+ var a = "", s, c, u = Math.min(e.line + n.linesAfter, t.length).toString().length, f = n.maxLength - (n.indent + u + 3);
566
+ for (s = 1; s <= n.linesBefore && !(l - s < 0); s++)
567
+ c = Ie(
568
568
  e.buffer,
569
- i[o - c],
570
- t[o - c],
571
- e.position - (i[o] - i[o - c]),
569
+ i[l - s],
570
+ t[l - s],
571
+ e.position - (i[l] - i[l - s]),
572
572
  f
573
- ), a = F.repeat(" ", n.indent) + Re((e.line - c + 1).toString(), s) + " | " + u.str + `
573
+ ), a = F.repeat(" ", n.indent) + Ne((e.line - s + 1).toString(), u) + " | " + c.str + `
574
574
  ` + a;
575
- for (u = Ne(e.buffer, i[o], t[o], e.position, f), a += F.repeat(" ", n.indent) + Re((e.line + 1).toString(), s) + " | " + u.str + `
576
- `, a += F.repeat("-", n.indent + s + 3 + u.pos) + `^
577
- `, c = 1; c <= n.linesAfter && !(o + c >= t.length); c++)
578
- u = Ne(
575
+ for (c = Ie(e.buffer, i[l], t[l], e.position, f), a += F.repeat(" ", n.indent) + Ne((e.line + 1).toString(), u) + " | " + c.str + `
576
+ `, a += F.repeat("-", n.indent + u + 3 + c.pos) + `^
577
+ `, s = 1; s <= n.linesAfter && !(l + s >= t.length); s++)
578
+ c = Ie(
579
579
  e.buffer,
580
- i[o + c],
581
- t[o + c],
582
- e.position - (i[o] - i[o + c]),
580
+ i[l + s],
581
+ t[l + s],
582
+ e.position - (i[l] - i[l + s]),
583
583
  f
584
- ), a += F.repeat(" ", n.indent) + Re((e.line + c + 1).toString(), s) + " | " + u.str + `
584
+ ), a += F.repeat(" ", n.indent) + Ne((e.line + s + 1).toString(), u) + " | " + c.str + `
585
585
  `;
586
586
  return a.replace(/\n$/, "");
587
587
  }
588
- var oi = ti, li = [
588
+ var li = oi, ai = [
589
589
  "kind",
590
590
  "multi",
591
591
  "resolve",
@@ -596,7 +596,7 @@ var oi = ti, li = [
596
596
  "representName",
597
597
  "defaultStyle",
598
598
  "styleAliases"
599
- ], ai = [
599
+ ], si = [
600
600
  "scalar",
601
601
  "sequence",
602
602
  "mapping"
@@ -611,26 +611,26 @@ function ci(e) {
611
611
  }
612
612
  function ui(e, n) {
613
613
  if (n = n || {}, Object.keys(n).forEach(function(r) {
614
- if (li.indexOf(r) === -1)
614
+ if (ai.indexOf(r) === -1)
615
615
  throw new I('Unknown option "' + r + '" is met in definition of "' + e + '" YAML type.');
616
616
  }), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
617
617
  return !0;
618
618
  }, this.construct = n.construct || function(r) {
619
619
  return r;
620
- }, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = ci(n.styleAliases || null), ai.indexOf(this.kind) === -1)
620
+ }, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = ci(n.styleAliases || null), si.indexOf(this.kind) === -1)
621
621
  throw new I('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
622
622
  }
623
623
  var T = ui;
624
- function fn(e, n) {
624
+ function un(e, n) {
625
625
  var r = [];
626
626
  return e[n].forEach(function(i) {
627
627
  var t = r.length;
628
- r.forEach(function(l, o) {
629
- l.tag === i.tag && l.kind === i.kind && l.multi === i.multi && (t = o);
628
+ r.forEach(function(o, l) {
629
+ o.tag === i.tag && o.kind === i.kind && o.multi === i.multi && (t = l);
630
630
  }), r[t] = i;
631
631
  }), r;
632
632
  }
633
- function si() {
633
+ function fi() {
634
634
  var e = {
635
635
  scalar: {},
636
636
  sequence: {},
@@ -650,10 +650,10 @@ function si() {
650
650
  arguments[n].forEach(i);
651
651
  return e;
652
652
  }
653
- function Ue(e) {
653
+ function Be(e) {
654
654
  return this.extend(e);
655
655
  }
656
- Ue.prototype.extend = function(n) {
656
+ Be.prototype.extend = function(n) {
657
657
  var r = [], i = [];
658
658
  if (n instanceof T)
659
659
  i.push(n);
@@ -663,31 +663,31 @@ Ue.prototype.extend = function(n) {
663
663
  n.implicit && (r = r.concat(n.implicit)), n.explicit && (i = i.concat(n.explicit));
664
664
  else
665
665
  throw new I("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
666
- r.forEach(function(l) {
667
- if (!(l instanceof T))
666
+ r.forEach(function(o) {
667
+ if (!(o instanceof T))
668
668
  throw new I("Specified list of YAML types (or a single Type object) contains a non-Type object.");
669
- if (l.loadKind && l.loadKind !== "scalar")
669
+ if (o.loadKind && o.loadKind !== "scalar")
670
670
  throw new I("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
671
- if (l.multi)
671
+ if (o.multi)
672
672
  throw new I("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
673
- }), i.forEach(function(l) {
674
- if (!(l instanceof T))
673
+ }), i.forEach(function(o) {
674
+ if (!(o instanceof T))
675
675
  throw new I("Specified list of YAML types (or a single Type object) contains a non-Type object.");
676
676
  });
677
- var t = Object.create(Ue.prototype);
678
- return t.implicit = (this.implicit || []).concat(r), t.explicit = (this.explicit || []).concat(i), t.compiledImplicit = fn(t, "implicit"), t.compiledExplicit = fn(t, "explicit"), t.compiledTypeMap = si(t.compiledImplicit, t.compiledExplicit), t;
677
+ var t = Object.create(Be.prototype);
678
+ return t.implicit = (this.implicit || []).concat(r), t.explicit = (this.explicit || []).concat(i), t.compiledImplicit = un(t, "implicit"), t.compiledExplicit = un(t, "explicit"), t.compiledTypeMap = fi(t.compiledImplicit, t.compiledExplicit), t;
679
679
  };
680
- var Dn = Ue, Bn = new T("tag:yaml.org,2002:str", {
680
+ var Dn = Be, Bn = new T("tag:yaml.org,2002:str", {
681
681
  kind: "scalar",
682
682
  construct: function(e) {
683
683
  return e !== null ? e : "";
684
684
  }
685
- }), Un = new T("tag:yaml.org,2002:seq", {
685
+ }), $n = new T("tag:yaml.org,2002:seq", {
686
686
  kind: "sequence",
687
687
  construct: function(e) {
688
688
  return e !== null ? e : [];
689
689
  }
690
- }), Yn = new T("tag:yaml.org,2002:map", {
690
+ }), Un = new T("tag:yaml.org,2002:map", {
691
691
  kind: "mapping",
692
692
  construct: function(e) {
693
693
  return e !== null ? e : {};
@@ -695,25 +695,25 @@ var Dn = Ue, Bn = new T("tag:yaml.org,2002:str", {
695
695
  }), zn = new Dn({
696
696
  explicit: [
697
697
  Bn,
698
- Un,
699
- Yn
698
+ $n,
699
+ Un
700
700
  ]
701
701
  });
702
- function fi(e) {
702
+ function pi(e) {
703
703
  if (e === null) return !0;
704
704
  var n = e.length;
705
705
  return n === 1 && e === "~" || n === 4 && (e === "null" || e === "Null" || e === "NULL");
706
706
  }
707
- function pi() {
707
+ function di() {
708
708
  return null;
709
709
  }
710
710
  function hi(e) {
711
711
  return e === null;
712
712
  }
713
- var $n = new T("tag:yaml.org,2002:null", {
713
+ var Yn = new T("tag:yaml.org,2002:null", {
714
714
  kind: "scalar",
715
- resolve: fi,
716
- construct: pi,
715
+ resolve: pi,
716
+ construct: di,
717
717
  predicate: hi,
718
718
  represent: {
719
719
  canonical: function() {
@@ -734,22 +734,22 @@ var $n = new T("tag:yaml.org,2002:null", {
734
734
  },
735
735
  defaultStyle: "lowercase"
736
736
  });
737
- function di(e) {
737
+ function gi(e) {
738
738
  if (e === null) return !1;
739
739
  var n = e.length;
740
740
  return n === 4 && (e === "true" || e === "True" || e === "TRUE") || n === 5 && (e === "false" || e === "False" || e === "FALSE");
741
741
  }
742
- function gi(e) {
742
+ function mi(e) {
743
743
  return e === "true" || e === "True" || e === "TRUE";
744
744
  }
745
- function mi(e) {
745
+ function yi(e) {
746
746
  return Object.prototype.toString.call(e) === "[object Boolean]";
747
747
  }
748
748
  var Hn = new T("tag:yaml.org,2002:bool", {
749
749
  kind: "scalar",
750
- resolve: di,
751
- construct: gi,
752
- predicate: mi,
750
+ resolve: gi,
751
+ construct: mi,
752
+ predicate: yi,
753
753
  represent: {
754
754
  lowercase: function(e) {
755
755
  return e ? "true" : "false";
@@ -763,13 +763,13 @@ var Hn = new T("tag:yaml.org,2002:bool", {
763
763
  },
764
764
  defaultStyle: "lowercase"
765
765
  });
766
- function yi(e) {
766
+ function vi(e) {
767
767
  return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
768
768
  }
769
769
  function xi(e) {
770
770
  return 48 <= e && e <= 55;
771
771
  }
772
- function vi(e) {
772
+ function wi(e) {
773
773
  return 48 <= e && e <= 57;
774
774
  }
775
775
  function bi(e) {
@@ -789,7 +789,7 @@ function bi(e) {
789
789
  if (t === "x") {
790
790
  for (r++; r < n; r++)
791
791
  if (t = e[r], t !== "_") {
792
- if (!yi(e.charCodeAt(r))) return !1;
792
+ if (!vi(e.charCodeAt(r))) return !1;
793
793
  i = !0;
794
794
  }
795
795
  return i && t !== "_";
@@ -806,13 +806,13 @@ function bi(e) {
806
806
  if (t === "_") return !1;
807
807
  for (; r < n; r++)
808
808
  if (t = e[r], t !== "_") {
809
- if (!vi(e.charCodeAt(r)))
809
+ if (!wi(e.charCodeAt(r)))
810
810
  return !1;
811
811
  i = !0;
812
812
  }
813
813
  return !(!i || t === "_");
814
814
  }
815
- function wi(e) {
815
+ function Ai(e) {
816
816
  var n = e, r = 1, i;
817
817
  if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")), i = n[0], (i === "-" || i === "+") && (i === "-" && (r = -1), n = n.slice(1), i = n[0]), n === "0") return 0;
818
818
  if (i === "0") {
@@ -822,14 +822,14 @@ function wi(e) {
822
822
  }
823
823
  return r * parseInt(n, 10);
824
824
  }
825
- function Ai(e) {
825
+ function Ci(e) {
826
826
  return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !F.isNegativeZero(e);
827
827
  }
828
828
  var Kn = new T("tag:yaml.org,2002:int", {
829
829
  kind: "scalar",
830
830
  resolve: bi,
831
- construct: wi,
832
- predicate: Ai,
831
+ construct: Ai,
832
+ predicate: Ci,
833
833
  represent: {
834
834
  binary: function(e) {
835
835
  return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
@@ -852,12 +852,12 @@ var Kn = new T("tag:yaml.org,2002:int", {
852
852
  decimal: [10, "dec"],
853
853
  hexadecimal: [16, "hex"]
854
854
  }
855
- }), Ci = new RegExp(
855
+ }), ki = new RegExp(
856
856
  // 2.5e4, 2.5 and integers
857
857
  "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
858
858
  );
859
859
  function Ei(e) {
860
- return !(e === null || !Ci.test(e) || // Quick hack to not allow integers end with `_`
860
+ return !(e === null || !ki.test(e) || // Quick hack to not allow integers end with `_`
861
861
  // Probably should update regexp & check speed
862
862
  e[e.length - 1] === "_");
863
863
  }
@@ -866,7 +866,7 @@ function Si(e) {
866
866
  return n = e.replace(/_/g, "").toLowerCase(), r = n[0] === "-" ? -1 : 1, "+-".indexOf(n[0]) >= 0 && (n = n.slice(1)), n === ".inf" ? r === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : n === ".nan" ? NaN : r * parseFloat(n, 10);
867
867
  }
868
868
  var _i = /^[-+]?[0-9]+e/;
869
- function ki(e, n) {
869
+ function Oi(e, n) {
870
870
  var r;
871
871
  if (isNaN(e))
872
872
  switch (n) {
@@ -899,104 +899,104 @@ function ki(e, n) {
899
899
  return "-0.0";
900
900
  return r = e.toString(10), _i.test(r) ? r.replace("e", ".e") : r;
901
901
  }
902
- function Oi(e) {
902
+ function Fi(e) {
903
903
  return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || F.isNegativeZero(e));
904
904
  }
905
905
  var Wn = new T("tag:yaml.org,2002:float", {
906
906
  kind: "scalar",
907
907
  resolve: Ei,
908
908
  construct: Si,
909
- predicate: Oi,
910
- represent: ki,
909
+ predicate: Fi,
910
+ represent: Oi,
911
911
  defaultStyle: "lowercase"
912
- }), Gn = zn.extend({
912
+ }), qn = zn.extend({
913
913
  implicit: [
914
- $n,
914
+ Yn,
915
915
  Hn,
916
916
  Kn,
917
917
  Wn
918
918
  ]
919
- }), qn = Gn, Vn = new RegExp(
919
+ }), Gn = qn, Vn = new RegExp(
920
920
  "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
921
921
  ), Xn = new RegExp(
922
922
  "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
923
923
  );
924
- function Fi(e) {
924
+ function Ti(e) {
925
925
  return e === null ? !1 : Vn.exec(e) !== null || Xn.exec(e) !== null;
926
926
  }
927
- function Ti(e) {
928
- var n, r, i, t, l, o, a, c = 0, u = null, s, f, g;
927
+ function Li(e) {
928
+ var n, r, i, t, o, l, a, s = 0, c = null, u, f, h;
929
929
  if (n = Vn.exec(e), n === null && (n = Xn.exec(e)), n === null) throw new Error("Date resolve error");
930
930
  if (r = +n[1], i = +n[2] - 1, t = +n[3], !n[4])
931
931
  return new Date(Date.UTC(r, i, t));
932
- if (l = +n[4], o = +n[5], a = +n[6], n[7]) {
933
- for (c = n[7].slice(0, 3); c.length < 3; )
934
- c += "0";
935
- c = +c;
932
+ if (o = +n[4], l = +n[5], a = +n[6], n[7]) {
933
+ for (s = n[7].slice(0, 3); s.length < 3; )
934
+ s += "0";
935
+ s = +s;
936
936
  }
937
- return n[9] && (s = +n[10], f = +(n[11] || 0), u = (s * 60 + f) * 6e4, n[9] === "-" && (u = -u)), g = new Date(Date.UTC(r, i, t, l, o, a, c)), u && g.setTime(g.getTime() - u), g;
937
+ return n[9] && (u = +n[10], f = +(n[11] || 0), c = (u * 60 + f) * 6e4, n[9] === "-" && (c = -c)), h = new Date(Date.UTC(r, i, t, o, l, a, s)), c && h.setTime(h.getTime() - c), h;
938
938
  }
939
- function Li(e) {
939
+ function ji(e) {
940
940
  return e.toISOString();
941
941
  }
942
942
  var Qn = new T("tag:yaml.org,2002:timestamp", {
943
943
  kind: "scalar",
944
- resolve: Fi,
945
- construct: Ti,
944
+ resolve: Ti,
945
+ construct: Li,
946
946
  instanceOf: Date,
947
- represent: Li
947
+ represent: ji
948
948
  });
949
- function ji(e) {
949
+ function Ii(e) {
950
950
  return e === "<<" || e === null;
951
951
  }
952
952
  var Jn = new T("tag:yaml.org,2002:merge", {
953
953
  kind: "scalar",
954
- resolve: ji
955
- }), We = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
954
+ resolve: Ii
955
+ }), Ke = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
956
956
  \r`;
957
- function Ii(e) {
957
+ function Ni(e) {
958
958
  if (e === null) return !1;
959
- var n, r, i = 0, t = e.length, l = We;
959
+ var n, r, i = 0, t = e.length, o = Ke;
960
960
  for (r = 0; r < t; r++)
961
- if (n = l.indexOf(e.charAt(r)), !(n > 64)) {
961
+ if (n = o.indexOf(e.charAt(r)), !(n > 64)) {
962
962
  if (n < 0) return !1;
963
963
  i += 6;
964
964
  }
965
965
  return i % 8 === 0;
966
966
  }
967
- function Ni(e) {
968
- var n, r, i = e.replace(/[\r\n=]/g, ""), t = i.length, l = We, o = 0, a = [];
969
- for (n = 0; n < t; n++)
970
- n % 4 === 0 && n && (a.push(o >> 16 & 255), a.push(o >> 8 & 255), a.push(o & 255)), o = o << 6 | l.indexOf(i.charAt(n));
971
- return r = t % 4 * 6, r === 0 ? (a.push(o >> 16 & 255), a.push(o >> 8 & 255), a.push(o & 255)) : r === 18 ? (a.push(o >> 10 & 255), a.push(o >> 2 & 255)) : r === 12 && a.push(o >> 4 & 255), new Uint8Array(a);
972
- }
973
967
  function Ri(e) {
974
- var n = "", r = 0, i, t, l = e.length, o = We;
975
- for (i = 0; i < l; i++)
976
- i % 3 === 0 && i && (n += o[r >> 18 & 63], n += o[r >> 12 & 63], n += o[r >> 6 & 63], n += o[r & 63]), r = (r << 8) + e[i];
977
- return t = l % 3, t === 0 ? (n += o[r >> 18 & 63], n += o[r >> 12 & 63], n += o[r >> 6 & 63], n += o[r & 63]) : t === 2 ? (n += o[r >> 10 & 63], n += o[r >> 4 & 63], n += o[r << 2 & 63], n += o[64]) : t === 1 && (n += o[r >> 2 & 63], n += o[r << 4 & 63], n += o[64], n += o[64]), n;
968
+ var n, r, i = e.replace(/[\r\n=]/g, ""), t = i.length, o = Ke, l = 0, a = [];
969
+ for (n = 0; n < t; n++)
970
+ n % 4 === 0 && n && (a.push(l >> 16 & 255), a.push(l >> 8 & 255), a.push(l & 255)), l = l << 6 | o.indexOf(i.charAt(n));
971
+ return r = t % 4 * 6, r === 0 ? (a.push(l >> 16 & 255), a.push(l >> 8 & 255), a.push(l & 255)) : r === 18 ? (a.push(l >> 10 & 255), a.push(l >> 2 & 255)) : r === 12 && a.push(l >> 4 & 255), new Uint8Array(a);
978
972
  }
979
973
  function Mi(e) {
974
+ var n = "", r = 0, i, t, o = e.length, l = Ke;
975
+ for (i = 0; i < o; i++)
976
+ i % 3 === 0 && i && (n += l[r >> 18 & 63], n += l[r >> 12 & 63], n += l[r >> 6 & 63], n += l[r & 63]), r = (r << 8) + e[i];
977
+ return t = o % 3, t === 0 ? (n += l[r >> 18 & 63], n += l[r >> 12 & 63], n += l[r >> 6 & 63], n += l[r & 63]) : t === 2 ? (n += l[r >> 10 & 63], n += l[r >> 4 & 63], n += l[r << 2 & 63], n += l[64]) : t === 1 && (n += l[r >> 2 & 63], n += l[r << 4 & 63], n += l[64], n += l[64]), n;
978
+ }
979
+ function Pi(e) {
980
980
  return Object.prototype.toString.call(e) === "[object Uint8Array]";
981
981
  }
982
982
  var Zn = new T("tag:yaml.org,2002:binary", {
983
983
  kind: "scalar",
984
- resolve: Ii,
985
- construct: Ni,
986
- predicate: Mi,
987
- represent: Ri
988
- }), Pi = Object.prototype.hasOwnProperty, Di = Object.prototype.toString;
989
- function Bi(e) {
984
+ resolve: Ni,
985
+ construct: Ri,
986
+ predicate: Pi,
987
+ represent: Mi
988
+ }), Di = Object.prototype.hasOwnProperty, Bi = Object.prototype.toString;
989
+ function $i(e) {
990
990
  if (e === null) return !0;
991
- var n = [], r, i, t, l, o, a = e;
991
+ var n = [], r, i, t, o, l, a = e;
992
992
  for (r = 0, i = a.length; r < i; r += 1) {
993
- if (t = a[r], o = !1, Di.call(t) !== "[object Object]") return !1;
994
- for (l in t)
995
- if (Pi.call(t, l))
996
- if (!o) o = !0;
993
+ if (t = a[r], l = !1, Bi.call(t) !== "[object Object]") return !1;
994
+ for (o in t)
995
+ if (Di.call(t, o))
996
+ if (!l) l = !0;
997
997
  else return !1;
998
- if (!o) return !1;
999
- if (n.indexOf(l) === -1) n.push(l);
998
+ if (!l) return !1;
999
+ if (n.indexOf(o) === -1) n.push(o);
1000
1000
  else return !1;
1001
1001
  }
1002
1002
  return !0;
@@ -1006,46 +1006,46 @@ function Ui(e) {
1006
1006
  }
1007
1007
  var er = new T("tag:yaml.org,2002:omap", {
1008
1008
  kind: "sequence",
1009
- resolve: Bi,
1009
+ resolve: $i,
1010
1010
  construct: Ui
1011
- }), Yi = Object.prototype.toString;
1012
- function zi(e) {
1011
+ }), zi = Object.prototype.toString;
1012
+ function Yi(e) {
1013
1013
  if (e === null) return !0;
1014
- var n, r, i, t, l, o = e;
1015
- for (l = new Array(o.length), n = 0, r = o.length; n < r; n += 1) {
1016
- if (i = o[n], Yi.call(i) !== "[object Object]" || (t = Object.keys(i), t.length !== 1)) return !1;
1017
- l[n] = [t[0], i[t[0]]];
1014
+ var n, r, i, t, o, l = e;
1015
+ for (o = new Array(l.length), n = 0, r = l.length; n < r; n += 1) {
1016
+ if (i = l[n], zi.call(i) !== "[object Object]" || (t = Object.keys(i), t.length !== 1)) return !1;
1017
+ o[n] = [t[0], i[t[0]]];
1018
1018
  }
1019
1019
  return !0;
1020
1020
  }
1021
- function $i(e) {
1021
+ function Hi(e) {
1022
1022
  if (e === null) return [];
1023
- var n, r, i, t, l, o = e;
1024
- for (l = new Array(o.length), n = 0, r = o.length; n < r; n += 1)
1025
- i = o[n], t = Object.keys(i), l[n] = [t[0], i[t[0]]];
1026
- return l;
1023
+ var n, r, i, t, o, l = e;
1024
+ for (o = new Array(l.length), n = 0, r = l.length; n < r; n += 1)
1025
+ i = l[n], t = Object.keys(i), o[n] = [t[0], i[t[0]]];
1026
+ return o;
1027
1027
  }
1028
1028
  var nr = new T("tag:yaml.org,2002:pairs", {
1029
1029
  kind: "sequence",
1030
- resolve: zi,
1031
- construct: $i
1032
- }), Hi = Object.prototype.hasOwnProperty;
1033
- function Ki(e) {
1030
+ resolve: Yi,
1031
+ construct: Hi
1032
+ }), Ki = Object.prototype.hasOwnProperty;
1033
+ function Wi(e) {
1034
1034
  if (e === null) return !0;
1035
1035
  var n, r = e;
1036
1036
  for (n in r)
1037
- if (Hi.call(r, n) && r[n] !== null)
1037
+ if (Ki.call(r, n) && r[n] !== null)
1038
1038
  return !1;
1039
1039
  return !0;
1040
1040
  }
1041
- function Wi(e) {
1041
+ function qi(e) {
1042
1042
  return e !== null ? e : {};
1043
1043
  }
1044
1044
  var rr = new T("tag:yaml.org,2002:set", {
1045
1045
  kind: "mapping",
1046
- resolve: Ki,
1047
- construct: Wi
1048
- }), Ge = qn.extend({
1046
+ resolve: Wi,
1047
+ construct: qi
1048
+ }), We = Gn.extend({
1049
1049
  implicit: [
1050
1050
  Qn,
1051
1051
  Jn
@@ -1056,14 +1056,14 @@ var rr = new T("tag:yaml.org,2002:set", {
1056
1056
  nr,
1057
1057
  rr
1058
1058
  ]
1059
- }), q = Object.prototype.hasOwnProperty, Ee = 1, ir = 2, tr = 3, Se = 4, Me = 1, Gi = 2, pn = 3, qi = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Vi = /[\x85\u2028\u2029]/, Xi = /[,\[\]\{\}]/, or = /^(?:!|!!|![a-z\-]+!)$/i, lr = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
1060
- function hn(e) {
1059
+ }), G = Object.prototype.hasOwnProperty, Ce = 1, ir = 2, tr = 3, ke = 4, Re = 1, Gi = 2, fn = 3, Vi = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Xi = /[\x85\u2028\u2029]/, Qi = /[,\[\]\{\}]/, or = /^(?:!|!!|![a-z\-]+!)$/i, lr = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
1060
+ function pn(e) {
1061
1061
  return Object.prototype.toString.call(e);
1062
1062
  }
1063
1063
  function z(e) {
1064
1064
  return e === 10 || e === 13;
1065
1065
  }
1066
- function V(e) {
1066
+ function X(e) {
1067
1067
  return e === 9 || e === 32;
1068
1068
  }
1069
1069
  function D(e) {
@@ -1072,21 +1072,21 @@ function D(e) {
1072
1072
  function re(e) {
1073
1073
  return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
1074
1074
  }
1075
- function Qi(e) {
1075
+ function Ji(e) {
1076
1076
  var n;
1077
1077
  return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
1078
1078
  }
1079
- function Ji(e) {
1079
+ function Zi(e) {
1080
1080
  return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
1081
1081
  }
1082
- function Zi(e) {
1082
+ function et(e) {
1083
1083
  return 48 <= e && e <= 57 ? e - 48 : -1;
1084
1084
  }
1085
1085
  function dn(e) {
1086
1086
  return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
1087
1087
  ` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "…" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
1088
1088
  }
1089
- function et(e) {
1089
+ function nt(e) {
1090
1090
  return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
1091
1091
  (e - 65536 >> 10) + 55296,
1092
1092
  (e - 65536 & 1023) + 56320
@@ -1100,13 +1100,13 @@ function ar(e, n, r) {
1100
1100
  value: r
1101
1101
  }) : e[n] = r;
1102
1102
  }
1103
- var cr = new Array(256), ur = new Array(256);
1104
- for (var Z = 0; Z < 256; Z++)
1105
- cr[Z] = dn(Z) ? 1 : 0, ur[Z] = dn(Z);
1106
- function nt(e, n) {
1107
- this.input = e, this.filename = n.filename || null, this.schema = n.schema || Ge, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
1103
+ var sr = new Array(256), cr = new Array(256);
1104
+ for (var ee = 0; ee < 256; ee++)
1105
+ sr[ee] = dn(ee) ? 1 : 0, cr[ee] = dn(ee);
1106
+ function rt(e, n) {
1107
+ this.input = e, this.filename = n.filename || null, this.schema = n.schema || We, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
1108
1108
  }
1109
- function sr(e, n) {
1109
+ function ur(e, n) {
1110
1110
  var r = {
1111
1111
  name: e.filename,
1112
1112
  buffer: e.input.slice(0, -1),
@@ -1115,67 +1115,67 @@ function sr(e, n) {
1115
1115
  line: e.line,
1116
1116
  column: e.position - e.lineStart
1117
1117
  };
1118
- return r.snippet = oi(r), new I(n, r);
1118
+ return r.snippet = li(r), new I(n, r);
1119
1119
  }
1120
- function y(e, n) {
1121
- throw sr(e, n);
1120
+ function v(e, n) {
1121
+ throw ur(e, n);
1122
1122
  }
1123
- function _e(e, n) {
1124
- e.onWarning && e.onWarning.call(null, sr(e, n));
1123
+ function Ee(e, n) {
1124
+ e.onWarning && e.onWarning.call(null, ur(e, n));
1125
1125
  }
1126
- var gn = {
1126
+ var hn = {
1127
1127
  YAML: function(n, r, i) {
1128
- var t, l, o;
1129
- n.version !== null && y(n, "duplication of %YAML directive"), i.length !== 1 && y(n, "YAML directive accepts exactly one argument"), t = /^([0-9]+)\.([0-9]+)$/.exec(i[0]), t === null && y(n, "ill-formed argument of the YAML directive"), l = parseInt(t[1], 10), o = parseInt(t[2], 10), l !== 1 && y(n, "unacceptable YAML version of the document"), n.version = i[0], n.checkLineBreaks = o < 2, o !== 1 && o !== 2 && _e(n, "unsupported YAML version of the document");
1128
+ var t, o, l;
1129
+ n.version !== null && v(n, "duplication of %YAML directive"), i.length !== 1 && v(n, "YAML directive accepts exactly one argument"), t = /^([0-9]+)\.([0-9]+)$/.exec(i[0]), t === null && v(n, "ill-formed argument of the YAML directive"), o = parseInt(t[1], 10), l = parseInt(t[2], 10), o !== 1 && v(n, "unacceptable YAML version of the document"), n.version = i[0], n.checkLineBreaks = l < 2, l !== 1 && l !== 2 && Ee(n, "unsupported YAML version of the document");
1130
1130
  },
1131
1131
  TAG: function(n, r, i) {
1132
- var t, l;
1133
- i.length !== 2 && y(n, "TAG directive accepts exactly two arguments"), t = i[0], l = i[1], or.test(t) || y(n, "ill-formed tag handle (first argument) of the TAG directive"), q.call(n.tagMap, t) && y(n, 'there is a previously declared suffix for "' + t + '" tag handle'), lr.test(l) || y(n, "ill-formed tag prefix (second argument) of the TAG directive");
1132
+ var t, o;
1133
+ i.length !== 2 && v(n, "TAG directive accepts exactly two arguments"), t = i[0], o = i[1], or.test(t) || v(n, "ill-formed tag handle (first argument) of the TAG directive"), G.call(n.tagMap, t) && v(n, 'there is a previously declared suffix for "' + t + '" tag handle'), lr.test(o) || v(n, "ill-formed tag prefix (second argument) of the TAG directive");
1134
1134
  try {
1135
- l = decodeURIComponent(l);
1135
+ o = decodeURIComponent(o);
1136
1136
  } catch {
1137
- y(n, "tag prefix is malformed: " + l);
1137
+ v(n, "tag prefix is malformed: " + o);
1138
1138
  }
1139
- n.tagMap[t] = l;
1139
+ n.tagMap[t] = o;
1140
1140
  }
1141
1141
  };
1142
- function G(e, n, r, i) {
1143
- var t, l, o, a;
1142
+ function q(e, n, r, i) {
1143
+ var t, o, l, a;
1144
1144
  if (n < r) {
1145
1145
  if (a = e.input.slice(n, r), i)
1146
- for (t = 0, l = a.length; t < l; t += 1)
1147
- o = a.charCodeAt(t), o === 9 || 32 <= o && o <= 1114111 || y(e, "expected valid JSON character");
1148
- else qi.test(a) && y(e, "the stream contains non-printable characters");
1146
+ for (t = 0, o = a.length; t < o; t += 1)
1147
+ l = a.charCodeAt(t), l === 9 || 32 <= l && l <= 1114111 || v(e, "expected valid JSON character");
1148
+ else Vi.test(a) && v(e, "the stream contains non-printable characters");
1149
1149
  e.result += a;
1150
1150
  }
1151
1151
  }
1152
- function mn(e, n, r, i) {
1153
- var t, l, o, a;
1154
- for (F.isObject(r) || y(e, "cannot merge mappings; the provided source object is unacceptable"), t = Object.keys(r), o = 0, a = t.length; o < a; o += 1)
1155
- l = t[o], q.call(n, l) || (ar(n, l, r[l]), i[l] = !0);
1152
+ function gn(e, n, r, i) {
1153
+ var t, o, l, a;
1154
+ for (F.isObject(r) || v(e, "cannot merge mappings; the provided source object is unacceptable"), t = Object.keys(r), l = 0, a = t.length; l < a; l += 1)
1155
+ o = t[l], G.call(n, o) || (ar(n, o, r[o]), i[o] = !0);
1156
1156
  }
1157
- function ie(e, n, r, i, t, l, o, a, c) {
1158
- var u, s;
1157
+ function ie(e, n, r, i, t, o, l, a, s) {
1158
+ var c, u;
1159
1159
  if (Array.isArray(t))
1160
- for (t = Array.prototype.slice.call(t), u = 0, s = t.length; u < s; u += 1)
1161
- Array.isArray(t[u]) && y(e, "nested arrays are not supported inside keys"), typeof t == "object" && hn(t[u]) === "[object Object]" && (t[u] = "[object Object]");
1162
- if (typeof t == "object" && hn(t) === "[object Object]" && (t = "[object Object]"), t = String(t), n === null && (n = {}), i === "tag:yaml.org,2002:merge")
1163
- if (Array.isArray(l))
1164
- for (u = 0, s = l.length; u < s; u += 1)
1165
- mn(e, n, l[u], r);
1160
+ for (t = Array.prototype.slice.call(t), c = 0, u = t.length; c < u; c += 1)
1161
+ Array.isArray(t[c]) && v(e, "nested arrays are not supported inside keys"), typeof t == "object" && pn(t[c]) === "[object Object]" && (t[c] = "[object Object]");
1162
+ if (typeof t == "object" && pn(t) === "[object Object]" && (t = "[object Object]"), t = String(t), n === null && (n = {}), i === "tag:yaml.org,2002:merge")
1163
+ if (Array.isArray(o))
1164
+ for (c = 0, u = o.length; c < u; c += 1)
1165
+ gn(e, n, o[c], r);
1166
1166
  else
1167
- mn(e, n, l, r);
1167
+ gn(e, n, o, r);
1168
1168
  else
1169
- !e.json && !q.call(r, t) && q.call(n, t) && (e.line = o || e.line, e.lineStart = a || e.lineStart, e.position = c || e.position, y(e, "duplicated mapping key")), ar(n, t, l), delete r[t];
1169
+ !e.json && !G.call(r, t) && G.call(n, t) && (e.line = l || e.line, e.lineStart = a || e.lineStart, e.position = s || e.position, v(e, "duplicated mapping key")), ar(n, t, o), delete r[t];
1170
1170
  return n;
1171
1171
  }
1172
1172
  function qe(e) {
1173
1173
  var n;
1174
- n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : y(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
1174
+ n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : v(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
1175
1175
  }
1176
1176
  function O(e, n, r) {
1177
1177
  for (var i = 0, t = e.input.charCodeAt(e.position); t !== 0; ) {
1178
- for (; V(t); )
1178
+ for (; X(t); )
1179
1179
  t === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), t = e.input.charCodeAt(++e.position);
1180
1180
  if (n && t === 35)
1181
1181
  do
@@ -1187,96 +1187,96 @@ function O(e, n, r) {
1187
1187
  else
1188
1188
  break;
1189
1189
  }
1190
- return r !== -1 && i !== 0 && e.lineIndent < r && _e(e, "deficient indentation"), i;
1190
+ return r !== -1 && i !== 0 && e.lineIndent < r && Ee(e, "deficient indentation"), i;
1191
1191
  }
1192
- function Te(e) {
1192
+ function Fe(e) {
1193
1193
  var n = e.position, r;
1194
1194
  return r = e.input.charCodeAt(n), !!((r === 45 || r === 46) && r === e.input.charCodeAt(n + 1) && r === e.input.charCodeAt(n + 2) && (n += 3, r = e.input.charCodeAt(n), r === 0 || D(r)));
1195
1195
  }
1196
- function Ve(e, n) {
1196
+ function Ge(e, n) {
1197
1197
  n === 1 ? e.result += " " : n > 1 && (e.result += F.repeat(`
1198
1198
  `, n - 1));
1199
1199
  }
1200
- function rt(e, n, r) {
1201
- var i, t, l, o, a, c, u, s, f = e.kind, g = e.result, h;
1202
- if (h = e.input.charCodeAt(e.position), D(h) || re(h) || h === 35 || h === 38 || h === 42 || h === 33 || h === 124 || h === 62 || h === 39 || h === 34 || h === 37 || h === 64 || h === 96 || (h === 63 || h === 45) && (t = e.input.charCodeAt(e.position + 1), D(t) || r && re(t)))
1200
+ function it(e, n, r) {
1201
+ var i, t, o, l, a, s, c, u, f = e.kind, h = e.result, d;
1202
+ if (d = e.input.charCodeAt(e.position), D(d) || re(d) || d === 35 || d === 38 || d === 42 || d === 33 || d === 124 || d === 62 || d === 39 || d === 34 || d === 37 || d === 64 || d === 96 || (d === 63 || d === 45) && (t = e.input.charCodeAt(e.position + 1), D(t) || r && re(t)))
1203
1203
  return !1;
1204
- for (e.kind = "scalar", e.result = "", l = o = e.position, a = !1; h !== 0; ) {
1205
- if (h === 58) {
1204
+ for (e.kind = "scalar", e.result = "", o = l = e.position, a = !1; d !== 0; ) {
1205
+ if (d === 58) {
1206
1206
  if (t = e.input.charCodeAt(e.position + 1), D(t) || r && re(t))
1207
1207
  break;
1208
- } else if (h === 35) {
1208
+ } else if (d === 35) {
1209
1209
  if (i = e.input.charCodeAt(e.position - 1), D(i))
1210
1210
  break;
1211
1211
  } else {
1212
- if (e.position === e.lineStart && Te(e) || r && re(h))
1212
+ if (e.position === e.lineStart && Fe(e) || r && re(d))
1213
1213
  break;
1214
- if (z(h))
1215
- if (c = e.line, u = e.lineStart, s = e.lineIndent, O(e, !1, -1), e.lineIndent >= n) {
1216
- a = !0, h = e.input.charCodeAt(e.position);
1214
+ if (z(d))
1215
+ if (s = e.line, c = e.lineStart, u = e.lineIndent, O(e, !1, -1), e.lineIndent >= n) {
1216
+ a = !0, d = e.input.charCodeAt(e.position);
1217
1217
  continue;
1218
1218
  } else {
1219
- e.position = o, e.line = c, e.lineStart = u, e.lineIndent = s;
1219
+ e.position = l, e.line = s, e.lineStart = c, e.lineIndent = u;
1220
1220
  break;
1221
1221
  }
1222
1222
  }
1223
- a && (G(e, l, o, !1), Ve(e, e.line - c), l = o = e.position, a = !1), V(h) || (o = e.position + 1), h = e.input.charCodeAt(++e.position);
1223
+ a && (q(e, o, l, !1), Ge(e, e.line - s), o = l = e.position, a = !1), X(d) || (l = e.position + 1), d = e.input.charCodeAt(++e.position);
1224
1224
  }
1225
- return G(e, l, o, !1), e.result ? !0 : (e.kind = f, e.result = g, !1);
1225
+ return q(e, o, l, !1), e.result ? !0 : (e.kind = f, e.result = h, !1);
1226
1226
  }
1227
- function it(e, n) {
1227
+ function tt(e, n) {
1228
1228
  var r, i, t;
1229
1229
  if (r = e.input.charCodeAt(e.position), r !== 39)
1230
1230
  return !1;
1231
1231
  for (e.kind = "scalar", e.result = "", e.position++, i = t = e.position; (r = e.input.charCodeAt(e.position)) !== 0; )
1232
1232
  if (r === 39)
1233
- if (G(e, i, e.position, !0), r = e.input.charCodeAt(++e.position), r === 39)
1233
+ if (q(e, i, e.position, !0), r = e.input.charCodeAt(++e.position), r === 39)
1234
1234
  i = e.position, e.position++, t = e.position;
1235
1235
  else
1236
1236
  return !0;
1237
- else z(r) ? (G(e, i, t, !0), Ve(e, O(e, !1, n)), i = t = e.position) : e.position === e.lineStart && Te(e) ? y(e, "unexpected end of the document within a single quoted scalar") : (e.position++, t = e.position);
1238
- y(e, "unexpected end of the stream within a single quoted scalar");
1237
+ else z(r) ? (q(e, i, t, !0), Ge(e, O(e, !1, n)), i = t = e.position) : e.position === e.lineStart && Fe(e) ? v(e, "unexpected end of the document within a single quoted scalar") : (e.position++, t = e.position);
1238
+ v(e, "unexpected end of the stream within a single quoted scalar");
1239
1239
  }
1240
- function tt(e, n) {
1241
- var r, i, t, l, o, a;
1240
+ function ot(e, n) {
1241
+ var r, i, t, o, l, a;
1242
1242
  if (a = e.input.charCodeAt(e.position), a !== 34)
1243
1243
  return !1;
1244
1244
  for (e.kind = "scalar", e.result = "", e.position++, r = i = e.position; (a = e.input.charCodeAt(e.position)) !== 0; ) {
1245
1245
  if (a === 34)
1246
- return G(e, r, e.position, !0), e.position++, !0;
1246
+ return q(e, r, e.position, !0), e.position++, !0;
1247
1247
  if (a === 92) {
1248
- if (G(e, r, e.position, !0), a = e.input.charCodeAt(++e.position), z(a))
1248
+ if (q(e, r, e.position, !0), a = e.input.charCodeAt(++e.position), z(a))
1249
1249
  O(e, !1, n);
1250
- else if (a < 256 && cr[a])
1251
- e.result += ur[a], e.position++;
1252
- else if ((o = Ji(a)) > 0) {
1253
- for (t = o, l = 0; t > 0; t--)
1254
- a = e.input.charCodeAt(++e.position), (o = Qi(a)) >= 0 ? l = (l << 4) + o : y(e, "expected hexadecimal character");
1255
- e.result += et(l), e.position++;
1250
+ else if (a < 256 && sr[a])
1251
+ e.result += cr[a], e.position++;
1252
+ else if ((l = Zi(a)) > 0) {
1253
+ for (t = l, o = 0; t > 0; t--)
1254
+ a = e.input.charCodeAt(++e.position), (l = Ji(a)) >= 0 ? o = (o << 4) + l : v(e, "expected hexadecimal character");
1255
+ e.result += nt(o), e.position++;
1256
1256
  } else
1257
- y(e, "unknown escape sequence");
1257
+ v(e, "unknown escape sequence");
1258
1258
  r = i = e.position;
1259
- } else z(a) ? (G(e, r, i, !0), Ve(e, O(e, !1, n)), r = i = e.position) : e.position === e.lineStart && Te(e) ? y(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position);
1259
+ } else z(a) ? (q(e, r, i, !0), Ge(e, O(e, !1, n)), r = i = e.position) : e.position === e.lineStart && Fe(e) ? v(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position);
1260
1260
  }
1261
- y(e, "unexpected end of the stream within a double quoted scalar");
1261
+ v(e, "unexpected end of the stream within a double quoted scalar");
1262
1262
  }
1263
- function ot(e, n) {
1264
- var r = !0, i, t, l, o = e.tag, a, c = e.anchor, u, s, f, g, h, x = /* @__PURE__ */ Object.create(null), d, A, E, v;
1265
- if (v = e.input.charCodeAt(e.position), v === 91)
1266
- s = 93, h = !1, a = [];
1267
- else if (v === 123)
1268
- s = 125, h = !0, a = {};
1263
+ function lt(e, n) {
1264
+ var r = !0, i, t, o, l = e.tag, a, s = e.anchor, c, u, f, h, d, m = /* @__PURE__ */ Object.create(null), g, b, C, x;
1265
+ if (x = e.input.charCodeAt(e.position), x === 91)
1266
+ u = 93, d = !1, a = [];
1267
+ else if (x === 123)
1268
+ u = 125, d = !0, a = {};
1269
1269
  else
1270
1270
  return !1;
1271
- for (e.anchor !== null && (e.anchorMap[e.anchor] = a), v = e.input.charCodeAt(++e.position); v !== 0; ) {
1272
- if (O(e, !0, n), v = e.input.charCodeAt(e.position), v === s)
1273
- return e.position++, e.tag = o, e.anchor = c, e.kind = h ? "mapping" : "sequence", e.result = a, !0;
1274
- r ? v === 44 && y(e, "expected the node content, but found ','") : y(e, "missed comma between flow collection entries"), A = d = E = null, f = g = !1, v === 63 && (u = e.input.charCodeAt(e.position + 1), D(u) && (f = g = !0, e.position++, O(e, !0, n))), i = e.line, t = e.lineStart, l = e.position, te(e, n, Ee, !1, !0), A = e.tag, d = e.result, O(e, !0, n), v = e.input.charCodeAt(e.position), (g || e.line === i) && v === 58 && (f = !0, v = e.input.charCodeAt(++e.position), O(e, !0, n), te(e, n, Ee, !1, !0), E = e.result), h ? ie(e, a, x, A, d, E, i, t, l) : f ? a.push(ie(e, null, x, A, d, E, i, t, l)) : a.push(d), O(e, !0, n), v = e.input.charCodeAt(e.position), v === 44 ? (r = !0, v = e.input.charCodeAt(++e.position)) : r = !1;
1271
+ for (e.anchor !== null && (e.anchorMap[e.anchor] = a), x = e.input.charCodeAt(++e.position); x !== 0; ) {
1272
+ if (O(e, !0, n), x = e.input.charCodeAt(e.position), x === u)
1273
+ return e.position++, e.tag = l, e.anchor = s, e.kind = d ? "mapping" : "sequence", e.result = a, !0;
1274
+ r ? x === 44 && v(e, "expected the node content, but found ','") : v(e, "missed comma between flow collection entries"), b = g = C = null, f = h = !1, x === 63 && (c = e.input.charCodeAt(e.position + 1), D(c) && (f = h = !0, e.position++, O(e, !0, n))), i = e.line, t = e.lineStart, o = e.position, te(e, n, Ce, !1, !0), b = e.tag, g = e.result, O(e, !0, n), x = e.input.charCodeAt(e.position), (h || e.line === i) && x === 58 && (f = !0, x = e.input.charCodeAt(++e.position), O(e, !0, n), te(e, n, Ce, !1, !0), C = e.result), d ? ie(e, a, m, b, g, C, i, t, o) : f ? a.push(ie(e, null, m, b, g, C, i, t, o)) : a.push(g), O(e, !0, n), x = e.input.charCodeAt(e.position), x === 44 ? (r = !0, x = e.input.charCodeAt(++e.position)) : r = !1;
1275
1275
  }
1276
- y(e, "unexpected end of the stream within a flow collection");
1276
+ v(e, "unexpected end of the stream within a flow collection");
1277
1277
  }
1278
- function lt(e, n) {
1279
- var r, i, t = Me, l = !1, o = !1, a = n, c = 0, u = !1, s, f;
1278
+ function at(e, n) {
1279
+ var r, i, t = Re, o = !1, l = !1, a = n, s = 0, c = !1, u, f;
1280
1280
  if (f = e.input.charCodeAt(e.position), f === 124)
1281
1281
  i = !1;
1282
1282
  else if (f === 62)
@@ -1285,195 +1285,195 @@ function lt(e, n) {
1285
1285
  return !1;
1286
1286
  for (e.kind = "scalar", e.result = ""; f !== 0; )
1287
1287
  if (f = e.input.charCodeAt(++e.position), f === 43 || f === 45)
1288
- Me === t ? t = f === 43 ? pn : Gi : y(e, "repeat of a chomping mode identifier");
1289
- else if ((s = Zi(f)) >= 0)
1290
- s === 0 ? y(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? y(e, "repeat of an indentation width identifier") : (a = n + s - 1, o = !0);
1288
+ Re === t ? t = f === 43 ? fn : Gi : v(e, "repeat of a chomping mode identifier");
1289
+ else if ((u = et(f)) >= 0)
1290
+ u === 0 ? v(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : l ? v(e, "repeat of an indentation width identifier") : (a = n + u - 1, l = !0);
1291
1291
  else
1292
1292
  break;
1293
- if (V(f)) {
1293
+ if (X(f)) {
1294
1294
  do
1295
1295
  f = e.input.charCodeAt(++e.position);
1296
- while (V(f));
1296
+ while (X(f));
1297
1297
  if (f === 35)
1298
1298
  do
1299
1299
  f = e.input.charCodeAt(++e.position);
1300
1300
  while (!z(f) && f !== 0);
1301
1301
  }
1302
1302
  for (; f !== 0; ) {
1303
- for (qe(e), e.lineIndent = 0, f = e.input.charCodeAt(e.position); (!o || e.lineIndent < a) && f === 32; )
1303
+ for (qe(e), e.lineIndent = 0, f = e.input.charCodeAt(e.position); (!l || e.lineIndent < a) && f === 32; )
1304
1304
  e.lineIndent++, f = e.input.charCodeAt(++e.position);
1305
- if (!o && e.lineIndent > a && (a = e.lineIndent), z(f)) {
1306
- c++;
1305
+ if (!l && e.lineIndent > a && (a = e.lineIndent), z(f)) {
1306
+ s++;
1307
1307
  continue;
1308
1308
  }
1309
1309
  if (e.lineIndent < a) {
1310
- t === pn ? e.result += F.repeat(`
1311
- `, l ? 1 + c : c) : t === Me && l && (e.result += `
1310
+ t === fn ? e.result += F.repeat(`
1311
+ `, o ? 1 + s : s) : t === Re && o && (e.result += `
1312
1312
  `);
1313
1313
  break;
1314
1314
  }
1315
- for (i ? V(f) ? (u = !0, e.result += F.repeat(`
1316
- `, l ? 1 + c : c)) : u ? (u = !1, e.result += F.repeat(`
1317
- `, c + 1)) : c === 0 ? l && (e.result += " ") : e.result += F.repeat(`
1318
- `, c) : e.result += F.repeat(`
1319
- `, l ? 1 + c : c), l = !0, o = !0, c = 0, r = e.position; !z(f) && f !== 0; )
1315
+ for (i ? X(f) ? (c = !0, e.result += F.repeat(`
1316
+ `, o ? 1 + s : s)) : c ? (c = !1, e.result += F.repeat(`
1317
+ `, s + 1)) : s === 0 ? o && (e.result += " ") : e.result += F.repeat(`
1318
+ `, s) : e.result += F.repeat(`
1319
+ `, o ? 1 + s : s), o = !0, l = !0, s = 0, r = e.position; !z(f) && f !== 0; )
1320
1320
  f = e.input.charCodeAt(++e.position);
1321
- G(e, r, e.position, !1);
1321
+ q(e, r, e.position, !1);
1322
1322
  }
1323
1323
  return !0;
1324
1324
  }
1325
- function yn(e, n) {
1326
- var r, i = e.tag, t = e.anchor, l = [], o, a = !1, c;
1325
+ function mn(e, n) {
1326
+ var r, i = e.tag, t = e.anchor, o = [], l, a = !1, s;
1327
1327
  if (e.firstTabInLine !== -1) return !1;
1328
- for (e.anchor !== null && (e.anchorMap[e.anchor] = l), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, y(e, "tab characters must not be used in indentation")), !(c !== 45 || (o = e.input.charCodeAt(e.position + 1), !D(o)))); ) {
1328
+ for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, v(e, "tab characters must not be used in indentation")), !(s !== 45 || (l = e.input.charCodeAt(e.position + 1), !D(l)))); ) {
1329
1329
  if (a = !0, e.position++, O(e, !0, -1) && e.lineIndent <= n) {
1330
- l.push(null), c = e.input.charCodeAt(e.position);
1330
+ o.push(null), s = e.input.charCodeAt(e.position);
1331
1331
  continue;
1332
1332
  }
1333
- if (r = e.line, te(e, n, tr, !1, !0), l.push(e.result), O(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === r || e.lineIndent > n) && c !== 0)
1334
- y(e, "bad indentation of a sequence entry");
1333
+ if (r = e.line, te(e, n, tr, !1, !0), o.push(e.result), O(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === r || e.lineIndent > n) && s !== 0)
1334
+ v(e, "bad indentation of a sequence entry");
1335
1335
  else if (e.lineIndent < n)
1336
1336
  break;
1337
1337
  }
1338
- return a ? (e.tag = i, e.anchor = t, e.kind = "sequence", e.result = l, !0) : !1;
1338
+ return a ? (e.tag = i, e.anchor = t, e.kind = "sequence", e.result = o, !0) : !1;
1339
1339
  }
1340
- function at(e, n, r) {
1341
- var i, t, l, o, a, c, u = e.tag, s = e.anchor, f = {}, g = /* @__PURE__ */ Object.create(null), h = null, x = null, d = null, A = !1, E = !1, v;
1340
+ function st(e, n, r) {
1341
+ var i, t, o, l, a, s, c = e.tag, u = e.anchor, f = {}, h = /* @__PURE__ */ Object.create(null), d = null, m = null, g = null, b = !1, C = !1, x;
1342
1342
  if (e.firstTabInLine !== -1) return !1;
1343
- for (e.anchor !== null && (e.anchorMap[e.anchor] = f), v = e.input.charCodeAt(e.position); v !== 0; ) {
1344
- if (!A && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, y(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), l = e.line, (v === 63 || v === 58) && D(i))
1345
- v === 63 ? (A && (ie(e, f, g, h, x, null, o, a, c), h = x = d = null), E = !0, A = !0, t = !0) : A ? (A = !1, t = !0) : y(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, v = i;
1343
+ for (e.anchor !== null && (e.anchorMap[e.anchor] = f), x = e.input.charCodeAt(e.position); x !== 0; ) {
1344
+ if (!b && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, v(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (x === 63 || x === 58) && D(i))
1345
+ x === 63 ? (b && (ie(e, f, h, d, m, null, l, a, s), d = m = g = null), C = !0, b = !0, t = !0) : b ? (b = !1, t = !0) : v(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, x = i;
1346
1346
  else {
1347
- if (o = e.line, a = e.lineStart, c = e.position, !te(e, r, ir, !1, !0))
1347
+ if (l = e.line, a = e.lineStart, s = e.position, !te(e, r, ir, !1, !0))
1348
1348
  break;
1349
- if (e.line === l) {
1350
- for (v = e.input.charCodeAt(e.position); V(v); )
1351
- v = e.input.charCodeAt(++e.position);
1352
- if (v === 58)
1353
- v = e.input.charCodeAt(++e.position), D(v) || y(e, "a whitespace character is expected after the key-value separator within a block mapping"), A && (ie(e, f, g, h, x, null, o, a, c), h = x = d = null), E = !0, A = !1, t = !1, h = e.tag, x = e.result;
1354
- else if (E)
1355
- y(e, "can not read an implicit mapping pair; a colon is missed");
1349
+ if (e.line === o) {
1350
+ for (x = e.input.charCodeAt(e.position); X(x); )
1351
+ x = e.input.charCodeAt(++e.position);
1352
+ if (x === 58)
1353
+ x = e.input.charCodeAt(++e.position), D(x) || v(e, "a whitespace character is expected after the key-value separator within a block mapping"), b && (ie(e, f, h, d, m, null, l, a, s), d = m = g = null), C = !0, b = !1, t = !1, d = e.tag, m = e.result;
1354
+ else if (C)
1355
+ v(e, "can not read an implicit mapping pair; a colon is missed");
1356
1356
  else
1357
- return e.tag = u, e.anchor = s, !0;
1358
- } else if (E)
1359
- y(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
1357
+ return e.tag = c, e.anchor = u, !0;
1358
+ } else if (C)
1359
+ v(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
1360
1360
  else
1361
- return e.tag = u, e.anchor = s, !0;
1361
+ return e.tag = c, e.anchor = u, !0;
1362
1362
  }
1363
- if ((e.line === l || e.lineIndent > n) && (A && (o = e.line, a = e.lineStart, c = e.position), te(e, n, Se, !0, t) && (A ? x = e.result : d = e.result), A || (ie(e, f, g, h, x, d, o, a, c), h = x = d = null), O(e, !0, -1), v = e.input.charCodeAt(e.position)), (e.line === l || e.lineIndent > n) && v !== 0)
1364
- y(e, "bad indentation of a mapping entry");
1363
+ if ((e.line === o || e.lineIndent > n) && (b && (l = e.line, a = e.lineStart, s = e.position), te(e, n, ke, !0, t) && (b ? m = e.result : g = e.result), b || (ie(e, f, h, d, m, g, l, a, s), d = m = g = null), O(e, !0, -1), x = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && x !== 0)
1364
+ v(e, "bad indentation of a mapping entry");
1365
1365
  else if (e.lineIndent < n)
1366
1366
  break;
1367
1367
  }
1368
- return A && ie(e, f, g, h, x, null, o, a, c), E && (e.tag = u, e.anchor = s, e.kind = "mapping", e.result = f), E;
1368
+ return b && ie(e, f, h, d, m, null, l, a, s), C && (e.tag = c, e.anchor = u, e.kind = "mapping", e.result = f), C;
1369
1369
  }
1370
1370
  function ct(e) {
1371
- var n, r = !1, i = !1, t, l, o;
1372
- if (o = e.input.charCodeAt(e.position), o !== 33) return !1;
1373
- if (e.tag !== null && y(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (r = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (i = !0, t = "!!", o = e.input.charCodeAt(++e.position)) : t = "!", n = e.position, r) {
1371
+ var n, r = !1, i = !1, t, o, l;
1372
+ if (l = e.input.charCodeAt(e.position), l !== 33) return !1;
1373
+ if (e.tag !== null && v(e, "duplication of a tag property"), l = e.input.charCodeAt(++e.position), l === 60 ? (r = !0, l = e.input.charCodeAt(++e.position)) : l === 33 ? (i = !0, t = "!!", l = e.input.charCodeAt(++e.position)) : t = "!", n = e.position, r) {
1374
1374
  do
1375
- o = e.input.charCodeAt(++e.position);
1376
- while (o !== 0 && o !== 62);
1377
- e.position < e.length ? (l = e.input.slice(n, e.position), o = e.input.charCodeAt(++e.position)) : y(e, "unexpected end of the stream within a verbatim tag");
1375
+ l = e.input.charCodeAt(++e.position);
1376
+ while (l !== 0 && l !== 62);
1377
+ e.position < e.length ? (o = e.input.slice(n, e.position), l = e.input.charCodeAt(++e.position)) : v(e, "unexpected end of the stream within a verbatim tag");
1378
1378
  } else {
1379
- for (; o !== 0 && !D(o); )
1380
- o === 33 && (i ? y(e, "tag suffix cannot contain exclamation marks") : (t = e.input.slice(n - 1, e.position + 1), or.test(t) || y(e, "named tag handle cannot contain such characters"), i = !0, n = e.position + 1)), o = e.input.charCodeAt(++e.position);
1381
- l = e.input.slice(n, e.position), Xi.test(l) && y(e, "tag suffix cannot contain flow indicator characters");
1379
+ for (; l !== 0 && !D(l); )
1380
+ l === 33 && (i ? v(e, "tag suffix cannot contain exclamation marks") : (t = e.input.slice(n - 1, e.position + 1), or.test(t) || v(e, "named tag handle cannot contain such characters"), i = !0, n = e.position + 1)), l = e.input.charCodeAt(++e.position);
1381
+ o = e.input.slice(n, e.position), Qi.test(o) && v(e, "tag suffix cannot contain flow indicator characters");
1382
1382
  }
1383
- l && !lr.test(l) && y(e, "tag name cannot contain such characters: " + l);
1383
+ o && !lr.test(o) && v(e, "tag name cannot contain such characters: " + o);
1384
1384
  try {
1385
- l = decodeURIComponent(l);
1385
+ o = decodeURIComponent(o);
1386
1386
  } catch {
1387
- y(e, "tag name is malformed: " + l);
1387
+ v(e, "tag name is malformed: " + o);
1388
1388
  }
1389
- return r ? e.tag = l : q.call(e.tagMap, t) ? e.tag = e.tagMap[t] + l : t === "!" ? e.tag = "!" + l : t === "!!" ? e.tag = "tag:yaml.org,2002:" + l : y(e, 'undeclared tag handle "' + t + '"'), !0;
1389
+ return r ? e.tag = o : G.call(e.tagMap, t) ? e.tag = e.tagMap[t] + o : t === "!" ? e.tag = "!" + o : t === "!!" ? e.tag = "tag:yaml.org,2002:" + o : v(e, 'undeclared tag handle "' + t + '"'), !0;
1390
1390
  }
1391
1391
  function ut(e) {
1392
1392
  var n, r;
1393
1393
  if (r = e.input.charCodeAt(e.position), r !== 38) return !1;
1394
- for (e.anchor !== null && y(e, "duplication of an anchor property"), r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !D(r) && !re(r); )
1394
+ for (e.anchor !== null && v(e, "duplication of an anchor property"), r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !D(r) && !re(r); )
1395
1395
  r = e.input.charCodeAt(++e.position);
1396
- return e.position === n && y(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
1396
+ return e.position === n && v(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
1397
1397
  }
1398
- function st(e) {
1398
+ function ft(e) {
1399
1399
  var n, r, i;
1400
1400
  if (i = e.input.charCodeAt(e.position), i !== 42) return !1;
1401
1401
  for (i = e.input.charCodeAt(++e.position), n = e.position; i !== 0 && !D(i) && !re(i); )
1402
1402
  i = e.input.charCodeAt(++e.position);
1403
- return e.position === n && y(e, "name of an alias node must contain at least one character"), r = e.input.slice(n, e.position), q.call(e.anchorMap, r) || y(e, 'unidentified alias "' + r + '"'), e.result = e.anchorMap[r], O(e, !0, -1), !0;
1403
+ return e.position === n && v(e, "name of an alias node must contain at least one character"), r = e.input.slice(n, e.position), G.call(e.anchorMap, r) || v(e, 'unidentified alias "' + r + '"'), e.result = e.anchorMap[r], O(e, !0, -1), !0;
1404
1404
  }
1405
1405
  function te(e, n, r, i, t) {
1406
- var l, o, a, c = 1, u = !1, s = !1, f, g, h, x, d, A;
1407
- if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, l = o = a = Se === r || tr === r, i && O(e, !0, -1) && (u = !0, e.lineIndent > n ? c = 1 : e.lineIndent === n ? c = 0 : e.lineIndent < n && (c = -1)), c === 1)
1406
+ var o, l, a, s = 1, c = !1, u = !1, f, h, d, m, g, b;
1407
+ if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = l = a = ke === r || tr === r, i && O(e, !0, -1) && (c = !0, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)), s === 1)
1408
1408
  for (; ct(e) || ut(e); )
1409
- O(e, !0, -1) ? (u = !0, a = l, e.lineIndent > n ? c = 1 : e.lineIndent === n ? c = 0 : e.lineIndent < n && (c = -1)) : a = !1;
1410
- if (a && (a = u || t), (c === 1 || Se === r) && (Ee === r || ir === r ? d = n : d = n + 1, A = e.position - e.lineStart, c === 1 ? a && (yn(e, A) || at(e, A, d)) || ot(e, d) ? s = !0 : (o && lt(e, d) || it(e, d) || tt(e, d) ? s = !0 : st(e) ? (s = !0, (e.tag !== null || e.anchor !== null) && y(e, "alias node should not have any properties")) : rt(e, d, Ee === r) && (s = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (s = a && yn(e, A))), e.tag === null)
1409
+ O(e, !0, -1) ? (c = !0, a = o, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)) : a = !1;
1410
+ if (a && (a = c || t), (s === 1 || ke === r) && (Ce === r || ir === r ? g = n : g = n + 1, b = e.position - e.lineStart, s === 1 ? a && (mn(e, b) || st(e, b, g)) || lt(e, g) ? u = !0 : (l && at(e, g) || tt(e, g) || ot(e, g) ? u = !0 : ft(e) ? (u = !0, (e.tag !== null || e.anchor !== null) && v(e, "alias node should not have any properties")) : it(e, g, Ce === r) && (u = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (u = a && mn(e, b))), e.tag === null)
1411
1411
  e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
1412
1412
  else if (e.tag === "?") {
1413
- for (e.result !== null && e.kind !== "scalar" && y(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), f = 0, g = e.implicitTypes.length; f < g; f += 1)
1414
- if (x = e.implicitTypes[f], x.resolve(e.result)) {
1415
- e.result = x.construct(e.result), e.tag = x.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
1413
+ for (e.result !== null && e.kind !== "scalar" && v(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), f = 0, h = e.implicitTypes.length; f < h; f += 1)
1414
+ if (m = e.implicitTypes[f], m.resolve(e.result)) {
1415
+ e.result = m.construct(e.result), e.tag = m.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
1416
1416
  break;
1417
1417
  }
1418
1418
  } else if (e.tag !== "!") {
1419
- if (q.call(e.typeMap[e.kind || "fallback"], e.tag))
1420
- x = e.typeMap[e.kind || "fallback"][e.tag];
1419
+ if (G.call(e.typeMap[e.kind || "fallback"], e.tag))
1420
+ m = e.typeMap[e.kind || "fallback"][e.tag];
1421
1421
  else
1422
- for (x = null, h = e.typeMap.multi[e.kind || "fallback"], f = 0, g = h.length; f < g; f += 1)
1423
- if (e.tag.slice(0, h[f].tag.length) === h[f].tag) {
1424
- x = h[f];
1422
+ for (m = null, d = e.typeMap.multi[e.kind || "fallback"], f = 0, h = d.length; f < h; f += 1)
1423
+ if (e.tag.slice(0, d[f].tag.length) === d[f].tag) {
1424
+ m = d[f];
1425
1425
  break;
1426
1426
  }
1427
- x || y(e, "unknown tag !<" + e.tag + ">"), e.result !== null && x.kind !== e.kind && y(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + x.kind + '", not "' + e.kind + '"'), x.resolve(e.result, e.tag) ? (e.result = x.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : y(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
1428
- }
1429
- return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || s;
1430
- }
1431
- function ft(e) {
1432
- var n = e.position, r, i, t, l = !1, o;
1433
- for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (O(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
1434
- for (l = !0, o = e.input.charCodeAt(++e.position), r = e.position; o !== 0 && !D(o); )
1435
- o = e.input.charCodeAt(++e.position);
1436
- for (i = e.input.slice(r, e.position), t = [], i.length < 1 && y(e, "directive name must not be less than one character in length"); o !== 0; ) {
1437
- for (; V(o); )
1438
- o = e.input.charCodeAt(++e.position);
1439
- if (o === 35) {
1427
+ m || v(e, "unknown tag !<" + e.tag + ">"), e.result !== null && m.kind !== e.kind && v(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + m.kind + '", not "' + e.kind + '"'), m.resolve(e.result, e.tag) ? (e.result = m.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : v(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
1428
+ }
1429
+ return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || u;
1430
+ }
1431
+ function pt(e) {
1432
+ var n = e.position, r, i, t, o = !1, l;
1433
+ for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (l = e.input.charCodeAt(e.position)) !== 0 && (O(e, !0, -1), l = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || l !== 37)); ) {
1434
+ for (o = !0, l = e.input.charCodeAt(++e.position), r = e.position; l !== 0 && !D(l); )
1435
+ l = e.input.charCodeAt(++e.position);
1436
+ for (i = e.input.slice(r, e.position), t = [], i.length < 1 && v(e, "directive name must not be less than one character in length"); l !== 0; ) {
1437
+ for (; X(l); )
1438
+ l = e.input.charCodeAt(++e.position);
1439
+ if (l === 35) {
1440
1440
  do
1441
- o = e.input.charCodeAt(++e.position);
1442
- while (o !== 0 && !z(o));
1441
+ l = e.input.charCodeAt(++e.position);
1442
+ while (l !== 0 && !z(l));
1443
1443
  break;
1444
1444
  }
1445
- if (z(o)) break;
1446
- for (r = e.position; o !== 0 && !D(o); )
1447
- o = e.input.charCodeAt(++e.position);
1445
+ if (z(l)) break;
1446
+ for (r = e.position; l !== 0 && !D(l); )
1447
+ l = e.input.charCodeAt(++e.position);
1448
1448
  t.push(e.input.slice(r, e.position));
1449
1449
  }
1450
- o !== 0 && qe(e), q.call(gn, i) ? gn[i](e, i, t) : _e(e, 'unknown document directive "' + i + '"');
1450
+ l !== 0 && qe(e), G.call(hn, i) ? hn[i](e, i, t) : Ee(e, 'unknown document directive "' + i + '"');
1451
1451
  }
1452
- if (O(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, O(e, !0, -1)) : l && y(e, "directives end mark is expected"), te(e, e.lineIndent - 1, Se, !1, !0), O(e, !0, -1), e.checkLineBreaks && Vi.test(e.input.slice(n, e.position)) && _e(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Te(e)) {
1452
+ if (O(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, O(e, !0, -1)) : o && v(e, "directives end mark is expected"), te(e, e.lineIndent - 1, ke, !1, !0), O(e, !0, -1), e.checkLineBreaks && Xi.test(e.input.slice(n, e.position)) && Ee(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Fe(e)) {
1453
1453
  e.input.charCodeAt(e.position) === 46 && (e.position += 3, O(e, !0, -1));
1454
1454
  return;
1455
1455
  }
1456
1456
  if (e.position < e.length - 1)
1457
- y(e, "end of the stream or a document separator is expected");
1457
+ v(e, "end of the stream or a document separator is expected");
1458
1458
  else
1459
1459
  return;
1460
1460
  }
1461
1461
  function fr(e, n) {
1462
1462
  e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
1463
1463
  `), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
1464
- var r = new nt(e, n), i = e.indexOf("\0");
1465
- for (i !== -1 && (r.position = i, y(r, "null byte is not allowed in input")), r.input += "\0"; r.input.charCodeAt(r.position) === 32; )
1464
+ var r = new rt(e, n), i = e.indexOf("\0");
1465
+ for (i !== -1 && (r.position = i, v(r, "null byte is not allowed in input")), r.input += "\0"; r.input.charCodeAt(r.position) === 32; )
1466
1466
  r.lineIndent += 1, r.position += 1;
1467
1467
  for (; r.position < r.length - 1; )
1468
- ft(r);
1468
+ pt(r);
1469
1469
  return r.documents;
1470
1470
  }
1471
- function pt(e, n, r) {
1471
+ function dt(e, n, r) {
1472
1472
  n !== null && typeof n == "object" && typeof r > "u" && (r = n, n = null);
1473
1473
  var i = fr(e, r);
1474
1474
  if (typeof n != "function")
1475
1475
  return i;
1476
- for (var t = 0, l = i.length; t < l; t += 1)
1476
+ for (var t = 0, o = i.length; t < o; t += 1)
1477
1477
  n(i[t]);
1478
1478
  }
1479
1479
  function ht(e, n) {
@@ -1484,10 +1484,10 @@ function ht(e, n) {
1484
1484
  throw new I("expected a single document in the stream, but found more");
1485
1485
  }
1486
1486
  }
1487
- var dt = pt, gt = ht, pr = {
1488
- loadAll: dt,
1489
- load: gt
1490
- }, hr = Object.prototype.toString, dr = Object.prototype.hasOwnProperty, Xe = 65279, mt = 9, pe = 10, yt = 13, xt = 32, vt = 33, bt = 34, Ye = 35, wt = 37, At = 38, Ct = 39, Et = 42, gr = 44, St = 45, ke = 58, _t = 61, kt = 62, Ot = 63, Ft = 64, mr = 91, yr = 93, Tt = 96, xr = 123, Lt = 124, vr = 125, L = {};
1487
+ var gt = dt, mt = ht, pr = {
1488
+ loadAll: gt,
1489
+ load: mt
1490
+ }, dr = Object.prototype.toString, hr = Object.prototype.hasOwnProperty, Ve = 65279, yt = 9, pe = 10, vt = 13, xt = 32, wt = 33, bt = 34, $e = 35, At = 37, Ct = 38, kt = 39, Et = 42, gr = 44, St = 45, Se = 58, _t = 61, Ot = 62, Ft = 63, Tt = 64, mr = 91, yr = 93, Lt = 96, vr = 123, jt = 124, xr = 125, L = {};
1491
1491
  L[0] = "\\0";
1492
1492
  L[7] = "\\a";
1493
1493
  L[8] = "\\b";
@@ -1503,7 +1503,7 @@ L[133] = "\\N";
1503
1503
  L[160] = "\\_";
1504
1504
  L[8232] = "\\L";
1505
1505
  L[8233] = "\\P";
1506
- var jt = [
1506
+ var It = [
1507
1507
  "y",
1508
1508
  "Y",
1509
1509
  "yes",
@@ -1520,15 +1520,15 @@ var jt = [
1520
1520
  "off",
1521
1521
  "Off",
1522
1522
  "OFF"
1523
- ], It = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
1524
- function Nt(e, n) {
1525
- var r, i, t, l, o, a, c;
1523
+ ], Nt = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
1524
+ function Rt(e, n) {
1525
+ var r, i, t, o, l, a, s;
1526
1526
  if (n === null) return {};
1527
- for (r = {}, i = Object.keys(n), t = 0, l = i.length; t < l; t += 1)
1528
- o = i[t], a = String(n[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), c = e.compiledTypeMap.fallback[o], c && dr.call(c.styleAliases, a) && (a = c.styleAliases[a]), r[o] = a;
1527
+ for (r = {}, i = Object.keys(n), t = 0, o = i.length; t < o; t += 1)
1528
+ l = i[t], a = String(n[l]), l.slice(0, 2) === "!!" && (l = "tag:yaml.org,2002:" + l.slice(2)), s = e.compiledTypeMap.fallback[l], s && hr.call(s.styleAliases, a) && (a = s.styleAliases[a]), r[l] = a;
1529
1529
  return r;
1530
1530
  }
1531
- function Rt(e) {
1531
+ function Mt(e) {
1532
1532
  var n, r, i;
1533
1533
  if (n = e.toString(16).toUpperCase(), e <= 255)
1534
1534
  r = "x", i = 2;
@@ -1540,269 +1540,269 @@ function Rt(e) {
1540
1540
  throw new I("code point within a string may not be greater than 0xFFFFFFFF");
1541
1541
  return "\\" + r + F.repeat("0", i - n.length) + n;
1542
1542
  }
1543
- var Mt = 1, he = 2;
1544
- function Pt(e) {
1545
- this.schema = e.schema || Ge, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = F.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Nt(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? he : Mt, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
1543
+ var Pt = 1, de = 2;
1544
+ function Dt(e) {
1545
+ this.schema = e.schema || We, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = F.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Rt(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? de : Pt, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
1546
1546
  }
1547
- function xn(e, n) {
1548
- for (var r = F.repeat(" ", n), i = 0, t = -1, l = "", o, a = e.length; i < a; )
1547
+ function yn(e, n) {
1548
+ for (var r = F.repeat(" ", n), i = 0, t = -1, o = "", l, a = e.length; i < a; )
1549
1549
  t = e.indexOf(`
1550
- `, i), t === -1 ? (o = e.slice(i), i = a) : (o = e.slice(i, t + 1), i = t + 1), o.length && o !== `
1551
- ` && (l += r), l += o;
1552
- return l;
1550
+ `, i), t === -1 ? (l = e.slice(i), i = a) : (l = e.slice(i, t + 1), i = t + 1), l.length && l !== `
1551
+ ` && (o += r), o += l;
1552
+ return o;
1553
1553
  }
1554
- function ze(e, n) {
1554
+ function Ue(e, n) {
1555
1555
  return `
1556
1556
  ` + F.repeat(" ", e.indent * n);
1557
1557
  }
1558
- function Dt(e, n) {
1558
+ function Bt(e, n) {
1559
1559
  var r, i, t;
1560
1560
  for (r = 0, i = e.implicitTypes.length; r < i; r += 1)
1561
1561
  if (t = e.implicitTypes[r], t.resolve(n))
1562
1562
  return !0;
1563
1563
  return !1;
1564
1564
  }
1565
- function Oe(e) {
1566
- return e === xt || e === mt;
1565
+ function _e(e) {
1566
+ return e === xt || e === yt;
1567
1567
  }
1568
- function de(e) {
1569
- return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Xe || 65536 <= e && e <= 1114111;
1568
+ function he(e) {
1569
+ return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Ve || 65536 <= e && e <= 1114111;
1570
1570
  }
1571
1571
  function vn(e) {
1572
- return de(e) && e !== Xe && e !== yt && e !== pe;
1572
+ return he(e) && e !== Ve && e !== vt && e !== pe;
1573
1573
  }
1574
- function bn(e, n, r) {
1575
- var i = vn(e), t = i && !Oe(e);
1574
+ function xn(e, n, r) {
1575
+ var i = vn(e), t = i && !_e(e);
1576
1576
  return (
1577
1577
  // ns-plain-safe
1578
1578
  (r ? (
1579
1579
  // c = flow-in
1580
1580
  i
1581
- ) : i && e !== gr && e !== mr && e !== yr && e !== xr && e !== vr) && e !== Ye && !(n === ke && !t) || vn(n) && !Oe(n) && e === Ye || n === ke && t
1581
+ ) : i && e !== gr && e !== mr && e !== yr && e !== vr && e !== xr) && e !== $e && !(n === Se && !t) || vn(n) && !_e(n) && e === $e || n === Se && t
1582
1582
  );
1583
1583
  }
1584
- function Bt(e) {
1585
- return de(e) && e !== Xe && !Oe(e) && e !== St && e !== Ot && e !== ke && e !== gr && e !== mr && e !== yr && e !== xr && e !== vr && e !== Ye && e !== At && e !== Et && e !== vt && e !== Lt && e !== _t && e !== kt && e !== Ct && e !== bt && e !== wt && e !== Ft && e !== Tt;
1584
+ function $t(e) {
1585
+ return he(e) && e !== Ve && !_e(e) && e !== St && e !== Ft && e !== Se && e !== gr && e !== mr && e !== yr && e !== vr && e !== xr && e !== $e && e !== Ct && e !== Et && e !== wt && e !== jt && e !== _t && e !== Ot && e !== kt && e !== bt && e !== At && e !== Tt && e !== Lt;
1586
1586
  }
1587
1587
  function Ut(e) {
1588
- return !Oe(e) && e !== ke;
1588
+ return !_e(e) && e !== Se;
1589
1589
  }
1590
- function se(e, n) {
1590
+ function ue(e, n) {
1591
1591
  var r = e.charCodeAt(n), i;
1592
1592
  return r >= 55296 && r <= 56319 && n + 1 < e.length && (i = e.charCodeAt(n + 1), i >= 56320 && i <= 57343) ? (r - 55296) * 1024 + i - 56320 + 65536 : r;
1593
1593
  }
1594
- function br(e) {
1594
+ function wr(e) {
1595
1595
  var n = /^\n* /;
1596
1596
  return n.test(e);
1597
1597
  }
1598
- var wr = 1, $e = 2, Ar = 3, Cr = 4, ee = 5;
1599
- function Yt(e, n, r, i, t, l, o, a) {
1600
- var c, u = 0, s = null, f = !1, g = !1, h = i !== -1, x = -1, d = Bt(se(e, 0)) && Ut(se(e, e.length - 1));
1601
- if (n || o)
1602
- for (c = 0; c < e.length; u >= 65536 ? c += 2 : c++) {
1603
- if (u = se(e, c), !de(u))
1604
- return ee;
1605
- d = d && bn(u, s, a), s = u;
1598
+ var br = 1, ze = 2, Ar = 3, Cr = 4, ne = 5;
1599
+ function zt(e, n, r, i, t, o, l, a) {
1600
+ var s, c = 0, u = null, f = !1, h = !1, d = i !== -1, m = -1, g = $t(ue(e, 0)) && Ut(ue(e, e.length - 1));
1601
+ if (n || l)
1602
+ for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
1603
+ if (c = ue(e, s), !he(c))
1604
+ return ne;
1605
+ g = g && xn(c, u, a), u = c;
1606
1606
  }
1607
1607
  else {
1608
- for (c = 0; c < e.length; u >= 65536 ? c += 2 : c++) {
1609
- if (u = se(e, c), u === pe)
1610
- f = !0, h && (g = g || // Foldable line = too long, and not more-indented.
1611
- c - x - 1 > i && e[x + 1] !== " ", x = c);
1612
- else if (!de(u))
1613
- return ee;
1614
- d = d && bn(u, s, a), s = u;
1608
+ for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
1609
+ if (c = ue(e, s), c === pe)
1610
+ f = !0, d && (h = h || // Foldable line = too long, and not more-indented.
1611
+ s - m - 1 > i && e[m + 1] !== " ", m = s);
1612
+ else if (!he(c))
1613
+ return ne;
1614
+ g = g && xn(c, u, a), u = c;
1615
1615
  }
1616
- g = g || h && c - x - 1 > i && e[x + 1] !== " ";
1616
+ h = h || d && s - m - 1 > i && e[m + 1] !== " ";
1617
1617
  }
1618
- return !f && !g ? d && !o && !t(e) ? wr : l === he ? ee : $e : r > 9 && br(e) ? ee : o ? l === he ? ee : $e : g ? Cr : Ar;
1618
+ return !f && !h ? g && !l && !t(e) ? br : o === de ? ne : ze : r > 9 && wr(e) ? ne : l ? o === de ? ne : ze : h ? Cr : Ar;
1619
1619
  }
1620
- function zt(e, n, r, i, t) {
1620
+ function Yt(e, n, r, i, t) {
1621
1621
  e.dump = (function() {
1622
1622
  if (n.length === 0)
1623
- return e.quotingType === he ? '""' : "''";
1624
- if (!e.noCompatMode && (jt.indexOf(n) !== -1 || It.test(n)))
1625
- return e.quotingType === he ? '"' + n + '"' : "'" + n + "'";
1626
- var l = e.indent * Math.max(1, r), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - l), a = i || e.flowLevel > -1 && r >= e.flowLevel;
1627
- function c(u) {
1628
- return Dt(e, u);
1623
+ return e.quotingType === de ? '""' : "''";
1624
+ if (!e.noCompatMode && (It.indexOf(n) !== -1 || Nt.test(n)))
1625
+ return e.quotingType === de ? '"' + n + '"' : "'" + n + "'";
1626
+ var o = e.indent * Math.max(1, r), l = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), a = i || e.flowLevel > -1 && r >= e.flowLevel;
1627
+ function s(c) {
1628
+ return Bt(e, c);
1629
1629
  }
1630
- switch (Yt(
1630
+ switch (zt(
1631
1631
  n,
1632
1632
  a,
1633
1633
  e.indent,
1634
- o,
1635
- c,
1634
+ l,
1635
+ s,
1636
1636
  e.quotingType,
1637
1637
  e.forceQuotes && !i,
1638
1638
  t
1639
1639
  )) {
1640
- case wr:
1640
+ case br:
1641
1641
  return n;
1642
- case $e:
1642
+ case ze:
1643
1643
  return "'" + n.replace(/'/g, "''") + "'";
1644
1644
  case Ar:
1645
- return "|" + wn(n, e.indent) + An(xn(n, l));
1645
+ return "|" + wn(n, e.indent) + bn(yn(n, o));
1646
1646
  case Cr:
1647
- return ">" + wn(n, e.indent) + An(xn($t(n, o), l));
1648
- case ee:
1649
- return '"' + Ht(n) + '"';
1647
+ return ">" + wn(n, e.indent) + bn(yn(Ht(n, l), o));
1648
+ case ne:
1649
+ return '"' + Kt(n) + '"';
1650
1650
  default:
1651
1651
  throw new I("impossible error: invalid scalar style");
1652
1652
  }
1653
1653
  })();
1654
1654
  }
1655
1655
  function wn(e, n) {
1656
- var r = br(e) ? String(n) : "", i = e[e.length - 1] === `
1656
+ var r = wr(e) ? String(n) : "", i = e[e.length - 1] === `
1657
1657
  `, t = i && (e[e.length - 2] === `
1658
1658
  ` || e === `
1659
- `), l = t ? "+" : i ? "" : "-";
1660
- return r + l + `
1659
+ `), o = t ? "+" : i ? "" : "-";
1660
+ return r + o + `
1661
1661
  `;
1662
1662
  }
1663
- function An(e) {
1663
+ function bn(e) {
1664
1664
  return e[e.length - 1] === `
1665
1665
  ` ? e.slice(0, -1) : e;
1666
1666
  }
1667
- function $t(e, n) {
1667
+ function Ht(e, n) {
1668
1668
  for (var r = /(\n+)([^\n]*)/g, i = (function() {
1669
- var u = e.indexOf(`
1669
+ var c = e.indexOf(`
1670
1670
  `);
1671
- return u = u !== -1 ? u : e.length, r.lastIndex = u, Cn(e.slice(0, u), n);
1671
+ return c = c !== -1 ? c : e.length, r.lastIndex = c, An(e.slice(0, c), n);
1672
1672
  })(), t = e[0] === `
1673
- ` || e[0] === " ", l, o; o = r.exec(e); ) {
1674
- var a = o[1], c = o[2];
1675
- l = c[0] === " ", i += a + (!t && !l && c !== "" ? `
1676
- ` : "") + Cn(c, n), t = l;
1673
+ ` || e[0] === " ", o, l; l = r.exec(e); ) {
1674
+ var a = l[1], s = l[2];
1675
+ o = s[0] === " ", i += a + (!t && !o && s !== "" ? `
1676
+ ` : "") + An(s, n), t = o;
1677
1677
  }
1678
1678
  return i;
1679
1679
  }
1680
- function Cn(e, n) {
1680
+ function An(e, n) {
1681
1681
  if (e === "" || e[0] === " ") return e;
1682
- for (var r = / [^ ]/g, i, t = 0, l, o = 0, a = 0, c = ""; i = r.exec(e); )
1683
- a = i.index, a - t > n && (l = o > t ? o : a, c += `
1684
- ` + e.slice(t, l), t = l + 1), o = a;
1685
- return c += `
1686
- `, e.length - t > n && o > t ? c += e.slice(t, o) + `
1687
- ` + e.slice(o + 1) : c += e.slice(t), c.slice(1);
1688
- }
1689
- function Ht(e) {
1682
+ for (var r = / [^ ]/g, i, t = 0, o, l = 0, a = 0, s = ""; i = r.exec(e); )
1683
+ a = i.index, a - t > n && (o = l > t ? l : a, s += `
1684
+ ` + e.slice(t, o), t = o + 1), l = a;
1685
+ return s += `
1686
+ `, e.length - t > n && l > t ? s += e.slice(t, l) + `
1687
+ ` + e.slice(l + 1) : s += e.slice(t), s.slice(1);
1688
+ }
1689
+ function Kt(e) {
1690
1690
  for (var n = "", r = 0, i, t = 0; t < e.length; r >= 65536 ? t += 2 : t++)
1691
- r = se(e, t), i = L[r], !i && de(r) ? (n += e[t], r >= 65536 && (n += e[t + 1])) : n += i || Rt(r);
1691
+ r = ue(e, t), i = L[r], !i && he(r) ? (n += e[t], r >= 65536 && (n += e[t + 1])) : n += i || Mt(r);
1692
1692
  return n;
1693
1693
  }
1694
- function Kt(e, n, r) {
1695
- var i = "", t = e.tag, l, o, a;
1696
- for (l = 0, o = r.length; l < o; l += 1)
1697
- a = r[l], e.replacer && (a = e.replacer.call(r, String(l), a)), (H(e, n, a, !1, !1) || typeof a > "u" && H(e, n, null, !1, !1)) && (i !== "" && (i += "," + (e.condenseFlow ? "" : " ")), i += e.dump);
1694
+ function Wt(e, n, r) {
1695
+ var i = "", t = e.tag, o, l, a;
1696
+ for (o = 0, l = r.length; o < l; o += 1)
1697
+ a = r[o], e.replacer && (a = e.replacer.call(r, String(o), a)), (K(e, n, a, !1, !1) || typeof a > "u" && K(e, n, null, !1, !1)) && (i !== "" && (i += "," + (e.condenseFlow ? "" : " ")), i += e.dump);
1698
1698
  e.tag = t, e.dump = "[" + i + "]";
1699
1699
  }
1700
- function En(e, n, r, i) {
1701
- var t = "", l = e.tag, o, a, c;
1702
- for (o = 0, a = r.length; o < a; o += 1)
1703
- c = r[o], e.replacer && (c = e.replacer.call(r, String(o), c)), (H(e, n + 1, c, !0, !0, !1, !0) || typeof c > "u" && H(e, n + 1, null, !0, !0, !1, !0)) && ((!i || t !== "") && (t += ze(e, n)), e.dump && pe === e.dump.charCodeAt(0) ? t += "-" : t += "- ", t += e.dump);
1704
- e.tag = l, e.dump = t || "[]";
1700
+ function Cn(e, n, r, i) {
1701
+ var t = "", o = e.tag, l, a, s;
1702
+ for (l = 0, a = r.length; l < a; l += 1)
1703
+ s = r[l], e.replacer && (s = e.replacer.call(r, String(l), s)), (K(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && K(e, n + 1, null, !0, !0, !1, !0)) && ((!i || t !== "") && (t += Ue(e, n)), e.dump && pe === e.dump.charCodeAt(0) ? t += "-" : t += "- ", t += e.dump);
1704
+ e.tag = o, e.dump = t || "[]";
1705
1705
  }
1706
- function Wt(e, n, r) {
1707
- var i = "", t = e.tag, l = Object.keys(r), o, a, c, u, s;
1708
- for (o = 0, a = l.length; o < a; o += 1)
1709
- s = "", i !== "" && (s += ", "), e.condenseFlow && (s += '"'), c = l[o], u = r[c], e.replacer && (u = e.replacer.call(r, c, u)), H(e, n, c, !1, !1) && (e.dump.length > 1024 && (s += "? "), s += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), H(e, n, u, !1, !1) && (s += e.dump, i += s));
1706
+ function qt(e, n, r) {
1707
+ var i = "", t = e.tag, o = Object.keys(r), l, a, s, c, u;
1708
+ for (l = 0, a = o.length; l < a; l += 1)
1709
+ u = "", i !== "" && (u += ", "), e.condenseFlow && (u += '"'), s = o[l], c = r[s], e.replacer && (c = e.replacer.call(r, s, c)), K(e, n, s, !1, !1) && (e.dump.length > 1024 && (u += "? "), u += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), K(e, n, c, !1, !1) && (u += e.dump, i += u));
1710
1710
  e.tag = t, e.dump = "{" + i + "}";
1711
1711
  }
1712
1712
  function Gt(e, n, r, i) {
1713
- var t = "", l = e.tag, o = Object.keys(r), a, c, u, s, f, g;
1713
+ var t = "", o = e.tag, l = Object.keys(r), a, s, c, u, f, h;
1714
1714
  if (e.sortKeys === !0)
1715
- o.sort();
1715
+ l.sort();
1716
1716
  else if (typeof e.sortKeys == "function")
1717
- o.sort(e.sortKeys);
1717
+ l.sort(e.sortKeys);
1718
1718
  else if (e.sortKeys)
1719
1719
  throw new I("sortKeys must be a boolean or a function");
1720
- for (a = 0, c = o.length; a < c; a += 1)
1721
- g = "", (!i || t !== "") && (g += ze(e, n)), u = o[a], s = r[u], e.replacer && (s = e.replacer.call(r, u, s)), H(e, n + 1, u, !0, !0, !0) && (f = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, f && (e.dump && pe === e.dump.charCodeAt(0) ? g += "?" : g += "? "), g += e.dump, f && (g += ze(e, n)), H(e, n + 1, s, !0, f) && (e.dump && pe === e.dump.charCodeAt(0) ? g += ":" : g += ": ", g += e.dump, t += g));
1722
- e.tag = l, e.dump = t || "{}";
1723
- }
1724
- function Sn(e, n, r) {
1725
- var i, t, l, o, a, c;
1726
- for (t = r ? e.explicitTypes : e.implicitTypes, l = 0, o = t.length; l < o; l += 1)
1727
- if (a = t[l], (a.instanceOf || a.predicate) && (!a.instanceOf || typeof n == "object" && n instanceof a.instanceOf) && (!a.predicate || a.predicate(n))) {
1720
+ for (a = 0, s = l.length; a < s; a += 1)
1721
+ h = "", (!i || t !== "") && (h += Ue(e, n)), c = l[a], u = r[c], e.replacer && (u = e.replacer.call(r, c, u)), K(e, n + 1, c, !0, !0, !0) && (f = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, f && (e.dump && pe === e.dump.charCodeAt(0) ? h += "?" : h += "? "), h += e.dump, f && (h += Ue(e, n)), K(e, n + 1, u, !0, f) && (e.dump && pe === e.dump.charCodeAt(0) ? h += ":" : h += ": ", h += e.dump, t += h));
1722
+ e.tag = o, e.dump = t || "{}";
1723
+ }
1724
+ function kn(e, n, r) {
1725
+ var i, t, o, l, a, s;
1726
+ for (t = r ? e.explicitTypes : e.implicitTypes, o = 0, l = t.length; o < l; o += 1)
1727
+ if (a = t[o], (a.instanceOf || a.predicate) && (!a.instanceOf || typeof n == "object" && n instanceof a.instanceOf) && (!a.predicate || a.predicate(n))) {
1728
1728
  if (r ? a.multi && a.representName ? e.tag = a.representName(n) : e.tag = a.tag : e.tag = "?", a.represent) {
1729
- if (c = e.styleMap[a.tag] || a.defaultStyle, hr.call(a.represent) === "[object Function]")
1730
- i = a.represent(n, c);
1731
- else if (dr.call(a.represent, c))
1732
- i = a.represent[c](n, c);
1729
+ if (s = e.styleMap[a.tag] || a.defaultStyle, dr.call(a.represent) === "[object Function]")
1730
+ i = a.represent(n, s);
1731
+ else if (hr.call(a.represent, s))
1732
+ i = a.represent[s](n, s);
1733
1733
  else
1734
- throw new I("!<" + a.tag + '> tag resolver accepts not "' + c + '" style');
1734
+ throw new I("!<" + a.tag + '> tag resolver accepts not "' + s + '" style');
1735
1735
  e.dump = i;
1736
1736
  }
1737
1737
  return !0;
1738
1738
  }
1739
1739
  return !1;
1740
1740
  }
1741
- function H(e, n, r, i, t, l, o) {
1742
- e.tag = null, e.dump = r, Sn(e, r, !1) || Sn(e, r, !0);
1743
- var a = hr.call(e.dump), c = i, u;
1741
+ function K(e, n, r, i, t, o, l) {
1742
+ e.tag = null, e.dump = r, kn(e, r, !1) || kn(e, r, !0);
1743
+ var a = dr.call(e.dump), s = i, c;
1744
1744
  i && (i = e.flowLevel < 0 || e.flowLevel > n);
1745
- var s = a === "[object Object]" || a === "[object Array]", f, g;
1746
- if (s && (f = e.duplicates.indexOf(r), g = f !== -1), (e.tag !== null && e.tag !== "?" || g || e.indent !== 2 && n > 0) && (t = !1), g && e.usedDuplicates[f])
1745
+ var u = a === "[object Object]" || a === "[object Array]", f, h;
1746
+ if (u && (f = e.duplicates.indexOf(r), h = f !== -1), (e.tag !== null && e.tag !== "?" || h || e.indent !== 2 && n > 0) && (t = !1), h && e.usedDuplicates[f])
1747
1747
  e.dump = "*ref_" + f;
1748
1748
  else {
1749
- if (s && g && !e.usedDuplicates[f] && (e.usedDuplicates[f] = !0), a === "[object Object]")
1750
- i && Object.keys(e.dump).length !== 0 ? (Gt(e, n, e.dump, t), g && (e.dump = "&ref_" + f + e.dump)) : (Wt(e, n, e.dump), g && (e.dump = "&ref_" + f + " " + e.dump));
1749
+ if (u && h && !e.usedDuplicates[f] && (e.usedDuplicates[f] = !0), a === "[object Object]")
1750
+ i && Object.keys(e.dump).length !== 0 ? (Gt(e, n, e.dump, t), h && (e.dump = "&ref_" + f + e.dump)) : (qt(e, n, e.dump), h && (e.dump = "&ref_" + f + " " + e.dump));
1751
1751
  else if (a === "[object Array]")
1752
- i && e.dump.length !== 0 ? (e.noArrayIndent && !o && n > 0 ? En(e, n - 1, e.dump, t) : En(e, n, e.dump, t), g && (e.dump = "&ref_" + f + e.dump)) : (Kt(e, n, e.dump), g && (e.dump = "&ref_" + f + " " + e.dump));
1752
+ i && e.dump.length !== 0 ? (e.noArrayIndent && !l && n > 0 ? Cn(e, n - 1, e.dump, t) : Cn(e, n, e.dump, t), h && (e.dump = "&ref_" + f + e.dump)) : (Wt(e, n, e.dump), h && (e.dump = "&ref_" + f + " " + e.dump));
1753
1753
  else if (a === "[object String]")
1754
- e.tag !== "?" && zt(e, e.dump, n, l, c);
1754
+ e.tag !== "?" && Yt(e, e.dump, n, o, s);
1755
1755
  else {
1756
1756
  if (a === "[object Undefined]")
1757
1757
  return !1;
1758
1758
  if (e.skipInvalid) return !1;
1759
1759
  throw new I("unacceptable kind of an object to dump " + a);
1760
1760
  }
1761
- e.tag !== null && e.tag !== "?" && (u = encodeURI(
1761
+ e.tag !== null && e.tag !== "?" && (c = encodeURI(
1762
1762
  e.tag[0] === "!" ? e.tag.slice(1) : e.tag
1763
- ).replace(/!/g, "%21"), e.tag[0] === "!" ? u = "!" + u : u.slice(0, 18) === "tag:yaml.org,2002:" ? u = "!!" + u.slice(18) : u = "!<" + u + ">", e.dump = u + " " + e.dump);
1763
+ ).replace(/!/g, "%21"), e.tag[0] === "!" ? c = "!" + c : c.slice(0, 18) === "tag:yaml.org,2002:" ? c = "!!" + c.slice(18) : c = "!<" + c + ">", e.dump = c + " " + e.dump);
1764
1764
  }
1765
1765
  return !0;
1766
1766
  }
1767
- function qt(e, n) {
1768
- var r = [], i = [], t, l;
1769
- for (He(e, r, i), t = 0, l = i.length; t < l; t += 1)
1767
+ function Vt(e, n) {
1768
+ var r = [], i = [], t, o;
1769
+ for (Ye(e, r, i), t = 0, o = i.length; t < o; t += 1)
1770
1770
  n.duplicates.push(r[i[t]]);
1771
- n.usedDuplicates = new Array(l);
1771
+ n.usedDuplicates = new Array(o);
1772
1772
  }
1773
- function He(e, n, r) {
1774
- var i, t, l;
1773
+ function Ye(e, n, r) {
1774
+ var i, t, o;
1775
1775
  if (e !== null && typeof e == "object")
1776
1776
  if (t = n.indexOf(e), t !== -1)
1777
1777
  r.indexOf(t) === -1 && r.push(t);
1778
1778
  else if (n.push(e), Array.isArray(e))
1779
- for (t = 0, l = e.length; t < l; t += 1)
1780
- He(e[t], n, r);
1779
+ for (t = 0, o = e.length; t < o; t += 1)
1780
+ Ye(e[t], n, r);
1781
1781
  else
1782
- for (i = Object.keys(e), t = 0, l = i.length; t < l; t += 1)
1783
- He(e[i[t]], n, r);
1782
+ for (i = Object.keys(e), t = 0, o = i.length; t < o; t += 1)
1783
+ Ye(e[i[t]], n, r);
1784
1784
  }
1785
- function Vt(e, n) {
1785
+ function Xt(e, n) {
1786
1786
  n = n || {};
1787
- var r = new Pt(n);
1788
- r.noRefs || qt(e, r);
1787
+ var r = new Dt(n);
1788
+ r.noRefs || Vt(e, r);
1789
1789
  var i = e;
1790
- return r.replacer && (i = r.replacer.call({ "": i }, "", i)), H(r, 0, i, !0, !0) ? r.dump + `
1790
+ return r.replacer && (i = r.replacer.call({ "": i }, "", i)), K(r, 0, i, !0, !0) ? r.dump + `
1791
1791
  ` : "";
1792
1792
  }
1793
- var Xt = Vt, Qt = {
1794
- dump: Xt
1793
+ var Qt = Xt, Jt = {
1794
+ dump: Qt
1795
1795
  };
1796
- function Qe(e, n) {
1796
+ function Xe(e, n) {
1797
1797
  return function() {
1798
1798
  throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
1799
1799
  };
1800
1800
  }
1801
- var Jt = T, Zt = Dn, eo = zn, no = Gn, ro = qn, io = Ge, to = pr.load, oo = pr.loadAll, lo = Qt.dump, ao = I, co = {
1801
+ var Zt = T, eo = Dn, no = zn, ro = qn, io = Gn, to = We, oo = pr.load, lo = pr.loadAll, ao = Jt.dump, so = I, co = {
1802
1802
  binary: Zn,
1803
1803
  float: Wn,
1804
- map: Yn,
1805
- null: $n,
1804
+ map: Un,
1805
+ null: Yn,
1806
1806
  pairs: nr,
1807
1807
  set: rr,
1808
1808
  timestamp: Qn,
@@ -1810,58 +1810,58 @@ var Jt = T, Zt = Dn, eo = zn, no = Gn, ro = qn, io = Ge, to = pr.load, oo = pr.l
1810
1810
  int: Kn,
1811
1811
  merge: Jn,
1812
1812
  omap: er,
1813
- seq: Un,
1813
+ seq: $n,
1814
1814
  str: Bn
1815
- }, uo = Qe("safeLoad", "load"), so = Qe("safeLoadAll", "loadAll"), fo = Qe("safeDump", "dump"), _n = {
1816
- Type: Jt,
1817
- Schema: Zt,
1818
- FAILSAFE_SCHEMA: eo,
1819
- JSON_SCHEMA: no,
1820
- CORE_SCHEMA: ro,
1821
- DEFAULT_SCHEMA: io,
1822
- load: to,
1823
- loadAll: oo,
1824
- dump: lo,
1825
- YAMLException: ao,
1815
+ }, uo = Xe("safeLoad", "load"), fo = Xe("safeLoadAll", "loadAll"), po = Xe("safeDump", "dump"), En = {
1816
+ Type: Zt,
1817
+ Schema: eo,
1818
+ FAILSAFE_SCHEMA: no,
1819
+ JSON_SCHEMA: ro,
1820
+ CORE_SCHEMA: io,
1821
+ DEFAULT_SCHEMA: to,
1822
+ load: oo,
1823
+ loadAll: lo,
1824
+ dump: ao,
1825
+ YAMLException: so,
1826
1826
  types: co,
1827
1827
  safeLoad: uo,
1828
- safeLoadAll: so,
1829
- safeDump: fo
1828
+ safeLoadAll: fo,
1829
+ safeDump: po
1830
1830
  };
1831
- const we = (e, n) => {
1831
+ const be = (e) => e instanceof Error ? e.message : String(e), Ae = (e, n) => {
1832
1832
  if (e && typeof e == "object" && !Array.isArray(e))
1833
1833
  return e;
1834
1834
  throw new Error(`Parsed --strings as ${n}, but it was not an object.`);
1835
- }, Ae = (e) => e instanceof Error ? e.message : String(e), Ce = (e, n) => {
1835
+ }, ho = (e, n) => {
1836
1836
  const r = e.trim();
1837
1837
  if (!r)
1838
1838
  return {};
1839
1839
  if (n === "json")
1840
1840
  try {
1841
- return we(Be.parse(r), "json");
1841
+ return Ae(De.parse(r), "json");
1842
1842
  } catch (t) {
1843
- throw new Error(`Failed to parse --strings as JSON. Hint: check --strings-format=json. ${Ae(t)}`);
1843
+ throw new Error(`Failed to parse --strings as JSON. Hint: check --strings-format=json. ${be(t)}`);
1844
1844
  }
1845
1845
  if (n === "yaml")
1846
1846
  try {
1847
- return we(_n.load(r), "yaml");
1847
+ return Ae(En.load(r), "yaml");
1848
1848
  } catch (t) {
1849
- throw new Error(`Failed to parse --strings as YAML. Hint: check --strings-format=yaml. ${Ae(t)}`);
1849
+ throw new Error(`Failed to parse --strings as YAML. Hint: check --strings-format=yaml. ${be(t)}`);
1850
1850
  }
1851
1851
  const i = [];
1852
1852
  try {
1853
- return we(_n.load(r), "yaml");
1853
+ return Ae(En.load(r), "yaml");
1854
1854
  } catch (t) {
1855
- i.push(`yaml error: ${Ae(t)}`);
1855
+ i.push(`yaml error: ${be(t)}`);
1856
1856
  }
1857
1857
  try {
1858
- return we(Be.parse(r), "json");
1858
+ return Ae(De.parse(r), "json");
1859
1859
  } catch (t) {
1860
- i.push(`json error: ${Ae(t)}`);
1860
+ i.push(`json error: ${be(t)}`);
1861
1861
  }
1862
1862
  throw new Error(`Failed to parse --strings input. Provide valid YAML or JSON, or specify --strings-format. ${i.join(" | ")}`);
1863
1863
  };
1864
- async function Er() {
1864
+ async function kr() {
1865
1865
  return new Promise((e) => {
1866
1866
  let n = "";
1867
1867
  process.stdin.setEncoding("utf8"), process.stdin.on("data", (r) => {
@@ -1871,48 +1871,126 @@ async function Er() {
1871
1871
  }), process.stdin.readableEnded && e("");
1872
1872
  });
1873
1873
  }
1874
- async function po(e, n = Er, r = "auto") {
1875
- if (e !== void 0) {
1876
- if (e === "") {
1877
- const i = await n();
1878
- return i.trim() ? Ce(i, r) : void 0;
1879
- }
1880
- if (typeof e == "string")
1881
- return Ce(e, r);
1882
- if (Array.isArray(e)) {
1883
- const i = {};
1884
- for (const t of e)
1885
- typeof t == "string" && Object.assign(i, Ce(t, r));
1886
- return i;
1887
- }
1888
- if (typeof e == "boolean" && e === !0) {
1889
- const i = await n();
1890
- return i.trim() ? Ce(i, r) : void 0;
1874
+ const Er = (e, n) => {
1875
+ if (e === void 0) return;
1876
+ if (!e || typeof e != "object" || Array.isArray(e))
1877
+ throw new Error(`${n} must be an object of language -> text.`);
1878
+ const r = {};
1879
+ for (const [i, t] of Object.entries(e)) {
1880
+ if (typeof t != "string")
1881
+ throw new Error(`${n} for "${i}" must be a string.`);
1882
+ r[i] = t;
1883
+ }
1884
+ return r;
1885
+ }, go = (e, n) => {
1886
+ if (e == null)
1887
+ return {};
1888
+ if (typeof e == "string")
1889
+ return { comment: e };
1890
+ if (typeof e != "object" || Array.isArray(e))
1891
+ throw new Error(`Value for "${n}" must be an object.`);
1892
+ const r = e, i = {};
1893
+ typeof r.comment == "string" && (i.comment = r.comment);
1894
+ const t = Er(r.translations, `translations for "${n}"`) || {}, o = {};
1895
+ for (const [a, s] of Object.entries(r))
1896
+ a === "comment" || a === "translations" || typeof s == "string" && (o[a] = s);
1897
+ const l = { ...t, ...o };
1898
+ return Object.keys(l).length > 0 && (i.translations = l), i;
1899
+ }, mo = (e) => Object.values(e).every((n) => typeof n == "string"), yo = (e) => {
1900
+ if (mo(e))
1901
+ return { kind: "single", translations: e };
1902
+ if (Object.keys(e).every((i) => i === "translations" || i === "comment") && "translations" in e) {
1903
+ const i = Er(e.translations, "translations") || {}, t = typeof e.comment == "string" ? e.comment : void 0;
1904
+ return { kind: "single", translations: i, comment: t };
1905
+ }
1906
+ const r = {};
1907
+ for (const [i, t] of Object.entries(e))
1908
+ r[i] = go(t, i);
1909
+ return { kind: "multi", entries: r };
1910
+ }, vo = (e, n) => {
1911
+ if (!e) return n;
1912
+ if (e.kind !== n.kind)
1913
+ throw new Error("Cannot merge single and multi --strings payloads. Provide one consistent shape.");
1914
+ if (e.kind === "single" && n.kind === "single")
1915
+ return {
1916
+ kind: "single",
1917
+ translations: { ...e.translations, ...n.translations },
1918
+ comment: e.comment ?? n.comment
1919
+ };
1920
+ if (e.kind === "multi" && n.kind === "multi") {
1921
+ const r = { ...e.entries };
1922
+ for (const [i, t] of Object.entries(n.entries)) {
1923
+ const o = r[i] || {};
1924
+ r[i] = {
1925
+ comment: t.comment ?? o.comment,
1926
+ translations: { ...o.translations || {}, ...t.translations || {} }
1927
+ };
1891
1928
  }
1929
+ return { kind: "multi", entries: r };
1930
+ }
1931
+ return e;
1932
+ };
1933
+ async function xo(e, n = kr, r = "auto") {
1934
+ if (e === void 0)
1935
+ return;
1936
+ const i = async (t) => {
1937
+ if (t.trim())
1938
+ return yo(ho(t, r));
1939
+ };
1940
+ if (e === "") {
1941
+ const t = await n();
1942
+ return i(t);
1943
+ }
1944
+ if (typeof e == "string")
1945
+ return i(e);
1946
+ if (Array.isArray(e)) {
1947
+ let t;
1948
+ for (const o of e)
1949
+ if (typeof o == "string") {
1950
+ const l = await i(o);
1951
+ l && (t = vo(t, l));
1952
+ }
1953
+ return t;
1954
+ }
1955
+ if (typeof e == "boolean" && e === !0) {
1956
+ const t = await n();
1957
+ return i(t);
1892
1958
  }
1893
1959
  }
1894
- async function ho({
1960
+ async function wo({
1895
1961
  path: e,
1896
1962
  key: n,
1897
1963
  comment: r,
1898
1964
  stringsArg: i,
1899
1965
  stringsFormat: t,
1900
- defaultString: l,
1901
- language: o,
1902
- stdinReader: a = Er,
1903
- configPath: c
1966
+ defaultString: o,
1967
+ language: l,
1968
+ stdinReader: a = kr,
1969
+ configPath: s
1904
1970
  }) {
1905
- const u = await po(i, a, t);
1906
- await mo(e, n, r, u, c, l, o);
1971
+ const c = await xo(i, a, t);
1972
+ if (c?.kind === "multi") {
1973
+ if (n || r || o !== void 0 || l)
1974
+ throw new Error("When adding multiple strings via --strings payload, omit --key, --comment, --text, and --language.");
1975
+ const d = [];
1976
+ for (const [m, g] of Object.entries(c.entries))
1977
+ await Sn(e, m, g.comment, g.translations, s, void 0, void 0), d.push(m);
1978
+ return { kind: "multi", keys: d };
1979
+ }
1980
+ const u = n;
1981
+ if (!u)
1982
+ throw new Error("--key is required unless the --strings payload contains multiple keys.");
1983
+ const f = c?.kind === "single" ? c.translations : void 0, h = c?.kind === "single" ? c.comment : void 0;
1984
+ return await Sn(e, u, r ?? h, f, s, o, l), { kind: "single", keys: [u] };
1907
1985
  }
1908
- function go() {
1986
+ function bo() {
1909
1987
  return {
1910
1988
  command: "add",
1911
1989
  describe: "Add a string",
1912
1990
  builder: (e) => e.option("key", {
1913
1991
  type: "string",
1914
- describe: "The key of the string",
1915
- demandOption: !0
1992
+ describe: "The key of the string (omit when adding multiple keys via --strings)",
1993
+ demandOption: !1
1916
1994
  }).option("comment", {
1917
1995
  type: "string",
1918
1996
  describe: "The comment for the string"
@@ -1933,7 +2011,7 @@ function go() {
1933
2011
  describe: "Format for the data provided with --strings"
1934
2012
  }),
1935
2013
  handler: async (e) => {
1936
- await ho({
2014
+ const n = await wo({
1937
2015
  path: e.path,
1938
2016
  key: e.key,
1939
2017
  comment: e.comment,
@@ -1943,55 +2021,58 @@ function go() {
1943
2021
  language: e.language,
1944
2022
  stdinReader: void 0,
1945
2023
  configPath: e.config
1946
- }), ne.info(C.green(`✓ Added key "${e.key}"`));
2024
+ });
2025
+ V.info(k.green(`✓ Added keys:
2026
+ ${n.keys.map((r) => `- ${r}`).join(`
2027
+ `)}`));
1947
2028
  }
1948
2029
  };
1949
2030
  }
1950
- async function mo(e, n, r, i, t, l, o) {
2031
+ async function Sn(e, n, r, i, t, o, l) {
1951
2032
  const a = await me(e);
1952
2033
  if (!a.sourceLanguage)
1953
2034
  throw new Error('The xcstrings file is missing "sourceLanguage".');
1954
- const c = a.sourceLanguage;
2035
+ const s = a.sourceLanguage;
1955
2036
  a.strings || (a.strings = {});
1956
- const s = (await Ke(t))?.missingLanguagePolicy || "skip";
2037
+ const u = (await He(t))?.missingLanguagePolicy || "skip";
1957
2038
  let f;
1958
- const g = async (d) => s === "include" ? !0 : (f || (f = await Rn(e, t)), f.includes(d)), h = {
2039
+ const h = async (b) => u === "include" ? !0 : (f || (f = await Rn(e, t)), f.includes(b)), d = (b) => {
2040
+ V.warn(`Language "${b}" is not supported. Skipped adding its translation (missingLanguagePolicy=skip).`);
2041
+ }, m = {
1959
2042
  ...a.strings[n],
1960
2043
  extractionState: "manual"
1961
2044
  };
1962
- if (r && (h.comment = r), l !== void 0) {
1963
- const d = o ?? c;
1964
- if (!await g(d))
1965
- throw new Error(`Language "${d}" is not supported.`);
1966
- h.localizations = h.localizations || {}, h.localizations[d] = {
2045
+ if (r && (m.comment = r), o !== void 0) {
2046
+ const b = l ?? s;
2047
+ await h(b) ? (m.localizations = m.localizations || {}, m.localizations[b] = {
1967
2048
  stringUnit: {
1968
2049
  state: "translated",
1969
- value: l
2050
+ value: o
1970
2051
  }
1971
- };
2052
+ }) : d(b);
1972
2053
  }
1973
- const x = i ? { ...i } : void 0;
1974
- if (x) {
1975
- const d = [];
1976
- for (const [A, E] of Object.entries(x)) {
1977
- if (l !== void 0 && A === (o ?? c))
2054
+ const g = i ? { ...i } : void 0;
2055
+ if (g) {
2056
+ const b = [];
2057
+ for (const [C, x] of Object.entries(g)) {
2058
+ if (o !== void 0 && C === (l ?? s))
1978
2059
  continue;
1979
- (s === "include" ? !0 : A === c || await g(A)) && d.push([A, E]);
2060
+ (u === "include" ? !0 : C === s || await h(C)) ? b.push([C, x]) : d(C);
1980
2061
  }
1981
- if (d.length > 0) {
1982
- h.localizations = h.localizations || {};
1983
- for (const [A, E] of d)
1984
- h.localizations[A] = {
2062
+ if (b.length > 0) {
2063
+ m.localizations = m.localizations || {};
2064
+ for (const [C, x] of b)
2065
+ m.localizations[C] = {
1985
2066
  stringUnit: {
1986
2067
  state: "translated",
1987
- value: E
2068
+ value: x
1988
2069
  }
1989
2070
  };
1990
2071
  }
1991
2072
  }
1992
- a.strings[n] = h, await Nn(e, a);
2073
+ a.strings[n] = m, await Nn(e, a);
1993
2074
  }
1994
- function yo() {
2075
+ function Ao() {
1995
2076
  return {
1996
2077
  command: "remove",
1997
2078
  describe: "Remove a string",
@@ -2015,7 +2096,7 @@ function yo() {
2015
2096
  throw new Error("Either --key or --languages must be provided");
2016
2097
  }),
2017
2098
  handler: async (e) => {
2018
- const n = await vo(
2099
+ const n = await ko(
2019
2100
  e.path,
2020
2101
  e.key,
2021
2102
  e.languages,
@@ -2023,126 +2104,126 @@ function yo() {
2023
2104
  ), r = Object.entries(n).map(([i, t]) => `- [${t.join(" ")}] ${i}`).join(`
2024
2105
  `);
2025
2106
  if (e.dryRun) {
2026
- r.length === 0 ? ne.info(C.yellow("No matching strings found.")) : ne.info(C.blue(`Would remove:
2107
+ r.length === 0 ? V.info(k.yellow("No matching strings found.")) : V.info(k.blue(`Would remove:
2027
2108
  ${r}`));
2028
2109
  return;
2029
2110
  }
2030
- r.length === 0 ? ne.info(C.yellow("No matching strings found.")) : ne.info(C.green(`✓ Removed
2111
+ r.length === 0 ? V.info(k.yellow("No matching strings found.")) : V.info(k.green(`✓ Removed
2031
2112
  ${r}`));
2032
2113
  }
2033
2114
  };
2034
2115
  }
2035
- function xo(e, n, r, i, t) {
2116
+ function Co(e, n, r, i, t) {
2036
2117
  if (e.localizations) {
2037
- for (const l of n)
2038
- e.localizations[l] && (t[i] ??= [], t[i].push(l), r || delete e.localizations[l]);
2118
+ for (const o of n)
2119
+ e.localizations[o] && (t[i] ??= [], t[i].push(o), r || delete e.localizations[o]);
2039
2120
  !r && e.localizations && Object.keys(e.localizations).length === 0 && delete e.localizations;
2040
2121
  }
2041
2122
  }
2042
- async function vo(e, n, r, i = !1) {
2043
- const t = await me(e), l = {}, o = t.strings || {};
2044
- t.strings = o;
2045
- const a = n ? [n] : Object.keys(o);
2046
- let c = !1;
2047
- for (const u of a) {
2048
- const s = o[u];
2049
- if (!s)
2123
+ async function ko(e, n, r, i = !1) {
2124
+ const t = await me(e), o = {}, l = t.strings || {};
2125
+ t.strings = l;
2126
+ const a = n ? [n] : Object.keys(l);
2127
+ let s = !1;
2128
+ for (const c of a) {
2129
+ const u = l[c];
2130
+ if (!u)
2050
2131
  continue;
2051
2132
  if (!r || r.length === 0) {
2052
- const h = Object.keys(s.localizations ?? {});
2053
- l[u] = h, i || delete o[u], c = !0;
2133
+ const d = Object.keys(u.localizations ?? {});
2134
+ o[c] = d, i || delete l[c], s = !0;
2054
2135
  continue;
2055
2136
  }
2056
- xo(s, r, i, u, l);
2057
- const f = l[u]?.length ?? 0;
2058
- !(s.localizations && Object.keys(s.localizations).length > 0) && f > 0 && (i || delete o[u]), f > 0 && (c = !0);
2137
+ Co(u, r, i, c, o);
2138
+ const f = o[c]?.length ?? 0;
2139
+ !(u.localizations && Object.keys(u.localizations).length > 0) && f > 0 && (i || delete l[c]), f > 0 && (s = !0);
2059
2140
  }
2060
- return !i && c && await Nn(e, t), l;
2141
+ return !i && s && await Nn(e, t), o;
2061
2142
  }
2062
- const Pe = "xcstrings-cli.json5";
2063
- function bo() {
2143
+ const Me = "xcstrings-cli.json5";
2144
+ function Eo() {
2064
2145
  return {
2065
2146
  command: "init",
2066
2147
  describe: "Initialize configuration file",
2067
2148
  handler: async () => {
2068
- await Co();
2149
+ await Oo();
2069
2150
  }
2070
2151
  };
2071
2152
  }
2072
- async function wo(e) {
2153
+ async function So(e) {
2073
2154
  const n = [];
2074
2155
  async function r(i) {
2075
2156
  try {
2076
2157
  const t = await In(i, { withFileTypes: !0 });
2077
- for (const l of t) {
2078
- const o = Fe(i, l.name);
2079
- l.isDirectory() ? !l.name.startsWith(".") && l.name !== "node_modules" && await r(o) : l.name.endsWith(".xcstrings") && n.push(o);
2158
+ for (const o of t) {
2159
+ const l = Oe(i, o.name);
2160
+ o.isDirectory() ? !o.name.startsWith(".") && o.name !== "node_modules" && await r(l) : o.name.endsWith(".xcstrings") && n.push(l);
2080
2161
  }
2081
2162
  } catch {
2082
2163
  }
2083
2164
  }
2084
2165
  return await r(e), n;
2085
2166
  }
2086
- async function Ao(e) {
2167
+ async function _o(e) {
2087
2168
  const n = [];
2088
2169
  let r = e;
2089
2170
  try {
2090
2171
  const i = await In(r, { withFileTypes: !0 });
2091
2172
  for (const t of i)
2092
- t.isDirectory() && t.name.endsWith(".xcodeproj") && n.push(Fe(r, t.name));
2173
+ t.isDirectory() && t.name.endsWith(".xcodeproj") && n.push(Oe(r, t.name));
2093
2174
  } catch {
2094
2175
  }
2095
2176
  return n;
2096
2177
  }
2097
- async function Co() {
2178
+ async function Oo() {
2098
2179
  const e = process.cwd();
2099
- console.log(), console.log(C.bold.cyan("🚀 xcstrings-cli Configuration Setup")), console.log(C.dim("─".repeat(40))), console.log(), console.log(C.yellow("🔍 Searching for .xcstrings files..."));
2100
- const n = await wo(e);
2101
- console.log(C.yellow("🔍 Searching for .xcodeproj directories..."));
2102
- const r = await Ao(e);
2180
+ console.log(), console.log(k.bold.cyan("🚀 xcstrings-cli Configuration Setup")), console.log(k.dim("─".repeat(40))), console.log(), console.log(k.yellow("🔍 Searching for .xcstrings files..."));
2181
+ const n = await So(e);
2182
+ console.log(k.yellow("🔍 Searching for .xcodeproj directories..."));
2183
+ const r = await _o(e);
2103
2184
  console.log();
2104
2185
  let i = [];
2105
2186
  if (n.length > 0) {
2106
- console.log(C.green(`✓ Found ${n.length} .xcstrings file(s)`)), console.log();
2107
- const u = n.map((s) => ({
2108
- name: C.white(be(e, s)) + C.dim(` (${s})`),
2109
- value: be(e, s),
2187
+ console.log(k.green(`✓ Found ${n.length} .xcstrings file(s)`)), console.log();
2188
+ const c = n.map((u) => ({
2189
+ name: k.white(we(e, u)) + k.dim(` (${u})`),
2190
+ value: we(e, u),
2110
2191
  checked: !0
2111
2192
  }));
2112
- i = await ln({
2113
- message: C.bold("Select .xcstrings files to manage:"),
2114
- choices: u
2193
+ i = await on({
2194
+ message: k.bold("Select .xcstrings files to manage:"),
2195
+ choices: c
2115
2196
  });
2116
2197
  } else
2117
- console.log(C.dim(" No .xcstrings files found in current directory"));
2198
+ console.log(k.dim(" No .xcstrings files found in current directory"));
2118
2199
  console.log();
2119
2200
  let t = [];
2120
2201
  if (r.length > 0) {
2121
- console.log(C.green(`✓ Found ${r.length} .xcodeproj director${r.length === 1 ? "y" : "ies"}`)), console.log();
2122
- const u = r.map((s) => ({
2123
- name: C.white(be(e, s) || s) + C.dim(` (${s})`),
2124
- value: be(e, s) || s,
2202
+ console.log(k.green(`✓ Found ${r.length} .xcodeproj director${r.length === 1 ? "y" : "ies"}`)), console.log();
2203
+ const c = r.map((u) => ({
2204
+ name: k.white(we(e, u) || u) + k.dim(` (${u})`),
2205
+ value: we(e, u) || u,
2125
2206
  checked: !0
2126
2207
  }));
2127
- t = await ln({
2128
- message: C.bold("Select .xcodeproj directories for language detection:"),
2129
- choices: u
2208
+ t = await on({
2209
+ message: k.bold("Select .xcodeproj directories for language detection:"),
2210
+ choices: c
2130
2211
  });
2131
2212
  } else
2132
- console.log(C.dim(" No .xcodeproj directories found"));
2133
- if (console.log(), console.log(C.dim("─".repeat(40))), console.log(), console.log(C.bold("📋 Configuration Summary:")), console.log(), console.log(C.cyan(" xcstringsPaths:")), i.length > 0 ? i.forEach((u) => console.log(C.white(` • ${u}`))) : console.log(C.dim(" (none)")), console.log(), console.log(C.cyan(" xcodeprojPaths:")), t.length > 0 ? t.forEach((u) => console.log(C.white(` • ${u}`))) : console.log(C.dim(" (none)")), console.log(), !await Nr({
2134
- message: C.bold(`Create ${C.yellow(Pe)}?`),
2213
+ console.log(k.dim(" No .xcodeproj directories found"));
2214
+ if (console.log(), console.log(k.dim("─".repeat(40))), console.log(), console.log(k.bold("📋 Configuration Summary:")), console.log(), console.log(k.cyan(" xcstringsPaths:")), i.length > 0 ? i.forEach((c) => console.log(k.white(` • ${c}`))) : console.log(k.dim(" (none)")), console.log(), console.log(k.cyan(" xcodeprojPaths:")), t.length > 0 ? t.forEach((c) => console.log(k.white(` • ${c}`))) : console.log(k.dim(" (none)")), console.log(), !await Rr({
2215
+ message: k.bold(`Create ${k.yellow(Me)}?`),
2135
2216
  default: !0
2136
2217
  })) {
2137
- console.log(C.dim(" Configuration cancelled."));
2218
+ console.log(k.dim(" Configuration cancelled."));
2138
2219
  return;
2139
2220
  }
2140
- const o = i.map((u) => ` "${u}"`).join(`,
2141
- `), a = t.map((u) => ` "${u}"`).join(`,
2142
- `), c = `{
2221
+ const l = i.map((c) => ` "${c}"`).join(`,
2222
+ `), a = t.map((c) => ` "${c}"`).join(`,
2223
+ `), s = `{
2143
2224
  // Paths to .xcstrings files to manage. Specify relative or absolute paths.
2144
2225
  xcstringsPaths: [
2145
- ${o}
2226
+ ${l}
2146
2227
  ],
2147
2228
  // Paths to .xcodeproj directories. Used for discovering supported languages.
2148
2229
  xcodeprojPaths: [
@@ -2152,35 +2233,35 @@ ${a}
2152
2233
  missingLanguagePolicy: "skip",
2153
2234
  }
2154
2235
  `;
2155
- await jn(Pe, c, "utf-8"), console.log(), console.log(C.bold.green(`✓ Created ${Pe}`)), console.log(C.dim(` Run ${C.cyan("xcstrings --help")} to see available commands.`)), console.log();
2236
+ await jn(Me, s, "utf-8"), console.log(), console.log(k.bold.green(`✓ Created ${Me}`)), console.log(k.dim(` Run ${k.cyan("xcstrings --help")} to see available commands.`)), console.log();
2156
2237
  }
2157
- var Eo = Object.prototype.toString, le = Array.isArray || function(n) {
2158
- return Eo.call(n) === "[object Array]";
2238
+ var Fo = Object.prototype.toString, le = Array.isArray || function(n) {
2239
+ return Fo.call(n) === "[object Array]";
2159
2240
  };
2160
- function Je(e) {
2241
+ function Qe(e) {
2161
2242
  return typeof e == "function";
2162
2243
  }
2163
- function So(e) {
2244
+ function To(e) {
2164
2245
  return le(e) ? "array" : typeof e;
2165
2246
  }
2166
- function De(e) {
2247
+ function Pe(e) {
2167
2248
  return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
2168
2249
  }
2169
- function kn(e, n) {
2250
+ function _n(e, n) {
2170
2251
  return e != null && typeof e == "object" && n in e;
2171
2252
  }
2172
- function _o(e, n) {
2253
+ function Lo(e, n) {
2173
2254
  return e != null && typeof e != "object" && e.hasOwnProperty && e.hasOwnProperty(n);
2174
2255
  }
2175
- var ko = RegExp.prototype.test;
2176
- function Oo(e, n) {
2177
- return ko.call(e, n);
2256
+ var jo = RegExp.prototype.test;
2257
+ function Io(e, n) {
2258
+ return jo.call(e, n);
2178
2259
  }
2179
- var Fo = /\S/;
2180
- function To(e) {
2181
- return !Oo(Fo, e);
2260
+ var No = /\S/;
2261
+ function Ro(e) {
2262
+ return !Io(No, e);
2182
2263
  }
2183
- var Lo = {
2264
+ var Mo = {
2184
2265
  "&": "&amp;",
2185
2266
  "<": "&lt;",
2186
2267
  ">": "&gt;",
@@ -2190,67 +2271,67 @@ var Lo = {
2190
2271
  "`": "&#x60;",
2191
2272
  "=": "&#x3D;"
2192
2273
  };
2193
- function jo(e) {
2274
+ function Po(e) {
2194
2275
  return String(e).replace(/[&<>"'`=\/]/g, function(r) {
2195
- return Lo[r];
2276
+ return Mo[r];
2196
2277
  });
2197
2278
  }
2198
- var Io = /\s*/, No = /\s+/, On = /\s*=/, Ro = /\s*\}/, Mo = /#|\^|\/|>|\{|&|=|!/;
2199
- function Po(e, n) {
2279
+ var Do = /\s*/, Bo = /\s+/, On = /\s*=/, $o = /\s*\}/, Uo = /#|\^|\/|>|\{|&|=|!/;
2280
+ function zo(e, n) {
2200
2281
  if (!e)
2201
2282
  return [];
2202
- var r = !1, i = [], t = [], l = [], o = !1, a = !1, c = "", u = 0;
2203
- function s() {
2204
- if (o && !a)
2205
- for (; l.length; )
2206
- delete t[l.pop()];
2283
+ var r = !1, i = [], t = [], o = [], l = !1, a = !1, s = "", c = 0;
2284
+ function u() {
2285
+ if (l && !a)
2286
+ for (; o.length; )
2287
+ delete t[o.pop()];
2207
2288
  else
2208
- l = [];
2209
- o = !1, a = !1;
2289
+ o = [];
2290
+ l = !1, a = !1;
2210
2291
  }
2211
- var f, g, h;
2212
- function x(B) {
2213
- if (typeof B == "string" && (B = B.split(No, 2)), !le(B) || B.length !== 2)
2292
+ var f, h, d;
2293
+ function m(B) {
2294
+ if (typeof B == "string" && (B = B.split(Bo, 2)), !le(B) || B.length !== 2)
2214
2295
  throw new Error("Invalid tags: " + B);
2215
- f = new RegExp(De(B[0]) + "\\s*"), g = new RegExp("\\s*" + De(B[1])), h = new RegExp("\\s*" + De("}" + B[1]));
2216
- }
2217
- x(n || N.tags);
2218
- for (var d = new ye(e), A, E, v, K, W, Y; !d.eos(); ) {
2219
- if (A = d.pos, v = d.scanUntil(f), v)
2220
- for (var ae = 0, X = v.length; ae < X; ++ae)
2221
- K = v.charAt(ae), To(K) ? (l.push(t.length), c += K) : (a = !0, r = !0, c += " "), t.push(["text", K, A, A + 1]), A += 1, K === `
2222
- ` && (s(), c = "", u = 0, r = !1);
2223
- if (!d.scan(f))
2296
+ f = new RegExp(Pe(B[0]) + "\\s*"), h = new RegExp("\\s*" + Pe(B[1])), d = new RegExp("\\s*" + Pe("}" + B[1]));
2297
+ }
2298
+ m(n || N.tags);
2299
+ for (var g = new ye(e), b, C, x, W, Y, U; !g.eos(); ) {
2300
+ if (b = g.pos, x = g.scanUntil(f), x)
2301
+ for (var ae = 0, Q = x.length; ae < Q; ++ae)
2302
+ W = x.charAt(ae), Ro(W) ? (o.push(t.length), s += W) : (a = !0, r = !0, s += " "), t.push(["text", W, b, b + 1]), b += 1, W === `
2303
+ ` && (u(), s = "", c = 0, r = !1);
2304
+ if (!g.scan(f))
2224
2305
  break;
2225
- if (o = !0, E = d.scan(Mo) || "name", d.scan(Io), E === "=" ? (v = d.scanUntil(On), d.scan(On), d.scanUntil(g)) : E === "{" ? (v = d.scanUntil(h), d.scan(Ro), d.scanUntil(g), E = "&") : v = d.scanUntil(g), !d.scan(g))
2226
- throw new Error("Unclosed tag at " + d.pos);
2227
- if (E == ">" ? W = [E, v, A, d.pos, c, u, r] : W = [E, v, A, d.pos], u++, t.push(W), E === "#" || E === "^")
2228
- i.push(W);
2229
- else if (E === "/") {
2230
- if (Y = i.pop(), !Y)
2231
- throw new Error('Unopened section "' + v + '" at ' + A);
2232
- if (Y[1] !== v)
2233
- throw new Error('Unclosed section "' + Y[1] + '" at ' + A);
2234
- } else E === "name" || E === "{" || E === "&" ? a = !0 : E === "=" && x(v);
2235
- }
2236
- if (s(), Y = i.pop(), Y)
2237
- throw new Error('Unclosed section "' + Y[1] + '" at ' + d.pos);
2238
- return Bo(Do(t));
2239
- }
2240
- function Do(e) {
2241
- for (var n = [], r, i, t = 0, l = e.length; t < l; ++t)
2306
+ if (l = !0, C = g.scan(Uo) || "name", g.scan(Do), C === "=" ? (x = g.scanUntil(On), g.scan(On), g.scanUntil(h)) : C === "{" ? (x = g.scanUntil(d), g.scan($o), g.scanUntil(h), C = "&") : x = g.scanUntil(h), !g.scan(h))
2307
+ throw new Error("Unclosed tag at " + g.pos);
2308
+ if (C == ">" ? Y = [C, x, b, g.pos, s, c, r] : Y = [C, x, b, g.pos], c++, t.push(Y), C === "#" || C === "^")
2309
+ i.push(Y);
2310
+ else if (C === "/") {
2311
+ if (U = i.pop(), !U)
2312
+ throw new Error('Unopened section "' + x + '" at ' + b);
2313
+ if (U[1] !== x)
2314
+ throw new Error('Unclosed section "' + U[1] + '" at ' + b);
2315
+ } else C === "name" || C === "{" || C === "&" ? a = !0 : C === "=" && m(x);
2316
+ }
2317
+ if (u(), U = i.pop(), U)
2318
+ throw new Error('Unclosed section "' + U[1] + '" at ' + g.pos);
2319
+ return Ho(Yo(t));
2320
+ }
2321
+ function Yo(e) {
2322
+ for (var n = [], r, i, t = 0, o = e.length; t < o; ++t)
2242
2323
  r = e[t], r && (r[0] === "text" && i && i[0] === "text" ? (i[1] += r[1], i[3] = r[3]) : (n.push(r), i = r));
2243
2324
  return n;
2244
2325
  }
2245
- function Bo(e) {
2246
- for (var n = [], r = n, i = [], t, l, o = 0, a = e.length; o < a; ++o)
2247
- switch (t = e[o], t[0]) {
2326
+ function Ho(e) {
2327
+ for (var n = [], r = n, i = [], t, o, l = 0, a = e.length; l < a; ++l)
2328
+ switch (t = e[l], t[0]) {
2248
2329
  case "#":
2249
2330
  case "^":
2250
2331
  r.push(t), i.push(t), r = t[4] = [];
2251
2332
  break;
2252
2333
  case "/":
2253
- l = i.pop(), l[5] = t[2], r = i.length > 0 ? i[i.length - 1][4] : n;
2334
+ o = i.pop(), o[5] = t[2], r = i.length > 0 ? i[i.length - 1][4] : n;
2254
2335
  break;
2255
2336
  default:
2256
2337
  r.push(t);
@@ -2295,21 +2376,21 @@ oe.prototype.lookup = function(n) {
2295
2376
  if (r.hasOwnProperty(n))
2296
2377
  i = r[n];
2297
2378
  else {
2298
- for (var t = this, l, o, a, c = !1; t; ) {
2379
+ for (var t = this, o, l, a, s = !1; t; ) {
2299
2380
  if (n.indexOf(".") > 0)
2300
- for (l = t.view, o = n.split("."), a = 0; l != null && a < o.length; )
2301
- a === o.length - 1 && (c = kn(l, o[a]) || _o(l, o[a])), l = l[o[a++]];
2381
+ for (o = t.view, l = n.split("."), a = 0; o != null && a < l.length; )
2382
+ a === l.length - 1 && (s = _n(o, l[a]) || Lo(o, l[a])), o = o[l[a++]];
2302
2383
  else
2303
- l = t.view[n], c = kn(t.view, n);
2304
- if (c) {
2305
- i = l;
2384
+ o = t.view[n], s = _n(t.view, n);
2385
+ if (s) {
2386
+ i = o;
2306
2387
  break;
2307
2388
  }
2308
2389
  t = t.parent;
2309
2390
  }
2310
2391
  r[n] = i;
2311
2392
  }
2312
- return Je(i) && (i = i.call(this.view)), i;
2393
+ return Qe(i) && (i = i.call(this.view)), i;
2313
2394
  };
2314
2395
  function R() {
2315
2396
  this.templateCache = {
@@ -2329,58 +2410,58 @@ R.prototype.clearCache = function() {
2329
2410
  typeof this.templateCache < "u" && this.templateCache.clear();
2330
2411
  };
2331
2412
  R.prototype.parse = function(n, r) {
2332
- var i = this.templateCache, t = n + ":" + (r || N.tags).join(":"), l = typeof i < "u", o = l ? i.get(t) : void 0;
2333
- return o == null && (o = Po(n, r), l && i.set(t, o)), o;
2413
+ var i = this.templateCache, t = n + ":" + (r || N.tags).join(":"), o = typeof i < "u", l = o ? i.get(t) : void 0;
2414
+ return l == null && (l = zo(n, r), o && i.set(t, l)), l;
2334
2415
  };
2335
2416
  R.prototype.render = function(n, r, i, t) {
2336
- var l = this.getConfigTags(t), o = this.parse(n, l), a = r instanceof oe ? r : new oe(r, void 0);
2337
- return this.renderTokens(o, a, i, n, t);
2417
+ var o = this.getConfigTags(t), l = this.parse(n, o), a = r instanceof oe ? r : new oe(r, void 0);
2418
+ return this.renderTokens(l, a, i, n, t);
2338
2419
  };
2339
- R.prototype.renderTokens = function(n, r, i, t, l) {
2340
- for (var o = "", a, c, u, s = 0, f = n.length; s < f; ++s)
2341
- u = void 0, a = n[s], c = a[0], c === "#" ? u = this.renderSection(a, r, i, t, l) : c === "^" ? u = this.renderInverted(a, r, i, t, l) : c === ">" ? u = this.renderPartial(a, r, i, l) : c === "&" ? u = this.unescapedValue(a, r) : c === "name" ? u = this.escapedValue(a, r, l) : c === "text" && (u = this.rawValue(a)), u !== void 0 && (o += u);
2342
- return o;
2420
+ R.prototype.renderTokens = function(n, r, i, t, o) {
2421
+ for (var l = "", a, s, c, u = 0, f = n.length; u < f; ++u)
2422
+ c = void 0, a = n[u], s = a[0], s === "#" ? c = this.renderSection(a, r, i, t, o) : s === "^" ? c = this.renderInverted(a, r, i, t, o) : s === ">" ? c = this.renderPartial(a, r, i, o) : s === "&" ? c = this.unescapedValue(a, r) : s === "name" ? c = this.escapedValue(a, r, o) : s === "text" && (c = this.rawValue(a)), c !== void 0 && (l += c);
2423
+ return l;
2343
2424
  };
2344
- R.prototype.renderSection = function(n, r, i, t, l) {
2345
- var o = this, a = "", c = r.lookup(n[1]);
2346
- function u(g) {
2347
- return o.render(g, r, i, l);
2348
- }
2349
- if (c) {
2350
- if (le(c))
2351
- for (var s = 0, f = c.length; s < f; ++s)
2352
- a += this.renderTokens(n[4], r.push(c[s]), i, t, l);
2353
- else if (typeof c == "object" || typeof c == "string" || typeof c == "number")
2354
- a += this.renderTokens(n[4], r.push(c), i, t, l);
2355
- else if (Je(c)) {
2425
+ R.prototype.renderSection = function(n, r, i, t, o) {
2426
+ var l = this, a = "", s = r.lookup(n[1]);
2427
+ function c(h) {
2428
+ return l.render(h, r, i, o);
2429
+ }
2430
+ if (s) {
2431
+ if (le(s))
2432
+ for (var u = 0, f = s.length; u < f; ++u)
2433
+ a += this.renderTokens(n[4], r.push(s[u]), i, t, o);
2434
+ else if (typeof s == "object" || typeof s == "string" || typeof s == "number")
2435
+ a += this.renderTokens(n[4], r.push(s), i, t, o);
2436
+ else if (Qe(s)) {
2356
2437
  if (typeof t != "string")
2357
2438
  throw new Error("Cannot use higher-order sections without the original template");
2358
- c = c.call(r.view, t.slice(n[3], n[5]), u), c != null && (a += c);
2439
+ s = s.call(r.view, t.slice(n[3], n[5]), c), s != null && (a += s);
2359
2440
  } else
2360
- a += this.renderTokens(n[4], r, i, t, l);
2441
+ a += this.renderTokens(n[4], r, i, t, o);
2361
2442
  return a;
2362
2443
  }
2363
2444
  };
2364
- R.prototype.renderInverted = function(n, r, i, t, l) {
2365
- var o = r.lookup(n[1]);
2366
- if (!o || le(o) && o.length === 0)
2367
- return this.renderTokens(n[4], r, i, t, l);
2445
+ R.prototype.renderInverted = function(n, r, i, t, o) {
2446
+ var l = r.lookup(n[1]);
2447
+ if (!l || le(l) && l.length === 0)
2448
+ return this.renderTokens(n[4], r, i, t, o);
2368
2449
  };
2369
2450
  R.prototype.indentPartial = function(n, r, i) {
2370
- for (var t = r.replace(/[^ \t]/g, ""), l = n.split(`
2371
- `), o = 0; o < l.length; o++)
2372
- l[o].length && (o > 0 || !i) && (l[o] = t + l[o]);
2373
- return l.join(`
2451
+ for (var t = r.replace(/[^ \t]/g, ""), o = n.split(`
2452
+ `), l = 0; l < o.length; l++)
2453
+ o[l].length && (l > 0 || !i) && (o[l] = t + o[l]);
2454
+ return o.join(`
2374
2455
  `);
2375
2456
  };
2376
2457
  R.prototype.renderPartial = function(n, r, i, t) {
2377
2458
  if (i) {
2378
- var l = this.getConfigTags(t), o = Je(i) ? i(n[1]) : i[n[1]];
2379
- if (o != null) {
2380
- var a = n[6], c = n[5], u = n[4], s = o;
2381
- c == 0 && u && (s = this.indentPartial(o, u, a));
2382
- var f = this.parse(s, l);
2383
- return this.renderTokens(f, r, i, s, t);
2459
+ var o = this.getConfigTags(t), l = Qe(i) ? i(n[1]) : i[n[1]];
2460
+ if (l != null) {
2461
+ var a = n[6], s = n[5], c = n[4], u = l;
2462
+ s == 0 && c && (u = this.indentPartial(l, c, a));
2463
+ var f = this.parse(u, o);
2464
+ return this.renderTokens(f, r, i, u, t);
2384
2465
  }
2385
2466
  }
2386
2467
  };
@@ -2390,9 +2471,9 @@ R.prototype.unescapedValue = function(n, r) {
2390
2471
  return i;
2391
2472
  };
2392
2473
  R.prototype.escapedValue = function(n, r, i) {
2393
- var t = this.getConfigEscape(i) || N.escape, l = r.lookup(n[1]);
2394
- if (l != null)
2395
- return typeof l == "number" && t === N.escape ? String(l) : t(l);
2474
+ var t = this.getConfigEscape(i) || N.escape, o = r.lookup(n[1]);
2475
+ if (o != null)
2476
+ return typeof o == "number" && t === N.escape ? String(o) : t(o);
2396
2477
  };
2397
2478
  R.prototype.rawValue = function(n) {
2398
2479
  return n[1];
@@ -2438,10 +2519,10 @@ N.parse = function(n, r) {
2438
2519
  };
2439
2520
  N.render = function(n, r, i, t) {
2440
2521
  if (typeof n != "string")
2441
- throw new TypeError('Invalid template! Template should be a "string" but "' + So(n) + '" was given as the first argument for mustache#render(template, view, partials)');
2522
+ throw new TypeError('Invalid template! Template should be a "string" but "' + To(n) + '" was given as the first argument for mustache#render(template, view, partials)');
2442
2523
  return ge.render(n, r, i, t);
2443
2524
  };
2444
- N.escape = jo;
2525
+ N.escape = Po;
2445
2526
  N.Scanner = ye;
2446
2527
  N.Context = oe;
2447
2528
  N.Writer = R;
@@ -2450,14 +2531,14 @@ function Fn(e, {
2450
2531
  regex: r,
2451
2532
  substring: i
2452
2533
  }) {
2453
- const t = [n, r, i].filter((l) => l !== void 0);
2534
+ const t = [n, r, i].filter((o) => o !== void 0);
2454
2535
  if (t.length !== 0) {
2455
2536
  if (t.length > 1)
2456
2537
  throw new Error(`Specify only one of --${e}, --${e}-glob, --${e}-regex, --${e}-substring`);
2457
2538
  return r !== void 0 ? { pattern: r, mode: "regex" } : i !== void 0 ? { pattern: i, mode: "substring" } : { pattern: n, mode: "glob" };
2458
2539
  }
2459
2540
  }
2460
- function Uo() {
2541
+ function Ko() {
2461
2542
  return {
2462
2543
  command: "list",
2463
2544
  describe: "List strings in the xcstrings file",
@@ -2494,16 +2575,16 @@ function Uo() {
2494
2575
  type: "string",
2495
2576
  describe: "Mustache template. Available variables: {{language}}, {{key}}, {{text}}"
2496
2577
  }).check((n) => {
2497
- const r = [n.key, n["key-glob"]].filter((c) => c !== void 0).length, i = n["key-regex"] ? 1 : 0, t = n["key-substring"] ? 1 : 0;
2578
+ const r = [n.key, n["key-glob"]].filter((s) => s !== void 0).length, i = n["key-regex"] ? 1 : 0, t = n["key-substring"] ? 1 : 0;
2498
2579
  if (r + i + t > 1)
2499
2580
  throw new Error("Specify only one of --key/--key-glob, --key-regex, or --key-substring");
2500
- const l = [n.text, n["text-glob"]].filter((c) => c !== void 0).length, o = n["text-regex"] ? 1 : 0, a = n["text-substring"] ? 1 : 0;
2501
- if (l + o + a > 1)
2581
+ const o = [n.text, n["text-glob"]].filter((s) => s !== void 0).length, l = n["text-regex"] ? 1 : 0, a = n["text-substring"] ? 1 : 0;
2582
+ if (o + l + a > 1)
2502
2583
  throw new Error("Specify only one of --text/--text-glob, --text-regex, or --text-substring");
2503
2584
  return !0;
2504
2585
  }),
2505
2586
  handler: async (e) => {
2506
- const n = [e.key, e["key-glob"]].filter((o) => o !== void 0), r = [e.text, e["text-glob"]].filter((o) => o !== void 0), i = Fn("key", {
2587
+ const n = [e.key, e["key-glob"]].filter((l) => l !== void 0), r = [e.text, e["text-glob"]].filter((l) => l !== void 0), i = Fn("key", {
2507
2588
  glob: n[0],
2508
2589
  regex: e["key-regex"],
2509
2590
  substring: e["key-substring"]
@@ -2511,18 +2592,18 @@ function Uo() {
2511
2592
  glob: r[0],
2512
2593
  regex: e["text-regex"],
2513
2594
  substring: e["text-substring"]
2514
- }), l = await $o({
2595
+ }), o = await Go({
2515
2596
  path: e.path,
2516
2597
  languages: e.languages,
2517
2598
  keyFilter: i,
2518
2599
  textFilter: t,
2519
2600
  format: e.format
2520
2601
  });
2521
- l && console.log(l);
2602
+ o && console.log(o);
2522
2603
  }
2523
2604
  };
2524
2605
  }
2525
- function Yo(e) {
2606
+ function Wo(e) {
2526
2607
  const n = e.replace(/[.+^${}()|\\]/g, "\\$&").replace(/\*/g, ".*").replace(/\?/g, ".");
2527
2608
  return new RegExp(`^${n}$`);
2528
2609
  }
@@ -2536,10 +2617,10 @@ function Tn(e) {
2536
2617
  const r = e.pattern;
2537
2618
  return (i) => i.includes(r);
2538
2619
  }
2539
- const n = Yo(e.pattern);
2620
+ const n = Wo(e.pattern);
2540
2621
  return (r) => n.test(r);
2541
2622
  }
2542
- function zo(e, n) {
2623
+ function qo(e, n) {
2543
2624
  const r = N.escape;
2544
2625
  N.escape = (i) => i;
2545
2626
  try {
@@ -2548,23 +2629,23 @@ function zo(e, n) {
2548
2629
  N.escape = r;
2549
2630
  }
2550
2631
  }
2551
- async function $o(e) {
2552
- const r = (await me(e.path)).strings ?? {}, i = Tn(e.keyFilter), t = Tn(e.textFilter), l = e.languages ? new Set(e.languages) : null, o = !!e.format, a = [];
2553
- for (const c of Object.keys(r)) {
2554
- if (!i(c)) continue;
2555
- const s = r[c]?.localizations ?? {}, f = Object.keys(s), g = [];
2556
- for (const h of f) {
2557
- if (l && !l.has(h)) continue;
2558
- const x = s[h]?.stringUnit?.value ?? "";
2559
- t(x) && (o && e.format ? g.push(zo(e.format, { language: h, key: c, text: x })) : g.push(` ${h}: ${JSON.stringify(x)}`));
2632
+ async function Go(e) {
2633
+ const r = (await me(e.path)).strings ?? {}, i = Tn(e.keyFilter), t = Tn(e.textFilter), o = e.languages ? new Set(e.languages) : null, l = !!e.format, a = [];
2634
+ for (const s of Object.keys(r)) {
2635
+ if (!i(s)) continue;
2636
+ const u = r[s]?.localizations ?? {}, f = Object.keys(u), h = [];
2637
+ for (const d of f) {
2638
+ if (o && !o.has(d)) continue;
2639
+ const m = u[d]?.stringUnit?.value ?? "";
2640
+ t(m) && (l && e.format ? h.push(qo(e.format, { language: d, key: s, text: m })) : h.push(` ${d}: ${JSON.stringify(m)}`));
2560
2641
  }
2561
- g.length !== 0 && (o ? a.push(...g) : a.push(`${c}:`, ...g));
2642
+ h.length !== 0 && (l ? a.push(...h) : a.push(`${s}:`, ...h));
2562
2643
  }
2563
2644
  return a.join(`
2564
2645
  `);
2565
2646
  }
2566
- const Ln = Fe(process.cwd(), "Localizable.xcstrings");
2567
- Tr(Lr(process.argv)).scriptName("xcstrings").usage("$0 <cmd> [args]").option("config", {
2647
+ const Ln = Oe(process.cwd(), "Localizable.xcstrings");
2648
+ Lr(jr(process.argv)).scriptName("xcstrings").usage("$0 <cmd> [args]").option("config", {
2568
2649
  type: "string",
2569
2650
  describe: "Path to config file"
2570
2651
  }).option("path", {
@@ -2572,15 +2653,15 @@ Tr(Lr(process.argv)).scriptName("xcstrings").usage("$0 <cmd> [args]").option("co
2572
2653
  describe: "Path to xcstrings file",
2573
2654
  default: Ln
2574
2655
  }).middleware(async (e) => {
2575
- const n = await Ke(e.config);
2576
- e.path = await Pr(e.path, n, Ln);
2656
+ const n = await He(e.config);
2657
+ e.path = await Dr(e.path, n, Ln);
2577
2658
  }).command([
2578
- go(),
2579
- yo(),
2580
2659
  bo(),
2581
- Hr(),
2582
- Uo()
2660
+ Ao(),
2661
+ Eo(),
2662
+ Kr(),
2663
+ Ko()
2583
2664
  ]).demandCommand(1, "").strictCommands().recommendCommands().showHelpOnFail(!0).fail((e, n, r) => {
2584
2665
  const i = e || n?.message;
2585
- i && (console.error(C.red(i)), console.log(), r.showHelp(), process.exit(1)), n && (console.error(n), process.exit(1)), r.showHelp(), process.exit(1);
2666
+ i && (console.error(k.red(i)), console.log(), r.showHelp(), process.exit(1)), n && (console.error(n), process.exit(1)), r.showHelp(), process.exit(1);
2586
2667
  }).help().argv;