@golemui/core 0.12.2 → 0.13.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.
package/index.js CHANGED
@@ -1,29 +1,6 @@
1
- import { BehaviorSubject as zr, distinctUntilChanged as D, Subject as Jr, pipe as T, map as w, filter as Ee, startWith as Qr, combineLatest as qr } from "rxjs";
2
- const X = class X {
3
- constructor() {
4
- this.widgetLoaders = {}, this._ready = !1;
5
- }
6
- /**
7
- * When the registry has been initialized by calling `setWidgetLoaders`
8
- */
9
- get ready() {
10
- return this._ready;
11
- }
12
- setWidgetLoaders(r) {
13
- this.widgetLoaders = r, this._ready = !0;
14
- }
15
- async loadWidget(r) {
16
- const t = this.widgetLoaders[r];
17
- if (!X.sharedCache.has(t)) {
18
- const n = t().catch((o) => (X.sharedCache.delete(t), Promise.reject(o)));
19
- X.sharedCache.set(t, n);
20
- }
21
- return X.sharedCache.get(t);
22
- }
23
- };
24
- X.sharedCache = /* @__PURE__ */ new Map();
25
- let Re = X;
26
- var Yr = class {
1
+ import { BehaviorSubject as Jr, distinctUntilChanged as D, Subject as Qr, pipe as T, map as O, filter as Ee, startWith as qr, combineLatest as Yr } from "rxjs";
2
+ import "@standard-schema/spec";
3
+ var Zr = class {
27
4
  constructor(e) {
28
5
  this.value = e;
29
6
  }
@@ -33,7 +10,7 @@ var Yr = class {
33
10
  isOk() {
34
11
  return !0;
35
12
  }
36
- }, Zr = class {
13
+ }, xr = class {
37
14
  constructor(e) {
38
15
  this.error = e;
39
16
  }
@@ -45,12 +22,12 @@ var Yr = class {
45
22
  }
46
23
  };
47
24
  function R(e) {
48
- return new Yr(e);
25
+ return new Zr(e);
49
26
  }
50
27
  function v(e) {
51
- return new Zr(e);
28
+ return new xr(e);
52
29
  }
53
- var W = class ke {
30
+ var W = class Re {
54
31
  constructor(r) {
55
32
  this.decodeFn = r, this["~standard"] = { version: 1, vendor: "ts.data.json", validate: (t) => {
56
33
  let n = this.decode(t);
@@ -72,18 +49,18 @@ var W = class ke {
72
49
  });
73
50
  }
74
51
  map(r) {
75
- return new ke((t) => {
52
+ return new Re((t) => {
76
53
  let n = this.decodeFn(t);
77
54
  return n.isOk() ? R(r(n.value)) : v(n.error);
78
55
  });
79
56
  }
80
57
  flatMap(r) {
81
- return new ke((t) => {
58
+ return new Re((t) => {
82
59
  let n = this.decodeFn(t);
83
60
  return n.isOk() ? r(n.value).decode(t) : v(n.error);
84
61
  });
85
62
  }
86
- }, xr = (e, r, t) => `<${e}> decoder failed at index "${r}" with error: ${t}`, Y = (e, r) => `${JSON.stringify(e)} is not a valid ${r}`;
63
+ }, br = (e, r, t) => `<${e}> decoder failed at index "${r}" with error: ${t}`, Y = (e, r) => `${JSON.stringify(e)} is not a valid ${r}`;
87
64
  function Ve(e, r) {
88
65
  return new W((t) => {
89
66
  if (t instanceof Array) {
@@ -91,16 +68,16 @@ function Ve(e, r) {
91
68
  for (let o = 0; o < t.length; o++) {
92
69
  let i = e.decode(t[o]);
93
70
  if (i.isOk()) n.push(i.value);
94
- else return v(xr(r, o, i.error));
71
+ else return v(br(r, o, i.error));
95
72
  }
96
73
  return R(n);
97
74
  } else return v(Y(t, "array"));
98
75
  });
99
76
  }
100
- function br() {
77
+ function et() {
101
78
  return new W((e) => typeof e == "boolean" ? R(e) : v(Y(e, "boolean")));
102
79
  }
103
- function et(e) {
80
+ function hr(e) {
104
81
  return new W((r) => e().decode(r));
105
82
  }
106
83
  var rt = (e, r) => `${JSON.stringify(e)} is not exactly ${JSON.stringify(r)}`;
@@ -134,7 +111,7 @@ function Z(e, r) {
134
111
  return v(nt(r, t));
135
112
  });
136
113
  }
137
- function $(e) {
114
+ function A(e) {
138
115
  return new W((r) => r === void 0 ? R(void 0) : e.decode(r));
139
116
  }
140
117
  var ot = (e, r, t) => `<${e}> record decoder failed at key "${r}" with error: ${t}`;
@@ -157,6 +134,69 @@ function I() {
157
134
  function J() {
158
135
  return new W((e) => R(e));
159
136
  }
137
+ function vo(e) {
138
+ return {
139
+ ...e,
140
+ form: {
141
+ uid: "",
142
+ type: "flex",
143
+ kind: "layout",
144
+ children: e.form
145
+ }
146
+ };
147
+ }
148
+ const pr = oe(
149
+ {
150
+ states: A(it(I(), "states")),
151
+ form: hr(() => He)
152
+ },
153
+ "FormDef"
154
+ ), gr = (e) => ({
155
+ formName: "",
156
+ formDef: pr.parse({
157
+ form: {
158
+ kind: "layout",
159
+ type: "flex",
160
+ children: []
161
+ }
162
+ }),
163
+ flatForm: {},
164
+ currentStates: [],
165
+ calculatedWidgets: {},
166
+ validations: {},
167
+ touchedControls: {},
168
+ injectedValidations: {},
169
+ widgetFlags: {},
170
+ widgetPropOverrides: {},
171
+ data: {},
172
+ meta: {},
173
+ formHealth: { status: "ok" },
174
+ touched: !1,
175
+ lang: e
176
+ }), st = (e) => !(typeof e != "object" || e === null || typeof e.key != "string");
177
+ function Io(e) {
178
+ const r = new Intl.Locale(e).maximize().script;
179
+ return ["Arab", "Hebr", "Thaa", "Syrc", "Tfng", "Adlm", "Rohg"].includes(r || "") ? "rtl" : "ltr";
180
+ }
181
+ const dt = (e = navigator.language || "en-US") => {
182
+ const r = /* @__PURE__ */ new Set();
183
+ return {
184
+ get lang() {
185
+ return e;
186
+ },
187
+ translate(n) {
188
+ return n;
189
+ },
190
+ subscribe(n) {
191
+ return r.add(n), () => {
192
+ r.delete(n);
193
+ };
194
+ },
195
+ setLang(n) {
196
+ e = n, r.forEach((o) => o(e));
197
+ }
198
+ };
199
+ };
160
200
  function ie(e, r) {
161
201
  return new W((t) => {
162
202
  if (typeof t != "object" || t === null)
@@ -179,85 +219,78 @@ function ie(e, r) {
179
219
  return R(n);
180
220
  });
181
221
  }
182
- const hr = () => crypto.randomUUID().slice(0, 8), st = (e) => typeof e != "function" && e.kind === "display", re = (e) => typeof e != "function" && e.kind === "action", P = (e) => typeof e != "function" && e.kind === "input", _e = (e) => typeof e != "function" && e.kind === "layout", se = (e) => typeof e == "function", dt = oe({ in: Ve(I(), "In[]") }, "In"), Ue = oe({ when: I() }, "When"), Ie = Z([dt, Ue], "In | When"), ut = oe({ from: Ve(I(), "From[]") }, "From"), Oe = Z([ut, Ue], "Exclude"), Ne = Z([br(), Ue], "Bool | When"), ct = new W(
183
- (e) => {
184
- const r = typeof e;
185
- return r === "function" ? R(e) : v(`Expected a function, got '${r}'`);
186
- }
187
- ), B = (e) => Z([e, ct], ""), Be = ie(
222
+ const mr = () => crypto.randomUUID().slice(0, 8), ut = (e) => typeof e != "function" && e.kind === "display", re = (e) => typeof e != "function" && e.kind === "action", P = (e) => typeof e != "function" && e.kind === "input", ke = (e) => typeof e != "function" && e.kind === "layout", se = (e) => typeof e == "function", ct = oe({ in: Ve(I(), "In[]") }, "In"), Ue = oe({ when: I() }, "When"), Ie = Z([ct, Ue], "In | When"), lt = oe({ from: Ve(I(), "From[]") }, "From"), we = Z([lt, Ue], "Exclude"), _e = Z([et(), Ue], "Bool | When"), at = new W((e) => {
223
+ const r = typeof e;
224
+ return r === "function" ? R(e) : v(`Expected a function, got '${r}'`);
225
+ }), B = (e) => Z([e, at], ""), Be = ie(
188
226
  {
189
- load: { suffixed: !0, decoder: B($(I())) },
190
- click: { suffixed: !0, decoder: B($(I())) },
191
- change: { suffixed: !0, decoder: B($(I())) },
192
- filter: { suffixed: !0, decoder: B($(I())) },
193
- blur: { suffixed: !0, decoder: B($(I())) }
227
+ load: { suffixed: !0, decoder: B(A(I())) },
228
+ click: { suffixed: !0, decoder: B(A(I())) },
229
+ change: { suffixed: !0, decoder: B(A(I())) },
230
+ filter: { suffixed: !0, decoder: B(A(I())) },
231
+ blur: { suffixed: !0, decoder: B(A(I())) }
194
232
  },
195
233
  "On"
196
- ), lt = oe(
234
+ ), ft = oe(
197
235
  {
198
236
  key: I(),
199
- default: $(I()),
237
+ default: A(I()),
200
238
  params: J()
201
239
  },
202
240
  "TranslationConfig"
203
- ), pr = Z(
204
- [I(), lt],
205
- "Localizable"
206
- ), we = $(I()).map((e) => e || hr()), ft = ie(
241
+ ), yr = Z([I(), ft], "Localizable"), Oe = A(I()).map((e) => e || mr()), ht = ie(
207
242
  {
208
243
  kind: { decoder: Se("display") },
209
- uid: { decoder: we },
244
+ uid: { decoder: Oe },
210
245
  type: { decoder: I() },
211
- size: { suffixed: !0, decoder: $(ve()) },
212
- include: { decoder: $(Ie) },
213
- exclude: { decoder: $(Oe) },
214
- props: { decoder: $(J()) }
246
+ size: { suffixed: !0, decoder: A(ve()) },
247
+ include: { decoder: A(Ie) },
248
+ exclude: { decoder: A(we) },
249
+ props: { decoder: A(J()) }
215
250
  },
216
251
  "DisplayWidget"
217
- ), at = ie(
252
+ ), pt = ie(
218
253
  {
219
254
  kind: { decoder: Se("action") },
220
- uid: { decoder: we },
255
+ uid: { decoder: Oe },
221
256
  type: { decoder: I() },
222
- size: { suffixed: !0, decoder: $(ve()) },
223
- include: { decoder: $(Ie) },
224
- exclude: { decoder: $(Oe) },
225
- label: { suffixed: !0, decoder: B(pr) },
226
- disabled: { suffixed: !0, decoder: $(Ne) },
227
- on: { decoder: $(Be) },
228
- props: { decoder: $(J()) }
257
+ size: { suffixed: !0, decoder: A(ve()) },
258
+ include: { decoder: A(Ie) },
259
+ exclude: { decoder: A(we) },
260
+ label: { suffixed: !0, decoder: B(yr) },
261
+ disabled: { suffixed: !0, decoder: A(_e) },
262
+ on: { decoder: A(Be) },
263
+ props: { decoder: A(J()) }
229
264
  },
230
265
  "ActionWidget"
231
- ), ht = new W(
232
- (e) => {
233
- const r = typeof e;
234
- if (r === "function") {
235
- const t = e, n = t(void 0);
236
- return t.uid = n.uid || hr(), t.type = n.type, t.path = n.path, R(t);
237
- } else
238
- return v(`Expected a function, got '${r}'`);
239
- }
240
- ), pt = ie(
266
+ ), gt = new W((e) => {
267
+ const r = typeof e;
268
+ if (r === "function") {
269
+ const t = e, n = t(void 0);
270
+ return t.uid = n.uid || mr(), t.type = n.type, t.path = n.path, R(t);
271
+ } else
272
+ return v(`Expected a function, got '${r}'`);
273
+ }), mt = ie(
241
274
  {
242
275
  kind: { decoder: Se("input") },
243
- uid: { decoder: we },
276
+ uid: { decoder: Oe },
244
277
  type: { decoder: I() },
245
- size: { suffixed: !0, decoder: $(ve()) },
246
- include: { decoder: $(Ie) },
247
- exclude: { decoder: $(Oe) },
248
- disabled: { suffixed: !0, decoder: $(Ne) },
249
- readonly: { suffixed: !0, decoder: $(Ne) },
250
- on: { decoder: $(Be) },
251
- props: { decoder: $(J()) },
278
+ size: { suffixed: !0, decoder: A(ve()) },
279
+ include: { decoder: A(Ie) },
280
+ exclude: { decoder: A(we) },
281
+ disabled: { suffixed: !0, decoder: A(_e) },
282
+ readonly: { suffixed: !0, decoder: A(_e) },
283
+ on: { decoder: A(Be) },
284
+ props: { decoder: A(J()) },
252
285
  label: {
253
286
  suffixed: !0,
254
- decoder: B($(pr))
287
+ decoder: B(A(yr))
255
288
  },
256
289
  path: { decoder: I() },
257
- defaultValue: { decoder: $(J()) },
290
+ defaultValue: { decoder: A(J()) },
258
291
  validator: {
259
292
  suffixed: !0,
260
- decoder: B($(J()))
293
+ decoder: B(A(J()))
261
294
  }
262
295
  },
263
296
  "InputWidget"
@@ -268,92 +301,88 @@ const hr = () => crypto.randomUUID().slice(0, 8), st = (e) => typeof e != "funct
268
301
  t.template = He.parse(t.template);
269
302
  }
270
303
  return r;
271
- }), gt = et(
304
+ }), yt = hr(
272
305
  () => Z(
273
306
  [
274
- ht,
275
- pt,
307
+ gt,
308
+ mt,
276
309
  He,
277
- ft,
278
- at
310
+ ht,
311
+ pt
279
312
  ],
280
313
  "FormWidget"
281
314
  )
282
315
  ), He = ie(
283
316
  {
284
317
  kind: { decoder: Se("layout") },
285
- uid: { decoder: we },
318
+ uid: { decoder: Oe },
286
319
  type: { decoder: I() },
287
- size: { suffixed: !0, decoder: $(ve()) },
288
- include: { decoder: $(Ie) },
289
- exclude: { decoder: $(Oe) },
290
- props: { decoder: $(J()) },
291
- on: { decoder: $(Be) },
292
- children: { decoder: Ve(gt, "FormWidget[]") }
320
+ size: { suffixed: !0, decoder: A(ve()) },
321
+ include: { decoder: A(Ie) },
322
+ exclude: { decoder: A(we) },
323
+ props: { decoder: A(J()) },
324
+ on: { decoder: A(Be) },
325
+ children: { decoder: Ve(yt, "FormWidget[]") }
293
326
  },
294
327
  "LayoutWidget"
295
- );
296
- function So(e) {
297
- return {
298
- ...e,
299
- form: {
300
- uid: "",
301
- type: "flex",
302
- kind: "layout",
303
- children: e.form
328
+ ), X = class X {
329
+ constructor() {
330
+ this.widgetLoaders = {}, this._ready = !1;
331
+ }
332
+ /**
333
+ * When the registry has been initialized by calling `setWidgetLoaders`
334
+ */
335
+ get ready() {
336
+ return this._ready;
337
+ }
338
+ setWidgetLoaders(r) {
339
+ this.widgetLoaders = r, this._ready = !0;
340
+ }
341
+ async loadWidget(r) {
342
+ const t = this.widgetLoaders[r];
343
+ if (!X.sharedCache.has(t)) {
344
+ const n = t().catch((o) => (X.sharedCache.delete(t), Promise.reject(o)));
345
+ X.sharedCache.set(t, n);
304
346
  }
305
- };
347
+ return X.sharedCache.get(t);
348
+ }
349
+ };
350
+ X.sharedCache = /* @__PURE__ */ new Map();
351
+ let Ne = X;
352
+ function $t(e, r) {
353
+ const t = e["~standard"].validate(r);
354
+ if (t instanceof Promise)
355
+ throw new TypeError("Schema validation must be synchronous");
356
+ return t;
306
357
  }
307
- const gr = oe(
308
- {
309
- states: $(it(I(), "states")),
310
- form: He
311
- },
312
- "FormDef"
313
- ), mr = (e) => ({
314
- formName: "",
315
- formDef: gr.parse({
316
- form: {
317
- kind: "layout",
318
- type: "flex",
319
- children: []
320
- }
321
- }),
322
- flatForm: {},
323
- currentStates: [],
324
- calculatedWidgets: {},
325
- validations: {},
326
- touchedControls: {},
327
- injectedValidations: {},
328
- widgetFlags: {},
329
- widgetPropOverrides: {},
330
- data: {},
331
- meta: {},
332
- formHealth: { status: "ok" },
333
- touched: !1,
334
- lang: e
335
- }), mt = (e) => {
358
+ function At(e) {
359
+ return e.issues === void 0;
360
+ }
361
+ const Et = (e) => {
336
362
  throw new Error(`Unhandled case: ${JSON.stringify(e)}`);
337
363
  };
338
364
  function L(e, ...r) {
339
365
  return r.reduce((t, n) => n(t), e);
340
366
  }
341
- function vo(...e) {
367
+ function wo(...e) {
342
368
  return (r) => e.reduceRight((t, n) => n(t), r);
343
369
  }
344
- function yt(e, r) {
370
+ function St(e, r) {
371
+ const t = r.payload.widget.uid;
372
+ if (!t)
373
+ throw new Error("addWidget: widget must have a uid");
345
374
  return {
346
375
  ...e,
347
376
  calculatedWidgets: {
348
377
  ...e.calculatedWidgets,
349
- [r.payload.widget.uid]: {
378
+ [t]: {
350
379
  source: r.payload.widget,
351
380
  current: {}
352
381
  }
353
382
  }
354
383
  };
355
384
  }
356
- const ae = {
385
+ const fe = {
357
386
  calculateCurrentStateError: 10,
358
387
  initializeParseError: 20,
359
388
  initializeUidCollisionError: 21,
@@ -374,12 +403,12 @@ const ae = {
374
403
  let o = e;
375
404
  for (let s = 0; s < n.length - 1; s++) {
376
405
  const u = n[s], c = n[s + 1];
377
- (o[u] == null || typeof o[u] != "object") && (o[u] = $t(c) ? [] : {}), o = o[u];
406
+ (o[u] == null || typeof o[u] != "object") && (o[u] = vt(c) ? [] : {}), o = o[u];
378
407
  }
379
408
  const i = n[n.length - 1];
380
409
  return o[i] = t, e;
381
410
  };
382
- function $t(e) {
411
+ function vt(e) {
383
412
  const r = Number(e);
384
413
  return Number.isInteger(r) && r >= 0 && r.toString() === e;
385
414
  }
@@ -399,10 +428,10 @@ const F = {
399
428
  META: "$meta",
400
429
  ERRORS: "$errors",
401
430
  FORM_IS_INVALID: "$formIsInvalid"
402
- }, At = (e) => typeof e == "string" && !e.includes(" ") && (e.startsWith(`${F.FORM}.`) || e.startsWith(`${F.META}.`) || e.startsWith(`${F.ERRORS}.`) || e === F.FORM_IS_INVALID), Et = [F.FORM, F.META, F.ERRORS].map((e) => e.replace("$", "\\$")).join("|"), St = new RegExp(
403
- `\\{\\{(?:(?<scope>${Et})\\.(?<path>[^}]+)|(?<isInvalid>\\${F.FORM_IS_INVALID}))\\}\\}`,
431
+ }, It = (e) => typeof e == "string" && !e.includes(" ") && (e.startsWith(`${F.FORM}.`) || e.startsWith(`${F.META}.`) || e.startsWith(`${F.ERRORS}.`) || e === F.FORM_IS_INVALID), wt = [F.FORM, F.META, F.ERRORS].map((e) => e.replace("$", "\\$")).join("|"), Ot = new RegExp(
432
+ `\\{\\{(?:(?<scope>${wt})\\.(?<path>[^}]+)|(?<isInvalid>\\${F.FORM_IS_INVALID}))\\}\\}`,
404
433
  "g"
405
- ), vt = (e, r) => typeof e != "string" || !e.includes("{{$") ? e : e.replace(St, (t, ...n) => {
434
+ ), Ct = (e, r) => typeof e != "string" || !e.includes("{{$") ? e : e.replace(Ot, (t, ...n) => {
406
435
  const o = n[n.length - 1], { scope: i, path: s, isInvalid: u } = o;
407
436
  try {
408
437
  if (u === F.FORM_IS_INVALID)
@@ -422,7 +451,7 @@ const F = {
422
451
  return console.error(`Error resolving Expression: '${e}'`, c), t;
423
452
  }
424
453
  return t;
425
- }), It = (e, r) => {
454
+ }), Ft = (e, r) => {
426
455
  const t = `${F.FORM}.`;
427
456
  if (e.startsWith(t))
428
457
  return r.resolveFormPath(e.replace(t, ""));
@@ -438,7 +467,7 @@ const F = {
438
467
  function Ke(e) {
439
468
  return e.flatMap((r) => [
440
469
  r,
441
- ..._e(r) ? Ke(r.children) : []
470
+ ...ke(r) ? Ke(r.children) : []
442
471
  ]);
443
472
  }
444
473
  function Xe(e) {
@@ -448,33 +477,33 @@ function Xe(e) {
448
477
  );
449
478
  }
450
479
  const ze = 32;
451
- let Le, a, p, m = (e) => (a = 0, p = e, m.newline = !1, e = E(), p[a] ? Q() : e || ""), Q = (e = "Unexpected token", r = a, t = p.slice(0, r).split(`
480
+ let Le, f, p, m = (e) => (f = 0, p = e, m.newline = !1, e = E(), p[f] ? Q() : e || ""), Q = (e = "Unexpected token", r = f, t = p.slice(0, r).split(`
452
481
  `), n = t.pop(), o = p.slice(Math.max(0, r - 40), r), i = "̭", s = (p[r] || " ") + i, u = p.slice(r + 1, r + 20)) => {
453
482
  throw SyntaxError(`${e} at ${t.length + 1}:${n.length + 1}
454
483
  ${p[r - 41] !== `
455
484
  `, "" + o}${s}${u}`);
456
- }, yr = (e, r = a) => (Array.isArray(e) && (e.loc = r), e), x = (e, r = a, t) => {
457
- for (; t = e(p.charCodeAt(a)); ) a += t;
458
- return p.slice(r, a);
459
- }, O = (e = 1) => p[a += e], Me = (e) => a = e, E = (e = 0, r) => {
485
+ }, $r = (e, r = f) => (Array.isArray(e) && (e.loc = r), e), x = (e, r = f, t) => {
486
+ for (; t = e(p.charCodeAt(f)); ) f += t;
487
+ return p.slice(r, f);
488
+ }, w = (e = 1) => p[f += e], Me = (e) => f = e, E = (e = 0, r) => {
460
489
  let t, n, o, i, s;
461
490
  for (r && m.asi && (m.newline = !1); (t = m.space()) && (s = m.newline, 1) && t !== r && (o = // ASI before [ on new line (access handler would consume it; lineBreak distinguishes real \n from synthetic } flag)
462
491
  (n && t === 91 && Le && m.asi?.(n, e, E) || null) ?? ((i = _[t]) && i(n, e)) ?? (n && s && m.asi?.(n, e, E)) ?? (!n && x(m.id))); ) n = o;
463
- return r && (t == r ? (a++, r === 125 && m.asi && (m.newline = !0)) : Q("Unclosed " + String.fromCharCode(r - (r > 42 ? 2 : 1)))), n;
464
- }, G = (e, r = a) => {
465
- for (Le = !1; (e = p.charCodeAt(a)) <= ze; )
466
- m.asi && e === 10 && (m.newline = Le = !0), a++;
492
+ return r && (t == r ? (f++, r === 125 && m.asi && (m.newline = !0)) : Q("Unclosed " + String.fromCharCode(r - (r > 42 ? 2 : 1)))), n;
493
+ }, G = (e, r = f) => {
494
+ for (Le = !1; (e = p.charCodeAt(f)) <= ze; )
495
+ m.asi && e === 10 && (m.newline = Le = !0), f++;
467
496
  return e;
468
- }, Ot = (e = a) => {
497
+ }, Dt = (e = f) => {
469
498
  for (; p.charCodeAt(e) <= ze; ) e++;
470
499
  return p.charCodeAt(e);
471
500
  };
472
501
  m.id = (e) => e >= 48 && e <= 57 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e == 36 || e == 95 || e >= 192 && e != 215 && e != 247;
473
- let wt = (e, r = e.length) => p.substr(a, r) === e && !m.id(p.charCodeAt(a + r)), _ = [], dr = {}, k = (e, r = ze, t, n = e.charCodeAt(0), o = e.length, i = _[n], s = e.toUpperCase() !== e, u, c) => (r = dr[e] = !i && dr[e] || r, _[n] = (h, A, g, f = a) => (u = g, (g ? e == g : (o < 2 || e.charCodeAt(1) === p.charCodeAt(a + 1) && (o < 3 || p.substr(a, o) == e)) && (!s || !m.id(p.charCodeAt(a + o))) && (u = g = e)) && A < r && (a += o, (c = t(h)) ? yr(c, f) : (a = f, u = 0, !s && !i && !h && Q()), c) || i?.(h, A, u))), y = (e, r, t = !1) => k(e, r, (n) => n && /* @__PURE__ */ ((o) => o && [e, n, o])(E(r - (t ? 0.5 : 0)))), K = (e, r, t) => k(e, r, (n) => !n && (n = E(r - 0.5)) && [e, n]), de = (e, r) => k(e, 200, (t) => !t && [, r]), $r = (e, r, t) => k(
502
+ let Pt = (e, r = e.length) => p.substr(f, r) === e && !m.id(p.charCodeAt(f + r)), _ = [], dr = {}, k = (e, r = ze, t, n = e.charCodeAt(0), o = e.length, i = _[n], s = e.toUpperCase() !== e, u, c) => (r = dr[e] = !i && dr[e] || r, _[n] = (h, $, g, a = f) => (u = g, (g ? e == g : (o < 2 || e.charCodeAt(1) === p.charCodeAt(f + 1) && (o < 3 || p.substr(f, o) == e)) && (!s || !m.id(p.charCodeAt(f + o))) && (u = g = e)) && $ < r && (f += o, (c = t(h)) ? $r(c, a) : (f = a, u = 0, !s && !i && !h && Q()), c) || i?.(h, $, u))), y = (e, r, t = !1) => k(e, r, (n) => n && /* @__PURE__ */ ((o) => o && [e, n, o])(E(r - (t ? 0.5 : 0)))), K = (e, r, t) => k(e, r, (n) => !n && (n = E(r - 0.5)) && [e, n]), de = (e, r) => k(e, 200, (t) => !t && [, r]), Ar = (e, r, t) => k(
474
503
  e,
475
504
  r,
476
505
  (n, o) => (o = E(r - (t ? 0.5 : 0)), n?.[0] !== e && (n = [e, n || null]), o?.[0] === e ? n.push(...o.slice(1)) : n.push(o || null), n)
477
- ), Je = (e, r) => k(e[0], r, (t) => !t && [e, E(0, e.charCodeAt(1)) || null]), Ar = (e, r) => k(e[0], r, (t) => t && [e, t, E(0, e.charCodeAt(1)) || null]), ue = (e, r, t, n = e.charCodeAt(0), o = e.length, i = _[n], s) => _[n] = (u, c, h, A = a) => !u && (h ? e == h : (o < 2 || p.substr(a, o) == e) && (h = e)) && c < r && !m.id(p.charCodeAt(a + o)) && (!m.prop || m.prop(a + o)) && (Me(a + o), (s = t()) ? yr(s, A) : Me(A), s) || i?.(u, c, h);
506
+ ), Je = (e, r) => k(e[0], r, (t) => !t && [e, E(0, e.charCodeAt(1)) || null]), Er = (e, r) => k(e[0], r, (t) => t && [e, t, E(0, e.charCodeAt(1)) || null]), ue = (e, r, t, n = e.charCodeAt(0), o = e.length, i = _[n], s) => _[n] = (u, c, h, $ = f) => !u && (h ? e == h : (o < 2 || p.substr(f, o) == e) && (h = e)) && c < r && !m.id(p.charCodeAt(f + o)) && (!m.prop || m.prop(f + o)) && (Me(f + o), (s = t()) ? $r(s, $) : Me($), s) || i?.(u, c, h);
478
507
  Object.defineProperty(m, "space", {
479
508
  configurable: !0,
480
509
  enumerable: !0,
@@ -485,46 +514,46 @@ const je = {}, l = (e, r, t = je[e]) => je[e] = (...n) => r(...n) || t?.(...n),
485
514
  // == catches both undefined and null
486
515
  je[e[0]]?.(...e.slice(1)) ?? Q(`Unknown operator: ${e[0]}`, e?.loc)
487
516
  ) : e === void 0 ? () => {
488
- } : (r) => r?.[e], pe = 46, te = 48, ge = 57, Ct = 69, Ft = 101, Dt = 43, Pt = 45, he = 95, Er = 110, Wt = 97, Tt = 102, Rt = 65, kt = 70, Sr = (e) => e.indexOf("_") < 0 ? e : e.replaceAll("_", ""), Qe = (e) => {
489
- let r = Sr(x(
517
+ } : (r) => r?.[e], pe = 46, te = 48, ge = 57, Wt = 69, Tt = 101, Rt = 43, kt = 45, he = 95, Sr = 110, _t = 97, Nt = 102, Lt = 65, Mt = 70, vr = (e) => e.indexOf("_") < 0 ? e : e.replaceAll("_", ""), Qe = (e) => {
518
+ let r = vr(x(
490
519
  (t) => (
491
520
  // . is decimal only if NOT followed by another . (range operator)
492
- t === pe && p.charCodeAt(a + 1) !== pe || t >= te && t <= ge || t === he || ((t === Ct || t === Ft) && ((t = p.charCodeAt(a + 1)) >= te && t <= ge || t === Dt || t === Pt) ? 2 : 0)
521
+ t === pe && p.charCodeAt(f + 1) !== pe || t >= te && t <= ge || t === he || ((t === Wt || t === Tt) && ((t = p.charCodeAt(f + 1)) >= te && t <= ge || t === Rt || t === kt) ? 2 : 0)
493
522
  )
494
523
  ));
495
- return p.charCodeAt(a) === Er ? (O(), [, BigInt(r)]) : (e = +r) != e ? Q() : [, e];
496
- }, _t = {
524
+ return p.charCodeAt(f) === Sr ? (w(), [, BigInt(r)]) : (e = +r) != e ? Q() : [, e];
525
+ }, jt = {
497
526
  2: (e) => e === 48 || e === 49 || e === he,
498
527
  8: (e) => e >= 48 && e <= 55 || e === he,
499
- 16: (e) => e >= te && e <= ge || e >= Wt && e <= Tt || e >= Rt && e <= kt || e === he
528
+ 16: (e) => e >= te && e <= ge || e >= _t && e <= Nt || e >= Lt && e <= Mt || e === he
500
529
  };
501
530
  m.number = null;
502
- _[pe] = (e) => !e && p.charCodeAt(a + 1) !== pe && Qe();
531
+ _[pe] = (e) => !e && p.charCodeAt(f + 1) !== pe && Qe();
503
532
  for (let e = te; e <= ge; e++) _[e] = (r) => r ? void 0 : Qe();
504
533
  _[te] = (e) => {
505
534
  if (e) return;
506
535
  const r = m.number;
507
536
  if (r) {
508
537
  for (const [t, n] of Object.entries(r))
509
- if (t[0] === "0" && p[a + 1]?.toLowerCase() === t[1]) {
510
- O(2);
511
- const o = Sr(x(_t[n]));
512
- return p.charCodeAt(a) === Er ? (O(), [, BigInt("0" + t[1] + o)]) : [, parseInt(o, n)];
538
+ if (t[0] === "0" && p[f + 1]?.toLowerCase() === t[1]) {
539
+ w(2);
540
+ const o = vr(x(jt[n]));
541
+ return p.charCodeAt(f) === Sr ? (w(), [, BigInt("0" + t[1] + o)]) : [, parseInt(o, n)];
513
542
  }
514
543
  }
515
544
  return Qe();
516
545
  };
517
- const Nt = 92, ur = 34, cr = 39, Lt = { n: `
518
- `, r: "\r", t: " ", b: "\b", f: "\f", v: "\v" }, vr = (e) => (r, t, n = "") => {
546
+ const Vt = 92, ur = 34, cr = 39, Ut = { n: `
547
+ `, r: "\r", t: " ", b: "\b", f: "\f", v: "\v" }, Ir = (e) => (r, t, n = "") => {
519
548
  if (!(r || !m.string?.[String.fromCharCode(e)]))
520
- return O(), x((o) => o - e && (o === Nt ? (n += Lt[p[a + 1]] || p[a + 1], 2) : (n += p[a], 1))), p[a] === String.fromCharCode(e) ? O() : Q("Bad string"), [, n];
549
+ return w(), x((o) => o - e && (o === Vt ? (n += Ut[p[f + 1]] || p[f + 1], 2) : (n += p[f], 1))), p[f] === String.fromCharCode(e) ? w() : Q("Bad string"), [, n];
521
550
  };
522
- _[ur] = vr(ur);
523
- _[cr] = vr(cr);
551
+ _[ur] = Ir(ur);
552
+ _[cr] = Ir(cr);
524
553
  m.string = { '"': !0 };
525
- const Mt = 20;
526
- "= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map((e) => y(e, Mt, !0));
527
- const Ir = (e, r, t, n) => typeof e == "string" ? (o) => r(o, e, o) : e[0] === "." ? (t = d(e[1]), n = e[2], (o) => r(t(o), n, o)) : e[0] === "[]" && e.length === 3 ? (t = d(e[1]), n = d(e[2]), (o) => r(t(o), n(o), o)) : e[0] === "()" && e.length === 2 ? Ir(e[1], r) : (() => {
554
+ const Bt = 20;
555
+ "= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map((e) => y(e, Bt, !0));
556
+ const wr = (e, r, t, n) => typeof e == "string" ? (o) => r(o, e, o) : e[0] === "." ? (t = d(e[1]), n = e[2], (o) => r(t(o), n, o)) : e[0] === "[]" && e.length === 3 ? (t = d(e[1]), n = d(e[2]), (o) => r(t(o), n(o), o)) : e[0] === "()" && e.length === 2 ? wr(e[1], r) : (() => {
528
557
  throw Error("Invalid assignment target");
529
558
  })(), lr = {
530
559
  "=": (e, r, t) => e[r] = t,
@@ -539,21 +568,21 @@ const Ir = (e, r, t, n) => typeof e == "string" ? (o) => r(o, e, o) : e[0] === "
539
568
  ">>=": (e, r, t) => e[r] >>= t,
540
569
  "<<=": (e, r, t) => e[r] <<= t
541
570
  };
542
- for (const e in lr) l(e, (r, t) => (t = d(t), Ir(r, (n, o, i) => lr[e](n, o, t(i)))));
543
- const jt = 30, Vt = 40, Ut = 140;
544
- K("!", Ut);
545
- y("||", jt);
546
- y("&&", Vt);
571
+ for (const e in lr) l(e, (r, t) => (t = d(t), wr(r, (n, o, i) => lr[e](n, o, t(i)))));
572
+ const Ht = 30, Gt = 40, Kt = 140;
573
+ K("!", Kt);
574
+ y("||", Ht);
575
+ y("&&", Gt);
547
576
  l("!", (e) => (e = d(e), (r) => !e(r)));
548
577
  l("||", (e, r) => (e = d(e), r = d(r), (t) => e(t) || r(t)));
549
578
  l("&&", (e, r) => (e = d(e), r = d(r), (t) => e(t) && r(t)));
550
- const Bt = 50, Ht = 60, Gt = 70, Or = 100, Kt = 140;
551
- y("|", Bt);
552
- y("&", Gt);
553
- y("^", Ht);
579
+ const Xt = 50, zt = 60, Jt = 70, Or = 100, Qt = 140;
580
+ y("|", Xt);
581
+ y("&", Jt);
582
+ y("^", zt);
554
583
  y(">>", Or);
555
584
  y("<<", Or);
556
- K("~", Kt);
585
+ K("~", Qt);
557
586
  l("~", (e) => (e = d(e), (r) => ~e(r)));
558
587
  l("|", (e, r) => (e = d(e), r = d(r), (t) => e(t) | r(t)));
559
588
  l("&", (e, r) => (e = d(e), r = d(r), (t) => e(t) & r(t)));
@@ -569,19 +598,19 @@ l(">", (e, r) => (e = d(e), r = d(r), (t) => e(t) > r(t)));
569
598
  l("<", (e, r) => (e = d(e), r = d(r), (t) => e(t) < r(t)));
570
599
  l(">=", (e, r) => (e = d(e), r = d(r), (t) => e(t) >= r(t)));
571
600
  l("<=", (e, r) => (e = d(e), r = d(r), (t) => e(t) <= r(t)));
572
- const wr = 80;
573
- y("==", wr);
574
- y("!=", wr);
601
+ const Cr = 80;
602
+ y("==", Cr);
603
+ y("!=", Cr);
575
604
  l("==", (e, r) => (e = d(e), r = d(r), (t) => e(t) == r(t)));
576
605
  l("!=", (e, r) => (e = d(e), r = d(r), (t) => e(t) != r(t)));
577
- const Cr = 110, qe = 120, Fr = 140;
578
- y("+", Cr);
579
- y("-", Cr);
606
+ const Fr = 110, qe = 120, Dr = 140;
607
+ y("+", Fr);
608
+ y("-", Fr);
580
609
  y("*", qe);
581
610
  y("/", qe);
582
611
  y("%", qe);
583
- K("+", Fr);
584
- K("-", Fr);
612
+ K("+", Dr);
613
+ K("-", Dr);
585
614
  l("+", (e, r) => r !== void 0 ? (e = d(e), r = d(r), (t) => e(t) + r(t)) : (e = d(e), (t) => +e(t)));
586
615
  l("-", (e, r) => r !== void 0 ? (e = d(e), r = d(r), (t) => e(t) - r(t)) : (e = d(e), (t) => -e(t)));
587
616
  l("*", (e, r) => (e = d(e), r = d(r), (t) => e(t) * r(t)));
@@ -598,22 +627,22 @@ const Ye = (e, r, t, n) => typeof e == "string" ? (o) => r(o, e) : e[0] === "."
598
627
  );
599
628
  l("++", (e, r) => Ye(e, r === null ? (t, n) => t[n]++ : (t, n) => ++t[n]));
600
629
  l("--", (e, r) => Ye(e, r === null ? (t, n) => t[n]-- : (t, n) => --t[n]));
601
- const Xt = 5, zt = 10;
602
- $r(",", zt);
603
- $r(";", Xt, !0);
604
- const Dr = (...e) => (e = e.map(d), (r) => {
630
+ const qt = 5, Yt = 10;
631
+ Ar(",", Yt);
632
+ Ar(";", qt, !0);
633
+ const Pr = (...e) => (e = e.map(d), (r) => {
605
634
  let t;
606
635
  for (const n of e) t = n(r);
607
636
  return t;
608
637
  });
609
- l(",", Dr);
610
- l(";", Dr);
611
- const Jt = 170;
612
- Je("()", Jt);
638
+ l(",", Pr);
639
+ l(";", Pr);
640
+ const Zt = 170;
641
+ Je("()", Zt);
613
642
  const H = (e) => e?.[0] === "_" && e[1] === "_" || e === "constructor" || e === "prototype", Ze = 170;
614
- Ar("[]", Ze);
643
+ Er("[]", Ze);
615
644
  y(".", Ze);
616
- Ar("()", Ze);
645
+ Er("()", Ze);
617
646
  const ye = (e) => {
618
647
  throw Error(e);
619
648
  };
@@ -637,18 +666,18 @@ const q = (e) => typeof e == "string" || Array.isArray(e) && (e[0] === "." || e[
637
666
  }) : e[0] === "[]" && e.length === 3 ? (t = d(e[1]), n = d(e[2]), (o) => r(t(o), n(o), o)) : e[0] === "?.[]" ? (t = d(e[1]), n = d(e[2]), (o) => {
638
667
  const i = t(o);
639
668
  return i == null ? void 0 : r(i, n(o), o);
640
- }) : (e = d(e), (o) => r([e(o)], 0, o)), b = xe, Qt = 32, qt = m.space;
669
+ }) : (e = d(e), (o) => r([e(o)], 0, o)), b = xe, xt = 32, bt = m.space;
641
670
  m.comment ??= { "//": `
642
671
  `, "/*": "*/" };
643
672
  let De;
644
673
  m.space = () => {
645
674
  De || (De = Object.entries(m.comment).map(([o, i]) => [o, i, o.charCodeAt(0)]));
646
- for (var e; e = qt(); ) {
675
+ for (var e; e = bt(); ) {
647
676
  for (var r = 0, t; t = De[r++]; )
648
- if (e === t[2] && p.substr(a, t[0].length) === t[0]) {
649
- var n = a + t[0].length;
677
+ if (e === t[2] && p.substr(f, t[0].length) === t[0]) {
678
+ var n = f + t[0].length;
650
679
  if (t[1] === `
651
- `) for (; p.charCodeAt(n) >= Qt; ) n++;
680
+ `) for (; p.charCodeAt(n) >= xt; ) n++;
652
681
  else {
653
682
  for (; p[n] && p.substr(n, t[1].length) !== t[1]; ) n++;
654
683
  p[n] && (n += t[1].length);
@@ -660,52 +689,52 @@ m.space = () => {
660
689
  }
661
690
  return e;
662
691
  };
663
- const Pr = 80;
664
- y("===", Pr);
665
- y("!==", Pr);
692
+ const Wr = 80;
693
+ y("===", Wr);
694
+ y("!==", Wr);
666
695
  l("===", (e, r) => (e = d(e), r = d(r), (t) => e(t) === r(t)));
667
696
  l("!==", (e, r) => (e = d(e), r = d(r), (t) => e(t) !== r(t)));
668
- const Yt = 30;
669
- y("??", Yt);
697
+ const en = 30;
698
+ y("??", en);
670
699
  l("??", (e, r) => (e = d(e), r = d(r), (t) => e(t) ?? r(t)));
671
- const Zt = 130, xt = 20;
672
- y("**", Zt, !0);
673
- y("**=", xt, !0);
700
+ const rn = 130, tn = 20;
701
+ y("**", rn, !0);
702
+ y("**=", tn, !0);
674
703
  l("**", (e, r) => (e = d(e), r = d(r), (t) => e(t) ** r(t)));
675
- const bt = (e) => {
704
+ const nn = (e) => {
676
705
  throw Error(e);
677
706
  };
678
- l("**=", (e, r) => (q(e) || bt("Invalid assignment target"), r = d(r), b(e, (t, n, o) => t[n] **= r(o))));
679
- const Wr = 90;
680
- y("in", Wr);
681
- y("of", Wr);
707
+ l("**=", (e, r) => (q(e) || nn("Invalid assignment target"), r = d(r), b(e, (t, n, o) => t[n] **= r(o))));
708
+ const Tr = 90;
709
+ y("in", Tr);
710
+ y("of", Tr);
682
711
  l("in", (e, r) => (e = d(e), r = d(r), (t) => e(t) in r(t)));
683
- const en = 20, rn = 100, tn = (e) => {
712
+ const on = 20, sn = 100, dn = (e) => {
684
713
  throw Error(e);
685
714
  };
686
- y(">>>", rn);
687
- y(">>>=", en, !0);
715
+ y(">>>", sn);
716
+ y(">>>=", on, !0);
688
717
  l(">>>", (e, r) => (e = d(e), r = d(r), (t) => e(t) >>> r(t)));
689
- l(">>>=", (e, r) => (q(e) || tn("Invalid assignment target"), r = d(r), b(e, (t, n, o) => t[n] >>>= r(o))));
690
- const be = 5, nn = 10, on = 20, sn = (e) => e[0]?.[0] === "," ? e[0].slice(1) : e, $e = (e, r, t) => {
718
+ l(">>>=", (e, r) => (q(e) || dn("Invalid assignment target"), r = d(r), b(e, (t, n, o) => t[n] >>>= r(o))));
719
+ const be = 5, un = 10, cn = 20, ln = (e) => e[0]?.[0] === "," ? e[0].slice(1) : e, $e = (e, r, t) => {
691
720
  if (typeof e == "string") {
692
721
  t[e] = r;
693
722
  return;
694
723
  }
695
- const [n, ...o] = e, i = sn(o);
724
+ const [n, ...o] = e, i = ln(o);
696
725
  if (n === "{}") {
697
726
  const s = [];
698
727
  for (const u of i) {
699
728
  if (Array.isArray(u) && u[0] === "...") {
700
- const f = {};
701
- for (const C in r) s.includes(C) || (f[C] = r[C]);
702
- t[u[1]] = f;
729
+ const a = {};
730
+ for (const C in r) s.includes(C) || (a[C] = r[C]);
731
+ t[u[1]] = a;
703
732
  break;
704
733
  }
705
- let c, h, A;
706
- typeof u == "string" ? c = h = u : u[0] === "=" ? (typeof u[1] == "string" ? c = h = u[1] : [, c, h] = u[1], A = u[2]) : [, c, h] = u, s.push(c);
734
+ let c, h, $;
735
+ typeof u == "string" ? c = h = u : u[0] === "=" ? (typeof u[1] == "string" ? c = h = u[1] : [, c, h] = u[1], $ = u[2]) : [, c, h] = u, s.push(c);
707
736
  let g = r[c];
708
- g === void 0 && A && (g = d(A)(t)), $e(h, g, t);
737
+ g === void 0 && $ && (g = d($)(t)), $e(h, g, t);
709
738
  }
710
739
  } else if (n === "[]") {
711
740
  let s = 0;
@@ -720,18 +749,18 @@ const be = 5, nn = 10, on = 20, sn = (e) => e[0]?.[0] === "," ? e[0].slice(1) :
720
749
  }
721
750
  let c = u, h;
722
751
  Array.isArray(u) && u[0] === "=" && ([, c, h] = u);
723
- let A = r[s++];
724
- A === void 0 && h && (A = d(h)(t)), $e(c, A, t);
752
+ let $ = r[s++];
753
+ $ === void 0 && h && ($ = d(h)(t)), $e(c, $, t);
725
754
  }
726
755
  }
727
- }, Tr = (e) => {
728
- let r = E(nn - 1);
756
+ }, Rr = (e) => {
757
+ let r = E(un - 1);
729
758
  return r?.[0] === "in" || r?.[0] === "of" ? [r[0], [e, r[1]], r[2]] : r?.[0] === "," ? [e, ...r.slice(1)] : [e, r];
730
759
  };
731
- ue("let", be + 1, () => Tr("let"));
732
- ue("const", be + 1, () => Tr("const"));
733
- ue("var", be, () => (G(), ["var", E(on)]));
734
- const Rr = (...e) => (e = e.map((r) => {
760
+ ue("let", be + 1, () => Rr("let"));
761
+ ue("const", be + 1, () => Rr("const"));
762
+ ue("var", be, () => (G(), ["var", E(cn)]));
763
+ const kr = (...e) => (e = e.map((r) => {
735
764
  if (typeof r == "string") return (t) => {
736
765
  t[r] = void 0;
737
766
  };
@@ -745,8 +774,8 @@ const Rr = (...e) => (e = e.map((r) => {
745
774
  }), (r) => {
746
775
  for (const t of e) t(r);
747
776
  });
748
- l("let", Rr);
749
- l("const", Rr);
777
+ l("let", kr);
778
+ l("const", kr);
750
779
  l("var", (e) => typeof e == "string" ? (r) => {
751
780
  r[e] = void 0;
752
781
  } : () => {
@@ -778,8 +807,8 @@ de("Infinity", 1 / 0);
778
807
  const Pe = 20;
779
808
  k("?", Pe, (e, r, t) => e && (r = E(Pe - 1)) && x((n) => n === 58) && (t = E(Pe - 1), ["?", e, r, t]));
780
809
  l("?", (e, r, t) => (e = d(e), r = d(r), t = d(t), (n) => e(n) ? r(n) : t(n)));
781
- const dn = [], un = 20;
782
- y("=>", un, !0);
810
+ const an = [], fn = 20;
811
+ y("=>", fn, !0);
783
812
  l("=>", (e, r) => {
784
813
  e = e?.[0] === "()" ? e[1] : e;
785
814
  const t = e ? e[0] === "," ? e.slice(1) : [e] : [];
@@ -789,29 +818,29 @@ l("=>", (e, r) => {
789
818
  const s = r?.[0] === "{}";
790
819
  return r = d(s ? ["{", r[1]] : r), (u) => (...c) => {
791
820
  const h = {};
792
- t.forEach((g, f) => h[g] = c[f]), o && (h[o] = c.slice(n));
793
- const A = new Proxy(h, {
794
- get: (g, f) => f in g ? g[f] : u?.[f],
795
- set: (g, f, C) => ((f in g ? g : u)[f] = C, !0),
796
- has: (g, f) => f in g || (u ? f in u : !1)
821
+ t.forEach((g, a) => h[g] = c[a]), o && (h[o] = c.slice(n));
822
+ const $ = new Proxy(h, {
823
+ get: (g, a) => a in g ? g[a] : u?.[a],
824
+ set: (g, a, C) => ((a in g ? g : u)[a] = C, !0),
825
+ has: (g, a) => a in g || (u ? a in u : !1)
797
826
  });
798
827
  try {
799
- const g = r(A);
828
+ const g = r($);
800
829
  return s ? void 0 : g;
801
830
  } catch (g) {
802
- if (g === dn) return g[0];
831
+ if (g === an) return g[0];
803
832
  throw g;
804
833
  }
805
834
  };
806
835
  });
807
- const cn = 140;
808
- K("...", cn);
836
+ const hn = 140;
837
+ K("...", hn);
809
838
  l("...", (e) => (e = d(e), (r) => Object.entries(e(r))));
810
- const fr = 170;
811
- k("?.", fr, (e, r) => {
839
+ const ar = 170;
840
+ k("?.", ar, (e, r) => {
812
841
  if (!e) return;
813
842
  const t = G();
814
- return t === 40 ? (O(), ["?.()", e, E(0, 41) || null]) : t === 91 ? (O(), ["?.[]", e, E(0, 93)]) : (r = E(fr), r ? ["?.", e, r] : void 0);
843
+ return t === 40 ? (w(), ["?.()", e, E(0, 41) || null]) : t === 91 ? (w(), ["?.[]", e, E(0, 93)]) : (r = E(ar), r ? ["?.", e, r] : void 0);
815
844
  });
816
845
  l("?.", (e, r) => (e = d(e), H(r) ? () => {
817
846
  } : (t) => e(t)?.[r]));
@@ -855,7 +884,7 @@ K("delete", ne);
855
884
  ue(
856
885
  "new",
857
886
  ne,
858
- () => wt(".target") ? (O(7), ["new.target"]) : ["new", E(ne)]
887
+ () => Pt(".target") ? (w(7), ["new.target"]) : ["new", E(ne)]
859
888
  );
860
889
  l("typeof", (e) => (e = d(e), (r) => typeof e(r)));
861
890
  l("void", (e) => (e = d(e), (r) => (e(r), void 0)));
@@ -874,22 +903,22 @@ l("new", (e) => {
874
903
  const r = d(e?.[0] === "()" ? e[1] : e), t = e?.[0] === "()" ? e[2] : null, n = t ? t[0] === "," ? /* @__PURE__ */ ((o) => (i) => o.map((s) => s(i)))(t.slice(1).map(d)) : /* @__PURE__ */ ((o) => (i) => [o(i)])(d(t)) : () => [];
875
904
  return (o) => new (r(o))(...n(o));
876
905
  });
877
- const rr = Symbol("accessor"), tr = 20, ln = 40, kr = 41, _r = 123, Nr = 125, Lr = (e) => (r) => {
906
+ const rr = Symbol("accessor"), tr = 20, pn = 40, _r = 41, Nr = 123, Lr = 125, Mr = (e) => (r) => {
878
907
  if (r) return;
879
908
  G();
880
909
  const t = x(m.id);
881
- if (!t || (G(), p.charCodeAt(a) !== ln)) return !1;
882
- O();
883
- const n = E(0, kr);
884
- return G(), p.charCodeAt(a) !== _r ? !1 : (O(), [e, t, n, E(0, Nr)]);
910
+ if (!t || (G(), p.charCodeAt(f) !== pn)) return !1;
911
+ w();
912
+ const n = E(0, _r);
913
+ return G(), p.charCodeAt(f) !== Nr ? !1 : (w(), [e, t, n, E(0, Lr)]);
885
914
  };
886
- k("get", tr - 1, Lr("get"));
887
- k("set", tr - 1, Lr("set"));
915
+ k("get", tr - 1, Mr("get"));
916
+ k("set", tr - 1, Mr("set"));
888
917
  k("(", tr - 1, (e) => {
889
918
  if (!e || typeof e != "string") return;
890
- const r = E(0, kr) || null;
891
- if (G(), p.charCodeAt(a) === _r)
892
- return O(), [":", e, ["=>", ["()", r], E(0, Nr) || null]];
919
+ const r = E(0, _r) || null;
920
+ if (G(), p.charCodeAt(f) === Nr)
921
+ return w(), [":", e, ["=>", ["()", r], E(0, Lr) || null]];
893
922
  });
894
923
  l("get", (e, r) => (r = r ? d(r) : () => {
895
924
  }, (t) => [[rr, e, {
@@ -905,15 +934,15 @@ l("set", (e, r, t) => (t = t ? d(t) : () => {
905
934
  i.this = this, i[r] = o, t(i);
906
935
  }
907
936
  }]]));
908
- const fn = 20, Mr = 200;
909
- m.prop = (e) => Ot(e) !== 58;
910
- const an = (e) => e == null || typeof e == "string" || [":", ",", "...", "get", "set"].includes(e[0]);
911
- Je("[]", Mr);
912
- Je("{}", Mr);
913
- y(":", fn - 1, !0);
937
+ const gn = 20, jr = 200;
938
+ m.prop = (e) => Dt(e) !== 58;
939
+ const mn = (e) => e == null || typeof e == "string" || [":", ",", "...", "get", "set"].includes(e[0]);
940
+ Je("[]", jr);
941
+ Je("{}", jr);
942
+ y(":", gn - 1, !0);
914
943
  l("{}", (e, r) => {
915
944
  if (r !== void 0) return;
916
- if (!an(e)) return d(["{", e]);
945
+ if (!mn(e)) return d(["{", e]);
917
946
  e = e ? e[0] !== "," ? [e] : e.slice(1) : [];
918
947
  const t = e.map((n) => d(typeof n == "string" ? [":", n, n] : n));
919
948
  return (n) => {
@@ -930,19 +959,19 @@ l("{}", (e, r) => {
930
959
  l("{", (e) => (e = e ? d(e) : () => {
931
960
  }, (r) => e(Object.create(r))));
932
961
  l(":", (e, r) => (r = d(r), Array.isArray(e) ? (e = d(e), (t) => [[e(t), r(t)]]) : (t) => [[e, r(t)]]));
933
- const hn = 170, Ae = 96, pn = 36, gn = 123, mn = 92, yn = { n: `
934
- `, r: "\r", t: " ", b: "\b", f: "\f", v: "\v" }, ar = () => {
962
+ const yn = 170, Ae = 96, $n = 36, An = 123, En = 92, Sn = { n: `
963
+ `, r: "\r", t: " ", b: "\b", f: "\f", v: "\v" }, fr = () => {
935
964
  const e = [];
936
- for (let r = "", t; (t = p.charCodeAt(a)) !== Ae; )
937
- t ? t === mn ? (O(), r += yn[p[a]] || p[a], O()) : t === pn && p.charCodeAt(a + 1) === gn ? (r && e.push([, r]), r = "", O(2), e.push(E(0, 125))) : (r += p[a], O(), t = p.charCodeAt(a), t === Ae && r && e.push([, r])) : Q("Unterminated template");
938
- return O(), e;
939
- }, $n = _[Ae];
940
- _[Ae] = (e, r) => e && r < hn ? m.asi && m.newline ? void 0 : (O(), ["``", e, ...ar()]) : (
965
+ for (let r = "", t; (t = p.charCodeAt(f)) !== Ae; )
966
+ t ? t === En ? (w(), r += Sn[p[f]] || p[f], w()) : t === $n && p.charCodeAt(f + 1) === An ? (r && e.push([, r]), r = "", w(2), e.push(E(0, 125))) : (r += p[f], w(), t = p.charCodeAt(f), t === Ae && r && e.push([, r])) : Q("Unterminated template");
967
+ return w(), e;
968
+ }, vn = _[Ae];
969
+ _[Ae] = (e, r) => e && r < yn ? m.asi && m.newline ? void 0 : (w(), ["``", e, ...fr()]) : (
941
970
  // tagged
942
971
  e ? (
943
972
  // plain
944
- $n?.(e, r)
945
- ) : (O(), ((t) => t.length < 2 && t[0]?.[0] === void 0 ? t[0] || [, ""] : ["`", ...t])(ar()))
973
+ vn?.(e, r)
974
+ ) : (w(), ((t) => t.length < 2 && t[0]?.[0] === void 0 ? t[0] || [, ""] : ["`", ...t])(fr()))
946
975
  );
947
976
  l("`", (...e) => (e = e.map(d), (r) => e.map((t) => t(r)).join("")));
948
977
  l("``", (e, ...r) => {
@@ -955,20 +984,20 @@ l("``", (e, ...r) => {
955
984
  });
956
985
  m.string["'"] = !0;
957
986
  m.number = { "0x": 16, "0b": 2, "0o": 8 };
958
- const An = {
987
+ const In = {
959
988
  log: (e, r) => (r ? console.log(r, e) : console.log(e), e)
960
989
  };
961
990
  function j(e, r, t, n, o) {
962
- const i = m(En(e));
991
+ const i = m(wn(e));
963
992
  return d(i)({
964
993
  $form: r,
965
994
  $meta: t,
966
995
  $errors: n,
967
996
  $formIsInvalid: o,
968
- $log: An.log
997
+ $log: In.log
969
998
  }) === !0;
970
999
  }
971
- function En(e) {
1000
+ function wn(e) {
972
1001
  return e.replace(/\?\.(\d+)/g, "?.[$1]").replace(/\.(\d+)/g, "[$1]");
973
1002
  }
974
1003
  const V = (e) => {
@@ -976,7 +1005,7 @@ const V = (e) => {
976
1005
  if (!r || Object.keys(r).length === 0 || e.formHealth.status === "errored")
977
1006
  return e;
978
1007
  const { $formIsInvalid: t, $errors: n } = Xe(e);
979
- r = Sn(r);
1008
+ r = On(r);
980
1009
  let o = [], i = { status: "ok" };
981
1010
  try {
982
1011
  o = Object.keys(r).map((s) => {
@@ -990,7 +1019,7 @@ const V = (e) => {
990
1019
  return c === !0 ? s : void 0;
991
1020
  }).filter((s) => s !== void 0);
992
1021
  } catch (s) {
993
- const u = s, c = ae.calculateCurrentStateError;
1022
+ const u = s, c = fe.calculateCurrentStateError;
994
1023
  i = {
995
1024
  status: "errored",
996
1025
  message: `[${c}] ${u.message}`,
@@ -999,7 +1028,7 @@ const V = (e) => {
999
1028
  }
1000
1029
  return { ...e, currentStates: o, formHealth: i };
1001
1030
  };
1002
- function Sn(e) {
1031
+ function On(e) {
1003
1032
  const r = {};
1004
1033
  function t(n) {
1005
1034
  const o = n.split(":"), i = [];
@@ -1016,7 +1045,7 @@ function Sn(e) {
1016
1045
  return r;
1017
1046
  }
1018
1047
  const nr = Symbol("filterMap.skip");
1019
- function jr(e, r) {
1048
+ function Vr(e, r) {
1020
1049
  const t = [];
1021
1050
  for (let n = 0; n < e.length; n++) {
1022
1051
  const o = r(e[n], n, e);
@@ -1024,17 +1053,17 @@ function jr(e, r) {
1024
1053
  }
1025
1054
  return t;
1026
1055
  }
1027
- function Io(e, r, t) {
1056
+ function Oo(e, r, t) {
1028
1057
  for (let n = 0; n < e.length; n++)
1029
1058
  r(e[n], n, e) && t(e[n], n, e);
1030
1059
  }
1031
- function vn(e, r, t, n) {
1060
+ function Cn(e, r, t, n) {
1032
1061
  let o = n;
1033
1062
  for (let i = 0; i < e.length; i++)
1034
1063
  r(e[i], i, e) && (o = t(o, e[i], i, e));
1035
1064
  return o;
1036
1065
  }
1037
- function In(e, r, t) {
1066
+ function Fn(e, r, t) {
1038
1067
  if (e.length !== r.length)
1039
1068
  return !1;
1040
1069
  for (let n = 0; n < e.length; n++)
@@ -1042,24 +1071,24 @@ function In(e, r, t) {
1042
1071
  return !1;
1043
1072
  return !0;
1044
1073
  }
1045
- function On(e, r) {
1046
- const t = Vr(e.uid, r);
1074
+ function Dn(e, r) {
1075
+ const t = Ur(e.uid, r);
1047
1076
  return P(e) ? {
1048
1077
  ...e,
1049
1078
  uid: t,
1050
- path: wn(e.path, r)
1079
+ path: Pn(e.path, r)
1051
1080
  } : {
1052
1081
  ...e,
1053
1082
  uid: t
1054
1083
  };
1055
1084
  }
1056
- function Vr(e, r) {
1085
+ function Ur(e, r) {
1057
1086
  if (r.length === 0)
1058
1087
  throw new Error("Repeater indexes cannot be an empty array");
1059
1088
  const t = r.reduce((n, o) => `${n}[${o}]`, "");
1060
1089
  return `${e}${t}`;
1061
1090
  }
1062
- function wn(e, r) {
1091
+ function Pn(e, r) {
1063
1092
  if (r.length === 0)
1064
1093
  throw new Error("Repeater indexes cannot be an empty array");
1065
1094
  const t = "items", n = e.split(`.${t}`), o = n.length - 1;
@@ -1076,18 +1105,18 @@ function le(e, r) {
1076
1105
  return i === void 0 ? n : `.${i}${o}.`;
1077
1106
  });
1078
1107
  }
1079
- const fe = (e, r) => (t) => e(t) ? r(t) : t, z = (e) => e !== void 0 && typeof e == "object" && e !== null && "when" in e, U = (e) => {
1108
+ const ae = (e, r) => (t) => e(t) ? r(t) : t, z = (e) => e !== void 0 && typeof e == "object" && e !== null && "when" in e, U = (e) => {
1080
1109
  const { $formIsInvalid: r, $errors: t } = Xe(e);
1081
1110
  return {
1082
1111
  ...e,
1083
1112
  widgetFlags: {
1084
- ...Cn(e, t, r),
1085
- ...Fn(e, t, r)
1113
+ ...Wn(e, t, r),
1114
+ ...Tn(e, t, r)
1086
1115
  }
1087
1116
  };
1088
1117
  };
1089
- function Cn(e, r, t) {
1090
- return jr(Object.values(e.flatForm), (n) => {
1118
+ function Wn(e, r, t) {
1119
+ return Vr(Object.values(e.flatForm), (n) => {
1091
1120
  if (n.uid?.includes("["))
1092
1121
  return nr;
1093
1122
  if (se(n)) {
@@ -1133,74 +1162,74 @@ function Cn(e, r, t) {
1133
1162
  {}
1134
1163
  );
1135
1164
  }
1136
- function Fn(e, r, t) {
1137
- return vn(
1165
+ function Tn(e, r, t) {
1166
+ return Cn(
1138
1167
  Object.values(e.flatForm),
1139
1168
  (n) => !se(n) && n.type === "repeater",
1140
1169
  (n, o) => ({
1141
1170
  ...n,
1142
- ...Ur(e, o, [], r, t)
1171
+ ...Br(e, o, [], r, t)
1143
1172
  }),
1144
1173
  {}
1145
1174
  );
1146
1175
  }
1147
- function Ur(e, r, t, n, o) {
1176
+ function Br(e, r, t, n, o) {
1148
1177
  const i = r.props.template, s = N(e.data, r.path);
1149
1178
  if (!Array.isArray(s))
1150
1179
  return {};
1151
1180
  const u = {};
1152
1181
  return s.forEach((c, h) => {
1153
- const A = [...t, h];
1182
+ const $ = [...t, h];
1154
1183
  Ke([i]).forEach((g) => {
1155
- let f;
1156
- if (se(g) ? (f = g({
1184
+ let a;
1185
+ if (se(g) ? (a = g({
1157
1186
  $form: e.data,
1158
1187
  errors: void 0,
1159
1188
  touched: void 0,
1160
1189
  translate: void 0
1161
- }), f.uid = g.uid) : f = g, f.type === "repeater") {
1162
- const ee = On(
1163
- f,
1164
- A
1190
+ }), a.uid = g.uid) : a = g, a.type === "repeater") {
1191
+ const ee = Dn(
1192
+ a,
1193
+ $
1165
1194
  );
1166
1195
  Object.assign(
1167
1196
  u,
1168
- Ur(
1197
+ Br(
1169
1198
  e,
1170
1199
  ee,
1171
- A,
1200
+ $,
1172
1201
  n,
1173
1202
  o
1174
1203
  )
1175
1204
  );
1176
1205
  return;
1177
1206
  }
1178
- const C = Vr(f.uid, A);
1179
- u[C] = u[C] || {}, f.include && "in" in f.include ? u[C].hidden = !f.include.in.some((ee) => e.currentStates.includes(ee)) : f.include && "when" in f.include && (u[C].hidden = !j(
1180
- le(f.include.when, A),
1207
+ const C = Ur(a.uid, $);
1208
+ u[C] = u[C] || {}, a.include && "in" in a.include ? u[C].hidden = !a.include.in.some((ee) => e.currentStates.includes(ee)) : a.include && "when" in a.include && (u[C].hidden = !j(
1209
+ le(a.include.when, $),
1181
1210
  e.data,
1182
1211
  e.meta,
1183
1212
  n,
1184
1213
  o
1185
- )), f.exclude && "from" in f.exclude ? u[C].hidden = f.exclude.from.some((ee) => e.currentStates.includes(ee)) : f.exclude && "when" in f.exclude && (u[C].hidden = j(
1186
- le(f.exclude.when, A),
1214
+ )), a.exclude && "from" in a.exclude ? u[C].hidden = a.exclude.from.some((ee) => e.currentStates.includes(ee)) : a.exclude && "when" in a.exclude && (u[C].hidden = j(
1215
+ le(a.exclude.when, $),
1187
1216
  e.data,
1188
1217
  e.meta,
1189
1218
  n,
1190
1219
  o
1191
- )), (P(f) || re(f)) && z(f.disabled) && (u[C].disabled = j(
1220
+ )), (P(a) || re(a)) && z(a.disabled) && (u[C].disabled = j(
1192
1221
  le(
1193
- f.disabled.when,
1194
- A
1222
+ a.disabled.when,
1223
+ $
1195
1224
  ),
1196
1225
  e.data,
1197
1226
  e.meta,
1198
1227
  n,
1199
1228
  o
1200
- )), P(f) && z(f.readonly) && (u[C].readonly = j(
1229
+ )), P(a) && z(a.readonly) && (u[C].readonly = j(
1201
1230
  le(
1202
- f.readonly.when,
1203
- A
1231
+ a.readonly.when,
1232
+ $
1204
1233
  ),
1205
1234
  e.data,
1206
1235
  e.meta,
@@ -1210,44 +1239,21 @@ function Ur(e, r, t, n, o) {
1210
1239
  });
1211
1240
  }), u;
1212
1241
  }
1213
- const Dn = (e) => !(typeof e != "object" || e === null || typeof e.key != "string");
1214
- function Oo(e) {
1215
- const r = new Intl.Locale(e).maximize().script;
1216
- return ["Arab", "Hebr", "Thaa", "Syrc", "Tfng", "Adlm", "Rohg"].includes(r || "") ? "rtl" : "ltr";
1217
- }
1218
- const Pn = (e = navigator.language || "en-US") => {
1219
- const r = /* @__PURE__ */ new Set();
1220
- return {
1221
- get lang() {
1222
- return e;
1223
- },
1224
- translate(n) {
1225
- return n;
1226
- },
1227
- subscribe(n) {
1228
- return r.add(n), () => {
1229
- r.delete(n);
1230
- };
1231
- },
1232
- setLang(n) {
1233
- e = n, r.forEach((o) => o(e));
1234
- }
1235
- };
1236
- }, M = (e) => (r) => ({
1242
+ const M = (e) => (r) => ({
1237
1243
  ...r,
1238
- calculatedWidgets: Wn(r, e)
1244
+ calculatedWidgets: Rn(r, e)
1239
1245
  });
1240
- function Wn(e, r) {
1241
- const { $formIsInvalid: t, $errors: n } = Xe(e), o = Jn(e, r, t, n), i = {};
1246
+ function Rn(e, r) {
1247
+ const { $formIsInvalid: t, $errors: n } = Xe(e), o = qn(e, r, t, n), i = {};
1242
1248
  for (const s of Object.keys(e.calculatedWidgets)) {
1243
1249
  if (e.widgetFlags[s]?.hidden)
1244
1250
  continue;
1245
1251
  const u = e.calculatedWidgets[s], c = u.source;
1246
1252
  if (se(c)) {
1247
- i[s] = Tn(s, c, e, r);
1253
+ i[s] = kn(s, c, e, r);
1248
1254
  continue;
1249
1255
  }
1250
- i[s] = Rn(
1256
+ i[s] = _n(
1251
1257
  u,
1252
1258
  c,
1253
1259
  e,
@@ -1256,7 +1262,7 @@ function Wn(e, r) {
1256
1262
  }
1257
1263
  return i;
1258
1264
  }
1259
- function Tn(e, r, t, n) {
1265
+ function kn(e, r, t, n) {
1260
1266
  const o = r({
1261
1267
  $form: t.data,
1262
1268
  errors: r.path ? t.validations[r.path] : void 0,
@@ -1265,85 +1271,85 @@ function Tn(e, r, t, n) {
1265
1271
  });
1266
1272
  return o.uid = e, { source: r, current: o };
1267
1273
  }
1268
- function Rn(e, r, t, n) {
1269
- const o = new zn(r, e.current);
1270
- return o.write("uid", r.uid), o.write("type", r.type), o.write("kind", r.kind), st(r) ? kn(o, n) : re(r) ? _n(o, n) : P(r) ? Nn(o, n) : _e(r) && Ln(o, n), Mn(r, o, n, t), (re(r) || P(r)) && jn(r, o, n), _e(r) && Vn(r, o, t), o.changed ? { source: e.source, current: o.current } : e;
1274
+ function _n(e, r, t, n) {
1275
+ const o = new Qn(r, e.current);
1276
+ return o.write("uid", r.uid), o.write("type", r.type), o.write("kind", r.kind), ut(r) ? Nn(o, n) : re(r) ? Ln(o, n) : P(r) ? Mn(o, n) : ke(r) && jn(o, n), Vn(r, o, n, t), (re(r) || P(r)) && Un(r, o, n), ke(r) && Bn(r, o, t), o.changed ? { source: e.source, current: o.current } : e;
1271
1277
  }
1272
- function kn(e, r) {
1278
+ function Nn(e, r) {
1273
1279
  S(e, r, "size"), S(e, r, "include"), S(e, r, "exclude");
1274
1280
  }
1275
- function _n(e, r) {
1281
+ function Ln(e, r) {
1276
1282
  S(e, r, "size"), S(e, r, "include"), S(e, r, "exclude"), S(e, r, "label"), S(e, r, "disabled");
1277
1283
  }
1278
- function Nn(e, r) {
1284
+ function Mn(e, r) {
1279
1285
  S(e, r, "size"), S(e, r, "include"), S(e, r, "exclude"), S(e, r, "label"), S(e, r, "disabled"), S(e, r, "readonly"), S(e, r, "validator"), S(e, r, "path"), S(e, r, "defaultValue");
1280
1286
  }
1281
- function Ln(e, r) {
1287
+ function jn(e, r) {
1282
1288
  S(e, r, "size"), S(e, r, "include"), S(e, r, "exclude");
1283
1289
  }
1284
- function Mn(e, r, t, n) {
1290
+ function Vn(e, r, t, n) {
1285
1291
  const o = n.widgetPropOverrides[e.uid] ?? {}, i = { ...e.props ?? {}, ...o };
1286
- for (const s of Gr(Object.keys(i)))
1287
- Un(r, t, s);
1292
+ for (const s of Kr(Object.keys(i)))
1293
+ Hn(r, t, s);
1288
1294
  }
1289
- function jn(e, r, t) {
1295
+ function Un(e, r, t) {
1290
1296
  const n = e.on ?? {};
1291
- for (const o of Gr(Object.keys(n)))
1292
- Bn(r, t, o);
1297
+ for (const o of Kr(Object.keys(n)))
1298
+ Gn(r, t, o);
1293
1299
  }
1294
- function Vn(e, r, t) {
1295
- const n = Yn(e.uid), o = qn(e.children, n, t.widgetFlags);
1300
+ function Bn(e, r, t) {
1301
+ const n = xn(e.uid), o = Zn(e.children, n, t.widgetFlags);
1296
1302
  r.current.children = o;
1297
1303
  const i = r.previous.children ?? [];
1298
1304
  i.length === o.length && o.every((u, c) => i[c] && i[c].uid === o[c].uid) || r.markChanged();
1299
1305
  }
1300
1306
  function S(e, r, t) {
1301
1307
  const n = e.source;
1302
- if (!Qn(n, t))
1308
+ if (!Yn(n, t))
1303
1309
  return;
1304
1310
  const o = ir(n, t, r.sortedStates);
1305
1311
  let i;
1306
1312
  switch (t) {
1307
1313
  case "disabled":
1308
1314
  case "readonly":
1309
- i = Gn(o, r, e.source.uid, t);
1315
+ i = Xn(o, r, e.source.uid, t);
1310
1316
  break;
1311
1317
  default:
1312
- i = Hr(o, r);
1318
+ i = Gr(o, r);
1313
1319
  }
1314
1320
  e.write(t, i);
1315
1321
  }
1316
- function Un(e, r, t) {
1322
+ function Hn(e, r, t) {
1317
1323
  const n = e.source.props, o = ir(n, t, r.sortedStates);
1318
- let i = Hr(o, r);
1324
+ let i = Gr(o, r);
1319
1325
  const s = r.widgetPropOverrides[e.source.uid]?.[t];
1320
1326
  s !== void 0 && (i = s), e.write(`props.${t}`, i);
1321
1327
  }
1322
- function Bn(e, r, t) {
1328
+ function Gn(e, r, t) {
1323
1329
  const n = e.source.on, o = ir(n, t, r.sortedStates);
1324
- e.write(`on.${t}`, Kn(o, r));
1330
+ e.write(`on.${t}`, zn(o, r));
1325
1331
  }
1326
1332
  function or(e, r) {
1327
1333
  return e({ $form: r.$form, translate: r.localization.translate });
1328
1334
  }
1329
- function Hn(e, r) {
1330
- return r.localization.translate(e.key, Xn(e.params, r), e.default);
1335
+ function Kn(e, r) {
1336
+ return r.localization.translate(e.key, Jn(e.params, r), e.default);
1331
1337
  }
1332
- function Br(e, r) {
1333
- return vt(e, {
1338
+ function Hr(e, r) {
1339
+ return Ct(e, {
1334
1340
  resolveFormPath: (t) => N(r.$form, t) ?? e,
1335
1341
  resolveMetaPath: (t) => N(r.$meta, t) ?? e,
1336
1342
  resolveErrorsPath: (t) => N(r.$errors, t) ?? e,
1337
1343
  resolveFormIsInvalid: () => String(r.$formIsInvalid)
1338
1344
  });
1339
1345
  }
1340
- function Hr(e, r) {
1341
- return typeof e == "function" ? or(e, r) : Dn(e) ? Hn(e, r) : typeof e == "string" ? Br(e, r) : e;
1346
+ function Gr(e, r) {
1347
+ return typeof e == "function" ? or(e, r) : st(e) ? Kn(e, r) : typeof e == "string" ? Hr(e, r) : e;
1342
1348
  }
1343
- function Gn(e, r, t, n) {
1344
- return typeof e == "function" ? or(e, r) : z(e) ? r.widgetFlags[t]?.[n] : typeof e == "string" ? Br(e, r) : e;
1349
+ function Xn(e, r, t, n) {
1350
+ return typeof e == "function" ? or(e, r) : z(e) ? r.widgetFlags[t]?.[n] : typeof e == "string" ? Hr(e, r) : e;
1345
1351
  }
1346
- function Kn(e, r) {
1352
+ function zn(e, r) {
1347
1353
  return typeof e == "function" ? or(e, r) : e;
1348
1354
  }
1349
1355
  function ir(e, r, t) {
@@ -1356,10 +1362,10 @@ function ir(e, r, t) {
1356
1362
  return e[r];
1357
1363
  }
1358
1364
  }
1359
- function Xn(e, r) {
1365
+ function Jn(e, r) {
1360
1366
  return e && Object.keys(e).reduce((t, n) => {
1361
1367
  const o = String(e[n]);
1362
- return At(o) ? t[n] = It(o, {
1368
+ return It(o) ? t[n] = Ft(o, {
1363
1369
  resolveFormPath: (i) => N(r.$form, i) ?? o,
1364
1370
  resolveMetaPath: (i) => N(r.$meta, i) ?? o,
1365
1371
  resolveErrorsPath: (i) => N(r.$errors, i) ?? o,
@@ -1367,7 +1373,7 @@ function Xn(e, r) {
1367
1373
  }) : t[n] = o, t;
1368
1374
  }, {});
1369
1375
  }
1370
- class zn {
1376
+ class Qn {
1371
1377
  constructor(r, t) {
1372
1378
  this._changed = !1, this.source = r, this.previous = t, this.current = {};
1373
1379
  }
@@ -1381,7 +1387,7 @@ class zn {
1381
1387
  Ge(this.current, r, t), N(this.previous, r) !== t && (this._changed = !0);
1382
1388
  }
1383
1389
  }
1384
- function Jn(e, r, t, n) {
1390
+ function qn(e, r, t, n) {
1385
1391
  return {
1386
1392
  sortedStates: [...e.currentStates].sort((o, i) => i.length - o.length),
1387
1393
  widgetPropOverrides: e.widgetPropOverrides,
@@ -1393,25 +1399,25 @@ function Jn(e, r, t, n) {
1393
1399
  localization: r
1394
1400
  };
1395
1401
  }
1396
- function Qn(e, r) {
1402
+ function Yn(e, r) {
1397
1403
  if (r in e)
1398
1404
  return !0;
1399
1405
  const t = `${r}.`;
1400
1406
  return Object.keys(e).some((n) => n.startsWith(t));
1401
1407
  }
1402
- function Gr(e) {
1408
+ function Kr(e) {
1403
1409
  return Array.from(new Set(e.map((r) => r.split(".")[0])));
1404
1410
  }
1405
- function qn(e, r, t) {
1411
+ function Zn(e, r, t) {
1406
1412
  const n = r.map((o) => `[${o}]`).join("");
1407
1413
  return e.filter((o) => {
1408
1414
  const i = o.uid + n, s = t[i];
1409
1415
  return !s || s.hidden !== !0;
1410
1416
  });
1411
1417
  }
1412
- const Yn = (e) => [...e.matchAll(/\[(\d+)\]/g)].map((r) => parseInt(r[1], 10)), Zn = ({ lang: e }, r) => {
1418
+ const xn = (e) => [...e.matchAll(/\[(\d+)\]/g)].map((r) => parseInt(r[1], 10)), bn = ({ lang: e }, r) => {
1413
1419
  const t = {
1414
- ...mr(e),
1420
+ ...gr(e),
1415
1421
  formName: r.payload.formName
1416
1422
  };
1417
1423
  let n = r.payload.formDef, o = { status: "ok" };
@@ -1419,7 +1425,7 @@ const Yn = (e) => [...e.matchAll(/\[(\d+)\]/g)].map((r) => parseInt(r[1], 10)),
1419
1425
  try {
1420
1426
  n = JSON.parse(n);
1421
1427
  } catch (u) {
1422
- const c = u, h = ae.initializeParseError;
1428
+ const c = u, h = fe.initializeParseError;
1423
1429
  o = {
1424
1430
  status: "errored",
1425
1431
  message: `[${h}] ${c.message}`,
@@ -1438,24 +1444,25 @@ const Yn = (e) => [...e.matchAll(/\[(\d+)\]/g)].map((r) => parseInt(r[1], 10)),
1438
1444
  children: c
1439
1445
  };
1440
1446
  }
1441
- const i = gr.decode(n);
1447
+ const i = pr.decode(n);
1442
1448
  if (i.isOk()) {
1443
1449
  o = { status: "ok" };
1444
1450
  let u = {};
1445
1451
  try {
1446
1452
  u = Ke([i.value.form]).reduce(
1447
1453
  (c, h) => {
1448
- if (c[h.uid])
1449
- throw { existingWidget: c[h.uid], newWidget: h };
1450
- return c[h.uid] = h, c;
1454
+ const $ = h.uid;
1455
+ if (c[$])
1456
+ throw { existingWidget: c[$], newWidget: h };
1457
+ return c[$] = h, c;
1451
1458
  },
1452
1459
  {}
1453
1460
  );
1454
1461
  } catch (c) {
1455
- const h = ae.initializeUidCollisionError;
1462
+ const h = fe.initializeUidCollisionError;
1456
1463
  o = {
1457
1464
  status: "errored",
1458
- message: `[${h}] ${xn(c.existingWidget, c.newWidget)}`,
1465
+ message: `[${h}] ${eo(c.existingWidget, c.newWidget)}`,
1459
1466
  code: h
1460
1467
  }, u = {};
1461
1468
  }
@@ -1466,7 +1473,7 @@ const Yn = (e) => [...e.matchAll(/\[(\d+)\]/g)].map((r) => parseInt(r[1], 10)),
1466
1473
  formHealth: o
1467
1474
  };
1468
1475
  }
1469
- const s = ae.initializeUnknownError;
1476
+ const s = fe.initializeUnknownError;
1470
1477
  return {
1471
1478
  ...t,
1472
1479
  formHealth: {
@@ -1476,11 +1483,11 @@ const Yn = (e) => [...e.matchAll(/\[(\d+)\]/g)].map((r) => parseInt(r[1], 10)),
1476
1483
  }
1477
1484
  };
1478
1485
  };
1479
- function xn(e, r) {
1486
+ function eo(e, r) {
1480
1487
  const t = (n) => P(n) ? ` at "${n.path}"` : "";
1481
1488
  return `Duplicate UID "${r.uid}": Assigned to widget "${e.type}"${t(e)} and "${r.type}"${t(r)}.`;
1482
1489
  }
1483
- function bn(e, r) {
1490
+ function ro(e, r) {
1484
1491
  return {
1485
1492
  ...e,
1486
1493
  injectedValidations: {
@@ -1489,25 +1496,25 @@ function bn(e, r) {
1489
1496
  }
1490
1497
  };
1491
1498
  }
1492
- const eo = (e, { payload: r }) => {
1499
+ const to = (e, { payload: r }) => {
1493
1500
  let t;
1494
1501
  if ("path" in r) {
1495
1502
  if (t = Object.values(e.calculatedWidgets).find(
1496
- ({ source: o }) => P(o) && o.path === r.path
1503
+ ({ source: i }) => P(i) && i.path === r.path
1497
1504
  ), !t)
1498
1505
  return console.warn(`Input with path "${r.path}" not found`), e;
1499
1506
  } else if (t = e.calculatedWidgets[r.uid], !t)
1500
1507
  return console.warn(`Widget with uid "${r.uid}" not found`), e;
1501
- const n = e.widgetPropOverrides[t.source.uid] || {};
1508
+ const n = t.source.uid, o = e.widgetPropOverrides[n] || {};
1502
1509
  return {
1503
1510
  ...e,
1504
1511
  widgetPropOverrides: {
1505
1512
  ...e.widgetPropOverrides,
1506
- [t.source.uid]: { ...n, [r.prop]: r.value }
1513
+ [n]: { ...o, [r.prop]: r.value }
1507
1514
  }
1508
1515
  };
1509
1516
  };
1510
- function ro(e, r) {
1517
+ function no(e, r) {
1511
1518
  return {
1512
1519
  ...e,
1513
1520
  widgetFlags: {
@@ -1529,36 +1536,26 @@ function ro(e, r) {
1529
1536
  // TODO: clear widget from injectedValidations
1530
1537
  };
1531
1538
  }
1532
- const to = (e, r) => ({
1539
+ const oo = (e, r) => ({
1533
1540
  ...e,
1534
1541
  data: { ...r.payload.data }
1535
- }), no = (e, r) => ({
1542
+ }), io = (e, r) => ({
1536
1543
  ...e,
1537
1544
  formHealth: r.payload.formHealth
1538
- }), oo = (e, r) => ({
1545
+ }), so = (e, r) => ({
1539
1546
  ...e,
1540
1547
  lang: r.payload.lang
1541
- }), io = (e, r) => ({
1548
+ }), uo = (e, r) => ({
1542
1549
  ...e,
1543
1550
  meta: { ...r.payload.meta }
1544
- }), so = (e, r) => {
1551
+ }), co = (e, r) => {
1545
1552
  const t = N(e.data, r.payload.path);
1546
1553
  return r.type === "SET_WIDGET_DATA" || r.type === "SET_WIDGET_INITIAL_DATA" && t === void 0 ? {
1547
1554
  ...e,
1548
1555
  data: { ...Ge(e.data, r.payload.path, r.payload.data) }
1549
1556
  } : e;
1550
- };
1551
- function uo(e, r) {
1552
- const t = e["~standard"].validate(r);
1553
- if (t instanceof Promise)
1554
- throw new TypeError("Schema validation must be synchronous");
1555
- return t;
1556
- }
1557
- function co(e) {
1558
- return e.issues === void 0;
1559
- }
1560
- const We = (e, r) => (t) => {
1561
- const n = jr(
1557
+ }, We = (e, r) => (t) => {
1558
+ const n = Vr(
1562
1559
  Object.values(t.calculatedWidgets),
1563
1560
  ({ current: i }) => P(i) ? i : nr
1564
1561
  ), o = t.validations;
@@ -1567,13 +1564,13 @@ const We = (e, r) => (t) => {
1567
1564
  validations: n.reduce(
1568
1565
  (i, s) => {
1569
1566
  if (i[s.path] = null, s.validator) {
1570
- const u = e(s.validator, r), c = N(t.data, s.path), h = uo(
1567
+ const u = e(s.validator, r), c = N(t.data, s.path), h = $t(
1571
1568
  u,
1572
1569
  c
1573
1570
  );
1574
- i[s.path] = co(h) ? null : h.issues.map((A) => A.message);
1571
+ i[s.path] = At(h) ? null : h.issues.map(($) => $.message);
1575
1572
  }
1576
- return Array.isArray(i[s.path]) && Array.isArray(o[s.path]) && In(
1573
+ return Array.isArray(i[s.path]) && Array.isArray(o[s.path]) && Fn(
1577
1574
  i[s.path],
1578
1575
  o[s.path],
1579
1576
  (u, c) => u === c
@@ -1589,36 +1586,33 @@ const We = (e, r) => (t) => {
1589
1586
  }) => (n, o) => {
1590
1587
  switch (o.type) {
1591
1588
  case "INITIALIZE":
1592
- return Zn(n, o);
1589
+ return bn(n, o);
1593
1590
  case "SET_DATA":
1594
1591
  return L(
1595
- to(n, o),
1592
+ oo(n, o),
1596
1593
  V,
1597
1594
  U,
1598
1595
  M(t)
1599
1596
  );
1600
1597
  case "SET_META":
1601
1598
  return L(
1602
- io(n, o),
1599
+ uo(n, o),
1603
1600
  V,
1604
1601
  U,
1605
1602
  M(t)
1606
1603
  );
1607
1604
  case "SET_LANGUAGE":
1608
- return L(
1609
- oo(n, o),
1610
- M(t)
1611
- );
1605
+ return L(so(n, o), M(t));
1612
1606
  case "ADD_WIDGET":
1613
1607
  return L(
1614
- yt(n, o),
1615
- fe(Te, V),
1616
- fe(Te, U),
1617
- fe(Te, M(t))
1608
+ St(n, o),
1609
+ ae(Te, V),
1610
+ ae(Te, U),
1611
+ ae(Te, M(t))
1618
1612
  );
1619
1613
  case "REMOVE_WIDGET":
1620
1614
  return L(
1621
- ro(n, o),
1615
+ no(n, o),
1622
1616
  V,
1623
1617
  U,
1624
1618
  M(t)
@@ -1626,20 +1620,20 @@ const We = (e, r) => (t) => {
1626
1620
  case "SET_WIDGET_INITIAL_DATA":
1627
1621
  case "SET_WIDGET_DATA":
1628
1622
  return L(
1629
- so(n, o),
1623
+ co(n, o),
1630
1624
  V,
1631
1625
  U,
1632
1626
  M(t)
1633
1627
  );
1634
1628
  case "OVERRIDE_WIDGET_PROP":
1635
1629
  return L(
1636
- eo(n, o),
1630
+ to(n, o),
1637
1631
  V,
1638
1632
  U,
1639
1633
  M(t),
1640
1634
  // Apply validation here because this action can be dispatched from the form's event handlers callback
1641
1635
  // Apply only when the action is related to an input
1642
- fe(
1636
+ ae(
1643
1637
  (i) => {
1644
1638
  let s = !1, u = "";
1645
1639
  "path" in o.payload ? (s = !0, u = o.payload.path) : P(i.calculatedWidgets[o.payload.uid].current) && (s = !0, u = i.calculatedWidgets[o.payload.uid].current.path);
@@ -1650,7 +1644,7 @@ const We = (e, r) => (t) => {
1650
1644
  )
1651
1645
  );
1652
1646
  case "SET_FORM_HEALTH":
1653
- return no(n, o);
1647
+ return io(n, o);
1654
1648
  case "VALIDATE_ALL":
1655
1649
  return L(
1656
1650
  {
@@ -1686,9 +1680,9 @@ const We = (e, r) => (t) => {
1686
1680
  // TODO: extract this into a separate function
1687
1681
  // When the widget is a Widget Function, we propagate the validation result immediately
1688
1682
  (c) => {
1689
- const h = o.payload.uid, A = c.calculatedWidgets[h], g = A.source;
1683
+ const h = o.payload.uid, $ = c.calculatedWidgets[h], g = $.source;
1690
1684
  if (se(g)) {
1691
- const f = g({
1685
+ const a = g({
1692
1686
  $form: c.data,
1693
1687
  errors: c.validations[s],
1694
1688
  touched: !0,
@@ -1699,8 +1693,8 @@ const We = (e, r) => (t) => {
1699
1693
  calculatedWidgets: {
1700
1694
  ...c.calculatedWidgets,
1701
1695
  [h]: {
1702
- source: A.source,
1703
- current: f
1696
+ source: $.source,
1697
+ current: a
1704
1698
  }
1705
1699
  }
1706
1700
  };
@@ -1710,15 +1704,15 @@ const We = (e, r) => (t) => {
1710
1704
  ) : n;
1711
1705
  }
1712
1706
  case "INJECT_VALIDATION_ISSUES":
1713
- return bn(n, o);
1707
+ return ro(n, o);
1714
1708
  default:
1715
- return mt(o);
1709
+ return Et(o);
1716
1710
  }
1717
1711
  }, Te = (e) => e.formHealth.status === "ok";
1718
- function fo(e = [], r, t, n) {
1719
- const o = new zr(mr(n.lang)), i = o.asObservable().pipe(D()), s = lo({ validators: r, validateOn: t, localization: n });
1712
+ function ao(e = [], r, t, n) {
1713
+ const o = new Jr(gr(n.lang)), i = o.asObservable().pipe(D()), s = lo({ validators: r, validateOn: t, localization: n });
1720
1714
  function u(g) {
1721
- const f = o.getValue(), C = s(f, g);
1715
+ const a = o.getValue(), C = s(a, g);
1722
1716
  o.next(C);
1723
1717
  }
1724
1718
  let c = u;
@@ -1727,18 +1721,18 @@ function fo(e = [], r, t, n) {
1727
1721
  dispatch: (g) => c(g)
1728
1722
  // reference is updated later
1729
1723
  };
1730
- return c = e.map((g) => g(h)).reduceRight((g, f) => f(g), u), {
1724
+ return c = e.map((g) => g(h)).reduceRight((g, a) => a(g), u), {
1731
1725
  state$: i,
1732
1726
  dispatch: c,
1733
1727
  getState: () => o.getValue()
1734
1728
  };
1735
1729
  }
1736
- class wo {
1730
+ class Co {
1737
1731
  constructor() {
1738
- this.widgetRegistry = new Re(), this.store = {}, this.events$ = new Jr(), this.uuid = crypto.randomUUID(), this.itemRenderers = {}, this.dependencies = {};
1732
+ this.widgetRegistry = new Ne(), this.store = {}, this.events$ = new Qr(), this.uuid = crypto.randomUUID(), this.itemRenderers = {}, this.dependencies = {};
1739
1733
  }
1740
- initialize(r, t = [], n, o, i, s = Pn(), u) {
1741
- this.localization = s, this.dependencies = u, this.widgetRegistry.setWidgetLoaders(r), this.itemRenderers = i, this.store = fo(t, n, o, s);
1734
+ initialize(r, t = [], n, o, i, s = dt(), u) {
1735
+ this.localization = s, this.dependencies = u, this.widgetRegistry.setWidgetLoaders(r), this.itemRenderers = i, this.store = ao(t, n, o, s);
1742
1736
  }
1743
1737
  emitEvent(r, t, n) {
1744
1738
  const i = this.store.getState().currentStates.filter((s) => t.on?.[`${r}.${s}`] !== void 0);
@@ -1779,7 +1773,7 @@ class wo {
1779
1773
  }));
1780
1774
  }
1781
1775
  }
1782
- function Co(e = "GolemUI Form Store") {
1776
+ function Fo(e = "GolemUI Form Store") {
1783
1777
  return (r) => {
1784
1778
  const n = (typeof window < "u" ? window.__REDUX_DEVTOOLS_EXTENSION__ : void 0)?.connect({ name: e });
1785
1779
  return n?.init(r.getState()), (o) => (i) => {
@@ -1787,76 +1781,76 @@ function Co(e = "GolemUI Form Store") {
1787
1781
  };
1788
1782
  };
1789
1783
  }
1790
- const ao = T(
1791
- w((e) => e.data),
1784
+ const fo = T(
1785
+ O((e) => e.data),
1792
1786
  D()
1793
- ), Fo = (e) => T(
1794
- ao,
1795
- w((r) => N(r, e)),
1787
+ ), Do = (e) => T(
1788
+ fo,
1789
+ O((r) => N(r, e)),
1796
1790
  D()
1797
1791
  ), ho = T(
1798
1792
  Ee((e) => e.touched === !0),
1799
- w((e) => e.validations),
1793
+ O((e) => e.validations),
1800
1794
  D()
1801
- ), Do = (e) => T(
1795
+ ), Po = (e) => T(
1802
1796
  ho,
1803
- w((r) => r[e]),
1797
+ O((r) => r[e]),
1804
1798
  D()
1805
1799
  ), po = T(
1806
1800
  Ee((e) => e.touched === !0),
1807
- w((e) => e.injectedValidations),
1801
+ O((e) => e.injectedValidations),
1808
1802
  D()
1809
- ), Po = (e) => T(
1803
+ ), Wo = (e) => T(
1810
1804
  po,
1811
- w((r) => r[e]),
1805
+ O((r) => r[e]),
1812
1806
  D(),
1813
1807
  // we want to make sure combineLatest([validation$, injectedValidation$]) triggers
1814
- Qr(null)
1808
+ qr(null)
1815
1809
  ), go = T(
1816
- w((e) => e.lang),
1810
+ O((e) => e.lang),
1817
1811
  D()
1818
- ), Kr = T(
1819
- w((e) => e.calculatedWidgets),
1812
+ ), Xr = T(
1813
+ O((e) => e.calculatedWidgets),
1820
1814
  D()
1821
- ), Wo = (e) => (r) => qr([r.pipe(go), r.pipe(Kr)]).pipe(
1822
- w(([t, n]) => ({ lang: t, widget: n[e] })),
1815
+ ), To = (e) => (r) => Yr([r.pipe(go), r.pipe(Xr)]).pipe(
1816
+ O(([t, n]) => ({ lang: t, widget: n[e] })),
1823
1817
  Ee((t) => t.widget !== void 0),
1824
1818
  D((t, n) => t.lang === n.lang && t.widget === n.widget),
1825
- w((t) => t.widget.current)
1826
- ), To = (e) => T(
1827
- Kr,
1828
- w((r) => r[e]),
1819
+ O((t) => t.widget.current)
1820
+ ), Ro = (e) => T(
1821
+ Xr,
1822
+ O((r) => r[e]),
1829
1823
  Ee((r) => r !== void 0),
1830
- w((r) => r.current.children),
1824
+ O((r) => r.current.children),
1831
1825
  D()
1832
1826
  ), mo = T(
1833
- w((e) => e.widgetFlags),
1827
+ O((e) => e.widgetFlags),
1834
1828
  D()
1835
- ), Ro = (e) => T(
1829
+ ), ko = (e) => T(
1836
1830
  mo,
1837
- w((r) => r[e]),
1831
+ O((r) => r[e]),
1838
1832
  D()
1839
1833
  ), yo = T(
1840
- w((e) => e.touchedControls),
1834
+ O((e) => e.touchedControls),
1841
1835
  D()
1842
- ), ko = (e) => T(
1836
+ ), _o = (e) => T(
1843
1837
  yo,
1844
- w((r) => r[e]),
1838
+ O((r) => r[e]),
1845
1839
  D()
1846
1840
  ), $o = T(
1847
- w((e) => e.formHealth),
1841
+ O((e) => e.formHealth),
1848
1842
  D(
1849
1843
  (e, r) => !(e.status !== r.status || e.status === "errored")
1850
1844
  )
1851
- ), _o = (e) => e.pipe($o);
1852
- let Xr = !1;
1853
- function No() {
1854
- Xr = !0;
1845
+ ), No = (e) => e.pipe($o);
1846
+ let zr = !1;
1847
+ function Lo() {
1848
+ zr = !0;
1855
1849
  }
1856
1850
  function Ao() {
1857
- return Xr;
1851
+ return zr;
1858
1852
  }
1859
- function Lo(e, r, t) {
1853
+ function Mo(e, r, t) {
1860
1854
  if (!Ao())
1861
1855
  return;
1862
1856
  const n = Object.keys(r ?? {}).filter((o) => o in t);
@@ -1866,51 +1860,51 @@ function Lo(e, r, t) {
1866
1860
  );
1867
1861
  }
1868
1862
  export {
1869
- An as Debug,
1870
- wo as FormContext,
1863
+ In as Debug,
1864
+ Co as FormContext,
1871
1865
  nr as SKIP,
1872
- Re as WidgetRegistry,
1873
- Lo as assertNoPropCollisions,
1874
- To as calculatedLayoutChildrenByUid$,
1875
- Wo as calculatedWidgetsByUid$,
1866
+ Ne as WidgetRegistry,
1867
+ Mo as assertNoPropCollisions,
1868
+ Ro as calculatedLayoutChildrenByUid$,
1869
+ To as calculatedWidgetsByUid$,
1876
1870
  sr as cloneObject,
1877
- vo as compose,
1878
- fo as createFormStore,
1879
- mr as createInitialState,
1880
- Fo as dataByPath$,
1881
- So as defineForm,
1871
+ wo as compose,
1872
+ ao as createFormStore,
1873
+ gr as createInitialState,
1874
+ Do as dataByPath$,
1875
+ vo as defineForm,
1882
1876
  ce as deleteKey,
1883
- Co as devToolsMiddleware,
1884
- No as enableDevMode,
1885
- ae as errorCodes,
1886
- jr as filterMap,
1887
- vn as filterReduce,
1888
- Io as filterTap,
1889
- gr as formDefDecoder,
1890
- _o as formHealth,
1877
+ Fo as devToolsMiddleware,
1878
+ Lo as enableDevMode,
1879
+ fe as errorCodes,
1880
+ Vr as filterMap,
1881
+ Cn as filterReduce,
1882
+ Oo as filterTap,
1883
+ pr as formDefDecoder,
1884
+ No as formHealth,
1891
1885
  N as get,
1892
- Oo as getDirectionFromLanguage,
1893
- Pn as identityTranslator,
1894
- Po as injectedValidationByPath$,
1886
+ Io as getDirectionFromLanguage,
1887
+ dt as identityTranslator,
1888
+ Wo as injectedValidationByPath$,
1895
1889
  re as isActionWidget,
1896
1890
  Ao as isDevMode,
1897
- st as isDisplayWidget,
1891
+ ut as isDisplayWidget,
1898
1892
  se as isFunctionWidget,
1899
1893
  P as isInputWidget,
1900
- _e as isLayoutWidget,
1901
- co as isStandardValidateSuccess,
1902
- Dn as isTranslationConfig,
1894
+ ke as isLayoutWidget,
1895
+ At as isStandardValidateSuccess,
1896
+ st as isTranslationConfig,
1903
1897
  He as layoutWidgetDecoder,
1904
- On as makeRepeaterItemConfig,
1898
+ Dn as makeRepeaterItemConfig,
1905
1899
  L as pipe,
1906
1900
  mo as selectWidgetFlags,
1907
1901
  Ge as set,
1908
- hr as shortUUID,
1909
- uo as standardValidate,
1910
- Vr as toRepeaterItemUid,
1911
- ko as touchedControlsByPath$,
1902
+ mr as shortUUID,
1903
+ $t as standardValidate,
1904
+ Ur as toRepeaterItemUid,
1905
+ _o as touchedControlsByPath$,
1912
1906
  le as transformRepeaterItemWhenExpression,
1913
- Do as validationByPath$,
1914
- Ro as widgetFlagsByUid$,
1915
- In as zipEvery
1907
+ Po as validationByPath$,
1908
+ ko as widgetFlagsByUid$,
1909
+ Fn as zipEvery
1916
1910
  };