or-tools-wasm 0.5.0 → 0.7.0
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/README.md +173 -55
- package/build/javascript/browser/cp_sat_module_loader.js +53 -0
- package/build/javascript/browser/cpsat_worker.js +135 -0
- package/build/javascript/browser/cpsat_worker_types.js +0 -0
- package/build/javascript/browser/index.js +5910 -0
- package/build/javascript/lib/assets/cp_sat_runtime-BcQ-oG9G.js +2568 -0
- package/build/javascript/lib/assets/cp_sat_runtime-BcQ-oG9G.js.map +1 -0
- package/build/javascript/lib/assets/{cp_sat_runtime-BUuF8d7w.wasm → cp_sat_runtime.wasm} +0 -0
- package/build/javascript/lib/assets/cp_sat_runtime.wasm.map +1 -0
- package/build/javascript/lib/assets/cp_sat_runtime_asyncify-CebveWgj.js +2642 -0
- package/build/javascript/lib/assets/cp_sat_runtime_asyncify-CebveWgj.js.map +1 -0
- package/build/javascript/lib/assets/{cp_sat_runtime_asyncify-CjMVqM1A.wasm → cp_sat_runtime_asyncify.wasm} +0 -0
- package/build/javascript/lib/assets/cp_sat_runtime_asyncify.wasm.map +1 -0
- package/build/javascript/lib/assets/cpsat_worker-CxyMtsph.js +145 -0
- package/build/javascript/lib/assets/cpsat_worker-CxyMtsph.js.map +1 -0
- package/build/javascript/lib/chunks/cp_sat_runtime-D-Bi0Puh.js +2568 -0
- package/build/javascript/lib/chunks/cp_sat_runtime-D-Bi0Puh.js.map +1 -0
- package/build/javascript/lib/chunks/cp_sat_runtime_asyncify-pyd1qgFK.js +2642 -0
- package/build/javascript/lib/chunks/cp_sat_runtime_asyncify-pyd1qgFK.js.map +1 -0
- package/build/javascript/lib/cp_sat_api.d.ts +277 -98
- package/build/javascript/lib/cp_sat_api.js +3364 -219
- package/build/javascript/lib/cp_sat_api.js.map +1 -1
- package/build/javascript/wasm/cp_sat_runtime.d.ts +51 -0
- package/build/javascript/wasm/cp_sat_runtime.js +10 -0
- package/build/javascript/wasm/cp_sat_runtime.wasm +0 -0
- package/build/javascript/wasm/cp_sat_runtime.wasm.map +1 -0
- package/build/javascript/wasm/cp_sat_runtime_asyncify.js +10 -0
- package/build/javascript/wasm/cp_sat_runtime_asyncify.wasm +0 -0
- package/build/javascript/wasm/cp_sat_runtime_asyncify.wasm.map +1 -0
- package/javascript/lib/cp_sat_api.ts +475 -0
- package/javascript/lib/cp_sat_module_loader.bundled.ts +58 -0
- package/javascript/lib/cp_sat_module_loader.ts +57 -0
- package/javascript/lib/cpsat_worker.ts +160 -0
- package/javascript/lib/cpsat_worker_types.ts +32 -0
- package/javascript/lib/generated/sat_parameters.ts +2760 -0
- package/javascript/lib/index.ts +8 -0
- package/javascript/lib/internal_wasm_asyncify.d.ts +15 -0
- package/javascript/lib/vite-shims.d.ts +25 -0
- package/javascript/lib/webassembly_promising.d.ts +7 -0
- package/package.json +46 -7
- package/build/javascript/lib/assets/cp_sat_runtime-N6mpxHFm.js +0 -2565
- package/build/javascript/lib/assets/cp_sat_runtime-N6mpxHFm.js.map +0 -1
- package/build/javascript/lib/assets/cp_sat_runtime_asyncify-DAFhCUmM.js +0 -2639
- package/build/javascript/lib/assets/cp_sat_runtime_asyncify-DAFhCUmM.js.map +0 -1
- package/build/javascript/lib/assets/cpsat_worker-Bc6EW-gj.js +0 -139
- package/build/javascript/lib/assets/cpsat_worker-Bc6EW-gj.js.map +0 -1
- package/build/javascript/lib/chunks/cp_sat_runtime-B9zhYjnh.js +0 -2565
- package/build/javascript/lib/chunks/cp_sat_runtime-B9zhYjnh.js.map +0 -1
- package/build/javascript/lib/chunks/cp_sat_runtime_asyncify-BaxdGqjW.js +0 -2639
- package/build/javascript/lib/chunks/cp_sat_runtime_asyncify-BaxdGqjW.js.map +0 -1
- package/build/javascript/lib/chunks/index-Cq3lJx2c.js +0 -3815
- package/build/javascript/lib/chunks/index-Cq3lJx2c.js.map +0 -1
|
@@ -1,173 +1,3321 @@
|
|
|
1
|
-
let
|
|
1
|
+
let ei;
|
|
2
2
|
let __tla = (async ()=>{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const cn = "" + new URL("assets/cp_sat_runtime.wasm", import.meta.url).href, dn = "" + new URL("assets/cp_sat_runtime_asyncify.wasm", import.meta.url).href;
|
|
4
|
+
let Ee = null, ye = null;
|
|
5
|
+
function hn() {
|
|
6
|
+
const l = WebAssembly;
|
|
7
|
+
return typeof l < "u" && typeof l.promising == "function";
|
|
7
8
|
}
|
|
8
|
-
function
|
|
9
|
-
return
|
|
9
|
+
function pn() {
|
|
10
|
+
return ye || (ye = hn() ? "jspi" : "asyncify", console.log(ye === "jspi" ? "JSPI is supported. Using ASYNCIFY=2." : "JSPI not found. Falling back to ASYNCIFY=1."), ye);
|
|
10
11
|
}
|
|
11
|
-
async function
|
|
12
|
-
if (
|
|
13
|
-
const { default:
|
|
14
|
-
return
|
|
12
|
+
async function yn() {
|
|
13
|
+
if (pn() === "jspi") {
|
|
14
|
+
const { default: h } = await import("./chunks/cp_sat_runtime-D-Bi0Puh.js");
|
|
15
|
+
return h;
|
|
16
|
+
}
|
|
17
|
+
const { default: o } = await import("./chunks/cp_sat_runtime_asyncify-pyd1qgFK.js");
|
|
18
|
+
return o;
|
|
19
|
+
}
|
|
20
|
+
function mn(l) {
|
|
21
|
+
return l === "cp_sat_runtime.wasm" ? cn : l === "cp_sat_runtime_asyncify.wasm" ? dn : l;
|
|
22
|
+
}
|
|
23
|
+
async function vn() {
|
|
24
|
+
return Ee || (Ee = (async ()=>(await yn())({
|
|
25
|
+
locateFile: mn
|
|
26
|
+
}))()), Ee;
|
|
27
|
+
}
|
|
28
|
+
var ue = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, We = {
|
|
29
|
+
exports: {}
|
|
30
|
+
}, xe = {
|
|
31
|
+
exports: {}
|
|
32
|
+
}, Ze = {}, _e = {}, Ve, Lt;
|
|
33
|
+
function Wr() {
|
|
34
|
+
if (Lt) return Ve;
|
|
35
|
+
Lt = 1, Ve = l;
|
|
36
|
+
function l(o, h) {
|
|
37
|
+
for(var f = new Array(arguments.length - 1), c = 0, n = 2, e = !0; n < arguments.length;)f[c++] = arguments[n++];
|
|
38
|
+
return new Promise(function(t, r) {
|
|
39
|
+
f[c] = function(s) {
|
|
40
|
+
if (e) if (e = !1, s) r(s);
|
|
41
|
+
else {
|
|
42
|
+
for(var u = new Array(arguments.length - 1), a = 0; a < u.length;)u[a++] = arguments[a];
|
|
43
|
+
t.apply(null, u);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
try {
|
|
47
|
+
o.apply(h || null, f);
|
|
48
|
+
} catch (d) {
|
|
49
|
+
e && (e = !1, r(d));
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return Ve;
|
|
54
|
+
}
|
|
55
|
+
var Te = {}, Xt;
|
|
56
|
+
function gn() {
|
|
57
|
+
return Xt || (Xt = 1, (function(l) {
|
|
58
|
+
var o = l;
|
|
59
|
+
o.length = function(i) {
|
|
60
|
+
var t = i.length;
|
|
61
|
+
if (!t) return 0;
|
|
62
|
+
for(var r = 0; --t % 4 > 1 && i.charAt(t) === "=";)++r;
|
|
63
|
+
return Math.ceil(i.length * 3) / 4 - r;
|
|
64
|
+
};
|
|
65
|
+
for(var h = new Array(64), f = new Array(123), c = 0; c < 64;)f[h[c] = c < 26 ? c + 65 : c < 52 ? c + 71 : c < 62 ? c - 4 : c - 59 | 43] = c++;
|
|
66
|
+
o.encode = function(i, t, r) {
|
|
67
|
+
for(var d = null, s = [], u = 0, a = 0, p; t < r;){
|
|
68
|
+
var y = i[t++];
|
|
69
|
+
switch(a){
|
|
70
|
+
case 0:
|
|
71
|
+
s[u++] = h[y >> 2], p = (y & 3) << 4, a = 1;
|
|
72
|
+
break;
|
|
73
|
+
case 1:
|
|
74
|
+
s[u++] = h[p | y >> 4], p = (y & 15) << 2, a = 2;
|
|
75
|
+
break;
|
|
76
|
+
case 2:
|
|
77
|
+
s[u++] = h[p | y >> 6], s[u++] = h[y & 63], a = 0;
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
u > 8191 && ((d || (d = [])).push(String.fromCharCode.apply(String, s)), u = 0);
|
|
81
|
+
}
|
|
82
|
+
return a && (s[u++] = h[p], s[u++] = 61, a === 1 && (s[u++] = 61)), d ? (u && d.push(String.fromCharCode.apply(String, s.slice(0, u))), d.join("")) : String.fromCharCode.apply(String, s.slice(0, u));
|
|
83
|
+
};
|
|
84
|
+
var n = "invalid encoding";
|
|
85
|
+
o.decode = function(i, t, r) {
|
|
86
|
+
for(var d = r, s = 0, u, a = 0; a < i.length;){
|
|
87
|
+
var p = i.charCodeAt(a++);
|
|
88
|
+
if (p === 61 && s > 1) break;
|
|
89
|
+
if ((p = f[p]) === void 0) throw Error(n);
|
|
90
|
+
switch(s){
|
|
91
|
+
case 0:
|
|
92
|
+
u = p, s = 1;
|
|
93
|
+
break;
|
|
94
|
+
case 1:
|
|
95
|
+
t[r++] = u << 2 | (p & 48) >> 4, u = p, s = 2;
|
|
96
|
+
break;
|
|
97
|
+
case 2:
|
|
98
|
+
t[r++] = (u & 15) << 4 | (p & 60) >> 2, u = p, s = 3;
|
|
99
|
+
break;
|
|
100
|
+
case 3:
|
|
101
|
+
t[r++] = (u & 3) << 6 | p, s = 0;
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (s === 1) throw Error(n);
|
|
106
|
+
return r - d;
|
|
107
|
+
}, o.test = function(i) {
|
|
108
|
+
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(i);
|
|
109
|
+
};
|
|
110
|
+
})(Te)), Te;
|
|
111
|
+
}
|
|
112
|
+
var Ge, Dt;
|
|
113
|
+
function bn() {
|
|
114
|
+
if (Dt) return Ge;
|
|
115
|
+
Dt = 1, Ge = l;
|
|
116
|
+
function l() {
|
|
117
|
+
this._listeners = {};
|
|
118
|
+
}
|
|
119
|
+
return l.prototype.on = function(h, f, c) {
|
|
120
|
+
return (this._listeners[h] || (this._listeners[h] = [])).push({
|
|
121
|
+
fn: f,
|
|
122
|
+
ctx: c || this
|
|
123
|
+
}), this;
|
|
124
|
+
}, l.prototype.off = function(h, f) {
|
|
125
|
+
if (h === void 0) this._listeners = {};
|
|
126
|
+
else if (f === void 0) this._listeners[h] = [];
|
|
127
|
+
else for(var c = this._listeners[h], n = 0; n < c.length;)c[n].fn === f ? c.splice(n, 1) : ++n;
|
|
128
|
+
return this;
|
|
129
|
+
}, l.prototype.emit = function(h) {
|
|
130
|
+
var f = this._listeners[h];
|
|
131
|
+
if (f) {
|
|
132
|
+
for(var c = [], n = 1; n < arguments.length;)c.push(arguments[n++]);
|
|
133
|
+
for(n = 0; n < f.length;)f[n].fn.apply(f[n++].ctx, c);
|
|
134
|
+
}
|
|
135
|
+
return this;
|
|
136
|
+
}, Ge;
|
|
137
|
+
}
|
|
138
|
+
var Je, Ht;
|
|
139
|
+
function wn() {
|
|
140
|
+
if (Ht) return Je;
|
|
141
|
+
Ht = 1, Je = l(l);
|
|
142
|
+
function l(n) {
|
|
143
|
+
return typeof Float32Array < "u" ? (function() {
|
|
144
|
+
var e = new Float32Array([
|
|
145
|
+
-0
|
|
146
|
+
]), i = new Uint8Array(e.buffer), t = i[3] === 128;
|
|
147
|
+
function r(a, p, y) {
|
|
148
|
+
e[0] = a, p[y] = i[0], p[y + 1] = i[1], p[y + 2] = i[2], p[y + 3] = i[3];
|
|
149
|
+
}
|
|
150
|
+
function d(a, p, y) {
|
|
151
|
+
e[0] = a, p[y] = i[3], p[y + 1] = i[2], p[y + 2] = i[1], p[y + 3] = i[0];
|
|
152
|
+
}
|
|
153
|
+
n.writeFloatLE = t ? r : d, n.writeFloatBE = t ? d : r;
|
|
154
|
+
function s(a, p) {
|
|
155
|
+
return i[0] = a[p], i[1] = a[p + 1], i[2] = a[p + 2], i[3] = a[p + 3], e[0];
|
|
156
|
+
}
|
|
157
|
+
function u(a, p) {
|
|
158
|
+
return i[3] = a[p], i[2] = a[p + 1], i[1] = a[p + 2], i[0] = a[p + 3], e[0];
|
|
159
|
+
}
|
|
160
|
+
n.readFloatLE = t ? s : u, n.readFloatBE = t ? u : s;
|
|
161
|
+
})() : (function() {
|
|
162
|
+
function e(t, r, d, s) {
|
|
163
|
+
var u = r < 0 ? 1 : 0;
|
|
164
|
+
if (u && (r = -r), r === 0) t(1 / r > 0 ? (0) : (2147483648), d, s);
|
|
165
|
+
else if (isNaN(r)) t(2143289344, d, s);
|
|
166
|
+
else if (r > 34028234663852886e22) t((u << 31 | 2139095040) >>> 0, d, s);
|
|
167
|
+
else if (r < 11754943508222875e-54) t((u << 31 | Math.round(r / 1401298464324817e-60)) >>> 0, d, s);
|
|
168
|
+
else {
|
|
169
|
+
var a = Math.floor(Math.log(r) / Math.LN2), p = Math.round(r * Math.pow(2, -a) * 8388608) & 8388607;
|
|
170
|
+
t((u << 31 | a + 127 << 23 | p) >>> 0, d, s);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
n.writeFloatLE = e.bind(null, o), n.writeFloatBE = e.bind(null, h);
|
|
174
|
+
function i(t, r, d) {
|
|
175
|
+
var s = t(r, d), u = (s >> 31) * 2 + 1, a = s >>> 23 & 255, p = s & 8388607;
|
|
176
|
+
return a === 255 ? p ? NaN : u * (1 / 0) : a === 0 ? u * 1401298464324817e-60 * p : u * Math.pow(2, a - 150) * (p + 8388608);
|
|
177
|
+
}
|
|
178
|
+
n.readFloatLE = i.bind(null, f), n.readFloatBE = i.bind(null, c);
|
|
179
|
+
})(), typeof Float64Array < "u" ? (function() {
|
|
180
|
+
var e = new Float64Array([
|
|
181
|
+
-0
|
|
182
|
+
]), i = new Uint8Array(e.buffer), t = i[7] === 128;
|
|
183
|
+
function r(a, p, y) {
|
|
184
|
+
e[0] = a, p[y] = i[0], p[y + 1] = i[1], p[y + 2] = i[2], p[y + 3] = i[3], p[y + 4] = i[4], p[y + 5] = i[5], p[y + 6] = i[6], p[y + 7] = i[7];
|
|
185
|
+
}
|
|
186
|
+
function d(a, p, y) {
|
|
187
|
+
e[0] = a, p[y] = i[7], p[y + 1] = i[6], p[y + 2] = i[5], p[y + 3] = i[4], p[y + 4] = i[3], p[y + 5] = i[2], p[y + 6] = i[1], p[y + 7] = i[0];
|
|
188
|
+
}
|
|
189
|
+
n.writeDoubleLE = t ? r : d, n.writeDoubleBE = t ? d : r;
|
|
190
|
+
function s(a, p) {
|
|
191
|
+
return i[0] = a[p], i[1] = a[p + 1], i[2] = a[p + 2], i[3] = a[p + 3], i[4] = a[p + 4], i[5] = a[p + 5], i[6] = a[p + 6], i[7] = a[p + 7], e[0];
|
|
192
|
+
}
|
|
193
|
+
function u(a, p) {
|
|
194
|
+
return i[7] = a[p], i[6] = a[p + 1], i[5] = a[p + 2], i[4] = a[p + 3], i[3] = a[p + 4], i[2] = a[p + 5], i[1] = a[p + 6], i[0] = a[p + 7], e[0];
|
|
195
|
+
}
|
|
196
|
+
n.readDoubleLE = t ? s : u, n.readDoubleBE = t ? u : s;
|
|
197
|
+
})() : (function() {
|
|
198
|
+
function e(t, r, d, s, u, a) {
|
|
199
|
+
var p = s < 0 ? 1 : 0;
|
|
200
|
+
if (p && (s = -s), s === 0) t(0, u, a + r), t(1 / s > 0 ? (0) : (2147483648), u, a + d);
|
|
201
|
+
else if (isNaN(s)) t(0, u, a + r), t(2146959360, u, a + d);
|
|
202
|
+
else if (s > 17976931348623157e292) t(0, u, a + r), t((p << 31 | 2146435072) >>> 0, u, a + d);
|
|
203
|
+
else {
|
|
204
|
+
var y;
|
|
205
|
+
if (s < 22250738585072014e-324) y = s / 5e-324, t(y >>> 0, u, a + r), t((p << 31 | y / 4294967296) >>> 0, u, a + d);
|
|
206
|
+
else {
|
|
207
|
+
var b = Math.floor(Math.log(s) / Math.LN2);
|
|
208
|
+
b === 1024 && (b = 1023), y = s * Math.pow(2, -b), t(y * 4503599627370496 >>> 0, u, a + r), t((p << 31 | b + 1023 << 20 | y * 1048576 & 1048575) >>> 0, u, a + d);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
n.writeDoubleLE = e.bind(null, o, 0, 4), n.writeDoubleBE = e.bind(null, h, 4, 0);
|
|
213
|
+
function i(t, r, d, s, u) {
|
|
214
|
+
var a = t(s, u + r), p = t(s, u + d), y = (p >> 31) * 2 + 1, b = p >>> 20 & 2047, v = 4294967296 * (p & 1048575) + a;
|
|
215
|
+
return b === 2047 ? v ? NaN : y * (1 / 0) : b === 0 ? y * 5e-324 * v : y * Math.pow(2, b - 1075) * (v + 4503599627370496);
|
|
216
|
+
}
|
|
217
|
+
n.readDoubleLE = i.bind(null, f, 0, 4), n.readDoubleBE = i.bind(null, c, 4, 0);
|
|
218
|
+
})(), n;
|
|
219
|
+
}
|
|
220
|
+
function o(n, e, i) {
|
|
221
|
+
e[i] = n & 255, e[i + 1] = n >>> 8 & 255, e[i + 2] = n >>> 16 & 255, e[i + 3] = n >>> 24;
|
|
222
|
+
}
|
|
223
|
+
function h(n, e, i) {
|
|
224
|
+
e[i] = n >>> 24, e[i + 1] = n >>> 16 & 255, e[i + 2] = n >>> 8 & 255, e[i + 3] = n & 255;
|
|
225
|
+
}
|
|
226
|
+
function f(n, e) {
|
|
227
|
+
return (n[e] | n[e + 1] << 8 | n[e + 2] << 16 | n[e + 3] << 24) >>> 0;
|
|
228
|
+
}
|
|
229
|
+
function c(n, e) {
|
|
230
|
+
return (n[e] << 24 | n[e + 1] << 16 | n[e + 2] << 8 | n[e + 3]) >>> 0;
|
|
231
|
+
}
|
|
232
|
+
return Je;
|
|
233
|
+
}
|
|
234
|
+
function qt(l) {
|
|
235
|
+
throw new Error('Could not dynamically require "' + l + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
236
|
+
}
|
|
237
|
+
var Pe, zt;
|
|
238
|
+
function xr() {
|
|
239
|
+
if (zt) return Pe;
|
|
240
|
+
zt = 1, Pe = l;
|
|
241
|
+
function l(o) {
|
|
242
|
+
try {
|
|
243
|
+
if (typeof qt != "function") return null;
|
|
244
|
+
var h = qt(o);
|
|
245
|
+
return h && (h.length || Object.keys(h).length) ? h : null;
|
|
246
|
+
} catch {
|
|
247
|
+
return null;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return Pe;
|
|
251
|
+
}
|
|
252
|
+
var Le = {}, Ut;
|
|
253
|
+
function _n() {
|
|
254
|
+
return Ut || (Ut = 1, (function(l) {
|
|
255
|
+
var o = l, h = "�";
|
|
256
|
+
o.length = function(c) {
|
|
257
|
+
for(var n = 0, e = 0, i = 0; i < c.length; ++i)e = c.charCodeAt(i), e < 128 ? n += 1 : e < 2048 ? n += 2 : (e & 64512) === 55296 && (c.charCodeAt(i + 1) & 64512) === 56320 ? (++i, n += 4) : n += 3;
|
|
258
|
+
return n;
|
|
259
|
+
}, o.read = function(c, n, e) {
|
|
260
|
+
if (e - n < 1) return "";
|
|
261
|
+
for(var i = "", t = n; t < e;){
|
|
262
|
+
var r = c[t++];
|
|
263
|
+
if (r <= 127) i += String.fromCharCode(r);
|
|
264
|
+
else if (r >= 192 && r < 224) {
|
|
265
|
+
var d = (r & 31) << 6 | c[t++] & 63;
|
|
266
|
+
i += d >= 128 ? String.fromCharCode(d) : h;
|
|
267
|
+
} else if (r >= 224 && r < 240) {
|
|
268
|
+
var s = (r & 15) << 12 | (c[t++] & 63) << 6 | c[t++] & 63;
|
|
269
|
+
i += s >= 2048 ? String.fromCharCode(s) : h;
|
|
270
|
+
} else if (r >= 240) {
|
|
271
|
+
var u = (r & 7) << 18 | (c[t++] & 63) << 12 | (c[t++] & 63) << 6 | c[t++] & 63;
|
|
272
|
+
u < 65536 || u > 1114111 ? i += h : (u -= 65536, i += String.fromCharCode(55296 + (u >> 10)), i += String.fromCharCode(56320 + (u & 1023)));
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return i;
|
|
276
|
+
}, o.write = function(c, n, e) {
|
|
277
|
+
for(var i = e, t, r, d = 0; d < c.length; ++d)t = c.charCodeAt(d), t < 128 ? n[e++] = t : t < 2048 ? (n[e++] = t >> 6 | 192, n[e++] = t & 63 | 128) : (t & 64512) === 55296 && ((r = c.charCodeAt(d + 1)) & 64512) === 56320 ? (t = 65536 + ((t & 1023) << 10) + (r & 1023), ++d, n[e++] = t >> 18 | 240, n[e++] = t >> 12 & 63 | 128, n[e++] = t >> 6 & 63 | 128, n[e++] = t & 63 | 128) : (n[e++] = t >> 12 | 224, n[e++] = t >> 6 & 63 | 128, n[e++] = t & 63 | 128);
|
|
278
|
+
return e - i;
|
|
279
|
+
};
|
|
280
|
+
})(Le)), Le;
|
|
281
|
+
}
|
|
282
|
+
var Xe, jt;
|
|
283
|
+
function In() {
|
|
284
|
+
if (jt) return Xe;
|
|
285
|
+
jt = 1, Xe = l;
|
|
286
|
+
function l(o, h, f) {
|
|
287
|
+
var c = f || 8192, n = c >>> 1, e = null, i = c;
|
|
288
|
+
return function(r) {
|
|
289
|
+
if (r < 1 || r > n) return o(r);
|
|
290
|
+
i + r > c && (e = o(c), i = 0);
|
|
291
|
+
var d = h.call(e, i, i += r);
|
|
292
|
+
return i & 7 && (i = (i | 7) + 1), d;
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
return Xe;
|
|
296
|
+
}
|
|
297
|
+
var De, Yt;
|
|
298
|
+
function An() {
|
|
299
|
+
if (Yt) return De;
|
|
300
|
+
Yt = 1, De = o;
|
|
301
|
+
var l = ne();
|
|
302
|
+
function o(n, e) {
|
|
303
|
+
this.lo = n >>> 0, this.hi = e >>> 0;
|
|
304
|
+
}
|
|
305
|
+
var h = o.zero = new o(0, 0);
|
|
306
|
+
h.toNumber = function() {
|
|
307
|
+
return 0;
|
|
308
|
+
}, h.zzEncode = h.zzDecode = function() {
|
|
309
|
+
return this;
|
|
310
|
+
}, h.length = function() {
|
|
311
|
+
return 1;
|
|
312
|
+
};
|
|
313
|
+
var f = o.zeroHash = "\0\0\0\0\0\0\0\0";
|
|
314
|
+
o.fromNumber = function(e) {
|
|
315
|
+
if (e === 0) return h;
|
|
316
|
+
var i = e < 0;
|
|
317
|
+
i && (e = -e);
|
|
318
|
+
var t = e >>> 0, r = (e - t) / 4294967296 >>> 0;
|
|
319
|
+
return i && (r = ~r >>> 0, t = ~t >>> 0, ++t > 4294967295 && (t = 0, ++r > 4294967295 && (r = 0))), new o(t, r);
|
|
320
|
+
}, o.from = function(e) {
|
|
321
|
+
if (typeof e == "number") return o.fromNumber(e);
|
|
322
|
+
if (l.isString(e)) if (l.Long) e = l.Long.fromString(e);
|
|
323
|
+
else return o.fromNumber(parseInt(e, 10));
|
|
324
|
+
return e.low || e.high ? new o(e.low >>> 0, e.high >>> 0) : h;
|
|
325
|
+
}, o.prototype.toNumber = function(e) {
|
|
326
|
+
if (!e && this.hi >>> 31) {
|
|
327
|
+
var i = ~this.lo + 1 >>> 0, t = ~this.hi >>> 0;
|
|
328
|
+
return i || (t = t + 1 >>> 0), -(i + t * 4294967296);
|
|
329
|
+
}
|
|
330
|
+
return this.lo + this.hi * 4294967296;
|
|
331
|
+
}, o.prototype.toLong = function(e) {
|
|
332
|
+
return l.Long ? new l.Long(this.lo | 0, this.hi | 0, !!e) : {
|
|
333
|
+
low: this.lo | 0,
|
|
334
|
+
high: this.hi | 0,
|
|
335
|
+
unsigned: !!e
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
var c = String.prototype.charCodeAt;
|
|
339
|
+
return o.fromHash = function(e) {
|
|
340
|
+
return e === f ? h : new o((c.call(e, 0) | c.call(e, 1) << 8 | c.call(e, 2) << 16 | c.call(e, 3) << 24) >>> 0, (c.call(e, 4) | c.call(e, 5) << 8 | c.call(e, 6) << 16 | c.call(e, 7) << 24) >>> 0);
|
|
341
|
+
}, o.prototype.toHash = function() {
|
|
342
|
+
return String.fromCharCode(this.lo & 255, this.lo >>> 8 & 255, this.lo >>> 16 & 255, this.lo >>> 24, this.hi & 255, this.hi >>> 8 & 255, this.hi >>> 16 & 255, this.hi >>> 24);
|
|
343
|
+
}, o.prototype.zzEncode = function() {
|
|
344
|
+
var e = this.hi >> 31;
|
|
345
|
+
return this.hi = ((this.hi << 1 | this.lo >>> 31) ^ e) >>> 0, this.lo = (this.lo << 1 ^ e) >>> 0, this;
|
|
346
|
+
}, o.prototype.zzDecode = function() {
|
|
347
|
+
var e = -(this.lo & 1);
|
|
348
|
+
return this.lo = ((this.lo >>> 1 | this.hi << 31) ^ e) >>> 0, this.hi = (this.hi >>> 1 ^ e) >>> 0, this;
|
|
349
|
+
}, o.prototype.length = function() {
|
|
350
|
+
var e = this.lo, i = (this.lo >>> 28 | this.hi << 4) >>> 0, t = this.hi >>> 24;
|
|
351
|
+
return t === 0 ? i === 0 ? e < 16384 ? e < 128 ? 1 : 2 : e < 2097152 ? 3 : 4 : i < 16384 ? i < 128 ? 5 : 6 : i < 2097152 ? 7 : 8 : t < 128 ? 9 : 10;
|
|
352
|
+
}, De;
|
|
353
|
+
}
|
|
354
|
+
var Kt;
|
|
355
|
+
function ne() {
|
|
356
|
+
return Kt || (Kt = 1, (function(l) {
|
|
357
|
+
var o = l;
|
|
358
|
+
o.asPromise = Wr(), o.base64 = gn(), o.EventEmitter = bn(), o.float = wn(), o.inquire = xr(), o.utf8 = _n(), o.pool = In(), o.LongBits = An(), o.isNode = !!(typeof ue < "u" && ue && ue.process && ue.process.versions && ue.process.versions.node), o.global = o.isNode && ue || typeof window < "u" && window || typeof self < "u" && self || _e, o.emptyArray = Object.freeze ? Object.freeze([]) : ([]), o.emptyObject = Object.freeze ? Object.freeze({}) : ({}), o.isInteger = Number.isInteger || function(n) {
|
|
359
|
+
return typeof n == "number" && isFinite(n) && Math.floor(n) === n;
|
|
360
|
+
}, o.isString = function(n) {
|
|
361
|
+
return typeof n == "string" || n instanceof String;
|
|
362
|
+
}, o.isObject = function(n) {
|
|
363
|
+
return n && typeof n == "object";
|
|
364
|
+
}, o.isset = o.isSet = function(n, e) {
|
|
365
|
+
var i = n[e];
|
|
366
|
+
return i != null && n.hasOwnProperty(e) ? typeof i != "object" || (Array.isArray(i) ? i.length : Object.keys(i).length) > 0 : !1;
|
|
367
|
+
}, o.Buffer = (function() {
|
|
368
|
+
try {
|
|
369
|
+
var c = o.inquire("buffer").Buffer;
|
|
370
|
+
return c.prototype.utf8Write ? c : (null);
|
|
371
|
+
} catch {
|
|
372
|
+
return null;
|
|
373
|
+
}
|
|
374
|
+
})(), o._Buffer_from = null, o._Buffer_allocUnsafe = null, o.newBuffer = function(n) {
|
|
375
|
+
return typeof n == "number" ? o.Buffer ? o._Buffer_allocUnsafe(n) : new o.Array(n) : o.Buffer ? o._Buffer_from(n) : typeof Uint8Array > "u" ? n : new Uint8Array(n);
|
|
376
|
+
}, o.Array = typeof Uint8Array < "u" ? Uint8Array : Array, o.Long = o.global.dcodeIO && o.global.dcodeIO.Long || o.global.Long || o.inquire("long"), o.key2Re = /^true|false|0|1$/, o.key32Re = /^-?(?:0|[1-9][0-9]*)$/, o.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, o.longToHash = function(n) {
|
|
377
|
+
return n ? o.LongBits.from(n).toHash() : o.LongBits.zeroHash;
|
|
378
|
+
}, o.longFromHash = function(n, e) {
|
|
379
|
+
var i = o.LongBits.fromHash(n);
|
|
380
|
+
return o.Long ? o.Long.fromBits(i.lo, i.hi, e) : i.toNumber(!!e);
|
|
381
|
+
};
|
|
382
|
+
function h(c, n, e) {
|
|
383
|
+
for(var i = Object.keys(n), t = 0; t < i.length; ++t)(c[i[t]] === void 0 || !e) && i[t] !== "__proto__" && (c[i[t]] = n[i[t]]);
|
|
384
|
+
return c;
|
|
385
|
+
}
|
|
386
|
+
o.merge = h, o.recursionLimit = 100, o.makeProp = function(n, e) {
|
|
387
|
+
Object.defineProperty(n, e, {
|
|
388
|
+
enumerable: !0,
|
|
389
|
+
configurable: !0,
|
|
390
|
+
writable: !0
|
|
391
|
+
});
|
|
392
|
+
}, o.lcFirst = function(n) {
|
|
393
|
+
return n.charAt(0).toLowerCase() + n.substring(1);
|
|
394
|
+
};
|
|
395
|
+
function f(c) {
|
|
396
|
+
function n(e, i) {
|
|
397
|
+
if (!(this instanceof n)) return new n(e, i);
|
|
398
|
+
Object.defineProperty(this, "message", {
|
|
399
|
+
get: function() {
|
|
400
|
+
return e;
|
|
401
|
+
}
|
|
402
|
+
}), Error.captureStackTrace ? Error.captureStackTrace(this, n) : Object.defineProperty(this, "stack", {
|
|
403
|
+
value: new Error().stack || ""
|
|
404
|
+
}), i && h(this, i);
|
|
405
|
+
}
|
|
406
|
+
return n.prototype = Object.create(Error.prototype, {
|
|
407
|
+
constructor: {
|
|
408
|
+
value: n,
|
|
409
|
+
writable: !0,
|
|
410
|
+
enumerable: !1,
|
|
411
|
+
configurable: !0
|
|
412
|
+
},
|
|
413
|
+
name: {
|
|
414
|
+
get: function() {
|
|
415
|
+
return c;
|
|
416
|
+
},
|
|
417
|
+
set: void 0,
|
|
418
|
+
enumerable: !1,
|
|
419
|
+
configurable: !0
|
|
420
|
+
},
|
|
421
|
+
toString: {
|
|
422
|
+
value: function() {
|
|
423
|
+
return this.name + ": " + this.message;
|
|
424
|
+
},
|
|
425
|
+
writable: !0,
|
|
426
|
+
enumerable: !1,
|
|
427
|
+
configurable: !0
|
|
428
|
+
}
|
|
429
|
+
}), n;
|
|
430
|
+
}
|
|
431
|
+
o.newError = f, o.ProtocolError = f("ProtocolError"), o.oneOfGetter = function(n) {
|
|
432
|
+
for(var e = {}, i = 0; i < n.length; ++i)e[n[i]] = 1;
|
|
433
|
+
return function() {
|
|
434
|
+
for(var t = Object.keys(this), r = t.length - 1; r > -1; --r)if (e[t[r]] === 1 && this[t[r]] !== void 0 && this[t[r]] !== null) return t[r];
|
|
435
|
+
};
|
|
436
|
+
}, o.oneOfSetter = function(n) {
|
|
437
|
+
return function(e) {
|
|
438
|
+
for(var i = 0; i < n.length; ++i)n[i] !== e && delete this[n[i]];
|
|
439
|
+
};
|
|
440
|
+
}, o.toJSONOptions = {
|
|
441
|
+
longs: String,
|
|
442
|
+
enums: String,
|
|
443
|
+
bytes: String,
|
|
444
|
+
json: !0
|
|
445
|
+
}, o._configure = function() {
|
|
446
|
+
var c = o.Buffer;
|
|
447
|
+
if (!c) {
|
|
448
|
+
o._Buffer_from = o._Buffer_allocUnsafe = null;
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
o._Buffer_from = c.from !== Uint8Array.from && c.from || function(e, i) {
|
|
452
|
+
return new c(e, i);
|
|
453
|
+
}, o._Buffer_allocUnsafe = c.allocUnsafe || function(e) {
|
|
454
|
+
return new c(e);
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
})(_e)), _e;
|
|
458
|
+
}
|
|
459
|
+
var He, Mt;
|
|
460
|
+
function kt() {
|
|
461
|
+
if (Mt) return He;
|
|
462
|
+
Mt = 1, He = t;
|
|
463
|
+
var l = ne(), o, h = l.LongBits, f = l.base64, c = l.utf8;
|
|
464
|
+
function n(b, v, m) {
|
|
465
|
+
this.fn = b, this.len = v, this.next = void 0, this.val = m;
|
|
466
|
+
}
|
|
467
|
+
function e() {}
|
|
468
|
+
function i(b) {
|
|
469
|
+
this.head = b.head, this.tail = b.tail, this.len = b.len, this.next = b.states;
|
|
470
|
+
}
|
|
471
|
+
function t() {
|
|
472
|
+
this.len = 0, this.head = new n(e, 0, 0), this.tail = this.head, this.states = null;
|
|
473
|
+
}
|
|
474
|
+
var r = function() {
|
|
475
|
+
return l.Buffer ? function() {
|
|
476
|
+
return (t.create = function() {
|
|
477
|
+
return new o();
|
|
478
|
+
})();
|
|
479
|
+
} : function() {
|
|
480
|
+
return new t();
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
t.create = r(), t.alloc = function(v) {
|
|
484
|
+
return new l.Array(v);
|
|
485
|
+
}, l.Array !== Array && (t.alloc = l.pool(t.alloc, l.Array.prototype.subarray)), t.prototype._push = function(v, m, g) {
|
|
486
|
+
return this.tail = this.tail.next = new n(v, m, g), this.len += m, this;
|
|
487
|
+
};
|
|
488
|
+
function d(b, v, m) {
|
|
489
|
+
v[m] = b & 255;
|
|
490
|
+
}
|
|
491
|
+
function s(b, v, m) {
|
|
492
|
+
for(; b > 127;)v[m++] = b & 127 | 128, b >>>= 7;
|
|
493
|
+
v[m] = b;
|
|
494
|
+
}
|
|
495
|
+
function u(b, v) {
|
|
496
|
+
this.len = b, this.next = void 0, this.val = v;
|
|
497
|
+
}
|
|
498
|
+
u.prototype = Object.create(n.prototype), u.prototype.fn = s, t.prototype.uint32 = function(v) {
|
|
499
|
+
return this.len += (this.tail = this.tail.next = new u((v = v >>> 0) < 128 ? 1 : v < 16384 ? 2 : v < 2097152 ? 3 : v < 268435456 ? 4 : 5, v)).len, this;
|
|
500
|
+
}, t.prototype.int32 = function(v) {
|
|
501
|
+
return v < 0 ? this._push(a, 10, h.fromNumber(v)) : this.uint32(v);
|
|
502
|
+
}, t.prototype.sint32 = function(v) {
|
|
503
|
+
return this.uint32((v << 1 ^ v >> 31) >>> 0);
|
|
504
|
+
};
|
|
505
|
+
function a(b, v, m) {
|
|
506
|
+
for(; b.hi;)v[m++] = b.lo & 127 | 128, b.lo = (b.lo >>> 7 | b.hi << 25) >>> 0, b.hi >>>= 7;
|
|
507
|
+
for(; b.lo > 127;)v[m++] = b.lo & 127 | 128, b.lo = b.lo >>> 7;
|
|
508
|
+
v[m++] = b.lo;
|
|
509
|
+
}
|
|
510
|
+
t.prototype.uint64 = function(v) {
|
|
511
|
+
var m = h.from(v);
|
|
512
|
+
return this._push(a, m.length(), m);
|
|
513
|
+
}, t.prototype.int64 = t.prototype.uint64, t.prototype.sint64 = function(v) {
|
|
514
|
+
var m = h.from(v).zzEncode();
|
|
515
|
+
return this._push(a, m.length(), m);
|
|
516
|
+
}, t.prototype.bool = function(v) {
|
|
517
|
+
return this._push(d, 1, v ? 1 : 0);
|
|
518
|
+
};
|
|
519
|
+
function p(b, v, m) {
|
|
520
|
+
v[m] = b & 255, v[m + 1] = b >>> 8 & 255, v[m + 2] = b >>> 16 & 255, v[m + 3] = b >>> 24;
|
|
521
|
+
}
|
|
522
|
+
t.prototype.fixed32 = function(v) {
|
|
523
|
+
return this._push(p, 4, v >>> 0);
|
|
524
|
+
}, t.prototype.sfixed32 = t.prototype.fixed32, t.prototype.fixed64 = function(v) {
|
|
525
|
+
var m = h.from(v);
|
|
526
|
+
return this._push(p, 4, m.lo)._push(p, 4, m.hi);
|
|
527
|
+
}, t.prototype.sfixed64 = t.prototype.fixed64, t.prototype.float = function(v) {
|
|
528
|
+
return this._push(l.float.writeFloatLE, 4, v);
|
|
529
|
+
}, t.prototype.double = function(v) {
|
|
530
|
+
return this._push(l.float.writeDoubleLE, 8, v);
|
|
531
|
+
};
|
|
532
|
+
var y = l.Array.prototype.set ? function(v, m, g) {
|
|
533
|
+
m.set(v, g);
|
|
534
|
+
} : function(v, m, g) {
|
|
535
|
+
for(var O = 0; O < v.length; ++O)m[g + O] = v[O];
|
|
536
|
+
};
|
|
537
|
+
return t.prototype.bytes = function(v) {
|
|
538
|
+
var m = v.length >>> 0;
|
|
539
|
+
if (!m) return this._push(d, 1, 0);
|
|
540
|
+
if (l.isString(v)) {
|
|
541
|
+
var g = t.alloc(m = f.length(v));
|
|
542
|
+
f.decode(v, g, 0), v = g;
|
|
543
|
+
}
|
|
544
|
+
return this.uint32(m)._push(y, m, v);
|
|
545
|
+
}, t.prototype.string = function(v) {
|
|
546
|
+
var m = c.length(v);
|
|
547
|
+
return m ? this.uint32(m)._push(c.write, m, v) : this._push(d, 1, 0);
|
|
548
|
+
}, t.prototype.fork = function() {
|
|
549
|
+
return this.states = new i(this), this.head = this.tail = new n(e, 0, 0), this.len = 0, this;
|
|
550
|
+
}, t.prototype.reset = function() {
|
|
551
|
+
return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new n(e, 0, 0), this.len = 0), this;
|
|
552
|
+
}, t.prototype.ldelim = function() {
|
|
553
|
+
var v = this.head, m = this.tail, g = this.len;
|
|
554
|
+
return this.reset().uint32(g), g && (this.tail.next = v.next, this.tail = m, this.len += g), this;
|
|
555
|
+
}, t.prototype.finish = function() {
|
|
556
|
+
for(var v = this.head.next, m = this.constructor.alloc(this.len), g = 0; v;)v.fn(v.val, m, g), g += v.len, v = v.next;
|
|
557
|
+
return m;
|
|
558
|
+
}, t._configure = function(b) {
|
|
559
|
+
o = b, t.create = r(), o._configure();
|
|
560
|
+
}, He;
|
|
561
|
+
}
|
|
562
|
+
var qe, $t;
|
|
563
|
+
function On() {
|
|
564
|
+
if ($t) return qe;
|
|
565
|
+
$t = 1, qe = h;
|
|
566
|
+
var l = kt();
|
|
567
|
+
(h.prototype = Object.create(l.prototype)).constructor = h;
|
|
568
|
+
var o = ne();
|
|
569
|
+
function h() {
|
|
570
|
+
l.call(this);
|
|
571
|
+
}
|
|
572
|
+
h._configure = function() {
|
|
573
|
+
h.alloc = o._Buffer_allocUnsafe, h.writeBytesBuffer = o.Buffer && o.Buffer.prototype instanceof Uint8Array && o.Buffer.prototype.set.name === "set" ? function(n, e, i) {
|
|
574
|
+
e.set(n, i);
|
|
575
|
+
} : function(n, e, i) {
|
|
576
|
+
if (n.copy) n.copy(e, i, 0, n.length);
|
|
577
|
+
else for(var t = 0; t < n.length;)e[i++] = n[t++];
|
|
578
|
+
};
|
|
579
|
+
}, h.prototype.bytes = function(n) {
|
|
580
|
+
o.isString(n) && (n = o._Buffer_from(n, "base64"));
|
|
581
|
+
var e = n.length >>> 0;
|
|
582
|
+
return this.uint32(e), e && this._push(h.writeBytesBuffer, e, n), this;
|
|
583
|
+
};
|
|
584
|
+
function f(c, n, e) {
|
|
585
|
+
c.length < 40 ? o.utf8.write(c, n, e) : n.utf8Write ? n.utf8Write(c, e) : n.write(c, e);
|
|
586
|
+
}
|
|
587
|
+
return h.prototype.string = function(n) {
|
|
588
|
+
var e = o.Buffer.byteLength(n);
|
|
589
|
+
return this.uint32(e), e && this._push(f, e, n), this;
|
|
590
|
+
}, h._configure(), qe;
|
|
591
|
+
}
|
|
592
|
+
var ze, Qt;
|
|
593
|
+
function St() {
|
|
594
|
+
if (Qt) return ze;
|
|
595
|
+
Qt = 1, ze = n;
|
|
596
|
+
var l = ne(), o, h = l.LongBits, f = l.utf8;
|
|
597
|
+
function c(s, u) {
|
|
598
|
+
return RangeError("index out of range: " + s.pos + " + " + (u || 1) + " > " + s.len);
|
|
599
|
+
}
|
|
600
|
+
function n(s) {
|
|
601
|
+
this.buf = s, this.pos = 0, this.len = s.length;
|
|
602
|
+
}
|
|
603
|
+
var e = typeof Uint8Array < "u" ? function(u) {
|
|
604
|
+
if (u instanceof Uint8Array || Array.isArray(u)) return new n(u);
|
|
605
|
+
throw Error("illegal buffer");
|
|
606
|
+
} : function(u) {
|
|
607
|
+
if (Array.isArray(u)) return new n(u);
|
|
608
|
+
throw Error("illegal buffer");
|
|
609
|
+
}, i = function() {
|
|
610
|
+
return l.Buffer ? function(a) {
|
|
611
|
+
return (n.create = function(y) {
|
|
612
|
+
return l.Buffer.isBuffer(y) ? new o(y) : e(y);
|
|
613
|
+
})(a);
|
|
614
|
+
} : e;
|
|
615
|
+
};
|
|
616
|
+
n.create = i(), n.prototype._slice = l.Array.prototype.subarray || l.Array.prototype.slice, n.prototype.uint32 = (function() {
|
|
617
|
+
var u = 4294967295;
|
|
618
|
+
return function() {
|
|
619
|
+
if (u = (this.buf[this.pos] & 127) >>> 0, this.buf[this.pos++] < 128 || (u = (u | (this.buf[this.pos] & 127) << 7) >>> 0, this.buf[this.pos++] < 128) || (u = (u | (this.buf[this.pos] & 127) << 14) >>> 0, this.buf[this.pos++] < 128) || (u = (u | (this.buf[this.pos] & 127) << 21) >>> 0, this.buf[this.pos++] < 128) || (u = (u | (this.buf[this.pos] & 15) << 28) >>> 0, this.buf[this.pos++] < 128)) return u;
|
|
620
|
+
if ((this.pos += 5) > this.len) throw this.pos = this.len, c(this, 10);
|
|
621
|
+
return u;
|
|
622
|
+
};
|
|
623
|
+
})(), n.prototype.int32 = function() {
|
|
624
|
+
return this.uint32() | 0;
|
|
625
|
+
}, n.prototype.sint32 = function() {
|
|
626
|
+
var u = this.uint32();
|
|
627
|
+
return u >>> 1 ^ -(u & 1) | 0;
|
|
628
|
+
};
|
|
629
|
+
function t() {
|
|
630
|
+
var s = new h(0, 0), u = 0;
|
|
631
|
+
if (this.len - this.pos > 4) {
|
|
632
|
+
for(; u < 4; ++u)if (s.lo = (s.lo | (this.buf[this.pos] & 127) << u * 7) >>> 0, this.buf[this.pos++] < 128) return s;
|
|
633
|
+
if (s.lo = (s.lo | (this.buf[this.pos] & 127) << 28) >>> 0, s.hi = (s.hi | (this.buf[this.pos] & 127) >> 4) >>> 0, this.buf[this.pos++] < 128) return s;
|
|
634
|
+
u = 0;
|
|
635
|
+
} else {
|
|
636
|
+
for(; u < 3; ++u){
|
|
637
|
+
if (this.pos >= this.len) throw c(this);
|
|
638
|
+
if (s.lo = (s.lo | (this.buf[this.pos] & 127) << u * 7) >>> 0, this.buf[this.pos++] < 128) return s;
|
|
639
|
+
}
|
|
640
|
+
return s.lo = (s.lo | (this.buf[this.pos++] & 127) << u * 7) >>> 0, s;
|
|
641
|
+
}
|
|
642
|
+
if (this.len - this.pos > 4) {
|
|
643
|
+
for(; u < 5; ++u)if (s.hi = (s.hi | (this.buf[this.pos] & 127) << u * 7 + 3) >>> 0, this.buf[this.pos++] < 128) return s;
|
|
644
|
+
} else for(; u < 5; ++u){
|
|
645
|
+
if (this.pos >= this.len) throw c(this);
|
|
646
|
+
if (s.hi = (s.hi | (this.buf[this.pos] & 127) << u * 7 + 3) >>> 0, this.buf[this.pos++] < 128) return s;
|
|
647
|
+
}
|
|
648
|
+
throw Error("invalid varint encoding");
|
|
649
|
+
}
|
|
650
|
+
n.prototype.bool = function() {
|
|
651
|
+
return this.uint32() !== 0;
|
|
652
|
+
};
|
|
653
|
+
function r(s, u) {
|
|
654
|
+
return (s[u - 4] | s[u - 3] << 8 | s[u - 2] << 16 | s[u - 1] << 24) >>> 0;
|
|
655
|
+
}
|
|
656
|
+
n.prototype.fixed32 = function() {
|
|
657
|
+
if (this.pos + 4 > this.len) throw c(this, 4);
|
|
658
|
+
return r(this.buf, this.pos += 4);
|
|
659
|
+
}, n.prototype.sfixed32 = function() {
|
|
660
|
+
if (this.pos + 4 > this.len) throw c(this, 4);
|
|
661
|
+
return r(this.buf, this.pos += 4) | 0;
|
|
662
|
+
};
|
|
663
|
+
function d() {
|
|
664
|
+
if (this.pos + 8 > this.len) throw c(this, 8);
|
|
665
|
+
return new h(r(this.buf, this.pos += 4), r(this.buf, this.pos += 4));
|
|
666
|
+
}
|
|
667
|
+
return n.prototype.float = function() {
|
|
668
|
+
if (this.pos + 4 > this.len) throw c(this, 4);
|
|
669
|
+
var u = l.float.readFloatLE(this.buf, this.pos);
|
|
670
|
+
return this.pos += 4, u;
|
|
671
|
+
}, n.prototype.double = function() {
|
|
672
|
+
if (this.pos + 8 > this.len) throw c(this, 4);
|
|
673
|
+
var u = l.float.readDoubleLE(this.buf, this.pos);
|
|
674
|
+
return this.pos += 8, u;
|
|
675
|
+
}, n.prototype.bytes = function() {
|
|
676
|
+
var u = this.uint32(), a = this.pos, p = this.pos + u;
|
|
677
|
+
if (p > this.len) throw c(this, u);
|
|
678
|
+
if (this.pos += u, Array.isArray(this.buf)) return this.buf.slice(a, p);
|
|
679
|
+
if (a === p) {
|
|
680
|
+
var y = l.Buffer;
|
|
681
|
+
return y ? y.alloc(0) : new this.buf.constructor(0);
|
|
682
|
+
}
|
|
683
|
+
return this._slice.call(this.buf, a, p);
|
|
684
|
+
}, n.prototype.string = function() {
|
|
685
|
+
var u = this.bytes();
|
|
686
|
+
return f.read(u, 0, u.length);
|
|
687
|
+
}, n.prototype.skip = function(u) {
|
|
688
|
+
if (typeof u == "number") {
|
|
689
|
+
if (this.pos + u > this.len) throw c(this, u);
|
|
690
|
+
this.pos += u;
|
|
691
|
+
} else do if (this.pos >= this.len) throw c(this);
|
|
692
|
+
while (this.buf[this.pos++] & 128);
|
|
693
|
+
return this;
|
|
694
|
+
}, n.recursionLimit = l.recursionLimit, n.prototype.skipType = function(s, u) {
|
|
695
|
+
if (u === void 0 && (u = 0), u > n.recursionLimit) throw Error("maximum nesting depth exceeded");
|
|
696
|
+
switch(s){
|
|
697
|
+
case 0:
|
|
698
|
+
this.skip();
|
|
699
|
+
break;
|
|
700
|
+
case 1:
|
|
701
|
+
this.skip(8);
|
|
702
|
+
break;
|
|
703
|
+
case 2:
|
|
704
|
+
this.skip(this.uint32());
|
|
705
|
+
break;
|
|
706
|
+
case 3:
|
|
707
|
+
for(; (s = this.uint32() & 7) !== 4;)this.skipType(s, u + 1);
|
|
708
|
+
break;
|
|
709
|
+
case 5:
|
|
710
|
+
this.skip(4);
|
|
711
|
+
break;
|
|
712
|
+
default:
|
|
713
|
+
throw Error("invalid wire type " + s + " at offset " + this.pos);
|
|
714
|
+
}
|
|
715
|
+
return this;
|
|
716
|
+
}, n._configure = function(s) {
|
|
717
|
+
o = s, n.create = i(), o._configure();
|
|
718
|
+
var u = l.Long ? "toLong" : ("toNumber");
|
|
719
|
+
l.merge(n.prototype, {
|
|
720
|
+
int64: function() {
|
|
721
|
+
return t.call(this)[u](!1);
|
|
722
|
+
},
|
|
723
|
+
uint64: function() {
|
|
724
|
+
return t.call(this)[u](!0);
|
|
725
|
+
},
|
|
726
|
+
sint64: function() {
|
|
727
|
+
return t.call(this).zzDecode()[u](!1);
|
|
728
|
+
},
|
|
729
|
+
fixed64: function() {
|
|
730
|
+
return d.call(this)[u](!0);
|
|
731
|
+
},
|
|
732
|
+
sfixed64: function() {
|
|
733
|
+
return d.call(this)[u](!1);
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
}, ze;
|
|
737
|
+
}
|
|
738
|
+
var Ue, er;
|
|
739
|
+
function Cn() {
|
|
740
|
+
if (er) return Ue;
|
|
741
|
+
er = 1, Ue = h;
|
|
742
|
+
var l = St();
|
|
743
|
+
(h.prototype = Object.create(l.prototype)).constructor = h;
|
|
744
|
+
var o = ne();
|
|
745
|
+
function h(f) {
|
|
746
|
+
l.call(this, f);
|
|
747
|
+
}
|
|
748
|
+
return h._configure = function() {
|
|
749
|
+
o.Buffer && (h.prototype._slice = o.Buffer.prototype.slice);
|
|
750
|
+
}, h.prototype.string = function() {
|
|
751
|
+
var c = this.uint32();
|
|
752
|
+
return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + c, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + c, this.len));
|
|
753
|
+
}, h._configure(), Ue;
|
|
754
|
+
}
|
|
755
|
+
var je = {}, Ye, tr;
|
|
756
|
+
function Rn() {
|
|
757
|
+
if (tr) return Ye;
|
|
758
|
+
tr = 1, Ye = o;
|
|
759
|
+
var l = ne();
|
|
760
|
+
(o.prototype = Object.create(l.EventEmitter.prototype)).constructor = o;
|
|
761
|
+
function o(h, f, c) {
|
|
762
|
+
if (typeof h != "function") throw TypeError("rpcImpl must be a function");
|
|
763
|
+
l.EventEmitter.call(this), this.rpcImpl = h, this.requestDelimited = !!f, this.responseDelimited = !!c;
|
|
764
|
+
}
|
|
765
|
+
return o.prototype.rpcCall = function h(f, c, n, e, i) {
|
|
766
|
+
if (!e) throw TypeError("request must be specified");
|
|
767
|
+
var t = this;
|
|
768
|
+
if (!i) return l.asPromise(h, t, f, c, n, e);
|
|
769
|
+
if (!t.rpcImpl) {
|
|
770
|
+
setTimeout(function() {
|
|
771
|
+
i(Error("already ended"));
|
|
772
|
+
}, 0);
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
try {
|
|
776
|
+
return t.rpcImpl(f, c[t.requestDelimited ? "encodeDelimited" : "encode"](e).finish(), function(d, s) {
|
|
777
|
+
if (d) return t.emit("error", d, f), i(d);
|
|
778
|
+
if (s === null) {
|
|
779
|
+
t.end(!0);
|
|
780
|
+
return;
|
|
781
|
+
}
|
|
782
|
+
if (!(s instanceof n)) try {
|
|
783
|
+
s = n[t.responseDelimited ? "decodeDelimited" : "decode"](s);
|
|
784
|
+
} catch (u) {
|
|
785
|
+
return t.emit("error", u, f), i(u);
|
|
786
|
+
}
|
|
787
|
+
return t.emit("data", s, f), i(null, s);
|
|
788
|
+
});
|
|
789
|
+
} catch (r) {
|
|
790
|
+
t.emit("error", r, f), setTimeout(function() {
|
|
791
|
+
i(r);
|
|
792
|
+
}, 0);
|
|
793
|
+
return;
|
|
794
|
+
}
|
|
795
|
+
}, o.prototype.end = function(f) {
|
|
796
|
+
return this.rpcImpl && (f || this.rpcImpl(null, null, null), this.rpcImpl = null, this.emit("end").off()), this;
|
|
797
|
+
}, Ye;
|
|
798
|
+
}
|
|
799
|
+
var rr;
|
|
800
|
+
function Zr() {
|
|
801
|
+
return rr || (rr = 1, (function(l) {
|
|
802
|
+
var o = l;
|
|
803
|
+
o.Service = Rn();
|
|
804
|
+
})(je)), je;
|
|
805
|
+
}
|
|
806
|
+
var Ke, nr;
|
|
807
|
+
function Vr() {
|
|
808
|
+
return nr || (nr = 1, Ke = {}), Ke;
|
|
809
|
+
}
|
|
810
|
+
var ir;
|
|
811
|
+
function kn() {
|
|
812
|
+
return ir || (ir = 1, (function(l) {
|
|
813
|
+
var o = l;
|
|
814
|
+
o.build = "minimal", o.Writer = kt(), o.BufferWriter = On(), o.Reader = St(), o.BufferReader = Cn(), o.util = ne(), o.rpc = Zr(), o.roots = Vr(), o.configure = h;
|
|
815
|
+
function h() {
|
|
816
|
+
o.util._configure(), o.Writer._configure(o.BufferWriter), o.Reader._configure(o.BufferReader);
|
|
817
|
+
}
|
|
818
|
+
h();
|
|
819
|
+
})(Ze)), Ze;
|
|
820
|
+
}
|
|
821
|
+
var Me = {}, $e = {
|
|
822
|
+
exports: {}
|
|
823
|
+
}, Qe, sr;
|
|
824
|
+
function Sn() {
|
|
825
|
+
if (sr) return Qe;
|
|
826
|
+
sr = 1, Qe = o;
|
|
827
|
+
var l = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;
|
|
828
|
+
function o(f, c) {
|
|
829
|
+
typeof f == "string" && (c = f, f = void 0);
|
|
830
|
+
var n = [];
|
|
831
|
+
function e(t) {
|
|
832
|
+
if (typeof t != "string") {
|
|
833
|
+
var r = i();
|
|
834
|
+
if (o.verbose && console.log("codegen: " + r), r = "return " + r, t) {
|
|
835
|
+
for(var d = Object.keys(t), s = new Array(d.length + 1), u = new Array(d.length), a = 0; a < d.length;)s[a] = d[a], u[a] = t[d[a++]];
|
|
836
|
+
return s[a] = r, Function.apply(null, s).apply(null, u);
|
|
837
|
+
}
|
|
838
|
+
return Function(r)();
|
|
839
|
+
}
|
|
840
|
+
for(var p = new Array(arguments.length - 1), y = 0; y < p.length;)p[y] = arguments[++y];
|
|
841
|
+
if (y = 0, t = t.replace(/%([%dfijs])/g, function(v, m) {
|
|
842
|
+
var g = p[y++];
|
|
843
|
+
switch(m){
|
|
844
|
+
case "d":
|
|
845
|
+
case "f":
|
|
846
|
+
return String(Number(g));
|
|
847
|
+
case "i":
|
|
848
|
+
return String(Math.floor(g));
|
|
849
|
+
case "j":
|
|
850
|
+
return JSON.stringify(g);
|
|
851
|
+
case "s":
|
|
852
|
+
return String(g);
|
|
853
|
+
}
|
|
854
|
+
return "%";
|
|
855
|
+
}), y !== p.length) throw Error("parameter count mismatch");
|
|
856
|
+
return n.push(t), e;
|
|
857
|
+
}
|
|
858
|
+
function i(t) {
|
|
859
|
+
return "function " + h(t || c) + "(" + (f && f.join(",") || "") + `){
|
|
860
|
+
` + n.join(`
|
|
861
|
+
`) + `
|
|
862
|
+
}`;
|
|
863
|
+
}
|
|
864
|
+
return e.toString = i, e;
|
|
865
|
+
}
|
|
866
|
+
o.verbose = !1;
|
|
867
|
+
function h(f) {
|
|
868
|
+
return !f || (f = String(f).replace(/[^\w$]/g, ""), !f) ? "" : (/^\d/.test(f) && (f = "_" + f), l.test(f) ? f + "_" : f);
|
|
869
|
+
}
|
|
870
|
+
return Qe;
|
|
871
|
+
}
|
|
872
|
+
var et, or;
|
|
873
|
+
function Bn() {
|
|
874
|
+
if (or) return et;
|
|
875
|
+
or = 1, et = f;
|
|
876
|
+
var l = Wr(), o = xr(), h = o("fs");
|
|
877
|
+
function f(c, n, e) {
|
|
878
|
+
return typeof n == "function" ? (e = n, n = {}) : n || (n = {}), e ? !n.xhr && h && h.readFile ? h.readFile(c, function(t, r) {
|
|
879
|
+
return t && typeof XMLHttpRequest < "u" ? f.xhr(c, n, e) : t ? e(t) : e(null, n.binary ? r : r.toString("utf8"));
|
|
880
|
+
}) : f.xhr(c, n, e) : l(f, this, c, n);
|
|
881
|
+
}
|
|
882
|
+
return f.xhr = function(n, e, i) {
|
|
883
|
+
var t = new XMLHttpRequest();
|
|
884
|
+
t.onreadystatechange = function() {
|
|
885
|
+
if (t.readyState === 4) {
|
|
886
|
+
if (t.status !== 0 && t.status !== 200) return i(Error("status " + t.status));
|
|
887
|
+
if (e.binary) {
|
|
888
|
+
var d = t.response;
|
|
889
|
+
if (!d) {
|
|
890
|
+
d = [];
|
|
891
|
+
for(var s = 0; s < t.responseText.length; ++s)d.push(t.responseText.charCodeAt(s) & 255);
|
|
892
|
+
}
|
|
893
|
+
return i(null, typeof Uint8Array < "u" ? new Uint8Array(d) : d);
|
|
894
|
+
}
|
|
895
|
+
return i(null, t.responseText);
|
|
896
|
+
}
|
|
897
|
+
}, e.binary && ("overrideMimeType" in t && t.overrideMimeType("text/plain; charset=x-user-defined"), t.responseType = "arraybuffer"), t.open("GET", n), t.send();
|
|
898
|
+
}, et;
|
|
899
|
+
}
|
|
900
|
+
var tt = {}, ar;
|
|
901
|
+
function Nn() {
|
|
902
|
+
return ar || (ar = 1, (function(l) {
|
|
903
|
+
var o = l, h = (o.isAbsolute = function(n) {
|
|
904
|
+
return /^(?:\/|\w+:)/.test(n);
|
|
905
|
+
}), f = (o.normalize = function(n) {
|
|
906
|
+
n = n.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
|
|
907
|
+
var e = n.split("/"), i = h(n), t = "";
|
|
908
|
+
i && (t = e.shift() + "/");
|
|
909
|
+
for(var r = 0; r < e.length;)e[r] === ".." ? r > 0 && e[r - 1] !== ".." ? e.splice(--r, 2) : i ? e.splice(r, 1) : ++r : e[r] === "." ? e.splice(r, 1) : ++r;
|
|
910
|
+
return t + e.join("/");
|
|
911
|
+
});
|
|
912
|
+
o.resolve = function(n, e, i) {
|
|
913
|
+
return i || (e = f(e)), h(e) ? e : (i || (n = f(n)), (n = n.replace(/(?:\/|^)[^/]+$/, "")).length ? f(n + "/" + e) : e);
|
|
914
|
+
};
|
|
915
|
+
})(tt)), tt;
|
|
916
|
+
}
|
|
917
|
+
var rt = {}, ur;
|
|
918
|
+
function Fn() {
|
|
919
|
+
return ur || (ur = 1, (function(l) {
|
|
920
|
+
var o = l;
|
|
921
|
+
o.numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, o.typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/, o.reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/, o.unsafePropertyRe = /^(?:__proto__|prototype|constructor)$/;
|
|
922
|
+
})(rt)), rt;
|
|
923
|
+
}
|
|
924
|
+
var nt, lr;
|
|
925
|
+
function ve() {
|
|
926
|
+
if (lr) return nt;
|
|
927
|
+
lr = 1, nt = t;
|
|
928
|
+
var l = oe();
|
|
929
|
+
((t.prototype = Object.create(l.prototype)).constructor = t).className = "Namespace";
|
|
930
|
+
var o = se(), h = U(), f = de(), c, n, e;
|
|
931
|
+
t.fromJSON = function(s, u, a) {
|
|
932
|
+
return a = h.checkDepth(a), new t(s, u.options).addJSON(u.nested, a);
|
|
933
|
+
};
|
|
934
|
+
function i(d, s) {
|
|
935
|
+
if (d && d.length) {
|
|
936
|
+
for(var u = {}, a = 0; a < d.length; ++a)u[d[a].name] = d[a].toJSON(s);
|
|
937
|
+
return u;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
t.arrayToJSON = i, t.isReservedId = function(s, u) {
|
|
941
|
+
if (s) {
|
|
942
|
+
for(var a = 0; a < s.length; ++a)if (typeof s[a] != "string" && s[a][0] <= u && s[a][1] > u) return !0;
|
|
943
|
+
}
|
|
944
|
+
return !1;
|
|
945
|
+
}, t.isReservedName = function(s, u) {
|
|
946
|
+
if (s) {
|
|
947
|
+
for(var a = 0; a < s.length; ++a)if (s[a] === u) return !0;
|
|
948
|
+
}
|
|
949
|
+
return !1;
|
|
950
|
+
};
|
|
951
|
+
function t(d, s) {
|
|
952
|
+
l.call(this, d, s), this.nested = void 0, this._nestedArray = null, this._lookupCache = Object.create(null), this._needsRecursiveFeatureResolution = !0, this._needsRecursiveResolve = !0;
|
|
953
|
+
}
|
|
954
|
+
function r(d) {
|
|
955
|
+
d._nestedArray = null, d._lookupCache = Object.create(null);
|
|
956
|
+
for(var s = d; s = s.parent;)s._lookupCache = Object.create(null);
|
|
957
|
+
return d;
|
|
958
|
+
}
|
|
959
|
+
return Object.defineProperty(t.prototype, "nestedArray", {
|
|
960
|
+
get: function() {
|
|
961
|
+
return this._nestedArray || (this._nestedArray = h.toArray(this.nested));
|
|
962
|
+
}
|
|
963
|
+
}), t.prototype.toJSON = function(s) {
|
|
964
|
+
return h.toObject([
|
|
965
|
+
"options",
|
|
966
|
+
this.options,
|
|
967
|
+
"nested",
|
|
968
|
+
i(this.nestedArray, s)
|
|
969
|
+
]);
|
|
970
|
+
}, t.prototype.addJSON = function(s, u) {
|
|
971
|
+
u = h.checkDepth(u);
|
|
972
|
+
var a = this;
|
|
973
|
+
if (s) for(var p = Object.keys(s), y = 0, b; y < p.length; ++y)b = s[p[y]], a.add((b.fields !== void 0 ? c.fromJSON : b.values !== void 0 ? e.fromJSON : b.methods !== void 0 ? n.fromJSON : b.id !== void 0 ? o.fromJSON : t.fromJSON)(p[y], b, u + 1));
|
|
974
|
+
return this;
|
|
975
|
+
}, t.prototype.get = function(s) {
|
|
976
|
+
return this.nested && Object.prototype.hasOwnProperty.call(this.nested, s) ? this.nested[s] : null;
|
|
977
|
+
}, t.prototype.getEnum = function(s) {
|
|
978
|
+
if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, s) && this.nested[s] instanceof e) return this.nested[s].values;
|
|
979
|
+
throw Error("no such enum: " + s);
|
|
980
|
+
}, t.prototype.add = function(s) {
|
|
981
|
+
if (!(s instanceof o && s.extend !== void 0 || s instanceof c || s instanceof f || s instanceof e || s instanceof n || s instanceof t)) throw TypeError("object must be a valid nested object");
|
|
982
|
+
if (s.name === "__proto__") return this;
|
|
983
|
+
if (!this.nested) this.nested = {};
|
|
984
|
+
else {
|
|
985
|
+
var u = this.get(s.name);
|
|
986
|
+
if (u) if (u instanceof t && s instanceof t && !(u instanceof c || u instanceof n)) {
|
|
987
|
+
for(var a = u.nestedArray, p = 0; p < a.length; ++p)s.add(a[p]);
|
|
988
|
+
this.remove(u), this.nested || (this.nested = {}), s.setOptions(u.options, !0);
|
|
989
|
+
} else throw Error("duplicate name '" + s.name + "' in " + this);
|
|
990
|
+
}
|
|
991
|
+
this.nested[s.name] = s, this instanceof c || this instanceof n || this instanceof e || this instanceof o || s._edition || (s._edition = s._defaultEdition), this._needsRecursiveFeatureResolution = !0, this._needsRecursiveResolve = !0;
|
|
992
|
+
for(var y = this; y = y.parent;)y._needsRecursiveFeatureResolution = !0, y._needsRecursiveResolve = !0;
|
|
993
|
+
return s.onAdd(this), r(this);
|
|
994
|
+
}, t.prototype.remove = function(s) {
|
|
995
|
+
if (!(s instanceof l)) throw TypeError("object must be a ReflectionObject");
|
|
996
|
+
if (s.parent !== this) throw Error(s + " is not a member of " + this);
|
|
997
|
+
return delete this.nested[s.name], Object.keys(this.nested).length || (this.nested = void 0), s.onRemove(this), r(this);
|
|
998
|
+
}, t.prototype.define = function(s, u) {
|
|
999
|
+
if (h.isString(s)) s = s.split(".");
|
|
1000
|
+
else if (!Array.isArray(s)) throw TypeError("illegal path");
|
|
1001
|
+
if (s && s.length && s[0] === "") throw Error("path must be relative");
|
|
1002
|
+
for(var a = this; s.length > 0;){
|
|
1003
|
+
var p = s.shift();
|
|
1004
|
+
if (a.nested && a.nested[p]) {
|
|
1005
|
+
if (a = a.nested[p], !(a instanceof t)) throw Error("path conflicts with non-namespace objects");
|
|
1006
|
+
} else a.add(a = new t(p));
|
|
1007
|
+
}
|
|
1008
|
+
return u && a.addJSON(u), a;
|
|
1009
|
+
}, t.prototype.resolveAll = function() {
|
|
1010
|
+
if (!this._needsRecursiveResolve) return this;
|
|
1011
|
+
this._resolveFeaturesRecursive(this._edition);
|
|
1012
|
+
var s = this.nestedArray, u = 0;
|
|
1013
|
+
for(this.resolve(); u < s.length;)s[u] instanceof t ? s[u++].resolveAll() : s[u++].resolve();
|
|
1014
|
+
return this._needsRecursiveResolve = !1, this;
|
|
1015
|
+
}, t.prototype._resolveFeaturesRecursive = function(s) {
|
|
1016
|
+
return this._needsRecursiveFeatureResolution ? (this._needsRecursiveFeatureResolution = !1, s = this._edition || s, l.prototype._resolveFeaturesRecursive.call(this, s), this.nestedArray.forEach((u)=>{
|
|
1017
|
+
u._resolveFeaturesRecursive(s);
|
|
1018
|
+
}), this) : this;
|
|
1019
|
+
}, t.prototype.lookup = function(s, u, a) {
|
|
1020
|
+
if (typeof u == "boolean" ? (a = u, u = void 0) : u && !Array.isArray(u) && (u = [
|
|
1021
|
+
u
|
|
1022
|
+
]), h.isString(s) && s.length) {
|
|
1023
|
+
if (s === ".") return this.root;
|
|
1024
|
+
s = s.split(".");
|
|
1025
|
+
} else if (!s.length) return this;
|
|
1026
|
+
var p = s.join(".");
|
|
1027
|
+
if (s[0] === "") return this.root.lookup(s.slice(1), u);
|
|
1028
|
+
var y = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects["." + p];
|
|
1029
|
+
if (y && (!u || u.indexOf(y.constructor) > -1) || (y = this._lookupImpl(s, p), y && (!u || u.indexOf(y.constructor) > -1))) return y;
|
|
1030
|
+
if (a) return null;
|
|
1031
|
+
for(var b = this; b.parent;){
|
|
1032
|
+
if (y = b.parent._lookupImpl(s, p), y && (!u || u.indexOf(y.constructor) > -1)) return y;
|
|
1033
|
+
b = b.parent;
|
|
1034
|
+
}
|
|
1035
|
+
return null;
|
|
1036
|
+
}, t.prototype._lookupImpl = function(s, u) {
|
|
1037
|
+
if (Object.prototype.hasOwnProperty.call(this._lookupCache, u)) return this._lookupCache[u];
|
|
1038
|
+
var a = this.get(s[0]), p = null;
|
|
1039
|
+
if (a) s.length === 1 ? p = a : a instanceof t && (s = s.slice(1), p = a._lookupImpl(s, s.join(".")));
|
|
1040
|
+
else for(var y = 0; y < this.nestedArray.length; ++y)if (this._nestedArray[y] instanceof t && (a = this._nestedArray[y]._lookupImpl(s, u))) {
|
|
1041
|
+
p = a;
|
|
1042
|
+
break;
|
|
1043
|
+
}
|
|
1044
|
+
return this._lookupCache[u] = p, p;
|
|
1045
|
+
}, t.prototype.lookupType = function(s) {
|
|
1046
|
+
var u = this.lookup(s, [
|
|
1047
|
+
c
|
|
1048
|
+
]);
|
|
1049
|
+
if (!u) throw Error("no such type: " + s);
|
|
1050
|
+
return u;
|
|
1051
|
+
}, t.prototype.lookupEnum = function(s) {
|
|
1052
|
+
var u = this.lookup(s, [
|
|
1053
|
+
e
|
|
1054
|
+
]);
|
|
1055
|
+
if (!u) throw Error("no such Enum '" + s + "' in " + this);
|
|
1056
|
+
return u;
|
|
1057
|
+
}, t.prototype.lookupTypeOrEnum = function(s) {
|
|
1058
|
+
var u = this.lookup(s, [
|
|
1059
|
+
c,
|
|
1060
|
+
e
|
|
1061
|
+
]);
|
|
1062
|
+
if (!u) throw Error("no such Type or Enum '" + s + "' in " + this);
|
|
1063
|
+
return u;
|
|
1064
|
+
}, t.prototype.lookupService = function(s) {
|
|
1065
|
+
var u = this.lookup(s, [
|
|
1066
|
+
n
|
|
1067
|
+
]);
|
|
1068
|
+
if (!u) throw Error("no such Service '" + s + "' in " + this);
|
|
1069
|
+
return u;
|
|
1070
|
+
}, t._configure = function(d, s, u) {
|
|
1071
|
+
c = d, n = s, e = u;
|
|
1072
|
+
}, nt;
|
|
1073
|
+
}
|
|
1074
|
+
var it, fr;
|
|
1075
|
+
function Bt() {
|
|
1076
|
+
if (fr) return it;
|
|
1077
|
+
fr = 1, it = f;
|
|
1078
|
+
var l = se();
|
|
1079
|
+
((f.prototype = Object.create(l.prototype)).constructor = f).className = "MapField";
|
|
1080
|
+
var o = ce(), h = U();
|
|
1081
|
+
function f(c, n, e, i, t, r) {
|
|
1082
|
+
if (l.call(this, c, n, i, void 0, void 0, t, r), !h.isString(e)) throw TypeError("keyType must be a string");
|
|
1083
|
+
this.keyType = e, this.resolvedKeyType = null, this.map = !0;
|
|
1084
|
+
}
|
|
1085
|
+
return f.fromJSON = function(n, e) {
|
|
1086
|
+
return new f(n, e.id, e.keyType, e.type, e.options, e.comment);
|
|
1087
|
+
}, f.prototype.toJSON = function(n) {
|
|
1088
|
+
var e = n ? !!n.keepComments : !1;
|
|
1089
|
+
return h.toObject([
|
|
1090
|
+
"keyType",
|
|
1091
|
+
this.keyType,
|
|
1092
|
+
"type",
|
|
1093
|
+
this.type,
|
|
1094
|
+
"id",
|
|
1095
|
+
this.id,
|
|
1096
|
+
"extend",
|
|
1097
|
+
this.extend,
|
|
1098
|
+
"options",
|
|
1099
|
+
this.options,
|
|
1100
|
+
"comment",
|
|
1101
|
+
e ? this.comment : void 0
|
|
1102
|
+
]);
|
|
1103
|
+
}, f.prototype.resolve = function() {
|
|
1104
|
+
if (this.resolved) return this;
|
|
1105
|
+
if (o.mapKey[this.keyType] === void 0) throw Error("invalid key type: " + this.keyType);
|
|
1106
|
+
return l.prototype.resolve.call(this);
|
|
1107
|
+
}, f.d = function(n, e, i) {
|
|
1108
|
+
return typeof i == "function" ? i = h.decorateType(i).name : i && typeof i == "object" && (i = h.decorateEnum(i).name), function(r, d) {
|
|
1109
|
+
h.decorateType(r.constructor).add(new f(d, n, e, i));
|
|
1110
|
+
};
|
|
1111
|
+
}, it;
|
|
1112
|
+
}
|
|
1113
|
+
var st, cr;
|
|
1114
|
+
function Nt() {
|
|
1115
|
+
if (cr) return st;
|
|
1116
|
+
cr = 1, st = h;
|
|
1117
|
+
var l = oe();
|
|
1118
|
+
((h.prototype = Object.create(l.prototype)).constructor = h).className = "Method";
|
|
1119
|
+
var o = U();
|
|
1120
|
+
function h(f, c, n, e, i, t, r, d, s) {
|
|
1121
|
+
if (o.isObject(i) ? (r = i, i = t = void 0) : o.isObject(t) && (r = t, t = void 0), !(c === void 0 || o.isString(c))) throw TypeError("type must be a string");
|
|
1122
|
+
if (!o.isString(n)) throw TypeError("requestType must be a string");
|
|
1123
|
+
if (!o.isString(e)) throw TypeError("responseType must be a string");
|
|
1124
|
+
l.call(this, f, r), this.type = c || "rpc", this.requestType = n, this.requestStream = i ? !0 : void 0, this.responseType = e, this.responseStream = t ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = d, this.parsedOptions = s;
|
|
1125
|
+
}
|
|
1126
|
+
return h.fromJSON = function(c, n) {
|
|
1127
|
+
return new h(c, n.type, n.requestType, n.responseType, n.requestStream, n.responseStream, n.options, n.comment, n.parsedOptions);
|
|
1128
|
+
}, h.prototype.toJSON = function(c) {
|
|
1129
|
+
var n = c ? !!c.keepComments : !1;
|
|
1130
|
+
return o.toObject([
|
|
1131
|
+
"type",
|
|
1132
|
+
this.type !== "rpc" && this.type || void 0,
|
|
1133
|
+
"requestType",
|
|
1134
|
+
this.requestType,
|
|
1135
|
+
"requestStream",
|
|
1136
|
+
this.requestStream,
|
|
1137
|
+
"responseType",
|
|
1138
|
+
this.responseType,
|
|
1139
|
+
"responseStream",
|
|
1140
|
+
this.responseStream,
|
|
1141
|
+
"options",
|
|
1142
|
+
this.options,
|
|
1143
|
+
"comment",
|
|
1144
|
+
n ? this.comment : void 0,
|
|
1145
|
+
"parsedOptions",
|
|
1146
|
+
this.parsedOptions
|
|
1147
|
+
]);
|
|
1148
|
+
}, h.prototype.resolve = function() {
|
|
1149
|
+
return this.resolved ? this : (this.resolvedRequestType = this.parent.lookupType(this.requestType), this.resolvedResponseType = this.parent.lookupType(this.responseType), l.prototype.resolve.call(this));
|
|
1150
|
+
}, st;
|
|
1151
|
+
}
|
|
1152
|
+
var ot, dr;
|
|
1153
|
+
function Ft() {
|
|
1154
|
+
if (dr) return ot;
|
|
1155
|
+
dr = 1, ot = n;
|
|
1156
|
+
var l = ve();
|
|
1157
|
+
((n.prototype = Object.create(l.prototype)).constructor = n).className = "Service";
|
|
1158
|
+
var o = Nt(), h = U(), f = Zr(), c = h.patterns.reservedRe;
|
|
1159
|
+
function n(i, t) {
|
|
1160
|
+
l.call(this, i, t), this.methods = {}, this._methodsArray = null;
|
|
1161
|
+
}
|
|
1162
|
+
n.fromJSON = function(t, r, d) {
|
|
1163
|
+
d = h.checkDepth(d);
|
|
1164
|
+
var s = new n(t, r.options);
|
|
1165
|
+
if (r.methods) for(var u = Object.keys(r.methods), a = 0; a < u.length; ++a)s.add(o.fromJSON(u[a], r.methods[u[a]]));
|
|
1166
|
+
return r.nested && s.addJSON(r.nested, d), r.edition && (s._edition = r.edition), s.comment = r.comment, s._defaultEdition = "proto3", s;
|
|
1167
|
+
}, n.prototype.toJSON = function(t) {
|
|
1168
|
+
var r = l.prototype.toJSON.call(this, t), d = t ? !!t.keepComments : !1;
|
|
1169
|
+
return h.toObject([
|
|
1170
|
+
"edition",
|
|
1171
|
+
this._editionToJSON(),
|
|
1172
|
+
"options",
|
|
1173
|
+
r && r.options || void 0,
|
|
1174
|
+
"methods",
|
|
1175
|
+
l.arrayToJSON(this.methodsArray, t) || {},
|
|
1176
|
+
"nested",
|
|
1177
|
+
r && r.nested || void 0,
|
|
1178
|
+
"comment",
|
|
1179
|
+
d ? this.comment : void 0
|
|
1180
|
+
]);
|
|
1181
|
+
}, Object.defineProperty(n.prototype, "methodsArray", {
|
|
1182
|
+
get: function() {
|
|
1183
|
+
return this._methodsArray || (this._methodsArray = h.toArray(this.methods));
|
|
1184
|
+
}
|
|
1185
|
+
});
|
|
1186
|
+
function e(i) {
|
|
1187
|
+
return i._methodsArray = null, i;
|
|
1188
|
+
}
|
|
1189
|
+
return n.prototype.get = function(t) {
|
|
1190
|
+
return Object.prototype.hasOwnProperty.call(this.methods, t) ? this.methods[t] : l.prototype.get.call(this, t);
|
|
1191
|
+
}, n.prototype.resolveAll = function() {
|
|
1192
|
+
if (!this._needsRecursiveResolve) return this;
|
|
1193
|
+
l.prototype.resolve.call(this);
|
|
1194
|
+
for(var t = this.methodsArray, r = 0; r < t.length; ++r)t[r].resolve();
|
|
1195
|
+
return this;
|
|
1196
|
+
}, n.prototype._resolveFeaturesRecursive = function(t) {
|
|
1197
|
+
return this._needsRecursiveFeatureResolution ? (t = this._edition || t, l.prototype._resolveFeaturesRecursive.call(this, t), this.methodsArray.forEach((r)=>{
|
|
1198
|
+
r._resolveFeaturesRecursive(t);
|
|
1199
|
+
}), this) : this;
|
|
1200
|
+
}, n.prototype.add = function(t) {
|
|
1201
|
+
if (this.get(t.name)) throw Error("duplicate name '" + t.name + "' in " + this);
|
|
1202
|
+
return t instanceof o ? t.name === "__proto__" ? this : (this.methods[t.name] = t, t.parent = this, e(this)) : l.prototype.add.call(this, t);
|
|
1203
|
+
}, n.prototype.remove = function(t) {
|
|
1204
|
+
if (t instanceof o) {
|
|
1205
|
+
if (this.methods[t.name] !== t) throw Error(t + " is not a member of " + this);
|
|
1206
|
+
return delete this.methods[t.name], t.parent = null, e(this);
|
|
1207
|
+
}
|
|
1208
|
+
return l.prototype.remove.call(this, t);
|
|
1209
|
+
}, n.prototype.create = function(t, r, d) {
|
|
1210
|
+
for(var s = new f.Service(t, r, d), u = 0, a; u < this.methodsArray.length; ++u){
|
|
1211
|
+
var p = h.lcFirst((a = this._methodsArray[u]).resolve().name).replace(/[^$\w_]/g, "");
|
|
1212
|
+
s[p] = h.codegen([
|
|
1213
|
+
"r",
|
|
1214
|
+
"c"
|
|
1215
|
+
], c.test(p) ? p + "_" : p)("return this.rpcCall(m,q,s,r,c)")({
|
|
1216
|
+
m: a,
|
|
1217
|
+
q: a.resolvedRequestType.ctor,
|
|
1218
|
+
s: a.resolvedResponseType.ctor
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1221
|
+
return s;
|
|
1222
|
+
}, ot;
|
|
1223
|
+
}
|
|
1224
|
+
var at, hr;
|
|
1225
|
+
function Et() {
|
|
1226
|
+
if (hr) return at;
|
|
1227
|
+
hr = 1, at = o;
|
|
1228
|
+
var l = ne();
|
|
1229
|
+
function o(h) {
|
|
1230
|
+
if (h) for(var f = Object.keys(h), c = 0; c < f.length; ++c){
|
|
1231
|
+
var n = f[c];
|
|
1232
|
+
n !== "__proto__" && (this[n] = h[n]);
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
return o.create = function(f) {
|
|
1236
|
+
return this.$type.create(f);
|
|
1237
|
+
}, o.encode = function(f, c) {
|
|
1238
|
+
return this.$type.encode(f, c);
|
|
1239
|
+
}, o.encodeDelimited = function(f, c) {
|
|
1240
|
+
return this.$type.encodeDelimited(f, c);
|
|
1241
|
+
}, o.decode = function(f) {
|
|
1242
|
+
return this.$type.decode(f);
|
|
1243
|
+
}, o.decodeDelimited = function(f) {
|
|
1244
|
+
return this.$type.decodeDelimited(f);
|
|
1245
|
+
}, o.verify = function(f) {
|
|
1246
|
+
return this.$type.verify(f);
|
|
1247
|
+
}, o.fromObject = function(f) {
|
|
1248
|
+
return this.$type.fromObject(f);
|
|
1249
|
+
}, o.toObject = function(f, c) {
|
|
1250
|
+
return this.$type.toObject(f, c);
|
|
1251
|
+
}, o.prototype.toJSON = function() {
|
|
1252
|
+
return this.$type.toObject(this, l.toJSONOptions);
|
|
1253
|
+
}, at;
|
|
1254
|
+
}
|
|
1255
|
+
var ut, pr;
|
|
1256
|
+
function Tr() {
|
|
1257
|
+
if (pr) return ut;
|
|
1258
|
+
pr = 1, ut = c;
|
|
1259
|
+
var l = re(), o = ce(), h = U();
|
|
1260
|
+
function f(n) {
|
|
1261
|
+
return "missing required '" + n.name + "'";
|
|
1262
|
+
}
|
|
1263
|
+
function c(n) {
|
|
1264
|
+
for(var e = h.codegen([
|
|
1265
|
+
"r",
|
|
1266
|
+
"l",
|
|
1267
|
+
"e",
|
|
1268
|
+
"n"
|
|
1269
|
+
], n.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("if(n===undefined)n=0")("if(n>Reader.recursionLimit)")('throw Error("maximum nesting depth exceeded")')("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (n.fieldsArray.filter(function(u) {
|
|
1270
|
+
return u.map;
|
|
1271
|
+
}).length ? ",k,value" : ""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"), i = 0; i < n.fieldsArray.length; ++i){
|
|
1272
|
+
var t = n._fieldsArray[i].resolve(), r = t.resolvedType instanceof l ? "int32" : t.type, d = "m" + h.safeProp(t.name);
|
|
1273
|
+
e("case %i: {", t.id), t.map ? (e("if(%s===util.emptyObject)", d)("%s={}", d)("var c2 = r.uint32()+r.pos"), o.defaults[t.keyType] !== void 0 ? e("k=%j", o.defaults[t.keyType]) : e("k=null"), o.defaults[r] !== void 0 ? e("value=%j", o.defaults[r]) : e("value=null"), e("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break", t.keyType)("case 2:"), o.basic[r] === void 0 ? e("value=types[%i].decode(r,r.uint32(),undefined,n+1)", i) : e("value=r.%s()", r), e("break")("default:")("r.skipType(tag2&7,n)")("break")("}")("}"), o.long[t.keyType] !== void 0 ? e('%s[typeof k==="object"?util.longToHash(k):k]=value', d) : (t.keyType === "string" && e('if(k==="__proto__")')("util.makeProp(%s,k)", d), e("%s[k]=value", d))) : t.repeated ? (e("if(!(%s&&%s.length))", d, d)("%s=[]", d), o.packed[r] !== void 0 && e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())", d, r)("}else"), o.basic[r] === void 0 ? e(t.delimited ? "%s.push(types[%i].decode(r,undefined,((t&~7)|4),n+1))" : "%s.push(types[%i].decode(r,r.uint32(),undefined,n+1))", d, i) : e("%s.push(r.%s())", d, r)) : o.basic[r] === void 0 ? e(t.delimited ? "%s=types[%i].decode(r,undefined,((t&~7)|4),n+1)" : "%s=types[%i].decode(r,r.uint32(),undefined,n+1)", d, i) : e("%s=r.%s()", d, r), e("break")("}");
|
|
1274
|
+
}
|
|
1275
|
+
for(e("default:")("r.skipType(t&7,n)")("break")("}")("}"), i = 0; i < n._fieldsArray.length; ++i){
|
|
1276
|
+
var s = n._fieldsArray[i];
|
|
1277
|
+
s.required && e("if(!m.hasOwnProperty(%j))", s.name)("throw util.ProtocolError(%j,{instance:m})", f(s));
|
|
1278
|
+
}
|
|
1279
|
+
return e("return m");
|
|
1280
|
+
}
|
|
1281
|
+
return ut;
|
|
1282
|
+
}
|
|
1283
|
+
var lt, yr;
|
|
1284
|
+
function Gr() {
|
|
1285
|
+
if (yr) return lt;
|
|
1286
|
+
yr = 1, lt = n;
|
|
1287
|
+
var l = re(), o = U();
|
|
1288
|
+
function h(e, i) {
|
|
1289
|
+
return e.name + ": " + i + (e.repeated && i !== "array" ? "[]" : e.map && i !== "object" ? "{k:" + e.keyType + "}" : "") + " expected";
|
|
1290
|
+
}
|
|
1291
|
+
function f(e, i, t, r) {
|
|
1292
|
+
if (i.resolvedType) if (i.resolvedType instanceof l) {
|
|
1293
|
+
e("switch(%s){", r)("default:")("return%j", h(i, "enum value"));
|
|
1294
|
+
for(var d = Object.keys(i.resolvedType.values), s = 0; s < d.length; ++s)e("case %i:", i.resolvedType.values[d[s]]);
|
|
1295
|
+
e("break")("}");
|
|
1296
|
+
} else e("{")("var e=types[%i].verify(%s,n+1);", t, r)("if(e)")("return%j+e", i.name + ".")("}");
|
|
1297
|
+
else switch(i.type){
|
|
1298
|
+
case "int32":
|
|
1299
|
+
case "uint32":
|
|
1300
|
+
case "sint32":
|
|
1301
|
+
case "fixed32":
|
|
1302
|
+
case "sfixed32":
|
|
1303
|
+
e("if(!util.isInteger(%s))", r)("return%j", h(i, "integer"));
|
|
1304
|
+
break;
|
|
1305
|
+
case "int64":
|
|
1306
|
+
case "uint64":
|
|
1307
|
+
case "sint64":
|
|
1308
|
+
case "fixed64":
|
|
1309
|
+
case "sfixed64":
|
|
1310
|
+
e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", r, r, r, r)("return%j", h(i, "integer|Long"));
|
|
1311
|
+
break;
|
|
1312
|
+
case "float":
|
|
1313
|
+
case "double":
|
|
1314
|
+
e('if(typeof %s!=="number")', r)("return%j", h(i, "number"));
|
|
1315
|
+
break;
|
|
1316
|
+
case "bool":
|
|
1317
|
+
e('if(typeof %s!=="boolean")', r)("return%j", h(i, "boolean"));
|
|
1318
|
+
break;
|
|
1319
|
+
case "string":
|
|
1320
|
+
e("if(!util.isString(%s))", r)("return%j", h(i, "string"));
|
|
1321
|
+
break;
|
|
1322
|
+
case "bytes":
|
|
1323
|
+
e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))', r, r, r)("return%j", h(i, "buffer"));
|
|
1324
|
+
break;
|
|
1325
|
+
}
|
|
1326
|
+
return e;
|
|
1327
|
+
}
|
|
1328
|
+
function c(e, i, t) {
|
|
1329
|
+
switch(i.keyType){
|
|
1330
|
+
case "int32":
|
|
1331
|
+
case "uint32":
|
|
1332
|
+
case "sint32":
|
|
1333
|
+
case "fixed32":
|
|
1334
|
+
case "sfixed32":
|
|
1335
|
+
e("if(!util.key32Re.test(%s))", t)("return%j", h(i, "integer key"));
|
|
1336
|
+
break;
|
|
1337
|
+
case "int64":
|
|
1338
|
+
case "uint64":
|
|
1339
|
+
case "sint64":
|
|
1340
|
+
case "fixed64":
|
|
1341
|
+
case "sfixed64":
|
|
1342
|
+
e("if(!util.key64Re.test(%s))", t)("return%j", h(i, "integer|Long key"));
|
|
1343
|
+
break;
|
|
1344
|
+
case "bool":
|
|
1345
|
+
e("if(!util.key2Re.test(%s))", t)("return%j", h(i, "boolean key"));
|
|
1346
|
+
break;
|
|
1347
|
+
}
|
|
1348
|
+
return e;
|
|
1349
|
+
}
|
|
1350
|
+
function n(e) {
|
|
1351
|
+
var i = o.codegen([
|
|
1352
|
+
"m",
|
|
1353
|
+
"n"
|
|
1354
|
+
], e.name + "$verify")('if(typeof m!=="object"||m===null)')("return%j", "object expected")("if(n===undefined)n=0")("if(n>util.recursionLimit)")("return%j", "maximum nesting depth exceeded"), t = e.oneofsArray, r = {};
|
|
1355
|
+
t.length && i("var p={}");
|
|
1356
|
+
for(var d = 0; d < e.fieldsArray.length; ++d){
|
|
1357
|
+
var s = e._fieldsArray[d].resolve(), u = "m" + o.safeProp(s.name);
|
|
1358
|
+
if (s.optional && i("if(%s!=null&&m.hasOwnProperty(%j)){", u, s.name), s.map) i("if(!util.isObject(%s))", u)("return%j", h(s, "object"))("var k=Object.keys(%s)", u)("for(var i=0;i<k.length;++i){"), c(i, s, "k[i]"), f(i, s, d, u + "[k[i]]")("}");
|
|
1359
|
+
else if (s.repeated) i("if(!Array.isArray(%s))", u)("return%j", h(s, "array"))("for(var i=0;i<%s.length;++i){", u), f(i, s, d, u + "[i]")("}");
|
|
1360
|
+
else {
|
|
1361
|
+
if (s.partOf) {
|
|
1362
|
+
var a = o.safeProp(s.partOf.name);
|
|
1363
|
+
r[s.partOf.name] === 1 && i("if(p%s===1)", a)("return%j", s.partOf.name + ": multiple values"), r[s.partOf.name] = 1, i("p%s=1", a);
|
|
1364
|
+
}
|
|
1365
|
+
f(i, s, d, u);
|
|
1366
|
+
}
|
|
1367
|
+
s.optional && i("}");
|
|
1368
|
+
}
|
|
1369
|
+
return i("return null");
|
|
15
1370
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1371
|
+
return lt;
|
|
1372
|
+
}
|
|
1373
|
+
var ft = {}, mr;
|
|
1374
|
+
function Jr() {
|
|
1375
|
+
return mr || (mr = 1, (function(l) {
|
|
1376
|
+
var o = l, h = re(), f = U();
|
|
1377
|
+
function c(e, i, t, r) {
|
|
1378
|
+
var d = !1;
|
|
1379
|
+
if (i.resolvedType) if (i.resolvedType instanceof h) {
|
|
1380
|
+
e("switch(d%s){", r);
|
|
1381
|
+
for(var s = i.resolvedType.values, u = Object.keys(s), a = 0; a < u.length; ++a)s[u[a]] === i.typeDefault && !d && (e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', r, r, r), i.repeated || e("break"), d = !0), e("case%j:", u[a])("case %i:", s[u[a]])("m%s=%j", r, s[u[a]])("break");
|
|
1382
|
+
e("}");
|
|
1383
|
+
} else e('if(typeof d%s!=="object")', r)("throw TypeError(%j)", i.fullName + ": object expected")("m%s=types[%i].fromObject(d%s,n+1)", r, t, r);
|
|
1384
|
+
else {
|
|
1385
|
+
var p = !1;
|
|
1386
|
+
switch(i.type){
|
|
1387
|
+
case "double":
|
|
1388
|
+
case "float":
|
|
1389
|
+
e("m%s=Number(d%s)", r, r);
|
|
1390
|
+
break;
|
|
1391
|
+
case "uint32":
|
|
1392
|
+
case "fixed32":
|
|
1393
|
+
e("m%s=d%s>>>0", r, r);
|
|
1394
|
+
break;
|
|
1395
|
+
case "int32":
|
|
1396
|
+
case "sint32":
|
|
1397
|
+
case "sfixed32":
|
|
1398
|
+
e("m%s=d%s|0", r, r);
|
|
1399
|
+
break;
|
|
1400
|
+
case "uint64":
|
|
1401
|
+
p = !0;
|
|
1402
|
+
case "int64":
|
|
1403
|
+
case "sint64":
|
|
1404
|
+
case "fixed64":
|
|
1405
|
+
case "sfixed64":
|
|
1406
|
+
e("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" : "");
|
|
1407
|
+
break;
|
|
1408
|
+
case "bytes":
|
|
1409
|
+
e('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);
|
|
1410
|
+
break;
|
|
1411
|
+
case "string":
|
|
1412
|
+
e("m%s=String(d%s)", r, r);
|
|
1413
|
+
break;
|
|
1414
|
+
case "bool":
|
|
1415
|
+
e("m%s=Boolean(d%s)", r, r);
|
|
1416
|
+
break;
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
return e;
|
|
1420
|
+
}
|
|
1421
|
+
o.fromObject = function(i) {
|
|
1422
|
+
var t = i.fieldsArray, r = f.codegen([
|
|
1423
|
+
"d",
|
|
1424
|
+
"n"
|
|
1425
|
+
], i.name + "$fromObject")("if(d instanceof this.ctor)")("return d")("if(n===undefined)n=0")("if(n>util.recursionLimit)")('throw Error("maximum nesting depth exceeded")');
|
|
1426
|
+
if (!t.length) return r("return new this.ctor");
|
|
1427
|
+
r("var m=new this.ctor");
|
|
1428
|
+
for(var d = 0; d < t.length; ++d){
|
|
1429
|
+
var s = t[d].resolve(), u = f.safeProp(s.name);
|
|
1430
|
+
s.map ? (r("if(d%s){", u)('if(typeof d%s!=="object")', u)("throw TypeError(%j)", s.fullName + ": object expected")("m%s={}", u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", u), r('if(ks[i]==="__proto__")')("util.makeProp(m%s,ks[i])", u), c(r, s, d, u + "[ks[i]]")("}")("}")) : s.repeated ? (r("if(d%s){", u)("if(!Array.isArray(d%s))", u)("throw TypeError(%j)", s.fullName + ": array expected")("m%s=[]", u)("for(var i=0;i<d%s.length;++i){", u), c(r, s, d, u + "[i]")("}")("}")) : (s.resolvedType instanceof h || r("if(d%s!=null){", u), c(r, s, d, u), s.resolvedType instanceof h || r("}"));
|
|
1431
|
+
}
|
|
1432
|
+
return r("return m");
|
|
1433
|
+
};
|
|
1434
|
+
function n(e, i, t, r) {
|
|
1435
|
+
if (i.resolvedType) i.resolvedType instanceof h ? e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s", r, t, r, r, t, r, r) : e("d%s=types[%i].toObject(m%s,o)", r, t, r);
|
|
1436
|
+
else {
|
|
1437
|
+
var d = !1;
|
|
1438
|
+
switch(i.type){
|
|
1439
|
+
case "double":
|
|
1440
|
+
case "float":
|
|
1441
|
+
e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s", r, r, r, r);
|
|
1442
|
+
break;
|
|
1443
|
+
case "uint64":
|
|
1444
|
+
d = !0;
|
|
1445
|
+
case "int64":
|
|
1446
|
+
case "sint64":
|
|
1447
|
+
case "fixed64":
|
|
1448
|
+
case "sfixed64":
|
|
1449
|
+
e('if(typeof m%s==="number")', r)("d%s=o.longs===String?String(m%s):m%s", r, r, r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", r, r, r, r, d ? "true" : "", r);
|
|
1450
|
+
break;
|
|
1451
|
+
case "bytes":
|
|
1452
|
+
e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", r, r, r, r, r);
|
|
1453
|
+
break;
|
|
1454
|
+
default:
|
|
1455
|
+
e("d%s=m%s", r, r);
|
|
1456
|
+
break;
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
return e;
|
|
1460
|
+
}
|
|
1461
|
+
o.toObject = function(i) {
|
|
1462
|
+
var t = i.fieldsArray.slice().sort(f.compareFieldsById);
|
|
1463
|
+
if (!t.length) return f.codegen()("return {}");
|
|
1464
|
+
for(var r = f.codegen([
|
|
1465
|
+
"m",
|
|
1466
|
+
"o"
|
|
1467
|
+
], i.name + "$toObject")("if(!o)")("o={}")("var d={}"), d = [], s = [], u = [], a = 0; a < t.length; ++a)t[a].partOf || (t[a].resolve().repeated ? d : t[a].map ? s : u).push(t[a]);
|
|
1468
|
+
if (d.length) {
|
|
1469
|
+
for(r("if(o.arrays||o.defaults){"), a = 0; a < d.length; ++a)r("d%s=[]", f.safeProp(d[a].name));
|
|
1470
|
+
r("}");
|
|
1471
|
+
}
|
|
1472
|
+
if (s.length) {
|
|
1473
|
+
for(r("if(o.objects||o.defaults){"), a = 0; a < s.length; ++a)r("d%s={}", f.safeProp(s[a].name));
|
|
1474
|
+
r("}");
|
|
1475
|
+
}
|
|
1476
|
+
if (u.length) {
|
|
1477
|
+
for(r("if(o.defaults){"), a = 0; a < u.length; ++a){
|
|
1478
|
+
var p = u[a], y = f.safeProp(p.name);
|
|
1479
|
+
if (p.resolvedType instanceof h) r("d%s=o.enums===String?%j:%j", y, p.resolvedType.valuesById[p.typeDefault], p.typeDefault);
|
|
1480
|
+
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", y)("}else")("d%s=o.longs===String?%j:%i", y, p.typeDefault.toString(), p.typeDefault.toNumber());
|
|
1481
|
+
else if (p.bytes) {
|
|
1482
|
+
var b = Array.prototype.slice.call(p.typeDefault);
|
|
1483
|
+
r("if(o.bytes===String)d%s=%j", y, String.fromCharCode.apply(String, p.typeDefault))("else{")("d%s=%j", y, b)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", y, y)("}");
|
|
1484
|
+
} else r("d%s=%j", y, p.typeDefault);
|
|
1485
|
+
}
|
|
1486
|
+
r("}");
|
|
1487
|
+
}
|
|
1488
|
+
var v = !1;
|
|
1489
|
+
for(a = 0; a < t.length; ++a){
|
|
1490
|
+
var p = t[a], m = i._fieldsArray.indexOf(p), y = f.safeProp(p.name);
|
|
1491
|
+
p.map ? (v || (v = !0, r("var ks2")), r("if(m%s&&(ks2=Object.keys(m%s)).length){", y, y)("d%s={}", y)("for(var j=0;j<ks2.length;++j){"), r('if(ks2[j]==="__proto__")')("util.makeProp(d%s,ks2[j])", y), n(r, p, m, y + "[ks2[j]]")("}")) : p.repeated ? (r("if(m%s&&m%s.length){", y, y)("d%s=[]", y)("for(var j=0;j<m%s.length;++j){", y), n(r, p, m, y + "[j]")("}")) : (r("if(m%s!=null&&m.hasOwnProperty(%j)){", y, p.name), n(r, p, m, y), p.partOf && r("if(o.oneofs)")("d%s=%j", f.safeProp(p.partOf.name), p.name)), r("}");
|
|
1492
|
+
}
|
|
1493
|
+
return r("return d");
|
|
1494
|
+
};
|
|
1495
|
+
})(ft)), ft;
|
|
1496
|
+
}
|
|
1497
|
+
var ct = {}, vr;
|
|
1498
|
+
function Pr() {
|
|
1499
|
+
return vr || (vr = 1, (function(l) {
|
|
1500
|
+
var o = l, h = Et();
|
|
1501
|
+
o[".google.protobuf.Any"] = {
|
|
1502
|
+
fromObject: function(f, c) {
|
|
1503
|
+
if (f && f["@type"]) {
|
|
1504
|
+
var n = f["@type"].substring(f["@type"].lastIndexOf("/") + 1), e = this.lookup(n);
|
|
1505
|
+
if (e) {
|
|
1506
|
+
var i = f["@type"].charAt(0) === "." ? f["@type"].slice(1) : f["@type"];
|
|
1507
|
+
i.indexOf("/") === -1 && (i = "/" + i);
|
|
1508
|
+
var t = c === void 0 ? 1 : c + 1;
|
|
1509
|
+
return this.create({
|
|
1510
|
+
type_url: i,
|
|
1511
|
+
value: e.encode(e.fromObject(f, t)).finish()
|
|
1512
|
+
});
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
return this.fromObject(f, c);
|
|
1516
|
+
},
|
|
1517
|
+
toObject: function(f, c) {
|
|
1518
|
+
var n = "type.googleapis.com/", e = "", i = "";
|
|
1519
|
+
if (c && c.json && f.type_url && f.value) {
|
|
1520
|
+
i = f.type_url.substring(f.type_url.lastIndexOf("/") + 1), e = f.type_url.substring(0, f.type_url.lastIndexOf("/") + 1);
|
|
1521
|
+
var t = this.lookup(i);
|
|
1522
|
+
t && (f = t.decode(f.value));
|
|
1523
|
+
}
|
|
1524
|
+
if (!(f instanceof this.ctor) && f instanceof h) {
|
|
1525
|
+
var r = f.$type.toObject(f, c), d = f.$type.fullName[0] === "." ? f.$type.fullName.slice(1) : f.$type.fullName;
|
|
1526
|
+
return e === "" && (e = n), i = e + d, r["@type"] = i, r;
|
|
1527
|
+
}
|
|
1528
|
+
return this.toObject(f, c);
|
|
1529
|
+
}
|
|
1530
|
+
};
|
|
1531
|
+
})(ct)), ct;
|
|
1532
|
+
}
|
|
1533
|
+
var dt, gr;
|
|
1534
|
+
function Wt() {
|
|
1535
|
+
if (gr) return dt;
|
|
1536
|
+
gr = 1, dt = y;
|
|
1537
|
+
var l = ve();
|
|
1538
|
+
((y.prototype = Object.create(l.prototype)).constructor = y).className = "Type";
|
|
1539
|
+
var o = re(), h = de(), f = se(), c = Bt(), n = Ft(), e = Et(), i = St(), t = kt(), r = U(), d = Lr(), s = Tr(), u = Gr(), a = Jr(), p = Pr();
|
|
1540
|
+
function y(v, m) {
|
|
1541
|
+
v = v.replace(/\W/g, ""), l.call(this, v, m), 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;
|
|
1542
|
+
}
|
|
1543
|
+
Object.defineProperties(y.prototype, {
|
|
1544
|
+
fieldsById: {
|
|
1545
|
+
get: function() {
|
|
1546
|
+
if (this._fieldsById) return this._fieldsById;
|
|
1547
|
+
this._fieldsById = {};
|
|
1548
|
+
for(var v = Object.keys(this.fields), m = 0; m < v.length; ++m){
|
|
1549
|
+
var g = this.fields[v[m]], O = g.id;
|
|
1550
|
+
if (this._fieldsById[O]) throw Error("duplicate id " + O + " in " + this);
|
|
1551
|
+
this._fieldsById[O] = g;
|
|
1552
|
+
}
|
|
1553
|
+
return this._fieldsById;
|
|
1554
|
+
}
|
|
1555
|
+
},
|
|
1556
|
+
fieldsArray: {
|
|
1557
|
+
get: function() {
|
|
1558
|
+
return this._fieldsArray || (this._fieldsArray = r.toArray(this.fields));
|
|
1559
|
+
}
|
|
1560
|
+
},
|
|
1561
|
+
oneofsArray: {
|
|
1562
|
+
get: function() {
|
|
1563
|
+
return this._oneofsArray || (this._oneofsArray = r.toArray(this.oneofs));
|
|
1564
|
+
}
|
|
1565
|
+
},
|
|
1566
|
+
ctor: {
|
|
1567
|
+
get: function() {
|
|
1568
|
+
return this._ctor || (this.ctor = y.generateConstructor(this)());
|
|
1569
|
+
},
|
|
1570
|
+
set: function(v) {
|
|
1571
|
+
var m = v.prototype;
|
|
1572
|
+
m instanceof e || ((v.prototype = new e()).constructor = v, r.merge(v.prototype, m)), v.$type = v.prototype.$type = this, r.merge(v, e, !0), this._ctor = v;
|
|
1573
|
+
for(var g = 0; g < this.fieldsArray.length; ++g)this._fieldsArray[g].resolve();
|
|
1574
|
+
var O = {};
|
|
1575
|
+
for(g = 0; g < this.oneofsArray.length; ++g)O[this._oneofsArray[g].resolve().name] = {
|
|
1576
|
+
get: r.oneOfGetter(this._oneofsArray[g].oneof),
|
|
1577
|
+
set: r.oneOfSetter(this._oneofsArray[g].oneof)
|
|
1578
|
+
};
|
|
1579
|
+
g && Object.defineProperties(v.prototype, O);
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
}), y.generateConstructor = function(m) {
|
|
1583
|
+
for(var g = r.codegen([
|
|
1584
|
+
"p"
|
|
1585
|
+
], m.name), O = 0, N; O < m.fieldsArray.length; ++O)(N = m._fieldsArray[O]).map ? g("this%s={}", r.safeProp(N.name)) : N.repeated && g("this%s=[]", r.safeProp(N.name));
|
|
1586
|
+
return g('if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null&&ks[i]!=="__proto__")')("this[ks[i]]=p[ks[i]]");
|
|
1587
|
+
};
|
|
1588
|
+
function b(v) {
|
|
1589
|
+
return v._fieldsById = v._fieldsArray = v._oneofsArray = null, delete v.encode, delete v.decode, delete v.verify, v;
|
|
1590
|
+
}
|
|
1591
|
+
return y.fromJSON = function(m, g, O) {
|
|
1592
|
+
O = r.checkDepth(O);
|
|
1593
|
+
var N = new y(m, g.options);
|
|
1594
|
+
N.extensions = g.extensions, N.reserved = g.reserved;
|
|
1595
|
+
for(var E = Object.keys(g.fields), T = 0; T < E.length; ++T)N.add((typeof g.fields[E[T]].keyType < "u" ? c.fromJSON : f.fromJSON)(E[T], g.fields[E[T]]));
|
|
1596
|
+
if (g.oneofs) for(E = Object.keys(g.oneofs), T = 0; T < E.length; ++T)N.add(h.fromJSON(E[T], g.oneofs[E[T]]));
|
|
1597
|
+
if (g.nested) for(E = Object.keys(g.nested), T = 0; T < E.length; ++T){
|
|
1598
|
+
var H = g.nested[E[T]];
|
|
1599
|
+
N.add((H.id !== void 0 ? f.fromJSON : H.fields !== void 0 ? y.fromJSON : H.values !== void 0 ? o.fromJSON : H.methods !== void 0 ? n.fromJSON : l.fromJSON)(E[T], H, O + 1));
|
|
1600
|
+
}
|
|
1601
|
+
return g.extensions && g.extensions.length && (N.extensions = g.extensions), g.reserved && g.reserved.length && (N.reserved = g.reserved), g.group && (N.group = !0), g.comment && (N.comment = g.comment), g.edition && (N._edition = g.edition), N._defaultEdition = "proto3", N;
|
|
1602
|
+
}, y.prototype.toJSON = function(m) {
|
|
1603
|
+
var g = l.prototype.toJSON.call(this, m), O = m ? !!m.keepComments : !1;
|
|
1604
|
+
return r.toObject([
|
|
1605
|
+
"edition",
|
|
1606
|
+
this._editionToJSON(),
|
|
1607
|
+
"options",
|
|
1608
|
+
g && g.options || void 0,
|
|
1609
|
+
"oneofs",
|
|
1610
|
+
l.arrayToJSON(this.oneofsArray, m),
|
|
1611
|
+
"fields",
|
|
1612
|
+
l.arrayToJSON(this.fieldsArray.filter(function(N) {
|
|
1613
|
+
return !N.declaringField;
|
|
1614
|
+
}), m) || {},
|
|
1615
|
+
"extensions",
|
|
1616
|
+
this.extensions && this.extensions.length ? this.extensions : void 0,
|
|
1617
|
+
"reserved",
|
|
1618
|
+
this.reserved && this.reserved.length ? this.reserved : void 0,
|
|
1619
|
+
"group",
|
|
1620
|
+
this.group || void 0,
|
|
1621
|
+
"nested",
|
|
1622
|
+
g && g.nested || void 0,
|
|
1623
|
+
"comment",
|
|
1624
|
+
O ? this.comment : void 0
|
|
1625
|
+
]);
|
|
1626
|
+
}, y.prototype.resolveAll = function() {
|
|
1627
|
+
if (!this._needsRecursiveResolve) return this;
|
|
1628
|
+
l.prototype.resolveAll.call(this);
|
|
1629
|
+
var m = this.oneofsArray;
|
|
1630
|
+
for(O = 0; O < m.length;)m[O++].resolve();
|
|
1631
|
+
for(var g = this.fieldsArray, O = 0; O < g.length;)g[O++].resolve();
|
|
1632
|
+
return this;
|
|
1633
|
+
}, y.prototype._resolveFeaturesRecursive = function(m) {
|
|
1634
|
+
return this._needsRecursiveFeatureResolution ? (m = this._edition || m, l.prototype._resolveFeaturesRecursive.call(this, m), this.oneofsArray.forEach((g)=>{
|
|
1635
|
+
g._resolveFeatures(m);
|
|
1636
|
+
}), this.fieldsArray.forEach((g)=>{
|
|
1637
|
+
g._resolveFeatures(m);
|
|
1638
|
+
}), this) : this;
|
|
1639
|
+
}, y.prototype.get = function(m) {
|
|
1640
|
+
return Object.prototype.hasOwnProperty.call(this.fields, m) ? this.fields[m] : this.oneofs && Object.prototype.hasOwnProperty.call(this.oneofs, m) ? this.oneofs[m] : this.nested && Object.prototype.hasOwnProperty.call(this.nested, m) ? this.nested[m] : null;
|
|
1641
|
+
}, y.prototype.add = function(m) {
|
|
1642
|
+
if (this.get(m.name)) throw Error("duplicate name '" + m.name + "' in " + this);
|
|
1643
|
+
if (m instanceof f && m.extend === void 0) {
|
|
1644
|
+
if (this._fieldsById ? (this._fieldsById[m.id]) : this.fieldsById[m.id]) throw Error("duplicate id " + m.id + " in " + this);
|
|
1645
|
+
if (this.isReservedId(m.id)) throw Error("id " + m.id + " is reserved in " + this);
|
|
1646
|
+
if (this.isReservedName(m.name)) throw Error("name '" + m.name + "' is reserved in " + this);
|
|
1647
|
+
return m.name === "__proto__" ? this : (m.parent && m.parent.remove(m), this.fields[m.name] = m, m.message = this, m.onAdd(this), b(this));
|
|
1648
|
+
}
|
|
1649
|
+
return m instanceof h ? m.name === "__proto__" ? this : (this.oneofs || (this.oneofs = {}), this.oneofs[m.name] = m, m.onAdd(this), b(this)) : l.prototype.add.call(this, m);
|
|
1650
|
+
}, y.prototype.remove = function(m) {
|
|
1651
|
+
if (m instanceof f && m.extend === void 0) {
|
|
1652
|
+
if (!this.fields || this.fields[m.name] !== m) throw Error(m + " is not a member of " + this);
|
|
1653
|
+
return delete this.fields[m.name], m.parent = null, m.onRemove(this), b(this);
|
|
1654
|
+
}
|
|
1655
|
+
if (m instanceof h) {
|
|
1656
|
+
if (!this.oneofs || this.oneofs[m.name] !== m) throw Error(m + " is not a member of " + this);
|
|
1657
|
+
return delete this.oneofs[m.name], m.parent = null, m.onRemove(this), b(this);
|
|
1658
|
+
}
|
|
1659
|
+
return l.prototype.remove.call(this, m);
|
|
1660
|
+
}, y.prototype.isReservedId = function(m) {
|
|
1661
|
+
return l.isReservedId(this.reserved, m);
|
|
1662
|
+
}, y.prototype.isReservedName = function(m) {
|
|
1663
|
+
return l.isReservedName(this.reserved, m);
|
|
1664
|
+
}, y.prototype.create = function(m) {
|
|
1665
|
+
return new this.ctor(m);
|
|
1666
|
+
}, y.prototype.setup = function() {
|
|
1667
|
+
for(var m = this.fullName, g = [], O = 0; O < this.fieldsArray.length; ++O)g.push(this._fieldsArray[O].resolve().resolvedType);
|
|
1668
|
+
this.encode = d(this)({
|
|
1669
|
+
Writer: t,
|
|
1670
|
+
types: g,
|
|
1671
|
+
util: r
|
|
1672
|
+
}), this.decode = s(this)({
|
|
1673
|
+
Reader: i,
|
|
1674
|
+
types: g,
|
|
1675
|
+
util: r
|
|
1676
|
+
}), this.verify = u(this)({
|
|
1677
|
+
types: g,
|
|
1678
|
+
util: r
|
|
1679
|
+
}), this.fromObject = a.fromObject(this)({
|
|
1680
|
+
types: g,
|
|
1681
|
+
util: r
|
|
1682
|
+
}), this.toObject = a.toObject(this)({
|
|
1683
|
+
types: g,
|
|
1684
|
+
util: r
|
|
1685
|
+
});
|
|
1686
|
+
var N = p[m];
|
|
1687
|
+
if (N) {
|
|
1688
|
+
var E = Object.create(this);
|
|
1689
|
+
E.fromObject = this.fromObject, this.fromObject = N.fromObject.bind(E), E.toObject = this.toObject, this.toObject = N.toObject.bind(E);
|
|
1690
|
+
}
|
|
1691
|
+
return this;
|
|
1692
|
+
}, y.prototype.encode = function(m, g) {
|
|
1693
|
+
return this.setup().encode(m, g);
|
|
1694
|
+
}, y.prototype.encodeDelimited = function(m, g) {
|
|
1695
|
+
return this.encode(m, g && g.len ? g.fork() : g).ldelim();
|
|
1696
|
+
}, y.prototype.decode = function(m, g, O, N) {
|
|
1697
|
+
return this.setup().decode(m, g, O, N);
|
|
1698
|
+
}, y.prototype.decodeDelimited = function(m) {
|
|
1699
|
+
return m instanceof i || (m = i.create(m)), this.decode(m, m.uint32());
|
|
1700
|
+
}, y.prototype.verify = function(m, g) {
|
|
1701
|
+
return this.setup().verify(m, g);
|
|
1702
|
+
}, y.prototype.fromObject = function(m, g) {
|
|
1703
|
+
return this.setup().fromObject(m, g);
|
|
1704
|
+
}, y.prototype.toObject = function(m, g) {
|
|
1705
|
+
return this.setup().toObject(m, g);
|
|
1706
|
+
}, y.d = function(m) {
|
|
1707
|
+
return function(O) {
|
|
1708
|
+
r.decorateType(O, m);
|
|
1709
|
+
};
|
|
1710
|
+
}, dt;
|
|
1711
|
+
}
|
|
1712
|
+
var ht, br;
|
|
1713
|
+
function xt() {
|
|
1714
|
+
if (br) return ht;
|
|
1715
|
+
br = 1, ht = t;
|
|
1716
|
+
var l = ve();
|
|
1717
|
+
((t.prototype = Object.create(l.prototype)).constructor = t).className = "Root";
|
|
1718
|
+
var o = se(), h = re(), f = de(), c = U(), n, e, i;
|
|
1719
|
+
function t(u) {
|
|
1720
|
+
l.call(this, "", u), this.deferred = [], this.files = [], this._edition = "proto2", this._fullyQualifiedObjects = {};
|
|
1721
|
+
}
|
|
1722
|
+
t.fromJSON = function(a, p, y) {
|
|
1723
|
+
return y = c.checkDepth(y), p || (p = new t()), a.options && p.setOptions(a.options), p.addJSON(a.nested, y).resolveAll();
|
|
1724
|
+
}, t.prototype.resolvePath = c.path.resolve, t.prototype.fetch = c.fetch;
|
|
1725
|
+
function r() {}
|
|
1726
|
+
t.prototype.load = function u(a, p, y) {
|
|
1727
|
+
typeof p == "function" && (y = p, p = void 0);
|
|
1728
|
+
var b = this;
|
|
1729
|
+
if (!y) return c.asPromise(u, b, a, p);
|
|
1730
|
+
var v = y === r;
|
|
1731
|
+
function m(Z, V) {
|
|
1732
|
+
if (y) {
|
|
1733
|
+
if (v) throw Z;
|
|
1734
|
+
V && V.resolveAll();
|
|
1735
|
+
var R = y;
|
|
1736
|
+
y = null, R(Z, V);
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
function g(Z) {
|
|
1740
|
+
var V = Z.lastIndexOf("google/protobuf/");
|
|
1741
|
+
if (V > -1) {
|
|
1742
|
+
var R = Z.substring(V);
|
|
1743
|
+
if (R in i) return R;
|
|
1744
|
+
}
|
|
1745
|
+
return null;
|
|
1746
|
+
}
|
|
1747
|
+
function O(Z, V) {
|
|
1748
|
+
try {
|
|
1749
|
+
if (c.isString(V) && V.charAt(0) === "{" && (V = JSON.parse(V)), !c.isString(V)) b.setOptions(V.options).addJSON(V.nested);
|
|
1750
|
+
else {
|
|
1751
|
+
e.filename = Z;
|
|
1752
|
+
var R = e(V, b, p), q, P = 0;
|
|
1753
|
+
if (R.imports) for(; P < R.imports.length; ++P)(q = g(R.imports[P]) || b.resolvePath(Z, R.imports[P])) && N(q);
|
|
1754
|
+
if (R.weakImports) for(P = 0; P < R.weakImports.length; ++P)(q = g(R.weakImports[P]) || b.resolvePath(Z, R.weakImports[P])) && N(q, !0);
|
|
1755
|
+
}
|
|
1756
|
+
} catch (k) {
|
|
1757
|
+
m(k);
|
|
1758
|
+
}
|
|
1759
|
+
!v && !E && m(null, b);
|
|
1760
|
+
}
|
|
1761
|
+
function N(Z, V) {
|
|
1762
|
+
if (Z = g(Z) || Z, !(b.files.indexOf(Z) > -1)) {
|
|
1763
|
+
if (b.files.push(Z), Z in i) {
|
|
1764
|
+
v ? O(Z, i[Z]) : (++E, setTimeout(function() {
|
|
1765
|
+
--E, O(Z, i[Z]);
|
|
1766
|
+
}));
|
|
1767
|
+
return;
|
|
1768
|
+
}
|
|
1769
|
+
if (v) {
|
|
1770
|
+
var R;
|
|
1771
|
+
try {
|
|
1772
|
+
R = c.fs.readFileSync(Z).toString("utf8");
|
|
1773
|
+
} catch (q) {
|
|
1774
|
+
V || m(q);
|
|
1775
|
+
return;
|
|
1776
|
+
}
|
|
1777
|
+
O(Z, R);
|
|
1778
|
+
} else ++E, b.fetch(Z, function(q, P) {
|
|
1779
|
+
if (--E, !!y) {
|
|
1780
|
+
if (q) {
|
|
1781
|
+
V ? E || m(null, b) : m(q);
|
|
1782
|
+
return;
|
|
1783
|
+
}
|
|
1784
|
+
O(Z, P);
|
|
1785
|
+
}
|
|
1786
|
+
});
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
var E = 0;
|
|
1790
|
+
c.isString(a) && (a = [
|
|
1791
|
+
a
|
|
1792
|
+
]);
|
|
1793
|
+
for(var T = 0, H; T < a.length; ++T)(H = b.resolvePath("", a[T])) && N(H);
|
|
1794
|
+
return v ? (b.resolveAll(), b) : (E || m(null, b), b);
|
|
1795
|
+
}, t.prototype.loadSync = function(a, p) {
|
|
1796
|
+
if (!c.isNode) throw Error("not supported");
|
|
1797
|
+
return this.load(a, p, r);
|
|
1798
|
+
}, t.prototype.resolveAll = function() {
|
|
1799
|
+
if (!this._needsRecursiveResolve) return this;
|
|
1800
|
+
if (this.deferred.length) throw Error("unresolvable extensions: " + this.deferred.map(function(a) {
|
|
1801
|
+
return "'extend " + a.extend + "' in " + a.parent.fullName;
|
|
1802
|
+
}).join(", "));
|
|
1803
|
+
return l.prototype.resolveAll.call(this);
|
|
1804
|
+
};
|
|
1805
|
+
var d = /^[A-Z]/;
|
|
1806
|
+
function s(u, a) {
|
|
1807
|
+
var p = a.parent.lookup(a.extend);
|
|
1808
|
+
if (p) {
|
|
1809
|
+
var y = new o(a.fullName, a.id, a.type, a.rule, void 0, a.options);
|
|
1810
|
+
return p.get(y.name) || (y.declaringField = a, a.extensionField = y, p.add(y)), !0;
|
|
1811
|
+
}
|
|
1812
|
+
return !1;
|
|
1813
|
+
}
|
|
1814
|
+
return t.prototype._handleAdd = function(a) {
|
|
1815
|
+
if (a instanceof o) a.extend !== void 0 && !a.extensionField && (s(this, a) || this.deferred.push(a));
|
|
1816
|
+
else if (a instanceof h) d.test(a.name) && (a.parent[a.name] = a.values);
|
|
1817
|
+
else if (!(a instanceof f)) {
|
|
1818
|
+
if (a instanceof n) for(var p = 0; p < this.deferred.length;)s(this, this.deferred[p]) ? this.deferred.splice(p, 1) : ++p;
|
|
1819
|
+
for(var y = 0; y < a.nestedArray.length; ++y)this._handleAdd(a._nestedArray[y]);
|
|
1820
|
+
d.test(a.name) && (a.parent[a.name] = a);
|
|
1821
|
+
}
|
|
1822
|
+
(a instanceof n || a instanceof h || a instanceof o) && (this._fullyQualifiedObjects[a.fullName] = a);
|
|
1823
|
+
}, t.prototype._handleRemove = function(a) {
|
|
1824
|
+
if (a instanceof o) {
|
|
1825
|
+
if (a.extend !== void 0) if (a.extensionField) a.extensionField.parent.remove(a.extensionField), a.extensionField = null;
|
|
1826
|
+
else {
|
|
1827
|
+
var p = this.deferred.indexOf(a);
|
|
1828
|
+
p > -1 && this.deferred.splice(p, 1);
|
|
1829
|
+
}
|
|
1830
|
+
} else if (a instanceof h) d.test(a.name) && delete a.parent[a.name];
|
|
1831
|
+
else if (a instanceof l) {
|
|
1832
|
+
for(var y = 0; y < a.nestedArray.length; ++y)this._handleRemove(a._nestedArray[y]);
|
|
1833
|
+
d.test(a.name) && delete a.parent[a.name];
|
|
1834
|
+
}
|
|
1835
|
+
delete this._fullyQualifiedObjects[a.fullName];
|
|
1836
|
+
}, t._configure = function(u, a, p) {
|
|
1837
|
+
n = u, e = a, i = p;
|
|
1838
|
+
}, ht;
|
|
1839
|
+
}
|
|
1840
|
+
var wr;
|
|
1841
|
+
function U() {
|
|
1842
|
+
if (wr) return $e.exports;
|
|
1843
|
+
wr = 1;
|
|
1844
|
+
var l = $e.exports = ne(), o = Vr(), h, f;
|
|
1845
|
+
l.codegen = Sn(), l.fetch = Bn(), l.path = Nn(), l.patterns = Fn();
|
|
1846
|
+
var c = l.patterns.reservedRe, n = l.patterns.unsafePropertyRe;
|
|
1847
|
+
l.fs = l.inquire("fs"), l.checkDepth = function(r) {
|
|
1848
|
+
if (r === void 0 && (r = 0), r > l.recursionLimit) throw Error("max depth exceeded");
|
|
1849
|
+
return r;
|
|
1850
|
+
}, l.toArray = function(r) {
|
|
1851
|
+
if (r) {
|
|
1852
|
+
for(var d = Object.keys(r), s = new Array(d.length), u = 0; u < d.length;)s[u] = r[d[u++]];
|
|
1853
|
+
return s;
|
|
1854
|
+
}
|
|
1855
|
+
return [];
|
|
1856
|
+
}, l.toObject = function(r) {
|
|
1857
|
+
for(var d = {}, s = 0; s < r.length;){
|
|
1858
|
+
var u = r[s++], a = r[s++];
|
|
1859
|
+
a !== void 0 && (d[u] = a);
|
|
1860
|
+
}
|
|
1861
|
+
return d;
|
|
1862
|
+
}, l.isReserved = function(r) {
|
|
1863
|
+
return c.test(r);
|
|
1864
|
+
}, l.safeProp = function(r) {
|
|
1865
|
+
return !/^[$\w_]+$/.test(r) || c.test(r) ? "[" + JSON.stringify(r) + "]" : "." + r;
|
|
1866
|
+
}, l.ucFirst = function(r) {
|
|
1867
|
+
return r.charAt(0).toUpperCase() + r.substring(1);
|
|
1868
|
+
};
|
|
1869
|
+
var e = /_([a-z])/g;
|
|
1870
|
+
l.camelCase = function(r) {
|
|
1871
|
+
return r.substring(0, 1) + r.substring(1).replace(e, function(d, s) {
|
|
1872
|
+
return s.toUpperCase();
|
|
1873
|
+
});
|
|
1874
|
+
}, l.compareFieldsById = function(r, d) {
|
|
1875
|
+
return r.id - d.id;
|
|
1876
|
+
}, l.decorateType = function(r, d) {
|
|
1877
|
+
if (r.$type) return d && r.$type.name !== d && (l.decorateRoot.remove(r.$type), r.$type.name = d, l.decorateRoot.add(r.$type)), r.$type;
|
|
1878
|
+
h || (h = Wt());
|
|
1879
|
+
var s = new h(d || r.name);
|
|
1880
|
+
return l.decorateRoot.add(s), s.ctor = r, Object.defineProperty(r, "$type", {
|
|
1881
|
+
value: s,
|
|
1882
|
+
enumerable: !1
|
|
1883
|
+
}), Object.defineProperty(r.prototype, "$type", {
|
|
1884
|
+
value: s,
|
|
1885
|
+
enumerable: !1
|
|
1886
|
+
}), s;
|
|
1887
|
+
};
|
|
1888
|
+
var i = 0;
|
|
1889
|
+
return l.decorateEnum = function(r) {
|
|
1890
|
+
if (r.$type) return r.$type;
|
|
1891
|
+
f || (f = re());
|
|
1892
|
+
var d = new f("Enum" + i++, r);
|
|
1893
|
+
return l.decorateRoot.add(d), Object.defineProperty(r, "$type", {
|
|
1894
|
+
value: d,
|
|
1895
|
+
enumerable: !1
|
|
1896
|
+
}), d;
|
|
1897
|
+
}, l.setProperty = function(r, d, s, u) {
|
|
1898
|
+
function a(p, y, b) {
|
|
1899
|
+
var v = y.shift();
|
|
1900
|
+
if (n.test(v)) return p;
|
|
1901
|
+
if (y.length > 0) p[v] = a(p[v] || {}, y, b);
|
|
1902
|
+
else {
|
|
1903
|
+
var m = p[v];
|
|
1904
|
+
if (m && u) return p;
|
|
1905
|
+
m && (b = [].concat(m).concat(b)), p[v] = b;
|
|
1906
|
+
}
|
|
1907
|
+
return p;
|
|
1908
|
+
}
|
|
1909
|
+
if (typeof r != "object") throw TypeError("dst must be an object");
|
|
1910
|
+
if (!d) throw TypeError("path must be specified");
|
|
1911
|
+
return d = d.split("."), a(r, d, s);
|
|
1912
|
+
}, Object.defineProperty(l, "decorateRoot", {
|
|
1913
|
+
get: function() {
|
|
1914
|
+
return o.decorated || (o.decorated = new (xt())());
|
|
1915
|
+
}
|
|
1916
|
+
}), $e.exports;
|
|
1917
|
+
}
|
|
1918
|
+
var _r;
|
|
1919
|
+
function ce() {
|
|
1920
|
+
return _r || (_r = 1, (function(l) {
|
|
1921
|
+
var o = l, h = U(), f = [
|
|
1922
|
+
"double",
|
|
1923
|
+
"float",
|
|
1924
|
+
"int32",
|
|
1925
|
+
"uint32",
|
|
1926
|
+
"sint32",
|
|
1927
|
+
"fixed32",
|
|
1928
|
+
"sfixed32",
|
|
1929
|
+
"int64",
|
|
1930
|
+
"uint64",
|
|
1931
|
+
"sint64",
|
|
1932
|
+
"fixed64",
|
|
1933
|
+
"sfixed64",
|
|
1934
|
+
"bool",
|
|
1935
|
+
"string",
|
|
1936
|
+
"bytes"
|
|
1937
|
+
];
|
|
1938
|
+
function c(n, e) {
|
|
1939
|
+
var i = 0, t = Object.create(null);
|
|
1940
|
+
for(e |= 0; i < n.length;)t[f[i + e]] = n[i++];
|
|
1941
|
+
return t;
|
|
1942
|
+
}
|
|
1943
|
+
o.basic = c([
|
|
1944
|
+
1,
|
|
1945
|
+
5,
|
|
1946
|
+
0,
|
|
1947
|
+
0,
|
|
1948
|
+
0,
|
|
1949
|
+
5,
|
|
1950
|
+
5,
|
|
1951
|
+
0,
|
|
1952
|
+
0,
|
|
1953
|
+
0,
|
|
1954
|
+
1,
|
|
1955
|
+
1,
|
|
1956
|
+
0,
|
|
1957
|
+
2,
|
|
1958
|
+
2
|
|
1959
|
+
]), o.defaults = c([
|
|
1960
|
+
0,
|
|
1961
|
+
0,
|
|
1962
|
+
0,
|
|
1963
|
+
0,
|
|
1964
|
+
0,
|
|
1965
|
+
0,
|
|
1966
|
+
0,
|
|
1967
|
+
0,
|
|
1968
|
+
0,
|
|
1969
|
+
0,
|
|
1970
|
+
0,
|
|
1971
|
+
0,
|
|
1972
|
+
!1,
|
|
1973
|
+
"",
|
|
1974
|
+
h.emptyArray,
|
|
1975
|
+
null
|
|
1976
|
+
]), o.long = c([
|
|
1977
|
+
0,
|
|
1978
|
+
0,
|
|
1979
|
+
0,
|
|
1980
|
+
1,
|
|
1981
|
+
1
|
|
1982
|
+
], 7), o.mapKey = c([
|
|
1983
|
+
0,
|
|
1984
|
+
0,
|
|
1985
|
+
0,
|
|
1986
|
+
5,
|
|
1987
|
+
5,
|
|
1988
|
+
0,
|
|
1989
|
+
0,
|
|
1990
|
+
0,
|
|
1991
|
+
1,
|
|
1992
|
+
1,
|
|
1993
|
+
0,
|
|
1994
|
+
2
|
|
1995
|
+
], 2), o.packed = c([
|
|
1996
|
+
1,
|
|
1997
|
+
5,
|
|
1998
|
+
0,
|
|
1999
|
+
0,
|
|
2000
|
+
0,
|
|
2001
|
+
5,
|
|
2002
|
+
5,
|
|
2003
|
+
0,
|
|
2004
|
+
0,
|
|
2005
|
+
0,
|
|
2006
|
+
1,
|
|
2007
|
+
1,
|
|
2008
|
+
0
|
|
2009
|
+
]);
|
|
2010
|
+
})(Me)), Me;
|
|
2011
|
+
}
|
|
2012
|
+
var pt, Ir;
|
|
2013
|
+
function se() {
|
|
2014
|
+
if (Ir) return pt;
|
|
2015
|
+
Ir = 1, pt = e;
|
|
2016
|
+
var l = oe();
|
|
2017
|
+
((e.prototype = Object.create(l.prototype)).constructor = e).className = "Field";
|
|
2018
|
+
var o = re(), h = ce(), f = U(), c, n = /^required|optional|repeated$/;
|
|
2019
|
+
e.fromJSON = function(t, r) {
|
|
2020
|
+
var d = new e(t, r.id, r.type, r.rule, r.extend, r.options, r.comment);
|
|
2021
|
+
return r.edition && (d._edition = r.edition), d._defaultEdition = "proto3", d;
|
|
2022
|
+
};
|
|
2023
|
+
function e(i, t, r, d, s, u, a) {
|
|
2024
|
+
if (f.isObject(d) ? (a = s, u = d, d = s = void 0) : f.isObject(s) && (a = u, u = s, s = void 0), l.call(this, i, u), !f.isInteger(t) || t < 0) throw TypeError("id must be a non-negative integer");
|
|
2025
|
+
if (!f.isString(r)) throw TypeError("type must be a string");
|
|
2026
|
+
if (d !== void 0 && !n.test(d = d.toString().toLowerCase())) throw TypeError("rule must be a string rule");
|
|
2027
|
+
if (s !== void 0 && !f.isString(s)) throw TypeError("extend must be a string");
|
|
2028
|
+
d === "proto3_optional" && (d = "optional"), this.rule = d && d !== "optional" ? d : void 0, this.type = r, this.id = t, this.extend = s || void 0, this.repeated = d === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = f.Long ? h.long[r] !== void 0 : (!1), this.bytes = r === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this.comment = a;
|
|
2029
|
+
}
|
|
2030
|
+
return Object.defineProperty(e.prototype, "required", {
|
|
2031
|
+
get: function() {
|
|
2032
|
+
return this._features.field_presence === "LEGACY_REQUIRED";
|
|
2033
|
+
}
|
|
2034
|
+
}), Object.defineProperty(e.prototype, "optional", {
|
|
2035
|
+
get: function() {
|
|
2036
|
+
return !this.required;
|
|
2037
|
+
}
|
|
2038
|
+
}), Object.defineProperty(e.prototype, "delimited", {
|
|
2039
|
+
get: function() {
|
|
2040
|
+
return this.resolvedType instanceof c && this._features.message_encoding === "DELIMITED";
|
|
2041
|
+
}
|
|
2042
|
+
}), Object.defineProperty(e.prototype, "packed", {
|
|
2043
|
+
get: function() {
|
|
2044
|
+
return this._features.repeated_field_encoding === "PACKED";
|
|
2045
|
+
}
|
|
2046
|
+
}), Object.defineProperty(e.prototype, "hasPresence", {
|
|
2047
|
+
get: function() {
|
|
2048
|
+
return this.repeated || this.map ? !1 : this.partOf || this.declaringField || this.extensionField || this._features.field_presence !== "IMPLICIT";
|
|
2049
|
+
}
|
|
2050
|
+
}), e.prototype.setOption = function(t, r, d) {
|
|
2051
|
+
return l.prototype.setOption.call(this, t, r, d);
|
|
2052
|
+
}, e.prototype.toJSON = function(t) {
|
|
2053
|
+
var r = t ? !!t.keepComments : !1;
|
|
2054
|
+
return f.toObject([
|
|
2055
|
+
"edition",
|
|
2056
|
+
this._editionToJSON(),
|
|
2057
|
+
"rule",
|
|
2058
|
+
this.rule !== "optional" && this.rule || void 0,
|
|
2059
|
+
"type",
|
|
2060
|
+
this.type,
|
|
2061
|
+
"id",
|
|
2062
|
+
this.id,
|
|
2063
|
+
"extend",
|
|
2064
|
+
this.extend,
|
|
2065
|
+
"options",
|
|
2066
|
+
this.options,
|
|
2067
|
+
"comment",
|
|
2068
|
+
r ? this.comment : void 0
|
|
2069
|
+
]);
|
|
2070
|
+
}, e.prototype.resolve = function() {
|
|
2071
|
+
if (this.resolved) return this;
|
|
2072
|
+
if ((this.typeDefault = h.defaults[this.type]) === void 0 ? (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof c ? this.typeDefault = null : this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]) : this.options && this.options.proto3_optional && (this.typeDefault = null), this.options && this.options.default != null && (this.typeDefault = this.options.default, this.resolvedType instanceof o && typeof this.typeDefault == "string" && (this.typeDefault = this.resolvedType.values[this.typeDefault])), this.options && (this.options.packed !== void 0 && this.resolvedType && !(this.resolvedType instanceof o) && delete this.options.packed, Object.keys(this.options).length || (this.options = void 0)), this.long) this.typeDefault = f.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"), Object.freeze && Object.freeze(this.typeDefault);
|
|
2073
|
+
else if (this.bytes && typeof this.typeDefault == "string") {
|
|
2074
|
+
var t;
|
|
2075
|
+
f.base64.test(this.typeDefault) ? f.base64.decode(this.typeDefault, t = f.newBuffer(f.base64.length(this.typeDefault)), 0) : f.utf8.write(this.typeDefault, t = f.newBuffer(f.utf8.length(this.typeDefault)), 0), this.typeDefault = t;
|
|
2076
|
+
}
|
|
2077
|
+
return this.map ? this.defaultValue = f.emptyObject : this.repeated ? this.defaultValue = f.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof c && (this.parent.ctor.prototype[this.name] = this.defaultValue), l.prototype.resolve.call(this);
|
|
2078
|
+
}, e.prototype._inferLegacyProtoFeatures = function(t) {
|
|
2079
|
+
if (t !== "proto2" && t !== "proto3") return {};
|
|
2080
|
+
var r = {};
|
|
2081
|
+
if (this.rule === "required" && (r.field_presence = "LEGACY_REQUIRED"), this.parent && h.defaults[this.type] === void 0) {
|
|
2082
|
+
var d = this.parent.get(this.type.split(".").pop());
|
|
2083
|
+
d && d instanceof c && d.group && (r.message_encoding = "DELIMITED");
|
|
2084
|
+
}
|
|
2085
|
+
return this.getOption("packed") === !0 ? r.repeated_field_encoding = "PACKED" : this.getOption("packed") === !1 && (r.repeated_field_encoding = "EXPANDED"), r;
|
|
2086
|
+
}, e.prototype._resolveFeatures = function(t) {
|
|
2087
|
+
return l.prototype._resolveFeatures.call(this, this._edition || t);
|
|
2088
|
+
}, e.d = function(t, r, d, s) {
|
|
2089
|
+
return typeof r == "function" ? r = f.decorateType(r).name : r && typeof r == "object" && (r = f.decorateEnum(r).name), function(a, p) {
|
|
2090
|
+
f.decorateType(a.constructor).add(new e(p, t, r, d, {
|
|
2091
|
+
default: s
|
|
2092
|
+
}));
|
|
2093
|
+
};
|
|
2094
|
+
}, e._configure = function(t) {
|
|
2095
|
+
c = t;
|
|
2096
|
+
}, pt;
|
|
2097
|
+
}
|
|
2098
|
+
var yt, Ar;
|
|
2099
|
+
function de() {
|
|
2100
|
+
if (Ar) return yt;
|
|
2101
|
+
Ar = 1, yt = f;
|
|
2102
|
+
var l = oe();
|
|
2103
|
+
((f.prototype = Object.create(l.prototype)).constructor = f).className = "OneOf";
|
|
2104
|
+
var o = se(), h = U();
|
|
2105
|
+
function f(n, e, i, t) {
|
|
2106
|
+
if (Array.isArray(e) || (i = e, e = void 0), l.call(this, n, i), !(e === void 0 || Array.isArray(e))) throw TypeError("fieldNames must be an Array");
|
|
2107
|
+
this.oneof = e || [], this.fieldsArray = [], this.comment = t;
|
|
2108
|
+
}
|
|
2109
|
+
f.fromJSON = function(e, i) {
|
|
2110
|
+
return new f(e, i.oneof, i.options, i.comment);
|
|
2111
|
+
}, f.prototype.toJSON = function(e) {
|
|
2112
|
+
var i = e ? !!e.keepComments : !1;
|
|
2113
|
+
return h.toObject([
|
|
2114
|
+
"options",
|
|
2115
|
+
this.options,
|
|
2116
|
+
"oneof",
|
|
2117
|
+
this.oneof,
|
|
2118
|
+
"comment",
|
|
2119
|
+
i ? this.comment : void 0
|
|
2120
|
+
]);
|
|
2121
|
+
};
|
|
2122
|
+
function c(n) {
|
|
2123
|
+
if (n.parent) for(var e = 0; e < n.fieldsArray.length; ++e)n.fieldsArray[e].parent || n.parent.add(n.fieldsArray[e]);
|
|
2124
|
+
}
|
|
2125
|
+
return f.prototype.add = function(e) {
|
|
2126
|
+
if (!(e instanceof o)) throw TypeError("field must be a Field");
|
|
2127
|
+
return e.parent && e.parent !== this.parent && e.parent.remove(e), this.oneof.push(e.name), this.fieldsArray.push(e), e.partOf = this, c(this), this;
|
|
2128
|
+
}, f.prototype.remove = function(e) {
|
|
2129
|
+
if (!(e instanceof o)) throw TypeError("field must be a Field");
|
|
2130
|
+
var i = this.fieldsArray.indexOf(e);
|
|
2131
|
+
if (i < 0) throw Error(e + " is not a member of " + this);
|
|
2132
|
+
return this.fieldsArray.splice(i, 1), i = this.oneof.indexOf(e.name), i > -1 && this.oneof.splice(i, 1), e.partOf = null, this;
|
|
2133
|
+
}, f.prototype.onAdd = function(e) {
|
|
2134
|
+
l.prototype.onAdd.call(this, e);
|
|
2135
|
+
for(var i = this, t = 0; t < this.oneof.length; ++t){
|
|
2136
|
+
var r = e.get(this.oneof[t]);
|
|
2137
|
+
r && !r.partOf && (r.partOf = i, i.fieldsArray.push(r));
|
|
2138
|
+
}
|
|
2139
|
+
c(this);
|
|
2140
|
+
}, f.prototype.onRemove = function(e) {
|
|
2141
|
+
for(var i = 0, t; i < this.fieldsArray.length; ++i)(t = this.fieldsArray[i]).parent && t.parent.remove(t);
|
|
2142
|
+
l.prototype.onRemove.call(this, e);
|
|
2143
|
+
}, Object.defineProperty(f.prototype, "isProto3Optional", {
|
|
2144
|
+
get: function() {
|
|
2145
|
+
if (this.fieldsArray == null || this.fieldsArray.length !== 1) return !1;
|
|
2146
|
+
var n = this.fieldsArray[0];
|
|
2147
|
+
return n.options != null && n.options.proto3_optional === !0;
|
|
2148
|
+
}
|
|
2149
|
+
}), f.d = function() {
|
|
2150
|
+
for(var e = new Array(arguments.length), i = 0; i < arguments.length;)e[i] = arguments[i++];
|
|
2151
|
+
return function(r, d) {
|
|
2152
|
+
h.decorateType(r.constructor).add(new f(d, e)), Object.defineProperty(r, d, {
|
|
2153
|
+
get: h.oneOfGetter(e),
|
|
2154
|
+
set: h.oneOfSetter(e)
|
|
2155
|
+
});
|
|
2156
|
+
};
|
|
2157
|
+
}, yt;
|
|
2158
|
+
}
|
|
2159
|
+
var mt, Or;
|
|
2160
|
+
function oe() {
|
|
2161
|
+
if (Or) return mt;
|
|
2162
|
+
Or = 1, mt = e, e.className = "ReflectionObject";
|
|
2163
|
+
const l = de();
|
|
2164
|
+
var o = U(), h, f = {
|
|
2165
|
+
enum_type: "OPEN",
|
|
2166
|
+
field_presence: "EXPLICIT",
|
|
2167
|
+
json_format: "ALLOW",
|
|
2168
|
+
message_encoding: "LENGTH_PREFIXED",
|
|
2169
|
+
repeated_field_encoding: "PACKED",
|
|
2170
|
+
utf8_validation: "VERIFY"
|
|
2171
|
+
}, c = {
|
|
2172
|
+
enum_type: "CLOSED",
|
|
2173
|
+
field_presence: "EXPLICIT",
|
|
2174
|
+
json_format: "LEGACY_BEST_EFFORT",
|
|
2175
|
+
message_encoding: "LENGTH_PREFIXED",
|
|
2176
|
+
repeated_field_encoding: "EXPANDED",
|
|
2177
|
+
utf8_validation: "NONE"
|
|
2178
|
+
}, n = {
|
|
2179
|
+
enum_type: "OPEN",
|
|
2180
|
+
field_presence: "IMPLICIT",
|
|
2181
|
+
json_format: "ALLOW",
|
|
2182
|
+
message_encoding: "LENGTH_PREFIXED",
|
|
2183
|
+
repeated_field_encoding: "PACKED",
|
|
2184
|
+
utf8_validation: "VERIFY"
|
|
2185
|
+
};
|
|
2186
|
+
function e(i, t) {
|
|
2187
|
+
if (!o.isString(i)) throw TypeError("name must be a string");
|
|
2188
|
+
if (t && !o.isObject(t)) throw TypeError("options must be an object");
|
|
2189
|
+
this.options = t, this.parsedOptions = null, this.name = i, this._edition = null, this._defaultEdition = "proto2", this._features = {}, this._featuresResolved = !1, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
|
|
2190
|
+
}
|
|
2191
|
+
return Object.defineProperties(e.prototype, {
|
|
2192
|
+
root: {
|
|
2193
|
+
get: function() {
|
|
2194
|
+
for(var i = this; i.parent !== null;)i = i.parent;
|
|
2195
|
+
return i;
|
|
2196
|
+
}
|
|
2197
|
+
},
|
|
2198
|
+
fullName: {
|
|
2199
|
+
get: function() {
|
|
2200
|
+
for(var i = [
|
|
2201
|
+
this.name
|
|
2202
|
+
], t = this.parent; t;)i.unshift(t.name), t = t.parent;
|
|
2203
|
+
return i.join(".");
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
}), e.prototype.toJSON = function() {
|
|
2207
|
+
throw Error();
|
|
2208
|
+
}, e.prototype.onAdd = function(t) {
|
|
2209
|
+
this.parent && this.parent !== t && this.parent.remove(this), this.parent = t, this.resolved = !1;
|
|
2210
|
+
var r = t.root;
|
|
2211
|
+
r instanceof h && r._handleAdd(this);
|
|
2212
|
+
}, e.prototype.onRemove = function(t) {
|
|
2213
|
+
var r = t.root;
|
|
2214
|
+
r instanceof h && r._handleRemove(this), this.parent = null, this.resolved = !1;
|
|
2215
|
+
}, e.prototype.resolve = function() {
|
|
2216
|
+
return this.resolved ? this : (this.root instanceof h && (this.resolved = !0), this);
|
|
2217
|
+
}, e.prototype._resolveFeaturesRecursive = function(t) {
|
|
2218
|
+
return this._resolveFeatures(this._edition || t);
|
|
2219
|
+
}, e.prototype._resolveFeatures = function(t) {
|
|
2220
|
+
if (!this._featuresResolved) {
|
|
2221
|
+
var r = {};
|
|
2222
|
+
if (!t) throw new Error("Unknown edition for " + this.fullName);
|
|
2223
|
+
var d = Object.assign(this.options ? Object.assign({}, this.options.features) : {}, this._inferLegacyProtoFeatures(t));
|
|
2224
|
+
if (this._edition) {
|
|
2225
|
+
if (t === "proto2") r = Object.assign({}, c);
|
|
2226
|
+
else if (t === "proto3") r = Object.assign({}, n);
|
|
2227
|
+
else if (t === "2023") r = Object.assign({}, f);
|
|
2228
|
+
else throw new Error("Unknown edition: " + t);
|
|
2229
|
+
this._features = Object.assign(r, d || {}), this._featuresResolved = !0;
|
|
2230
|
+
return;
|
|
2231
|
+
}
|
|
2232
|
+
if (this.partOf instanceof l) {
|
|
2233
|
+
var s = Object.assign({}, this.partOf._features);
|
|
2234
|
+
this._features = Object.assign(s, d || {});
|
|
2235
|
+
} else if (!this.declaringField) if (this.parent) {
|
|
2236
|
+
var u = Object.assign({}, this.parent._features);
|
|
2237
|
+
this._features = Object.assign(u, d || {});
|
|
2238
|
+
} else throw new Error("Unable to find a parent for " + this.fullName);
|
|
2239
|
+
this.extensionField && (this.extensionField._features = this._features), this._featuresResolved = !0;
|
|
2240
|
+
}
|
|
2241
|
+
}, e.prototype._inferLegacyProtoFeatures = function() {
|
|
2242
|
+
return {};
|
|
2243
|
+
}, e.prototype.getOption = function(t) {
|
|
2244
|
+
if (this.options) return this.options[t];
|
|
2245
|
+
}, e.prototype.setOption = function(t, r, d) {
|
|
2246
|
+
return t === "__proto__" ? this : (this.options || (this.options = {}), /^features\./.test(t) ? o.setProperty(this.options, t, r, d) : (!d || this.options[t] === void 0) && (this.getOption(t) !== r && (this.resolved = !1), this.options[t] = r), this);
|
|
2247
|
+
}, e.prototype.setParsedOption = function(t, r, d) {
|
|
2248
|
+
if (t === "__proto__") return this;
|
|
2249
|
+
this.parsedOptions || (this.parsedOptions = []);
|
|
2250
|
+
var s = this.parsedOptions;
|
|
2251
|
+
if (d) {
|
|
2252
|
+
var u = s.find(function(y) {
|
|
2253
|
+
return Object.prototype.hasOwnProperty.call(y, t);
|
|
2254
|
+
});
|
|
2255
|
+
if (u) {
|
|
2256
|
+
var a = u[t];
|
|
2257
|
+
o.setProperty(a, d, r);
|
|
2258
|
+
} else u = {}, u[t] = o.setProperty({}, d, r), s.push(u);
|
|
2259
|
+
} else {
|
|
2260
|
+
var p = {};
|
|
2261
|
+
p[t] = r, s.push(p);
|
|
2262
|
+
}
|
|
2263
|
+
return this;
|
|
2264
|
+
}, e.prototype.setOptions = function(t, r) {
|
|
2265
|
+
if (t) for(var d = Object.keys(t), s = 0; s < d.length; ++s)this.setOption(d[s], t[d[s]], r);
|
|
2266
|
+
return this;
|
|
2267
|
+
}, e.prototype.toString = function() {
|
|
2268
|
+
var t = this.constructor.className, r = this.fullName;
|
|
2269
|
+
return r.length ? t + " " + r : t;
|
|
2270
|
+
}, e.prototype._editionToJSON = function() {
|
|
2271
|
+
if (!(!this._edition || this._edition === "proto3")) return this._edition;
|
|
2272
|
+
}, e._configure = function(i) {
|
|
2273
|
+
h = i;
|
|
2274
|
+
}, mt;
|
|
2275
|
+
}
|
|
2276
|
+
var vt, Cr;
|
|
2277
|
+
function re() {
|
|
2278
|
+
if (Cr) return vt;
|
|
2279
|
+
Cr = 1, vt = f;
|
|
2280
|
+
var l = oe();
|
|
2281
|
+
((f.prototype = Object.create(l.prototype)).constructor = f).className = "Enum";
|
|
2282
|
+
var o = ve(), h = U();
|
|
2283
|
+
function f(c, n, e, i, t, r) {
|
|
2284
|
+
if (l.call(this, c, e), n && typeof n != "object") throw TypeError("values must be an object");
|
|
2285
|
+
if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = i, this.comments = t || {}, this.valuesOptions = r, this._valuesFeatures = {}, this.reserved = void 0, n) for(var d = Object.keys(n), s = 0; s < d.length; ++s)d[s] !== "__proto__" && typeof n[d[s]] == "number" && (this.valuesById[this.values[d[s]] = n[d[s]]] = d[s]);
|
|
2286
|
+
}
|
|
2287
|
+
return f.prototype._resolveFeatures = function(n) {
|
|
2288
|
+
return n = this._edition || n, l.prototype._resolveFeatures.call(this, n), Object.keys(this.values).forEach((e)=>{
|
|
2289
|
+
var i = Object.assign({}, this._features);
|
|
2290
|
+
this._valuesFeatures[e] = Object.assign(i, this.valuesOptions && this.valuesOptions[e] && this.valuesOptions[e].features);
|
|
2291
|
+
}), this;
|
|
2292
|
+
}, f.fromJSON = function(n, e) {
|
|
2293
|
+
var i = new f(n, e.values, e.options, e.comment, e.comments);
|
|
2294
|
+
return i.reserved = e.reserved, e.edition && (i._edition = e.edition), i._defaultEdition = "proto3", i;
|
|
2295
|
+
}, f.prototype.toJSON = function(n) {
|
|
2296
|
+
var e = n ? !!n.keepComments : !1;
|
|
2297
|
+
return h.toObject([
|
|
2298
|
+
"edition",
|
|
2299
|
+
this._editionToJSON(),
|
|
2300
|
+
"options",
|
|
2301
|
+
this.options,
|
|
2302
|
+
"valuesOptions",
|
|
2303
|
+
this.valuesOptions,
|
|
2304
|
+
"values",
|
|
2305
|
+
this.values,
|
|
2306
|
+
"reserved",
|
|
2307
|
+
this.reserved && this.reserved.length ? this.reserved : void 0,
|
|
2308
|
+
"comment",
|
|
2309
|
+
e ? this.comment : void 0,
|
|
2310
|
+
"comments",
|
|
2311
|
+
e ? this.comments : void 0
|
|
2312
|
+
]);
|
|
2313
|
+
}, f.prototype.add = function(n, e, i, t) {
|
|
2314
|
+
if (!h.isString(n)) throw TypeError("name must be a string");
|
|
2315
|
+
if (!h.isInteger(e)) throw TypeError("id must be an integer");
|
|
2316
|
+
if (n === "__proto__") return this;
|
|
2317
|
+
if (this.values[n] !== void 0) throw Error("duplicate name '" + n + "' in " + this);
|
|
2318
|
+
if (this.isReservedId(e)) throw Error("id " + e + " is reserved in " + this);
|
|
2319
|
+
if (this.isReservedName(n)) throw Error("name '" + n + "' is reserved in " + this);
|
|
2320
|
+
if (this.valuesById[e] !== void 0) {
|
|
2321
|
+
if (!(this.options && this.options.allow_alias)) throw Error("duplicate id " + e + " in " + this);
|
|
2322
|
+
this.values[n] = e;
|
|
2323
|
+
} else this.valuesById[this.values[n] = e] = n;
|
|
2324
|
+
return t && (this.valuesOptions === void 0 && (this.valuesOptions = {}), this.valuesOptions[n] = t || null), this.comments[n] = i || null, this;
|
|
2325
|
+
}, f.prototype.remove = function(n) {
|
|
2326
|
+
if (!h.isString(n)) throw TypeError("name must be a string");
|
|
2327
|
+
var e = this.values[n];
|
|
2328
|
+
if (e == null) throw Error("name '" + n + "' does not exist in " + this);
|
|
2329
|
+
return delete this.valuesById[e], delete this.values[n], delete this.comments[n], this.valuesOptions && delete this.valuesOptions[n], this;
|
|
2330
|
+
}, f.prototype.isReservedId = function(n) {
|
|
2331
|
+
return o.isReservedId(this.reserved, n);
|
|
2332
|
+
}, f.prototype.isReservedName = function(n) {
|
|
2333
|
+
return o.isReservedName(this.reserved, n);
|
|
2334
|
+
}, vt;
|
|
2335
|
+
}
|
|
2336
|
+
var gt, Rr;
|
|
2337
|
+
function Lr() {
|
|
2338
|
+
if (Rr) return gt;
|
|
2339
|
+
Rr = 1, gt = c;
|
|
2340
|
+
var l = re(), o = ce(), h = U();
|
|
2341
|
+
function f(n, e, i, t) {
|
|
2342
|
+
return e.delimited ? n("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", i, t, (e.id << 3 | 3) >>> 0, (e.id << 3 | 4) >>> 0) : n("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", i, t, (e.id << 3 | 2) >>> 0);
|
|
2343
|
+
}
|
|
2344
|
+
function c(n) {
|
|
2345
|
+
for(var e = h.codegen([
|
|
2346
|
+
"m",
|
|
2347
|
+
"w"
|
|
2348
|
+
], n.name + "$encode")("if(!w)")("w=Writer.create()"), i, t, r = (n.fieldsArray.slice().sort(h.compareFieldsById)), i = 0; i < r.length; ++i){
|
|
2349
|
+
var d = r[i].resolve(), s = n._fieldsArray.indexOf(d), u = d.resolvedType instanceof l ? "int32" : d.type, a = o.basic[u];
|
|
2350
|
+
t = "m" + h.safeProp(d.name), d.map ? (e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", t, d.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (d.id << 3 | 2) >>> 0, 8 | o.mapKey[d.keyType], d.keyType), a === void 0 ? e("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", s, t) : e(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | a, u, t), e("}")("}")) : d.repeated ? (e("if(%s!=null&&%s.length){", t, t), d.packed && o.packed[u] !== void 0 ? e("w.uint32(%i).fork()", (d.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", t)("w.%s(%s[i])", u, t)("w.ldelim()") : (e("for(var i=0;i<%s.length;++i)", t), a === void 0 ? f(e, d, s, t + "[i]") : e("w.uint32(%i).%s(%s[i])", (d.id << 3 | a) >>> 0, u, t)), e("}")) : (d.optional && e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", t, d.name), a === void 0 ? f(e, d, s, t) : e("w.uint32(%i).%s(%s)", (d.id << 3 | a) >>> 0, u, t));
|
|
2351
|
+
}
|
|
2352
|
+
return e("return w");
|
|
2353
|
+
}
|
|
2354
|
+
return gt;
|
|
2355
|
+
}
|
|
2356
|
+
var kr;
|
|
2357
|
+
function En() {
|
|
2358
|
+
if (kr) return xe.exports;
|
|
2359
|
+
kr = 1;
|
|
2360
|
+
var l = xe.exports = kn();
|
|
2361
|
+
l.build = "light";
|
|
2362
|
+
function o(f, c, n) {
|
|
2363
|
+
return typeof c == "function" ? (n = c, c = new l.Root()) : c || (c = new l.Root()), c.load(f, n);
|
|
2364
|
+
}
|
|
2365
|
+
l.load = o;
|
|
2366
|
+
function h(f, c) {
|
|
2367
|
+
return c || (c = new l.Root()), c.loadSync(f);
|
|
2368
|
+
}
|
|
2369
|
+
return l.loadSync = h, l.encoder = Lr(), l.decoder = Tr(), l.verifier = Gr(), l.converter = Jr(), l.ReflectionObject = oe(), l.Namespace = ve(), l.Root = xt(), l.Enum = re(), l.Type = Wt(), l.Field = se(), l.OneOf = de(), l.MapField = Bt(), l.Service = Ft(), l.Method = Nt(), l.Message = Et(), l.wrappers = Pr(), l.types = ce(), l.util = U(), l.ReflectionObject._configure(l.Root), l.Namespace._configure(l.Type, l.Service, l.Enum), l.Root._configure(l.Type), l.Field._configure(l.Type), xe.exports;
|
|
2370
|
+
}
|
|
2371
|
+
var bt, Sr;
|
|
2372
|
+
function Xr() {
|
|
2373
|
+
if (Sr) return bt;
|
|
2374
|
+
Sr = 1, bt = d;
|
|
2375
|
+
var l = /[\s{}=;:[\],'"()<>]/g, o = /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, h = /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g, f = /^ *[*/]+ */, c = /^\s*\*?\/*/, n = /\n/g, e = /\s/, i = /\\(.?)/g, t = {
|
|
2376
|
+
0: "\0",
|
|
2377
|
+
r: "\r",
|
|
2378
|
+
n: `
|
|
2379
|
+
`,
|
|
2380
|
+
t: " "
|
|
2381
|
+
};
|
|
2382
|
+
function r(s) {
|
|
2383
|
+
return s.replace(i, function(u, a) {
|
|
2384
|
+
switch(a){
|
|
2385
|
+
case "\\":
|
|
2386
|
+
case "":
|
|
2387
|
+
return a;
|
|
2388
|
+
default:
|
|
2389
|
+
return t[a] || "";
|
|
2390
|
+
}
|
|
2391
|
+
});
|
|
2392
|
+
}
|
|
2393
|
+
d.unescape = r;
|
|
2394
|
+
function d(s, u) {
|
|
2395
|
+
s = s.toString();
|
|
2396
|
+
var a = 0, p = s.length, y = 1, b = 0, v = {}, m = [], g = null;
|
|
2397
|
+
function O(W) {
|
|
2398
|
+
return Error("illegal " + W + " (line " + y + ")");
|
|
2399
|
+
}
|
|
2400
|
+
function N() {
|
|
2401
|
+
var W = g === "'" ? h : o;
|
|
2402
|
+
W.lastIndex = a - 1;
|
|
2403
|
+
var J = W.exec(s);
|
|
2404
|
+
if (!J) throw O("string");
|
|
2405
|
+
return a = W.lastIndex, R(g), g = null, r(J[1]);
|
|
2406
|
+
}
|
|
2407
|
+
function E(W) {
|
|
2408
|
+
return s.charAt(W);
|
|
2409
|
+
}
|
|
2410
|
+
function T(W, J, x) {
|
|
2411
|
+
var L = {
|
|
2412
|
+
type: s.charAt(W++),
|
|
2413
|
+
lineEmpty: !1,
|
|
2414
|
+
leading: x
|
|
2415
|
+
}, j;
|
|
2416
|
+
u ? j = 2 : j = 3;
|
|
2417
|
+
var G = W - j, X;
|
|
2418
|
+
do if (--G < 0 || (X = s.charAt(G)) === `
|
|
2419
|
+
`) {
|
|
2420
|
+
L.lineEmpty = !0;
|
|
2421
|
+
break;
|
|
2422
|
+
}
|
|
2423
|
+
while (X === " " || X === " ");
|
|
2424
|
+
for(var M = s.substring(W, J).split(n), K = 0; K < M.length; ++K)M[K] = M[K].replace(u ? c : f, "").trim();
|
|
2425
|
+
L.text = M.join(`
|
|
2426
|
+
`).trim(), v[y] = L, b = y;
|
|
2427
|
+
}
|
|
2428
|
+
function H(W) {
|
|
2429
|
+
var J = Z(W), x = s.substring(W, J), L = /^\s*\/\//.test(x);
|
|
2430
|
+
return L;
|
|
2431
|
+
}
|
|
2432
|
+
function Z(W) {
|
|
2433
|
+
for(var J = W; J < p && E(J) !== `
|
|
2434
|
+
`;)J++;
|
|
2435
|
+
return J;
|
|
2436
|
+
}
|
|
2437
|
+
function V() {
|
|
2438
|
+
if (m.length > 0) return m.shift();
|
|
2439
|
+
if (g) return N();
|
|
2440
|
+
var W, J, x, L, j, G = a === 0;
|
|
2441
|
+
do {
|
|
2442
|
+
if (a === p) return null;
|
|
2443
|
+
for(W = !1; e.test(x = E(a));)if (x === `
|
|
2444
|
+
` && (G = !0, ++y), ++a === p) return null;
|
|
2445
|
+
if (E(a) === "/") {
|
|
2446
|
+
if (++a === p) throw O("comment");
|
|
2447
|
+
if (E(a) === "/") if (u) {
|
|
2448
|
+
if (L = a, j = !1, H(a - 1)) {
|
|
2449
|
+
j = !0;
|
|
2450
|
+
do if (a = Z(a), a === p || (a++, !G)) break;
|
|
2451
|
+
while (H(a));
|
|
2452
|
+
} else a = Math.min(p, Z(a) + 1);
|
|
2453
|
+
j && (T(L, a, G), G = !0), y++, W = !0;
|
|
2454
|
+
} else {
|
|
2455
|
+
for(j = E(L = a + 1) === "/"; E(++a) !== `
|
|
2456
|
+
`;)if (a === p) return null;
|
|
2457
|
+
++a, j && (T(L, a - 1, G), G = !0), ++y, W = !0;
|
|
2458
|
+
}
|
|
2459
|
+
else if ((x = E(a)) === "*") {
|
|
2460
|
+
L = a + 1, j = u || E(L) === "*";
|
|
2461
|
+
do {
|
|
2462
|
+
if (x === `
|
|
2463
|
+
` && ++y, ++a === p) throw O("comment");
|
|
2464
|
+
J = x, x = E(a);
|
|
2465
|
+
}while (J !== "*" || x !== "/");
|
|
2466
|
+
++a, j && (T(L, a - 2, G), G = !0), W = !0;
|
|
2467
|
+
} else return "/";
|
|
2468
|
+
}
|
|
2469
|
+
}while (W);
|
|
2470
|
+
var X = a;
|
|
2471
|
+
l.lastIndex = 0;
|
|
2472
|
+
var M = l.test(E(X++));
|
|
2473
|
+
if (!M) for(; X < p && !l.test(E(X));)++X;
|
|
2474
|
+
var K = s.substring(a, a = X);
|
|
2475
|
+
return (K === '"' || K === "'") && (g = K), K;
|
|
2476
|
+
}
|
|
2477
|
+
function R(W) {
|
|
2478
|
+
m.push(W);
|
|
2479
|
+
}
|
|
2480
|
+
function q() {
|
|
2481
|
+
if (!m.length) {
|
|
2482
|
+
var W = V();
|
|
2483
|
+
if (W === null) return null;
|
|
2484
|
+
R(W);
|
|
2485
|
+
}
|
|
2486
|
+
return m[0];
|
|
2487
|
+
}
|
|
2488
|
+
function P(W, J) {
|
|
2489
|
+
var x = q(), L = x === W;
|
|
2490
|
+
if (L) return V(), !0;
|
|
2491
|
+
if (!J) throw O("token '" + x + "', '" + W + "' expected");
|
|
2492
|
+
return !1;
|
|
2493
|
+
}
|
|
2494
|
+
function k(W) {
|
|
2495
|
+
var J = null, x;
|
|
2496
|
+
return W === void 0 ? (x = v[y - 1], delete v[y - 1], x && (u || x.type === "*" || x.lineEmpty) && (J = x.leading ? x.text : null)) : (b < W && q(), x = v[W], delete v[W], x && !x.lineEmpty && (u || x.type === "/") && (J = x.leading ? null : x.text)), J;
|
|
2497
|
+
}
|
|
2498
|
+
return Object.defineProperty({
|
|
2499
|
+
next: V,
|
|
2500
|
+
peek: q,
|
|
2501
|
+
push: R,
|
|
2502
|
+
skip: P,
|
|
2503
|
+
cmnt: k
|
|
2504
|
+
}, "line", {
|
|
2505
|
+
get: function() {
|
|
2506
|
+
return y;
|
|
2507
|
+
}
|
|
2508
|
+
});
|
|
2509
|
+
}
|
|
2510
|
+
return bt;
|
|
2511
|
+
}
|
|
2512
|
+
var wt, Br;
|
|
2513
|
+
function Wn() {
|
|
2514
|
+
if (Br) return wt;
|
|
2515
|
+
Br = 1, wt = N, N.filename = null, N.defaults = {
|
|
2516
|
+
keepCase: !1
|
|
2517
|
+
};
|
|
2518
|
+
var l = Xr(), o = xt(), h = Wt(), f = se(), c = Bt(), n = de(), e = re(), i = Ft(), t = Nt(), r = oe(), d = ce(), s = U(), u = /^[1-9][0-9]*$/, a = /^-?[1-9][0-9]*$/, p = /^0[x][0-9a-fA-F]+$/, y = /^-?0[x][0-9a-fA-F]+$/, b = /^0[0-7]+$/, v = /^-?0[0-7]+$/, m = s.patterns.numberRe, g = /^[a-zA-Z_][a-zA-Z_0-9]*$/, O = s.patterns.typeRefRe;
|
|
2519
|
+
function N(E, T, H) {
|
|
2520
|
+
T instanceof o || (H = T, T = new o()), H || (H = N.defaults);
|
|
2521
|
+
var Z = H.preferTrailingComment || !1, V = l(E, H.alternateCommentMode || !1), R = V.next, q = V.push, P = V.peek, k = V.skip, W = V.cmnt, J = !0, x, L, j, G = "proto2", X = T, M = [], K = {}, ke = H.keepCase ? function(_) {
|
|
2522
|
+
return _;
|
|
2523
|
+
} : s.camelCase;
|
|
2524
|
+
function Kr() {
|
|
2525
|
+
M.forEach((_)=>{
|
|
2526
|
+
_._edition = G, Object.keys(K).forEach((w)=>{
|
|
2527
|
+
_.getOption(w) === void 0 && _.setOption(w, K[w], !0);
|
|
2528
|
+
});
|
|
2529
|
+
});
|
|
2530
|
+
}
|
|
2531
|
+
function B(_, w, I) {
|
|
2532
|
+
var A = N.filename;
|
|
2533
|
+
return I || (N.filename = null), Error("illegal " + (w || "token") + " '" + _ + "' (" + (A ? A + ", " : "") + "line " + V.line + ")");
|
|
2534
|
+
}
|
|
2535
|
+
function pe() {
|
|
2536
|
+
var _ = [], w;
|
|
2537
|
+
do {
|
|
2538
|
+
if ((w = R()) !== '"' && w !== "'") throw B(w);
|
|
2539
|
+
_.push(R()), k(w), w = P();
|
|
2540
|
+
}while (w === '"' || w === "'");
|
|
2541
|
+
return _.join("");
|
|
2542
|
+
}
|
|
2543
|
+
function Se(_) {
|
|
2544
|
+
var w = R();
|
|
2545
|
+
switch(w){
|
|
2546
|
+
case "'":
|
|
2547
|
+
case '"':
|
|
2548
|
+
return q(w), pe();
|
|
2549
|
+
case "true":
|
|
2550
|
+
case "TRUE":
|
|
2551
|
+
return !0;
|
|
2552
|
+
case "false":
|
|
2553
|
+
case "FALSE":
|
|
2554
|
+
return !1;
|
|
2555
|
+
}
|
|
2556
|
+
try {
|
|
2557
|
+
return Mr(w, !0);
|
|
2558
|
+
} catch {
|
|
2559
|
+
if (O.test(w)) return w;
|
|
2560
|
+
throw B(w, "value");
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
function be(_, w) {
|
|
2564
|
+
var I, A;
|
|
2565
|
+
do if (w && ((I = P()) === '"' || I === "'")) {
|
|
2566
|
+
var S = pe();
|
|
2567
|
+
if (_.push(S), G >= 2023) throw B(S, "id");
|
|
2568
|
+
} else try {
|
|
2569
|
+
_.push([
|
|
2570
|
+
A = ae(R()),
|
|
2571
|
+
k("to", !0) ? ae(R()) : A
|
|
2572
|
+
]);
|
|
2573
|
+
} catch (F) {
|
|
2574
|
+
if (w && O.test(I) && G >= 2023) _.push(I);
|
|
2575
|
+
else throw F;
|
|
2576
|
+
}
|
|
2577
|
+
while (k(",", !0));
|
|
2578
|
+
var C = {
|
|
2579
|
+
options: void 0
|
|
2580
|
+
};
|
|
2581
|
+
C.setOption = function(F, D) {
|
|
2582
|
+
this.options === void 0 && (this.options = {}), this.options[F] = D;
|
|
2583
|
+
}, Q(C, function(D) {
|
|
2584
|
+
if (D === "option") ee(C, D), k(";");
|
|
2585
|
+
else throw B(D);
|
|
2586
|
+
}, function() {
|
|
2587
|
+
we(C);
|
|
2588
|
+
});
|
|
2589
|
+
}
|
|
2590
|
+
function Mr(_, w) {
|
|
2591
|
+
var I = 1;
|
|
2592
|
+
switch(_.charAt(0) === "-" && (I = -1, _ = _.substring(1)), _){
|
|
2593
|
+
case "inf":
|
|
2594
|
+
case "INF":
|
|
2595
|
+
case "Inf":
|
|
2596
|
+
return I * (1 / 0);
|
|
2597
|
+
case "nan":
|
|
2598
|
+
case "NAN":
|
|
2599
|
+
case "Nan":
|
|
2600
|
+
case "NaN":
|
|
2601
|
+
return NaN;
|
|
2602
|
+
case "0":
|
|
2603
|
+
return 0;
|
|
2604
|
+
}
|
|
2605
|
+
if (u.test(_)) return I * parseInt(_, 10);
|
|
2606
|
+
if (p.test(_)) return I * parseInt(_, 16);
|
|
2607
|
+
if (b.test(_)) return I * parseInt(_, 8);
|
|
2608
|
+
if (m.test(_)) return I * parseFloat(_);
|
|
2609
|
+
throw B(_, "number", w);
|
|
2610
|
+
}
|
|
2611
|
+
function ae(_, w) {
|
|
2612
|
+
switch(_){
|
|
2613
|
+
case "max":
|
|
2614
|
+
case "MAX":
|
|
2615
|
+
case "Max":
|
|
2616
|
+
return 536870911;
|
|
2617
|
+
case "0":
|
|
2618
|
+
return 0;
|
|
2619
|
+
}
|
|
2620
|
+
if (!w && _.charAt(0) === "-") throw B(_, "id");
|
|
2621
|
+
if (a.test(_)) return parseInt(_, 10);
|
|
2622
|
+
if (y.test(_)) return parseInt(_, 16);
|
|
2623
|
+
if (v.test(_)) return parseInt(_, 8);
|
|
2624
|
+
throw B(_, "id");
|
|
2625
|
+
}
|
|
2626
|
+
function $r() {
|
|
2627
|
+
if (x !== void 0) throw B("package");
|
|
2628
|
+
if (x = R(), !O.test(x)) throw B(x, "name");
|
|
2629
|
+
X = X.define(x), k(";");
|
|
2630
|
+
}
|
|
2631
|
+
function Qr() {
|
|
2632
|
+
var _ = P(), w;
|
|
2633
|
+
switch(_){
|
|
2634
|
+
case "weak":
|
|
2635
|
+
w = j || (j = []), R();
|
|
2636
|
+
break;
|
|
2637
|
+
case "public":
|
|
2638
|
+
R();
|
|
2639
|
+
default:
|
|
2640
|
+
w = L || (L = []);
|
|
2641
|
+
break;
|
|
2642
|
+
}
|
|
2643
|
+
_ = pe(), k(";"), w.push(_);
|
|
2644
|
+
}
|
|
2645
|
+
function en() {
|
|
2646
|
+
if (k("="), G = pe(), G < 2023) throw B(G, "syntax");
|
|
2647
|
+
k(";");
|
|
2648
|
+
}
|
|
2649
|
+
function tn() {
|
|
2650
|
+
if (k("="), G = pe(), ![
|
|
2651
|
+
"2023"
|
|
2652
|
+
].includes(G)) throw B(G, "edition");
|
|
2653
|
+
k(";");
|
|
2654
|
+
}
|
|
2655
|
+
function Be(_, w, I) {
|
|
2656
|
+
switch(I = s.checkDepth(I), w){
|
|
2657
|
+
case "option":
|
|
2658
|
+
return ee(_, w), k(";"), !0;
|
|
2659
|
+
case "message":
|
|
2660
|
+
return Gt(_, w, I + 1), !0;
|
|
2661
|
+
case "enum":
|
|
2662
|
+
return Jt(_, w), !0;
|
|
2663
|
+
case "service":
|
|
2664
|
+
return un(_, w, I + 1), !0;
|
|
2665
|
+
case "extend":
|
|
2666
|
+
return fn(_, w, I), !0;
|
|
2667
|
+
}
|
|
2668
|
+
return !1;
|
|
2669
|
+
}
|
|
2670
|
+
function Q(_, w, I) {
|
|
2671
|
+
var A = V.line;
|
|
2672
|
+
if (_ && (typeof _.comment != "string" && (_.comment = W()), _.filename = N.filename), k("{", !0)) {
|
|
2673
|
+
for(var S; (S = R()) !== "}";)w(S);
|
|
2674
|
+
k(";", !0);
|
|
2675
|
+
} else I && I(), k(";"), _ && (typeof _.comment != "string" || Z) && (_.comment = W(A) || _.comment);
|
|
2676
|
+
}
|
|
2677
|
+
function Gt(_, w, I) {
|
|
2678
|
+
if (I = s.checkDepth(I), !g.test(w = R())) throw B(w, "type name");
|
|
2679
|
+
var A = new h(w);
|
|
2680
|
+
Q(A, function(C) {
|
|
2681
|
+
if (!Be(A, C, I)) switch(C){
|
|
2682
|
+
case "map":
|
|
2683
|
+
nn(A);
|
|
2684
|
+
break;
|
|
2685
|
+
case "required":
|
|
2686
|
+
if (G !== "proto2") throw B(C);
|
|
2687
|
+
case "repeated":
|
|
2688
|
+
$(A, C, void 0, I + 1);
|
|
2689
|
+
break;
|
|
2690
|
+
case "optional":
|
|
2691
|
+
if (G === "proto3") $(A, "proto3_optional", void 0, I + 1);
|
|
2692
|
+
else {
|
|
2693
|
+
if (G !== "proto2") throw B(C);
|
|
2694
|
+
$(A, "optional", void 0, I + 1);
|
|
2695
|
+
}
|
|
2696
|
+
break;
|
|
2697
|
+
case "oneof":
|
|
2698
|
+
sn(A, C, I + 1);
|
|
2699
|
+
break;
|
|
2700
|
+
case "extensions":
|
|
2701
|
+
be(A.extensions || (A.extensions = []));
|
|
2702
|
+
break;
|
|
2703
|
+
case "reserved":
|
|
2704
|
+
be(A.reserved || (A.reserved = []), !0);
|
|
2705
|
+
break;
|
|
2706
|
+
default:
|
|
2707
|
+
if (G === "proto2" || !O.test(C)) throw B(C);
|
|
2708
|
+
q(C), $(A, "optional", void 0, I + 1);
|
|
2709
|
+
break;
|
|
2710
|
+
}
|
|
2711
|
+
}), _.add(A), _ === X && M.push(A);
|
|
2712
|
+
}
|
|
2713
|
+
function $(_, w, I, A) {
|
|
2714
|
+
var S = R();
|
|
2715
|
+
if (S === "group") {
|
|
2716
|
+
rn(_, w, A);
|
|
2717
|
+
return;
|
|
2718
|
+
}
|
|
2719
|
+
for(; S.endsWith(".") || P().startsWith(".");)S += R();
|
|
2720
|
+
if (!O.test(S)) throw B(S, "type");
|
|
2721
|
+
var C = R();
|
|
2722
|
+
if (!g.test(C)) throw B(C, "name");
|
|
2723
|
+
C = ke(C), k("=");
|
|
2724
|
+
var F = new f(C, ae(R()), S, w, I);
|
|
2725
|
+
if (Q(F, function(Y) {
|
|
2726
|
+
if (Y === "option") ee(F, Y), k(";");
|
|
2727
|
+
else throw B(Y);
|
|
2728
|
+
}, function() {
|
|
2729
|
+
we(F);
|
|
2730
|
+
}), w === "proto3_optional") {
|
|
2731
|
+
var D = new n("_" + C);
|
|
2732
|
+
F.setOption("proto3_optional", !0), D.add(F), _.add(D);
|
|
2733
|
+
} else _.add(F);
|
|
2734
|
+
_ === X && M.push(F);
|
|
2735
|
+
}
|
|
2736
|
+
function rn(_, w, I) {
|
|
2737
|
+
if (I = s.checkDepth(I), G >= 2023) throw B("group");
|
|
2738
|
+
var A = R();
|
|
2739
|
+
if (!g.test(A)) throw B(A, "name");
|
|
2740
|
+
var S = s.lcFirst(A);
|
|
2741
|
+
A === S && (A = s.ucFirst(A)), k("=");
|
|
2742
|
+
var C = ae(R()), F = new h(A);
|
|
2743
|
+
F.group = !0;
|
|
2744
|
+
var D = new f(S, C, A, w);
|
|
2745
|
+
D.filename = N.filename, Q(F, function(Y) {
|
|
2746
|
+
switch(Y){
|
|
2747
|
+
case "option":
|
|
2748
|
+
ee(F, Y), k(";");
|
|
2749
|
+
break;
|
|
2750
|
+
case "required":
|
|
2751
|
+
case "repeated":
|
|
2752
|
+
$(F, Y, void 0, I + 1);
|
|
2753
|
+
break;
|
|
2754
|
+
case "optional":
|
|
2755
|
+
G === "proto3" ? $(F, "proto3_optional", void 0, I + 1) : $(F, "optional", void 0, I + 1);
|
|
2756
|
+
break;
|
|
2757
|
+
case "message":
|
|
2758
|
+
Gt(F, Y, I + 1);
|
|
2759
|
+
break;
|
|
2760
|
+
case "enum":
|
|
2761
|
+
Jt(F, Y);
|
|
2762
|
+
break;
|
|
2763
|
+
case "reserved":
|
|
2764
|
+
be(F.reserved || (F.reserved = []), !0);
|
|
2765
|
+
break;
|
|
2766
|
+
default:
|
|
2767
|
+
throw B(Y);
|
|
2768
|
+
}
|
|
2769
|
+
}), _.add(F).add(D);
|
|
2770
|
+
}
|
|
2771
|
+
function nn(_) {
|
|
2772
|
+
k("<");
|
|
2773
|
+
var w = R();
|
|
2774
|
+
if (d.mapKey[w] === void 0) throw B(w, "type");
|
|
2775
|
+
k(",");
|
|
2776
|
+
var I = R();
|
|
2777
|
+
if (!O.test(I)) throw B(I, "type");
|
|
2778
|
+
k(">");
|
|
2779
|
+
var A = R();
|
|
2780
|
+
if (!g.test(A)) throw B(A, "name");
|
|
2781
|
+
k("=");
|
|
2782
|
+
var S = new c(ke(A), ae(R()), w, I);
|
|
2783
|
+
Q(S, function(F) {
|
|
2784
|
+
if (F === "option") ee(S, F), k(";");
|
|
2785
|
+
else throw B(F);
|
|
2786
|
+
}, function() {
|
|
2787
|
+
we(S);
|
|
2788
|
+
}), _.add(S);
|
|
2789
|
+
}
|
|
2790
|
+
function sn(_, w, I) {
|
|
2791
|
+
if (!g.test(w = R())) throw B(w, "name");
|
|
2792
|
+
var A = new n(ke(w));
|
|
2793
|
+
Q(A, function(C) {
|
|
2794
|
+
C === "option" ? (ee(A, C), k(";")) : (q(C), $(A, "optional", void 0, I));
|
|
2795
|
+
}), _.add(A);
|
|
2796
|
+
}
|
|
2797
|
+
function Jt(_, w) {
|
|
2798
|
+
if (!g.test(w = R())) throw B(w, "name");
|
|
2799
|
+
var I = new e(w);
|
|
2800
|
+
Q(I, function(S) {
|
|
2801
|
+
switch(S){
|
|
2802
|
+
case "option":
|
|
2803
|
+
ee(I, S), k(";");
|
|
2804
|
+
break;
|
|
2805
|
+
case "reserved":
|
|
2806
|
+
be(I.reserved || (I.reserved = []), !0), I.reserved === void 0 && (I.reserved = []);
|
|
2807
|
+
break;
|
|
2808
|
+
default:
|
|
2809
|
+
on(I, S);
|
|
2810
|
+
}
|
|
2811
|
+
}), _.add(I), _ === X && M.push(I);
|
|
2812
|
+
}
|
|
2813
|
+
function on(_, w) {
|
|
2814
|
+
if (!g.test(w)) throw B(w, "name");
|
|
2815
|
+
k("=");
|
|
2816
|
+
var I = ae(R(), !0), A = {
|
|
2817
|
+
options: void 0
|
|
2818
|
+
};
|
|
2819
|
+
A.getOption = function(S) {
|
|
2820
|
+
return this.options[S];
|
|
2821
|
+
}, A.setOption = function(S, C) {
|
|
2822
|
+
r.prototype.setOption.call(A, S, C);
|
|
2823
|
+
}, A.setParsedOption = function() {}, Q(A, function(C) {
|
|
2824
|
+
if (C === "option") ee(A, C), k(";");
|
|
2825
|
+
else throw B(C);
|
|
2826
|
+
}, function() {
|
|
2827
|
+
we(A);
|
|
2828
|
+
}), _.add(w, I, A.comment, A.parsedOptions || A.options);
|
|
2829
|
+
}
|
|
2830
|
+
function ee(_, w) {
|
|
2831
|
+
var I, A, S = !0;
|
|
2832
|
+
for(w === "option" && (w = R()); w !== "=";){
|
|
2833
|
+
if (w === "(") {
|
|
2834
|
+
var C = R();
|
|
2835
|
+
k(")"), w = "(" + C + ")";
|
|
2836
|
+
}
|
|
2837
|
+
if (S) {
|
|
2838
|
+
if (S = !1, w.includes(".") && !w.includes("(")) {
|
|
2839
|
+
var F = w.split(".");
|
|
2840
|
+
I = F[0] + ".", w = F[1];
|
|
2841
|
+
continue;
|
|
2842
|
+
}
|
|
2843
|
+
I = w;
|
|
2844
|
+
} else A = A ? A += w : w;
|
|
2845
|
+
w = R();
|
|
2846
|
+
}
|
|
2847
|
+
var D = A ? I.concat(A) : I, te = Pt(_, D);
|
|
2848
|
+
A = A && A[0] === "." ? A.slice(1) : A, I = I && I[I.length - 1] === "." ? I.slice(0, -1) : I, an(_, I, te, A);
|
|
2849
|
+
}
|
|
2850
|
+
function Pt(_, w, I) {
|
|
2851
|
+
if (I = s.checkDepth(I), k("{", !0)) {
|
|
2852
|
+
for(var A = {}; !k("}", !0);){
|
|
2853
|
+
if (!g.test(z = R())) throw B(z, "name");
|
|
2854
|
+
if (z === null) throw B(z, "end of input");
|
|
2855
|
+
var S, C = z;
|
|
2856
|
+
if (k(":", !0), P() === "{") S = Pt(_, w + "." + z, I + 1);
|
|
2857
|
+
else if (P() === "[") {
|
|
2858
|
+
S = [];
|
|
2859
|
+
var F;
|
|
2860
|
+
if (k("[", !0)) {
|
|
2861
|
+
do F = Se(), S.push(F);
|
|
2862
|
+
while (k(",", !0));
|
|
2863
|
+
k("]"), typeof F < "u" && Ne(_, w + "." + z, F);
|
|
2864
|
+
}
|
|
2865
|
+
} else S = Se(), Ne(_, w + "." + z, S);
|
|
2866
|
+
var D = A[C];
|
|
2867
|
+
D && (S = [].concat(D).concat(S)), C !== "__proto__" && (A[C] = S), k(",", !0), k(";", !0);
|
|
2868
|
+
}
|
|
2869
|
+
return A;
|
|
2870
|
+
}
|
|
2871
|
+
var te = Se();
|
|
2872
|
+
return Ne(_, w, te), te;
|
|
2873
|
+
}
|
|
2874
|
+
function Ne(_, w, I) {
|
|
2875
|
+
if (X === _ && /^features\./.test(w)) {
|
|
2876
|
+
K[w] = I;
|
|
2877
|
+
return;
|
|
2878
|
+
}
|
|
2879
|
+
_.setOption && _.setOption(w, I);
|
|
2880
|
+
}
|
|
2881
|
+
function an(_, w, I, A) {
|
|
2882
|
+
_.setParsedOption && _.setParsedOption(w, I, A);
|
|
2883
|
+
}
|
|
2884
|
+
function we(_) {
|
|
2885
|
+
if (k("[", !0)) {
|
|
2886
|
+
do ee(_, "option");
|
|
2887
|
+
while (k(",", !0));
|
|
2888
|
+
k("]");
|
|
2889
|
+
}
|
|
2890
|
+
return _;
|
|
2891
|
+
}
|
|
2892
|
+
function un(_, w, I) {
|
|
2893
|
+
if (I = s.checkDepth(I), !g.test(w = R())) throw B(w, "service name");
|
|
2894
|
+
var A = new i(w);
|
|
2895
|
+
Q(A, function(C) {
|
|
2896
|
+
if (!Be(A, C, I)) if (C === "rpc") ln(A, C);
|
|
2897
|
+
else throw B(C);
|
|
2898
|
+
}), _.add(A), _ === X && M.push(A);
|
|
2899
|
+
}
|
|
2900
|
+
function ln(_, w) {
|
|
2901
|
+
var I = W(), A = w;
|
|
2902
|
+
if (!g.test(w = R())) throw B(w, "name");
|
|
2903
|
+
var S = w, C, F, D, te;
|
|
2904
|
+
if (k("("), k("stream", !0) && (F = !0), !O.test(w = R()) || (C = w, k(")"), k("returns"), k("("), k("stream", !0) && (te = !0), !O.test(w = R()))) throw B(w);
|
|
2905
|
+
D = w, k(")");
|
|
2906
|
+
var Y = new t(S, A, C, D, F, te);
|
|
2907
|
+
Y.comment = I, Q(Y, function(Fe) {
|
|
2908
|
+
if (Fe === "option") ee(Y, Fe), k(";");
|
|
2909
|
+
else throw B(Fe);
|
|
2910
|
+
}), _.add(Y);
|
|
2911
|
+
}
|
|
2912
|
+
function fn(_, w, I) {
|
|
2913
|
+
if (!O.test(w = R())) throw B(w, "reference");
|
|
2914
|
+
var A = w;
|
|
2915
|
+
Q(null, function(C) {
|
|
2916
|
+
switch(C){
|
|
2917
|
+
case "required":
|
|
2918
|
+
case "repeated":
|
|
2919
|
+
$(_, C, A, I + 1);
|
|
2920
|
+
break;
|
|
2921
|
+
case "optional":
|
|
2922
|
+
G === "proto3" ? $(_, "proto3_optional", A, I + 1) : $(_, "optional", A, I + 1);
|
|
2923
|
+
break;
|
|
2924
|
+
default:
|
|
2925
|
+
if (G === "proto2" || !O.test(C)) throw B(C);
|
|
2926
|
+
q(C), $(_, "optional", A, I + 1);
|
|
2927
|
+
break;
|
|
2928
|
+
}
|
|
2929
|
+
});
|
|
2930
|
+
}
|
|
2931
|
+
for(var z; (z = R()) !== null;)switch(z){
|
|
2932
|
+
case "package":
|
|
2933
|
+
if (!J) throw B(z);
|
|
2934
|
+
$r();
|
|
2935
|
+
break;
|
|
2936
|
+
case "import":
|
|
2937
|
+
if (!J) throw B(z);
|
|
2938
|
+
Qr();
|
|
2939
|
+
break;
|
|
2940
|
+
case "syntax":
|
|
2941
|
+
if (!J) throw B(z);
|
|
2942
|
+
en();
|
|
2943
|
+
break;
|
|
2944
|
+
case "edition":
|
|
2945
|
+
if (!J) throw B(z);
|
|
2946
|
+
tn();
|
|
2947
|
+
break;
|
|
2948
|
+
case "option":
|
|
2949
|
+
ee(X, z), k(";", !0);
|
|
2950
|
+
break;
|
|
2951
|
+
default:
|
|
2952
|
+
if (Be(X, z, 0)) {
|
|
2953
|
+
J = !1;
|
|
2954
|
+
continue;
|
|
2955
|
+
}
|
|
2956
|
+
throw B(z);
|
|
2957
|
+
}
|
|
2958
|
+
return Kr(), N.filename = null, {
|
|
2959
|
+
package: x,
|
|
2960
|
+
imports: L,
|
|
2961
|
+
weakImports: j,
|
|
2962
|
+
root: T
|
|
2963
|
+
};
|
|
2964
|
+
}
|
|
2965
|
+
return wt;
|
|
2966
|
+
}
|
|
2967
|
+
var _t, Nr;
|
|
2968
|
+
function xn() {
|
|
2969
|
+
if (Nr) return _t;
|
|
2970
|
+
Nr = 1, _t = o;
|
|
2971
|
+
var l = /\/|\./;
|
|
2972
|
+
function o(f, c) {
|
|
2973
|
+
l.test(f) || (f = "google/protobuf/" + f + ".proto", c = {
|
|
2974
|
+
nested: {
|
|
2975
|
+
google: {
|
|
2976
|
+
nested: {
|
|
2977
|
+
protobuf: {
|
|
2978
|
+
nested: c
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2982
|
+
}
|
|
2983
|
+
}), o[f] = c;
|
|
2984
|
+
}
|
|
2985
|
+
o("any", {
|
|
2986
|
+
Any: {
|
|
2987
|
+
fields: {
|
|
2988
|
+
type_url: {
|
|
2989
|
+
type: "string",
|
|
2990
|
+
id: 1
|
|
2991
|
+
},
|
|
2992
|
+
value: {
|
|
2993
|
+
type: "bytes",
|
|
2994
|
+
id: 2
|
|
2995
|
+
}
|
|
2996
|
+
}
|
|
2997
|
+
}
|
|
2998
|
+
});
|
|
2999
|
+
var h;
|
|
3000
|
+
return o("duration", {
|
|
3001
|
+
Duration: h = {
|
|
3002
|
+
fields: {
|
|
3003
|
+
seconds: {
|
|
3004
|
+
type: "int64",
|
|
3005
|
+
id: 1
|
|
3006
|
+
},
|
|
3007
|
+
nanos: {
|
|
3008
|
+
type: "int32",
|
|
3009
|
+
id: 2
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
3012
|
+
}
|
|
3013
|
+
}), o("timestamp", {
|
|
3014
|
+
Timestamp: h
|
|
3015
|
+
}), o("empty", {
|
|
3016
|
+
Empty: {
|
|
3017
|
+
fields: {}
|
|
3018
|
+
}
|
|
3019
|
+
}), o("struct", {
|
|
3020
|
+
Struct: {
|
|
3021
|
+
fields: {
|
|
3022
|
+
fields: {
|
|
3023
|
+
keyType: "string",
|
|
3024
|
+
type: "Value",
|
|
3025
|
+
id: 1
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
},
|
|
3029
|
+
Value: {
|
|
3030
|
+
oneofs: {
|
|
3031
|
+
kind: {
|
|
3032
|
+
oneof: [
|
|
3033
|
+
"nullValue",
|
|
3034
|
+
"numberValue",
|
|
3035
|
+
"stringValue",
|
|
3036
|
+
"boolValue",
|
|
3037
|
+
"structValue",
|
|
3038
|
+
"listValue"
|
|
3039
|
+
]
|
|
3040
|
+
}
|
|
3041
|
+
},
|
|
3042
|
+
fields: {
|
|
3043
|
+
nullValue: {
|
|
3044
|
+
type: "NullValue",
|
|
3045
|
+
id: 1
|
|
3046
|
+
},
|
|
3047
|
+
numberValue: {
|
|
3048
|
+
type: "double",
|
|
3049
|
+
id: 2
|
|
3050
|
+
},
|
|
3051
|
+
stringValue: {
|
|
3052
|
+
type: "string",
|
|
3053
|
+
id: 3
|
|
3054
|
+
},
|
|
3055
|
+
boolValue: {
|
|
3056
|
+
type: "bool",
|
|
3057
|
+
id: 4
|
|
3058
|
+
},
|
|
3059
|
+
structValue: {
|
|
3060
|
+
type: "Struct",
|
|
3061
|
+
id: 5
|
|
3062
|
+
},
|
|
3063
|
+
listValue: {
|
|
3064
|
+
type: "ListValue",
|
|
3065
|
+
id: 6
|
|
3066
|
+
}
|
|
3067
|
+
}
|
|
3068
|
+
},
|
|
3069
|
+
NullValue: {
|
|
3070
|
+
values: {
|
|
3071
|
+
NULL_VALUE: 0
|
|
3072
|
+
}
|
|
3073
|
+
},
|
|
3074
|
+
ListValue: {
|
|
3075
|
+
fields: {
|
|
3076
|
+
values: {
|
|
3077
|
+
rule: "repeated",
|
|
3078
|
+
type: "Value",
|
|
3079
|
+
id: 1
|
|
3080
|
+
}
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
}), o("wrappers", {
|
|
3084
|
+
DoubleValue: {
|
|
3085
|
+
fields: {
|
|
3086
|
+
value: {
|
|
3087
|
+
type: "double",
|
|
3088
|
+
id: 1
|
|
3089
|
+
}
|
|
3090
|
+
}
|
|
3091
|
+
},
|
|
3092
|
+
FloatValue: {
|
|
3093
|
+
fields: {
|
|
3094
|
+
value: {
|
|
3095
|
+
type: "float",
|
|
3096
|
+
id: 1
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
},
|
|
3100
|
+
Int64Value: {
|
|
3101
|
+
fields: {
|
|
3102
|
+
value: {
|
|
3103
|
+
type: "int64",
|
|
3104
|
+
id: 1
|
|
3105
|
+
}
|
|
3106
|
+
}
|
|
3107
|
+
},
|
|
3108
|
+
UInt64Value: {
|
|
3109
|
+
fields: {
|
|
3110
|
+
value: {
|
|
3111
|
+
type: "uint64",
|
|
3112
|
+
id: 1
|
|
3113
|
+
}
|
|
3114
|
+
}
|
|
3115
|
+
},
|
|
3116
|
+
Int32Value: {
|
|
3117
|
+
fields: {
|
|
3118
|
+
value: {
|
|
3119
|
+
type: "int32",
|
|
3120
|
+
id: 1
|
|
3121
|
+
}
|
|
3122
|
+
}
|
|
3123
|
+
},
|
|
3124
|
+
UInt32Value: {
|
|
3125
|
+
fields: {
|
|
3126
|
+
value: {
|
|
3127
|
+
type: "uint32",
|
|
3128
|
+
id: 1
|
|
3129
|
+
}
|
|
3130
|
+
}
|
|
3131
|
+
},
|
|
3132
|
+
BoolValue: {
|
|
3133
|
+
fields: {
|
|
3134
|
+
value: {
|
|
3135
|
+
type: "bool",
|
|
3136
|
+
id: 1
|
|
3137
|
+
}
|
|
3138
|
+
}
|
|
3139
|
+
},
|
|
3140
|
+
StringValue: {
|
|
3141
|
+
fields: {
|
|
3142
|
+
value: {
|
|
3143
|
+
type: "string",
|
|
3144
|
+
id: 1
|
|
3145
|
+
}
|
|
3146
|
+
}
|
|
3147
|
+
},
|
|
3148
|
+
BytesValue: {
|
|
3149
|
+
fields: {
|
|
3150
|
+
value: {
|
|
3151
|
+
type: "bytes",
|
|
3152
|
+
id: 1
|
|
3153
|
+
}
|
|
3154
|
+
}
|
|
3155
|
+
}
|
|
3156
|
+
}), o("field_mask", {
|
|
3157
|
+
FieldMask: {
|
|
3158
|
+
fields: {
|
|
3159
|
+
paths: {
|
|
3160
|
+
rule: "repeated",
|
|
3161
|
+
type: "string",
|
|
3162
|
+
id: 1
|
|
3163
|
+
}
|
|
3164
|
+
}
|
|
3165
|
+
}
|
|
3166
|
+
}), o.get = function(c) {
|
|
3167
|
+
return o[c] || null;
|
|
3168
|
+
}, _t;
|
|
3169
|
+
}
|
|
3170
|
+
var Fr;
|
|
3171
|
+
function Zn() {
|
|
3172
|
+
if (Fr) return We.exports;
|
|
3173
|
+
Fr = 1;
|
|
3174
|
+
var l = We.exports = En();
|
|
3175
|
+
return l.build = "full", l.tokenize = Xr(), l.parse = Wn(), l.common = xn(), l.Root._configure(l.Type, l.parse, l.common), We.exports;
|
|
3176
|
+
}
|
|
3177
|
+
var It, Er;
|
|
3178
|
+
function Vn() {
|
|
3179
|
+
return Er || (Er = 1, It = Zn()), It;
|
|
3180
|
+
}
|
|
3181
|
+
var Dr = Vn();
|
|
3182
|
+
const Hr = typeof window < "u" && typeof document < "u", Tn = "Deno" in globalThis && typeof WorkerGlobalScope > "u", Gn = typeof Worker < "u", he = (Hr || Tn) && Gn;
|
|
3183
|
+
let ie = null, Re = null;
|
|
3184
|
+
const le = new Map();
|
|
3185
|
+
let Zt = 1, Ct = he, me = null;
|
|
3186
|
+
function fe() {
|
|
3187
|
+
return Ct && he;
|
|
3188
|
+
}
|
|
3189
|
+
function Jn(l) {
|
|
3190
|
+
Ct = !!l, Ct && !he && console.warn("Worker bridge requested but no worker is initialized in this environment.");
|
|
3191
|
+
}
|
|
3192
|
+
function qr(l) {
|
|
3193
|
+
if (!ie) return;
|
|
3194
|
+
ie.terminate(), ie = null, Re = null;
|
|
3195
|
+
const o = new Error(l ?? "CP-SAT worker terminated.");
|
|
3196
|
+
for (const h of le.values())h.reject(o);
|
|
3197
|
+
le.clear();
|
|
3198
|
+
}
|
|
3199
|
+
function zr() {
|
|
3200
|
+
if (!he) throw new Error("Worker bridge is not available.");
|
|
3201
|
+
if (ie) return ie;
|
|
3202
|
+
const l = new URL("data:video/mp2t;base64,Ly8vIDxyZWZlcmVuY2UgbGliPSJ3ZWJ3b3JrZXIiIC8+CgppbXBvcnQgdHlwZSB7IE1haW5Nb2R1bGUgfSBmcm9tICcjaW50ZXJuYWwtd2FzbS9jcF9zYXRfcnVudGltZS5qcyc7CmltcG9ydCB7IGxvYWRDcFNhdCB9IGZyb20gJy4vY3Bfc2F0X21vZHVsZV9sb2FkZXIuanMnOwppbXBvcnQgdHlwZSB7IFdvcmtlclJlcXVlc3QsIFdvcmtlclJlc3BvbnNlIH0gZnJvbSAnLi9jcHNhdF93b3JrZXJfdHlwZXMuanMnOwoKY29uc3Qgd29ya2VyU2NvcGUgPSBzZWxmIGFzIERlZGljYXRlZFdvcmtlckdsb2JhbFNjb3BlOwoKCmxldCBtb2R1bGVJbnN0YW5jZTogTWFpbk1vZHVsZSB8IG51bGwgPSBudWxsOwoKLy8gVGhlIGxvYWRlciBoYW5kbGVzIGxvY2F0ZUZpbGUgYW5kIG1haW5TY3JpcHRVcmxPckJsb2IgYXV0b21hdGljYWxseSBub3cuCmNvbnN0IG1vZHVsZVJlYWR5ID0gbG9hZENwU2F0KCkKICAudGhlbigobW9kdWxlOiBNYWluTW9kdWxlKSA9PiB7CiAgICBtb2R1bGVJbnN0YW5jZSA9IG1vZHVsZTsKICAgIHdvcmtlclNjb3BlLnBvc3RNZXNzYWdlKHsgdHlwZTogJ3JlYWR5JyB9IHNhdGlzZmllcyBXb3JrZXJSZXNwb25zZSk7CiAgICByZXR1cm4gbW9kdWxlOwogIH0pCiAgLmNhdGNoKChlcnJvcjogdW5rbm93bikgPT4gewogICAgY29uc29sZS5lcnJvcignW2Nwc2F0X3dvcmtlcl0gY3BTYXRNb2R1bGUgaW5pdCBmYWlsZWQ6JywgZXJyb3IpOwogICAgd29ya2VyU2NvcGUucG9zdE1lc3NhZ2UoewogICAgICB0eXBlOiAnZXJyb3InLAogICAgICBpZDogMCwKICAgICAgZXJyb3I6IFN0cmluZyhlcnJvciksCiAgICB9IHNhdGlzZmllcyBXb3JrZXJSZXNwb25zZSk7CiAgICB0aHJvdyBlcnJvcjsKICB9KTsKCmNvbnN0IHJlYWRVaW50MzJMRSA9IChidWZmZXI6IEFycmF5QnVmZmVyLCBwdHI6IG51bWJlcikgPT4KICBuZXcgRGF0YVZpZXcoYnVmZmVyLCBwdHIsIDQpLmdldFVpbnQzMigwLCB0cnVlKTsKCmNvbnN0IGNvcHlCeXRlc1RvSGVhcCA9IChieXRlczogVWludDhBcnJheSB8IG51bGwpID0+IHsKICBpZiAoIW1vZHVsZUluc3RhbmNlIHx8ICFieXRlcz8ubGVuZ3RoKSB7CiAgICByZXR1cm4gMDsKICB9CiAgY29uc3QgcHRyID0gbW9kdWxlSW5zdGFuY2UuX21hbGxvYyhieXRlcy5sZW5ndGgpOwogIG1vZHVsZUluc3RhbmNlLkhFQVBVOC5zZXQoYnl0ZXMsIHB0cik7CiAgcmV0dXJuIHB0cjsKfTsKCmFzeW5jIGZ1bmN0aW9uIHNvbHZlTW9kZWwobW9kZWxCeXRlczogVWludDhBcnJheSwgcGFyYW1zQnl0ZXM/OiBVaW50OEFycmF5KSB7CiAgaWYgKCFtb2R1bGVJbnN0YW5jZSkgewogICAgdGhyb3cgbmV3IEVycm9yKCdNb2R1bGUgbm90IGluaXRpYWxpemVkLicpOwogIH0KICBjb25zdCBsZW5QdHIgPSBtb2R1bGVJbnN0YW5jZS5fbWFsbG9jKDQpOwogIGNvbnN0IG1vZGVsUHRyID0gY29weUJ5dGVzVG9IZWFwKG1vZGVsQnl0ZXMpOwogIGNvbnN0IHBhcmFtc1B0ciA9IGNvcHlCeXRlc1RvSGVhcChwYXJhbXNCeXRlcyA/PyBudWxsKTsKICBsZXQgcmVzcG9uc2VQdHIgPSAwOwoKICB0cnkgewogICAgcmVzcG9uc2VQdHIgPSAoYXdhaXQgbW9kdWxlSW5zdGFuY2UuY2NhbGwoCiAgICAgICdzb2x2ZV9tb2RlbCcsCiAgICAgICdudW1iZXInLAogICAgICBbJ251bWJlcicsICdudW1iZXInLCAnbnVtYmVyJywgJ251bWJlcicsICdudW1iZXInXSwKICAgICAgWwogICAgICAgIG1vZGVsUHRyLAogICAgICAgIG1vZGVsQnl0ZXMubGVuZ3RoLAogICAgICAgIHBhcmFtc1B0ciwKICAgICAgICBwYXJhbXNCeXRlcyA/IHBhcmFtc0J5dGVzLmxlbmd0aCA6IDAsCiAgICAgICAgbGVuUHRyLAogICAgICBdLAogICAgICB7IGFzeW5jOiB0cnVlIH0sCiAgICApKSBhcyBudW1iZXI7CiAgfSBmaW5hbGx5IHsKICAgIGlmIChtb2RlbFB0cikgbW9kdWxlSW5zdGFuY2UuX2ZyZWUobW9kZWxQdHIpOwogICAgaWYgKHBhcmFtc1B0cikgbW9kdWxlSW5zdGFuY2UuX2ZyZWUocGFyYW1zUHRyKTsKICB9CgogIGNvbnN0IGxlbiA9IHJlYWRVaW50MzJMRShtb2R1bGVJbnN0YW5jZS5IRUFQVTguYnVmZmVyLCBsZW5QdHIpOwogIG1vZHVsZUluc3RhbmNlLl9mcmVlKGxlblB0cik7CgogIGlmICghcmVzcG9uc2VQdHIgfHwgbGVuID09PSAwKSB7CiAgICBpZiAocmVzcG9uc2VQdHIpIG1vZHVsZUluc3RhbmNlLl9mcmVlX2J1ZmZlcihyZXNwb25zZVB0cik7CiAgICByZXR1cm4gbmV3IFVpbnQ4QXJyYXkoKTsKICB9CgogIGNvbnN0IGJ5dGVzID0gbW9kdWxlSW5zdGFuY2UuSEVBUFU4LnNsaWNlKHJlc3BvbnNlUHRyLCByZXNwb25zZVB0ciArIGxlbik7CiAgbW9kdWxlSW5zdGFuY2UuX2ZyZWVfYnVmZmVyKHJlc3BvbnNlUHRyKTsKICByZXR1cm4gYnl0ZXM7Cn0KCmFzeW5jIGZ1bmN0aW9uIHZhbGlkYXRlTW9kZWwobW9kZWxCeXRlczogVWludDhBcnJheSkgewogIGlmICghbW9kdWxlSW5zdGFuY2UpIHsKICAgIHRocm93IG5ldyBFcnJvcignTW9kdWxlIG5vdCBpbml0aWFsaXplZC4nKTsKICB9CiAgY29uc3QgbGVuUHRyID0gbW9kdWxlSW5zdGFuY2UuX21hbGxvYyg0KTsKICBjb25zdCBtb2RlbFB0ciA9IGNvcHlCeXRlc1RvSGVhcChtb2RlbEJ5dGVzKTsKICBsZXQgbXNnUHRyID0gMDsKCiAgdHJ5IHsKICAgIG1zZ1B0ciA9IG1vZHVsZUluc3RhbmNlLmNjYWxsKAogICAgICAndmFsaWRhdGVfbW9kZWwnLAogICAgICAnbnVtYmVyJywKICAgICAgWydudW1iZXInLCAnbnVtYmVyJywgJ251bWJlciddLAogICAgICBbbW9kZWxQdHIsIG1vZGVsQnl0ZXMubGVuZ3RoLCBsZW5QdHJdLAogICAgKSBhcyBudW1iZXI7CiAgfSBmaW5hbGx5IHsKICAgIGlmIChtb2RlbFB0cikgbW9kdWxlSW5zdGFuY2UuX2ZyZWUobW9kZWxQdHIpOwogIH0KCiAgY29uc3QgbGVuID0gcmVhZFVpbnQzMkxFKG1vZHVsZUluc3RhbmNlLkhFQVBVOC5idWZmZXIsIGxlblB0cik7CiAgbW9kdWxlSW5zdGFuY2UuX2ZyZWUobGVuUHRyKTsKCiAgaWYgKCFtc2dQdHIgfHwgbGVuID09PSAwKSB7CiAgICBpZiAobXNnUHRyKSBtb2R1bGVJbnN0YW5jZS5fZnJlZV9idWZmZXIobXNnUHRyKTsKICAgIHJldHVybiB7IG9rOiB0cnVlLCBtZXNzYWdlOiAnJyB9OwogIH0KCiAgY29uc3QgbWVzc2FnZUJ5dGVzID0gbW9kdWxlSW5zdGFuY2UuSEVBUFU4LnNsaWNlKG1zZ1B0ciwgbXNnUHRyICsgbGVuKTsKICBtb2R1bGVJbnN0YW5jZS5fZnJlZV9idWZmZXIobXNnUHRyKTsKICBjb25zdCBtZXNzYWdlID0gbmV3IFRleHREZWNvZGVyKCkuZGVjb2RlKG1lc3NhZ2VCeXRlcyk7CiAgcmV0dXJuIHsgb2s6IGZhbHNlLCBtZXNzYWdlIH07Cn0KCndvcmtlclNjb3BlLm9ubWVzc2FnZSA9IGFzeW5jIChldmVudDogTWVzc2FnZUV2ZW50PFdvcmtlclJlcXVlc3Q+KSA9PiB7CiAgY29uc3QgbWVzc2FnZSA9IGV2ZW50LmRhdGEgYXMgV29ya2VyUmVxdWVzdDsKICB0cnkgewogICAgYXdhaXQgbW9kdWxlUmVhZHk7CiAgICBpZiAoIW1vZHVsZUluc3RhbmNlKSB7CiAgICAgIHRocm93IG5ldyBFcnJvcignTW9kdWxlIG5vdCBpbml0aWFsaXplZC4nKTsKICAgIH0KCiAgICBpZiAobWVzc2FnZS50eXBlID09PSAndmFsaWRhdGUnKSB7CiAgICAgIGNvbnN0IHZhbGlkYXRpb24gPSBhd2FpdCB2YWxpZGF0ZU1vZGVsKG1lc3NhZ2UubW9kZWxCeXRlcyk7CiAgICAgIHdvcmtlclNjb3BlLnBvc3RNZXNzYWdlKHsKICAgICAgICB0eXBlOiAndmFsaWRhdGVSZXN1bHQnLAogICAgICAgIGlkOiBtZXNzYWdlLmlkLAogICAgICAgIG9rOiB2YWxpZGF0aW9uLm9rLAogICAgICAgIG1lc3NhZ2U6IHZhbGlkYXRpb24ubWVzc2FnZSwKICAgICAgfSBzYXRpc2ZpZXMgV29ya2VyUmVzcG9uc2UpOwogICAgICByZXR1cm47CiAgICB9IGVsc2UgaWYgKG1lc3NhZ2UudHlwZSA9PT0gJ3NvbHZlJykgewogICAgICBjb25zdCBieXRlcyA9IGF3YWl0IHNvbHZlTW9kZWwobWVzc2FnZS5tb2RlbEJ5dGVzLCBtZXNzYWdlLnBhcmFtc0J5dGVzKTsKICAgICAgd29ya2VyU2NvcGUucG9zdE1lc3NhZ2UoewogICAgICAgIHR5cGU6ICdzb2x2ZVJlc3VsdCcsCiAgICAgICAgaWQ6IG1lc3NhZ2UuaWQsCiAgICAgICAgYnl0ZXMsCiAgICAgIH0gc2F0aXNmaWVzIFdvcmtlclJlc3BvbnNlKTsKICAgICAgcmV0dXJuOwogICAgfSBlbHNlIGlmIChtZXNzYWdlLnR5cGUgPT09ICJnZXRTY2hlbWFzIikgewogICAgICBjb25zdCBzY2hlbWFzID0gewogICAgICAgIGNwX21vZGVsOiBtb2R1bGVJbnN0YW5jZS5jY2FsbCgnZ2V0X2NwX21vZGVsX3NjaGVtYScsICdzdHJpbmcnLCBbXSwgW10pLAogICAgICAgIHNhdF9wYXJhbWV0ZXJzOiBtb2R1bGVJbnN0YW5jZS5jY2FsbCgnZ2V0X3NhdF9wYXJhbWV0ZXJzX3NjaGVtYScsICdzdHJpbmcnLCBbXSwgW10pCiAgICAgIH07CiAgICAgIHNlbGYucG9zdE1lc3NhZ2UoeyB0eXBlOiAnc2NoZW1hUmVzdWx0JywgaWQ6IG1lc3NhZ2UuaWQsIHNjaGVtYXMgfSk7CiAgICAgIHJldHVybgogICAgfSBlbHNlIGlmIChtZXNzYWdlLnR5cGUgPT09ICJjYW5jZWxfc29sdmUiKSB7CiAgICAgIG1vZHVsZUluc3RhbmNlLmNjYWxsKCdpbnRlcnJ1cHRfc29sdmUnLCAndm9pZCcsIFtdLCBbXSk7CiAgICAgIHNlbGYucG9zdE1lc3NhZ2UoeyB0eXBlOiAnc29sdmVkX2NhbmNlbGxlZCcsIGlkOiBtZXNzYWdlLmlkIH0pOwogICAgICByZXR1cm4KICAgIH0KICB9IGNhdGNoIChlcnJvcikgewogICAgY29uc29sZS5lcnJvcignW2Nwc2F0X3dvcmtlcl0gcmVxdWVzdCBmYWlsZWQnLCBtZXNzYWdlPy50eXBlLCBlcnJvcik7CiAgICB3b3JrZXJTY29wZS5wb3N0TWVzc2FnZSh7CiAgICAgIHR5cGU6ICdlcnJvcicsCiAgICAgIGlkOiBtZXNzYWdlPy5pZCA/PyAwLAogICAgICBlcnJvcjogU3RyaW5nKGVycm9yKSwKICAgIH0gc2F0aXNmaWVzIFdvcmtlclJlc3BvbnNlKTsKICB9Cn07Cg==", import.meta.url), o = new Worker(new URL("" + new URL("assets/cpsat_worker-CxyMtsph.js", import.meta.url).href, import.meta.url), {
|
|
43
3203
|
type: "module"
|
|
44
3204
|
});
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
49
|
-
|
|
3205
|
+
return ie = o, Re = new Promise((h, f)=>{
|
|
3206
|
+
o.onmessage = (c)=>{
|
|
3207
|
+
const n = c.data;
|
|
3208
|
+
if (n.type === "ready") {
|
|
3209
|
+
h();
|
|
50
3210
|
return;
|
|
51
3211
|
}
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
const
|
|
55
|
-
|
|
3212
|
+
const e = le.get(n.id);
|
|
3213
|
+
if (n.type === "error") {
|
|
3214
|
+
const i = new Error(n.error);
|
|
3215
|
+
e ? (e.reject(i), le.delete(n.id)) : f(i);
|
|
56
3216
|
return;
|
|
57
3217
|
}
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
const
|
|
61
|
-
|
|
3218
|
+
e && (le.delete(n.id), e.resolve(n));
|
|
3219
|
+
}, o.onerror = (c)=>{
|
|
3220
|
+
const n = c.error instanceof Error ? c.error.message : c.message || "The browser blocked or failed to load the worker module.", e = new Error(`CP-SAT worker failed to load from ${l.href}: ${n}`);
|
|
3221
|
+
f(e), qr(e.message);
|
|
62
3222
|
};
|
|
63
|
-
}),
|
|
64
|
-
}
|
|
65
|
-
async function
|
|
66
|
-
if (!
|
|
67
|
-
if (
|
|
68
|
-
await
|
|
69
|
-
}
|
|
70
|
-
async function
|
|
71
|
-
if (!
|
|
72
|
-
const
|
|
73
|
-
return await
|
|
74
|
-
|
|
75
|
-
resolve: (
|
|
76
|
-
reject:
|
|
77
|
-
}),
|
|
3223
|
+
}), o;
|
|
3224
|
+
}
|
|
3225
|
+
async function Pn() {
|
|
3226
|
+
if (!he) throw new Error("Worker bridge is not available.");
|
|
3227
|
+
if (zr(), !Re) throw new Error("Worker ready state unavailable.");
|
|
3228
|
+
await Re;
|
|
3229
|
+
}
|
|
3230
|
+
async function Vt(l) {
|
|
3231
|
+
if (!he) throw new Error("Worker bridge is not available.");
|
|
3232
|
+
const o = zr();
|
|
3233
|
+
return await Pn(), new Promise((h, f)=>{
|
|
3234
|
+
le.set(l.id, {
|
|
3235
|
+
resolve: (c)=>h(c),
|
|
3236
|
+
reject: f
|
|
3237
|
+
}), o.postMessage(l);
|
|
78
3238
|
});
|
|
79
3239
|
}
|
|
80
|
-
let
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
83
|
-
return
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
3240
|
+
let At = null;
|
|
3241
|
+
function ge() {
|
|
3242
|
+
if (fe()) throw new Error("Wasm should not be loaded on main thread when Worker Bridge is enabled");
|
|
3243
|
+
return At || (At = vn()), At;
|
|
3244
|
+
}
|
|
3245
|
+
let Ot = null;
|
|
3246
|
+
function Tt() {
|
|
3247
|
+
return Ot || (Ot = (async ()=>{
|
|
3248
|
+
if (fe()) return (await Vt({
|
|
3249
|
+
type: "getSchemas",
|
|
3250
|
+
id: Zt++
|
|
3251
|
+
})).schemas;
|
|
3252
|
+
const l = await ge();
|
|
92
3253
|
return {
|
|
93
|
-
cp_model:
|
|
94
|
-
sat_parameters:
|
|
3254
|
+
cp_model: l.ccall("get_cp_model_schema", "string", [], []),
|
|
3255
|
+
sat_parameters: l.ccall("get_sat_parameters_schema", "string", [], [])
|
|
95
3256
|
};
|
|
96
|
-
}
|
|
97
|
-
})();
|
|
98
|
-
let g = null, b = null, I = null, f = null, y = null;
|
|
99
|
-
function N(e) {
|
|
100
|
-
return new Error(`CpSat.${e} requires the optional dependency "protobufjs". Install it with \`npm install protobufjs\` and rebuild.`);
|
|
3257
|
+
})()), Ot;
|
|
101
3258
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return await g;
|
|
108
|
-
} catch (r) {
|
|
109
|
-
throw g = null, r;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
async function F(e) {
|
|
113
|
-
b || (b = (async ()=>{
|
|
114
|
-
const r = await R;
|
|
115
|
-
return (await H(e)).parse(r.cp_model).root;
|
|
3259
|
+
let Ie = null, Ae = null, Oe = null, Ce = null;
|
|
3260
|
+
async function Ur(l) {
|
|
3261
|
+
Ie || (Ie = (async ()=>{
|
|
3262
|
+
const o = await Tt();
|
|
3263
|
+
return Dr.parse(o.cp_model).root;
|
|
116
3264
|
})());
|
|
117
3265
|
try {
|
|
118
|
-
return await
|
|
119
|
-
} catch (
|
|
120
|
-
throw
|
|
3266
|
+
return await Ie;
|
|
3267
|
+
} catch (o) {
|
|
3268
|
+
throw Ie = null, o;
|
|
121
3269
|
}
|
|
122
3270
|
}
|
|
123
|
-
async function
|
|
124
|
-
|
|
125
|
-
const
|
|
126
|
-
if (!
|
|
127
|
-
return
|
|
3271
|
+
async function Ln() {
|
|
3272
|
+
Ae || (Ae = (async ()=>{
|
|
3273
|
+
const o = (await Ur()).lookupType("operations_research.sat.CpModelProto");
|
|
3274
|
+
if (!o) throw new Error("CpSat.createModel: cp_model schema did not expose operations_research.sat.CpModelProto.");
|
|
3275
|
+
return o;
|
|
128
3276
|
})());
|
|
129
3277
|
try {
|
|
130
|
-
return await
|
|
131
|
-
} catch (
|
|
132
|
-
throw
|
|
3278
|
+
return await Ae;
|
|
3279
|
+
} catch (l) {
|
|
3280
|
+
throw Ae = null, l;
|
|
133
3281
|
}
|
|
134
3282
|
}
|
|
135
|
-
async function
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
-
if (!
|
|
139
|
-
return
|
|
3283
|
+
async function Xn() {
|
|
3284
|
+
Oe || (Oe = (async ()=>{
|
|
3285
|
+
const o = (await Ur()).lookupType("operations_research.sat.CpSolverResponse");
|
|
3286
|
+
if (!o) throw new Error("CpSat.solve: cp_model schema did not expose operations_research.sat.CpSolverResponse.");
|
|
3287
|
+
return o;
|
|
140
3288
|
})());
|
|
141
3289
|
try {
|
|
142
|
-
return await
|
|
143
|
-
} catch (
|
|
144
|
-
throw
|
|
3290
|
+
return await Oe;
|
|
3291
|
+
} catch (l) {
|
|
3292
|
+
throw Oe = null, l;
|
|
145
3293
|
}
|
|
146
3294
|
}
|
|
147
|
-
async function
|
|
148
|
-
|
|
149
|
-
const
|
|
150
|
-
if (!
|
|
151
|
-
return
|
|
3295
|
+
async function Dn() {
|
|
3296
|
+
Ce || (Ce = (async ()=>{
|
|
3297
|
+
const l = await Tt(), f = Dr.parse(l.sat_parameters).root.lookupType("operations_research.sat.SatParameters");
|
|
3298
|
+
if (!f) throw new Error("CpSat.solve: sat_parameters schema did not expose operations_research.sat.SatParameters.");
|
|
3299
|
+
return f;
|
|
152
3300
|
})());
|
|
153
3301
|
try {
|
|
154
|
-
return await
|
|
155
|
-
} catch (
|
|
156
|
-
throw
|
|
3302
|
+
return await Ce;
|
|
3303
|
+
} catch (l) {
|
|
3304
|
+
throw Ce = null, l;
|
|
157
3305
|
}
|
|
158
3306
|
}
|
|
159
|
-
async function
|
|
160
|
-
const
|
|
161
|
-
if (
|
|
162
|
-
const
|
|
163
|
-
return
|
|
3307
|
+
async function Hn(l) {
|
|
3308
|
+
const o = await Dn(), h = o.verify(l);
|
|
3309
|
+
if (h) throw new Error(`CpSat.solve: ${h}`);
|
|
3310
|
+
const f = o.create(l);
|
|
3311
|
+
return o.encode(f).finish();
|
|
164
3312
|
}
|
|
165
|
-
async function
|
|
166
|
-
return
|
|
3313
|
+
async function qn(l) {
|
|
3314
|
+
return l ? l instanceof Uint8Array ? l : Hn(l) : null;
|
|
167
3315
|
}
|
|
168
|
-
async function
|
|
169
|
-
const
|
|
170
|
-
return
|
|
3316
|
+
async function zn(l) {
|
|
3317
|
+
const o = await Xn(), h = o.decode(l);
|
|
3318
|
+
return o.toObject(h, {
|
|
171
3319
|
enums: String,
|
|
172
3320
|
longs: Number,
|
|
173
3321
|
defaults: !0,
|
|
@@ -175,126 +3323,123 @@ let __tla = (async ()=>{
|
|
|
175
3323
|
objects: !0
|
|
176
3324
|
});
|
|
177
3325
|
}
|
|
178
|
-
async function
|
|
179
|
-
const
|
|
180
|
-
if (
|
|
181
|
-
const
|
|
182
|
-
return
|
|
183
|
-
}
|
|
184
|
-
const
|
|
185
|
-
function
|
|
186
|
-
if (!
|
|
187
|
-
const
|
|
188
|
-
return
|
|
189
|
-
}
|
|
190
|
-
async function
|
|
191
|
-
const
|
|
192
|
-
|
|
3326
|
+
async function Un(l) {
|
|
3327
|
+
const o = await Ln(), h = o.verify(l);
|
|
3328
|
+
if (h) throw new Error(`CpSat.createModel: ${h}`);
|
|
3329
|
+
const f = o.create(l);
|
|
3330
|
+
return o.encode(f).finish();
|
|
3331
|
+
}
|
|
3332
|
+
const jr = (l, o)=>new DataView(l, o, 4).getUint32(0, !0);
|
|
3333
|
+
function Rt(l, o) {
|
|
3334
|
+
if (!o || !o.length) return 0;
|
|
3335
|
+
const h = l._malloc(o.length);
|
|
3336
|
+
return l.HEAPU8.set(o, h), h;
|
|
3337
|
+
}
|
|
3338
|
+
async function jn(l, o = null) {
|
|
3339
|
+
const h = Zt++;
|
|
3340
|
+
me = h;
|
|
193
3341
|
try {
|
|
194
|
-
const
|
|
3342
|
+
const f = await Vt({
|
|
195
3343
|
type: "solve",
|
|
196
|
-
id:
|
|
197
|
-
modelBytes:
|
|
198
|
-
paramsBytes:
|
|
3344
|
+
id: h,
|
|
3345
|
+
modelBytes: l,
|
|
3346
|
+
paramsBytes: o ?? void 0
|
|
199
3347
|
});
|
|
200
|
-
return new Uint8Array(
|
|
3348
|
+
return new Uint8Array(f.bytes);
|
|
201
3349
|
} finally{
|
|
202
|
-
|
|
3350
|
+
me === h && (me = null);
|
|
203
3351
|
}
|
|
204
3352
|
}
|
|
205
|
-
async function
|
|
206
|
-
const
|
|
3353
|
+
async function Yn(l) {
|
|
3354
|
+
const o = Zt++, h = await Vt({
|
|
207
3355
|
type: "validate",
|
|
208
|
-
id:
|
|
209
|
-
modelBytes:
|
|
3356
|
+
id: o,
|
|
3357
|
+
modelBytes: l
|
|
210
3358
|
});
|
|
211
3359
|
return {
|
|
212
|
-
ok:
|
|
213
|
-
message:
|
|
3360
|
+
ok: h.ok,
|
|
3361
|
+
message: h.message
|
|
214
3362
|
};
|
|
215
3363
|
}
|
|
216
|
-
async function
|
|
217
|
-
const
|
|
218
|
-
let
|
|
3364
|
+
async function Kn(l, o = null) {
|
|
3365
|
+
const h = await ge(), f = h._malloc(4), c = Rt(h, l), n = Rt(h, o);
|
|
3366
|
+
let e = 0;
|
|
219
3367
|
try {
|
|
220
|
-
|
|
3368
|
+
e = await h.ccall("solve_model", "number", [
|
|
221
3369
|
"number",
|
|
222
3370
|
"number",
|
|
223
3371
|
"number",
|
|
224
3372
|
"number",
|
|
225
3373
|
"number"
|
|
226
3374
|
], [
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
3375
|
+
c,
|
|
3376
|
+
l.length,
|
|
3377
|
+
n,
|
|
3378
|
+
o ? o.length : 0,
|
|
3379
|
+
f
|
|
232
3380
|
], {
|
|
233
3381
|
async: !0
|
|
234
3382
|
});
|
|
235
3383
|
} finally{
|
|
236
|
-
|
|
237
|
-
}
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
let
|
|
241
|
-
return
|
|
242
|
-
}
|
|
243
|
-
async function
|
|
244
|
-
return
|
|
245
|
-
}
|
|
246
|
-
async function
|
|
247
|
-
const
|
|
248
|
-
let
|
|
249
|
-
return
|
|
250
|
-
bytes:
|
|
251
|
-
response:
|
|
3384
|
+
c && h._free(c), n && h._free(n);
|
|
3385
|
+
}
|
|
3386
|
+
const i = jr(h.HEAPU8.buffer, f);
|
|
3387
|
+
h._free(f);
|
|
3388
|
+
let t = new Uint8Array();
|
|
3389
|
+
return e && i ? (t = h.HEAPU8.slice(e, e + i), h._free_buffer(e)) : e && h._free_buffer(e), new Uint8Array(t);
|
|
3390
|
+
}
|
|
3391
|
+
async function Yr(l, o = null) {
|
|
3392
|
+
return fe() ? jn(l, o) : Kn(l, o);
|
|
3393
|
+
}
|
|
3394
|
+
async function Mn(l, o = null) {
|
|
3395
|
+
const h = await qn(o), f = await Yr(l, h);
|
|
3396
|
+
let c = null;
|
|
3397
|
+
return f.length > 0 && (c = await zn(f)), {
|
|
3398
|
+
bytes: f,
|
|
3399
|
+
response: c
|
|
252
3400
|
};
|
|
253
3401
|
}
|
|
254
|
-
async function
|
|
255
|
-
const
|
|
256
|
-
let
|
|
3402
|
+
async function $n(l) {
|
|
3403
|
+
const o = await ge(), h = o._malloc(4), f = Rt(o, l);
|
|
3404
|
+
let c = 0;
|
|
257
3405
|
try {
|
|
258
|
-
|
|
3406
|
+
c = o.ccall("validate_model", "number", [
|
|
259
3407
|
"number",
|
|
260
3408
|
"number",
|
|
261
3409
|
"number"
|
|
262
3410
|
], [
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
3411
|
+
f,
|
|
3412
|
+
l.length,
|
|
3413
|
+
h
|
|
266
3414
|
]);
|
|
267
3415
|
} finally{
|
|
268
|
-
|
|
3416
|
+
f && o._free(f);
|
|
269
3417
|
}
|
|
270
|
-
const
|
|
271
|
-
if (
|
|
3418
|
+
const n = jr(o.HEAPU8.buffer, h);
|
|
3419
|
+
if (o._free(h), !c || n === 0) return c && o._free_buffer(c), {
|
|
272
3420
|
ok: !0,
|
|
273
3421
|
message: ""
|
|
274
3422
|
};
|
|
275
|
-
const
|
|
276
|
-
return
|
|
3423
|
+
const e = o.HEAPU8.slice(c, c + n);
|
|
3424
|
+
return o._free_buffer(c), {
|
|
277
3425
|
ok: !1,
|
|
278
|
-
message: new TextDecoder().decode(
|
|
3426
|
+
message: new TextDecoder().decode(e)
|
|
279
3427
|
};
|
|
280
3428
|
}
|
|
281
|
-
async function
|
|
282
|
-
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
solve: (
|
|
286
|
-
solveRaw: (
|
|
287
|
-
validate: (
|
|
288
|
-
getSchemas:
|
|
289
|
-
createModel:
|
|
290
|
-
loadModule:
|
|
291
|
-
cancelSolve:
|
|
292
|
-
setWorkerBridgeEnabled: (
|
|
293
|
-
isWorkerBridgeEnabled: ()=>
|
|
3429
|
+
async function Qn() {
|
|
3430
|
+
fe() ? ie && me !== null && (qr("Solve canceled by user."), me = null) : (await ge()).ccall("interrupt_solve", "void", [], []);
|
|
3431
|
+
}
|
|
3432
|
+
ei = {
|
|
3433
|
+
solve: (l, o = null)=>Mn(l, o),
|
|
3434
|
+
solveRaw: (l, o = null)=>Yr(l, o),
|
|
3435
|
+
validate: (l)=>fe() ? Yn(l) : $n(l),
|
|
3436
|
+
getSchemas: Tt,
|
|
3437
|
+
createModel: Un,
|
|
3438
|
+
loadModule: ge,
|
|
3439
|
+
cancelSolve: Qn,
|
|
3440
|
+
setWorkerBridgeEnabled: (l)=>Jn(l),
|
|
3441
|
+
isWorkerBridgeEnabled: ()=>fe()
|
|
294
3442
|
};
|
|
295
|
-
|
|
296
|
-
let ae;
|
|
297
|
-
ae = "data:video/mp2t;base64,Ly8gVHlwZVNjcmlwdCBiaW5kaW5ncyBmb3IgZW1zY3JpcHRlbi1nZW5lcmF0ZWQgY29kZS4gIEF1dG9tYXRpY2FsbHkgZ2VuZXJhdGVkIGF0IGNvbXBpbGUgdGltZS4KZGVjbGFyZSBuYW1lc3BhY2UgUnVudGltZUV4cG9ydHMgewogICAgLyoqCiAgICAgKiBAcGFyYW0ge3N0cmluZ3xudWxsPX0gcmV0dXJuVHlwZQogICAgICogQHBhcmFtIHtBcnJheT19IGFyZ1R5cGVzCiAgICAgKiBAcGFyYW0ge0FycmF5PX0gYXJncwogICAgICogQHBhcmFtIHtPYmplY3Q9fSBvcHRzCiAgICAgKi8KICAgIGZ1bmN0aW9uIGNjYWxsKGlkZW50OiBhbnksIHJldHVyblR5cGU/OiAoc3RyaW5nIHwgbnVsbCkgfCB1bmRlZmluZWQsIGFyZ1R5cGVzPzogYW55W10gfCB1bmRlZmluZWQsIGFyZ3M/OiBhbnlbXSB8IHVuZGVmaW5lZCwgb3B0cz86IGFueSB8IHVuZGVmaW5lZCk6IGFueTsKICAgIC8qKgogICAgICogQHBhcmFtIHtzdHJpbmc9fSByZXR1cm5UeXBlCiAgICAgKiBAcGFyYW0ge0FycmF5PX0gYXJnVHlwZXMKICAgICAqIEBwYXJhbSB7T2JqZWN0PX0gb3B0cwogICAgICovCiAgICBmdW5jdGlvbiBjd3JhcChpZGVudDogYW55LCByZXR1cm5UeXBlPzogc3RyaW5nIHwgdW5kZWZpbmVkLCBhcmdUeXBlcz86IGFueVtdIHwgdW5kZWZpbmVkLCBvcHRzPzogYW55IHwgdW5kZWZpbmVkKTogKC4uLmFyZ3M6IGFueVtdKSA9PiBhbnk7CiAgICAvKioKICAgICAqIEdpdmVuIGEgcG9pbnRlciAncHRyJyB0byBhIG51bGwtdGVybWluYXRlZCBVVEY4LWVuY29kZWQgc3RyaW5nIGluIHRoZQogICAgICogZW1zY3JpcHRlbiBIRUFQLCByZXR1cm5zIGEgY29weSBvZiB0aGF0IHN0cmluZyBhcyBhIEphdmFzY3JpcHQgU3RyaW5nIG9iamVjdC4KICAgICAqCiAgICAgKiBAcGFyYW0ge251bWJlcn0gcHRyCiAgICAgKiBAcGFyYW0ge251bWJlcj19IG1heEJ5dGVzVG9SZWFkIC0gQW4gb3B0aW9uYWwgbGVuZ3RoIHRoYXQgc3BlY2lmaWVzIHRoZQogICAgICogICBtYXhpbXVtIG51bWJlciBvZiBieXRlcyB0byByZWFkLiBZb3UgY2FuIG9taXQgdGhpcyBwYXJhbWV0ZXIgdG8gc2NhbiB0aGUKICAgICAqICAgc3RyaW5nIHVudGlsIHRoZSBmaXJzdCAwIGJ5dGUuIElmIG1heEJ5dGVzVG9SZWFkIGlzIHBhc3NlZCwgYW5kIHRoZSBzdHJpbmcKICAgICAqICAgYXQgW3B0ciwgcHRyK21heEJ5dGVzVG9SZWFkclsgY29udGFpbnMgYSBudWxsIGJ5dGUgaW4gdGhlIG1pZGRsZSwgdGhlbiB0aGUKICAgICAqICAgc3RyaW5nIHdpbGwgY3V0IHNob3J0IGF0IHRoYXQgYnl0ZSBpbmRleC4KICAgICAqIEBwYXJhbSB7Ym9vbGVhbj19IGlnbm9yZU51bCAtIElmIHRydWUsIHRoZSBmdW5jdGlvbiB3aWxsIG5vdCBzdG9wIG9uIGEgTlVMIGNoYXJhY3Rlci4KICAgICAqIEByZXR1cm4ge3N0cmluZ30KICAgICAqLwogICAgZnVuY3Rpb24gVVRGOFRvU3RyaW5nKHB0cjogbnVtYmVyLCBtYXhCeXRlc1RvUmVhZD86IG51bWJlciB8IHVuZGVmaW5lZCwgaWdub3JlTnVsPzogYm9vbGVhbiB8IHVuZGVmaW5lZCk6IHN0cmluZzsKICAgIGZ1bmN0aW9uIHN0cmluZ1RvVVRGOChzdHI6IGFueSwgb3V0UHRyOiBhbnksIG1heEJ5dGVzVG9Xcml0ZTogYW55KTogYW55OwogICAgZnVuY3Rpb24gYWxsb2NhdGVVVEY4KC4uLmFyZ3M6IGFueVtdKTogYW55OwogICAgbGV0IEhFQVBVODogYW55Owp9CmludGVyZmFjZSBXYXNtTW9kdWxlIHsKICBfZ2V0X2NwX21vZGVsX3NjaGVtYSgpOiBudW1iZXI7CiAgX2dldF9zYXRfcGFyYW1ldGVyc19zY2hlbWEoKTogbnVtYmVyOwogIF9zb2x2ZV9tb2RlbChfMDogbnVtYmVyLCBfMTogbnVtYmVyLCBfMjogbnVtYmVyLCBfMzogbnVtYmVyLCBfNDogbnVtYmVyKTogbnVtYmVyOwogIF9tYWxsb2MoXzA6IG51bWJlcik6IG51bWJlcjsKICBfZnJlZV9idWZmZXIoXzA6IG51bWJlcik6IHZvaWQ7CiAgX2ZyZWUoXzA6IG51bWJlcik6IHZvaWQ7CiAgX2ludGVycnVwdF9zb2x2ZSgpOiB2b2lkOwogIF92YWxpZGF0ZV9tb2RlbChfMDogbnVtYmVyLCBfMTogbnVtYmVyLCBfMjogbnVtYmVyKTogbnVtYmVyOwp9CgppbnRlcmZhY2UgRW1iaW5kTW9kdWxlIHsKICBnZXRDcE1vZGVsU2NoZW1hKCk6IHN0cmluZzsKICBnZXRTYXRQYXJhbWV0ZXJzU2NoZW1hKCk6IHN0cmluZzsKfQoKZXhwb3J0IHR5cGUgTWFpbk1vZHVsZSA9IFdhc21Nb2R1bGUgJiB0eXBlb2YgUnVudGltZUV4cG9ydHMgJiBFbWJpbmRNb2R1bGU7CmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIE1haW5Nb2R1bGVGYWN0b3J5IChvcHRpb25zPzogdW5rbm93bik6IFByb21pc2U8TWFpbk1vZHVsZT47Cg==";
|
|
298
|
-
le = ae;
|
|
3443
|
+
Hr && (window.CpSat = ei);
|
|
299
3444
|
})();
|
|
300
|
-
export {
|
|
3445
|
+
export { ei as CpSat, ei as default, __tla };
|