mirror of
https://github.com/osmarks/website
synced 2024-11-08 20:29:55 +00:00
8 lines
40 KiB
Plaintext
8 lines
40 KiB
Plaintext
|
{
|
||
|
"version": 3,
|
||
|
"sources": ["../pkg/tic_tac_toe_4d.js", "../src/webworker_glue.js"],
|
||
|
"sourcesContent": ["let wasm;\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedFloat64Memory0 = null;\n\nfunction getFloat64Memory0() {\n if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {\n cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);\n }\n return cachedFloat64Memory0;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto ==
|
||
|
"mappings": "MAAA,IAAIA,EAEEC,EAAO,IAAI,MAAM,GAAG,EAAE,KAAK,MAAS,EAE1CA,EAAK,KAAK,OAAW,KAAM,GAAM,EAAK,EAEtC,SAASC,EAAUC,EAAK,CAAE,OAAOF,EAAKE,CAAG,CAAG,CAE5C,IAAIC,EAAYH,EAAK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GE,CAAI,CAChC,QAAE,CACM,EAAEF,EAAM,MAAQ,EAChBjD,EAAK,oBAAoB,IAAIiD,EAAM,IAAI,EAAEG,EAAGH,EAAM,CAAC,EAGnDA,EAAM,EAAIG,CAElB,CACJ,EACA,OAAAF,EAAK,SAAWD,EAETC,CACX,CAEA,SAASG,EAAkBlB,EAAKI,EAAQ,CACpC,IAAMzB,EAAMyB,EAAOJ,EAAI,OAAS,EAAG,CAAC,IAAM,EAC1C,OAAAvB,EAAgB,EAAE,IAAIuB,EAAKrB,EAAM,CAAC,EAClCkB,EAAkBG,EAAI,OACfrB,CACX,CACA,SAASwC,EAAiBT,EAAMC,EAAMS,EAAM,CACxC,IAAMC,EAAOH,EAAkBE,EAAMvD,EAAK,iBAAiB,EACrDyD,EAAOzB,EACbhC,EAAK,gEAAgE6C,EAAMC,EAAMU,EAAMC,CAAI,CAC/F,CAEA,SAASC,EAAYb,EAAMC,EAAMC,EAAMC,EAAG,CACtC,IAAMC,EAAQ,CAAE,EAAGJ,EAAM,EAAGC,EAAM,IAAK,EAAG,KAAAC,CAAK,EACzCG,EAAO,IAAIC,IAAS,CAItBF,EAAM,MACN,GAAI,CACA,OAAOD,EAAEC,EAAM,EAAGA,EAAM,EAAG,GAAGE,CAAI,CACtC,QAAE,CACM,EAAEF,EAAM,MAAQ,IAChBjD,EAAK,oBAAoB,IAAIiD,EAAM,IAAI,EAAEA,EAAM,EAAGA,EA
|
||
|
"names": ["wasm", "heap", "getObject", "idx", "heap_next", "dropObject", "takeObject", "ret", "addHeapObject", "obj", "cachedTextDecoder", "cachedUint8Memory0", "getUint8Memory0", "getStringFromWasm0", "ptr", "len", "isLikeNone", "x", "cachedFloat64Memory0", "getFloat64Memory0", "cachedInt32Memory0", "getInt32Memory0", "debugString", "val", "type", "description", "name", "length", "debug", "i", "builtInMatches", "className", "WASM_VECTOR_LEN", "cachedTextEncoder", "encodeString", "arg", "view", "buf", "passStringToWasm0", "malloc", "realloc", "mem", "offset", "code", "makeMutClosure", "arg0", "arg1", "dtor", "f", "state", "real", "args", "a", "passArray8ToWasm0", "__wbg_adapter_18", "arg2", "ptr0", "len0", "makeClosure", "__wbg_adapter_21", "getArrayU8FromWasm0", "run_ai", "retptr", "r0", "r1", "v2", "notDefined", "what", "cachedUint32Memory0", "getUint32Memory0", "wasm", "getArrayJsValueFromWasm0", "ptr", "len", "slice", "result", "i", "takeObject", "handleError", "f", "args", "e", "addHeapObject", "__wbg_load", "module", "imports", "bytes", "instance", "__wbg_get_imports", "arg0", "ret", "getObject", "notDefined", "arg1", "v0", "getArrayU8FromWasm0", "getStringFromWasm0", "obj", "getFloat64Memory0", "isLikeNone", "getInt32Memory0", "ptr1", "passStringToWasm0", "len1", "WASM_VECTOR_LEN", "deferred0_0", "deferred0_1", "arg2", "arg3", "arg4", "debugString", "makeMutClosure", "__wbg_adapter_18", "makeClosure", "__wbg_adapter_21", "__wbg_finalize_init", "instance", "module", "wasm", "__wbg_init", "cachedFloat64Memory0", "cachedInt32Memory0", "cachedUint32Memory0", "cachedUint8Memory0", "__wbg_init", "input", "wasm", "imports", "__wbg_get_imports", "instance", "module", "__wbg_load", "__wbg_finalize_init", "tic_tac_toe_4d_default", "__wbg_init", "tic_tac_toe_4d_default", "x", "event", "run_ai"]
|
||
|
}
|