@oomol-lab/open-flow 0.1.0-beta.16 → 0.1.0-beta.18
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/dist/browser/{createResourceDialog-DRUIXBbz.js → createResourceDialog-DlrAMxmo.js} +2 -2
- package/dist/browser/flow-authoring.js +1464 -1463
- package/dist/browser/flow-change.js +1 -0
- package/dist/browser/{flowChanges-iuoam3Bx.js → flowChanges-DR6bsnz-.js} +1745 -1484
- package/dist/browser/{flowWorkspace-B0UAQ-s7.js → flowWorkspace-fsNhVe8S.js} +32429 -29399
- package/dist/browser/{i18n-JtW9O5x3.js → i18n-9ypjMjOo.js} +167 -27
- package/dist/browser/{inputValues-DICmJoN-.js → inputValues-MIPdGucY.js} +2 -2
- package/dist/browser/licenses.md +48 -0
- package/dist/browser/{markdownContent-tWc7bRAs.js → markdownContent-BBgH9ZIV.js} +13 -13
- package/dist/browser/theme.css +9 -9
- package/dist/browser/ui.css +1 -1
- package/dist/browser/ui.d.ts +9 -0
- package/dist/browser/ui.js +1219 -1022
- package/dist/browser/{useValueChanged-DSookOEC.js → useValueChanged-BY05Usw-.js} +3 -3
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +931 -629
- package/dist/browser/{workbenchSelect-DgxXqCAa.js → workbenchSelect-CwP6rphY.js} +4 -3
- package/dist/common/control-api-conformance.js +389 -394
- package/dist/common/control-api-errors.d.ts +5 -0
- package/dist/common/control-api.d.ts +1 -6
- package/dist/common/control-api.js +1019 -1003
- package/dist/common/control-requests.js +1 -0
- package/dist/common/engine-contract.d.ts +2 -0
- package/dist/common/flow-encoding.js +1 -0
- package/dist/common/flow-semantics.js +2802 -2767
- package/dist/common/integration-trigger.d.ts +23 -1
- package/dist/common/integration-trigger.js +188 -52
- package/dist/common/mcp.js +409 -391
- package/dist/common/provider-triggers.js +890 -842
- package/dist/common/runtime-contract.d.ts +2 -1
- package/dist/common/runtime-contract.js +99 -28
- package/dist/common/scheduler.js +1255 -1254
- package/package.json +1 -1
package/dist/common/scheduler.js
CHANGED
|
@@ -3519,55 +3519,55 @@ var D = /*@__PURE__*/ x("ZodType", (e, t) => (Co(), C.init(e, t), e.def = t, e.t
|
|
|
3519
3519
|
return e.add(this, t), this;
|
|
3520
3520
|
},
|
|
3521
3521
|
refine(e, t) {
|
|
3522
|
-
return this.check(
|
|
3522
|
+
return this.check(Vs(e, t));
|
|
3523
3523
|
},
|
|
3524
3524
|
superRefine(e, t) {
|
|
3525
|
-
return this.check(
|
|
3525
|
+
return this.check(Hs(e, t));
|
|
3526
3526
|
},
|
|
3527
3527
|
overwrite(e) {
|
|
3528
3528
|
return this.check(/* @__PURE__ */ oa(e));
|
|
3529
3529
|
},
|
|
3530
3530
|
optional() {
|
|
3531
|
-
return
|
|
3531
|
+
return xs(this);
|
|
3532
3532
|
},
|
|
3533
3533
|
exactOptional() {
|
|
3534
|
-
return
|
|
3534
|
+
return Cs(this);
|
|
3535
3535
|
},
|
|
3536
3536
|
nullable() {
|
|
3537
|
-
return
|
|
3537
|
+
return Ts(this);
|
|
3538
3538
|
},
|
|
3539
3539
|
nullish() {
|
|
3540
|
-
return
|
|
3540
|
+
return xs(Ts(this));
|
|
3541
3541
|
},
|
|
3542
3542
|
nonoptional(e) {
|
|
3543
|
-
return
|
|
3543
|
+
return js(this, e);
|
|
3544
3544
|
},
|
|
3545
3545
|
array() {
|
|
3546
|
-
return
|
|
3546
|
+
return j(this);
|
|
3547
3547
|
},
|
|
3548
3548
|
or(e) {
|
|
3549
|
-
return
|
|
3549
|
+
return N([this, e]);
|
|
3550
3550
|
},
|
|
3551
3551
|
and(e) {
|
|
3552
|
-
return
|
|
3552
|
+
return fs(this, e);
|
|
3553
3553
|
},
|
|
3554
3554
|
transform(e) {
|
|
3555
|
-
return
|
|
3555
|
+
return Fs(this, ys(e));
|
|
3556
3556
|
},
|
|
3557
3557
|
default(e) {
|
|
3558
|
-
return
|
|
3558
|
+
return Ds(this, e);
|
|
3559
3559
|
},
|
|
3560
3560
|
prefault(e) {
|
|
3561
|
-
return
|
|
3561
|
+
return ks(this, e);
|
|
3562
3562
|
},
|
|
3563
3563
|
catch(e) {
|
|
3564
|
-
return
|
|
3564
|
+
return Ns(this, e);
|
|
3565
3565
|
},
|
|
3566
3566
|
pipe(e) {
|
|
3567
|
-
return
|
|
3567
|
+
return Fs(this, e);
|
|
3568
3568
|
},
|
|
3569
3569
|
readonly() {
|
|
3570
|
-
return
|
|
3570
|
+
return Ls(this);
|
|
3571
3571
|
},
|
|
3572
3572
|
describe(e) {
|
|
3573
3573
|
let t = this.clone();
|
|
@@ -3896,28 +3896,28 @@ function Qo(e) {
|
|
|
3896
3896
|
var $o = /*@__PURE__*/ x("ZodBoolean", (e, t) => {
|
|
3897
3897
|
ar.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => Na(e, t, n, r);
|
|
3898
3898
|
});
|
|
3899
|
-
function
|
|
3899
|
+
function es(e) {
|
|
3900
3900
|
return /* @__PURE__ */ Hi($o, e);
|
|
3901
3901
|
}
|
|
3902
|
-
var
|
|
3902
|
+
var ts = /*@__PURE__*/ x("ZodNull", (e, t) => {
|
|
3903
3903
|
or.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => Pa(e, t, n, r);
|
|
3904
3904
|
});
|
|
3905
|
-
function
|
|
3906
|
-
return /* @__PURE__ */ Ui(
|
|
3905
|
+
function ns(e) {
|
|
3906
|
+
return /* @__PURE__ */ Ui(ts, e);
|
|
3907
3907
|
}
|
|
3908
|
-
var
|
|
3908
|
+
var rs = /*@__PURE__*/ x("ZodUnknown", (e, t) => {
|
|
3909
3909
|
sr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
3910
3910
|
});
|
|
3911
|
-
function
|
|
3912
|
-
return /* @__PURE__ */ Wi(
|
|
3911
|
+
function is() {
|
|
3912
|
+
return /* @__PURE__ */ Wi(rs);
|
|
3913
3913
|
}
|
|
3914
|
-
var
|
|
3914
|
+
var as = /*@__PURE__*/ x("ZodNever", (e, t) => {
|
|
3915
3915
|
cr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => Fa(e, t, n, r);
|
|
3916
3916
|
});
|
|
3917
|
-
function
|
|
3918
|
-
return /* @__PURE__ */ Gi(
|
|
3917
|
+
function os(e) {
|
|
3918
|
+
return /* @__PURE__ */ Gi(as, e);
|
|
3919
3919
|
}
|
|
3920
|
-
var
|
|
3920
|
+
var ss = /*@__PURE__*/ x("ZodArray", (e, t) => {
|
|
3921
3921
|
wo(), ur.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ba(e, t, n, r), e.element = t.element;
|
|
3922
3922
|
}, {
|
|
3923
3923
|
min(e, t) {
|
|
@@ -3936,14 +3936,14 @@ var os = /*@__PURE__*/ x("ZodArray", (e, t) => {
|
|
|
3936
3936
|
return this.element;
|
|
3937
3937
|
}
|
|
3938
3938
|
});
|
|
3939
|
-
function
|
|
3940
|
-
return /* @__PURE__ */ fa(
|
|
3939
|
+
function j(e, t) {
|
|
3940
|
+
return /* @__PURE__ */ fa(ss, e, t);
|
|
3941
3941
|
}
|
|
3942
|
-
var
|
|
3942
|
+
var cs = /*@__PURE__*/ x("ZodObject", (e, t) => {
|
|
3943
3943
|
wo(), _r.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ha(e, t, n, r), Ie(e, "shape", (e) => e._zod.def.shape, !1);
|
|
3944
3944
|
}, {
|
|
3945
3945
|
keyof() {
|
|
3946
|
-
return
|
|
3946
|
+
return F(Object.keys(this._zod.def.shape));
|
|
3947
3947
|
},
|
|
3948
3948
|
catchall(e) {
|
|
3949
3949
|
return this.clone({
|
|
@@ -3954,19 +3954,19 @@ var ss = /*@__PURE__*/ x("ZodObject", (e, t) => {
|
|
|
3954
3954
|
passthrough() {
|
|
3955
3955
|
return this.clone({
|
|
3956
3956
|
...this._zod.def,
|
|
3957
|
-
catchall:
|
|
3957
|
+
catchall: is()
|
|
3958
3958
|
});
|
|
3959
3959
|
},
|
|
3960
3960
|
loose() {
|
|
3961
3961
|
return this.clone({
|
|
3962
3962
|
...this._zod.def,
|
|
3963
|
-
catchall:
|
|
3963
|
+
catchall: is()
|
|
3964
3964
|
});
|
|
3965
3965
|
},
|
|
3966
3966
|
strict() {
|
|
3967
3967
|
return this.clone({
|
|
3968
3968
|
...this._zod.def,
|
|
3969
|
-
catchall:
|
|
3969
|
+
catchall: os()
|
|
3970
3970
|
});
|
|
3971
3971
|
},
|
|
3972
3972
|
strip() {
|
|
@@ -3991,51 +3991,51 @@ var ss = /*@__PURE__*/ x("ZodObject", (e, t) => {
|
|
|
3991
3991
|
return fe(this, e);
|
|
3992
3992
|
},
|
|
3993
3993
|
partial(...e) {
|
|
3994
|
-
return ge(
|
|
3994
|
+
return ge(bs, this, e[0]);
|
|
3995
3995
|
},
|
|
3996
3996
|
exactPartial(...e) {
|
|
3997
|
-
return ge(
|
|
3997
|
+
return ge(Ss, this, e[0], "exactPartial");
|
|
3998
3998
|
},
|
|
3999
3999
|
required(...e) {
|
|
4000
|
-
return _e(
|
|
4000
|
+
return _e(As, this, e[0]);
|
|
4001
4001
|
}
|
|
4002
4002
|
});
|
|
4003
|
-
function
|
|
4004
|
-
return new
|
|
4003
|
+
function M(e, t) {
|
|
4004
|
+
return new cs({
|
|
4005
4005
|
type: "object",
|
|
4006
4006
|
shape: e ?? {},
|
|
4007
4007
|
...v(t)
|
|
4008
4008
|
});
|
|
4009
4009
|
}
|
|
4010
|
-
function
|
|
4011
|
-
return new
|
|
4010
|
+
function ls(e, t) {
|
|
4011
|
+
return new cs({
|
|
4012
4012
|
type: "object",
|
|
4013
4013
|
shape: e,
|
|
4014
|
-
catchall:
|
|
4014
|
+
catchall: os(),
|
|
4015
4015
|
...v(t)
|
|
4016
4016
|
});
|
|
4017
4017
|
}
|
|
4018
|
-
var
|
|
4018
|
+
var us = /*@__PURE__*/ x("ZodUnion", (e, t) => {
|
|
4019
4019
|
yr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), e.options = t.options;
|
|
4020
4020
|
});
|
|
4021
|
-
function
|
|
4022
|
-
return new
|
|
4021
|
+
function N(e, t) {
|
|
4022
|
+
return new us({
|
|
4023
4023
|
type: "union",
|
|
4024
4024
|
options: e,
|
|
4025
4025
|
...v(t)
|
|
4026
4026
|
});
|
|
4027
4027
|
}
|
|
4028
|
-
var
|
|
4028
|
+
var ds = /*@__PURE__*/ x("ZodIntersection", (e, t) => {
|
|
4029
4029
|
br.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r);
|
|
4030
4030
|
});
|
|
4031
|
-
function
|
|
4032
|
-
return new
|
|
4031
|
+
function fs(e, t) {
|
|
4032
|
+
return new ds({
|
|
4033
4033
|
type: "intersection",
|
|
4034
4034
|
left: e,
|
|
4035
4035
|
right: t
|
|
4036
4036
|
});
|
|
4037
4037
|
}
|
|
4038
|
-
var
|
|
4038
|
+
var ps = /*@__PURE__*/ x("ZodTuple", (e, t) => {
|
|
4039
4039
|
wo(), Cr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ga(e, t, n, r);
|
|
4040
4040
|
}, {
|
|
4041
4041
|
rest(e) {
|
|
@@ -4049,46 +4049,46 @@ var fs = /*@__PURE__*/ x("ZodTuple", (e, t) => {
|
|
|
4049
4049
|
if (e.checks?.length) throw Error(".partial() cannot be used on tuple schemas containing refinements");
|
|
4050
4050
|
return this.clone({
|
|
4051
4051
|
...e,
|
|
4052
|
-
items: e.items.map((e) => new
|
|
4052
|
+
items: e.items.map((e) => new bs({
|
|
4053
4053
|
type: "optional",
|
|
4054
4054
|
innerType: e
|
|
4055
4055
|
}))
|
|
4056
4056
|
});
|
|
4057
4057
|
}
|
|
4058
4058
|
});
|
|
4059
|
-
function
|
|
4059
|
+
function ms(e, t, n) {
|
|
4060
4060
|
let r = t instanceof C;
|
|
4061
|
-
return new
|
|
4061
|
+
return new ps({
|
|
4062
4062
|
type: "tuple",
|
|
4063
4063
|
items: e,
|
|
4064
4064
|
rest: r ? t : null,
|
|
4065
4065
|
...v(r ? n : t)
|
|
4066
4066
|
});
|
|
4067
4067
|
}
|
|
4068
|
-
var
|
|
4068
|
+
var hs = /*@__PURE__*/ x("ZodRecord", (e, t) => {
|
|
4069
4069
|
wo(), Dr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ya(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
4070
4070
|
});
|
|
4071
|
-
function
|
|
4072
|
-
return !t || !t._zod ? new
|
|
4071
|
+
function P(e, t, n) {
|
|
4072
|
+
return !t || !t._zod ? new hs({
|
|
4073
4073
|
type: "record",
|
|
4074
4074
|
keyType: O(),
|
|
4075
4075
|
valueType: e,
|
|
4076
4076
|
...v(t)
|
|
4077
|
-
}) : new
|
|
4077
|
+
}) : new hs({
|
|
4078
4078
|
type: "record",
|
|
4079
4079
|
keyType: e,
|
|
4080
4080
|
valueType: t,
|
|
4081
4081
|
...v(n)
|
|
4082
4082
|
});
|
|
4083
4083
|
}
|
|
4084
|
-
var
|
|
4084
|
+
var gs = /*@__PURE__*/ x("ZodEnum", (e, t) => {
|
|
4085
4085
|
Or.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ia(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
4086
4086
|
let n = new Set(Object.keys(t.entries));
|
|
4087
4087
|
e.extract = (e, r) => {
|
|
4088
4088
|
let i = {};
|
|
4089
4089
|
for (let r of e) if (n.has(r)) i[r] = t.entries[r];
|
|
4090
4090
|
else throw Error(`Key ${r} not found in enum`);
|
|
4091
|
-
return new
|
|
4091
|
+
return new gs({
|
|
4092
4092
|
...t,
|
|
4093
4093
|
checks: [],
|
|
4094
4094
|
...v(r),
|
|
@@ -4098,7 +4098,7 @@ var hs = /*@__PURE__*/ x("ZodEnum", (e, t) => {
|
|
|
4098
4098
|
let i = { ...t.entries };
|
|
4099
4099
|
for (let t of e) if (n.has(t)) delete i[t];
|
|
4100
4100
|
else throw Error(`Key ${t} not found in enum`);
|
|
4101
|
-
return new
|
|
4101
|
+
return new gs({
|
|
4102
4102
|
...t,
|
|
4103
4103
|
checks: [],
|
|
4104
4104
|
...v(r),
|
|
@@ -4106,27 +4106,27 @@ var hs = /*@__PURE__*/ x("ZodEnum", (e, t) => {
|
|
|
4106
4106
|
});
|
|
4107
4107
|
};
|
|
4108
4108
|
});
|
|
4109
|
-
function
|
|
4110
|
-
return new
|
|
4109
|
+
function F(e, t) {
|
|
4110
|
+
return new gs({
|
|
4111
4111
|
type: "enum",
|
|
4112
4112
|
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
4113
4113
|
...v(t)
|
|
4114
4114
|
});
|
|
4115
4115
|
}
|
|
4116
|
-
var
|
|
4116
|
+
var _s = /*@__PURE__*/ x("ZodLiteral", (e, t) => {
|
|
4117
4117
|
kr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => La(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
4118
4118
|
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
4119
4119
|
return t.values[0];
|
|
4120
4120
|
} });
|
|
4121
4121
|
});
|
|
4122
|
-
function
|
|
4123
|
-
return new
|
|
4122
|
+
function I(e, t) {
|
|
4123
|
+
return new _s({
|
|
4124
4124
|
type: "literal",
|
|
4125
4125
|
values: Array.isArray(e) ? e : [e],
|
|
4126
4126
|
...v(t)
|
|
4127
4127
|
});
|
|
4128
4128
|
}
|
|
4129
|
-
var
|
|
4129
|
+
var vs = /*@__PURE__*/ x("ZodTransform", (e, t) => {
|
|
4130
4130
|
wo(), Ar.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => za(e, t, n, r), e._zod.parse = (n, r) => {
|
|
4131
4131
|
if (r.direction === "backward") throw new We(e.constructor.name);
|
|
4132
4132
|
n.addIssue = (r) => {
|
|
@@ -4140,44 +4140,44 @@ var _s = /*@__PURE__*/ x("ZodTransform", (e, t) => {
|
|
|
4140
4140
|
return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
|
|
4141
4141
|
};
|
|
4142
4142
|
});
|
|
4143
|
-
function
|
|
4144
|
-
return new
|
|
4143
|
+
function ys(e) {
|
|
4144
|
+
return new vs({
|
|
4145
4145
|
type: "transform",
|
|
4146
4146
|
transform: e
|
|
4147
4147
|
});
|
|
4148
4148
|
}
|
|
4149
|
-
var
|
|
4149
|
+
var bs = /*@__PURE__*/ x("ZodOptional", (e, t) => {
|
|
4150
4150
|
Mr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => ao(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4151
4151
|
});
|
|
4152
|
-
function
|
|
4153
|
-
return new
|
|
4152
|
+
function xs(e) {
|
|
4153
|
+
return new bs({
|
|
4154
4154
|
type: "optional",
|
|
4155
4155
|
innerType: e
|
|
4156
4156
|
});
|
|
4157
4157
|
}
|
|
4158
|
-
var
|
|
4158
|
+
var Ss = /*@__PURE__*/ x("ZodExactOptional", (e, t) => {
|
|
4159
4159
|
Nr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => ao(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4160
4160
|
});
|
|
4161
|
-
function
|
|
4162
|
-
return new
|
|
4161
|
+
function Cs(e) {
|
|
4162
|
+
return new Ss({
|
|
4163
4163
|
type: "optional",
|
|
4164
4164
|
innerType: e
|
|
4165
4165
|
});
|
|
4166
4166
|
}
|
|
4167
|
-
var
|
|
4167
|
+
var ws = /*@__PURE__*/ x("ZodNullable", (e, t) => {
|
|
4168
4168
|
Pr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4169
4169
|
});
|
|
4170
|
-
function
|
|
4171
|
-
return new
|
|
4170
|
+
function Ts(e) {
|
|
4171
|
+
return new ws({
|
|
4172
4172
|
type: "nullable",
|
|
4173
4173
|
innerType: e
|
|
4174
4174
|
});
|
|
4175
4175
|
}
|
|
4176
|
-
var
|
|
4176
|
+
var Es = /*@__PURE__*/ x("ZodDefault", (e, t) => {
|
|
4177
4177
|
Fr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => eo(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
4178
4178
|
});
|
|
4179
|
-
function
|
|
4180
|
-
return new
|
|
4179
|
+
function Ds(e, t) {
|
|
4180
|
+
return new Es({
|
|
4181
4181
|
type: "default",
|
|
4182
4182
|
innerType: e,
|
|
4183
4183
|
get defaultValue() {
|
|
@@ -4185,11 +4185,11 @@ function Es(e, t) {
|
|
|
4185
4185
|
}
|
|
4186
4186
|
});
|
|
4187
4187
|
}
|
|
4188
|
-
var
|
|
4188
|
+
var Os = /*@__PURE__*/ x("ZodPrefault", (e, t) => {
|
|
4189
4189
|
Lr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => to(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4190
4190
|
});
|
|
4191
|
-
function
|
|
4192
|
-
return new
|
|
4191
|
+
function ks(e, t) {
|
|
4192
|
+
return new Os({
|
|
4193
4193
|
type: "prefault",
|
|
4194
4194
|
innerType: e,
|
|
4195
4195
|
get defaultValue() {
|
|
@@ -4197,118 +4197,118 @@ function Os(e, t) {
|
|
|
4197
4197
|
}
|
|
4198
4198
|
});
|
|
4199
4199
|
}
|
|
4200
|
-
var
|
|
4200
|
+
var As = /*@__PURE__*/ x("ZodNonOptional", (e, t) => {
|
|
4201
4201
|
Rr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => Za(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4202
4202
|
});
|
|
4203
|
-
function
|
|
4204
|
-
return new
|
|
4203
|
+
function js(e, t) {
|
|
4204
|
+
return new As({
|
|
4205
4205
|
type: "nonoptional",
|
|
4206
4206
|
innerType: e,
|
|
4207
4207
|
...v(t)
|
|
4208
4208
|
});
|
|
4209
4209
|
}
|
|
4210
|
-
var
|
|
4210
|
+
var Ms = /*@__PURE__*/ x("ZodCatch", (e, t) => {
|
|
4211
4211
|
Vr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => no(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
4212
4212
|
});
|
|
4213
|
-
function
|
|
4214
|
-
return new
|
|
4213
|
+
function Ns(e, t) {
|
|
4214
|
+
return new Ms({
|
|
4215
4215
|
type: "catch",
|
|
4216
4216
|
innerType: e,
|
|
4217
4217
|
catchValue: typeof t == "function" ? t : Re(t)
|
|
4218
4218
|
});
|
|
4219
4219
|
}
|
|
4220
|
-
var
|
|
4220
|
+
var Ps = /*@__PURE__*/ x("ZodPipe", (e, t) => {
|
|
4221
4221
|
Hr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => ro(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
4222
4222
|
});
|
|
4223
|
-
function
|
|
4224
|
-
return new
|
|
4223
|
+
function Fs(e, t) {
|
|
4224
|
+
return new Ps({
|
|
4225
4225
|
type: "pipe",
|
|
4226
4226
|
in: e,
|
|
4227
4227
|
out: t
|
|
4228
4228
|
});
|
|
4229
4229
|
}
|
|
4230
|
-
var
|
|
4230
|
+
var Is = /*@__PURE__*/ x("ZodReadonly", (e, t) => {
|
|
4231
4231
|
Wr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => io(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4232
4232
|
});
|
|
4233
|
-
function
|
|
4234
|
-
return new
|
|
4233
|
+
function Ls(e) {
|
|
4234
|
+
return new Is({
|
|
4235
4235
|
type: "readonly",
|
|
4236
4236
|
innerType: e
|
|
4237
4237
|
});
|
|
4238
4238
|
}
|
|
4239
|
-
var
|
|
4239
|
+
var Rs = /*@__PURE__*/ x("ZodLazy", (e, t) => {
|
|
4240
4240
|
Kr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => oo(e, t, n, r), e.unwrap = () => e._zod.def.getter();
|
|
4241
4241
|
});
|
|
4242
|
-
function
|
|
4243
|
-
return new
|
|
4242
|
+
function zs(e) {
|
|
4243
|
+
return new Rs({
|
|
4244
4244
|
type: "lazy",
|
|
4245
4245
|
getter: e
|
|
4246
4246
|
});
|
|
4247
4247
|
}
|
|
4248
|
-
var
|
|
4248
|
+
var Bs = /*@__PURE__*/ x("ZodCustom", (e, t) => {
|
|
4249
4249
|
qr.init(e, t), D.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ra(e, t, n, r);
|
|
4250
4250
|
});
|
|
4251
|
-
function
|
|
4252
|
-
return /* @__PURE__ */ pa(
|
|
4251
|
+
function Vs(e, t = {}) {
|
|
4252
|
+
return /* @__PURE__ */ pa(Bs, e, t);
|
|
4253
4253
|
}
|
|
4254
|
-
function
|
|
4254
|
+
function Hs(e, t) {
|
|
4255
4255
|
return /* @__PURE__ */ ma(e, t);
|
|
4256
4256
|
}
|
|
4257
|
-
function
|
|
4258
|
-
let t =
|
|
4257
|
+
function Us(e) {
|
|
4258
|
+
let t = zs(() => N([
|
|
4259
4259
|
O(e),
|
|
4260
4260
|
A(),
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4261
|
+
es(),
|
|
4262
|
+
ns(),
|
|
4263
|
+
j(t),
|
|
4264
|
+
P(O(), t)
|
|
4265
4265
|
]));
|
|
4266
4266
|
return t;
|
|
4267
4267
|
}
|
|
4268
4268
|
//#endregion
|
|
4269
4269
|
//#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js
|
|
4270
|
-
function
|
|
4270
|
+
function Ws(e, t) {
|
|
4271
4271
|
let n = typeof e;
|
|
4272
4272
|
if (n !== typeof t) return !1;
|
|
4273
4273
|
if (Array.isArray(e)) {
|
|
4274
4274
|
if (!Array.isArray(t)) return !1;
|
|
4275
4275
|
let n = e.length;
|
|
4276
4276
|
if (n !== t.length) return !1;
|
|
4277
|
-
for (let r = 0; r < n; r++) if (!
|
|
4277
|
+
for (let r = 0; r < n; r++) if (!Ws(e[r], t[r])) return !1;
|
|
4278
4278
|
return !0;
|
|
4279
4279
|
}
|
|
4280
4280
|
if (n === "object") {
|
|
4281
4281
|
if (!e || !t) return e === t;
|
|
4282
4282
|
let n = Object.keys(e), r = Object.keys(t);
|
|
4283
4283
|
if (n.length !== r.length) return !1;
|
|
4284
|
-
for (let r of n) if (!
|
|
4284
|
+
for (let r of n) if (!Ws(e[r], t[r])) return !1;
|
|
4285
4285
|
return !0;
|
|
4286
4286
|
}
|
|
4287
4287
|
return e === t;
|
|
4288
4288
|
}
|
|
4289
4289
|
//#endregion
|
|
4290
4290
|
//#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/pointer.js
|
|
4291
|
-
function Ws(e) {
|
|
4292
|
-
return encodeURI(Gs(e));
|
|
4293
|
-
}
|
|
4294
4291
|
function Gs(e) {
|
|
4292
|
+
return encodeURI(Ks(e));
|
|
4293
|
+
}
|
|
4294
|
+
function Ks(e) {
|
|
4295
4295
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
4296
4296
|
}
|
|
4297
4297
|
//#endregion
|
|
4298
4298
|
//#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/dereference.js
|
|
4299
|
-
var
|
|
4299
|
+
var qs = {
|
|
4300
4300
|
prefixItems: !0,
|
|
4301
4301
|
items: !0,
|
|
4302
4302
|
allOf: !0,
|
|
4303
4303
|
anyOf: !0,
|
|
4304
4304
|
oneOf: !0
|
|
4305
|
-
},
|
|
4305
|
+
}, Js = {
|
|
4306
4306
|
$defs: !0,
|
|
4307
4307
|
definitions: !0,
|
|
4308
4308
|
properties: !0,
|
|
4309
4309
|
patternProperties: !0,
|
|
4310
4310
|
dependentSchemas: !0
|
|
4311
|
-
},
|
|
4311
|
+
}, Ys = {
|
|
4312
4312
|
id: !0,
|
|
4313
4313
|
$id: !0,
|
|
4314
4314
|
$ref: !0,
|
|
@@ -4335,13 +4335,13 @@ var Ks = {
|
|
|
4335
4335
|
uniqueItems: !0,
|
|
4336
4336
|
maxProperties: !0,
|
|
4337
4337
|
minProperties: !0
|
|
4338
|
-
},
|
|
4339
|
-
function
|
|
4338
|
+
}, Xs = typeof self < "u" && self.location && self.location.origin !== "null" ? new URL(self.location.origin + self.location.pathname + location.search) : new URL("https://github.com/cfworker");
|
|
4339
|
+
function Zs(e, t = Object.create(null), n = Xs, r = "") {
|
|
4340
4340
|
if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
4341
4341
|
let i = e.$id || e.id;
|
|
4342
4342
|
if (i) {
|
|
4343
4343
|
let a = new URL(i, n.href);
|
|
4344
|
-
a.hash.length > 1 ? t[a.href] = e : (a.hash = "", r === "" ? n = a :
|
|
4344
|
+
a.hash.length > 1 ? t[a.href] = e : (a.hash = "", r === "" ? n = a : Zs(e, t, n));
|
|
4345
4345
|
}
|
|
4346
4346
|
} else if (e !== !0 && e !== !1) return t;
|
|
4347
4347
|
let i = n.href + (r ? "#" + r : "");
|
|
@@ -4369,21 +4369,21 @@ function Xs(e, t = Object.create(null), n = Ys, r = "") {
|
|
|
4369
4369
|
t[r.href] = e;
|
|
4370
4370
|
}
|
|
4371
4371
|
for (let i in e) {
|
|
4372
|
-
if (
|
|
4373
|
-
let a = `${r}/${
|
|
4372
|
+
if (Ys[i]) continue;
|
|
4373
|
+
let a = `${r}/${Gs(i)}`, o = e[i];
|
|
4374
4374
|
if (Array.isArray(o)) {
|
|
4375
|
-
if (
|
|
4375
|
+
if (qs[i]) {
|
|
4376
4376
|
let e = o.length;
|
|
4377
|
-
for (let r = 0; r < e; r++)
|
|
4377
|
+
for (let r = 0; r < e; r++) Zs(o[r], t, n, `${a}/${r}`);
|
|
4378
4378
|
}
|
|
4379
|
-
} else if (
|
|
4380
|
-
else
|
|
4379
|
+
} else if (Js[i]) for (let e in o) Zs(o[e], t, n, `${a}/${Gs(e)}`);
|
|
4380
|
+
else Zs(o, t, n, a);
|
|
4381
4381
|
}
|
|
4382
4382
|
return t;
|
|
4383
4383
|
}
|
|
4384
4384
|
//#endregion
|
|
4385
4385
|
//#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/format.js
|
|
4386
|
-
var
|
|
4386
|
+
var Qs = /^(\d\d\d\d)-(\d\d)-(\d\d)$/, $s = [
|
|
4387
4387
|
0,
|
|
4388
4388
|
31,
|
|
4389
4389
|
28,
|
|
@@ -4397,60 +4397,60 @@ var Zs = /^(\d\d\d\d)-(\d\d)-(\d\d)$/, Qs = [
|
|
|
4397
4397
|
31,
|
|
4398
4398
|
30,
|
|
4399
4399
|
31
|
|
4400
|
-
],
|
|
4400
|
+
], ec = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i, tc = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, nc = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, rc = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i, ic = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu, ac = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, oc = /^(?:\/(?:[^~/]|~0|~1)*)*$/, sc = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, cc = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/, lc = (e) => {
|
|
4401
4401
|
if (e[0] === "\"") return !1;
|
|
4402
4402
|
let [t, n, ...r] = e.split("@");
|
|
4403
4403
|
return !t || !n || r.length !== 0 || t.length > 64 || n.length > 253 || t[0] === "." || t.endsWith(".") || t.includes("..") || !/^[a-z0-9.-]+$/i.test(n) || !/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t) ? !1 : n.split(".").every((e) => /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e));
|
|
4404
|
-
},
|
|
4405
|
-
function
|
|
4404
|
+
}, uc = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, dc = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i, fc = (e) => e.length > 1 && e.length < 80 && (/^P\d+([.,]\d+)?W$/.test(e) || /^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e) && /^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));
|
|
4405
|
+
function pc(e) {
|
|
4406
4406
|
return e.test.bind(e);
|
|
4407
4407
|
}
|
|
4408
|
-
var
|
|
4409
|
-
date:
|
|
4410
|
-
time:
|
|
4411
|
-
"date-time":
|
|
4412
|
-
duration:
|
|
4413
|
-
uri:
|
|
4414
|
-
"uri-reference":
|
|
4415
|
-
"uri-template":
|
|
4416
|
-
url:
|
|
4417
|
-
email:
|
|
4418
|
-
hostname:
|
|
4419
|
-
ipv4:
|
|
4420
|
-
ipv6:
|
|
4421
|
-
regex:
|
|
4422
|
-
uuid:
|
|
4423
|
-
"json-pointer":
|
|
4424
|
-
"json-pointer-uri-fragment":
|
|
4425
|
-
"relative-json-pointer":
|
|
4408
|
+
var mc = {
|
|
4409
|
+
date: gc,
|
|
4410
|
+
time: _c.bind(void 0, !1),
|
|
4411
|
+
"date-time": yc,
|
|
4412
|
+
duration: fc,
|
|
4413
|
+
uri: Sc,
|
|
4414
|
+
"uri-reference": pc(nc),
|
|
4415
|
+
"uri-template": pc(rc),
|
|
4416
|
+
url: pc(ic),
|
|
4417
|
+
email: lc,
|
|
4418
|
+
hostname: pc(tc),
|
|
4419
|
+
ipv4: pc(uc),
|
|
4420
|
+
ipv6: pc(dc),
|
|
4421
|
+
regex: wc,
|
|
4422
|
+
uuid: pc(ac),
|
|
4423
|
+
"json-pointer": pc(oc),
|
|
4424
|
+
"json-pointer-uri-fragment": pc(sc),
|
|
4425
|
+
"relative-json-pointer": pc(cc)
|
|
4426
4426
|
};
|
|
4427
|
-
function
|
|
4427
|
+
function hc(e) {
|
|
4428
4428
|
return e % 4 == 0 && (e % 100 != 0 || e % 400 == 0);
|
|
4429
4429
|
}
|
|
4430
|
-
function
|
|
4431
|
-
let t = e.match(
|
|
4430
|
+
function gc(e) {
|
|
4431
|
+
let t = e.match(Qs);
|
|
4432
4432
|
if (!t) return !1;
|
|
4433
4433
|
let n = +t[1], r = +t[2], i = +t[3];
|
|
4434
|
-
return r >= 1 && r <= 12 && i >= 1 && i <= (r == 2 &&
|
|
4434
|
+
return r >= 1 && r <= 12 && i >= 1 && i <= (r == 2 && hc(n) ? 29 : $s[r]);
|
|
4435
4435
|
}
|
|
4436
|
-
function
|
|
4437
|
-
let n = t.match(
|
|
4436
|
+
function _c(e, t) {
|
|
4437
|
+
let n = t.match(ec);
|
|
4438
4438
|
if (!n) return !1;
|
|
4439
4439
|
let r = +n[1], i = +n[2], a = +n[3], o = !!n[5];
|
|
4440
4440
|
return (r <= 23 && i <= 59 && a <= 59 || r == 23 && i == 59 && a == 60) && (!e || o);
|
|
4441
4441
|
}
|
|
4442
|
-
var
|
|
4443
|
-
function
|
|
4444
|
-
let t = e.split(
|
|
4445
|
-
return t.length == 2 &&
|
|
4442
|
+
var vc = /t|\s/i;
|
|
4443
|
+
function yc(e) {
|
|
4444
|
+
let t = e.split(vc);
|
|
4445
|
+
return t.length == 2 && gc(t[0]) && _c(!0, t[1]);
|
|
4446
4446
|
}
|
|
4447
|
-
var
|
|
4448
|
-
function
|
|
4449
|
-
return
|
|
4447
|
+
var bc = /\/|:/, xc = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
4448
|
+
function Sc(e) {
|
|
4449
|
+
return bc.test(e) && xc.test(e);
|
|
4450
4450
|
}
|
|
4451
|
-
var
|
|
4452
|
-
function
|
|
4453
|
-
if (
|
|
4451
|
+
var Cc = /[^\\]\\Z/;
|
|
4452
|
+
function wc(e) {
|
|
4453
|
+
if (Cc.test(e)) return !1;
|
|
4454
4454
|
try {
|
|
4455
4455
|
return new RegExp(e, "u"), !0;
|
|
4456
4456
|
} catch {
|
|
@@ -4459,14 +4459,14 @@ function Cc(e) {
|
|
|
4459
4459
|
}
|
|
4460
4460
|
//#endregion
|
|
4461
4461
|
//#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/ucs2-length.js
|
|
4462
|
-
function
|
|
4462
|
+
function Tc(e) {
|
|
4463
4463
|
let t = 0, n = e.length, r = 0, i;
|
|
4464
4464
|
for (; r < n;) t++, i = e.charCodeAt(r++), i >= 55296 && i <= 56319 && r < n && (i = e.charCodeAt(r), (i & 64512) == 56320 && r++);
|
|
4465
4465
|
return t;
|
|
4466
4466
|
}
|
|
4467
4467
|
//#endregion
|
|
4468
4468
|
//#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validate.js
|
|
4469
|
-
function
|
|
4469
|
+
function L(e, t, n = "2019-09", r = Zs(t), i = !0, a = null, o = "#", s = "#", c = Object.create(null)) {
|
|
4470
4470
|
if (t === !0) return {
|
|
4471
4471
|
valid: !0,
|
|
4472
4472
|
errors: []
|
|
@@ -4494,7 +4494,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4494
4494
|
}
|
|
4495
4495
|
let { $ref: d, $recursiveRef: f, $recursiveAnchor: p, type: m, const: h, enum: g, required: ee, not: te, anyOf: ne, allOf: re, oneOf: ie, if: ae, then: oe, else: se, format: _, properties: v, patternProperties: ce, additionalProperties: le, unevaluatedProperties: ue, minProperties: de, maxProperties: fe, propertyNames: pe, dependentRequired: me, dependentSchemas: he, dependencies: ge, prefixItems: _e, items: y, additionalItems: ve, unevaluatedItems: ye, contains: be, minContains: xe, maxContains: Se, minItems: Ce, maxItems: we, uniqueItems: Te, minimum: Ee, maximum: De, exclusiveMinimum: Oe, exclusiveMaximum: ke, multipleOf: Ae, minLength: je, maxLength: Me, pattern: Ne, __absolute_ref__: Pe, __absolute_recursive_ref__: Fe } = t, b = [];
|
|
4496
4496
|
if (p === !0 && a === null && (a = t), f === "#") {
|
|
4497
|
-
let l = a === null ? r[Fe] : a, u = `${s}/$recursiveRef`, d =
|
|
4497
|
+
let l = a === null ? r[Fe] : a, u = `${s}/$recursiveRef`, d = L(e, a === null ? t : a, n, r, i, l, o, u, c);
|
|
4498
4498
|
d.valid || b.push({
|
|
4499
4499
|
instanceLocation: o,
|
|
4500
4500
|
keyword: "$recursiveRef",
|
|
@@ -4508,7 +4508,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4508
4508
|
let e = `Unresolved $ref "${d}".`;
|
|
4509
4509
|
throw Pe && Pe !== d && (e += ` Absolute URI "${Pe}".`), e += `\nKnown schemas:\n- ${Object.keys(r).join("\n- ")}`, Error(e);
|
|
4510
4510
|
}
|
|
4511
|
-
let l = `${s}/$ref`, u =
|
|
4511
|
+
let l = `${s}/$ref`, u = L(e, t, n, r, i, a, o, l, c);
|
|
4512
4512
|
if (u.valid || b.push({
|
|
4513
4513
|
instanceLocation: o,
|
|
4514
4514
|
keyword: "$ref",
|
|
@@ -4542,7 +4542,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4542
4542
|
keywordLocation: `${s}/type`,
|
|
4543
4543
|
error: `Instance type "${u}" is invalid. Expected "${m}".`
|
|
4544
4544
|
});
|
|
4545
|
-
if (h !== void 0 && (u === "object" || u === "array" ?
|
|
4545
|
+
if (h !== void 0 && (u === "object" || u === "array" ? Ws(e, h) || b.push({
|
|
4546
4546
|
instanceLocation: o,
|
|
4547
4547
|
keyword: "const",
|
|
4548
4548
|
keywordLocation: `${s}/const`,
|
|
@@ -4552,7 +4552,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4552
4552
|
keyword: "const",
|
|
4553
4553
|
keywordLocation: `${s}/const`,
|
|
4554
4554
|
error: `Instance does not match ${JSON.stringify(h)}.`
|
|
4555
|
-
})), g !== void 0 && (u === "object" || u === "array" ? g.some((t) =>
|
|
4555
|
+
})), g !== void 0 && (u === "object" || u === "array" ? g.some((t) => Ws(e, t)) || b.push({
|
|
4556
4556
|
instanceLocation: o,
|
|
4557
4557
|
keyword: "enum",
|
|
4558
4558
|
keywordLocation: `${s}/enum`,
|
|
@@ -4564,7 +4564,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4564
4564
|
error: `Instance does not match any of ${JSON.stringify(g)}.`
|
|
4565
4565
|
})), te !== void 0) {
|
|
4566
4566
|
let t = `${s}/not`;
|
|
4567
|
-
|
|
4567
|
+
L(e, te, n, r, i, a, o, t).valid && b.push({
|
|
4568
4568
|
instanceLocation: o,
|
|
4569
4569
|
keyword: "not",
|
|
4570
4570
|
keywordLocation: t,
|
|
@@ -4575,7 +4575,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4575
4575
|
if (ne !== void 0) {
|
|
4576
4576
|
let t = `${s}/anyOf`, l = b.length, u = !1;
|
|
4577
4577
|
for (let s = 0; s < ne.length; s++) {
|
|
4578
|
-
let l = ne[s], d = Object.create(c), f =
|
|
4578
|
+
let l = ne[s], d = Object.create(c), f = L(e, l, n, r, i, p === !0 ? a : null, o, `${t}/${s}`, d);
|
|
4579
4579
|
b.push(...f.errors), u ||= f.valid, f.valid && Ie.push(d);
|
|
4580
4580
|
}
|
|
4581
4581
|
u ? b.length = l : b.splice(l, 0, {
|
|
@@ -4588,7 +4588,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4588
4588
|
if (re !== void 0) {
|
|
4589
4589
|
let t = `${s}/allOf`, l = b.length, u = !0;
|
|
4590
4590
|
for (let s = 0; s < re.length; s++) {
|
|
4591
|
-
let l = re[s], d = Object.create(c), f =
|
|
4591
|
+
let l = re[s], d = Object.create(c), f = L(e, l, n, r, i, p === !0 ? a : null, o, `${t}/${s}`, d);
|
|
4592
4592
|
b.push(...f.errors), u &&= f.valid, f.valid && Ie.push(d);
|
|
4593
4593
|
}
|
|
4594
4594
|
u ? b.length = l : b.splice(l, 0, {
|
|
@@ -4600,7 +4600,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4600
4600
|
}
|
|
4601
4601
|
if (ie !== void 0) {
|
|
4602
4602
|
let t = `${s}/oneOf`, l = b.length, u = ie.filter((s, l) => {
|
|
4603
|
-
let u = Object.create(c), d =
|
|
4603
|
+
let u = Object.create(c), d = L(e, s, n, r, i, p === !0 ? a : null, o, `${t}/${l}`, u);
|
|
4604
4604
|
return b.push(...d.errors), d.valid && Ie.push(u), d.valid;
|
|
4605
4605
|
}).length;
|
|
4606
4606
|
u === 1 ? b.length = l : b.splice(l, 0, {
|
|
@@ -4612,9 +4612,9 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4612
4612
|
}
|
|
4613
4613
|
if ((u === "object" || u === "array") && Object.assign(c, ...Ie), ae !== void 0) {
|
|
4614
4614
|
let t = `${s}/if`;
|
|
4615
|
-
if (
|
|
4615
|
+
if (L(e, ae, n, r, i, a, o, t, c).valid) {
|
|
4616
4616
|
if (oe !== void 0) {
|
|
4617
|
-
let l =
|
|
4617
|
+
let l = L(e, oe, n, r, i, a, o, `${s}/then`, c);
|
|
4618
4618
|
l.valid || b.push({
|
|
4619
4619
|
instanceLocation: o,
|
|
4620
4620
|
keyword: "if",
|
|
@@ -4623,7 +4623,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4623
4623
|
}, ...l.errors);
|
|
4624
4624
|
}
|
|
4625
4625
|
} else if (se !== void 0) {
|
|
4626
|
-
let l =
|
|
4626
|
+
let l = L(e, se, n, r, i, a, o, `${s}/else`, c);
|
|
4627
4627
|
l.valid || b.push({
|
|
4628
4628
|
instanceLocation: o,
|
|
4629
4629
|
keyword: "if",
|
|
@@ -4653,7 +4653,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4653
4653
|
}), pe !== void 0) {
|
|
4654
4654
|
let t = `${s}/propertyNames`;
|
|
4655
4655
|
for (let s in e) {
|
|
4656
|
-
let e = `${o}/${
|
|
4656
|
+
let e = `${o}/${Gs(s)}`, c = L(s, pe, n, r, i, a, e, t);
|
|
4657
4657
|
c.valid || b.push({
|
|
4658
4658
|
instanceLocation: o,
|
|
4659
4659
|
keyword: "propertyNames",
|
|
@@ -4677,7 +4677,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4677
4677
|
if (he !== void 0) for (let t in he) {
|
|
4678
4678
|
let l = `${s}/dependentSchemas`;
|
|
4679
4679
|
if (t in e) {
|
|
4680
|
-
let s =
|
|
4680
|
+
let s = L(e, he[t], n, r, i, a, o, `${l}/${Gs(t)}`, c);
|
|
4681
4681
|
s.valid || b.push({
|
|
4682
4682
|
instanceLocation: o,
|
|
4683
4683
|
keyword: "dependentSchemas",
|
|
@@ -4697,7 +4697,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4697
4697
|
error: `Instance has "${s}" but does not have "${n}".`
|
|
4698
4698
|
});
|
|
4699
4699
|
else {
|
|
4700
|
-
let l =
|
|
4700
|
+
let l = L(e, c, n, r, i, a, o, `${t}/${Gs(s)}`);
|
|
4701
4701
|
l.valid || b.push({
|
|
4702
4702
|
instanceLocation: o,
|
|
4703
4703
|
keyword: "dependencies",
|
|
@@ -4712,7 +4712,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4712
4712
|
let t = `${s}/properties`;
|
|
4713
4713
|
for (let s in v) {
|
|
4714
4714
|
if (!(s in e)) continue;
|
|
4715
|
-
let d = `${o}/${
|
|
4715
|
+
let d = `${o}/${Gs(s)}`, f = L(e[s], v[s], n, r, i, a, d, `${t}/${Gs(s)}`);
|
|
4716
4716
|
if (f.valid) c[s] = l[s] = !0;
|
|
4717
4717
|
else if (u = i, b.push({
|
|
4718
4718
|
instanceLocation: o,
|
|
@@ -4728,7 +4728,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4728
4728
|
let d = new RegExp(s, "u"), f = ce[s];
|
|
4729
4729
|
for (let p in e) {
|
|
4730
4730
|
if (!d.test(p)) continue;
|
|
4731
|
-
let m = `${o}/${
|
|
4731
|
+
let m = `${o}/${Gs(p)}`, h = L(e[p], f, n, r, i, a, m, `${t}/${Gs(s)}`);
|
|
4732
4732
|
h.valid ? c[p] = l[p] = !0 : (u = i, b.push({
|
|
4733
4733
|
instanceLocation: o,
|
|
4734
4734
|
keyword: "patternProperties",
|
|
@@ -4742,7 +4742,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4742
4742
|
let t = `${s}/additionalProperties`;
|
|
4743
4743
|
for (let s in e) {
|
|
4744
4744
|
if (l[s]) continue;
|
|
4745
|
-
let d = `${o}/${
|
|
4745
|
+
let d = `${o}/${Gs(s)}`, f = L(e[s], le, n, r, i, a, d, t);
|
|
4746
4746
|
f.valid ? c[s] = !0 : (u = i, b.push({
|
|
4747
4747
|
instanceLocation: o,
|
|
4748
4748
|
keyword: "additionalProperties",
|
|
@@ -4753,7 +4753,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4753
4753
|
} else if (!u && ue !== void 0) {
|
|
4754
4754
|
let t = `${s}/unevaluatedProperties`;
|
|
4755
4755
|
for (let s in e) if (!c[s]) {
|
|
4756
|
-
let l = `${o}/${
|
|
4756
|
+
let l = `${o}/${Gs(s)}`, u = L(e[s], ue, n, r, i, a, l, t);
|
|
4757
4757
|
u.valid ? c[s] = !0 : b.push({
|
|
4758
4758
|
instanceLocation: o,
|
|
4759
4759
|
keyword: "unevaluatedProperties",
|
|
@@ -4778,7 +4778,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4778
4778
|
if (_e !== void 0) {
|
|
4779
4779
|
let d = `${s}/prefixItems`, f = Math.min(_e.length, t);
|
|
4780
4780
|
for (; l < f; l++) {
|
|
4781
|
-
let t =
|
|
4781
|
+
let t = L(e[l], _e[l], n, r, i, a, `${o}/${l}`, `${d}/${l}`);
|
|
4782
4782
|
if (c[l] = !0, !t.valid && (u = i, b.push({
|
|
4783
4783
|
instanceLocation: o,
|
|
4784
4784
|
keyword: "prefixItems",
|
|
@@ -4792,7 +4792,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4792
4792
|
if (Array.isArray(y)) {
|
|
4793
4793
|
let s = Math.min(y.length, t);
|
|
4794
4794
|
for (; l < s; l++) {
|
|
4795
|
-
let t =
|
|
4795
|
+
let t = L(e[l], y[l], n, r, i, a, `${o}/${l}`, `${d}/${l}`);
|
|
4796
4796
|
if (c[l] = !0, !t.valid && (u = i, b.push({
|
|
4797
4797
|
instanceLocation: o,
|
|
4798
4798
|
keyword: "items",
|
|
@@ -4801,7 +4801,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4801
4801
|
}, ...t.errors), u)) break;
|
|
4802
4802
|
}
|
|
4803
4803
|
} else for (; l < t; l++) {
|
|
4804
|
-
let t =
|
|
4804
|
+
let t = L(e[l], y, n, r, i, a, `${o}/${l}`, d);
|
|
4805
4805
|
if (c[l] = !0, !t.valid && (u = i, b.push({
|
|
4806
4806
|
instanceLocation: o,
|
|
4807
4807
|
keyword: "items",
|
|
@@ -4812,7 +4812,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4812
4812
|
if (!u && ve !== void 0) {
|
|
4813
4813
|
let d = `${s}/additionalItems`;
|
|
4814
4814
|
for (; l < t; l++) {
|
|
4815
|
-
let t =
|
|
4815
|
+
let t = L(e[l], ve, n, r, i, a, `${o}/${l}`, d);
|
|
4816
4816
|
c[l] = !0, t.valid || (u = i, b.push({
|
|
4817
4817
|
instanceLocation: o,
|
|
4818
4818
|
keyword: "additionalItems",
|
|
@@ -4838,7 +4838,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4838
4838
|
else {
|
|
4839
4839
|
let l = `${s}/contains`, u = b.length, d = 0;
|
|
4840
4840
|
for (let s = 0; s < t; s++) {
|
|
4841
|
-
let t =
|
|
4841
|
+
let t = L(e[s], be, n, r, i, a, `${o}/${s}`, l);
|
|
4842
4842
|
t.valid ? (c[s] = !0, d++) : b.push(...t.errors);
|
|
4843
4843
|
}
|
|
4844
4844
|
d >= (xe || 0) && (b.length = u), xe === void 0 && Se === void 0 && d === 0 ? b.splice(u, 0, {
|
|
@@ -4863,7 +4863,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4863
4863
|
let u = `${s}/unevaluatedItems`;
|
|
4864
4864
|
for (; l < t; l++) {
|
|
4865
4865
|
if (c[l]) continue;
|
|
4866
|
-
let t =
|
|
4866
|
+
let t = L(e[l], ye, n, r, i, a, `${o}/${l}`, u);
|
|
4867
4867
|
c[l] = !0, t.valid || b.push({
|
|
4868
4868
|
instanceLocation: o,
|
|
4869
4869
|
keyword: "unevaluatedItems",
|
|
@@ -4877,7 +4877,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4877
4877
|
for (let a = 0; a < t; a++) {
|
|
4878
4878
|
if (n === a) continue;
|
|
4879
4879
|
let t = e[a];
|
|
4880
|
-
(r === t || i && typeof t == "object" && t &&
|
|
4880
|
+
(r === t || i && typeof t == "object" && t && Ws(r, t)) && (b.push({
|
|
4881
4881
|
instanceLocation: o,
|
|
4882
4882
|
keyword: "uniqueItems",
|
|
4883
4883
|
keywordLocation: `${s}/uniqueItems`,
|
|
@@ -4926,7 +4926,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4926
4926
|
});
|
|
4927
4927
|
}
|
|
4928
4928
|
} else if (u === "string") {
|
|
4929
|
-
let t = je === void 0 && Me === void 0 ? 0 :
|
|
4929
|
+
let t = je === void 0 && Me === void 0 ? 0 : Tc(e);
|
|
4930
4930
|
je !== void 0 && t < je && b.push({
|
|
4931
4931
|
instanceLocation: o,
|
|
4932
4932
|
keyword: "minLength",
|
|
@@ -4942,7 +4942,7 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4942
4942
|
keyword: "pattern",
|
|
4943
4943
|
keywordLocation: `${s}/pattern`,
|
|
4944
4944
|
error: "String does not match pattern."
|
|
4945
|
-
}), _ !== void 0 &&
|
|
4945
|
+
}), _ !== void 0 && mc[_] && !mc[_](e) && b.push({
|
|
4946
4946
|
instanceLocation: o,
|
|
4947
4947
|
keyword: "format",
|
|
4948
4948
|
keywordLocation: `${s}/format`,
|
|
@@ -4956,117 +4956,117 @@ function R(e, t, n = "2019-09", r = Xs(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
4956
4956
|
}
|
|
4957
4957
|
//#endregion
|
|
4958
4958
|
//#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validator.js
|
|
4959
|
-
var
|
|
4959
|
+
var Ec = class {
|
|
4960
4960
|
schema;
|
|
4961
4961
|
draft;
|
|
4962
4962
|
shortCircuit;
|
|
4963
4963
|
lookup;
|
|
4964
4964
|
constructor(e, t = "2019-09", n = !0) {
|
|
4965
|
-
this.schema = e, this.draft = t, this.shortCircuit = n, this.lookup =
|
|
4965
|
+
this.schema = e, this.draft = t, this.shortCircuit = n, this.lookup = Zs(e);
|
|
4966
4966
|
}
|
|
4967
4967
|
validate(e) {
|
|
4968
|
-
return
|
|
4968
|
+
return L(e, this.schema, this.draft, this.lookup, this.shortCircuit);
|
|
4969
4969
|
}
|
|
4970
4970
|
addSchema(e, t) {
|
|
4971
4971
|
t && (e = {
|
|
4972
4972
|
...e,
|
|
4973
4973
|
$id: t
|
|
4974
|
-
}),
|
|
4975
|
-
}
|
|
4976
|
-
},
|
|
4977
|
-
description:
|
|
4978
|
-
jsonSchema:
|
|
4979
|
-
nullable:
|
|
4980
|
-
handle:
|
|
4981
|
-
}),
|
|
4982
|
-
collapsed:
|
|
4983
|
-
group:
|
|
4984
|
-
}),
|
|
4985
|
-
kind:
|
|
4986
|
-
nodeId:
|
|
4987
|
-
output:
|
|
4988
|
-
}),
|
|
4989
|
-
kind:
|
|
4990
|
-
input:
|
|
4991
|
-
}),
|
|
4992
|
-
Ac,
|
|
4974
|
+
}), Zs(e, this.lookup);
|
|
4975
|
+
}
|
|
4976
|
+
}, R = O(), Dc = Us(), Oc = j(R), kc = M({
|
|
4977
|
+
description: R.optional(),
|
|
4978
|
+
jsonSchema: Dc,
|
|
4979
|
+
nullable: es(),
|
|
4980
|
+
handle: R
|
|
4981
|
+
}), z = kc.extend({ value: Dc.optional() }), Ac = M({
|
|
4982
|
+
collapsed: es().optional(),
|
|
4983
|
+
group: R
|
|
4984
|
+
}), jc = M({
|
|
4985
|
+
kind: I("node"),
|
|
4986
|
+
nodeId: R,
|
|
4987
|
+
output: R
|
|
4988
|
+
}), Mc = M({
|
|
4989
|
+
kind: I("flow"),
|
|
4990
|
+
input: R
|
|
4991
|
+
}), Nc = N([
|
|
4993
4992
|
jc,
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4993
|
+
Mc,
|
|
4994
|
+
M({
|
|
4995
|
+
kind: I("binding"),
|
|
4996
|
+
bindingId: R
|
|
4997
4997
|
})
|
|
4998
|
-
]),
|
|
4999
|
-
kind:
|
|
5000
|
-
value:
|
|
5001
|
-
}),
|
|
5002
|
-
kind:
|
|
5003
|
-
sources:
|
|
5004
|
-
})]),
|
|
5005
|
-
inputs:
|
|
5006
|
-
outputs:
|
|
5007
|
-
},
|
|
5008
|
-
kind:
|
|
5009
|
-
action:
|
|
5010
|
-
connectionId:
|
|
5011
|
-
connections: M(
|
|
5012
|
-
connectionId:
|
|
5013
|
-
alias:
|
|
4998
|
+
]), Pc = N([M({
|
|
4999
|
+
kind: I("value"),
|
|
5000
|
+
value: Dc
|
|
5001
|
+
}), M({
|
|
5002
|
+
kind: I("sources"),
|
|
5003
|
+
sources: j(Nc)
|
|
5004
|
+
})]), Fc = P(R, Pc), Ic = {
|
|
5005
|
+
inputs: j(N([z, Ac])),
|
|
5006
|
+
outputs: j(N([kc, Ac]))
|
|
5007
|
+
}, Lc = M({
|
|
5008
|
+
kind: I("connector"),
|
|
5009
|
+
action: R,
|
|
5010
|
+
connectionId: R.optional(),
|
|
5011
|
+
connections: j(M({
|
|
5012
|
+
connectionId: R,
|
|
5013
|
+
alias: R.optional()
|
|
5014
5014
|
}))
|
|
5015
|
-
}),
|
|
5016
|
-
...
|
|
5017
|
-
name:
|
|
5018
|
-
moduleId:
|
|
5019
|
-
capabilities:
|
|
5020
|
-
}),
|
|
5021
|
-
kind:
|
|
5022
|
-
value:
|
|
5023
|
-
}),
|
|
5024
|
-
kind:
|
|
5025
|
-
input:
|
|
5026
|
-
})]),
|
|
5027
|
-
...
|
|
5028
|
-
name:
|
|
5029
|
-
executor:
|
|
5030
|
-
|
|
5031
|
-
kind:
|
|
5032
|
-
action:
|
|
5033
|
-
connectionId:
|
|
5015
|
+
}), Rc = M({
|
|
5016
|
+
...Ic,
|
|
5017
|
+
name: R,
|
|
5018
|
+
moduleId: R,
|
|
5019
|
+
capabilities: j(Lc).optional()
|
|
5020
|
+
}), zc = N([M({
|
|
5021
|
+
kind: I("value"),
|
|
5022
|
+
value: Dc
|
|
5023
|
+
}), M({
|
|
5024
|
+
kind: I("input"),
|
|
5025
|
+
input: R
|
|
5026
|
+
})]), Bc = N([zc, M({ kind: I("model") })]), Vc = M({
|
|
5027
|
+
...Ic,
|
|
5028
|
+
name: R,
|
|
5029
|
+
executor: N([
|
|
5030
|
+
M({
|
|
5031
|
+
kind: I("connector"),
|
|
5032
|
+
action: R,
|
|
5033
|
+
connectionId: R.optional()
|
|
5034
5034
|
}),
|
|
5035
|
-
|
|
5036
|
-
kind:
|
|
5037
|
-
mode:
|
|
5035
|
+
M({
|
|
5036
|
+
kind: I("llm"),
|
|
5037
|
+
mode: F(["chat", "json"])
|
|
5038
5038
|
}),
|
|
5039
|
-
|
|
5040
|
-
kind:
|
|
5041
|
-
code:
|
|
5042
|
-
model:
|
|
5043
|
-
prompt:
|
|
5044
|
-
system:
|
|
5039
|
+
M({
|
|
5040
|
+
kind: I("agent"),
|
|
5041
|
+
code: es().optional(),
|
|
5042
|
+
model: R,
|
|
5043
|
+
prompt: zc,
|
|
5044
|
+
system: R,
|
|
5045
5045
|
maxRounds: A(),
|
|
5046
|
-
tools: M(
|
|
5047
|
-
id:
|
|
5048
|
-
name:
|
|
5049
|
-
description:
|
|
5050
|
-
action:
|
|
5051
|
-
connectionId:
|
|
5052
|
-
approval:
|
|
5053
|
-
inputs:
|
|
5046
|
+
tools: j(M({
|
|
5047
|
+
id: R,
|
|
5048
|
+
name: R,
|
|
5049
|
+
description: R,
|
|
5050
|
+
action: R,
|
|
5051
|
+
connectionId: R.optional(),
|
|
5052
|
+
approval: es(),
|
|
5053
|
+
inputs: j(z.extend({ source: Bc }))
|
|
5054
5054
|
})),
|
|
5055
|
-
notification:
|
|
5056
|
-
taskId:
|
|
5057
|
-
messageHandle:
|
|
5058
|
-
inputs:
|
|
5055
|
+
notification: M({
|
|
5056
|
+
taskId: R,
|
|
5057
|
+
messageHandle: R,
|
|
5058
|
+
inputs: P(R, zc)
|
|
5059
5059
|
}).optional()
|
|
5060
5060
|
})
|
|
5061
5061
|
])
|
|
5062
|
-
}),
|
|
5063
|
-
input:
|
|
5064
|
-
cases: M(
|
|
5065
|
-
output:
|
|
5066
|
-
relation:
|
|
5067
|
-
expressions: M(
|
|
5068
|
-
input:
|
|
5069
|
-
operator:
|
|
5062
|
+
}), Hc = {
|
|
5063
|
+
input: z,
|
|
5064
|
+
cases: j(M({
|
|
5065
|
+
output: R,
|
|
5066
|
+
relation: F(["all", "any"]),
|
|
5067
|
+
expressions: j(M({
|
|
5068
|
+
input: R,
|
|
5069
|
+
operator: F([
|
|
5070
5070
|
"!=",
|
|
5071
5071
|
"<",
|
|
5072
5072
|
"<=",
|
|
@@ -5088,35 +5088,35 @@ var Tc = class {
|
|
|
5088
5088
|
"notHasValue",
|
|
5089
5089
|
"startsWith"
|
|
5090
5090
|
]),
|
|
5091
|
-
value:
|
|
5091
|
+
value: Dc.optional()
|
|
5092
5092
|
}))
|
|
5093
5093
|
})),
|
|
5094
|
-
defaultOutput:
|
|
5095
|
-
}, Hc = {
|
|
5096
|
-
actions: P([ps([L("continue")]), ps([L("approve"), L("reject")])]),
|
|
5097
|
-
prompt: z,
|
|
5098
|
-
notification: N({
|
|
5099
|
-
inputs: Pc,
|
|
5100
|
-
messageHandle: z,
|
|
5101
|
-
taskId: z
|
|
5102
|
-
}).optional()
|
|
5094
|
+
defaultOutput: R.optional()
|
|
5103
5095
|
}, Uc = {
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5096
|
+
actions: N([ms([I("continue")]), ms([I("approve"), I("reject")])]),
|
|
5097
|
+
prompt: R,
|
|
5098
|
+
notification: M({
|
|
5099
|
+
inputs: Fc,
|
|
5100
|
+
messageHandle: R,
|
|
5101
|
+
taskId: R
|
|
5102
|
+
}).optional()
|
|
5103
|
+
}, Wc = {
|
|
5104
|
+
inputsDef: j(z),
|
|
5105
|
+
options: M({
|
|
5106
|
+
allowedMethods: Oc.optional(),
|
|
5107
|
+
allowedOrigins: Oc.optional(),
|
|
5108
|
+
noResponseBody: es().optional(),
|
|
5109
|
+
responseData: R.optional(),
|
|
5110
|
+
responseHeaders: P(R, R).optional(),
|
|
5111
5111
|
responseStatusCode: A().optional()
|
|
5112
5112
|
}).optional()
|
|
5113
|
-
},
|
|
5114
|
-
type:
|
|
5115
|
-
expression:
|
|
5116
|
-
timezone:
|
|
5117
|
-
}),
|
|
5118
|
-
type:
|
|
5119
|
-
unit:
|
|
5113
|
+
}, Gc = j(N([M({
|
|
5114
|
+
type: I("cron"),
|
|
5115
|
+
expression: R,
|
|
5116
|
+
timezone: R
|
|
5117
|
+
}), M({
|
|
5118
|
+
type: I("every"),
|
|
5119
|
+
unit: F([
|
|
5120
5120
|
"day",
|
|
5121
5121
|
"hour",
|
|
5122
5122
|
"minute",
|
|
@@ -5124,27 +5124,27 @@ var Tc = class {
|
|
|
5124
5124
|
"week"
|
|
5125
5125
|
]),
|
|
5126
5126
|
value: A()
|
|
5127
|
-
})])),
|
|
5128
|
-
configSchema:
|
|
5127
|
+
})])), Kc = {
|
|
5128
|
+
configSchema: Dc,
|
|
5129
5129
|
definitionVersion: A(),
|
|
5130
|
-
description:
|
|
5131
|
-
displayName:
|
|
5132
|
-
key:
|
|
5133
|
-
name:
|
|
5134
|
-
payloadSchema:
|
|
5135
|
-
provider:
|
|
5136
|
-
},
|
|
5137
|
-
body:
|
|
5138
|
-
allowArray:
|
|
5139
|
-
allowEmpty:
|
|
5140
|
-
formats:
|
|
5130
|
+
description: R,
|
|
5131
|
+
displayName: R,
|
|
5132
|
+
key: R,
|
|
5133
|
+
name: R,
|
|
5134
|
+
payloadSchema: Dc,
|
|
5135
|
+
provider: R
|
|
5136
|
+
}, qc = M({
|
|
5137
|
+
body: M({
|
|
5138
|
+
allowArray: es(),
|
|
5139
|
+
allowEmpty: es(),
|
|
5140
|
+
formats: j(F([
|
|
5141
5141
|
"form",
|
|
5142
5142
|
"json",
|
|
5143
5143
|
"multipart",
|
|
5144
5144
|
"text"
|
|
5145
5145
|
]))
|
|
5146
5146
|
}),
|
|
5147
|
-
methods:
|
|
5147
|
+
methods: j(F([
|
|
5148
5148
|
"DELETE",
|
|
5149
5149
|
"GET",
|
|
5150
5150
|
"HEAD",
|
|
@@ -5153,387 +5153,388 @@ var Tc = class {
|
|
|
5153
5153
|
"PUT"
|
|
5154
5154
|
])),
|
|
5155
5155
|
successStatus: A()
|
|
5156
|
-
}),
|
|
5157
|
-
name:
|
|
5158
|
-
description:
|
|
5159
|
-
icon:
|
|
5160
|
-
},
|
|
5161
|
-
inputs:
|
|
5162
|
-
name:
|
|
5163
|
-
description:
|
|
5164
|
-
icon:
|
|
5156
|
+
}), Jc = {
|
|
5157
|
+
name: R,
|
|
5158
|
+
description: R.optional(),
|
|
5159
|
+
icon: R.optional()
|
|
5160
|
+
}, Yc = {
|
|
5161
|
+
inputs: Fc,
|
|
5162
|
+
name: R.optional(),
|
|
5163
|
+
description: R.optional(),
|
|
5164
|
+
icon: R.optional(),
|
|
5165
5165
|
timeoutMs: A().optional()
|
|
5166
|
-
},
|
|
5167
|
-
|
|
5168
|
-
...
|
|
5169
|
-
kind:
|
|
5170
|
-
...
|
|
5166
|
+
}, Xc = N([
|
|
5167
|
+
M({
|
|
5168
|
+
...Yc,
|
|
5169
|
+
kind: I("condition"),
|
|
5170
|
+
...Hc
|
|
5171
5171
|
}),
|
|
5172
|
-
|
|
5173
|
-
...
|
|
5174
|
-
|
|
5175
|
-
|
|
5172
|
+
M({
|
|
5173
|
+
...Yc,
|
|
5174
|
+
inputs: is().transform(() => ({})).default({}),
|
|
5175
|
+
kind: I("value"),
|
|
5176
|
+
values: j(z)
|
|
5176
5177
|
}),
|
|
5177
|
-
|
|
5178
|
-
...
|
|
5179
|
-
kind:
|
|
5180
|
-
subflowId:
|
|
5178
|
+
M({
|
|
5179
|
+
...Yc,
|
|
5180
|
+
kind: I("subflow"),
|
|
5181
|
+
subflowId: R
|
|
5181
5182
|
}),
|
|
5182
|
-
|
|
5183
|
-
...
|
|
5184
|
-
kind:
|
|
5185
|
-
task:
|
|
5186
|
-
additionalInputs:
|
|
5183
|
+
M({
|
|
5184
|
+
...Yc,
|
|
5185
|
+
kind: I("task"),
|
|
5186
|
+
task: Rc,
|
|
5187
|
+
additionalInputs: j(z).optional()
|
|
5187
5188
|
}),
|
|
5188
|
-
|
|
5189
|
-
...
|
|
5190
|
-
kind:
|
|
5191
|
-
taskId:
|
|
5192
|
-
additionalInputs:
|
|
5189
|
+
M({
|
|
5190
|
+
...Yc,
|
|
5191
|
+
kind: I("task"),
|
|
5192
|
+
taskId: R,
|
|
5193
|
+
additionalInputs: j(z).optional()
|
|
5193
5194
|
}),
|
|
5194
|
-
|
|
5195
|
-
...
|
|
5196
|
-
kind:
|
|
5197
|
-
input:
|
|
5198
|
-
...
|
|
5195
|
+
M({
|
|
5196
|
+
...Yc,
|
|
5197
|
+
kind: I("wait"),
|
|
5198
|
+
input: z,
|
|
5199
|
+
...Uc
|
|
5199
5200
|
}).omit({ timeoutMs: !0 }),
|
|
5200
|
-
|
|
5201
|
-
...
|
|
5202
|
-
kind:
|
|
5201
|
+
M({
|
|
5202
|
+
...Jc,
|
|
5203
|
+
kind: I("manual")
|
|
5203
5204
|
}),
|
|
5204
|
-
|
|
5205
|
-
...
|
|
5206
|
-
kind:
|
|
5207
|
-
...
|
|
5205
|
+
M({
|
|
5206
|
+
...Jc,
|
|
5207
|
+
kind: I("webhook"),
|
|
5208
|
+
...Wc
|
|
5208
5209
|
}),
|
|
5209
|
-
|
|
5210
|
-
...
|
|
5211
|
-
kind:
|
|
5212
|
-
cronTimes:
|
|
5210
|
+
M({
|
|
5211
|
+
...Jc,
|
|
5212
|
+
kind: I("cron"),
|
|
5213
|
+
cronTimes: Gc
|
|
5213
5214
|
}),
|
|
5214
|
-
|
|
5215
|
-
...
|
|
5216
|
-
kind:
|
|
5217
|
-
bindingId:
|
|
5218
|
-
config:
|
|
5219
|
-
definition:
|
|
5220
|
-
...
|
|
5221
|
-
type:
|
|
5215
|
+
M({
|
|
5216
|
+
...Jc,
|
|
5217
|
+
kind: I("poll"),
|
|
5218
|
+
bindingId: R,
|
|
5219
|
+
config: P(R, Dc),
|
|
5220
|
+
definition: M({
|
|
5221
|
+
...Kc,
|
|
5222
|
+
type: I("poll")
|
|
5222
5223
|
}),
|
|
5223
|
-
pollTimes:
|
|
5224
|
+
pollTimes: Gc
|
|
5224
5225
|
}),
|
|
5225
|
-
|
|
5226
|
-
...
|
|
5227
|
-
kind:
|
|
5228
|
-
bindingId:
|
|
5229
|
-
config:
|
|
5230
|
-
definition:
|
|
5231
|
-
...
|
|
5232
|
-
type:
|
|
5233
|
-
endpoint:
|
|
5226
|
+
M({
|
|
5227
|
+
...Jc,
|
|
5228
|
+
kind: I("integration"),
|
|
5229
|
+
bindingId: R,
|
|
5230
|
+
config: P(R, Dc),
|
|
5231
|
+
definition: M({
|
|
5232
|
+
...Kc,
|
|
5233
|
+
type: I("integration"),
|
|
5234
|
+
endpoint: qc
|
|
5234
5235
|
})
|
|
5235
5236
|
})
|
|
5236
|
-
]),
|
|
5237
|
-
kind:
|
|
5238
|
-
id:
|
|
5239
|
-
})]),
|
|
5240
|
-
source:
|
|
5241
|
-
target:
|
|
5242
|
-
sourceHandle:
|
|
5243
|
-
}),
|
|
5244
|
-
nodeId:
|
|
5245
|
-
target:
|
|
5246
|
-
},
|
|
5247
|
-
name:
|
|
5248
|
-
inputs:
|
|
5249
|
-
outputs:
|
|
5250
|
-
}),
|
|
5251
|
-
nodes:
|
|
5252
|
-
edges:
|
|
5253
|
-
}),
|
|
5254
|
-
kind:
|
|
5255
|
-
target:
|
|
5256
|
-
}),
|
|
5257
|
-
name:
|
|
5258
|
-
imports:
|
|
5259
|
-
source:
|
|
5260
|
-
}),
|
|
5261
|
-
bindings:
|
|
5262
|
-
graph:
|
|
5263
|
-
subflows:
|
|
5264
|
-
tasks:
|
|
5237
|
+
]), Zc = N([M({ kind: I("flow") }), M({
|
|
5238
|
+
kind: I("subflow"),
|
|
5239
|
+
id: R
|
|
5240
|
+
})]), Qc = M({
|
|
5241
|
+
source: R,
|
|
5242
|
+
target: R,
|
|
5243
|
+
sourceHandle: R.optional()
|
|
5244
|
+
}), B = {
|
|
5245
|
+
nodeId: R,
|
|
5246
|
+
target: Zc
|
|
5247
|
+
}, $c = M({
|
|
5248
|
+
name: R,
|
|
5249
|
+
inputs: j(z),
|
|
5250
|
+
outputs: j(kc.extend({ sources: j(N([jc, Mc])) }))
|
|
5251
|
+
}), el = M({
|
|
5252
|
+
nodes: P(R, Xc),
|
|
5253
|
+
edges: j(Qc).default([])
|
|
5254
|
+
}), tl = M({
|
|
5255
|
+
kind: F(["connection", "variable"]),
|
|
5256
|
+
target: R
|
|
5257
|
+
}), nl = M({
|
|
5258
|
+
name: R,
|
|
5259
|
+
imports: Oc,
|
|
5260
|
+
source: R
|
|
5261
|
+
}), rl = M({
|
|
5262
|
+
bindings: P(R, tl),
|
|
5263
|
+
graph: el,
|
|
5264
|
+
subflows: P(R, $c.extend({ graph: el })),
|
|
5265
|
+
tasks: P(R, Vc)
|
|
5265
5266
|
});
|
|
5266
|
-
|
|
5267
|
-
modelVersion:
|
|
5268
|
-
document:
|
|
5269
|
-
modules:
|
|
5267
|
+
M({
|
|
5268
|
+
modelVersion: I(1),
|
|
5269
|
+
document: rl,
|
|
5270
|
+
modules: P(R, nl)
|
|
5270
5271
|
}).extend({
|
|
5271
|
-
kind:
|
|
5272
|
-
version:
|
|
5272
|
+
kind: I("open-flow-flow-revision"),
|
|
5273
|
+
version: I(1)
|
|
5273
5274
|
});
|
|
5274
|
-
var
|
|
5275
|
+
var il = {
|
|
5275
5276
|
"binding.create": {
|
|
5276
|
-
bindingId:
|
|
5277
|
-
binding:
|
|
5277
|
+
bindingId: R,
|
|
5278
|
+
binding: tl
|
|
5278
5279
|
},
|
|
5279
|
-
"binding.delete": { bindingId:
|
|
5280
|
+
"binding.delete": { bindingId: R },
|
|
5280
5281
|
"binding.target.set": {
|
|
5281
|
-
bindingId:
|
|
5282
|
-
before:
|
|
5283
|
-
value:
|
|
5282
|
+
bindingId: R,
|
|
5283
|
+
before: R,
|
|
5284
|
+
value: R
|
|
5284
5285
|
},
|
|
5285
5286
|
"graph.edge.connect": {
|
|
5286
|
-
target:
|
|
5287
|
-
edge:
|
|
5287
|
+
target: Zc,
|
|
5288
|
+
edge: Qc
|
|
5288
5289
|
},
|
|
5289
5290
|
"graph.edge.disconnect": {
|
|
5290
|
-
target:
|
|
5291
|
-
edge:
|
|
5291
|
+
target: Zc,
|
|
5292
|
+
edge: Qc
|
|
5292
5293
|
},
|
|
5293
5294
|
"graph.node.create": {
|
|
5294
|
-
...
|
|
5295
|
-
node:
|
|
5296
|
-
},
|
|
5297
|
-
"graph.node.delete":
|
|
5298
|
-
"graph.node.field.set":
|
|
5299
|
-
...
|
|
5300
|
-
kind:
|
|
5301
|
-
field:
|
|
5295
|
+
...B,
|
|
5296
|
+
node: Xc
|
|
5297
|
+
},
|
|
5298
|
+
"graph.node.delete": B,
|
|
5299
|
+
"graph.node.field.set": N([M({
|
|
5300
|
+
...B,
|
|
5301
|
+
kind: I("graph.node.field.set"),
|
|
5302
|
+
field: F([
|
|
5302
5303
|
"description",
|
|
5303
5304
|
"icon",
|
|
5304
5305
|
"name"
|
|
5305
5306
|
]),
|
|
5306
|
-
before:
|
|
5307
|
-
value:
|
|
5308
|
-
}),
|
|
5309
|
-
...
|
|
5310
|
-
kind:
|
|
5311
|
-
field:
|
|
5307
|
+
before: R.optional(),
|
|
5308
|
+
value: R.optional()
|
|
5309
|
+
}), M({
|
|
5310
|
+
...B,
|
|
5311
|
+
kind: I("graph.node.field.set"),
|
|
5312
|
+
field: I("timeoutMs"),
|
|
5312
5313
|
before: A().optional(),
|
|
5313
5314
|
value: A().optional()
|
|
5314
5315
|
})]),
|
|
5315
5316
|
"graph.node.input.set": {
|
|
5316
|
-
...
|
|
5317
|
-
handle:
|
|
5318
|
-
before:
|
|
5319
|
-
value:
|
|
5317
|
+
...B,
|
|
5318
|
+
handle: R,
|
|
5319
|
+
before: Pc.optional(),
|
|
5320
|
+
value: Pc.optional()
|
|
5320
5321
|
},
|
|
5321
5322
|
"graph.node.additional-inputs.set": {
|
|
5322
|
-
...
|
|
5323
|
-
before:
|
|
5324
|
-
value:
|
|
5323
|
+
...B,
|
|
5324
|
+
before: j(z).optional(),
|
|
5325
|
+
value: j(z).optional()
|
|
5325
5326
|
},
|
|
5326
5327
|
"graph.node.condition.set": {
|
|
5327
|
-
...
|
|
5328
|
-
before:
|
|
5329
|
-
value:
|
|
5328
|
+
...B,
|
|
5329
|
+
before: M(Hc),
|
|
5330
|
+
value: M(Hc)
|
|
5330
5331
|
},
|
|
5331
5332
|
"graph.node.values.set": {
|
|
5332
|
-
...
|
|
5333
|
-
before:
|
|
5334
|
-
value:
|
|
5333
|
+
...B,
|
|
5334
|
+
before: j(z),
|
|
5335
|
+
value: j(z)
|
|
5335
5336
|
},
|
|
5336
5337
|
"graph.node.wait.set": {
|
|
5337
|
-
...
|
|
5338
|
-
target:
|
|
5339
|
-
before:
|
|
5340
|
-
value:
|
|
5338
|
+
...B,
|
|
5339
|
+
target: M({ kind: I("flow") }),
|
|
5340
|
+
before: M(Uc),
|
|
5341
|
+
value: M(Uc)
|
|
5341
5342
|
},
|
|
5342
5343
|
"graph.node.webhook.set": {
|
|
5343
|
-
...
|
|
5344
|
-
target:
|
|
5345
|
-
before:
|
|
5346
|
-
value:
|
|
5344
|
+
...B,
|
|
5345
|
+
target: M({ kind: I("flow") }),
|
|
5346
|
+
before: M(Wc),
|
|
5347
|
+
value: M(Wc)
|
|
5347
5348
|
},
|
|
5348
5349
|
"graph.node.task.ports.set": {
|
|
5349
|
-
...
|
|
5350
|
-
before:
|
|
5351
|
-
value:
|
|
5350
|
+
...B,
|
|
5351
|
+
before: M(Ic),
|
|
5352
|
+
value: M(Ic)
|
|
5352
5353
|
},
|
|
5353
5354
|
"graph.node.task.name.set": {
|
|
5354
|
-
...
|
|
5355
|
-
before:
|
|
5356
|
-
value:
|
|
5355
|
+
...B,
|
|
5356
|
+
before: R,
|
|
5357
|
+
value: R
|
|
5357
5358
|
},
|
|
5358
5359
|
"graph.node.task.capabilities.set": {
|
|
5359
|
-
...
|
|
5360
|
-
before:
|
|
5361
|
-
value:
|
|
5360
|
+
...B,
|
|
5361
|
+
before: j(Lc).optional(),
|
|
5362
|
+
value: j(Lc).optional()
|
|
5362
5363
|
},
|
|
5363
5364
|
"graph.trigger.config.set": {
|
|
5364
|
-
nodeId:
|
|
5365
|
-
name:
|
|
5366
|
-
before:
|
|
5367
|
-
value:
|
|
5365
|
+
nodeId: R,
|
|
5366
|
+
name: R,
|
|
5367
|
+
before: Dc.optional(),
|
|
5368
|
+
value: Dc.optional()
|
|
5368
5369
|
},
|
|
5369
5370
|
"graph.trigger.schedule.set": {
|
|
5370
|
-
nodeId:
|
|
5371
|
-
before:
|
|
5372
|
-
value:
|
|
5371
|
+
nodeId: R,
|
|
5372
|
+
before: Gc,
|
|
5373
|
+
value: Gc
|
|
5373
5374
|
},
|
|
5374
5375
|
"module.create": {
|
|
5375
|
-
moduleId:
|
|
5376
|
-
module:
|
|
5376
|
+
moduleId: R,
|
|
5377
|
+
module: nl
|
|
5377
5378
|
},
|
|
5378
|
-
"module.delete": { moduleId:
|
|
5379
|
+
"module.delete": { moduleId: R },
|
|
5379
5380
|
"module.rename": {
|
|
5380
|
-
moduleId:
|
|
5381
|
-
before:
|
|
5382
|
-
name:
|
|
5381
|
+
moduleId: R,
|
|
5382
|
+
before: R,
|
|
5383
|
+
name: R
|
|
5383
5384
|
},
|
|
5384
5385
|
"module.source.replace": {
|
|
5385
|
-
moduleId:
|
|
5386
|
-
beforeImports:
|
|
5387
|
-
beforeSource:
|
|
5388
|
-
imports:
|
|
5389
|
-
source:
|
|
5386
|
+
moduleId: R,
|
|
5387
|
+
beforeImports: Oc,
|
|
5388
|
+
beforeSource: R,
|
|
5389
|
+
imports: Oc,
|
|
5390
|
+
source: R
|
|
5390
5391
|
},
|
|
5391
5392
|
"subflow.create": {
|
|
5392
|
-
subflowId:
|
|
5393
|
-
subflow:
|
|
5393
|
+
subflowId: R,
|
|
5394
|
+
subflow: $c.extend({ graph: el })
|
|
5394
5395
|
},
|
|
5395
5396
|
"subflow.definition.set": {
|
|
5396
|
-
subflowId:
|
|
5397
|
-
before:
|
|
5398
|
-
definition:
|
|
5397
|
+
subflowId: R,
|
|
5398
|
+
before: $c,
|
|
5399
|
+
definition: $c
|
|
5399
5400
|
},
|
|
5400
|
-
"subflow.delete": { subflowId:
|
|
5401
|
+
"subflow.delete": { subflowId: R },
|
|
5401
5402
|
"task.create": {
|
|
5402
|
-
taskId:
|
|
5403
|
-
task:
|
|
5403
|
+
taskId: R,
|
|
5404
|
+
task: Vc
|
|
5404
5405
|
},
|
|
5405
|
-
"task.delete": { taskId:
|
|
5406
|
+
"task.delete": { taskId: R },
|
|
5406
5407
|
"task.connector.connection.set": {
|
|
5407
|
-
taskId:
|
|
5408
|
-
before:
|
|
5409
|
-
value:
|
|
5408
|
+
taskId: R,
|
|
5409
|
+
before: R.optional(),
|
|
5410
|
+
value: R.optional()
|
|
5410
5411
|
},
|
|
5411
5412
|
"task.agent.set": {
|
|
5412
|
-
taskId:
|
|
5413
|
-
before:
|
|
5414
|
-
value:
|
|
5413
|
+
taskId: R,
|
|
5414
|
+
before: Vc,
|
|
5415
|
+
value: Vc
|
|
5415
5416
|
},
|
|
5416
5417
|
"task.llm.mode.set": {
|
|
5417
|
-
taskId:
|
|
5418
|
-
before:
|
|
5419
|
-
value:
|
|
5418
|
+
taskId: R,
|
|
5419
|
+
before: F(["chat", "json"]),
|
|
5420
|
+
value: F(["chat", "json"])
|
|
5420
5421
|
},
|
|
5421
5422
|
"task.name.set": {
|
|
5422
|
-
taskId:
|
|
5423
|
-
before:
|
|
5424
|
-
value:
|
|
5423
|
+
taskId: R,
|
|
5424
|
+
before: R,
|
|
5425
|
+
value: R
|
|
5425
5426
|
}
|
|
5426
5427
|
};
|
|
5427
|
-
|
|
5428
|
-
kind:
|
|
5428
|
+
j(N([...new Map(Object.entries(il).map(([e, t]) => [e, t instanceof D ? t : M({
|
|
5429
|
+
kind: I(e),
|
|
5429
5430
|
...t
|
|
5430
5431
|
})])).values()])).min(1);
|
|
5431
5432
|
//#endregion
|
|
5432
5433
|
//#region src/flow/common/change.ts
|
|
5433
|
-
function
|
|
5434
|
+
function al(e) {
|
|
5434
5435
|
return Object.fromEntries(e.flatMap((e) => "handle" in e ? [[e.handle, e]] : []));
|
|
5435
5436
|
}
|
|
5436
5437
|
//#endregion
|
|
5437
5438
|
//#region src/json-schema-subset/utils.ts
|
|
5438
|
-
var
|
|
5439
|
-
function
|
|
5440
|
-
let e =
|
|
5441
|
-
return
|
|
5439
|
+
var ol = 0;
|
|
5440
|
+
function sl() {
|
|
5441
|
+
let e = ol;
|
|
5442
|
+
return ol += 1, e;
|
|
5442
5443
|
}
|
|
5443
|
-
function
|
|
5444
|
+
function cl(e) {
|
|
5444
5445
|
if (typeof e == "object" && e && !Object.isFrozen(e)) {
|
|
5445
|
-
for (let t of Object.getOwnPropertyNames(e))
|
|
5446
|
+
for (let t of Object.getOwnPropertyNames(e)) cl(Reflect.get(e, t));
|
|
5446
5447
|
Object.freeze(e);
|
|
5447
5448
|
}
|
|
5448
5449
|
return e;
|
|
5449
5450
|
}
|
|
5450
|
-
function
|
|
5451
|
+
function ll(e, t) {
|
|
5451
5452
|
let n = {};
|
|
5452
5453
|
for (let r of t) r in e && (n[r] = e[r]);
|
|
5453
5454
|
return n;
|
|
5454
5455
|
}
|
|
5455
|
-
function
|
|
5456
|
+
function ul(e) {
|
|
5456
5457
|
if (typeof e != "object" || !e) return e;
|
|
5457
5458
|
if (Array.isArray(e)) {
|
|
5458
5459
|
let t = [];
|
|
5459
|
-
for (let [n, r] of e.entries()) t[n] =
|
|
5460
|
+
for (let [n, r] of e.entries()) t[n] = ul(r);
|
|
5460
5461
|
return t;
|
|
5461
5462
|
}
|
|
5462
5463
|
{
|
|
5463
5464
|
let t = {};
|
|
5464
|
-
for (let n in e) t[n] =
|
|
5465
|
+
for (let n in e) t[n] = ul(e[n]);
|
|
5465
5466
|
return t;
|
|
5466
5467
|
}
|
|
5467
5468
|
}
|
|
5468
|
-
function
|
|
5469
|
+
function dl(e, t) {
|
|
5469
5470
|
if (e === t) return !0;
|
|
5470
5471
|
if (typeof e != "object" || !e || typeof e != typeof t) return !1;
|
|
5471
5472
|
if (Array.isArray(e)) {
|
|
5472
5473
|
if (!Array.isArray(t) || e.length !== t.length) return !1;
|
|
5473
|
-
for (let [n, r] of e.entries()) if (!
|
|
5474
|
+
for (let [n, r] of e.entries()) if (!dl(r, t[n])) return !1;
|
|
5474
5475
|
} else {
|
|
5475
5476
|
if (Array.isArray(t)) return !1;
|
|
5476
|
-
for (let n in e) if (!(n in t) || !
|
|
5477
|
+
for (let n in e) if (!(n in t) || !dl(e[n], t[n])) return !1;
|
|
5477
5478
|
for (let n in t) if (!(n in e)) return !1;
|
|
5478
5479
|
}
|
|
5479
5480
|
return !0;
|
|
5480
5481
|
}
|
|
5481
5482
|
//#endregion
|
|
5482
5483
|
//#region src/json-schema-subset/expression/result.ts
|
|
5483
|
-
var
|
|
5484
|
+
var V = Object.freeze({
|
|
5484
5485
|
Equals: 0,
|
|
5485
5486
|
Containing: 1,
|
|
5486
5487
|
ContainedBy: 2,
|
|
5487
5488
|
Rejection: 3,
|
|
5488
5489
|
Intersection: 4
|
|
5489
|
-
}),
|
|
5490
|
-
[
|
|
5491
|
-
[
|
|
5492
|
-
[
|
|
5493
|
-
[
|
|
5494
|
-
[
|
|
5495
|
-
]),
|
|
5490
|
+
}), H = yl(V.Equals), U = yl(V.Containing), W = yl(V.ContainedBy), G = yl(V.Rejection), K = yl(V.Intersection), fl = cl([
|
|
5491
|
+
[V.Equals, H],
|
|
5492
|
+
[V.Containing, U],
|
|
5493
|
+
[V.ContainedBy, W],
|
|
5494
|
+
[V.Rejection, G],
|
|
5495
|
+
[V.Intersection, K]
|
|
5496
|
+
]), pl = (() => {
|
|
5496
5497
|
let e = 0;
|
|
5497
|
-
for (let [t, n] of
|
|
5498
|
+
for (let [t, n] of fl) e |= n;
|
|
5498
5499
|
return e;
|
|
5499
5500
|
})();
|
|
5500
|
-
function pl(e) {
|
|
5501
|
-
return !!(e & U);
|
|
5502
|
-
}
|
|
5503
5501
|
function ml(e) {
|
|
5504
|
-
return !!(e &
|
|
5502
|
+
return !!(e & H);
|
|
5505
5503
|
}
|
|
5506
5504
|
function hl(e) {
|
|
5507
|
-
return !!(e &
|
|
5505
|
+
return !!(e & U);
|
|
5508
5506
|
}
|
|
5509
5507
|
function gl(e) {
|
|
5510
|
-
return !!(e &
|
|
5508
|
+
return !!(e & W);
|
|
5511
5509
|
}
|
|
5512
5510
|
function _l(e) {
|
|
5513
|
-
return !!(e &
|
|
5511
|
+
return !!(e & G);
|
|
5514
5512
|
}
|
|
5515
5513
|
function vl(e) {
|
|
5514
|
+
return !!(e & K);
|
|
5515
|
+
}
|
|
5516
|
+
function yl(e) {
|
|
5516
5517
|
return 1 << e;
|
|
5517
5518
|
}
|
|
5518
5519
|
//#endregion
|
|
5519
5520
|
//#region src/json-schema-subset/expression/combination.ts
|
|
5520
|
-
function
|
|
5521
|
-
let t = 0, n = 0, r = { push: (r) => (t = n === 0 ? r :
|
|
5521
|
+
function bl(e) {
|
|
5522
|
+
let t = 0, n = 0, r = { push: (r) => (t = n === 0 ? r : xl(t, r, e), n += 1, t) };
|
|
5522
5523
|
return Object.defineProperties(r, {
|
|
5523
5524
|
result: { get: () => t },
|
|
5524
5525
|
count: { get: () => n }
|
|
5525
5526
|
}), r;
|
|
5526
5527
|
}
|
|
5527
|
-
function
|
|
5528
|
+
function xl(e, t, n) {
|
|
5528
5529
|
let r = 0;
|
|
5529
|
-
for (let [i, a] of
|
|
5530
|
-
for (let [e, a] of
|
|
5530
|
+
for (let [i, a] of fl) if (a & e) {
|
|
5531
|
+
for (let [e, a] of fl) if (a & t && (r |= n(i, e), r === pl)) return r;
|
|
5531
5532
|
}
|
|
5532
5533
|
return r;
|
|
5533
5534
|
}
|
|
5534
5535
|
//#endregion
|
|
5535
5536
|
//#region src/json-schema-subset/expression/calculator.ts
|
|
5536
|
-
var
|
|
5537
|
+
var q = Object.freeze({
|
|
5537
5538
|
Save: 0,
|
|
5538
5539
|
OneOf: 1,
|
|
5539
5540
|
AllOf: 2,
|
|
@@ -5541,289 +5542,289 @@ var J = Object.freeze({
|
|
|
5541
5542
|
Not: 4,
|
|
5542
5543
|
Swap: 5
|
|
5543
5544
|
});
|
|
5544
|
-
function
|
|
5545
|
+
function Sl(e, t) {
|
|
5545
5546
|
switch (e) {
|
|
5546
|
-
case
|
|
5547
|
-
case
|
|
5548
|
-
case
|
|
5549
|
-
case
|
|
5550
|
-
case
|
|
5551
|
-
case
|
|
5547
|
+
case q.Save: return t[0];
|
|
5548
|
+
case q.OneOf: return wl(t);
|
|
5549
|
+
case q.AllOf:
|
|
5550
|
+
case q.AnyOf: return Tl(e, t);
|
|
5551
|
+
case q.Not:
|
|
5552
|
+
case q.Swap: return El(e, t[0]);
|
|
5552
5553
|
}
|
|
5553
5554
|
}
|
|
5554
|
-
function Sl(e) {
|
|
5555
|
-
return Tl(J.Swap, e);
|
|
5556
|
-
}
|
|
5557
5555
|
function Cl(e) {
|
|
5556
|
+
return El(q.Swap, e);
|
|
5557
|
+
}
|
|
5558
|
+
function wl(e) {
|
|
5558
5559
|
if (e.length === 1) return e[0];
|
|
5559
|
-
let t =
|
|
5560
|
+
let t = Tl(q.AnyOf, e), n = [];
|
|
5560
5561
|
for (let t = 0; t < e.length; ++t) for (let r = t + 1; r < e.length; ++r) {
|
|
5561
|
-
let i = e[t], a = e[r], o =
|
|
5562
|
+
let i = e[t], a = e[r], o = Tl(q.AllOf, [i, a]);
|
|
5562
5563
|
n.push(o);
|
|
5563
5564
|
}
|
|
5564
|
-
let r =
|
|
5565
|
-
return
|
|
5565
|
+
let r = Tl(q.AnyOf, n), i = El(q.Not, r);
|
|
5566
|
+
return Tl(q.AllOf, [t, i]);
|
|
5566
5567
|
}
|
|
5567
|
-
function
|
|
5568
|
+
function Tl(e, t) {
|
|
5568
5569
|
if (t.length < 0) throw Error("invalid expressions: empty array");
|
|
5569
5570
|
let n;
|
|
5570
5571
|
switch (e) {
|
|
5571
|
-
case
|
|
5572
|
-
n =
|
|
5572
|
+
case q.AllOf:
|
|
5573
|
+
n = bl(Dl);
|
|
5573
5574
|
break;
|
|
5574
|
-
case
|
|
5575
|
-
n =
|
|
5575
|
+
case q.AnyOf:
|
|
5576
|
+
n = bl(Ol);
|
|
5576
5577
|
break;
|
|
5577
5578
|
default: throw Error(`invalid operator ${e}`);
|
|
5578
5579
|
}
|
|
5579
5580
|
for (let e of t) n.push(e);
|
|
5580
5581
|
return n.result;
|
|
5581
5582
|
}
|
|
5582
|
-
function
|
|
5583
|
+
function El(e, t) {
|
|
5583
5584
|
let n, r = 0;
|
|
5584
5585
|
switch (e) {
|
|
5585
|
-
case
|
|
5586
|
-
n = Ol;
|
|
5587
|
-
break;
|
|
5588
|
-
case J.Swap:
|
|
5586
|
+
case q.Not:
|
|
5589
5587
|
n = kl;
|
|
5590
5588
|
break;
|
|
5589
|
+
case q.Swap:
|
|
5590
|
+
n = Al;
|
|
5591
|
+
break;
|
|
5591
5592
|
default: throw Error(`invalid operator ${e}`);
|
|
5592
5593
|
}
|
|
5593
|
-
for (let [e, i] of
|
|
5594
|
+
for (let [e, i] of fl) i & t && (r |= n(e));
|
|
5594
5595
|
return r;
|
|
5595
5596
|
}
|
|
5596
|
-
function
|
|
5597
|
+
function Dl(e, t) {
|
|
5597
5598
|
let n = 0;
|
|
5598
5599
|
switch (e) {
|
|
5599
|
-
case
|
|
5600
|
+
case V.Equals:
|
|
5600
5601
|
switch (t) {
|
|
5601
|
-
case
|
|
5602
|
-
n =
|
|
5602
|
+
case V.Equals:
|
|
5603
|
+
n = H;
|
|
5603
5604
|
break;
|
|
5604
|
-
case
|
|
5605
|
-
n =
|
|
5605
|
+
case V.Containing:
|
|
5606
|
+
n = H;
|
|
5606
5607
|
break;
|
|
5607
|
-
case
|
|
5608
|
-
n =
|
|
5608
|
+
case V.ContainedBy:
|
|
5609
|
+
n = W;
|
|
5609
5610
|
break;
|
|
5610
|
-
case
|
|
5611
|
+
case V.Rejection:
|
|
5611
5612
|
n = 0;
|
|
5612
5613
|
break;
|
|
5613
|
-
case
|
|
5614
|
+
case V.Intersection: n = W;
|
|
5614
5615
|
}
|
|
5615
5616
|
break;
|
|
5616
|
-
case
|
|
5617
|
+
case V.Containing:
|
|
5617
5618
|
switch (t) {
|
|
5618
|
-
case
|
|
5619
|
-
n =
|
|
5619
|
+
case V.Equals:
|
|
5620
|
+
n = H;
|
|
5620
5621
|
break;
|
|
5621
|
-
case
|
|
5622
|
-
n =
|
|
5622
|
+
case V.Containing:
|
|
5623
|
+
n = H | U;
|
|
5623
5624
|
break;
|
|
5624
|
-
case
|
|
5625
|
-
n =
|
|
5625
|
+
case V.ContainedBy:
|
|
5626
|
+
n = W;
|
|
5626
5627
|
break;
|
|
5627
|
-
case
|
|
5628
|
-
n =
|
|
5628
|
+
case V.Rejection:
|
|
5629
|
+
n = G;
|
|
5629
5630
|
break;
|
|
5630
|
-
case
|
|
5631
|
+
case V.Intersection: n = K | W;
|
|
5631
5632
|
}
|
|
5632
5633
|
break;
|
|
5633
|
-
case
|
|
5634
|
+
case V.ContainedBy:
|
|
5634
5635
|
switch (t) {
|
|
5635
|
-
case
|
|
5636
|
-
n =
|
|
5636
|
+
case V.Equals:
|
|
5637
|
+
n = W;
|
|
5637
5638
|
break;
|
|
5638
|
-
case
|
|
5639
|
-
n =
|
|
5639
|
+
case V.Containing:
|
|
5640
|
+
n = W;
|
|
5640
5641
|
break;
|
|
5641
|
-
case
|
|
5642
|
-
n =
|
|
5642
|
+
case V.ContainedBy:
|
|
5643
|
+
n = W;
|
|
5643
5644
|
break;
|
|
5644
|
-
case
|
|
5645
|
+
case V.Rejection:
|
|
5645
5646
|
n = 0;
|
|
5646
5647
|
break;
|
|
5647
|
-
case
|
|
5648
|
+
case V.Intersection: n = W;
|
|
5648
5649
|
}
|
|
5649
5650
|
break;
|
|
5650
|
-
case
|
|
5651
|
+
case V.Rejection:
|
|
5651
5652
|
switch (t) {
|
|
5652
|
-
case
|
|
5653
|
+
case V.Equals:
|
|
5653
5654
|
n = 0;
|
|
5654
5655
|
break;
|
|
5655
|
-
case
|
|
5656
|
-
n =
|
|
5656
|
+
case V.Containing:
|
|
5657
|
+
n = G;
|
|
5657
5658
|
break;
|
|
5658
|
-
case
|
|
5659
|
+
case V.ContainedBy:
|
|
5659
5660
|
n = 0;
|
|
5660
5661
|
break;
|
|
5661
|
-
case
|
|
5662
|
-
n =
|
|
5662
|
+
case V.Rejection:
|
|
5663
|
+
n = G;
|
|
5663
5664
|
break;
|
|
5664
|
-
case
|
|
5665
|
+
case V.Intersection: n = G;
|
|
5665
5666
|
}
|
|
5666
5667
|
break;
|
|
5667
|
-
case
|
|
5668
|
-
case
|
|
5669
|
-
n =
|
|
5668
|
+
case V.Intersection: switch (t) {
|
|
5669
|
+
case V.Equals:
|
|
5670
|
+
n = W;
|
|
5670
5671
|
break;
|
|
5671
|
-
case
|
|
5672
|
-
n =
|
|
5672
|
+
case V.Containing:
|
|
5673
|
+
n = K | W;
|
|
5673
5674
|
break;
|
|
5674
|
-
case
|
|
5675
|
-
n =
|
|
5675
|
+
case V.ContainedBy:
|
|
5676
|
+
n = W;
|
|
5676
5677
|
break;
|
|
5677
|
-
case
|
|
5678
|
-
n =
|
|
5678
|
+
case V.Rejection:
|
|
5679
|
+
n = G;
|
|
5679
5680
|
break;
|
|
5680
|
-
case
|
|
5681
|
+
case V.Intersection: n = W | G | K;
|
|
5681
5682
|
}
|
|
5682
5683
|
}
|
|
5683
5684
|
return n;
|
|
5684
5685
|
}
|
|
5685
|
-
function
|
|
5686
|
+
function Ol(e, t) {
|
|
5686
5687
|
let n = 0;
|
|
5687
5688
|
switch (e) {
|
|
5688
|
-
case
|
|
5689
|
+
case V.Equals:
|
|
5689
5690
|
switch (t) {
|
|
5690
|
-
case
|
|
5691
|
+
case V.Equals:
|
|
5692
|
+
n = H;
|
|
5693
|
+
break;
|
|
5694
|
+
case V.Containing:
|
|
5691
5695
|
n = U;
|
|
5692
5696
|
break;
|
|
5693
|
-
case
|
|
5694
|
-
n =
|
|
5697
|
+
case V.ContainedBy:
|
|
5698
|
+
n = H;
|
|
5695
5699
|
break;
|
|
5696
|
-
case
|
|
5700
|
+
case V.Rejection:
|
|
5697
5701
|
n = U;
|
|
5698
5702
|
break;
|
|
5699
|
-
case
|
|
5700
|
-
n = W;
|
|
5701
|
-
break;
|
|
5702
|
-
case H.Intersection: n = W;
|
|
5703
|
+
case V.Intersection: n = U;
|
|
5703
5704
|
}
|
|
5704
5705
|
break;
|
|
5705
|
-
case
|
|
5706
|
+
case V.Containing:
|
|
5706
5707
|
switch (t) {
|
|
5707
|
-
case
|
|
5708
|
-
n =
|
|
5708
|
+
case V.Equals:
|
|
5709
|
+
n = U;
|
|
5709
5710
|
break;
|
|
5710
|
-
case
|
|
5711
|
-
n =
|
|
5711
|
+
case V.Containing:
|
|
5712
|
+
n = U;
|
|
5712
5713
|
break;
|
|
5713
|
-
case
|
|
5714
|
-
n =
|
|
5714
|
+
case V.ContainedBy:
|
|
5715
|
+
n = U;
|
|
5715
5716
|
break;
|
|
5716
|
-
case
|
|
5717
|
-
n =
|
|
5717
|
+
case V.Rejection:
|
|
5718
|
+
n = U;
|
|
5718
5719
|
break;
|
|
5719
|
-
case
|
|
5720
|
+
case V.Intersection: n = U;
|
|
5720
5721
|
}
|
|
5721
5722
|
break;
|
|
5722
|
-
case
|
|
5723
|
+
case V.ContainedBy:
|
|
5723
5724
|
switch (t) {
|
|
5724
|
-
case
|
|
5725
|
-
n =
|
|
5725
|
+
case V.Equals:
|
|
5726
|
+
n = H;
|
|
5726
5727
|
break;
|
|
5727
|
-
case
|
|
5728
|
-
n =
|
|
5728
|
+
case V.Containing:
|
|
5729
|
+
n = U;
|
|
5729
5730
|
break;
|
|
5730
|
-
case
|
|
5731
|
-
n =
|
|
5731
|
+
case V.ContainedBy:
|
|
5732
|
+
n = H | W;
|
|
5732
5733
|
break;
|
|
5733
|
-
case
|
|
5734
|
-
n =
|
|
5734
|
+
case V.Rejection:
|
|
5735
|
+
n = K;
|
|
5735
5736
|
break;
|
|
5736
|
-
case
|
|
5737
|
+
case V.Intersection: n = U | K;
|
|
5737
5738
|
}
|
|
5738
5739
|
break;
|
|
5739
|
-
case
|
|
5740
|
+
case V.Rejection:
|
|
5740
5741
|
switch (t) {
|
|
5741
|
-
case
|
|
5742
|
-
n =
|
|
5743
|
-
break;
|
|
5744
|
-
case H.Containing:
|
|
5745
|
-
n = W;
|
|
5742
|
+
case V.Equals:
|
|
5743
|
+
n = U;
|
|
5746
5744
|
break;
|
|
5747
|
-
case
|
|
5748
|
-
n =
|
|
5745
|
+
case V.Containing:
|
|
5746
|
+
n = U;
|
|
5749
5747
|
break;
|
|
5750
|
-
case
|
|
5748
|
+
case V.ContainedBy:
|
|
5751
5749
|
n = K;
|
|
5752
5750
|
break;
|
|
5753
|
-
case
|
|
5751
|
+
case V.Rejection:
|
|
5752
|
+
n = G;
|
|
5753
|
+
break;
|
|
5754
|
+
case V.Intersection: n = K;
|
|
5754
5755
|
}
|
|
5755
5756
|
break;
|
|
5756
|
-
case
|
|
5757
|
-
case
|
|
5758
|
-
n =
|
|
5757
|
+
case V.Intersection: switch (t) {
|
|
5758
|
+
case V.Equals:
|
|
5759
|
+
n = U;
|
|
5759
5760
|
break;
|
|
5760
|
-
case
|
|
5761
|
-
n =
|
|
5761
|
+
case V.Containing:
|
|
5762
|
+
n = U;
|
|
5762
5763
|
break;
|
|
5763
|
-
case
|
|
5764
|
-
n =
|
|
5764
|
+
case V.ContainedBy:
|
|
5765
|
+
n = U | K;
|
|
5765
5766
|
break;
|
|
5766
|
-
case
|
|
5767
|
-
n =
|
|
5767
|
+
case V.Rejection:
|
|
5768
|
+
n = K;
|
|
5768
5769
|
break;
|
|
5769
|
-
case
|
|
5770
|
+
case V.Intersection: n = U | K;
|
|
5770
5771
|
}
|
|
5771
5772
|
}
|
|
5772
5773
|
return n;
|
|
5773
5774
|
}
|
|
5774
|
-
function
|
|
5775
|
+
function kl(e) {
|
|
5775
5776
|
let t = 0;
|
|
5776
5777
|
switch (e) {
|
|
5777
|
-
case
|
|
5778
|
-
t =
|
|
5778
|
+
case V.Equals:
|
|
5779
|
+
t = G;
|
|
5779
5780
|
break;
|
|
5780
|
-
case
|
|
5781
|
-
t =
|
|
5781
|
+
case V.Containing:
|
|
5782
|
+
t = G;
|
|
5782
5783
|
break;
|
|
5783
|
-
case
|
|
5784
|
-
t =
|
|
5784
|
+
case V.ContainedBy:
|
|
5785
|
+
t = K;
|
|
5785
5786
|
break;
|
|
5786
|
-
case
|
|
5787
|
-
t =
|
|
5787
|
+
case V.Rejection:
|
|
5788
|
+
t = H | U;
|
|
5788
5789
|
break;
|
|
5789
|
-
case
|
|
5790
|
+
case V.Intersection: t = W | K;
|
|
5790
5791
|
}
|
|
5791
5792
|
return t;
|
|
5792
5793
|
}
|
|
5793
|
-
function
|
|
5794
|
+
function Al(e) {
|
|
5794
5795
|
let t = 0;
|
|
5795
5796
|
switch (e) {
|
|
5796
|
-
case
|
|
5797
|
-
t =
|
|
5797
|
+
case V.Equals:
|
|
5798
|
+
t = H;
|
|
5798
5799
|
break;
|
|
5799
|
-
case
|
|
5800
|
-
t = G;
|
|
5801
|
-
break;
|
|
5802
|
-
case H.ContainedBy:
|
|
5800
|
+
case V.Containing:
|
|
5803
5801
|
t = W;
|
|
5804
5802
|
break;
|
|
5805
|
-
case
|
|
5806
|
-
t =
|
|
5803
|
+
case V.ContainedBy:
|
|
5804
|
+
t = U;
|
|
5805
|
+
break;
|
|
5806
|
+
case V.Rejection:
|
|
5807
|
+
t = G;
|
|
5807
5808
|
break;
|
|
5808
|
-
case
|
|
5809
|
+
case V.Intersection: t = K;
|
|
5809
5810
|
}
|
|
5810
5811
|
return t;
|
|
5811
5812
|
}
|
|
5812
5813
|
//#endregion
|
|
5813
5814
|
//#region src/json-schema-subset/expression/types.ts
|
|
5814
|
-
var
|
|
5815
|
+
var jl = Object.freeze({
|
|
5815
5816
|
Leaf: 0,
|
|
5816
5817
|
Not: 1,
|
|
5817
5818
|
AllOf: 2,
|
|
5818
5819
|
AnyOf: 3,
|
|
5819
5820
|
OneOf: 4
|
|
5820
|
-
}),
|
|
5821
|
+
}), Ml = (e) => (t, n) => {
|
|
5821
5822
|
let r = {
|
|
5822
5823
|
parent: null,
|
|
5823
5824
|
swapped: !1,
|
|
5824
5825
|
expressions: null,
|
|
5825
5826
|
calculation: {
|
|
5826
|
-
operator:
|
|
5827
|
+
operator: q.Save,
|
|
5827
5828
|
results: [0],
|
|
5828
5829
|
willSwap: !1,
|
|
5829
5830
|
count: 0
|
|
@@ -5842,10 +5843,10 @@ var Al = Object.freeze({
|
|
|
5842
5843
|
for (; a.length > 0;) c(a.pop());
|
|
5843
5844
|
}
|
|
5844
5845
|
function o(t) {
|
|
5845
|
-
let n =
|
|
5846
|
+
let n = H, [r, o] = t.expressions;
|
|
5846
5847
|
if (!e.equals(r, o)) {
|
|
5847
5848
|
let a = e.describe(r);
|
|
5848
|
-
if (a.kind !==
|
|
5849
|
+
if (a.kind !== jl.Leaf) {
|
|
5849
5850
|
let [e, n] = s(a, !1);
|
|
5850
5851
|
t.expressions = null, t.calculation = e;
|
|
5851
5852
|
for (let [e, r] of n.entries()) i.push({
|
|
@@ -5860,7 +5861,7 @@ var Al = Object.freeze({
|
|
|
5860
5861
|
return;
|
|
5861
5862
|
}
|
|
5862
5863
|
let c = e.describe(o);
|
|
5863
|
-
if (c.kind !==
|
|
5864
|
+
if (c.kind !== jl.Leaf) {
|
|
5864
5865
|
let [e, n] = s(c, !0);
|
|
5865
5866
|
t.expressions = null, t.calculation = e;
|
|
5866
5867
|
for (let [e, a] of n.entries()) i.push({
|
|
@@ -5877,26 +5878,26 @@ var Al = Object.freeze({
|
|
|
5877
5878
|
if (n = e.calculate(r, o), e.observeCalculation?.(r, o, n, t.swapped), n === 0) throw Error("cannot response expression as none");
|
|
5878
5879
|
}
|
|
5879
5880
|
t.expressions = null, t.calculation = {
|
|
5880
|
-
operator:
|
|
5881
|
+
operator: q.Save,
|
|
5881
5882
|
results: [n],
|
|
5882
5883
|
willSwap: !1,
|
|
5883
5884
|
count: 0
|
|
5884
5885
|
}, a.push(t);
|
|
5885
5886
|
}
|
|
5886
5887
|
function s(e, t) {
|
|
5887
|
-
let n =
|
|
5888
|
+
let n = q.Save, r;
|
|
5888
5889
|
switch (e.kind) {
|
|
5889
|
-
case
|
|
5890
|
-
n =
|
|
5890
|
+
case jl.Not:
|
|
5891
|
+
n = q.Not, r = [e.expression];
|
|
5891
5892
|
break;
|
|
5892
|
-
case
|
|
5893
|
-
n =
|
|
5893
|
+
case jl.AllOf:
|
|
5894
|
+
n = q.AllOf, r = [...e.expressions];
|
|
5894
5895
|
break;
|
|
5895
|
-
case
|
|
5896
|
-
n =
|
|
5896
|
+
case jl.AnyOf:
|
|
5897
|
+
n = q.AnyOf, r = [...e.expressions];
|
|
5897
5898
|
break;
|
|
5898
|
-
case
|
|
5899
|
-
n =
|
|
5899
|
+
case jl.OneOf:
|
|
5900
|
+
n = q.OneOf, r = [...e.expressions];
|
|
5900
5901
|
break;
|
|
5901
5902
|
default: throw Error(`invalid kind ${e.kind}`);
|
|
5902
5903
|
}
|
|
@@ -5908,8 +5909,8 @@ var Al = Object.freeze({
|
|
|
5908
5909
|
}, r];
|
|
5909
5910
|
}
|
|
5910
5911
|
function c(e) {
|
|
5911
|
-
let t = e.calculation, n = e.parent, r =
|
|
5912
|
-
if (r === 0 && (r =
|
|
5912
|
+
let t = e.calculation, n = e.parent, r = Sl(t.operator, t.results);
|
|
5913
|
+
if (r === 0 && (r = W), t.willSwap && (r = Cl(r)), n) {
|
|
5913
5914
|
let e = n.node.calculation, t = e.results;
|
|
5914
5915
|
t[n.index] = r, e.count += 1, e.count >= t.length && a.push(n.node);
|
|
5915
5916
|
}
|
|
@@ -5917,79 +5918,79 @@ var Al = Object.freeze({
|
|
|
5917
5918
|
let l = r.calculation.results[0];
|
|
5918
5919
|
if (l === 0) throw Error("cannot find result of root");
|
|
5919
5920
|
return l;
|
|
5920
|
-
},
|
|
5921
|
+
}, Nl = class extends Error {
|
|
5921
5922
|
constructor(e = []) {
|
|
5922
|
-
super(
|
|
5923
|
+
super(Il(e)), this.name = "SchemaError", this.items = e;
|
|
5923
5924
|
}
|
|
5924
|
-
},
|
|
5925
|
+
}, Pl = Object.freeze({
|
|
5925
5926
|
Compiled: 0,
|
|
5926
5927
|
External: 1
|
|
5927
5928
|
});
|
|
5928
|
-
function
|
|
5929
|
+
function Fl(e) {
|
|
5929
5930
|
switch (e.kind) {
|
|
5930
|
-
case
|
|
5931
|
+
case Pl.Compiled: {
|
|
5931
5932
|
let { message: t, path: n } = e;
|
|
5932
5933
|
return `${t} (at ${n.length > 0 ? n.join(".") : "$root"})`;
|
|
5933
5934
|
}
|
|
5934
|
-
case
|
|
5935
|
+
case Pl.External: return String(e.error);
|
|
5935
5936
|
}
|
|
5936
5937
|
}
|
|
5937
|
-
function
|
|
5938
|
+
function Il(e) {
|
|
5938
5939
|
switch (e.length) {
|
|
5939
5940
|
case 0: return "without any items";
|
|
5940
|
-
case 1: return
|
|
5941
|
-
default: return `${
|
|
5941
|
+
case 1: return Fl(e[0]);
|
|
5942
|
+
default: return `${Fl(e[0])} ... omit the rest ${e.length - 1} items`;
|
|
5942
5943
|
}
|
|
5943
5944
|
}
|
|
5944
5945
|
//#endregion
|
|
5945
5946
|
//#region src/json-schema-subset/compiler/common.ts
|
|
5946
|
-
var
|
|
5947
|
-
function Ll(e) {
|
|
5948
|
-
return Il.has(e);
|
|
5949
|
-
}
|
|
5947
|
+
var Ll = /* @__PURE__ */ new Set(/* @__PURE__ */ "type.enum.const.multipleOf.maximum.exclusiveMaximum.minimum.exclusiveMinimum.maxLength.minLength.pattern.items.additionalItems.maxItems.minItems.uniqueItems.contains.maxProperties.minProperties.required.properties.patternProperties.additionalProperties.dependencies.propertyNames.if.then.else.allOf.anyOf.oneOf.not.format.contentMediaType.contentEncoding.definitions".split("."));
|
|
5950
5948
|
function Rl(e) {
|
|
5951
|
-
|
|
5949
|
+
return Ll.has(e);
|
|
5950
|
+
}
|
|
5951
|
+
function zl(e) {
|
|
5952
|
+
for (let t in e) if (Rl(t)) return !1;
|
|
5952
5953
|
return !0;
|
|
5953
5954
|
}
|
|
5954
|
-
function
|
|
5955
|
+
function Bl(e, ...t) {
|
|
5955
5956
|
return {
|
|
5956
5957
|
...e,
|
|
5957
5958
|
path: [...e.path, ...t]
|
|
5958
5959
|
};
|
|
5959
5960
|
}
|
|
5960
|
-
function
|
|
5961
|
+
function Vl(e) {
|
|
5961
5962
|
if (typeof e == "boolean") throw Error("JSONSchema7Definition cannot be boolean");
|
|
5962
5963
|
return e;
|
|
5963
5964
|
}
|
|
5964
|
-
function
|
|
5965
|
-
t.push(
|
|
5965
|
+
function Hl({ path: e, errors: t }, n, ...r) {
|
|
5966
|
+
t.push(Ul(e, r, n));
|
|
5966
5967
|
}
|
|
5967
|
-
function
|
|
5968
|
-
t.push(
|
|
5968
|
+
function J({ path: e, warns: t }, n, ...r) {
|
|
5969
|
+
t.push(Ul(e, r, n));
|
|
5969
5970
|
}
|
|
5970
|
-
function
|
|
5971
|
+
function Ul(e, t, n) {
|
|
5971
5972
|
return {
|
|
5972
|
-
kind:
|
|
5973
|
+
kind: Pl.Compiled,
|
|
5973
5974
|
message: n,
|
|
5974
5975
|
path: [...e, ...t]
|
|
5975
5976
|
};
|
|
5976
5977
|
}
|
|
5977
5978
|
//#endregion
|
|
5978
5979
|
//#region src/json-schema-subset/compiler/utils.ts
|
|
5979
|
-
function
|
|
5980
|
+
function Wl(e) {
|
|
5980
5981
|
for (let t in e) {
|
|
5981
5982
|
let n = e[t];
|
|
5982
|
-
n === void 0 ? delete e[t] : n && typeof n == "object" && (Array.isArray(n) ? n.length === 0 && delete e[t] :
|
|
5983
|
+
n === void 0 ? delete e[t] : n && typeof n == "object" && (Array.isArray(n) ? n.length === 0 && delete e[t] : Gl(n) && delete e[t]);
|
|
5983
5984
|
}
|
|
5984
5985
|
return e;
|
|
5985
5986
|
}
|
|
5986
|
-
function
|
|
5987
|
+
function Gl(e) {
|
|
5987
5988
|
for (let t in e) return !1;
|
|
5988
5989
|
return !0;
|
|
5989
5990
|
}
|
|
5990
5991
|
//#endregion
|
|
5991
5992
|
//#region src/json-schema-subset/compiler/wrapper.ts
|
|
5992
|
-
var
|
|
5993
|
+
var Kl = Symbol("compiledId"), ql = Symbol("compiledKind"), Jl = Symbol("compiledPath"), Yl = Symbol("validatorLoader"), Y = Object.freeze({
|
|
5993
5994
|
Extends: 0,
|
|
5994
5995
|
Never: 1,
|
|
5995
5996
|
Any: 2,
|
|
@@ -6002,62 +6003,62 @@ var Gl = Symbol("compiledId"), Kl = Symbol("compiledKind"), ql = Symbol("compile
|
|
|
6002
6003
|
Not: 9,
|
|
6003
6004
|
Combination: 10,
|
|
6004
6005
|
EnumOrConst: 11
|
|
6005
|
-
}),
|
|
6006
|
+
}), Xl = cl(iu(Y.Any, sl(), {}, () => () => !0)), Zl = cl(iu(Y.Never, sl(), {
|
|
6006
6007
|
type: "string",
|
|
6007
6008
|
maxLength: 0,
|
|
6008
6009
|
minLength: 1
|
|
6009
6010
|
}, () => () => !1));
|
|
6010
|
-
function Zl(e) {
|
|
6011
|
-
return typeof e != "object" || !e ? !1 : Gl in e;
|
|
6012
|
-
}
|
|
6013
6011
|
function Ql(e) {
|
|
6014
|
-
return typeof e != "object" || !e ? !1 :
|
|
6015
|
-
}
|
|
6016
|
-
function Z(e) {
|
|
6017
|
-
return Ql(e) ? e[Kl] : X.Extends;
|
|
6012
|
+
return typeof e != "object" || !e ? !1 : Kl in e;
|
|
6018
6013
|
}
|
|
6019
6014
|
function $l(e) {
|
|
6020
|
-
return
|
|
6015
|
+
return typeof e != "object" || !e ? !1 : Kl in e && ql in e;
|
|
6016
|
+
}
|
|
6017
|
+
function X(e) {
|
|
6018
|
+
return $l(e) ? e[ql] : Y.Extends;
|
|
6021
6019
|
}
|
|
6022
6020
|
function eu(e) {
|
|
6023
|
-
return Ql(e) ? e[
|
|
6021
|
+
return $l(e) || Ql(e) ? e[Kl] : e.id;
|
|
6024
6022
|
}
|
|
6025
6023
|
function tu(e) {
|
|
6026
|
-
return
|
|
6027
|
-
|
|
6024
|
+
return $l(e) ? e[Jl] : void 0;
|
|
6025
|
+
}
|
|
6026
|
+
function nu(e) {
|
|
6027
|
+
return typeof e != "object" || !e || Object.defineProperty(e, Kl, {
|
|
6028
|
+
value: sl(),
|
|
6028
6029
|
configurable: !1,
|
|
6029
6030
|
writable: !1,
|
|
6030
6031
|
enumerable: !1
|
|
6031
6032
|
}), e;
|
|
6032
6033
|
}
|
|
6033
|
-
function
|
|
6034
|
-
return
|
|
6034
|
+
function Z(e, t, n, r = []) {
|
|
6035
|
+
return iu(e, sl(), t, n && (() => n.compile(t)), r);
|
|
6035
6036
|
}
|
|
6036
|
-
function
|
|
6037
|
-
return
|
|
6037
|
+
function ru(e) {
|
|
6038
|
+
return iu(Y.Never, sl(), { ...e }, e[Yl], e[Jl]);
|
|
6038
6039
|
}
|
|
6039
|
-
function
|
|
6040
|
+
function iu(e, t, n, r, i = []) {
|
|
6040
6041
|
let a = null;
|
|
6041
6042
|
return Object.defineProperties(n, {
|
|
6042
|
-
[
|
|
6043
|
+
[ql]: {
|
|
6043
6044
|
value: e,
|
|
6044
6045
|
configurable: !1,
|
|
6045
6046
|
writable: !1,
|
|
6046
6047
|
enumerable: !1
|
|
6047
6048
|
},
|
|
6048
|
-
[
|
|
6049
|
+
[Kl]: {
|
|
6049
6050
|
value: t,
|
|
6050
6051
|
configurable: !1,
|
|
6051
6052
|
writable: !1,
|
|
6052
6053
|
enumerable: !1
|
|
6053
6054
|
},
|
|
6054
|
-
[
|
|
6055
|
+
[Jl]: {
|
|
6055
6056
|
value: i,
|
|
6056
6057
|
configurable: !1,
|
|
6057
6058
|
writable: !1,
|
|
6058
6059
|
enumerable: !1
|
|
6059
6060
|
},
|
|
6060
|
-
[
|
|
6061
|
+
[Yl]: {
|
|
6061
6062
|
value: r,
|
|
6062
6063
|
configurable: !1,
|
|
6063
6064
|
writable: !1,
|
|
@@ -6074,16 +6075,16 @@ function ru(e, t, n, r, i = []) {
|
|
|
6074
6075
|
}
|
|
6075
6076
|
//#endregion
|
|
6076
6077
|
//#region src/json-schema-subset/compiler/array.ts
|
|
6077
|
-
function
|
|
6078
|
-
let n =
|
|
6079
|
-
if (Array.isArray(n) ? s =
|
|
6078
|
+
function au(e, t) {
|
|
6079
|
+
let n = ou(e, t), r = su(e, "maxItems", t), i = su(e, "minItems", t), a = cu(e, t), o = t.uniqueItems, s;
|
|
6080
|
+
if (Array.isArray(n) ? s = lu(e, t) : t.additionalItems && J(e, "it is needless when items is not array", "additionalItems"), !n || !a || s === null) return null;
|
|
6080
6081
|
let c = !1, l = !1;
|
|
6081
6082
|
if (Array.isArray(n)) {
|
|
6082
|
-
r !== void 0 && r <= n.length && (n = n.splice(r), s =
|
|
6083
|
-
let t = n.findIndex((e) =>
|
|
6084
|
-
t !== -1 && (n = n.splice(t), s =
|
|
6085
|
-
} else
|
|
6086
|
-
return r !== void 0 && i !== void 0 && r < i && (l ||
|
|
6083
|
+
r !== void 0 && r <= n.length && (n = n.splice(r), s = uu(s, e.delegate));
|
|
6084
|
+
let t = n.findIndex((e) => X(e) === Y.Never);
|
|
6085
|
+
t !== -1 && (n = n.splice(t), s = uu(s, e.delegate), r === void 0 && (r = n.length, l = !0)), i !== void 0 && n.length < i && (J(e, `length(${n.length}) of items if less than minItems(${i})`), c = !0), n.length === 0 && s && X(s) === Y.Never && (c = !0);
|
|
6086
|
+
} else X(n) === Y.Never && (c = !0);
|
|
6087
|
+
return r !== void 0 && i !== void 0 && r < i && (l || J(e, `maxItems(${r}) is less than minItems(${i})`), c = !0), Z(c ? Y.Never : Y.Array, Wl({
|
|
6087
6088
|
type: "array",
|
|
6088
6089
|
items: n,
|
|
6089
6090
|
contains: a,
|
|
@@ -6093,12 +6094,12 @@ function iu(e, t) {
|
|
|
6093
6094
|
additionalItems: s
|
|
6094
6095
|
}), e.delegate, e.path);
|
|
6095
6096
|
}
|
|
6096
|
-
function
|
|
6097
|
-
if (!t) return
|
|
6097
|
+
function ou(e, { items: t }) {
|
|
6098
|
+
if (!t) return Z(Y.Any, {}, e.delegate, e.path);
|
|
6098
6099
|
if (Array.isArray(t)) {
|
|
6099
6100
|
let n = [], r = !1;
|
|
6100
6101
|
for (let [i, a] of t.entries()) {
|
|
6101
|
-
let t =
|
|
6102
|
+
let t = Wu(Bl(e, "items", i), Vl(a));
|
|
6102
6103
|
if (!t) {
|
|
6103
6104
|
r = !0;
|
|
6104
6105
|
continue;
|
|
@@ -6107,80 +6108,80 @@ function au(e, { items: t }) {
|
|
|
6107
6108
|
}
|
|
6108
6109
|
return r ? null : n;
|
|
6109
6110
|
}
|
|
6110
|
-
return
|
|
6111
|
+
return Wu(Bl(e, "items"), Vl(t));
|
|
6111
6112
|
}
|
|
6112
|
-
function
|
|
6113
|
+
function su(e, t, n) {
|
|
6113
6114
|
let r = n[t];
|
|
6114
6115
|
if (r !== void 0) {
|
|
6115
6116
|
if (Number.isNaN(r)) {
|
|
6116
|
-
|
|
6117
|
+
J(e, "find NaN", t);
|
|
6117
6118
|
return;
|
|
6118
6119
|
}
|
|
6119
6120
|
if (r < 0) {
|
|
6120
|
-
|
|
6121
|
+
J(e, `find invalid number ${r}`, t);
|
|
6121
6122
|
return;
|
|
6122
6123
|
}
|
|
6123
6124
|
return r;
|
|
6124
6125
|
}
|
|
6125
6126
|
}
|
|
6126
|
-
function
|
|
6127
|
-
return t ?
|
|
6127
|
+
function cu(e, { contains: t }) {
|
|
6128
|
+
return t ? Wu(Bl(e, "contains"), Vl(t)) : Z(Y.Any, {}, e.delegate, e.path);
|
|
6128
6129
|
}
|
|
6129
|
-
function
|
|
6130
|
+
function lu(e, { additionalItems: t }) {
|
|
6130
6131
|
switch (typeof t) {
|
|
6131
|
-
case "boolean": return t ?
|
|
6132
|
-
case "object": return
|
|
6133
|
-
default: return
|
|
6132
|
+
case "boolean": return t ? Z(Y.Any, {}, e.delegate, e.path) : !1;
|
|
6133
|
+
case "object": return Wu(Bl(e, "additionalItems"), t);
|
|
6134
|
+
default: return Z(Y.Any, {}, e.delegate, e.path);
|
|
6134
6135
|
}
|
|
6135
6136
|
}
|
|
6136
|
-
function
|
|
6137
|
-
return e === void 0 ?
|
|
6137
|
+
function uu(e, t) {
|
|
6138
|
+
return e === void 0 ? Z(Y.Never, {
|
|
6138
6139
|
type: "string",
|
|
6139
6140
|
maxLength: 0,
|
|
6140
6141
|
minLength: 1
|
|
6141
|
-
}, t) :
|
|
6142
|
+
}, t) : $l(e) ? X(e) === Y.Never ? e : ru(e) : e;
|
|
6142
6143
|
}
|
|
6143
6144
|
//#endregion
|
|
6144
6145
|
//#region src/json-schema-subset/compiler/combination.ts
|
|
6145
|
-
var
|
|
6146
|
+
var du = Object.freeze([
|
|
6146
6147
|
"allOf",
|
|
6147
6148
|
"anyOf",
|
|
6148
6149
|
"oneOf"
|
|
6149
6150
|
]);
|
|
6150
|
-
function
|
|
6151
|
-
if (n.length === 0) return
|
|
6151
|
+
function fu(e, t, n, r) {
|
|
6152
|
+
if (n.length === 0) return Hl(e, "disable empty list", t), null;
|
|
6152
6153
|
let i = [];
|
|
6153
6154
|
for (let [r, a] of n.entries()) {
|
|
6154
|
-
let n =
|
|
6155
|
+
let n = Wu(Bl(e, t, r), Vl(a));
|
|
6155
6156
|
n && i.push(n);
|
|
6156
6157
|
}
|
|
6157
6158
|
if (i.length < n.length) return null;
|
|
6158
6159
|
let a = 0, o = 0;
|
|
6159
|
-
for (let e of i) switch (
|
|
6160
|
-
case
|
|
6160
|
+
for (let e of i) switch (X(e)) {
|
|
6161
|
+
case Y.Any:
|
|
6161
6162
|
a += 1;
|
|
6162
6163
|
break;
|
|
6163
|
-
case
|
|
6164
|
+
case Y.Never: o += 1;
|
|
6164
6165
|
}
|
|
6165
|
-
let s =
|
|
6166
|
+
let s = Y.Combination;
|
|
6166
6167
|
switch (t) {
|
|
6167
6168
|
case "allOf":
|
|
6168
|
-
o > 0 ? s =
|
|
6169
|
+
o > 0 ? s = Y.Never : a === i.length ? s = Y.Any : pu(i) || (s = Y.Never);
|
|
6169
6170
|
break;
|
|
6170
6171
|
case "anyOf":
|
|
6171
|
-
a > 0 ? s =
|
|
6172
|
+
a > 0 ? s = Y.Any : o === i.length && (s = Y.Never);
|
|
6172
6173
|
break;
|
|
6173
|
-
case "oneOf": a > 1 || o === i.length ? s =
|
|
6174
|
+
case "oneOf": a > 1 || o === i.length ? s = Y.Never : a === 1 && o === i.length - 1 && (s = Y.Any);
|
|
6174
6175
|
}
|
|
6175
|
-
return
|
|
6176
|
+
return Z(s, { [t]: i }, r, e.path);
|
|
6176
6177
|
}
|
|
6177
|
-
function
|
|
6178
|
+
function pu(e) {
|
|
6178
6179
|
let t = null;
|
|
6179
6180
|
for (let n of e) {
|
|
6180
|
-
let e =
|
|
6181
|
+
let e = X(n);
|
|
6181
6182
|
switch (e) {
|
|
6182
|
-
case
|
|
6183
|
-
case
|
|
6183
|
+
case Y.Any:
|
|
6184
|
+
case Y.Never: break;
|
|
6184
6185
|
default: if (t === null) t = e;
|
|
6185
6186
|
else if (t !== e) return !1;
|
|
6186
6187
|
}
|
|
@@ -6189,47 +6190,47 @@ function fu(e) {
|
|
|
6189
6190
|
}
|
|
6190
6191
|
//#endregion
|
|
6191
6192
|
//#region src/json-schema-subset/checker/validator.ts
|
|
6192
|
-
var
|
|
6193
|
+
var mu = Object.freeze({
|
|
6193
6194
|
Valid: 0,
|
|
6194
6195
|
Invalid: 1,
|
|
6195
6196
|
Unknown: 2
|
|
6196
6197
|
});
|
|
6197
|
-
function
|
|
6198
|
+
function hu(e, t) {
|
|
6198
6199
|
let n = e.isValid;
|
|
6199
|
-
return n ? n(t) === !0 ?
|
|
6200
|
+
return n ? n(t) === !0 ? mu.Valid : mu.Invalid : mu.Unknown;
|
|
6200
6201
|
}
|
|
6201
6202
|
//#endregion
|
|
6202
6203
|
//#region src/json-schema-subset/compiler/enumAndConst.ts
|
|
6203
|
-
function
|
|
6204
|
+
function gu(e, t, n, r) {
|
|
6204
6205
|
let i, a = !1;
|
|
6205
6206
|
if (t) {
|
|
6206
|
-
if (t.length === 0) return
|
|
6207
|
+
if (t.length === 0) return Hl(e, "disable empty list", "enum"), null;
|
|
6207
6208
|
i = [];
|
|
6208
|
-
for (let [n, a] of t.entries()) switch (
|
|
6209
|
-
case
|
|
6210
|
-
i.push(
|
|
6209
|
+
for (let [n, a] of t.entries()) switch (hu(r, a)) {
|
|
6210
|
+
case mu.Valid:
|
|
6211
|
+
i.push(nu(a));
|
|
6211
6212
|
break;
|
|
6212
|
-
case
|
|
6213
|
+
case mu.Invalid: J(e, "cannot pass JSON schema of currently schema object", "enum", n);
|
|
6213
6214
|
}
|
|
6214
|
-
i.length === 0 &&
|
|
6215
|
+
i.length === 0 && J(e, "all of elements from list is rejected by currently schema object", "enum");
|
|
6215
6216
|
}
|
|
6216
|
-
if (n &&
|
|
6217
|
+
if (n && hu(r, n) === mu.Invalid && (a = !0), i) {
|
|
6217
6218
|
if (i.length === 0) a = !0;
|
|
6218
6219
|
else if (n) {
|
|
6219
6220
|
let e = !1;
|
|
6220
|
-
for (let t of i) if (
|
|
6221
|
+
for (let t of i) if (dl(t, n)) {
|
|
6221
6222
|
e = !0;
|
|
6222
6223
|
break;
|
|
6223
6224
|
}
|
|
6224
6225
|
e || (a = !0);
|
|
6225
6226
|
}
|
|
6226
6227
|
}
|
|
6227
|
-
let o = a ?
|
|
6228
|
-
return r.type && (s.type = r.type), i && (s.enum = i), n && (s.const =
|
|
6228
|
+
let o = a ? Y.Never : Y.EnumOrConst, s = {};
|
|
6229
|
+
return r.type && (s.type = r.type), i && (s.enum = i), n && (s.const = nu(ul(n))), Z(o, s, e.delegate, e.path);
|
|
6229
6230
|
}
|
|
6230
6231
|
//#endregion
|
|
6231
6232
|
//#region src/json-schema-subset/compiler/object.ts
|
|
6232
|
-
var
|
|
6233
|
+
var _u = /* @__PURE__ */ new Set([
|
|
6233
6234
|
"type",
|
|
6234
6235
|
"maxProperties",
|
|
6235
6236
|
"minProperties",
|
|
@@ -6240,56 +6241,56 @@ var gu = /* @__PURE__ */ new Set([
|
|
|
6240
6241
|
"dependencies",
|
|
6241
6242
|
"propertyNames"
|
|
6242
6243
|
]);
|
|
6243
|
-
function
|
|
6244
|
-
let n = Object.keys(t).filter((e) => !
|
|
6245
|
-
n.length > 0 &&
|
|
6246
|
-
let r =
|
|
6244
|
+
function vu(e, t) {
|
|
6245
|
+
let n = Object.keys(t).filter((e) => !_u.has(e) && Rl(e));
|
|
6246
|
+
n.length > 0 && J(e, `type="object" will exclude other keys: ${n.toSorted().join(", ")}`);
|
|
6247
|
+
let r = yu(e, "maxProperties", t), i = yu(e, "minProperties", t), a = bu(e, t), o = xu(e, t), s = Su(e, t), c = wu(e, t);
|
|
6247
6248
|
if (!a || !o || !s || !c) return null;
|
|
6248
|
-
let l =
|
|
6249
|
+
let l = Cu(e, o, s, t);
|
|
6249
6250
|
if (!l) return null;
|
|
6250
|
-
let u =
|
|
6251
|
-
return
|
|
6251
|
+
let u = Eu(e, Tu(a, o, s, l), c, t);
|
|
6252
|
+
return Z(Du(e, a, l, u, r, i) ? Y.Never : Y.Object, Wl({
|
|
6252
6253
|
type: "object",
|
|
6253
6254
|
required: u,
|
|
6254
6255
|
properties: l,
|
|
6255
6256
|
minProperties: i,
|
|
6256
6257
|
maxProperties: r,
|
|
6257
6258
|
additionalProperties: a,
|
|
6258
|
-
patternProperties:
|
|
6259
|
-
dependencies:
|
|
6259
|
+
patternProperties: Mu(o),
|
|
6260
|
+
dependencies: Nu(c, t),
|
|
6260
6261
|
propertyNames: s
|
|
6261
6262
|
}), e.delegate, e.path);
|
|
6262
6263
|
}
|
|
6263
|
-
function
|
|
6264
|
+
function yu(e, t, n) {
|
|
6264
6265
|
let r = n[t];
|
|
6265
6266
|
if (r !== void 0) {
|
|
6266
6267
|
if (Number.isNaN(r)) {
|
|
6267
|
-
|
|
6268
|
+
J(e, "find NaN", t);
|
|
6268
6269
|
return;
|
|
6269
6270
|
}
|
|
6270
6271
|
if (r < 0) {
|
|
6271
|
-
|
|
6272
|
+
J(e, `find invalid number ${r}`, t);
|
|
6272
6273
|
return;
|
|
6273
6274
|
}
|
|
6274
6275
|
return r;
|
|
6275
6276
|
}
|
|
6276
6277
|
}
|
|
6277
|
-
function
|
|
6278
|
-
return t === !1 ?
|
|
6278
|
+
function bu(e, { additionalProperties: t }) {
|
|
6279
|
+
return t === !1 ? Z(Y.Never, {
|
|
6279
6280
|
type: "string",
|
|
6280
6281
|
maxLength: 0,
|
|
6281
6282
|
minLength: 1
|
|
6282
|
-
}, e.delegate, e.path) : typeof t == "object" ?
|
|
6283
|
+
}, e.delegate, e.path) : typeof t == "object" ? Wu(Bl(e, "additionalProperties"), Vl(t)) : Z(Y.Any, {}, e.delegate, e.path);
|
|
6283
6284
|
}
|
|
6284
|
-
function
|
|
6285
|
+
function xu(e, { patternProperties: t }) {
|
|
6285
6286
|
let n = !1, r = {};
|
|
6286
6287
|
for (let i in t) {
|
|
6287
|
-
let a =
|
|
6288
|
+
let a = ju(i);
|
|
6288
6289
|
if (a instanceof Error) {
|
|
6289
|
-
|
|
6290
|
+
J(e, `property name invalid. ${i}`, "patternProperties", i);
|
|
6290
6291
|
continue;
|
|
6291
6292
|
}
|
|
6292
|
-
let o =
|
|
6293
|
+
let o = Vl(t[i]), s = Wu(Bl(e, "patternProperties", i), o);
|
|
6293
6294
|
if (!s) {
|
|
6294
6295
|
n = !0;
|
|
6295
6296
|
continue;
|
|
@@ -6298,29 +6299,29 @@ function bu(e, { patternProperties: t }) {
|
|
|
6298
6299
|
}
|
|
6299
6300
|
return n ? null : r;
|
|
6300
6301
|
}
|
|
6301
|
-
function
|
|
6302
|
-
if (!t) return
|
|
6303
|
-
t =
|
|
6304
|
-
let n =
|
|
6302
|
+
function Su(e, { propertyNames: t }) {
|
|
6303
|
+
if (!t) return Z(Y.Any, {}, e.delegate, e.path);
|
|
6304
|
+
t = Vl(t);
|
|
6305
|
+
let n = Wu(Bl(e, "propertyNames"), t);
|
|
6305
6306
|
if (!n) return null;
|
|
6306
|
-
let r =
|
|
6307
|
-
return r !==
|
|
6307
|
+
let r = X(n);
|
|
6308
|
+
return r !== Y.String && r !== Y.Any ? ru(n) : n;
|
|
6308
6309
|
}
|
|
6309
|
-
function
|
|
6310
|
+
function Cu(e, t, n, { properties: r }) {
|
|
6310
6311
|
let i = !1;
|
|
6311
6312
|
if (!r) return {};
|
|
6312
6313
|
let a = {};
|
|
6313
6314
|
for (let o in r) {
|
|
6314
|
-
if (
|
|
6315
|
-
|
|
6315
|
+
if (hu(n, o) === mu.Invalid) {
|
|
6316
|
+
J(e, `key ${JSON.stringify(o)} cannot pass JSON schema from propertyNames`, "properties");
|
|
6316
6317
|
continue;
|
|
6317
6318
|
}
|
|
6318
|
-
let s =
|
|
6319
|
-
if (s &&
|
|
6320
|
-
|
|
6319
|
+
let s = Au(t, o);
|
|
6320
|
+
if (s && X(s) === Y.Never) {
|
|
6321
|
+
J(e, `key ${JSON.stringify(o)} matches a pattern that has a impossible(never) schema`, "properties");
|
|
6321
6322
|
continue;
|
|
6322
6323
|
}
|
|
6323
|
-
let c =
|
|
6324
|
+
let c = Vl(r[o]), l = Wu(Bl(e, "properties", o), c);
|
|
6324
6325
|
if (!l) {
|
|
6325
6326
|
i = !0;
|
|
6326
6327
|
continue;
|
|
@@ -6329,62 +6330,62 @@ function Su(e, t, n, { properties: r }) {
|
|
|
6329
6330
|
}
|
|
6330
6331
|
return i ? null : a;
|
|
6331
6332
|
}
|
|
6332
|
-
function
|
|
6333
|
+
function wu(e, { dependencies: t }) {
|
|
6333
6334
|
if (!t) return [{}, {}];
|
|
6334
6335
|
let n = {}, r = {};
|
|
6335
6336
|
for (let i in t) {
|
|
6336
|
-
let a =
|
|
6337
|
+
let a = Vl(t[i]);
|
|
6337
6338
|
if (Array.isArray(a)) {
|
|
6338
|
-
let { keys: t, duplicated: r } =
|
|
6339
|
-
r &&
|
|
6339
|
+
let { keys: t, duplicated: r } = ku(a);
|
|
6340
|
+
r && J(e, `found duplicated property names: ${r.join(", ")}`, "dependencies", i), n[i] = t;
|
|
6340
6341
|
} else {
|
|
6341
|
-
let t =
|
|
6342
|
+
let t = Wu(Bl(e, "dependencies", i), a);
|
|
6342
6343
|
if (t) {
|
|
6343
|
-
let e =
|
|
6344
|
-
r[i] = e ===
|
|
6344
|
+
let e = X(t);
|
|
6345
|
+
r[i] = e === Y.Object || e === Y.Any ? t : e === Y.Extends ? Zl : ru(t);
|
|
6345
6346
|
}
|
|
6346
6347
|
}
|
|
6347
6348
|
}
|
|
6348
6349
|
return [n, r];
|
|
6349
6350
|
}
|
|
6350
|
-
function
|
|
6351
|
+
function Tu(e, t, n, r) {
|
|
6351
6352
|
return (i) => {
|
|
6352
|
-
if (
|
|
6353
|
-
let a =
|
|
6354
|
-
return !!(a &&
|
|
6353
|
+
if (hu(n, i) === mu.Invalid) return !0;
|
|
6354
|
+
let a = Au(t, i);
|
|
6355
|
+
return !!(a && X(a) === Y.Never || X(r[i] ?? e) === Y.Never);
|
|
6355
6356
|
};
|
|
6356
6357
|
}
|
|
6357
|
-
function
|
|
6358
|
+
function Eu(e, t, n, { required: r }) {
|
|
6358
6359
|
if (!r) return [];
|
|
6359
|
-
let i =
|
|
6360
|
-
i.duplicated &&
|
|
6360
|
+
let i = ku(r);
|
|
6361
|
+
i.duplicated && J(e, `found duplicated required keys: ${i.duplicated.join(", ")}`, "required");
|
|
6361
6362
|
let a = [], o = [];
|
|
6362
|
-
for (let e of i.keys)
|
|
6363
|
-
return o.length > 0 &&
|
|
6364
|
-
}
|
|
6365
|
-
function
|
|
6366
|
-
if (i !== void 0 && a !== void 0 && i < a) return
|
|
6367
|
-
if (i !== void 0 && r.length > i) return
|
|
6368
|
-
if (a !== void 0 && r.length < a) return
|
|
6369
|
-
if (
|
|
6363
|
+
for (let e of i.keys) Ou(n, e).some((e) => t(e)) ? o.push(e) : a.push(e);
|
|
6364
|
+
return o.length > 0 && J(e, `key ${o.map((e) => JSON.stringify(e)).join(", ")} will ban by another condition`, "required"), a;
|
|
6365
|
+
}
|
|
6366
|
+
function Du(e, t, n, r, i, a) {
|
|
6367
|
+
if (i !== void 0 && a !== void 0 && i < a) return J(e, `maxProperties(${i}) is less than minProperties(${a})`), !0;
|
|
6368
|
+
if (i !== void 0 && r.length > i) return J(e, `length(${r.length}) of required is greater than maxProperties(${i})`), !0;
|
|
6369
|
+
if (a !== void 0 && r.length < a) return J(e, `length(${r.length}) of required is less than minProperties(${a})`), !0;
|
|
6370
|
+
if (X(t) !== Y.Never) return !1;
|
|
6370
6371
|
for (let e in n) {
|
|
6371
6372
|
let t = n[e];
|
|
6372
|
-
if (
|
|
6373
|
+
if (X(t) !== Y.Never) return !1;
|
|
6373
6374
|
}
|
|
6374
6375
|
return !0;
|
|
6375
6376
|
}
|
|
6376
|
-
function
|
|
6377
|
+
function Ou([e, t], n) {
|
|
6377
6378
|
let r = [n], i = new Set(r);
|
|
6378
6379
|
for (; r.length > 0;) {
|
|
6379
6380
|
let n = r.pop(), i = t[n], o = e[n];
|
|
6380
|
-
i &&
|
|
6381
|
+
i && X(i) === Y.Object && a(i.required), o && a(o);
|
|
6381
6382
|
}
|
|
6382
6383
|
function a(e) {
|
|
6383
6384
|
if (e) for (let t of e) i.has(t) || (i.add(t), r.push(t));
|
|
6384
6385
|
}
|
|
6385
6386
|
return [...i];
|
|
6386
6387
|
}
|
|
6387
|
-
function
|
|
6388
|
+
function ku(e) {
|
|
6388
6389
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
6389
6390
|
for (let r of e) t.has(r) ? n.add(r) : t.add(r);
|
|
6390
6391
|
return n.size === 0 ? {
|
|
@@ -6395,14 +6396,14 @@ function Ou(e) {
|
|
|
6395
6396
|
duplicated: [...n]
|
|
6396
6397
|
};
|
|
6397
6398
|
}
|
|
6398
|
-
function
|
|
6399
|
+
function Au(e, t) {
|
|
6399
6400
|
for (let n in e) {
|
|
6400
6401
|
let [r, i] = e[n];
|
|
6401
6402
|
if (i.test(t)) return r;
|
|
6402
6403
|
}
|
|
6403
6404
|
return null;
|
|
6404
6405
|
}
|
|
6405
|
-
function
|
|
6406
|
+
function ju(e) {
|
|
6406
6407
|
try {
|
|
6407
6408
|
return new RegExp(e, "i");
|
|
6408
6409
|
} catch (e) {
|
|
@@ -6410,12 +6411,12 @@ function Au(e) {
|
|
|
6410
6411
|
throw e;
|
|
6411
6412
|
}
|
|
6412
6413
|
}
|
|
6413
|
-
function
|
|
6414
|
+
function Mu(e) {
|
|
6414
6415
|
let t = {};
|
|
6415
6416
|
for (let n in e) t[n] = e[n][0];
|
|
6416
6417
|
return t;
|
|
6417
6418
|
}
|
|
6418
|
-
function
|
|
6419
|
+
function Nu([e, t], { dependencies: n }) {
|
|
6419
6420
|
let r = {};
|
|
6420
6421
|
for (let i in n) {
|
|
6421
6422
|
let n = e[i], a = t[i];
|
|
@@ -6425,78 +6426,78 @@ function Mu([e, t], { dependencies: n }) {
|
|
|
6425
6426
|
}
|
|
6426
6427
|
//#endregion
|
|
6427
6428
|
//#region src/json-schema-subset/compiler/primitive.ts
|
|
6428
|
-
var
|
|
6429
|
+
var Pu = /* @__PURE__ */ new Set([
|
|
6429
6430
|
"type",
|
|
6430
6431
|
"multipleOf",
|
|
6431
6432
|
"maximum",
|
|
6432
6433
|
"exclusiveMaximum",
|
|
6433
6434
|
"minimum",
|
|
6434
6435
|
"exclusiveMinimum"
|
|
6435
|
-
]),
|
|
6436
|
+
]), Fu = /* @__PURE__ */ new Set([
|
|
6436
6437
|
"type",
|
|
6437
6438
|
"maxLength",
|
|
6438
6439
|
"minLength",
|
|
6439
6440
|
"pattern"
|
|
6440
6441
|
]);
|
|
6441
|
-
function
|
|
6442
|
+
function Iu(e, t) {
|
|
6442
6443
|
let { type: n } = t;
|
|
6443
6444
|
switch (n) {
|
|
6444
6445
|
case "number":
|
|
6445
|
-
case "integer": return
|
|
6446
|
-
case "string": return
|
|
6446
|
+
case "integer": return Lu(e, t);
|
|
6447
|
+
case "string": return zu(e, t);
|
|
6447
6448
|
case "boolean":
|
|
6448
6449
|
case "null": {
|
|
6449
|
-
let r = Object.keys(t).filter((e) =>
|
|
6450
|
-
return r.length > 0 &&
|
|
6450
|
+
let r = Object.keys(t).filter((e) => Rl(e) && e !== "type");
|
|
6451
|
+
return r.length > 0 && J(e, `key "type" will exclude other keys: ${r.toSorted().join(", ")}`), Z(n === "null" ? Y.Null : Y.Boolean, { type: n }, e.delegate, e.path);
|
|
6451
6452
|
}
|
|
6452
|
-
default: return
|
|
6453
|
+
default: return Hl(e, `invalid type ${JSON.stringify(n)}`), null;
|
|
6453
6454
|
}
|
|
6454
6455
|
}
|
|
6455
|
-
function
|
|
6456
|
-
let n = Object.keys(t).filter((e) => !
|
|
6457
|
-
n.length > 0 &&
|
|
6458
|
-
let r =
|
|
6459
|
-
for (let t of
|
|
6456
|
+
function Lu(e, t) {
|
|
6457
|
+
let n = Object.keys(t).filter((e) => !Pu.has(e) && Rl(e));
|
|
6458
|
+
n.length > 0 && J(e, `type=${JSON.stringify(t.type)} will exclude other keys: ${n.toSorted().join(", ")}`);
|
|
6459
|
+
let r = ll(t, Pu);
|
|
6460
|
+
for (let t of Pu) {
|
|
6460
6461
|
let n = r[t];
|
|
6461
|
-
t !== "type" && n !== void 0 && Number.isNaN(n) && (
|
|
6462
|
+
t !== "type" && n !== void 0 && Number.isNaN(n) && (J(e, "found NaN", t), delete r[t]);
|
|
6462
6463
|
}
|
|
6463
6464
|
let { maximum: i, exclusiveMaximum: a, minimum: o, exclusiveMinimum: s } = r;
|
|
6464
6465
|
i !== void 0 && a !== void 0 && (i === a ? delete r.maximum : i < a ? delete r.exclusiveMaximum : i > a && delete r.maximum), o !== void 0 && s !== void 0 && (o === s ? delete r.minimum : o < s ? delete r.exclusiveMinimum : o > s && delete r.minimum);
|
|
6465
6466
|
let { multipleOf: c } = r;
|
|
6466
|
-
c === 0 && (delete r.multipleOf, r.type = "number",
|
|
6467
|
-
let l =
|
|
6468
|
-
return
|
|
6467
|
+
c === 0 && (delete r.multipleOf, r.type = "number", J(e, "cannot be 0", "multipleOf"));
|
|
6468
|
+
let l = Y.Numeric;
|
|
6469
|
+
return Ru(r) || (l = Y.Never), Z(l, r, e.delegate, e.path);
|
|
6469
6470
|
}
|
|
6470
|
-
function
|
|
6471
|
+
function Ru(e) {
|
|
6471
6472
|
let { maximum: t, exclusiveMaximum: n, minimum: r, exclusiveMinimum: i } = e;
|
|
6472
6473
|
return t !== void 0 && r !== void 0 ? t >= r : n !== void 0 && r !== void 0 ? n > r : t !== void 0 && i !== void 0 ? t > i : n !== void 0 && i !== void 0 ? n > i : !0;
|
|
6473
6474
|
}
|
|
6474
|
-
function
|
|
6475
|
-
let n = Object.keys(t).filter((e) => !
|
|
6476
|
-
n.length > 0 &&
|
|
6477
|
-
let r =
|
|
6478
|
-
|
|
6479
|
-
let i = r.maxLength, a = r.minLength, o =
|
|
6480
|
-
return i !== void 0 && (i < 0 || i !== void 0 && a !== void 0 && i < a) && (o =
|
|
6475
|
+
function zu(e, t) {
|
|
6476
|
+
let n = Object.keys(t).filter((e) => !Fu.has(e) && Rl(e));
|
|
6477
|
+
n.length > 0 && J(e, `type="string" will exclude other keys: ${n.toSorted().join(", ")}`);
|
|
6478
|
+
let r = ll(t, Fu);
|
|
6479
|
+
Bu(e, r, "maxLength"), Bu(e, r, "minLength");
|
|
6480
|
+
let i = r.maxLength, a = r.minLength, o = Y.String;
|
|
6481
|
+
return i !== void 0 && (i < 0 || i !== void 0 && a !== void 0 && i < a) && (o = Y.Never), Z(o, r, e.delegate, e.path);
|
|
6481
6482
|
}
|
|
6482
|
-
function
|
|
6483
|
+
function Bu(e, t, n) {
|
|
6483
6484
|
let r = t[n];
|
|
6484
|
-
r !== void 0 && Number.isNaN(r) && (
|
|
6485
|
+
r !== void 0 && Number.isNaN(r) && (J(e, "found NaN", n), delete t[n]);
|
|
6485
6486
|
}
|
|
6486
6487
|
//#endregion
|
|
6487
6488
|
//#region src/json-schema-subset/compiler/compiler.ts
|
|
6488
|
-
var
|
|
6489
|
-
function
|
|
6490
|
-
if (
|
|
6489
|
+
var Vu = Object.freeze([]);
|
|
6490
|
+
function Hu(e, t, n, r) {
|
|
6491
|
+
if ($l(e) || t.isExtendsSchema(e)) return {
|
|
6491
6492
|
schema: e,
|
|
6492
|
-
warns:
|
|
6493
|
+
warns: Vu
|
|
6493
6494
|
};
|
|
6494
6495
|
if (r) {
|
|
6495
6496
|
let t = r.isSchema(e);
|
|
6496
6497
|
if (typeof t == "object") {
|
|
6497
6498
|
let e = [];
|
|
6498
6499
|
for (let n of t) e.push({
|
|
6499
|
-
kind:
|
|
6500
|
+
kind: Pl.External,
|
|
6500
6501
|
error: n
|
|
6501
6502
|
});
|
|
6502
6503
|
if (e.length > 0) return e;
|
|
@@ -6509,19 +6510,19 @@ function Vu(e, t, n, r) {
|
|
|
6509
6510
|
path: [],
|
|
6510
6511
|
errors: [],
|
|
6511
6512
|
warns: []
|
|
6512
|
-
}, a =
|
|
6513
|
-
if (a)
|
|
6514
|
-
else return
|
|
6513
|
+
}, a = Wu(i, e);
|
|
6514
|
+
if (a) Uu(i.errors.length === 0, "found errors (it should be empty)");
|
|
6515
|
+
else return Uu(i.errors.length > 0, "cannot found any errors"), i.errors;
|
|
6515
6516
|
return {
|
|
6516
6517
|
schema: a,
|
|
6517
6518
|
warns: i.warns
|
|
6518
6519
|
};
|
|
6519
6520
|
}
|
|
6520
|
-
function
|
|
6521
|
+
function Uu(e, t) {
|
|
6521
6522
|
if (!e) throw Error(t);
|
|
6522
6523
|
}
|
|
6523
|
-
function
|
|
6524
|
-
if (e.extends.isExtendsSchema(t) ||
|
|
6524
|
+
function Wu(e, t) {
|
|
6525
|
+
if (e.extends.isExtendsSchema(t) || $l(t)) return t;
|
|
6525
6526
|
let n = e.extends.tryCompiledExtendsSchema(t, e.payload);
|
|
6526
6527
|
if (n) return n;
|
|
6527
6528
|
let r = t, i = !1, { enum: a, const: o } = t;
|
|
@@ -6529,58 +6530,58 @@ function Uu(e, t) {
|
|
|
6529
6530
|
let { enum: e, const: n, ...a } = t;
|
|
6530
6531
|
r = a, i = !0;
|
|
6531
6532
|
}
|
|
6532
|
-
let s =
|
|
6533
|
-
return s && i && (s =
|
|
6533
|
+
let s = Gu(e, r);
|
|
6534
|
+
return s && i && (s = gu(e, a, o, s)), s || null;
|
|
6534
6535
|
}
|
|
6535
|
-
function
|
|
6536
|
-
for (let n of
|
|
6536
|
+
function Gu(e, t) {
|
|
6537
|
+
for (let n of du) {
|
|
6537
6538
|
let r = t[n];
|
|
6538
6539
|
if (r) {
|
|
6539
|
-
let i = Object.keys(t).filter((e) =>
|
|
6540
|
-
return i.length > 0 &&
|
|
6540
|
+
let i = Object.keys(t).filter((e) => Rl(e) && e !== n);
|
|
6541
|
+
return i.length > 0 && J(e, `composition key ${JSON.stringify(n)} will exclude other keys: ${i.toSorted().join(", ")}`), fu(e, n, r) || null;
|
|
6541
6542
|
}
|
|
6542
6543
|
}
|
|
6543
6544
|
{
|
|
6544
|
-
let n =
|
|
6545
|
+
let n = Vl(t.not);
|
|
6545
6546
|
if (n) {
|
|
6546
|
-
let r = Object.keys(t).filter((e) =>
|
|
6547
|
-
r.length > 0 &&
|
|
6548
|
-
let i =
|
|
6547
|
+
let r = Object.keys(t).filter((e) => Rl(e) && e !== "not");
|
|
6548
|
+
r.length > 0 && J(e, `key "not" will exclude other keys: ${r.toSorted().join(", ")}`);
|
|
6549
|
+
let i = Wu(Bl(e, "not"), n);
|
|
6549
6550
|
if (!i) return null;
|
|
6550
|
-
let a =
|
|
6551
|
-
switch (
|
|
6552
|
-
case
|
|
6553
|
-
a =
|
|
6551
|
+
let a = Y.Not;
|
|
6552
|
+
switch (X(i)) {
|
|
6553
|
+
case Y.Never:
|
|
6554
|
+
a = Y.Any;
|
|
6554
6555
|
break;
|
|
6555
|
-
case
|
|
6556
|
+
case Y.Any: a = Y.Never;
|
|
6556
6557
|
}
|
|
6557
|
-
return
|
|
6558
|
+
return Z(a, { not: i }, e.delegate, e.path);
|
|
6558
6559
|
}
|
|
6559
6560
|
}
|
|
6560
6561
|
if (t.type) {
|
|
6561
6562
|
let { type: n } = t;
|
|
6562
6563
|
if (Array.isArray(n)) {
|
|
6563
6564
|
let { type: r, ...i } = t;
|
|
6564
|
-
return
|
|
6565
|
+
return fu(e, "anyOf", n.map((e) => ({
|
|
6565
6566
|
...i,
|
|
6566
6567
|
type: e
|
|
6567
6568
|
})));
|
|
6568
6569
|
}
|
|
6569
6570
|
switch (n) {
|
|
6570
|
-
case "object": return
|
|
6571
|
-
case "array": return
|
|
6572
|
-
default: return
|
|
6571
|
+
case "object": return vu(e, t);
|
|
6572
|
+
case "array": return au(e, t);
|
|
6573
|
+
default: return Iu(e, t);
|
|
6573
6574
|
}
|
|
6574
6575
|
}
|
|
6575
|
-
return
|
|
6576
|
+
return zl(t) ? Z(Y.Any, {}, e.delegate, e.path) : (Hl(e, "unrecognized"), null);
|
|
6576
6577
|
}
|
|
6577
6578
|
//#endregion
|
|
6578
6579
|
//#region src/json-schema-subset/checker/tools/mark.ts
|
|
6579
|
-
var
|
|
6580
|
+
var Ku = class {
|
|
6580
6581
|
constructor(e) {
|
|
6581
6582
|
let t = Object.freeze(e.toSorted());
|
|
6582
6583
|
if (t.length > 32) throw Error(`cannot define ${t.length} keys which is greater than 32`);
|
|
6583
|
-
this.keys = t, this.clazz = class extends
|
|
6584
|
+
this.keys = t, this.clazz = class extends qu {
|
|
6584
6585
|
constructor(e) {
|
|
6585
6586
|
super(t, e);
|
|
6586
6587
|
}
|
|
@@ -6604,7 +6605,7 @@ var Gu = class {
|
|
|
6604
6605
|
else if (e) for (let [n, r] of this.keys.entries()) e[r] && (t |= 1 << n);
|
|
6605
6606
|
return new this.clazz(t);
|
|
6606
6607
|
}
|
|
6607
|
-
},
|
|
6608
|
+
}, qu = class {
|
|
6608
6609
|
constructor(e, t) {
|
|
6609
6610
|
this.keys = e, this.int32 = t;
|
|
6610
6611
|
}
|
|
@@ -6619,21 +6620,21 @@ var Gu = class {
|
|
|
6619
6620
|
};
|
|
6620
6621
|
//#endregion
|
|
6621
6622
|
//#region src/json-schema-subset/checker/tools/quantum.ts
|
|
6622
|
-
function
|
|
6623
|
-
return new
|
|
6623
|
+
function Ju(e) {
|
|
6624
|
+
return new Yu(e);
|
|
6624
6625
|
}
|
|
6625
|
-
var
|
|
6626
|
+
var Yu = class {
|
|
6626
6627
|
constructor(e) {
|
|
6627
|
-
this.description = new
|
|
6628
|
+
this.description = new Ku(e);
|
|
6628
6629
|
}
|
|
6629
6630
|
get keys() {
|
|
6630
6631
|
return this.description.keys;
|
|
6631
6632
|
}
|
|
6632
6633
|
variable(e) {
|
|
6633
6634
|
let t;
|
|
6634
|
-
return e && (t = this.description.toBundle(e).toInt32()), new
|
|
6635
|
+
return e && (t = this.description.toBundle(e).toInt32()), new Xu(this.description, t);
|
|
6635
6636
|
}
|
|
6636
|
-
},
|
|
6637
|
+
}, Xu = class {
|
|
6637
6638
|
constructor(e, t) {
|
|
6638
6639
|
this.values = /* @__PURE__ */ new Set(), this.description = e, t !== void 0 && this.values.add(t);
|
|
6639
6640
|
}
|
|
@@ -6654,7 +6655,7 @@ var Ju = class {
|
|
|
6654
6655
|
}
|
|
6655
6656
|
push(e, t) {
|
|
6656
6657
|
let n = /* @__PURE__ */ new Set();
|
|
6657
|
-
for (let r of this.values) for (let [i, a] of
|
|
6658
|
+
for (let r of this.values) for (let [i, a] of fl) if (e & a) {
|
|
6658
6659
|
let e = this.description.toBundle(r);
|
|
6659
6660
|
t(i, e), n.add(e.toInt32());
|
|
6660
6661
|
}
|
|
@@ -6671,11 +6672,11 @@ var Ju = class {
|
|
|
6671
6672
|
};
|
|
6672
6673
|
//#endregion
|
|
6673
6674
|
//#region src/json-schema-subset/checker/tools/range.ts
|
|
6674
|
-
function
|
|
6675
|
+
function Zu(e, t) {
|
|
6675
6676
|
let [n] = e, [r] = t;
|
|
6676
|
-
return n.num < r.num ?
|
|
6677
|
+
return n.num < r.num ? Qu(e, t) : n.num > r.num ? $u(e, t) : ed(e, t);
|
|
6677
6678
|
}
|
|
6678
|
-
function
|
|
6679
|
+
function Qu(e, t) {
|
|
6679
6680
|
let [n, r] = e, [i, a] = t;
|
|
6680
6681
|
if (r.num <= i.num) {
|
|
6681
6682
|
let n = r.exclusive, a = i.exclusive;
|
|
@@ -6700,11 +6701,11 @@ function Zu(e, t) {
|
|
|
6700
6701
|
let t;
|
|
6701
6702
|
return e && (t = {
|
|
6702
6703
|
fromLeft: !1,
|
|
6703
|
-
range: [
|
|
6704
|
+
range: [td(r), a]
|
|
6704
6705
|
}), {
|
|
6705
6706
|
left: {
|
|
6706
6707
|
fromLeft: !0,
|
|
6707
|
-
range: [n,
|
|
6708
|
+
range: [n, td(i)]
|
|
6708
6709
|
},
|
|
6709
6710
|
center: [i, r],
|
|
6710
6711
|
right: t
|
|
@@ -6714,16 +6715,16 @@ function Zu(e, t) {
|
|
|
6714
6715
|
return {
|
|
6715
6716
|
left: {
|
|
6716
6717
|
fromLeft: !0,
|
|
6717
|
-
range: [n,
|
|
6718
|
+
range: [n, td(i)]
|
|
6718
6719
|
},
|
|
6719
6720
|
center: [i, a],
|
|
6720
6721
|
right: {
|
|
6721
6722
|
fromLeft: !0,
|
|
6722
|
-
range: [
|
|
6723
|
+
range: [td(a), r]
|
|
6723
6724
|
}
|
|
6724
6725
|
};
|
|
6725
6726
|
}
|
|
6726
|
-
function
|
|
6727
|
+
function $u(e, t) {
|
|
6727
6728
|
let [n, r] = e, [i, a] = t;
|
|
6728
6729
|
if (n.num >= a.num) {
|
|
6729
6730
|
let r = a.exclusive, i = n.exclusive;
|
|
@@ -6748,11 +6749,11 @@ function Qu(e, t) {
|
|
|
6748
6749
|
let t;
|
|
6749
6750
|
return e && (t = {
|
|
6750
6751
|
fromLeft: !0,
|
|
6751
|
-
range: [
|
|
6752
|
+
range: [td(a), r]
|
|
6752
6753
|
}), {
|
|
6753
6754
|
left: {
|
|
6754
6755
|
fromLeft: !1,
|
|
6755
|
-
range: [i,
|
|
6756
|
+
range: [i, td(n)]
|
|
6756
6757
|
},
|
|
6757
6758
|
center: [n, a],
|
|
6758
6759
|
right: t
|
|
@@ -6762,23 +6763,23 @@ function Qu(e, t) {
|
|
|
6762
6763
|
return {
|
|
6763
6764
|
left: {
|
|
6764
6765
|
fromLeft: !1,
|
|
6765
|
-
range: [i,
|
|
6766
|
+
range: [i, td(n)]
|
|
6766
6767
|
},
|
|
6767
6768
|
center: [n, r],
|
|
6768
6769
|
right: {
|
|
6769
6770
|
fromLeft: !1,
|
|
6770
|
-
range: [
|
|
6771
|
+
range: [td(r), a]
|
|
6771
6772
|
}
|
|
6772
6773
|
};
|
|
6773
6774
|
}
|
|
6774
|
-
function
|
|
6775
|
+
function ed(e, t) {
|
|
6775
6776
|
let [n, r] = e, [i, a] = t, o = n.exclusive, s = i.exclusive, c, l = n;
|
|
6776
6777
|
if (!o && s ? (l = i, c = {
|
|
6777
6778
|
fromLeft: !0,
|
|
6778
|
-
range: [n,
|
|
6779
|
+
range: [n, td(i)]
|
|
6779
6780
|
}) : o && !s && (c = {
|
|
6780
6781
|
fromLeft: !1,
|
|
6781
|
-
range: [i,
|
|
6782
|
+
range: [i, td(n)]
|
|
6782
6783
|
}), r.num <= a.num) {
|
|
6783
6784
|
let e = !0, t = !1;
|
|
6784
6785
|
if (r.num === a.num) {
|
|
@@ -6789,7 +6790,7 @@ function $u(e, t) {
|
|
|
6789
6790
|
let t;
|
|
6790
6791
|
return e && (t = {
|
|
6791
6792
|
fromLeft: !1,
|
|
6792
|
-
range: [
|
|
6793
|
+
range: [td(r), a]
|
|
6793
6794
|
}), {
|
|
6794
6795
|
left: c,
|
|
6795
6796
|
center: [l, r],
|
|
@@ -6802,11 +6803,11 @@ function $u(e, t) {
|
|
|
6802
6803
|
center: [l, a],
|
|
6803
6804
|
right: {
|
|
6804
6805
|
fromLeft: !0,
|
|
6805
|
-
range: [
|
|
6806
|
+
range: [td(a), r]
|
|
6806
6807
|
}
|
|
6807
6808
|
};
|
|
6808
6809
|
}
|
|
6809
|
-
function
|
|
6810
|
+
function td(e) {
|
|
6810
6811
|
return {
|
|
6811
6812
|
num: e.num,
|
|
6812
6813
|
exclusive: !e.exclusive
|
|
@@ -6814,8 +6815,8 @@ function ed(e) {
|
|
|
6814
6815
|
}
|
|
6815
6816
|
//#endregion
|
|
6816
6817
|
//#region src/json-schema-subset/checker/range.ts
|
|
6817
|
-
var
|
|
6818
|
-
let { left: a, center: o, right: s } =
|
|
6818
|
+
var nd = (e) => (t = e, n = Infinity, r = e, i = Infinity) => {
|
|
6819
|
+
let { left: a, center: o, right: s } = Zu([{
|
|
6819
6820
|
num: t,
|
|
6820
6821
|
exclusive: !1
|
|
6821
6822
|
}, {
|
|
@@ -6845,126 +6846,126 @@ var td = (e) => (t = e, n = Infinity, r = e, i = Infinity) => {
|
|
|
6845
6846
|
intersection: u
|
|
6846
6847
|
};
|
|
6847
6848
|
};
|
|
6848
|
-
function
|
|
6849
|
-
if (!n) return
|
|
6849
|
+
function rd({ left: e, right: t, intersection: n }) {
|
|
6850
|
+
if (!n) return V.Rejection;
|
|
6850
6851
|
let r = !1, i = !1;
|
|
6851
|
-
return e && (e.isFrom1 ? r = !0 : i = !0), t && (t.isFrom1 ? r = !0 : i = !0), r && i ?
|
|
6852
|
+
return e && (e.isFrom1 ? r = !0 : i = !0), t && (t.isFrom1 ? r = !0 : i = !0), r && i ? V.Intersection : r ? V.Containing : i ? V.ContainedBy : V.Equals;
|
|
6852
6853
|
}
|
|
6853
6854
|
//#endregion
|
|
6854
6855
|
//#region src/json-schema-subset/checker/array.ts
|
|
6855
|
-
var
|
|
6856
|
+
var id = nd(0), ad = Ju([
|
|
6856
6857
|
"hasCommon",
|
|
6857
6858
|
"hasExtra1",
|
|
6858
6859
|
"hasExtra2",
|
|
6859
6860
|
"hasRejection",
|
|
6860
6861
|
"hasCommonBroken"
|
|
6861
6862
|
]);
|
|
6862
|
-
function
|
|
6863
|
-
let r =
|
|
6864
|
-
if (i ===
|
|
6865
|
-
let [a, o] =
|
|
6863
|
+
function od({ calculate: e }, t, n) {
|
|
6864
|
+
let r = id(t.minItems, t.maxItems, n.minItems, n.maxItems), i = rd(r);
|
|
6865
|
+
if (i === V.Rejection) return G;
|
|
6866
|
+
let [a, o] = sd(t), [s, c] = sd(n), l = Math.max(a.length, s.length) + 1, u = Math.min(l, r.intersection.max), d = ad.variable({}), f = Math.min(t.minItems ?? 0, n.minItems ?? 0);
|
|
6866
6867
|
for (let t = 0; t < u; t++) {
|
|
6867
6868
|
let n = e(a[t] ?? o, s[t] ?? c);
|
|
6868
6869
|
d.push(n, (e, n) => {
|
|
6869
6870
|
switch (e) {
|
|
6870
|
-
case
|
|
6871
|
+
case V.Equals:
|
|
6871
6872
|
n.hasRejection || (n.hasCommon = !0);
|
|
6872
6873
|
break;
|
|
6873
|
-
case
|
|
6874
|
+
case V.Containing:
|
|
6874
6875
|
n.hasRejection || (n.hasCommon = !0), n.hasExtra1 = !0;
|
|
6875
6876
|
break;
|
|
6876
|
-
case
|
|
6877
|
+
case V.ContainedBy:
|
|
6877
6878
|
n.hasRejection || (n.hasCommon = !0), n.hasExtra2 = !0;
|
|
6878
6879
|
break;
|
|
6879
|
-
case
|
|
6880
|
+
case V.Intersection:
|
|
6880
6881
|
n.hasRejection || (n.hasCommon = !0), n.hasExtra1 = !0, n.hasExtra2 = !0;
|
|
6881
6882
|
break;
|
|
6882
|
-
case
|
|
6883
|
+
case V.Rejection: t < f && (n.hasCommonBroken = !0), n.hasRejection = !0, n.hasExtra1 = !0, n.hasExtra2 = !0;
|
|
6883
6884
|
}
|
|
6884
6885
|
});
|
|
6885
6886
|
}
|
|
6886
6887
|
d.update((e) => {
|
|
6887
6888
|
switch (i) {
|
|
6888
|
-
case
|
|
6889
|
+
case V.Containing:
|
|
6889
6890
|
e.hasExtra1 = !0;
|
|
6890
6891
|
break;
|
|
6891
|
-
case
|
|
6892
|
+
case V.ContainedBy:
|
|
6892
6893
|
e.hasExtra2 = !0;
|
|
6893
6894
|
break;
|
|
6894
|
-
case
|
|
6895
|
+
case V.Intersection: e.hasExtra1 = !0, e.hasExtra2 = !0;
|
|
6895
6896
|
}
|
|
6896
6897
|
(t.maxItems === 0 || n.maxItems === 0) && (e.hasCommon = !0, t.maxItems !== 0 && (e.hasExtra1 = !0), n.maxItems !== 0 && (e.hasExtra2 = !0));
|
|
6897
6898
|
});
|
|
6898
6899
|
let p = 0;
|
|
6899
6900
|
for (let { hasExtra1: e, hasExtra2: t, hasCommon: n, hasCommonBroken: r } of d) {
|
|
6900
6901
|
let i = n;
|
|
6901
|
-
r && (i = !1), p |= i ? e && t ?
|
|
6902
|
+
r && (i = !1), p |= i ? e && t ? K : e ? U : t ? W : H : G;
|
|
6902
6903
|
}
|
|
6903
6904
|
return p;
|
|
6904
6905
|
}
|
|
6905
|
-
function
|
|
6906
|
-
return Array.isArray(e) ? [e, t ??
|
|
6906
|
+
function sd({ items: e, additionalItems: t }) {
|
|
6907
|
+
return Array.isArray(e) ? [e, t ?? Xl] : [[], e ?? Xl];
|
|
6907
6908
|
}
|
|
6908
6909
|
//#endregion
|
|
6909
6910
|
//#region src/json-schema-subset/checker/cache.ts
|
|
6910
|
-
function
|
|
6911
|
+
function cd(e) {
|
|
6911
6912
|
let t = /* @__PURE__ */ new Map();
|
|
6912
6913
|
return (n, r) => {
|
|
6913
|
-
let i =
|
|
6914
|
-
return i ===
|
|
6914
|
+
let i = Ql(n);
|
|
6915
|
+
return i === Ql(r) ? i ? ud(t, n, r, e) : n === r : !1;
|
|
6915
6916
|
};
|
|
6916
6917
|
}
|
|
6917
|
-
function
|
|
6918
|
+
function ld(e) {
|
|
6918
6919
|
let t = /* @__PURE__ */ new Map();
|
|
6919
|
-
return (n, r) =>
|
|
6920
|
+
return (n, r) => ud(t, n, r, e);
|
|
6920
6921
|
}
|
|
6921
|
-
function
|
|
6922
|
-
let i = `${
|
|
6922
|
+
function ud(e, t, n, r) {
|
|
6923
|
+
let i = `${eu(t)}/${eu(n)}`, a = e.get(i);
|
|
6923
6924
|
return a === void 0 && e.set(i, a = r(t, n)), a;
|
|
6924
6925
|
}
|
|
6925
6926
|
//#endregion
|
|
6926
6927
|
//#region src/json-schema-subset/checker/enumAndConst.ts
|
|
6927
|
-
function
|
|
6928
|
-
let r =
|
|
6929
|
-
for (let t of r) if (
|
|
6930
|
-
for (let t of i) if (
|
|
6931
|
-
return s ? a && o ?
|
|
6928
|
+
function dd(e, t, n) {
|
|
6929
|
+
let r = pd(t), i = pd(n), a = !1, o = !1, s = !1;
|
|
6930
|
+
for (let t of r) if (md(e, i, t) ? s = !0 : a = !0, a && s) break;
|
|
6931
|
+
for (let t of i) if (md(e, r, t) ? s = !0 : o = !0, o && s) break;
|
|
6932
|
+
return s ? a && o ? K : a ? U : o ? W : H : G;
|
|
6932
6933
|
}
|
|
6933
|
-
function
|
|
6934
|
+
function fd(e, t) {
|
|
6934
6935
|
let n = !1, r = !1;
|
|
6935
|
-
for (let i of
|
|
6936
|
-
switch (
|
|
6937
|
-
case
|
|
6936
|
+
for (let i of pd(e)) {
|
|
6937
|
+
switch (hu(t, i)) {
|
|
6938
|
+
case mu.Valid:
|
|
6938
6939
|
n = !0;
|
|
6939
6940
|
break;
|
|
6940
|
-
case
|
|
6941
|
+
case mu.Invalid:
|
|
6941
6942
|
r = !0;
|
|
6942
6943
|
break;
|
|
6943
|
-
case
|
|
6944
|
+
case mu.Unknown: return pl;
|
|
6944
6945
|
}
|
|
6945
6946
|
if (n && r) break;
|
|
6946
6947
|
}
|
|
6947
|
-
return n && r ?
|
|
6948
|
+
return n && r ? K : n ? H | W : r ? G : X(t) === Y.Never ? H : W;
|
|
6948
6949
|
}
|
|
6949
|
-
function
|
|
6950
|
+
function pd({ const: e, enum: t }) {
|
|
6950
6951
|
if (e !== void 0) return [e];
|
|
6951
6952
|
if (t) return t;
|
|
6952
6953
|
throw Error("invalid branch");
|
|
6953
6954
|
}
|
|
6954
|
-
function
|
|
6955
|
+
function md({ isEquals: e }, t, n) {
|
|
6955
6956
|
for (let r of t) if (e(r, n)) return !0;
|
|
6956
6957
|
return !1;
|
|
6957
6958
|
}
|
|
6958
6959
|
//#endregion
|
|
6959
6960
|
//#region src/json-schema-subset/checker/equals.ts
|
|
6960
|
-
function
|
|
6961
|
+
function hd(e) {
|
|
6961
6962
|
function t(t, n) {
|
|
6962
6963
|
let i = e.isExtendsSchema(t), a = e.isExtendsSchema(n);
|
|
6963
6964
|
return i || a ? e.equals(t, n) : r(t, n);
|
|
6964
6965
|
}
|
|
6965
6966
|
let n = /* @__PURE__ */ new Map();
|
|
6966
6967
|
function r(e, t) {
|
|
6967
|
-
let r =
|
|
6968
|
+
let r = eu(e), a = eu(t);
|
|
6968
6969
|
if (r === a) return !0;
|
|
6969
6970
|
let o = `${r}/${a}`, s = n.get(o);
|
|
6970
6971
|
return s === void 0 && (s = i(e, t), n.set(o, s)), s;
|
|
@@ -6981,25 +6982,25 @@ function md(e) {
|
|
|
6981
6982
|
return !0;
|
|
6982
6983
|
}
|
|
6983
6984
|
function a(e, t) {
|
|
6984
|
-
return e === t ? !0 : typeof e != "object" || !e || typeof e != typeof t ? !1 :
|
|
6985
|
+
return e === t ? !0 : typeof e != "object" || !e || typeof e != typeof t ? !1 : $l(e) && $l(t) ? r(e, t) : i(e, t);
|
|
6985
6986
|
}
|
|
6986
6987
|
return t;
|
|
6987
6988
|
}
|
|
6988
6989
|
//#endregion
|
|
6989
6990
|
//#region src/json-schema-subset/checker/numeric/integerNormalizer.ts
|
|
6990
|
-
function
|
|
6991
|
-
let t =
|
|
6991
|
+
function gd(e) {
|
|
6992
|
+
let t = Cd(e), n = e.multipleOf ?? 1, r = vd(t, n);
|
|
6992
6993
|
return r ? {
|
|
6993
6994
|
multipleOf: n,
|
|
6994
6995
|
range: r
|
|
6995
6996
|
} : null;
|
|
6996
6997
|
}
|
|
6997
|
-
function
|
|
6998
|
+
function _d([e, t]) {
|
|
6998
6999
|
return !(e.num !== t.num || e.exclusive || t.exclusive);
|
|
6999
7000
|
}
|
|
7000
|
-
function
|
|
7001
|
+
function vd(e, t) {
|
|
7001
7002
|
if (!e) return;
|
|
7002
|
-
let [n, r] = e, i =
|
|
7003
|
+
let [n, r] = e, i = yd(n.num, t), a = bd(r.num, t);
|
|
7003
7004
|
if (i === n.num && n.exclusive && (i += t), a === r.num && r.exclusive && (a -= t), !(i > a) && (i !== a || i !== Infinity && i !== -Infinity)) return [{
|
|
7004
7005
|
num: i,
|
|
7005
7006
|
exclusive: !1
|
|
@@ -7008,29 +7009,29 @@ function _d(e, t) {
|
|
|
7008
7009
|
exclusive: !1
|
|
7009
7010
|
}];
|
|
7010
7011
|
}
|
|
7011
|
-
function
|
|
7012
|
+
function yd(e, t) {
|
|
7012
7013
|
return Math.ceil(e / t) * t;
|
|
7013
7014
|
}
|
|
7014
|
-
function
|
|
7015
|
+
function bd(e, t) {
|
|
7015
7016
|
return Math.floor(e / t) * t;
|
|
7016
7017
|
}
|
|
7017
7018
|
//#endregion
|
|
7018
7019
|
//#region src/json-schema-subset/checker/numeric/float.ts
|
|
7019
|
-
function
|
|
7020
|
-
let { left: n, right: r, center: i } =
|
|
7021
|
-
if (!i) return
|
|
7020
|
+
function xd(e, t) {
|
|
7021
|
+
let { left: n, right: r, center: i } = Zu(Cd(e), Cd(t));
|
|
7022
|
+
if (!i) return G;
|
|
7022
7023
|
let a = !1, o = !1;
|
|
7023
|
-
return n && (n.fromLeft ? a = !0 : o = !0), r && (r.fromLeft ? a = !0 : o = !0), a && o ?
|
|
7024
|
+
return n && (n.fromLeft ? a = !0 : o = !0), r && (r.fromLeft ? a = !0 : o = !0), a && o ? K : a ? U : o ? W : H;
|
|
7024
7025
|
}
|
|
7025
|
-
function
|
|
7026
|
-
let n =
|
|
7027
|
-
if (!r) return
|
|
7028
|
-
let i =
|
|
7029
|
-
if (!i.center) return
|
|
7026
|
+
function Sd(e, t) {
|
|
7027
|
+
let n = Cd(e), r = gd(t);
|
|
7028
|
+
if (!r) return U;
|
|
7029
|
+
let i = Zu(n, r.range), a = vd(i.center, r.multipleOf), o = wd(i.left, r.multipleOf), s = wd(i.right, r.multipleOf);
|
|
7030
|
+
if (!i.center) return G;
|
|
7030
7031
|
let c = !1, l = !1;
|
|
7031
|
-
return i.left?.fromLeft && (c = !0), i.right?.fromLeft && (c = !0), (!a || !
|
|
7032
|
+
return i.left?.fromLeft && (c = !0), i.right?.fromLeft && (c = !0), (!a || !_d(i.center)) && (c = !0), o && (l = !0), s && (l = !0), c && l ? K : c ? U : l ? W : H;
|
|
7032
7033
|
}
|
|
7033
|
-
function
|
|
7034
|
+
function Cd(e) {
|
|
7034
7035
|
let t, n;
|
|
7035
7036
|
return t = e.exclusiveMinimum === void 0 ? e.minimum === void 0 ? {
|
|
7036
7037
|
num: -Infinity,
|
|
@@ -7052,84 +7053,84 @@ function Sd(e) {
|
|
|
7052
7053
|
exclusive: !0
|
|
7053
7054
|
}, [t, n];
|
|
7054
7055
|
}
|
|
7055
|
-
function
|
|
7056
|
-
if (e && !e.fromLeft) return
|
|
7056
|
+
function wd(e, t) {
|
|
7057
|
+
if (e && !e.fromLeft) return vd(e.range, t);
|
|
7057
7058
|
}
|
|
7058
7059
|
//#endregion
|
|
7059
7060
|
//#region src/json-schema-subset/checker/numeric/integer.ts
|
|
7060
|
-
function
|
|
7061
|
-
let n =
|
|
7062
|
-
if (!n && !r) return
|
|
7063
|
-
if (!n) return
|
|
7064
|
-
if (!r) return
|
|
7065
|
-
let { range: i, multipleOf: a } = n, { range: o, multipleOf: s } = r, c =
|
|
7066
|
-
if (c.center && (u =
|
|
7061
|
+
function Td(e, t) {
|
|
7062
|
+
let n = gd(e), r = gd(t);
|
|
7063
|
+
if (!n && !r) return H;
|
|
7064
|
+
if (!n) return W;
|
|
7065
|
+
if (!r) return U;
|
|
7066
|
+
let { range: i, multipleOf: a } = n, { range: o, multipleOf: s } = r, c = Zu(i, o), l, u = 0;
|
|
7067
|
+
if (c.center && (u = Dd(a, s), l = vd(c.center, u)), !l) return G;
|
|
7067
7068
|
let d = !1, f = !1, { left: p, right: m } = c;
|
|
7068
|
-
return p &&
|
|
7069
|
+
return p && vd(p.range, p.fromLeft ? a : s) && (p.fromLeft ? d = !0 : f = !0), m && vd(m.range, m.fromLeft ? a : s) && (m.fromLeft ? d = !0 : f = !0), d ||= Ed(n, l, u), f ||= Ed(r, l, u), d && f ? K : d ? U : f ? W : H;
|
|
7069
7070
|
}
|
|
7070
|
-
function
|
|
7071
|
-
let i =
|
|
7072
|
-
if (
|
|
7073
|
-
let a =
|
|
7071
|
+
function Ed({ range: e, multipleOf: t }, n, r) {
|
|
7072
|
+
let i = Zu(e, n);
|
|
7073
|
+
if (vd(i.left?.range, t) || vd(i.right?.range, t)) return !0;
|
|
7074
|
+
let a = vd(i.center, t);
|
|
7074
7075
|
if (!a) return !1;
|
|
7075
|
-
let o =
|
|
7076
|
-
return
|
|
7077
|
-
}
|
|
7078
|
-
function Ed(e, t) {
|
|
7079
|
-
return e * t / Dd(e, t);
|
|
7076
|
+
let o = kd(n);
|
|
7077
|
+
return kd(a) > o || o !== 1 && t < r;
|
|
7080
7078
|
}
|
|
7081
7079
|
function Dd(e, t) {
|
|
7082
|
-
return e
|
|
7080
|
+
return e * t / Od(e, t);
|
|
7081
|
+
}
|
|
7082
|
+
function Od(e, t) {
|
|
7083
|
+
return e === 0 ? t : Od(t % e, e);
|
|
7083
7084
|
}
|
|
7084
|
-
function
|
|
7085
|
+
function kd(e) {
|
|
7085
7086
|
if (!e) return 0;
|
|
7086
7087
|
let [t, n] = e;
|
|
7087
7088
|
return n.num - t.num + 1;
|
|
7088
7089
|
}
|
|
7089
7090
|
//#endregion
|
|
7090
7091
|
//#region src/json-schema-subset/checker/numeric/checker.ts
|
|
7091
|
-
function
|
|
7092
|
-
if (
|
|
7093
|
-
let n =
|
|
7094
|
-
return n && r ?
|
|
7092
|
+
function Ad(e, t) {
|
|
7093
|
+
if (jd(e) || jd(t)) return pl;
|
|
7094
|
+
let n = Md(e), r = Md(t);
|
|
7095
|
+
return n && r ? xd(e, t) : n ? Sd(e, t) : r ? Cl(Sd(t, e)) : Td(e, t);
|
|
7095
7096
|
}
|
|
7096
|
-
function
|
|
7097
|
+
function jd(e) {
|
|
7097
7098
|
let { multipleOf: t } = e;
|
|
7098
7099
|
return t === void 0 ? !1 : !Number.isInteger(t) || t < 0;
|
|
7099
7100
|
}
|
|
7100
|
-
function
|
|
7101
|
+
function Md(e) {
|
|
7101
7102
|
let { multipleOf: t } = e;
|
|
7102
7103
|
return !(t !== void 0 && Number.isInteger(t) || e.type === "integer");
|
|
7103
7104
|
}
|
|
7104
7105
|
//#endregion
|
|
7105
7106
|
//#region src/json-schema-subset/checker/object.ts
|
|
7106
|
-
var
|
|
7107
|
+
var Nd = nd(0), Pd = Ju([
|
|
7107
7108
|
"hasCommonInRequired",
|
|
7108
7109
|
"hasCommonOutRequired",
|
|
7109
7110
|
"hasExtra1",
|
|
7110
7111
|
"hasExtra2",
|
|
7111
7112
|
"hasRejection"
|
|
7112
7113
|
]);
|
|
7113
|
-
function
|
|
7114
|
-
if (
|
|
7115
|
-
let r =
|
|
7116
|
-
if (!r) return
|
|
7117
|
-
let i =
|
|
7114
|
+
function Fd(e, t, n) {
|
|
7115
|
+
if (Id(t, n)) return G;
|
|
7116
|
+
let r = Ld(t, n);
|
|
7117
|
+
if (!r) return G;
|
|
7118
|
+
let i = Ud(t), a = Ud(n), o = (t) => {
|
|
7118
7119
|
let n = i(t), r = a(t);
|
|
7119
|
-
return
|
|
7120
|
-
}, { commonRequired: s, extraRequired1: c, extraRequired2: l } = r, u =
|
|
7121
|
-
for (let e of [...s].toSorted()) u.push(o(e),
|
|
7122
|
-
for (let e of [...c].toSorted()) u.push(o(e),
|
|
7123
|
-
for (let e of [...l].toSorted()) u.push(o(e),
|
|
7120
|
+
return Wd(n, r) ? e.calculate(n, r) : 0;
|
|
7121
|
+
}, { commonRequired: s, extraRequired1: c, extraRequired2: l } = r, u = Pd.variable({});
|
|
7122
|
+
for (let e of [...s].toSorted()) u.push(o(e), zd);
|
|
7123
|
+
for (let e of [...c].toSorted()) u.push(o(e), Bd);
|
|
7124
|
+
for (let e of [...l].toSorted()) u.push(o(e), Vd);
|
|
7124
7125
|
let { hasOptional1: d, hasOptional2: f } = r;
|
|
7125
7126
|
if (d || f) {
|
|
7126
|
-
let r =
|
|
7127
|
-
for (let e of [...
|
|
7127
|
+
let r = Hd(d, f);
|
|
7128
|
+
for (let e of [...Rd(t, n)].toSorted()) {
|
|
7128
7129
|
let t = o(e);
|
|
7129
7130
|
t !== 0 && u.push(t, r);
|
|
7130
7131
|
}
|
|
7131
|
-
let i = t.additionalProperties ??
|
|
7132
|
-
if (
|
|
7132
|
+
let i = t.additionalProperties ?? Xl, a = n.additionalProperties ?? Xl;
|
|
7133
|
+
if (Wd(i, a)) {
|
|
7133
7134
|
let t = e.calculate(i, a);
|
|
7134
7135
|
u.push(t, r);
|
|
7135
7136
|
}
|
|
@@ -7138,13 +7139,13 @@ function Pd(e, t, n) {
|
|
|
7138
7139
|
e.hasRejection || (c.size > 0 && (e.hasExtra2 = !0), l.size > 0 && (e.hasExtra1 = !0));
|
|
7139
7140
|
});
|
|
7140
7141
|
let { requiredKeysCount: p } = r, m = 0;
|
|
7141
|
-
for (let { hasExtra1: e, hasExtra2: t, hasCommonInRequired: n, hasCommonOutRequired: r, hasRejection: i } of u) m |= !n && p > 0 || !r && p === 0 || i ?
|
|
7142
|
+
for (let { hasExtra1: e, hasExtra2: t, hasCommonInRequired: n, hasCommonOutRequired: r, hasRejection: i } of u) m |= !n && p > 0 || !r && p === 0 || i ? G : e && t ? K : e ? U : t ? W : H;
|
|
7142
7143
|
return m;
|
|
7143
7144
|
}
|
|
7144
|
-
function Fd(e, t) {
|
|
7145
|
-
return nd(Md(e.minProperties, e.maxProperties, t.minProperties, t.maxProperties)) === H.Rejection;
|
|
7146
|
-
}
|
|
7147
7145
|
function Id(e, t) {
|
|
7146
|
+
return rd(Nd(e.minProperties, e.maxProperties, t.minProperties, t.maxProperties)) === V.Rejection;
|
|
7147
|
+
}
|
|
7148
|
+
function Ld(e, t) {
|
|
7148
7149
|
let n = new Set(e.required), r = new Set(t.required), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = n.size, s = r.size;
|
|
7149
7150
|
for (let e of n) r.has(e) && i.add(e), a.add(e);
|
|
7150
7151
|
for (let e of r) n.has(e) && i.add(e), a.add(e);
|
|
@@ -7160,7 +7161,7 @@ function Id(e, t) {
|
|
|
7160
7161
|
hasOptional2: u > s
|
|
7161
7162
|
};
|
|
7162
7163
|
}
|
|
7163
|
-
function
|
|
7164
|
+
function Rd(e, t) {
|
|
7164
7165
|
let n = new Set(e.required), r = e.properties, i = t.properties, a = e.required, o = t.required;
|
|
7165
7166
|
if (r) for (let e in r) n.add(e);
|
|
7166
7167
|
if (i) for (let e in i) n.add(e);
|
|
@@ -7168,67 +7169,67 @@ function Ld(e, t) {
|
|
|
7168
7169
|
if (o) for (let e of o) n.delete(e);
|
|
7169
7170
|
return n;
|
|
7170
7171
|
}
|
|
7171
|
-
var
|
|
7172
|
+
var zd = (e, t) => {
|
|
7172
7173
|
switch (e) {
|
|
7173
|
-
case
|
|
7174
|
+
case V.Equals:
|
|
7174
7175
|
t.hasCommonInRequired = !0;
|
|
7175
7176
|
break;
|
|
7176
|
-
case
|
|
7177
|
+
case V.Containing:
|
|
7177
7178
|
t.hasExtra1 = !0, t.hasCommonInRequired = !0;
|
|
7178
7179
|
break;
|
|
7179
|
-
case
|
|
7180
|
+
case V.ContainedBy:
|
|
7180
7181
|
t.hasExtra2 = !0, t.hasCommonInRequired = !0;
|
|
7181
7182
|
break;
|
|
7182
|
-
case
|
|
7183
|
+
case V.Intersection:
|
|
7183
7184
|
t.hasExtra1 = !0, t.hasExtra2 = !0, t.hasCommonInRequired = !0;
|
|
7184
7185
|
break;
|
|
7185
|
-
case
|
|
7186
|
+
case V.Rejection: t.hasRejection = !0;
|
|
7186
7187
|
}
|
|
7187
|
-
},
|
|
7188
|
+
}, Bd = (e, t) => {
|
|
7188
7189
|
switch (e) {
|
|
7189
|
-
case
|
|
7190
|
-
case
|
|
7190
|
+
case V.Equals:
|
|
7191
|
+
case V.ContainedBy:
|
|
7191
7192
|
t.hasCommonInRequired = !0;
|
|
7192
7193
|
break;
|
|
7193
|
-
case
|
|
7194
|
-
case
|
|
7194
|
+
case V.Intersection:
|
|
7195
|
+
case V.Containing:
|
|
7195
7196
|
t.hasExtra1 = !0, t.hasCommonInRequired = !0;
|
|
7196
7197
|
break;
|
|
7197
|
-
case
|
|
7198
|
+
case V.Rejection: t.hasRejection = !0;
|
|
7198
7199
|
}
|
|
7199
|
-
},
|
|
7200
|
+
}, Vd = (e, t) => {
|
|
7200
7201
|
switch (e) {
|
|
7201
|
-
case
|
|
7202
|
-
case
|
|
7202
|
+
case V.Equals:
|
|
7203
|
+
case V.Containing:
|
|
7203
7204
|
t.hasCommonInRequired = !0;
|
|
7204
7205
|
break;
|
|
7205
|
-
case
|
|
7206
|
-
case
|
|
7206
|
+
case V.Intersection:
|
|
7207
|
+
case V.ContainedBy:
|
|
7207
7208
|
t.hasExtra2 = !0, t.hasCommonInRequired = !0;
|
|
7208
7209
|
break;
|
|
7209
|
-
case
|
|
7210
|
+
case V.Rejection: t.hasRejection = !0;
|
|
7210
7211
|
}
|
|
7211
|
-
},
|
|
7212
|
+
}, Hd = (e, t) => (n, r) => {
|
|
7212
7213
|
if (r.hasRejection) return;
|
|
7213
7214
|
let i = !1, a = !1, o = !1;
|
|
7214
7215
|
switch (n) {
|
|
7215
|
-
case
|
|
7216
|
+
case V.Equals:
|
|
7216
7217
|
o = !0;
|
|
7217
7218
|
break;
|
|
7218
|
-
case
|
|
7219
|
+
case V.Containing:
|
|
7219
7220
|
i = !0, o = !0;
|
|
7220
7221
|
break;
|
|
7221
|
-
case
|
|
7222
|
+
case V.ContainedBy:
|
|
7222
7223
|
a = !0, o = !0;
|
|
7223
7224
|
break;
|
|
7224
|
-
case
|
|
7225
|
+
case V.Intersection:
|
|
7225
7226
|
i = !0, a = !0, o = !0;
|
|
7226
7227
|
break;
|
|
7227
|
-
case
|
|
7228
|
+
case V.Rejection: i = !0, a = !0;
|
|
7228
7229
|
}
|
|
7229
7230
|
e && i && (r.hasExtra1 = !0), t && a && (r.hasExtra2 = !0), e && t && o && (r.hasCommonOutRequired = !0);
|
|
7230
7231
|
};
|
|
7231
|
-
function
|
|
7232
|
+
function Ud(e) {
|
|
7232
7233
|
let t = e.properties, n = e.propertyNames, r = e.additionalProperties, i = [];
|
|
7233
7234
|
if (e.patternProperties) for (let t in e.patternProperties) {
|
|
7234
7235
|
let n = e.patternProperties[t], r = new RegExp(t, "i");
|
|
@@ -7238,39 +7239,39 @@ function Hd(e) {
|
|
|
7238
7239
|
});
|
|
7239
7240
|
}
|
|
7240
7241
|
return (e) => {
|
|
7241
|
-
if (n &&
|
|
7242
|
+
if (n && hu(n, e) === mu.Invalid) return Zl;
|
|
7242
7243
|
for (let { pattern: t, schema: n } of i) if (t.test(e)) return n;
|
|
7243
|
-
return ((t && t[e]) ?? r) ||
|
|
7244
|
+
return ((t && t[e]) ?? r) || Xl;
|
|
7244
7245
|
};
|
|
7245
7246
|
}
|
|
7246
|
-
function
|
|
7247
|
-
let n =
|
|
7248
|
-
return n !==
|
|
7247
|
+
function Wd(e, t) {
|
|
7248
|
+
let n = X(e), r = X(t);
|
|
7249
|
+
return n !== Y.Never || r !== Y.Never;
|
|
7249
7250
|
}
|
|
7250
7251
|
//#endregion
|
|
7251
7252
|
//#region src/json-schema-subset/checker/string.ts
|
|
7252
|
-
var
|
|
7253
|
-
function
|
|
7254
|
-
let n =
|
|
7253
|
+
var Gd = nd(0);
|
|
7254
|
+
function Kd(e, t) {
|
|
7255
|
+
let n = rd(Gd(e.minLength, e.maxLength, t.minLength, t.maxLength)), r = !!e.pattern, i = !!t.pattern;
|
|
7255
7256
|
switch (n) {
|
|
7256
|
-
case
|
|
7257
|
-
case
|
|
7258
|
-
case
|
|
7259
|
-
case
|
|
7260
|
-
case
|
|
7257
|
+
case V.Rejection: return G;
|
|
7258
|
+
case V.Containing: return r ? pl : U;
|
|
7259
|
+
case V.ContainedBy: return i ? pl : W;
|
|
7260
|
+
case V.Equals: return r && i ? e.pattern === t.pattern ? H : pl : r ? H | W : i ? H | U : H;
|
|
7261
|
+
case V.Intersection: return r && i ? pl : r ? K | G | W : i ? K | G | U : K;
|
|
7261
7262
|
}
|
|
7262
7263
|
}
|
|
7263
7264
|
//#endregion
|
|
7264
7265
|
//#region src/json-schema-subset/checker/checker.ts
|
|
7265
|
-
function
|
|
7266
|
-
let r = {}, i = [], a =
|
|
7267
|
-
r.isEquals =
|
|
7266
|
+
function qd(e, t, n) {
|
|
7267
|
+
let r = {}, i = [], a = ld(Yd(e, r)), o = Jd(), s = hd(e);
|
|
7268
|
+
r.isEquals = cd(dl), r.calculate = Ml({
|
|
7268
7269
|
describe: o,
|
|
7269
7270
|
equals: s,
|
|
7270
7271
|
calculate: a,
|
|
7271
7272
|
observeCalculation: (e, t, n, r) => {
|
|
7272
|
-
if (!
|
|
7273
|
-
let a = r ?
|
|
7273
|
+
if (!Zd(r ? Cl(n) : n)) return;
|
|
7274
|
+
let a = r ? Qd(t, e) : Qd(e, t);
|
|
7274
7275
|
a && i.push(a);
|
|
7275
7276
|
}
|
|
7276
7277
|
}), Object.freeze(r);
|
|
@@ -7280,104 +7281,104 @@ function Kd(e, t, n) {
|
|
|
7280
7281
|
expression: c
|
|
7281
7282
|
};
|
|
7282
7283
|
}
|
|
7283
|
-
var
|
|
7284
|
+
var Jd = () => (e) => {
|
|
7284
7285
|
let t;
|
|
7285
|
-
switch (
|
|
7286
|
-
case
|
|
7286
|
+
switch (X(e)) {
|
|
7287
|
+
case Y.Not:
|
|
7287
7288
|
t = {
|
|
7288
|
-
kind:
|
|
7289
|
+
kind: jl.Not,
|
|
7289
7290
|
expression: e.not
|
|
7290
7291
|
};
|
|
7291
7292
|
break;
|
|
7292
|
-
case
|
|
7293
|
+
case Y.Combination:
|
|
7293
7294
|
if ("allOf" in e) t = {
|
|
7294
|
-
kind:
|
|
7295
|
-
expressions:
|
|
7295
|
+
kind: jl.AllOf,
|
|
7296
|
+
expressions: Xd(e.allOf, Y.Any)
|
|
7296
7297
|
};
|
|
7297
7298
|
else if ("anyOf" in e) t = {
|
|
7298
|
-
kind:
|
|
7299
|
-
expressions:
|
|
7299
|
+
kind: jl.AnyOf,
|
|
7300
|
+
expressions: Xd(e.anyOf, Y.Never)
|
|
7300
7301
|
};
|
|
7301
7302
|
else if ("oneOf" in e) t = {
|
|
7302
|
-
kind:
|
|
7303
|
-
expressions:
|
|
7303
|
+
kind: jl.OneOf,
|
|
7304
|
+
expressions: Xd(e.oneOf, Y.Never)
|
|
7304
7305
|
};
|
|
7305
7306
|
else throw Error(`invalid combination JSON Schema: ${JSON.stringify(e)}`);
|
|
7306
7307
|
break;
|
|
7307
|
-
default: t = { kind:
|
|
7308
|
+
default: t = { kind: jl.Leaf };
|
|
7308
7309
|
}
|
|
7309
7310
|
return t;
|
|
7310
|
-
},
|
|
7311
|
-
let i =
|
|
7312
|
-
if (i ===
|
|
7311
|
+
}, Yd = (e, t) => (n, r) => {
|
|
7312
|
+
let i = X(n), a = X(r);
|
|
7313
|
+
if (i === Y.Extends || a === Y.Extends) return e.calculate(n, r);
|
|
7313
7314
|
switch (i) {
|
|
7314
|
-
case
|
|
7315
|
-
case
|
|
7315
|
+
case Y.Any: return a === Y.Any ? H : U;
|
|
7316
|
+
case Y.Never: return a === Y.Never ? H : W;
|
|
7316
7317
|
}
|
|
7317
7318
|
switch (a) {
|
|
7318
|
-
case
|
|
7319
|
-
case
|
|
7319
|
+
case Y.Any: return W;
|
|
7320
|
+
case Y.Never: return U;
|
|
7320
7321
|
}
|
|
7321
|
-
if (i ===
|
|
7322
|
-
if (i ===
|
|
7323
|
-
if (a ===
|
|
7324
|
-
if (i !== a) return
|
|
7322
|
+
if (i === Y.EnumOrConst && a === Y.EnumOrConst) return dd(t, n, r);
|
|
7323
|
+
if (i === Y.EnumOrConst) return fd(n, r);
|
|
7324
|
+
if (a === Y.EnumOrConst) return Cl(fd(r, n));
|
|
7325
|
+
if (i !== a) return G;
|
|
7325
7326
|
switch (i) {
|
|
7326
|
-
case
|
|
7327
|
-
case
|
|
7328
|
-
case
|
|
7329
|
-
case
|
|
7330
|
-
case
|
|
7331
|
-
case
|
|
7327
|
+
case Y.Null: return H;
|
|
7328
|
+
case Y.Numeric: return Ad(n, r);
|
|
7329
|
+
case Y.String: return Kd(n, r);
|
|
7330
|
+
case Y.Boolean: return H;
|
|
7331
|
+
case Y.Object: return Fd(t, n, r);
|
|
7332
|
+
case Y.Array: return od(t, n, r);
|
|
7332
7333
|
default: throw Error(`invalid kind ${i}`);
|
|
7333
7334
|
}
|
|
7334
7335
|
};
|
|
7335
|
-
function
|
|
7336
|
-
return e.filter((e) =>
|
|
7336
|
+
function Xd(e, t) {
|
|
7337
|
+
return e.filter((e) => X(e) !== t);
|
|
7337
7338
|
}
|
|
7338
|
-
function
|
|
7339
|
-
return !
|
|
7339
|
+
function Zd(e) {
|
|
7340
|
+
return !ml(e) && !gl(e) && (hl(e) || vl(e) || _l(e));
|
|
7340
7341
|
}
|
|
7341
|
-
function
|
|
7342
|
-
let n =
|
|
7342
|
+
function Qd(e, t) {
|
|
7343
|
+
let n = tu(t);
|
|
7343
7344
|
if (!n) return;
|
|
7344
|
-
let r =
|
|
7345
|
+
let r = X(e), i = X(t);
|
|
7345
7346
|
if (r !== i) return [...n, "type"];
|
|
7346
7347
|
let a = e, o = t;
|
|
7347
7348
|
switch (i) {
|
|
7348
|
-
case
|
|
7349
|
+
case Y.String:
|
|
7349
7350
|
if ((a.minLength ?? 0) < (o.minLength ?? 0)) return [...n, "minLength"];
|
|
7350
7351
|
if ((a.maxLength ?? Infinity) > (o.maxLength ?? Infinity)) return [...n, "maxLength"];
|
|
7351
7352
|
if (a.pattern !== o.pattern && o.pattern) return [...n, "pattern"];
|
|
7352
7353
|
break;
|
|
7353
|
-
case
|
|
7354
|
+
case Y.Numeric:
|
|
7354
7355
|
if ((a.minimum ?? a.exclusiveMinimum ?? -Infinity) < (o.minimum ?? o.exclusiveMinimum ?? -Infinity)) return [...n, o.exclusiveMinimum == null ? "minimum" : "exclusiveMinimum"];
|
|
7355
7356
|
if ((a.maximum ?? a.exclusiveMaximum ?? Infinity) > (o.maximum ?? o.exclusiveMaximum ?? Infinity)) return [...n, o.exclusiveMaximum == null ? "maximum" : "exclusiveMaximum"];
|
|
7356
7357
|
if (a.multipleOf !== o.multipleOf && o.multipleOf != null) return [...n, "multipleOf"];
|
|
7357
7358
|
break;
|
|
7358
|
-
case
|
|
7359
|
+
case Y.Array:
|
|
7359
7360
|
if ((a.minItems ?? 0) < (o.minItems ?? 0)) return [...n, "minItems"];
|
|
7360
7361
|
if ((a.maxItems ?? Infinity) > (o.maxItems ?? Infinity)) return [...n, "maxItems"];
|
|
7361
7362
|
break;
|
|
7362
|
-
case
|
|
7363
|
+
case Y.Object: {
|
|
7363
7364
|
let e = new Set(a.required ?? []);
|
|
7364
7365
|
if ((o.required ?? []).some((t) => !e.has(t))) return [...n, "required"];
|
|
7365
7366
|
if ((a.minProperties ?? 0) < (o.minProperties ?? 0)) return [...n, "minProperties"];
|
|
7366
7367
|
if ((a.maxProperties ?? Infinity) > (o.maxProperties ?? Infinity)) return [...n, "maxProperties"];
|
|
7367
7368
|
break;
|
|
7368
7369
|
}
|
|
7369
|
-
case
|
|
7370
|
+
case Y.EnumOrConst: return [...n, o.const == null ? "enum" : "const"];
|
|
7370
7371
|
}
|
|
7371
7372
|
return n;
|
|
7372
7373
|
}
|
|
7373
7374
|
//#endregion
|
|
7374
7375
|
//#region src/json-schema-subset/extends/extendsContext.ts
|
|
7375
|
-
var
|
|
7376
|
+
var $d = class e {
|
|
7376
7377
|
constructor(e = []) {
|
|
7377
7378
|
this.extendsSchemaClasses = Object.freeze([...e]);
|
|
7378
7379
|
}
|
|
7379
7380
|
tryCompiledExtendsSchema(e, t) {
|
|
7380
|
-
for (let n of this.extendsSchemaClasses) if (n.isMatch(e)) return new n(
|
|
7381
|
+
for (let n of this.extendsSchemaClasses) if (n.isMatch(e)) return new n(sl(), e, t);
|
|
7381
7382
|
return null;
|
|
7382
7383
|
}
|
|
7383
7384
|
isExtendsSchema(e) {
|
|
@@ -7387,7 +7388,7 @@ var Qd = class e {
|
|
|
7387
7388
|
calculate(t, n) {
|
|
7388
7389
|
let r = !(t instanceof this.findMatchedClass(t, n)), i = 0, a;
|
|
7389
7390
|
a = r ? n.compare(t) : t.compare(n);
|
|
7390
|
-
for (let t of a) r && (t = e.swap(t)), i |=
|
|
7391
|
+
for (let t of a) r && (t = e.swap(t)), i |= yl(t);
|
|
7391
7392
|
return i;
|
|
7392
7393
|
}
|
|
7393
7394
|
equals(e, t) {
|
|
@@ -7399,43 +7400,43 @@ var Qd = class e {
|
|
|
7399
7400
|
}
|
|
7400
7401
|
static swap(e) {
|
|
7401
7402
|
switch (e) {
|
|
7402
|
-
case
|
|
7403
|
-
case
|
|
7403
|
+
case V.Containing: return V.ContainedBy;
|
|
7404
|
+
case V.ContainedBy: return V.Containing;
|
|
7404
7405
|
default: return e;
|
|
7405
7406
|
}
|
|
7406
7407
|
}
|
|
7407
7408
|
};
|
|
7408
7409
|
//#endregion
|
|
7409
7410
|
//#region src/json-schema-subset/preprocessing.ts
|
|
7410
|
-
function
|
|
7411
|
+
function ef(e, t, n = !1) {
|
|
7411
7412
|
let r = t(e);
|
|
7412
7413
|
if (Array.isArray(r)) {
|
|
7413
7414
|
let e = [];
|
|
7414
|
-
throw
|
|
7415
|
+
throw nf(e, r, "$"), new Nl(e);
|
|
7415
7416
|
}
|
|
7416
7417
|
let { schema: i, warns: a } = r;
|
|
7417
7418
|
if (n && a.length > 0) {
|
|
7418
7419
|
console.warn(`found ${a.length} warns after compile schema`);
|
|
7419
|
-
for (let e of a) console.warn(
|
|
7420
|
+
for (let e of a) console.warn(Fl(e));
|
|
7420
7421
|
}
|
|
7421
7422
|
return i;
|
|
7422
7423
|
}
|
|
7423
|
-
function
|
|
7424
|
+
function tf(e, t, n, r = !1) {
|
|
7424
7425
|
let i = n(e), a = n(t);
|
|
7425
7426
|
if (Array.isArray(i) || Array.isArray(a)) {
|
|
7426
7427
|
let e = [];
|
|
7427
|
-
throw Array.isArray(i) &&
|
|
7428
|
+
throw Array.isArray(i) && nf(e, i, "$1"), Array.isArray(a) && nf(e, a, "$2"), new Nl(e);
|
|
7428
7429
|
}
|
|
7429
7430
|
let { schema: o, warns: s } = i, { schema: c, warns: l } = a;
|
|
7430
7431
|
if (r) {
|
|
7431
7432
|
s.length > 0 && console.warn(`found ${s.length} warns after compile superSchema`);
|
|
7432
|
-
for (let e of s) console.warn(
|
|
7433
|
+
for (let e of s) console.warn(Fl(e));
|
|
7433
7434
|
l.length > 0 && console.warn(`found ${l.length} warns after compile subSchema`);
|
|
7434
|
-
for (let e of l) console.warn(
|
|
7435
|
+
for (let e of l) console.warn(Fl(e));
|
|
7435
7436
|
}
|
|
7436
7437
|
return [o, c];
|
|
7437
7438
|
}
|
|
7438
|
-
function
|
|
7439
|
+
function nf(e, t, n) {
|
|
7439
7440
|
for (let r of t) {
|
|
7440
7441
|
let t = {
|
|
7441
7442
|
...r,
|
|
@@ -7446,46 +7447,46 @@ function tf(e, t, n) {
|
|
|
7446
7447
|
}
|
|
7447
7448
|
//#endregion
|
|
7448
7449
|
//#region src/json-schema-subset/global.ts
|
|
7449
|
-
var
|
|
7450
|
+
var rf = Object.freeze({
|
|
7450
7451
|
True: 0,
|
|
7451
7452
|
False: 1,
|
|
7452
7453
|
Unknown: 2
|
|
7453
7454
|
});
|
|
7454
|
-
function
|
|
7455
|
-
let n = new
|
|
7455
|
+
function af({ extendsSchemaClasses: e, delegate: t } = {}) {
|
|
7456
|
+
let n = new $d(e);
|
|
7456
7457
|
return Object.freeze({
|
|
7457
|
-
compile: (e, r, i) =>
|
|
7458
|
+
compile: (e, r, i) => ef(e, (e) => Hu(e, n, r, t), i),
|
|
7458
7459
|
isSubset: (e, r, i = !1) => {
|
|
7459
|
-
let [a, o] =
|
|
7460
|
-
return l && !u ? { result:
|
|
7460
|
+
let [a, o] = tf(e, r, (e) => Hu(e, n, void 0, t), i), { errorPath: s, expression: c } = qd(n, a, o), l = ml(c) || gl(c), u = hl(c) || vl(c) || _l(c);
|
|
7461
|
+
return l && !u ? { result: rf.True } : !l && u ? {
|
|
7461
7462
|
errorPath: s,
|
|
7462
|
-
result:
|
|
7463
|
-
} : { result:
|
|
7463
|
+
result: rf.False
|
|
7464
|
+
} : { result: rf.Unknown };
|
|
7464
7465
|
}
|
|
7465
7466
|
});
|
|
7466
7467
|
}
|
|
7467
7468
|
//#endregion
|
|
7468
7469
|
//#region ../../node_modules/.bun/@wopjs+cast@0.1.16/node_modules/@wopjs/cast/dist/index.mjs
|
|
7469
|
-
var
|
|
7470
|
+
var of = (e) => e !== void 0, sf = (e) => typeof e == "string", cf = Array.isArray, lf = (e) => typeof e == "object" && !!e, uf = (e) => lf(e) && !cf(e), Q = (e) => uf(e) ? e : void 0;
|
|
7470
7471
|
//#endregion
|
|
7471
7472
|
//#region src/manifest/common/schemaComparer.ts
|
|
7472
7473
|
function df(e) {
|
|
7473
|
-
return
|
|
7474
|
+
return Q(e)?.type === "string";
|
|
7474
7475
|
}
|
|
7475
7476
|
function ff(e) {
|
|
7476
|
-
return e instanceof yf ||
|
|
7477
|
+
return e instanceof yf || Q(e)?.type === "array";
|
|
7477
7478
|
}
|
|
7478
7479
|
function pf(e) {
|
|
7479
|
-
let t =
|
|
7480
|
-
return t?.type === "array" &&
|
|
7480
|
+
let t = Q(e);
|
|
7481
|
+
return t?.type === "array" && Q(t.items)?.type === "string";
|
|
7481
7482
|
}
|
|
7482
7483
|
function mf(e) {
|
|
7483
|
-
let t =
|
|
7484
|
+
let t = Q(e);
|
|
7484
7485
|
return t != null && Object.keys(t).length === 0;
|
|
7485
7486
|
}
|
|
7486
7487
|
function hf(e) {
|
|
7487
|
-
let t =
|
|
7488
|
-
if (t == null || n == null || t.packageId != null && !
|
|
7488
|
+
let t = Q(e), n = Q(t?.error);
|
|
7489
|
+
if (t == null || n == null || t.packageId != null && !sf(t.packageId) || n.message != null && !sf(n.message)) throw TypeError("Invalid schema comparison context.");
|
|
7489
7490
|
}
|
|
7490
7491
|
function gf(e) {
|
|
7491
7492
|
return e == null ? { error: {} } : (hf(e), e);
|
|
@@ -7501,25 +7502,25 @@ var _f = class e {
|
|
|
7501
7502
|
return this.passThrough(e) || this.compareImpl(e);
|
|
7502
7503
|
}
|
|
7503
7504
|
passThrough(e) {
|
|
7504
|
-
if (e instanceof xf) return [
|
|
7505
|
+
if (e instanceof xf) return [V.Equals];
|
|
7505
7506
|
}
|
|
7506
7507
|
}, vf = class e extends _f {
|
|
7507
7508
|
static isMatch(e) {
|
|
7508
|
-
let t =
|
|
7509
|
-
return Array.isArray(t) && t.every((e) =>
|
|
7509
|
+
let t = Q(e)?.enum;
|
|
7510
|
+
return Array.isArray(t) && t.every((e) => sf(e));
|
|
7510
7511
|
}
|
|
7511
7512
|
constructor(t, n, r) {
|
|
7512
7513
|
if (!e.isMatch(n)) throw TypeError("Invalid single-select schema.");
|
|
7513
7514
|
super(t, n, r);
|
|
7514
7515
|
}
|
|
7515
7516
|
compareImpl(t) {
|
|
7516
|
-
if (df(t)) return [
|
|
7517
|
+
if (df(t)) return [V.ContainedBy];
|
|
7517
7518
|
if (t instanceof e) {
|
|
7518
|
-
let e = new Set(this.value.enum), n =
|
|
7519
|
-
for (let r of t.value.enum) e.has(r) || (n =
|
|
7520
|
-
return e.size === 0 ? [n] : e.size === this.value.enum.length ? [
|
|
7519
|
+
let e = new Set(this.value.enum), n = V.Equals;
|
|
7520
|
+
for (let r of t.value.enum) e.has(r) || (n = V.ContainedBy), e.delete(r);
|
|
7521
|
+
return e.size === 0 ? [n] : e.size === this.value.enum.length ? [V.Rejection] : [V.Intersection];
|
|
7521
7522
|
}
|
|
7522
|
-
return [
|
|
7523
|
+
return [V.Rejection];
|
|
7523
7524
|
}
|
|
7524
7525
|
equals(t) {
|
|
7525
7526
|
if (t instanceof e) {
|
|
@@ -7534,21 +7535,21 @@ var _f = class e {
|
|
|
7534
7535
|
}
|
|
7535
7536
|
}, yf = class e extends _f {
|
|
7536
7537
|
static isMatch(e) {
|
|
7537
|
-
let t =
|
|
7538
|
-
return t?.type === "array" && t.uniqueItems === !0 && Array.isArray(n) && n.every((e) =>
|
|
7538
|
+
let t = Q(e), n = Q(t?.items)?.enum;
|
|
7539
|
+
return t?.type === "array" && t.uniqueItems === !0 && Array.isArray(n) && n.every((e) => sf(e));
|
|
7539
7540
|
}
|
|
7540
7541
|
constructor(t, n, r) {
|
|
7541
7542
|
if (!e.isMatch(n)) throw TypeError("Invalid multi-select schema.");
|
|
7542
7543
|
super(t, n, r);
|
|
7543
7544
|
}
|
|
7544
7545
|
compareImpl(t) {
|
|
7545
|
-
if (t instanceof bf || pf(t)) return [
|
|
7546
|
+
if (t instanceof bf || pf(t)) return [V.ContainedBy];
|
|
7546
7547
|
if (t instanceof e) {
|
|
7547
|
-
let e = new Set(this.value.items.enum), n =
|
|
7548
|
-
for (let r of t.value.items.enum) e.has(r) || (n =
|
|
7549
|
-
return e.size === 0 ? [n] : e.size === this.value.items.enum.length ? [
|
|
7548
|
+
let e = new Set(this.value.items.enum), n = V.Equals;
|
|
7549
|
+
for (let r of t.value.items.enum) e.has(r) || (n = V.ContainedBy), e.delete(r);
|
|
7550
|
+
return e.size === 0 ? [n] : e.size === this.value.items.enum.length ? [V.Rejection] : [V.Intersection];
|
|
7550
7551
|
}
|
|
7551
|
-
return [
|
|
7552
|
+
return [V.Rejection];
|
|
7552
7553
|
}
|
|
7553
7554
|
equals(t) {
|
|
7554
7555
|
if (t instanceof e) {
|
|
@@ -7563,15 +7564,15 @@ var _f = class e {
|
|
|
7563
7564
|
}
|
|
7564
7565
|
}, bf = class e extends _f {
|
|
7565
7566
|
static isMatch(e) {
|
|
7566
|
-
let t =
|
|
7567
|
-
return t?.type === "array" && !t.uniqueItems && (!
|
|
7567
|
+
let t = Q(e);
|
|
7568
|
+
return t?.type === "array" && !t.uniqueItems && (!of(t.items) || mf(t.items));
|
|
7568
7569
|
}
|
|
7569
7570
|
constructor(t, n, r) {
|
|
7570
7571
|
if (!e.isMatch(n)) throw TypeError("Invalid array schema.");
|
|
7571
7572
|
super(t, n, r);
|
|
7572
7573
|
}
|
|
7573
7574
|
compareImpl(t) {
|
|
7574
|
-
return t instanceof e || ff(t) ? [
|
|
7575
|
+
return t instanceof e || ff(t) ? [V.Equals] : [V.Rejection];
|
|
7575
7576
|
}
|
|
7576
7577
|
equals(t) {
|
|
7577
7578
|
return t instanceof e;
|
|
@@ -7585,42 +7586,42 @@ var _f = class e {
|
|
|
7585
7586
|
super(t, n, r);
|
|
7586
7587
|
}
|
|
7587
7588
|
compareImpl(e) {
|
|
7588
|
-
return [
|
|
7589
|
+
return [V.Equals];
|
|
7589
7590
|
}
|
|
7590
7591
|
equals(e) {
|
|
7591
7592
|
return !0;
|
|
7592
7593
|
}
|
|
7593
7594
|
}, Sf = class e extends _f {
|
|
7594
7595
|
static isMatch(e) {
|
|
7595
|
-
return
|
|
7596
|
+
return Q(e)?.contentMediaType === "oomol/bin";
|
|
7596
7597
|
}
|
|
7597
7598
|
constructor(t, n, r) {
|
|
7598
7599
|
if (!e.isMatch(n)) throw TypeError("Invalid binary schema.");
|
|
7599
7600
|
super(t, n, r);
|
|
7600
7601
|
}
|
|
7601
7602
|
compareImpl(t) {
|
|
7602
|
-
return t instanceof e ? [
|
|
7603
|
+
return t instanceof e ? [V.Equals] : (_f.setError(this, t, "edgeError.binDiffType"), [V.Rejection]);
|
|
7603
7604
|
}
|
|
7604
7605
|
equals(t) {
|
|
7605
7606
|
return t instanceof e;
|
|
7606
7607
|
}
|
|
7607
7608
|
}, Cf = class e extends _f {
|
|
7608
7609
|
static isMatch(e) {
|
|
7609
|
-
return
|
|
7610
|
+
return Q(e)?.contentMediaType === "oomol/artifact";
|
|
7610
7611
|
}
|
|
7611
7612
|
constructor(t, n, r) {
|
|
7612
7613
|
if (!e.isMatch(n)) throw TypeError("Invalid Artifact schema.");
|
|
7613
7614
|
super(t, n, r);
|
|
7614
7615
|
}
|
|
7615
7616
|
compareImpl(t) {
|
|
7616
|
-
return t instanceof e ? [
|
|
7617
|
+
return t instanceof e ? [V.Equals] : (_f.setError(this, t, "edgeError.artifactDiffType"), [V.Rejection]);
|
|
7617
7618
|
}
|
|
7618
7619
|
equals(t) {
|
|
7619
7620
|
return t instanceof e;
|
|
7620
7621
|
}
|
|
7621
7622
|
};
|
|
7622
7623
|
function wf() {
|
|
7623
|
-
return
|
|
7624
|
+
return af({ extendsSchemaClasses: [
|
|
7624
7625
|
bf,
|
|
7625
7626
|
xf,
|
|
7626
7627
|
vf,
|
|
@@ -7644,7 +7645,7 @@ function Df(e, t) {
|
|
|
7644
7645
|
let t = Ef.get(n);
|
|
7645
7646
|
if (t == null) {
|
|
7646
7647
|
let e = typeof n.$schema == "string" ? n.$schema : "", r = e.includes("draft-04") ? "4" : e.includes("draft-07") ? "7" : e.includes("2020-12") ? "2020-12" : "2019-09";
|
|
7647
|
-
t = new
|
|
7648
|
+
t = new Ec(structuredClone(n), r), Ef.set(n, t);
|
|
7648
7649
|
}
|
|
7649
7650
|
return t.validate(e).valid;
|
|
7650
7651
|
} catch {
|
|
@@ -7653,8 +7654,8 @@ function Df(e, t) {
|
|
|
7653
7654
|
}
|
|
7654
7655
|
//#endregion
|
|
7655
7656
|
//#region src/flow/common/agent.ts
|
|
7656
|
-
var $ =
|
|
7657
|
-
type:
|
|
7657
|
+
var $ = zs(() => N([es(), ls({
|
|
7658
|
+
type: N([F([
|
|
7658
7659
|
"array",
|
|
7659
7660
|
"boolean",
|
|
7660
7661
|
"integer",
|
|
@@ -7662,7 +7663,7 @@ var $ = Rs(() => P([j(), cs({
|
|
|
7662
7663
|
"number",
|
|
7663
7664
|
"object",
|
|
7664
7665
|
"string"
|
|
7665
|
-
]),
|
|
7666
|
+
]), j(F([
|
|
7666
7667
|
"array",
|
|
7667
7668
|
"boolean",
|
|
7668
7669
|
"integer",
|
|
@@ -7671,23 +7672,23 @@ var $ = Rs(() => P([j(), cs({
|
|
|
7671
7672
|
"object",
|
|
7672
7673
|
"string"
|
|
7673
7674
|
])).min(1)]).optional(),
|
|
7674
|
-
const:
|
|
7675
|
-
allOf:
|
|
7676
|
-
anyOf:
|
|
7677
|
-
oneOf:
|
|
7675
|
+
const: Us().optional(),
|
|
7676
|
+
allOf: j($).min(1).optional(),
|
|
7677
|
+
anyOf: j($).min(1).optional(),
|
|
7678
|
+
oneOf: j($).min(1).optional(),
|
|
7678
7679
|
not: $.optional(),
|
|
7679
7680
|
if: $.optional(),
|
|
7680
7681
|
then: $.optional(),
|
|
7681
7682
|
else: $.optional(),
|
|
7682
7683
|
$ref: O().optional(),
|
|
7683
|
-
$schema:
|
|
7684
|
+
$schema: F([
|
|
7684
7685
|
"http://json-schema.org/draft-07/schema#",
|
|
7685
7686
|
"https://json-schema.org/draft-07/schema",
|
|
7686
7687
|
"https://json-schema.org/draft/2019-09/schema",
|
|
7687
7688
|
"https://json-schema.org/draft/2020-12/schema"
|
|
7688
7689
|
]).optional(),
|
|
7689
|
-
$defs:
|
|
7690
|
-
definitions:
|
|
7690
|
+
$defs: P(O(), $).optional(),
|
|
7691
|
+
definitions: P(O(), $).optional(),
|
|
7691
7692
|
pattern: O().refine((e) => {
|
|
7692
7693
|
try {
|
|
7693
7694
|
return new RegExp(e, "u").source.length > 0;
|
|
@@ -7695,42 +7696,42 @@ var $ = Rs(() => P([j(), cs({
|
|
|
7695
7696
|
return !1;
|
|
7696
7697
|
}
|
|
7697
7698
|
}, "Invalid regular expression.").optional(),
|
|
7698
|
-
format: O().refine((e) => Object.hasOwn(
|
|
7699
|
+
format: O().refine((e) => Object.hasOwn(mc, e), "Unsupported string format.").optional(),
|
|
7699
7700
|
multipleOf: A().positive().optional(),
|
|
7700
|
-
uniqueItems:
|
|
7701
|
+
uniqueItems: es().optional(),
|
|
7701
7702
|
contains: $.optional(),
|
|
7702
7703
|
minContains: A().int().nonnegative().optional(),
|
|
7703
7704
|
maxContains: A().int().nonnegative().optional(),
|
|
7704
7705
|
minProperties: A().int().nonnegative().optional(),
|
|
7705
7706
|
maxProperties: A().int().nonnegative().optional(),
|
|
7706
7707
|
propertyNames: $.optional(),
|
|
7707
|
-
patternProperties:
|
|
7708
|
+
patternProperties: P(O().refine((e) => {
|
|
7708
7709
|
try {
|
|
7709
7710
|
return new RegExp(e, "u").source.length > 0;
|
|
7710
7711
|
} catch {
|
|
7711
7712
|
return !1;
|
|
7712
7713
|
}
|
|
7713
7714
|
}, "Invalid regular expression."), $).optional(),
|
|
7714
|
-
dependentRequired:
|
|
7715
|
-
dependentSchemas:
|
|
7716
|
-
dependencies:
|
|
7717
|
-
prefixItems:
|
|
7715
|
+
dependentRequired: P(O(), j(O())).optional(),
|
|
7716
|
+
dependentSchemas: P(O(), $).optional(),
|
|
7717
|
+
dependencies: P(O(), N([$, j(O())])).optional(),
|
|
7718
|
+
prefixItems: j($).optional(),
|
|
7718
7719
|
additionalItems: $.optional(),
|
|
7719
7720
|
unevaluatedItems: $.optional(),
|
|
7720
7721
|
unevaluatedProperties: $.optional(),
|
|
7721
7722
|
description: O().optional(),
|
|
7722
7723
|
title: O().optional(),
|
|
7723
|
-
default:
|
|
7724
|
-
examples:
|
|
7725
|
-
readOnly:
|
|
7726
|
-
writeOnly:
|
|
7727
|
-
deprecated:
|
|
7724
|
+
default: Us().optional(),
|
|
7725
|
+
examples: j(Us()).optional(),
|
|
7726
|
+
readOnly: es().optional(),
|
|
7727
|
+
writeOnly: es().optional(),
|
|
7728
|
+
deprecated: es().optional(),
|
|
7728
7729
|
$comment: O().optional(),
|
|
7729
|
-
enum:
|
|
7730
|
-
properties:
|
|
7731
|
-
required:
|
|
7730
|
+
enum: j(Us()).min(1).optional(),
|
|
7731
|
+
properties: P(O(), $).optional(),
|
|
7732
|
+
required: j(O()).optional(),
|
|
7732
7733
|
additionalProperties: $.optional(),
|
|
7733
|
-
items:
|
|
7734
|
+
items: N([$, j($)]).optional(),
|
|
7734
7735
|
minItems: A().int().nonnegative().optional(),
|
|
7735
7736
|
maxItems: A().int().nonnegative().optional(),
|
|
7736
7737
|
minLength: A().int().nonnegative().optional(),
|
|
@@ -7788,8 +7789,8 @@ function Pf(e, t) {
|
|
|
7788
7789
|
switch (t.kind) {
|
|
7789
7790
|
case "condition": return { [t.input.handle]: t.input };
|
|
7790
7791
|
case "value": return {};
|
|
7791
|
-
case "subflow": return
|
|
7792
|
-
case "task": return
|
|
7792
|
+
case "subflow": return al(e.subflows[t.subflowId].inputs);
|
|
7793
|
+
case "task": return al([...t.task == null ? e.tasks[t.taskId].inputs : t.task.inputs, ...t.additionalInputs ?? []]);
|
|
7793
7794
|
case "wait": {
|
|
7794
7795
|
let n = t.notification, r = n == null ? void 0 : e.tasks[n.taskId];
|
|
7795
7796
|
return {
|
|
@@ -7803,7 +7804,7 @@ function Ff(e, t) {
|
|
|
7803
7804
|
if (t.name != null) return t.name;
|
|
7804
7805
|
switch (t.kind) {
|
|
7805
7806
|
case "condition": return;
|
|
7806
|
-
case "value": return "
|
|
7807
|
+
case "value": return "Fixed Values";
|
|
7807
7808
|
case "subflow": return e.subflows[t.subflowId].name;
|
|
7808
7809
|
case "task": return t.task == null ? e.tasks[t.taskId].name : t.task.name;
|
|
7809
7810
|
case "wait": return "Wait";
|
|
@@ -7831,18 +7832,18 @@ function Bf(e, t, n = 0) {
|
|
|
7831
7832
|
let r = Lf(e, t);
|
|
7832
7833
|
return Object.fromEntries(Object.entries(r).map(([e, r]) => [e, Bf(r, t, n + 1)]));
|
|
7833
7834
|
}
|
|
7834
|
-
var Vf =
|
|
7835
|
-
state:
|
|
7835
|
+
var Vf = ls({
|
|
7836
|
+
state: Us(),
|
|
7836
7837
|
callId: O().min(1),
|
|
7837
7838
|
toolId: O().min(1),
|
|
7838
|
-
input:
|
|
7839
|
+
input: P(O(), Us()),
|
|
7839
7840
|
rounds: A().int().nonnegative(),
|
|
7840
|
-
version:
|
|
7841
|
-
}), Hf =
|
|
7842
|
-
kind:
|
|
7843
|
-
output:
|
|
7844
|
-
}),
|
|
7845
|
-
kind:
|
|
7841
|
+
version: I(1)
|
|
7842
|
+
}), Hf = N([ls({
|
|
7843
|
+
kind: I("completed"),
|
|
7844
|
+
output: Us()
|
|
7845
|
+
}), ls({
|
|
7846
|
+
kind: I("suspended"),
|
|
7846
7847
|
checkpoint: Vf
|
|
7847
7848
|
})]);
|
|
7848
7849
|
function Uf(e) {
|
|
@@ -7870,14 +7871,14 @@ function Uf(e) {
|
|
|
7870
7871
|
if (!Array.isArray(t.skipped)) throw Error("Checkpoint skipped nodes must be an array.");
|
|
7871
7872
|
let a = t.skipped.map((e) => zf(e, "Checkpoint skipped node"));
|
|
7872
7873
|
if (new Set(a).size != a.length || a.some((e) => i[e] != null)) throw Error("Checkpoint node states conflict.");
|
|
7873
|
-
let o =
|
|
7874
|
+
let o = ls({
|
|
7874
7875
|
jobId: O().min(1),
|
|
7875
7876
|
nodeId: O().min(1),
|
|
7876
|
-
value:
|
|
7877
|
+
value: Us(),
|
|
7877
7878
|
waitId: O().min(1)
|
|
7878
|
-
}), s = o.parse(t.wait), c =
|
|
7879
|
+
}), s = o.parse(t.wait), c = j(o).parse(t.queue), l = P(O(), ls({
|
|
7879
7880
|
invocationId: O().min(1),
|
|
7880
|
-
input:
|
|
7881
|
+
input: P(O(), Us()),
|
|
7881
7882
|
remainingMs: A().positive().optional(),
|
|
7882
7883
|
checkpoint: Vf
|
|
7883
7884
|
})).parse(t.agents), u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
|
|
@@ -7984,7 +7985,7 @@ function Yf(e, t, n) {
|
|
|
7984
7985
|
};
|
|
7985
7986
|
}
|
|
7986
7987
|
function Xf(e, t, n, r) {
|
|
7987
|
-
let i = Kf(Bf(r === void 0 ? {} : r, `Node "${t}" outputs`), t), a = n.kind == "task" ?
|
|
7988
|
+
let i = Kf(Bf(r === void 0 ? {} : r, `Node "${t}" outputs`), t), a = n.kind == "task" ? al(n.task == null ? e.tasks[n.taskId].outputs : n.task.outputs) : n.kind == "subflow" ? al(e.subflows[n.subflowId].outputs) : n.kind == "value" ? al(n.values) : Object.fromEntries((n.kind == "wait" ? n.actions : [...n.cases.map((e) => e.output), ...n.defaultOutput == null ? [] : [n.defaultOutput]]).map((e) => [e, n.input]));
|
|
7988
7989
|
for (let [e, n] of Object.entries(i)) {
|
|
7989
7990
|
let r = a[e];
|
|
7990
7991
|
if (r == null || !(n === null && r.nullable) && !Df(n, r.jsonSchema)) throw Error(`Node "${t}" output "${e}" does not match its declaration.`);
|