UNPKG

next

Version:

The React Framework

1 lines • 259 kB
(()=>{var __webpack_modules__={234:(e,t,r)=>{"use strict";e.exports=t;t.mockS3Http=r(6476).get_mockS3Http();t.mockS3Http("on");const a=t.mockS3Http("get");const s=r(7147);const o=r(1017);const u=r(6444);const c=r(7081);c.disableProgress();const f=r(251);const d=r(2361).EventEmitter;const p=r(3837).inherits;const h=["clean","install","reinstall","build","rebuild","package","testpackage","publish","unpublish","info","testbinary","reveal","configure"];const v={};c.heading="node-pre-gyp";if(a){c.warn(`mocking s3 to ${process.env.node_pre_gyp_mock_s3}`)}Object.defineProperty(t,"find",{get:function(){return r(846).find},enumerable:true});function Run({package_json_path:e="./package.json",argv:t}){this.package_json_path=e;this.commands={};const r=this;h.forEach((e=>{r.commands[e]=function(t,a){c.verbose("command",e,t);return require("./"+e)(r,t,a)}}));this.parseArgv(t);this.binaryHostSet=false}p(Run,d);t.Run=Run;const g=Run.prototype;g.package=r(7399);g.configDefs={help:Boolean,arch:String,debug:Boolean,directory:String,proxy:String,loglevel:String};g.shorthands={release:"--no-debug",C:"--directory",debug:"--debug",j:"--jobs",silent:"--loglevel=silent",silly:"--loglevel=silly",verbose:"--loglevel=verbose"};g.aliases=v;g.parseArgv=function parseOpts(e){this.opts=u(this.configDefs,this.shorthands,e);this.argv=this.opts.argv.remain.slice();const t=this.todo=[];e=this.argv.map((e=>{if(e in this.aliases){e=this.aliases[e]}return e}));e.slice().forEach((r=>{if(r in this.commands){const a=e.splice(0,e.indexOf(r));e.shift();if(t.length>0){t[t.length-1].args=a}t.push({name:r,args:[]})}}));if(t.length>0){t[t.length-1].args=e.splice(0)}let r=this.package_json_path;if(this.opts.directory){r=o.join(this.opts.directory,r)}this.package_json=JSON.parse(s.readFileSync(r));this.todo=f.expand_commands(this.package_json,this.opts,t);const a="npm_config_";Object.keys(process.env).forEach((e=>{if(e.indexOf(a)!==0)return;const t=process.env[e];if(e===a+"loglevel"){c.level=t}else{e=e.substring(a.length);if(e==="argv"){if(this.opts.argv&&this.opts.argv.remain&&this.opts.argv.remain.length){}else{this.opts[e]=t}}else{this.opts[e]=t}}}));if(this.opts.loglevel){c.level=this.opts.loglevel}c.resume()};g.setBinaryHostProperty=function(e){if(this.binaryHostSet){return this.package_json.binary.host}const t=this.package_json;if(!t||!t.binary||t.binary.host){return""}if(!t.binary.staging_host||!t.binary.production_host){return""}let r="production_host";if(e==="publish"){r="staging_host"}const a=process.env.node_pre_gyp_s3_host;if(a==="staging"||a==="production"){r=`${a}_host`}else if(this.opts["s3_host"]==="staging"||this.opts["s3_host"]==="production"){r=`${this.opts["s3_host"]}_host`}else if(this.opts["s3_host"]||a){throw new Error(`invalid s3_host ${this.opts["s3_host"]||a}`)}t.binary.host=t.binary[r];this.binaryHostSet=true;return t.binary.host};g.usage=function usage(){const e=[""," Usage: node-pre-gyp <command> [options]",""," where <command> is one of:",h.map((e=>" - "+e+" - "+require("./"+e).usage)).join("\n"),"","node-pre-gyp@"+this.version+" "+o.resolve(__dirname,".."),"node@"+process.versions.node].join("\n");return e};Object.defineProperty(g,"version",{get:function(){return this.package.version},enumerable:true})},846:(e,t,r)=>{"use strict";const a=r(234);const s=r(2998);const o=r(251);const u=r(7147).existsSync||r(1017).existsSync;const c=r(1017);e.exports=t;t.usage="Finds the require path for the node-pre-gyp installed module";t.validate=function(e,t){s.validate_config(e,t)};t.find=function(e,t){if(!u(e)){throw new Error(e+"does not exist")}const r=new a.Run({package_json_path:e,argv:process.argv});r.setBinaryHostProperty();const f=r.package_json;s.validate_config(f,t);let d;if(o.get_napi_build_versions(f,t)){d=o.get_best_napi_build_version(f,t)}t=t||{};if(!t.module_root)t.module_root=c.dirname(e);const p=s.evaluate(f,t,d);return p.module}},251:(e,t,r)=>{"use strict";const a=r(7147);e.exports=t;const s=process.version.substr(1).replace(/-.*$/,"").split(".").map((e=>+e));const o=["build","clean","configure","package","publish","reveal","testbinary","testpackage","unpublish"];const u="napi_build_version=";e.exports.get_napi_version=function(){let e=process.versions.napi;if(!e){if(s[0]===9&&s[1]>=3)e=2;else if(s[0]===8)e=1}return e};e.exports.get_napi_version_as_string=function(t){const r=e.exports.get_napi_version(t);return r?""+r:""};e.exports.validate_package_json=function(t,r){const a=t.binary;const s=pathOK(a.module_path);const o=pathOK(a.remote_path);const u=pathOK(a.package_name);const c=e.exports.get_napi_build_versions(t,r,true);const f=e.exports.get_napi_build_versions_raw(t);if(c){c.forEach((e=>{if(!(parseInt(e,10)===e&&e>0)){throw new Error("All values specified in napi_versions must be positive integers.")}}))}if(c&&(!s||!o&&!u)){throw new Error("When napi_versions is specified; module_path and either remote_path or "+"package_name must contain the substitution string '{napi_build_version}`.")}if((s||o||u)&&!f){throw new Error("When the substitution string '{napi_build_version}` is specified in "+"module_path, remote_path, or package_name; napi_versions must also be specified.")}if(c&&!e.exports.get_best_napi_build_version(t,r)&&e.exports.build_napi_only(t)){throw new Error("The Node-API version of this Node instance is "+e.exports.get_napi_version(r?r.target:undefined)+". "+"This module supports Node-API version(s) "+e.exports.get_napi_build_versions_raw(t)+". "+"This Node instance cannot run this module.")}if(f&&!c&&e.exports.build_napi_only(t)){throw new Error("The Node-API version of this Node instance is "+e.exports.get_napi_version(r?r.target:undefined)+". "+"This module supports Node-API version(s) "+e.exports.get_napi_build_versions_raw(t)+". "+"This Node instance cannot run this module.")}};function pathOK(e){return e&&(e.indexOf("{napi_build_version}")!==-1||e.indexOf("{node_napi_label}")!==-1)}e.exports.expand_commands=function(t,r,a){const s=[];const c=e.exports.get_napi_build_versions(t,r);a.forEach((a=>{if(c&&a.name==="install"){const o=e.exports.get_best_napi_build_version(t,r);const c=o?[u+o]:[];s.push({name:a.name,args:c})}else if(c&&o.indexOf(a.name)!==-1){c.forEach((e=>{const t=a.args.slice();t.push(u+e);s.push({name:a.name,args:t})}))}else{s.push(a)}}));return s};e.exports.get_napi_build_versions=function(t,a,s){const o=r(7081);let u=[];const c=e.exports.get_napi_version(a?a.target:undefined);if(t.binary&&t.binary.napi_versions){t.binary.napi_versions.forEach((e=>{const t=u.indexOf(e)!==-1;if(!t&&c&&e<=c){u.push(e)}else if(s&&!t&&c){o.info("This Node instance does not support builds for Node-API version",e)}}))}if(a&&a["build-latest-napi-version-only"]){let e=0;u.forEach((t=>{if(t>e)e=t}));u=e?[e]:[]}return u.length?u:undefined};e.exports.get_napi_build_versions_raw=function(e){const t=[];if(e.binary&&e.binary.napi_versions){e.binary.napi_versions.forEach((e=>{if(t.indexOf(e)===-1){t.push(e)}}))}return t.length?t:undefined};e.exports.get_command_arg=function(e){return u+e};e.exports.get_napi_build_version_from_command_args=function(e){for(let t=0;t<e.length;t++){const r=e[t];if(r.indexOf(u)===0){return parseInt(r.substr(u.length),10)}}return undefined};e.exports.swap_build_dir_out=function(t){if(t){const s=r(93);s.sync(e.exports.get_build_dir(t));a.renameSync("build",e.exports.get_build_dir(t))}};e.exports.swap_build_dir_in=function(t){if(t){const s=r(93);s.sync("build");a.renameSync(e.exports.get_build_dir(t),"build")}};e.exports.get_build_dir=function(e){return"build-tmp-napi-v"+e};e.exports.get_best_napi_build_version=function(t,r){let a=0;const s=e.exports.get_napi_build_versions(t,r);if(s){const t=e.exports.get_napi_version(r?r.target:undefined);s.forEach((e=>{if(e>a&&e<=t){a=e}}))}return a===0?undefined:a};e.exports.build_napi_only=function(e){return e.binary&&e.binary.package_name&&e.binary.package_name.indexOf("{node_napi_label}")===-1}},6476:(e,t,r)=>{"use strict";e.exports=t;const a=r(7310);const s=r(7147);const o=r(1017);e.exports.detect=function(e,t){const r=e.hosted_path;const s=a.parse(r);t.prefix=!s.pathname||s.pathname==="/"?"":s.pathname.replace("/","");if(e.bucket&&e.region){t.bucket=e.bucket;t.region=e.region;t.endpoint=e.host;t.s3ForcePathStyle=e.s3ForcePathStyle}else{const e=s.hostname.split(".s3");const r=e[0];if(!r){return}if(!t.bucket){t.bucket=r}if(!t.region){const r=e[1].slice(1).split(".")[0];if(r==="amazonaws"){t.region="us-east-1"}else{t.region=r}}}};e.exports.get_s3=function(e){if(process.env.node_pre_gyp_mock_s3){const e=r(3458);const t=r(2037);e.config.basePath=`${t.tmpdir()}/mock`;const a=e.S3();const wcb=e=>(t,...r)=>{if(t&&t.code==="ENOENT"){t.code="NotFound"}return e(t,...r)};return{listObjects(e,t){return a.listObjects(e,wcb(t))},headObject(e,t){return a.headObject(e,wcb(t))},deleteObject(e,t){return a.deleteObject(e,wcb(t))},putObject(e,t){return a.putObject(e,wcb(t))}}}const t=r(1889);t.config.update(e);const a=new t.S3;return{listObjects(e,t){return a.listObjects(e,t)},headObject(e,t){return a.headObject(e,t)},deleteObject(e,t){return a.deleteObject(e,t)},putObject(e,t){return a.putObject(e,t)}}};e.exports.get_mockS3Http=function(){let e=false;if(!process.env.node_pre_gyp_mock_s3){return()=>e}const t=r(9101);const a="https://mapbox-node-pre-gyp-public-testing-bucket.s3.us-east-1.amazonaws.com";const u=process.env.node_pre_gyp_mock_s3+"/mapbox-node-pre-gyp-public-testing-bucket";const mock_http=()=>{function get(e,t){const r=o.join(u,e.replace("%2B","+"));try{s.accessSync(r,s.constants.R_OK)}catch(e){return[404,"not found\n"]}return[200,s.createReadStream(r)]}return t(a).persist().get((()=>e)).reply(get)};mock_http(t,a,u);const mockS3Http=t=>{const r=e;if(t==="off"){e=false}else if(t==="on"){e=true}else if(t!=="get"){throw new Error(`illegal action for setMockHttp ${t}`)}return r};return mockS3Http}},2998:(e,t,r)=>{"use strict";e.exports=t;const a=r(1017);const s=r(7849);const o=r(7310);const u=r(5092);const c=r(251);let f;if(process.env.NODE_PRE_GYP_ABI_CROSSWALK){f=require(process.env.NODE_PRE_GYP_ABI_CROSSWALK)}else{f=r(9448)}const d={};Object.keys(f).forEach((e=>{const t=e.split(".")[0];if(!d[t]){d[t]=e}}));function get_electron_abi(e,t){if(!e){throw new Error("get_electron_abi requires valid runtime arg")}if(typeof t==="undefined"){throw new Error("Empty target version is not supported if electron is the target.")}const r=s.parse(t);return e+"-v"+r.major+"."+r.minor}e.exports.get_electron_abi=get_electron_abi;function get_node_webkit_abi(e,t){if(!e){throw new Error("get_node_webkit_abi requires valid runtime arg")}if(typeof t==="undefined"){throw new Error("Empty target version is not supported if node-webkit is the target.")}return e+"-v"+t}e.exports.get_node_webkit_abi=get_node_webkit_abi;function get_node_abi(e,t){if(!e){throw new Error("get_node_abi requires valid runtime arg")}if(!t){throw new Error("get_node_abi requires valid process.versions object")}const r=s.parse(t.node);if(r.major===0&&r.minor%2){return e+"-v"+t.node}else{return t.modules?e+"-v"+ +t.modules:"v8-"+t.v8.split(".").slice(0,2).join(".")}}e.exports.get_node_abi=get_node_abi;function get_runtime_abi(e,t){if(!e){throw new Error("get_runtime_abi requires valid runtime arg")}if(e==="node-webkit"){return get_node_webkit_abi(e,t||process.versions["node-webkit"])}else if(e==="electron"){return get_electron_abi(e,t||process.versions.electron)}else{if(e!=="node"){throw new Error("Unknown Runtime: '"+e+"'")}if(!t){return get_node_abi(e,process.versions)}else{let r;if(f[t]){r=f[t]}else{const e=t.split(".").map((e=>+e));if(e.length!==3){throw new Error("Unknown target version: "+t)}const a=e[0];let s=e[1];let o=e[2];if(a===1){while(true){if(s>0)--s;if(o>0)--o;const e=""+a+"."+s+"."+o;if(f[e]){r=f[e];console.log("Warning: node-pre-gyp could not find exact match for "+t);console.log("Warning: but node-pre-gyp successfully choose "+e+" as ABI compatible target");break}if(s===0&&o===0){break}}}else if(a>=2){if(d[a]){r=f[d[a]];console.log("Warning: node-pre-gyp could not find exact match for "+t);console.log("Warning: but node-pre-gyp successfully choose "+d[a]+" as ABI compatible target")}}else if(a===0){if(e[1]%2===0){while(--o>0){const e=""+a+"."+s+"."+o;if(f[e]){r=f[e];console.log("Warning: node-pre-gyp could not find exact match for "+t);console.log("Warning: but node-pre-gyp successfully choose "+e+" as ABI compatible target");break}}}}}if(!r){throw new Error("Unsupported target version: "+t)}const a={node:t,v8:r.v8+".0",modules:r.node_abi>1?r.node_abi:undefined};return get_node_abi(e,a)}}}e.exports.get_runtime_abi=get_runtime_abi;const p=["module_name","module_path","host"];function validate_config(e,t){const r=e.name+" package.json is not node-pre-gyp ready:\n";const a=[];if(!e.main){a.push("main")}if(!e.version){a.push("version")}if(!e.name){a.push("name")}if(!e.binary){a.push("binary")}const s=e.binary;if(s){p.forEach((e=>{if(!s[e]||typeof s[e]!=="string"){a.push("binary."+e)}}))}if(a.length>=1){throw new Error(r+"package.json must declare these properties: \n"+a.join("\n"))}if(s){const e=o.parse(s.host).protocol;if(e==="http:"){throw new Error("'host' protocol ("+e+") is invalid - only 'https:' is accepted")}}c.validate_package_json(e,t)}e.exports.validate_config=validate_config;function eval_template(e,t){Object.keys(t).forEach((r=>{const a="{"+r+"}";while(e.indexOf(a)>-1){e=e.replace(a,t[r])}}));return e}function fix_slashes(e){if(e.slice(-1)!=="/"){return e+"/"}return e}function drop_double_slashes(e){return e.replace(/\/\//g,"/")}function get_process_runtime(e){let t="node";if(e["node-webkit"]){t="node-webkit"}else if(e.electron){t="electron"}return t}e.exports.get_process_runtime=get_process_runtime;const h="{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz";const v="";e.exports.evaluate=function(e,t,r){t=t||{};validate_config(e,t);const f=e.version;const d=s.parse(f);const p=t.runtime||get_process_runtime(process.versions);const g={name:e.name,configuration:t.debug?"Debug":"Release",debug:t.debug,module_name:e.binary.module_name,version:d.version,prerelease:d.prerelease.length?d.prerelease.join("."):"",build:d.build.length?d.build.join("."):"",major:d.major,minor:d.minor,patch:d.patch,runtime:p,node_abi:get_runtime_abi(p,t.target),node_abi_napi:c.get_napi_version(t.target)?"napi":get_runtime_abi(p,t.target),napi_version:c.get_napi_version(t.target),napi_build_version:r||"",node_napi_label:r?"napi-v"+r:get_runtime_abi(p,t.target),target:t.target||"",platform:t.target_platform||process.platform,target_platform:t.target_platform||process.platform,arch:t.target_arch||process.arch,target_arch:t.target_arch||process.arch,libc:t.target_libc||u.family||"unknown",module_main:e.main,toolset:t.toolset||"",bucket:e.binary.bucket,region:e.binary.region,s3ForcePathStyle:e.binary.s3ForcePathStyle||false};const y=g.module_name.replace("-","_");const m=process.env["npm_config_"+y+"_binary_host_mirror"]||e.binary.host;g.host=fix_slashes(eval_template(m,g));g.module_path=eval_template(e.binary.module_path,g);if(t.module_root){g.module_path=a.join(t.module_root,g.module_path)}else{g.module_path=a.resolve(g.module_path)}g.module=a.join(g.module_path,g.module_name+".node");g.remote_path=e.binary.remote_path?drop_double_slashes(fix_slashes(eval_template(e.binary.remote_path,g))):v;const _=e.binary.package_name?e.binary.package_name:h;g.package_name=eval_template(_,g);g.staged_tarball=a.join("build/stage",g.remote_path,g.package_name);g.hosted_path=o.resolve(g.host,g.remote_path);g.hosted_tarball=o.resolve(g.hosted_path,g.package_name);return g}},9046:function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const s=a(r(1017));const o=r(8781);const u=r(3191);const c=r(1988);const f=a(r(8942));const d=r(74);const p=a(r(3535));const h=r(4240);const v=r(2178);const g=r(9325);const y=a(r(1989));const m=a(r(712));const _=a(r(8526));const w=a(r(234));const x=r(7310);const E=r(4924).asyncWalk;const S=c.Parser.extend();const R=a(r(2037));const k=r(1914);const A=a(r(5035));const O={cwd:()=>K,env:{NODE_ENV:u.UNKNOWN,[u.UNKNOWN]:true},[u.UNKNOWN]:true};const C=Symbol();const T=Symbol();const j=Symbol();const L=Symbol();const N=Symbol();const I=Symbol();const P=Symbol();const D=Symbol();const M=Symbol();const F={access:I,accessSync:I,createReadStream:I,exists:I,existsSync:I,fstat:I,fstatSync:I,lstat:I,lstatSync:I,open:I,readdir:P,readdirSync:P,readFile:I,readFileSync:I,stat:I,statSync:I};const W=Object.assign(Object.assign({},F),{pathExists:I,pathExistsSync:I,readJson:I,readJSON:I,readJsonSync:I,readJSONSync:I});const B=Object.assign(Object.create(null),{bindings:{default:D},express:{default:function(){return{[u.UNKNOWN]:true,set:C,engine:T}}},fs:Object.assign({default:F},F),"fs-extra":Object.assign({default:W},W),"graceful-fs":Object.assign({default:F},F),process:Object.assign({default:O},O),path:{default:{}},os:Object.assign({default:R.default},R.default),"@mapbox/node-pre-gyp":Object.assign({default:w.default},w.default),"node-pre-gyp":v.pregyp,"node-pre-gyp/lib/pre-binding":v.pregyp,"node-pre-gyp/lib/pre-binding.js":v.pregyp,"node-gyp-build":{default:M},nbind:{init:j,default:{init:j}},"resolve-from":{default:A.default},"strong-globalize":{default:{SetRootDir:L},SetRootDir:L},pkginfo:{default:N}});const $={_interopRequireDefault:g.normalizeDefaultRequire,_interopRequireWildcard:g.normalizeWildcardRequire,__importDefault:g.normalizeDefaultRequire,__importStar:g.normalizeWildcardRequire,MONGOOSE_DRIVER_PATH:undefined,URL:x.URL,Object:{assign:Object.assign}};$.global=$.GLOBAL=$.globalThis=$;const U=Symbol();v.pregyp.find[U]=true;const H=B.path;Object.keys(s.default).forEach((e=>{const t=s.default[e];if(typeof t==="function"){const r=function mockPath(){return t.apply(mockPath,arguments)};r[U]=true;H[e]=H.default[e]=r}else{H[e]=H.default[e]=t}}));H.resolve=H.default.resolve=function(...e){return s.default.resolve.apply(this,[K,...e])};H.resolve[U]=true;const q=new Set([".h",".cmake",".c",".cpp"]);const G=new Set(["CHANGELOG.md","README.md","readme.md","changelog.md"]);let K;const z=/^\/[^\/]+|^[a-z]:[\\/][^\\/]+/i;function isAbsolutePathOrUrl(e){if(e instanceof x.URL)return e.protocol==="file:";if(typeof e==="string"){if(e.startsWith("file:")){try{new x.URL(e);return true}catch(e){return false}}return z.test(e)}return false}const V=Symbol();const Q=/([\/\\]\*\*[\/\\]\*)+/g;async function analyze(e,t,r){const a=new Set;const c=new Set;const g=new Set;const w=s.default.dirname(e);K=r.cwd;const R=h.getPackageBase(e);const emitAssetDirectory=e=>{if(!r.analysis.emitGlobs)return;const t=e.indexOf(u.WILDCARD);const o=t===-1?e.length:e.lastIndexOf(s.default.sep,t);const c=e.substring(0,o);const f=e.slice(o);const d=f.replace(u.wildcardRegEx,((e,t)=>f[t-1]===s.default.sep?"**/*":"*")).replace(Q,"/**/*")||"/**/*";if(r.ignoreFn(s.default.relative(r.base,c+d)))return;F=F.then((async()=>{if(r.log)console.log("Globbing "+c+d);const e=await new Promise(((e,t)=>p.default(c+d,{mark:true,ignore:c+"/**/node_modules/**/*"},((r,a)=>r?t(r):e(a)))));e.filter((e=>!q.has(s.default.extname(e))&&!G.has(s.default.basename(e))&&!e.endsWith("/"))).forEach((e=>a.add(e)))}))};let F=Promise.resolve();t=t.replace(/^#![^\n\r]*[\r\n]/,"");let W;let H=false;try{W=S.parse(t,{ecmaVersion:"latest",allowReturnOutsideFunction:true});H=false}catch(t){const a=t&&t.message&&t.message.includes("sourceType: module");if(!a){r.warnings.add(new Error(`Failed to parse ${e} as script:\n${t&&t.message}`))}}if(!W){try{W=S.parse(t,{ecmaVersion:"latest",sourceType:"module",allowAwaitOutsideFunction:true});H=true}catch(t){r.warnings.add(new Error(`Failed to parse ${e} as module:\n${t&&t.message}`));return{assets:a,deps:c,imports:g,isESM:false}}}const Y=x.pathToFileURL(e).href;const X=Object.assign(Object.create(null),{__dirname:{shadowDepth:0,value:{value:s.default.resolve(e,"..")}},__filename:{shadowDepth:0,value:{value:e}},process:{shadowDepth:0,value:{value:O}}});if(!H||r.mixedModules){X.require={shadowDepth:0,value:{value:{[u.FUNCTION](e){c.add(e);const t=B[e.startsWith("node:")?e.slice(5):e];return t.default},resolve(t){return m.default(t,e,r)}}}};X.require.value.value.resolve[U]=true}function setKnownBinding(e,t){if(e==="require")return;X[e]={shadowDepth:0,value:t}}function getKnownBinding(e){const t=X[e];if(t){if(t.shadowDepth===0){return t.value}}return undefined}function hasKnownBindingValue(e){const t=X[e];return t&&t.shadowDepth===0}if((H||r.mixedModules)&&isAst(W)){for(const e of W.body){if(e.type==="ImportDeclaration"){const t=String(e.source.value);c.add(t);const r=B[t.startsWith("node:")?t.slice(5):t];if(r){for(const t of e.specifiers){if(t.type==="ImportNamespaceSpecifier")setKnownBinding(t.local.name,{value:r});else if(t.type==="ImportDefaultSpecifier"&&"default"in r)setKnownBinding(t.local.name,{value:r.default});else if(t.type==="ImportSpecifier"&&t.imported.name in r)setKnownBinding(t.local.name,{value:r[t.imported.name]})}}}else if(e.type==="ExportNamedDeclaration"||e.type==="ExportAllDeclaration"){if(e.source)c.add(String(e.source.value))}}}async function computePureStaticValue(e,t=true){const r=Object.create(null);Object.keys($).forEach((e=>{r[e]={value:$[e]}}));Object.keys(X).forEach((e=>{r[e]=getKnownBinding(e)}));r["import.meta"]={url:Y};const a=await u.evaluate(e,r,t);return a}let Z;let J;let ee=false;function emitWildcardRequire(e){if(!r.analysis.emitGlobs||!e.startsWith("./")&&!e.startsWith("../"))return;e=s.default.resolve(w,e);const t=e.indexOf(u.WILDCARD);const o=t===-1?e.length:e.lastIndexOf(s.default.sep,t);const c=e.substring(0,o);const f=e.slice(o);let d=f.replace(u.wildcardRegEx,((e,t)=>f[t-1]===s.default.sep?"**/*":"*"))||"/**/*";if(!d.endsWith("*"))d+="?("+(r.ts?".ts|.tsx|":"")+".js|.json|.node)";if(r.ignoreFn(s.default.relative(r.base,c+d)))return;F=F.then((async()=>{if(r.log)console.log("Globbing "+c+d);const e=await new Promise(((e,t)=>p.default(c+d,{mark:true,ignore:c+"/**/node_modules/**/*"},((r,a)=>r?t(r):e(a)))));e.filter((e=>!q.has(s.default.extname(e))&&!G.has(s.default.basename(e))&&!e.endsWith("/"))).forEach((e=>a.add(e)))}))}async function processRequireArg(e,t=false){if(e.type==="ConditionalExpression"){await processRequireArg(e.consequent,t);await processRequireArg(e.alternate,t);return}if(e.type==="LogicalExpression"){await processRequireArg(e.left,t);await processRequireArg(e.right,t);return}let r=await computePureStaticValue(e,true);if(!r)return;if("value"in r&&typeof r.value==="string"){if(!r.wildcards)(t?g:c).add(r.value);else if(r.wildcards.length>=1)emitWildcardRequire(r.value)}else{if("then"in r&&typeof r.then==="string")(t?g:c).add(r.then);if("else"in r&&typeof r.else==="string")(t?g:c).add(r.else)}}let te=o.attachScopes(W,"scope");if(isAst(W)){k.handleWrappers(W);await y.default({id:e,ast:W,emitAsset:e=>a.add(e),emitAssetDirectory:emitAssetDirectory,job:r})}async function backtrack(e,t){if(!Z)throw new Error("Internal error: No staticChildNode for backtrack.");const r=await computePureStaticValue(e,true);if(r){if("value"in r&&typeof r.value!=="symbol"||"then"in r&&typeof r.then!=="symbol"&&typeof r.else!=="symbol"){J=r;Z=e;if(t)t.skip();return}}await emitStaticChildAsset()}await E(W,{async enter(t,o){var u;const p=t;const h=o;if(p.scope){te=p.scope;for(const e in p.scope.declarations){if(e in X)X[e].shadowDepth++}}if(Z)return;if(!h)return;if(p.type==="Identifier"){if(d.isIdentifierRead(p,h)&&r.analysis.computeFileReferences){let e;if(typeof(e=(u=getKnownBinding(p.name))===null||u===void 0?void 0:u.value)==="string"&&e.match(z)||e&&(typeof e==="function"||typeof e==="object")&&e[U]){J={value:typeof e==="string"?e:undefined};Z=p;await backtrack(h,this)}}}else if(r.analysis.computeFileReferences&&p.type==="MemberExpression"&&p.object.type==="MetaProperty"&&p.object.meta.name==="import"&&p.object.property.name==="meta"&&(p.property.computed?p.property.value:p.property.name)==="url"){J={value:Y};Z=p;await backtrack(h,this)}else if(p.type==="ImportExpression"){await processRequireArg(p.source,true);return}else if(p.type==="CallExpression"){if((!H||r.mixedModules)&&p.callee.type==="Identifier"&&p.arguments.length){if(p.callee.name==="require"&&X.require.shadowDepth===0){await processRequireArg(p.arguments[0]);return}}else if((!H||r.mixedModules)&&p.callee.type==="MemberExpression"&&p.callee.object.type==="Identifier"&&p.callee.object.name==="module"&&"module"in X===false&&p.callee.property.type==="Identifier"&&!p.callee.computed&&p.callee.property.name==="require"&&p.arguments.length){await processRequireArg(p.arguments[0]);return}const t=r.analysis.evaluatePureExpressions&&await computePureStaticValue(p.callee,false);if(t&&"value"in t&&typeof t.value==="function"&&t.value[U]&&r.analysis.computeFileReferences){J=await computePureStaticValue(p,true);if(J&&h){Z=p;await backtrack(h,this)}}else if(t&&"value"in t&&typeof t.value==="symbol"){switch(t.value){case V:if(p.arguments.length===1&&p.arguments[0].type==="Literal"&&p.callee.type==="Identifier"&&X.require.shadowDepth===0){await processRequireArg(p.arguments[0])}break;case D:if(p.arguments.length){const e=await computePureStaticValue(p.arguments[0],false);if(e&&"value"in e&&e.value){let t;if(typeof e.value==="object")t=e.value;else if(typeof e.value==="string")t={bindings:e.value};if(!t.path){t.path=true}t.module_root=R;let r;try{r=f.default(t)}catch(e){}if(r){J={value:r};Z=p;await emitStaticChildAsset()}}}break;case M:if(p.arguments.length===1&&p.arguments[0].type==="Identifier"&&p.arguments[0].name==="__dirname"&&X.__dirname.shadowDepth===0){let e;try{const t=A.default(w,"node-gyp-build");e=require(t).path(w)}catch(t){try{e=_.default.path(w)}catch(e){}}if(e){J={value:e};Z=p;await emitStaticChildAsset()}}break;case j:if(p.arguments.length){const e=await computePureStaticValue(p.arguments[0],false);if(e&&"value"in e&&(typeof e.value==="string"||typeof e.value==="undefined")){const t=v.nbind(e.value);if(t&&t.path){c.add(s.default.relative(w,t.path).replace(/\\/g,"/"));return this.skip()}}}break;case C:if(p.arguments.length===2&&p.arguments[0].type==="Literal"&&p.arguments[0].value==="view engine"&&!ee){await processRequireArg(p.arguments[1]);return this.skip()}break;case T:ee=true;break;case I:case P:if(p.arguments[0]&&r.analysis.computeFileReferences){J=await computePureStaticValue(p.arguments[0],true);if(J){Z=p.arguments[0];if(t.value===P&&p.arguments[0].type==="Identifier"&&p.arguments[0].name==="__dirname"){emitAssetDirectory(w)}else{await backtrack(h,this)}return this.skip()}}break;case L:if(p.arguments[0]){const e=await computePureStaticValue(p.arguments[0],false);if(e&&"value"in e&&e.value)emitAssetDirectory(e.value+"/intl");return this.skip()}break;case N:let o=s.default.resolve(e,"../package.json");const u=s.default.resolve("/package.json");while(o!==u&&await r.stat(o)===null)o=s.default.resolve(o,"../../package.json");if(o!==u)a.add(o);break}}}else if(p.type==="VariableDeclaration"&&h&&!d.isVarLoop(h)&&r.analysis.evaluatePureExpressions){for(const e of p.declarations){if(!e.init)continue;const t=await computePureStaticValue(e.init,true);if(t){if(e.id.type==="Identifier"){setKnownBinding(e.id.name,t)}else if(e.id.type==="ObjectPattern"&&"value"in t){for(const r of e.id.properties){if(r.type!=="Property"||r.key.type!=="Identifier"||r.value.type!=="Identifier"||typeof t.value!=="object"||t.value===null||!(r.key.name in t.value))continue;setKnownBinding(r.value.name,{value:t.value[r.key.name]})}}if(!("value"in t)&&isAbsolutePathOrUrl(t.then)&&isAbsolutePathOrUrl(t.else)){J=t;Z=e.init;await emitStaticChildAsset()}}}}else if(p.type==="AssignmentExpression"&&h&&!d.isLoop(h)&&r.analysis.evaluatePureExpressions){if(!hasKnownBindingValue(p.left.name)){const e=await computePureStaticValue(p.right,false);if(e&&"value"in e){if(p.left.type==="Identifier"){setKnownBinding(p.left.name,e)}else if(p.left.type==="ObjectPattern"){for(const t of p.left.properties){if(t.type!=="Property"||t.key.type!=="Identifier"||t.value.type!=="Identifier"||typeof e.value!=="object"||e.value===null||!(t.key.name in e.value))continue;setKnownBinding(t.value.name,{value:e.value[t.key.name]})}}if(isAbsolutePathOrUrl(e.value)){J=e;Z=p.right;await emitStaticChildAsset()}}}}else if((!H||r.mixedModules)&&(p.type==="FunctionDeclaration"||p.type==="FunctionExpression"||p.type==="ArrowFunctionExpression")&&(p.arguments||p.params)[0]&&(p.arguments||p.params)[0].type==="Identifier"){let e;let t;if((p.type==="ArrowFunctionExpression"||p.type==="FunctionExpression")&&h&&h.type==="VariableDeclarator"&&h.id.type==="Identifier"){e=h.id;t=p.arguments||p.params}else if(p.id){e=p.id;t=p.arguments||p.params}if(e&&p.body.body){let r,a=false;for(let e=0;e<p.body.body.length;e++){if(p.body.body[e].type==="VariableDeclaration"&&!r){r=p.body.body[e].declarations.find((e=>e&&e.id&&e.id.type==="Identifier"&&e.init&&e.init.type==="CallExpression"&&e.init.callee.type==="Identifier"&&e.init.callee.name==="require"&&X.require.shadowDepth===0&&e.init.arguments[0]&&e.init.arguments[0].type==="Identifier"&&e.init.arguments[0].name===t[0].name))}if(r&&p.body.body[e].type==="ReturnStatement"&&p.body.body[e].argument&&p.body.body[e].argument.type==="Identifier"&&p.body.body[e].argument.name===r.id.name){a=true;break}}if(a)setKnownBinding(e.name,{value:V})}}},async leave(e,t){const r=e;const a=t;if(r.scope){if(te.parent){te=te.parent}for(const e in r.scope.declarations){if(e in X){if(X[e].shadowDepth>0)X[e].shadowDepth--;else delete X[e]}}}if(Z&&a)await backtrack(a,this)}});await F;return{assets:a,deps:c,imports:g,isESM:H};async function emitAssetPath(e){const t=e.indexOf(u.WILDCARD);const o=t===-1?e.length:e.lastIndexOf(s.default.sep,t);const c=e.substring(0,o);try{var f=await r.stat(c);if(f===null){throw new Error("file not found")}}catch(e){return}if(t!==-1&&f.isFile())return;if(f.isFile()){a.add(e)}else if(f.isDirectory()){if(validWildcard(e))emitAssetDirectory(e)}}function validWildcard(t){let a="";if(t.endsWith(s.default.sep))a=s.default.sep;else if(t.endsWith(s.default.sep+u.WILDCARD))a=s.default.sep+u.WILDCARD;else if(t.endsWith(u.WILDCARD))a=u.WILDCARD;if(t===w+a)return false;if(t===K+a)return false;if(t.endsWith(s.default.sep+"node_modules"+a))return false;if(w.startsWith(t.slice(0,t.length-a.length)+s.default.sep))return false;if(R){const a=e.substring(0,e.indexOf(s.default.sep+"node_modules"))+s.default.sep+"node_modules"+s.default.sep;if(!t.startsWith(a)){if(r.log)console.log("Skipping asset emission of "+t.replace(u.wildcardRegEx,"*")+" for "+e+" as it is outside the package base "+R);return false}}return true}function resolveAbsolutePathOrUrl(e){return e instanceof x.URL?x.fileURLToPath(e):e.startsWith("file:")?x.fileURLToPath(new x.URL(e)):s.default.resolve(e)}async function emitStaticChildAsset(){if(!J){return}if("value"in J&&isAbsolutePathOrUrl(J.value)){try{const e=resolveAbsolutePathOrUrl(J.value);await emitAssetPath(e)}catch(e){}}else if("then"in J&&"else"in J&&isAbsolutePathOrUrl(J.then)&&isAbsolutePathOrUrl(J.else)){let e;try{e=resolveAbsolutePathOrUrl(J.then)}catch(e){}let t;try{t=resolveAbsolutePathOrUrl(J.else)}catch(e){}if(e)await emitAssetPath(e);if(t)await emitAssetPath(t)}else if(Z&&Z.type==="ArrayExpression"&&"value"in J&&J.value instanceof Array){for(const e of J.value){try{const t=resolveAbsolutePathOrUrl(e);await emitAssetPath(t)}catch(e){}}}Z=J=undefined}}t["default"]=analyze;function isAst(e){return"body"in e}},9736:function(e,t,r){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){if(a===undefined)a=r;Object.defineProperty(e,a,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,a){if(a===undefined)a=r;e[a]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!t.hasOwnProperty(r))a(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(2784),t);var o=r(796);Object.defineProperty(t,"nodeFileTrace",{enumerable:true,get:function(){return o.nodeFileTrace}})},796:function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Job=t.nodeFileTrace=void 0;const s=r(1017);const o=a(r(1653));const u=a(r(9046));const c=a(r(712));const f=r(2540);const d=r(2791);const p=r(1017);const h=r(5749);const v=o.default.promises.readFile;const g=o.default.promises.readlink;const y=o.default.promises.stat;function inPath(e,t){const r=p.join(t,s.sep);return e.startsWith(r)&&e!==r}async function nodeFileTrace(e,t={}){const r=new Job(t);if(t.readFile)r.readFile=t.readFile;if(t.stat)r.stat=t.stat;if(t.readlink)r.readlink=t.readlink;if(t.resolve)r.resolve=t.resolve;r.ts=true;await Promise.all(e.map((async e=>{const t=s.resolve(e);await r.emitFile(t,"initial");return r.emitDependency(t)})));const a={fileList:r.fileList,esmFileList:r.esmFileList,reasons:r.reasons,warnings:r.warnings};return a}t.nodeFileTrace=nodeFileTrace;class Job{constructor({base:e=process.cwd(),processCwd:t,exports:r,conditions:a=r||["node"],exportsOnly:o=false,paths:u={},ignore:c,log:d=false,mixedModules:p=false,ts:v=true,analysis:g={},cache:y,fileIOConcurrency:m=1024}){this.reasons=new Map;this.ts=v;e=s.resolve(e);this.ignoreFn=e=>{if(e.startsWith(".."+s.sep))return true;return false};if(typeof c==="string")c=[c];if(typeof c==="function"){const e=c;this.ignoreFn=t=>{if(t.startsWith(".."+s.sep))return true;if(e(t))return true;return false}}else if(Array.isArray(c)){const t=c.map((t=>s.relative(e,s.resolve(e||process.cwd(),t))));this.ignoreFn=e=>{if(e.startsWith(".."+s.sep))return true;if(f.isMatch(e,t))return true;return false}}this.base=e;this.cwd=s.resolve(t||e);this.conditions=a;this.exportsOnly=o;const _={};for(const t of Object.keys(u)){const r=u[t].endsWith("/");const a=s.resolve(e,u[t]);_[t]=a+(r?"/":"")}this.paths=_;this.log=d;this.mixedModules=p;this.fileIOQueue=new h.Sema(m);this.analysis={};if(g!==false){Object.assign(this.analysis,{emitGlobs:true,computeFileReferences:true,evaluatePureExpressions:true},g===true?{}:g)}this.fileCache=y&&y.fileCache||new Map;this.statCache=y&&y.statCache||new Map;this.symlinkCache=y&&y.symlinkCache||new Map;this.analysisCache=y&&y.analysisCache||new Map;if(y){y.fileCache=this.fileCache;y.statCache=this.statCache;y.symlinkCache=this.symlinkCache;y.analysisCache=this.analysisCache}this.fileList=new Set;this.esmFileList=new Set;this.processed=new Set;this.warnings=new Set}async readlink(e){const t=this.symlinkCache.get(e);if(t!==undefined)return t;await this.fileIOQueue.acquire();try{const t=await g(e);const r=this.statCache.get(e);if(r)this.statCache.set(s.resolve(e,t),r);this.symlinkCache.set(e,t);return t}catch(t){if(t.code!=="EINVAL"&&t.code!=="ENOENT"&&t.code!=="UNKNOWN")throw t;this.symlinkCache.set(e,null);return null}finally{this.fileIOQueue.release()}}async isFile(e){const t=await this.stat(e);if(t)return t.isFile();return false}async isDir(e){const t=await this.stat(e);if(t)return t.isDirectory();return false}async stat(e){const t=this.statCache.get(e);if(t)return t;await this.fileIOQueue.acquire();try{const t=await y(e);this.statCache.set(e,t);return t}catch(t){if(t.code==="ENOENT"){this.statCache.set(e,null);return null}throw t}finally{this.fileIOQueue.release()}}async resolve(e,t,r,a){return c.default(e,t,r,a)}async readFile(e){const t=this.fileCache.get(e);if(t!==undefined)return t;await this.fileIOQueue.acquire();try{const t=(await v(e)).toString();this.fileCache.set(e,t);return t}catch(t){if(t.code==="ENOENT"||t.code==="EISDIR"){this.fileCache.set(e,null);return null}throw t}finally{this.fileIOQueue.release()}}async realpath(e,t,r=new Set){if(r.has(e))throw new Error("Recursive symlink detected resolving "+e);r.add(e);const a=await this.readlink(e);if(a){const o=s.dirname(e);const u=s.resolve(o,a);const c=await this.realpath(o,t);if(inPath(e,c))await this.emitFile(e,"resolve",t,true);return this.realpath(u,t,r)}if(!inPath(e,this.base))return e;return p.join(await this.realpath(s.dirname(e),t,r),s.basename(e))}async emitFile(e,t,r,a=false){if(!a){e=await this.realpath(e,r)}e=s.relative(this.base,e);if(r){r=s.relative(this.base,r)}let o=this.reasons.get(e);if(!o){o={type:[t],ignored:false,parents:new Set};this.reasons.set(e,o)}else if(!o.type.includes(t)){o.type.push(t)}if(r&&this.ignoreFn(e,r)){if(!this.fileList.has(e)&&o){o.ignored=true}return false}if(r){o.parents.add(r)}this.fileList.add(e);return true}async getPjsonBoundary(e){const t=e.indexOf(s.sep);let r;while((r=e.lastIndexOf(s.sep))>t){e=e.slice(0,r);if(await this.isFile(e+s.sep+"package.json"))return e}return undefined}async emitDependency(e,t){if(this.processed.has(e)){if(t){await this.emitFile(e,"dependency",t)}return}this.processed.add(e);const r=await this.emitFile(e,"dependency",t);if(!r)return;if(e.endsWith(".json"))return;if(e.endsWith(".node"))return await d.sharedLibEmit(e,this);if(e.endsWith(".js")){const t=await this.getPjsonBoundary(e);if(t)await this.emitFile(t+s.sep+"package.json","resolve",e)}let a;const o=this.analysisCache.get(e);if(o){a=o}else{const t=await this.readFile(e);if(t===null)throw new Error("File "+e+" does not exist.");a=await u.default(e,t.toString(),this);this.analysisCache.set(e,a)}const{deps:c,imports:f,assets:p,isESM:h}=a;if(h)this.esmFileList.add(s.relative(this.base,e));await Promise.all([...[...p].map((async t=>{const r=s.extname(t);if(r===".js"||r===".mjs"||r===".node"||r===""||this.ts&&(r===".ts"||r===".tsx")&&t.startsWith(this.base)&&t.slice(this.base.length).indexOf(s.sep+"node_modules"+s.sep)===-1)await this.emitDependency(t,e);else await this.emitFile(t,"asset",e)})),...[...c].map((async t=>{try{var r=await this.resolve(t,e,this,!h)}catch(e){this.warnings.add(new Error(`Failed to resolve dependency ${t}:\n${e&&e.message}`));return}if(Array.isArray(r)){for(const t of r){if(t.startsWith("node:"))return;await this.emitDependency(t,e)}}else{if(r.startsWith("node:"))return;await this.emitDependency(r,e)}})),...[...f].map((async t=>{try{var r=await this.resolve(t,e,this,false)}catch(e){this.warnings.add(new Error(`Failed to resolve dependency ${t}:\n${e&&e.message}`));return}if(Array.isArray(r)){for(const t of r){if(t.startsWith("node:"))return;await this.emitDependency(t,e)}}else{if(r.startsWith("node:"))return;await this.emitDependency(r,e)}}))])}}t.Job=Job},712:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const a=r(1017);async function resolveDependency(e,t,r,s=true){let o;if(a.isAbsolute(e)||e==="."||e===".."||e.startsWith("./")||e.startsWith("../")){const s=e.endsWith("/");o=await resolvePath(a.resolve(t,"..",e)+(s?"/":""),t,r)}else if(e[0]==="#"){o=await packageImportsResolve(e,t,r,s)}else{o=await resolvePackage(e,t,r,s)}if(Array.isArray(o)){return Promise.all(o.map((e=>r.realpath(e,t))))}else if(o.startsWith("node:")){return o}else{return r.realpath(o,t)}}t["default"]=resolveDependency;async function resolvePath(e,t,r){const a=await resolveFile(e,t,r)||await resolveDir(e,t,r);if(!a){throw new NotFoundError(e,t)}return a}async function resolveFile(e,t,r){if(e.endsWith("/"))return undefined;e=await r.realpath(e,t);if(await r.isFile(e))return e;if(r.ts&&e.startsWith(r.base)&&e.slice(r.base.length).indexOf(a.sep+"node_modules"+a.sep)===-1&&await r.isFile(e+".ts"))return e+".ts";if(r.ts&&e.startsWith(r.base)&&e.slice(r.base.length).indexOf(a.sep+"node_modules"+a.sep)===-1&&await r.isFile(e+".tsx"))return e+".tsx";if(await r.isFile(e+".js"))return e+".js";if(await r.isFile(e+".json"))return e+".json";if(await r.isFile(e+".node"))return e+".node";return undefined}async function resolveDir(e,t,r){if(e.endsWith("/"))e=e.slice(0,-1);if(!await r.isDir(e))return;const s=await getPkgCfg(e,r);if(s&&typeof s.main==="string"){const o=await resolveFile(a.resolve(e,s.main),t,r)||await resolveFile(a.resolve(e,s.main,"index"),t,r);if(o){await r.emitFile(e+a.sep+"package.json","resolve",t);return o}}return resolveFile(a.resolve(e,"index"),t,r)}class NotFoundError extends Error{constructor(e,t){super("Cannot find module '"+e+"' loaded from "+t);this.code="MODULE_NOT_FOUND"}}const s=new Set([...r(8102)._builtinLibs,"constants","module","timers","console","_stream_writable","_stream_readable","_stream_duplex","process","sys"]);function getPkgName(e){const t=e.split("/");if(e[0]==="@"&&t.length>1)return t.length>1?t.slice(0,2).join("/"):null;return t.length?t[0]:null}async function getPkgCfg(e,t){const r=await t.readFile(e+a.sep+"package.json");if(r){try{return JSON.parse(r.toString())}catch(e){}}return undefined}function getExportsTarget(e,t,r){if(typeof e==="string"){return e}else if(e===null){return e}else if(Array.isArray(e)){for(const a of e){const e=getExportsTarget(a,t,r);if(e===null||typeof e==="string"&&e.startsWith("./"))return e}}else if(typeof e==="object"){for(const a of Object.keys(e)){if(a==="default"||a==="require"&&r||a==="import"&&!r||t.includes(a)){const s=getExportsTarget(e[a],t,r);if(s!==undefined)return s}}}return undefined}function resolveExportsImports(e,t,r,a,s,o){let u;if(s){if(!(typeof t==="object"&&!Array.isArray(t)&&t!==null))return undefined;u=t}else if(typeof t==="string"||Array.isArray(t)||t===null||typeof t==="object"&&Object.keys(t).length&&Object.keys(t)[0][0]!=="."){u={".":t}}else{u=t}if(r in u){const t=getExportsTarget(u[r],a.conditions,o);if(typeof t==="string"&&t.startsWith("./"))return e+t.slice(1)}for(const t of Object.keys(u).sort(((e,t)=>t.length-e.length))){if(t.endsWith("*")&&r.startsWith(t.slice(0,-1))){const s=getExportsTarget(u[t],a.conditions,o);if(typeof s==="string"&&s.startsWith("./"))return e+s.slice(1).replace(/\*/g,r.slice(t.length-1))}if(!t.endsWith("/"))continue;if(r.startsWith(t)){const s=getExportsTarget(u[t],a.conditions,o);if(typeof s==="string"&&s.endsWith("/")&&s.startsWith("./"))return e+s.slice(1)+r.slice(t.length)}}return undefined}async function packageImportsResolve(e,t,r,s){if(e!=="#"&&!e.startsWith("#/")&&r.conditions){const o=await r.getPjsonBoundary(t);if(o){const u=await getPkgCfg(o,r);const{imports:c}=u||{};if(u&&c!==null&&c!==undefined){let u=resolveExportsImports(o,c,e,r,true,s);if(u){if(s)u=await resolveFile(u,t,r)||await resolveDir(u,t,r);else if(!await r.isFile(u))throw new NotFoundError(u,t);if(u){await r.emitFile(o+a.sep+"package.json","resolve",t);return u}}}}}throw new NotFoundError(e,t)}async function resolvePackage(e,t,r,o){let u=t;if(s.has(e))return"node:"+e;if(e.startsWith("node:"))return e;const c=getPkgName(e)||"";let f;if(r.conditions){const s=await r.getPjsonBoundary(t);if(s){const u=await getPkgCfg(s,r);const{exports:d}=u||{};if(u&&u.name&&u.name===c&&d!==null&&d!==undefined){f=resolveExportsImports(s,d,"."+e.slice(c.length),r,false,o);if(f){if(o)f=await resolveFile(f,t,r)||await resolveDir(f,t,r);else if(!await r.isFile(f))throw new NotFoundError(f,t)}if(f)await r.emitFile(s+a.sep+"package.json","resolve",t)}}}let d;const p=u.indexOf(a.sep);while((d=u.lastIndexOf(a.sep))>p){u=u.slice(0,d);const s=u+a.sep+"node_modules";const p=await r.stat(s);if(!p||!p.isDirectory())continue;const h=await getPkgCfg(s+a.sep+c,r);const{exports:v}=h||{};if(r.conditions&&v!==undefined&&v!==null&&!f){let u;if(!r.exportsOnly)u=await resolveFile(s+a.sep+e,t,r)||await resolveDir(s+a.sep+e,t,r);let f=resolveExportsImports(s+a.sep+c,v,"."+e.slice(c.length),r,false,o);if(f){if(o)f=await resolveFile(f,t,r)||await resolveDir(f,t,r);else if(!await r.isFile(f))throw new NotFoundError(f,t)}if(f){await r.emitFile(s+a.sep+c+a.sep+"package.json","resolve",t);if(u&&u!==f)return[f,u];return f}if(u)return u}else{const o=await resolveFile(s+a.sep+e,t,r)||await resolveDir(s+a.sep+e,t,r);if(o){if(f&&f!==o)return[o,f];return o}}}if(f)return f;if(Object.hasOwnProperty.call(r.paths,e)){return r.paths[e]}for(const a of Object.keys(r.paths)){if(a.endsWith("/")&&e.startsWith(a)){const s=r.paths[a]+e.slice(a.length);const o=await resolveFile(s,t,r)||await resolveDir(s,t,r);if(!o){throw new NotFoundError(e,t)}return o}}throw new NotFoundError(e,t)}},2784:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true})},74:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isLoop=t.isVarLoop=t.isIdentifierRead=void 0;function isIdentifierRead(e,t){switch(t.type){case"ObjectPattern":case"ArrayPattern":return false;case"AssignmentExpression":return t.right===e;case"MemberExpression":return t.computed||e===t.object;case"Property":return e===t.value;case"MethodDefinition":return false;case"VariableDeclarator":return t.id!==e;case"ExportSpecifier":return false;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":return false;default:return true}}t.isIdentifierRead=isIdentifierRead;function isVarLoop(e){return e.type==="ForStatement"||e.type==="ForInStatement"||e.type==="ForOfStatement"}t.isVarLoop=isVarLoop;function isLoop(e){return e.type==="ForStatement"||e.type==="ForInStatement"||e.type==="ForOfStatement"||e.type==="WhileStatement"||e.type==="DoWhileStatement"}t.isLoop=isLoop},2178:function(__unused_webpack_module,exports,__nccwpck_require__){"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:true});exports.nbind=exports.pregyp=void 0;const path_1=__importDefault(__nccwpck_require__(1017));const graceful_fs_1=__importDefault(__nccwpck_require__(1653));const versioning=__nccwpck_require__(2998);const napi=__nccwpck_require__(251);const pregypFind=(e,t)=>{const r=JSON.parse(graceful_fs_1.default.readFileSync(e).toString());versioning.validate_config(r,t);var a;if(napi.get_napi_build_versions(r,t)){a=napi.get_best_napi_build_version(r,t)}t=t||{};if(!t.module_root)t.module_root=path_1.default.dirname(e);var s=versioning.evaluate(r,t,a);return s.module};exports.pregyp={default:{find:pregypFind},find:pregypFind};function makeModulePathList(e,t){return[[e,t],[e,"build",t],[e,"build","Debug",t],[e,"build","Release",t],[e,"out","Debug",t],[e,"Debug",t],[e,"out","Release",t],[e,"Release",t],[e,"build","default",t],[e,process.env["NODE_BINDINGS_COMPILED_DIR"]||"compiled",process.versions.node,process.platform,process.arch,t]]}function findCompiledModule(basePath,specList){var resolvedList=[];var ext=path_1.default.extname(basePath);for(var _i=0,specList_1=specList;_i<specList_1.length;_i++){var spec=specList_1[_i];if(ext==spec.ext){try{spec.path=eval("require.resolve(basePath)");return spec}catch(e){resolvedList.push(basePath)}}}for(var _a=0,specList_2=specList;_a<specList_2.length;_a++){var spec=specList_2[_a];for(var _b=0,_c=makeModulePathList(basePath,spec.name);_b<_c.length;_b++){var pathParts=_c[_b];var resolvedPath=path_1.default.resolve.apply(path_1.default,pathParts);try{spec.path=eval("require.resolve(resolvedPath)")}catch(e){resolvedList.push(resolvedPath);continue}return spec}}return null}function nbind(e=process.cwd()){const t=findCompiledModule(e,[{ext:".node",name:"nbind.node",type:"node"},{ext:".js",name:"nbind.js",type:"emcc"}]);return t}exports.nbind=nbind},4240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getPackageName=t.getPackageBase=void 0;const r=/^(@[^\\\/]+[\\\/])?[^\\\/]+/;function getPackageBase(e){const t=e.lastIndexOf("node_modules");if(t!==-1&&(e[t-1]==="/"||e[t-1]==="\\")&&(e[t+12]==="/"||e[t+12]==="\\")){const a=e.slice(t+13).match(r);if(a)return e.slice(0,t+13+a[0].length)}return undefined}t.getPackageBase=getPackageBase;function getPackageName(e){const t=e.lastIndexOf("node_modules");if(t!==-1&&(e[t-1]==="/"||e[t-1]==="\\")&&(e[t+12]==="/"||e[t+12]==="\\")){const a=e.slice(t+13).match(r);if(a&&a.length>0){return a[0].replace(/\\/g,"/")}}return undefined}t.getPackageName=getPackageName},9325:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.normalizeWildcardRequire=t.normalizeDefaultRequire=void 0;function normalizeDefaultRequire(e){if(e&&e.__esModule)return e;return{default:e}}t.normalizeDefaultRequire=normalizeDefaultRequire;const r=Object.prototype.hasOwnProperty;function normalizeWildcardRequire(e){if(e&&e.__esModule)return e;const t={};for(const a in e){if(!r.call(e,a))continue;t[a]=e[a]}t["default"]=e;return t}t.normalizeWildcardRequire=normalizeWildcardRequire},2791:function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.sharedLibEmit=void 0;const s=a(r(2037));const o=a(r(3535));const u=r(4240);let c="";switch(s.default.platform()){case"darwin":c="/**/*.@(dylib|so?(.*))";break;case"win32":c="/**/*.dll";break;default:c="/**/*.so?(.*)"}async function sharedLibEmit(e,t){const r=u.getPackageBase(e);if(!r)return;const a=await new Promise(((e,t)=>o.default(r+c,{ignore:r+"/**/node_modules/**/*"},((r,a)=>r?t(r):e(a)))));await Promise.all(a.map((r=>t.emitFile(r,"sharedlib",e))))}t.sharedLibEmit=sharedLibEmit},1989:function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const s=r(1017);const o=a(r(712));const u=r(4240);const c=r(1653);const f={"@generated/photon"({id:e,emitAssetDirectory:t}){if(e.endsWith("@generated/photon/index.js")){t(s.resolve(s.dirname(e),"runtime/"))}},argon2({id:e,emitAssetDirectory:t}){if(e.endsWith("argon2/argon2.js")){t(s.resolve(s.dirname(e),"build","Release"));t(s.resolve(s.dirname(e),"prebuilds"));t(s.resolve(s.dirname(e),"lib","binding"))}},bull({id:e,emitAssetDirectory:t}){if(e.endsWith("bull/lib/commands/index.js")){t(s.resolve(s.dirname(e)))}},camaro({id:e,emitAsset:t}){if(e.endsWith("camaro/dist/camaro.js")){t(s.resolve(s.dirname(e),"camaro.wasm"))}},esbuild({id:e,emitAssetDirectory:t}){if(e.endsWith("esbuild/lib/main.js")){const r=s.resolve(e,"..","..","package.json");const a=JSON.parse(c.readFileSync(r,"utf8"));for(const r of Object.keys(a.optionalDependencies||{})){const a=s.resolve(e,"..","..","..",r);t(a)}}},"google-gax"({id:e,ast:t,emitAssetDirectory:r}){if(e.endsWith("google-gax/build/src/