@bonsae/nrg 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/server/index.cjs +65 -33
- package/build/server/resources/nrg-client.js +344 -344
- package/build/vite/index.js +3 -1
- package/package.json +7 -1
- package/src/core/client/app.vue +1 -1
- package/src/core/client/components/node-red-json-schema-form.vue +2 -1
- package/src/core/client/components/node-red-typed-input.vue +6 -0
- package/src/core/client/index.ts +17 -25
- package/src/core/errors.ts +9 -0
- package/src/core/server/index.ts +19 -12
- package/src/core/server/nodes/node.ts +5 -1
- package/src/core/server/nodes/utils.ts +50 -27
- package/src/vite/client/build.ts +3 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){var s=document.createElement("style");s.textContent="[data-v-
|
|
1
|
+
(function(){var s=document.createElement("style");s.textContent="[data-v-df2dade4] .node-red-vue-input-error-message{color:var(--red-ui-text-color-error)}[data-v-df2dade4] .form-row input[type=text],[data-v-df2dade4] .form-row input[type=number],[data-v-df2dade4] .form-row input[type=password]{height:34px;padding:0 8px;box-sizing:border-box}.nrg-label[data-v-9ffd05ad]{display:inline-block;width:100%;cursor:default}.nrg-label i[data-v-9ffd05ad]{margin-right:5px}.nrg-required[data-v-9ffd05ad]{color:var(--red-ui-text-color-error);margin-left:2px}.editor-wrapper[data-v-4077a6c2]{position:relative}.expand-button[data-v-4077a6c2]{position:absolute;top:-23px;right:0;z-index:10;transition:color .3s ease;cursor:pointer}\n";document.head.appendChild(s);})();
|
|
2
2
|
import { defineComponent as Oe, resolveComponent as me, openBlock as Q, createElementBlock as re, Fragment as Ge, createElementVNode as le, createVNode as Ve, createCommentVNode as ue, normalizeClass as bs, renderSlot as Ce, createTextVNode as Es, toDisplayString as qe, createBlock as $e, withDirectives as Ss, vShow as Ps, renderList as mr, createApp as Ns } from "/nrg/assets/vue.esm-browser.prod.js";
|
|
3
3
|
function Os() {
|
|
4
4
|
}
|
|
@@ -14,7 +14,7 @@ function sr(e) {
|
|
|
14
14
|
function ar(e) {
|
|
15
15
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
16
16
|
}
|
|
17
|
-
const Fn = "[object RegExp]",
|
|
17
|
+
const Fn = "[object RegExp]", Un = "[object String]", Ln = "[object Number]", Kn = "[object Boolean]", or = "[object Arguments]", Hn = "[object Symbol]", Bn = "[object Date]", Gn = "[object Map]", Jn = "[object Set]", Wn = "[object Array]", js = "[object Function]", Yn = "[object ArrayBuffer]", zt = "[object Object]", ks = "[object Error]", Zn = "[object DataView]", Qn = "[object Uint8Array]", Xn = "[object Uint8ClampedArray]", xn = "[object Uint16Array]", es = "[object Uint32Array]", qs = "[object BigUint64Array]", ts = "[object Int8Array]", rs = "[object Int16Array]", ns = "[object Int32Array]", Ts = "[object BigInt64Array]", ss = "[object Float32Array]", as = "[object Float64Array]";
|
|
18
18
|
function ze(e, t, r, s = /* @__PURE__ */ new Map(), h = void 0) {
|
|
19
19
|
const o = h == null ? void 0 : h(e, t, r, s);
|
|
20
20
|
if (o !== void 0)
|
|
@@ -91,7 +91,7 @@ function ze(e, t, r, s = /* @__PURE__ */ new Map(), h = void 0) {
|
|
|
91
91
|
const a = new String(e.valueOf());
|
|
92
92
|
return s.set(e, a), Pe(a, e, r, s, h), a;
|
|
93
93
|
}
|
|
94
|
-
if (typeof e == "object" &&
|
|
94
|
+
if (typeof e == "object" && As(e)) {
|
|
95
95
|
const a = Object.create(Object.getPrototypeOf(e));
|
|
96
96
|
return s.set(e, a), Pe(a, e, r, s, h), a;
|
|
97
97
|
}
|
|
@@ -104,7 +104,7 @@ function Pe(e, t, r = e, s, h) {
|
|
|
104
104
|
(m == null || m.writable) && (e[i] = ze(t[i], i, r, s, h));
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function As(e) {
|
|
108
108
|
switch (ar(e)) {
|
|
109
109
|
case or:
|
|
110
110
|
case Wn:
|
|
@@ -118,11 +118,11 @@ function Ts(e) {
|
|
|
118
118
|
case rs:
|
|
119
119
|
case ns:
|
|
120
120
|
case Gn:
|
|
121
|
-
case
|
|
121
|
+
case Ln:
|
|
122
122
|
case zt:
|
|
123
123
|
case Fn:
|
|
124
124
|
case Jn:
|
|
125
|
-
case
|
|
125
|
+
case Un:
|
|
126
126
|
case Hn:
|
|
127
127
|
case Qn:
|
|
128
128
|
case Xn:
|
|
@@ -176,9 +176,9 @@ function Je(e, t, r, s) {
|
|
|
176
176
|
if (h === or && (h = zt), o === or && (o = zt), h !== o)
|
|
177
177
|
return !1;
|
|
178
178
|
switch (h) {
|
|
179
|
-
case
|
|
179
|
+
case Un:
|
|
180
180
|
return e.toString() === t.toString();
|
|
181
|
-
case
|
|
181
|
+
case Ln: {
|
|
182
182
|
const m = e.valueOf(), g = t.valueOf();
|
|
183
183
|
return Ms(m, g);
|
|
184
184
|
}
|
|
@@ -227,7 +227,7 @@ function Je(e, t, r, s) {
|
|
|
227
227
|
case ts:
|
|
228
228
|
case rs:
|
|
229
229
|
case ns:
|
|
230
|
-
case
|
|
230
|
+
case Ts:
|
|
231
231
|
case ss:
|
|
232
232
|
case as: {
|
|
233
233
|
if (typeof Buffer < "u" && Buffer.isBuffer(e) !== Buffer.isBuffer(t) || e.length !== t.length)
|
|
@@ -272,9 +272,9 @@ function Vs(e, t) {
|
|
|
272
272
|
function Ct(e) {
|
|
273
273
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
274
274
|
}
|
|
275
|
-
var
|
|
275
|
+
var Ue = {}, gr;
|
|
276
276
|
function Cs() {
|
|
277
|
-
if (gr) return
|
|
277
|
+
if (gr) return Ue;
|
|
278
278
|
gr = 1;
|
|
279
279
|
var e = /~/, t = /~[01]/g;
|
|
280
280
|
function r(g) {
|
|
@@ -336,10 +336,10 @@ function Cs() {
|
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
|
-
return
|
|
339
|
+
return Ue.get = a, Ue.set = i, Ue.compile = m, Ue;
|
|
340
340
|
}
|
|
341
341
|
var Fs = Cs();
|
|
342
|
-
const
|
|
342
|
+
const Us = /* @__PURE__ */ Ct(Fs);
|
|
343
343
|
var Qe = { exports: {} }, Bt = {}, we = {}, Ie = {}, Gt = {}, Jt = {}, Wt = {}, _r;
|
|
344
344
|
function We() {
|
|
345
345
|
return _r || (_r = 1, (function(e) {
|
|
@@ -639,12 +639,12 @@ function W() {
|
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
641
|
class a extends o {
|
|
642
|
-
constructor(l, E,
|
|
643
|
-
super(), this.varKind = l, this.name = E, this.rhs =
|
|
642
|
+
constructor(l, E, T) {
|
|
643
|
+
super(), this.varKind = l, this.name = E, this.rhs = T;
|
|
644
644
|
}
|
|
645
645
|
render({ es5: l, _n: E }) {
|
|
646
|
-
const
|
|
647
|
-
return `${
|
|
646
|
+
const T = l ? r.varKinds.var : this.varKind, F = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
|
|
647
|
+
return `${T} ${this.name}${F};` + E;
|
|
648
648
|
}
|
|
649
649
|
optimizeNames(l, E) {
|
|
650
650
|
if (l[this.name.str])
|
|
@@ -655,8 +655,8 @@ function W() {
|
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
657
|
class i extends o {
|
|
658
|
-
constructor(l, E,
|
|
659
|
-
super(), this.lhs = l, this.rhs = E, this.sideEffects =
|
|
658
|
+
constructor(l, E, T) {
|
|
659
|
+
super(), this.lhs = l, this.rhs = E, this.sideEffects = T;
|
|
660
660
|
}
|
|
661
661
|
render({ _n: l }) {
|
|
662
662
|
return `${this.lhs} = ${this.rhs};` + l;
|
|
@@ -671,8 +671,8 @@ function W() {
|
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
673
|
class m extends i {
|
|
674
|
-
constructor(l, E,
|
|
675
|
-
super(l,
|
|
674
|
+
constructor(l, E, T, F) {
|
|
675
|
+
super(l, T, F), this.op = E;
|
|
676
676
|
}
|
|
677
677
|
render({ _n: l }) {
|
|
678
678
|
return `${this.lhs} ${this.op}= ${this.rhs};` + l;
|
|
@@ -727,28 +727,28 @@ function W() {
|
|
|
727
727
|
super(), this.nodes = l;
|
|
728
728
|
}
|
|
729
729
|
render(l) {
|
|
730
|
-
return this.nodes.reduce((E,
|
|
730
|
+
return this.nodes.reduce((E, T) => E + T.render(l), "");
|
|
731
731
|
}
|
|
732
732
|
optimizeNodes() {
|
|
733
733
|
const { nodes: l } = this;
|
|
734
734
|
let E = l.length;
|
|
735
735
|
for (; E--; ) {
|
|
736
|
-
const
|
|
737
|
-
Array.isArray(
|
|
736
|
+
const T = l[E].optimizeNodes();
|
|
737
|
+
Array.isArray(T) ? l.splice(E, 1, ...T) : T ? l[E] = T : l.splice(E, 1);
|
|
738
738
|
}
|
|
739
739
|
return l.length > 0 ? this : void 0;
|
|
740
740
|
}
|
|
741
741
|
optimizeNames(l, E) {
|
|
742
|
-
const { nodes:
|
|
743
|
-
let F =
|
|
742
|
+
const { nodes: T } = this;
|
|
743
|
+
let F = T.length;
|
|
744
744
|
for (; F--; ) {
|
|
745
|
-
const V =
|
|
746
|
-
V.optimizeNames(l, E) || (x(l, V.names),
|
|
745
|
+
const V = T[F];
|
|
746
|
+
V.optimizeNames(l, E) || (x(l, V.names), T.splice(F, 1));
|
|
747
747
|
}
|
|
748
|
-
return
|
|
748
|
+
return T.length > 0 ? this : void 0;
|
|
749
749
|
}
|
|
750
750
|
get names() {
|
|
751
|
-
return this.nodes.reduce((l, E) =>
|
|
751
|
+
return this.nodes.reduce((l, E) => U(l, E.names), {});
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
class b extends v {
|
|
@@ -776,8 +776,8 @@ function W() {
|
|
|
776
776
|
return this.nodes;
|
|
777
777
|
let E = this.else;
|
|
778
778
|
if (E) {
|
|
779
|
-
const
|
|
780
|
-
E = this.else = Array.isArray(
|
|
779
|
+
const T = E.optimizeNodes();
|
|
780
|
+
E = this.else = Array.isArray(T) ? new f(T) : T;
|
|
781
781
|
}
|
|
782
782
|
if (E)
|
|
783
783
|
return l === !1 ? E instanceof p ? E : E.nodes : this.nodes.length ? this : new p(ne(l), E instanceof p ? [E] : E.nodes);
|
|
@@ -785,13 +785,13 @@ function W() {
|
|
|
785
785
|
return this;
|
|
786
786
|
}
|
|
787
787
|
optimizeNames(l, E) {
|
|
788
|
-
var
|
|
789
|
-
if (this.else = (
|
|
788
|
+
var T;
|
|
789
|
+
if (this.else = (T = this.else) === null || T === void 0 ? void 0 : T.optimizeNames(l, E), !!(super.optimizeNames(l, E) || this.else))
|
|
790
790
|
return this.condition = H(this.condition, l, E), this;
|
|
791
791
|
}
|
|
792
792
|
get names() {
|
|
793
793
|
const l = super.names;
|
|
794
|
-
return K(l, this.condition), this.else &&
|
|
794
|
+
return K(l, this.condition), this.else && U(l, this.else.names), l;
|
|
795
795
|
}
|
|
796
796
|
}
|
|
797
797
|
p.kind = "if";
|
|
@@ -810,16 +810,16 @@ function W() {
|
|
|
810
810
|
return this.iteration = H(this.iteration, l, E), this;
|
|
811
811
|
}
|
|
812
812
|
get names() {
|
|
813
|
-
return
|
|
813
|
+
return U(super.names, this.iteration.names);
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
816
|
class w extends n {
|
|
817
|
-
constructor(l, E,
|
|
818
|
-
super(), this.varKind = l, this.name = E, this.from =
|
|
817
|
+
constructor(l, E, T, F) {
|
|
818
|
+
super(), this.varKind = l, this.name = E, this.from = T, this.to = F;
|
|
819
819
|
}
|
|
820
820
|
render(l) {
|
|
821
|
-
const E = l.es5 ? r.varKinds.var : this.varKind, { name:
|
|
822
|
-
return `for(${E} ${
|
|
821
|
+
const E = l.es5 ? r.varKinds.var : this.varKind, { name: T, from: F, to: V } = this;
|
|
822
|
+
return `for(${E} ${T}=${F}; ${T}<${V}; ${T}++)` + super.render(l);
|
|
823
823
|
}
|
|
824
824
|
get names() {
|
|
825
825
|
const l = K(super.names, this.from);
|
|
@@ -827,8 +827,8 @@ function W() {
|
|
|
827
827
|
}
|
|
828
828
|
}
|
|
829
829
|
class u extends n {
|
|
830
|
-
constructor(l, E,
|
|
831
|
-
super(), this.loop = l, this.varKind = E, this.name =
|
|
830
|
+
constructor(l, E, T, F) {
|
|
831
|
+
super(), this.loop = l, this.varKind = E, this.name = T, this.iterable = F;
|
|
832
832
|
}
|
|
833
833
|
render(l) {
|
|
834
834
|
return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(l);
|
|
@@ -838,12 +838,12 @@ function W() {
|
|
|
838
838
|
return this.iterable = H(this.iterable, l, E), this;
|
|
839
839
|
}
|
|
840
840
|
get names() {
|
|
841
|
-
return
|
|
841
|
+
return U(super.names, this.iterable.names);
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
844
|
class _ extends b {
|
|
845
|
-
constructor(l, E,
|
|
846
|
-
super(), this.name = l, this.args = E, this.async =
|
|
845
|
+
constructor(l, E, T) {
|
|
846
|
+
super(), this.name = l, this.args = E, this.async = T;
|
|
847
847
|
}
|
|
848
848
|
render(l) {
|
|
849
849
|
return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(l);
|
|
@@ -866,12 +866,12 @@ function W() {
|
|
|
866
866
|
return super.optimizeNodes(), (l = this.catch) === null || l === void 0 || l.optimizeNodes(), (E = this.finally) === null || E === void 0 || E.optimizeNodes(), this;
|
|
867
867
|
}
|
|
868
868
|
optimizeNames(l, E) {
|
|
869
|
-
var
|
|
870
|
-
return super.optimizeNames(l, E), (
|
|
869
|
+
var T, F;
|
|
870
|
+
return super.optimizeNames(l, E), (T = this.catch) === null || T === void 0 || T.optimizeNames(l, E), (F = this.finally) === null || F === void 0 || F.optimizeNames(l, E), this;
|
|
871
871
|
}
|
|
872
872
|
get names() {
|
|
873
873
|
const l = super.names;
|
|
874
|
-
return this.catch &&
|
|
874
|
+
return this.catch && U(l, this.catch.names), this.finally && U(l, this.finally.names), l;
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
877
|
class M extends b {
|
|
@@ -883,13 +883,13 @@ function W() {
|
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
885
|
M.kind = "catch";
|
|
886
|
-
class
|
|
886
|
+
class L extends b {
|
|
887
887
|
render(l) {
|
|
888
888
|
return "finally" + super.render(l);
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
|
-
|
|
892
|
-
class
|
|
891
|
+
L.kind = "finally";
|
|
892
|
+
class A {
|
|
893
893
|
constructor(l, E = {}) {
|
|
894
894
|
this._values = {}, this._blockStarts = [], this._constants = {}, this.opts = { ...E, _n: E.lines ? `
|
|
895
895
|
` : "" }, this._extScope = l, this._scope = new r.Scope({ parent: l }), this._nodes = [new S()];
|
|
@@ -907,8 +907,8 @@ function W() {
|
|
|
907
907
|
}
|
|
908
908
|
// reserves unique name in the external scope and assigns value to it
|
|
909
909
|
scopeValue(l, E) {
|
|
910
|
-
const
|
|
911
|
-
return (this._values[
|
|
910
|
+
const T = this._extScope.value(l, E);
|
|
911
|
+
return (this._values[T.prefix] || (this._values[T.prefix] = /* @__PURE__ */ new Set())).add(T), T;
|
|
912
912
|
}
|
|
913
913
|
getScopeValue(l, E) {
|
|
914
914
|
return this._extScope.getValue(l, E);
|
|
@@ -921,25 +921,25 @@ function W() {
|
|
|
921
921
|
scopeCode() {
|
|
922
922
|
return this._extScope.scopeCode(this._values);
|
|
923
923
|
}
|
|
924
|
-
_def(l, E,
|
|
924
|
+
_def(l, E, T, F) {
|
|
925
925
|
const V = this._scope.toName(E);
|
|
926
|
-
return
|
|
926
|
+
return T !== void 0 && F && (this._constants[V.str] = T), this._leafNode(new a(l, V, T)), V;
|
|
927
927
|
}
|
|
928
928
|
// `const` declaration (`var` in es5 mode)
|
|
929
|
-
const(l, E,
|
|
930
|
-
return this._def(r.varKinds.const, l, E,
|
|
929
|
+
const(l, E, T) {
|
|
930
|
+
return this._def(r.varKinds.const, l, E, T);
|
|
931
931
|
}
|
|
932
932
|
// `let` declaration with optional assignment (`var` in es5 mode)
|
|
933
|
-
let(l, E,
|
|
934
|
-
return this._def(r.varKinds.let, l, E,
|
|
933
|
+
let(l, E, T) {
|
|
934
|
+
return this._def(r.varKinds.let, l, E, T);
|
|
935
935
|
}
|
|
936
936
|
// `var` declaration with optional assignment
|
|
937
|
-
var(l, E,
|
|
938
|
-
return this._def(r.varKinds.var, l, E,
|
|
937
|
+
var(l, E, T) {
|
|
938
|
+
return this._def(r.varKinds.var, l, E, T);
|
|
939
939
|
}
|
|
940
940
|
// assignment code
|
|
941
|
-
assign(l, E,
|
|
942
|
-
return this._leafNode(new i(l, E,
|
|
941
|
+
assign(l, E, T) {
|
|
942
|
+
return this._leafNode(new i(l, E, T));
|
|
943
943
|
}
|
|
944
944
|
// `+=` code
|
|
945
945
|
add(l, E) {
|
|
@@ -952,17 +952,17 @@ function W() {
|
|
|
952
952
|
// returns code for object literal for the passed argument list of key-value pairs
|
|
953
953
|
object(...l) {
|
|
954
954
|
const E = ["{"];
|
|
955
|
-
for (const [
|
|
956
|
-
E.length > 1 && E.push(","), E.push(
|
|
955
|
+
for (const [T, F] of l)
|
|
956
|
+
E.length > 1 && E.push(","), E.push(T), (T !== F || this.opts.es5) && (E.push(":"), (0, t.addCodeArg)(E, F));
|
|
957
957
|
return E.push("}"), new t._Code(E);
|
|
958
958
|
}
|
|
959
959
|
// `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
|
|
960
|
-
if(l, E,
|
|
961
|
-
if (this._blockNode(new p(l)), E &&
|
|
962
|
-
this.code(E).else().code(
|
|
960
|
+
if(l, E, T) {
|
|
961
|
+
if (this._blockNode(new p(l)), E && T)
|
|
962
|
+
this.code(E).else().code(T).endIf();
|
|
963
963
|
else if (E)
|
|
964
964
|
this.code(E).endIf();
|
|
965
|
-
else if (
|
|
965
|
+
else if (T)
|
|
966
966
|
throw new Error('CodeGen: "else" body without "then" body');
|
|
967
967
|
return this;
|
|
968
968
|
}
|
|
@@ -986,28 +986,28 @@ function W() {
|
|
|
986
986
|
return this._for(new d(l), E);
|
|
987
987
|
}
|
|
988
988
|
// `for` statement for a range of values
|
|
989
|
-
forRange(l, E,
|
|
989
|
+
forRange(l, E, T, F, V = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
|
|
990
990
|
const B = this._scope.toName(l);
|
|
991
|
-
return this._for(new w(V, B, E,
|
|
991
|
+
return this._for(new w(V, B, E, T), () => F(B));
|
|
992
992
|
}
|
|
993
993
|
// `for-of` statement (in es5 mode replace with a normal for loop)
|
|
994
|
-
forOf(l, E,
|
|
994
|
+
forOf(l, E, T, F = r.varKinds.const) {
|
|
995
995
|
const V = this._scope.toName(l);
|
|
996
996
|
if (this.opts.es5) {
|
|
997
997
|
const B = E instanceof t.Name ? E : this.var("_arr", E);
|
|
998
998
|
return this.forRange("_i", 0, (0, t._)`${B}.length`, (J) => {
|
|
999
|
-
this.var(V, (0, t._)`${B}[${J}]`),
|
|
999
|
+
this.var(V, (0, t._)`${B}[${J}]`), T(V);
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
|
-
return this._for(new u("of", F, V, E), () =>
|
|
1002
|
+
return this._for(new u("of", F, V, E), () => T(V));
|
|
1003
1003
|
}
|
|
1004
1004
|
// `for-in` statement.
|
|
1005
1005
|
// With option `ownProperties` replaced with a `for-of` loop for object keys
|
|
1006
|
-
forIn(l, E,
|
|
1006
|
+
forIn(l, E, T, F = this.opts.es5 ? r.varKinds.var : r.varKinds.const) {
|
|
1007
1007
|
if (this.opts.ownProperties)
|
|
1008
|
-
return this.forOf(l, (0, t._)`Object.keys(${E})`,
|
|
1008
|
+
return this.forOf(l, (0, t._)`Object.keys(${E})`, T);
|
|
1009
1009
|
const V = this._scope.toName(l);
|
|
1010
|
-
return this._for(new u("in", F, V, E), () =>
|
|
1010
|
+
return this._for(new u("in", F, V, E), () => T(V));
|
|
1011
1011
|
}
|
|
1012
1012
|
// end `for` loop
|
|
1013
1013
|
endFor() {
|
|
@@ -1029,15 +1029,15 @@ function W() {
|
|
|
1029
1029
|
return this._endBlockNode(P);
|
|
1030
1030
|
}
|
|
1031
1031
|
// `try` statement
|
|
1032
|
-
try(l, E,
|
|
1033
|
-
if (!E && !
|
|
1032
|
+
try(l, E, T) {
|
|
1033
|
+
if (!E && !T)
|
|
1034
1034
|
throw new Error('CodeGen: "try" without "catch" and "finally"');
|
|
1035
1035
|
const F = new q();
|
|
1036
1036
|
if (this._blockNode(F), this.code(l), E) {
|
|
1037
1037
|
const V = this.name("e");
|
|
1038
1038
|
this._currNode = F.catch = new M(V), E(V);
|
|
1039
1039
|
}
|
|
1040
|
-
return
|
|
1040
|
+
return T && (this._currNode = F.finally = new L(), this.code(T)), this._endBlockNode(M, L);
|
|
1041
1041
|
}
|
|
1042
1042
|
// `throw` statement
|
|
1043
1043
|
throw(l) {
|
|
@@ -1052,14 +1052,14 @@ function W() {
|
|
|
1052
1052
|
const E = this._blockStarts.pop();
|
|
1053
1053
|
if (E === void 0)
|
|
1054
1054
|
throw new Error("CodeGen: not in self-balancing block");
|
|
1055
|
-
const
|
|
1056
|
-
if (
|
|
1057
|
-
throw new Error(`CodeGen: wrong number of nodes: ${
|
|
1055
|
+
const T = this._nodes.length - E;
|
|
1056
|
+
if (T < 0 || l !== void 0 && T !== l)
|
|
1057
|
+
throw new Error(`CodeGen: wrong number of nodes: ${T} vs ${l} expected`);
|
|
1058
1058
|
return this._nodes.length = E, this;
|
|
1059
1059
|
}
|
|
1060
1060
|
// `function` heading (or definition if funcBody is passed)
|
|
1061
|
-
func(l, E = t.nil,
|
|
1062
|
-
return this._blockNode(new _(l, E,
|
|
1061
|
+
func(l, E = t.nil, T, F) {
|
|
1062
|
+
return this._blockNode(new _(l, E, T)), F && this.code(F).endFunc(), this;
|
|
1063
1063
|
}
|
|
1064
1064
|
// end function definition
|
|
1065
1065
|
endFunc() {
|
|
@@ -1076,8 +1076,8 @@ function W() {
|
|
|
1076
1076
|
this._currNode.nodes.push(l), this._nodes.push(l);
|
|
1077
1077
|
}
|
|
1078
1078
|
_endBlockNode(l, E) {
|
|
1079
|
-
const
|
|
1080
|
-
if (
|
|
1079
|
+
const T = this._currNode;
|
|
1080
|
+
if (T instanceof l || E && T instanceof E)
|
|
1081
1081
|
return this._nodes.pop(), this;
|
|
1082
1082
|
throw new Error(`CodeGen: not in block "${E ? `${l.kind}/${E.kind}` : l.kind}"`);
|
|
1083
1083
|
}
|
|
@@ -1099,22 +1099,22 @@ function W() {
|
|
|
1099
1099
|
E[E.length - 1] = l;
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
1102
|
-
e.CodeGen =
|
|
1103
|
-
function
|
|
1102
|
+
e.CodeGen = A;
|
|
1103
|
+
function U(O, l) {
|
|
1104
1104
|
for (const E in l)
|
|
1105
1105
|
O[E] = (O[E] || 0) + (l[E] || 0);
|
|
1106
1106
|
return O;
|
|
1107
1107
|
}
|
|
1108
1108
|
function K(O, l) {
|
|
1109
|
-
return l instanceof t._CodeOrName ?
|
|
1109
|
+
return l instanceof t._CodeOrName ? U(O, l.names) : O;
|
|
1110
1110
|
}
|
|
1111
1111
|
function H(O, l, E) {
|
|
1112
1112
|
if (O instanceof t.Name)
|
|
1113
|
-
return
|
|
1113
|
+
return T(O);
|
|
1114
1114
|
if (!F(O))
|
|
1115
1115
|
return O;
|
|
1116
|
-
return new t._Code(O._items.reduce((V, B) => (B instanceof t.Name && (B =
|
|
1117
|
-
function
|
|
1116
|
+
return new t._Code(O._items.reduce((V, B) => (B instanceof t.Name && (B = T(B)), B instanceof t._Code ? V.push(...B._items) : V.push(B), V), []));
|
|
1117
|
+
function T(V) {
|
|
1118
1118
|
const B = E[V.str];
|
|
1119
1119
|
return B === void 0 || l[V.str] !== 1 ? V : (delete l[V.str], B);
|
|
1120
1120
|
}
|
|
@@ -1169,8 +1169,8 @@ function X() {
|
|
|
1169
1169
|
if (!P.strictSchema || typeof _ == "boolean")
|
|
1170
1170
|
return;
|
|
1171
1171
|
const M = q.RULES.keywords;
|
|
1172
|
-
for (const
|
|
1173
|
-
M[
|
|
1172
|
+
for (const L in _)
|
|
1173
|
+
M[L] || w(u, `unknown keyword: "${L}"`);
|
|
1174
1174
|
}
|
|
1175
1175
|
Y.checkUnknownRules = h;
|
|
1176
1176
|
function o(u, _) {
|
|
@@ -1226,9 +1226,9 @@ function X() {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
Y.eachItem = c;
|
|
1228
1228
|
function v({ mergeNames: u, mergeToName: _, mergeValues: P, resultToName: q }) {
|
|
1229
|
-
return (M,
|
|
1230
|
-
const K =
|
|
1231
|
-
return
|
|
1229
|
+
return (M, L, A, U) => {
|
|
1230
|
+
const K = A === void 0 ? L : A instanceof e.Name ? (L instanceof e.Name ? u(M, L, A) : _(M, L, A), A) : L instanceof e.Name ? (_(M, A, L), L) : P(L, A);
|
|
1231
|
+
return U === e.Name && !(K instanceof e.Name) ? q(M, K) : K;
|
|
1232
1232
|
};
|
|
1233
1233
|
}
|
|
1234
1234
|
Y.mergeEvaluated = {
|
|
@@ -1395,13 +1395,13 @@ function Ye() {
|
|
|
1395
1395
|
return n && (w = (0, t.str)`${w}${(0, r.getErrorPath)(n, r.Type.Str)}`), [y.schemaPath, w];
|
|
1396
1396
|
}
|
|
1397
1397
|
function S(f, { params: p, message: n }, d) {
|
|
1398
|
-
const { keyword: w, data: u, schemaValue: _, it: P } = f, { opts: q, propertyName: M, topSchemaRef:
|
|
1399
|
-
d.push([y.keyword, w], [y.params, typeof p == "function" ? p(f) : p || (0, t._)`{}`]), q.messages && d.push([y.message, typeof n == "function" ? n(f) : n]), q.verbose && d.push([y.schema, _], [y.parentSchema, (0, t._)`${
|
|
1398
|
+
const { keyword: w, data: u, schemaValue: _, it: P } = f, { opts: q, propertyName: M, topSchemaRef: L, schemaPath: A } = P;
|
|
1399
|
+
d.push([y.keyword, w], [y.params, typeof p == "function" ? p(f) : p || (0, t._)`{}`]), q.messages && d.push([y.message, typeof n == "function" ? n(f) : n]), q.verbose && d.push([y.schema, _], [y.parentSchema, (0, t._)`${L}${A}`], [s.default.data, u]), M && d.push([y.propertyName, M]);
|
|
1400
1400
|
}
|
|
1401
1401
|
})(Gt)), Gt;
|
|
1402
1402
|
}
|
|
1403
1403
|
var Pr;
|
|
1404
|
-
function
|
|
1404
|
+
function Ls() {
|
|
1405
1405
|
if (Pr) return Ie;
|
|
1406
1406
|
Pr = 1, Object.defineProperty(Ie, "__esModule", { value: !0 }), Ie.boolOrEmptySchema = Ie.topBoolOrEmptySchema = void 0;
|
|
1407
1407
|
const e = /* @__PURE__ */ Ye(), t = /* @__PURE__ */ W(), r = /* @__PURE__ */ Se(), s = {
|
|
@@ -1524,13 +1524,13 @@ function Vt() {
|
|
|
1524
1524
|
function N(n, d, w) {
|
|
1525
1525
|
const { gen: u, data: _, opts: P } = n, q = u.let("dataType", (0, s._)`typeof ${_}`), M = u.let("coerced", (0, s._)`undefined`);
|
|
1526
1526
|
P.coerceTypes === "array" && u.if((0, s._)`${q} == 'object' && Array.isArray(${_}) && ${_}.length == 1`, () => u.assign(_, (0, s._)`${_}[0]`).assign(q, (0, s._)`typeof ${_}`).if(b(d, _, P.strictNumbers), () => u.assign(M, _))), u.if((0, s._)`${M} !== undefined`);
|
|
1527
|
-
for (const
|
|
1528
|
-
(g.has(
|
|
1527
|
+
for (const A of w)
|
|
1528
|
+
(g.has(A) || A === "array" && P.coerceTypes === "array") && L(A);
|
|
1529
1529
|
u.else(), f(n), u.endIf(), u.if((0, s._)`${M} !== undefined`, () => {
|
|
1530
1530
|
u.assign(_, M), c(n, M);
|
|
1531
1531
|
});
|
|
1532
|
-
function
|
|
1533
|
-
switch (
|
|
1532
|
+
function L(A) {
|
|
1533
|
+
switch (A) {
|
|
1534
1534
|
case "string":
|
|
1535
1535
|
u.elseIf((0, s._)`${q} == "number" || ${q} == "boolean"`).assign(M, (0, s._)`"" + ${_}`).elseIf((0, s._)`${_} === null`).assign(M, (0, s._)`""`);
|
|
1536
1536
|
return;
|
|
@@ -1625,10 +1625,10 @@ function Vt() {
|
|
|
1625
1625
|
}
|
|
1626
1626
|
return ie;
|
|
1627
1627
|
}
|
|
1628
|
-
var
|
|
1628
|
+
var Le = {}, Ir;
|
|
1629
1629
|
function Ks() {
|
|
1630
|
-
if (Ir) return
|
|
1631
|
-
Ir = 1, Object.defineProperty(
|
|
1630
|
+
if (Ir) return Le;
|
|
1631
|
+
Ir = 1, Object.defineProperty(Le, "__esModule", { value: !0 }), Le.assignDefaults = void 0;
|
|
1632
1632
|
const e = /* @__PURE__ */ W(), t = /* @__PURE__ */ X();
|
|
1633
1633
|
function r(h, o) {
|
|
1634
1634
|
const { properties: a, items: i } = h.schema;
|
|
@@ -1637,7 +1637,7 @@ function Ks() {
|
|
|
1637
1637
|
s(h, m, a[m].default);
|
|
1638
1638
|
else o === "array" && Array.isArray(i) && i.forEach((m, g) => s(h, g, m.default));
|
|
1639
1639
|
}
|
|
1640
|
-
|
|
1640
|
+
Le.assignDefaults = r;
|
|
1641
1641
|
function s(h, o, a) {
|
|
1642
1642
|
const { gen: i, compositeRule: m, data: g, opts: y } = h;
|
|
1643
1643
|
if (a === void 0)
|
|
@@ -1650,7 +1650,7 @@ function Ks() {
|
|
|
1650
1650
|
let c = (0, e._)`${N} === undefined`;
|
|
1651
1651
|
y.useDefaults === "empty" && (c = (0, e._)`${c} || ${N} === null || ${N} === ""`), i.if(c, (0, e._)`${N} = ${(0, e.stringify)(a)}`);
|
|
1652
1652
|
}
|
|
1653
|
-
return
|
|
1653
|
+
return Le;
|
|
1654
1654
|
}
|
|
1655
1655
|
var _e = {}, te = {}, jr;
|
|
1656
1656
|
function ve() {
|
|
@@ -1702,16 +1702,16 @@ function ve() {
|
|
|
1702
1702
|
return N(d).filter((w) => !(0, t.alwaysValidSchema)(n, d[w]));
|
|
1703
1703
|
}
|
|
1704
1704
|
te.schemaProperties = c;
|
|
1705
|
-
function v({ schemaCode: n, data: d, it: { gen: w, topSchemaRef: u, schemaPath: _, errorPath: P }, it: q }, M,
|
|
1706
|
-
const
|
|
1705
|
+
function v({ schemaCode: n, data: d, it: { gen: w, topSchemaRef: u, schemaPath: _, errorPath: P }, it: q }, M, L, A) {
|
|
1706
|
+
const U = A ? (0, e._)`${n}, ${d}, ${u}${_}` : d, K = [
|
|
1707
1707
|
[r.default.instancePath, (0, e.strConcat)(r.default.instancePath, P)],
|
|
1708
1708
|
[r.default.parentData, q.parentData],
|
|
1709
1709
|
[r.default.parentDataProperty, q.parentDataProperty],
|
|
1710
1710
|
[r.default.rootData, r.default.rootData]
|
|
1711
1711
|
];
|
|
1712
1712
|
q.opts.dynamicRef && K.push([r.default.dynamicAnchors, r.default.dynamicAnchors]);
|
|
1713
|
-
const H = (0, e._)`${
|
|
1714
|
-
return
|
|
1713
|
+
const H = (0, e._)`${U}, ${w.object(...K)}`;
|
|
1714
|
+
return L !== e.nil ? (0, e._)`${M}.call(${L}, ${H})` : (0, e._)`${M}(${H})`;
|
|
1715
1715
|
}
|
|
1716
1716
|
te.callValidateCode = v;
|
|
1717
1717
|
const b = (0, e._)`new RegExp`;
|
|
@@ -1732,11 +1732,11 @@ function ve() {
|
|
|
1732
1732
|
}
|
|
1733
1733
|
return d.var(P, !0), q(() => d.break()), P;
|
|
1734
1734
|
function q(M) {
|
|
1735
|
-
const
|
|
1736
|
-
d.forRange("i", 0,
|
|
1735
|
+
const L = d.const("len", (0, e._)`${w}.length`);
|
|
1736
|
+
d.forRange("i", 0, L, (A) => {
|
|
1737
1737
|
n.subschema({
|
|
1738
1738
|
keyword: u,
|
|
1739
|
-
dataProp:
|
|
1739
|
+
dataProp: A,
|
|
1740
1740
|
dataPropType: t.Type.Num
|
|
1741
1741
|
}, P), d.if((0, e.not)(P), M);
|
|
1742
1742
|
});
|
|
@@ -1747,16 +1747,16 @@ function ve() {
|
|
|
1747
1747
|
const { gen: d, schema: w, keyword: u, it: _ } = n;
|
|
1748
1748
|
if (!Array.isArray(w))
|
|
1749
1749
|
throw new Error("ajv implementation error");
|
|
1750
|
-
if (w.some((
|
|
1750
|
+
if (w.some((L) => (0, t.alwaysValidSchema)(_, L)) && !_.opts.unevaluated)
|
|
1751
1751
|
return;
|
|
1752
1752
|
const q = d.let("valid", !1), M = d.name("_valid");
|
|
1753
|
-
d.block(() => w.forEach((
|
|
1754
|
-
const
|
|
1753
|
+
d.block(() => w.forEach((L, A) => {
|
|
1754
|
+
const U = n.subschema({
|
|
1755
1755
|
keyword: u,
|
|
1756
|
-
schemaProp:
|
|
1756
|
+
schemaProp: A,
|
|
1757
1757
|
compositeRule: !0
|
|
1758
1758
|
}, M);
|
|
1759
|
-
d.assign(q, (0, e._)`${q} || ${M}`), n.mergeValidEvaluated(
|
|
1759
|
+
d.assign(q, (0, e._)`${q} || ${M}`), n.mergeValidEvaluated(U, M) || d.if((0, e.not)(q));
|
|
1760
1760
|
})), n.result(q, () => n.reset(), () => n.error(!0));
|
|
1761
1761
|
}
|
|
1762
1762
|
return te.validateUnion = p, te;
|
|
@@ -1787,25 +1787,25 @@ function Hs() {
|
|
|
1787
1787
|
c.block$data(P, q), c.ok((b = v.valid) !== null && b !== void 0 ? b : P);
|
|
1788
1788
|
function q() {
|
|
1789
1789
|
if (v.errors === !1)
|
|
1790
|
-
|
|
1790
|
+
A(), v.modifying && a(c), U(() => c.error());
|
|
1791
1791
|
else {
|
|
1792
|
-
const K = v.async ? M() :
|
|
1793
|
-
v.modifying && a(c),
|
|
1792
|
+
const K = v.async ? M() : L();
|
|
1793
|
+
v.modifying && a(c), U(() => i(c, K));
|
|
1794
1794
|
}
|
|
1795
1795
|
}
|
|
1796
1796
|
function M() {
|
|
1797
1797
|
const K = S.let("ruleErrs", null);
|
|
1798
|
-
return S.try(() =>
|
|
1798
|
+
return S.try(() => A((0, e._)`await `), (H) => S.assign(P, !1).if((0, e._)`${H} instanceof ${w.ValidationError}`, () => S.assign(K, (0, e._)`${H}.errors`), () => S.throw(H))), K;
|
|
1799
1799
|
}
|
|
1800
|
-
function
|
|
1800
|
+
function L() {
|
|
1801
1801
|
const K = (0, e._)`${_}.errors`;
|
|
1802
|
-
return S.assign(K, null),
|
|
1802
|
+
return S.assign(K, null), A(e.nil), K;
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1804
|
+
function A(K = v.async ? (0, e._)`await ` : e.nil) {
|
|
1805
1805
|
const H = w.opts.passContext ? t.default.this : t.default.self, x = !("compile" in v && !d || v.schema === !1);
|
|
1806
1806
|
S.assign(P, (0, e._)`${K}${(0, r.callValidateCode)(c, _, H, x)}`, v.modifying);
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function U(K) {
|
|
1809
1809
|
var H;
|
|
1810
1810
|
S.if((0, e.not)((H = v.valid) !== null && H !== void 0 ? H : P), K);
|
|
1811
1811
|
}
|
|
@@ -1906,9 +1906,9 @@ function Bs() {
|
|
|
1906
1906
|
}
|
|
1907
1907
|
return Ee.extendSubschemaMode = h, Ee;
|
|
1908
1908
|
}
|
|
1909
|
-
var de = {}, Zt,
|
|
1909
|
+
var de = {}, Zt, Tr;
|
|
1910
1910
|
function us() {
|
|
1911
|
-
return
|
|
1911
|
+
return Tr || (Tr = 1, Zt = function e(t, r) {
|
|
1912
1912
|
if (t === r) return !0;
|
|
1913
1913
|
if (t && r && typeof t == "object" && typeof r == "object") {
|
|
1914
1914
|
if (t.constructor !== r.constructor) return !1;
|
|
@@ -1934,10 +1934,10 @@ function us() {
|
|
|
1934
1934
|
return t !== t && r !== r;
|
|
1935
1935
|
}), Zt;
|
|
1936
1936
|
}
|
|
1937
|
-
var Qt = { exports: {} },
|
|
1937
|
+
var Qt = { exports: {} }, Ar;
|
|
1938
1938
|
function Gs() {
|
|
1939
|
-
if (
|
|
1940
|
-
|
|
1939
|
+
if (Ar) return Qt.exports;
|
|
1940
|
+
Ar = 1;
|
|
1941
1941
|
var e = Qt.exports = function(s, h, o) {
|
|
1942
1942
|
typeof h == "function" && (o = h, h = {}), o = h.cb || o;
|
|
1943
1943
|
var a = typeof o == "function" ? o : o.pre || function() {
|
|
@@ -2086,19 +2086,19 @@ function Ft() {
|
|
|
2086
2086
|
if (typeof S == "boolean")
|
|
2087
2087
|
return {};
|
|
2088
2088
|
const { schemaId: p, uriResolver: n } = this.opts, d = N(S[p] || f), w = { "": d }, u = m(n, d, !1), _ = {}, P = /* @__PURE__ */ new Set();
|
|
2089
|
-
return r(S, { allKeys: !0 }, (
|
|
2089
|
+
return r(S, { allKeys: !0 }, (L, A, U, K) => {
|
|
2090
2090
|
if (K === void 0)
|
|
2091
2091
|
return;
|
|
2092
|
-
const H = u +
|
|
2092
|
+
const H = u + A;
|
|
2093
2093
|
let x = w[K];
|
|
2094
|
-
typeof
|
|
2094
|
+
typeof L[p] == "string" && (x = ne.call(this, L[p])), se.call(this, L.$anchor), se.call(this, L.$dynamicAnchor), w[A] = x;
|
|
2095
2095
|
function ne(ee) {
|
|
2096
2096
|
const ce = this.opts.uriResolver.resolve;
|
|
2097
2097
|
if (ee = N(x ? ce(x, ee) : ee), P.has(ee))
|
|
2098
2098
|
throw M(ee);
|
|
2099
2099
|
P.add(ee);
|
|
2100
2100
|
let z = this.refs[ee];
|
|
2101
|
-
return typeof z == "string" && (z = this.refs[z]), typeof z == "object" ? q(
|
|
2101
|
+
return typeof z == "string" && (z = this.refs[z]), typeof z == "object" ? q(L, z.schema, ee) : ee !== N(H) && (ee[0] === "#" ? (q(L, _[ee], ee), _[ee] = L) : this.refs[ee] = H), ee;
|
|
2102
2102
|
}
|
|
2103
2103
|
function se(ee) {
|
|
2104
2104
|
if (typeof ee == "string") {
|
|
@@ -2108,12 +2108,12 @@ function Ft() {
|
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
2110
2110
|
}), _;
|
|
2111
|
-
function q(
|
|
2112
|
-
if (
|
|
2113
|
-
throw M(
|
|
2111
|
+
function q(L, A, U) {
|
|
2112
|
+
if (A !== void 0 && !t(L, A))
|
|
2113
|
+
throw M(U);
|
|
2114
2114
|
}
|
|
2115
|
-
function M(
|
|
2116
|
-
return new Error(`reference "${
|
|
2115
|
+
function M(L) {
|
|
2116
|
+
return new Error(`reference "${L}" resolves to more than one schema`);
|
|
2117
2117
|
}
|
|
2118
2118
|
}
|
|
2119
2119
|
return de.getSchemaRefs = b, de;
|
|
@@ -2122,7 +2122,7 @@ var Mr;
|
|
|
2122
2122
|
function Ze() {
|
|
2123
2123
|
if (Mr) return we;
|
|
2124
2124
|
Mr = 1, Object.defineProperty(we, "__esModule", { value: !0 }), we.getData = we.KeywordCxt = we.validateFunctionCode = void 0;
|
|
2125
|
-
const e = /* @__PURE__ */
|
|
2125
|
+
const e = /* @__PURE__ */ Ls(), t = /* @__PURE__ */ Vt(), r = /* @__PURE__ */ is(), s = /* @__PURE__ */ Vt(), h = /* @__PURE__ */ Ks(), o = /* @__PURE__ */ Hs(), a = /* @__PURE__ */ Bs(), i = /* @__PURE__ */ W(), m = /* @__PURE__ */ Se(), g = /* @__PURE__ */ Ft(), y = /* @__PURE__ */ X(), N = /* @__PURE__ */ Ye();
|
|
2126
2126
|
function c(R) {
|
|
2127
2127
|
if (u(R) && (P(R), w(R))) {
|
|
2128
2128
|
f(R);
|
|
@@ -2149,7 +2149,7 @@ function Ze() {
|
|
|
2149
2149
|
function f(R) {
|
|
2150
2150
|
const { schema: I, opts: D, gen: C } = R;
|
|
2151
2151
|
v(R, () => {
|
|
2152
|
-
D.$comment && I.$comment && K(R),
|
|
2152
|
+
D.$comment && I.$comment && K(R), L(R), C.let(m.default.vErrors, null), C.let(m.default.errors, 0), D.unevaluated && p(R), q(R), H(R);
|
|
2153
2153
|
});
|
|
2154
2154
|
}
|
|
2155
2155
|
function p(R) {
|
|
@@ -2180,7 +2180,7 @@ function Ze() {
|
|
|
2180
2180
|
}
|
|
2181
2181
|
function _(R, I) {
|
|
2182
2182
|
const { schema: D, gen: C, opts: G } = R;
|
|
2183
|
-
G.$comment && D.$comment && K(R),
|
|
2183
|
+
G.$comment && D.$comment && K(R), A(R), U(R);
|
|
2184
2184
|
const Z = C.const("_errs", m.default.errors);
|
|
2185
2185
|
q(R, Z), C.var(I, (0, i._)`${Z} === ${m.default.errors}`);
|
|
2186
2186
|
}
|
|
@@ -2197,15 +2197,15 @@ function Ze() {
|
|
|
2197
2197
|
const { schema: I, errSchemaPath: D, opts: C, self: G } = R;
|
|
2198
2198
|
I.$ref && C.ignoreKeywordsWithRef && (0, y.schemaHasRulesButRef)(I, G.RULES) && G.logger.warn(`$ref: keywords ignored in schema at path "${D}"`);
|
|
2199
2199
|
}
|
|
2200
|
-
function
|
|
2200
|
+
function L(R) {
|
|
2201
2201
|
const { schema: I, opts: D } = R;
|
|
2202
2202
|
I.default !== void 0 && D.useDefaults && D.strictSchema && (0, y.checkStrictMode)(R, "default is ignored in the schema root");
|
|
2203
2203
|
}
|
|
2204
|
-
function
|
|
2204
|
+
function A(R) {
|
|
2205
2205
|
const I = R.schema[R.opts.schemaId];
|
|
2206
2206
|
I && (R.baseId = (0, g.resolveUrl)(R.opts.uriResolver, R.baseId, I));
|
|
2207
2207
|
}
|
|
2208
|
-
function
|
|
2208
|
+
function U(R) {
|
|
2209
2209
|
if (R.schema.$async && !R.schemaEnv.$async)
|
|
2210
2210
|
throw new Error("async schema in sync schema");
|
|
2211
2211
|
}
|
|
@@ -2233,10 +2233,10 @@ function Ze() {
|
|
|
2233
2233
|
}
|
|
2234
2234
|
fe.jtd || ee(R, I), G.block(() => {
|
|
2235
2235
|
for (const ye of oe.rules)
|
|
2236
|
-
|
|
2237
|
-
|
|
2236
|
+
Ae(ye);
|
|
2237
|
+
Ae(oe.post);
|
|
2238
2238
|
});
|
|
2239
|
-
function
|
|
2239
|
+
function Ae(ye) {
|
|
2240
2240
|
(0, r.shouldUseGroup)(Z, ye) && (ye.type ? (G.if((0, s.checkDataType)(ye.type, ae, fe.strictNumbers)), se(R, ye), I.length === 1 && I[0] === ye.type && D && (G.else(), (0, s.reportTypeError)(R)), G.endIf()) : se(R, ye), ge || G.if((0, i._)`${m.default.errors} === ${C || 0}`));
|
|
2241
2241
|
}
|
|
2242
2242
|
}
|
|
@@ -2290,7 +2290,7 @@ function Ze() {
|
|
|
2290
2290
|
const D = R.schemaEnv.baseId + R.errSchemaPath;
|
|
2291
2291
|
I += ` at "${D}" (strictTypes)`, (0, y.checkStrictMode)(R, I, R.opts.strictTypes);
|
|
2292
2292
|
}
|
|
2293
|
-
class
|
|
2293
|
+
class T {
|
|
2294
2294
|
constructor(I, D, C) {
|
|
2295
2295
|
if ((0, o.validateKeywordUsage)(I, D, C), this.gen = I.gen, this.allErrors = I.allErrors, this.keyword = C, this.data = I.data, this.schema = I.schema[C], this.$data = D.$data && I.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, y.schemaRefOrVal)(I, this.schema, C, this.$data), this.schemaType = D.schemaType, this.parentSchema = I.schema, this.params = {}, this.it = I, this.def = D, this.$data)
|
|
2296
2296
|
this.schemaCode = I.gen.const("vSchema", J(this.$data, I));
|
|
@@ -2391,9 +2391,9 @@ function Ze() {
|
|
|
2391
2391
|
return G.if(D, () => this.mergeEvaluated(I, i.Name)), !0;
|
|
2392
2392
|
}
|
|
2393
2393
|
}
|
|
2394
|
-
we.KeywordCxt =
|
|
2394
|
+
we.KeywordCxt = T;
|
|
2395
2395
|
function F(R, I, D, C) {
|
|
2396
|
-
const G = new
|
|
2396
|
+
const G = new T(R, D, I);
|
|
2397
2397
|
"code" in D ? D.code(G, C) : G.$data && D.validate ? (0, o.funcKeywordCode)(G, D) : "macro" in D ? (0, o.macroKeywordCode)(G, D) : (D.compile || D.validate) && (0, o.funcKeywordCode)(G, D);
|
|
2398
2398
|
}
|
|
2399
2399
|
const V = /^\/(?:[^~]|~0|~1)*$/, B = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
|
|
@@ -2443,7 +2443,7 @@ function ur() {
|
|
|
2443
2443
|
return xe.default = e, xe;
|
|
2444
2444
|
}
|
|
2445
2445
|
var et = {}, Vr;
|
|
2446
|
-
function
|
|
2446
|
+
function Ut() {
|
|
2447
2447
|
if (Vr) return et;
|
|
2448
2448
|
Vr = 1, Object.defineProperty(et, "__esModule", { value: !0 });
|
|
2449
2449
|
const e = /* @__PURE__ */ Ft();
|
|
@@ -2505,13 +2505,13 @@ function cr() {
|
|
|
2505
2505
|
opts: this.opts,
|
|
2506
2506
|
self: this
|
|
2507
2507
|
};
|
|
2508
|
-
let
|
|
2508
|
+
let L;
|
|
2509
2509
|
try {
|
|
2510
2510
|
this._compilations.add(f), (0, o.validateFunctionCode)(M), _.optimize(this.opts.code.optimize);
|
|
2511
|
-
const
|
|
2512
|
-
|
|
2513
|
-
const K = new Function(`${r.default.self}`, `${r.default.scope}`,
|
|
2514
|
-
if (this.scope.value(q, { ref: K }), K.errors = null, K.schema = f.schema, K.schemaEnv = f, f.$async && (K.$async = !0), this.opts.code.source === !0 && (K.source = { validateName: q, validateCode:
|
|
2511
|
+
const A = _.toString();
|
|
2512
|
+
L = `${_.scopeRefs(r.default.scope)}return ${A}`, this.opts.code.process && (L = this.opts.code.process(L, f));
|
|
2513
|
+
const K = new Function(`${r.default.self}`, `${r.default.scope}`, L)(this, this.scope.get());
|
|
2514
|
+
if (this.scope.value(q, { ref: K }), K.errors = null, K.schema = f.schema, K.schemaEnv = f, f.$async && (K.$async = !0), this.opts.code.source === !0 && (K.source = { validateName: q, validateCode: A, scopeValues: _._values }), this.opts.unevaluated) {
|
|
2515
2515
|
const { props: H, items: x } = M;
|
|
2516
2516
|
K.evaluated = {
|
|
2517
2517
|
props: H instanceof e.Name ? void 0 : H,
|
|
@@ -2521,8 +2521,8 @@ function cr() {
|
|
|
2521
2521
|
}, K.source && (K.source.evaluated = (0, e.stringify)(K.evaluated));
|
|
2522
2522
|
}
|
|
2523
2523
|
return f.validate = K, f;
|
|
2524
|
-
} catch (
|
|
2525
|
-
throw delete f.validate, delete f.validateName,
|
|
2524
|
+
} catch (A) {
|
|
2525
|
+
throw delete f.validate, delete f.validateName, L && this.logger.error("Error compiling schema, function code:", L), A;
|
|
2526
2526
|
} finally {
|
|
2527
2527
|
this._compilations.delete(f);
|
|
2528
2528
|
}
|
|
@@ -2785,10 +2785,10 @@ function cs() {
|
|
|
2785
2785
|
stringArrayToHexStripped: r
|
|
2786
2786
|
}, Xt;
|
|
2787
2787
|
}
|
|
2788
|
-
var xt,
|
|
2788
|
+
var xt, Ur;
|
|
2789
2789
|
function ea() {
|
|
2790
|
-
if (
|
|
2791
|
-
|
|
2790
|
+
if (Ur) return xt;
|
|
2791
|
+
Ur = 1;
|
|
2792
2792
|
const { isUUID: e } = cs(), t = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu, r = (
|
|
2793
2793
|
/** @type {const} */
|
|
2794
2794
|
[
|
|
@@ -2833,8 +2833,8 @@ function ea() {
|
|
|
2833
2833
|
if (P) {
|
|
2834
2834
|
const q = _.scheme || u.scheme || "urn";
|
|
2835
2835
|
u.nid = P[1].toLowerCase(), u.nss = P[2];
|
|
2836
|
-
const M = `${q}:${_.nid || u.nid}`,
|
|
2837
|
-
u.path = void 0,
|
|
2836
|
+
const M = `${q}:${_.nid || u.nid}`, L = w(M);
|
|
2837
|
+
u.path = void 0, L && (u = L.parse(u, _));
|
|
2838
2838
|
} else
|
|
2839
2839
|
u.error = u.error || "URN can not be parsed.";
|
|
2840
2840
|
return u;
|
|
@@ -2842,10 +2842,10 @@ function ea() {
|
|
|
2842
2842
|
function y(u, _) {
|
|
2843
2843
|
if (u.nid === void 0)
|
|
2844
2844
|
throw new Error("URN without nid cannot be serialized");
|
|
2845
|
-
const P = _.scheme || u.scheme || "urn", q = u.nid.toLowerCase(), M = `${P}:${_.nid || q}`,
|
|
2846
|
-
|
|
2847
|
-
const
|
|
2848
|
-
return
|
|
2845
|
+
const P = _.scheme || u.scheme || "urn", q = u.nid.toLowerCase(), M = `${P}:${_.nid || q}`, L = w(M);
|
|
2846
|
+
L && (u = L.serialize(u, _));
|
|
2847
|
+
const A = u, U = u.nss;
|
|
2848
|
+
return A.path = `${q || _.nid}:${U}`, _.skipEscape = !0, A;
|
|
2849
2849
|
}
|
|
2850
2850
|
function N(u, _) {
|
|
2851
2851
|
const P = u;
|
|
@@ -2931,10 +2931,10 @@ function ea() {
|
|
|
2931
2931
|
getSchemeHandler: w
|
|
2932
2932
|
}, xt;
|
|
2933
2933
|
}
|
|
2934
|
-
var
|
|
2934
|
+
var Lr;
|
|
2935
2935
|
function ta() {
|
|
2936
|
-
if (
|
|
2937
|
-
|
|
2936
|
+
if (Lr) return Ke.exports;
|
|
2937
|
+
Lr = 1;
|
|
2938
2938
|
const { normalizeIPv6: e, removeDotSegments: t, recomposeAuthority: r, normalizeComponentEncoding: s, isIPv4: h, nonSimpleDomain: o } = cs(), { SCHEMES: a, getSchemeHandler: i } = ea();
|
|
2939
2939
|
function m(f, p) {
|
|
2940
2940
|
return typeof f == "string" ? f = /** @type {T} */
|
|
@@ -3051,7 +3051,7 @@ function na() {
|
|
|
3051
3051
|
} }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
|
|
3052
3052
|
return r.CodeGen;
|
|
3053
3053
|
} });
|
|
3054
|
-
const s = /* @__PURE__ */ ur(), h = /* @__PURE__ */
|
|
3054
|
+
const s = /* @__PURE__ */ ur(), h = /* @__PURE__ */ Ut(), o = /* @__PURE__ */ os(), a = /* @__PURE__ */ cr(), i = /* @__PURE__ */ W(), m = /* @__PURE__ */ Ft(), g = /* @__PURE__ */ Vt(), y = /* @__PURE__ */ X(), N = xs, c = /* @__PURE__ */ ra(), v = (z, j) => new RegExp(z, j);
|
|
3055
3055
|
v.code = "new RegExp";
|
|
3056
3056
|
const b = ["removeAdditional", "useDefaults", "coerceTypes"], S = /* @__PURE__ */ new Set([
|
|
3057
3057
|
"validate",
|
|
@@ -3089,10 +3089,10 @@ function na() {
|
|
|
3089
3089
|
unicode: '"minLength"/"maxLength" account for unicode characters by default.'
|
|
3090
3090
|
}, n = 200;
|
|
3091
3091
|
function d(z) {
|
|
3092
|
-
var j, k, O, l, E,
|
|
3092
|
+
var j, k, O, l, E, T, F, V, B, J, R, I, D, C, G, Z, ae, ge, fe, pe, oe, Ae, ye, Lt, Kt;
|
|
3093
3093
|
const Fe = z.strict, Ht = (j = z.code) === null || j === void 0 ? void 0 : j.optimize, pr = Ht === !0 || Ht === void 0 ? 1 : Ht || 0, hr = (O = (k = z.code) === null || k === void 0 ? void 0 : k.regExp) !== null && O !== void 0 ? O : v, ws = (l = z.uriResolver) !== null && l !== void 0 ? l : c.default;
|
|
3094
3094
|
return {
|
|
3095
|
-
strictSchema: (
|
|
3095
|
+
strictSchema: (T = (E = z.strictSchema) !== null && E !== void 0 ? E : Fe) !== null && T !== void 0 ? T : !0,
|
|
3096
3096
|
strictNumbers: (V = (F = z.strictNumbers) !== null && F !== void 0 ? F : Fe) !== null && V !== void 0 ? V : !0,
|
|
3097
3097
|
strictTypes: (J = (B = z.strictTypes) !== null && B !== void 0 ? B : Fe) !== null && J !== void 0 ? J : "log",
|
|
3098
3098
|
strictTuples: (I = (R = z.strictTuples) !== null && R !== void 0 ? R : Fe) !== null && I !== void 0 ? I : "log",
|
|
@@ -3105,9 +3105,9 @@ function na() {
|
|
|
3105
3105
|
inlineRefs: (fe = z.inlineRefs) !== null && fe !== void 0 ? fe : !0,
|
|
3106
3106
|
schemaId: (pe = z.schemaId) !== null && pe !== void 0 ? pe : "$id",
|
|
3107
3107
|
addUsedSchema: (oe = z.addUsedSchema) !== null && oe !== void 0 ? oe : !0,
|
|
3108
|
-
validateSchema: (
|
|
3108
|
+
validateSchema: (Ae = z.validateSchema) !== null && Ae !== void 0 ? Ae : !0,
|
|
3109
3109
|
validateFormats: (ye = z.validateFormats) !== null && ye !== void 0 ? ye : !0,
|
|
3110
|
-
unicodeRegExp: (
|
|
3110
|
+
unicodeRegExp: (Lt = z.unicodeRegExp) !== null && Lt !== void 0 ? Lt : !0,
|
|
3111
3111
|
int32range: (Kt = z.int32range) !== null && Kt !== void 0 ? Kt : !0,
|
|
3112
3112
|
uriResolver: ws
|
|
3113
3113
|
};
|
|
@@ -3116,9 +3116,9 @@ function na() {
|
|
|
3116
3116
|
constructor(j = {}) {
|
|
3117
3117
|
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), j = this.opts = { ...j, ...d(j) };
|
|
3118
3118
|
const { es5: k, lines: O } = this.opts.code;
|
|
3119
|
-
this.scope = new i.ValueScope({ scope: {}, prefixes: S, es5: k, lines: O }), this.logger =
|
|
3119
|
+
this.scope = new i.ValueScope({ scope: {}, prefixes: S, es5: k, lines: O }), this.logger = U(j.logger);
|
|
3120
3120
|
const l = j.validateFormats;
|
|
3121
|
-
j.validateFormats = !1, this.RULES = (0, o.getRules)(), u.call(this, f, j, "NOT SUPPORTED"), u.call(this, p, j, "DEPRECATED", "warn"), this._metaOpts =
|
|
3121
|
+
j.validateFormats = !1, this.RULES = (0, o.getRules)(), u.call(this, f, j, "NOT SUPPORTED"), u.call(this, p, j, "DEPRECATED", "warn"), this._metaOpts = L.call(this), j.formats && q.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), j.keywords && M.call(this, j.keywords), typeof j.meta == "object" && this.addMetaSchema(j.meta), P.call(this), j.validateFormats = l;
|
|
3122
3122
|
}
|
|
3123
3123
|
_addVocabularies() {
|
|
3124
3124
|
this.addKeyword("$async");
|
|
@@ -3154,18 +3154,18 @@ function na() {
|
|
|
3154
3154
|
async function l(J, R) {
|
|
3155
3155
|
await E.call(this, J.$schema);
|
|
3156
3156
|
const I = this._addSchema(J, R);
|
|
3157
|
-
return I.validate ||
|
|
3157
|
+
return I.validate || T.call(this, I);
|
|
3158
3158
|
}
|
|
3159
3159
|
async function E(J) {
|
|
3160
3160
|
J && !this.getSchema(J) && await l.call(this, { $ref: J }, !0);
|
|
3161
3161
|
}
|
|
3162
|
-
async function
|
|
3162
|
+
async function T(J) {
|
|
3163
3163
|
try {
|
|
3164
3164
|
return this._compileSchemaEnv(J);
|
|
3165
3165
|
} catch (R) {
|
|
3166
3166
|
if (!(R instanceof h.default))
|
|
3167
3167
|
throw R;
|
|
3168
|
-
return F.call(this, R), await V.call(this, R.missingSchema),
|
|
3168
|
+
return F.call(this, R), await V.call(this, R.missingSchema), T.call(this, J);
|
|
3169
3169
|
}
|
|
3170
3170
|
}
|
|
3171
3171
|
function F({ missingSchema: J, missingRef: R }) {
|
|
@@ -3190,15 +3190,15 @@ function na() {
|
|
|
3190
3190
|
// Adds schema to the instance
|
|
3191
3191
|
addSchema(j, k, O, l = this.opts.validateSchema) {
|
|
3192
3192
|
if (Array.isArray(j)) {
|
|
3193
|
-
for (const
|
|
3194
|
-
this.addSchema(
|
|
3193
|
+
for (const T of j)
|
|
3194
|
+
this.addSchema(T, void 0, O, l);
|
|
3195
3195
|
return this;
|
|
3196
3196
|
}
|
|
3197
3197
|
let E;
|
|
3198
3198
|
if (typeof j == "object") {
|
|
3199
|
-
const { schemaId:
|
|
3200
|
-
if (E = j[
|
|
3201
|
-
throw new Error(`schema ${
|
|
3199
|
+
const { schemaId: T } = this.opts;
|
|
3200
|
+
if (E = j[T], E !== void 0 && typeof E != "string")
|
|
3201
|
+
throw new Error(`schema ${T} must be string`);
|
|
3202
3202
|
}
|
|
3203
3203
|
return k = (0, m.normalizeId)(k || E), this._checkUnique(k), this.schemas[k] = this._addSchema(j, O, k, l, !0), this;
|
|
3204
3204
|
}
|
|
@@ -3287,7 +3287,7 @@ function na() {
|
|
|
3287
3287
|
type: (0, g.getJSONTypes)(k.type),
|
|
3288
3288
|
schemaType: (0, g.getJSONTypes)(k.schemaType)
|
|
3289
3289
|
};
|
|
3290
|
-
return (0, y.eachItem)(O, l.type.length === 0 ? (E) => x.call(this, E, l) : (E) => l.type.forEach((
|
|
3290
|
+
return (0, y.eachItem)(O, l.type.length === 0 ? (E) => x.call(this, E, l) : (E) => l.type.forEach((T) => x.call(this, E, l, T))), this;
|
|
3291
3291
|
}
|
|
3292
3292
|
getKeyword(j) {
|
|
3293
3293
|
const k = this.RULES.all[j];
|
|
@@ -3315,15 +3315,15 @@ function na() {
|
|
|
3315
3315
|
j = JSON.parse(JSON.stringify(j));
|
|
3316
3316
|
for (const l of k) {
|
|
3317
3317
|
const E = l.split("/").slice(1);
|
|
3318
|
-
let
|
|
3318
|
+
let T = j;
|
|
3319
3319
|
for (const F of E)
|
|
3320
|
-
|
|
3320
|
+
T = T[F];
|
|
3321
3321
|
for (const F in O) {
|
|
3322
3322
|
const V = O[F];
|
|
3323
3323
|
if (typeof V != "object")
|
|
3324
3324
|
continue;
|
|
3325
|
-
const { $data: B } = V.definition, J =
|
|
3326
|
-
B && J && (
|
|
3325
|
+
const { $data: B } = V.definition, J = T[F];
|
|
3326
|
+
B && J && (T[F] = ce(J));
|
|
3327
3327
|
}
|
|
3328
3328
|
}
|
|
3329
3329
|
return j;
|
|
@@ -3335,10 +3335,10 @@ function na() {
|
|
|
3335
3335
|
}
|
|
3336
3336
|
}
|
|
3337
3337
|
_addSchema(j, k, O, l = this.opts.validateSchema, E = this.opts.addUsedSchema) {
|
|
3338
|
-
let
|
|
3338
|
+
let T;
|
|
3339
3339
|
const { schemaId: F } = this.opts;
|
|
3340
3340
|
if (typeof j == "object")
|
|
3341
|
-
|
|
3341
|
+
T = j[F];
|
|
3342
3342
|
else {
|
|
3343
3343
|
if (this.opts.jtd)
|
|
3344
3344
|
throw new Error("schema must be object");
|
|
@@ -3348,7 +3348,7 @@ function na() {
|
|
|
3348
3348
|
let V = this._cache.get(j);
|
|
3349
3349
|
if (V !== void 0)
|
|
3350
3350
|
return V;
|
|
3351
|
-
O = (0, m.normalizeId)(
|
|
3351
|
+
O = (0, m.normalizeId)(T || O);
|
|
3352
3352
|
const B = m.getSchemaRefs.call(this, j, O);
|
|
3353
3353
|
return V = new a.SchemaEnv({ schema: j, schemaId: F, meta: k, baseId: O, localRefs: B }), this._cache.set(V.schema, V), E && !O.startsWith("#") && (O && this._checkUnique(O), this.refs[O] = V), l && this.validateSchema(j, !0), V;
|
|
3354
3354
|
}
|
|
@@ -3407,19 +3407,19 @@ function na() {
|
|
|
3407
3407
|
k.keyword || (k.keyword = j), this.addKeyword(k);
|
|
3408
3408
|
}
|
|
3409
3409
|
}
|
|
3410
|
-
function
|
|
3410
|
+
function L() {
|
|
3411
3411
|
const z = { ...this.opts };
|
|
3412
3412
|
for (const j of b)
|
|
3413
3413
|
delete z[j];
|
|
3414
3414
|
return z;
|
|
3415
3415
|
}
|
|
3416
|
-
const
|
|
3416
|
+
const A = { log() {
|
|
3417
3417
|
}, warn() {
|
|
3418
3418
|
}, error() {
|
|
3419
3419
|
} };
|
|
3420
|
-
function
|
|
3420
|
+
function U(z) {
|
|
3421
3421
|
if (z === !1)
|
|
3422
|
-
return
|
|
3422
|
+
return A;
|
|
3423
3423
|
if (z === void 0)
|
|
3424
3424
|
return console;
|
|
3425
3425
|
if (z.log && z.warn && z.error)
|
|
@@ -3443,8 +3443,8 @@ function na() {
|
|
|
3443
3443
|
if (k && l)
|
|
3444
3444
|
throw new Error('keyword with "post" flag cannot have "type"');
|
|
3445
3445
|
const { RULES: E } = this;
|
|
3446
|
-
let
|
|
3447
|
-
if (
|
|
3446
|
+
let T = l ? E.post : E.rules.find(({ type: V }) => V === k);
|
|
3447
|
+
if (T || (T = { type: k, rules: [] }, E.rules.push(T)), E.keywords[z] = !0, !j)
|
|
3448
3448
|
return;
|
|
3449
3449
|
const F = {
|
|
3450
3450
|
keyword: z,
|
|
@@ -3454,7 +3454,7 @@ function na() {
|
|
|
3454
3454
|
schemaType: (0, g.getJSONTypes)(j.schemaType)
|
|
3455
3455
|
}
|
|
3456
3456
|
};
|
|
3457
|
-
j.before ? ne.call(this,
|
|
3457
|
+
j.before ? ne.call(this, T, F, j.before) : T.rules.push(F), E.all[z] = F, (O = j.implements) === null || O === void 0 || O.forEach((V) => this.addKeyword(V));
|
|
3458
3458
|
}
|
|
3459
3459
|
function ne(z, j, k) {
|
|
3460
3460
|
const O = z.rules.findIndex((l) => l.keyword === k);
|
|
@@ -3488,7 +3488,7 @@ var Ne = {}, Gr;
|
|
|
3488
3488
|
function aa() {
|
|
3489
3489
|
if (Gr) return Ne;
|
|
3490
3490
|
Gr = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.callRef = Ne.getValidate = void 0;
|
|
3491
|
-
const e = /* @__PURE__ */
|
|
3491
|
+
const e = /* @__PURE__ */ Ut(), t = /* @__PURE__ */ ve(), r = /* @__PURE__ */ W(), s = /* @__PURE__ */ Se(), h = /* @__PURE__ */ cr(), o = /* @__PURE__ */ X(), a = {
|
|
3492
3492
|
keyword: "$ref",
|
|
3493
3493
|
schemaType: "string",
|
|
3494
3494
|
code(g) {
|
|
@@ -3512,14 +3512,14 @@ function aa() {
|
|
|
3512
3512
|
m(g, q, P, P.$async);
|
|
3513
3513
|
}
|
|
3514
3514
|
function _(P) {
|
|
3515
|
-
const q = y.scopeValue("schema", f.code.source === !0 ? { ref: P, code: (0, r.stringify)(P) } : { ref: P }), M = y.name("valid"),
|
|
3515
|
+
const q = y.scopeValue("schema", f.code.source === !0 ? { ref: P, code: (0, r.stringify)(P) } : { ref: P }), M = y.name("valid"), L = g.subschema({
|
|
3516
3516
|
schema: P,
|
|
3517
3517
|
dataTypes: [],
|
|
3518
3518
|
schemaPath: r.nil,
|
|
3519
3519
|
topSchemaRef: q,
|
|
3520
3520
|
errSchemaPath: N
|
|
3521
3521
|
}, M);
|
|
3522
|
-
g.mergeEvaluated(
|
|
3522
|
+
g.mergeEvaluated(L), g.ok(M);
|
|
3523
3523
|
}
|
|
3524
3524
|
}
|
|
3525
3525
|
};
|
|
@@ -3557,15 +3557,15 @@ function aa() {
|
|
|
3557
3557
|
if (M && !M.dynamicProps)
|
|
3558
3558
|
M.props !== void 0 && (b.props = o.mergeEvaluated.props(v, M.props, b.props));
|
|
3559
3559
|
else {
|
|
3560
|
-
const
|
|
3561
|
-
b.props = o.mergeEvaluated.props(v,
|
|
3560
|
+
const L = v.var("props", (0, r._)`${P}.evaluated.props`);
|
|
3561
|
+
b.props = o.mergeEvaluated.props(v, L, b.props, r.Name);
|
|
3562
3562
|
}
|
|
3563
3563
|
if (b.items !== !0)
|
|
3564
3564
|
if (M && !M.dynamicItems)
|
|
3565
3565
|
M.items !== void 0 && (b.items = o.mergeEvaluated.items(v, M.items, b.items));
|
|
3566
3566
|
else {
|
|
3567
|
-
const
|
|
3568
|
-
b.items = o.mergeEvaluated.items(v,
|
|
3567
|
+
const L = v.var("items", (0, r._)`${P}.evaluated.items`);
|
|
3568
|
+
b.items = o.mergeEvaluated.items(v, L, b.items, r.Name);
|
|
3569
3569
|
}
|
|
3570
3570
|
}
|
|
3571
3571
|
}
|
|
@@ -4532,10 +4532,10 @@ function qa() {
|
|
|
4532
4532
|
}
|
|
4533
4533
|
return _t.default = f, _t;
|
|
4534
4534
|
}
|
|
4535
|
-
var qt = {},
|
|
4536
|
-
function
|
|
4537
|
-
if (Pn) return
|
|
4538
|
-
Pn = 1, Object.defineProperty(
|
|
4535
|
+
var qt = {}, Tt = {}, Pn;
|
|
4536
|
+
function Ta() {
|
|
4537
|
+
if (Pn) return Tt;
|
|
4538
|
+
Pn = 1, Object.defineProperty(Tt, "__esModule", { value: !0 });
|
|
4539
4539
|
const e = /* @__PURE__ */ W(), r = {
|
|
4540
4540
|
keyword: "format",
|
|
4541
4541
|
type: ["number", "string"],
|
|
@@ -4585,8 +4585,8 @@ function Aa() {
|
|
|
4585
4585
|
}
|
|
4586
4586
|
}
|
|
4587
4587
|
function _(q) {
|
|
4588
|
-
const M = q instanceof RegExp ? (0, e.regexpCode)(q) : N.code.formats ? (0, e._)`${N.code.formats}${(0, e.getProperty)(m)}` : void 0,
|
|
4589
|
-
return typeof q == "object" && !(q instanceof RegExp) ? [q.type || "string", q.validate, (0, e._)`${
|
|
4588
|
+
const M = q instanceof RegExp ? (0, e.regexpCode)(q) : N.code.formats ? (0, e._)`${N.code.formats}${(0, e.getProperty)(m)}` : void 0, L = o.scopeValue("formats", { key: m, ref: q, code: M });
|
|
4589
|
+
return typeof q == "object" && !(q instanceof RegExp) ? [q.type || "string", q.validate, (0, e._)`${L}.validate`] : ["string", q, L];
|
|
4590
4590
|
}
|
|
4591
4591
|
function P() {
|
|
4592
4592
|
if (typeof p == "object" && !(p instanceof RegExp) && p.async) {
|
|
@@ -4599,13 +4599,13 @@ function Aa() {
|
|
|
4599
4599
|
}
|
|
4600
4600
|
}
|
|
4601
4601
|
};
|
|
4602
|
-
return
|
|
4602
|
+
return Tt.default = r, Tt;
|
|
4603
4603
|
}
|
|
4604
4604
|
var Nn;
|
|
4605
|
-
function
|
|
4605
|
+
function Aa() {
|
|
4606
4606
|
if (Nn) return qt;
|
|
4607
4607
|
Nn = 1, Object.defineProperty(qt, "__esModule", { value: !0 });
|
|
4608
|
-
const t = [(/* @__PURE__ */
|
|
4608
|
+
const t = [(/* @__PURE__ */ Ta()).default];
|
|
4609
4609
|
return qt.default = t, qt;
|
|
4610
4610
|
}
|
|
4611
4611
|
var ke = {}, On;
|
|
@@ -4628,7 +4628,7 @@ var Rn;
|
|
|
4628
4628
|
function Ma() {
|
|
4629
4629
|
if (Rn) return rt;
|
|
4630
4630
|
Rn = 1, Object.defineProperty(rt, "__esModule", { value: !0 });
|
|
4631
|
-
const e = /* @__PURE__ */ oa(), t = /* @__PURE__ */ _a(), r = /* @__PURE__ */ qa(), s = /* @__PURE__ */
|
|
4631
|
+
const e = /* @__PURE__ */ oa(), t = /* @__PURE__ */ _a(), r = /* @__PURE__ */ qa(), s = /* @__PURE__ */ Aa(), h = /* @__PURE__ */ Da(), o = [
|
|
4632
4632
|
e.default,
|
|
4633
4633
|
t.default,
|
|
4634
4634
|
(0, r.default)(),
|
|
@@ -4638,7 +4638,7 @@ function Ma() {
|
|
|
4638
4638
|
];
|
|
4639
4639
|
return rt.default = o, rt;
|
|
4640
4640
|
}
|
|
4641
|
-
var
|
|
4641
|
+
var At = {}, He = {}, In;
|
|
4642
4642
|
function za() {
|
|
4643
4643
|
if (In) return He;
|
|
4644
4644
|
In = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.DiscrError = void 0;
|
|
@@ -4649,9 +4649,9 @@ function za() {
|
|
|
4649
4649
|
}
|
|
4650
4650
|
var jn;
|
|
4651
4651
|
function Va() {
|
|
4652
|
-
if (jn) return
|
|
4653
|
-
jn = 1, Object.defineProperty(
|
|
4654
|
-
const e = /* @__PURE__ */ W(), t = /* @__PURE__ */ za(), r = /* @__PURE__ */ cr(), s = /* @__PURE__ */
|
|
4652
|
+
if (jn) return At;
|
|
4653
|
+
jn = 1, Object.defineProperty(At, "__esModule", { value: !0 });
|
|
4654
|
+
const e = /* @__PURE__ */ W(), t = /* @__PURE__ */ za(), r = /* @__PURE__ */ cr(), s = /* @__PURE__ */ Ut(), h = /* @__PURE__ */ X(), a = {
|
|
4655
4655
|
keyword: "discriminator",
|
|
4656
4656
|
type: "object",
|
|
4657
4657
|
schemaType: "object",
|
|
@@ -4687,48 +4687,48 @@ function Va() {
|
|
|
4687
4687
|
var w;
|
|
4688
4688
|
const u = {}, _ = q(N);
|
|
4689
4689
|
let P = !0;
|
|
4690
|
-
for (let
|
|
4691
|
-
let
|
|
4692
|
-
if (
|
|
4693
|
-
const H =
|
|
4694
|
-
if (
|
|
4690
|
+
for (let A = 0; A < v.length; A++) {
|
|
4691
|
+
let U = v[A];
|
|
4692
|
+
if (U != null && U.$ref && !(0, h.schemaHasRulesButRef)(U, c.self.RULES)) {
|
|
4693
|
+
const H = U.$ref;
|
|
4694
|
+
if (U = r.resolveRef.call(c.self, c.schemaEnv.root, c.baseId, H), U instanceof r.SchemaEnv && (U = U.schema), U === void 0)
|
|
4695
4695
|
throw new s.default(c.opts.uriResolver, c.baseId, H);
|
|
4696
4696
|
}
|
|
4697
|
-
const K = (w =
|
|
4697
|
+
const K = (w = U == null ? void 0 : U.properties) === null || w === void 0 ? void 0 : w[b];
|
|
4698
4698
|
if (typeof K != "object")
|
|
4699
4699
|
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);
|
|
4700
|
-
P = P && (_ || q(
|
|
4700
|
+
P = P && (_ || q(U)), M(K, A);
|
|
4701
4701
|
}
|
|
4702
4702
|
if (!P)
|
|
4703
4703
|
throw new Error(`discriminator: "${b}" must be required`);
|
|
4704
4704
|
return u;
|
|
4705
|
-
function q({ required:
|
|
4706
|
-
return Array.isArray(
|
|
4705
|
+
function q({ required: A }) {
|
|
4706
|
+
return Array.isArray(A) && A.includes(b);
|
|
4707
4707
|
}
|
|
4708
|
-
function M(
|
|
4709
|
-
if (
|
|
4710
|
-
|
|
4711
|
-
else if (
|
|
4712
|
-
for (const K of
|
|
4713
|
-
|
|
4708
|
+
function M(A, U) {
|
|
4709
|
+
if (A.const)
|
|
4710
|
+
L(A.const, U);
|
|
4711
|
+
else if (A.enum)
|
|
4712
|
+
for (const K of A.enum)
|
|
4713
|
+
L(K, U);
|
|
4714
4714
|
else
|
|
4715
4715
|
throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`);
|
|
4716
4716
|
}
|
|
4717
|
-
function
|
|
4718
|
-
if (typeof
|
|
4717
|
+
function L(A, U) {
|
|
4718
|
+
if (typeof A != "string" || A in u)
|
|
4719
4719
|
throw new Error(`discriminator: "${b}" values must be unique strings`);
|
|
4720
|
-
u[
|
|
4720
|
+
u[A] = U;
|
|
4721
4721
|
}
|
|
4722
4722
|
}
|
|
4723
4723
|
}
|
|
4724
4724
|
};
|
|
4725
|
-
return
|
|
4725
|
+
return At.default = a, At;
|
|
4726
4726
|
}
|
|
4727
|
-
const Ca = "http://json-schema.org/draft-07/schema#", Fa = "http://json-schema.org/draft-07/schema#",
|
|
4727
|
+
const Ca = "http://json-schema.org/draft-07/schema#", Fa = "http://json-schema.org/draft-07/schema#", Ua = "Core schema meta-schema", La = { schemaArray: { type: "array", minItems: 1, items: { $ref: "#" } }, nonNegativeInteger: { type: "integer", minimum: 0 }, nonNegativeIntegerDefault0: { allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }] }, simpleTypes: { enum: ["array", "boolean", "integer", "null", "number", "object", "string"] }, stringArray: { type: "array", items: { type: "string" }, uniqueItems: !0, default: [] } }, Ka = ["object", "boolean"], Ha = { $id: { type: "string", format: "uri-reference" }, $schema: { type: "string", format: "uri" }, $ref: { type: "string", format: "uri-reference" }, $comment: { type: "string" }, title: { type: "string" }, description: { type: "string" }, default: !0, readOnly: { type: "boolean", default: !1 }, examples: { type: "array", items: !0 }, multipleOf: { type: "number", exclusiveMinimum: 0 }, maximum: { type: "number" }, exclusiveMaximum: { type: "number" }, minimum: { type: "number" }, exclusiveMinimum: { type: "number" }, maxLength: { $ref: "#/definitions/nonNegativeInteger" }, minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, pattern: { type: "string", format: "regex" }, additionalItems: { $ref: "#" }, items: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], default: !0 }, maxItems: { $ref: "#/definitions/nonNegativeInteger" }, minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, uniqueItems: { type: "boolean", default: !1 }, contains: { $ref: "#" }, maxProperties: { $ref: "#/definitions/nonNegativeInteger" }, minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, required: { $ref: "#/definitions/stringArray" }, additionalProperties: { $ref: "#" }, definitions: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, properties: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, patternProperties: { type: "object", additionalProperties: { $ref: "#" }, propertyNames: { format: "regex" }, default: {} }, dependencies: { type: "object", additionalProperties: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] } }, propertyNames: { $ref: "#" }, const: !0, enum: { type: "array", items: !0, minItems: 1, uniqueItems: !0 }, type: { anyOf: [{ $ref: "#/definitions/simpleTypes" }, { type: "array", items: { $ref: "#/definitions/simpleTypes" }, minItems: 1, uniqueItems: !0 }] }, format: { type: "string" }, contentMediaType: { type: "string" }, contentEncoding: { type: "string" }, if: { $ref: "#" }, then: { $ref: "#" }, else: { $ref: "#" }, allOf: { $ref: "#/definitions/schemaArray" }, anyOf: { $ref: "#/definitions/schemaArray" }, oneOf: { $ref: "#/definitions/schemaArray" }, not: { $ref: "#" } }, Ba = {
|
|
4728
4728
|
$schema: Ca,
|
|
4729
4729
|
$id: Fa,
|
|
4730
|
-
title:
|
|
4731
|
-
definitions:
|
|
4730
|
+
title: Ua,
|
|
4731
|
+
definitions: La,
|
|
4732
4732
|
type: Ka,
|
|
4733
4733
|
properties: Ha,
|
|
4734
4734
|
default: !0
|
|
@@ -4775,7 +4775,7 @@ function lr() {
|
|
|
4775
4775
|
Object.defineProperty(t, "ValidationError", { enumerable: !0, get: function() {
|
|
4776
4776
|
return N.default;
|
|
4777
4777
|
} });
|
|
4778
|
-
var c = /* @__PURE__ */
|
|
4778
|
+
var c = /* @__PURE__ */ Ut();
|
|
4779
4779
|
Object.defineProperty(t, "MissingRefError", { enumerable: !0, get: function() {
|
|
4780
4780
|
return c.default;
|
|
4781
4781
|
} });
|
|
@@ -4787,8 +4787,8 @@ var Dt = { exports: {} }, tr = {}, qn;
|
|
|
4787
4787
|
function Wa() {
|
|
4788
4788
|
return qn || (qn = 1, (function(e) {
|
|
4789
4789
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.formatNames = e.fastFormats = e.fullFormats = void 0;
|
|
4790
|
-
function t(
|
|
4791
|
-
return { validate:
|
|
4790
|
+
function t(A, U) {
|
|
4791
|
+
return { validate: A, compare: U };
|
|
4792
4792
|
}
|
|
4793
4793
|
e.fullFormats = {
|
|
4794
4794
|
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
@@ -4812,7 +4812,7 @@ function Wa() {
|
|
|
4812
4812
|
// optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
|
|
4813
4813
|
ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
|
|
4814
4814
|
ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
|
|
4815
|
-
regex:
|
|
4815
|
+
regex: L,
|
|
4816
4816
|
// uuid: http://tools.ietf.org/html/rfc4122
|
|
4817
4817
|
uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
|
|
4818
4818
|
// JSON-pointer: https://tools.ietf.org/html/rfc6901
|
|
@@ -4851,29 +4851,29 @@ function Wa() {
|
|
|
4851
4851
|
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
|
|
4852
4852
|
email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i
|
|
4853
4853
|
}, e.formatNames = Object.keys(e.fullFormats);
|
|
4854
|
-
function r(
|
|
4855
|
-
return
|
|
4854
|
+
function r(A) {
|
|
4855
|
+
return A % 4 === 0 && (A % 100 !== 0 || A % 400 === 0);
|
|
4856
4856
|
}
|
|
4857
4857
|
const s = /^(\d\d\d\d)-(\d\d)-(\d\d)$/, h = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
4858
|
-
function o(
|
|
4859
|
-
const
|
|
4860
|
-
if (!
|
|
4858
|
+
function o(A) {
|
|
4859
|
+
const U = s.exec(A);
|
|
4860
|
+
if (!U)
|
|
4861
4861
|
return !1;
|
|
4862
|
-
const K = +
|
|
4862
|
+
const K = +U[1], H = +U[2], x = +U[3];
|
|
4863
4863
|
return H >= 1 && H <= 12 && x >= 1 && x <= (H === 2 && r(K) ? 29 : h[H]);
|
|
4864
4864
|
}
|
|
4865
|
-
function a(
|
|
4866
|
-
if (
|
|
4867
|
-
return
|
|
4865
|
+
function a(A, U) {
|
|
4866
|
+
if (A && U)
|
|
4867
|
+
return A > U ? 1 : A < U ? -1 : 0;
|
|
4868
4868
|
}
|
|
4869
4869
|
const i = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
|
4870
|
-
function m(
|
|
4870
|
+
function m(A) {
|
|
4871
4871
|
return function(K) {
|
|
4872
4872
|
const H = i.exec(K);
|
|
4873
4873
|
if (!H)
|
|
4874
4874
|
return !1;
|
|
4875
4875
|
const x = +H[1], ne = +H[2], se = +H[3], ee = H[4], ce = H[5] === "-" ? -1 : 1, z = +(H[6] || 0), j = +(H[7] || 0);
|
|
4876
|
-
if (z > 23 || j > 59 ||
|
|
4876
|
+
if (z > 23 || j > 59 || A && !ee)
|
|
4877
4877
|
return !1;
|
|
4878
4878
|
if (x <= 23 && ne <= 59 && se < 60)
|
|
4879
4879
|
return !0;
|
|
@@ -4881,75 +4881,75 @@ function Wa() {
|
|
|
4881
4881
|
return (O === 23 || O === -1) && (k === 59 || k === -1) && se < 61;
|
|
4882
4882
|
};
|
|
4883
4883
|
}
|
|
4884
|
-
function g(
|
|
4885
|
-
if (!(
|
|
4884
|
+
function g(A, U) {
|
|
4885
|
+
if (!(A && U))
|
|
4886
4886
|
return;
|
|
4887
|
-
const K = (/* @__PURE__ */ new Date("2020-01-01T" +
|
|
4887
|
+
const K = (/* @__PURE__ */ new Date("2020-01-01T" + A)).valueOf(), H = (/* @__PURE__ */ new Date("2020-01-01T" + U)).valueOf();
|
|
4888
4888
|
if (K && H)
|
|
4889
4889
|
return K - H;
|
|
4890
4890
|
}
|
|
4891
|
-
function y(
|
|
4892
|
-
if (!(
|
|
4891
|
+
function y(A, U) {
|
|
4892
|
+
if (!(A && U))
|
|
4893
4893
|
return;
|
|
4894
|
-
const K = i.exec(
|
|
4894
|
+
const K = i.exec(A), H = i.exec(U);
|
|
4895
4895
|
if (K && H)
|
|
4896
|
-
return
|
|
4896
|
+
return A = K[1] + K[2] + K[3], U = H[1] + H[2] + H[3], A > U ? 1 : A < U ? -1 : 0;
|
|
4897
4897
|
}
|
|
4898
4898
|
const N = /t|\s/i;
|
|
4899
|
-
function c(
|
|
4900
|
-
const
|
|
4899
|
+
function c(A) {
|
|
4900
|
+
const U = m(A);
|
|
4901
4901
|
return function(H) {
|
|
4902
4902
|
const x = H.split(N);
|
|
4903
|
-
return x.length === 2 && o(x[0]) &&
|
|
4903
|
+
return x.length === 2 && o(x[0]) && U(x[1]);
|
|
4904
4904
|
};
|
|
4905
4905
|
}
|
|
4906
|
-
function v(
|
|
4907
|
-
if (!(
|
|
4906
|
+
function v(A, U) {
|
|
4907
|
+
if (!(A && U))
|
|
4908
4908
|
return;
|
|
4909
|
-
const K = new Date(
|
|
4909
|
+
const K = new Date(A).valueOf(), H = new Date(U).valueOf();
|
|
4910
4910
|
if (K && H)
|
|
4911
4911
|
return K - H;
|
|
4912
4912
|
}
|
|
4913
|
-
function b(
|
|
4914
|
-
if (!(
|
|
4913
|
+
function b(A, U) {
|
|
4914
|
+
if (!(A && U))
|
|
4915
4915
|
return;
|
|
4916
|
-
const [K, H] =
|
|
4916
|
+
const [K, H] = A.split(N), [x, ne] = U.split(N), se = a(K, x);
|
|
4917
4917
|
if (se !== void 0)
|
|
4918
4918
|
return se || g(H, ne);
|
|
4919
4919
|
}
|
|
4920
4920
|
const S = /\/|:/, f = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
4921
|
-
function p(
|
|
4922
|
-
return S.test(
|
|
4921
|
+
function p(A) {
|
|
4922
|
+
return S.test(A) && f.test(A);
|
|
4923
4923
|
}
|
|
4924
4924
|
const n = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
|
|
4925
|
-
function d(
|
|
4926
|
-
return n.lastIndex = 0, n.test(
|
|
4925
|
+
function d(A) {
|
|
4926
|
+
return n.lastIndex = 0, n.test(A);
|
|
4927
4927
|
}
|
|
4928
4928
|
const w = -2147483648, u = 2 ** 31 - 1;
|
|
4929
|
-
function _(
|
|
4930
|
-
return Number.isInteger(
|
|
4929
|
+
function _(A) {
|
|
4930
|
+
return Number.isInteger(A) && A <= u && A >= w;
|
|
4931
4931
|
}
|
|
4932
|
-
function P(
|
|
4933
|
-
return Number.isInteger(
|
|
4932
|
+
function P(A) {
|
|
4933
|
+
return Number.isInteger(A);
|
|
4934
4934
|
}
|
|
4935
4935
|
function q() {
|
|
4936
4936
|
return !0;
|
|
4937
4937
|
}
|
|
4938
4938
|
const M = /[^\\]\\Z/;
|
|
4939
|
-
function
|
|
4940
|
-
if (M.test(
|
|
4939
|
+
function L(A) {
|
|
4940
|
+
if (M.test(A))
|
|
4941
4941
|
return !1;
|
|
4942
4942
|
try {
|
|
4943
|
-
return new RegExp(
|
|
4943
|
+
return new RegExp(A), !0;
|
|
4944
4944
|
} catch {
|
|
4945
4945
|
return !1;
|
|
4946
4946
|
}
|
|
4947
4947
|
}
|
|
4948
4948
|
})(tr)), tr;
|
|
4949
4949
|
}
|
|
4950
|
-
var rr = {},
|
|
4950
|
+
var rr = {}, Tn;
|
|
4951
4951
|
function Ya() {
|
|
4952
|
-
return
|
|
4952
|
+
return Tn || (Tn = 1, (function(e) {
|
|
4953
4953
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.formatLimitDefinition = void 0;
|
|
4954
4954
|
const t = /* @__PURE__ */ lr(), r = /* @__PURE__ */ W(), s = r.operators, h = {
|
|
4955
4955
|
formatMaximum: { okStr: "<=", ok: s.LTE, fail: s.GT },
|
|
@@ -5002,9 +5002,9 @@ function Ya() {
|
|
|
5002
5002
|
e.default = a;
|
|
5003
5003
|
})(rr)), rr;
|
|
5004
5004
|
}
|
|
5005
|
-
var
|
|
5005
|
+
var An;
|
|
5006
5006
|
function Za() {
|
|
5007
|
-
return
|
|
5007
|
+
return An || (An = 1, (function(e, t) {
|
|
5008
5008
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
5009
5009
|
const r = Wa(), s = Ya(), h = /* @__PURE__ */ W(), o = new h.Name("fullFormats"), a = new h.Name("fastFormats"), i = (g, y = { keywords: !0 }) => {
|
|
5010
5010
|
if (Array.isArray(y))
|
|
@@ -5050,8 +5050,8 @@ function xa() {
|
|
|
5050
5050
|
const P = w, q = s.strConcat(i.default.instancePath, _.errorPath);
|
|
5051
5051
|
n.if(r._`${i.default.errors} > 0`, () => {
|
|
5052
5052
|
if (typeof P == "object") {
|
|
5053
|
-
const [O, l] =
|
|
5054
|
-
l &&
|
|
5053
|
+
const [O, l] = L(P);
|
|
5054
|
+
l && A(l), O && U(O), K(M(P));
|
|
5055
5055
|
}
|
|
5056
5056
|
const k = typeof P == "string" ? P : P._;
|
|
5057
5057
|
k && H(k), f.keepErrors || x();
|
|
@@ -5070,56 +5070,56 @@ function xa() {
|
|
|
5070
5070
|
}
|
|
5071
5071
|
return l;
|
|
5072
5072
|
}
|
|
5073
|
-
function
|
|
5073
|
+
function L(k) {
|
|
5074
5074
|
let O, l;
|
|
5075
5075
|
for (const E in k) {
|
|
5076
5076
|
if (E === "properties" || E === "items")
|
|
5077
5077
|
continue;
|
|
5078
|
-
const
|
|
5079
|
-
if (typeof
|
|
5078
|
+
const T = k[E];
|
|
5079
|
+
if (typeof T == "object") {
|
|
5080
5080
|
O || (O = {});
|
|
5081
5081
|
const F = O[E] = {};
|
|
5082
|
-
for (const V in
|
|
5082
|
+
for (const V in T)
|
|
5083
5083
|
F[V] = [];
|
|
5084
5084
|
} else
|
|
5085
5085
|
l || (l = {}), l[E] = [];
|
|
5086
5086
|
}
|
|
5087
5087
|
return [O, l];
|
|
5088
5088
|
}
|
|
5089
|
-
function
|
|
5089
|
+
function A(k) {
|
|
5090
5090
|
const O = n.const("emErrors", r.stringify(k)), l = n.const("templates", ce(k, w));
|
|
5091
5091
|
n.forOf("err", i.default.vErrors, (V) => n.if(ne(V, O), () => n.code(r._`${O}[${V}.keyword].push(${V})`).assign(r._`${V}.${g}`, !0)));
|
|
5092
5092
|
const { singleError: E } = f;
|
|
5093
5093
|
if (E) {
|
|
5094
5094
|
const V = n.let("message", r._`""`), B = n.let("paramsErrors", r._`[]`);
|
|
5095
|
-
|
|
5095
|
+
T((J) => {
|
|
5096
5096
|
n.if(V, () => n.code(r._`${V} += ${typeof E == "string" ? E : ";"}`)), n.code(r._`${V} += ${F(J)}`), n.assign(B, r._`${B}.concat(${O}[${J}])`);
|
|
5097
5097
|
}), a.reportError(p, { message: V, params: r._`{errors: ${B}}` });
|
|
5098
5098
|
} else
|
|
5099
|
-
|
|
5099
|
+
T((V) => a.reportError(p, {
|
|
5100
5100
|
message: F(V),
|
|
5101
5101
|
params: r._`{errors: ${O}[${V}]}`
|
|
5102
5102
|
}));
|
|
5103
|
-
function
|
|
5103
|
+
function T(V) {
|
|
5104
5104
|
n.forIn("key", O, (B) => n.if(r._`${O}[${B}].length`, () => V(B)));
|
|
5105
5105
|
}
|
|
5106
5106
|
function F(V) {
|
|
5107
5107
|
return r._`${V} in ${l} ? ${l}[${V}]() : ${u}[${V}]`;
|
|
5108
5108
|
}
|
|
5109
5109
|
}
|
|
5110
|
-
function
|
|
5110
|
+
function U(k) {
|
|
5111
5111
|
const O = n.const("emErrors", r.stringify(k)), l = [];
|
|
5112
5112
|
for (const B in k)
|
|
5113
5113
|
l.push([
|
|
5114
5114
|
B,
|
|
5115
5115
|
ce(k[B], w[B])
|
|
5116
5116
|
]);
|
|
5117
|
-
const E = n.const("templates", n.object(...l)),
|
|
5117
|
+
const E = n.const("templates", n.object(...l)), T = n.scopeValue("obj", {
|
|
5118
5118
|
ref: y,
|
|
5119
5119
|
code: r.stringify(y)
|
|
5120
5120
|
}), F = n.let("emPropParams"), V = n.let("emParamsErrors");
|
|
5121
5121
|
n.forOf("err", i.default.vErrors, (B) => n.if(ne(B, O), () => {
|
|
5122
|
-
n.assign(F, r._`${
|
|
5122
|
+
n.assign(F, r._`${T}[${B}.keyword]`), n.assign(V, r._`${O}[${B}.keyword][${B}.params[${F}]]`), n.if(V, () => n.code(r._`${V}.push(${B})`).assign(r._`${B}.${g}`, !0));
|
|
5123
5123
|
})), n.forIn("key", O, (B) => n.forIn("keyProp", r._`${O}[${B}]`, (J) => {
|
|
5124
5124
|
n.assign(V, r._`${O}[${B}][${J}]`), n.if(r._`${V}.length`, () => {
|
|
5125
5125
|
const R = n.const("tmpl", r._`${E}[${B}] && ${E}[${B}][${J}]`);
|
|
@@ -5134,14 +5134,14 @@ function xa() {
|
|
|
5134
5134
|
const { props: O, items: l } = k;
|
|
5135
5135
|
if (!O && !l)
|
|
5136
5136
|
return;
|
|
5137
|
-
const E = r._`typeof ${d} == "object"`,
|
|
5137
|
+
const E = r._`typeof ${d} == "object"`, T = r._`Array.isArray(${d})`, F = n.let("emErrors");
|
|
5138
5138
|
let V, B;
|
|
5139
5139
|
const J = n.let("templates");
|
|
5140
|
-
O && l ? (V = n.let("emChildKwd"), n.if(E), n.if(
|
|
5140
|
+
O && l ? (V = n.let("emChildKwd"), n.if(E), n.if(T, () => {
|
|
5141
5141
|
R(l, w.items), n.assign(V, r.str`items`);
|
|
5142
5142
|
}, () => {
|
|
5143
5143
|
R(O, w.properties), n.assign(V, r.str`properties`);
|
|
5144
|
-
}), B = r._`[${V}]`) : l ? (n.if(
|
|
5144
|
+
}), B = r._`[${V}]`) : l ? (n.if(T), R(l, w.items), B = r._`.items`) : O && (n.if(s.and(E, s.not(T))), R(O, w.properties), B = r._`.properties`), n.forOf("err", i.default.vErrors, (I) => se(I, F, (D) => n.code(r._`${F}[${D}].push(${I})`).assign(r._`${I}.${g}`, !0))), n.forIn("key", F, (I) => n.if(r._`${F}[${I}].length`, () => {
|
|
5145
5145
|
a.reportError(p, {
|
|
5146
5146
|
message: r._`${I} in ${J} ? ${J}[${I}]() : ${u}${B}[${I}]`,
|
|
5147
5147
|
params: r._`{errors: ${F}[${I}]}`
|
|
@@ -5178,7 +5178,7 @@ function xa() {
|
|
|
5178
5178
|
const E = n.scopeValue("pattern", {
|
|
5179
5179
|
ref: /^\/([^/]*)(?:\/|$)/,
|
|
5180
5180
|
code: r._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`
|
|
5181
|
-
}),
|
|
5181
|
+
}), T = n.const("emMatches", r._`${E}.exec(${k}.instancePath.slice(${q}.length))`), F = n.const("emChild", r._`${T} && ${T}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);
|
|
5182
5182
|
n.if(r._`${F} !== undefined && ${F} in ${O}`, () => l(F));
|
|
5183
5183
|
});
|
|
5184
5184
|
}
|
|
@@ -5188,8 +5188,8 @@ function xa() {
|
|
|
5188
5188
|
function ce(k, O) {
|
|
5189
5189
|
const l = [];
|
|
5190
5190
|
for (const E in k) {
|
|
5191
|
-
const
|
|
5192
|
-
N.test(
|
|
5191
|
+
const T = O[E];
|
|
5192
|
+
N.test(T) && l.push([E, j(T)]);
|
|
5193
5193
|
}
|
|
5194
5194
|
return n.object(...l);
|
|
5195
5195
|
}
|
|
@@ -5411,15 +5411,16 @@ const no = new ro(), so = Oe({
|
|
|
5411
5411
|
cacheKey: `node-schema-${this.node.type}`
|
|
5412
5412
|
});
|
|
5413
5413
|
e.valid ? this.errors = {} : this.errors = e.errors.reduce((t, r) => {
|
|
5414
|
-
|
|
5414
|
+
var h;
|
|
5415
|
+
const s = Us.get(
|
|
5415
5416
|
this.localNode,
|
|
5416
5417
|
r.instancePath
|
|
5417
5418
|
);
|
|
5418
|
-
if (r.parentSchema.format === "password" && s === "__PWD__")
|
|
5419
|
+
if (((h = r.parentSchema) == null ? void 0 : h.format) === "password" && s === "__PWD__")
|
|
5419
5420
|
return t;
|
|
5420
5421
|
{
|
|
5421
|
-
const
|
|
5422
|
-
return t[
|
|
5422
|
+
const o = `node${r.instancePath.replaceAll("/", ".")}`;
|
|
5423
|
+
return t[o] = r.message, t;
|
|
5423
5424
|
}
|
|
5424
5425
|
}, {});
|
|
5425
5426
|
}
|
|
@@ -5493,7 +5494,7 @@ function co(e, t, r, s, h, o) {
|
|
|
5493
5494
|
/* STABLE_FRAGMENT */
|
|
5494
5495
|
);
|
|
5495
5496
|
}
|
|
5496
|
-
const lo = /* @__PURE__ */ Re(so, [["render", co], ["__scopeId", "data-v-
|
|
5497
|
+
const lo = /* @__PURE__ */ Re(so, [["render", co], ["__scopeId", "data-v-df2dade4"]]), fo = Oe({
|
|
5497
5498
|
name: "NodeRedInputLabel",
|
|
5498
5499
|
props: {
|
|
5499
5500
|
label: {
|
|
@@ -5540,8 +5541,8 @@ function mo(e, t, r, s, h, o) {
|
|
|
5540
5541
|
e.required ? (Q(), re("span", ho, "*")) : ue("v-if", !0)
|
|
5541
5542
|
]);
|
|
5542
5543
|
}
|
|
5543
|
-
const
|
|
5544
|
-
components: { NodeRedInputLabel:
|
|
5544
|
+
const Te = /* @__PURE__ */ Re(fo, [["render", mo], ["__scopeId", "data-v-9ffd05ad"]]), Mn = "*************", yo = Oe({
|
|
5545
|
+
components: { NodeRedInputLabel: Te },
|
|
5545
5546
|
props: {
|
|
5546
5547
|
value: {
|
|
5547
5548
|
type: String,
|
|
@@ -5642,7 +5643,7 @@ const ps = /* @__PURE__ */ Re(yo, [["render", $o]]), wo = [
|
|
|
5642
5643
|
"node",
|
|
5643
5644
|
"cred"
|
|
5644
5645
|
], bo = Oe({
|
|
5645
|
-
components: { NodeRedInputLabel:
|
|
5646
|
+
components: { NodeRedInputLabel: Te },
|
|
5646
5647
|
props: {
|
|
5647
5648
|
value: {
|
|
5648
5649
|
type: Object,
|
|
@@ -5723,6 +5724,9 @@ const ps = /* @__PURE__ */ Re(yo, [["render", $o]]), wo = [
|
|
|
5723
5724
|
this.onChange();
|
|
5724
5725
|
});
|
|
5725
5726
|
},
|
|
5727
|
+
beforeUnmount() {
|
|
5728
|
+
this._observer && (this._observer.disconnect(), this._observer = null);
|
|
5729
|
+
},
|
|
5726
5730
|
methods: {
|
|
5727
5731
|
onChange() {
|
|
5728
5732
|
const e = this.$input.typedInput("value"), t = this.$input.typedInput("type");
|
|
@@ -5769,7 +5773,7 @@ function No(e, t, r, s, h, o) {
|
|
|
5769
5773
|
]);
|
|
5770
5774
|
}
|
|
5771
5775
|
const hs = /* @__PURE__ */ Re(bo, [["render", No]]), Oo = Oe({
|
|
5772
|
-
components: { NodeRedInputLabel:
|
|
5776
|
+
components: { NodeRedInputLabel: Te },
|
|
5773
5777
|
props: {
|
|
5774
5778
|
value: {
|
|
5775
5779
|
type: String,
|
|
@@ -5852,7 +5856,7 @@ function ko(e, t, r, s, h, o) {
|
|
|
5852
5856
|
]);
|
|
5853
5857
|
}
|
|
5854
5858
|
const ms = /* @__PURE__ */ Re(Oo, [["render", ko]]), qo = Oe({
|
|
5855
|
-
components: { NodeRedInputLabel:
|
|
5859
|
+
components: { NodeRedInputLabel: Te },
|
|
5856
5860
|
props: {
|
|
5857
5861
|
value: {
|
|
5858
5862
|
type: [String, Array],
|
|
@@ -5915,7 +5919,7 @@ const ms = /* @__PURE__ */ Re(Oo, [["render", ko]]), qo = Oe({
|
|
|
5915
5919
|
this.$emit("update:value", r);
|
|
5916
5920
|
});
|
|
5917
5921
|
}
|
|
5918
|
-
}),
|
|
5922
|
+
}), To = { style: { display: "flex", "flex-direction": "column", width: "100%" } }, Ao = {
|
|
5919
5923
|
ref: "selectInput",
|
|
5920
5924
|
type: "text",
|
|
5921
5925
|
class: "node-input-select",
|
|
@@ -5926,7 +5930,7 @@ const ms = /* @__PURE__ */ Re(Oo, [["render", ko]]), qo = Oe({
|
|
|
5926
5930
|
};
|
|
5927
5931
|
function Mo(e, t, r, s, h, o) {
|
|
5928
5932
|
const a = me("NodeRedInputLabel");
|
|
5929
|
-
return Q(), re("div",
|
|
5933
|
+
return Q(), re("div", To, [
|
|
5930
5934
|
Ce(e.$slots, "label", {}, () => [
|
|
5931
5935
|
e.label ? (Q(), $e(a, {
|
|
5932
5936
|
key: 0,
|
|
@@ -5937,7 +5941,7 @@ function Mo(e, t, r, s, h, o) {
|
|
|
5937
5941
|
]),
|
|
5938
5942
|
le(
|
|
5939
5943
|
"input",
|
|
5940
|
-
|
|
5944
|
+
Ao,
|
|
5941
5945
|
null,
|
|
5942
5946
|
512
|
|
5943
5947
|
/* NEED_PATCH */
|
|
@@ -5952,7 +5956,7 @@ function Mo(e, t, r, s, h, o) {
|
|
|
5952
5956
|
]);
|
|
5953
5957
|
}
|
|
5954
5958
|
const ys = /* @__PURE__ */ Re(qo, [["render", Mo]]), zo = Oe({
|
|
5955
|
-
components: { NodeRedInputLabel:
|
|
5959
|
+
components: { NodeRedInputLabel: Te },
|
|
5956
5960
|
props: {
|
|
5957
5961
|
value: {
|
|
5958
5962
|
type: String,
|
|
@@ -6176,7 +6180,7 @@ const ys = /* @__PURE__ */ Re(qo, [["render", Mo]]), zo = Oe({
|
|
|
6176
6180
|
ref: "container",
|
|
6177
6181
|
class: "container"
|
|
6178
6182
|
}, Co = { class: "editor-wrapper" }, Fo = ["id"];
|
|
6179
|
-
function
|
|
6183
|
+
function Uo(e, t, r, s, h, o) {
|
|
6180
6184
|
const a = me("NodeRedInputLabel");
|
|
6181
6185
|
return Q(), re(
|
|
6182
6186
|
"div",
|
|
@@ -6229,7 +6233,7 @@ function Lo(e, t, r, s, h, o) {
|
|
|
6229
6233
|
/* NEED_PATCH */
|
|
6230
6234
|
);
|
|
6231
6235
|
}
|
|
6232
|
-
const gs = /* @__PURE__ */ Re(zo, [["render",
|
|
6236
|
+
const gs = /* @__PURE__ */ Re(zo, [["render", Uo], ["__scopeId", "data-v-4077a6c2"]]), Lo = /* @__PURE__ */ new Set([
|
|
6233
6237
|
"id",
|
|
6234
6238
|
"type",
|
|
6235
6239
|
"x",
|
|
@@ -6355,7 +6359,7 @@ function zn(e, t, r) {
|
|
|
6355
6359
|
const Bo = Oe({
|
|
6356
6360
|
name: "NodeRedJsonSchemaForm",
|
|
6357
6361
|
components: {
|
|
6358
|
-
NodeRedInputLabel:
|
|
6362
|
+
NodeRedInputLabel: Te,
|
|
6359
6363
|
NodeRedInput: ps,
|
|
6360
6364
|
NodeRedSelectInput: ys,
|
|
6361
6365
|
NodeRedTypedInput: hs,
|
|
@@ -6381,7 +6385,7 @@ const Bo = Oe({
|
|
|
6381
6385
|
var t;
|
|
6382
6386
|
if (!((t = this.schema) != null && t.properties)) return [];
|
|
6383
6387
|
const e = new Set(this.schema.required ?? []);
|
|
6384
|
-
return Object.entries(this.schema.properties).filter(([r]) => !
|
|
6388
|
+
return Object.entries(this.schema.properties).filter(([r]) => !Lo.has(r)).map(
|
|
6385
6389
|
([r, s]) => zn(r, s, e.has(r))
|
|
6386
6390
|
);
|
|
6387
6391
|
},
|
|
@@ -6545,7 +6549,7 @@ function Xo(e, t, r, s) {
|
|
|
6545
6549
|
schema: r,
|
|
6546
6550
|
features: s
|
|
6547
6551
|
});
|
|
6548
|
-
return h.component("NodeRedInputLabel",
|
|
6552
|
+
return h.component("NodeRedInputLabel", Te), h.component("NodeRedInput", ps), h.component("NodeRedTypedInput", hs), h.component("NodeRedConfigInput", ms), h.component("NodeRedSelectInput", ys), h.component("NodeRedEditorInput", gs), h.component("NodeRedJsonSchemaForm", Vn), h.component("NodeRedNodeForm", (t == null ? void 0 : t.component) ?? Vn), h.config.globalProperties.$i18n = (o) => e._(`${e.type}.${o}`), h;
|
|
6549
6553
|
}
|
|
6550
6554
|
function xo(e, t, r, s, h) {
|
|
6551
6555
|
$(`#${h}`).empty(), e._newState = Ds(e), e._app = Xo(e._newState, t, r, s), e._app.mount(`#${h}`);
|
|
@@ -6557,7 +6561,7 @@ function Cn(e) {
|
|
|
6557
6561
|
const t = {
|
|
6558
6562
|
credentials: {}
|
|
6559
6563
|
};
|
|
6560
|
-
return Object.keys(e._def.defaults).forEach((r) => {
|
|
6564
|
+
return Object.keys(e._def.defaults ?? {}).forEach((r) => {
|
|
6561
6565
|
t[r] = e[r];
|
|
6562
6566
|
}), e._def.credentials && Object.keys(e._def.credentials).forEach((r) => {
|
|
6563
6567
|
var s, h;
|
|
@@ -6588,8 +6592,7 @@ async function ei(e) {
|
|
|
6588
6592
|
try {
|
|
6589
6593
|
let r = function() {
|
|
6590
6594
|
var v;
|
|
6591
|
-
|
|
6592
|
-
const y = (v = a.credentialsSchema) != null && v.properties ? {
|
|
6595
|
+
const y = a.configSchema && ((v = a.credentialsSchema) != null && v.properties) ? {
|
|
6593
6596
|
...a.configSchema,
|
|
6594
6597
|
properties: {
|
|
6595
6598
|
...a.configSchema.properties,
|
|
@@ -6609,7 +6612,7 @@ async function ei(e) {
|
|
|
6609
6612
|
nr(y);
|
|
6610
6613
|
const N = Cn(y._newState), c = Cn(y), v = vs(c, N), b = !!((f = Object.keys(v)) != null && f.length);
|
|
6611
6614
|
if (!b) return !1;
|
|
6612
|
-
if (Object.keys(y._def.defaults).forEach((p) => {
|
|
6615
|
+
if (Object.keys(y._def.defaults ?? {}).forEach((p) => {
|
|
6613
6616
|
var u, _;
|
|
6614
6617
|
if (!((_ = (u = y._def.defaults) == null ? void 0 : u[p]) != null && _.type)) return;
|
|
6615
6618
|
const n = y[p], d = y._newState[p];
|
|
@@ -6621,7 +6624,7 @@ async function ei(e) {
|
|
|
6621
6624
|
);
|
|
6622
6625
|
P !== -1 && w.users.splice(P, 1);
|
|
6623
6626
|
}
|
|
6624
|
-
}), Object.keys(y._def.defaults).forEach((p) => {
|
|
6627
|
+
}), Object.keys(y._def.defaults ?? {}).forEach((p) => {
|
|
6625
6628
|
var w, u;
|
|
6626
6629
|
if (!((u = (w = y._def.defaults) == null ? void 0 : w[p]) != null && u.type)) return;
|
|
6627
6630
|
const n = y._newState[p];
|
|
@@ -6631,7 +6634,7 @@ async function ei(e) {
|
|
|
6631
6634
|
(P) => P.id === y.id
|
|
6632
6635
|
) === -1 && d.users.push(y);
|
|
6633
6636
|
}), $s(y, N), e.category === "config") {
|
|
6634
|
-
Object.keys(y._def.defaults).forEach((p) => {
|
|
6637
|
+
Object.keys(y._def.defaults ?? {}).forEach((p) => {
|
|
6635
6638
|
if (y._def.defaults[p].type) return;
|
|
6636
6639
|
const n = `node-config-input-${p}`;
|
|
6637
6640
|
let d = $(`#${n}`);
|
|
@@ -6657,13 +6660,10 @@ async function ei(e) {
|
|
|
6657
6660
|
}, o = function() {
|
|
6658
6661
|
nr(this);
|
|
6659
6662
|
};
|
|
6660
|
-
console.log(`Registering node type: ${t}`);
|
|
6661
6663
|
const a = {
|
|
6662
6664
|
..._s[t] ?? {},
|
|
6663
6665
|
...e
|
|
6664
|
-
}, i = a.defaults ?? void 0, m = a.credentials ?? void 0
|
|
6665
|
-
console.log("defaults", i), console.log("credentials", m);
|
|
6666
|
-
const g = `nrg-app-${t}`;
|
|
6666
|
+
}, i = a.defaults ?? void 0, m = a.credentials ?? void 0, g = `nrg-app-${t}`;
|
|
6667
6667
|
$("<script>", {
|
|
6668
6668
|
type: "text/html",
|
|
6669
6669
|
"data-template-name": t,
|
|
@@ -6700,7 +6700,7 @@ async function ei(e) {
|
|
|
6700
6700
|
}
|
|
6701
6701
|
async function ai(e) {
|
|
6702
6702
|
try {
|
|
6703
|
-
|
|
6703
|
+
await Promise.all(e.map((t) => ei(t)));
|
|
6704
6704
|
} catch (t) {
|
|
6705
6705
|
throw console.error("Error registering node types:", t), t;
|
|
6706
6706
|
}
|