web-core-tcm 0.0.52 → 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.
Files changed (113) hide show
  1. package/dist/node_modules/@alova/shared/dist/alova-shared.esm.js +249 -101
  2. package/dist/node_modules/@bufbuild/protobuf/dist/esm/clone.js +35 -0
  3. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +109 -0
  4. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +16 -0
  5. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +9 -0
  6. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +9 -10
  7. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +28 -0
  8. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +48 -0
  9. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +8 -0
  10. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +49 -0
  11. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +1 -0
  12. package/dist/node_modules/@bufbuild/protobuf/dist/esm/equals.js +127 -0
  13. package/dist/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +86 -0
  14. package/dist/node_modules/@bufbuild/protobuf/dist/esm/fields.js +11 -0
  15. package/dist/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +60 -56
  16. package/dist/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +434 -0
  17. package/dist/node_modules/@bufbuild/protobuf/dist/esm/index.js +49 -0
  18. package/dist/node_modules/@bufbuild/protobuf/dist/esm/merge.js +33 -0
  19. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +12 -3
  20. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +14 -10
  21. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +32 -12
  22. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +42 -6
  23. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +58 -50
  24. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +26 -4
  25. package/dist/node_modules/@bufbuild/protobuf/dist/esm/registry.js +130 -99
  26. package/dist/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +279 -0
  27. package/dist/node_modules/@bufbuild/protobuf/dist/esm/types.js +1 -0
  28. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +48 -27
  29. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +24 -0
  30. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +123 -0
  31. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +9 -5
  32. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +40 -0
  33. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +18 -0
  34. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.js +7 -0
  35. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.js +11 -0
  36. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +19 -0
  37. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +18 -0
  38. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +134 -60
  39. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.js +7 -0
  40. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.js +7 -0
  41. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +7 -0
  42. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +25 -0
  43. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +26 -0
  44. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +7 -0
  45. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.js +17 -0
  46. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +7 -0
  47. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.js +35 -0
  48. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +15 -0
  49. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +180 -0
  50. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +29 -0
  51. package/dist/node_modules/alova/dist/adapter/fetch.esm.js +10 -10
  52. package/dist/node_modules/alova/dist/alova.esm.js +263 -211
  53. package/dist/node_modules/alova/dist/clienthook/index.esm.js +2110 -70
  54. package/dist/node_modules/builder-pattern/dist/index.js +25 -13
  55. package/dist/node_modules/pinyin/lib/esm/pinyin.js +2 -2
  56. package/dist/node_modules/punycode/punycode.es6.js +17 -17
  57. package/dist/src/api/algorithm/alova/implement/comprehensiveAlgorithm.js +4 -7
  58. package/dist/src/api/algorithm/alova/implement/index.js +12 -0
  59. package/dist/src/api/algorithm/alova/implement/inquiriesAlgorithm.js +4 -7
  60. package/dist/src/api/algorithm/alova/implement/inspectionsAlgorithm.js +7 -10
  61. package/dist/src/api/algorithm/alova/implement/lisemsAlgorithm.js +6 -9
  62. package/dist/src/api/algorithm/alova/implement/pulsationsAlgorithm.js +7 -10
  63. package/dist/src/api/algorithm/alova/index.js +11 -15
  64. package/dist/src/api/algorithm/comprehensiveAlgorithm.js +5 -6
  65. package/dist/src/api/authorization/alova/globals.js +1 -0
  66. package/dist/src/api/authorization/alova/implement/index.js +4 -0
  67. package/dist/src/api/authorization/alova/index.js +10 -8
  68. package/dist/src/api/check/alova/globals.js +1 -0
  69. package/dist/src/api/check/alova/implement/index.js +5 -0
  70. package/dist/src/api/check/alova/index.js +5 -6
  71. package/dist/src/api/check/check.js +2 -2
  72. package/dist/src/api/config/index.d.ts +1 -1
  73. package/dist/src/api/config/index.js +2 -2
  74. package/dist/src/api/core/index.js +9 -0
  75. package/dist/src/api/device/device.d.ts +4 -5
  76. package/dist/src/api/device/device.js +20 -29
  77. package/dist/src/api/doctor/alova/globals.js +1 -0
  78. package/dist/src/api/doctor/alova/implement/index.js +4 -0
  79. package/dist/src/api/doctor/alova/index.js +10 -9
  80. package/dist/src/api/index.d.ts +12 -11
  81. package/dist/src/api/index.js +28 -0
  82. package/dist/src/api/metric/alova/implement/index.js +4 -0
  83. package/dist/src/api/metric/alova/index.js +1 -0
  84. package/dist/src/api/metric/index.js +5 -4
  85. package/dist/src/api/oauth/alova/globals.js +1 -0
  86. package/dist/src/api/oauth/alova/implement/index.js +4 -0
  87. package/dist/src/api/oauth/alova/index.js +13 -11
  88. package/dist/src/api/outpatient/alova/globals.js +1 -0
  89. package/dist/src/api/outpatient/alova/implement/index.js +4 -0
  90. package/dist/src/api/outpatient/alova/index.js +5 -5
  91. package/dist/src/api/patient/alova/globals.js +1 -0
  92. package/dist/src/api/patient/alova/implement/index.js +16 -0
  93. package/dist/src/api/patient/alova/index.js +9 -12
  94. package/dist/src/api/patient/meta.js +1 -0
  95. package/dist/src/api/prescription/alova/globals.js +1 -0
  96. package/dist/src/api/prescription/alova/implement/index.js +6 -0
  97. package/dist/src/api/prescription/alova/index.js +8 -7
  98. package/dist/src/api/scientist/alova/globals.js +1 -0
  99. package/dist/src/api/scientist/alova/implement/index.js +4 -0
  100. package/dist/src/api/scientist/alova/index.js +5 -5
  101. package/dist/src/index.d.ts +0 -1
  102. package/dist/src/index.js +34 -32
  103. package/dist/src/proto/index.js +10 -0
  104. package/dist/src/proto/types/Images_pb.js +7 -6
  105. package/dist/src/proto/types/WaveMap_pb.js +4 -3
  106. package/dist/src/util/helper.js +38 -2
  107. package/dist/src/util/string.js +47 -5
  108. package/package.json +1 -1
  109. package/dist/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +0 -556
  110. package/dist/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +0 -36
  111. package/dist/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -26
  112. package/dist/node_modules/quasar/src/composables/use-quasar/use-quasar.js +0 -8
  113. package/dist/node_modules/quasar/src/utils/private.symbols/symbols.js +0 -4
@@ -0,0 +1,279 @@
1
+ import { ScalarType as i } from "./descriptors.js";
2
+ import { protoCamelCase as $ } from "./reflect/names.js";
3
+ import { reflect as b } from "./reflect/reflect.js";
4
+ import "./wkt/index.js";
5
+ import { isWrapperDesc as E } from "./wkt/wrappers.js";
6
+ import "./wire/index.js";
7
+ import { getExtension as T, createExtensionContainer as J } from "./extensions.js";
8
+ import { formatVal as O, checkField as u } from "./reflect/reflect-check.js";
9
+ import { base64Encode as k } from "./wire/base64-encoding.js";
10
+ import { anyUnpack as V } from "./wkt/any.js";
11
+ const j = 3, F = 2, y = {
12
+ alwaysEmitImplicit: !1,
13
+ enumAsInteger: !1,
14
+ useProtoFieldName: !1
15
+ };
16
+ function _(e) {
17
+ return e ? Object.assign(Object.assign({}, y), e) : y;
18
+ }
19
+ function A(e, n, t) {
20
+ return f(b(e, n), _(t));
21
+ }
22
+ function H(e, n, t) {
23
+ var o;
24
+ const r = A(e, n, t);
25
+ return JSON.stringify(r, null, (o = t?.prettySpaces) !== null && o !== void 0 ? o : 0);
26
+ }
27
+ function v(e, n) {
28
+ var t;
29
+ if (e.typeName == "google.protobuf.NullValue")
30
+ return null;
31
+ const o = (t = e.value[n]) === null || t === void 0 ? void 0 : t.name;
32
+ if (o === void 0)
33
+ throw new Error(`${n} is not a value in ${e}`);
34
+ return o;
35
+ }
36
+ function f(e, n) {
37
+ var t;
38
+ const o = x(e, n);
39
+ if (o !== void 0)
40
+ return o;
41
+ const r = {};
42
+ for (const s of e.sortedFields) {
43
+ if (!e.isSet(s)) {
44
+ if (s.presence == j)
45
+ throw new Error(`cannot encode ${s} to JSON: required field not set`);
46
+ if (!n.alwaysEmitImplicit || s.presence !== F)
47
+ continue;
48
+ }
49
+ const a = p(s, e.get(s), n);
50
+ a !== void 0 && (r[Z(s, n)] = a);
51
+ }
52
+ if (n.registry) {
53
+ const s = /* @__PURE__ */ new Set();
54
+ for (const { no: a } of (t = e.getUnknown()) !== null && t !== void 0 ? t : [])
55
+ if (!s.has(a)) {
56
+ s.add(a);
57
+ const c = n.registry.getExtensionFor(e.desc, a);
58
+ if (!c)
59
+ continue;
60
+ const S = T(e.message, c), [I, g] = J(c, S), N = p(g, I.get(g), n);
61
+ N !== void 0 && (r[c.jsonName] = N);
62
+ }
63
+ }
64
+ return r;
65
+ }
66
+ function p(e, n, t) {
67
+ switch (e.fieldKind) {
68
+ case "scalar":
69
+ return m(e, n);
70
+ case "message":
71
+ return f(n, t);
72
+ case "enum":
73
+ return d(e.enum, n, t.enumAsInteger);
74
+ case "list":
75
+ return U(n, t);
76
+ case "map":
77
+ return D(n, t);
78
+ }
79
+ }
80
+ function D(e, n) {
81
+ const t = e.field(), o = {};
82
+ switch (t.mapKind) {
83
+ case "scalar":
84
+ for (const [r, s] of e)
85
+ o[r] = m(t, s);
86
+ break;
87
+ case "message":
88
+ for (const [r, s] of e)
89
+ o[r] = f(s, n);
90
+ break;
91
+ case "enum":
92
+ for (const [r, s] of e)
93
+ o[r] = d(t.enum, s, n.enumAsInteger);
94
+ break;
95
+ }
96
+ return n.alwaysEmitImplicit || e.size > 0 ? o : void 0;
97
+ }
98
+ function U(e, n) {
99
+ const t = e.field(), o = [];
100
+ switch (t.listKind) {
101
+ case "scalar":
102
+ for (const r of e)
103
+ o.push(m(t, r));
104
+ break;
105
+ case "enum":
106
+ for (const r of e)
107
+ o.push(d(t.enum, r, n.enumAsInteger));
108
+ break;
109
+ case "message":
110
+ for (const r of e)
111
+ o.push(f(r, n));
112
+ break;
113
+ }
114
+ return n.alwaysEmitImplicit || o.length > 0 ? o : void 0;
115
+ }
116
+ function d(e, n, t) {
117
+ var o;
118
+ if (typeof n != "number")
119
+ throw new Error(`cannot encode ${e} to JSON: expected number, got ${O(n)}`);
120
+ if (e.typeName == "google.protobuf.NullValue")
121
+ return null;
122
+ if (t)
123
+ return n;
124
+ const r = e.value[n];
125
+ return (o = r?.name) !== null && o !== void 0 ? o : n;
126
+ }
127
+ function m(e, n) {
128
+ var t, o, r, s, a, c;
129
+ switch (e.scalar) {
130
+ // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.
131
+ case i.INT32:
132
+ case i.SFIXED32:
133
+ case i.SINT32:
134
+ case i.FIXED32:
135
+ case i.UINT32:
136
+ if (typeof n != "number")
137
+ throw new Error(`cannot encode ${e} to JSON: ${(t = u(e, n)) === null || t === void 0 ? void 0 : t.message}`);
138
+ return n;
139
+ // float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity".
140
+ // Either numbers or strings are accepted. Exponent notation is also accepted.
141
+ case i.FLOAT:
142
+ case i.DOUBLE:
143
+ if (typeof n != "number")
144
+ throw new Error(`cannot encode ${e} to JSON: ${(o = u(e, n)) === null || o === void 0 ? void 0 : o.message}`);
145
+ return Number.isNaN(n) ? "NaN" : n === Number.POSITIVE_INFINITY ? "Infinity" : n === Number.NEGATIVE_INFINITY ? "-Infinity" : n;
146
+ // string:
147
+ case i.STRING:
148
+ if (typeof n != "string")
149
+ throw new Error(`cannot encode ${e} to JSON: ${(r = u(e, n)) === null || r === void 0 ? void 0 : r.message}`);
150
+ return n;
151
+ // bool:
152
+ case i.BOOL:
153
+ if (typeof n != "boolean")
154
+ throw new Error(`cannot encode ${e} to JSON: ${(s = u(e, n)) === null || s === void 0 ? void 0 : s.message}`);
155
+ return n;
156
+ // JSON value will be a decimal string. Either numbers or strings are accepted.
157
+ case i.UINT64:
158
+ case i.FIXED64:
159
+ case i.INT64:
160
+ case i.SFIXED64:
161
+ case i.SINT64:
162
+ if (typeof n != "bigint" && typeof n != "string")
163
+ throw new Error(`cannot encode ${e} to JSON: ${(a = u(e, n)) === null || a === void 0 ? void 0 : a.message}`);
164
+ return n.toString();
165
+ // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.
166
+ // Either standard or URL-safe base64 encoding with/without paddings are accepted.
167
+ case i.BYTES:
168
+ if (n instanceof Uint8Array)
169
+ return k(n);
170
+ throw new Error(`cannot encode ${e} to JSON: ${(c = u(e, n)) === null || c === void 0 ? void 0 : c.message}`);
171
+ }
172
+ }
173
+ function Z(e, n) {
174
+ return n.useProtoFieldName ? e.name : e.jsonName;
175
+ }
176
+ function x(e, n) {
177
+ if (e.desc.typeName.startsWith("google.protobuf."))
178
+ switch (e.desc.typeName) {
179
+ case "google.protobuf.Any":
180
+ return C(e.message, n);
181
+ case "google.protobuf.Timestamp":
182
+ return W(e.message);
183
+ case "google.protobuf.Duration":
184
+ return K(e.message);
185
+ case "google.protobuf.FieldMask":
186
+ return L(e.message);
187
+ case "google.protobuf.Struct":
188
+ return w(e.message);
189
+ case "google.protobuf.Value":
190
+ return l(e.message);
191
+ case "google.protobuf.ListValue":
192
+ return h(e.message);
193
+ default:
194
+ if (E(e.desc)) {
195
+ const t = e.desc.fields[0];
196
+ return m(t, e.get(t));
197
+ }
198
+ return;
199
+ }
200
+ }
201
+ function C(e, n) {
202
+ if (e.typeUrl === "")
203
+ return {};
204
+ const { registry: t } = n;
205
+ let o, r;
206
+ if (t && (o = V(e, t), o && (r = t.getMessage(o.$typeName))), !r || !o)
207
+ throw new Error(`cannot encode message ${e.$typeName} to JSON: "${e.typeUrl}" is not in the type registry`);
208
+ let s = f(b(r, o), n);
209
+ return (r.typeName.startsWith("google.protobuf.") || s === null || Array.isArray(s) || typeof s != "object") && (s = { value: s }), s["@type"] = e.typeUrl, s;
210
+ }
211
+ function K(e) {
212
+ const n = Number(e.seconds), t = e.nanos;
213
+ if (n > 315576e6 || n < -315576e6)
214
+ throw new Error(`cannot encode message ${e.$typeName} to JSON: value out of range`);
215
+ if (n > 0 && t < 0 || n < 0 && t > 0)
216
+ throw new Error(`cannot encode message ${e.$typeName} to JSON: nanos sign must match seconds sign`);
217
+ let o = e.seconds.toString();
218
+ if (t !== 0) {
219
+ let r = Math.abs(t).toString();
220
+ r = "0".repeat(9 - r.length) + r, r.substring(3) === "000000" ? r = r.substring(0, 3) : r.substring(6) === "000" && (r = r.substring(0, 6)), o += "." + r, t < 0 && n == 0 && (o = "-" + o);
221
+ }
222
+ return o + "s";
223
+ }
224
+ function L(e) {
225
+ return e.paths.map((n) => {
226
+ if (n.match(/_[0-9]?_/g) || n.match(/[A-Z]/g))
227
+ throw new Error(`cannot encode message ${e.$typeName} to JSON: lowerCamelCase of path name "` + n + '" is irreversible');
228
+ return $(n);
229
+ }).join(",");
230
+ }
231
+ function w(e) {
232
+ const n = {};
233
+ for (const [t, o] of Object.entries(e.fields))
234
+ n[t] = l(o);
235
+ return n;
236
+ }
237
+ function l(e) {
238
+ switch (e.kind.case) {
239
+ case "nullValue":
240
+ return null;
241
+ case "numberValue":
242
+ if (!Number.isFinite(e.kind.value))
243
+ throw new Error(`${e.$typeName} cannot be NaN or Infinity`);
244
+ return e.kind.value;
245
+ case "boolValue":
246
+ return e.kind.value;
247
+ case "stringValue":
248
+ return e.kind.value;
249
+ case "structValue":
250
+ return w(e.kind.value);
251
+ case "listValue":
252
+ return h(e.kind.value);
253
+ default:
254
+ throw new Error(`${e.$typeName} must have a value`);
255
+ }
256
+ }
257
+ function h(e) {
258
+ return e.values.map(l);
259
+ }
260
+ function W(e) {
261
+ const n = Number(e.seconds) * 1e3;
262
+ if (n < Date.parse("0001-01-01T00:00:00Z") || n > Date.parse("9999-12-31T23:59:59Z"))
263
+ throw new Error(`cannot encode message ${e.$typeName} to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);
264
+ if (e.nanos < 0)
265
+ throw new Error(`cannot encode message ${e.$typeName} to JSON: nanos must not be negative`);
266
+ if (e.nanos > 999999999)
267
+ throw new Error(`cannot encode message ${e.$typeName} to JSON: nanos must not be greater than 99999999`);
268
+ let t = "Z";
269
+ if (e.nanos > 0) {
270
+ const o = (e.nanos + 1e9).toString().substring(1);
271
+ o.substring(3) === "000000" ? t = "." + o.substring(0, 3) + "Z" : o.substring(6) === "000" ? t = "." + o.substring(0, 6) + "Z" : t = "." + o + "Z";
272
+ }
273
+ return new Date(n).toISOString().replace(".000Z", t);
274
+ }
275
+ export {
276
+ v as enumToJson,
277
+ A as toJson,
278
+ H as toJsonString
279
+ };
@@ -1,14 +1,14 @@
1
- function g(e) {
2
- const c = h();
3
- let s = e.length * 3 / 4;
4
- e[e.length - 2] == "=" ? s -= 2 : e[e.length - 1] == "=" && (s -= 1);
5
- let a = new Uint8Array(s), r = 0, t = 0, n, o = 0;
6
- for (let l = 0; l < e.length; l++) {
7
- if (n = c[e.charCodeAt(l)], n === void 0)
8
- switch (e[l]) {
1
+ function u(e) {
2
+ const r = h();
3
+ let o = e.length * 3 / 4;
4
+ e[e.length - 2] == "=" ? o -= 2 : e[e.length - 1] == "=" && (o -= 1);
5
+ let l = new Uint8Array(o), c = 0, n = 0, t, a = 0;
6
+ for (let i = 0; i < e.length; i++) {
7
+ if (t = r[e.charCodeAt(i)], t === void 0)
8
+ switch (e[i]) {
9
9
  // @ts-ignore TS7029: Fallthrough case in switch -- ignore instead of expect-error for compiler settings without noFallthroughCasesInSwitch: true
10
10
  case "=":
11
- t = 0;
11
+ n = 0;
12
12
  // reset state when padding found
13
13
  case `
14
14
  `:
@@ -20,39 +20,60 @@ function g(e) {
20
20
  default:
21
21
  throw Error("invalid base64 string");
22
22
  }
23
- switch (t) {
23
+ switch (n) {
24
24
  case 0:
25
- o = n, t = 1;
25
+ a = t, n = 1;
26
26
  break;
27
27
  case 1:
28
- a[r++] = o << 2 | (n & 48) >> 4, o = n, t = 2;
28
+ l[c++] = a << 2 | (t & 48) >> 4, a = t, n = 2;
29
29
  break;
30
30
  case 2:
31
- a[r++] = (o & 15) << 4 | (n & 60) >> 2, o = n, t = 3;
31
+ l[c++] = (a & 15) << 4 | (t & 60) >> 2, a = t, n = 3;
32
32
  break;
33
33
  case 3:
34
- a[r++] = (o & 3) << 6 | n, t = 0;
34
+ l[c++] = (a & 3) << 6 | t, n = 0;
35
35
  break;
36
36
  }
37
37
  }
38
- if (t == 1)
38
+ if (n == 1)
39
39
  throw Error("invalid base64 string");
40
- return a.subarray(0, r);
40
+ return l.subarray(0, c);
41
41
  }
42
- let d, i;
43
- function f(e) {
44
- return d || (d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), d.slice(0, -2).concat("-", "_")), d;
42
+ function g(e, r = "std") {
43
+ const o = b(r), l = r == "std";
44
+ let c = "", n = 0, t, a = 0;
45
+ for (let i = 0; i < e.length; i++)
46
+ switch (t = e[i], n) {
47
+ case 0:
48
+ c += o[t >> 2], a = (t & 3) << 4, n = 1;
49
+ break;
50
+ case 1:
51
+ c += o[a | t >> 4], a = (t & 15) << 2, n = 2;
52
+ break;
53
+ case 2:
54
+ c += o[a | t >> 6], c += o[t & 63], n = 0;
55
+ break;
56
+ }
57
+ return n && (c += o[a], l && (c += "=", n == 1 && (c += "="))), c;
58
+ }
59
+ let d, f, s;
60
+ function b(e) {
61
+ return d || (d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), f = d.slice(0, -2).concat("-", "_")), e == "url" ? (
62
+ // biome-ignore lint/style/noNonNullAssertion: TS fails to narrow down
63
+ f
64
+ ) : d;
45
65
  }
46
66
  function h() {
47
- if (!i) {
48
- i = [];
49
- const e = f();
50
- for (let c = 0; c < e.length; c++)
51
- i[e[c].charCodeAt(0)] = c;
52
- i[45] = e.indexOf("+"), i[95] = e.indexOf("/");
67
+ if (!s) {
68
+ s = [];
69
+ const e = b("std");
70
+ for (let r = 0; r < e.length; r++)
71
+ s[e[r].charCodeAt(0)] = r;
72
+ s[45] = e.indexOf("+"), s[95] = e.indexOf("/");
53
73
  }
54
- return i;
74
+ return s;
55
75
  }
56
76
  export {
57
- g as base64Decode
77
+ u as base64Decode,
78
+ g as base64Encode
58
79
  };
@@ -0,0 +1,24 @@
1
+ import { BinaryReader as o, BinaryWriter as t, FLOAT32_MAX as i, FLOAT32_MIN as a, INT32_MAX as m, INT32_MIN as d, UINT32_MAX as n, WireType as T } from "./binary-encoding.js";
2
+ import { base64Decode as c, base64Encode as p } from "./base64-encoding.js";
3
+ import { configureTextEncoding as f, getTextEncoding as l } from "./text-encoding.js";
4
+ import { parseTextFormatEnumValue as D, parseTextFormatScalarValue as E } from "./text-format.js";
5
+ import { sizeDelimitedDecodeStream as M, sizeDelimitedEncode as N, sizeDelimitedPeek as _ } from "./size-delimited.js";
6
+ export {
7
+ o as BinaryReader,
8
+ t as BinaryWriter,
9
+ i as FLOAT32_MAX,
10
+ a as FLOAT32_MIN,
11
+ m as INT32_MAX,
12
+ d as INT32_MIN,
13
+ n as UINT32_MAX,
14
+ T as WireType,
15
+ c as base64Decode,
16
+ p as base64Encode,
17
+ f as configureTextEncoding,
18
+ l as getTextEncoding,
19
+ D as parseTextFormatEnumValue,
20
+ E as parseTextFormatScalarValue,
21
+ M as sizeDelimitedDecodeStream,
22
+ N as sizeDelimitedEncode,
23
+ _ as sizeDelimitedPeek
24
+ };
@@ -0,0 +1,123 @@
1
+ import { toBinary as v } from "../to-binary.js";
2
+ import { BinaryWriter as _, BinaryReader as z } from "./binary-encoding.js";
3
+ import { fromBinary as g } from "../from-binary.js";
4
+ var S = function(t) {
5
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
6
+ var s = t[Symbol.asyncIterator], i;
7
+ return s ? s.call(t) : (t = typeof __values == "function" ? __values(t) : t[Symbol.iterator](), i = {}, f("next"), f("throw"), f("return"), i[Symbol.asyncIterator] = function() {
8
+ return this;
9
+ }, i);
10
+ function f(n) {
11
+ i[n] = t[n] && function(u) {
12
+ return new Promise(function(c, l) {
13
+ u = t[n](u), o(c, l, u.done, u.value);
14
+ });
15
+ };
16
+ }
17
+ function o(n, u, c, l) {
18
+ Promise.resolve(l).then(function(a) {
19
+ n({ value: a, done: c });
20
+ }, u);
21
+ }
22
+ }, m = function(t) {
23
+ return this instanceof m ? (this.v = t, this) : new m(t);
24
+ }, I = function(t, s, i) {
25
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
26
+ var f = i.apply(t, s || []), o, n = [];
27
+ return o = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", u), o[Symbol.asyncIterator] = function() {
28
+ return this;
29
+ }, o;
30
+ function u(e) {
31
+ return function(r) {
32
+ return Promise.resolve(r).then(e, h);
33
+ };
34
+ }
35
+ function c(e, r) {
36
+ f[e] && (o[e] = function(y) {
37
+ return new Promise(function(b, p) {
38
+ n.push([e, y, b, p]) > 1 || l(e, y);
39
+ });
40
+ }, r && (o[e] = r(o[e])));
41
+ }
42
+ function l(e, r) {
43
+ try {
44
+ a(f[e](r));
45
+ } catch (y) {
46
+ d(n[0][3], y);
47
+ }
48
+ }
49
+ function a(e) {
50
+ e.value instanceof m ? Promise.resolve(e.value.v).then(w, h) : d(n[0][2], e);
51
+ }
52
+ function w(e) {
53
+ l("next", e);
54
+ }
55
+ function h(e) {
56
+ l("throw", e);
57
+ }
58
+ function d(e, r) {
59
+ e(r), n.shift(), n.length && l(n[0][0], n[0][1]);
60
+ }
61
+ };
62
+ function L(t, s, i) {
63
+ const f = new _();
64
+ return f.bytes(v(t, s, i)), f.finish();
65
+ }
66
+ function k(t, s, i) {
67
+ return I(this, arguments, function* () {
68
+ var o, n, u, c;
69
+ function l(e, r) {
70
+ const y = new Uint8Array(e.byteLength + r.byteLength);
71
+ return y.set(e), y.set(r, e.length), y;
72
+ }
73
+ let a = new Uint8Array(0);
74
+ try {
75
+ for (var w = !0, h = S(s), d; d = yield m(h.next()), o = d.done, !o; w = !0)
76
+ for (c = d.value, w = !1, a = l(a, c); ; ) {
77
+ const r = E(a);
78
+ if (r.eof || r.offset + r.size > a.byteLength)
79
+ break;
80
+ yield yield m(g(t, a.subarray(r.offset, r.offset + r.size), i)), a = a.subarray(r.offset + r.size);
81
+ }
82
+ } catch (e) {
83
+ n = { error: e };
84
+ } finally {
85
+ try {
86
+ !w && !o && (u = h.return) && (yield m(u.call(h)));
87
+ } finally {
88
+ if (n) throw n.error;
89
+ }
90
+ }
91
+ if (a.byteLength > 0)
92
+ throw new Error("incomplete data");
93
+ });
94
+ }
95
+ function E(t) {
96
+ const s = { eof: !0, size: null, offset: null };
97
+ for (let i = 0; i < 10; i++) {
98
+ if (i > t.byteLength)
99
+ return s;
100
+ if ((t[i] & 128) == 0) {
101
+ const f = new z(t);
102
+ let o;
103
+ try {
104
+ o = f.uint32();
105
+ } catch (n) {
106
+ if (n instanceof RangeError)
107
+ return s;
108
+ throw n;
109
+ }
110
+ return {
111
+ eof: !1,
112
+ size: o,
113
+ offset: f.pos
114
+ };
115
+ }
116
+ }
117
+ throw new Error("invalid varint");
118
+ }
119
+ export {
120
+ k as sizeDelimitedDecodeStream,
121
+ L as sizeDelimitedEncode,
122
+ E as sizeDelimitedPeek
123
+ };
@@ -1,13 +1,16 @@
1
1
  const o = Symbol.for("@bufbuild/protobuf/text-encoding");
2
- function r() {
2
+ function r(n) {
3
+ globalThis[o] = n;
4
+ }
5
+ function d() {
3
6
  if (globalThis[o] == null) {
4
- const t = new globalThis.TextEncoder(), n = new globalThis.TextDecoder();
7
+ const n = new globalThis.TextEncoder(), t = new globalThis.TextDecoder();
5
8
  globalThis[o] = {
6
9
  encodeUtf8(e) {
7
- return t.encode(e);
10
+ return n.encode(e);
8
11
  },
9
12
  decodeUtf8(e) {
10
- return n.decode(e);
13
+ return t.decode(e);
11
14
  },
12
15
  checkUtf8(e) {
13
16
  try {
@@ -21,5 +24,6 @@ function r() {
21
24
  return globalThis[o];
22
25
  }
23
26
  export {
24
- r as getTextEncoding
27
+ r as configureTextEncoding,
28
+ d as getTextEncoding
25
29
  };
@@ -0,0 +1,40 @@
1
+ import { AnySchema as i } from "./gen/google/protobuf/any_pb.js";
2
+ import { create as u } from "../create.js";
3
+ import { toBinary as a } from "../to-binary.js";
4
+ import { fromBinary as p, mergeFromBinary as l } from "../from-binary.js";
5
+ function s(n, t, e) {
6
+ let r = !1;
7
+ return e || (e = u(i), r = !0), e.value = a(n, t), e.typeUrl = m(t.$typeName), r ? e : void 0;
8
+ }
9
+ function o(n, t) {
10
+ if (n.typeUrl === "")
11
+ return !1;
12
+ const e = typeof t == "string" ? t : t.typeName, r = f(n.typeUrl);
13
+ return e === r;
14
+ }
15
+ function g(n, t) {
16
+ if (n.typeUrl === "")
17
+ return;
18
+ const e = t.kind == "message" ? t : t.getMessage(f(n.typeUrl));
19
+ if (!(!e || !o(n, e)))
20
+ return p(e, n.value);
21
+ }
22
+ function k(n, t, e) {
23
+ if (o(n, t))
24
+ return l(t, e, n.value);
25
+ }
26
+ function m(n) {
27
+ return `type.googleapis.com/${n}`;
28
+ }
29
+ function f(n) {
30
+ const t = n.lastIndexOf("/"), e = t >= 0 ? n.substring(t + 1) : n;
31
+ if (!e.length)
32
+ throw new Error(`invalid type url: ${n}`);
33
+ return e;
34
+ }
35
+ export {
36
+ o as anyIs,
37
+ s as anyPack,
38
+ g as anyUnpack,
39
+ k as anyUnpackTo
40
+ };
@@ -0,0 +1,18 @@
1
+ import { DurationSchema as a } from "./gen/google/protobuf/duration_pb.js";
2
+ import { create as c } from "../create.js";
3
+ import { protoInt64 as e } from "../proto-int64.js";
4
+ function f(o) {
5
+ const n = o < 0 ? -1 : 1, r = Math.abs(o), s = Math.floor(r / 1e3), t = (r - s * 1e3) * 1e6;
6
+ return c(a, {
7
+ seconds: e.parse(s * n),
8
+ nanos: t === 0 ? 0 : t * n
9
+ // deliberately avoid signed 0 - it does not serialize
10
+ });
11
+ }
12
+ function p(o) {
13
+ return Number(o.seconds) * 1e3 + Math.round(o.nanos / 1e6);
14
+ }
15
+ export {
16
+ f as durationFromMs,
17
+ p as durationMs
18
+ };
@@ -0,0 +1,7 @@
1
+ import { fileDesc as b } from "../../../../codegenv2/file.js";
2
+ import { messageDesc as n } from "../../../../codegenv2/message.js";
3
+ const c = /* @__PURE__ */ b("Chlnb29nbGUvcHJvdG9idWYvYW55LnByb3RvEg9nb29nbGUucHJvdG9idWYiJgoDQW55EhAKCHR5cGVfdXJsGAEgASgJEg0KBXZhbHVlGAIgASgMQnYKE2NvbS5nb29nbGUucHJvdG9idWZCCEFueVByb3RvUAFaLGdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL2FueXBiogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM"), G = /* @__PURE__ */ n(c, 0);
4
+ export {
5
+ G as AnySchema,
6
+ c as file_google_protobuf_any
7
+ };
@@ -0,0 +1,11 @@
1
+ import { fileDesc as b } from "../../../../codegenv2/file.js";
2
+ import { file_google_protobuf_source_context as G } from "./source_context_pb.js";
3
+ import { file_google_protobuf_type as c } from "./type_pb.js";
4
+ import { messageDesc as g } from "../../../../codegenv2/message.js";
5
+ const A = /* @__PURE__ */ b("Chlnb29nbGUvcHJvdG9idWYvYXBpLnByb3RvEg9nb29nbGUucHJvdG9idWYikgIKA0FwaRIMCgRuYW1lGAEgASgJEigKB21ldGhvZHMYAiADKAsyFy5nb29nbGUucHJvdG9idWYuTWV0aG9kEigKB29wdGlvbnMYAyADKAsyFy5nb29nbGUucHJvdG9idWYuT3B0aW9uEg8KB3ZlcnNpb24YBCABKAkSNgoOc291cmNlX2NvbnRleHQYBSABKAsyHi5nb29nbGUucHJvdG9idWYuU291cmNlQ29udGV4dBImCgZtaXhpbnMYBiADKAsyFi5nb29nbGUucHJvdG9idWYuTWl4aW4SJwoGc3ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3RvYnVmLlN5bnRheBIPCgdlZGl0aW9uGAggASgJIu4BCgZNZXRob2QSDAoEbmFtZRgBIAEoCRIYChByZXF1ZXN0X3R5cGVfdXJsGAIgASgJEhkKEXJlcXVlc3Rfc3RyZWFtaW5nGAMgASgIEhkKEXJlc3BvbnNlX3R5cGVfdXJsGAQgASgJEhoKEnJlc3BvbnNlX3N0cmVhbWluZxgFIAEoCBIoCgdvcHRpb25zGAYgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbhIrCgZzeW50YXgYByABKA4yFy5nb29nbGUucHJvdG9idWYuU3ludGF4QgIYARITCgdlZGl0aW9uGAggASgJQgIYASIjCgVNaXhpbhIMCgRuYW1lGAEgASgJEgwKBHJvb3QYAiABKAlCdgoTY29tLmdvb2dsZS5wcm90b2J1ZkIIQXBpUHJvdG9QAVosZ29vZ2xlLmdvbGFuZy5vcmcvcHJvdG9idWYvdHlwZXMva25vd24vYXBpcGKiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw", [G, c]), v = /* @__PURE__ */ g(A, 0), u = /* @__PURE__ */ g(A, 1), i = /* @__PURE__ */ g(A, 2);
6
+ export {
7
+ v as ApiSchema,
8
+ u as MethodSchema,
9
+ i as MixinSchema,
10
+ A as file_google_protobuf_api
11
+ };
@@ -0,0 +1,19 @@
1
+ import { fileDesc as G } from "../../../../../codegenv2/file.js";
2
+ import { file_google_protobuf_descriptor as R } from "../descriptor_pb.js";
3
+ import { messageDesc as l } from "../../../../../codegenv2/message.js";
4
+ import { enumDesc as Z } from "../../../../../codegenv2/enum.js";
5
+ const c = /* @__PURE__ */ G("CiVnb29nbGUvcHJvdG9idWYvY29tcGlsZXIvcGx1Z2luLnByb3RvEhhnb29nbGUucHJvdG9idWYuY29tcGlsZXIiRgoHVmVyc2lvbhINCgVtYWpvchgBIAEoBRINCgVtaW5vchgCIAEoBRINCgVwYXRjaBgDIAEoBRIOCgZzdWZmaXgYBCABKAkigQIKFENvZGVHZW5lcmF0b3JSZXF1ZXN0EhgKEGZpbGVfdG9fZ2VuZXJhdGUYASADKAkSEQoJcGFyYW1ldGVyGAIgASgJEjgKCnByb3RvX2ZpbGUYDyADKAsyJC5nb29nbGUucHJvdG9idWYuRmlsZURlc2NyaXB0b3JQcm90bxJFChdzb3VyY2VfZmlsZV9kZXNjcmlwdG9ycxgRIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5GaWxlRGVzY3JpcHRvclByb3RvEjsKEGNvbXBpbGVyX3ZlcnNpb24YAyABKAsyIS5nb29nbGUucHJvdG9idWYuY29tcGlsZXIuVmVyc2lvbiKSAwoVQ29kZUdlbmVyYXRvclJlc3BvbnNlEg0KBWVycm9yGAEgASgJEhoKEnN1cHBvcnRlZF9mZWF0dXJlcxgCIAEoBBIXCg9taW5pbXVtX2VkaXRpb24YAyABKAUSFwoPbWF4aW11bV9lZGl0aW9uGAQgASgFEkIKBGZpbGUYDyADKAsyNC5nb29nbGUucHJvdG9idWYuY29tcGlsZXIuQ29kZUdlbmVyYXRvclJlc3BvbnNlLkZpbGUafwoERmlsZRIMCgRuYW1lGAEgASgJEhcKD2luc2VydGlvbl9wb2ludBgCIAEoCRIPCgdjb250ZW50GA8gASgJEj8KE2dlbmVyYXRlZF9jb2RlX2luZm8YECABKAsyIi5nb29nbGUucHJvdG9idWYuR2VuZXJhdGVkQ29kZUluZm8iVwoHRmVhdHVyZRIQCgxGRUFUVVJFX05PTkUQABIbChdGRUFUVVJFX1BST1RPM19PUFRJT05BTBABEh0KGUZFQVRVUkVfU1VQUE9SVFNfRURJVElPTlMQAkJyChxjb20uZ29vZ2xlLnByb3RvYnVmLmNvbXBpbGVyQgxQbHVnaW5Qcm90b3NaKWdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL3BsdWdpbnBiqgIYR29vZ2xlLlByb3RvYnVmLkNvbXBpbGVy", [R]), n = /* @__PURE__ */ l(c, 0), d = /* @__PURE__ */ l(c, 1), v = /* @__PURE__ */ l(c, 2), B = /* @__PURE__ */ l(c, 2, 0);
6
+ var V;
7
+ (function(b) {
8
+ b[b.NONE = 0] = "NONE", b[b.PROTO3_OPTIONAL = 1] = "PROTO3_OPTIONAL", b[b.SUPPORTS_EDITIONS = 2] = "SUPPORTS_EDITIONS";
9
+ })(V || (V = {}));
10
+ const y = /* @__PURE__ */ Z(c, 2, 0);
11
+ export {
12
+ d as CodeGeneratorRequestSchema,
13
+ v as CodeGeneratorResponseSchema,
14
+ V as CodeGeneratorResponse_Feature,
15
+ y as CodeGeneratorResponse_FeatureSchema,
16
+ B as CodeGeneratorResponse_FileSchema,
17
+ n as VersionSchema,
18
+ c as file_google_protobuf_compiler_plugin
19
+ };