@mmmbuto/qwen-code-termux 0.16.1-termux → 0.18.0-termux

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 (185) hide show
  1. package/README.md +79 -109
  2. package/bundled/new-app/SKILL.md +22 -0
  3. package/bundled/qc-helper/SKILL.md +29 -24
  4. package/bundled/qc-helper/docs/_meta.ts +1 -0
  5. package/bundled/qc-helper/docs/configuration/_meta.ts +0 -3
  6. package/bundled/qc-helper/docs/configuration/settings.md +37 -31
  7. package/bundled/qc-helper/docs/configuration/themes.md +39 -0
  8. package/bundled/qc-helper/docs/features/_meta.ts +1 -3
  9. package/bundled/qc-helper/docs/features/approval-mode.md +35 -35
  10. package/bundled/qc-helper/docs/features/auto-mode.md +54 -9
  11. package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
  12. package/bundled/qc-helper/docs/features/channels/feishu.md +170 -0
  13. package/bundled/qc-helper/docs/features/commands.md +115 -35
  14. package/bundled/qc-helper/docs/features/followup-suggestions.md +2 -2
  15. package/bundled/qc-helper/docs/features/headless.md +32 -0
  16. package/bundled/qc-helper/docs/features/markdown-rendering.md +21 -1
  17. package/bundled/qc-helper/docs/features/memory.md +22 -5
  18. package/bundled/qc-helper/docs/features/scheduled-tasks.md +1 -1
  19. package/bundled/qc-helper/docs/features/status-line.md +168 -32
  20. package/bundled/qc-helper/docs/features/sub-agents.md +60 -0
  21. package/bundled/qc-helper/docs/features/worktree.md +345 -0
  22. package/bundled/qc-helper/docs/overview.md +4 -4
  23. package/bundled/qc-helper/docs/quickstart.md +4 -4
  24. package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +221 -0
  25. package/bundled/qc-helper/docs/qwen-serve.md +234 -24
  26. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +16 -0
  27. package/bundled/qc-helper/docs/support/Uninstall.md +19 -1
  28. package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
  29. package/bundled/simplify/SKILL.md +123 -0
  30. package/chunks/agent-IDS4HMOX.js +56 -0
  31. package/chunks/agent-headless-5Q2EUSPS.js +50 -0
  32. package/chunks/{anthropicContentGenerator-SSGKR6DO.js → anthropicContentGenerator-2HBRNQ3B.js} +52 -9
  33. package/chunks/{askUserQuestion-PJWUUXKN.js → askUserQuestion-75TDJVK2.js} +45 -3
  34. package/chunks/{ca-UZ7BANMN.js → ca-BARBRL6N.js} +89 -5
  35. package/chunks/{chunk-GGNTZ2NH.js → chunk-2Y5SYSD3.js} +368 -597
  36. package/chunks/{chunk-2LA2TREA.js → chunk-3AA2DK35.js} +1448 -207
  37. package/chunks/{chunk-I2V5WXHJ.js → chunk-3AUHFMSK.js} +80 -38
  38. package/chunks/chunk-3DHXZ6EV.js +241 -0
  39. package/chunks/{chunk-PR4T27R7.js → chunk-3HTIVKZE.js} +42 -8
  40. package/chunks/chunk-3HX5LZ6R.js +1798 -0
  41. package/chunks/chunk-3PJXIDKI.js +2517 -0
  42. package/chunks/{chunk-MYAKAFEC.js → chunk-55ZMG67I.js} +7451 -3517
  43. package/chunks/{chunk-66CXYE4B.js → chunk-5IFG2VC4.js} +293 -242
  44. package/chunks/chunk-64WXLC72.js +98 -0
  45. package/chunks/{chunk-C6WMLUNB.js → chunk-72LDN5PP.js} +1 -1
  46. package/chunks/{chunk-F23NCRJ2.js → chunk-A7B4ISQP.js} +1 -1
  47. package/chunks/chunk-B7HXHOHU.js +393 -0
  48. package/chunks/{chunk-XEGHDASV.js → chunk-D3RHSPAS.js} +435 -540
  49. package/chunks/{chunk-XKS5KBFJ.js → chunk-EYENRK4D.js} +694 -384
  50. package/chunks/chunk-H6BD2ELD.js +36 -0
  51. package/chunks/{chunk-XP27SJMH.js → chunk-HR7SV7AY.js} +79 -48
  52. package/chunks/{chunk-D5NTAHYL.js → chunk-IDX6COTE.js} +7 -2
  53. package/chunks/{chunk-SHT4VJWU.js → chunk-IWKSG2AR.js} +2 -2
  54. package/chunks/chunk-J37FGIOA.js +1623 -0
  55. package/chunks/chunk-J5MDQKJL.js +2230 -0
  56. package/chunks/{chunk-USE2VQ5P.js → chunk-JTQAQBTV.js} +21 -0
  57. package/chunks/{chunk-NCTLV2NB.js → chunk-KQJMQJPI.js} +1 -1
  58. package/chunks/{chunk-5FBA5XC2.js → chunk-KRIHGKNA.js} +1 -1
  59. package/chunks/chunk-LD2XBG6Z.js +102 -0
  60. package/chunks/{chunk-MAY32HXD.js → chunk-M6VTDSVR.js} +3 -1
  61. package/chunks/chunk-MRO43B25.js +30 -0
  62. package/chunks/{chunk-N4WOREMD.js → chunk-NVFMZBX2.js} +43 -3
  63. package/chunks/chunk-OHEGWO4L.js +264 -0
  64. package/chunks/{chunk-K6O2NBMF.js → chunk-OQ7NJIY7.js} +4604 -6397
  65. package/chunks/chunk-QQDPRDVW.js +25 -0
  66. package/chunks/{chunk-KXZ4TJB4.js → chunk-SEGYWKIH.js} +1 -1
  67. package/chunks/chunk-SKBPNJEW.js +45 -0
  68. package/chunks/{chunk-4AOCVI6J.js → chunk-SNGELLWX.js} +52 -6
  69. package/chunks/{chunk-3OCRHZA3.js → chunk-TD4OPI4T.js} +56742 -44104
  70. package/chunks/{chunk-DQ4QTG7E.js → chunk-VV4F63BD.js} +11 -11
  71. package/chunks/chunk-XBY7E2FX.js +605 -0
  72. package/chunks/{chunk-JKMBWLFB.js → chunk-YILFYI5W.js} +48 -26
  73. package/chunks/chunk-YOGAOMYB.js +159 -0
  74. package/chunks/{chunk-QWSRH265.js → chunk-Z2Z3GUXZ.js} +777 -776
  75. package/chunks/{chunk-SDHRQFOS.js → chunk-ZTZ4DDQE.js} +2 -2
  76. package/chunks/computer-use-W2TYQNEE.js +825 -0
  77. package/chunks/contextCommand-6FGX3A7J.js +52 -0
  78. package/chunks/{cron-create-3ZBBN7WB.js → cron-create-APL5LU6I.js} +3 -3
  79. package/chunks/{cron-delete-NAGKKIIG.js → cron-delete-4SBJSCN4.js} +3 -3
  80. package/chunks/{cron-list-PAGRXNAI.js → cron-list-2AMGOMVO.js} +3 -3
  81. package/chunks/{de-V4IE2OOZ.js → de-YGKK2BC4.js} +89 -5
  82. package/chunks/{devtools-TWVXEJQB.js → devtools-FM6GJPYG.js} +2 -1
  83. package/chunks/{dist-4L54HRX2.js → dist-4LXD6L6X.js} +24 -5
  84. package/chunks/dist-H6ONXVLG.js +94146 -0
  85. package/chunks/{dist-XKWIWPWQ.js → dist-KAZ3SEBX.js} +1083 -3856
  86. package/chunks/{dist-BXDUQ2QY.js → dist-PK7DFCAW.js} +1 -1
  87. package/chunks/{edit-NVO3FOAK.js → edit-ZCEZC264.js} +30 -22
  88. package/chunks/{en-HGJ2SPLM.js → en-DHGYHIHX.js} +127 -6
  89. package/chunks/{enter-worktree-UEBG4WFC.js → enter-worktree-BBHCFCHG.js} +30 -20
  90. package/chunks/enterPlanMode-3M6KTD3B.js +158 -0
  91. package/chunks/{exit-worktree-UZ3MAQZN.js → exit-worktree-73YPIEQO.js} +27 -19
  92. package/chunks/exitPlanMode-TYZM6BAE.js +703 -0
  93. package/chunks/{fr-CJULI7ZX.js → fr-JXBKPJKQ.js} +89 -5
  94. package/chunks/{geminiContentGenerator-3UZFXGNT.js → geminiContentGenerator-7N2V3VW2.js} +8 -6
  95. package/chunks/{getMachineId-bsd-JXOSIJV2.js → getMachineId-bsd-4CASPIU4.js} +4 -4
  96. package/chunks/{getMachineId-darwin-TE4QRR42.js → getMachineId-darwin-HPQPEMZR.js} +4 -4
  97. package/chunks/{getMachineId-linux-S3OL52XK.js → getMachineId-linux-AUARKYHL.js} +3 -3
  98. package/chunks/{getMachineId-unsupported-DWUSBAPX.js → getMachineId-unsupported-S32ZDA2T.js} +3 -3
  99. package/chunks/{getMachineId-win-AAC5P3AP.js → getMachineId-win-4EFLHYIJ.js} +4 -4
  100. package/chunks/{glob-KNHSFFFG.js → glob-5XBCPQ2A.js} +27 -19
  101. package/chunks/{grep-LACWDZW4.js → grep-VIUU3A7X.js} +30 -19
  102. package/chunks/{ja-L7CHRQEW.js → ja-TGPZSP2B.js} +89 -5
  103. package/chunks/{keychain-token-storage-335UOLJ6.js → keychain-token-storage-6IU6ORQN.js} +3 -3
  104. package/chunks/{ls-AGXQOKSG.js → ls-JRGYIGLY.js} +4 -4
  105. package/chunks/{lsp-UDMUHNPA.js → lsp-SHMKFOAC.js} +3 -3
  106. package/chunks/{monitor-ETKWPJEH.js → monitor-6R4LIJL5.js} +40 -25
  107. package/chunks/{multipart-parser-3QWGTLK3.js → multipart-parser-AJ4WASWR.js} +2 -2
  108. package/chunks/{notebook-edit-QJJLPNYT.js → notebook-edit-5E7ULDVQ.js} +28 -20
  109. package/chunks/{openaiContentGenerator-CNNN424U.js → openaiContentGenerator-ZVHFKM3O.js} +17 -14
  110. package/chunks/{pt-M6JULLEQ.js → pt-TIBG6BIO.js} +89 -5
  111. package/chunks/{qwenContentGenerator-BOLCGK3R.js → qwenContentGenerator-B2VTVSPJ.js} +31 -23
  112. package/chunks/{qwenOAuth2-EEJGROP7.js → qwenOAuth2-2KCKWDCF.js} +6 -4
  113. package/chunks/read-file-GIT7BCDR.js +27 -0
  114. package/chunks/ripGrep-MWKFVYMS.js +48 -0
  115. package/chunks/{ru-QILM4HBC.js → ru-JBCHCK4L.js} +89 -5
  116. package/chunks/scheduler-5VOOYGBH.js +308 -0
  117. package/chunks/send-message-4QNWQJF4.js +244 -0
  118. package/chunks/{serve-OLSI7WSR.js → serve-MN6HZBWN.js} +14262 -7414
  119. package/chunks/shell-NQZQGFM2.js +56 -0
  120. package/chunks/{skill-D6YRHTTI.js → skill-WCFW4644.js} +145 -119
  121. package/chunks/{src-TMOD5X6F.js → src-7XL4G4DC.js} +88 -46
  122. package/chunks/{src-4QH4FZ6I.js → src-IHA6DTUV.js} +452 -62
  123. package/chunks/{syntheticOutput-5PVFDDJ4.js → syntheticOutput-YTYS2ZMQ.js} +4 -4
  124. package/chunks/task-create-MPORPYN6.js +19 -0
  125. package/chunks/task-list-R2YDYPZT.js +151 -0
  126. package/chunks/{task-stop-AJKPSR6R.js → task-stop-SYWJYBCM.js} +3 -3
  127. package/chunks/task-update-E4NSLKMQ.js +408 -0
  128. package/chunks/team-create-7R7KA5IP.js +314 -0
  129. package/chunks/team-delete-25OIWUPN.js +116 -0
  130. package/chunks/{todoWrite-VLAUG4CA.js → todoWrite-4YHMIF4X.js} +16 -5
  131. package/chunks/{tool-search-MZGHUUKD.js → tool-search-YBRVZCLI.js} +29 -11
  132. package/chunks/{tts-notification-K3X7X7MN.js → tts-notification-7SOEMQK4.js} +5 -4
  133. package/chunks/{web-fetch-OILB464A.js → web-fetch-MFIRHIHI.js} +5 -5
  134. package/chunks/workflow-5RIKVCIE.js +960 -0
  135. package/chunks/{write-file-BIQAA57V.js → write-file-DMQTJZOM.js} +32 -24
  136. package/chunks/{zh-PWL2NKY3.js → zh-7H5OQC4I.js} +135 -11
  137. package/chunks/{zh-TW-S3YGWICZ.js → zh-TW-P4IDHD3M.js} +128 -11
  138. package/cli.js +45402 -20570
  139. package/examples/agent/agents/diary.md +86 -0
  140. package/examples/agent/qwen-extension.json +5 -0
  141. package/examples/commands/commands/fs/grep-code.md +3 -0
  142. package/examples/commands/qwen-extension.json +5 -0
  143. package/examples/context/QWEN.md +8 -0
  144. package/examples/context/qwen-extension.json +5 -0
  145. package/examples/mcp-server/example.ts +60 -0
  146. package/examples/mcp-server/package.json +18 -0
  147. package/examples/mcp-server/qwen-extension.json +12 -0
  148. package/examples/mcp-server/tsconfig.json +13 -0
  149. package/examples/skills/qwen-extension.json +5 -0
  150. package/examples/skills/skills/synonyms/SKILL.md +48 -0
  151. package/examples/starter/QWEN.md +30 -0
  152. package/examples/starter/README.md +59 -0
  153. package/examples/starter/agents/diary.md +86 -0
  154. package/examples/starter/commands/writing/polish.md +13 -0
  155. package/examples/starter/example.ts +64 -0
  156. package/examples/starter/package.json +18 -0
  157. package/examples/starter/qwen-extension.json +12 -0
  158. package/examples/starter/skills/synonyms/SKILL.md +48 -0
  159. package/examples/starter/tsconfig.json +13 -0
  160. package/fzfWorker.js +1083 -0
  161. package/locales/ca.js +118 -5
  162. package/locales/de.js +117 -5
  163. package/locales/en.js +169 -7
  164. package/locales/fr.js +119 -5
  165. package/locales/ja.js +114 -5
  166. package/locales/pt.js +117 -5
  167. package/locales/ru.js +116 -5
  168. package/locales/zh-TW.js +161 -12
  169. package/locales/zh.js +169 -12
  170. package/package.json +4 -2
  171. package/scripts/postinstall.cjs +2 -1
  172. package/bundled/qc-helper/docs/features/checkpointing.md +0 -77
  173. package/chunks/agent-7ZN3CRHR.js +0 -48
  174. package/chunks/chunk-6PCB2DEF.js +0 -434
  175. package/chunks/chunk-EM6ETG2K.js +0 -60
  176. package/chunks/chunk-G7YTSRES.js +0 -150
  177. package/chunks/contextCommand-7IBASARL.js +0 -44
  178. package/chunks/exitPlanMode-PZAMWIRW.js +0 -227
  179. package/chunks/multipart-parser-IXGBIOIN.js +0 -384
  180. package/chunks/read-file-CCUEUFG2.js +0 -24
  181. package/chunks/ripGrep-TADOH2HK.js +0 -40
  182. package/chunks/send-message-YL44UZFC.js +0 -151
  183. package/chunks/shell-7KKKC5G7.js +0 -48
  184. package/chunks/src-IPWIHNMI.js +0 -1406
  185. package/chunks/undici-F6ZOXSS5.js +0 -8
@@ -0,0 +1,2517 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ init_esbuild_shims
5
+ } from "./chunk-A4BMJM77.js";
6
+ import {
7
+ __commonJS,
8
+ __name,
9
+ __require
10
+ } from "./chunk-J2S4EL5Y.js";
11
+
12
+ // node_modules/@protobufjs/aspromise/index.js
13
+ var require_aspromise = __commonJS({
14
+ "node_modules/@protobufjs/aspromise/index.js"(exports, module) {
15
+ "use strict";
16
+ init_esbuild_shims();
17
+ module.exports = asPromise;
18
+ function asPromise(fn, ctx) {
19
+ var params = new Array(arguments.length - 1), offset = 0, index = 2, pending = true;
20
+ while (index < arguments.length)
21
+ params[offset++] = arguments[index++];
22
+ return new Promise(/* @__PURE__ */ __name(function executor(resolve, reject) {
23
+ params[offset] = /* @__PURE__ */ __name(function callback(err) {
24
+ if (pending) {
25
+ pending = false;
26
+ if (err)
27
+ reject(err);
28
+ else {
29
+ var params2 = new Array(arguments.length - 1), offset2 = 0;
30
+ while (offset2 < params2.length)
31
+ params2[offset2++] = arguments[offset2];
32
+ resolve.apply(null, params2);
33
+ }
34
+ }
35
+ }, "callback");
36
+ try {
37
+ fn.apply(ctx || null, params);
38
+ } catch (err) {
39
+ if (pending) {
40
+ pending = false;
41
+ reject(err);
42
+ }
43
+ }
44
+ }, "executor"));
45
+ }
46
+ __name(asPromise, "asPromise");
47
+ }
48
+ });
49
+
50
+ // node_modules/@protobufjs/base64/index.js
51
+ var require_base64 = __commonJS({
52
+ "node_modules/@protobufjs/base64/index.js"(exports) {
53
+ "use strict";
54
+ init_esbuild_shims();
55
+ var base64 = exports;
56
+ base64.length = /* @__PURE__ */ __name(function length(string) {
57
+ var p = string.length;
58
+ if (!p)
59
+ return 0;
60
+ var n = 0;
61
+ while (--p % 4 > 1 && string.charAt(p) === "=")
62
+ ++n;
63
+ return Math.ceil(string.length * 3) / 4 - n;
64
+ }, "length");
65
+ var b64 = new Array(64);
66
+ var s64 = new Array(123);
67
+ for (i = 0; i < 64; )
68
+ s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
69
+ var i;
70
+ base64.encode = /* @__PURE__ */ __name(function encode(buffer, start, end) {
71
+ var parts = null, chunk = [];
72
+ var i2 = 0, j = 0, t;
73
+ while (start < end) {
74
+ var b = buffer[start++];
75
+ switch (j) {
76
+ case 0:
77
+ chunk[i2++] = b64[b >> 2];
78
+ t = (b & 3) << 4;
79
+ j = 1;
80
+ break;
81
+ case 1:
82
+ chunk[i2++] = b64[t | b >> 4];
83
+ t = (b & 15) << 2;
84
+ j = 2;
85
+ break;
86
+ case 2:
87
+ chunk[i2++] = b64[t | b >> 6];
88
+ chunk[i2++] = b64[b & 63];
89
+ j = 0;
90
+ break;
91
+ }
92
+ if (i2 > 8191) {
93
+ (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
94
+ i2 = 0;
95
+ }
96
+ }
97
+ if (j) {
98
+ chunk[i2++] = b64[t];
99
+ chunk[i2++] = 61;
100
+ if (j === 1)
101
+ chunk[i2++] = 61;
102
+ }
103
+ if (parts) {
104
+ if (i2)
105
+ parts.push(String.fromCharCode.apply(String, chunk.slice(0, i2)));
106
+ return parts.join("");
107
+ }
108
+ return String.fromCharCode.apply(String, chunk.slice(0, i2));
109
+ }, "encode");
110
+ var invalidEncoding = "invalid encoding";
111
+ base64.decode = /* @__PURE__ */ __name(function decode(string, buffer, offset) {
112
+ var start = offset;
113
+ var j = 0, t;
114
+ for (var i2 = 0; i2 < string.length; ) {
115
+ var c = string.charCodeAt(i2++);
116
+ if (c === 61 && j > 1)
117
+ break;
118
+ if ((c = s64[c]) === void 0)
119
+ throw Error(invalidEncoding);
120
+ switch (j) {
121
+ case 0:
122
+ t = c;
123
+ j = 1;
124
+ break;
125
+ case 1:
126
+ buffer[offset++] = t << 2 | (c & 48) >> 4;
127
+ t = c;
128
+ j = 2;
129
+ break;
130
+ case 2:
131
+ buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
132
+ t = c;
133
+ j = 3;
134
+ break;
135
+ case 3:
136
+ buffer[offset++] = (t & 3) << 6 | c;
137
+ j = 0;
138
+ break;
139
+ }
140
+ }
141
+ if (j === 1)
142
+ throw Error(invalidEncoding);
143
+ return offset - start;
144
+ }, "decode");
145
+ base64.test = /* @__PURE__ */ __name(function test(string) {
146
+ return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
147
+ }, "test");
148
+ }
149
+ });
150
+
151
+ // node_modules/@protobufjs/eventemitter/index.js
152
+ var require_eventemitter = __commonJS({
153
+ "node_modules/@protobufjs/eventemitter/index.js"(exports, module) {
154
+ "use strict";
155
+ init_esbuild_shims();
156
+ module.exports = EventEmitter;
157
+ function EventEmitter() {
158
+ this._listeners = /* @__PURE__ */ Object.create(null);
159
+ }
160
+ __name(EventEmitter, "EventEmitter");
161
+ EventEmitter.prototype.on = /* @__PURE__ */ __name(function on(evt, fn, ctx) {
162
+ (this._listeners[evt] || (this._listeners[evt] = [])).push({
163
+ fn,
164
+ ctx: ctx || this
165
+ });
166
+ return this;
167
+ }, "on");
168
+ EventEmitter.prototype.off = /* @__PURE__ */ __name(function off(evt, fn) {
169
+ if (evt === void 0)
170
+ this._listeners = /* @__PURE__ */ Object.create(null);
171
+ else {
172
+ if (fn === void 0)
173
+ this._listeners[evt] = [];
174
+ else {
175
+ var listeners = this._listeners[evt];
176
+ if (!listeners)
177
+ return this;
178
+ for (var i = 0; i < listeners.length; )
179
+ if (listeners[i].fn === fn)
180
+ listeners.splice(i, 1);
181
+ else
182
+ ++i;
183
+ }
184
+ }
185
+ return this;
186
+ }, "off");
187
+ EventEmitter.prototype.emit = /* @__PURE__ */ __name(function emit(evt) {
188
+ var listeners = this._listeners[evt];
189
+ if (listeners) {
190
+ var args = [], i = 1;
191
+ for (; i < arguments.length; )
192
+ args.push(arguments[i++]);
193
+ for (i = 0; i < listeners.length; )
194
+ listeners[i].fn.apply(listeners[i++].ctx, args);
195
+ }
196
+ return this;
197
+ }, "emit");
198
+ }
199
+ });
200
+
201
+ // node_modules/@protobufjs/float/index.js
202
+ var require_float = __commonJS({
203
+ "node_modules/@protobufjs/float/index.js"(exports, module) {
204
+ "use strict";
205
+ init_esbuild_shims();
206
+ module.exports = factory(factory);
207
+ function factory(exports2) {
208
+ if (typeof Float32Array !== "undefined") (function() {
209
+ var f32 = new Float32Array([-0]), f8b = new Uint8Array(f32.buffer), le = f8b[3] === 128;
210
+ function writeFloat_f32_cpy(val, buf, pos) {
211
+ f32[0] = val;
212
+ buf[pos] = f8b[0];
213
+ buf[pos + 1] = f8b[1];
214
+ buf[pos + 2] = f8b[2];
215
+ buf[pos + 3] = f8b[3];
216
+ }
217
+ __name(writeFloat_f32_cpy, "writeFloat_f32_cpy");
218
+ function writeFloat_f32_rev(val, buf, pos) {
219
+ f32[0] = val;
220
+ buf[pos] = f8b[3];
221
+ buf[pos + 1] = f8b[2];
222
+ buf[pos + 2] = f8b[1];
223
+ buf[pos + 3] = f8b[0];
224
+ }
225
+ __name(writeFloat_f32_rev, "writeFloat_f32_rev");
226
+ exports2.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;
227
+ exports2.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;
228
+ function readFloat_f32_cpy(buf, pos) {
229
+ f8b[0] = buf[pos];
230
+ f8b[1] = buf[pos + 1];
231
+ f8b[2] = buf[pos + 2];
232
+ f8b[3] = buf[pos + 3];
233
+ return f32[0];
234
+ }
235
+ __name(readFloat_f32_cpy, "readFloat_f32_cpy");
236
+ function readFloat_f32_rev(buf, pos) {
237
+ f8b[3] = buf[pos];
238
+ f8b[2] = buf[pos + 1];
239
+ f8b[1] = buf[pos + 2];
240
+ f8b[0] = buf[pos + 3];
241
+ return f32[0];
242
+ }
243
+ __name(readFloat_f32_rev, "readFloat_f32_rev");
244
+ exports2.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;
245
+ exports2.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;
246
+ })();
247
+ else (function() {
248
+ function writeFloat_ieee754(writeUint, val, buf, pos) {
249
+ var sign = val < 0 ? 1 : 0;
250
+ if (sign)
251
+ val = -val;
252
+ if (val === 0)
253
+ writeUint(1 / val > 0 ? (
254
+ /* positive */
255
+ 0
256
+ ) : (
257
+ /* negative 0 */
258
+ 2147483648
259
+ ), buf, pos);
260
+ else if (isNaN(val))
261
+ writeUint(2143289344, buf, pos);
262
+ else if (val > 34028234663852886e22)
263
+ writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);
264
+ else if (val < 11754943508222875e-54)
265
+ writeUint((sign << 31 | Math.round(val / 1401298464324817e-60)) >>> 0, buf, pos);
266
+ else {
267
+ var exponent = Math.floor(Math.log(val) / Math.LN2), mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;
268
+ writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
269
+ }
270
+ }
271
+ __name(writeFloat_ieee754, "writeFloat_ieee754");
272
+ exports2.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);
273
+ exports2.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);
274
+ function readFloat_ieee754(readUint, buf, pos) {
275
+ var uint = readUint(buf, pos), sign = (uint >> 31) * 2 + 1, exponent = uint >>> 23 & 255, mantissa = uint & 8388607;
276
+ return exponent === 255 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 1401298464324817e-60 * mantissa : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
277
+ }
278
+ __name(readFloat_ieee754, "readFloat_ieee754");
279
+ exports2.readFloatLE = readFloat_ieee754.bind(null, readUintLE);
280
+ exports2.readFloatBE = readFloat_ieee754.bind(null, readUintBE);
281
+ })();
282
+ if (typeof Float64Array !== "undefined") (function() {
283
+ var f64 = new Float64Array([-0]), f8b = new Uint8Array(f64.buffer), le = f8b[7] === 128;
284
+ function writeDouble_f64_cpy(val, buf, pos) {
285
+ f64[0] = val;
286
+ buf[pos] = f8b[0];
287
+ buf[pos + 1] = f8b[1];
288
+ buf[pos + 2] = f8b[2];
289
+ buf[pos + 3] = f8b[3];
290
+ buf[pos + 4] = f8b[4];
291
+ buf[pos + 5] = f8b[5];
292
+ buf[pos + 6] = f8b[6];
293
+ buf[pos + 7] = f8b[7];
294
+ }
295
+ __name(writeDouble_f64_cpy, "writeDouble_f64_cpy");
296
+ function writeDouble_f64_rev(val, buf, pos) {
297
+ f64[0] = val;
298
+ buf[pos] = f8b[7];
299
+ buf[pos + 1] = f8b[6];
300
+ buf[pos + 2] = f8b[5];
301
+ buf[pos + 3] = f8b[4];
302
+ buf[pos + 4] = f8b[3];
303
+ buf[pos + 5] = f8b[2];
304
+ buf[pos + 6] = f8b[1];
305
+ buf[pos + 7] = f8b[0];
306
+ }
307
+ __name(writeDouble_f64_rev, "writeDouble_f64_rev");
308
+ exports2.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;
309
+ exports2.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;
310
+ function readDouble_f64_cpy(buf, pos) {
311
+ f8b[0] = buf[pos];
312
+ f8b[1] = buf[pos + 1];
313
+ f8b[2] = buf[pos + 2];
314
+ f8b[3] = buf[pos + 3];
315
+ f8b[4] = buf[pos + 4];
316
+ f8b[5] = buf[pos + 5];
317
+ f8b[6] = buf[pos + 6];
318
+ f8b[7] = buf[pos + 7];
319
+ return f64[0];
320
+ }
321
+ __name(readDouble_f64_cpy, "readDouble_f64_cpy");
322
+ function readDouble_f64_rev(buf, pos) {
323
+ f8b[7] = buf[pos];
324
+ f8b[6] = buf[pos + 1];
325
+ f8b[5] = buf[pos + 2];
326
+ f8b[4] = buf[pos + 3];
327
+ f8b[3] = buf[pos + 4];
328
+ f8b[2] = buf[pos + 5];
329
+ f8b[1] = buf[pos + 6];
330
+ f8b[0] = buf[pos + 7];
331
+ return f64[0];
332
+ }
333
+ __name(readDouble_f64_rev, "readDouble_f64_rev");
334
+ exports2.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;
335
+ exports2.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;
336
+ })();
337
+ else (function() {
338
+ function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {
339
+ var sign = val < 0 ? 1 : 0;
340
+ if (sign)
341
+ val = -val;
342
+ if (val === 0) {
343
+ writeUint(0, buf, pos + off0);
344
+ writeUint(1 / val > 0 ? (
345
+ /* positive */
346
+ 0
347
+ ) : (
348
+ /* negative 0 */
349
+ 2147483648
350
+ ), buf, pos + off1);
351
+ } else if (isNaN(val)) {
352
+ writeUint(0, buf, pos + off0);
353
+ writeUint(2146959360, buf, pos + off1);
354
+ } else if (val > 17976931348623157e292) {
355
+ writeUint(0, buf, pos + off0);
356
+ writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);
357
+ } else {
358
+ var mantissa;
359
+ if (val < 22250738585072014e-324) {
360
+ mantissa = val / 5e-324;
361
+ writeUint(mantissa >>> 0, buf, pos + off0);
362
+ writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);
363
+ } else {
364
+ var exponent = Math.floor(Math.log(val) / Math.LN2);
365
+ if (exponent === 1024)
366
+ exponent = 1023;
367
+ mantissa = val * Math.pow(2, -exponent);
368
+ writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);
369
+ writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);
370
+ }
371
+ }
372
+ }
373
+ __name(writeDouble_ieee754, "writeDouble_ieee754");
374
+ exports2.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);
375
+ exports2.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);
376
+ function readDouble_ieee754(readUint, off0, off1, buf, pos) {
377
+ var lo = readUint(buf, pos + off0), hi = readUint(buf, pos + off1);
378
+ var sign = (hi >> 31) * 2 + 1, exponent = hi >>> 20 & 2047, mantissa = 4294967296 * (hi & 1048575) + lo;
379
+ return exponent === 2047 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 5e-324 * mantissa : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
380
+ }
381
+ __name(readDouble_ieee754, "readDouble_ieee754");
382
+ exports2.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);
383
+ exports2.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);
384
+ })();
385
+ return exports2;
386
+ }
387
+ __name(factory, "factory");
388
+ function writeUintLE(val, buf, pos) {
389
+ buf[pos] = val & 255;
390
+ buf[pos + 1] = val >>> 8 & 255;
391
+ buf[pos + 2] = val >>> 16 & 255;
392
+ buf[pos + 3] = val >>> 24;
393
+ }
394
+ __name(writeUintLE, "writeUintLE");
395
+ function writeUintBE(val, buf, pos) {
396
+ buf[pos] = val >>> 24;
397
+ buf[pos + 1] = val >>> 16 & 255;
398
+ buf[pos + 2] = val >>> 8 & 255;
399
+ buf[pos + 3] = val & 255;
400
+ }
401
+ __name(writeUintBE, "writeUintBE");
402
+ function readUintLE(buf, pos) {
403
+ return (buf[pos] | buf[pos + 1] << 8 | buf[pos + 2] << 16 | buf[pos + 3] << 24) >>> 0;
404
+ }
405
+ __name(readUintLE, "readUintLE");
406
+ function readUintBE(buf, pos) {
407
+ return (buf[pos] << 24 | buf[pos + 1] << 16 | buf[pos + 2] << 8 | buf[pos + 3]) >>> 0;
408
+ }
409
+ __name(readUintBE, "readUintBE");
410
+ }
411
+ });
412
+
413
+ // node_modules/@protobufjs/inquire/index.js
414
+ var require_inquire = __commonJS({
415
+ "node_modules/@protobufjs/inquire/index.js"(exports, module) {
416
+ "use strict";
417
+ init_esbuild_shims();
418
+ module.exports = inquire;
419
+ function inquire(moduleName) {
420
+ try {
421
+ if (typeof __require !== "function") {
422
+ return null;
423
+ }
424
+ var mod = __require(moduleName);
425
+ if (mod && (mod.length || Object.keys(mod).length)) return mod;
426
+ return null;
427
+ } catch (err) {
428
+ return null;
429
+ }
430
+ }
431
+ __name(inquire, "inquire");
432
+ }
433
+ });
434
+
435
+ // node_modules/@protobufjs/utf8/index.js
436
+ var require_utf8 = __commonJS({
437
+ "node_modules/@protobufjs/utf8/index.js"(exports) {
438
+ "use strict";
439
+ init_esbuild_shims();
440
+ var utf8 = exports;
441
+ var replacementChar = "\uFFFD";
442
+ utf8.length = /* @__PURE__ */ __name(function utf8_length(string) {
443
+ var len = 0, c = 0;
444
+ for (var i = 0; i < string.length; ++i) {
445
+ c = string.charCodeAt(i);
446
+ if (c < 128)
447
+ len += 1;
448
+ else if (c < 2048)
449
+ len += 2;
450
+ else if ((c & 64512) === 55296 && (string.charCodeAt(i + 1) & 64512) === 56320) {
451
+ ++i;
452
+ len += 4;
453
+ } else
454
+ len += 3;
455
+ }
456
+ return len;
457
+ }, "utf8_length");
458
+ utf8.read = /* @__PURE__ */ __name(function utf8_read(buffer, start, end) {
459
+ if (end - start < 1) {
460
+ return "";
461
+ }
462
+ var str = "";
463
+ for (var i = start; i < end; ) {
464
+ var t = buffer[i++];
465
+ if (t <= 127) {
466
+ str += String.fromCharCode(t);
467
+ } else if (t >= 192 && t < 224) {
468
+ var c2 = (t & 31) << 6 | buffer[i++] & 63;
469
+ str += c2 >= 128 ? String.fromCharCode(c2) : replacementChar;
470
+ } else if (t >= 224 && t < 240) {
471
+ var c3 = (t & 15) << 12 | (buffer[i++] & 63) << 6 | buffer[i++] & 63;
472
+ str += c3 >= 2048 ? String.fromCharCode(c3) : replacementChar;
473
+ } else if (t >= 240) {
474
+ var t2 = (t & 7) << 18 | (buffer[i++] & 63) << 12 | (buffer[i++] & 63) << 6 | buffer[i++] & 63;
475
+ if (t2 < 65536 || t2 > 1114111)
476
+ str += replacementChar;
477
+ else {
478
+ t2 -= 65536;
479
+ str += String.fromCharCode(55296 + (t2 >> 10));
480
+ str += String.fromCharCode(56320 + (t2 & 1023));
481
+ }
482
+ }
483
+ }
484
+ return str;
485
+ }, "utf8_read");
486
+ utf8.write = /* @__PURE__ */ __name(function utf8_write(string, buffer, offset) {
487
+ var start = offset, c1, c2;
488
+ for (var i = 0; i < string.length; ++i) {
489
+ c1 = string.charCodeAt(i);
490
+ if (c1 < 128) {
491
+ buffer[offset++] = c1;
492
+ } else if (c1 < 2048) {
493
+ buffer[offset++] = c1 >> 6 | 192;
494
+ buffer[offset++] = c1 & 63 | 128;
495
+ } else if ((c1 & 64512) === 55296 && ((c2 = string.charCodeAt(i + 1)) & 64512) === 56320) {
496
+ c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023);
497
+ ++i;
498
+ buffer[offset++] = c1 >> 18 | 240;
499
+ buffer[offset++] = c1 >> 12 & 63 | 128;
500
+ buffer[offset++] = c1 >> 6 & 63 | 128;
501
+ buffer[offset++] = c1 & 63 | 128;
502
+ } else {
503
+ buffer[offset++] = c1 >> 12 | 224;
504
+ buffer[offset++] = c1 >> 6 & 63 | 128;
505
+ buffer[offset++] = c1 & 63 | 128;
506
+ }
507
+ }
508
+ return offset - start;
509
+ }, "utf8_write");
510
+ }
511
+ });
512
+
513
+ // node_modules/@protobufjs/pool/index.js
514
+ var require_pool = __commonJS({
515
+ "node_modules/@protobufjs/pool/index.js"(exports, module) {
516
+ "use strict";
517
+ init_esbuild_shims();
518
+ module.exports = pool;
519
+ function pool(alloc, slice, size) {
520
+ var SIZE = size || 8192;
521
+ var MAX = SIZE >>> 1;
522
+ var slab = null;
523
+ var offset = SIZE;
524
+ return /* @__PURE__ */ __name(function pool_alloc(size2) {
525
+ if (size2 < 1 || size2 > MAX)
526
+ return alloc(size2);
527
+ if (offset + size2 > SIZE) {
528
+ slab = alloc(SIZE);
529
+ offset = 0;
530
+ }
531
+ var buf = slice.call(slab, offset, offset += size2);
532
+ if (offset & 7)
533
+ offset = (offset | 7) + 1;
534
+ return buf;
535
+ }, "pool_alloc");
536
+ }
537
+ __name(pool, "pool");
538
+ }
539
+ });
540
+
541
+ // node_modules/protobufjs/src/util/longbits.js
542
+ var require_longbits = __commonJS({
543
+ "node_modules/protobufjs/src/util/longbits.js"(exports, module) {
544
+ "use strict";
545
+ init_esbuild_shims();
546
+ module.exports = LongBits;
547
+ var util = require_minimal();
548
+ function LongBits(lo, hi) {
549
+ this.lo = lo >>> 0;
550
+ this.hi = hi >>> 0;
551
+ }
552
+ __name(LongBits, "LongBits");
553
+ var zero = LongBits.zero = new LongBits(0, 0);
554
+ zero.toNumber = function() {
555
+ return 0;
556
+ };
557
+ zero.zzEncode = zero.zzDecode = function() {
558
+ return this;
559
+ };
560
+ zero.length = function() {
561
+ return 1;
562
+ };
563
+ var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0";
564
+ LongBits.fromNumber = /* @__PURE__ */ __name(function fromNumber(value) {
565
+ if (value === 0)
566
+ return zero;
567
+ var sign = value < 0;
568
+ if (sign)
569
+ value = -value;
570
+ var lo = value >>> 0, hi = (value - lo) / 4294967296 >>> 0;
571
+ if (sign) {
572
+ hi = ~hi >>> 0;
573
+ lo = ~lo >>> 0;
574
+ if (++lo > 4294967295) {
575
+ lo = 0;
576
+ if (++hi > 4294967295)
577
+ hi = 0;
578
+ }
579
+ }
580
+ return new LongBits(lo, hi);
581
+ }, "fromNumber");
582
+ LongBits.from = /* @__PURE__ */ __name(function from(value) {
583
+ if (typeof value === "number")
584
+ return LongBits.fromNumber(value);
585
+ if (util.isString(value)) {
586
+ if (util.Long)
587
+ value = util.Long.fromString(value);
588
+ else
589
+ return LongBits.fromNumber(parseInt(value, 10));
590
+ }
591
+ return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;
592
+ }, "from");
593
+ LongBits.prototype.toNumber = /* @__PURE__ */ __name(function toNumber(unsigned) {
594
+ if (!unsigned && this.hi >>> 31) {
595
+ var lo = ~this.lo + 1 >>> 0, hi = ~this.hi >>> 0;
596
+ if (!lo)
597
+ hi = hi + 1 >>> 0;
598
+ return -(lo + hi * 4294967296);
599
+ }
600
+ return this.lo + this.hi * 4294967296;
601
+ }, "toNumber");
602
+ LongBits.prototype.toLong = /* @__PURE__ */ __name(function toLong(unsigned) {
603
+ return util.Long ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };
604
+ }, "toLong");
605
+ var charCodeAt = String.prototype.charCodeAt;
606
+ LongBits.fromHash = /* @__PURE__ */ __name(function fromHash(hash) {
607
+ if (hash === zeroHash)
608
+ return zero;
609
+ return new LongBits(
610
+ (charCodeAt.call(hash, 0) | charCodeAt.call(hash, 1) << 8 | charCodeAt.call(hash, 2) << 16 | charCodeAt.call(hash, 3) << 24) >>> 0,
611
+ (charCodeAt.call(hash, 4) | charCodeAt.call(hash, 5) << 8 | charCodeAt.call(hash, 6) << 16 | charCodeAt.call(hash, 7) << 24) >>> 0
612
+ );
613
+ }, "fromHash");
614
+ LongBits.prototype.toHash = /* @__PURE__ */ __name(function toHash() {
615
+ return String.fromCharCode(
616
+ this.lo & 255,
617
+ this.lo >>> 8 & 255,
618
+ this.lo >>> 16 & 255,
619
+ this.lo >>> 24,
620
+ this.hi & 255,
621
+ this.hi >>> 8 & 255,
622
+ this.hi >>> 16 & 255,
623
+ this.hi >>> 24
624
+ );
625
+ }, "toHash");
626
+ LongBits.prototype.zzEncode = /* @__PURE__ */ __name(function zzEncode() {
627
+ var mask = this.hi >> 31;
628
+ this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;
629
+ this.lo = (this.lo << 1 ^ mask) >>> 0;
630
+ return this;
631
+ }, "zzEncode");
632
+ LongBits.prototype.zzDecode = /* @__PURE__ */ __name(function zzDecode() {
633
+ var mask = -(this.lo & 1);
634
+ this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;
635
+ this.hi = (this.hi >>> 1 ^ mask) >>> 0;
636
+ return this;
637
+ }, "zzDecode");
638
+ LongBits.prototype.length = /* @__PURE__ */ __name(function length() {
639
+ var part0 = this.lo, part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, part2 = this.hi >>> 24;
640
+ return part2 === 0 ? part1 === 0 ? part0 < 16384 ? part0 < 128 ? 1 : 2 : part0 < 2097152 ? 3 : 4 : part1 < 16384 ? part1 < 128 ? 5 : 6 : part1 < 2097152 ? 7 : 8 : part2 < 128 ? 9 : 10;
641
+ }, "length");
642
+ }
643
+ });
644
+
645
+ // node_modules/long/umd/index.js
646
+ var require_umd = __commonJS({
647
+ "node_modules/long/umd/index.js"(exports, module) {
648
+ init_esbuild_shims();
649
+ (function(global2, factory) {
650
+ function preferDefault(exports2) {
651
+ return exports2.default || exports2;
652
+ }
653
+ __name(preferDefault, "preferDefault");
654
+ if (typeof define === "function" && define.amd) {
655
+ define([], function() {
656
+ var exports2 = {};
657
+ factory(exports2);
658
+ return preferDefault(exports2);
659
+ });
660
+ } else if (typeof exports === "object") {
661
+ factory(exports);
662
+ if (typeof module === "object") module.exports = preferDefault(exports);
663
+ } else {
664
+ (function() {
665
+ var exports2 = {};
666
+ factory(exports2);
667
+ global2.Long = preferDefault(exports2);
668
+ })();
669
+ }
670
+ })(
671
+ typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : exports,
672
+ function(_exports) {
673
+ "use strict";
674
+ Object.defineProperty(_exports, "__esModule", {
675
+ value: true
676
+ });
677
+ _exports.default = void 0;
678
+ var wasm = null;
679
+ try {
680
+ wasm = new WebAssembly.Instance(
681
+ new WebAssembly.Module(
682
+ new Uint8Array([
683
+ // \0asm
684
+ 0,
685
+ 97,
686
+ 115,
687
+ 109,
688
+ // version 1
689
+ 1,
690
+ 0,
691
+ 0,
692
+ 0,
693
+ // section "type"
694
+ 1,
695
+ 13,
696
+ 2,
697
+ // 0, () => i32
698
+ 96,
699
+ 0,
700
+ 1,
701
+ 127,
702
+ // 1, (i32, i32, i32, i32) => i32
703
+ 96,
704
+ 4,
705
+ 127,
706
+ 127,
707
+ 127,
708
+ 127,
709
+ 1,
710
+ 127,
711
+ // section "function"
712
+ 3,
713
+ 7,
714
+ 6,
715
+ // 0, type 0
716
+ 0,
717
+ // 1, type 1
718
+ 1,
719
+ // 2, type 1
720
+ 1,
721
+ // 3, type 1
722
+ 1,
723
+ // 4, type 1
724
+ 1,
725
+ // 5, type 1
726
+ 1,
727
+ // section "global"
728
+ 6,
729
+ 6,
730
+ 1,
731
+ // 0, "high", mutable i32
732
+ 127,
733
+ 1,
734
+ 65,
735
+ 0,
736
+ 11,
737
+ // section "export"
738
+ 7,
739
+ 50,
740
+ 6,
741
+ // 0, "mul"
742
+ 3,
743
+ 109,
744
+ 117,
745
+ 108,
746
+ 0,
747
+ 1,
748
+ // 1, "div_s"
749
+ 5,
750
+ 100,
751
+ 105,
752
+ 118,
753
+ 95,
754
+ 115,
755
+ 0,
756
+ 2,
757
+ // 2, "div_u"
758
+ 5,
759
+ 100,
760
+ 105,
761
+ 118,
762
+ 95,
763
+ 117,
764
+ 0,
765
+ 3,
766
+ // 3, "rem_s"
767
+ 5,
768
+ 114,
769
+ 101,
770
+ 109,
771
+ 95,
772
+ 115,
773
+ 0,
774
+ 4,
775
+ // 4, "rem_u"
776
+ 5,
777
+ 114,
778
+ 101,
779
+ 109,
780
+ 95,
781
+ 117,
782
+ 0,
783
+ 5,
784
+ // 5, "get_high"
785
+ 8,
786
+ 103,
787
+ 101,
788
+ 116,
789
+ 95,
790
+ 104,
791
+ 105,
792
+ 103,
793
+ 104,
794
+ 0,
795
+ 0,
796
+ // section "code"
797
+ 10,
798
+ 191,
799
+ 1,
800
+ 6,
801
+ // 0, "get_high"
802
+ 4,
803
+ 0,
804
+ 35,
805
+ 0,
806
+ 11,
807
+ // 1, "mul"
808
+ 36,
809
+ 1,
810
+ 1,
811
+ 126,
812
+ 32,
813
+ 0,
814
+ 173,
815
+ 32,
816
+ 1,
817
+ 173,
818
+ 66,
819
+ 32,
820
+ 134,
821
+ 132,
822
+ 32,
823
+ 2,
824
+ 173,
825
+ 32,
826
+ 3,
827
+ 173,
828
+ 66,
829
+ 32,
830
+ 134,
831
+ 132,
832
+ 126,
833
+ 34,
834
+ 4,
835
+ 66,
836
+ 32,
837
+ 135,
838
+ 167,
839
+ 36,
840
+ 0,
841
+ 32,
842
+ 4,
843
+ 167,
844
+ 11,
845
+ // 2, "div_s"
846
+ 36,
847
+ 1,
848
+ 1,
849
+ 126,
850
+ 32,
851
+ 0,
852
+ 173,
853
+ 32,
854
+ 1,
855
+ 173,
856
+ 66,
857
+ 32,
858
+ 134,
859
+ 132,
860
+ 32,
861
+ 2,
862
+ 173,
863
+ 32,
864
+ 3,
865
+ 173,
866
+ 66,
867
+ 32,
868
+ 134,
869
+ 132,
870
+ 127,
871
+ 34,
872
+ 4,
873
+ 66,
874
+ 32,
875
+ 135,
876
+ 167,
877
+ 36,
878
+ 0,
879
+ 32,
880
+ 4,
881
+ 167,
882
+ 11,
883
+ // 3, "div_u"
884
+ 36,
885
+ 1,
886
+ 1,
887
+ 126,
888
+ 32,
889
+ 0,
890
+ 173,
891
+ 32,
892
+ 1,
893
+ 173,
894
+ 66,
895
+ 32,
896
+ 134,
897
+ 132,
898
+ 32,
899
+ 2,
900
+ 173,
901
+ 32,
902
+ 3,
903
+ 173,
904
+ 66,
905
+ 32,
906
+ 134,
907
+ 132,
908
+ 128,
909
+ 34,
910
+ 4,
911
+ 66,
912
+ 32,
913
+ 135,
914
+ 167,
915
+ 36,
916
+ 0,
917
+ 32,
918
+ 4,
919
+ 167,
920
+ 11,
921
+ // 4, "rem_s"
922
+ 36,
923
+ 1,
924
+ 1,
925
+ 126,
926
+ 32,
927
+ 0,
928
+ 173,
929
+ 32,
930
+ 1,
931
+ 173,
932
+ 66,
933
+ 32,
934
+ 134,
935
+ 132,
936
+ 32,
937
+ 2,
938
+ 173,
939
+ 32,
940
+ 3,
941
+ 173,
942
+ 66,
943
+ 32,
944
+ 134,
945
+ 132,
946
+ 129,
947
+ 34,
948
+ 4,
949
+ 66,
950
+ 32,
951
+ 135,
952
+ 167,
953
+ 36,
954
+ 0,
955
+ 32,
956
+ 4,
957
+ 167,
958
+ 11,
959
+ // 5, "rem_u"
960
+ 36,
961
+ 1,
962
+ 1,
963
+ 126,
964
+ 32,
965
+ 0,
966
+ 173,
967
+ 32,
968
+ 1,
969
+ 173,
970
+ 66,
971
+ 32,
972
+ 134,
973
+ 132,
974
+ 32,
975
+ 2,
976
+ 173,
977
+ 32,
978
+ 3,
979
+ 173,
980
+ 66,
981
+ 32,
982
+ 134,
983
+ 132,
984
+ 130,
985
+ 34,
986
+ 4,
987
+ 66,
988
+ 32,
989
+ 135,
990
+ 167,
991
+ 36,
992
+ 0,
993
+ 32,
994
+ 4,
995
+ 167,
996
+ 11
997
+ ])
998
+ ),
999
+ {}
1000
+ ).exports;
1001
+ } catch {
1002
+ }
1003
+ function Long(low, high, unsigned) {
1004
+ this.low = low | 0;
1005
+ this.high = high | 0;
1006
+ this.unsigned = !!unsigned;
1007
+ }
1008
+ __name(Long, "Long");
1009
+ Long.prototype.__isLong__;
1010
+ Object.defineProperty(Long.prototype, "__isLong__", {
1011
+ value: true
1012
+ });
1013
+ function isLong(obj) {
1014
+ return (obj && obj["__isLong__"]) === true;
1015
+ }
1016
+ __name(isLong, "isLong");
1017
+ function ctz32(value) {
1018
+ var c = Math.clz32(value & -value);
1019
+ return value ? 31 - c : c;
1020
+ }
1021
+ __name(ctz32, "ctz32");
1022
+ Long.isLong = isLong;
1023
+ var INT_CACHE = {};
1024
+ var UINT_CACHE = {};
1025
+ function fromInt(value, unsigned) {
1026
+ var obj, cachedObj, cache;
1027
+ if (unsigned) {
1028
+ value >>>= 0;
1029
+ if (cache = 0 <= value && value < 256) {
1030
+ cachedObj = UINT_CACHE[value];
1031
+ if (cachedObj) return cachedObj;
1032
+ }
1033
+ obj = fromBits(value, 0, true);
1034
+ if (cache) UINT_CACHE[value] = obj;
1035
+ return obj;
1036
+ } else {
1037
+ value |= 0;
1038
+ if (cache = -128 <= value && value < 128) {
1039
+ cachedObj = INT_CACHE[value];
1040
+ if (cachedObj) return cachedObj;
1041
+ }
1042
+ obj = fromBits(value, value < 0 ? -1 : 0, false);
1043
+ if (cache) INT_CACHE[value] = obj;
1044
+ return obj;
1045
+ }
1046
+ }
1047
+ __name(fromInt, "fromInt");
1048
+ Long.fromInt = fromInt;
1049
+ function fromNumber(value, unsigned) {
1050
+ if (isNaN(value)) return unsigned ? UZERO : ZERO;
1051
+ if (unsigned) {
1052
+ if (value < 0) return UZERO;
1053
+ if (value >= TWO_PWR_64_DBL) return MAX_UNSIGNED_VALUE;
1054
+ } else {
1055
+ if (value <= -TWO_PWR_63_DBL) return MIN_VALUE;
1056
+ if (value + 1 >= TWO_PWR_63_DBL) return MAX_VALUE;
1057
+ }
1058
+ if (value < 0) return fromNumber(-value, unsigned).neg();
1059
+ return fromBits(
1060
+ value % TWO_PWR_32_DBL | 0,
1061
+ value / TWO_PWR_32_DBL | 0,
1062
+ unsigned
1063
+ );
1064
+ }
1065
+ __name(fromNumber, "fromNumber");
1066
+ Long.fromNumber = fromNumber;
1067
+ function fromBits(lowBits, highBits, unsigned) {
1068
+ return new Long(lowBits, highBits, unsigned);
1069
+ }
1070
+ __name(fromBits, "fromBits");
1071
+ Long.fromBits = fromBits;
1072
+ var pow_dbl = Math.pow;
1073
+ function fromString(str, unsigned, radix) {
1074
+ if (str.length === 0) throw Error("empty string");
1075
+ if (typeof unsigned === "number") {
1076
+ radix = unsigned;
1077
+ unsigned = false;
1078
+ } else {
1079
+ unsigned = !!unsigned;
1080
+ }
1081
+ if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity")
1082
+ return unsigned ? UZERO : ZERO;
1083
+ radix = radix || 10;
1084
+ if (radix < 2 || 36 < radix) throw RangeError("radix");
1085
+ var p;
1086
+ if ((p = str.indexOf("-")) > 0) throw Error("interior hyphen");
1087
+ else if (p === 0) {
1088
+ return fromString(str.substring(1), unsigned, radix).neg();
1089
+ }
1090
+ var radixToPower = fromNumber(pow_dbl(radix, 8));
1091
+ var result = ZERO;
1092
+ for (var i = 0; i < str.length; i += 8) {
1093
+ var size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
1094
+ if (size < 8) {
1095
+ var power = fromNumber(pow_dbl(radix, size));
1096
+ result = result.mul(power).add(fromNumber(value));
1097
+ } else {
1098
+ result = result.mul(radixToPower);
1099
+ result = result.add(fromNumber(value));
1100
+ }
1101
+ }
1102
+ result.unsigned = unsigned;
1103
+ return result;
1104
+ }
1105
+ __name(fromString, "fromString");
1106
+ Long.fromString = fromString;
1107
+ function fromValue(val, unsigned) {
1108
+ if (typeof val === "number") return fromNumber(val, unsigned);
1109
+ if (typeof val === "string") return fromString(val, unsigned);
1110
+ return fromBits(
1111
+ val.low,
1112
+ val.high,
1113
+ typeof unsigned === "boolean" ? unsigned : val.unsigned
1114
+ );
1115
+ }
1116
+ __name(fromValue, "fromValue");
1117
+ Long.fromValue = fromValue;
1118
+ var TWO_PWR_16_DBL = 1 << 16;
1119
+ var TWO_PWR_24_DBL = 1 << 24;
1120
+ var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
1121
+ var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
1122
+ var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
1123
+ var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);
1124
+ var ZERO = fromInt(0);
1125
+ Long.ZERO = ZERO;
1126
+ var UZERO = fromInt(0, true);
1127
+ Long.UZERO = UZERO;
1128
+ var ONE = fromInt(1);
1129
+ Long.ONE = ONE;
1130
+ var UONE = fromInt(1, true);
1131
+ Long.UONE = UONE;
1132
+ var NEG_ONE = fromInt(-1);
1133
+ Long.NEG_ONE = NEG_ONE;
1134
+ var MAX_VALUE = fromBits(4294967295 | 0, 2147483647 | 0, false);
1135
+ Long.MAX_VALUE = MAX_VALUE;
1136
+ var MAX_UNSIGNED_VALUE = fromBits(4294967295 | 0, 4294967295 | 0, true);
1137
+ Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;
1138
+ var MIN_VALUE = fromBits(0, 2147483648 | 0, false);
1139
+ Long.MIN_VALUE = MIN_VALUE;
1140
+ var LongPrototype = Long.prototype;
1141
+ LongPrototype.toInt = /* @__PURE__ */ __name(function toInt() {
1142
+ return this.unsigned ? this.low >>> 0 : this.low;
1143
+ }, "toInt");
1144
+ LongPrototype.toNumber = /* @__PURE__ */ __name(function toNumber() {
1145
+ if (this.unsigned)
1146
+ return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
1147
+ return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
1148
+ }, "toNumber");
1149
+ LongPrototype.toString = /* @__PURE__ */ __name(function toString(radix) {
1150
+ radix = radix || 10;
1151
+ if (radix < 2 || 36 < radix) throw RangeError("radix");
1152
+ if (this.isZero()) return "0";
1153
+ if (this.isNegative()) {
1154
+ if (this.eq(MIN_VALUE)) {
1155
+ var radixLong = fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
1156
+ return div.toString(radix) + rem1.toInt().toString(radix);
1157
+ } else return "-" + this.neg().toString(radix);
1158
+ }
1159
+ var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), rem = this;
1160
+ var result = "";
1161
+ while (true) {
1162
+ var remDiv = rem.div(radixToPower), intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, digits = intval.toString(radix);
1163
+ rem = remDiv;
1164
+ if (rem.isZero()) return digits + result;
1165
+ else {
1166
+ while (digits.length < 6) digits = "0" + digits;
1167
+ result = "" + digits + result;
1168
+ }
1169
+ }
1170
+ }, "toString");
1171
+ LongPrototype.getHighBits = /* @__PURE__ */ __name(function getHighBits() {
1172
+ return this.high;
1173
+ }, "getHighBits");
1174
+ LongPrototype.getHighBitsUnsigned = /* @__PURE__ */ __name(function getHighBitsUnsigned() {
1175
+ return this.high >>> 0;
1176
+ }, "getHighBitsUnsigned");
1177
+ LongPrototype.getLowBits = /* @__PURE__ */ __name(function getLowBits() {
1178
+ return this.low;
1179
+ }, "getLowBits");
1180
+ LongPrototype.getLowBitsUnsigned = /* @__PURE__ */ __name(function getLowBitsUnsigned() {
1181
+ return this.low >>> 0;
1182
+ }, "getLowBitsUnsigned");
1183
+ LongPrototype.getNumBitsAbs = /* @__PURE__ */ __name(function getNumBitsAbs() {
1184
+ if (this.isNegative())
1185
+ return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
1186
+ var val = this.high != 0 ? this.high : this.low;
1187
+ for (var bit = 31; bit > 0; bit--) if ((val & 1 << bit) != 0) break;
1188
+ return this.high != 0 ? bit + 33 : bit + 1;
1189
+ }, "getNumBitsAbs");
1190
+ LongPrototype.isSafeInteger = /* @__PURE__ */ __name(function isSafeInteger() {
1191
+ var top11Bits = this.high >> 21;
1192
+ if (!top11Bits) return true;
1193
+ if (this.unsigned) return false;
1194
+ return top11Bits === -1 && !(this.low === 0 && this.high === -2097152);
1195
+ }, "isSafeInteger");
1196
+ LongPrototype.isZero = /* @__PURE__ */ __name(function isZero() {
1197
+ return this.high === 0 && this.low === 0;
1198
+ }, "isZero");
1199
+ LongPrototype.eqz = LongPrototype.isZero;
1200
+ LongPrototype.isNegative = /* @__PURE__ */ __name(function isNegative() {
1201
+ return !this.unsigned && this.high < 0;
1202
+ }, "isNegative");
1203
+ LongPrototype.isPositive = /* @__PURE__ */ __name(function isPositive() {
1204
+ return this.unsigned || this.high >= 0;
1205
+ }, "isPositive");
1206
+ LongPrototype.isOdd = /* @__PURE__ */ __name(function isOdd() {
1207
+ return (this.low & 1) === 1;
1208
+ }, "isOdd");
1209
+ LongPrototype.isEven = /* @__PURE__ */ __name(function isEven() {
1210
+ return (this.low & 1) === 0;
1211
+ }, "isEven");
1212
+ LongPrototype.equals = /* @__PURE__ */ __name(function equals(other) {
1213
+ if (!isLong(other)) other = fromValue(other);
1214
+ if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
1215
+ return false;
1216
+ return this.high === other.high && this.low === other.low;
1217
+ }, "equals");
1218
+ LongPrototype.eq = LongPrototype.equals;
1219
+ LongPrototype.notEquals = /* @__PURE__ */ __name(function notEquals(other) {
1220
+ return !this.eq(
1221
+ /* validates */
1222
+ other
1223
+ );
1224
+ }, "notEquals");
1225
+ LongPrototype.neq = LongPrototype.notEquals;
1226
+ LongPrototype.ne = LongPrototype.notEquals;
1227
+ LongPrototype.lessThan = /* @__PURE__ */ __name(function lessThan(other) {
1228
+ return this.comp(
1229
+ /* validates */
1230
+ other
1231
+ ) < 0;
1232
+ }, "lessThan");
1233
+ LongPrototype.lt = LongPrototype.lessThan;
1234
+ LongPrototype.lessThanOrEqual = /* @__PURE__ */ __name(function lessThanOrEqual(other) {
1235
+ return this.comp(
1236
+ /* validates */
1237
+ other
1238
+ ) <= 0;
1239
+ }, "lessThanOrEqual");
1240
+ LongPrototype.lte = LongPrototype.lessThanOrEqual;
1241
+ LongPrototype.le = LongPrototype.lessThanOrEqual;
1242
+ LongPrototype.greaterThan = /* @__PURE__ */ __name(function greaterThan(other) {
1243
+ return this.comp(
1244
+ /* validates */
1245
+ other
1246
+ ) > 0;
1247
+ }, "greaterThan");
1248
+ LongPrototype.gt = LongPrototype.greaterThan;
1249
+ LongPrototype.greaterThanOrEqual = /* @__PURE__ */ __name(function greaterThanOrEqual(other) {
1250
+ return this.comp(
1251
+ /* validates */
1252
+ other
1253
+ ) >= 0;
1254
+ }, "greaterThanOrEqual");
1255
+ LongPrototype.gte = LongPrototype.greaterThanOrEqual;
1256
+ LongPrototype.ge = LongPrototype.greaterThanOrEqual;
1257
+ LongPrototype.compare = /* @__PURE__ */ __name(function compare(other) {
1258
+ if (!isLong(other)) other = fromValue(other);
1259
+ if (this.eq(other)) return 0;
1260
+ var thisNeg = this.isNegative(), otherNeg = other.isNegative();
1261
+ if (thisNeg && !otherNeg) return -1;
1262
+ if (!thisNeg && otherNeg) return 1;
1263
+ if (!this.unsigned) return this.sub(other).isNegative() ? -1 : 1;
1264
+ return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1;
1265
+ }, "compare");
1266
+ LongPrototype.comp = LongPrototype.compare;
1267
+ LongPrototype.negate = /* @__PURE__ */ __name(function negate() {
1268
+ if (!this.unsigned && this.eq(MIN_VALUE)) return MIN_VALUE;
1269
+ return this.not().add(ONE);
1270
+ }, "negate");
1271
+ LongPrototype.neg = LongPrototype.negate;
1272
+ LongPrototype.add = /* @__PURE__ */ __name(function add(addend) {
1273
+ if (!isLong(addend)) addend = fromValue(addend);
1274
+ var a48 = this.high >>> 16;
1275
+ var a32 = this.high & 65535;
1276
+ var a16 = this.low >>> 16;
1277
+ var a00 = this.low & 65535;
1278
+ var b48 = addend.high >>> 16;
1279
+ var b32 = addend.high & 65535;
1280
+ var b16 = addend.low >>> 16;
1281
+ var b00 = addend.low & 65535;
1282
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
1283
+ c00 += a00 + b00;
1284
+ c16 += c00 >>> 16;
1285
+ c00 &= 65535;
1286
+ c16 += a16 + b16;
1287
+ c32 += c16 >>> 16;
1288
+ c16 &= 65535;
1289
+ c32 += a32 + b32;
1290
+ c48 += c32 >>> 16;
1291
+ c32 &= 65535;
1292
+ c48 += a48 + b48;
1293
+ c48 &= 65535;
1294
+ return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
1295
+ }, "add");
1296
+ LongPrototype.subtract = /* @__PURE__ */ __name(function subtract(subtrahend) {
1297
+ if (!isLong(subtrahend)) subtrahend = fromValue(subtrahend);
1298
+ return this.add(subtrahend.neg());
1299
+ }, "subtract");
1300
+ LongPrototype.sub = LongPrototype.subtract;
1301
+ LongPrototype.multiply = /* @__PURE__ */ __name(function multiply(multiplier) {
1302
+ if (this.isZero()) return this;
1303
+ if (!isLong(multiplier)) multiplier = fromValue(multiplier);
1304
+ if (wasm) {
1305
+ var low = wasm["mul"](
1306
+ this.low,
1307
+ this.high,
1308
+ multiplier.low,
1309
+ multiplier.high
1310
+ );
1311
+ return fromBits(low, wasm["get_high"](), this.unsigned);
1312
+ }
1313
+ if (multiplier.isZero()) return this.unsigned ? UZERO : ZERO;
1314
+ if (this.eq(MIN_VALUE)) return multiplier.isOdd() ? MIN_VALUE : ZERO;
1315
+ if (multiplier.eq(MIN_VALUE)) return this.isOdd() ? MIN_VALUE : ZERO;
1316
+ if (this.isNegative()) {
1317
+ if (multiplier.isNegative()) return this.neg().mul(multiplier.neg());
1318
+ else return this.neg().mul(multiplier).neg();
1319
+ } else if (multiplier.isNegative())
1320
+ return this.mul(multiplier.neg()).neg();
1321
+ if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))
1322
+ return fromNumber(
1323
+ this.toNumber() * multiplier.toNumber(),
1324
+ this.unsigned
1325
+ );
1326
+ var a48 = this.high >>> 16;
1327
+ var a32 = this.high & 65535;
1328
+ var a16 = this.low >>> 16;
1329
+ var a00 = this.low & 65535;
1330
+ var b48 = multiplier.high >>> 16;
1331
+ var b32 = multiplier.high & 65535;
1332
+ var b16 = multiplier.low >>> 16;
1333
+ var b00 = multiplier.low & 65535;
1334
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
1335
+ c00 += a00 * b00;
1336
+ c16 += c00 >>> 16;
1337
+ c00 &= 65535;
1338
+ c16 += a16 * b00;
1339
+ c32 += c16 >>> 16;
1340
+ c16 &= 65535;
1341
+ c16 += a00 * b16;
1342
+ c32 += c16 >>> 16;
1343
+ c16 &= 65535;
1344
+ c32 += a32 * b00;
1345
+ c48 += c32 >>> 16;
1346
+ c32 &= 65535;
1347
+ c32 += a16 * b16;
1348
+ c48 += c32 >>> 16;
1349
+ c32 &= 65535;
1350
+ c32 += a00 * b32;
1351
+ c48 += c32 >>> 16;
1352
+ c32 &= 65535;
1353
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
1354
+ c48 &= 65535;
1355
+ return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
1356
+ }, "multiply");
1357
+ LongPrototype.mul = LongPrototype.multiply;
1358
+ LongPrototype.divide = /* @__PURE__ */ __name(function divide(divisor) {
1359
+ if (!isLong(divisor)) divisor = fromValue(divisor);
1360
+ if (divisor.isZero()) throw Error("division by zero");
1361
+ if (wasm) {
1362
+ if (!this.unsigned && this.high === -2147483648 && divisor.low === -1 && divisor.high === -1) {
1363
+ return this;
1364
+ }
1365
+ var low = (this.unsigned ? wasm["div_u"] : wasm["div_s"])(
1366
+ this.low,
1367
+ this.high,
1368
+ divisor.low,
1369
+ divisor.high
1370
+ );
1371
+ return fromBits(low, wasm["get_high"](), this.unsigned);
1372
+ }
1373
+ if (this.isZero()) return this.unsigned ? UZERO : ZERO;
1374
+ var approx, rem, res;
1375
+ if (!this.unsigned) {
1376
+ if (this.eq(MIN_VALUE)) {
1377
+ if (divisor.eq(ONE) || divisor.eq(NEG_ONE))
1378
+ return MIN_VALUE;
1379
+ else if (divisor.eq(MIN_VALUE)) return ONE;
1380
+ else {
1381
+ var halfThis = this.shr(1);
1382
+ approx = halfThis.div(divisor).shl(1);
1383
+ if (approx.eq(ZERO)) {
1384
+ return divisor.isNegative() ? ONE : NEG_ONE;
1385
+ } else {
1386
+ rem = this.sub(divisor.mul(approx));
1387
+ res = approx.add(rem.div(divisor));
1388
+ return res;
1389
+ }
1390
+ }
1391
+ } else if (divisor.eq(MIN_VALUE)) return this.unsigned ? UZERO : ZERO;
1392
+ if (this.isNegative()) {
1393
+ if (divisor.isNegative()) return this.neg().div(divisor.neg());
1394
+ return this.neg().div(divisor).neg();
1395
+ } else if (divisor.isNegative()) return this.div(divisor.neg()).neg();
1396
+ res = ZERO;
1397
+ } else {
1398
+ if (!divisor.unsigned) divisor = divisor.toUnsigned();
1399
+ if (divisor.gt(this)) return UZERO;
1400
+ if (divisor.gt(this.shru(1)))
1401
+ return UONE;
1402
+ res = UZERO;
1403
+ }
1404
+ rem = this;
1405
+ while (rem.gte(divisor)) {
1406
+ approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
1407
+ var log2 = Math.ceil(Math.log(approx) / Math.LN2), delta = log2 <= 48 ? 1 : pow_dbl(2, log2 - 48), approxRes = fromNumber(approx), approxRem = approxRes.mul(divisor);
1408
+ while (approxRem.isNegative() || approxRem.gt(rem)) {
1409
+ approx -= delta;
1410
+ approxRes = fromNumber(approx, this.unsigned);
1411
+ approxRem = approxRes.mul(divisor);
1412
+ }
1413
+ if (approxRes.isZero()) approxRes = ONE;
1414
+ res = res.add(approxRes);
1415
+ rem = rem.sub(approxRem);
1416
+ }
1417
+ return res;
1418
+ }, "divide");
1419
+ LongPrototype.div = LongPrototype.divide;
1420
+ LongPrototype.modulo = /* @__PURE__ */ __name(function modulo(divisor) {
1421
+ if (!isLong(divisor)) divisor = fromValue(divisor);
1422
+ if (wasm) {
1423
+ var low = (this.unsigned ? wasm["rem_u"] : wasm["rem_s"])(
1424
+ this.low,
1425
+ this.high,
1426
+ divisor.low,
1427
+ divisor.high
1428
+ );
1429
+ return fromBits(low, wasm["get_high"](), this.unsigned);
1430
+ }
1431
+ return this.sub(this.div(divisor).mul(divisor));
1432
+ }, "modulo");
1433
+ LongPrototype.mod = LongPrototype.modulo;
1434
+ LongPrototype.rem = LongPrototype.modulo;
1435
+ LongPrototype.not = /* @__PURE__ */ __name(function not() {
1436
+ return fromBits(~this.low, ~this.high, this.unsigned);
1437
+ }, "not");
1438
+ LongPrototype.countLeadingZeros = /* @__PURE__ */ __name(function countLeadingZeros() {
1439
+ return this.high ? Math.clz32(this.high) : Math.clz32(this.low) + 32;
1440
+ }, "countLeadingZeros");
1441
+ LongPrototype.clz = LongPrototype.countLeadingZeros;
1442
+ LongPrototype.countTrailingZeros = /* @__PURE__ */ __name(function countTrailingZeros() {
1443
+ return this.low ? ctz32(this.low) : ctz32(this.high) + 32;
1444
+ }, "countTrailingZeros");
1445
+ LongPrototype.ctz = LongPrototype.countTrailingZeros;
1446
+ LongPrototype.and = /* @__PURE__ */ __name(function and(other) {
1447
+ if (!isLong(other)) other = fromValue(other);
1448
+ return fromBits(
1449
+ this.low & other.low,
1450
+ this.high & other.high,
1451
+ this.unsigned
1452
+ );
1453
+ }, "and");
1454
+ LongPrototype.or = /* @__PURE__ */ __name(function or(other) {
1455
+ if (!isLong(other)) other = fromValue(other);
1456
+ return fromBits(
1457
+ this.low | other.low,
1458
+ this.high | other.high,
1459
+ this.unsigned
1460
+ );
1461
+ }, "or");
1462
+ LongPrototype.xor = /* @__PURE__ */ __name(function xor(other) {
1463
+ if (!isLong(other)) other = fromValue(other);
1464
+ return fromBits(
1465
+ this.low ^ other.low,
1466
+ this.high ^ other.high,
1467
+ this.unsigned
1468
+ );
1469
+ }, "xor");
1470
+ LongPrototype.shiftLeft = /* @__PURE__ */ __name(function shiftLeft(numBits) {
1471
+ if (isLong(numBits)) numBits = numBits.toInt();
1472
+ if ((numBits &= 63) === 0) return this;
1473
+ else if (numBits < 32)
1474
+ return fromBits(
1475
+ this.low << numBits,
1476
+ this.high << numBits | this.low >>> 32 - numBits,
1477
+ this.unsigned
1478
+ );
1479
+ else return fromBits(0, this.low << numBits - 32, this.unsigned);
1480
+ }, "shiftLeft");
1481
+ LongPrototype.shl = LongPrototype.shiftLeft;
1482
+ LongPrototype.shiftRight = /* @__PURE__ */ __name(function shiftRight(numBits) {
1483
+ if (isLong(numBits)) numBits = numBits.toInt();
1484
+ if ((numBits &= 63) === 0) return this;
1485
+ else if (numBits < 32)
1486
+ return fromBits(
1487
+ this.low >>> numBits | this.high << 32 - numBits,
1488
+ this.high >> numBits,
1489
+ this.unsigned
1490
+ );
1491
+ else
1492
+ return fromBits(
1493
+ this.high >> numBits - 32,
1494
+ this.high >= 0 ? 0 : -1,
1495
+ this.unsigned
1496
+ );
1497
+ }, "shiftRight");
1498
+ LongPrototype.shr = LongPrototype.shiftRight;
1499
+ LongPrototype.shiftRightUnsigned = /* @__PURE__ */ __name(function shiftRightUnsigned(numBits) {
1500
+ if (isLong(numBits)) numBits = numBits.toInt();
1501
+ if ((numBits &= 63) === 0) return this;
1502
+ if (numBits < 32)
1503
+ return fromBits(
1504
+ this.low >>> numBits | this.high << 32 - numBits,
1505
+ this.high >>> numBits,
1506
+ this.unsigned
1507
+ );
1508
+ if (numBits === 32) return fromBits(this.high, 0, this.unsigned);
1509
+ return fromBits(this.high >>> numBits - 32, 0, this.unsigned);
1510
+ }, "shiftRightUnsigned");
1511
+ LongPrototype.shru = LongPrototype.shiftRightUnsigned;
1512
+ LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;
1513
+ LongPrototype.rotateLeft = /* @__PURE__ */ __name(function rotateLeft(numBits) {
1514
+ var b;
1515
+ if (isLong(numBits)) numBits = numBits.toInt();
1516
+ if ((numBits &= 63) === 0) return this;
1517
+ if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);
1518
+ if (numBits < 32) {
1519
+ b = 32 - numBits;
1520
+ return fromBits(
1521
+ this.low << numBits | this.high >>> b,
1522
+ this.high << numBits | this.low >>> b,
1523
+ this.unsigned
1524
+ );
1525
+ }
1526
+ numBits -= 32;
1527
+ b = 32 - numBits;
1528
+ return fromBits(
1529
+ this.high << numBits | this.low >>> b,
1530
+ this.low << numBits | this.high >>> b,
1531
+ this.unsigned
1532
+ );
1533
+ }, "rotateLeft");
1534
+ LongPrototype.rotl = LongPrototype.rotateLeft;
1535
+ LongPrototype.rotateRight = /* @__PURE__ */ __name(function rotateRight(numBits) {
1536
+ var b;
1537
+ if (isLong(numBits)) numBits = numBits.toInt();
1538
+ if ((numBits &= 63) === 0) return this;
1539
+ if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);
1540
+ if (numBits < 32) {
1541
+ b = 32 - numBits;
1542
+ return fromBits(
1543
+ this.high << b | this.low >>> numBits,
1544
+ this.low << b | this.high >>> numBits,
1545
+ this.unsigned
1546
+ );
1547
+ }
1548
+ numBits -= 32;
1549
+ b = 32 - numBits;
1550
+ return fromBits(
1551
+ this.low << b | this.high >>> numBits,
1552
+ this.high << b | this.low >>> numBits,
1553
+ this.unsigned
1554
+ );
1555
+ }, "rotateRight");
1556
+ LongPrototype.rotr = LongPrototype.rotateRight;
1557
+ LongPrototype.toSigned = /* @__PURE__ */ __name(function toSigned() {
1558
+ if (!this.unsigned) return this;
1559
+ return fromBits(this.low, this.high, false);
1560
+ }, "toSigned");
1561
+ LongPrototype.toUnsigned = /* @__PURE__ */ __name(function toUnsigned() {
1562
+ if (this.unsigned) return this;
1563
+ return fromBits(this.low, this.high, true);
1564
+ }, "toUnsigned");
1565
+ LongPrototype.toBytes = /* @__PURE__ */ __name(function toBytes(le) {
1566
+ return le ? this.toBytesLE() : this.toBytesBE();
1567
+ }, "toBytes");
1568
+ LongPrototype.toBytesLE = /* @__PURE__ */ __name(function toBytesLE() {
1569
+ var hi = this.high, lo = this.low;
1570
+ return [
1571
+ lo & 255,
1572
+ lo >>> 8 & 255,
1573
+ lo >>> 16 & 255,
1574
+ lo >>> 24,
1575
+ hi & 255,
1576
+ hi >>> 8 & 255,
1577
+ hi >>> 16 & 255,
1578
+ hi >>> 24
1579
+ ];
1580
+ }, "toBytesLE");
1581
+ LongPrototype.toBytesBE = /* @__PURE__ */ __name(function toBytesBE() {
1582
+ var hi = this.high, lo = this.low;
1583
+ return [
1584
+ hi >>> 24,
1585
+ hi >>> 16 & 255,
1586
+ hi >>> 8 & 255,
1587
+ hi & 255,
1588
+ lo >>> 24,
1589
+ lo >>> 16 & 255,
1590
+ lo >>> 8 & 255,
1591
+ lo & 255
1592
+ ];
1593
+ }, "toBytesBE");
1594
+ Long.fromBytes = /* @__PURE__ */ __name(function fromBytes(bytes, unsigned, le) {
1595
+ return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);
1596
+ }, "fromBytes");
1597
+ Long.fromBytesLE = /* @__PURE__ */ __name(function fromBytesLE(bytes, unsigned) {
1598
+ return new Long(
1599
+ bytes[0] | bytes[1] << 8 | bytes[2] << 16 | bytes[3] << 24,
1600
+ bytes[4] | bytes[5] << 8 | bytes[6] << 16 | bytes[7] << 24,
1601
+ unsigned
1602
+ );
1603
+ }, "fromBytesLE");
1604
+ Long.fromBytesBE = /* @__PURE__ */ __name(function fromBytesBE(bytes, unsigned) {
1605
+ return new Long(
1606
+ bytes[4] << 24 | bytes[5] << 16 | bytes[6] << 8 | bytes[7],
1607
+ bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3],
1608
+ unsigned
1609
+ );
1610
+ }, "fromBytesBE");
1611
+ if (typeof BigInt === "function") {
1612
+ Long.fromBigInt = /* @__PURE__ */ __name(function fromBigInt(value, unsigned) {
1613
+ var lowBits = Number(BigInt.asIntN(32, value));
1614
+ var highBits = Number(BigInt.asIntN(32, value >> BigInt(32)));
1615
+ return fromBits(lowBits, highBits, unsigned);
1616
+ }, "fromBigInt");
1617
+ Long.fromValue = /* @__PURE__ */ __name(function fromValueWithBigInt(value, unsigned) {
1618
+ if (typeof value === "bigint") return Long.fromBigInt(value, unsigned);
1619
+ return fromValue(value, unsigned);
1620
+ }, "fromValueWithBigInt");
1621
+ LongPrototype.toBigInt = /* @__PURE__ */ __name(function toBigInt() {
1622
+ var lowBigInt = BigInt(this.low >>> 0);
1623
+ var highBigInt = BigInt(this.unsigned ? this.high >>> 0 : this.high);
1624
+ return highBigInt << BigInt(32) | lowBigInt;
1625
+ }, "toBigInt");
1626
+ }
1627
+ var _default = _exports.default = Long;
1628
+ }
1629
+ );
1630
+ }
1631
+ });
1632
+
1633
+ // node_modules/protobufjs/src/util/minimal.js
1634
+ var require_minimal = __commonJS({
1635
+ "node_modules/protobufjs/src/util/minimal.js"(exports) {
1636
+ "use strict";
1637
+ init_esbuild_shims();
1638
+ var util = exports;
1639
+ util.asPromise = require_aspromise();
1640
+ util.base64 = require_base64();
1641
+ util.EventEmitter = require_eventemitter();
1642
+ util.float = require_float();
1643
+ util.inquire = require_inquire();
1644
+ util.utf8 = require_utf8();
1645
+ util.pool = require_pool();
1646
+ util.LongBits = require_longbits();
1647
+ function isUnsafeProperty(key) {
1648
+ return key === "__proto__" || key === "prototype" || key === "constructor";
1649
+ }
1650
+ __name(isUnsafeProperty, "isUnsafeProperty");
1651
+ util.isUnsafeProperty = isUnsafeProperty;
1652
+ util.isNode = Boolean(typeof globalThis !== "undefined" && globalThis && globalThis.process && globalThis.process.versions && globalThis.process.versions.node);
1653
+ util.global = util.isNode && globalThis || typeof window !== "undefined" && window || typeof self !== "undefined" && self || exports;
1654
+ util.emptyArray = Object.freeze ? Object.freeze([]) : (
1655
+ /* istanbul ignore next */
1656
+ []
1657
+ );
1658
+ util.emptyObject = Object.freeze ? Object.freeze({}) : (
1659
+ /* istanbul ignore next */
1660
+ {}
1661
+ );
1662
+ util.isInteger = Number.isInteger || /* istanbul ignore next */
1663
+ /* @__PURE__ */ __name(function isInteger(value) {
1664
+ return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
1665
+ }, "isInteger");
1666
+ util.isString = /* @__PURE__ */ __name(function isString(value) {
1667
+ return typeof value === "string" || value instanceof String;
1668
+ }, "isString");
1669
+ util.isObject = /* @__PURE__ */ __name(function isObject(value) {
1670
+ return value && typeof value === "object";
1671
+ }, "isObject");
1672
+ util.isset = /**
1673
+ * Checks if a property on a message is considered to be present.
1674
+ * @param {Object} obj Plain object or message instance
1675
+ * @param {string} prop Property name
1676
+ * @returns {boolean} `true` if considered to be present, otherwise `false`
1677
+ */
1678
+ util.isSet = /* @__PURE__ */ __name(function isSet(obj, prop) {
1679
+ var value = obj[prop];
1680
+ if (value != null && obj.hasOwnProperty(prop))
1681
+ return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;
1682
+ return false;
1683
+ }, "isSet");
1684
+ util.Buffer = function() {
1685
+ try {
1686
+ var Buffer = util.global.Buffer;
1687
+ return Buffer.prototype.utf8Write ? Buffer : (
1688
+ /* istanbul ignore next */
1689
+ null
1690
+ );
1691
+ } catch (e) {
1692
+ return null;
1693
+ }
1694
+ }();
1695
+ util._Buffer_from = null;
1696
+ util._Buffer_allocUnsafe = null;
1697
+ util.newBuffer = /* @__PURE__ */ __name(function newBuffer(sizeOrArray) {
1698
+ return typeof sizeOrArray === "number" ? util.Buffer ? util._Buffer_allocUnsafe(sizeOrArray) : new util.Array(sizeOrArray) : util.Buffer ? util._Buffer_from(sizeOrArray) : typeof Uint8Array === "undefined" ? sizeOrArray : new Uint8Array(sizeOrArray);
1699
+ }, "newBuffer");
1700
+ util.Array = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
1701
+ util.Long = /* istanbul ignore next */
1702
+ util.global.dcodeIO && /* istanbul ignore next */
1703
+ util.global.dcodeIO.Long || /* istanbul ignore next */
1704
+ util.global.Long || function() {
1705
+ try {
1706
+ var Long = require_umd();
1707
+ return Long && Long.isLong ? Long : null;
1708
+ } catch (e) {
1709
+ return null;
1710
+ }
1711
+ }();
1712
+ util.key2Re = /^true|false|0|1$/;
1713
+ util.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
1714
+ util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
1715
+ util.longToHash = /* @__PURE__ */ __name(function longToHash(value) {
1716
+ return value ? util.LongBits.from(value).toHash() : util.LongBits.zeroHash;
1717
+ }, "longToHash");
1718
+ util.longFromHash = /* @__PURE__ */ __name(function longFromHash(hash, unsigned) {
1719
+ var bits = util.LongBits.fromHash(hash);
1720
+ if (util.Long)
1721
+ return util.Long.fromBits(bits.lo, bits.hi, unsigned);
1722
+ return bits.toNumber(Boolean(unsigned));
1723
+ }, "longFromHash");
1724
+ function merge(dst) {
1725
+ var ifNotSet = typeof arguments[arguments.length - 1] === "boolean", limit = ifNotSet ? arguments.length - 1 : arguments.length;
1726
+ ifNotSet = ifNotSet && arguments[arguments.length - 1];
1727
+ for (var a = 1; a < limit; ++a) {
1728
+ var src = arguments[a];
1729
+ if (!src)
1730
+ continue;
1731
+ for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)
1732
+ if (!isUnsafeProperty(keys[i]) && (dst[keys[i]] === void 0 || !ifNotSet))
1733
+ dst[keys[i]] = src[keys[i]];
1734
+ }
1735
+ return dst;
1736
+ }
1737
+ __name(merge, "merge");
1738
+ util.merge = merge;
1739
+ util.nestingLimit = 32;
1740
+ util.recursionLimit = 100;
1741
+ util.makeProp = /* @__PURE__ */ __name(function makeProp(obj, key) {
1742
+ Object.defineProperty(obj, key, {
1743
+ enumerable: true,
1744
+ configurable: true,
1745
+ writable: true
1746
+ });
1747
+ }, "makeProp");
1748
+ util.lcFirst = /* @__PURE__ */ __name(function lcFirst(str) {
1749
+ return str.charAt(0).toLowerCase() + str.substring(1);
1750
+ }, "lcFirst");
1751
+ function newError(name) {
1752
+ function CustomError(message, properties) {
1753
+ if (!(this instanceof CustomError))
1754
+ return new CustomError(message, properties);
1755
+ Object.defineProperty(this, "message", { get: /* @__PURE__ */ __name(function() {
1756
+ return message;
1757
+ }, "get") });
1758
+ if (Error.captureStackTrace)
1759
+ Error.captureStackTrace(this, CustomError);
1760
+ else
1761
+ Object.defineProperty(this, "stack", { value: new Error().stack || "" });
1762
+ if (properties)
1763
+ merge(this, properties);
1764
+ }
1765
+ __name(CustomError, "CustomError");
1766
+ CustomError.prototype = Object.create(Error.prototype, {
1767
+ constructor: {
1768
+ value: CustomError,
1769
+ writable: true,
1770
+ enumerable: false,
1771
+ configurable: true
1772
+ },
1773
+ name: {
1774
+ get: /* @__PURE__ */ __name(function get() {
1775
+ return name;
1776
+ }, "get"),
1777
+ set: void 0,
1778
+ enumerable: false,
1779
+ // configurable: false would accurately preserve the behavior of
1780
+ // the original, but I'm guessing that was not intentional.
1781
+ // For an actual error subclass, this property would
1782
+ // be configurable.
1783
+ configurable: true
1784
+ },
1785
+ toString: {
1786
+ value: /* @__PURE__ */ __name(function value() {
1787
+ return this.name + ": " + this.message;
1788
+ }, "value"),
1789
+ writable: true,
1790
+ enumerable: false,
1791
+ configurable: true
1792
+ }
1793
+ });
1794
+ return CustomError;
1795
+ }
1796
+ __name(newError, "newError");
1797
+ util.newError = newError;
1798
+ util.ProtocolError = newError("ProtocolError");
1799
+ util.oneOfGetter = /* @__PURE__ */ __name(function getOneOf(fieldNames) {
1800
+ var fieldMap = {};
1801
+ for (var i = 0; i < fieldNames.length; ++i)
1802
+ fieldMap[fieldNames[i]] = 1;
1803
+ return function() {
1804
+ for (var keys = Object.keys(this), i2 = keys.length - 1; i2 > -1; --i2)
1805
+ if (fieldMap[keys[i2]] === 1 && this[keys[i2]] !== void 0 && this[keys[i2]] !== null)
1806
+ return keys[i2];
1807
+ };
1808
+ }, "getOneOf");
1809
+ util.oneOfSetter = /* @__PURE__ */ __name(function setOneOf(fieldNames) {
1810
+ return function(name) {
1811
+ for (var i = 0; i < fieldNames.length; ++i)
1812
+ if (fieldNames[i] !== name)
1813
+ delete this[fieldNames[i]];
1814
+ };
1815
+ }, "setOneOf");
1816
+ util.toJSONOptions = {
1817
+ longs: String,
1818
+ enums: String,
1819
+ bytes: String,
1820
+ json: true
1821
+ };
1822
+ util._configure = function() {
1823
+ var Buffer = util.Buffer;
1824
+ if (!Buffer) {
1825
+ util._Buffer_from = util._Buffer_allocUnsafe = null;
1826
+ return;
1827
+ }
1828
+ util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || /* istanbul ignore next */
1829
+ /* @__PURE__ */ __name(function Buffer_from(value, encoding) {
1830
+ return new Buffer(value, encoding);
1831
+ }, "Buffer_from");
1832
+ util._Buffer_allocUnsafe = Buffer.allocUnsafe || /* istanbul ignore next */
1833
+ /* @__PURE__ */ __name(function Buffer_allocUnsafe(size) {
1834
+ return new Buffer(size);
1835
+ }, "Buffer_allocUnsafe");
1836
+ };
1837
+ }
1838
+ });
1839
+
1840
+ // node_modules/protobufjs/src/writer.js
1841
+ var require_writer = __commonJS({
1842
+ "node_modules/protobufjs/src/writer.js"(exports, module) {
1843
+ "use strict";
1844
+ init_esbuild_shims();
1845
+ module.exports = Writer;
1846
+ var util = require_minimal();
1847
+ var BufferWriter;
1848
+ var LongBits = util.LongBits;
1849
+ var base64 = util.base64;
1850
+ var utf8 = util.utf8;
1851
+ function Op(fn, len, val) {
1852
+ this.fn = fn;
1853
+ this.len = len;
1854
+ this.next = void 0;
1855
+ this.val = val;
1856
+ }
1857
+ __name(Op, "Op");
1858
+ function noop() {
1859
+ }
1860
+ __name(noop, "noop");
1861
+ function State(writer) {
1862
+ this.head = writer.head;
1863
+ this.tail = writer.tail;
1864
+ this.len = writer.len;
1865
+ this.next = writer.states;
1866
+ }
1867
+ __name(State, "State");
1868
+ function Writer() {
1869
+ this.len = 0;
1870
+ this.head = new Op(noop, 0, 0);
1871
+ this.tail = this.head;
1872
+ this.states = null;
1873
+ }
1874
+ __name(Writer, "Writer");
1875
+ var create = /* @__PURE__ */ __name(function create2() {
1876
+ return util.Buffer ? /* @__PURE__ */ __name(function create_buffer_setup() {
1877
+ return (Writer.create = /* @__PURE__ */ __name(function create_buffer() {
1878
+ return new BufferWriter();
1879
+ }, "create_buffer"))();
1880
+ }, "create_buffer_setup") : /* @__PURE__ */ __name(function create_array() {
1881
+ return new Writer();
1882
+ }, "create_array");
1883
+ }, "create");
1884
+ Writer.create = create();
1885
+ Writer.alloc = /* @__PURE__ */ __name(function alloc(size) {
1886
+ return new util.Array(size);
1887
+ }, "alloc");
1888
+ if (util.Array !== Array)
1889
+ Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
1890
+ Writer.prototype._push = /* @__PURE__ */ __name(function push(fn, len, val) {
1891
+ this.tail = this.tail.next = new Op(fn, len, val);
1892
+ this.len += len;
1893
+ return this;
1894
+ }, "push");
1895
+ function writeByte(val, buf, pos) {
1896
+ buf[pos] = val & 255;
1897
+ }
1898
+ __name(writeByte, "writeByte");
1899
+ function writeVarint32(val, buf, pos) {
1900
+ while (val > 127) {
1901
+ buf[pos++] = val & 127 | 128;
1902
+ val >>>= 7;
1903
+ }
1904
+ buf[pos] = val;
1905
+ }
1906
+ __name(writeVarint32, "writeVarint32");
1907
+ function VarintOp(len, val) {
1908
+ this.len = len;
1909
+ this.next = void 0;
1910
+ this.val = val;
1911
+ }
1912
+ __name(VarintOp, "VarintOp");
1913
+ VarintOp.prototype = Object.create(Op.prototype);
1914
+ VarintOp.prototype.fn = writeVarint32;
1915
+ Writer.prototype.uint32 = /* @__PURE__ */ __name(function write_uint32(value) {
1916
+ this.len += (this.tail = this.tail.next = new VarintOp(
1917
+ (value = value >>> 0) < 128 ? 1 : value < 16384 ? 2 : value < 2097152 ? 3 : value < 268435456 ? 4 : 5,
1918
+ value
1919
+ )).len;
1920
+ return this;
1921
+ }, "write_uint32");
1922
+ Writer.prototype.int32 = /* @__PURE__ */ __name(function write_int32(value) {
1923
+ return (value |= 0) < 0 ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) : this.uint32(value);
1924
+ }, "write_int32");
1925
+ Writer.prototype.sint32 = /* @__PURE__ */ __name(function write_sint32(value) {
1926
+ return this.uint32((value << 1 ^ value >> 31) >>> 0);
1927
+ }, "write_sint32");
1928
+ function writeVarint64(val, buf, pos) {
1929
+ var lo = val.lo, hi = val.hi;
1930
+ while (hi) {
1931
+ buf[pos++] = lo & 127 | 128;
1932
+ lo = (lo >>> 7 | hi << 25) >>> 0;
1933
+ hi >>>= 7;
1934
+ }
1935
+ while (lo > 127) {
1936
+ buf[pos++] = lo & 127 | 128;
1937
+ lo = lo >>> 7;
1938
+ }
1939
+ buf[pos++] = lo;
1940
+ }
1941
+ __name(writeVarint64, "writeVarint64");
1942
+ Writer.prototype.uint64 = /* @__PURE__ */ __name(function write_uint64(value) {
1943
+ var bits = LongBits.from(value);
1944
+ return this._push(writeVarint64, bits.length(), bits);
1945
+ }, "write_uint64");
1946
+ Writer.prototype.int64 = Writer.prototype.uint64;
1947
+ Writer.prototype.sint64 = /* @__PURE__ */ __name(function write_sint64(value) {
1948
+ var bits = LongBits.from(value).zzEncode();
1949
+ return this._push(writeVarint64, bits.length(), bits);
1950
+ }, "write_sint64");
1951
+ Writer.prototype.bool = /* @__PURE__ */ __name(function write_bool(value) {
1952
+ return this._push(writeByte, 1, value ? 1 : 0);
1953
+ }, "write_bool");
1954
+ function writeFixed32(val, buf, pos) {
1955
+ buf[pos] = val & 255;
1956
+ buf[pos + 1] = val >>> 8 & 255;
1957
+ buf[pos + 2] = val >>> 16 & 255;
1958
+ buf[pos + 3] = val >>> 24;
1959
+ }
1960
+ __name(writeFixed32, "writeFixed32");
1961
+ Writer.prototype.fixed32 = /* @__PURE__ */ __name(function write_fixed32(value) {
1962
+ return this._push(writeFixed32, 4, value >>> 0);
1963
+ }, "write_fixed32");
1964
+ Writer.prototype.sfixed32 = Writer.prototype.fixed32;
1965
+ Writer.prototype.fixed64 = /* @__PURE__ */ __name(function write_fixed64(value) {
1966
+ var bits = LongBits.from(value);
1967
+ return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
1968
+ }, "write_fixed64");
1969
+ Writer.prototype.sfixed64 = Writer.prototype.fixed64;
1970
+ Writer.prototype.float = /* @__PURE__ */ __name(function write_float(value) {
1971
+ return this._push(util.float.writeFloatLE, 4, value);
1972
+ }, "write_float");
1973
+ Writer.prototype.double = /* @__PURE__ */ __name(function write_double(value) {
1974
+ return this._push(util.float.writeDoubleLE, 8, value);
1975
+ }, "write_double");
1976
+ var writeBytes = util.Array.prototype.set ? /* @__PURE__ */ __name(function writeBytes_set(val, buf, pos) {
1977
+ buf.set(val, pos);
1978
+ }, "writeBytes_set") : /* @__PURE__ */ __name(function writeBytes_for(val, buf, pos) {
1979
+ for (var i = 0; i < val.length; ++i)
1980
+ buf[pos + i] = val[i];
1981
+ }, "writeBytes_for");
1982
+ Writer.prototype.bytes = /* @__PURE__ */ __name(function write_bytes(value) {
1983
+ var len = value.length >>> 0;
1984
+ if (!len)
1985
+ return this._push(writeByte, 1, 0);
1986
+ if (util.isString(value)) {
1987
+ var buf = Writer.alloc(len = base64.length(value));
1988
+ base64.decode(value, buf, 0);
1989
+ value = buf;
1990
+ }
1991
+ return this.uint32(len)._push(writeBytes, len, value);
1992
+ }, "write_bytes");
1993
+ Writer.prototype.string = /* @__PURE__ */ __name(function write_string(value) {
1994
+ var len = utf8.length(value);
1995
+ return len ? this.uint32(len)._push(utf8.write, len, value) : this._push(writeByte, 1, 0);
1996
+ }, "write_string");
1997
+ Writer.prototype.fork = /* @__PURE__ */ __name(function fork() {
1998
+ this.states = new State(this);
1999
+ this.head = this.tail = new Op(noop, 0, 0);
2000
+ this.len = 0;
2001
+ return this;
2002
+ }, "fork");
2003
+ Writer.prototype.reset = /* @__PURE__ */ __name(function reset() {
2004
+ if (this.states) {
2005
+ this.head = this.states.head;
2006
+ this.tail = this.states.tail;
2007
+ this.len = this.states.len;
2008
+ this.states = this.states.next;
2009
+ } else {
2010
+ this.head = this.tail = new Op(noop, 0, 0);
2011
+ this.len = 0;
2012
+ }
2013
+ return this;
2014
+ }, "reset");
2015
+ Writer.prototype.ldelim = /* @__PURE__ */ __name(function ldelim() {
2016
+ var head = this.head, tail = this.tail, len = this.len;
2017
+ this.reset().uint32(len);
2018
+ if (len) {
2019
+ this.tail.next = head.next;
2020
+ this.tail = tail;
2021
+ this.len += len;
2022
+ }
2023
+ return this;
2024
+ }, "ldelim");
2025
+ Writer.prototype.finish = /* @__PURE__ */ __name(function finish() {
2026
+ var head = this.head.next, buf = this.constructor.alloc(this.len), pos = 0;
2027
+ while (head) {
2028
+ head.fn(head.val, buf, pos);
2029
+ pos += head.len;
2030
+ head = head.next;
2031
+ }
2032
+ return buf;
2033
+ }, "finish");
2034
+ Writer._configure = function(BufferWriter_) {
2035
+ BufferWriter = BufferWriter_;
2036
+ Writer.create = create();
2037
+ BufferWriter._configure();
2038
+ };
2039
+ }
2040
+ });
2041
+
2042
+ // node_modules/protobufjs/src/writer_buffer.js
2043
+ var require_writer_buffer = __commonJS({
2044
+ "node_modules/protobufjs/src/writer_buffer.js"(exports, module) {
2045
+ "use strict";
2046
+ init_esbuild_shims();
2047
+ module.exports = BufferWriter;
2048
+ var Writer = require_writer();
2049
+ (BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
2050
+ var util = require_minimal();
2051
+ function BufferWriter() {
2052
+ Writer.call(this);
2053
+ }
2054
+ __name(BufferWriter, "BufferWriter");
2055
+ BufferWriter._configure = function() {
2056
+ BufferWriter.alloc = util._Buffer_allocUnsafe;
2057
+ BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" ? /* @__PURE__ */ __name(function writeBytesBuffer_set(val, buf, pos) {
2058
+ buf.set(val, pos);
2059
+ }, "writeBytesBuffer_set") : /* @__PURE__ */ __name(function writeBytesBuffer_copy(val, buf, pos) {
2060
+ if (val.copy)
2061
+ val.copy(buf, pos, 0, val.length);
2062
+ else for (var i = 0; i < val.length; )
2063
+ buf[pos++] = val[i++];
2064
+ }, "writeBytesBuffer_copy");
2065
+ };
2066
+ BufferWriter.prototype.bytes = /* @__PURE__ */ __name(function write_bytes_buffer(value) {
2067
+ if (util.isString(value))
2068
+ value = util._Buffer_from(value, "base64");
2069
+ var len = value.length >>> 0;
2070
+ this.uint32(len);
2071
+ if (len)
2072
+ this._push(BufferWriter.writeBytesBuffer, len, value);
2073
+ return this;
2074
+ }, "write_bytes_buffer");
2075
+ function writeStringBuffer(val, buf, pos) {
2076
+ if (val.length < 40)
2077
+ util.utf8.write(val, buf, pos);
2078
+ else if (buf.utf8Write)
2079
+ buf.utf8Write(val, pos);
2080
+ else
2081
+ buf.write(val, pos);
2082
+ }
2083
+ __name(writeStringBuffer, "writeStringBuffer");
2084
+ BufferWriter.prototype.string = /* @__PURE__ */ __name(function write_string_buffer(value) {
2085
+ var len = util.Buffer.byteLength(value);
2086
+ this.uint32(len);
2087
+ if (len)
2088
+ this._push(writeStringBuffer, len, value);
2089
+ return this;
2090
+ }, "write_string_buffer");
2091
+ BufferWriter._configure();
2092
+ }
2093
+ });
2094
+
2095
+ // node_modules/protobufjs/src/reader.js
2096
+ var require_reader = __commonJS({
2097
+ "node_modules/protobufjs/src/reader.js"(exports, module) {
2098
+ "use strict";
2099
+ init_esbuild_shims();
2100
+ module.exports = Reader;
2101
+ var util = require_minimal();
2102
+ var BufferReader;
2103
+ var LongBits = util.LongBits;
2104
+ var utf8 = util.utf8;
2105
+ function indexOutOfRange(reader, writeLength) {
2106
+ return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len);
2107
+ }
2108
+ __name(indexOutOfRange, "indexOutOfRange");
2109
+ function Reader(buffer) {
2110
+ this.buf = buffer;
2111
+ this.pos = 0;
2112
+ this.len = buffer.length;
2113
+ }
2114
+ __name(Reader, "Reader");
2115
+ var create_array = typeof Uint8Array !== "undefined" ? /* @__PURE__ */ __name(function create_typed_array(buffer) {
2116
+ if (buffer instanceof Uint8Array || Array.isArray(buffer))
2117
+ return new Reader(buffer);
2118
+ throw Error("illegal buffer");
2119
+ }, "create_typed_array") : /* @__PURE__ */ __name(function create_array2(buffer) {
2120
+ if (Array.isArray(buffer))
2121
+ return new Reader(buffer);
2122
+ throw Error("illegal buffer");
2123
+ }, "create_array");
2124
+ var create = /* @__PURE__ */ __name(function create2() {
2125
+ return util.Buffer ? /* @__PURE__ */ __name(function create_buffer_setup(buffer) {
2126
+ return (Reader.create = /* @__PURE__ */ __name(function create_buffer(buffer2) {
2127
+ return util.Buffer.isBuffer(buffer2) ? new BufferReader(buffer2) : create_array(buffer2);
2128
+ }, "create_buffer"))(buffer);
2129
+ }, "create_buffer_setup") : create_array;
2130
+ }, "create");
2131
+ Reader.create = create();
2132
+ Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */
2133
+ util.Array.prototype.slice;
2134
+ Reader.prototype.uint32 = (/* @__PURE__ */ __name(function read_uint32_setup() {
2135
+ var value = 4294967295;
2136
+ return /* @__PURE__ */ __name(function read_uint32() {
2137
+ value = (this.buf[this.pos] & 127) >>> 0;
2138
+ if (this.buf[this.pos++] < 128) return value;
2139
+ value = (value | (this.buf[this.pos] & 127) << 7) >>> 0;
2140
+ if (this.buf[this.pos++] < 128) return value;
2141
+ value = (value | (this.buf[this.pos] & 127) << 14) >>> 0;
2142
+ if (this.buf[this.pos++] < 128) return value;
2143
+ value = (value | (this.buf[this.pos] & 127) << 21) >>> 0;
2144
+ if (this.buf[this.pos++] < 128) return value;
2145
+ value = (value | (this.buf[this.pos] & 15) << 28) >>> 0;
2146
+ if (this.buf[this.pos++] < 128) return value;
2147
+ if ((this.pos += 5) > this.len) {
2148
+ this.pos = this.len;
2149
+ throw indexOutOfRange(this, 10);
2150
+ }
2151
+ return value;
2152
+ }, "read_uint32");
2153
+ }, "read_uint32_setup"))();
2154
+ Reader.prototype.int32 = /* @__PURE__ */ __name(function read_int32() {
2155
+ return this.uint32() | 0;
2156
+ }, "read_int32");
2157
+ Reader.prototype.sint32 = /* @__PURE__ */ __name(function read_sint32() {
2158
+ var value = this.uint32();
2159
+ return value >>> 1 ^ -(value & 1) | 0;
2160
+ }, "read_sint32");
2161
+ function readLongVarint() {
2162
+ var bits = new LongBits(0, 0);
2163
+ var i = 0;
2164
+ if (this.len - this.pos > 4) {
2165
+ for (; i < 4; ++i) {
2166
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
2167
+ if (this.buf[this.pos++] < 128)
2168
+ return bits;
2169
+ }
2170
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;
2171
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;
2172
+ if (this.buf[this.pos++] < 128)
2173
+ return bits;
2174
+ i = 0;
2175
+ } else {
2176
+ for (; i < 3; ++i) {
2177
+ if (this.pos >= this.len)
2178
+ throw indexOutOfRange(this);
2179
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
2180
+ if (this.buf[this.pos++] < 128)
2181
+ return bits;
2182
+ }
2183
+ bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
2184
+ return bits;
2185
+ }
2186
+ if (this.len - this.pos > 4) {
2187
+ for (; i < 5; ++i) {
2188
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
2189
+ if (this.buf[this.pos++] < 128)
2190
+ return bits;
2191
+ }
2192
+ } else {
2193
+ for (; i < 5; ++i) {
2194
+ if (this.pos >= this.len)
2195
+ throw indexOutOfRange(this);
2196
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
2197
+ if (this.buf[this.pos++] < 128)
2198
+ return bits;
2199
+ }
2200
+ }
2201
+ throw Error("invalid varint encoding");
2202
+ }
2203
+ __name(readLongVarint, "readLongVarint");
2204
+ Reader.prototype.bool = /* @__PURE__ */ __name(function read_bool() {
2205
+ return this.uint32() !== 0;
2206
+ }, "read_bool");
2207
+ function readFixed32_end(buf, end) {
2208
+ return (buf[end - 4] | buf[end - 3] << 8 | buf[end - 2] << 16 | buf[end - 1] << 24) >>> 0;
2209
+ }
2210
+ __name(readFixed32_end, "readFixed32_end");
2211
+ Reader.prototype.fixed32 = /* @__PURE__ */ __name(function read_fixed32() {
2212
+ if (this.pos + 4 > this.len)
2213
+ throw indexOutOfRange(this, 4);
2214
+ return readFixed32_end(this.buf, this.pos += 4);
2215
+ }, "read_fixed32");
2216
+ Reader.prototype.sfixed32 = /* @__PURE__ */ __name(function read_sfixed32() {
2217
+ if (this.pos + 4 > this.len)
2218
+ throw indexOutOfRange(this, 4);
2219
+ return readFixed32_end(this.buf, this.pos += 4) | 0;
2220
+ }, "read_sfixed32");
2221
+ function readFixed64() {
2222
+ if (this.pos + 8 > this.len)
2223
+ throw indexOutOfRange(this, 8);
2224
+ return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));
2225
+ }
2226
+ __name(readFixed64, "readFixed64");
2227
+ Reader.prototype.float = /* @__PURE__ */ __name(function read_float() {
2228
+ if (this.pos + 4 > this.len)
2229
+ throw indexOutOfRange(this, 4);
2230
+ var value = util.float.readFloatLE(this.buf, this.pos);
2231
+ this.pos += 4;
2232
+ return value;
2233
+ }, "read_float");
2234
+ Reader.prototype.double = /* @__PURE__ */ __name(function read_double() {
2235
+ if (this.pos + 8 > this.len)
2236
+ throw indexOutOfRange(this, 4);
2237
+ var value = util.float.readDoubleLE(this.buf, this.pos);
2238
+ this.pos += 8;
2239
+ return value;
2240
+ }, "read_double");
2241
+ Reader.prototype.bytes = /* @__PURE__ */ __name(function read_bytes() {
2242
+ var length = this.uint32(), start = this.pos, end = this.pos + length;
2243
+ if (end > this.len)
2244
+ throw indexOutOfRange(this, length);
2245
+ this.pos += length;
2246
+ if (Array.isArray(this.buf))
2247
+ return this.buf.slice(start, end);
2248
+ if (start === end) {
2249
+ var nativeBuffer = util.Buffer;
2250
+ return nativeBuffer ? nativeBuffer.alloc(0) : new this.buf.constructor(0);
2251
+ }
2252
+ return this._slice.call(this.buf, start, end);
2253
+ }, "read_bytes");
2254
+ Reader.prototype.string = /* @__PURE__ */ __name(function read_string() {
2255
+ var bytes = this.bytes();
2256
+ return utf8.read(bytes, 0, bytes.length);
2257
+ }, "read_string");
2258
+ Reader.prototype.skip = /* @__PURE__ */ __name(function skip(length) {
2259
+ if (typeof length === "number") {
2260
+ if (this.pos + length > this.len)
2261
+ throw indexOutOfRange(this, length);
2262
+ this.pos += length;
2263
+ } else {
2264
+ do {
2265
+ if (this.pos >= this.len)
2266
+ throw indexOutOfRange(this);
2267
+ } while (this.buf[this.pos++] & 128);
2268
+ }
2269
+ return this;
2270
+ }, "skip");
2271
+ Reader.recursionLimit = util.recursionLimit;
2272
+ Reader.prototype.skipType = function(wireType, depth) {
2273
+ if (depth === void 0) depth = 0;
2274
+ if (depth > Reader.recursionLimit)
2275
+ throw Error("maximum nesting depth exceeded");
2276
+ switch (wireType) {
2277
+ case 0:
2278
+ this.skip();
2279
+ break;
2280
+ case 1:
2281
+ this.skip(8);
2282
+ break;
2283
+ case 2:
2284
+ this.skip(this.uint32());
2285
+ break;
2286
+ case 3:
2287
+ while ((wireType = this.uint32() & 7) !== 4) {
2288
+ this.skipType(wireType, depth + 1);
2289
+ }
2290
+ break;
2291
+ case 5:
2292
+ this.skip(4);
2293
+ break;
2294
+ /* istanbul ignore next */
2295
+ default:
2296
+ throw Error("invalid wire type " + wireType + " at offset " + this.pos);
2297
+ }
2298
+ return this;
2299
+ };
2300
+ Reader._configure = function(BufferReader_) {
2301
+ BufferReader = BufferReader_;
2302
+ Reader.create = create();
2303
+ BufferReader._configure();
2304
+ var fn = util.Long ? "toLong" : (
2305
+ /* istanbul ignore next */
2306
+ "toNumber"
2307
+ );
2308
+ util.merge(Reader.prototype, {
2309
+ int64: /* @__PURE__ */ __name(function read_int64() {
2310
+ return readLongVarint.call(this)[fn](false);
2311
+ }, "read_int64"),
2312
+ uint64: /* @__PURE__ */ __name(function read_uint64() {
2313
+ return readLongVarint.call(this)[fn](true);
2314
+ }, "read_uint64"),
2315
+ sint64: /* @__PURE__ */ __name(function read_sint64() {
2316
+ return readLongVarint.call(this).zzDecode()[fn](false);
2317
+ }, "read_sint64"),
2318
+ fixed64: /* @__PURE__ */ __name(function read_fixed64() {
2319
+ return readFixed64.call(this)[fn](true);
2320
+ }, "read_fixed64"),
2321
+ sfixed64: /* @__PURE__ */ __name(function read_sfixed64() {
2322
+ return readFixed64.call(this)[fn](false);
2323
+ }, "read_sfixed64")
2324
+ });
2325
+ };
2326
+ }
2327
+ });
2328
+
2329
+ // node_modules/protobufjs/src/reader_buffer.js
2330
+ var require_reader_buffer = __commonJS({
2331
+ "node_modules/protobufjs/src/reader_buffer.js"(exports, module) {
2332
+ "use strict";
2333
+ init_esbuild_shims();
2334
+ module.exports = BufferReader;
2335
+ var Reader = require_reader();
2336
+ (BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;
2337
+ var util = require_minimal();
2338
+ function BufferReader(buffer) {
2339
+ Reader.call(this, buffer);
2340
+ }
2341
+ __name(BufferReader, "BufferReader");
2342
+ BufferReader._configure = function() {
2343
+ if (util.Buffer)
2344
+ BufferReader.prototype._slice = util.Buffer.prototype.slice;
2345
+ };
2346
+ BufferReader.prototype.string = /* @__PURE__ */ __name(function read_string_buffer() {
2347
+ var len = this.uint32();
2348
+ return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len));
2349
+ }, "read_string_buffer");
2350
+ BufferReader._configure();
2351
+ }
2352
+ });
2353
+
2354
+ // node_modules/protobufjs/src/rpc/service.js
2355
+ var require_service = __commonJS({
2356
+ "node_modules/protobufjs/src/rpc/service.js"(exports, module) {
2357
+ "use strict";
2358
+ init_esbuild_shims();
2359
+ module.exports = Service;
2360
+ var util = require_minimal();
2361
+ (Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;
2362
+ function Service(rpcImpl, requestDelimited, responseDelimited) {
2363
+ if (typeof rpcImpl !== "function")
2364
+ throw TypeError("rpcImpl must be a function");
2365
+ util.EventEmitter.call(this);
2366
+ this.rpcImpl = rpcImpl;
2367
+ this.requestDelimited = Boolean(requestDelimited);
2368
+ this.responseDelimited = Boolean(responseDelimited);
2369
+ }
2370
+ __name(Service, "Service");
2371
+ Service.prototype.rpcCall = /* @__PURE__ */ __name(function rpcCall(method, requestCtor, responseCtor, request, callback) {
2372
+ if (!request)
2373
+ throw TypeError("request must be specified");
2374
+ var self2 = this;
2375
+ if (!callback)
2376
+ return util.asPromise(rpcCall, self2, method, requestCtor, responseCtor, request);
2377
+ if (!self2.rpcImpl) {
2378
+ setTimeout(function() {
2379
+ callback(Error("already ended"));
2380
+ }, 0);
2381
+ return void 0;
2382
+ }
2383
+ try {
2384
+ return self2.rpcImpl(
2385
+ method,
2386
+ requestCtor[self2.requestDelimited ? "encodeDelimited" : "encode"](request).finish(),
2387
+ /* @__PURE__ */ __name(function rpcCallback(err, response) {
2388
+ if (err) {
2389
+ self2.emit("error", err, method);
2390
+ return callback(err);
2391
+ }
2392
+ if (response === null) {
2393
+ self2.end(
2394
+ /* endedByRPC */
2395
+ true
2396
+ );
2397
+ return void 0;
2398
+ }
2399
+ if (!(response instanceof responseCtor)) {
2400
+ try {
2401
+ response = responseCtor[self2.responseDelimited ? "decodeDelimited" : "decode"](response);
2402
+ } catch (err2) {
2403
+ self2.emit("error", err2, method);
2404
+ return callback(err2);
2405
+ }
2406
+ }
2407
+ self2.emit("data", response, method);
2408
+ return callback(null, response);
2409
+ }, "rpcCallback")
2410
+ );
2411
+ } catch (err) {
2412
+ self2.emit("error", err, method);
2413
+ setTimeout(function() {
2414
+ callback(err);
2415
+ }, 0);
2416
+ return void 0;
2417
+ }
2418
+ }, "rpcCall");
2419
+ Service.prototype.end = /* @__PURE__ */ __name(function end(endedByRPC) {
2420
+ if (this.rpcImpl) {
2421
+ if (!endedByRPC)
2422
+ this.rpcImpl(null, null, null);
2423
+ this.rpcImpl = null;
2424
+ this.emit("end").off();
2425
+ }
2426
+ return this;
2427
+ }, "end");
2428
+ }
2429
+ });
2430
+
2431
+ // node_modules/protobufjs/src/rpc.js
2432
+ var require_rpc = __commonJS({
2433
+ "node_modules/protobufjs/src/rpc.js"(exports) {
2434
+ "use strict";
2435
+ init_esbuild_shims();
2436
+ var rpc = exports;
2437
+ rpc.Service = require_service();
2438
+ }
2439
+ });
2440
+
2441
+ // node_modules/protobufjs/src/roots.js
2442
+ var require_roots = __commonJS({
2443
+ "node_modules/protobufjs/src/roots.js"(exports, module) {
2444
+ "use strict";
2445
+ init_esbuild_shims();
2446
+ module.exports = {};
2447
+ }
2448
+ });
2449
+
2450
+ // node_modules/protobufjs/src/index-minimal.js
2451
+ var require_index_minimal = __commonJS({
2452
+ "node_modules/protobufjs/src/index-minimal.js"(exports) {
2453
+ "use strict";
2454
+ init_esbuild_shims();
2455
+ var protobuf = exports;
2456
+ protobuf.build = "minimal";
2457
+ protobuf.Writer = require_writer();
2458
+ protobuf.BufferWriter = require_writer_buffer();
2459
+ protobuf.Reader = require_reader();
2460
+ protobuf.BufferReader = require_reader_buffer();
2461
+ protobuf.util = require_minimal();
2462
+ protobuf.rpc = require_rpc();
2463
+ protobuf.roots = require_roots();
2464
+ protobuf.configure = configure;
2465
+ function configure() {
2466
+ protobuf.util._configure();
2467
+ protobuf.Writer._configure(protobuf.BufferWriter);
2468
+ protobuf.Reader._configure(protobuf.BufferReader);
2469
+ }
2470
+ __name(configure, "configure");
2471
+ configure();
2472
+ }
2473
+ });
2474
+
2475
+ // node_modules/protobufjs/minimal.js
2476
+ var require_minimal2 = __commonJS({
2477
+ "node_modules/protobufjs/minimal.js"(exports, module) {
2478
+ "use strict";
2479
+ init_esbuild_shims();
2480
+ module.exports = require_index_minimal();
2481
+ }
2482
+ });
2483
+
2484
+ export {
2485
+ require_aspromise,
2486
+ require_umd,
2487
+ require_minimal,
2488
+ require_writer,
2489
+ require_reader,
2490
+ require_rpc,
2491
+ require_roots,
2492
+ require_index_minimal,
2493
+ require_minimal2
2494
+ };
2495
+ /*! Bundled license information:
2496
+
2497
+ long/umd/index.js:
2498
+ (**
2499
+ * @license
2500
+ * Copyright 2009 The Closure Library Authors
2501
+ * Copyright 2020 Daniel Wirtz / The long.js Authors.
2502
+ *
2503
+ * Licensed under the Apache License, Version 2.0 (the "License");
2504
+ * you may not use this file except in compliance with the License.
2505
+ * You may obtain a copy of the License at
2506
+ *
2507
+ * http://www.apache.org/licenses/LICENSE-2.0
2508
+ *
2509
+ * Unless required by applicable law or agreed to in writing, software
2510
+ * distributed under the License is distributed on an "AS IS" BASIS,
2511
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2512
+ * See the License for the specific language governing permissions and
2513
+ * limitations under the License.
2514
+ *
2515
+ * SPDX-License-Identifier: Apache-2.0
2516
+ *)
2517
+ */