pyodide 0.26.1 → 0.26.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/pyodide.mjs CHANGED
@@ -1,10 +1,4 @@
1
- var re=Object.create;var R=Object.defineProperty;var ie=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var ae=Object.getPrototypeOf,se=Object.prototype.hasOwnProperty;var f=(t,e)=>R(t,"name",{value:e,configurable:!0}),w=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var D=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var ce=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of oe(e))!se.call(t,l)&&l!==o&&R(t,l,{get:()=>e[l],enumerable:!(a=ie(e,l))||a.enumerable});return t};var le=(t,e,o)=>(o=t!=null?re(ae(t)):{},ce(e||!t||!t.__esModule?R(o,"default",{value:t,enumerable:!0}):o,t));var T=D((O,U)=>{(function(t,e){"use strict";typeof define=="function"&&define.amd?define("stackframe",[],e):typeof O=="object"?U.exports=e():t.StackFrame=e()})(O,function(){"use strict";function t(d){return!isNaN(parseFloat(d))&&isFinite(d)}f(t,"_isNumber");function e(d){return d.charAt(0).toUpperCase()+d.substring(1)}f(e,"_capitalize");function o(d){return function(){return this[d]}}f(o,"_getter");var a=["isConstructor","isEval","isNative","isToplevel"],l=["columnNumber","lineNumber"],n=["fileName","functionName","source"],r=["args"],u=["evalOrigin"],i=a.concat(l,n,r,u);function c(d){if(d)for(var y=0;y<i.length;y++)d[i[y]]!==void 0&&this["set"+e(i[y])](d[i[y]])}f(c,"StackFrame"),c.prototype={getArgs:function(){return this.args},setArgs:function(d){if(Object.prototype.toString.call(d)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=d},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(d){if(d instanceof c)this.evalOrigin=d;else if(d instanceof Object)this.evalOrigin=new c(d);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var d=this.getFileName()||"",y=this.getLineNumber()||"",h=this.getColumnNumber()||"",v=this.getFunctionName()||"";return this.getIsEval()?d?"[eval] ("+d+":"+y+":"+h+")":"[eval]:"+y+":"+h:v?v+" ("+d+":"+y+":"+h+")":d+":"+y+":"+h}},c.fromString=f(function(y){var h=y.indexOf("("),v=y.lastIndexOf(")"),Q=y.substring(0,h),Z=y.substring(h+1,v).split(","),L=y.substring(v+1);if(L.indexOf("@")===0)var _=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(L,""),ee=_[1],te=_[2],ne=_[3];return new c({functionName:Q,args:Z||void 0,fileName:ee,lineNumber:te||void 0,columnNumber:ne||void 0})},"StackFrame$$fromString");for(var s=0;s<a.length;s++)c.prototype["get"+e(a[s])]=o(a[s]),c.prototype["set"+e(a[s])]=function(d){return function(y){this[d]=!!y}}(a[s]);for(var m=0;m<l.length;m++)c.prototype["get"+e(l[m])]=o(l[m]),c.prototype["set"+e(l[m])]=function(d){return function(y){if(!t(y))throw new TypeError(d+" must be a Number");this[d]=Number(y)}}(l[m]);for(var p=0;p<n.length;p++)c.prototype["get"+e(n[p])]=o(n[p]),c.prototype["set"+e(n[p])]=function(d){return function(y){this[d]=String(y)}}(n[p]);return c})});var $=D((N,M)=>{(function(t,e){"use strict";typeof define=="function"&&define.amd?define("error-stack-parser",["stackframe"],e):typeof N=="object"?M.exports=e(T()):t.ErrorStackParser=e(t.StackFrame)})(N,f(function(e){"use strict";var o=/(^|@)\S+:\d+/,a=/^\s*at .*(\S+:\d+|\(native\))/m,l=/^(eval@)?(\[native code])?$/;return{parse:f(function(r){if(typeof r.stacktrace<"u"||typeof r["opera#sourceloc"]<"u")return this.parseOpera(r);if(r.stack&&r.stack.match(a))return this.parseV8OrIE(r);if(r.stack)return this.parseFFOrSafari(r);throw new Error("Cannot parse given Error object")},"ErrorStackParser$$parse"),extractLocation:f(function(r){if(r.indexOf(":")===-1)return[r];var u=/(.+?)(?::(\d+))?(?::(\d+))?$/,i=u.exec(r.replace(/[()]/g,""));return[i[1],i[2]||void 0,i[3]||void 0]},"ErrorStackParser$$extractLocation"),parseV8OrIE:f(function(r){var u=r.stack.split(`
2
- `).filter(function(i){return!!i.match(a)},this);return u.map(function(i){i.indexOf("(eval ")>-1&&(i=i.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var c=i.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),s=c.match(/ (\(.+\)$)/);c=s?c.replace(s[0],""):c;var m=this.extractLocation(s?s[1]:c),p=s&&c||void 0,d=["eval","<anonymous>"].indexOf(m[0])>-1?void 0:m[0];return new e({functionName:p,fileName:d,lineNumber:m[1],columnNumber:m[2],source:i})},this)},"ErrorStackParser$$parseV8OrIE"),parseFFOrSafari:f(function(r){var u=r.stack.split(`
3
- `).filter(function(i){return!i.match(l)},this);return u.map(function(i){if(i.indexOf(" > eval")>-1&&(i=i.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),i.indexOf("@")===-1&&i.indexOf(":")===-1)return new e({functionName:i});var c=/((.*".+"[^@]*)?[^@]*)(?:@)/,s=i.match(c),m=s&&s[1]?s[1]:void 0,p=this.extractLocation(i.replace(c,""));return new e({functionName:m,fileName:p[0],lineNumber:p[1],columnNumber:p[2],source:i})},this)},"ErrorStackParser$$parseFFOrSafari"),parseOpera:f(function(r){return!r.stacktrace||r.message.indexOf(`
4
- `)>-1&&r.message.split(`
5
- `).length>r.stacktrace.split(`
6
- `).length?this.parseOpera9(r):r.stack?this.parseOpera11(r):this.parseOpera10(r)},"ErrorStackParser$$parseOpera"),parseOpera9:f(function(r){for(var u=/Line (\d+).*script (?:in )?(\S+)/i,i=r.message.split(`
7
- `),c=[],s=2,m=i.length;s<m;s+=2){var p=u.exec(i[s]);p&&c.push(new e({fileName:p[2],lineNumber:p[1],source:i[s]}))}return c},"ErrorStackParser$$parseOpera9"),parseOpera10:f(function(r){for(var u=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,i=r.stacktrace.split(`
8
- `),c=[],s=0,m=i.length;s<m;s+=2){var p=u.exec(i[s]);p&&c.push(new e({functionName:p[3]||void 0,fileName:p[2],lineNumber:p[1],source:i[s]}))}return c},"ErrorStackParser$$parseOpera10"),parseOpera11:f(function(r){var u=r.stack.split(`
9
- `).filter(function(i){return!!i.match(o)&&!i.match(/^Error created at/)},this);return u.map(function(i){var c=i.split("@"),s=this.extractLocation(c.pop()),m=c.shift()||"",p=m.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,d;m.match(/\(([^)]*)\)/)&&(d=m.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var y=d===void 0||d==="[arguments not available]"?void 0:d.split(",");return new e({functionName:p,args:y,fileName:s[0],lineNumber:s[1],columnNumber:s[2],source:i})},this)},"ErrorStackParser$$parseOpera11")}},"ErrorStackParser"))});var z=le($());var g=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&typeof process.browser>"u",F=g&&typeof module<"u"&&typeof module.exports<"u"&&typeof w<"u"&&typeof __dirname<"u",C=g&&!F,de=typeof Deno<"u",W=!g&&!de,j=W&&typeof window=="object"&&typeof document=="object"&&typeof document.createElement=="function"&&typeof sessionStorage=="object"&&typeof importScripts!="function",B=W&&typeof importScripts=="function"&&typeof self=="object",Ne=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Chrome")==-1&&navigator.userAgent.indexOf("Safari")>-1;var q,P,V,H,x;async function I(){if(!g||(q=(await import("node:url")).default,H=await import("node:fs"),x=await import("node:fs/promises"),V=(await import("node:vm")).default,P=await import("node:path"),k=P.sep,typeof w<"u"))return;let t=H,e=await import("node:crypto"),o=await import("ws"),a=await import("node:child_process"),l={fs:t,crypto:e,ws:o,child_process:a};globalThis.require=function(n){return l[n]}}f(I,"initNodeModules");function fe(t,e){return P.resolve(e||".",t)}f(fe,"node_resolvePath");function ue(t,e){return e===void 0&&(e=location),new URL(t,e).toString()}f(ue,"browser_resolvePath");var S;g?S=fe:S=ue;var k;g||(k="/");function pe(t,e){return t.startsWith("file://")&&(t=t.slice(7)),t.includes("://")?{response:fetch(t)}:{binary:x.readFile(t).then(o=>new Uint8Array(o.buffer,o.byteOffset,o.byteLength))}}f(pe,"node_getBinaryResponse");function me(t,e){let o=new URL(t,location);return{response:fetch(o,e?{integrity:e}:{})}}f(me,"browser_getBinaryResponse");var b;g?b=pe:b=me;async function K(t,e){let{response:o,binary:a}=b(t,e);if(a)return a;let l=await o;if(!l.ok)throw new Error(`Failed to load '${t}': request failed.`);return new Uint8Array(await l.arrayBuffer())}f(K,"loadBinaryFile");var E;if(j)E=f(async t=>await import(t),"loadScript");else if(B)E=f(async t=>{try{globalThis.importScripts(t)}catch(e){if(e instanceof TypeError)await import(t);else throw e}},"loadScript");else if(g)E=ye;else throw new Error("Cannot determine runtime environment");async function ye(t){t.startsWith("file://")&&(t=t.slice(7)),t.includes("://")?V.runInThisContext(await(await fetch(t)).text()):await import(q.pathToFileURL(t).href)}f(ye,"nodeLoadScript");async function J(t){if(g){await I();let e=await x.readFile(t,{encoding:"utf8"});return JSON.parse(e)}else return await(await fetch(t)).json()}f(J,"loadLockFile");async function X(){if(F)return __dirname;let t;try{throw new Error}catch(a){t=a}let e=z.default.parse(t)[0].fileName;if(C){let a=await import("node:path");return(await import("node:url")).fileURLToPath(a.dirname(e))}let o=e.lastIndexOf(k);if(o===-1)throw new Error("Could not extract indexURL path from pyodide module location");return e.slice(0,o)}f(X,"calculateDirname");function G(t){let e=t.FS,o=t.FS.filesystems.MEMFS,a=t.PATH,l={DIR_MODE:16895,FILE_MODE:33279,mount:function(n){if(!n.opts.fileSystemHandle)throw new Error("opts.fileSystemHandle is required");return o.mount.apply(null,arguments)},syncfs:async(n,r,u)=>{try{let i=l.getLocalSet(n),c=await l.getRemoteSet(n),s=r?c:i,m=r?i:c;await l.reconcile(n,s,m),u(null)}catch(i){u(i)}},getLocalSet:n=>{let r=Object.create(null);function u(s){return s!=="."&&s!==".."}f(u,"isRealDir");function i(s){return m=>a.join2(s,m)}f(i,"toAbsolute");let c=e.readdir(n.mountpoint).filter(u).map(i(n.mountpoint));for(;c.length;){let s=c.pop(),m=e.stat(s);e.isDir(m.mode)&&c.push.apply(c,e.readdir(s).filter(u).map(i(s))),r[s]={timestamp:m.mtime,mode:m.mode}}return{type:"local",entries:r}},getRemoteSet:async n=>{let r=Object.create(null),u=await ge(n.opts.fileSystemHandle);for(let[i,c]of u)i!=="."&&(r[a.join2(n.mountpoint,i)]={timestamp:c.kind==="file"?(await c.getFile()).lastModifiedDate:new Date,mode:c.kind==="file"?l.FILE_MODE:l.DIR_MODE});return{type:"remote",entries:r,handles:u}},loadLocalEntry:n=>{let u=e.lookupPath(n).node,i=e.stat(n);if(e.isDir(i.mode))return{timestamp:i.mtime,mode:i.mode};if(e.isFile(i.mode))return u.contents=o.getFileDataAsTypedArray(u),{timestamp:i.mtime,mode:i.mode,contents:u.contents};throw new Error("node type not supported")},storeLocalEntry:(n,r)=>{if(e.isDir(r.mode))e.mkdirTree(n,r.mode);else if(e.isFile(r.mode))e.writeFile(n,r.contents,{canOwn:!0});else throw new Error("node type not supported");e.chmod(n,r.mode),e.utime(n,r.timestamp,r.timestamp)},removeLocalEntry:n=>{var r=e.stat(n);e.isDir(r.mode)?e.rmdir(n):e.isFile(r.mode)&&e.unlink(n)},loadRemoteEntry:async n=>{if(n.kind==="file"){let r=await n.getFile();return{contents:new Uint8Array(await r.arrayBuffer()),mode:l.FILE_MODE,timestamp:r.lastModifiedDate}}else{if(n.kind==="directory")return{mode:l.DIR_MODE,timestamp:new Date};throw new Error("unknown kind: "+n.kind)}},storeRemoteEntry:async(n,r,u)=>{let i=n.get(a.dirname(r)),c=e.isFile(u.mode)?await i.getFileHandle(a.basename(r),{create:!0}):await i.getDirectoryHandle(a.basename(r),{create:!0});if(c.kind==="file"){let s=await c.createWritable();await s.write(u.contents),await s.close()}n.set(r,c)},removeRemoteEntry:async(n,r)=>{await n.get(a.dirname(r)).removeEntry(a.basename(r)),n.delete(r)},reconcile:async(n,r,u)=>{let i=0,c=[];Object.keys(r.entries).forEach(function(p){let d=r.entries[p],y=u.entries[p];(!y||e.isFile(d.mode)&&d.timestamp.getTime()>y.timestamp.getTime())&&(c.push(p),i++)}),c.sort();let s=[];if(Object.keys(u.entries).forEach(function(p){r.entries[p]||(s.push(p),i++)}),s.sort().reverse(),!i)return;let m=r.type==="remote"?r.handles:u.handles;for(let p of c){let d=a.normalize(p.replace(n.mountpoint,"/")).substring(1);if(u.type==="local"){let y=m.get(d),h=await l.loadRemoteEntry(y);l.storeLocalEntry(p,h)}else{let y=l.loadLocalEntry(p);await l.storeRemoteEntry(m,d,y)}}for(let p of s)if(u.type==="local")l.removeLocalEntry(p);else{let d=a.normalize(p.replace(n.mountpoint,"/")).substring(1);await l.removeRemoteEntry(m,d)}}};t.FS.filesystems.NATIVEFS_ASYNC=l}f(G,"initializeNativeFS");var ge=f(async t=>{let e=[];async function o(l){for await(let n of l.values())e.push(n),n.kind==="directory"&&await o(n)}f(o,"collect"),await o(t);let a=new Map;a.set(".",t);for(let l of e){let n=(await t.resolve(l)).join("/");a.set(n,l)}return a},"getFsHandles");function Y(t){let e={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:we(t),quit(o,a){throw e.exited={status:o,toThrow:a},a},print:t.stdout,printErr:t.stderr,arguments:t.args,API:{config:t},locateFile:o=>t.indexURL+o,instantiateWasm:Se(t.indexURL)};return e}f(Y,"createSettings");function he(t){return function(e){let o="/";try{e.FS.mkdirTree(t)}catch(a){console.error(`Error occurred while making a home directory '${t}':`),console.error(a),console.error(`Using '${o}' for a home directory instead`),t=o}e.FS.chdir(t)}}f(he,"createHomeDirectory");function ve(t){return function(e){Object.assign(e.ENV,t)}}f(ve,"setEnvironment");function Ee(t){return e=>{for(let o of t)e.FS.mkdirTree(o),e.FS.mount(e.FS.filesystems.NODEFS,{root:o},o)}}f(Ee,"mountLocalDirectories");function be(t){let e=K(t);return o=>{let a=o._py_version_major(),l=o._py_version_minor();o.FS.mkdirTree("/lib"),o.FS.mkdirTree(`/lib/python${a}.${l}/site-packages`),o.addRunDependency("install-stdlib"),e.then(n=>{o.FS.writeFile(`/lib/python${a}${l}.zip`,n)}).catch(n=>{console.error("Error occurred while installing the standard library:"),console.error(n)}).finally(()=>{o.removeRunDependency("install-stdlib")})}}f(be,"installStdlib");function we(t){let e;return t.stdLibURL!=null?e=t.stdLibURL:e=t.indexURL+"python_stdlib.zip",[be(e),he(t.env.HOME),ve(t.env),Ee(t._node_mounts),G]}f(we,"getFileSystemInitializationFuncs");function Se(t){let{binary:e,response:o}=b(t+"pyodide.asm.wasm");return function(a,l){return async function(){try{let n;o?n=await WebAssembly.instantiateStreaming(o,a):n=await WebAssembly.instantiate(await e,a);let{instance:r,module:u}=n;typeof WasmOffsetConverter<"u"&&(wasmOffsetConverter=new WasmOffsetConverter(wasmBinary,u)),l(r,u)}catch(n){console.warn("wasm instantiation failed!"),console.warn(n)}}(),{}}}f(Se,"getInstantiateWasmFunc");var A="0.26.1";async function Be(t={}){await I();let e=t.indexURL||await X();e=S(e),e.endsWith("/")||(e+="/"),t.indexURL=e;let o={fullStdLib:!1,jsglobals:globalThis,stdin:globalThis.prompt?globalThis.prompt:void 0,lockFileURL:e+"pyodide-lock.json",args:[],_node_mounts:[],env:{},packageCacheDir:e,packages:[],enableRunUntilComplete:!1},a=Object.assign(o,t);a.env.HOME||(a.env.HOME="/home/pyodide");let l=Y(a),n=l.API;if(n.lockFilePromise=J(a.lockFileURL),typeof _createPyodideModule!="function"){let s=`${a.indexURL}pyodide.asm.js`;await E(s)}let r;if(t._loadSnapshot){let s=await t._loadSnapshot;ArrayBuffer.isView(s)?r=s:r=new Uint8Array(s),l.noInitialRun=!0,l.INITIAL_MEMORY=r.length}let u=await _createPyodideModule(l);if(l.exited)throw l.exited.toThrow;if(t.pyproxyToStringRepr&&n.setPyProxyToStringMethod(!0),n.version!==A)throw new Error(`Pyodide version does not match: '${A}' <==> '${n.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);u.locateFile=s=>{throw new Error("Didn't expect to load any more file_packager files!")};let i;r&&(i=n.restoreSnapshot(r));let c=n.finalizeBootstrap(i);return n.sys.path.insert(0,n.config.env.HOME),c.version.includes("dev")||n.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${c.version}/full/`),n._pyodide.set_excepthook(),await n.packageIndexReady,n.initializeStreams(a.stdin,a.stdout,a.stderr),c}f(Be,"loadPyodide");export{Be as loadPyodide,A as version};
1
+ var Q=Object.defineProperty;var c=(e,t)=>Q(e,"name",{value:t,configurable:!0}),O=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,i)=>(typeof require<"u"?require:t)[i]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});function Z(e){return!isNaN(parseFloat(e))&&isFinite(e)}c(Z,"_isNumber");function E(e){return e.charAt(0).toUpperCase()+e.substring(1)}c(E,"_capitalize");function P(e){return function(){return this[e]}}c(P,"_getter");var w=["isConstructor","isEval","isNative","isToplevel"],N=["columnNumber","lineNumber"],_=["fileName","functionName","source"],ee=["args"],te=["evalOrigin"],I=w.concat(N,_,ee,te);function p(e){if(e)for(var t=0;t<I.length;t++)e[I[t]]!==void 0&&this["set"+E(I[t])](e[I[t]])}c(p,"StackFrame");p.prototype={getArgs:function(){return this.args},setArgs:function(e){if(Object.prototype.toString.call(e)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof p)this.evalOrigin=e;else if(e instanceof Object)this.evalOrigin=new p(e);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",i=this.getColumnNumber()||"",r=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+i+")":"[eval]:"+t+":"+i:r?r+" ("+e+":"+t+":"+i+")":e+":"+t+":"+i}};p.fromString=c(function(t){var i=t.indexOf("("),r=t.lastIndexOf(")"),a=t.substring(0,i),n=t.substring(i+1,r).split(","),o=t.substring(r+1);if(o.indexOf("@")===0)var s=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(o,""),l=s[1],d=s[2],u=s[3];return new p({functionName:a,args:n||void 0,fileName:l,lineNumber:d||void 0,columnNumber:u||void 0})},"StackFrame$$fromString");for(b=0;b<w.length;b++)p.prototype["get"+E(w[b])]=P(w[b]),p.prototype["set"+E(w[b])]=function(e){return function(t){this[e]=!!t}}(w[b]);var b;for(v=0;v<N.length;v++)p.prototype["get"+E(N[v])]=P(N[v]),p.prototype["set"+E(N[v])]=function(e){return function(t){if(!Z(t))throw new TypeError(e+" must be a Number");this[e]=Number(t)}}(N[v]);var v;for(h=0;h<_.length;h++)p.prototype["get"+E(_[h])]=P(_[h]),p.prototype["set"+E(_[h])]=function(e){return function(t){this[e]=String(t)}}(_[h]);var h,x=p;function ne(){var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;return{parse:c(function(r){if(r.stack&&r.stack.match(e))return this.parseV8OrIE(r);if(r.stack)return this.parseFFOrSafari(r);throw new Error("Cannot parse given Error object")},"ErrorStackParser$$parse"),extractLocation:c(function(r){if(r.indexOf(":")===-1)return[r];var a=/(.+?)(?::(\d+))?(?::(\d+))?$/,n=a.exec(r.replace(/[()]/g,""));return[n[1],n[2]||void 0,n[3]||void 0]},"ErrorStackParser$$extractLocation"),parseV8OrIE:c(function(r){var a=r.stack.split(`
2
+ `).filter(function(n){return!!n.match(e)},this);return a.map(function(n){n.indexOf("(eval ")>-1&&(n=n.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var o=n.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),s=o.match(/ (\(.+\)$)/);o=s?o.replace(s[0],""):o;var l=this.extractLocation(s?s[1]:o),d=s&&o||void 0,u=["eval","<anonymous>"].indexOf(l[0])>-1?void 0:l[0];return new x({functionName:d,fileName:u,lineNumber:l[1],columnNumber:l[2],source:n})},this)},"ErrorStackParser$$parseV8OrIE"),parseFFOrSafari:c(function(r){var a=r.stack.split(`
3
+ `).filter(function(n){return!n.match(t)},this);return a.map(function(n){if(n.indexOf(" > eval")>-1&&(n=n.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),n.indexOf("@")===-1&&n.indexOf(":")===-1)return new x({functionName:n});var o=/((.*".+"[^@]*)?[^@]*)(?:@)/,s=n.match(o),l=s&&s[1]?s[1]:void 0,d=this.extractLocation(n.replace(o,""));return new x({functionName:l,fileName:d[0],lineNumber:d[1],columnNumber:d[2],source:n})},this)},"ErrorStackParser$$parseFFOrSafari")}}c(ne,"ErrorStackParser");var re=new ne;var M=re;var g=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&!process.browser,A=g&&typeof module<"u"&&typeof module.exports<"u"&&typeof O<"u"&&typeof __dirname<"u",W=g&&!A,Ne=typeof globalThis.Bun<"u",oe=typeof Deno<"u",B=!g&&!oe,$=B&&typeof window=="object"&&typeof document=="object"&&typeof document.createElement=="function"&&typeof sessionStorage=="object"&&typeof importScripts!="function",j=B&&typeof importScripts=="function"&&typeof self=="object",_e=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Chrome")==-1&&navigator.userAgent.indexOf("Safari")>-1;var V,L,z,H,D;async function T(){if(!g||(V=(await import("node:url")).default,H=await import("node:fs"),D=await import("node:fs/promises"),z=(await import("node:vm")).default,L=await import("node:path"),U=L.sep,typeof O<"u"))return;let e=H,t=await import("node:crypto"),i=await import("ws"),r=await import("node:child_process"),a={fs:e,crypto:t,ws:i,child_process:r};globalThis.require=function(n){return a[n]}}c(T,"initNodeModules");function ie(e,t){return L.resolve(t||".",e)}c(ie,"node_resolvePath");function ae(e,t){return t===void 0&&(t=location),new URL(e,t).toString()}c(ae,"browser_resolvePath");var k;g?k=ie:k=ae;var U;g||(U="/");function se(e,t){return e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?{response:fetch(e)}:{binary:D.readFile(e).then(i=>new Uint8Array(i.buffer,i.byteOffset,i.byteLength))}}c(se,"node_getBinaryResponse");function ce(e,t){let i=new URL(e,location);return{response:fetch(i,t?{integrity:t}:{})}}c(ce,"browser_getBinaryResponse");var R;g?R=se:R=ce;async function q(e,t){let{response:i,binary:r}=R(e,t);if(r)return r;let a=await i;if(!a.ok)throw new Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await a.arrayBuffer())}c(q,"loadBinaryFile");var F;if($)F=c(async e=>await import(e),"loadScript");else if(j)F=c(async e=>{try{globalThis.importScripts(e)}catch(t){if(t instanceof TypeError)await import(e);else throw t}},"loadScript");else if(g)F=le;else throw new Error("Cannot determine runtime environment");async function le(e){e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?z.runInThisContext(await(await fetch(e)).text()):await import(V.pathToFileURL(e).href)}c(le,"nodeLoadScript");async function J(e){if(g){await T();let t=await D.readFile(e,{encoding:"utf8"});return JSON.parse(t)}else return await(await fetch(e)).json()}c(J,"loadLockFile");async function K(){if(A)return __dirname;let e;try{throw new Error}catch(r){e=r}let t=M.parse(e)[0].fileName;if(g&&!t.startsWith("file://")&&(t=`file://${t}`),W){let r=await import("node:path");return(await import("node:url")).fileURLToPath(r.dirname(t))}let i=t.lastIndexOf(U);if(i===-1)throw new Error("Could not extract indexURL path from pyodide module location");return t.slice(0,i)}c(K,"calculateDirname");function Y(e){let t=e.FS,i=e.FS.filesystems.MEMFS,r=e.PATH,a={DIR_MODE:16895,FILE_MODE:33279,mount:function(n){if(!n.opts.fileSystemHandle)throw new Error("opts.fileSystemHandle is required");return i.mount.apply(null,arguments)},syncfs:async(n,o,s)=>{try{let l=a.getLocalSet(n),d=await a.getRemoteSet(n),u=o?d:l,m=o?l:d;await a.reconcile(n,u,m),s(null)}catch(l){s(l)}},getLocalSet:n=>{let o=Object.create(null);function s(u){return u!=="."&&u!==".."}c(s,"isRealDir");function l(u){return m=>r.join2(u,m)}c(l,"toAbsolute");let d=t.readdir(n.mountpoint).filter(s).map(l(n.mountpoint));for(;d.length;){let u=d.pop(),m=t.stat(u);t.isDir(m.mode)&&d.push.apply(d,t.readdir(u).filter(s).map(l(u))),o[u]={timestamp:m.mtime,mode:m.mode}}return{type:"local",entries:o}},getRemoteSet:async n=>{let o=Object.create(null),s=await de(n.opts.fileSystemHandle);for(let[l,d]of s)l!=="."&&(o[r.join2(n.mountpoint,l)]={timestamp:d.kind==="file"?(await d.getFile()).lastModifiedDate:new Date,mode:d.kind==="file"?a.FILE_MODE:a.DIR_MODE});return{type:"remote",entries:o,handles:s}},loadLocalEntry:n=>{let s=t.lookupPath(n).node,l=t.stat(n);if(t.isDir(l.mode))return{timestamp:l.mtime,mode:l.mode};if(t.isFile(l.mode))return s.contents=i.getFileDataAsTypedArray(s),{timestamp:l.mtime,mode:l.mode,contents:s.contents};throw new Error("node type not supported")},storeLocalEntry:(n,o)=>{if(t.isDir(o.mode))t.mkdirTree(n,o.mode);else if(t.isFile(o.mode))t.writeFile(n,o.contents,{canOwn:!0});else throw new Error("node type not supported");t.chmod(n,o.mode),t.utime(n,o.timestamp,o.timestamp)},removeLocalEntry:n=>{var o=t.stat(n);t.isDir(o.mode)?t.rmdir(n):t.isFile(o.mode)&&t.unlink(n)},loadRemoteEntry:async n=>{if(n.kind==="file"){let o=await n.getFile();return{contents:new Uint8Array(await o.arrayBuffer()),mode:a.FILE_MODE,timestamp:o.lastModifiedDate}}else{if(n.kind==="directory")return{mode:a.DIR_MODE,timestamp:new Date};throw new Error("unknown kind: "+n.kind)}},storeRemoteEntry:async(n,o,s)=>{let l=n.get(r.dirname(o)),d=t.isFile(s.mode)?await l.getFileHandle(r.basename(o),{create:!0}):await l.getDirectoryHandle(r.basename(o),{create:!0});if(d.kind==="file"){let u=await d.createWritable();await u.write(s.contents),await u.close()}n.set(o,d)},removeRemoteEntry:async(n,o)=>{await n.get(r.dirname(o)).removeEntry(r.basename(o)),n.delete(o)},reconcile:async(n,o,s)=>{let l=0,d=[];Object.keys(o.entries).forEach(function(f){let y=o.entries[f],S=s.entries[f];(!S||t.isFile(y.mode)&&y.timestamp.getTime()>S.timestamp.getTime())&&(d.push(f),l++)}),d.sort();let u=[];if(Object.keys(s.entries).forEach(function(f){o.entries[f]||(u.push(f),l++)}),u.sort().reverse(),!l)return;let m=o.type==="remote"?o.handles:s.handles;for(let f of d){let y=r.normalize(f.replace(n.mountpoint,"/")).substring(1);if(s.type==="local"){let S=m.get(y),X=await a.loadRemoteEntry(S);a.storeLocalEntry(f,X)}else{let S=a.loadLocalEntry(f);await a.storeRemoteEntry(m,y,S)}}for(let f of u)if(s.type==="local")a.removeLocalEntry(f);else{let y=r.normalize(f.replace(n.mountpoint,"/")).substring(1);await a.removeRemoteEntry(m,y)}}};e.FS.filesystems.NATIVEFS_ASYNC=a}c(Y,"initializeNativeFS");var de=c(async e=>{let t=[];async function i(a){for await(let n of a.values())t.push(n),n.kind==="directory"&&await i(n)}c(i,"collect"),await i(e);let r=new Map;r.set(".",e);for(let a of t){let n=(await e.resolve(a)).join("/");r.set(n,a)}return r},"getFsHandles");function G(e){let t={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:ge(e),quit(i,r){throw t.exited={status:i,toThrow:r},r},print:e.stdout,printErr:e.stderr,arguments:e.args,API:{config:e},locateFile:i=>e.indexURL+i,instantiateWasm:ye(e.indexURL)};return t}c(G,"createSettings");function ue(e){return function(t){let i="/";try{t.FS.mkdirTree(e)}catch(r){console.error(`Error occurred while making a home directory '${e}':`),console.error(r),console.error(`Using '${i}' for a home directory instead`),e=i}t.FS.chdir(e)}}c(ue,"createHomeDirectory");function fe(e){return function(t){Object.assign(t.ENV,e)}}c(fe,"setEnvironment");function me(e){return t=>{for(let i of e)t.FS.mkdirTree(i),t.FS.mount(t.FS.filesystems.NODEFS,{root:i},i)}}c(me,"mountLocalDirectories");function pe(e){let t=q(e);return i=>{let r=i._py_version_major(),a=i._py_version_minor();i.FS.mkdirTree("/lib"),i.FS.mkdirTree(`/lib/python${r}.${a}/site-packages`),i.addRunDependency("install-stdlib"),t.then(n=>{i.FS.writeFile(`/lib/python${r}${a}.zip`,n)}).catch(n=>{console.error("Error occurred while installing the standard library:"),console.error(n)}).finally(()=>{i.removeRunDependency("install-stdlib")})}}c(pe,"installStdlib");function ge(e){let t;return e.stdLibURL!=null?t=e.stdLibURL:t=e.indexURL+"python_stdlib.zip",[pe(t),ue(e.env.HOME),fe(e.env),me(e._node_mounts),Y]}c(ge,"getFileSystemInitializationFuncs");function ye(e){let{binary:t,response:i}=R(e+"pyodide.asm.wasm");return function(r,a){return async function(){try{let n;i?n=await WebAssembly.instantiateStreaming(i,r):n=await WebAssembly.instantiate(await t,r);let{instance:o,module:s}=n;typeof WasmOffsetConverter<"u"&&(wasmOffsetConverter=new WasmOffsetConverter(wasmBinary,s)),a(o,s)}catch(n){console.warn("wasm instantiation failed!"),console.warn(n)}}(),{}}}c(ye,"getInstantiateWasmFunc");var C="0.26.2";async function $e(e={}){var u,m;await T();let t=e.indexURL||await K();t=k(t),t.endsWith("/")||(t+="/"),e.indexURL=t;let i={fullStdLib:!1,jsglobals:globalThis,stdin:globalThis.prompt?globalThis.prompt:void 0,lockFileURL:t+"pyodide-lock.json",args:[],_node_mounts:[],env:{},packageCacheDir:t,packages:[],enableRunUntilComplete:!1,checkAPIVersion:!0},r=Object.assign(i,e);(u=r.env).HOME??(u.HOME="/home/pyodide"),(m=r.env).PYTHONINSPECT??(m.PYTHONINSPECT="1");let a=G(r),n=a.API;if(n.lockFilePromise=J(r.lockFileURL),typeof _createPyodideModule!="function"){let f=`${r.indexURL}pyodide.asm.js`;await F(f)}let o;if(e._loadSnapshot){let f=await e._loadSnapshot;ArrayBuffer.isView(f)?o=f:o=new Uint8Array(f),a.noInitialRun=!0,a.INITIAL_MEMORY=o.length}let s=await _createPyodideModule(a);if(a.exited)throw a.exited.toThrow;if(e.pyproxyToStringRepr&&n.setPyProxyToStringMethod(!0),n.version!==C&&r.checkAPIVersion)throw new Error(`Pyodide version does not match: '${C}' <==> '${n.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);s.locateFile=f=>{throw new Error("Didn't expect to load any more file_packager files!")};let l;o&&(l=n.restoreSnapshot(o));let d=n.finalizeBootstrap(l);return n.sys.path.insert(0,n.config.env.HOME),d.version.includes("dev")||n.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${d.version}/full/`),n._pyodide.set_excepthook(),await n.packageIndexReady,n.initializeStreams(r.stdin,r.stdout,r.stderr),d}c($e,"loadPyodide");export{$e as loadPyodide,C as version};
10
4
  //# sourceMappingURL=pyodide.mjs.map
package/pyodide.mjs.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/js/node_modules/stackframe/stackframe.js", "../src/js/node_modules/error-stack-parser/error-stack-parser.js", "../src/js/compat.ts", "../src/js/environments.ts", "../src/js/nativefs.ts", "../src/js/emscripten-settings.ts", "../src/js/version.ts", "../src/js/pyodide.ts"],
4
- "sourcesContent": ["(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n", "(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(,.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').replace(/^.*?\\s+/, '');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n // because this line doesn't have function name\n var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);\n var functionName = location && sanitizedLine || undefined;\n var fileName = ['eval', '<anonymous>'].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(/<anonymous function(: (\\w+))?>/, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n", "import ErrorStackParser from \"error-stack-parser\";\nimport {\n IN_NODE,\n IN_NODE_ESM,\n IN_BROWSER_MAIN_THREAD,\n IN_BROWSER_WEB_WORKER,\n IN_NODE_COMMONJS,\n} from \"./environments\";\nimport { Lockfile } from \"./types\";\n\nlet nodeUrlMod: typeof import(\"node:url\");\nlet nodePath: typeof import(\"node:path\");\nlet nodeVmMod: typeof import(\"node:vm\");\n/** @private */\nexport let nodeFSMod: typeof import(\"node:fs\");\n/** @private */\nexport let nodeFsPromisesMod: typeof import(\"node:fs/promises\");\n\ndeclare var globalThis: {\n importScripts: (url: string) => void;\n document?: typeof document;\n fetch?: typeof fetch;\n};\n\n/**\n * If we're in node, it's most convenient to import various node modules on\n * initialization. Otherwise, this does nothing.\n * @private\n */\nexport async function initNodeModules() {\n if (!IN_NODE) {\n return;\n }\n // @ts-ignore\n nodeUrlMod = (await import(\"node:url\")).default;\n nodeFSMod = await import(\"node:fs\");\n nodeFsPromisesMod = await import(\"node:fs/promises\");\n\n // @ts-ignore\n nodeVmMod = (await import(\"node:vm\")).default;\n nodePath = await import(\"node:path\");\n pathSep = nodePath.sep;\n\n // Emscripten uses `require`, so if it's missing (because we were imported as\n // an ES6 module) we need to polyfill `require` with `import`. `import` is\n // async and `require` is synchronous, so we import all packages that might be\n // required up front and define require to look them up in this table.\n\n if (typeof require !== \"undefined\") {\n return;\n }\n // These are all the packages required in pyodide.asm.js. You can get this\n // list with:\n // $ grep -o 'require(\"[a-z]*\")' pyodide.asm.js | sort -u\n const fs = nodeFSMod;\n const crypto = await import(\"node:crypto\");\n const ws = await import(\"ws\");\n const child_process = await import(\"node:child_process\");\n const node_modules: { [mode: string]: any } = {\n fs,\n crypto,\n ws,\n child_process,\n };\n // Since we're in an ES6 module, this is only modifying the module namespace,\n // it's still private to Pyodide.\n (globalThis as any).require = function (mod: string): any {\n return node_modules[mod];\n };\n}\n\nfunction node_resolvePath(path: string, base?: string): string {\n return nodePath.resolve(base || \".\", path);\n}\n\nfunction browser_resolvePath(path: string, base?: string): string {\n if (base === undefined) {\n // @ts-ignore\n base = location;\n }\n return new URL(path, base).toString();\n}\n\nexport let resolvePath: (rest: string, base?: string) => string;\nif (IN_NODE) {\n resolvePath = node_resolvePath;\n} else {\n resolvePath = browser_resolvePath;\n}\n\n/**\n * Get the path separator. If we are on Linux or in the browser, it's /.\n * In Windows, it's \\.\n * @private\n */\nexport let pathSep: string;\n\nif (!IN_NODE) {\n pathSep = \"/\";\n}\n\n/**\n * Load a binary file, only for use in Node. If the path explicitly is a URL,\n * then fetch from a URL, else load from the file system.\n * @param indexURL base path to resolve relative paths\n * @param path the path to load\n * @param checksum sha-256 checksum of the package\n * @returns An ArrayBuffer containing the binary data\n * @private\n */\nfunction node_getBinaryResponse(\n path: string,\n _file_sub_resource_hash?: string | undefined, // Ignoring sub resource hash. See issue-2431.\n):\n | { response: Promise<Response>; binary?: undefined }\n | { binary: Promise<Uint8Array> } {\n if (path.startsWith(\"file://\")) {\n // handle file:// with filesystem operations rather than with fetch.\n path = path.slice(\"file://\".length);\n }\n if (path.includes(\"://\")) {\n // If it has a protocol, make a fetch request\n return { response: fetch(path) };\n } else {\n // Otherwise get it from the file system\n return {\n binary: nodeFsPromisesMod\n .readFile(path)\n .then(\n (data: Buffer) =>\n new Uint8Array(data.buffer, data.byteOffset, data.byteLength),\n ),\n };\n }\n}\n\n/**\n * Load a binary file, only for use in browser. Resolves relative paths against\n * indexURL.\n *\n * @param path the path to load\n * @param subResourceHash the sub resource hash for fetch() integrity check\n * @returns A Uint8Array containing the binary data\n * @private\n */\nfunction browser_getBinaryResponse(\n path: string,\n subResourceHash: string | undefined,\n): { response: Promise<Response>; binary?: undefined } {\n const url = new URL(path, location as unknown as URL);\n let options = subResourceHash ? { integrity: subResourceHash } : {};\n return { response: fetch(url, options) };\n}\n\n/** @private */\nexport let getBinaryResponse: (\n path: string,\n file_sub_resource_hash?: string | undefined,\n) =>\n | { response: Promise<Response>; binary?: undefined }\n | { response?: undefined; binary: Promise<Uint8Array> };\nif (IN_NODE) {\n getBinaryResponse = node_getBinaryResponse;\n} else {\n getBinaryResponse = browser_getBinaryResponse;\n}\n\nexport async function loadBinaryFile(\n path: string,\n file_sub_resource_hash?: string | undefined,\n): Promise<Uint8Array> {\n const { response, binary } = getBinaryResponse(path, file_sub_resource_hash);\n if (binary) {\n return binary;\n }\n const r = await response;\n if (!r.ok) {\n throw new Error(`Failed to load '${path}': request failed.`);\n }\n return new Uint8Array(await r.arrayBuffer());\n}\n\n/**\n * Currently loadScript is only used once to load `pyodide.asm.js`.\n * @param url\n * @async\n * @private\n */\nexport let loadScript: (url: string) => Promise<void>;\n\nif (IN_BROWSER_MAIN_THREAD) {\n // browser\n loadScript = async (url) => await import(/* webpackIgnore: true */ url);\n} else if (IN_BROWSER_WEB_WORKER) {\n // webworker\n loadScript = async (url) => {\n try {\n // use importScripts in classic web worker\n globalThis.importScripts(url);\n } catch (e) {\n // importScripts throws TypeError in a module type web worker, use import instead\n if (e instanceof TypeError) {\n await import(/* webpackIgnore: true */ url);\n } else {\n throw e;\n }\n }\n };\n} else if (IN_NODE) {\n loadScript = nodeLoadScript;\n} else {\n throw new Error(\"Cannot determine runtime environment\");\n}\n\n/**\n * Load a text file and executes it as Javascript\n * @param url The path to load. May be a url or a relative file system path.\n * @private\n */\nasync function nodeLoadScript(url: string) {\n if (url.startsWith(\"file://\")) {\n // handle file:// with filesystem operations rather than with fetch.\n url = url.slice(\"file://\".length);\n }\n if (url.includes(\"://\")) {\n // If it's a url, load it with fetch then eval it.\n nodeVmMod.runInThisContext(await (await fetch(url)).text());\n } else {\n // Otherwise, hopefully it is a relative path we can load from the file\n // system.\n await import(/* webpackIgnore: true */ nodeUrlMod.pathToFileURL(url).href);\n }\n}\n\nexport async function loadLockFile(lockFileURL: string): Promise<Lockfile> {\n if (IN_NODE) {\n await initNodeModules();\n const package_string = await nodeFsPromisesMod.readFile(lockFileURL, {\n encoding: \"utf8\",\n });\n return JSON.parse(package_string);\n } else {\n let response = await fetch(lockFileURL);\n return await response.json();\n }\n}\n\n/**\n * Calculate the directory name of the current module.\n * This is used to guess the indexURL when it is not provided.\n */\nexport async function calculateDirname(): Promise<string> {\n if (IN_NODE_COMMONJS) {\n return __dirname;\n }\n\n let err: Error;\n try {\n throw new Error();\n } catch (e) {\n err = e as Error;\n }\n let fileName = ErrorStackParser.parse(err)[0].fileName!;\n\n if (IN_NODE_ESM) {\n const nodePath = await import(\"node:path\");\n const nodeUrl = await import(\"node:url\");\n\n // FIXME: We would like to use import.meta.url here,\n // but mocha seems to mess with compiling typescript files to ES6.\n return nodeUrl.fileURLToPath(nodePath.dirname(fileName));\n }\n\n const indexOfLastSlash = fileName.lastIndexOf(pathSep);\n if (indexOfLastSlash === -1) {\n throw new Error(\n \"Could not extract indexURL path from pyodide module location\",\n );\n }\n return fileName.slice(0, indexOfLastSlash);\n}\n", "// @ts-nocheck\n\n/** @private */\nexport const IN_NODE =\n typeof process === \"object\" &&\n typeof process.versions === \"object\" &&\n typeof process.versions.node === \"string\" &&\n typeof process.browser ===\n \"undefined\"; /* This last condition checks if we run the browser shim of process */\n\n/** @private */\nexport const IN_NODE_COMMONJS =\n IN_NODE &&\n typeof module !== \"undefined\" &&\n typeof module.exports !== \"undefined\" &&\n typeof require !== \"undefined\" &&\n typeof __dirname !== \"undefined\";\n\n/** @private */\nexport const IN_NODE_ESM = IN_NODE && !IN_NODE_COMMONJS;\n\n/** @private */\nexport const IN_DENO = typeof Deno !== \"undefined\"; // just in case...\n\n/** @private */\nexport const IN_BROWSER = !IN_NODE && !IN_DENO;\n\n/** @private */\nexport const IN_BROWSER_MAIN_THREAD =\n IN_BROWSER &&\n typeof window === \"object\" &&\n typeof document === \"object\" &&\n typeof document.createElement === \"function\" &&\n typeof sessionStorage === \"object\" &&\n typeof importScripts !== \"function\";\n\n/** @private */\nexport const IN_BROWSER_WEB_WORKER =\n IN_BROWSER && typeof importScripts === \"function\" && typeof self === \"object\";\n\n/** @private */\nexport const IN_SAFARI =\n typeof navigator === \"object\" &&\n typeof navigator.userAgent === \"string\" &&\n navigator.userAgent.indexOf(\"Chrome\") == -1 &&\n navigator.userAgent.indexOf(\"Safari\") > -1;\n\n/**\n * Detects the current environment and returns a record with the results.\n * This function is useful for debugging and testing purposes.\n * @private\n */\nexport function detectEnvironment(): Record<string, boolean> {\n return {\n IN_NODE: IN_NODE,\n IN_NODE_COMMONJS: IN_NODE_COMMONJS,\n IN_NODE_ESM: IN_NODE_ESM,\n IN_DENO: IN_DENO,\n IN_BROWSER: IN_BROWSER,\n IN_BROWSER_MAIN_THREAD: IN_BROWSER_MAIN_THREAD,\n IN_BROWSER_WEB_WORKER: IN_BROWSER_WEB_WORKER,\n IN_SAFARI: IN_SAFARI,\n };\n}\n", "import { Module } from \"./types\";\n\n/**\n * @private\n */\nexport function initializeNativeFS(module: Module) {\n const FS = module.FS;\n const MEMFS = module.FS.filesystems.MEMFS;\n const PATH = module.PATH;\n\n const nativeFSAsync = {\n // DIR_MODE: {{{ cDefine('S_IFDIR') }}} | 511 /* 0777 */,\n // FILE_MODE: {{{ cDefine('S_IFREG') }}} | 511 /* 0777 */,\n DIR_MODE: 16384 | 511,\n FILE_MODE: 32768 | 511,\n mount: function (mount: any) {\n if (!mount.opts.fileSystemHandle) {\n throw new Error(\"opts.fileSystemHandle is required\");\n }\n\n // reuse all of the core MEMFS functionality\n return MEMFS.mount.apply(null, arguments);\n },\n syncfs: async (mount: any, populate: Boolean, callback: Function) => {\n try {\n const local = nativeFSAsync.getLocalSet(mount);\n const remote = await nativeFSAsync.getRemoteSet(mount);\n const src = populate ? remote : local;\n const dst = populate ? local : remote;\n await nativeFSAsync.reconcile(mount, src, dst);\n callback(null);\n } catch (e) {\n callback(e);\n }\n },\n // Returns file set of emscripten's filesystem at the mountpoint.\n getLocalSet: (mount: any) => {\n let entries = Object.create(null);\n\n function isRealDir(p: string) {\n return p !== \".\" && p !== \"..\";\n }\n\n function toAbsolute(root: string) {\n return (p: string) => {\n return PATH.join2(root, p);\n };\n }\n\n let check = FS.readdir(mount.mountpoint)\n .filter(isRealDir)\n .map(toAbsolute(mount.mountpoint));\n\n while (check.length) {\n let path = check.pop();\n let stat = FS.stat(path);\n\n if (FS.isDir(stat.mode)) {\n check.push.apply(\n check,\n FS.readdir(path).filter(isRealDir).map(toAbsolute(path)),\n );\n }\n\n entries[path] = { timestamp: stat.mtime, mode: stat.mode };\n }\n\n return { type: \"local\", entries: entries };\n },\n // Returns file set of the real, on-disk filesystem at the mountpoint.\n getRemoteSet: async (mount: any) => {\n // TODO: this should be a map.\n const entries = Object.create(null);\n\n const handles = await getFsHandles(mount.opts.fileSystemHandle);\n for (const [path, handle] of handles) {\n if (path === \".\") continue;\n\n entries[PATH.join2(mount.mountpoint, path)] = {\n timestamp:\n handle.kind === \"file\"\n ? (await handle.getFile()).lastModifiedDate\n : new Date(),\n mode:\n handle.kind === \"file\"\n ? nativeFSAsync.FILE_MODE\n : nativeFSAsync.DIR_MODE,\n };\n }\n\n return { type: \"remote\", entries, handles };\n },\n loadLocalEntry: (path: string) => {\n const lookup = FS.lookupPath(path);\n const node = lookup.node;\n const stat = FS.stat(path);\n\n if (FS.isDir(stat.mode)) {\n return { timestamp: stat.mtime, mode: stat.mode };\n } else if (FS.isFile(stat.mode)) {\n node.contents = MEMFS.getFileDataAsTypedArray(node);\n return {\n timestamp: stat.mtime,\n mode: stat.mode,\n contents: node.contents,\n };\n } else {\n throw new Error(\"node type not supported\");\n }\n },\n storeLocalEntry: (path: string, entry: any) => {\n if (FS.isDir(entry[\"mode\"])) {\n FS.mkdirTree(path, entry[\"mode\"]);\n } else if (FS.isFile(entry[\"mode\"])) {\n FS.writeFile(path, entry[\"contents\"], { canOwn: true });\n } else {\n throw new Error(\"node type not supported\");\n }\n\n FS.chmod(path, entry[\"mode\"]);\n FS.utime(path, entry[\"timestamp\"], entry[\"timestamp\"]);\n },\n removeLocalEntry: (path: string) => {\n var stat = FS.stat(path);\n\n if (FS.isDir(stat.mode)) {\n FS.rmdir(path);\n } else if (FS.isFile(stat.mode)) {\n FS.unlink(path);\n }\n },\n loadRemoteEntry: async (handle: any) => {\n if (handle.kind === \"file\") {\n const file = await handle.getFile();\n return {\n contents: new Uint8Array(await file.arrayBuffer()),\n mode: nativeFSAsync.FILE_MODE,\n timestamp: file.lastModifiedDate,\n };\n } else if (handle.kind === \"directory\") {\n return {\n mode: nativeFSAsync.DIR_MODE,\n timestamp: new Date(),\n };\n } else {\n throw new Error(\"unknown kind: \" + handle.kind);\n }\n },\n storeRemoteEntry: async (handles: any, path: string, entry: any) => {\n const parentDirHandle = handles.get(PATH.dirname(path));\n const handle = FS.isFile(entry.mode)\n ? await parentDirHandle.getFileHandle(PATH.basename(path), {\n create: true,\n })\n : await parentDirHandle.getDirectoryHandle(PATH.basename(path), {\n create: true,\n });\n if (handle.kind === \"file\") {\n const writable = await handle.createWritable();\n await writable.write(entry.contents);\n await writable.close();\n }\n handles.set(path, handle);\n },\n removeRemoteEntry: async (handles: any, path: string) => {\n const parentDirHandle = handles.get(PATH.dirname(path));\n await parentDirHandle.removeEntry(PATH.basename(path));\n handles.delete(path);\n },\n reconcile: async (mount: any, src: any, dst: any) => {\n let total = 0;\n\n const create: Array<string> = [];\n Object.keys(src.entries).forEach(function (key) {\n const e = src.entries[key];\n const e2 = dst.entries[key];\n if (\n !e2 ||\n (FS.isFile(e.mode) &&\n e[\"timestamp\"].getTime() > e2[\"timestamp\"].getTime())\n ) {\n create.push(key);\n total++;\n }\n });\n // sort paths in ascending order so directory entries are created\n // before the files inside them\n create.sort();\n\n const remove: Array<string> = [];\n Object.keys(dst.entries).forEach(function (key) {\n if (!src.entries[key]) {\n remove.push(key);\n total++;\n }\n });\n // sort paths in descending order so files are deleted before their\n // parent directories\n remove.sort().reverse();\n\n if (!total) {\n return;\n }\n\n const handles = src.type === \"remote\" ? src.handles : dst.handles;\n\n for (const path of create) {\n const relPath = PATH.normalize(\n path.replace(mount.mountpoint, \"/\"),\n ).substring(1);\n if (dst.type === \"local\") {\n const handle = handles.get(relPath);\n const entry = await nativeFSAsync.loadRemoteEntry(handle);\n nativeFSAsync.storeLocalEntry(path, entry);\n } else {\n const entry = nativeFSAsync.loadLocalEntry(path);\n await nativeFSAsync.storeRemoteEntry(handles, relPath, entry);\n }\n }\n\n for (const path of remove) {\n if (dst.type === \"local\") {\n nativeFSAsync.removeLocalEntry(path);\n } else {\n const relPath = PATH.normalize(\n path.replace(mount.mountpoint, \"/\"),\n ).substring(1);\n await nativeFSAsync.removeRemoteEntry(handles, relPath);\n }\n }\n },\n };\n\n module.FS.filesystems.NATIVEFS_ASYNC = nativeFSAsync;\n}\n\nconst getFsHandles = async (dirHandle: any) => {\n const handles: any = [];\n\n async function collect(curDirHandle: any) {\n for await (const entry of curDirHandle.values()) {\n handles.push(entry);\n if (entry.kind === \"directory\") {\n await collect(entry);\n }\n }\n }\n\n await collect(dirHandle);\n\n const result = new Map();\n result.set(\".\", dirHandle);\n for (const handle of handles) {\n const relativePath = (await dirHandle.resolve(handle)).join(\"/\");\n result.set(relativePath, handle);\n }\n return result;\n};\n", "/** @private */\n\nimport { ConfigType } from \"./pyodide\";\nimport { initializeNativeFS } from \"./nativefs\";\nimport { loadBinaryFile, getBinaryResponse } from \"./compat\";\nimport { API, PreRunFunc } from \"./types\";\n\n/**\n * @private\n * @hidden\n */\nexport interface EmscriptenSettings {\n readonly noImageDecoding?: boolean;\n readonly noAudioDecoding?: boolean;\n readonly noWasmDecoding?: boolean;\n readonly preRun: readonly PreRunFunc[];\n readonly quit: (status: number, toThrow: Error) => void;\n readonly print?: (a: string) => void;\n readonly printErr?: (a: string) => void;\n readonly arguments: readonly string[];\n readonly instantiateWasm?: (\n imports: { [key: string]: any },\n successCallback: (\n instance: WebAssembly.Instance,\n module: WebAssembly.Module,\n ) => void,\n ) => void;\n readonly API: API;\n readonly locateFile: (file: string) => string;\n\n exited?: { readonly status: number; readonly toThrow: Error };\n noInitialRun?: boolean;\n INITIAL_MEMORY?: number;\n}\n\n/**\n * Get the base settings to use to load Pyodide.\n *\n * @private\n */\nexport function createSettings(config: ConfigType): EmscriptenSettings {\n const settings: EmscriptenSettings = {\n noImageDecoding: true,\n noAudioDecoding: true,\n noWasmDecoding: false,\n preRun: getFileSystemInitializationFuncs(config),\n quit(status: number, toThrow: Error) {\n // It's a little bit hacky that we set this on the settings object but\n // it's not that easy to get access to the Module object from here.\n settings.exited = { status, toThrow };\n throw toThrow;\n },\n print: config.stdout,\n printErr: config.stderr,\n arguments: config.args,\n API: { config } as API,\n // Emscripten calls locateFile exactly one time with argument\n // pyodide.asm.wasm to get the URL it should download it from.\n //\n // If we set instantiateWasm the return value of locateFile actually is\n // unused, but Emscripten calls it anyways. We set instantiateWasm except\n // when compiling with source maps, see comment in getInstantiateWasmFunc().\n //\n // It also is called when Emscripten tries to find a dependency of a shared\n // library but it failed to find it in the file system. But for us that\n // means dependency resolution has already failed and we want to throw an\n // error anyways.\n locateFile: (path: string) => config.indexURL + path,\n instantiateWasm: getInstantiateWasmFunc(config.indexURL),\n };\n return settings;\n}\n\n/**\n * Make the home directory inside the virtual file system,\n * then change the working directory to it.\n *\n * @param Module The Emscripten Module.\n * @param path The path to the home directory.\n * @private\n */\nfunction createHomeDirectory(path: string): PreRunFunc {\n return function (Module) {\n const fallbackPath = \"/\";\n try {\n Module.FS.mkdirTree(path);\n } catch (e) {\n console.error(`Error occurred while making a home directory '${path}':`);\n console.error(e);\n console.error(`Using '${fallbackPath}' for a home directory instead`);\n path = fallbackPath;\n }\n Module.FS.chdir(path);\n };\n}\n\nfunction setEnvironment(env: { [key: string]: string }): PreRunFunc {\n return function (Module) {\n Object.assign(Module.ENV, env);\n };\n}\n\n/**\n * Mount local directories to the virtual file system. Only for Node.js.\n * @param mounts The list of paths to mount.\n */\nfunction mountLocalDirectories(mounts: string[]): PreRunFunc {\n return (Module) => {\n for (const mount of mounts) {\n Module.FS.mkdirTree(mount);\n Module.FS.mount(Module.FS.filesystems.NODEFS, { root: mount }, mount);\n }\n };\n}\n\n/**\n * Install the Python standard library to the virtual file system.\n *\n * Previously, this was handled by Emscripten's file packager (pyodide.asm.data).\n * However, using the file packager means that we have only one version\n * of the standard library available. We want to be able to use different\n * versions of the standard library, for example:\n *\n * - Use compiled(.pyc) or uncompiled(.py) standard library.\n * - Remove unused modules or add additional modules using bundlers like pyodide-pack.\n *\n * @param stdlibURL The URL for the Python standard library\n */\nfunction installStdlib(stdlibURL: string): PreRunFunc {\n const stdlibPromise: Promise<Uint8Array> = loadBinaryFile(stdlibURL);\n return (Module) => {\n /* @ts-ignore */\n const pymajor = Module._py_version_major();\n /* @ts-ignore */\n const pyminor = Module._py_version_minor();\n\n Module.FS.mkdirTree(\"/lib\");\n Module.FS.mkdirTree(`/lib/python${pymajor}.${pyminor}/site-packages`);\n\n Module.addRunDependency(\"install-stdlib\");\n\n stdlibPromise\n .then((stdlib: Uint8Array) => {\n Module.FS.writeFile(`/lib/python${pymajor}${pyminor}.zip`, stdlib);\n })\n .catch((e) => {\n console.error(\"Error occurred while installing the standard library:\");\n console.error(e);\n })\n .finally(() => {\n Module.removeRunDependency(\"install-stdlib\");\n });\n };\n}\n\n/**\n * Initialize the virtual file system, before loading Python interpreter.\n * @private\n */\nfunction getFileSystemInitializationFuncs(config: ConfigType): PreRunFunc[] {\n let stdLibURL;\n if (config.stdLibURL != undefined) {\n stdLibURL = config.stdLibURL;\n } else {\n stdLibURL = config.indexURL + \"python_stdlib.zip\";\n }\n\n return [\n installStdlib(stdLibURL),\n createHomeDirectory(config.env.HOME),\n setEnvironment(config.env),\n mountLocalDirectories(config._node_mounts),\n initializeNativeFS,\n ];\n}\n\nfunction getInstantiateWasmFunc(\n indexURL: string,\n): EmscriptenSettings[\"instantiateWasm\"] {\n if (SOURCEMAP) {\n // According to the docs:\n //\n // \"Sanitizers or source map is currently not supported if overriding\n // WebAssembly instantiation with Module.instantiateWasm.\"\n // https://emscripten.org/docs/api_reference/module.html?highlight=instantiatewasm#Module.instantiateWasm\n //\n // I haven't checked if this is actually a problem in practice.\n return;\n }\n const { binary, response } = getBinaryResponse(indexURL + \"pyodide.asm.wasm\");\n return function (\n imports: { [key: string]: any },\n successCallback: (\n instance: WebAssembly.Instance,\n module: WebAssembly.Module,\n ) => void,\n ) {\n (async function () {\n try {\n let res: WebAssembly.WebAssemblyInstantiatedSource;\n if (response) {\n res = await WebAssembly.instantiateStreaming(response, imports);\n } else {\n res = await WebAssembly.instantiate(await binary, imports);\n }\n const { instance, module } = res;\n // When overriding instantiateWasm, in asan builds, we also need\n // to take care of creating the WasmOffsetConverter\n // @ts-ignore\n if (typeof WasmOffsetConverter !== \"undefined\") {\n // @ts-ignore\n wasmOffsetConverter = new WasmOffsetConverter(wasmBinary, module);\n }\n successCallback(instance, module);\n } catch (e) {\n console.warn(\"wasm instantiation failed!\");\n console.warn(e);\n }\n })();\n\n return {}; // Compiling asynchronously, no exports.\n };\n}\n", "/**\n *\n * The Pyodide version.\n *\n * The version here is a Python version, following :pep:`440`. This is different\n * from the version in ``package.json`` which follows the node package manager\n * version convention.\n */\nexport const version: string = \"0.26.1\";\n", "/**\n * The main bootstrap code for loading pyodide.\n */\nimport {\n calculateDirname,\n loadScript,\n initNodeModules,\n resolvePath,\n loadLockFile,\n} from \"./compat\";\n\nimport { createSettings } from \"./emscripten-settings\";\nimport { version } from \"./version\";\n\nimport type { PyodideInterface } from \"./api.js\";\nimport type { TypedArray, Module } from \"./types\";\nimport type { EmscriptenSettings } from \"./emscripten-settings\";\nimport type { PackageData } from \"./load-package\";\nimport { SnapshotConfig } from \"./snapshot\";\nexport type { PyodideInterface, TypedArray };\n\nexport { version, type PackageData };\n\ndeclare function _createPyodideModule(\n settings: EmscriptenSettings,\n): Promise<Module>;\n\n/**\n * See documentation for loadPyodide.\n * @hidden\n */\nexport type ConfigType = {\n indexURL: string;\n packageCacheDir: string;\n lockFileURL: string;\n fullStdLib?: boolean;\n stdLibURL?: string;\n stdin?: () => string;\n stdout?: (msg: string) => void;\n stderr?: (msg: string) => void;\n jsglobals?: object;\n args: string[];\n _node_mounts: string[];\n env: { [key: string]: string };\n packages: string[];\n _makeSnapshot: boolean;\n enableRunUntilComplete: boolean;\n};\n\n/**\n * Load the main Pyodide wasm module and initialize it.\n *\n * @returns The :ref:`js-api-pyodide` module.\n * @memberof globalThis\n * @async\n * @example\n * async function main() {\n * const pyodide = await loadPyodide({\n * fullStdLib: true,\n * stdout: (msg) => console.log(`Pyodide: ${msg}`),\n * });\n * console.log(\"Loaded Pyodide\");\n * }\n * main();\n */\nexport async function loadPyodide(\n options: {\n /**\n * The URL from which Pyodide will load the main Pyodide runtime and\n * packages. It is recommended that you leave this unchanged, providing an\n * incorrect value can cause broken behavior.\n *\n * Default: The url that Pyodide is loaded from with the file name\n * (``pyodide.js`` or ``pyodide.mjs``) removed.\n */\n indexURL?: string;\n\n /**\n * The file path where packages will be cached in node. If a package\n * exists in ``packageCacheDir`` it is loaded from there, otherwise it is\n * downloaded from the JsDelivr CDN and then cached into ``packageCacheDir``.\n * Only applies when running in node; ignored in browsers.\n *\n * Default: same as indexURL\n */\n packageCacheDir?: string;\n\n /**\n * The URL from which Pyodide will load the Pyodide ``pyodide-lock.json`` lock\n * file. You can produce custom lock files with :py:func:`micropip.freeze`.\n * Default: ```${indexURL}/pyodide-lock.json```\n */\n lockFileURL?: string;\n /**\n * Load the full Python standard library. Setting this to false excludes\n * unvendored modules from the standard library.\n * Default: ``false``\n */\n fullStdLib?: boolean;\n /**\n * The URL from which to load the standard library ``python_stdlib.zip``\n * file. This URL includes the most of the Python standard library. Some\n * stdlib modules were unvendored, and can be loaded separately\n * with ``fullStdLib: true`` option or by their package name.\n * Default: ```${indexURL}/python_stdlib.zip```\n */\n stdLibURL?: string;\n /**\n * Override the standard input callback. Should ask the user for one line of\n * input. The :js:func:`pyodide.setStdin` function is more flexible and\n * should be preferred.\n */\n stdin?: () => string;\n /**\n * Override the standard output callback. The :js:func:`pyodide.setStdout`\n * function is more flexible and should be preferred in most cases, but\n * depending on the ``args`` passed to ``loadPyodide``, Pyodide may write to\n * stdout on startup, which can only be controlled by passing a custom\n * ``stdout`` function.\n */\n stdout?: (msg: string) => void;\n /**\n * Override the standard error output callback. The\n * :js:func:`pyodide.setStderr` function is more flexible and should be\n * preferred in most cases, but depending on the ``args`` passed to\n * ``loadPyodide``, Pyodide may write to stdout on startup, which can only\n * be controlled by passing a custom ``stdout`` function.\n */\n stderr?: (msg: string) => void;\n /**\n * The object that Pyodide will use for the ``js`` module.\n * Default: ``globalThis``\n */\n jsglobals?: object;\n /**\n * Command line arguments to pass to Python on startup. See `Python command\n * line interface options\n * <https://docs.python.org/3.10/using/cmdline.html#interface-options>`_ for\n * more details. Default: ``[]``\n */\n args?: string[];\n /**\n * Environment variables to pass to Python. This can be accessed inside of\n * Python at runtime via :py:data:`os.environ`. Certain environment variables change\n * the way that Python loads:\n * https://docs.python.org/3.10/using/cmdline.html#environment-variables\n * Default: ``{}``.\n * If ``env.HOME`` is undefined, it will be set to a default value of\n * ``\"/home/pyodide\"``\n */\n env?: { [key: string]: string };\n /**\n * A list of packages to load as Pyodide is initializing.\n *\n * This is the same as loading the packages with\n * :js:func:`pyodide.loadPackage` after Pyodide is loaded except using the\n * ``packages`` option is more efficient because the packages are downloaded\n * while Pyodide bootstraps itself.\n */\n packages?: string[];\n /**\n * Opt into the old behavior where :js:func:`PyProxy.toString() <pyodide.ffi.PyProxy.toString>`\n * calls :py:func:`repr` and not :py:class:`str() <str>`.\n * @deprecated\n */\n pyproxyToStringRepr?: boolean;\n /**\n * Make loop.run_until_complete() function correctly using stack switching\n */\n enableRunUntilComplete?: boolean;\n /**\n * @ignore\n */\n _node_mounts?: string[];\n /**\n * @ignore\n */\n _makeSnapshot?: boolean;\n /**\n * @ignore\n */\n _loadSnapshot?:\n | Uint8Array\n | ArrayBuffer\n | PromiseLike<Uint8Array | ArrayBuffer>;\n } = {},\n): Promise<PyodideInterface> {\n await initNodeModules();\n let indexURL = options.indexURL || (await calculateDirname());\n indexURL = resolvePath(indexURL); // A relative indexURL causes havoc.\n if (!indexURL.endsWith(\"/\")) {\n indexURL += \"/\";\n }\n options.indexURL = indexURL;\n\n const default_config = {\n fullStdLib: false,\n jsglobals: globalThis,\n stdin: globalThis.prompt ? globalThis.prompt : undefined,\n lockFileURL: indexURL + \"pyodide-lock.json\",\n args: [],\n _node_mounts: [],\n env: {},\n packageCacheDir: indexURL,\n packages: [],\n enableRunUntilComplete: false,\n };\n const config = Object.assign(default_config, options) as ConfigType;\n if (!config.env.HOME) {\n config.env.HOME = \"/home/pyodide\";\n }\n const emscriptenSettings = createSettings(config);\n const API = emscriptenSettings.API;\n API.lockFilePromise = loadLockFile(config.lockFileURL);\n\n // If the pyodide.asm.js script has been imported, we can skip the dynamic import\n // Users can then do a static import of the script in environments where\n // dynamic importing is not allowed or not desirable, like module-type service workers\n if (typeof _createPyodideModule !== \"function\") {\n const scriptSrc = `${config.indexURL}pyodide.asm.js`;\n await loadScript(scriptSrc);\n }\n\n let snapshot: Uint8Array | undefined = undefined;\n if (options._loadSnapshot) {\n const snp = await options._loadSnapshot;\n if (ArrayBuffer.isView(snp)) {\n snapshot = snp;\n } else {\n snapshot = new Uint8Array(snp);\n }\n emscriptenSettings.noInitialRun = true;\n // @ts-ignore\n emscriptenSettings.INITIAL_MEMORY = snapshot.length;\n }\n\n // _createPyodideModule is specified in the Makefile by the linker flag:\n // `-s EXPORT_NAME=\"'_createPyodideModule'\"`\n const Module = await _createPyodideModule(emscriptenSettings);\n // Handle early exit\n if (emscriptenSettings.exited) {\n throw emscriptenSettings.exited.toThrow;\n }\n if (options.pyproxyToStringRepr) {\n API.setPyProxyToStringMethod(true);\n }\n\n if (API.version !== version) {\n throw new Error(\n `\\\nPyodide version does not match: '${version}' <==> '${API.version}'. \\\nIf you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.\\\n`,\n );\n }\n // Disable further loading of Emscripten file_packager stuff.\n Module.locateFile = (path: string) => {\n throw new Error(\"Didn't expect to load any more file_packager files!\");\n };\n\n let snapshotConfig: SnapshotConfig | undefined = undefined;\n if (snapshot) {\n snapshotConfig = API.restoreSnapshot(snapshot);\n }\n // runPython works starting after the call to finalizeBootstrap.\n const pyodide = API.finalizeBootstrap(snapshotConfig);\n API.sys.path.insert(0, API.config.env.HOME);\n\n if (!pyodide.version.includes(\"dev\")) {\n // Currently only used in Node to download packages the first time they are\n // loaded. But in other cases it's harmless.\n API.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${pyodide.version}/full/`);\n }\n API._pyodide.set_excepthook();\n await API.packageIndexReady;\n // I think we want this initializeStreams call to happen after\n // packageIndexReady? I don't remember why.\n API.initializeStreams(config.stdin, config.stdout, config.stderr);\n return pyod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C,IAAMM,EAAUV,EAAI,kBAAkBS,CAAc,EACpD,OAAAT,EAAI,IAAI,KAAK,OAAO,EAAGA,EAAI,OAAO,IAAI,IAAI,EAErCU,EAAQ,QAAQ,SAAS,KAAK,GAGjCV,EAAI,UAAU,qCAAqCU,EAAQ,eAAe,EAE5EV,EAAI,SAAS,eAAe,EAC5B,MAAMA,EAAI,kBAGVA,EAAI,kBAAkBH,EAAO,MAAOA,EAAO,OAAQA,EAAO,MAAM,EACzDa,CACT,CAtNsBC,EAAArB,GAAA",
6
- "names": ["require_stackframe", "__commonJSMin", "exports", "module", "root", "factory", "_isNumber", "n", "__name", "_capitalize", "str", "_getter", "p", "booleanProps", "numericProps", "stringProps", "arrayProps", "objectProps", "props", "StackFrame", "obj", "i", "v", "fileName", "lineNumber", "columnNumber", "functionName", "argsStartIndex", "argsEndIndex", "args", "locationString", "parts", "j", "k", "require_error_stack_parser", "__commonJSMin", "exports", "module", "root", "factory", "__name", "StackFrame", "FIREFOX_SAFARI_STACK_REGEXP", "CHROME_IE_STACK_REGEXP", "SAFARI_NATIVE_CODE_REGEXP", "error", "urlLike", "regExp", "parts", "filtered", "line", "sanitizedLine", "location", "locationParts", "functionName", "fileName", "functionNameRegex", "matches", "e", "lineRE", "lines", "result", "i", "len", "match", "tokens", "functionCall", "argsRaw", "args", "import_error_stack_parser", "IN_NODE", "IN_NODE_COMMONJS", "__require", "IN_NODE_ESM", "IN_DENO", "IN_BROWSER", "IN_BROWSER_MAIN_THREAD", "IN_BROWSER_WEB_WORKER", "IN_SAFARI", "nodeUrlMod", "nodePath", "nodeVmMod", "nodeFSMod", "nodeFsPromisesMod", "initNodeModules", "IN_NODE", "pathSep", "__require", "fs", "crypto", "ws", "child_process", "node_modules", "mod", "__name", "node_resolvePath", "path", "base", "browser_resolvePath", "resolvePath", "node_getBinaryResponse", "_file_sub_resource_hash", "data", "browser_getBinaryResponse", "subResourceHash", "url", "getBinaryResponse", "loadBinaryFile", "file_sub_resource_hash", "response", "binary", "r", "loadScript", "IN_BROWSER_MAIN_THREAD", "IN_BROWSER_WEB_WORKER", "nodeLoadScript", "loadLockFile", "lockFileURL", "package_string", "calculateDirname", "IN_NODE_COMMONJS", "err", "e", "fileName", "ErrorStackParser", "IN_NODE_ESM", "indexOfLastSlash", "initializeNativeFS", "module", "FS", "MEMFS", "PATH", "nativeFSAsync", "mount", "populate", "callback", "local", "remote", "src", "dst", "e", "entries", "isRealDir", "p", "__name", "toAbsolute", "root", "check", "path", "stat", "handles", "getFsHandles", "handle", "node", "entry", "file", "parentDirHandle", "writable", "total", "create", "key", "e2", "remove", "relPath", "dirHandle", "collect", "curDirHandle", "result", "relativePath", "createSettings", "config", "settings", "getFileSystemInitializationFuncs", "status", "toThrow", "path", "getInstantiateWasmFunc", "__name", "createHomeDirectory", "Module", "fallbackPath", "e", "setEnvironment", "env", "mountLocalDirectories", "mounts", "mount", "installStdlib", "stdlibURL", "stdlibPromise", "loadBinaryFile", "pymajor", "pyminor", "stdlib", "stdLibURL", "initializeNativeFS", "indexURL", "binary", "response", "getBinaryResponse", "imports", "successCallback", "res", "instance", "module", "version", "loadPyodide", "options", "initNodeModules", "indexURL", "calculateDirname", "resolvePath", "default_config", "config", "emscriptenSettings", "createSettings", "API", "loadLockFile", "scriptSrc", "loadScript", "snapshot", "snp", "Module", "version", "path", "snapshotConfig", "pyodide", "__name"]
3
+ "sources": ["../src/js/vendor/stackframe/stackframe.ts", "../src/js/vendor/stackframe/error-stack-parser.ts", "../src/js/environments.ts", "../src/js/compat.ts", "../src/js/nativefs.ts", "../src/js/emscripten-settings.ts", "../src/js/version.ts", "../src/js/pyodide.ts"],
4
+ "sourcesContent": ["// @ts-nocheck\n// Port of https://github.com/stacktracejs/stackframe/blob/master/stackframe.js.\n// Rewritten to ES6 and removed UMD and CommonJS support.\n\nfunction _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n}\n\nfunction _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n}\n\nfunction _getter(p) {\n return function () {\n return this[p];\n };\n}\n\nvar booleanProps = [\"isConstructor\", \"isEval\", \"isNative\", \"isToplevel\"];\nvar numericProps = [\"columnNumber\", \"lineNumber\"];\nvar stringProps = [\"fileName\", \"functionName\", \"source\"];\nvar arrayProps = [\"args\"];\nvar objectProps = [\"evalOrigin\"];\n\nvar props = booleanProps.concat(\n numericProps,\n stringProps,\n arrayProps,\n objectProps,\n);\n\ndeclare namespace StackFrame {\n export interface StackFrameOptions {\n isConstructor?: boolean;\n isEval?: boolean;\n isNative?: boolean;\n isToplevel?: boolean;\n columnNumber?: number;\n lineNumber?: number;\n fileName?: string;\n functionName?: string;\n source?: string;\n args?: any[];\n evalOrigin?: StackFrame;\n }\n}\n\ndeclare class StackFrame {\n constructor(obj: StackFrame.StackFrameOptions);\n\n args?: any[];\n getArgs(): any[] | undefined;\n setArgs(args: any[]): void;\n\n evalOrigin?: StackFrame;\n getEvalOrigin(): StackFrame | undefined;\n setEvalOrigin(stackframe: StackFrame): void;\n\n isConstructor?: boolean;\n getIsConstructor(): boolean | undefined;\n setIsConstructor(isConstructor: boolean): void;\n\n isEval?: boolean;\n getIsEval(): boolean | undefined;\n setIsEval(isEval: boolean): void;\n\n isNative?: boolean;\n getIsNative(): boolean | undefined;\n setIsNative(isNative: boolean): void;\n\n isToplevel?: boolean;\n getIsToplevel(): boolean | undefined;\n setIsToplevel(isToplevel: boolean): void;\n\n columnNumber?: number;\n getColumnNumber(): number | undefined;\n setColumnNumber(columnNumber: number): void;\n\n lineNumber?: number;\n getLineNumber(): number | undefined;\n setLineNumber(lineNumber: number): void;\n\n fileName?: string;\n getFileName(): string | undefined;\n setFileName(fileName: string): void;\n\n functionName?: string;\n getFunctionName(): string | undefined;\n setFunctionName(functionName: string): void;\n\n source?: string;\n getSource(): string | undefined;\n setSource(source: string): void;\n\n toString(): string;\n}\n\nfunction StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this[\"set\" + _capitalize(props[i])](obj[props[i]]);\n }\n }\n}\n\nStackFrame.prototype = {\n getArgs: function () {\n return this.args;\n },\n setArgs: function (v) {\n if (Object.prototype.toString.call(v) !== \"[object Array]\") {\n throw new TypeError(\"Args must be an Array\");\n }\n this.args = v;\n },\n\n getEvalOrigin: function () {\n return this.evalOrigin;\n },\n setEvalOrigin: function (v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError(\"Eval Origin must be an Object or StackFrame\");\n }\n },\n\n toString: function () {\n var fileName = this.getFileName() || \"\";\n var lineNumber = this.getLineNumber() || \"\";\n var columnNumber = this.getColumnNumber() || \"\";\n var functionName = this.getFunctionName() || \"\";\n if (this.getIsEval()) {\n if (fileName) {\n return (\n \"[eval] (\" + fileName + \":\" + lineNumber + \":\" + columnNumber + \")\"\n );\n }\n return \"[eval]:\" + lineNumber + \":\" + columnNumber;\n }\n if (functionName) {\n return (\n functionName +\n \" (\" +\n fileName +\n \":\" +\n lineNumber +\n \":\" +\n columnNumber +\n \")\"\n );\n }\n return fileName + \":\" + lineNumber + \":\" + columnNumber;\n },\n};\n\nStackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf(\"(\");\n var argsEndIndex = str.lastIndexOf(\")\");\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(\",\");\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf(\"@\") === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, \"\");\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined,\n });\n};\n\nfor (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype[\"get\" + _capitalize(booleanProps[i])] = _getter(\n booleanProps[i],\n );\n StackFrame.prototype[\"set\" + _capitalize(booleanProps[i])] = (function (p) {\n return function (v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n}\n\nfor (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype[\"get\" + _capitalize(numericProps[j])] = _getter(\n numericProps[j],\n );\n StackFrame.prototype[\"set\" + _capitalize(numericProps[j])] = (function (p) {\n return function (v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + \" must be a Number\");\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n}\n\nfor (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype[\"get\" + _capitalize(stringProps[k])] = _getter(\n stringProps[k],\n );\n StackFrame.prototype[\"set\" + _capitalize(stringProps[k])] = (function (p) {\n return function (v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n}\n\nexport default StackFrame;\n", "// @ts-nocheck\n// Port of https://github.com/stacktracejs/error-stack-parser\n// Rewritten to ES6 and removed UMD and CommonJS support.\n// Removed old opera support.\n\nimport StackFrame from \"./stackframe\";\n\ndeclare namespace ErrorStackParser {\n export type { StackFrame };\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n export function parse(error: Error): StackFrame[];\n}\n\nfunction ErrorStackParser() {\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error: Error): StackFrame[] {\n if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error(\"Cannot parse given Error object\");\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(\":\") === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, \"\"));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function (line) {\n if (line.indexOf(\"(eval \") > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line\n .replace(/eval code/g, \"eval\")\n .replace(/(\\(eval at [^()]*)|(,.*$)/g, \"\");\n }\n var sanitizedLine = line\n .replace(/^\\s+/, \"\")\n .replace(/\\(eval code/g, \"(\")\n .replace(/^.*?\\s+/, \"\");\n\n // capture and preserve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location\n ? sanitizedLine.replace(location[0], \"\")\n : sanitizedLine;\n\n // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n // because this line doesn't have function name\n var locationParts = this.extractLocation(\n location ? location[1] : sanitizedLine,\n );\n var functionName = (location && sanitizedLine) || undefined;\n var fileName =\n [\"eval\", \"<anonymous>\"].indexOf(locationParts[0]) > -1\n ? undefined\n : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line,\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function (line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(\" > eval\") > -1) {\n line = line.replace(\n / line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g,\n \":$1\",\n );\n }\n\n if (line.indexOf(\"@\") === -1 && line.indexOf(\":\") === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line,\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(\n line.replace(functionNameRegex, \"\"),\n );\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line,\n });\n }\n }, this);\n },\n };\n}\n\nconst errorStackParser = new ErrorStackParser();\n\nexport { StackFrame };\nexport default errorStackParser;\n", "// @ts-nocheck\n\n/** @private */\nexport const IN_NODE =\n typeof process === \"object\" &&\n typeof process.versions === \"object\" &&\n typeof process.versions.node === \"string\" &&\n !process.browser; /* This last condition checks if we run the browser shim of process */\n\n/** @private */\nexport const IN_NODE_COMMONJS =\n IN_NODE &&\n typeof module !== \"undefined\" &&\n typeof module.exports !== \"undefined\" &&\n typeof require !== \"undefined\" &&\n typeof __dirname !== \"undefined\";\n\n/** @private */\nexport const IN_NODE_ESM = IN_NODE && !IN_NODE_COMMONJS;\n\n/** @private */\nexport const IN_BUN = typeof globalThis.Bun !== \"undefined\";\n\n/** @private */\nexport const IN_DENO = typeof Deno !== \"undefined\"; // just in case...\n\n/** @private */\nexport const IN_BROWSER = !IN_NODE && !IN_DENO;\n\n/** @private */\nexport const IN_BROWSER_MAIN_THREAD =\n IN_BROWSER &&\n typeof window === \"object\" &&\n typeof document === \"object\" &&\n typeof document.createElement === \"function\" &&\n typeof sessionStorage === \"object\" &&\n typeof importScripts !== \"function\";\n\n/** @private */\nexport const IN_BROWSER_WEB_WORKER =\n IN_BROWSER && typeof importScripts === \"function\" && typeof self === \"object\";\n\n/** @private */\nexport const IN_SAFARI =\n typeof navigator === \"object\" &&\n typeof navigator.userAgent === \"string\" &&\n navigator.userAgent.indexOf(\"Chrome\") == -1 &&\n navigator.userAgent.indexOf(\"Safari\") > -1;\n\n/**\n * Detects the current environment and returns a record with the results.\n * This function is useful for debugging and testing purposes.\n * @private\n */\nexport function detectEnvironment(): Record<string, boolean> {\n return {\n IN_NODE: IN_NODE,\n IN_NODE_COMMONJS: IN_NODE_COMMONJS,\n IN_NODE_ESM: IN_NODE_ESM,\n IN_BUN: IN_BUN,\n IN_DENO: IN_DENO,\n IN_BROWSER: IN_BROWSER,\n IN_BROWSER_MAIN_THREAD: IN_BROWSER_MAIN_THREAD,\n IN_BROWSER_WEB_WORKER: IN_BROWSER_WEB_WORKER,\n IN_SAFARI: IN_SAFARI,\n };\n}\n", "import ErrorStackParser from \"./vendor/stackframe/error-stack-parser\";\nimport {\n IN_NODE,\n IN_NODE_ESM,\n IN_BROWSER_MAIN_THREAD,\n IN_BROWSER_WEB_WORKER,\n IN_NODE_COMMONJS,\n} from \"./environments\";\nimport { Lockfile } from \"./types\";\n\nlet nodeUrlMod: typeof import(\"node:url\");\nlet nodePath: typeof import(\"node:path\");\nlet nodeVmMod: typeof import(\"node:vm\");\n/** @private */\nexport let nodeFSMod: typeof import(\"node:fs\");\n/** @private */\nexport let nodeFsPromisesMod: typeof import(\"node:fs/promises\");\n\ndeclare var globalThis: {\n importScripts: (url: string) => void;\n document?: typeof document;\n fetch?: typeof fetch;\n};\n\n/**\n * If we're in node, it's most convenient to import various node modules on\n * initialization. Otherwise, this does nothing.\n * @private\n */\nexport async function initNodeModules() {\n if (!IN_NODE) {\n return;\n }\n // @ts-ignore\n nodeUrlMod = (await import(\"node:url\")).default;\n nodeFSMod = await import(\"node:fs\");\n nodeFsPromisesMod = await import(\"node:fs/promises\");\n\n // @ts-ignore\n nodeVmMod = (await import(\"node:vm\")).default;\n nodePath = await import(\"node:path\");\n pathSep = nodePath.sep;\n\n // Emscripten uses `require`, so if it's missing (because we were imported as\n // an ES6 module) we need to polyfill `require` with `import`. `import` is\n // async and `require` is synchronous, so we import all packages that might be\n // required up front and define require to look them up in this table.\n\n if (typeof require !== \"undefined\") {\n return;\n }\n // These are all the packages required in pyodide.asm.js. You can get this\n // list with:\n // $ grep -o 'require(\"[a-z]*\")' pyodide.asm.js | sort -u\n const fs = nodeFSMod;\n const crypto = await import(\"node:crypto\");\n const ws = await import(\"ws\");\n const child_process = await import(\"node:child_process\");\n const node_modules: { [mode: string]: any } = {\n fs,\n crypto,\n ws,\n child_process,\n };\n // Since we're in an ES6 module, this is only modifying the module namespace,\n // it's still private to Pyodide.\n (globalThis as any).require = function (mod: string): any {\n return node_modules[mod];\n };\n}\n\nfunction node_resolvePath(path: string, base?: string): string {\n return nodePath.resolve(base || \".\", path);\n}\n\nfunction browser_resolvePath(path: string, base?: string): string {\n if (base === undefined) {\n // @ts-ignore\n base = location;\n }\n return new URL(path, base).toString();\n}\n\nexport let resolvePath: (rest: string, base?: string) => string;\nif (IN_NODE) {\n resolvePath = node_resolvePath;\n} else {\n resolvePath = browser_resolvePath;\n}\n\n/**\n * Get the path separator. If we are on Linux or in the browser, it's /.\n * In Windows, it's \\.\n * @private\n */\nexport let pathSep: string;\n\nif (!IN_NODE) {\n pathSep = \"/\";\n}\n\n/**\n * Load a binary file, only for use in Node. If the path explicitly is a URL,\n * then fetch from a URL, else load from the file system.\n * @param indexURL base path to resolve relative paths\n * @param path the path to load\n * @param checksum sha-256 checksum of the package\n * @returns An ArrayBuffer containing the binary data\n * @private\n */\nfunction node_getBinaryResponse(\n path: string,\n _file_sub_resource_hash?: string | undefined, // Ignoring sub resource hash. See issue-2431.\n):\n | { response: Promise<Response>; binary?: undefined }\n | { binary: Promise<Uint8Array> } {\n if (path.startsWith(\"file://\")) {\n // handle file:// with filesystem operations rather than with fetch.\n path = path.slice(\"file://\".length);\n }\n if (path.includes(\"://\")) {\n // If it has a protocol, make a fetch request\n return { response: fetch(path) };\n } else {\n // Otherwise get it from the file system\n return {\n binary: nodeFsPromisesMod\n .readFile(path)\n .then(\n (data: Buffer) =>\n new Uint8Array(data.buffer, data.byteOffset, data.byteLength),\n ),\n };\n }\n}\n\n/**\n * Load a binary file, only for use in browser. Resolves relative paths against\n * indexURL.\n *\n * @param path the path to load\n * @param subResourceHash the sub resource hash for fetch() integrity check\n * @returns A Uint8Array containing the binary data\n * @private\n */\nfunction browser_getBinaryResponse(\n path: string,\n subResourceHash: string | undefined,\n): { response: Promise<Response>; binary?: undefined } {\n const url = new URL(path, location as unknown as URL);\n let options = subResourceHash ? { integrity: subResourceHash } : {};\n return { response: fetch(url, options) };\n}\n\n/** @private */\nexport let getBinaryResponse: (\n path: string,\n file_sub_resource_hash?: string | undefined,\n) =>\n | { response: Promise<Response>; binary?: undefined }\n | { response?: undefined; binary: Promise<Uint8Array> };\nif (IN_NODE) {\n getBinaryResponse = node_getBinaryResponse;\n} else {\n getBinaryResponse = browser_getBinaryResponse;\n}\n\nexport async function loadBinaryFile(\n path: string,\n file_sub_resource_hash?: string | undefined,\n): Promise<Uint8Array> {\n const { response, binary } = getBinaryResponse(path, file_sub_resource_hash);\n if (binary) {\n return binary;\n }\n const r = await response;\n if (!r.ok) {\n throw new Error(`Failed to load '${path}': request failed.`);\n }\n return new Uint8Array(await r.arrayBuffer());\n}\n\n/**\n * Currently loadScript is only used once to load `pyodide.asm.js`.\n * @param url\n * @async\n * @private\n */\nexport let loadScript: (url: string) => Promise<void>;\n\nif (IN_BROWSER_MAIN_THREAD) {\n // browser\n loadScript = async (url) => await import(/* webpackIgnore: true */ url);\n} else if (IN_BROWSER_WEB_WORKER) {\n // webworker\n loadScript = async (url) => {\n try {\n // use importScripts in classic web worker\n globalThis.importScripts(url);\n } catch (e) {\n // importScripts throws TypeError in a module type web worker, use import instead\n if (e instanceof TypeError) {\n await import(/* webpackIgnore: true */ url);\n } else {\n throw e;\n }\n }\n };\n} else if (IN_NODE) {\n loadScript = nodeLoadScript;\n} else {\n throw new Error(\"Cannot determine runtime environment\");\n}\n\n/**\n * Load a text file and executes it as Javascript\n * @param url The path to load. May be a url or a relative file system path.\n * @private\n */\nasync function nodeLoadScript(url: string) {\n if (url.startsWith(\"file://\")) {\n // handle file:// with filesystem operations rather than with fetch.\n url = url.slice(\"file://\".length);\n }\n if (url.includes(\"://\")) {\n // If it's a url, load it with fetch then eval it.\n nodeVmMod.runInThisContext(await (await fetch(url)).text());\n } else {\n // Otherwise, hopefully it is a relative path we can load from the file\n // system.\n await import(/* webpackIgnore: true */ nodeUrlMod.pathToFileURL(url).href);\n }\n}\n\nexport async function loadLockFile(lockFileURL: string): Promise<Lockfile> {\n if (IN_NODE) {\n await initNodeModules();\n const package_string = await nodeFsPromisesMod.readFile(lockFileURL, {\n encoding: \"utf8\",\n });\n return JSON.parse(package_string);\n } else {\n let response = await fetch(lockFileURL);\n return await response.json();\n }\n}\n\n/**\n * Calculate the directory name of the current module.\n * This is used to guess the indexURL when it is not provided.\n */\nexport async function calculateDirname(): Promise<string> {\n if (IN_NODE_COMMONJS) {\n return __dirname;\n }\n\n let err: Error;\n try {\n throw new Error();\n } catch (e) {\n err = e as Error;\n }\n let fileName = ErrorStackParser.parse(err)[0].fileName!;\n\n if (IN_NODE && !fileName.startsWith(\"file://\")) {\n fileName = `file://${fileName}`; // Error stack filenames are not starting with `file://` in `Bun`\n }\n\n if (IN_NODE_ESM) {\n const nodePath = await import(\"node:path\");\n const nodeUrl = await import(\"node:url\");\n\n // FIXME: We would like to use import.meta.url here,\n // but mocha seems to mess with compiling typescript files to ES6.\n return nodeUrl.fileURLToPath(nodePath.dirname(fileName));\n }\n\n const indexOfLastSlash = fileName.lastIndexOf(pathSep);\n if (indexOfLastSlash === -1) {\n throw new Error(\n \"Could not extract indexURL path from pyodide module location\",\n );\n }\n return fileName.slice(0, indexOfLastSlash);\n}\n", "import { Module } from \"./types\";\n\n/**\n * @private\n */\nexport function initializeNativeFS(module: Module) {\n const FS = module.FS;\n const MEMFS = module.FS.filesystems.MEMFS;\n const PATH = module.PATH;\n\n const nativeFSAsync = {\n // DIR_MODE: {{{ cDefine('S_IFDIR') }}} | 511 /* 0777 */,\n // FILE_MODE: {{{ cDefine('S_IFREG') }}} | 511 /* 0777 */,\n DIR_MODE: 16384 | 511,\n FILE_MODE: 32768 | 511,\n mount: function (mount: any) {\n if (!mount.opts.fileSystemHandle) {\n throw new Error(\"opts.fileSystemHandle is required\");\n }\n\n // reuse all of the core MEMFS functionality\n return MEMFS.mount.apply(null, arguments);\n },\n syncfs: async (mount: any, populate: Boolean, callback: Function) => {\n try {\n const local = nativeFSAsync.getLocalSet(mount);\n const remote = await nativeFSAsync.getRemoteSet(mount);\n const src = populate ? remote : local;\n const dst = populate ? local : remote;\n await nativeFSAsync.reconcile(mount, src, dst);\n callback(null);\n } catch (e) {\n callback(e);\n }\n },\n // Returns file set of emscripten's filesystem at the mountpoint.\n getLocalSet: (mount: any) => {\n let entries = Object.create(null);\n\n function isRealDir(p: string) {\n return p !== \".\" && p !== \"..\";\n }\n\n function toAbsolute(root: string) {\n return (p: string) => {\n return PATH.join2(root, p);\n };\n }\n\n let check = FS.readdir(mount.mountpoint)\n .filter(isRealDir)\n .map(toAbsolute(mount.mountpoint));\n\n while (check.length) {\n let path = check.pop();\n let stat = FS.stat(path);\n\n if (FS.isDir(stat.mode)) {\n check.push.apply(\n check,\n FS.readdir(path).filter(isRealDir).map(toAbsolute(path)),\n );\n }\n\n entries[path] = { timestamp: stat.mtime, mode: stat.mode };\n }\n\n return { type: \"local\", entries: entries };\n },\n // Returns file set of the real, on-disk filesystem at the mountpoint.\n getRemoteSet: async (mount: any) => {\n // TODO: this should be a map.\n const entries = Object.create(null);\n\n const handles = await getFsHandles(mount.opts.fileSystemHandle);\n for (const [path, handle] of handles) {\n if (path === \".\") continue;\n\n entries[PATH.join2(mount.mountpoint, path)] = {\n timestamp:\n handle.kind === \"file\"\n ? (await handle.getFile()).lastModifiedDate\n : new Date(),\n mode:\n handle.kind === \"file\"\n ? nativeFSAsync.FILE_MODE\n : nativeFSAsync.DIR_MODE,\n };\n }\n\n return { type: \"remote\", entries, handles };\n },\n loadLocalEntry: (path: string) => {\n const lookup = FS.lookupPath(path);\n const node = lookup.node;\n const stat = FS.stat(path);\n\n if (FS.isDir(stat.mode)) {\n return { timestamp: stat.mtime, mode: stat.mode };\n } else if (FS.isFile(stat.mode)) {\n node.contents = MEMFS.getFileDataAsTypedArray(node);\n return {\n timestamp: stat.mtime,\n mode: stat.mode,\n contents: node.contents,\n };\n } else {\n throw new Error(\"node type not supported\");\n }\n },\n storeLocalEntry: (path: string, entry: any) => {\n if (FS.isDir(entry[\"mode\"])) {\n FS.mkdirTree(path, entry[\"mode\"]);\n } else if (FS.isFile(entry[\"mode\"])) {\n FS.writeFile(path, entry[\"contents\"], { canOwn: true });\n } else {\n throw new Error(\"node type not supported\");\n }\n\n FS.chmod(path, entry[\"mode\"]);\n FS.utime(path, entry[\"timestamp\"], entry[\"timestamp\"]);\n },\n removeLocalEntry: (path: string) => {\n var stat = FS.stat(path);\n\n if (FS.isDir(stat.mode)) {\n FS.rmdir(path);\n } else if (FS.isFile(stat.mode)) {\n FS.unlink(path);\n }\n },\n loadRemoteEntry: async (handle: any) => {\n if (handle.kind === \"file\") {\n const file = await handle.getFile();\n return {\n contents: new Uint8Array(await file.arrayBuffer()),\n mode: nativeFSAsync.FILE_MODE,\n timestamp: file.lastModifiedDate,\n };\n } else if (handle.kind === \"directory\") {\n return {\n mode: nativeFSAsync.DIR_MODE,\n timestamp: new Date(),\n };\n } else {\n throw new Error(\"unknown kind: \" + handle.kind);\n }\n },\n storeRemoteEntry: async (handles: any, path: string, entry: any) => {\n const parentDirHandle = handles.get(PATH.dirname(path));\n const handle = FS.isFile(entry.mode)\n ? await parentDirHandle.getFileHandle(PATH.basename(path), {\n create: true,\n })\n : await parentDirHandle.getDirectoryHandle(PATH.basename(path), {\n create: true,\n });\n if (handle.kind === \"file\") {\n const writable = await handle.createWritable();\n await writable.write(entry.contents);\n await writable.close();\n }\n handles.set(path, handle);\n },\n removeRemoteEntry: async (handles: any, path: string) => {\n const parentDirHandle = handles.get(PATH.dirname(path));\n await parentDirHandle.removeEntry(PATH.basename(path));\n handles.delete(path);\n },\n reconcile: async (mount: any, src: any, dst: any) => {\n let total = 0;\n\n const create: Array<string> = [];\n Object.keys(src.entries).forEach(function (key) {\n const e = src.entries[key];\n const e2 = dst.entries[key];\n if (\n !e2 ||\n (FS.isFile(e.mode) &&\n e[\"timestamp\"].getTime() > e2[\"timestamp\"].getTime())\n ) {\n create.push(key);\n total++;\n }\n });\n // sort paths in ascending order so directory entries are created\n // before the files inside them\n create.sort();\n\n const remove: Array<string> = [];\n Object.keys(dst.entries).forEach(function (key) {\n if (!src.entries[key]) {\n remove.push(key);\n total++;\n }\n });\n // sort paths in descending order so files are deleted before their\n // parent directories\n remove.sort().reverse();\n\n if (!total) {\n return;\n }\n\n const handles = src.type === \"remote\" ? src.handles : dst.handles;\n\n for (const path of create) {\n const relPath = PATH.normalize(\n path.replace(mount.mountpoint, \"/\"),\n ).substring(1);\n if (dst.type === \"local\") {\n const handle = handles.get(relPath);\n const entry = await nativeFSAsync.loadRemoteEntry(handle);\n nativeFSAsync.storeLocalEntry(path, entry);\n } else {\n const entry = nativeFSAsync.loadLocalEntry(path);\n await nativeFSAsync.storeRemoteEntry(handles, relPath, entry);\n }\n }\n\n for (const path of remove) {\n if (dst.type === \"local\") {\n nativeFSAsync.removeLocalEntry(path);\n } else {\n const relPath = PATH.normalize(\n path.replace(mount.mountpoint, \"/\"),\n ).substring(1);\n await nativeFSAsync.removeRemoteEntry(handles, relPath);\n }\n }\n },\n };\n\n module.FS.filesystems.NATIVEFS_ASYNC = nativeFSAsync;\n}\n\nconst getFsHandles = async (dirHandle: any) => {\n const handles: any = [];\n\n async function collect(curDirHandle: any) {\n for await (const entry of curDirHandle.values()) {\n handles.push(entry);\n if (entry.kind === \"directory\") {\n await collect(entry);\n }\n }\n }\n\n await collect(dirHandle);\n\n const result = new Map();\n result.set(\".\", dirHandle);\n for (const handle of handles) {\n const relativePath = (await dirHandle.resolve(handle)).join(\"/\");\n result.set(relativePath, handle);\n }\n return result;\n};\n", "/** @private */\n\nimport { ConfigType } from \"./pyodide\";\nimport { initializeNativeFS } from \"./nativefs\";\nimport { loadBinaryFile, getBinaryResponse } from \"./compat\";\nimport { API, PreRunFunc } from \"./types\";\n\n/**\n * @private\n * @hidden\n */\nexport interface EmscriptenSettings {\n readonly noImageDecoding?: boolean;\n readonly noAudioDecoding?: boolean;\n readonly noWasmDecoding?: boolean;\n readonly preRun: readonly PreRunFunc[];\n readonly quit: (status: number, toThrow: Error) => void;\n readonly print?: (a: string) => void;\n readonly printErr?: (a: string) => void;\n readonly arguments: readonly string[];\n readonly instantiateWasm?: (\n imports: { [key: string]: any },\n successCallback: (\n instance: WebAssembly.Instance,\n module: WebAssembly.Module,\n ) => void,\n ) => void;\n readonly API: API;\n readonly locateFile: (file: string) => string;\n\n exited?: { readonly status: number; readonly toThrow: Error };\n noInitialRun?: boolean;\n INITIAL_MEMORY?: number;\n}\n\n/**\n * Get the base settings to use to load Pyodide.\n *\n * @private\n */\nexport function createSettings(config: ConfigType): EmscriptenSettings {\n const settings: EmscriptenSettings = {\n noImageDecoding: true,\n noAudioDecoding: true,\n noWasmDecoding: false,\n preRun: getFileSystemInitializationFuncs(config),\n quit(status: number, toThrow: Error) {\n // It's a little bit hacky that we set this on the settings object but\n // it's not that easy to get access to the Module object from here.\n settings.exited = { status, toThrow };\n throw toThrow;\n },\n print: config.stdout,\n printErr: config.stderr,\n arguments: config.args,\n API: { config } as API,\n // Emscripten calls locateFile exactly one time with argument\n // pyodide.asm.wasm to get the URL it should download it from.\n //\n // If we set instantiateWasm the return value of locateFile actually is\n // unused, but Emscripten calls it anyways. We set instantiateWasm except\n // when compiling with source maps, see comment in getInstantiateWasmFunc().\n //\n // It also is called when Emscripten tries to find a dependency of a shared\n // library but it failed to find it in the file system. But for us that\n // means dependency resolution has already failed and we want to throw an\n // error anyways.\n locateFile: (path: string) => config.indexURL + path,\n instantiateWasm: getInstantiateWasmFunc(config.indexURL),\n };\n return settings;\n}\n\n/**\n * Make the home directory inside the virtual file system,\n * then change the working directory to it.\n *\n * @param Module The Emscripten Module.\n * @param path The path to the home directory.\n * @private\n */\nfunction createHomeDirectory(path: string): PreRunFunc {\n return function (Module) {\n const fallbackPath = \"/\";\n try {\n Module.FS.mkdirTree(path);\n } catch (e) {\n console.error(`Error occurred while making a home directory '${path}':`);\n console.error(e);\n console.error(`Using '${fallbackPath}' for a home directory instead`);\n path = fallbackPath;\n }\n Module.FS.chdir(path);\n };\n}\n\nfunction setEnvironment(env: { [key: string]: string }): PreRunFunc {\n return function (Module) {\n Object.assign(Module.ENV, env);\n };\n}\n\n/**\n * Mount local directories to the virtual file system. Only for Node.js.\n * @param mounts The list of paths to mount.\n */\nfunction mountLocalDirectories(mounts: string[]): PreRunFunc {\n return (Module) => {\n for (const mount of mounts) {\n Module.FS.mkdirTree(mount);\n Module.FS.mount(Module.FS.filesystems.NODEFS, { root: mount }, mount);\n }\n };\n}\n\n/**\n * Install the Python standard library to the virtual file system.\n *\n * Previously, this was handled by Emscripten's file packager (pyodide.asm.data).\n * However, using the file packager means that we have only one version\n * of the standard library available. We want to be able to use different\n * versions of the standard library, for example:\n *\n * - Use compiled(.pyc) or uncompiled(.py) standard library.\n * - Remove unused modules or add additional modules using bundlers like pyodide-pack.\n *\n * @param stdlibURL The URL for the Python standard library\n */\nfunction installStdlib(stdlibURL: string): PreRunFunc {\n const stdlibPromise: Promise<Uint8Array> = loadBinaryFile(stdlibURL);\n return (Module) => {\n /* @ts-ignore */\n const pymajor = Module._py_version_major();\n /* @ts-ignore */\n const pyminor = Module._py_version_minor();\n\n Module.FS.mkdirTree(\"/lib\");\n Module.FS.mkdirTree(`/lib/python${pymajor}.${pyminor}/site-packages`);\n\n Module.addRunDependency(\"install-stdlib\");\n\n stdlibPromise\n .then((stdlib: Uint8Array) => {\n Module.FS.writeFile(`/lib/python${pymajor}${pyminor}.zip`, stdlib);\n })\n .catch((e) => {\n console.error(\"Error occurred while installing the standard library:\");\n console.error(e);\n })\n .finally(() => {\n Module.removeRunDependency(\"install-stdlib\");\n });\n };\n}\n\n/**\n * Initialize the virtual file system, before loading Python interpreter.\n * @private\n */\nfunction getFileSystemInitializationFuncs(config: ConfigType): PreRunFunc[] {\n let stdLibURL;\n if (config.stdLibURL != undefined) {\n stdLibURL = config.stdLibURL;\n } else {\n stdLibURL = config.indexURL + \"python_stdlib.zip\";\n }\n\n return [\n installStdlib(stdLibURL),\n createHomeDirectory(config.env.HOME),\n setEnvironment(config.env),\n mountLocalDirectories(config._node_mounts),\n initializeNativeFS,\n ];\n}\n\nfunction getInstantiateWasmFunc(\n indexURL: string,\n): EmscriptenSettings[\"instantiateWasm\"] {\n if (SOURCEMAP) {\n // According to the docs:\n //\n // \"Sanitizers or source map is currently not supported if overriding\n // WebAssembly instantiation with Module.instantiateWasm.\"\n // https://emscripten.org/docs/api_reference/module.html?highlight=instantiatewasm#Module.instantiateWasm\n //\n // I haven't checked if this is actually a problem in practice.\n return;\n }\n const { binary, response } = getBinaryResponse(indexURL + \"pyodide.asm.wasm\");\n return function (\n imports: { [key: string]: any },\n successCallback: (\n instance: WebAssembly.Instance,\n module: WebAssembly.Module,\n ) => void,\n ) {\n (async function () {\n try {\n let res: WebAssembly.WebAssemblyInstantiatedSource;\n if (response) {\n res = await WebAssembly.instantiateStreaming(response, imports);\n } else {\n res = await WebAssembly.instantiate(await binary, imports);\n }\n const { instance, module } = res;\n // When overriding instantiateWasm, in asan builds, we also need\n // to take care of creating the WasmOffsetConverter\n // @ts-ignore\n if (typeof WasmOffsetConverter !== \"undefined\") {\n // @ts-ignore\n wasmOffsetConverter = new WasmOffsetConverter(wasmBinary, module);\n }\n successCallback(instance, module);\n } catch (e) {\n console.warn(\"wasm instantiation failed!\");\n console.warn(e);\n }\n })();\n\n return {}; // Compiling asynchronously, no exports.\n };\n}\n", "/**\n *\n * The Pyodide version.\n *\n * The version here is a Python version, following :pep:`440`. This is different\n * from the version in ``package.json`` which follows the node package manager\n * version convention.\n */\nexport const version: string = \"0.26.2\";\n", "/**\n * The main bootstrap code for loading pyodide.\n */\nimport {\n calculateDirname,\n loadScript,\n initNodeModules,\n resolvePath,\n loadLockFile,\n} from \"./compat\";\n\nimport { createSettings } from \"./emscripten-settings\";\nimport { version } from \"./version\";\n\nimport type { PyodideInterface } from \"./api.js\";\nimport type { TypedArray, Module } from \"./types\";\nimport type { EmscriptenSettings } from \"./emscripten-settings\";\nimport type { PackageData } from \"./load-package\";\nimport { SnapshotConfig } from \"./snapshot\";\nexport type { PyodideInterface, TypedArray };\n\nexport { version, type PackageData };\n\ndeclare function _createPyodideModule(\n settings: EmscriptenSettings,\n): Promise<Module>;\n\n/**\n * See documentation for loadPyodide.\n * @hidden\n */\nexport type ConfigType = {\n indexURL: string;\n packageCacheDir: string;\n lockFileURL: string;\n fullStdLib?: boolean;\n stdLibURL?: string;\n stdin?: () => string;\n stdout?: (msg: string) => void;\n stderr?: (msg: string) => void;\n jsglobals?: object;\n args: string[];\n _node_mounts: string[];\n env: { [key: string]: string };\n packages: string[];\n _makeSnapshot: boolean;\n enableRunUntilComplete: boolean;\n checkAPIVersion: boolean;\n};\n\n/**\n * Load the main Pyodide wasm module and initialize it.\n *\n * @returns The :ref:`js-api-pyodide` module.\n * @memberof globalThis\n * @async\n * @example\n * async function main() {\n * const pyodide = await loadPyodide({\n * fullStdLib: true,\n * stdout: (msg) => console.log(`Pyodide: ${msg}`),\n * });\n * console.log(\"Loaded Pyodide\");\n * }\n * main();\n */\nexport async function loadPyodide(\n options: {\n /**\n * The URL from which Pyodide will load the main Pyodide runtime and\n * packages. It is recommended that you leave this unchanged, providing an\n * incorrect value can cause broken behavior.\n *\n * Default: The url that Pyodide is loaded from with the file name\n * (``pyodide.js`` or ``pyodide.mjs``) removed.\n */\n indexURL?: string;\n\n /**\n * The file path where packages will be cached in node. If a package\n * exists in ``packageCacheDir`` it is loaded from there, otherwise it is\n * downloaded from the JsDelivr CDN and then cached into ``packageCacheDir``.\n * Only applies when running in node; ignored in browsers.\n *\n * Default: same as indexURL\n */\n packageCacheDir?: string;\n\n /**\n * The URL from which Pyodide will load the Pyodide ``pyodide-lock.json`` lock\n * file. You can produce custom lock files with :py:func:`micropip.freeze`.\n * Default: ```${indexURL}/pyodide-lock.json```\n */\n lockFileURL?: string;\n /**\n * Load the full Python standard library. Setting this to false excludes\n * unvendored modules from the standard library.\n * Default: ``false``\n */\n fullStdLib?: boolean;\n /**\n * The URL from which to load the standard library ``python_stdlib.zip``\n * file. This URL includes the most of the Python standard library. Some\n * stdlib modules were unvendored, and can be loaded separately\n * with ``fullStdLib: true`` option or by their package name.\n * Default: ```${indexURL}/python_stdlib.zip```\n */\n stdLibURL?: string;\n /**\n * Override the standard input callback. Should ask the user for one line of\n * input. The :js:func:`pyodide.setStdin` function is more flexible and\n * should be preferred.\n */\n stdin?: () => string;\n /**\n * Override the standard output callback. The :js:func:`pyodide.setStdout`\n * function is more flexible and should be preferred in most cases, but\n * depending on the ``args`` passed to ``loadPyodide``, Pyodide may write to\n * stdout on startup, which can only be controlled by passing a custom\n * ``stdout`` function.\n */\n stdout?: (msg: string) => void;\n /**\n * Override the standard error output callback. The\n * :js:func:`pyodide.setStderr` function is more flexible and should be\n * preferred in most cases, but depending on the ``args`` passed to\n * ``loadPyodide``, Pyodide may write to stdout on startup, which can only\n * be controlled by passing a custom ``stdout`` function.\n */\n stderr?: (msg: string) => void;\n /**\n * The object that Pyodide will use for the ``js`` module.\n * Default: ``globalThis``\n */\n jsglobals?: object;\n /**\n * Command line arguments to pass to Python on startup. See `Python command\n * line interface options\n * <https://docs.python.org/3.10/using/cmdline.html#interface-options>`_ for\n * more details. Default: ``[]``\n */\n args?: string[];\n /**\n * Environment variables to pass to Python. This can be accessed inside of\n * Python at runtime via :py:data:`os.environ`. Certain environment variables change\n * the way that Python loads:\n * https://docs.python.org/3.10/using/cmdline.html#environment-variables\n * Default: ``{}``.\n * If ``env.HOME`` is undefined, it will be set to a default value of\n * ``\"/home/pyodide\"``\n */\n env?: { [key: string]: string };\n /**\n * A list of packages to load as Pyodide is initializing.\n *\n * This is the same as loading the packages with\n * :js:func:`pyodide.loadPackage` after Pyodide is loaded except using the\n * ``packages`` option is more efficient because the packages are downloaded\n * while Pyodide bootstraps itself.\n */\n packages?: string[];\n /**\n * Opt into the old behavior where :js:func:`PyProxy.toString() <pyodide.ffi.PyProxy.toString>`\n * calls :py:func:`repr` and not :py:class:`str() <str>`.\n * @deprecated\n */\n pyproxyToStringRepr?: boolean;\n /**\n * Make loop.run_until_complete() function correctly using stack switching\n */\n enableRunUntilComplete?: boolean;\n /**\n * If true (default), throw an error if the version of Pyodide core does not\n * match the version of the Pyodide js package.\n */\n checkAPIVersion?: boolean;\n /**\n * Used by the cli runner. If we want to detect a virtual environment from\n * the host file system, it needs to be visible from when `main()` is\n * called. The directories in this list will be mounted at the same address\n * into the Emscripten file system so that virtual environments work in the\n * cli runner.\n * @ignore\n */\n _node_mounts?: string[];\n /**\n * @ignore\n */\n _makeSnapshot?: boolean;\n /**\n * @ignore\n */\n _loadSnapshot?:\n | Uint8Array\n | ArrayBuffer\n | PromiseLike<Uint8Array | ArrayBuffer>;\n } = {},\n): Promise<PyodideInterface> {\n await initNodeModules();\n let indexURL = options.indexURL || (await calculateDirname());\n indexURL = resolvePath(indexURL); // A relative indexURL causes havoc.\n if (!indexURL.endsWith(\"/\")) {\n indexURL += \"/\";\n }\n options.indexURL = indexURL;\n\n const default_config = {\n fullStdLib: false,\n jsglobals: globalThis,\n stdin: globalThis.prompt ? globalThis.prompt : undefined,\n lockFileURL: indexURL + \"pyodide-lock.json\",\n args: [],\n _node_mounts: [],\n env: {},\n packageCacheDir: indexURL,\n packages: [],\n enableRunUntilComplete: false,\n checkAPIVersion: true,\n };\n const config = Object.assign(default_config, options) as ConfigType;\n config.env.HOME ??= \"/home/pyodide\";\n /**\n * `PyErr_Print()` will call `exit()` if the exception is a `SystemError`.\n * This shuts down the Python interpreter, which is a change in behavior from\n * what happened before. In order to avoid this, we set the `inspect` config\n * parameter which prevents `PyErr_Print()` from calling `exit()`. Except in\n * the cli runner, we actually do want to exit. So set default to true and in\n * cli runner we explicitly set it to false.\n */\n config.env.PYTHONINSPECT ??= \"1\";\n const emscriptenSettings = createSettings(config);\n const API = emscriptenSettings.API;\n API.lockFilePromise = loadLockFile(config.lockFileURL);\n\n // If the pyodide.asm.js script has been imported, we can skip the dynamic import\n // Users can then do a static import of the script in environments where\n // dynamic importing is not allowed or not desirable, like module-type service workers\n if (typeof _createPyodideModule !== \"function\") {\n const scriptSrc = `${config.indexURL}pyodide.asm.js`;\n await loadScript(scriptSrc);\n }\n\n let snapshot: Uint8Array | undefined = undefined;\n if (options._loadSnapshot) {\n const snp = await options._loadSnapshot;\n if (ArrayBuffer.isView(snp)) {\n snapshot = snp;\n } else {\n snapshot = new Uint8Array(snp);\n }\n emscriptenSettings.noInitialRun = true;\n // @ts-ignore\n emscriptenSettings.INITIAL_MEMORY = snapshot.length;\n }\n\n // _createPyodideModule is specified in the Makefile by the linker flag:\n // `-s EXPORT_NAME=\"'_createPyodideModule'\"`\n const Module = await _createPyodideModule(emscriptenSettings);\n // Handle early exit\n if (emscriptenSettings.exited) {\n throw emscriptenSettings.exited.toThrow;\n }\n if (options.pyproxyToStringRepr) {\n API.setPyProxyToStringMethod(true);\n }\n\n if (API.version !== version && config.checkAPIVersion) {\n throw new Error(`\\\nPyodide version does not match: '${version}' <==> '${API.version}'. \\\nIf you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.\\\n`);\n }\n // Disable further loading of Emscripten file_packager stuff.\n Module.locateFile = (path: string) => {\n throw new Error(\"Didn't expect to load any more file_packager files!\");\n };\n\n let snapshotConfig: SnapshotConfig | undefined = undefined;\n if (snapshot) {\n snapshotConfig = API.restoreSnapshot(snapshot);\n }\n // runPython works starting after the call to finalizeBootstrap.\n const pyodide = API.finalizeBootstrap(snapshotConfig);\n API.sys.path.insert(0, API.config.env.HOME);\n\n if (!pyodide.version.includes(\"dev\")) {\n // Currently only used in Node to download packages the first time they are\n // loaded. But in other cases it's harmless.\n API.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${pyodide.version}/full/`);\n }\n API._pyodide.set_excepthook();\n await API.packageIndexReady;\n // I think we want this initializeStreams call to happen after\n // packageIndexReady? I don't remember why.\n API.initializeStreams(config.stdin, config.stdout, config.stderr);\n return pyodide;\n}\n"],
5
+ "mappings": "wUAIA,SAASA,EAAUC,EAAG,CACpB,MAAO,CAAC,MAAM,WAAWA,CAAC,CAAC,GAAK,SAASA,CAAC,CAC5C,CAFSC,EAAAF,EAAA,aAIT,SAASG,EAAYC,EAAK,CACxB,OAAOA,EAAI,OAAO,CAAC,EAAE,YAAY,EAAIA,EAAI,UAAU,CAAC,CACtD,CAFSF,EAAAC,EAAA,eAIT,SAASE,EAAQC,EAAG,CAClB,OAAO,UAAY,CACjB,OAAO,KAAKA,CAAC,CACf,CACF,CAJSJ,EAAAG,EAAA,WAMT,IAAIE,EAAe,CAAC,gBAAiB,SAAU,WAAY,YAAY,EACnEC,EAAe,CAAC,eAAgB,YAAY,EAC5CC,EAAc,CAAC,WAAY,eAAgB,QAAQ,EACnDC,GAAa,CAAC,MAAM,EACpBC,GAAc,CAAC,YAAY,EAE3BC,EAAQL,EAAa,OACvBC,EACAC,EACAC,GACAC,EACF,EAoEA,SAASE,EAAWC,EAAK,CACvB,GAAKA,EACL,QAASC,EAAI,EAAGA,EAAIH,EAAM,OAAQG,IAC5BD,EAAIF,EAAMG,CAAC,CAAC,IAAM,QACpB,KAAK,MAAQZ,EAAYS,EAAMG,CAAC,CAAC,CAAC,EAAED,EAAIF,EAAMG,CAAC,CAAC,CAAC,CAGvD,CAPSb,EAAAW,EAAA,cASTA,EAAW,UAAY,CACrB,QAAS,UAAY,CACnB,OAAO,KAA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AMhB,EAAQ,cACtB,YAAY,OAAOgB,CAAG,EACxBD,EAAWC,EAEXD,EAAW,IAAI,WAAWC,CAAG,EAE/BP,EAAmB,aAAe,GAElCA,EAAmB,eAAiBM,EAAS,OAK/C,IAAME,EAAS,MAAM,qBAAqBR,CAAkB,EAE5D,GAAIA,EAAmB,OACrB,MAAMA,EAAmB,OAAO,QAMlC,GAJIT,EAAQ,qBACVW,EAAI,yBAAyB,EAAI,EAG/BA,EAAI,UAAYO,GAAWV,EAAO,gBACpC,MAAM,IAAI,MAAM,oCACeU,YAAkBP,EAAI,0HAExD,EAGCM,EAAO,WAAcE,GAAiB,CACpC,MAAM,IAAI,MAAM,qDAAqD,CACvE,EAEA,IAAIC,EACAL,IACFK,EAAiBT,EAAI,gBAAgBI,CAAQ,GAG/C,IAAMM,EAAUV,EAAI,kBAAkBS,CAAc,EACpD,OAAAT,EAAI,IAAI,KAAK,OAAO,EAAGA,EAAI,OAAO,IAAI,IAAI,EAErCU,EAAQ,QAAQ,SAAS,KAAK,GAGjCV,EAAI,UAAU,qCAAqCU,EAAQ,eAAe,EAE5EV,EAAI,SAAS,eAAe,EAC5B,MAAMA,EAAI,kBAGVA,EAAI,kBAAkBH,EAAO,MAAOA,EAAO,OAAQA,EAAO,MAAM,EACzDa,CACT,CAtOsBC,EAAAvB,GAAA",
6
+ "names": ["_isNumber", "n", "__name", "_capitalize", "str", "_getter", "p", "booleanProps", "numericProps", "stringProps", "arrayProps", "objectProps", "props", "StackFrame", "obj", "i", "v", "fileName", "lineNumber", "columnNumber", "functionName", "argsStartIndex", "argsEndIndex", "args", "locationString", "parts", "j", "k", "stackframe_default", "ErrorStackParser", "CHROME_IE_STACK_REGEXP", "SAFARI_NATIVE_CODE_REGEXP", "__name", "error", "urlLike", "regExp", "parts", "filtered", "line", "sanitizedLine", "location", "locationParts", "functionName", "fileName", "stackframe_default", "functionNameRegex", "matches", "errorStackParser", "error_stack_parser_default", "errorStackParser", "IN_NODE", "IN_NODE_COMMONJS", "__require", "IN_NODE_ESM", "IN_BUN", "IN_DENO", "IN_BROWSER", "IN_BROWSER_MAIN_THREAD", "IN_BROWSER_WEB_WORKER", "IN_SAFARI", "nodeUrlMod", "nodePath", "nodeVmMod", "nodeFSMod", "nodeFsPromisesMod", "initNodeModules", "IN_NODE", "pathSep", "__require", "fs", "crypto", "ws", "child_process", "node_modules", "mod", "__name", "node_resolvePath", "path", "base", "browser_resolvePath", "resolvePath", "node_getBinaryResponse", "_file_sub_resource_hash", "data", "browser_getBinaryResponse", "subResourceHash", "url", "getBinaryResponse", "loadBinaryFile", "file_sub_resource_hash", "response", "binary", "r", "loadScript", "IN_BROWSER_MAIN_THREAD", "IN_BROWSER_WEB_WORKER", "e", "nodeLoadScript", "loadLockFile", "lockFileURL", "package_string", "calculateDirname", "IN_NODE_COMMONJS", "err", "fileName", "error_stack_parser_default", "IN_NODE_ESM", "indexOfLastSlash", "initializeNativeFS", "module", "FS", "MEMFS", "PATH", "nativeFSAsync", "mount", "populate", "callback", "local", "remote", "src", "dst", "e", "entries", "isRealDir", "p", "__name", "toAbsolute", "root", "check", "path", "stat", "handles", "getFsHandles", "handle", "node", "entry", "file", "parentDirHandle", "writable", "total", "create", "key", "e2", "remove", "relPath", "dirHandle", "collect", "curDirHandle", "result", "relativePath", "createSettings", "config", "settings", "getFileSystemInitializationFuncs", "status", "toThrow", "path", "getInstantiateWasmFunc", "__name", "createHomeDirectory", "Module", "fallbackPath", "e", "setEnvironment", "env", "mountLocalDirectories", "mounts", "mount", "installStdlib", "stdlibURL", "stdlibPromise", "loadBinaryFile", "pymajor", "pyminor", "stdlib", "stdLibURL", "initializeNativeFS", "indexURL", "binary", "response", "getBinaryResponse", "imports", "successCallback", "res", "instance", "module", "version", "loadPyodide", "options", "_a", "_b", "initNodeModules", "indexURL", "calculateDirname", "resolvePath", "default_config", "config", "emscriptenSettings", "createSettings", "API", "loadLockFile", "scriptSrc", "loadScript", "snapshot", "snp", "Module", "version", "path", "snapshotConfig", "pyodide", "__name"]
7
7
  }
package/python_stdlib.zip CHANGED
Binary file