@zhangqingcq/vgce 0.1.29 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/style.css +1 -1
- package/dist/vgce.js +927 -923
- package/dist/vgce.umd.cjs +10 -10
- package/package.json +1 -1
- package/src/components/svg-editor/center-panel.vue +15 -6
- package/src/components/svg-editor/connection-panel.vue +1 -0
- package/src/components/svg-editor/handle-panel.vue +0 -1
- package/src/components/svg-editor/top-panel.vue +9 -4
- package/src/config/vue/component/common-table.ts +16 -16
- package/src/config/vue/echarts/pie-charts.ts +10 -10
- package/src/stores/system/index.ts +0 -2
package/dist/vgce.js
CHANGED
@@ -631,7 +631,7 @@ const t$q = {
|
|
631
631
|
val: [
|
632
632
|
{
|
633
633
|
prop: "date",
|
634
|
-
label: "
|
634
|
+
label: "序号",
|
635
635
|
width: "120px",
|
636
636
|
fixed: !1,
|
637
637
|
sortable: !1,
|
@@ -639,7 +639,7 @@ const t$q = {
|
|
639
639
|
},
|
640
640
|
{
|
641
641
|
prop: "name",
|
642
|
-
label: "
|
642
|
+
label: "名字",
|
643
643
|
width: "120px",
|
644
644
|
fixed: !1,
|
645
645
|
sortable: !1,
|
@@ -647,7 +647,7 @@ const t$q = {
|
|
647
647
|
},
|
648
648
|
{
|
649
649
|
prop: "address",
|
650
|
-
label: "
|
650
|
+
label: "年龄",
|
651
651
|
width: "280px",
|
652
652
|
fixed: !1,
|
653
653
|
sortable: !1,
|
@@ -660,31 +660,31 @@ const t$q = {
|
|
660
660
|
type: EConfigItemPropsType.JsonEdit,
|
661
661
|
val: [
|
662
662
|
{
|
663
|
-
date: "
|
664
|
-
name: "
|
665
|
-
address: "
|
663
|
+
date: "1",
|
664
|
+
name: "Jack",
|
665
|
+
address: "34"
|
666
666
|
},
|
667
667
|
{
|
668
|
-
date: "
|
669
|
-
name: "
|
670
|
-
address: "
|
668
|
+
date: "2",
|
669
|
+
name: "Marry",
|
670
|
+
address: "18"
|
671
671
|
},
|
672
672
|
{
|
673
|
-
date: "
|
674
|
-
name: "
|
675
|
-
address: "
|
673
|
+
date: "3",
|
674
|
+
name: "Lee",
|
675
|
+
address: "23"
|
676
676
|
},
|
677
677
|
{
|
678
|
-
date: "
|
679
|
-
name: "
|
680
|
-
address: "
|
678
|
+
date: "4",
|
679
|
+
name: "Steve",
|
680
|
+
address: "31"
|
681
681
|
}
|
682
682
|
]
|
683
683
|
},
|
684
684
|
width: {
|
685
685
|
title: "宽度",
|
686
686
|
type: EConfigItemPropsType.InputNumber,
|
687
|
-
val:
|
687
|
+
val: 350
|
688
688
|
},
|
689
689
|
height: {
|
690
690
|
title: "高度",
|
@@ -955,24 +955,24 @@ const t$q = {
|
|
955
955
|
type: EConfigItemPropsType.JsonEdit,
|
956
956
|
val: [
|
957
957
|
{
|
958
|
-
value:
|
959
|
-
name: "
|
958
|
+
value: 998,
|
959
|
+
name: "20岁以下"
|
960
960
|
},
|
961
961
|
{
|
962
|
-
value:
|
963
|
-
name: "
|
962
|
+
value: 546,
|
963
|
+
name: "20-40岁"
|
964
964
|
},
|
965
965
|
{
|
966
|
-
value:
|
967
|
-
name: "
|
966
|
+
value: 354,
|
967
|
+
name: "40-60岁"
|
968
968
|
},
|
969
969
|
{
|
970
|
-
value:
|
971
|
-
name: "
|
970
|
+
value: 421,
|
971
|
+
name: "60-70岁"
|
972
972
|
},
|
973
973
|
{
|
974
|
-
value:
|
975
|
-
name: "
|
974
|
+
value: 607,
|
975
|
+
name: "70岁以上"
|
976
976
|
}
|
977
977
|
]
|
978
978
|
}
|
@@ -5549,8 +5549,8 @@ function parseRichText(i, r) {
|
|
5549
5549
|
}
|
5550
5550
|
d < i.length && pushTokens(n, i.substring(d, i.length), r, c);
|
5551
5551
|
var _ = [], v = 0, g = 0, y = r.padding, b = u === "truncate", A = r.lineOverflow === "truncate";
|
5552
|
-
function w(Fe,
|
5553
|
-
Fe.width =
|
5552
|
+
function w(Fe, Oe, Lt) {
|
5553
|
+
Fe.width = Oe, Fe.lineHeight = Lt, v += Lt, g = Math.max(g, Oe);
|
5554
5554
|
}
|
5555
5555
|
e:
|
5556
5556
|
for (var S = 0; S < n.lines.length; S++) {
|
@@ -6032,17 +6032,17 @@ var PathProxy = function() {
|
|
6032
6032
|
break;
|
6033
6033
|
}
|
6034
6034
|
case CMD$2.C: {
|
6035
|
-
var _e = o[M++], ue = o[M++], Ie = o[M++], ze = o[M++], Fe = o[M++],
|
6035
|
+
var _e = o[M++], ue = o[M++], Ie = o[M++], ze = o[M++], Fe = o[M++], Oe = o[M++];
|
6036
6036
|
if (y) {
|
6037
6037
|
var D = b[S++];
|
6038
6038
|
if (w + D > T) {
|
6039
6039
|
var re = (T - w) / D;
|
6040
|
-
cubicSubdivide(p, _e, Ie, Fe, re, tmpOutX), cubicSubdivide(_, ue, ze,
|
6040
|
+
cubicSubdivide(p, _e, Ie, Fe, re, tmpOutX), cubicSubdivide(_, ue, ze, Oe, re, tmpOutY), r.bezierCurveTo(tmpOutX[1], tmpOutY[1], tmpOutX[2], tmpOutY[2], tmpOutX[3], tmpOutY[3]);
|
6041
6041
|
break e;
|
6042
6042
|
}
|
6043
6043
|
w += D;
|
6044
6044
|
}
|
6045
|
-
r.bezierCurveTo(_e, ue, Ie, ze, Fe,
|
6045
|
+
r.bezierCurveTo(_e, ue, Ie, ze, Fe, Oe), p = Fe, _ = Oe;
|
6046
6046
|
break;
|
6047
6047
|
}
|
6048
6048
|
case CMD$2.Q: {
|
@@ -6060,12 +6060,12 @@ var PathProxy = function() {
|
|
6060
6060
|
break;
|
6061
6061
|
}
|
6062
6062
|
case CMD$2.A:
|
6063
|
-
var Lt = o[M++], pe = o[M++], Cn = o[M++], In = o[M++], Dt = o[M++],
|
6063
|
+
var Lt = o[M++], pe = o[M++], Cn = o[M++], In = o[M++], Dt = o[M++], he = o[M++], Et = o[M++], hn = !o[M++], vn = Cn > In ? Cn : In, kt = mathAbs$1(Cn - In) > 1e-3, Ce = Dt + he, de = !1;
|
6064
6064
|
if (y) {
|
6065
6065
|
var D = b[S++];
|
6066
|
-
w + D > T && (Ce = Dt +
|
6066
|
+
w + D > T && (Ce = Dt + he * (T - w) / D, de = !0), w += D;
|
6067
6067
|
}
|
6068
|
-
if (kt && r.ellipse ? r.ellipse(Lt, pe, Cn, In, Et, Dt, Ce, hn) : r.arc(Lt, pe, vn, Dt, Ce, hn),
|
6068
|
+
if (kt && r.ellipse ? r.ellipse(Lt, pe, Cn, In, Et, Dt, Ce, hn) : r.arc(Lt, pe, vn, Dt, Ce, hn), de)
|
6069
6069
|
break e;
|
6070
6070
|
ie && (d = mathCos$3(Dt) * Cn + Lt, f = mathSin$3(Dt) * In + pe), p = mathCos$3(Ce) * Cn + Lt, _ = mathSin$3(Ce) * In + pe;
|
6071
6071
|
break;
|
@@ -6075,8 +6075,8 @@ var PathProxy = function() {
|
|
6075
6075
|
if (y) {
|
6076
6076
|
var D = b[S++];
|
6077
6077
|
if (w + D > T) {
|
6078
|
-
var
|
6079
|
-
r.moveTo(v, g), r.lineTo(v + mathMin$2(
|
6078
|
+
var Ve = T - w;
|
6079
|
+
r.moveTo(v, g), r.lineTo(v + mathMin$2(Ve, Ue), g), Ve -= Ue, Ve > 0 && r.lineTo(v + Ue, g + mathMin$2(Ve, Ne)), Ve -= Ne, Ve > 0 && r.lineTo(v + mathMax$2(Ue - Ve, 0), g + Ne), Ve -= Ue, Ve > 0 && r.lineTo(v, g + mathMax$2(Ne - Ve, 0));
|
6080
6080
|
break e;
|
6081
6081
|
}
|
6082
6082
|
w += D;
|
@@ -7445,31 +7445,31 @@ function buildPath$1(i, r) {
|
|
7445
7445
|
else if (y > PI2$2 - e)
|
7446
7446
|
i.moveTo(_ + o * mathCos$1(f), v + o * mathSin$1(f)), i.arc(_, v, o, f, p, !g), a > e && (i.moveTo(_ + a * mathCos$1(p), v + a * mathSin$1(p)), i.arc(_, v, a, p, f, g));
|
7447
7447
|
else {
|
7448
|
-
var A = void 0, w = void 0, S = void 0, T = void 0, x = void 0, L = void 0, O = void 0, M = void 0, k = void 0, ie = void 0, $ = void 0, Y = void 0, D = void 0, re = void 0, F = void 0, _e = void 0, ue = o * mathCos$1(f), Ie = o * mathSin$1(f), ze = a * mathCos$1(p), Fe = a * mathSin$1(p),
|
7449
|
-
if (
|
7448
|
+
var A = void 0, w = void 0, S = void 0, T = void 0, x = void 0, L = void 0, O = void 0, M = void 0, k = void 0, ie = void 0, $ = void 0, Y = void 0, D = void 0, re = void 0, F = void 0, _e = void 0, ue = o * mathCos$1(f), Ie = o * mathSin$1(f), ze = a * mathCos$1(p), Fe = a * mathSin$1(p), Oe = y > e;
|
7449
|
+
if (Oe) {
|
7450
7450
|
var Lt = r.cornerRadius;
|
7451
7451
|
Lt && (n = normalizeCornerRadius(Lt), A = n[0], w = n[1], S = n[2], T = n[3]);
|
7452
7452
|
var pe = mathAbs(o - a) / 2;
|
7453
7453
|
if (x = mathMin$1(pe, S), L = mathMin$1(pe, T), O = mathMin$1(pe, A), M = mathMin$1(pe, w), $ = k = mathMax$1(x, L), Y = ie = mathMax$1(O, M), (k > e || ie > e) && (D = o * mathCos$1(p), re = o * mathSin$1(p), F = a * mathCos$1(f), _e = a * mathSin$1(f), y < PI$3)) {
|
7454
7454
|
var Cn = intersect(ue, Ie, F, _e, D, re, ze, Fe);
|
7455
7455
|
if (Cn) {
|
7456
|
-
var In = ue - Cn[0], Dt = Ie - Cn[1],
|
7456
|
+
var In = ue - Cn[0], Dt = Ie - Cn[1], he = D - Cn[0], Et = re - Cn[1], hn = 1 / mathSin$1(mathACos((In * he + Dt * Et) / (mathSqrt(In * In + Dt * Dt) * mathSqrt(he * he + Et * Et))) / 2), vn = mathSqrt(Cn[0] * Cn[0] + Cn[1] * Cn[1]);
|
7457
7457
|
$ = mathMin$1(k, (o - vn) / (hn + 1)), Y = mathMin$1(ie, (a - vn) / (hn - 1));
|
7458
7458
|
}
|
7459
7459
|
}
|
7460
7460
|
}
|
7461
|
-
if (!
|
7461
|
+
if (!Oe)
|
7462
7462
|
i.moveTo(_ + ue, v + Ie);
|
7463
7463
|
else if ($ > e) {
|
7464
|
-
var kt = mathMin$1(S, $), Ce = mathMin$1(T, $),
|
7465
|
-
i.moveTo(_ +
|
7464
|
+
var kt = mathMin$1(S, $), Ce = mathMin$1(T, $), de = computeCornerTangents(F, _e, ue, Ie, o, kt, g), Ue = computeCornerTangents(D, re, ze, Fe, o, Ce, g);
|
7465
|
+
i.moveTo(_ + de.cx + de.x0, v + de.cy + de.y0), $ < k && kt === Ce ? i.arc(_ + de.cx, v + de.cy, $, mathATan2(de.y0, de.x0), mathATan2(Ue.y0, Ue.x0), !g) : (kt > 0 && i.arc(_ + de.cx, v + de.cy, kt, mathATan2(de.y0, de.x0), mathATan2(de.y1, de.x1), !g), i.arc(_, v, o, mathATan2(de.cy + de.y1, de.cx + de.x1), mathATan2(Ue.cy + Ue.y1, Ue.cx + Ue.x1), !g), Ce > 0 && i.arc(_ + Ue.cx, v + Ue.cy, Ce, mathATan2(Ue.y1, Ue.x1), mathATan2(Ue.y0, Ue.x0), !g));
|
7466
7466
|
} else
|
7467
7467
|
i.moveTo(_ + ue, v + Ie), i.arc(_, v, o, f, p, !g);
|
7468
|
-
if (!(a > e) || !
|
7468
|
+
if (!(a > e) || !Oe)
|
7469
7469
|
i.lineTo(_ + ze, v + Fe);
|
7470
7470
|
else if (Y > e) {
|
7471
|
-
var kt = mathMin$1(A, Y), Ce = mathMin$1(w, Y),
|
7472
|
-
i.lineTo(_ +
|
7471
|
+
var kt = mathMin$1(A, Y), Ce = mathMin$1(w, Y), de = computeCornerTangents(ze, Fe, D, re, a, -Ce, g), Ue = computeCornerTangents(ue, Ie, F, _e, a, -kt, g);
|
7472
|
+
i.lineTo(_ + de.cx + de.x0, v + de.cy + de.y0), Y < ie && kt === Ce ? i.arc(_ + de.cx, v + de.cy, Y, mathATan2(de.y0, de.x0), mathATan2(Ue.y0, Ue.x0), !g) : (Ce > 0 && i.arc(_ + de.cx, v + de.cy, Ce, mathATan2(de.y0, de.x0), mathATan2(de.y1, de.x1), !g), i.arc(_, v, a, mathATan2(de.cy + de.y1, de.cx + de.x1), mathATan2(Ue.cy + Ue.y1, Ue.cx + Ue.x1), g), kt > 0 && i.arc(_ + Ue.cx, v + Ue.cy, kt, mathATan2(Ue.y1, Ue.x1), mathATan2(Ue.y0, Ue.x0), !g));
|
7473
7473
|
} else
|
7474
7474
|
i.lineTo(_ + ze, v + Fe), i.arc(_, v, a, p, f, g);
|
7475
7475
|
}
|
@@ -13024,23 +13024,23 @@ function createOrUpdatePatternFromDecal(i, r) {
|
|
13024
13024
|
return;
|
13025
13025
|
for (var F = -L, _e = 0, ue = 0, Ie = 0; F < k.height; ) {
|
13026
13026
|
if (_e % 2 === 0) {
|
13027
|
-
for (var ze = ue / 2 % T.length, Fe = 0,
|
13027
|
+
for (var ze = ue / 2 % T.length, Fe = 0, Oe = 0, Lt = 0; Fe < k.width * 2; ) {
|
13028
13028
|
for (var pe = 0, re = 0; re < w[Ie].length; ++re)
|
13029
13029
|
pe += w[Ie][re];
|
13030
13030
|
if (pe <= 0)
|
13031
13031
|
break;
|
13032
|
-
if (
|
13033
|
-
var Cn = (1 - c.symbolSize) * 0.5, In = Fe + w[Ie][
|
13034
|
-
vn(In, Dt,
|
13032
|
+
if (Oe % 2 === 0) {
|
13033
|
+
var Cn = (1 - c.symbolSize) * 0.5, In = Fe + w[Ie][Oe] * Cn, Dt = F + S[_e] * Cn, he = w[Ie][Oe] * c.symbolSize, Et = S[_e] * c.symbolSize, hn = Lt / 2 % T[ze].length;
|
13034
|
+
vn(In, Dt, he, Et, T[ze][hn]);
|
13035
13035
|
}
|
13036
|
-
Fe += w[Ie][
|
13036
|
+
Fe += w[Ie][Oe], ++Lt, ++Oe, Oe === w[Ie].length && (Oe = 0);
|
13037
13037
|
}
|
13038
13038
|
++Ie, Ie === w.length && (Ie = 0);
|
13039
13039
|
}
|
13040
13040
|
F += S[_e], ++ue, ++_e, _e === S.length && (_e = 0);
|
13041
13041
|
}
|
13042
|
-
function vn(kt, Ce,
|
13043
|
-
var
|
13042
|
+
function vn(kt, Ce, de, Ue, Ne) {
|
13043
|
+
var Ve = a ? 1 : n, Pt = createSymbol(Ne, kt * Ve, Ce * Ve, de * Ve, Ue * Ve, c.color, c.symbolKeepAspect);
|
13044
13044
|
if (a) {
|
13045
13045
|
var jt = o.painter.renderOneToVNode(Pt);
|
13046
13046
|
jt && M.children.push(jt);
|
@@ -14691,14 +14691,14 @@ function prepareSeriesDataSchema(i, r) {
|
|
14691
14691
|
A < c && ue.push(A++);
|
14692
14692
|
}
|
14693
14693
|
each$4(ue, function(ze, Fe) {
|
14694
|
-
var
|
14695
|
-
if (f && F.type != null && (
|
14694
|
+
var Oe = b(ze);
|
14695
|
+
if (f && F.type != null && (Oe.type = F.type), w(defaults(Oe, F), Y, Fe), Oe.name == null && D) {
|
14696
14696
|
var Lt = D[Fe];
|
14697
14697
|
!isObject$3(Lt) && (Lt = {
|
14698
14698
|
name: Lt
|
14699
|
-
}),
|
14699
|
+
}), Oe.name = Oe.displayName = Lt.name, Oe.defaultTooltip = Lt.defaultTooltip;
|
14700
14700
|
}
|
14701
|
-
re && defaults(
|
14701
|
+
re && defaults(Oe.otherDims, re);
|
14702
14702
|
});
|
14703
14703
|
}
|
14704
14704
|
});
|
@@ -15311,10 +15311,10 @@ function createCSSAnimation(i, r, n, o) {
|
|
15311
15311
|
function A(T) {
|
15312
15312
|
var x = T[1], L = x.length, O = {}, M = {}, k = {}, ie = "animation-timing-function";
|
15313
15313
|
function $(vn, kt, Ce) {
|
15314
|
-
for (var
|
15315
|
-
var
|
15316
|
-
if (
|
15317
|
-
var Pt =
|
15314
|
+
for (var de = vn.getTracks(), Ue = vn.getMaxTime(), Ne = 0; Ne < de.length; Ne++) {
|
15315
|
+
var Ve = de[Ne];
|
15316
|
+
if (Ve.needsAnimate()) {
|
15317
|
+
var Pt = Ve.keyframes, jt = Ve.propName;
|
15318
15318
|
if (Ce && (jt = Ce(jt)), jt)
|
15319
15319
|
for (var _n = 0; _n < Pt.length; _n++) {
|
15320
15320
|
var oe = Pt[_n], le = Math.round(oe.time / Ue * 100) + "%", j = getEasingFunc(oe.easing), V = oe.rawValue;
|
@@ -15338,12 +15338,12 @@ function createCSSAnimation(i, r, n, o) {
|
|
15338
15338
|
var ze, Fe = !0;
|
15339
15339
|
for (var F in M) {
|
15340
15340
|
k[F] = k[F] || {};
|
15341
|
-
var
|
15342
|
-
|
15341
|
+
var Oe = !ze, Ie = M[F][ie];
|
15342
|
+
Oe && (ze = new PathProxy());
|
15343
15343
|
var Lt = ze.len();
|
15344
15344
|
ze.reset(), k[F].d = buildPathString(i, M[F], ze);
|
15345
15345
|
var pe = ze.len();
|
15346
|
-
if (!
|
15346
|
+
if (!Oe && Lt !== pe) {
|
15347
15347
|
Fe = !1;
|
15348
15348
|
break;
|
15349
15349
|
}
|
@@ -15355,17 +15355,17 @@ function createCSSAnimation(i, r, n, o) {
|
|
15355
15355
|
if (!o)
|
15356
15356
|
for (var Y = 0; Y < L; Y++) {
|
15357
15357
|
var D = x[Y], re = D.targetName;
|
15358
|
-
re === "style" && $(D, k, function(
|
15359
|
-
return ANIMATE_STYLE_MAP[
|
15358
|
+
re === "style" && $(D, k, function(de) {
|
15359
|
+
return ANIMATE_STYLE_MAP[de];
|
15360
15360
|
});
|
15361
15361
|
}
|
15362
15362
|
for (var Cn = keys(k), In = !0, Dt, Y = 1; Y < Cn.length; Y++) {
|
15363
|
-
var
|
15364
|
-
if (k[
|
15363
|
+
var he = Cn[Y - 1], Et = Cn[Y];
|
15364
|
+
if (k[he][transformOriginKey] !== k[Et][transformOriginKey]) {
|
15365
15365
|
In = !1;
|
15366
15366
|
break;
|
15367
15367
|
}
|
15368
|
-
Dt = k[
|
15368
|
+
Dt = k[he][transformOriginKey];
|
15369
15369
|
}
|
15370
15370
|
if (In && Dt) {
|
15371
15371
|
for (var F in k)
|
@@ -15929,7 +15929,7 @@ function pieLayout(i, r, n) {
|
|
15929
15929
|
viewRect: c,
|
15930
15930
|
r: _
|
15931
15931
|
}), a.each(u, function(ze, Fe) {
|
15932
|
-
var
|
15932
|
+
var Oe;
|
15933
15933
|
if (isNaN(ze)) {
|
15934
15934
|
a.setItemLayout(Fe, {
|
15935
15935
|
angle: NaN,
|
@@ -15943,10 +15943,10 @@ function pieLayout(i, r, n) {
|
|
15943
15943
|
});
|
15944
15944
|
return;
|
15945
15945
|
}
|
15946
|
-
O !== "area" ?
|
15947
|
-
var Lt = ue + ie *
|
15948
|
-
b >
|
15949
|
-
angle:
|
15946
|
+
O !== "area" ? Oe = T === 0 && M ? x : ze * x : Oe = re / S, Oe < w ? (Oe = w, F -= w) : _e += ze;
|
15947
|
+
var Lt = ue + ie * Oe, pe = 0, Cn = 0;
|
15948
|
+
b > Oe ? (pe = ue + ie * Oe / 2, Cn = pe) : (pe = ue + Y, Cn = Lt - Y), a.setItemLayout(Fe, {
|
15949
|
+
angle: Oe,
|
15950
15950
|
startAngle: pe,
|
15951
15951
|
endAngle: Cn,
|
15952
15952
|
clockwise: L,
|
@@ -15960,17 +15960,17 @@ function pieLayout(i, r, n) {
|
|
15960
15960
|
var Ie = re / S;
|
15961
15961
|
a.each(u, function(ze, Fe) {
|
15962
15962
|
if (!isNaN(ze)) {
|
15963
|
-
var
|
15964
|
-
|
15963
|
+
var Oe = a.getItemLayout(Fe);
|
15964
|
+
Oe.angle = Ie;
|
15965
15965
|
var Lt = 0, pe = 0;
|
15966
|
-
Ie < b ? (Lt = g + ie * (Fe + 1 / 2) * Ie, pe = Lt) : (Lt = g + ie * Fe * Ie + Y, pe = g + ie * (Fe + 1) * Ie - Y),
|
15966
|
+
Ie < b ? (Lt = g + ie * (Fe + 1 / 2) * Ie, pe = Lt) : (Lt = g + ie * Fe * Ie + Y, pe = g + ie * (Fe + 1) * Ie - Y), Oe.startAngle = Lt, Oe.endAngle = pe;
|
15967
15967
|
}
|
15968
15968
|
});
|
15969
15969
|
} else
|
15970
15970
|
x = F / _e, ue = g, a.each(u, function(ze, Fe) {
|
15971
15971
|
if (!isNaN(ze)) {
|
15972
|
-
var
|
15973
|
-
Lt < b ? (pe = ue + ie * Lt / 2, Cn = pe) : (pe = ue + Y, Cn = ue + ie * Lt - Y),
|
15972
|
+
var Oe = a.getItemLayout(Fe), Lt = Oe.angle === w ? w : ze * x, pe = 0, Cn = 0;
|
15973
|
+
Lt < b ? (pe = ue + ie * Lt / 2, Cn = pe) : (pe = ue + Y, Cn = ue + ie * Lt - Y), Oe.startAngle = pe, Oe.endAngle = Cn, ue += ie * Lt;
|
15974
15974
|
}
|
15975
15975
|
});
|
15976
15976
|
});
|
@@ -16094,24 +16094,24 @@ function pieLabelLayout(i) {
|
|
16094
16094
|
return !1;
|
16095
16095
|
}
|
16096
16096
|
r.each(function(M) {
|
16097
|
-
var k = r.getItemGraphicEl(M), ie = k.shape, $ = k.getTextContent(), Y = k.getTextGuideLine(), D = r.getItemModel(M), re = D.getModel("label"), F = re.get("position") || D.get(["emphasis", "label", "position"]), _e = re.get("distanceToLabelLine"), ue = re.get("alignTo"), Ie = parsePercent(re.get("edgeDistance"), p), ze = re.get("bleedMargin"), Fe = D.getModel("labelLine"),
|
16098
|
-
|
16097
|
+
var k = r.getItemGraphicEl(M), ie = k.shape, $ = k.getTextContent(), Y = k.getTextGuideLine(), D = r.getItemModel(M), re = D.getModel("label"), F = re.get("position") || D.get(["emphasis", "label", "position"]), _e = re.get("distanceToLabelLine"), ue = re.get("alignTo"), Ie = parsePercent(re.get("edgeDistance"), p), ze = re.get("bleedMargin"), Fe = D.getModel("labelLine"), Oe = Fe.get("length");
|
16098
|
+
Oe = parsePercent(Oe, p);
|
16099
16099
|
var Lt = Fe.get("length2");
|
16100
16100
|
if (Lt = parsePercent(Lt, p), Math.abs(ie.endAngle - ie.startAngle) < c) {
|
16101
16101
|
each$4($.states, y), $.ignore = !0, Y && (each$4(Y.states, y), Y.ignore = !0);
|
16102
16102
|
return;
|
16103
16103
|
}
|
16104
16104
|
if (b($)) {
|
16105
|
-
var pe = (ie.startAngle + ie.endAngle) / 2, Cn = Math.cos(pe), In = Math.sin(pe), Dt,
|
16105
|
+
var pe = (ie.startAngle + ie.endAngle) / 2, Cn = Math.cos(pe), In = Math.sin(pe), Dt, he, Et, hn;
|
16106
16106
|
o = ie.cx, a = ie.cy;
|
16107
16107
|
var vn = F === "inside" || F === "inner";
|
16108
16108
|
if (F === "center")
|
16109
|
-
Dt = ie.cx,
|
16109
|
+
Dt = ie.cx, he = ie.cy, hn = "center";
|
16110
16110
|
else {
|
16111
16111
|
var kt = (vn ? (ie.r + ie.r0) / 2 * Cn : ie.r * Cn) + o, Ce = (vn ? (ie.r + ie.r0) / 2 * In : ie.r * In) + a;
|
16112
|
-
if (Dt = kt + Cn * 3,
|
16113
|
-
var
|
16114
|
-
ue === "edge" ? Dt = Cn < 0 ? _ + Ie : _ + p - Ie : Dt = Ne + (Cn < 0 ? -_e : _e),
|
16112
|
+
if (Dt = kt + Cn * 3, he = Ce + In * 3, !vn) {
|
16113
|
+
var de = kt + Cn * (Oe + f - ie.r), Ue = Ce + In * (Oe + f - ie.r), Ne = de + (Cn < 0 ? -1 : 1) * Lt, Ve = Ue;
|
16114
|
+
ue === "edge" ? Dt = Cn < 0 ? _ + Ie : _ + p - Ie : Dt = Ne + (Cn < 0 ? -_e : _e), he = Ve, Et = [[kt, Ce], [de, Ue], [Ne, Ve]];
|
16115
16115
|
}
|
16116
16116
|
hn = vn ? "center" : ue === "edge" ? Cn > 0 ? "right" : "left" : Cn > 0 ? "left" : "right";
|
16117
16117
|
}
|
@@ -16129,7 +16129,7 @@ function pieLabelLayout(i) {
|
|
16129
16129
|
var j = In > 0;
|
16130
16130
|
j && (le = Pt + le), jt = le - Pt;
|
16131
16131
|
}
|
16132
|
-
if (u = !!jt, $.x = Dt, $.y =
|
16132
|
+
if (u = !!jt, $.x = Dt, $.y = he, $.rotation = jt, $.setStyle({
|
16133
16133
|
verticalAlign: "middle"
|
16134
16134
|
}), vn) {
|
16135
16135
|
$.setStyle({
|
@@ -16145,7 +16145,7 @@ function pieLabelLayout(i) {
|
|
16145
16145
|
label: $,
|
16146
16146
|
labelLine: Y,
|
16147
16147
|
position: F,
|
16148
|
-
len:
|
16148
|
+
len: Oe,
|
16149
16149
|
len2: Lt,
|
16150
16150
|
minTurnAngle: Fe.get("minTurnAngle"),
|
16151
16151
|
maxSurfaceAngle: Fe.get("maxSurfaceAngle"),
|
@@ -20324,13 +20324,13 @@ const useEditPrivateStore = defineStore("edit-private-store", {
|
|
20324
20324
|
},
|
20325
20325
|
actions: {
|
20326
20326
|
topUndoBtnClick() {
|
20327
|
-
if (
|
20327
|
+
if (this.history_now_index < 1)
|
20328
20328
|
return;
|
20329
20329
|
const i = useGlobalStore();
|
20330
20330
|
this.is_record_history = !1, this.history_now_index -= 1, i.setDoneJson(this.history_doneComponent[this.history_now_index]);
|
20331
20331
|
},
|
20332
20332
|
topRedoBtnClick() {
|
20333
|
-
if (
|
20333
|
+
if (this.history_now_index + 1 == this.history_doneComponent.length)
|
20334
20334
|
return;
|
20335
20335
|
const i = useGlobalStore();
|
20336
20336
|
this.is_record_history = !1, this.history_now_index += 1, i.setDoneJson(this.history_doneComponent[this.history_now_index]);
|
@@ -20438,7 +20438,7 @@ const useEditPrivateStore = defineStore("edit-private-store", {
|
|
20438
20438
|
}
|
20439
20439
|
});
|
20440
20440
|
var EVisibleConfKey = /* @__PURE__ */ ((i) => (i.ImportJson = "ImportJson", i.ExportJson = "ExportJson", i.ImportFile = "ImportFile", i))(EVisibleConfKey || {});
|
20441
|
-
const _withScopeId$2 = (i) => (pushScopeId("data-v-
|
20441
|
+
const _withScopeId$2 = (i) => (pushScopeId("data-v-e813974f"), i = i(), popScopeId(), i), _hoisted_1$d = {
|
20442
20442
|
class: "flex justify-between",
|
20443
20443
|
style: { width: "100%" }
|
20444
20444
|
}, _hoisted_2$b = {
|
@@ -20455,7 +20455,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
20455
20455
|
}, _hoisted_8$5 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", {
|
20456
20456
|
class: "font-bold mb-10px text-15px guide-title",
|
20457
20457
|
style: { "padding-top": "16px" }
|
20458
|
-
}, "多选", -1)), _hoisted_9$4 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", null, "在画布空白区域按住鼠标左键可以框选(图形中心点在框选区域即判定被选中),也可以按住ctrl+鼠标左键点图形进行多选", -1)), _hoisted_10$3 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", {
|
20458
|
+
}, "多选", -1)), _hoisted_9$4 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", null, "在画布空白区域按住鼠标左键可以框选(图形中心点在框选区域即判定被选中),也可以按住ctrl+鼠标左键点图形进行多选 ", -1)), _hoisted_10$3 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", {
|
20459
20459
|
class: "el-divider el-divider--horizontal",
|
20460
20460
|
role: "separator",
|
20461
20461
|
style: { "--el-border-style": "solid" }
|
@@ -20463,7 +20463,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
20463
20463
|
class: "el-divider el-divider--horizontal",
|
20464
20464
|
role: "separator",
|
20465
20465
|
style: { "--el-border-style": "solid" }
|
20466
|
-
}, null, -1)), _hoisted_14$1 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "font-bold mb-10px text-15px guide-title" }, "画布缩放", -1)), _hoisted_15$1 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", null, "在画布中使用鼠标滚轮或者右侧面板‘图纸’栏可控制画布缩放,鼠标滚轮以鼠标位置为缩放中心,图纸栏以图纸原点(默认在左上角)为缩放中心", -1)), _hoisted_16$1 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", {
|
20466
|
+
}, null, -1)), _hoisted_14$1 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "font-bold mb-10px text-15px guide-title" }, "画布缩放", -1)), _hoisted_15$1 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", null, "在画布中使用鼠标滚轮或者右侧面板‘图纸’栏可控制画布缩放,鼠标滚轮以鼠标位置为缩放中心,图纸栏以图纸原点(默认在左上角)为缩放中心 ", -1)), _hoisted_16$1 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", {
|
20467
20467
|
class: "el-divider el-divider--horizontal",
|
20468
20468
|
role: "separator",
|
20469
20469
|
style: { "--el-border-style": "solid" }
|
@@ -20518,7 +20518,9 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
20518
20518
|
}, p = ref(!1), _ = computed({
|
20519
20519
|
get: () => o.intention === EGlobalStoreIntention.Connection,
|
20520
20520
|
set(v) {
|
20521
|
-
o.intention = v ? EGlobalStoreIntention.Connection : EGlobalStoreIntention.None, v && o.
|
20521
|
+
o.intention = v ? EGlobalStoreIntention.Connection : EGlobalStoreIntention.None, v && (o.done_json.forEach((g) => {
|
20522
|
+
g != null && g.selected && (g.selected = !1);
|
20523
|
+
}), o.setHandleSvgInfo(null));
|
20522
20524
|
}
|
20523
20525
|
});
|
20524
20526
|
return (v, g) => (openBlock(), createElementBlock(Fragment, null, [
|
@@ -20739,7 +20741,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
20739
20741
|
}, 8, ["modelValue"])
|
20740
20742
|
], 64));
|
20741
20743
|
}
|
20742
|
-
}),
|
20744
|
+
}), topPanel_vue_vue_type_style_index_0_scoped_e813974f_lang = "", TopPanel = /* @__PURE__ */ _export_sfc$1(_sfc_main$D, [["__scopeId", "data-v-e813974f"]]), _hoisted_1$c = { class: "component-group flex flex-wrap" }, _hoisted_2$a = ["onDragstart", "title"], _sfc_main$C = /* @__PURE__ */ defineComponent({
|
20743
20745
|
__name: "left-panel",
|
20744
20746
|
props: {
|
20745
20747
|
customToolbar: {}
|
@@ -20919,7 +20921,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
20919
20921
|
},
|
20920
20922
|
setup(i) {
|
20921
20923
|
useCssVars((g) => ({
|
20922
|
-
|
20924
|
+
f075dd6c: unref(c)
|
20923
20925
|
}));
|
20924
20926
|
const r = i, n = useGlobalStore(pinia), o = useConfigStore(pinia), a = useSvgEditLayoutStore(pinia), u = ref(4), c = ref("#ab712e"), d = [
|
20925
20927
|
{
|
@@ -20971,7 +20973,6 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
20971
20973
|
type: EScaleInfoType.BottomRight
|
20972
20974
|
}
|
20973
20975
|
], f = computed(() => r.itemInfo.config.can_zoom), p = (g, y) => {
|
20974
|
-
console.log("handMousedown", y);
|
20975
20976
|
const { clientX: b, clientY: A } = y;
|
20976
20977
|
y.stopPropagation(), n.intention = EGlobalStoreIntention.Zoom;
|
20977
20978
|
const w = Math.round(
|
@@ -21158,7 +21159,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21158
21159
|
])
|
21159
21160
|
]));
|
21160
21161
|
}
|
21161
|
-
}),
|
21162
|
+
}), handlePanel_vue_vue_type_style_index_0_scoped_521db5d2_lang = "", HandlePanel = /* @__PURE__ */ _export_sfc$1(_sfc_main$B, [["__scopeId", "data-v-521db5d2"]]), _hoisted_1$a = ["fill"], _hoisted_2$8 = ["cx", "cy", "r"], _hoisted_3$7 = ["cx", "cy", "r"], _hoisted_4$6 = ["cx", "cy", "r"], _hoisted_5$4 = ["cx", "cy", "r"], _hoisted_6$3 = ["cx", "cy", "r"], _hoisted_7$3 = ["cx", "cy", "r"], _hoisted_8$3 = ["cx", "cy", "r"], _hoisted_9$2 = ["cx", "cy", "r"], _sfc_main$A = /* @__PURE__ */ defineComponent({
|
21162
21163
|
__name: "connection-panel",
|
21163
21164
|
props: {
|
21164
21165
|
itemInfo: {}
|
@@ -21193,7 +21194,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21193
21194
|
})));
|
21194
21195
|
}, S = (T, x) => {
|
21195
21196
|
var L;
|
21196
|
-
c.intention === EGlobalStoreIntention.None ? (createLine(T, x, r.itemInfo), c.handle_svg_info && (c.handle_svg_info.info.props.point_position.val.length !== 1 ? c.handle_svg_info.info.props.point_position.val.push({
|
21197
|
+
T.stopPropagation(), c.intention === EGlobalStoreIntention.None ? (createLine(T, x, r.itemInfo), c.handle_svg_info && (c.handle_svg_info.info.props.point_position.val.length !== 1 ? c.handle_svg_info.info.props.point_position.val.push({
|
21197
21198
|
x: c.mouse_info.new_position_x - c.mouse_info.position_x - d.center_offset.x,
|
21198
21199
|
y: c.mouse_info.new_position_y - c.mouse_info.position_y - d.center_offset.y
|
21199
21200
|
}) : c.handle_svg_info.info.props.point_position.val.push({
|
@@ -21292,7 +21293,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21292
21293
|
], 32)
|
21293
21294
|
], 8, _hoisted_1$a));
|
21294
21295
|
}
|
21295
|
-
}),
|
21296
|
+
}), connectionPanel_vue_vue_type_style_index_0_scoped_065d9ea1_lang = "", ConnectionPanel = /* @__PURE__ */ _export_sfc$1(_sfc_main$A, [["__scopeId", "data-v-065d9ea1"]]), _hoisted_1$9 = ["d", "stroke-width"], _hoisted_2$7 = ["d", "stroke-width"], _hoisted_3$6 = ["id", "d", "stroke", "stroke-width", "stroke-dasharray"], _hoisted_4$5 = ["from", "to", "dur", "repeatCount"], _hoisted_5$3 = ["d", "stroke", "stroke-width", "stroke-dasharray"], _hoisted_6$2 = ["from", "to", "dur", "repeatCount"], _hoisted_7$2 = ["r", "fill"], _hoisted_8$2 = ["path", "dur", "repeatCount"], _hoisted_9$1 = ["cx", "cy", "r", "stroke-width"], _hoisted_10$1 = ["cx", "cy", "r", "stroke", "onMousedown"], _sfc_main$z = /* @__PURE__ */ defineComponent({
|
21296
21297
|
__name: "connection-line",
|
21297
21298
|
props: {
|
21298
21299
|
itemInfo: {},
|
@@ -21453,8 +21454,8 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21453
21454
|
vueComp: {}
|
21454
21455
|
},
|
21455
21456
|
setup(i, { expose: r }) {
|
21456
|
-
useCssVars((
|
21457
|
-
"
|
21457
|
+
useCssVars((Oe) => ({
|
21458
|
+
"04e68382": unref(v)
|
21458
21459
|
}));
|
21459
21460
|
const n = useGlobalStore(pinia), o = useConfigStore(pinia), a = useSvgEditLayoutStore(pinia), u = useEditPrivateStore(pinia), c = useContextMenuStore(pinia);
|
21460
21461
|
componentsRegister(i.vueComp);
|
@@ -21493,13 +21494,13 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21493
21494
|
x: 0,
|
21494
21495
|
y: 0
|
21495
21496
|
}), A = computed(() => {
|
21496
|
-
let
|
21497
|
+
let Oe = 0;
|
21497
21498
|
for (let Lt of n.done_json)
|
21498
|
-
Lt.selected &&
|
21499
|
-
return
|
21499
|
+
Lt.selected && Oe++;
|
21500
|
+
return Oe > 0;
|
21500
21501
|
});
|
21501
21502
|
let w = !1, S = !1;
|
21502
|
-
const T = (
|
21503
|
+
const T = (Oe) => {
|
21503
21504
|
var Lt;
|
21504
21505
|
if (n.intention != EGlobalStoreIntention.None) {
|
21505
21506
|
if (n.intention == EGlobalStoreIntention.Create) {
|
@@ -21507,7 +21508,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21507
21508
|
console.error("要创建的数据获取失败");
|
21508
21509
|
return;
|
21509
21510
|
}
|
21510
|
-
const pe = Math.floor(
|
21511
|
+
const pe = Math.floor(Oe.offsetX / o.svg.scale - a.center_offset.x), Cn = Math.floor(Oe.offsetY / o.svg.scale - a.center_offset.y), In = {
|
21511
21512
|
id: randomString(),
|
21512
21513
|
x: pe,
|
21513
21514
|
y: Cn,
|
@@ -21569,26 +21570,29 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21569
21570
|
}
|
21570
21571
|
(Lt = p.value) == null || Lt.focus();
|
21571
21572
|
}
|
21572
|
-
}, x = (
|
21573
|
-
|
21574
|
-
}, L = (
|
21575
|
-
|
21576
|
-
}, O = (
|
21573
|
+
}, x = (Oe) => {
|
21574
|
+
Oe.preventDefault();
|
21575
|
+
}, L = (Oe) => {
|
21576
|
+
Oe.preventDefault();
|
21577
|
+
}, O = (Oe, Lt, pe) => {
|
21577
21578
|
var Cn, In, Dt;
|
21578
21579
|
if ((Cn = p.value) == null || Cn.focus(), n.intention === EGlobalStoreIntention.Connection) {
|
21579
|
-
if (pe.stopPropagation(), n.handle_svg_info)
|
21580
|
+
if (pe.stopPropagation(), n.handle_svg_info || createLine(pe), n.handle_svg_info)
|
21580
21581
|
if (pe.button === 0) {
|
21581
|
-
const
|
21582
|
-
|
21582
|
+
const he = n.handle_svg_info.info.props.point_position.val;
|
21583
|
+
he.length !== 1 && (Oe == null ? void 0 : Oe.type) !== EDoneJsonType.ConnectionLine ? he.push({
|
21583
21584
|
x: n.mouse_info.new_position_x - n.mouse_info.position_x - a.center_offset.x,
|
21584
21585
|
y: n.mouse_info.new_position_y - n.mouse_info.position_y - a.center_offset.y
|
21586
|
+
}) : n.handle_svg_info.info.props.point_position.val.push({
|
21587
|
+
x: 0,
|
21588
|
+
y: 0
|
21585
21589
|
});
|
21586
21590
|
} else
|
21587
21591
|
pe.button === 2 && (n.intention = EGlobalStoreIntention.None, setSvgActualInfo(n.done_json[n.handle_svg_info.index]), n.setHandleSvgInfo(null));
|
21588
21592
|
return;
|
21589
21593
|
}
|
21590
21594
|
if (pe.preventDefault(), pe.stopPropagation(), pe.ctrlKey && pe.button === 0)
|
21591
|
-
((In = n.handle_svg_info) != null && In.index || ((Dt = n.handle_svg_info) == null ? void 0 : Dt.index) === 0) && (n.done_json[n.handle_svg_info.index].selected = !0, n.setHandleSvgInfo(null), n.intention = EGlobalStoreIntention.None),
|
21595
|
+
((In = n.handle_svg_info) != null && In.index || ((Dt = n.handle_svg_info) == null ? void 0 : Dt.index) === 0) && (n.done_json[n.handle_svg_info.index].selected = !0, n.setHandleSvgInfo(null), n.intention = EGlobalStoreIntention.None), Oe.selected = !Oe.selected;
|
21592
21596
|
else if (A.value) {
|
21593
21597
|
n.intention = EGlobalStoreIntention.GroupMove, n.mouse_info = {
|
21594
21598
|
state: EMouseInfoState.Down,
|
@@ -21599,47 +21603,47 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21599
21603
|
new_position_x: 0,
|
21600
21604
|
new_position_y: 0
|
21601
21605
|
};
|
21602
|
-
for (let
|
21603
|
-
|
21604
|
-
x:
|
21605
|
-
y:
|
21606
|
-
},
|
21606
|
+
for (let he of n.done_json)
|
21607
|
+
he.selected && (he.old_position = {
|
21608
|
+
x: he.x,
|
21609
|
+
y: he.y
|
21610
|
+
}, he.point_coordinate_old = objectDeepClone(he.point_coordinate));
|
21607
21611
|
} else
|
21608
|
-
n.intention = EGlobalStoreIntention.Select, n.setHandleSvgInfo(
|
21612
|
+
n.intention = EGlobalStoreIntention.Select, n.setHandleSvgInfo(Oe, Lt), n.mouse_info = {
|
21609
21613
|
state: EMouseInfoState.Down,
|
21610
21614
|
position_x: Math.round((pe.clientX - a.canvasInfo.left) / o.svg.scale),
|
21611
21615
|
position_y: Math.round((pe.clientY - a.canvasInfo.top) / o.svg.scale),
|
21612
|
-
now_position_x:
|
21613
|
-
now_position_y:
|
21616
|
+
now_position_x: Oe.x,
|
21617
|
+
now_position_y: Oe.y,
|
21614
21618
|
new_position_x: 0,
|
21615
21619
|
new_position_y: 0
|
21616
|
-
},
|
21617
|
-
}, M = (
|
21620
|
+
}, Oe.point_coordinate_old = objectDeepClone(Oe.point_coordinate);
|
21621
|
+
}, M = (Oe, Lt, pe) => {
|
21618
21622
|
if (!(n.intention === EGlobalStoreIntention.Connection || n.mouse_info.state != EMouseInfoState.Down) && A.value && !w && ["SelectArea", "Move", "Select"].indexOf(n.intention) < 0) {
|
21619
21623
|
for (let Cn of n.done_json)
|
21620
21624
|
Cn.selected = !1, Cn.old_position = {
|
21621
21625
|
x: 0,
|
21622
21626
|
y: 0
|
21623
21627
|
}, resetHandlePointOld(Cn);
|
21624
|
-
n.intention = EGlobalStoreIntention.Select, n.setHandleSvgInfo(
|
21628
|
+
n.intention = EGlobalStoreIntention.Select, n.setHandleSvgInfo(Oe, Lt), n.mouse_info = {
|
21625
21629
|
state: EMouseInfoState.Down,
|
21626
21630
|
position_x: Math.round((pe.clientX - a.canvasInfo.left) / o.svg.scale),
|
21627
21631
|
position_y: Math.round((pe.clientY - a.canvasInfo.top) / o.svg.scale),
|
21628
|
-
now_position_x:
|
21629
|
-
now_position_y:
|
21632
|
+
now_position_x: Oe.x,
|
21633
|
+
now_position_y: Oe.y,
|
21630
21634
|
new_position_x: 0,
|
21631
21635
|
new_position_y: 0
|
21632
21636
|
};
|
21633
21637
|
}
|
21634
|
-
}, k = (
|
21635
|
-
pe.preventDefault(), pe.stopPropagation(), g.connection_panel = !0, g.connection_line = !0, !((n.intention === EGlobalStoreIntention.Connection || n.intention === EGlobalStoreIntention.SetConnectionLineNode) &&
|
21636
|
-
}, ie = (
|
21637
|
-
pe.preventDefault(), pe.stopPropagation(), !((n.intention === EGlobalStoreIntention.Connection || n.intention === EGlobalStoreIntention.SetConnectionLineNode) &&
|
21638
|
-
}, $ = (
|
21639
|
-
var Dt,
|
21638
|
+
}, k = (Oe, Lt, pe) => {
|
21639
|
+
pe.preventDefault(), pe.stopPropagation(), g.connection_panel = !0, g.connection_line = !0, !((n.intention === EGlobalStoreIntention.Connection || n.intention === EGlobalStoreIntention.SetConnectionLineNode) && Oe.type === EDoneJsonType.ConnectionLine) && (g.select_item.info = Oe, g.select_item.index = Lt);
|
21640
|
+
}, ie = (Oe, Lt, pe) => {
|
21641
|
+
pe.preventDefault(), pe.stopPropagation(), !((n.intention === EGlobalStoreIntention.Connection || n.intention === EGlobalStoreIntention.SetConnectionLineNode) && Oe.type === EDoneJsonType.ConnectionLine) && (g.connection_panel = !1, g.connection_line = !1, g.select_item.info = null, g.select_item.index = -1);
|
21642
|
+
}, $ = (Oe) => {
|
21643
|
+
var Dt, he, Et, hn, vn, kt, Ce, de, Ue, Ne, Ve, Pt, jt, _n, oe, le;
|
21640
21644
|
if (n.mouse_info.state != EMouseInfoState.Down && n.intention !== EGlobalStoreIntention.Connection)
|
21641
21645
|
return;
|
21642
|
-
const { clientX: Lt, clientY: pe } =
|
21646
|
+
const { clientX: Lt, clientY: pe } = Oe;
|
21643
21647
|
n.mouse_info.new_position_x = Math.round(
|
21644
21648
|
(Lt - a.canvasInfo.left) / o.svg.scale
|
21645
21649
|
), n.mouse_info.new_position_y = Math.round(
|
@@ -21655,7 +21659,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21655
21659
|
x: Cn,
|
21656
21660
|
y: In
|
21657
21661
|
}, n.intention = EGlobalStoreIntention.Move, moveHandlePoint(n.handle_svg_info.info), moveAnchors(n.handle_svg_info.info), n.handle_svg_info.info.type === EDoneJsonType.ConnectionLine) {
|
21658
|
-
if ((
|
21662
|
+
if ((he = n.handle_svg_info.info.bind_anchors) != null && he.start) {
|
21659
21663
|
let j = null;
|
21660
21664
|
for (let V of n.done_json)
|
21661
21665
|
V.id === ((hn = (Et = n.handle_svg_info.info.bind_anchors) == null ? void 0 : Et.start) == null ? void 0 : hn.target_id) && (j = V);
|
@@ -21684,7 +21688,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21684
21688
|
if (j.x = V, j.y = z, j.client = {
|
21685
21689
|
x: V,
|
21686
21690
|
y: z
|
21687
|
-
}, moveHandlePoint(j), moveAnchors(j), j.type === EDoneJsonType.ConnectionLine && ((
|
21691
|
+
}, moveHandlePoint(j), moveAnchors(j), j.type === EDoneJsonType.ConnectionLine && ((de = j.bind_anchors) != null && de.end)) {
|
21688
21692
|
let ae = null;
|
21689
21693
|
for (let xe of n.done_json)
|
21690
21694
|
xe.id === ((Ne = (Ue = j.bind_anchors) == null ? void 0 : Ue.end) == null ? void 0 : Ne.target_id) && (ae = xe);
|
@@ -21771,12 +21775,12 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21771
21775
|
2
|
21772
21776
|
);
|
21773
21777
|
} else if (n.intention === EGlobalStoreIntention.Connection && n.handle_svg_info) {
|
21774
|
-
const j = (
|
21778
|
+
const j = (Ve = n.handle_svg_info) == null ? void 0 : Ve.info.props.point_position.val.length, V = n.mouse_info.new_position_x - n.mouse_info.position_x - a.center_offset.x, z = n.mouse_info.new_position_y - n.mouse_info.position_y - a.center_offset.y, ae = n.handle_svg_info.info.props.point_position.val[j - 2], xe = ((jt = (Pt = n.handle_svg_info) == null ? void 0 : Pt.info.props.point_r) == null ? void 0 : jt.val) + 2 || 4;
|
21775
21779
|
let qe = ae.x < V ? -xe : ae.x > V ? xe : 0, bn = ae.y < z ? -xe : ae.y > z ? xe : 0;
|
21776
|
-
|
21780
|
+
Oe.ctrlKey ? n.handle_svg_info.info.props.point_position.val[j - 1] = {
|
21777
21781
|
x: ae.x,
|
21778
21782
|
y: z + bn
|
21779
|
-
} :
|
21783
|
+
} : Oe.shiftKey ? n.handle_svg_info.info.props.point_position.val[j - 1] = {
|
21780
21784
|
x: V + qe,
|
21781
21785
|
y: ae.y
|
21782
21786
|
} : n.handle_svg_info.info.props.point_position.val[j - 1] = {
|
@@ -21801,9 +21805,9 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21801
21805
|
};
|
21802
21806
|
}
|
21803
21807
|
}, Y = () => {
|
21804
|
-
var
|
21808
|
+
var Oe, Lt, pe, Cn;
|
21805
21809
|
if (n.mouse_info.state == EMouseInfoState.Down) {
|
21806
|
-
if ((
|
21810
|
+
if ((Oe = n.handle_svg_info) != null && Oe.info && n.intention == EGlobalStoreIntention.Move)
|
21807
21811
|
setSvgActualInfo(n.done_json[n.handle_svg_info.index]), n.intention = EGlobalStoreIntention.None, n.setDoneJson(n.done_json);
|
21808
21812
|
else if (n.intention == EGlobalStoreIntention.GroupMove) {
|
21809
21813
|
if (w) {
|
@@ -21843,19 +21847,19 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21843
21847
|
new_position_y: 0
|
21844
21848
|
}, c.display = !1;
|
21845
21849
|
}
|
21846
|
-
}, D = (
|
21847
|
-
const { clientX: Lt, clientY: pe } =
|
21850
|
+
}, D = (Oe) => {
|
21851
|
+
const { clientX: Lt, clientY: pe } = Oe;
|
21848
21852
|
if (n.intention === EGlobalStoreIntention.Connection) {
|
21849
|
-
n.handle_svg_info || createLine(
|
21853
|
+
n.handle_svg_info || createLine(Oe), n.handle_svg_info && (Oe.button === 0 ? n.handle_svg_info.info.props.point_position.val.length !== 1 ? n.handle_svg_info.info.props.point_position.val.push({
|
21850
21854
|
x: n.mouse_info.new_position_x - n.mouse_info.position_x - a.center_offset.x,
|
21851
21855
|
y: n.mouse_info.new_position_y - n.mouse_info.position_y - a.center_offset.y
|
21852
21856
|
}) : n.handle_svg_info.info.props.point_position.val.push({
|
21853
21857
|
x: 0,
|
21854
21858
|
y: 0
|
21855
|
-
}) :
|
21859
|
+
}) : Oe.button === 2 && (n.intention = EGlobalStoreIntention.None, setSvgActualInfo(n.done_json[n.handle_svg_info.index]), n.setHandleSvgInfo(null)));
|
21856
21860
|
return;
|
21857
21861
|
}
|
21858
|
-
|
21862
|
+
Oe.button === 0 ? (n.intention = EGlobalStoreIntention.SelectArea, n.mouse_info = {
|
21859
21863
|
state: EMouseInfoState.Down,
|
21860
21864
|
position_x: Math.round(
|
21861
21865
|
(Lt - a.canvasInfo.left) / o.svg.scale - a.center_offset.x
|
@@ -21876,7 +21880,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21876
21880
|
x: 0,
|
21877
21881
|
y: 0
|
21878
21882
|
}
|
21879
|
-
}) :
|
21883
|
+
}) : Oe.button === 2 && (n.intention = EGlobalStoreIntention.MoveCanvas, n.mouse_info = {
|
21880
21884
|
state: EMouseInfoState.Down,
|
21881
21885
|
position_x: Math.round((Lt - a.canvasInfo.left) / o.svg.scale),
|
21882
21886
|
position_y: Math.round((pe - a.canvasInfo.top) / o.svg.scale),
|
@@ -21886,56 +21890,56 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21886
21890
|
new_position_y: 0
|
21887
21891
|
});
|
21888
21892
|
};
|
21889
|
-
function re(
|
21890
|
-
|
21891
|
-
}
|
21892
|
-
const F = (
|
21893
|
-
|
21894
|
-
}, _e = (
|
21895
|
-
n.intention !== EGlobalStoreIntention.Connection && f.value && (n.intention = EGlobalStoreIntention.ContextMenu, n.setHandleSvgInfo(
|
21896
|
-
}, ue = (
|
21897
|
-
x: myFixed(
|
21898
|
-
y: myFixed(
|
21899
|
-
width: myFixed(
|
21900
|
-
height: myFixed(
|
21901
|
-
}), Ie = (
|
21902
|
-
|
21893
|
+
function re(Oe) {
|
21894
|
+
Oe != null && Oe.wheelDelta && (Oe.wheelDelta > 0 ? (o.svg.scale = myFixed(o.svg.scale + 0.1, 1), getZoomPosition(Oe, o.svg.scale, a.center_offset, !0)) : o.svg.scale > 0.1 && (o.svg.scale = myFixed(o.svg.scale - 0.1, 1), getZoomPosition(Oe, o.svg.scale, a.center_offset, !1)));
|
21895
|
+
}
|
21896
|
+
const F = (Oe) => {
|
21897
|
+
Oe.stopPropagation(), Oe.preventDefault();
|
21898
|
+
}, _e = (Oe, Lt, pe) => {
|
21899
|
+
n.intention !== EGlobalStoreIntention.Connection && f.value && (n.intention = EGlobalStoreIntention.ContextMenu, n.setHandleSvgInfo(Oe, Lt), f.value.style.left = pe.pageX + "px", f.value.style.top = pe.pageY + "px", c.info.MoveUpOneLevel.enable = c.info.MoveUpTopLevel.enable = c.info.MoveDownOneLevel.enable = c.info.MoveDownTopLevel.enable = !0, Lt === n.done_json.length - 1 && (c.info.MoveUpOneLevel.enable = c.info.MoveUpTopLevel.enable = !1), Lt === 0 && (c.info.MoveDownOneLevel.enable = c.info.MoveDownTopLevel.enable = !1), c.display = !0);
|
21900
|
+
}, ue = (Oe, Lt, pe) => ({
|
21901
|
+
x: myFixed(Oe.x - Oe.width / 2 * Lt + Oe.width / 2, 1),
|
21902
|
+
y: myFixed(Oe.y - Oe.height / 2 * pe + Oe.height / 2, 1),
|
21903
|
+
width: myFixed(Oe.width * Lt, 1),
|
21904
|
+
height: myFixed(Oe.height * pe, 1)
|
21905
|
+
}), Ie = (Oe) => {
|
21906
|
+
Oe.preventDefault();
|
21903
21907
|
let Lt = [];
|
21904
|
-
if (!
|
21908
|
+
if (!Oe.ctrlKey && ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].indexOf(Oe.key) > -1 && (A.value ? Lt = n.done_json.map((pe, Cn) => ({
|
21905
21909
|
selected: pe.selected,
|
21906
21910
|
i: Cn
|
21907
|
-
})).filter((pe) => pe.selected).map((pe) => pe.i) : n.handle_svg_info && Lt.push(n.handle_svg_info.index)), !
|
21911
|
+
})).filter((pe) => pe.selected).map((pe) => pe.i) : n.handle_svg_info && Lt.push(n.handle_svg_info.index)), !Oe.ctrlKey && Oe.key == "ArrowUp") {
|
21908
21912
|
for (let pe of Lt)
|
21909
21913
|
n.done_json[pe].y -= 1, n.done_json[pe].client.y -= 1, moveHandlePoint(n.done_json[pe], 0, -1), moveAnchors(n.done_json[pe]);
|
21910
21914
|
useHistoryRecord(n.done_json);
|
21911
|
-
} else if (!
|
21915
|
+
} else if (!Oe.ctrlKey && Oe.key == "ArrowDown") {
|
21912
21916
|
for (let pe of Lt)
|
21913
21917
|
n.done_json[pe].y += 1, n.done_json[pe].client.y += 1, moveHandlePoint(n.done_json[pe], 0, 1), moveAnchors(n.done_json[pe]);
|
21914
21918
|
useHistoryRecord(n.done_json);
|
21915
|
-
} else if (!
|
21919
|
+
} else if (!Oe.ctrlKey && Oe.key == "ArrowLeft") {
|
21916
21920
|
for (let pe of Lt)
|
21917
21921
|
n.done_json[pe].x -= 1, n.done_json[pe].client.x -= 1, moveHandlePoint(n.done_json[pe], -1, 0), moveAnchors(n.done_json[pe]);
|
21918
21922
|
useHistoryRecord(n.done_json);
|
21919
|
-
} else if (!
|
21923
|
+
} else if (!Oe.ctrlKey && Oe.key == "ArrowRight") {
|
21920
21924
|
for (let pe of Lt)
|
21921
21925
|
n.done_json[pe].x += 1, n.done_json[pe].client.x += 1, moveHandlePoint(n.done_json[pe], 1, 0), moveAnchors(n.done_json[pe]);
|
21922
21926
|
useHistoryRecord(n.done_json);
|
21923
21927
|
} else
|
21924
|
-
|
21928
|
+
Oe.ctrlKey && Oe.key.toLowerCase() == "c" ? c.onContextMenuClick(EContextMenuInfoType.Copy) : !Oe.ctrlKey && Oe.key == "Delete" ? A.value ? (n.setDoneJson(n.done_json.filter((pe) => !pe.selected)), n.setHandleSvgInfo(
|
21925
21929
|
n.done_json[n.done_json.length - 1],
|
21926
21930
|
n.done_json.length - 1
|
21927
|
-
)) : c.onContextMenuClick(EContextMenuInfoType.Delete) :
|
21928
|
-
}, ze = (
|
21931
|
+
)) : c.onContextMenuClick(EContextMenuInfoType.Delete) : Oe.ctrlKey && Oe.key == "ArrowUp" ? c.onContextMenuClick(EContextMenuInfoType.MoveUpOneLevel) : Oe.ctrlKey && Oe.key == "ArrowDown" ? c.onContextMenuClick(EContextMenuInfoType.MoveDownOneLevel) : Oe.ctrlKey && Oe.key == "ArrowLeft" ? c.onContextMenuClick(EContextMenuInfoType.MoveDownTopLevel) : Oe.ctrlKey && Oe.key == "ArrowRight" ? c.onContextMenuClick(EContextMenuInfoType.MoveUpTopLevel) : Oe.ctrlKey && Oe.shiftKey && Oe.key.toLowerCase() == "z" ? u.topRedoBtnClick() : Oe.ctrlKey && Oe.key.toLowerCase() == "z" ? u.topUndoBtnClick() : Oe.ctrlKey && Oe.key.toLowerCase() == "delete" && (n.done_json.length <= 0 || n.setDoneJson([]));
|
21932
|
+
}, ze = (Oe) => {
|
21929
21933
|
const Lt = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
|
21930
|
-
if (!
|
21934
|
+
if (!Oe.ctrlKey && Lt.indexOf(Oe.key) > -1)
|
21931
21935
|
for (let pe of n.done_json)
|
21932
21936
|
pe.selected && setSvgActualInfo(pe);
|
21933
21937
|
}, Fe = () => {
|
21934
21938
|
setSvgActualInfo(n.done_json[n.handle_svg_info.index], !0);
|
21935
21939
|
};
|
21936
21940
|
return onMounted(() => {
|
21937
|
-
var
|
21938
|
-
(
|
21941
|
+
var Oe;
|
21942
|
+
(Oe = p.value) == null || Oe.focus(), nextTick(function() {
|
21939
21943
|
var pe;
|
21940
21944
|
const Lt = (pe = p.value) == null ? void 0 : pe.getBoundingClientRect();
|
21941
21945
|
a.canvasInfo = {
|
@@ -21945,7 +21949,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21945
21949
|
left: (Lt == null ? void 0 : Lt.left) || 0
|
21946
21950
|
};
|
21947
21951
|
});
|
21948
|
-
}), r({ onCanvasMouseUp: Y }), (
|
21952
|
+
}), r({ onCanvasMouseUp: Y }), (Oe, Lt) => (openBlock(), createElementBlock(Fragment, null, [
|
21949
21953
|
createElementVNode("div", {
|
21950
21954
|
ref_key: "canvasRef",
|
21951
21955
|
ref: p,
|
@@ -21963,7 +21967,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
21963
21967
|
onKeyup: ze,
|
21964
21968
|
onMousewheel: re
|
21965
21969
|
}, [
|
21966
|
-
renderSlot(
|
21970
|
+
renderSlot(Oe.$slots, "background", {}, void 0, !0),
|
21967
21971
|
createElementVNode("div", _hoisted_1$8, [
|
21968
21972
|
(openBlock(), createElementBlock("svg", _hoisted_2$6, [
|
21969
21973
|
createElementVNode("defs", null, [
|
@@ -22003,7 +22007,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
22003
22007
|
transform: `translate(${unref(a).center_offset.x * unref(o).svg.scale},${unref(a).center_offset.y * unref(o).svg.scale})rotate(0)scale(${unref(o).svg.scale})`
|
22004
22008
|
}, [
|
22005
22009
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n).done_json, (pe, Cn) => {
|
22006
|
-
var In, Dt,
|
22010
|
+
var In, Dt, he, Et, hn, vn, kt, Ce, de, Ue, Ne, Ve, Pt, jt;
|
22007
22011
|
return withDirectives((openBlock(), createElementBlock("g", {
|
22008
22012
|
key: pe.id,
|
22009
22013
|
transform: `translate(${pe.x},${pe.y})rotate(0)scale(1)`
|
@@ -22028,7 +22032,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
22028
22032
|
"xlink:href": `#svg-${pe.name}`,
|
22029
22033
|
ref_for: !0
|
22030
22034
|
}, unref(prosToVBind)(pe, ["height", "width"]), {
|
22031
|
-
width: ((
|
22035
|
+
width: ((he = (Dt = pe.props) == null ? void 0 : Dt.width) == null ? void 0 : he.val) ?? 100,
|
22032
22036
|
height: ((hn = (Et = pe.props) == null ? void 0 : Et.height) == null ? void 0 : hn.val) ?? 100,
|
22033
22037
|
id: pe.id,
|
22034
22038
|
transform: `translate(${pe.actual_bound.x + pe.actual_bound.width / 2},${pe.actual_bound.y + pe.actual_bound.height / 2}) scale(${pe.scale_x},${pe.scale_y}) translate(${-(pe.actual_bound.x + pe.actual_bound.width / 2)},${-(pe.actual_bound.y + pe.actual_bound.height / 2)})`
|
@@ -22037,7 +22041,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
22037
22041
|
ref_for: !0
|
22038
22042
|
}, unref(prosToVBind)(pe, ["height", "width"]), {
|
22039
22043
|
width: ((kt = (vn = pe.props) == null ? void 0 : vn.width) == null ? void 0 : kt.val) ?? 100,
|
22040
|
-
height: ((
|
22044
|
+
height: ((de = (Ce = pe.props) == null ? void 0 : Ce.height) == null ? void 0 : de.val) ?? 100,
|
22041
22045
|
id: pe.id,
|
22042
22046
|
onResize: Fe,
|
22043
22047
|
transform: `translate(${pe.actual_bound.x + pe.actual_bound.width / 2},${pe.actual_bound.y + pe.actual_bound.height / 2}) scale(${pe.scale_x},${pe.scale_y}) translate(${-(pe.actual_bound.x + pe.actual_bound.width / 2)},${-(pe.actual_bound.y + pe.actual_bound.height / 2)})`
|
@@ -22083,7 +22087,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
22083
22087
|
"svg-item-in-group": pe.selected
|
22084
22088
|
}
|
22085
22089
|
}), null, 16, _hoisted_15)) : createCommentVNode("", !0),
|
22086
|
-
((
|
22090
|
+
((Ve = unref(n).handle_svg_info) == null ? void 0 : Ve.info.id) === pe.id && unref(g).handle_panel && pe.type !== unref(EDoneJsonType).ConnectionLine ? (openBlock(), createBlock(HandlePanel, {
|
22087
22091
|
key: 6,
|
22088
22092
|
"item-info": pe
|
22089
22093
|
}, null, 8, ["item-info"])) : createCommentVNode("", !0),
|
@@ -22132,7 +22136,7 @@ const _withScopeId$2 = (i) => (pushScopeId("data-v-2954e727"), i = i(), popScope
|
|
22132
22136
|
])
|
22133
22137
|
], 64));
|
22134
22138
|
}
|
22135
|
-
}),
|
22139
|
+
}), centerPanel_vue_vue_type_style_index_0_scoped_de7d7390_lang = "", CenterPanel = /* @__PURE__ */ _export_sfc$1(_sfc_main$y, [["__scopeId", "data-v-de7d7390"]]);
|
22136
22140
|
/*! Element Plus Icons Vue v2.3.1 */
|
22137
22141
|
var aim_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
22138
22142
|
name: "Aim",
|
@@ -24013,31 +24017,31 @@ function Kt(i) {
|
|
24013
24017
|
function Qt(i) {
|
24014
24018
|
var r = i.state, n = i.options, o = i.name;
|
24015
24019
|
if (!r.modifiersData[o]._skip) {
|
24016
|
-
for (var a = n.mainAxis, u = a === void 0 ? !0 : a, c = n.altAxis, d = c === void 0 ? !0 : c, f = n.fallbackPlacements, p = n.padding, _ = n.boundary, v = n.rootBoundary, g = n.altBoundary, y = n.flipVariations, b = y === void 0 ? !0 : y, A = n.allowedAutoPlacements, w = r.options.placement, S = q(w), T = S === w, x = f || (T || !b ? [be(w)] : Kt(w)), L = [w].concat(x).reduce(function(Dt,
|
24017
|
-
return Dt.concat(q(
|
24020
|
+
for (var a = n.mainAxis, u = a === void 0 ? !0 : a, c = n.altAxis, d = c === void 0 ? !0 : c, f = n.fallbackPlacements, p = n.padding, _ = n.boundary, v = n.rootBoundary, g = n.altBoundary, y = n.flipVariations, b = y === void 0 ? !0 : y, A = n.allowedAutoPlacements, w = r.options.placement, S = q(w), T = S === w, x = f || (T || !b ? [be(w)] : Kt(w)), L = [w].concat(x).reduce(function(Dt, he) {
|
24021
|
+
return Dt.concat(q(he) === me ? Jt(r, { placement: he, boundary: _, rootBoundary: v, padding: p, flipVariations: b, allowedAutoPlacements: A }) : he);
|
24018
24022
|
}, []), O = r.rects.reference, M = r.rects.popper, k = /* @__PURE__ */ new Map(), ie = !0, $ = L[0], Y = 0; Y < L.length; Y++) {
|
24019
24023
|
var D = L[Y], re = q(D), F = te(D) === U, _e = [E, R].indexOf(re) >= 0, ue = _e ? "width" : "height", Ie = ne(r, { placement: D, boundary: _, rootBoundary: v, altBoundary: g, padding: p }), ze = _e ? F ? W : P : F ? R : E;
|
24020
24024
|
O[ue] > M[ue] && (ze = be(ze));
|
24021
|
-
var Fe = be(ze),
|
24022
|
-
if (u &&
|
24025
|
+
var Fe = be(ze), Oe = [];
|
24026
|
+
if (u && Oe.push(Ie[re] <= 0), d && Oe.push(Ie[ze] <= 0, Ie[Fe] <= 0), Oe.every(function(Dt) {
|
24023
24027
|
return Dt;
|
24024
24028
|
})) {
|
24025
24029
|
$ = D, ie = !1;
|
24026
24030
|
break;
|
24027
24031
|
}
|
24028
|
-
k.set(D,
|
24032
|
+
k.set(D, Oe);
|
24029
24033
|
}
|
24030
24034
|
if (ie)
|
24031
24035
|
for (var Lt = b ? 3 : 1, pe = function(Dt) {
|
24032
|
-
var
|
24036
|
+
var he = L.find(function(Et) {
|
24033
24037
|
var hn = k.get(Et);
|
24034
24038
|
if (hn)
|
24035
24039
|
return hn.slice(0, Dt).every(function(vn) {
|
24036
24040
|
return vn;
|
24037
24041
|
});
|
24038
24042
|
});
|
24039
|
-
if (
|
24040
|
-
return $ =
|
24043
|
+
if (he)
|
24044
|
+
return $ = he, "break";
|
24041
24045
|
}, Cn = Lt; Cn > 0; Cn--) {
|
24042
24046
|
var In = pe(Cn);
|
24043
24047
|
if (In === "break")
|
@@ -24083,7 +24087,7 @@ function on(i) {
|
|
24083
24087
|
var r = i.state, n = i.options, o = i.name, a = n.mainAxis, u = a === void 0 ? !0 : a, c = n.altAxis, d = c === void 0 ? !1 : c, f = n.boundary, p = n.rootBoundary, _ = n.altBoundary, v = n.padding, g = n.tether, y = g === void 0 ? !0 : g, b = n.tetherOffset, A = b === void 0 ? 0 : b, w = ne(r, { boundary: f, rootBoundary: p, padding: v, altBoundary: _ }), S = q(r.placement), T = te(r.placement), x = !T, L = Le(S), O = rn(L), M = r.modifiersData.popperOffsets, k = r.rects.reference, ie = r.rects.popper, $ = typeof A == "function" ? A(Object.assign({}, r.rects, { placement: r.placement })) : A, Y = typeof $ == "number" ? { mainAxis: $, altAxis: $ } : Object.assign({ mainAxis: 0, altAxis: 0 }, $), D = r.modifiersData.offset ? r.modifiersData.offset[r.placement] : null, re = { x: 0, y: 0 };
|
24084
24088
|
if (M) {
|
24085
24089
|
if (u) {
|
24086
|
-
var F, _e = L === "y" ? E : P, ue = L === "y" ? R : W, Ie = L === "y" ? "height" : "width", ze = M[L], Fe = ze + w[_e],
|
24090
|
+
var F, _e = L === "y" ? E : P, ue = L === "y" ? R : W, Ie = L === "y" ? "height" : "width", ze = M[L], Fe = ze + w[_e], Oe = ze - w[ue], Lt = y ? -ie[Ie] / 2 : 0, pe = T === U ? k[Ie] : ie[Ie], Cn = T === U ? -ie[Ie] : -k[Ie], In = r.elements.arrow, Dt = y && In ? ke(In) : { width: 0, height: 0 }, he = r.modifiersData["arrow#persistent"] ? r.modifiersData["arrow#persistent"].padding : st(), Et = he[_e], hn = he[ue], vn = fe(0, k[Ie], Dt[Ie]), kt = x ? k[Ie] / 2 - Lt - vn - Et - Y.mainAxis : pe - vn - Et - Y.mainAxis, Ce = x ? -k[Ie] / 2 + Lt + vn + hn + Y.mainAxis : Cn + vn + hn + Y.mainAxis, de = r.elements.arrow && se(r.elements.arrow), Ue = de ? L === "y" ? de.clientTop || 0 : de.clientLeft || 0 : 0, Ne = (F = D == null ? void 0 : D[L]) != null ? F : 0, Ve = ze + kt - Ne - Ue, Pt = ze + Ce - Ne, jt = fe(y ? ve(Fe, Ve) : Fe, ze, y ? X(Oe, Pt) : Oe);
|
24087
24091
|
M[L] = jt, re[L] = jt - ze;
|
24088
24092
|
}
|
24089
24093
|
if (d) {
|
@@ -25579,42 +25583,42 @@ const __default__$a = defineComponent({
|
|
25579
25583
|
n.rules && kt.push(...castArray(n.rules));
|
25580
25584
|
const Ce = a == null ? void 0 : a.rules;
|
25581
25585
|
if (Ce && n.prop) {
|
25582
|
-
const
|
25583
|
-
|
25586
|
+
const de = getProp(Ce, n.prop).value;
|
25587
|
+
de && kt.push(...castArray(de));
|
25584
25588
|
}
|
25585
25589
|
if (vn !== void 0) {
|
25586
|
-
const
|
25587
|
-
if (
|
25588
|
-
for (const [Ue, Ne] of
|
25590
|
+
const de = kt.map((Ue, Ne) => [Ue, Ne]).filter(([Ue]) => Object.keys(Ue).includes("required"));
|
25591
|
+
if (de.length > 0)
|
25592
|
+
for (const [Ue, Ne] of de)
|
25589
25593
|
Ue.required !== vn && (kt[Ne] = { ...Ue, required: vn });
|
25590
25594
|
else
|
25591
25595
|
kt.push({ required: vn });
|
25592
25596
|
}
|
25593
25597
|
return kt;
|
25594
|
-
}), F = computed(() => re.value.length > 0), _e = (vn) => re.value.filter((Ce) => !Ce.trigger || !vn ? !0 : Array.isArray(Ce.trigger) ? Ce.trigger.includes(vn) : Ce.trigger === vn).map(({ trigger: Ce, ...
|
25598
|
+
}), F = computed(() => re.value.length > 0), _e = (vn) => re.value.filter((Ce) => !Ce.trigger || !vn ? !0 : Array.isArray(Ce.trigger) ? Ce.trigger.includes(vn) : Ce.trigger === vn).map(({ trigger: Ce, ...de }) => de), ue = computed(() => re.value.some((vn) => vn.required)), Ie = computed(() => {
|
25595
25599
|
var vn;
|
25596
25600
|
return v.value === "error" && n.showMessage && ((vn = a == null ? void 0 : a.showMessage) != null ? vn : !0);
|
25597
25601
|
}), ze = computed(() => `${n.label || ""}${(a == null ? void 0 : a.labelSuffix) || ""}`), Fe = (vn) => {
|
25598
25602
|
_.value = vn;
|
25599
|
-
},
|
25603
|
+
}, Oe = (vn) => {
|
25600
25604
|
var kt, Ce;
|
25601
|
-
const { errors:
|
25602
|
-
(!
|
25605
|
+
const { errors: de, fields: Ue } = vn;
|
25606
|
+
(!de || !Ue) && console.error(vn), Fe("error"), g.value = de ? (Ce = (kt = de == null ? void 0 : de[0]) == null ? void 0 : kt.message) != null ? Ce : `${n.prop} is required` : "", a == null || a.emit("validate", n.prop, !1, g.value);
|
25603
25607
|
}, Lt = () => {
|
25604
25608
|
Fe("success"), a == null || a.emit("validate", n.prop, !0, "");
|
25605
25609
|
}, pe = async (vn) => {
|
25606
25610
|
const kt = M.value;
|
25607
25611
|
return new Schema({
|
25608
25612
|
[kt]: vn
|
25609
|
-
}).validate({ [kt]: D.value }, { firstFields: !0 }).then(() => (Lt(), !0)).catch((
|
25613
|
+
}).validate({ [kt]: D.value }, { firstFields: !0 }).then(() => (Lt(), !0)).catch((de) => (Oe(de), Promise.reject(de)));
|
25610
25614
|
}, Cn = async (vn, kt) => {
|
25611
25615
|
if (A || !n.prop)
|
25612
25616
|
return !1;
|
25613
25617
|
const Ce = isFunction(kt);
|
25614
25618
|
if (!F.value)
|
25615
25619
|
return kt == null || kt(!1), !1;
|
25616
|
-
const
|
25617
|
-
return
|
25620
|
+
const de = _e(vn);
|
25621
|
+
return de.length === 0 ? (kt == null || kt(!0), !0) : (Fe("validating"), pe(de).then(() => (kt == null || kt(!0), !0)).catch((Ue) => {
|
25618
25622
|
const { fields: Ne } = Ue;
|
25619
25623
|
return kt == null || kt(!1, Ne), Ce ? !1 : Promise.reject(Ne);
|
25620
25624
|
}));
|
@@ -25626,7 +25630,7 @@ const __default__$a = defineComponent({
|
|
25626
25630
|
return;
|
25627
25631
|
const kt = getProp(vn, n.prop);
|
25628
25632
|
A = !0, kt.value = clone$3(b), await nextTick(), In(), A = !1;
|
25629
|
-
},
|
25633
|
+
}, he = (vn) => {
|
25630
25634
|
p.value.includes(vn) || p.value.push(vn);
|
25631
25635
|
}, Et = (vn) => {
|
25632
25636
|
p.value = p.value.filter((kt) => kt !== vn);
|
@@ -25644,7 +25648,7 @@ const __default__$a = defineComponent({
|
|
25644
25648
|
isGroup: $,
|
25645
25649
|
hasLabel: k,
|
25646
25650
|
fieldValue: D,
|
25647
|
-
addInputId:
|
25651
|
+
addInputId: he,
|
25648
25652
|
removeInputId: Et,
|
25649
25653
|
resetField: Dt,
|
25650
25654
|
clearValidate: In,
|
@@ -25885,7 +25889,7 @@ const inputProps = buildProps({
|
|
25885
25889
|
[A.b("group")]: u.prepend || u.append,
|
25886
25890
|
[A.m("prefix")]: u.prefix || o.prefixIcon,
|
25887
25891
|
[A.m("suffix")]: u.suffix || o.suffixIcon || o.clearable || o.showPassword,
|
25888
|
-
[A.bm("suffix", "password-clear")]:
|
25892
|
+
[A.bm("suffix", "password-clear")]: Oe.value && Lt.value,
|
25889
25893
|
[A.b("hidden")]: o.type === "hidden"
|
25890
25894
|
},
|
25891
25895
|
a.class
|
@@ -25913,7 +25917,7 @@ const inputProps = buildProps({
|
|
25913
25917
|
o.inputStyle,
|
25914
25918
|
M.value,
|
25915
25919
|
{ resize: o.resize }
|
25916
|
-
]), Fe = computed(() => isNil(o.modelValue) ? "" : String(o.modelValue)),
|
25920
|
+
]), Fe = computed(() => isNil(o.modelValue) ? "" : String(o.modelValue)), Oe = computed(() => o.clearable && !b.value && !o.readonly && !!Fe.value && ($.value || x.value)), Lt = computed(() => o.showPassword && !b.value && !!Fe.value && (!!Fe.value || $.value)), pe = computed(() => o.showWordLimit && !!o.maxlength && (o.type === "text" || o.type === "textarea") && !b.value && !o.readonly && !o.showPassword), Cn = computed(() => Fe.value.length), In = computed(() => !!pe.value && Cn.value > Number(o.maxlength)), Dt = computed(() => !!u.suffix || !!o.suffixIcon || Oe.value || o.showPassword || pe.value || !!F.value && re.value), [he, Et] = useCursor(S);
|
25917
25921
|
useResizeObserver(T, (qe) => {
|
25918
25922
|
if (kt(), !pe.value || o.resize !== "both")
|
25919
25923
|
return;
|
@@ -25948,8 +25952,8 @@ const inputProps = buildProps({
|
|
25948
25952
|
})(hn), Ce = () => {
|
25949
25953
|
const qe = k.value, bn = o.formatter ? o.formatter(Fe.value) : Fe.value;
|
25950
25954
|
!qe || qe.value === bn || (qe.value = bn);
|
25951
|
-
},
|
25952
|
-
|
25955
|
+
}, de = async (qe) => {
|
25956
|
+
he();
|
25953
25957
|
let { value: bn } = qe.target;
|
25954
25958
|
if (o.formatter && (bn = o.parser ? o.parser(bn) : bn), !Ne.value) {
|
25955
25959
|
if (bn === Fe.value) {
|
@@ -25962,10 +25966,10 @@ const inputProps = buildProps({
|
|
25962
25966
|
n("change", qe.target.value);
|
25963
25967
|
}, {
|
25964
25968
|
isComposing: Ne,
|
25965
|
-
handleCompositionStart:
|
25969
|
+
handleCompositionStart: Ve,
|
25966
25970
|
handleCompositionUpdate: Pt,
|
25967
25971
|
handleCompositionEnd: jt
|
25968
|
-
} = useComposition({ emit: n, afterComposition:
|
25972
|
+
} = useComposition({ emit: n, afterComposition: de }), _n = () => {
|
25969
25973
|
L.value = !L.value, oe();
|
25970
25974
|
}, oe = async () => {
|
25971
25975
|
var qe;
|
@@ -26069,10 +26073,10 @@ const inputProps = buildProps({
|
|
26069
26073
|
style: qe.inputStyle,
|
26070
26074
|
form: qe.form,
|
26071
26075
|
autofocus: qe.autofocus,
|
26072
|
-
onCompositionstart: unref(
|
26076
|
+
onCompositionstart: unref(Ve),
|
26073
26077
|
onCompositionupdate: unref(Pt),
|
26074
26078
|
onCompositionend: unref(jt),
|
26075
|
-
onInput:
|
26079
|
+
onInput: de,
|
26076
26080
|
onChange: Ue,
|
26077
26081
|
onKeydown: z
|
26078
26082
|
}), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
|
@@ -26084,7 +26088,7 @@ const inputProps = buildProps({
|
|
26084
26088
|
createElementVNode("span", {
|
26085
26089
|
class: normalizeClass(unref(A).e("suffix-inner"))
|
26086
26090
|
}, [
|
26087
|
-
!unref(
|
26091
|
+
!unref(Oe) || !unref(Lt) || !unref(pe) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
26088
26092
|
renderSlot(qe.$slots, "suffix"),
|
26089
26093
|
qe.suffixIcon ? (openBlock(), createBlock(unref(ElIcon), {
|
26090
26094
|
key: 0,
|
@@ -26096,7 +26100,7 @@ const inputProps = buildProps({
|
|
26096
26100
|
_: 1
|
26097
26101
|
}, 8, ["class"])) : createCommentVNode("v-if", !0)
|
26098
26102
|
], 64)) : createCommentVNode("v-if", !0),
|
26099
|
-
unref(
|
26103
|
+
unref(Oe) ? (openBlock(), createBlock(unref(ElIcon), {
|
26100
26104
|
key: 1,
|
26101
26105
|
class: normalizeClass([unref(A).e("icon"), unref(A).e("clear")]),
|
26102
26106
|
onMousedown: withModifiers(unref(NOOP), ["prevent"]),
|
@@ -26168,10 +26172,10 @@ const inputProps = buildProps({
|
|
26168
26172
|
form: qe.form,
|
26169
26173
|
autofocus: qe.autofocus,
|
26170
26174
|
rows: qe.rows,
|
26171
|
-
onCompositionstart: unref(
|
26175
|
+
onCompositionstart: unref(Ve),
|
26172
26176
|
onCompositionupdate: unref(Pt),
|
26173
26177
|
onCompositionend: unref(jt),
|
26174
|
-
onInput:
|
26178
|
+
onInput: de,
|
26175
26179
|
onFocus: unref(Y),
|
26176
26180
|
onBlur: unref(D),
|
26177
26181
|
onChange: Ue,
|
@@ -27203,8 +27207,8 @@ const DEFAULT_ARROW_OFFSET = 0, usePopperContent = (i) => {
|
|
27203
27207
|
Y == null || Y(), Y = void 0;
|
27204
27208
|
const ue = unref(F || y.value), Ie = unref(_e || y.value);
|
27205
27209
|
isElement(ue) && (Y = watch([w, () => o.ariaLabel, T, () => o.id], (ze) => {
|
27206
|
-
["role", "aria-label", "aria-modal", "id"].forEach((Fe,
|
27207
|
-
isNil(ze[
|
27210
|
+
["role", "aria-label", "aria-modal", "id"].forEach((Fe, Oe) => {
|
27211
|
+
isNil(ze[Oe]) ? ue.removeAttribute(Fe) : ue.setAttribute(Fe, ze[Oe]);
|
27208
27212
|
});
|
27209
27213
|
}, { immediate: !0 })), Ie !== ue && isElement(Ie) && ["role", "aria-label", "aria-modal", "id"].forEach((ze) => {
|
27210
27214
|
Ie.removeAttribute(ze);
|
@@ -27959,7 +27963,7 @@ const MINIMUM_INPUT_WIDTH = 11, useSelect = (i, r) => {
|
|
27959
27963
|
}
|
27960
27964
|
}), Y = ref(!1), D = ref(), { form: re, formItem: F } = useFormItem(), { inputId: _e } = useFormItemInputId(i, {
|
27961
27965
|
formItemContext: F
|
27962
|
-
}), { valueOnClear: ue, isEmptyValue: Ie } = useEmptyValues(i), ze = computed(() => i.disabled || (re == null ? void 0 : re.disabled)), Fe = computed(() => isArray(i.modelValue) ? i.modelValue.length > 0 : !Ie(i.modelValue)),
|
27966
|
+
}), { valueOnClear: ue, isEmptyValue: Ie } = useEmptyValues(i), ze = computed(() => i.disabled || (re == null ? void 0 : re.disabled)), Fe = computed(() => isArray(i.modelValue) ? i.modelValue.length > 0 : !Ie(i.modelValue)), Oe = computed(() => i.clearable && !ze.value && c.inputHovering && Fe.value), Lt = computed(() => i.remote && i.filterable && !i.remoteShowSuffix ? "" : i.suffixIcon), pe = computed(() => a.is("reverse", Lt.value && Y.value)), Cn = computed(() => (F == null ? void 0 : F.validateState) || ""), In = computed(() => ValidateComponentsMap[Cn.value]), Dt = computed(() => i.remote ? 300 : 0), he = computed(() => i.loading ? i.loadingText || n("el.select.loading") : i.remote && !c.inputValue && c.options.size === 0 ? !1 : i.filterable && c.inputValue && c.options.size > 0 && Et.value === 0 ? i.noMatchText || n("el.select.noMatch") : c.options.size === 0 ? i.noDataText || n("el.select.noData") : null), Et = computed(() => hn.value.filter((An) => An.visible).length), hn = computed(() => {
|
27963
27967
|
const An = Array.from(c.options.values()), Tn = [];
|
27964
27968
|
return c.optionValues.forEach((Bn) => {
|
27965
27969
|
const Nn = An.findIndex((Gn) => Gn.value === Bn);
|
@@ -27973,14 +27977,14 @@ const MINIMUM_INPUT_WIDTH = 11, useSelect = (i, r) => {
|
|
27973
27977
|
var Tn;
|
27974
27978
|
(Tn = An.updateOption) == null || Tn.call(An, c.inputValue);
|
27975
27979
|
});
|
27976
|
-
},
|
27980
|
+
}, de = useFormSize(), Ue = computed(() => ["small"].includes(de.value) ? "small" : "default"), Ne = computed({
|
27977
27981
|
get() {
|
27978
|
-
return Y.value &&
|
27982
|
+
return Y.value && he.value !== !1;
|
27979
27983
|
},
|
27980
27984
|
set(An) {
|
27981
27985
|
Y.value = An;
|
27982
27986
|
}
|
27983
|
-
}),
|
27987
|
+
}), Ve = computed(() => {
|
27984
27988
|
if (i.multiple && !isUndefined(i.modelValue))
|
27985
27989
|
return castArray(i.modelValue).length === 0 && !c.inputValue;
|
27986
27990
|
const An = isArray(i.modelValue) ? i.modelValue[0] : i.modelValue;
|
@@ -28196,7 +28200,7 @@ const MINIMUM_INPUT_WIDTH = 11, useSelect = (i, r) => {
|
|
28196
28200
|
expanded: Y,
|
28197
28201
|
optionsArray: hn,
|
28198
28202
|
hoverOption: D,
|
28199
|
-
selectSize:
|
28203
|
+
selectSize: de,
|
28200
28204
|
filteredOptionsCount: Et,
|
28201
28205
|
resetCalculatorWidth: ae,
|
28202
28206
|
updateTooltip: qe,
|
@@ -28209,10 +28213,10 @@ const MINIMUM_INPUT_WIDTH = 11, useSelect = (i, r) => {
|
|
28209
28213
|
handleOptionSelect: Mn,
|
28210
28214
|
scrollToOption: $n,
|
28211
28215
|
hasModelValue: Fe,
|
28212
|
-
shouldShowPlaceholder:
|
28216
|
+
shouldShowPlaceholder: Ve,
|
28213
28217
|
currentPlaceholder: Pt,
|
28214
28218
|
mouseEnterEventName: jt,
|
28215
|
-
showClose:
|
28219
|
+
showClose: Oe,
|
28216
28220
|
iconComponent: Lt,
|
28217
28221
|
iconReverse: pe,
|
28218
28222
|
validateState: Cn,
|
@@ -28222,7 +28226,7 @@ const MINIMUM_INPUT_WIDTH = 11, useSelect = (i, r) => {
|
|
28222
28226
|
collapseTagSize: Ue,
|
28223
28227
|
setSelected: le,
|
28224
28228
|
selectDisabled: ze,
|
28225
|
-
emptyText:
|
28229
|
+
emptyText: he,
|
28226
28230
|
handleCompositionStart: L,
|
28227
28231
|
handleCompositionUpdate: O,
|
28228
28232
|
handleCompositionEnd: M,
|
@@ -30066,12 +30070,12 @@ const _hoisted_1$4 = { class: "c-wall-d" }, _sfc_main$7 = /* @__PURE__ */ define
|
|
30066
30070
|
emits: ["onLineMouseUp"],
|
30067
30071
|
setup(i, { emit: r }) {
|
30068
30072
|
const n = r, o = i, a = useSvgEditLayoutStore(pinia), u = useConfigStore(pinia), c = function() {
|
30069
|
-
return function(Ce,
|
30070
|
-
Ce &&
|
30073
|
+
return function(Ce, de, Ue) {
|
30074
|
+
Ce && de && Ue && Ce.addEventListener(de, Ue, !1);
|
30071
30075
|
};
|
30072
30076
|
}(), d = function() {
|
30073
|
-
return function(Ce,
|
30074
|
-
Ce &&
|
30077
|
+
return function(Ce, de, Ue) {
|
30078
|
+
Ce && de && Ce.removeEventListener(de, Ue, !1);
|
30075
30079
|
};
|
30076
30080
|
}();
|
30077
30081
|
let f = 18, p = ref(0), _ = ref(0), v = ref([]), g = ref([]);
|
@@ -30083,11 +30087,11 @@ const _hoisted_1$4 = { class: "c-wall-d" }, _sfc_main$7 = /* @__PURE__ */ define
|
|
30083
30087
|
})), Y = computed(() => ({
|
30084
30088
|
padding: f + "px 0px 0px " + f + "px"
|
30085
30089
|
})), D = computed(() => {
|
30086
|
-
let Ce = 0,
|
30090
|
+
let Ce = 0, de = 0;
|
30087
30091
|
return y.value.map((Ue) => {
|
30088
30092
|
const Ne = Ue.type === "h";
|
30089
30093
|
return {
|
30090
|
-
id: `${Ue.type}_${Ne ? Ce++ :
|
30094
|
+
id: `${Ue.type}_${Ne ? Ce++ : de++}`,
|
30091
30095
|
type: Ue.type,
|
30092
30096
|
title: Ue.site.toFixed(0) + "px",
|
30093
30097
|
[Ne ? "top" : "left"]: Ue.site * u.svg.scale + f + a.center_offset[Ne ? "y" : "x"] * u.svg.scale
|
@@ -30095,34 +30099,34 @@ const _hoisted_1$4 = { class: "c-wall-d" }, _sfc_main$7 = /* @__PURE__ */ define
|
|
30095
30099
|
});
|
30096
30100
|
});
|
30097
30101
|
a.$subscribe((Ce) => {
|
30098
|
-
var
|
30099
|
-
((Ue = (
|
30102
|
+
var de, Ue, Ne, Ve;
|
30103
|
+
((Ue = (de = Ce.events) == null ? void 0 : de.target) != null && Ue.hasOwnProperty("left_nav") || (Ve = (Ne = Ce.events) == null ? void 0 : Ne.target) != null && Ve.hasOwnProperty("right_nav")) && window.setTimeout(re, 420);
|
30100
30104
|
}), u.$subscribe((Ce) => {
|
30101
|
-
var
|
30102
|
-
(Ue = (
|
30105
|
+
var de, Ue;
|
30106
|
+
(Ue = (de = Ce.events) == null ? void 0 : de.target) != null && Ue.hasOwnProperty("scale") && ze();
|
30103
30107
|
}), onMounted(() => {
|
30104
|
-
c(document, "mousemove",
|
30108
|
+
c(document, "mousemove", Oe), c(document, "mouseup", Cn), re(), c(window, "resize", F);
|
30105
30109
|
}), onBeforeUnmount(() => {
|
30106
|
-
d(document, "mousemove",
|
30110
|
+
d(document, "mousemove", Oe), d(document, "mouseup", Cn), d(window, "resize", F);
|
30107
30111
|
});
|
30108
30112
|
const re = () => {
|
30109
30113
|
Ie(), ze();
|
30110
30114
|
}, F = () => {
|
30111
30115
|
v.value = [], g.value = [], re();
|
30112
|
-
}, _e = ({ type: Ce, top:
|
30116
|
+
}, _e = ({ type: Ce, top: de, left: Ue }) => Ce === "h" ? { top: de + "px" } : { left: Ue + "px" }, ue = ({ type: Ce, id: de }) => Ce === "h" ? hn(de) : vn(de), Ie = () => {
|
30113
30117
|
const Ce = window.getComputedStyle(M.value.parentNode, null);
|
30114
30118
|
p.value = parseInt(Ce.getPropertyValue("width")), _.value = parseInt(Ce.getPropertyValue("height")), T = k.value.clientWidth, x = ie.value.clientHeight;
|
30115
30119
|
}, ze = () => {
|
30116
30120
|
Fe(v.value, p.value, a.center_offset.x), Fe(g.value, _.value, a.center_offset.y);
|
30117
|
-
}, Fe = (Ce,
|
30121
|
+
}, Fe = (Ce, de, Ue) => {
|
30118
30122
|
if (Ce.length === 0)
|
30119
|
-
for (let Ne = 0; Ne <
|
30123
|
+
for (let Ne = 0; Ne < de; Ne += o.stepLength)
|
30120
30124
|
Ne % o.stepLength === 0 && Ce.push({ id: myFixed(Ne / u.svg.scale - Ue, 0) });
|
30121
30125
|
else
|
30122
|
-
Ce.forEach((Ne,
|
30123
|
-
Ne.id = myFixed(
|
30126
|
+
Ce.forEach((Ne, Ve) => {
|
30127
|
+
Ne.id = myFixed(Ve * o.stepLength / u.svg.scale - Ue, 0);
|
30124
30128
|
});
|
30125
|
-
},
|
30129
|
+
}, Oe = (Ce) => {
|
30126
30130
|
ze(), Lt(Ce);
|
30127
30131
|
}, Lt = (Ce) => {
|
30128
30132
|
if (!(Ce.layerX === Ce.x || Ce.layerY === Ce.y))
|
@@ -30148,16 +30152,16 @@ const _hoisted_1$4 = { class: "c-wall-d" }, _sfc_main$7 = /* @__PURE__ */ define
|
|
30148
30152
|
if (b.value) {
|
30149
30153
|
switch (b.value = !1, A) {
|
30150
30154
|
case "x":
|
30151
|
-
const
|
30155
|
+
const de = Math.round(
|
30152
30156
|
(Ce.layerY - f) / u.svg.scale - a.center_offset.y
|
30153
30157
|
);
|
30154
|
-
if (
|
30158
|
+
if (de <= 0) {
|
30155
30159
|
S.value = -999;
|
30156
30160
|
return;
|
30157
30161
|
}
|
30158
30162
|
y.value.push({
|
30159
30163
|
type: "h",
|
30160
|
-
site:
|
30164
|
+
site: de
|
30161
30165
|
});
|
30162
30166
|
break;
|
30163
30167
|
case "y":
|
@@ -30192,22 +30196,22 @@ const _hoisted_1$4 = { class: "c-wall-d" }, _sfc_main$7 = /* @__PURE__ */ define
|
|
30192
30196
|
}
|
30193
30197
|
S.value = w.value = -999;
|
30194
30198
|
}
|
30195
|
-
}, Dt = (Ce,
|
30196
|
-
if (
|
30197
|
-
let
|
30199
|
+
}, Dt = (Ce, de, Ue, Ne) => {
|
30200
|
+
if (de < Ue) {
|
30201
|
+
let Ve;
|
30198
30202
|
D.value.forEach((Pt, jt) => {
|
30199
|
-
Pt.id === L && (
|
30200
|
-
}), Ce.splice(
|
30203
|
+
Pt.id === L && (Ve = jt);
|
30204
|
+
}), Ce.splice(Ve, 1);
|
30201
30205
|
} else {
|
30202
|
-
let
|
30206
|
+
let Ve;
|
30203
30207
|
D.value.forEach((Pt, jt) => {
|
30204
|
-
Pt.id === L && (
|
30205
|
-
}), Ce.splice(
|
30208
|
+
Pt.id === L && (Ve = jt);
|
30209
|
+
}), Ce.splice(Ve, 1, {
|
30206
30210
|
type: Ne,
|
30207
|
-
site:
|
30211
|
+
site: de
|
30208
30212
|
});
|
30209
30213
|
}
|
30210
|
-
},
|
30214
|
+
}, he = () => {
|
30211
30215
|
pe("x");
|
30212
30216
|
}, Et = () => {
|
30213
30217
|
pe("y");
|
@@ -30218,7 +30222,7 @@ const _hoisted_1$4 = { class: "c-wall-d" }, _sfc_main$7 = /* @__PURE__ */ define
|
|
30218
30222
|
}, kt = () => {
|
30219
30223
|
n("onLineMouseUp");
|
30220
30224
|
};
|
30221
|
-
return (Ce,
|
30225
|
+
return (Ce, de) => (openBlock(), createElementBlock("div", {
|
30222
30226
|
style: normalizeStyle$1(unref($)),
|
30223
30227
|
class: "vue-ruler-wrapper",
|
30224
30228
|
onselectStart: "return false;",
|
@@ -30230,7 +30234,7 @@ const _hoisted_1$4 = { class: "c-wall-d" }, _sfc_main$7 = /* @__PURE__ */ define
|
|
30230
30234
|
ref_key: "horizontalRuler",
|
30231
30235
|
ref: ie,
|
30232
30236
|
class: "vue-ruler-h",
|
30233
|
-
onMousedown: withModifiers(
|
30237
|
+
onMousedown: withModifiers(he, ["stop"])
|
30234
30238
|
}, [
|
30235
30239
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(v), (Ue, Ne) => (openBlock(), createElementBlock("span", {
|
30236
30240
|
style: normalizeStyle$1({ left: Ne * Ce.stepLength + "px" }),
|
@@ -30267,7 +30271,7 @@ const _hoisted_1$4 = { class: "c-wall-d" }, _sfc_main$7 = /* @__PURE__ */ define
|
|
30267
30271
|
class: normalizeClass(`vue-ruler-ref-line-${Ue.type}`),
|
30268
30272
|
onMousedown: (Ne) => ue(Ue),
|
30269
30273
|
onMouseup: kt,
|
30270
|
-
onContextmenu:
|
30274
|
+
onContextmenu: de[0] || (de[0] = //@ts-ignore
|
30271
30275
|
(...Ne) => unref(preventDefault) && unref(preventDefault)(...Ne))
|
30272
30276
|
}, null, 46, _hoisted_1$2))), 128))
|
30273
30277
|
], 512), [
|
@@ -30627,8 +30631,8 @@ var mqtt = { exports: {} };
|
|
30627
30631
|
}
|
30628
30632
|
ze = Ie.packet, this.log("deliver :: call _sendPacket for %o", ze);
|
30629
30633
|
let Fe = !0;
|
30630
|
-
ze.messageId && ze.messageId !== 0 && (this.messageIdProvider.register(ze.messageId) || (Fe = !1)), Fe ? this._sendPacket(ze, (
|
30631
|
-
Ie.cb && Ie.cb(
|
30634
|
+
ze.messageId && ze.messageId !== 0 && (this.messageIdProvider.register(ze.messageId) || (Fe = !1)), Fe ? this._sendPacket(ze, (Oe) => {
|
30635
|
+
Ie.cb && Ie.cb(Oe), ue();
|
30632
30636
|
}) : (this.log("messageId: %d has already used. The message is skipped and removed.", ze.messageId), ue());
|
30633
30637
|
};
|
30634
30638
|
this.log("connect :: sending queued packets"), ue();
|
@@ -30677,10 +30681,10 @@ var mqtt = { exports: {} };
|
|
30677
30681
|
F._write = (pe, Cn, In) => {
|
30678
30682
|
ue = In, this.log("writable stream :: parsing buffer"), _e.parse(pe), ze();
|
30679
30683
|
};
|
30680
|
-
const
|
30684
|
+
const Oe = (pe) => {
|
30681
30685
|
this.log("streamErrorHandler :: error", pe.message), $.includes(pe.code) ? (this.log("streamErrorHandler :: emitting error"), this.emit("error", pe)) : this.noop(pe);
|
30682
30686
|
};
|
30683
|
-
this.log("connect :: pipe stream to writable stream"), this.stream.pipe(F), this.stream.on("error",
|
30687
|
+
this.log("connect :: pipe stream to writable stream"), this.stream.pipe(F), this.stream.on("error", Oe), this.stream.on("close", () => {
|
30684
30688
|
this.log("(%s)stream :: on close", this.options.clientId), this._flushVolatile(), this.log("stream: emit close to MqttClient"), this.emit("close");
|
30685
30689
|
}), this.log("connect: sending packet `connect`");
|
30686
30690
|
const Lt = {
|
@@ -30714,32 +30718,32 @@ var mqtt = { exports: {} };
|
|
30714
30718
|
retain: !1,
|
30715
30719
|
dup: !1
|
30716
30720
|
}), _e);
|
30717
|
-
const { qos: Fe, retain:
|
30721
|
+
const { qos: Fe, retain: Oe, dup: Lt, properties: pe, cbStorePut: Cn } = _e;
|
30718
30722
|
if (this._checkDisconnecting(ue))
|
30719
30723
|
return this;
|
30720
30724
|
const In = () => {
|
30721
30725
|
let Dt = 0;
|
30722
30726
|
if ((Fe === 1 || Fe === 2) && (Dt = this._nextId(), Dt === null))
|
30723
30727
|
return this.log("No messageId left"), !1;
|
30724
|
-
const
|
30728
|
+
const he = {
|
30725
30729
|
cmd: "publish",
|
30726
30730
|
topic: re,
|
30727
30731
|
payload: F,
|
30728
30732
|
qos: Fe,
|
30729
|
-
retain:
|
30733
|
+
retain: Oe,
|
30730
30734
|
messageId: Dt,
|
30731
30735
|
dup: Lt
|
30732
30736
|
};
|
30733
|
-
switch (Ie.protocolVersion === 5 && (
|
30737
|
+
switch (Ie.protocolVersion === 5 && (he.properties = pe), this.log("publish :: qos", Fe), Fe) {
|
30734
30738
|
case 1:
|
30735
30739
|
case 2:
|
30736
|
-
this.outgoing[
|
30740
|
+
this.outgoing[he.messageId] = {
|
30737
30741
|
volatile: !1,
|
30738
30742
|
cb: ue || this.noop
|
30739
|
-
}, this.log("MqttClient:publish: packet cmd: %s",
|
30743
|
+
}, this.log("MqttClient:publish: packet cmd: %s", he.cmd), this._sendPacket(he, void 0, Cn);
|
30740
30744
|
break;
|
30741
30745
|
default:
|
30742
|
-
this.log("MqttClient:publish: packet cmd: %s",
|
30746
|
+
this.log("MqttClient:publish: packet cmd: %s", he.cmd), this._sendPacket(he, ue, Cn);
|
30743
30747
|
break;
|
30744
30748
|
}
|
30745
30749
|
return !0;
|
@@ -30767,17 +30771,17 @@ var mqtt = { exports: {} };
|
|
30767
30771
|
return k(_e, new Error(`Invalid topic ${Fe}`)), this;
|
30768
30772
|
if (this._checkDisconnecting(_e))
|
30769
30773
|
return this.log("subscribe: discconecting true"), this;
|
30770
|
-
const
|
30774
|
+
const Oe = {
|
30771
30775
|
qos: 0
|
30772
30776
|
};
|
30773
|
-
ue === 5 && (
|
30774
|
-
const Lt = F.properties, pe = [], Cn = (Dt,
|
30775
|
-
if (
|
30777
|
+
ue === 5 && (Oe.nl = !1, Oe.rap = !1, Oe.rh = 0), F = Object.assign(Object.assign({}, Oe), F);
|
30778
|
+
const Lt = F.properties, pe = [], Cn = (Dt, he) => {
|
30779
|
+
if (he = he || F, !Object.prototype.hasOwnProperty.call(this._resubscribeTopics, Dt) || this._resubscribeTopics[Dt].qos < he.qos || Ie) {
|
30776
30780
|
const Et = {
|
30777
30781
|
topic: Dt,
|
30778
|
-
qos:
|
30782
|
+
qos: he.qos
|
30779
30783
|
};
|
30780
|
-
ue === 5 && (Et.nl =
|
30784
|
+
ue === 5 && (Et.nl = he.nl, Et.rap = he.rap, Et.rh = he.rh, Et.properties = Lt), this.log("subscribe: pushing topic `%s` and qos `%s` to subs list", Et.topic, Et.qos), pe.push(Et);
|
30781
30785
|
}
|
30782
30786
|
};
|
30783
30787
|
if (Array.isArray(re) ? re.forEach((Dt) => {
|
@@ -30790,12 +30794,12 @@ var mqtt = { exports: {} };
|
|
30790
30794
|
const Dt = this._nextId();
|
30791
30795
|
if (Dt === null)
|
30792
30796
|
return this.log("No messageId left"), !1;
|
30793
|
-
const
|
30797
|
+
const he = {
|
30794
30798
|
cmd: "subscribe",
|
30795
30799
|
subscriptions: pe,
|
30796
30800
|
messageId: Dt
|
30797
30801
|
};
|
30798
|
-
if (Lt && (
|
30802
|
+
if (Lt && (he.properties = Lt), this.options.resubscribe) {
|
30799
30803
|
this.log("subscribe :: resubscribe true");
|
30800
30804
|
const Et = [];
|
30801
30805
|
pe.forEach((hn) => {
|
@@ -30803,9 +30807,9 @@ var mqtt = { exports: {} };
|
|
30803
30807
|
const vn = { qos: hn.qos };
|
30804
30808
|
ue === 5 && (vn.nl = hn.nl || !1, vn.rap = hn.rap || !1, vn.rh = hn.rh || 0, vn.properties = hn.properties), this._resubscribeTopics[hn.topic] = vn, Et.push(hn.topic);
|
30805
30809
|
}
|
30806
|
-
}), this.messageIdToTopic[
|
30810
|
+
}), this.messageIdToTopic[he.messageId] = Et;
|
30807
30811
|
}
|
30808
|
-
return this.outgoing[
|
30812
|
+
return this.outgoing[he.messageId] = {
|
30809
30813
|
volatile: !0,
|
30810
30814
|
cb(Et, hn) {
|
30811
30815
|
if (!Et) {
|
@@ -30815,7 +30819,7 @@ var mqtt = { exports: {} };
|
|
30815
30819
|
}
|
30816
30820
|
_e(Et, pe);
|
30817
30821
|
}
|
30818
|
-
}, this.log("subscribe :: call _sendPacket"), this._sendPacket(
|
30822
|
+
}, this.log("subscribe :: call _sendPacket"), this._sendPacket(he), !0;
|
30819
30823
|
};
|
30820
30824
|
return (this._storeProcessing || this._storeProcessingQueue.length > 0 || !In()) && this._storeProcessingQueue.push({
|
30821
30825
|
invoke: In,
|
@@ -30845,8 +30849,8 @@ var mqtt = { exports: {} };
|
|
30845
30849
|
messageId: ze,
|
30846
30850
|
unsubscriptions: []
|
30847
30851
|
};
|
30848
|
-
return typeof re == "string" ? Fe.unsubscriptions = [re] : Array.isArray(re) && (Fe.unsubscriptions = re), this.options.resubscribe && Fe.unsubscriptions.forEach((
|
30849
|
-
delete this._resubscribeTopics[
|
30852
|
+
return typeof re == "string" ? Fe.unsubscriptions = [re] : Array.isArray(re) && (Fe.unsubscriptions = re), this.options.resubscribe && Fe.unsubscriptions.forEach((Oe) => {
|
30853
|
+
delete this._resubscribeTopics[Oe];
|
30850
30854
|
}), typeof F == "object" && F.properties && (Fe.properties = F.properties), this.outgoing[Fe.messageId] = {
|
30851
30855
|
volatile: !0,
|
30852
30856
|
cb: _e
|
@@ -30870,8 +30874,8 @@ var mqtt = { exports: {} };
|
|
30870
30874
|
this.log("end :: closeStores: closing incoming and outgoing stores"), this.disconnected = !0, this.incomingStore.close((ze) => {
|
30871
30875
|
this.outgoingStore.close((Fe) => {
|
30872
30876
|
if (this.log("end :: closeStores: emitting end"), this.emit("end"), _e) {
|
30873
|
-
const
|
30874
|
-
this.log("end :: closeStores: invoking callback with args"), _e(
|
30877
|
+
const Oe = ze || Fe;
|
30878
|
+
this.log("end :: closeStores: invoking callback with args"), _e(Oe);
|
30875
30879
|
}
|
30876
30880
|
});
|
30877
30881
|
}), this._deferredReconnect && this._deferredReconnect();
|
@@ -31100,7 +31104,7 @@ var mqtt = { exports: {} };
|
|
31100
31104
|
if (!_e)
|
31101
31105
|
return;
|
31102
31106
|
const Fe = _e.read(1);
|
31103
|
-
let
|
31107
|
+
let Oe;
|
31104
31108
|
if (!Fe) {
|
31105
31109
|
_e.once("readable", ze);
|
31106
31110
|
return;
|
@@ -31109,17 +31113,17 @@ var mqtt = { exports: {} };
|
|
31109
31113
|
ze();
|
31110
31114
|
return;
|
31111
31115
|
}
|
31112
|
-
!this.disconnecting && !this.reconnectTimer ? (
|
31116
|
+
!this.disconnecting && !this.reconnectTimer ? (Oe = this.outgoing[Fe.messageId] ? this.outgoing[Fe.messageId].cb : null, this.outgoing[Fe.messageId] = {
|
31113
31117
|
volatile: !1,
|
31114
31118
|
cb(Lt, pe) {
|
31115
|
-
|
31119
|
+
Oe && Oe(Lt, pe), ze();
|
31116
31120
|
}
|
31117
31121
|
}, this._packetIdsDuringStoreProcessing[Fe.messageId] = !0, this.messageIdProvider.register(Fe.messageId) ? this._sendPacket(Fe, void 0, void 0, !0) : this.log("messageId: %d has already used.", Fe.messageId)) : _e.destroy && _e.destroy();
|
31118
31122
|
};
|
31119
31123
|
_e.on("end", () => {
|
31120
31124
|
let Fe = !0;
|
31121
|
-
for (const
|
31122
|
-
if (!this._packetIdsDuringStoreProcessing[
|
31125
|
+
for (const Oe in this._packetIdsDuringStoreProcessing)
|
31126
|
+
if (!this._packetIdsDuringStoreProcessing[Oe]) {
|
31123
31127
|
Fe = !1;
|
31124
31128
|
break;
|
31125
31129
|
}
|
@@ -31397,12 +31401,12 @@ var mqtt = { exports: {} };
|
|
31397
31401
|
re.close();
|
31398
31402
|
});
|
31399
31403
|
const _e = typeof re.addEventListener < "u";
|
31400
|
-
re.readyState === re.OPEN ? k = F : (k = (0, p.default)(void 0, void 0, M), M.objectMode || (k._writev = Lt), _e ? re.addEventListener("open", Ie) : re.onopen = Ie), k.socket = re, _e ? (re.addEventListener("close", ze), re.addEventListener("error", Fe), re.addEventListener("message",
|
31401
|
-
function ue(In, Dt,
|
31404
|
+
re.readyState === re.OPEN ? k = F : (k = (0, p.default)(void 0, void 0, M), M.objectMode || (k._writev = Lt), _e ? re.addEventListener("open", Ie) : re.onopen = Ie), k.socket = re, _e ? (re.addEventListener("close", ze), re.addEventListener("error", Fe), re.addEventListener("message", Oe)) : (re.onclose = ze, re.onerror = Fe, re.onmessage = Oe);
|
31405
|
+
function ue(In, Dt, he) {
|
31402
31406
|
const Et = new _.Transform({
|
31403
31407
|
objectMode: In.objectMode
|
31404
31408
|
});
|
31405
|
-
return Et._write = Dt, Et._flush =
|
31409
|
+
return Et._write = Dt, Et._flush = he, Et;
|
31406
31410
|
}
|
31407
31411
|
function Ie() {
|
31408
31412
|
k.setReadable(F), k.setWritable(F), k.emit("connect");
|
@@ -31413,24 +31417,24 @@ var mqtt = { exports: {} };
|
|
31413
31417
|
function Fe(In) {
|
31414
31418
|
k.destroy(In);
|
31415
31419
|
}
|
31416
|
-
function
|
31420
|
+
function Oe(In) {
|
31417
31421
|
let { data: Dt } = In;
|
31418
31422
|
Dt instanceof ArrayBuffer ? Dt = c.Buffer.from(Dt) : Dt = c.Buffer.from(Dt, "utf8"), F.push(Dt);
|
31419
31423
|
}
|
31420
31424
|
function Lt(In, Dt) {
|
31421
|
-
const
|
31425
|
+
const he = new Array(In.length);
|
31422
31426
|
for (let Et = 0; Et < In.length; Et++)
|
31423
|
-
typeof In[Et].chunk == "string" ?
|
31424
|
-
this._write(c.Buffer.concat(
|
31427
|
+
typeof In[Et].chunk == "string" ? he[Et] = c.Buffer.from(In[Et], "utf8") : he[Et] = In[Et].chunk;
|
31428
|
+
this._write(c.Buffer.concat(he), "binary", Dt);
|
31425
31429
|
}
|
31426
|
-
function pe(In, Dt,
|
31427
|
-
re.bufferedAmount > $ && setTimeout(pe, Y, In, Dt,
|
31430
|
+
function pe(In, Dt, he) {
|
31431
|
+
re.bufferedAmount > $ && setTimeout(pe, Y, In, Dt, he), D && typeof In == "string" && (In = c.Buffer.from(In, "utf8"));
|
31428
31432
|
try {
|
31429
31433
|
re.send(In);
|
31430
31434
|
} catch (Et) {
|
31431
|
-
return
|
31435
|
+
return he(Et);
|
31432
31436
|
}
|
31433
|
-
|
31437
|
+
he();
|
31434
31438
|
}
|
31435
31439
|
function Cn(In) {
|
31436
31440
|
re.close(), In();
|
@@ -32645,7 +32649,7 @@ var mqtt = { exports: {} };
|
|
32645
32649
|
return _n(Ne(V, j.length - z), j, z, ae);
|
32646
32650
|
}
|
32647
32651
|
function F(j, V, z, ae) {
|
32648
|
-
return _n(
|
32652
|
+
return _n(Ve(V), j, z, ae);
|
32649
32653
|
}
|
32650
32654
|
function _e(j, V, z, ae) {
|
32651
32655
|
return F(j, V, z, ae);
|
@@ -32728,15 +32732,15 @@ var mqtt = { exports: {} };
|
|
32728
32732
|
}
|
32729
32733
|
return Lt(ae);
|
32730
32734
|
}
|
32731
|
-
var
|
32735
|
+
var Oe = 4096;
|
32732
32736
|
function Lt(j) {
|
32733
32737
|
var V = j.length;
|
32734
|
-
if (V <=
|
32738
|
+
if (V <= Oe)
|
32735
32739
|
return String.fromCharCode.apply(String, j);
|
32736
32740
|
for (var z = "", ae = 0; ae < V; )
|
32737
32741
|
z += String.fromCharCode.apply(
|
32738
32742
|
String,
|
32739
|
-
j.slice(ae, ae +=
|
32743
|
+
j.slice(ae, ae += Oe)
|
32740
32744
|
);
|
32741
32745
|
return z;
|
32742
32746
|
}
|
@@ -32772,64 +32776,64 @@ var mqtt = { exports: {} };
|
|
32772
32776
|
var xe = this.subarray(V, z);
|
32773
32777
|
return xe.__proto__ = v.prototype, xe;
|
32774
32778
|
};
|
32775
|
-
function
|
32779
|
+
function he(j, V, z) {
|
32776
32780
|
if (j % 1 !== 0 || j < 0)
|
32777
32781
|
throw new RangeError("offset is not uint");
|
32778
32782
|
if (j + V > z)
|
32779
32783
|
throw new RangeError("Trying to access beyond buffer length");
|
32780
32784
|
}
|
32781
32785
|
v.prototype.readUIntLE = function(V, z, ae) {
|
32782
|
-
V = V >>> 0, z = z >>> 0, ae ||
|
32786
|
+
V = V >>> 0, z = z >>> 0, ae || he(V, z, this.length);
|
32783
32787
|
for (var xe = this[V], qe = 1, bn = 0; ++bn < z && (qe *= 256); )
|
32784
32788
|
xe += this[V + bn] * qe;
|
32785
32789
|
return xe;
|
32786
32790
|
}, v.prototype.readUIntBE = function(V, z, ae) {
|
32787
|
-
V = V >>> 0, z = z >>> 0, ae ||
|
32791
|
+
V = V >>> 0, z = z >>> 0, ae || he(V, z, this.length);
|
32788
32792
|
for (var xe = this[V + --z], qe = 1; z > 0 && (qe *= 256); )
|
32789
32793
|
xe += this[V + --z] * qe;
|
32790
32794
|
return xe;
|
32791
32795
|
}, v.prototype.readUInt8 = function(V, z) {
|
32792
|
-
return V = V >>> 0, z ||
|
32796
|
+
return V = V >>> 0, z || he(V, 1, this.length), this[V];
|
32793
32797
|
}, v.prototype.readUInt16LE = function(V, z) {
|
32794
|
-
return V = V >>> 0, z ||
|
32798
|
+
return V = V >>> 0, z || he(V, 2, this.length), this[V] | this[V + 1] << 8;
|
32795
32799
|
}, v.prototype.readUInt16BE = function(V, z) {
|
32796
|
-
return V = V >>> 0, z ||
|
32800
|
+
return V = V >>> 0, z || he(V, 2, this.length), this[V] << 8 | this[V + 1];
|
32797
32801
|
}, v.prototype.readUInt32LE = function(V, z) {
|
32798
|
-
return V = V >>> 0, z ||
|
32802
|
+
return V = V >>> 0, z || he(V, 4, this.length), (this[V] | this[V + 1] << 8 | this[V + 2] << 16) + this[V + 3] * 16777216;
|
32799
32803
|
}, v.prototype.readUInt32BE = function(V, z) {
|
32800
|
-
return V = V >>> 0, z ||
|
32804
|
+
return V = V >>> 0, z || he(V, 4, this.length), this[V] * 16777216 + (this[V + 1] << 16 | this[V + 2] << 8 | this[V + 3]);
|
32801
32805
|
}, v.prototype.readIntLE = function(V, z, ae) {
|
32802
|
-
V = V >>> 0, z = z >>> 0, ae ||
|
32806
|
+
V = V >>> 0, z = z >>> 0, ae || he(V, z, this.length);
|
32803
32807
|
for (var xe = this[V], qe = 1, bn = 0; ++bn < z && (qe *= 256); )
|
32804
32808
|
xe += this[V + bn] * qe;
|
32805
32809
|
return qe *= 128, xe >= qe && (xe -= Math.pow(2, 8 * z)), xe;
|
32806
32810
|
}, v.prototype.readIntBE = function(V, z, ae) {
|
32807
|
-
V = V >>> 0, z = z >>> 0, ae ||
|
32811
|
+
V = V >>> 0, z = z >>> 0, ae || he(V, z, this.length);
|
32808
32812
|
for (var xe = z, qe = 1, bn = this[V + --xe]; xe > 0 && (qe *= 256); )
|
32809
32813
|
bn += this[V + --xe] * qe;
|
32810
32814
|
return qe *= 128, bn >= qe && (bn -= Math.pow(2, 8 * z)), bn;
|
32811
32815
|
}, v.prototype.readInt8 = function(V, z) {
|
32812
|
-
return V = V >>> 0, z ||
|
32816
|
+
return V = V >>> 0, z || he(V, 1, this.length), this[V] & 128 ? (255 - this[V] + 1) * -1 : this[V];
|
32813
32817
|
}, v.prototype.readInt16LE = function(V, z) {
|
32814
|
-
V = V >>> 0, z ||
|
32818
|
+
V = V >>> 0, z || he(V, 2, this.length);
|
32815
32819
|
var ae = this[V] | this[V + 1] << 8;
|
32816
32820
|
return ae & 32768 ? ae | 4294901760 : ae;
|
32817
32821
|
}, v.prototype.readInt16BE = function(V, z) {
|
32818
|
-
V = V >>> 0, z ||
|
32822
|
+
V = V >>> 0, z || he(V, 2, this.length);
|
32819
32823
|
var ae = this[V + 1] | this[V] << 8;
|
32820
32824
|
return ae & 32768 ? ae | 4294901760 : ae;
|
32821
32825
|
}, v.prototype.readInt32LE = function(V, z) {
|
32822
|
-
return V = V >>> 0, z ||
|
32826
|
+
return V = V >>> 0, z || he(V, 4, this.length), this[V] | this[V + 1] << 8 | this[V + 2] << 16 | this[V + 3] << 24;
|
32823
32827
|
}, v.prototype.readInt32BE = function(V, z) {
|
32824
|
-
return V = V >>> 0, z ||
|
32828
|
+
return V = V >>> 0, z || he(V, 4, this.length), this[V] << 24 | this[V + 1] << 16 | this[V + 2] << 8 | this[V + 3];
|
32825
32829
|
}, v.prototype.readFloatLE = function(V, z) {
|
32826
|
-
return V = V >>> 0, z ||
|
32830
|
+
return V = V >>> 0, z || he(V, 4, this.length), d.read(this, V, !0, 23, 4);
|
32827
32831
|
}, v.prototype.readFloatBE = function(V, z) {
|
32828
|
-
return V = V >>> 0, z ||
|
32832
|
+
return V = V >>> 0, z || he(V, 4, this.length), d.read(this, V, !1, 23, 4);
|
32829
32833
|
}, v.prototype.readDoubleLE = function(V, z) {
|
32830
|
-
return V = V >>> 0, z ||
|
32834
|
+
return V = V >>> 0, z || he(V, 8, this.length), d.read(this, V, !0, 52, 8);
|
32831
32835
|
}, v.prototype.readDoubleBE = function(V, z) {
|
32832
|
-
return V = V >>> 0, z ||
|
32836
|
+
return V = V >>> 0, z || he(V, 8, this.length), d.read(this, V, !1, 52, 8);
|
32833
32837
|
};
|
32834
32838
|
function Et(j, V, z, ae, xe, qe) {
|
32835
32839
|
if (!v.isBuffer(j))
|
@@ -32973,7 +32977,7 @@ var mqtt = { exports: {} };
|
|
32973
32977
|
return this;
|
32974
32978
|
};
|
32975
32979
|
var Ce = /[^+/0-9A-Za-z-_]/g;
|
32976
|
-
function
|
32980
|
+
function de(j) {
|
32977
32981
|
if (j = j.split("=")[0], j = j.trim().replace(Ce, ""), j.length < 2)
|
32978
32982
|
return "";
|
32979
32983
|
for (; j.length % 4 !== 0; )
|
@@ -33038,7 +33042,7 @@ var mqtt = { exports: {} };
|
|
33038
33042
|
}
|
33039
33043
|
return qe;
|
33040
33044
|
}
|
33041
|
-
function
|
33045
|
+
function Ve(j) {
|
33042
33046
|
for (var V = [], z = 0; z < j.length; ++z)
|
33043
33047
|
V.push(j.charCodeAt(z) & 255);
|
33044
33048
|
return V;
|
@@ -33049,7 +33053,7 @@ var mqtt = { exports: {} };
|
|
33049
33053
|
return qe;
|
33050
33054
|
}
|
33051
33055
|
function jt(j) {
|
33052
|
-
return c.toByteArray(
|
33056
|
+
return c.toByteArray(de(j));
|
33053
33057
|
}
|
33054
33058
|
function _n(j, V, z, ae) {
|
33055
33059
|
for (var xe = 0; xe < ae && !(xe + z >= V.length || xe >= j.length); ++xe)
|
@@ -33589,7 +33593,7 @@ var mqtt = { exports: {} };
|
|
33589
33593
|
ae.reading = !1, In(oe, ae);
|
33590
33594
|
else {
|
33591
33595
|
var xe;
|
33592
|
-
if (z || (xe =
|
33596
|
+
if (z || (xe = Oe(ae, le)), xe)
|
33593
33597
|
re(oe, xe);
|
33594
33598
|
else if (ae.objectMode || le && le.length > 0)
|
33595
33599
|
if (typeof le != "string" && !ae.objectMode && Object.getPrototypeOf(le) !== _.prototype && (le = g(le)), V)
|
@@ -33609,7 +33613,7 @@ var mqtt = { exports: {} };
|
|
33609
33613
|
function Fe(oe, le, j, V) {
|
33610
33614
|
le.flowing && le.length === 0 && !le.sync ? (le.awaitDrain = 0, oe.emit("data", j)) : (le.length += le.objectMode ? 1 : j.length, V ? le.buffer.unshift(j) : le.buffer.push(j), le.needReadable && Dt(oe)), Et(oe, le);
|
33611
33615
|
}
|
33612
|
-
function
|
33616
|
+
function Oe(oe, le) {
|
33613
33617
|
var j;
|
33614
33618
|
return !y(le) && typeof le != "string" && le !== void 0 && !oe.objectMode && (j = new O("chunk", ["string", "Buffer", "Uint8Array"], le)), j;
|
33615
33619
|
}
|
@@ -33640,7 +33644,7 @@ var mqtt = { exports: {} };
|
|
33640
33644
|
var V = le.needReadable;
|
33641
33645
|
A("need readable", V), (le.length === 0 || le.length - oe < le.highWaterMark) && (V = !0, A("length less than watermark", V)), le.ended || le.reading ? (V = !1, A("reading or ended", V)) : V && (A("do read"), le.reading = !0, le.sync = !0, le.length === 0 && (le.needReadable = !0), this._read(le.highWaterMark), le.sync = !1, le.reading || (oe = Cn(j, le)));
|
33642
33646
|
var z;
|
33643
|
-
return oe > 0 ? z =
|
33647
|
+
return oe > 0 ? z = Ve(oe, le) : z = null, z === null ? (le.needReadable = le.length <= le.highWaterMark, oe = 0) : (le.length -= oe, le.awaitDrain = 0), le.length === 0 && (le.ended || (le.needReadable = !0), j !== oe && le.ended && Pt(this)), z !== null && this.emit("data", z), z;
|
33644
33648
|
};
|
33645
33649
|
function In(oe, le) {
|
33646
33650
|
if (A("onEofChunk"), !le.ended) {
|
@@ -33648,14 +33652,14 @@ var mqtt = { exports: {} };
|
|
33648
33652
|
var j = le.decoder.end();
|
33649
33653
|
j && j.length && (le.buffer.push(j), le.length += le.objectMode ? 1 : j.length);
|
33650
33654
|
}
|
33651
|
-
le.ended = !0, le.sync ? Dt(oe) : (le.needReadable = !1, le.emittedReadable || (le.emittedReadable = !0,
|
33655
|
+
le.ended = !0, le.sync ? Dt(oe) : (le.needReadable = !1, le.emittedReadable || (le.emittedReadable = !0, he(oe)));
|
33652
33656
|
}
|
33653
33657
|
}
|
33654
33658
|
function Dt(oe) {
|
33655
33659
|
var le = oe._readableState;
|
33656
|
-
A("emitReadable", le.needReadable, le.emittedReadable), le.needReadable = !1, le.emittedReadable || (A("emitReadable", le.flowing), le.emittedReadable = !0, u.nextTick(
|
33660
|
+
A("emitReadable", le.needReadable, le.emittedReadable), le.needReadable = !1, le.emittedReadable || (A("emitReadable", le.flowing), le.emittedReadable = !0, u.nextTick(he, oe));
|
33657
33661
|
}
|
33658
|
-
function
|
33662
|
+
function he(oe) {
|
33659
33663
|
var le = oe._readableState;
|
33660
33664
|
A("emitReadable_", le.destroyed, le.length, le.ended), !le.destroyed && (le.length || le.ended) && (oe.emit("readable"), le.emittedReadable = !1), le.needReadable = !le.flowing && !le.ended && le.length <= le.highWaterMark, Ne(oe);
|
33661
33665
|
}
|
@@ -33767,9 +33771,9 @@ var mqtt = { exports: {} };
|
|
33767
33771
|
}
|
33768
33772
|
Ie.prototype.resume = function() {
|
33769
33773
|
var oe = this._readableState;
|
33770
|
-
return oe.flowing || (A("resume"), oe.flowing = !oe.readableListening,
|
33774
|
+
return oe.flowing || (A("resume"), oe.flowing = !oe.readableListening, de(this, oe)), oe.paused = !1, this;
|
33771
33775
|
};
|
33772
|
-
function
|
33776
|
+
function de(oe, le) {
|
33773
33777
|
le.resumeScheduled || (le.resumeScheduled = !0, u.nextTick(Ue, oe, le));
|
33774
33778
|
}
|
33775
33779
|
function Ue(oe, le) {
|
@@ -33837,7 +33841,7 @@ var mqtt = { exports: {} };
|
|
33837
33841
|
set: function(le) {
|
33838
33842
|
this._readableState && (this._readableState.flowing = le);
|
33839
33843
|
}
|
33840
|
-
}), Ie._fromList =
|
33844
|
+
}), Ie._fromList = Ve, Object.defineProperty(Ie.prototype, "readableLength", {
|
33841
33845
|
// making it explicit this property is not enumerable
|
33842
33846
|
// because otherwise some prototype manipulation in
|
33843
33847
|
// userland will fail
|
@@ -33846,7 +33850,7 @@ var mqtt = { exports: {} };
|
|
33846
33850
|
return this._readableState.length;
|
33847
33851
|
}
|
33848
33852
|
});
|
33849
|
-
function
|
33853
|
+
function Ve(oe, le) {
|
33850
33854
|
if (le.length === 0)
|
33851
33855
|
return null;
|
33852
33856
|
var j;
|
@@ -33937,9 +33941,9 @@ var mqtt = { exports: {} };
|
|
33937
33941
|
(function() {
|
33938
33942
|
o.exports = ue;
|
33939
33943
|
function d(Ne) {
|
33940
|
-
var
|
33944
|
+
var Ve = this;
|
33941
33945
|
this.next = null, this.entry = null, this.finish = function() {
|
33942
|
-
Ue(
|
33946
|
+
Ue(Ve, Ne);
|
33943
33947
|
};
|
33944
33948
|
}
|
33945
33949
|
var f;
|
@@ -33958,16 +33962,16 @@ var mqtt = { exports: {} };
|
|
33958
33962
|
n("inherits")(ue, _);
|
33959
33963
|
function re() {
|
33960
33964
|
}
|
33961
|
-
function F(Ne,
|
33962
|
-
f = f || n("./_stream_duplex"), Ne = Ne || {}, typeof Pt != "boolean" && (Pt =
|
33965
|
+
function F(Ne, Ve, Pt) {
|
33966
|
+
f = f || n("./_stream_duplex"), Ne = Ne || {}, typeof Pt != "boolean" && (Pt = Ve instanceof f), this.objectMode = !!Ne.objectMode, Pt && (this.objectMode = this.objectMode || !!Ne.writableObjectMode), this.highWaterMark = S(this, Ne, "writableHighWaterMark", Pt), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
|
33963
33967
|
var jt = Ne.decodeStrings === !1;
|
33964
33968
|
this.decodeStrings = !jt, this.defaultEncoding = Ne.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(_n) {
|
33965
|
-
In(
|
33969
|
+
In(Ve, _n);
|
33966
33970
|
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = Ne.emitClose !== !1, this.autoDestroy = !!Ne.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new d(this);
|
33967
33971
|
}
|
33968
33972
|
F.prototype.getBuffer = function() {
|
33969
|
-
for (var
|
33970
|
-
Pt.push(
|
33973
|
+
for (var Ve = this.bufferedRequest, Pt = []; Ve; )
|
33974
|
+
Pt.push(Ve), Ve = Ve.next;
|
33971
33975
|
return Pt;
|
33972
33976
|
}, function() {
|
33973
33977
|
try {
|
@@ -33981,42 +33985,42 @@ var mqtt = { exports: {} };
|
|
33981
33985
|
}();
|
33982
33986
|
var _e;
|
33983
33987
|
typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (_e = Function.prototype[Symbol.hasInstance], Object.defineProperty(ue, Symbol.hasInstance, {
|
33984
|
-
value: function(
|
33985
|
-
return _e.call(this,
|
33988
|
+
value: function(Ve) {
|
33989
|
+
return _e.call(this, Ve) ? !0 : this !== ue ? !1 : Ve && Ve._writableState instanceof F;
|
33986
33990
|
}
|
33987
|
-
})) : _e = function(
|
33988
|
-
return
|
33991
|
+
})) : _e = function(Ve) {
|
33992
|
+
return Ve instanceof this;
|
33989
33993
|
};
|
33990
33994
|
function ue(Ne) {
|
33991
33995
|
f = f || n("./_stream_duplex");
|
33992
|
-
var
|
33993
|
-
if (!
|
33996
|
+
var Ve = this instanceof f;
|
33997
|
+
if (!Ve && !_e.call(ue, this))
|
33994
33998
|
return new ue(Ne);
|
33995
|
-
this._writableState = new F(Ne, this,
|
33999
|
+
this._writableState = new F(Ne, this, Ve), this.writable = !0, Ne && (typeof Ne.write == "function" && (this._write = Ne.write), typeof Ne.writev == "function" && (this._writev = Ne.writev), typeof Ne.destroy == "function" && (this._destroy = Ne.destroy), typeof Ne.final == "function" && (this._final = Ne.final)), _.call(this);
|
33996
34000
|
}
|
33997
34001
|
ue.prototype.pipe = function() {
|
33998
34002
|
D(this, new M());
|
33999
34003
|
};
|
34000
|
-
function Ie(Ne,
|
34004
|
+
function Ie(Ne, Ve) {
|
34001
34005
|
var Pt = new $();
|
34002
|
-
D(Ne, Pt), u.nextTick(
|
34006
|
+
D(Ne, Pt), u.nextTick(Ve, Pt);
|
34003
34007
|
}
|
34004
|
-
function ze(Ne,
|
34008
|
+
function ze(Ne, Ve, Pt, jt) {
|
34005
34009
|
var _n;
|
34006
|
-
return Pt === null ? _n = new ie() : typeof Pt != "string" && !
|
34010
|
+
return Pt === null ? _n = new ie() : typeof Pt != "string" && !Ve.objectMode && (_n = new x("chunk", ["string", "Buffer"], Pt)), _n ? (D(Ne, _n), u.nextTick(jt, _n), !1) : !0;
|
34007
34011
|
}
|
34008
|
-
ue.prototype.write = function(Ne,
|
34012
|
+
ue.prototype.write = function(Ne, Ve, Pt) {
|
34009
34013
|
var jt = this._writableState, _n = !1, oe = !jt.objectMode && b(Ne);
|
34010
|
-
return oe && !v.isBuffer(Ne) && (Ne = y(Ne)), typeof
|
34014
|
+
return oe && !v.isBuffer(Ne) && (Ne = y(Ne)), typeof Ve == "function" && (Pt = Ve, Ve = null), oe ? Ve = "buffer" : Ve || (Ve = jt.defaultEncoding), typeof Pt != "function" && (Pt = re), jt.ending ? Ie(this, Pt) : (oe || ze(this, jt, Ne, Pt)) && (jt.pendingcb++, _n = Oe(this, jt, oe, Ne, Ve, Pt)), _n;
|
34011
34015
|
}, ue.prototype.cork = function() {
|
34012
34016
|
this._writableState.corked++;
|
34013
34017
|
}, ue.prototype.uncork = function() {
|
34014
34018
|
var Ne = this._writableState;
|
34015
34019
|
Ne.corked && (Ne.corked--, !Ne.writing && !Ne.corked && !Ne.bufferProcessing && Ne.bufferedRequest && Et(this, Ne));
|
34016
|
-
}, ue.prototype.setDefaultEncoding = function(
|
34017
|
-
if (typeof
|
34018
|
-
throw new Y(
|
34019
|
-
return this._writableState.defaultEncoding =
|
34020
|
+
}, ue.prototype.setDefaultEncoding = function(Ve) {
|
34021
|
+
if (typeof Ve == "string" && (Ve = Ve.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((Ve + "").toLowerCase()) > -1))
|
34022
|
+
throw new Y(Ve);
|
34023
|
+
return this._writableState.defaultEncoding = Ve, this;
|
34020
34024
|
}, Object.defineProperty(ue.prototype, "writableBuffer", {
|
34021
34025
|
// making it explicit this property is not enumerable
|
34022
34026
|
// because otherwise some prototype manipulation in
|
@@ -34026,8 +34030,8 @@ var mqtt = { exports: {} };
|
|
34026
34030
|
return this._writableState && this._writableState.getBuffer();
|
34027
34031
|
}
|
34028
34032
|
});
|
34029
|
-
function Fe(Ne,
|
34030
|
-
return !Ne.objectMode && Ne.decodeStrings !== !1 && typeof
|
34033
|
+
function Fe(Ne, Ve, Pt) {
|
34034
|
+
return !Ne.objectMode && Ne.decodeStrings !== !1 && typeof Ve == "string" && (Ve = v.from(Ve, Pt)), Ve;
|
34031
34035
|
}
|
34032
34036
|
Object.defineProperty(ue.prototype, "writableHighWaterMark", {
|
34033
34037
|
// making it explicit this property is not enumerable
|
@@ -34038,77 +34042,77 @@ var mqtt = { exports: {} };
|
|
34038
34042
|
return this._writableState.highWaterMark;
|
34039
34043
|
}
|
34040
34044
|
});
|
34041
|
-
function
|
34045
|
+
function Oe(Ne, Ve, Pt, jt, _n, oe) {
|
34042
34046
|
if (!Pt) {
|
34043
|
-
var le = Fe(
|
34047
|
+
var le = Fe(Ve, jt, _n);
|
34044
34048
|
jt !== le && (Pt = !0, _n = "buffer", jt = le);
|
34045
34049
|
}
|
34046
|
-
var j =
|
34047
|
-
|
34048
|
-
var V =
|
34049
|
-
if (V || (
|
34050
|
-
var z =
|
34051
|
-
|
34050
|
+
var j = Ve.objectMode ? 1 : jt.length;
|
34051
|
+
Ve.length += j;
|
34052
|
+
var V = Ve.length < Ve.highWaterMark;
|
34053
|
+
if (V || (Ve.needDrain = !0), Ve.writing || Ve.corked) {
|
34054
|
+
var z = Ve.lastBufferedRequest;
|
34055
|
+
Ve.lastBufferedRequest = {
|
34052
34056
|
chunk: jt,
|
34053
34057
|
encoding: _n,
|
34054
34058
|
isBuf: Pt,
|
34055
34059
|
callback: oe,
|
34056
34060
|
next: null
|
34057
|
-
}, z ? z.next =
|
34061
|
+
}, z ? z.next = Ve.lastBufferedRequest : Ve.bufferedRequest = Ve.lastBufferedRequest, Ve.bufferedRequestCount += 1;
|
34058
34062
|
} else
|
34059
|
-
Lt(Ne,
|
34063
|
+
Lt(Ne, Ve, !1, j, jt, _n, oe);
|
34060
34064
|
return V;
|
34061
34065
|
}
|
34062
|
-
function Lt(Ne,
|
34063
|
-
|
34066
|
+
function Lt(Ne, Ve, Pt, jt, _n, oe, le) {
|
34067
|
+
Ve.writelen = jt, Ve.writecb = le, Ve.writing = !0, Ve.sync = !0, Ve.destroyed ? Ve.onwrite(new k("write")) : Pt ? Ne._writev(_n, Ve.onwrite) : Ne._write(_n, oe, Ve.onwrite), Ve.sync = !1;
|
34064
34068
|
}
|
34065
|
-
function pe(Ne,
|
34066
|
-
--
|
34069
|
+
function pe(Ne, Ve, Pt, jt, _n) {
|
34070
|
+
--Ve.pendingcb, Pt ? (u.nextTick(_n, jt), u.nextTick(Ce, Ne, Ve), Ne._writableState.errorEmitted = !0, D(Ne, jt)) : (_n(jt), Ne._writableState.errorEmitted = !0, D(Ne, jt), Ce(Ne, Ve));
|
34067
34071
|
}
|
34068
34072
|
function Cn(Ne) {
|
34069
34073
|
Ne.writing = !1, Ne.writecb = null, Ne.length -= Ne.writelen, Ne.writelen = 0;
|
34070
34074
|
}
|
34071
|
-
function In(Ne,
|
34075
|
+
function In(Ne, Ve) {
|
34072
34076
|
var Pt = Ne._writableState, jt = Pt.sync, _n = Pt.writecb;
|
34073
34077
|
if (typeof _n != "function")
|
34074
34078
|
throw new O();
|
34075
|
-
if (Cn(Pt),
|
34076
|
-
pe(Ne, Pt, jt,
|
34079
|
+
if (Cn(Pt), Ve)
|
34080
|
+
pe(Ne, Pt, jt, Ve, _n);
|
34077
34081
|
else {
|
34078
34082
|
var oe = hn(Pt) || Ne.destroyed;
|
34079
34083
|
!oe && !Pt.corked && !Pt.bufferProcessing && Pt.bufferedRequest && Et(Ne, Pt), jt ? u.nextTick(Dt, Ne, Pt, oe, _n) : Dt(Ne, Pt, oe, _n);
|
34080
34084
|
}
|
34081
34085
|
}
|
34082
|
-
function Dt(Ne,
|
34083
|
-
Pt ||
|
34086
|
+
function Dt(Ne, Ve, Pt, jt) {
|
34087
|
+
Pt || he(Ne, Ve), Ve.pendingcb--, jt(), Ce(Ne, Ve);
|
34084
34088
|
}
|
34085
|
-
function
|
34086
|
-
|
34089
|
+
function he(Ne, Ve) {
|
34090
|
+
Ve.length === 0 && Ve.needDrain && (Ve.needDrain = !1, Ne.emit("drain"));
|
34087
34091
|
}
|
34088
|
-
function Et(Ne,
|
34089
|
-
|
34090
|
-
var Pt =
|
34092
|
+
function Et(Ne, Ve) {
|
34093
|
+
Ve.bufferProcessing = !0;
|
34094
|
+
var Pt = Ve.bufferedRequest;
|
34091
34095
|
if (Ne._writev && Pt && Pt.next) {
|
34092
|
-
var jt =
|
34096
|
+
var jt = Ve.bufferedRequestCount, _n = new Array(jt), oe = Ve.corkedRequestsFree;
|
34093
34097
|
oe.entry = Pt;
|
34094
34098
|
for (var le = 0, j = !0; Pt; )
|
34095
34099
|
_n[le] = Pt, Pt.isBuf || (j = !1), Pt = Pt.next, le += 1;
|
34096
|
-
_n.allBuffers = j, Lt(Ne,
|
34100
|
+
_n.allBuffers = j, Lt(Ne, Ve, !0, Ve.length, _n, "", oe.finish), Ve.pendingcb++, Ve.lastBufferedRequest = null, oe.next ? (Ve.corkedRequestsFree = oe.next, oe.next = null) : Ve.corkedRequestsFree = new d(Ve), Ve.bufferedRequestCount = 0;
|
34097
34101
|
} else {
|
34098
34102
|
for (; Pt; ) {
|
34099
|
-
var V = Pt.chunk, z = Pt.encoding, ae = Pt.callback, xe =
|
34100
|
-
if (Lt(Ne,
|
34103
|
+
var V = Pt.chunk, z = Pt.encoding, ae = Pt.callback, xe = Ve.objectMode ? 1 : V.length;
|
34104
|
+
if (Lt(Ne, Ve, !1, xe, V, z, ae), Pt = Pt.next, Ve.bufferedRequestCount--, Ve.writing)
|
34101
34105
|
break;
|
34102
34106
|
}
|
34103
|
-
Pt === null && (
|
34107
|
+
Pt === null && (Ve.lastBufferedRequest = null);
|
34104
34108
|
}
|
34105
|
-
|
34109
|
+
Ve.bufferedRequest = Pt, Ve.bufferProcessing = !1;
|
34106
34110
|
}
|
34107
|
-
ue.prototype._write = function(Ne,
|
34111
|
+
ue.prototype._write = function(Ne, Ve, Pt) {
|
34108
34112
|
Pt(new L("_write()"));
|
34109
|
-
}, ue.prototype._writev = null, ue.prototype.end = function(Ne,
|
34113
|
+
}, ue.prototype._writev = null, ue.prototype.end = function(Ne, Ve, Pt) {
|
34110
34114
|
var jt = this._writableState;
|
34111
|
-
return typeof Ne == "function" ? (Pt = Ne, Ne = null,
|
34115
|
+
return typeof Ne == "function" ? (Pt = Ne, Ne = null, Ve = null) : typeof Ve == "function" && (Pt = Ve, Ve = null), Ne != null && this.write(Ne, Ve), jt.corked && (jt.corked = 1, this.uncork()), jt.ending || de(this, jt, Pt), this;
|
34112
34116
|
}, Object.defineProperty(ue.prototype, "writableLength", {
|
34113
34117
|
// making it explicit this property is not enumerable
|
34114
34118
|
// because otherwise some prototype manipulation in
|
@@ -34121,32 +34125,32 @@ var mqtt = { exports: {} };
|
|
34121
34125
|
function hn(Ne) {
|
34122
34126
|
return Ne.ending && Ne.length === 0 && Ne.bufferedRequest === null && !Ne.finished && !Ne.writing;
|
34123
34127
|
}
|
34124
|
-
function vn(Ne,
|
34128
|
+
function vn(Ne, Ve) {
|
34125
34129
|
Ne._final(function(Pt) {
|
34126
|
-
|
34130
|
+
Ve.pendingcb--, Pt && D(Ne, Pt), Ve.prefinished = !0, Ne.emit("prefinish"), Ce(Ne, Ve);
|
34127
34131
|
});
|
34128
34132
|
}
|
34129
|
-
function kt(Ne,
|
34130
|
-
!
|
34133
|
+
function kt(Ne, Ve) {
|
34134
|
+
!Ve.prefinished && !Ve.finalCalled && (typeof Ne._final == "function" && !Ve.destroyed ? (Ve.pendingcb++, Ve.finalCalled = !0, u.nextTick(vn, Ne, Ve)) : (Ve.prefinished = !0, Ne.emit("prefinish")));
|
34131
34135
|
}
|
34132
|
-
function Ce(Ne,
|
34133
|
-
var Pt = hn(
|
34134
|
-
if (Pt && (kt(Ne,
|
34136
|
+
function Ce(Ne, Ve) {
|
34137
|
+
var Pt = hn(Ve);
|
34138
|
+
if (Pt && (kt(Ne, Ve), Ve.pendingcb === 0 && (Ve.finished = !0, Ne.emit("finish"), Ve.autoDestroy))) {
|
34135
34139
|
var jt = Ne._readableState;
|
34136
34140
|
(!jt || jt.autoDestroy && jt.endEmitted) && Ne.destroy();
|
34137
34141
|
}
|
34138
34142
|
return Pt;
|
34139
34143
|
}
|
34140
|
-
function
|
34141
|
-
|
34144
|
+
function de(Ne, Ve, Pt) {
|
34145
|
+
Ve.ending = !0, Ce(Ne, Ve), Pt && (Ve.finished ? u.nextTick(Pt) : Ne.once("finish", Pt)), Ve.ended = !0, Ne.writable = !1;
|
34142
34146
|
}
|
34143
|
-
function Ue(Ne,
|
34147
|
+
function Ue(Ne, Ve, Pt) {
|
34144
34148
|
var jt = Ne.entry;
|
34145
34149
|
for (Ne.entry = null; jt; ) {
|
34146
34150
|
var _n = jt.callback;
|
34147
|
-
|
34151
|
+
Ve.pendingcb--, _n(Pt), jt = jt.next;
|
34148
34152
|
}
|
34149
|
-
|
34153
|
+
Ve.corkedRequestsFree.next = Ne;
|
34150
34154
|
}
|
34151
34155
|
Object.defineProperty(ue.prototype, "destroyed", {
|
34152
34156
|
// making it explicit this property is not enumerable
|
@@ -34156,11 +34160,11 @@ var mqtt = { exports: {} };
|
|
34156
34160
|
get: function() {
|
34157
34161
|
return this._writableState === void 0 ? !1 : this._writableState.destroyed;
|
34158
34162
|
},
|
34159
|
-
set: function(
|
34160
|
-
this._writableState && (this._writableState.destroyed =
|
34163
|
+
set: function(Ve) {
|
34164
|
+
this._writableState && (this._writableState.destroyed = Ve);
|
34161
34165
|
}
|
34162
|
-
}), ue.prototype.destroy = A.destroy, ue.prototype._undestroy = A.undestroy, ue.prototype._destroy = function(Ne,
|
34163
|
-
|
34166
|
+
}), ue.prototype.destroy = A.destroy, ue.prototype._undestroy = A.undestroy, ue.prototype._destroy = function(Ne, Ve) {
|
34167
|
+
Ve(Ne);
|
34164
34168
|
};
|
34165
34169
|
}).call(this);
|
34166
34170
|
}).call(this, n("_process"), typeof commonjsGlobal < "u" ? commonjsGlobal : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
@@ -34701,8 +34705,8 @@ var mqtt = { exports: {} };
|
|
34701
34705
|
if (typeof ze == "function")
|
34702
34706
|
c(ze, this, D);
|
34703
34707
|
else
|
34704
|
-
for (var Fe = ze.length,
|
34705
|
-
c(
|
34708
|
+
for (var Fe = ze.length, Oe = x(ze, Fe), re = 0; re < Fe; ++re)
|
34709
|
+
c(Oe[re], this, D);
|
34706
34710
|
return !0;
|
34707
34711
|
};
|
34708
34712
|
function b($, Y, D, re) {
|
@@ -36702,25 +36706,25 @@ var mqtt = { exports: {} };
|
|
36702
36706
|
allowStale: Ie,
|
36703
36707
|
dispose: ze,
|
36704
36708
|
disposeAfter: Fe,
|
36705
|
-
noDisposeOnSet:
|
36709
|
+
noDisposeOnSet: Oe,
|
36706
36710
|
noUpdateTTL: Lt,
|
36707
36711
|
maxSize: pe = 0,
|
36708
36712
|
maxEntrySize: Cn = 0,
|
36709
36713
|
sizeCalculation: In,
|
36710
36714
|
fetchMethod: Dt,
|
36711
|
-
fetchContext:
|
36715
|
+
fetchContext: he,
|
36712
36716
|
noDeleteOnFetchRejection: Et,
|
36713
36717
|
noDeleteOnStaleGet: hn,
|
36714
36718
|
allowStaleOnFetchRejection: vn,
|
36715
36719
|
allowStaleOnFetchAbort: kt,
|
36716
36720
|
ignoreFetchAbort: Ce
|
36717
|
-
} = $, { length:
|
36721
|
+
} = $, { length: de, maxAge: Ue, stale: Ne } = $ instanceof k ? {} : $;
|
36718
36722
|
if (Y !== 0 && !x(Y))
|
36719
36723
|
throw new TypeError("max option must be a nonnegative integer");
|
36720
|
-
const
|
36721
|
-
if (!
|
36724
|
+
const Ve = Y ? L(Y) : Array;
|
36725
|
+
if (!Ve)
|
36722
36726
|
throw new Error("invalid max value: " + Y);
|
36723
|
-
if (this.max = Y, this.maxSize = pe, this.maxEntrySize = Cn || this.maxSize, this.sizeCalculation = In ||
|
36727
|
+
if (this.max = Y, this.maxSize = pe, this.maxEntrySize = Cn || this.maxSize, this.sizeCalculation = In || de, this.sizeCalculation) {
|
36724
36728
|
if (!this.maxSize && !this.maxEntrySize)
|
36725
36729
|
throw new TypeError(
|
36726
36730
|
"cannot set sizeCalculation without setting maxSize or maxEntrySize"
|
@@ -36732,11 +36736,11 @@ var mqtt = { exports: {} };
|
|
36732
36736
|
throw new TypeError(
|
36733
36737
|
"fetchMethod must be a function if specified"
|
36734
36738
|
);
|
36735
|
-
if (this.fetchContext =
|
36739
|
+
if (this.fetchContext = he, !this.fetchMethod && he !== void 0)
|
36736
36740
|
throw new TypeError(
|
36737
36741
|
"cannot set fetchContext without fetchMethod"
|
36738
36742
|
);
|
36739
|
-
if (this.keyMap = /* @__PURE__ */ new Map(), this.keyList = new Array(Y).fill(null), this.valList = new Array(Y).fill(null), this.next = new
|
36743
|
+
if (this.keyMap = /* @__PURE__ */ new Map(), this.keyList = new Array(Y).fill(null), this.valList = new Array(Y).fill(null), this.next = new Ve(Y), this.prev = new Ve(Y), this.head = 0, this.tail = 0, this.free = new M(Y), this.initialFill = 1, this.size = 0, typeof ze == "function" && (this.dispose = ze), typeof Fe == "function" ? (this.disposeAfter = Fe, this.disposed = []) : (this.disposeAfter = null, this.disposed = null), this.noDisposeOnSet = !!Oe, this.noUpdateTTL = !!Lt, this.noDeleteOnFetchRejection = !!Et, this.allowStaleOnFetchRejection = !!vn, this.allowStaleOnFetchAbort = !!kt, this.ignoreFetchAbort = !!Ce, this.maxEntrySize !== 0) {
|
36740
36744
|
if (this.maxSize !== 0 && !x(this.maxSize))
|
36741
36745
|
throw new TypeError(
|
36742
36746
|
"maxSize must be a positive integer if specified"
|
@@ -36762,7 +36766,7 @@ var mqtt = { exports: {} };
|
|
36762
36766
|
const Pt = "LRU_CACHE_UNBOUNDED";
|
36763
36767
|
S(Pt) && (g.add(Pt), w("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", Pt, k));
|
36764
36768
|
}
|
36765
|
-
Ne && y("stale", "allowStale"), Ue && y("maxAge", "ttl"),
|
36769
|
+
Ne && y("stale", "allowStale"), Ue && y("maxAge", "ttl"), de && y("length", "sizeCalculation");
|
36766
36770
|
}
|
36767
36771
|
getRemainingTTL($) {
|
36768
36772
|
return this.has($, { updateAgeOnHas: !1 }) ? 1 / 0 : 0;
|
@@ -36957,11 +36961,11 @@ var mqtt = { exports: {} };
|
|
36957
36961
|
Fe = this.newIndex(), this.keyList[Fe] = $, this.valList[Fe] = Y, this.keyMap.set($, Fe), this.next[this.tail] = Fe, this.prev[Fe] = this.tail, this.tail = Fe, this.size++, this.addItemSize(Fe, _e, ze), ze && (ze.set = "add"), Ie = !1;
|
36958
36962
|
else {
|
36959
36963
|
this.moveToTail(Fe);
|
36960
|
-
const
|
36961
|
-
if (Y !==
|
36962
|
-
if (this.isBackgroundFetch(
|
36964
|
+
const Oe = this.valList[Fe];
|
36965
|
+
if (Y !== Oe) {
|
36966
|
+
if (this.isBackgroundFetch(Oe) ? Oe.__abortController.abort(new Error("replaced")) : F || (this.dispose(Oe, $, "set"), this.disposeAfter && this.disposed.push([Oe, $, "set"])), this.removeItemSize(Fe), this.valList[Fe] = Y, this.addItemSize(Fe, _e, ze), ze) {
|
36963
36967
|
ze.set = "replace";
|
36964
|
-
const Lt =
|
36968
|
+
const Lt = Oe && this.isBackgroundFetch(Oe) ? Oe.__staleWhileFetching : Oe;
|
36965
36969
|
Lt !== void 0 && (ze.oldValue = Lt);
|
36966
36970
|
}
|
36967
36971
|
} else
|
@@ -37021,18 +37025,18 @@ var mqtt = { exports: {} };
|
|
37021
37025
|
const { aborted: In } = _e.signal, Dt = D.ignoreFetchAbort && pe !== void 0;
|
37022
37026
|
return D.status && (In && !Cn ? (D.status.fetchAborted = !0, D.status.fetchError = _e.signal.reason, Dt && (D.status.fetchAbortIgnored = !0)) : D.status.fetchResolved = !0), In && !Dt && !Cn ? Fe(_e.signal.reason) : (this.valList[Y] === Lt && (pe === void 0 ? Lt.__staleWhileFetching ? this.valList[Y] = Lt.__staleWhileFetching : this.delete($) : (D.status && (D.status.fetchUpdated = !0), this.set($, pe, ue.options))), pe);
|
37023
37027
|
}, ze = (pe) => (D.status && (D.status.fetchRejected = !0, D.status.fetchError = pe), Fe(pe)), Fe = (pe) => {
|
37024
|
-
const { aborted: Cn } = _e.signal, In = Cn && D.allowStaleOnFetchAbort, Dt = In || D.allowStaleOnFetchRejection,
|
37025
|
-
if (this.valList[Y] === Lt && (!
|
37028
|
+
const { aborted: Cn } = _e.signal, In = Cn && D.allowStaleOnFetchAbort, Dt = In || D.allowStaleOnFetchRejection, he = Dt || D.noDeleteOnFetchRejection;
|
37029
|
+
if (this.valList[Y] === Lt && (!he || Lt.__staleWhileFetching === void 0 ? this.delete($) : In || (this.valList[Y] = Lt.__staleWhileFetching)), Dt)
|
37026
37030
|
return D.status && Lt.__staleWhileFetching !== void 0 && (D.status.returnedStale = !0), Lt.__staleWhileFetching;
|
37027
37031
|
if (Lt.__returned === Lt)
|
37028
37032
|
throw pe;
|
37029
|
-
},
|
37033
|
+
}, Oe = (pe, Cn) => {
|
37030
37034
|
this.fetchMethod($, F, ue).then((In) => pe(In), Cn), _e.signal.addEventListener("abort", () => {
|
37031
37035
|
(!D.ignoreFetchAbort || D.allowStaleOnFetchAbort) && (pe(), D.allowStaleOnFetchAbort && (pe = (In) => Ie(In, !0)));
|
37032
37036
|
});
|
37033
37037
|
};
|
37034
37038
|
D.status && (D.status.fetchDispatched = !0);
|
37035
|
-
const Lt = new Promise(
|
37039
|
+
const Lt = new Promise(Oe).then(Ie, ze);
|
37036
37040
|
return Lt.__abortController = _e, Lt.__staleWhileFetching = F, Lt.__returned = null, Y === void 0 ? (this.set($, Lt, { ...ue.options, status: void 0 }), Y = this.keyMap.get($)) : this.valList[Y] = Lt, Lt;
|
37037
37041
|
}
|
37038
37042
|
isBackgroundFetch($) {
|
@@ -37055,13 +37059,13 @@ var mqtt = { exports: {} };
|
|
37055
37059
|
noUpdateTTL: ze = this.noUpdateTTL,
|
37056
37060
|
// fetch exclusive options
|
37057
37061
|
noDeleteOnFetchRejection: Fe = this.noDeleteOnFetchRejection,
|
37058
|
-
allowStaleOnFetchRejection:
|
37062
|
+
allowStaleOnFetchRejection: Oe = this.allowStaleOnFetchRejection,
|
37059
37063
|
ignoreFetchAbort: Lt = this.ignoreFetchAbort,
|
37060
37064
|
allowStaleOnFetchAbort: pe = this.allowStaleOnFetchAbort,
|
37061
37065
|
fetchContext: Cn = this.fetchContext,
|
37062
37066
|
forceRefresh: In = !1,
|
37063
37067
|
status: Dt,
|
37064
|
-
signal:
|
37068
|
+
signal: he
|
37065
37069
|
} = {}) {
|
37066
37070
|
if (!this.fetchMethod)
|
37067
37071
|
return Dt && (Dt.fetch = "get"), this.get($, {
|
@@ -37080,11 +37084,11 @@ var mqtt = { exports: {} };
|
|
37080
37084
|
sizeCalculation: Ie,
|
37081
37085
|
noUpdateTTL: ze,
|
37082
37086
|
noDeleteOnFetchRejection: Fe,
|
37083
|
-
allowStaleOnFetchRejection:
|
37087
|
+
allowStaleOnFetchRejection: Oe,
|
37084
37088
|
allowStaleOnFetchAbort: pe,
|
37085
37089
|
ignoreFetchAbort: Lt,
|
37086
37090
|
status: Dt,
|
37087
|
-
signal:
|
37091
|
+
signal: he
|
37088
37092
|
};
|
37089
37093
|
let hn = this.keyMap.get($);
|
37090
37094
|
if (hn === void 0) {
|
@@ -37100,8 +37104,8 @@ var mqtt = { exports: {} };
|
|
37100
37104
|
const kt = this.isStale(hn);
|
37101
37105
|
if (!In && !kt)
|
37102
37106
|
return Dt && (Dt.fetch = "hit"), this.moveToTail(hn), D && this.updateItemAge(hn), this.statusTTL(Dt, hn), vn;
|
37103
|
-
const Ce = this.backgroundFetch($, hn, Et, Cn),
|
37104
|
-
return Dt && (Dt.fetch =
|
37107
|
+
const Ce = this.backgroundFetch($, hn, Et, Cn), de = Ce.__staleWhileFetching !== void 0, Ue = de && Y;
|
37108
|
+
return Dt && (Dt.fetch = de && kt ? "stale" : "refresh", Ue && kt && (Dt.returnedStale = !0)), Ue ? Ce.__staleWhileFetching : Ce.__returned = Ce;
|
37105
37109
|
}
|
37106
37110
|
}
|
37107
37111
|
get($, {
|
@@ -38101,36 +38105,36 @@ var mqtt = { exports: {} };
|
|
38101
38105
|
}, { "./constants": 73, "./packet": 94, bl: 77, debug: 30, events: 49 }], 96: [function(n, o, a) {
|
38102
38106
|
const u = n("./constants"), { Buffer: c } = n("buffer"), d = c.allocUnsafe(0), f = c.from([0]), p = n("./numbers"), _ = n("process-nextick-args").nextTick, v = n("debug")("mqtt-packet:writeToStream"), g = p.cache, y = p.generateNumber, b = p.generateCache, A = p.genBufVariableByteInt, w = p.generate4ByteBuffer;
|
38103
38107
|
let S = Lt, T = !0;
|
38104
|
-
function x(Ce,
|
38105
|
-
switch (v("generate called"),
|
38108
|
+
function x(Ce, de, Ue) {
|
38109
|
+
switch (v("generate called"), de.cork && (de.cork(), _(L, de)), T && (T = !1, b()), v("generate: packet.cmd: %s", Ce.cmd), Ce.cmd) {
|
38106
38110
|
case "connect":
|
38107
|
-
return O(Ce,
|
38111
|
+
return O(Ce, de);
|
38108
38112
|
case "connack":
|
38109
|
-
return M(Ce,
|
38113
|
+
return M(Ce, de, Ue);
|
38110
38114
|
case "publish":
|
38111
|
-
return k(Ce,
|
38115
|
+
return k(Ce, de, Ue);
|
38112
38116
|
case "puback":
|
38113
38117
|
case "pubrec":
|
38114
38118
|
case "pubrel":
|
38115
38119
|
case "pubcomp":
|
38116
|
-
return ie(Ce,
|
38120
|
+
return ie(Ce, de, Ue);
|
38117
38121
|
case "subscribe":
|
38118
|
-
return $(Ce,
|
38122
|
+
return $(Ce, de, Ue);
|
38119
38123
|
case "suback":
|
38120
|
-
return Y(Ce,
|
38124
|
+
return Y(Ce, de, Ue);
|
38121
38125
|
case "unsubscribe":
|
38122
|
-
return D(Ce,
|
38126
|
+
return D(Ce, de, Ue);
|
38123
38127
|
case "unsuback":
|
38124
|
-
return re(Ce,
|
38128
|
+
return re(Ce, de, Ue);
|
38125
38129
|
case "pingreq":
|
38126
38130
|
case "pingresp":
|
38127
|
-
return F(Ce,
|
38131
|
+
return F(Ce, de);
|
38128
38132
|
case "disconnect":
|
38129
|
-
return _e(Ce,
|
38133
|
+
return _e(Ce, de, Ue);
|
38130
38134
|
case "auth":
|
38131
|
-
return ue(Ce,
|
38135
|
+
return ue(Ce, de, Ue);
|
38132
38136
|
default:
|
38133
|
-
return
|
38137
|
+
return de.destroy(new Error("Unknown command")), !1;
|
38134
38138
|
}
|
38135
38139
|
}
|
38136
38140
|
Object.defineProperty(x, "cacheNumbers", {
|
@@ -38144,47 +38148,47 @@ var mqtt = { exports: {} };
|
|
38144
38148
|
function L(Ce) {
|
38145
38149
|
Ce.uncork();
|
38146
38150
|
}
|
38147
|
-
function O(Ce,
|
38148
|
-
const Ne = Ce || {},
|
38151
|
+
function O(Ce, de, Ue) {
|
38152
|
+
const Ne = Ce || {}, Ve = Ne.protocolId || "MQTT";
|
38149
38153
|
let Pt = Ne.protocolVersion || 4;
|
38150
38154
|
const jt = Ne.will;
|
38151
38155
|
let _n = Ne.clean;
|
38152
38156
|
const oe = Ne.keepalive || 0, le = Ne.clientId || "", j = Ne.username, V = Ne.password, z = Ne.properties;
|
38153
38157
|
_n === void 0 && (_n = !0);
|
38154
38158
|
let ae = 0;
|
38155
|
-
if (!
|
38156
|
-
return
|
38157
|
-
if (ae +=
|
38158
|
-
return
|
38159
|
+
if (!Ve || typeof Ve != "string" && !c.isBuffer(Ve))
|
38160
|
+
return de.destroy(new Error("Invalid protocolId")), !1;
|
38161
|
+
if (ae += Ve.length + 2, Pt !== 3 && Pt !== 4 && Pt !== 5)
|
38162
|
+
return de.destroy(new Error("Invalid protocol version")), !1;
|
38159
38163
|
if (ae += 1, (typeof le == "string" || c.isBuffer(le)) && (le || Pt >= 4) && (le || _n))
|
38160
38164
|
ae += c.byteLength(le) + 2;
|
38161
38165
|
else {
|
38162
38166
|
if (Pt < 4)
|
38163
|
-
return
|
38167
|
+
return de.destroy(new Error("clientId must be supplied before 3.1.1")), !1;
|
38164
38168
|
if (_n * 1 === 0)
|
38165
|
-
return
|
38169
|
+
return de.destroy(new Error("clientId must be given if cleanSession set to 0")), !1;
|
38166
38170
|
}
|
38167
38171
|
if (typeof oe != "number" || oe < 0 || oe > 65535 || oe % 1 !== 0)
|
38168
|
-
return
|
38172
|
+
return de.destroy(new Error("Invalid keepalive")), !1;
|
38169
38173
|
ae += 2, ae += 1;
|
38170
38174
|
let xe, qe;
|
38171
38175
|
if (Pt === 5) {
|
38172
|
-
if (xe = Dt(
|
38176
|
+
if (xe = Dt(de, z), !xe)
|
38173
38177
|
return !1;
|
38174
38178
|
ae += xe.length;
|
38175
38179
|
}
|
38176
38180
|
if (jt) {
|
38177
38181
|
if (typeof jt != "object")
|
38178
|
-
return
|
38182
|
+
return de.destroy(new Error("Invalid will")), !1;
|
38179
38183
|
if (!jt.topic || typeof jt.topic != "string")
|
38180
|
-
return
|
38184
|
+
return de.destroy(new Error("Invalid will topic")), !1;
|
38181
38185
|
if (ae += c.byteLength(jt.topic) + 2, ae += 2, jt.payload)
|
38182
38186
|
if (jt.payload.length >= 0)
|
38183
38187
|
typeof jt.payload == "string" ? ae += c.byteLength(jt.payload) : ae += jt.payload.length;
|
38184
38188
|
else
|
38185
|
-
return
|
38189
|
+
return de.destroy(new Error("Invalid will payload")), !1;
|
38186
38190
|
if (qe = {}, Pt === 5) {
|
38187
|
-
if (qe = Dt(
|
38191
|
+
if (qe = Dt(de, jt.properties), !qe)
|
38188
38192
|
return !1;
|
38189
38193
|
ae += qe.length;
|
38190
38194
|
}
|
@@ -38194,80 +38198,80 @@ var mqtt = { exports: {} };
|
|
38194
38198
|
if (kt(j))
|
38195
38199
|
bn = !0, ae += c.byteLength(j) + 2;
|
38196
38200
|
else
|
38197
|
-
return
|
38201
|
+
return de.destroy(new Error("Invalid username")), !1;
|
38198
38202
|
if (V != null) {
|
38199
38203
|
if (!bn)
|
38200
|
-
return
|
38204
|
+
return de.destroy(new Error("Username is required to use password")), !1;
|
38201
38205
|
if (kt(V))
|
38202
38206
|
ae += vn(V) + 2;
|
38203
38207
|
else
|
38204
|
-
return
|
38208
|
+
return de.destroy(new Error("Invalid password")), !1;
|
38205
38209
|
}
|
38206
|
-
|
38210
|
+
de.write(u.CONNECT_HEADER), ze(de, ae), In(de, Ve), Ne.bridgeMode && (Pt += 128), de.write(
|
38207
38211
|
Pt === 131 ? u.VERSION131 : Pt === 132 ? u.VERSION132 : Pt === 4 ? u.VERSION4 : Pt === 5 ? u.VERSION5 : u.VERSION3
|
38208
38212
|
);
|
38209
38213
|
let Sn = 0;
|
38210
|
-
return Sn |= j != null ? u.USERNAME_MASK : 0, Sn |= V != null ? u.PASSWORD_MASK : 0, Sn |= jt && jt.retain ? u.WILL_RETAIN_MASK : 0, Sn |= jt && jt.qos ? jt.qos << u.WILL_QOS_SHIFT : 0, Sn |= jt ? u.WILL_FLAG_MASK : 0, Sn |= _n ? u.CLEAN_SESSION_MASK : 0,
|
38214
|
+
return Sn |= j != null ? u.USERNAME_MASK : 0, Sn |= V != null ? u.PASSWORD_MASK : 0, Sn |= jt && jt.retain ? u.WILL_RETAIN_MASK : 0, Sn |= jt && jt.qos ? jt.qos << u.WILL_QOS_SHIFT : 0, Sn |= jt ? u.WILL_FLAG_MASK : 0, Sn |= _n ? u.CLEAN_SESSION_MASK : 0, de.write(c.from([Sn])), S(de, oe), Pt === 5 && xe.write(), In(de, le), jt && (Pt === 5 && qe.write(), Fe(de, jt.topic), In(de, jt.payload)), j != null && In(de, j), V != null && In(de, V), !0;
|
38211
38215
|
}
|
38212
|
-
function M(Ce,
|
38213
|
-
const Ne = Ue ? Ue.protocolVersion : 4,
|
38216
|
+
function M(Ce, de, Ue) {
|
38217
|
+
const Ne = Ue ? Ue.protocolVersion : 4, Ve = Ce || {}, Pt = Ne === 5 ? Ve.reasonCode : Ve.returnCode, jt = Ve.properties;
|
38214
38218
|
let _n = 2;
|
38215
38219
|
if (typeof Pt != "number")
|
38216
|
-
return
|
38220
|
+
return de.destroy(new Error("Invalid return code")), !1;
|
38217
38221
|
let oe = null;
|
38218
38222
|
if (Ne === 5) {
|
38219
|
-
if (oe = Dt(
|
38223
|
+
if (oe = Dt(de, jt), !oe)
|
38220
38224
|
return !1;
|
38221
38225
|
_n += oe.length;
|
38222
38226
|
}
|
38223
|
-
return
|
38227
|
+
return de.write(u.CONNACK_HEADER), ze(de, _n), de.write(Ve.sessionPresent ? u.SESSIONPRESENT_HEADER : f), de.write(c.from([Pt])), oe != null && oe.write(), !0;
|
38224
38228
|
}
|
38225
|
-
function k(Ce,
|
38229
|
+
function k(Ce, de, Ue) {
|
38226
38230
|
v("publish: packet: %o", Ce);
|
38227
|
-
const Ne = Ue ? Ue.protocolVersion : 4,
|
38231
|
+
const Ne = Ue ? Ue.protocolVersion : 4, Ve = Ce || {}, Pt = Ve.qos || 0, jt = Ve.retain ? u.RETAIN_MASK : 0, _n = Ve.topic, oe = Ve.payload || d, le = Ve.messageId, j = Ve.properties;
|
38228
38232
|
let V = 0;
|
38229
38233
|
if (typeof _n == "string")
|
38230
38234
|
V += c.byteLength(_n) + 2;
|
38231
38235
|
else if (c.isBuffer(_n))
|
38232
38236
|
V += _n.length + 2;
|
38233
38237
|
else
|
38234
|
-
return
|
38238
|
+
return de.destroy(new Error("Invalid topic")), !1;
|
38235
38239
|
if (c.isBuffer(oe) ? V += oe.length : V += c.byteLength(oe), Pt && typeof le != "number")
|
38236
|
-
return
|
38240
|
+
return de.destroy(new Error("Invalid messageId")), !1;
|
38237
38241
|
Pt && (V += 2);
|
38238
38242
|
let z = null;
|
38239
38243
|
if (Ne === 5) {
|
38240
|
-
if (z = Dt(
|
38244
|
+
if (z = Dt(de, j), !z)
|
38241
38245
|
return !1;
|
38242
38246
|
V += z.length;
|
38243
38247
|
}
|
38244
|
-
return
|
38248
|
+
return de.write(u.PUBLISH_HEADER[Pt][Ve.dup ? 1 : 0][jt ? 1 : 0]), ze(de, V), S(de, vn(_n)), de.write(_n), Pt > 0 && S(de, le), z != null && z.write(), v("publish: payload: %o", oe), de.write(oe);
|
38245
38249
|
}
|
38246
|
-
function ie(Ce,
|
38247
|
-
const Ne = Ue ? Ue.protocolVersion : 4,
|
38250
|
+
function ie(Ce, de, Ue) {
|
38251
|
+
const Ne = Ue ? Ue.protocolVersion : 4, Ve = Ce || {}, Pt = Ve.cmd || "puback", jt = Ve.messageId, _n = Ve.dup && Pt === "pubrel" ? u.DUP_MASK : 0;
|
38248
38252
|
let oe = 0;
|
38249
|
-
const le =
|
38253
|
+
const le = Ve.reasonCode, j = Ve.properties;
|
38250
38254
|
let V = Ne === 5 ? 3 : 2;
|
38251
38255
|
if (Pt === "pubrel" && (oe = 1), typeof jt != "number")
|
38252
|
-
return
|
38256
|
+
return de.destroy(new Error("Invalid messageId")), !1;
|
38253
38257
|
let z = null;
|
38254
38258
|
if (Ne === 5 && typeof j == "object") {
|
38255
|
-
if (z = de
|
38259
|
+
if (z = he(de, j, Ue, V), !z)
|
38256
38260
|
return !1;
|
38257
38261
|
V += z.length;
|
38258
38262
|
}
|
38259
|
-
return
|
38263
|
+
return de.write(u.ACKS[Pt][oe][_n][0]), V === 3 && (V += le !== 0 ? 1 : -1), ze(de, V), S(de, jt), Ne === 5 && V !== 2 && de.write(c.from([le])), z !== null ? z.write() : V === 4 && de.write(c.from([0])), !0;
|
38260
38264
|
}
|
38261
|
-
function $(Ce,
|
38265
|
+
function $(Ce, de, Ue) {
|
38262
38266
|
v("subscribe: packet: ");
|
38263
|
-
const Ne = Ue ? Ue.protocolVersion : 4,
|
38267
|
+
const Ne = Ue ? Ue.protocolVersion : 4, Ve = Ce || {}, Pt = Ve.dup ? u.DUP_MASK : 0, jt = Ve.messageId, _n = Ve.subscriptions, oe = Ve.properties;
|
38264
38268
|
let le = 0;
|
38265
38269
|
if (typeof jt != "number")
|
38266
|
-
return
|
38270
|
+
return de.destroy(new Error("Invalid messageId")), !1;
|
38267
38271
|
le += 2;
|
38268
38272
|
let j = null;
|
38269
38273
|
if (Ne === 5) {
|
38270
|
-
if (j = Dt(
|
38274
|
+
if (j = Dt(de, oe), !j)
|
38271
38275
|
return !1;
|
38272
38276
|
le += j.length;
|
38273
38277
|
}
|
@@ -38275,149 +38279,149 @@ var mqtt = { exports: {} };
|
|
38275
38279
|
for (let z = 0; z < _n.length; z += 1) {
|
38276
38280
|
const ae = _n[z].topic, xe = _n[z].qos;
|
38277
38281
|
if (typeof ae != "string")
|
38278
|
-
return
|
38282
|
+
return de.destroy(new Error("Invalid subscriptions - invalid topic")), !1;
|
38279
38283
|
if (typeof xe != "number")
|
38280
|
-
return
|
38284
|
+
return de.destroy(new Error("Invalid subscriptions - invalid qos")), !1;
|
38281
38285
|
if (Ne === 5) {
|
38282
38286
|
if (typeof (_n[z].nl || !1) != "boolean")
|
38283
|
-
return
|
38287
|
+
return de.destroy(new Error("Invalid subscriptions - invalid No Local")), !1;
|
38284
38288
|
if (typeof (_n[z].rap || !1) != "boolean")
|
38285
|
-
return
|
38289
|
+
return de.destroy(new Error("Invalid subscriptions - invalid Retain as Published")), !1;
|
38286
38290
|
const Sn = _n[z].rh || 0;
|
38287
38291
|
if (typeof Sn != "number" || Sn > 2)
|
38288
|
-
return
|
38292
|
+
return de.destroy(new Error("Invalid subscriptions - invalid Retain Handling")), !1;
|
38289
38293
|
}
|
38290
38294
|
le += c.byteLength(ae) + 2 + 1;
|
38291
38295
|
}
|
38292
38296
|
else
|
38293
|
-
return
|
38294
|
-
v("subscribe: writing to stream: %o", u.SUBSCRIBE_HEADER),
|
38297
|
+
return de.destroy(new Error("Invalid subscriptions")), !1;
|
38298
|
+
v("subscribe: writing to stream: %o", u.SUBSCRIBE_HEADER), de.write(u.SUBSCRIBE_HEADER[1][Pt ? 1 : 0][0]), ze(de, le), S(de, jt), j !== null && j.write();
|
38295
38299
|
let V = !0;
|
38296
38300
|
for (const z of _n) {
|
38297
38301
|
const ae = z.topic, xe = z.qos, qe = +z.nl, bn = +z.rap, Sn = z.rh;
|
38298
38302
|
let xn;
|
38299
|
-
Fe(
|
38303
|
+
Fe(de, ae), xn = u.SUBSCRIBE_OPTIONS_QOS[xe], Ne === 5 && (xn |= qe ? u.SUBSCRIBE_OPTIONS_NL : 0, xn |= bn ? u.SUBSCRIBE_OPTIONS_RAP : 0, xn |= Sn ? u.SUBSCRIBE_OPTIONS_RH[Sn] : 0), V = de.write(c.from([xn]));
|
38300
38304
|
}
|
38301
38305
|
return V;
|
38302
38306
|
}
|
38303
|
-
function Y(Ce,
|
38304
|
-
const Ne = Ue ? Ue.protocolVersion : 4,
|
38307
|
+
function Y(Ce, de, Ue) {
|
38308
|
+
const Ne = Ue ? Ue.protocolVersion : 4, Ve = Ce || {}, Pt = Ve.messageId, jt = Ve.granted, _n = Ve.properties;
|
38305
38309
|
let oe = 0;
|
38306
38310
|
if (typeof Pt != "number")
|
38307
|
-
return
|
38311
|
+
return de.destroy(new Error("Invalid messageId")), !1;
|
38308
38312
|
if (oe += 2, typeof jt == "object" && jt.length)
|
38309
38313
|
for (let j = 0; j < jt.length; j += 1) {
|
38310
38314
|
if (typeof jt[j] != "number")
|
38311
|
-
return
|
38315
|
+
return de.destroy(new Error("Invalid qos vector")), !1;
|
38312
38316
|
oe += 1;
|
38313
38317
|
}
|
38314
38318
|
else
|
38315
|
-
return
|
38319
|
+
return de.destroy(new Error("Invalid qos vector")), !1;
|
38316
38320
|
let le = null;
|
38317
38321
|
if (Ne === 5) {
|
38318
|
-
if (le = de
|
38322
|
+
if (le = he(de, _n, Ue, oe), !le)
|
38319
38323
|
return !1;
|
38320
38324
|
oe += le.length;
|
38321
38325
|
}
|
38322
|
-
return
|
38326
|
+
return de.write(u.SUBACK_HEADER), ze(de, oe), S(de, Pt), le !== null && le.write(), de.write(c.from(jt));
|
38323
38327
|
}
|
38324
|
-
function D(Ce,
|
38325
|
-
const Ne = Ue ? Ue.protocolVersion : 4,
|
38328
|
+
function D(Ce, de, Ue) {
|
38329
|
+
const Ne = Ue ? Ue.protocolVersion : 4, Ve = Ce || {}, Pt = Ve.messageId, jt = Ve.dup ? u.DUP_MASK : 0, _n = Ve.unsubscriptions, oe = Ve.properties;
|
38326
38330
|
let le = 0;
|
38327
38331
|
if (typeof Pt != "number")
|
38328
|
-
return
|
38332
|
+
return de.destroy(new Error("Invalid messageId")), !1;
|
38329
38333
|
if (le += 2, typeof _n == "object" && _n.length)
|
38330
38334
|
for (let z = 0; z < _n.length; z += 1) {
|
38331
38335
|
if (typeof _n[z] != "string")
|
38332
|
-
return
|
38336
|
+
return de.destroy(new Error("Invalid unsubscriptions")), !1;
|
38333
38337
|
le += c.byteLength(_n[z]) + 2;
|
38334
38338
|
}
|
38335
38339
|
else
|
38336
|
-
return
|
38340
|
+
return de.destroy(new Error("Invalid unsubscriptions")), !1;
|
38337
38341
|
let j = null;
|
38338
38342
|
if (Ne === 5) {
|
38339
|
-
if (j = Dt(
|
38343
|
+
if (j = Dt(de, oe), !j)
|
38340
38344
|
return !1;
|
38341
38345
|
le += j.length;
|
38342
38346
|
}
|
38343
|
-
|
38347
|
+
de.write(u.UNSUBSCRIBE_HEADER[1][jt ? 1 : 0][0]), ze(de, le), S(de, Pt), j !== null && j.write();
|
38344
38348
|
let V = !0;
|
38345
38349
|
for (let z = 0; z < _n.length; z++)
|
38346
|
-
V = Fe(
|
38350
|
+
V = Fe(de, _n[z]);
|
38347
38351
|
return V;
|
38348
38352
|
}
|
38349
|
-
function re(Ce,
|
38350
|
-
const Ne = Ue ? Ue.protocolVersion : 4,
|
38353
|
+
function re(Ce, de, Ue) {
|
38354
|
+
const Ne = Ue ? Ue.protocolVersion : 4, Ve = Ce || {}, Pt = Ve.messageId, jt = Ve.dup ? u.DUP_MASK : 0, _n = Ve.granted, oe = Ve.properties, le = Ve.cmd, j = 0;
|
38351
38355
|
let V = 2;
|
38352
38356
|
if (typeof Pt != "number")
|
38353
|
-
return
|
38357
|
+
return de.destroy(new Error("Invalid messageId")), !1;
|
38354
38358
|
if (Ne === 5)
|
38355
38359
|
if (typeof _n == "object" && _n.length)
|
38356
38360
|
for (let ae = 0; ae < _n.length; ae += 1) {
|
38357
38361
|
if (typeof _n[ae] != "number")
|
38358
|
-
return
|
38362
|
+
return de.destroy(new Error("Invalid qos vector")), !1;
|
38359
38363
|
V += 1;
|
38360
38364
|
}
|
38361
38365
|
else
|
38362
|
-
return
|
38366
|
+
return de.destroy(new Error("Invalid qos vector")), !1;
|
38363
38367
|
let z = null;
|
38364
38368
|
if (Ne === 5) {
|
38365
|
-
if (z = de
|
38369
|
+
if (z = he(de, oe, Ue, V), !z)
|
38366
38370
|
return !1;
|
38367
38371
|
V += z.length;
|
38368
38372
|
}
|
38369
|
-
return
|
38373
|
+
return de.write(u.ACKS[le][j][jt][0]), ze(de, V), S(de, Pt), z !== null && z.write(), Ne === 5 && de.write(c.from(_n)), !0;
|
38370
38374
|
}
|
38371
|
-
function F(Ce,
|
38372
|
-
return
|
38375
|
+
function F(Ce, de, Ue) {
|
38376
|
+
return de.write(u.EMPTY[Ce.cmd]);
|
38373
38377
|
}
|
38374
|
-
function _e(Ce,
|
38375
|
-
const Ne = Ue ? Ue.protocolVersion : 4,
|
38378
|
+
function _e(Ce, de, Ue) {
|
38379
|
+
const Ne = Ue ? Ue.protocolVersion : 4, Ve = Ce || {}, Pt = Ve.reasonCode, jt = Ve.properties;
|
38376
38380
|
let _n = Ne === 5 ? 1 : 0, oe = null;
|
38377
38381
|
if (Ne === 5) {
|
38378
|
-
if (oe = de
|
38382
|
+
if (oe = he(de, jt, Ue, _n), !oe)
|
38379
38383
|
return !1;
|
38380
38384
|
_n += oe.length;
|
38381
38385
|
}
|
38382
|
-
return
|
38386
|
+
return de.write(c.from([u.codes.disconnect << 4])), ze(de, _n), Ne === 5 && de.write(c.from([Pt])), oe !== null && oe.write(), !0;
|
38383
38387
|
}
|
38384
|
-
function ue(Ce,
|
38385
|
-
const Ne = Ue ? Ue.protocolVersion : 4,
|
38388
|
+
function ue(Ce, de, Ue) {
|
38389
|
+
const Ne = Ue ? Ue.protocolVersion : 4, Ve = Ce || {}, Pt = Ve.reasonCode, jt = Ve.properties;
|
38386
38390
|
let _n = Ne === 5 ? 1 : 0;
|
38387
|
-
Ne !== 5 &&
|
38388
|
-
const oe = de
|
38389
|
-
return oe ? (_n += oe.length,
|
38391
|
+
Ne !== 5 && de.destroy(new Error("Invalid mqtt version for auth packet"));
|
38392
|
+
const oe = he(de, jt, Ue, _n);
|
38393
|
+
return oe ? (_n += oe.length, de.write(c.from([u.codes.auth << 4])), ze(de, _n), de.write(c.from([Pt])), oe !== null && oe.write(), !0) : !1;
|
38390
38394
|
}
|
38391
38395
|
const Ie = {};
|
38392
|
-
function ze(Ce,
|
38393
|
-
if (
|
38394
|
-
return Ce.destroy(new Error(`Invalid variable byte integer: ${
|
38395
|
-
let Ue = Ie[
|
38396
|
-
return Ue || (Ue = A(
|
38396
|
+
function ze(Ce, de) {
|
38397
|
+
if (de > u.VARBYTEINT_MAX)
|
38398
|
+
return Ce.destroy(new Error(`Invalid variable byte integer: ${de}`)), !1;
|
38399
|
+
let Ue = Ie[de];
|
38400
|
+
return Ue || (Ue = A(de), de < 16384 && (Ie[de] = Ue)), v("writeVarByteInt: writing to stream: %o", Ue), Ce.write(Ue);
|
38397
38401
|
}
|
38398
|
-
function Fe(Ce,
|
38399
|
-
const Ue = c.byteLength(
|
38400
|
-
return S(Ce, Ue), v("writeString: %s",
|
38402
|
+
function Fe(Ce, de) {
|
38403
|
+
const Ue = c.byteLength(de);
|
38404
|
+
return S(Ce, Ue), v("writeString: %s", de), Ce.write(de, "utf8");
|
38401
38405
|
}
|
38402
|
-
function
|
38403
|
-
Fe(Ce,
|
38406
|
+
function Oe(Ce, de, Ue) {
|
38407
|
+
Fe(Ce, de), Fe(Ce, Ue);
|
38404
38408
|
}
|
38405
|
-
function Lt(Ce,
|
38406
|
-
return v("writeNumberCached: number: %d",
|
38409
|
+
function Lt(Ce, de) {
|
38410
|
+
return v("writeNumberCached: number: %d", de), v("writeNumberCached: %o", g[de]), Ce.write(g[de]);
|
38407
38411
|
}
|
38408
|
-
function pe(Ce,
|
38409
|
-
const Ue = y(
|
38412
|
+
function pe(Ce, de) {
|
38413
|
+
const Ue = y(de);
|
38410
38414
|
return v("writeNumberGenerated: %o", Ue), Ce.write(Ue);
|
38411
38415
|
}
|
38412
|
-
function Cn(Ce,
|
38413
|
-
const Ue = w(
|
38416
|
+
function Cn(Ce, de) {
|
38417
|
+
const Ue = w(de);
|
38414
38418
|
return v("write4ByteNumber: %o", Ue), Ce.write(Ue);
|
38415
38419
|
}
|
38416
|
-
function In(Ce,
|
38417
|
-
typeof
|
38420
|
+
function In(Ce, de) {
|
38421
|
+
typeof de == "string" ? Fe(Ce, de) : de ? (S(Ce, de.length), Ce.write(de)) : S(Ce, 0);
|
38418
38422
|
}
|
38419
|
-
function Dt(Ce,
|
38420
|
-
if (typeof
|
38423
|
+
function Dt(Ce, de) {
|
38424
|
+
if (typeof de != "object" || de.length != null)
|
38421
38425
|
return {
|
38422
38426
|
length: 1,
|
38423
38427
|
write() {
|
@@ -38485,10 +38489,10 @@ var mqtt = { exports: {} };
|
|
38485
38489
|
}
|
38486
38490
|
return oe;
|
38487
38491
|
}
|
38488
|
-
if (
|
38489
|
-
for (const Pt in
|
38492
|
+
if (de)
|
38493
|
+
for (const Pt in de) {
|
38490
38494
|
let jt = 0, _n = 0;
|
38491
|
-
const oe =
|
38495
|
+
const oe = de[Pt];
|
38492
38496
|
if (Array.isArray(oe))
|
38493
38497
|
for (let le = 0; le < oe.length; le++) {
|
38494
38498
|
if (_n = Ne(Pt, oe[le]), !_n)
|
@@ -38507,76 +38511,76 @@ var mqtt = { exports: {} };
|
|
38507
38511
|
return {
|
38508
38512
|
length: c.byteLength(A(Ue)) + Ue,
|
38509
38513
|
write() {
|
38510
|
-
hn(Ce,
|
38514
|
+
hn(Ce, de, Ue);
|
38511
38515
|
}
|
38512
38516
|
};
|
38513
38517
|
}
|
38514
|
-
function
|
38515
|
-
const
|
38516
|
-
let jt = Dt(Ce,
|
38518
|
+
function he(Ce, de, Ue, Ne) {
|
38519
|
+
const Ve = ["reasonString", "userProperties"], Pt = Ue && Ue.properties && Ue.properties.maximumPacketSize ? Ue.properties.maximumPacketSize : 0;
|
38520
|
+
let jt = Dt(Ce, de);
|
38517
38521
|
if (Pt)
|
38518
38522
|
for (; Ne + jt.length > Pt; ) {
|
38519
|
-
const _n =
|
38520
|
-
if (_n &&
|
38521
|
-
delete
|
38523
|
+
const _n = Ve.shift();
|
38524
|
+
if (_n && de[_n])
|
38525
|
+
delete de[_n], jt = Dt(Ce, de);
|
38522
38526
|
else
|
38523
38527
|
return !1;
|
38524
38528
|
}
|
38525
38529
|
return jt;
|
38526
38530
|
}
|
38527
|
-
function Et(Ce,
|
38528
|
-
switch (u.propertiesTypes[
|
38531
|
+
function Et(Ce, de, Ue) {
|
38532
|
+
switch (u.propertiesTypes[de]) {
|
38529
38533
|
case "byte": {
|
38530
|
-
Ce.write(c.from([u.properties[
|
38534
|
+
Ce.write(c.from([u.properties[de]])), Ce.write(c.from([+Ue]));
|
38531
38535
|
break;
|
38532
38536
|
}
|
38533
38537
|
case "int8": {
|
38534
|
-
Ce.write(c.from([u.properties[
|
38538
|
+
Ce.write(c.from([u.properties[de]])), Ce.write(c.from([Ue]));
|
38535
38539
|
break;
|
38536
38540
|
}
|
38537
38541
|
case "binary": {
|
38538
|
-
Ce.write(c.from([u.properties[
|
38542
|
+
Ce.write(c.from([u.properties[de]])), In(Ce, Ue);
|
38539
38543
|
break;
|
38540
38544
|
}
|
38541
38545
|
case "int16": {
|
38542
|
-
Ce.write(c.from([u.properties[
|
38546
|
+
Ce.write(c.from([u.properties[de]])), S(Ce, Ue);
|
38543
38547
|
break;
|
38544
38548
|
}
|
38545
38549
|
case "int32": {
|
38546
|
-
Ce.write(c.from([u.properties[
|
38550
|
+
Ce.write(c.from([u.properties[de]])), Cn(Ce, Ue);
|
38547
38551
|
break;
|
38548
38552
|
}
|
38549
38553
|
case "var": {
|
38550
|
-
Ce.write(c.from([u.properties[
|
38554
|
+
Ce.write(c.from([u.properties[de]])), ze(Ce, Ue);
|
38551
38555
|
break;
|
38552
38556
|
}
|
38553
38557
|
case "string": {
|
38554
|
-
Ce.write(c.from([u.properties[
|
38558
|
+
Ce.write(c.from([u.properties[de]])), Fe(Ce, Ue);
|
38555
38559
|
break;
|
38556
38560
|
}
|
38557
38561
|
case "pair": {
|
38558
|
-
Object.getOwnPropertyNames(Ue).forEach((
|
38559
|
-
const Pt = Ue[
|
38562
|
+
Object.getOwnPropertyNames(Ue).forEach((Ve) => {
|
38563
|
+
const Pt = Ue[Ve];
|
38560
38564
|
Array.isArray(Pt) ? Pt.forEach((jt) => {
|
38561
|
-
Ce.write(c.from([u.properties[
|
38562
|
-
}) : (Ce.write(c.from([u.properties[
|
38565
|
+
Ce.write(c.from([u.properties[de]])), Oe(Ce, Ve.toString(), jt.toString());
|
38566
|
+
}) : (Ce.write(c.from([u.properties[de]])), Oe(Ce, Ve.toString(), Pt.toString()));
|
38563
38567
|
});
|
38564
38568
|
break;
|
38565
38569
|
}
|
38566
38570
|
default:
|
38567
|
-
return Ce.destroy(new Error(`Invalid property ${
|
38571
|
+
return Ce.destroy(new Error(`Invalid property ${de} value: ${Ue}`)), !1;
|
38568
38572
|
}
|
38569
38573
|
}
|
38570
|
-
function hn(Ce,
|
38574
|
+
function hn(Ce, de, Ue) {
|
38571
38575
|
ze(Ce, Ue);
|
38572
|
-
for (const Ne in
|
38573
|
-
if (Object.prototype.hasOwnProperty.call(
|
38574
|
-
const
|
38575
|
-
if (Array.isArray(
|
38576
|
-
for (let Pt = 0; Pt <
|
38577
|
-
Et(Ce, Ne,
|
38576
|
+
for (const Ne in de)
|
38577
|
+
if (Object.prototype.hasOwnProperty.call(de, Ne) && de[Ne] !== null) {
|
38578
|
+
const Ve = de[Ne];
|
38579
|
+
if (Array.isArray(Ve))
|
38580
|
+
for (let Pt = 0; Pt < Ve.length; Pt++)
|
38581
|
+
Et(Ce, Ne, Ve[Pt]);
|
38578
38582
|
else
|
38579
|
-
Et(Ce, Ne,
|
38583
|
+
Et(Ce, Ne, Ve);
|
38580
38584
|
}
|
38581
38585
|
}
|
38582
38586
|
function vn(Ce) {
|
@@ -38903,78 +38907,78 @@ var mqtt = { exports: {} };
|
|
38903
38907
|
function re(Dt) {
|
38904
38908
|
throw new RangeError(k[Dt]);
|
38905
38909
|
}
|
38906
|
-
function F(Dt,
|
38910
|
+
function F(Dt, he) {
|
38907
38911
|
for (var Et = Dt.length, hn = []; Et--; )
|
38908
|
-
hn[Et] =
|
38912
|
+
hn[Et] = he(Dt[Et]);
|
38909
38913
|
return hn;
|
38910
38914
|
}
|
38911
|
-
function _e(Dt,
|
38915
|
+
function _e(Dt, he) {
|
38912
38916
|
var Et = Dt.split("@"), hn = "";
|
38913
38917
|
Et.length > 1 && (hn = Et[0] + "@", Dt = Et[1]), Dt = Dt.replace(M, ".");
|
38914
|
-
var vn = Dt.split("."), kt = F(vn,
|
38918
|
+
var vn = Dt.split("."), kt = F(vn, he).join(".");
|
38915
38919
|
return hn + kt;
|
38916
38920
|
}
|
38917
38921
|
function ue(Dt) {
|
38918
|
-
for (var
|
38919
|
-
vn = Dt.charCodeAt(Et++), vn >= 55296 && vn <= 56319 && Et < hn ? (kt = Dt.charCodeAt(Et++), (kt & 64512) == 56320 ?
|
38920
|
-
return
|
38922
|
+
for (var he = [], Et = 0, hn = Dt.length, vn, kt; Et < hn; )
|
38923
|
+
vn = Dt.charCodeAt(Et++), vn >= 55296 && vn <= 56319 && Et < hn ? (kt = Dt.charCodeAt(Et++), (kt & 64512) == 56320 ? he.push(((vn & 1023) << 10) + (kt & 1023) + 65536) : (he.push(vn), Et--)) : he.push(vn);
|
38924
|
+
return he;
|
38921
38925
|
}
|
38922
38926
|
function Ie(Dt) {
|
38923
|
-
return F(Dt, function(
|
38927
|
+
return F(Dt, function(he) {
|
38924
38928
|
var Et = "";
|
38925
|
-
return
|
38929
|
+
return he > 65535 && (he -= 65536, Et += Y(he >>> 10 & 1023 | 55296), he = 56320 | he & 1023), Et += Y(he), Et;
|
38926
38930
|
}).join("");
|
38927
38931
|
}
|
38928
38932
|
function ze(Dt) {
|
38929
38933
|
return Dt - 48 < 10 ? Dt - 22 : Dt - 65 < 26 ? Dt - 65 : Dt - 97 < 26 ? Dt - 97 : g;
|
38930
38934
|
}
|
38931
|
-
function Fe(Dt,
|
38932
|
-
return Dt + 22 + 75 * (Dt < 26) - ((
|
38935
|
+
function Fe(Dt, he) {
|
38936
|
+
return Dt + 22 + 75 * (Dt < 26) - ((he != 0) << 5);
|
38933
38937
|
}
|
38934
|
-
function
|
38938
|
+
function Oe(Dt, he, Et) {
|
38935
38939
|
var hn = 0;
|
38936
|
-
for (Dt = Et ? $(Dt / w) : Dt >> 1, Dt += $(Dt /
|
38940
|
+
for (Dt = Et ? $(Dt / w) : Dt >> 1, Dt += $(Dt / he); Dt > ie * b >> 1; hn += g)
|
38937
38941
|
Dt = $(Dt / ie);
|
38938
38942
|
return $(hn + (ie + 1) * Dt / (Dt + A));
|
38939
38943
|
}
|
38940
38944
|
function Lt(Dt) {
|
38941
|
-
var
|
38942
|
-
for (
|
38943
|
-
Dt.charCodeAt(Ue) >= 128 && re("not-basic"),
|
38944
|
-
for (Ne =
|
38945
|
-
for (
|
38945
|
+
var he = [], Et = Dt.length, hn, vn = 0, kt = T, Ce = S, de, Ue, Ne, Ve, Pt, jt, _n, oe, le;
|
38946
|
+
for (de = Dt.lastIndexOf(x), de < 0 && (de = 0), Ue = 0; Ue < de; ++Ue)
|
38947
|
+
Dt.charCodeAt(Ue) >= 128 && re("not-basic"), he.push(Dt.charCodeAt(Ue));
|
38948
|
+
for (Ne = de > 0 ? de + 1 : 0; Ne < Et; ) {
|
38949
|
+
for (Ve = vn, Pt = 1, jt = g; Ne >= Et && re("invalid-input"), _n = ze(Dt.charCodeAt(Ne++)), (_n >= g || _n > $((v - vn) / Pt)) && re("overflow"), vn += _n * Pt, oe = jt <= Ce ? y : jt >= Ce + b ? b : jt - Ce, !(_n < oe); jt += g)
|
38946
38950
|
le = g - oe, Pt > $(v / le) && re("overflow"), Pt *= le;
|
38947
|
-
hn =
|
38951
|
+
hn = he.length + 1, Ce = Oe(vn - Ve, hn, Ve == 0), $(vn / hn) > v - kt && re("overflow"), kt += $(vn / hn), vn %= hn, he.splice(vn++, 0, kt);
|
38948
38952
|
}
|
38949
|
-
return Ie(
|
38953
|
+
return Ie(he);
|
38950
38954
|
}
|
38951
38955
|
function pe(Dt) {
|
38952
|
-
var
|
38953
|
-
for (Dt = ue(Dt), _n = Dt.length,
|
38956
|
+
var he, Et, hn, vn, kt, Ce, de, Ue, Ne, Ve, Pt, jt = [], _n, oe, le, j;
|
38957
|
+
for (Dt = ue(Dt), _n = Dt.length, he = T, Et = 0, kt = S, Ce = 0; Ce < _n; ++Ce)
|
38954
38958
|
Pt = Dt[Ce], Pt < 128 && jt.push(Y(Pt));
|
38955
38959
|
for (hn = vn = jt.length, vn && jt.push(x); hn < _n; ) {
|
38956
|
-
for (
|
38957
|
-
Pt = Dt[Ce], Pt >=
|
38958
|
-
for (oe = hn + 1,
|
38959
|
-
if (Pt = Dt[Ce], Pt <
|
38960
|
-
for (Ue = Et, Ne = g;
|
38961
|
-
j = Ue -
|
38962
|
-
Y(Fe(
|
38960
|
+
for (de = v, Ce = 0; Ce < _n; ++Ce)
|
38961
|
+
Pt = Dt[Ce], Pt >= he && Pt < de && (de = Pt);
|
38962
|
+
for (oe = hn + 1, de - he > $((v - Et) / oe) && re("overflow"), Et += (de - he) * oe, he = de, Ce = 0; Ce < _n; ++Ce)
|
38963
|
+
if (Pt = Dt[Ce], Pt < he && ++Et > v && re("overflow"), Pt == he) {
|
38964
|
+
for (Ue = Et, Ne = g; Ve = Ne <= kt ? y : Ne >= kt + b ? b : Ne - kt, !(Ue < Ve); Ne += g)
|
38965
|
+
j = Ue - Ve, le = g - Ve, jt.push(
|
38966
|
+
Y(Fe(Ve + j % le, 0))
|
38963
38967
|
), Ue = $(j / le);
|
38964
|
-
jt.push(Y(Fe(Ue, 0))), kt =
|
38968
|
+
jt.push(Y(Fe(Ue, 0))), kt = Oe(Et, oe, hn == vn), Et = 0, ++hn;
|
38965
38969
|
}
|
38966
|
-
++Et, ++
|
38970
|
+
++Et, ++he;
|
38967
38971
|
}
|
38968
38972
|
return jt.join("");
|
38969
38973
|
}
|
38970
38974
|
function Cn(Dt) {
|
38971
|
-
return _e(Dt, function(
|
38972
|
-
return L.test(
|
38975
|
+
return _e(Dt, function(he) {
|
38976
|
+
return L.test(he) ? Lt(he.slice(4).toLowerCase()) : he;
|
38973
38977
|
});
|
38974
38978
|
}
|
38975
38979
|
function In(Dt) {
|
38976
|
-
return _e(Dt, function(
|
38977
|
-
return O.test(
|
38980
|
+
return _e(Dt, function(he) {
|
38981
|
+
return O.test(he) ? "xn--" + pe(he) : he;
|
38978
38982
|
});
|
38979
38983
|
}
|
38980
38984
|
if (_ = {
|
@@ -39248,8 +39252,8 @@ var mqtt = { exports: {} };
|
|
39248
39252
|
readable: ue
|
39249
39253
|
}), _e) {
|
39250
39254
|
if (f(re))
|
39251
|
-
Y._write = function(ze, Fe,
|
39252
|
-
re.write(ze, Fe) ?
|
39255
|
+
Y._write = function(ze, Fe, Oe) {
|
39256
|
+
re.write(ze, Fe) ? Oe() : M = Oe;
|
39253
39257
|
}, Y._final = function(ze) {
|
39254
39258
|
re.end(), k = ze;
|
39255
39259
|
}, re.on("drain", function() {
|
@@ -39260,19 +39264,19 @@ var mqtt = { exports: {} };
|
|
39260
39264
|
});
|
39261
39265
|
else if (v(re)) {
|
39262
39266
|
const Fe = (g(re) ? re.writable : re).getWriter();
|
39263
|
-
Y._write = async function(
|
39267
|
+
Y._write = async function(Oe, Lt, pe) {
|
39264
39268
|
try {
|
39265
|
-
await Fe.ready, Fe.write(
|
39269
|
+
await Fe.ready, Fe.write(Oe).catch(() => {
|
39266
39270
|
}), pe();
|
39267
39271
|
} catch (Cn) {
|
39268
39272
|
pe(Cn);
|
39269
39273
|
}
|
39270
|
-
}, Y._final = async function(
|
39274
|
+
}, Y._final = async function(Oe) {
|
39271
39275
|
try {
|
39272
39276
|
await Fe.ready, Fe.close().catch(() => {
|
39273
|
-
}), k =
|
39277
|
+
}), k = Oe;
|
39274
39278
|
} catch (Lt) {
|
39275
|
-
|
39279
|
+
Oe(Lt);
|
39276
39280
|
}
|
39277
39281
|
};
|
39278
39282
|
}
|
@@ -39309,10 +39313,10 @@ var mqtt = { exports: {} };
|
|
39309
39313
|
Y._read = async function() {
|
39310
39314
|
for (; ; )
|
39311
39315
|
try {
|
39312
|
-
const { value: Fe, done:
|
39316
|
+
const { value: Fe, done: Oe } = await ze.read();
|
39313
39317
|
if (!Y.push(Fe))
|
39314
39318
|
return;
|
39315
|
-
if (
|
39319
|
+
if (Oe) {
|
39316
39320
|
Y.push(null);
|
39317
39321
|
return;
|
39318
39322
|
}
|
@@ -39336,14 +39340,14 @@ var mqtt = { exports: {} };
|
|
39336
39340
|
ue && (ue.stack, Ie && !Ie.errored && (Ie.errored = ue), ze && !ze.errored && (ze.errored = ue));
|
39337
39341
|
}
|
39338
39342
|
function S(ue, Ie) {
|
39339
|
-
const ze = this._readableState, Fe = this._writableState,
|
39340
|
-
return Fe != null && Fe.destroyed || ze != null && ze.destroyed ? (typeof Ie == "function" && Ie(), this) : (w(ue, Fe, ze), Fe && (Fe.destroyed = !0), ze && (ze.destroyed = !0),
|
39343
|
+
const ze = this._readableState, Fe = this._writableState, Oe = Fe || ze;
|
39344
|
+
return Fe != null && Fe.destroyed || ze != null && ze.destroyed ? (typeof Ie == "function" && Ie(), this) : (w(ue, Fe, ze), Fe && (Fe.destroyed = !0), ze && (ze.destroyed = !0), Oe.constructed ? T(this, ue, Ie) : this.once(b, function(Lt) {
|
39341
39345
|
T(this, c(Lt, ue), Ie);
|
39342
39346
|
}), this);
|
39343
39347
|
}
|
39344
39348
|
function T(ue, Ie, ze) {
|
39345
39349
|
let Fe = !1;
|
39346
|
-
function
|
39350
|
+
function Oe(Lt) {
|
39347
39351
|
if (Fe)
|
39348
39352
|
return;
|
39349
39353
|
Fe = !0;
|
@@ -39351,9 +39355,9 @@ var mqtt = { exports: {} };
|
|
39351
39355
|
w(Lt, Cn, pe), Cn && (Cn.closed = !0), pe && (pe.closed = !0), typeof ze == "function" && ze(Lt), Lt ? u.nextTick(x, ue, Lt) : u.nextTick(L, ue);
|
39352
39356
|
}
|
39353
39357
|
try {
|
39354
|
-
ue._destroy(Ie || null,
|
39358
|
+
ue._destroy(Ie || null, Oe);
|
39355
39359
|
} catch (Lt) {
|
39356
|
-
|
39360
|
+
Oe(Lt);
|
39357
39361
|
}
|
39358
39362
|
}
|
39359
39363
|
function x(ue, Ie) {
|
@@ -39372,10 +39376,10 @@ var mqtt = { exports: {} };
|
|
39372
39376
|
ue && (ue.constructed = !0, ue.closed = !1, ue.closeEmitted = !1, ue.destroyed = !1, ue.errored = null, ue.errorEmitted = !1, ue.reading = !1, ue.ended = ue.readable === !1, ue.endEmitted = ue.readable === !1), Ie && (Ie.constructed = !0, Ie.destroyed = !1, Ie.closed = !1, Ie.closeEmitted = !1, Ie.errored = null, Ie.errorEmitted = !1, Ie.finalCalled = !1, Ie.prefinished = !1, Ie.ended = Ie.writable === !1, Ie.ending = Ie.writable === !1, Ie.finished = Ie.writable === !1);
|
39373
39377
|
}
|
39374
39378
|
function k(ue, Ie, ze) {
|
39375
|
-
const Fe = ue._readableState,
|
39376
|
-
if (
|
39379
|
+
const Fe = ue._readableState, Oe = ue._writableState;
|
39380
|
+
if (Oe != null && Oe.destroyed || Fe != null && Fe.destroyed)
|
39377
39381
|
return this;
|
39378
|
-
Fe != null && Fe.autoDestroy ||
|
39382
|
+
Fe != null && Fe.autoDestroy || Oe != null && Oe.autoDestroy ? ue.destroy(Ie) : Ie && (Ie.stack, Oe && !Oe.errored && (Oe.errored = Ie), Fe && !Fe.errored && (Fe.errored = Ie), ze ? u.nextTick(O, ue, Ie) : O(ue, Ie));
|
39379
39383
|
}
|
39380
39384
|
function ie(ue, Ie) {
|
39381
39385
|
if (typeof ue._construct != "function")
|
@@ -39391,8 +39395,8 @@ var mqtt = { exports: {} };
|
|
39391
39395
|
return;
|
39392
39396
|
}
|
39393
39397
|
Ie = !0;
|
39394
|
-
const
|
39395
|
-
|
39398
|
+
const Oe = ue._readableState, Lt = ue._writableState, pe = Lt || Oe;
|
39399
|
+
Oe && (Oe.constructed = !0), Lt && (Lt.constructed = !0), pe.destroyed ? ue.emit(b, Fe) : Fe ? k(ue, Fe, !0) : u.nextTick(Y, ue);
|
39396
39400
|
}
|
39397
39401
|
try {
|
39398
39402
|
ue._construct((Fe) => {
|
@@ -39545,12 +39549,12 @@ var mqtt = { exports: {} };
|
|
39545
39549
|
readable: !1
|
39546
39550
|
});
|
39547
39551
|
if (typeof ue == "function") {
|
39548
|
-
const { value: Fe, write:
|
39552
|
+
const { value: Fe, write: Oe, final: Lt, destroy: pe } = re(ue);
|
39549
39553
|
if (p(Fe))
|
39550
39554
|
return M(D, Fe, {
|
39551
39555
|
// TODO (ronag): highWaterMark?
|
39552
39556
|
objectMode: !0,
|
39553
|
-
write:
|
39557
|
+
write: Oe,
|
39554
39558
|
final: Lt,
|
39555
39559
|
destroy: pe
|
39556
39560
|
});
|
@@ -39560,25 +39564,25 @@ var mqtt = { exports: {} };
|
|
39560
39564
|
const Dt = Y(
|
39561
39565
|
Cn,
|
39562
39566
|
Fe,
|
39563
|
-
(
|
39564
|
-
if (
|
39565
|
-
throw new S("nully", "body",
|
39567
|
+
(he) => {
|
39568
|
+
if (he != null)
|
39569
|
+
throw new S("nully", "body", he);
|
39566
39570
|
},
|
39567
|
-
(
|
39568
|
-
T(In,
|
39571
|
+
(he) => {
|
39572
|
+
T(In, he);
|
39569
39573
|
}
|
39570
39574
|
);
|
39571
39575
|
return In = new D({
|
39572
39576
|
// TODO (ronag): highWaterMark?
|
39573
39577
|
objectMode: !0,
|
39574
39578
|
readable: !1,
|
39575
|
-
write:
|
39576
|
-
final(
|
39579
|
+
write: Oe,
|
39580
|
+
final(he) {
|
39577
39581
|
Lt(async () => {
|
39578
39582
|
try {
|
39579
|
-
await Dt, u.nextTick(
|
39583
|
+
await Dt, u.nextTick(he, null);
|
39580
39584
|
} catch (Et) {
|
39581
|
-
u.nextTick(
|
39585
|
+
u.nextTick(he, Et);
|
39582
39586
|
}
|
39583
39587
|
});
|
39584
39588
|
},
|
@@ -39596,10 +39600,10 @@ var mqtt = { exports: {} };
|
|
39596
39600
|
writable: !1
|
39597
39601
|
});
|
39598
39602
|
if (typeof (ue == null ? void 0 : ue.writable) == "object" || typeof (ue == null ? void 0 : ue.readable) == "object") {
|
39599
|
-
const Fe = ue != null && ue.readable ? v(ue == null ? void 0 : ue.readable) ? ue == null ? void 0 : ue.readable : _e(ue.readable) : void 0,
|
39603
|
+
const Fe = ue != null && ue.readable ? v(ue == null ? void 0 : ue.readable) ? ue == null ? void 0 : ue.readable : _e(ue.readable) : void 0, Oe = ue != null && ue.writable ? g(ue == null ? void 0 : ue.writable) ? ue == null ? void 0 : ue.writable : _e(ue.writable) : void 0;
|
39600
39604
|
return F({
|
39601
39605
|
readable: Fe,
|
39602
|
-
writable:
|
39606
|
+
writable: Oe
|
39603
39607
|
});
|
39604
39608
|
}
|
39605
39609
|
const ze = ue == null ? void 0 : ue.then;
|
@@ -39608,11 +39612,11 @@ var mqtt = { exports: {} };
|
|
39608
39612
|
return Y(
|
39609
39613
|
ze,
|
39610
39614
|
ue,
|
39611
|
-
(
|
39612
|
-
|
39615
|
+
(Oe) => {
|
39616
|
+
Oe != null && Fe.push(Oe), Fe.push(null);
|
39613
39617
|
},
|
39614
|
-
(
|
39615
|
-
T(Fe,
|
39618
|
+
(Oe) => {
|
39619
|
+
T(Fe, Oe);
|
39616
39620
|
}
|
39617
39621
|
), Fe = new D({
|
39618
39622
|
objectMode: !0,
|
@@ -39682,10 +39686,10 @@ var mqtt = { exports: {} };
|
|
39682
39686
|
}
|
39683
39687
|
function F(_e) {
|
39684
39688
|
const ue = _e.readable && typeof _e.readable.read != "function" ? L.wrap(_e.readable) : _e.readable, Ie = _e.writable;
|
39685
|
-
let ze = !!d(ue), Fe = !!f(Ie),
|
39686
|
-
function Dt(
|
39689
|
+
let ze = !!d(ue), Fe = !!f(Ie), Oe, Lt, pe, Cn, In;
|
39690
|
+
function Dt(he) {
|
39687
39691
|
const Et = Cn;
|
39688
|
-
Cn = null, Et ? Et(
|
39692
|
+
Cn = null, Et ? Et(he) : he && In.destroy(he);
|
39689
39693
|
}
|
39690
39694
|
return In = new D({
|
39691
39695
|
// TODO (ronag): highWaterMark?
|
@@ -39693,43 +39697,43 @@ var mqtt = { exports: {} };
|
|
39693
39697
|
writableObjectMode: !!(Ie != null && Ie.writableObjectMode),
|
39694
39698
|
readable: ze,
|
39695
39699
|
writable: Fe
|
39696
|
-
}), Fe && (b(Ie, (
|
39697
|
-
Fe = !1,
|
39698
|
-
}), In._write = function(
|
39699
|
-
Ie.write(
|
39700
|
-
}, In._final = function(
|
39701
|
-
Ie.end(), Lt =
|
39700
|
+
}), Fe && (b(Ie, (he) => {
|
39701
|
+
Fe = !1, he && T(ue, he), Dt(he);
|
39702
|
+
}), In._write = function(he, Et, hn) {
|
39703
|
+
Ie.write(he, Et) ? hn() : Oe = hn;
|
39704
|
+
}, In._final = function(he) {
|
39705
|
+
Ie.end(), Lt = he;
|
39702
39706
|
}, Ie.on("drain", function() {
|
39703
|
-
if (
|
39704
|
-
const
|
39705
|
-
|
39707
|
+
if (Oe) {
|
39708
|
+
const he = Oe;
|
39709
|
+
Oe = null, he();
|
39706
39710
|
}
|
39707
39711
|
}), Ie.on("finish", function() {
|
39708
39712
|
if (Lt) {
|
39709
|
-
const
|
39710
|
-
Lt = null,
|
39713
|
+
const he = Lt;
|
39714
|
+
Lt = null, he();
|
39711
39715
|
}
|
39712
|
-
})), ze && (b(ue, (
|
39713
|
-
ze = !1,
|
39716
|
+
})), ze && (b(ue, (he) => {
|
39717
|
+
ze = !1, he && T(ue, he), Dt(he);
|
39714
39718
|
}), ue.on("readable", function() {
|
39715
39719
|
if (pe) {
|
39716
|
-
const
|
39717
|
-
pe = null,
|
39720
|
+
const he = pe;
|
39721
|
+
pe = null, he();
|
39718
39722
|
}
|
39719
39723
|
}), ue.on("end", function() {
|
39720
39724
|
In.push(null);
|
39721
39725
|
}), In._read = function() {
|
39722
39726
|
for (; ; ) {
|
39723
|
-
const
|
39724
|
-
if (
|
39727
|
+
const he = ue.read();
|
39728
|
+
if (he === null) {
|
39725
39729
|
pe = In._read;
|
39726
39730
|
return;
|
39727
39731
|
}
|
39728
|
-
if (!In.push(
|
39732
|
+
if (!In.push(he))
|
39729
39733
|
return;
|
39730
39734
|
}
|
39731
|
-
}), In._destroy = function(
|
39732
|
-
!
|
39735
|
+
}), In._destroy = function(he, Et) {
|
39736
|
+
!he && Cn !== null && (he = new A()), pe = null, Oe = null, Lt = null, Cn === null ? Et(he) : (Cn = Et, T(Ie, he), T(ue, he));
|
39733
39737
|
}, In;
|
39734
39738
|
}
|
39735
39739
|
}, { "../../ours/errors": 126, "../../ours/primordials": 127, "../../ours/util": 128, "./destroy": 110, "./duplex": 111, "./end-of-stream": 113, "./from": 114, "./readable": 119, "./utils": 122, "abort-controller": 24, buffer: 29, "process/": 102 }], 113: [function(n, o, a) {
|
@@ -39755,21 +39759,21 @@ var mqtt = { exports: {} };
|
|
39755
39759
|
const ze = () => {
|
39756
39760
|
};
|
39757
39761
|
function Fe(pe, Cn, In) {
|
39758
|
-
var Dt,
|
39762
|
+
var Dt, he;
|
39759
39763
|
if (arguments.length === 2 ? (In = Cn, Cn = _) : Cn == null ? Cn = _ : b(Cn, "options"), y(In, "callback"), g(Cn.signal, "options.signal"), In = v(In), O(pe) || Y(pe))
|
39760
|
-
return
|
39764
|
+
return Oe(pe, Cn, In);
|
39761
39765
|
if (!F(pe))
|
39762
39766
|
throw new f("stream", ["ReadableStream", "WritableStream", "Stream"], pe);
|
39763
|
-
const Et = (Dt = Cn.readable) !== null && Dt !== void 0 ? Dt : L(pe), hn = (
|
39767
|
+
const Et = (Dt = Cn.readable) !== null && Dt !== void 0 ? Dt : L(pe), hn = (he = Cn.writable) !== null && he !== void 0 ? he : $(pe), vn = pe._writableState, kt = pe._readableState, Ce = () => {
|
39764
39768
|
pe.writable || Ne();
|
39765
39769
|
};
|
39766
|
-
let
|
39770
|
+
let de = _e(pe) && L(pe) === Et && $(pe) === hn, Ue = D(pe, !1);
|
39767
39771
|
const Ne = () => {
|
39768
|
-
Ue = !0, pe.destroyed && (
|
39772
|
+
Ue = !0, pe.destroyed && (de = !1), !(de && (!pe.readable || Et)) && (!Et || Ve) && In.call(pe);
|
39769
39773
|
};
|
39770
|
-
let
|
39774
|
+
let Ve = M(pe, !1);
|
39771
39775
|
const Pt = () => {
|
39772
|
-
|
39776
|
+
Ve = !0, pe.destroyed && (de = !1), !(de && (!pe.writable || hn)) && (!hn || Ue) && In.call(pe);
|
39773
39777
|
}, jt = (z) => {
|
39774
39778
|
In.call(pe, z);
|
39775
39779
|
};
|
@@ -39779,7 +39783,7 @@ var mqtt = { exports: {} };
|
|
39779
39783
|
const z = re(pe) || k(pe);
|
39780
39784
|
if (z && typeof z != "boolean")
|
39781
39785
|
return In.call(pe, z);
|
39782
|
-
if (Et && !
|
39786
|
+
if (Et && !Ve && L(pe, !0) && !M(pe, !1))
|
39783
39787
|
return In.call(pe, new p());
|
39784
39788
|
if (hn && !Ue && !D(pe, !1))
|
39785
39789
|
return In.call(pe, new p());
|
@@ -39793,7 +39797,7 @@ var mqtt = { exports: {} };
|
|
39793
39797
|
}, j = () => {
|
39794
39798
|
pe.req.on("finish", Ne);
|
39795
39799
|
};
|
39796
|
-
Ie(pe) ? (pe.on("complete", Ne),
|
39800
|
+
Ie(pe) ? (pe.on("complete", Ne), de || pe.on("abort", oe), pe.req ? j() : pe.on("request", j)) : hn && !vn && (pe.on("end", Ce), pe.on("close", Ce)), !de && typeof pe.aborted == "boolean" && pe.on("aborted", oe), pe.on("end", Pt), pe.on("finish", Ne), Cn.error !== !1 && pe.on("error", jt), pe.on("close", oe), _n ? u.nextTick(oe) : vn != null && vn.errorEmitted || kt != null && kt.errorEmitted ? de || u.nextTick(le) : (!Et && (!de || x(pe)) && (Ue || ie(pe) === !1) || !hn && (!de || ie(pe)) && (Ve || x(pe) === !1) || kt && pe.req && pe.aborted) && u.nextTick(le);
|
39797
39801
|
const V = () => {
|
39798
39802
|
In = ze, pe.removeListener("aborted", oe), pe.removeListener("complete", Ne), pe.removeListener("abort", oe), pe.removeListener("request", j), pe.req && pe.req.removeListener("finish", Ne), pe.removeListener("end", Ce), pe.removeListener("close", Ce), pe.removeListener("finish", Ne), pe.removeListener("end", Pt), pe.removeListener("error", jt), pe.removeListener("close", oe);
|
39799
39803
|
};
|
@@ -39818,10 +39822,10 @@ var mqtt = { exports: {} };
|
|
39818
39822
|
}
|
39819
39823
|
return V;
|
39820
39824
|
}
|
39821
|
-
function
|
39822
|
-
let Dt = !1,
|
39825
|
+
function Oe(pe, Cn, In) {
|
39826
|
+
let Dt = !1, he = ze;
|
39823
39827
|
if (Cn.signal)
|
39824
|
-
if (
|
39828
|
+
if (he = () => {
|
39825
39829
|
Dt = !0, In.call(
|
39826
39830
|
pe,
|
39827
39831
|
new c(void 0, {
|
@@ -39829,12 +39833,12 @@ var mqtt = { exports: {} };
|
|
39829
39833
|
})
|
39830
39834
|
);
|
39831
39835
|
}, Cn.signal.aborted)
|
39832
|
-
u.nextTick(
|
39836
|
+
u.nextTick(he);
|
39833
39837
|
else {
|
39834
39838
|
const hn = In;
|
39835
39839
|
In = v((...vn) => {
|
39836
|
-
Cn.signal.removeEventListener("abort",
|
39837
|
-
}), Cn.signal.addEventListener("abort",
|
39840
|
+
Cn.signal.removeEventListener("abort", he), hn.apply(pe, vn);
|
39841
|
+
}), Cn.signal.addEventListener("abort", he);
|
39838
39842
|
}
|
39839
39843
|
const Et = (...hn) => {
|
39840
39844
|
Dt || u.nextTick(() => In.apply(pe, hn));
|
@@ -39844,9 +39848,9 @@ var mqtt = { exports: {} };
|
|
39844
39848
|
function Lt(pe, Cn) {
|
39845
39849
|
var In;
|
39846
39850
|
let Dt = !1;
|
39847
|
-
return Cn === null && (Cn = _), (In = Cn) !== null && In !== void 0 && In.cleanup && (A(Cn.cleanup, "cleanup"), Dt = Cn.cleanup), new w((
|
39851
|
+
return Cn === null && (Cn = _), (In = Cn) !== null && In !== void 0 && In.cleanup && (A(Cn.cleanup, "cleanup"), Dt = Cn.cleanup), new w((he, Et) => {
|
39848
39852
|
const hn = Fe(pe, Cn, (vn) => {
|
39849
|
-
Dt && hn(), vn ? Et(vn) :
|
39853
|
+
Dt && hn(), vn ? Et(vn) : he();
|
39850
39854
|
});
|
39851
39855
|
});
|
39852
39856
|
}
|
@@ -39979,20 +39983,20 @@ var mqtt = { exports: {} };
|
|
39979
39983
|
function _e(kt, Ce) {
|
39980
39984
|
if (Ce != null && y(Ce, "options"), (Ce == null ? void 0 : Ce.signal) != null && v(Ce.signal, "options.signal"), x(kt) && !T(kt))
|
39981
39985
|
throw new c("stream", kt, "must be writable");
|
39982
|
-
const
|
39983
|
-
return Ce != null && Ce.signal && S(Ce.signal,
|
39986
|
+
const de = w(this, kt);
|
39987
|
+
return Ce != null && Ce.signal && S(Ce.signal, de), de;
|
39984
39988
|
}
|
39985
39989
|
function ue(kt, Ce) {
|
39986
39990
|
if (typeof kt != "function")
|
39987
39991
|
throw new d("fn", ["Function", "AsyncFunction"], kt);
|
39988
39992
|
Ce != null && y(Ce, "options"), (Ce == null ? void 0 : Ce.signal) != null && v(Ce.signal, "options.signal");
|
39989
|
-
let
|
39990
|
-
return (Ce == null ? void 0 : Ce.concurrency) != null && (
|
39991
|
-
var Ne,
|
39993
|
+
let de = 1;
|
39994
|
+
return (Ce == null ? void 0 : Ce.concurrency) != null && (de = O(Ce.concurrency)), g(de, "concurrency", 1), (async function* () {
|
39995
|
+
var Ne, Ve;
|
39992
39996
|
const Pt = new u(), jt = this, _n = [], oe = Pt.signal, le = {
|
39993
39997
|
signal: oe
|
39994
39998
|
}, j = () => Pt.abort();
|
39995
|
-
Ce != null && (Ne = Ce.signal) !== null && Ne !== void 0 && Ne.aborted && j(), Ce == null || (
|
39999
|
+
Ce != null && (Ne = Ce.signal) !== null && Ne !== void 0 && Ne.aborted && j(), Ce == null || (Ve = Ce.signal) === null || Ve === void 0 || Ve.addEventListener("abort", j);
|
39996
40000
|
let V, z, ae = !1;
|
39997
40001
|
function xe() {
|
39998
40002
|
ae = !0;
|
@@ -40010,7 +40014,7 @@ var mqtt = { exports: {} };
|
|
40010
40014
|
} catch (Rn) {
|
40011
40015
|
xn = $(Rn);
|
40012
40016
|
}
|
40013
|
-
xn !== re && (typeof ((bn = xn) === null || bn === void 0 ? void 0 : bn.catch) == "function" && xn.catch(xe), _n.push(xn), V && (V(), V = null), !ae && _n.length && _n.length >=
|
40017
|
+
xn !== re && (typeof ((bn = xn) === null || bn === void 0 ? void 0 : bn.catch) == "function" && xn.catch(xe), _n.push(xn), V && (V(), V = null), !ae && _n.length && _n.length >= de && await new ie((Rn) => {
|
40014
40018
|
z = Rn;
|
40015
40019
|
}));
|
40016
40020
|
}
|
@@ -40045,19 +40049,19 @@ var mqtt = { exports: {} };
|
|
40045
40049
|
}
|
40046
40050
|
function Ie(kt = void 0) {
|
40047
40051
|
return kt != null && y(kt, "options"), (kt == null ? void 0 : kt.signal) != null && v(kt.signal, "options.signal"), (async function* () {
|
40048
|
-
let
|
40052
|
+
let de = 0;
|
40049
40053
|
for await (const Ne of this) {
|
40050
40054
|
var Ue;
|
40051
40055
|
if (kt != null && (Ue = kt.signal) !== null && Ue !== void 0 && Ue.aborted)
|
40052
40056
|
throw new _({
|
40053
40057
|
cause: kt.signal.reason
|
40054
40058
|
});
|
40055
|
-
yield [
|
40059
|
+
yield [de++, Ne];
|
40056
40060
|
}
|
40057
40061
|
}).call(this);
|
40058
40062
|
}
|
40059
40063
|
async function ze(kt, Ce = void 0) {
|
40060
|
-
for await (const
|
40064
|
+
for await (const de of pe.call(this, kt, Ce))
|
40061
40065
|
return !0;
|
40062
40066
|
return !1;
|
40063
40067
|
}
|
@@ -40066,62 +40070,62 @@ var mqtt = { exports: {} };
|
|
40066
40070
|
throw new d("fn", ["Function", "AsyncFunction"], kt);
|
40067
40071
|
return !await ze.call(
|
40068
40072
|
this,
|
40069
|
-
async (...
|
40073
|
+
async (...de) => !await kt(...de),
|
40070
40074
|
Ce
|
40071
40075
|
);
|
40072
40076
|
}
|
40073
|
-
async function
|
40074
|
-
for await (const
|
40075
|
-
return
|
40077
|
+
async function Oe(kt, Ce) {
|
40078
|
+
for await (const de of pe.call(this, kt, Ce))
|
40079
|
+
return de;
|
40076
40080
|
}
|
40077
40081
|
async function Lt(kt, Ce) {
|
40078
40082
|
if (typeof kt != "function")
|
40079
40083
|
throw new d("fn", ["Function", "AsyncFunction"], kt);
|
40080
|
-
async function
|
40084
|
+
async function de(Ue, Ne) {
|
40081
40085
|
return await kt(Ue, Ne), re;
|
40082
40086
|
}
|
40083
|
-
for await (const Ue of ue.call(this,
|
40087
|
+
for await (const Ue of ue.call(this, de, Ce))
|
40084
40088
|
;
|
40085
40089
|
}
|
40086
40090
|
function pe(kt, Ce) {
|
40087
40091
|
if (typeof kt != "function")
|
40088
40092
|
throw new d("fn", ["Function", "AsyncFunction"], kt);
|
40089
|
-
async function
|
40093
|
+
async function de(Ue, Ne) {
|
40090
40094
|
return await kt(Ue, Ne) ? Ue : re;
|
40091
40095
|
}
|
40092
|
-
return ue.call(this,
|
40096
|
+
return ue.call(this, de, Ce);
|
40093
40097
|
}
|
40094
40098
|
class Cn extends f {
|
40095
40099
|
constructor() {
|
40096
40100
|
super("reduce"), this.message = "Reduce of an empty stream requires an initial value";
|
40097
40101
|
}
|
40098
40102
|
}
|
40099
|
-
async function In(kt, Ce,
|
40103
|
+
async function In(kt, Ce, de) {
|
40100
40104
|
var Ue;
|
40101
40105
|
if (typeof kt != "function")
|
40102
40106
|
throw new d("reducer", ["Function", "AsyncFunction"], kt);
|
40103
|
-
|
40107
|
+
de != null && y(de, "options"), (de == null ? void 0 : de.signal) != null && v(de.signal, "options.signal");
|
40104
40108
|
let Ne = arguments.length > 1;
|
40105
|
-
if (
|
40109
|
+
if (de != null && (Ue = de.signal) !== null && Ue !== void 0 && Ue.aborted) {
|
40106
40110
|
const oe = new _(void 0, {
|
40107
|
-
cause:
|
40111
|
+
cause: de.signal.reason
|
40108
40112
|
});
|
40109
40113
|
throw this.once("error", () => {
|
40110
40114
|
}), await A(this.destroy(oe)), oe;
|
40111
40115
|
}
|
40112
|
-
const
|
40113
|
-
if (
|
40116
|
+
const Ve = new u(), Pt = Ve.signal;
|
40117
|
+
if (de != null && de.signal) {
|
40114
40118
|
const oe = {
|
40115
40119
|
once: !0,
|
40116
40120
|
[b]: this
|
40117
40121
|
};
|
40118
|
-
|
40122
|
+
de.signal.addEventListener("abort", () => Ve.abort(), oe);
|
40119
40123
|
}
|
40120
40124
|
let jt = !1;
|
40121
40125
|
try {
|
40122
40126
|
for await (const oe of this) {
|
40123
40127
|
var _n;
|
40124
|
-
if (jt = !0,
|
40128
|
+
if (jt = !0, de != null && (_n = de.signal) !== null && _n !== void 0 && _n.aborted)
|
40125
40129
|
throw new _();
|
40126
40130
|
Ne ? Ce = await kt(Ce, oe, {
|
40127
40131
|
signal: Pt
|
@@ -40130,7 +40134,7 @@ var mqtt = { exports: {} };
|
|
40130
40134
|
if (!jt && !Ne)
|
40131
40135
|
throw new Cn();
|
40132
40136
|
} finally {
|
40133
|
-
|
40137
|
+
Ve.abort();
|
40134
40138
|
}
|
40135
40139
|
return Ce;
|
40136
40140
|
}
|
@@ -40138,8 +40142,8 @@ var mqtt = { exports: {} };
|
|
40138
40142
|
kt != null && y(kt, "options"), (kt == null ? void 0 : kt.signal) != null && v(kt.signal, "options.signal");
|
40139
40143
|
const Ce = [];
|
40140
40144
|
for await (const Ue of this) {
|
40141
|
-
var
|
40142
|
-
if (kt != null && (
|
40145
|
+
var de;
|
40146
|
+
if (kt != null && (de = kt.signal) !== null && de !== void 0 && de.aborted)
|
40143
40147
|
throw new _(void 0, {
|
40144
40148
|
cause: kt.signal.reason
|
40145
40149
|
});
|
@@ -40147,10 +40151,10 @@ var mqtt = { exports: {} };
|
|
40147
40151
|
}
|
40148
40152
|
return Ce;
|
40149
40153
|
}
|
40150
|
-
function
|
40151
|
-
const
|
40154
|
+
function he(kt, Ce) {
|
40155
|
+
const de = ue.call(this, kt, Ce);
|
40152
40156
|
return (async function* () {
|
40153
|
-
for await (const Ne of
|
40157
|
+
for await (const Ne of de)
|
40154
40158
|
yield* Ne;
|
40155
40159
|
}).call(this);
|
40156
40160
|
}
|
@@ -40166,11 +40170,11 @@ var mqtt = { exports: {} };
|
|
40166
40170
|
var Ue;
|
40167
40171
|
if (Ce != null && (Ue = Ce.signal) !== null && Ue !== void 0 && Ue.aborted)
|
40168
40172
|
throw new _();
|
40169
|
-
for await (const
|
40173
|
+
for await (const Ve of this) {
|
40170
40174
|
var Ne;
|
40171
40175
|
if (Ce != null && (Ne = Ce.signal) !== null && Ne !== void 0 && Ne.aborted)
|
40172
40176
|
throw new _();
|
40173
|
-
kt-- <= 0 && (yield
|
40177
|
+
kt-- <= 0 && (yield Ve);
|
40174
40178
|
}
|
40175
40179
|
}).call(this);
|
40176
40180
|
}
|
@@ -40179,12 +40183,12 @@ var mqtt = { exports: {} };
|
|
40179
40183
|
var Ue;
|
40180
40184
|
if (Ce != null && (Ue = Ce.signal) !== null && Ue !== void 0 && Ue.aborted)
|
40181
40185
|
throw new _();
|
40182
|
-
for await (const
|
40186
|
+
for await (const Ve of this) {
|
40183
40187
|
var Ne;
|
40184
40188
|
if (Ce != null && (Ne = Ce.signal) !== null && Ne !== void 0 && Ne.aborted)
|
40185
40189
|
throw new _();
|
40186
40190
|
if (kt-- > 0)
|
40187
|
-
yield
|
40191
|
+
yield Ve;
|
40188
40192
|
else
|
40189
40193
|
return;
|
40190
40194
|
}
|
@@ -40194,7 +40198,7 @@ var mqtt = { exports: {} };
|
|
40194
40198
|
asIndexedPairs: Ie,
|
40195
40199
|
drop: hn,
|
40196
40200
|
filter: pe,
|
40197
|
-
flatMap:
|
40201
|
+
flatMap: he,
|
40198
40202
|
map: ue,
|
40199
40203
|
take: vn,
|
40200
40204
|
compose: _e
|
@@ -40204,7 +40208,7 @@ var mqtt = { exports: {} };
|
|
40204
40208
|
reduce: In,
|
40205
40209
|
toArray: Dt,
|
40206
40210
|
some: ze,
|
40207
|
-
find:
|
40211
|
+
find: Oe
|
40208
40212
|
};
|
40209
40213
|
}, { "../../ours/errors": 126, "../../ours/primordials": 127, "../validators": 124, "./add-abort-signal": 107, "./compose": 109, "./end-of-stream": 113, "./utils": 122, "abort-controller": 24 }], 117: [function(n, o, a) {
|
40210
40214
|
const { ObjectSetPrototypeOf: u } = n("../../ours/primordials");
|
@@ -40252,13 +40256,13 @@ var mqtt = { exports: {} };
|
|
40252
40256
|
readable: hn,
|
40253
40257
|
writable: vn
|
40254
40258
|
},
|
40255
|
-
(
|
40256
|
-
kt = !
|
40259
|
+
(de) => {
|
40260
|
+
kt = !de;
|
40257
40261
|
}
|
40258
40262
|
);
|
40259
40263
|
return {
|
40260
|
-
destroy: (
|
40261
|
-
kt || (kt = !0, v.destroyer(Et,
|
40264
|
+
destroy: (de) => {
|
40265
|
+
kt || (kt = !0, v.destroyer(Et, de || new S("pipe")));
|
40262
40266
|
},
|
40263
40267
|
cleanup: Ce
|
40264
40268
|
};
|
@@ -40266,7 +40270,7 @@ var mqtt = { exports: {} };
|
|
40266
40270
|
function Fe(Et) {
|
40267
40271
|
return L(Et[Et.length - 1], "streams[stream.length - 1]"), Et.pop();
|
40268
40272
|
}
|
40269
|
-
function
|
40273
|
+
function Oe(Et) {
|
40270
40274
|
if (M(Et))
|
40271
40275
|
return Et;
|
40272
40276
|
if (ie(Et))
|
@@ -40277,19 +40281,19 @@ var mqtt = { exports: {} };
|
|
40277
40281
|
Ie || (Ie = n("./readable")), yield* Ie.prototype[f].call(Et);
|
40278
40282
|
}
|
40279
40283
|
async function pe(Et, hn, vn, { end: kt }) {
|
40280
|
-
let Ce,
|
40284
|
+
let Ce, de = null;
|
40281
40285
|
const Ue = (Pt) => {
|
40282
|
-
if (Pt && (Ce = Pt),
|
40283
|
-
const jt =
|
40284
|
-
|
40286
|
+
if (Pt && (Ce = Pt), de) {
|
40287
|
+
const jt = de;
|
40288
|
+
de = null, jt();
|
40285
40289
|
}
|
40286
40290
|
}, Ne = () => new d((Pt, jt) => {
|
40287
|
-
Ce ? jt(Ce) :
|
40291
|
+
Ce ? jt(Ce) : de = () => {
|
40288
40292
|
Ce ? jt(Ce) : Pt();
|
40289
40293
|
};
|
40290
40294
|
});
|
40291
40295
|
hn.on("drain", Ue);
|
40292
|
-
const
|
40296
|
+
const Ve = p(
|
40293
40297
|
hn,
|
40294
40298
|
{
|
40295
40299
|
readable: !1
|
@@ -40304,20 +40308,20 @@ var mqtt = { exports: {} };
|
|
40304
40308
|
} catch (Pt) {
|
40305
40309
|
vn(Ce !== Pt ? y(Ce, Pt) : Pt);
|
40306
40310
|
} finally {
|
40307
|
-
|
40311
|
+
Ve(), hn.off("drain", Ue);
|
40308
40312
|
}
|
40309
40313
|
}
|
40310
40314
|
async function Cn(Et, hn, vn, { end: kt }) {
|
40311
40315
|
Y(hn) && (hn = hn.writable);
|
40312
40316
|
const Ce = hn.getWriter();
|
40313
40317
|
try {
|
40314
|
-
for await (const
|
40315
|
-
await Ce.ready, Ce.write(
|
40318
|
+
for await (const de of Et)
|
40319
|
+
await Ce.ready, Ce.write(de).catch(() => {
|
40316
40320
|
});
|
40317
40321
|
await Ce.ready, kt && await Ce.close(), vn();
|
40318
|
-
} catch (
|
40322
|
+
} catch (de) {
|
40319
40323
|
try {
|
40320
|
-
await Ce.abort(
|
40324
|
+
await Ce.abort(de), vn(de);
|
40321
40325
|
} catch (Ue) {
|
40322
40326
|
vn(Ue);
|
40323
40327
|
}
|
@@ -40329,23 +40333,23 @@ var mqtt = { exports: {} };
|
|
40329
40333
|
function Dt(Et, hn, vn) {
|
40330
40334
|
if (Et.length === 1 && c(Et[0]) && (Et = Et[0]), Et.length < 2)
|
40331
40335
|
throw new w("streams");
|
40332
|
-
const kt = new _e(), Ce = kt.signal,
|
40333
|
-
O(
|
40336
|
+
const kt = new _e(), Ce = kt.signal, de = vn == null ? void 0 : vn.signal, Ue = [];
|
40337
|
+
O(de, "options.signal");
|
40334
40338
|
function Ne() {
|
40335
40339
|
le(new x());
|
40336
40340
|
}
|
40337
|
-
|
40338
|
-
let
|
40341
|
+
de == null || de.addEventListener("abort", Ne);
|
40342
|
+
let Ve, Pt;
|
40339
40343
|
const jt = [];
|
40340
40344
|
let _n = 0;
|
40341
40345
|
function oe(ae) {
|
40342
40346
|
le(ae, --_n === 0);
|
40343
40347
|
}
|
40344
40348
|
function le(ae, xe) {
|
40345
|
-
if (ae && (!
|
40349
|
+
if (ae && (!Ve || Ve.code === "ERR_STREAM_PREMATURE_CLOSE") && (Ve = ae), !(!Ve && !xe)) {
|
40346
40350
|
for (; jt.length; )
|
40347
|
-
jt.shift()(
|
40348
|
-
|
40351
|
+
jt.shift()(Ve);
|
40352
|
+
de == null || de.removeEventListener("abort", Ne), kt.abort(), xe && (Ve || Ue.forEach((qe) => qe()), u.nextTick(hn, Ve, Pt));
|
40349
40353
|
}
|
40350
40354
|
}
|
40351
40355
|
let j;
|
@@ -40374,9 +40378,9 @@ var mqtt = { exports: {} };
|
|
40374
40378
|
else if (typeof xe == "function") {
|
40375
40379
|
if (Y(j)) {
|
40376
40380
|
var V;
|
40377
|
-
j =
|
40381
|
+
j = Oe((V = j) === null || V === void 0 ? void 0 : V.readable);
|
40378
40382
|
} else
|
40379
|
-
j =
|
40383
|
+
j = Oe(j);
|
40380
40384
|
if (j = xe(j, {
|
40381
40385
|
signal: Ce
|
40382
40386
|
}), qe) {
|
@@ -40416,7 +40420,7 @@ var mqtt = { exports: {} };
|
|
40416
40420
|
} else if ($(xe)) {
|
40417
40421
|
if (ie(j)) {
|
40418
40422
|
_n += 2;
|
40419
|
-
const Rn =
|
40423
|
+
const Rn = he(j, xe, oe, {
|
40420
40424
|
end: Sn
|
40421
40425
|
});
|
40422
40426
|
k(xe) && xn && Ue.push(Rn);
|
@@ -40438,7 +40442,7 @@ var mqtt = { exports: {} };
|
|
40438
40442
|
j = xe;
|
40439
40443
|
} else if (D(xe)) {
|
40440
40444
|
if (ie(j))
|
40441
|
-
_n++, Cn(
|
40445
|
+
_n++, Cn(Oe(j), xe, oe, {
|
40442
40446
|
end: Sn
|
40443
40447
|
});
|
40444
40448
|
else if (re(j) || M(j))
|
@@ -40459,19 +40463,19 @@ var mqtt = { exports: {} };
|
|
40459
40463
|
} else
|
40460
40464
|
j = g.from(xe);
|
40461
40465
|
}
|
40462
|
-
return (Ce != null && Ce.aborted ||
|
40466
|
+
return (Ce != null && Ce.aborted || de != null && de.aborted) && u.nextTick(Ne), j;
|
40463
40467
|
}
|
40464
|
-
function
|
40468
|
+
function he(Et, hn, vn, { end: kt }) {
|
40465
40469
|
let Ce = !1;
|
40466
40470
|
if (hn.on("close", () => {
|
40467
40471
|
Ce || vn(new T());
|
40468
40472
|
}), Et.pipe(hn, {
|
40469
40473
|
end: !1
|
40470
40474
|
}), kt) {
|
40471
|
-
let
|
40475
|
+
let de = function() {
|
40472
40476
|
Ce = !0, hn.end();
|
40473
40477
|
};
|
40474
|
-
F(Et) ? u.nextTick(
|
40478
|
+
F(Et) ? u.nextTick(de) : Et.once("end", de);
|
40475
40479
|
} else
|
40476
40480
|
vn();
|
40477
40481
|
return p(
|
@@ -40480,9 +40484,9 @@ var mqtt = { exports: {} };
|
|
40480
40484
|
readable: !0,
|
40481
40485
|
writable: !1
|
40482
40486
|
},
|
40483
|
-
(
|
40487
|
+
(de) => {
|
40484
40488
|
const Ue = Et._readableState;
|
40485
|
-
|
40489
|
+
de && de.code === "ERR_STREAM_PREMATURE_CLOSE" && Ue && Ue.ended && !Ue.errored && !Ue.errorEmitted ? Et.once("end", vn).once("error", vn) : vn(de);
|
40486
40490
|
}
|
40487
40491
|
), p(
|
40488
40492
|
hn,
|
@@ -40511,7 +40515,7 @@ var mqtt = { exports: {} };
|
|
40511
40515
|
SymbolAsyncIterator: A,
|
40512
40516
|
Symbol: w
|
40513
40517
|
} = n("../../ours/primordials");
|
40514
|
-
o.exports =
|
40518
|
+
o.exports = he, he.ReadableState = Dt;
|
40515
40519
|
const { EventEmitter: S } = n("events"), { Stream: T, prependListener: x } = n("./legacy"), { Buffer: L } = n("buffer"), { addAbortSignal: O } = n("./add-abort-signal"), M = n("./end-of-stream");
|
40516
40520
|
let k = n("../../ours/util").debuglog("stream", ($e) => {
|
40517
40521
|
k = $e;
|
@@ -40525,28 +40529,28 @@ var mqtt = { exports: {} };
|
|
40525
40529
|
ERR_STREAM_PUSH_AFTER_EOF: Ie,
|
40526
40530
|
ERR_STREAM_UNSHIFT_AFTER_END_EVENT: ze
|
40527
40531
|
}
|
40528
|
-
} = n("../../ours/errors"), { validateObject: Fe } = n("../validators"),
|
40529
|
-
g(
|
40532
|
+
} = n("../../ours/errors"), { validateObject: Fe } = n("../validators"), Oe = w("kPaused"), { StringDecoder: Lt } = n("string_decoder"), pe = n("./from");
|
40533
|
+
g(he.prototype, T.prototype), g(he, T);
|
40530
40534
|
const Cn = () => {
|
40531
40535
|
}, { errorOrDestroy: In } = $;
|
40532
40536
|
function Dt($e, At, En) {
|
40533
|
-
typeof En != "boolean" && (En = At instanceof n("./duplex")), this.objectMode = !!($e && $e.objectMode), En && (this.objectMode = this.objectMode || !!($e && $e.readableObjectMode)), this.highWaterMark = $e ? Y(this, $e, "readableHighWaterMark", En) : D(!1), this.buffer = new ie(), this.length = 0, this.pipes = [], this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.constructed = !0, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this[
|
40537
|
+
typeof En != "boolean" && (En = At instanceof n("./duplex")), this.objectMode = !!($e && $e.objectMode), En && (this.objectMode = this.objectMode || !!($e && $e.readableObjectMode)), this.highWaterMark = $e ? Y(this, $e, "readableHighWaterMark", En) : D(!1), this.buffer = new ie(), this.length = 0, this.pipes = [], this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.constructed = !0, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this[Oe] = null, this.errorEmitted = !1, this.emitClose = !$e || $e.emitClose !== !1, this.autoDestroy = !$e || $e.autoDestroy !== !1, this.destroyed = !1, this.errored = null, this.closed = !1, this.closeEmitted = !1, this.defaultEncoding = $e && $e.defaultEncoding || "utf8", this.awaitDrainWriters = null, this.multiAwaitDrain = !1, this.readingMore = !1, this.dataEmitted = !1, this.decoder = null, this.encoding = null, $e && $e.encoding && (this.decoder = new Lt($e.encoding), this.encoding = $e.encoding);
|
40534
40538
|
}
|
40535
|
-
function
|
40536
|
-
if (!(this instanceof
|
40537
|
-
return new
|
40539
|
+
function he($e) {
|
40540
|
+
if (!(this instanceof he))
|
40541
|
+
return new he($e);
|
40538
40542
|
const At = this instanceof n("./duplex");
|
40539
40543
|
this._readableState = new Dt($e, this, At), $e && (typeof $e.read == "function" && (this._read = $e.read), typeof $e.destroy == "function" && (this._destroy = $e.destroy), typeof $e.construct == "function" && (this._construct = $e.construct), $e.signal && !At && O($e.signal, this)), T.call(this, $e), $.construct(this, () => {
|
40540
|
-
this._readableState.needReadable &&
|
40544
|
+
this._readableState.needReadable && Ve(this, this._readableState);
|
40541
40545
|
});
|
40542
40546
|
}
|
40543
|
-
|
40547
|
+
he.prototype.destroy = $.destroy, he.prototype._undestroy = $.undestroy, he.prototype._destroy = function($e, At) {
|
40544
40548
|
At($e);
|
40545
|
-
},
|
40549
|
+
}, he.prototype[S.captureRejectionSymbol] = function($e) {
|
40546
40550
|
this.destroy($e);
|
40547
|
-
},
|
40551
|
+
}, he.prototype.push = function($e, At) {
|
40548
40552
|
return Et(this, $e, At, !1);
|
40549
|
-
},
|
40553
|
+
}, he.prototype.unshift = function($e, At) {
|
40550
40554
|
return Et(this, $e, At, !0);
|
40551
40555
|
};
|
40552
40556
|
function Et($e, At, En, wn) {
|
@@ -40556,7 +40560,7 @@ var mqtt = { exports: {} };
|
|
40556
40560
|
if (Ln.objectMode || (typeof At == "string" ? (En = En || Ln.defaultEncoding, Ln.encoding !== En && (wn && Ln.encoding ? At = L.from(At, En).toString(Ln.encoding) : (At = L.from(At, En), En = ""))) : At instanceof L ? En = "" : T._isUint8Array(At) ? (At = T._uint8ArrayToBuffer(At), En = "") : At != null && (Mn = new F("chunk", ["string", "Buffer", "Uint8Array"], At))), Mn)
|
40557
40561
|
In($e, Mn);
|
40558
40562
|
else if (At === null)
|
40559
|
-
Ln.reading = !1,
|
40563
|
+
Ln.reading = !1, de($e, Ln);
|
40560
40564
|
else if (Ln.objectMode || At && At.length > 0)
|
40561
40565
|
if (wn)
|
40562
40566
|
if (Ln.endEmitted)
|
@@ -40571,19 +40575,19 @@ var mqtt = { exports: {} };
|
|
40571
40575
|
else {
|
40572
40576
|
if (Ln.destroyed || Ln.errored)
|
40573
40577
|
return !1;
|
40574
|
-
Ln.reading = !1, Ln.decoder && !En ? (At = Ln.decoder.write(At), Ln.objectMode || At.length !== 0 ? hn($e, Ln, At, !1) :
|
40578
|
+
Ln.reading = !1, Ln.decoder && !En ? (At = Ln.decoder.write(At), Ln.objectMode || At.length !== 0 ? hn($e, Ln, At, !1) : Ve($e, Ln)) : hn($e, Ln, At, !1);
|
40575
40579
|
}
|
40576
40580
|
else
|
40577
|
-
wn || (Ln.reading = !1,
|
40581
|
+
wn || (Ln.reading = !1, Ve($e, Ln));
|
40578
40582
|
return !Ln.ended && (Ln.length < Ln.highWaterMark || Ln.length === 0);
|
40579
40583
|
}
|
40580
40584
|
function hn($e, At, En, wn) {
|
40581
|
-
At.flowing && At.length === 0 && !At.sync && $e.listenerCount("data") > 0 ? (At.multiAwaitDrain ? At.awaitDrainWriters.clear() : At.awaitDrainWriters = null, At.dataEmitted = !0, $e.emit("data", En)) : (At.length += At.objectMode ? 1 : En.length, wn ? At.buffer.unshift(En) : At.buffer.push(En), At.needReadable && Ue($e)),
|
40585
|
+
At.flowing && At.length === 0 && !At.sync && $e.listenerCount("data") > 0 ? (At.multiAwaitDrain ? At.awaitDrainWriters.clear() : At.awaitDrainWriters = null, At.dataEmitted = !0, $e.emit("data", En)) : (At.length += At.objectMode ? 1 : En.length, wn ? At.buffer.unshift(En) : At.buffer.push(En), At.needReadable && Ue($e)), Ve($e, At);
|
40582
40586
|
}
|
40583
|
-
|
40587
|
+
he.prototype.isPaused = function() {
|
40584
40588
|
const $e = this._readableState;
|
40585
|
-
return $e[
|
40586
|
-
},
|
40589
|
+
return $e[Oe] === !0 || $e.flowing === !1;
|
40590
|
+
}, he.prototype.setEncoding = function($e) {
|
40587
40591
|
const At = new Lt($e);
|
40588
40592
|
this._readableState.decoder = At, this._readableState.encoding = this._readableState.decoder.encoding;
|
40589
40593
|
const En = this._readableState.buffer;
|
@@ -40601,7 +40605,7 @@ var mqtt = { exports: {} };
|
|
40601
40605
|
function Ce($e, At) {
|
40602
40606
|
return $e <= 0 || At.length === 0 && At.ended ? 0 : At.objectMode ? 1 : f($e) ? At.flowing && At.length ? At.buffer.first().length : At.length : $e <= At.length ? $e : At.ended ? At.length : 0;
|
40603
40607
|
}
|
40604
|
-
|
40608
|
+
he.prototype.read = function($e) {
|
40605
40609
|
k("read", $e), $e === void 0 ? $e = NaN : d($e) || ($e = p($e, 10));
|
40606
40610
|
const At = this._readableState, En = $e;
|
40607
40611
|
if ($e > At.highWaterMark && (At.highWaterMark = kt($e)), $e !== 0 && (At.emittedReadable = !1), $e === 0 && At.needReadable && ((At.highWaterMark !== 0 ? At.length >= At.highWaterMark : At.length > 0) || At.ended))
|
@@ -40623,7 +40627,7 @@ var mqtt = { exports: {} };
|
|
40623
40627
|
let Ln;
|
40624
40628
|
return $e > 0 ? Ln = xe($e, At) : Ln = null, Ln === null ? (At.needReadable = At.length <= At.highWaterMark, $e = 0) : (At.length -= $e, At.multiAwaitDrain ? At.awaitDrainWriters.clear() : At.awaitDrainWriters = null), At.length === 0 && (At.ended || (At.needReadable = !0), En !== $e && At.ended && qe(this)), Ln !== null && !At.errorEmitted && !At.closeEmitted && (At.dataEmitted = !0, this.emit("data", Ln)), Ln;
|
40625
40629
|
};
|
40626
|
-
function
|
40630
|
+
function de($e, At) {
|
40627
40631
|
if (k("onEofChunk"), !At.ended) {
|
40628
40632
|
if (At.decoder) {
|
40629
40633
|
const En = At.decoder.end();
|
@@ -40640,7 +40644,7 @@ var mqtt = { exports: {} };
|
|
40640
40644
|
const At = $e._readableState;
|
40641
40645
|
k("emitReadable_", At.destroyed, At.length, At.ended), !At.destroyed && !At.errored && (At.length || At.ended) && ($e.emit("readable"), At.emittedReadable = !1), At.needReadable = !At.flowing && !At.ended && At.length <= At.highWaterMark, V($e);
|
40642
40646
|
}
|
40643
|
-
function
|
40647
|
+
function Ve($e, At) {
|
40644
40648
|
!At.readingMore && At.constructed && (At.readingMore = !0, u.nextTick(Pt, $e, At));
|
40645
40649
|
}
|
40646
40650
|
function Pt($e, At) {
|
@@ -40651,9 +40655,9 @@ var mqtt = { exports: {} };
|
|
40651
40655
|
}
|
40652
40656
|
At.readingMore = !1;
|
40653
40657
|
}
|
40654
|
-
|
40658
|
+
he.prototype._read = function($e) {
|
40655
40659
|
throw new _e("_read()");
|
40656
|
-
},
|
40660
|
+
}, he.prototype.pipe = function($e, At) {
|
40657
40661
|
const En = this, wn = this._readableState;
|
40658
40662
|
wn.pipes.length === 1 && (wn.multiAwaitDrain || (wn.multiAwaitDrain = !0, wn.awaitDrainWriters = new b(wn.awaitDrainWriters ? [wn.awaitDrainWriters] : []))), wn.pipes.push($e), k("pipe count=%d opts=%j", wn.pipes.length, At);
|
40659
40663
|
const Mn = (!At || At.end !== !1) && $e !== u.stdout && $e !== u.stderr ? $n : Wn;
|
@@ -40703,7 +40707,7 @@ var mqtt = { exports: {} };
|
|
40703
40707
|
wn.awaitDrainWriters === At ? (k("pipeOnDrain", 1), wn.awaitDrainWriters = null) : wn.multiAwaitDrain && (k("pipeOnDrain", wn.awaitDrainWriters.size), wn.awaitDrainWriters.delete(At)), (!wn.awaitDrainWriters || wn.awaitDrainWriters.size === 0) && $e.listenerCount("data") && $e.resume();
|
40704
40708
|
};
|
40705
40709
|
}
|
40706
|
-
|
40710
|
+
he.prototype.unpipe = function($e) {
|
40707
40711
|
const At = this._readableState, En = {
|
40708
40712
|
hasUnpiped: !1
|
40709
40713
|
};
|
@@ -40720,26 +40724,26 @@ var mqtt = { exports: {} };
|
|
40720
40724
|
}
|
40721
40725
|
const wn = c(At.pipes, $e);
|
40722
40726
|
return wn === -1 ? this : (At.pipes.splice(wn, 1), At.pipes.length === 0 && this.pause(), $e.emit("unpipe", this, En), this);
|
40723
|
-
},
|
40727
|
+
}, he.prototype.on = function($e, At) {
|
40724
40728
|
const En = T.prototype.on.call(this, $e, At), wn = this._readableState;
|
40725
40729
|
return $e === "data" ? (wn.readableListening = this.listenerCount("readable") > 0, wn.flowing !== !1 && this.resume()) : $e === "readable" && !wn.endEmitted && !wn.readableListening && (wn.readableListening = wn.needReadable = !0, wn.flowing = !1, wn.emittedReadable = !1, k("on readable", wn.length, wn.reading), wn.length ? Ue(this) : wn.reading || u.nextTick(oe, this)), En;
|
40726
|
-
},
|
40730
|
+
}, he.prototype.addListener = he.prototype.on, he.prototype.removeListener = function($e, At) {
|
40727
40731
|
const En = T.prototype.removeListener.call(this, $e, At);
|
40728
40732
|
return $e === "readable" && u.nextTick(_n, this), En;
|
40729
|
-
},
|
40733
|
+
}, he.prototype.off = he.prototype.removeListener, he.prototype.removeAllListeners = function($e) {
|
40730
40734
|
const At = T.prototype.removeAllListeners.apply(this, arguments);
|
40731
40735
|
return ($e === "readable" || $e === void 0) && u.nextTick(_n, this), At;
|
40732
40736
|
};
|
40733
40737
|
function _n($e) {
|
40734
40738
|
const At = $e._readableState;
|
40735
|
-
At.readableListening = $e.listenerCount("readable") > 0, At.resumeScheduled && At[
|
40739
|
+
At.readableListening = $e.listenerCount("readable") > 0, At.resumeScheduled && At[Oe] === !1 ? At.flowing = !0 : $e.listenerCount("data") > 0 ? $e.resume() : At.readableListening || (At.flowing = null);
|
40736
40740
|
}
|
40737
40741
|
function oe($e) {
|
40738
40742
|
k("readable nexttick read 0"), $e.read(0);
|
40739
40743
|
}
|
40740
|
-
|
40744
|
+
he.prototype.resume = function() {
|
40741
40745
|
const $e = this._readableState;
|
40742
|
-
return $e.flowing || (k("resume"), $e.flowing = !$e.readableListening, le(this, $e)), $e[
|
40746
|
+
return $e.flowing || (k("resume"), $e.flowing = !$e.readableListening, le(this, $e)), $e[Oe] = !1, this;
|
40743
40747
|
};
|
40744
40748
|
function le($e, At) {
|
40745
40749
|
At.resumeScheduled || (At.resumeScheduled = !0, u.nextTick(j, $e, At));
|
@@ -40747,15 +40751,15 @@ var mqtt = { exports: {} };
|
|
40747
40751
|
function j($e, At) {
|
40748
40752
|
k("resume", At.reading), At.reading || $e.read(0), At.resumeScheduled = !1, $e.emit("resume"), V($e), At.flowing && !At.reading && $e.read(0);
|
40749
40753
|
}
|
40750
|
-
|
40751
|
-
return k("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (k("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState[
|
40754
|
+
he.prototype.pause = function() {
|
40755
|
+
return k("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (k("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState[Oe] = !0, this;
|
40752
40756
|
};
|
40753
40757
|
function V($e) {
|
40754
40758
|
const At = $e._readableState;
|
40755
40759
|
for (k("flow", At.flowing); At.flowing && $e.read() !== null; )
|
40756
40760
|
;
|
40757
40761
|
}
|
40758
|
-
|
40762
|
+
he.prototype.wrap = function($e) {
|
40759
40763
|
let At = !1;
|
40760
40764
|
$e.on("data", (wn) => {
|
40761
40765
|
!this.push(wn) && $e.pause && (At = !0, $e.pause());
|
@@ -40776,13 +40780,13 @@ var mqtt = { exports: {} };
|
|
40776
40780
|
this[Ln] === void 0 && typeof $e[Ln] == "function" && (this[Ln] = $e[Ln].bind($e));
|
40777
40781
|
}
|
40778
40782
|
return this;
|
40779
|
-
},
|
40783
|
+
}, he.prototype[A] = function() {
|
40780
40784
|
return z(this);
|
40781
|
-
},
|
40785
|
+
}, he.prototype.iterator = function($e) {
|
40782
40786
|
return $e !== void 0 && Fe($e, "options"), z(this, $e);
|
40783
40787
|
};
|
40784
40788
|
function z($e, At) {
|
40785
|
-
typeof $e.read != "function" && ($e =
|
40789
|
+
typeof $e.read != "function" && ($e = he.wrap($e, {
|
40786
40790
|
objectMode: !0
|
40787
40791
|
}));
|
40788
40792
|
const En = ae($e, At);
|
@@ -40823,7 +40827,7 @@ var mqtt = { exports: {} };
|
|
40823
40827
|
(Ln || (At == null ? void 0 : At.destroyOnReturn) !== !1) && (Ln === void 0 || $e._readableState.autoDestroy) ? $.destroyer($e, null) : ($e.off("readable", wn), Mn());
|
40824
40828
|
}
|
40825
40829
|
}
|
40826
|
-
_(
|
40830
|
+
_(he.prototype, {
|
40827
40831
|
readable: {
|
40828
40832
|
__proto__: null,
|
40829
40833
|
get() {
|
@@ -40935,13 +40939,13 @@ var mqtt = { exports: {} };
|
|
40935
40939
|
paused: {
|
40936
40940
|
__proto__: null,
|
40937
40941
|
get() {
|
40938
|
-
return this[
|
40942
|
+
return this[Oe] !== !1;
|
40939
40943
|
},
|
40940
40944
|
set($e) {
|
40941
|
-
this[
|
40945
|
+
this[Oe] = !!$e;
|
40942
40946
|
}
|
40943
40947
|
}
|
40944
|
-
}),
|
40948
|
+
}), he._fromList = xe;
|
40945
40949
|
function xe($e, At) {
|
40946
40950
|
if (At.length === 0)
|
40947
40951
|
return null;
|
@@ -40967,20 +40971,20 @@ var mqtt = { exports: {} };
|
|
40967
40971
|
function Sn($e) {
|
40968
40972
|
$e.writable && !$e.writableEnded && !$e.destroyed && $e.end();
|
40969
40973
|
}
|
40970
|
-
|
40971
|
-
return pe(
|
40974
|
+
he.from = function($e, At) {
|
40975
|
+
return pe(he, $e, At);
|
40972
40976
|
};
|
40973
40977
|
let xn;
|
40974
40978
|
function Rn() {
|
40975
40979
|
return xn === void 0 && (xn = {}), xn;
|
40976
40980
|
}
|
40977
|
-
|
40981
|
+
he.fromWeb = function($e, At) {
|
40978
40982
|
return Rn().newStreamReadableFromReadableStream($e, At);
|
40979
|
-
},
|
40983
|
+
}, he.toWeb = function($e, At) {
|
40980
40984
|
return Rn().newReadableStreamFromStreamReadable($e, At);
|
40981
|
-
},
|
40985
|
+
}, he.wrap = function($e, At) {
|
40982
40986
|
var En, wn;
|
40983
|
-
return new
|
40987
|
+
return new he({
|
40984
40988
|
objectMode: (En = (wn = $e.readableObjectMode) !== null && wn !== void 0 ? wn : $e.objectMode) !== null && En !== void 0 ? En : !0,
|
40985
40989
|
...At,
|
40986
40990
|
destroy(Ln, Mn) {
|
@@ -41065,120 +41069,120 @@ var mqtt = { exports: {} };
|
|
41065
41069
|
};
|
41066
41070
|
}, { "../../ours/errors": 126, "../../ours/primordials": 127, "./duplex": 111, "./state": 120 }], 122: [function(n, o, a) {
|
41067
41071
|
const { Symbol: u, SymbolAsyncIterator: c, SymbolIterator: d, SymbolFor: f } = n("../../ours/primordials"), p = u("kDestroyed"), _ = u("kIsErrored"), v = u("kIsReadable"), g = u("kIsDisturbed"), y = f("nodejs.webstream.isClosedPromise"), b = f("nodejs.webstream.controllerErrorFunction");
|
41068
|
-
function A(
|
41072
|
+
function A(he, Et = !1) {
|
41069
41073
|
var hn;
|
41070
|
-
return !!(
|
41071
|
-
(!
|
41074
|
+
return !!(he && typeof he.pipe == "function" && typeof he.on == "function" && (!Et || typeof he.pause == "function" && typeof he.resume == "function") && (!he._writableState || ((hn = he._readableState) === null || hn === void 0 ? void 0 : hn.readable) !== !1) && // Duplex
|
41075
|
+
(!he._writableState || he._readableState));
|
41072
41076
|
}
|
41073
|
-
function w(
|
41077
|
+
function w(he) {
|
41074
41078
|
var Et;
|
41075
|
-
return !!(
|
41079
|
+
return !!(he && typeof he.write == "function" && typeof he.on == "function" && (!he._readableState || ((Et = he._writableState) === null || Et === void 0 ? void 0 : Et.writable) !== !1));
|
41076
41080
|
}
|
41077
|
-
function S(
|
41078
|
-
return !!(
|
41081
|
+
function S(he) {
|
41082
|
+
return !!(he && typeof he.pipe == "function" && he._readableState && typeof he.on == "function" && typeof he.write == "function");
|
41079
41083
|
}
|
41080
|
-
function T(
|
41081
|
-
return
|
41084
|
+
function T(he) {
|
41085
|
+
return he && (he._readableState || he._writableState || typeof he.write == "function" && typeof he.on == "function" || typeof he.pipe == "function" && typeof he.on == "function");
|
41082
41086
|
}
|
41083
|
-
function x(
|
41084
|
-
return !!(
|
41087
|
+
function x(he) {
|
41088
|
+
return !!(he && !T(he) && typeof he.pipeThrough == "function" && typeof he.getReader == "function" && typeof he.cancel == "function");
|
41085
41089
|
}
|
41086
|
-
function L(
|
41087
|
-
return !!(
|
41090
|
+
function L(he) {
|
41091
|
+
return !!(he && !T(he) && typeof he.getWriter == "function" && typeof he.abort == "function");
|
41088
41092
|
}
|
41089
|
-
function O(
|
41090
|
-
return !!(
|
41093
|
+
function O(he) {
|
41094
|
+
return !!(he && !T(he) && typeof he.readable == "object" && typeof he.writable == "object");
|
41091
41095
|
}
|
41092
|
-
function M(
|
41093
|
-
return x(
|
41096
|
+
function M(he) {
|
41097
|
+
return x(he) || L(he) || O(he);
|
41094
41098
|
}
|
41095
|
-
function k(
|
41096
|
-
return
|
41099
|
+
function k(he, Et) {
|
41100
|
+
return he == null ? !1 : Et === !0 ? typeof he[c] == "function" : Et === !1 ? typeof he[d] == "function" : typeof he[c] == "function" || typeof he[d] == "function";
|
41097
41101
|
}
|
41098
|
-
function ie(
|
41099
|
-
if (!T(
|
41102
|
+
function ie(he) {
|
41103
|
+
if (!T(he))
|
41100
41104
|
return null;
|
41101
|
-
const Et =
|
41102
|
-
return !!(
|
41105
|
+
const Et = he._writableState, hn = he._readableState, vn = Et || hn;
|
41106
|
+
return !!(he.destroyed || he[p] || vn != null && vn.destroyed);
|
41103
41107
|
}
|
41104
|
-
function $(
|
41105
|
-
if (!w(
|
41108
|
+
function $(he) {
|
41109
|
+
if (!w(he))
|
41106
41110
|
return null;
|
41107
|
-
if (
|
41111
|
+
if (he.writableEnded === !0)
|
41108
41112
|
return !0;
|
41109
|
-
const Et =
|
41113
|
+
const Et = he._writableState;
|
41110
41114
|
return Et != null && Et.errored ? !1 : typeof (Et == null ? void 0 : Et.ended) != "boolean" ? null : Et.ended;
|
41111
41115
|
}
|
41112
|
-
function Y(
|
41113
|
-
if (!w(
|
41116
|
+
function Y(he, Et) {
|
41117
|
+
if (!w(he))
|
41114
41118
|
return null;
|
41115
|
-
if (
|
41119
|
+
if (he.writableFinished === !0)
|
41116
41120
|
return !0;
|
41117
|
-
const hn =
|
41121
|
+
const hn = he._writableState;
|
41118
41122
|
return hn != null && hn.errored ? !1 : typeof (hn == null ? void 0 : hn.finished) != "boolean" ? null : !!(hn.finished || Et === !1 && hn.ended === !0 && hn.length === 0);
|
41119
41123
|
}
|
41120
|
-
function D(
|
41121
|
-
if (!A(
|
41124
|
+
function D(he) {
|
41125
|
+
if (!A(he))
|
41122
41126
|
return null;
|
41123
|
-
if (
|
41127
|
+
if (he.readableEnded === !0)
|
41124
41128
|
return !0;
|
41125
|
-
const Et =
|
41129
|
+
const Et = he._readableState;
|
41126
41130
|
return !Et || Et.errored ? !1 : typeof (Et == null ? void 0 : Et.ended) != "boolean" ? null : Et.ended;
|
41127
41131
|
}
|
41128
|
-
function re(
|
41129
|
-
if (!A(
|
41132
|
+
function re(he, Et) {
|
41133
|
+
if (!A(he))
|
41130
41134
|
return null;
|
41131
|
-
const hn =
|
41135
|
+
const hn = he._readableState;
|
41132
41136
|
return hn != null && hn.errored ? !1 : typeof (hn == null ? void 0 : hn.endEmitted) != "boolean" ? null : !!(hn.endEmitted || Et === !1 && hn.ended === !0 && hn.length === 0);
|
41133
41137
|
}
|
41134
|
-
function F(
|
41135
|
-
return
|
41138
|
+
function F(he) {
|
41139
|
+
return he && he[v] != null ? he[v] : typeof (he == null ? void 0 : he.readable) != "boolean" ? null : ie(he) ? !1 : A(he) && he.readable && !re(he);
|
41136
41140
|
}
|
41137
|
-
function _e(
|
41138
|
-
return typeof (
|
41141
|
+
function _e(he) {
|
41142
|
+
return typeof (he == null ? void 0 : he.writable) != "boolean" ? null : ie(he) ? !1 : w(he) && he.writable && !$(he);
|
41139
41143
|
}
|
41140
|
-
function ue(
|
41141
|
-
return T(
|
41144
|
+
function ue(he, Et) {
|
41145
|
+
return T(he) ? ie(he) ? !0 : !((Et == null ? void 0 : Et.readable) !== !1 && F(he) || (Et == null ? void 0 : Et.writable) !== !1 && _e(he)) : null;
|
41142
41146
|
}
|
41143
|
-
function Ie(
|
41147
|
+
function Ie(he) {
|
41144
41148
|
var Et, hn;
|
41145
|
-
return T(
|
41149
|
+
return T(he) ? he.writableErrored ? he.writableErrored : (Et = (hn = he._writableState) === null || hn === void 0 ? void 0 : hn.errored) !== null && Et !== void 0 ? Et : null : null;
|
41146
41150
|
}
|
41147
|
-
function ze(
|
41151
|
+
function ze(he) {
|
41148
41152
|
var Et, hn;
|
41149
|
-
return T(
|
41153
|
+
return T(he) ? he.readableErrored ? he.readableErrored : (Et = (hn = he._readableState) === null || hn === void 0 ? void 0 : hn.errored) !== null && Et !== void 0 ? Et : null : null;
|
41150
41154
|
}
|
41151
|
-
function Fe(
|
41152
|
-
if (!T(
|
41155
|
+
function Fe(he) {
|
41156
|
+
if (!T(he))
|
41153
41157
|
return null;
|
41154
|
-
if (typeof
|
41155
|
-
return
|
41156
|
-
const Et =
|
41157
|
-
return typeof (Et == null ? void 0 : Et.closed) == "boolean" || typeof (hn == null ? void 0 : hn.closed) == "boolean" ? (Et == null ? void 0 : Et.closed) || (hn == null ? void 0 : hn.closed) : typeof
|
41158
|
+
if (typeof he.closed == "boolean")
|
41159
|
+
return he.closed;
|
41160
|
+
const Et = he._writableState, hn = he._readableState;
|
41161
|
+
return typeof (Et == null ? void 0 : Et.closed) == "boolean" || typeof (hn == null ? void 0 : hn.closed) == "boolean" ? (Et == null ? void 0 : Et.closed) || (hn == null ? void 0 : hn.closed) : typeof he._closed == "boolean" && Oe(he) ? he._closed : null;
|
41158
41162
|
}
|
41159
|
-
function
|
41160
|
-
return typeof
|
41163
|
+
function Oe(he) {
|
41164
|
+
return typeof he._closed == "boolean" && typeof he._defaultKeepAlive == "boolean" && typeof he._removedConnection == "boolean" && typeof he._removedContLen == "boolean";
|
41161
41165
|
}
|
41162
|
-
function Lt(
|
41163
|
-
return typeof
|
41166
|
+
function Lt(he) {
|
41167
|
+
return typeof he._sent100 == "boolean" && Oe(he);
|
41164
41168
|
}
|
41165
|
-
function pe(
|
41169
|
+
function pe(he) {
|
41166
41170
|
var Et;
|
41167
|
-
return typeof
|
41171
|
+
return typeof he._consuming == "boolean" && typeof he._dumped == "boolean" && ((Et = he.req) === null || Et === void 0 ? void 0 : Et.upgradeOrConnect) === void 0;
|
41168
41172
|
}
|
41169
|
-
function Cn(
|
41170
|
-
if (!T(
|
41173
|
+
function Cn(he) {
|
41174
|
+
if (!T(he))
|
41171
41175
|
return null;
|
41172
|
-
const Et =
|
41173
|
-
return !vn && Lt(
|
41176
|
+
const Et = he._writableState, hn = he._readableState, vn = Et || hn;
|
41177
|
+
return !vn && Lt(he) || !!(vn && vn.autoDestroy && vn.emitClose && vn.closed === !1);
|
41174
41178
|
}
|
41175
|
-
function In(
|
41179
|
+
function In(he) {
|
41176
41180
|
var Et;
|
41177
|
-
return !!(
|
41181
|
+
return !!(he && ((Et = he[g]) !== null && Et !== void 0 ? Et : he.readableDidRead || he.readableAborted));
|
41178
41182
|
}
|
41179
|
-
function Dt(
|
41180
|
-
var Et, hn, vn, kt, Ce,
|
41181
|
-
return !!(
|
41183
|
+
function Dt(he) {
|
41184
|
+
var Et, hn, vn, kt, Ce, de, Ue, Ne, Ve, Pt;
|
41185
|
+
return !!(he && ((Et = (hn = (vn = (kt = (Ce = (de = he[_]) !== null && de !== void 0 ? de : he.readableErrored) !== null && Ce !== void 0 ? Ce : he.writableErrored) !== null && kt !== void 0 ? kt : (Ue = he._readableState) === null || Ue === void 0 ? void 0 : Ue.errorEmitted) !== null && vn !== void 0 ? vn : (Ne = he._writableState) === null || Ne === void 0 ? void 0 : Ne.errorEmitted) !== null && hn !== void 0 ? hn : (Ve = he._readableState) === null || Ve === void 0 ? void 0 : Ve.errored) !== null && Et !== void 0 ? Et : !((Pt = he._writableState) === null || Pt === void 0) && Pt.errored));
|
41182
41186
|
}
|
41183
41187
|
o.exports = {
|
41184
41188
|
kDestroyed: p,
|
@@ -41244,9 +41248,9 @@ var mqtt = { exports: {} };
|
|
41244
41248
|
function Fe(oe, le, j) {
|
41245
41249
|
typeof j != "boolean" && (j = le instanceof n("./duplex")), this.objectMode = !!(oe && oe.objectMode), j && (this.objectMode = this.objectMode || !!(oe && oe.writableObjectMode)), this.highWaterMark = oe ? L(this, oe, "writableHighWaterMark", j) : O(!1), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
|
41246
41250
|
const V = !!(oe && oe.decodeStrings === !1);
|
41247
|
-
this.decodeStrings = !V, this.defaultEncoding = oe && oe.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite =
|
41251
|
+
this.decodeStrings = !V, this.defaultEncoding = oe && oe.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = he.bind(void 0, le), this.writecb = null, this.writelen = 0, this.afterWriteTickInfo = null, Oe(this), this.pendingcb = 0, this.constructed = !0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = !oe || oe.emitClose !== !1, this.autoDestroy = !oe || oe.autoDestroy !== !1, this.errored = null, this.closed = !1, this.closeEmitted = !1, this[ze] = [];
|
41248
41252
|
}
|
41249
|
-
function
|
41253
|
+
function Oe(oe) {
|
41250
41254
|
oe.buffered = [], oe.bufferedIndex = 0, oe.allBuffers = !0, oe.allNoop = !0;
|
41251
41255
|
}
|
41252
41256
|
Fe.prototype.getBuffer = function() {
|
@@ -41327,7 +41331,7 @@ var mqtt = { exports: {} };
|
|
41327
41331
|
function Dt(oe, le, j, V) {
|
41328
41332
|
--le.pendingcb, V(j), vn(le), ue(oe, j);
|
41329
41333
|
}
|
41330
|
-
function
|
41334
|
+
function he(oe, le) {
|
41331
41335
|
const j = oe._writableState, V = j.sync, z = j.writecb;
|
41332
41336
|
if (typeof z != "function") {
|
41333
41337
|
ue(oe, new ie());
|
@@ -41365,7 +41369,7 @@ var mqtt = { exports: {} };
|
|
41365
41369
|
(V = oe.errored) !== null && V !== void 0 ? V : new Y("end")
|
41366
41370
|
);
|
41367
41371
|
}
|
41368
|
-
|
41372
|
+
Oe(oe);
|
41369
41373
|
}
|
41370
41374
|
function kt(oe, le) {
|
41371
41375
|
if (le.corked || le.bufferProcessing || le.destroyed || !le.constructed)
|
@@ -41380,7 +41384,7 @@ var mqtt = { exports: {} };
|
|
41380
41384
|
for (let xn = xe; xn < j.length; ++xn)
|
41381
41385
|
j[xn].callback(Sn);
|
41382
41386
|
}, bn = le.allNoop && xe === 0 ? j : c(j, xe);
|
41383
|
-
bn.allBuffers = le.allBuffers, In(oe, le, !0, le.length, bn, "", qe),
|
41387
|
+
bn.allBuffers = le.allBuffers, In(oe, le, !0, le.length, bn, "", qe), Oe(le);
|
41384
41388
|
} else {
|
41385
41389
|
do {
|
41386
41390
|
const { chunk: qe, encoding: bn, callback: Sn } = j[xe];
|
@@ -41388,7 +41392,7 @@ var mqtt = { exports: {} };
|
|
41388
41392
|
const xn = z ? 1 : qe.length;
|
41389
41393
|
In(oe, le, !1, xn, qe, bn, Sn);
|
41390
41394
|
} while (xe < j.length && !le.writing);
|
41391
|
-
xe === j.length ?
|
41395
|
+
xe === j.length ? Oe(le) : xe > 256 ? (j.splice(0, xe), le.bufferedIndex = 0) : le.bufferedIndex = xe;
|
41392
41396
|
}
|
41393
41397
|
le.bufferProcessing = !1;
|
41394
41398
|
}
|
@@ -41418,7 +41422,7 @@ var mqtt = { exports: {} };
|
|
41418
41422
|
function Ce(oe) {
|
41419
41423
|
return oe.ending && !oe.destroyed && oe.constructed && oe.length === 0 && !oe.errored && oe.buffered.length === 0 && !oe.finished && !oe.writing && !oe.errorEmitted && !oe.closeEmitted;
|
41420
41424
|
}
|
41421
|
-
function
|
41425
|
+
function de(oe, le) {
|
41422
41426
|
let j = !1;
|
41423
41427
|
function V(z) {
|
41424
41428
|
if (j) {
|
@@ -41431,7 +41435,7 @@ var mqtt = { exports: {} };
|
|
41431
41435
|
ae[xe](z);
|
41432
41436
|
ue(oe, z, le.sync);
|
41433
41437
|
} else
|
41434
|
-
Ce(le) && (le.prefinished = !0, oe.emit("prefinish"), le.pendingcb++, u.nextTick(
|
41438
|
+
Ce(le) && (le.prefinished = !0, oe.emit("prefinish"), le.pendingcb++, u.nextTick(Ve, oe, le));
|
41435
41439
|
}
|
41436
41440
|
le.sync = !0, le.pendingcb++;
|
41437
41441
|
try {
|
@@ -41442,18 +41446,18 @@ var mqtt = { exports: {} };
|
|
41442
41446
|
le.sync = !1;
|
41443
41447
|
}
|
41444
41448
|
function Ue(oe, le) {
|
41445
|
-
!le.prefinished && !le.finalCalled && (typeof oe._final == "function" && !le.destroyed ? (le.finalCalled = !0,
|
41449
|
+
!le.prefinished && !le.finalCalled && (typeof oe._final == "function" && !le.destroyed ? (le.finalCalled = !0, de(oe, le)) : (le.prefinished = !0, oe.emit("prefinish")));
|
41446
41450
|
}
|
41447
41451
|
function Ne(oe, le, j) {
|
41448
41452
|
Ce(le) && (Ue(oe, le), le.pendingcb === 0 && (j ? (le.pendingcb++, u.nextTick(
|
41449
41453
|
(V, z) => {
|
41450
|
-
Ce(z) ?
|
41454
|
+
Ce(z) ? Ve(V, z) : z.pendingcb--;
|
41451
41455
|
},
|
41452
41456
|
oe,
|
41453
41457
|
le
|
41454
|
-
)) : Ce(le) && (le.pendingcb++,
|
41458
|
+
)) : Ce(le) && (le.pendingcb++, Ve(oe, le))));
|
41455
41459
|
}
|
41456
|
-
function
|
41460
|
+
function Ve(oe, le) {
|
41457
41461
|
le.pendingcb--, le.finished = !0;
|
41458
41462
|
const j = le[ze].splice(0);
|
41459
41463
|
for (let V = 0; V < j.length; V++)
|
@@ -41615,7 +41619,7 @@ var mqtt = { exports: {} };
|
|
41615
41619
|
throw new k(xe, "an integer", ae);
|
41616
41620
|
if (ae < qe || ae > bn)
|
41617
41621
|
throw new k(xe, `>= ${qe} && <= ${bn}`, ae);
|
41618
|
-
}),
|
41622
|
+
}), Oe = x((ae, xe, qe = -2147483648, bn = 2147483647) => {
|
41619
41623
|
if (typeof ae != "number")
|
41620
41624
|
throw new O(xe, "number", ae);
|
41621
41625
|
if (!p(ae))
|
@@ -41658,12 +41662,12 @@ var mqtt = { exports: {} };
|
|
41658
41662
|
if (typeof ae != "boolean")
|
41659
41663
|
throw new O(xe, "boolean", ae);
|
41660
41664
|
}
|
41661
|
-
function
|
41665
|
+
function he(ae, xe, qe) {
|
41662
41666
|
return ae == null || !b(ae, xe) ? qe : ae[xe];
|
41663
41667
|
}
|
41664
41668
|
const Et = x((ae, xe, qe = null) => {
|
41665
|
-
const bn =
|
41666
|
-
if (!
|
41669
|
+
const bn = he(qe, "allowArray", !1), Sn = he(qe, "allowFunction", !1);
|
41670
|
+
if (!he(qe, "nullable", !1) && ae === null || !bn && u(ae) || typeof ae != "object" && (!Sn || typeof ae != "function"))
|
41667
41671
|
throw new O(xe, "Object", ae);
|
41668
41672
|
}), hn = x((ae, xe) => {
|
41669
41673
|
if (ae != null && typeof ae != "object" && typeof ae != "function")
|
@@ -41686,7 +41690,7 @@ var mqtt = { exports: {} };
|
|
41686
41690
|
for (let qe = 0; qe < ae.length; qe++)
|
41687
41691
|
Dt(ae[qe], `${xe}[${qe}]`);
|
41688
41692
|
}
|
41689
|
-
function
|
41693
|
+
function de(ae, xe = "signal") {
|
41690
41694
|
if (pe(ae, xe), re[ae] === void 0)
|
41691
41695
|
throw re[S(ae)] !== void 0 ? new ie(ae + " (signals must use all capital letters)") : new ie(ae);
|
41692
41696
|
}
|
@@ -41699,7 +41703,7 @@ var mqtt = { exports: {} };
|
|
41699
41703
|
if (qe === "hex" && bn % 2 !== 0)
|
41700
41704
|
throw new M("encoding", xe, `is invalid for data of length ${bn}`);
|
41701
41705
|
}
|
41702
|
-
function
|
41706
|
+
function Ve(ae, xe = "Port", qe = !0) {
|
41703
41707
|
if (typeof ae != "number" && typeof ae != "string" || typeof ae == "string" && T(ae).length === 0 || +ae !== +ae >>> 0 || ae > 65535 || ae === 0 && !qe)
|
41704
41708
|
throw new L(xe, ae, qe);
|
41705
41709
|
return ae | 0;
|
@@ -41762,14 +41766,14 @@ var mqtt = { exports: {} };
|
|
41762
41766
|
validateDictionary: hn,
|
41763
41767
|
validateEncoding: Ne,
|
41764
41768
|
validateFunction: jt,
|
41765
|
-
validateInt32:
|
41769
|
+
validateInt32: Oe,
|
41766
41770
|
validateInteger: Fe,
|
41767
41771
|
validateNumber: Cn,
|
41768
41772
|
validateObject: Et,
|
41769
41773
|
validateOneOf: In,
|
41770
41774
|
validatePlainFunction: _n,
|
41771
|
-
validatePort:
|
41772
|
-
validateSignalName:
|
41775
|
+
validatePort: Ve,
|
41776
|
+
validateSignalName: de,
|
41773
41777
|
validateString: pe,
|
41774
41778
|
validateUint32: Lt,
|
41775
41779
|
validateUndefined: oe,
|
@@ -42530,9 +42534,9 @@ var mqtt = { exports: {} };
|
|
42530
42534
|
Ie[0] = Ie[0].replace(ze, "/"), D = Ie.join(ue);
|
42531
42535
|
var Fe = D;
|
42532
42536
|
if (Fe = Fe.trim(), !F && D.split("#").length === 1) {
|
42533
|
-
var
|
42534
|
-
if (
|
42535
|
-
return this.path = Fe, this.href = Fe, this.pathname =
|
42537
|
+
var Oe = _.exec(Fe);
|
42538
|
+
if (Oe)
|
42539
|
+
return this.path = Fe, this.href = Fe, this.pathname = Oe[1], Oe[2] ? (this.search = Oe[2], re ? this.query = M.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : re && (this.search = "", this.query = {}), this;
|
42536
42540
|
}
|
42537
42541
|
var Lt = f.exec(Fe);
|
42538
42542
|
if (Lt) {
|
@@ -42546,25 +42550,25 @@ var mqtt = { exports: {} };
|
|
42546
42550
|
}
|
42547
42551
|
if (!L[Lt] && (Cn || Lt && !O[Lt])) {
|
42548
42552
|
for (var In = -1, Dt = 0; Dt < A.length; Dt++) {
|
42549
|
-
var
|
42550
|
-
|
42553
|
+
var he = Fe.indexOf(A[Dt]);
|
42554
|
+
he !== -1 && (In === -1 || he < In) && (In = he);
|
42551
42555
|
}
|
42552
42556
|
var Et, hn;
|
42553
42557
|
In === -1 ? hn = Fe.lastIndexOf("@") : hn = Fe.lastIndexOf("@", In), hn !== -1 && (Et = Fe.slice(0, hn), Fe = Fe.slice(hn + 1), this.auth = decodeURIComponent(Et)), In = -1;
|
42554
42558
|
for (var Dt = 0; Dt < b.length; Dt++) {
|
42555
|
-
var
|
42556
|
-
|
42559
|
+
var he = Fe.indexOf(b[Dt]);
|
42560
|
+
he !== -1 && (In === -1 || he < In) && (In = he);
|
42557
42561
|
}
|
42558
42562
|
In === -1 && (In = Fe.length), this.host = Fe.slice(0, In), Fe = Fe.slice(In), this.parseHost(), this.hostname = this.hostname || "";
|
42559
42563
|
var vn = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
42560
42564
|
if (!vn)
|
42561
42565
|
for (var kt = this.hostname.split(/\./), Dt = 0, Ce = kt.length; Dt < Ce; Dt++) {
|
42562
|
-
var
|
42563
|
-
if (
|
42564
|
-
for (var Ue = "", Ne = 0,
|
42565
|
-
|
42566
|
+
var de = kt[Dt];
|
42567
|
+
if (de && !de.match(S)) {
|
42568
|
+
for (var Ue = "", Ne = 0, Ve = de.length; Ne < Ve; Ne++)
|
42569
|
+
de.charCodeAt(Ne) > 127 ? Ue += "x" : Ue += de[Ne];
|
42566
42570
|
if (!Ue.match(S)) {
|
42567
|
-
var Pt = kt.slice(0, Dt), jt = kt.slice(Dt + 1), _n =
|
42571
|
+
var Pt = kt.slice(0, Dt), jt = kt.slice(Dt + 1), _n = de.match(T);
|
42568
42572
|
_n && (Pt.push(_n[1]), jt.unshift(_n[2])), jt.length && (Fe = "/" + jt.join(".") + Fe), this.hostname = Pt.join(".");
|
42569
42573
|
break;
|
42570
42574
|
}
|
@@ -42626,8 +42630,8 @@ var mqtt = { exports: {} };
|
|
42626
42630
|
return F.href = F.format(), F;
|
42627
42631
|
if (D.slashes && !D.protocol) {
|
42628
42632
|
for (var ze = Object.keys(D), Fe = 0; Fe < ze.length; Fe++) {
|
42629
|
-
var
|
42630
|
-
|
42633
|
+
var Oe = ze[Fe];
|
42634
|
+
Oe !== "protocol" && (F[Oe] = D[Oe]);
|
42631
42635
|
}
|
42632
42636
|
return O[F.protocol] && F.hostname && !F.pathname && (F.path = F.pathname = "/"), F.href = F.format(), F;
|
42633
42637
|
}
|
@@ -42651,13 +42655,13 @@ var mqtt = { exports: {} };
|
|
42651
42655
|
}
|
42652
42656
|
return F.slashes = F.slashes || D.slashes, F.href = F.format(), F;
|
42653
42657
|
}
|
42654
|
-
var
|
42655
|
-
if (
|
42658
|
+
var he = F.pathname && F.pathname.charAt(0) === "/", Et = D.host || D.pathname && D.pathname.charAt(0) === "/", hn = Et || he || F.host && D.pathname, vn = hn, kt = F.pathname && F.pathname.split("/") || [], Ce = D.pathname && D.pathname.split("/") || [], de = F.protocol && !O[F.protocol];
|
42659
|
+
if (de && (F.hostname = "", F.port = null, F.host && (kt[0] === "" ? kt[0] = F.host : kt.unshift(F.host)), F.host = "", D.protocol && (D.hostname = null, D.port = null, D.host && (Ce[0] === "" ? Ce[0] = D.host : Ce.unshift(D.host)), D.host = null), hn = hn && (Ce[0] === "" || kt[0] === "")), Et)
|
42656
42660
|
F.host = D.host || D.host === "" ? D.host : F.host, F.hostname = D.hostname || D.hostname === "" ? D.hostname : F.hostname, F.search = D.search, F.query = D.query, kt = Ce;
|
42657
42661
|
else if (Ce.length)
|
42658
42662
|
kt || (kt = []), kt.pop(), kt = kt.concat(Ce), F.search = D.search, F.query = D.query;
|
42659
42663
|
else if (!c.isNullOrUndefined(D.search)) {
|
42660
|
-
if (
|
42664
|
+
if (de) {
|
42661
42665
|
F.hostname = F.host = kt.shift();
|
42662
42666
|
var Ue = F.host && F.host.indexOf("@") > 0 ? F.host.split("@") : !1;
|
42663
42667
|
Ue && (F.auth = Ue.shift(), F.host = F.hostname = Ue.shift());
|
@@ -42666,14 +42670,14 @@ var mqtt = { exports: {} };
|
|
42666
42670
|
}
|
42667
42671
|
if (!kt.length)
|
42668
42672
|
return F.pathname = null, F.search ? F.path = "/" + F.search : F.path = null, F.href = F.format(), F;
|
42669
|
-
for (var Ne = kt.slice(-1)[0],
|
42673
|
+
for (var Ne = kt.slice(-1)[0], Ve = (F.host || D.host || kt.length > 1) && (Ne === "." || Ne === "..") || Ne === "", Pt = 0, jt = kt.length; jt >= 0; jt--)
|
42670
42674
|
Ne = kt[jt], Ne === "." ? kt.splice(jt, 1) : Ne === ".." ? (kt.splice(jt, 1), Pt++) : Pt && (kt.splice(jt, 1), Pt--);
|
42671
42675
|
if (!hn && !vn)
|
42672
42676
|
for (; Pt--; Pt)
|
42673
42677
|
kt.unshift("..");
|
42674
|
-
hn && kt[0] !== "" && (!kt[0] || kt[0].charAt(0) !== "/") && kt.unshift(""),
|
42678
|
+
hn && kt[0] !== "" && (!kt[0] || kt[0].charAt(0) !== "/") && kt.unshift(""), Ve && kt.join("/").substr(-1) !== "/" && kt.push("");
|
42675
42679
|
var _n = kt[0] === "" || kt[0] && kt[0].charAt(0) === "/";
|
42676
|
-
if (
|
42680
|
+
if (de) {
|
42677
42681
|
F.hostname = F.host = _n ? "" : kt.length ? kt.shift() : "";
|
42678
42682
|
var Ue = F.host && F.host.indexOf("@") > 0 ? F.host.split("@") : !1;
|
42679
42683
|
Ue && (F.auth = Ue.shift(), F.host = F.hostname = Ue.shift());
|