@nil-/xit 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/bundler.js +3 -3
- package/assets/index.js +173 -166
- package/package.json +1 -1
package/assets/index.js
CHANGED
|
@@ -134,43 +134,43 @@ var base64$1 = {};
|
|
|
134
134
|
for (var n = new Array(64), a = new Array(123), f = 0; f < 64; )
|
|
135
135
|
a[n[f] = f < 26 ? f + 65 : f < 52 ? f + 71 : f < 62 ? f - 4 : f - 59 | 43] = f++;
|
|
136
136
|
e.encode = function(s, o, r) {
|
|
137
|
-
for (var l = null, d = [], c = 0, h = 0,
|
|
137
|
+
for (var l = null, d = [], c = 0, h = 0, p; o < r; ) {
|
|
138
138
|
var m = s[o++];
|
|
139
139
|
switch (h) {
|
|
140
140
|
case 0:
|
|
141
|
-
d[c++] = n[m >> 2],
|
|
141
|
+
d[c++] = n[m >> 2], p = (m & 3) << 4, h = 1;
|
|
142
142
|
break;
|
|
143
143
|
case 1:
|
|
144
|
-
d[c++] = n[
|
|
144
|
+
d[c++] = n[p | m >> 4], p = (m & 15) << 2, h = 2;
|
|
145
145
|
break;
|
|
146
146
|
case 2:
|
|
147
|
-
d[c++] = n[
|
|
147
|
+
d[c++] = n[p | m >> 6], d[c++] = n[m & 63], h = 0;
|
|
148
148
|
break;
|
|
149
149
|
}
|
|
150
150
|
c > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, d)), c = 0);
|
|
151
151
|
}
|
|
152
|
-
return h && (d[c++] = n[
|
|
152
|
+
return h && (d[c++] = n[p], d[c++] = 61, h === 1 && (d[c++] = 61)), l ? (c && l.push(String.fromCharCode.apply(String, d.slice(0, c))), l.join("")) : String.fromCharCode.apply(String, d.slice(0, c));
|
|
153
153
|
};
|
|
154
154
|
var u = "invalid encoding";
|
|
155
155
|
e.decode = function(s, o, r) {
|
|
156
156
|
for (var l = r, d = 0, c, h = 0; h < s.length; ) {
|
|
157
|
-
var
|
|
158
|
-
if (
|
|
157
|
+
var p = s.charCodeAt(h++);
|
|
158
|
+
if (p === 61 && d > 1)
|
|
159
159
|
break;
|
|
160
|
-
if ((
|
|
160
|
+
if ((p = a[p]) === void 0)
|
|
161
161
|
throw Error(u);
|
|
162
162
|
switch (d) {
|
|
163
163
|
case 0:
|
|
164
|
-
c =
|
|
164
|
+
c = p, d = 1;
|
|
165
165
|
break;
|
|
166
166
|
case 1:
|
|
167
|
-
o[r++] = c << 2 | (
|
|
167
|
+
o[r++] = c << 2 | (p & 48) >> 4, c = p, d = 2;
|
|
168
168
|
break;
|
|
169
169
|
case 2:
|
|
170
|
-
o[r++] = (c & 15) << 4 | (
|
|
170
|
+
o[r++] = (c & 15) << 4 | (p & 60) >> 2, c = p, d = 3;
|
|
171
171
|
break;
|
|
172
172
|
case 3:
|
|
173
|
-
o[r++] = (c & 3) << 6 |
|
|
173
|
+
o[r++] = (c & 3) << 6 | p, d = 0;
|
|
174
174
|
break;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
@@ -988,7 +988,7 @@ function codegen(i, e) {
|
|
|
988
988
|
}
|
|
989
989
|
for (var d = new Array(arguments.length - 1), c = 0; c < d.length; )
|
|
990
990
|
d[c] = arguments[++c];
|
|
991
|
-
if (c = 0, u = u.replace(/%([%dfijs])/g, function(
|
|
991
|
+
if (c = 0, u = u.replace(/%([%dfijs])/g, function(p, m) {
|
|
992
992
|
var b = d[c++];
|
|
993
993
|
switch (m) {
|
|
994
994
|
case "d":
|
|
@@ -1297,8 +1297,8 @@ function requireField() {
|
|
|
1297
1297
|
}
|
|
1298
1298
|
return this.map ? this.defaultValue = a.emptyObject : this.repeated ? this.defaultValue = a.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof f && (this.parent.ctor.prototype[this.name] = this.defaultValue), i.prototype.resolve.call(this);
|
|
1299
1299
|
}, t.d = function(o, r, l, d) {
|
|
1300
|
-
return typeof r == "function" ? r = a.decorateType(r).name : r && typeof r == "object" && (r = a.decorateEnum(r).name), function(h,
|
|
1301
|
-
a.decorateType(h.constructor).add(new t(
|
|
1300
|
+
return typeof r == "function" ? r = a.decorateType(r).name : r && typeof r == "object" && (r = a.decorateEnum(r).name), function(h, p) {
|
|
1301
|
+
a.decorateType(h.constructor).add(new t(p, o, r, l, { default: d }));
|
|
1302
1302
|
};
|
|
1303
1303
|
}, t._configure = function(o) {
|
|
1304
1304
|
f = o;
|
|
@@ -1419,10 +1419,10 @@ function requireNamespace() {
|
|
|
1419
1419
|
}, o.prototype.addJSON = function(d) {
|
|
1420
1420
|
var c = this;
|
|
1421
1421
|
if (d)
|
|
1422
|
-
for (var h = Object.keys(d),
|
|
1423
|
-
m = d[h[
|
|
1422
|
+
for (var h = Object.keys(d), p = 0, m; p < h.length; ++p)
|
|
1423
|
+
m = d[h[p]], c.add(
|
|
1424
1424
|
// most to least likely
|
|
1425
|
-
(m.fields !== void 0 ? f.fromJSON : m.values !== void 0 ? t.fromJSON : m.methods !== void 0 ? u.fromJSON : m.id !== void 0 ? e.fromJSON : o.fromJSON)(h[
|
|
1425
|
+
(m.fields !== void 0 ? f.fromJSON : m.values !== void 0 ? t.fromJSON : m.methods !== void 0 ? u.fromJSON : m.id !== void 0 ? e.fromJSON : o.fromJSON)(h[p], m)
|
|
1426
1426
|
);
|
|
1427
1427
|
return this;
|
|
1428
1428
|
}, o.prototype.get = function(d) {
|
|
@@ -1440,8 +1440,8 @@ function requireNamespace() {
|
|
|
1440
1440
|
var c = this.get(d.name);
|
|
1441
1441
|
if (c)
|
|
1442
1442
|
if (c instanceof o && d instanceof o && !(c instanceof f || c instanceof u)) {
|
|
1443
|
-
for (var h = c.nestedArray,
|
|
1444
|
-
d.add(h[
|
|
1443
|
+
for (var h = c.nestedArray, p = 0; p < h.length; ++p)
|
|
1444
|
+
d.add(h[p]);
|
|
1445
1445
|
this.remove(c), this.nested || (this.nested = {}), d.setOptions(c.options, !0);
|
|
1446
1446
|
} else
|
|
1447
1447
|
throw Error("duplicate name '" + d.name + "' in " + this);
|
|
@@ -1461,12 +1461,12 @@ function requireNamespace() {
|
|
|
1461
1461
|
if (d && d.length && d[0] === "")
|
|
1462
1462
|
throw Error("path must be relative");
|
|
1463
1463
|
for (var h = this; d.length > 0; ) {
|
|
1464
|
-
var
|
|
1465
|
-
if (h.nested && h.nested[
|
|
1466
|
-
if (h = h.nested[
|
|
1464
|
+
var p = d.shift();
|
|
1465
|
+
if (h.nested && h.nested[p]) {
|
|
1466
|
+
if (h = h.nested[p], !(h instanceof o))
|
|
1467
1467
|
throw Error("path conflicts with non-namespace objects");
|
|
1468
1468
|
} else
|
|
1469
|
-
h.add(h = new o(
|
|
1469
|
+
h.add(h = new o(p));
|
|
1470
1470
|
}
|
|
1471
1471
|
return c && h.addJSON(c), h;
|
|
1472
1472
|
}, o.prototype.resolveAll = function() {
|
|
@@ -1482,17 +1482,17 @@ function requireNamespace() {
|
|
|
1482
1482
|
return this;
|
|
1483
1483
|
if (d[0] === "")
|
|
1484
1484
|
return this.root.lookup(d.slice(1), c);
|
|
1485
|
-
var
|
|
1486
|
-
if (
|
|
1485
|
+
var p = this.get(d[0]);
|
|
1486
|
+
if (p) {
|
|
1487
1487
|
if (d.length === 1) {
|
|
1488
|
-
if (!c || c.indexOf(
|
|
1489
|
-
return
|
|
1490
|
-
} else if (
|
|
1491
|
-
return
|
|
1488
|
+
if (!c || c.indexOf(p.constructor) > -1)
|
|
1489
|
+
return p;
|
|
1490
|
+
} else if (p instanceof o && (p = p.lookup(d.slice(1), c, !0)))
|
|
1491
|
+
return p;
|
|
1492
1492
|
} else
|
|
1493
1493
|
for (var m = 0; m < this.nestedArray.length; ++m)
|
|
1494
|
-
if (this._nestedArray[m] instanceof o && (
|
|
1495
|
-
return
|
|
1494
|
+
if (this._nestedArray[m] instanceof o && (p = this._nestedArray[m].lookup(d, c, !0)))
|
|
1495
|
+
return p;
|
|
1496
1496
|
return this.parent === null || h ? null : this.parent.lookup(d, c);
|
|
1497
1497
|
}, o.prototype.lookupType = function(d) {
|
|
1498
1498
|
var c = this.lookup(d, [f]);
|
|
@@ -1836,7 +1836,7 @@ function requireConverter() {
|
|
|
1836
1836
|
t("}");
|
|
1837
1837
|
} else t('if(typeof d%s!=="object")', r)("throw TypeError(%j)", s.fullName + ": object expected")("m%s=types[%i].fromObject(d%s)", r, o, r);
|
|
1838
1838
|
else {
|
|
1839
|
-
var
|
|
1839
|
+
var p = !1;
|
|
1840
1840
|
switch (s.type) {
|
|
1841
1841
|
case "double":
|
|
1842
1842
|
case "float":
|
|
@@ -1852,12 +1852,12 @@ function requireConverter() {
|
|
|
1852
1852
|
t("m%s=d%s|0", r, r);
|
|
1853
1853
|
break;
|
|
1854
1854
|
case "uint64":
|
|
1855
|
-
|
|
1855
|
+
p = !0;
|
|
1856
1856
|
case "int64":
|
|
1857
1857
|
case "sint64":
|
|
1858
1858
|
case "fixed64":
|
|
1859
1859
|
case "sfixed64":
|
|
1860
|
-
t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j", r, r,
|
|
1860
|
+
t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j", r, r, p)('else if(typeof d%s==="string")', r)("m%s=parseInt(d%s,10)", r, r)('else if(typeof d%s==="number")', r)("m%s=d%s", r, r)('else if(typeof d%s==="object")', r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", r, r, r, p ? "true" : "");
|
|
1861
1861
|
break;
|
|
1862
1862
|
case "bytes":
|
|
1863
1863
|
t('if(typeof d%s==="string")', r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", r, r, r)("else if(d%s.length >= 0)", r)("m%s=d%s", r, r);
|
|
@@ -1944,38 +1944,38 @@ function requireConverter() {
|
|
|
1944
1944
|
}
|
|
1945
1945
|
if (c.length) {
|
|
1946
1946
|
for (r("if(o.defaults){"), h = 0; h < c.length; ++h) {
|
|
1947
|
-
var
|
|
1948
|
-
if (
|
|
1949
|
-
else if (
|
|
1950
|
-
else if (
|
|
1951
|
-
var b = "[" + Array.prototype.slice.call(
|
|
1952
|
-
r("if(o.bytes===String)d%s=%j", m, String.fromCharCode.apply(String,
|
|
1953
|
-
} else r("d%s=%j", m,
|
|
1947
|
+
var p = c[h], m = a.safeProp(p.name);
|
|
1948
|
+
if (p.resolvedType instanceof n) r("d%s=o.enums===String?%j:%j", m, p.resolvedType.valuesById[p.typeDefault], p.typeDefault);
|
|
1949
|
+
else if (p.long) r("if(util.Long){")("var n=new util.Long(%i,%i,%j)", p.typeDefault.low, p.typeDefault.high, p.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", m)("}else")("d%s=o.longs===String?%j:%i", m, p.typeDefault.toString(), p.typeDefault.toNumber());
|
|
1950
|
+
else if (p.bytes) {
|
|
1951
|
+
var b = "[" + Array.prototype.slice.call(p.typeDefault).join(",") + "]";
|
|
1952
|
+
r("if(o.bytes===String)d%s=%j", m, String.fromCharCode.apply(String, p.typeDefault))("else{")("d%s=%s", m, b)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", m, m)("}");
|
|
1953
|
+
} else r("d%s=%j", m, p.typeDefault);
|
|
1954
1954
|
}
|
|
1955
1955
|
r("}");
|
|
1956
1956
|
}
|
|
1957
1957
|
var v = !1;
|
|
1958
1958
|
for (h = 0; h < o.length; ++h) {
|
|
1959
|
-
var
|
|
1960
|
-
|
|
1959
|
+
var p = o[h], y = s._fieldsArray.indexOf(p), m = a.safeProp(p.name);
|
|
1960
|
+
p.map ? (v || (v = !0, r("var ks2")), r("if(m%s&&(ks2=Object.keys(m%s)).length){", m, m)("d%s={}", m)("for(var j=0;j<ks2.length;++j){"), u(
|
|
1961
1961
|
r,
|
|
1962
|
-
y,
|
|
1963
|
-
/* sorted */
|
|
1964
1962
|
p,
|
|
1963
|
+
/* sorted */
|
|
1964
|
+
y,
|
|
1965
1965
|
m + "[ks2[j]]"
|
|
1966
|
-
)("}")) :
|
|
1966
|
+
)("}")) : p.repeated ? (r("if(m%s&&m%s.length){", m, m)("d%s=[]", m)("for(var j=0;j<m%s.length;++j){", m), u(
|
|
1967
1967
|
r,
|
|
1968
|
-
y,
|
|
1969
|
-
/* sorted */
|
|
1970
1968
|
p,
|
|
1969
|
+
/* sorted */
|
|
1970
|
+
y,
|
|
1971
1971
|
m + "[j]"
|
|
1972
|
-
)("}")) : (r("if(m%s!=null&&m.hasOwnProperty(%j)){", m,
|
|
1972
|
+
)("}")) : (r("if(m%s!=null&&m.hasOwnProperty(%j)){", m, p.name), u(
|
|
1973
1973
|
r,
|
|
1974
|
-
y,
|
|
1975
|
-
/* sorted */
|
|
1976
1974
|
p,
|
|
1975
|
+
/* sorted */
|
|
1976
|
+
y,
|
|
1977
1977
|
m
|
|
1978
|
-
),
|
|
1978
|
+
), p.partOf && r("if(o.oneofs)")("d%s=%j", a.safeProp(p.partOf.name), p.name)), r("}");
|
|
1979
1979
|
}
|
|
1980
1980
|
return r("return d");
|
|
1981
1981
|
};
|
|
@@ -2019,9 +2019,9 @@ function requireType() {
|
|
|
2019
2019
|
hasRequiredType = 1, type = m;
|
|
2020
2020
|
var i = requireNamespace();
|
|
2021
2021
|
((m.prototype = Object.create(i.prototype)).constructor = m).className = "Type";
|
|
2022
|
-
var e = require_enum(), n = requireOneof(), a = requireField(), f = requireMapfield(), u = requireService(), t = message, s = reader, o = writer, r = requireUtil(), l = requireEncoder(), d = requireDecoder(), c = requireVerifier(), h = requireConverter(),
|
|
2023
|
-
function m(v,
|
|
2024
|
-
i.call(this, v,
|
|
2022
|
+
var e = require_enum(), n = requireOneof(), a = requireField(), f = requireMapfield(), u = requireService(), t = message, s = reader, o = writer, r = requireUtil(), l = requireEncoder(), d = requireDecoder(), c = requireVerifier(), h = requireConverter(), p = wrappers;
|
|
2023
|
+
function m(v, y) {
|
|
2024
|
+
i.call(this, v, y), this.fields = {}, this.oneofs = void 0, this.extensions = void 0, this.reserved = void 0, this.group = void 0, this._fieldsById = null, this._fieldsArray = null, this._oneofsArray = null, this._ctor = null;
|
|
2025
2025
|
}
|
|
2026
2026
|
Object.defineProperties(m.prototype, {
|
|
2027
2027
|
/**
|
|
@@ -2035,8 +2035,8 @@ function requireType() {
|
|
|
2035
2035
|
if (this._fieldsById)
|
|
2036
2036
|
return this._fieldsById;
|
|
2037
2037
|
this._fieldsById = {};
|
|
2038
|
-
for (var v = Object.keys(this.fields),
|
|
2039
|
-
var g = this.fields[v[
|
|
2038
|
+
for (var v = Object.keys(this.fields), y = 0; y < v.length; ++y) {
|
|
2039
|
+
var g = this.fields[v[y]], _ = g.id;
|
|
2040
2040
|
if (this._fieldsById[_])
|
|
2041
2041
|
throw Error("duplicate id " + _ + " in " + this);
|
|
2042
2042
|
this._fieldsById[_] = g;
|
|
@@ -2077,8 +2077,8 @@ function requireType() {
|
|
|
2077
2077
|
return this._ctor || (this.ctor = m.generateConstructor(this)());
|
|
2078
2078
|
},
|
|
2079
2079
|
set: function(v) {
|
|
2080
|
-
var
|
|
2081
|
-
|
|
2080
|
+
var y = v.prototype;
|
|
2081
|
+
y instanceof t || ((v.prototype = new t()).constructor = v, r.merge(v.prototype, y)), v.$type = v.prototype.$type = this, r.merge(v, t, !0), this._ctor = v;
|
|
2082
2082
|
for (var g = 0; g < /* initializes */
|
|
2083
2083
|
this.fieldsArray.length; ++g)
|
|
2084
2084
|
this._fieldsArray[g].resolve();
|
|
@@ -2092,16 +2092,16 @@ function requireType() {
|
|
|
2092
2092
|
g && Object.defineProperties(v.prototype, _);
|
|
2093
2093
|
}
|
|
2094
2094
|
}
|
|
2095
|
-
}), m.generateConstructor = function(
|
|
2096
|
-
for (var g = r.codegen(["p"],
|
|
2097
|
-
(R =
|
|
2095
|
+
}), m.generateConstructor = function(y) {
|
|
2096
|
+
for (var g = r.codegen(["p"], y.name), _ = 0, R; _ < y.fieldsArray.length; ++_)
|
|
2097
|
+
(R = y._fieldsArray[_]).map ? g("this%s={}", r.safeProp(R.name)) : R.repeated && g("this%s=[]", r.safeProp(R.name));
|
|
2098
2098
|
return g("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]");
|
|
2099
2099
|
};
|
|
2100
2100
|
function b(v) {
|
|
2101
2101
|
return v._fieldsById = v._fieldsArray = v._oneofsArray = null, delete v.encode, delete v.decode, delete v.verify, v;
|
|
2102
2102
|
}
|
|
2103
|
-
return m.fromJSON = function(
|
|
2104
|
-
var _ = new m(
|
|
2103
|
+
return m.fromJSON = function(y, g) {
|
|
2104
|
+
var _ = new m(y, g.options);
|
|
2105
2105
|
_.extensions = g.extensions, _.reserved = g.reserved;
|
|
2106
2106
|
for (var R = Object.keys(g.fields), O = 0; O < R.length; ++O)
|
|
2107
2107
|
_.add(
|
|
@@ -2119,17 +2119,17 @@ function requireType() {
|
|
|
2119
2119
|
);
|
|
2120
2120
|
}
|
|
2121
2121
|
return g.extensions && g.extensions.length && (_.extensions = g.extensions), g.reserved && g.reserved.length && (_.reserved = g.reserved), g.group && (_.group = !0), g.comment && (_.comment = g.comment), _;
|
|
2122
|
-
}, m.prototype.toJSON = function(
|
|
2123
|
-
var g = i.prototype.toJSON.call(this,
|
|
2122
|
+
}, m.prototype.toJSON = function(y) {
|
|
2123
|
+
var g = i.prototype.toJSON.call(this, y), _ = y ? !!y.keepComments : !1;
|
|
2124
2124
|
return r.toObject([
|
|
2125
2125
|
"options",
|
|
2126
2126
|
g && g.options || void 0,
|
|
2127
2127
|
"oneofs",
|
|
2128
|
-
i.arrayToJSON(this.oneofsArray,
|
|
2128
|
+
i.arrayToJSON(this.oneofsArray, y),
|
|
2129
2129
|
"fields",
|
|
2130
2130
|
i.arrayToJSON(this.fieldsArray.filter(function(R) {
|
|
2131
2131
|
return !R.declaringField;
|
|
2132
|
-
}),
|
|
2132
|
+
}), y) || {},
|
|
2133
2133
|
"extensions",
|
|
2134
2134
|
this.extensions && this.extensions.length ? this.extensions : void 0,
|
|
2135
2135
|
"reserved",
|
|
@@ -2142,50 +2142,50 @@ function requireType() {
|
|
|
2142
2142
|
_ ? this.comment : void 0
|
|
2143
2143
|
]);
|
|
2144
2144
|
}, m.prototype.resolveAll = function() {
|
|
2145
|
-
for (var
|
|
2146
|
-
|
|
2145
|
+
for (var y = this.fieldsArray, g = 0; g < y.length; )
|
|
2146
|
+
y[g++].resolve();
|
|
2147
2147
|
var _ = this.oneofsArray;
|
|
2148
2148
|
for (g = 0; g < _.length; )
|
|
2149
2149
|
_[g++].resolve();
|
|
2150
2150
|
return i.prototype.resolveAll.call(this);
|
|
2151
|
-
}, m.prototype.get = function(
|
|
2152
|
-
return this.fields[
|
|
2153
|
-
}, m.prototype.add = function(
|
|
2154
|
-
if (this.get(
|
|
2155
|
-
throw Error("duplicate name '" +
|
|
2156
|
-
if (
|
|
2151
|
+
}, m.prototype.get = function(y) {
|
|
2152
|
+
return this.fields[y] || this.oneofs && this.oneofs[y] || this.nested && this.nested[y] || null;
|
|
2153
|
+
}, m.prototype.add = function(y) {
|
|
2154
|
+
if (this.get(y.name))
|
|
2155
|
+
throw Error("duplicate name '" + y.name + "' in " + this);
|
|
2156
|
+
if (y instanceof a && y.extend === void 0) {
|
|
2157
2157
|
if (this._fieldsById ? (
|
|
2158
2158
|
/* istanbul ignore next */
|
|
2159
|
-
this._fieldsById[
|
|
2160
|
-
) : this.fieldsById[
|
|
2161
|
-
throw Error("duplicate id " +
|
|
2162
|
-
if (this.isReservedId(
|
|
2163
|
-
throw Error("id " +
|
|
2164
|
-
if (this.isReservedName(
|
|
2165
|
-
throw Error("name '" +
|
|
2166
|
-
return
|
|
2167
|
-
}
|
|
2168
|
-
return
|
|
2169
|
-
}, m.prototype.remove = function(
|
|
2170
|
-
if (
|
|
2171
|
-
if (!this.fields || this.fields[
|
|
2172
|
-
throw Error(
|
|
2173
|
-
return delete this.fields[
|
|
2174
|
-
}
|
|
2175
|
-
if (
|
|
2176
|
-
if (!this.oneofs || this.oneofs[
|
|
2177
|
-
throw Error(
|
|
2178
|
-
return delete this.oneofs[
|
|
2179
|
-
}
|
|
2180
|
-
return i.prototype.remove.call(this,
|
|
2181
|
-
}, m.prototype.isReservedId = function(
|
|
2182
|
-
return i.isReservedId(this.reserved,
|
|
2183
|
-
}, m.prototype.isReservedName = function(
|
|
2184
|
-
return i.isReservedName(this.reserved,
|
|
2185
|
-
}, m.prototype.create = function(
|
|
2186
|
-
return new this.ctor(
|
|
2159
|
+
this._fieldsById[y.id]
|
|
2160
|
+
) : this.fieldsById[y.id])
|
|
2161
|
+
throw Error("duplicate id " + y.id + " in " + this);
|
|
2162
|
+
if (this.isReservedId(y.id))
|
|
2163
|
+
throw Error("id " + y.id + " is reserved in " + this);
|
|
2164
|
+
if (this.isReservedName(y.name))
|
|
2165
|
+
throw Error("name '" + y.name + "' is reserved in " + this);
|
|
2166
|
+
return y.parent && y.parent.remove(y), this.fields[y.name] = y, y.message = this, y.onAdd(this), b(this);
|
|
2167
|
+
}
|
|
2168
|
+
return y instanceof n ? (this.oneofs || (this.oneofs = {}), this.oneofs[y.name] = y, y.onAdd(this), b(this)) : i.prototype.add.call(this, y);
|
|
2169
|
+
}, m.prototype.remove = function(y) {
|
|
2170
|
+
if (y instanceof a && y.extend === void 0) {
|
|
2171
|
+
if (!this.fields || this.fields[y.name] !== y)
|
|
2172
|
+
throw Error(y + " is not a member of " + this);
|
|
2173
|
+
return delete this.fields[y.name], y.parent = null, y.onRemove(this), b(this);
|
|
2174
|
+
}
|
|
2175
|
+
if (y instanceof n) {
|
|
2176
|
+
if (!this.oneofs || this.oneofs[y.name] !== y)
|
|
2177
|
+
throw Error(y + " is not a member of " + this);
|
|
2178
|
+
return delete this.oneofs[y.name], y.parent = null, y.onRemove(this), b(this);
|
|
2179
|
+
}
|
|
2180
|
+
return i.prototype.remove.call(this, y);
|
|
2181
|
+
}, m.prototype.isReservedId = function(y) {
|
|
2182
|
+
return i.isReservedId(this.reserved, y);
|
|
2183
|
+
}, m.prototype.isReservedName = function(y) {
|
|
2184
|
+
return i.isReservedName(this.reserved, y);
|
|
2185
|
+
}, m.prototype.create = function(y) {
|
|
2186
|
+
return new this.ctor(y);
|
|
2187
2187
|
}, m.prototype.setup = function() {
|
|
2188
|
-
for (var
|
|
2188
|
+
for (var y = this.fullName, g = [], _ = 0; _ < /* initializes */
|
|
2189
2189
|
this.fieldsArray.length; ++_)
|
|
2190
2190
|
g.push(this._fieldsArray[_].resolve().resolvedType);
|
|
2191
2191
|
this.encode = l(this)({
|
|
@@ -2206,29 +2206,29 @@ function requireType() {
|
|
|
2206
2206
|
types: g,
|
|
2207
2207
|
util: r
|
|
2208
2208
|
});
|
|
2209
|
-
var R = y
|
|
2209
|
+
var R = p[y];
|
|
2210
2210
|
if (R) {
|
|
2211
2211
|
var O = Object.create(this);
|
|
2212
2212
|
O.fromObject = this.fromObject, this.fromObject = R.fromObject.bind(O), O.toObject = this.toObject, this.toObject = R.toObject.bind(O);
|
|
2213
2213
|
}
|
|
2214
2214
|
return this;
|
|
2215
|
-
}, m.prototype.encode = function(
|
|
2216
|
-
return this.setup().encode(
|
|
2217
|
-
}, m.prototype.encodeDelimited = function(
|
|
2218
|
-
return this.encode(
|
|
2219
|
-
}, m.prototype.decode = function(
|
|
2220
|
-
return this.setup().decode(
|
|
2221
|
-
}, m.prototype.decodeDelimited = function(
|
|
2222
|
-
return
|
|
2223
|
-
}, m.prototype.verify = function(
|
|
2224
|
-
return this.setup().verify(
|
|
2225
|
-
}, m.prototype.fromObject = function(
|
|
2226
|
-
return this.setup().fromObject(
|
|
2227
|
-
}, m.prototype.toObject = function(
|
|
2228
|
-
return this.setup().toObject(
|
|
2229
|
-
}, m.d = function(
|
|
2215
|
+
}, m.prototype.encode = function(y, g) {
|
|
2216
|
+
return this.setup().encode(y, g);
|
|
2217
|
+
}, m.prototype.encodeDelimited = function(y, g) {
|
|
2218
|
+
return this.encode(y, g && g.len ? g.fork() : g).ldelim();
|
|
2219
|
+
}, m.prototype.decode = function(y, g) {
|
|
2220
|
+
return this.setup().decode(y, g);
|
|
2221
|
+
}, m.prototype.decodeDelimited = function(y) {
|
|
2222
|
+
return y instanceof s || (y = s.create(y)), this.decode(y, y.uint32());
|
|
2223
|
+
}, m.prototype.verify = function(y) {
|
|
2224
|
+
return this.setup().verify(y);
|
|
2225
|
+
}, m.prototype.fromObject = function(y) {
|
|
2226
|
+
return this.setup().fromObject(y);
|
|
2227
|
+
}, m.prototype.toObject = function(y, g) {
|
|
2228
|
+
return this.setup().toObject(y, g);
|
|
2229
|
+
}, m.d = function(y) {
|
|
2230
2230
|
return function(_) {
|
|
2231
|
-
r.decorateType(_,
|
|
2231
|
+
r.decorateType(_, y);
|
|
2232
2232
|
};
|
|
2233
2233
|
}, type;
|
|
2234
2234
|
}
|
|
@@ -2242,18 +2242,18 @@ function requireRoot() {
|
|
|
2242
2242
|
function o(c) {
|
|
2243
2243
|
i.call(this, "", c), this.deferred = [], this.files = [];
|
|
2244
2244
|
}
|
|
2245
|
-
o.fromJSON = function(h,
|
|
2246
|
-
return
|
|
2245
|
+
o.fromJSON = function(h, p) {
|
|
2246
|
+
return p || (p = new o()), h.options && p.setOptions(h.options), p.addJSON(h.nested);
|
|
2247
2247
|
}, o.prototype.resolvePath = f.path.resolve, o.prototype.fetch = f.fetch;
|
|
2248
2248
|
function r() {
|
|
2249
2249
|
}
|
|
2250
|
-
o.prototype.load = function c(h,
|
|
2251
|
-
typeof
|
|
2250
|
+
o.prototype.load = function c(h, p, m) {
|
|
2251
|
+
typeof p == "function" && (m = p, p = void 0);
|
|
2252
2252
|
var b = this;
|
|
2253
2253
|
if (!m)
|
|
2254
|
-
return f.asPromise(c, b, h,
|
|
2254
|
+
return f.asPromise(c, b, h, p);
|
|
2255
2255
|
var v = m === r;
|
|
2256
|
-
function
|
|
2256
|
+
function y(q, A) {
|
|
2257
2257
|
if (m) {
|
|
2258
2258
|
if (v)
|
|
2259
2259
|
throw q;
|
|
@@ -2275,7 +2275,7 @@ function requireRoot() {
|
|
|
2275
2275
|
b.setOptions(A.options).addJSON(A.nested);
|
|
2276
2276
|
else {
|
|
2277
2277
|
t.filename = q;
|
|
2278
|
-
var k = t(A, b,
|
|
2278
|
+
var k = t(A, b, p), B, x = 0;
|
|
2279
2279
|
if (k.imports)
|
|
2280
2280
|
for (; x < k.imports.length; ++x)
|
|
2281
2281
|
(B = g(k.imports[x]) || b.resolvePath(q, k.imports[x])) && R(B);
|
|
@@ -2284,9 +2284,9 @@ function requireRoot() {
|
|
|
2284
2284
|
(B = g(k.weakImports[x]) || b.resolvePath(q, k.weakImports[x])) && R(B, !0);
|
|
2285
2285
|
}
|
|
2286
2286
|
} catch (V) {
|
|
2287
|
-
|
|
2287
|
+
y(V);
|
|
2288
2288
|
}
|
|
2289
|
-
!v && !O &&
|
|
2289
|
+
!v && !O && y(null, b);
|
|
2290
2290
|
}
|
|
2291
2291
|
function R(q, A) {
|
|
2292
2292
|
if (q = g(q) || q, !(b.files.indexOf(q) > -1)) {
|
|
@@ -2301,7 +2301,7 @@ function requireRoot() {
|
|
|
2301
2301
|
try {
|
|
2302
2302
|
k = f.fs.readFileSync(q).toString("utf8");
|
|
2303
2303
|
} catch (B) {
|
|
2304
|
-
A ||
|
|
2304
|
+
A || y(B);
|
|
2305
2305
|
return;
|
|
2306
2306
|
}
|
|
2307
2307
|
_(q, k);
|
|
@@ -2309,7 +2309,7 @@ function requireRoot() {
|
|
|
2309
2309
|
++O, b.fetch(q, function(B, x) {
|
|
2310
2310
|
if (--O, !!m) {
|
|
2311
2311
|
if (B) {
|
|
2312
|
-
A ? O ||
|
|
2312
|
+
A ? O || y(null, b) : y(B);
|
|
2313
2313
|
return;
|
|
2314
2314
|
}
|
|
2315
2315
|
_(q, x);
|
|
@@ -2323,11 +2323,11 @@ function requireRoot() {
|
|
|
2323
2323
|
(J = b.resolvePath("", h[T])) && R(J);
|
|
2324
2324
|
if (v)
|
|
2325
2325
|
return b;
|
|
2326
|
-
O ||
|
|
2327
|
-
}, o.prototype.loadSync = function(h,
|
|
2326
|
+
O || y(null, b);
|
|
2327
|
+
}, o.prototype.loadSync = function(h, p) {
|
|
2328
2328
|
if (!f.isNode)
|
|
2329
2329
|
throw Error("not supported");
|
|
2330
|
-
return this.load(h,
|
|
2330
|
+
return this.load(h, p, r);
|
|
2331
2331
|
}, o.prototype.resolveAll = function() {
|
|
2332
2332
|
if (this.deferred.length)
|
|
2333
2333
|
throw Error("unresolvable extensions: " + this.deferred.map(function(h) {
|
|
@@ -2337,10 +2337,10 @@ function requireRoot() {
|
|
|
2337
2337
|
};
|
|
2338
2338
|
var l = /^[A-Z]/;
|
|
2339
2339
|
function d(c, h) {
|
|
2340
|
-
var
|
|
2341
|
-
if (
|
|
2340
|
+
var p = h.parent.lookup(h.extend);
|
|
2341
|
+
if (p) {
|
|
2342
2342
|
var m = new e(h.fullName, h.id, h.type, h.rule, void 0, h.options);
|
|
2343
|
-
return
|
|
2343
|
+
return p.get(m.name) || (m.declaringField = h, h.extensionField = m, p.add(m)), !0;
|
|
2344
2344
|
}
|
|
2345
2345
|
return !1;
|
|
2346
2346
|
}
|
|
@@ -2353,8 +2353,8 @@ function requireRoot() {
|
|
|
2353
2353
|
l.test(h.name) && (h.parent[h.name] = h.values);
|
|
2354
2354
|
else if (!(h instanceof a)) {
|
|
2355
2355
|
if (h instanceof u)
|
|
2356
|
-
for (var
|
|
2357
|
-
d(this, this.deferred[
|
|
2356
|
+
for (var p = 0; p < this.deferred.length; )
|
|
2357
|
+
d(this, this.deferred[p]) ? this.deferred.splice(p, 1) : ++p;
|
|
2358
2358
|
for (var m = 0; m < /* initializes */
|
|
2359
2359
|
h.nestedArray.length; ++m)
|
|
2360
2360
|
this._handleAdd(h._nestedArray[m]);
|
|
@@ -2372,8 +2372,8 @@ function requireRoot() {
|
|
|
2372
2372
|
)
|
|
2373
2373
|
h.extensionField.parent.remove(h.extensionField), h.extensionField = null;
|
|
2374
2374
|
else {
|
|
2375
|
-
var
|
|
2376
|
-
|
|
2375
|
+
var p = this.deferred.indexOf(h);
|
|
2376
|
+
p > -1 && this.deferred.splice(p, 1);
|
|
2377
2377
|
}
|
|
2378
2378
|
} else if (h instanceof n)
|
|
2379
2379
|
l.test(h.name) && delete h.parent[h.name];
|
|
@@ -2383,8 +2383,8 @@ function requireRoot() {
|
|
|
2383
2383
|
this._handleRemove(h._nestedArray[m]);
|
|
2384
2384
|
l.test(h.name) && delete h.parent[h.name];
|
|
2385
2385
|
}
|
|
2386
|
-
}, o._configure = function(c, h,
|
|
2387
|
-
u = c, t = h, s =
|
|
2386
|
+
}, o._configure = function(c, h, p) {
|
|
2387
|
+
u = c, t = h, s = p;
|
|
2388
2388
|
}, root;
|
|
2389
2389
|
}
|
|
2390
2390
|
var hasRequiredUtil;
|
|
@@ -2436,12 +2436,12 @@ function requireUtil() {
|
|
|
2436
2436
|
var l = new a("Enum" + s++, r);
|
|
2437
2437
|
return i.decorateRoot.add(l), Object.defineProperty(r, "$type", { value: l, enumerable: !1 }), l;
|
|
2438
2438
|
}, i.setProperty = function(r, l, d) {
|
|
2439
|
-
function c(h,
|
|
2440
|
-
var b =
|
|
2439
|
+
function c(h, p, m) {
|
|
2440
|
+
var b = p.shift();
|
|
2441
2441
|
if (b === "__proto__" || b === "prototype")
|
|
2442
2442
|
return h;
|
|
2443
|
-
if (
|
|
2444
|
-
h[b] = c(h[b] || {},
|
|
2443
|
+
if (p.length > 0)
|
|
2444
|
+
h[b] = c(h[b] || {}, p, m);
|
|
2445
2445
|
else {
|
|
2446
2446
|
var v = h[b];
|
|
2447
2447
|
v && (m = [].concat(v).concat(m)), h[b] = m;
|
|
@@ -2661,7 +2661,7 @@ protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);
|
|
|
2661
2661
|
protobuf.Root._configure(protobuf.Type);
|
|
2662
2662
|
protobuf.Field._configure(protobuf.Type);
|
|
2663
2663
|
var indexLightExports = indexLight.exports, light = indexLightExports;
|
|
2664
|
-
const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data = { options: { syntax: "proto3", optimize_for: "LITE_RUNTIME" }, nested: { nil: { nested: { xit: { nested: { proto: { nested: { MessageType: { values: { MessageType_FrameRequest: 0, MessageType_FrameResponse: 1, MessageType_FrameCache: 2,
|
|
2664
|
+
const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data = { options: { syntax: "proto3", optimize_for: "LITE_RUNTIME" }, nested: { nil: { nested: { xit: { nested: { proto: { nested: { MessageType: { values: { MessageType_FrameRequest: 0, MessageType_FrameResponse: 1, MessageType_FrameCache: 2, MessageType_FrameLoaded: 3, MessageType_ValueRequest: 4, MessageType_ValueResponse: 5, MessageType_ValueUpdate: 6, MessageType_SignalRequest: 7, MessageType_SignalResponse: 8, MessageType_SignalNotify: 9, MessageType_FileRequest: 10, MessageType_FileResponse: 11 } }, FrameRequest: { fields: { id: { type: "string", id: 1 } } }, FrameResponse: { oneofs: { value: { oneof: ["file", "content"] } }, fields: { id: { type: "string", id: 1 }, file: { type: "string", id: 2 }, content: { type: "string", id: 3 } } }, FrameCache: { fields: { id: { type: "string", id: 1 }, content: { type: "string", id: 2 }, files: { rule: "repeated", type: "FileInfo", id: 3 } } }, FrameLoaded: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, Value: { oneofs: { value: { oneof: ["value_boolean", "value_number", "value_double", "value_string", "value_buffer"] } }, fields: { id: { type: "string", id: 1 }, value_boolean: { type: "bool", id: 2 }, value_number: { type: "int64", id: 3 }, value_double: { type: "double", id: 4 }, value_string: { type: "string", id: 5 }, value_buffer: { type: "bytes", id: 6 } } }, ValueRequest: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, ValueResponse: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, values: { rule: "repeated", type: "Value", id: 3 } } }, ValueUpdate: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, value: { type: "Value", id: 3 } } }, SignalRequest: { fields: { id: { type: "string", id: 1 } } }, Signal: { oneofs: { _type: { oneof: ["type"] } }, fields: { id: { type: "string", id: 1 }, type: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, SignalResponse: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, signals: { rule: "repeated", type: "Signal", id: 3 } } }, SignalNotify: { oneofs: { _tag: { oneof: ["tag"] }, arg: { oneof: ["arg_boolean", "arg_number", "arg_double", "arg_string", "arg_buffer"] } }, fields: { frame_id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, signal_id: { type: "string", id: 3 }, arg_boolean: { type: "bool", id: 4 }, arg_number: { type: "int64", id: 5 }, arg_double: { type: "double", id: 6 }, arg_string: { type: "string", id: 7 }, arg_buffer: { type: "bytes", id: 8 } } }, FileRequest: { fields: { target: { type: "string", id: 1 } } }, FileResponse: { fields: { target: { type: "string", id: 1 }, content: { type: "string", id: 2 }, metadata: { type: "bytes", id: 3 } } }, FileInfo: { fields: { target: { type: "string", id: 1 }, metadata: { type: "bytes", id: 2 } } } } } } } } } } }, nil_xit_proto = protobufjs.Root.fromJSON(proto_data).lookup(
|
|
2665
2665
|
"nil.xit.proto"
|
|
2666
2666
|
), bundle = async (i) => new Promise((e, n) => {
|
|
2667
2667
|
const a = new WorkerWrapper();
|
|
@@ -2823,31 +2823,38 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2823
2823
|
},
|
|
2824
2824
|
loader: n
|
|
2825
2825
|
}), create_app = async (i, e, n, a, f) => {
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2826
|
+
const u = { host: i };
|
|
2827
|
+
await test_connection(u);
|
|
2828
|
+
const t = new Service$1(u), [s, o, { nil_xit_fn: r }] = await Promise.all([
|
|
2829
|
+
make_values({ id: e, tag: n, host: i, service: t }),
|
|
2830
|
+
make_signals({ id: e, tag: n, host: i, service: t }),
|
|
2830
2831
|
bundle({ host: i, cdn_url: a, id: e })
|
|
2831
|
-
]),
|
|
2832
|
-
svelte: () => import("./svelte/index.js").then((
|
|
2833
|
-
"svelte/store": () => import("./svelte/store.js").then((
|
|
2832
|
+
]), l = {
|
|
2833
|
+
svelte: () => import("./svelte/index.js").then((p) => p.bT),
|
|
2834
|
+
"svelte/store": () => import("./svelte/store.js").then((p) => p.i),
|
|
2834
2835
|
"svelte/animate": () => import("./svelte/animate.js"),
|
|
2835
2836
|
"svelte/easing": () => import("./svelte/easing.js"),
|
|
2836
2837
|
"svelte/events": () => import("./svelte/events.js"),
|
|
2837
|
-
"svelte/motion": () => import("./svelte/motion.js").then((
|
|
2838
|
+
"svelte/motion": () => import("./svelte/motion.js").then((p) => p.i),
|
|
2838
2839
|
"svelte/transition": () => import("./svelte/transition.js"),
|
|
2839
2840
|
// @ts-ignore
|
|
2840
2841
|
"svelte/internal/disclose-version": () => import("./svelte/internal/disclose-version.js"),
|
|
2841
2842
|
// @ts-ignore
|
|
2842
2843
|
"svelte/internal/client": () => import("./svelte/internal/client.js")
|
|
2843
|
-
})
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2844
|
+
}, d = (p) => p in l ? l[p]() : import(
|
|
2845
|
+
/* @vite-ignore */
|
|
2846
|
+
p
|
|
2847
|
+
), { action: c } = await r(d), h = concat([
|
|
2848
|
+
header(nil_xit_proto.MessageType.MessageType_FrameLoaded),
|
|
2849
|
+
nil_xit_proto.FrameLoaded.encode({ id: e, tag: n }).finish()
|
|
2850
|
+
]);
|
|
2851
|
+
return t.start(), service_publish(u, h), (p) => {
|
|
2852
|
+
const m = /* @__PURE__ */ new Map();
|
|
2853
|
+
m.set("nil.xit", create_context(s, o, f));
|
|
2854
|
+
const { destroy: b } = c(p, m);
|
|
2855
|
+
return {
|
|
2849
2856
|
destroy: () => {
|
|
2850
|
-
|
|
2857
|
+
t.stop(), b();
|
|
2851
2858
|
}
|
|
2852
2859
|
};
|
|
2853
2860
|
};
|