@ryuzaki13/react-foundation-lib 2.33.0 → 2.35.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 (36) hide show
  1. package/dist/analytical-table/index.js +1 -1
  2. package/dist/binary/binaryToBlob.d.ts +4 -0
  3. package/dist/binary/binaryToBlob.d.ts.map +1 -1
  4. package/dist/binary/index.d.ts +2 -2
  5. package/dist/binary/index.d.ts.map +1 -1
  6. package/dist/binary/index.js +73 -54
  7. package/dist/binary/index.js.map +1 -1
  8. package/dist/binary/useBinaryFile.d.ts +14 -5
  9. package/dist/binary/useBinaryFile.d.ts.map +1 -1
  10. package/dist/chunks/{formatters-CMfD97RB.js → formatters-4P9iq3wB.js} +384 -377
  11. package/dist/chunks/formatters-4P9iq3wB.js.map +1 -0
  12. package/dist/chunks/{validate-rivmPJyV.js → validate-Drrm-CCz.js} +177 -168
  13. package/dist/chunks/validate-Drrm-CCz.js.map +1 -0
  14. package/dist/error-report/index.js +1 -1
  15. package/dist/excel/index.js +114 -112
  16. package/dist/excel/index.js.map +1 -1
  17. package/dist/excel/tableExport.d.ts.map +1 -1
  18. package/dist/formatters/index.js +3 -3
  19. package/dist/formatters/number/formatNumber.d.ts +2 -2
  20. package/dist/formatters/number/formatNumber.d.ts.map +1 -1
  21. package/dist/formatters/number/index.d.ts +1 -0
  22. package/dist/formatters/number/index.d.ts.map +1 -1
  23. package/dist/formatters/number/numberFormatConstants.d.ts +5 -0
  24. package/dist/formatters/number/numberFormatConstants.d.ts.map +1 -1
  25. package/dist/formatters/number/numberPresetNameConstants.d.ts +1 -0
  26. package/dist/formatters/number/numberPresetNameConstants.d.ts.map +1 -1
  27. package/dist/formatters/number/presets.d.ts +2 -1
  28. package/dist/formatters/number/presets.d.ts.map +1 -1
  29. package/dist/formatters/number/types.d.ts +3 -1
  30. package/dist/formatters/number/types.d.ts.map +1 -1
  31. package/package.json +1 -1
  32. package/src/binary/README.mdx +38 -78
  33. package/src/excel/README.mdx +12 -0
  34. package/src/formatters/number/README.mdx +41 -7
  35. package/dist/chunks/formatters-CMfD97RB.js.map +0 -1
  36. package/dist/chunks/validate-rivmPJyV.js.map +0 -1
@@ -1,76 +1,82 @@
1
1
  import { at as e } from "./scalarTypeClassification-D4YcGxtQ.js";
2
2
  import { g as t, h as n, p as r, t as i } from "./formulas-BZtCqzBj.js";
3
3
  //#region src/formatters/number/numberFormatConstants.ts
4
- var a = "round", o = "floor", s = "ceil", c = "trunc", l = "ru-RU", u = "group", d = "decimal", f = "integer", p = "decimal", m = "decimal-2", h = "decimal-3", g = "currency", _ = "price", v = "percent", y = "tonnage", b = "compact-currency", x = "compact-currency-round", S = "compact-percent", C = "compact-percent-round", w = "compact-tonnage", T = "compact-tonnage-round", E = {
4
+ var a = "round", o = "floor", s = "ceil", c = "trunc", l = "ru-RU", u = "decimal", d = "percent", f = "group", ee = "decimal", te = "percentSign", ne = "literal", p = "integer", m = "decimal", h = "decimal-2", g = "decimal-3", _ = "currency", v = "price", y = "percent", b = "ratio-percent", x = "tonnage", re = "compact-currency", S = "compact-currency-round", C = "compact-percent", w = "compact-percent-round", T = "compact-tonnage", E = "compact-tonnage-round", D = {
5
5
  decimals: 1,
6
6
  decimalSeparator: ",",
7
7
  grouping: !0,
8
8
  groupingSeparator: new Intl.NumberFormat("ru-RU").formatToParts(1e3).find((e) => e.type === "group")?.value ?? "\xA0",
9
9
  groupingSize: 3
10
- }, ee = Object.freeze({
11
- integer: f,
12
- decimal: p,
13
- decimal2: m,
14
- decimal3: h,
15
- currency: g,
16
- price: _,
17
- percent: v,
18
- tonnage: y,
19
- compactCurrency: b,
20
- compactCurrencyRound: x,
21
- compactPercent: S,
22
- compactPercentRound: C,
23
- compactTonnage: w,
24
- compactTonnageRound: T
25
- }), te = [
10
+ }, ie = Object.freeze({
11
+ integer: p,
12
+ decimal: m,
13
+ decimal2: h,
14
+ decimal3: g,
15
+ currency: _,
16
+ price: v,
17
+ percent: y,
18
+ ratioPercent: b,
19
+ tonnage: x,
20
+ compactCurrency: re,
21
+ compactCurrencyRound: S,
22
+ compactPercent: C,
23
+ compactPercentRound: w,
24
+ compactTonnage: T,
25
+ compactTonnageRound: E
26
+ }), ae = [
26
27
  {
27
- name: f,
28
+ name: p,
28
29
  decimals: 0,
29
30
  decimalSeparator: ""
30
31
  },
31
- { name: p },
32
+ { name: m },
32
33
  {
33
- name: m,
34
+ name: h,
34
35
  decimals: 2
35
36
  },
36
37
  {
37
- name: h,
38
+ name: g,
38
39
  decimals: 3
39
40
  },
40
41
  {
41
- name: g,
42
+ name: _,
42
43
  decimals: 0,
43
44
  decimalSeparator: ""
44
45
  },
45
46
  {
46
- name: _,
47
+ name: v,
47
48
  decimals: 0,
48
49
  decimalSeparator: ""
49
50
  },
50
51
  {
51
- name: v,
52
+ name: y,
52
53
  decimals: 2
53
54
  },
54
- { name: y },
55
55
  {
56
56
  name: b,
57
+ decimals: 2,
58
+ style: d
59
+ },
60
+ { name: x },
61
+ {
62
+ name: re,
57
63
  decimals: 0,
58
64
  decimalSeparator: "",
59
65
  compact: {}
60
66
  },
61
67
  {
62
- name: x,
68
+ name: S,
63
69
  decimals: 0,
64
70
  decimalSeparator: "",
65
71
  compact: { roundingMode: a }
66
72
  },
67
73
  {
68
- name: S,
74
+ name: C,
69
75
  decimals: 2,
70
76
  compact: { maxDecimals: 2 }
71
77
  },
72
78
  {
73
- name: C,
79
+ name: w,
74
80
  decimals: 2,
75
81
  compact: {
76
82
  maxDecimals: 2,
@@ -78,71 +84,74 @@ var a = "round", o = "floor", s = "ceil", c = "trunc", l = "ru-RU", u = "group",
78
84
  }
79
85
  },
80
86
  {
81
- name: w,
87
+ name: T,
82
88
  compact: { maxDecimals: 1 }
83
89
  },
84
90
  {
85
- name: T,
91
+ name: E,
86
92
  compact: {
87
93
  maxDecimals: 1,
88
94
  roundingMode: a
89
95
  }
90
96
  }
91
- ], D = /* @__PURE__ */ new Map();
92
- function O() {
93
- for (let e of te) D.set(e.name, {
94
- ...E,
97
+ ], O = /* @__PURE__ */ new Map();
98
+ function k(e) {
99
+ if (e.style === "percent" && e.compact !== void 0) throw Error("Процентный style предустановки не поддерживает compact.");
100
+ }
101
+ function A() {
102
+ for (let e of ae) O.set(e.name, {
103
+ ...D,
95
104
  ...e
96
105
  });
97
106
  }
98
- O();
99
- function k(e) {
100
- return D.get(e);
107
+ A();
108
+ function j(e) {
109
+ return O.get(e);
101
110
  }
102
- function ne() {
103
- return Array.from(D.keys());
111
+ function oe() {
112
+ return Array.from(O.keys());
104
113
  }
105
- function re(e) {
114
+ function se(e) {
106
115
  let t = {
107
- ...E,
116
+ ...D,
108
117
  ...e
109
118
  };
110
- return D.set(t.name, t), t;
119
+ return k(t), O.set(t.name, t), t;
111
120
  }
112
- function ie() {
113
- D.clear(), O();
121
+ function ce() {
122
+ O.clear(), A();
114
123
  }
115
- function ae(e) {
116
- if (typeof e != "string") return e;
117
- let t = k(e);
124
+ function le(e) {
125
+ if (typeof e != "string") return k(e), e;
126
+ let t = j(e);
118
127
  if (!t) throw Error(`Предустановка "${e}" не найдена`);
119
- return t;
128
+ return k(t), t;
120
129
  }
121
130
  //#endregion
122
131
  //#region src/formatters/valueState/valueStateResolverConstants.ts
123
- var A = "fixed", oe = "threshold", se = "lower", ce = "upper", j = "normalizeLeadingZeros", M = "rowBasedOverride", N = "resolveValueState", P = "typedValueFormat", F = "source", I = "sink", le = "field", ue = "formula", de = "value", fe = "left", pe = "right", me = "plain", he = "tree", ge = "group", _e = "totals", ve = "formula";
132
+ var ue = "fixed", M = "threshold", de = "lower", fe = "upper", N = "normalizeLeadingZeros", P = "rowBasedOverride", F = "resolveValueState", I = "typedValueFormat", L = "source", R = "sink", pe = "field", me = "formula", he = "value", ge = "left", _e = "right", ve = "plain", ye = "tree", be = "group", xe = "totals", Se = "formula";
124
133
  //#endregion
125
134
  //#region src/formatters/pipeline/clone.ts
126
- function L(e) {
135
+ function z(e) {
127
136
  return e ? { ...e } : void 0;
128
137
  }
129
- function R(e) {
138
+ function B(e) {
130
139
  return e ? { ...e } : void 0;
131
140
  }
132
- function z(e) {
141
+ function V(e) {
133
142
  return e.mode === "formula" ? {
134
143
  ...e,
135
144
  dependencyIds: e.dependencyIds ? [...e.dependencyIds] : void 0
136
145
  } : { ...e };
137
146
  }
138
- function B(e) {
147
+ function H(e) {
139
148
  return {
140
149
  resolver: e.resolver.kind === "fixed" ? {
141
- kind: A,
150
+ kind: ue,
142
151
  entries: { ...e.resolver.entries },
143
152
  fallbackState: e.resolver.fallbackState
144
153
  } : {
145
- kind: oe,
154
+ kind: M,
146
155
  thresholds: e.resolver.thresholds.map((e) => typeof e == "number" ? e : { ...e }),
147
156
  states: [...e.resolver.states],
148
157
  invalidState: e.resolver.invalidState
@@ -154,82 +163,82 @@ function B(e) {
154
163
  icon: e.icon ? { ...e.icon } : void 0
155
164
  };
156
165
  }
157
- function V(e) {
166
+ function U(e) {
158
167
  switch (e.type) {
159
- case P: return {
168
+ case I: return {
160
169
  ...e,
161
- config: L(e.config)
170
+ config: z(e.config)
162
171
  };
163
- case j: return {
172
+ case N: return {
164
173
  ...e,
165
- config: R(e.config)
174
+ config: B(e.config)
166
175
  };
167
- case M: return {
176
+ case P: return {
168
177
  ...e,
169
- config: z(e.config)
178
+ config: V(e.config)
170
179
  };
171
- case N: return {
180
+ case F: return {
172
181
  ...e,
173
- config: B(e.config)
182
+ config: H(e.config)
174
183
  };
175
184
  }
176
185
  throw Error(`Недопустимый тип '${e?.type}' для шага FormatterPipeline`);
177
186
  }
178
- function H(e, t) {
187
+ function W(e, t) {
179
188
  switch (e.type) {
180
- case P: return {
189
+ case I: return {
181
190
  ...e,
182
191
  position: { ...t },
183
- config: L(e.config)
192
+ config: z(e.config)
184
193
  };
185
- case j: return {
194
+ case N: return {
186
195
  ...e,
187
196
  position: { ...t },
188
- config: R(e.config)
197
+ config: B(e.config)
189
198
  };
190
- case M: return {
199
+ case P: return {
191
200
  ...e,
192
201
  position: { ...t },
193
- config: z(e.config)
202
+ config: V(e.config)
194
203
  };
195
- case N: return {
204
+ case F: return {
196
205
  ...e,
197
206
  position: { ...t },
198
- config: B(e.config)
207
+ config: H(e.config)
199
208
  };
200
209
  }
201
210
  throw Error(`Недопустимый тип '${e?.type}' для шага FormatterPipeline`);
202
211
  }
203
- function ye(e) {
212
+ function Ce(e) {
204
213
  switch (e.type) {
205
- case F:
206
- case I: return {
214
+ case L:
215
+ case R: return {
207
216
  ...e,
208
217
  position: { ...e.position }
209
218
  };
210
- default: return H(e, e.position);
219
+ default: return W(e, e.position);
211
220
  }
212
221
  }
213
- function be(e) {
222
+ function we(e) {
214
223
  return {
215
- nodes: e.nodes.map(ye),
224
+ nodes: e.nodes.map(Ce),
216
225
  edges: e.edges.map((e) => ({ ...e })),
217
226
  viewport: e.viewport ? { ...e.viewport } : void 0
218
227
  };
219
228
  }
220
- function xe(e) {
221
- return { steps: e.steps.map(V) };
229
+ function Te(e) {
230
+ return { steps: e.steps.map(U) };
222
231
  }
223
- function Se(e) {
232
+ function Ee(e) {
224
233
  if (e) return {
225
234
  version: e.version,
226
- graph: e.graph ? be(e.graph) : void 0,
227
- plan: e.plan ? xe(e.plan) : void 0
235
+ graph: e.graph ? we(e.graph) : void 0,
236
+ plan: e.plan ? Te(e.plan) : void 0
228
237
  };
229
238
  }
230
239
  //#endregion
231
240
  //#region src/formatters/rowBased/context.ts
232
- function U(t) {
241
+ function G(t) {
233
242
  let n = [...t.keys ?? []], r = (e) => {
234
243
  if (!Number.isInteger(e) || e < 0) {
235
244
  t.instrumentation?.onOutOfRangeIndex?.(e);
@@ -258,7 +267,7 @@ function U(t) {
258
267
  }
259
268
  //#endregion
260
269
  //#region src/formatters/rowBased/registry.ts
261
- function W(e) {
270
+ function K(e) {
262
271
  let t = /* @__PURE__ */ new Map(), n = [];
263
272
  for (let r of e) {
264
273
  let e = r.id.trim();
@@ -277,53 +286,53 @@ function W(e) {
277
286
  byId: t
278
287
  });
279
288
  }
280
- var G = W([]);
281
- function Ce(e) {
282
- G = e;
289
+ var q = K([]);
290
+ function De(e) {
291
+ q = e;
283
292
  }
284
- function we() {
285
- return G.list;
293
+ function Oe() {
294
+ return q.list;
286
295
  }
287
- function K(e) {
296
+ function J(e) {
288
297
  let t = e?.trim();
289
- if (t) return G.byId.get(t);
298
+ if (t) return q.byId.get(t);
290
299
  }
291
300
  //#endregion
292
301
  //#region src/formatters/pipeline/pipelineValidationConstants.ts
293
- var Te = "config_not_defined", Ee = "unsupported_version", De = "graph_or_plan_required", q = "node_id_duplicate", J = "edge_id_duplicate", Oe = "edge_node_not_found", ke = "source_count_invalid", Ae = "sink_count_invalid", je = "source_incoming_invalid", Me = "sink_outgoing_invalid", Y = "node_degree_invalid", X = "path_broken", Ne = "path_cycle_detected", Pe = "path_disconnected_nodes", Z = "step_id_duplicate", Fe = "step_resolve_value_state_multiple", Ie = "step_typed_value_format_multiple", Le = "step_row_based_override_multiple", Re = "step_normalize_leading_zeros_multiple", ze = "step_typed_before_value_state", Be = "step_row_based_override_field_key_empty", Ve = "step_row_based_override_formula_id_empty", He = "step_row_based_override_formula_not_found", Ue = "step_row_based_override_dependency_index_out_of_range", We = "step_row_based_override_unused_dependencies", Ge = "step_row_based_override_formula_does_not_use_dependencies", Ke = "step_row_based_override_formula_runtime_error", qe = "step_value_state_formula_id_empty", Je = "step_value_state_formula_not_found", Ye = "step_value_state_dependency_id_empty", Xe = "step_value_state_dependency_index_out_of_range", Ze = "step_value_state_unused_dependencies", Qe = "step_value_state_formula_does_not_use_dependencies", $e = "step_value_state_formula_runtime_error", et = "step_threshold_states_count_invalid", tt = "step_value_hidden_without_icon", nt = "step_typed_value_format_preset_empty", rt = "step_typed_value_format_preset_not_found", it = 100;
294
- function Q(e, t, n) {
302
+ var ke = "config_not_defined", Ae = "unsupported_version", je = "graph_or_plan_required", Me = "node_id_duplicate", Ne = "edge_id_duplicate", Pe = "edge_node_not_found", Fe = "source_count_invalid", Ie = "sink_count_invalid", Le = "source_incoming_invalid", Re = "sink_outgoing_invalid", Y = "node_degree_invalid", X = "path_broken", ze = "path_cycle_detected", Be = "path_disconnected_nodes", Ve = "step_id_duplicate", He = "step_resolve_value_state_multiple", Ue = "step_typed_value_format_multiple", We = "step_row_based_override_multiple", Ge = "step_normalize_leading_zeros_multiple", Ke = "step_typed_before_value_state", qe = "step_row_based_override_field_key_empty", Je = "step_row_based_override_formula_id_empty", Ye = "step_row_based_override_formula_not_found", Xe = "step_row_based_override_dependency_index_out_of_range", Ze = "step_row_based_override_unused_dependencies", Qe = "step_row_based_override_formula_does_not_use_dependencies", $e = "step_row_based_override_formula_runtime_error", et = "step_value_state_formula_id_empty", tt = "step_value_state_formula_not_found", nt = "step_value_state_dependency_id_empty", rt = "step_value_state_dependency_index_out_of_range", it = "step_value_state_unused_dependencies", at = "step_value_state_formula_does_not_use_dependencies", ot = "step_value_state_formula_runtime_error", st = "step_threshold_states_count_invalid", ct = "step_value_hidden_without_icon", lt = "step_typed_value_format_preset_empty", ut = "step_typed_value_format_preset_not_found", dt = 100;
303
+ function Z(e, t, n) {
295
304
  e.errors.push({
296
305
  code: t,
297
306
  message: n
298
307
  });
299
308
  }
300
- function $(e, t, n) {
309
+ function Q(e, t, n) {
301
310
  e.warnings.push({
302
311
  code: t,
303
312
  message: n
304
313
  });
305
314
  }
306
- function at(e) {
315
+ function ft(e) {
307
316
  return [...e].sort((e, t) => e - t);
308
317
  }
309
- function ot(e, t) {
318
+ function $(e, t) {
310
319
  return e.reduce((e, n, r) => (e[n] = (r + 1) * t, e), {});
311
320
  }
312
- function st(e, t) {
321
+ function pt(e, t) {
313
322
  if (!e.formulaId.trim()) {
314
- Q(t, Ve, "Для rowBasedOverride (formula) необходимо заполнить formulaId.");
323
+ Z(t, Je, "Для rowBasedOverride (formula) необходимо заполнить formulaId.");
315
324
  return;
316
325
  }
317
- let n = K(e.formulaId), r = [...e.dependencyIds ?? []];
326
+ let n = J(e.formulaId), r = [...e.dependencyIds ?? []];
318
327
  if (!n) {
319
- Q(t, He, "Формула rowBasedOverride не найдена в реестре.");
328
+ Z(t, Ye, "Формула rowBasedOverride не найдена в реестре.");
320
329
  return;
321
330
  }
322
331
  let i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = 0, s = (e) => {
323
332
  try {
324
- let t = U({
333
+ let t = G({
325
334
  rowData: e,
326
- rawValue: it,
335
+ rawValue: dt,
327
336
  columnId: "__validation__",
328
337
  keys: r,
329
338
  instrumentation: {
@@ -340,19 +349,19 @@ function st(e, t) {
340
349
  o += 1;
341
350
  }
342
351
  };
343
- s(ot(r, it)), s(ot(r, -100));
344
- let c = at(i), l = c.length > 0 ? c[c.length - 1] + 1 : 0;
345
- a.size > 0 && Q(t, Ue, `Формула rowBasedOverride обращается к несуществующим индексам. Минимально требуется зависимостей: ${l}, выбрано: ${r.length}.`), c.length === 0 && $(t, Ge, "Формула rowBasedOverride не использует dependencyIds.");
352
+ s($(r, dt)), s($(r, -100));
353
+ let c = ft(i), l = c.length > 0 ? c[c.length - 1] + 1 : 0;
354
+ a.size > 0 && Z(t, Xe, `Формула rowBasedOverride обращается к несуществующим индексам. Минимально требуется зависимостей: ${l}, выбрано: ${r.length}.`), c.length === 0 && Q(t, Qe, "Формула rowBasedOverride не использует dependencyIds.");
346
355
  let u = r.filter((e, t) => !i.has(t));
347
- u.length > 0 && $(t, We, `Выбраны, но не используются формулой rowBasedOverride: ${u.join(", ")}.`), o > 0 && $(t, Ke, "На тестовых данных формула rowBasedOverride завершилась с ошибкой.");
356
+ u.length > 0 && Q(t, Ze, `Выбраны, но не используются формулой rowBasedOverride: ${u.join(", ")}.`), o > 0 && Q(t, $e, "На тестовых данных формула rowBasedOverride завершилась с ошибкой.");
348
357
  }
349
- function ct(e, a) {
358
+ function mt(e, a) {
350
359
  if (!e.formulaId.trim()) {
351
- Q(a, qe, "Для источника состояния необходимо выбрать формулу.");
360
+ Z(a, et, "Для источника состояния необходимо выбрать формулу.");
352
361
  return;
353
362
  }
354
363
  if (e.dependencyIds.some((e) => !e.trim())) {
355
- Q(a, Ye, "Зависимость формулы состояния не может иметь пустой id.");
364
+ Z(a, nt, "Зависимость формулы состояния не может иметь пустой id.");
356
365
  return;
357
366
  }
358
367
  let o = i({
@@ -360,18 +369,18 @@ function ct(e, a) {
360
369
  dependencies: e.dependencyIds,
361
370
  availableColumnIds: e.dependencyIds
362
371
  });
363
- for (let e of o.errors) e.code === "formula_not_found" ? Q(a, Je, "Формула источника состояния не найдена в реестре.") : e.code === "dependency_index_out_of_range" && Q(a, Xe, e.message);
372
+ for (let e of o.errors) e.code === "formula_not_found" ? Z(a, tt, "Формула источника состояния не найдена в реестре.") : e.code === "dependency_index_out_of_range" && Z(a, rt, e.message);
364
373
  for (let e of o.warnings) switch (e.code) {
365
374
  case n:
366
- $(a, Ze, e.message);
375
+ Q(a, it, e.message);
367
376
  break;
368
377
  case r:
369
- $(a, Qe, e.message);
378
+ Q(a, at, e.message);
370
379
  break;
371
- case t: $(a, $e, e.message);
380
+ case t: Q(a, ot, e.message);
372
381
  }
373
382
  }
374
- function lt(e, t) {
383
+ function ht(e, t) {
375
384
  let n = /* @__PURE__ */ new Set(), r = {
376
385
  normalizeLeadingZeros: 0,
377
386
  rowBasedOverride: 0,
@@ -381,99 +390,99 @@ function lt(e, t) {
381
390
  for (let i of e) {
382
391
  let e = i.id.trim();
383
392
  if (!e) {
384
- Q(t, Z, "Шаг pipeline не может иметь пустой id.");
393
+ Z(t, Ve, "Шаг pipeline не может иметь пустой id.");
385
394
  continue;
386
395
  }
387
- switch (n.has(e) && Q(t, Z, `Найден дублирующийся id шага pipeline: ${e}.`), n.add(e), i.type) {
388
- case j:
396
+ switch (n.has(e) && Z(t, Ve, `Найден дублирующийся id шага pipeline: ${e}.`), n.add(e), i.type) {
397
+ case N:
389
398
  r.normalizeLeadingZeros += 1;
390
399
  break;
391
- case M:
392
- r.rowBasedOverride += 1, i.config.mode === "field" && !i.config.fieldKey.trim() && Q(t, Be, "Для rowBasedOverride (field) необходимо заполнить fieldKey."), i.config.mode === "formula" && st(i.config, t);
400
+ case P:
401
+ r.rowBasedOverride += 1, i.config.mode === "field" && !i.config.fieldKey.trim() && Z(t, qe, "Для rowBasedOverride (field) необходимо заполнить fieldKey."), i.config.mode === "formula" && pt(i.config, t);
393
402
  break;
394
- case N:
395
- r.resolveValueState += 1, i.config.valueSource?.kind === "formula" && ct(i.config.valueSource, t), i.config.resolver.kind === "threshold" && i.config.resolver.states.length !== i.config.resolver.thresholds.length + 1 && Q(t, et, "Для threshold-резолвера количество states должно быть равно thresholds + 1.");
403
+ case F:
404
+ r.resolveValueState += 1, i.config.valueSource?.kind === "formula" && mt(i.config.valueSource, t), i.config.resolver.kind === "threshold" && i.config.resolver.states.length !== i.config.resolver.thresholds.length + 1 && Z(t, st, "Для threshold-резолвера количество states должно быть равно thresholds + 1.");
396
405
  break;
397
- case P: if (r.typedValueFormat += 1, i.config?.numberPresetName !== void 0) {
406
+ case I: if (r.typedValueFormat += 1, i.config?.numberPresetName !== void 0) {
398
407
  let e = i.config.numberPresetName.trim();
399
408
  if (!e) {
400
- Q(t, nt, "Для typedValueFormat указан пустой numberPresetName.");
409
+ Z(t, lt, "Для typedValueFormat указан пустой numberPresetName.");
401
410
  break;
402
411
  }
403
- k(e) || Q(t, rt, `Для typedValueFormat указан неизвестный пресет: ${e}.`);
412
+ j(e) || Z(t, ut, `Для typedValueFormat указан неизвестный пресет: ${e}.`);
404
413
  }
405
414
  }
406
415
  }
407
- r.normalizeLeadingZeros > 1 && Q(t, Re, "В pipeline может быть только один шаг normalizeLeadingZeros."), r.rowBasedOverride > 1 && Q(t, Le, "В pipeline может быть только один шаг rowBasedOverride."), r.resolveValueState > 1 && Q(t, Fe, "В pipeline может быть только один шаг resolveValueState."), r.typedValueFormat > 1 && Q(t, Ie, "В pipeline может быть только один шаг typedValueFormat.");
408
- let i = e.findIndex((e) => e.type === N), a = e.findIndex((e) => e.type === P);
409
- i !== -1 && a !== -1 && a < i && Q(t, ze, "Шаг typedValueFormat не может выполняться до шага resolveValueState.");
410
- for (let n of e) n.type === "resolveValueState" && !n.config.icon?.enabled && n.config.icon?.showValue === !1 && $(t, tt, "Для resolveValueState установлено showValue=false при выключенной иконке: значение не будет отображаться.");
416
+ r.normalizeLeadingZeros > 1 && Z(t, Ge, "В pipeline может быть только один шаг normalizeLeadingZeros."), r.rowBasedOverride > 1 && Z(t, We, "В pipeline может быть только один шаг rowBasedOverride."), r.resolveValueState > 1 && Z(t, He, "В pipeline может быть только один шаг resolveValueState."), r.typedValueFormat > 1 && Z(t, Ue, "В pipeline может быть только один шаг typedValueFormat.");
417
+ let i = e.findIndex((e) => e.type === F), a = e.findIndex((e) => e.type === I);
418
+ i !== -1 && a !== -1 && a < i && Z(t, Ke, "Шаг typedValueFormat не может выполняться до шага resolveValueState.");
419
+ for (let n of e) n.type === "resolveValueState" && !n.config.icon?.enabled && n.config.icon?.showValue === !1 && Q(t, ct, "Для resolveValueState установлено showValue=false при выключенной иконке: значение не будет отображаться.");
411
420
  }
412
- function ut(e) {
421
+ function gt(e) {
413
422
  let t = {
414
423
  errors: [],
415
424
  warnings: []
416
425
  };
417
- return lt(e.steps, t), {
426
+ return ht(e.steps, t), {
418
427
  ok: t.errors.length === 0,
419
428
  errors: t.errors,
420
429
  warnings: t.warnings,
421
430
  plan: t.errors.length === 0 ? { steps: [...e.steps] } : void 0
422
431
  };
423
432
  }
424
- function dt(e, t, n) {
433
+ function _t(e, t, n) {
425
434
  let r = new Map(e.map((e) => [e.id, e])), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
426
435
  for (let t of e) i.set(t.id, []), a.set(t.id, []);
427
436
  for (let e of t) {
428
437
  let t = e.source.trim(), o = e.target.trim();
429
438
  if (!r.has(t) || !r.has(o)) {
430
- Q(n, Oe, `Ребро ${e.id} ссылается на несуществующий узел: ${t} -> ${o}.`);
439
+ Z(n, Pe, `Ребро ${e.id} ссылается на несуществующий узел: ${t} -> ${o}.`);
431
440
  continue;
432
441
  }
433
442
  i.get(t)?.push(o), a.get(o)?.push(t);
434
443
  }
435
- let o = e.filter((e) => e.type === F), s = e.filter((e) => e.type === I);
436
- if (o.length !== 1 && Q(n, ke, "В графе должен быть ровно один узел source."), s.length !== 1 && Q(n, Ae, "В графе должен быть ровно один узел sink."), n.errors.length > 0) return;
444
+ let o = e.filter((e) => e.type === L), s = e.filter((e) => e.type === R);
445
+ if (o.length !== 1 && Z(n, Fe, "В графе должен быть ровно один узел source."), s.length !== 1 && Z(n, Ie, "В графе должен быть ровно один узел sink."), n.errors.length > 0) return;
437
446
  let c = o[0].id, l = s[0].id;
438
447
  for (let t of e) {
439
448
  let e = a.get(t.id)?.length ?? 0, r = i.get(t.id)?.length ?? 0;
440
449
  if (t.type === "source") {
441
- e !== 0 && Q(n, je, "Узел source не должен иметь входящих рёбер."), r !== 1 && Q(n, Y, "Узел source должен иметь ровно одно исходящее ребро.");
450
+ e !== 0 && Z(n, Le, "Узел source не должен иметь входящих рёбер."), r !== 1 && Z(n, Y, "Узел source должен иметь ровно одно исходящее ребро.");
442
451
  continue;
443
452
  }
444
453
  if (t.type === "sink") {
445
- r !== 0 && Q(n, Me, "Узел sink не должен иметь исходящих рёбер."), e !== 1 && Q(n, Y, "Узел sink должен иметь ровно одно входящее ребро.");
454
+ r !== 0 && Z(n, Re, "Узел sink не должен иметь исходящих рёбер."), e !== 1 && Z(n, Y, "Узел sink должен иметь ровно одно входящее ребро.");
446
455
  continue;
447
456
  }
448
- (e !== 1 || r !== 1) && Q(n, Y, `Узел ${t.id} должен иметь ровно одно входящее и одно исходящее ребро для линейного pipeline.`);
457
+ (e !== 1 || r !== 1) && Z(n, Y, `Узел ${t.id} должен иметь ровно одно входящее и одно исходящее ребро для линейного pipeline.`);
449
458
  }
450
459
  if (n.errors.length > 0) return;
451
460
  let u = /* @__PURE__ */ new Set(), d = [], f = c;
452
461
  for (;;) {
453
462
  if (u.has(f)) {
454
- Q(n, Ne, "В графе pipeline обнаружен цикл.");
463
+ Z(n, ze, "В графе pipeline обнаружен цикл.");
455
464
  return;
456
465
  }
457
466
  if (u.add(f), d.push(f), f === l) break;
458
467
  let e = i.get(f) ?? [];
459
468
  if (e.length !== 1) {
460
- Q(n, X, "Не удалось построить линейный путь от source к sink.");
469
+ Z(n, X, "Не удалось построить линейный путь от source к sink.");
461
470
  return;
462
471
  }
463
472
  f = e[0];
464
473
  }
465
474
  if (u.size !== e.length) {
466
- Q(n, Pe, "Граф содержит узлы, которые не входят в линейный путь source -> sink.");
475
+ Z(n, Be, "Граф содержит узлы, которые не входят в линейный путь source -> sink.");
467
476
  return;
468
477
  }
469
478
  return d;
470
479
  }
471
- function ft(e) {
480
+ function vt(e) {
472
481
  let t = {
473
482
  errors: [],
474
483
  warnings: []
475
484
  };
476
- if (!e.nodes.length) return Q(t, X, "Граф pipeline не содержит узлов."), {
485
+ if (!e.nodes.length) return Z(t, X, "Граф pipeline не содержит узлов."), {
477
486
  ok: !1,
478
487
  errors: t.errors,
479
488
  warnings: t.warnings
@@ -482,11 +491,11 @@ function ft(e) {
482
491
  for (let r of e.nodes) {
483
492
  let e = r.id.trim();
484
493
  if (!e) {
485
- Q(t, q, "Узел pipeline не может иметь пустой id.");
494
+ Z(t, Me, "Узел pipeline не может иметь пустой id.");
486
495
  continue;
487
496
  }
488
497
  if (n.has(e)) {
489
- Q(t, q, `Найден дублирующийся id узла pipeline: ${e}.`);
498
+ Z(t, Me, `Найден дублирующийся id узла pipeline: ${e}.`);
490
499
  continue;
491
500
  }
492
501
  n.set(e, r);
@@ -495,11 +504,11 @@ function ft(e) {
495
504
  for (let n of e.edges) {
496
505
  let e = n.id.trim();
497
506
  if (!e) {
498
- Q(t, J, "Ребро pipeline не может иметь пустой id.");
507
+ Z(t, Ne, "Ребро pipeline не может иметь пустой id.");
499
508
  continue;
500
509
  }
501
510
  if (r.has(e)) {
502
- Q(t, J, `Найден дублирующийся id ребра pipeline: ${e}.`);
511
+ Z(t, Ne, `Найден дублирующийся id ребра pipeline: ${e}.`);
503
512
  continue;
504
513
  }
505
514
  r.add(e);
@@ -509,7 +518,7 @@ function ft(e) {
509
518
  errors: t.errors,
510
519
  warnings: t.warnings
511
520
  };
512
- let i = dt(e.nodes, e.edges, t);
521
+ let i = _t(e.nodes, e.edges, t);
513
522
  if (!i) return {
514
523
  ok: !1,
515
524
  errors: t.errors,
@@ -519,73 +528,73 @@ function ft(e) {
519
528
  for (let e of i) {
520
529
  let t = n.get(e);
521
530
  if (!(!t || t.type === "source" || t.type === "sink")) switch (t.type) {
522
- case j:
531
+ case N:
523
532
  a.push({
524
533
  id: t.id,
525
- type: j,
534
+ type: N,
526
535
  config: t.config ? { ...t.config } : void 0
527
536
  });
528
537
  break;
529
- case M:
538
+ case P:
530
539
  a.push({
531
540
  id: t.id,
532
- type: M,
541
+ type: P,
533
542
  config: t.config.mode === "formula" ? {
534
543
  ...t.config,
535
544
  dependencyIds: t.config.dependencyIds ? [...t.config.dependencyIds] : void 0
536
545
  } : { ...t.config }
537
546
  });
538
547
  break;
539
- case N:
548
+ case F:
540
549
  a.push({
541
550
  id: t.id,
542
- type: N,
543
- config: B(t.config)
551
+ type: F,
552
+ config: H(t.config)
544
553
  });
545
554
  break;
546
- case P: a.push({
555
+ case I: a.push({
547
556
  id: t.id,
548
- type: P,
557
+ type: I,
549
558
  config: t.config ? { ...t.config } : void 0
550
559
  });
551
560
  }
552
561
  }
553
- return lt(a, t), {
562
+ return ht(a, t), {
554
563
  ok: t.errors.length === 0,
555
564
  errors: t.errors,
556
565
  warnings: t.warnings,
557
566
  plan: t.errors.length === 0 ? { steps: a } : void 0
558
567
  };
559
568
  }
560
- function pt(e) {
569
+ function yt(e) {
561
570
  let t = {
562
571
  errors: [],
563
572
  warnings: []
564
573
  };
565
- if (!e) return Q(t, Te, "Конфигурация pipeline не задана."), {
574
+ if (!e) return Z(t, ke, "Конфигурация pipeline не задана."), {
566
575
  ok: !1,
567
576
  errors: t.errors,
568
577
  warnings: t.warnings
569
578
  };
570
- if (e.version !== 1) return Q(t, Ee, `Неподдерживаемая версия pipeline: ${String(e.version)}.`), {
579
+ if (e.version !== 1) return Z(t, Ae, `Неподдерживаемая версия pipeline: ${String(e.version)}.`), {
571
580
  ok: !1,
572
581
  errors: t.errors,
573
582
  warnings: t.warnings
574
583
  };
575
- if (!e.plan && !e.graph) return Q(t, De, "Для pipeline должен быть задан хотя бы один источник: graph или plan."), {
584
+ if (!e.plan && !e.graph) return Z(t, je, "Для pipeline должен быть задан хотя бы один источник: graph или plan."), {
576
585
  ok: !1,
577
586
  errors: t.errors,
578
587
  warnings: t.warnings
579
588
  };
580
589
  if (e.plan) {
581
- let n = ut(e.plan);
590
+ let n = gt(e.plan);
582
591
  if (t.errors.push(...n.errors), t.warnings.push(...n.warnings), n.ok && n.plan) return {
583
592
  ok: !0,
584
593
  errors: t.errors,
585
594
  warnings: t.warnings,
586
595
  plan: n.plan
587
596
  };
588
- if (e.graph) $(t, X, "Линейный plan невалиден. Выполнена попытка построить план из graph."), t.errors.length = 0;
597
+ if (e.graph) Q(t, X, "Линейный plan невалиден. Выполнена попытка построить план из graph."), t.errors.length = 0;
589
598
  else return {
590
599
  ok: !1,
591
600
  errors: t.errors,
@@ -593,7 +602,7 @@ function pt(e) {
593
602
  };
594
603
  }
595
604
  if (e.graph) {
596
- let n = ft(e.graph);
605
+ let n = vt(e.graph);
597
606
  return {
598
607
  ok: n.ok,
599
608
  errors: [...t.errors, ...n.errors],
@@ -608,6 +617,6 @@ function pt(e) {
608
617
  };
609
618
  }
610
619
  //#endregion
611
- export { s as $, _e as A, k as B, pe as C, ue as D, le as E, ce as F, g as G, re as H, A as I, h as J, p as K, oe as L, ve as M, de as N, ge as O, se as P, y as Q, ee as R, fe as S, F as T, ie as U, ne as V, ae as W, v as X, f as Y, _ as Z, L as _, Je as a, l as at, M as b, K as c, V as d, o as et, H as f, z as g, B as h, He as i, u as it, he as j, me as k, we as l, R as m, ft as n, c as nt, Ce as o, Se as p, m as q, ut as r, d as rt, W as s, pt as t, a as tt, U as u, j as v, I as w, P as x, N as y, E as z };
620
+ export { x as $, xe as A, j as B, _e as C, me as D, pe as E, fe as F, _ as G, se as H, ue as I, g as J, m as K, M as L, Se as M, he as N, be as O, de as P, b as Q, ie as R, ge as S, L as T, ce as U, oe as V, le as W, y as X, p as Y, v as Z, z as _, tt as a, f as at, P as b, J as c, l as ct, U as d, s as et, W as f, V as g, H as h, Ye as i, ee as it, ye as j, ve as k, Oe as l, u as lt, B as m, vt as n, a as nt, De as o, ne as ot, Ee as p, h as q, gt as r, c as rt, K as s, te as st, yt as t, o as tt, G as u, d as ut, N as v, R as w, I as x, F as y, D as z };
612
621
 
613
- //# sourceMappingURL=validate-rivmPJyV.js.map
622
+ //# sourceMappingURL=validate-Drrm-CCz.js.map