basis_transcoder-YLPYC2ZL.js 48 KB

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