web-core-tcm 0.0.24 → 0.0.26

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 (209) hide show
  1. package/dist/favicon.ico +0 -0
  2. package/dist/icons/favicon-128x128.png +0 -0
  3. package/dist/icons/favicon-16x16.png +0 -0
  4. package/dist/icons/favicon-32x32.png +0 -0
  5. package/dist/icons/favicon-96x96.png +0 -0
  6. package/dist/node_modules/@alova/shared/dist/alova-shared.esm.js +134 -0
  7. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +70 -0
  8. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +14 -0
  9. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +6 -0
  10. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +10 -0
  11. package/dist/node_modules/@bufbuild/protobuf/dist/esm/create.js +136 -0
  12. package/dist/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +7 -0
  13. package/dist/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +164 -0
  14. package/dist/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +6 -0
  15. package/dist/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +75 -0
  16. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +8 -0
  17. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +35 -0
  18. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +42 -0
  19. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +17 -0
  20. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +156 -0
  21. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +349 -0
  22. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +39 -0
  23. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +72 -0
  24. package/dist/node_modules/@bufbuild/protobuf/dist/esm/registry.js +551 -0
  25. package/dist/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +159 -0
  26. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +58 -0
  27. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +350 -0
  28. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +25 -0
  29. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +145 -0
  30. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +110 -0
  31. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +107 -0
  32. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +24 -0
  33. package/dist/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +556 -0
  34. package/dist/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +36 -0
  35. package/dist/node_modules/@vue/shared/dist/shared.esm-bundler.js +26 -0
  36. package/dist/node_modules/alova/dist/adapter/fetch.esm.js +55 -0
  37. package/dist/node_modules/alova/dist/alova.esm.js +414 -0
  38. package/dist/node_modules/alova/dist/clienthook/index.esm.js +89 -0
  39. package/dist/node_modules/builder-pattern/dist/index.js +22 -0
  40. package/dist/node_modules/jwt-decode/build/esm/index.js +52 -0
  41. package/dist/node_modules/pinyin/lib/esm/pinyin.js +242260 -0
  42. package/dist/node_modules/punycode/punycode.es6.js +139 -0
  43. package/dist/node_modules/quasar/src/composables/use-quasar/use-quasar.js +8 -0
  44. package/dist/node_modules/quasar/src/utils/private.symbols/symbols.js +4 -0
  45. package/dist/src/api/algorithm/comprehensiveAlgorithm.d.ts +4 -0
  46. package/dist/src/api/algorithm/comprehensiveAlgorithm.js +16 -0
  47. package/dist/src/api/algorithm/index.d.ts +10 -0
  48. package/dist/src/api/algorithm/index.js +62 -0
  49. package/dist/src/api/algorithm/inquiriesAlgorithm.d.ts +13 -0
  50. package/dist/src/api/algorithm/inquiriesAlgorithm.js +9 -0
  51. package/dist/src/api/algorithm/inspectionsAlgorithm.d.ts +2 -0
  52. package/dist/src/api/algorithm/inspectionsAlgorithm.js +10 -0
  53. package/dist/src/api/algorithm/lisemsAlgorithm.d.ts +2 -0
  54. package/dist/src/api/algorithm/lisemsAlgorithm.js +15 -0
  55. package/dist/src/api/algorithm/pulsationsAlgorithm.d.ts +4 -0
  56. package/dist/src/api/algorithm/pulsationsAlgorithm.js +8 -0
  57. package/dist/src/api/authorization/alova/apiDefinitions.d.ts +21 -0
  58. package/dist/src/api/authorization/alova/apiDefinitions.js +9 -0
  59. package/dist/src/api/authorization/alova/createApis.d.ts +10 -0
  60. package/dist/src/api/authorization/alova/createApis.js +51 -0
  61. package/dist/src/api/authorization/alova/implement/authorization.d.ts +4 -0
  62. package/dist/src/api/authorization/alova/implement/authorization.js +15 -0
  63. package/dist/src/api/authorization/alova/implement/index.d.ts +1 -0
  64. package/dist/src/api/authorization/alova/index.d.ts +5 -0
  65. package/dist/src/api/authorization/alova/index.js +18 -0
  66. package/dist/src/api/authorization/authorization.d.ts +8 -0
  67. package/dist/src/api/authorization/authorization.js +16 -0
  68. package/dist/src/api/authorization/index.d.ts +2 -0
  69. package/dist/src/api/authorization/index.js +9 -0
  70. package/dist/src/api/check/alova/apiDefinitions.d.ts +28 -0
  71. package/dist/src/api/check/alova/apiDefinitions.js +16 -0
  72. package/dist/src/api/check/alova/createApis.d.ts +10 -0
  73. package/dist/src/api/check/alova/createApis.js +51 -0
  74. package/dist/src/api/check/alova/implement/check.d.ts +27 -0
  75. package/dist/src/api/check/alova/implement/check.js +119 -0
  76. package/dist/src/api/check/alova/implement/index.d.ts +1 -0
  77. package/dist/src/api/check/alova/index.d.ts +5 -0
  78. package/dist/src/api/check/alova/index.js +21 -0
  79. package/dist/src/api/check/check.d.ts +54 -0
  80. package/dist/src/api/check/check.js +131 -0
  81. package/dist/src/api/check/index.d.ts +2 -0
  82. package/dist/src/api/check/index.js +11 -0
  83. package/dist/src/api/config/alova/index.d.ts +5 -0
  84. package/dist/src/api/config/alova/index.js +55 -0
  85. package/dist/src/api/config/index.d.ts +23 -0
  86. package/dist/src/api/config/index.js +106 -0
  87. package/dist/src/api/device/device.d.ts +5 -0
  88. package/dist/src/api/device/device.js +46 -0
  89. package/dist/src/api/doctor/alova/apiDefinitions.d.ts +26 -0
  90. package/dist/src/api/doctor/alova/apiDefinitions.js +14 -0
  91. package/dist/src/api/doctor/alova/createApis.d.ts +10 -0
  92. package/dist/src/api/doctor/alova/createApis.js +51 -0
  93. package/dist/src/api/doctor/alova/implement/doctor.d.ts +7 -0
  94. package/dist/src/api/doctor/alova/implement/doctor.js +42 -0
  95. package/dist/src/api/doctor/alova/implement/index.d.ts +1 -0
  96. package/dist/src/api/doctor/alova/index.d.ts +5 -0
  97. package/dist/src/api/doctor/alova/index.js +20 -0
  98. package/dist/src/api/doctor/doctor.d.ts +22 -0
  99. package/dist/src/api/doctor/doctor.js +29 -0
  100. package/dist/src/api/doctor/index.d.ts +2 -0
  101. package/dist/src/api/doctor/index.js +9 -0
  102. package/dist/src/api/index.d.ts +12 -0
  103. package/dist/src/api/metric/implement/index.d.ts +1 -0
  104. package/dist/src/api/metric/implement/metric.d.ts +24 -0
  105. package/dist/src/api/metric/implement/metric.js +80 -0
  106. package/dist/src/api/metric/index.d.ts +2 -0
  107. package/dist/src/api/metric/index.js +6 -0
  108. package/dist/src/api/metric/metric.d.ts +28 -0
  109. package/dist/src/api/metric/metric.js +75 -0
  110. package/dist/src/api/oauth/alova/apiDefinitions.d.ts +24 -0
  111. package/dist/src/api/oauth/alova/apiDefinitions.js +12 -0
  112. package/dist/src/api/oauth/alova/createApis.d.ts +10 -0
  113. package/dist/src/api/oauth/alova/createApis.js +51 -0
  114. package/dist/src/api/oauth/alova/implement/index.d.ts +1 -0
  115. package/dist/src/api/oauth/alova/implement/oauth.d.ts +4 -0
  116. package/dist/src/api/oauth/alova/implement/oauth.js +15 -0
  117. package/dist/src/api/oauth/alova/index.d.ts +5 -0
  118. package/dist/src/api/oauth/alova/index.js +17 -0
  119. package/dist/src/api/oauth/index.d.ts +2 -0
  120. package/dist/src/api/oauth/index.js +9 -0
  121. package/dist/src/api/oauth/oauth.d.ts +7 -0
  122. package/dist/src/api/oauth/oauth.js +16 -0
  123. package/dist/src/api/outpatient/alova/apiDefinitions.d.ts +25 -0
  124. package/dist/src/api/outpatient/alova/apiDefinitions.js +13 -0
  125. package/dist/src/api/outpatient/alova/createApis.d.ts +10 -0
  126. package/dist/src/api/outpatient/alova/createApis.js +51 -0
  127. package/dist/src/api/outpatient/alova/implement/index.d.ts +1 -0
  128. package/dist/src/api/outpatient/alova/implement/outpatient.d.ts +10 -0
  129. package/dist/src/api/outpatient/alova/implement/outpatient.js +71 -0
  130. package/dist/src/api/outpatient/alova/index.d.ts +5 -0
  131. package/dist/src/api/outpatient/alova/index.js +21 -0
  132. package/dist/src/api/outpatient/index.d.ts +2 -0
  133. package/dist/src/api/outpatient/index.js +11 -0
  134. package/dist/src/api/outpatient/outpatient.d.ts +39 -0
  135. package/dist/src/api/outpatient/outpatient.js +45 -0
  136. package/dist/src/api/patient/alova/apiDefinitions.d.ts +39 -0
  137. package/dist/src/api/patient/alova/apiDefinitions.js +27 -0
  138. package/dist/src/api/patient/alova/createApis.d.ts +10 -0
  139. package/dist/src/api/patient/alova/createApis.js +51 -0
  140. package/dist/src/api/patient/alova/implement/index.d.ts +2 -0
  141. package/dist/src/api/patient/alova/implement/meta.d.ts +113 -0
  142. package/dist/src/api/patient/alova/implement/meta.js +404 -0
  143. package/dist/src/api/patient/alova/implement/patient.d.ts +22 -0
  144. package/dist/src/api/patient/alova/implement/patient.js +72 -0
  145. package/dist/src/api/patient/alova/index.d.ts +5 -0
  146. package/dist/src/api/patient/alova/index.js +22 -0
  147. package/dist/src/api/patient/core.d.ts +50 -0
  148. package/dist/src/api/patient/core.js +109 -0
  149. package/dist/src/api/patient/index.d.ts +4 -0
  150. package/dist/src/api/patient/index.js +46 -0
  151. package/dist/src/api/patient/meta.d.ts +238 -0
  152. package/dist/src/api/patient/meta.js +454 -0
  153. package/dist/src/api/patient/patient.d.ts +43 -0
  154. package/dist/src/api/patient/patient.js +42 -0
  155. package/dist/src/api/prescription/alova/apiDefinitions.d.ts +27 -0
  156. package/dist/src/api/prescription/alova/apiDefinitions.js +15 -0
  157. package/dist/src/api/prescription/alova/createApis.d.ts +10 -0
  158. package/dist/src/api/prescription/alova/createApis.js +51 -0
  159. package/dist/src/api/prescription/alova/implement/herbal.d.ts +15 -0
  160. package/dist/src/api/prescription/alova/implement/herbal.js +54 -0
  161. package/dist/src/api/prescription/alova/implement/index.d.ts +2 -0
  162. package/dist/src/api/prescription/alova/implement/prescription.d.ts +15 -0
  163. package/dist/src/api/prescription/alova/implement/prescription.js +49 -0
  164. package/dist/src/api/prescription/alova/index.d.ts +5 -0
  165. package/dist/src/api/prescription/alova/index.js +20 -0
  166. package/dist/src/api/prescription/herbal.d.ts +19 -0
  167. package/dist/src/api/prescription/herbal.js +34 -0
  168. package/dist/src/api/prescription/index.d.ts +3 -0
  169. package/dist/src/api/prescription/index.js +13 -0
  170. package/dist/src/api/prescription/prescription.d.ts +26 -0
  171. package/dist/src/api/prescription/prescription.js +49 -0
  172. package/dist/src/api/scientist/alova/apiDefinitions.d.ts +25 -0
  173. package/dist/src/api/scientist/alova/apiDefinitions.js +13 -0
  174. package/dist/src/api/scientist/alova/createApis.d.ts +10 -0
  175. package/dist/src/api/scientist/alova/createApis.js +51 -0
  176. package/dist/src/api/scientist/alova/implement/index.d.ts +1 -0
  177. package/dist/src/api/scientist/alova/implement/scientist.d.ts +6 -0
  178. package/dist/src/api/scientist/alova/implement/scientist.js +35 -0
  179. package/dist/src/api/scientist/alova/index.d.ts +6 -0
  180. package/dist/src/api/scientist/alova/index.js +21 -0
  181. package/dist/src/api/scientist/index.d.ts +2 -0
  182. package/dist/src/api/scientist/index.js +9 -0
  183. package/dist/src/api/scientist/scientist.d.ts +20 -0
  184. package/dist/src/api/scientist/scientist.js +37 -0
  185. package/dist/src/components/models.d.ts +7 -0
  186. package/dist/src/index.d.ts +3 -0
  187. package/dist/src/index.js +36 -0
  188. package/dist/src/pages/LoginPage.vue.d.ts +2 -0
  189. package/dist/src/proto/index.d.ts +2 -0
  190. package/dist/src/proto/types/Images_pb.d.ts +34 -0
  191. package/dist/src/proto/types/Images_pb.js +10 -0
  192. package/dist/src/proto/types/WaveMap_pb.d.ts +48 -0
  193. package/dist/src/proto/types/WaveMap_pb.js +10 -0
  194. package/dist/src/router/index.d.ts +2 -0
  195. package/dist/src/router/routes.d.ts +3 -0
  196. package/dist/src/util/RichTextUtil.d.ts +1 -0
  197. package/dist/src/util/RichTextUtil.js +6 -0
  198. package/dist/src/util/datetime.d.ts +5 -0
  199. package/dist/src/util/export.d.ts +4 -0
  200. package/dist/src/util/helper.d.ts +65 -0
  201. package/dist/src/util/helper.js +46 -0
  202. package/dist/src/util/image.d.ts +2 -0
  203. package/dist/src/util/image.js +17 -0
  204. package/dist/src/util/number.d.ts +12 -0
  205. package/dist/src/util/s256.d.ts +2 -0
  206. package/dist/src/util/secret.d.ts +10 -0
  207. package/dist/src/util/string.d.ts +21 -0
  208. package/dist/src/util/string.js +10 -0
  209. package/package.json +1 -1
@@ -0,0 +1,58 @@
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]) {
9
+ // @ts-ignore TS7029: Fallthrough case in switch -- ignore instead of expect-error for compiler settings without noFallthroughCasesInSwitch: true
10
+ case "=":
11
+ t = 0;
12
+ // reset state when padding found
13
+ case `
14
+ `:
15
+ case "\r":
16
+ case " ":
17
+ case " ":
18
+ continue;
19
+ // skip white-space, and padding
20
+ default:
21
+ throw Error("invalid base64 string");
22
+ }
23
+ switch (t) {
24
+ case 0:
25
+ o = n, t = 1;
26
+ break;
27
+ case 1:
28
+ a[r++] = o << 2 | (n & 48) >> 4, o = n, t = 2;
29
+ break;
30
+ case 2:
31
+ a[r++] = (o & 15) << 4 | (n & 60) >> 2, o = n, t = 3;
32
+ break;
33
+ case 3:
34
+ a[r++] = (o & 3) << 6 | n, t = 0;
35
+ break;
36
+ }
37
+ }
38
+ if (t == 1)
39
+ throw Error("invalid base64 string");
40
+ return a.subarray(0, r);
41
+ }
42
+ let d, i;
43
+ function f(e) {
44
+ return d || (d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), d.slice(0, -2).concat("-", "_")), d;
45
+ }
46
+ 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("/");
53
+ }
54
+ return i;
55
+ }
56
+ export {
57
+ g as base64Decode
58
+ };
@@ -0,0 +1,350 @@
1
+ import { varint32write as c, varint64write as o, varint64read as b, varint32read as d } from "./varint.js";
2
+ import { protoInt64 as r } from "../proto-int64.js";
3
+ import { getTextEncoding as l } from "./text-encoding.js";
4
+ var h;
5
+ (function(e) {
6
+ e[e.Varint = 0] = "Varint", e[e.Bit64 = 1] = "Bit64", e[e.LengthDelimited = 2] = "LengthDelimited", e[e.StartGroup = 3] = "StartGroup", e[e.EndGroup = 4] = "EndGroup", e[e.Bit32 = 5] = "Bit32";
7
+ })(h || (h = {}));
8
+ const p = 34028234663852886e22, k = -34028234663852886e22, y = 4294967295, m = 2147483647, x = -2147483648;
9
+ class A {
10
+ constructor(t = l().encodeUtf8) {
11
+ this.encodeUtf8 = t, this.stack = [], this.chunks = [], this.buf = [];
12
+ }
13
+ /**
14
+ * Return all bytes written and reset this writer.
15
+ */
16
+ finish() {
17
+ this.buf.length && (this.chunks.push(new Uint8Array(this.buf)), this.buf = []);
18
+ let t = 0;
19
+ for (let n = 0; n < this.chunks.length; n++)
20
+ t += this.chunks[n].length;
21
+ let i = new Uint8Array(t), s = 0;
22
+ for (let n = 0; n < this.chunks.length; n++)
23
+ i.set(this.chunks[n], s), s += this.chunks[n].length;
24
+ return this.chunks = [], i;
25
+ }
26
+ /**
27
+ * Start a new fork for length-delimited data like a message
28
+ * or a packed repeated field.
29
+ *
30
+ * Must be joined later with `join()`.
31
+ */
32
+ fork() {
33
+ return this.stack.push({ chunks: this.chunks, buf: this.buf }), this.chunks = [], this.buf = [], this;
34
+ }
35
+ /**
36
+ * Join the last fork. Write its length and bytes, then
37
+ * return to the previous state.
38
+ */
39
+ join() {
40
+ let t = this.finish(), i = this.stack.pop();
41
+ if (!i)
42
+ throw new Error("invalid state, fork stack empty");
43
+ return this.chunks = i.chunks, this.buf = i.buf, this.uint32(t.byteLength), this.raw(t);
44
+ }
45
+ /**
46
+ * Writes a tag (field number and wire type).
47
+ *
48
+ * Equivalent to `uint32( (fieldNo << 3 | type) >>> 0 )`.
49
+ *
50
+ * Generated code should compute the tag ahead of time and call `uint32()`.
51
+ */
52
+ tag(t, i) {
53
+ return this.uint32((t << 3 | i) >>> 0);
54
+ }
55
+ /**
56
+ * Write a chunk of raw bytes.
57
+ */
58
+ raw(t) {
59
+ return this.buf.length && (this.chunks.push(new Uint8Array(this.buf)), this.buf = []), this.chunks.push(t), this;
60
+ }
61
+ /**
62
+ * Write a `uint32` value, an unsigned 32 bit varint.
63
+ */
64
+ uint32(t) {
65
+ for (w(t); t > 127; )
66
+ this.buf.push(t & 127 | 128), t = t >>> 7;
67
+ return this.buf.push(t), this;
68
+ }
69
+ /**
70
+ * Write a `int32` value, a signed 32 bit varint.
71
+ */
72
+ int32(t) {
73
+ return f(t), c(t, this.buf), this;
74
+ }
75
+ /**
76
+ * Write a `bool` value, a variant.
77
+ */
78
+ bool(t) {
79
+ return this.buf.push(t ? 1 : 0), this;
80
+ }
81
+ /**
82
+ * Write a `bytes` value, length-delimited arbitrary data.
83
+ */
84
+ bytes(t) {
85
+ return this.uint32(t.byteLength), this.raw(t);
86
+ }
87
+ /**
88
+ * Write a `string` value, length-delimited data converted to UTF-8 text.
89
+ */
90
+ string(t) {
91
+ let i = this.encodeUtf8(t);
92
+ return this.uint32(i.byteLength), this.raw(i);
93
+ }
94
+ /**
95
+ * Write a `float` value, 32-bit floating point number.
96
+ */
97
+ float(t) {
98
+ E(t);
99
+ let i = new Uint8Array(4);
100
+ return new DataView(i.buffer).setFloat32(0, t, !0), this.raw(i);
101
+ }
102
+ /**
103
+ * Write a `double` value, a 64-bit floating point number.
104
+ */
105
+ double(t) {
106
+ let i = new Uint8Array(8);
107
+ return new DataView(i.buffer).setFloat64(0, t, !0), this.raw(i);
108
+ }
109
+ /**
110
+ * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
111
+ */
112
+ fixed32(t) {
113
+ w(t);
114
+ let i = new Uint8Array(4);
115
+ return new DataView(i.buffer).setUint32(0, t, !0), this.raw(i);
116
+ }
117
+ /**
118
+ * Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
119
+ */
120
+ sfixed32(t) {
121
+ f(t);
122
+ let i = new Uint8Array(4);
123
+ return new DataView(i.buffer).setInt32(0, t, !0), this.raw(i);
124
+ }
125
+ /**
126
+ * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
127
+ */
128
+ sint32(t) {
129
+ return f(t), t = (t << 1 ^ t >> 31) >>> 0, c(t, this.buf), this;
130
+ }
131
+ /**
132
+ * Write a `fixed64` value, a signed, fixed-length 64-bit integer.
133
+ */
134
+ sfixed64(t) {
135
+ let i = new Uint8Array(8), s = new DataView(i.buffer), n = r.enc(t);
136
+ return s.setInt32(0, n.lo, !0), s.setInt32(4, n.hi, !0), this.raw(i);
137
+ }
138
+ /**
139
+ * Write a `fixed64` value, an unsigned, fixed-length 64 bit integer.
140
+ */
141
+ fixed64(t) {
142
+ let i = new Uint8Array(8), s = new DataView(i.buffer), n = r.uEnc(t);
143
+ return s.setInt32(0, n.lo, !0), s.setInt32(4, n.hi, !0), this.raw(i);
144
+ }
145
+ /**
146
+ * Write a `int64` value, a signed 64-bit varint.
147
+ */
148
+ int64(t) {
149
+ let i = r.enc(t);
150
+ return o(i.lo, i.hi, this.buf), this;
151
+ }
152
+ /**
153
+ * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
154
+ */
155
+ sint64(t) {
156
+ const i = r.enc(t), s = i.hi >> 31, n = i.lo << 1 ^ s, u = (i.hi << 1 | i.lo >>> 31) ^ s;
157
+ return o(n, u, this.buf), this;
158
+ }
159
+ /**
160
+ * Write a `uint64` value, an unsigned 64-bit varint.
161
+ */
162
+ uint64(t) {
163
+ const i = r.uEnc(t);
164
+ return o(i.lo, i.hi, this.buf), this;
165
+ }
166
+ }
167
+ class v {
168
+ constructor(t, i = l().decodeUtf8) {
169
+ this.decodeUtf8 = i, this.varint64 = b, this.uint32 = d, this.buf = t, this.len = t.length, this.pos = 0, this.view = new DataView(t.buffer, t.byteOffset, t.byteLength);
170
+ }
171
+ /**
172
+ * Reads a tag - field number and wire type.
173
+ */
174
+ tag() {
175
+ let t = this.uint32(), i = t >>> 3, s = t & 7;
176
+ if (i <= 0 || s < 0 || s > 5)
177
+ throw new Error("illegal tag: field no " + i + " wire type " + s);
178
+ return [i, s];
179
+ }
180
+ /**
181
+ * Skip one element and return the skipped data.
182
+ *
183
+ * When skipping StartGroup, provide the tags field number to check for
184
+ * matching field number in the EndGroup tag.
185
+ */
186
+ skip(t, i) {
187
+ let s = this.pos;
188
+ switch (t) {
189
+ case h.Varint:
190
+ for (; this.buf[this.pos++] & 128; )
191
+ ;
192
+ break;
193
+ // @ts-ignore TS7029: Fallthrough case in switch -- ignore instead of expect-error for compiler settings without noFallthroughCasesInSwitch: true
194
+ case h.Bit64:
195
+ this.pos += 4;
196
+ case h.Bit32:
197
+ this.pos += 4;
198
+ break;
199
+ case h.LengthDelimited:
200
+ let n = this.uint32();
201
+ this.pos += n;
202
+ break;
203
+ case h.StartGroup:
204
+ for (; ; ) {
205
+ const [u, a] = this.tag();
206
+ if (a === h.EndGroup) {
207
+ if (i !== void 0 && u !== i)
208
+ throw new Error("invalid end group tag");
209
+ break;
210
+ }
211
+ this.skip(a, u);
212
+ }
213
+ break;
214
+ default:
215
+ throw new Error("cant skip wire type " + t);
216
+ }
217
+ return this.assertBounds(), this.buf.subarray(s, this.pos);
218
+ }
219
+ /**
220
+ * Throws error if position in byte array is out of range.
221
+ */
222
+ assertBounds() {
223
+ if (this.pos > this.len)
224
+ throw new RangeError("premature EOF");
225
+ }
226
+ /**
227
+ * Read a `int32` field, a signed 32 bit varint.
228
+ */
229
+ int32() {
230
+ return this.uint32() | 0;
231
+ }
232
+ /**
233
+ * Read a `sint32` field, a signed, zigzag-encoded 32-bit varint.
234
+ */
235
+ sint32() {
236
+ let t = this.uint32();
237
+ return t >>> 1 ^ -(t & 1);
238
+ }
239
+ /**
240
+ * Read a `int64` field, a signed 64-bit varint.
241
+ */
242
+ int64() {
243
+ return r.dec(...this.varint64());
244
+ }
245
+ /**
246
+ * Read a `uint64` field, an unsigned 64-bit varint.
247
+ */
248
+ uint64() {
249
+ return r.uDec(...this.varint64());
250
+ }
251
+ /**
252
+ * Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint.
253
+ */
254
+ sint64() {
255
+ let [t, i] = this.varint64(), s = -(t & 1);
256
+ return t = (t >>> 1 | (i & 1) << 31) ^ s, i = i >>> 1 ^ s, r.dec(t, i);
257
+ }
258
+ /**
259
+ * Read a `bool` field, a variant.
260
+ */
261
+ bool() {
262
+ let [t, i] = this.varint64();
263
+ return t !== 0 || i !== 0;
264
+ }
265
+ /**
266
+ * Read a `fixed32` field, an unsigned, fixed-length 32-bit integer.
267
+ */
268
+ fixed32() {
269
+ return this.view.getUint32((this.pos += 4) - 4, !0);
270
+ }
271
+ /**
272
+ * Read a `sfixed32` field, a signed, fixed-length 32-bit integer.
273
+ */
274
+ sfixed32() {
275
+ return this.view.getInt32((this.pos += 4) - 4, !0);
276
+ }
277
+ /**
278
+ * Read a `fixed64` field, an unsigned, fixed-length 64 bit integer.
279
+ */
280
+ fixed64() {
281
+ return r.uDec(this.sfixed32(), this.sfixed32());
282
+ }
283
+ /**
284
+ * Read a `fixed64` field, a signed, fixed-length 64-bit integer.
285
+ */
286
+ sfixed64() {
287
+ return r.dec(this.sfixed32(), this.sfixed32());
288
+ }
289
+ /**
290
+ * Read a `float` field, 32-bit floating point number.
291
+ */
292
+ float() {
293
+ return this.view.getFloat32((this.pos += 4) - 4, !0);
294
+ }
295
+ /**
296
+ * Read a `double` field, a 64-bit floating point number.
297
+ */
298
+ double() {
299
+ return this.view.getFloat64((this.pos += 8) - 8, !0);
300
+ }
301
+ /**
302
+ * Read a `bytes` field, length-delimited arbitrary data.
303
+ */
304
+ bytes() {
305
+ let t = this.uint32(), i = this.pos;
306
+ return this.pos += t, this.assertBounds(), this.buf.subarray(i, i + t);
307
+ }
308
+ /**
309
+ * Read a `string` field, length-delimited data converted to UTF-8 text.
310
+ */
311
+ string() {
312
+ return this.decodeUtf8(this.bytes());
313
+ }
314
+ }
315
+ function f(e) {
316
+ if (typeof e == "string")
317
+ e = Number(e);
318
+ else if (typeof e != "number")
319
+ throw new Error("invalid int32: " + typeof e);
320
+ if (!Number.isInteger(e) || e > m || e < x)
321
+ throw new Error("invalid int32: " + e);
322
+ }
323
+ function w(e) {
324
+ if (typeof e == "string")
325
+ e = Number(e);
326
+ else if (typeof e != "number")
327
+ throw new Error("invalid uint32: " + typeof e);
328
+ if (!Number.isInteger(e) || e > y || e < 0)
329
+ throw new Error("invalid uint32: " + e);
330
+ }
331
+ function E(e) {
332
+ if (typeof e == "string") {
333
+ const t = e;
334
+ if (e = Number(e), Number.isNaN(e) && t !== "NaN")
335
+ throw new Error("invalid float32: " + t);
336
+ } else if (typeof e != "number")
337
+ throw new Error("invalid float32: " + typeof e);
338
+ if (Number.isFinite(e) && (e > p || e < k))
339
+ throw new Error("invalid float32: " + e);
340
+ }
341
+ export {
342
+ v as BinaryReader,
343
+ A as BinaryWriter,
344
+ p as FLOAT32_MAX,
345
+ k as FLOAT32_MIN,
346
+ m as INT32_MAX,
347
+ x as INT32_MIN,
348
+ y as UINT32_MAX,
349
+ h as WireType
350
+ };
@@ -0,0 +1,25 @@
1
+ const o = Symbol.for("@bufbuild/protobuf/text-encoding");
2
+ function r() {
3
+ if (globalThis[o] == null) {
4
+ const t = new globalThis.TextEncoder(), n = new globalThis.TextDecoder();
5
+ globalThis[o] = {
6
+ encodeUtf8(e) {
7
+ return t.encode(e);
8
+ },
9
+ decodeUtf8(e) {
10
+ return n.decode(e);
11
+ },
12
+ checkUtf8(e) {
13
+ try {
14
+ return encodeURIComponent(e), !0;
15
+ } catch {
16
+ return !1;
17
+ }
18
+ }
19
+ };
20
+ }
21
+ return globalThis[o];
22
+ }
23
+ export {
24
+ r as getTextEncoding
25
+ };
@@ -0,0 +1,145 @@
1
+ import { ScalarType as s } from "../descriptors.js";
2
+ import { protoInt64 as f } from "../proto-int64.js";
3
+ function p(u, e) {
4
+ const t = u.values.find((r) => r.name === e);
5
+ if (!t)
6
+ throw new Error(`cannot parse ${u} default value: ${e}`);
7
+ return t.number;
8
+ }
9
+ function I(u, e) {
10
+ switch (u) {
11
+ case s.STRING:
12
+ return e;
13
+ case s.BYTES: {
14
+ const t = o(e);
15
+ if (t === !1)
16
+ throw new Error(`cannot parse ${s[u]} default value: ${e}`);
17
+ return t;
18
+ }
19
+ case s.INT64:
20
+ case s.SFIXED64:
21
+ case s.SINT64:
22
+ return f.parse(e);
23
+ case s.UINT64:
24
+ case s.FIXED64:
25
+ return f.uParse(e);
26
+ case s.DOUBLE:
27
+ case s.FLOAT:
28
+ switch (e) {
29
+ case "inf":
30
+ return Number.POSITIVE_INFINITY;
31
+ case "-inf":
32
+ return Number.NEGATIVE_INFINITY;
33
+ case "nan":
34
+ return Number.NaN;
35
+ default:
36
+ return parseFloat(e);
37
+ }
38
+ case s.BOOL:
39
+ return e === "true";
40
+ case s.INT32:
41
+ case s.UINT32:
42
+ case s.SINT32:
43
+ case s.FIXED32:
44
+ case s.SFIXED32:
45
+ return parseInt(e, 10);
46
+ }
47
+ }
48
+ function o(u) {
49
+ const e = [], t = {
50
+ tail: u,
51
+ c: "",
52
+ next() {
53
+ return this.tail.length == 0 ? !1 : (this.c = this.tail[0], this.tail = this.tail.substring(1), !0);
54
+ },
55
+ take(r) {
56
+ if (this.tail.length >= r) {
57
+ const n = this.tail.substring(0, r);
58
+ return this.tail = this.tail.substring(r), n;
59
+ }
60
+ return !1;
61
+ }
62
+ };
63
+ for (; t.next(); )
64
+ switch (t.c) {
65
+ case "\\":
66
+ if (t.next())
67
+ switch (t.c) {
68
+ case "\\":
69
+ e.push(t.c.charCodeAt(0));
70
+ break;
71
+ case "b":
72
+ e.push(8);
73
+ break;
74
+ case "f":
75
+ e.push(12);
76
+ break;
77
+ case "n":
78
+ e.push(10);
79
+ break;
80
+ case "r":
81
+ e.push(13);
82
+ break;
83
+ case "t":
84
+ e.push(9);
85
+ break;
86
+ case "v":
87
+ e.push(11);
88
+ break;
89
+ case "0":
90
+ case "1":
91
+ case "2":
92
+ case "3":
93
+ case "4":
94
+ case "5":
95
+ case "6":
96
+ case "7": {
97
+ const r = t.c, n = t.take(2);
98
+ if (n === !1)
99
+ return !1;
100
+ const c = parseInt(r + n, 8);
101
+ if (Number.isNaN(c))
102
+ return !1;
103
+ e.push(c);
104
+ break;
105
+ }
106
+ case "x": {
107
+ const r = t.c, n = t.take(2);
108
+ if (n === !1)
109
+ return !1;
110
+ const c = parseInt(r + n, 16);
111
+ if (Number.isNaN(c))
112
+ return !1;
113
+ e.push(c);
114
+ break;
115
+ }
116
+ case "u": {
117
+ const r = t.c, n = t.take(4);
118
+ if (n === !1)
119
+ return !1;
120
+ const c = parseInt(r + n, 16);
121
+ if (Number.isNaN(c))
122
+ return !1;
123
+ const a = new Uint8Array(4);
124
+ new DataView(a.buffer).setInt32(0, c, !0), e.push(a[0], a[1], a[2], a[3]);
125
+ break;
126
+ }
127
+ case "U": {
128
+ const r = t.c, n = t.take(8);
129
+ if (n === !1)
130
+ return !1;
131
+ const c = f.uEnc(r + n), a = new Uint8Array(8), i = new DataView(a.buffer);
132
+ i.setInt32(0, c.lo, !0), i.setInt32(4, c.hi, !0), e.push(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7]);
133
+ break;
134
+ }
135
+ }
136
+ break;
137
+ default:
138
+ e.push(t.c.charCodeAt(0));
139
+ }
140
+ return new Uint8Array(e);
141
+ }
142
+ export {
143
+ p as parseTextFormatEnumValue,
144
+ I as parseTextFormatScalarValue
145
+ };
@@ -0,0 +1,110 @@
1
+ function p() {
2
+ let t = 0, i = 0;
3
+ for (let n = 0; n < 28; n += 7) {
4
+ let f = this.buf[this.pos++];
5
+ if (t |= (f & 127) << n, (f & 128) == 0)
6
+ return this.assertBounds(), [t, i];
7
+ }
8
+ let s = this.buf[this.pos++];
9
+ if (t |= (s & 15) << 28, i = (s & 112) >> 4, (s & 128) == 0)
10
+ return this.assertBounds(), [t, i];
11
+ for (let n = 3; n <= 31; n += 7) {
12
+ let f = this.buf[this.pos++];
13
+ if (i |= (f & 127) << n, (f & 128) == 0)
14
+ return this.assertBounds(), [t, i];
15
+ }
16
+ throw new Error("invalid varint");
17
+ }
18
+ function g(t, i, s) {
19
+ for (let r = 0; r < 28; r = r + 7) {
20
+ const e = t >>> r, u = !(!(e >>> 7) && i == 0), o = (u ? e | 128 : e) & 255;
21
+ if (s.push(o), !u)
22
+ return;
23
+ }
24
+ const n = t >>> 28 & 15 | (i & 7) << 4, f = i >> 3 != 0;
25
+ if (s.push((f ? n | 128 : n) & 255), !!f) {
26
+ for (let r = 3; r < 31; r = r + 7) {
27
+ const e = i >>> r, u = !!(e >>> 7), o = (u ? e | 128 : e) & 255;
28
+ if (s.push(o), !u)
29
+ return;
30
+ }
31
+ s.push(i >>> 31 & 1);
32
+ }
33
+ }
34
+ const h = 4294967296;
35
+ function B(t) {
36
+ const i = t[0] === "-";
37
+ i && (t = t.slice(1));
38
+ const s = 1e6;
39
+ let n = 0, f = 0;
40
+ function r(e, u) {
41
+ const o = Number(t.slice(e, u));
42
+ f *= s, n = n * s + o, n >= h && (f = f + (n / h | 0), n = n % h);
43
+ }
44
+ return r(-24, -18), r(-18, -12), r(-12, -6), r(-6), i ? l(n, f) : x(n, f);
45
+ }
46
+ function b(t, i) {
47
+ let s = x(t, i);
48
+ const n = s.hi & 2147483648;
49
+ n && (s = l(s.lo, s.hi));
50
+ const f = a(s.lo, s.hi);
51
+ return n ? "-" + f : f;
52
+ }
53
+ function a(t, i) {
54
+ if ({ lo: t, hi: i } = d(t, i), i <= 2097151)
55
+ return String(h * i + t);
56
+ const s = t & 16777215, n = (t >>> 24 | i << 8) & 16777215, f = i >> 16 & 65535;
57
+ let r = s + n * 6777216 + f * 6710656, e = n + f * 8147497, u = f * 2;
58
+ const o = 1e7;
59
+ return r >= o && (e += Math.floor(r / o), r %= o), e >= o && (u += Math.floor(e / o), e %= o), u.toString() + c(e) + c(r);
60
+ }
61
+ function d(t, i) {
62
+ return { lo: t >>> 0, hi: i >>> 0 };
63
+ }
64
+ function x(t, i) {
65
+ return { lo: t | 0, hi: i | 0 };
66
+ }
67
+ function l(t, i) {
68
+ return i = ~i, t ? t = ~t + 1 : i += 1, x(t, i);
69
+ }
70
+ const c = (t) => {
71
+ const i = String(t);
72
+ return "0000000".slice(i.length) + i;
73
+ };
74
+ function w(t, i) {
75
+ if (t >= 0) {
76
+ for (; t > 127; )
77
+ i.push(t & 127 | 128), t = t >>> 7;
78
+ i.push(t);
79
+ } else {
80
+ for (let s = 0; s < 9; s++)
81
+ i.push(t & 127 | 128), t = t >> 7;
82
+ i.push(1);
83
+ }
84
+ }
85
+ function m() {
86
+ let t = this.buf[this.pos++], i = t & 127;
87
+ if ((t & 128) == 0)
88
+ return this.assertBounds(), i;
89
+ if (t = this.buf[this.pos++], i |= (t & 127) << 7, (t & 128) == 0)
90
+ return this.assertBounds(), i;
91
+ if (t = this.buf[this.pos++], i |= (t & 127) << 14, (t & 128) == 0)
92
+ return this.assertBounds(), i;
93
+ if (t = this.buf[this.pos++], i |= (t & 127) << 21, (t & 128) == 0)
94
+ return this.assertBounds(), i;
95
+ t = this.buf[this.pos++], i |= (t & 15) << 28;
96
+ for (let s = 5; (t & 128) !== 0 && s < 10; s++)
97
+ t = this.buf[this.pos++];
98
+ if ((t & 128) != 0)
99
+ throw new Error("invalid varint");
100
+ return this.assertBounds(), i >>> 0;
101
+ }
102
+ export {
103
+ B as int64FromString,
104
+ b as int64ToString,
105
+ a as uInt64ToString,
106
+ m as varint32read,
107
+ w as varint32write,
108
+ p as varint64read,
109
+ g as varint64write
110
+ };