diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml new file mode 100644 index 0000000000000..44a5abf889afc --- /dev/null +++ b/.github/actions/setup-node/action.yml @@ -0,0 +1,48 @@ +name: "Turborepo Node.js Setup" +description: "Sets Node.js up for CI" +inputs: + enable-corepack: + description: "Control turning on corepack." + required: false + default: true + disable-scripts: + description: "Control turning on corepack." + required: false + default: false +runs: + using: "composite" + steps: + - name: Setup pnpm + uses: pnpm/action-setup@v2.2.2 + with: + version: 7.12.1 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: pnpm + + - name: Configure corepack + # Forcibly upgrade our available version of corepack. + # The bundled version in node 16 has known issues. + # Prepends the npm bin dir so that it is always first. + shell: bash + run: | + npm install --force --global corepack@latest + npm config get prefix >> $GITHUB_PATH + corepack enable + - name: Enable corepack + if: ${{ inputs.enable-corepack == 'true' }} + shell: bash + run: | + corepack enable + - name: pnpm install + if: ${{ inputs.disable-scripts == 'false' }} + shell: bash + run: pnpm install + + - name: pnpm install + if: ${{ inputs.disable-scripts == 'true' }} + shell: bash + run: pnpm install --ignore-scripts diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 8e54aceee35ac..ac72d95e99cb3 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -77,14 +77,7 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 - with: - cache: "yarn" - node-version: 16 - - - name: install node.js dependencies - run: yarn install + - uses: ./.github/actions/setup-node - uses: Swatinem/rust-cache@v1 with: diff --git a/.github/workflows/bench_against_node_nft.yml b/.github/workflows/bench_against_node_nft.yml index 82a27c52f6a0c..29ce5d9ab412d 100644 --- a/.github/workflows/bench_against_node_nft.yml +++ b/.github/workflows/bench_against_node_nft.yml @@ -21,14 +21,7 @@ jobs: with: key: bench_nft - - name: Setup node - uses: actions/setup-node@v3 - with: - cache: "yarn" - node-version: 16 - - - name: install Node.js dependencies - run: yarn install + - uses: ./.github/actions/setup-node - name: Install nextest run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin diff --git a/.github/workflows/bench_pr.yml b/.github/workflows/bench_pr.yml index b8302710b5fd2..6551d4cce53e1 100644 --- a/.github/workflows/bench_pr.yml +++ b/.github/workflows/bench_pr.yml @@ -32,14 +32,7 @@ jobs: - name: Fetch the base branch run: git -c protocol.version=2 fetch --no-tags --progress --no-recurse-submodules --depth=1 origin +${{ github.base_ref }}:base - - name: Setup node - uses: actions/setup-node@v3 - with: - cache: "yarn" - node-version: 16 - - - name: install node.js dependencies - run: yarn install + - uses: ./.github/actions/setup-node - uses: Swatinem/rust-cache@v1 with: diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 21a9a2f5a5368..fe01355a16f6e 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -76,11 +76,7 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 - with: - node-version: 16 - check-latest: true + - uses: ./.github/actions/setup-node - name: Set release name run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 34fc989f7271b..2179b38742cd7 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -125,20 +125,13 @@ jobs: command: fmt args: --check - - name: Setup node - uses: actions/setup-node@v3 - with: - cache: "yarn" - node-version: 16 - - - name: install Node.js dependencies - run: yarn workspaces focus + - uses: ./.github/actions/setup-node - name: Prettier - run: yarn prettier -c . + run: pnpm exec prettier -c . - name: toml - run: yarn taplo format --check + run: pnpm exec taplo format --check - name: eslint - run: yarn lint + run: pnpm lint diff --git a/.github/workflows/custom_bench.yml b/.github/workflows/custom_bench.yml index b55b797eb0bd6..d2ed3c3b0ba6e 100644 --- a/.github/workflows/custom_bench.yml +++ b/.github/workflows/custom_bench.yml @@ -26,14 +26,7 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 - with: - cache: "yarn" - node-version: 16 - - - name: install node.js dependencies - run: yarn install + - uses: ./.github/actions/setup-node - uses: Swatinem/rust-cache@v1 with: diff --git a/.github/workflows/custom_matrix_bench.yml b/.github/workflows/custom_matrix_bench.yml index afee33d1f0c80..378bfa539cd0f 100644 --- a/.github/workflows/custom_matrix_bench.yml +++ b/.github/workflows/custom_matrix_bench.yml @@ -41,14 +41,7 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 - with: - cache: "yarn" - node-version: 16 - - - name: install node.js dependencies - run: yarn install + - uses: ./.github/actions/setup-node - uses: Swatinem/rust-cache@v1 with: diff --git a/.github/workflows/publish_npm.yml b/.github/workflows/publish_npm.yml index 8ab2b8cdf1dc0..de6cb1e8ebc12 100644 --- a/.github/workflows/publish_npm.yml +++ b/.github/workflows/publish_npm.yml @@ -12,12 +12,9 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 + - uses: ./.github/actions/setup-node with: - node-version: 16 - check-latest: true - cache: yarn + disable-scripts: true - name: Cache cargo registry uses: actions/cache@v3 @@ -29,10 +26,8 @@ jobs: target key: publish-npm-cargo-cache - - run: yarn install --mode=skip-build - - name: Build packages - run: yarn turbo run build + run: pnpm turbo run build - name: Write NPM_TOKEN run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN_ELEVATED }}" > ~/.npmrc diff --git a/.github/workflows/quick-test.yml b/.github/workflows/quick-test.yml index 3dab40557bce8..9dfb9b9ed1766 100644 --- a/.github/workflows/quick-test.yml +++ b/.github/workflows/quick-test.yml @@ -26,11 +26,7 @@ jobs: with: key: test - - name: Setup node - uses: actions/setup-node@v3 - with: - cache: "yarn" - node-version: 16 + - uses: ./.github/actions/setup-node - name: Start Redis uses: supercharge/redis-github-action@1.4.0 @@ -40,10 +36,6 @@ jobs: - name: Set Redis URL run: echo "BULL_REDIS_CONNECTION=redis://127.0.0.1:6379" >> $GITHUB_ENV - - name: install Node.js dependencies - run: | - yarn install - - name: Install nextest run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin shell: bash diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7bacb4b1f9926..94d17c3d140d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,12 +67,6 @@ jobs: with: key: test - - name: Setup node - uses: actions/setup-node@v3 - with: - cache: "yarn" - node-version: 16 - - name: Start Redis uses: supercharge/redis-github-action@1.4.0 with: @@ -91,16 +85,19 @@ jobs: description: Installing Node.js dependencies... url: https://github.com/vercel/turbo-tooling/actions/runs/${{ github.run_id }} - - name: Install node dependencies - run: | - yarn install + - uses: ./.github/actions/setup-node if: matrix.os.name != 'windows-latest' - - name: Install node dependencies + - name: install Node.js dependencies on Windows without scripts + uses: ./.github/actions/setup-node + with: + disable-scripts: true + if: matrix.os.name == 'windows-latest' + + - name: install Node.js dependencies with scripts run: | - yarn install --mode=skip-build - yarn node-gyp install - yarn install + pnpm node-gyp install + pnpm install --force if: matrix.os.name == 'windows-latest' - name: Report progress diff --git a/.husky/pre-commit b/.husky/pre-commit index 5a182ef106df1..a5a29d9f7da2c 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -yarn lint-staged +pnpm lint-staged diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000000000..f430b45130bae --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +auto-install-peers = true +hoist = false diff --git a/.prettierignore b/.prettierignore index 4eea9566e3d2e..8341d5d9bf1a0 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,6 @@ .yarn target -yarn.lock +pnpm-lock.yaml crates/turbopack-ecmascript/tests crates/turbopack/tests/node-file-trace/integration crates/turbopack/bench.json diff --git a/.yarn/plugins/@yarnpkg/plugin-changed.cjs b/.yarn/plugins/@yarnpkg/plugin-changed.cjs deleted file mode 100644 index dc81860bfe626..0000000000000 --- a/.yarn/plugins/@yarnpkg/plugin-changed.cjs +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint-disable */ -module.exports = { -name: "@yarnpkg/plugin-changed", -factory: function (require) { -var plugin;(()=>{"use strict";var e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>f});const o=require("@yarnpkg/cli"),n=require("clipanion"),r=require("@yarnpkg/core");function a(e){const{project:t}=e,o=new Set;return function e({manifest:n}){for(const a of r.Manifest.hardDependencies)for(const r of n.getForScope(a).values()){const n=t.tryWorkspaceByDescriptor(r);n&&!o.has(n)&&(o.add(n),e(n))}}(e),[...o]}function s(e){const t=new Set;for(const o of e.project.workspaces){a(o).some(t=>r.structUtils.areLocatorsEqual(t.locator,e.locator))&&t.add(o)}return[...t]}var i=function(e,t,o,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(s=(a<3?r(s):a>3?r(t,o,s):r(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};class c extends o.BaseCommand{async listWorkspaces(e){const{stdout:t}=await r.execUtils.execvp("git",["diff","--name-only",...this.gitRange?[this.gitRange]:[]],{cwd:e.cwd,strict:!0}),o=function(e,t){const o=new Set;for(const n of e.workspaces){if(t.some(e=>e.startsWith(n.relativeCwd))&&!o.has(n)){o.add(n);for(const e of s(n))o.add(e)}}return[...o]}(e,t.split(/\r?\n/)),n=this.include||[],a=this.exclude||[];return o.filter(e=>{const t=r.structUtils.stringifyIdent(e.locator);if(t){if(n.length&&!n.includes(t))return!1;if(a.length&&a.includes(t))return!1}return!0})}}i([n.Command.String("--git-range")],c.prototype,"gitRange",void 0),i([n.Command.Array("--include")],c.prototype,"include",void 0),i([n.Command.Array("--exclude")],c.prototype,"exclude",void 0);var d=function(e,t,o,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(s=(a<3?r(s):a>3?r(t,o,s):r(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};class l extends c{constructor(){super(...arguments),this.json=!1}async execute(){const e=await r.Configuration.find(this.context.cwd,this.context.plugins),{project:t,workspace:n}=await r.Project.find(e,this.context.cwd);if(!n)throw new o.WorkspaceRequiredError(t.cwd,this.context.cwd);return(await r.StreamReport.start({configuration:e,json:this.json,stdout:this.context.stdout},async e=>{const o=await this.listWorkspaces(t);for(const t of o)e.reportInfo(null,t.relativeCwd),e.reportJson({name:t.manifest.name?r.structUtils.stringifyIdent(t.manifest.name):null,location:t.relativeCwd})})).exitCode()}}l.usage=n.Command.Usage({description:"List changed workspaces and their dependents",details:"\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n ",examples:[["Find changed files within a Git range","yarn changed list --git-range 93a9ed8..4ef2c61"],["Include or exclude workspaces","yarn changed list --include @foo/a --exclude @foo/b"]]}),d([n.Command.Boolean("--json")],l.prototype,"json",void 0),d([n.Command.Path("changed","list")],l.prototype,"execute",null);var p=function(e,t,o,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(s=(a<3?r(s):a>3?r(t,o,s):r(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};class u extends c{constructor(){super(...arguments),this.args=[],this.verbose=!1,this.parallel=!1,this.interlaced=!1,this.topological=!1}async execute(){const e=await r.Configuration.find(this.context.cwd,this.context.plugins),{project:t,workspace:n}=await r.Project.find(e,this.context.cwd);if(!n)throw new o.WorkspaceRequiredError(t.cwd,this.context.cwd);const a=await this.listWorkspaces(t);if(!a.length){return(await r.StreamReport.start({configuration:e,stdout:this.context.stdout},async e=>{e.reportInfo(null,"No workspaces changed")})).exitCode()}return this.cli.run(["workspaces","foreach",...a.reduce((e,t)=>[...e,"--include",r.structUtils.stringifyIdent(t.locator)],[]),...this.verbose?["--verbose"]:[],...this.parallel?["--parallel"]:[],...this.interlaced?["--interlaced"]:[],...this.topological?["--topological"]:[],...this.jobs?["--jobs",""+this.jobs]:[],this.commandName,...this.args],{cwd:t.cwd})}}u.usage=n.Command.Usage({description:"Run a command on changed workspaces and their dependents",details:"\n This command will run a given sub-command on changed workspaces and workspaces depends on them.\n\n Check the documentation for `yarn workspace foreach` for more details.\n ",examples:[["Run build scripts on changed workspaces","yarn changed foreach run build"],["Find changed files within a Git range","yarn changed foreach --git-range 93a9ed8..4ef2c61 run build"]]}),p([n.Command.String()],u.prototype,"commandName",void 0),p([n.Command.Proxy()],u.prototype,"args",void 0),p([n.Command.Boolean("-v,--verbose")],u.prototype,"verbose",void 0),p([n.Command.Boolean("-p,--parallel")],u.prototype,"parallel",void 0),p([n.Command.Boolean("-i,--interlaced")],u.prototype,"interlaced",void 0),p([n.Command.Boolean("-t,--topological")],u.prototype,"topological",void 0),p([n.Command.String("-j,--jobs")],u.prototype,"jobs",void 0),p([n.Command.Path("changed","foreach")],u.prototype,"execute",null);const f={commands:[l,u]};plugin=t})(); -return plugin; -} -}; \ No newline at end of file diff --git a/.yarn/plugins/@yarnpkg/plugin-version.cjs b/.yarn/plugins/@yarnpkg/plugin-version.cjs deleted file mode 100644 index 87de4f440a778..0000000000000 --- a/.yarn/plugins/@yarnpkg/plugin-version.cjs +++ /dev/null @@ -1,550 +0,0 @@ -/* eslint-disable */ -//prettier-ignore -module.exports = { -name: "@yarnpkg/plugin-version", -factory: function (require) { -var plugin=(()=>{var ZB=Object.create,zy=Object.defineProperty,$B=Object.defineProperties,eU=Object.getOwnPropertyDescriptor,tU=Object.getOwnPropertyDescriptors,nU=Object.getOwnPropertyNames,uS=Object.getOwnPropertySymbols,rU=Object.getPrototypeOf,oS=Object.prototype.hasOwnProperty,iU=Object.prototype.propertyIsEnumerable;var lS=(i,o,f)=>o in i?zy(i,o,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[o]=f,E0=(i,o)=>{for(var f in o||(o={}))oS.call(o,f)&&lS(i,f,o[f]);if(uS)for(var f of uS(o))iU.call(o,f)&&lS(i,f,o[f]);return i},Gf=(i,o)=>$B(i,tU(o)),uU=i=>zy(i,"__esModule",{value:!0});var ce=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),sS=(i,o)=>{for(var f in o)zy(i,f,{get:o[f],enumerable:!0})},oU=(i,o,f)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of nU(o))!oS.call(i,p)&&p!=="default"&&zy(i,p,{get:()=>o[p],enumerable:!(f=eU(o,p))||f.enumerable});return i},Mi=i=>oU(uU(zy(i!=null?ZB(rU(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var eD=ce((F$,aS)=>{function lU(i,o){for(var f=-1,p=i==null?0:i.length,E=Array(p);++f
{function sU(){this.__data__=[],this.size=0}fS.exports=sU});var tD=ce((P$,dS)=>{function aU(i,o){return i===o||i!==i&&o!==o}dS.exports=aU});var qy=ce((I$,pS)=>{var fU=tD();function cU(i,o){for(var f=i.length;f--;)if(fU(i[f][0],o))return f;return-1}pS.exports=cU});var vS=ce((B$,hS)=>{var dU=qy(),pU=Array.prototype,hU=pU.splice;function vU(i){var o=this.__data__,f=dU(o,i);if(f<0)return!1;var p=o.length-1;return f==p?o.pop():hU.call(o,f,1),--this.size,!0}hS.exports=vU});var yS=ce((U$,mS)=>{var mU=qy();function yU(i){var o=this.__data__,f=mU(o,i);return f<0?void 0:o[f][1]}mS.exports=yU});var _S=ce((j$,gS)=>{var gU=qy();function _U(i){return gU(this.__data__,i)>-1}gS.exports=_U});var DS=ce((z$,ES)=>{var EU=qy();function DU(i,o){var f=this.__data__,p=EU(f,i);return p<0?(++this.size,f.push([i,o])):f[p][1]=o,this}ES.exports=DU});var Hy=ce((q$,wS)=>{var wU=cS(),SU=vS(),TU=yS(),CU=_S(),xU=DS();function jv(i){var o=-1,f=i==null?0:i.length;for(this.clear();++o {var xz=sd(),Az=function(){try{var i=xz(Object,"defineProperty");return i({},"",{}),i}catch(o){}}();UT.exports=Az});var sD=ce((Aee,jT)=>{var zT=lD();function Rz(i,o,f){o=="__proto__"&&zT?zT(i,o,{configurable:!0,enumerable:!0,value:f,writable:!0}):i[o]=f}jT.exports=Rz});var aD=ce((Ree,qT)=>{var Oz=sD(),kz=tD(),Mz=Object.prototype,Nz=Mz.hasOwnProperty;function Lz(i,o,f){var p=i[o];(!(Nz.call(i,o)&&kz(p,f))||f===void 0&&!(o in i))&&Oz(i,o,f)}qT.exports=Lz});var Gv=ce((Oee,HT)=>{var Fz=aD(),bz=sD();function Pz(i,o,f,p){var E=!f;f||(f={});for(var t=-1,k=o.length;++t {function LH(i,o){for(var f=-1,p=i==null?0:i.length,E=0,t=[];++f {function FH(){return[]}qC.exports=FH});var U_=ce((nte,HC)=>{var bH=zC(),PH=yD(),IH=Object.prototype,BH=IH.propertyIsEnumerable,WC=Object.getOwnPropertySymbols,UH=WC?function(i){return i==null?[]:(i=Object(i),bH(WC(i),function(o){return BH.call(i,o)}))}:PH;HC.exports=UH});var GC=ce((rte,VC)=>{var jH=Gv(),zH=U_();function qH(i,o){return jH(i,zH(i),o)}VC.exports=qH});var j_=ce((ite,YC)=>{function HH(i,o){for(var f=-1,p=o.length,E=i.length;++f {var WH=vD(),VH=WH(Object.getPrototypeOf,Object);KC.exports=VH});var gD=ce((ote,XC)=>{var GH=j_(),YH=z_(),KH=U_(),XH=yD(),QH=Object.getOwnPropertySymbols,JH=QH?function(i){for(var o=[];i;)GH(o,KH(i)),i=YH(i);return o}:XH;XC.exports=JH});var JC=ce((lte,QC)=>{var ZH=Gv(),$H=gD();function eW(i,o){return ZH(i,$H(i),o)}QC.exports=eW});var _D=ce((ste,ZC)=>{var tW=j_(),nW=fd();function rW(i,o,f){var p=o(i);return nW(i)?p:tW(p,f(i))}ZC.exports=rW});var e6=ce((ate,$C)=>{var iW=_D(),uW=U_(),oW=I_();function lW(i){return iW(i,oW,uW)}$C.exports=lW});var ED=ce((fte,t6)=>{var sW=_D(),aW=gD(),fW=B_();function cW(i){return sW(i,fW,aW)}t6.exports=cW});var r6=ce((cte,n6)=>{var dW=sd(),pW=Yf(),hW=dW(pW,"DataView");n6.exports=hW});var u6=ce((dte,i6)=>{var vW=sd(),mW=Yf(),yW=vW(mW,"Promise");i6.exports=yW});var l6=ce((pte,o6)=>{var gW=sd(),_W=Yf(),EW=gW(_W,"Set");o6.exports=EW});var a6=ce((hte,s6)=>{var DW=sd(),wW=Yf(),SW=DW(wW,"WeakMap");s6.exports=SW});var q_=ce((vte,f6)=>{var DD=r6(),wD=L_(),SD=u6(),TD=l6(),CD=a6(),c6=Qp(),Qv=uD(),d6="[object Map]",TW="[object Object]",p6="[object Promise]",h6="[object Set]",v6="[object WeakMap]",m6="[object DataView]",CW=Qv(DD),xW=Qv(wD),AW=Qv(SD),RW=Qv(TD),OW=Qv(CD),Jp=c6;(DD&&Jp(new DD(new ArrayBuffer(1)))!=m6||wD&&Jp(new wD)!=d6||SD&&Jp(SD.resolve())!=p6||TD&&Jp(new TD)!=h6||CD&&Jp(new CD)!=v6)&&(Jp=function(i){var o=c6(i),f=o==TW?i.constructor:void 0,p=f?Qv(f):"";if(p)switch(p){case CW:return m6;case xW:return d6;case AW:return p6;case RW:return h6;case OW:return v6}return o});f6.exports=Jp});var g6=ce((mte,y6)=>{var kW=Object.prototype,MW=kW.hasOwnProperty;function NW(i){var o=i.length,f=new i.constructor(o);return o&&typeof i[0]=="string"&&MW.call(i,"index")&&(f.index=i.index,f.input=i.input),f}y6.exports=NW});var E6=ce((yte,_6)=>{var LW=Yf(),FW=LW.Uint8Array;_6.exports=FW});var H_=ce((gte,D6)=>{var w6=E6();function bW(i){var o=new i.constructor(i.byteLength);return new w6(o).set(new w6(i)),o}D6.exports=bW});var T6=ce((_te,S6)=>{var PW=H_();function IW(i,o){var f=o?PW(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.byteLength)}S6.exports=IW});var x6=ce((Ete,C6)=>{var BW=/\w*$/;function UW(i){var o=new i.constructor(i.source,BW.exec(i));return o.lastIndex=i.lastIndex,o}C6.exports=UW});var M6=ce((Dte,A6)=>{var R6=zv(),O6=R6?R6.prototype:void 0,k6=O6?O6.valueOf:void 0;function jW(i){return k6?Object(k6.call(i)):{}}A6.exports=jW});var L6=ce((wte,N6)=>{var zW=H_();function qW(i,o){var f=o?zW(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.length)}N6.exports=qW});var b6=ce((Ste,F6)=>{var HW=H_(),WW=T6(),VW=x6(),GW=M6(),YW=L6(),KW="[object Boolean]",XW="[object Date]",QW="[object Map]",JW="[object Number]",ZW="[object RegExp]",$W="[object Set]",eV="[object String]",tV="[object Symbol]",nV="[object ArrayBuffer]",rV="[object DataView]",iV="[object Float32Array]",uV="[object Float64Array]",oV="[object Int8Array]",lV="[object Int16Array]",sV="[object Int32Array]",aV="[object Uint8Array]",fV="[object Uint8ClampedArray]",cV="[object Uint16Array]",dV="[object Uint32Array]";function pV(i,o,f){var p=i.constructor;switch(o){case nV:return HW(i);case KW:case XW:return new p(+i);case rV:return WW(i,f);case iV:case uV:case oV:case lV:case sV:case aV:case fV:case cV:case dV:return YW(i,f);case QW:return new p;case JW:case eV:return new p(i);case ZW:return VW(i);case $W:return new p;case tV:return GW(i)}}F6.exports=pV});var B6=ce((Tte,P6)=>{var hV=qv(),I6=Object.create,vV=function(){function i(){}return function(o){if(!hV(o))return{};if(I6)return I6(o);i.prototype=o;var f=new i;return i.prototype=void 0,f}}();P6.exports=vV});var j6=ce((Cte,U6)=>{var mV=B6(),yV=z_(),gV=P_();function _V(i){return typeof i.constructor=="function"&&!gV(i)?mV(yV(i)):{}}U6.exports=_V});var q6=ce((xte,z6)=>{var EV=q_(),DV=ad(),wV="[object Map]";function SV(i){return DV(i)&&EV(i)==wV}z6.exports=SV});var G6=ce((Ate,H6)=>{var TV=q6(),CV=F_(),W6=b_(),V6=W6&&W6.isMap,xV=V6?CV(V6):TV;H6.exports=xV});var K6=ce((Rte,Y6)=>{var AV=q_(),RV=ad(),OV="[object Set]";function kV(i){return RV(i)&&AV(i)==OV}Y6.exports=kV});var Z6=ce((Ote,X6)=>{var MV=K6(),NV=F_(),Q6=b_(),J6=Q6&&Q6.isSet,LV=J6?NV(J6):MV;X6.exports=LV});var rx=ce((kte,$6)=>{var FV=PT(),bV=BT(),PV=aD(),IV=CC(),BV=NC(),UV=IC(),jV=UC(),zV=GC(),qV=JC(),HV=e6(),WV=ED(),VV=q_(),GV=g6(),YV=b6(),KV=j6(),XV=fd(),QV=cD(),JV=G6(),ZV=qv(),$V=Z6(),eG=I_(),tG=B_(),nG=1,rG=2,iG=4,ex="[object Arguments]",uG="[object Array]",oG="[object Boolean]",lG="[object Date]",sG="[object Error]",tx="[object Function]",aG="[object GeneratorFunction]",fG="[object Map]",cG="[object Number]",nx="[object Object]",dG="[object RegExp]",pG="[object Set]",hG="[object String]",vG="[object Symbol]",mG="[object WeakMap]",yG="[object ArrayBuffer]",gG="[object DataView]",_G="[object Float32Array]",EG="[object Float64Array]",DG="[object Int8Array]",wG="[object Int16Array]",SG="[object Int32Array]",TG="[object Uint8Array]",CG="[object Uint8ClampedArray]",xG="[object Uint16Array]",AG="[object Uint32Array]",Wu={};Wu[ex]=Wu[uG]=Wu[yG]=Wu[gG]=Wu[oG]=Wu[lG]=Wu[_G]=Wu[EG]=Wu[DG]=Wu[wG]=Wu[SG]=Wu[fG]=Wu[cG]=Wu[nx]=Wu[dG]=Wu[pG]=Wu[hG]=Wu[vG]=Wu[TG]=Wu[CG]=Wu[xG]=Wu[AG]=!0;Wu[sG]=Wu[tx]=Wu[mG]=!1;function W_(i,o,f,p,E,t){var k,L=o&nG,N=o&rG,C=o&iG;if(f&&(k=E?f(i,p,E,t):f(i)),k!==void 0)return k;if(!ZV(i))return i;var U=XV(i);if(U){if(k=GV(i),!L)return jV(i,k)}else{var q=VV(i),W=q==tx||q==aG;if(QV(i))return UV(i,L);if(q==nx||q==ex||W&&!E){if(k=N||W?{}:KV(i),!L)return N?qV(i,BV(k,i)):zV(i,IV(k,i))}else{if(!Wu[q])return E?i:{};k=YV(i,q,L)}}t||(t=new FV);var ne=t.get(i);if(ne)return ne;t.set(i,k),$V(i)?i.forEach(function(Se){k.add(W_(Se,o,f,Se,i,t))}):JV(i)&&i.forEach(function(Se,he){k.set(he,W_(Se,o,f,he,i,t))});var m=C?N?WV:HV:N?tG:eG,we=U?void 0:m(i);return bV(we||i,function(Se,he){we&&(he=Se,Se=i[he]),PV(k,he,W_(Se,o,f,he,i,t))}),k}$6.exports=W_});var V_=ce((Mte,ix)=>{var RG=Qp(),OG=ad(),kG="[object Symbol]";function MG(i){return typeof i=="symbol"||OG(i)&&RG(i)==kG}ix.exports=MG});var ox=ce((Nte,ux)=>{var NG=fd(),LG=V_(),FG=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bG=/^\w*$/;function PG(i,o){if(NG(i))return!1;var f=typeof i;return f=="number"||f=="symbol"||f=="boolean"||i==null||LG(i)?!0:bG.test(i)||!FG.test(i)||o!=null&&i in Object(o)}ux.exports=PG});var ax=ce((Lte,lx)=>{var sx=oD(),IG="Expected a function";function xD(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new TypeError(IG);var f=function(){var p=arguments,E=o?o.apply(this,p):p[0],t=f.cache;if(t.has(E))return t.get(E);var k=i.apply(this,p);return f.cache=t.set(E,k)||t,k};return f.cache=new(xD.Cache||sx),f}xD.Cache=sx;lx.exports=xD});var cx=ce((Fte,fx)=>{var BG=ax(),UG=500;function jG(i){var o=BG(i,function(p){return f.size===UG&&f.clear(),p}),f=o.cache;return o}fx.exports=jG});var px=ce((bte,dx)=>{var zG=cx(),qG=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,HG=/\\(\\)?/g,WG=zG(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(qG,function(f,p,E,t){o.push(E?t.replace(HG,"$1"):p||f)}),o});dx.exports=WG});var _x=ce((Pte,hx)=>{var vx=zv(),VG=eD(),GG=fd(),YG=V_(),KG=1/0,mx=vx?vx.prototype:void 0,yx=mx?mx.toString:void 0;function gx(i){if(typeof i=="string")return i;if(GG(i))return VG(i,gx)+"";if(YG(i))return yx?yx.call(i):"";var o=i+"";return o=="0"&&1/i==-KG?"-0":o}hx.exports=gx});var Dx=ce((Ite,Ex)=>{var XG=_x();function QG(i){return i==null?"":XG(i)}Ex.exports=QG});var G_=ce((Bte,wx)=>{var JG=fd(),ZG=ox(),$G=px(),eY=Dx();function tY(i,o){return JG(i)?i:ZG(i,o)?[i]:$G(eY(i))}wx.exports=tY});var Tx=ce((Ute,Sx)=>{function nY(i){var o=i==null?0:i.length;return o?i[o-1]:void 0}Sx.exports=nY});var AD=ce((jte,Cx)=>{var rY=V_(),iY=1/0;function uY(i){if(typeof i=="string"||rY(i))return i;var o=i+"";return o=="0"&&1/i==-iY?"-0":o}Cx.exports=uY});var Ax=ce((zte,xx)=>{var oY=G_(),lY=AD();function sY(i,o){o=oY(o,i);for(var f=0,p=o.length;i!=null&&f {function aY(i,o,f){var p=-1,E=i.length;o<0&&(o=-o>E?0:E+o),f=f>E?E:f,f<0&&(f+=E),E=o>f?0:f-o>>>0,o>>>=0;for(var t=Array(E);++p1&&arguments[1]!==void 0?arguments[1]:NaN,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Jf.DIRECTION_LTR;return k.call(this,L,N,C)}),$K({Config:o.Config,Node:o.Node,Layout:i("Layout",eX),Size:i("Size",C9),Value:i("Value",x9),getInstanceCount:function(){return o.getInstanceCount.apply(o,arguments)}},Jf)}});var R9=ce((exports,module)=>{(function(i,o){typeof define=="function"&&define.amd?define([],function(){return o}):typeof module=="object"&&module.exports?module.exports=o:(i.nbind=i.nbind||{}).init=o})(exports,function(Module,cb){typeof Module=="function"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(i,o){return function(){i&&i.apply(this,arguments);try{Module.ccall("nbind_init")}catch(f){o(f);return}o(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module!="undefined"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT==="WEB")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT==="WORKER")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT==="NODE")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT==="SHELL")ENVIRONMENT_IS_SHELL=!0;else throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof require=="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(o,f){nodeFS||(nodeFS={}("")),nodePath||(nodePath={}("")),o=nodePath.normalize(o);var p=nodeFS.readFileSync(o);return f?p:p.toString()},Module.readBinary=function(o){var f=Module.read(o,!0);return f.buffer||(f=new Uint8Array(f)),assert(f.buffer),f},Module.load=function(o){globalEval(read(o))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module!="undefined"&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr!="undefined"&&(Module.printErr=printErr),typeof read!="undefined"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(o){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(o));var f=read(o,"binary");return assert(typeof f=="object"),f},typeof scriptArgs!="undefined"?Module.arguments=scriptArgs:typeof arguments!="undefined"&&(Module.arguments=arguments),typeof quit=="function"&&(Module.quit=function(i,o){quit(i)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(o){var f=new XMLHttpRequest;return f.open("GET",o,!1),f.send(null),f.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(o){var f=new XMLHttpRequest;return f.open("GET",o,!1),f.responseType="arraybuffer",f.send(null),new Uint8Array(f.response)}),Module.readAsync=function(o,f,p){var E=new XMLHttpRequest;E.open("GET",o,!0),E.responseType="arraybuffer",E.onload=function(){E.status==200||E.status==0&&E.response?f(E.response):p()},E.onerror=p,E.send(null)},typeof arguments!="undefined"&&(Module.arguments=arguments),typeof console!="undefined")Module.print||(Module.print=function(o){console.log(o)}),Module.printErr||(Module.printErr=function(o){console.warn(o)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump!="undefined"?function(i){dump(i)}:function(i){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle=="undefined"&&(Module.setWindowTitle=function(i){document.title=i})}else throw"Unknown runtime environment. Where are we?";function globalEval(i){eval.call(null,i)}!Module.load&&Module.read&&(Module.load=function(o){globalEval(Module.read(o))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(i,o){throw o}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(i){return tempRet0=i,i},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(i){STACKTOP=i},getNativeTypeSize:function(i){switch(i){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(i[i.length-1]==="*")return Runtime.QUANTUM_SIZE;if(i[0]==="i"){var o=parseInt(i.substr(1));return assert(o%8==0),o/8}else return 0}}},getNativeFieldSize:function(i){return Math.max(Runtime.getNativeTypeSize(i),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(i,o){return o==="double"||o==="i64"?i&7&&(assert((i&7)==4),i+=4):assert((i&3)==0),i},getAlignSize:function(i,o,f){return!f&&(i=="i64"||i=="double")?8:i?Math.min(o||(i?Runtime.getNativeFieldSize(i):0),Runtime.QUANTUM_SIZE):Math.min(o,8)},dynCall:function(i,o,f){return f&&f.length?Module["dynCall_"+i].apply(null,[o].concat(f)):Module["dynCall_"+i].call(null,o)},functionPointers:[],addFunction:function(i){for(var o=0;o
>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?S>>>0>>1>>>0?S>>>0