securityos/public/Program Files/Pyodide/pyodide.asm.js

18 lines
1.5 MiB
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
"use strict";
var _createPyodideModule = (() => {
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
return (
function(_createPyodideModule) {
_createPyodideModule = _createPyodideModule || {};
var Module=typeof _createPyodideModule!="undefined"?_createPyodideModule:{};if(typeof globalThis.BigInt64Array==="undefined"){function partsToBigIntSigned(lower,upper){return BigInt(lower)|BigInt(upper+2*(upper&2147483648))<<32n}function partsToBigIntUnsigned(lower,upper){return BigInt(lower)|BigInt(upper)<<32n}function bigIntToParts(value){var lower=Number(BigInt(value)&BigInt(4294967295))|0;var upper=Number(BigInt(value)>>32n)|0;return[lower,upper]}function createBigIntArrayShim(partsToBigInt){function createBigInt64Array(array){if(typeof array==="number"){array=new Uint32Array(2*array)}var orig_array;if(!ArrayBuffer.isView(array)){if(array.constructor&&array.constructor.name==="ArrayBuffer"){array=new Uint32Array(array)}else{orig_array=array;array=new Uint32Array(array.length*2)}}var proxy=new Proxy({slice:function(min,max){if(max===undefined){max=array.length}var new_buf=array.slice(min*2,max*2);return createBigInt64Array(new_buf)},subarray:function(min,max){var new_buf=array.subarray(min*2,max*2);return createBigInt64Array(new_buf)},[Symbol.iterator]:function*(){for(var i=0;i<array.length/2;i++){yield partsToBigInt(array[2*i],array[2*i+1])}},BYTES_PER_ELEMENT:2*array.BYTES_PER_ELEMENT,buffer:array.buffer,byteLength:array.byteLength,byteOffset:array.byteOffset,length:array.length/2,copyWithin:function(target,start,end){array.copyWithin(target*2,start*2,end*2);return proxy},set:function(source,targetOffset){if(targetOffset===undefined){targetOffset=0}if(2*(source.length+targetOffset)>array.length){throw new RangeError("offset is out of bounds")}for(var i=0;i<source.length;i++){var value=source[i];var pair=bigIntToParts(value);array.set(pair,2*(targetOffset+i))}}},{get:function(target,idx,receiver){if(typeof idx!=="string"||!/^\d+$/.test(idx)){return Reflect.get(target,idx,receiver)}var lower=array[idx*2];var upper=array[idx*2+1];return partsToBigInt(lower,upper)},set:function(target,idx,value,receiver){if(typeof idx!=="string"||!/^\d+$/.test(idx)){return Reflect.set(target,idx,value,receiver)}if(typeof value!=="bigint"){throw new TypeError(`Cannot convert ${value} to a BigInt`)}var pair=bigIntToParts(value);array.set(pair,2*idx);return true}});if(orig_array){proxy.set(orig_array)}return proxy}return createBigInt64Array}globalThis.BigUint64Array=createBigIntArrayShim(partsToBigIntUnsigned);globalThis.BigInt64Array=createBigIntArrayShim(partsToBigIntSigned)}var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){if(Module["ENVIRONMENT_IS_PTHREAD"])return;var loadPackage=function(metadata){var PACKAGE_PATH="";if(typeof window==="object"){PACKAGE_PATH=window["encodeURIComponent"](window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/")}else if(typeof process==="undefined"&&typeof location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}var PACKAGE_NAME="dist/pyodide.asm.data";var REMOTE_PACKAGE_BASE="pyodide.asm.data";if(typeof Module["locateFilePackage"]==="function"&&!Module["locateFile"]){Module["locateFile"]=Module["locateFilePackage"];err("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)")}var REMOTE_PACKAGE_NAME=Module["locateFile"]?Module["locateFile"](REMOTE_PACKAGE_BASE,""):REMOTE_PACKAGE_BASE;var REMOTE_PACKAGE_SIZE=metadata["remote_package_size"];function fetchRemotePackage(packageName,packageSize,callback,errback){if(typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string"){require("fs").readFile(packageName,function(err,contents){if(err){errback(err)}else{callback(contents.buffer)}});return}var xhr=new XMLHttpRequest;xhr.open("GET",packageName,true);xhr.responseType="arraybuffer";xhr.onprogress=function(event){var url=packageName;var
return _createPyodideModule.ready
}
);
})();
globalThis._createPyodideModule = _createPyodideModule;