web-core-tcm 0.0.51 → 0.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node_modules/@alova/shared/dist/alova-shared.esm.js +249 -101
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/clone.js +35 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +109 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +16 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +9 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +9 -10
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +28 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +48 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +8 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +49 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +1 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/equals.js +127 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +86 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/fields.js +11 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +60 -56
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +434 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/index.js +49 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/merge.js +33 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +12 -3
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +14 -10
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +32 -12
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +42 -6
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +58 -50
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +26 -4
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/registry.js +130 -99
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +279 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/types.js +1 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +48 -27
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +24 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +123 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +9 -5
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +40 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +18 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.js +7 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.js +11 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +19 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +18 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +134 -60
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.js +7 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.js +7 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +7 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +25 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +26 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +7 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.js +17 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +7 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.js +35 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +15 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +180 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +29 -0
- package/dist/node_modules/alova/dist/adapter/fetch.esm.js +10 -10
- package/dist/node_modules/alova/dist/alova.esm.js +263 -211
- package/dist/node_modules/alova/dist/clienthook/index.esm.js +2110 -70
- package/dist/node_modules/builder-pattern/dist/index.js +25 -13
- package/dist/node_modules/pinyin/lib/esm/pinyin.js +2 -2
- package/dist/node_modules/punycode/punycode.es6.js +17 -17
- package/dist/src/api/algorithm/alova/implement/comprehensiveAlgorithm.js +4 -7
- package/dist/src/api/algorithm/alova/implement/index.js +12 -0
- package/dist/src/api/algorithm/alova/implement/inquiriesAlgorithm.js +4 -7
- package/dist/src/api/algorithm/alova/implement/inspectionsAlgorithm.js +7 -10
- package/dist/src/api/algorithm/alova/implement/lisemsAlgorithm.js +6 -9
- package/dist/src/api/algorithm/alova/implement/pulsationsAlgorithm.js +7 -10
- package/dist/src/api/algorithm/alova/index.js +11 -15
- package/dist/src/api/algorithm/comprehensiveAlgorithm.js +5 -6
- package/dist/src/api/authorization/alova/globals.js +1 -0
- package/dist/src/api/authorization/alova/implement/index.js +4 -0
- package/dist/src/api/authorization/alova/index.js +10 -8
- package/dist/src/api/check/alova/globals.js +1 -0
- package/dist/src/api/check/alova/implement/index.js +5 -0
- package/dist/src/api/check/alova/index.js +5 -6
- package/dist/src/api/check/check.js +2 -2
- package/dist/src/api/config/index.d.ts +1 -1
- package/dist/src/api/config/index.js +2 -2
- package/dist/src/api/core/index.js +9 -0
- package/dist/src/api/device/device.d.ts +4 -5
- package/dist/src/api/device/device.js +20 -29
- package/dist/src/api/doctor/alova/globals.js +1 -0
- package/dist/src/api/doctor/alova/implement/index.js +4 -0
- package/dist/src/api/doctor/alova/index.js +10 -9
- package/dist/src/api/index.d.ts +12 -11
- package/dist/src/api/index.js +28 -0
- package/dist/src/api/metric/alova/implement/index.js +4 -0
- package/dist/src/api/metric/alova/index.js +1 -0
- package/dist/src/api/metric/index.js +5 -4
- package/dist/src/api/oauth/alova/globals.js +1 -0
- package/dist/src/api/oauth/alova/implement/index.js +4 -0
- package/dist/src/api/oauth/alova/index.js +13 -11
- package/dist/src/api/outpatient/alova/globals.js +1 -0
- package/dist/src/api/outpatient/alova/implement/index.js +4 -0
- package/dist/src/api/outpatient/alova/index.js +5 -5
- package/dist/src/api/patient/alova/globals.js +1 -0
- package/dist/src/api/patient/alova/implement/index.js +16 -0
- package/dist/src/api/patient/alova/index.js +9 -12
- package/dist/src/api/patient/meta.js +1 -0
- package/dist/src/api/prescription/alova/globals.js +1 -0
- package/dist/src/api/prescription/alova/implement/index.js +6 -0
- package/dist/src/api/prescription/alova/index.js +8 -7
- package/dist/src/api/scientist/alova/globals.js +1 -0
- package/dist/src/api/scientist/alova/implement/index.js +4 -0
- package/dist/src/api/scientist/alova/index.js +5 -5
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +34 -32
- package/dist/src/proto/index.js +10 -0
- package/dist/src/proto/types/Images_pb.js +7 -6
- package/dist/src/proto/types/WaveMap_pb.js +4 -3
- package/dist/src/util/helper.js +38 -2
- package/dist/src/util/string.js +47 -5
- package/package.json +1 -1
- package/dist/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +0 -556
- package/dist/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +0 -36
- package/dist/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -26
- package/dist/node_modules/quasar/src/composables/use-quasar/use-quasar.js +0 -8
- package/dist/node_modules/quasar/src/utils/private.symbols/symbols.js +0 -4
|
@@ -1,17 +1,53 @@
|
|
|
1
|
-
function*
|
|
1
|
+
function* r(e) {
|
|
2
2
|
switch (e.kind) {
|
|
3
3
|
case "file":
|
|
4
|
-
for (const
|
|
5
|
-
yield
|
|
4
|
+
for (const n of e.messages)
|
|
5
|
+
yield n, yield* r(n);
|
|
6
6
|
yield* e.enums, yield* e.services, yield* e.extensions;
|
|
7
7
|
break;
|
|
8
8
|
case "message":
|
|
9
|
-
for (const
|
|
10
|
-
yield
|
|
9
|
+
for (const n of e.nestedMessages)
|
|
10
|
+
yield n, yield* r(n);
|
|
11
11
|
yield* e.nestedEnums, yield* e.nestedExtensions;
|
|
12
12
|
break;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
+
function u(e) {
|
|
16
|
+
return l(e, /* @__PURE__ */ new Set());
|
|
17
|
+
}
|
|
18
|
+
function* l(e, n) {
|
|
19
|
+
var s, t;
|
|
20
|
+
for (const a of e.fields) {
|
|
21
|
+
const i = (t = (s = a.enum) !== null && s !== void 0 ? s : a.message) !== null && t !== void 0 ? t : void 0;
|
|
22
|
+
!i || n.has(i.typeName) || (n.add(i.typeName), yield i, i.kind == "message" && (yield* l(i, n)));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function f(e) {
|
|
26
|
+
const n = [];
|
|
27
|
+
for (; e.kind !== "file"; ) {
|
|
28
|
+
const s = o(e);
|
|
29
|
+
e = s, n.push(s);
|
|
30
|
+
}
|
|
31
|
+
return n;
|
|
32
|
+
}
|
|
33
|
+
function o(e) {
|
|
34
|
+
var n;
|
|
35
|
+
switch (e.kind) {
|
|
36
|
+
case "enum_value":
|
|
37
|
+
case "field":
|
|
38
|
+
case "oneof":
|
|
39
|
+
case "rpc":
|
|
40
|
+
return e.parent;
|
|
41
|
+
case "service":
|
|
42
|
+
return e.file;
|
|
43
|
+
case "extension":
|
|
44
|
+
case "enum":
|
|
45
|
+
case "message":
|
|
46
|
+
return (n = e.parent) !== null && n !== void 0 ? n : e.file;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
15
49
|
export {
|
|
16
|
-
|
|
50
|
+
r as nestedTypes,
|
|
51
|
+
f as parentTypes,
|
|
52
|
+
u as usedTypes
|
|
17
53
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ScalarType as i } from "../descriptors.js";
|
|
2
|
-
import { checkField as
|
|
2
|
+
import { checkField as F, checkListItem as b, checkMapEntry as L } from "./reflect-check.js";
|
|
3
3
|
import { FieldError as _ } from "./error.js";
|
|
4
|
-
import { unsafeLocal as o, unsafeOneofCase as
|
|
5
|
-
import { create as
|
|
6
|
-
import {
|
|
7
|
-
import { scalarZeroValue as
|
|
8
|
-
import { protoInt64 as
|
|
9
|
-
import { isReflectMap as
|
|
4
|
+
import { unsafeLocal as o, unsafeOneofCase as R, unsafeIsSet as E, unsafeClear as K, unsafeGet as A, unsafeSet as $ } from "./unsafe.js";
|
|
5
|
+
import { create as M } from "../create.js";
|
|
6
|
+
import { isWrapper as X, isWrapperDesc as U } from "../wkt/wrappers.js";
|
|
7
|
+
import { scalarZeroValue as P } from "./scalar.js";
|
|
8
|
+
import { protoInt64 as c } from "../proto-int64.js";
|
|
9
|
+
import { isReflectMap as B, isReflectList as D, isReflectMessage as C, isObject as w } from "./guard.js";
|
|
10
10
|
function v(t, e, s = !0) {
|
|
11
11
|
return new S(t, e, s);
|
|
12
12
|
}
|
|
@@ -20,54 +20,54 @@ class S {
|
|
|
20
20
|
return d.set(this.desc, s), s;
|
|
21
21
|
}
|
|
22
22
|
constructor(e, s, r = !0) {
|
|
23
|
-
this.lists = /* @__PURE__ */ new Map(), this.maps = /* @__PURE__ */ new Map(), this.check = r, this.desc = e, this.message = this[o] = s ??
|
|
23
|
+
this.lists = /* @__PURE__ */ new Map(), this.maps = /* @__PURE__ */ new Map(), this.check = r, this.desc = e, this.message = this[o] = s ?? M(e), this.fields = e.fields, this.oneofs = e.oneofs, this.members = e.members;
|
|
24
24
|
}
|
|
25
25
|
findNumber(e) {
|
|
26
26
|
return this._fieldsByNumber || (this._fieldsByNumber = new Map(this.desc.fields.map((s) => [s.number, s]))), this._fieldsByNumber.get(e);
|
|
27
27
|
}
|
|
28
28
|
oneofCase(e) {
|
|
29
|
-
return
|
|
29
|
+
return a(this.message, e), R(this.message, e);
|
|
30
30
|
}
|
|
31
31
|
isSet(e) {
|
|
32
|
-
return
|
|
32
|
+
return a(this.message, e), E(this.message, e);
|
|
33
33
|
}
|
|
34
34
|
clear(e) {
|
|
35
|
-
|
|
35
|
+
a(this.message, e), K(this.message, e);
|
|
36
36
|
}
|
|
37
37
|
get(e) {
|
|
38
|
-
|
|
39
|
-
const s =
|
|
38
|
+
a(this.message, e);
|
|
39
|
+
const s = A(this.message, e);
|
|
40
40
|
switch (e.fieldKind) {
|
|
41
41
|
case "list":
|
|
42
42
|
let r = this.lists.get(e);
|
|
43
43
|
return (!r || r[o] !== s) && this.lists.set(
|
|
44
44
|
e,
|
|
45
45
|
// biome-ignore lint/suspicious/noAssignInExpressions: no
|
|
46
|
-
r = new
|
|
46
|
+
r = new N(e, s, this.check)
|
|
47
47
|
), r;
|
|
48
48
|
case "map":
|
|
49
49
|
let n = this.maps.get(e);
|
|
50
50
|
return (!n || n[o] !== s) && this.maps.set(
|
|
51
51
|
e,
|
|
52
52
|
// biome-ignore lint/suspicious/noAssignInExpressions: no
|
|
53
|
-
n = new
|
|
53
|
+
n = new T(e, s, this.check)
|
|
54
54
|
), n;
|
|
55
55
|
case "message":
|
|
56
56
|
return m(e, s, this.check);
|
|
57
57
|
case "scalar":
|
|
58
|
-
return s === void 0 ?
|
|
58
|
+
return s === void 0 ? P(e.scalar, !1) : g(e, s);
|
|
59
59
|
case "enum":
|
|
60
60
|
return s ?? e.enum.values[0].number;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
set(e, s) {
|
|
64
|
-
if (
|
|
65
|
-
const n =
|
|
64
|
+
if (a(this.message, e), this.check) {
|
|
65
|
+
const n = F(e, s);
|
|
66
66
|
if (n)
|
|
67
67
|
throw n;
|
|
68
68
|
}
|
|
69
69
|
let r;
|
|
70
|
-
e.fieldKind == "message" ? r =
|
|
70
|
+
e.fieldKind == "message" ? r = f(e, s) : B(s) || D(s) ? r = s[o] : r = p(e, s), $(this.message, e, r);
|
|
71
71
|
}
|
|
72
72
|
getUnknown() {
|
|
73
73
|
return this.message.$unknown;
|
|
@@ -76,11 +76,14 @@ class S {
|
|
|
76
76
|
this.message.$unknown = e;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function a(t, e) {
|
|
80
80
|
if (e.parent.typeName !== t.$typeName)
|
|
81
81
|
throw new _(e, `cannot use ${e.toString()} with message ${t.$typeName}`, "ForeignFieldError");
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
function ee(t, e, s = !0) {
|
|
84
|
+
return new N(t, e ?? [], s);
|
|
85
|
+
}
|
|
86
|
+
class N {
|
|
84
87
|
field() {
|
|
85
88
|
return this._field;
|
|
86
89
|
}
|
|
@@ -130,7 +133,10 @@ class D {
|
|
|
130
133
|
yield [e, u(this._field, this._arr[e], this.check)];
|
|
131
134
|
}
|
|
132
135
|
}
|
|
133
|
-
|
|
136
|
+
function te(t, e, s = !0) {
|
|
137
|
+
return new T(t, e, s);
|
|
138
|
+
}
|
|
139
|
+
class T {
|
|
134
140
|
constructor(e, s, r = !0) {
|
|
135
141
|
this.obj = this[o] = s ?? {}, this.check = r, this._field = e;
|
|
136
142
|
}
|
|
@@ -139,7 +145,7 @@ class C {
|
|
|
139
145
|
}
|
|
140
146
|
set(e, s) {
|
|
141
147
|
if (this.check) {
|
|
142
|
-
const r =
|
|
148
|
+
const r = L(this._field, e, s);
|
|
143
149
|
if (r)
|
|
144
150
|
throw r;
|
|
145
151
|
}
|
|
@@ -155,7 +161,7 @@ class C {
|
|
|
155
161
|
}
|
|
156
162
|
get(e) {
|
|
157
163
|
let s = this.obj[h(e)];
|
|
158
|
-
return s !== void 0 && (s =
|
|
164
|
+
return s !== void 0 && (s = l(this._field, s, this.check)), s;
|
|
159
165
|
}
|
|
160
166
|
has(e) {
|
|
161
167
|
return Object.prototype.hasOwnProperty.call(this.obj, h(e));
|
|
@@ -168,7 +174,7 @@ class C {
|
|
|
168
174
|
for (const e of Object.entries(this.obj))
|
|
169
175
|
yield [
|
|
170
176
|
y(e[0], this._field.mapKey),
|
|
171
|
-
|
|
177
|
+
l(this._field, e[1], this.check)
|
|
172
178
|
];
|
|
173
179
|
}
|
|
174
180
|
[Symbol.iterator]() {
|
|
@@ -179,32 +185,32 @@ class C {
|
|
|
179
185
|
}
|
|
180
186
|
*values() {
|
|
181
187
|
for (const e of Object.values(this.obj))
|
|
182
|
-
yield
|
|
188
|
+
yield l(this._field, e, this.check);
|
|
183
189
|
}
|
|
184
190
|
forEach(e, s) {
|
|
185
191
|
for (const r of this.entries())
|
|
186
192
|
e.call(s, r[1], r[0], this);
|
|
187
193
|
}
|
|
188
194
|
}
|
|
189
|
-
function
|
|
190
|
-
return
|
|
195
|
+
function f(t, e) {
|
|
196
|
+
return C(e) ? X(e.message) && !t.oneof && t.fieldKind == "message" ? e.message.value : e.desc.typeName == "google.protobuf.Struct" && t.parent.typeName != "google.protobuf.Value" ? V(e.message) : e.message : e;
|
|
191
197
|
}
|
|
192
198
|
function m(t, e, s) {
|
|
193
|
-
return e !== void 0 && (
|
|
199
|
+
return e !== void 0 && (U(t.message) && !t.oneof && t.fieldKind == "message" ? e = {
|
|
194
200
|
$typeName: t.message.typeName,
|
|
195
201
|
value: g(t.message.fields[0], e)
|
|
196
|
-
} : t.message.typeName == "google.protobuf.Struct" && t.parent.typeName != "google.protobuf.Value" && w(e) && (e =
|
|
202
|
+
} : t.message.typeName == "google.protobuf.Struct" && t.parent.typeName != "google.protobuf.Value" && w(e) && (e = I(e))), new S(t.message, e, s);
|
|
197
203
|
}
|
|
198
204
|
function k(t, e) {
|
|
199
|
-
return t.listKind == "message" ?
|
|
205
|
+
return t.listKind == "message" ? f(t, e) : p(t, e);
|
|
200
206
|
}
|
|
201
207
|
function u(t, e, s) {
|
|
202
208
|
return t.listKind == "message" ? m(t, e, s) : g(t, e);
|
|
203
209
|
}
|
|
204
210
|
function W(t, e) {
|
|
205
|
-
return t.mapKind == "message" ?
|
|
211
|
+
return t.mapKind == "message" ? f(t, e) : p(t, e);
|
|
206
212
|
}
|
|
207
|
-
function
|
|
213
|
+
function l(t, e, s) {
|
|
208
214
|
return t.mapKind == "message" ? m(t, e, s) : e;
|
|
209
215
|
}
|
|
210
216
|
function h(t) {
|
|
@@ -235,13 +241,13 @@ function y(t, e) {
|
|
|
235
241
|
case i.UINT64:
|
|
236
242
|
case i.FIXED64:
|
|
237
243
|
try {
|
|
238
|
-
return
|
|
244
|
+
return c.uParse(t);
|
|
239
245
|
} catch {
|
|
240
246
|
}
|
|
241
247
|
break;
|
|
242
248
|
default:
|
|
243
249
|
try {
|
|
244
|
-
return
|
|
250
|
+
return c.parse(t);
|
|
245
251
|
} catch {
|
|
246
252
|
}
|
|
247
253
|
break;
|
|
@@ -253,11 +259,11 @@ function g(t, e) {
|
|
|
253
259
|
case i.INT64:
|
|
254
260
|
case i.SFIXED64:
|
|
255
261
|
case i.SINT64:
|
|
256
|
-
"longAsString" in t && t.longAsString && typeof e == "string" && (e =
|
|
262
|
+
"longAsString" in t && t.longAsString && typeof e == "string" && (e = c.parse(e));
|
|
257
263
|
break;
|
|
258
264
|
case i.FIXED64:
|
|
259
265
|
case i.UINT64:
|
|
260
|
-
"longAsString" in t && t.longAsString && typeof e == "string" && (e =
|
|
266
|
+
"longAsString" in t && t.longAsString && typeof e == "string" && (e = c.uParse(e));
|
|
261
267
|
break;
|
|
262
268
|
}
|
|
263
269
|
return e;
|
|
@@ -267,37 +273,37 @@ function p(t, e) {
|
|
|
267
273
|
case i.INT64:
|
|
268
274
|
case i.SFIXED64:
|
|
269
275
|
case i.SINT64:
|
|
270
|
-
"longAsString" in t && t.longAsString ? e = String(e) : (typeof e == "string" || typeof e == "number") && (e =
|
|
276
|
+
"longAsString" in t && t.longAsString ? e = String(e) : (typeof e == "string" || typeof e == "number") && (e = c.parse(e));
|
|
271
277
|
break;
|
|
272
278
|
case i.FIXED64:
|
|
273
279
|
case i.UINT64:
|
|
274
|
-
"longAsString" in t && t.longAsString ? e = String(e) : (typeof e == "string" || typeof e == "number") && (e =
|
|
280
|
+
"longAsString" in t && t.longAsString ? e = String(e) : (typeof e == "string" || typeof e == "number") && (e = c.uParse(e));
|
|
275
281
|
break;
|
|
276
282
|
}
|
|
277
283
|
return e;
|
|
278
284
|
}
|
|
279
|
-
function
|
|
285
|
+
function I(t) {
|
|
280
286
|
const e = {
|
|
281
287
|
$typeName: "google.protobuf.Struct",
|
|
282
288
|
fields: {}
|
|
283
289
|
};
|
|
284
290
|
if (w(t))
|
|
285
291
|
for (const [s, r] of Object.entries(t))
|
|
286
|
-
e.fields[s] =
|
|
292
|
+
e.fields[s] = O(r);
|
|
287
293
|
return e;
|
|
288
294
|
}
|
|
289
|
-
function
|
|
295
|
+
function V(t) {
|
|
290
296
|
const e = {};
|
|
291
297
|
for (const [s, r] of Object.entries(t.fields))
|
|
292
|
-
e[s] =
|
|
298
|
+
e[s] = j(r);
|
|
293
299
|
return e;
|
|
294
300
|
}
|
|
295
|
-
function
|
|
301
|
+
function j(t) {
|
|
296
302
|
switch (t.kind.case) {
|
|
297
303
|
case "structValue":
|
|
298
|
-
return
|
|
304
|
+
return V(t.kind.value);
|
|
299
305
|
case "listValue":
|
|
300
|
-
return t.kind.value.values.map(
|
|
306
|
+
return t.kind.value.values.map(j);
|
|
301
307
|
case "nullValue":
|
|
302
308
|
case void 0:
|
|
303
309
|
return null;
|
|
@@ -305,7 +311,7 @@ function I(t) {
|
|
|
305
311
|
return t.kind.value;
|
|
306
312
|
}
|
|
307
313
|
}
|
|
308
|
-
function
|
|
314
|
+
function O(t) {
|
|
309
315
|
const e = {
|
|
310
316
|
$typeName: "google.protobuf.Value",
|
|
311
317
|
kind: { case: void 0 }
|
|
@@ -330,7 +336,7 @@ function V(t) {
|
|
|
330
336
|
};
|
|
331
337
|
if (Array.isArray(t))
|
|
332
338
|
for (const r of t)
|
|
333
|
-
s.values.push(
|
|
339
|
+
s.values.push(O(r));
|
|
334
340
|
e.kind = {
|
|
335
341
|
case: "listValue",
|
|
336
342
|
value: s
|
|
@@ -338,12 +344,14 @@ function V(t) {
|
|
|
338
344
|
} else
|
|
339
345
|
e.kind = {
|
|
340
346
|
case: "structValue",
|
|
341
|
-
value:
|
|
347
|
+
value: I(t)
|
|
342
348
|
};
|
|
343
349
|
break;
|
|
344
350
|
}
|
|
345
351
|
return e;
|
|
346
352
|
}
|
|
347
353
|
export {
|
|
348
|
-
v as reflect
|
|
354
|
+
v as reflect,
|
|
355
|
+
ee as reflectList,
|
|
356
|
+
te as reflectMap
|
|
349
357
|
};
|
|
@@ -1,6 +1,27 @@
|
|
|
1
|
-
import { protoInt64 as
|
|
1
|
+
import { protoInt64 as s } from "../proto-int64.js";
|
|
2
2
|
import { ScalarType as r } from "../descriptors.js";
|
|
3
|
-
function
|
|
3
|
+
function f(t, e, n) {
|
|
4
|
+
if (e === n)
|
|
5
|
+
return !0;
|
|
6
|
+
if (t == r.BYTES) {
|
|
7
|
+
if (!(e instanceof Uint8Array) || !(n instanceof Uint8Array) || e.length !== n.length)
|
|
8
|
+
return !1;
|
|
9
|
+
for (let a = 0; a < e.length; a++)
|
|
10
|
+
if (e[a] !== n[a])
|
|
11
|
+
return !1;
|
|
12
|
+
return !0;
|
|
13
|
+
}
|
|
14
|
+
switch (t) {
|
|
15
|
+
case r.UINT64:
|
|
16
|
+
case r.FIXED64:
|
|
17
|
+
case r.INT64:
|
|
18
|
+
case r.SFIXED64:
|
|
19
|
+
case r.SINT64:
|
|
20
|
+
return e == n;
|
|
21
|
+
}
|
|
22
|
+
return !1;
|
|
23
|
+
}
|
|
24
|
+
function i(t, e) {
|
|
4
25
|
switch (t) {
|
|
5
26
|
case r.STRING:
|
|
6
27
|
return "";
|
|
@@ -14,7 +35,7 @@ function s(t, e) {
|
|
|
14
35
|
case r.SFIXED64:
|
|
15
36
|
case r.FIXED64:
|
|
16
37
|
case r.SINT64:
|
|
17
|
-
return e ? "0" :
|
|
38
|
+
return e ? "0" : s.zero;
|
|
18
39
|
case r.BYTES:
|
|
19
40
|
return new Uint8Array(0);
|
|
20
41
|
default:
|
|
@@ -35,5 +56,6 @@ function o(t, e) {
|
|
|
35
56
|
}
|
|
36
57
|
export {
|
|
37
58
|
o as isScalarZeroValue,
|
|
38
|
-
|
|
59
|
+
f as scalarEquals,
|
|
60
|
+
i as scalarZeroValue
|
|
39
61
|
};
|