(function webpackUniversalModuleDefinition(root, factory) { if (typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if (typeof define === 'function' && define.amd) define([], factory); else if (typeof exports === 'object') exports['loaders'] = factory(); else root['loaders'] = factory();})(globalThis, function () { "use strict";var __exports__=(()=>{var bn=Object.create;var de=Object.defineProperty;var Rn=Object.getOwnPropertyDescriptor;var Dn=Object.getOwnPropertyNames;var Gn=Object.getPrototypeOf,_n=Object.prototype.hasOwnProperty;var Sn=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),M=(r,e)=>{for(var t in e)de(r,t,{get:e[t],enumerable:!0})},me=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Dn(e))!_n.call(r,s)&&s!==t&&de(r,s,{get:()=>e[s],enumerable:!(n=Rn(e,s))||n.enumerable});return r},le=(r,e,t)=>(me(r,e,"default"),t&&me(t,e,"default")),On=(r,e,t)=>(t=r!=null?bn(Gn(r)):{},me(e||!r||!r.__esModule?de(t,"default",{value:r,enumerable:!0}):t,r)),Ln=r=>me(de({},"__esModule",{value:!0}),r);var Vt=Sn((Fa,kt)=>{kt.exports=globalThis.loaders});var Be={};M(Be,{EXT_FEATURE_METADATA:()=>ut,EXT_MESH_FEATURES:()=>ot,EXT_STRUCTURAL_METADATA:()=>ct,GLBLoader:()=>Tn,GLBWriter:()=>Fn,GLTFLoader:()=>je,GLTFScenegraph:()=>d,GLTFWriter:()=>xn,_getMemoryUsageGLTF:()=>mr,createExtMeshFeatures:()=>it,createExtStructuralMetadata:()=>ft,postProcessGLTF:()=>In});le(Be,On(Vt(),1));var be={};M(be,{createExtMeshFeatures:()=>it,decode:()=>bs,encode:()=>Rs,name:()=>ot});var Wt="4.3.1";async function te(r,e,t,n){return n._parse(r,e,t,n)}function y(r,e){if(!r)throw new Error(e||"loader assertion failed.")}var b={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},wn=b.self||b.window||b.global||{},Jn=b.window||b.self||b.global||{},Hn=b.global||b.self||b.window||{},Un=b.document||{};var re=Boolean(typeof process!="object"||String(process)!=="[object process]"||process.browser);var Zt=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),Pn=Zt&&parseFloat(Zt[1])||0;function Ye(r){globalThis.loaders||={},globalThis.loaders.modules||={},Object.assign(globalThis.loaders.modules,r)}function ke(r){return globalThis.loaders?.modules?.[r]||null}function Nn(){return globalThis._loadersgl_?.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.3.1"),globalThis._loadersgl_.version}var qt=Nn();function zt(r,e){if(!r)throw new Error(e||"loaders.gl assertion failed.")}var R={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},Oa=R.self||R.window||R.global||{},La=R.window||R.self||R.global||{},wa=R.global||R.self||R.window||{},Ja=R.document||{};var X=typeof process!="object"||String(process)!=="[object process]"||process.browser,pe=typeof importScripts=="function",Ha=typeof window<"u"&&typeof window.orientation<"u",$t=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),Ua=$t&&parseFloat($t[1])||0;var Ve={};async function D(r,e=null,t={},n=null){return e&&(r=er(r,e,t,n)),Ve[r]=Ve[r]||Kn(r),await Ve[r]}function er(r,e,t={},n=null){if(!t.useLocalLibraries&&r.startsWith("http"))return r;n=n||r;let s=t.modules||{};return s[n]?s[n]:X?t.CDN?(zt(t.CDN.startsWith("http")),`${t.CDN}/${e}@${qt}/dist/libs/${n}`):pe?`../src/libs/${n}`:`modules/${e}/src/libs/${n}`:`modules/${e}/dist/libs/${n}`}async function Kn(r){if(r.endsWith("wasm"))return await Xn(r);if(!X)try{let{requireFromFile:t}=globalThis.loaders||{};return await t?.(r)}catch(t){return console.error(t),null}if(pe)return importScripts(r);let e=await jn(r);return vn(e,r)}function vn(r,e){if(!X){let{requireFromString:n}=globalThis.loaders||{};return n?.(r,e)}if(pe)return eval.call(globalThis,r),null;let t=document.createElement("script");t.id=e;try{t.appendChild(document.createTextNode(r))}catch{t.text=r}return document.body.appendChild(t),null}async function Xn(r){let{readFileAsArrayBuffer:e}=globalThis.loaders||{};return X||!e||r.startsWith("http")?await(await fetch(r)).arrayBuffer():await e(r)}async function jn(r){let{readFileAsText:e}=globalThis.loaders||{};return X||!e||r.startsWith("http")?await(await fetch(r)).text():await e(r)}function rr(r,e=5){return typeof r=="string"?r.slice(0,e):ArrayBuffer.isView(r)?tr(r.buffer,r.byteOffset,e):r instanceof ArrayBuffer?tr(r,0,e):""}function tr(r,e,t){if(r.byteLength<=e+t)return"";let n=new DataView(r),s="";for(let o=0;o=0),y(e>0),r+(e-1)&~(e-1)}function Ze(r,e,t){let n;if(r instanceof ArrayBuffer)n=new Uint8Array(r);else{let s=r.byteOffset,o=r.byteLength;n=new Uint8Array(r.buffer||r.arrayBuffer,s,o)}return e.set(n,t),t+G(n.byteLength,4)}function he(r,e,t,n){let s=G(t.byteLength,n),o=s-t.byteLength;if(r){let i=new Uint8Array(r.buffer,r.byteOffset+e,t.byteLength),a=new Uint8Array(t);i.set(a);for(let c=0;c{try{t.onload=()=>n(t),t.onerror=o=>{let i=o instanceof Error?o.message:"error";s(new Error(i))}}catch(o){s(o)}})}var qn={},ar=!0;async function cr(r,e,t){let n;Ce(t)?n=await Ee(r,e,t):n=tt(r,t);let s=e&&e.imagebitmap;return await zn(n,s)}async function zn(r,e=null){if(($n(e)||!ar)&&(e=null),e)try{return await createImageBitmap(r,e)}catch(t){console.warn(t),ar=!1}return await createImageBitmap(r)}function $n(r){for(let e in r||qn)return!1;return!0}function Ar(r){return!ns(r,"ftyp",4)||!(r[8]&96)?null:es(r)}function es(r){switch(ts(r,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function ts(r,e,t){return String.fromCharCode(...r.slice(e,t))}function rs(r){return[...r].map(e=>e.charCodeAt(0))}function ns(r,e,t=0){let n=rs(e);for(let s=0;s=24&&e.getUint32(0,_)===2303741511?{mimeType:"image/png",width:e.getUint32(16,_),height:e.getUint32(20,_)}:null}function is(r){let e=ie(r);return e.byteLength>=10&&e.getUint32(0,_)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,oe),height:e.getUint16(8,oe)}:null}function as(r){let e=ie(r);return e.byteLength>=14&&e.getUint16(0,_)===16973&&e.getUint32(2,oe)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,oe),height:e.getUint32(22,oe)}:null}function cs(r){let e=ie(r);if(!(e.byteLength>=3&&e.getUint16(0,_)===65496&&e.getUint8(2)===255))return null;let{tableMarkers:n,sofMarkers:s}=As(),o=2;for(;o+9Boolean(U(new DataView(r)))],options:ms};var nt={};function st(r){if(nt[r]===void 0){let e=re?ls(r):ds(r);nt[r]=e}return nt[r]}function ds(r){let e=["image/png","image/jpeg","image/gif"],t=globalThis.loaders?.imageFormatsNode||e,n=globalThis.loaders?.parseImageNode;return Boolean(n)&&t.includes(r)}function ls(r){switch(r){case"image/avif":case"image/webp":return ps(r);default:return!0}}function ps(r){try{return document.createElement("canvas").toDataURL(r).indexOf(`data:${r}`)===0}catch{return!1}}function h(r,e){if(!r)throw new Error(e||"assert failed: gltf")}var ge={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},xe={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4};var hs=1.33,Br=["SCALAR","VEC2","VEC3","VEC4"],Cs=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],Es=new Map(Cs),gs={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},xs={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Ts={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Te(r){return Br[r-1]||Br[0]}function w(r){let e=Es.get(r.constructor);if(!e)throw new Error("Illegal typed array");return e}function j(r,e){let t=Ts[r.componentType],n=gs[r.type],s=xs[r.componentType],o=r.count*n,i=r.count*n*s;h(i>=0&&i<=e.byteLength);let a=xe[r.componentType],c=ge[r.type];return{ArrayType:t,length:o,byteLength:i,componentByteSize:a,numberOfComponentsInElement:c}}function mr(r){let{images:e,bufferViews:t}=r;e=e||[],t=t||[];let n=e.map(i=>i.bufferView);t=t.filter(i=>!n.includes(i));let s=t.reduce((i,a)=>i+a.byteLength,0),o=e.reduce((i,a)=>{let{width:c,height:A}=a.image;return i+c*A},0);return s+Math.ceil(4*o*hs)}function dr(r,e,t){let n=r.bufferViews[t];h(n);let s=n.buffer,o=e[s];h(o);let i=(n.byteOffset||0)+o.byteOffset;return new Uint8Array(o.arrayBuffer,i,n.byteLength)}function lr(r,e,t){let n=typeof t=="number"?r.accessors?.[t]:t;if(!n)throw new Error(`No gltf accessor ${JSON.stringify(t)}`);let s=r.bufferViews?.[n.bufferView||0];if(!s)throw new Error(`No gltf buffer view for accessor ${s}`);let{arrayBuffer:o,byteOffset:i}=e[s.buffer],a=(i||0)+(n.byteOffset||0)+(s.byteOffset||0),{ArrayType:c,length:A,componentByteSize:f,numberOfComponentsInElement:u}=j(n,s),B=f*u,m=s.byteStride||B;if(typeof s.byteStride>"u"||s.byteStride===B)return new c(o,a,A);let l=new c(A);for(let p=0;ps===e),n=this.getRequiredExtensions().find(s=>s===e);return typeof t=="string"||typeof n=="string"}getExtension(e){let t=this.getUsedExtensions().find(s=>s===e),n=this.json.extensions||{};return t?n[e]:null}getRequiredExtension(e){return this.getRequiredExtensions().find(n=>n===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(e,t){return(e.extensions||{})[t]}getScene(e){return this.getObject("scenes",e)}getNode(e){return this.getObject("nodes",e)}getSkin(e){return this.getObject("skins",e)}getMesh(e){return this.getObject("meshes",e)}getMaterial(e){return this.getObject("materials",e)}getAccessor(e){return this.getObject("accessors",e)}getTexture(e){return this.getObject("textures",e)}getSampler(e){return this.getObject("samplers",e)}getImage(e){return this.getObject("images",e)}getBufferView(e){return this.getObject("bufferViews",e)}getBuffer(e){return this.getObject("buffers",e)}getObject(e,t){if(typeof t=="object")return t;let n=this.json[e]&&this.json[e][t];if(!n)throw new Error(`glTF file error: Could not find ${e}[${t}]`);return n}getTypedArrayForBufferView(e){e=this.getBufferView(e);let t=e.buffer,n=this.gltf.buffers[t];h(n);let s=(e.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,s,e.byteLength)}getTypedArrayForAccessor(e){let t=this.getAccessor(e);return lr(this.gltf.json,this.gltf.buffers,t)}getTypedArrayForImageData(e){e=this.getAccessor(e);let t=this.getBufferView(e.bufferView),s=this.getBuffer(t.buffer).data,o=t.byteOffset||0;return new Uint8Array(s,o,t.byteLength)}addApplicationData(e,t){return this.json[e]=t,this}addExtraData(e,t){return this.json.extras=this.json.extras||{},this.json.extras[e]=t,this}addObjectExtension(e,t,n){return e.extensions=e.extensions||{},e.extensions[t]=n,this.registerUsedExtension(t),this}setObjectExtension(e,t,n){let s=e.extensions||{};s[t]=n}removeObjectExtension(e,t){let n=e?.extensions||{};if(n[t]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];let s=this.json.extensionsRemoved;s.includes(t)||s.push(t)}delete n[t]}addExtension(e,t={}){return h(t),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=t,this.registerUsedExtension(e),t}addRequiredExtension(e,t={}){return h(t),this.addExtension(e,t),this.registerRequiredExtension(e),t}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(t=>t===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(t=>t===e)||this.json.extensionsRequired.push(e)}removeExtension(e){if(this.json.extensions?.[e]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];let t=this.json.extensionsRemoved;t.includes(e)||t.push(e)}this.json.extensions&&delete this.json.extensions[e],this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e)}setDefaultScene(e){this.json.scene=e}addScene(e){let{nodeIndices:t}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:t}),this.json.scenes.length-1}addNode(e){let{meshIndex:t,matrix:n}=e;this.json.nodes=this.json.nodes||[];let s={mesh:t};return n&&(s.matrix=n),this.json.nodes.push(s),this.json.nodes.length-1}addMesh(e){let{attributes:t,indices:n,material:s,mode:o=4}=e,a={primitives:[{attributes:this._addAttributes(t),mode:o}]};if(n){let c=this._addIndices(n);a.primitives[0].indices=c}return Number.isFinite(s)&&(a.primitives[0].material=s),this.json.meshes=this.json.meshes||[],this.json.meshes.push(a),this.json.meshes.length-1}addPointCloud(e){let n={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(n),this.json.meshes.length-1}addImage(e,t){let n=U(e),s=t||n?.mimeType,i={bufferView:this.addBufferView(e),mimeType:s};return this.json.images=this.json.images||[],this.json.images.push(i),this.json.images.length-1}addBufferView(e,t=0,n=this.byteLength){let s=e.byteLength;h(Number.isFinite(s)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);let o={buffer:t,byteOffset:n,byteLength:s};return this.byteLength+=G(s,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(o),this.json.bufferViews.length-1}addAccessor(e,t){let n={bufferView:e,type:Te(t.size),componentType:t.componentType,count:t.count,max:t.max,min:t.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(n),this.json.accessors.length-1}addBinaryBuffer(e,t={size:3}){let n=this.addBufferView(e),s={min:t.min,max:t.max};(!s.min||!s.max)&&(s=this._getAccessorMinMax(e,t.size));let o={size:t.size,componentType:w(e),count:Math.round(e.length/t.size),min:s.min,max:s.max};return this.addAccessor(n,Object.assign(o,t))}addTexture(e){let{imageIndex:t}=e,n={source:t};return this.json.textures=this.json.textures||[],this.json.textures.push(n),this.json.textures.length-1}addMaterial(e){return this.json.materials=this.json.materials||[],this.json.materials.push(e),this.json.materials.length-1}createBinaryChunk(){let e=this.byteLength,t=new ArrayBuffer(e),n=new Uint8Array(t),s=0;for(let o of this.sourceBuffers||[])s=Ze(o,n,s);this.json?.buffers?.[0]?this.json.buffers[0].byteLength=e:this.json.buffers=[{byteLength:e}],this.gltf.binary=t,this.sourceBuffers=[t],this.gltf.buffers=[{arrayBuffer:t,byteOffset:0,byteLength:t.byteLength}]}_removeStringFromArray(e,t){let n=!0;for(;n;){let s=e.indexOf(t);s>-1?e.splice(s,1):n=!1}}_addAttributes(e={}){let t={};for(let n in e){let s=e[n],o=this._getGltfAttributeName(n),i=this.addBinaryBuffer(s.value,s);t[o]=i}return t}_addIndices(e){return this.addBinaryBuffer(e,{size:1})}_getGltfAttributeName(e){switch(e.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return e}}_getAccessorMinMax(e,t){let n={min:null,max:null};if(e.lengthB===f);u===-1&&(u=n.push(f)-1),o.push(u)}let i=new Uint32Array(o),a=r.gltf.buffers.push({arrayBuffer:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength})-1,c=r.addBufferView(i,a,0),A=r.addAccessor(c,{size:1,componentType:w(i),count:i.length});s.attributes[e]=A}function Fs(r,e,t,n,s=[0]){let o={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},i=t[n],a=t[n+1],c=1;e&&(e.indexOf("image/jpeg")!==-1||e.indexOf("image/png")!==-1)&&(c=4);let A=Is(i,a,r,c),f=0;for(let u of s){let B=typeof u=="number"?Object.values(o)[u]:o[u],m=A+B.offset,l=se(r);if(l.data.length<=m)throw new Error(`${l.data.length} <= ${m}`);let p=l.data[m];f|=p<n)break;let A=a/s,f=c/s;o.push(r.slice(A,A+f))}return o}function Fe(r,e,t){let n=[];for(let s=0;s{if(s.data){let{accessorKey:i,index:a}=Os(e.attributes),c=new Uint32Array(s.data);n[o]={featureCount:c.length,propertyTable:s.propertyTable,attribute:a},r.gltf.buffers.push({arrayBuffer:c.buffer,byteOffset:c.byteOffset,byteLength:c.byteLength});let A=r.addBufferView(c),f=r.addAccessor(A,{size:1,componentType:w(c),count:c.length});e.attributes[i]=f}})}function Os(r){let e="_FEATURE_ID_",t=Object.keys(r).filter(o=>o.indexOf(e)===0),n=-1;for(let o of t){let i=Number(o.substring(e.length));i>n&&(n=i)}return n++,{accessorKey:`${e}${n}`,index:n}}var Re={};M(Re,{createExtStructuralMetadata:()=>ft,decode:()=>Ls,encode:()=>ws,name:()=>ct});var W="EXT_structural_metadata",ct=W;async function Ls(r,e){let t=new d(r);Js(t,e)}function ws(r,e){let t=new d(r);return zs(t,e),t.createBinaryChunk(),t.gltf}function Js(r,e){if(!e.gltf?.loadBuffers)return;let t=r.getExtension(W);t&&(e.gltf?.loadImages&&Hs(r,t),Us(r,t))}function Hs(r,e){let t=e.propertyTextures,n=r.gltf.json;if(t&&n.meshes)for(let s of n.meshes)for(let o of s.primitives)Ns(r,t,o,e)}function Us(r,e){let t=e.schema;if(!t)return;let n=t.classes,s=e.propertyTables;if(n&&s)for(let o in n){let i=Ps(s,o);i&&vs(r,t,i)}}function Ps(r,e){for(let t of r)if(t.class===e)return t;return null}function Ns(r,e,t,n){if(!e)return;let o=t.extensions?.[W]?.propertyTextures;if(o)for(let i of o){let a=e[i];Ks(r,a,t,n)}}function Ks(r,e,t,n){if(!e.properties)return;n.dataAttributeNames||(n.dataAttributeNames=[]);let s=e.class;for(let o in e.properties){let i=`${s}_${o}`,a=e.properties?.[o];if(!a)continue;a.data||(a.data=[]);let c=a.data,A=k(r,a,t);A!==null&&(Me(r,i,A,c,t),a.data=c,n.dataAttributeNames.push(i))}}function vs(r,e,t){let n=e.classes?.[t.class];if(!n)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${t.class}`);let s=t.count;for(let o in n.properties){let i=n.properties[o],a=t.properties?.[o];if(a){let c=Xs(r,e,i,s,a);a.data=c}}}function Xs(r,e,t,n,s){let o=[],i=s.values,a=r.getTypedArrayForBufferView(i),c=js(r,t,s,n),A=Qs(r,s,n);switch(t.type){case"SCALAR":case"VEC2":case"VEC3":case"VEC4":case"MAT2":case"MAT3":case"MAT4":{o=Ys(t,n,a,c);break}case"BOOLEAN":throw new Error(`Not implemented - classProperty.type=${t.type}`);case"STRING":{o=Ie(n,a,c,A);break}case"ENUM":{o=ks(e,t,n,a,c);break}default:throw new Error(`Unknown classProperty type ${t.type}`)}return o}function js(r,e,t,n){return e.array&&typeof e.count>"u"&&typeof t.arrayOffsets<"u"?Q(r,t.arrayOffsets,t.arrayOffsetType||"UINT32",n):null}function Qs(r,e,t){return typeof e.stringOffsets<"u"?Q(r,e.stringOffsets,e.stringOffsetType||"UINT32",t):null}function Ys(r,e,t,n){let s=r.array,o=r.count,i=ae(r.type,r.componentType),a=t.byteLength/i,c;return r.componentType?c=Y(t,r.type,r.componentType,a):c=t,s?n?ye(c,e,n,t.length,i):o?Fe(c,e,o):[]:c}function ks(r,e,t,n,s){let o=e.enumType;if(!o)throw new Error("Incorrect data in the EXT_structural_metadata extension: classProperty.enumType is not set for type ENUM");let i=r.enums?.[o];if(!i)throw new Error(`Incorrect data in the EXT_structural_metadata extension: schema.enums does't contain ${o}`);let a=i.valueType||"UINT16",c=ae(e.type,a),A=n.byteLength/c,f=Y(n,e.type,a,A);if(f||(f=n),e.array){if(s)return Vs({valuesData:f,numberOfElements:t,arrayOffsets:s,valuesDataBytesLength:n.length,elementSize:c,enumEntry:i});let u=e.count;return u?Ws(f,t,u,i):[]}return At(f,0,t,i)}function Vs(r){let{valuesData:e,numberOfElements:t,arrayOffsets:n,valuesDataBytesLength:s,elementSize:o,enumEntry:i}=r,a=[];for(let c=0;cs)break;let u=A/o,B=f/o,m=At(e,u,B,i);a.push(m)}return a}function Ws(r,e,t,n){let s=[];for(let o=0;oio,name:()=>ut});var Er="EXT_feature_metadata",ut=Er;async function io(r,e){let t=new d(r);ao(t,e)}function ao(r,e){if(!e.gltf?.loadBuffers)return;let t=r.getExtension(Er);t&&(e.gltf?.loadImages&&co(r,t),Ao(r,t))}function co(r,e){let t=e.schema;if(!t)return;let n=t.classes,{featureTextures:s}=e;if(n&&s)for(let o in n){let i=n[o],a=uo(s,o);a&&mo(r,a,i)}}function Ao(r,e){let t=e.schema;if(!t)return;let n=t.classes,s=e.featureTables;if(n&&s)for(let o in n){let i=fo(s,o);i&&Bo(r,t,i)}}function fo(r,e){for(let t in r){let n=r[t];if(n.class===e)return n}return null}function uo(r,e){for(let t in r){let n=r[t];if(n.class===e)return n}return null}function Bo(r,e,t){if(!t.class)return;let n=e.classes?.[t.class];if(!n)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${t.class}`);let s=t.count;for(let o in n.properties){let i=n.properties[o],a=t.properties?.[o];if(a){let c=lo(r,e,i,s,a);a.data=c}}}function mo(r,e,t){let n=e.class;for(let s in t.properties){let o=e?.properties?.[s];if(o){let i=go(r,o,n);o.data=i}}}function lo(r,e,t,n,s){let o=[],i=s.bufferView,a=r.getTypedArrayForBufferView(i),c=po(r,t,s,n),A=ho(r,t,s,n);return t.type==="STRING"||t.componentType==="STRING"?o=Ie(n,a,c,A):Co(t)&&(o=Eo(t,n,a,c)),o}function po(r,e,t,n){return e.type==="ARRAY"&&typeof e.componentCount>"u"&&typeof t.arrayOffsetBufferView<"u"?Q(r,t.arrayOffsetBufferView,t.offsetType||"UINT32",n):null}function ho(r,e,t,n){return typeof t.stringOffsetBufferView<"u"?Q(r,t.stringOffsetBufferView,t.offsetType||"UINT32",n):null}function Co(r){let e=["UINT8","INT16","UINT16","INT32","UINT32","INT64","UINT64","FLOAT32","FLOAT64"];return e.includes(r.type)||typeof r.componentType<"u"&&e.includes(r.componentType)}function Eo(r,e,t,n){let s=r.type==="ARRAY",o=r.componentCount,i="SCALAR",a=r.componentType||r.type,c=ae(i,a),A=t.byteLength/c,f=Y(t,i,a,A);return s?n?ye(f,e,n,t.length,c):o?Fe(f,e,o):[]:f}function go(r,e,t){let n=r.gltf.json;if(!n.meshes)return[];let s=[];for(let o of n.meshes)for(let i of o.primitives)xo(r,t,e,s,i);return s}function xo(r,e,t,n,s){let o={channels:t.channels,...t.texture},i=k(r,o,s);i&&Me(r,e,i,n,s)}var J="4.3.1";var gr="4.3.1";var De={TRANSCODER:"basis_transcoder.js",TRANSCODER_WASM:"basis_transcoder.wasm",ENCODER:"basis_encoder.js",ENCODER_WASM:"basis_encoder.wasm"},xr;async function dt(r){Ye(r.modules);let e=ke("basis");return e||(xr||=To(r),await xr)}async function To(r){let e=null,t=null;return[e,t]=await Promise.all([await D(De.TRANSCODER,"textures",r),await D(De.TRANSCODER_WASM,"textures",r)]),e=e||globalThis.BASIS,await Mo(e,t)}function Mo(r,e){let t={};return e&&(t.wasmBinary=e),new Promise(n=>{r(t).then(s=>{let{BasisFile:o,initializeBasis:i}=s;i(),n({BasisFile:o})})})}var mt;async function lt(r){let e=r.modules||{};return e.basisEncoder?e.basisEncoder:(mt=mt||yo(r),await mt)}async function yo(r){let e=null,t=null;return[e,t]=await Promise.all([await D(De.ENCODER,"textures",r),await D(De.ENCODER_WASM,"textures",r)]),e=e||globalThis.BASIS,await Fo(e,t)}function Fo(r,e){let t={};return e&&(t.wasmBinary=e),new Promise(n=>{r(t).then(s=>{let{BasisFile:o,KTX2File:i,initializeBasis:a,BasisEncoder:c}=s;a(),n({BasisFile:o,KTX2File:i,BasisEncoder:c})})})}var P={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919};var Io=["","WEBKIT_","MOZ_"],Tr={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"},Ge=null;function Mr(r){if(!Ge){r=r||bo()||void 0,Ge=new Set;for(let e of Io)for(let t in Tr)if(r&&r.getExtension(`${e}${t}`)){let n=Tr[t];Ge.add(n)}}return Ge}function bo(){try{return document.createElement("canvas").getContext("webgl")}catch{return null}}var T=[171,75,84,88,32,50,48,187,13,10,26,10];function yr(r){let e=new Uint8Array(r);return!(e.byteLengthgt+Se);let n=e.getUint32(t+0,Z),s=e.getUint32(t+4,Z);return t+=Se,y(s===Oo),Ct(r,e,t,n),t+=n,t+=Et(r,e,t,r.header.byteLength),t}function Uo(r,e,t,n){return y(r.header.byteLength>gt+Se),Po(r,e,t,n),t+r.header.byteLength}function Po(r,e,t,n){for(;t+8<=r.header.byteLength;){let s=e.getUint32(t+0,Z),o=e.getUint32(t+4,Z);switch(t+=Se,o){case _o:Ct(r,e,t,s);break;case So:Et(r,e,t,s);break;case Lo:n.strict||Ct(r,e,t,s);break;case wo:n.strict||Et(r,e,t,s);break;default:break}t+=G(s,4)}return t}function Ct(r,e,t,n){let s=new Uint8Array(e.buffer,t,n),i=new TextDecoder("utf8").decode(s);return r.json=JSON.parse(i),G(n,4)}function Et(r,e,t,n){return r.header.hasBinChunk=!0,r.binChunks.push({byteOffset:t,byteLength:n,arrayBuffer:e.buffer}),G(n,4)}function xt(r,e){if(r.startsWith("data:")||r.startsWith("http:")||r.startsWith("https:"))return r;let n=e.baseUri||e.uri;if(!n)throw new Error(`'baseUri' must be provided to resolve relative url ${r}`);return n.substr(0,n.lastIndexOf("/")+1)+r}var Mt={};M(Mt,{decode:()=>qo,name:()=>Zo});var No="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jW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rFD9QHVAOAND/mFAID/kFCTD+rFAKAND/mFAID/kFAcD9OD9QHNDQBFTtGEmYILPdKOenHID8dBAGDBIBDyB+t+J83EBABCNJAID8dFAGDBIBDyF+t+J83EBALAVANDQNVi8ZcMpySQ8c8dfb8e8fHND8dBAGDBIBDyG+t+J83EBABCiJAND8dFAGDBIBDyE+t+J83EBABCAJRBAECIJHEAF9JQBMMM/3FGEaF978jUUUUBCoBlREGXAGCGrAF9sHIC98ZHL9FQBCBRGABRFEXAFAFDBBBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBAFCTJRFAGCIJHGAL9JQBMMGXALAI9PQBAEAICEZHGCGWHFqCBCoBAFl/8MBAEABALCGWJHLAF/8cBBGXAG9FQBAEAEDBIBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMIBMALAEAF/8cBBMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",vo=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),Xo=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),jo={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},Qo={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};async function _r(r,e,t,n,s,o="NONE"){let i=await Yo();Wo(i,i.exports[Qo[s]],r,e,t,n,i.exports[jo[o||"NONE"]])}var Tt;async function Yo(){return Tt||(Tt=ko()),Tt}async function ko(){let r=No;WebAssembly.validate(vo)&&(r=Ko,console.log("Warning: meshopt_decoder is using experimental SIMD support"));let e=await WebAssembly.instantiate(Vo(r),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}function Vo(r){let e=new Uint8Array(r.length);for(let n=0;n96?s-71:s>64?s-65:s>47?s+4:s>46?63:62}let t=0;for(let n=0;n$o,preprocess:()=>ei});var q="EXT_texture_webp",$o=q;function ei(r,e){let t=new d(r);if(!st("image/webp")){if(t.getRequiredExtensions().includes(q))throw new Error(`gltf: Required extension ${q} not supported by browser`);return}let{json:n}=t;for(let s of n.textures||[]){let o=t.getObjectExtension(s,q);o&&(s.source=o.source),t.removeObjectExtension(s,q)}t.removeExtension(q)}var Ft={};M(Ft,{name:()=>ti,preprocess:()=>ri});var we="KHR_texture_basisu",ti=we;function ri(r,e){let t=new d(r),{json:n}=t;for(let s of n.textures||[]){let o=t.getObjectExtension(s,we);o&&(s.source=o.source,t.removeObjectExtension(s,we))}t.removeExtension(we)}var St={};M(St,{decode:()=>Ci,encode:()=>Ei,name:()=>pi,preprocess:()=>hi});var Sr="4.3.1";var Or={dataType:null,batchType:null,name:"Draco",id:"draco",module:"draco",version:Sr,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function Lr(r){switch(r.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function It(r){let e=1/0,t=1/0,n=1/0,s=-1/0,o=-1/0,i=-1/0,a=r.POSITION?r.POSITION.value:[],c=a&&a.length;for(let A=0;As?f:s,o=u>o?u:o,i=B>i?B:i}return[[e,t,n],[s,o,i]]}function bt(r,e,t){let n=Lr(e.value),s=t||wr(e);return{name:r,type:{type:"fixed-size-list",listSize:e.size,children:[{name:"value",type:n}]},nullable:!1,metadata:s}}function wr(r){let e={};return"byteOffset"in r&&(e.byteOffset=r.byteOffset.toString(10)),"byteStride"in r&&(e.byteStride=r.byteStride.toString(10)),"normalized"in r&&(e.normalized=r.normalized.toString()),e}function Hr(r,e,t){let n=Ur(e.metadata),s=[],o=ni(e.attributes);for(let i in r){let a=r[i],c=Jr(i,a,o[i]);s.push(c)}if(t){let i=Jr("indices",t);s.push(i)}return{fields:s,metadata:n}}function ni(r){let e={};for(let t in r){let n=r[t];e[n.name||"undefined"]=n}return e}function Jr(r,e,t){let n=t?Ur(t.metadata):void 0;return bt(r,e,n)}function Ur(r){Object.entries(r);let e={};for(let t in r)e[`${t}.string`]=JSON.stringify(r[t]);return e}var Pr={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},si={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},oi=4,ce=class{draco;decoder;metadataQuerier;constructor(e){this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(e,t={}){let n=new this.draco.DecoderBuffer;n.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(t);let s=this.decoder.GetEncodedGeometryType(n),o=s===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let i;switch(s){case this.draco.TRIANGULAR_MESH:i=this.decoder.DecodeBufferToMesh(n,o);break;case this.draco.POINT_CLOUD:i=this.decoder.DecodeBufferToPointCloud(n,o);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!i.ok()||!o.ptr){let B=`DRACO decompression failed: ${i.error_msg()}`;throw new Error(B)}let a=this._getDracoLoaderData(o,s,t),c=this._getMeshData(o,a,t),A=It(c.attributes),f=Hr(c.attributes,a,c.indices);return{loader:"draco",loaderData:a,header:{vertexCount:o.num_points(),boundingBox:A},...c,schema:f}}finally{this.draco.destroy(n),o&&this.draco.destroy(o)}}_getDracoLoaderData(e,t,n){let s=this._getTopLevelMetadata(e),o=this._getDracoAttributes(e,n);return{geometry_type:t,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:s,attributes:o}}_getDracoAttributes(e,t){let n={};for(let s=0;sthis.decoder[i]).includes(s)){let i=new this.draco.AttributeQuantizationTransform;try{if(i.InitFromAttribute(e))return{quantization_bits:i.quantization_bits(),range:i.range(),min_values:new Float32Array([1,2,3]).map(a=>i.min_value(a))}}finally{this.draco.destroy(i)}}return null}_getOctahedronTransform(e,t){let{octahedronAttributes:n=[]}=t,s=e.attribute_type();if(n.map(i=>this.decoder[i]).includes(s)){let i=new this.draco.AttributeQuantizationTransform;try{if(i.InitFromAttribute(e))return{quantization_bits:i.quantization_bits()}}finally{this.draco.destroy(i)}}return null}};function ii(r,e){switch(e){case Float32Array:return r.DT_FLOAT32;case Int8Array:return r.DT_INT8;case Int16Array:return r.DT_INT16;case Int32Array:return r.DT_INT32;case Uint8Array:return r.DT_UINT8;case Uint16Array:return r.DT_UINT16;case Uint32Array:return r.DT_UINT32;default:return r.DT_INVALID}}function ai(r){let e=r.size(),t=new Int32Array(e);for(let n=0;n({draco:t})):Gt||=ui(r),await Gt}async function ui(r){let e,t;switch(r.draco&&r.draco.decoderType){case"js":e=await D(Dt[x.FALLBACK_DECODER],"draco",r,x.FALLBACK_DECODER);break;case"wasm":default:[e,t]=await Promise.all([await D(Dt[x.DECODER],"draco",r,x.DECODER),await D(Dt[x.DECODER_WASM],"draco",r,x.DECODER_WASM)])}return e=e||globalThis.DracoDecoderModule,await Bi(e,t)}function Bi(r,e){let t={};return e&&(t.wasmBinary=e),new Promise(n=>{r({...t,onModuleLoaded:s=>n({draco:s})})})}var Kr={...Or,parse:mi};async function mi(r,e){let{draco:t}=await Nr(e),n=new ce(t);try{return n.parseSync(r,e?.draco)}finally{n.destroy()}}function vr(r){let e={};for(let t in r){let n=r[t];if(t!=="indices"){let s=_t(n);e[t]=s}}return e}function _t(r){let{buffer:e,size:t,count:n}=di(r);return{value:e,size:t,byteOffset:0,count:n,type:Te(t),componentType:w(e)}}function di(r){let e=r,t=1,n=0;return r&&r.value&&(e=r.value,t=r.size||1),e&&(ArrayBuffer.isView(e)||(e=li(e,Float32Array)),n=e.length/t),{buffer:e,size:t,count:n}}function li(r,e,t=!1){return r?Array.isArray(r)?new e(r):t&&!(r instanceof e)?new e(r):r:null}var H="KHR_draco_mesh_compression",pi=H;function hi(r,e,t){let n=new d(r);for(let s of Xr(n))n.getObjectExtension(s,H)}async function Ci(r,e,t){if(!e?.gltf?.decompressMeshes)return;let n=new d(r),s=[];for(let o of Xr(n))n.getObjectExtension(o,H)&&s.push(gi(n,o,e,t));await Promise.all(s),n.removeExtension(H)}function Ei(r,e={}){let t=new d(r);for(let n of t.json.meshes||[])xi(n,e),t.addRequiredExtension(H)}async function gi(r,e,t,n){let s=r.getObjectExtension(e,H);if(!s)return;let o=r.getTypedArrayForBufferView(s.bufferView),i=ne(o.buffer,o.byteOffset),a={...t};delete a["3d-tiles"];let c=await te(i,Kr,a,n),A=vr(c.attributes);for(let[f,u]of Object.entries(A))if(f in e.attributes){let B=e.attributes[f],m=r.getAccessor(B);m?.min&&m?.max&&(u.min=m.min,u.max=m.max)}e.attributes=A,c.indices&&(e.indices=_t(c.indices)),r.removeObjectExtension(e,H),Ti(e)}function xi(r,e,t=4,n,s){if(!n.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");let o=n.DracoWriter.encodeSync({attributes:r}),i=s?.parseSync?.({attributes:r}),a=n._addFauxAttributes(i.attributes),c=n.addBufferView(o);return{primitives:[{attributes:a,mode:t,extensions:{[H]:{bufferView:c,attributes:a}}}]}}function Ti(r){if(!r.attributes&&Object.keys(r.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function*Xr(r){for(let e of r.json.meshes||[])for(let t of e.primitives)yield t}var Pt={};M(Pt,{decode:()=>Ui,name:()=>wi});var Sf=1/Math.PI*180,Of=1/180*Math.PI,Mi={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...Mi}};var C=globalThis.mathgl.config;function jr(r,{precision:e=C.precision}={}){return r=yi(r),`${parseFloat(r.toPrecision(e))}`}function z(r){return Array.isArray(r)||ArrayBuffer.isView(r)&&!(r instanceof DataView)}function Ot(r,e,t){let n=C.EPSILON;t&&(C.EPSILON=t);try{if(r===e)return!0;if(z(r)&&z(e)){if(r.length!==e.length)return!1;for(let s=0;s0?", ":"")+jr(this[n],e);return`${e.printTypes?this.constructor.name:""}[${t}]`}equals(e){if(!e||this.length!==e.length)return!1;for(let t=0;t=0&&e=0&&e0?this.copy([e,...t]):this.identity()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this.check()}identity(){return this.copy(Si)}fromObject(e){return this.check()}fromQuaternion(e){return fn(this,e),this.check()}set(e,t,n,s,o,i,a,c,A){return this[0]=e,this[1]=t,this[2]=n,this[3]=s,this[4]=o,this[5]=i,this[6]=a,this[7]=c,this[8]=A,this.check()}setRowMajor(e,t,n,s,o,i,a,c,A){return this[0]=e,this[1]=s,this[2]=a,this[3]=t,this[4]=o,this[5]=c,this[6]=n,this[7]=i,this[8]=A,this.check()}determinant(){return an(this)}transpose(){return sn(this,this),this.check()}invert(){return on(this,this),this.check()}multiplyLeft(e){return Jt(this,e,this),this.check()}multiplyRight(e){return Jt(this,this,e),this.check()}rotate(e){return An(this,this,e),this.check()}scale(e){return Array.isArray(e)?Ht(this,this,e):Ht(this,this,[e,e]),this.check()}translate(e){return cn(this,this,e),this.check()}transform(e,t){let n;switch(e.length){case 2:n=kr(t||[-0,-0],e,this);break;case 3:n=He(t||[-0,-0,-0],e,this);break;case 4:n=Zr(t||[-0,-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Qr(n,e.length),n}transformVector(e,t){return this.transform(e,t)}transformVector2(e,t){return this.transform(e,t)}transformVector3(e,t){return this.transform(e,t)}},Ne,Ke=null;function Oi(){return Ne||(Ne=new O([0,0,0,0,0,0,0,0,0]),Object.freeze(Ne)),Ne}function Li(){return Ke||(Ke=new O,Object.freeze(Ke)),Ke}var Xe="KHR_texture_transform",wi=Xe,ve=new N,Ji=new O,Hi=new O;async function Ui(r,e){if(!new d(r).hasExtension(Xe)||!e.gltf?.loadBuffers)return;let s=r.json.materials||[];for(let o=0;oi===n&&a===s)!==-1)){let i=Qi(t);return n!==s&&(r.texCoord=s),e.push([n,s]),{originalTexCoord:n,texCoord:s,matrix:i}}return null}function vi(r,e,t){let{originalTexCoord:n,texCoord:s,matrix:o}=t,i=e.attributes[`TEXCOORD_${n}`];if(Number.isFinite(i)){let a=r.json.accessors?.[i];if(a&&a.bufferView){let c=r.json.bufferViews?.[a.bufferView];if(c){let{arrayBuffer:A,byteOffset:f}=r.buffers[c.buffer],u=(f||0)+(a.byteOffset||0)+(c.byteOffset||0),{ArrayType:B,length:m}=j(a,c),l=xe[a.componentType],p=ge[a.type],g=c.byteStride||l*p,I=new Float32Array(m);for(let L=0;Lki,encode:()=>Vi,name:()=>Yi});var K="KHR_lights_punctual",Yi=K;async function ki(r){let e=new d(r),{json:t}=e,n=e.getExtension(K);n&&(e.json.lights=n.lights,e.removeExtension(K));for(let s of t.nodes||[]){let o=e.getObjectExtension(s,K);o&&(s.light=o.light),e.removeObjectExtension(s,K)}}async function Vi(r){let e=new d(r),{json:t}=e;if(t.lights){let n=e.addExtension(K);h(!n.lights),n.lights=t.lights,delete t.lights}if(e.json.lights){for(let n of e.json.lights){let s=n.node;e.addObjectExtension(s,K,n)}delete e.json.lights}}var Kt={};M(Kt,{decode:()=>Zi,encode:()=>qi,name:()=>Wi});var Ae="KHR_materials_unlit",Wi=Ae;async function Zi(r){let e=new d(r),{json:t}=e;for(let n of t.materials||[])n.extensions&&n.extensions.KHR_materials_unlit&&(n.unlit=!0),e.removeObjectExtension(n,Ae);e.removeExtension(Ae)}function qi(r){let e=new d(r),{json:t}=e;if(e.materials)for(let n of t.materials||[])n.unlit&&(delete n.unlit,e.addObjectExtension(n,Ae,{}),e.addExtension(Ae))}var vt={};M(vt,{decode:()=>$i,encode:()=>ea,name:()=>zi});var fe="KHR_techniques_webgl",zi=fe;async function $i(r){let e=new d(r),{json:t}=e,n=e.getExtension(fe);if(n){let s=ta(n,e);for(let o of t.materials||[]){let i=e.getObjectExtension(o,fe);i&&(o.technique=Object.assign({},i,s[i.technique]),o.technique.values=ra(o.technique,e)),e.removeObjectExtension(o,fe)}e.removeExtension(fe)}}async function ea(r,e){}function ta(r,e){let{programs:t=[],shaders:n=[],techniques:s=[]}=r,o=new TextDecoder;return n.forEach(i=>{if(Number.isFinite(i.bufferView))i.code=o.decode(e.getTypedArrayForBufferView(i.bufferView));else throw new Error("KHR_techniques_webgl: no shader code")}),t.forEach(i=>{i.fragmentShader=n[i.fragmentShader],i.vertexShader=n[i.vertexShader]}),s.forEach(i=>{i.program=t[i.program]}),s}function ra(r,e){let t=Object.assign({},r.values);return Object.keys(r.uniforms||{}).forEach(n=>{r.uniforms[n].value&&!(n in t)&&(t[n]=r.uniforms[n].value)}),Object.keys(t).forEach(n=>{typeof t[n]=="object"&&t[n].index!==void 0&&(t[n].texture=e.getTexture(t[n].index))}),t}var un=[Re,be,Mt,yt,Ft,St,Nt,Kt,vt,Pt,Bt],na=[Re,be];function Bn(r,e={},t){let n=un.filter(s=>ln(s.name,e));for(let s of n)s.preprocess?.(r,e,t)}async function mn(r,e={},t){let n=un.filter(s=>ln(s.name,e));for(let s of n)await s.decode?.(r,e,t)}function dn(r,e={}){for(let t of na)r=t.encode?.(r,e)??r;return r}function ln(r,e){let t=e?.gltf?.excludeExtensions||{};return!(r in t&&!t[r])}var Xt="KHR_binary_glTF";function pn(r){let e=new d(r),{json:t}=e;for(let n of t.images||[]){let s=e.getObjectExtension(n,Xt);s&&Object.assign(n,s),e.removeObjectExtension(n,Xt)}t.buffers&&t.buffers[0]&&delete t.buffers[0].uri,e.removeExtension(Xt)}var hn={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},oa={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"},jt=class{idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}};json;normalize(e,t){this.json=e.json;let n=e.json;switch(n.asset&&n.asset.version){case"2.0":return;case void 0:case"1.0":break;default:console.warn(`glTF: Unknown version ${n.asset.version}`);return}if(!t.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(n),this._convertTopLevelObjectsToArrays(n),pn(e),this._convertObjectIdsToArrayIndices(n),this._updateObjects(n),this._updateMaterial(n)}_addAsset(e){e.asset=e.asset||{},e.asset.version="2.0",e.asset.generator=e.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(e){for(let t in hn)this._convertTopLevelObjectToArray(e,t)}_convertTopLevelObjectToArray(e,t){let n=e[t];if(!(!n||Array.isArray(n))){e[t]=[];for(let s in n){let o=n[s];o.id=o.id||s;let i=e[t].length;e[t].push(o),this.idToIndexMap[t][s]=i}}}_convertObjectIdsToArrayIndices(e){for(let t in hn)this._convertIdsToIndices(e,t);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));for(let t of e.textures)this._convertTextureIds(t);for(let t of e.meshes)this._convertMeshIds(t);for(let t of e.nodes)this._convertNodeIds(t);for(let t of e.scenes)this._convertSceneIds(t)}_convertTextureIds(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}_convertMeshIds(e){for(let t of e.primitives){let{attributes:n,indices:s,material:o}=t;for(let i in n)n[i]=this._convertIdToIndex(n[i],"accessor");s&&(t.indices=this._convertIdToIndex(s,"accessor")),o&&(t.material=this._convertIdToIndex(o,"material"))}}_convertNodeIds(e){e.children&&(e.children=e.children.map(t=>this._convertIdToIndex(t,"node"))),e.meshes&&(e.meshes=e.meshes.map(t=>this._convertIdToIndex(t,"mesh")))}_convertSceneIds(e){e.nodes&&(e.nodes=e.nodes.map(t=>this._convertIdToIndex(t,"node")))}_convertIdsToIndices(e,t){e[t]||(console.warn(`gltf v1: json doesn't contain attribute ${t}`),e[t]=[]);for(let n of e[t])for(let s in n){let o=n[s],i=this._convertIdToIndex(o,s);n[s]=i}}_convertIdToIndex(e,t){let n=oa[t];if(n in this.idToIndexMap){let s=this.idToIndexMap[n][e];if(!Number.isFinite(s))throw new Error(`gltf v1: failed to resolve ${t} with id ${e}`);return s}return e}_updateObjects(e){for(let t of this.json.buffers)delete t.type}_updateMaterial(e){for(let t of e.materials){t.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};let n=t.values?.tex||t.values?.texture2d_0||t.values?.diffuseTex,s=e.textures.findIndex(o=>o.id===n);s!==-1&&(t.pbrMetallicRoughness.baseColorTexture={index:s})}}};function Cn(r,e={}){return new jt().normalize(r,e)}async function En(r,e,t=0,n,s){return ia(r,e,t,n),Cn(r,{normalize:n?.gltf?.normalize}),Bn(r,n,s),n?.gltf?.loadBuffers&&r.json.buffers&&await aa(r,n,s),n?.gltf?.loadImages&&await ca(r,n,s),await mn(r,n,s),r}function ia(r,e,t,n){if(n.uri&&(r.baseUri=n.uri),e instanceof ArrayBuffer&&!Gr(e,t,n)&&(e=new TextDecoder().decode(e)),typeof e=="string")r.json=We(e);else if(e instanceof ArrayBuffer){let i={};t=Oe(i,e,t,n.glb),h(i.type==="glTF",`Invalid GLB magic string ${i.type}`),r._glb=i,r.json=i.json}else h(!1,"GLTF: must be ArrayBuffer or string");let s=r.json.buffers||[];if(r.buffers=new Array(s.length).fill(null),r._glb&&r._glb.header.hasBinChunk){let{binChunks:i}=r._glb;r.buffers[0]={arrayBuffer:i[0].arrayBuffer,byteOffset:i[0].byteOffset,byteLength:i[0].byteLength}}let o=r.json.images||[];r.images=new Array(o.length).fill({})}async function aa(r,e,t){let n=r.json.buffers||[];for(let s=0;s1)throw new Error("encodeGLTF: multiple buffers not yet implemented")}var xn={dataType:null,batchType:null,name:"glTF",id:"gltf",module:"gltf",version:J,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,options:{gltf:{}},encode:async(r,e={})=>gn(r,e),encodeSync:gn};function gn(r,e={}){let{byteOffset:t=0}=e,n=dn(r),s=Qt(n,null,t,e),o=new ArrayBuffer(s),i=new DataView(o);return Qt(n,i,t,e),o}var Tn={dataType:null,batchType:null,name:"GLB",id:"glb",module:"gltf",version:J,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,parse:pa,parseSync:Mn,options:{glb:{strict:!1}}};async function pa(r,e){return Mn(r,e)}function Mn(r,e){let{byteOffset:t=0}=e||{},n={};return Oe(n,r,t,e?.glb),n}var Fn={name:"GLB",id:"glb",module:"gltf",version:J,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,options:{glb:{}},encode:async(r,e={})=>yn(r,e),encodeSync:yn};function yn(r,e){let{byteOffset:t=0}=e??{},n=ue(r,null,t,e),s=new ArrayBuffer(n),o=new DataView(s);return ue(r,o,t,e),s}var ha={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ca={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},F={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},Ea={magFilter:F.TEXTURE_MAG_FILTER,minFilter:F.TEXTURE_MIN_FILTER,wrapS:F.TEXTURE_WRAP_S,wrapT:F.TEXTURE_WRAP_T},ga={[F.TEXTURE_MAG_FILTER]:F.LINEAR,[F.TEXTURE_MIN_FILTER]:F.NEAREST_MIPMAP_LINEAR,[F.TEXTURE_WRAP_S]:F.REPEAT,[F.TEXTURE_WRAP_T]:F.REPEAT};function xa(){return{id:"default-sampler",parameters:ga}}function Ta(r){return Ca[r]}function Ma(r){return ha[r]}var Yt=class{baseUri="";jsonUnprocessed;json;buffers=[];images=[];postProcess(e,t={}){let{json:n,buffers:s=[],images:o=[]}=e,{baseUri:i=""}=e;return h(n),this.baseUri=i,this.buffers=s,this.images=o,this.jsonUnprocessed=n,this.json=this._resolveTree(e.json,t),this.json}_resolveTree(e,t={}){let n={...e};return this.json=n,e.bufferViews&&(n.bufferViews=e.bufferViews.map((s,o)=>this._resolveBufferView(s,o))),e.images&&(n.images=e.images.map((s,o)=>this._resolveImage(s,o))),e.samplers&&(n.samplers=e.samplers.map((s,o)=>this._resolveSampler(s,o))),e.textures&&(n.textures=e.textures.map((s,o)=>this._resolveTexture(s,o))),e.accessors&&(n.accessors=e.accessors.map((s,o)=>this._resolveAccessor(s,o))),e.materials&&(n.materials=e.materials.map((s,o)=>this._resolveMaterial(s,o))),e.meshes&&(n.meshes=e.meshes.map((s,o)=>this._resolveMesh(s,o))),e.nodes&&(n.nodes=e.nodes.map((s,o)=>this._resolveNode(s,o)),n.nodes=n.nodes.map((s,o)=>this._resolveNodeChildren(s))),e.skins&&(n.skins=e.skins.map((s,o)=>this._resolveSkin(s,o))),e.scenes&&(n.scenes=e.scenes.map((s,o)=>this._resolveScene(s,o))),typeof this.json.scene=="number"&&n.scenes&&(n.scene=n.scenes[this.json.scene]),n}getScene(e){return this._get(this.json.scenes,e)}getNode(e){return this._get(this.json.nodes,e)}getSkin(e){return this._get(this.json.skins,e)}getMesh(e){return this._get(this.json.meshes,e)}getMaterial(e){return this._get(this.json.materials,e)}getAccessor(e){return this._get(this.json.accessors,e)}getCamera(e){return this._get(this.json.cameras,e)}getTexture(e){return this._get(this.json.textures,e)}getSampler(e){return this._get(this.json.samplers,e)}getImage(e){return this._get(this.json.images,e)}getBufferView(e){return this._get(this.json.bufferViews,e)}getBuffer(e){return this._get(this.json.buffers,e)}_get(e,t){if(typeof t=="object")return t;let n=e&&e[t];return n||console.warn(`glTF file error: Could not find ${e}[${t}]`),n}_resolveScene(e,t){return{...e,id:e.id||`scene-${t}`,nodes:(e.nodes||[]).map(n=>this.getNode(n))}}_resolveNode(e,t){let n={...e,id:e?.id||`node-${t}`};return e.mesh!==void 0&&(n.mesh=this.getMesh(e.mesh)),e.camera!==void 0&&(n.camera=this.getCamera(e.camera)),e.skin!==void 0&&(n.skin=this.getSkin(e.skin)),e.meshes!==void 0&&e.meshes.length&&(n.mesh=e.meshes.reduce((s,o)=>{let i=this.getMesh(o);return s.id=i.id,s.primitives=s.primitives.concat(i.primitives),s},{primitives:[]})),n}_resolveNodeChildren(e){return e.children&&(e.children=e.children.map(t=>this.getNode(t))),e}_resolveSkin(e,t){let n=typeof e.inverseBindMatrices=="number"?this.getAccessor(e.inverseBindMatrices):void 0;return{...e,id:e.id||`skin-${t}`,inverseBindMatrices:n}}_resolveMesh(e,t){let n={...e,id:e.id||`mesh-${t}`,primitives:[]};return e.primitives&&(n.primitives=e.primitives.map(s=>{let o={...s,attributes:{},indices:void 0,material:void 0},i=s.attributes;for(let a in i)o.attributes[a]=this.getAccessor(i[a]);return s.indices!==void 0&&(o.indices=this.getAccessor(s.indices)),s.material!==void 0&&(o.material=this.getMaterial(s.material)),o})),n}_resolveMaterial(e,t){let n={...e,id:e.id||`material-${t}`};if(n.normalTexture&&(n.normalTexture={...n.normalTexture},n.normalTexture.texture=this.getTexture(n.normalTexture.index)),n.occlusionTexture&&(n.occlusionTexture={...n.occlusionTexture},n.occlusionTexture.texture=this.getTexture(n.occlusionTexture.index)),n.emissiveTexture&&(n.emissiveTexture={...n.emissiveTexture},n.emissiveTexture.texture=this.getTexture(n.emissiveTexture.index)),n.emissiveFactor||(n.emissiveFactor=n.emissiveTexture?[1,1,1]:[0,0,0]),n.pbrMetallicRoughness){n.pbrMetallicRoughness={...n.pbrMetallicRoughness};let s=n.pbrMetallicRoughness;s.baseColorTexture&&(s.baseColorTexture={...s.baseColorTexture},s.baseColorTexture.texture=this.getTexture(s.baseColorTexture.index)),s.metallicRoughnessTexture&&(s.metallicRoughnessTexture={...s.metallicRoughnessTexture},s.metallicRoughnessTexture.texture=this.getTexture(s.metallicRoughnessTexture.index))}return n}_resolveAccessor(e,t){let n=Ta(e.componentType),s=Ma(e.type),o=n*s,i={...e,id:e.id||`accessor-${t}`,bytesPerComponent:n,components:s,bytesPerElement:o,value:void 0,bufferView:void 0,sparse:void 0};if(e.bufferView!==void 0&&(i.bufferView=this.getBufferView(e.bufferView)),i.bufferView){let a=i.bufferView.buffer,{ArrayType:c,byteLength:A}=j(i,i.bufferView),f=(i.bufferView.byteOffset||0)+(i.byteOffset||0)+a.byteOffset,u=a.arrayBuffer.slice(f,f+A);i.bufferView.byteStride&&(u=this._getValueFromInterleavedBuffer(a,f,i.bufferView.byteStride,i.bytesPerElement,i.count)),i.value=new c(u)}return i}_getValueFromInterleavedBuffer(e,t,n,s,o){let i=new Uint8Array(o*s);for(let a=0;a