-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpy.js
1 lines (1 loc) · 10.9 KB
/
py.js
1
var Module=typeof pyodide._module!=="undefined"?pyodide._module:{};Module.checkABI(1);if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0;Module.finishedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){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 location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}else{throw"using preloaded data can only be done on a web page or in a web worker"}var PACKAGE_NAME="py.data";var REMOTE_PACKAGE_BASE="py.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;var PACKAGE_UUID=metadata.package_uuid;function fetchRemotePackage(packageName,packageSize,callback,errback){var xhr=new XMLHttpRequest;xhr.open("GET",packageName,true);xhr.responseType="arraybuffer";xhr.onprogress=function(event){var url=packageName;var size=packageSize;if(event.total)size=event.total;if(event.loaded){if(!xhr.addedTotal){xhr.addedTotal=true;if(!Module.dataFileDownloads)Module.dataFileDownloads={};Module.dataFileDownloads[url]={loaded:event.loaded,total:size}}else{Module.dataFileDownloads[url].loaded=event.loaded}var total=0;var loaded=0;var num=0;for(var download in Module.dataFileDownloads){var data=Module.dataFileDownloads[download];total+=data.total;loaded+=data.loaded;num++}total=Math.ceil(total*Module.expectedDataFileDownloads/num);if(Module["setStatus"])Module["setStatus"]("Downloading data... ("+loaded+"/"+total+")")}else if(!Module.dataFileDownloads){if(Module["setStatus"])Module["setStatus"]("Downloading data...")}};xhr.onerror=function(event){throw new Error("NetworkError for: "+packageName)};xhr.onload=function(event){if(xhr.status==200||xhr.status==304||xhr.status==206||xhr.status==0&&xhr.response){var packageData=xhr.response;callback(packageData)}else{throw new Error(xhr.statusText+" : "+xhr.responseURL)}};xhr.send(null)}function handleError(error){console.error("package error:",error)}var fetchedCallback=null;var fetched=Module["getPreloadedPackage"]?Module["getPreloadedPackage"](REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE):null;if(!fetched)fetchRemotePackage(REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE,function(data){if(fetchedCallback){fetchedCallback(data);fetchedCallback=null}else{fetched=data}},handleError);function runWithFS(){function assert(check,msg){if(!check)throw msg+(new Error).stack}Module["FS_createPath"]("/","lib",true,true);Module["FS_createPath"]("/lib","python3.7",true,true);Module["FS_createPath"]("/lib/python3.7","site-packages",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages","py-1.5.4-py3.7.egg-info",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages","py",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/py","_code",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/py","_path",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/py","_process",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/py","_vendored_packages",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/py","_io",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/py","_log",true,true);function DataRequest(start,end,audio){this.start=start;this.end=end;this.audio=audio}DataRequest.prototype={requests:{},open:function(mode,name){this.name=name;this.requests[name]=this;Module["addRunDependency"]("fp "+this.name)},send:function(){},onload:function(){var byteArray=this.byteArray.subarray(this.start,this.end);this.finish(byteArray)},finish:function(byteArray){var that=this;Module["FS_createPreloadedFile"](this.name,null,byteArray,true,true,function(){Module["removeRunDependency"]("fp "+that.name)},function(){if(that.audio){Module["removeRunDependency"]("fp "+that.name)}else{err("Preloading file "+that.name+" failed")}},false,true);this.requests[this.name]=null}};function processPackageData(arrayBuffer){Module.finishedDataFileDownloads++;assert(arrayBuffer,"Loading data file failed.");assert(arrayBuffer instanceof ArrayBuffer,"bad input to processPackageData");var byteArray=new Uint8Array(arrayBuffer);var curr;var compressedData={data:null,cachedOffset:153696,cachedIndexes:[-1,-1],cachedChunks:[null,null],offsets:[0,1019,2036,3325,4459,5967,7049,8209,9422,10650,11654,12888,13961,15290,16198,17090,18311,19380,20590,21805,23081,24388,25759,27055,28201,29465,30579,31831,33100,34235,35338,36440,37576,38765,39760,40767,41889,43206,44254,45155,45972,46893,48292,49476,50287,51150,51921,52853,53836,54965,56314,57734,59077,60267,61442,62667,63765,64873,65917,67114,68237,69164,70252,71387,72555,73681,74781,75975,77136,78270,79331,80629,81667,82653,83903,85026,86232,87305,88552,89872,90957,92011,93134,94408,95660,96851,98024,99257,100363,101512,102682,103913,105122,106350,107365,108550,109373,110535,111850,113034,114243,115555,116698,117698,118924,119936,121148,122549,123812,125108,126195,127450,128642,129640,130796,131795,132791,133989,135180,136375,137303,138407,139680,140846,142250,143310,144581,145731,146785,147694,149043,150240,151361,152615],sizes:[1019,1017,1289,1134,1508,1082,1160,1213,1228,1004,1234,1073,1329,908,892,1221,1069,1210,1215,1276,1307,1371,1296,1146,1264,1114,1252,1269,1135,1103,1102,1136,1189,995,1007,1122,1317,1048,901,817,921,1399,1184,811,863,771,932,983,1129,1349,1420,1343,1190,1175,1225,1098,1108,1044,1197,1123,927,1088,1135,1168,1126,1100,1194,1161,1134,1061,1298,1038,986,1250,1123,1206,1073,1247,1320,1085,1054,1123,1274,1252,1191,1173,1233,1106,1149,1170,1231,1209,1228,1015,1185,823,1162,1315,1184,1209,1312,1143,1e3,1226,1012,1212,1401,1263,1296,1087,1255,1192,998,1156,999,996,1198,1191,1195,928,1104,1273,1166,1404,1060,1271,1150,1054,909,1349,1197,1121,1254,1081],successes:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]};compressedData.data=byteArray;assert(typeof Module.LZ4==="object","LZ4 not present - was your app build with -s LZ4=1 ?");Module.LZ4.loadPackage({metadata:metadata,compressedData:compressedData});Module["removeRunDependency"]("datafile_py.data")}Module["addRunDependency"]("datafile_py.data");if(!Module.preloadResults)Module.preloadResults={};Module.preloadResults[PACKAGE_NAME]={fromCache:false};if(fetched){processPackageData(fetched);fetched=null}else{fetchedCallback=processPackageData}}if(Module["calledRun"]){runWithFS()}else{if(!Module["preRun"])Module["preRun"]=[];Module["preRun"].push(runWithFS)}};loadPackage({files:[{filename:"/lib/python3.7/site-packages/py-1.5.4-py3.7.egg-info/SOURCES.txt",start:0,end:3555,audio:0},{filename:"/lib/python3.7/site-packages/py-1.5.4-py3.7.egg-info/PKG-INFO",start:3555,end:6627,audio:0},{filename:"/lib/python3.7/site-packages/py-1.5.4-py3.7.egg-info/not-zip-safe",start:6627,end:6628,audio:0},{filename:"/lib/python3.7/site-packages/py-1.5.4-py3.7.egg-info/dependency_links.txt",start:6628,end:6629,audio:0},{filename:"/lib/python3.7/site-packages/py-1.5.4-py3.7.egg-info/top_level.txt",start:6629,end:6632,audio:0},{filename:"/lib/python3.7/site-packages/py/_xmlgen.py",start:6632,end:14996,audio:0},{filename:"/lib/python3.7/site-packages/py/__metainfo.py",start:14996,end:15051,audio:0},{filename:"/lib/python3.7/site-packages/py/_error.py",start:15051,end:17968,audio:0},{filename:"/lib/python3.7/site-packages/py/_version.py",start:17968,end:18084,audio:0},{filename:"/lib/python3.7/site-packages/py/test.py",start:18084,end:18306,audio:0},{filename:"/lib/python3.7/site-packages/py/_builtin.py",start:18306,end:24827,audio:0},{filename:"/lib/python3.7/site-packages/py/__init__.py",start:24827,end:30849,audio:0},{filename:"/lib/python3.7/site-packages/py/_std.py",start:30849,end:31480,audio:0},{filename:"/lib/python3.7/site-packages/py/_code/source.py",start:31480,end:45530,audio:0},{filename:"/lib/python3.7/site-packages/py/_code/code.py",start:45530,end:73022,audio:0},{filename:"/lib/python3.7/site-packages/py/_code/_assertionnew.py",start:73022,end:84472,audio:0},{filename:"/lib/python3.7/site-packages/py/_code/__init__.py",start:84472,end:84518,audio:0},{filename:"/lib/python3.7/site-packages/py/_code/_assertionold.py",start:84518,end:102387,audio:0},{filename:"/lib/python3.7/site-packages/py/_code/_py2traceback.py",start:102387,end:105152,audio:0},{filename:"/lib/python3.7/site-packages/py/_code/assertion.py",start:105152,end:108326,audio:0},{filename:"/lib/python3.7/site-packages/py/_path/local.py",start:108326,end:143652,audio:0},{filename:"/lib/python3.7/site-packages/py/_path/common.py",start:143652,end:158278,audio:0},{filename:"/lib/python3.7/site-packages/py/_path/svnwc.py",start:158278,end:202103,audio:0},{filename:"/lib/python3.7/site-packages/py/_path/__init__.py",start:202103,end:202135,audio:0},{filename:"/lib/python3.7/site-packages/py/_path/cacheutil.py",start:202135,end:205468,audio:0},{filename:"/lib/python3.7/site-packages/py/_path/svnurl.py",start:205468,end:220183,audio:0},{filename:"/lib/python3.7/site-packages/py/_process/killproc.py",start:220183,end:220831,audio:0},{filename:"/lib/python3.7/site-packages/py/_process/cmdexec.py",start:220831,end:222645,audio:0},{filename:"/lib/python3.7/site-packages/py/_process/__init__.py",start:222645,end:222685,audio:0},{filename:"/lib/python3.7/site-packages/py/_process/forkedfunc.py",start:222685,end:226377,audio:0},{filename:"/lib/python3.7/site-packages/py/_vendored_packages/apipkg.py",start:226377,end:232797,audio:0},{filename:"/lib/python3.7/site-packages/py/_vendored_packages/iniconfig.py",start:232797,end:238005,audio:0},{filename:"/lib/python3.7/site-packages/py/_vendored_packages/__init__.py",start:238005,end:238005,audio:0},{filename:"/lib/python3.7/site-packages/py/_io/capture.py",start:238005,end:249645,audio:0},{filename:"/lib/python3.7/site-packages/py/_io/saferepr.py",start:249645,end:252128,audio:0},{filename:"/lib/python3.7/site-packages/py/_io/__init__.py",start:252128,end:252157,audio:0},{filename:"/lib/python3.7/site-packages/py/_io/terminalwriter.py",start:252157,end:265643,audio:0},{filename:"/lib/python3.7/site-packages/py/_log/log.py",start:265643,end:271646,audio:0},{filename:"/lib/python3.7/site-packages/py/_log/__init__.py",start:271646,end:271720,audio:0},{filename:"/lib/python3.7/site-packages/py/_log/warning.py",start:271720,end:274285,audio:0}],remote_package_size:157792,package_uuid:"15ba33a1-42d5-4df5-93c7-543bdc08e1e1"})})();