basis_transcoder-NDVUP4EN.js 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280
  1. import {
  2. fs_exports,
  3. init_fs,
  4. init_path,
  5. path_exports
  6. } from "./chunk-VUY5VYI5.js";
  7. import {
  8. e
  9. } from "./chunk-CZBRZ6SU.js";
  10. import {
  11. __toCommonJS
  12. } from "./chunk-S5KM4IGW.js";
  13. // node_modules/@arcgis/core/chunks/basis_transcoder.js
  14. function n(t, n2) {
  15. for (var e3 = 0; e3 < n2.length; e3++) {
  16. const r2 = n2[e3];
  17. if ("string" != typeof r2 && !Array.isArray(r2)) {
  18. for (const n3 in r2)
  19. if ("default" !== n3 && !(n3 in t)) {
  20. const e4 = Object.getOwnPropertyDescriptor(r2, n3);
  21. e4 && Object.defineProperty(t, n3, e4.get ? e4 : { enumerable: true, get: () => r2[n3] });
  22. }
  23. }
  24. }
  25. return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
  26. }
  27. var e2;
  28. var r;
  29. var i;
  30. var o = { exports: {} };
  31. e2 = o, r = "undefined" != typeof document && document.currentScript ? document.currentScript.src : void 0, "undefined" != typeof __filename && (r = r || __filename), i = function(n2) {
  32. var e3, i2, o2 = void 0 !== (n2 = n2 || {}) ? n2 : {};
  33. o2.ready = new Promise(function(t, n3) {
  34. e3 = t, i2 = n3;
  35. });
  36. var a2, u = {};
  37. for (a2 in o2)
  38. o2.hasOwnProperty(a2) && (u[a2] = o2[a2]);
  39. var s = false, c = false, l = false, f = false;
  40. s = "object" == typeof window, c = "function" == typeof importScripts, l = "object" == typeof process && "object" == typeof process.versions && "string" == typeof process.versions.node, f = !s && !l && !c;
  41. var p, d, y, h, v = "";
  42. function m(t) {
  43. return o2.locateFile ? o2.locateFile(t, v) : v + t;
  44. }
  45. l ? (v = c ? (init_path(), __toCommonJS(path_exports)).dirname(v) + "/" : __dirname + "/", p = function(t, n3) {
  46. return y || (y = (init_fs(), __toCommonJS(fs_exports))), h || (h = (init_path(), __toCommonJS(path_exports))), t = h.normalize(t), y.readFileSync(t, n3 ? null : "utf8");
  47. }, d = function(t) {
  48. var n3 = p(t, true);
  49. return n3.buffer || (n3 = new Uint8Array(n3)), _(n3.buffer), n3;
  50. }, process.argv.length > 1 && process.argv[1].replace(/\\/g, "/"), process.argv.slice(2), process.on("uncaughtException", function(t) {
  51. if (!(t instanceof Qe))
  52. throw t;
  53. }), process.on("unhandledRejection", vt), o2.inspect = function() {
  54. return "[Emscripten Module object]";
  55. }) : f ? ("undefined" != typeof read && (p = function(t) {
  56. return read(t);
  57. }), d = function(t) {
  58. var n3;
  59. return "function" == typeof readbuffer ? new Uint8Array(readbuffer(t)) : (_("object" == typeof (n3 = read(t, "binary"))), n3);
  60. }, "undefined" != typeof scriptArgs && scriptArgs, "undefined" != typeof print && ("undefined" == typeof console && (console = {}), console.log = print, console.warn = console.error = "undefined" != typeof printErr ? printErr : print)) : (s || c) && (c ? v = self.location.href : document.currentScript && (v = document.currentScript.src), r && (v = r), v = 0 !== v.indexOf("blob:") ? v.substr(0, v.lastIndexOf("/") + 1) : "", p = function(t) {
  61. var n3 = new XMLHttpRequest();
  62. return n3.open("GET", t, false), n3.send(null), n3.responseText;
  63. }, c && (d = function(t) {
  64. var n3 = new XMLHttpRequest();
  65. return n3.open("GET", t, false), n3.responseType = "arraybuffer", n3.send(null), new Uint8Array(n3.response);
  66. }));
  67. var g, b, $ = o2.print || console.log.bind(console), C = o2.printErr || console.warn.bind(console);
  68. for (a2 in u)
  69. u.hasOwnProperty(a2) && (o2[a2] = u[a2]);
  70. u = null, o2.arguments && o2.arguments, o2.thisProgram && o2.thisProgram, o2.quit && o2.quit, o2.wasmBinary && (g = o2.wasmBinary), o2.noExitRuntime && o2.noExitRuntime, "object" != typeof WebAssembly && vt("no native wasm support detected");
  71. var w = new WebAssembly.Table({ initial: 157, maximum: 157, element: "anyfunc" }), T = false;
  72. function _(t, n3) {
  73. t || vt("Assertion failed: " + n3);
  74. }
  75. var P = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0;
  76. function A(t, n3, e4) {
  77. for (var r2 = n3 + e4, i3 = n3; t[i3] && !(i3 >= r2); )
  78. ++i3;
  79. if (i3 - n3 > 16 && t.subarray && P)
  80. return P.decode(t.subarray(n3, i3));
  81. for (var o3 = ""; n3 < i3; ) {
  82. var a3 = t[n3++];
  83. if (128 & a3) {
  84. var u2 = 63 & t[n3++];
  85. if (192 != (224 & a3)) {
  86. var s2 = 63 & t[n3++];
  87. if ((a3 = 224 == (240 & a3) ? (15 & a3) << 12 | u2 << 6 | s2 : (7 & a3) << 18 | u2 << 12 | s2 << 6 | 63 & t[n3++]) < 65536)
  88. o3 += String.fromCharCode(a3);
  89. else {
  90. var c2 = a3 - 65536;
  91. o3 += String.fromCharCode(55296 | c2 >> 10, 56320 | 1023 & c2);
  92. }
  93. } else
  94. o3 += String.fromCharCode((31 & a3) << 6 | u2);
  95. } else
  96. o3 += String.fromCharCode(a3);
  97. }
  98. return o3;
  99. }
  100. function W(t, n3) {
  101. return t ? A(V, t, n3) : "";
  102. }
  103. function E(t, n3, e4, r2) {
  104. if (!(r2 > 0))
  105. return 0;
  106. for (var i3 = e4, o3 = e4 + r2 - 1, a3 = 0; a3 < t.length; ++a3) {
  107. var u2 = t.charCodeAt(a3);
  108. if (u2 >= 55296 && u2 <= 57343 && (u2 = 65536 + ((1023 & u2) << 10) | 1023 & t.charCodeAt(++a3)), u2 <= 127) {
  109. if (e4 >= o3)
  110. break;
  111. n3[e4++] = u2;
  112. } else if (u2 <= 2047) {
  113. if (e4 + 1 >= o3)
  114. break;
  115. n3[e4++] = 192 | u2 >> 6, n3[e4++] = 128 | 63 & u2;
  116. } else if (u2 <= 65535) {
  117. if (e4 + 2 >= o3)
  118. break;
  119. n3[e4++] = 224 | u2 >> 12, n3[e4++] = 128 | u2 >> 6 & 63, n3[e4++] = 128 | 63 & u2;
  120. } else {
  121. if (e4 + 3 >= o3)
  122. break;
  123. n3[e4++] = 240 | u2 >> 18, n3[e4++] = 128 | u2 >> 12 & 63, n3[e4++] = 128 | u2 >> 6 & 63, n3[e4++] = 128 | 63 & u2;
  124. }
  125. }
  126. return n3[e4] = 0, e4 - i3;
  127. }
  128. function S(t, n3, e4) {
  129. return E(t, V, n3, e4);
  130. }
  131. function j(t) {
  132. for (var n3 = 0, e4 = 0; e4 < t.length; ++e4) {
  133. var r2 = t.charCodeAt(e4);
  134. r2 >= 55296 && r2 <= 57343 && (r2 = 65536 + ((1023 & r2) << 10) | 1023 & t.charCodeAt(++e4)), r2 <= 127 ? ++n3 : n3 += r2 <= 2047 ? 2 : r2 <= 65535 ? 3 : 4;
  135. }
  136. return n3;
  137. }
  138. var O = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0;
  139. function k(t, n3) {
  140. for (var e4 = t, r2 = e4 >> 1, i3 = r2 + n3 / 2; !(r2 >= i3) && z[r2]; )
  141. ++r2;
  142. if ((e4 = r2 << 1) - t > 32 && O)
  143. return O.decode(V.subarray(t, e4));
  144. for (var o3 = 0, a3 = ""; ; ) {
  145. var u2 = H[t + 2 * o3 >> 1];
  146. if (0 == u2 || o3 == n3 / 2)
  147. return a3;
  148. ++o3, a3 += String.fromCharCode(u2);
  149. }
  150. }
  151. function F(t, n3, e4) {
  152. if (void 0 === e4 && (e4 = 2147483647), e4 < 2)
  153. return 0;
  154. for (var r2 = n3, i3 = (e4 -= 2) < 2 * t.length ? e4 / 2 : t.length, o3 = 0; o3 < i3; ++o3) {
  155. var a3 = t.charCodeAt(o3);
  156. H[n3 >> 1] = a3, n3 += 2;
  157. }
  158. return H[n3 >> 1] = 0, n3 - r2;
  159. }
  160. function R(t) {
  161. return 2 * t.length;
  162. }
  163. function x(t, n3) {
  164. for (var e4 = 0, r2 = ""; !(e4 >= n3 / 4); ) {
  165. var i3 = q[t + 4 * e4 >> 2];
  166. if (0 == i3)
  167. break;
  168. if (++e4, i3 >= 65536) {
  169. var o3 = i3 - 65536;
  170. r2 += String.fromCharCode(55296 | o3 >> 10, 56320 | 1023 & o3);
  171. } else
  172. r2 += String.fromCharCode(i3);
  173. }
  174. return r2;
  175. }
  176. function D(t, n3, e4) {
  177. if (void 0 === e4 && (e4 = 2147483647), e4 < 4)
  178. return 0;
  179. for (var r2 = n3, i3 = r2 + e4 - 4, o3 = 0; o3 < t.length; ++o3) {
  180. var a3 = t.charCodeAt(o3);
  181. if (a3 >= 55296 && a3 <= 57343 && (a3 = 65536 + ((1023 & a3) << 10) | 1023 & t.charCodeAt(++o3)), q[n3 >> 2] = a3, (n3 += 4) + 4 > i3)
  182. break;
  183. }
  184. return q[n3 >> 2] = 0, n3 - r2;
  185. }
  186. function I(t) {
  187. for (var n3 = 0, e4 = 0; e4 < t.length; ++e4) {
  188. var r2 = t.charCodeAt(e4);
  189. r2 >= 55296 && r2 <= 57343 && ++e4, n3 += 4;
  190. }
  191. return n3;
  192. }
  193. var U, M, V, H, z, q, B, N, G, L = 65536;
  194. function X(t, n3) {
  195. return t % n3 > 0 && (t += n3 - t % n3), t;
  196. }
  197. function J(t) {
  198. U = t, o2.HEAP8 = M = new Int8Array(t), o2.HEAP16 = H = new Int16Array(t), o2.HEAP32 = q = new Int32Array(t), o2.HEAPU8 = V = new Uint8Array(t), o2.HEAPU16 = z = new Uint16Array(t), o2.HEAPU32 = B = new Uint32Array(t), o2.HEAPF32 = N = new Float32Array(t), o2.HEAPF64 = G = new Float64Array(t);
  199. }
  200. var Y = 5565536, Z = 322496, K = o2.INITIAL_MEMORY || 16777216;
  201. function Q(t) {
  202. for (; t.length > 0; ) {
  203. var n3 = t.shift();
  204. if ("function" != typeof n3) {
  205. var e4 = n3.func;
  206. "number" == typeof e4 ? void 0 === n3.arg ? o2.dynCall_v(e4) : o2.dynCall_vi(e4, n3.arg) : e4(void 0 === n3.arg ? null : n3.arg);
  207. } else
  208. n3(o2);
  209. }
  210. }
  211. (b = o2.wasmMemory ? o2.wasmMemory : new WebAssembly.Memory({ initial: K / L, maximum: 2147483648 / L })) && (U = b.buffer), K = U.byteLength, J(U), q[Z >> 2] = Y;
  212. var tt = [], nt = [], et = [], rt = [];
  213. function it() {
  214. if (o2.preRun)
  215. for ("function" == typeof o2.preRun && (o2.preRun = [o2.preRun]); o2.preRun.length; )
  216. st(o2.preRun.shift());
  217. Q(tt);
  218. }
  219. function ot() {
  220. Q(nt);
  221. }
  222. function at() {
  223. Q(et);
  224. }
  225. function ut() {
  226. if (o2.postRun)
  227. for ("function" == typeof o2.postRun && (o2.postRun = [o2.postRun]); o2.postRun.length; )
  228. ct(o2.postRun.shift());
  229. Q(rt);
  230. }
  231. function st(t) {
  232. tt.unshift(t);
  233. }
  234. function ct(t) {
  235. rt.unshift(t);
  236. }
  237. var lt = Math.ceil, ft = Math.floor, pt = 0, dt = null;
  238. function yt(t) {
  239. pt++, o2.monitorRunDependencies && o2.monitorRunDependencies(pt);
  240. }
  241. function ht(t) {
  242. if (pt--, o2.monitorRunDependencies && o2.monitorRunDependencies(pt), 0 == pt && dt) {
  243. var n3 = dt;
  244. dt = null, n3();
  245. }
  246. }
  247. function vt(t) {
  248. o2.onAbort && o2.onAbort(t), C(t += ""), T = true, t = "abort(" + t + "). Build with -s ASSERTIONS=1 for more info.";
  249. var n3 = new WebAssembly.RuntimeError(t);
  250. throw i2(n3), n3;
  251. }
  252. function mt(t, n3) {
  253. return String.prototype.startsWith ? t.startsWith(n3) : 0 === t.indexOf(n3);
  254. }
  255. o2.preloadedImages = {}, o2.preloadedAudios = {};
  256. var gt = "data:application/octet-stream;base64,";
  257. function bt(t) {
  258. return mt(t, gt);
  259. }
  260. var $t = "file://";
  261. function Ct(t) {
  262. return mt(t, $t);
  263. }
  264. var wt = "basis_transcoder.wasm";
  265. function Tt() {
  266. try {
  267. if (g)
  268. return new Uint8Array(g);
  269. if (d)
  270. return d(wt);
  271. throw "both async and sync fetching of the wasm failed";
  272. } catch (C2) {
  273. vt(C2);
  274. }
  275. }
  276. function _t() {
  277. return g || !s && !c || "function" != typeof fetch || Ct(wt) ? new Promise(function(t, n3) {
  278. t(Tt());
  279. }) : fetch(wt, { credentials: "same-origin" }).then(function(t) {
  280. if (!t.ok)
  281. throw "failed to load wasm binary file at '" + wt + "'";
  282. return t.arrayBuffer();
  283. }).catch(function() {
  284. return Tt();
  285. });
  286. }
  287. function Pt() {
  288. var t = { a: Le };
  289. function n3(t2, n4) {
  290. var e5 = t2.exports;
  291. o2.asm = e5, ht();
  292. }
  293. function e4(t2) {
  294. n3(t2.instance);
  295. }
  296. function r2(n4) {
  297. return _t().then(function(n5) {
  298. return WebAssembly.instantiate(n5, t);
  299. }).then(n4, function(t2) {
  300. C("failed to asynchronously prepare wasm: " + t2), vt(t2);
  301. });
  302. }
  303. function i3() {
  304. if (g || "function" != typeof WebAssembly.instantiateStreaming || bt(wt) || Ct(wt) || "function" != typeof fetch)
  305. return r2(e4);
  306. fetch(wt, { credentials: "same-origin" }).then(function(n4) {
  307. return WebAssembly.instantiateStreaming(n4, t).then(e4, function(t2) {
  308. return C("wasm streaming compile failed: " + t2), C("falling back to ArrayBuffer instantiation"), r2(e4);
  309. });
  310. });
  311. }
  312. if (yt(), o2.instantiateWasm)
  313. try {
  314. return o2.instantiateWasm(t, n3);
  315. } catch (a3) {
  316. return C("Module.instantiateWasm callback failed with error: " + a3), false;
  317. }
  318. return i3(), {};
  319. }
  320. bt(wt) || (wt = m(wt)), nt.push({ func: function() {
  321. Je();
  322. } });
  323. var At = {};
  324. function Wt(t) {
  325. for (; t.length; ) {
  326. var n3 = t.pop();
  327. t.pop()(n3);
  328. }
  329. }
  330. function Et(t) {
  331. return this.fromWireType(B[t >> 2]);
  332. }
  333. var St = {}, jt = {}, Ot = {}, kt = 48, Ft = 57;
  334. function Rt(t) {
  335. if (void 0 === t)
  336. return "_unknown";
  337. var n3 = (t = t.replace(/[^a-zA-Z0-9_]/g, "$")).charCodeAt(0);
  338. return n3 >= kt && n3 <= Ft ? "_" + t : t;
  339. }
  340. function xt(t, n3) {
  341. return t = Rt(t), function() {
  342. return n3.apply(this, arguments);
  343. };
  344. }
  345. function Dt(t, n3) {
  346. var e4 = xt(n3, function(t2) {
  347. this.name = n3, this.message = t2;
  348. var e5 = new Error(t2).stack;
  349. void 0 !== e5 && (this.stack = this.toString() + "\n" + e5.replace(/^Error(:[^\n]*)?\n/, ""));
  350. });
  351. return e4.prototype = Object.create(t.prototype), e4.prototype.constructor = e4, e4.prototype.toString = function() {
  352. return void 0 === this.message ? this.name : this.name + ": " + this.message;
  353. }, e4;
  354. }
  355. var It = void 0;
  356. function Ut(t) {
  357. throw new It(t);
  358. }
  359. function Mt(t, n3, e4) {
  360. function r2(n4) {
  361. var r3 = e4(n4);
  362. r3.length !== t.length && Ut("Mismatched type converter count");
  363. for (var i4 = 0; i4 < t.length; ++i4)
  364. Lt(t[i4], r3[i4]);
  365. }
  366. t.forEach(function(t2) {
  367. Ot[t2] = n3;
  368. });
  369. var i3 = new Array(n3.length), o3 = [], a3 = 0;
  370. n3.forEach(function(t2, n4) {
  371. jt.hasOwnProperty(t2) ? i3[n4] = jt[t2] : (o3.push(t2), St.hasOwnProperty(t2) || (St[t2] = []), St[t2].push(function() {
  372. i3[n4] = jt[t2], ++a3 === o3.length && r2(i3);
  373. }));
  374. }), 0 === o3.length && r2(i3);
  375. }
  376. function Vt(t) {
  377. var n3 = At[t];
  378. delete At[t];
  379. var e4 = n3.rawConstructor, r2 = n3.rawDestructor, i3 = n3.fields;
  380. Mt([t], i3.map(function(t2) {
  381. return t2.getterReturnType;
  382. }).concat(i3.map(function(t2) {
  383. return t2.setterArgumentType;
  384. })), function(t2) {
  385. var o3 = {};
  386. return i3.forEach(function(n4, e5) {
  387. var r3 = n4.fieldName, a3 = t2[e5], u2 = n4.getter, s2 = n4.getterContext, c2 = t2[e5 + i3.length], l2 = n4.setter, f2 = n4.setterContext;
  388. o3[r3] = { read: function(t3) {
  389. return a3.fromWireType(u2(s2, t3));
  390. }, write: function(t3, n5) {
  391. var e6 = [];
  392. l2(f2, t3, c2.toWireType(e6, n5)), Wt(e6);
  393. } };
  394. }), [{ name: n3.name, fromWireType: function(t3) {
  395. var n4 = {};
  396. for (var e5 in o3)
  397. n4[e5] = o3[e5].read(t3);
  398. return r2(t3), n4;
  399. }, toWireType: function(t3, n4) {
  400. for (var i4 in o3)
  401. if (!(i4 in n4))
  402. throw new TypeError('Missing field: "' + i4 + '"');
  403. var a3 = e4();
  404. for (i4 in o3)
  405. o3[i4].write(a3, n4[i4]);
  406. return null !== t3 && t3.push(r2, a3), a3;
  407. }, argPackAdvance: 8, readValueFromPointer: Et, destructorFunction: r2 }];
  408. });
  409. }
  410. function Ht(t) {
  411. switch (t) {
  412. case 1:
  413. return 0;
  414. case 2:
  415. return 1;
  416. case 4:
  417. return 2;
  418. case 8:
  419. return 3;
  420. default:
  421. throw new TypeError("Unknown type size: " + t);
  422. }
  423. }
  424. function zt() {
  425. for (var t = new Array(256), n3 = 0; n3 < 256; ++n3)
  426. t[n3] = String.fromCharCode(n3);
  427. qt = t;
  428. }
  429. var qt = void 0;
  430. function Bt(t) {
  431. for (var n3 = "", e4 = t; V[e4]; )
  432. n3 += qt[V[e4++]];
  433. return n3;
  434. }
  435. var Nt = void 0;
  436. function Gt(t) {
  437. throw new Nt(t);
  438. }
  439. function Lt(t, n3, e4) {
  440. if (e4 = e4 || {}, !("argPackAdvance" in n3))
  441. throw new TypeError("registerType registeredInstance requires argPackAdvance");
  442. var r2 = n3.name;
  443. if (t || Gt('type "' + r2 + '" must have a positive integer typeid pointer'), jt.hasOwnProperty(t)) {
  444. if (e4.ignoreDuplicateRegistrations)
  445. return;
  446. Gt("Cannot register type '" + r2 + "' twice");
  447. }
  448. if (jt[t] = n3, delete Ot[t], St.hasOwnProperty(t)) {
  449. var i3 = St[t];
  450. delete St[t], i3.forEach(function(t2) {
  451. t2();
  452. });
  453. }
  454. }
  455. function Xt(t, n3, e4, r2, i3) {
  456. var o3 = Ht(e4);
  457. Lt(t, { name: n3 = Bt(n3), fromWireType: function(t2) {
  458. return !!t2;
  459. }, toWireType: function(t2, n4) {
  460. return n4 ? r2 : i3;
  461. }, argPackAdvance: 8, readValueFromPointer: function(t2) {
  462. var r3;
  463. if (1 === e4)
  464. r3 = M;
  465. else if (2 === e4)
  466. r3 = H;
  467. else {
  468. if (4 !== e4)
  469. throw new TypeError("Unknown boolean type size: " + n3);
  470. r3 = q;
  471. }
  472. return this.fromWireType(r3[t2 >> o3]);
  473. }, destructorFunction: null });
  474. }
  475. function Jt(t) {
  476. if (!(this instanceof pn))
  477. return false;
  478. if (!(t instanceof pn))
  479. return false;
  480. for (var n3 = this.$$.ptrType.registeredClass, e4 = this.$$.ptr, r2 = t.$$.ptrType.registeredClass, i3 = t.$$.ptr; n3.baseClass; )
  481. e4 = n3.upcast(e4), n3 = n3.baseClass;
  482. for (; r2.baseClass; )
  483. i3 = r2.upcast(i3), r2 = r2.baseClass;
  484. return n3 === r2 && e4 === i3;
  485. }
  486. function Yt(t) {
  487. return { count: t.count, deleteScheduled: t.deleteScheduled, preservePointerOnDelete: t.preservePointerOnDelete, ptr: t.ptr, ptrType: t.ptrType, smartPtr: t.smartPtr, smartPtrType: t.smartPtrType };
  488. }
  489. function Zt(t) {
  490. function n3(t2) {
  491. return t2.$$.ptrType.registeredClass.name;
  492. }
  493. Gt(n3(t) + " instance already deleted");
  494. }
  495. var Kt = false;
  496. function Qt(t) {
  497. }
  498. function tn(t) {
  499. t.smartPtr ? t.smartPtrType.rawDestructor(t.smartPtr) : t.ptrType.registeredClass.rawDestructor(t.ptr);
  500. }
  501. function nn(t) {
  502. t.count.value -= 1, 0 === t.count.value && tn(t);
  503. }
  504. function en(t) {
  505. return "undefined" == typeof FinalizationGroup ? (en = function(t2) {
  506. return t2;
  507. }, t) : (Kt = new FinalizationGroup(function(t2) {
  508. for (var n3 = t2.next(); !n3.done; n3 = t2.next()) {
  509. var e4 = n3.value;
  510. e4.ptr ? nn(e4) : console.warn("object already deleted: " + e4.ptr);
  511. }
  512. }), en = function(t2) {
  513. return Kt.register(t2, t2.$$, t2.$$), t2;
  514. }, Qt = function(t2) {
  515. Kt.unregister(t2.$$);
  516. }, en(t));
  517. }
  518. function rn() {
  519. if (this.$$.ptr || Zt(this), this.$$.preservePointerOnDelete)
  520. return this.$$.count.value += 1, this;
  521. var t = en(Object.create(Object.getPrototypeOf(this), { $$: { value: Yt(this.$$) } }));
  522. return t.$$.count.value += 1, t.$$.deleteScheduled = false, t;
  523. }
  524. function on() {
  525. this.$$.ptr || Zt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && Gt("Object already scheduled for deletion"), Qt(this), nn(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
  526. }
  527. function an() {
  528. return !this.$$.ptr;
  529. }
  530. var un = void 0, sn = [];
  531. function cn() {
  532. for (; sn.length; ) {
  533. var t = sn.pop();
  534. t.$$.deleteScheduled = false, t.delete();
  535. }
  536. }
  537. function ln() {
  538. return this.$$.ptr || Zt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && Gt("Object already scheduled for deletion"), sn.push(this), 1 === sn.length && un && un(cn), this.$$.deleteScheduled = true, this;
  539. }
  540. function fn() {
  541. pn.prototype.isAliasOf = Jt, pn.prototype.clone = rn, pn.prototype.delete = on, pn.prototype.isDeleted = an, pn.prototype.deleteLater = ln;
  542. }
  543. function pn() {
  544. }
  545. var dn = {};
  546. function yn(t, n3, e4) {
  547. if (void 0 === t[n3].overloadTable) {
  548. var r2 = t[n3];
  549. t[n3] = function() {
  550. return t[n3].overloadTable.hasOwnProperty(arguments.length) || Gt("Function '" + e4 + "' called with an invalid number of arguments (" + arguments.length + ") - expects one of (" + t[n3].overloadTable + ")!"), t[n3].overloadTable[arguments.length].apply(this, arguments);
  551. }, t[n3].overloadTable = [], t[n3].overloadTable[r2.argCount] = r2;
  552. }
  553. }
  554. function hn(t, n3, e4) {
  555. o2.hasOwnProperty(t) ? ((void 0 === e4 || void 0 !== o2[t].overloadTable && void 0 !== o2[t].overloadTable[e4]) && Gt("Cannot register public name '" + t + "' twice"), yn(o2, t, t), o2.hasOwnProperty(e4) && Gt("Cannot register multiple overloads of a function with the same number of arguments (" + e4 + ")!"), o2[t].overloadTable[e4] = n3) : (o2[t] = n3, void 0 !== e4 && (o2[t].numArguments = e4));
  556. }
  557. function vn(t, n3, e4, r2, i3, o3, a3, u2) {
  558. this.name = t, this.constructor = n3, this.instancePrototype = e4, this.rawDestructor = r2, this.baseClass = i3, this.getActualType = o3, this.upcast = a3, this.downcast = u2, this.pureVirtualFunctions = [];
  559. }
  560. function mn(t, n3, e4) {
  561. for (; n3 !== e4; )
  562. n3.upcast || Gt("Expected null or instance of " + e4.name + ", got an instance of " + n3.name), t = n3.upcast(t), n3 = n3.baseClass;
  563. return t;
  564. }
  565. function gn(t, n3) {
  566. if (null === n3)
  567. return this.isReference && Gt("null is not a valid " + this.name), 0;
  568. n3.$$ || Gt('Cannot pass "' + oe(n3) + '" as a ' + this.name), n3.$$.ptr || Gt("Cannot pass deleted object as a pointer of type " + this.name);
  569. var e4 = n3.$$.ptrType.registeredClass;
  570. return mn(n3.$$.ptr, e4, this.registeredClass);
  571. }
  572. function bn(t, n3) {
  573. var e4;
  574. if (null === n3)
  575. return this.isReference && Gt("null is not a valid " + this.name), this.isSmartPointer ? (e4 = this.rawConstructor(), null !== t && t.push(this.rawDestructor, e4), e4) : 0;
  576. n3.$$ || Gt('Cannot pass "' + oe(n3) + '" as a ' + this.name), n3.$$.ptr || Gt("Cannot pass deleted object as a pointer of type " + this.name), !this.isConst && n3.$$.ptrType.isConst && Gt("Cannot convert argument of type " + (n3.$$.smartPtrType ? n3.$$.smartPtrType.name : n3.$$.ptrType.name) + " to parameter type " + this.name);
  577. var r2 = n3.$$.ptrType.registeredClass;
  578. if (e4 = mn(n3.$$.ptr, r2, this.registeredClass), this.isSmartPointer)
  579. switch (void 0 === n3.$$.smartPtr && Gt("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) {
  580. case 0:
  581. n3.$$.smartPtrType === this ? e4 = n3.$$.smartPtr : Gt("Cannot convert argument of type " + (n3.$$.smartPtrType ? n3.$$.smartPtrType.name : n3.$$.ptrType.name) + " to parameter type " + this.name);
  582. break;
  583. case 1:
  584. e4 = n3.$$.smartPtr;
  585. break;
  586. case 2:
  587. if (n3.$$.smartPtrType === this)
  588. e4 = n3.$$.smartPtr;
  589. else {
  590. var i3 = n3.clone();
  591. e4 = this.rawShare(e4, Qn(function() {
  592. i3.delete();
  593. })), null !== t && t.push(this.rawDestructor, e4);
  594. }
  595. break;
  596. default:
  597. Gt("Unsupporting sharing policy");
  598. }
  599. return e4;
  600. }
  601. function $n(t, n3) {
  602. if (null === n3)
  603. return this.isReference && Gt("null is not a valid " + this.name), 0;
  604. n3.$$ || Gt('Cannot pass "' + oe(n3) + '" as a ' + this.name), n3.$$.ptr || Gt("Cannot pass deleted object as a pointer of type " + this.name), n3.$$.ptrType.isConst && Gt("Cannot convert argument of type " + n3.$$.ptrType.name + " to parameter type " + this.name);
  605. var e4 = n3.$$.ptrType.registeredClass;
  606. return mn(n3.$$.ptr, e4, this.registeredClass);
  607. }
  608. function Cn(t) {
  609. return this.rawGetPointee && (t = this.rawGetPointee(t)), t;
  610. }
  611. function wn(t) {
  612. this.rawDestructor && this.rawDestructor(t);
  613. }
  614. function Tn(t) {
  615. null !== t && t.delete();
  616. }
  617. function _n(t, n3, e4) {
  618. if (n3 === e4)
  619. return t;
  620. if (void 0 === e4.baseClass)
  621. return null;
  622. var r2 = _n(t, n3, e4.baseClass);
  623. return null === r2 ? null : e4.downcast(r2);
  624. }
  625. function Pn() {
  626. return Object.keys(Sn).length;
  627. }
  628. function An() {
  629. var t = [];
  630. for (var n3 in Sn)
  631. Sn.hasOwnProperty(n3) && t.push(Sn[n3]);
  632. return t;
  633. }
  634. function Wn(t) {
  635. un = t, sn.length && un && un(cn);
  636. }
  637. function En() {
  638. o2.getInheritedInstanceCount = Pn, o2.getLiveInheritedInstances = An, o2.flushPendingDeletes = cn, o2.setDelayFunction = Wn;
  639. }
  640. var Sn = {};
  641. function jn(t, n3) {
  642. for (void 0 === n3 && Gt("ptr should not be undefined"); t.baseClass; )
  643. n3 = t.upcast(n3), t = t.baseClass;
  644. return n3;
  645. }
  646. function On(t, n3) {
  647. return n3 = jn(t, n3), Sn[n3];
  648. }
  649. function kn(t, n3) {
  650. return n3.ptrType && n3.ptr || Ut("makeClassHandle requires ptr and ptrType"), !!n3.smartPtrType != !!n3.smartPtr && Ut("Both smartPtrType and smartPtr must be specified"), n3.count = { value: 1 }, en(Object.create(t, { $$: { value: n3 } }));
  651. }
  652. function Fn(t) {
  653. var n3 = this.getPointee(t);
  654. if (!n3)
  655. return this.destructor(t), null;
  656. var e4 = On(this.registeredClass, n3);
  657. if (void 0 !== e4) {
  658. if (0 === e4.$$.count.value)
  659. return e4.$$.ptr = n3, e4.$$.smartPtr = t, e4.clone();
  660. var r2 = e4.clone();
  661. return this.destructor(t), r2;
  662. }
  663. function i3() {
  664. return this.isSmartPointer ? kn(this.registeredClass.instancePrototype, { ptrType: this.pointeeType, ptr: n3, smartPtrType: this, smartPtr: t }) : kn(this.registeredClass.instancePrototype, { ptrType: this, ptr: t });
  665. }
  666. var o3, a3 = this.registeredClass.getActualType(n3), u2 = dn[a3];
  667. if (!u2)
  668. return i3.call(this);
  669. o3 = this.isConst ? u2.constPointerType : u2.pointerType;
  670. var s2 = _n(n3, this.registeredClass, o3.registeredClass);
  671. return null === s2 ? i3.call(this) : this.isSmartPointer ? kn(o3.registeredClass.instancePrototype, { ptrType: o3, ptr: s2, smartPtrType: this, smartPtr: t }) : kn(o3.registeredClass.instancePrototype, { ptrType: o3, ptr: s2 });
  672. }
  673. function Rn() {
  674. xn.prototype.getPointee = Cn, xn.prototype.destructor = wn, xn.prototype.argPackAdvance = 8, xn.prototype.readValueFromPointer = Et, xn.prototype.deleteObject = Tn, xn.prototype.fromWireType = Fn;
  675. }
  676. function xn(t, n3, e4, r2, i3, o3, a3, u2, s2, c2, l2) {
  677. this.name = t, this.registeredClass = n3, this.isReference = e4, this.isConst = r2, this.isSmartPointer = i3, this.pointeeType = o3, this.sharingPolicy = a3, this.rawGetPointee = u2, this.rawConstructor = s2, this.rawShare = c2, this.rawDestructor = l2, i3 || void 0 !== n3.baseClass ? this.toWireType = bn : r2 ? (this.toWireType = gn, this.destructorFunction = null) : (this.toWireType = $n, this.destructorFunction = null);
  678. }
  679. function Dn(t, n3, e4) {
  680. o2.hasOwnProperty(t) || Ut("Replacing nonexistant public symbol"), void 0 !== o2[t].overloadTable && void 0 !== e4 ? o2[t].overloadTable[e4] = n3 : (o2[t] = n3, o2[t].argCount = e4);
  681. }
  682. function In(t, n3) {
  683. function e4(t2) {
  684. var e5 = [n3];
  685. return function() {
  686. e5.length = arguments.length + 1;
  687. for (var n4 = 0; n4 < arguments.length; n4++)
  688. e5[n4 + 1] = arguments[n4];
  689. return t2.apply(null, e5);
  690. };
  691. }
  692. t = Bt(t);
  693. var r2 = e4(o2["dynCall_" + t]);
  694. return "function" != typeof r2 && Gt("unknown function pointer with signature " + t + ": " + n3), r2;
  695. }
  696. var Un = void 0;
  697. function Mn(t) {
  698. var n3 = Ke(t), e4 = Bt(n3);
  699. return Ze(n3), e4;
  700. }
  701. function Vn(t, n3) {
  702. var e4 = [], r2 = {};
  703. function i3(t2) {
  704. r2[t2] || jt[t2] || (Ot[t2] ? Ot[t2].forEach(i3) : (e4.push(t2), r2[t2] = true));
  705. }
  706. throw n3.forEach(i3), new Un(t + ": " + e4.map(Mn).join([", "]));
  707. }
  708. function Hn(t, n3, e4, r2, i3, o3, a3, u2, s2, c2, l2, f2, p2) {
  709. l2 = Bt(l2), o3 = In(i3, o3), u2 && (u2 = In(a3, u2)), c2 && (c2 = In(s2, c2)), p2 = In(f2, p2);
  710. var d2 = Rt(l2);
  711. hn(d2, function() {
  712. Vn("Cannot construct " + l2 + " due to unbound types", [r2]);
  713. }), Mt([t, n3, e4], r2 ? [r2] : [], function(n4) {
  714. var e5, i4;
  715. n4 = n4[0], i4 = r2 ? (e5 = n4.registeredClass).instancePrototype : pn.prototype;
  716. var a4 = xt(d2, function() {
  717. if (Object.getPrototypeOf(this) !== s3)
  718. throw new Nt("Use 'new' to construct " + l2);
  719. if (void 0 === f3.constructor_body)
  720. throw new Nt(l2 + " has no accessible constructor");
  721. var t2 = f3.constructor_body[arguments.length];
  722. if (void 0 === t2)
  723. throw new Nt("Tried to invoke ctor of " + l2 + " with invalid number of parameters (" + arguments.length + ") - expected (" + Object.keys(f3.constructor_body).toString() + ") parameters instead!");
  724. return t2.apply(this, arguments);
  725. }), s3 = Object.create(i4, { constructor: { value: a4 } });
  726. a4.prototype = s3;
  727. var f3 = new vn(l2, a4, s3, p2, e5, o3, u2, c2), y2 = new xn(l2, f3, true, false, false), h2 = new xn(l2 + "*", f3, false, false, false), v2 = new xn(l2 + " const*", f3, false, true, false);
  728. return dn[t] = { pointerType: h2, constPointerType: v2 }, Dn(d2, a4), [y2, h2, v2];
  729. });
  730. }
  731. function zn(t, n3) {
  732. for (var e4 = [], r2 = 0; r2 < t; r2++)
  733. e4.push(q[(n3 >> 2) + r2]);
  734. return e4;
  735. }
  736. function qn(t, n3, e4, r2, i3, o3) {
  737. _(n3 > 0);
  738. var a3 = zn(n3, e4);
  739. i3 = In(r2, i3);
  740. var u2 = [o3], s2 = [];
  741. Mt([], [t], function(t2) {
  742. var e5 = "constructor " + (t2 = t2[0]).name;
  743. if (void 0 === t2.registeredClass.constructor_body && (t2.registeredClass.constructor_body = []), void 0 !== t2.registeredClass.constructor_body[n3 - 1])
  744. throw new Nt("Cannot register multiple constructors with identical number of parameters (" + (n3 - 1) + ") for class '" + t2.name + "'! Overload resolution is currently only performed using the parameter count, not actual type info!");
  745. return t2.registeredClass.constructor_body[n3 - 1] = function() {
  746. Vn("Cannot construct " + t2.name + " due to unbound types", a3);
  747. }, Mt([], a3, function(r3) {
  748. return t2.registeredClass.constructor_body[n3 - 1] = function() {
  749. arguments.length !== n3 - 1 && Gt(e5 + " called with " + arguments.length + " arguments, expected " + (n3 - 1)), s2.length = 0, u2.length = n3;
  750. for (var t3 = 1; t3 < n3; ++t3)
  751. u2[t3] = r3[t3].toWireType(s2, arguments[t3 - 1]);
  752. var o4 = i3.apply(null, u2);
  753. return Wt(s2), r3[0].fromWireType(o4);
  754. }, [];
  755. }), [];
  756. });
  757. }
  758. function Bn(t, n3, e4, r2, i3) {
  759. var o3 = n3.length;
  760. o3 < 2 && Gt("argTypes array size mismatch! Must at least get return value and 'this' types!");
  761. for (var a3 = null !== n3[1] && null !== e4, u2 = false, s2 = 1; s2 < n3.length; ++s2)
  762. if (null !== n3[s2] && void 0 === n3[s2].destructorFunction) {
  763. u2 = true;
  764. break;
  765. }
  766. var c2 = "void" !== n3[0].name, l2 = o3 - 2, f2 = new Array(l2), p2 = [], d2 = [];
  767. return function() {
  768. var e5;
  769. arguments.length !== l2 && Gt("function " + t + " called with " + arguments.length + " arguments, expected " + l2 + " args!"), d2.length = 0, p2.length = a3 ? 2 : 1, p2[0] = i3, a3 && (e5 = n3[1].toWireType(d2, this), p2[1] = e5);
  770. for (var o4 = 0; o4 < l2; ++o4)
  771. f2[o4] = n3[o4 + 2].toWireType(d2, arguments[o4]), p2.push(f2[o4]);
  772. var s3 = r2.apply(null, p2);
  773. if (u2)
  774. Wt(d2);
  775. else
  776. for (o4 = a3 ? 1 : 2; o4 < n3.length; o4++) {
  777. var y2 = 1 === o4 ? e5 : f2[o4 - 2];
  778. null !== n3[o4].destructorFunction && n3[o4].destructorFunction(y2);
  779. }
  780. if (c2)
  781. return n3[0].fromWireType(s3);
  782. };
  783. }
  784. function Nn(t, n3, e4, r2, i3, o3, a3, u2) {
  785. var s2 = zn(e4, r2);
  786. n3 = Bt(n3), o3 = In(i3, o3), Mt([], [t], function(t2) {
  787. var r3 = (t2 = t2[0]).name + "." + n3;
  788. function i4() {
  789. Vn("Cannot call " + r3 + " due to unbound types", s2);
  790. }
  791. u2 && t2.registeredClass.pureVirtualFunctions.push(n3);
  792. var c2 = t2.registeredClass.instancePrototype, l2 = c2[n3];
  793. return void 0 === l2 || void 0 === l2.overloadTable && l2.className !== t2.name && l2.argCount === e4 - 2 ? (i4.argCount = e4 - 2, i4.className = t2.name, c2[n3] = i4) : (yn(c2, n3, r3), c2[n3].overloadTable[e4 - 2] = i4), Mt([], s2, function(i5) {
  794. var u3 = Bn(r3, i5, t2, o3, a3);
  795. return void 0 === c2[n3].overloadTable ? (u3.argCount = e4 - 2, c2[n3] = u3) : c2[n3].overloadTable[e4 - 2] = u3, [];
  796. }), [];
  797. });
  798. }
  799. function Gn(t, n3, e4) {
  800. t = Bt(t), Mt([], [n3], function(n4) {
  801. return n4 = n4[0], o2[t] = n4.fromWireType(e4), [];
  802. });
  803. }
  804. var Ln = [], Xn = [{}, { value: void 0 }, { value: null }, { value: true }, { value: false }];
  805. function Jn(t) {
  806. t > 4 && 0 == --Xn[t].refcount && (Xn[t] = void 0, Ln.push(t));
  807. }
  808. function Yn() {
  809. for (var t = 0, n3 = 5; n3 < Xn.length; ++n3)
  810. void 0 !== Xn[n3] && ++t;
  811. return t;
  812. }
  813. function Zn() {
  814. for (var t = 5; t < Xn.length; ++t)
  815. if (void 0 !== Xn[t])
  816. return Xn[t];
  817. return null;
  818. }
  819. function Kn() {
  820. o2.count_emval_handles = Yn, o2.get_first_emval = Zn;
  821. }
  822. function Qn(t) {
  823. switch (t) {
  824. case void 0:
  825. return 1;
  826. case null:
  827. return 2;
  828. case true:
  829. return 3;
  830. case false:
  831. return 4;
  832. default:
  833. var n3 = Ln.length ? Ln.pop() : Xn.length;
  834. return Xn[n3] = { refcount: 1, value: t }, n3;
  835. }
  836. }
  837. function te(t, n3) {
  838. Lt(t, { name: n3 = Bt(n3), fromWireType: function(t2) {
  839. var n4 = Xn[t2].value;
  840. return Jn(t2), n4;
  841. }, toWireType: function(t2, n4) {
  842. return Qn(n4);
  843. }, argPackAdvance: 8, readValueFromPointer: Et, destructorFunction: null });
  844. }
  845. function ne(t, n3, e4) {
  846. switch (n3) {
  847. case 0:
  848. return function(t2) {
  849. var n4 = e4 ? M : V;
  850. return this.fromWireType(n4[t2]);
  851. };
  852. case 1:
  853. return function(t2) {
  854. var n4 = e4 ? H : z;
  855. return this.fromWireType(n4[t2 >> 1]);
  856. };
  857. case 2:
  858. return function(t2) {
  859. var n4 = e4 ? q : B;
  860. return this.fromWireType(n4[t2 >> 2]);
  861. };
  862. default:
  863. throw new TypeError("Unknown integer type: " + t);
  864. }
  865. }
  866. function ee(t, n3, e4, r2) {
  867. var i3 = Ht(e4);
  868. function o3() {
  869. }
  870. n3 = Bt(n3), o3.values = {}, Lt(t, { name: n3, constructor: o3, fromWireType: function(t2) {
  871. return this.constructor.values[t2];
  872. }, toWireType: function(t2, n4) {
  873. return n4.value;
  874. }, argPackAdvance: 8, readValueFromPointer: ne(n3, i3, r2), destructorFunction: null }), hn(n3, o3);
  875. }
  876. function re(t, n3) {
  877. var e4 = jt[t];
  878. return void 0 === e4 && Gt(n3 + " has unknown type " + Mn(t)), e4;
  879. }
  880. function ie(t, n3, e4) {
  881. var r2 = re(t, "enum");
  882. n3 = Bt(n3);
  883. var i3 = r2.constructor, o3 = Object.create(r2.constructor.prototype, { value: { value: e4 }, constructor: { value: xt(r2.name + "_" + n3, function() {
  884. }) } });
  885. i3.values[e4] = o3, i3[n3] = o3;
  886. }
  887. function oe(t) {
  888. if (null === t)
  889. return "null";
  890. var n3 = typeof t;
  891. return "object" === n3 || "array" === n3 || "function" === n3 ? t.toString() : "" + t;
  892. }
  893. function ae(t, n3) {
  894. switch (n3) {
  895. case 2:
  896. return function(t2) {
  897. return this.fromWireType(N[t2 >> 2]);
  898. };
  899. case 3:
  900. return function(t2) {
  901. return this.fromWireType(G[t2 >> 3]);
  902. };
  903. default:
  904. throw new TypeError("Unknown float type: " + t);
  905. }
  906. }
  907. function ue(t, n3, e4) {
  908. var r2 = Ht(e4);
  909. Lt(t, { name: n3 = Bt(n3), fromWireType: function(t2) {
  910. return t2;
  911. }, toWireType: function(t2, n4) {
  912. if ("number" != typeof n4 && "boolean" != typeof n4)
  913. throw new TypeError('Cannot convert "' + oe(n4) + '" to ' + this.name);
  914. return n4;
  915. }, argPackAdvance: 8, readValueFromPointer: ae(n3, r2), destructorFunction: null });
  916. }
  917. function se(t, n3, e4, r2, i3, o3) {
  918. var a3 = zn(n3, e4);
  919. t = Bt(t), i3 = In(r2, i3), hn(t, function() {
  920. Vn("Cannot call " + t + " due to unbound types", a3);
  921. }, n3 - 1), Mt([], a3, function(e5) {
  922. var r3 = [e5[0], null].concat(e5.slice(1));
  923. return Dn(t, Bn(t, r3, null, i3, o3), n3 - 1), [];
  924. });
  925. }
  926. function ce(t, n3, e4) {
  927. switch (n3) {
  928. case 0:
  929. return e4 ? function(t2) {
  930. return M[t2];
  931. } : function(t2) {
  932. return V[t2];
  933. };
  934. case 1:
  935. return e4 ? function(t2) {
  936. return H[t2 >> 1];
  937. } : function(t2) {
  938. return z[t2 >> 1];
  939. };
  940. case 2:
  941. return e4 ? function(t2) {
  942. return q[t2 >> 2];
  943. } : function(t2) {
  944. return B[t2 >> 2];
  945. };
  946. default:
  947. throw new TypeError("Unknown integer type: " + t);
  948. }
  949. }
  950. function le(t, n3, e4, r2, i3) {
  951. n3 = Bt(n3), -1 === i3 && (i3 = 4294967295);
  952. var o3 = Ht(e4), a3 = function(t2) {
  953. return t2;
  954. };
  955. if (0 === r2) {
  956. var u2 = 32 - 8 * e4;
  957. a3 = function(t2) {
  958. return t2 << u2 >>> u2;
  959. };
  960. }
  961. var s2 = -1 != n3.indexOf("unsigned");
  962. Lt(t, { name: n3, fromWireType: a3, toWireType: function(t2, e5) {
  963. if ("number" != typeof e5 && "boolean" != typeof e5)
  964. throw new TypeError('Cannot convert "' + oe(e5) + '" to ' + this.name);
  965. if (e5 < r2 || e5 > i3)
  966. throw new TypeError('Passing a number "' + oe(e5) + '" from JS side to C/C++ side to an argument of type "' + n3 + '", which is outside the valid range [' + r2 + ", " + i3 + "]!");
  967. return s2 ? e5 >>> 0 : 0 | e5;
  968. }, argPackAdvance: 8, readValueFromPointer: ce(n3, o3, 0 !== r2), destructorFunction: null });
  969. }
  970. function fe(t, n3, e4) {
  971. var r2 = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array][n3];
  972. function i3(t2) {
  973. var n4 = B, e5 = n4[t2 >>= 2], i4 = n4[t2 + 1];
  974. return new r2(U, i4, e5);
  975. }
  976. Lt(t, { name: e4 = Bt(e4), fromWireType: i3, argPackAdvance: 8, readValueFromPointer: i3 }, { ignoreDuplicateRegistrations: true });
  977. }
  978. function pe(t, n3) {
  979. var e4 = "std::string" === (n3 = Bt(n3));
  980. Lt(t, { name: n3, fromWireType: function(t2) {
  981. var n4, r2 = B[t2 >> 2];
  982. if (e4)
  983. for (var i3 = t2 + 4, o3 = 0; o3 <= r2; ++o3) {
  984. var a3 = t2 + 4 + o3;
  985. if (o3 == r2 || 0 == V[a3]) {
  986. var u2 = W(i3, a3 - i3);
  987. void 0 === n4 ? n4 = u2 : (n4 += String.fromCharCode(0), n4 += u2), i3 = a3 + 1;
  988. }
  989. }
  990. else {
  991. var s2 = new Array(r2);
  992. for (o3 = 0; o3 < r2; ++o3)
  993. s2[o3] = String.fromCharCode(V[t2 + 4 + o3]);
  994. n4 = s2.join("");
  995. }
  996. return Ze(t2), n4;
  997. }, toWireType: function(t2, n4) {
  998. n4 instanceof ArrayBuffer && (n4 = new Uint8Array(n4));
  999. var r2 = "string" == typeof n4;
  1000. r2 || n4 instanceof Uint8Array || n4 instanceof Uint8ClampedArray || n4 instanceof Int8Array || Gt("Cannot pass non-string to std::string");
  1001. var i3 = (e4 && r2 ? function() {
  1002. return j(n4);
  1003. } : function() {
  1004. return n4.length;
  1005. })(), o3 = Ye(4 + i3 + 1);
  1006. if (B[o3 >> 2] = i3, e4 && r2)
  1007. S(n4, o3 + 4, i3 + 1);
  1008. else if (r2)
  1009. for (var a3 = 0; a3 < i3; ++a3) {
  1010. var u2 = n4.charCodeAt(a3);
  1011. u2 > 255 && (Ze(o3), Gt("String has UTF-16 code units that do not fit in 8 bits")), V[o3 + 4 + a3] = u2;
  1012. }
  1013. else
  1014. for (a3 = 0; a3 < i3; ++a3)
  1015. V[o3 + 4 + a3] = n4[a3];
  1016. return null !== t2 && t2.push(Ze, o3), o3;
  1017. }, argPackAdvance: 8, readValueFromPointer: Et, destructorFunction: function(t2) {
  1018. Ze(t2);
  1019. } });
  1020. }
  1021. function de(t, n3, e4) {
  1022. var r2, i3, o3, a3, u2;
  1023. e4 = Bt(e4), 2 === n3 ? (r2 = k, i3 = F, a3 = R, o3 = function() {
  1024. return z;
  1025. }, u2 = 1) : 4 === n3 && (r2 = x, i3 = D, a3 = I, o3 = function() {
  1026. return B;
  1027. }, u2 = 2), Lt(t, { name: e4, fromWireType: function(t2) {
  1028. for (var e5, i4 = B[t2 >> 2], a4 = o3(), s2 = t2 + 4, c2 = 0; c2 <= i4; ++c2) {
  1029. var l2 = t2 + 4 + c2 * n3;
  1030. if (c2 == i4 || 0 == a4[l2 >> u2]) {
  1031. var f2 = r2(s2, l2 - s2);
  1032. void 0 === e5 ? e5 = f2 : (e5 += String.fromCharCode(0), e5 += f2), s2 = l2 + n3;
  1033. }
  1034. }
  1035. return Ze(t2), e5;
  1036. }, toWireType: function(t2, r3) {
  1037. "string" != typeof r3 && Gt("Cannot pass non-string to C++ string type " + e4);
  1038. var o4 = a3(r3), s2 = Ye(4 + o4 + n3);
  1039. return B[s2 >> 2] = o4 >> u2, i3(r3, s2 + 4, o4 + n3), null !== t2 && t2.push(Ze, s2), s2;
  1040. }, argPackAdvance: 8, readValueFromPointer: Et, destructorFunction: function(t2) {
  1041. Ze(t2);
  1042. } });
  1043. }
  1044. function ye(t, n3, e4, r2, i3, o3) {
  1045. At[t] = { name: Bt(n3), rawConstructor: In(e4, r2), rawDestructor: In(i3, o3), fields: [] };
  1046. }
  1047. function he(t, n3, e4, r2, i3, o3, a3, u2, s2, c2) {
  1048. At[t].fields.push({ fieldName: Bt(n3), getterReturnType: e4, getter: In(r2, i3), getterContext: o3, setterArgumentType: a3, setter: In(u2, s2), setterContext: c2 });
  1049. }
  1050. function ve(t, n3) {
  1051. Lt(t, { isVoid: true, name: n3 = Bt(n3), argPackAdvance: 0, fromWireType: function() {
  1052. }, toWireType: function(t2, n4) {
  1053. } });
  1054. }
  1055. function me(t) {
  1056. return t || Gt("Cannot use deleted val. handle = " + t), Xn[t].value;
  1057. }
  1058. function ge(t, n3, e4) {
  1059. t = me(t), n3 = re(n3, "emval::as");
  1060. var r2 = [], i3 = Qn(r2);
  1061. return q[e4 >> 2] = i3, n3.toWireType(r2, t);
  1062. }
  1063. var be = {};
  1064. function $e(t) {
  1065. var n3 = be[t];
  1066. return void 0 === n3 ? Bt(t) : n3;
  1067. }
  1068. var Ce = [];
  1069. function we(t, n3, e4, r2) {
  1070. (t = Ce[t])(n3 = me(n3), e4 = $e(e4), null, r2);
  1071. }
  1072. function Te() {
  1073. if ("object" == typeof globalThis)
  1074. return globalThis;
  1075. function n3(t) {
  1076. t.$$$embind_global$$$ = t;
  1077. var n4 = "object" == typeof $$$embind_global$$$ && t.$$$embind_global$$$ === t;
  1078. return n4 || delete t.$$$embind_global$$$, n4;
  1079. }
  1080. if ("object" == typeof $$$embind_global$$$)
  1081. return $$$embind_global$$$;
  1082. if ("object" == typeof e && n3(e) ? $$$embind_global$$$ = e : "object" == typeof self && n3(self) && ($$$embind_global$$$ = self), "object" == typeof $$$embind_global$$$)
  1083. return $$$embind_global$$$;
  1084. throw Error("unable to get global object.");
  1085. }
  1086. function _e(t) {
  1087. return 0 === t ? Qn(Te()) : (t = $e(t), Qn(Te()[t]));
  1088. }
  1089. function Pe(t) {
  1090. var n3 = Ce.length;
  1091. return Ce.push(t), n3;
  1092. }
  1093. function Ae(t, n3) {
  1094. for (var e4 = new Array(t), r2 = 0; r2 < t; ++r2)
  1095. e4[r2] = re(q[(n3 >> 2) + r2], "parameter " + r2);
  1096. return e4;
  1097. }
  1098. function We(t, n3) {
  1099. var e4 = Ae(t, n3), r2 = e4[0], i3 = new Array(t - 1);
  1100. return Pe(function(n4, o3, a3, u2) {
  1101. for (var s2 = 0, c2 = 0; c2 < t - 1; ++c2)
  1102. i3[c2] = e4[c2 + 1].readValueFromPointer(u2 + s2), s2 += e4[c2 + 1].argPackAdvance;
  1103. var l2 = n4[o3].apply(n4, i3);
  1104. for (c2 = 0; c2 < t - 1; ++c2)
  1105. e4[c2 + 1].deleteObject && e4[c2 + 1].deleteObject(i3[c2]);
  1106. if (!r2.isVoid)
  1107. return r2.toWireType(a3, l2);
  1108. });
  1109. }
  1110. function Ee(t) {
  1111. return t = $e(t), Qn(o2[t]);
  1112. }
  1113. function Se(t, n3) {
  1114. return Qn((t = me(t))[n3 = me(n3)]);
  1115. }
  1116. function je(t) {
  1117. t > 4 && (Xn[t].refcount += 1);
  1118. }
  1119. function Oe(t) {
  1120. var n3 = new Array(t + 1);
  1121. return function(e4, r2, i3) {
  1122. n3[0] = e4;
  1123. for (var o3 = 0; o3 < t; ++o3) {
  1124. var a3 = re(q[(r2 >> 2) + o3], "parameter " + o3);
  1125. n3[o3 + 1] = a3.readValueFromPointer(i3), i3 += a3.argPackAdvance;
  1126. }
  1127. return Qn(new (e4.bind.apply(e4, n3))());
  1128. };
  1129. }
  1130. var ke = {};
  1131. function Fe(t, n3, e4, r2) {
  1132. t = me(t);
  1133. var i3 = ke[n3];
  1134. return i3 || (i3 = Oe(n3), ke[n3] = i3), i3(t, e4, r2);
  1135. }
  1136. function Re(t) {
  1137. return Qn($e(t));
  1138. }
  1139. function xe(t) {
  1140. Wt(Xn[t].value), Jn(t);
  1141. }
  1142. function De() {
  1143. vt();
  1144. }
  1145. function Ie(t, n3, e4) {
  1146. V.copyWithin(t, n3, n3 + e4);
  1147. }
  1148. function Ue() {
  1149. return V.length;
  1150. }
  1151. function Me(t) {
  1152. try {
  1153. return b.grow(t - U.byteLength + 65535 >>> 16), J(b.buffer), 1;
  1154. } catch (n3) {
  1155. }
  1156. }
  1157. function Ve(t) {
  1158. t >>>= 0;
  1159. var n3 = Ue(), e4 = 65536, r2 = 2147483648;
  1160. if (t > r2)
  1161. return false;
  1162. for (var i3 = 16777216, o3 = 1; o3 <= 4; o3 *= 2) {
  1163. var a3 = n3 * (1 + 0.2 / o3);
  1164. if (a3 = Math.min(a3, t + 100663296), Me(Math.min(r2, X(Math.max(i3, t, a3), e4))))
  1165. return true;
  1166. }
  1167. return false;
  1168. }
  1169. var He = { mappings: {}, buffers: [null, [], []], printChar: function(t, n3) {
  1170. var e4 = He.buffers[t];
  1171. 0 === n3 || 10 === n3 ? ((1 === t ? $ : C)(A(e4, 0)), e4.length = 0) : e4.push(n3);
  1172. }, varargs: void 0, get: function() {
  1173. return He.varargs += 4, q[He.varargs - 4 >> 2];
  1174. }, getStr: function(t) {
  1175. return W(t);
  1176. }, get64: function(t, n3) {
  1177. return t;
  1178. } };
  1179. function ze(t) {
  1180. return 0;
  1181. }
  1182. function qe(t, n3, e4, r2, i3) {
  1183. }
  1184. function Be(t, n3, e4, r2) {
  1185. for (var i3 = 0, o3 = 0; o3 < e4; o3++) {
  1186. for (var a3 = q[n3 + 8 * o3 >> 2], u2 = q[n3 + (8 * o3 + 4) >> 2], s2 = 0; s2 < u2; s2++)
  1187. He.printChar(t, V[a3 + s2]);
  1188. i3 += u2;
  1189. }
  1190. return q[r2 >> 2] = i3, 0;
  1191. }
  1192. function Ne(t) {
  1193. return (t = +t) >= 0 ? +ft(t + 0.5) : +lt(t - 0.5);
  1194. }
  1195. function Ge(t) {
  1196. }
  1197. It = o2.InternalError = Dt(Error, "InternalError"), zt(), Nt = o2.BindingError = Dt(Error, "BindingError"), fn(), Rn(), En(), Un = o2.UnboundTypeError = Dt(Error, "UnboundTypeError"), Kn();
  1198. var Le = { u: Vt, J: Xt, y: Hn, x: qn, d: Nn, k: Gn, I: te, n: ee, a: ie, B: ue, i: se, j: le, h: fe, C: pe, w: de, v: ye, c: he, K: ve, m: ge, s: we, b: Jn, z: _e, t: We, r: Ee, e: Se, g: je, q: Fe, f: Re, l: xe, p: De, F: Ie, G: Ve, H: ze, D: qe, A: Be, memory: b, o: Ne, E: Ge, table: w };
  1199. Pt();
  1200. var Xe, Je = o2.___wasm_call_ctors = function() {
  1201. return (Je = o2.___wasm_call_ctors = o2.asm.L).apply(null, arguments);
  1202. }, Ye = o2._malloc = function() {
  1203. return (Ye = o2._malloc = o2.asm.M).apply(null, arguments);
  1204. }, Ze = o2._free = function() {
  1205. return (Ze = o2._free = o2.asm.N).apply(null, arguments);
  1206. }, Ke = o2.___getTypeName = function() {
  1207. return (Ke = o2.___getTypeName = o2.asm.O).apply(null, arguments);
  1208. };
  1209. function Qe(t) {
  1210. this.name = "ExitStatus", this.message = "Program terminated with exit(" + t + ")", this.status = t;
  1211. }
  1212. function tr(t) {
  1213. function n3() {
  1214. Xe || (Xe = true, o2.calledRun = true, T || (ot(), at(), e3(o2), o2.onRuntimeInitialized && o2.onRuntimeInitialized(), ut()));
  1215. }
  1216. pt > 0 || (it(), pt > 0 || (o2.setStatus ? (o2.setStatus("Running..."), setTimeout(function() {
  1217. setTimeout(function() {
  1218. o2.setStatus("");
  1219. }, 1), n3();
  1220. }, 1)) : n3()));
  1221. }
  1222. if (o2.___embind_register_native_and_builtin_types = function() {
  1223. return (o2.___embind_register_native_and_builtin_types = o2.asm.P).apply(null, arguments);
  1224. }, o2.dynCall_viii = function() {
  1225. return (o2.dynCall_viii = o2.asm.Q).apply(null, arguments);
  1226. }, o2.dynCall_vi = function() {
  1227. return (o2.dynCall_vi = o2.asm.R).apply(null, arguments);
  1228. }, o2.dynCall_v = function() {
  1229. return (o2.dynCall_v = o2.asm.S).apply(null, arguments);
  1230. }, o2.dynCall_i = function() {
  1231. return (o2.dynCall_i = o2.asm.T).apply(null, arguments);
  1232. }, o2.dynCall_iii = function() {
  1233. return (o2.dynCall_iii = o2.asm.U).apply(null, arguments);
  1234. }, o2.dynCall_ii = function() {
  1235. return (o2.dynCall_ii = o2.asm.V).apply(null, arguments);
  1236. }, o2.dynCall_vii = function() {
  1237. return (o2.dynCall_vii = o2.asm.W).apply(null, arguments);
  1238. }, o2.dynCall_iiii = function() {
  1239. return (o2.dynCall_iiii = o2.asm.X).apply(null, arguments);
  1240. }, o2.dynCall_iiiii = function() {
  1241. return (o2.dynCall_iiiii = o2.asm.Y).apply(null, arguments);
  1242. }, o2.dynCall_iiiiii = function() {
  1243. return (o2.dynCall_iiiiii = o2.asm.Z).apply(null, arguments);
  1244. }, o2.dynCall_iiiiiiii = function() {
  1245. return (o2.dynCall_iiiiiiii = o2.asm._).apply(null, arguments);
  1246. }, o2.dynCall_iiiiiiiii = function() {
  1247. return (o2.dynCall_iiiiiiiii = o2.asm.$).apply(null, arguments);
  1248. }, o2.dynCall_viiii = function() {
  1249. return (o2.dynCall_viiii = o2.asm.aa).apply(null, arguments);
  1250. }, o2.dynCall_iiiiiii = function() {
  1251. return (o2.dynCall_iiiiiii = o2.asm.ba).apply(null, arguments);
  1252. }, o2.dynCall_iiiiiiiiiiiiiiiiiiii = function() {
  1253. return (o2.dynCall_iiiiiiiiiiiiiiiiiiii = o2.asm.ca).apply(null, arguments);
  1254. }, o2.dynCall_iiiiiiiiiiiiiiiiiiiii = function() {
  1255. return (o2.dynCall_iiiiiiiiiiiiiiiiiiiii = o2.asm.da).apply(null, arguments);
  1256. }, o2.dynCall_iiiiiiiiiiiiiiiiiii = function() {
  1257. return (o2.dynCall_iiiiiiiiiiiiiiiiiii = o2.asm.ea).apply(null, arguments);
  1258. }, o2.dynCall_viiiii = function() {
  1259. return (o2.dynCall_viiiii = o2.asm.fa).apply(null, arguments);
  1260. }, o2.dynCall_iiiiiiiiii = function() {
  1261. return (o2.dynCall_iiiiiiiiii = o2.asm.ga).apply(null, arguments);
  1262. }, o2.dynCall_iiiiiiiiiii = function() {
  1263. return (o2.dynCall_iiiiiiiiiii = o2.asm.ha).apply(null, arguments);
  1264. }, o2.dynCall_jiji = function() {
  1265. return (o2.dynCall_jiji = o2.asm.ia).apply(null, arguments);
  1266. }, o2.dynCall_viiiiii = function() {
  1267. return (o2.dynCall_viiiiii = o2.asm.ja).apply(null, arguments);
  1268. }, dt = function t() {
  1269. Xe || tr(), Xe || (dt = t);
  1270. }, o2.run = tr, o2.preInit)
  1271. for ("function" == typeof o2.preInit && (o2.preInit = [o2.preInit]); o2.preInit.length > 0; )
  1272. o2.preInit.pop()();
  1273. return tr(), n2.ready;
  1274. }, e2.exports = i;
  1275. var a = n({ __proto__: null, default: o.exports }, [o.exports]);
  1276. export {
  1277. a as b
  1278. };
  1279. //# sourceMappingURL=basis_transcoder-NDVUP4EN.js.map