UNPKG

onnxruntime-web

Version:

A Javascript library for running ONNX models on browsers

8 lines 113 kB
/*! * ONNX Runtime Web v1.26.0 * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ var Hr=Object.defineProperty;var zf=Object.getOwnPropertyDescriptor;var Vf=Object.getOwnPropertyNames;var jf=Object.prototype.hasOwnProperty;var qr=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(r,s)=>(typeof require<"u"?require:r)[s]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var k=(a,r)=>()=>(a&&(r=a(a=0)),r);var At=(a,r)=>{for(var s in r)Hr(a,s,{get:r[s],enumerable:!0})},Hf=(a,r,s,f)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Vf(r))!jf.call(a,i)&&i!==s&&Hr(a,i,{get:()=>r[i],enumerable:!(f=zf(r,i))||f.enumerable});return a};var zt=a=>Hf(Hr({},"__esModule",{value:!0}),a);var Vt,Ze,Ke,qf,Ta,Yr=k(()=>{"use strict";Vt=new Map,Ze=[],Ke=(a,r,s)=>{if(r&&typeof r.init=="function"&&typeof r.createInferenceSessionHandler=="function"){let f=Vt.get(a);if(f===void 0)Vt.set(a,{backend:r,priority:s});else{if(f.priority>s)return;if(f.priority===s&&f.backend!==r)throw new Error(`cannot register backend "${a}" using priority ${s}`)}if(s>=0){let i=Ze.indexOf(a);i!==-1&&Ze.splice(i,1);for(let d=0;d<Ze.length;d++)if(Vt.get(Ze[d]).priority<=s){Ze.splice(d,0,a);return}Ze.push(a)}return}throw new TypeError("not a valid backend")},qf=async a=>{let r=Vt.get(a);if(!r)return"backend not found.";if(r.initialized)return r.backend;if(r.aborted)return r.error;{let s=!!r.initPromise;try{return s||(r.initPromise=r.backend.init(a)),await r.initPromise,r.initialized=!0,r.backend}catch(f){return s||(r.error=`${f}`,r.aborted=!0),r.error}finally{delete r.initPromise}}},Ta=async a=>{let r=a.executionProviders||[],s=r.map(y=>typeof y=="string"?y:y.name),f=s.length===0?Ze:s,i,d=[],l=new Set;for(let y of f){let w=await qf(y);typeof w=="string"?d.push({name:y,err:w}):(i||(i=w),i===w&&l.add(y))}if(!i)throw new Error(`no available backend found. ERR: ${d.map(y=>`[${y.name}] ${y.err}`).join(", ")}`);for(let{name:y,err:w}of d)s.includes(y)&&console.warn(`removing requested execution provider "${y}" from session options because it is not available: ${w}`);let m=r.filter(y=>l.has(typeof y=="string"?y:y.name));return[i,new Proxy(a,{get:(y,w)=>w==="executionProviders"?m:Reflect.get(y,w)})]}});var va=k(()=>{"use strict";Yr()});var Ea,Sa=k(()=>{"use strict";Ea="1.26.0"});var Aa,ie,Jr=k(()=>{"use strict";Sa();Aa="warning",ie={wasm:{},webgl:{},webgpu:{},versions:{common:Ea},set logLevel(a){if(a!==void 0){if(typeof a!="string"||["verbose","info","warning","error","fatal"].indexOf(a)===-1)throw new Error(`Unsupported logging level: ${a}`);Aa=a}},get logLevel(){return Aa}};Object.defineProperty(ie,"logLevel",{enumerable:!0})});var K,Ia=k(()=>{"use strict";Jr();K=ie});var xa,La,Oa=k(()=>{"use strict";xa=(a,r)=>{let s=typeof document<"u"?document.createElement("canvas"):new OffscreenCanvas(1,1);s.width=a.dims[3],s.height=a.dims[2];let f=s.getContext("2d");if(f!=null){let i,d;r?.tensorLayout!==void 0&&r.tensorLayout==="NHWC"?(i=a.dims[2],d=a.dims[3]):(i=a.dims[3],d=a.dims[2]);let l=r?.format!==void 0?r.format:"RGB",m=r?.norm,y,w;m===void 0||m.mean===void 0?y=[255,255,255,255]:typeof m.mean=="number"?y=[m.mean,m.mean,m.mean,m.mean]:(y=[m.mean[0],m.mean[1],m.mean[2],0],m.mean[3]!==void 0&&(y[3]=m.mean[3])),m===void 0||m.bias===void 0?w=[0,0,0,0]:typeof m.bias=="number"?w=[m.bias,m.bias,m.bias,m.bias]:(w=[m.bias[0],m.bias[1],m.bias[2],0],m.bias[3]!==void 0&&(w[3]=m.bias[3]));let T=d*i,g=0,v=T,S=T*2,C=-1;l==="RGBA"?(g=0,v=T,S=T*2,C=T*3):l==="RGB"?(g=0,v=T,S=T*2):l==="RBG"&&(g=0,S=T,v=T*2);for(let R=0;R<d;R++)for(let H=0;H<i;H++){let U=(a.data[g++]-w[0])*y[0],M=(a.data[v++]-w[1])*y[1],q=(a.data[S++]-w[2])*y[2],O=C===-1?255:(a.data[C++]-w[3])*y[3];f.fillStyle="rgba("+U+","+M+","+q+","+O+")",f.fillRect(H,R,1,1)}if("toDataURL"in s)return s.toDataURL();throw new Error("toDataURL is not supported")}else throw new Error("Can not access image data")},La=(a,r)=>{let s=typeof document<"u"?document.createElement("canvas").getContext("2d"):new OffscreenCanvas(1,1).getContext("2d"),f;if(s!=null){let i,d,l;r?.tensorLayout!==void 0&&r.tensorLayout==="NHWC"?(i=a.dims[2],d=a.dims[1],l=a.dims[3]):(i=a.dims[3],d=a.dims[2],l=a.dims[1]);let m=r!==void 0&&r.format!==void 0?r.format:"RGB",y=r?.norm,w,T;y===void 0||y.mean===void 0?w=[255,255,255,255]:typeof y.mean=="number"?w=[y.mean,y.mean,y.mean,y.mean]:(w=[y.mean[0],y.mean[1],y.mean[2],255],y.mean[3]!==void 0&&(w[3]=y.mean[3])),y===void 0||y.bias===void 0?T=[0,0,0,0]:typeof y.bias=="number"?T=[y.bias,y.bias,y.bias,y.bias]:(T=[y.bias[0],y.bias[1],y.bias[2],0],y.bias[3]!==void 0&&(T[3]=y.bias[3]));let g=d*i;if(r!==void 0&&(r.format!==void 0&&l===4&&r.format!=="RGBA"||l===3&&r.format!=="RGB"&&r.format!=="BGR"))throw new Error("Tensor format doesn't match input tensor dims");let v=4,S=0,C=1,R=2,H=3,U=0,M=g,q=g*2,O=-1;m==="RGBA"?(U=0,M=g,q=g*2,O=g*3):m==="RGB"?(U=0,M=g,q=g*2):m==="RBG"&&(U=0,q=g,M=g*2),f=s.createImageData(i,d);for(let W=0;W<d*i;S+=v,C+=v,R+=v,H+=v,W++)f.data[S]=(a.data[U++]-T[0])*w[0],f.data[C]=(a.data[M++]-T[1])*w[1],f.data[R]=(a.data[q++]-T[2])*w[2],f.data[H]=O===-1?255:(a.data[O++]-T[3])*w[3]}else throw new Error("Can not access image data");return f}});var Xr,Ba,Ma,Ca,Ua,Da,Pa=k(()=>{"use strict";jt();Xr=(a,r)=>{if(a===void 0)throw new Error("Image buffer must be defined");if(r.height===void 0||r.width===void 0)throw new Error("Image height and width must be defined");if(r.tensorLayout==="NHWC")throw new Error("NHWC Tensor layout is not supported yet");let{height:s,width:f}=r,i=r.norm??{mean:255,bias:0},d,l;typeof i.mean=="number"?d=[i.mean,i.mean,i.mean,i.mean]:d=[i.mean[0],i.mean[1],i.mean[2],i.mean[3]??255],typeof i.bias=="number"?l=[i.bias,i.bias,i.bias,i.bias]:l=[i.bias[0],i.bias[1],i.bias[2],i.bias[3]??0];let m=r.format!==void 0?r.format:"RGBA",y=r.tensorFormat!==void 0&&r.tensorFormat!==void 0?r.tensorFormat:"RGB",w=s*f,T=y==="RGBA"?new Float32Array(w*4):new Float32Array(w*3),g=4,v=0,S=1,C=2,R=3,H=0,U=w,M=w*2,q=-1;m==="RGB"&&(g=3,v=0,S=1,C=2,R=-1),y==="RGBA"?q=w*3:y==="RBG"?(H=0,M=w,U=w*2):y==="BGR"&&(M=0,U=w,H=w*2);for(let W=0;W<w;W++,v+=g,C+=g,S+=g,R+=g)T[H++]=(a[v]+l[0])/d[0],T[U++]=(a[S]+l[1])/d[1],T[M++]=(a[C]+l[2])/d[2],q!==-1&&R!==-1&&(T[q++]=(a[R]+l[3])/d[3]);return y==="RGBA"?new le("float32",T,[1,4,s,f]):new le("float32",T,[1,3,s,f])},Ba=async(a,r)=>{let s=typeof HTMLImageElement<"u"&&a instanceof HTMLImageElement,f=typeof ImageData<"u"&&a instanceof ImageData,i=typeof ImageBitmap<"u"&&a instanceof ImageBitmap,d=typeof a=="string",l,m=r??{},y=()=>{if(typeof document<"u")return document.createElement("canvas");if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(1,1);throw new Error("Canvas is not supported")},w=T=>typeof HTMLCanvasElement<"u"&&T instanceof HTMLCanvasElement||T instanceof OffscreenCanvas?T.getContext("2d"):null;if(s){let T=y();T.width=a.width,T.height=a.height;let g=w(T);if(g!=null){let v=a.height,S=a.width;if(r!==void 0&&r.resizedHeight!==void 0&&r.resizedWidth!==void 0&&(v=r.resizedHeight,S=r.resizedWidth),r!==void 0){if(m=r,r.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");m.tensorFormat="RGBA",m.height=v,m.width=S}else m.tensorFormat="RGBA",m.height=v,m.width=S;g.drawImage(a,0,0),l=g.getImageData(0,0,S,v).data}else throw new Error("Can not access image data")}else if(f){let T,g;if(r!==void 0&&r.resizedWidth!==void 0&&r.resizedHeight!==void 0?(T=r.resizedHeight,g=r.resizedWidth):(T=a.height,g=a.width),r!==void 0&&(m=r),m.format="RGBA",m.height=T,m.width=g,r!==void 0){let v=y();v.width=g,v.height=T;let S=w(v);if(S!=null)S.putImageData(a,0,0),l=S.getImageData(0,0,g,T).data;else throw new Error("Can not access image data")}else l=a.data}else if(i){if(r===void 0)throw new Error("Please provide image config with format for Imagebitmap");let T=y();T.width=a.width,T.height=a.height;let g=w(T);if(g!=null){let v=a.height,S=a.width;return g.drawImage(a,0,0,S,v),l=g.getImageData(0,0,S,v).data,m.height=v,m.width=S,Xr(l,m)}else throw new Error("Can not access image data")}else{if(d)return new Promise((T,g)=>{let v=y(),S=w(v);if(!a||!S)return g();let C=new Image;C.crossOrigin="Anonymous",C.src=a,C.onload=()=>{v.width=C.width,v.height=C.height,S.drawImage(C,0,0,v.width,v.height);let R=S.getImageData(0,0,v.width,v.height);m.height=v.height,m.width=v.width,T(Xr(R.data,m))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(l!==void 0)return Xr(l,m);throw new Error("Input data provided is not supported - aborted tensor creation")},Ma=(a,r)=>{let{width:s,height:f,download:i,dispose:d}=r,l=[1,f,s,4];return new le({location:"texture",type:"float32",texture:a,dims:l,download:i,dispose:d})},Ca=(a,r)=>{let{dataType:s,dims:f,download:i,dispose:d}=r;return new le({location:"gpu-buffer",type:s??"float32",gpuBuffer:a,dims:f,download:i,dispose:d})},Ua=(a,r)=>{let{dataType:s,dims:f,download:i,dispose:d}=r;return new le({location:"ml-tensor",type:s??"float32",mlTensor:a,dims:f,download:i,dispose:d})},Da=(a,r,s)=>new le({location:"cpu-pinned",type:a,data:r,dims:s??[r.length]})});var et,It,_a,Ra,Na=k(()=>{"use strict";et=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array],["int4",Uint8Array],["uint4",Uint8Array]]),It=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]),_a=!1,Ra=()=>{if(!_a){_a=!0;let a=typeof BigInt64Array<"u"&&BigInt64Array.from,r=typeof BigUint64Array<"u"&&BigUint64Array.from,s=globalThis.Float16Array,f=typeof s<"u"&&s.from;a&&(et.set("int64",BigInt64Array),It.set(BigInt64Array,"int64")),r&&(et.set("uint64",BigUint64Array),It.set(BigUint64Array,"uint64")),f?(et.set("float16",s),It.set(s,"float16")):et.set("float16",Uint16Array)}}});var ka,Wa,Fa=k(()=>{"use strict";jt();ka=a=>{let r=1;for(let s=0;s<a.length;s++){let f=a[s];if(typeof f!="number"||!Number.isSafeInteger(f))throw new TypeError(`dims[${s}] must be an integer, got: ${f}`);if(f<0)throw new RangeError(`dims[${s}] must be a non-negative integer, got: ${f}`);r*=f}return r},Wa=(a,r)=>{switch(a.location){case"cpu":return new le(a.type,a.data,r);case"cpu-pinned":return new le({location:"cpu-pinned",data:a.data,type:a.type,dims:r});case"texture":return new le({location:"texture",texture:a.texture,type:a.type,dims:r});case"gpu-buffer":return new le({location:"gpu-buffer",gpuBuffer:a.gpuBuffer,type:a.type,dims:r});case"ml-tensor":return new le({location:"ml-tensor",mlTensor:a.mlTensor,type:a.type,dims:r});default:throw new Error(`tensorReshape: tensor location ${a.location} is not supported`)}}});var le,jt=k(()=>{"use strict";Oa();Pa();Na();Fa();le=class{constructor(r,s,f){Ra();let i,d;if(typeof r=="object"&&"location"in r)switch(this.dataLocation=r.location,i=r.type,d=r.dims,r.location){case"cpu-pinned":{let m=et.get(i);if(!m)throw new TypeError(`unsupported type "${i}" to create tensor from pinned buffer`);if(!(r.data instanceof m))throw new TypeError(`buffer should be of type ${m.name}`);this.cpuData=r.data;break}case"texture":{if(i!=="float32")throw new TypeError(`unsupported type "${i}" to create tensor from texture`);this.gpuTextureData=r.texture,this.downloader=r.download,this.disposer=r.dispose;break}case"gpu-buffer":{if(i!=="float32"&&i!=="float16"&&i!=="int32"&&i!=="int64"&&i!=="uint32"&&i!=="uint8"&&i!=="bool"&&i!=="uint4"&&i!=="int4")throw new TypeError(`unsupported type "${i}" to create tensor from gpu buffer`);this.gpuBufferData=r.gpuBuffer,this.downloader=r.download,this.disposer=r.dispose;break}case"ml-tensor":{if(i!=="float32"&&i!=="float16"&&i!=="int32"&&i!=="int64"&&i!=="uint32"&&i!=="uint64"&&i!=="int8"&&i!=="uint8"&&i!=="bool"&&i!=="uint4"&&i!=="int4")throw new TypeError(`unsupported type "${i}" to create tensor from MLTensor`);this.mlTensorData=r.mlTensor,this.downloader=r.download,this.disposer=r.dispose;break}default:throw new Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let m,y;if(typeof r=="string")if(i=r,y=f,r==="string"){if(!Array.isArray(s))throw new TypeError("A string tensor's data must be a string array.");m=s}else{let w=et.get(r);if(w===void 0)throw new TypeError(`Unsupported tensor type: ${r}.`);if(Array.isArray(s)){if(r==="float16"&&w===Uint16Array||r==="uint4"||r==="int4")throw new TypeError(`Creating a ${r} tensor from number array is not supported. Please use ${w.name} as data.`);r==="uint64"||r==="int64"?m=w.from(s,BigInt):m=w.from(s)}else if(s instanceof w)m=s;else if(s instanceof Uint8ClampedArray)if(r==="uint8")m=Uint8Array.from(s);else throw new TypeError("A Uint8ClampedArray tensor's data must be type of uint8");else if(r==="float16"&&s instanceof Uint16Array&&w!==Uint16Array)m=new globalThis.Float16Array(s.buffer,s.byteOffset,s.length);else throw new TypeError(`A ${i} tensor's data must be type of ${w}`)}else if(y=s,Array.isArray(r)){if(r.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");let w=typeof r[0];if(w==="string")i="string",m=r;else if(w==="boolean")i="bool",m=Uint8Array.from(r);else throw new TypeError(`Invalid element type of data array: ${w}.`)}else if(r instanceof Uint8ClampedArray)i="uint8",m=Uint8Array.from(r);else{let w=It.get(r.constructor);if(w===void 0)throw new TypeError(`Unsupported type for tensor data: ${r.constructor}.`);i=w,m=r}if(y===void 0)y=[m.length];else if(!Array.isArray(y))throw new TypeError("A tensor's dims must be a number array");d=y,this.cpuData=m,this.dataLocation="cpu"}let l=ka(d);if(this.cpuData&&l!==this.cpuData.length&&!((i==="uint4"||i==="int4")&&Math.ceil(l/2)===this.cpuData.length))throw new Error(`Tensor's size(${l}) does not match data length(${this.cpuData.length}).`);this.type=i,this.dims=d,this.size=l}static async fromImage(r,s){return Ba(r,s)}static fromTexture(r,s){return Ma(r,s)}static fromGpuBuffer(r,s){return Ca(r,s)}static fromMLTensor(r,s){return Ua(r,s)}static fromPinnedBuffer(r,s,f){return Da(r,s,f)}toDataURL(r){return xa(this,r)}toImageData(r){return La(this,r)}get data(){if(this.ensureValid(),!this.cpuData)throw new Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw new Error("The data is not stored as a WebGL texture.");return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw new Error("The data is not stored as a WebGPU buffer.");return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw new Error("The data is not stored as a WebNN MLTensor.");return this.mlTensorData}async getData(r){switch(this.ensureValid(),this.dataLocation){case"cpu":case"cpu-pinned":return this.data;case"texture":case"gpu-buffer":case"ml-tensor":{if(!this.downloader)throw new Error("The current tensor is not created with a specified data downloader.");if(this.isDownloading)throw new Error("The current tensor is being downloaded.");try{this.isDownloading=!0;let s=await this.downloader();return this.downloader=void 0,this.dataLocation="cpu",this.cpuData=s,r&&this.disposer&&(this.disposer(),this.disposer=void 0),s}finally{this.isDownloading=!1}}default:throw new Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw new Error("The current tensor is being downloaded.");this.disposer&&(this.disposer(),this.disposer=void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation="none"}ensureValid(){if(this.dataLocation==="none")throw new Error("The tensor is disposed.")}reshape(r){if(this.ensureValid(),this.downloader||this.disposer)throw new Error("Cannot reshape a tensor that owns GPU resource.");return Wa(this,r)}}});var Le,Qr=k(()=>{"use strict";jt();Le=le});var Ga,$a,tt,rt,$e,ze,Zr=k(()=>{"use strict";Jr();Ga=(a,r)=>{(typeof ie.trace>"u"?!ie.wasm.trace:!ie.trace)||console.timeStamp(`${a}::ORT::${r}`)},$a=(a,r)=>{let s=new Error().stack?.split(/\r\n|\r|\n/g)||[],f=!1;for(let i=0;i<s.length;i++){if(f&&!s[i].includes("TRACE_FUNC")){let d=`FUNC_${a}::${s[i].trim().split(" ")[1]}`;r&&(d+=`::${r}`),Ga("CPU",d);return}s[i].includes("TRACE_FUNC")&&(f=!0)}},tt=a=>{(typeof ie.trace>"u"?!ie.wasm.trace:!ie.trace)||$a("BEGIN",a)},rt=a=>{(typeof ie.trace>"u"?!ie.wasm.trace:!ie.trace)||$a("END",a)},$e=a=>{(typeof ie.trace>"u"?!ie.wasm.trace:!ie.trace)||console.time(`ORT::${a}`)},ze=a=>{(typeof ie.trace>"u"?!ie.wasm.trace:!ie.trace)||console.timeEnd(`ORT::${a}`)}});var Ht,za=k(()=>{"use strict";Yr();Qr();Zr();Ht=class a{constructor(r){this.handler=r}async run(r,s,f){tt(),$e("InferenceSession.run");let i={},d={};if(typeof r!="object"||r===null||r instanceof Le||Array.isArray(r))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let l=!0;if(typeof s=="object"){if(s===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(s instanceof Le)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(s)){if(s.length===0)throw new TypeError("'fetches' cannot be an empty array.");l=!1;for(let w of s){if(typeof w!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(w)===-1)throw new RangeError(`'fetches' contains invalid output name: ${w}.`);i[w]=null}if(typeof f=="object"&&f!==null)d=f;else if(typeof f<"u")throw new TypeError("'options' must be an object.")}else{let w=!1,T=Object.getOwnPropertyNames(s);for(let g of this.outputNames)if(T.indexOf(g)!==-1){let v=s[g];(v===null||v instanceof Le)&&(w=!0,l=!1,i[g]=v)}if(w){if(typeof f=="object"&&f!==null)d=f;else if(typeof f<"u")throw new TypeError("'options' must be an object.")}else d=s}}else if(typeof s<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(let w of this.inputNames)if(typeof r[w]>"u")throw new Error(`input '${w}' is missing in 'feeds'.`);if(l)for(let w of this.outputNames)i[w]=null;let m=await this.handler.run(r,i,d),y={};for(let w in m)if(Object.hasOwnProperty.call(m,w)){let T=m[w];T instanceof Le?y[w]=T:y[w]=new Le(T.type,T.data,T.dims)}return ze("InferenceSession.run"),rt(),y}async release(){return this.handler.dispose()}static async create(r,s,f,i){tt(),$e("InferenceSession.create");let d,l={};if(typeof r=="string"){if(d=r,typeof s=="object"&&s!==null)l=s;else if(typeof s<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof Uint8Array){if(d=r,typeof s=="object"&&s!==null)l=s;else if(typeof s<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer){let T=r,g=0,v=r.byteLength;if(typeof s=="object"&&s!==null)l=s;else if(typeof s=="number"){if(g=s,!Number.isSafeInteger(g))throw new RangeError("'byteOffset' must be an integer.");if(g<0||g>=T.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${T.byteLength}).`);if(v=r.byteLength-g,typeof f=="number"){if(v=f,!Number.isSafeInteger(v))throw new RangeError("'byteLength' must be an integer.");if(v<=0||g+v>T.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${T.byteLength-g}].`);if(typeof i=="object"&&i!==null)l=i;else if(typeof i<"u")throw new TypeError("'options' must be an object.")}else if(typeof f<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof s<"u")throw new TypeError("'options' must be an object.");d=new Uint8Array(T,g,v)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");let[m,y]=await Ta(l),w=await m.createInferenceSessionHandler(d,y);return ze("InferenceSession.create"),rt(),new a(w)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}get inputMetadata(){return this.handler.inputMetadata}get outputMetadata(){return this.handler.outputMetadata}}});var Yf,Va=k(()=>{"use strict";za();Yf=Ht});var ja=k(()=>{"use strict"});var Ha=k(()=>{"use strict"});var qa=k(()=>{"use strict"});var Ya=k(()=>{"use strict"});var Kr={};At(Kr,{InferenceSession:()=>Yf,TRACE:()=>Ga,TRACE_EVENT_BEGIN:()=>$e,TRACE_EVENT_END:()=>ze,TRACE_FUNC_BEGIN:()=>tt,TRACE_FUNC_END:()=>rt,Tensor:()=>Le,env:()=>K,registerBackend:()=>Ke});var Ve=k(()=>{"use strict";va();Ia();Va();Qr();ja();Ha();Zr();qa();Ya()});var qt=k(()=>{"use strict"});var Za={};At(Za,{default:()=>Jf});var Xa,Qa,Jf,Ka=k(()=>{"use strict";en();je();Yt();Xa="ort-wasm-proxy-worker",Qa=globalThis.self?.name===Xa;Qa&&(self.onmessage=a=>{let{type:r,in:s}=a.data;try{switch(r){case"init-wasm":Jt(s.wasm).then(()=>{Xt(s).then(()=>{postMessage({type:r})},f=>{postMessage({type:r,err:f})})},f=>{postMessage({type:r,err:f})});break;case"init-ep":{let{epName:f,env:i}=s;Qt(i,f).then(()=>{postMessage({type:r})},d=>{postMessage({type:r,err:d})});break}case"copy-from":{let{buffer:f}=s,i=xt(f);postMessage({type:r,out:i});break}case"create":{let{model:f,options:i}=s;Zt(f,i).then(d=>{postMessage({type:r,out:d})},d=>{postMessage({type:r,err:d})});break}case"release":Kt(s),postMessage({type:r});break;case"run":{let{sessionId:f,inputIndices:i,inputs:d,outputIndices:l,options:m}=s;er(f,i,d,l,new Array(l.length).fill(null),m).then(y=>{y.some(w=>w[3]!=="cpu")?postMessage({type:r,err:"Proxy does not support non-cpu tensor location."}):postMessage({type:r,out:y},rr([...d,...y]))},y=>{postMessage({type:r,err:y})});break}case"end-profiling":tr(s),postMessage({type:r});break;default:}}catch(f){postMessage({type:r,err:f})}});Jf=Qa?null:a=>new Worker(a??ge,{type:"module",name:Xa})});var ts={};At(ts,{default:()=>Xf});async function es(a={}){var r=a,s=!!globalThis.window,f=!!globalThis.WorkerGlobalScope,i=f&&self.name?.startsWith("em-pthread");r.mountExternalData=(e,t)=>{e.startsWith("./")&&(e=e.substring(2)),(r.Uc||(r.Uc=new Map)).set(e,t)},r.unmountExternalData=()=>{delete r.Uc},globalThis.SharedArrayBuffer??new WebAssembly.Memory({initial:0,maximum:0,shared:!0}).buffer.constructor;let d=()=>{let e=t=>(...n)=>{let o=Me;return n=t(...n),Me!=o?new Promise((u,c)=>{Or={resolve:u,reject:c}}):n};(()=>{for(let t of["_OrtAppendExecutionProvider","_OrtCreateSession","_OrtRun","_OrtRunWithBinding","_OrtBindInput"])r[t]=e(r[t])})(),typeof jsepRunAsync<"u"&&(r._OrtRun=jsepRunAsync(r._OrtRun),r._OrtRunWithBinding=jsepRunAsync(r._OrtRunWithBinding)),d=void 0};r.asyncInit=()=>{d?.()};var l,m,y=(e,t)=>{throw t},w=import.meta.url,T="";if(s||f){try{T=new URL(".",w).href}catch{}f&&(m=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),l=async e=>{if(oe(e))return new Promise((n,o)=>{var u=new XMLHttpRequest;u.open("GET",e,!0),u.responseType="arraybuffer",u.onload=()=>{u.status==200||u.status==0&&u.response?n(u.response):o(u.status)},u.onerror=o,u.send(null)});var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw Error(t.status+" : "+t.url)}}var g,v,S,C,R,H,U=console.log.bind(console),M=console.error.bind(console),q=U,O=M,W=!1,oe=e=>e.startsWith("file://");function p(){Fe.buffer!=X.buffer&&se()}if(i){let e=function(t){try{var n=t.data,o=n.Oc;if(o==="load"){let u=[];self.onmessage=c=>u.push(c),H=()=>{postMessage({Oc:"loaded"});for(let c of u)e(c);self.onmessage=e};for(let c of n.ce)r[c]&&!r[c].proxy||(r[c]=(...h)=>{postMessage({Oc:"callHandler",be:c,args:h})},c=="print"&&(q=r[c]),c=="printErr"&&(O=r[c]));Fe=n.ie,se(),v=n.je,bt(),$t()}else if(o==="run"){(function(u){var c=(p(),A)[u+52>>>2>>>0];u=(p(),A)[u+56>>>2>>>0],Co(c,c-u),D(c)})(n.Nc),Fr(n.Nc,0,0,1,0,0),bn(),Ir(n.Nc),ne||(po(),ne=!0);try{$s(n.ge,n.Wc)}catch(u){if(u!="unwind")throw u}}else n.target!=="setimmediate"&&(o==="checkMailbox"?ne&&Pt():o&&(O(`worker: received unknown command ${o}`),O(n)))}catch(u){throw xo(),u}};var vc=e,ne=!1;self.onunhandledrejection=t=>{throw t.reason||t},self.onmessage=e}var X,J,Ue,Q,x,A,_,ae,me,Y,we,re=!1;function se(){var e=Fe.buffer;r.HEAP8=X=new Int8Array(e),Ue=new Int16Array(e),r.HEAPU8=J=new Uint8Array(e),Q=new Uint16Array(e),r.HEAP32=x=new Int32Array(e),r.HEAPU32=A=new Uint32Array(e),_=new Float32Array(e),ae=new Float64Array(e),me=new BigInt64Array(e),Y=new BigUint64Array(e)}function yr(){re=!0,i?H():ke._b()}function Te(e){throw O(e="Aborted("+e+")"),W=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),R?.(e),e}function qe(){return{a:{f:zs,J:Vs,k:js,p:Hs,l:qs,sa:Ys,b:Js,ca:Xs,Ja:Sn,q:Qs,da:Ln,Za:On,Fa:Bn,Ha:Mn,_a:Cn,Xa:Un,Qa:Dn,Wa:Pn,oa:_n,Ga:Rn,Xb:Nn,Ya:kn,Yb:Wn,db:Zs,Da:ei,Sb:ti,Qb:ni,Ca:ai,M:si,I:ii,Rb:ui,ja:hi,Tb:yi,Ta:bi,Vb:gi,Ka:Ti,Ob:vi,ka:Ei,Sa:Ir,ab:Si,U:Li,n:Ui,c:Sr,rb:Di,w:Pi,L:_i,z:Ri,j:Ni,o:qn,sb:ki,G:Wi,T:Fi,h:Gi,u:$i,m:zi,i:Vi,Na:ji,Oa:Hi,Pa:qi,La:Qn,Ma:Zn,Pb:Kn,eb:Ji,cb:Zi,Y:Ki,qb:eu,la:tu,bb:Xi,fb:ru,$a:nu,Wb:ou,N:Yi,gb:au,X:su,Ub:iu,nb:yu,C:bu,ra:wu,qa:gu,pb:Tu,W:vu,v:Eu,mb:Su,lb:Au,kb:Iu,ob:xu,jb:Lu,ib:Ou,hb:Bu,Ua:ao,Va:so,Ia:wr,V:io,na:uo,Ra:fo,ma:co,Cb:Ff,xa:Pf,Db:Wf,ya:Df,F:Ef,e:ff,s:sf,x:af,B:gf,Fb:Mf,ba:Bf,D:lf,za:Cf,$:_f,ga:Of,Gb:Lf,Hb:xf,Ba:Sf,Aa:If,Ib:Af,wa:kf,aa:Uf,d:uf,A:df,r:cf,Bb:Gf,t:mf,y:Tf,H:pf,E:hf,K:vf,R:Rf,ia:wf,_:Nf,Jb:bf,Kb:yf,g:Cu,a:Fe,Nb:Ye,Eb:Uu,ha:Du,O:Pu,pa:_u,Lb:Ru,ta:Nu,Q:ku,yb:Wu,zb:Fu,ua:Gu,ea:$u,P:zu,Ea:Vu,va:ju,Z:Hu,wb:qu,Zb:Yu,S:Ju,Ab:Xu,tb:Qu,ub:Ku,vb:ef,fa:tf,xb:rf,Mb:nf}}}async function bt(){function e(o,u){var c=ke=o.exports;o={};for(let[h,b]of Object.entries(c))typeof b=="function"?(c=Ai(b),o[h]=c):o[h]=b;return ke=o,ke=function(){var h=ke,b=I=>F=>I(F)>>>0,E=I=>()=>I()>>>0;return(h=Object.assign({},h)).$b=b(h.$b),h.Cc=E(h.Cc),h.Ec=b(h.Ec),h.rd=(I=>(F,j)=>I(F,j)>>>0)(h.rd),h.wd=b(h.wd),h.xd=E(h.xd),h.Bd=b(h.Bd),h}(),hn.push(ke.id),lo=(o=ke).$b,po=o.ac,r._OrtInit=o.bc,r._OrtGetLastError=o.cc,r._OrtCreateSessionOptions=o.dc,r._OrtAppendExecutionProvider=o.ec,r._OrtAddFreeDimensionOverride=o.fc,r._OrtAddSessionConfigEntry=o.gc,r._OrtReleaseSessionOptions=o.hc,r._OrtCreateSession=o.ic,r._OrtReleaseSession=o.jc,r._OrtGetInputOutputCount=o.kc,r._OrtGetInputOutputMetadata=o.lc,r._OrtFree=o.mc,r._OrtCreateTensor=o.nc,r._OrtGetTensorData=o.oc,r._OrtReleaseTensor=o.pc,r._OrtCreateRunOptions=o.qc,r._OrtAddRunConfigEntry=o.rc,r._OrtReleaseRunOptions=o.sc,r._OrtCreateBinding=o.tc,r._OrtBindInput=o.uc,r._OrtBindOutput=o.vc,r._OrtClearBoundOutputs=o.wc,r._OrtReleaseBinding=o.xc,r._OrtRunWithBinding=o.yc,r._OrtRun=o.zc,r._OrtEndProfiling=o.Ac,Pr=r._OrtGetWebGpuDevice=o.Bc,Ft=o.Cc,xe=r._free=o.Dc,pt=r._malloc=o.Ec,mo=r._wgpuBufferRelease=o.Fc,ho=r._wgpuCreateInstance=o.Gc,yo=o.Hc,bo=o.Ic,wo=o.Jc,go=o.Kc,To=o.Lc,vo=o.Pc,Eo=o.Zc,So=o._c,Ao=o.$c,_r=o.bd,Rr=o.cd,Nr=o.dd,kr=o.ed,Et=o.fd,Wr=o.gd,Io=o.hd,Fr=o.kd,xo=o.ld,Lo=o.md,Oo=o.nd,Gr=o.od,Bo=o.pd,Mo=o.qd,$r=o.rd,N=o.sd,St=o.td,Co=o.ud,D=o.vd,Gt=o.wd,P=o.xd,Uo=o.yd,zr=o.zd,Do=o.Ad,Po=o.Bd,_o=o.Cd,Vr=o.Dd,Ro=o.Ed,No=o.Fd,ko=o.Gd,Wo=o.Hd,Fo=o.Id,Go=o.Jd,$o=o.Kd,zo=o.Ld,Vo=o.Md,jo=o.Nd,Ho=o.Od,qo=o.Pd,Yo=o.Qd,Jo=o.Rd,Xo=o.Td,Qo=o.Ud,Zo=o.Vd,Ko=o.Wd,ea=o.Yd,ta=o.Zd,ra=o._d,na=o.$d,oa=o.ae,aa=o.oe,sa=o.pe,ia=o.qe,ua=o.re,fa=o.se,ca=o.te,da=o.ue,la=o.ve,pa=o.we,ma=o.xe,ha=o.ye,ya=o.Ye,ba=o.Ze,wa=o._e,ga=o.$e,v=u,ke}var t,n=qe();return r.instantiateWasm?new Promise(o=>{r.instantiateWasm(n,(u,c)=>{o(e(u,c))})}):i?e(new WebAssembly.Instance(v,qe()),v):(we??=r.locateFile?r.locateFile?r.locateFile("ort-wasm-simd-threaded.asyncify.wasm",T):T+"ort-wasm-simd-threaded.asyncify.wasm":new URL("ort-wasm-simd-threaded.asyncify.wasm",import.meta.url).href,t=await async function(o){var u=we;if(!g&&!oe(u))try{var c=fetch(u,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(c,o)}catch(h){O(`wasm streaming compile failed: ${h}`),O("falling back to ArrayBuffer instantiation")}return async function(h,b){try{var E=await async function(I){if(!g)try{var F=await l(I);return new Uint8Array(F)}catch{}if(I==we&&g)I=new Uint8Array(g);else{if(!m)throw"both async and sync fetching of the wasm failed";I=m(I)}return I}(h);return await WebAssembly.instantiate(E,b)}catch(I){O(`failed to asynchronously prepare wasm: ${I}`),Te(I)}}(u,o)}(n),e(t.instance,t.module))}class wt{name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`,this.status=t}}var Se=e=>{e.terminate(),e.onmessage=()=>{}},Ae=[],Oe=0,ee=null,Z=e=>{We.length==0&&(gn(),wn(We[0]));var t=We.pop();if(!t)return 6;gt.push(t),Je[e.Nc]=t,t.Nc=e.Nc;var n={Oc:"run",ge:e.fe,Wc:e.Wc,Nc:e.Nc};return t.postMessage(n,e.Yc),0},G=0,V=(e,t,...n)=>{var o,u=16*n.length,c=P(),h=Gt(u),b=h>>>3;for(o of n)typeof o=="bigint"?((p(),me)[b++>>>0]=1n,(p(),me)[b++>>>0]=o):((p(),me)[b++>>>0]=0n,(p(),ae)[b++>>>0]=o);return e=Lo(e,0,u,h,t),D(c),e};function Ye(e){if(i)return V(0,1,e);if(S=e,!(0<G)){for(var t of gt)Se(t);for(t of We)Se(t);We=[],gt=[],Je={},W=!0}y(0,new wt(e))}function br(e){if(i)return V(1,0,e);wr(e)}var wr=e=>{if(S=e,i)throw br(e),"unwind";Ye(e)},We=[],gt=[],hn=[],Je={},yn=e=>{var t=e.Nc;delete Je[t],We.push(e),gt.splice(gt.indexOf(e),1),e.Nc=0,Oo(t)};function bn(){hn.forEach(e=>e())}var wn=e=>new Promise(t=>{e.onmessage=u=>{var c=u.data;if(u=c.Oc,c.Vc&&c.Vc!=Ft()){var h=Je[c.Vc];h?h.postMessage(c,c.Yc):O(`Internal error! Worker sent a message "${u}" to target pthread ${c.Vc}, but that thread no longer exists!`)}else u==="checkMailbox"?Pt():u==="spawnThread"?Z(c):u==="cleanupThread"?he(()=>{yn(Je[c.he])}):u==="loaded"?(e.loaded=!0,t(e)):c.target==="setimmediate"?e.postMessage(c):u==="uncaughtException"?e.onerror(c.error):u==="callHandler"?r[c.be](...c.args):u&&O(`worker sent an unknown command ${u}`)},e.onerror=u=>{throw O(`worker sent an error! ${u.filename}:${u.lineno}: ${u.message}`),u};var n,o=[];for(n of[])r.propertyIsEnumerable(n)&&o.push(n);e.postMessage({Oc:"load",ce:o,ie:Fe,je:v})});function gn(){var e=new Worker((()=>{let t=URL;return import.meta.url>"file:"&&import.meta.url<"file;"?new t("ort.webgpu.bundle.min.mjs",import.meta.url):new URL(import.meta.url)})(),{type:"module",workerData:"em-pthread",name:"em-pthread"});We.push(e)}var Fe,$s=(e,t)=>{G=0,e=Vr(e,t),0<G?S=e:Gr(e)},Ut=[],Dt=0,ce=e=>-9007199254740992>e||9007199254740992<e?NaN:Number(e);function zs(e){var t=new gr(e>>>=0);return(p(),X)[t.Qc+12>>>0]==0&&(Tn(t,!0),Dt--),vn(t,!1),Ut.push(t),Po(e)}var ft=0,Vs=()=>{N(0,0);var e=Ut.pop();Uo(e.Xc),ft=0};function Tn(e,t){t=t?1:0,(p(),X)[e.Qc+12>>>0]=t}function vn(e,t){t=t?1:0,(p(),X)[e.Qc+13>>>0]=t}class gr{constructor(t){this.Xc=t,this.Qc=t-24}}var Tr=e=>{var t=ft;if(!t)return St(0),0;var n=new gr(t);(p(),A)[n.Qc+16>>>2>>>0]=t;var o=(p(),A)[n.Qc+4>>>2>>>0];if(!o)return St(0),t;for(var u of e){if(u===0||u===o)break;if(Do(u,o,n.Qc+16))return St(u),t}return St(o),t};function js(){return Tr([])}function Hs(e){return Tr([e>>>0])}function qs(e,t,n,o){return Tr([e>>>0,t>>>0,n>>>0,o>>>0])}var Ys=()=>{var e=Ut.pop();e||Te("no exception to throw");var t=e.Xc;throw(p(),X)[e.Qc+13>>>0]==0&&(Ut.push(e),vn(e,!0),Tn(e,!1),Dt++),zr(t),ft=t};function Js(e,t,n){var o=new gr(e>>>=0);throw t>>>=0,n>>>=0,(p(),A)[o.Qc+16>>>2>>>0]=0,(p(),A)[o.Qc+4>>>2>>>0]=t,(p(),A)[o.Qc+8>>>2>>>0]=n,zr(e),Dt++,ft=e}var Xs=()=>Dt;function En(e,t,n,o){return i?V(2,1,e,t,n,o):Sn(e,t,n,o)}function Sn(e,t,n,o){if(e>>>=0,t>>>=0,n>>>=0,o>>>=0,!globalThis.SharedArrayBuffer)return 6;var u=[];return i&&u.length===0?En(e,t,n,o):(e={fe:n,Nc:e,Wc:o,Yc:u},i?(e.Oc="spawnThread",postMessage(e,u),0):Z(e))}function Qs(e){throw ft||=e>>>0,ft}var An=globalThis.TextDecoder&&new TextDecoder,In=(e,t,n,o)=>{if(n=t+n,o)return n;for(;e[t]&&!(t>=n);)++t;return t},xn=(e,t=0,n,o)=>{if(16<(n=In(e,t>>>=0,n,o))-t&&e.buffer&&An)return An.decode(e.buffer instanceof ArrayBuffer?e.subarray(t,n):e.slice(t,n));for(o="";t<n;){var u=e[t++];if(128&u){var c=63&e[t++];if((224&u)==192)o+=String.fromCharCode((31&u)<<6|c);else{var h=63&e[t++];65536>(u=(240&u)==224?(15&u)<<12|c<<6|h:(7&u)<<18|c<<12|h<<6|63&e[t++])?o+=String.fromCharCode(u):(u-=65536,o+=String.fromCharCode(55296|u>>10,56320|1023&u))}}else o+=String.fromCharCode(u)}return o},ct=(e,t,n)=>(e>>>=0)?xn((p(),J),e,t,n):"";function Ln(e,t,n){return i?V(3,1,e,t,n):0}function On(e,t){if(i)return V(4,1,e,t)}function Bn(e,t){if(i)return V(5,1,e,t)}function Mn(e,t,n){if(i)return V(6,1,e,t,n)}function Cn(e,t,n){return i?V(7,1,e,t,n):0}function Un(e,t){if(i)return V(8,1,e,t)}function Dn(e,t,n){if(i)return V(9,1,e,t,n)}function Pn(e,t,n,o){if(i)return V(10,1,e,t,n,o)}function _n(e,t,n,o){if(i)return V(11,1,e,t,n,o)}function Rn(e,t,n,o){if(i)return V(12,1,e,t,n,o)}function Nn(e){if(i)return V(13,1,e)}function kn(e,t){if(i)return V(14,1,e,t)}function Wn(e,t,n){if(i)return V(15,1,e,t,n)}var Zs=()=>Te(""),Be=e=>{e>>>=0;for(var t="";;){var n=(p(),J)[e++>>>0];if(!n)return t;t+=String.fromCharCode(n)}},vr={},Er={},Ks={},dt=class extends Error{constructor(e){super(e),this.name="BindingError"}};function De(e,t,n={}){return function(o,u,c={}){var h=u.name;if(!o)throw new dt(`type "${h}" must have a positive integer typeid pointer`);if(Er.hasOwnProperty(o)){if(c.de)return;throw new dt(`Cannot register type '${h}' twice`)}Er[o]=u,delete Ks[o],vr.hasOwnProperty(o)&&(u=vr[o],delete vr[o],u.forEach(b=>b()))}(e,t,n)}var Fn=(e,t,n)=>{switch(t){case 1:return n?o=>(p(),X)[o>>>0]:o=>(p(),J)[o>>>0];case 2:return n?o=>(p(),Ue)[o>>>1>>>0]:o=>(p(),Q)[o>>>1>>>0];case 4:return n?o=>(p(),x)[o>>>2>>>0]:o=>(p(),A)[o>>>2>>>0];case 8:return n?o=>(p(),me)[o>>>3>>>0]:o=>(p(),Y)[o>>>3>>>0];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}};function ei(e,t,n,o,u){e>>>=0,n>>>=0,t=Be(t>>>0);let c=h=>h;if(o=o===0n){let h=8*n;c=b=>BigInt.asUintN(h,b),u=c(u)}De(e,{name:t,Mc:c,Sc:(h,b)=>(typeof b=="number"&&(b=BigInt(b)),b),Rc:Fn(t,n,!o),Tc:null})}function ti(e,t,n,o){De(e>>>=0,{name:t=Be(t>>>0),Mc:function(u){return!!u},Sc:function(u,c){return c?n:o},Rc:function(u){return this.Mc((p(),J)[u>>>0])},Tc:null})}var Gn=[],Xe=[0,1,,1,null,1,!0,1,!1,1];function Sr(e){9<(e>>>=0)&&--Xe[e+1]==0&&(Xe[e]=void 0,Gn.push(e))}var ve=e=>{if(!e)throw new dt(`Cannot use deleted val. handle = ${e}`);return Xe[e]},Ie=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let t=Gn.pop()||Xe.length;return Xe[t]=e,Xe[t+1]=1,t}};function Ar(e){return this.Mc((p(),A)[e>>>2>>>0])}var ri={name:"emscripten::val",Mc:e=>{var t=ve(e);return Sr(e),t},Sc:(e,t)=>Ie(t),Rc:Ar,Tc:null};function ni(e){return De(e>>>0,ri)}var oi=(e,t)=>{switch(t){case 4:return function(n){return this.Mc((p(),_)[n>>>2>>>0])};case 8:return function(n){return this.Mc((p(),ae)[n>>>3>>>0])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}};function ai(e,t,n){n>>>=0,De(e>>>=0,{name:t=Be(t>>>0),Mc:o=>o,Sc:(o,u)=>u,Rc:oi(t,n),Tc:null})}function si(e,t,n,o,u){e>>>=0,n>>>=0,t=Be(t>>>0);let c=b=>b;if(o===0){var h=32-8*n;c=b=>b<<h>>>h,u=c(u)}De(e,{name:t,Mc:c,Sc:(b,E)=>E,Rc:Fn(t,n,o!==0),Tc:null})}function ii(e,t,n){function o(c){var h=(p(),A)[c>>>2>>>0];return c=(p(),A)[c+4>>>2>>>0],new u((p(),X).buffer,c,h)}var u=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];De(e>>>=0,{name:n=Be(n>>>0),Mc:o,Rc:o},{de:!0})}var Pe=(e,t,n)=>{var o=(p(),J);if(t>>>=0,0<n){var u=t;n=t+n-1;for(var c=0;c<e.length;++c){var h=e.codePointAt(c);if(127>=h){if(t>=n)break;o[t++>>>0]=h}else if(2047>=h){if(t+1>=n)break;o[t++>>>0]=192|h>>6,o[t++>>>0]=128|63&h}else if(65535>=h){if(t+2>=n)break;o[t++>>>0]=224|h>>12,o[t++>>>0]=128|h>>6&63,o[t++>>>0]=128|63&h}else{if(t+3>=n)break;o[t++>>>0]=240|h>>18,o[t++>>>0]=128|h>>12&63,o[t++>>>0]=128|h>>6&63,o[t++>>>0]=128|63&h,c++}}o[t>>>0]=0,e=t-u}else e=0;return e},_e=e=>{for(var t=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);127>=o?t++:2047>=o?t+=2:55296<=o&&57343>=o?(t+=4,++n):t+=3}return t};function ui(e,t){De(e>>>=0,{name:t=Be(t>>>0),Mc(n){var o=(p(),A)[n>>>2>>>0];return o=ct(n+4,o,!0),xe(n),o},Sc(n,o){o instanceof ArrayBuffer&&(o=new Uint8Array(o));var u=typeof o=="string";if(!(u||ArrayBuffer.isView(o)&&o.BYTES_PER_ELEMENT==1))throw new dt("Cannot pass non-string to std::string");var c=u?_e(o):o.length,h=pt(4+c+1),b=h+4;return(p(),A)[h>>>2>>>0]=c,u?Pe(o,b,c+1):(p(),J).set(o,b>>>0),n!==null&&n.push(xe,h),h},Rc:Ar,Tc(n){xe(n)}})}var $n=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,fi=(e,t,n)=>{if(e>>>=1,16<(t=In((p(),Q),e,t/2,n))-e&&$n)return $n.decode((p(),Q).slice(e,t));for(n="";e<t;++e){var o=(p(),Q)[e>>>0];n+=String.fromCharCode(o)}return n},ci=(e,t,n)=>{if(n??=2147483647,2>n)return 0;var o=t;n=(n-=2)<2*e.length?n/2:e.length;for(var u=0;u<n;++u){var c=e.charCodeAt(u);(p(),Ue)[t>>>1>>>0]=c,t+=2}return(p(),Ue)[t>>>1>>>0]=0,t-o},di=e=>2*e.length,li=(e,t,n)=>{var o="";e>>>=2;for(var u=0;!(u>=t/4);u++){var c=(p(),A)[e+u>>>0];if(!c&&!n)break;o+=String.fromCodePoint(c)}return o},pi=(e,t,n)=>{if(t>>>=0,n??=2147483647,4>n)return 0;var o=t;n=o+n-4;for(var u=0;u<e.length;++u){var c=e.codePointAt(u);if(65535<c&&u++,(p(),x)[t>>>2>>>0]=c,(t+=4)+4>n)break}return(p(),x)[t>>>2>>>0]=0,t-o},mi=e=>{for(var t=0,n=0;n<e.length;++n)65535<e.codePointAt(n)&&n++,t+=4;return t};function hi(e,t,n){if(e>>>=0,t>>>=0,n=Be(n>>>=0),t===2)var o=fi,u=ci,c=di;else o=li,u=pi,c=mi;De(e,{name:n,Mc:h=>{var b=(p(),A)[h>>>2>>>0];return b=o(h+4,b*t,!0),xe(h),b},Sc:(h,b)=>{if(typeof b!="string")throw new dt(`Cannot pass non-string to C++ string type ${n}`);var E=c(b),I=pt(4+E+t);return(p(),A)[I>>>2>>>0]=E/t,u(b,I+4,E+t),h!==null&&h.push(xe,I),I},Rc:Ar,Tc(h){xe(h)}})}function yi(e,t){De(e>>>=0,{ee:!0,name:t=Be(t>>>0),Mc:()=>{},Sc:()=>{}})}function bi(e){Fr(e>>>0,!f,1,!s,131072,!1),bn()}var he=e=>{if(!W)try{if(e(),!(0<G))try{i?Ft()&&Gr(S):wr(S)}catch(t){t instanceof wt||t=="unwind"||y(0,t)}}catch(t){t instanceof wt||t=="unwind"||y(0,t)}},wi=!Atomics.waitAsync||globalThis.navigator?.userAgent&&91>Number((navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)||[])[2]);function Ir(e){e>>>=0,wi||(Atomics.waitAsync((p(),x),e>>>2,e).value.then(Pt),e+=128,Atomics.store((p(),x),e>>>2,1))}var Pt=()=>he(()=>{var e=Ft();e&&(Ir(e),Mo())});function gi(e,t){(e>>>=0)==t>>>0?setTimeout(Pt):i?postMessage({Vc:e,Oc:"checkMailbox"}):(e=Je[e])&&e.postMessage({Oc:"checkMailbox"})}var xr=[];function Ti(e,t,n,o,u){for(t>>>=0,u>>>=0,xr.length=0,n=u>>>3,o=u+o>>>3;n<o;){var c;c=(p(),me)[n++>>>0]?(p(),me)[n++>>>0]:(p(),ae)[n++>>>0],xr.push(c)}return(t?jr[t]:of[e])(...xr)}var vi=()=>{G=0};function Ei(e){e>>>=0,i?postMessage({Oc:"cleanupThread",he:e}):yn(Je[e])}function Si(e){}var _t=e=>{try{e()}catch(t){Te(t)}};function Ai(e){var t=(...n)=>{Rt.push(e);try{return e(...n)}finally{W||(Rt.pop(),Me&&Ge===1&&Rt.length===0&&(Ge=0,G+=1,_t(ba),typeof Fibers<"u"&&Fibers.Be()))}};return jn.set(e,t),t}var Ge=0,Me=null,zn=0,Rt=[],Lr=new Map,Vn=new Map,jn=new Map,Ii=0,Or=null,xi=[],Hn=e=>function(t){if(!W){if(Ge===0){var n=!1,o=!1;t((u=0)=>{if(!W&&(zn=u,n=!0,o)){Ge=2,_t(()=>wa(Me)),typeof MainLoop<"u"&&MainLoop.Xd&&MainLoop.resume(),u=!1;try{var c=function(){var E=(p(),x)[Me+8>>>2>>>0];return E=Vn.get(E),E=jn.get(E),--G,E()}()}catch(E){c=E,u=!0}var h=!1;if(!Me){var b=Or;b&&(Or=null,(u?b.reject:b.resolve)(c),h=!0)}if(u&&!h)throw c}}),o=!0,n||(Ge=1,Me=function(){var u=pt(65548),c=u+12;if((p(),A)[u>>>2>>>0]=c,(p(),A)[u+4>>>2>>>0]=c+65536,c=Rt[0],!Lr.has(c)){var h=Ii++;Lr.set(c,h),Vn.set(h,c)}return c=Lr.get(c),(p(),x)[u+8>>>2>>>0]=c,u}(),typeof MainLoop<"u"&&MainLoop.Xd&&MainLoop.pause(),_t(()=>ya(Me)))}else Ge===2?(Ge=0,_t(ga),xe(Me),Me=null,xi.forEach(he)):Te(`invalid state: ${Ge}`);return zn}}(t=>{e().then(t)});function Li(e){return e>>>=0,Hn(async()=>{var t=await ve(e);return Ie(t)})}var Br=[],Oi=e=>{var t=Br.length;return Br.push(e),t},Bi=(e,t)=>{for(var n=Array(e),o=0;o<e;++o){var u=o,c=(p(),A)[t+4*o>>>2>>>0],h=Er[c];if(h===void 0)throw e=`parameter ${o}`,c=lo(c),t=Be(c),xe(c),new dt(`${e} has unknown type ${t}`);n[u]=h}return n},Mi=(e,t,n)=>{var o=[];return e=e(o,n),o.length&&((p(),A)[t>>>2>>>0]=Ie(o)),e},Ci={},Nt=e=>{var t=Ci[e];return t===void 0?Be(e):t};function Ui(e,t,n){var[o,...u]=Bi(e,t>>>0);t=o.Sc.bind(o);var c=u.map(E=>E.Rc.bind(E));e--;var h={toValue:ve};switch(e=c.map((E,I)=>{var F=`argFromPtr${I}`;return h[F]=E,`${F}(args${I?"+"+8*I:""})`}),n){case 0:var b="toValue(handle)";break;case 2:b="new (toValue(handle))";break;case 3:b="";break;case 1:h.getStringOrSymbol=Nt,b="toValue(handle)[getStringOrSymbol(methodName)]"}return b+=`(${e})`,o.ee||(h.toReturnWire=t,h.emval_returnValue=Mi,b=`return emval_returnValue(toReturnWire, destructorsRef, ${b})`),b=`return function (handle, methodName, destructorsRef, args) { ${b} }`,n=new Function(Object.keys(h),b)(...Object.values(h)),b=`methodCaller<(${u.map(E=>E.name)}) => ${o.name}>`,Oi(Object.defineProperty(n,"name",{value:b}))}function Di(e,t){return t>>>=0,(e=ve(e>>>0))==ve(t)}function Pi(e){return(e>>>=0)?(e=Nt(e),Ie(globalThis[e])):Ie(globalThis)}function _i(e){return e=Nt(e>>>0),Ie(r[e])}function Ri(e,t){return t>>>=0,e=ve(e>>>0),t=ve(t),Ie(e[t])}function Ni(e){9<(e>>>=0)&&(Xe[e+1]+=1)}function qn(e,t,n,o,u){return Br[e>>>0](t>>>0,n>>>0,o>>>0,u>>>0)}function ki(e,t,n,o,u){return qn(e>>>0,t>>>0,n>>>0,o>>>0,u>>>0)}function Wi(){return Ie([])}function Fi(e){e=ve(e>>>0);for(var t=Array(e.length),n=0;n<e.length;n++)t[n]=e[n];return Ie(t)}function Gi(e){return Ie(Nt(e>>>0))}function $i(){return Ie({})}function zi(e){for(var t=ve(e>>>=0);t.length;){var n=t.pop();t.pop()(n)}Sr(e)}function Vi(e,t,n){t>>>=0,n>>>=0,e=ve(e>>>0),t=ve(t),n=ve(n),e[t]=n}function ji(e,t){e=ce(e),t>>>=0,e=new Date(1e3*e),(p(),x)[t>>>2>>>0]=e.getUTCSeconds(),(p(),x)[t+4>>>2>>>0]=e.getUTCMinutes(),(p(),x)[t+8>>>2>>>0]=e.getUTCHours(),(p(),x)[t+12>>>2>>>0]=e.getUTCDate(),(p(),x)[t+16>>>2>>>0]=e.getUTCMonth(),(p(),x)[t+20>>>2>>>0]=e.getUTCFullYear()-1900,(p(),x)[t+24>>>2>>>0]=e.getUTCDay(),e=(e.getTime()-Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0))/864e5|0,(p(),x)[t+28>>>2>>>0]=e}var Yn=e=>e%4==0&&(e%100!=0||e%400==0),Jn=[0,31,60,91,121,152,182,213,244,274,305,335],Xn=[0,31,59,90,120,151,181,212,243,273,304,334];function Hi(e,t){e=ce(e),t>>>=0,e=new Date(1e3*e),(p(),x)[t>>>2>>>0]=e.getSeconds(),(p(),x)[t+4>>>2>>>0]=e.getMinutes(),(p(),x)[t+8>>>2>>>0]=e.getHours(),(p(),x)[t+12>>>2>>>0]=e.getDate(),(p(),x)[t+16>>>2>>>0]=e.getMonth(),(p(),x)[t+20>>>2>>>0]=e.getFullYear()-1900,(p(),x)[t+24>>>2>>>0]=e.getDay();var n=(Yn(e.getFullYear())?Jn:Xn)[e.getMonth()]+e.getDate()-1|0;(p(),x)[t+28>>>2>>>0]=n,(p(),x)[t+36>>>2>>>0]=-60*e.getTimezoneOffset(),n=new Date(e.getFullYear(),6,1).getTimezoneOffset();var o=new Date(e.getFullYear(),0,1).getTimezoneOffset();e=0|(n!=o&&e.getTimezoneOffset()==Math.min(o,n)),(p(),x)[t+32>>>2>>>0]=e}function qi(e){e>>>=0;var t=new Date((p(),x)[e+20>>>2>>>0]+1900,(p(),x)[e+16>>>2>>>0],(p(),x)[e+12>>>2>>>0],(p(),x)[e+8>>>2>>>0],(p(),x)[e+4>>>2>>>0],(p(),x)[e>>>2>>>0],0),n=(p(),x)[e+32>>>2>>>0],o=t.getTimezoneOffset(),u=new Date(t.getFullYear(),6,1).getTimezoneOffset(),c=new Date(t.getFullYear(),0,1).getTimezoneOffset(),h=Math.min(c,u);return 0>n?(p(),x)[e+32>>>2>>>0]=+(u!=c&&h==o):0<n!=(h==o)&&(u=Math.max(c,u),t.setTime(t.getTime()+6e4*((0<n?h:u)-o))),(p(),x)[e+24>>>2>>>0]=t.getDay(),n=(Yn(t.getFullYear())?Jn:Xn)[t.getMonth()]+t.getDate()-1|0,(p(),x)[e+28>>>2>>>0]=n,(p(),x)[e>>>2>>>0]=t.getSeconds(),(p(),x)[e+4>>>2>>>0]=t.getMinutes(),(p(),x)[e+8>>>2>>>0]=t.getHours(),(p(),x)[e+12>>>2>>>0]=t.getDate(),(p(),x)[e+16>>>2>>>0]=t.getMonth(),(p(),x)[e+20>>>2>>>0]=t.getYear(),e=t.getTime(),BigInt(isNaN(e)?-1:e/1e3)}function Qn(e,t,n,o,u,c,h){return i?V(16,1,e,t,n,o,u,c,h):-52}function Zn(e,t,n,o,u,c){if(i)return V(17,1,e,t,n,o,u,c)}var Tt={},Yi=()=>performance.timeOrigin+performance.now();function Kn(e,t){if(i)return V(18,1,e,t);if(Tt[e]&&(clearTimeout(Tt[e].id),delete Tt[e]),!t)return 0;var n=setTimeout(()=>{delete Tt[e],he(()=>Bo(e,performance.timeOrigin+performance.now()))},t);return Tt[e]={id:n,Ae:t},0}function Ji(e,t,n,o){e>>>=0,t>>>=0,n>>>=0,o>>>=0;var u=new Date().getFullYear(),c=new Date(u,0,1).getTimezoneOffset();u=new Date(u,6,1).getTimezoneOffset();var h=Math.max(c,u);(p(),A)[e>>>2>>>0]=60*h,(p(),x)[t>>>2>>>0]=+(c!=u),e=(t=b=>{var E=Math.abs(b);return`UTC${0<=b?"-":"+"}${String(Math.floor(E/60)).padStart(2,"0")}${String(E%60).padStart(2,"0")}`})(c),t=t(u),u<c?(Pe(e,n,17),Pe(t,o,17)):(Pe(e,o,17),Pe(t,n,17))}var Xi=()=>Date.now(),Qi=1;function Zi(e,t,n){if(n>>>=0,!(0<=e&&3>=e))return 28;if(e===0)e=Date.now();else{if(!Qi)return 52;e=performance.timeOrigin+performance.now()}return e=Math.round(1e6*e),(p(),me)[n>>>3>>>0]=BigInt(e),0}var Mr=[],eo=(e,t)=>{Mr.length=0;for(var n;n=(p(),J)[e++>>>0];){var o=n!=105;t+=(o&=n!=112)&&t%8?4:0,Mr.push(n==112?(p(),A)[t>>>2>>>0]:n==106?(p(),me)[t>>>3>>>0]:n==105?(p(),x)[t>>>2>>>0]:(p(),ae)[t>>>3>>>0]),t+=o?8:4}return Mr};function Ki(e,t,n){return e>>>=0,t=eo(t>>>0,n>>>0),jr[e](...t)}function eu(e,t,n){return e>>>=0,t=eo(t>>>0,n>>>0),jr[e](...t)}var tu=()=>{};function ru(e,t){return O(ct(e>>>0,t>>>0))}var nu=()=>{throw G+=1,"unwind"};function ou(){return 4294901760}var au=()=>1,su=()=>navigator.hardwareConcurrency;function iu(e){e>>>=0;var t=(p(),J).length;if(e<=t||4294901760<e)return!1;for(var n=1;4>=n;n*=2){var o=t*(1+.2/n);o=Math.min(o,e+100663296);e:{o=(Math.min(4294901760,65536*Math.ceil(Math.max(e,o)/65536))-Fe.buffer.byteLength+65535)/65536|0;try{Fe.grow(o),se();var u=1;break e}catch{}u=void 0}if(u)return!0}return!1}var Ce=e=>{var t=_e(e)+1,n=Gt(t);return Pe(e,n,t),n},Cr=(e,t)=>{(p(),A)[e>>>2>>>0]=t;var n=(p(),A)[e>>>2>>>0];(p(),A)[e+4>>>2>>>0]=(t-n)/4294967296},vt=e=>(p(),A)[e>>>2>>>0]+4294967296*(p(),x)[e+4>>>2>>>0],de=[],uu=(e,t)=>{de[e>>>0]=t},Re=[],kt=[],lt=(e,t)=>{kt[e]=new Promise(n=>t.finally(()=>n(e)))},L=e=>{if(e)return de[e>>>0]},fu=(e,t)=>{for(e=(p(),A)[e>>>2>>>0];e;e=(p(),A)[e>>>2>>>0])t[(p(),x)[e+4>>>2>>>0]](e)},Wt=(e,t,n)=>{(p(),A)[e>>>2>>>0]=t,(p(),A)[e+4>>>2>>>0]=n},to=e=>{var t=(p(),A)[e>>>2>>>0];return e=(p(),A)[e+4>>>2>>>0],ct(t,e)},Ne=e=>{var t=(p(),A)[e>>>2>>>0];return e=(p(),A)[e+4>>>2>>>0],t?ct(t,e):e===0?"":void 0},cu=e=>{var t=Ne(e+4),n=(n=(p(),A)[e+12>>>2>>>0])?L(n):"auto";if(e+=16){var o=L((p(),A)[e+4>>>2>>>0]),u=(p(),A)[e+16>>>2>>>0],c=(p(),A)[e+20>>>2>>>0];if(u){for(var h={},b=0;b<u;++b){var E=c+24*b;h[to(E+4)]=(p(),ae)[E+16>>>3>>>0]}u=h}else u=void 0;e={module:o,constants:u,entryPoint:Ne(e+8)}}else e=void 0;return{label:t,layout:n,compute:e}},ro=(e,t)=>{function n(o,u){o=e[o],(p(),A)[t+u>>>2>>>0]=o}n("maxTextureDimension1D",4),n("maxTextureDimension2D",8),n("maxTextureDimension3D",12),n("maxTextureArrayLayers",16),n("maxBindGroups",20),n("maxBindGroupsPlusVertexBuffers",24),n("maxBindingsPerBindGroup",28),n("maxDynamicUniformBuffersPerPipelineLayout",32),n("maxDynamicStorageBuffersPerPipelineLayout",36),n("maxSampledTexturesPerShaderStage",40),n("maxSamplersPerShaderStage",44),n("maxStorageBuffersPerShaderStage",48),n("maxStorageTexturesPerShaderStage",52),n("maxUniformBuffersPerShaderStage",56),n("minUniformBufferOffsetAlignment",80),n("minStorageBufferOffsetAlignment",84),Cr(t+64,e.maxUniformBufferBindingSize),Cr(t+72,e.maxStorageBufferBindingSize),n("maxVertexBuffers",88),Cr(t+96,e.maxBufferSize),n("maxVertexAttributes",104),n("maxVertexBufferArrayStride",108),n("maxInterStageShaderVariables",112),n("maxColorAttachments",116),n("maxColorAttachmentBytesPerSample",120),n("maxComputeWorkgroupStorageSize",124),n("maxComputeInvocationsPerWorkgroup",128),n("maxComputeWorkgroupSizeX",132),n("maxComputeWorkgroupSizeY",136),n("maxComputeWorkgroupSizeZ",140),n("maxComputeWorkgroupsPerDimension",144),e.ze!==void 0&&n("maxImmediateSize",148)},du=[,"validation","out-of-memory","internal"],lu=[,"compatibility","core"],no={1:"core-features-and-limits",2:"depth-clip-control",3:"depth32float-stencil8",4:"texture-compression-bc",5:"texture-compression-bc-sliced-3d",6:"texture-compression-etc2",7:"texture-compression-astc",8:"texture-compression-astc-sliced-3d",9:"timestamp-query",10:"indirect-first-instance",11:"shader-f16",12:"rg11b10ufloat-renderable",13:"bgra8unorm-storage",14:"float32-filterable",15:"float32-blendable",16:"clip-distances",17:"dual-source-blending",18:"subgroups",19:"texture-formats-tier1",20:"texture-formats-tier2",21:"primitive-index",22:"texture-component-swizzle",327692:"chromium-experimental-unorm16-texture-formats",327729:"chromium-experimental-multi-draw-indirect"},pu=[,"low-power","high-performance"],mu=[,"occlusion","timestamp"],hu={undefined:1,unknown:1,destroyed:2};function yu(e,t,n,o,u,c){t=ce(t),n=ce(n),o>>>=0,u>>>=0,c>>>=0;var h=L(e>>>0);if(e={},c){var b=(p(),A)[c+12>>>2>>>0];if(b){var E=(p(),A)[c+16>>>2>>>0];e.requiredFeatures=Array.from((p(),A).subarray(E>>>2>>>0,E+4*b>>>2>>>0),B=>no[B])}var I=(p(),A)[c+20>>>2>>>0];if(I){let B=function(ye,fe,Qe=!1){fe=I+fe,(fe=(p(),A)[fe>>>2>>>0])==4294967295||Qe&&fe==0||(F[ye]=fe)},ue=function(ye,fe){fe=I+fe;var Qe=(p(),A)[fe>>>2>>>0],$f=(p(),A)[fe+4>>>2>>>0];Qe==4294967295&&$f==4294967295||(F[ye]=vt(fe))};var j=B,te=ue,F={};B("maxTextureDimension1D",4),B("maxTextureDimension2D",8),B("maxTextureDimension3D",12),B("maxTextureArrayLayers",16),B("maxBindGroups",20),B("maxBindGroupsPlusVertexBuffers",24),B("maxDynamicUniformBuffersPerPipelineLayout",32),B("maxDynamicStorageBuffersPerPipelineLayout",36),B("maxSampledTexturesPerShaderStage",40),B("maxSamplersPerShaderStage",44),B("maxStorageBuffersPerShaderStage",48),B("maxStorageTexturesPerShaderStage",52),B("maxUniformBuffersPerShaderStage",56),B("minUniformBufferOffsetAlignment",80),B("minStorageBufferOffsetAlignment",84),ue("maxUniformBufferBindingSize",64),ue("maxStorageBufferBindingSize",72),B("maxVertexBuffers",88),ue("maxBufferSize",96),B("maxVertexAttributes",104),B("maxVertexBufferArrayStride",108),B("maxInterStageShaderVariables",112),B("maxColorAttachm