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

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 (85) hide show
  1. package/dist/vue-components.es10.js +12 -12
  2. package/dist/vue-components.es11.js +2 -2
  3. package/dist/vue-components.es12.js +3 -3
  4. package/dist/vue-components.es16.js +9 -721
  5. package/dist/vue-components.es17.js +701 -119
  6. package/dist/vue-components.es18.js +141 -4
  7. package/dist/vue-components.es19.js +4 -11
  8. package/dist/vue-components.es20.js +11 -3
  9. package/dist/vue-components.es21.js +3 -24
  10. package/dist/vue-components.es22.js +24 -4
  11. package/dist/vue-components.es23.js +4 -8
  12. package/dist/vue-components.es24.js +8 -55
  13. package/dist/vue-components.es25.js +50 -64
  14. package/dist/vue-components.es26.js +69 -6
  15. package/dist/vue-components.es27.js +5 -5
  16. package/dist/vue-components.es28.js +6 -3
  17. package/dist/vue-components.es29.js +3 -3
  18. package/dist/vue-components.es30.js +3 -2
  19. package/dist/vue-components.es31.js +1 -1
  20. package/dist/vue-components.es32.js +1 -1
  21. package/dist/vue-components.es33.js +1 -1
  22. package/dist/vue-components.es34.js +2 -17
  23. package/dist/vue-components.es35.js +16 -10
  24. package/dist/vue-components.es36.js +189 -315
  25. package/dist/vue-components.es38.js +4 -27
  26. package/dist/vue-components.es39.js +37 -51
  27. package/dist/vue-components.es40.js +4 -64
  28. package/dist/vue-components.es41.js +83 -4
  29. package/dist/vue-components.es42.js +52 -4
  30. package/dist/vue-components.es43.js +556 -19
  31. package/dist/vue-components.es44.js +37 -71
  32. package/dist/vue-components.es45.js +21 -34
  33. package/dist/vue-components.es46.js +5 -314
  34. package/dist/vue-components.es47.js +34 -93
  35. package/dist/vue-components.es48.js +308 -25
  36. package/dist/vue-components.es49.js +31 -2
  37. package/dist/vue-components.es5.js +1 -1
  38. package/dist/vue-components.es50.js +4 -2
  39. package/dist/vue-components.es51.js +24 -2
  40. package/dist/vue-components.es52.js +73 -109
  41. package/dist/vue-components.es53.js +101 -0
  42. package/dist/vue-components.es54.js +2 -7
  43. package/dist/vue-components.es55.js +317 -31
  44. package/dist/vue-components.es56.js +66 -0
  45. package/dist/vue-components.es57.js +2 -192
  46. package/dist/vue-components.es58.js +4 -0
  47. package/dist/vue-components.es59.js +109 -36
  48. package/dist/vue-components.es61.js +7 -41
  49. package/dist/vue-components.es62.js +32 -5
  50. package/dist/vue-components.es64.js +100 -22
  51. package/dist/vue-components.es65.js +2 -5
  52. package/dist/vue-components.es66.js +21 -21
  53. package/dist/vue-components.es67.js +80 -28
  54. package/dist/vue-components.es68.js +12 -22
  55. package/dist/vue-components.es69.js +112 -11
  56. package/dist/vue-components.es7.js +1 -1
  57. package/dist/vue-components.es70.js +3 -5
  58. package/dist/vue-components.es71.js +31 -18
  59. package/dist/vue-components.es72.js +2 -9
  60. package/dist/vue-components.es73.js +2 -31
  61. package/dist/vue-components.es74.js +15 -48
  62. package/dist/vue-components.es75.js +70 -26
  63. package/dist/vue-components.es76.js +22 -100
  64. package/dist/vue-components.es77.js +5 -82
  65. package/dist/vue-components.es78.js +21 -21
  66. package/dist/vue-components.es79.js +30 -12
  67. package/dist/vue-components.es80.js +21 -112
  68. package/dist/vue-components.es81.js +12 -3
  69. package/dist/vue-components.es82.js +5 -32
  70. package/dist/vue-components.es83.js +19 -2
  71. package/dist/vue-components.es84.js +9 -2
  72. package/dist/vue-components.es85.js +31 -16
  73. package/dist/vue-components.es86.js +46 -13
  74. package/dist/vue-components.es87.js +26 -70
  75. package/dist/vue-components.es88.js +15 -8
  76. package/dist/vue-components.es89.js +16 -2
  77. package/dist/vue-components.es90.js +7 -14
  78. package/dist/vue-components.es92.js +1 -1
  79. package/dist/vue-components.es94.js +1 -1
  80. package/dist/vue-components.es96.js +3 -3
  81. package/dist/vue-components.es97.js +1 -1
  82. package/package.json +3 -3
  83. package/dist/vue-components.es37.js +0 -563
  84. package/dist/vue-components.es60.js +0 -85
  85. package/dist/vue-components.es63.js +0 -6
@@ -1,33 +1,316 @@
1
- import { hasProperty as c } from "./vue-components.es38.js";
2
- import { passthrough as t, Number as d, String as a } from "./vue-components.es45.js";
3
- const n = "~effect/SchemaTransformation/Transformation";
4
- class o {
5
- [n] = n;
6
- _tag = "Transformation";
7
- decode;
8
- encode;
9
- constructor(r, s) {
10
- this.decode = r, this.encode = s;
1
+ import { format as u, formatPath as _ } from "./vue-components.es41.js";
2
+ import { getExpected as h } from "./vue-components.es74.js";
3
+ import { some as d, isNone as v } from "./vue-components.es24.js";
4
+ import { hasProperty as O } from "./vue-components.es45.js";
5
+ const g = "~effect/SchemaIssue/Issue";
6
+ function F(t) {
7
+ return O(t, g);
8
+ }
9
+ class a {
10
+ [g] = g;
11
+ toString() {
12
+ return K(this);
13
+ }
14
+ }
15
+ class b extends a {
16
+ _tag = "Filter";
17
+ /**
18
+ * The input value that caused the issue.
19
+ */
20
+ actual;
21
+ /**
22
+ * The filter that failed.
23
+ */
24
+ filter;
25
+ /**
26
+ * The issue that occurred.
27
+ */
28
+ issue;
29
+ constructor(e, s, n) {
30
+ super(), this.actual = e, this.filter = s, this.issue = n;
31
+ }
32
+ }
33
+ class A extends a {
34
+ _tag = "Encoding";
35
+ /**
36
+ * The schema that caused the issue.
37
+ */
38
+ ast;
39
+ /**
40
+ * The input value that caused the issue.
41
+ */
42
+ actual;
43
+ /**
44
+ * The issue that occurred.
45
+ */
46
+ issue;
47
+ constructor(e, s, n) {
48
+ super(), this.ast = e, this.actual = s, this.issue = n;
49
+ }
50
+ }
51
+ class M extends a {
52
+ _tag = "Pointer";
53
+ /**
54
+ * The path to the location in the input that caused the issue.
55
+ */
56
+ path;
57
+ /**
58
+ * The issue that occurred.
59
+ */
60
+ issue;
61
+ constructor(e, s) {
62
+ super(), this.path = e, this.issue = s;
63
+ }
64
+ }
65
+ class P extends a {
66
+ _tag = "MissingKey";
67
+ /**
68
+ * The metadata for the issue.
69
+ */
70
+ annotations;
71
+ constructor(e) {
72
+ super(), this.annotations = e;
73
+ }
74
+ }
75
+ class T extends a {
76
+ _tag = "UnexpectedKey";
77
+ /**
78
+ * The schema that caused the issue.
79
+ */
80
+ ast;
81
+ /**
82
+ * The input value that caused the issue.
83
+ */
84
+ actual;
85
+ constructor(e, s) {
86
+ super(), this.ast = e, this.actual = s;
87
+ }
88
+ }
89
+ class S extends a {
90
+ _tag = "Composite";
91
+ /**
92
+ * The schema that caused the issue.
93
+ */
94
+ ast;
95
+ /**
96
+ * The input value that caused the issue.
97
+ */
98
+ actual;
99
+ /**
100
+ * The issues that occurred.
101
+ */
102
+ issues;
103
+ constructor(e, s, n) {
104
+ super(), this.ast = e, this.actual = s, this.issues = n;
105
+ }
106
+ }
107
+ class D extends a {
108
+ _tag = "InvalidType";
109
+ /**
110
+ * The schema that caused the issue.
111
+ */
112
+ ast;
113
+ /**
114
+ * The input value that caused the issue.
115
+ */
116
+ actual;
117
+ constructor(e, s) {
118
+ super(), this.ast = e, this.actual = s;
119
+ }
120
+ }
121
+ class f extends a {
122
+ _tag = "InvalidValue";
123
+ /**
124
+ * The value that caused the issue.
125
+ */
126
+ actual;
127
+ /**
128
+ * The metadata for the issue.
129
+ */
130
+ annotations;
131
+ constructor(e, s) {
132
+ super(), this.actual = e, this.annotations = s;
133
+ }
134
+ }
135
+ class j extends a {
136
+ _tag = "AnyOf";
137
+ /**
138
+ * The schema that caused the issue.
139
+ */
140
+ ast;
141
+ /**
142
+ * The input value that caused the issue.
143
+ */
144
+ actual;
145
+ /**
146
+ * The issues that occurred.
147
+ */
148
+ issues;
149
+ constructor(e, s, n) {
150
+ super(), this.ast = e, this.actual = s, this.issues = n;
151
+ }
152
+ }
153
+ class B extends a {
154
+ _tag = "OneOf";
155
+ /**
156
+ * The schema that caused the issue.
157
+ */
158
+ ast;
159
+ /**
160
+ * The input value that caused the issue.
161
+ */
162
+ actual;
163
+ /**
164
+ * The schemas that were successful.
165
+ */
166
+ successes;
167
+ constructor(e, s, n) {
168
+ super(), this.ast = e, this.actual = s, this.successes = n;
169
+ }
170
+ }
171
+ function G(t, e) {
172
+ if (F(e))
173
+ return e;
174
+ if (e !== void 0)
175
+ return typeof e == "boolean" ? e ? void 0 : new f(d(t)) : typeof e == "string" ? new f(d(t), {
176
+ message: e
177
+ }) : new M(e.path, new f(d(t), {
178
+ message: e.message
179
+ }));
180
+ }
181
+ const y = (t) => {
182
+ const e = o(t);
183
+ if (e !== void 0) return e;
184
+ switch (t._tag) {
185
+ case "InvalidType":
186
+ return p(h(t.ast), m(t.actual));
187
+ case "InvalidValue":
188
+ return `Invalid data ${m(t.actual)}`;
189
+ case "MissingKey":
190
+ return "Missing key";
191
+ case "UnexpectedKey":
192
+ return `Unexpected key with value ${u(t.actual)}`;
193
+ case "Forbidden":
194
+ return "Forbidden operation";
195
+ case "OneOf":
196
+ return `Expected exactly one member to match the input ${u(t.actual)}`;
11
197
  }
12
- flip() {
13
- return new o(this.encode, this.decode);
198
+ }, x = (t) => o(t.issue) ?? o(t);
199
+ function L(t) {
200
+ return (e) => ({
201
+ issues: i(e, [], y, x)
202
+ });
203
+ }
204
+ function p(t, e) {
205
+ return `Expected ${t}, got ${e}`;
206
+ }
207
+ function i(t, e, s, n) {
208
+ switch (t._tag) {
209
+ case "Filter": {
210
+ const r = n(t);
211
+ return r !== void 0 ? [{
212
+ path: e,
213
+ message: r
214
+ }] : t.issue._tag === "InvalidValue" ? [{
215
+ path: e,
216
+ message: p(I(t.filter), u(t.actual))
217
+ }] : i(t.issue, e, s, n);
218
+ }
219
+ case "Encoding":
220
+ return i(t.issue, e, s, n);
221
+ case "Pointer":
222
+ return i(t.issue, [...e, ...t.path], s, n);
223
+ case "Composite":
224
+ return t.issues.flatMap((r) => i(r, e, s, n));
225
+ case "AnyOf": {
226
+ const r = o(t);
227
+ if (t.issues.length === 0) {
228
+ if (r !== void 0) return [{
229
+ path: e,
230
+ message: r
231
+ }];
232
+ const l = p(h(t.ast), u(t.actual));
233
+ return [{
234
+ path: e,
235
+ message: l
236
+ }];
237
+ }
238
+ return t.issues.flatMap((l) => i(l, e, s, n));
239
+ }
240
+ default:
241
+ return [{
242
+ path: e,
243
+ message: s(t)
244
+ }];
245
+ }
246
+ }
247
+ function I(t) {
248
+ const e = t.annotations?.expected;
249
+ if (typeof e == "string") return e;
250
+ switch (t._tag) {
251
+ case "Filter":
252
+ return "<filter>";
253
+ case "FilterGroup":
254
+ return t.checks.map((s) => I(s)).join(" & ");
14
255
  }
15
- compose(r) {
16
- return new o(this.decode.compose(r.decode), r.encode.compose(this.encode));
256
+ }
257
+ function w() {
258
+ return (t) => i(t, [], y, x).map(E).join(`
259
+ `);
260
+ }
261
+ const K = /* @__PURE__ */ w();
262
+ function E(t) {
263
+ let e = t.message;
264
+ if (t.path && t.path.length > 0) {
265
+ const s = _(t.path);
266
+ e += `
267
+ at ${s}`;
268
+ }
269
+ return e;
270
+ }
271
+ function o(t) {
272
+ switch (t._tag) {
273
+ case "InvalidType":
274
+ case "OneOf":
275
+ case "Composite":
276
+ case "AnyOf":
277
+ return c(t.ast.annotations);
278
+ case "InvalidValue":
279
+ case "Forbidden":
280
+ return c(t.annotations);
281
+ case "MissingKey":
282
+ return c(t.annotations, "messageMissingKey");
283
+ case "UnexpectedKey":
284
+ return c(t.ast.annotations, "messageUnexpectedKey");
285
+ case "Filter":
286
+ return c(t.filter.annotations);
287
+ case "Encoding":
288
+ return o(t.issue);
17
289
  }
18
290
  }
19
- function h(e) {
20
- return c(e, n);
291
+ function c(t, e = "message") {
292
+ const s = t?.[e];
293
+ if (typeof s == "string") return s;
21
294
  }
22
- const f = (e) => h(e) ? e : new o(e.decode, e.encode), i = /* @__PURE__ */ new o(/* @__PURE__ */ t(), /* @__PURE__ */ t());
23
- function p() {
24
- return i;
295
+ function m(t) {
296
+ return v(t) ? "no value provided" : u(t.value);
25
297
  }
26
- const g = /* @__PURE__ */ new o(/* @__PURE__ */ d(), /* @__PURE__ */ a());
27
298
  export {
28
- o as Transformation,
29
- h as isTransformation,
30
- f as make,
31
- g as numberFromString,
32
- p as passthrough
299
+ j as AnyOf,
300
+ S as Composite,
301
+ A as Encoding,
302
+ b as Filter,
303
+ D as InvalidType,
304
+ f as InvalidValue,
305
+ P as MissingKey,
306
+ B as OneOf,
307
+ M as Pointer,
308
+ T as UnexpectedKey,
309
+ x as defaultCheckHook,
310
+ K as defaultFormatter,
311
+ y as defaultLeafHook,
312
+ F as isIssue,
313
+ G as make,
314
+ w as makeFormatterDefault,
315
+ L as makeFormatterStandardSchemaV1
33
316
  };
@@ -1,4 +1,33 @@
1
- const o = (a) => a;
1
+ import { hasProperty as c } from "./vue-components.es45.js";
2
+ import { passthrough as t, Number as d, String as a } from "./vue-components.es47.js";
3
+ const n = "~effect/SchemaTransformation/Transformation";
4
+ class o {
5
+ [n] = n;
6
+ _tag = "Transformation";
7
+ decode;
8
+ encode;
9
+ constructor(r, s) {
10
+ this.decode = r, this.encode = s;
11
+ }
12
+ flip() {
13
+ return new o(this.encode, this.decode);
14
+ }
15
+ compose(r) {
16
+ return new o(this.decode.compose(r.decode), r.encode.compose(this.encode));
17
+ }
18
+ }
19
+ function h(e) {
20
+ return c(e, n);
21
+ }
22
+ const f = (e) => h(e) ? e : new o(e.decode, e.encode), i = /* @__PURE__ */ new o(/* @__PURE__ */ t(), /* @__PURE__ */ t());
23
+ function p() {
24
+ return i;
25
+ }
26
+ const g = /* @__PURE__ */ new o(/* @__PURE__ */ d(), /* @__PURE__ */ a());
2
27
  export {
3
- o as lambda
28
+ o as Transformation,
29
+ h as isTransformation,
30
+ f as make,
31
+ g as numberFromString,
32
+ p as passthrough
4
33
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as v, mergeModels as C, useModel as k, useSlots as V, computed as _, resolveComponent as g, createBlock as y, openBlock as B, unref as a, createSlots as E, withCtx as u, renderSlot as d, renderList as M, normalizeProps as S, guardReactiveProps as w } from "vue";
2
2
  import { useOnClose as L } from "./vue-components.es11.js";
3
- import { onMountedWithCleanup as h } from "./vue-components.es35.js";
3
+ import { onMountedWithCleanup as h } from "./vue-components.es16.js";
4
4
  const z = /* @__PURE__ */ v({
5
5
  __name: "Dialog",
6
6
  props: /* @__PURE__ */ C({
@@ -1,4 +1,6 @@
1
- import f from "./vue-components.es24.js";
1
+ import { exitGetSuccess as s, exitIsSuccess as c } from "./vue-components.es43.js";
2
+ const t = c, o = s;
2
3
  export {
3
- f as default
4
+ o as getSuccess,
5
+ t as isSuccess
4
6
  };
@@ -1,4 +1,26 @@
1
- import f from "./vue-components.es25.js";
1
+ import { pipeArguments as s } from "./vue-components.es44.js";
2
+ import { appendChecks as i, annotateKey as m, annotate as o } from "./vue-components.es17.js";
3
+ import { makeUnsafe as c, makeOption as h } from "./vue-components.es53.js";
4
+ const r = "~effect/Schema/Schema", u = {
5
+ [r]: r,
6
+ pipe() {
7
+ return s(this, arguments);
8
+ },
9
+ annotate(t) {
10
+ return this.rebuild(o(this.ast, t));
11
+ },
12
+ annotateKey(t) {
13
+ return this.rebuild(m(this.ast, t));
14
+ },
15
+ check(...t) {
16
+ return this.rebuild(i(this.ast, t));
17
+ }
18
+ };
19
+ function p(t, a) {
20
+ const e = Object.create(u);
21
+ return a && Object.assign(e, a), e.ast = t, e.rebuild = (n) => p(n, a), e.makeUnsafe = c(e), e.makeOption = h(e), e;
22
+ }
2
23
  export {
3
- f as default
24
+ r as TypeId,
25
+ p as make
4
26
  };
@@ -1,113 +1,77 @@
1
- import { defineComponent as _, getCurrentInstance as V, computed as B, createBlock as i, openBlock as e, Transition as x, withCtx as u, createElementBlock as o, createCommentVNode as p, renderSlot as g, normalizeProps as b, guardReactiveProps as I, resolveDynamicComponent as f, unref as d, normalizeClass as v, createElementVNode as n, toDisplayString as a, Fragment as y, renderList as w, createTextVNode as C } from "vue";
2
- import { useIntl as L } from "./vue-components.es3.js";
3
- const M = {
4
- key: 0,
5
- class: "error-alert"
6
- }, j = { class: "container" }, D = {
7
- key: 0,
8
- viewBox: "0 0 24 24",
9
- fill: "none",
10
- xmlns: "http://www.w3.org/2000/svg"
11
- }, N = { class: "text-h6" }, z = {
12
- key: 0,
13
- class: "error-list"
14
- }, G = ["for"], H = { key: 1 }, T = /* @__PURE__ */ _({
15
- __name: "OmegaErrorsInternal",
16
- props: {
17
- generalErrors: {},
18
- errors: {},
19
- hideErrorDetails: { type: Boolean }
20
- },
21
- setup(s) {
22
- const c = V()?.appContext.components.VAlert, h = s, { trans: E } = L(), m = B(() => h.generalErrors ? h.generalErrors.filter((l) => !!l).flatMap(
23
- (l) => Object.values(l).filter((t) => !!t).flatMap(
24
- (t) => t.filter(
25
- (r) => typeof r?.message == "string"
26
- ).map((r) => r.message)
27
- )
28
- ) : []);
29
- return (l, t) => (e(), i(x, null, {
30
- default: u(() => [
31
- s.errors.length || m.value.length ? (e(), o("div", M, [
32
- g(l.$slots, "default", b(I({ errors: s.errors, showedGeneralErrors: m.value })), () => [
33
- (e(), i(f(d(c) ? "v-alert" : "div"), {
34
- class: v([d(c) ? "mb-4" : "error-alert-content", "mb-4"]),
35
- type: "error",
36
- variant: "tonal",
37
- role: "alert",
38
- "aria-live": "polite"
39
- }, {
40
- default: u(() => [
41
- n("div", j, [
42
- g(l.$slots, "icon", {}, () => [
43
- d(c) ? p("", !0) : (e(), o("svg", D, [...t[0] || (t[0] = [
44
- n("path", {
45
- d: "M16 2H8L2 8V16L8 22H16L22 16V8L16 2Z",
46
- stroke: "currentColor",
47
- "stroke-width": "2",
48
- "stroke-linecap": "round",
49
- "stroke-linejoin": "round"
50
- }, null, -1),
51
- n("path", {
52
- d: "M12 8V12",
53
- stroke: "currentColor",
54
- "stroke-width": "2",
55
- "stroke-linecap": "round",
56
- "stroke-linejoin": "round"
57
- }, null, -1),
58
- n("path", {
59
- d: "M12 16.0195V16",
60
- stroke: "currentColor",
61
- "stroke-width": "2",
62
- "stroke-linecap": "round",
63
- "stroke-linejoin": "round"
64
- }, null, -1)
65
- ])]))
66
- ], !0),
67
- n("div", null, [
68
- n("div", N, a(d(E)("form.includes_error")) + ": ", 1),
69
- s.errors.length ? (e(), o("ul", z, [
70
- (e(!0), o(y, null, w(s.errors, (r) => (e(), o("li", {
71
- key: r.inputId,
72
- class: "error-item"
73
- }, [
74
- n("div", null, [
75
- n("label", {
76
- for: r.inputId,
77
- class: "error-link"
78
- }, a(r.label), 9, G),
79
- t[1] || (t[1] = C(" " + a(" ") + " ", -1)),
80
- s.hideErrorDetails ? p("", !0) : (e(), o("div", {
81
- key: 0,
82
- class: v(["error-message", r.errors.length < 2 && "single-error"])
83
- }, [
84
- (e(), i(f(r.errors.length > 1 ? "ul" : "div"), { class: "error-list" }, {
85
- default: u(() => [
86
- (e(!0), o(y, null, w(r.errors, (k) => (e(), i(f(r.errors.length > 1 ? "li" : "span"), { key: k }, {
87
- default: u(() => [
88
- C(a(k), 1)
89
- ]),
90
- _: 2
91
- }, 1024))), 128))
92
- ]),
93
- _: 2
94
- }, 1024))
95
- ], 2))
96
- ])
97
- ]))), 128))
98
- ])) : (e(), o("span", H, a(m.value[0]), 1))
99
- ])
100
- ])
101
- ]),
102
- _: 3
103
- }, 8, ["class"]))
104
- ], !0)
105
- ])) : p("", !0)
106
- ]),
107
- _: 3
108
- }));
1
+ import { Reference as l } from "./vue-components.es69.js";
2
+ const o = /* @__PURE__ */ l("effect/Scheduler", {
3
+ defaultValue: () => new h()
4
+ }), d = "setImmediate" in globalThis ? (u) => {
5
+ const e = globalThis.setImmediate(u);
6
+ return () => globalThis.clearImmediate(e);
7
+ } : (u) => {
8
+ const e = setTimeout(u, 0);
9
+ return () => clearTimeout(e);
10
+ };
11
+ class r {
12
+ buckets = [];
13
+ scheduleTask(e, t) {
14
+ const s = this.buckets, n = s.length;
15
+ let c, i = 0;
16
+ for (; i < n && !(s[i][0] > t); i++)
17
+ c = s[i];
18
+ c && c[0] === t ? c[1].push(e) : i === n ? s.push([t, [e]]) : s.splice(i, 0, [t, [e]]);
19
+ }
20
+ drain() {
21
+ const e = this.buckets;
22
+ return this.buckets = [], e;
23
+ }
24
+ }
25
+ class h {
26
+ tasks = /* @__PURE__ */ new r();
27
+ running = void 0;
28
+ executionMode;
29
+ setImmediate;
30
+ constructor(e = "async", t = d) {
31
+ this.executionMode = e, this.setImmediate = t;
32
+ }
33
+ /**
34
+ * @since 2.0.0
35
+ */
36
+ scheduleTask(e, t) {
37
+ this.tasks.scheduleTask(e, t), this.running === void 0 && (this.running = this.setImmediate(this.afterScheduled));
38
+ }
39
+ /**
40
+ * @since 2.0.0
41
+ */
42
+ afterScheduled = () => {
43
+ this.running = void 0, this.runTasks();
44
+ };
45
+ /**
46
+ * @since 2.0.0
47
+ */
48
+ runTasks() {
49
+ const e = this.tasks.drain();
50
+ for (let t = 0; t < e.length; t++) {
51
+ const s = e[t][1];
52
+ for (let n = 0; n < s.length; n++)
53
+ s[n]();
54
+ }
55
+ }
56
+ /**
57
+ * @since 2.0.0
58
+ */
59
+ shouldYield(e) {
60
+ return e.currentOpCount >= e.maxOpsBeforeYield;
61
+ }
62
+ /**
63
+ * @since 2.0.0
64
+ */
65
+ flush() {
66
+ for (; this.tasks.buckets.length > 0; )
67
+ this.running !== void 0 && (this.running(), this.running = void 0), this.runTasks();
109
68
  }
69
+ }
70
+ const f = /* @__PURE__ */ l("effect/Scheduler/MaxOpsBeforeYield", {
71
+ defaultValue: () => 2048
110
72
  });
111
73
  export {
112
- T as default
74
+ f as MaxOpsBeforeYield,
75
+ h as MixedScheduler,
76
+ o as Scheduler
113
77
  };