@anov/cic-standard-sdk 0.0.13 → 0.0.14
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/cic-sdk.cjs.js +4 -4
- package/dist/cic-sdk.es.js +404 -387
- package/dist/cic-sdk.umd.js +4 -4
- package/dist/types/page.d.ts +1 -1
- package/package.json +1 -1
package/dist/cic-sdk.es.js
CHANGED
|
@@ -40,28 +40,28 @@ function Et() {
|
|
|
40
40
|
}
|
|
41
41
|
get str() {
|
|
42
42
|
var n;
|
|
43
|
-
return (n = this._str) !== null && n !== void 0 ? n : this._str = this._items.reduce((c,
|
|
43
|
+
return (n = this._str) !== null && n !== void 0 ? n : this._str = this._items.reduce((c, g) => `${c}${g}`, "");
|
|
44
44
|
}
|
|
45
45
|
get names() {
|
|
46
46
|
var n;
|
|
47
|
-
return (n = this._names) !== null && n !== void 0 ? n : this._names = this._items.reduce((c,
|
|
47
|
+
return (n = this._names) !== null && n !== void 0 ? n : this._names = this._items.reduce((c, g) => (g instanceof r && (c[g.str] = (c[g.str] || 0) + 1), c), {});
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
e._Code = i, e.nil = new i("");
|
|
51
|
-
function
|
|
51
|
+
function y(u, ...n) {
|
|
52
52
|
const c = [u[0]];
|
|
53
|
-
let
|
|
54
|
-
for (;
|
|
55
|
-
d(c, n[
|
|
53
|
+
let g = 0;
|
|
54
|
+
for (; g < n.length; )
|
|
55
|
+
d(c, n[g]), c.push(u[++g]);
|
|
56
56
|
return new i(c);
|
|
57
57
|
}
|
|
58
|
-
e._ =
|
|
58
|
+
e._ = y;
|
|
59
59
|
const s = new i("+");
|
|
60
60
|
function l(u, ...n) {
|
|
61
61
|
const c = [v(u[0])];
|
|
62
|
-
let
|
|
63
|
-
for (;
|
|
64
|
-
c.push(s), d(c, n[
|
|
62
|
+
let g = 0;
|
|
63
|
+
for (; g < n.length; )
|
|
64
|
+
c.push(s), d(c, n[g]), c.push(s, v(u[++g]));
|
|
65
65
|
return f(c), new i(c);
|
|
66
66
|
}
|
|
67
67
|
e.str = l;
|
|
@@ -109,7 +109,7 @@ function Et() {
|
|
|
109
109
|
}
|
|
110
110
|
e.safeStringify = v;
|
|
111
111
|
function b(u) {
|
|
112
|
-
return typeof u == "string" && e.IDENTIFIER.test(u) ? new i(`.${u}`) :
|
|
112
|
+
return typeof u == "string" && e.IDENTIFIER.test(u) ? new i(`.${u}`) : y`[${u}]`;
|
|
113
113
|
}
|
|
114
114
|
e.getProperty = b;
|
|
115
115
|
function h(u) {
|
|
@@ -142,7 +142,7 @@ function ur() {
|
|
|
142
142
|
let: new t.Name("let"),
|
|
143
143
|
var: new t.Name("var")
|
|
144
144
|
};
|
|
145
|
-
class
|
|
145
|
+
class y {
|
|
146
146
|
constructor({ prefixes: w, parent: $ } = {}) {
|
|
147
147
|
this._names = {}, this._prefixes = w, this._parent = $;
|
|
148
148
|
}
|
|
@@ -163,7 +163,7 @@ function ur() {
|
|
|
163
163
|
return this._names[w] = { prefix: w, index: 0 };
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
e.Scope =
|
|
166
|
+
e.Scope = y;
|
|
167
167
|
class s extends t.Name {
|
|
168
168
|
constructor(w, $) {
|
|
169
169
|
super($), this.prefix = w;
|
|
@@ -174,7 +174,7 @@ function ur() {
|
|
|
174
174
|
}
|
|
175
175
|
e.ValueScopeName = s;
|
|
176
176
|
const l = (0, t._)`\n`;
|
|
177
|
-
class d extends
|
|
177
|
+
class d extends y {
|
|
178
178
|
constructor(w) {
|
|
179
179
|
super(w), this._values = {}, this._scope = w.scope, this.opts = { ...w, _n: w.lines ? l : t.nil };
|
|
180
180
|
}
|
|
@@ -270,15 +270,15 @@ function G() {
|
|
|
270
270
|
} }), Object.defineProperty(e, "Name", { enumerable: !0, get: function() {
|
|
271
271
|
return i.Name;
|
|
272
272
|
} });
|
|
273
|
-
var
|
|
273
|
+
var y = ur();
|
|
274
274
|
Object.defineProperty(e, "Scope", { enumerable: !0, get: function() {
|
|
275
|
-
return
|
|
275
|
+
return y.Scope;
|
|
276
276
|
} }), Object.defineProperty(e, "ValueScope", { enumerable: !0, get: function() {
|
|
277
|
-
return
|
|
277
|
+
return y.ValueScope;
|
|
278
278
|
} }), Object.defineProperty(e, "ValueScopeName", { enumerable: !0, get: function() {
|
|
279
|
-
return
|
|
279
|
+
return y.ValueScopeName;
|
|
280
280
|
} }), Object.defineProperty(e, "varKinds", { enumerable: !0, get: function() {
|
|
281
|
-
return
|
|
281
|
+
return y.varKinds;
|
|
282
282
|
} }), e.operators = {
|
|
283
283
|
GT: new t._Code(">"),
|
|
284
284
|
GTE: new t._Code(">="),
|
|
@@ -474,7 +474,7 @@ function G() {
|
|
|
474
474
|
return V(super.names, this.iteration.names);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
class
|
|
477
|
+
class g extends n {
|
|
478
478
|
constructor(p, S, N, U) {
|
|
479
479
|
super(), this.varKind = p, this.name = S, this.from = N, this.to = U;
|
|
480
480
|
}
|
|
@@ -649,7 +649,7 @@ function G() {
|
|
|
649
649
|
// `for` statement for a range of values
|
|
650
650
|
forRange(p, S, N, U, J = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
|
|
651
651
|
const Q = this._scope.toName(p);
|
|
652
|
-
return this._for(new
|
|
652
|
+
return this._for(new g(J, Q, S, N), () => U(Q));
|
|
653
653
|
}
|
|
654
654
|
// `for-of` statement (in es5 mode replace with a normal for loop)
|
|
655
655
|
forOf(p, S, N, U = r.varKinds.const) {
|
|
@@ -822,18 +822,18 @@ function Y() {
|
|
|
822
822
|
}
|
|
823
823
|
H.toHash = r;
|
|
824
824
|
function i(o, m) {
|
|
825
|
-
return typeof m == "boolean" ? m : Object.keys(m).length === 0 ? !0 : (
|
|
825
|
+
return typeof m == "boolean" ? m : Object.keys(m).length === 0 ? !0 : (y(o, m), !s(m, o.self.RULES.all));
|
|
826
826
|
}
|
|
827
827
|
H.alwaysValidSchema = i;
|
|
828
|
-
function
|
|
828
|
+
function y(o, m = o.schema) {
|
|
829
829
|
const { opts: P, self: O } = o;
|
|
830
830
|
if (!P.strictSchema || typeof m == "boolean")
|
|
831
831
|
return;
|
|
832
832
|
const T = O.RULES.keywords;
|
|
833
833
|
for (const z in m)
|
|
834
|
-
T[z] ||
|
|
834
|
+
T[z] || g(o, `unknown keyword: "${z}"`);
|
|
835
835
|
}
|
|
836
|
-
H.checkUnknownRules =
|
|
836
|
+
H.checkUnknownRules = y;
|
|
837
837
|
function s(o, m) {
|
|
838
838
|
if (typeof o == "boolean")
|
|
839
839
|
return !o;
|
|
@@ -941,14 +941,14 @@ function Y() {
|
|
|
941
941
|
return P ? (0, e.getProperty)(o).toString() : "/" + $(o);
|
|
942
942
|
}
|
|
943
943
|
H.getErrorPath = c;
|
|
944
|
-
function
|
|
944
|
+
function g(o, m, P = o.opts.strictSchema) {
|
|
945
945
|
if (P) {
|
|
946
946
|
if (m = `strict mode: ${m}`, P === !0)
|
|
947
947
|
throw new Error(m);
|
|
948
948
|
o.self.logger.warn(m);
|
|
949
949
|
}
|
|
950
950
|
}
|
|
951
|
-
return H.checkStrictMode =
|
|
951
|
+
return H.checkStrictMode = g, H;
|
|
952
952
|
}
|
|
953
953
|
var Fe = {}, pr;
|
|
954
954
|
function Se() {
|
|
@@ -995,25 +995,25 @@ function Dt() {
|
|
|
995
995
|
}, e.keyword$DataError = {
|
|
996
996
|
message: ({ keyword: a, schemaType: u }) => u ? (0, t.str)`"${a}" keyword must be ${u} ($data)` : (0, t.str)`"${a}" keyword is invalid ($data)`
|
|
997
997
|
};
|
|
998
|
-
function
|
|
999
|
-
const { it:
|
|
1000
|
-
c ?? (m || P) ? f(o, O) : w(
|
|
998
|
+
function y(a, u = e.keywordError, n, c) {
|
|
999
|
+
const { it: g } = a, { gen: o, compositeRule: m, allErrors: P } = g, O = E(a, u, n);
|
|
1000
|
+
c ?? (m || P) ? f(o, O) : w(g, (0, t._)`[${O}]`);
|
|
1001
1001
|
}
|
|
1002
|
-
e.reportError =
|
|
1002
|
+
e.reportError = y;
|
|
1003
1003
|
function s(a, u = e.keywordError, n) {
|
|
1004
|
-
const { it: c } = a, { gen:
|
|
1005
|
-
f(
|
|
1004
|
+
const { it: c } = a, { gen: g, compositeRule: o, allErrors: m } = c, P = E(a, u, n);
|
|
1005
|
+
f(g, P), o || m || w(c, i.default.vErrors);
|
|
1006
1006
|
}
|
|
1007
1007
|
e.reportExtraError = s;
|
|
1008
1008
|
function l(a, u) {
|
|
1009
1009
|
a.assign(i.default.errors, u), a.if((0, t._)`${i.default.vErrors} !== null`, () => a.if(u, () => a.assign((0, t._)`${i.default.vErrors}.length`, u), () => a.assign(i.default.vErrors, null)));
|
|
1010
1010
|
}
|
|
1011
1011
|
e.resetErrorsCount = l;
|
|
1012
|
-
function d({ gen: a, keyword: u, schemaValue: n, data: c, errsCount:
|
|
1013
|
-
if (
|
|
1012
|
+
function d({ gen: a, keyword: u, schemaValue: n, data: c, errsCount: g, it: o }) {
|
|
1013
|
+
if (g === void 0)
|
|
1014
1014
|
throw new Error("ajv implementation error");
|
|
1015
1015
|
const m = a.name("err");
|
|
1016
|
-
a.forRange("i",
|
|
1016
|
+
a.forRange("i", g, i.default.errors, (P) => {
|
|
1017
1017
|
a.const(m, (0, t._)`${i.default.vErrors}[${P}]`), a.if((0, t._)`${m}.instancePath === undefined`, () => a.assign((0, t._)`${m}.instancePath`, (0, t.strConcat)(i.default.instancePath, o.errorPath))), a.assign((0, t._)`${m}.schemaPath`, (0, t.str)`${o.errSchemaPath}/${u}`), o.opts.verbose && (a.assign((0, t._)`${m}.schema`, n), a.assign((0, t._)`${m}.data`, c));
|
|
1018
1018
|
});
|
|
1019
1019
|
}
|
|
@@ -1023,8 +1023,8 @@ function Dt() {
|
|
|
1023
1023
|
a.if((0, t._)`${i.default.vErrors} === null`, () => a.assign(i.default.vErrors, (0, t._)`[${n}]`), (0, t._)`${i.default.vErrors}.push(${n})`), a.code((0, t._)`${i.default.errors}++`);
|
|
1024
1024
|
}
|
|
1025
1025
|
function w(a, u) {
|
|
1026
|
-
const { gen: n, validateName: c, schemaEnv:
|
|
1027
|
-
|
|
1026
|
+
const { gen: n, validateName: c, schemaEnv: g } = a;
|
|
1027
|
+
g.$async ? n.throw((0, t._)`new ${a.ValidationError}(${u})`) : (n.assign((0, t._)`${c}.errors`, u), n.return(!1));
|
|
1028
1028
|
}
|
|
1029
1029
|
const $ = {
|
|
1030
1030
|
keyword: new t.Name("keyword"),
|
|
@@ -1041,8 +1041,8 @@ function Dt() {
|
|
|
1041
1041
|
return c === !1 ? (0, t._)`{}` : _(a, u, n);
|
|
1042
1042
|
}
|
|
1043
1043
|
function _(a, u, n = {}) {
|
|
1044
|
-
const { gen: c, it:
|
|
1045
|
-
v(
|
|
1044
|
+
const { gen: c, it: g } = a, o = [
|
|
1045
|
+
v(g, n),
|
|
1046
1046
|
b(a, n)
|
|
1047
1047
|
];
|
|
1048
1048
|
return h(a, u, o), c.object(...o);
|
|
@@ -1052,12 +1052,12 @@ function Dt() {
|
|
|
1052
1052
|
return [i.default.instancePath, (0, t.strConcat)(i.default.instancePath, n)];
|
|
1053
1053
|
}
|
|
1054
1054
|
function b({ keyword: a, it: { errSchemaPath: u } }, { schemaPath: n, parentSchema: c }) {
|
|
1055
|
-
let
|
|
1056
|
-
return n && (
|
|
1055
|
+
let g = c ? u : (0, t.str)`${u}/${a}`;
|
|
1056
|
+
return n && (g = (0, t.str)`${g}${(0, r.getErrorPath)(n, r.Type.Str)}`), [$.schemaPath, g];
|
|
1057
1057
|
}
|
|
1058
1058
|
function h(a, { params: u, message: n }, c) {
|
|
1059
|
-
const { keyword:
|
|
1060
|
-
c.push([$.keyword,
|
|
1059
|
+
const { keyword: g, data: o, schemaValue: m, it: P } = a, { opts: O, propertyName: T, topSchemaRef: z, schemaPath: C } = P;
|
|
1060
|
+
c.push([$.keyword, g], [$.params, typeof u == "function" ? u(a) : u || (0, t._)`{}`]), O.messages && c.push([$.message, typeof n == "function" ? n(a) : n]), O.verbose && c.push([$.schema, m], [$.parentSchema, (0, t._)`${z}${C}`], [i.default.data, o]), T && c.push([$.propertyName, T]);
|
|
1061
1061
|
}
|
|
1062
1062
|
})(Ut)), Ut;
|
|
1063
1063
|
}
|
|
@@ -1068,11 +1068,11 @@ function ls() {
|
|
|
1068
1068
|
const e = Dt(), t = G(), r = Se(), i = {
|
|
1069
1069
|
message: "boolean schema is false"
|
|
1070
1070
|
};
|
|
1071
|
-
function
|
|
1071
|
+
function y(d) {
|
|
1072
1072
|
const { gen: f, schema: w, validateName: $ } = d;
|
|
1073
1073
|
w === !1 ? l(d, !1) : typeof w == "object" && w.$async === !0 ? f.return(r.default.data) : (f.assign((0, t._)`${$}.errors`, null), f.return(!0));
|
|
1074
1074
|
}
|
|
1075
|
-
Ee.topBoolOrEmptySchema =
|
|
1075
|
+
Ee.topBoolOrEmptySchema = y;
|
|
1076
1076
|
function s(d, f) {
|
|
1077
1077
|
const { gen: w, schema: $ } = d;
|
|
1078
1078
|
$ === !1 ? (w.var(f, !1), l(d)) : w.var(f, !0);
|
|
@@ -1098,20 +1098,20 @@ function Rn() {
|
|
|
1098
1098
|
if (yr) return ke;
|
|
1099
1099
|
yr = 1, Object.defineProperty(ke, "__esModule", { value: !0 }), ke.getRules = ke.isJSONType = void 0;
|
|
1100
1100
|
const e = ["string", "number", "integer", "boolean", "null", "object", "array"], t = new Set(e);
|
|
1101
|
-
function r(
|
|
1102
|
-
return typeof
|
|
1101
|
+
function r(y) {
|
|
1102
|
+
return typeof y == "string" && t.has(y);
|
|
1103
1103
|
}
|
|
1104
1104
|
ke.isJSONType = r;
|
|
1105
1105
|
function i() {
|
|
1106
|
-
const
|
|
1106
|
+
const y = {
|
|
1107
1107
|
number: { type: "number", rules: [] },
|
|
1108
1108
|
string: { type: "string", rules: [] },
|
|
1109
1109
|
array: { type: "array", rules: [] },
|
|
1110
1110
|
object: { type: "object", rules: [] }
|
|
1111
1111
|
};
|
|
1112
1112
|
return {
|
|
1113
|
-
types: { ...
|
|
1114
|
-
rules: [{ rules: [] },
|
|
1113
|
+
types: { ...y, integer: !0, boolean: !0, null: !0 },
|
|
1114
|
+
rules: [{ rules: [] }, y.number, y.string, y.array, y.object],
|
|
1115
1115
|
post: { rules: [] },
|
|
1116
1116
|
all: {},
|
|
1117
1117
|
keywords: {}
|
|
@@ -1123,18 +1123,18 @@ var _e = {}, gr;
|
|
|
1123
1123
|
function In() {
|
|
1124
1124
|
if (gr) return _e;
|
|
1125
1125
|
gr = 1, Object.defineProperty(_e, "__esModule", { value: !0 }), _e.shouldUseRule = _e.shouldUseGroup = _e.schemaHasRulesForType = void 0;
|
|
1126
|
-
function e({ schema: i, self:
|
|
1127
|
-
const l =
|
|
1126
|
+
function e({ schema: i, self: y }, s) {
|
|
1127
|
+
const l = y.RULES.types[s];
|
|
1128
1128
|
return l && l !== !0 && t(i, l);
|
|
1129
1129
|
}
|
|
1130
1130
|
_e.schemaHasRulesForType = e;
|
|
1131
|
-
function t(i,
|
|
1132
|
-
return
|
|
1131
|
+
function t(i, y) {
|
|
1132
|
+
return y.rules.some((s) => r(i, s));
|
|
1133
1133
|
}
|
|
1134
1134
|
_e.shouldUseGroup = t;
|
|
1135
|
-
function r(i,
|
|
1135
|
+
function r(i, y) {
|
|
1136
1136
|
var s;
|
|
1137
|
-
return i[
|
|
1137
|
+
return i[y.keyword] !== void 0 || ((s = y.definition.implements) === null || s === void 0 ? void 0 : s.some((l) => i[l] !== void 0));
|
|
1138
1138
|
}
|
|
1139
1139
|
return _e.shouldUseRule = r, _e;
|
|
1140
1140
|
}
|
|
@@ -1142,7 +1142,7 @@ var vr;
|
|
|
1142
1142
|
function kt() {
|
|
1143
1143
|
if (vr) return se;
|
|
1144
1144
|
vr = 1, Object.defineProperty(se, "__esModule", { value: !0 }), se.reportTypeError = se.checkDataTypes = se.checkDataType = se.coerceAndCheckDataType = se.getJSONTypes = se.getSchemaTypes = se.DataType = void 0;
|
|
1145
|
-
const e = Rn(), t = In(), r = Dt(), i = G(),
|
|
1145
|
+
const e = Rn(), t = In(), r = Dt(), i = G(), y = Y();
|
|
1146
1146
|
var s;
|
|
1147
1147
|
(function(n) {
|
|
1148
1148
|
n[n.Correct = 0] = "Correct", n[n.Wrong = 1] = "Wrong";
|
|
@@ -1168,10 +1168,10 @@ function kt() {
|
|
|
1168
1168
|
}
|
|
1169
1169
|
se.getJSONTypes = d;
|
|
1170
1170
|
function f(n, c) {
|
|
1171
|
-
const { gen:
|
|
1171
|
+
const { gen: g, data: o, opts: m } = n, P = $(c, m.coerceTypes), O = c.length > 0 && !(P.length === 0 && c.length === 1 && (0, t.schemaHasRulesForType)(n, c[0]));
|
|
1172
1172
|
if (O) {
|
|
1173
1173
|
const T = b(c, o, m.strictNumbers, s.Wrong);
|
|
1174
|
-
|
|
1174
|
+
g.if(T, () => {
|
|
1175
1175
|
P.length ? E(n, c, P) : a(n);
|
|
1176
1176
|
});
|
|
1177
1177
|
}
|
|
@@ -1180,12 +1180,12 @@ function kt() {
|
|
|
1180
1180
|
se.coerceAndCheckDataType = f;
|
|
1181
1181
|
const w = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
|
|
1182
1182
|
function $(n, c) {
|
|
1183
|
-
return c ? n.filter((
|
|
1183
|
+
return c ? n.filter((g) => w.has(g) || c === "array" && g === "array") : [];
|
|
1184
1184
|
}
|
|
1185
|
-
function E(n, c,
|
|
1185
|
+
function E(n, c, g) {
|
|
1186
1186
|
const { gen: o, data: m, opts: P } = n, O = o.let("dataType", (0, i._)`typeof ${m}`), T = o.let("coerced", (0, i._)`undefined`);
|
|
1187
1187
|
P.coerceTypes === "array" && o.if((0, i._)`${O} == 'object' && Array.isArray(${m}) && ${m}.length == 1`, () => o.assign(m, (0, i._)`${m}[0]`).assign(O, (0, i._)`typeof ${m}`).if(b(c, m, P.strictNumbers), () => o.assign(T, m))), o.if((0, i._)`${T} !== undefined`);
|
|
1188
|
-
for (const C of
|
|
1188
|
+
for (const C of g)
|
|
1189
1189
|
(w.has(C) || C === "array" && P.coerceTypes === "array") && z(C);
|
|
1190
1190
|
o.else(), a(n), o.endIf(), o.if((0, i._)`${T} !== undefined`, () => {
|
|
1191
1191
|
o.assign(m, T), _(n, T);
|
|
@@ -1215,10 +1215,10 @@ function kt() {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
|
-
function _({ gen: n, parentData: c, parentDataProperty:
|
|
1219
|
-
n.if((0, i._)`${c} !== undefined`, () => n.assign((0, i._)`${c}[${
|
|
1218
|
+
function _({ gen: n, parentData: c, parentDataProperty: g }, o) {
|
|
1219
|
+
n.if((0, i._)`${c} !== undefined`, () => n.assign((0, i._)`${c}[${g}]`, o));
|
|
1220
1220
|
}
|
|
1221
|
-
function v(n, c,
|
|
1221
|
+
function v(n, c, g, o = s.Correct) {
|
|
1222
1222
|
const m = o === s.Correct ? i.operators.EQ : i.operators.NEQ;
|
|
1223
1223
|
let P;
|
|
1224
1224
|
switch (n) {
|
|
@@ -1241,15 +1241,15 @@ function kt() {
|
|
|
1241
1241
|
}
|
|
1242
1242
|
return o === s.Correct ? P : (0, i.not)(P);
|
|
1243
1243
|
function O(T = i.nil) {
|
|
1244
|
-
return (0, i.and)((0, i._)`typeof ${c} == "number"`, T,
|
|
1244
|
+
return (0, i.and)((0, i._)`typeof ${c} == "number"`, T, g ? (0, i._)`isFinite(${c})` : i.nil);
|
|
1245
1245
|
}
|
|
1246
1246
|
}
|
|
1247
1247
|
se.checkDataType = v;
|
|
1248
|
-
function b(n, c,
|
|
1248
|
+
function b(n, c, g, o) {
|
|
1249
1249
|
if (n.length === 1)
|
|
1250
|
-
return v(n[0], c,
|
|
1250
|
+
return v(n[0], c, g, o);
|
|
1251
1251
|
let m;
|
|
1252
|
-
const P = (0,
|
|
1252
|
+
const P = (0, y.toHash)(n);
|
|
1253
1253
|
if (P.array && P.object) {
|
|
1254
1254
|
const O = (0, i._)`typeof ${c} != "object"`;
|
|
1255
1255
|
m = P.null ? O : (0, i._)`!${c} || ${O}`, delete P.null, delete P.array, delete P.object;
|
|
@@ -1257,7 +1257,7 @@ function kt() {
|
|
|
1257
1257
|
m = i.nil;
|
|
1258
1258
|
P.number && delete P.integer;
|
|
1259
1259
|
for (const O in P)
|
|
1260
|
-
m = (0, i.and)(m, v(O, c,
|
|
1260
|
+
m = (0, i.and)(m, v(O, c, g, o));
|
|
1261
1261
|
return m;
|
|
1262
1262
|
}
|
|
1263
1263
|
se.checkDataTypes = b;
|
|
@@ -1271,11 +1271,11 @@ function kt() {
|
|
|
1271
1271
|
}
|
|
1272
1272
|
se.reportTypeError = a;
|
|
1273
1273
|
function u(n) {
|
|
1274
|
-
const { gen: c, data:
|
|
1274
|
+
const { gen: c, data: g, schema: o } = n, m = (0, y.schemaRefOrVal)(n, o, "type");
|
|
1275
1275
|
return {
|
|
1276
1276
|
gen: c,
|
|
1277
1277
|
keyword: "type",
|
|
1278
|
-
data:
|
|
1278
|
+
data: g,
|
|
1279
1279
|
schema: o.type,
|
|
1280
1280
|
schemaCode: m,
|
|
1281
1281
|
schemaValue: m,
|
|
@@ -1291,21 +1291,21 @@ function fs() {
|
|
|
1291
1291
|
if (_r) return qe;
|
|
1292
1292
|
_r = 1, Object.defineProperty(qe, "__esModule", { value: !0 }), qe.assignDefaults = void 0;
|
|
1293
1293
|
const e = G(), t = Y();
|
|
1294
|
-
function r(
|
|
1295
|
-
const { properties: l, items: d } =
|
|
1294
|
+
function r(y, s) {
|
|
1295
|
+
const { properties: l, items: d } = y.schema;
|
|
1296
1296
|
if (s === "object" && l)
|
|
1297
1297
|
for (const f in l)
|
|
1298
|
-
i(
|
|
1299
|
-
else s === "array" && Array.isArray(d) && d.forEach((f, w) => i(
|
|
1298
|
+
i(y, f, l[f].default);
|
|
1299
|
+
else s === "array" && Array.isArray(d) && d.forEach((f, w) => i(y, w, f.default));
|
|
1300
1300
|
}
|
|
1301
1301
|
qe.assignDefaults = r;
|
|
1302
|
-
function i(
|
|
1303
|
-
const { gen: d, compositeRule: f, data: w, opts: $ } =
|
|
1302
|
+
function i(y, s, l) {
|
|
1303
|
+
const { gen: d, compositeRule: f, data: w, opts: $ } = y;
|
|
1304
1304
|
if (l === void 0)
|
|
1305
1305
|
return;
|
|
1306
1306
|
const E = (0, e._)`${w}${(0, e.getProperty)(s)}`;
|
|
1307
1307
|
if (f) {
|
|
1308
|
-
(0, t.checkStrictMode)(
|
|
1308
|
+
(0, t.checkStrictMode)(y, `default is ignored for: ${E}`);
|
|
1309
1309
|
return;
|
|
1310
1310
|
}
|
|
1311
1311
|
let _ = (0, e._)`${E} === undefined`;
|
|
@@ -1318,15 +1318,15 @@ function ge() {
|
|
|
1318
1318
|
if ($r) return Z;
|
|
1319
1319
|
$r = 1, Object.defineProperty(Z, "__esModule", { value: !0 }), Z.validateUnion = Z.validateArray = Z.usePattern = Z.callValidateCode = Z.schemaProperties = Z.allSchemaProperties = Z.noPropertyInData = Z.propertyInData = Z.isOwnProperty = Z.hasPropFunc = Z.reportMissingProp = Z.checkMissingProp = Z.checkReportMissingProp = void 0;
|
|
1320
1320
|
const e = G(), t = Y(), r = Se(), i = Y();
|
|
1321
|
-
function
|
|
1322
|
-
const { gen:
|
|
1323
|
-
|
|
1321
|
+
function y(n, c) {
|
|
1322
|
+
const { gen: g, data: o, it: m } = n;
|
|
1323
|
+
g.if($(g, o, c, m.opts.ownProperties), () => {
|
|
1324
1324
|
n.setParams({ missingProperty: (0, e._)`${c}` }, !0), n.error();
|
|
1325
1325
|
});
|
|
1326
1326
|
}
|
|
1327
|
-
Z.checkReportMissingProp =
|
|
1328
|
-
function s({ gen: n, data: c, it: { opts:
|
|
1329
|
-
return (0, e.or)(...o.map((P) => (0, e.and)($(n, c, P,
|
|
1327
|
+
Z.checkReportMissingProp = y;
|
|
1328
|
+
function s({ gen: n, data: c, it: { opts: g } }, o, m) {
|
|
1329
|
+
return (0, e.or)(...o.map((P) => (0, e.and)($(n, c, P, g.ownProperties), (0, e._)`${m} = ${P}`)));
|
|
1330
1330
|
}
|
|
1331
1331
|
Z.checkMissingProp = s;
|
|
1332
1332
|
function l(n, c) {
|
|
@@ -1341,18 +1341,18 @@ function ge() {
|
|
|
1341
1341
|
});
|
|
1342
1342
|
}
|
|
1343
1343
|
Z.hasPropFunc = d;
|
|
1344
|
-
function f(n, c,
|
|
1345
|
-
return (0, e._)`${d(n)}.call(${c}, ${
|
|
1344
|
+
function f(n, c, g) {
|
|
1345
|
+
return (0, e._)`${d(n)}.call(${c}, ${g})`;
|
|
1346
1346
|
}
|
|
1347
1347
|
Z.isOwnProperty = f;
|
|
1348
|
-
function w(n, c,
|
|
1349
|
-
const m = (0, e._)`${c}${(0, e.getProperty)(
|
|
1350
|
-
return o ? (0, e._)`${m} && ${f(n, c,
|
|
1348
|
+
function w(n, c, g, o) {
|
|
1349
|
+
const m = (0, e._)`${c}${(0, e.getProperty)(g)} !== undefined`;
|
|
1350
|
+
return o ? (0, e._)`${m} && ${f(n, c, g)}` : m;
|
|
1351
1351
|
}
|
|
1352
1352
|
Z.propertyInData = w;
|
|
1353
|
-
function $(n, c,
|
|
1354
|
-
const m = (0, e._)`${c}${(0, e.getProperty)(
|
|
1355
|
-
return o ? (0, e.or)(m, (0, e.not)(f(n, c,
|
|
1353
|
+
function $(n, c, g, o) {
|
|
1354
|
+
const m = (0, e._)`${c}${(0, e.getProperty)(g)} === undefined`;
|
|
1355
|
+
return o ? (0, e.or)(m, (0, e.not)(f(n, c, g))) : m;
|
|
1356
1356
|
}
|
|
1357
1357
|
Z.noPropertyInData = $;
|
|
1358
1358
|
function E(n) {
|
|
@@ -1360,10 +1360,10 @@ function ge() {
|
|
|
1360
1360
|
}
|
|
1361
1361
|
Z.allSchemaProperties = E;
|
|
1362
1362
|
function _(n, c) {
|
|
1363
|
-
return E(c).filter((
|
|
1363
|
+
return E(c).filter((g) => !(0, t.alwaysValidSchema)(n, c[g]));
|
|
1364
1364
|
}
|
|
1365
1365
|
Z.schemaProperties = _;
|
|
1366
|
-
function v({ schemaCode: n, data: c, it: { gen:
|
|
1366
|
+
function v({ schemaCode: n, data: c, it: { gen: g, topSchemaRef: o, schemaPath: m, errorPath: P }, it: O }, T, z, C) {
|
|
1367
1367
|
const V = C ? (0, e._)`${n}, ${c}, ${o}${m}` : c, F = [
|
|
1368
1368
|
[r.default.instancePath, (0, e.strConcat)(r.default.instancePath, P)],
|
|
1369
1369
|
[r.default.parentData, O.parentData],
|
|
@@ -1371,29 +1371,29 @@ function ge() {
|
|
|
1371
1371
|
[r.default.rootData, r.default.rootData]
|
|
1372
1372
|
];
|
|
1373
1373
|
O.opts.dynamicRef && F.push([r.default.dynamicAnchors, r.default.dynamicAnchors]);
|
|
1374
|
-
const L = (0, e._)`${V}, ${
|
|
1374
|
+
const L = (0, e._)`${V}, ${g.object(...F)}`;
|
|
1375
1375
|
return z !== e.nil ? (0, e._)`${T}.call(${z}, ${L})` : (0, e._)`${T}(${L})`;
|
|
1376
1376
|
}
|
|
1377
1377
|
Z.callValidateCode = v;
|
|
1378
1378
|
const b = (0, e._)`new RegExp`;
|
|
1379
|
-
function h({ gen: n, it: { opts: c } },
|
|
1380
|
-
const o = c.unicodeRegExp ? "u" : "", { regExp: m } = c.code, P = m(
|
|
1379
|
+
function h({ gen: n, it: { opts: c } }, g) {
|
|
1380
|
+
const o = c.unicodeRegExp ? "u" : "", { regExp: m } = c.code, P = m(g, o);
|
|
1381
1381
|
return n.scopeValue("pattern", {
|
|
1382
1382
|
key: P.toString(),
|
|
1383
1383
|
ref: P,
|
|
1384
|
-
code: (0, e._)`${m.code === "new RegExp" ? b : (0, i.useFunc)(n, m)}(${
|
|
1384
|
+
code: (0, e._)`${m.code === "new RegExp" ? b : (0, i.useFunc)(n, m)}(${g}, ${o})`
|
|
1385
1385
|
});
|
|
1386
1386
|
}
|
|
1387
1387
|
Z.usePattern = h;
|
|
1388
1388
|
function a(n) {
|
|
1389
|
-
const { gen: c, data:
|
|
1389
|
+
const { gen: c, data: g, keyword: o, it: m } = n, P = c.name("valid");
|
|
1390
1390
|
if (m.allErrors) {
|
|
1391
1391
|
const T = c.let("valid", !0);
|
|
1392
1392
|
return O(() => c.assign(T, !1)), T;
|
|
1393
1393
|
}
|
|
1394
1394
|
return c.var(P, !0), O(() => c.break()), P;
|
|
1395
1395
|
function O(T) {
|
|
1396
|
-
const z = c.const("len", (0, e._)`${
|
|
1396
|
+
const z = c.const("len", (0, e._)`${g}.length`);
|
|
1397
1397
|
c.forRange("i", 0, z, (C) => {
|
|
1398
1398
|
n.subschema({
|
|
1399
1399
|
keyword: o,
|
|
@@ -1405,13 +1405,13 @@ function ge() {
|
|
|
1405
1405
|
}
|
|
1406
1406
|
Z.validateArray = a;
|
|
1407
1407
|
function u(n) {
|
|
1408
|
-
const { gen: c, schema:
|
|
1409
|
-
if (!Array.isArray(
|
|
1408
|
+
const { gen: c, schema: g, keyword: o, it: m } = n;
|
|
1409
|
+
if (!Array.isArray(g))
|
|
1410
1410
|
throw new Error("ajv implementation error");
|
|
1411
|
-
if (
|
|
1411
|
+
if (g.some((z) => (0, t.alwaysValidSchema)(m, z)) && !m.opts.unevaluated)
|
|
1412
1412
|
return;
|
|
1413
1413
|
const O = c.let("valid", !1), T = c.name("_valid");
|
|
1414
|
-
c.block(() =>
|
|
1414
|
+
c.block(() => g.forEach((z, C) => {
|
|
1415
1415
|
const V = n.subschema({
|
|
1416
1416
|
keyword: o,
|
|
1417
1417
|
schemaProp: C,
|
|
@@ -1427,24 +1427,24 @@ function ps() {
|
|
|
1427
1427
|
if (br) return he;
|
|
1428
1428
|
br = 1, Object.defineProperty(he, "__esModule", { value: !0 }), he.validateKeywordUsage = he.validSchemaType = he.funcKeywordCode = he.macroKeywordCode = void 0;
|
|
1429
1429
|
const e = G(), t = Se(), r = ge(), i = Dt();
|
|
1430
|
-
function
|
|
1431
|
-
const { gen: b, keyword: h, schema: a, parentSchema: u, it: n } = _, c = v.macro.call(n.self, a, u, n),
|
|
1430
|
+
function y(_, v) {
|
|
1431
|
+
const { gen: b, keyword: h, schema: a, parentSchema: u, it: n } = _, c = v.macro.call(n.self, a, u, n), g = w(b, h, c);
|
|
1432
1432
|
n.opts.validateSchema !== !1 && n.self.validateSchema(c, !0);
|
|
1433
1433
|
const o = b.name("valid");
|
|
1434
1434
|
_.subschema({
|
|
1435
1435
|
schema: c,
|
|
1436
1436
|
schemaPath: e.nil,
|
|
1437
1437
|
errSchemaPath: `${n.errSchemaPath}/${h}`,
|
|
1438
|
-
topSchemaRef:
|
|
1438
|
+
topSchemaRef: g,
|
|
1439
1439
|
compositeRule: !0
|
|
1440
1440
|
}, o), _.pass(o, () => _.error(!0));
|
|
1441
1441
|
}
|
|
1442
|
-
he.macroKeywordCode =
|
|
1442
|
+
he.macroKeywordCode = y;
|
|
1443
1443
|
function s(_, v) {
|
|
1444
1444
|
var b;
|
|
1445
|
-
const { gen: h, keyword: a, schema: u, parentSchema: n, $data: c, it:
|
|
1446
|
-
f(
|
|
1447
|
-
const o = !c && v.compile ? v.compile.call(
|
|
1445
|
+
const { gen: h, keyword: a, schema: u, parentSchema: n, $data: c, it: g } = _;
|
|
1446
|
+
f(g, v);
|
|
1447
|
+
const o = !c && v.compile ? v.compile.call(g.self, u, n, g) : v.validate, m = w(h, a, o), P = h.let("valid");
|
|
1448
1448
|
_.block$data(P, O), _.ok((b = v.valid) !== null && b !== void 0 ? b : P);
|
|
1449
1449
|
function O() {
|
|
1450
1450
|
if (v.errors === !1)
|
|
@@ -1456,14 +1456,14 @@ function ps() {
|
|
|
1456
1456
|
}
|
|
1457
1457
|
function T() {
|
|
1458
1458
|
const F = h.let("ruleErrs", null);
|
|
1459
|
-
return h.try(() => C((0, e._)`await `), (L) => h.assign(P, !1).if((0, e._)`${L} instanceof ${
|
|
1459
|
+
return h.try(() => C((0, e._)`await `), (L) => h.assign(P, !1).if((0, e._)`${L} instanceof ${g.ValidationError}`, () => h.assign(F, (0, e._)`${L}.errors`), () => h.throw(L))), F;
|
|
1460
1460
|
}
|
|
1461
1461
|
function z() {
|
|
1462
1462
|
const F = (0, e._)`${m}.errors`;
|
|
1463
1463
|
return h.assign(F, null), C(e.nil), F;
|
|
1464
1464
|
}
|
|
1465
1465
|
function C(F = v.async ? (0, e._)`await ` : e.nil) {
|
|
1466
|
-
const L =
|
|
1466
|
+
const L = g.opts.passContext ? t.default.this : t.default.self, x = !("compile" in v && !c || v.schema === !1);
|
|
1467
1467
|
h.assign(P, (0, e._)`${F}${(0, r.callValidateCode)(_, m, L, x)}`, v.modifying);
|
|
1468
1468
|
}
|
|
1469
1469
|
function V(F) {
|
|
@@ -1502,11 +1502,11 @@ function ps() {
|
|
|
1502
1502
|
if (n?.some((c) => !Object.prototype.hasOwnProperty.call(_, c)))
|
|
1503
1503
|
throw new Error(`parent schema must have dependencies of ${u}: ${n.join(",")}`);
|
|
1504
1504
|
if (a.validateSchema && !a.validateSchema(_[u])) {
|
|
1505
|
-
const
|
|
1505
|
+
const g = `keyword "${u}" value is invalid at path "${h}": ` + b.errorsText(a.validateSchema.errors);
|
|
1506
1506
|
if (v.validateSchema === "log")
|
|
1507
|
-
b.logger.error(
|
|
1507
|
+
b.logger.error(g);
|
|
1508
1508
|
else
|
|
1509
|
-
throw new Error(
|
|
1509
|
+
throw new Error(g);
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
1512
|
return he.validateKeywordUsage = E, he;
|
|
@@ -1562,10 +1562,10 @@ function ms() {
|
|
|
1562
1562
|
}
|
|
1563
1563
|
}
|
|
1564
1564
|
$e.extendSubschemaData = i;
|
|
1565
|
-
function
|
|
1565
|
+
function y(s, { jtdDiscriminator: l, jtdMetadata: d, compositeRule: f, createErrors: w, allErrors: $ }) {
|
|
1566
1566
|
f !== void 0 && (s.compositeRule = f), w !== void 0 && (s.createErrors = w), $ !== void 0 && (s.allErrors = $), s.jtdDiscriminator = l, s.jtdMetadata = d;
|
|
1567
1567
|
}
|
|
1568
|
-
return $e.extendSubschemaMode =
|
|
1568
|
+
return $e.extendSubschemaMode = y, $e;
|
|
1569
1569
|
}
|
|
1570
1570
|
var ae = {}, Gt, Pr;
|
|
1571
1571
|
function On() {
|
|
@@ -1573,21 +1573,21 @@ function On() {
|
|
|
1573
1573
|
if (t === r) return !0;
|
|
1574
1574
|
if (t && r && typeof t == "object" && typeof r == "object") {
|
|
1575
1575
|
if (t.constructor !== r.constructor) return !1;
|
|
1576
|
-
var i,
|
|
1576
|
+
var i, y, s;
|
|
1577
1577
|
if (Array.isArray(t)) {
|
|
1578
1578
|
if (i = t.length, i != r.length) return !1;
|
|
1579
|
-
for (
|
|
1580
|
-
if (!e(t[
|
|
1579
|
+
for (y = i; y-- !== 0; )
|
|
1580
|
+
if (!e(t[y], r[y])) return !1;
|
|
1581
1581
|
return !0;
|
|
1582
1582
|
}
|
|
1583
1583
|
if (t.constructor === RegExp) return t.source === r.source && t.flags === r.flags;
|
|
1584
1584
|
if (t.valueOf !== Object.prototype.valueOf) return t.valueOf() === r.valueOf();
|
|
1585
1585
|
if (t.toString !== Object.prototype.toString) return t.toString() === r.toString();
|
|
1586
1586
|
if (s = Object.keys(t), i = s.length, i !== Object.keys(r).length) return !1;
|
|
1587
|
-
for (
|
|
1588
|
-
if (!Object.prototype.hasOwnProperty.call(r, s[
|
|
1589
|
-
for (
|
|
1590
|
-
var l = s[
|
|
1587
|
+
for (y = i; y-- !== 0; )
|
|
1588
|
+
if (!Object.prototype.hasOwnProperty.call(r, s[y])) return !1;
|
|
1589
|
+
for (y = i; y-- !== 0; ) {
|
|
1590
|
+
var l = s[y];
|
|
1591
1591
|
if (!e(t[l], r[l])) return !1;
|
|
1592
1592
|
}
|
|
1593
1593
|
return !0;
|
|
@@ -1599,12 +1599,12 @@ var Wt = { exports: {} }, Sr;
|
|
|
1599
1599
|
function hs() {
|
|
1600
1600
|
if (Sr) return Wt.exports;
|
|
1601
1601
|
Sr = 1;
|
|
1602
|
-
var e = Wt.exports = function(i,
|
|
1603
|
-
typeof
|
|
1602
|
+
var e = Wt.exports = function(i, y, s) {
|
|
1603
|
+
typeof y == "function" && (s = y, y = {}), s = y.cb || s;
|
|
1604
1604
|
var l = typeof s == "function" ? s : s.pre || function() {
|
|
1605
1605
|
}, d = s.post || function() {
|
|
1606
1606
|
};
|
|
1607
|
-
t(
|
|
1607
|
+
t(y, l, d, i, "", i);
|
|
1608
1608
|
};
|
|
1609
1609
|
e.keywords = {
|
|
1610
1610
|
additionalItems: !0,
|
|
@@ -1647,20 +1647,20 @@ function hs() {
|
|
|
1647
1647
|
maxProperties: !0,
|
|
1648
1648
|
minProperties: !0
|
|
1649
1649
|
};
|
|
1650
|
-
function t(i,
|
|
1650
|
+
function t(i, y, s, l, d, f, w, $, E, _) {
|
|
1651
1651
|
if (l && typeof l == "object" && !Array.isArray(l)) {
|
|
1652
|
-
|
|
1652
|
+
y(l, d, f, w, $, E, _);
|
|
1653
1653
|
for (var v in l) {
|
|
1654
1654
|
var b = l[v];
|
|
1655
1655
|
if (Array.isArray(b)) {
|
|
1656
1656
|
if (v in e.arrayKeywords)
|
|
1657
1657
|
for (var h = 0; h < b.length; h++)
|
|
1658
|
-
t(i,
|
|
1658
|
+
t(i, y, s, b[h], d + "/" + v + "/" + h, f, d, v, l, h);
|
|
1659
1659
|
} else if (v in e.propsKeywords) {
|
|
1660
1660
|
if (b && typeof b == "object")
|
|
1661
1661
|
for (var a in b)
|
|
1662
|
-
t(i,
|
|
1663
|
-
} else (v in e.keywords || i.allKeys && !(v in e.skipKeywords)) && t(i,
|
|
1662
|
+
t(i, y, s, b[a], d + "/" + v + "/" + r(a), f, d, v, l, a);
|
|
1663
|
+
} else (v in e.keywords || i.allKeys && !(v in e.skipKeywords)) && t(i, y, s, b, d + "/" + v, f, d, v, l);
|
|
1664
1664
|
}
|
|
1665
1665
|
s(l, d, f, w, $, E, _);
|
|
1666
1666
|
}
|
|
@@ -1692,10 +1692,10 @@ function Tt() {
|
|
|
1692
1692
|
"enum",
|
|
1693
1693
|
"const"
|
|
1694
1694
|
]);
|
|
1695
|
-
function
|
|
1695
|
+
function y(h, a = !0) {
|
|
1696
1696
|
return typeof h == "boolean" ? !0 : a === !0 ? !l(h) : a ? d(h) <= a : !1;
|
|
1697
1697
|
}
|
|
1698
|
-
ae.inlineRef =
|
|
1698
|
+
ae.inlineRef = y;
|
|
1699
1699
|
const s = /* @__PURE__ */ new Set([
|
|
1700
1700
|
"$ref",
|
|
1701
1701
|
"$recursiveRef",
|
|
@@ -1746,13 +1746,13 @@ function Tt() {
|
|
|
1746
1746
|
function b(h, a) {
|
|
1747
1747
|
if (typeof h == "boolean")
|
|
1748
1748
|
return {};
|
|
1749
|
-
const { schemaId: u, uriResolver: n } = this.opts, c = E(h[u] || a),
|
|
1749
|
+
const { schemaId: u, uriResolver: n } = this.opts, c = E(h[u] || a), g = { "": c }, o = f(n, c, !1), m = {}, P = /* @__PURE__ */ new Set();
|
|
1750
1750
|
return r(h, { allKeys: !0 }, (z, C, V, F) => {
|
|
1751
1751
|
if (F === void 0)
|
|
1752
1752
|
return;
|
|
1753
1753
|
const L = o + C;
|
|
1754
|
-
let x =
|
|
1755
|
-
typeof z[u] == "string" && (x = ie.call(this, z[u])), oe.call(this, z.$anchor), oe.call(this, z.$dynamicAnchor),
|
|
1754
|
+
let x = g[F];
|
|
1755
|
+
typeof z[u] == "string" && (x = ie.call(this, z[u])), oe.call(this, z.$anchor), oe.call(this, z.$dynamicAnchor), g[C] = x;
|
|
1756
1756
|
function ie(X) {
|
|
1757
1757
|
const pe = this.opts.uriResolver.resolve;
|
|
1758
1758
|
if (X = E(x ? pe(x, X) : X), P.has(X))
|
|
@@ -1783,9 +1783,9 @@ var kr;
|
|
|
1783
1783
|
function Mt() {
|
|
1784
1784
|
if (kr) return ve;
|
|
1785
1785
|
kr = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.getData = ve.KeywordCxt = ve.validateFunctionCode = void 0;
|
|
1786
|
-
const e = ls(), t = kt(), r = In(), i = kt(),
|
|
1786
|
+
const e = ls(), t = kt(), r = In(), i = kt(), y = fs(), s = ps(), l = ms(), d = G(), f = Se(), w = Tt(), $ = Y(), E = Dt();
|
|
1787
1787
|
function _(k) {
|
|
1788
|
-
if (o(k) && (P(k),
|
|
1788
|
+
if (o(k) && (P(k), g(k))) {
|
|
1789
1789
|
a(k);
|
|
1790
1790
|
return;
|
|
1791
1791
|
}
|
|
@@ -1822,13 +1822,13 @@ function Mt() {
|
|
|
1822
1822
|
return q && (R.code.source || R.code.process) ? (0, d._)`/*# sourceURL=${q} */` : d.nil;
|
|
1823
1823
|
}
|
|
1824
1824
|
function c(k, R) {
|
|
1825
|
-
if (o(k) && (P(k),
|
|
1825
|
+
if (o(k) && (P(k), g(k))) {
|
|
1826
1826
|
m(k, R);
|
|
1827
1827
|
return;
|
|
1828
1828
|
}
|
|
1829
1829
|
(0, e.boolOrEmptySchema)(k, R);
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1831
|
+
function g({ schema: k, self: R }) {
|
|
1832
1832
|
if (typeof k == "boolean")
|
|
1833
1833
|
return !k;
|
|
1834
1834
|
for (const q in k)
|
|
@@ -1903,7 +1903,7 @@ function Mt() {
|
|
|
1903
1903
|
}
|
|
1904
1904
|
function oe(k, R) {
|
|
1905
1905
|
const { gen: q, schema: A, opts: { useDefaults: K } } = k;
|
|
1906
|
-
K && (0,
|
|
1906
|
+
K && (0, y.assignDefaults)(k, R.type), q.block(() => {
|
|
1907
1907
|
for (const W of R.rules)
|
|
1908
1908
|
(0, r.shouldUseRule)(A, W) && U(k, W.keyword, W.definition, R.type);
|
|
1909
1909
|
});
|
|
@@ -2109,8 +2109,8 @@ function At() {
|
|
|
2109
2109
|
Rr = 1, Object.defineProperty(Ue, "__esModule", { value: !0 });
|
|
2110
2110
|
const e = Tt();
|
|
2111
2111
|
class t extends Error {
|
|
2112
|
-
constructor(i,
|
|
2113
|
-
super(l || `can't resolve reference ${s} from id ${
|
|
2112
|
+
constructor(i, y, s, l) {
|
|
2113
|
+
super(l || `can't resolve reference ${s} from id ${y}`), this.missingRef = (0, e.resolveUrl)(i, y, s), this.missingSchema = (0, e.normalizeId)((0, e.getFullPath)(i, this.missingRef));
|
|
2114
2114
|
}
|
|
2115
2115
|
}
|
|
2116
2116
|
return Ue.default = t, Ue;
|
|
@@ -2119,7 +2119,7 @@ var le = {}, Ir;
|
|
|
2119
2119
|
function tr() {
|
|
2120
2120
|
if (Ir) return le;
|
|
2121
2121
|
Ir = 1, Object.defineProperty(le, "__esModule", { value: !0 }), le.resolveSchema = le.getCompilingSchema = le.resolveRef = le.compileSchema = le.SchemaEnv = void 0;
|
|
2122
|
-
const e = G(), t = er(), r = Se(), i = Tt(),
|
|
2122
|
+
const e = G(), t = er(), r = Se(), i = Tt(), y = Y(), s = Mt();
|
|
2123
2123
|
class l {
|
|
2124
2124
|
constructor(u) {
|
|
2125
2125
|
var n;
|
|
@@ -2133,7 +2133,7 @@ function tr() {
|
|
|
2133
2133
|
const u = $.call(this, a);
|
|
2134
2134
|
if (u)
|
|
2135
2135
|
return u;
|
|
2136
|
-
const n = (0, i.getFullPath)(this.opts.uriResolver, a.root.baseId), { es5: c, lines:
|
|
2136
|
+
const n = (0, i.getFullPath)(this.opts.uriResolver, a.root.baseId), { es5: c, lines: g } = this.opts.code, { ownProperties: o } = this.opts, m = new e.CodeGen(this.scope, { es5: c, lines: g, ownProperties: o });
|
|
2137
2137
|
let P;
|
|
2138
2138
|
a.$async && (P = m.scopeValue("Error", {
|
|
2139
2139
|
ref: t.default,
|
|
@@ -2192,9 +2192,9 @@ function tr() {
|
|
|
2192
2192
|
function f(a, u, n) {
|
|
2193
2193
|
var c;
|
|
2194
2194
|
n = (0, i.resolveUrl)(this.opts.uriResolver, u, n);
|
|
2195
|
-
const
|
|
2196
|
-
if (
|
|
2197
|
-
return
|
|
2195
|
+
const g = a.refs[n];
|
|
2196
|
+
if (g)
|
|
2197
|
+
return g;
|
|
2198
2198
|
let o = _.call(this, a, n);
|
|
2199
2199
|
if (o === void 0) {
|
|
2200
2200
|
const m = (c = a.localRefs) === null || c === void 0 ? void 0 : c[n], { schemaId: P } = this.opts;
|
|
@@ -2224,8 +2224,8 @@ function tr() {
|
|
|
2224
2224
|
}
|
|
2225
2225
|
function v(a, u) {
|
|
2226
2226
|
const n = this.opts.uriResolver.parse(u), c = (0, i._getFullPath)(this.opts.uriResolver, n);
|
|
2227
|
-
let
|
|
2228
|
-
if (Object.keys(a.schema).length > 0 && c ===
|
|
2227
|
+
let g = (0, i.getFullPath)(this.opts.uriResolver, a.baseId, void 0);
|
|
2228
|
+
if (Object.keys(a.schema).length > 0 && c === g)
|
|
2229
2229
|
return h.call(this, n, a);
|
|
2230
2230
|
const o = (0, i.normalizeId)(c), m = this.refs[o] || this.schemas[o];
|
|
2231
2231
|
if (typeof m == "string") {
|
|
@@ -2235,7 +2235,7 @@ function tr() {
|
|
|
2235
2235
|
if (typeof m?.schema == "object") {
|
|
2236
2236
|
if (m.validate || d.call(this, m), o === (0, i.normalizeId)(u)) {
|
|
2237
2237
|
const { schema: P } = m, { schemaId: O } = this.opts, T = P[O];
|
|
2238
|
-
return T && (
|
|
2238
|
+
return T && (g = (0, i.resolveUrl)(this.opts.uriResolver, g, T)), new l({ schema: P, schemaId: O, root: a, baseId: g });
|
|
2239
2239
|
}
|
|
2240
2240
|
return h.call(this, n, m);
|
|
2241
2241
|
}
|
|
@@ -2249,13 +2249,13 @@ function tr() {
|
|
|
2249
2249
|
"definitions"
|
|
2250
2250
|
]);
|
|
2251
2251
|
function h(a, { baseId: u, schema: n, root: c }) {
|
|
2252
|
-
var
|
|
2253
|
-
if (((
|
|
2252
|
+
var g;
|
|
2253
|
+
if (((g = a.fragment) === null || g === void 0 ? void 0 : g[0]) !== "/")
|
|
2254
2254
|
return;
|
|
2255
2255
|
for (const P of a.fragment.slice(1).split("/")) {
|
|
2256
2256
|
if (typeof n == "boolean")
|
|
2257
2257
|
return;
|
|
2258
|
-
const O = n[(0,
|
|
2258
|
+
const O = n[(0, y.unescapeFragment)(P)];
|
|
2259
2259
|
if (O === void 0)
|
|
2260
2260
|
return;
|
|
2261
2261
|
n = O;
|
|
@@ -2263,7 +2263,7 @@ function tr() {
|
|
|
2263
2263
|
!b.has(P) && T && (u = (0, i.resolveUrl)(this.opts.uriResolver, u, T));
|
|
2264
2264
|
}
|
|
2265
2265
|
let o;
|
|
2266
|
-
if (typeof n != "boolean" && n.$ref && !(0,
|
|
2266
|
+
if (typeof n != "boolean" && n.$ref && !(0, y.schemaHasRulesButRef)(n, this.RULES)) {
|
|
2267
2267
|
const P = (0, i.resolveUrl)(this.opts.uriResolver, u, n.$ref);
|
|
2268
2268
|
o = v.call(this, c, P);
|
|
2269
2269
|
}
|
|
@@ -2303,7 +2303,7 @@ function Nn() {
|
|
|
2303
2303
|
return v;
|
|
2304
2304
|
}
|
|
2305
2305
|
const i = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
|
|
2306
|
-
function
|
|
2306
|
+
function y(_) {
|
|
2307
2307
|
return _.length = 0, !0;
|
|
2308
2308
|
}
|
|
2309
2309
|
function s(_, v, b) {
|
|
@@ -2321,8 +2321,8 @@ function Nn() {
|
|
|
2321
2321
|
let v = 0;
|
|
2322
2322
|
const b = { error: !1, address: "", zone: "" }, h = [], a = [];
|
|
2323
2323
|
let u = !1, n = !1, c = s;
|
|
2324
|
-
for (let
|
|
2325
|
-
const o = _[
|
|
2324
|
+
for (let g = 0; g < _.length; g++) {
|
|
2325
|
+
const o = _[g];
|
|
2326
2326
|
if (!(o === "[" || o === "]"))
|
|
2327
2327
|
if (o === ":") {
|
|
2328
2328
|
if (u === !0 && (n = !0), !c(a, h, b))
|
|
@@ -2331,18 +2331,18 @@ function Nn() {
|
|
|
2331
2331
|
b.error = !0;
|
|
2332
2332
|
break;
|
|
2333
2333
|
}
|
|
2334
|
-
|
|
2334
|
+
g > 0 && _[g - 1] === ":" && (u = !0), h.push(":");
|
|
2335
2335
|
continue;
|
|
2336
2336
|
} else if (o === "%") {
|
|
2337
2337
|
if (!c(a, h, b))
|
|
2338
2338
|
break;
|
|
2339
|
-
c =
|
|
2339
|
+
c = y;
|
|
2340
2340
|
} else {
|
|
2341
2341
|
a.push(o);
|
|
2342
2342
|
continue;
|
|
2343
2343
|
}
|
|
2344
2344
|
}
|
|
2345
|
-
return a.length && (c ===
|
|
2345
|
+
return a.length && (c === y ? b.zone = a.join("") : n ? h.push(a.join("")) : h.push(r(a))), b.address = h.join(""), b;
|
|
2346
2346
|
}
|
|
2347
2347
|
function d(_) {
|
|
2348
2348
|
if (f(_, ":") < 2)
|
|
@@ -2467,7 +2467,7 @@ function Ps() {
|
|
|
2467
2467
|
o
|
|
2468
2468
|
) !== -1;
|
|
2469
2469
|
}
|
|
2470
|
-
function
|
|
2470
|
+
function y(o) {
|
|
2471
2471
|
return o.secure === !0 ? !0 : o.secure === !1 ? !1 : o.scheme ? o.scheme.length === 3 && (o.scheme[0] === "w" || o.scheme[0] === "W") && (o.scheme[1] === "s" || o.scheme[1] === "S") && (o.scheme[2] === "s" || o.scheme[2] === "S") : !1;
|
|
2472
2472
|
}
|
|
2473
2473
|
function s(o) {
|
|
@@ -2478,10 +2478,10 @@ function Ps() {
|
|
|
2478
2478
|
return (o.port === (m ? 443 : 80) || o.port === "") && (o.port = void 0), o.path || (o.path = "/"), o;
|
|
2479
2479
|
}
|
|
2480
2480
|
function d(o) {
|
|
2481
|
-
return o.secure =
|
|
2481
|
+
return o.secure = y(o), o.resourceName = (o.path || "/") + (o.query ? "?" + o.query : ""), o.path = void 0, o.query = void 0, o;
|
|
2482
2482
|
}
|
|
2483
2483
|
function f(o) {
|
|
2484
|
-
if ((o.port === (
|
|
2484
|
+
if ((o.port === (y(o) ? 443 : 80) || o.port === "") && (o.port = void 0), typeof o.secure == "boolean" && (o.scheme = o.secure ? "wss" : "ws", o.secure = void 0), o.resourceName) {
|
|
2485
2485
|
const [m, P] = o.resourceName.split("?");
|
|
2486
2486
|
o.path = m && m !== "/" ? m : void 0, o.query = P, o.resourceName = void 0;
|
|
2487
2487
|
}
|
|
@@ -2494,7 +2494,7 @@ function Ps() {
|
|
|
2494
2494
|
if (P) {
|
|
2495
2495
|
const O = m.scheme || o.scheme || "urn";
|
|
2496
2496
|
o.nid = P[1].toLowerCase(), o.nss = P[2];
|
|
2497
|
-
const T = `${O}:${m.nid || o.nid}`, z =
|
|
2497
|
+
const T = `${O}:${m.nid || o.nid}`, z = g(T);
|
|
2498
2498
|
o.path = void 0, z && (o = z.parse(o, m));
|
|
2499
2499
|
} else
|
|
2500
2500
|
o.error = o.error || "URN can not be parsed.";
|
|
@@ -2503,7 +2503,7 @@ function Ps() {
|
|
|
2503
2503
|
function $(o, m) {
|
|
2504
2504
|
if (o.nid === void 0)
|
|
2505
2505
|
throw new Error("URN without nid cannot be serialized");
|
|
2506
|
-
const P = m.scheme || o.scheme || "urn", O = o.nid.toLowerCase(), T = `${P}:${m.nid || O}`, z =
|
|
2506
|
+
const P = m.scheme || o.scheme || "urn", O = o.nid.toLowerCase(), T = `${P}:${m.nid || O}`, z = g(T);
|
|
2507
2507
|
z && (o = z.serialize(o, m));
|
|
2508
2508
|
const C = o, V = o.nss;
|
|
2509
2509
|
return C.path = `${O || m.nid}:${V}`, m.skipEscape = !0, C;
|
|
@@ -2576,7 +2576,7 @@ function Ps() {
|
|
|
2576
2576
|
}
|
|
2577
2577
|
);
|
|
2578
2578
|
Object.setPrototypeOf(c, null);
|
|
2579
|
-
function
|
|
2579
|
+
function g(o) {
|
|
2580
2580
|
return o && (c[
|
|
2581
2581
|
/** @type {SchemeName} */
|
|
2582
2582
|
o
|
|
@@ -2586,29 +2586,29 @@ function Ps() {
|
|
|
2586
2586
|
]) || void 0;
|
|
2587
2587
|
}
|
|
2588
2588
|
return Yt = {
|
|
2589
|
-
wsIsSecure:
|
|
2589
|
+
wsIsSecure: y,
|
|
2590
2590
|
SCHEMES: c,
|
|
2591
2591
|
isValidSchemeName: i,
|
|
2592
|
-
getSchemeHandler:
|
|
2592
|
+
getSchemeHandler: g
|
|
2593
2593
|
}, Yt;
|
|
2594
2594
|
}
|
|
2595
2595
|
var Cr;
|
|
2596
2596
|
function Ss() {
|
|
2597
2597
|
if (Cr) return De.exports;
|
|
2598
2598
|
Cr = 1;
|
|
2599
|
-
const { normalizeIPv6: e, removeDotSegments: t, recomposeAuthority: r, normalizeComponentEncoding: i, isIPv4:
|
|
2599
|
+
const { normalizeIPv6: e, removeDotSegments: t, recomposeAuthority: r, normalizeComponentEncoding: i, isIPv4: y, nonSimpleDomain: s } = Nn(), { SCHEMES: l, getSchemeHandler: d } = Ps();
|
|
2600
2600
|
function f(a, u) {
|
|
2601
2601
|
return typeof a == "string" ? a = /** @type {T} */
|
|
2602
2602
|
_(b(a, u), u) : typeof a == "object" && (a = /** @type {T} */
|
|
2603
2603
|
b(_(a, u), u)), a;
|
|
2604
2604
|
}
|
|
2605
2605
|
function w(a, u, n) {
|
|
2606
|
-
const c = n ? Object.assign({ scheme: "null" }, n) : { scheme: "null" },
|
|
2607
|
-
return c.skipEscape = !0, _(
|
|
2606
|
+
const c = n ? Object.assign({ scheme: "null" }, n) : { scheme: "null" }, g = $(b(a, c), b(u, c), c, !0);
|
|
2607
|
+
return c.skipEscape = !0, _(g, c);
|
|
2608
2608
|
}
|
|
2609
2609
|
function $(a, u, n, c) {
|
|
2610
|
-
const
|
|
2611
|
-
return c || (a = b(_(a, n), n), u = b(_(u, n), n)), n = n || {}, !n.tolerant && u.scheme ? (
|
|
2610
|
+
const g = {};
|
|
2611
|
+
return c || (a = b(_(a, n), n), u = b(_(u, n), n)), n = n || {}, !n.tolerant && u.scheme ? (g.scheme = u.scheme, g.userinfo = u.userinfo, g.host = u.host, g.port = u.port, g.path = t(u.path || ""), g.query = u.query) : (u.userinfo !== void 0 || u.host !== void 0 || u.port !== void 0 ? (g.userinfo = u.userinfo, g.host = u.host, g.port = u.port, g.path = t(u.path || ""), g.query = u.query) : (u.path ? (u.path[0] === "/" ? g.path = t(u.path) : ((a.userinfo !== void 0 || a.host !== void 0 || a.port !== void 0) && !a.path ? g.path = "/" + u.path : a.path ? g.path = a.path.slice(0, a.path.lastIndexOf("/") + 1) + u.path : g.path = u.path, g.path = t(g.path)), g.query = u.query) : (g.path = a.path, u.query !== void 0 ? g.query = u.query : g.query = a.query), g.userinfo = a.userinfo, g.host = a.host, g.port = a.port), g.scheme = a.scheme), g.fragment = u.fragment, g;
|
|
2612
2612
|
}
|
|
2613
2613
|
function E(a, u, n) {
|
|
2614
2614
|
return typeof a == "string" ? (a = unescape(a), a = _(i(b(a, n), !0), { ...n, skipEscape: !0 })) : typeof a == "object" && (a = _(i(a, !0), { ...n, skipEscape: !0 })), typeof u == "string" ? (u = unescape(u), u = _(i(b(u, n), !0), { ...n, skipEscape: !0 })) : typeof u == "object" && (u = _(i(u, !0), { ...n, skipEscape: !0 })), a.toLowerCase() === u.toLowerCase();
|
|
@@ -2629,14 +2629,14 @@ function Ss() {
|
|
|
2629
2629
|
resourceName: a.resourceName,
|
|
2630
2630
|
secure: a.secure,
|
|
2631
2631
|
error: ""
|
|
2632
|
-
}, c = Object.assign({}, u),
|
|
2633
|
-
o && o.serialize && o.serialize(n, c), n.path !== void 0 && (c.skipEscape ? n.path = unescape(n.path) : (n.path = escape(n.path), n.scheme !== void 0 && (n.path = n.path.split("%3A").join(":")))), c.reference !== "suffix" && n.scheme &&
|
|
2632
|
+
}, c = Object.assign({}, u), g = [], o = d(c.scheme || n.scheme);
|
|
2633
|
+
o && o.serialize && o.serialize(n, c), n.path !== void 0 && (c.skipEscape ? n.path = unescape(n.path) : (n.path = escape(n.path), n.scheme !== void 0 && (n.path = n.path.split("%3A").join(":")))), c.reference !== "suffix" && n.scheme && g.push(n.scheme, ":");
|
|
2634
2634
|
const m = r(n);
|
|
2635
|
-
if (m !== void 0 && (c.reference !== "suffix" &&
|
|
2635
|
+
if (m !== void 0 && (c.reference !== "suffix" && g.push("//"), g.push(m), n.path && n.path[0] !== "/" && g.push("/")), n.path !== void 0) {
|
|
2636
2636
|
let P = n.path;
|
|
2637
|
-
!c.absolutePath && (!o || !o.absolutePath) && (P = t(P)), m === void 0 && P[0] === "/" && P[1] === "/" && (P = "/%2F" + P.slice(2)),
|
|
2637
|
+
!c.absolutePath && (!o || !o.absolutePath) && (P = t(P)), m === void 0 && P[0] === "/" && P[1] === "/" && (P = "/%2F" + P.slice(2)), g.push(P);
|
|
2638
2638
|
}
|
|
2639
|
-
return n.query !== void 0 &&
|
|
2639
|
+
return n.query !== void 0 && g.push("?", n.query), n.fragment !== void 0 && g.push("#", n.fragment), g.join("");
|
|
2640
2640
|
}
|
|
2641
2641
|
const v = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
2642
2642
|
function b(a, u) {
|
|
@@ -2649,19 +2649,19 @@ function Ss() {
|
|
|
2649
2649
|
query: void 0,
|
|
2650
2650
|
fragment: void 0
|
|
2651
2651
|
};
|
|
2652
|
-
let
|
|
2652
|
+
let g = !1;
|
|
2653
2653
|
n.reference === "suffix" && (n.scheme ? a = n.scheme + ":" + a : a = "//" + a);
|
|
2654
2654
|
const o = a.match(v);
|
|
2655
2655
|
if (o) {
|
|
2656
2656
|
if (c.scheme = o[1], c.userinfo = o[3], c.host = o[4], c.port = parseInt(o[5], 10), c.path = o[6] || "", c.query = o[7], c.fragment = o[8], isNaN(c.port) && (c.port = o[5]), c.host)
|
|
2657
|
-
if (
|
|
2657
|
+
if (y(c.host) === !1) {
|
|
2658
2658
|
const O = e(c.host);
|
|
2659
|
-
c.host = O.host.toLowerCase(),
|
|
2659
|
+
c.host = O.host.toLowerCase(), g = O.isIPV6;
|
|
2660
2660
|
} else
|
|
2661
|
-
|
|
2661
|
+
g = !0;
|
|
2662
2662
|
c.scheme === void 0 && c.userinfo === void 0 && c.host === void 0 && c.port === void 0 && c.query === void 0 && !c.path ? c.reference = "same-document" : c.scheme === void 0 ? c.reference = "relative" : c.fragment === void 0 ? c.reference = "absolute" : c.reference = "uri", n.reference && n.reference !== "suffix" && n.reference !== c.reference && (c.error = c.error || "URI is not a " + n.reference + " reference.");
|
|
2663
2663
|
const m = d(n.scheme || c.scheme);
|
|
2664
|
-
if (!n.unicodeSupport && (!m || !m.unicodeSupport) && c.host && (n.domainHost || m && m.domainHost) &&
|
|
2664
|
+
if (!n.unicodeSupport && (!m || !m.unicodeSupport) && c.host && (n.domainHost || m && m.domainHost) && g === !1 && s(c.host))
|
|
2665
2665
|
try {
|
|
2666
2666
|
c.host = URL.domainToASCII(c.host.toLowerCase());
|
|
2667
2667
|
} catch (P) {
|
|
@@ -2712,7 +2712,7 @@ function ks() {
|
|
|
2712
2712
|
} }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
|
|
2713
2713
|
return r.CodeGen;
|
|
2714
2714
|
} });
|
|
2715
|
-
const i = er(),
|
|
2715
|
+
const i = er(), y = At(), s = Rn(), l = tr(), d = G(), f = Tt(), w = kt(), $ = Y(), E = ws, _ = Es(), v = (M, j) => new RegExp(M, j);
|
|
2716
2716
|
v.code = "new RegExp";
|
|
2717
2717
|
const b = ["removeAdditional", "useDefaults", "coerceTypes"], h = /* @__PURE__ */ new Set([
|
|
2718
2718
|
"validate",
|
|
@@ -2773,7 +2773,7 @@ function ks() {
|
|
|
2773
2773
|
uriResolver: us
|
|
2774
2774
|
};
|
|
2775
2775
|
}
|
|
2776
|
-
class
|
|
2776
|
+
class g {
|
|
2777
2777
|
constructor(j = {}) {
|
|
2778
2778
|
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), j = this.opts = { ...j, ...c(j) };
|
|
2779
2779
|
const { es5: D, lines: I } = this.opts.code;
|
|
@@ -2824,7 +2824,7 @@ function ks() {
|
|
|
2824
2824
|
try {
|
|
2825
2825
|
return this._compileSchemaEnv(B);
|
|
2826
2826
|
} catch (k) {
|
|
2827
|
-
if (!(k instanceof
|
|
2827
|
+
if (!(k instanceof y.default))
|
|
2828
2828
|
throw k;
|
|
2829
2829
|
return U.call(this, k), await J.call(this, k.missingSchema), N.call(this, B);
|
|
2830
2830
|
}
|
|
@@ -3032,7 +3032,7 @@ function ks() {
|
|
|
3032
3032
|
}
|
|
3033
3033
|
}
|
|
3034
3034
|
}
|
|
3035
|
-
|
|
3035
|
+
g.ValidationError = i.default, g.MissingRefError = y.default, e.default = g;
|
|
3036
3036
|
function o(M, j, D, I = "error") {
|
|
3037
3037
|
for (const p in M) {
|
|
3038
3038
|
const S = p;
|
|
@@ -3149,20 +3149,20 @@ var be = {}, Mr;
|
|
|
3149
3149
|
function Rs() {
|
|
3150
3150
|
if (Mr) return be;
|
|
3151
3151
|
Mr = 1, Object.defineProperty(be, "__esModule", { value: !0 }), be.callRef = be.getValidate = void 0;
|
|
3152
|
-
const e = At(), t = ge(), r = G(), i = Se(),
|
|
3152
|
+
const e = At(), t = ge(), r = G(), i = Se(), y = tr(), s = Y(), l = {
|
|
3153
3153
|
keyword: "$ref",
|
|
3154
3154
|
schemaType: "string",
|
|
3155
3155
|
code(w) {
|
|
3156
3156
|
const { gen: $, schema: E, it: _ } = w, { baseId: v, schemaEnv: b, validateName: h, opts: a, self: u } = _, { root: n } = b;
|
|
3157
3157
|
if ((E === "#" || E === "#/") && v === n.baseId)
|
|
3158
|
-
return
|
|
3159
|
-
const c =
|
|
3158
|
+
return g();
|
|
3159
|
+
const c = y.resolveRef.call(u, n, v, E);
|
|
3160
3160
|
if (c === void 0)
|
|
3161
3161
|
throw new e.default(_.opts.uriResolver, v, E);
|
|
3162
|
-
if (c instanceof
|
|
3162
|
+
if (c instanceof y.SchemaEnv)
|
|
3163
3163
|
return o(c);
|
|
3164
3164
|
return m(c);
|
|
3165
|
-
function
|
|
3165
|
+
function g() {
|
|
3166
3166
|
if (b === n)
|
|
3167
3167
|
return f(w, h, b, b.$async);
|
|
3168
3168
|
const P = $.scopeValue("root", { ref: n });
|
|
@@ -3191,7 +3191,7 @@ function Rs() {
|
|
|
3191
3191
|
be.getValidate = d;
|
|
3192
3192
|
function f(w, $, E, _) {
|
|
3193
3193
|
const { gen: v, it: b } = w, { allErrors: h, schemaEnv: a, opts: u } = b, n = u.passContext ? i.default.this : r.nil;
|
|
3194
|
-
_ ? c() :
|
|
3194
|
+
_ ? c() : g();
|
|
3195
3195
|
function c() {
|
|
3196
3196
|
if (!a.$async)
|
|
3197
3197
|
throw new Error("async schema referenced by sync schema");
|
|
@@ -3202,7 +3202,7 @@ function Rs() {
|
|
|
3202
3202
|
v.if((0, r._)`!(${O} instanceof ${b.ValidationError})`, () => v.throw(O)), o(O), h || v.assign(P, !1);
|
|
3203
3203
|
}), w.ok(P);
|
|
3204
3204
|
}
|
|
3205
|
-
function
|
|
3205
|
+
function g() {
|
|
3206
3206
|
w.result((0, t.callValidateCode)(w, $, n), () => m($), () => o($));
|
|
3207
3207
|
}
|
|
3208
3208
|
function o(P) {
|
|
@@ -3260,7 +3260,7 @@ function Os() {
|
|
|
3260
3260
|
}, i = {
|
|
3261
3261
|
message: ({ keyword: s, schemaCode: l }) => (0, e.str)`must be ${r[s].okStr} ${l}`,
|
|
3262
3262
|
params: ({ keyword: s, schemaCode: l }) => (0, e._)`{comparison: ${r[s].okStr}, limit: ${l}}`
|
|
3263
|
-
},
|
|
3263
|
+
}, y = {
|
|
3264
3264
|
keyword: Object.keys(r),
|
|
3265
3265
|
type: "number",
|
|
3266
3266
|
schemaType: "number",
|
|
@@ -3271,7 +3271,7 @@ function Os() {
|
|
|
3271
3271
|
s.fail$data((0, e._)`${d} ${r[l].fail} ${f} || isNaN(${d})`);
|
|
3272
3272
|
}
|
|
3273
3273
|
};
|
|
3274
|
-
return Be.default =
|
|
3274
|
+
return Be.default = y, Be;
|
|
3275
3275
|
}
|
|
3276
3276
|
var Ye = {}, zr;
|
|
3277
3277
|
function Ns() {
|
|
@@ -3287,7 +3287,7 @@ function Ns() {
|
|
|
3287
3287
|
params: ({ schemaCode: i }) => (0, e._)`{multipleOf: ${i}}`
|
|
3288
3288
|
},
|
|
3289
3289
|
code(i) {
|
|
3290
|
-
const { gen:
|
|
3290
|
+
const { gen: y, data: s, schemaCode: l, it: d } = i, f = d.opts.multipleOfPrecision, w = y.let("res"), $ = f ? (0, e._)`Math.abs(Math.round(${w}) - ${w}) > 1e-${f}` : (0, e._)`${w} !== parseInt(${w})`;
|
|
3291
3291
|
i.fail$data((0, e._)`(${l} === 0 || (${w} = ${s}/${l}, ${$}))`);
|
|
3292
3292
|
}
|
|
3293
3293
|
};
|
|
@@ -3299,9 +3299,9 @@ function Cs() {
|
|
|
3299
3299
|
Fr = 1, Object.defineProperty(xe, "__esModule", { value: !0 });
|
|
3300
3300
|
function e(t) {
|
|
3301
3301
|
const r = t.length;
|
|
3302
|
-
let i = 0,
|
|
3303
|
-
for (;
|
|
3304
|
-
i++, s = t.charCodeAt(
|
|
3302
|
+
let i = 0, y = 0, s;
|
|
3303
|
+
for (; y < r; )
|
|
3304
|
+
i++, s = t.charCodeAt(y++), s >= 55296 && s <= 56319 && y < r && (s = t.charCodeAt(y), (s & 64512) === 56320 && y++);
|
|
3305
3305
|
return i;
|
|
3306
3306
|
}
|
|
3307
3307
|
return xe.default = e, e.code = 'require("ajv/dist/runtime/ucs2length").default', xe;
|
|
@@ -3310,7 +3310,7 @@ var Lr;
|
|
|
3310
3310
|
function qs() {
|
|
3311
3311
|
if (Lr) return Qe;
|
|
3312
3312
|
Lr = 1, Object.defineProperty(Qe, "__esModule", { value: !0 });
|
|
3313
|
-
const e = G(), t = Y(), r = Cs(),
|
|
3313
|
+
const e = G(), t = Y(), r = Cs(), y = {
|
|
3314
3314
|
keyword: ["maxLength", "minLength"],
|
|
3315
3315
|
type: "string",
|
|
3316
3316
|
schemaType: "number",
|
|
@@ -3327,7 +3327,7 @@ function qs() {
|
|
|
3327
3327
|
s.fail$data((0, e._)`${E} ${$} ${f}`);
|
|
3328
3328
|
}
|
|
3329
3329
|
};
|
|
3330
|
-
return Qe.default =
|
|
3330
|
+
return Qe.default = y, Qe;
|
|
3331
3331
|
}
|
|
3332
3332
|
var Ze = {}, Ur;
|
|
3333
3333
|
function Ds() {
|
|
@@ -3339,12 +3339,12 @@ function Ds() {
|
|
|
3339
3339
|
schemaType: "string",
|
|
3340
3340
|
$data: !0,
|
|
3341
3341
|
error: {
|
|
3342
|
-
message: ({ schemaCode:
|
|
3343
|
-
params: ({ schemaCode:
|
|
3342
|
+
message: ({ schemaCode: y }) => (0, t.str)`must match pattern "${y}"`,
|
|
3343
|
+
params: ({ schemaCode: y }) => (0, t._)`{pattern: ${y}}`
|
|
3344
3344
|
},
|
|
3345
|
-
code(
|
|
3346
|
-
const { data: s, $data: l, schema: d, schemaCode: f, it: w } =
|
|
3347
|
-
|
|
3345
|
+
code(y) {
|
|
3346
|
+
const { data: s, $data: l, schema: d, schemaCode: f, it: w } = y, $ = w.opts.unicodeRegExp ? "u" : "", E = l ? (0, t._)`(new RegExp(${f}, ${$}))` : (0, e.usePattern)(y, d);
|
|
3347
|
+
y.fail$data((0, t._)`!${E}.test(${s})`);
|
|
3348
3348
|
}
|
|
3349
3349
|
};
|
|
3350
3350
|
return Ze.default = i, Ze;
|
|
@@ -3359,14 +3359,14 @@ function Ts() {
|
|
|
3359
3359
|
schemaType: "number",
|
|
3360
3360
|
$data: !0,
|
|
3361
3361
|
error: {
|
|
3362
|
-
message({ keyword: i, schemaCode:
|
|
3362
|
+
message({ keyword: i, schemaCode: y }) {
|
|
3363
3363
|
const s = i === "maxProperties" ? "more" : "fewer";
|
|
3364
|
-
return (0, e.str)`must NOT have ${s} than ${
|
|
3364
|
+
return (0, e.str)`must NOT have ${s} than ${y} properties`;
|
|
3365
3365
|
},
|
|
3366
3366
|
params: ({ schemaCode: i }) => (0, e._)`{limit: ${i}}`
|
|
3367
3367
|
},
|
|
3368
3368
|
code(i) {
|
|
3369
|
-
const { keyword:
|
|
3369
|
+
const { keyword: y, data: s, schemaCode: l } = i, d = y === "maxProperties" ? e.operators.GT : e.operators.LT;
|
|
3370
3370
|
i.fail$data((0, e._)`Object.keys(${s}).length ${d} ${l}`);
|
|
3371
3371
|
}
|
|
3372
3372
|
};
|
|
@@ -3376,7 +3376,7 @@ var et = {}, Jr;
|
|
|
3376
3376
|
function Ms() {
|
|
3377
3377
|
if (Jr) return et;
|
|
3378
3378
|
Jr = 1, Object.defineProperty(et, "__esModule", { value: !0 });
|
|
3379
|
-
const e = ge(), t = G(), r = Y(),
|
|
3379
|
+
const e = ge(), t = G(), r = Y(), y = {
|
|
3380
3380
|
keyword: "required",
|
|
3381
3381
|
type: "object",
|
|
3382
3382
|
schemaType: "array",
|
|
@@ -3392,9 +3392,9 @@ function Ms() {
|
|
|
3392
3392
|
const v = d.length >= _.loopRequired;
|
|
3393
3393
|
if (E.allErrors ? b() : h(), _.strictRequired) {
|
|
3394
3394
|
const n = s.parentSchema.properties, { definedProperties: c } = s.it;
|
|
3395
|
-
for (const
|
|
3396
|
-
if (n?.[
|
|
3397
|
-
const o = E.schemaEnv.baseId + E.errSchemaPath, m = `required property "${
|
|
3395
|
+
for (const g of d)
|
|
3396
|
+
if (n?.[g] === void 0 && !c.has(g)) {
|
|
3397
|
+
const o = E.schemaEnv.baseId + E.errSchemaPath, m = `required property "${g}" is not defined at "${o}" (strictRequired)`;
|
|
3398
3398
|
(0, r.checkStrictMode)(E, m, E.opts.strictRequired);
|
|
3399
3399
|
}
|
|
3400
3400
|
}
|
|
@@ -3427,7 +3427,7 @@ function Ms() {
|
|
|
3427
3427
|
}
|
|
3428
3428
|
}
|
|
3429
3429
|
};
|
|
3430
|
-
return et.default =
|
|
3430
|
+
return et.default = y, et;
|
|
3431
3431
|
}
|
|
3432
3432
|
var tt = {}, Hr;
|
|
3433
3433
|
function As() {
|
|
@@ -3439,14 +3439,14 @@ function As() {
|
|
|
3439
3439
|
schemaType: "number",
|
|
3440
3440
|
$data: !0,
|
|
3441
3441
|
error: {
|
|
3442
|
-
message({ keyword: i, schemaCode:
|
|
3442
|
+
message({ keyword: i, schemaCode: y }) {
|
|
3443
3443
|
const s = i === "maxItems" ? "more" : "fewer";
|
|
3444
|
-
return (0, e.str)`must NOT have ${s} than ${
|
|
3444
|
+
return (0, e.str)`must NOT have ${s} than ${y} items`;
|
|
3445
3445
|
},
|
|
3446
3446
|
params: ({ schemaCode: i }) => (0, e._)`{limit: ${i}}`
|
|
3447
3447
|
},
|
|
3448
3448
|
code(i) {
|
|
3449
|
-
const { keyword:
|
|
3449
|
+
const { keyword: y, data: s, schemaCode: l } = i, d = y === "maxItems" ? e.operators.GT : e.operators.LT;
|
|
3450
3450
|
i.fail$data((0, e._)`${s}.length ${d} ${l}`);
|
|
3451
3451
|
}
|
|
3452
3452
|
};
|
|
@@ -3479,23 +3479,23 @@ function Vs() {
|
|
|
3479
3479
|
const b = d.let("valid"), h = E.items ? (0, e.getSchemaTypes)(E.items) : [];
|
|
3480
3480
|
l.block$data(b, a, (0, t._)`${_} === false`), l.ok(b);
|
|
3481
3481
|
function a() {
|
|
3482
|
-
const
|
|
3483
|
-
l.setParams({ i:
|
|
3482
|
+
const g = d.let("i", (0, t._)`${f}.length`), o = d.let("j");
|
|
3483
|
+
l.setParams({ i: g, j: o }), d.assign(b, !0), d.if((0, t._)`${g} > 1`, () => (u() ? n : c)(g, o));
|
|
3484
3484
|
}
|
|
3485
3485
|
function u() {
|
|
3486
|
-
return h.length > 0 && !h.some((
|
|
3486
|
+
return h.length > 0 && !h.some((g) => g === "object" || g === "array");
|
|
3487
3487
|
}
|
|
3488
|
-
function n(
|
|
3488
|
+
function n(g, o) {
|
|
3489
3489
|
const m = d.name("item"), P = (0, e.checkDataTypes)(h, m, v.opts.strictNumbers, e.DataType.Wrong), O = d.const("indices", (0, t._)`{}`);
|
|
3490
|
-
d.for((0, t._)`;${
|
|
3491
|
-
d.let(m, (0, t._)`${f}[${
|
|
3490
|
+
d.for((0, t._)`;${g}--;`, () => {
|
|
3491
|
+
d.let(m, (0, t._)`${f}[${g}]`), d.if(P, (0, t._)`continue`), h.length > 1 && d.if((0, t._)`typeof ${m} == "string"`, (0, t._)`${m} += "_"`), d.if((0, t._)`typeof ${O}[${m}] == "number"`, () => {
|
|
3492
3492
|
d.assign(o, (0, t._)`${O}[${m}]`), l.error(), d.assign(b, !1).break();
|
|
3493
|
-
}).code((0, t._)`${O}[${m}] = ${
|
|
3493
|
+
}).code((0, t._)`${O}[${m}] = ${g}`);
|
|
3494
3494
|
});
|
|
3495
3495
|
}
|
|
3496
|
-
function c(
|
|
3496
|
+
function c(g, o) {
|
|
3497
3497
|
const m = (0, r.useFunc)(d, i.default), P = d.name("outer");
|
|
3498
|
-
d.label(P).for((0, t._)`;${
|
|
3498
|
+
d.label(P).for((0, t._)`;${g}--;`, () => d.for((0, t._)`${o} = ${g}; ${o}--;`, () => d.if((0, t._)`${m}(${f}[${g}], ${f}[${o}])`, () => {
|
|
3499
3499
|
l.error(), d.assign(b, !1).break(P);
|
|
3500
3500
|
})));
|
|
3501
3501
|
}
|
|
@@ -3507,7 +3507,7 @@ var st = {}, Br;
|
|
|
3507
3507
|
function zs() {
|
|
3508
3508
|
if (Br) return st;
|
|
3509
3509
|
Br = 1, Object.defineProperty(st, "__esModule", { value: !0 });
|
|
3510
|
-
const e = G(), t = Y(), r = rr(),
|
|
3510
|
+
const e = G(), t = Y(), r = rr(), y = {
|
|
3511
3511
|
keyword: "const",
|
|
3512
3512
|
$data: !0,
|
|
3513
3513
|
error: {
|
|
@@ -3519,13 +3519,13 @@ function zs() {
|
|
|
3519
3519
|
f || $ && typeof $ == "object" ? s.fail$data((0, e._)`!${(0, t.useFunc)(l, r.default)}(${d}, ${w})`) : s.fail((0, e._)`${$} !== ${d}`);
|
|
3520
3520
|
}
|
|
3521
3521
|
};
|
|
3522
|
-
return st.default =
|
|
3522
|
+
return st.default = y, st;
|
|
3523
3523
|
}
|
|
3524
3524
|
var it = {}, Yr;
|
|
3525
3525
|
function Fs() {
|
|
3526
3526
|
if (Yr) return it;
|
|
3527
3527
|
Yr = 1, Object.defineProperty(it, "__esModule", { value: !0 });
|
|
3528
|
-
const e = G(), t = Y(), r = rr(),
|
|
3528
|
+
const e = G(), t = Y(), r = rr(), y = {
|
|
3529
3529
|
keyword: "enum",
|
|
3530
3530
|
schemaType: "array",
|
|
3531
3531
|
$data: !0,
|
|
@@ -3547,25 +3547,25 @@ function Fs() {
|
|
|
3547
3547
|
if (!Array.isArray(w))
|
|
3548
3548
|
throw new Error("ajv implementation error");
|
|
3549
3549
|
const n = l.const("vSchema", $);
|
|
3550
|
-
h = (0, e.or)(...w.map((c,
|
|
3550
|
+
h = (0, e.or)(...w.map((c, g) => u(n, g)));
|
|
3551
3551
|
}
|
|
3552
3552
|
s.pass(h);
|
|
3553
3553
|
function a() {
|
|
3554
3554
|
l.assign(h, !1), l.forOf("v", $, (n) => l.if((0, e._)`${b()}(${d}, ${n})`, () => l.assign(h, !0).break()));
|
|
3555
3555
|
}
|
|
3556
3556
|
function u(n, c) {
|
|
3557
|
-
const
|
|
3558
|
-
return typeof
|
|
3557
|
+
const g = w[c];
|
|
3558
|
+
return typeof g == "object" && g !== null ? (0, e._)`${b()}(${d}, ${n}[${c}])` : (0, e._)`${d} === ${g}`;
|
|
3559
3559
|
}
|
|
3560
3560
|
}
|
|
3561
3561
|
};
|
|
3562
|
-
return it.default =
|
|
3562
|
+
return it.default = y, it;
|
|
3563
3563
|
}
|
|
3564
3564
|
var Qr;
|
|
3565
3565
|
function Ls() {
|
|
3566
3566
|
if (Qr) return We;
|
|
3567
3567
|
Qr = 1, Object.defineProperty(We, "__esModule", { value: !0 });
|
|
3568
|
-
const e = Os(), t = Ns(), r = qs(), i = Ds(),
|
|
3568
|
+
const e = Os(), t = Ns(), r = qs(), i = Ds(), y = Ts(), s = Ms(), l = As(), d = Vs(), f = zs(), w = Fs(), $ = [
|
|
3569
3569
|
// number
|
|
3570
3570
|
e.default,
|
|
3571
3571
|
t.default,
|
|
@@ -3573,7 +3573,7 @@ function Ls() {
|
|
|
3573
3573
|
r.default,
|
|
3574
3574
|
i.default,
|
|
3575
3575
|
// object
|
|
3576
|
-
|
|
3576
|
+
y.default,
|
|
3577
3577
|
s.default,
|
|
3578
3578
|
// array
|
|
3579
3579
|
l.default,
|
|
@@ -3605,10 +3605,10 @@ function Cn() {
|
|
|
3605
3605
|
(0, t.checkStrictMode)(d, '"additionalItems" is ignored when "items" is not an array of schemas');
|
|
3606
3606
|
return;
|
|
3607
3607
|
}
|
|
3608
|
-
|
|
3608
|
+
y(s, f);
|
|
3609
3609
|
}
|
|
3610
3610
|
};
|
|
3611
|
-
function
|
|
3611
|
+
function y(s, l) {
|
|
3612
3612
|
const { gen: d, schema: f, data: w, keyword: $, it: E } = s;
|
|
3613
3613
|
E.items = !0;
|
|
3614
3614
|
const _ = d.const("len", (0, e._)`${w}.length`);
|
|
@@ -3624,7 +3624,7 @@ function Cn() {
|
|
|
3624
3624
|
});
|
|
3625
3625
|
}
|
|
3626
3626
|
}
|
|
3627
|
-
return Ie.validateAdditionalItems =
|
|
3627
|
+
return Ie.validateAdditionalItems = y, Ie.default = i, Ie;
|
|
3628
3628
|
}
|
|
3629
3629
|
var at = {}, Oe = {}, Zr;
|
|
3630
3630
|
function qn() {
|
|
@@ -3638,11 +3638,11 @@ function qn() {
|
|
|
3638
3638
|
code(s) {
|
|
3639
3639
|
const { schema: l, it: d } = s;
|
|
3640
3640
|
if (Array.isArray(l))
|
|
3641
|
-
return
|
|
3641
|
+
return y(s, "additionalItems", l);
|
|
3642
3642
|
d.items = !0, !(0, t.alwaysValidSchema)(d, l) && s.ok((0, r.validateArray)(s));
|
|
3643
3643
|
}
|
|
3644
3644
|
};
|
|
3645
|
-
function
|
|
3645
|
+
function y(s, l, d = s.schema) {
|
|
3646
3646
|
const { gen: f, parentSchema: w, data: $, keyword: E, it: _ } = s;
|
|
3647
3647
|
h(w), _.opts.unevaluated && d.length && _.items !== !0 && (_.items = t.mergeEvaluated.items(f, d.length, _.items));
|
|
3648
3648
|
const v = f.name("valid"), b = f.const("len", (0, e._)`${$}.length`);
|
|
@@ -3654,14 +3654,14 @@ function qn() {
|
|
|
3654
3654
|
}, v)), s.ok(v));
|
|
3655
3655
|
});
|
|
3656
3656
|
function h(a) {
|
|
3657
|
-
const { opts: u, errSchemaPath: n } = _, c = d.length,
|
|
3658
|
-
if (u.strictTuples && !
|
|
3657
|
+
const { opts: u, errSchemaPath: n } = _, c = d.length, g = c === a.minItems && (c === a.maxItems || a[l] === !1);
|
|
3658
|
+
if (u.strictTuples && !g) {
|
|
3659
3659
|
const o = `"${E}" is ${c}-tuple, but minItems or maxItems/${l} are not specified or different at path "${n}"`;
|
|
3660
3660
|
(0, t.checkStrictMode)(_, o, u.strictTuples);
|
|
3661
3661
|
}
|
|
3662
3662
|
}
|
|
3663
3663
|
}
|
|
3664
|
-
return Oe.validateTuple =
|
|
3664
|
+
return Oe.validateTuple = y, Oe.default = i, Oe;
|
|
3665
3665
|
}
|
|
3666
3666
|
var Xr;
|
|
3667
3667
|
function Us() {
|
|
@@ -3707,43 +3707,43 @@ function Js() {
|
|
|
3707
3707
|
before: "uniqueItems",
|
|
3708
3708
|
trackErrors: !0,
|
|
3709
3709
|
error: {
|
|
3710
|
-
message: ({ params: { min:
|
|
3711
|
-
params: ({ params: { min:
|
|
3710
|
+
message: ({ params: { min: y, max: s } }) => s === void 0 ? (0, e.str)`must contain at least ${y} valid item(s)` : (0, e.str)`must contain at least ${y} and no more than ${s} valid item(s)`,
|
|
3711
|
+
params: ({ params: { min: y, max: s } }) => s === void 0 ? (0, e._)`{minContains: ${y}}` : (0, e._)`{minContains: ${y}, maxContains: ${s}}`
|
|
3712
3712
|
},
|
|
3713
|
-
code(
|
|
3714
|
-
const { gen: s, schema: l, parentSchema: d, data: f, it: w } =
|
|
3713
|
+
code(y) {
|
|
3714
|
+
const { gen: s, schema: l, parentSchema: d, data: f, it: w } = y;
|
|
3715
3715
|
let $, E;
|
|
3716
3716
|
const { minContains: _, maxContains: v } = d;
|
|
3717
3717
|
w.opts.next ? ($ = _ === void 0 ? 1 : _, E = v) : $ = 1;
|
|
3718
3718
|
const b = s.const("len", (0, e._)`${f}.length`);
|
|
3719
|
-
if (
|
|
3719
|
+
if (y.setParams({ min: $, max: E }), E === void 0 && $ === 0) {
|
|
3720
3720
|
(0, t.checkStrictMode)(w, '"minContains" == 0 without "maxContains": "contains" keyword ignored');
|
|
3721
3721
|
return;
|
|
3722
3722
|
}
|
|
3723
3723
|
if (E !== void 0 && $ > E) {
|
|
3724
|
-
(0, t.checkStrictMode)(w, '"minContains" > "maxContains" is always invalid'),
|
|
3724
|
+
(0, t.checkStrictMode)(w, '"minContains" > "maxContains" is always invalid'), y.fail();
|
|
3725
3725
|
return;
|
|
3726
3726
|
}
|
|
3727
3727
|
if ((0, t.alwaysValidSchema)(w, l)) {
|
|
3728
3728
|
let c = (0, e._)`${b} >= ${$}`;
|
|
3729
|
-
E !== void 0 && (c = (0, e._)`${c} && ${b} <= ${E}`),
|
|
3729
|
+
E !== void 0 && (c = (0, e._)`${c} && ${b} <= ${E}`), y.pass(c);
|
|
3730
3730
|
return;
|
|
3731
3731
|
}
|
|
3732
3732
|
w.items = !0;
|
|
3733
3733
|
const h = s.name("valid");
|
|
3734
|
-
E === void 0 && $ === 1 ? u(h, () => s.if(h, () => s.break())) : $ === 0 ? (s.let(h, !0), E !== void 0 && s.if((0, e._)`${f}.length > 0`, a)) : (s.let(h, !1), a()),
|
|
3734
|
+
E === void 0 && $ === 1 ? u(h, () => s.if(h, () => s.break())) : $ === 0 ? (s.let(h, !0), E !== void 0 && s.if((0, e._)`${f}.length > 0`, a)) : (s.let(h, !1), a()), y.result(h, () => y.reset());
|
|
3735
3735
|
function a() {
|
|
3736
|
-
const c = s.name("_valid"),
|
|
3737
|
-
u(c, () => s.if(c, () => n(
|
|
3736
|
+
const c = s.name("_valid"), g = s.let("count", 0);
|
|
3737
|
+
u(c, () => s.if(c, () => n(g)));
|
|
3738
3738
|
}
|
|
3739
|
-
function u(c,
|
|
3739
|
+
function u(c, g) {
|
|
3740
3740
|
s.forRange("i", 0, b, (o) => {
|
|
3741
|
-
|
|
3741
|
+
y.subschema({
|
|
3742
3742
|
keyword: "contains",
|
|
3743
3743
|
dataProp: o,
|
|
3744
3744
|
dataPropType: t.Type.Num,
|
|
3745
3745
|
compositeRule: !0
|
|
3746
|
-
}, c),
|
|
3746
|
+
}, c), g();
|
|
3747
3747
|
});
|
|
3748
3748
|
}
|
|
3749
3749
|
function n(c) {
|
|
@@ -3769,7 +3769,7 @@ function Hs() {
|
|
|
3769
3769
|
deps: ${$}}`
|
|
3770
3770
|
// TODO change to reference
|
|
3771
3771
|
};
|
|
3772
|
-
const
|
|
3772
|
+
const y = {
|
|
3773
3773
|
keyword: "dependencies",
|
|
3774
3774
|
type: "object",
|
|
3775
3775
|
schemaType: "object",
|
|
@@ -3823,7 +3823,7 @@ function Hs() {
|
|
|
3823
3823
|
// TODO var
|
|
3824
3824
|
), f.ok(b));
|
|
3825
3825
|
}
|
|
3826
|
-
e.validateSchemaDeps = d, e.default =
|
|
3826
|
+
e.validateSchemaDeps = d, e.default = y;
|
|
3827
3827
|
})(Qt)), Qt;
|
|
3828
3828
|
}
|
|
3829
3829
|
var ut = {}, nn;
|
|
@@ -3836,24 +3836,24 @@ function Gs() {
|
|
|
3836
3836
|
schemaType: ["object", "boolean"],
|
|
3837
3837
|
error: {
|
|
3838
3838
|
message: "property name must be valid",
|
|
3839
|
-
params: ({ params:
|
|
3839
|
+
params: ({ params: y }) => (0, e._)`{propertyName: ${y.propertyName}}`
|
|
3840
3840
|
},
|
|
3841
|
-
code(
|
|
3842
|
-
const { gen: s, schema: l, data: d, it: f } =
|
|
3841
|
+
code(y) {
|
|
3842
|
+
const { gen: s, schema: l, data: d, it: f } = y;
|
|
3843
3843
|
if ((0, t.alwaysValidSchema)(f, l))
|
|
3844
3844
|
return;
|
|
3845
3845
|
const w = s.name("valid");
|
|
3846
3846
|
s.forIn("key", d, ($) => {
|
|
3847
|
-
|
|
3847
|
+
y.setParams({ propertyName: $ }), y.subschema({
|
|
3848
3848
|
keyword: "propertyNames",
|
|
3849
3849
|
data: $,
|
|
3850
3850
|
dataTypes: ["string"],
|
|
3851
3851
|
propertyName: $,
|
|
3852
3852
|
compositeRule: !0
|
|
3853
3853
|
}, w), s.if((0, e.not)(w), () => {
|
|
3854
|
-
|
|
3854
|
+
y.error(!0), f.allErrors || s.break();
|
|
3855
3855
|
});
|
|
3856
|
-
}),
|
|
3856
|
+
}), y.ok(w);
|
|
3857
3857
|
}
|
|
3858
3858
|
};
|
|
3859
3859
|
return ut.default = i, ut;
|
|
@@ -3883,7 +3883,7 @@ function Dn() {
|
|
|
3883
3883
|
u(), l.ok((0, t._)`${E} === ${r.default.errors}`);
|
|
3884
3884
|
function u() {
|
|
3885
3885
|
d.forIn("key", $, (m) => {
|
|
3886
|
-
!h.length && !a.length ?
|
|
3886
|
+
!h.length && !a.length ? g(m) : d.if(n(m), () => g(m));
|
|
3887
3887
|
});
|
|
3888
3888
|
}
|
|
3889
3889
|
function n(m) {
|
|
@@ -3897,7 +3897,7 @@ function Dn() {
|
|
|
3897
3897
|
function c(m) {
|
|
3898
3898
|
d.code((0, t._)`delete ${$}[${m}]`);
|
|
3899
3899
|
}
|
|
3900
|
-
function
|
|
3900
|
+
function g(m) {
|
|
3901
3901
|
if (b.removeAdditional === "all" || b.removeAdditional && f === !1) {
|
|
3902
3902
|
c(m);
|
|
3903
3903
|
return;
|
|
@@ -3933,7 +3933,7 @@ var ft = {}, on;
|
|
|
3933
3933
|
function Ws() {
|
|
3934
3934
|
if (on) return ft;
|
|
3935
3935
|
on = 1, Object.defineProperty(ft, "__esModule", { value: !0 });
|
|
3936
|
-
const e = Mt(), t = ge(), r = Y(), i = Dn(),
|
|
3936
|
+
const e = Mt(), t = ge(), r = Y(), i = Dn(), y = {
|
|
3937
3937
|
keyword: "properties",
|
|
3938
3938
|
type: "object",
|
|
3939
3939
|
schemaType: "object",
|
|
@@ -3962,18 +3962,18 @@ function Ws() {
|
|
|
3962
3962
|
}
|
|
3963
3963
|
}
|
|
3964
3964
|
};
|
|
3965
|
-
return ft.default =
|
|
3965
|
+
return ft.default = y, ft;
|
|
3966
3966
|
}
|
|
3967
3967
|
var pt = {}, an;
|
|
3968
3968
|
function Bs() {
|
|
3969
3969
|
if (an) return pt;
|
|
3970
3970
|
an = 1, Object.defineProperty(pt, "__esModule", { value: !0 });
|
|
3971
|
-
const e = ge(), t = G(), r = Y(), i = Y(),
|
|
3971
|
+
const e = ge(), t = G(), r = Y(), i = Y(), y = {
|
|
3972
3972
|
keyword: "patternProperties",
|
|
3973
3973
|
type: "object",
|
|
3974
3974
|
schemaType: "object",
|
|
3975
3975
|
code(s) {
|
|
3976
|
-
const { gen: l, schema: d, data: f, parentSchema: w, it: $ } = s, { opts: E } = $, _ = (0, e.allSchemaProperties)(d), v = _.filter((
|
|
3976
|
+
const { gen: l, schema: d, data: f, parentSchema: w, it: $ } = s, { opts: E } = $, _ = (0, e.allSchemaProperties)(d), v = _.filter((g) => (0, r.alwaysValidSchema)($, d[g]));
|
|
3977
3977
|
if (_.length === 0 || v.length === _.length && (!$.opts.unevaluated || $.props === !0))
|
|
3978
3978
|
return;
|
|
3979
3979
|
const b = E.strictSchema && !E.allowMatchingProperties && w.properties, h = l.name("valid");
|
|
@@ -3981,20 +3981,20 @@ function Bs() {
|
|
|
3981
3981
|
const { props: a } = $;
|
|
3982
3982
|
u();
|
|
3983
3983
|
function u() {
|
|
3984
|
-
for (const
|
|
3985
|
-
b && n(
|
|
3984
|
+
for (const g of _)
|
|
3985
|
+
b && n(g), $.allErrors ? c(g) : (l.var(h, !0), c(g), l.if(h));
|
|
3986
3986
|
}
|
|
3987
|
-
function n(
|
|
3987
|
+
function n(g) {
|
|
3988
3988
|
for (const o in b)
|
|
3989
|
-
new RegExp(
|
|
3989
|
+
new RegExp(g).test(o) && (0, r.checkStrictMode)($, `property ${o} matches pattern ${g} (use allowMatchingProperties)`);
|
|
3990
3990
|
}
|
|
3991
|
-
function c(
|
|
3991
|
+
function c(g) {
|
|
3992
3992
|
l.forIn("key", f, (o) => {
|
|
3993
|
-
l.if((0, t._)`${(0, e.usePattern)(s,
|
|
3994
|
-
const m = v.includes(
|
|
3993
|
+
l.if((0, t._)`${(0, e.usePattern)(s, g)}.test(${o})`, () => {
|
|
3994
|
+
const m = v.includes(g);
|
|
3995
3995
|
m || s.subschema({
|
|
3996
3996
|
keyword: "patternProperties",
|
|
3997
|
-
schemaProp:
|
|
3997
|
+
schemaProp: g,
|
|
3998
3998
|
dataProp: o,
|
|
3999
3999
|
dataPropType: i.Type.Str
|
|
4000
4000
|
}, h), $.opts.unevaluated && a !== !0 ? l.assign((0, t._)`${a}[${o}]`, !0) : !m && !$.allErrors && l.if((0, t.not)(h), () => l.break());
|
|
@@ -4003,7 +4003,7 @@ function Bs() {
|
|
|
4003
4003
|
}
|
|
4004
4004
|
}
|
|
4005
4005
|
};
|
|
4006
|
-
return pt.default =
|
|
4006
|
+
return pt.default = y, pt;
|
|
4007
4007
|
}
|
|
4008
4008
|
var mt = {}, cn;
|
|
4009
4009
|
function Ys() {
|
|
@@ -4014,8 +4014,8 @@ function Ys() {
|
|
|
4014
4014
|
schemaType: ["object", "boolean"],
|
|
4015
4015
|
trackErrors: !0,
|
|
4016
4016
|
code(r) {
|
|
4017
|
-
const { gen: i, schema:
|
|
4018
|
-
if ((0, e.alwaysValidSchema)(s,
|
|
4017
|
+
const { gen: i, schema: y, it: s } = r;
|
|
4018
|
+
if ((0, e.alwaysValidSchema)(s, y)) {
|
|
4019
4019
|
r.fail();
|
|
4020
4020
|
return;
|
|
4021
4021
|
}
|
|
@@ -4054,25 +4054,25 @@ function xs() {
|
|
|
4054
4054
|
trackErrors: !0,
|
|
4055
4055
|
error: {
|
|
4056
4056
|
message: "must match exactly one schema in oneOf",
|
|
4057
|
-
params: ({ params:
|
|
4057
|
+
params: ({ params: y }) => (0, e._)`{passingSchemas: ${y.passing}}`
|
|
4058
4058
|
},
|
|
4059
|
-
code(
|
|
4060
|
-
const { gen: s, schema: l, parentSchema: d, it: f } =
|
|
4059
|
+
code(y) {
|
|
4060
|
+
const { gen: s, schema: l, parentSchema: d, it: f } = y;
|
|
4061
4061
|
if (!Array.isArray(l))
|
|
4062
4062
|
throw new Error("ajv implementation error");
|
|
4063
4063
|
if (f.opts.discriminator && d.discriminator)
|
|
4064
4064
|
return;
|
|
4065
4065
|
const w = l, $ = s.let("valid", !1), E = s.let("passing", null), _ = s.name("_valid");
|
|
4066
|
-
|
|
4066
|
+
y.setParams({ passing: E }), s.block(v), y.result($, () => y.reset(), () => y.error(!0));
|
|
4067
4067
|
function v() {
|
|
4068
4068
|
w.forEach((b, h) => {
|
|
4069
4069
|
let a;
|
|
4070
|
-
(0, t.alwaysValidSchema)(f, b) ? s.var(_, !0) : a =
|
|
4070
|
+
(0, t.alwaysValidSchema)(f, b) ? s.var(_, !0) : a = y.subschema({
|
|
4071
4071
|
keyword: "oneOf",
|
|
4072
4072
|
schemaProp: h,
|
|
4073
4073
|
compositeRule: !0
|
|
4074
4074
|
}, _), h > 0 && s.if((0, e._)`${_} && ${$}`).assign($, !1).assign(E, (0, e._)`[${E}, ${h}]`).else(), s.if(_, () => {
|
|
4075
|
-
s.assign($, !0), s.assign(E, h), a &&
|
|
4075
|
+
s.assign($, !0), s.assign(E, h), a && y.mergeEvaluated(a, e.Name);
|
|
4076
4076
|
});
|
|
4077
4077
|
});
|
|
4078
4078
|
}
|
|
@@ -4088,11 +4088,11 @@ function Zs() {
|
|
|
4088
4088
|
keyword: "allOf",
|
|
4089
4089
|
schemaType: "array",
|
|
4090
4090
|
code(r) {
|
|
4091
|
-
const { gen: i, schema:
|
|
4092
|
-
if (!Array.isArray(
|
|
4091
|
+
const { gen: i, schema: y, it: s } = r;
|
|
4092
|
+
if (!Array.isArray(y))
|
|
4093
4093
|
throw new Error("ajv implementation error");
|
|
4094
4094
|
const l = i.name("valid");
|
|
4095
|
-
|
|
4095
|
+
y.forEach((d, f) => {
|
|
4096
4096
|
if ((0, e.alwaysValidSchema)(s, d))
|
|
4097
4097
|
return;
|
|
4098
4098
|
const w = r.subschema({ keyword: "allOf", schemaProp: f }, l);
|
|
@@ -4117,7 +4117,7 @@ function Xs() {
|
|
|
4117
4117
|
code(s) {
|
|
4118
4118
|
const { gen: l, parentSchema: d, it: f } = s;
|
|
4119
4119
|
d.then === void 0 && d.else === void 0 && (0, t.checkStrictMode)(f, '"if" without "then" and "else" is ignored');
|
|
4120
|
-
const w =
|
|
4120
|
+
const w = y(f, "then"), $ = y(f, "else");
|
|
4121
4121
|
if (!w && !$)
|
|
4122
4122
|
return;
|
|
4123
4123
|
const E = l.let("valid", !0), _ = l.name("_valid");
|
|
@@ -4143,7 +4143,7 @@ function Xs() {
|
|
|
4143
4143
|
}
|
|
4144
4144
|
}
|
|
4145
4145
|
};
|
|
4146
|
-
function
|
|
4146
|
+
function y(s, l) {
|
|
4147
4147
|
const d = s.schema[l];
|
|
4148
4148
|
return d !== void 0 && !(0, t.alwaysValidSchema)(s, d);
|
|
4149
4149
|
}
|
|
@@ -4156,8 +4156,8 @@ function ei() {
|
|
|
4156
4156
|
const e = Y(), t = {
|
|
4157
4157
|
keyword: ["then", "else"],
|
|
4158
4158
|
schemaType: ["object", "boolean"],
|
|
4159
|
-
code({ keyword: r, parentSchema: i, it:
|
|
4160
|
-
i.if === void 0 && (0, e.checkStrictMode)(
|
|
4159
|
+
code({ keyword: r, parentSchema: i, it: y }) {
|
|
4160
|
+
i.if === void 0 && (0, e.checkStrictMode)(y, `"${r}" without "if" is ignored`);
|
|
4161
4161
|
}
|
|
4162
4162
|
};
|
|
4163
4163
|
return _t.default = t, _t;
|
|
@@ -4166,7 +4166,7 @@ var mn;
|
|
|
4166
4166
|
function ti() {
|
|
4167
4167
|
if (mn) return ot;
|
|
4168
4168
|
mn = 1, Object.defineProperty(ot, "__esModule", { value: !0 });
|
|
4169
|
-
const e = Cn(), t = Us(), r = qn(), i = Ks(),
|
|
4169
|
+
const e = Cn(), t = Us(), r = qn(), i = Ks(), y = Js(), s = Hs(), l = Gs(), d = Dn(), f = Ws(), w = Bs(), $ = Ys(), E = Qs(), _ = xs(), v = Zs(), b = Xs(), h = ei();
|
|
4170
4170
|
function a(u = !1) {
|
|
4171
4171
|
const n = [
|
|
4172
4172
|
// any
|
|
@@ -4183,7 +4183,7 @@ function ti() {
|
|
|
4183
4183
|
f.default,
|
|
4184
4184
|
w.default
|
|
4185
4185
|
];
|
|
4186
|
-
return u ? n.push(t.default, i.default) : n.push(e.default, r.default), n.push(
|
|
4186
|
+
return u ? n.push(t.default, i.default) : n.push(e.default, r.default), n.push(y.default), n;
|
|
4187
4187
|
}
|
|
4188
4188
|
return ot.default = a, ot;
|
|
4189
4189
|
}
|
|
@@ -4200,7 +4200,7 @@ function ri() {
|
|
|
4200
4200
|
message: ({ schemaCode: i }) => (0, e.str)`must match format "${i}"`,
|
|
4201
4201
|
params: ({ schemaCode: i }) => (0, e._)`{format: ${i}}`
|
|
4202
4202
|
},
|
|
4203
|
-
code(i,
|
|
4203
|
+
code(i, y) {
|
|
4204
4204
|
const { gen: s, data: l, $data: d, schema: f, schemaCode: w, it: $ } = i, { opts: E, errSchemaPath: _, schemaEnv: v, self: b } = $;
|
|
4205
4205
|
if (!E.validateFormats)
|
|
4206
4206
|
return;
|
|
@@ -4209,14 +4209,14 @@ function ri() {
|
|
|
4209
4209
|
const u = s.scopeValue("formats", {
|
|
4210
4210
|
ref: b.formats,
|
|
4211
4211
|
code: E.code.formats
|
|
4212
|
-
}), n = s.const("fDef", (0, e._)`${u}[${w}]`), c = s.let("fType"),
|
|
4213
|
-
s.if((0, e._)`typeof ${n} == "object" && !(${n} instanceof RegExp)`, () => s.assign(c, (0, e._)`${n}.type || "string"`).assign(
|
|
4212
|
+
}), n = s.const("fDef", (0, e._)`${u}[${w}]`), c = s.let("fType"), g = s.let("format");
|
|
4213
|
+
s.if((0, e._)`typeof ${n} == "object" && !(${n} instanceof RegExp)`, () => s.assign(c, (0, e._)`${n}.type || "string"`).assign(g, (0, e._)`${n}.validate`), () => s.assign(c, (0, e._)`"string"`).assign(g, n)), i.fail$data((0, e.or)(o(), m()));
|
|
4214
4214
|
function o() {
|
|
4215
|
-
return E.strictSchema === !1 ? e.nil : (0, e._)`${w} && !${
|
|
4215
|
+
return E.strictSchema === !1 ? e.nil : (0, e._)`${w} && !${g}`;
|
|
4216
4216
|
}
|
|
4217
4217
|
function m() {
|
|
4218
|
-
const P = v.$async ? (0, e._)`(${n}.async ? await ${
|
|
4219
|
-
return (0, e._)`${
|
|
4218
|
+
const P = v.$async ? (0, e._)`(${n}.async ? await ${g}(${l}) : ${g}(${l}))` : (0, e._)`${g}(${l})`, O = (0, e._)`(typeof ${g} == "function" ? ${P} : ${g}.test(${l}))`;
|
|
4219
|
+
return (0, e._)`${g} && ${g} !== true && ${c} === ${y} && !${O}`;
|
|
4220
4220
|
}
|
|
4221
4221
|
}
|
|
4222
4222
|
function a() {
|
|
@@ -4227,8 +4227,8 @@ function ri() {
|
|
|
4227
4227
|
}
|
|
4228
4228
|
if (u === !0)
|
|
4229
4229
|
return;
|
|
4230
|
-
const [n, c,
|
|
4231
|
-
n ===
|
|
4230
|
+
const [n, c, g] = m(u);
|
|
4231
|
+
n === y && i.pass(P());
|
|
4232
4232
|
function o() {
|
|
4233
4233
|
if (E.strictSchema === !1) {
|
|
4234
4234
|
b.logger.warn(O());
|
|
@@ -4247,9 +4247,9 @@ function ri() {
|
|
|
4247
4247
|
if (typeof u == "object" && !(u instanceof RegExp) && u.async) {
|
|
4248
4248
|
if (!v.$async)
|
|
4249
4249
|
throw new Error("async format in sync schema");
|
|
4250
|
-
return (0, e._)`await ${
|
|
4250
|
+
return (0, e._)`await ${g}(${l})`;
|
|
4251
4251
|
}
|
|
4252
|
-
return typeof c == "function" ? (0, e._)`${
|
|
4252
|
+
return typeof c == "function" ? (0, e._)`${g}(${l})` : (0, e._)`${g}.test(${l})`;
|
|
4253
4253
|
}
|
|
4254
4254
|
}
|
|
4255
4255
|
}
|
|
@@ -4283,13 +4283,13 @@ var vn;
|
|
|
4283
4283
|
function ii() {
|
|
4284
4284
|
if (vn) return Je;
|
|
4285
4285
|
vn = 1, Object.defineProperty(Je, "__esModule", { value: !0 });
|
|
4286
|
-
const e = Is(), t = Ls(), r = ti(), i = ni(),
|
|
4286
|
+
const e = Is(), t = Ls(), r = ti(), i = ni(), y = si(), s = [
|
|
4287
4287
|
e.default,
|
|
4288
4288
|
t.default,
|
|
4289
4289
|
(0, r.default)(),
|
|
4290
4290
|
i.default,
|
|
4291
|
-
|
|
4292
|
-
|
|
4291
|
+
y.metadataVocabulary,
|
|
4292
|
+
y.contentVocabulary
|
|
4293
4293
|
];
|
|
4294
4294
|
return Je.default = s, Je;
|
|
4295
4295
|
}
|
|
@@ -4306,7 +4306,7 @@ var $n;
|
|
|
4306
4306
|
function ai() {
|
|
4307
4307
|
if ($n) return wt;
|
|
4308
4308
|
$n = 1, Object.defineProperty(wt, "__esModule", { value: !0 });
|
|
4309
|
-
const e = G(), t = oi(), r = tr(), i = At(),
|
|
4309
|
+
const e = G(), t = oi(), r = tr(), i = At(), y = Y(), l = {
|
|
4310
4310
|
keyword: "discriminator",
|
|
4311
4311
|
type: "object",
|
|
4312
4312
|
schemaType: "object",
|
|
@@ -4328,28 +4328,28 @@ function ai() {
|
|
|
4328
4328
|
const h = f.let("valid", !1), a = f.const("tag", (0, e._)`${w}${(0, e.getProperty)(b)}`);
|
|
4329
4329
|
f.if((0, e._)`typeof ${a} == "string"`, () => u(), () => d.error(!1, { discrError: t.DiscrError.Tag, tag: a, tagName: b })), d.ok(h);
|
|
4330
4330
|
function u() {
|
|
4331
|
-
const
|
|
4331
|
+
const g = c();
|
|
4332
4332
|
f.if(!1);
|
|
4333
|
-
for (const o in
|
|
4334
|
-
f.elseIf((0, e._)`${a} === ${o}`), f.assign(h, n(
|
|
4333
|
+
for (const o in g)
|
|
4334
|
+
f.elseIf((0, e._)`${a} === ${o}`), f.assign(h, n(g[o]));
|
|
4335
4335
|
f.else(), d.error(!1, { discrError: t.DiscrError.Mapping, tag: a, tagName: b }), f.endIf();
|
|
4336
4336
|
}
|
|
4337
|
-
function n(
|
|
4338
|
-
const o = f.name("valid"), m = d.subschema({ keyword: "oneOf", schemaProp:
|
|
4337
|
+
function n(g) {
|
|
4338
|
+
const o = f.name("valid"), m = d.subschema({ keyword: "oneOf", schemaProp: g }, o);
|
|
4339
4339
|
return d.mergeEvaluated(m, e.Name), o;
|
|
4340
4340
|
}
|
|
4341
4341
|
function c() {
|
|
4342
|
-
var
|
|
4342
|
+
var g;
|
|
4343
4343
|
const o = {}, m = O(E);
|
|
4344
4344
|
let P = !0;
|
|
4345
4345
|
for (let C = 0; C < v.length; C++) {
|
|
4346
4346
|
let V = v[C];
|
|
4347
|
-
if (V?.$ref && !(0,
|
|
4347
|
+
if (V?.$ref && !(0, y.schemaHasRulesButRef)(V, _.self.RULES)) {
|
|
4348
4348
|
const L = V.$ref;
|
|
4349
4349
|
if (V = r.resolveRef.call(_.self, _.schemaEnv.root, _.baseId, L), V instanceof r.SchemaEnv && (V = V.schema), V === void 0)
|
|
4350
4350
|
throw new i.default(_.opts.uriResolver, _.baseId, L);
|
|
4351
4351
|
}
|
|
4352
|
-
const F = (
|
|
4352
|
+
const F = (g = V?.properties) === null || g === void 0 ? void 0 : g[b];
|
|
4353
4353
|
if (typeof F != "object")
|
|
4354
4354
|
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);
|
|
4355
4355
|
P = P && (m || O(V)), T(F, C);
|
|
@@ -4392,10 +4392,10 @@ var bn;
|
|
|
4392
4392
|
function Tn() {
|
|
4393
4393
|
return bn || (bn = 1, (function(e, t) {
|
|
4394
4394
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.MissingRefError = t.ValidationError = t.CodeGen = t.Name = t.nil = t.stringify = t.str = t._ = t.KeywordCxt = t.Ajv = void 0;
|
|
4395
|
-
const r = ks(), i = ii(),
|
|
4395
|
+
const r = ks(), i = ii(), y = ai(), s = mi, l = ["/properties"], d = "http://json-schema.org/draft-07/schema";
|
|
4396
4396
|
class f extends r.default {
|
|
4397
4397
|
_addVocabularies() {
|
|
4398
|
-
super._addVocabularies(), i.default.forEach((b) => this.addVocabulary(b)), this.opts.discriminator && this.addKeyword(
|
|
4398
|
+
super._addVocabularies(), i.default.forEach((b) => this.addVocabulary(b)), this.opts.discriminator && this.addKeyword(y.default);
|
|
4399
4399
|
}
|
|
4400
4400
|
_addDefaultMetaSchema() {
|
|
4401
4401
|
if (super._addDefaultMetaSchema(), !this.opts.meta)
|
|
@@ -4509,13 +4509,13 @@ function gi() {
|
|
|
4509
4509
|
function r(C) {
|
|
4510
4510
|
return C % 4 === 0 && (C % 100 !== 0 || C % 400 === 0);
|
|
4511
4511
|
}
|
|
4512
|
-
const i = /^(\d\d\d\d)-(\d\d)-(\d\d)$/,
|
|
4512
|
+
const i = /^(\d\d\d\d)-(\d\d)-(\d\d)$/, y = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
4513
4513
|
function s(C) {
|
|
4514
4514
|
const V = i.exec(C);
|
|
4515
4515
|
if (!V)
|
|
4516
4516
|
return !1;
|
|
4517
4517
|
const F = +V[1], L = +V[2], x = +V[3];
|
|
4518
|
-
return L >= 1 && L <= 12 && x >= 1 && x <= (L === 2 && r(F) ? 29 :
|
|
4518
|
+
return L >= 1 && L <= 12 && x >= 1 && x <= (L === 2 && r(F) ? 29 : y[L]);
|
|
4519
4519
|
}
|
|
4520
4520
|
function l(C, V) {
|
|
4521
4521
|
if (C && V)
|
|
@@ -4580,9 +4580,9 @@ function gi() {
|
|
|
4580
4580
|
function c(C) {
|
|
4581
4581
|
return n.lastIndex = 0, n.test(C);
|
|
4582
4582
|
}
|
|
4583
|
-
const
|
|
4583
|
+
const g = -2147483648, o = 2 ** 31 - 1;
|
|
4584
4584
|
function m(C) {
|
|
4585
|
-
return Number.isInteger(C) && C <= o && C >=
|
|
4585
|
+
return Number.isInteger(C) && C <= o && C >= g;
|
|
4586
4586
|
}
|
|
4587
4587
|
function P(C) {
|
|
4588
4588
|
return Number.isInteger(C);
|
|
@@ -4606,17 +4606,17 @@ var Zt = {}, Pn;
|
|
|
4606
4606
|
function vi() {
|
|
4607
4607
|
return Pn || (Pn = 1, (function(e) {
|
|
4608
4608
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.formatLimitDefinition = void 0;
|
|
4609
|
-
const t = Tn(), r = G(), i = r.operators,
|
|
4609
|
+
const t = Tn(), r = G(), i = r.operators, y = {
|
|
4610
4610
|
formatMaximum: { okStr: "<=", ok: i.LTE, fail: i.GT },
|
|
4611
4611
|
formatMinimum: { okStr: ">=", ok: i.GTE, fail: i.LT },
|
|
4612
4612
|
formatExclusiveMaximum: { okStr: "<", ok: i.LT, fail: i.GTE },
|
|
4613
4613
|
formatExclusiveMinimum: { okStr: ">", ok: i.GT, fail: i.LTE }
|
|
4614
4614
|
}, s = {
|
|
4615
|
-
message: ({ keyword: d, schemaCode: f }) => (0, r.str)`should be ${
|
|
4616
|
-
params: ({ keyword: d, schemaCode: f }) => (0, r._)`{comparison: ${
|
|
4615
|
+
message: ({ keyword: d, schemaCode: f }) => (0, r.str)`should be ${y[d].okStr} ${f}`,
|
|
4616
|
+
params: ({ keyword: d, schemaCode: f }) => (0, r._)`{comparison: ${y[d].okStr}, limit: ${f}}`
|
|
4617
4617
|
};
|
|
4618
4618
|
e.formatLimitDefinition = {
|
|
4619
|
-
keyword: Object.keys(
|
|
4619
|
+
keyword: Object.keys(y),
|
|
4620
4620
|
type: "string",
|
|
4621
4621
|
schemaType: "string",
|
|
4622
4622
|
$data: !0,
|
|
@@ -4631,24 +4631,24 @@ function vi() {
|
|
|
4631
4631
|
const c = f.scopeValue("formats", {
|
|
4632
4632
|
ref: b.formats,
|
|
4633
4633
|
code: v.code.formats
|
|
4634
|
-
}),
|
|
4635
|
-
d.fail$data((0, r.or)((0, r._)`typeof ${
|
|
4634
|
+
}), g = f.const("fmt", (0, r._)`${c}[${h.schemaCode}]`);
|
|
4635
|
+
d.fail$data((0, r.or)((0, r._)`typeof ${g} != "object"`, (0, r._)`${g} instanceof RegExp`, (0, r._)`typeof ${g}.compare != "function"`, n(g)));
|
|
4636
4636
|
}
|
|
4637
4637
|
function u() {
|
|
4638
|
-
const c = h.schema,
|
|
4639
|
-
if (!
|
|
4638
|
+
const c = h.schema, g = b.formats[c];
|
|
4639
|
+
if (!g || g === !0)
|
|
4640
4640
|
return;
|
|
4641
|
-
if (typeof
|
|
4641
|
+
if (typeof g != "object" || g instanceof RegExp || typeof g.compare != "function")
|
|
4642
4642
|
throw new Error(`"${E}": format "${c}" does not define "compare" function`);
|
|
4643
4643
|
const o = f.scopeValue("formats", {
|
|
4644
4644
|
key: c,
|
|
4645
|
-
ref:
|
|
4645
|
+
ref: g,
|
|
4646
4646
|
code: v.code.formats ? (0, r._)`${v.code.formats}${(0, r.getProperty)(c)}` : void 0
|
|
4647
4647
|
});
|
|
4648
4648
|
d.fail$data(n(o));
|
|
4649
4649
|
}
|
|
4650
4650
|
function n(c) {
|
|
4651
|
-
return (0, r._)`${c}.compare(${w}, ${$}) ${
|
|
4651
|
+
return (0, r._)`${c}.compare(${w}, ${$}) ${y[E].fail} 0`;
|
|
4652
4652
|
}
|
|
4653
4653
|
},
|
|
4654
4654
|
dependencies: ["format"]
|
|
@@ -4661,7 +4661,7 @@ var Sn;
|
|
|
4661
4661
|
function _i() {
|
|
4662
4662
|
return Sn || (Sn = 1, (function(e, t) {
|
|
4663
4663
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
4664
|
-
const r = gi(), i = vi(),
|
|
4664
|
+
const r = gi(), i = vi(), y = G(), s = new y.Name("fullFormats"), l = new y.Name("fastFormats"), d = (w, $ = { keywords: !0 }) => {
|
|
4665
4665
|
if (Array.isArray($))
|
|
4666
4666
|
return f(w, $, r.fullFormats, s), w;
|
|
4667
4667
|
const [E, _] = $.mode === "fast" ? [r.fastFormats, l] : [r.fullFormats, s], v = $.formats || r.formatNames;
|
|
@@ -4675,7 +4675,7 @@ function _i() {
|
|
|
4675
4675
|
};
|
|
4676
4676
|
function f(w, $, E, _) {
|
|
4677
4677
|
var v, b;
|
|
4678
|
-
(v = (b = w.opts.code).formats) !== null && v !== void 0 || (b.formats = (0,
|
|
4678
|
+
(v = (b = w.opts.code).formats) !== null && v !== void 0 || (b.formats = (0, y._)`require("ajv-formats/dist/formats").${_}`);
|
|
4679
4679
|
for (const h of $)
|
|
4680
4680
|
w.addFormat(h, E[h]);
|
|
4681
4681
|
}
|
|
@@ -4683,7 +4683,7 @@ function _i() {
|
|
|
4683
4683
|
})(Pt, Pt.exports)), Pt.exports;
|
|
4684
4684
|
}
|
|
4685
4685
|
var $i = _i();
|
|
4686
|
-
const bi = /* @__PURE__ */ jn($i), wi = "http://json-schema.org/draft-07/schema#", Pi = "#/definitions/CICConfig", Si = /* @__PURE__ */ JSON.parse('{"CICConfig":{"type":"object","properties":{"version":{"type":"string"},"meta":{"$ref":"#/definitions/Meta"},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"layout":{"$ref":"#/definitions/Layout"},"components":{"type":"array","items":{"$ref":"#/definitions/ComponentInstance"}},"dataSources":{"type":"array","items":{"$ref":"#/definitions/DataSourceItem"}},"extensions":{"type":"object"}},"required":["id","name","path"],"additionalProperties":false,"description":"CIC 页面定义 说明:定义了 CIC 中页面的结构,包含页面 ID、名称、路径、布局、组件等。"}},"registry":{"$ref":"#/definitions/Registry"},"variables":{"$ref":"#/definitions/Variables"},"deps":{"type":"array","items":{"$ref":"#/definitions/Dependency"}},"extensions":{"type":"object"}},"required":["version","meta","pages"],"additionalProperties":false,"description":"CIC 配置定义 说明:定义了 CIC 项目的全局配置,包含版本、元数据、页面、组件、变量、依赖等。"},"Meta":{"type":"object","properties":{"projectId":{"type":"string","description":"项目唯一标识符"},"projectName":{"type":"string","description":"项目名称"},"description":{"type":"string","description":"项目描述"},"layout":{"$ref":"#/definitions/Layout","description":"布局配置"},"language":{"type":"string","description":"语言代码 (e.g. zh-CN, en-US)"},"createTime":{"type":"string","description":"创建时间 (ISO 8601)","format":"date-time"},"updateTime":{"type":"string","description":"更新时间 (ISO 8601)","format":"date-time"},"author":{"type":"string","description":"作者"},"extensions":{"type":"object","description":"扩展字段"}},"additionalProperties":false,"description":"项目元信息 包含项目的基本信息、布局配置、语言、创建时间、更新时间、作者和扩展信息。"},"Layout":{"type":"object","properties":{"type":{"type":"string","enum":["free","grid"],"description":"布局类型: free(自由布局) 或 grid(网格布局)"},"config":{"type":"object","properties":{"width":{"type":"number","description":"设计稿宽度","minimum":1,"default":1920},"height":{"type":"number","description":"设计稿高度","minimum":1,"default":1080},"scaleMode":{"type":"string","enum":["aspectFit","fill"],"description":"缩放模式","default":"aspectFit"}},"required":["width","height","scaleMode"],"additionalProperties":false}},"required":["type","config"],"additionalProperties":false,"description":"布局配置"},"ComponentInstance":{"anyOf":[{"$ref":"#/definitions/ViewComponentInstance"},{"$ref":"#/definitions/ContainerComponentInstance"},{"$ref":"#/definitions/LogicComponentInstanceRef"}],"description":"组件实例(view/container/logic 类型)"},"ViewComponentInstance":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"view"},"component":{"$ref":"#/definitions/ComponentRef"}},"required":["component","id","role"],"additionalProperties":false},"StyleValue":{"anyOf":[{"type":"string"},{"type":"number"},{"$ref":"#/definitions/Expr"}],"description":"样式值可以是静态或表达式"},"Expr":{"type":"string","description":"通用表达式(用于条件、模板等)"},"CICEventMap":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/definitions/CICEventWithMeta"}},"description":"某组件的所有事件 说明:定义了 CIC 项目中组件的所有事件,包含事件类型、动作、参数、调度顺序、延迟时间和条件。 (key: 事件名, value: 处理逻辑数组)"},"CICEventWithMeta":{"anyOf":[{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"vars"},"action":{"$ref":"#/definitions/VarsAction"},"params":{"$ref":"#/definitions/VarsParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"navigate"},"action":{"type":"string","const":"internal"},"params":{"$ref":"#/definitions/NavigateInternalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"navigate"},"action":{"type":"string","const":"external"},"params":{"$ref":"#/definitions/NavigateExternalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"comp"},"action":{"$ref":"#/definitions/CompAction"},"params":{"$ref":"#/definitions/CompParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"toggle"},"action":{"type":"string","const":"visibility"},"params":{"$ref":"#/definitions/ToggleParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"camera"},"action":{"type":"string","const":"focus"},"params":{"$ref":"#/definitions/CameraFocusParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"material"},"action":{"type":"string","const":"change"},"params":{"$ref":"#/definitions/MaterialChangeParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"custom"},"action":{"type":"string","const":"local"},"params":{"$ref":"#/definitions/CustomLocalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"custom"},"action":{"type":"string","const":"remote"},"params":{"$ref":"#/definitions/CustomRemoteParams"}},"required":["action","order","params","type"]}],"description":"带调度信息"},"EventCondition":{"anyOf":[{"$ref":"#/definitions/KeyCondition"},{"type":"array","items":{"$ref":"#/definitions/KeyCondition"}},{"$ref":"#/definitions/ExpressionCondition"}],"description":"多条件(AND) + 表达式"},"KeyCondition":{"type":"object","properties":{"key":{"type":"string"},"op":{"$ref":"#/definitions/ConditionOperator"},"value":{}},"required":["key"],"additionalProperties":false},"ConditionOperator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not-in","exists","not-exists"]},"ExpressionCondition":{"type":"object","properties":{"expression":{"type":"string"}},"required":["expression"],"additionalProperties":false,"description":"表达式条件:支持如 \\"ctx.id === 5 && ctx.level > 1\\""},"VarsAction":{"type":"string","enum":["add","update","delete"],"description":"变量事件动作"},"VarsParams":{"type":"object","properties":{"key":{"type":"string"},"value":{},"exclude":{"type":"array","items":{"type":"string"}}},"required":["key","value"],"additionalProperties":false},"NavigateInternalParams":{"type":"object","properties":{"name":{"type":"string"},"params":{"type":"object"}},"required":["name"],"additionalProperties":false},"NavigateExternalParams":{"type":"object","properties":{"url":{"type":"string"},"openNewTab":{"type":"boolean"}},"required":["url"],"additionalProperties":false},"CompAction":{"type":"string","enum":["add","update","delete"],"description":"组件事件动作"},"CompParams":{"type":"object","properties":{"comps":{"type":"array","items":{"type":"string"}},"props":{"type":"object"}},"required":["comps"],"additionalProperties":false},"ToggleParams":{"type":"object","properties":{"show":{"type":"array","items":{"type":"string"}},"hide":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"CameraFocusParams":{"type":"object","properties":{"target":{"type":["string","number"]},"duration":{"type":"number"}},"required":["target"],"additionalProperties":false},"MaterialChangeParams":{"type":"object","properties":{"target":{"type":"string"},"materials":{"type":"string"}},"required":["target","materials"],"additionalProperties":false},"CustomLocalParams":{"type":"object","properties":{"code":{"type":"string"},"depends":{"type":"array","items":{"type":"string"}}},"required":["code"],"additionalProperties":false},"CustomRemoteParams":{"type":"object","properties":{"url":{"type":"string"},"depends":{"type":"array","items":{"type":"string"}}},"required":["url"],"additionalProperties":false},"Data":{"type":"object","properties":{"id":{"type":"string","description":"数据ID"},"mapping":{"$ref":"#/definitions/IMapping","description":"字段映射配置"},"converse":{"$ref":"#/definitions/IConverse","description":"转换规则配置"}},"required":["id"],"additionalProperties":false,"description":"数据配置"},"IMapping":{"type":"object","properties":{"use":{"type":"boolean"},"mapFields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"源字段名"},"mapField":{"type":"string","description":"目标字段名"},"value":{"description":"映射值或公式"},"type":{"type":"string","enum":["copy","const","formula"],"description":"映射类型:默认(普通映射)、copy(复制) const(常量)、formula(公式)"},"description":{"type":"string","description":"描述"}},"required":["field","mapField"],"additionalProperties":false}}},"required":["use","mapFields"],"additionalProperties":false,"description":"字段映射配置"},"IConverse":{"type":"object","properties":{"use":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"转换代码"},"depeedVars":{"type":"array","items":{"type":"string"},"description":"依赖变量列表(用于响应式重执行)"}},"required":["code"],"additionalProperties":false}}},"required":["use","data"],"additionalProperties":false,"description":"转换规则配置"},"ComponentRef":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","const":"id"},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false}],"description":"component 引用:字符串或 object 描述"},"ContainerComponentInstance":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"container"},"children":{"type":"array","items":{"$ref":"#/definitions/ComponentInstance"}}},"required":["children","id","role"],"additionalProperties":false},"LogicComponentInstanceRef":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"logic"},"component":{"$ref":"#/definitions/LogicRef"}},"required":["component","id","role"],"additionalProperties":false},"LogicRef":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","enum":["url","code"]},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false}]},"DataSourceItem":{"anyOf":[{"$ref":"#/definitions/DataSourceRest"},{"$ref":"#/definitions/DataSourceWebSocket"},{"$ref":"#/definitions/DataSourceStatic"},{"$ref":"#/definitions/DataSourceFunction"}],"description":"数据源项(rest/websocket/static/function 类型)"},"DataSourceRest":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"rest"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"url":{"type":"string"},"method":{"type":"string","enum":["GET","POST","PUT","DELETE"]},"headers":{"type":"object","additionalProperties":{"type":"string"}},"params":{"type":"object"},"body":{},"timeout":{"$ref":"#/definitions/Milliseconds"}},"required":["id","method","type","url"],"additionalProperties":false},"Milliseconds":{"type":"number"},"DataSourceWebSocket":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"websocket"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"url":{"type":"string"},"protocols":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"subscribeMessage":{},"heartbeat":{"type":"object","properties":{"interval":{"$ref":"#/definitions/Milliseconds"},"message":{}},"required":["interval","message"],"additionalProperties":false}},"required":["id","type","url"],"additionalProperties":false},"DataSourceStatic":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"static"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"value":{}},"required":["id","type","value"],"additionalProperties":false},"DataSourceFunction":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"code":{"type":"string"},"timeout":{"$ref":"#/definitions/Milliseconds"}},"required":["code","id","type"],"additionalProperties":false},"Registry":{"type":"object","properties":{"components":{"type":"array","items":{"$ref":"#/definitions/RegistryComponents"}},"plugins":{"type":"object","description":"插件后期可扩展"}},"additionalProperties":false,"description":"注册表"},"RegistryComponents":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"author":{"type":"string"},"defaultProps":{"type":"object"},"data":{},"deps":{"type":"array","items":{"type":"string"}}},"required":["id"],"additionalProperties":false,"description":"注册中心组件项 说明:定义了 CIC 项目中组件注册中心的组件项,包含组件 ID、类型和配置。"},"Variables":{"type":"object","properties":{"global":{"$ref":"#/definitions/VariablesMap","description":"全局变量,对所有页面和组件均生效。"},"page":{"type":"object","additionalProperties":{"$ref":"#/definitions/VariablesMap"},"description":"页面级变量,键为页面 ID,值为该页面的变量映射。"},"component":{"type":"object","additionalProperties":{"$ref":"#/definitions/VariablesMap"},"description":"组件级变量,键为组件 ID,值为该组件的变量映射。"}},"additionalProperties":false,"description":"变量集合,按作用域组织:global/page/component。"},"VariablesMap":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"},"description":"变量映射,键为变量名,值为变量定义。"},"Variable":{"anyOf":[{"$ref":"#/definitions/StringVariable"},{"$ref":"#/definitions/NumberVariable"},{"$ref":"#/definitions/BooleanVariable"},{"$ref":"#/definitions/ArrayVariable"},{"$ref":"#/definitions/FunctionVariable"},{"$ref":"#/definitions/ObjectVariable"}],"description":"变量联合类型,涵盖五类变量定义。"},"StringVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"string"},"value":{"type":"string"},"default":{"type":"string"}},"required":["type","value","default"],"additionalProperties":false,"description":"字符串变量,包含当前值与默认值,可选描述。"},"NumberVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"number"},"value":{"type":"number"},"default":{"type":"number"}},"required":["type","value","default"],"additionalProperties":false,"description":"数字变量,包含当前值与默认值,可选描述。"},"BooleanVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"boolean"},"value":{"type":"boolean"},"default":{"type":"boolean"}},"required":["type","value","default"],"additionalProperties":false,"description":"布尔变量,包含当前值与默认值,可选描述。"},"ArrayVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"array"},"value":{"type":"array","items":{}},"default":{"type":"array","items":{}}},"required":["type","value","default"],"additionalProperties":false,"description":"数组变量,元素类型不做限制,包含当前值与默认值,可选描述。"},"FunctionVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"function"},"value":{"type":"string"},"default":{"type":"string"},"args":{"type":"array","items":{"type":"string"}}},"required":["type","value","default"],"additionalProperties":false,"description":"函数变量,以字符串保存函数实现;支持 `args` 指定入参名列表。"},"ObjectVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"object"},"value":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"}},"default":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"}}},"required":["type","value","default"],"additionalProperties":false,"description":"对象变量,键到变量的映射;支持递归嵌套。"},"Dependency":{"anyOf":[{"$ref":"#/definitions/JSDependency"},{"$ref":"#/definitions/CSSDependency"},{"$ref":"#/definitions/FontDependency"},{"$ref":"#/definitions/ImageDependency"},{"$ref":"#/definitions/JSONDependency"},{"$ref":"#/definitions/WasmDependency"},{"$ref":"#/definitions/OtherDependency"}],"description":"依赖项"},"JSDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"js"},"format":{"$ref":"#/definitions/JSFormat"},"crossOrigin":{"type":"string","enum":["anonymous","use-credentials"]},"module":{"type":"boolean"}},"required":["format","id","type"],"additionalProperties":false,"description":"JS 资源"},"JSFormat":{"type":"string","enum":["esm","umd","iife","cjs"],"description":"JS 格式"},"CSSDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"css"},"media":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"CSS"},"FontDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"font"},"family":{"type":"string"},"weight":{"type":["number","string"]},"style":{"type":"string","enum":["normal","italic"]}},"required":["id","type"],"additionalProperties":false,"description":"字体"},"ImageDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"image"},"mime":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"图片"},"JSONDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"json"}},"required":["id","type"],"additionalProperties":false,"description":"JSON"},"WasmDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"wasm"},"init":{"type":"string","enum":["async","sync"]}},"required":["id","type"],"additionalProperties":false,"description":"WASM"},"OtherDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"other"},"kind":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"其他"}}'), Ve = {
|
|
4686
|
+
const bi = /* @__PURE__ */ jn($i), wi = "http://json-schema.org/draft-07/schema#", Pi = "#/definitions/CICConfig", Si = /* @__PURE__ */ JSON.parse('{"CICConfig":{"type":"object","properties":{"version":{"type":"string"},"meta":{"$ref":"#/definitions/Meta"},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"layout":{"$ref":"#/definitions/Layout"},"components":{"type":"array","items":{"$ref":"#/definitions/ComponentInstance"}},"dataSources":{"type":"array","items":{"$ref":"#/definitions/DataSourceItem"}},"extensions":{"type":"object"}},"required":["id","path"],"additionalProperties":false,"description":"CIC 页面定义 说明:定义了 CIC 中页面的结构,包含页面 ID、名称、路径、布局、组件等。"}},"registry":{"$ref":"#/definitions/Registry"},"variables":{"$ref":"#/definitions/Variables"},"deps":{"type":"array","items":{"$ref":"#/definitions/Dependency"}},"extensions":{"type":"object"}},"required":["version","meta","pages"],"additionalProperties":false,"description":"CIC 配置定义 说明:定义了 CIC 项目的全局配置,包含版本、元数据、页面、组件、变量、依赖等。"},"Meta":{"type":"object","properties":{"projectId":{"type":"string","description":"项目唯一标识符"},"projectName":{"type":"string","description":"项目名称"},"description":{"type":"string","description":"项目描述"},"layout":{"$ref":"#/definitions/Layout","description":"布局配置"},"language":{"type":"string","description":"语言代码 (e.g. zh-CN, en-US)"},"createTime":{"type":"string","description":"创建时间 (ISO 8601)","format":"date-time"},"updateTime":{"type":"string","description":"更新时间 (ISO 8601)","format":"date-time"},"author":{"type":"string","description":"作者"},"extensions":{"type":"object","description":"扩展字段"}},"additionalProperties":false,"description":"项目元信息 包含项目的基本信息、布局配置、语言、创建时间、更新时间、作者和扩展信息。"},"Layout":{"type":"object","properties":{"type":{"type":"string","enum":["free","grid"],"description":"布局类型: free(自由布局) 或 grid(网格布局)"},"config":{"type":"object","properties":{"width":{"type":"number","description":"设计稿宽度","minimum":1,"default":1920},"height":{"type":"number","description":"设计稿高度","minimum":1,"default":1080},"scaleMode":{"type":"string","enum":["aspectFit","fill"],"description":"缩放模式","default":"aspectFit"}},"required":["width","height","scaleMode"],"additionalProperties":false}},"required":["type","config"],"additionalProperties":false,"description":"布局配置"},"ComponentInstance":{"anyOf":[{"$ref":"#/definitions/ViewComponentInstance"},{"$ref":"#/definitions/ContainerComponentInstance"},{"$ref":"#/definitions/LogicComponentInstanceRef"}],"description":"组件实例(view/container/logic 类型)"},"ViewComponentInstance":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"view"},"component":{"$ref":"#/definitions/ComponentRef"}},"required":["component","id","role"],"additionalProperties":false},"StyleValue":{"anyOf":[{"type":"string"},{"type":"number"},{"$ref":"#/definitions/Expr"}],"description":"样式值可以是静态或表达式"},"Expr":{"type":"string","description":"通用表达式(用于条件、模板等)"},"CICEventMap":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/definitions/CICEventWithMeta"}},"description":"某组件的所有事件 说明:定义了 CIC 项目中组件的所有事件,包含事件类型、动作、参数、调度顺序、延迟时间和条件。 (key: 事件名, value: 处理逻辑数组)"},"CICEventWithMeta":{"anyOf":[{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"vars"},"action":{"$ref":"#/definitions/VarsAction"},"params":{"$ref":"#/definitions/VarsParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"navigate"},"action":{"type":"string","const":"internal"},"params":{"$ref":"#/definitions/NavigateInternalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"navigate"},"action":{"type":"string","const":"external"},"params":{"$ref":"#/definitions/NavigateExternalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"comp"},"action":{"$ref":"#/definitions/CompAction"},"params":{"$ref":"#/definitions/CompParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"toggle"},"action":{"type":"string","const":"visibility"},"params":{"$ref":"#/definitions/ToggleParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"camera"},"action":{"type":"string","const":"focus"},"params":{"$ref":"#/definitions/CameraFocusParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"material"},"action":{"type":"string","const":"change"},"params":{"$ref":"#/definitions/MaterialChangeParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"custom"},"action":{"type":"string","const":"local"},"params":{"$ref":"#/definitions/CustomLocalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"custom"},"action":{"type":"string","const":"remote"},"params":{"$ref":"#/definitions/CustomRemoteParams"}},"required":["action","order","params","type"]}],"description":"带调度信息"},"EventCondition":{"anyOf":[{"$ref":"#/definitions/KeyCondition"},{"type":"array","items":{"$ref":"#/definitions/KeyCondition"}},{"$ref":"#/definitions/ExpressionCondition"}],"description":"多条件(AND) + 表达式"},"KeyCondition":{"type":"object","properties":{"key":{"type":"string"},"op":{"$ref":"#/definitions/ConditionOperator"},"value":{}},"required":["key"],"additionalProperties":false},"ConditionOperator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not-in","exists","not-exists"]},"ExpressionCondition":{"type":"object","properties":{"expression":{"type":"string"}},"required":["expression"],"additionalProperties":false,"description":"表达式条件:支持如 \\"ctx.id === 5 && ctx.level > 1\\""},"VarsAction":{"type":"string","enum":["add","update","delete"],"description":"变量事件动作"},"VarsParams":{"type":"object","properties":{"key":{"type":"string"},"value":{},"exclude":{"type":"array","items":{"type":"string"}}},"required":["key","value"],"additionalProperties":false},"NavigateInternalParams":{"type":"object","properties":{"name":{"type":"string"},"params":{"type":"object"}},"required":["name"],"additionalProperties":false},"NavigateExternalParams":{"type":"object","properties":{"url":{"type":"string"},"openNewTab":{"type":"boolean"}},"required":["url"],"additionalProperties":false},"CompAction":{"type":"string","enum":["add","update","delete"],"description":"组件事件动作"},"CompParams":{"type":"object","properties":{"comps":{"type":"array","items":{"type":"string"}},"props":{"type":"object"}},"required":["comps"],"additionalProperties":false},"ToggleParams":{"type":"object","properties":{"show":{"type":"array","items":{"type":"string"}},"hide":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"CameraFocusParams":{"type":"object","properties":{"target":{"type":["string","number"]},"duration":{"type":"number"}},"required":["target"],"additionalProperties":false},"MaterialChangeParams":{"type":"object","properties":{"target":{"type":"string"},"materials":{"type":"string"}},"required":["target","materials"],"additionalProperties":false},"CustomLocalParams":{"type":"object","properties":{"code":{"type":"string"},"depends":{"type":"array","items":{"type":"string"}}},"required":["code"],"additionalProperties":false},"CustomRemoteParams":{"type":"object","properties":{"url":{"type":"string"},"depends":{"type":"array","items":{"type":"string"}}},"required":["url"],"additionalProperties":false},"Data":{"type":"object","properties":{"id":{"type":"string","description":"数据ID"},"mapping":{"$ref":"#/definitions/IMapping","description":"字段映射配置"},"converse":{"$ref":"#/definitions/IConverse","description":"转换规则配置"}},"required":["id"],"additionalProperties":false,"description":"数据配置"},"IMapping":{"type":"object","properties":{"use":{"type":"boolean"},"mapFields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"源字段名"},"mapField":{"type":"string","description":"目标字段名"},"value":{"description":"映射值或公式"},"type":{"type":"string","enum":["copy","const","formula"],"description":"映射类型:默认(普通映射)、copy(复制) const(常量)、formula(公式)"},"description":{"type":"string","description":"描述"}},"required":["field","mapField"],"additionalProperties":false}}},"required":["use","mapFields"],"additionalProperties":false,"description":"字段映射配置"},"IConverse":{"type":"object","properties":{"use":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"转换代码"},"depeedVars":{"type":"array","items":{"type":"string"},"description":"依赖变量列表(用于响应式重执行)"}},"required":["code"],"additionalProperties":false}}},"required":["use","data"],"additionalProperties":false,"description":"转换规则配置"},"ComponentRef":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","const":"id"},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false}],"description":"component 引用:字符串或 object 描述"},"ContainerComponentInstance":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"container"},"children":{"type":"array","items":{"$ref":"#/definitions/ComponentInstance"}}},"required":["children","id","role"],"additionalProperties":false},"LogicComponentInstanceRef":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"logic"},"component":{"$ref":"#/definitions/LogicRef"}},"required":["component","id","role"],"additionalProperties":false},"LogicRef":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","enum":["url","code"]},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false}]},"DataSourceItem":{"anyOf":[{"$ref":"#/definitions/DataSourceRest"},{"$ref":"#/definitions/DataSourceWebSocket"},{"$ref":"#/definitions/DataSourceStatic"},{"$ref":"#/definitions/DataSourceFunction"}],"description":"数据源项(rest/websocket/static/function 类型)"},"DataSourceRest":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"rest"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"url":{"type":"string"},"method":{"type":"string","enum":["GET","POST","PUT","DELETE"]},"headers":{"type":"object","additionalProperties":{"type":"string"}},"params":{"type":"object"},"body":{},"timeout":{"$ref":"#/definitions/Milliseconds"}},"required":["id","method","type","url"],"additionalProperties":false},"Milliseconds":{"type":"number"},"DataSourceWebSocket":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"websocket"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"url":{"type":"string"},"protocols":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"subscribeMessage":{},"heartbeat":{"type":"object","properties":{"interval":{"$ref":"#/definitions/Milliseconds"},"message":{}},"required":["interval","message"],"additionalProperties":false}},"required":["id","type","url"],"additionalProperties":false},"DataSourceStatic":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"static"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"value":{}},"required":["id","type","value"],"additionalProperties":false},"DataSourceFunction":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"code":{"type":"string"},"timeout":{"$ref":"#/definitions/Milliseconds"}},"required":["code","id","type"],"additionalProperties":false},"Registry":{"type":"object","properties":{"components":{"type":"array","items":{"$ref":"#/definitions/RegistryComponents"}},"plugins":{"type":"object","description":"插件后期可扩展"}},"additionalProperties":false,"description":"注册表"},"RegistryComponents":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"author":{"type":"string"},"defaultProps":{"type":"object"},"data":{},"deps":{"type":"array","items":{"type":"string"}}},"required":["id"],"additionalProperties":false,"description":"注册中心组件项 说明:定义了 CIC 项目中组件注册中心的组件项,包含组件 ID、类型和配置。"},"Variables":{"type":"object","properties":{"global":{"$ref":"#/definitions/VariablesMap","description":"全局变量,对所有页面和组件均生效。"},"page":{"type":"object","additionalProperties":{"$ref":"#/definitions/VariablesMap"},"description":"页面级变量,键为页面 ID,值为该页面的变量映射。"},"component":{"type":"object","additionalProperties":{"$ref":"#/definitions/VariablesMap"},"description":"组件级变量,键为组件 ID,值为该组件的变量映射。"}},"additionalProperties":false,"description":"变量集合,按作用域组织:global/page/component。"},"VariablesMap":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"},"description":"变量映射,键为变量名,值为变量定义。"},"Variable":{"anyOf":[{"$ref":"#/definitions/StringVariable"},{"$ref":"#/definitions/NumberVariable"},{"$ref":"#/definitions/BooleanVariable"},{"$ref":"#/definitions/ArrayVariable"},{"$ref":"#/definitions/FunctionVariable"},{"$ref":"#/definitions/ObjectVariable"}],"description":"变量联合类型,涵盖五类变量定义。"},"StringVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"string"},"value":{"type":"string"},"default":{"type":"string"}},"required":["type","value","default"],"additionalProperties":false,"description":"字符串变量,包含当前值与默认值,可选描述。"},"NumberVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"number"},"value":{"type":"number"},"default":{"type":"number"}},"required":["type","value","default"],"additionalProperties":false,"description":"数字变量,包含当前值与默认值,可选描述。"},"BooleanVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"boolean"},"value":{"type":"boolean"},"default":{"type":"boolean"}},"required":["type","value","default"],"additionalProperties":false,"description":"布尔变量,包含当前值与默认值,可选描述。"},"ArrayVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"array"},"value":{"type":"array","items":{}},"default":{"type":"array","items":{}}},"required":["type","value","default"],"additionalProperties":false,"description":"数组变量,元素类型不做限制,包含当前值与默认值,可选描述。"},"FunctionVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"function"},"value":{"type":"string"},"default":{"type":"string"},"args":{"type":"array","items":{"type":"string"}}},"required":["type","value","default"],"additionalProperties":false,"description":"函数变量,以字符串保存函数实现;支持 `args` 指定入参名列表。"},"ObjectVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"object"},"value":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"}},"default":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"}}},"required":["type","value","default"],"additionalProperties":false,"description":"对象变量,键到变量的映射;支持递归嵌套。"},"Dependency":{"anyOf":[{"$ref":"#/definitions/JSDependency"},{"$ref":"#/definitions/CSSDependency"},{"$ref":"#/definitions/FontDependency"},{"$ref":"#/definitions/ImageDependency"},{"$ref":"#/definitions/JSONDependency"},{"$ref":"#/definitions/WasmDependency"},{"$ref":"#/definitions/OtherDependency"}],"description":"依赖项"},"JSDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"js"},"format":{"$ref":"#/definitions/JSFormat"},"crossOrigin":{"type":"string","enum":["anonymous","use-credentials"]},"module":{"type":"boolean"}},"required":["format","id","type"],"additionalProperties":false,"description":"JS 资源"},"JSFormat":{"type":"string","enum":["esm","umd","iife","cjs"],"description":"JS 格式"},"CSSDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"css"},"media":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"CSS"},"FontDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"font"},"family":{"type":"string"},"weight":{"type":["number","string"]},"style":{"type":"string","enum":["normal","italic"]}},"required":["id","type"],"additionalProperties":false,"description":"字体"},"ImageDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"image"},"mime":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"图片"},"JSONDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"json"}},"required":["id","type"],"additionalProperties":false,"description":"JSON"},"WasmDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"wasm"},"init":{"type":"string","enum":["async","sync"]}},"required":["id","type"],"additionalProperties":false,"description":"WASM"},"OtherDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,可以是绝对地址或相对地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"anyOf":[{"type":"boolean"},{"type":"string","const":"module"},{"type":"string","const":"style"}],"description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"type":{"type":"string","const":"other"},"kind":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"其他"}}'), Ve = {
|
|
4687
4687
|
$schema: wi,
|
|
4688
4688
|
$ref: Pi,
|
|
4689
4689
|
definitions: Si
|
|
@@ -4748,14 +4748,14 @@ const bi = /* @__PURE__ */ jn($i), wi = "http://json-schema.org/draft-07/schema#
|
|
|
4748
4748
|
break;
|
|
4749
4749
|
}
|
|
4750
4750
|
return { path: a, message: c, keyword: u, params: n };
|
|
4751
|
-
}, r = e.map(t), i = [],
|
|
4751
|
+
}, r = e.map(t), i = [], y = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set();
|
|
4752
4752
|
for (const h of r)
|
|
4753
4753
|
if (h.keyword === ue.CONST && h.path.endsWith(we.TYPE)) {
|
|
4754
|
-
const a = h.path, u =
|
|
4755
|
-
n !== void 0 && !u.values.includes(n) && u.values.push(n),
|
|
4754
|
+
const a = h.path, u = y.get(a) || { path: h.path, values: [] }, n = h.params?.allowedValue;
|
|
4755
|
+
n !== void 0 && !u.values.includes(n) && u.values.push(n), y.set(a, u);
|
|
4756
4756
|
} else
|
|
4757
4757
|
i.push(h);
|
|
4758
|
-
for (const [, h] of
|
|
4758
|
+
for (const [, h] of y)
|
|
4759
4759
|
if (h.values.length <= 1)
|
|
4760
4760
|
h.values.length === 1 && i.push({
|
|
4761
4761
|
path: h.path,
|
|
@@ -4785,10 +4785,10 @@ const bi = /* @__PURE__ */ jn($i), wi = "http://json-schema.org/draft-07/schema#
|
|
|
4785
4785
|
for (const [h, a] of w.entries()) {
|
|
4786
4786
|
const u = Ei.find((c) => c.rootPattern.test(h));
|
|
4787
4787
|
if (u && a.some(
|
|
4788
|
-
(
|
|
4788
|
+
(g) => g.keyword === ue.REQUIRED && g.params?.missingProperty === u.discriminator
|
|
4789
4789
|
)) {
|
|
4790
|
-
for (const
|
|
4791
|
-
|
|
4790
|
+
for (const g of a)
|
|
4791
|
+
g.keyword === ue.REQUIRED && u.keepRequired.includes(g.params?.missingProperty) && E.push(g);
|
|
4792
4792
|
continue;
|
|
4793
4793
|
}
|
|
4794
4794
|
if (!s.has(h)) {
|
|
@@ -4796,8 +4796,8 @@ const bi = /* @__PURE__ */ jn($i), wi = "http://json-schema.org/draft-07/schema#
|
|
|
4796
4796
|
continue;
|
|
4797
4797
|
}
|
|
4798
4798
|
for (const c of a) {
|
|
4799
|
-
const
|
|
4800
|
-
|
|
4799
|
+
const g = c.keyword === ue.TYPE && (c.path === `${h}${we.VALUE}` || c.path === `${h}${we.DEFAULT}`), o = c.keyword === ue.ADDITIONAL && c.path === h;
|
|
4800
|
+
g || o || E.push(c);
|
|
4801
4801
|
}
|
|
4802
4802
|
}
|
|
4803
4803
|
const v = E.some((h) => h.keyword !== ue.ANY_OF) ? E.filter((h) => h.keyword !== ue.ANY_OF) : E, b = (h) => {
|
|
@@ -4842,17 +4842,17 @@ const bi = /* @__PURE__ */ jn($i), wi = "http://json-schema.org/draft-07/schema#
|
|
|
4842
4842
|
normalize: t,
|
|
4843
4843
|
base: r,
|
|
4844
4844
|
branches: i,
|
|
4845
|
-
key:
|
|
4845
|
+
key: y,
|
|
4846
4846
|
missingKeys: s,
|
|
4847
4847
|
onSuccess: l
|
|
4848
4848
|
}) => {
|
|
4849
4849
|
const d = t ? t(e) : e, f = d;
|
|
4850
|
-
if (f && typeof f == "object" && typeof f[
|
|
4851
|
-
const w = i[f[
|
|
4850
|
+
if (f && typeof f == "object" && typeof f[y] == "string") {
|
|
4851
|
+
const w = i[f[y]];
|
|
4852
4852
|
if (w)
|
|
4853
4853
|
return w(f) ? l(f) : { ok: !1, errors: ee(w.errors) };
|
|
4854
4854
|
}
|
|
4855
|
-
return r(d) ? l(d) : !f || typeof f[
|
|
4855
|
+
return r(d) ? l(d) : !f || typeof f[y] != "string" ? { ok: !1, errors: ki(s) } : { ok: !1, errors: ee(r.errors) };
|
|
4856
4856
|
}, sr = (e, t, r, i) => Mn({
|
|
4857
4857
|
input: e,
|
|
4858
4858
|
base: t,
|
|
@@ -4860,11 +4860,11 @@ const bi = /* @__PURE__ */ jn($i), wi = "http://json-schema.org/draft-07/schema#
|
|
|
4860
4860
|
key: i,
|
|
4861
4861
|
missingKeys: [i, "id"],
|
|
4862
4862
|
onSuccess: () => ({ ok: !0, value: null })
|
|
4863
|
-
}), ir = (e, t, r, i,
|
|
4863
|
+
}), ir = (e, t, r, i, y, s, l = [s, "id"]) => Mn({
|
|
4864
4864
|
input: e,
|
|
4865
4865
|
normalize: (d) => r(d, t),
|
|
4866
4866
|
base: i,
|
|
4867
|
-
branches:
|
|
4867
|
+
branches: y,
|
|
4868
4868
|
key: s,
|
|
4869
4869
|
missingKeys: l,
|
|
4870
4870
|
onSuccess: (d) => ({ ok: !0, value: d })
|
|
@@ -4901,8 +4901,8 @@ const An = () => (St || (St = new yi({ allErrors: !0, strict: !1 }), bi(St)), St
|
|
|
4901
4901
|
}, Ii = (e, t) => e.compile({ $ref: t, definitions: Ve.definitions, properties: Ve.properties }), te = (e) => {
|
|
4902
4902
|
const t = An(), r = `type:${e}::${ji}`, i = En.get(r);
|
|
4903
4903
|
if (i) return i;
|
|
4904
|
-
const
|
|
4905
|
-
for (const s of
|
|
4904
|
+
const y = Ri[e] || [`#/definitions/${e}`, `#/$defs/${e}`];
|
|
4905
|
+
for (const s of y)
|
|
4906
4906
|
try {
|
|
4907
4907
|
const l = Ii(t, s);
|
|
4908
4908
|
return En.set(r, l), l;
|
|
@@ -4964,7 +4964,7 @@ const An = () => (St || (St = new yi({ allErrors: !0, strict: !1 }), bi(St)), St
|
|
|
4964
4964
|
), as = (e, t) => ir(
|
|
4965
4965
|
e,
|
|
4966
4966
|
t,
|
|
4967
|
-
(i,
|
|
4967
|
+
(i, y) => y?.strict ? i : ye(i, y?.defaults),
|
|
4968
4968
|
Xn,
|
|
4969
4969
|
{ js: es, css: ts, font: rs, image: ns, json: ss, wasm: is, other: os },
|
|
4970
4970
|
"type",
|
|
@@ -4979,7 +4979,24 @@ const Li = () => {
|
|
|
4979
4979
|
(!Ct || kn !== t) && (Ct = e.compile(Ve), kn = t);
|
|
4980
4980
|
}, qt = (e) => {
|
|
4981
4981
|
try {
|
|
4982
|
-
|
|
4982
|
+
if (Li(), Ct(e)) {
|
|
4983
|
+
const r = [], i = /* @__PURE__ */ new Map(), y = Array.isArray(e.pages) ? e.pages : [];
|
|
4984
|
+
for (let s = 0; s < y.length; s++) {
|
|
4985
|
+
const l = y[s]?.name;
|
|
4986
|
+
if (typeof l == "string") {
|
|
4987
|
+
const d = l.trim();
|
|
4988
|
+
if (!d) continue;
|
|
4989
|
+
i.has(d) ? r.push({
|
|
4990
|
+
path: `/pages[${s}]/name`,
|
|
4991
|
+
message: `页面名称重复:"${d}"`,
|
|
4992
|
+
keyword: "anyOf",
|
|
4993
|
+
params: {}
|
|
4994
|
+
}) : i.set(d, s);
|
|
4995
|
+
}
|
|
4996
|
+
}
|
|
4997
|
+
return r.length ? { ok: !1, errors: ee(r) } : { ok: !0, value: null };
|
|
4998
|
+
}
|
|
4999
|
+
return { ok: !1, errors: ee(Ct.errors || []) };
|
|
4983
5000
|
} catch (t) {
|
|
4984
5001
|
const r = [{ path: "", message: t?.message || String(t), keyword: "anyOf", params: {} }];
|
|
4985
5002
|
return { ok: !1, errors: ee(r) };
|
|
@@ -4990,8 +5007,8 @@ const Li = () => {
|
|
|
4990
5007
|
const r = (e || "").trim();
|
|
4991
5008
|
if (!(r.startsWith("{") || r.startsWith("[")))
|
|
4992
5009
|
return { ok: !1, errors: ee([{ path: "", message: "非 JSON 字符串输入,请使用 importCICAsync(pathOrUrl) 进行路径/URL 导入", keyword: "type", params: {} }]) };
|
|
4993
|
-
const
|
|
4994
|
-
return
|
|
5010
|
+
const y = Xt(r);
|
|
5011
|
+
return y.ok ? Ae(y.value, t) : { ok: !1, errors: y.errors };
|
|
4995
5012
|
}, Ki = async (e, t) => {
|
|
4996
5013
|
if (e && typeof e == "object")
|
|
4997
5014
|
return Ae(e, t);
|
|
@@ -5034,12 +5051,12 @@ const Li = () => {
|
|
|
5034
5051
|
if (!r || typeof r != "object")
|
|
5035
5052
|
return i.push({ path: "", message: "配置必须为对象", keyword: "type", params: { schema: "object" } }), { ok: !1, errors: ee(i) };
|
|
5036
5053
|
if (r.version || i.push({ path: "/version", message: "缺少必填字段:version", keyword: "required", params: { missingProperty: "version" } }), r.meta || i.push({ path: "/meta", message: "缺少必填字段:meta", keyword: "required", params: { missingProperty: "meta" } }), r.pages || i.push({ path: "/pages", message: "缺少必填字段:pages", keyword: "required", params: { missingProperty: "pages" } }), i.length) return { ok: !1, errors: ee(i) };
|
|
5037
|
-
const
|
|
5038
|
-
if (
|
|
5054
|
+
const y = Qn(r.meta, t?.meta);
|
|
5055
|
+
if (y.ok || i.push(...Pe("/meta", y.errors)), r.meta?.layout) {
|
|
5039
5056
|
const l = xn(r.meta.layout, t?.layout);
|
|
5040
5057
|
l.ok ? r.meta.layout = l.value : i.push(...Pe("/meta/layout", l.errors));
|
|
5041
5058
|
}
|
|
5042
|
-
if (
|
|
5059
|
+
if (y.ok && (r.meta = y.value), r.variables) {
|
|
5043
5060
|
const l = Zn(r.variables, t?.variables);
|
|
5044
5061
|
l.ok ? r.variables = l.value : i.push(...Pe("/variables", l.errors));
|
|
5045
5062
|
}
|
|
@@ -5109,32 +5126,32 @@ class ds {
|
|
|
5109
5126
|
}
|
|
5110
5127
|
findPageByComponent(t) {
|
|
5111
5128
|
let r;
|
|
5112
|
-
return this.walkComponents((i,
|
|
5129
|
+
return this.walkComponents((i, y) => i.id === t ? (r = y, !1) : !0), r;
|
|
5113
5130
|
}
|
|
5114
5131
|
getVariable(t, r) {
|
|
5115
5132
|
const i = this.config.variables;
|
|
5116
5133
|
if (i) {
|
|
5117
5134
|
if (t.componentId && i.component && i.component[t.componentId]) {
|
|
5118
|
-
const
|
|
5119
|
-
if (
|
|
5135
|
+
const y = i.component[t.componentId][r];
|
|
5136
|
+
if (y) return y.value ?? y.default;
|
|
5120
5137
|
}
|
|
5121
5138
|
if (t.pageId && i.page && i.page[t.pageId]) {
|
|
5122
|
-
const
|
|
5123
|
-
if (
|
|
5139
|
+
const y = i.page[t.pageId][r];
|
|
5140
|
+
if (y) return y.value ?? y.default;
|
|
5124
5141
|
}
|
|
5125
5142
|
if (i.global && i.global[r]) {
|
|
5126
|
-
const
|
|
5127
|
-
return
|
|
5143
|
+
const y = i.global[r];
|
|
5144
|
+
return y.value ?? y.default;
|
|
5128
5145
|
}
|
|
5129
5146
|
}
|
|
5130
5147
|
}
|
|
5131
5148
|
getVariableByRef(t) {
|
|
5132
5149
|
const r = t.match(/^(global|page|component)(?::([^\.]+))?\.(.+)$/);
|
|
5133
5150
|
if (!r) return;
|
|
5134
|
-
const [, i,
|
|
5151
|
+
const [, i, y, s] = r;
|
|
5135
5152
|
if (i === "global") return this.getVariable({}, s);
|
|
5136
|
-
if (i === "page") return this.getVariable({ pageId:
|
|
5137
|
-
if (i === "component") return this.getVariable({ componentId:
|
|
5153
|
+
if (i === "page") return this.getVariable({ pageId: y }, s);
|
|
5154
|
+
if (i === "component") return this.getVariable({ componentId: y }, s);
|
|
5138
5155
|
}
|
|
5139
5156
|
walkComponents(t) {
|
|
5140
5157
|
if (this.config.pages)
|
|
@@ -5142,18 +5159,18 @@ class ds {
|
|
|
5142
5159
|
const i = [];
|
|
5143
5160
|
for (const s of r.components || [])
|
|
5144
5161
|
i.push({ node: s });
|
|
5145
|
-
let
|
|
5146
|
-
for (; i.length > 0 && !
|
|
5162
|
+
let y = !1;
|
|
5163
|
+
for (; i.length > 0 && !y; ) {
|
|
5147
5164
|
const { node: s, parent: l } = i.pop();
|
|
5148
5165
|
if (t(s, r, l) === !1) {
|
|
5149
|
-
|
|
5166
|
+
y = !0;
|
|
5150
5167
|
break;
|
|
5151
5168
|
}
|
|
5152
5169
|
if (s.children && s.children.length > 0)
|
|
5153
5170
|
for (let f = s.children.length - 1; f >= 0; f--)
|
|
5154
5171
|
i.push({ node: s.children[f], parent: s });
|
|
5155
5172
|
}
|
|
5156
|
-
if (
|
|
5173
|
+
if (y) break;
|
|
5157
5174
|
}
|
|
5158
5175
|
}
|
|
5159
5176
|
/**
|
|
@@ -5161,12 +5178,12 @@ class ds {
|
|
|
5161
5178
|
*/
|
|
5162
5179
|
static getValueByPath(t, r, i) {
|
|
5163
5180
|
if (t == null || !r) return i;
|
|
5164
|
-
const
|
|
5181
|
+
const y = [];
|
|
5165
5182
|
r.replace(/\[(\d+)\]/g, ".$1").split(".").forEach((l) => {
|
|
5166
|
-
l.trim() &&
|
|
5183
|
+
l.trim() && y.push(l.trim());
|
|
5167
5184
|
});
|
|
5168
5185
|
let s = t;
|
|
5169
|
-
for (const l of
|
|
5186
|
+
for (const l of y) {
|
|
5170
5187
|
if (s == null) return i;
|
|
5171
5188
|
s = s[l];
|
|
5172
5189
|
}
|
|
@@ -5177,8 +5194,8 @@ class ds {
|
|
|
5177
5194
|
* 用于单独处理某个组件树片段
|
|
5178
5195
|
*/
|
|
5179
5196
|
static traverseTree(t, r, i) {
|
|
5180
|
-
const
|
|
5181
|
-
for (const s of
|
|
5197
|
+
const y = Array.isArray(t) ? t : [t];
|
|
5198
|
+
for (const s of y)
|
|
5182
5199
|
r(s, i) !== !1 && s.children && s.children.length > 0 && ds.traverseTree(s.children, r, s);
|
|
5183
5200
|
}
|
|
5184
5201
|
/** 创建 DataSource */
|