@intelliweave/embedded 2.0.72-beta.1 → 2.0.72-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{a as le}from"./chunk-AIYMQX7V.js";var lh=Object.create,Kr=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,ch=Object.getOwnPropertyNames,dh=Object.getPrototypeOf,hh=Object.prototype.hasOwnProperty,fh=(t=>typeof le<"u"?le:typeof Proxy<"u"?new Proxy(t,{get:(r,n)=>(typeof le<"u"?le:r)[n]}):t)(function(t){if(typeof le<"u")return le.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),I=(t,r)=>()=>(t&&(r=t(t=0)),r),nt=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),gr=(t,r)=>{for(var n in r)Kr(t,n,{get:r[n],enumerable:!0})},Hu=(t,r,n,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let p of ch(r))!hh.call(t,p)&&p!==n&&Kr(t,p,{get:()=>r[p],enumerable:!(s=ph(r,p))||s.enumerable});return t},Ie=(t,r,n)=>(n=t!=null?lh(dh(t)):{},Hu(r||!t||!t.__esModule?Kr(n,"default",{value:t,enumerable:!0}):n,t)),zr=t=>Hu(Kr({},"__esModule",{value:!0}),t),Me,Zt,cr,da,Vo,Mo=I(()=>{"use strict";Me=new Map,Zt=[],cr=(t,r,n)=>{if(r&&typeof r.init=="function"&&typeof r.createInferenceSessionHandler=="function"){let s=Me.get(t);if(s===void 0)Me.set(t,{backend:r,priority:n});else{if(s.priority>n)return;if(s.priority===n&&s.backend!==r)throw new Error(`cannot register backend "${t}" using priority ${n}`)}if(n>=0){let p=Zt.indexOf(t);p!==-1&&Zt.splice(p,1);for(let l=0;l<Zt.length;l++)if(Me.get(Zt[l]).priority<=n){Zt.splice(l,0,t);return}Zt.push(t)}return}throw new TypeError("not a valid backend")},da=async t=>{let r=Me.get(t);if(!r)return"backend not found.";if(r.initialized)return r.backend;if(r.aborted)return r.error;{let n=!!r.initPromise;try{return n||(r.initPromise=r.backend.init(t)),await r.initPromise,r.initialized=!0,r.backend}catch(s){return n||(r.error=`${s}`,r.aborted=!0),r.error}finally{delete r.initPromise}}},Vo=async t=>{let r=t.executionProviders||[],n=r.map(a=>typeof a=="string"?a:a.name),s=n.length===0?Zt:n,p,l=[],c=new Set;for(let a of s){let e=await da(a);typeof e=="string"?l.push({name:a,err:e}):(p||(p=e),p===e&&c.add(a))}if(!p)throw new Error(`no available backend found. ERR: ${l.map(a=>`[${a.name}] ${a.err}`).join(", ")}`);for(let{name:a,err:e}of l)n.includes(a)&&console.warn(`removing requested execution provider "${a}" from session options because it is not available: ${e}`);let o=r.filter(a=>c.has(typeof a=="string"?a:a.name));return[p,new Proxy(t,{get:(a,e)=>e==="executionProviders"?o:Reflect.get(a,e)})]}}),gh=I(()=>{"use strict";Mo()}),qu,mh=I(()=>{"use strict";qu="1.20.0"}),fn,Dt,Wu=I(()=>{"use strict";mh(),fn="warning",Dt={wasm:{},webgl:{},webgpu:{},versions:{common:qu},set logLevel(t){if(t!==void 0){if(typeof t!="string"||["verbose","info","warning","error","fatal"].indexOf(t)===-1)throw new Error(`Unsupported logging level: ${t}`);fn=t}},get logLevel(){return fn}},Object.defineProperty(Dt,"logLevel",{enumerable:!0})}),j,bh=I(()=>{"use strict";Wu(),j=Dt}),Xu,Ku,yh=I(()=>{"use strict";Xu=(t,r)=>{let n=typeof document<"u"?document.createElement("canvas"):new OffscreenCanvas(1,1);n.width=t.dims[3],n.height=t.dims[2];let s=n.getContext("2d");if(s!=null){let p,l;r?.tensorLayout!==void 0&&r.tensorLayout==="NHWC"?(p=t.dims[2],l=t.dims[3]):(p=t.dims[3],l=t.dims[2]);let c=r?.format!==void 0?r.format:"RGB",o=r?.norm,a,e;o===void 0||o.mean===void 0?a=[255,255,255,255]:typeof o.mean=="number"?a=[o.mean,o.mean,o.mean,o.mean]:(a=[o.mean[0],o.mean[1],o.mean[2],0],o.mean[3]!==void 0&&(a[3]=o.mean[3])),o===void 0||o.bias===void 0?e=[0,0,0,0]:typeof o.bias=="number"?e=[o.bias,o.bias,o.bias,o.bias]:(e=[o.bias[0],o.bias[1],o.bias[2],0],o.bias[3]!==void 0&&(e[3]=o.bias[3]));let u=l*p,i=0,d=u,h=u*2,m=-1;c==="RGBA"?(i=0,d=u,h=u*2,m=u*3):c==="RGB"?(i=0,d=u,h=u*2):c==="RBG"&&(i=0,h=u,d=u*2);for(let b=0;b<l;b++)for(let x=0;x<p;x++){let E=(t.data[i++]-e[0])*a[0],w=(t.data[d++]-e[1])*a[1],S=(t.data[h++]-e[2])*a[2],$=m===-1?255:(t.data[m++]-e[3])*a[3];s.fillStyle="rgba("+E+","+w+","+S+","+$+")",s.fillRect(x,b,1,1)}if("toDataURL"in n)return n.toDataURL();throw new Error("toDataURL is not supported")}else throw new Error("Can not access image data")},Ku=(t,r)=>{let n=typeof document<"u"?document.createElement("canvas").getContext("2d"):new OffscreenCanvas(1,1).getContext("2d"),s;if(n!=null){let p,l,c;r?.tensorLayout!==void 0&&r.tensorLayout==="NHWC"?(p=t.dims[2],l=t.dims[1],c=t.dims[3]):(p=t.dims[3],l=t.dims[2],c=t.dims[1]);let o=r!==void 0&&r.format!==void 0?r.format:"RGB",a=r?.norm,e,u;a===void 0||a.mean===void 0?e=[255,255,255,255]:typeof a.mean=="number"?e=[a.mean,a.mean,a.mean,a.mean]:(e=[a.mean[0],a.mean[1],a.mean[2],255],a.mean[3]!==void 0&&(e[3]=a.mean[3])),a===void 0||a.bias===void 0?u=[0,0,0,0]:typeof a.bias=="number"?u=[a.bias,a.bias,a.bias,a.bias]:(u=[a.bias[0],a.bias[1],a.bias[2],0],a.bias[3]!==void 0&&(u[3]=a.bias[3]));let i=l*p;if(r!==void 0&&(r.format!==void 0&&c===4&&r.format!=="RGBA"||c===3&&r.format!=="RGB"&&r.format!=="BGR"))throw new Error("Tensor format doesn't match input tensor dims");let d=4,h=0,m=1,b=2,x=3,E=0,w=i,S=i*2,$=-1;o==="RGBA"?(E=0,w=i,S=i*2,$=i*3):o==="RGB"?(E=0,w=i,S=i*2):o==="RBG"&&(E=0,S=i,w=i*2),s=n.createImageData(p,l);for(let F=0;F<l*p;h+=d,m+=d,b+=d,x+=d,F++)s.data[h]=(t.data[E++]-u[0])*e[0],s.data[m]=(t.data[w++]-u[1])*e[1],s.data[b]=(t.data[S++]-u[2])*e[2],s.data[x]=$===-1?255:(t.data[$++]-u[3])*e[3]}else throw new Error("Can not access image data");return s}}),Nr,Zu,Ju,Yu,Qu,tl,wh=I(()=>{"use strict";zo(),Nr=(t,r)=>{if(t===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:n,width:s}=r,p=r.norm??{mean:255,bias:0},l,c;typeof p.mean=="number"?l=[p.mean,p.mean,p.mean,p.mean]:l=[p.mean[0],p.mean[1],p.mean[2],p.mean[3]??255],typeof p.bias=="number"?c=[p.bias,p.bias,p.bias,p.bias]:c=[p.bias[0],p.bias[1],p.bias[2],p.bias[3]??0];let o=r.format!==void 0?r.format:"RGBA",a=r.tensorFormat!==void 0&&r.tensorFormat!==void 0?r.tensorFormat:"RGB",e=n*s,u=a==="RGBA"?new Float32Array(e*4):new Float32Array(e*3),i=4,d=0,h=1,m=2,b=3,x=0,E=e,w=e*2,S=-1;o==="RGB"&&(i=3,d=0,h=1,m=2,b=-1),a==="RGBA"?S=e*3:a==="RBG"?(x=0,w=e,E=e*2):a==="BGR"&&(w=0,E=e,x=e*2);for(let $=0;$<e;$++,d+=i,m+=i,h+=i,b+=i)u[x++]=(t[d]+c[0])/l[0],u[E++]=(t[h]+c[1])/l[1],u[w++]=(t[m]+c[2])/l[2],S!==-1&&b!==-1&&(u[S++]=(t[b]+c[3])/l[3]);return a==="RGBA"?new It("float32",u,[1,4,n,s]):new It("float32",u,[1,3,n,s])},Zu=async(t,r)=>{let n=typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement,s=typeof ImageData<"u"&&t instanceof ImageData,p=typeof ImageBitmap<"u"&&t instanceof ImageBitmap,l=typeof t=="string",c,o=r??{},a=()=>{if(typeof document<"u")return document.createElement("canvas");if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(1,1);throw new Error("Canvas is not supported")},e=u=>typeof HTMLCanvasElement<"u"&&u instanceof HTMLCanvasElement||u instanceof OffscreenCanvas?u.getContext("2d"):null;if(n){let u=a();u.width=t.width,u.height=t.height;let i=e(u);if(i!=null){let d=t.height,h=t.width;if(r!==void 0&&r.resizedHeight!==void 0&&r.resizedWidth!==void 0&&(d=r.resizedHeight,h=r.resizedWidth),r!==void 0){if(o=r,r.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");o.tensorFormat="RGBA",o.height=d,o.width=h}else o.tensorFormat="RGBA",o.height=d,o.width=h;i.drawImage(t,0,0),c=i.getImageData(0,0,h,d).data}else throw new Error("Can not access image data")}else if(s){let u,i;if(r!==void 0&&r.resizedWidth!==void 0&&r.resizedHeight!==void 0?(u=r.resizedHeight,i=r.resizedWidth):(u=t.height,i=t.width),r!==void 0&&(o=r),o.format="RGBA",o.height=u,o.width=i,r!==void 0){let d=a();d.width=i,d.height=u;let h=e(d);if(h!=null)h.putImageData(t,0,0),c=h.getImageData(0,0,i,u).data;else throw new Error("Can not access image data")}else c=t.data}else if(p){if(r===void 0)throw new Error("Please provide image config with format for Imagebitmap");let u=a();u.width=t.width,u.height=t.height;let i=e(u);if(i!=null){let d=t.height,h=t.width;return i.drawImage(t,0,0,h,d),c=i.getImageData(0,0,h,d).data,o.height=d,o.width=h,Nr(c,o)}else throw new Error("Can not access image data")}else{if(l)return new Promise((u,i)=>{let d=a(),h=e(d);if(!t||!h)return i();let m=new Image;m.crossOrigin="Anonymous",m.src=t,m.onload=()=>{d.width=m.width,d.height=m.height,h.drawImage(m,0,0,d.width,d.height);let b=h.getImageData(0,0,d.width,d.height);o.height=d.height,o.width=d.width,u(Nr(b.data,o))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return Nr(c,o);throw new Error("Input data provided is not supported - aborted tensor creation")},Ju=(t,r)=>{let{width:n,height:s,download:p,dispose:l}=r,c=[1,s,n,4];return new It({location:"texture",type:"float32",texture:t,dims:c,download:p,dispose:l})},Yu=(t,r)=>{let{dataType:n,dims:s,download:p,dispose:l}=r;return new It({location:"gpu-buffer",type:n??"float32",gpuBuffer:t,dims:s,download:p,dispose:l})},Qu=(t,r)=>{let{dataType:n,dims:s,download:p,dispose:l}=r;return new It({location:"ml-tensor",type:n??"float32",mlTensor:t,dims:s,download:p,dispose:l})},tl=(t,r,n)=>new It({location:"cpu-pinned",type:t,data:r,dims:n??[r.length]})}),me,Ye,gn,el,vh=I(()=>{"use strict";me=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array],["int4",Uint8Array],["uint4",Uint8Array]]),Ye=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]),gn=!1,el=()=>{if(!gn){gn=!0;let t=typeof BigInt64Array<"u"&&BigInt64Array.from,r=typeof BigUint64Array<"u"&&BigUint64Array.from,n=typeof Float16Array<"u"&&Float16Array.from;t&&(me.set("int64",BigInt64Array),Ye.set(BigInt64Array,"int64")),r&&(me.set("uint64",BigUint64Array),Ye.set(BigUint64Array,"uint64")),n?(me.set("float16",Float16Array),Ye.set(Float16Array,"float16")):me.set("float16",Uint16Array)}}}),rl,nl,xh=I(()=>{"use strict";zo(),rl=t=>{let r=1;for(let n=0;n<t.length;n++){let s=t[n];if(typeof s!="number"||!Number.isSafeInteger(s))throw new TypeError(`dims[${n}] must be an integer, got: ${s}`);if(s<0)throw new RangeError(`dims[${n}] must be a non-negative integer, got: ${s}`);r*=s}return r},nl=(t,r)=>{switch(t.location){case"cpu":return new It(t.type,t.data,r);case"cpu-pinned":return new It({location:"cpu-pinned",data:t.data,type:t.type,dims:r});case"texture":return new It({location:"texture",texture:t.texture,type:t.type,dims:r});case"gpu-buffer":return new It({location:"gpu-buffer",gpuBuffer:t.gpuBuffer,type:t.type,dims:r});case"ml-tensor":return new It({location:"ml-tensor",mlTensor:t.mlTensor,type:t.type,dims:r});default:throw new Error(`tensorReshape: tensor location ${t.location} is not supported`)}}}),It,zo=I(()=>{"use strict";yh(),wh(),vh(),xh(),It=class{constructor(t,r,n){el();let s,p;if(typeof t=="object"&&"location"in t)switch(this.dataLocation=t.location,s=t.type,p=t.dims,t.location){case"cpu-pinned":{let c=me.get(s);if(!c)throw new TypeError(`unsupported type "${s}" to create tensor from pinned buffer`);if(!(t.data instanceof c))throw new TypeError(`buffer should be of type ${c.name}`);this.cpuData=t.data;break}case"texture":{if(s!=="float32")throw new TypeError(`unsupported type "${s}" to create tensor from texture`);this.gpuTextureData=t.texture,this.downloader=t.download,this.disposer=t.dispose;break}case"gpu-buffer":{if(s!=="float32"&&s!=="float16"&&s!=="int32"&&s!=="int64"&&s!=="uint32"&&s!=="uint8"&&s!=="bool"&&s!=="uint4"&&s!=="int4")throw new TypeError(`unsupported type "${s}" to create tensor from gpu buffer`);this.gpuBufferData=t.gpuBuffer,this.downloader=t.download,this.disposer=t.dispose;break}case"ml-tensor":{if(s!=="float32"&&s!=="float16"&&s!=="int32"&&s!=="int64"&&s!=="uint32"&&s!=="uint64"&&s!=="int8"&&s!=="uint8"&&s!=="bool")throw new TypeError(`unsupported type "${s}" to create tensor from MLTensor`);this.mlTensorData=t.mlTensor,this.downloader=t.download,this.disposer=t.dispose;break}default:throw new Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let c,o;if(typeof t=="string")if(s=t,o=n,t==="string"){if(!Array.isArray(r))throw new TypeError("A string tensor's data must be a string array.");c=r}else{let a=me.get(t);if(a===void 0)throw new TypeError(`Unsupported tensor type: ${t}.`);if(Array.isArray(r)){if(t==="float16"&&a===Uint16Array||t==="uint4"||t==="int4")throw new TypeError(`Creating a ${t} tensor from number array is not supported. Please use ${a.name} as data.`);t==="uint64"||t==="int64"?c=a.from(r,BigInt):c=a.from(r)}else if(r instanceof a)c=r;else if(r instanceof Uint8ClampedArray)if(t==="uint8")c=Uint8Array.from(r);else throw new TypeError("A Uint8ClampedArray tensor's data must be type of uint8");else throw new TypeError(`A ${s} tensor's data must be type of ${a}`)}else if(o=r,Array.isArray(t)){if(t.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");let a=typeof t[0];if(a==="string")s="string",c=t;else if(a==="boolean")s="bool",c=Uint8Array.from(t);else throw new TypeError(`Invalid element type of data array: ${a}.`)}else if(t instanceof Uint8ClampedArray)s="uint8",c=Uint8Array.from(t);else{let a=Ye.get(t.constructor);if(a===void 0)throw new TypeError(`Unsupported type for tensor data: ${t.constructor}.`);s=a,c=t}if(o===void 0)o=[c.length];else if(!Array.isArray(o))throw new TypeError("A tensor's dims must be a number array");p=o,this.cpuData=c,this.dataLocation="cpu"}let l=rl(p);if(this.cpuData&&l!==this.cpuData.length&&!((s==="uint4"||s==="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=s,this.dims=p,this.size=l}static async fromImage(t,r){return Zu(t,r)}static fromTexture(t,r){return Ju(t,r)}static fromGpuBuffer(t,r){return Yu(t,r)}static fromMLTensor(t,r){return Qu(t,r)}static fromPinnedBuffer(t,r,n){return tl(t,r,n)}toDataURL(t){return Xu(this,t)}toImageData(t){return Ku(this,t)}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(t){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 r=await this.downloader();return this.downloader=void 0,this.dataLocation="cpu",this.cpuData=r,t&&this.disposer&&(this.disposer(),this.disposer=void 0),r}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(t){if(this.ensureValid(),this.downloader||this.disposer)throw new Error("Cannot reshape a tensor that owns GPU resource.");return nl(this,t)}}}),ft,Uo=I(()=>{"use strict";zo(),ft=It}),no,mn,Pe,Ae,ol=I(()=>{"use strict";Wu(),no=(t,r)=>{(typeof Dt.trace>"u"?!Dt.wasm.trace:!Dt.trace)||console.timeStamp(`${t}::ORT::${r}`)},mn=(t,r)=>{let n=new Error().stack?.split(/\r\n|\r|\n/g)||[],s=!1;for(let p=0;p<n.length;p++){if(s&&!n[p].includes("TRACE_FUNC")){let l=`FUNC_${t}::${n[p].trim().split(" ")[1]}`;r&&(l+=`::${r}`),no("CPU",l);return}n[p].includes("TRACE_FUNC")&&(s=!0)}},Pe=t=>{(typeof Dt.trace>"u"?!Dt.wasm.trace:!Dt.trace)||mn("BEGIN",t)},Ae=t=>{(typeof Dt.trace>"u"?!Dt.wasm.trace:!Dt.trace)||mn("END",t)}}),il,Th=I(()=>{"use strict";Mo(),Uo(),ol(),il=class al{constructor(r){this.handler=r}async run(r,n,s){Pe();let p={},l={};if(typeof r!="object"||r===null||r instanceof ft||Array.isArray(r))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let c=!0;if(typeof n=="object"){if(n===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(n instanceof ft)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(n)){if(n.length===0)throw new TypeError("'fetches' cannot be an empty array.");c=!1;for(let e of n){if(typeof e!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(e)===-1)throw new RangeError(`'fetches' contains invalid output name: ${e}.`);p[e]=null}if(typeof s=="object"&&s!==null)l=s;else if(typeof s<"u")throw new TypeError("'options' must be an object.")}else{let e=!1,u=Object.getOwnPropertyNames(n);for(let i of this.outputNames)if(u.indexOf(i)!==-1){let d=n[i];(d===null||d instanceof ft)&&(e=!0,c=!1,p[i]=d)}if(e){if(typeof s=="object"&&s!==null)l=s;else if(typeof s<"u")throw new TypeError("'options' must be an object.")}else l=n}}else if(typeof n<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(let e of this.inputNames)if(typeof r[e]>"u")throw new Error(`input '${e}' is missing in 'feeds'.`);if(c)for(let e of this.outputNames)p[e]=null;let o=await this.handler.run(r,p,l),a={};for(let e in o)if(Object.hasOwnProperty.call(o,e)){let u=o[e];u instanceof ft?a[e]=u:a[e]=new ft(u.type,u.data,u.dims)}return Ae(),a}async release(){return this.handler.dispose()}static async create(r,n,s,p){Pe();let l,c={};if(typeof r=="string"){if(l=r,typeof n=="object"&&n!==null)c=n;else if(typeof n<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof Uint8Array){if(l=r,typeof n=="object"&&n!==null)c=n;else if(typeof n<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer){let u=r,i=0,d=r.byteLength;if(typeof n=="object"&&n!==null)c=n;else if(typeof n=="number"){if(i=n,!Number.isSafeInteger(i))throw new RangeError("'byteOffset' must be an integer.");if(i<0||i>=u.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${u.byteLength}).`);if(d=r.byteLength-i,typeof s=="number"){if(d=s,!Number.isSafeInteger(d))throw new RangeError("'byteLength' must be an integer.");if(d<=0||i+d>u.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${u.byteLength-i}].`);if(typeof p=="object"&&p!==null)c=p;else if(typeof p<"u")throw new TypeError("'options' must be an object.")}else if(typeof s<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof n<"u")throw new TypeError("'options' must be an object.");l=new Uint8Array(u,i,d)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");let[o,a]=await Vo(c),e=await o.createInferenceSessionHandler(l,a);return Ae(),new al(e)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}}}),sl,_h=I(()=>{"use strict";Th(),sl=il}),Sh=I(()=>{"use strict"}),Oh=I(()=>{"use strict"}),Eh=I(()=>{"use strict"}),Ih=I(()=>{"use strict"}),ha,ul,Ph=I(()=>{"use strict";Mo(),Uo(),ha="Training backend could not be resolved. Make sure you're using the correct configuration & WebAssembly files.",ul=class ll{constructor(r,n,s){this.handler=r,this.hasOptimizerModel=n,this.hasEvalModel=s}get trainingInputNames(){return this.handler.inputNames}get trainingOutputNames(){return this.handler.outputNames}get evalInputNames(){if(this.hasEvalModel)return this.handler.evalInputNames;throw new Error("This training session has no evalModel loaded.")}get evalOutputNames(){if(this.hasEvalModel)return this.handler.evalOutputNames;throw new Error("This training session has no evalModel loaded.")}static async create(r,n){let s=r.evalModel||"",p=r.optimizerModel||"",l=n||{},[c,o]=await Vo(l);if(c.createTrainingSessionHandler){let a=await c.createTrainingSessionHandler(r.checkpointState,r.trainModel,s,p,o);return new ll(a,!!r.optimizerModel,!!r.evalModel)}else throw new Error(ha)}typeNarrowingForRunStep(r,n,s,p,l){let c={},o={};if(typeof s!="object"||s===null||s instanceof ft||Array.isArray(s))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let a=!0;if(typeof p=="object"){if(p===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(p instanceof ft)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(p)){if(p.length===0)throw new TypeError("'fetches' cannot be an empty array.");a=!1;for(let e of p){if(typeof e!="string")throw new TypeError("'fetches' must be a string array or an object.");if(n.indexOf(e)===-1)throw new RangeError(`'fetches' contains invalid output name: ${e}.`);c[e]=null}if(typeof l=="object"&&l!==null)o=l;else if(typeof l<"u")throw new TypeError("'options' must be an object.")}else{let e=!1,u=Object.getOwnPropertyNames(p);for(let i of n)if(u.indexOf(i)!==-1){let d=p[i];(d===null||d instanceof ft)&&(e=!0,a=!1,c[i]=d)}if(e){if(typeof l=="object"&&l!==null)o=l;else if(typeof l<"u")throw new TypeError("'options' must be an object.")}else o=p}}else if(typeof p<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(let e of r)if(typeof s[e]>"u")throw new Error(`input '${e}' is missing in 'feeds'.`);if(a)for(let e of n)c[e]=null;return[c,o]}convertHandlerReturnTypeToMapOfTensors(r){let n={};for(let s in r)if(Object.hasOwnProperty.call(r,s)){let p=r[s];p instanceof ft?n[s]=p:n[s]=new ft(p.type,p.data,p.dims)}return n}async lazyResetGrad(){await this.handler.lazyResetGrad()}async runTrainStep(r,n,s){let[p,l]=this.typeNarrowingForRunStep(this.trainingInputNames,this.trainingOutputNames,r,n,s),c=await this.handler.runTrainStep(r,p,l);return this.convertHandlerReturnTypeToMapOfTensors(c)}async runOptimizerStep(r){if(this.hasOptimizerModel)await this.handler.runOptimizerStep(r||{});else throw new Error("This TrainingSession has no OptimizerModel loaded.")}async runEvalStep(r,n,s){if(this.hasEvalModel){let[p,l]=this.typeNarrowingForRunStep(this.evalInputNames,this.evalOutputNames,r,n,s),c=await this.handler.runEvalStep(r,p,l);return this.convertHandlerReturnTypeToMapOfTensors(c)}else throw new Error("This TrainingSession has no EvalModel loaded.")}async getParametersSize(r=!0){return this.handler.getParametersSize(r)}async loadParametersBuffer(r,n=!0){let s=await this.getParametersSize(n);if(r.length!==4*s)throw new Error("Size of the buffer passed into loadParametersBuffer must match the number of parameters in the model. Please use getParametersSize method to check.");return this.handler.loadParametersBuffer(r,n)}async getContiguousParameters(r=!0){return this.handler.getContiguousParameters(r)}async release(){return this.handler.dispose()}}}),pl,Ah=I(()=>{"use strict";Ph(),pl=ul}),cl={};gr(cl,{InferenceSession:()=>sl,TRACE:()=>no,TRACE_FUNC_BEGIN:()=>Pe,TRACE_FUNC_END:()=>Ae,Tensor:()=>ft,TrainingSession:()=>pl,env:()=>j,registerBackend:()=>cr});var zt=I(()=>{"use strict";gh(),bh(),_h(),Uo(),Sh(),Oh(),ol(),Eh(),Ih(),Ah()});function be(t,r,n,s){if(r===void 0)return $h(t);if(n===void 0)kr(t,r,1);else if(typeof n=="number"&&s===void 0)kr(t,r,n);else if(typeof n=="string"&&s===void 0)kr(t,n,1,r);else if(typeof n=="string"&&typeof s=="number")kr(t,n,s,r);else throw new TypeError("input is valid")}function $h(t){return{verbose:be.verbose.bind(null,t),info:be.info.bind(null,t),warning:be.warning.bind(null,t),error:be.error.bind(null,t),fatal:be.fatal.bind(null,t)}}function kr(t,r,n,s){let p=Ee[s||""]||Ee[""];oo[t]<oo[p.minimalSeverity]||(p.logDateTime&&(r=`${new Date().toISOString()}|${r}`),p.logSourceLocation,dl[p.provider].log(t,r,s))}var fa,ga,oo,dl,bn,Ee,tt,yn,wn,hl,ze,Rt=I(()=>{"use strict";fa=class{log(t,r,n){}},ga=class{log(t,r,n){console.log(`${this.color(t)} ${n?"\x1B[35m"+n+"\x1B[0m ":""}${r}`)}color(t){switch(t){case"verbose":return"\x1B[34;40mv\x1B[0m";case"info":return"\x1B[32mi\x1B[0m";case"warning":return"\x1B[30;43mw\x1B[0m";case"error":return"\x1B[31;40me\x1B[0m";case"fatal":return"\x1B[101mf\x1B[0m";default:throw new Error(`unsupported severity: ${t}`)}}},oo={verbose:1e3,info:2e3,warning:4e3,error:5e3,fatal:6e3},dl={none:new fa,console:new ga},bn={provider:"console",minimalSeverity:"warning",logDateTime:!0,logSourceLocation:!1},Ee={"":bn},(t=>{function r(e,u){t("verbose",e,u)}t.verbose=r;function n(e,u){t("info",e,u)}t.info=n;function s(e,u){t("warning",e,u)}t.warning=s;function p(e,u){t("error",e,u)}t.error=p;function l(e,u){t("fatal",e,u)}t.fatal=l;function c(e){Ee={},o("",e||{})}t.reset=c;function o(e,u){if(e==="*")c(u);else{let i=Ee[e]||bn;Ee[e]={provider:u.provider||i.provider,minimalSeverity:u.minimalSeverity||i.minimalSeverity,logDateTime:u.logDateTime===void 0?i.logDateTime:u.logDateTime,logSourceLocation:u.logSourceLocation===void 0?i.logSourceLocation:u.logSourceLocation}}}t.set=o;function a(e){let u={};e.logLevel&&(u.minimalSeverity=e.logLevel),o("",u)}t.setWithEnv=a})(be||(be={})),tt=be,yn=class{constructor(t,r,n,s,p,l){this.category=t,this.name=r,this.startTime=n,this.endCallback=s,this.timer=p,this.ctx=l}async end(){return this.endCallback(this)}async checkTimer(){if(this.ctx===void 0||this.timer===void 0)throw new Error("No webgl timer found");return this.ctx.endTimer(),this.ctx.waitForQueryAndGetTime(this.timer)}},wn=class{constructor(t,r,n,s){this.category=t,this.name=r,this.startTime=n,this.endTime=s}},hl=class{constructor(t,r,n){this._started=!1,this._flushPointer=0,this._started=!1,this._maxNumberEvents=t===void 0?1e4:t,this._flushBatchSize=r===void 0?10:r,this._flushIntervalInMilliseconds=n===void 0?5e3:n}static create(t){return t===void 0?new this:new this(t.maxNumberEvents,t.flushBatchSize,t.flushIntervalInMilliseconds)}start(){this._started=!0,this._timingEvents=[],this._flushTime=ze(),this._flushPointer=0}stop(){for(this._started=!1;this._flushPointer<this._timingEvents.length;this._flushPointer++)this.logOneEvent(this._timingEvents[this._flushPointer])}event(t,r,n,s){let p=this._started?this.begin(t,r,s):void 0,l=!1,c=n();if(c&&typeof c.then=="function")return l=!0,new Promise((o,a)=>{c.then(async e=>{p&&await p.end(),o(e)},async e=>{p&&await p.end(),a(e)})});if(!l&&p){let o=p.end();if(o&&typeof o.then=="function")return new Promise((a,e)=>{o.then(()=>{a(c)},u=>{e(u)})})}return c}begin(t,r,n){if(!this._started)throw new Error("profiler is not started yet");if(n===void 0){let s=ze();return this.flush(s),new yn(t,r,s,p=>this.endSync(p))}else{let s=n.beginTimer();return new yn(t,r,0,async p=>this.end(p),s,n)}}async end(t){let r=await t.checkTimer();this._timingEvents.length<this._maxNumberEvents&&(this._timingEvents.push(new wn(t.category,t.name,t.startTime,r)),this.flush(r))}endSync(t){let r=ze();this._timingEvents.length<this._maxNumberEvents&&(this._timingEvents.push(new wn(t.category,t.name,t.startTime,r)),this.flush(r))}logOneEvent(t){tt.verbose(`Profiler.${t.category}`,`${(t.endTime-t.startTime).toFixed(2)}ms on event '${t.name}' at ${t.endTime.toFixed(2)}`)}flush(t){if(this._timingEvents.length-this._flushPointer>=this._flushBatchSize||t-this._flushTime>=this._flushIntervalInMilliseconds){for(let r=this._flushPointer;this._flushPointer<r+this._flushBatchSize&&this._flushPointer<this._timingEvents.length;this._flushPointer++)this.logOneEvent(this._timingEvents[this._flushPointer]);this._flushTime=ze()}}get started(){return this._started}},ze=typeof performance<"u"&&performance.now?()=>performance.now():Date.now});function Dh(t,r,n){for(let s of n){let p=s[0],l=s[1],c=s[2],o=s[3],a=s[4];if(t.opType===p){for(let e of r)if((e.domain===l||e.domain==="ai.onnx"&&l==="")&&Nh(e.version,c))return{opImpl:o,opInit:a}}}throw new TypeError(`cannot resolve operator '${t.opType}' with opsets: ${r.map(s=>`${s.domain||"ai.onnx"} v${s.version}`).join(", ")}`)}function Nh(t,r){if(r.endsWith("+")){let n=Number.parseInt(r.substring(0,r.length-1),10);return!isNaN(n)&&n<=t}else if(r.split("-").length===2){let n=r.split("-"),s=Number.parseInt(n[0],10),p=Number.parseInt(n[1],10);return!isNaN(s)&&!isNaN(p)&&s<=t&&t<=p}else return Number.parseInt(r,10)===t}var kh=I(()=>{"use strict"}),Fh=nt(t=>{"use strict";t.__esModule=!0;var r=function(){function n(s){if(!s)throw new TypeError("Invalid argument; `value` has no value.");this.value=n.EMPTY,s&&n.isGuid(s)&&(this.value=s)}return n.isGuid=function(s){var p=s.toString();return s&&(s instanceof n||n.validator.test(p))},n.create=function(){return new n([n.gen(2),n.gen(1),n.gen(1),n.gen(1),n.gen(3)].join("-"))},n.createEmpty=function(){return new n("emptyguid")},n.parse=function(s){return new n(s)},n.raw=function(){return[n.gen(2),n.gen(1),n.gen(1),n.gen(1),n.gen(3)].join("-")},n.gen=function(s){for(var p="",l=0;l<s;l++)p+=((1+Math.random())*65536|0).toString(16).substring(1);return p},n.prototype.equals=function(s){return n.isGuid(s)&&this.value===s.toString()},n.prototype.isEmpty=function(){return this.value===n.EMPTY},n.prototype.toString=function(){return this.value},n.prototype.toJSON=function(){return{value:this.value}},n.validator=new RegExp("^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$","i"),n.EMPTY="00000000-0000-0000-0000-000000000000",n}();t.Guid=r});function W(t,r,n){this.low=t|0,this.high=r|0,this.unsigned=!!n}function dt(t){return(t&&t.__isLong__)===!0}function ma(t){var r=Math.clz32(t&-t);return t?31-r:r}function pe(t,r){var n,s,p;return r?(t>>>=0,(p=0<=t&&t<256)&&(s=ao[t],s)?s:(n=M(t,0,!0),p&&(ao[t]=n),n)):(t|=0,(p=-128<=t&&t<128)&&(s=io[t],s)?s:(n=M(t,t<0?-1:0,!1),p&&(io[t]=n),n))}function kt(t,r){if(isNaN(t))return r?Bt:Nt;if(r){if(t<0)return Bt;if(t>=so)return po}else{if(t<=-uo)return mt;if(t+1>=uo)return lo}return t<0?kt(-t,r).neg():M(t%ye|0,t/ye|0,r)}function M(t,r,n){return new W(t,r,n)}function Go(t,r,n){if(t.length===0)throw Error("empty string");if(typeof r=="number"?(n=r,r=!1):r=!!r,t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return r?Bt:Nt;if(n=n||10,n<2||36<n)throw RangeError("radix");var s;if((s=t.indexOf("-"))>0)throw Error("interior hyphen");if(s===0)return Go(t.substring(1),r,n).neg();for(var p=kt(sr(n,8)),l=Nt,c=0;c<t.length;c+=8){var o=Math.min(8,t.length-c),a=parseInt(t.substring(c,c+o),n);if(o<8){var e=kt(sr(n,o));l=l.mul(e).add(kt(a))}else l=l.mul(p),l=l.add(kt(a))}return l.unsigned=r,l}function Lt(t,r){return typeof t=="number"?kt(t,r):typeof t=="string"?Go(t,r):M(t.low,t.high,typeof r=="boolean"?r:t.unsigned)}var _t,io,ao,sr,vn,ba,ye,so,uo,xn,Nt,Bt,ce,Tn,Fr,lo,po,mt,A,ee,fl=I(()=>{_t=null;try{_t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}W.prototype.__isLong__,Object.defineProperty(W.prototype,"__isLong__",{value:!0}),W.isLong=dt,io={},ao={},W.fromInt=pe,W.fromNumber=kt,W.fromBits=M,sr=Math.pow,W.fromString=Go,W.fromValue=Lt,vn=65536,ba=1<<24,ye=vn*vn,so=ye*ye,uo=so/2,xn=pe(ba),Nt=pe(0),W.ZERO=Nt,Bt=pe(0,!0),W.UZERO=Bt,ce=pe(1),W.ONE=ce,Tn=pe(1,!0),W.UONE=Tn,Fr=pe(-1),W.NEG_ONE=Fr,lo=M(-1,2147483647,!1),W.MAX_VALUE=lo,po=M(-1,-1,!0),W.MAX_UNSIGNED_VALUE=po,mt=M(0,-2147483648,!1),W.MIN_VALUE=mt,A=W.prototype,A.toInt=function(){return this.unsigned?this.low>>>0:this.low},A.toNumber=function(){return this.unsigned?(this.high>>>0)*ye+(this.low>>>0):this.high*ye+(this.low>>>0)},A.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(mt)){var r=kt(t),n=this.div(r),s=n.mul(r).sub(this);return n.toString(t)+s.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var p=kt(sr(t,6),this.unsigned),l=this,c="";;){var o=l.div(p),a=l.sub(o.mul(p)).toInt()>>>0,e=a.toString(t);if(l=o,l.isZero())return e+c;for(;e.length<6;)e="0"+e;c=""+e+c}},A.getHighBits=function(){return this.high},A.getHighBitsUnsigned=function(){return this.high>>>0},A.getLowBits=function(){return this.low},A.getLowBitsUnsigned=function(){return this.low>>>0},A.getNumBitsAbs=function(){if(this.isNegative())return this.eq(mt)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,r=31;r>0&&!(t&1<<r);r--);return this.high!=0?r+33:r+1},A.isZero=function(){return this.high===0&&this.low===0},A.eqz=A.isZero,A.isNegative=function(){return!this.unsigned&&this.high<0},A.isPositive=function(){return this.unsigned||this.high>=0},A.isOdd=function(){return(this.low&1)===1},A.isEven=function(){return(this.low&1)===0},A.equals=function(t){return dt(t)||(t=Lt(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},A.eq=A.equals,A.notEquals=function(t){return!this.eq(t)},A.neq=A.notEquals,A.ne=A.notEquals,A.lessThan=function(t){return this.comp(t)<0},A.lt=A.lessThan,A.lessThanOrEqual=function(t){return this.comp(t)<=0},A.lte=A.lessThanOrEqual,A.le=A.lessThanOrEqual,A.greaterThan=function(t){return this.comp(t)>0},A.gt=A.greaterThan,A.greaterThanOrEqual=function(t){return this.comp(t)>=0},A.gte=A.greaterThanOrEqual,A.ge=A.greaterThanOrEqual,A.compare=function(t){if(dt(t)||(t=Lt(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},A.comp=A.compare,A.negate=function(){return!this.unsigned&&this.eq(mt)?mt:this.not().add(ce)},A.neg=A.negate,A.add=function(t){dt(t)||(t=Lt(t));var r=this.high>>>16,n=this.high&65535,s=this.low>>>16,p=this.low&65535,l=t.high>>>16,c=t.high&65535,o=t.low>>>16,a=t.low&65535,e=0,u=0,i=0,d=0;return d+=p+a,i+=d>>>16,d&=65535,i+=s+o,u+=i>>>16,i&=65535,u+=n+c,e+=u>>>16,u&=65535,e+=r+l,e&=65535,M(i<<16|d,e<<16|u,this.unsigned)},A.subtract=function(t){return dt(t)||(t=Lt(t)),this.add(t.neg())},A.sub=A.subtract,A.multiply=function(t){if(this.isZero())return this;if(dt(t)||(t=Lt(t)),_t){var r=_t.mul(this.low,this.high,t.low,t.high);return M(r,_t.get_high(),this.unsigned)}if(t.isZero())return this.unsigned?Bt:Nt;if(this.eq(mt))return t.isOdd()?mt:Nt;if(t.eq(mt))return this.isOdd()?mt:Nt;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(xn)&&t.lt(xn))return kt(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,s=this.high&65535,p=this.low>>>16,l=this.low&65535,c=t.high>>>16,o=t.high&65535,a=t.low>>>16,e=t.low&65535,u=0,i=0,d=0,h=0;return h+=l*e,d+=h>>>16,h&=65535,d+=p*e,i+=d>>>16,d&=65535,d+=l*a,i+=d>>>16,d&=65535,i+=s*e,u+=i>>>16,i&=65535,i+=p*a,u+=i>>>16,i&=65535,i+=l*o,u+=i>>>16,i&=65535,u+=n*e+s*a+p*o+l*c,u&=65535,M(d<<16|h,u<<16|i,this.unsigned)},A.mul=A.multiply,A.divide=function(t){if(dt(t)||(t=Lt(t)),t.isZero())throw Error("division by zero");if(_t){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var r=(this.unsigned?_t.div_u:_t.div_s)(this.low,this.high,t.low,t.high);return M(r,_t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Bt:Nt;var n,s,p;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Bt;if(t.gt(this.shru(1)))return Tn;p=Bt}else{if(this.eq(mt)){if(t.eq(ce)||t.eq(Fr))return mt;if(t.eq(mt))return ce;var l=this.shr(1);return n=l.div(t).shl(1),n.eq(Nt)?t.isNegative()?ce:Fr:(s=this.sub(t.mul(n)),p=n.add(s.div(t)),p)}else if(t.eq(mt))return this.unsigned?Bt:Nt;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();p=Nt}for(s=this;s.gte(t);){n=Math.max(1,Math.floor(s.toNumber()/t.toNumber()));for(var c=Math.ceil(Math.log(n)/Math.LN2),o=c<=48?1:sr(2,c-48),a=kt(n),e=a.mul(t);e.isNegative()||e.gt(s);)n-=o,a=kt(n,this.unsigned),e=a.mul(t);a.isZero()&&(a=ce),p=p.add(a),s=s.sub(e)}return p},A.div=A.divide,A.modulo=function(t){if(dt(t)||(t=Lt(t)),_t){var r=(this.unsigned?_t.rem_u:_t.rem_s)(this.low,this.high,t.low,t.high);return M(r,_t.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},A.mod=A.modulo,A.rem=A.modulo,A.not=function(){return M(~this.low,~this.high,this.unsigned)},A.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},A.clz=A.countLeadingZeros,A.countTrailingZeros=function(){return this.low?ma(this.low):ma(this.high)+32},A.ctz=A.countTrailingZeros,A.and=function(t){return dt(t)||(t=Lt(t)),M(this.low&t.low,this.high&t.high,this.unsigned)},A.or=function(t){return dt(t)||(t=Lt(t)),M(this.low|t.low,this.high|t.high,this.unsigned)},A.xor=function(t){return dt(t)||(t=Lt(t)),M(this.low^t.low,this.high^t.high,this.unsigned)},A.shiftLeft=function(t){return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?M(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):M(0,this.low<<t-32,this.unsigned)},A.shl=A.shiftLeft,A.shiftRight=function(t){return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?M(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):M(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},A.shr=A.shiftRight,A.shiftRightUnsigned=function(t){return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?M(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?M(this.high,0,this.unsigned):M(this.high>>>t-32,0,this.unsigned)},A.shru=A.shiftRightUnsigned,A.shr_u=A.shiftRightUnsigned,A.rotateLeft=function(t){var r;return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?M(this.high,this.low,this.unsigned):t<32?(r=32-t,M(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,M(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))},A.rotl=A.rotateLeft,A.rotateRight=function(t){var r;return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?M(this.high,this.low,this.unsigned):t<32?(r=32-t,M(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,M(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))},A.rotr=A.rotateRight,A.toSigned=function(){return this.unsigned?M(this.low,this.high,!1):this},A.toUnsigned=function(){return this.unsigned?this:M(this.low,this.high,!0)},A.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},A.toBytesLE=function(){var t=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},A.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,r>>>24,r>>>16&255,r>>>8&255,r&255]},W.fromBytes=function(t,r,n){return n?W.fromBytesLE(t,r):W.fromBytesBE(t,r)},W.fromBytesLE=function(t,r){return new W(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)},W.fromBytesBE=function(t,r){return new W(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)},ee=W}),T,Ho=I(()=>{T={},T.Offset,T.Table,T.SIZEOF_SHORT=2,T.SIZEOF_INT=4,T.FILE_IDENTIFIER_LENGTH=4,T.SIZE_PREFIX_LENGTH=4,T.Encoding={UTF8_BYTES:1,UTF16_STRING:2},T.int32=new Int32Array(2),T.float32=new Float32Array(T.int32.buffer),T.float64=new Float64Array(T.int32.buffer),T.isLittleEndian=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1,T.Long=function(t,r){this.low=t|0,this.high=r|0},T.Long.create=function(t,r){return t==0&&r==0?T.Long.ZERO:new T.Long(t,r)},T.Long.prototype.toFloat64=function(){return(this.low>>>0)+this.high*4294967296},T.Long.prototype.equals=function(t){return this.low==t.low&&this.high==t.high},T.Long.ZERO=new T.Long(0,0),T.Builder=function(t){if(t)var r=t;else var r=1024;this.bb=T.ByteBuffer.allocate(r),this.space=r,this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1},T.Builder.prototype.clear=function(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1},T.Builder.prototype.forceDefaults=function(t){this.force_defaults=t},T.Builder.prototype.dataBuffer=function(){return this.bb},T.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())},T.Builder.prototype.prep=function(t,r){t>this.minalign&&(this.minalign=t);for(var n=~(this.bb.capacity()-this.space+r)+1&t-1;this.space<n+t+r;){var s=this.bb.capacity();this.bb=T.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-s}this.pad(n)},T.Builder.prototype.pad=function(t){for(var r=0;r<t;r++)this.bb.writeInt8(--this.space,0)},T.Builder.prototype.writeInt8=function(t){this.bb.writeInt8(this.space-=1,t)},T.Builder.prototype.writeInt16=function(t){this.bb.writeInt16(this.space-=2,t)},T.Builder.prototype.writeInt32=function(t){this.bb.writeInt32(this.space-=4,t)},T.Builder.prototype.writeInt64=function(t){this.bb.writeInt64(this.space-=8,t)},T.Builder.prototype.writeFloat32=function(t){this.bb.writeFloat32(this.space-=4,t)},T.Builder.prototype.writeFloat64=function(t){this.bb.writeFloat64(this.space-=8,t)},T.Builder.prototype.addInt8=function(t){this.prep(1,0),this.writeInt8(t)},T.Builder.prototype.addInt16=function(t){this.prep(2,0),this.writeInt16(t)},T.Builder.prototype.addInt32=function(t){this.prep(4,0),this.writeInt32(t)},T.Builder.prototype.addInt64=function(t){this.prep(8,0),this.writeInt64(t)},T.Builder.prototype.addFloat32=function(t){this.prep(4,0),this.writeFloat32(t)},T.Builder.prototype.addFloat64=function(t){this.prep(8,0),this.writeFloat64(t)},T.Builder.prototype.addFieldInt8=function(t,r,n){(this.force_defaults||r!=n)&&(this.addInt8(r),this.slot(t))},T.Builder.prototype.addFieldInt16=function(t,r,n){(this.force_defaults||r!=n)&&(this.addInt16(r),this.slot(t))},T.Builder.prototype.addFieldInt32=function(t,r,n){(this.force_defaults||r!=n)&&(this.addInt32(r),this.slot(t))},T.Builder.prototype.addFieldInt64=function(t,r,n){(this.force_defaults||!r.equals(n))&&(this.addInt64(r),this.slot(t))},T.Builder.prototype.addFieldFloat32=function(t,r,n){(this.force_defaults||r!=n)&&(this.addFloat32(r),this.slot(t))},T.Builder.prototype.addFieldFloat64=function(t,r,n){(this.force_defaults||r!=n)&&(this.addFloat64(r),this.slot(t))},T.Builder.prototype.addFieldOffset=function(t,r,n){(this.force_defaults||r!=n)&&(this.addOffset(r),this.slot(t))},T.Builder.prototype.addFieldStruct=function(t,r,n){r!=n&&(this.nested(r),this.slot(t))},T.Builder.prototype.nested=function(t){if(t!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")},T.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")},T.Builder.prototype.slot=function(t){this.vtable[t]=this.offset()},T.Builder.prototype.offset=function(){return this.bb.capacity()-this.space},T.Builder.growByteBuffer=function(t){var r=t.capacity();if(r&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");var n=r<<1,s=T.ByteBuffer.allocate(n);return s.setPosition(n-r),s.bytes().set(t.bytes(),n-r),s},T.Builder.prototype.addOffset=function(t){this.prep(T.SIZEOF_INT,0),this.writeInt32(this.offset()-t+T.SIZEOF_INT)},T.Builder.prototype.startObject=function(t){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=t;for(var r=0;r<t;r++)this.vtable[r]=0;this.isNested=!0,this.object_start=this.offset()},T.Builder.prototype.endObject=function(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);for(var t=this.offset(),r=this.vtable_in_use-1;r>=0&&this.vtable[r]==0;r--);for(var n=r+1;r>=0;r--)this.addInt16(this.vtable[r]!=0?t-this.vtable[r]:0);var s=2;this.addInt16(t-this.object_start);var p=(n+s)*T.SIZEOF_SHORT;this.addInt16(p);var l=0,c=this.space;t:for(r=0;r<this.vtables.length;r++){var o=this.bb.capacity()-this.vtables[r];if(p==this.bb.readInt16(o)){for(var a=T.SIZEOF_SHORT;a<p;a+=T.SIZEOF_SHORT)if(this.bb.readInt16(c+a)!=this.bb.readInt16(o+a))continue t;l=this.vtables[r];break}}return l?(this.space=this.bb.capacity()-t,this.bb.writeInt32(this.space,l-t)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-t,this.offset()-t)),this.isNested=!1,t},T.Builder.prototype.finish=function(t,r,n){var s=n?T.SIZE_PREFIX_LENGTH:0;if(r){var p=r;if(this.prep(this.minalign,T.SIZEOF_INT+T.FILE_IDENTIFIER_LENGTH+s),p.length!=T.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+T.FILE_IDENTIFIER_LENGTH);for(var l=T.FILE_IDENTIFIER_LENGTH-1;l>=0;l--)this.writeInt8(p.charCodeAt(l))}this.prep(this.minalign,T.SIZEOF_INT+s),this.addOffset(t),s&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)},T.Builder.prototype.finishSizePrefixed=function(t,r){this.finish(t,r,!0)},T.Builder.prototype.requiredField=function(t,r){var n=this.bb.capacity()-t,s=n-this.bb.readInt32(n),p=this.bb.readInt16(s+r)!=0;if(!p)throw new Error("FlatBuffers: field "+r+" must be set")},T.Builder.prototype.startVector=function(t,r,n){this.notNested(),this.vector_num_elems=r,this.prep(T.SIZEOF_INT,t*r),this.prep(n,t*r)},T.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()},T.Builder.prototype.createString=function(t){if(t instanceof Uint8Array)var r=t;else for(var r=[],n=0;n<t.length;){var s,p=t.charCodeAt(n++);if(p<55296||p>=56320)s=p;else{var l=t.charCodeAt(n++);s=(p<<10)+l+-56613888}s<128?r.push(s):(s<2048?r.push(s>>6&31|192):(s<65536?r.push(s>>12&15|224):r.push(s>>18&7|240,s>>12&63|128),r.push(s>>6&63|128)),r.push(s&63|128))}this.addInt8(0),this.startVector(1,r.length,1),this.bb.setPosition(this.space-=r.length);for(var n=0,c=this.space,o=this.bb.bytes();n<r.length;n++)o[c++]=r[n];return this.endVector()},T.Builder.prototype.createLong=function(t,r){return T.Long.create(t,r)},T.ByteBuffer=function(t){this.bytes_=t,this.position_=0},T.ByteBuffer.allocate=function(t){return new T.ByteBuffer(new Uint8Array(t))},T.ByteBuffer.prototype.clear=function(){this.position_=0},T.ByteBuffer.prototype.bytes=function(){return this.bytes_},T.ByteBuffer.prototype.position=function(){return this.position_},T.ByteBuffer.prototype.setPosition=function(t){this.position_=t},T.ByteBuffer.prototype.capacity=function(){return this.bytes_.length},T.ByteBuffer.prototype.readInt8=function(t){return this.readUint8(t)<<24>>24},T.ByteBuffer.prototype.readUint8=function(t){return this.bytes_[t]},T.ByteBuffer.prototype.readInt16=function(t){return this.readUint16(t)<<16>>16},T.ByteBuffer.prototype.readUint16=function(t){return this.bytes_[t]|this.bytes_[t+1]<<8},T.ByteBuffer.prototype.readInt32=function(t){return this.bytes_[t]|this.bytes_[t+1]<<8|this.bytes_[t+2]<<16|this.bytes_[t+3]<<24},T.ByteBuffer.prototype.readUint32=function(t){return this.readInt32(t)>>>0},T.ByteBuffer.prototype.readInt64=function(t){return new T.Long(this.readInt32(t),this.readInt32(t+4))},T.ByteBuffer.prototype.readUint64=function(t){return new T.Long(this.readUint32(t),this.readUint32(t+4))},T.ByteBuffer.prototype.readFloat32=function(t){return T.int32[0]=this.readInt32(t),T.float32[0]},T.ByteBuffer.prototype.readFloat64=function(t){return T.int32[T.isLittleEndian?0:1]=this.readInt32(t),T.int32[T.isLittleEndian?1:0]=this.readInt32(t+4),T.float64[0]},T.ByteBuffer.prototype.writeInt8=function(t,r){this.bytes_[t]=r},T.ByteBuffer.prototype.writeUint8=function(t,r){this.bytes_[t]=r},T.ByteBuffer.prototype.writeInt16=function(t,r){this.bytes_[t]=r,this.bytes_[t+1]=r>>8},T.ByteBuffer.prototype.writeUint16=function(t,r){this.bytes_[t]=r,this.bytes_[t+1]=r>>8},T.ByteBuffer.prototype.writeInt32=function(t,r){this.bytes_[t]=r,this.bytes_[t+1]=r>>8,this.bytes_[t+2]=r>>16,this.bytes_[t+3]=r>>24},T.ByteBuffer.prototype.writeUint32=function(t,r){this.bytes_[t]=r,this.bytes_[t+1]=r>>8,this.bytes_[t+2]=r>>16,this.bytes_[t+3]=r>>24},T.ByteBuffer.prototype.writeInt64=function(t,r){this.writeInt32(t,r.low),this.writeInt32(t+4,r.high)},T.ByteBuffer.prototype.writeUint64=function(t,r){this.writeUint32(t,r.low),this.writeUint32(t+4,r.high)},T.ByteBuffer.prototype.writeFloat32=function(t,r){T.float32[0]=r,this.writeInt32(t,T.int32[0])},T.ByteBuffer.prototype.writeFloat64=function(t,r){T.float64[0]=r,this.writeInt32(t,T.int32[T.isLittleEndian?0:1]),this.writeInt32(t+4,T.int32[T.isLittleEndian?1:0])},T.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+T.SIZEOF_INT+T.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var t="",r=0;r<T.FILE_IDENTIFIER_LENGTH;r++)t+=String.fromCharCode(this.readInt8(this.position_+T.SIZEOF_INT+r));return t},T.ByteBuffer.prototype.__offset=function(t,r){var n=t-this.readInt32(t);return r<this.readInt16(n)?this.readInt16(n+r):0},T.ByteBuffer.prototype.__union=function(t,r){return t.bb_pos=r+this.readInt32(r),t.bb=this,t},T.ByteBuffer.prototype.__string=function(t,r){t+=this.readInt32(t);var n=this.readInt32(t),s="",p=0;if(t+=T.SIZEOF_INT,r===T.Encoding.UTF8_BYTES)return this.bytes_.subarray(t,t+n);for(;p<n;){var l,c=this.readUint8(t+p++);if(c<192)l=c;else{var o=this.readUint8(t+p++);if(c<224)l=(c&31)<<6|o&63;else{var a=this.readUint8(t+p++);if(c<240)l=(c&15)<<12|(o&63)<<6|a&63;else{var e=this.readUint8(t+p++);l=(c&7)<<18|(o&63)<<12|(a&63)<<6|e&63}}}l<65536?s+=String.fromCharCode(l):(l-=65536,s+=String.fromCharCode((l>>10)+55296,(l&1023)+56320))}return s},T.ByteBuffer.prototype.__indirect=function(t){return t+this.readInt32(t)},T.ByteBuffer.prototype.__vector=function(t){return t+this.readInt32(t)+T.SIZEOF_INT},T.ByteBuffer.prototype.__vector_len=function(t){return this.readInt32(t+this.readInt32(t))},T.ByteBuffer.prototype.__has_identifier=function(t){if(t.length!=T.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+T.FILE_IDENTIFIER_LENGTH);for(var r=0;r<T.FILE_IDENTIFIER_LENGTH;r++)if(t.charCodeAt(r)!=this.readInt8(this.position_+T.SIZEOF_INT+r))return!1;return!0},T.ByteBuffer.prototype.createLong=function(t,r){return T.Long.create(t,r)}}),H,Zr=I(()=>{"use strict";Ho(),(t=>{let r;(n=>{let s;(p=>{let l;(c=>(c[c.UNDEFINED=0]="UNDEFINED",c[c.FLOAT=1]="FLOAT",c[c.INT=2]="INT",c[c.STRING=3]="STRING",c[c.TENSOR=4]="TENSOR",c[c.GRAPH=5]="GRAPH",c[c.FLOATS=6]="FLOATS",c[c.INTS=7]="INTS",c[c.STRINGS=8]="STRINGS",c[c.TENSORS=9]="TENSORS",c[c.GRAPHS=10]="GRAPHS",c[c.SPARSE_TENSOR=11]="SPARSE_TENSOR",c[c.SPARSE_TENSORS=12]="SPARSE_TENSORS"))(l=p.AttributeType||(p.AttributeType={}))})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{let l;(c=>(c[c.UNKNOWN=0]="UNKNOWN",c[c.VALUE=1]="VALUE",c[c.PARAM=2]="PARAM"))(l=p.DimensionValueType||(p.DimensionValueType={}))})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{let l;(c=>(c[c.UNDEFINED=0]="UNDEFINED",c[c.FLOAT=1]="FLOAT",c[c.UINT8=2]="UINT8",c[c.INT8=3]="INT8",c[c.UINT16=4]="UINT16",c[c.INT16=5]="INT16",c[c.INT32=6]="INT32",c[c.INT64=7]="INT64",c[c.STRING=8]="STRING",c[c.BOOL=9]="BOOL",c[c.FLOAT16=10]="FLOAT16",c[c.DOUBLE=11]="DOUBLE",c[c.UINT32=12]="UINT32",c[c.UINT64=13]="UINT64",c[c.COMPLEX64=14]="COMPLEX64",c[c.COMPLEX128=15]="COMPLEX128",c[c.BFLOAT16=16]="BFLOAT16",c[c.FLOAT8E4M3FN=17]="FLOAT8E4M3FN",c[c.FLOAT8E4M3FNUZ=18]="FLOAT8E4M3FNUZ",c[c.FLOAT8E5M2=19]="FLOAT8E5M2",c[c.FLOAT8E5M2FNUZ=20]="FLOAT8E5M2FNUZ"))(l=p.TensorDataType||(p.TensorDataType={}))})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{let l;(c=>(c[c.Primitive=0]="Primitive",c[c.Fused=1]="Fused"))(l=p.NodeType||(p.NodeType={}))})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{let l;(c=>(c[c.NONE=0]="NONE",c[c.tensor_type=1]="tensor_type",c[c.sequence_type=2]="sequence_type",c[c.map_type=3]="map_type"))(l=p.TypeInfoValue||(p.TypeInfoValue={}))})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsShape(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsShape(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}dim(o,a){let e=this.bb.__offset(this.bb_pos,4);return e?(a||new t.experimental.fbs.Dimension).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}dimLength(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.__vector_len(this.bb_pos+o):0}static startShape(o){o.startObject(1)}static addDim(o,a){o.addFieldOffset(0,a,0)}static createDimVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startDimVector(o,a){o.startVector(4,a,4)}static endShape(o){return o.endObject()}static createShape(o,a){return l.startShape(o),l.addDim(o,a),l.endShape(o)}}p.Shape=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsDimension(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsDimension(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}value(o){let a=this.bb.__offset(this.bb_pos,4);return a?(o||new t.experimental.fbs.DimensionValue).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}denotation(o){let a=this.bb.__offset(this.bb_pos,6);return a?this.bb.__string(this.bb_pos+a,o):null}static startDimension(o){o.startObject(2)}static addValue(o,a){o.addFieldOffset(0,a,0)}static addDenotation(o,a){o.addFieldOffset(1,a,0)}static endDimension(o){return o.endObject()}static createDimension(o,a,e){return l.startDimension(o),l.addValue(o,a),l.addDenotation(o,e),l.endDimension(o)}}p.Dimension=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsDimensionValue(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsDimensionValue(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}dimType(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.readInt8(this.bb_pos+o):0}dimValue(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.readInt64(this.bb_pos+o):this.bb.createLong(0,0)}dimParam(o){let a=this.bb.__offset(this.bb_pos,8);return a?this.bb.__string(this.bb_pos+a,o):null}static startDimensionValue(o){o.startObject(3)}static addDimType(o,a){o.addFieldInt8(0,a,0)}static addDimValue(o,a){o.addFieldInt64(1,a,o.createLong(0,0))}static addDimParam(o,a){o.addFieldOffset(2,a,0)}static endDimensionValue(o){return o.endObject()}static createDimensionValue(o,a,e,u){return l.startDimensionValue(o),l.addDimType(o,a),l.addDimValue(o,e),l.addDimParam(o,u),l.endDimensionValue(o)}}p.DimensionValue=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsTensorTypeAndShape(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsTensorTypeAndShape(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}elemType(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.readInt32(this.bb_pos+o):0}shape(o){let a=this.bb.__offset(this.bb_pos,6);return a?(o||new t.experimental.fbs.Shape).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}static startTensorTypeAndShape(o){o.startObject(2)}static addElemType(o,a){o.addFieldInt32(0,a,0)}static addShape(o,a){o.addFieldOffset(1,a,0)}static endTensorTypeAndShape(o){return o.endObject()}static createTensorTypeAndShape(o,a,e){return l.startTensorTypeAndShape(o),l.addElemType(o,a),l.addShape(o,e),l.endTensorTypeAndShape(o)}}p.TensorTypeAndShape=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsMapType(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsMapType(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}keyType(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.readInt32(this.bb_pos+o):0}valueType(o){let a=this.bb.__offset(this.bb_pos,6);return a?(o||new t.experimental.fbs.TypeInfo).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}static startMapType(o){o.startObject(2)}static addKeyType(o,a){o.addFieldInt32(0,a,0)}static addValueType(o,a){o.addFieldOffset(1,a,0)}static endMapType(o){return o.endObject()}static createMapType(o,a,e){return l.startMapType(o),l.addKeyType(o,a),l.addValueType(o,e),l.endMapType(o)}}p.MapType=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsSequenceType(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsSequenceType(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}elemType(o){let a=this.bb.__offset(this.bb_pos,4);return a?(o||new t.experimental.fbs.TypeInfo).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}static startSequenceType(o){o.startObject(1)}static addElemType(o,a){o.addFieldOffset(0,a,0)}static endSequenceType(o){return o.endObject()}static createSequenceType(o,a){return l.startSequenceType(o),l.addElemType(o,a),l.endSequenceType(o)}}p.SequenceType=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}nodeIndex(){return this.bb.readUint32(this.bb_pos)}srcArgIndex(){return this.bb.readInt32(this.bb_pos+4)}dstArgIndex(){return this.bb.readInt32(this.bb_pos+8)}static createEdgeEnd(o,a,e,u){return o.prep(4,12),o.writeInt32(u),o.writeInt32(e),o.writeInt32(a),o.offset()}}p.EdgeEnd=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsNodeEdge(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsNodeEdge(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}nodeIndex(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.readUint32(this.bb_pos+o):0}inputEdges(o,a){let e=this.bb.__offset(this.bb_pos,6);return e?(a||new t.experimental.fbs.EdgeEnd).__init(this.bb.__vector(this.bb_pos+e)+o*12,this.bb):null}inputEdgesLength(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.__vector_len(this.bb_pos+o):0}outputEdges(o,a){let e=this.bb.__offset(this.bb_pos,8);return e?(a||new t.experimental.fbs.EdgeEnd).__init(this.bb.__vector(this.bb_pos+e)+o*12,this.bb):null}outputEdgesLength(){let o=this.bb.__offset(this.bb_pos,8);return o?this.bb.__vector_len(this.bb_pos+o):0}static startNodeEdge(o){o.startObject(3)}static addNodeIndex(o,a){o.addFieldInt32(0,a,0)}static addInputEdges(o,a){o.addFieldOffset(1,a,0)}static startInputEdgesVector(o,a){o.startVector(12,a,4)}static addOutputEdges(o,a){o.addFieldOffset(2,a,0)}static startOutputEdgesVector(o,a){o.startVector(12,a,4)}static endNodeEdge(o){return o.endObject()}static createNodeEdge(o,a,e,u){return l.startNodeEdge(o),l.addNodeIndex(o,a),l.addInputEdges(o,e),l.addOutputEdges(o,u),l.endNodeEdge(o)}}p.NodeEdge=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsNode(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsNode(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}name(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}docString(o){let a=this.bb.__offset(this.bb_pos,6);return a?this.bb.__string(this.bb_pos+a,o):null}domain(o){let a=this.bb.__offset(this.bb_pos,8);return a?this.bb.__string(this.bb_pos+a,o):null}sinceVersion(){let o=this.bb.__offset(this.bb_pos,10);return o?this.bb.readInt32(this.bb_pos+o):0}index(){let o=this.bb.__offset(this.bb_pos,12);return o?this.bb.readUint32(this.bb_pos+o):0}opType(o){let a=this.bb.__offset(this.bb_pos,14);return a?this.bb.__string(this.bb_pos+a,o):null}type(){let o=this.bb.__offset(this.bb_pos,16);return o?this.bb.readInt32(this.bb_pos+o):0}executionProviderType(o){let a=this.bb.__offset(this.bb_pos,18);return a?this.bb.__string(this.bb_pos+a,o):null}inputs(o,a){let e=this.bb.__offset(this.bb_pos,20);return e?this.bb.__string(this.bb.__vector(this.bb_pos+e)+o*4,a):null}inputsLength(){let o=this.bb.__offset(this.bb_pos,20);return o?this.bb.__vector_len(this.bb_pos+o):0}outputs(o,a){let e=this.bb.__offset(this.bb_pos,22);return e?this.bb.__string(this.bb.__vector(this.bb_pos+e)+o*4,a):null}outputsLength(){let o=this.bb.__offset(this.bb_pos,22);return o?this.bb.__vector_len(this.bb_pos+o):0}attributes(o,a){let e=this.bb.__offset(this.bb_pos,24);return e?(a||new t.experimental.fbs.Attribute).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}attributesLength(){let o=this.bb.__offset(this.bb_pos,24);return o?this.bb.__vector_len(this.bb_pos+o):0}inputArgCounts(o){let a=this.bb.__offset(this.bb_pos,26);return a?this.bb.readInt32(this.bb.__vector(this.bb_pos+a)+o*4):0}inputArgCountsLength(){let o=this.bb.__offset(this.bb_pos,26);return o?this.bb.__vector_len(this.bb_pos+o):0}inputArgCountsArray(){let o=this.bb.__offset(this.bb_pos,26);return o?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+o),this.bb.__vector_len(this.bb_pos+o)):null}implicitInputs(o,a){let e=this.bb.__offset(this.bb_pos,28);return e?this.bb.__string(this.bb.__vector(this.bb_pos+e)+o*4,a):null}implicitInputsLength(){let o=this.bb.__offset(this.bb_pos,28);return o?this.bb.__vector_len(this.bb_pos+o):0}static startNode(o){o.startObject(13)}static addName(o,a){o.addFieldOffset(0,a,0)}static addDocString(o,a){o.addFieldOffset(1,a,0)}static addDomain(o,a){o.addFieldOffset(2,a,0)}static addSinceVersion(o,a){o.addFieldInt32(3,a,0)}static addIndex(o,a){o.addFieldInt32(4,a,0)}static addOpType(o,a){o.addFieldOffset(5,a,0)}static addType(o,a){o.addFieldInt32(6,a,0)}static addExecutionProviderType(o,a){o.addFieldOffset(7,a,0)}static addInputs(o,a){o.addFieldOffset(8,a,0)}static createInputsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startInputsVector(o,a){o.startVector(4,a,4)}static addOutputs(o,a){o.addFieldOffset(9,a,0)}static createOutputsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startOutputsVector(o,a){o.startVector(4,a,4)}static addAttributes(o,a){o.addFieldOffset(10,a,0)}static createAttributesVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startAttributesVector(o,a){o.startVector(4,a,4)}static addInputArgCounts(o,a){o.addFieldOffset(11,a,0)}static createInputArgCountsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addInt32(a[e]);return o.endVector()}static startInputArgCountsVector(o,a){o.startVector(4,a,4)}static addImplicitInputs(o,a){o.addFieldOffset(12,a,0)}static createImplicitInputsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startImplicitInputsVector(o,a){o.startVector(4,a,4)}static endNode(o){return o.endObject()}static createNode(o,a,e,u,i,d,h,m,b,x,E,w,S,$){return l.startNode(o),l.addName(o,a),l.addDocString(o,e),l.addDomain(o,u),l.addSinceVersion(o,i),l.addIndex(o,d),l.addOpType(o,h),l.addType(o,m),l.addExecutionProviderType(o,b),l.addInputs(o,x),l.addOutputs(o,E),l.addAttributes(o,w),l.addInputArgCounts(o,S),l.addImplicitInputs(o,$),l.endNode(o)}}p.Node=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsValueInfo(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsValueInfo(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}name(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}docString(o){let a=this.bb.__offset(this.bb_pos,6);return a?this.bb.__string(this.bb_pos+a,o):null}type(o){let a=this.bb.__offset(this.bb_pos,8);return a?(o||new t.experimental.fbs.TypeInfo).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}static startValueInfo(o){o.startObject(3)}static addName(o,a){o.addFieldOffset(0,a,0)}static addDocString(o,a){o.addFieldOffset(1,a,0)}static addType(o,a){o.addFieldOffset(2,a,0)}static endValueInfo(o){return o.endObject()}static createValueInfo(o,a,e,u){return l.startValueInfo(o),l.addName(o,a),l.addDocString(o,e),l.addType(o,u),l.endValueInfo(o)}}p.ValueInfo=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsTypeInfo(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsTypeInfo(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}denotation(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}valueType(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.readUint8(this.bb_pos+o):0}value(o){let a=this.bb.__offset(this.bb_pos,8);return a?this.bb.__union(o,this.bb_pos+a):null}static startTypeInfo(o){o.startObject(3)}static addDenotation(o,a){o.addFieldOffset(0,a,0)}static addValueType(o,a){o.addFieldInt8(1,a,0)}static addValue(o,a){o.addFieldOffset(2,a,0)}static endTypeInfo(o){return o.endObject()}static createTypeInfo(o,a,e,u){return l.startTypeInfo(o),l.addDenotation(o,a),l.addValueType(o,e),l.addValue(o,u),l.endTypeInfo(o)}}p.TypeInfo=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsOperatorSetId(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsOperatorSetId(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}domain(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}version(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.readInt64(this.bb_pos+o):this.bb.createLong(0,0)}static startOperatorSetId(o){o.startObject(2)}static addDomain(o,a){o.addFieldOffset(0,a,0)}static addVersion(o,a){o.addFieldInt64(1,a,o.createLong(0,0))}static endOperatorSetId(o){return o.endObject()}static createOperatorSetId(o,a,e){return l.startOperatorSetId(o),l.addDomain(o,a),l.addVersion(o,e),l.endOperatorSetId(o)}}p.OperatorSetId=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsTensor(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsTensor(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}name(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}docString(o){let a=this.bb.__offset(this.bb_pos,6);return a?this.bb.__string(this.bb_pos+a,o):null}dims(o){let a=this.bb.__offset(this.bb_pos,8);return a?this.bb.readInt64(this.bb.__vector(this.bb_pos+a)+o*8):this.bb.createLong(0,0)}dimsLength(){let o=this.bb.__offset(this.bb_pos,8);return o?this.bb.__vector_len(this.bb_pos+o):0}dataType(){let o=this.bb.__offset(this.bb_pos,10);return o?this.bb.readInt32(this.bb_pos+o):0}rawData(o){let a=this.bb.__offset(this.bb_pos,12);return a?this.bb.readUint8(this.bb.__vector(this.bb_pos+a)+o):0}rawDataLength(){let o=this.bb.__offset(this.bb_pos,12);return o?this.bb.__vector_len(this.bb_pos+o):0}rawDataArray(){let o=this.bb.__offset(this.bb_pos,12);return o?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+o),this.bb.__vector_len(this.bb_pos+o)):null}stringData(o,a){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__string(this.bb.__vector(this.bb_pos+e)+o*4,a):null}stringDataLength(){let o=this.bb.__offset(this.bb_pos,14);return o?this.bb.__vector_len(this.bb_pos+o):0}static startTensor(o){o.startObject(6)}static addName(o,a){o.addFieldOffset(0,a,0)}static addDocString(o,a){o.addFieldOffset(1,a,0)}static addDims(o,a){o.addFieldOffset(2,a,0)}static createDimsVector(o,a){o.startVector(8,a.length,8);for(let e=a.length-1;e>=0;e--)o.addInt64(a[e]);return o.endVector()}static startDimsVector(o,a){o.startVector(8,a,8)}static addDataType(o,a){o.addFieldInt32(3,a,0)}static addRawData(o,a){o.addFieldOffset(4,a,0)}static createRawDataVector(o,a){o.startVector(1,a.length,1);for(let e=a.length-1;e>=0;e--)o.addInt8(a[e]);return o.endVector()}static startRawDataVector(o,a){o.startVector(1,a,1)}static addStringData(o,a){o.addFieldOffset(5,a,0)}static createStringDataVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startStringDataVector(o,a){o.startVector(4,a,4)}static endTensor(o){return o.endObject()}static createTensor(o,a,e,u,i,d,h){return l.startTensor(o),l.addName(o,a),l.addDocString(o,e),l.addDims(o,u),l.addDataType(o,i),l.addRawData(o,d),l.addStringData(o,h),l.endTensor(o)}}p.Tensor=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsSparseTensor(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsSparseTensor(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}values(o){let a=this.bb.__offset(this.bb_pos,4);return a?(o||new t.experimental.fbs.Tensor).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}indices(o){let a=this.bb.__offset(this.bb_pos,6);return a?(o||new t.experimental.fbs.Tensor).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}dims(o){let a=this.bb.__offset(this.bb_pos,8);return a?this.bb.readInt64(this.bb.__vector(this.bb_pos+a)+o*8):this.bb.createLong(0,0)}dimsLength(){let o=this.bb.__offset(this.bb_pos,8);return o?this.bb.__vector_len(this.bb_pos+o):0}static startSparseTensor(o){o.startObject(3)}static addValues(o,a){o.addFieldOffset(0,a,0)}static addIndices(o,a){o.addFieldOffset(1,a,0)}static addDims(o,a){o.addFieldOffset(2,a,0)}static createDimsVector(o,a){o.startVector(8,a.length,8);for(let e=a.length-1;e>=0;e--)o.addInt64(a[e]);return o.endVector()}static startDimsVector(o,a){o.startVector(8,a,8)}static endSparseTensor(o){return o.endObject()}static createSparseTensor(o,a,e,u){return l.startSparseTensor(o),l.addValues(o,a),l.addIndices(o,e),l.addDims(o,u),l.endSparseTensor(o)}}p.SparseTensor=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsAttribute(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsAttribute(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}name(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}docString(o){let a=this.bb.__offset(this.bb_pos,6);return a?this.bb.__string(this.bb_pos+a,o):null}type(){let o=this.bb.__offset(this.bb_pos,8);return o?this.bb.readInt32(this.bb_pos+o):0}f(){let o=this.bb.__offset(this.bb_pos,10);return o?this.bb.readFloat32(this.bb_pos+o):0}i(){let o=this.bb.__offset(this.bb_pos,12);return o?this.bb.readInt64(this.bb_pos+o):this.bb.createLong(0,0)}s(o){let a=this.bb.__offset(this.bb_pos,14);return a?this.bb.__string(this.bb_pos+a,o):null}t(o){let a=this.bb.__offset(this.bb_pos,16);return a?(o||new t.experimental.fbs.Tensor).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}g(o){let a=this.bb.__offset(this.bb_pos,18);return a?(o||new t.experimental.fbs.Graph).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}floats(o){let a=this.bb.__offset(this.bb_pos,20);return a?this.bb.readFloat32(this.bb.__vector(this.bb_pos+a)+o*4):0}floatsLength(){let o=this.bb.__offset(this.bb_pos,20);return o?this.bb.__vector_len(this.bb_pos+o):0}floatsArray(){let o=this.bb.__offset(this.bb_pos,20);return o?new Float32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+o),this.bb.__vector_len(this.bb_pos+o)):null}ints(o){let a=this.bb.__offset(this.bb_pos,22);return a?this.bb.readInt64(this.bb.__vector(this.bb_pos+a)+o*8):this.bb.createLong(0,0)}intsLength(){let o=this.bb.__offset(this.bb_pos,22);return o?this.bb.__vector_len(this.bb_pos+o):0}strings(o,a){let e=this.bb.__offset(this.bb_pos,24);return e?this.bb.__string(this.bb.__vector(this.bb_pos+e)+o*4,a):null}stringsLength(){let o=this.bb.__offset(this.bb_pos,24);return o?this.bb.__vector_len(this.bb_pos+o):0}tensors(o,a){let e=this.bb.__offset(this.bb_pos,26);return e?(a||new t.experimental.fbs.Tensor).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}tensorsLength(){let o=this.bb.__offset(this.bb_pos,26);return o?this.bb.__vector_len(this.bb_pos+o):0}graphs(o,a){let e=this.bb.__offset(this.bb_pos,28);return e?(a||new t.experimental.fbs.Graph).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}graphsLength(){let o=this.bb.__offset(this.bb_pos,28);return o?this.bb.__vector_len(this.bb_pos+o):0}static startAttribute(o){o.startObject(13)}static addName(o,a){o.addFieldOffset(0,a,0)}static addDocString(o,a){o.addFieldOffset(1,a,0)}static addType(o,a){o.addFieldInt32(2,a,0)}static addF(o,a){o.addFieldFloat32(3,a,0)}static addI(o,a){o.addFieldInt64(4,a,o.createLong(0,0))}static addS(o,a){o.addFieldOffset(5,a,0)}static addT(o,a){o.addFieldOffset(6,a,0)}static addG(o,a){o.addFieldOffset(7,a,0)}static addFloats(o,a){o.addFieldOffset(8,a,0)}static createFloatsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addFloat32(a[e]);return o.endVector()}static startFloatsVector(o,a){o.startVector(4,a,4)}static addInts(o,a){o.addFieldOffset(9,a,0)}static createIntsVector(o,a){o.startVector(8,a.length,8);for(let e=a.length-1;e>=0;e--)o.addInt64(a[e]);return o.endVector()}static startIntsVector(o,a){o.startVector(8,a,8)}static addStrings(o,a){o.addFieldOffset(10,a,0)}static createStringsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startStringsVector(o,a){o.startVector(4,a,4)}static addTensors(o,a){o.addFieldOffset(11,a,0)}static createTensorsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startTensorsVector(o,a){o.startVector(4,a,4)}static addGraphs(o,a){o.addFieldOffset(12,a,0)}static createGraphsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startGraphsVector(o,a){o.startVector(4,a,4)}static endAttribute(o){return o.endObject()}static createAttribute(o,a,e,u,i,d,h,m,b,x,E,w,S,$){return l.startAttribute(o),l.addName(o,a),l.addDocString(o,e),l.addType(o,u),l.addF(o,i),l.addI(o,d),l.addS(o,h),l.addT(o,m),l.addG(o,b),l.addFloats(o,x),l.addInts(o,E),l.addStrings(o,w),l.addTensors(o,S),l.addGraphs(o,$),l.endAttribute(o)}}p.Attribute=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsGraph(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsGraph(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}initializers(o,a){let e=this.bb.__offset(this.bb_pos,4);return e?(a||new t.experimental.fbs.Tensor).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}initializersLength(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.__vector_len(this.bb_pos+o):0}nodeArgs(o,a){let e=this.bb.__offset(this.bb_pos,6);return e?(a||new t.experimental.fbs.ValueInfo).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}nodeArgsLength(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.__vector_len(this.bb_pos+o):0}nodes(o,a){let e=this.bb.__offset(this.bb_pos,8);return e?(a||new t.experimental.fbs.Node).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}nodesLength(){let o=this.bb.__offset(this.bb_pos,8);return o?this.bb.__vector_len(this.bb_pos+o):0}maxNodeIndex(){let o=this.bb.__offset(this.bb_pos,10);return o?this.bb.readUint32(this.bb_pos+o):0}nodeEdges(o,a){let e=this.bb.__offset(this.bb_pos,12);return e?(a||new t.experimental.fbs.NodeEdge).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}nodeEdgesLength(){let o=this.bb.__offset(this.bb_pos,12);return o?this.bb.__vector_len(this.bb_pos+o):0}inputs(o,a){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__string(this.bb.__vector(this.bb_pos+e)+o*4,a):null}inputsLength(){let o=this.bb.__offset(this.bb_pos,14);return o?this.bb.__vector_len(this.bb_pos+o):0}outputs(o,a){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__string(this.bb.__vector(this.bb_pos+e)+o*4,a):null}outputsLength(){let o=this.bb.__offset(this.bb_pos,16);return o?this.bb.__vector_len(this.bb_pos+o):0}sparseInitializers(o,a){let e=this.bb.__offset(this.bb_pos,18);return e?(a||new t.experimental.fbs.SparseTensor).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}sparseInitializersLength(){let o=this.bb.__offset(this.bb_pos,18);return o?this.bb.__vector_len(this.bb_pos+o):0}static startGraph(o){o.startObject(8)}static addInitializers(o,a){o.addFieldOffset(0,a,0)}static createInitializersVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startInitializersVector(o,a){o.startVector(4,a,4)}static addNodeArgs(o,a){o.addFieldOffset(1,a,0)}static createNodeArgsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startNodeArgsVector(o,a){o.startVector(4,a,4)}static addNodes(o,a){o.addFieldOffset(2,a,0)}static createNodesVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startNodesVector(o,a){o.startVector(4,a,4)}static addMaxNodeIndex(o,a){o.addFieldInt32(3,a,0)}static addNodeEdges(o,a){o.addFieldOffset(4,a,0)}static createNodeEdgesVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startNodeEdgesVector(o,a){o.startVector(4,a,4)}static addInputs(o,a){o.addFieldOffset(5,a,0)}static createInputsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startInputsVector(o,a){o.startVector(4,a,4)}static addOutputs(o,a){o.addFieldOffset(6,a,0)}static createOutputsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startOutputsVector(o,a){o.startVector(4,a,4)}static addSparseInitializers(o,a){o.addFieldOffset(7,a,0)}static createSparseInitializersVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startSparseInitializersVector(o,a){o.startVector(4,a,4)}static endGraph(o){return o.endObject()}static createGraph(o,a,e,u,i,d,h,m,b){return l.startGraph(o),l.addInitializers(o,a),l.addNodeArgs(o,e),l.addNodes(o,u),l.addMaxNodeIndex(o,i),l.addNodeEdges(o,d),l.addInputs(o,h),l.addOutputs(o,m),l.addSparseInitializers(o,b),l.endGraph(o)}}p.Graph=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsModel(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsModel(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}irVersion(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.readInt64(this.bb_pos+o):this.bb.createLong(0,0)}opsetImport(o,a){let e=this.bb.__offset(this.bb_pos,6);return e?(a||new t.experimental.fbs.OperatorSetId).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}opsetImportLength(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.__vector_len(this.bb_pos+o):0}producerName(o){let a=this.bb.__offset(this.bb_pos,8);return a?this.bb.__string(this.bb_pos+a,o):null}producerVersion(o){let a=this.bb.__offset(this.bb_pos,10);return a?this.bb.__string(this.bb_pos+a,o):null}domain(o){let a=this.bb.__offset(this.bb_pos,12);return a?this.bb.__string(this.bb_pos+a,o):null}modelVersion(){let o=this.bb.__offset(this.bb_pos,14);return o?this.bb.readInt64(this.bb_pos+o):this.bb.createLong(0,0)}docString(o){let a=this.bb.__offset(this.bb_pos,16);return a?this.bb.__string(this.bb_pos+a,o):null}graph(o){let a=this.bb.__offset(this.bb_pos,18);return a?(o||new t.experimental.fbs.Graph).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}graphDocString(o){let a=this.bb.__offset(this.bb_pos,20);return a?this.bb.__string(this.bb_pos+a,o):null}static startModel(o){o.startObject(9)}static addIrVersion(o,a){o.addFieldInt64(0,a,o.createLong(0,0))}static addOpsetImport(o,a){o.addFieldOffset(1,a,0)}static createOpsetImportVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startOpsetImportVector(o,a){o.startVector(4,a,4)}static addProducerName(o,a){o.addFieldOffset(2,a,0)}static addProducerVersion(o,a){o.addFieldOffset(3,a,0)}static addDomain(o,a){o.addFieldOffset(4,a,0)}static addModelVersion(o,a){o.addFieldInt64(5,a,o.createLong(0,0))}static addDocString(o,a){o.addFieldOffset(6,a,0)}static addGraph(o,a){o.addFieldOffset(7,a,0)}static addGraphDocString(o,a){o.addFieldOffset(8,a,0)}static endModel(o){return o.endObject()}static createModel(o,a,e,u,i,d,h,m,b,x){return l.startModel(o),l.addIrVersion(o,a),l.addOpsetImport(o,e),l.addProducerName(o,u),l.addProducerVersion(o,i),l.addDomain(o,d),l.addModelVersion(o,h),l.addDocString(o,m),l.addGraph(o,b),l.addGraphDocString(o,x),l.endModel(o)}}p.Model=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsKernelCreateInfos(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsKernelCreateInfos(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}nodeIndices(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.readUint32(this.bb.__vector(this.bb_pos+a)+o*4):0}nodeIndicesLength(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.__vector_len(this.bb_pos+o):0}nodeIndicesArray(){let o=this.bb.__offset(this.bb_pos,4);return o?new Uint32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+o),this.bb.__vector_len(this.bb_pos+o)):null}kernelDefHashes(o){let a=this.bb.__offset(this.bb_pos,6);return a?this.bb.readUint64(this.bb.__vector(this.bb_pos+a)+o*8):this.bb.createLong(0,0)}kernelDefHashesLength(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.__vector_len(this.bb_pos+o):0}static startKernelCreateInfos(o){o.startObject(2)}static addNodeIndices(o,a){o.addFieldOffset(0,a,0)}static createNodeIndicesVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addInt32(a[e]);return o.endVector()}static startNodeIndicesVector(o,a){o.startVector(4,a,4)}static addKernelDefHashes(o,a){o.addFieldOffset(1,a,0)}static createKernelDefHashesVector(o,a){o.startVector(8,a.length,8);for(let e=a.length-1;e>=0;e--)o.addInt64(a[e]);return o.endVector()}static startKernelDefHashesVector(o,a){o.startVector(8,a,8)}static endKernelCreateInfos(o){return o.endObject()}static createKernelCreateInfos(o,a,e){return l.startKernelCreateInfos(o),l.addNodeIndices(o,a),l.addKernelDefHashes(o,e),l.endKernelCreateInfos(o)}}p.KernelCreateInfos=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsSubGraphSessionState(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsSubGraphSessionState(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}graphId(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}sessionState(o){let a=this.bb.__offset(this.bb_pos,6);return a?(o||new t.experimental.fbs.SessionState).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}static startSubGraphSessionState(o){o.startObject(2)}static addGraphId(o,a){o.addFieldOffset(0,a,0)}static addSessionState(o,a){o.addFieldOffset(1,a,0)}static endSubGraphSessionState(o){let a=o.endObject();return o.requiredField(a,4),a}static createSubGraphSessionState(o,a,e){return l.startSubGraphSessionState(o),l.addGraphId(o,a),l.addSessionState(o,e),l.endSubGraphSessionState(o)}}p.SubGraphSessionState=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsSessionState(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsSessionState(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}kernels(o){let a=this.bb.__offset(this.bb_pos,4);return a?(o||new t.experimental.fbs.KernelCreateInfos).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}subGraphSessionStates(o,a){let e=this.bb.__offset(this.bb_pos,6);return e?(a||new t.experimental.fbs.SubGraphSessionState).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}subGraphSessionStatesLength(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.__vector_len(this.bb_pos+o):0}static startSessionState(o){o.startObject(2)}static addKernels(o,a){o.addFieldOffset(0,a,0)}static addSubGraphSessionStates(o,a){o.addFieldOffset(1,a,0)}static createSubGraphSessionStatesVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startSubGraphSessionStatesVector(o,a){o.startVector(4,a,4)}static endSessionState(o){return o.endObject()}static createSessionState(o,a,e){return l.startSessionState(o),l.addKernels(o,a),l.addSubGraphSessionStates(o,e),l.endSessionState(o)}}p.SessionState=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsInferenceSession(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsInferenceSession(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static bufferHasIdentifier(o){return o.__has_identifier("ORTM")}ortVersion(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}model(o){let a=this.bb.__offset(this.bb_pos,6);return a?(o||new t.experimental.fbs.Model).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}sessionState(o){let a=this.bb.__offset(this.bb_pos,8);return a?(o||new t.experimental.fbs.SessionState).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}static startInferenceSession(o){o.startObject(3)}static addOrtVersion(o,a){o.addFieldOffset(0,a,0)}static addModel(o,a){o.addFieldOffset(1,a,0)}static addSessionState(o,a){o.addFieldOffset(2,a,0)}static endInferenceSession(o){return o.endObject()}static finishInferenceSessionBuffer(o,a){o.finish(a,"ORTM")}static finishSizePrefixedInferenceSessionBuffer(o,a){o.finish(a,"ORTM",!0)}static createInferenceSession(o,a,e,u){return l.startInferenceSession(o),l.addOrtVersion(o,a),l.addModel(o,e),l.addSessionState(o,u),l.endInferenceSession(o)}}p.InferenceSession=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={}))}),Ch=nt((t,r)=>{"use strict";r.exports=n;function n(s,p){for(var l=new Array(arguments.length-1),c=0,o=2,a=!0;o<arguments.length;)l[c++]=arguments[o++];return new Promise(function(e,u){l[c]=function(i){if(a)if(a=!1,i)u(i);else{for(var d=new Array(arguments.length-1),h=0;h<d.length;)d[h++]=arguments[h];e.apply(null,d)}};try{s.apply(p||null,l)}catch(i){a&&(a=!1,u(i))}})}}),Lh=nt(t=>{"use strict";var r=t;r.length=function(c){var o=c.length;if(!o)return 0;for(var a=0;--o%4>1&&c.charAt(o)==="=";)++a;return Math.ceil(c.length*3)/4-a};var n=new Array(64),s=new Array(123);for(p=0;p<64;)s[n[p]=p<26?p+65:p<52?p+71:p<62?p-4:p-59|43]=p++;var p;r.encode=function(c,o,a){for(var e=null,u=[],i=0,d=0,h;o<a;){var m=c[o++];switch(d){case 0:u[i++]=n[m>>2],h=(m&3)<<4,d=1;break;case 1:u[i++]=n[h|m>>4],h=(m&15)<<2,d=2;break;case 2:u[i++]=n[h|m>>6],u[i++]=n[m&63],d=0;break}i>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,u)),i=0)}return d&&(u[i++]=n[h],u[i++]=61,d===1&&(u[i++]=61)),e?(i&&e.push(String.fromCharCode.apply(String,u.slice(0,i))),e.join("")):String.fromCharCode.apply(String,u.slice(0,i))};var l="invalid encoding";r.decode=function(c,o,a){for(var e=a,u=0,i,d=0;d<c.length;){var h=c.charCodeAt(d++);if(h===61&&u>1)break;if((h=s[h])===void 0)throw Error(l);switch(u){case 0:i=h,u=1;break;case 1:o[a++]=i<<2|(h&48)>>4,i=h,u=2;break;case 2:o[a++]=(i&15)<<4|(h&60)>>2,i=h,u=3;break;case 3:o[a++]=(i&3)<<6|h,u=0;break}}if(u===1)throw Error(l);return a-e},r.test=function(c){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(c)}}),Rh=nt((t,r)=>{"use strict";r.exports=n;function n(){this._listeners={}}n.prototype.on=function(s,p,l){return(this._listeners[s]||(this._listeners[s]=[])).push({fn:p,ctx:l||this}),this},n.prototype.off=function(s,p){if(s===void 0)this._listeners={};else if(p===void 0)this._listeners[s]=[];else for(var l=this._listeners[s],c=0;c<l.length;)l[c].fn===p?l.splice(c,1):++c;return this},n.prototype.emit=function(s){var p=this._listeners[s];if(p){for(var l=[],c=1;c<arguments.length;)l.push(arguments[c++]);for(c=0;c<p.length;)p[c].fn.apply(p[c++].ctx,l)}return this}}),jh=nt((t,r)=>{"use strict";r.exports=n(n);function n(o){return typeof Float32Array<"u"?function(){var a=new Float32Array([-0]),e=new Uint8Array(a.buffer),u=e[3]===128;function i(b,x,E){a[0]=b,x[E]=e[0],x[E+1]=e[1],x[E+2]=e[2],x[E+3]=e[3]}function d(b,x,E){a[0]=b,x[E]=e[3],x[E+1]=e[2],x[E+2]=e[1],x[E+3]=e[0]}o.writeFloatLE=u?i:d,o.writeFloatBE=u?d:i;function h(b,x){return e[0]=b[x],e[1]=b[x+1],e[2]=b[x+2],e[3]=b[x+3],a[0]}function m(b,x){return e[3]=b[x],e[2]=b[x+1],e[1]=b[x+2],e[0]=b[x+3],a[0]}o.readFloatLE=u?h:m,o.readFloatBE=u?m:h}():function(){function a(u,i,d,h){var m=i<0?1:0;if(m&&(i=-i),i===0)u(1/i>0?0:2147483648,d,h);else if(isNaN(i))u(2143289344,d,h);else if(i>34028234663852886e22)u((m<<31|2139095040)>>>0,d,h);else if(i<11754943508222875e-54)u((m<<31|Math.round(i/1401298464324817e-60))>>>0,d,h);else{var b=Math.floor(Math.log(i)/Math.LN2),x=Math.round(i*Math.pow(2,-b)*8388608)&8388607;u((m<<31|b+127<<23|x)>>>0,d,h)}}o.writeFloatLE=a.bind(null,s),o.writeFloatBE=a.bind(null,p);function e(u,i,d){var h=u(i,d),m=(h>>31)*2+1,b=h>>>23&255,x=h&8388607;return b===255?x?NaN:m*(1/0):b===0?m*1401298464324817e-60*x:m*Math.pow(2,b-150)*(x+8388608)}o.readFloatLE=e.bind(null,l),o.readFloatBE=e.bind(null,c)}(),typeof Float64Array<"u"?function(){var a=new Float64Array([-0]),e=new Uint8Array(a.buffer),u=e[7]===128;function i(b,x,E){a[0]=b,x[E]=e[0],x[E+1]=e[1],x[E+2]=e[2],x[E+3]=e[3],x[E+4]=e[4],x[E+5]=e[5],x[E+6]=e[6],x[E+7]=e[7]}function d(b,x,E){a[0]=b,x[E]=e[7],x[E+1]=e[6],x[E+2]=e[5],x[E+3]=e[4],x[E+4]=e[3],x[E+5]=e[2],x[E+6]=e[1],x[E+7]=e[0]}o.writeDoubleLE=u?i:d,o.writeDoubleBE=u?d:i;function h(b,x){return e[0]=b[x],e[1]=b[x+1],e[2]=b[x+2],e[3]=b[x+3],e[4]=b[x+4],e[5]=b[x+5],e[6]=b[x+6],e[7]=b[x+7],a[0]}function m(b,x){return e[7]=b[x],e[6]=b[x+1],e[5]=b[x+2],e[4]=b[x+3],e[3]=b[x+4],e[2]=b[x+5],e[1]=b[x+6],e[0]=b[x+7],a[0]}o.readDoubleLE=u?h:m,o.readDoubleBE=u?m:h}():function(){function a(u,i,d,h,m,b){var x=h<0?1:0;if(x&&(h=-h),h===0)u(0,m,b+i),u(1/h>0?0:2147483648,m,b+d);else if(isNaN(h))u(0,m,b+i),u(2146959360,m,b+d);else if(h>17976931348623157e292)u(0,m,b+i),u((x<<31|2146435072)>>>0,m,b+d);else{var E;if(h<22250738585072014e-324)E=h/5e-324,u(E>>>0,m,b+i),u((x<<31|E/4294967296)>>>0,m,b+d);else{var w=Math.floor(Math.log(h)/Math.LN2);w===1024&&(w=1023),E=h*Math.pow(2,-w),u(E*4503599627370496>>>0,m,b+i),u((x<<31|w+1023<<20|E*1048576&1048575)>>>0,m,b+d)}}}o.writeDoubleLE=a.bind(null,s,0,4),o.writeDoubleBE=a.bind(null,p,4,0);function e(u,i,d,h,m){var b=u(h,m+i),x=u(h,m+d),E=(x>>31)*2+1,w=x>>>20&2047,S=4294967296*(x&1048575)+b;return w===2047?S?NaN:E*(1/0):w===0?E*5e-324*S:E*Math.pow(2,w-1075)*(S+4503599627370496)}o.readDoubleLE=e.bind(null,l,0,4),o.readDoubleBE=e.bind(null,c,4,0)}(),o}function s(o,a,e){a[e]=o&255,a[e+1]=o>>>8&255,a[e+2]=o>>>16&255,a[e+3]=o>>>24}function p(o,a,e){a[e]=o>>>24,a[e+1]=o>>>16&255,a[e+2]=o>>>8&255,a[e+3]=o&255}function l(o,a){return(o[a]|o[a+1]<<8|o[a+2]<<16|o[a+3]<<24)>>>0}function c(o,a){return(o[a]<<24|o[a+1]<<16|o[a+2]<<8|o[a+3])>>>0}}),Bh=nt((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}}),Vh=nt(t=>{"use strict";var r=t;r.length=function(n){for(var s=0,p=0,l=0;l<n.length;++l)p=n.charCodeAt(l),p<128?s+=1:p<2048?s+=2:(p&64512)===55296&&(n.charCodeAt(l+1)&64512)===56320?(++l,s+=4):s+=3;return s},r.read=function(n,s,p){var l=p-s;if(l<1)return"";for(var c=null,o=[],a=0,e;s<p;)e=n[s++],e<128?o[a++]=e:e>191&&e<224?o[a++]=(e&31)<<6|n[s++]&63:e>239&&e<365?(e=((e&7)<<18|(n[s++]&63)<<12|(n[s++]&63)<<6|n[s++]&63)-65536,o[a++]=55296+(e>>10),o[a++]=56320+(e&1023)):o[a++]=(e&15)<<12|(n[s++]&63)<<6|n[s++]&63,a>8191&&((c||(c=[])).push(String.fromCharCode.apply(String,o)),a=0);return c?(a&&c.push(String.fromCharCode.apply(String,o.slice(0,a))),c.join("")):String.fromCharCode.apply(String,o.slice(0,a))},r.write=function(n,s,p){for(var l=p,c,o,a=0;a<n.length;++a)c=n.charCodeAt(a),c<128?s[p++]=c:c<2048?(s[p++]=c>>6|192,s[p++]=c&63|128):(c&64512)===55296&&((o=n.charCodeAt(a+1))&64512)===56320?(c=65536+((c&1023)<<10)+(o&1023),++a,s[p++]=c>>18|240,s[p++]=c>>12&63|128,s[p++]=c>>6&63|128,s[p++]=c&63|128):(s[p++]=c>>12|224,s[p++]=c>>6&63|128,s[p++]=c&63|128);return p-l}}),Mh=nt((t,r)=>{"use strict";r.exports=n;function n(s,p,l){var c=l||8192,o=c>>>1,a=null,e=c;return function(u){if(u<1||u>o)return s(u);e+u>c&&(a=s(c),e=0);var i=p.call(a,e,e+=u);return e&7&&(e=(e|7)+1),i}}}),zh=nt((t,r)=>{"use strict";r.exports=s;var n=we();function s(o,a){this.lo=o>>>0,this.hi=a>>>0}var p=s.zero=new s(0,0);p.toNumber=function(){return 0},p.zzEncode=p.zzDecode=function(){return this},p.length=function(){return 1};var l=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(o){if(o===0)return p;var a=o<0;a&&(o=-o);var e=o>>>0,u=(o-e)/4294967296>>>0;return a&&(u=~u>>>0,e=~e>>>0,++e>4294967295&&(e=0,++u>4294967295&&(u=0))),new s(e,u)},s.from=function(o){if(typeof o=="number")return s.fromNumber(o);if(n.isString(o))if(n.Long)o=n.Long.fromString(o);else return s.fromNumber(parseInt(o,10));return o.low||o.high?new s(o.low>>>0,o.high>>>0):p},s.prototype.toNumber=function(o){if(!o&&this.hi>>>31){var a=~this.lo+1>>>0,e=~this.hi>>>0;return a||(e=e+1>>>0),-(a+e*4294967296)}return this.lo+this.hi*4294967296},s.prototype.toLong=function(o){return n.Long?new n.Long(this.lo|0,this.hi|0,!!o):{low:this.lo|0,high:this.hi|0,unsigned:!!o}};var c=String.prototype.charCodeAt;s.fromHash=function(o){return o===l?p:new s((c.call(o,0)|c.call(o,1)<<8|c.call(o,2)<<16|c.call(o,3)<<24)>>>0,(c.call(o,4)|c.call(o,5)<<8|c.call(o,6)<<16|c.call(o,7)<<24)>>>0)},s.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.prototype.zzEncode=function(){var o=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^o)>>>0,this.lo=(this.lo<<1^o)>>>0,this},s.prototype.zzDecode=function(){var o=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^o)>>>0,this.hi=(this.hi>>>1^o)>>>0,this},s.prototype.length=function(){var o=this.lo,a=(this.lo>>>28|this.hi<<4)>>>0,e=this.hi>>>24;return e===0?a===0?o<16384?o<128?1:2:o<2097152?3:4:a<16384?a<128?5:6:a<2097152?7:8:e<128?9:10}}),we=nt(t=>{"use strict";var r=t;r.asPromise=Ch(),r.base64=Lh(),r.EventEmitter=Rh(),r.float=jh(),r.inquire=Bh(),r.utf8=Vh(),r.pool=Mh(),r.LongBits=zh(),r.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node),r.global=r.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||t,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(p){return typeof p=="number"&&isFinite(p)&&Math.floor(p)===p},r.isString=function(p){return typeof p=="string"||p instanceof String},r.isObject=function(p){return p&&typeof p=="object"},r.isset=r.isSet=function(p,l){var c=p[l];return c!=null&&p.hasOwnProperty(l)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1},r.Buffer=function(){try{var p=r.inquire("buffer").Buffer;return p.prototype.utf8Write?p:null}catch{return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(p){return typeof p=="number"?r.Buffer?r._Buffer_allocUnsafe(p):new r.Array(p):r.Buffer?r._Buffer_from(p):typeof Uint8Array>"u"?p:new Uint8Array(p)},r.Array=typeof Uint8Array<"u"?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(p){return p?r.LongBits.from(p).toHash():r.LongBits.zeroHash},r.longFromHash=function(p,l){var c=r.LongBits.fromHash(p);return r.Long?r.Long.fromBits(c.lo,c.hi,l):c.toNumber(!!l)};function n(p,l,c){for(var o=Object.keys(l),a=0;a<o.length;++a)(p[o[a]]===void 0||!c)&&(p[o[a]]=l[o[a]]);return p}r.merge=n,r.lcFirst=function(p){return p.charAt(0).toLowerCase()+p.substring(1)};function s(p){function l(c,o){if(!(this instanceof l))return new l(c,o);Object.defineProperty(this,"message",{get:function(){return c}}),Error.captureStackTrace?Error.captureStackTrace(this,l):Object.defineProperty(this,"stack",{value:new Error().stack||""}),o&&n(this,o)}return l.prototype=Object.create(Error.prototype,{constructor:{value:l,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return p},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),l}r.newError=s,r.ProtocolError=s("ProtocolError"),r.oneOfGetter=function(p){for(var l={},c=0;c<p.length;++c)l[p[c]]=1;return function(){for(var o=Object.keys(this),a=o.length-1;a>-1;--a)if(l[o[a]]===1&&this[o[a]]!==void 0&&this[o[a]]!==null)return o[a]}},r.oneOfSetter=function(p){return function(l){for(var c=0;c<p.length;++c)p[c]!==l&&delete this[p[c]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var p=r.Buffer;if(!p){r._Buffer_from=r._Buffer_allocUnsafe=null;return}r._Buffer_from=p.from!==Uint8Array.from&&p.from||function(l,c){return new p(l,c)},r._Buffer_allocUnsafe=p.allocUnsafe||function(l){return new p(l)}}}),gl=nt((t,r)=>{"use strict";r.exports=u;var n=we(),s,p=n.LongBits,l=n.base64,c=n.utf8;function o(w,S,$){this.fn=w,this.len=S,this.next=void 0,this.val=$}function a(){}function e(w){this.head=w.head,this.tail=w.tail,this.len=w.len,this.next=w.states}function u(){this.len=0,this.head=new o(a,0,0),this.tail=this.head,this.states=null}var i=function(){return n.Buffer?function(){return(u.create=function(){return new s})()}:function(){return new u}};u.create=i(),u.alloc=function(w){return new n.Array(w)},n.Array!==Array&&(u.alloc=n.pool(u.alloc,n.Array.prototype.subarray)),u.prototype._push=function(w,S,$){return this.tail=this.tail.next=new o(w,S,$),this.len+=S,this};function d(w,S,$){S[$]=w&255}function h(w,S,$){for(;w>127;)S[$++]=w&127|128,w>>>=7;S[$]=w}function m(w,S){this.len=w,this.next=void 0,this.val=S}m.prototype=Object.create(o.prototype),m.prototype.fn=h,u.prototype.uint32=function(w){return this.len+=(this.tail=this.tail.next=new m((w=w>>>0)<128?1:w<16384?2:w<2097152?3:w<268435456?4:5,w)).len,this},u.prototype.int32=function(w){return w<0?this._push(b,10,p.fromNumber(w)):this.uint32(w)},u.prototype.sint32=function(w){return this.uint32((w<<1^w>>31)>>>0)};function b(w,S,$){for(;w.hi;)S[$++]=w.lo&127|128,w.lo=(w.lo>>>7|w.hi<<25)>>>0,w.hi>>>=7;for(;w.lo>127;)S[$++]=w.lo&127|128,w.lo=w.lo>>>7;S[$++]=w.lo}u.prototype.uint64=function(w){var S=p.from(w);return this._push(b,S.length(),S)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(w){var S=p.from(w).zzEncode();return this._push(b,S.length(),S)},u.prototype.bool=function(w){return this._push(d,1,w?1:0)};function x(w,S,$){S[$]=w&255,S[$+1]=w>>>8&255,S[$+2]=w>>>16&255,S[$+3]=w>>>24}u.prototype.fixed32=function(w){return this._push(x,4,w>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(w){var S=p.from(w);return this._push(x,4,S.lo)._push(x,4,S.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(w){return this._push(n.float.writeFloatLE,4,w)},u.prototype.double=function(w){return this._push(n.float.writeDoubleLE,8,w)};var E=n.Array.prototype.set?function(w,S,$){S.set(w,$)}:function(w,S,$){for(var F=0;F<w.length;++F)S[$+F]=w[F]};u.prototype.bytes=function(w){var S=w.length>>>0;if(!S)return this._push(d,1,0);if(n.isString(w)){var $=u.alloc(S=l.length(w));l.decode(w,$,0),w=$}return this.uint32(S)._push(E,S,w)},u.prototype.string=function(w){var S=c.length(w);return S?this.uint32(S)._push(c.write,S,w):this._push(d,1,0)},u.prototype.fork=function(){return this.states=new e(this),this.head=this.tail=new o(a,0,0),this.len=0,this},u.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new o(a,0,0),this.len=0),this},u.prototype.ldelim=function(){var w=this.head,S=this.tail,$=this.len;return this.reset().uint32($),$&&(this.tail.next=w.next,this.tail=S,this.len+=$),this},u.prototype.finish=function(){for(var w=this.head.next,S=this.constructor.alloc(this.len),$=0;w;)w.fn(w.val,S,$),$+=w.len,w=w.next;return S},u._configure=function(w){s=w,u.create=i(),s._configure()}}),Uh=nt((t,r)=>{"use strict";r.exports=p;var n=gl();(p.prototype=Object.create(n.prototype)).constructor=p;var s=we();function p(){n.call(this)}p._configure=function(){p.alloc=s._Buffer_allocUnsafe,p.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&s.Buffer.prototype.set.name==="set"?function(c,o,a){o.set(c,a)}:function(c,o,a){if(c.copy)c.copy(o,a,0,c.length);else for(var e=0;e<c.length;)o[a++]=c[e++]}},p.prototype.bytes=function(c){s.isString(c)&&(c=s._Buffer_from(c,"base64"));var o=c.length>>>0;return this.uint32(o),o&&this._push(p.writeBytesBuffer,o,c),this};function l(c,o,a){c.length<40?s.utf8.write(c,o,a):o.utf8Write?o.utf8Write(c,a):o.write(c,a)}p.prototype.string=function(c){var o=s.Buffer.byteLength(c);return this.uint32(o),o&&this._push(l,o,c),this},p._configure()}),ml=nt((t,r)=>{"use strict";r.exports=o;var n=we(),s,p=n.LongBits,l=n.utf8;function c(h,m){return RangeError("index out of range: "+h.pos+" + "+(m||1)+" > "+h.len)}function o(h){this.buf=h,this.pos=0,this.len=h.length}var a=typeof Uint8Array<"u"?function(h){if(h instanceof Uint8Array||Array.isArray(h))return new o(h);throw Error("illegal buffer")}:function(h){if(Array.isArray(h))return new o(h);throw Error("illegal buffer")},e=function(){return n.Buffer?function(h){return(o.create=function(m){return n.Buffer.isBuffer(m)?new s(m):a(m)})(h)}:a};o.create=e(),o.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,o.prototype.uint32=function(){var h=4294967295;return function(){if(h=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(h=(h|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(h=(h|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(h=(h|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(h=(h|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return h;if((this.pos+=5)>this.len)throw this.pos=this.len,c(this,10);return h}}(),o.prototype.int32=function(){return this.uint32()|0},o.prototype.sint32=function(){var h=this.uint32();return h>>>1^-(h&1)|0};function u(){var h=new p(0,0),m=0;if(this.len-this.pos>4){for(;m<4;++m)if(h.lo=(h.lo|(this.buf[this.pos]&127)<<m*7)>>>0,this.buf[this.pos++]<128)return h;if(h.lo=(h.lo|(this.buf[this.pos]&127)<<28)>>>0,h.hi=(h.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return h;m=0}else{for(;m<3;++m){if(this.pos>=this.len)throw c(this);if(h.lo=(h.lo|(this.buf[this.pos]&127)<<m*7)>>>0,this.buf[this.pos++]<128)return h}return h.lo=(h.lo|(this.buf[this.pos++]&127)<<m*7)>>>0,h}if(this.len-this.pos>4){for(;m<5;++m)if(h.hi=(h.hi|(this.buf[this.pos]&127)<<m*7+3)>>>0,this.buf[this.pos++]<128)return h}else for(;m<5;++m){if(this.pos>=this.len)throw c(this);if(h.hi=(h.hi|(this.buf[this.pos]&127)<<m*7+3)>>>0,this.buf[this.pos++]<128)return h}throw Error("invalid varint encoding")}o.prototype.bool=function(){return this.uint32()!==0};function i(h,m){return(h[m-4]|h[m-3]<<8|h[m-2]<<16|h[m-1]<<24)>>>0}o.prototype.fixed32=function(){if(this.pos+4>this.len)throw c(this,4);return i(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw c(this,4);return i(this.buf,this.pos+=4)|0};function d(){if(this.pos+8>this.len)throw c(this,8);return new p(i(this.buf,this.pos+=4),i(this.buf,this.pos+=4))}o.prototype.float=function(){if(this.pos+4>this.len)throw c(this,4);var h=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,h},o.prototype.double=function(){if(this.pos+8>this.len)throw c(this,4);var h=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,h},o.prototype.bytes=function(){var h=this.uint32(),m=this.pos,b=this.pos+h;if(b>this.len)throw c(this,h);if(this.pos+=h,Array.isArray(this.buf))return this.buf.slice(m,b);if(m===b){var x=n.Buffer;return x?x.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,m,b)},o.prototype.string=function(){var h=this.bytes();return l.read(h,0,h.length)},o.prototype.skip=function(h){if(typeof h=="number"){if(this.pos+h>this.len)throw c(this,h);this.pos+=h}else do if(this.pos>=this.len)throw c(this);while(this.buf[this.pos++]&128);return this},o.prototype.skipType=function(h){switch(h){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(h=this.uint32()&7)!==4;)this.skipType(h);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+h+" at offset "+this.pos)}return this},o._configure=function(h){s=h,o.create=e(),s._configure();var m=n.Long?"toLong":"toNumber";n.merge(o.prototype,{int64:function(){return u.call(this)[m](!1)},uint64:function(){return u.call(this)[m](!0)},sint64:function(){return u.call(this).zzDecode()[m](!1)},fixed64:function(){return d.call(this)[m](!0)},sfixed64:function(){return d.call(this)[m](!1)}})}}),Gh=nt((t,r)=>{"use strict";r.exports=p;var n=ml();(p.prototype=Object.create(n.prototype)).constructor=p;var s=we();function p(l){n.call(this,l)}p._configure=function(){s.Buffer&&(p.prototype._slice=s.Buffer.prototype.slice)},p.prototype.string=function(){var l=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+l,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+l,this.len))},p._configure()}),Hh=nt((t,r)=>{"use strict";r.exports=s;var n=we();(s.prototype=Object.create(n.EventEmitter.prototype)).constructor=s;function s(p,l,c){if(typeof p!="function")throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=p,this.requestDelimited=!!l,this.responseDelimited=!!c}s.prototype.rpcCall=function p(l,c,o,a,e){if(!a)throw TypeError("request must be specified");var u=this;if(!e)return n.asPromise(p,u,l,c,o,a);if(!u.rpcImpl){setTimeout(function(){e(Error("already ended"))},0);return}try{return u.rpcImpl(l,c[u.requestDelimited?"encodeDelimited":"encode"](a).finish(),function(i,d){if(i)return u.emit("error",i,l),e(i);if(d===null){u.end(!0);return}if(!(d instanceof o))try{d=o[u.responseDelimited?"decodeDelimited":"decode"](d)}catch(h){return u.emit("error",h,l),e(h)}return u.emit("data",d,l),e(null,d)})}catch(i){u.emit("error",i,l),setTimeout(function(){e(i)},0);return}},s.prototype.end=function(p){return this.rpcImpl&&(p||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}}),qh=nt(t=>{"use strict";var r=t;r.Service=Hh()}),Wh=nt((t,r)=>{"use strict";r.exports={}}),Xh=nt(t=>{"use strict";var r=t;r.build="minimal",r.Writer=gl(),r.BufferWriter=Uh(),r.Reader=ml(),r.BufferReader=Gh(),r.util=we(),r.rpc=qh(),r.roots=Wh(),r.configure=n;function n(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}n()}),Kh=nt((t,r)=>{"use strict";r.exports=Xh()}),mr=nt((t,r)=>{"use strict";var n=Kh(),s=n.Reader,p=n.Writer,l=n.util,c=n.roots.default||(n.roots.default={});c.onnx=function(){var o={};return o.Version=function(){var a={},e=Object.create(a);return e[a[0]="_START_VERSION"]=0,e[a[1]="IR_VERSION_2017_10_10"]=1,e[a[2]="IR_VERSION_2017_10_30"]=2,e[a[3]="IR_VERSION_2017_11_3"]=3,e[a[4]="IR_VERSION_2019_1_22"]=4,e[a[5]="IR_VERSION_2019_3_18"]=5,e[a[6]="IR_VERSION_2019_9_19"]=6,e[a[7]="IR_VERSION_2020_5_8"]=7,e[a[8]="IR_VERSION_2021_7_30"]=8,e[a[9]="IR_VERSION"]=9,e}(),o.AttributeProto=function(){function a(e){if(this.floats=[],this.ints=[],this.strings=[],this.tensors=[],this.graphs=[],this.sparseTensors=[],this.typeProtos=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.name="",a.prototype.refAttrName="",a.prototype.docString="",a.prototype.type=0,a.prototype.f=0,a.prototype.i=l.Long?l.Long.fromBits(0,0,!1):0,a.prototype.s=l.newBuffer([]),a.prototype.t=null,a.prototype.g=null,a.prototype.sparseTensor=null,a.prototype.tp=null,a.prototype.floats=l.emptyArray,a.prototype.ints=l.emptyArray,a.prototype.strings=l.emptyArray,a.prototype.tensors=l.emptyArray,a.prototype.graphs=l.emptyArray,a.prototype.sparseTensors=l.emptyArray,a.prototype.typeProtos=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&u.uint32(10).string(e.name),e.f!=null&&Object.hasOwnProperty.call(e,"f")&&u.uint32(21).float(e.f),e.i!=null&&Object.hasOwnProperty.call(e,"i")&&u.uint32(24).int64(e.i),e.s!=null&&Object.hasOwnProperty.call(e,"s")&&u.uint32(34).bytes(e.s),e.t!=null&&Object.hasOwnProperty.call(e,"t")&&c.onnx.TensorProto.encode(e.t,u.uint32(42).fork()).ldelim(),e.g!=null&&Object.hasOwnProperty.call(e,"g")&&c.onnx.GraphProto.encode(e.g,u.uint32(50).fork()).ldelim(),e.floats!=null&&e.floats.length){u.uint32(58).fork();for(var i=0;i<e.floats.length;++i)u.float(e.floats[i]);u.ldelim()}if(e.ints!=null&&e.ints.length){u.uint32(66).fork();for(var i=0;i<e.ints.length;++i)u.int64(e.ints[i]);u.ldelim()}if(e.strings!=null&&e.strings.length)for(var i=0;i<e.strings.length;++i)u.uint32(74).bytes(e.strings[i]);if(e.tensors!=null&&e.tensors.length)for(var i=0;i<e.tensors.length;++i)c.onnx.TensorProto.encode(e.tensors[i],u.uint32(82).fork()).ldelim();if(e.graphs!=null&&e.graphs.length)for(var i=0;i<e.graphs.length;++i)c.onnx.GraphProto.encode(e.graphs[i],u.uint32(90).fork()).ldelim();if(e.docString!=null&&Object.hasOwnProperty.call(e,"docString")&&u.uint32(106).string(e.docString),e.tp!=null&&Object.hasOwnProperty.call(e,"tp")&&c.onnx.TypeProto.encode(e.tp,u.uint32(114).fork()).ldelim(),e.typeProtos!=null&&e.typeProtos.length)for(var i=0;i<e.typeProtos.length;++i)c.onnx.TypeProto.encode(e.typeProtos[i],u.uint32(122).fork()).ldelim();if(e.type!=null&&Object.hasOwnProperty.call(e,"type")&&u.uint32(160).int32(e.type),e.refAttrName!=null&&Object.hasOwnProperty.call(e,"refAttrName")&&u.uint32(170).string(e.refAttrName),e.sparseTensor!=null&&Object.hasOwnProperty.call(e,"sparseTensor")&&c.onnx.SparseTensorProto.encode(e.sparseTensor,u.uint32(178).fork()).ldelim(),e.sparseTensors!=null&&e.sparseTensors.length)for(var i=0;i<e.sparseTensors.length;++i)c.onnx.SparseTensorProto.encode(e.sparseTensors[i],u.uint32(186).fork()).ldelim();return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.AttributeProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.name=e.string();break}case 21:{d.refAttrName=e.string();break}case 13:{d.docString=e.string();break}case 20:{d.type=e.int32();break}case 2:{d.f=e.float();break}case 3:{d.i=e.int64();break}case 4:{d.s=e.bytes();break}case 5:{d.t=c.onnx.TensorProto.decode(e,e.uint32());break}case 6:{d.g=c.onnx.GraphProto.decode(e,e.uint32());break}case 22:{d.sparseTensor=c.onnx.SparseTensorProto.decode(e,e.uint32());break}case 14:{d.tp=c.onnx.TypeProto.decode(e,e.uint32());break}case 7:{if(d.floats&&d.floats.length||(d.floats=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.floats.push(e.float());else d.floats.push(e.float());break}case 8:{if(d.ints&&d.ints.length||(d.ints=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.ints.push(e.int64());else d.ints.push(e.int64());break}case 9:{d.strings&&d.strings.length||(d.strings=[]),d.strings.push(e.bytes());break}case 10:{d.tensors&&d.tensors.length||(d.tensors=[]),d.tensors.push(c.onnx.TensorProto.decode(e,e.uint32()));break}case 11:{d.graphs&&d.graphs.length||(d.graphs=[]),d.graphs.push(c.onnx.GraphProto.decode(e,e.uint32()));break}case 23:{d.sparseTensors&&d.sparseTensors.length||(d.sparseTensors=[]),d.sparseTensors.push(c.onnx.SparseTensorProto.decode(e,e.uint32()));break}case 15:{d.typeProtos&&d.typeProtos.length||(d.typeProtos=[]),d.typeProtos.push(c.onnx.TypeProto.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.name!=null&&e.hasOwnProperty("name")&&!l.isString(e.name))return"name: string expected";if(e.refAttrName!=null&&e.hasOwnProperty("refAttrName")&&!l.isString(e.refAttrName))return"refAttrName: string expected";if(e.docString!=null&&e.hasOwnProperty("docString")&&!l.isString(e.docString))return"docString: string expected";if(e.type!=null&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 11:case 13:case 6:case 7:case 8:case 9:case 10:case 12:case 14:break}if(e.f!=null&&e.hasOwnProperty("f")&&typeof e.f!="number")return"f: number expected";if(e.i!=null&&e.hasOwnProperty("i")&&!l.isInteger(e.i)&&!(e.i&&l.isInteger(e.i.low)&&l.isInteger(e.i.high)))return"i: integer|Long expected";if(e.s!=null&&e.hasOwnProperty("s")&&!(e.s&&typeof e.s.length=="number"||l.isString(e.s)))return"s: buffer expected";if(e.t!=null&&e.hasOwnProperty("t")){var u=c.onnx.TensorProto.verify(e.t);if(u)return"t."+u}if(e.g!=null&&e.hasOwnProperty("g")){var u=c.onnx.GraphProto.verify(e.g);if(u)return"g."+u}if(e.sparseTensor!=null&&e.hasOwnProperty("sparseTensor")){var u=c.onnx.SparseTensorProto.verify(e.sparseTensor);if(u)return"sparseTensor."+u}if(e.tp!=null&&e.hasOwnProperty("tp")){var u=c.onnx.TypeProto.verify(e.tp);if(u)return"tp."+u}if(e.floats!=null&&e.hasOwnProperty("floats")){if(!Array.isArray(e.floats))return"floats: array expected";for(var i=0;i<e.floats.length;++i)if(typeof e.floats[i]!="number")return"floats: number[] expected"}if(e.ints!=null&&e.hasOwnProperty("ints")){if(!Array.isArray(e.ints))return"ints: array expected";for(var i=0;i<e.ints.length;++i)if(!l.isInteger(e.ints[i])&&!(e.ints[i]&&l.isInteger(e.ints[i].low)&&l.isInteger(e.ints[i].high)))return"ints: integer|Long[] expected"}if(e.strings!=null&&e.hasOwnProperty("strings")){if(!Array.isArray(e.strings))return"strings: array expected";for(var i=0;i<e.strings.length;++i)if(!(e.strings[i]&&typeof e.strings[i].length=="number"||l.isString(e.strings[i])))return"strings: buffer[] expected"}if(e.tensors!=null&&e.hasOwnProperty("tensors")){if(!Array.isArray(e.tensors))return"tensors: array expected";for(var i=0;i<e.tensors.length;++i){var u=c.onnx.TensorProto.verify(e.tensors[i]);if(u)return"tensors."+u}}if(e.graphs!=null&&e.hasOwnProperty("graphs")){if(!Array.isArray(e.graphs))return"graphs: array expected";for(var i=0;i<e.graphs.length;++i){var u=c.onnx.GraphProto.verify(e.graphs[i]);if(u)return"graphs."+u}}if(e.sparseTensors!=null&&e.hasOwnProperty("sparseTensors")){if(!Array.isArray(e.sparseTensors))return"sparseTensors: array expected";for(var i=0;i<e.sparseTensors.length;++i){var u=c.onnx.SparseTensorProto.verify(e.sparseTensors[i]);if(u)return"sparseTensors."+u}}if(e.typeProtos!=null&&e.hasOwnProperty("typeProtos")){if(!Array.isArray(e.typeProtos))return"typeProtos: array expected";for(var i=0;i<e.typeProtos.length;++i){var u=c.onnx.TypeProto.verify(e.typeProtos[i]);if(u)return"typeProtos."+u}}return null},a.fromObject=function(e){if(e instanceof c.onnx.AttributeProto)return e;var u=new c.onnx.AttributeProto;switch(e.name!=null&&(u.name=String(e.name)),e.refAttrName!=null&&(u.refAttrName=String(e.refAttrName)),e.docString!=null&&(u.docString=String(e.docString)),e.type){default:if(typeof e.type=="number"){u.type=e.type;break}break;case"UNDEFINED":case 0:u.type=0;break;case"FLOAT":case 1:u.type=1;break;case"INT":case 2:u.type=2;break;case"STRING":case 3:u.type=3;break;case"TENSOR":case 4:u.type=4;break;case"GRAPH":case 5:u.type=5;break;case"SPARSE_TENSOR":case 11:u.type=11;break;case"TYPE_PROTO":case 13:u.type=13;break;case"FLOATS":case 6:u.type=6;break;case"INTS":case 7:u.type=7;break;case"STRINGS":case 8:u.type=8;break;case"TENSORS":case 9:u.type=9;break;case"GRAPHS":case 10:u.type=10;break;case"SPARSE_TENSORS":case 12:u.type=12;break;case"TYPE_PROTOS":case 14:u.type=14;break}if(e.f!=null&&(u.f=Number(e.f)),e.i!=null&&(l.Long?(u.i=l.Long.fromValue(e.i)).unsigned=!1:typeof e.i=="string"?u.i=parseInt(e.i,10):typeof e.i=="number"?u.i=e.i:typeof e.i=="object"&&(u.i=new l.LongBits(e.i.low>>>0,e.i.high>>>0).toNumber())),e.s!=null&&(typeof e.s=="string"?l.base64.decode(e.s,u.s=l.newBuffer(l.base64.length(e.s)),0):e.s.length>=0&&(u.s=e.s)),e.t!=null){if(typeof e.t!="object")throw TypeError(".onnx.AttributeProto.t: object expected");u.t=c.onnx.TensorProto.fromObject(e.t)}if(e.g!=null){if(typeof e.g!="object")throw TypeError(".onnx.AttributeProto.g: object expected");u.g=c.onnx.GraphProto.fromObject(e.g)}if(e.sparseTensor!=null){if(typeof e.sparseTensor!="object")throw TypeError(".onnx.AttributeProto.sparseTensor: object expected");u.sparseTensor=c.onnx.SparseTensorProto.fromObject(e.sparseTensor)}if(e.tp!=null){if(typeof e.tp!="object")throw TypeError(".onnx.AttributeProto.tp: object expected");u.tp=c.onnx.TypeProto.fromObject(e.tp)}if(e.floats){if(!Array.isArray(e.floats))throw TypeError(".onnx.AttributeProto.floats: array expected");u.floats=[];for(var i=0;i<e.floats.length;++i)u.floats[i]=Number(e.floats[i])}if(e.ints){if(!Array.isArray(e.ints))throw TypeError(".onnx.AttributeProto.ints: array expected");u.ints=[];for(var i=0;i<e.ints.length;++i)l.Long?(u.ints[i]=l.Long.fromValue(e.ints[i])).unsigned=!1:typeof e.ints[i]=="string"?u.ints[i]=parseInt(e.ints[i],10):typeof e.ints[i]=="number"?u.ints[i]=e.ints[i]:typeof e.ints[i]=="object"&&(u.ints[i]=new l.LongBits(e.ints[i].low>>>0,e.ints[i].high>>>0).toNumber())}if(e.strings){if(!Array.isArray(e.strings))throw TypeError(".onnx.AttributeProto.strings: array expected");u.strings=[];for(var i=0;i<e.strings.length;++i)typeof e.strings[i]=="string"?l.base64.decode(e.strings[i],u.strings[i]=l.newBuffer(l.base64.length(e.strings[i])),0):e.strings[i].length>=0&&(u.strings[i]=e.strings[i])}if(e.tensors){if(!Array.isArray(e.tensors))throw TypeError(".onnx.AttributeProto.tensors: array expected");u.tensors=[];for(var i=0;i<e.tensors.length;++i){if(typeof e.tensors[i]!="object")throw TypeError(".onnx.AttributeProto.tensors: object expected");u.tensors[i]=c.onnx.TensorProto.fromObject(e.tensors[i])}}if(e.graphs){if(!Array.isArray(e.graphs))throw TypeError(".onnx.AttributeProto.graphs: array expected");u.graphs=[];for(var i=0;i<e.graphs.length;++i){if(typeof e.graphs[i]!="object")throw TypeError(".onnx.AttributeProto.graphs: object expected");u.graphs[i]=c.onnx.GraphProto.fromObject(e.graphs[i])}}if(e.sparseTensors){if(!Array.isArray(e.sparseTensors))throw TypeError(".onnx.AttributeProto.sparseTensors: array expected");u.sparseTensors=[];for(var i=0;i<e.sparseTensors.length;++i){if(typeof e.sparseTensors[i]!="object")throw TypeError(".onnx.AttributeProto.sparseTensors: object expected");u.sparseTensors[i]=c.onnx.SparseTensorProto.fromObject(e.sparseTensors[i])}}if(e.typeProtos){if(!Array.isArray(e.typeProtos))throw TypeError(".onnx.AttributeProto.typeProtos: array expected");u.typeProtos=[];for(var i=0;i<e.typeProtos.length;++i){if(typeof e.typeProtos[i]!="object")throw TypeError(".onnx.AttributeProto.typeProtos: object expected");u.typeProtos[i]=c.onnx.TypeProto.fromObject(e.typeProtos[i])}}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.floats=[],i.ints=[],i.strings=[],i.tensors=[],i.graphs=[],i.typeProtos=[],i.sparseTensors=[]),u.defaults){if(i.name="",i.f=0,l.Long){var d=new l.Long(0,0,!1);i.i=u.longs===String?d.toString():u.longs===Number?d.toNumber():d}else i.i=u.longs===String?"0":0;u.bytes===String?i.s="":(i.s=[],u.bytes!==Array&&(i.s=l.newBuffer(i.s))),i.t=null,i.g=null,i.docString="",i.tp=null,i.type=u.enums===String?"UNDEFINED":0,i.refAttrName="",i.sparseTensor=null}if(e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.f!=null&&e.hasOwnProperty("f")&&(i.f=u.json&&!isFinite(e.f)?String(e.f):e.f),e.i!=null&&e.hasOwnProperty("i")&&(typeof e.i=="number"?i.i=u.longs===String?String(e.i):e.i:i.i=u.longs===String?l.Long.prototype.toString.call(e.i):u.longs===Number?new l.LongBits(e.i.low>>>0,e.i.high>>>0).toNumber():e.i),e.s!=null&&e.hasOwnProperty("s")&&(i.s=u.bytes===String?l.base64.encode(e.s,0,e.s.length):u.bytes===Array?Array.prototype.slice.call(e.s):e.s),e.t!=null&&e.hasOwnProperty("t")&&(i.t=c.onnx.TensorProto.toObject(e.t,u)),e.g!=null&&e.hasOwnProperty("g")&&(i.g=c.onnx.GraphProto.toObject(e.g,u)),e.floats&&e.floats.length){i.floats=[];for(var h=0;h<e.floats.length;++h)i.floats[h]=u.json&&!isFinite(e.floats[h])?String(e.floats[h]):e.floats[h]}if(e.ints&&e.ints.length){i.ints=[];for(var h=0;h<e.ints.length;++h)typeof e.ints[h]=="number"?i.ints[h]=u.longs===String?String(e.ints[h]):e.ints[h]:i.ints[h]=u.longs===String?l.Long.prototype.toString.call(e.ints[h]):u.longs===Number?new l.LongBits(e.ints[h].low>>>0,e.ints[h].high>>>0).toNumber():e.ints[h]}if(e.strings&&e.strings.length){i.strings=[];for(var h=0;h<e.strings.length;++h)i.strings[h]=u.bytes===String?l.base64.encode(e.strings[h],0,e.strings[h].length):u.bytes===Array?Array.prototype.slice.call(e.strings[h]):e.strings[h]}if(e.tensors&&e.tensors.length){i.tensors=[];for(var h=0;h<e.tensors.length;++h)i.tensors[h]=c.onnx.TensorProto.toObject(e.tensors[h],u)}if(e.graphs&&e.graphs.length){i.graphs=[];for(var h=0;h<e.graphs.length;++h)i.graphs[h]=c.onnx.GraphProto.toObject(e.graphs[h],u)}if(e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.tp!=null&&e.hasOwnProperty("tp")&&(i.tp=c.onnx.TypeProto.toObject(e.tp,u)),e.typeProtos&&e.typeProtos.length){i.typeProtos=[];for(var h=0;h<e.typeProtos.length;++h)i.typeProtos[h]=c.onnx.TypeProto.toObject(e.typeProtos[h],u)}if(e.type!=null&&e.hasOwnProperty("type")&&(i.type=u.enums===String?c.onnx.AttributeProto.AttributeType[e.type]===void 0?e.type:c.onnx.AttributeProto.AttributeType[e.type]:e.type),e.refAttrName!=null&&e.hasOwnProperty("refAttrName")&&(i.refAttrName=e.refAttrName),e.sparseTensor!=null&&e.hasOwnProperty("sparseTensor")&&(i.sparseTensor=c.onnx.SparseTensorProto.toObject(e.sparseTensor,u)),e.sparseTensors&&e.sparseTensors.length){i.sparseTensors=[];for(var h=0;h<e.sparseTensors.length;++h)i.sparseTensors[h]=c.onnx.SparseTensorProto.toObject(e.sparseTensors[h],u)}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.AttributeProto"},a.AttributeType=function(){var e={},u=Object.create(e);return u[e[0]="UNDEFINED"]=0,u[e[1]="FLOAT"]=1,u[e[2]="INT"]=2,u[e[3]="STRING"]=3,u[e[4]="TENSOR"]=4,u[e[5]="GRAPH"]=5,u[e[11]="SPARSE_TENSOR"]=11,u[e[13]="TYPE_PROTO"]=13,u[e[6]="FLOATS"]=6,u[e[7]="INTS"]=7,u[e[8]="STRINGS"]=8,u[e[9]="TENSORS"]=9,u[e[10]="GRAPHS"]=10,u[e[12]="SPARSE_TENSORS"]=12,u[e[14]="TYPE_PROTOS"]=14,u}(),a}(),o.ValueInfoProto=function(){function a(e){if(e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.name="",a.prototype.type=null,a.prototype.docString="",a.create=function(e){return new a(e)},a.encode=function(e,u){return u||(u=p.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&u.uint32(10).string(e.name),e.type!=null&&Object.hasOwnProperty.call(e,"type")&&c.onnx.TypeProto.encode(e.type,u.uint32(18).fork()).ldelim(),e.docString!=null&&Object.hasOwnProperty.call(e,"docString")&&u.uint32(26).string(e.docString),u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.ValueInfoProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.name=e.string();break}case 2:{d.type=c.onnx.TypeProto.decode(e,e.uint32());break}case 3:{d.docString=e.string();break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.name!=null&&e.hasOwnProperty("name")&&!l.isString(e.name))return"name: string expected";if(e.type!=null&&e.hasOwnProperty("type")){var u=c.onnx.TypeProto.verify(e.type);if(u)return"type."+u}return e.docString!=null&&e.hasOwnProperty("docString")&&!l.isString(e.docString)?"docString: string expected":null},a.fromObject=function(e){if(e instanceof c.onnx.ValueInfoProto)return e;var u=new c.onnx.ValueInfoProto;if(e.name!=null&&(u.name=String(e.name)),e.type!=null){if(typeof e.type!="object")throw TypeError(".onnx.ValueInfoProto.type: object expected");u.type=c.onnx.TypeProto.fromObject(e.type)}return e.docString!=null&&(u.docString=String(e.docString)),u},a.toObject=function(e,u){u||(u={});var i={};return u.defaults&&(i.name="",i.type=null,i.docString=""),e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.type!=null&&e.hasOwnProperty("type")&&(i.type=c.onnx.TypeProto.toObject(e.type,u)),e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.ValueInfoProto"},a}(),o.NodeProto=function(){function a(e){if(this.input=[],this.output=[],this.attribute=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.input=l.emptyArray,a.prototype.output=l.emptyArray,a.prototype.name="",a.prototype.opType="",a.prototype.domain="",a.prototype.attribute=l.emptyArray,a.prototype.docString="",a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.input!=null&&e.input.length)for(var i=0;i<e.input.length;++i)u.uint32(10).string(e.input[i]);if(e.output!=null&&e.output.length)for(var i=0;i<e.output.length;++i)u.uint32(18).string(e.output[i]);if(e.name!=null&&Object.hasOwnProperty.call(e,"name")&&u.uint32(26).string(e.name),e.opType!=null&&Object.hasOwnProperty.call(e,"opType")&&u.uint32(34).string(e.opType),e.attribute!=null&&e.attribute.length)for(var i=0;i<e.attribute.length;++i)c.onnx.AttributeProto.encode(e.attribute[i],u.uint32(42).fork()).ldelim();return e.docString!=null&&Object.hasOwnProperty.call(e,"docString")&&u.uint32(50).string(e.docString),e.domain!=null&&Object.hasOwnProperty.call(e,"domain")&&u.uint32(58).string(e.domain),u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.NodeProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.input&&d.input.length||(d.input=[]),d.input.push(e.string());break}case 2:{d.output&&d.output.length||(d.output=[]),d.output.push(e.string());break}case 3:{d.name=e.string();break}case 4:{d.opType=e.string();break}case 7:{d.domain=e.string();break}case 5:{d.attribute&&d.attribute.length||(d.attribute=[]),d.attribute.push(c.onnx.AttributeProto.decode(e,e.uint32()));break}case 6:{d.docString=e.string();break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.input!=null&&e.hasOwnProperty("input")){if(!Array.isArray(e.input))return"input: array expected";for(var u=0;u<e.input.length;++u)if(!l.isString(e.input[u]))return"input: string[] expected"}if(e.output!=null&&e.hasOwnProperty("output")){if(!Array.isArray(e.output))return"output: array expected";for(var u=0;u<e.output.length;++u)if(!l.isString(e.output[u]))return"output: string[] expected"}if(e.name!=null&&e.hasOwnProperty("name")&&!l.isString(e.name))return"name: string expected";if(e.opType!=null&&e.hasOwnProperty("opType")&&!l.isString(e.opType))return"opType: string expected";if(e.domain!=null&&e.hasOwnProperty("domain")&&!l.isString(e.domain))return"domain: string expected";if(e.attribute!=null&&e.hasOwnProperty("attribute")){if(!Array.isArray(e.attribute))return"attribute: array expected";for(var u=0;u<e.attribute.length;++u){var i=c.onnx.AttributeProto.verify(e.attribute[u]);if(i)return"attribute."+i}}return e.docString!=null&&e.hasOwnProperty("docString")&&!l.isString(e.docString)?"docString: string expected":null},a.fromObject=function(e){if(e instanceof c.onnx.NodeProto)return e;var u=new c.onnx.NodeProto;if(e.input){if(!Array.isArray(e.input))throw TypeError(".onnx.NodeProto.input: array expected");u.input=[];for(var i=0;i<e.input.length;++i)u.input[i]=String(e.input[i])}if(e.output){if(!Array.isArray(e.output))throw TypeError(".onnx.NodeProto.output: array expected");u.output=[];for(var i=0;i<e.output.length;++i)u.output[i]=String(e.output[i])}if(e.name!=null&&(u.name=String(e.name)),e.opType!=null&&(u.opType=String(e.opType)),e.domain!=null&&(u.domain=String(e.domain)),e.attribute){if(!Array.isArray(e.attribute))throw TypeError(".onnx.NodeProto.attribute: array expected");u.attribute=[];for(var i=0;i<e.attribute.length;++i){if(typeof e.attribute[i]!="object")throw TypeError(".onnx.NodeProto.attribute: object expected");u.attribute[i]=c.onnx.AttributeProto.fromObject(e.attribute[i])}}return e.docString!=null&&(u.docString=String(e.docString)),u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.input=[],i.output=[],i.attribute=[]),u.defaults&&(i.name="",i.opType="",i.docString="",i.domain=""),e.input&&e.input.length){i.input=[];for(var d=0;d<e.input.length;++d)i.input[d]=e.input[d]}if(e.output&&e.output.length){i.output=[];for(var d=0;d<e.output.length;++d)i.output[d]=e.output[d]}if(e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.opType!=null&&e.hasOwnProperty("opType")&&(i.opType=e.opType),e.attribute&&e.attribute.length){i.attribute=[];for(var d=0;d<e.attribute.length;++d)i.attribute[d]=c.onnx.AttributeProto.toObject(e.attribute[d],u)}return e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.domain!=null&&e.hasOwnProperty("domain")&&(i.domain=e.domain),i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.NodeProto"},a}(),o.TrainingInfoProto=function(){function a(e){if(this.initializationBinding=[],this.updateBinding=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.initialization=null,a.prototype.algorithm=null,a.prototype.initializationBinding=l.emptyArray,a.prototype.updateBinding=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.initialization!=null&&Object.hasOwnProperty.call(e,"initialization")&&c.onnx.GraphProto.encode(e.initialization,u.uint32(10).fork()).ldelim(),e.algorithm!=null&&Object.hasOwnProperty.call(e,"algorithm")&&c.onnx.GraphProto.encode(e.algorithm,u.uint32(18).fork()).ldelim(),e.initializationBinding!=null&&e.initializationBinding.length)for(var i=0;i<e.initializationBinding.length;++i)c.onnx.StringStringEntryProto.encode(e.initializationBinding[i],u.uint32(26).fork()).ldelim();if(e.updateBinding!=null&&e.updateBinding.length)for(var i=0;i<e.updateBinding.length;++i)c.onnx.StringStringEntryProto.encode(e.updateBinding[i],u.uint32(34).fork()).ldelim();return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.TrainingInfoProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.initialization=c.onnx.GraphProto.decode(e,e.uint32());break}case 2:{d.algorithm=c.onnx.GraphProto.decode(e,e.uint32());break}case 3:{d.initializationBinding&&d.initializationBinding.length||(d.initializationBinding=[]),d.initializationBinding.push(c.onnx.StringStringEntryProto.decode(e,e.uint32()));break}case 4:{d.updateBinding&&d.updateBinding.length||(d.updateBinding=[]),d.updateBinding.push(c.onnx.StringStringEntryProto.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.initialization!=null&&e.hasOwnProperty("initialization")){var u=c.onnx.GraphProto.verify(e.initialization);if(u)return"initialization."+u}if(e.algorithm!=null&&e.hasOwnProperty("algorithm")){var u=c.onnx.GraphProto.verify(e.algorithm);if(u)return"algorithm."+u}if(e.initializationBinding!=null&&e.hasOwnProperty("initializationBinding")){if(!Array.isArray(e.initializationBinding))return"initializationBinding: array expected";for(var i=0;i<e.initializationBinding.length;++i){var u=c.onnx.StringStringEntryProto.verify(e.initializationBinding[i]);if(u)return"initializationBinding."+u}}if(e.updateBinding!=null&&e.hasOwnProperty("updateBinding")){if(!Array.isArray(e.updateBinding))return"updateBinding: array expected";for(var i=0;i<e.updateBinding.length;++i){var u=c.onnx.StringStringEntryProto.verify(e.updateBinding[i]);if(u)return"updateBinding."+u}}return null},a.fromObject=function(e){if(e instanceof c.onnx.TrainingInfoProto)return e;var u=new c.onnx.TrainingInfoProto;if(e.initialization!=null){if(typeof e.initialization!="object")throw TypeError(".onnx.TrainingInfoProto.initialization: object expected");u.initialization=c.onnx.GraphProto.fromObject(e.initialization)}if(e.algorithm!=null){if(typeof e.algorithm!="object")throw TypeError(".onnx.TrainingInfoProto.algorithm: object expected");u.algorithm=c.onnx.GraphProto.fromObject(e.algorithm)}if(e.initializationBinding){if(!Array.isArray(e.initializationBinding))throw TypeError(".onnx.TrainingInfoProto.initializationBinding: array expected");u.initializationBinding=[];for(var i=0;i<e.initializationBinding.length;++i){if(typeof e.initializationBinding[i]!="object")throw TypeError(".onnx.TrainingInfoProto.initializationBinding: object expected");u.initializationBinding[i]=c.onnx.StringStringEntryProto.fromObject(e.initializationBinding[i])}}if(e.updateBinding){if(!Array.isArray(e.updateBinding))throw TypeError(".onnx.TrainingInfoProto.updateBinding: array expected");u.updateBinding=[];for(var i=0;i<e.updateBinding.length;++i){if(typeof e.updateBinding[i]!="object")throw TypeError(".onnx.TrainingInfoProto.updateBinding: object expected");u.updateBinding[i]=c.onnx.StringStringEntryProto.fromObject(e.updateBinding[i])}}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.initializationBinding=[],i.updateBinding=[]),u.defaults&&(i.initialization=null,i.algorithm=null),e.initialization!=null&&e.hasOwnProperty("initialization")&&(i.initialization=c.onnx.GraphProto.toObject(e.initialization,u)),e.algorithm!=null&&e.hasOwnProperty("algorithm")&&(i.algorithm=c.onnx.GraphProto.toObject(e.algorithm,u)),e.initializationBinding&&e.initializationBinding.length){i.initializationBinding=[];for(var d=0;d<e.initializationBinding.length;++d)i.initializationBinding[d]=c.onnx.StringStringEntryProto.toObject(e.initializationBinding[d],u)}if(e.updateBinding&&e.updateBinding.length){i.updateBinding=[];for(var d=0;d<e.updateBinding.length;++d)i.updateBinding[d]=c.onnx.StringStringEntryProto.toObject(e.updateBinding[d],u)}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.TrainingInfoProto"},a}(),o.ModelProto=function(){function a(e){if(this.opsetImport=[],this.metadataProps=[],this.trainingInfo=[],this.functions=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.irVersion=l.Long?l.Long.fromBits(0,0,!1):0,a.prototype.opsetImport=l.emptyArray,a.prototype.producerName="",a.prototype.producerVersion="",a.prototype.domain="",a.prototype.modelVersion=l.Long?l.Long.fromBits(0,0,!1):0,a.prototype.docString="",a.prototype.graph=null,a.prototype.metadataProps=l.emptyArray,a.prototype.trainingInfo=l.emptyArray,a.prototype.functions=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.irVersion!=null&&Object.hasOwnProperty.call(e,"irVersion")&&u.uint32(8).int64(e.irVersion),e.producerName!=null&&Object.hasOwnProperty.call(e,"producerName")&&u.uint32(18).string(e.producerName),e.producerVersion!=null&&Object.hasOwnProperty.call(e,"producerVersion")&&u.uint32(26).string(e.producerVersion),e.domain!=null&&Object.hasOwnProperty.call(e,"domain")&&u.uint32(34).string(e.domain),e.modelVersion!=null&&Object.hasOwnProperty.call(e,"modelVersion")&&u.uint32(40).int64(e.modelVersion),e.docString!=null&&Object.hasOwnProperty.call(e,"docString")&&u.uint32(50).string(e.docString),e.graph!=null&&Object.hasOwnProperty.call(e,"graph")&&c.onnx.GraphProto.encode(e.graph,u.uint32(58).fork()).ldelim(),e.opsetImport!=null&&e.opsetImport.length)for(var i=0;i<e.opsetImport.length;++i)c.onnx.OperatorSetIdProto.encode(e.opsetImport[i],u.uint32(66).fork()).ldelim();if(e.metadataProps!=null&&e.metadataProps.length)for(var i=0;i<e.metadataProps.length;++i)c.onnx.StringStringEntryProto.encode(e.metadataProps[i],u.uint32(114).fork()).ldelim();if(e.trainingInfo!=null&&e.trainingInfo.length)for(var i=0;i<e.trainingInfo.length;++i)c.onnx.TrainingInfoProto.encode(e.trainingInfo[i],u.uint32(162).fork()).ldelim();if(e.functions!=null&&e.functions.length)for(var i=0;i<e.functions.length;++i)c.onnx.FunctionProto.encode(e.functions[i],u.uint32(202).fork()).ldelim();return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.ModelProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.irVersion=e.int64();break}case 8:{d.opsetImport&&d.opsetImport.length||(d.opsetImport=[]),d.opsetImport.push(c.onnx.OperatorSetIdProto.decode(e,e.uint32()));break}case 2:{d.producerName=e.string();break}case 3:{d.producerVersion=e.string();break}case 4:{d.domain=e.string();break}case 5:{d.modelVersion=e.int64();break}case 6:{d.docString=e.string();break}case 7:{d.graph=c.onnx.GraphProto.decode(e,e.uint32());break}case 14:{d.metadataProps&&d.metadataProps.length||(d.metadataProps=[]),d.metadataProps.push(c.onnx.StringStringEntryProto.decode(e,e.uint32()));break}case 20:{d.trainingInfo&&d.trainingInfo.length||(d.trainingInfo=[]),d.trainingInfo.push(c.onnx.TrainingInfoProto.decode(e,e.uint32()));break}case 25:{d.functions&&d.functions.length||(d.functions=[]),d.functions.push(c.onnx.FunctionProto.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.irVersion!=null&&e.hasOwnProperty("irVersion")&&!l.isInteger(e.irVersion)&&!(e.irVersion&&l.isInteger(e.irVersion.low)&&l.isInteger(e.irVersion.high)))return"irVersion: integer|Long expected";if(e.opsetImport!=null&&e.hasOwnProperty("opsetImport")){if(!Array.isArray(e.opsetImport))return"opsetImport: array expected";for(var u=0;u<e.opsetImport.length;++u){var i=c.onnx.OperatorSetIdProto.verify(e.opsetImport[u]);if(i)return"opsetImport."+i}}if(e.producerName!=null&&e.hasOwnProperty("producerName")&&!l.isString(e.producerName))return"producerName: string expected";if(e.producerVersion!=null&&e.hasOwnProperty("producerVersion")&&!l.isString(e.producerVersion))return"producerVersion: string expected";if(e.domain!=null&&e.hasOwnProperty("domain")&&!l.isString(e.domain))return"domain: string expected";if(e.modelVersion!=null&&e.hasOwnProperty("modelVersion")&&!l.isInteger(e.modelVersion)&&!(e.modelVersion&&l.isInteger(e.modelVersion.low)&&l.isInteger(e.modelVersion.high)))return"modelVersion: integer|Long expected";if(e.docString!=null&&e.hasOwnProperty("docString")&&!l.isString(e.docString))return"docString: string expected";if(e.graph!=null&&e.hasOwnProperty("graph")){var i=c.onnx.GraphProto.verify(e.graph);if(i)return"graph."+i}if(e.metadataProps!=null&&e.hasOwnProperty("metadataProps")){if(!Array.isArray(e.metadataProps))return"metadataProps: array expected";for(var u=0;u<e.metadataProps.length;++u){var i=c.onnx.StringStringEntryProto.verify(e.metadataProps[u]);if(i)return"metadataProps."+i}}if(e.trainingInfo!=null&&e.hasOwnProperty("trainingInfo")){if(!Array.isArray(e.trainingInfo))return"trainingInfo: array expected";for(var u=0;u<e.trainingInfo.length;++u){var i=c.onnx.TrainingInfoProto.verify(e.trainingInfo[u]);if(i)return"trainingInfo."+i}}if(e.functions!=null&&e.hasOwnProperty("functions")){if(!Array.isArray(e.functions))return"functions: array expected";for(var u=0;u<e.functions.length;++u){var i=c.onnx.FunctionProto.verify(e.functions[u]);if(i)return"functions."+i}}return null},a.fromObject=function(e){if(e instanceof c.onnx.ModelProto)return e;var u=new c.onnx.ModelProto;if(e.irVersion!=null&&(l.Long?(u.irVersion=l.Long.fromValue(e.irVersion)).unsigned=!1:typeof e.irVersion=="string"?u.irVersion=parseInt(e.irVersion,10):typeof e.irVersion=="number"?u.irVersion=e.irVersion:typeof e.irVersion=="object"&&(u.irVersion=new l.LongBits(e.irVersion.low>>>0,e.irVersion.high>>>0).toNumber())),e.opsetImport){if(!Array.isArray(e.opsetImport))throw TypeError(".onnx.ModelProto.opsetImport: array expected");u.opsetImport=[];for(var i=0;i<e.opsetImport.length;++i){if(typeof e.opsetImport[i]!="object")throw TypeError(".onnx.ModelProto.opsetImport: object expected");u.opsetImport[i]=c.onnx.OperatorSetIdProto.fromObject(e.opsetImport[i])}}if(e.producerName!=null&&(u.producerName=String(e.producerName)),e.producerVersion!=null&&(u.producerVersion=String(e.producerVersion)),e.domain!=null&&(u.domain=String(e.domain)),e.modelVersion!=null&&(l.Long?(u.modelVersion=l.Long.fromValue(e.modelVersion)).unsigned=!1:typeof e.modelVersion=="string"?u.modelVersion=parseInt(e.modelVersion,10):typeof e.modelVersion=="number"?u.modelVersion=e.modelVersion:typeof e.modelVersion=="object"&&(u.modelVersion=new l.LongBits(e.modelVersion.low>>>0,e.modelVersion.high>>>0).toNumber())),e.docString!=null&&(u.docString=String(e.docString)),e.graph!=null){if(typeof e.graph!="object")throw TypeError(".onnx.ModelProto.graph: object expected");u.graph=c.onnx.GraphProto.fromObject(e.graph)}if(e.metadataProps){if(!Array.isArray(e.metadataProps))throw TypeError(".onnx.ModelProto.metadataProps: array expected");u.metadataProps=[];for(var i=0;i<e.metadataProps.length;++i){if(typeof e.metadataProps[i]!="object")throw TypeError(".onnx.ModelProto.metadataProps: object expected");u.metadataProps[i]=c.onnx.StringStringEntryProto.fromObject(e.metadataProps[i])}}if(e.trainingInfo){if(!Array.isArray(e.trainingInfo))throw TypeError(".onnx.ModelProto.trainingInfo: array expected");u.trainingInfo=[];for(var i=0;i<e.trainingInfo.length;++i){if(typeof e.trainingInfo[i]!="object")throw TypeError(".onnx.ModelProto.trainingInfo: object expected");u.trainingInfo[i]=c.onnx.TrainingInfoProto.fromObject(e.trainingInfo[i])}}if(e.functions){if(!Array.isArray(e.functions))throw TypeError(".onnx.ModelProto.functions: array expected");u.functions=[];for(var i=0;i<e.functions.length;++i){if(typeof e.functions[i]!="object")throw TypeError(".onnx.ModelProto.functions: object expected");u.functions[i]=c.onnx.FunctionProto.fromObject(e.functions[i])}}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.opsetImport=[],i.metadataProps=[],i.trainingInfo=[],i.functions=[]),u.defaults){if(l.Long){var d=new l.Long(0,0,!1);i.irVersion=u.longs===String?d.toString():u.longs===Number?d.toNumber():d}else i.irVersion=u.longs===String?"0":0;if(i.producerName="",i.producerVersion="",i.domain="",l.Long){var d=new l.Long(0,0,!1);i.modelVersion=u.longs===String?d.toString():u.longs===Number?d.toNumber():d}else i.modelVersion=u.longs===String?"0":0;i.docString="",i.graph=null}if(e.irVersion!=null&&e.hasOwnProperty("irVersion")&&(typeof e.irVersion=="number"?i.irVersion=u.longs===String?String(e.irVersion):e.irVersion:i.irVersion=u.longs===String?l.Long.prototype.toString.call(e.irVersion):u.longs===Number?new l.LongBits(e.irVersion.low>>>0,e.irVersion.high>>>0).toNumber():e.irVersion),e.producerName!=null&&e.hasOwnProperty("producerName")&&(i.producerName=e.producerName),e.producerVersion!=null&&e.hasOwnProperty("producerVersion")&&(i.producerVersion=e.producerVersion),e.domain!=null&&e.hasOwnProperty("domain")&&(i.domain=e.domain),e.modelVersion!=null&&e.hasOwnProperty("modelVersion")&&(typeof e.modelVersion=="number"?i.modelVersion=u.longs===String?String(e.modelVersion):e.modelVersion:i.modelVersion=u.longs===String?l.Long.prototype.toString.call(e.modelVersion):u.longs===Number?new l.LongBits(e.modelVersion.low>>>0,e.modelVersion.high>>>0).toNumber():e.modelVersion),e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.graph!=null&&e.hasOwnProperty("graph")&&(i.graph=c.onnx.GraphProto.toObject(e.graph,u)),e.opsetImport&&e.opsetImport.length){i.opsetImport=[];for(var h=0;h<e.opsetImport.length;++h)i.opsetImport[h]=c.onnx.OperatorSetIdProto.toObject(e.opsetImport[h],u)}if(e.metadataProps&&e.metadataProps.length){i.metadataProps=[];for(var h=0;h<e.metadataProps.length;++h)i.metadataProps[h]=c.onnx.StringStringEntryProto.toObject(e.metadataProps[h],u)}if(e.trainingInfo&&e.trainingInfo.length){i.trainingInfo=[];for(var h=0;h<e.trainingInfo.length;++h)i.trainingInfo[h]=c.onnx.TrainingInfoProto.toObject(e.trainingInfo[h],u)}if(e.functions&&e.functions.length){i.functions=[];for(var h=0;h<e.functions.length;++h)i.functions[h]=c.onnx.FunctionProto.toObject(e.functions[h],u)}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.ModelProto"},a}(),o.StringStringEntryProto=function(){function a(e){if(e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.key="",a.prototype.value="",a.create=function(e){return new a(e)},a.encode=function(e,u){return u||(u=p.create()),e.key!=null&&Object.hasOwnProperty.call(e,"key")&&u.uint32(10).string(e.key),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&u.uint32(18).string(e.value),u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.StringStringEntryProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.key=e.string();break}case 2:{d.value=e.string();break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.key!=null&&e.hasOwnProperty("key")&&!l.isString(e.key)?"key: string expected":e.value!=null&&e.hasOwnProperty("value")&&!l.isString(e.value)?"value: string expected":null},a.fromObject=function(e){if(e instanceof c.onnx.StringStringEntryProto)return e;var u=new c.onnx.StringStringEntryProto;return e.key!=null&&(u.key=String(e.key)),e.value!=null&&(u.value=String(e.value)),u},a.toObject=function(e,u){u||(u={});var i={};return u.defaults&&(i.key="",i.value=""),e.key!=null&&e.hasOwnProperty("key")&&(i.key=e.key),e.value!=null&&e.hasOwnProperty("value")&&(i.value=e.value),i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.StringStringEntryProto"},a}(),o.TensorAnnotation=function(){function a(e){if(this.quantParameterTensorNames=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.tensorName="",a.prototype.quantParameterTensorNames=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.tensorName!=null&&Object.hasOwnProperty.call(e,"tensorName")&&u.uint32(10).string(e.tensorName),e.quantParameterTensorNames!=null&&e.quantParameterTensorNames.length)for(var i=0;i<e.quantParameterTensorNames.length;++i)c.onnx.StringStringEntryProto.encode(e.quantParameterTensorNames[i],u.uint32(18).fork()).ldelim();return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.TensorAnnotation;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.tensorName=e.string();break}case 2:{d.quantParameterTensorNames&&d.quantParameterTensorNames.length||(d.quantParameterTensorNames=[]),d.quantParameterTensorNames.push(c.onnx.StringStringEntryProto.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.tensorName!=null&&e.hasOwnProperty("tensorName")&&!l.isString(e.tensorName))return"tensorName: string expected";if(e.quantParameterTensorNames!=null&&e.hasOwnProperty("quantParameterTensorNames")){if(!Array.isArray(e.quantParameterTensorNames))return"quantParameterTensorNames: array expected";for(var u=0;u<e.quantParameterTensorNames.length;++u){var i=c.onnx.StringStringEntryProto.verify(e.quantParameterTensorNames[u]);if(i)return"quantParameterTensorNames."+i}}return null},a.fromObject=function(e){if(e instanceof c.onnx.TensorAnnotation)return e;var u=new c.onnx.TensorAnnotation;if(e.tensorName!=null&&(u.tensorName=String(e.tensorName)),e.quantParameterTensorNames){if(!Array.isArray(e.quantParameterTensorNames))throw TypeError(".onnx.TensorAnnotation.quantParameterTensorNames: array expected");u.quantParameterTensorNames=[];for(var i=0;i<e.quantParameterTensorNames.length;++i){if(typeof e.quantParameterTensorNames[i]!="object")throw TypeError(".onnx.TensorAnnotation.quantParameterTensorNames: object expected");u.quantParameterTensorNames[i]=c.onnx.StringStringEntryProto.fromObject(e.quantParameterTensorNames[i])}}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.quantParameterTensorNames=[]),u.defaults&&(i.tensorName=""),e.tensorName!=null&&e.hasOwnProperty("tensorName")&&(i.tensorName=e.tensorName),e.quantParameterTensorNames&&e.quantParameterTensorNames.length){i.quantParameterTensorNames=[];for(var d=0;d<e.quantParameterTensorNames.length;++d)i.quantParameterTensorNames[d]=c.onnx.StringStringEntryProto.toObject(e.quantParameterTensorNames[d],u)}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.TensorAnnotation"},a}(),o.GraphProto=function(){function a(e){if(this.node=[],this.initializer=[],this.sparseInitializer=[],this.input=[],this.output=[],this.valueInfo=[],this.quantizationAnnotation=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.node=l.emptyArray,a.prototype.name="",a.prototype.initializer=l.emptyArray,a.prototype.sparseInitializer=l.emptyArray,a.prototype.docString="",a.prototype.input=l.emptyArray,a.prototype.output=l.emptyArray,a.prototype.valueInfo=l.emptyArray,a.prototype.quantizationAnnotation=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.node!=null&&e.node.length)for(var i=0;i<e.node.length;++i)c.onnx.NodeProto.encode(e.node[i],u.uint32(10).fork()).ldelim();if(e.name!=null&&Object.hasOwnProperty.call(e,"name")&&u.uint32(18).string(e.name),e.initializer!=null&&e.initializer.length)for(var i=0;i<e.initializer.length;++i)c.onnx.TensorProto.encode(e.initializer[i],u.uint32(42).fork()).ldelim();if(e.docString!=null&&Object.hasOwnProperty.call(e,"docString")&&u.uint32(82).string(e.docString),e.input!=null&&e.input.length)for(var i=0;i<e.input.length;++i)c.onnx.ValueInfoProto.encode(e.input[i],u.uint32(90).fork()).ldelim();if(e.output!=null&&e.output.length)for(var i=0;i<e.output.length;++i)c.onnx.ValueInfoProto.encode(e.output[i],u.uint32(98).fork()).ldelim();if(e.valueInfo!=null&&e.valueInfo.length)for(var i=0;i<e.valueInfo.length;++i)c.onnx.ValueInfoProto.encode(e.valueInfo[i],u.uint32(106).fork()).ldelim();if(e.quantizationAnnotation!=null&&e.quantizationAnnotation.length)for(var i=0;i<e.quantizationAnnotation.length;++i)c.onnx.TensorAnnotation.encode(e.quantizationAnnotation[i],u.uint32(114).fork()).ldelim();if(e.sparseInitializer!=null&&e.sparseInitializer.length)for(var i=0;i<e.sparseInitializer.length;++i)c.onnx.SparseTensorProto.encode(e.sparseInitializer[i],u.uint32(122).fork()).ldelim();return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.GraphProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.node&&d.node.length||(d.node=[]),d.node.push(c.onnx.NodeProto.decode(e,e.uint32()));break}case 2:{d.name=e.string();break}case 5:{d.initializer&&d.initializer.length||(d.initializer=[]),d.initializer.push(c.onnx.TensorProto.decode(e,e.uint32()));break}case 15:{d.sparseInitializer&&d.sparseInitializer.length||(d.sparseInitializer=[]),d.sparseInitializer.push(c.onnx.SparseTensorProto.decode(e,e.uint32()));break}case 10:{d.docString=e.string();break}case 11:{d.input&&d.input.length||(d.input=[]),d.input.push(c.onnx.ValueInfoProto.decode(e,e.uint32()));break}case 12:{d.output&&d.output.length||(d.output=[]),d.output.push(c.onnx.ValueInfoProto.decode(e,e.uint32()));break}case 13:{d.valueInfo&&d.valueInfo.length||(d.valueInfo=[]),d.valueInfo.push(c.onnx.ValueInfoProto.decode(e,e.uint32()));break}case 14:{d.quantizationAnnotation&&d.quantizationAnnotation.length||(d.quantizationAnnotation=[]),d.quantizationAnnotation.push(c.onnx.TensorAnnotation.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.node!=null&&e.hasOwnProperty("node")){if(!Array.isArray(e.node))return"node: array expected";for(var u=0;u<e.node.length;++u){var i=c.onnx.NodeProto.verify(e.node[u]);if(i)return"node."+i}}if(e.name!=null&&e.hasOwnProperty("name")&&!l.isString(e.name))return"name: string expected";if(e.initializer!=null&&e.hasOwnProperty("initializer")){if(!Array.isArray(e.initializer))return"initializer: array expected";for(var u=0;u<e.initializer.length;++u){var i=c.onnx.TensorProto.verify(e.initializer[u]);if(i)return"initializer."+i}}if(e.sparseInitializer!=null&&e.hasOwnProperty("sparseInitializer")){if(!Array.isArray(e.sparseInitializer))return"sparseInitializer: array expected";for(var u=0;u<e.sparseInitializer.length;++u){var i=c.onnx.SparseTensorProto.verify(e.sparseInitializer[u]);if(i)return"sparseInitializer."+i}}if(e.docString!=null&&e.hasOwnProperty("docString")&&!l.isString(e.docString))return"docString: string expected";if(e.input!=null&&e.hasOwnProperty("input")){if(!Array.isArray(e.input))return"input: array expected";for(var u=0;u<e.input.length;++u){var i=c.onnx.ValueInfoProto.verify(e.input[u]);if(i)return"input."+i}}if(e.output!=null&&e.hasOwnProperty("output")){if(!Array.isArray(e.output))return"output: array expected";for(var u=0;u<e.output.length;++u){var i=c.onnx.ValueInfoProto.verify(e.output[u]);if(i)return"output."+i}}if(e.valueInfo!=null&&e.hasOwnProperty("valueInfo")){if(!Array.isArray(e.valueInfo))return"valueInfo: array expected";for(var u=0;u<e.valueInfo.length;++u){var i=c.onnx.ValueInfoProto.verify(e.valueInfo[u]);if(i)return"valueInfo."+i}}if(e.quantizationAnnotation!=null&&e.hasOwnProperty("quantizationAnnotation")){if(!Array.isArray(e.quantizationAnnotation))return"quantizationAnnotation: array expected";for(var u=0;u<e.quantizationAnnotation.length;++u){var i=c.onnx.TensorAnnotation.verify(e.quantizationAnnotation[u]);if(i)return"quantizationAnnotation."+i}}return null},a.fromObject=function(e){if(e instanceof c.onnx.GraphProto)return e;var u=new c.onnx.GraphProto;if(e.node){if(!Array.isArray(e.node))throw TypeError(".onnx.GraphProto.node: array expected");u.node=[];for(var i=0;i<e.node.length;++i){if(typeof e.node[i]!="object")throw TypeError(".onnx.GraphProto.node: object expected");u.node[i]=c.onnx.NodeProto.fromObject(e.node[i])}}if(e.name!=null&&(u.name=String(e.name)),e.initializer){if(!Array.isArray(e.initializer))throw TypeError(".onnx.GraphProto.initializer: array expected");u.initializer=[];for(var i=0;i<e.initializer.length;++i){if(typeof e.initializer[i]!="object")throw TypeError(".onnx.GraphProto.initializer: object expected");u.initializer[i]=c.onnx.TensorProto.fromObject(e.initializer[i])}}if(e.sparseInitializer){if(!Array.isArray(e.sparseInitializer))throw TypeError(".onnx.GraphProto.sparseInitializer: array expected");u.sparseInitializer=[];for(var i=0;i<e.sparseInitializer.length;++i){if(typeof e.sparseInitializer[i]!="object")throw TypeError(".onnx.GraphProto.sparseInitializer: object expected");u.sparseInitializer[i]=c.onnx.SparseTensorProto.fromObject(e.sparseInitializer[i])}}if(e.docString!=null&&(u.docString=String(e.docString)),e.input){if(!Array.isArray(e.input))throw TypeError(".onnx.GraphProto.input: array expected");u.input=[];for(var i=0;i<e.input.length;++i){if(typeof e.input[i]!="object")throw TypeError(".onnx.GraphProto.input: object expected");u.input[i]=c.onnx.ValueInfoProto.fromObject(e.input[i])}}if(e.output){if(!Array.isArray(e.output))throw TypeError(".onnx.GraphProto.output: array expected");u.output=[];for(var i=0;i<e.output.length;++i){if(typeof e.output[i]!="object")throw TypeError(".onnx.GraphProto.output: object expected");u.output[i]=c.onnx.ValueInfoProto.fromObject(e.output[i])}}if(e.valueInfo){if(!Array.isArray(e.valueInfo))throw TypeError(".onnx.GraphProto.valueInfo: array expected");u.valueInfo=[];for(var i=0;i<e.valueInfo.length;++i){if(typeof e.valueInfo[i]!="object")throw TypeError(".onnx.GraphProto.valueInfo: object expected");u.valueInfo[i]=c.onnx.ValueInfoProto.fromObject(e.valueInfo[i])}}if(e.quantizationAnnotation){if(!Array.isArray(e.quantizationAnnotation))throw TypeError(".onnx.GraphProto.quantizationAnnotation: array expected");u.quantizationAnnotation=[];for(var i=0;i<e.quantizationAnnotation.length;++i){if(typeof e.quantizationAnnotation[i]!="object")throw TypeError(".onnx.GraphProto.quantizationAnnotation: object expected");u.quantizationAnnotation[i]=c.onnx.TensorAnnotation.fromObject(e.quantizationAnnotation[i])}}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.node=[],i.initializer=[],i.input=[],i.output=[],i.valueInfo=[],i.quantizationAnnotation=[],i.sparseInitializer=[]),u.defaults&&(i.name="",i.docString=""),e.node&&e.node.length){i.node=[];for(var d=0;d<e.node.length;++d)i.node[d]=c.onnx.NodeProto.toObject(e.node[d],u)}if(e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.initializer&&e.initializer.length){i.initializer=[];for(var d=0;d<e.initializer.length;++d)i.initializer[d]=c.onnx.TensorProto.toObject(e.initializer[d],u)}if(e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.input&&e.input.length){i.input=[];for(var d=0;d<e.input.length;++d)i.input[d]=c.onnx.ValueInfoProto.toObject(e.input[d],u)}if(e.output&&e.output.length){i.output=[];for(var d=0;d<e.output.length;++d)i.output[d]=c.onnx.ValueInfoProto.toObject(e.output[d],u)}if(e.valueInfo&&e.valueInfo.length){i.valueInfo=[];for(var d=0;d<e.valueInfo.length;++d)i.valueInfo[d]=c.onnx.ValueInfoProto.toObject(e.valueInfo[d],u)}if(e.quantizationAnnotation&&e.quantizationAnnotation.length){i.quantizationAnnotation=[];for(var d=0;d<e.quantizationAnnotation.length;++d)i.quantizationAnnotation[d]=c.onnx.TensorAnnotation.toObject(e.quantizationAnnotation[d],u)}if(e.sparseInitializer&&e.sparseInitializer.length){i.sparseInitializer=[];for(var d=0;d<e.sparseInitializer.length;++d)i.sparseInitializer[d]=c.onnx.SparseTensorProto.toObject(e.sparseInitializer[d],u)}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.GraphProto"},a}(),o.TensorProto=function(){function a(e){if(this.dims=[],this.floatData=[],this.int32Data=[],this.stringData=[],this.int64Data=[],this.externalData=[],this.doubleData=[],this.uint64Data=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.dims=l.emptyArray,a.prototype.dataType=0,a.prototype.segment=null,a.prototype.floatData=l.emptyArray,a.prototype.int32Data=l.emptyArray,a.prototype.stringData=l.emptyArray,a.prototype.int64Data=l.emptyArray,a.prototype.name="",a.prototype.docString="",a.prototype.rawData=l.newBuffer([]),a.prototype.externalData=l.emptyArray,a.prototype.dataLocation=0,a.prototype.doubleData=l.emptyArray,a.prototype.uint64Data=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.dims!=null&&e.dims.length){u.uint32(10).fork();for(var i=0;i<e.dims.length;++i)u.int64(e.dims[i]);u.ldelim()}if(e.dataType!=null&&Object.hasOwnProperty.call(e,"dataType")&&u.uint32(16).int32(e.dataType),e.segment!=null&&Object.hasOwnProperty.call(e,"segment")&&c.onnx.TensorProto.Segment.encode(e.segment,u.uint32(26).fork()).ldelim(),e.floatData!=null&&e.floatData.length){u.uint32(34).fork();for(var i=0;i<e.floatData.length;++i)u.float(e.floatData[i]);u.ldelim()}if(e.int32Data!=null&&e.int32Data.length){u.uint32(42).fork();for(var i=0;i<e.int32Data.length;++i)u.int32(e.int32Data[i]);u.ldelim()}if(e.stringData!=null&&e.stringData.length)for(var i=0;i<e.stringData.length;++i)u.uint32(50).bytes(e.stringData[i]);if(e.int64Data!=null&&e.int64Data.length){u.uint32(58).fork();for(var i=0;i<e.int64Data.length;++i)u.int64(e.int64Data[i]);u.ldelim()}if(e.name!=null&&Object.hasOwnProperty.call(e,"name")&&u.uint32(66).string(e.name),e.rawData!=null&&Object.hasOwnProperty.call(e,"rawData")&&u.uint32(74).bytes(e.rawData),e.doubleData!=null&&e.doubleData.length){u.uint32(82).fork();for(var i=0;i<e.doubleData.length;++i)u.double(e.doubleData[i]);u.ldelim()}if(e.uint64Data!=null&&e.uint64Data.length){u.uint32(90).fork();for(var i=0;i<e.uint64Data.length;++i)u.uint64(e.uint64Data[i]);u.ldelim()}if(e.docString!=null&&Object.hasOwnProperty.call(e,"docString")&&u.uint32(98).string(e.docString),e.externalData!=null&&e.externalData.length)for(var i=0;i<e.externalData.length;++i)c.onnx.StringStringEntryProto.encode(e.externalData[i],u.uint32(106).fork()).ldelim();return e.dataLocation!=null&&Object.hasOwnProperty.call(e,"dataLocation")&&u.uint32(112).int32(e.dataLocation),u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.TensorProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{if(d.dims&&d.dims.length||(d.dims=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.dims.push(e.int64());else d.dims.push(e.int64());break}case 2:{d.dataType=e.int32();break}case 3:{d.segment=c.onnx.TensorProto.Segment.decode(e,e.uint32());break}case 4:{if(d.floatData&&d.floatData.length||(d.floatData=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.floatData.push(e.float());else d.floatData.push(e.float());break}case 5:{if(d.int32Data&&d.int32Data.length||(d.int32Data=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.int32Data.push(e.int32());else d.int32Data.push(e.int32());break}case 6:{d.stringData&&d.stringData.length||(d.stringData=[]),d.stringData.push(e.bytes());break}case 7:{if(d.int64Data&&d.int64Data.length||(d.int64Data=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.int64Data.push(e.int64());else d.int64Data.push(e.int64());break}case 8:{d.name=e.string();break}case 12:{d.docString=e.string();break}case 9:{d.rawData=e.bytes();break}case 13:{d.externalData&&d.externalData.length||(d.externalData=[]),d.externalData.push(c.onnx.StringStringEntryProto.decode(e,e.uint32()));break}case 14:{d.dataLocation=e.int32();break}case 10:{if(d.doubleData&&d.doubleData.length||(d.doubleData=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.doubleData.push(e.double());else d.doubleData.push(e.double());break}case 11:{if(d.uint64Data&&d.uint64Data.length||(d.uint64Data=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.uint64Data.push(e.uint64());else d.uint64Data.push(e.uint64());break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dims!=null&&e.hasOwnProperty("dims")){if(!Array.isArray(e.dims))return"dims: array expected";for(var u=0;u<e.dims.length;++u)if(!l.isInteger(e.dims[u])&&!(e.dims[u]&&l.isInteger(e.dims[u].low)&&l.isInteger(e.dims[u].high)))return"dims: integer|Long[] expected"}if(e.dataType!=null&&e.hasOwnProperty("dataType")&&!l.isInteger(e.dataType))return"dataType: integer expected";if(e.segment!=null&&e.hasOwnProperty("segment")){var i=c.onnx.TensorProto.Segment.verify(e.segment);if(i)return"segment."+i}if(e.floatData!=null&&e.hasOwnProperty("floatData")){if(!Array.isArray(e.floatData))return"floatData: array expected";for(var u=0;u<e.floatData.length;++u)if(typeof e.floatData[u]!="number")return"floatData: number[] expected"}if(e.int32Data!=null&&e.hasOwnProperty("int32Data")){if(!Array.isArray(e.int32Data))return"int32Data: array expected";for(var u=0;u<e.int32Data.length;++u)if(!l.isInteger(e.int32Data[u]))return"int32Data: integer[] expected"}if(e.stringData!=null&&e.hasOwnProperty("stringData")){if(!Array.isArray(e.stringData))return"stringData: array expected";for(var u=0;u<e.stringData.length;++u)if(!(e.stringData[u]&&typeof e.stringData[u].length=="number"||l.isString(e.stringData[u])))return"stringData: buffer[] expected"}if(e.int64Data!=null&&e.hasOwnProperty("int64Data")){if(!Array.isArray(e.int64Data))return"int64Data: array expected";for(var u=0;u<e.int64Data.length;++u)if(!l.isInteger(e.int64Data[u])&&!(e.int64Data[u]&&l.isInteger(e.int64Data[u].low)&&l.isInteger(e.int64Data[u].high)))return"int64Data: integer|Long[] expected"}if(e.name!=null&&e.hasOwnProperty("name")&&!l.isString(e.name))return"name: string expected";if(e.docString!=null&&e.hasOwnProperty("docString")&&!l.isString(e.docString))return"docString: string expected";if(e.rawData!=null&&e.hasOwnProperty("rawData")&&!(e.rawData&&typeof e.rawData.length=="number"||l.isString(e.rawData)))return"rawData: buffer expected";if(e.externalData!=null&&e.hasOwnProperty("externalData")){if(!Array.isArray(e.externalData))return"externalData: array expected";for(var u=0;u<e.externalData.length;++u){var i=c.onnx.StringStringEntryProto.verify(e.externalData[u]);if(i)return"externalData."+i}}if(e.dataLocation!=null&&e.hasOwnProperty("dataLocation"))switch(e.dataLocation){default:return"dataLocation: enum value expected";case 0:case 1:break}if(e.doubleData!=null&&e.hasOwnProperty("doubleData")){if(!Array.isArray(e.doubleData))return"doubleData: array expected";for(var u=0;u<e.doubleData.length;++u)if(typeof e.doubleData[u]!="number")return"doubleData: number[] expected"}if(e.uint64Data!=null&&e.hasOwnProperty("uint64Data")){if(!Array.isArray(e.uint64Data))return"uint64Data: array expected";for(var u=0;u<e.uint64Data.length;++u)if(!l.isInteger(e.uint64Data[u])&&!(e.uint64Data[u]&&l.isInteger(e.uint64Data[u].low)&&l.isInteger(e.uint64Data[u].high)))return"uint64Data: integer|Long[] expected"}return null},a.fromObject=function(e){if(e instanceof c.onnx.TensorProto)return e;var u=new c.onnx.TensorProto;if(e.dims){if(!Array.isArray(e.dims))throw TypeError(".onnx.TensorProto.dims: array expected");u.dims=[];for(var i=0;i<e.dims.length;++i)l.Long?(u.dims[i]=l.Long.fromValue(e.dims[i])).unsigned=!1:typeof e.dims[i]=="string"?u.dims[i]=parseInt(e.dims[i],10):typeof e.dims[i]=="number"?u.dims[i]=e.dims[i]:typeof e.dims[i]=="object"&&(u.dims[i]=new l.LongBits(e.dims[i].low>>>0,e.dims[i].high>>>0).toNumber())}if(e.dataType!=null&&(u.dataType=e.dataType|0),e.segment!=null){if(typeof e.segment!="object")throw TypeError(".onnx.TensorProto.segment: object expected");u.segment=c.onnx.TensorProto.Segment.fromObject(e.segment)}if(e.floatData){if(!Array.isArray(e.floatData))throw TypeError(".onnx.TensorProto.floatData: array expected");u.floatData=[];for(var i=0;i<e.floatData.length;++i)u.floatData[i]=Number(e.floatData[i])}if(e.int32Data){if(!Array.isArray(e.int32Data))throw TypeError(".onnx.TensorProto.int32Data: array expected");u.int32Data=[];for(var i=0;i<e.int32Data.length;++i)u.int32Data[i]=e.int32Data[i]|0}if(e.stringData){if(!Array.isArray(e.stringData))throw TypeError(".onnx.TensorProto.stringData: array expected");u.stringData=[];for(var i=0;i<e.stringData.length;++i)typeof e.stringData[i]=="string"?l.base64.decode(e.stringData[i],u.stringData[i]=l.newBuffer(l.base64.length(e.stringData[i])),0):e.stringData[i].length>=0&&(u.stringData[i]=e.stringData[i])}if(e.int64Data){if(!Array.isArray(e.int64Data))throw TypeError(".onnx.TensorProto.int64Data: array expected");u.int64Data=[];for(var i=0;i<e.int64Data.length;++i)l.Long?(u.int64Data[i]=l.Long.fromValue(e.int64Data[i])).unsigned=!1:typeof e.int64Data[i]=="string"?u.int64Data[i]=parseInt(e.int64Data[i],10):typeof e.int64Data[i]=="number"?u.int64Data[i]=e.int64Data[i]:typeof e.int64Data[i]=="object"&&(u.int64Data[i]=new l.LongBits(e.int64Data[i].low>>>0,e.int64Data[i].high>>>0).toNumber())}if(e.name!=null&&(u.name=String(e.name)),e.docString!=null&&(u.docString=String(e.docString)),e.rawData!=null&&(typeof e.rawData=="string"?l.base64.decode(e.rawData,u.rawData=l.newBuffer(l.base64.length(e.rawData)),0):e.rawData.length>=0&&(u.rawData=e.rawData)),e.externalData){if(!Array.isArray(e.externalData))throw TypeError(".onnx.TensorProto.externalData: array expected");u.externalData=[];for(var i=0;i<e.externalData.length;++i){if(typeof e.externalData[i]!="object")throw TypeError(".onnx.TensorProto.externalData: object expected");u.externalData[i]=c.onnx.StringStringEntryProto.fromObject(e.externalData[i])}}switch(e.dataLocation){default:if(typeof e.dataLocation=="number"){u.dataLocation=e.dataLocation;break}break;case"DEFAULT":case 0:u.dataLocation=0;break;case"EXTERNAL":case 1:u.dataLocation=1;break}if(e.doubleData){if(!Array.isArray(e.doubleData))throw TypeError(".onnx.TensorProto.doubleData: array expected");u.doubleData=[];for(var i=0;i<e.doubleData.length;++i)u.doubleData[i]=Number(e.doubleData[i])}if(e.uint64Data){if(!Array.isArray(e.uint64Data))throw TypeError(".onnx.TensorProto.uint64Data: array expected");u.uint64Data=[];for(var i=0;i<e.uint64Data.length;++i)l.Long?(u.uint64Data[i]=l.Long.fromValue(e.uint64Data[i])).unsigned=!0:typeof e.uint64Data[i]=="string"?u.uint64Data[i]=parseInt(e.uint64Data[i],10):typeof e.uint64Data[i]=="number"?u.uint64Data[i]=e.uint64Data[i]:typeof e.uint64Data[i]=="object"&&(u.uint64Data[i]=new l.LongBits(e.uint64Data[i].low>>>0,e.uint64Data[i].high>>>0).toNumber(!0))}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.dims=[],i.floatData=[],i.int32Data=[],i.stringData=[],i.int64Data=[],i.doubleData=[],i.uint64Data=[],i.externalData=[]),u.defaults&&(i.dataType=0,i.segment=null,i.name="",u.bytes===String?i.rawData="":(i.rawData=[],u.bytes!==Array&&(i.rawData=l.newBuffer(i.rawData))),i.docString="",i.dataLocation=u.enums===String?"DEFAULT":0),e.dims&&e.dims.length){i.dims=[];for(var d=0;d<e.dims.length;++d)typeof e.dims[d]=="number"?i.dims[d]=u.longs===String?String(e.dims[d]):e.dims[d]:i.dims[d]=u.longs===String?l.Long.prototype.toString.call(e.dims[d]):u.longs===Number?new l.LongBits(e.dims[d].low>>>0,e.dims[d].high>>>0).toNumber():e.dims[d]}if(e.dataType!=null&&e.hasOwnProperty("dataType")&&(i.dataType=e.dataType),e.segment!=null&&e.hasOwnProperty("segment")&&(i.segment=c.onnx.TensorProto.Segment.toObject(e.segment,u)),e.floatData&&e.floatData.length){i.floatData=[];for(var d=0;d<e.floatData.length;++d)i.floatData[d]=u.json&&!isFinite(e.floatData[d])?String(e.floatData[d]):e.floatData[d]}if(e.int32Data&&e.int32Data.length){i.int32Data=[];for(var d=0;d<e.int32Data.length;++d)i.int32Data[d]=e.int32Data[d]}if(e.stringData&&e.stringData.length){i.stringData=[];for(var d=0;d<e.stringData.length;++d)i.stringData[d]=u.bytes===String?l.base64.encode(e.stringData[d],0,e.stringData[d].length):u.bytes===Array?Array.prototype.slice.call(e.stringData[d]):e.stringData[d]}if(e.int64Data&&e.int64Data.length){i.int64Data=[];for(var d=0;d<e.int64Data.length;++d)typeof e.int64Data[d]=="number"?i.int64Data[d]=u.longs===String?String(e.int64Data[d]):e.int64Data[d]:i.int64Data[d]=u.longs===String?l.Long.prototype.toString.call(e.int64Data[d]):u.longs===Number?new l.LongBits(e.int64Data[d].low>>>0,e.int64Data[d].high>>>0).toNumber():e.int64Data[d]}if(e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.rawData!=null&&e.hasOwnProperty("rawData")&&(i.rawData=u.bytes===String?l.base64.encode(e.rawData,0,e.rawData.length):u.bytes===Array?Array.prototype.slice.call(e.rawData):e.rawData),e.doubleData&&e.doubleData.length){i.doubleData=[];for(var d=0;d<e.doubleData.length;++d)i.doubleData[d]=u.json&&!isFinite(e.doubleData[d])?String(e.doubleData[d]):e.doubleData[d]}if(e.uint64Data&&e.uint64Data.length){i.uint64Data=[];for(var d=0;d<e.uint64Data.length;++d)typeof e.uint64Data[d]=="number"?i.uint64Data[d]=u.longs===String?String(e.uint64Data[d]):e.uint64Data[d]:i.uint64Data[d]=u.longs===String?l.Long.prototype.toString.call(e.uint64Data[d]):u.longs===Number?new l.LongBits(e.uint64Data[d].low>>>0,e.uint64Data[d].high>>>0).toNumber(!0):e.uint64Data[d]}if(e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.externalData&&e.externalData.length){i.externalData=[];for(var d=0;d<e.externalData.length;++d)i.externalData[d]=c.onnx.StringStringEntryProto.toObject(e.externalData[d],u)}return e.dataLocation!=null&&e.hasOwnProperty("dataLocation")&&(i.dataLocation=u.enums===String?c.onnx.TensorProto.DataLocation[e.dataLocation]===void 0?e.dataLocation:c.onnx.TensorProto.DataLocation[e.dataLocation]:e.dataLocation),i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.TensorProto"},a.DataType=function(){var e={},u=Object.create(e);return u[e[0]="UNDEFINED"]=0,u[e[1]="FLOAT"]=1,u[e[2]="UINT8"]=2,u[e[3]="INT8"]=3,u[e[4]="UINT16"]=4,u[e[5]="INT16"]=5,u[e[6]="INT32"]=6,u[e[7]="INT64"]=7,u[e[8]="STRING"]=8,u[e[9]="BOOL"]=9,u[e[10]="FLOAT16"]=10,u[e[11]="DOUBLE"]=11,u[e[12]="UINT32"]=12,u[e[13]="UINT64"]=13,u[e[14]="COMPLEX64"]=14,u[e[15]="COMPLEX128"]=15,u[e[16]="BFLOAT16"]=16,u[e[17]="FLOAT8E4M3FN"]=17,u[e[18]="FLOAT8E4M3FNUZ"]=18,u[e[19]="FLOAT8E5M2"]=19,u[e[20]="FLOAT8E5M2FNUZ"]=20,u}(),a.Segment=function(){function e(u){if(u)for(var i=Object.keys(u),d=0;d<i.length;++d)u[i[d]]!=null&&(this[i[d]]=u[i[d]])}return e.prototype.begin=l.Long?l.Long.fromBits(0,0,!1):0,e.prototype.end=l.Long?l.Long.fromBits(0,0,!1):0,e.create=function(u){return new e(u)},e.encode=function(u,i){return i||(i=p.create()),u.begin!=null&&Object.hasOwnProperty.call(u,"begin")&&i.uint32(8).int64(u.begin),u.end!=null&&Object.hasOwnProperty.call(u,"end")&&i.uint32(16).int64(u.end),i},e.encodeDelimited=function(u,i){return this.encode(u,i).ldelim()},e.decode=function(u,i){u instanceof s||(u=s.create(u));for(var d=i===void 0?u.len:u.pos+i,h=new c.onnx.TensorProto.Segment;u.pos<d;){var m=u.uint32();switch(m>>>3){case 1:{h.begin=u.int64();break}case 2:{h.end=u.int64();break}default:u.skipType(m&7);break}}return h},e.decodeDelimited=function(u){return u instanceof s||(u=new s(u)),this.decode(u,u.uint32())},e.verify=function(u){return typeof u!="object"||u===null?"object expected":u.begin!=null&&u.hasOwnProperty("begin")&&!l.isInteger(u.begin)&&!(u.begin&&l.isInteger(u.begin.low)&&l.isInteger(u.begin.high))?"begin: integer|Long expected":u.end!=null&&u.hasOwnProperty("end")&&!l.isInteger(u.end)&&!(u.end&&l.isInteger(u.end.low)&&l.isInteger(u.end.high))?"end: integer|Long expected":null},e.fromObject=function(u){if(u instanceof c.onnx.TensorProto.Segment)return u;var i=new c.onnx.TensorProto.Segment;return u.begin!=null&&(l.Long?(i.begin=l.Long.fromValue(u.begin)).unsigned=!1:typeof u.begin=="string"?i.begin=parseInt(u.begin,10):typeof u.begin=="number"?i.begin=u.begin:typeof u.begin=="object"&&(i.begin=new l.LongBits(u.begin.low>>>0,u.begin.high>>>0).toNumber())),u.end!=null&&(l.Long?(i.end=l.Long.fromValue(u.end)).unsigned=!1:typeof u.end=="string"?i.end=parseInt(u.end,10):typeof u.end=="number"?i.end=u.end:typeof u.end=="object"&&(i.end=new l.LongBits(u.end.low>>>0,u.end.high>>>0).toNumber())),i},e.toObject=function(u,i){i||(i={});var d={};if(i.defaults){if(l.Long){var h=new l.Long(0,0,!1);d.begin=i.longs===String?h.toString():i.longs===Number?h.toNumber():h}else d.begin=i.longs===String?"0":0;if(l.Long){var h=new l.Long(0,0,!1);d.end=i.longs===String?h.toString():i.longs===Number?h.toNumber():h}else d.end=i.longs===String?"0":0}return u.begin!=null&&u.hasOwnProperty("begin")&&(typeof u.begin=="number"?d.begin=i.longs===String?String(u.begin):u.begin:d.begin=i.longs===String?l.Long.prototype.toString.call(u.begin):i.longs===Number?new l.LongBits(u.begin.low>>>0,u.begin.high>>>0).toNumber():u.begin),u.end!=null&&u.hasOwnProperty("end")&&(typeof u.end=="number"?d.end=i.longs===String?String(u.end):u.end:d.end=i.longs===String?l.Long.prototype.toString.call(u.end):i.longs===Number?new l.LongBits(u.end.low>>>0,u.end.high>>>0).toNumber():u.end),d},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/onnx.TensorProto.Segment"},e}(),a.DataLocation=function(){var e={},u=Object.create(e);return u[e[0]="DEFAULT"]=0,u[e[1]="EXTERNAL"]=1,u}(),a}(),o.SparseTensorProto=function(){function a(e){if(this.dims=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.values=null,a.prototype.indices=null,a.prototype.dims=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.values!=null&&Object.hasOwnProperty.call(e,"values")&&c.onnx.TensorProto.encode(e.values,u.uint32(10).fork()).ldelim(),e.indices!=null&&Object.hasOwnProperty.call(e,"indices")&&c.onnx.TensorProto.encode(e.indices,u.uint32(18).fork()).ldelim(),e.dims!=null&&e.dims.length){u.uint32(26).fork();for(var i=0;i<e.dims.length;++i)u.int64(e.dims[i]);u.ldelim()}return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.SparseTensorProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.values=c.onnx.TensorProto.decode(e,e.uint32());break}case 2:{d.indices=c.onnx.TensorProto.decode(e,e.uint32());break}case 3:{if(d.dims&&d.dims.length||(d.dims=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.dims.push(e.int64());else d.dims.push(e.int64());break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.values!=null&&e.hasOwnProperty("values")){var u=c.onnx.TensorProto.verify(e.values);if(u)return"values."+u}if(e.indices!=null&&e.hasOwnProperty("indices")){var u=c.onnx.TensorProto.verify(e.indices);if(u)return"indices."+u}if(e.dims!=null&&e.hasOwnProperty("dims")){if(!Array.isArray(e.dims))return"dims: array expected";for(var i=0;i<e.dims.length;++i)if(!l.isInteger(e.dims[i])&&!(e.dims[i]&&l.isInteger(e.dims[i].low)&&l.isInteger(e.dims[i].high)))return"dims: integer|Long[] expected"}return null},a.fromObject=function(e){if(e instanceof c.onnx.SparseTensorProto)return e;var u=new c.onnx.SparseTensorProto;if(e.values!=null){if(typeof e.values!="object")throw TypeError(".onnx.SparseTensorProto.values: object expected");u.values=c.onnx.TensorProto.fromObject(e.values)}if(e.indices!=null){if(typeof e.indices!="object")throw TypeError(".onnx.SparseTensorProto.indices: object expected");u.indices=c.onnx.TensorProto.fromObject(e.indices)}if(e.dims){if(!Array.isArray(e.dims))throw TypeError(".onnx.SparseTensorProto.dims: array expected");u.dims=[];for(var i=0;i<e.dims.length;++i)l.Long?(u.dims[i]=l.Long.fromValue(e.dims[i])).unsigned=!1:typeof e.dims[i]=="string"?u.dims[i]=parseInt(e.dims[i],10):typeof e.dims[i]=="number"?u.dims[i]=e.dims[i]:typeof e.dims[i]=="object"&&(u.dims[i]=new l.LongBits(e.dims[i].low>>>0,e.dims[i].high>>>0).toNumber())}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.dims=[]),u.defaults&&(i.values=null,i.indices=null),e.values!=null&&e.hasOwnProperty("values")&&(i.values=c.onnx.TensorProto.toObject(e.values,u)),e.indices!=null&&e.hasOwnProperty("indices")&&(i.indices=c.onnx.TensorProto.toObject(e.indices,u)),e.dims&&e.dims.length){i.dims=[];for(var d=0;d<e.dims.length;++d)typeof e.dims[d]=="number"?i.dims[d]=u.longs===String?String(e.dims[d]):e.dims[d]:i.dims[d]=u.longs===String?l.Long.prototype.toString.call(e.dims[d]):u.longs===Number?new l.LongBits(e.dims[d].low>>>0,e.dims[d].high>>>0).toNumber():e.dims[d]}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.SparseTensorProto"},a}(),o.TensorShapeProto=function(){function a(e){if(this.dim=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.dim=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.dim!=null&&e.dim.length)for(var i=0;i<e.dim.length;++i)c.onnx.TensorShapeProto.Dimension.encode(e.dim[i],u.uint32(10).fork()).ldelim();return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.TensorShapeProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.dim&&d.dim.length||(d.dim=[]),d.dim.push(c.onnx.TensorShapeProto.Dimension.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dim!=null&&e.hasOwnProperty("dim")){if(!Array.isArray(e.dim))return"dim: array expected";for(var u=0;u<e.dim.length;++u){var i=c.onnx.TensorShapeProto.Dimension.verify(e.dim[u]);if(i)return"dim."+i}}return null},a.fromObject=function(e){if(e instanceof c.onnx.TensorShapeProto)return e;var u=new c.onnx.TensorShapeProto;if(e.dim){if(!Array.isArray(e.dim))throw TypeError(".onnx.TensorShapeProto.dim: array expected");u.dim=[];for(var i=0;i<e.dim.length;++i){if(typeof e.dim[i]!="object")throw TypeError(".onnx.TensorShapeProto.dim: object expected");u.dim[i]=c.onnx.TensorShapeProto.Dimension.fromObject(e.dim[i])}}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.dim=[]),e.dim&&e.dim.length){i.dim=[];for(var d=0;d<e.dim.length;++d)i.dim[d]=c.onnx.TensorShapeProto.Dimension.toObject(e.dim[d],u)}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.TensorShapeProto"},a.Dimension=function(){function e(i){if(i)for(var d=Object.keys(i),h=0;h<d.length;++h)i[d[h]]!=null&&(this[d[h]]=i[d[h]])}e.prototype.dimValue=null,e.prototype.dimParam=null,e.prototype.denotation="";var u;return Object.defineProperty(e.prototype,"value",{get:l.oneOfGetter(u=["dimValue","dimParam"]),set:l.oneOfSetter(u)}),e.create=function(i){return new e(i)},e.encode=function(i,d){return d||(d=p.create()),i.dimValue!=null&&Object.hasOwnProperty.call(i,"dimValue")&&d.uint32(8).int64(i.dimValue),i.dimParam!=null&&Object.hasOwnProperty.call(i,"dimParam")&&d.uint32(18).string(i.dimParam),i.denotation!=null&&Object.hasOwnProperty.call(i,"denotation")&&d.uint32(26).string(i.denotation),d},e.encodeDelimited=function(i,d){return this.encode(i,d).ldelim()},e.decode=function(i,d){i instanceof s||(i=s.create(i));for(var h=d===void 0?i.len:i.pos+d,m=new c.onnx.TensorShapeProto.Dimension;i.pos<h;){var b=i.uint32();switch(b>>>3){case 1:{m.dimValue=i.int64();break}case 2:{m.dimParam=i.string();break}case 3:{m.denotation=i.string();break}default:i.skipType(b&7);break}}return m},e.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},e.verify=function(i){if(typeof i!="object"||i===null)return"object expected";var d={};if(i.dimValue!=null&&i.hasOwnProperty("dimValue")&&(d.value=1,!l.isInteger(i.dimValue)&&!(i.dimValue&&l.isInteger(i.dimValue.low)&&l.isInteger(i.dimValue.high))))return"dimValue: integer|Long expected";if(i.dimParam!=null&&i.hasOwnProperty("dimParam")){if(d.value===1)return"value: multiple values";if(d.value=1,!l.isString(i.dimParam))return"dimParam: string expected"}return i.denotation!=null&&i.hasOwnProperty("denotation")&&!l.isString(i.denotation)?"denotation: string expected":null},e.fromObject=function(i){if(i instanceof c.onnx.TensorShapeProto.Dimension)return i;var d=new c.onnx.TensorShapeProto.Dimension;return i.dimValue!=null&&(l.Long?(d.dimValue=l.Long.fromValue(i.dimValue)).unsigned=!1:typeof i.dimValue=="string"?d.dimValue=parseInt(i.dimValue,10):typeof i.dimValue=="number"?d.dimValue=i.dimValue:typeof i.dimValue=="object"&&(d.dimValue=new l.LongBits(i.dimValue.low>>>0,i.dimValue.high>>>0).toNumber())),i.dimParam!=null&&(d.dimParam=String(i.dimParam)),i.denotation!=null&&(d.denotation=String(i.denotation)),d},e.toObject=function(i,d){d||(d={});var h={};return d.defaults&&(h.denotation=""),i.dimValue!=null&&i.hasOwnProperty("dimValue")&&(typeof i.dimValue=="number"?h.dimValue=d.longs===String?String(i.dimValue):i.dimValue:h.dimValue=d.longs===String?l.Long.prototype.toString.call(i.dimValue):d.longs===Number?new l.LongBits(i.dimValue.low>>>0,i.dimValue.high>>>0).toNumber():i.dimValue,d.oneofs&&(h.value="dimValue")),i.dimParam!=null&&i.hasOwnProperty("dimParam")&&(h.dimParam=i.dimParam,d.oneofs&&(h.value="dimParam")),i.denotation!=null&&i.hasOwnProperty("denotation")&&(h.denotation=i.denotation),h},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/onnx.TensorShapeProto.Dimension"},e}(),a}(),o.TypeProto=function(){function a(u){if(u)for(var i=Object.keys(u),d=0;d<i.length;++d)u[i[d]]!=null&&(this[i[d]]=u[i[d]])}a.prototype.tensorType=null,a.prototype.sequenceType=null,a.prototype.mapType=null,a.prototype.optionalType=null,a.prototype.sparseTensorType=null,a.prototype.denotation="";var e;return Object.defineProperty(a.prototype,"value",{get:l.oneOfGetter(e=["tensorType","sequenceType","mapType","optionalType","sparseTensorType"]),set:l.oneOfSetter(e)}),a.create=function(u){return new a(u)},a.encode=function(u,i){return i||(i=p.create()),u.tensorType!=null&&Object.hasOwnProperty.call(u,"tensorType")&&c.onnx.TypeProto.Tensor.encode(u.tensorType,i.uint32(10).fork()).ldelim(),u.sequenceType!=null&&Object.hasOwnProperty.call(u,"sequenceType")&&c.onnx.TypeProto.Sequence.encode(u.sequenceType,i.uint32(34).fork()).ldelim(),u.mapType!=null&&Object.hasOwnProperty.call(u,"mapType")&&c.onnx.TypeProto.Map.encode(u.mapType,i.uint32(42).fork()).ldelim(),u.denotation!=null&&Object.hasOwnProperty.call(u,"denotation")&&i.uint32(50).string(u.denotation),u.sparseTensorType!=null&&Object.hasOwnProperty.call(u,"sparseTensorType")&&c.onnx.TypeProto.SparseTensor.encode(u.sparseTensorType,i.uint32(66).fork()).ldelim(),u.optionalType!=null&&Object.hasOwnProperty.call(u,"optionalType")&&c.onnx.TypeProto.Optional.encode(u.optionalType,i.uint32(74).fork()).ldelim(),i},a.encodeDelimited=function(u,i){return this.encode(u,i).ldelim()},a.decode=function(u,i){u instanceof s||(u=s.create(u));for(var d=i===void 0?u.len:u.pos+i,h=new c.onnx.TypeProto;u.pos<d;){var m=u.uint32();switch(m>>>3){case 1:{h.tensorType=c.onnx.TypeProto.Tensor.decode(u,u.uint32());break}case 4:{h.sequenceType=c.onnx.TypeProto.Sequence.decode(u,u.uint32());break}case 5:{h.mapType=c.onnx.TypeProto.Map.decode(u,u.uint32());break}case 9:{h.optionalType=c.onnx.TypeProto.Optional.decode(u,u.uint32());break}case 8:{h.sparseTensorType=c.onnx.TypeProto.SparseTensor.decode(u,u.uint32());break}case 6:{h.denotation=u.string();break}default:u.skipType(m&7);break}}return h},a.decodeDelimited=function(u){return u instanceof s||(u=new s(u)),this.decode(u,u.uint32())},a.verify=function(u){if(typeof u!="object"||u===null)return"object expected";var i={};if(u.tensorType!=null&&u.hasOwnProperty("tensorType")){i.value=1;{var d=c.onnx.TypeProto.Tensor.verify(u.tensorType);if(d)return"tensorType."+d}}if(u.sequenceType!=null&&u.hasOwnProperty("sequenceType")){if(i.value===1)return"value: multiple values";i.value=1;{var d=c.onnx.TypeProto.Sequence.verify(u.sequenceType);if(d)return"sequenceType."+d}}if(u.mapType!=null&&u.hasOwnProperty("mapType")){if(i.value===1)return"value: multiple values";i.value=1;{var d=c.onnx.TypeProto.Map.verify(u.mapType);if(d)return"mapType."+d}}if(u.optionalType!=null&&u.hasOwnProperty("optionalType")){if(i.value===1)return"value: multiple values";i.value=1;{var d=c.onnx.TypeProto.Optional.verify(u.optionalType);if(d)return"optionalType."+d}}if(u.sparseTensorType!=null&&u.hasOwnProperty("sparseTensorType")){if(i.value===1)return"value: multiple values";i.value=1;{var d=c.onnx.TypeProto.SparseTensor.verify(u.sparseTensorType);if(d)return"sparseTensorType."+d}}return u.denotation!=null&&u.hasOwnProperty("denotation")&&!l.isString(u.denotation)?"denotation: string expected":null},a.fromObject=function(u){if(u instanceof c.onnx.TypeProto)return u;var i=new c.onnx.TypeProto;if(u.tensorType!=null){if(typeof u.tensorType!="object")throw TypeError(".onnx.TypeProto.tensorType: object expected");i.tensorType=c.onnx.TypeProto.Tensor.fromObject(u.tensorType)}if(u.sequenceType!=null){if(typeof u.sequenceType!="object")throw TypeError(".onnx.TypeProto.sequenceType: object expected");i.sequenceType=c.onnx.TypeProto.Sequence.fromObject(u.sequenceType)}if(u.mapType!=null){if(typeof u.mapType!="object")throw TypeError(".onnx.TypeProto.mapType: object expected");i.mapType=c.onnx.TypeProto.Map.fromObject(u.mapType)}if(u.optionalType!=null){if(typeof u.optionalType!="object")throw TypeError(".onnx.TypeProto.optionalType: object expected");i.optionalType=c.onnx.TypeProto.Optional.fromObject(u.optionalType)}if(u.sparseTensorType!=null){if(typeof u.sparseTensorType!="object")throw TypeError(".onnx.TypeProto.sparseTensorType: object expected");i.sparseTensorType=c.onnx.TypeProto.SparseTensor.fromObject(u.sparseTensorType)}return u.denotation!=null&&(i.denotation=String(u.denotation)),i},a.toObject=function(u,i){i||(i={});var d={};return i.defaults&&(d.denotation=""),u.tensorType!=null&&u.hasOwnProperty("tensorType")&&(d.tensorType=c.onnx.TypeProto.Tensor.toObject(u.tensorType,i),i.oneofs&&(d.value="tensorType")),u.sequenceType!=null&&u.hasOwnProperty("sequenceType")&&(d.sequenceType=c.onnx.TypeProto.Sequence.toObject(u.sequenceType,i),i.oneofs&&(d.value="sequenceType")),u.mapType!=null&&u.hasOwnProperty("mapType")&&(d.mapType=c.onnx.TypeProto.Map.toObject(u.mapType,i),i.oneofs&&(d.value="mapType")),u.denotation!=null&&u.hasOwnProperty("denotation")&&(d.denotation=u.denotation),u.sparseTensorType!=null&&u.hasOwnProperty("sparseTensorType")&&(d.sparseTensorType=c.onnx.TypeProto.SparseTensor.toObject(u.sparseTensorType,i),i.oneofs&&(d.value="sparseTensorType")),u.optionalType!=null&&u.hasOwnProperty("optionalType")&&(d.optionalType=c.onnx.TypeProto.Optional.toObject(u.optionalType,i),i.oneofs&&(d.value="optionalType")),d},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/onnx.TypeProto"},a.Tensor=function(){function u(i){if(i)for(var d=Object.keys(i),h=0;h<d.length;++h)i[d[h]]!=null&&(this[d[h]]=i[d[h]])}return u.prototype.elemType=0,u.prototype.shape=null,u.create=function(i){return new u(i)},u.encode=function(i,d){return d||(d=p.create()),i.elemType!=null&&Object.hasOwnProperty.call(i,"elemType")&&d.uint32(8).int32(i.elemType),i.shape!=null&&Object.hasOwnProperty.call(i,"shape")&&c.onnx.TensorShapeProto.encode(i.shape,d.uint32(18).fork()).ldelim(),d},u.encodeDelimited=function(i,d){return this.encode(i,d).ldelim()},u.decode=function(i,d){i instanceof s||(i=s.create(i));for(var h=d===void 0?i.len:i.pos+d,m=new c.onnx.TypeProto.Tensor;i.pos<h;){var b=i.uint32();switch(b>>>3){case 1:{m.elemType=i.int32();break}case 2:{m.shape=c.onnx.TensorShapeProto.decode(i,i.uint32());break}default:i.skipType(b&7);break}}return m},u.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},u.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.elemType!=null&&i.hasOwnProperty("elemType")&&!l.isInteger(i.elemType))return"elemType: integer expected";if(i.shape!=null&&i.hasOwnProperty("shape")){var d=c.onnx.TensorShapeProto.verify(i.shape);if(d)return"shape."+d}return null},u.fromObject=function(i){if(i instanceof c.onnx.TypeProto.Tensor)return i;var d=new c.onnx.TypeProto.Tensor;if(i.elemType!=null&&(d.elemType=i.elemType|0),i.shape!=null){if(typeof i.shape!="object")throw TypeError(".onnx.TypeProto.Tensor.shape: object expected");d.shape=c.onnx.TensorShapeProto.fromObject(i.shape)}return d},u.toObject=function(i,d){d||(d={});var h={};return d.defaults&&(h.elemType=0,h.shape=null),i.elemType!=null&&i.hasOwnProperty("elemType")&&(h.elemType=i.elemType),i.shape!=null&&i.hasOwnProperty("shape")&&(h.shape=c.onnx.TensorShapeProto.toObject(i.shape,d)),h},u.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},u.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/onnx.TypeProto.Tensor"},u}(),a.Sequence=function(){function u(i){if(i)for(var d=Object.keys(i),h=0;h<d.length;++h)i[d[h]]!=null&&(this[d[h]]=i[d[h]])}return u.prototype.elemType=null,u.create=function(i){return new u(i)},u.encode=function(i,d){return d||(d=p.create()),i.elemType!=null&&Object.hasOwnProperty.call(i,"elemType")&&c.onnx.TypeProto.encode(i.elemType,d.uint32(10).fork()).ldelim(),d},u.encodeDelimited=function(i,d){return this.encode(i,d).ldelim()},u.decode=function(i,d){i instanceof s||(i=s.create(i));for(var h=d===void 0?i.len:i.pos+d,m=new c.onnx.TypeProto.Sequence;i.pos<h;){var b=i.uint32();switch(b>>>3){case 1:{m.elemType=c.onnx.TypeProto.decode(i,i.uint32());break}default:i.skipType(b&7);break}}return m},u.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},u.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.elemType!=null&&i.hasOwnProperty("elemType")){var d=c.onnx.TypeProto.verify(i.elemType);if(d)return"elemType."+d}return null},u.fromObject=function(i){if(i instanceof c.onnx.TypeProto.Sequence)return i;var d=new c.onnx.TypeProto.Sequence;if(i.elemType!=null){if(typeof i.elemType!="object")throw TypeError(".onnx.TypeProto.Sequence.elemType: object expected");d.elemType=c.onnx.TypeProto.fromObject(i.elemType)}return d},u.toObject=function(i,d){d||(d={});var h={};return d.defaults&&(h.elemType=null),i.elemType!=null&&i.hasOwnProperty("elemType")&&(h.elemType=c.onnx.TypeProto.toObject(i.elemType,d)),h},u.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},u.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/onnx.TypeProto.Sequence"},u}(),a.Map=function(){function u(i){if(i)for(var d=Object.keys(i),h=0;h<d.length;++h)i[d[h]]!=null&&(this[d[h]]=i[d[h]])}return u.prototype.keyType=0,u.prototype.valueType=null,u.create=function(i){return new u(i)},u.encode=function(i,d){return d||(d=p.create()),i.keyType!=null&&Object.hasOwnProperty.call(i,"keyType")&&d.uint32(8).int32(i.keyType),i.valueType!=null&&Object.hasOwnProperty.call(i,"valueType")&&c.onnx.TypeProto.encode(i.valueType,d.uint32(18).fork()).ldelim(),d},u.encodeDelimited=function(i,d){return this.encode(i,d).ldelim()},u.decode=function(i,d){i instanceof s||(i=s.create(i));for(var h=d===void 0?i.len:i.pos+d,m=new c.onnx.TypeProto.Map;i.pos<h;){var b=i.uint32();switch(b>>>3){case 1:{m.keyType=i.int32();break}case 2:{m.valueType=c.onnx.TypeProto.decode(i,i.uint32());break}default:i.skipType(b&7);break}}return m},u.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},u.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.keyType!=null&&i.hasOwnProperty("keyType")&&!l.isInteger(i.keyType))return"keyType: integer expected";if(i.valueType!=null&&i.hasOwnProperty("valueType")){var d=c.onnx.TypeProto.verify(i.valueType);if(d)return"valueType."+d}return null},u.fromObject=function(i){if(i instanceof c.onnx.TypeProto.Map)return i;var d=new c.onnx.TypeProto.Map;if(i.keyType!=null&&(d.keyType=i.keyType|0),i.valueType!=null){if(typeof i.valueType!="object")throw TypeError(".onnx.TypeProto.Map.valueType: object expected");d.valueType=c.onnx.TypeProto.fromObject(i.valueType)}return d},u.toObject=function(i,d){d||(d={});var h={};return d.defaults&&(h.keyType=0,h.valueType=null),i.keyType!=null&&i.hasOwnProperty("keyType")&&(h.keyType=i.keyType),i.valueType!=null&&i.hasOwnProperty("valueType")&&(h.valueType=c.onnx.TypeProto.toObject(i.valueType,d)),h},u.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},u.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/onnx.TypeProto.Map"},u}(),a.Optional=function(){function u(i){if(i)for(var d=Object.keys(i),h=0;h<d.length;++h)i[d[h]]!=null&&(this[d[h]]=i[d[h]])}return u.prototype.elemType=null,u.create=function(i){return new u(i)},u.encode=function(i,d){return d||(d=p.create()),i.elemType!=null&&Object.hasOwnProperty.call(i,"elemType")&&c.onnx.TypeProto.encode(i.elemType,d.uint32(10).fork()).ldelim(),d},u.encodeDelimited=function(i,d){return this.encode(i,d).ldelim()},u.decode=function(i,d){i instanceof s||(i=s.create(i));for(var h=d===void 0?i.len:i.pos+d,m=new c.onnx.TypeProto.Optional;i.pos<h;){var b=i.uint32();switch(b>>>3){case 1:{m.elemType=c.onnx.TypeProto.decode(i,i.uint32());break}default:i.skipType(b&7);break}}return m},u.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},u.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.elemType!=null&&i.hasOwnProperty("elemType")){var d=c.onnx.TypeProto.verify(i.elemType);if(d)return"elemType."+d}return null},u.fromObject=function(i){if(i instanceof c.onnx.TypeProto.Optional)return i;var d=new c.onnx.TypeProto.Optional;if(i.elemType!=null){if(typeof i.elemType!="object")throw TypeError(".onnx.TypeProto.Optional.elemType: object expected");d.elemType=c.onnx.TypeProto.fromObject(i.elemType)}return d},u.toObject=function(i,d){d||(d={});var h={};return d.defaults&&(h.elemType=null),i.elemType!=null&&i.hasOwnProperty("elemType")&&(h.elemType=c.onnx.TypeProto.toObject(i.elemType,d)),h},u.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},u.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/onnx.TypeProto.Optional"},u}(),a.SparseTensor=function(){function u(i){if(i)for(var d=Object.keys(i),h=0;h<d.length;++h)i[d[h]]!=null&&(this[d[h]]=i[d[h]])}return u.prototype.elemType=0,u.prototype.shape=null,u.create=function(i){return new u(i)},u.encode=function(i,d){return d||(d=p.create()),i.elemType!=null&&Object.hasOwnProperty.call(i,"elemType")&&d.uint32(8).int32(i.elemType),i.shape!=null&&Object.hasOwnProperty.call(i,"shape")&&c.onnx.TensorShapeProto.encode(i.shape,d.uint32(18).fork()).ldelim(),d},u.encodeDelimited=function(i,d){return this.encode(i,d).ldelim()},u.decode=function(i,d){i instanceof s||(i=s.create(i));for(var h=d===void 0?i.len:i.pos+d,m=new c.onnx.TypeProto.SparseTensor;i.pos<h;){var b=i.uint32();switch(b>>>3){case 1:{m.elemType=i.int32();break}case 2:{m.shape=c.onnx.TensorShapeProto.decode(i,i.uint32());break}default:i.skipType(b&7);break}}return m},u.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},u.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.elemType!=null&&i.hasOwnProperty("elemType")&&!l.isInteger(i.elemType))return"elemType: integer expected";if(i.shape!=null&&i.hasOwnProperty("shape")){var d=c.onnx.TensorShapeProto.verify(i.shape);if(d)return"shape."+d}return null},u.fromObject=function(i){if(i instanceof c.onnx.TypeProto.SparseTensor)return i;var d=new c.onnx.TypeProto.SparseTensor;if(i.elemType!=null&&(d.elemType=i.elemType|0),i.shape!=null){if(typeof i.shape!="object")throw TypeError(".onnx.TypeProto.SparseTensor.shape: object expected");d.shape=c.onnx.TensorShapeProto.fromObject(i.shape)}return d},u.toObject=function(i,d){d||(d={});var h={};return d.defaults&&(h.elemType=0,h.shape=null),i.elemType!=null&&i.hasOwnProperty("elemType")&&(h.elemType=i.elemType),i.shape!=null&&i.hasOwnProperty("shape")&&(h.shape=c.onnx.TensorShapeProto.toObject(i.shape,d)),h},u.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},u.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/onnx.TypeProto.SparseTensor"},u}(),a}(),o.OperatorSetIdProto=function(){function a(e){if(e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.domain="",a.prototype.version=l.Long?l.Long.fromBits(0,0,!1):0,a.create=function(e){return new a(e)},a.encode=function(e,u){return u||(u=p.create()),e.domain!=null&&Object.hasOwnProperty.call(e,"domain")&&u.uint32(10).string(e.domain),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&u.uint32(16).int64(e.version),u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.OperatorSetIdProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.domain=e.string();break}case 2:{d.version=e.int64();break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.domain!=null&&e.hasOwnProperty("domain")&&!l.isString(e.domain)?"domain: string expected":e.version!=null&&e.hasOwnProperty("version")&&!l.isInteger(e.version)&&!(e.version&&l.isInteger(e.version.low)&&l.isInteger(e.version.high))?"version: integer|Long expected":null},a.fromObject=function(e){if(e instanceof c.onnx.OperatorSetIdProto)return e;var u=new c.onnx.OperatorSetIdProto;return e.domain!=null&&(u.domain=String(e.domain)),e.version!=null&&(l.Long?(u.version=l.Long.fromValue(e.version)).unsigned=!1:typeof e.version=="string"?u.version=parseInt(e.version,10):typeof e.version=="number"?u.version=e.version:typeof e.version=="object"&&(u.version=new l.LongBits(e.version.low>>>0,e.version.high>>>0).toNumber())),u},a.toObject=function(e,u){u||(u={});var i={};if(u.defaults)if(i.domain="",l.Long){var d=new l.Long(0,0,!1);i.version=u.longs===String?d.toString():u.longs===Number?d.toNumber():d}else i.version=u.longs===String?"0":0;return e.domain!=null&&e.hasOwnProperty("domain")&&(i.domain=e.domain),e.version!=null&&e.hasOwnProperty("version")&&(typeof e.version=="number"?i.version=u.longs===String?String(e.version):e.version:i.version=u.longs===String?l.Long.prototype.toString.call(e.version):u.longs===Number?new l.LongBits(e.version.low>>>0,e.version.high>>>0).toNumber():e.version),i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.OperatorSetIdProto"},a}(),o.OperatorStatus=function(){var a={},e=Object.create(a);return e[a[0]="EXPERIMENTAL"]=0,e[a[1]="STABLE"]=1,e}(),o.FunctionProto=function(){function a(e){if(this.input=[],this.output=[],this.attribute=[],this.attributeProto=[],this.node=[],this.opsetImport=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.name="",a.prototype.input=l.emptyArray,a.prototype.output=l.emptyArray,a.prototype.attribute=l.emptyArray,a.prototype.attributeProto=l.emptyArray,a.prototype.node=l.emptyArray,a.prototype.docString="",a.prototype.opsetImport=l.emptyArray,a.prototype.domain="",a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&u.uint32(10).string(e.name),e.input!=null&&e.input.length)for(var i=0;i<e.input.length;++i)u.uint32(34).string(e.input[i]);if(e.output!=null&&e.output.length)for(var i=0;i<e.output.length;++i)u.uint32(42).string(e.output[i]);if(e.attribute!=null&&e.attribute.length)for(var i=0;i<e.attribute.length;++i)u.uint32(50).string(e.attribute[i]);if(e.node!=null&&e.node.length)for(var i=0;i<e.node.length;++i)c.onnx.NodeProto.encode(e.node[i],u.uint32(58).fork()).ldelim();if(e.docString!=null&&Object.hasOwnProperty.call(e,"docString")&&u.uint32(66).string(e.docString),e.opsetImport!=null&&e.opsetImport.length)for(var i=0;i<e.opsetImport.length;++i)c.onnx.OperatorSetIdProto.encode(e.opsetImport[i],u.uint32(74).fork()).ldelim();if(e.domain!=null&&Object.hasOwnProperty.call(e,"domain")&&u.uint32(82).string(e.domain),e.attributeProto!=null&&e.attributeProto.length)for(var i=0;i<e.attributeProto.length;++i)c.onnx.AttributeProto.encode(e.attributeProto[i],u.uint32(90).fork()).ldelim();return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.FunctionProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.name=e.string();break}case 4:{d.input&&d.input.length||(d.input=[]),d.input.push(e.string());break}case 5:{d.output&&d.output.length||(d.output=[]),d.output.push(e.string());break}case 6:{d.attribute&&d.attribute.length||(d.attribute=[]),d.attribute.push(e.string());break}case 11:{d.attributeProto&&d.attributeProto.length||(d.attributeProto=[]),d.attributeProto.push(c.onnx.AttributeProto.decode(e,e.uint32()));break}case 7:{d.node&&d.node.length||(d.node=[]),d.node.push(c.onnx.NodeProto.decode(e,e.uint32()));break}case 8:{d.docString=e.string();break}case 9:{d.opsetImport&&d.opsetImport.length||(d.opsetImport=[]),d.opsetImport.push(c.onnx.OperatorSetIdProto.decode(e,e.uint32()));break}case 10:{d.domain=e.string();break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.name!=null&&e.hasOwnProperty("name")&&!l.isString(e.name))return"name: string expected";if(e.input!=null&&e.hasOwnProperty("input")){if(!Array.isArray(e.input))return"input: array expected";for(var u=0;u<e.input.length;++u)if(!l.isString(e.input[u]))return"input: string[] expected"}if(e.output!=null&&e.hasOwnProperty("output")){if(!Array.isArray(e.output))return"output: array expected";for(var u=0;u<e.output.length;++u)if(!l.isString(e.output[u]))return"output: string[] expected"}if(e.attribute!=null&&e.hasOwnProperty("attribute")){if(!Array.isArray(e.attribute))return"attribute: array expected";for(var u=0;u<e.attribute.length;++u)if(!l.isString(e.attribute[u]))return"attribute: string[] expected"}if(e.attributeProto!=null&&e.hasOwnProperty("attributeProto")){if(!Array.isArray(e.attributeProto))return"attributeProto: array expected";for(var u=0;u<e.attributeProto.length;++u){var i=c.onnx.AttributeProto.verify(e.attributeProto[u]);if(i)return"attributeProto."+i}}if(e.node!=null&&e.hasOwnProperty("node")){if(!Array.isArray(e.node))return"node: array expected";for(var u=0;u<e.node.length;++u){var i=c.onnx.NodeProto.verify(e.node[u]);if(i)return"node."+i}}if(e.docString!=null&&e.hasOwnProperty("docString")&&!l.isString(e.docString))return"docString: string expected";if(e.opsetImport!=null&&e.hasOwnProperty("opsetImport")){if(!Array.isArray(e.opsetImport))return"opsetImport: array expected";for(var u=0;u<e.opsetImport.length;++u){var i=c.onnx.OperatorSetIdProto.verify(e.opsetImport[u]);if(i)return"opsetImport."+i}}return e.domain!=null&&e.hasOwnProperty("domain")&&!l.isString(e.domain)?"domain: string expected":null},a.fromObject=function(e){if(e instanceof c.onnx.FunctionProto)return e;var u=new c.onnx.FunctionProto;if(e.name!=null&&(u.name=String(e.name)),e.input){if(!Array.isArray(e.input))throw TypeError(".onnx.FunctionProto.input: array expected");u.input=[];for(var i=0;i<e.input.length;++i)u.input[i]=String(e.input[i])}if(e.output){if(!Array.isArray(e.output))throw TypeError(".onnx.FunctionProto.output: array expected");u.output=[];for(var i=0;i<e.output.length;++i)u.output[i]=String(e.output[i])}if(e.attribute){if(!Array.isArray(e.attribute))throw TypeError(".onnx.FunctionProto.attribute: array expected");u.attribute=[];for(var i=0;i<e.attribute.length;++i)u.attribute[i]=String(e.attribute[i])}if(e.attributeProto){if(!Array.isArray(e.attributeProto))throw TypeError(".onnx.FunctionProto.attributeProto: array expected");u.attributeProto=[];for(var i=0;i<e.attributeProto.length;++i){if(typeof e.attributeProto[i]!="object")throw TypeError(".onnx.FunctionProto.attributeProto: object expected");u.attributeProto[i]=c.onnx.AttributeProto.fromObject(e.attributeProto[i])}}if(e.node){if(!Array.isArray(e.node))throw TypeError(".onnx.FunctionProto.node: array expected");u.node=[];for(var i=0;i<e.node.length;++i){if(typeof e.node[i]!="object")throw TypeError(".onnx.FunctionProto.node: object expected");u.node[i]=c.onnx.NodeProto.fromObject(e.node[i])}}if(e.docString!=null&&(u.docString=String(e.docString)),e.opsetImport){if(!Array.isArray(e.opsetImport))throw TypeError(".onnx.FunctionProto.opsetImport: array expected");u.opsetImport=[];for(var i=0;i<e.opsetImport.length;++i){if(typeof e.opsetImport[i]!="object")throw TypeError(".onnx.FunctionProto.opsetImport: object expected");u.opsetImport[i]=c.onnx.OperatorSetIdProto.fromObject(e.opsetImport[i])}}return e.domain!=null&&(u.domain=String(e.domain)),u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.input=[],i.output=[],i.attribute=[],i.node=[],i.opsetImport=[],i.attributeProto=[]),u.defaults&&(i.name="",i.docString="",i.domain=""),e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.input&&e.input.length){i.input=[];for(var d=0;d<e.input.length;++d)i.input[d]=e.input[d]}if(e.output&&e.output.length){i.output=[];for(var d=0;d<e.output.length;++d)i.output[d]=e.output[d]}if(e.attribute&&e.attribute.length){i.attribute=[];for(var d=0;d<e.attribute.length;++d)i.attribute[d]=e.attribute[d]}if(e.node&&e.node.length){i.node=[];for(var d=0;d<e.node.length;++d)i.node[d]=c.onnx.NodeProto.toObject(e.node[d],u)}if(e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.opsetImport&&e.opsetImport.length){i.opsetImport=[];for(var d=0;d<e.opsetImport.length;++d)i.opsetImport[d]=c.onnx.OperatorSetIdProto.toObject(e.opsetImport[d],u)}if(e.domain!=null&&e.hasOwnProperty("domain")&&(i.domain=e.domain),e.attributeProto&&e.attributeProto.length){i.attributeProto=[];for(var d=0;d<e.attributeProto.length;++d)i.attributeProto[d]=c.onnx.AttributeProto.toObject(e.attributeProto[d],u)}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.FunctionProto"},a}(),o}(),r.exports=c});function Ur(t,r){if(!t)throw new Error(typeof r=="string"?r:r())}function co(t){return new TextDecoder().decode(t)}var q,Qe,ya,Mt,bl,Et,Vt,C,ho,Gr,dr,hr,U=I(()=>{"use strict";Ho(),fl(),q=Ie(mr()),De(),Qe=class{static arraysEqual(t,r){if(t.length!==r.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==r[n])return!1;return!0}},ya=class{static preprocessInputShapes(t,r){let n=t.length===1?[1,t[0]]:t,s=r.length===1?[r[0],1]:r;return[n,s]}static postprocessOutputShape(t,r,n){r===1&&t.splice(t.length-2,1),n===1&&t.pop()}static calcMatMulShape(t,r){return t[1]!==r[0]?void 0:[t[0],r[1]]}},Mt=class tr{static calcShape(r,n,s=!1){let p=r.length,l=n.length;if(p===0)return n;if(l===0)return r;let c=Math.max(r.length,n.length),o=new Array(c);if(s){if(p<2||l<2)return;let a=ya.calcMatMulShape([r[p-2],r[p-1]],[n[l-2],n[l-1]]);if(a===void 0)return;[o[c-2],o[c-1]]=a}for(let a=s?3:1;a<=c;a++){let e=p-a<0?1:r[p-a],u=l-a<0?1:n[l-a];if(e!==u&&e>1&&u>1)return;o[c-a]=Math.max(e,u)}return o}static index(r,n){let s=new Array(n.length);return tr.fillIndex(r,n,s),s}static fillIndex(r,n,s){let p=r.length-n.length;for(let l=0;l<n.length;l++)s[l]=r[p+l]%n[l]}static calc(r,n,s,p,l){let c=tr.calcShape(r.dims,n.dims);if(c){if(p&&!C.areEqual(c,r.dims))return;let o=C.size(c),a=p?r:new Pt(c,l||r.type);if(c.length===0)a.set([],s(r.get([]),n.get([])));else{let e=new Array(c.length),u=new Array(r.dims.length),i=new Array(n.dims.length),d=0,h=0,m=!1,b=!1;r.dims.length===0&&(d=r.get([]),m=!0),n.dims.length===0&&(h=n.get([]),b=!0);let x;for(let E=0;E<o;E++){x=E;for(let w=c.length-1;w>=0;w--)e[w]=x%c[w],x=Math.floor(x/c[w]);m||(tr.fillIndex(e,r.dims,u),d=r.get(u)),b||(tr.fillIndex(e,n.dims,i),h=n.get(i)),a.set(e,s(d,h))}}return a}}static isValidBroadcast(r,n){let s=r.length,p=n.length;if(s>p)return!1;for(let l=1;l<=s;l++)if(r[s-l]!==1&&r[s-l]!==n[p-l])return!1;return!0}static getBroadcastDims(r,n){let s=r.length,p=[];for(let l=0;l<s;l++){let c=s-1-l,o=r[c]||1;(n[n.length-1-l]||1)>1&&o===1&&p.unshift(c)}return p}},bl=class{static getShapeOfGemmResult(t,r,n,s,p){if(t.length!==2||n.length!==2)throw new Error("shape need to be of size 2");let l,c,o;r?(l=t[1],c=t[0]):(l=t[0],c=t[1]);let a=-1;if(s?(o=n[0],a=1):(o=n[1],a=0),n[a]!==c)throw new Error("dimension mismatch");if(l<=0||o<=0||c<=0)throw new Error("invalid shape specified");if(p&&!Mt.isValidBroadcast(p,[l,o]))throw new Error("gemm: invalid bias shape for broadcast");return[l,o,c]}},Et=class fo{static tensorDataTypeFromProto(r){switch(r){case q.onnx.TensorProto.DataType.INT8:return"int8";case q.onnx.TensorProto.DataType.UINT8:return"uint8";case q.onnx.TensorProto.DataType.BOOL:return"bool";case q.onnx.TensorProto.DataType.INT16:return"int16";case q.onnx.TensorProto.DataType.UINT16:return"uint16";case q.onnx.TensorProto.DataType.INT32:return"int32";case q.onnx.TensorProto.DataType.UINT32:return"uint32";case q.onnx.TensorProto.DataType.FLOAT:return"float32";case q.onnx.TensorProto.DataType.DOUBLE:return"float64";case q.onnx.TensorProto.DataType.STRING:return"string";case q.onnx.TensorProto.DataType.INT64:return"int32";case q.onnx.TensorProto.DataType.UINT64:return"uint32";default:throw new Error(`unsupported data type: ${q.onnx.TensorProto.DataType[r]}`)}}static tensorDataTypeStringToEnum(r){switch(r){case"int8":return q.onnx.TensorProto.DataType.INT8;case"uint8":return q.onnx.TensorProto.DataType.UINT8;case"bool":return q.onnx.TensorProto.DataType.BOOL;case"int16":return q.onnx.TensorProto.DataType.INT16;case"uint16":return q.onnx.TensorProto.DataType.UINT16;case"int32":return q.onnx.TensorProto.DataType.INT32;case"uint32":return q.onnx.TensorProto.DataType.UINT32;case"float32":return q.onnx.TensorProto.DataType.FLOAT;case"float64":return q.onnx.TensorProto.DataType.DOUBLE;case"string":return q.onnx.TensorProto.DataType.STRING;case"int64":return q.onnx.TensorProto.DataType.INT64;case"uint64":return q.onnx.TensorProto.DataType.UINT64;default:throw new Error(`unsupported data type: ${r}`)}}static tensorDimsFromProto(r){return r.map(n=>ee.isLong(n)?n.toNumber():n)}static tensorValueTypeFromProto(r){return{tensorType:fo.tensorDataTypeFromProto(r.elemType),shape:{dims:fo.tensorDimsFromProto(r.shape.dim.map(n=>n.dimValue))}}}static tensorDimsFromORTFormat(r){let n=[];for(let s=0;s<r.dimsLength();s++)n.push(Vt.longToNumber(r.dims(s)));return n}static tensorAttributesFromORTFormat(r){let n=[];for(let s=0;s<r.attributesLength();s++)n.push(r.attributes(s));return n}},Vt=class{static longToNumber(t,r){return ee.isLong(t)?t.toNumber():t instanceof T.Long?ee.fromValue({low:t.low,high:t.high,unsigned:r??!1}).toNumber():t}static isLong(t){return ee.isLong(t)||t instanceof T.Long}},C=class Qt{static size(r){return Qt.getSizeFromDimensionRange(r,0,r.length)}static sizeFromDimension(r,n){if(n<0||n>r.length)throw new Error(`invalid dimension of ${n} for sizeFromDimension as Tensor has ${r.length} dimensions.`);return Qt.getSizeFromDimensionRange(r,n,r.length)}static sizeToDimension(r,n){if(n<0||n>r.length)throw new Error(`invalid dimension of ${n} for sizeToDimension as Tensor has ${r.length} dimensions.`);return Qt.getSizeFromDimensionRange(r,0,n)}static getSizeFromDimensionRange(r,n,s){let p=1;for(let l=n;l<s;l++){if(r[l]<=0)throw new Error("cannot get valid size from specified dimension range. Most likely the range contains 0 or negative values in them.");p*=r[l]}return p}static computeStrides(r){let n=r.length;if(n===0)return[];if(n===1)return[1];let s=new Array(n);s[n-1]=1,s[n-2]=r[n-1];for(let p=n-3;p>=0;--p)s[p]=s[p+1]*r[p+1];return s}static transpose(r){return r.slice().reverse()}static indicesToOffset(r,n,s){s===void 0&&(s=r.length);let p=0;for(let l=0;l<s;++l)p+=n[l]*r[l];return p}static offsetToIndices(r,n){let s=n.length;if(s===0)return[];if(s===1)return[r*n[0]];let p=new Array(n.length);for(let l=0;l<p.length-1;++l)p[l]=Math.floor(r/n[l]),r-=p[l]*n[l];return p[p.length-1]=r,p}static normalizeAxis(r,n){if(r<-n&&r>=n)throw new Error("unsupported axis for this operation.");return r<0?r+n:r}static normalizeAxes(r,n){return r.map(s=>this.normalizeAxis(s,n))}static incrementIndex(r,n,s){if(n.length===0||r.length===0)throw new Error("Index incrementing unsupported for scalar Tensor");if(s===void 0)s=n.length;else if(s<=0||s>n.length)throw new Error("Incorrect axis to increment on");for(let p=s-1;p>=0&&(r[p]++,!(r[p]<n[p]));--p)r[p]=0}static calculateReshapedDims(r,n){if(n.length===0){if(r.length===0||Qt.size(r)===1)return[];throw new Error("cannot reshape to a scalar Tensor")}let s=n.length,p=new Array(s),l=-1,c=1;for(let a=0;a<s;a++){if(n[a]<-1)throw new Error("a dimension in shape hints cannot be less than -1");if(n[a]===-1){if(l!==-1)throw new Error("at most one dimension in shape hints can be -1");l=a}else{if(n[a]===0){if(a>=r.length)throw new Error("the dimension with value zero exceeds the dimension size of the input tensor");p[a]=r[a]}else p[a]=n[a];c*=p[a]}}let o=Qt.size(r);if(l!==-1){if(o%c!==0)throw new Error(`the input tensor cannot be reshaped to the requested shape. Input shape: [${r}] Output shape: [${n}]`);p[l]=o/c}else if(c!==o)throw new Error("reshapedDims and originalDims don't have matching sizes");return p}static sortBasedOnPerm(r,n){return n?n.map(s=>r[s]):r.slice().reverse()}static padShape(r,n){let s=r.length;return r.map((p,l)=>p+n[l]+n[l+s])}static areEqual(r,n){return r.length!==n.length?!1:r.every((s,p)=>s===n[p])}static validateDimsAndCalcSize(r){if(r.length>6)throw new TypeError("Only rank 0 to 6 is supported for tensor shape.");let n=1;for(let s of r){if(!Number.isInteger(s))throw new TypeError(`Invalid shape: ${s} is not an integer`);if(s<0||s>2147483647)throw new TypeError(`Invalid shape: length ${s} is not allowed`);n*=s}return n}static flattenShape(r,n){n<0&&(n+=r.length);let s=r.reduce((l,c)=>l*c,1),p=r.slice(n).reduce((l,c)=>l*c,1);return[s/p,p]}static squeezeShape(r,n){let s=new Array;n=Qt.normalizeAxes(n,r.length);for(let p=0;p<r.length;p++){let l=n.indexOf(p)>=0;if(l&&r[p]!==1)throw new Error("squeeze an axis of size different than 1");(n.length===0&&r[p]>1||n.length>0&&!l)&&s.push(r[p])}return s}static unsqueezeShape(r,n){let s=new Array(r.length+n.length);s.fill(0);for(let l=0;l<n.length;l++){let c=Qt.normalizeAxis(n[l],s.length);if(c>=s.length)throw new Error("'axes' has an out of range axis");if(s[c]!==0)throw new Error("'axes' has a duplicate axis");s[c]=1}let p=0;for(let l=0;l<s.length;l++)s[l]===0&&(s[l]=r[p++]);if(p!==r.length)throw new Error("the unsqueezed dimension could not be established");return s}},ho=class yl{static splitShape(r,n,s,p){if(s.length===0){if(!p)throw new Error("need to know number of outputs when the 'split' attribute is not specified");yl.determineSplit(r[n],p,s)}let l=[],c=[0];for(let o=0;o<s.length;++o){o!==0&&c.push(c[o-1]+s[o-1]);let a=r.slice();a[n]=s[o],l.push(a)}return[l,c]}static determineSplit(r,n,s){if(r%n!==0)throw new Error("cannot split tensor to equal sized parts");for(let p=0;p<n;++p)s.push(r/n)}},Gr=class er{static adjustPoolAttributes(r,n,s,p,l,c){if(!r&&s.length!==n.length-2)throw new Error("length of specified kernel shapes should be 2 less than length of input dimensions");if(r)for(let o=0;o<n.length-2;o++)o>=s.length?s.push(n[o+2]):s[o]=n[o+2];for(let o=0;o<s.length;o++)if(o<p.length){if(p[o]<0)throw new Error("strides should be greater than or equal to 1")}else p.push(1);for(let o=0;o<s.length;o++)if(o<l.length){if(l[o]<0)throw new Error("dilations should be greater than or equal to 1")}else l.push(1);for(let o=0;o<s.length*2;o++)if(o<c.length){if(c[o]<0)throw new Error("pad should be greater than or equal to 1")}else c.push(0);for(let o=0;o<s.length;o++){if(s[o]<=0)throw new Error("kernel shapes need to be greater than 0");if(c[o]>=s[o]||c[o+s.length]>=s[o])throw new Error("pads should be smaller than kernel")}}static adjustPadsBasedOnAutoPad(r,n,s,p,l,c){if(c){if(l.length!==2*(r.length-2))throw new Error("length of pads should be twice the length of data dimensions");if(n.length!==r.length-2)throw new Error("length of strides should be the length of data dimensions");if(p.length!==r.length-2)throw new Error("length of kernel shapes should be the length of data dimensions");for(let o=0;o<r.length-2;o++)er.adjustPadAndReturnShape(r[o+2],n[o],s[o],p[o],l,o,o+r.length-2,c)}}static computePoolOutputShape(r,n,s,p,l,c,o){if(n.length<=0)throw new Error("input shape must be of size greater than 0");let a=[n[0],n[1]];return er.computeShapeHelper(r,n,a,s,p,l,c,o),a}static computeConvOutputShape(r,n,s,p,l,c,o){if(r.length<=0||n.length<=0)throw new Error("invalid input tensor dims or invalid filter tensor dims");let a=[r[0],n[0]];return er.computeShapeHelper(!1,r,a,s,p,l,c,o),a}static computeShapeHelper(r,n,s,p,l,c,o,a){if(r)for(let e=0;e<n.length-2;e++)s.push(1);else for(let e=0;e<n.length-2;e++)s.push(er.adjustPadAndReturnShape(n[e+2],p[e],l[e],c[e],o,e,e+n.length-2,a))}static adjustPadAndReturnShape(r,n,s,p,l,c,o,a){let e=s*(p-1)+1;if(a&&a!=="NOTSET")switch(a){case"VALID":return l[c]=0,l[o]=0,Math.floor((r-e)/n+1);case"SAME_LOWER":case"SAME_UPPER":if(s!==1)throw new Error("Dilation not supported for SAME_UPPER or SAME_LOWER");{let u=((r+n-1)/n-1)*n+p-r;return l[c]=Math.floor(a==="SAME_LOWER"?(u+1)/2:u/2),l[o]=u-l[c],Math.floor((r+u-p)/n+1)}default:throw new Error("Unsupported AutoPad type")}else return Math.floor((r+l[c]+l[o]-e)/n+1)}},dr=-34028234663852886e22,hr=34028234663852886e22});function Zh(t){switch(t){case"bool":case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;case"float64":return 8;default:throw new Error(`cannot calculate sizeof() on type ${t}`)}}function wa(t){switch(t){case L.onnx.TensorProto.DataType.UINT8:case L.onnx.TensorProto.DataType.INT8:case L.onnx.TensorProto.DataType.BOOL:return 1;case L.onnx.TensorProto.DataType.UINT16:case L.onnx.TensorProto.DataType.INT16:return 2;case L.onnx.TensorProto.DataType.FLOAT:case L.onnx.TensorProto.DataType.INT32:case L.onnx.TensorProto.DataType.UINT32:return 4;case L.onnx.TensorProto.DataType.INT64:case L.onnx.TensorProto.DataType.DOUBLE:case L.onnx.TensorProto.DataType.UINT64:return 8;default:throw new Error(`cannot calculate sizeof() on type ${L.onnx.TensorProto.DataType[t]}`)}}function Jh(t,r){return new(wl(r))(t)}function wl(t){switch(t){case"bool":case"uint8":return Uint8Array;case"int8":return Int8Array;case"int16":return Int16Array;case"uint16":return Uint16Array;case"int32":return Int32Array;case"uint32":return Uint32Array;case"int64":return BigInt64Array;case"float32":return Float32Array;case"float64":return Float64Array;default:throw new Error("unspecified error")}}function go(t,r){if(r===L.onnx.TensorProto.DataType.INT64||r===Vr.TensorDataType.INT64){if(t.greaterThanOrEqual(2147483648)||t.lessThan(-2147483648))throw new TypeError("int64 is not supported")}else if(r===L.onnx.TensorProto.DataType.UINT32||r===Vr.TensorDataType.UINT32||r===L.onnx.TensorProto.DataType.UINT64||r===Vr.TensorDataType.UINT64){if(t.greaterThanOrEqual(4294967296)||t.lessThan(0))throw new TypeError("uint64 is not supported")}else throw new TypeError(`not a LONG type: ${L.onnx.TensorProto.DataType[r]}`);return t.toNumber()}function va(t,r,n){switch(r){case L.onnx.TensorProto.DataType.BOOL:case L.onnx.TensorProto.DataType.UINT8:return t.getUint8(n);case L.onnx.TensorProto.DataType.INT8:return t.getInt8(n);case L.onnx.TensorProto.DataType.UINT16:return t.getUint16(n,!0);case L.onnx.TensorProto.DataType.INT16:return t.getInt16(n,!0);case L.onnx.TensorProto.DataType.FLOAT:return t.getFloat32(n,!0);case L.onnx.TensorProto.DataType.INT32:return t.getInt32(n,!0);case L.onnx.TensorProto.DataType.UINT32:return t.getUint32(n,!0);case L.onnx.TensorProto.DataType.INT64:return go(ee.fromBits(t.getUint32(n,!0),t.getUint32(n+4,!0),!1),r);case L.onnx.TensorProto.DataType.DOUBLE:return t.getFloat64(n,!0);case L.onnx.TensorProto.DataType.UINT64:return go(ee.fromBits(t.getUint32(n,!0),t.getUint32(n+4,!0),!0),r);default:throw new Error(`cannot read from DataView for type ${L.onnx.TensorProto.DataType[r]}`)}}var xa,L,Vr,Pt,De=I(()=>{"use strict";xa=Ie(Fh()),fl(),Zr(),L=Ie(mr()),U(),Vr=H.experimental.fbs,Pt=class Mr{constructor(r,n,s,p,l,c=xa.Guid.create()){this.dims=r,this.type=n,this.dataProvider=s,this.asyncDataProvider=p,this.cache=l,this.dataId=c,this.size=C.validateDimsAndCalcSize(r);let o=this.size,a=s===void 0&&p===void 0&&l===void 0;if(l!==void 0&&l.length!==o)throw new RangeError("Input dims doesn't match data length.");if(n==="string"){if(l!==void 0&&(!Array.isArray(l)||!l.every(e=>typeof e=="string")))throw new TypeError("cache should be a string array");a&&(this.cache=new Array(o))}else{if(l!==void 0){let e=wl(n);if(!(l instanceof e))throw new TypeError(`cache should be type ${e.name}`)}if(a){let e=new ArrayBuffer(o*Zh(n));this.cache=Jh(e,n)}}}get data(){if(this.cache===void 0){let r=this.dataProvider(this.dataId);if(r.length!==this.size)throw new Error("Length of data provided by the Data Provider is inconsistent with the dims of this Tensor.");this.cache=r}return this.cache}get stringData(){if(this.type!=="string")throw new TypeError("data type is not string");return this.data}get integerData(){switch(this.type){case"uint8":case"int8":case"uint16":case"int16":case"int32":case"uint32":case"bool":return this.data;default:throw new TypeError("data type is not integer (uint8, int8, uint16, int16, int32, uint32, bool)")}}get floatData(){switch(this.type){case"float32":case"float64":return this.data;default:throw new TypeError("data type is not float (float32, float64)")}}get numberData(){if(this.type!=="string")return this.data;throw new TypeError("type cannot be non-number (string)")}get(r){return this.data[C.indicesToOffset(r,this.strides)]}set(r,n){this.data[C.indicesToOffset(r,this.strides)]=n}async getData(){return this.cache===void 0&&(this.cache=await this.asyncDataProvider(this.dataId)),this.cache}get strides(){return this._strides||(this._strides=C.computeStrides(this.dims)),this._strides}static fromProto(r){if(!r)throw new Error("cannot construct Value from an empty tensor");let n=Et.tensorDataTypeFromProto(r.dataType),s=Et.tensorDimsFromProto(r.dims),p=new Mr(s,n);if(n==="string")r.stringData.forEach((l,c)=>{p.data[c]=co(l)});else if(r.rawData&&typeof r.rawData.byteLength=="number"&&r.rawData.byteLength>0){let l=p.data,c=new DataView(r.rawData.buffer,r.rawData.byteOffset,r.rawData.byteLength),o=wa(r.dataType),a=r.rawData.byteLength/o;if(r.rawData.byteLength%o!==0)throw new Error("invalid buffer length");if(l.length!==a)throw new Error("buffer length mismatch");for(let e=0;e<a;e++){let u=va(c,r.dataType,e*o);l[e]=u}}else{let l;switch(r.dataType){case L.onnx.TensorProto.DataType.FLOAT:l=r.floatData;break;case L.onnx.TensorProto.DataType.INT32:case L.onnx.TensorProto.DataType.INT16:case L.onnx.TensorProto.DataType.UINT16:case L.onnx.TensorProto.DataType.INT8:case L.onnx.TensorProto.DataType.UINT8:case L.onnx.TensorProto.DataType.BOOL:l=r.int32Data;break;case L.onnx.TensorProto.DataType.INT64:l=r.int64Data;break;case L.onnx.TensorProto.DataType.DOUBLE:l=r.doubleData;break;case L.onnx.TensorProto.DataType.UINT32:case L.onnx.TensorProto.DataType.UINT64:l=r.uint64Data;break;default:throw new Error("unspecific error")}if(l==null)throw new Error("failed to populate data from a tensorproto value");let c=p.data;if(c.length!==l.length)throw new Error("array length mismatch");for(let o=0;o<l.length;o++){let a=l[o];ee.isLong(a)?c[o]=go(a,r.dataType):c[o]=a}}return p}static fromData(r,n,s){return new Mr(n,s,void 0,void 0,r)}static fromOrtTensor(r){if(!r)throw new Error("cannot construct Value from an empty tensor");let n=Et.tensorDimsFromORTFormat(r),s=Et.tensorDataTypeFromProto(r.dataType()),p=new Mr(n,s);if(s==="string")for(let l=0;l<r.stringDataLength();l++)p.data[l]=r.stringData(l);else if(r.rawDataArray()&&typeof r.rawDataLength()=="number"&&r.rawDataLength()>0){let l=p.data,c=new DataView(r.rawDataArray().buffer,r.rawDataArray().byteOffset,r.rawDataLength()),o=wa(r.dataType()),a=r.rawDataLength()/o;if(r.rawDataLength()%o!==0)throw new Error("invalid buffer length");if(l.length!==a)throw new Error("buffer length mismatch");for(let e=0;e<a;e++){let u=va(c,r.dataType(),e*o);l[e]=u}}return p}}});function B(t){return t===1?vl:xl}function Yh(t){let r=B(t);return`${r.version}
1
+ import{a as le}from"./chunk-FSRPMVAS.js";var lh=Object.create,Kr=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,ch=Object.getOwnPropertyNames,dh=Object.getPrototypeOf,hh=Object.prototype.hasOwnProperty,fh=(t=>typeof le<"u"?le:typeof Proxy<"u"?new Proxy(t,{get:(r,n)=>(typeof le<"u"?le:r)[n]}):t)(function(t){if(typeof le<"u")return le.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),I=(t,r)=>()=>(t&&(r=t(t=0)),r),nt=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),gr=(t,r)=>{for(var n in r)Kr(t,n,{get:r[n],enumerable:!0})},Hu=(t,r,n,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let p of ch(r))!hh.call(t,p)&&p!==n&&Kr(t,p,{get:()=>r[p],enumerable:!(s=ph(r,p))||s.enumerable});return t},Ie=(t,r,n)=>(n=t!=null?lh(dh(t)):{},Hu(r||!t||!t.__esModule?Kr(n,"default",{value:t,enumerable:!0}):n,t)),zr=t=>Hu(Kr({},"__esModule",{value:!0}),t),Me,Zt,cr,da,Vo,Mo=I(()=>{"use strict";Me=new Map,Zt=[],cr=(t,r,n)=>{if(r&&typeof r.init=="function"&&typeof r.createInferenceSessionHandler=="function"){let s=Me.get(t);if(s===void 0)Me.set(t,{backend:r,priority:n});else{if(s.priority>n)return;if(s.priority===n&&s.backend!==r)throw new Error(`cannot register backend "${t}" using priority ${n}`)}if(n>=0){let p=Zt.indexOf(t);p!==-1&&Zt.splice(p,1);for(let l=0;l<Zt.length;l++)if(Me.get(Zt[l]).priority<=n){Zt.splice(l,0,t);return}Zt.push(t)}return}throw new TypeError("not a valid backend")},da=async t=>{let r=Me.get(t);if(!r)return"backend not found.";if(r.initialized)return r.backend;if(r.aborted)return r.error;{let n=!!r.initPromise;try{return n||(r.initPromise=r.backend.init(t)),await r.initPromise,r.initialized=!0,r.backend}catch(s){return n||(r.error=`${s}`,r.aborted=!0),r.error}finally{delete r.initPromise}}},Vo=async t=>{let r=t.executionProviders||[],n=r.map(a=>typeof a=="string"?a:a.name),s=n.length===0?Zt:n,p,l=[],c=new Set;for(let a of s){let e=await da(a);typeof e=="string"?l.push({name:a,err:e}):(p||(p=e),p===e&&c.add(a))}if(!p)throw new Error(`no available backend found. ERR: ${l.map(a=>`[${a.name}] ${a.err}`).join(", ")}`);for(let{name:a,err:e}of l)n.includes(a)&&console.warn(`removing requested execution provider "${a}" from session options because it is not available: ${e}`);let o=r.filter(a=>c.has(typeof a=="string"?a:a.name));return[p,new Proxy(t,{get:(a,e)=>e==="executionProviders"?o:Reflect.get(a,e)})]}}),gh=I(()=>{"use strict";Mo()}),qu,mh=I(()=>{"use strict";qu="1.20.0"}),fn,Dt,Wu=I(()=>{"use strict";mh(),fn="warning",Dt={wasm:{},webgl:{},webgpu:{},versions:{common:qu},set logLevel(t){if(t!==void 0){if(typeof t!="string"||["verbose","info","warning","error","fatal"].indexOf(t)===-1)throw new Error(`Unsupported logging level: ${t}`);fn=t}},get logLevel(){return fn}},Object.defineProperty(Dt,"logLevel",{enumerable:!0})}),j,bh=I(()=>{"use strict";Wu(),j=Dt}),Xu,Ku,yh=I(()=>{"use strict";Xu=(t,r)=>{let n=typeof document<"u"?document.createElement("canvas"):new OffscreenCanvas(1,1);n.width=t.dims[3],n.height=t.dims[2];let s=n.getContext("2d");if(s!=null){let p,l;r?.tensorLayout!==void 0&&r.tensorLayout==="NHWC"?(p=t.dims[2],l=t.dims[3]):(p=t.dims[3],l=t.dims[2]);let c=r?.format!==void 0?r.format:"RGB",o=r?.norm,a,e;o===void 0||o.mean===void 0?a=[255,255,255,255]:typeof o.mean=="number"?a=[o.mean,o.mean,o.mean,o.mean]:(a=[o.mean[0],o.mean[1],o.mean[2],0],o.mean[3]!==void 0&&(a[3]=o.mean[3])),o===void 0||o.bias===void 0?e=[0,0,0,0]:typeof o.bias=="number"?e=[o.bias,o.bias,o.bias,o.bias]:(e=[o.bias[0],o.bias[1],o.bias[2],0],o.bias[3]!==void 0&&(e[3]=o.bias[3]));let u=l*p,i=0,d=u,h=u*2,m=-1;c==="RGBA"?(i=0,d=u,h=u*2,m=u*3):c==="RGB"?(i=0,d=u,h=u*2):c==="RBG"&&(i=0,h=u,d=u*2);for(let b=0;b<l;b++)for(let x=0;x<p;x++){let E=(t.data[i++]-e[0])*a[0],w=(t.data[d++]-e[1])*a[1],S=(t.data[h++]-e[2])*a[2],$=m===-1?255:(t.data[m++]-e[3])*a[3];s.fillStyle="rgba("+E+","+w+","+S+","+$+")",s.fillRect(x,b,1,1)}if("toDataURL"in n)return n.toDataURL();throw new Error("toDataURL is not supported")}else throw new Error("Can not access image data")},Ku=(t,r)=>{let n=typeof document<"u"?document.createElement("canvas").getContext("2d"):new OffscreenCanvas(1,1).getContext("2d"),s;if(n!=null){let p,l,c;r?.tensorLayout!==void 0&&r.tensorLayout==="NHWC"?(p=t.dims[2],l=t.dims[1],c=t.dims[3]):(p=t.dims[3],l=t.dims[2],c=t.dims[1]);let o=r!==void 0&&r.format!==void 0?r.format:"RGB",a=r?.norm,e,u;a===void 0||a.mean===void 0?e=[255,255,255,255]:typeof a.mean=="number"?e=[a.mean,a.mean,a.mean,a.mean]:(e=[a.mean[0],a.mean[1],a.mean[2],255],a.mean[3]!==void 0&&(e[3]=a.mean[3])),a===void 0||a.bias===void 0?u=[0,0,0,0]:typeof a.bias=="number"?u=[a.bias,a.bias,a.bias,a.bias]:(u=[a.bias[0],a.bias[1],a.bias[2],0],a.bias[3]!==void 0&&(u[3]=a.bias[3]));let i=l*p;if(r!==void 0&&(r.format!==void 0&&c===4&&r.format!=="RGBA"||c===3&&r.format!=="RGB"&&r.format!=="BGR"))throw new Error("Tensor format doesn't match input tensor dims");let d=4,h=0,m=1,b=2,x=3,E=0,w=i,S=i*2,$=-1;o==="RGBA"?(E=0,w=i,S=i*2,$=i*3):o==="RGB"?(E=0,w=i,S=i*2):o==="RBG"&&(E=0,S=i,w=i*2),s=n.createImageData(p,l);for(let F=0;F<l*p;h+=d,m+=d,b+=d,x+=d,F++)s.data[h]=(t.data[E++]-u[0])*e[0],s.data[m]=(t.data[w++]-u[1])*e[1],s.data[b]=(t.data[S++]-u[2])*e[2],s.data[x]=$===-1?255:(t.data[$++]-u[3])*e[3]}else throw new Error("Can not access image data");return s}}),Nr,Zu,Ju,Yu,Qu,tl,wh=I(()=>{"use strict";zo(),Nr=(t,r)=>{if(t===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:n,width:s}=r,p=r.norm??{mean:255,bias:0},l,c;typeof p.mean=="number"?l=[p.mean,p.mean,p.mean,p.mean]:l=[p.mean[0],p.mean[1],p.mean[2],p.mean[3]??255],typeof p.bias=="number"?c=[p.bias,p.bias,p.bias,p.bias]:c=[p.bias[0],p.bias[1],p.bias[2],p.bias[3]??0];let o=r.format!==void 0?r.format:"RGBA",a=r.tensorFormat!==void 0&&r.tensorFormat!==void 0?r.tensorFormat:"RGB",e=n*s,u=a==="RGBA"?new Float32Array(e*4):new Float32Array(e*3),i=4,d=0,h=1,m=2,b=3,x=0,E=e,w=e*2,S=-1;o==="RGB"&&(i=3,d=0,h=1,m=2,b=-1),a==="RGBA"?S=e*3:a==="RBG"?(x=0,w=e,E=e*2):a==="BGR"&&(w=0,E=e,x=e*2);for(let $=0;$<e;$++,d+=i,m+=i,h+=i,b+=i)u[x++]=(t[d]+c[0])/l[0],u[E++]=(t[h]+c[1])/l[1],u[w++]=(t[m]+c[2])/l[2],S!==-1&&b!==-1&&(u[S++]=(t[b]+c[3])/l[3]);return a==="RGBA"?new It("float32",u,[1,4,n,s]):new It("float32",u,[1,3,n,s])},Zu=async(t,r)=>{let n=typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement,s=typeof ImageData<"u"&&t instanceof ImageData,p=typeof ImageBitmap<"u"&&t instanceof ImageBitmap,l=typeof t=="string",c,o=r??{},a=()=>{if(typeof document<"u")return document.createElement("canvas");if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(1,1);throw new Error("Canvas is not supported")},e=u=>typeof HTMLCanvasElement<"u"&&u instanceof HTMLCanvasElement||u instanceof OffscreenCanvas?u.getContext("2d"):null;if(n){let u=a();u.width=t.width,u.height=t.height;let i=e(u);if(i!=null){let d=t.height,h=t.width;if(r!==void 0&&r.resizedHeight!==void 0&&r.resizedWidth!==void 0&&(d=r.resizedHeight,h=r.resizedWidth),r!==void 0){if(o=r,r.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");o.tensorFormat="RGBA",o.height=d,o.width=h}else o.tensorFormat="RGBA",o.height=d,o.width=h;i.drawImage(t,0,0),c=i.getImageData(0,0,h,d).data}else throw new Error("Can not access image data")}else if(s){let u,i;if(r!==void 0&&r.resizedWidth!==void 0&&r.resizedHeight!==void 0?(u=r.resizedHeight,i=r.resizedWidth):(u=t.height,i=t.width),r!==void 0&&(o=r),o.format="RGBA",o.height=u,o.width=i,r!==void 0){let d=a();d.width=i,d.height=u;let h=e(d);if(h!=null)h.putImageData(t,0,0),c=h.getImageData(0,0,i,u).data;else throw new Error("Can not access image data")}else c=t.data}else if(p){if(r===void 0)throw new Error("Please provide image config with format for Imagebitmap");let u=a();u.width=t.width,u.height=t.height;let i=e(u);if(i!=null){let d=t.height,h=t.width;return i.drawImage(t,0,0,h,d),c=i.getImageData(0,0,h,d).data,o.height=d,o.width=h,Nr(c,o)}else throw new Error("Can not access image data")}else{if(l)return new Promise((u,i)=>{let d=a(),h=e(d);if(!t||!h)return i();let m=new Image;m.crossOrigin="Anonymous",m.src=t,m.onload=()=>{d.width=m.width,d.height=m.height,h.drawImage(m,0,0,d.width,d.height);let b=h.getImageData(0,0,d.width,d.height);o.height=d.height,o.width=d.width,u(Nr(b.data,o))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return Nr(c,o);throw new Error("Input data provided is not supported - aborted tensor creation")},Ju=(t,r)=>{let{width:n,height:s,download:p,dispose:l}=r,c=[1,s,n,4];return new It({location:"texture",type:"float32",texture:t,dims:c,download:p,dispose:l})},Yu=(t,r)=>{let{dataType:n,dims:s,download:p,dispose:l}=r;return new It({location:"gpu-buffer",type:n??"float32",gpuBuffer:t,dims:s,download:p,dispose:l})},Qu=(t,r)=>{let{dataType:n,dims:s,download:p,dispose:l}=r;return new It({location:"ml-tensor",type:n??"float32",mlTensor:t,dims:s,download:p,dispose:l})},tl=(t,r,n)=>new It({location:"cpu-pinned",type:t,data:r,dims:n??[r.length]})}),me,Ye,gn,el,vh=I(()=>{"use strict";me=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array],["int4",Uint8Array],["uint4",Uint8Array]]),Ye=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]),gn=!1,el=()=>{if(!gn){gn=!0;let t=typeof BigInt64Array<"u"&&BigInt64Array.from,r=typeof BigUint64Array<"u"&&BigUint64Array.from,n=typeof Float16Array<"u"&&Float16Array.from;t&&(me.set("int64",BigInt64Array),Ye.set(BigInt64Array,"int64")),r&&(me.set("uint64",BigUint64Array),Ye.set(BigUint64Array,"uint64")),n?(me.set("float16",Float16Array),Ye.set(Float16Array,"float16")):me.set("float16",Uint16Array)}}}),rl,nl,xh=I(()=>{"use strict";zo(),rl=t=>{let r=1;for(let n=0;n<t.length;n++){let s=t[n];if(typeof s!="number"||!Number.isSafeInteger(s))throw new TypeError(`dims[${n}] must be an integer, got: ${s}`);if(s<0)throw new RangeError(`dims[${n}] must be a non-negative integer, got: ${s}`);r*=s}return r},nl=(t,r)=>{switch(t.location){case"cpu":return new It(t.type,t.data,r);case"cpu-pinned":return new It({location:"cpu-pinned",data:t.data,type:t.type,dims:r});case"texture":return new It({location:"texture",texture:t.texture,type:t.type,dims:r});case"gpu-buffer":return new It({location:"gpu-buffer",gpuBuffer:t.gpuBuffer,type:t.type,dims:r});case"ml-tensor":return new It({location:"ml-tensor",mlTensor:t.mlTensor,type:t.type,dims:r});default:throw new Error(`tensorReshape: tensor location ${t.location} is not supported`)}}}),It,zo=I(()=>{"use strict";yh(),wh(),vh(),xh(),It=class{constructor(t,r,n){el();let s,p;if(typeof t=="object"&&"location"in t)switch(this.dataLocation=t.location,s=t.type,p=t.dims,t.location){case"cpu-pinned":{let c=me.get(s);if(!c)throw new TypeError(`unsupported type "${s}" to create tensor from pinned buffer`);if(!(t.data instanceof c))throw new TypeError(`buffer should be of type ${c.name}`);this.cpuData=t.data;break}case"texture":{if(s!=="float32")throw new TypeError(`unsupported type "${s}" to create tensor from texture`);this.gpuTextureData=t.texture,this.downloader=t.download,this.disposer=t.dispose;break}case"gpu-buffer":{if(s!=="float32"&&s!=="float16"&&s!=="int32"&&s!=="int64"&&s!=="uint32"&&s!=="uint8"&&s!=="bool"&&s!=="uint4"&&s!=="int4")throw new TypeError(`unsupported type "${s}" to create tensor from gpu buffer`);this.gpuBufferData=t.gpuBuffer,this.downloader=t.download,this.disposer=t.dispose;break}case"ml-tensor":{if(s!=="float32"&&s!=="float16"&&s!=="int32"&&s!=="int64"&&s!=="uint32"&&s!=="uint64"&&s!=="int8"&&s!=="uint8"&&s!=="bool")throw new TypeError(`unsupported type "${s}" to create tensor from MLTensor`);this.mlTensorData=t.mlTensor,this.downloader=t.download,this.disposer=t.dispose;break}default:throw new Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let c,o;if(typeof t=="string")if(s=t,o=n,t==="string"){if(!Array.isArray(r))throw new TypeError("A string tensor's data must be a string array.");c=r}else{let a=me.get(t);if(a===void 0)throw new TypeError(`Unsupported tensor type: ${t}.`);if(Array.isArray(r)){if(t==="float16"&&a===Uint16Array||t==="uint4"||t==="int4")throw new TypeError(`Creating a ${t} tensor from number array is not supported. Please use ${a.name} as data.`);t==="uint64"||t==="int64"?c=a.from(r,BigInt):c=a.from(r)}else if(r instanceof a)c=r;else if(r instanceof Uint8ClampedArray)if(t==="uint8")c=Uint8Array.from(r);else throw new TypeError("A Uint8ClampedArray tensor's data must be type of uint8");else throw new TypeError(`A ${s} tensor's data must be type of ${a}`)}else if(o=r,Array.isArray(t)){if(t.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");let a=typeof t[0];if(a==="string")s="string",c=t;else if(a==="boolean")s="bool",c=Uint8Array.from(t);else throw new TypeError(`Invalid element type of data array: ${a}.`)}else if(t instanceof Uint8ClampedArray)s="uint8",c=Uint8Array.from(t);else{let a=Ye.get(t.constructor);if(a===void 0)throw new TypeError(`Unsupported type for tensor data: ${t.constructor}.`);s=a,c=t}if(o===void 0)o=[c.length];else if(!Array.isArray(o))throw new TypeError("A tensor's dims must be a number array");p=o,this.cpuData=c,this.dataLocation="cpu"}let l=rl(p);if(this.cpuData&&l!==this.cpuData.length&&!((s==="uint4"||s==="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=s,this.dims=p,this.size=l}static async fromImage(t,r){return Zu(t,r)}static fromTexture(t,r){return Ju(t,r)}static fromGpuBuffer(t,r){return Yu(t,r)}static fromMLTensor(t,r){return Qu(t,r)}static fromPinnedBuffer(t,r,n){return tl(t,r,n)}toDataURL(t){return Xu(this,t)}toImageData(t){return Ku(this,t)}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(t){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 r=await this.downloader();return this.downloader=void 0,this.dataLocation="cpu",this.cpuData=r,t&&this.disposer&&(this.disposer(),this.disposer=void 0),r}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(t){if(this.ensureValid(),this.downloader||this.disposer)throw new Error("Cannot reshape a tensor that owns GPU resource.");return nl(this,t)}}}),ft,Uo=I(()=>{"use strict";zo(),ft=It}),no,mn,Pe,Ae,ol=I(()=>{"use strict";Wu(),no=(t,r)=>{(typeof Dt.trace>"u"?!Dt.wasm.trace:!Dt.trace)||console.timeStamp(`${t}::ORT::${r}`)},mn=(t,r)=>{let n=new Error().stack?.split(/\r\n|\r|\n/g)||[],s=!1;for(let p=0;p<n.length;p++){if(s&&!n[p].includes("TRACE_FUNC")){let l=`FUNC_${t}::${n[p].trim().split(" ")[1]}`;r&&(l+=`::${r}`),no("CPU",l);return}n[p].includes("TRACE_FUNC")&&(s=!0)}},Pe=t=>{(typeof Dt.trace>"u"?!Dt.wasm.trace:!Dt.trace)||mn("BEGIN",t)},Ae=t=>{(typeof Dt.trace>"u"?!Dt.wasm.trace:!Dt.trace)||mn("END",t)}}),il,Th=I(()=>{"use strict";Mo(),Uo(),ol(),il=class al{constructor(r){this.handler=r}async run(r,n,s){Pe();let p={},l={};if(typeof r!="object"||r===null||r instanceof ft||Array.isArray(r))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let c=!0;if(typeof n=="object"){if(n===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(n instanceof ft)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(n)){if(n.length===0)throw new TypeError("'fetches' cannot be an empty array.");c=!1;for(let e of n){if(typeof e!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(e)===-1)throw new RangeError(`'fetches' contains invalid output name: ${e}.`);p[e]=null}if(typeof s=="object"&&s!==null)l=s;else if(typeof s<"u")throw new TypeError("'options' must be an object.")}else{let e=!1,u=Object.getOwnPropertyNames(n);for(let i of this.outputNames)if(u.indexOf(i)!==-1){let d=n[i];(d===null||d instanceof ft)&&(e=!0,c=!1,p[i]=d)}if(e){if(typeof s=="object"&&s!==null)l=s;else if(typeof s<"u")throw new TypeError("'options' must be an object.")}else l=n}}else if(typeof n<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(let e of this.inputNames)if(typeof r[e]>"u")throw new Error(`input '${e}' is missing in 'feeds'.`);if(c)for(let e of this.outputNames)p[e]=null;let o=await this.handler.run(r,p,l),a={};for(let e in o)if(Object.hasOwnProperty.call(o,e)){let u=o[e];u instanceof ft?a[e]=u:a[e]=new ft(u.type,u.data,u.dims)}return Ae(),a}async release(){return this.handler.dispose()}static async create(r,n,s,p){Pe();let l,c={};if(typeof r=="string"){if(l=r,typeof n=="object"&&n!==null)c=n;else if(typeof n<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof Uint8Array){if(l=r,typeof n=="object"&&n!==null)c=n;else if(typeof n<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer){let u=r,i=0,d=r.byteLength;if(typeof n=="object"&&n!==null)c=n;else if(typeof n=="number"){if(i=n,!Number.isSafeInteger(i))throw new RangeError("'byteOffset' must be an integer.");if(i<0||i>=u.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${u.byteLength}).`);if(d=r.byteLength-i,typeof s=="number"){if(d=s,!Number.isSafeInteger(d))throw new RangeError("'byteLength' must be an integer.");if(d<=0||i+d>u.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${u.byteLength-i}].`);if(typeof p=="object"&&p!==null)c=p;else if(typeof p<"u")throw new TypeError("'options' must be an object.")}else if(typeof s<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof n<"u")throw new TypeError("'options' must be an object.");l=new Uint8Array(u,i,d)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");let[o,a]=await Vo(c),e=await o.createInferenceSessionHandler(l,a);return Ae(),new al(e)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}}}),sl,_h=I(()=>{"use strict";Th(),sl=il}),Sh=I(()=>{"use strict"}),Oh=I(()=>{"use strict"}),Eh=I(()=>{"use strict"}),Ih=I(()=>{"use strict"}),ha,ul,Ph=I(()=>{"use strict";Mo(),Uo(),ha="Training backend could not be resolved. Make sure you're using the correct configuration & WebAssembly files.",ul=class ll{constructor(r,n,s){this.handler=r,this.hasOptimizerModel=n,this.hasEvalModel=s}get trainingInputNames(){return this.handler.inputNames}get trainingOutputNames(){return this.handler.outputNames}get evalInputNames(){if(this.hasEvalModel)return this.handler.evalInputNames;throw new Error("This training session has no evalModel loaded.")}get evalOutputNames(){if(this.hasEvalModel)return this.handler.evalOutputNames;throw new Error("This training session has no evalModel loaded.")}static async create(r,n){let s=r.evalModel||"",p=r.optimizerModel||"",l=n||{},[c,o]=await Vo(l);if(c.createTrainingSessionHandler){let a=await c.createTrainingSessionHandler(r.checkpointState,r.trainModel,s,p,o);return new ll(a,!!r.optimizerModel,!!r.evalModel)}else throw new Error(ha)}typeNarrowingForRunStep(r,n,s,p,l){let c={},o={};if(typeof s!="object"||s===null||s instanceof ft||Array.isArray(s))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let a=!0;if(typeof p=="object"){if(p===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(p instanceof ft)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(p)){if(p.length===0)throw new TypeError("'fetches' cannot be an empty array.");a=!1;for(let e of p){if(typeof e!="string")throw new TypeError("'fetches' must be a string array or an object.");if(n.indexOf(e)===-1)throw new RangeError(`'fetches' contains invalid output name: ${e}.`);c[e]=null}if(typeof l=="object"&&l!==null)o=l;else if(typeof l<"u")throw new TypeError("'options' must be an object.")}else{let e=!1,u=Object.getOwnPropertyNames(p);for(let i of n)if(u.indexOf(i)!==-1){let d=p[i];(d===null||d instanceof ft)&&(e=!0,a=!1,c[i]=d)}if(e){if(typeof l=="object"&&l!==null)o=l;else if(typeof l<"u")throw new TypeError("'options' must be an object.")}else o=p}}else if(typeof p<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(let e of r)if(typeof s[e]>"u")throw new Error(`input '${e}' is missing in 'feeds'.`);if(a)for(let e of n)c[e]=null;return[c,o]}convertHandlerReturnTypeToMapOfTensors(r){let n={};for(let s in r)if(Object.hasOwnProperty.call(r,s)){let p=r[s];p instanceof ft?n[s]=p:n[s]=new ft(p.type,p.data,p.dims)}return n}async lazyResetGrad(){await this.handler.lazyResetGrad()}async runTrainStep(r,n,s){let[p,l]=this.typeNarrowingForRunStep(this.trainingInputNames,this.trainingOutputNames,r,n,s),c=await this.handler.runTrainStep(r,p,l);return this.convertHandlerReturnTypeToMapOfTensors(c)}async runOptimizerStep(r){if(this.hasOptimizerModel)await this.handler.runOptimizerStep(r||{});else throw new Error("This TrainingSession has no OptimizerModel loaded.")}async runEvalStep(r,n,s){if(this.hasEvalModel){let[p,l]=this.typeNarrowingForRunStep(this.evalInputNames,this.evalOutputNames,r,n,s),c=await this.handler.runEvalStep(r,p,l);return this.convertHandlerReturnTypeToMapOfTensors(c)}else throw new Error("This TrainingSession has no EvalModel loaded.")}async getParametersSize(r=!0){return this.handler.getParametersSize(r)}async loadParametersBuffer(r,n=!0){let s=await this.getParametersSize(n);if(r.length!==4*s)throw new Error("Size of the buffer passed into loadParametersBuffer must match the number of parameters in the model. Please use getParametersSize method to check.");return this.handler.loadParametersBuffer(r,n)}async getContiguousParameters(r=!0){return this.handler.getContiguousParameters(r)}async release(){return this.handler.dispose()}}}),pl,Ah=I(()=>{"use strict";Ph(),pl=ul}),cl={};gr(cl,{InferenceSession:()=>sl,TRACE:()=>no,TRACE_FUNC_BEGIN:()=>Pe,TRACE_FUNC_END:()=>Ae,Tensor:()=>ft,TrainingSession:()=>pl,env:()=>j,registerBackend:()=>cr});var zt=I(()=>{"use strict";gh(),bh(),_h(),Uo(),Sh(),Oh(),ol(),Eh(),Ih(),Ah()});function be(t,r,n,s){if(r===void 0)return $h(t);if(n===void 0)kr(t,r,1);else if(typeof n=="number"&&s===void 0)kr(t,r,n);else if(typeof n=="string"&&s===void 0)kr(t,n,1,r);else if(typeof n=="string"&&typeof s=="number")kr(t,n,s,r);else throw new TypeError("input is valid")}function $h(t){return{verbose:be.verbose.bind(null,t),info:be.info.bind(null,t),warning:be.warning.bind(null,t),error:be.error.bind(null,t),fatal:be.fatal.bind(null,t)}}function kr(t,r,n,s){let p=Ee[s||""]||Ee[""];oo[t]<oo[p.minimalSeverity]||(p.logDateTime&&(r=`${new Date().toISOString()}|${r}`),p.logSourceLocation,dl[p.provider].log(t,r,s))}var fa,ga,oo,dl,bn,Ee,tt,yn,wn,hl,ze,Rt=I(()=>{"use strict";fa=class{log(t,r,n){}},ga=class{log(t,r,n){console.log(`${this.color(t)} ${n?"\x1B[35m"+n+"\x1B[0m ":""}${r}`)}color(t){switch(t){case"verbose":return"\x1B[34;40mv\x1B[0m";case"info":return"\x1B[32mi\x1B[0m";case"warning":return"\x1B[30;43mw\x1B[0m";case"error":return"\x1B[31;40me\x1B[0m";case"fatal":return"\x1B[101mf\x1B[0m";default:throw new Error(`unsupported severity: ${t}`)}}},oo={verbose:1e3,info:2e3,warning:4e3,error:5e3,fatal:6e3},dl={none:new fa,console:new ga},bn={provider:"console",minimalSeverity:"warning",logDateTime:!0,logSourceLocation:!1},Ee={"":bn},(t=>{function r(e,u){t("verbose",e,u)}t.verbose=r;function n(e,u){t("info",e,u)}t.info=n;function s(e,u){t("warning",e,u)}t.warning=s;function p(e,u){t("error",e,u)}t.error=p;function l(e,u){t("fatal",e,u)}t.fatal=l;function c(e){Ee={},o("",e||{})}t.reset=c;function o(e,u){if(e==="*")c(u);else{let i=Ee[e]||bn;Ee[e]={provider:u.provider||i.provider,minimalSeverity:u.minimalSeverity||i.minimalSeverity,logDateTime:u.logDateTime===void 0?i.logDateTime:u.logDateTime,logSourceLocation:u.logSourceLocation===void 0?i.logSourceLocation:u.logSourceLocation}}}t.set=o;function a(e){let u={};e.logLevel&&(u.minimalSeverity=e.logLevel),o("",u)}t.setWithEnv=a})(be||(be={})),tt=be,yn=class{constructor(t,r,n,s,p,l){this.category=t,this.name=r,this.startTime=n,this.endCallback=s,this.timer=p,this.ctx=l}async end(){return this.endCallback(this)}async checkTimer(){if(this.ctx===void 0||this.timer===void 0)throw new Error("No webgl timer found");return this.ctx.endTimer(),this.ctx.waitForQueryAndGetTime(this.timer)}},wn=class{constructor(t,r,n,s){this.category=t,this.name=r,this.startTime=n,this.endTime=s}},hl=class{constructor(t,r,n){this._started=!1,this._flushPointer=0,this._started=!1,this._maxNumberEvents=t===void 0?1e4:t,this._flushBatchSize=r===void 0?10:r,this._flushIntervalInMilliseconds=n===void 0?5e3:n}static create(t){return t===void 0?new this:new this(t.maxNumberEvents,t.flushBatchSize,t.flushIntervalInMilliseconds)}start(){this._started=!0,this._timingEvents=[],this._flushTime=ze(),this._flushPointer=0}stop(){for(this._started=!1;this._flushPointer<this._timingEvents.length;this._flushPointer++)this.logOneEvent(this._timingEvents[this._flushPointer])}event(t,r,n,s){let p=this._started?this.begin(t,r,s):void 0,l=!1,c=n();if(c&&typeof c.then=="function")return l=!0,new Promise((o,a)=>{c.then(async e=>{p&&await p.end(),o(e)},async e=>{p&&await p.end(),a(e)})});if(!l&&p){let o=p.end();if(o&&typeof o.then=="function")return new Promise((a,e)=>{o.then(()=>{a(c)},u=>{e(u)})})}return c}begin(t,r,n){if(!this._started)throw new Error("profiler is not started yet");if(n===void 0){let s=ze();return this.flush(s),new yn(t,r,s,p=>this.endSync(p))}else{let s=n.beginTimer();return new yn(t,r,0,async p=>this.end(p),s,n)}}async end(t){let r=await t.checkTimer();this._timingEvents.length<this._maxNumberEvents&&(this._timingEvents.push(new wn(t.category,t.name,t.startTime,r)),this.flush(r))}endSync(t){let r=ze();this._timingEvents.length<this._maxNumberEvents&&(this._timingEvents.push(new wn(t.category,t.name,t.startTime,r)),this.flush(r))}logOneEvent(t){tt.verbose(`Profiler.${t.category}`,`${(t.endTime-t.startTime).toFixed(2)}ms on event '${t.name}' at ${t.endTime.toFixed(2)}`)}flush(t){if(this._timingEvents.length-this._flushPointer>=this._flushBatchSize||t-this._flushTime>=this._flushIntervalInMilliseconds){for(let r=this._flushPointer;this._flushPointer<r+this._flushBatchSize&&this._flushPointer<this._timingEvents.length;this._flushPointer++)this.logOneEvent(this._timingEvents[this._flushPointer]);this._flushTime=ze()}}get started(){return this._started}},ze=typeof performance<"u"&&performance.now?()=>performance.now():Date.now});function Dh(t,r,n){for(let s of n){let p=s[0],l=s[1],c=s[2],o=s[3],a=s[4];if(t.opType===p){for(let e of r)if((e.domain===l||e.domain==="ai.onnx"&&l==="")&&Nh(e.version,c))return{opImpl:o,opInit:a}}}throw new TypeError(`cannot resolve operator '${t.opType}' with opsets: ${r.map(s=>`${s.domain||"ai.onnx"} v${s.version}`).join(", ")}`)}function Nh(t,r){if(r.endsWith("+")){let n=Number.parseInt(r.substring(0,r.length-1),10);return!isNaN(n)&&n<=t}else if(r.split("-").length===2){let n=r.split("-"),s=Number.parseInt(n[0],10),p=Number.parseInt(n[1],10);return!isNaN(s)&&!isNaN(p)&&s<=t&&t<=p}else return Number.parseInt(r,10)===t}var kh=I(()=>{"use strict"}),Fh=nt(t=>{"use strict";t.__esModule=!0;var r=function(){function n(s){if(!s)throw new TypeError("Invalid argument; `value` has no value.");this.value=n.EMPTY,s&&n.isGuid(s)&&(this.value=s)}return n.isGuid=function(s){var p=s.toString();return s&&(s instanceof n||n.validator.test(p))},n.create=function(){return new n([n.gen(2),n.gen(1),n.gen(1),n.gen(1),n.gen(3)].join("-"))},n.createEmpty=function(){return new n("emptyguid")},n.parse=function(s){return new n(s)},n.raw=function(){return[n.gen(2),n.gen(1),n.gen(1),n.gen(1),n.gen(3)].join("-")},n.gen=function(s){for(var p="",l=0;l<s;l++)p+=((1+Math.random())*65536|0).toString(16).substring(1);return p},n.prototype.equals=function(s){return n.isGuid(s)&&this.value===s.toString()},n.prototype.isEmpty=function(){return this.value===n.EMPTY},n.prototype.toString=function(){return this.value},n.prototype.toJSON=function(){return{value:this.value}},n.validator=new RegExp("^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$","i"),n.EMPTY="00000000-0000-0000-0000-000000000000",n}();t.Guid=r});function W(t,r,n){this.low=t|0,this.high=r|0,this.unsigned=!!n}function dt(t){return(t&&t.__isLong__)===!0}function ma(t){var r=Math.clz32(t&-t);return t?31-r:r}function pe(t,r){var n,s,p;return r?(t>>>=0,(p=0<=t&&t<256)&&(s=ao[t],s)?s:(n=M(t,0,!0),p&&(ao[t]=n),n)):(t|=0,(p=-128<=t&&t<128)&&(s=io[t],s)?s:(n=M(t,t<0?-1:0,!1),p&&(io[t]=n),n))}function kt(t,r){if(isNaN(t))return r?Bt:Nt;if(r){if(t<0)return Bt;if(t>=so)return po}else{if(t<=-uo)return mt;if(t+1>=uo)return lo}return t<0?kt(-t,r).neg():M(t%ye|0,t/ye|0,r)}function M(t,r,n){return new W(t,r,n)}function Go(t,r,n){if(t.length===0)throw Error("empty string");if(typeof r=="number"?(n=r,r=!1):r=!!r,t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return r?Bt:Nt;if(n=n||10,n<2||36<n)throw RangeError("radix");var s;if((s=t.indexOf("-"))>0)throw Error("interior hyphen");if(s===0)return Go(t.substring(1),r,n).neg();for(var p=kt(sr(n,8)),l=Nt,c=0;c<t.length;c+=8){var o=Math.min(8,t.length-c),a=parseInt(t.substring(c,c+o),n);if(o<8){var e=kt(sr(n,o));l=l.mul(e).add(kt(a))}else l=l.mul(p),l=l.add(kt(a))}return l.unsigned=r,l}function Lt(t,r){return typeof t=="number"?kt(t,r):typeof t=="string"?Go(t,r):M(t.low,t.high,typeof r=="boolean"?r:t.unsigned)}var _t,io,ao,sr,vn,ba,ye,so,uo,xn,Nt,Bt,ce,Tn,Fr,lo,po,mt,A,ee,fl=I(()=>{_t=null;try{_t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}W.prototype.__isLong__,Object.defineProperty(W.prototype,"__isLong__",{value:!0}),W.isLong=dt,io={},ao={},W.fromInt=pe,W.fromNumber=kt,W.fromBits=M,sr=Math.pow,W.fromString=Go,W.fromValue=Lt,vn=65536,ba=1<<24,ye=vn*vn,so=ye*ye,uo=so/2,xn=pe(ba),Nt=pe(0),W.ZERO=Nt,Bt=pe(0,!0),W.UZERO=Bt,ce=pe(1),W.ONE=ce,Tn=pe(1,!0),W.UONE=Tn,Fr=pe(-1),W.NEG_ONE=Fr,lo=M(-1,2147483647,!1),W.MAX_VALUE=lo,po=M(-1,-1,!0),W.MAX_UNSIGNED_VALUE=po,mt=M(0,-2147483648,!1),W.MIN_VALUE=mt,A=W.prototype,A.toInt=function(){return this.unsigned?this.low>>>0:this.low},A.toNumber=function(){return this.unsigned?(this.high>>>0)*ye+(this.low>>>0):this.high*ye+(this.low>>>0)},A.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(mt)){var r=kt(t),n=this.div(r),s=n.mul(r).sub(this);return n.toString(t)+s.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var p=kt(sr(t,6),this.unsigned),l=this,c="";;){var o=l.div(p),a=l.sub(o.mul(p)).toInt()>>>0,e=a.toString(t);if(l=o,l.isZero())return e+c;for(;e.length<6;)e="0"+e;c=""+e+c}},A.getHighBits=function(){return this.high},A.getHighBitsUnsigned=function(){return this.high>>>0},A.getLowBits=function(){return this.low},A.getLowBitsUnsigned=function(){return this.low>>>0},A.getNumBitsAbs=function(){if(this.isNegative())return this.eq(mt)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,r=31;r>0&&!(t&1<<r);r--);return this.high!=0?r+33:r+1},A.isZero=function(){return this.high===0&&this.low===0},A.eqz=A.isZero,A.isNegative=function(){return!this.unsigned&&this.high<0},A.isPositive=function(){return this.unsigned||this.high>=0},A.isOdd=function(){return(this.low&1)===1},A.isEven=function(){return(this.low&1)===0},A.equals=function(t){return dt(t)||(t=Lt(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},A.eq=A.equals,A.notEquals=function(t){return!this.eq(t)},A.neq=A.notEquals,A.ne=A.notEquals,A.lessThan=function(t){return this.comp(t)<0},A.lt=A.lessThan,A.lessThanOrEqual=function(t){return this.comp(t)<=0},A.lte=A.lessThanOrEqual,A.le=A.lessThanOrEqual,A.greaterThan=function(t){return this.comp(t)>0},A.gt=A.greaterThan,A.greaterThanOrEqual=function(t){return this.comp(t)>=0},A.gte=A.greaterThanOrEqual,A.ge=A.greaterThanOrEqual,A.compare=function(t){if(dt(t)||(t=Lt(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},A.comp=A.compare,A.negate=function(){return!this.unsigned&&this.eq(mt)?mt:this.not().add(ce)},A.neg=A.negate,A.add=function(t){dt(t)||(t=Lt(t));var r=this.high>>>16,n=this.high&65535,s=this.low>>>16,p=this.low&65535,l=t.high>>>16,c=t.high&65535,o=t.low>>>16,a=t.low&65535,e=0,u=0,i=0,d=0;return d+=p+a,i+=d>>>16,d&=65535,i+=s+o,u+=i>>>16,i&=65535,u+=n+c,e+=u>>>16,u&=65535,e+=r+l,e&=65535,M(i<<16|d,e<<16|u,this.unsigned)},A.subtract=function(t){return dt(t)||(t=Lt(t)),this.add(t.neg())},A.sub=A.subtract,A.multiply=function(t){if(this.isZero())return this;if(dt(t)||(t=Lt(t)),_t){var r=_t.mul(this.low,this.high,t.low,t.high);return M(r,_t.get_high(),this.unsigned)}if(t.isZero())return this.unsigned?Bt:Nt;if(this.eq(mt))return t.isOdd()?mt:Nt;if(t.eq(mt))return this.isOdd()?mt:Nt;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(xn)&&t.lt(xn))return kt(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,s=this.high&65535,p=this.low>>>16,l=this.low&65535,c=t.high>>>16,o=t.high&65535,a=t.low>>>16,e=t.low&65535,u=0,i=0,d=0,h=0;return h+=l*e,d+=h>>>16,h&=65535,d+=p*e,i+=d>>>16,d&=65535,d+=l*a,i+=d>>>16,d&=65535,i+=s*e,u+=i>>>16,i&=65535,i+=p*a,u+=i>>>16,i&=65535,i+=l*o,u+=i>>>16,i&=65535,u+=n*e+s*a+p*o+l*c,u&=65535,M(d<<16|h,u<<16|i,this.unsigned)},A.mul=A.multiply,A.divide=function(t){if(dt(t)||(t=Lt(t)),t.isZero())throw Error("division by zero");if(_t){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var r=(this.unsigned?_t.div_u:_t.div_s)(this.low,this.high,t.low,t.high);return M(r,_t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Bt:Nt;var n,s,p;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Bt;if(t.gt(this.shru(1)))return Tn;p=Bt}else{if(this.eq(mt)){if(t.eq(ce)||t.eq(Fr))return mt;if(t.eq(mt))return ce;var l=this.shr(1);return n=l.div(t).shl(1),n.eq(Nt)?t.isNegative()?ce:Fr:(s=this.sub(t.mul(n)),p=n.add(s.div(t)),p)}else if(t.eq(mt))return this.unsigned?Bt:Nt;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();p=Nt}for(s=this;s.gte(t);){n=Math.max(1,Math.floor(s.toNumber()/t.toNumber()));for(var c=Math.ceil(Math.log(n)/Math.LN2),o=c<=48?1:sr(2,c-48),a=kt(n),e=a.mul(t);e.isNegative()||e.gt(s);)n-=o,a=kt(n,this.unsigned),e=a.mul(t);a.isZero()&&(a=ce),p=p.add(a),s=s.sub(e)}return p},A.div=A.divide,A.modulo=function(t){if(dt(t)||(t=Lt(t)),_t){var r=(this.unsigned?_t.rem_u:_t.rem_s)(this.low,this.high,t.low,t.high);return M(r,_t.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},A.mod=A.modulo,A.rem=A.modulo,A.not=function(){return M(~this.low,~this.high,this.unsigned)},A.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},A.clz=A.countLeadingZeros,A.countTrailingZeros=function(){return this.low?ma(this.low):ma(this.high)+32},A.ctz=A.countTrailingZeros,A.and=function(t){return dt(t)||(t=Lt(t)),M(this.low&t.low,this.high&t.high,this.unsigned)},A.or=function(t){return dt(t)||(t=Lt(t)),M(this.low|t.low,this.high|t.high,this.unsigned)},A.xor=function(t){return dt(t)||(t=Lt(t)),M(this.low^t.low,this.high^t.high,this.unsigned)},A.shiftLeft=function(t){return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?M(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):M(0,this.low<<t-32,this.unsigned)},A.shl=A.shiftLeft,A.shiftRight=function(t){return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?M(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):M(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},A.shr=A.shiftRight,A.shiftRightUnsigned=function(t){return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?M(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?M(this.high,0,this.unsigned):M(this.high>>>t-32,0,this.unsigned)},A.shru=A.shiftRightUnsigned,A.shr_u=A.shiftRightUnsigned,A.rotateLeft=function(t){var r;return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?M(this.high,this.low,this.unsigned):t<32?(r=32-t,M(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,M(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))},A.rotl=A.rotateLeft,A.rotateRight=function(t){var r;return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?M(this.high,this.low,this.unsigned):t<32?(r=32-t,M(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,M(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))},A.rotr=A.rotateRight,A.toSigned=function(){return this.unsigned?M(this.low,this.high,!1):this},A.toUnsigned=function(){return this.unsigned?this:M(this.low,this.high,!0)},A.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},A.toBytesLE=function(){var t=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},A.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,r>>>24,r>>>16&255,r>>>8&255,r&255]},W.fromBytes=function(t,r,n){return n?W.fromBytesLE(t,r):W.fromBytesBE(t,r)},W.fromBytesLE=function(t,r){return new W(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)},W.fromBytesBE=function(t,r){return new W(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)},ee=W}),T,Ho=I(()=>{T={},T.Offset,T.Table,T.SIZEOF_SHORT=2,T.SIZEOF_INT=4,T.FILE_IDENTIFIER_LENGTH=4,T.SIZE_PREFIX_LENGTH=4,T.Encoding={UTF8_BYTES:1,UTF16_STRING:2},T.int32=new Int32Array(2),T.float32=new Float32Array(T.int32.buffer),T.float64=new Float64Array(T.int32.buffer),T.isLittleEndian=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1,T.Long=function(t,r){this.low=t|0,this.high=r|0},T.Long.create=function(t,r){return t==0&&r==0?T.Long.ZERO:new T.Long(t,r)},T.Long.prototype.toFloat64=function(){return(this.low>>>0)+this.high*4294967296},T.Long.prototype.equals=function(t){return this.low==t.low&&this.high==t.high},T.Long.ZERO=new T.Long(0,0),T.Builder=function(t){if(t)var r=t;else var r=1024;this.bb=T.ByteBuffer.allocate(r),this.space=r,this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1},T.Builder.prototype.clear=function(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1},T.Builder.prototype.forceDefaults=function(t){this.force_defaults=t},T.Builder.prototype.dataBuffer=function(){return this.bb},T.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())},T.Builder.prototype.prep=function(t,r){t>this.minalign&&(this.minalign=t);for(var n=~(this.bb.capacity()-this.space+r)+1&t-1;this.space<n+t+r;){var s=this.bb.capacity();this.bb=T.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-s}this.pad(n)},T.Builder.prototype.pad=function(t){for(var r=0;r<t;r++)this.bb.writeInt8(--this.space,0)},T.Builder.prototype.writeInt8=function(t){this.bb.writeInt8(this.space-=1,t)},T.Builder.prototype.writeInt16=function(t){this.bb.writeInt16(this.space-=2,t)},T.Builder.prototype.writeInt32=function(t){this.bb.writeInt32(this.space-=4,t)},T.Builder.prototype.writeInt64=function(t){this.bb.writeInt64(this.space-=8,t)},T.Builder.prototype.writeFloat32=function(t){this.bb.writeFloat32(this.space-=4,t)},T.Builder.prototype.writeFloat64=function(t){this.bb.writeFloat64(this.space-=8,t)},T.Builder.prototype.addInt8=function(t){this.prep(1,0),this.writeInt8(t)},T.Builder.prototype.addInt16=function(t){this.prep(2,0),this.writeInt16(t)},T.Builder.prototype.addInt32=function(t){this.prep(4,0),this.writeInt32(t)},T.Builder.prototype.addInt64=function(t){this.prep(8,0),this.writeInt64(t)},T.Builder.prototype.addFloat32=function(t){this.prep(4,0),this.writeFloat32(t)},T.Builder.prototype.addFloat64=function(t){this.prep(8,0),this.writeFloat64(t)},T.Builder.prototype.addFieldInt8=function(t,r,n){(this.force_defaults||r!=n)&&(this.addInt8(r),this.slot(t))},T.Builder.prototype.addFieldInt16=function(t,r,n){(this.force_defaults||r!=n)&&(this.addInt16(r),this.slot(t))},T.Builder.prototype.addFieldInt32=function(t,r,n){(this.force_defaults||r!=n)&&(this.addInt32(r),this.slot(t))},T.Builder.prototype.addFieldInt64=function(t,r,n){(this.force_defaults||!r.equals(n))&&(this.addInt64(r),this.slot(t))},T.Builder.prototype.addFieldFloat32=function(t,r,n){(this.force_defaults||r!=n)&&(this.addFloat32(r),this.slot(t))},T.Builder.prototype.addFieldFloat64=function(t,r,n){(this.force_defaults||r!=n)&&(this.addFloat64(r),this.slot(t))},T.Builder.prototype.addFieldOffset=function(t,r,n){(this.force_defaults||r!=n)&&(this.addOffset(r),this.slot(t))},T.Builder.prototype.addFieldStruct=function(t,r,n){r!=n&&(this.nested(r),this.slot(t))},T.Builder.prototype.nested=function(t){if(t!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")},T.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")},T.Builder.prototype.slot=function(t){this.vtable[t]=this.offset()},T.Builder.prototype.offset=function(){return this.bb.capacity()-this.space},T.Builder.growByteBuffer=function(t){var r=t.capacity();if(r&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");var n=r<<1,s=T.ByteBuffer.allocate(n);return s.setPosition(n-r),s.bytes().set(t.bytes(),n-r),s},T.Builder.prototype.addOffset=function(t){this.prep(T.SIZEOF_INT,0),this.writeInt32(this.offset()-t+T.SIZEOF_INT)},T.Builder.prototype.startObject=function(t){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=t;for(var r=0;r<t;r++)this.vtable[r]=0;this.isNested=!0,this.object_start=this.offset()},T.Builder.prototype.endObject=function(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);for(var t=this.offset(),r=this.vtable_in_use-1;r>=0&&this.vtable[r]==0;r--);for(var n=r+1;r>=0;r--)this.addInt16(this.vtable[r]!=0?t-this.vtable[r]:0);var s=2;this.addInt16(t-this.object_start);var p=(n+s)*T.SIZEOF_SHORT;this.addInt16(p);var l=0,c=this.space;t:for(r=0;r<this.vtables.length;r++){var o=this.bb.capacity()-this.vtables[r];if(p==this.bb.readInt16(o)){for(var a=T.SIZEOF_SHORT;a<p;a+=T.SIZEOF_SHORT)if(this.bb.readInt16(c+a)!=this.bb.readInt16(o+a))continue t;l=this.vtables[r];break}}return l?(this.space=this.bb.capacity()-t,this.bb.writeInt32(this.space,l-t)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-t,this.offset()-t)),this.isNested=!1,t},T.Builder.prototype.finish=function(t,r,n){var s=n?T.SIZE_PREFIX_LENGTH:0;if(r){var p=r;if(this.prep(this.minalign,T.SIZEOF_INT+T.FILE_IDENTIFIER_LENGTH+s),p.length!=T.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+T.FILE_IDENTIFIER_LENGTH);for(var l=T.FILE_IDENTIFIER_LENGTH-1;l>=0;l--)this.writeInt8(p.charCodeAt(l))}this.prep(this.minalign,T.SIZEOF_INT+s),this.addOffset(t),s&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)},T.Builder.prototype.finishSizePrefixed=function(t,r){this.finish(t,r,!0)},T.Builder.prototype.requiredField=function(t,r){var n=this.bb.capacity()-t,s=n-this.bb.readInt32(n),p=this.bb.readInt16(s+r)!=0;if(!p)throw new Error("FlatBuffers: field "+r+" must be set")},T.Builder.prototype.startVector=function(t,r,n){this.notNested(),this.vector_num_elems=r,this.prep(T.SIZEOF_INT,t*r),this.prep(n,t*r)},T.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()},T.Builder.prototype.createString=function(t){if(t instanceof Uint8Array)var r=t;else for(var r=[],n=0;n<t.length;){var s,p=t.charCodeAt(n++);if(p<55296||p>=56320)s=p;else{var l=t.charCodeAt(n++);s=(p<<10)+l+-56613888}s<128?r.push(s):(s<2048?r.push(s>>6&31|192):(s<65536?r.push(s>>12&15|224):r.push(s>>18&7|240,s>>12&63|128),r.push(s>>6&63|128)),r.push(s&63|128))}this.addInt8(0),this.startVector(1,r.length,1),this.bb.setPosition(this.space-=r.length);for(var n=0,c=this.space,o=this.bb.bytes();n<r.length;n++)o[c++]=r[n];return this.endVector()},T.Builder.prototype.createLong=function(t,r){return T.Long.create(t,r)},T.ByteBuffer=function(t){this.bytes_=t,this.position_=0},T.ByteBuffer.allocate=function(t){return new T.ByteBuffer(new Uint8Array(t))},T.ByteBuffer.prototype.clear=function(){this.position_=0},T.ByteBuffer.prototype.bytes=function(){return this.bytes_},T.ByteBuffer.prototype.position=function(){return this.position_},T.ByteBuffer.prototype.setPosition=function(t){this.position_=t},T.ByteBuffer.prototype.capacity=function(){return this.bytes_.length},T.ByteBuffer.prototype.readInt8=function(t){return this.readUint8(t)<<24>>24},T.ByteBuffer.prototype.readUint8=function(t){return this.bytes_[t]},T.ByteBuffer.prototype.readInt16=function(t){return this.readUint16(t)<<16>>16},T.ByteBuffer.prototype.readUint16=function(t){return this.bytes_[t]|this.bytes_[t+1]<<8},T.ByteBuffer.prototype.readInt32=function(t){return this.bytes_[t]|this.bytes_[t+1]<<8|this.bytes_[t+2]<<16|this.bytes_[t+3]<<24},T.ByteBuffer.prototype.readUint32=function(t){return this.readInt32(t)>>>0},T.ByteBuffer.prototype.readInt64=function(t){return new T.Long(this.readInt32(t),this.readInt32(t+4))},T.ByteBuffer.prototype.readUint64=function(t){return new T.Long(this.readUint32(t),this.readUint32(t+4))},T.ByteBuffer.prototype.readFloat32=function(t){return T.int32[0]=this.readInt32(t),T.float32[0]},T.ByteBuffer.prototype.readFloat64=function(t){return T.int32[T.isLittleEndian?0:1]=this.readInt32(t),T.int32[T.isLittleEndian?1:0]=this.readInt32(t+4),T.float64[0]},T.ByteBuffer.prototype.writeInt8=function(t,r){this.bytes_[t]=r},T.ByteBuffer.prototype.writeUint8=function(t,r){this.bytes_[t]=r},T.ByteBuffer.prototype.writeInt16=function(t,r){this.bytes_[t]=r,this.bytes_[t+1]=r>>8},T.ByteBuffer.prototype.writeUint16=function(t,r){this.bytes_[t]=r,this.bytes_[t+1]=r>>8},T.ByteBuffer.prototype.writeInt32=function(t,r){this.bytes_[t]=r,this.bytes_[t+1]=r>>8,this.bytes_[t+2]=r>>16,this.bytes_[t+3]=r>>24},T.ByteBuffer.prototype.writeUint32=function(t,r){this.bytes_[t]=r,this.bytes_[t+1]=r>>8,this.bytes_[t+2]=r>>16,this.bytes_[t+3]=r>>24},T.ByteBuffer.prototype.writeInt64=function(t,r){this.writeInt32(t,r.low),this.writeInt32(t+4,r.high)},T.ByteBuffer.prototype.writeUint64=function(t,r){this.writeUint32(t,r.low),this.writeUint32(t+4,r.high)},T.ByteBuffer.prototype.writeFloat32=function(t,r){T.float32[0]=r,this.writeInt32(t,T.int32[0])},T.ByteBuffer.prototype.writeFloat64=function(t,r){T.float64[0]=r,this.writeInt32(t,T.int32[T.isLittleEndian?0:1]),this.writeInt32(t+4,T.int32[T.isLittleEndian?1:0])},T.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+T.SIZEOF_INT+T.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var t="",r=0;r<T.FILE_IDENTIFIER_LENGTH;r++)t+=String.fromCharCode(this.readInt8(this.position_+T.SIZEOF_INT+r));return t},T.ByteBuffer.prototype.__offset=function(t,r){var n=t-this.readInt32(t);return r<this.readInt16(n)?this.readInt16(n+r):0},T.ByteBuffer.prototype.__union=function(t,r){return t.bb_pos=r+this.readInt32(r),t.bb=this,t},T.ByteBuffer.prototype.__string=function(t,r){t+=this.readInt32(t);var n=this.readInt32(t),s="",p=0;if(t+=T.SIZEOF_INT,r===T.Encoding.UTF8_BYTES)return this.bytes_.subarray(t,t+n);for(;p<n;){var l,c=this.readUint8(t+p++);if(c<192)l=c;else{var o=this.readUint8(t+p++);if(c<224)l=(c&31)<<6|o&63;else{var a=this.readUint8(t+p++);if(c<240)l=(c&15)<<12|(o&63)<<6|a&63;else{var e=this.readUint8(t+p++);l=(c&7)<<18|(o&63)<<12|(a&63)<<6|e&63}}}l<65536?s+=String.fromCharCode(l):(l-=65536,s+=String.fromCharCode((l>>10)+55296,(l&1023)+56320))}return s},T.ByteBuffer.prototype.__indirect=function(t){return t+this.readInt32(t)},T.ByteBuffer.prototype.__vector=function(t){return t+this.readInt32(t)+T.SIZEOF_INT},T.ByteBuffer.prototype.__vector_len=function(t){return this.readInt32(t+this.readInt32(t))},T.ByteBuffer.prototype.__has_identifier=function(t){if(t.length!=T.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+T.FILE_IDENTIFIER_LENGTH);for(var r=0;r<T.FILE_IDENTIFIER_LENGTH;r++)if(t.charCodeAt(r)!=this.readInt8(this.position_+T.SIZEOF_INT+r))return!1;return!0},T.ByteBuffer.prototype.createLong=function(t,r){return T.Long.create(t,r)}}),H,Zr=I(()=>{"use strict";Ho(),(t=>{let r;(n=>{let s;(p=>{let l;(c=>(c[c.UNDEFINED=0]="UNDEFINED",c[c.FLOAT=1]="FLOAT",c[c.INT=2]="INT",c[c.STRING=3]="STRING",c[c.TENSOR=4]="TENSOR",c[c.GRAPH=5]="GRAPH",c[c.FLOATS=6]="FLOATS",c[c.INTS=7]="INTS",c[c.STRINGS=8]="STRINGS",c[c.TENSORS=9]="TENSORS",c[c.GRAPHS=10]="GRAPHS",c[c.SPARSE_TENSOR=11]="SPARSE_TENSOR",c[c.SPARSE_TENSORS=12]="SPARSE_TENSORS"))(l=p.AttributeType||(p.AttributeType={}))})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{let l;(c=>(c[c.UNKNOWN=0]="UNKNOWN",c[c.VALUE=1]="VALUE",c[c.PARAM=2]="PARAM"))(l=p.DimensionValueType||(p.DimensionValueType={}))})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{let l;(c=>(c[c.UNDEFINED=0]="UNDEFINED",c[c.FLOAT=1]="FLOAT",c[c.UINT8=2]="UINT8",c[c.INT8=3]="INT8",c[c.UINT16=4]="UINT16",c[c.INT16=5]="INT16",c[c.INT32=6]="INT32",c[c.INT64=7]="INT64",c[c.STRING=8]="STRING",c[c.BOOL=9]="BOOL",c[c.FLOAT16=10]="FLOAT16",c[c.DOUBLE=11]="DOUBLE",c[c.UINT32=12]="UINT32",c[c.UINT64=13]="UINT64",c[c.COMPLEX64=14]="COMPLEX64",c[c.COMPLEX128=15]="COMPLEX128",c[c.BFLOAT16=16]="BFLOAT16",c[c.FLOAT8E4M3FN=17]="FLOAT8E4M3FN",c[c.FLOAT8E4M3FNUZ=18]="FLOAT8E4M3FNUZ",c[c.FLOAT8E5M2=19]="FLOAT8E5M2",c[c.FLOAT8E5M2FNUZ=20]="FLOAT8E5M2FNUZ"))(l=p.TensorDataType||(p.TensorDataType={}))})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{let l;(c=>(c[c.Primitive=0]="Primitive",c[c.Fused=1]="Fused"))(l=p.NodeType||(p.NodeType={}))})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{let l;(c=>(c[c.NONE=0]="NONE",c[c.tensor_type=1]="tensor_type",c[c.sequence_type=2]="sequence_type",c[c.map_type=3]="map_type"))(l=p.TypeInfoValue||(p.TypeInfoValue={}))})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsShape(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsShape(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}dim(o,a){let e=this.bb.__offset(this.bb_pos,4);return e?(a||new t.experimental.fbs.Dimension).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}dimLength(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.__vector_len(this.bb_pos+o):0}static startShape(o){o.startObject(1)}static addDim(o,a){o.addFieldOffset(0,a,0)}static createDimVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startDimVector(o,a){o.startVector(4,a,4)}static endShape(o){return o.endObject()}static createShape(o,a){return l.startShape(o),l.addDim(o,a),l.endShape(o)}}p.Shape=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsDimension(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsDimension(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}value(o){let a=this.bb.__offset(this.bb_pos,4);return a?(o||new t.experimental.fbs.DimensionValue).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}denotation(o){let a=this.bb.__offset(this.bb_pos,6);return a?this.bb.__string(this.bb_pos+a,o):null}static startDimension(o){o.startObject(2)}static addValue(o,a){o.addFieldOffset(0,a,0)}static addDenotation(o,a){o.addFieldOffset(1,a,0)}static endDimension(o){return o.endObject()}static createDimension(o,a,e){return l.startDimension(o),l.addValue(o,a),l.addDenotation(o,e),l.endDimension(o)}}p.Dimension=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsDimensionValue(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsDimensionValue(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}dimType(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.readInt8(this.bb_pos+o):0}dimValue(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.readInt64(this.bb_pos+o):this.bb.createLong(0,0)}dimParam(o){let a=this.bb.__offset(this.bb_pos,8);return a?this.bb.__string(this.bb_pos+a,o):null}static startDimensionValue(o){o.startObject(3)}static addDimType(o,a){o.addFieldInt8(0,a,0)}static addDimValue(o,a){o.addFieldInt64(1,a,o.createLong(0,0))}static addDimParam(o,a){o.addFieldOffset(2,a,0)}static endDimensionValue(o){return o.endObject()}static createDimensionValue(o,a,e,u){return l.startDimensionValue(o),l.addDimType(o,a),l.addDimValue(o,e),l.addDimParam(o,u),l.endDimensionValue(o)}}p.DimensionValue=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsTensorTypeAndShape(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsTensorTypeAndShape(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}elemType(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.readInt32(this.bb_pos+o):0}shape(o){let a=this.bb.__offset(this.bb_pos,6);return a?(o||new t.experimental.fbs.Shape).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}static startTensorTypeAndShape(o){o.startObject(2)}static addElemType(o,a){o.addFieldInt32(0,a,0)}static addShape(o,a){o.addFieldOffset(1,a,0)}static endTensorTypeAndShape(o){return o.endObject()}static createTensorTypeAndShape(o,a,e){return l.startTensorTypeAndShape(o),l.addElemType(o,a),l.addShape(o,e),l.endTensorTypeAndShape(o)}}p.TensorTypeAndShape=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsMapType(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsMapType(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}keyType(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.readInt32(this.bb_pos+o):0}valueType(o){let a=this.bb.__offset(this.bb_pos,6);return a?(o||new t.experimental.fbs.TypeInfo).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}static startMapType(o){o.startObject(2)}static addKeyType(o,a){o.addFieldInt32(0,a,0)}static addValueType(o,a){o.addFieldOffset(1,a,0)}static endMapType(o){return o.endObject()}static createMapType(o,a,e){return l.startMapType(o),l.addKeyType(o,a),l.addValueType(o,e),l.endMapType(o)}}p.MapType=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsSequenceType(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsSequenceType(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}elemType(o){let a=this.bb.__offset(this.bb_pos,4);return a?(o||new t.experimental.fbs.TypeInfo).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}static startSequenceType(o){o.startObject(1)}static addElemType(o,a){o.addFieldOffset(0,a,0)}static endSequenceType(o){return o.endObject()}static createSequenceType(o,a){return l.startSequenceType(o),l.addElemType(o,a),l.endSequenceType(o)}}p.SequenceType=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}nodeIndex(){return this.bb.readUint32(this.bb_pos)}srcArgIndex(){return this.bb.readInt32(this.bb_pos+4)}dstArgIndex(){return this.bb.readInt32(this.bb_pos+8)}static createEdgeEnd(o,a,e,u){return o.prep(4,12),o.writeInt32(u),o.writeInt32(e),o.writeInt32(a),o.offset()}}p.EdgeEnd=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsNodeEdge(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsNodeEdge(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}nodeIndex(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.readUint32(this.bb_pos+o):0}inputEdges(o,a){let e=this.bb.__offset(this.bb_pos,6);return e?(a||new t.experimental.fbs.EdgeEnd).__init(this.bb.__vector(this.bb_pos+e)+o*12,this.bb):null}inputEdgesLength(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.__vector_len(this.bb_pos+o):0}outputEdges(o,a){let e=this.bb.__offset(this.bb_pos,8);return e?(a||new t.experimental.fbs.EdgeEnd).__init(this.bb.__vector(this.bb_pos+e)+o*12,this.bb):null}outputEdgesLength(){let o=this.bb.__offset(this.bb_pos,8);return o?this.bb.__vector_len(this.bb_pos+o):0}static startNodeEdge(o){o.startObject(3)}static addNodeIndex(o,a){o.addFieldInt32(0,a,0)}static addInputEdges(o,a){o.addFieldOffset(1,a,0)}static startInputEdgesVector(o,a){o.startVector(12,a,4)}static addOutputEdges(o,a){o.addFieldOffset(2,a,0)}static startOutputEdgesVector(o,a){o.startVector(12,a,4)}static endNodeEdge(o){return o.endObject()}static createNodeEdge(o,a,e,u){return l.startNodeEdge(o),l.addNodeIndex(o,a),l.addInputEdges(o,e),l.addOutputEdges(o,u),l.endNodeEdge(o)}}p.NodeEdge=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsNode(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsNode(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}name(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}docString(o){let a=this.bb.__offset(this.bb_pos,6);return a?this.bb.__string(this.bb_pos+a,o):null}domain(o){let a=this.bb.__offset(this.bb_pos,8);return a?this.bb.__string(this.bb_pos+a,o):null}sinceVersion(){let o=this.bb.__offset(this.bb_pos,10);return o?this.bb.readInt32(this.bb_pos+o):0}index(){let o=this.bb.__offset(this.bb_pos,12);return o?this.bb.readUint32(this.bb_pos+o):0}opType(o){let a=this.bb.__offset(this.bb_pos,14);return a?this.bb.__string(this.bb_pos+a,o):null}type(){let o=this.bb.__offset(this.bb_pos,16);return o?this.bb.readInt32(this.bb_pos+o):0}executionProviderType(o){let a=this.bb.__offset(this.bb_pos,18);return a?this.bb.__string(this.bb_pos+a,o):null}inputs(o,a){let e=this.bb.__offset(this.bb_pos,20);return e?this.bb.__string(this.bb.__vector(this.bb_pos+e)+o*4,a):null}inputsLength(){let o=this.bb.__offset(this.bb_pos,20);return o?this.bb.__vector_len(this.bb_pos+o):0}outputs(o,a){let e=this.bb.__offset(this.bb_pos,22);return e?this.bb.__string(this.bb.__vector(this.bb_pos+e)+o*4,a):null}outputsLength(){let o=this.bb.__offset(this.bb_pos,22);return o?this.bb.__vector_len(this.bb_pos+o):0}attributes(o,a){let e=this.bb.__offset(this.bb_pos,24);return e?(a||new t.experimental.fbs.Attribute).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}attributesLength(){let o=this.bb.__offset(this.bb_pos,24);return o?this.bb.__vector_len(this.bb_pos+o):0}inputArgCounts(o){let a=this.bb.__offset(this.bb_pos,26);return a?this.bb.readInt32(this.bb.__vector(this.bb_pos+a)+o*4):0}inputArgCountsLength(){let o=this.bb.__offset(this.bb_pos,26);return o?this.bb.__vector_len(this.bb_pos+o):0}inputArgCountsArray(){let o=this.bb.__offset(this.bb_pos,26);return o?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+o),this.bb.__vector_len(this.bb_pos+o)):null}implicitInputs(o,a){let e=this.bb.__offset(this.bb_pos,28);return e?this.bb.__string(this.bb.__vector(this.bb_pos+e)+o*4,a):null}implicitInputsLength(){let o=this.bb.__offset(this.bb_pos,28);return o?this.bb.__vector_len(this.bb_pos+o):0}static startNode(o){o.startObject(13)}static addName(o,a){o.addFieldOffset(0,a,0)}static addDocString(o,a){o.addFieldOffset(1,a,0)}static addDomain(o,a){o.addFieldOffset(2,a,0)}static addSinceVersion(o,a){o.addFieldInt32(3,a,0)}static addIndex(o,a){o.addFieldInt32(4,a,0)}static addOpType(o,a){o.addFieldOffset(5,a,0)}static addType(o,a){o.addFieldInt32(6,a,0)}static addExecutionProviderType(o,a){o.addFieldOffset(7,a,0)}static addInputs(o,a){o.addFieldOffset(8,a,0)}static createInputsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startInputsVector(o,a){o.startVector(4,a,4)}static addOutputs(o,a){o.addFieldOffset(9,a,0)}static createOutputsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startOutputsVector(o,a){o.startVector(4,a,4)}static addAttributes(o,a){o.addFieldOffset(10,a,0)}static createAttributesVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startAttributesVector(o,a){o.startVector(4,a,4)}static addInputArgCounts(o,a){o.addFieldOffset(11,a,0)}static createInputArgCountsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addInt32(a[e]);return o.endVector()}static startInputArgCountsVector(o,a){o.startVector(4,a,4)}static addImplicitInputs(o,a){o.addFieldOffset(12,a,0)}static createImplicitInputsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startImplicitInputsVector(o,a){o.startVector(4,a,4)}static endNode(o){return o.endObject()}static createNode(o,a,e,u,i,d,h,m,b,x,E,w,S,$){return l.startNode(o),l.addName(o,a),l.addDocString(o,e),l.addDomain(o,u),l.addSinceVersion(o,i),l.addIndex(o,d),l.addOpType(o,h),l.addType(o,m),l.addExecutionProviderType(o,b),l.addInputs(o,x),l.addOutputs(o,E),l.addAttributes(o,w),l.addInputArgCounts(o,S),l.addImplicitInputs(o,$),l.endNode(o)}}p.Node=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsValueInfo(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsValueInfo(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}name(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}docString(o){let a=this.bb.__offset(this.bb_pos,6);return a?this.bb.__string(this.bb_pos+a,o):null}type(o){let a=this.bb.__offset(this.bb_pos,8);return a?(o||new t.experimental.fbs.TypeInfo).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}static startValueInfo(o){o.startObject(3)}static addName(o,a){o.addFieldOffset(0,a,0)}static addDocString(o,a){o.addFieldOffset(1,a,0)}static addType(o,a){o.addFieldOffset(2,a,0)}static endValueInfo(o){return o.endObject()}static createValueInfo(o,a,e,u){return l.startValueInfo(o),l.addName(o,a),l.addDocString(o,e),l.addType(o,u),l.endValueInfo(o)}}p.ValueInfo=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsTypeInfo(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsTypeInfo(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}denotation(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}valueType(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.readUint8(this.bb_pos+o):0}value(o){let a=this.bb.__offset(this.bb_pos,8);return a?this.bb.__union(o,this.bb_pos+a):null}static startTypeInfo(o){o.startObject(3)}static addDenotation(o,a){o.addFieldOffset(0,a,0)}static addValueType(o,a){o.addFieldInt8(1,a,0)}static addValue(o,a){o.addFieldOffset(2,a,0)}static endTypeInfo(o){return o.endObject()}static createTypeInfo(o,a,e,u){return l.startTypeInfo(o),l.addDenotation(o,a),l.addValueType(o,e),l.addValue(o,u),l.endTypeInfo(o)}}p.TypeInfo=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsOperatorSetId(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsOperatorSetId(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}domain(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}version(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.readInt64(this.bb_pos+o):this.bb.createLong(0,0)}static startOperatorSetId(o){o.startObject(2)}static addDomain(o,a){o.addFieldOffset(0,a,0)}static addVersion(o,a){o.addFieldInt64(1,a,o.createLong(0,0))}static endOperatorSetId(o){return o.endObject()}static createOperatorSetId(o,a,e){return l.startOperatorSetId(o),l.addDomain(o,a),l.addVersion(o,e),l.endOperatorSetId(o)}}p.OperatorSetId=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsTensor(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsTensor(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}name(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}docString(o){let a=this.bb.__offset(this.bb_pos,6);return a?this.bb.__string(this.bb_pos+a,o):null}dims(o){let a=this.bb.__offset(this.bb_pos,8);return a?this.bb.readInt64(this.bb.__vector(this.bb_pos+a)+o*8):this.bb.createLong(0,0)}dimsLength(){let o=this.bb.__offset(this.bb_pos,8);return o?this.bb.__vector_len(this.bb_pos+o):0}dataType(){let o=this.bb.__offset(this.bb_pos,10);return o?this.bb.readInt32(this.bb_pos+o):0}rawData(o){let a=this.bb.__offset(this.bb_pos,12);return a?this.bb.readUint8(this.bb.__vector(this.bb_pos+a)+o):0}rawDataLength(){let o=this.bb.__offset(this.bb_pos,12);return o?this.bb.__vector_len(this.bb_pos+o):0}rawDataArray(){let o=this.bb.__offset(this.bb_pos,12);return o?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+o),this.bb.__vector_len(this.bb_pos+o)):null}stringData(o,a){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__string(this.bb.__vector(this.bb_pos+e)+o*4,a):null}stringDataLength(){let o=this.bb.__offset(this.bb_pos,14);return o?this.bb.__vector_len(this.bb_pos+o):0}static startTensor(o){o.startObject(6)}static addName(o,a){o.addFieldOffset(0,a,0)}static addDocString(o,a){o.addFieldOffset(1,a,0)}static addDims(o,a){o.addFieldOffset(2,a,0)}static createDimsVector(o,a){o.startVector(8,a.length,8);for(let e=a.length-1;e>=0;e--)o.addInt64(a[e]);return o.endVector()}static startDimsVector(o,a){o.startVector(8,a,8)}static addDataType(o,a){o.addFieldInt32(3,a,0)}static addRawData(o,a){o.addFieldOffset(4,a,0)}static createRawDataVector(o,a){o.startVector(1,a.length,1);for(let e=a.length-1;e>=0;e--)o.addInt8(a[e]);return o.endVector()}static startRawDataVector(o,a){o.startVector(1,a,1)}static addStringData(o,a){o.addFieldOffset(5,a,0)}static createStringDataVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startStringDataVector(o,a){o.startVector(4,a,4)}static endTensor(o){return o.endObject()}static createTensor(o,a,e,u,i,d,h){return l.startTensor(o),l.addName(o,a),l.addDocString(o,e),l.addDims(o,u),l.addDataType(o,i),l.addRawData(o,d),l.addStringData(o,h),l.endTensor(o)}}p.Tensor=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsSparseTensor(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsSparseTensor(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}values(o){let a=this.bb.__offset(this.bb_pos,4);return a?(o||new t.experimental.fbs.Tensor).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}indices(o){let a=this.bb.__offset(this.bb_pos,6);return a?(o||new t.experimental.fbs.Tensor).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}dims(o){let a=this.bb.__offset(this.bb_pos,8);return a?this.bb.readInt64(this.bb.__vector(this.bb_pos+a)+o*8):this.bb.createLong(0,0)}dimsLength(){let o=this.bb.__offset(this.bb_pos,8);return o?this.bb.__vector_len(this.bb_pos+o):0}static startSparseTensor(o){o.startObject(3)}static addValues(o,a){o.addFieldOffset(0,a,0)}static addIndices(o,a){o.addFieldOffset(1,a,0)}static addDims(o,a){o.addFieldOffset(2,a,0)}static createDimsVector(o,a){o.startVector(8,a.length,8);for(let e=a.length-1;e>=0;e--)o.addInt64(a[e]);return o.endVector()}static startDimsVector(o,a){o.startVector(8,a,8)}static endSparseTensor(o){return o.endObject()}static createSparseTensor(o,a,e,u){return l.startSparseTensor(o),l.addValues(o,a),l.addIndices(o,e),l.addDims(o,u),l.endSparseTensor(o)}}p.SparseTensor=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsAttribute(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsAttribute(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}name(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}docString(o){let a=this.bb.__offset(this.bb_pos,6);return a?this.bb.__string(this.bb_pos+a,o):null}type(){let o=this.bb.__offset(this.bb_pos,8);return o?this.bb.readInt32(this.bb_pos+o):0}f(){let o=this.bb.__offset(this.bb_pos,10);return o?this.bb.readFloat32(this.bb_pos+o):0}i(){let o=this.bb.__offset(this.bb_pos,12);return o?this.bb.readInt64(this.bb_pos+o):this.bb.createLong(0,0)}s(o){let a=this.bb.__offset(this.bb_pos,14);return a?this.bb.__string(this.bb_pos+a,o):null}t(o){let a=this.bb.__offset(this.bb_pos,16);return a?(o||new t.experimental.fbs.Tensor).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}g(o){let a=this.bb.__offset(this.bb_pos,18);return a?(o||new t.experimental.fbs.Graph).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}floats(o){let a=this.bb.__offset(this.bb_pos,20);return a?this.bb.readFloat32(this.bb.__vector(this.bb_pos+a)+o*4):0}floatsLength(){let o=this.bb.__offset(this.bb_pos,20);return o?this.bb.__vector_len(this.bb_pos+o):0}floatsArray(){let o=this.bb.__offset(this.bb_pos,20);return o?new Float32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+o),this.bb.__vector_len(this.bb_pos+o)):null}ints(o){let a=this.bb.__offset(this.bb_pos,22);return a?this.bb.readInt64(this.bb.__vector(this.bb_pos+a)+o*8):this.bb.createLong(0,0)}intsLength(){let o=this.bb.__offset(this.bb_pos,22);return o?this.bb.__vector_len(this.bb_pos+o):0}strings(o,a){let e=this.bb.__offset(this.bb_pos,24);return e?this.bb.__string(this.bb.__vector(this.bb_pos+e)+o*4,a):null}stringsLength(){let o=this.bb.__offset(this.bb_pos,24);return o?this.bb.__vector_len(this.bb_pos+o):0}tensors(o,a){let e=this.bb.__offset(this.bb_pos,26);return e?(a||new t.experimental.fbs.Tensor).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}tensorsLength(){let o=this.bb.__offset(this.bb_pos,26);return o?this.bb.__vector_len(this.bb_pos+o):0}graphs(o,a){let e=this.bb.__offset(this.bb_pos,28);return e?(a||new t.experimental.fbs.Graph).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}graphsLength(){let o=this.bb.__offset(this.bb_pos,28);return o?this.bb.__vector_len(this.bb_pos+o):0}static startAttribute(o){o.startObject(13)}static addName(o,a){o.addFieldOffset(0,a,0)}static addDocString(o,a){o.addFieldOffset(1,a,0)}static addType(o,a){o.addFieldInt32(2,a,0)}static addF(o,a){o.addFieldFloat32(3,a,0)}static addI(o,a){o.addFieldInt64(4,a,o.createLong(0,0))}static addS(o,a){o.addFieldOffset(5,a,0)}static addT(o,a){o.addFieldOffset(6,a,0)}static addG(o,a){o.addFieldOffset(7,a,0)}static addFloats(o,a){o.addFieldOffset(8,a,0)}static createFloatsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addFloat32(a[e]);return o.endVector()}static startFloatsVector(o,a){o.startVector(4,a,4)}static addInts(o,a){o.addFieldOffset(9,a,0)}static createIntsVector(o,a){o.startVector(8,a.length,8);for(let e=a.length-1;e>=0;e--)o.addInt64(a[e]);return o.endVector()}static startIntsVector(o,a){o.startVector(8,a,8)}static addStrings(o,a){o.addFieldOffset(10,a,0)}static createStringsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startStringsVector(o,a){o.startVector(4,a,4)}static addTensors(o,a){o.addFieldOffset(11,a,0)}static createTensorsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startTensorsVector(o,a){o.startVector(4,a,4)}static addGraphs(o,a){o.addFieldOffset(12,a,0)}static createGraphsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startGraphsVector(o,a){o.startVector(4,a,4)}static endAttribute(o){return o.endObject()}static createAttribute(o,a,e,u,i,d,h,m,b,x,E,w,S,$){return l.startAttribute(o),l.addName(o,a),l.addDocString(o,e),l.addType(o,u),l.addF(o,i),l.addI(o,d),l.addS(o,h),l.addT(o,m),l.addG(o,b),l.addFloats(o,x),l.addInts(o,E),l.addStrings(o,w),l.addTensors(o,S),l.addGraphs(o,$),l.endAttribute(o)}}p.Attribute=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsGraph(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsGraph(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}initializers(o,a){let e=this.bb.__offset(this.bb_pos,4);return e?(a||new t.experimental.fbs.Tensor).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}initializersLength(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.__vector_len(this.bb_pos+o):0}nodeArgs(o,a){let e=this.bb.__offset(this.bb_pos,6);return e?(a||new t.experimental.fbs.ValueInfo).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}nodeArgsLength(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.__vector_len(this.bb_pos+o):0}nodes(o,a){let e=this.bb.__offset(this.bb_pos,8);return e?(a||new t.experimental.fbs.Node).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}nodesLength(){let o=this.bb.__offset(this.bb_pos,8);return o?this.bb.__vector_len(this.bb_pos+o):0}maxNodeIndex(){let o=this.bb.__offset(this.bb_pos,10);return o?this.bb.readUint32(this.bb_pos+o):0}nodeEdges(o,a){let e=this.bb.__offset(this.bb_pos,12);return e?(a||new t.experimental.fbs.NodeEdge).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}nodeEdgesLength(){let o=this.bb.__offset(this.bb_pos,12);return o?this.bb.__vector_len(this.bb_pos+o):0}inputs(o,a){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__string(this.bb.__vector(this.bb_pos+e)+o*4,a):null}inputsLength(){let o=this.bb.__offset(this.bb_pos,14);return o?this.bb.__vector_len(this.bb_pos+o):0}outputs(o,a){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__string(this.bb.__vector(this.bb_pos+e)+o*4,a):null}outputsLength(){let o=this.bb.__offset(this.bb_pos,16);return o?this.bb.__vector_len(this.bb_pos+o):0}sparseInitializers(o,a){let e=this.bb.__offset(this.bb_pos,18);return e?(a||new t.experimental.fbs.SparseTensor).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}sparseInitializersLength(){let o=this.bb.__offset(this.bb_pos,18);return o?this.bb.__vector_len(this.bb_pos+o):0}static startGraph(o){o.startObject(8)}static addInitializers(o,a){o.addFieldOffset(0,a,0)}static createInitializersVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startInitializersVector(o,a){o.startVector(4,a,4)}static addNodeArgs(o,a){o.addFieldOffset(1,a,0)}static createNodeArgsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startNodeArgsVector(o,a){o.startVector(4,a,4)}static addNodes(o,a){o.addFieldOffset(2,a,0)}static createNodesVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startNodesVector(o,a){o.startVector(4,a,4)}static addMaxNodeIndex(o,a){o.addFieldInt32(3,a,0)}static addNodeEdges(o,a){o.addFieldOffset(4,a,0)}static createNodeEdgesVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startNodeEdgesVector(o,a){o.startVector(4,a,4)}static addInputs(o,a){o.addFieldOffset(5,a,0)}static createInputsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startInputsVector(o,a){o.startVector(4,a,4)}static addOutputs(o,a){o.addFieldOffset(6,a,0)}static createOutputsVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startOutputsVector(o,a){o.startVector(4,a,4)}static addSparseInitializers(o,a){o.addFieldOffset(7,a,0)}static createSparseInitializersVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startSparseInitializersVector(o,a){o.startVector(4,a,4)}static endGraph(o){return o.endObject()}static createGraph(o,a,e,u,i,d,h,m,b){return l.startGraph(o),l.addInitializers(o,a),l.addNodeArgs(o,e),l.addNodes(o,u),l.addMaxNodeIndex(o,i),l.addNodeEdges(o,d),l.addInputs(o,h),l.addOutputs(o,m),l.addSparseInitializers(o,b),l.endGraph(o)}}p.Graph=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsModel(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsModel(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}irVersion(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.readInt64(this.bb_pos+o):this.bb.createLong(0,0)}opsetImport(o,a){let e=this.bb.__offset(this.bb_pos,6);return e?(a||new t.experimental.fbs.OperatorSetId).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}opsetImportLength(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.__vector_len(this.bb_pos+o):0}producerName(o){let a=this.bb.__offset(this.bb_pos,8);return a?this.bb.__string(this.bb_pos+a,o):null}producerVersion(o){let a=this.bb.__offset(this.bb_pos,10);return a?this.bb.__string(this.bb_pos+a,o):null}domain(o){let a=this.bb.__offset(this.bb_pos,12);return a?this.bb.__string(this.bb_pos+a,o):null}modelVersion(){let o=this.bb.__offset(this.bb_pos,14);return o?this.bb.readInt64(this.bb_pos+o):this.bb.createLong(0,0)}docString(o){let a=this.bb.__offset(this.bb_pos,16);return a?this.bb.__string(this.bb_pos+a,o):null}graph(o){let a=this.bb.__offset(this.bb_pos,18);return a?(o||new t.experimental.fbs.Graph).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}graphDocString(o){let a=this.bb.__offset(this.bb_pos,20);return a?this.bb.__string(this.bb_pos+a,o):null}static startModel(o){o.startObject(9)}static addIrVersion(o,a){o.addFieldInt64(0,a,o.createLong(0,0))}static addOpsetImport(o,a){o.addFieldOffset(1,a,0)}static createOpsetImportVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startOpsetImportVector(o,a){o.startVector(4,a,4)}static addProducerName(o,a){o.addFieldOffset(2,a,0)}static addProducerVersion(o,a){o.addFieldOffset(3,a,0)}static addDomain(o,a){o.addFieldOffset(4,a,0)}static addModelVersion(o,a){o.addFieldInt64(5,a,o.createLong(0,0))}static addDocString(o,a){o.addFieldOffset(6,a,0)}static addGraph(o,a){o.addFieldOffset(7,a,0)}static addGraphDocString(o,a){o.addFieldOffset(8,a,0)}static endModel(o){return o.endObject()}static createModel(o,a,e,u,i,d,h,m,b,x){return l.startModel(o),l.addIrVersion(o,a),l.addOpsetImport(o,e),l.addProducerName(o,u),l.addProducerVersion(o,i),l.addDomain(o,d),l.addModelVersion(o,h),l.addDocString(o,m),l.addGraph(o,b),l.addGraphDocString(o,x),l.endModel(o)}}p.Model=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsKernelCreateInfos(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsKernelCreateInfos(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}nodeIndices(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.readUint32(this.bb.__vector(this.bb_pos+a)+o*4):0}nodeIndicesLength(){let o=this.bb.__offset(this.bb_pos,4);return o?this.bb.__vector_len(this.bb_pos+o):0}nodeIndicesArray(){let o=this.bb.__offset(this.bb_pos,4);return o?new Uint32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+o),this.bb.__vector_len(this.bb_pos+o)):null}kernelDefHashes(o){let a=this.bb.__offset(this.bb_pos,6);return a?this.bb.readUint64(this.bb.__vector(this.bb_pos+a)+o*8):this.bb.createLong(0,0)}kernelDefHashesLength(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.__vector_len(this.bb_pos+o):0}static startKernelCreateInfos(o){o.startObject(2)}static addNodeIndices(o,a){o.addFieldOffset(0,a,0)}static createNodeIndicesVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addInt32(a[e]);return o.endVector()}static startNodeIndicesVector(o,a){o.startVector(4,a,4)}static addKernelDefHashes(o,a){o.addFieldOffset(1,a,0)}static createKernelDefHashesVector(o,a){o.startVector(8,a.length,8);for(let e=a.length-1;e>=0;e--)o.addInt64(a[e]);return o.endVector()}static startKernelDefHashesVector(o,a){o.startVector(8,a,8)}static endKernelCreateInfos(o){return o.endObject()}static createKernelCreateInfos(o,a,e){return l.startKernelCreateInfos(o),l.addNodeIndices(o,a),l.addKernelDefHashes(o,e),l.endKernelCreateInfos(o)}}p.KernelCreateInfos=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsSubGraphSessionState(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsSubGraphSessionState(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}graphId(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}sessionState(o){let a=this.bb.__offset(this.bb_pos,6);return a?(o||new t.experimental.fbs.SessionState).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}static startSubGraphSessionState(o){o.startObject(2)}static addGraphId(o,a){o.addFieldOffset(0,a,0)}static addSessionState(o,a){o.addFieldOffset(1,a,0)}static endSubGraphSessionState(o){let a=o.endObject();return o.requiredField(a,4),a}static createSubGraphSessionState(o,a,e){return l.startSubGraphSessionState(o),l.addGraphId(o,a),l.addSessionState(o,e),l.endSubGraphSessionState(o)}}p.SubGraphSessionState=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsSessionState(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsSessionState(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}kernels(o){let a=this.bb.__offset(this.bb_pos,4);return a?(o||new t.experimental.fbs.KernelCreateInfos).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}subGraphSessionStates(o,a){let e=this.bb.__offset(this.bb_pos,6);return e?(a||new t.experimental.fbs.SubGraphSessionState).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+e)+o*4),this.bb):null}subGraphSessionStatesLength(){let o=this.bb.__offset(this.bb_pos,6);return o?this.bb.__vector_len(this.bb_pos+o):0}static startSessionState(o){o.startObject(2)}static addKernels(o,a){o.addFieldOffset(0,a,0)}static addSubGraphSessionStates(o,a){o.addFieldOffset(1,a,0)}static createSubGraphSessionStatesVector(o,a){o.startVector(4,a.length,4);for(let e=a.length-1;e>=0;e--)o.addOffset(a[e]);return o.endVector()}static startSubGraphSessionStatesVector(o,a){o.startVector(4,a,4)}static endSessionState(o){return o.endObject()}static createSessionState(o,a,e){return l.startSessionState(o),l.addKernels(o,a),l.addSubGraphSessionStates(o,e),l.endSessionState(o)}}p.SessionState=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={})),(t=>{let r;(n=>{let s;(p=>{class l{constructor(){this.bb=null,this.bb_pos=0}__init(o,a){return this.bb_pos=o,this.bb=a,this}static getRootAsInferenceSession(o,a){return(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static getSizePrefixedRootAsInferenceSession(o,a){return o.setPosition(o.position()+T.SIZE_PREFIX_LENGTH),(a||new l).__init(o.readInt32(o.position())+o.position(),o)}static bufferHasIdentifier(o){return o.__has_identifier("ORTM")}ortVersion(o){let a=this.bb.__offset(this.bb_pos,4);return a?this.bb.__string(this.bb_pos+a,o):null}model(o){let a=this.bb.__offset(this.bb_pos,6);return a?(o||new t.experimental.fbs.Model).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}sessionState(o){let a=this.bb.__offset(this.bb_pos,8);return a?(o||new t.experimental.fbs.SessionState).__init(this.bb.__indirect(this.bb_pos+a),this.bb):null}static startInferenceSession(o){o.startObject(3)}static addOrtVersion(o,a){o.addFieldOffset(0,a,0)}static addModel(o,a){o.addFieldOffset(1,a,0)}static addSessionState(o,a){o.addFieldOffset(2,a,0)}static endInferenceSession(o){return o.endObject()}static finishInferenceSessionBuffer(o,a){o.finish(a,"ORTM")}static finishSizePrefixedInferenceSessionBuffer(o,a){o.finish(a,"ORTM",!0)}static createInferenceSession(o,a,e,u){return l.startInferenceSession(o),l.addOrtVersion(o,a),l.addModel(o,e),l.addSessionState(o,u),l.endInferenceSession(o)}}p.InferenceSession=l})(s=n.fbs||(n.fbs={}))})(r=t.experimental||(t.experimental={}))})(H||(H={}))}),Ch=nt((t,r)=>{"use strict";r.exports=n;function n(s,p){for(var l=new Array(arguments.length-1),c=0,o=2,a=!0;o<arguments.length;)l[c++]=arguments[o++];return new Promise(function(e,u){l[c]=function(i){if(a)if(a=!1,i)u(i);else{for(var d=new Array(arguments.length-1),h=0;h<d.length;)d[h++]=arguments[h];e.apply(null,d)}};try{s.apply(p||null,l)}catch(i){a&&(a=!1,u(i))}})}}),Lh=nt(t=>{"use strict";var r=t;r.length=function(c){var o=c.length;if(!o)return 0;for(var a=0;--o%4>1&&c.charAt(o)==="=";)++a;return Math.ceil(c.length*3)/4-a};var n=new Array(64),s=new Array(123);for(p=0;p<64;)s[n[p]=p<26?p+65:p<52?p+71:p<62?p-4:p-59|43]=p++;var p;r.encode=function(c,o,a){for(var e=null,u=[],i=0,d=0,h;o<a;){var m=c[o++];switch(d){case 0:u[i++]=n[m>>2],h=(m&3)<<4,d=1;break;case 1:u[i++]=n[h|m>>4],h=(m&15)<<2,d=2;break;case 2:u[i++]=n[h|m>>6],u[i++]=n[m&63],d=0;break}i>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,u)),i=0)}return d&&(u[i++]=n[h],u[i++]=61,d===1&&(u[i++]=61)),e?(i&&e.push(String.fromCharCode.apply(String,u.slice(0,i))),e.join("")):String.fromCharCode.apply(String,u.slice(0,i))};var l="invalid encoding";r.decode=function(c,o,a){for(var e=a,u=0,i,d=0;d<c.length;){var h=c.charCodeAt(d++);if(h===61&&u>1)break;if((h=s[h])===void 0)throw Error(l);switch(u){case 0:i=h,u=1;break;case 1:o[a++]=i<<2|(h&48)>>4,i=h,u=2;break;case 2:o[a++]=(i&15)<<4|(h&60)>>2,i=h,u=3;break;case 3:o[a++]=(i&3)<<6|h,u=0;break}}if(u===1)throw Error(l);return a-e},r.test=function(c){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(c)}}),Rh=nt((t,r)=>{"use strict";r.exports=n;function n(){this._listeners={}}n.prototype.on=function(s,p,l){return(this._listeners[s]||(this._listeners[s]=[])).push({fn:p,ctx:l||this}),this},n.prototype.off=function(s,p){if(s===void 0)this._listeners={};else if(p===void 0)this._listeners[s]=[];else for(var l=this._listeners[s],c=0;c<l.length;)l[c].fn===p?l.splice(c,1):++c;return this},n.prototype.emit=function(s){var p=this._listeners[s];if(p){for(var l=[],c=1;c<arguments.length;)l.push(arguments[c++]);for(c=0;c<p.length;)p[c].fn.apply(p[c++].ctx,l)}return this}}),jh=nt((t,r)=>{"use strict";r.exports=n(n);function n(o){return typeof Float32Array<"u"?function(){var a=new Float32Array([-0]),e=new Uint8Array(a.buffer),u=e[3]===128;function i(b,x,E){a[0]=b,x[E]=e[0],x[E+1]=e[1],x[E+2]=e[2],x[E+3]=e[3]}function d(b,x,E){a[0]=b,x[E]=e[3],x[E+1]=e[2],x[E+2]=e[1],x[E+3]=e[0]}o.writeFloatLE=u?i:d,o.writeFloatBE=u?d:i;function h(b,x){return e[0]=b[x],e[1]=b[x+1],e[2]=b[x+2],e[3]=b[x+3],a[0]}function m(b,x){return e[3]=b[x],e[2]=b[x+1],e[1]=b[x+2],e[0]=b[x+3],a[0]}o.readFloatLE=u?h:m,o.readFloatBE=u?m:h}():function(){function a(u,i,d,h){var m=i<0?1:0;if(m&&(i=-i),i===0)u(1/i>0?0:2147483648,d,h);else if(isNaN(i))u(2143289344,d,h);else if(i>34028234663852886e22)u((m<<31|2139095040)>>>0,d,h);else if(i<11754943508222875e-54)u((m<<31|Math.round(i/1401298464324817e-60))>>>0,d,h);else{var b=Math.floor(Math.log(i)/Math.LN2),x=Math.round(i*Math.pow(2,-b)*8388608)&8388607;u((m<<31|b+127<<23|x)>>>0,d,h)}}o.writeFloatLE=a.bind(null,s),o.writeFloatBE=a.bind(null,p);function e(u,i,d){var h=u(i,d),m=(h>>31)*2+1,b=h>>>23&255,x=h&8388607;return b===255?x?NaN:m*(1/0):b===0?m*1401298464324817e-60*x:m*Math.pow(2,b-150)*(x+8388608)}o.readFloatLE=e.bind(null,l),o.readFloatBE=e.bind(null,c)}(),typeof Float64Array<"u"?function(){var a=new Float64Array([-0]),e=new Uint8Array(a.buffer),u=e[7]===128;function i(b,x,E){a[0]=b,x[E]=e[0],x[E+1]=e[1],x[E+2]=e[2],x[E+3]=e[3],x[E+4]=e[4],x[E+5]=e[5],x[E+6]=e[6],x[E+7]=e[7]}function d(b,x,E){a[0]=b,x[E]=e[7],x[E+1]=e[6],x[E+2]=e[5],x[E+3]=e[4],x[E+4]=e[3],x[E+5]=e[2],x[E+6]=e[1],x[E+7]=e[0]}o.writeDoubleLE=u?i:d,o.writeDoubleBE=u?d:i;function h(b,x){return e[0]=b[x],e[1]=b[x+1],e[2]=b[x+2],e[3]=b[x+3],e[4]=b[x+4],e[5]=b[x+5],e[6]=b[x+6],e[7]=b[x+7],a[0]}function m(b,x){return e[7]=b[x],e[6]=b[x+1],e[5]=b[x+2],e[4]=b[x+3],e[3]=b[x+4],e[2]=b[x+5],e[1]=b[x+6],e[0]=b[x+7],a[0]}o.readDoubleLE=u?h:m,o.readDoubleBE=u?m:h}():function(){function a(u,i,d,h,m,b){var x=h<0?1:0;if(x&&(h=-h),h===0)u(0,m,b+i),u(1/h>0?0:2147483648,m,b+d);else if(isNaN(h))u(0,m,b+i),u(2146959360,m,b+d);else if(h>17976931348623157e292)u(0,m,b+i),u((x<<31|2146435072)>>>0,m,b+d);else{var E;if(h<22250738585072014e-324)E=h/5e-324,u(E>>>0,m,b+i),u((x<<31|E/4294967296)>>>0,m,b+d);else{var w=Math.floor(Math.log(h)/Math.LN2);w===1024&&(w=1023),E=h*Math.pow(2,-w),u(E*4503599627370496>>>0,m,b+i),u((x<<31|w+1023<<20|E*1048576&1048575)>>>0,m,b+d)}}}o.writeDoubleLE=a.bind(null,s,0,4),o.writeDoubleBE=a.bind(null,p,4,0);function e(u,i,d,h,m){var b=u(h,m+i),x=u(h,m+d),E=(x>>31)*2+1,w=x>>>20&2047,S=4294967296*(x&1048575)+b;return w===2047?S?NaN:E*(1/0):w===0?E*5e-324*S:E*Math.pow(2,w-1075)*(S+4503599627370496)}o.readDoubleLE=e.bind(null,l,0,4),o.readDoubleBE=e.bind(null,c,4,0)}(),o}function s(o,a,e){a[e]=o&255,a[e+1]=o>>>8&255,a[e+2]=o>>>16&255,a[e+3]=o>>>24}function p(o,a,e){a[e]=o>>>24,a[e+1]=o>>>16&255,a[e+2]=o>>>8&255,a[e+3]=o&255}function l(o,a){return(o[a]|o[a+1]<<8|o[a+2]<<16|o[a+3]<<24)>>>0}function c(o,a){return(o[a]<<24|o[a+1]<<16|o[a+2]<<8|o[a+3])>>>0}}),Bh=nt((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}}),Vh=nt(t=>{"use strict";var r=t;r.length=function(n){for(var s=0,p=0,l=0;l<n.length;++l)p=n.charCodeAt(l),p<128?s+=1:p<2048?s+=2:(p&64512)===55296&&(n.charCodeAt(l+1)&64512)===56320?(++l,s+=4):s+=3;return s},r.read=function(n,s,p){var l=p-s;if(l<1)return"";for(var c=null,o=[],a=0,e;s<p;)e=n[s++],e<128?o[a++]=e:e>191&&e<224?o[a++]=(e&31)<<6|n[s++]&63:e>239&&e<365?(e=((e&7)<<18|(n[s++]&63)<<12|(n[s++]&63)<<6|n[s++]&63)-65536,o[a++]=55296+(e>>10),o[a++]=56320+(e&1023)):o[a++]=(e&15)<<12|(n[s++]&63)<<6|n[s++]&63,a>8191&&((c||(c=[])).push(String.fromCharCode.apply(String,o)),a=0);return c?(a&&c.push(String.fromCharCode.apply(String,o.slice(0,a))),c.join("")):String.fromCharCode.apply(String,o.slice(0,a))},r.write=function(n,s,p){for(var l=p,c,o,a=0;a<n.length;++a)c=n.charCodeAt(a),c<128?s[p++]=c:c<2048?(s[p++]=c>>6|192,s[p++]=c&63|128):(c&64512)===55296&&((o=n.charCodeAt(a+1))&64512)===56320?(c=65536+((c&1023)<<10)+(o&1023),++a,s[p++]=c>>18|240,s[p++]=c>>12&63|128,s[p++]=c>>6&63|128,s[p++]=c&63|128):(s[p++]=c>>12|224,s[p++]=c>>6&63|128,s[p++]=c&63|128);return p-l}}),Mh=nt((t,r)=>{"use strict";r.exports=n;function n(s,p,l){var c=l||8192,o=c>>>1,a=null,e=c;return function(u){if(u<1||u>o)return s(u);e+u>c&&(a=s(c),e=0);var i=p.call(a,e,e+=u);return e&7&&(e=(e|7)+1),i}}}),zh=nt((t,r)=>{"use strict";r.exports=s;var n=we();function s(o,a){this.lo=o>>>0,this.hi=a>>>0}var p=s.zero=new s(0,0);p.toNumber=function(){return 0},p.zzEncode=p.zzDecode=function(){return this},p.length=function(){return 1};var l=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(o){if(o===0)return p;var a=o<0;a&&(o=-o);var e=o>>>0,u=(o-e)/4294967296>>>0;return a&&(u=~u>>>0,e=~e>>>0,++e>4294967295&&(e=0,++u>4294967295&&(u=0))),new s(e,u)},s.from=function(o){if(typeof o=="number")return s.fromNumber(o);if(n.isString(o))if(n.Long)o=n.Long.fromString(o);else return s.fromNumber(parseInt(o,10));return o.low||o.high?new s(o.low>>>0,o.high>>>0):p},s.prototype.toNumber=function(o){if(!o&&this.hi>>>31){var a=~this.lo+1>>>0,e=~this.hi>>>0;return a||(e=e+1>>>0),-(a+e*4294967296)}return this.lo+this.hi*4294967296},s.prototype.toLong=function(o){return n.Long?new n.Long(this.lo|0,this.hi|0,!!o):{low:this.lo|0,high:this.hi|0,unsigned:!!o}};var c=String.prototype.charCodeAt;s.fromHash=function(o){return o===l?p:new s((c.call(o,0)|c.call(o,1)<<8|c.call(o,2)<<16|c.call(o,3)<<24)>>>0,(c.call(o,4)|c.call(o,5)<<8|c.call(o,6)<<16|c.call(o,7)<<24)>>>0)},s.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.prototype.zzEncode=function(){var o=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^o)>>>0,this.lo=(this.lo<<1^o)>>>0,this},s.prototype.zzDecode=function(){var o=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^o)>>>0,this.hi=(this.hi>>>1^o)>>>0,this},s.prototype.length=function(){var o=this.lo,a=(this.lo>>>28|this.hi<<4)>>>0,e=this.hi>>>24;return e===0?a===0?o<16384?o<128?1:2:o<2097152?3:4:a<16384?a<128?5:6:a<2097152?7:8:e<128?9:10}}),we=nt(t=>{"use strict";var r=t;r.asPromise=Ch(),r.base64=Lh(),r.EventEmitter=Rh(),r.float=jh(),r.inquire=Bh(),r.utf8=Vh(),r.pool=Mh(),r.LongBits=zh(),r.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node),r.global=r.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||t,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(p){return typeof p=="number"&&isFinite(p)&&Math.floor(p)===p},r.isString=function(p){return typeof p=="string"||p instanceof String},r.isObject=function(p){return p&&typeof p=="object"},r.isset=r.isSet=function(p,l){var c=p[l];return c!=null&&p.hasOwnProperty(l)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1},r.Buffer=function(){try{var p=r.inquire("buffer").Buffer;return p.prototype.utf8Write?p:null}catch{return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(p){return typeof p=="number"?r.Buffer?r._Buffer_allocUnsafe(p):new r.Array(p):r.Buffer?r._Buffer_from(p):typeof Uint8Array>"u"?p:new Uint8Array(p)},r.Array=typeof Uint8Array<"u"?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(p){return p?r.LongBits.from(p).toHash():r.LongBits.zeroHash},r.longFromHash=function(p,l){var c=r.LongBits.fromHash(p);return r.Long?r.Long.fromBits(c.lo,c.hi,l):c.toNumber(!!l)};function n(p,l,c){for(var o=Object.keys(l),a=0;a<o.length;++a)(p[o[a]]===void 0||!c)&&(p[o[a]]=l[o[a]]);return p}r.merge=n,r.lcFirst=function(p){return p.charAt(0).toLowerCase()+p.substring(1)};function s(p){function l(c,o){if(!(this instanceof l))return new l(c,o);Object.defineProperty(this,"message",{get:function(){return c}}),Error.captureStackTrace?Error.captureStackTrace(this,l):Object.defineProperty(this,"stack",{value:new Error().stack||""}),o&&n(this,o)}return l.prototype=Object.create(Error.prototype,{constructor:{value:l,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return p},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),l}r.newError=s,r.ProtocolError=s("ProtocolError"),r.oneOfGetter=function(p){for(var l={},c=0;c<p.length;++c)l[p[c]]=1;return function(){for(var o=Object.keys(this),a=o.length-1;a>-1;--a)if(l[o[a]]===1&&this[o[a]]!==void 0&&this[o[a]]!==null)return o[a]}},r.oneOfSetter=function(p){return function(l){for(var c=0;c<p.length;++c)p[c]!==l&&delete this[p[c]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var p=r.Buffer;if(!p){r._Buffer_from=r._Buffer_allocUnsafe=null;return}r._Buffer_from=p.from!==Uint8Array.from&&p.from||function(l,c){return new p(l,c)},r._Buffer_allocUnsafe=p.allocUnsafe||function(l){return new p(l)}}}),gl=nt((t,r)=>{"use strict";r.exports=u;var n=we(),s,p=n.LongBits,l=n.base64,c=n.utf8;function o(w,S,$){this.fn=w,this.len=S,this.next=void 0,this.val=$}function a(){}function e(w){this.head=w.head,this.tail=w.tail,this.len=w.len,this.next=w.states}function u(){this.len=0,this.head=new o(a,0,0),this.tail=this.head,this.states=null}var i=function(){return n.Buffer?function(){return(u.create=function(){return new s})()}:function(){return new u}};u.create=i(),u.alloc=function(w){return new n.Array(w)},n.Array!==Array&&(u.alloc=n.pool(u.alloc,n.Array.prototype.subarray)),u.prototype._push=function(w,S,$){return this.tail=this.tail.next=new o(w,S,$),this.len+=S,this};function d(w,S,$){S[$]=w&255}function h(w,S,$){for(;w>127;)S[$++]=w&127|128,w>>>=7;S[$]=w}function m(w,S){this.len=w,this.next=void 0,this.val=S}m.prototype=Object.create(o.prototype),m.prototype.fn=h,u.prototype.uint32=function(w){return this.len+=(this.tail=this.tail.next=new m((w=w>>>0)<128?1:w<16384?2:w<2097152?3:w<268435456?4:5,w)).len,this},u.prototype.int32=function(w){return w<0?this._push(b,10,p.fromNumber(w)):this.uint32(w)},u.prototype.sint32=function(w){return this.uint32((w<<1^w>>31)>>>0)};function b(w,S,$){for(;w.hi;)S[$++]=w.lo&127|128,w.lo=(w.lo>>>7|w.hi<<25)>>>0,w.hi>>>=7;for(;w.lo>127;)S[$++]=w.lo&127|128,w.lo=w.lo>>>7;S[$++]=w.lo}u.prototype.uint64=function(w){var S=p.from(w);return this._push(b,S.length(),S)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(w){var S=p.from(w).zzEncode();return this._push(b,S.length(),S)},u.prototype.bool=function(w){return this._push(d,1,w?1:0)};function x(w,S,$){S[$]=w&255,S[$+1]=w>>>8&255,S[$+2]=w>>>16&255,S[$+3]=w>>>24}u.prototype.fixed32=function(w){return this._push(x,4,w>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(w){var S=p.from(w);return this._push(x,4,S.lo)._push(x,4,S.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(w){return this._push(n.float.writeFloatLE,4,w)},u.prototype.double=function(w){return this._push(n.float.writeDoubleLE,8,w)};var E=n.Array.prototype.set?function(w,S,$){S.set(w,$)}:function(w,S,$){for(var F=0;F<w.length;++F)S[$+F]=w[F]};u.prototype.bytes=function(w){var S=w.length>>>0;if(!S)return this._push(d,1,0);if(n.isString(w)){var $=u.alloc(S=l.length(w));l.decode(w,$,0),w=$}return this.uint32(S)._push(E,S,w)},u.prototype.string=function(w){var S=c.length(w);return S?this.uint32(S)._push(c.write,S,w):this._push(d,1,0)},u.prototype.fork=function(){return this.states=new e(this),this.head=this.tail=new o(a,0,0),this.len=0,this},u.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new o(a,0,0),this.len=0),this},u.prototype.ldelim=function(){var w=this.head,S=this.tail,$=this.len;return this.reset().uint32($),$&&(this.tail.next=w.next,this.tail=S,this.len+=$),this},u.prototype.finish=function(){for(var w=this.head.next,S=this.constructor.alloc(this.len),$=0;w;)w.fn(w.val,S,$),$+=w.len,w=w.next;return S},u._configure=function(w){s=w,u.create=i(),s._configure()}}),Uh=nt((t,r)=>{"use strict";r.exports=p;var n=gl();(p.prototype=Object.create(n.prototype)).constructor=p;var s=we();function p(){n.call(this)}p._configure=function(){p.alloc=s._Buffer_allocUnsafe,p.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&s.Buffer.prototype.set.name==="set"?function(c,o,a){o.set(c,a)}:function(c,o,a){if(c.copy)c.copy(o,a,0,c.length);else for(var e=0;e<c.length;)o[a++]=c[e++]}},p.prototype.bytes=function(c){s.isString(c)&&(c=s._Buffer_from(c,"base64"));var o=c.length>>>0;return this.uint32(o),o&&this._push(p.writeBytesBuffer,o,c),this};function l(c,o,a){c.length<40?s.utf8.write(c,o,a):o.utf8Write?o.utf8Write(c,a):o.write(c,a)}p.prototype.string=function(c){var o=s.Buffer.byteLength(c);return this.uint32(o),o&&this._push(l,o,c),this},p._configure()}),ml=nt((t,r)=>{"use strict";r.exports=o;var n=we(),s,p=n.LongBits,l=n.utf8;function c(h,m){return RangeError("index out of range: "+h.pos+" + "+(m||1)+" > "+h.len)}function o(h){this.buf=h,this.pos=0,this.len=h.length}var a=typeof Uint8Array<"u"?function(h){if(h instanceof Uint8Array||Array.isArray(h))return new o(h);throw Error("illegal buffer")}:function(h){if(Array.isArray(h))return new o(h);throw Error("illegal buffer")},e=function(){return n.Buffer?function(h){return(o.create=function(m){return n.Buffer.isBuffer(m)?new s(m):a(m)})(h)}:a};o.create=e(),o.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,o.prototype.uint32=function(){var h=4294967295;return function(){if(h=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(h=(h|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(h=(h|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(h=(h|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(h=(h|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return h;if((this.pos+=5)>this.len)throw this.pos=this.len,c(this,10);return h}}(),o.prototype.int32=function(){return this.uint32()|0},o.prototype.sint32=function(){var h=this.uint32();return h>>>1^-(h&1)|0};function u(){var h=new p(0,0),m=0;if(this.len-this.pos>4){for(;m<4;++m)if(h.lo=(h.lo|(this.buf[this.pos]&127)<<m*7)>>>0,this.buf[this.pos++]<128)return h;if(h.lo=(h.lo|(this.buf[this.pos]&127)<<28)>>>0,h.hi=(h.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return h;m=0}else{for(;m<3;++m){if(this.pos>=this.len)throw c(this);if(h.lo=(h.lo|(this.buf[this.pos]&127)<<m*7)>>>0,this.buf[this.pos++]<128)return h}return h.lo=(h.lo|(this.buf[this.pos++]&127)<<m*7)>>>0,h}if(this.len-this.pos>4){for(;m<5;++m)if(h.hi=(h.hi|(this.buf[this.pos]&127)<<m*7+3)>>>0,this.buf[this.pos++]<128)return h}else for(;m<5;++m){if(this.pos>=this.len)throw c(this);if(h.hi=(h.hi|(this.buf[this.pos]&127)<<m*7+3)>>>0,this.buf[this.pos++]<128)return h}throw Error("invalid varint encoding")}o.prototype.bool=function(){return this.uint32()!==0};function i(h,m){return(h[m-4]|h[m-3]<<8|h[m-2]<<16|h[m-1]<<24)>>>0}o.prototype.fixed32=function(){if(this.pos+4>this.len)throw c(this,4);return i(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw c(this,4);return i(this.buf,this.pos+=4)|0};function d(){if(this.pos+8>this.len)throw c(this,8);return new p(i(this.buf,this.pos+=4),i(this.buf,this.pos+=4))}o.prototype.float=function(){if(this.pos+4>this.len)throw c(this,4);var h=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,h},o.prototype.double=function(){if(this.pos+8>this.len)throw c(this,4);var h=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,h},o.prototype.bytes=function(){var h=this.uint32(),m=this.pos,b=this.pos+h;if(b>this.len)throw c(this,h);if(this.pos+=h,Array.isArray(this.buf))return this.buf.slice(m,b);if(m===b){var x=n.Buffer;return x?x.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,m,b)},o.prototype.string=function(){var h=this.bytes();return l.read(h,0,h.length)},o.prototype.skip=function(h){if(typeof h=="number"){if(this.pos+h>this.len)throw c(this,h);this.pos+=h}else do if(this.pos>=this.len)throw c(this);while(this.buf[this.pos++]&128);return this},o.prototype.skipType=function(h){switch(h){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(h=this.uint32()&7)!==4;)this.skipType(h);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+h+" at offset "+this.pos)}return this},o._configure=function(h){s=h,o.create=e(),s._configure();var m=n.Long?"toLong":"toNumber";n.merge(o.prototype,{int64:function(){return u.call(this)[m](!1)},uint64:function(){return u.call(this)[m](!0)},sint64:function(){return u.call(this).zzDecode()[m](!1)},fixed64:function(){return d.call(this)[m](!0)},sfixed64:function(){return d.call(this)[m](!1)}})}}),Gh=nt((t,r)=>{"use strict";r.exports=p;var n=ml();(p.prototype=Object.create(n.prototype)).constructor=p;var s=we();function p(l){n.call(this,l)}p._configure=function(){s.Buffer&&(p.prototype._slice=s.Buffer.prototype.slice)},p.prototype.string=function(){var l=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+l,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+l,this.len))},p._configure()}),Hh=nt((t,r)=>{"use strict";r.exports=s;var n=we();(s.prototype=Object.create(n.EventEmitter.prototype)).constructor=s;function s(p,l,c){if(typeof p!="function")throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=p,this.requestDelimited=!!l,this.responseDelimited=!!c}s.prototype.rpcCall=function p(l,c,o,a,e){if(!a)throw TypeError("request must be specified");var u=this;if(!e)return n.asPromise(p,u,l,c,o,a);if(!u.rpcImpl){setTimeout(function(){e(Error("already ended"))},0);return}try{return u.rpcImpl(l,c[u.requestDelimited?"encodeDelimited":"encode"](a).finish(),function(i,d){if(i)return u.emit("error",i,l),e(i);if(d===null){u.end(!0);return}if(!(d instanceof o))try{d=o[u.responseDelimited?"decodeDelimited":"decode"](d)}catch(h){return u.emit("error",h,l),e(h)}return u.emit("data",d,l),e(null,d)})}catch(i){u.emit("error",i,l),setTimeout(function(){e(i)},0);return}},s.prototype.end=function(p){return this.rpcImpl&&(p||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}}),qh=nt(t=>{"use strict";var r=t;r.Service=Hh()}),Wh=nt((t,r)=>{"use strict";r.exports={}}),Xh=nt(t=>{"use strict";var r=t;r.build="minimal",r.Writer=gl(),r.BufferWriter=Uh(),r.Reader=ml(),r.BufferReader=Gh(),r.util=we(),r.rpc=qh(),r.roots=Wh(),r.configure=n;function n(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}n()}),Kh=nt((t,r)=>{"use strict";r.exports=Xh()}),mr=nt((t,r)=>{"use strict";var n=Kh(),s=n.Reader,p=n.Writer,l=n.util,c=n.roots.default||(n.roots.default={});c.onnx=function(){var o={};return o.Version=function(){var a={},e=Object.create(a);return e[a[0]="_START_VERSION"]=0,e[a[1]="IR_VERSION_2017_10_10"]=1,e[a[2]="IR_VERSION_2017_10_30"]=2,e[a[3]="IR_VERSION_2017_11_3"]=3,e[a[4]="IR_VERSION_2019_1_22"]=4,e[a[5]="IR_VERSION_2019_3_18"]=5,e[a[6]="IR_VERSION_2019_9_19"]=6,e[a[7]="IR_VERSION_2020_5_8"]=7,e[a[8]="IR_VERSION_2021_7_30"]=8,e[a[9]="IR_VERSION"]=9,e}(),o.AttributeProto=function(){function a(e){if(this.floats=[],this.ints=[],this.strings=[],this.tensors=[],this.graphs=[],this.sparseTensors=[],this.typeProtos=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.name="",a.prototype.refAttrName="",a.prototype.docString="",a.prototype.type=0,a.prototype.f=0,a.prototype.i=l.Long?l.Long.fromBits(0,0,!1):0,a.prototype.s=l.newBuffer([]),a.prototype.t=null,a.prototype.g=null,a.prototype.sparseTensor=null,a.prototype.tp=null,a.prototype.floats=l.emptyArray,a.prototype.ints=l.emptyArray,a.prototype.strings=l.emptyArray,a.prototype.tensors=l.emptyArray,a.prototype.graphs=l.emptyArray,a.prototype.sparseTensors=l.emptyArray,a.prototype.typeProtos=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&u.uint32(10).string(e.name),e.f!=null&&Object.hasOwnProperty.call(e,"f")&&u.uint32(21).float(e.f),e.i!=null&&Object.hasOwnProperty.call(e,"i")&&u.uint32(24).int64(e.i),e.s!=null&&Object.hasOwnProperty.call(e,"s")&&u.uint32(34).bytes(e.s),e.t!=null&&Object.hasOwnProperty.call(e,"t")&&c.onnx.TensorProto.encode(e.t,u.uint32(42).fork()).ldelim(),e.g!=null&&Object.hasOwnProperty.call(e,"g")&&c.onnx.GraphProto.encode(e.g,u.uint32(50).fork()).ldelim(),e.floats!=null&&e.floats.length){u.uint32(58).fork();for(var i=0;i<e.floats.length;++i)u.float(e.floats[i]);u.ldelim()}if(e.ints!=null&&e.ints.length){u.uint32(66).fork();for(var i=0;i<e.ints.length;++i)u.int64(e.ints[i]);u.ldelim()}if(e.strings!=null&&e.strings.length)for(var i=0;i<e.strings.length;++i)u.uint32(74).bytes(e.strings[i]);if(e.tensors!=null&&e.tensors.length)for(var i=0;i<e.tensors.length;++i)c.onnx.TensorProto.encode(e.tensors[i],u.uint32(82).fork()).ldelim();if(e.graphs!=null&&e.graphs.length)for(var i=0;i<e.graphs.length;++i)c.onnx.GraphProto.encode(e.graphs[i],u.uint32(90).fork()).ldelim();if(e.docString!=null&&Object.hasOwnProperty.call(e,"docString")&&u.uint32(106).string(e.docString),e.tp!=null&&Object.hasOwnProperty.call(e,"tp")&&c.onnx.TypeProto.encode(e.tp,u.uint32(114).fork()).ldelim(),e.typeProtos!=null&&e.typeProtos.length)for(var i=0;i<e.typeProtos.length;++i)c.onnx.TypeProto.encode(e.typeProtos[i],u.uint32(122).fork()).ldelim();if(e.type!=null&&Object.hasOwnProperty.call(e,"type")&&u.uint32(160).int32(e.type),e.refAttrName!=null&&Object.hasOwnProperty.call(e,"refAttrName")&&u.uint32(170).string(e.refAttrName),e.sparseTensor!=null&&Object.hasOwnProperty.call(e,"sparseTensor")&&c.onnx.SparseTensorProto.encode(e.sparseTensor,u.uint32(178).fork()).ldelim(),e.sparseTensors!=null&&e.sparseTensors.length)for(var i=0;i<e.sparseTensors.length;++i)c.onnx.SparseTensorProto.encode(e.sparseTensors[i],u.uint32(186).fork()).ldelim();return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.AttributeProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.name=e.string();break}case 21:{d.refAttrName=e.string();break}case 13:{d.docString=e.string();break}case 20:{d.type=e.int32();break}case 2:{d.f=e.float();break}case 3:{d.i=e.int64();break}case 4:{d.s=e.bytes();break}case 5:{d.t=c.onnx.TensorProto.decode(e,e.uint32());break}case 6:{d.g=c.onnx.GraphProto.decode(e,e.uint32());break}case 22:{d.sparseTensor=c.onnx.SparseTensorProto.decode(e,e.uint32());break}case 14:{d.tp=c.onnx.TypeProto.decode(e,e.uint32());break}case 7:{if(d.floats&&d.floats.length||(d.floats=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.floats.push(e.float());else d.floats.push(e.float());break}case 8:{if(d.ints&&d.ints.length||(d.ints=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.ints.push(e.int64());else d.ints.push(e.int64());break}case 9:{d.strings&&d.strings.length||(d.strings=[]),d.strings.push(e.bytes());break}case 10:{d.tensors&&d.tensors.length||(d.tensors=[]),d.tensors.push(c.onnx.TensorProto.decode(e,e.uint32()));break}case 11:{d.graphs&&d.graphs.length||(d.graphs=[]),d.graphs.push(c.onnx.GraphProto.decode(e,e.uint32()));break}case 23:{d.sparseTensors&&d.sparseTensors.length||(d.sparseTensors=[]),d.sparseTensors.push(c.onnx.SparseTensorProto.decode(e,e.uint32()));break}case 15:{d.typeProtos&&d.typeProtos.length||(d.typeProtos=[]),d.typeProtos.push(c.onnx.TypeProto.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.name!=null&&e.hasOwnProperty("name")&&!l.isString(e.name))return"name: string expected";if(e.refAttrName!=null&&e.hasOwnProperty("refAttrName")&&!l.isString(e.refAttrName))return"refAttrName: string expected";if(e.docString!=null&&e.hasOwnProperty("docString")&&!l.isString(e.docString))return"docString: string expected";if(e.type!=null&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 11:case 13:case 6:case 7:case 8:case 9:case 10:case 12:case 14:break}if(e.f!=null&&e.hasOwnProperty("f")&&typeof e.f!="number")return"f: number expected";if(e.i!=null&&e.hasOwnProperty("i")&&!l.isInteger(e.i)&&!(e.i&&l.isInteger(e.i.low)&&l.isInteger(e.i.high)))return"i: integer|Long expected";if(e.s!=null&&e.hasOwnProperty("s")&&!(e.s&&typeof e.s.length=="number"||l.isString(e.s)))return"s: buffer expected";if(e.t!=null&&e.hasOwnProperty("t")){var u=c.onnx.TensorProto.verify(e.t);if(u)return"t."+u}if(e.g!=null&&e.hasOwnProperty("g")){var u=c.onnx.GraphProto.verify(e.g);if(u)return"g."+u}if(e.sparseTensor!=null&&e.hasOwnProperty("sparseTensor")){var u=c.onnx.SparseTensorProto.verify(e.sparseTensor);if(u)return"sparseTensor."+u}if(e.tp!=null&&e.hasOwnProperty("tp")){var u=c.onnx.TypeProto.verify(e.tp);if(u)return"tp."+u}if(e.floats!=null&&e.hasOwnProperty("floats")){if(!Array.isArray(e.floats))return"floats: array expected";for(var i=0;i<e.floats.length;++i)if(typeof e.floats[i]!="number")return"floats: number[] expected"}if(e.ints!=null&&e.hasOwnProperty("ints")){if(!Array.isArray(e.ints))return"ints: array expected";for(var i=0;i<e.ints.length;++i)if(!l.isInteger(e.ints[i])&&!(e.ints[i]&&l.isInteger(e.ints[i].low)&&l.isInteger(e.ints[i].high)))return"ints: integer|Long[] expected"}if(e.strings!=null&&e.hasOwnProperty("strings")){if(!Array.isArray(e.strings))return"strings: array expected";for(var i=0;i<e.strings.length;++i)if(!(e.strings[i]&&typeof e.strings[i].length=="number"||l.isString(e.strings[i])))return"strings: buffer[] expected"}if(e.tensors!=null&&e.hasOwnProperty("tensors")){if(!Array.isArray(e.tensors))return"tensors: array expected";for(var i=0;i<e.tensors.length;++i){var u=c.onnx.TensorProto.verify(e.tensors[i]);if(u)return"tensors."+u}}if(e.graphs!=null&&e.hasOwnProperty("graphs")){if(!Array.isArray(e.graphs))return"graphs: array expected";for(var i=0;i<e.graphs.length;++i){var u=c.onnx.GraphProto.verify(e.graphs[i]);if(u)return"graphs."+u}}if(e.sparseTensors!=null&&e.hasOwnProperty("sparseTensors")){if(!Array.isArray(e.sparseTensors))return"sparseTensors: array expected";for(var i=0;i<e.sparseTensors.length;++i){var u=c.onnx.SparseTensorProto.verify(e.sparseTensors[i]);if(u)return"sparseTensors."+u}}if(e.typeProtos!=null&&e.hasOwnProperty("typeProtos")){if(!Array.isArray(e.typeProtos))return"typeProtos: array expected";for(var i=0;i<e.typeProtos.length;++i){var u=c.onnx.TypeProto.verify(e.typeProtos[i]);if(u)return"typeProtos."+u}}return null},a.fromObject=function(e){if(e instanceof c.onnx.AttributeProto)return e;var u=new c.onnx.AttributeProto;switch(e.name!=null&&(u.name=String(e.name)),e.refAttrName!=null&&(u.refAttrName=String(e.refAttrName)),e.docString!=null&&(u.docString=String(e.docString)),e.type){default:if(typeof e.type=="number"){u.type=e.type;break}break;case"UNDEFINED":case 0:u.type=0;break;case"FLOAT":case 1:u.type=1;break;case"INT":case 2:u.type=2;break;case"STRING":case 3:u.type=3;break;case"TENSOR":case 4:u.type=4;break;case"GRAPH":case 5:u.type=5;break;case"SPARSE_TENSOR":case 11:u.type=11;break;case"TYPE_PROTO":case 13:u.type=13;break;case"FLOATS":case 6:u.type=6;break;case"INTS":case 7:u.type=7;break;case"STRINGS":case 8:u.type=8;break;case"TENSORS":case 9:u.type=9;break;case"GRAPHS":case 10:u.type=10;break;case"SPARSE_TENSORS":case 12:u.type=12;break;case"TYPE_PROTOS":case 14:u.type=14;break}if(e.f!=null&&(u.f=Number(e.f)),e.i!=null&&(l.Long?(u.i=l.Long.fromValue(e.i)).unsigned=!1:typeof e.i=="string"?u.i=parseInt(e.i,10):typeof e.i=="number"?u.i=e.i:typeof e.i=="object"&&(u.i=new l.LongBits(e.i.low>>>0,e.i.high>>>0).toNumber())),e.s!=null&&(typeof e.s=="string"?l.base64.decode(e.s,u.s=l.newBuffer(l.base64.length(e.s)),0):e.s.length>=0&&(u.s=e.s)),e.t!=null){if(typeof e.t!="object")throw TypeError(".onnx.AttributeProto.t: object expected");u.t=c.onnx.TensorProto.fromObject(e.t)}if(e.g!=null){if(typeof e.g!="object")throw TypeError(".onnx.AttributeProto.g: object expected");u.g=c.onnx.GraphProto.fromObject(e.g)}if(e.sparseTensor!=null){if(typeof e.sparseTensor!="object")throw TypeError(".onnx.AttributeProto.sparseTensor: object expected");u.sparseTensor=c.onnx.SparseTensorProto.fromObject(e.sparseTensor)}if(e.tp!=null){if(typeof e.tp!="object")throw TypeError(".onnx.AttributeProto.tp: object expected");u.tp=c.onnx.TypeProto.fromObject(e.tp)}if(e.floats){if(!Array.isArray(e.floats))throw TypeError(".onnx.AttributeProto.floats: array expected");u.floats=[];for(var i=0;i<e.floats.length;++i)u.floats[i]=Number(e.floats[i])}if(e.ints){if(!Array.isArray(e.ints))throw TypeError(".onnx.AttributeProto.ints: array expected");u.ints=[];for(var i=0;i<e.ints.length;++i)l.Long?(u.ints[i]=l.Long.fromValue(e.ints[i])).unsigned=!1:typeof e.ints[i]=="string"?u.ints[i]=parseInt(e.ints[i],10):typeof e.ints[i]=="number"?u.ints[i]=e.ints[i]:typeof e.ints[i]=="object"&&(u.ints[i]=new l.LongBits(e.ints[i].low>>>0,e.ints[i].high>>>0).toNumber())}if(e.strings){if(!Array.isArray(e.strings))throw TypeError(".onnx.AttributeProto.strings: array expected");u.strings=[];for(var i=0;i<e.strings.length;++i)typeof e.strings[i]=="string"?l.base64.decode(e.strings[i],u.strings[i]=l.newBuffer(l.base64.length(e.strings[i])),0):e.strings[i].length>=0&&(u.strings[i]=e.strings[i])}if(e.tensors){if(!Array.isArray(e.tensors))throw TypeError(".onnx.AttributeProto.tensors: array expected");u.tensors=[];for(var i=0;i<e.tensors.length;++i){if(typeof e.tensors[i]!="object")throw TypeError(".onnx.AttributeProto.tensors: object expected");u.tensors[i]=c.onnx.TensorProto.fromObject(e.tensors[i])}}if(e.graphs){if(!Array.isArray(e.graphs))throw TypeError(".onnx.AttributeProto.graphs: array expected");u.graphs=[];for(var i=0;i<e.graphs.length;++i){if(typeof e.graphs[i]!="object")throw TypeError(".onnx.AttributeProto.graphs: object expected");u.graphs[i]=c.onnx.GraphProto.fromObject(e.graphs[i])}}if(e.sparseTensors){if(!Array.isArray(e.sparseTensors))throw TypeError(".onnx.AttributeProto.sparseTensors: array expected");u.sparseTensors=[];for(var i=0;i<e.sparseTensors.length;++i){if(typeof e.sparseTensors[i]!="object")throw TypeError(".onnx.AttributeProto.sparseTensors: object expected");u.sparseTensors[i]=c.onnx.SparseTensorProto.fromObject(e.sparseTensors[i])}}if(e.typeProtos){if(!Array.isArray(e.typeProtos))throw TypeError(".onnx.AttributeProto.typeProtos: array expected");u.typeProtos=[];for(var i=0;i<e.typeProtos.length;++i){if(typeof e.typeProtos[i]!="object")throw TypeError(".onnx.AttributeProto.typeProtos: object expected");u.typeProtos[i]=c.onnx.TypeProto.fromObject(e.typeProtos[i])}}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.floats=[],i.ints=[],i.strings=[],i.tensors=[],i.graphs=[],i.typeProtos=[],i.sparseTensors=[]),u.defaults){if(i.name="",i.f=0,l.Long){var d=new l.Long(0,0,!1);i.i=u.longs===String?d.toString():u.longs===Number?d.toNumber():d}else i.i=u.longs===String?"0":0;u.bytes===String?i.s="":(i.s=[],u.bytes!==Array&&(i.s=l.newBuffer(i.s))),i.t=null,i.g=null,i.docString="",i.tp=null,i.type=u.enums===String?"UNDEFINED":0,i.refAttrName="",i.sparseTensor=null}if(e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.f!=null&&e.hasOwnProperty("f")&&(i.f=u.json&&!isFinite(e.f)?String(e.f):e.f),e.i!=null&&e.hasOwnProperty("i")&&(typeof e.i=="number"?i.i=u.longs===String?String(e.i):e.i:i.i=u.longs===String?l.Long.prototype.toString.call(e.i):u.longs===Number?new l.LongBits(e.i.low>>>0,e.i.high>>>0).toNumber():e.i),e.s!=null&&e.hasOwnProperty("s")&&(i.s=u.bytes===String?l.base64.encode(e.s,0,e.s.length):u.bytes===Array?Array.prototype.slice.call(e.s):e.s),e.t!=null&&e.hasOwnProperty("t")&&(i.t=c.onnx.TensorProto.toObject(e.t,u)),e.g!=null&&e.hasOwnProperty("g")&&(i.g=c.onnx.GraphProto.toObject(e.g,u)),e.floats&&e.floats.length){i.floats=[];for(var h=0;h<e.floats.length;++h)i.floats[h]=u.json&&!isFinite(e.floats[h])?String(e.floats[h]):e.floats[h]}if(e.ints&&e.ints.length){i.ints=[];for(var h=0;h<e.ints.length;++h)typeof e.ints[h]=="number"?i.ints[h]=u.longs===String?String(e.ints[h]):e.ints[h]:i.ints[h]=u.longs===String?l.Long.prototype.toString.call(e.ints[h]):u.longs===Number?new l.LongBits(e.ints[h].low>>>0,e.ints[h].high>>>0).toNumber():e.ints[h]}if(e.strings&&e.strings.length){i.strings=[];for(var h=0;h<e.strings.length;++h)i.strings[h]=u.bytes===String?l.base64.encode(e.strings[h],0,e.strings[h].length):u.bytes===Array?Array.prototype.slice.call(e.strings[h]):e.strings[h]}if(e.tensors&&e.tensors.length){i.tensors=[];for(var h=0;h<e.tensors.length;++h)i.tensors[h]=c.onnx.TensorProto.toObject(e.tensors[h],u)}if(e.graphs&&e.graphs.length){i.graphs=[];for(var h=0;h<e.graphs.length;++h)i.graphs[h]=c.onnx.GraphProto.toObject(e.graphs[h],u)}if(e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.tp!=null&&e.hasOwnProperty("tp")&&(i.tp=c.onnx.TypeProto.toObject(e.tp,u)),e.typeProtos&&e.typeProtos.length){i.typeProtos=[];for(var h=0;h<e.typeProtos.length;++h)i.typeProtos[h]=c.onnx.TypeProto.toObject(e.typeProtos[h],u)}if(e.type!=null&&e.hasOwnProperty("type")&&(i.type=u.enums===String?c.onnx.AttributeProto.AttributeType[e.type]===void 0?e.type:c.onnx.AttributeProto.AttributeType[e.type]:e.type),e.refAttrName!=null&&e.hasOwnProperty("refAttrName")&&(i.refAttrName=e.refAttrName),e.sparseTensor!=null&&e.hasOwnProperty("sparseTensor")&&(i.sparseTensor=c.onnx.SparseTensorProto.toObject(e.sparseTensor,u)),e.sparseTensors&&e.sparseTensors.length){i.sparseTensors=[];for(var h=0;h<e.sparseTensors.length;++h)i.sparseTensors[h]=c.onnx.SparseTensorProto.toObject(e.sparseTensors[h],u)}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.AttributeProto"},a.AttributeType=function(){var e={},u=Object.create(e);return u[e[0]="UNDEFINED"]=0,u[e[1]="FLOAT"]=1,u[e[2]="INT"]=2,u[e[3]="STRING"]=3,u[e[4]="TENSOR"]=4,u[e[5]="GRAPH"]=5,u[e[11]="SPARSE_TENSOR"]=11,u[e[13]="TYPE_PROTO"]=13,u[e[6]="FLOATS"]=6,u[e[7]="INTS"]=7,u[e[8]="STRINGS"]=8,u[e[9]="TENSORS"]=9,u[e[10]="GRAPHS"]=10,u[e[12]="SPARSE_TENSORS"]=12,u[e[14]="TYPE_PROTOS"]=14,u}(),a}(),o.ValueInfoProto=function(){function a(e){if(e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.name="",a.prototype.type=null,a.prototype.docString="",a.create=function(e){return new a(e)},a.encode=function(e,u){return u||(u=p.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&u.uint32(10).string(e.name),e.type!=null&&Object.hasOwnProperty.call(e,"type")&&c.onnx.TypeProto.encode(e.type,u.uint32(18).fork()).ldelim(),e.docString!=null&&Object.hasOwnProperty.call(e,"docString")&&u.uint32(26).string(e.docString),u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.ValueInfoProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.name=e.string();break}case 2:{d.type=c.onnx.TypeProto.decode(e,e.uint32());break}case 3:{d.docString=e.string();break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.name!=null&&e.hasOwnProperty("name")&&!l.isString(e.name))return"name: string expected";if(e.type!=null&&e.hasOwnProperty("type")){var u=c.onnx.TypeProto.verify(e.type);if(u)return"type."+u}return e.docString!=null&&e.hasOwnProperty("docString")&&!l.isString(e.docString)?"docString: string expected":null},a.fromObject=function(e){if(e instanceof c.onnx.ValueInfoProto)return e;var u=new c.onnx.ValueInfoProto;if(e.name!=null&&(u.name=String(e.name)),e.type!=null){if(typeof e.type!="object")throw TypeError(".onnx.ValueInfoProto.type: object expected");u.type=c.onnx.TypeProto.fromObject(e.type)}return e.docString!=null&&(u.docString=String(e.docString)),u},a.toObject=function(e,u){u||(u={});var i={};return u.defaults&&(i.name="",i.type=null,i.docString=""),e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.type!=null&&e.hasOwnProperty("type")&&(i.type=c.onnx.TypeProto.toObject(e.type,u)),e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.ValueInfoProto"},a}(),o.NodeProto=function(){function a(e){if(this.input=[],this.output=[],this.attribute=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.input=l.emptyArray,a.prototype.output=l.emptyArray,a.prototype.name="",a.prototype.opType="",a.prototype.domain="",a.prototype.attribute=l.emptyArray,a.prototype.docString="",a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.input!=null&&e.input.length)for(var i=0;i<e.input.length;++i)u.uint32(10).string(e.input[i]);if(e.output!=null&&e.output.length)for(var i=0;i<e.output.length;++i)u.uint32(18).string(e.output[i]);if(e.name!=null&&Object.hasOwnProperty.call(e,"name")&&u.uint32(26).string(e.name),e.opType!=null&&Object.hasOwnProperty.call(e,"opType")&&u.uint32(34).string(e.opType),e.attribute!=null&&e.attribute.length)for(var i=0;i<e.attribute.length;++i)c.onnx.AttributeProto.encode(e.attribute[i],u.uint32(42).fork()).ldelim();return e.docString!=null&&Object.hasOwnProperty.call(e,"docString")&&u.uint32(50).string(e.docString),e.domain!=null&&Object.hasOwnProperty.call(e,"domain")&&u.uint32(58).string(e.domain),u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.NodeProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.input&&d.input.length||(d.input=[]),d.input.push(e.string());break}case 2:{d.output&&d.output.length||(d.output=[]),d.output.push(e.string());break}case 3:{d.name=e.string();break}case 4:{d.opType=e.string();break}case 7:{d.domain=e.string();break}case 5:{d.attribute&&d.attribute.length||(d.attribute=[]),d.attribute.push(c.onnx.AttributeProto.decode(e,e.uint32()));break}case 6:{d.docString=e.string();break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.input!=null&&e.hasOwnProperty("input")){if(!Array.isArray(e.input))return"input: array expected";for(var u=0;u<e.input.length;++u)if(!l.isString(e.input[u]))return"input: string[] expected"}if(e.output!=null&&e.hasOwnProperty("output")){if(!Array.isArray(e.output))return"output: array expected";for(var u=0;u<e.output.length;++u)if(!l.isString(e.output[u]))return"output: string[] expected"}if(e.name!=null&&e.hasOwnProperty("name")&&!l.isString(e.name))return"name: string expected";if(e.opType!=null&&e.hasOwnProperty("opType")&&!l.isString(e.opType))return"opType: string expected";if(e.domain!=null&&e.hasOwnProperty("domain")&&!l.isString(e.domain))return"domain: string expected";if(e.attribute!=null&&e.hasOwnProperty("attribute")){if(!Array.isArray(e.attribute))return"attribute: array expected";for(var u=0;u<e.attribute.length;++u){var i=c.onnx.AttributeProto.verify(e.attribute[u]);if(i)return"attribute."+i}}return e.docString!=null&&e.hasOwnProperty("docString")&&!l.isString(e.docString)?"docString: string expected":null},a.fromObject=function(e){if(e instanceof c.onnx.NodeProto)return e;var u=new c.onnx.NodeProto;if(e.input){if(!Array.isArray(e.input))throw TypeError(".onnx.NodeProto.input: array expected");u.input=[];for(var i=0;i<e.input.length;++i)u.input[i]=String(e.input[i])}if(e.output){if(!Array.isArray(e.output))throw TypeError(".onnx.NodeProto.output: array expected");u.output=[];for(var i=0;i<e.output.length;++i)u.output[i]=String(e.output[i])}if(e.name!=null&&(u.name=String(e.name)),e.opType!=null&&(u.opType=String(e.opType)),e.domain!=null&&(u.domain=String(e.domain)),e.attribute){if(!Array.isArray(e.attribute))throw TypeError(".onnx.NodeProto.attribute: array expected");u.attribute=[];for(var i=0;i<e.attribute.length;++i){if(typeof e.attribute[i]!="object")throw TypeError(".onnx.NodeProto.attribute: object expected");u.attribute[i]=c.onnx.AttributeProto.fromObject(e.attribute[i])}}return e.docString!=null&&(u.docString=String(e.docString)),u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.input=[],i.output=[],i.attribute=[]),u.defaults&&(i.name="",i.opType="",i.docString="",i.domain=""),e.input&&e.input.length){i.input=[];for(var d=0;d<e.input.length;++d)i.input[d]=e.input[d]}if(e.output&&e.output.length){i.output=[];for(var d=0;d<e.output.length;++d)i.output[d]=e.output[d]}if(e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.opType!=null&&e.hasOwnProperty("opType")&&(i.opType=e.opType),e.attribute&&e.attribute.length){i.attribute=[];for(var d=0;d<e.attribute.length;++d)i.attribute[d]=c.onnx.AttributeProto.toObject(e.attribute[d],u)}return e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.domain!=null&&e.hasOwnProperty("domain")&&(i.domain=e.domain),i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.NodeProto"},a}(),o.TrainingInfoProto=function(){function a(e){if(this.initializationBinding=[],this.updateBinding=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.initialization=null,a.prototype.algorithm=null,a.prototype.initializationBinding=l.emptyArray,a.prototype.updateBinding=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.initialization!=null&&Object.hasOwnProperty.call(e,"initialization")&&c.onnx.GraphProto.encode(e.initialization,u.uint32(10).fork()).ldelim(),e.algorithm!=null&&Object.hasOwnProperty.call(e,"algorithm")&&c.onnx.GraphProto.encode(e.algorithm,u.uint32(18).fork()).ldelim(),e.initializationBinding!=null&&e.initializationBinding.length)for(var i=0;i<e.initializationBinding.length;++i)c.onnx.StringStringEntryProto.encode(e.initializationBinding[i],u.uint32(26).fork()).ldelim();if(e.updateBinding!=null&&e.updateBinding.length)for(var i=0;i<e.updateBinding.length;++i)c.onnx.StringStringEntryProto.encode(e.updateBinding[i],u.uint32(34).fork()).ldelim();return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.TrainingInfoProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.initialization=c.onnx.GraphProto.decode(e,e.uint32());break}case 2:{d.algorithm=c.onnx.GraphProto.decode(e,e.uint32());break}case 3:{d.initializationBinding&&d.initializationBinding.length||(d.initializationBinding=[]),d.initializationBinding.push(c.onnx.StringStringEntryProto.decode(e,e.uint32()));break}case 4:{d.updateBinding&&d.updateBinding.length||(d.updateBinding=[]),d.updateBinding.push(c.onnx.StringStringEntryProto.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.initialization!=null&&e.hasOwnProperty("initialization")){var u=c.onnx.GraphProto.verify(e.initialization);if(u)return"initialization."+u}if(e.algorithm!=null&&e.hasOwnProperty("algorithm")){var u=c.onnx.GraphProto.verify(e.algorithm);if(u)return"algorithm."+u}if(e.initializationBinding!=null&&e.hasOwnProperty("initializationBinding")){if(!Array.isArray(e.initializationBinding))return"initializationBinding: array expected";for(var i=0;i<e.initializationBinding.length;++i){var u=c.onnx.StringStringEntryProto.verify(e.initializationBinding[i]);if(u)return"initializationBinding."+u}}if(e.updateBinding!=null&&e.hasOwnProperty("updateBinding")){if(!Array.isArray(e.updateBinding))return"updateBinding: array expected";for(var i=0;i<e.updateBinding.length;++i){var u=c.onnx.StringStringEntryProto.verify(e.updateBinding[i]);if(u)return"updateBinding."+u}}return null},a.fromObject=function(e){if(e instanceof c.onnx.TrainingInfoProto)return e;var u=new c.onnx.TrainingInfoProto;if(e.initialization!=null){if(typeof e.initialization!="object")throw TypeError(".onnx.TrainingInfoProto.initialization: object expected");u.initialization=c.onnx.GraphProto.fromObject(e.initialization)}if(e.algorithm!=null){if(typeof e.algorithm!="object")throw TypeError(".onnx.TrainingInfoProto.algorithm: object expected");u.algorithm=c.onnx.GraphProto.fromObject(e.algorithm)}if(e.initializationBinding){if(!Array.isArray(e.initializationBinding))throw TypeError(".onnx.TrainingInfoProto.initializationBinding: array expected");u.initializationBinding=[];for(var i=0;i<e.initializationBinding.length;++i){if(typeof e.initializationBinding[i]!="object")throw TypeError(".onnx.TrainingInfoProto.initializationBinding: object expected");u.initializationBinding[i]=c.onnx.StringStringEntryProto.fromObject(e.initializationBinding[i])}}if(e.updateBinding){if(!Array.isArray(e.updateBinding))throw TypeError(".onnx.TrainingInfoProto.updateBinding: array expected");u.updateBinding=[];for(var i=0;i<e.updateBinding.length;++i){if(typeof e.updateBinding[i]!="object")throw TypeError(".onnx.TrainingInfoProto.updateBinding: object expected");u.updateBinding[i]=c.onnx.StringStringEntryProto.fromObject(e.updateBinding[i])}}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.initializationBinding=[],i.updateBinding=[]),u.defaults&&(i.initialization=null,i.algorithm=null),e.initialization!=null&&e.hasOwnProperty("initialization")&&(i.initialization=c.onnx.GraphProto.toObject(e.initialization,u)),e.algorithm!=null&&e.hasOwnProperty("algorithm")&&(i.algorithm=c.onnx.GraphProto.toObject(e.algorithm,u)),e.initializationBinding&&e.initializationBinding.length){i.initializationBinding=[];for(var d=0;d<e.initializationBinding.length;++d)i.initializationBinding[d]=c.onnx.StringStringEntryProto.toObject(e.initializationBinding[d],u)}if(e.updateBinding&&e.updateBinding.length){i.updateBinding=[];for(var d=0;d<e.updateBinding.length;++d)i.updateBinding[d]=c.onnx.StringStringEntryProto.toObject(e.updateBinding[d],u)}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.TrainingInfoProto"},a}(),o.ModelProto=function(){function a(e){if(this.opsetImport=[],this.metadataProps=[],this.trainingInfo=[],this.functions=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.irVersion=l.Long?l.Long.fromBits(0,0,!1):0,a.prototype.opsetImport=l.emptyArray,a.prototype.producerName="",a.prototype.producerVersion="",a.prototype.domain="",a.prototype.modelVersion=l.Long?l.Long.fromBits(0,0,!1):0,a.prototype.docString="",a.prototype.graph=null,a.prototype.metadataProps=l.emptyArray,a.prototype.trainingInfo=l.emptyArray,a.prototype.functions=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.irVersion!=null&&Object.hasOwnProperty.call(e,"irVersion")&&u.uint32(8).int64(e.irVersion),e.producerName!=null&&Object.hasOwnProperty.call(e,"producerName")&&u.uint32(18).string(e.producerName),e.producerVersion!=null&&Object.hasOwnProperty.call(e,"producerVersion")&&u.uint32(26).string(e.producerVersion),e.domain!=null&&Object.hasOwnProperty.call(e,"domain")&&u.uint32(34).string(e.domain),e.modelVersion!=null&&Object.hasOwnProperty.call(e,"modelVersion")&&u.uint32(40).int64(e.modelVersion),e.docString!=null&&Object.hasOwnProperty.call(e,"docString")&&u.uint32(50).string(e.docString),e.graph!=null&&Object.hasOwnProperty.call(e,"graph")&&c.onnx.GraphProto.encode(e.graph,u.uint32(58).fork()).ldelim(),e.opsetImport!=null&&e.opsetImport.length)for(var i=0;i<e.opsetImport.length;++i)c.onnx.OperatorSetIdProto.encode(e.opsetImport[i],u.uint32(66).fork()).ldelim();if(e.metadataProps!=null&&e.metadataProps.length)for(var i=0;i<e.metadataProps.length;++i)c.onnx.StringStringEntryProto.encode(e.metadataProps[i],u.uint32(114).fork()).ldelim();if(e.trainingInfo!=null&&e.trainingInfo.length)for(var i=0;i<e.trainingInfo.length;++i)c.onnx.TrainingInfoProto.encode(e.trainingInfo[i],u.uint32(162).fork()).ldelim();if(e.functions!=null&&e.functions.length)for(var i=0;i<e.functions.length;++i)c.onnx.FunctionProto.encode(e.functions[i],u.uint32(202).fork()).ldelim();return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.ModelProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.irVersion=e.int64();break}case 8:{d.opsetImport&&d.opsetImport.length||(d.opsetImport=[]),d.opsetImport.push(c.onnx.OperatorSetIdProto.decode(e,e.uint32()));break}case 2:{d.producerName=e.string();break}case 3:{d.producerVersion=e.string();break}case 4:{d.domain=e.string();break}case 5:{d.modelVersion=e.int64();break}case 6:{d.docString=e.string();break}case 7:{d.graph=c.onnx.GraphProto.decode(e,e.uint32());break}case 14:{d.metadataProps&&d.metadataProps.length||(d.metadataProps=[]),d.metadataProps.push(c.onnx.StringStringEntryProto.decode(e,e.uint32()));break}case 20:{d.trainingInfo&&d.trainingInfo.length||(d.trainingInfo=[]),d.trainingInfo.push(c.onnx.TrainingInfoProto.decode(e,e.uint32()));break}case 25:{d.functions&&d.functions.length||(d.functions=[]),d.functions.push(c.onnx.FunctionProto.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.irVersion!=null&&e.hasOwnProperty("irVersion")&&!l.isInteger(e.irVersion)&&!(e.irVersion&&l.isInteger(e.irVersion.low)&&l.isInteger(e.irVersion.high)))return"irVersion: integer|Long expected";if(e.opsetImport!=null&&e.hasOwnProperty("opsetImport")){if(!Array.isArray(e.opsetImport))return"opsetImport: array expected";for(var u=0;u<e.opsetImport.length;++u){var i=c.onnx.OperatorSetIdProto.verify(e.opsetImport[u]);if(i)return"opsetImport."+i}}if(e.producerName!=null&&e.hasOwnProperty("producerName")&&!l.isString(e.producerName))return"producerName: string expected";if(e.producerVersion!=null&&e.hasOwnProperty("producerVersion")&&!l.isString(e.producerVersion))return"producerVersion: string expected";if(e.domain!=null&&e.hasOwnProperty("domain")&&!l.isString(e.domain))return"domain: string expected";if(e.modelVersion!=null&&e.hasOwnProperty("modelVersion")&&!l.isInteger(e.modelVersion)&&!(e.modelVersion&&l.isInteger(e.modelVersion.low)&&l.isInteger(e.modelVersion.high)))return"modelVersion: integer|Long expected";if(e.docString!=null&&e.hasOwnProperty("docString")&&!l.isString(e.docString))return"docString: string expected";if(e.graph!=null&&e.hasOwnProperty("graph")){var i=c.onnx.GraphProto.verify(e.graph);if(i)return"graph."+i}if(e.metadataProps!=null&&e.hasOwnProperty("metadataProps")){if(!Array.isArray(e.metadataProps))return"metadataProps: array expected";for(var u=0;u<e.metadataProps.length;++u){var i=c.onnx.StringStringEntryProto.verify(e.metadataProps[u]);if(i)return"metadataProps."+i}}if(e.trainingInfo!=null&&e.hasOwnProperty("trainingInfo")){if(!Array.isArray(e.trainingInfo))return"trainingInfo: array expected";for(var u=0;u<e.trainingInfo.length;++u){var i=c.onnx.TrainingInfoProto.verify(e.trainingInfo[u]);if(i)return"trainingInfo."+i}}if(e.functions!=null&&e.hasOwnProperty("functions")){if(!Array.isArray(e.functions))return"functions: array expected";for(var u=0;u<e.functions.length;++u){var i=c.onnx.FunctionProto.verify(e.functions[u]);if(i)return"functions."+i}}return null},a.fromObject=function(e){if(e instanceof c.onnx.ModelProto)return e;var u=new c.onnx.ModelProto;if(e.irVersion!=null&&(l.Long?(u.irVersion=l.Long.fromValue(e.irVersion)).unsigned=!1:typeof e.irVersion=="string"?u.irVersion=parseInt(e.irVersion,10):typeof e.irVersion=="number"?u.irVersion=e.irVersion:typeof e.irVersion=="object"&&(u.irVersion=new l.LongBits(e.irVersion.low>>>0,e.irVersion.high>>>0).toNumber())),e.opsetImport){if(!Array.isArray(e.opsetImport))throw TypeError(".onnx.ModelProto.opsetImport: array expected");u.opsetImport=[];for(var i=0;i<e.opsetImport.length;++i){if(typeof e.opsetImport[i]!="object")throw TypeError(".onnx.ModelProto.opsetImport: object expected");u.opsetImport[i]=c.onnx.OperatorSetIdProto.fromObject(e.opsetImport[i])}}if(e.producerName!=null&&(u.producerName=String(e.producerName)),e.producerVersion!=null&&(u.producerVersion=String(e.producerVersion)),e.domain!=null&&(u.domain=String(e.domain)),e.modelVersion!=null&&(l.Long?(u.modelVersion=l.Long.fromValue(e.modelVersion)).unsigned=!1:typeof e.modelVersion=="string"?u.modelVersion=parseInt(e.modelVersion,10):typeof e.modelVersion=="number"?u.modelVersion=e.modelVersion:typeof e.modelVersion=="object"&&(u.modelVersion=new l.LongBits(e.modelVersion.low>>>0,e.modelVersion.high>>>0).toNumber())),e.docString!=null&&(u.docString=String(e.docString)),e.graph!=null){if(typeof e.graph!="object")throw TypeError(".onnx.ModelProto.graph: object expected");u.graph=c.onnx.GraphProto.fromObject(e.graph)}if(e.metadataProps){if(!Array.isArray(e.metadataProps))throw TypeError(".onnx.ModelProto.metadataProps: array expected");u.metadataProps=[];for(var i=0;i<e.metadataProps.length;++i){if(typeof e.metadataProps[i]!="object")throw TypeError(".onnx.ModelProto.metadataProps: object expected");u.metadataProps[i]=c.onnx.StringStringEntryProto.fromObject(e.metadataProps[i])}}if(e.trainingInfo){if(!Array.isArray(e.trainingInfo))throw TypeError(".onnx.ModelProto.trainingInfo: array expected");u.trainingInfo=[];for(var i=0;i<e.trainingInfo.length;++i){if(typeof e.trainingInfo[i]!="object")throw TypeError(".onnx.ModelProto.trainingInfo: object expected");u.trainingInfo[i]=c.onnx.TrainingInfoProto.fromObject(e.trainingInfo[i])}}if(e.functions){if(!Array.isArray(e.functions))throw TypeError(".onnx.ModelProto.functions: array expected");u.functions=[];for(var i=0;i<e.functions.length;++i){if(typeof e.functions[i]!="object")throw TypeError(".onnx.ModelProto.functions: object expected");u.functions[i]=c.onnx.FunctionProto.fromObject(e.functions[i])}}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.opsetImport=[],i.metadataProps=[],i.trainingInfo=[],i.functions=[]),u.defaults){if(l.Long){var d=new l.Long(0,0,!1);i.irVersion=u.longs===String?d.toString():u.longs===Number?d.toNumber():d}else i.irVersion=u.longs===String?"0":0;if(i.producerName="",i.producerVersion="",i.domain="",l.Long){var d=new l.Long(0,0,!1);i.modelVersion=u.longs===String?d.toString():u.longs===Number?d.toNumber():d}else i.modelVersion=u.longs===String?"0":0;i.docString="",i.graph=null}if(e.irVersion!=null&&e.hasOwnProperty("irVersion")&&(typeof e.irVersion=="number"?i.irVersion=u.longs===String?String(e.irVersion):e.irVersion:i.irVersion=u.longs===String?l.Long.prototype.toString.call(e.irVersion):u.longs===Number?new l.LongBits(e.irVersion.low>>>0,e.irVersion.high>>>0).toNumber():e.irVersion),e.producerName!=null&&e.hasOwnProperty("producerName")&&(i.producerName=e.producerName),e.producerVersion!=null&&e.hasOwnProperty("producerVersion")&&(i.producerVersion=e.producerVersion),e.domain!=null&&e.hasOwnProperty("domain")&&(i.domain=e.domain),e.modelVersion!=null&&e.hasOwnProperty("modelVersion")&&(typeof e.modelVersion=="number"?i.modelVersion=u.longs===String?String(e.modelVersion):e.modelVersion:i.modelVersion=u.longs===String?l.Long.prototype.toString.call(e.modelVersion):u.longs===Number?new l.LongBits(e.modelVersion.low>>>0,e.modelVersion.high>>>0).toNumber():e.modelVersion),e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.graph!=null&&e.hasOwnProperty("graph")&&(i.graph=c.onnx.GraphProto.toObject(e.graph,u)),e.opsetImport&&e.opsetImport.length){i.opsetImport=[];for(var h=0;h<e.opsetImport.length;++h)i.opsetImport[h]=c.onnx.OperatorSetIdProto.toObject(e.opsetImport[h],u)}if(e.metadataProps&&e.metadataProps.length){i.metadataProps=[];for(var h=0;h<e.metadataProps.length;++h)i.metadataProps[h]=c.onnx.StringStringEntryProto.toObject(e.metadataProps[h],u)}if(e.trainingInfo&&e.trainingInfo.length){i.trainingInfo=[];for(var h=0;h<e.trainingInfo.length;++h)i.trainingInfo[h]=c.onnx.TrainingInfoProto.toObject(e.trainingInfo[h],u)}if(e.functions&&e.functions.length){i.functions=[];for(var h=0;h<e.functions.length;++h)i.functions[h]=c.onnx.FunctionProto.toObject(e.functions[h],u)}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.ModelProto"},a}(),o.StringStringEntryProto=function(){function a(e){if(e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.key="",a.prototype.value="",a.create=function(e){return new a(e)},a.encode=function(e,u){return u||(u=p.create()),e.key!=null&&Object.hasOwnProperty.call(e,"key")&&u.uint32(10).string(e.key),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&u.uint32(18).string(e.value),u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.StringStringEntryProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.key=e.string();break}case 2:{d.value=e.string();break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.key!=null&&e.hasOwnProperty("key")&&!l.isString(e.key)?"key: string expected":e.value!=null&&e.hasOwnProperty("value")&&!l.isString(e.value)?"value: string expected":null},a.fromObject=function(e){if(e instanceof c.onnx.StringStringEntryProto)return e;var u=new c.onnx.StringStringEntryProto;return e.key!=null&&(u.key=String(e.key)),e.value!=null&&(u.value=String(e.value)),u},a.toObject=function(e,u){u||(u={});var i={};return u.defaults&&(i.key="",i.value=""),e.key!=null&&e.hasOwnProperty("key")&&(i.key=e.key),e.value!=null&&e.hasOwnProperty("value")&&(i.value=e.value),i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.StringStringEntryProto"},a}(),o.TensorAnnotation=function(){function a(e){if(this.quantParameterTensorNames=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.tensorName="",a.prototype.quantParameterTensorNames=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.tensorName!=null&&Object.hasOwnProperty.call(e,"tensorName")&&u.uint32(10).string(e.tensorName),e.quantParameterTensorNames!=null&&e.quantParameterTensorNames.length)for(var i=0;i<e.quantParameterTensorNames.length;++i)c.onnx.StringStringEntryProto.encode(e.quantParameterTensorNames[i],u.uint32(18).fork()).ldelim();return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.TensorAnnotation;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.tensorName=e.string();break}case 2:{d.quantParameterTensorNames&&d.quantParameterTensorNames.length||(d.quantParameterTensorNames=[]),d.quantParameterTensorNames.push(c.onnx.StringStringEntryProto.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.tensorName!=null&&e.hasOwnProperty("tensorName")&&!l.isString(e.tensorName))return"tensorName: string expected";if(e.quantParameterTensorNames!=null&&e.hasOwnProperty("quantParameterTensorNames")){if(!Array.isArray(e.quantParameterTensorNames))return"quantParameterTensorNames: array expected";for(var u=0;u<e.quantParameterTensorNames.length;++u){var i=c.onnx.StringStringEntryProto.verify(e.quantParameterTensorNames[u]);if(i)return"quantParameterTensorNames."+i}}return null},a.fromObject=function(e){if(e instanceof c.onnx.TensorAnnotation)return e;var u=new c.onnx.TensorAnnotation;if(e.tensorName!=null&&(u.tensorName=String(e.tensorName)),e.quantParameterTensorNames){if(!Array.isArray(e.quantParameterTensorNames))throw TypeError(".onnx.TensorAnnotation.quantParameterTensorNames: array expected");u.quantParameterTensorNames=[];for(var i=0;i<e.quantParameterTensorNames.length;++i){if(typeof e.quantParameterTensorNames[i]!="object")throw TypeError(".onnx.TensorAnnotation.quantParameterTensorNames: object expected");u.quantParameterTensorNames[i]=c.onnx.StringStringEntryProto.fromObject(e.quantParameterTensorNames[i])}}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.quantParameterTensorNames=[]),u.defaults&&(i.tensorName=""),e.tensorName!=null&&e.hasOwnProperty("tensorName")&&(i.tensorName=e.tensorName),e.quantParameterTensorNames&&e.quantParameterTensorNames.length){i.quantParameterTensorNames=[];for(var d=0;d<e.quantParameterTensorNames.length;++d)i.quantParameterTensorNames[d]=c.onnx.StringStringEntryProto.toObject(e.quantParameterTensorNames[d],u)}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.TensorAnnotation"},a}(),o.GraphProto=function(){function a(e){if(this.node=[],this.initializer=[],this.sparseInitializer=[],this.input=[],this.output=[],this.valueInfo=[],this.quantizationAnnotation=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.node=l.emptyArray,a.prototype.name="",a.prototype.initializer=l.emptyArray,a.prototype.sparseInitializer=l.emptyArray,a.prototype.docString="",a.prototype.input=l.emptyArray,a.prototype.output=l.emptyArray,a.prototype.valueInfo=l.emptyArray,a.prototype.quantizationAnnotation=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.node!=null&&e.node.length)for(var i=0;i<e.node.length;++i)c.onnx.NodeProto.encode(e.node[i],u.uint32(10).fork()).ldelim();if(e.name!=null&&Object.hasOwnProperty.call(e,"name")&&u.uint32(18).string(e.name),e.initializer!=null&&e.initializer.length)for(var i=0;i<e.initializer.length;++i)c.onnx.TensorProto.encode(e.initializer[i],u.uint32(42).fork()).ldelim();if(e.docString!=null&&Object.hasOwnProperty.call(e,"docString")&&u.uint32(82).string(e.docString),e.input!=null&&e.input.length)for(var i=0;i<e.input.length;++i)c.onnx.ValueInfoProto.encode(e.input[i],u.uint32(90).fork()).ldelim();if(e.output!=null&&e.output.length)for(var i=0;i<e.output.length;++i)c.onnx.ValueInfoProto.encode(e.output[i],u.uint32(98).fork()).ldelim();if(e.valueInfo!=null&&e.valueInfo.length)for(var i=0;i<e.valueInfo.length;++i)c.onnx.ValueInfoProto.encode(e.valueInfo[i],u.uint32(106).fork()).ldelim();if(e.quantizationAnnotation!=null&&e.quantizationAnnotation.length)for(var i=0;i<e.quantizationAnnotation.length;++i)c.onnx.TensorAnnotation.encode(e.quantizationAnnotation[i],u.uint32(114).fork()).ldelim();if(e.sparseInitializer!=null&&e.sparseInitializer.length)for(var i=0;i<e.sparseInitializer.length;++i)c.onnx.SparseTensorProto.encode(e.sparseInitializer[i],u.uint32(122).fork()).ldelim();return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.GraphProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.node&&d.node.length||(d.node=[]),d.node.push(c.onnx.NodeProto.decode(e,e.uint32()));break}case 2:{d.name=e.string();break}case 5:{d.initializer&&d.initializer.length||(d.initializer=[]),d.initializer.push(c.onnx.TensorProto.decode(e,e.uint32()));break}case 15:{d.sparseInitializer&&d.sparseInitializer.length||(d.sparseInitializer=[]),d.sparseInitializer.push(c.onnx.SparseTensorProto.decode(e,e.uint32()));break}case 10:{d.docString=e.string();break}case 11:{d.input&&d.input.length||(d.input=[]),d.input.push(c.onnx.ValueInfoProto.decode(e,e.uint32()));break}case 12:{d.output&&d.output.length||(d.output=[]),d.output.push(c.onnx.ValueInfoProto.decode(e,e.uint32()));break}case 13:{d.valueInfo&&d.valueInfo.length||(d.valueInfo=[]),d.valueInfo.push(c.onnx.ValueInfoProto.decode(e,e.uint32()));break}case 14:{d.quantizationAnnotation&&d.quantizationAnnotation.length||(d.quantizationAnnotation=[]),d.quantizationAnnotation.push(c.onnx.TensorAnnotation.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.node!=null&&e.hasOwnProperty("node")){if(!Array.isArray(e.node))return"node: array expected";for(var u=0;u<e.node.length;++u){var i=c.onnx.NodeProto.verify(e.node[u]);if(i)return"node."+i}}if(e.name!=null&&e.hasOwnProperty("name")&&!l.isString(e.name))return"name: string expected";if(e.initializer!=null&&e.hasOwnProperty("initializer")){if(!Array.isArray(e.initializer))return"initializer: array expected";for(var u=0;u<e.initializer.length;++u){var i=c.onnx.TensorProto.verify(e.initializer[u]);if(i)return"initializer."+i}}if(e.sparseInitializer!=null&&e.hasOwnProperty("sparseInitializer")){if(!Array.isArray(e.sparseInitializer))return"sparseInitializer: array expected";for(var u=0;u<e.sparseInitializer.length;++u){var i=c.onnx.SparseTensorProto.verify(e.sparseInitializer[u]);if(i)return"sparseInitializer."+i}}if(e.docString!=null&&e.hasOwnProperty("docString")&&!l.isString(e.docString))return"docString: string expected";if(e.input!=null&&e.hasOwnProperty("input")){if(!Array.isArray(e.input))return"input: array expected";for(var u=0;u<e.input.length;++u){var i=c.onnx.ValueInfoProto.verify(e.input[u]);if(i)return"input."+i}}if(e.output!=null&&e.hasOwnProperty("output")){if(!Array.isArray(e.output))return"output: array expected";for(var u=0;u<e.output.length;++u){var i=c.onnx.ValueInfoProto.verify(e.output[u]);if(i)return"output."+i}}if(e.valueInfo!=null&&e.hasOwnProperty("valueInfo")){if(!Array.isArray(e.valueInfo))return"valueInfo: array expected";for(var u=0;u<e.valueInfo.length;++u){var i=c.onnx.ValueInfoProto.verify(e.valueInfo[u]);if(i)return"valueInfo."+i}}if(e.quantizationAnnotation!=null&&e.hasOwnProperty("quantizationAnnotation")){if(!Array.isArray(e.quantizationAnnotation))return"quantizationAnnotation: array expected";for(var u=0;u<e.quantizationAnnotation.length;++u){var i=c.onnx.TensorAnnotation.verify(e.quantizationAnnotation[u]);if(i)return"quantizationAnnotation."+i}}return null},a.fromObject=function(e){if(e instanceof c.onnx.GraphProto)return e;var u=new c.onnx.GraphProto;if(e.node){if(!Array.isArray(e.node))throw TypeError(".onnx.GraphProto.node: array expected");u.node=[];for(var i=0;i<e.node.length;++i){if(typeof e.node[i]!="object")throw TypeError(".onnx.GraphProto.node: object expected");u.node[i]=c.onnx.NodeProto.fromObject(e.node[i])}}if(e.name!=null&&(u.name=String(e.name)),e.initializer){if(!Array.isArray(e.initializer))throw TypeError(".onnx.GraphProto.initializer: array expected");u.initializer=[];for(var i=0;i<e.initializer.length;++i){if(typeof e.initializer[i]!="object")throw TypeError(".onnx.GraphProto.initializer: object expected");u.initializer[i]=c.onnx.TensorProto.fromObject(e.initializer[i])}}if(e.sparseInitializer){if(!Array.isArray(e.sparseInitializer))throw TypeError(".onnx.GraphProto.sparseInitializer: array expected");u.sparseInitializer=[];for(var i=0;i<e.sparseInitializer.length;++i){if(typeof e.sparseInitializer[i]!="object")throw TypeError(".onnx.GraphProto.sparseInitializer: object expected");u.sparseInitializer[i]=c.onnx.SparseTensorProto.fromObject(e.sparseInitializer[i])}}if(e.docString!=null&&(u.docString=String(e.docString)),e.input){if(!Array.isArray(e.input))throw TypeError(".onnx.GraphProto.input: array expected");u.input=[];for(var i=0;i<e.input.length;++i){if(typeof e.input[i]!="object")throw TypeError(".onnx.GraphProto.input: object expected");u.input[i]=c.onnx.ValueInfoProto.fromObject(e.input[i])}}if(e.output){if(!Array.isArray(e.output))throw TypeError(".onnx.GraphProto.output: array expected");u.output=[];for(var i=0;i<e.output.length;++i){if(typeof e.output[i]!="object")throw TypeError(".onnx.GraphProto.output: object expected");u.output[i]=c.onnx.ValueInfoProto.fromObject(e.output[i])}}if(e.valueInfo){if(!Array.isArray(e.valueInfo))throw TypeError(".onnx.GraphProto.valueInfo: array expected");u.valueInfo=[];for(var i=0;i<e.valueInfo.length;++i){if(typeof e.valueInfo[i]!="object")throw TypeError(".onnx.GraphProto.valueInfo: object expected");u.valueInfo[i]=c.onnx.ValueInfoProto.fromObject(e.valueInfo[i])}}if(e.quantizationAnnotation){if(!Array.isArray(e.quantizationAnnotation))throw TypeError(".onnx.GraphProto.quantizationAnnotation: array expected");u.quantizationAnnotation=[];for(var i=0;i<e.quantizationAnnotation.length;++i){if(typeof e.quantizationAnnotation[i]!="object")throw TypeError(".onnx.GraphProto.quantizationAnnotation: object expected");u.quantizationAnnotation[i]=c.onnx.TensorAnnotation.fromObject(e.quantizationAnnotation[i])}}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.node=[],i.initializer=[],i.input=[],i.output=[],i.valueInfo=[],i.quantizationAnnotation=[],i.sparseInitializer=[]),u.defaults&&(i.name="",i.docString=""),e.node&&e.node.length){i.node=[];for(var d=0;d<e.node.length;++d)i.node[d]=c.onnx.NodeProto.toObject(e.node[d],u)}if(e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.initializer&&e.initializer.length){i.initializer=[];for(var d=0;d<e.initializer.length;++d)i.initializer[d]=c.onnx.TensorProto.toObject(e.initializer[d],u)}if(e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.input&&e.input.length){i.input=[];for(var d=0;d<e.input.length;++d)i.input[d]=c.onnx.ValueInfoProto.toObject(e.input[d],u)}if(e.output&&e.output.length){i.output=[];for(var d=0;d<e.output.length;++d)i.output[d]=c.onnx.ValueInfoProto.toObject(e.output[d],u)}if(e.valueInfo&&e.valueInfo.length){i.valueInfo=[];for(var d=0;d<e.valueInfo.length;++d)i.valueInfo[d]=c.onnx.ValueInfoProto.toObject(e.valueInfo[d],u)}if(e.quantizationAnnotation&&e.quantizationAnnotation.length){i.quantizationAnnotation=[];for(var d=0;d<e.quantizationAnnotation.length;++d)i.quantizationAnnotation[d]=c.onnx.TensorAnnotation.toObject(e.quantizationAnnotation[d],u)}if(e.sparseInitializer&&e.sparseInitializer.length){i.sparseInitializer=[];for(var d=0;d<e.sparseInitializer.length;++d)i.sparseInitializer[d]=c.onnx.SparseTensorProto.toObject(e.sparseInitializer[d],u)}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.GraphProto"},a}(),o.TensorProto=function(){function a(e){if(this.dims=[],this.floatData=[],this.int32Data=[],this.stringData=[],this.int64Data=[],this.externalData=[],this.doubleData=[],this.uint64Data=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.dims=l.emptyArray,a.prototype.dataType=0,a.prototype.segment=null,a.prototype.floatData=l.emptyArray,a.prototype.int32Data=l.emptyArray,a.prototype.stringData=l.emptyArray,a.prototype.int64Data=l.emptyArray,a.prototype.name="",a.prototype.docString="",a.prototype.rawData=l.newBuffer([]),a.prototype.externalData=l.emptyArray,a.prototype.dataLocation=0,a.prototype.doubleData=l.emptyArray,a.prototype.uint64Data=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.dims!=null&&e.dims.length){u.uint32(10).fork();for(var i=0;i<e.dims.length;++i)u.int64(e.dims[i]);u.ldelim()}if(e.dataType!=null&&Object.hasOwnProperty.call(e,"dataType")&&u.uint32(16).int32(e.dataType),e.segment!=null&&Object.hasOwnProperty.call(e,"segment")&&c.onnx.TensorProto.Segment.encode(e.segment,u.uint32(26).fork()).ldelim(),e.floatData!=null&&e.floatData.length){u.uint32(34).fork();for(var i=0;i<e.floatData.length;++i)u.float(e.floatData[i]);u.ldelim()}if(e.int32Data!=null&&e.int32Data.length){u.uint32(42).fork();for(var i=0;i<e.int32Data.length;++i)u.int32(e.int32Data[i]);u.ldelim()}if(e.stringData!=null&&e.stringData.length)for(var i=0;i<e.stringData.length;++i)u.uint32(50).bytes(e.stringData[i]);if(e.int64Data!=null&&e.int64Data.length){u.uint32(58).fork();for(var i=0;i<e.int64Data.length;++i)u.int64(e.int64Data[i]);u.ldelim()}if(e.name!=null&&Object.hasOwnProperty.call(e,"name")&&u.uint32(66).string(e.name),e.rawData!=null&&Object.hasOwnProperty.call(e,"rawData")&&u.uint32(74).bytes(e.rawData),e.doubleData!=null&&e.doubleData.length){u.uint32(82).fork();for(var i=0;i<e.doubleData.length;++i)u.double(e.doubleData[i]);u.ldelim()}if(e.uint64Data!=null&&e.uint64Data.length){u.uint32(90).fork();for(var i=0;i<e.uint64Data.length;++i)u.uint64(e.uint64Data[i]);u.ldelim()}if(e.docString!=null&&Object.hasOwnProperty.call(e,"docString")&&u.uint32(98).string(e.docString),e.externalData!=null&&e.externalData.length)for(var i=0;i<e.externalData.length;++i)c.onnx.StringStringEntryProto.encode(e.externalData[i],u.uint32(106).fork()).ldelim();return e.dataLocation!=null&&Object.hasOwnProperty.call(e,"dataLocation")&&u.uint32(112).int32(e.dataLocation),u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.TensorProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{if(d.dims&&d.dims.length||(d.dims=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.dims.push(e.int64());else d.dims.push(e.int64());break}case 2:{d.dataType=e.int32();break}case 3:{d.segment=c.onnx.TensorProto.Segment.decode(e,e.uint32());break}case 4:{if(d.floatData&&d.floatData.length||(d.floatData=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.floatData.push(e.float());else d.floatData.push(e.float());break}case 5:{if(d.int32Data&&d.int32Data.length||(d.int32Data=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.int32Data.push(e.int32());else d.int32Data.push(e.int32());break}case 6:{d.stringData&&d.stringData.length||(d.stringData=[]),d.stringData.push(e.bytes());break}case 7:{if(d.int64Data&&d.int64Data.length||(d.int64Data=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.int64Data.push(e.int64());else d.int64Data.push(e.int64());break}case 8:{d.name=e.string();break}case 12:{d.docString=e.string();break}case 9:{d.rawData=e.bytes();break}case 13:{d.externalData&&d.externalData.length||(d.externalData=[]),d.externalData.push(c.onnx.StringStringEntryProto.decode(e,e.uint32()));break}case 14:{d.dataLocation=e.int32();break}case 10:{if(d.doubleData&&d.doubleData.length||(d.doubleData=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.doubleData.push(e.double());else d.doubleData.push(e.double());break}case 11:{if(d.uint64Data&&d.uint64Data.length||(d.uint64Data=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.uint64Data.push(e.uint64());else d.uint64Data.push(e.uint64());break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dims!=null&&e.hasOwnProperty("dims")){if(!Array.isArray(e.dims))return"dims: array expected";for(var u=0;u<e.dims.length;++u)if(!l.isInteger(e.dims[u])&&!(e.dims[u]&&l.isInteger(e.dims[u].low)&&l.isInteger(e.dims[u].high)))return"dims: integer|Long[] expected"}if(e.dataType!=null&&e.hasOwnProperty("dataType")&&!l.isInteger(e.dataType))return"dataType: integer expected";if(e.segment!=null&&e.hasOwnProperty("segment")){var i=c.onnx.TensorProto.Segment.verify(e.segment);if(i)return"segment."+i}if(e.floatData!=null&&e.hasOwnProperty("floatData")){if(!Array.isArray(e.floatData))return"floatData: array expected";for(var u=0;u<e.floatData.length;++u)if(typeof e.floatData[u]!="number")return"floatData: number[] expected"}if(e.int32Data!=null&&e.hasOwnProperty("int32Data")){if(!Array.isArray(e.int32Data))return"int32Data: array expected";for(var u=0;u<e.int32Data.length;++u)if(!l.isInteger(e.int32Data[u]))return"int32Data: integer[] expected"}if(e.stringData!=null&&e.hasOwnProperty("stringData")){if(!Array.isArray(e.stringData))return"stringData: array expected";for(var u=0;u<e.stringData.length;++u)if(!(e.stringData[u]&&typeof e.stringData[u].length=="number"||l.isString(e.stringData[u])))return"stringData: buffer[] expected"}if(e.int64Data!=null&&e.hasOwnProperty("int64Data")){if(!Array.isArray(e.int64Data))return"int64Data: array expected";for(var u=0;u<e.int64Data.length;++u)if(!l.isInteger(e.int64Data[u])&&!(e.int64Data[u]&&l.isInteger(e.int64Data[u].low)&&l.isInteger(e.int64Data[u].high)))return"int64Data: integer|Long[] expected"}if(e.name!=null&&e.hasOwnProperty("name")&&!l.isString(e.name))return"name: string expected";if(e.docString!=null&&e.hasOwnProperty("docString")&&!l.isString(e.docString))return"docString: string expected";if(e.rawData!=null&&e.hasOwnProperty("rawData")&&!(e.rawData&&typeof e.rawData.length=="number"||l.isString(e.rawData)))return"rawData: buffer expected";if(e.externalData!=null&&e.hasOwnProperty("externalData")){if(!Array.isArray(e.externalData))return"externalData: array expected";for(var u=0;u<e.externalData.length;++u){var i=c.onnx.StringStringEntryProto.verify(e.externalData[u]);if(i)return"externalData."+i}}if(e.dataLocation!=null&&e.hasOwnProperty("dataLocation"))switch(e.dataLocation){default:return"dataLocation: enum value expected";case 0:case 1:break}if(e.doubleData!=null&&e.hasOwnProperty("doubleData")){if(!Array.isArray(e.doubleData))return"doubleData: array expected";for(var u=0;u<e.doubleData.length;++u)if(typeof e.doubleData[u]!="number")return"doubleData: number[] expected"}if(e.uint64Data!=null&&e.hasOwnProperty("uint64Data")){if(!Array.isArray(e.uint64Data))return"uint64Data: array expected";for(var u=0;u<e.uint64Data.length;++u)if(!l.isInteger(e.uint64Data[u])&&!(e.uint64Data[u]&&l.isInteger(e.uint64Data[u].low)&&l.isInteger(e.uint64Data[u].high)))return"uint64Data: integer|Long[] expected"}return null},a.fromObject=function(e){if(e instanceof c.onnx.TensorProto)return e;var u=new c.onnx.TensorProto;if(e.dims){if(!Array.isArray(e.dims))throw TypeError(".onnx.TensorProto.dims: array expected");u.dims=[];for(var i=0;i<e.dims.length;++i)l.Long?(u.dims[i]=l.Long.fromValue(e.dims[i])).unsigned=!1:typeof e.dims[i]=="string"?u.dims[i]=parseInt(e.dims[i],10):typeof e.dims[i]=="number"?u.dims[i]=e.dims[i]:typeof e.dims[i]=="object"&&(u.dims[i]=new l.LongBits(e.dims[i].low>>>0,e.dims[i].high>>>0).toNumber())}if(e.dataType!=null&&(u.dataType=e.dataType|0),e.segment!=null){if(typeof e.segment!="object")throw TypeError(".onnx.TensorProto.segment: object expected");u.segment=c.onnx.TensorProto.Segment.fromObject(e.segment)}if(e.floatData){if(!Array.isArray(e.floatData))throw TypeError(".onnx.TensorProto.floatData: array expected");u.floatData=[];for(var i=0;i<e.floatData.length;++i)u.floatData[i]=Number(e.floatData[i])}if(e.int32Data){if(!Array.isArray(e.int32Data))throw TypeError(".onnx.TensorProto.int32Data: array expected");u.int32Data=[];for(var i=0;i<e.int32Data.length;++i)u.int32Data[i]=e.int32Data[i]|0}if(e.stringData){if(!Array.isArray(e.stringData))throw TypeError(".onnx.TensorProto.stringData: array expected");u.stringData=[];for(var i=0;i<e.stringData.length;++i)typeof e.stringData[i]=="string"?l.base64.decode(e.stringData[i],u.stringData[i]=l.newBuffer(l.base64.length(e.stringData[i])),0):e.stringData[i].length>=0&&(u.stringData[i]=e.stringData[i])}if(e.int64Data){if(!Array.isArray(e.int64Data))throw TypeError(".onnx.TensorProto.int64Data: array expected");u.int64Data=[];for(var i=0;i<e.int64Data.length;++i)l.Long?(u.int64Data[i]=l.Long.fromValue(e.int64Data[i])).unsigned=!1:typeof e.int64Data[i]=="string"?u.int64Data[i]=parseInt(e.int64Data[i],10):typeof e.int64Data[i]=="number"?u.int64Data[i]=e.int64Data[i]:typeof e.int64Data[i]=="object"&&(u.int64Data[i]=new l.LongBits(e.int64Data[i].low>>>0,e.int64Data[i].high>>>0).toNumber())}if(e.name!=null&&(u.name=String(e.name)),e.docString!=null&&(u.docString=String(e.docString)),e.rawData!=null&&(typeof e.rawData=="string"?l.base64.decode(e.rawData,u.rawData=l.newBuffer(l.base64.length(e.rawData)),0):e.rawData.length>=0&&(u.rawData=e.rawData)),e.externalData){if(!Array.isArray(e.externalData))throw TypeError(".onnx.TensorProto.externalData: array expected");u.externalData=[];for(var i=0;i<e.externalData.length;++i){if(typeof e.externalData[i]!="object")throw TypeError(".onnx.TensorProto.externalData: object expected");u.externalData[i]=c.onnx.StringStringEntryProto.fromObject(e.externalData[i])}}switch(e.dataLocation){default:if(typeof e.dataLocation=="number"){u.dataLocation=e.dataLocation;break}break;case"DEFAULT":case 0:u.dataLocation=0;break;case"EXTERNAL":case 1:u.dataLocation=1;break}if(e.doubleData){if(!Array.isArray(e.doubleData))throw TypeError(".onnx.TensorProto.doubleData: array expected");u.doubleData=[];for(var i=0;i<e.doubleData.length;++i)u.doubleData[i]=Number(e.doubleData[i])}if(e.uint64Data){if(!Array.isArray(e.uint64Data))throw TypeError(".onnx.TensorProto.uint64Data: array expected");u.uint64Data=[];for(var i=0;i<e.uint64Data.length;++i)l.Long?(u.uint64Data[i]=l.Long.fromValue(e.uint64Data[i])).unsigned=!0:typeof e.uint64Data[i]=="string"?u.uint64Data[i]=parseInt(e.uint64Data[i],10):typeof e.uint64Data[i]=="number"?u.uint64Data[i]=e.uint64Data[i]:typeof e.uint64Data[i]=="object"&&(u.uint64Data[i]=new l.LongBits(e.uint64Data[i].low>>>0,e.uint64Data[i].high>>>0).toNumber(!0))}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.dims=[],i.floatData=[],i.int32Data=[],i.stringData=[],i.int64Data=[],i.doubleData=[],i.uint64Data=[],i.externalData=[]),u.defaults&&(i.dataType=0,i.segment=null,i.name="",u.bytes===String?i.rawData="":(i.rawData=[],u.bytes!==Array&&(i.rawData=l.newBuffer(i.rawData))),i.docString="",i.dataLocation=u.enums===String?"DEFAULT":0),e.dims&&e.dims.length){i.dims=[];for(var d=0;d<e.dims.length;++d)typeof e.dims[d]=="number"?i.dims[d]=u.longs===String?String(e.dims[d]):e.dims[d]:i.dims[d]=u.longs===String?l.Long.prototype.toString.call(e.dims[d]):u.longs===Number?new l.LongBits(e.dims[d].low>>>0,e.dims[d].high>>>0).toNumber():e.dims[d]}if(e.dataType!=null&&e.hasOwnProperty("dataType")&&(i.dataType=e.dataType),e.segment!=null&&e.hasOwnProperty("segment")&&(i.segment=c.onnx.TensorProto.Segment.toObject(e.segment,u)),e.floatData&&e.floatData.length){i.floatData=[];for(var d=0;d<e.floatData.length;++d)i.floatData[d]=u.json&&!isFinite(e.floatData[d])?String(e.floatData[d]):e.floatData[d]}if(e.int32Data&&e.int32Data.length){i.int32Data=[];for(var d=0;d<e.int32Data.length;++d)i.int32Data[d]=e.int32Data[d]}if(e.stringData&&e.stringData.length){i.stringData=[];for(var d=0;d<e.stringData.length;++d)i.stringData[d]=u.bytes===String?l.base64.encode(e.stringData[d],0,e.stringData[d].length):u.bytes===Array?Array.prototype.slice.call(e.stringData[d]):e.stringData[d]}if(e.int64Data&&e.int64Data.length){i.int64Data=[];for(var d=0;d<e.int64Data.length;++d)typeof e.int64Data[d]=="number"?i.int64Data[d]=u.longs===String?String(e.int64Data[d]):e.int64Data[d]:i.int64Data[d]=u.longs===String?l.Long.prototype.toString.call(e.int64Data[d]):u.longs===Number?new l.LongBits(e.int64Data[d].low>>>0,e.int64Data[d].high>>>0).toNumber():e.int64Data[d]}if(e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.rawData!=null&&e.hasOwnProperty("rawData")&&(i.rawData=u.bytes===String?l.base64.encode(e.rawData,0,e.rawData.length):u.bytes===Array?Array.prototype.slice.call(e.rawData):e.rawData),e.doubleData&&e.doubleData.length){i.doubleData=[];for(var d=0;d<e.doubleData.length;++d)i.doubleData[d]=u.json&&!isFinite(e.doubleData[d])?String(e.doubleData[d]):e.doubleData[d]}if(e.uint64Data&&e.uint64Data.length){i.uint64Data=[];for(var d=0;d<e.uint64Data.length;++d)typeof e.uint64Data[d]=="number"?i.uint64Data[d]=u.longs===String?String(e.uint64Data[d]):e.uint64Data[d]:i.uint64Data[d]=u.longs===String?l.Long.prototype.toString.call(e.uint64Data[d]):u.longs===Number?new l.LongBits(e.uint64Data[d].low>>>0,e.uint64Data[d].high>>>0).toNumber(!0):e.uint64Data[d]}if(e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.externalData&&e.externalData.length){i.externalData=[];for(var d=0;d<e.externalData.length;++d)i.externalData[d]=c.onnx.StringStringEntryProto.toObject(e.externalData[d],u)}return e.dataLocation!=null&&e.hasOwnProperty("dataLocation")&&(i.dataLocation=u.enums===String?c.onnx.TensorProto.DataLocation[e.dataLocation]===void 0?e.dataLocation:c.onnx.TensorProto.DataLocation[e.dataLocation]:e.dataLocation),i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.TensorProto"},a.DataType=function(){var e={},u=Object.create(e);return u[e[0]="UNDEFINED"]=0,u[e[1]="FLOAT"]=1,u[e[2]="UINT8"]=2,u[e[3]="INT8"]=3,u[e[4]="UINT16"]=4,u[e[5]="INT16"]=5,u[e[6]="INT32"]=6,u[e[7]="INT64"]=7,u[e[8]="STRING"]=8,u[e[9]="BOOL"]=9,u[e[10]="FLOAT16"]=10,u[e[11]="DOUBLE"]=11,u[e[12]="UINT32"]=12,u[e[13]="UINT64"]=13,u[e[14]="COMPLEX64"]=14,u[e[15]="COMPLEX128"]=15,u[e[16]="BFLOAT16"]=16,u[e[17]="FLOAT8E4M3FN"]=17,u[e[18]="FLOAT8E4M3FNUZ"]=18,u[e[19]="FLOAT8E5M2"]=19,u[e[20]="FLOAT8E5M2FNUZ"]=20,u}(),a.Segment=function(){function e(u){if(u)for(var i=Object.keys(u),d=0;d<i.length;++d)u[i[d]]!=null&&(this[i[d]]=u[i[d]])}return e.prototype.begin=l.Long?l.Long.fromBits(0,0,!1):0,e.prototype.end=l.Long?l.Long.fromBits(0,0,!1):0,e.create=function(u){return new e(u)},e.encode=function(u,i){return i||(i=p.create()),u.begin!=null&&Object.hasOwnProperty.call(u,"begin")&&i.uint32(8).int64(u.begin),u.end!=null&&Object.hasOwnProperty.call(u,"end")&&i.uint32(16).int64(u.end),i},e.encodeDelimited=function(u,i){return this.encode(u,i).ldelim()},e.decode=function(u,i){u instanceof s||(u=s.create(u));for(var d=i===void 0?u.len:u.pos+i,h=new c.onnx.TensorProto.Segment;u.pos<d;){var m=u.uint32();switch(m>>>3){case 1:{h.begin=u.int64();break}case 2:{h.end=u.int64();break}default:u.skipType(m&7);break}}return h},e.decodeDelimited=function(u){return u instanceof s||(u=new s(u)),this.decode(u,u.uint32())},e.verify=function(u){return typeof u!="object"||u===null?"object expected":u.begin!=null&&u.hasOwnProperty("begin")&&!l.isInteger(u.begin)&&!(u.begin&&l.isInteger(u.begin.low)&&l.isInteger(u.begin.high))?"begin: integer|Long expected":u.end!=null&&u.hasOwnProperty("end")&&!l.isInteger(u.end)&&!(u.end&&l.isInteger(u.end.low)&&l.isInteger(u.end.high))?"end: integer|Long expected":null},e.fromObject=function(u){if(u instanceof c.onnx.TensorProto.Segment)return u;var i=new c.onnx.TensorProto.Segment;return u.begin!=null&&(l.Long?(i.begin=l.Long.fromValue(u.begin)).unsigned=!1:typeof u.begin=="string"?i.begin=parseInt(u.begin,10):typeof u.begin=="number"?i.begin=u.begin:typeof u.begin=="object"&&(i.begin=new l.LongBits(u.begin.low>>>0,u.begin.high>>>0).toNumber())),u.end!=null&&(l.Long?(i.end=l.Long.fromValue(u.end)).unsigned=!1:typeof u.end=="string"?i.end=parseInt(u.end,10):typeof u.end=="number"?i.end=u.end:typeof u.end=="object"&&(i.end=new l.LongBits(u.end.low>>>0,u.end.high>>>0).toNumber())),i},e.toObject=function(u,i){i||(i={});var d={};if(i.defaults){if(l.Long){var h=new l.Long(0,0,!1);d.begin=i.longs===String?h.toString():i.longs===Number?h.toNumber():h}else d.begin=i.longs===String?"0":0;if(l.Long){var h=new l.Long(0,0,!1);d.end=i.longs===String?h.toString():i.longs===Number?h.toNumber():h}else d.end=i.longs===String?"0":0}return u.begin!=null&&u.hasOwnProperty("begin")&&(typeof u.begin=="number"?d.begin=i.longs===String?String(u.begin):u.begin:d.begin=i.longs===String?l.Long.prototype.toString.call(u.begin):i.longs===Number?new l.LongBits(u.begin.low>>>0,u.begin.high>>>0).toNumber():u.begin),u.end!=null&&u.hasOwnProperty("end")&&(typeof u.end=="number"?d.end=i.longs===String?String(u.end):u.end:d.end=i.longs===String?l.Long.prototype.toString.call(u.end):i.longs===Number?new l.LongBits(u.end.low>>>0,u.end.high>>>0).toNumber():u.end),d},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/onnx.TensorProto.Segment"},e}(),a.DataLocation=function(){var e={},u=Object.create(e);return u[e[0]="DEFAULT"]=0,u[e[1]="EXTERNAL"]=1,u}(),a}(),o.SparseTensorProto=function(){function a(e){if(this.dims=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.values=null,a.prototype.indices=null,a.prototype.dims=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.values!=null&&Object.hasOwnProperty.call(e,"values")&&c.onnx.TensorProto.encode(e.values,u.uint32(10).fork()).ldelim(),e.indices!=null&&Object.hasOwnProperty.call(e,"indices")&&c.onnx.TensorProto.encode(e.indices,u.uint32(18).fork()).ldelim(),e.dims!=null&&e.dims.length){u.uint32(26).fork();for(var i=0;i<e.dims.length;++i)u.int64(e.dims[i]);u.ldelim()}return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.SparseTensorProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.values=c.onnx.TensorProto.decode(e,e.uint32());break}case 2:{d.indices=c.onnx.TensorProto.decode(e,e.uint32());break}case 3:{if(d.dims&&d.dims.length||(d.dims=[]),(h&7)===2)for(var m=e.uint32()+e.pos;e.pos<m;)d.dims.push(e.int64());else d.dims.push(e.int64());break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.values!=null&&e.hasOwnProperty("values")){var u=c.onnx.TensorProto.verify(e.values);if(u)return"values."+u}if(e.indices!=null&&e.hasOwnProperty("indices")){var u=c.onnx.TensorProto.verify(e.indices);if(u)return"indices."+u}if(e.dims!=null&&e.hasOwnProperty("dims")){if(!Array.isArray(e.dims))return"dims: array expected";for(var i=0;i<e.dims.length;++i)if(!l.isInteger(e.dims[i])&&!(e.dims[i]&&l.isInteger(e.dims[i].low)&&l.isInteger(e.dims[i].high)))return"dims: integer|Long[] expected"}return null},a.fromObject=function(e){if(e instanceof c.onnx.SparseTensorProto)return e;var u=new c.onnx.SparseTensorProto;if(e.values!=null){if(typeof e.values!="object")throw TypeError(".onnx.SparseTensorProto.values: object expected");u.values=c.onnx.TensorProto.fromObject(e.values)}if(e.indices!=null){if(typeof e.indices!="object")throw TypeError(".onnx.SparseTensorProto.indices: object expected");u.indices=c.onnx.TensorProto.fromObject(e.indices)}if(e.dims){if(!Array.isArray(e.dims))throw TypeError(".onnx.SparseTensorProto.dims: array expected");u.dims=[];for(var i=0;i<e.dims.length;++i)l.Long?(u.dims[i]=l.Long.fromValue(e.dims[i])).unsigned=!1:typeof e.dims[i]=="string"?u.dims[i]=parseInt(e.dims[i],10):typeof e.dims[i]=="number"?u.dims[i]=e.dims[i]:typeof e.dims[i]=="object"&&(u.dims[i]=new l.LongBits(e.dims[i].low>>>0,e.dims[i].high>>>0).toNumber())}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.dims=[]),u.defaults&&(i.values=null,i.indices=null),e.values!=null&&e.hasOwnProperty("values")&&(i.values=c.onnx.TensorProto.toObject(e.values,u)),e.indices!=null&&e.hasOwnProperty("indices")&&(i.indices=c.onnx.TensorProto.toObject(e.indices,u)),e.dims&&e.dims.length){i.dims=[];for(var d=0;d<e.dims.length;++d)typeof e.dims[d]=="number"?i.dims[d]=u.longs===String?String(e.dims[d]):e.dims[d]:i.dims[d]=u.longs===String?l.Long.prototype.toString.call(e.dims[d]):u.longs===Number?new l.LongBits(e.dims[d].low>>>0,e.dims[d].high>>>0).toNumber():e.dims[d]}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.SparseTensorProto"},a}(),o.TensorShapeProto=function(){function a(e){if(this.dim=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.dim=l.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.dim!=null&&e.dim.length)for(var i=0;i<e.dim.length;++i)c.onnx.TensorShapeProto.Dimension.encode(e.dim[i],u.uint32(10).fork()).ldelim();return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.TensorShapeProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.dim&&d.dim.length||(d.dim=[]),d.dim.push(c.onnx.TensorShapeProto.Dimension.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dim!=null&&e.hasOwnProperty("dim")){if(!Array.isArray(e.dim))return"dim: array expected";for(var u=0;u<e.dim.length;++u){var i=c.onnx.TensorShapeProto.Dimension.verify(e.dim[u]);if(i)return"dim."+i}}return null},a.fromObject=function(e){if(e instanceof c.onnx.TensorShapeProto)return e;var u=new c.onnx.TensorShapeProto;if(e.dim){if(!Array.isArray(e.dim))throw TypeError(".onnx.TensorShapeProto.dim: array expected");u.dim=[];for(var i=0;i<e.dim.length;++i){if(typeof e.dim[i]!="object")throw TypeError(".onnx.TensorShapeProto.dim: object expected");u.dim[i]=c.onnx.TensorShapeProto.Dimension.fromObject(e.dim[i])}}return u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.dim=[]),e.dim&&e.dim.length){i.dim=[];for(var d=0;d<e.dim.length;++d)i.dim[d]=c.onnx.TensorShapeProto.Dimension.toObject(e.dim[d],u)}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.TensorShapeProto"},a.Dimension=function(){function e(i){if(i)for(var d=Object.keys(i),h=0;h<d.length;++h)i[d[h]]!=null&&(this[d[h]]=i[d[h]])}e.prototype.dimValue=null,e.prototype.dimParam=null,e.prototype.denotation="";var u;return Object.defineProperty(e.prototype,"value",{get:l.oneOfGetter(u=["dimValue","dimParam"]),set:l.oneOfSetter(u)}),e.create=function(i){return new e(i)},e.encode=function(i,d){return d||(d=p.create()),i.dimValue!=null&&Object.hasOwnProperty.call(i,"dimValue")&&d.uint32(8).int64(i.dimValue),i.dimParam!=null&&Object.hasOwnProperty.call(i,"dimParam")&&d.uint32(18).string(i.dimParam),i.denotation!=null&&Object.hasOwnProperty.call(i,"denotation")&&d.uint32(26).string(i.denotation),d},e.encodeDelimited=function(i,d){return this.encode(i,d).ldelim()},e.decode=function(i,d){i instanceof s||(i=s.create(i));for(var h=d===void 0?i.len:i.pos+d,m=new c.onnx.TensorShapeProto.Dimension;i.pos<h;){var b=i.uint32();switch(b>>>3){case 1:{m.dimValue=i.int64();break}case 2:{m.dimParam=i.string();break}case 3:{m.denotation=i.string();break}default:i.skipType(b&7);break}}return m},e.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},e.verify=function(i){if(typeof i!="object"||i===null)return"object expected";var d={};if(i.dimValue!=null&&i.hasOwnProperty("dimValue")&&(d.value=1,!l.isInteger(i.dimValue)&&!(i.dimValue&&l.isInteger(i.dimValue.low)&&l.isInteger(i.dimValue.high))))return"dimValue: integer|Long expected";if(i.dimParam!=null&&i.hasOwnProperty("dimParam")){if(d.value===1)return"value: multiple values";if(d.value=1,!l.isString(i.dimParam))return"dimParam: string expected"}return i.denotation!=null&&i.hasOwnProperty("denotation")&&!l.isString(i.denotation)?"denotation: string expected":null},e.fromObject=function(i){if(i instanceof c.onnx.TensorShapeProto.Dimension)return i;var d=new c.onnx.TensorShapeProto.Dimension;return i.dimValue!=null&&(l.Long?(d.dimValue=l.Long.fromValue(i.dimValue)).unsigned=!1:typeof i.dimValue=="string"?d.dimValue=parseInt(i.dimValue,10):typeof i.dimValue=="number"?d.dimValue=i.dimValue:typeof i.dimValue=="object"&&(d.dimValue=new l.LongBits(i.dimValue.low>>>0,i.dimValue.high>>>0).toNumber())),i.dimParam!=null&&(d.dimParam=String(i.dimParam)),i.denotation!=null&&(d.denotation=String(i.denotation)),d},e.toObject=function(i,d){d||(d={});var h={};return d.defaults&&(h.denotation=""),i.dimValue!=null&&i.hasOwnProperty("dimValue")&&(typeof i.dimValue=="number"?h.dimValue=d.longs===String?String(i.dimValue):i.dimValue:h.dimValue=d.longs===String?l.Long.prototype.toString.call(i.dimValue):d.longs===Number?new l.LongBits(i.dimValue.low>>>0,i.dimValue.high>>>0).toNumber():i.dimValue,d.oneofs&&(h.value="dimValue")),i.dimParam!=null&&i.hasOwnProperty("dimParam")&&(h.dimParam=i.dimParam,d.oneofs&&(h.value="dimParam")),i.denotation!=null&&i.hasOwnProperty("denotation")&&(h.denotation=i.denotation),h},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/onnx.TensorShapeProto.Dimension"},e}(),a}(),o.TypeProto=function(){function a(u){if(u)for(var i=Object.keys(u),d=0;d<i.length;++d)u[i[d]]!=null&&(this[i[d]]=u[i[d]])}a.prototype.tensorType=null,a.prototype.sequenceType=null,a.prototype.mapType=null,a.prototype.optionalType=null,a.prototype.sparseTensorType=null,a.prototype.denotation="";var e;return Object.defineProperty(a.prototype,"value",{get:l.oneOfGetter(e=["tensorType","sequenceType","mapType","optionalType","sparseTensorType"]),set:l.oneOfSetter(e)}),a.create=function(u){return new a(u)},a.encode=function(u,i){return i||(i=p.create()),u.tensorType!=null&&Object.hasOwnProperty.call(u,"tensorType")&&c.onnx.TypeProto.Tensor.encode(u.tensorType,i.uint32(10).fork()).ldelim(),u.sequenceType!=null&&Object.hasOwnProperty.call(u,"sequenceType")&&c.onnx.TypeProto.Sequence.encode(u.sequenceType,i.uint32(34).fork()).ldelim(),u.mapType!=null&&Object.hasOwnProperty.call(u,"mapType")&&c.onnx.TypeProto.Map.encode(u.mapType,i.uint32(42).fork()).ldelim(),u.denotation!=null&&Object.hasOwnProperty.call(u,"denotation")&&i.uint32(50).string(u.denotation),u.sparseTensorType!=null&&Object.hasOwnProperty.call(u,"sparseTensorType")&&c.onnx.TypeProto.SparseTensor.encode(u.sparseTensorType,i.uint32(66).fork()).ldelim(),u.optionalType!=null&&Object.hasOwnProperty.call(u,"optionalType")&&c.onnx.TypeProto.Optional.encode(u.optionalType,i.uint32(74).fork()).ldelim(),i},a.encodeDelimited=function(u,i){return this.encode(u,i).ldelim()},a.decode=function(u,i){u instanceof s||(u=s.create(u));for(var d=i===void 0?u.len:u.pos+i,h=new c.onnx.TypeProto;u.pos<d;){var m=u.uint32();switch(m>>>3){case 1:{h.tensorType=c.onnx.TypeProto.Tensor.decode(u,u.uint32());break}case 4:{h.sequenceType=c.onnx.TypeProto.Sequence.decode(u,u.uint32());break}case 5:{h.mapType=c.onnx.TypeProto.Map.decode(u,u.uint32());break}case 9:{h.optionalType=c.onnx.TypeProto.Optional.decode(u,u.uint32());break}case 8:{h.sparseTensorType=c.onnx.TypeProto.SparseTensor.decode(u,u.uint32());break}case 6:{h.denotation=u.string();break}default:u.skipType(m&7);break}}return h},a.decodeDelimited=function(u){return u instanceof s||(u=new s(u)),this.decode(u,u.uint32())},a.verify=function(u){if(typeof u!="object"||u===null)return"object expected";var i={};if(u.tensorType!=null&&u.hasOwnProperty("tensorType")){i.value=1;{var d=c.onnx.TypeProto.Tensor.verify(u.tensorType);if(d)return"tensorType."+d}}if(u.sequenceType!=null&&u.hasOwnProperty("sequenceType")){if(i.value===1)return"value: multiple values";i.value=1;{var d=c.onnx.TypeProto.Sequence.verify(u.sequenceType);if(d)return"sequenceType."+d}}if(u.mapType!=null&&u.hasOwnProperty("mapType")){if(i.value===1)return"value: multiple values";i.value=1;{var d=c.onnx.TypeProto.Map.verify(u.mapType);if(d)return"mapType."+d}}if(u.optionalType!=null&&u.hasOwnProperty("optionalType")){if(i.value===1)return"value: multiple values";i.value=1;{var d=c.onnx.TypeProto.Optional.verify(u.optionalType);if(d)return"optionalType."+d}}if(u.sparseTensorType!=null&&u.hasOwnProperty("sparseTensorType")){if(i.value===1)return"value: multiple values";i.value=1;{var d=c.onnx.TypeProto.SparseTensor.verify(u.sparseTensorType);if(d)return"sparseTensorType."+d}}return u.denotation!=null&&u.hasOwnProperty("denotation")&&!l.isString(u.denotation)?"denotation: string expected":null},a.fromObject=function(u){if(u instanceof c.onnx.TypeProto)return u;var i=new c.onnx.TypeProto;if(u.tensorType!=null){if(typeof u.tensorType!="object")throw TypeError(".onnx.TypeProto.tensorType: object expected");i.tensorType=c.onnx.TypeProto.Tensor.fromObject(u.tensorType)}if(u.sequenceType!=null){if(typeof u.sequenceType!="object")throw TypeError(".onnx.TypeProto.sequenceType: object expected");i.sequenceType=c.onnx.TypeProto.Sequence.fromObject(u.sequenceType)}if(u.mapType!=null){if(typeof u.mapType!="object")throw TypeError(".onnx.TypeProto.mapType: object expected");i.mapType=c.onnx.TypeProto.Map.fromObject(u.mapType)}if(u.optionalType!=null){if(typeof u.optionalType!="object")throw TypeError(".onnx.TypeProto.optionalType: object expected");i.optionalType=c.onnx.TypeProto.Optional.fromObject(u.optionalType)}if(u.sparseTensorType!=null){if(typeof u.sparseTensorType!="object")throw TypeError(".onnx.TypeProto.sparseTensorType: object expected");i.sparseTensorType=c.onnx.TypeProto.SparseTensor.fromObject(u.sparseTensorType)}return u.denotation!=null&&(i.denotation=String(u.denotation)),i},a.toObject=function(u,i){i||(i={});var d={};return i.defaults&&(d.denotation=""),u.tensorType!=null&&u.hasOwnProperty("tensorType")&&(d.tensorType=c.onnx.TypeProto.Tensor.toObject(u.tensorType,i),i.oneofs&&(d.value="tensorType")),u.sequenceType!=null&&u.hasOwnProperty("sequenceType")&&(d.sequenceType=c.onnx.TypeProto.Sequence.toObject(u.sequenceType,i),i.oneofs&&(d.value="sequenceType")),u.mapType!=null&&u.hasOwnProperty("mapType")&&(d.mapType=c.onnx.TypeProto.Map.toObject(u.mapType,i),i.oneofs&&(d.value="mapType")),u.denotation!=null&&u.hasOwnProperty("denotation")&&(d.denotation=u.denotation),u.sparseTensorType!=null&&u.hasOwnProperty("sparseTensorType")&&(d.sparseTensorType=c.onnx.TypeProto.SparseTensor.toObject(u.sparseTensorType,i),i.oneofs&&(d.value="sparseTensorType")),u.optionalType!=null&&u.hasOwnProperty("optionalType")&&(d.optionalType=c.onnx.TypeProto.Optional.toObject(u.optionalType,i),i.oneofs&&(d.value="optionalType")),d},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/onnx.TypeProto"},a.Tensor=function(){function u(i){if(i)for(var d=Object.keys(i),h=0;h<d.length;++h)i[d[h]]!=null&&(this[d[h]]=i[d[h]])}return u.prototype.elemType=0,u.prototype.shape=null,u.create=function(i){return new u(i)},u.encode=function(i,d){return d||(d=p.create()),i.elemType!=null&&Object.hasOwnProperty.call(i,"elemType")&&d.uint32(8).int32(i.elemType),i.shape!=null&&Object.hasOwnProperty.call(i,"shape")&&c.onnx.TensorShapeProto.encode(i.shape,d.uint32(18).fork()).ldelim(),d},u.encodeDelimited=function(i,d){return this.encode(i,d).ldelim()},u.decode=function(i,d){i instanceof s||(i=s.create(i));for(var h=d===void 0?i.len:i.pos+d,m=new c.onnx.TypeProto.Tensor;i.pos<h;){var b=i.uint32();switch(b>>>3){case 1:{m.elemType=i.int32();break}case 2:{m.shape=c.onnx.TensorShapeProto.decode(i,i.uint32());break}default:i.skipType(b&7);break}}return m},u.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},u.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.elemType!=null&&i.hasOwnProperty("elemType")&&!l.isInteger(i.elemType))return"elemType: integer expected";if(i.shape!=null&&i.hasOwnProperty("shape")){var d=c.onnx.TensorShapeProto.verify(i.shape);if(d)return"shape."+d}return null},u.fromObject=function(i){if(i instanceof c.onnx.TypeProto.Tensor)return i;var d=new c.onnx.TypeProto.Tensor;if(i.elemType!=null&&(d.elemType=i.elemType|0),i.shape!=null){if(typeof i.shape!="object")throw TypeError(".onnx.TypeProto.Tensor.shape: object expected");d.shape=c.onnx.TensorShapeProto.fromObject(i.shape)}return d},u.toObject=function(i,d){d||(d={});var h={};return d.defaults&&(h.elemType=0,h.shape=null),i.elemType!=null&&i.hasOwnProperty("elemType")&&(h.elemType=i.elemType),i.shape!=null&&i.hasOwnProperty("shape")&&(h.shape=c.onnx.TensorShapeProto.toObject(i.shape,d)),h},u.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},u.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/onnx.TypeProto.Tensor"},u}(),a.Sequence=function(){function u(i){if(i)for(var d=Object.keys(i),h=0;h<d.length;++h)i[d[h]]!=null&&(this[d[h]]=i[d[h]])}return u.prototype.elemType=null,u.create=function(i){return new u(i)},u.encode=function(i,d){return d||(d=p.create()),i.elemType!=null&&Object.hasOwnProperty.call(i,"elemType")&&c.onnx.TypeProto.encode(i.elemType,d.uint32(10).fork()).ldelim(),d},u.encodeDelimited=function(i,d){return this.encode(i,d).ldelim()},u.decode=function(i,d){i instanceof s||(i=s.create(i));for(var h=d===void 0?i.len:i.pos+d,m=new c.onnx.TypeProto.Sequence;i.pos<h;){var b=i.uint32();switch(b>>>3){case 1:{m.elemType=c.onnx.TypeProto.decode(i,i.uint32());break}default:i.skipType(b&7);break}}return m},u.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},u.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.elemType!=null&&i.hasOwnProperty("elemType")){var d=c.onnx.TypeProto.verify(i.elemType);if(d)return"elemType."+d}return null},u.fromObject=function(i){if(i instanceof c.onnx.TypeProto.Sequence)return i;var d=new c.onnx.TypeProto.Sequence;if(i.elemType!=null){if(typeof i.elemType!="object")throw TypeError(".onnx.TypeProto.Sequence.elemType: object expected");d.elemType=c.onnx.TypeProto.fromObject(i.elemType)}return d},u.toObject=function(i,d){d||(d={});var h={};return d.defaults&&(h.elemType=null),i.elemType!=null&&i.hasOwnProperty("elemType")&&(h.elemType=c.onnx.TypeProto.toObject(i.elemType,d)),h},u.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},u.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/onnx.TypeProto.Sequence"},u}(),a.Map=function(){function u(i){if(i)for(var d=Object.keys(i),h=0;h<d.length;++h)i[d[h]]!=null&&(this[d[h]]=i[d[h]])}return u.prototype.keyType=0,u.prototype.valueType=null,u.create=function(i){return new u(i)},u.encode=function(i,d){return d||(d=p.create()),i.keyType!=null&&Object.hasOwnProperty.call(i,"keyType")&&d.uint32(8).int32(i.keyType),i.valueType!=null&&Object.hasOwnProperty.call(i,"valueType")&&c.onnx.TypeProto.encode(i.valueType,d.uint32(18).fork()).ldelim(),d},u.encodeDelimited=function(i,d){return this.encode(i,d).ldelim()},u.decode=function(i,d){i instanceof s||(i=s.create(i));for(var h=d===void 0?i.len:i.pos+d,m=new c.onnx.TypeProto.Map;i.pos<h;){var b=i.uint32();switch(b>>>3){case 1:{m.keyType=i.int32();break}case 2:{m.valueType=c.onnx.TypeProto.decode(i,i.uint32());break}default:i.skipType(b&7);break}}return m},u.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},u.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.keyType!=null&&i.hasOwnProperty("keyType")&&!l.isInteger(i.keyType))return"keyType: integer expected";if(i.valueType!=null&&i.hasOwnProperty("valueType")){var d=c.onnx.TypeProto.verify(i.valueType);if(d)return"valueType."+d}return null},u.fromObject=function(i){if(i instanceof c.onnx.TypeProto.Map)return i;var d=new c.onnx.TypeProto.Map;if(i.keyType!=null&&(d.keyType=i.keyType|0),i.valueType!=null){if(typeof i.valueType!="object")throw TypeError(".onnx.TypeProto.Map.valueType: object expected");d.valueType=c.onnx.TypeProto.fromObject(i.valueType)}return d},u.toObject=function(i,d){d||(d={});var h={};return d.defaults&&(h.keyType=0,h.valueType=null),i.keyType!=null&&i.hasOwnProperty("keyType")&&(h.keyType=i.keyType),i.valueType!=null&&i.hasOwnProperty("valueType")&&(h.valueType=c.onnx.TypeProto.toObject(i.valueType,d)),h},u.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},u.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/onnx.TypeProto.Map"},u}(),a.Optional=function(){function u(i){if(i)for(var d=Object.keys(i),h=0;h<d.length;++h)i[d[h]]!=null&&(this[d[h]]=i[d[h]])}return u.prototype.elemType=null,u.create=function(i){return new u(i)},u.encode=function(i,d){return d||(d=p.create()),i.elemType!=null&&Object.hasOwnProperty.call(i,"elemType")&&c.onnx.TypeProto.encode(i.elemType,d.uint32(10).fork()).ldelim(),d},u.encodeDelimited=function(i,d){return this.encode(i,d).ldelim()},u.decode=function(i,d){i instanceof s||(i=s.create(i));for(var h=d===void 0?i.len:i.pos+d,m=new c.onnx.TypeProto.Optional;i.pos<h;){var b=i.uint32();switch(b>>>3){case 1:{m.elemType=c.onnx.TypeProto.decode(i,i.uint32());break}default:i.skipType(b&7);break}}return m},u.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},u.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.elemType!=null&&i.hasOwnProperty("elemType")){var d=c.onnx.TypeProto.verify(i.elemType);if(d)return"elemType."+d}return null},u.fromObject=function(i){if(i instanceof c.onnx.TypeProto.Optional)return i;var d=new c.onnx.TypeProto.Optional;if(i.elemType!=null){if(typeof i.elemType!="object")throw TypeError(".onnx.TypeProto.Optional.elemType: object expected");d.elemType=c.onnx.TypeProto.fromObject(i.elemType)}return d},u.toObject=function(i,d){d||(d={});var h={};return d.defaults&&(h.elemType=null),i.elemType!=null&&i.hasOwnProperty("elemType")&&(h.elemType=c.onnx.TypeProto.toObject(i.elemType,d)),h},u.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},u.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/onnx.TypeProto.Optional"},u}(),a.SparseTensor=function(){function u(i){if(i)for(var d=Object.keys(i),h=0;h<d.length;++h)i[d[h]]!=null&&(this[d[h]]=i[d[h]])}return u.prototype.elemType=0,u.prototype.shape=null,u.create=function(i){return new u(i)},u.encode=function(i,d){return d||(d=p.create()),i.elemType!=null&&Object.hasOwnProperty.call(i,"elemType")&&d.uint32(8).int32(i.elemType),i.shape!=null&&Object.hasOwnProperty.call(i,"shape")&&c.onnx.TensorShapeProto.encode(i.shape,d.uint32(18).fork()).ldelim(),d},u.encodeDelimited=function(i,d){return this.encode(i,d).ldelim()},u.decode=function(i,d){i instanceof s||(i=s.create(i));for(var h=d===void 0?i.len:i.pos+d,m=new c.onnx.TypeProto.SparseTensor;i.pos<h;){var b=i.uint32();switch(b>>>3){case 1:{m.elemType=i.int32();break}case 2:{m.shape=c.onnx.TensorShapeProto.decode(i,i.uint32());break}default:i.skipType(b&7);break}}return m},u.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},u.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.elemType!=null&&i.hasOwnProperty("elemType")&&!l.isInteger(i.elemType))return"elemType: integer expected";if(i.shape!=null&&i.hasOwnProperty("shape")){var d=c.onnx.TensorShapeProto.verify(i.shape);if(d)return"shape."+d}return null},u.fromObject=function(i){if(i instanceof c.onnx.TypeProto.SparseTensor)return i;var d=new c.onnx.TypeProto.SparseTensor;if(i.elemType!=null&&(d.elemType=i.elemType|0),i.shape!=null){if(typeof i.shape!="object")throw TypeError(".onnx.TypeProto.SparseTensor.shape: object expected");d.shape=c.onnx.TensorShapeProto.fromObject(i.shape)}return d},u.toObject=function(i,d){d||(d={});var h={};return d.defaults&&(h.elemType=0,h.shape=null),i.elemType!=null&&i.hasOwnProperty("elemType")&&(h.elemType=i.elemType),i.shape!=null&&i.hasOwnProperty("shape")&&(h.shape=c.onnx.TensorShapeProto.toObject(i.shape,d)),h},u.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},u.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/onnx.TypeProto.SparseTensor"},u}(),a}(),o.OperatorSetIdProto=function(){function a(e){if(e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.domain="",a.prototype.version=l.Long?l.Long.fromBits(0,0,!1):0,a.create=function(e){return new a(e)},a.encode=function(e,u){return u||(u=p.create()),e.domain!=null&&Object.hasOwnProperty.call(e,"domain")&&u.uint32(10).string(e.domain),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&u.uint32(16).int64(e.version),u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.OperatorSetIdProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.domain=e.string();break}case 2:{d.version=e.int64();break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.domain!=null&&e.hasOwnProperty("domain")&&!l.isString(e.domain)?"domain: string expected":e.version!=null&&e.hasOwnProperty("version")&&!l.isInteger(e.version)&&!(e.version&&l.isInteger(e.version.low)&&l.isInteger(e.version.high))?"version: integer|Long expected":null},a.fromObject=function(e){if(e instanceof c.onnx.OperatorSetIdProto)return e;var u=new c.onnx.OperatorSetIdProto;return e.domain!=null&&(u.domain=String(e.domain)),e.version!=null&&(l.Long?(u.version=l.Long.fromValue(e.version)).unsigned=!1:typeof e.version=="string"?u.version=parseInt(e.version,10):typeof e.version=="number"?u.version=e.version:typeof e.version=="object"&&(u.version=new l.LongBits(e.version.low>>>0,e.version.high>>>0).toNumber())),u},a.toObject=function(e,u){u||(u={});var i={};if(u.defaults)if(i.domain="",l.Long){var d=new l.Long(0,0,!1);i.version=u.longs===String?d.toString():u.longs===Number?d.toNumber():d}else i.version=u.longs===String?"0":0;return e.domain!=null&&e.hasOwnProperty("domain")&&(i.domain=e.domain),e.version!=null&&e.hasOwnProperty("version")&&(typeof e.version=="number"?i.version=u.longs===String?String(e.version):e.version:i.version=u.longs===String?l.Long.prototype.toString.call(e.version):u.longs===Number?new l.LongBits(e.version.low>>>0,e.version.high>>>0).toNumber():e.version),i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.OperatorSetIdProto"},a}(),o.OperatorStatus=function(){var a={},e=Object.create(a);return e[a[0]="EXPERIMENTAL"]=0,e[a[1]="STABLE"]=1,e}(),o.FunctionProto=function(){function a(e){if(this.input=[],this.output=[],this.attribute=[],this.attributeProto=[],this.node=[],this.opsetImport=[],e)for(var u=Object.keys(e),i=0;i<u.length;++i)e[u[i]]!=null&&(this[u[i]]=e[u[i]])}return a.prototype.name="",a.prototype.input=l.emptyArray,a.prototype.output=l.emptyArray,a.prototype.attribute=l.emptyArray,a.prototype.attributeProto=l.emptyArray,a.prototype.node=l.emptyArray,a.prototype.docString="",a.prototype.opsetImport=l.emptyArray,a.prototype.domain="",a.create=function(e){return new a(e)},a.encode=function(e,u){if(u||(u=p.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&u.uint32(10).string(e.name),e.input!=null&&e.input.length)for(var i=0;i<e.input.length;++i)u.uint32(34).string(e.input[i]);if(e.output!=null&&e.output.length)for(var i=0;i<e.output.length;++i)u.uint32(42).string(e.output[i]);if(e.attribute!=null&&e.attribute.length)for(var i=0;i<e.attribute.length;++i)u.uint32(50).string(e.attribute[i]);if(e.node!=null&&e.node.length)for(var i=0;i<e.node.length;++i)c.onnx.NodeProto.encode(e.node[i],u.uint32(58).fork()).ldelim();if(e.docString!=null&&Object.hasOwnProperty.call(e,"docString")&&u.uint32(66).string(e.docString),e.opsetImport!=null&&e.opsetImport.length)for(var i=0;i<e.opsetImport.length;++i)c.onnx.OperatorSetIdProto.encode(e.opsetImport[i],u.uint32(74).fork()).ldelim();if(e.domain!=null&&Object.hasOwnProperty.call(e,"domain")&&u.uint32(82).string(e.domain),e.attributeProto!=null&&e.attributeProto.length)for(var i=0;i<e.attributeProto.length;++i)c.onnx.AttributeProto.encode(e.attributeProto[i],u.uint32(90).fork()).ldelim();return u},a.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},a.decode=function(e,u){e instanceof s||(e=s.create(e));for(var i=u===void 0?e.len:e.pos+u,d=new c.onnx.FunctionProto;e.pos<i;){var h=e.uint32();switch(h>>>3){case 1:{d.name=e.string();break}case 4:{d.input&&d.input.length||(d.input=[]),d.input.push(e.string());break}case 5:{d.output&&d.output.length||(d.output=[]),d.output.push(e.string());break}case 6:{d.attribute&&d.attribute.length||(d.attribute=[]),d.attribute.push(e.string());break}case 11:{d.attributeProto&&d.attributeProto.length||(d.attributeProto=[]),d.attributeProto.push(c.onnx.AttributeProto.decode(e,e.uint32()));break}case 7:{d.node&&d.node.length||(d.node=[]),d.node.push(c.onnx.NodeProto.decode(e,e.uint32()));break}case 8:{d.docString=e.string();break}case 9:{d.opsetImport&&d.opsetImport.length||(d.opsetImport=[]),d.opsetImport.push(c.onnx.OperatorSetIdProto.decode(e,e.uint32()));break}case 10:{d.domain=e.string();break}default:e.skipType(h&7);break}}return d},a.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.name!=null&&e.hasOwnProperty("name")&&!l.isString(e.name))return"name: string expected";if(e.input!=null&&e.hasOwnProperty("input")){if(!Array.isArray(e.input))return"input: array expected";for(var u=0;u<e.input.length;++u)if(!l.isString(e.input[u]))return"input: string[] expected"}if(e.output!=null&&e.hasOwnProperty("output")){if(!Array.isArray(e.output))return"output: array expected";for(var u=0;u<e.output.length;++u)if(!l.isString(e.output[u]))return"output: string[] expected"}if(e.attribute!=null&&e.hasOwnProperty("attribute")){if(!Array.isArray(e.attribute))return"attribute: array expected";for(var u=0;u<e.attribute.length;++u)if(!l.isString(e.attribute[u]))return"attribute: string[] expected"}if(e.attributeProto!=null&&e.hasOwnProperty("attributeProto")){if(!Array.isArray(e.attributeProto))return"attributeProto: array expected";for(var u=0;u<e.attributeProto.length;++u){var i=c.onnx.AttributeProto.verify(e.attributeProto[u]);if(i)return"attributeProto."+i}}if(e.node!=null&&e.hasOwnProperty("node")){if(!Array.isArray(e.node))return"node: array expected";for(var u=0;u<e.node.length;++u){var i=c.onnx.NodeProto.verify(e.node[u]);if(i)return"node."+i}}if(e.docString!=null&&e.hasOwnProperty("docString")&&!l.isString(e.docString))return"docString: string expected";if(e.opsetImport!=null&&e.hasOwnProperty("opsetImport")){if(!Array.isArray(e.opsetImport))return"opsetImport: array expected";for(var u=0;u<e.opsetImport.length;++u){var i=c.onnx.OperatorSetIdProto.verify(e.opsetImport[u]);if(i)return"opsetImport."+i}}return e.domain!=null&&e.hasOwnProperty("domain")&&!l.isString(e.domain)?"domain: string expected":null},a.fromObject=function(e){if(e instanceof c.onnx.FunctionProto)return e;var u=new c.onnx.FunctionProto;if(e.name!=null&&(u.name=String(e.name)),e.input){if(!Array.isArray(e.input))throw TypeError(".onnx.FunctionProto.input: array expected");u.input=[];for(var i=0;i<e.input.length;++i)u.input[i]=String(e.input[i])}if(e.output){if(!Array.isArray(e.output))throw TypeError(".onnx.FunctionProto.output: array expected");u.output=[];for(var i=0;i<e.output.length;++i)u.output[i]=String(e.output[i])}if(e.attribute){if(!Array.isArray(e.attribute))throw TypeError(".onnx.FunctionProto.attribute: array expected");u.attribute=[];for(var i=0;i<e.attribute.length;++i)u.attribute[i]=String(e.attribute[i])}if(e.attributeProto){if(!Array.isArray(e.attributeProto))throw TypeError(".onnx.FunctionProto.attributeProto: array expected");u.attributeProto=[];for(var i=0;i<e.attributeProto.length;++i){if(typeof e.attributeProto[i]!="object")throw TypeError(".onnx.FunctionProto.attributeProto: object expected");u.attributeProto[i]=c.onnx.AttributeProto.fromObject(e.attributeProto[i])}}if(e.node){if(!Array.isArray(e.node))throw TypeError(".onnx.FunctionProto.node: array expected");u.node=[];for(var i=0;i<e.node.length;++i){if(typeof e.node[i]!="object")throw TypeError(".onnx.FunctionProto.node: object expected");u.node[i]=c.onnx.NodeProto.fromObject(e.node[i])}}if(e.docString!=null&&(u.docString=String(e.docString)),e.opsetImport){if(!Array.isArray(e.opsetImport))throw TypeError(".onnx.FunctionProto.opsetImport: array expected");u.opsetImport=[];for(var i=0;i<e.opsetImport.length;++i){if(typeof e.opsetImport[i]!="object")throw TypeError(".onnx.FunctionProto.opsetImport: object expected");u.opsetImport[i]=c.onnx.OperatorSetIdProto.fromObject(e.opsetImport[i])}}return e.domain!=null&&(u.domain=String(e.domain)),u},a.toObject=function(e,u){u||(u={});var i={};if((u.arrays||u.defaults)&&(i.input=[],i.output=[],i.attribute=[],i.node=[],i.opsetImport=[],i.attributeProto=[]),u.defaults&&(i.name="",i.docString="",i.domain=""),e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.input&&e.input.length){i.input=[];for(var d=0;d<e.input.length;++d)i.input[d]=e.input[d]}if(e.output&&e.output.length){i.output=[];for(var d=0;d<e.output.length;++d)i.output[d]=e.output[d]}if(e.attribute&&e.attribute.length){i.attribute=[];for(var d=0;d<e.attribute.length;++d)i.attribute[d]=e.attribute[d]}if(e.node&&e.node.length){i.node=[];for(var d=0;d<e.node.length;++d)i.node[d]=c.onnx.NodeProto.toObject(e.node[d],u)}if(e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.opsetImport&&e.opsetImport.length){i.opsetImport=[];for(var d=0;d<e.opsetImport.length;++d)i.opsetImport[d]=c.onnx.OperatorSetIdProto.toObject(e.opsetImport[d],u)}if(e.domain!=null&&e.hasOwnProperty("domain")&&(i.domain=e.domain),e.attributeProto&&e.attributeProto.length){i.attributeProto=[];for(var d=0;d<e.attributeProto.length;++d)i.attributeProto[d]=c.onnx.AttributeProto.toObject(e.attributeProto[d],u)}return i},a.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/onnx.FunctionProto"},a}(),o}(),r.exports=c});function Ur(t,r){if(!t)throw new Error(typeof r=="string"?r:r())}function co(t){return new TextDecoder().decode(t)}var q,Qe,ya,Mt,bl,Et,Vt,C,ho,Gr,dr,hr,U=I(()=>{"use strict";Ho(),fl(),q=Ie(mr()),De(),Qe=class{static arraysEqual(t,r){if(t.length!==r.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==r[n])return!1;return!0}},ya=class{static preprocessInputShapes(t,r){let n=t.length===1?[1,t[0]]:t,s=r.length===1?[r[0],1]:r;return[n,s]}static postprocessOutputShape(t,r,n){r===1&&t.splice(t.length-2,1),n===1&&t.pop()}static calcMatMulShape(t,r){return t[1]!==r[0]?void 0:[t[0],r[1]]}},Mt=class tr{static calcShape(r,n,s=!1){let p=r.length,l=n.length;if(p===0)return n;if(l===0)return r;let c=Math.max(r.length,n.length),o=new Array(c);if(s){if(p<2||l<2)return;let a=ya.calcMatMulShape([r[p-2],r[p-1]],[n[l-2],n[l-1]]);if(a===void 0)return;[o[c-2],o[c-1]]=a}for(let a=s?3:1;a<=c;a++){let e=p-a<0?1:r[p-a],u=l-a<0?1:n[l-a];if(e!==u&&e>1&&u>1)return;o[c-a]=Math.max(e,u)}return o}static index(r,n){let s=new Array(n.length);return tr.fillIndex(r,n,s),s}static fillIndex(r,n,s){let p=r.length-n.length;for(let l=0;l<n.length;l++)s[l]=r[p+l]%n[l]}static calc(r,n,s,p,l){let c=tr.calcShape(r.dims,n.dims);if(c){if(p&&!C.areEqual(c,r.dims))return;let o=C.size(c),a=p?r:new Pt(c,l||r.type);if(c.length===0)a.set([],s(r.get([]),n.get([])));else{let e=new Array(c.length),u=new Array(r.dims.length),i=new Array(n.dims.length),d=0,h=0,m=!1,b=!1;r.dims.length===0&&(d=r.get([]),m=!0),n.dims.length===0&&(h=n.get([]),b=!0);let x;for(let E=0;E<o;E++){x=E;for(let w=c.length-1;w>=0;w--)e[w]=x%c[w],x=Math.floor(x/c[w]);m||(tr.fillIndex(e,r.dims,u),d=r.get(u)),b||(tr.fillIndex(e,n.dims,i),h=n.get(i)),a.set(e,s(d,h))}}return a}}static isValidBroadcast(r,n){let s=r.length,p=n.length;if(s>p)return!1;for(let l=1;l<=s;l++)if(r[s-l]!==1&&r[s-l]!==n[p-l])return!1;return!0}static getBroadcastDims(r,n){let s=r.length,p=[];for(let l=0;l<s;l++){let c=s-1-l,o=r[c]||1;(n[n.length-1-l]||1)>1&&o===1&&p.unshift(c)}return p}},bl=class{static getShapeOfGemmResult(t,r,n,s,p){if(t.length!==2||n.length!==2)throw new Error("shape need to be of size 2");let l,c,o;r?(l=t[1],c=t[0]):(l=t[0],c=t[1]);let a=-1;if(s?(o=n[0],a=1):(o=n[1],a=0),n[a]!==c)throw new Error("dimension mismatch");if(l<=0||o<=0||c<=0)throw new Error("invalid shape specified");if(p&&!Mt.isValidBroadcast(p,[l,o]))throw new Error("gemm: invalid bias shape for broadcast");return[l,o,c]}},Et=class fo{static tensorDataTypeFromProto(r){switch(r){case q.onnx.TensorProto.DataType.INT8:return"int8";case q.onnx.TensorProto.DataType.UINT8:return"uint8";case q.onnx.TensorProto.DataType.BOOL:return"bool";case q.onnx.TensorProto.DataType.INT16:return"int16";case q.onnx.TensorProto.DataType.UINT16:return"uint16";case q.onnx.TensorProto.DataType.INT32:return"int32";case q.onnx.TensorProto.DataType.UINT32:return"uint32";case q.onnx.TensorProto.DataType.FLOAT:return"float32";case q.onnx.TensorProto.DataType.DOUBLE:return"float64";case q.onnx.TensorProto.DataType.STRING:return"string";case q.onnx.TensorProto.DataType.INT64:return"int32";case q.onnx.TensorProto.DataType.UINT64:return"uint32";default:throw new Error(`unsupported data type: ${q.onnx.TensorProto.DataType[r]}`)}}static tensorDataTypeStringToEnum(r){switch(r){case"int8":return q.onnx.TensorProto.DataType.INT8;case"uint8":return q.onnx.TensorProto.DataType.UINT8;case"bool":return q.onnx.TensorProto.DataType.BOOL;case"int16":return q.onnx.TensorProto.DataType.INT16;case"uint16":return q.onnx.TensorProto.DataType.UINT16;case"int32":return q.onnx.TensorProto.DataType.INT32;case"uint32":return q.onnx.TensorProto.DataType.UINT32;case"float32":return q.onnx.TensorProto.DataType.FLOAT;case"float64":return q.onnx.TensorProto.DataType.DOUBLE;case"string":return q.onnx.TensorProto.DataType.STRING;case"int64":return q.onnx.TensorProto.DataType.INT64;case"uint64":return q.onnx.TensorProto.DataType.UINT64;default:throw new Error(`unsupported data type: ${r}`)}}static tensorDimsFromProto(r){return r.map(n=>ee.isLong(n)?n.toNumber():n)}static tensorValueTypeFromProto(r){return{tensorType:fo.tensorDataTypeFromProto(r.elemType),shape:{dims:fo.tensorDimsFromProto(r.shape.dim.map(n=>n.dimValue))}}}static tensorDimsFromORTFormat(r){let n=[];for(let s=0;s<r.dimsLength();s++)n.push(Vt.longToNumber(r.dims(s)));return n}static tensorAttributesFromORTFormat(r){let n=[];for(let s=0;s<r.attributesLength();s++)n.push(r.attributes(s));return n}},Vt=class{static longToNumber(t,r){return ee.isLong(t)?t.toNumber():t instanceof T.Long?ee.fromValue({low:t.low,high:t.high,unsigned:r??!1}).toNumber():t}static isLong(t){return ee.isLong(t)||t instanceof T.Long}},C=class Qt{static size(r){return Qt.getSizeFromDimensionRange(r,0,r.length)}static sizeFromDimension(r,n){if(n<0||n>r.length)throw new Error(`invalid dimension of ${n} for sizeFromDimension as Tensor has ${r.length} dimensions.`);return Qt.getSizeFromDimensionRange(r,n,r.length)}static sizeToDimension(r,n){if(n<0||n>r.length)throw new Error(`invalid dimension of ${n} for sizeToDimension as Tensor has ${r.length} dimensions.`);return Qt.getSizeFromDimensionRange(r,0,n)}static getSizeFromDimensionRange(r,n,s){let p=1;for(let l=n;l<s;l++){if(r[l]<=0)throw new Error("cannot get valid size from specified dimension range. Most likely the range contains 0 or negative values in them.");p*=r[l]}return p}static computeStrides(r){let n=r.length;if(n===0)return[];if(n===1)return[1];let s=new Array(n);s[n-1]=1,s[n-2]=r[n-1];for(let p=n-3;p>=0;--p)s[p]=s[p+1]*r[p+1];return s}static transpose(r){return r.slice().reverse()}static indicesToOffset(r,n,s){s===void 0&&(s=r.length);let p=0;for(let l=0;l<s;++l)p+=n[l]*r[l];return p}static offsetToIndices(r,n){let s=n.length;if(s===0)return[];if(s===1)return[r*n[0]];let p=new Array(n.length);for(let l=0;l<p.length-1;++l)p[l]=Math.floor(r/n[l]),r-=p[l]*n[l];return p[p.length-1]=r,p}static normalizeAxis(r,n){if(r<-n&&r>=n)throw new Error("unsupported axis for this operation.");return r<0?r+n:r}static normalizeAxes(r,n){return r.map(s=>this.normalizeAxis(s,n))}static incrementIndex(r,n,s){if(n.length===0||r.length===0)throw new Error("Index incrementing unsupported for scalar Tensor");if(s===void 0)s=n.length;else if(s<=0||s>n.length)throw new Error("Incorrect axis to increment on");for(let p=s-1;p>=0&&(r[p]++,!(r[p]<n[p]));--p)r[p]=0}static calculateReshapedDims(r,n){if(n.length===0){if(r.length===0||Qt.size(r)===1)return[];throw new Error("cannot reshape to a scalar Tensor")}let s=n.length,p=new Array(s),l=-1,c=1;for(let a=0;a<s;a++){if(n[a]<-1)throw new Error("a dimension in shape hints cannot be less than -1");if(n[a]===-1){if(l!==-1)throw new Error("at most one dimension in shape hints can be -1");l=a}else{if(n[a]===0){if(a>=r.length)throw new Error("the dimension with value zero exceeds the dimension size of the input tensor");p[a]=r[a]}else p[a]=n[a];c*=p[a]}}let o=Qt.size(r);if(l!==-1){if(o%c!==0)throw new Error(`the input tensor cannot be reshaped to the requested shape. Input shape: [${r}] Output shape: [${n}]`);p[l]=o/c}else if(c!==o)throw new Error("reshapedDims and originalDims don't have matching sizes");return p}static sortBasedOnPerm(r,n){return n?n.map(s=>r[s]):r.slice().reverse()}static padShape(r,n){let s=r.length;return r.map((p,l)=>p+n[l]+n[l+s])}static areEqual(r,n){return r.length!==n.length?!1:r.every((s,p)=>s===n[p])}static validateDimsAndCalcSize(r){if(r.length>6)throw new TypeError("Only rank 0 to 6 is supported for tensor shape.");let n=1;for(let s of r){if(!Number.isInteger(s))throw new TypeError(`Invalid shape: ${s} is not an integer`);if(s<0||s>2147483647)throw new TypeError(`Invalid shape: length ${s} is not allowed`);n*=s}return n}static flattenShape(r,n){n<0&&(n+=r.length);let s=r.reduce((l,c)=>l*c,1),p=r.slice(n).reduce((l,c)=>l*c,1);return[s/p,p]}static squeezeShape(r,n){let s=new Array;n=Qt.normalizeAxes(n,r.length);for(let p=0;p<r.length;p++){let l=n.indexOf(p)>=0;if(l&&r[p]!==1)throw new Error("squeeze an axis of size different than 1");(n.length===0&&r[p]>1||n.length>0&&!l)&&s.push(r[p])}return s}static unsqueezeShape(r,n){let s=new Array(r.length+n.length);s.fill(0);for(let l=0;l<n.length;l++){let c=Qt.normalizeAxis(n[l],s.length);if(c>=s.length)throw new Error("'axes' has an out of range axis");if(s[c]!==0)throw new Error("'axes' has a duplicate axis");s[c]=1}let p=0;for(let l=0;l<s.length;l++)s[l]===0&&(s[l]=r[p++]);if(p!==r.length)throw new Error("the unsqueezed dimension could not be established");return s}},ho=class yl{static splitShape(r,n,s,p){if(s.length===0){if(!p)throw new Error("need to know number of outputs when the 'split' attribute is not specified");yl.determineSplit(r[n],p,s)}let l=[],c=[0];for(let o=0;o<s.length;++o){o!==0&&c.push(c[o-1]+s[o-1]);let a=r.slice();a[n]=s[o],l.push(a)}return[l,c]}static determineSplit(r,n,s){if(r%n!==0)throw new Error("cannot split tensor to equal sized parts");for(let p=0;p<n;++p)s.push(r/n)}},Gr=class er{static adjustPoolAttributes(r,n,s,p,l,c){if(!r&&s.length!==n.length-2)throw new Error("length of specified kernel shapes should be 2 less than length of input dimensions");if(r)for(let o=0;o<n.length-2;o++)o>=s.length?s.push(n[o+2]):s[o]=n[o+2];for(let o=0;o<s.length;o++)if(o<p.length){if(p[o]<0)throw new Error("strides should be greater than or equal to 1")}else p.push(1);for(let o=0;o<s.length;o++)if(o<l.length){if(l[o]<0)throw new Error("dilations should be greater than or equal to 1")}else l.push(1);for(let o=0;o<s.length*2;o++)if(o<c.length){if(c[o]<0)throw new Error("pad should be greater than or equal to 1")}else c.push(0);for(let o=0;o<s.length;o++){if(s[o]<=0)throw new Error("kernel shapes need to be greater than 0");if(c[o]>=s[o]||c[o+s.length]>=s[o])throw new Error("pads should be smaller than kernel")}}static adjustPadsBasedOnAutoPad(r,n,s,p,l,c){if(c){if(l.length!==2*(r.length-2))throw new Error("length of pads should be twice the length of data dimensions");if(n.length!==r.length-2)throw new Error("length of strides should be the length of data dimensions");if(p.length!==r.length-2)throw new Error("length of kernel shapes should be the length of data dimensions");for(let o=0;o<r.length-2;o++)er.adjustPadAndReturnShape(r[o+2],n[o],s[o],p[o],l,o,o+r.length-2,c)}}static computePoolOutputShape(r,n,s,p,l,c,o){if(n.length<=0)throw new Error("input shape must be of size greater than 0");let a=[n[0],n[1]];return er.computeShapeHelper(r,n,a,s,p,l,c,o),a}static computeConvOutputShape(r,n,s,p,l,c,o){if(r.length<=0||n.length<=0)throw new Error("invalid input tensor dims or invalid filter tensor dims");let a=[r[0],n[0]];return er.computeShapeHelper(!1,r,a,s,p,l,c,o),a}static computeShapeHelper(r,n,s,p,l,c,o,a){if(r)for(let e=0;e<n.length-2;e++)s.push(1);else for(let e=0;e<n.length-2;e++)s.push(er.adjustPadAndReturnShape(n[e+2],p[e],l[e],c[e],o,e,e+n.length-2,a))}static adjustPadAndReturnShape(r,n,s,p,l,c,o,a){let e=s*(p-1)+1;if(a&&a!=="NOTSET")switch(a){case"VALID":return l[c]=0,l[o]=0,Math.floor((r-e)/n+1);case"SAME_LOWER":case"SAME_UPPER":if(s!==1)throw new Error("Dilation not supported for SAME_UPPER or SAME_LOWER");{let u=((r+n-1)/n-1)*n+p-r;return l[c]=Math.floor(a==="SAME_LOWER"?(u+1)/2:u/2),l[o]=u-l[c],Math.floor((r+u-p)/n+1)}default:throw new Error("Unsupported AutoPad type")}else return Math.floor((r+l[c]+l[o]-e)/n+1)}},dr=-34028234663852886e22,hr=34028234663852886e22});function Zh(t){switch(t){case"bool":case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;case"float64":return 8;default:throw new Error(`cannot calculate sizeof() on type ${t}`)}}function wa(t){switch(t){case L.onnx.TensorProto.DataType.UINT8:case L.onnx.TensorProto.DataType.INT8:case L.onnx.TensorProto.DataType.BOOL:return 1;case L.onnx.TensorProto.DataType.UINT16:case L.onnx.TensorProto.DataType.INT16:return 2;case L.onnx.TensorProto.DataType.FLOAT:case L.onnx.TensorProto.DataType.INT32:case L.onnx.TensorProto.DataType.UINT32:return 4;case L.onnx.TensorProto.DataType.INT64:case L.onnx.TensorProto.DataType.DOUBLE:case L.onnx.TensorProto.DataType.UINT64:return 8;default:throw new Error(`cannot calculate sizeof() on type ${L.onnx.TensorProto.DataType[t]}`)}}function Jh(t,r){return new(wl(r))(t)}function wl(t){switch(t){case"bool":case"uint8":return Uint8Array;case"int8":return Int8Array;case"int16":return Int16Array;case"uint16":return Uint16Array;case"int32":return Int32Array;case"uint32":return Uint32Array;case"int64":return BigInt64Array;case"float32":return Float32Array;case"float64":return Float64Array;default:throw new Error("unspecified error")}}function go(t,r){if(r===L.onnx.TensorProto.DataType.INT64||r===Vr.TensorDataType.INT64){if(t.greaterThanOrEqual(2147483648)||t.lessThan(-2147483648))throw new TypeError("int64 is not supported")}else if(r===L.onnx.TensorProto.DataType.UINT32||r===Vr.TensorDataType.UINT32||r===L.onnx.TensorProto.DataType.UINT64||r===Vr.TensorDataType.UINT64){if(t.greaterThanOrEqual(4294967296)||t.lessThan(0))throw new TypeError("uint64 is not supported")}else throw new TypeError(`not a LONG type: ${L.onnx.TensorProto.DataType[r]}`);return t.toNumber()}function va(t,r,n){switch(r){case L.onnx.TensorProto.DataType.BOOL:case L.onnx.TensorProto.DataType.UINT8:return t.getUint8(n);case L.onnx.TensorProto.DataType.INT8:return t.getInt8(n);case L.onnx.TensorProto.DataType.UINT16:return t.getUint16(n,!0);case L.onnx.TensorProto.DataType.INT16:return t.getInt16(n,!0);case L.onnx.TensorProto.DataType.FLOAT:return t.getFloat32(n,!0);case L.onnx.TensorProto.DataType.INT32:return t.getInt32(n,!0);case L.onnx.TensorProto.DataType.UINT32:return t.getUint32(n,!0);case L.onnx.TensorProto.DataType.INT64:return go(ee.fromBits(t.getUint32(n,!0),t.getUint32(n+4,!0),!1),r);case L.onnx.TensorProto.DataType.DOUBLE:return t.getFloat64(n,!0);case L.onnx.TensorProto.DataType.UINT64:return go(ee.fromBits(t.getUint32(n,!0),t.getUint32(n+4,!0),!0),r);default:throw new Error(`cannot read from DataView for type ${L.onnx.TensorProto.DataType[r]}`)}}var xa,L,Vr,Pt,De=I(()=>{"use strict";xa=Ie(Fh()),fl(),Zr(),L=Ie(mr()),U(),Vr=H.experimental.fbs,Pt=class Mr{constructor(r,n,s,p,l,c=xa.Guid.create()){this.dims=r,this.type=n,this.dataProvider=s,this.asyncDataProvider=p,this.cache=l,this.dataId=c,this.size=C.validateDimsAndCalcSize(r);let o=this.size,a=s===void 0&&p===void 0&&l===void 0;if(l!==void 0&&l.length!==o)throw new RangeError("Input dims doesn't match data length.");if(n==="string"){if(l!==void 0&&(!Array.isArray(l)||!l.every(e=>typeof e=="string")))throw new TypeError("cache should be a string array");a&&(this.cache=new Array(o))}else{if(l!==void 0){let e=wl(n);if(!(l instanceof e))throw new TypeError(`cache should be type ${e.name}`)}if(a){let e=new ArrayBuffer(o*Zh(n));this.cache=Jh(e,n)}}}get data(){if(this.cache===void 0){let r=this.dataProvider(this.dataId);if(r.length!==this.size)throw new Error("Length of data provided by the Data Provider is inconsistent with the dims of this Tensor.");this.cache=r}return this.cache}get stringData(){if(this.type!=="string")throw new TypeError("data type is not string");return this.data}get integerData(){switch(this.type){case"uint8":case"int8":case"uint16":case"int16":case"int32":case"uint32":case"bool":return this.data;default:throw new TypeError("data type is not integer (uint8, int8, uint16, int16, int32, uint32, bool)")}}get floatData(){switch(this.type){case"float32":case"float64":return this.data;default:throw new TypeError("data type is not float (float32, float64)")}}get numberData(){if(this.type!=="string")return this.data;throw new TypeError("type cannot be non-number (string)")}get(r){return this.data[C.indicesToOffset(r,this.strides)]}set(r,n){this.data[C.indicesToOffset(r,this.strides)]=n}async getData(){return this.cache===void 0&&(this.cache=await this.asyncDataProvider(this.dataId)),this.cache}get strides(){return this._strides||(this._strides=C.computeStrides(this.dims)),this._strides}static fromProto(r){if(!r)throw new Error("cannot construct Value from an empty tensor");let n=Et.tensorDataTypeFromProto(r.dataType),s=Et.tensorDimsFromProto(r.dims),p=new Mr(s,n);if(n==="string")r.stringData.forEach((l,c)=>{p.data[c]=co(l)});else if(r.rawData&&typeof r.rawData.byteLength=="number"&&r.rawData.byteLength>0){let l=p.data,c=new DataView(r.rawData.buffer,r.rawData.byteOffset,r.rawData.byteLength),o=wa(r.dataType),a=r.rawData.byteLength/o;if(r.rawData.byteLength%o!==0)throw new Error("invalid buffer length");if(l.length!==a)throw new Error("buffer length mismatch");for(let e=0;e<a;e++){let u=va(c,r.dataType,e*o);l[e]=u}}else{let l;switch(r.dataType){case L.onnx.TensorProto.DataType.FLOAT:l=r.floatData;break;case L.onnx.TensorProto.DataType.INT32:case L.onnx.TensorProto.DataType.INT16:case L.onnx.TensorProto.DataType.UINT16:case L.onnx.TensorProto.DataType.INT8:case L.onnx.TensorProto.DataType.UINT8:case L.onnx.TensorProto.DataType.BOOL:l=r.int32Data;break;case L.onnx.TensorProto.DataType.INT64:l=r.int64Data;break;case L.onnx.TensorProto.DataType.DOUBLE:l=r.doubleData;break;case L.onnx.TensorProto.DataType.UINT32:case L.onnx.TensorProto.DataType.UINT64:l=r.uint64Data;break;default:throw new Error("unspecific error")}if(l==null)throw new Error("failed to populate data from a tensorproto value");let c=p.data;if(c.length!==l.length)throw new Error("array length mismatch");for(let o=0;o<l.length;o++){let a=l[o];ee.isLong(a)?c[o]=go(a,r.dataType):c[o]=a}}return p}static fromData(r,n,s){return new Mr(n,s,void 0,void 0,r)}static fromOrtTensor(r){if(!r)throw new Error("cannot construct Value from an empty tensor");let n=Et.tensorDimsFromORTFormat(r),s=Et.tensorDataTypeFromProto(r.dataType()),p=new Mr(n,s);if(s==="string")for(let l=0;l<r.stringDataLength();l++)p.data[l]=r.stringData(l);else if(r.rawDataArray()&&typeof r.rawDataLength()=="number"&&r.rawDataLength()>0){let l=p.data,c=new DataView(r.rawDataArray().buffer,r.rawDataArray().byteOffset,r.rawDataLength()),o=wa(r.dataType()),a=r.rawDataLength()/o;if(r.rawDataLength()%o!==0)throw new Error("invalid buffer length");if(l.length!==a)throw new Error("buffer length mismatch");for(let e=0;e<a;e++){let u=va(c,r.dataType(),e*o);l[e]=u}}return p}}});function B(t){return t===1?vl:xl}function Yh(t){let r=B(t);return`${r.version}
2
2
  precision highp float;
3
3
  ${r.attribute} vec3 position;
4
4
  ${r.attribute} vec2 textureCoord;