@effect-app/vue-components 4.0.0-beta.0 → 4.0.0-beta.2

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 (87) hide show
  1. package/dist/types/components/OmegaForm/OmegaFormStuff.d.ts +1 -1
  2. package/dist/vue-components.es10.js +12 -12
  3. package/dist/vue-components.es11.js +2 -2
  4. package/dist/vue-components.es12.js +3 -3
  5. package/dist/vue-components.es16.js +721 -9
  6. package/dist/vue-components.es17.js +119 -701
  7. package/dist/vue-components.es18.js +4 -141
  8. package/dist/vue-components.es19.js +11 -4
  9. package/dist/vue-components.es20.js +3 -11
  10. package/dist/vue-components.es21.js +24 -3
  11. package/dist/vue-components.es22.js +4 -24
  12. package/dist/vue-components.es23.js +8 -4
  13. package/dist/vue-components.es24.js +55 -8
  14. package/dist/vue-components.es25.js +64 -50
  15. package/dist/vue-components.es26.js +6 -69
  16. package/dist/vue-components.es27.js +5 -5
  17. package/dist/vue-components.es28.js +3 -6
  18. package/dist/vue-components.es29.js +3 -3
  19. package/dist/vue-components.es30.js +2 -3
  20. package/dist/vue-components.es31.js +1 -1
  21. package/dist/vue-components.es32.js +1 -1
  22. package/dist/vue-components.es33.js +1 -1
  23. package/dist/vue-components.es34.js +17 -2
  24. package/dist/vue-components.es35.js +10 -16
  25. package/dist/vue-components.es36.js +317 -37
  26. package/dist/vue-components.es37.js +561 -4
  27. package/dist/vue-components.es38.js +21 -77
  28. package/dist/vue-components.es39.js +1 -1
  29. package/dist/vue-components.es40.js +54 -551
  30. package/dist/vue-components.es41.js +4 -41
  31. package/dist/vue-components.es42.js +4 -27
  32. package/dist/vue-components.es43.js +24 -5
  33. package/dist/vue-components.es44.js +71 -36
  34. package/dist/vue-components.es45.js +30 -304
  35. package/dist/vue-components.es46.js +308 -25
  36. package/dist/vue-components.es47.js +99 -4
  37. package/dist/vue-components.es48.js +29 -22
  38. package/dist/vue-components.es49.js +2 -75
  39. package/dist/vue-components.es5.js +1 -1
  40. package/dist/vue-components.es50.js +2 -99
  41. package/dist/vue-components.es51.js +2 -2
  42. package/dist/vue-components.es52.js +110 -317
  43. package/dist/vue-components.es54.js +7 -2
  44. package/dist/vue-components.es55.js +32 -2
  45. package/dist/vue-components.es57.js +194 -0
  46. package/dist/vue-components.es59.js +36 -30
  47. package/dist/vue-components.es60.js +85 -0
  48. package/dist/vue-components.es61.js +40 -191
  49. package/dist/vue-components.es62.js +7 -0
  50. package/dist/vue-components.es63.js +1 -1
  51. package/dist/vue-components.es64.js +22 -100
  52. package/dist/vue-components.es65.js +5 -2
  53. package/dist/vue-components.es66.js +21 -21
  54. package/dist/vue-components.es67.js +28 -80
  55. package/dist/vue-components.es68.js +22 -12
  56. package/dist/vue-components.es69.js +11 -112
  57. package/dist/vue-components.es7.js +1 -1
  58. package/dist/vue-components.es70.js +5 -3
  59. package/dist/vue-components.es71.js +18 -31
  60. package/dist/vue-components.es72.js +9 -2
  61. package/dist/vue-components.es73.js +31 -2
  62. package/dist/vue-components.es74.js +48 -15
  63. package/dist/vue-components.es75.js +26 -70
  64. package/dist/vue-components.es76.js +100 -22
  65. package/dist/vue-components.es77.js +82 -5
  66. package/dist/vue-components.es78.js +21 -21
  67. package/dist/vue-components.es79.js +12 -30
  68. package/dist/vue-components.es80.js +112 -21
  69. package/dist/vue-components.es81.js +3 -12
  70. package/dist/vue-components.es82.js +32 -5
  71. package/dist/vue-components.es83.js +2 -19
  72. package/dist/vue-components.es84.js +2 -9
  73. package/dist/vue-components.es85.js +16 -31
  74. package/dist/vue-components.es86.js +13 -46
  75. package/dist/vue-components.es87.js +70 -26
  76. package/dist/vue-components.es88.js +8 -15
  77. package/dist/vue-components.es89.js +2 -16
  78. package/dist/vue-components.es90.js +14 -7
  79. package/dist/vue-components.es92.js +1 -1
  80. package/dist/vue-components.es94.js +1 -1
  81. package/dist/vue-components.es96.js +3 -3
  82. package/dist/vue-components.es97.js +1 -1
  83. package/package.json +4 -4
  84. package/src/components/OmegaForm/OmegaFormStuff.ts +6 -6
  85. package/dist/vue-components.es53.js +0 -66
  86. package/dist/vue-components.es56.js +0 -113
  87. package/dist/vue-components.es58.js +0 -9
@@ -1,725 +1,143 @@
1
- import { append as xe } from "./vue-components.es36.js";
2
- import { findError as P } from "./vue-components.es37.js";
3
- import { fnUntracedEager as le, succeedSome as Se, succeedNone as fe, fail as p, exit as M, succeed as ke } from "./vue-components.es22.js";
4
- import { format as Oe, formatPropertyKey as Te } from "./vue-components.es38.js";
5
- import { memoize as Q } from "./vue-components.es39.js";
6
- import { effectIsExit as L } from "./vue-components.es40.js";
7
- import { some as I, none as Ne } from "./vue-components.es24.js";
8
- import { Class as de } from "./vue-components.es41.js";
9
- import { isUnknown as _e, isBoolean as Ae, isNumber as Ee, isString as ve } from "./vue-components.es42.js";
10
- import { isFailure as R } from "./vue-components.es43.js";
11
- import { transform as C, Number as Fe } from "./vue-components.es44.js";
12
- import { make as $e, InvalidType as X, OneOf as je, AnyOf as Ue, Pointer as N, Composite as k, MissingKey as W, UnexpectedKey as Ce, Filter as Ie } from "./vue-components.es45.js";
13
- import { Transformation as Z, numberFromString as he } from "./vue-components.es46.js";
14
- function w(e) {
15
- return (t) => t._tag === e;
16
- }
17
- const kt = /* @__PURE__ */ w("Declaration"), Ot = /* @__PURE__ */ w("Null"), Tt = /* @__PURE__ */ w("Undefined"), Pe = /* @__PURE__ */ w("Never"), Nt = /* @__PURE__ */ w("String"), _t = /* @__PURE__ */ w("Number"), At = /* @__PURE__ */ w("Boolean"), K = /* @__PURE__ */ w("Literal"), Me = /* @__PURE__ */ w("UniqueSymbol"), Et = /* @__PURE__ */ w("Arrays"), vt = /* @__PURE__ */ w("Objects"), Ft = /* @__PURE__ */ w("Union");
18
- class O {
19
- to;
20
- transformation;
21
- constructor(t, n) {
22
- this.to = t, this.transformation = n;
23
- }
24
- }
25
- const $t = {};
26
- class ne {
27
- isOptional;
28
- isMutable;
29
- /** Used for constructor default values (e.g. `withConstructorDefault` API) */
30
- defaultValue;
31
- annotations;
32
- constructor(t, n, r = void 0, o = void 0) {
33
- this.isOptional = t, this.isMutable = n, this.defaultValue = r, this.annotations = o;
34
- }
35
- }
36
- const re = "~effect/Schema";
37
- class S {
38
- [re] = re;
39
- annotations;
40
- checks;
41
- encoding;
42
- context;
43
- constructor(t = void 0, n = void 0, r = void 0, o = void 0) {
44
- this.annotations = t, this.checks = n, this.encoding = r, this.context = o;
1
+ import { pretty as b } from "./vue-components.es41.js";
2
+ import { mapErrorEager as E, runFork as w, match as U } from "./vue-components.es21.js";
3
+ import { isSuccess as v } from "./vue-components.es42.js";
4
+ import { make as $ } from "./vue-components.es43.js";
5
+ import { MixedScheduler as y } from "./vue-components.es44.js";
6
+ import { makeFilter as F, Arrays as I, Literal as O, union as h, null as T, decodeTo as _, string as A, unknown as L, boolean as N, number as j, undefined as x } from "./vue-components.es16.js";
7
+ import { transform as f } from "./vue-components.es45.js";
8
+ import { makeFormatterStandardSchemaV1 as C } from "./vue-components.es46.js";
9
+ import { decodeUnknownEffect as k } from "./vue-components.es47.js";
10
+ import { make as M, passthrough as P } from "./vue-components.es48.js";
11
+ import { lambda as V } from "./vue-components.es49.js";
12
+ const p = "~effect/Schema/SchemaError";
13
+ class B {
14
+ [p] = p;
15
+ _tag = "SchemaError";
16
+ name = "SchemaError";
17
+ issue;
18
+ constructor(r) {
19
+ this.issue = r;
20
+ }
21
+ get message() {
22
+ return this.issue.toString();
45
23
  }
46
24
  toString() {
47
- return `<${this._tag}>`;
48
- }
49
- }
50
- class Le extends S {
51
- _tag = "Null";
52
- /** @internal */
53
- getParser() {
54
- return te(this, null);
55
- }
56
- /** @internal */
57
- getExpected() {
58
- return "null";
25
+ return `SchemaError(${this.message})`;
59
26
  }
60
27
  }
61
- const Re = /* @__PURE__ */ new Le();
62
- class Be extends S {
63
- _tag = "Undefined";
64
- /** @internal */
65
- getParser() {
66
- return te(this, void 0);
67
- }
68
- /** @internal */
69
- encodeToNull() {
70
- return x(this, [Ke]);
71
- }
72
- /** @internal */
73
- getExpected() {
74
- return "undefined";
75
- }
76
- }
77
- const Ke = /* @__PURE__ */ new O(Re, /* @__PURE__ */ new Z(/* @__PURE__ */ C(() => {
78
- }), /* @__PURE__ */ C(() => null))), jt = /* @__PURE__ */ new Be();
79
- class qe extends S {
80
- _tag = "Unknown";
81
- /** @internal */
82
- getParser() {
83
- return V(this, _e);
84
- }
85
- /** @internal */
86
- getExpected() {
87
- return "unknown";
88
- }
89
- }
90
- const Ut = /* @__PURE__ */ new qe();
91
- class B extends S {
92
- _tag = "Literal";
93
- literal;
94
- constructor(t, n, r, o, i) {
95
- if (super(n, r, o, i), typeof t == "number" && !globalThis.Number.isFinite(t))
96
- throw new Error(`A numeric literal must be finite, got ${Oe(t)}`);
97
- this.literal = t;
98
- }
99
- /** @internal */
100
- getParser() {
101
- return te(this, this.literal);
102
- }
103
- /** @internal */
104
- toCodecJson() {
105
- return typeof this.literal == "bigint" ? se(this) : this;
106
- }
107
- /** @internal */
108
- toCodecStringTree() {
109
- return typeof this.literal == "string" ? this : se(this);
110
- }
111
- /** @internal */
112
- getExpected() {
113
- return typeof this.literal == "string" ? JSON.stringify(this.literal) : globalThis.String(this.literal);
114
- }
115
- }
116
- function se(e) {
117
- const t = globalThis.String(e.literal);
118
- return x(e, [new O(new B(t), new Z(C(() => e.literal), C(() => t)))]);
119
- }
120
- class De extends S {
121
- _tag = "String";
122
- /** @internal */
123
- getParser() {
124
- return V(this, ve);
125
- }
126
- /** @internal */
127
- getExpected() {
128
- return "string";
129
- }
130
- }
131
- const Je = /* @__PURE__ */ new De();
132
- class Ve extends S {
133
- _tag = "Number";
134
- /** @internal */
135
- getParser() {
136
- return V(this, Ee);
137
- }
138
- /** @internal */
139
- toCodecJson() {
140
- return this.checks && (U(this.checks, "isFinite") || U(this.checks, "isInt")) ? this : x(this, [Xe]);
141
- }
142
- /** @internal */
143
- toCodecStringTree() {
144
- return this.checks && (U(this.checks, "isFinite") || U(this.checks, "isInt")) ? x(this, [ot]) : x(this, [ct]);
145
- }
146
- /** @internal */
147
- getExpected() {
148
- return "number";
149
- }
150
- }
151
- function U(e, t) {
152
- return e.some((n) => {
153
- switch (n._tag) {
154
- case "Filter":
155
- return n.annotations?.meta?._tag === t;
156
- case "FilterGroup":
157
- return U(n.checks, t);
158
- }
159
- });
160
- }
161
- const Ge = /* @__PURE__ */ new Ve();
162
- class ze extends S {
163
- _tag = "Boolean";
164
- /** @internal */
165
- getParser() {
166
- return V(this, Ae);
167
- }
168
- /** @internal */
169
- getExpected() {
170
- return "boolean";
171
- }
28
+ function l(e) {
29
+ return v(e) ? e.value : {
30
+ issues: [{
31
+ message: b(e.cause)
32
+ }]
33
+ };
172
34
  }
173
- const Ct = /* @__PURE__ */ new ze();
174
- class ge extends S {
175
- _tag = "Arrays";
176
- isMutable;
177
- elements;
178
- rest;
179
- constructor(t, n, r, o, i, s, c) {
180
- super(o, i, s, c), this.isMutable = t, this.elements = n, this.rest = r;
181
- const u = n.findIndex(A);
182
- if (u !== -1 && (n.slice(u + 1).some((l) => !A(l)) || r.length > 1))
183
- throw new Error("A required element cannot follow an optional element. ts(1257)");
184
- if (r.length > 1 && r.slice(1).some(A))
185
- throw new Error("An optional element cannot follow a rest element. ts(1266)");
186
- }
187
- /** @internal */
188
- getParser(t) {
189
- const n = this, r = n.elements.map((s) => ({
190
- ast: s,
191
- parser: t(s)
192
- })), o = n.rest.map((s) => ({
193
- ast: s,
194
- parser: t(s)
195
- })), i = r.length;
196
- return le(function* (s, c) {
197
- if (s._tag === "None")
198
- return s;
199
- const u = s.value;
200
- if (!Array.isArray(u))
201
- return yield* p(new X(n, s));
202
- const l = [];
203
- let a;
204
- const b = c.errors === "all";
205
- let d = 0;
206
- for (; d < i; d++) {
207
- const h = r[d], m = d < u.length ? I(u[d]) : Ne(), F = h.parser(m, c), g = L(F) ? F : yield* M(F);
208
- if (g._tag === "Failure") {
209
- const f = P(g.cause);
210
- if (R(f))
211
- return yield* g;
212
- const y = new N([d], f.success);
213
- if (b)
214
- a ? a.push(y) : a = [y];
215
- else
216
- return yield* p(new k(n, s, [y]));
217
- } else if (g.value._tag === "Some")
218
- l[d] = g.value.value;
219
- else if (!A(h.ast)) {
220
- const f = new N([d], new W(h.ast.context?.annotations));
221
- if (b)
222
- a ? a.push(f) : a = [f];
223
- else
224
- return yield* p(new k(n, s, [f]));
225
- }
226
- }
227
- const T = u.length;
228
- if (n.rest.length > 0) {
229
- const [h, ...m] = o, F = h.ast.context?.annotations;
230
- for (; d < T - m.length; d++) {
231
- const g = h.parser(I(u[d]), c), f = L(g) ? g : yield* M(g);
232
- if (f._tag === "Failure") {
233
- const y = P(f.cause);
234
- if (R(y))
235
- return yield* f;
236
- const $ = new N([d], y.success);
237
- if (b)
238
- a ? a.push($) : a = [$];
239
- else
240
- return yield* p(new k(n, s, [$]));
241
- } else if (f.value._tag === "Some")
242
- l[d] = f.value.value;
243
- else {
244
- const y = new N([d], new W(F));
245
- if (b)
246
- a ? a.push(y) : a = [y];
247
- else
248
- return yield* p(new k(n, s, [y]));
249
- }
250
- }
251
- for (let g = 0; g < m.length; g++) {
252
- const f = d + g;
253
- if (!(T < f)) {
254
- const y = m[g], $ = y.ast.context?.annotations, G = y.parser(I(u[f]), c), j = L(G) ? G : yield* M(G);
255
- if (j._tag === "Failure") {
256
- const _ = P(j.cause);
257
- if (R(_))
258
- return yield* j;
259
- const z = new N([f], _.success);
260
- if (b)
261
- a ? a.push(z) : a = [z];
262
- else
263
- return yield* p(new k(n, s, [z]));
264
- } else if (j.value._tag === "Some")
265
- l[f] = j.value.value;
266
- else {
267
- const _ = new N([f], new W($));
268
- if (b)
269
- a ? a.push(_) : a = [_];
270
- else
271
- return yield* p(new k(n, s, [_]));
272
- }
273
- }
274
- }
275
- } else
276
- for (let h = i; h <= T - 1; h++) {
277
- const m = new N([h], new Ce(n, u[h]));
278
- if (b)
279
- a ? a.push(m) : a = [m];
280
- else
281
- return yield* p(new k(n, s, [m]));
282
- }
283
- return a ? yield* p(new k(n, s, a)) : I(l);
35
+ function oe(e, r) {
36
+ const n = k(e), a = {
37
+ errors: "all",
38
+ ...r?.parseOptions
39
+ }, o = C(), i = (s) => {
40
+ const m = new y(), u = w(U(n(s, a), {
41
+ onFailure: o,
42
+ onSuccess: (c) => ({
43
+ value: c
44
+ })
45
+ }), {
46
+ scheduler: m
284
47
  });
285
- }
286
- /** @internal */
287
- recur(t) {
288
- const n = Y(this.elements, t), r = Y(this.rest, t);
289
- return n === this.elements && r === this.rest ? this : new ge(this.isMutable, n, r, this.annotations, this.checks, void 0, this.context);
290
- }
291
- /** @internal */
292
- getExpected() {
293
- return "array";
294
- }
295
- }
296
- const We = "[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?";
297
- function Ye(e) {
298
- return e.ast;
299
- }
300
- function It(e, t, n) {
301
- return new v(e.map(Ye), t, void 0, n);
302
- }
303
- function me(e) {
304
- switch (e._tag) {
305
- case "Null":
306
- return ["null"];
307
- case "Undefined":
308
- case "Void":
309
- return ["undefined"];
310
- case "String":
311
- case "TemplateLiteral":
312
- return ["string"];
313
- case "Number":
314
- return ["number"];
315
- case "Boolean":
316
- return ["boolean"];
317
- case "Symbol":
318
- case "UniqueSymbol":
319
- return ["symbol"];
320
- case "BigInt":
321
- return ["bigint"];
322
- case "Arrays":
323
- return ["array"];
324
- case "ObjectKeyword":
325
- return ["object", "array", "function"];
326
- case "Objects":
327
- return e.propertySignatures.length || e.indexSignatures.length ? ["object"] : ["object", "array"];
328
- case "Enum":
329
- return Array.from(new Set(e.enums.map(([, t]) => typeof t)));
330
- case "Literal":
331
- return [typeof e.literal];
332
- case "Union":
333
- return Array.from(new Set(e.types.flatMap(me)));
334
- default:
335
- return ["null", "undefined", "string", "number", "boolean", "symbol", "bigint", "object", "array", "function"];
336
- }
337
- }
338
- function ye(e) {
339
- switch (e._tag) {
340
- default:
341
- return [];
342
- case "Declaration": {
343
- const t = e.annotations?.["~sentinels"];
344
- return Array.isArray(t) ? t : [];
345
- }
346
- case "Objects":
347
- return e.propertySignatures.flatMap((t) => {
348
- const n = t.type;
349
- if (!A(n)) {
350
- if (K(n))
351
- return [{
352
- key: t.name,
353
- literal: n.literal
354
- }];
355
- if (Me(n))
356
- return [{
357
- key: t.name,
358
- literal: n.symbol
359
- }];
360
- }
361
- return [];
48
+ m.flush();
49
+ const d = u.pollUnsafe();
50
+ return d ? l(d) : new Promise((c) => {
51
+ u.addObserver((g) => {
52
+ c(l(g));
362
53
  });
363
- case "Arrays":
364
- return e.elements.flatMap((t, n) => K(t) && !A(t) ? [{
365
- key: n,
366
- literal: t.literal
367
- }] : []);
368
- case "Suspend":
369
- return ye(e.thunk());
370
- }
371
- }
372
- const ie = /* @__PURE__ */ new WeakMap();
373
- function He(e) {
374
- let t = ie.get(e);
375
- if (t) return t;
376
- t = {};
377
- for (const n of e) {
378
- const r = ee(n);
379
- if (Pe(r)) continue;
380
- const o = me(r), i = ye(r);
381
- t.byType ??= {};
382
- for (const s of o) (t.byType[s] ??= []).push(n);
383
- if (i.length > 0) {
384
- t.bySentinel ??= /* @__PURE__ */ new Map();
385
- for (const {
386
- key: s,
387
- literal: c
388
- } of i) {
389
- let u = t.bySentinel.get(s);
390
- u || t.bySentinel.set(s, u = /* @__PURE__ */ new Map());
391
- let l = u.get(c);
392
- l || u.set(c, l = []), l.push(n);
393
- }
394
- } else {
395
- t.otherwise ??= {};
396
- for (const s of o) (t.otherwise[s] ??= []).push(n);
397
- }
398
- }
399
- return ie.set(e, t), t;
400
- }
401
- function oe(e) {
402
- return (t) => {
403
- const n = ee(t);
404
- return n._tag === "Literal" ? n.literal === e : n._tag === "UniqueSymbol" ? n.symbol === e : !0;
405
- };
406
- }
407
- function Qe(e, t) {
408
- const n = He(t), r = e === null ? "null" : Array.isArray(e) ? "array" : typeof e;
409
- if (n.bySentinel) {
410
- const o = n.otherwise?.[r] ?? [];
411
- if (r === "object" || r === "array") {
412
- for (const [i, s] of n.bySentinel)
413
- if (Object.hasOwn(e, i)) {
414
- const c = s.get(e[i]);
415
- if (c) return [...c, ...o].filter(oe(e));
416
- }
417
- }
418
- return o;
419
- }
420
- return (n.byType?.[r] ?? []).filter(oe(e));
421
- }
422
- class v extends S {
423
- _tag = "Union";
424
- types;
425
- mode;
426
- constructor(t, n, r, o, i, s) {
427
- super(r, o, i, s), this.types = t, this.mode = n;
428
- }
429
- /** @internal */
430
- getParser(t) {
431
- const n = this;
432
- return le(function* (r, o) {
433
- if (r._tag === "None")
434
- return r;
435
- const i = r.value, s = n.mode === "oneOf", c = Qe(i, n.types);
436
- let u;
437
- const l = {
438
- out: void 0,
439
- successes: []
440
- };
441
- for (let a = 0; a < c.length; a++) {
442
- const b = c[a], T = t(b)(r, o), h = L(T) ? T : yield* M(T);
443
- if (h._tag === "Failure") {
444
- const m = P(h.cause);
445
- if (R(m))
446
- return yield* h;
447
- u ? u.push(m.success) : u = [m.success];
448
- continue;
449
- } else {
450
- if (l.out && s)
451
- return l.successes.push(b), yield* p(new je(n, i, l.successes));
452
- if (l.out = h.value, l.successes.push(b), !s)
453
- break;
454
- }
455
- }
456
- return l.out ? l.out : yield* p(new Ue(n, i, u ?? []));
457
54
  });
458
- }
459
- /** @internal */
460
- recur(t) {
461
- const n = Y(this.types, t);
462
- return n === this.types ? this : new v(n, this.mode, this.annotations, this.checks, void 0, this.context);
463
- }
464
- /** @internal */
465
- getExpected(t) {
466
- const n = this.annotations?.expected;
467
- if (typeof n == "string") return n;
468
- if (this.types.length === 0) return "never";
469
- const r = this.types.map((o) => {
470
- const i = ee(o);
471
- switch (i._tag) {
472
- case "Arrays": {
473
- const s = i.elements.filter(K);
474
- if (s.length > 0)
475
- return `${ce(i.isMutable)}[ ${s.map((c) => t(c) + ae(c.context?.isOptional)).join(", ")}, ... ]`;
476
- break;
477
- }
478
- case "Objects": {
479
- const s = i.propertySignatures.filter((c) => K(c.type));
480
- if (s.length > 0)
481
- return `{ ${s.map((c) => `${ce(c.type.context?.isMutable)}${Te(c.name)}${ae(c.type.context?.isOptional)}: ${t(c.type)}`).join(", ")}, ... }`;
482
- break;
483
- }
55
+ };
56
+ if ("~standard" in e) {
57
+ const s = e;
58
+ return "validate" in s["~standard"] || Object.assign(s["~standard"], {
59
+ validate: i
60
+ }), s;
61
+ } else
62
+ return Object.assign(e, {
63
+ "~standard": {
64
+ version: 1,
65
+ vendor: "effect",
66
+ validate: i
484
67
  }
485
- return t(i);
486
68
  });
487
- return Array.from(new Set(r)).join(" | ");
488
- }
489
69
  }
490
- const pe = /* @__PURE__ */ new v([/* @__PURE__ */ new B("Infinity"), /* @__PURE__ */ new B("-Infinity"), /* @__PURE__ */ new B("NaN")], "anyOf"), Xe = /* @__PURE__ */ new O(/* @__PURE__ */ new v([Ge, pe], "anyOf"), /* @__PURE__ */ new Z(/* @__PURE__ */ Fe(), /* @__PURE__ */ C((e) => globalThis.Number.isFinite(e) ? e : globalThis.String(e))));
491
- function ce(e) {
492
- return e ? "" : "readonly ";
493
- }
494
- function ae(e) {
495
- return e ? "?" : "";
496
- }
497
- class q extends de {
498
- _tag = "Filter";
499
- run;
500
- annotations;
501
- /**
502
- * Whether the parsing process should be aborted after this check has failed.
503
- */
504
- aborted;
505
- constructor(t, n = void 0, r = !1) {
506
- super(), this.run = t, this.annotations = n, this.aborted = r;
507
- }
508
- annotate(t) {
509
- return new q(this.run, {
510
- ...this.annotations,
511
- ...t
512
- }, this.aborted);
513
- }
514
- abort() {
515
- return new q(this.run, this.annotations, !0);
516
- }
517
- and(t, n) {
518
- return new D([this, t], n);
519
- }
520
- }
521
- class D extends de {
522
- _tag = "FilterGroup";
523
- checks;
524
- annotations;
525
- constructor(t, n = void 0) {
526
- super(), this.checks = t, this.annotations = n;
527
- }
528
- annotate(t) {
529
- return new D(this.checks, {
530
- ...this.annotations,
531
- ...t
532
- });
533
- }
534
- and(t, n) {
535
- return new D([this, t], n);
536
- }
537
- }
538
- function Ze(e, t, n = !1) {
539
- return new q((r, o, i) => $e(r, e(r, o, i)), t, n);
540
- }
541
- function et(e, t) {
542
- const n = e.source;
543
- return Ze((r) => e.test(r), {
544
- expected: `a string matching the RegExp ${n}`,
545
- meta: {
546
- _tag: "isPattern",
547
- regExp: e
548
- },
549
- toArbitraryConstraint: {
550
- string: {
551
- patterns: [e.source]
552
- }
553
- },
554
- ...t
555
- });
556
- }
557
- function J(e, t) {
558
- const n = Object.getOwnPropertyDescriptors(e);
559
- return t(n), Object.create(Object.getPrototypeOf(e), n);
560
- }
561
- function x(e, t) {
562
- return e.encoding === t ? e : J(e, (n) => {
563
- n.encoding.value = t;
70
+ function R(e) {
71
+ const r = k(e);
72
+ return (n, a) => E(r(n, a), (o) => new B(o));
73
+ }
74
+ const se = R, t = $;
75
+ function q(e) {
76
+ const r = t(new O(e), {
77
+ literal: e,
78
+ transform(n) {
79
+ return r.pipe(D(q(n), {
80
+ decode: f(() => n),
81
+ encode: f(() => e)
82
+ }));
83
+ }
564
84
  });
565
- }
566
- function tt(e, t) {
567
- return e.context === t ? e : J(e, (n) => {
568
- n.context.value = t;
85
+ return r;
86
+ }
87
+ const ae = /* @__PURE__ */ t(L), ce = /* @__PURE__ */ t(T), ie = /* @__PURE__ */ t(x), me = /* @__PURE__ */ t(A), z = /* @__PURE__ */ t(j), ue = /* @__PURE__ */ t(N), de = /* @__PURE__ */ V((e) => t(new I(!1, [], [e.ast]), {
88
+ schema: e
89
+ }));
90
+ function S(e, r) {
91
+ return t(e, {
92
+ members: r,
93
+ mapMembers(n, a) {
94
+ const o = n(this.members);
95
+ return S(h(o, this.ast.mode, a?.unsafePreserveChecks ? this.ast.checks : void 0), o);
96
+ }
569
97
  });
570
98
  }
571
- function Pt(e, t) {
572
- if (e.checks) {
573
- const n = e.checks[e.checks.length - 1];
574
- return we(e, xe(e.checks.slice(0, -1), n.annotate(t)));
575
- }
576
- return J(e, (n) => {
577
- n.annotations.value = {
578
- ...n.annotations.value,
579
- ...t
580
- };
581
- });
99
+ function fe(e, r) {
100
+ return S(h(e, "anyOf", void 0), e);
582
101
  }
583
- function we(e, t) {
584
- return e.checks === t ? e : J(e, (n) => {
585
- n.checks.value = t;
102
+ function D(e, r) {
103
+ return (n) => t(_(n.ast, e.ast, r ? M(r) : P()), {
104
+ from: n,
105
+ to: e
586
106
  });
587
107
  }
588
- function nt(e, t) {
589
- return we(e, e.checks ? [...e.checks, ...t] : t);
590
- }
591
- function rt(e, t, n) {
592
- const r = new O(e, t);
593
- return x(n, n.encoding ? [...n.encoding, r] : [r]);
594
- }
595
- function Y(e, t) {
596
- let n = !1;
597
- const r = new Array(e.length);
598
- for (let o = 0; o < e.length; o++) {
599
- const i = e[o], s = t(i);
600
- s !== i && (n = !0), r[o] = s;
601
- }
602
- return n ? r : e;
603
- }
604
- function Mt(e, t) {
605
- const n = e.context ? new ne(e.context.isOptional, e.context.isMutable, e.context.defaultValue, {
606
- ...e.context.annotations,
607
- ...t
608
- }) : new ne(!1, !1, void 0, t);
609
- return tt(e, n);
610
- }
611
- function Lt(e, t, n) {
612
- return rt(e, n, t);
613
- }
614
- function A(e) {
615
- return e.context?.isOptional ?? !1;
616
- }
617
- const H = /* @__PURE__ */ Q((e) => {
618
- if (e.encoding)
619
- return H(x(e, void 0));
620
- const t = e;
621
- return t.recur?.(H) ?? t;
622
- }), ee = /* @__PURE__ */ Q((e) => H(E(e)));
623
- function st(e, t) {
624
- const n = t, r = n.length, o = n[r - 1], i = [new O(E(x(e, void 0)), n[0].transformation.flip())];
625
- for (let c = 1; c < r; c++)
626
- i.unshift(new O(E(n[c - 1].to), n[c].transformation.flip()));
627
- const s = E(o.to);
628
- return s.encoding ? x(s, [...s.encoding, ...i]) : x(s, i);
629
- }
630
- const E = /* @__PURE__ */ Q((e) => {
631
- if (e.encoding)
632
- return st(e, e.encoding);
633
- const t = e;
634
- return t.flip?.(E) ?? t.recur?.(E) ?? t;
635
- });
636
- function te(e, t) {
637
- const n = Se(t);
638
- return (r) => r._tag === "None" ? fe : r.value === t ? n : p(new X(e, r));
639
- }
640
- function V(e, t) {
641
- return (n) => n._tag === "None" ? fe : t(n.value) ? ke(n) : p(new X(e, n));
642
- }
643
- const ue = /* @__PURE__ */ new globalThis.RegExp(`^${We}$`);
644
- function it(e) {
645
- return et(ue, {
646
- expected: "a string representing a finite number",
108
+ const G = F;
109
+ function H(e) {
110
+ return G((r) => globalThis.Number.isSafeInteger(r), {
111
+ expected: "an integer",
647
112
  meta: {
648
- _tag: "isStringFinite",
649
- regExp: ue
113
+ _tag: "isInt"
114
+ },
115
+ toArbitraryConstraint: {
116
+ number: {
117
+ isInteger: !0
118
+ }
650
119
  },
651
120
  ...e
652
121
  });
653
122
  }
654
- const be = /* @__PURE__ */ nt(Je, [/* @__PURE__ */ it()]), ot = /* @__PURE__ */ new O(be, he), ct = /* @__PURE__ */ new O(/* @__PURE__ */ new v([be, pe], "anyOf"), he);
655
- function at(e, t, n, r, o) {
656
- for (let i = 0; i < e.length; i++) {
657
- const s = e[i];
658
- if (s._tag === "FilterGroup")
659
- at(s.checks, t, n, r, o);
660
- else {
661
- const c = s.run(t, r, o);
662
- if (c && (n.push(new Ie(t, s, c)), s.aborted || o?.errors !== "all"))
663
- return;
664
- }
665
- }
666
- }
667
- const Rt = "~effect/Schema/Class", Bt = "~structural";
123
+ const pe = /* @__PURE__ */ z.check(/* @__PURE__ */ H());
668
124
  export {
669
- ge as Arrays,
670
- S as Base,
671
- ze as Boolean,
672
- Rt as ClassTypeId,
673
- ne as Context,
674
- We as FINITE_PATTERN,
675
- q as Filter,
676
- D as FilterGroup,
677
- O as Link,
678
- B as Literal,
679
- Le as Null,
680
- Ve as Number,
681
- Bt as STRUCTURAL_ANNOTATION_KEY,
682
- De as String,
683
- Be as Undefined,
684
- v as Union,
685
- qe as Unknown,
686
- Pt as annotate,
687
- Mt as annotateKey,
688
- nt as appendChecks,
689
- Ct as boolean,
690
- at as collectIssues,
691
- ye as collectSentinels,
692
- Lt as decodeTo,
693
- $t as defaultParseOptions,
694
- E as flip,
695
- Ye as getAST,
696
- Qe as getCandidates,
697
- Et as isArrays,
698
- At as isBoolean,
699
- kt as isDeclaration,
700
- K as isLiteral,
701
- Pe as isNever,
702
- Ot as isNull,
703
- _t as isNumber,
704
- vt as isObjects,
705
- A as isOptional,
706
- et as isPattern,
707
- Nt as isString,
708
- it as isStringFinite,
709
- Tt as isUndefined,
710
- Ft as isUnion,
711
- Me as isUniqueSymbol,
712
- Ze as makeFilter,
713
- Y as mapOrSame,
714
- Re as null,
715
- Ge as number,
716
- we as replaceChecks,
717
- tt as replaceContext,
718
- x as replaceEncoding,
719
- Je as string,
720
- ee as toEncoded,
721
- H as toType,
722
- jt as undefined,
723
- It as union,
724
- Ut as unknown
125
+ de as Array,
126
+ ue as Boolean,
127
+ pe as Int,
128
+ q as Literal,
129
+ ce as Null,
130
+ z as Number,
131
+ B as SchemaError,
132
+ me as String,
133
+ ie as Undefined,
134
+ fe as Union,
135
+ ae as Unknown,
136
+ se as decodeEffect,
137
+ D as decodeTo,
138
+ R as decodeUnknownEffect,
139
+ H as isInt,
140
+ t as make,
141
+ G as makeFilter,
142
+ oe as toStandardSchemaV1
725
143
  };