PageSourceSearch

https://formlabs.com/_next/static/chunks/e7838a1b.c760e9da1710794b.js

js formlabs.com collected 2026-09-24 08:36:00 UTC 114,674 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9424],{5432:function(e,t,r){let n;"undefined"!=typeof self?self:void 0!==r.g&&r.g,n=r(2644),e.exports=(()=>{"use strict";var e={
1"../../../dev/serializers/src/OBJ/index.ts":(e,t,r)=>{r.r(t),r.d(t,{OBJExport:()=>n.OBJExport});var n=r("../../../dev/serializers/src/OBJ/objSerializer.ts")},
1"../../../dev/serializers/src/OBJ/objSerializer.ts":(e,t,r)=>{r.r(t),r.d(t,{OBJExport:()=>i});var n=r("babylonjs/Maths/math.vector"),i=function(){function e(){}return e.OBJ=function(e,t,r,i){var s=[],a=1,o=1;t&&(r||(r="mat"),s.push("mtllib "+r+".mtl"));for(var l=0;l<e.length;l++){var u=e[l].name||"mesh".concat(l,"}");s.push("o ".concat(u));var c=null;if(i){var f=e[l].computeWorldMatrix(!0);c=new n.Matrix,f.invertToRef(c),e[l].bakeTransformIntoVertices(f)}if(t){var p=e[l].material;p&&s.push("usemtl "+p.id)}var h=e[l].geometry;if(!h){n.Tools.Warn("No geometry is present on the mesh");continue}var _=h.getVerticesData("position"),d=h.getVerticesData("normal"),m=h.getVerticesData("uv"),g=h.getIndices(),x=0,y=0;if(!_||!g){n.Tools.Warn("There are no position vertices or indices on the mesh!");continue}for(var T=e[0].getScene().useRightHandedSystem,v=T?1:-1,b=0;b<_.length;b+=3)s.push("v "+_[b]*v+" "+_[b+1]+" "+_[b+2]),x++;if(null!=d)for(var b=0;b<d.length;b+=3)s.push("vn "+d[b]*v+" "+d[b+1]+" "+d[b+2]);if(null!=m)for(var b=0;b<m.length;b+=2)s.push("vt "+m[b]+" "+m[b+1]),y++;for(var E=["","",""],F=T?[2,1]:[1,2],A=F[0],R=F[1],b=0;b<g.length;b+=3){var M=[String(g[b]+a),String(g[b+A]+a),String(g[b+R]+a)],w=[String(g[b]+o),String(g[b+A]+o),String(g[b+R]+o)],S=null!=m?w:E,C=null!=d?M:E;s.push("f "+M[0]+"/"+S[0]+"/"+C[0]+" "+M[1]+"/"+S[1]+"/"+C[1]+" "+M[2]+"/"+S[2]+"/"+C[2])}i&&c&&e[l].bakeTransformIntoVertices(c),a+=x,o+=y}return s.join("\n")},e.MTL=function(e){var t=[],r=e.material;return t.push("newmtl mat1"),t.push("  Ns "+r.specularPower.toFixed(4)),t.push("  Ni 1.5000"),t.push("  d "+r.alpha.toFixed(4)),t.push("  Tr 0.0000"),t.push("  Tf 1.0000 1.0000 1.0000"),t.push("  illum 2"),t.push("  Ka "+r.ambientColor.r.toFixed(4)+" "+r.ambientColor.g.toFixed(4)+" "+r.ambientColor.b.toFixed(4)),t.push("  Kd "+r.diffuseColor.r.toFixed(4)+" "+r.diffuseColor.g.toFixed(4)+" "+r.diffuseColor.b.toFixed(4)),t.push("  Ks "+r.specularColor.r.toFixed(4)+" "+r.specularColor.g.toFixed(4)+" "+r.specularColor.b.toFixed(4)),t.push("  Ke "+r.emissiveColor.r.toFixed(4)+" "+r.emissiveColor.g.toFixed(4)+" "+r.emissiveColor.b.toFixed(4)),r.ambientTexture&&t.push("  map_Ka "+r.ambientTexture.name),r.diffuseTexture&&t.push("  map_Kd "+r.diffuseTexture.name),r.specularTexture&&t.push("  map_Ks "+r.specularTexture.name),r.bumpTexture&&t.push("  map_bump -imfchan z "+r.bumpTexture.name),r.opacityTexture&&t.push("  map_d "+r.opacityTexture.name),t.join("\n")},e}()},
1"../../../dev/serializers/src/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.ts":(e,t,r)=>{r.r(t),r.d(t,{EXT_mesh_gpu_instancing:()=>a});var n=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),i=r("babylonjs/Maths/math.vector"),s="EXT_mesh_gpu_instancing",a=function(){function e(e){this.name=s,this.enabled=!0,this.required=!1,this._wasUsed=!1,this._exporter=e}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.postExportNodeAsync=function(e,t,r,n,a){var o=this;return new Promise(function(e){if(t&&r instanceof i.Mesh&&r.hasThinInstances&&a){o._wasUsed=!0;for(var n=i.Vector3.Zero(),l=i.Quaternion.Identity(),u=i.Vector3.One(),c=r.thinInstanceGetWorldMatrices(),f=i.TmpVectors.Vector3[2],p=i.TmpVectors.Quaternion[1],h=i.TmpVectors.Vector3[3],_=!1,d=!1,m=!1,g=new Float32Array(3*r.thinInstanceCount),x=new Float32Array(4*r.thinInstanceCount),y=new Float32Array(3*r.thinInstanceCount),T=0,v=0;v<c.length;v++)c[v].decompose(h,p,f),g.set(f.asArray(),3*T),x.set(p.normalize().asArray(),4*T),y.set(h.asArray(),3*T),_=_||!f.equalsWithEpsilon(n),d=d||!p.equalsWithEpsilon(l),m=m||!h.equalsWithEpsilon(u),T++;var b={attributes:{}};_&&(b.attributes.TRANSLATION=o._buildAccessor(g,"VEC3",r.thinInstanceCount,a,5126)),d&&(b.attributes.ROTATION=o._buildAccessor(x,"VEC4",r.thinInstanceCount,a,5126)),m&&(b.attributes.SCALE=o._buildAccessor(y,"VEC3",r.thinInstanceCount,a,5126)),t.extensions=t.extensions||{},t.extensions[s]=b}e(t)})},e.prototype._buildAccessor=function(e,t,r,n,s){var a=n.getByteOffset();switch(s){case 5126:for(var o=0;o!=e.length;o++)n.setFloat32(e[o]);break;case 5120:for(var o=0;o!=e.length;o++)n.setByte(127*e[o]);break;case 5122:for(var o=0;o!=e.length;o++)n.setInt16(32767*e[o])}var l={buffer:0,byteOffset:a,byteLength:e.length*i.VertexBuffer.GetTypeByteLength(s)},u=this._exporter._bufferViews.length;this._exporter._bufferViews.push(l);var c=this._exporter._accessors.length;return this._exporter._accessors.push({bufferView:u,componentType:s,count:r,type:t,normalized:5120==s||5122==s}),c},e}();n._Exporter.RegisterExtension(s,function(e){return new a(e)})},
1"../../../dev/serializers/src/glTF/2.0/Extensions/KHR_lights_punctual.ts":(e,t,r)=>{r.r(t),r.d(t,{KHR_lights_punctual:()=>a});var n=r("babylonjs/Maths/math.vector"),i=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),s="KHR_lights_punctual",a=function(){function e(e){this.name=s,this.enabled=!0,this.required=!1,this._exporter=e}return e.prototype.dispose=function(){this._lights=null},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return!!this._lights},enumerable:!1,configurable:!0}),e.prototype.onExporting=function(){this._exporter._glTF.extensions[s]=this._lights},e.prototype.postExportNodeAsync=function(e,t,r,i){var a=this;return new Promise(function(o){if(t&&r instanceof n.ShadowLight){var l=void 0,u=r.getTypeID()==n.Light.LIGHTTYPEID_POINTLIGHT?"point":r.getTypeID()==n.Light.LIGHTTYPEID_DIRECTIONALLIGHT?"directional":r.getTypeID()==n.Light.LIGHTTYPEID_SPOTLIGHT?"spot":null;if(null==u)n.Logger.Warn("".concat(e,": Light ").concat(r.name," is not supported in ").concat(s));else{if(r.position.equalsToFloats(0,0,0)||(t.translation=r.position.asArray()),"point"!==u){var c=r.direction,f=-Math.atan2(c.z,c.x)+Math.PI/2,p=Math.sqrt(c.x*c.x+c.z*c.z),h=-Math.atan2(c.y,p),_=n.Quaternion.RotationYawPitchRoll(f+Math.PI,h,0);n.Quaternion.IsIdentity(_)||(t.rotation=_.asArray())}r.falloffType!==n.Light.FALLOFF_GLTF&&n.Logger.Warn("".concat(e,": Light falloff for ").concat(r.name," does not match the ").concat(s," specification!")),l={type:u},r.diffuse.equals(n.Color3.White())||(l.color=r.diffuse.asArray()),1!==r.intensity&&(l.intensity=r.intensity),r.range!==Number.MAX_VALUE&&(l.range=r.range),"spot"===u&&(r.angle!==Math.PI/2&&(null==l.spot&&(l.spot={}),l.spot.outerConeAngle=r.angle/2),0!==r.innerAngle&&(null==l.spot&&(l.spot={}),l.spot.innerConeAngle=r.innerAngle/2)),a._lights||(a._lights={lights:[]}),a._lights.lights.push(l);var d={light:a._lights.lights.length-1},m=r.parent;if(m&&1==m.getChildren().length){var g=a._exporter._nodes[i[m.uniqueId]];if(g){var x=n.Vector3.FromArrayToRef(g.translation||[0,0,0],0,n.TmpVectors.Vector3[0]),y=n.Quaternion.FromArrayToRef(g.rotation||[0,0,0,1],0,n.TmpVectors.Quaternion[0]),T=n.Vector3.FromArrayToRef(g.scale||[1,1,1],0,n.TmpVectors.Vector3[1]),v=n.Matrix.ComposeToRef(T,y,x,n.TmpVectors.Matrix[0]),b=n.Vector3.FromArrayToRef(t.translation||[0,0,0],0,n.TmpVectors.Vector3[2]),E=n.Quaternion.FromArrayToRef(t.rotation||[0,0,0,1],0,n.TmpVectors.Quaternion[1]),F=n.Matrix.ComposeToRef(n.Vector3.OneReadOnly,E,b,n.TmpVectors.Matrix[1]);v.multiplyToRef(F,F),F.decompose(T,y,x),x.equalsToFloats(0,0,0)?delete g.translation:g.translation=x.asArray(),n.Quaternion.IsIdentity(y)?delete g.rotation:g.rotation=y.asArray(),T.equalsToFloats(1,1,1)?delete g.scale:g.scale=T.asArray(),g.extensions||(g.extensions={}),g.extensions[s]=d,o(null);return}}t.extensions||(t.extensions={}),t.extensions[s]=d}}o(t)})},e}();i._Exporter.RegisterExtension(s,function(e){return new a(e)})},
1"../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_anisotropy.ts":(e,t,r)=>{r.r(t),r.d(t,{KHR_materials_anisotropy:()=>a});var n=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),i=r("babylonjs/Maths/math.vector"),s="KHR_materials_anisotropy",a=function(){function e(e){this.name=s,this.enabled=!0,this.required=!1,this._wasUsed=!1,this._exporter=e}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.postExportMaterialAdditionalTextures=function(e,t,r){var n=[];return r instanceof i.PBRBaseMaterial&&r.anisotropy.isEnabled&&!r.anisotropy.legacy?(r.anisotropy.texture&&n.push(r.anisotropy.texture),n):[]},e.prototype.postExportMaterialAsync=function(e,t,r){var n=this;return new Promise(function(e){if(r instanceof i.PBRBaseMaterial){if(!r.anisotropy.isEnabled||r.anisotropy.legacy)return void e(t);n._wasUsed=!0,t.extensions=t.extensions||{};var a=n._exporter._glTFMaterialExporter._getTextureInfo(r.anisotropy.texture),o={anisotropyStrength:r.anisotropy.intensity,anisotropyRotation:r.anisotropy.angle,anisotropyTexture:null!=a?a:void 0,hasTextures:function(){return null!==o.anisotropyTexture}};t.extensions[s]=o}e(t)})},e}();n._Exporter.RegisterExtension(s,function(e){return new a(e)})},
1"../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_clearcoat.ts":(e,t,r)=>{r.r(t),r.d(t,{KHR_materials_clearcoat:()=>a});var n=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),i=r("babylonjs/Maths/math.vector"),s="KHR_materials_clearcoat",a=function(){function e(e){this.name=s,this.enabled=!0,this.required=!1,this._wasUsed=!1,this._exporter=e}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.postExportMaterialAdditionalTextures=function(e,t,r){var n=[];return r instanceof i.PBRBaseMaterial&&r.clearCoat.isEnabled?(r.clearCoat.texture&&n.push(r.clearCoat.texture),!r.clearCoat.useRoughnessFromMainTexture&&r.clearCoat.textureRoughness&&n.push(r.clearCoat.textureRoughness),r.clearCoat.bumpTexture&&n.push(r.clearCoat.bumpTexture),n):[]},e.prototype.postExportMaterialAsync=function(e,t,r){var n=this;return new Promise(function(e){if(r instanceof i.PBRBaseMaterial){if(!r.clearCoat.isEnabled)return void e(t);n._wasUsed=!0,t.extensions=t.extensions||{};var a=n._exporter._glTFMaterialExporter._getTextureInfo(r.clearCoat.texture),o=void 0;o=r.clearCoat.useRoughnessFromMainTexture?n._exporter._glTFMaterialExporter._getTextureInfo(r.clearCoat.texture):n._exporter._glTFMaterialExporter._getTextureInfo(r.clearCoat.textureRoughness),r.clearCoat.isTintEnabled&&i.Tools.Warn("Clear Color tint is not supported for glTF export. Ignoring for: ".concat(r.name)),r.clearCoat.remapF0OnInterfaceChange&&i.Tools.Warn("Clear Color F0 remapping is not supported for glTF export. Ignoring for: ".concat(r.name));var l=n._exporter._glTFMaterialExporter._getTextureInfo(r.clearCoat.bumpTexture),u={clearcoatFactor:r.clearCoat.intensity,clearcoatTexture:null!=a?a:void 0,clearcoatRoughnessFactor:r.clearCoat.roughness,clearcoatRoughnessTexture:null!=o?o:void 0,clearcoatNormalTexture:null!=l?l:void 0,hasTextures:function(){return null!==u.clearcoatTexture||null!==u.clearcoatRoughnessTexture||null!==u.clearcoatRoughnessTexture}};t.extensions[s]=u}e(t)})},e}();n._Exporter.RegisterExtension(s,function(e){return new a(e)})},
1"../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_dispersion.ts":(e,t,r)=>{r.r(t),r.d(t,{KHR_materials_dispersion:()=>a});var n=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),i=r("babylonjs/Maths/math.vector"),s="KHR_materials_dispersion",a=function(){function e(){this.name=s,this.enabled=!0,this.required=!1,this._wasUsed=!1}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype._isExtensionEnabled=function(e){if(e.unlit)return!1;var t=e.subSurface;return!!t.isRefractionEnabled||!!t.isDispersionEnabled},e.prototype.postExportMaterialAsync=function(e,t,r){var n=this;return new Promise(function(e){if(r instanceof i.PBRMaterial&&n._isExtensionEnabled(r)){n._wasUsed=!0;var a=r.subSurface.dispersion;t.extensions=t.extensions||{},t.extensions[s]={dispersion:a}}e(t)})},e}();n._Exporter.RegisterExtension(s,function(){return new a})},
1"../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_emissive_strength.ts":(e,t,r)=>{r.r(t),r.d(t,{KHR_materials_emissive_strength:()=>a});var n=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),i=r("babylonjs/Maths/math.vector"),s="KHR_materials_emissive_strength",a=function(){function e(){this.name=s,this.enabled=!0,this.required=!1,this._wasUsed=!1}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.postExportMaterialAsync=function(e,t,r){var n=this;return new Promise(function(e){if(!(r instanceof i.PBRMaterial))return e(t);var a=r.emissiveColor.asArray(),o=Math.max.apply(Math,a);if(o>1){n._wasUsed=!0,t.extensions||(t.extensions={});var l={emissiveStrength:o};t.emissiveFactor=r.emissiveColor.scale(1/l.emissiveStrength).asArray(),t.extensions[s]=l}return e(t)})},e}();n._Exporter.RegisterExtension(s,function(e){return new a})},
1"../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_ior.ts":(e,t,r)=>{r.r(t),r.d(t,{KHR_materials_ior:()=>a});var n=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),i=r("babylonjs/Maths/math.vector"),s="KHR_materials_ior",a=function(){function e(){this.name=s,this.enabled=!0,this.required=!1,this._wasUsed=!1}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype._isExtensionEnabled=function(e){return!e.unlit&&void 0!=e.indexOfRefraction&&1.5!=e.indexOfRefraction},e.prototype.postExportMaterialAsync=function(e,t,r){var n=this;return new Promise(function(e){if(r instanceof i.PBRMaterial&&n._isExtensionEnabled(r)){n._wasUsed=!0;var a={ior:r.indexOfRefraction};t.extensions=t.extensions||{},t.extensions[s]=a}e(t)})},e}();n._Exporter.RegisterExtension(s,function(e){return new a})},
1"../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_iridescence.ts":(e,t,r)=>{r.r(t),r.d(t,{KHR_materials_iridescence:()=>a});var n=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),i=r("babylonjs/Maths/math.vector"),s="KHR_materials_iridescence",a=function(){function e(e){this.name=s,this.enabled=!0,this.required=!1,this._wasUsed=!1,this._exporter=e}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.postExportMaterialAdditionalTextures=function(e,t,r){var n=[];return r instanceof i.PBRBaseMaterial&&r.iridescence.isEnabled?(r.iridescence.texture&&n.push(r.iridescence.texture),r.iridescence.thicknessTexture&&r.iridescence.thicknessTexture!==r.iridescence.texture&&n.push(r.iridescence.thicknessTexture),n):[]},e.prototype.postExportMaterialAsync=function(e,t,r){var n=this;return new Promise(function(e){if(r instanceof i.PBRBaseMaterial){if(!r.iridescence.isEnabled)return void e(t);n._wasUsed=!0,t.extensions=t.extensions||{};var a=n._exporter._glTFMaterialExporter._getTextureInfo(r.iridescence.texture),o=n._exporter._glTFMaterialExporter._getTextureInfo(r.iridescence.thicknessTexture),l={iridescenceFactor:r.iridescence.intensity,iridescenceIor:r.iridescence.indexOfRefraction,iridescenceThicknessMinimum:r.iridescence.minimumThickness,iridescenceThicknessMaximum:r.iridescence.maximumThickness,iridescenceTexture:null!=a?a:void 0,iridescenceThicknessTexture:null!=o?o:void 0,hasTextures:function(){return null!==l.iridescenceTexture||null!==l.iridescenceThicknessTexture}};t.extensions[s]=l}e(t)})},e}();n._Exporter.RegisterExtension(s,function(e){return new a(e)})},
1"../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_sheen.ts":(e,t,r)=>{r.r(t),r.d(t,{KHR_materials_sheen:()=>a});var n=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),i=r("babylonjs/Maths/math.vector"),s="KHR_materials_sheen",a=function(){function e(e){this.name=s,this.enabled=!0,this.required=!1,this._wasUsed=!1,this._exporter=e}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.postExportMaterialAdditionalTextures=function(e,t,r){return r instanceof i.PBRMaterial&&r.sheen.isEnabled&&r.sheen.texture?[r.sheen.texture]:[]},e.prototype.postExportMaterialAsync=function(e,t,r){var n=this;return new Promise(function(e){var a,o,l,u;if(r instanceof i.PBRMaterial){if(!r.sheen.isEnabled)return void e(t);n._wasUsed=!0,null==t.extensions&&(t.extensions={});var c={sheenColorFactor:r.sheen.color.asArray(),sheenRoughnessFactor:null!=(a=r.sheen.roughness)?a:0,hasTextures:function(){return null!==c.sheenColorTexture||null!==c.sheenRoughnessTexture}};r.sheen.texture&&(c.sheenColorTexture=null!=(o=n._exporter._glTFMaterialExporter._getTextureInfo(r.sheen.texture))?o:void 0),r.sheen.textureRoughness&&!r.sheen.useRoughnessFromMainTexture?c.sheenRoughnessTexture=null!=(l=n._exporter._glTFMaterialExporter._getTextureInfo(r.sheen.textureRoughness))?l:void 0:r.sheen.texture&&r.sheen.useRoughnessFromMainTexture&&(c.sheenRoughnessTexture=null!=(u=n._exporter._glTFMaterialExporter._getTextureInfo(r.sheen.texture))?u:void 0),t.extensions[s]=c}e(t)})},e}();n._Exporter.RegisterExtension(s,function(e){return new a(e)})},
1"../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_specular.ts":(e,t,r)=>{r.r(t),r.d(t,{KHR_materials_specular:()=>a});var n=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),i=r("babylonjs/Maths/math.vector"),s="KHR_materials_specular",a=function(){function e(e){this.name=s,this.enabled=!0,this.required=!1,this._wasUsed=!1,this._exporter=e}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.postExportMaterialAdditionalTextures=function(e,t,r){var n=[];return r instanceof i.PBRMaterial&&this._isExtensionEnabled(r)&&(r.metallicReflectanceTexture&&n.push(r.metallicReflectanceTexture),r.reflectanceTexture&&n.push(r.reflectanceTexture)),n},e.prototype._isExtensionEnabled=function(e){return!e.unlit&&(void 0!=e.metallicF0Factor&&1!=e.metallicF0Factor||void 0!=e.metallicReflectanceColor&&!e.metallicReflectanceColor.equalsFloats(1,1,1)||this._hasTexturesExtension(e))},e.prototype._hasTexturesExtension=function(e){return null!=e.metallicReflectanceTexture||null!=e.reflectanceTexture},e.prototype.postExportMaterialAsync=function(e,t,r){var n=this;return new Promise(function(e){var a,o;if(r instanceof i.PBRMaterial&&n._isExtensionEnabled(r)){n._wasUsed=!0,t.extensions=t.extensions||{};var l=null!=(a=n._exporter._glTFMaterialExporter._getTextureInfo(r.metallicReflectanceTexture))?a:void 0,u=null!=(o=n._exporter._glTFMaterialExporter._getTextureInfo(r.reflectanceTexture))?o:void 0,c=1==r.metallicF0Factor?void 0:r.metallicF0Factor,f=r.metallicReflectanceColor.equalsFloats(1,1,1)?void 0:r.metallicReflectanceColor.asArray();t.extensions[s]={specularFactor:c,specularTexture:l,specularColorFactor:f,specularColorTexture:u,hasTextures:function(){return n._hasTexturesExtension(r)}}}e(t)})},e}();n._Exporter.RegisterExtension(s,function(e){return new a(e)})},
1"../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_transmission.ts":(e,t,r)=>{r.r(t),r.d(t,{KHR_materials_transmission:()=>a});var n=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),i=r("babylonjs/Maths/math.vector"),s="KHR_materials_transmission",a=function(){function e(e){this.name=s,this.enabled=!0,this.required=!1,this._wasUsed=!1,this._exporter=e}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.postExportMaterialAdditionalTextures=function(e,t,r){var n=[];return r instanceof i.PBRMaterial&&this._isExtensionEnabled(r)&&r.subSurface.thicknessTexture&&n.push(r.subSurface.thicknessTexture),n},e.prototype._isExtensionEnabled=function(e){if(e.unlit)return!1;var t=e.subSurface;return t.isRefractionEnabled&&void 0!=t.refractionIntensity&&0!=t.refractionIntensity||this._hasTexturesExtension(e)},e.prototype._hasTexturesExtension=function(e){return null!=e.subSurface.refractionIntensityTexture},e.prototype.postExportMaterialAsync=function(e,t,r){var n=this;return new Promise(function(e){var a;if(r instanceof i.PBRMaterial&&n._isExtensionEnabled(r)){n._wasUsed=!0;var o=r.subSurface,l=0===o.refractionIntensity?void 0:o.refractionIntensity,u=null!=(a=n._exporter._glTFMaterialExporter._getTextureInfo(o.refractionIntensityTexture))?a:void 0;t.extensions=t.extensions||{},t.extensions[s]={transmissionFactor:l,transmissionTexture:u,hasTextures:function(){return n._hasTexturesExtension(r)}}}e(t)})},e}();n._Exporter.RegisterExtension(s,function(e){return new a(e)})},
1"../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_unlit.ts":(e,t,r)=>{r.r(t),r.d(t,{KHR_materials_unlit:()=>a});var n=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),i=r("babylonjs/Maths/math.vector"),s="KHR_materials_unlit",a=function(){function e(){this.name=s,this.enabled=!0,this.required=!1,this._wasUsed=!1}return Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){},e.prototype.postExportMaterialAsync=function(e,t,r){var n=this;return new Promise(function(e){var a=!1;r instanceof i.PBRMaterial?a=r.unlit:r instanceof i.StandardMaterial&&(a=r.disableLighting),a&&(n._wasUsed=!0,null==t.extensions&&(t.extensions={}),t.extensions[s]={}),e(t)})},e}();n._Exporter.RegisterExtension(s,function(){return new a})},
1"../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_volume.ts":(e,t,r)=>{r.r(t),r.d(t,{KHR_materials_volume:()=>a});var n=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),i=r("babylonjs/Maths/math.vector"),s="KHR_materials_volume",a=function(){function e(e){this.name=s,this.enabled=!0,this.required=!1,this._wasUsed=!1,this._exporter=e}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.postExportMaterialAdditionalTextures=function(e,t,r){var n=[];return r instanceof i.PBRMaterial&&this._isExtensionEnabled(r)&&r.subSurface.thicknessTexture&&n.push(r.subSurface.thicknessTexture),n},e.prototype._isExtensionEnabled=function(e){if(e.unlit)return!1;var t=e.subSurface;return(!!t.isRefractionEnabled||!!t.isTranslucencyEnabled)&&(void 0!=t.maximumThickness&&0!=t.maximumThickness||void 0!=t.tintColorAtDistance&&t.tintColorAtDistance!=1/0||void 0!=t.tintColor&&t.tintColor!=i.Color3.White()||this._hasTexturesExtension(e))},e.prototype._hasTexturesExtension=function(e){return null!=e.subSurface.thicknessTexture},e.prototype.postExportMaterialAsync=function(e,t,r){var n=this;return new Promise(function(e){var a;if(r instanceof i.PBRMaterial&&n._isExtensionEnabled(r)){n._wasUsed=!0;var o=r.subSurface,l=0==o.maximumThickness?void 0:o.maximumThickness,u=null!=(a=n._exporter._glTFMaterialExporter._getTextureInfo(o.thicknessTexture))?a:void 0,c=o.tintColorAtDistance==1/0?void 0:o.tintColorAtDistance,f=o.tintColor.equalsFloats(1,1,1)?void 0:o.tintColor.asArray();t.extensions=t.extensions||{},t.extensions[s]={thicknessFactor:l,thicknessTexture:u,attenuationDistance:c,attenuationColor:f,hasTextures:function(){return n._hasTexturesExtension(r)}}}e(t)})},e}();n._Exporter.RegisterExtension(s,function(e){return new a(e)})},
1"../../../dev/serializers/src/glTF/2.0/Extensions/KHR_texture_transform.ts":(e,t,r)=>{r.r(t),r.d(t,{KHR_texture_transform:()=>a});var n=r("babylonjs/Maths/math.vector"),i=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),s="KHR_texture_transform",a=function(){function e(){this.name=s,this.enabled=!0,this.required=!1,this._wasUsed=!1}return e.prototype.dispose=function(){},Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.postExportTexture=function(e,t,r){if(r&&(0===r.uAng&&0===r.wAng&&0===r.vAng||0===r.uRotationCenter&&0===r.vRotationCenter)){var n={},i=!1;(0!==r.uOffset||0!==r.vOffset)&&(n.offset=[r.uOffset,r.vOffset],i=!0),(1!==r.uScale||1!==r.vScale)&&(n.scale=[r.uScale,r.vScale],i=!0),0!==r.wAng&&(n.rotation=-r.wAng,i=!0),0!==r.coordinatesIndex&&(n.texCoord=r.coordinatesIndex,i=!0),i&&(this._wasUsed=!0,t.extensions||(t.extensions={}),t.extensions[s]=n)}},e.prototype.preExportTextureAsync=function(e,t){return new Promise(function(r,i){if(!t.getSce
1ne())return void i("".concat(e,': "scene" is not defined for Babylon texture ').concat(t.name,"!"));0!==t.uAng||0!==t.vAng?(n.Tools.Warn("".concat(e,": Texture ").concat(t.name," with rotation in the u or v axis is not supported in glTF.")),r(null)):0!==t.wAng&&(0!==t.uRotationCenter||0!==t.vRotationCenter)?(n.Tools.Warn("".concat(e,": Texture ").concat(t.name," with rotation not centered at the origin cannot be exported with ").concat(s)),r(null)):r(t)})},e}();i._Exporter.RegisterExtension(s,function(){return new a})},
1"../../../dev/serializers/src/glTF/2.0/Extensions/index.ts":(e,t,r)=>{r.r(t),r.d(t,{EXT_mesh_gpu_instancing:()=>d.EXT_mesh_gpu_instancing,KHR_lights_punctual:()=>i.KHR_lights_punctual,KHR_materials_anisotropy:()=>o.KHR_materials_anisotropy,KHR_materials_clearcoat:()=>s.KHR_materials_clearcoat,KHR_materials_dispersion:()=>h.KHR_materials_dispersion,KHR_materials_emissive_strength:()=>m.KHR_materials_emissive_strength,KHR_materials_ior:()=>c.KHR_materials_ior,KHR_materials_iridescence:()=>a.KHR_materials_iridescence,KHR_materials_sheen:()=>l.KHR_materials_sheen,KHR_materials_specular:()=>f.KHR_materials_specular,KHR_materials_transmission:()=>_.KHR_materials_transmission,KHR_materials_unlit:()=>u.KHR_materials_unlit,KHR_materials_volume:()=>p.KHR_materials_volume,KHR_texture_transform:()=>n.KHR_texture_transform});var n=r("../../../dev/serializers/src/glTF/2.0/Extensions/KHR_texture_transform.ts"),i=r("../../../dev/serializers/src/glTF/2.0/Extensions/KHR_lights_punctual.ts"),s=r("../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_clearcoat.ts"),a=r("../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_iridescence.ts"),o=r("../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_anisotropy.ts"),l=r("../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_sheen.ts"),u=r("../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_unlit.ts"),c=r("../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_ior.ts"),f=r("../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_specular.ts"),p=r("../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_volume.ts"),h=r("../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_dispersion.ts"),_=r("../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_transmission.ts"),d=r("../../../dev/serializers/src/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.ts"),m=r("../../../dev/serializers/src/glTF/2.0/Extensions/KHR_materials_emissive_strength.ts")},
1"../../../dev/serializers/src/glTF/2.0/glTFAnimation.ts":(e,t,r)=>{r.r(t),r.d(t,{_GLTFAnimation:()=>o});var n,i,s=r("babylonjs/Maths/math.vector"),a=r("../../../dev/serializers/src/glTF/2.0/glTFUtilities.ts");(n=i||(i={}))[n.INTANGENT=0]="INTANGENT",n[n.OUTTANGENT=1]="OUTTANGENT";var o=function(){function e(){}return e._IsTransformable=function(e){return e&&(e instanceof s.TransformNode||e instanceof s.Camera||e instanceof s.Light)},e._CreateNodeAnimation=function(t,r,n,i,a){if(this._IsTransformable(t)){var o=[],l=[],u=r.getKeys(),c=e._CalculateMinMaxKeyFrames(u),f=e._DeduceInterpolation(u,n,i),p=f.interpolationType,h=f.shouldBakeAnimation;if(h?e._CreateBakedAnimation(t,r,n,c.min,c.max,r.framePerSecond,a,o,l,c,i):"LINEAR"===p||"STEP"===p?e._CreateLinearOrStepAnimation(t,r,n,o,l,i):"CUBICSPLINE"===p?e._CreateCubicSplineAnimation(t,r,n,o,l,i):e._CreateBakedAnimation(t,r,n,c.min,c.max,r.framePerSecond,a,o,l,c,i),o.length&&l.length)return{inputs:o,outputs:l,samplerInterpolation:p,inputsMin:h?c.min:s.Tools.FloatRound(c.min/r.framePerSecond),inputsMax:h?c.max:s.Tools.FloatRound(c.max/r.framePerSecond)}}return null},e._DeduceAnimationInfo=function(e){var t=null,r="VEC3",n=!1,i=e.targetProperty.split(".");switch(i[0]){case"scaling":t="scale";break;case"position":t="translation";break;case"rotation":r="VEC4",t="rotation";break;case"rotationQuaternion":r="VEC4",n=!0,t="rotation";break;case"influence":r="SCALAR",t="weights";break;default:s.Tools.Error("Unsupported animatable property ".concat(i[0]))}return t?{animationChannelTargetPath:t,dataAccessorType:r,useQuaternion:n}:(s.Tools.Error("animation channel target path and data accessor type could be deduced"),null)},e._CreateNodeAnimationFromNodeAnimations=function(t,r,n,i,s,a,o,l,u,c){var f;if(e._IsTransformable(t)&&t.animations)for(var p=0,h=t.animations;p<h.length;p++){var _=h[p];if(!c||c(_)){var d=e._DeduceAnimationInfo(_);d&&(f={name:_.name,samplers:[],channels:[]},e._AddAnimation("".concat(_.name),_.hasRunningRuntimeAnimations?r:f,t,_,d.dataAccessorType,d.animationChannelTargetPath,i,a,o,l,d.useQuaternion,u),f.samplers.length&&f.channels.length&&n.push(f))}}},e._CreateMorphTargetAnimationFromMorphTargetAnimations=function(t,r,n,i,a,o,l,u,c,f){var p;if(t instanceof s.Mesh){var h=t.morphTargetManager;if(h)for(var _=0;_<h.numTargets;++_)for(var d=h.getTarget(_),m=0,g=d.animations;m<g.length;m++){var x=g[m];if(!f||f(x)){for(var y=new s.Animation("".concat(x.name),"influence",x.framePerSecond,x.dataType,x.loopMode,x.enableBlending),T=[],v=x.getKeys(),b=0;b<v.length;++b)for(var E=v[b],F=0;F<h.numTargets;++F)F==_?T.push(E):T.push({frame:E.frame,value:0});y.setKeys(T);var A=e._DeduceAnimationInfo(y);A&&(p={name:y.name,samplers:[],channels:[]},e._AddAnimation(x.name,x.hasRunningRuntimeAnimations?r:p,t,y,A.dataAccessorType,A.animationChannelTargetPath,i,o,l,u,A.useQuaternion,c,h.numTargets),p.samplers.length&&p.channels.length&&n.push(p))}}}},e._CreateNodeAndMorphAnimationFromAnimationGroups=function(t,r,n,i,a,o,l,u){if(t.animationGroups)for(var c,f,p=t.animationGroups,h=function(p){var h=new Map,d=new Map,m=new Set,g=p.to-p.from;f={name:p.name,channels:[],samplers:[]};for(var x=0;x<p.targetedAnimations.length;++x)!function(r){var g=p.targetedAnimations[r],x=g.target,y=g.animation;if(!u||u(y)){if(_._IsTransformable(x)||1===x.length&&_._IsTransformable(x[0])){var T=e._DeduceAnimationInfo(g.animation);if(T){var v=_._IsTransformable(x)?x:_._IsTransformable(x[0])?x[0]:null;v&&e._AddAnimation("".concat(y.name),f,v,y,T.dataAccessorType,T.animationChannelTargetPath,n,i,a,o,T.useQuaternion,l)}}else if(x instanceof s.MorphTarget||1===x.length&&x[0]instanceof s.MorphTarget){var T=e._DeduceAnimationInfo(g.animation);if(T){var b=x instanceof s.MorphTarget?x:x[0];if(b){var E=t.morphTargetManagers.find(function(e){for(var t=0;t<e.numTargets;++t)if(e.getTarget(t)===b)return!0;return!1});if(E){var F=t.meshes.find(function(e){return e.morphTargetManager===E});F&&(h.has(F)||h.set(F,new Map),null==(c=h.get(F))||c.set(b,y),m.add(F),d.set(F,y))}}}}}}(x);m.forEach(function(t){for(var r=t.morphTargetManager,u=null,c=[],_=d.get(t).getKeys(),m=_.length,x=0;x<m;++x)for(var y=0;y<r.numTargets;++y){var T=r.getTarget(y),v=h.get(t);if(v){var b=v.get(T);b?(u||(u=new s.Animation("".concat(p.name,"_").concat(t.name,"_MorphWeightAnimation"),"influence",b.framePerSecond,s.Animation.ANIMATIONTYPE_FLOAT,b.loopMode,b.enableBlending)),c.push(b.getKeys()[x])):c.push({frame:p.from+g/m*x,value:T.influence,inTangent:_[0].inTangent?0:void 0,outTangent:_[0].outTangent?0:void 0})}}u.setKeys(c);var E=e._DeduceAnimationInfo(u);E&&e._AddAnimation("".concat(p.name,"_").concat(t.name,"_MorphWeightAnimation"),f,t,u,E.dataAccessorType,E.animationChannelTargetPath,n,i,a,o,E.useQuaternion,l,
1null==r?void 0:r.numTargets)}),f.channels.length&&f.samplers.length&&r.push(f)},_=this,d=0;d<p.length;d++)h(p[d])},e._AddAnimation=function(t,r,n,i,s,o,l,u,c,f,p,h,_){var d,m,g,x,y,T,v,b=e._CreateNodeAnimation(n,i,o,p,h);if(b){if(_){for(var E=0,F=0,A=[];b.inputs.length>0;)F=b.inputs.shift(),E%_==0&&A.push(F),E++;b.inputs=A}var R=l[n.uniqueId],M=4*b.inputs.length;d=a._GLTFUtilities._CreateBufferView(0,u.getByteOffset(),M,void 0,"".concat(t,"  keyframe data view")),c.push(d),b.inputs.forEach(function(e){u.setFloat32(e)}),m=a._GLTFUtilities._CreateAccessor(c.length-1,"".concat(t,"  keyframes"),"SCALAR",5126,b.inputs.length,null,[b.inputsMin],[b.inputsMax]),f.push(m),g=f.length-1,y=b.outputs.length,M=4*a._GLTFUtilities._GetDataAccessorElementCount(s)*b.outputs.length,d=a._GLTFUtilities._CreateBufferView(0,u.getByteOffset(),M,void 0,"".concat(t,"  data view")),c.push(d),b.outputs.forEach(function(e){e.forEach(function(e){u.setFloat32(e)})}),m=a._GLTFUtilities._CreateAccessor(c.length-1,"".concat(t,"  data"),s,5126,y,null,null,null),f.push(m),x=f.length-1,T={interpolation:b.samplerInterpolation,input:g,output:x},r.samplers.push(T),v={sampler:r.samplers.length-1,target:{node:R,path:o}},r.channels.push(v)}},e._CreateBakedAnimation=function(t,r,n,i,a,o,l,u,c,f,p){var h,_,d=s.Quaternion.Identity(),m=null,g=null,x=null,y=null,T=null,v=null;f.min=s.Tools.FloatRound(i/o);for(var b=r.getKeys(),E=0,F=b.length;E<F;++E){if(v=null,x=b[E],E+1<F)if(y=b[E+1],x.value.equals&&x.value.equals(y.value)||x.value===y.value)if(0!==E)continue;else v=x.frame;else v=y.frame;else{if(T=b[E-1],x.value.equals&&x.value.equals(T.value)||x.value===T.value)continue;v=a}if(v){for(var A=x.frame;A<=v;A+=l)if((_=s.Tools.FloatRound(A/o))!==m){m=_,g=_;var R={key:0,repeatCount:0,loopMode:r.loopMode};h=r._interpolate(A,R),e._SetInterpolatedValue(t,h,_,r,n,d,u,c,p)}}}g&&(f.max=g)},e._ConvertFactorToVector3OrQuaternion=function(t,r,n,i,a){var o=e._GetBasePositionRotationOrScale(r,i,a),l=n.targetProperty.split("."),u=l?l[1]:"",c=a?s.Quaternion.FromArray(o).normalize():s.Vector3.FromArray(o);switch(u){case"x":case"y":case"z":c[u]=t;break;case"w":c.w=t;break;default:s.Tools.Error('glTFAnimation: Unsupported component name "'.concat(u,'"!'))}return c},e._SetInterpolatedValue=function(e,t,r,n,i,a,o,l,u){var c;if(o.push(r),"weights"===i)return void l.push([t]);n.dataType===s.Animation.ANIMATIONTYPE_FLOAT&&(t=this._ConvertFactorToVector3OrQuaternion(t,e,n,i,u)),"rotation"===i?(u?a=t:(c=t,s.Quaternion.RotationYawPitchRollToRef(c.y,c.x,c.z,a)),l.push(a.asArray())):(c=t,l.push(c.asArray()))},e._CreateLinearOrStepAnimation=function(t,r,n,i,s,a){for(var o=0,l=r.getKeys();o<l.length;o++){var u=l[o];i.push(u.frame/r.framePerSecond),e._AddKeyframeValue(u,r,s,n,t,a)}},e._CreateCubicSplineAnimation=function(t,r,n,s,a,o){r.getKeys().forEach(function(l){s.push(l.frame/r.framePerSecond),e._AddSplineTangent(i.INTANGENT,a,n,"CUBICSPLINE",l,o),e._AddKeyframeValue(l,r,a,n,t,o),e._AddSplineTangent(i.OUTTANGENT,a,n,"CUBICSPLINE",l,o)})},e._GetBasePositionRotationOrScale=function(e,t,r){var n;if("rotation"===t)if(r){var i=e.rotationQuaternion;n=(null!=i?i:s.Quaternion.Identity()).asArray()}else{var a=e.rotation;n=(null!=a?a:s.Vector3.Zero()).asArray()}else if("translation"===t){var o=e.position;n=(null!=o?o:s.Vector3.Zero()).asArray()}else{var l=e.scaling;n=(null!=l?l:s.Vector3.One()).asArray()}return n},e._AddKeyframeValue=function(e,t,r,n,i,a){var o,l=t.dataType;if(l===s.Animation.ANIMATIONTYPE_VECTOR3){var u=e.value.asArray();if("rotation"===n){var c=s.Vector3.FromArray(u);u=s.Quaternion.RotationYawPitchRoll(c.y,c.x,c.z).asArray()}r.push(u)}else if(l===s.Animation.ANIMATIONTYPE_FLOAT){if("weights"===n)r.push([e.value]);else if(o=this._ConvertFactorToVector3OrQuaternion(e.value,i,t,n,a)){if("rotation"===n){var f=a?o:s.Quaternion.RotationYawPitchRoll(o.y,o.x,o.z).normalize();r.push(f.asArray())}r.push(o.asArray())}}else l===s.Animation.ANIMATIONTYPE_QUATERNION?r.push(e.value.normalize().asArray()):s.Tools.Error("glTFAnimation: Unsupported key frame values for animation!")},e._DeduceInterpolation=function(e,t,r){var n,i,a=!1;if("rotation"===t&&!r)return{interpolationType:"LINEAR",shouldBakeAnimation:!0};for(var o=0,l=e.length;o<l;++o)if((i=e[o]).inTangent||i.outTangent)if(n){if("CUBICSPLINE"!==n){n="LINEAR",a=!0;break}}else n="CUBICSPLINE";else if(n){if("CUBICSPLINE"===n||i.interpolation&&i.interpolation===s.AnimationKeyInterpolation.STEP&&"STEP"!==n){n="LINEAR",a=!0;break}}else n=i.interpolation&&i.interpolation===s.AnimationKeyInterpolation.STEP?"STEP":"LINEAR";return n||(n="LINEAR"),{interpolationType:n,shouldBakeAnimation:a}},e._AddSplineTangent=function(e,t,r,n,a,o){var l,u=e===i.INTANGENT?a.inTangent:a.outTangent;"CUBICSPLINE"===n&&(l="rotation"===r?u?o?u.asArray():s.Quaternion.RotationYawPitchRoll(u.y,u.x,u.z).asArray():[0,0,0,0]:"weights"===r?u?[u]:[0]:u?u.asArray():[0,0,0],t.push(l))},e._CalculateMinMaxKeyFrames=function(e){var t=1/0,r=-1/0;return e.forEach(function(e){t=Math.min(t,e.frame),r=Math.max(r,e.frame)}),{min:t,max:r}},e}()},
1"../../../dev/serializers/src/glTF/2.0/glTFData.ts":(e,t,r)=>{r.r(t),r.d(t,{GLTFData:()=>n});var n=function(){function e(){this.glTFFiles={}}return e.prototype.downloadFiles=function(){function e(e,t){return -1!==e.indexOf(t,e.length-t.length)}for(var t in this.glTFFiles){var r=document.createElement("a");document.body.appendChild(r),r.setAttribute("type","hidden"),r.download=t;var n=this.glTFFiles[t],i=void 0;e(t,".glb")?i={type:"model/gltf-binary"}:e(t,".bin")?i={type:"application/octet-stream"}:e(t,".gltf")?i={type:"model/gltf+json"}:e(t,".jpeg")||e(t,".jpg")?i={type:"image/jpeg"}:e(t,".png")&&(i={type:"image/png"}),r.href=window.URL.createObjectURL(new Blob([n],i)),r.click()}},e}()},
1"../../../dev/serializers/src/glTF/2.0/glTFExporter.ts":(e,t,r)=>{r.r(t),r.d(t,{_BinaryWriter:()=>p,_Exporter:()=>f});var n=r("../../../../node_modules/tslib/tslib.es6.mjs"),i=r("babylonjs/Maths/math.vector"),s=r("../../../dev/serializers/src/glTF/2.0/glTFMaterialExporter.ts"),a=r("../../../dev/serializers/src/glTF/2.0/glTFUtilities.ts"),o=r("../../../dev/serializers/src/glTF/2.0/glTFData.ts"),l=r("../../../dev/serializers/src/glTF/2.0/glTFAnimation.ts"),u=i.Matrix.Compose(new i.Vector3(-1,1,1),i.Quaternion.Identity(),i.Vector3.Zero()),c=new i.Quaternion(0,1,0,0),f=function(){function e(e,t){this._extensions={},this._glTF={asset:{generator:"Babylon.js v".concat(i.Engine.Version),version:"2.0"}},(e=e||i.EngineStore.LastCreatedScene)&&(this._babylonScene=e,this._bufferViews=[],this._accessors=[],this._meshes=[],this._scenes=[],this._cameras=[],this._nodes=[],this._images=[],this._materials=[],this._materialMap=[],this._textures=[],this._samplers=[],this._skins=[],this._animations=[],this._imageData={},this._orderedImageData=[],this._options=t||{},this._animationSampleRate=this._options.animationSampleRate||1/60,this._glTFMaterialExporter=new s._GLTFMaterialExporter(this),this._loadExtensions())}return e.prototype._applyExtension=function(e,t,r,n){var i=this;if(r>=t.length)return Promise.resolve(e);var s=n(t[r],e);return s?s.then(function(e){return i._applyExtension(e,t,r+1,n)}):this._applyExtension(e,t,r+1,n)},e.prototype._applyExtensions=function(t,r){for(var n=[],i=0,s=e._ExtensionNames;i<s.length;i++){var a=s[i];n.push(this._extensions[a])}return this._applyExtension(t,n,0,r)},e.prototype._extensionsPreExportTextureAsync=function(e,t,r){return this._applyExtensions(t,function(t,n){return t.preExportTextureAsync&&t.preExportTextureAsync(e,n,r)})},e.prototype._extensionsPostExportMeshPrimitiveAsync=function(e,t,r,n){return this._applyExtensions(t,function(t,i){return t.postExportMeshPrimitiveAsync&&t.postExportMeshPrimitiveAsync(e,i,r,n)})},e.prototype._extensionsPostExportNodeAsync=function(e,t,r,n,i){return this._applyExtensions(t,function(t,s){return t.postExportNodeAsync&&t.postExportNodeAsync(e,s,r,n,i)})},e.prototype._extensionsPostExportMaterialAsync=function(e,t,r){return this._applyExtensions(t,function(t,n){return t.postExportMaterialAsync&&t.postExportMaterialAsync(e,n,r)})},e.prototype._extensionsPostExportMaterialAdditionalTextures=function(t,r,n){for(var i=[],s=0,a=e._ExtensionNames;s<a.length;s++){var o=a[s],l=this._extensions[o];l.postExportMaterialAdditionalTextures&&i.push.apply(i,l.postExportMaterialAdditionalTextures(t,r,n))}return i},e.prototype._extensionsPostExportTextures=function(t,r,n){for(var i=0,s=e._ExtensionNames;i<s.length;i++){var a=s[i],o=this._extensions[a];o.postExportTexture&&o.postExportTexture(t,r,n)}},e.prototype._forEachExtensions=function(t){for(var r=0,n=e._ExtensionNames;r<n.length;r++){var i=n[r],s=this._extensions[i];s.enabled&&t(s)}},e.prototype._extensionsOnExporting=function(){var e=this;this._forEachExtensions(function(t){t.wasUsed&&(null==e._glTF.extensionsUsed&&(e._glTF.extensionsUsed=[]),-1===e._glTF.extensionsUsed.indexOf(t.name)&&e._glTF.extensionsUsed.push(t.name),t.required&&(null==e._glTF.extensionsRequired&&(e._glTF.extensionsRequired=[]),-1===e._glTF.extensionsRequired.indexOf(t.name)&&e._glTF.extensionsRequired.push(t.name)),null==e._glTF.extensions&&(e._glTF.extensions={}),t.onExporting&&t.onExporting())})},e.prototype._loadExtensions=function(){for(var t=0,r=e._ExtensionNames;t<r.length;t++){var n=r[t],i=e._ExtensionFactories[n](this);this._extensions[n]=i}},e.prototype.dispose=function(){for(var e in this._extensions)this._extensions[e].dispose()},Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),e.RegisterExtension=function(t,r){e.UnregisterExtension(t)&&i.Tools.Warn("Extension with the name ".concat(t," already exists")),e._ExtensionFactories[t]=r,e._ExtensionNames.push(t)},e.UnregisterExtension=function(t){if(!e._ExtensionFactories[t])return!1;delete e._ExtensionFactories[t];var r=e._ExtensionNames.indexOf(t);return -1!==r&&e._ExtensionNames.splice(r,1),!0},e.prototype._reorderIndicesBasedOnPrimitiveMode=function(e,t,r,n,s){switch(t){case i.Material.TriangleFillMode:n||(n=0);for(var a=e.indexStart,o=e.indexStart+e.indexCount;a<o;a+=3){var l=n+4*a,u=s.getUInt32(l+4),c=s.getUInt32(l+8);s.setUInt32(c,l+4),s.setUInt32(u,l+8)}break;case i.Material.TriangleFanDrawMode:for(var a=e.indexStart+e.indexCount-1,f=e.indexStart;a>=f;--a)s.setUInt32(r[a],n),n+=4;break;case i.Material.TriangleStripDrawMode:e.indexCount>=3&&(s.setUInt32(r[e.indexStart+2],n+4),s.setUInt32(r[e.indexStart+1],n+8))}},e.prototype._reorderVertexAttributeDataBasedOnPrimitiveMode=function(e,t,r,n,s,a){switch(t){case i.Material.TriangleFillMode:this._reorderTriangleFillMode(e,r,n,s,a);break;case i.Material.TriangleStripDrawMode:this._reorderTriangleStripDrawMode(e,r,n,s,a);break;case i.Material.TriangleFanDrawMode:this._reorderTriangleFanMode(e,r,n,s,a)}},e.prototype._reorderTriangleFillMode=function(e,t,r,n,s){var a=this._getVertexBufferFromMesh(t,e.getMesh());if(a){var o=a.byteStride/i.VertexBuffer.GetTypeByteLength(a.type);if(e.verticesCount%3!=0)i.Tools.Error("The submesh vertices for the triangle fill mode is not divisible by 3!");else{var l=[],u=0;switch(t){case i.VertexBuffer.PositionKind:case i.VertexBuffer.NormalKind:for(var c=e.verticesStart;c<e.verticesStart+e.verticesCount;c+=3)u=c*o,l.push(i.Vector3.FromArray(r,u)),l.push(i.Vector3.FromArray(r,u+2*o)),l.push(i.Vector3.FromArray(r,u+o));break;case i.VertexBuffer.TangentKind:for(var c=e.verticesStart;c<e.verticesStart+e.verticesCount;c+=3)u=c*o,l.push(i.Vector4.FromArray(r,u)),l.push(i.Vector4.FromArray(r,u+2*o)),l.push(i.Vector4.FromArray(r,u+o));break;case i.VertexBuffer.ColorKind:for(var f=a.getSize(),c=e.verticesStart;c<e.verticesStart+e.verticesCount;c+=f)u=c*o,4===f?(l.push(i.Vector4.FromArray(r,u)),l.push(i.Vector4.FromArray(r,u+2*o)),l.push(i.Vector4.FromArray(r,u+o))):(l.push(i.Vector3.FromArray(r,u)),l.push(i.Vector3.FromArray(r,u+2*o)),l.push(i.Vector3.FromArray(r,u+o)));break;case i.VertexBuffer.UVKind:case i.VertexBuffer.UV2Kind:for(var c=e.verticesStart;c<e.verticesStart+e.verticesCount;c+=3)u=c*o,l.push(i.Vector2.FromArray(r,u)),l.push(i.Vector2.FromArray(r,u+2*o)),l.push(i.Vector2.FromArray(r,u+o));break;default:i.Tools.Error("Unsupported Vertex Buffer type: ".concat(t))}this._writeVertexAttributeData(l,n,t,s)}}else i.Tools.Warn("reorderTriangleFillMode: Vertex Buffer Kind ".concat(t," not present!"))},e.prototype._reorderTriangleStripDrawMode=function(e,t,r,n,s){var a=this._getVertexBufferFromMesh(t,e.getMesh());if(a){var o=a.byteStride/i.VertexBuffer.GetTypeByteLength(a.type),l=[],u=0;switch(t){case i.VertexBuffer.PositionKind:case i.VertexBuffer.NormalKind:u=e.verticesStart,l.push(i.Vector3.FromArray(r,u+2*o)),l.push(i.Vector3.FromArray(r,u+o));break;case i.VertexBuffer.TangentKind:for(var c=e.verticesStart+e.verticesCount-1;c>=e.verticesStart;--c)u=c*o,l.push(i.Vector4.FromArray(r,u));break;case i.VertexBuffer.ColorKind:for(var c=e.verticesStart+e.verticesCount-1;c>=e.verticesStart;--c)u=c*o,4===a.getSize()?l.push(i.Vector4.FromArray(r,u)):l.push(i.Vector3.FromArray(r,u));break;case i.VertexBuffer.UVKind:case i.VertexBuffer.UV2Kind:for(var c=e.verticesStart+e.verticesCount-1;c>=e.verticesStart;--c)u=c*o,l.push(i.Vector2.FromArray(r,u));break;default:i.Tools.Error("Unsupported Vertex Buffer type: ".concat(t))}this._writeVertexAttributeData(l,n+12,t,s)}else i.Tools.Warn("reorderTriangleStripDrawMode: Vertex buffer kind ".concat(t," not present!"))},e.prototype._reorderTriangleFanMode=function(e,t,r,n,s){var a=this._getVertexBufferFromMesh(t,e.getMesh());if(a){var o=a.byteStride/i.VertexBuffer.GetTypeByteLength(a.type),l=[],u=0;switch(t){case i.VertexBuffer.PositionKind:case i.VertexBuffer.NormalKind:for(var c=e.verticesStart+e.verticesCount-1;c>=e.verticesStart;--c)u=c*o,l.push(i.Vector3.FromArray(r,u));break;case i.VertexBuffer.TangentKind:for(var c=e.verticesStart+e.verticesCount-1;c>=e.verticesStart;--c)u=c*o,l.push(i.Vector4.FromArray(r,u));break;case i.VertexBuffer.ColorKind:for(var c=e.verticesStart+e.verticesCount-1;c>=e.verticesStart;--c)u=c*o,l.push(i.Vector4.FromArray(r,u)),4===a.getSize()?l.push(i.Vector4.FromArray(r,u)):l.push(i.Vector3.FromArray(r,u));break;case i.VertexBuffer.UVKind:case i.VertexBuffer.UV2Kind:for(var c=e.verticesStart+e.verticesCount-1;c>=e.verticesStart;--c)u=c*o,l.push(i.Vector2.FromArray(r,u));break;default:i.Tools.Error("Unsupported Vertex Buffer type: ".concat(t))}this._writeVertexAttributeData(l,n,t,s)}else i.Tools.Warn("reorderTriangleFanMode: Vertex buffer kind ".concat(t," not present!"))},e.prototype._writeVertexAttributeData=function(e,t,r,n){for(var s=0;s<e.length;s++){var o=e[s];r===i.VertexBuffer.NormalKind?o.normalize():r===i.VertexBuffer.TangentKind&&o instanceof i.Vector4&&a._GLTFUtilities._NormalizeTangentFromRef(o);for(var l=0,u=o.asArray();l<u.length;l++){var c=u[l];n.setFloat32(c,t),t+=4}}},e.prototype._writeAttributeData=function(e,t,r,n,s,o){var l,u,c=[];
1switch(e){case i.VertexBuffer.PositionKind:for(var f=0,p=r.length/n;f<p;++f){l=f*n;var h=i.Vector3.FromArray(r,l);c.push(h.asArray())}break;case i.VertexBuffer.NormalKind:for(var f=0,_=r.length/n;f<_;++f){l=f*n;var h=i.Vector3.FromArray(r,l);c.push(h.normalize().asArray())}break;case i.VertexBuffer.TangentKind:for(var f=0,d=r.length/n;f<d;++f){l=f*n;var h=i.Vector4.FromArray(r,l);a._GLTFUtilities._NormalizeTangentFromRef(h),c.push(h.asArray())}break;case i.VertexBuffer.ColorKind:for(var m=o.material,g=!m||"StandardMaterial"===m.getClassName(),h=3===n?new i.Color3:new i.Color4,x=this._babylonScene.getEngine().useExactSrgbConversions,f=0,y=r.length/n;f<y;++f)l=f*n,3===n?i.Color3.FromArrayToRef(r,l,h):i.Color4.FromArrayToRef(r,l,h),g&&h.toLinearSpaceToRef(h,x),c.push(h.asArray());break;case i.VertexBuffer.UVKind:case i.VertexBuffer.UV2Kind:for(var f=0,T=r.length/n;f<T;++f){l=f*n;var h=i.Vector2.FromArray(r,l);c.push(h.asArray())}break;case i.VertexBuffer.MatricesIndicesKind:case i.VertexBuffer.MatricesIndicesExtraKind:for(var f=0,v=r.length/n;f<v;++f){l=f*n;var h=i.Vector4.FromArray(r,l);c.push(h.asArray())}break;case i.VertexBuffer.MatricesWeightsKind:case i.VertexBuffer.MatricesWeightsExtraKind:for(var f=0,b=r.length/n;f<b;++f){l=f*n;var h=i.Vector4.FromArray(r,l);c.push(h.asArray())}break;default:i.Tools.Warn("Unsupported Vertex Buffer Type: "+e),c=[]}switch(t){case 5121:u=s.setUInt8.bind(s);break;case 5123:u=s.setUInt16.bind(s);break;case 5125:u=s.setUInt32.bind(s);break;case 5126:u=s.setFloat32.bind(s);break;default:return void i.Tools.Warn("Unsupported Attribute Component kind: "+t)}for(var E=0,F=c;E<F.length;E++)for(var A=F[E],R=0;R<A.length;R++)u(A[R])},e.prototype.writeMorphTargetAttributeData=function(e,t,r,n,s,o,l,u){var c,f,p=[],h=new i.Vector3,_=new i.Vector4(0,0,0,0);switch(e){case i.VertexBuffer.PositionKind:for(var d=r.verticesStart;d<r.verticesCount;++d){c=r.indexStart+d*o;var m=i.Vector3.FromArray(n,c),g=i.Vector3.FromArray(s,c);h=g.subtractToRef(m,h),u&&(u.min.copyFromFloats(Math.min(h.x,u.min.x),Math.min(h.y,u.min.y),Math.min(h.z,u.min.z)),u.max.copyFromFloats(Math.max(h.x,u.max.x),Math.max(h.y,u.max.y),Math.max(h.z,u.max.z))),p.push(h.asArray())}break;case i.VertexBuffer.NormalKind:for(var d=r.verticesStart;d<r.verticesCount;++d){c=r.indexStart+d*o;var m=i.Vector3.FromArray(n,c).normalize(),g=i.Vector3.FromArray(s,c).normalize();h=g.subtractToRef(m,h),p.push(h.asArray())}break;case i.VertexBuffer.TangentKind:for(var d=r.verticesStart;d<r.verticesCount;++d){c=r.indexStart+d*(o+1);var m=i.Vector4.FromArray(n,c);a._GLTFUtilities._NormalizeTangentFromRef(m);var g=i.Vector4.FromArray(s,c);a._GLTFUtilities._NormalizeTangentFromRef(g),_=g.subtractToRef(m,_),p.push([_.x,_.y,_.z])}break;default:i.Tools.Warn("Unsupported Vertex Buffer Type: "+e),p=[]}switch(t){case 5121:f=l.setUInt8.bind(l);break;case 5123:f=l.setUInt16.bind(l);break;case 5125:f=l.setUInt32.bind(l);break;case 5126:f=l.setFloat32.bind(l);break;default:return void i.Tools.Warn("Unsupported Attribute Component kind: "+t)}for(var x=0,y=p;x<y.length;x++)for(var T=y[x],v=0;v<T.length;v++)f(T[v])},e.prototype._generateJSON=function(e,t,r){var n,i,s,o=this,l={byteLength:this._totalByteLength},u=this._totalByteLength;return l.byteLength&&(this._glTF.buffers=[l]),this._nodes&&this._nodes.length&&(this._glTF.nodes=this._nodes),this._meshes&&this._meshes.length&&(this._glTF.meshes=this._meshes),this._scenes&&this._scenes.length&&(this._glTF.scenes=this._scenes,this._glTF.scene=0),this._cameras&&this._cameras.length&&(this._glTF.cameras=this._cameras),this._bufferViews&&this._bufferViews.length&&(this._glTF.bufferViews=this._bufferViews),this._accessors&&this._accessors.length&&(this._glTF.accessors=this._accessors),this._animations&&this._animations.length&&(this._glTF.animations=this._animations),this._materials&&this._materials.length&&(this._glTF.materials=this._materials),this._textures&&this._textures.length&&(this._glTF.textures=this._textures),this._samplers&&this._samplers.length&&(this._glTF.samplers=this._samplers),this._skins&&this._skins.length&&(this._glTF.skins=this._skins),this._images&&this._images.length&&(e?(this._glTF.images=[],this._images.forEac
1h(function(e){e.uri&&(i=o._imageData[e.uri],o._orderedImageData.push(i),n=e.uri.split(".")[0]+" image",s=a._GLTFUtilities._CreateBufferView(0,u,i.data.byteLength,void 0,n),u+=i.data.byteLength,o._bufferViews.push(s),e.bufferView=o._bufferViews.length-1,e.name=n,e.mimeType=i.mimeType,e.uri=void 0,o._glTF.images||(o._glTF.images=[]),o._glTF.images.push(e))}),l.byteLength=u):this._glTF.images=this._images),e||(l.uri=t+".bin"),r?JSON.stringify(this._glTF,null,2):JSON.stringify(this._glTF)},e.prototype._generateGLTFAsync=function(e,t){var r=this;return void 0===t&&(t=!0),this._generateBinaryAsync().then(function(n){r._extensionsOnExporting();var i=r._generateJSON(!1,e,!0),s=new Blob([n],{type:"application/octet-stream"}),a=e+".gltf",l=e+".bin",u=new o.GLTFData;if(u.glTFFiles[a]=i,u.glTFFiles[l]=s,r._imageData)for(var c in r._imageData)u.glTFFiles[c]=new Blob([r._imageData[c].data],{type:r._imageData[c].mimeType});return t&&r.dispose(),u})},e.prototype._generateBinaryAsync=function(){var e=this,t=new p(4);return this._createSceneAsync(t).then(function(){return e._localEngine&&e._localEngine.dispose(),t.getArrayBuffer()})},e.prototype._getPadding=function(e){var t=e%4;return 0===t?t:4-t},e.prototype._generateGLBAsync=function(e,t){var r=this;return void 0===t&&(t=!0),this._generateBinaryAsync().then(function(n){r._extensionsOnExporting();var i,s=r._generateJSON(!0),a=s.length,l=0;"undefined"!=typeof TextEncoder&&(a=(i=new TextEncoder().encode(s)).length);for(var u=0;u<r._orderedImageData.length;++u)l+=r._orderedImageData[u].data.byteLength;var c=r._getPadding(a),f=r._getPadding(n.byteLength),p=r._getPadding(l),h=28+a+c+n.byteLength+f+l+p,_=new ArrayBuffer(12),d=new DataView(_);d.setUint32(0,0x46546c67,!0),d.setUint32(4,2,!0),d.setUint32(8,h,!0);var m=new ArrayBuffer(8+a+c),g=new DataView(m);g.setUint32(0,a+c,!0),g.setUint32(4,0x4e4f534a,!0);var x=new Uint8Array(m,8);if(i)x.set(i);else for(var u=0;u<a;++u){var y=s.charCodeAt(u);y!=s.codePointAt(u)?x[u]=95:x[u]=y}for(var T=new Uint8Array(m,8+a),u=0;u<c;++u)T[u]=32;var v=new ArrayBuffer(8),b=new DataView(v);b.setUint32(0,n.byteLength+l+p,!0),b.setUint32(4,5130562,!0);for(var E=new ArrayBuffer(f),F=new Uint8Array(E),u=0;u<f;++u)F[u]=0;for(var A=new ArrayBuffer(p),R=new Uint8Array(A),u=0;u<p;++u)R[u]=0;for(var M=[_,m,v,n],u=0;u<r._orderedImageData.length;++u)M.push(r._orderedImageData[u].data);M.push(E),M.push(A);var w=new Blob(M,{type:"application/octet-stream"}),S=new o.GLTFData;return S.glTFFiles[e+".glb"]=w,null!=r._localEngine&&r._localEngine.dispose(),t&&r.dispose(),S})},e.prototype._setNodeTransformation=function(e,t){t.getPivotPoint().equalsToFloats(0,0,0)||i.Tools.Warn("Pivot points are not supported in the glTF serializer"),t.position.equalsToFloats(0,0,0)||(e.translation=t.position.asArray()),t.scaling.equalsToFloats(1,1,1)||(e.scale=t.scaling.asArray());var r=i.Quaternion.FromEulerAngles(t.rotation.x,t.rotation.y,t.rotation.z);t.rotationQuaternion&&r.multiplyInPlace(t.rotationQuaternion),i.Quaternion.IsIdentity(r)||(e.rotation=r.normalize().asArray())},e.prototype._setCameraTransformation=function(e,t){var r=i.TmpVectors.Vector3[0],n=i.TmpVectors.Quaternion[0];t.getWorldMatrix().decompose(void 0,n,r),r.equalsToFloats(0,0,0)||(e.translation=r.asArray()),n.multiplyInPlace(c),i.Quaternion.IsIdentity(n)||(e.rotation=n.asArray())},e.prototype._getVertexBufferFromMesh=function(e,t){if(t.isVerticesDataPresent(e,!0)){var r=t.getVertexBuffer(e,!0);if(r)return r}return null},e.prototype._createBufferViewKind=function(e,t,r,n,s){var o=r instanceof i.Mesh?r:r instanceof i.InstancedMesh?r.sourceMesh:null;if(o){var l=o.getVertexBuffer(e,!0),u=o.getVerticesData(e,void 0,void 0,!0);if(l&&u){var c=i.VertexBuffer.GetTypeByteLength(t),f=u.length*c,p=a._GLTFUtilities._CreateBufferView(0,n.getByteOffset(),f,s,e+" - "+o.name);this._bufferViews.push(p),this._writeAttributeData(e,t,u,s/c,n,r)}}},e.prototype._setMorphTargetAttributes=function(e,t,r,n){if(r){t.targets||(t.targets=[]);var s={},o=e.getMesh();if(r.hasNormals){var l=o.getVerticesData(i.VertexBuffer.NormalKind,void 0,void 0,!0),u=r.getNormals(),c=e.verticesCount,f=12,p=12*c,h=a._GLTFUtilities._CreateBufferView(0,n.getByteOffset(),p,f,r.n
1ame+"_NORMAL");this._bufferViews.push(h);var _=this._bufferViews.length-1,d=a._GLTFUtilities._CreateAccessor(_,r.name+" - NORMAL","VEC3",5126,c,0,null,null);this._accessors.push(d),s.NORMAL=this._accessors.length-1,this.writeMorphTargetAttributeData(i.VertexBuffer.NormalKind,5126,e,l,u,f/4,n)}if(r.hasPositions){var m=o.getVerticesData(i.VertexBuffer.PositionKind,void 0,void 0,!0),g=r.getPositions(),c=e.verticesCount,f=12,p=12*c,h=a._GLTFUtilities._CreateBufferView(0,n.getByteOffset(),p,f,r.name+"_POSITION");this._bufferViews.push(h);var _=this._bufferViews.length-1,x={min:new i.Vector3(1/0,1/0,1/0),max:new i.Vector3(-1/0,-1/0,-1/0)},d=a._GLTFUtilities._CreateAccessor(_,r.name+" - POSITION","VEC3",5126,c,0,null,null);this._accessors.push(d),s.POSITION=this._accessors.length-1,this.writeMorphTargetAttributeData(i.VertexBuffer.PositionKind,5126,e,m,g,f/4,n,x),d.min=x.min.asArray(),d.max=x.max.asArray()}if(r.hasTangents){var y=o.getVerticesData(i.VertexBuffer.TangentKind,void 0,void 0,!0),T=r.getTangents(),c=e.verticesCount,f=12,p=12*c,h=a._GLTFUtilities._CreateBufferView(0,n.getByteOffset(),p,f,r.name+"_NORMAL");this._bufferViews.push(h);var _=this._bufferViews.length-1,d=a._GLTFUtilities._CreateAccessor(_,r.name+" - TANGENT","VEC3",5126,c,0,null,null);this._accessors.push(d),s.TANGENT=this._accessors.length-1,this.writeMorphTargetAttributeData(i.VertexBuffer.TangentKind,5126,e,y,T,f/4,n)}t.targets.push(s)}},e.prototype._getMeshPrimitiveMode=function(e){if(e instanceof i.LinesMesh)return i.Material.LineListDrawMode;if(e instanceof i.InstancedMesh||e instanceof i.Mesh){var t=e instanceof i.Mesh?e:e.sourceMesh;if("number"==typeof t.overrideRenderingFillMode)return t.overrideRenderingFillMode}return e.material?e.material.fillMode:i.Material.TriangleFillMode},e.prototype._setPrimitiveMode=function(e,t){switch(t){case i.Material.TriangleFillMode:break;case i.Material.TriangleStripDrawMode:e.mode=5;break;case i.Material.TriangleFanDrawMode:e.mode=6;break;case i.Material.PointListDrawMode:case i.Material.PointFillMode:e.mode=0;break;case i.Material.LineLoopDrawMode:e.mode=2;break;case i.Material.LineListDrawMode:e.mode=1;break;case i.Material.LineStripDrawMode:e.mode=3}},e.prototype._setAttributeKind=function(e,t){switch(t){case i.VertexBuffer.PositionKind:e.attributes.POSITION=this._accessors.length-1;break;case i.VertexBuffer.NormalKind:e.attributes.NORMAL=this._accessors.length-1;break;case i.VertexBuffer.ColorKind:e.attributes.COLOR_0=this._accessors.length-1;break;case i.VertexBuffer.TangentKind:e.attributes.TANGENT=this._accessors.length-1;break;case i.VertexBuffer.UVKind:e.attributes.TEXCOORD_0=this._accessors.length-1;break;case i.VertexBuffer.UV2Kind:e.attributes.TEXCOORD_1=this._accessors.length-1;break;case i.VertexBuffer.MatricesIndicesKind:e.attributes.JOINTS_0=this._accessors.length-1;break;case i.VertexBuffer.MatricesIndicesExtraKind:e.attributes.JOINTS_1=this._accessors.length-1;break;case i.VertexBuffer.MatricesWeightsKind:e.attributes.WEIGHTS_0=this._accessors.length-1;break;case i.VertexBuffer.MatricesWeightsExtraKind:e.attributes.WEIGHTS_1=this._accessors.length-1;break;default:i.Tools.Warn("Unsupported Vertex Buffer Type: "+t)}},e.prototype._setPrimitiveAttributesAsync=function(e,t,r){var n,s,o=[],l=null;t instanceof i.Mesh?l=t:t instanceof i.InstancedMesh&&(l=t.sourceMesh);var u=[{kind:i.VertexBuffer.PositionKind,accessorType:"VEC3",accessorComponentType:5126,byteStride:12},{kind:i.VertexBuffer.NormalKind,accessorType:"VEC3",accessorComponentType:5126,byteStride:12},{kind:i.VertexBuffer.ColorKind,accessorType:"VEC4",accessorComponentType:5126,byteStride:16},{kind:i.VertexBuffer.TangentKind,accessorType:"VEC4",accessorComponentType:5126,byteStride:16},{kind:i.VertexBuffer.UVKind,accessorType:"VEC2",accessorComponentType:5126,byteStride:8},{kind:i.VertexBuffer.UV2Kind,accessorType:"VEC2",accessorComponentType:5126,byteStride:8},{kind:i.VertexBuffer.MatricesIndicesKind,accessorType:"VEC4",accessorComponentType:5123,byteStride:8},{kind:i.VertexBuffer.MatricesIndicesExtraKind,accessorType:"VEC4",accessorComponentType:5123,byteStride:8},{kind:i.VertexBuffer.MatricesWeightsKind,accessorType:"VEC4",accessorComponentType:5126,byteStride:16},{kind:i.VertexBuffer.MatricesWeightsExtraKind,accessorType:"VEC4",accessorComponentType:5126,byteStride:16}];if(l){for(var c=null,f=this._getMeshPrimitiveMode(l),p={},h=l.morphTargetManager,_=0;_<u.length;_++){var d=u[_],m=d.kind,g=d.accessorComponentType;if(l.isVerticesDataPresent(m,!0)){var x=this._getVertexBufferFromMesh(m,l);
1d.byteStride=x?x.getSize()*i.VertexBuffer.GetTypeByteLength(d.accessorComponentType):4*i.VertexBuffer.DeduceStride(m),12===d.byteStride&&(d.accessorType="VEC3"),this._createBufferViewKind(m,g,t,r,d.byteStride),d.bufferViewIndex=this._bufferViews.length-1,p[m]=d.bufferViewIndex}}if(l.getTotalIndices()){var y=l.getIndices();if(y){var T=4*y.length;n=a._GLTFUtilities._CreateBufferView(0,r.getByteOffset(),T,void 0,"Indices - "+l.name),this._bufferViews.push(n),c=this._bufferViews.length-1;for(var v=0,b=y.length;v<b;++v)r.setUInt32(y[v])}}if(l.subMeshes)for(var E=0,F=l.subMeshes;E<F.length;E++){var A=F[E],R=A.getMaterial()||l.getScene().defaultMaterial,M=null;if(R)if(l instanceof i.LinesMesh){var w={name:l.name+" material"};(!l.color.equals(i.Color3.White())||l.alpha<1)&&(w.pbrMetallicRoughness={baseColorFactor:l.color.asArray().concat([l.alpha])}),this._materials.push(w),M=this._materials.length-1}else if(R instanceof i.MultiMaterial){var S=R.subMaterials[A.materialIndex];S&&(R=S,M=this._materialMap[R.uniqueId])}else M=this._materialMap[R.uniqueId];var C=null!=M?this._materials[M]:null,V={attributes:{}};this._setPrimitiveMode(V,f);for(var I=0;I<u.length;I++){var d=u[I],m=d.kind;if(m!==i.VertexBuffer.UVKind&&m!==i.VertexBuffer.UV2Kind||this._options.exportUnusedUVs||C&&this._glTFMaterialExporter._hasTexturesPresent(C)){var K=l.getVerticesData(m,void 0,void 0,!0);if(K){var x=this._getVertexBufferFromMesh(m,l);if(x){var B=x.getSize(),L=d.bufferViewIndex;if(void 0!=L){s={min:null,max:null},m==i.VertexBuffer.PositionKind&&(s=a._GLTFUtilities._CalculateMinMaxPositions(K,0,K.length/B));var P=a._GLTFUtilities._CreateAccessor(L,m+" - "+t.name,d.accessorType,d.accessorComponentType,K.length/B,0,s.min,s.max);this._accessors.push(P),this._setAttributeKind(V,m)}}}}}if(c){var P=a._GLTFUtilities._CreateAccessor(c,"indices - "+t.name,"SCALAR",5125,A.indexCount,4*A.indexStart,null,null);this._accessors.push(P),V.indices=this._accessors.length-1}if(Object.keys(V.attributes).length>0){if((null!==l.overrideMaterialSideOrientation?l.overrideMaterialSideOrientation:R.sideOrientation)===(this._babylonScene.useRightHandedSystem?i.Material.ClockWiseSideOrientation:i.Material.CounterClockWiseSideOrientation)){var O=null!=c?this._bufferViews[c].byteOffset:null;null==O&&(O=0);var H=null;if(null!=c&&(H=l.getIndices()),H)this._reorderIndicesBasedOnPrimitiveMode(A,f,H,O,r);else for(var N=0;N<u.length;N++){var d=u[N],K=l.getVerticesData(d.kind,void 0,void 0,!0);if(K){var U=this._bufferViews[p[d.kind]].byteOffset||0;this._reorderVertexAttributeDataBasedOnPrimitiveMode(A,f,d.kind,K,U,r)}}}null!=M&&(V.material=M)}if(h){e.extras||(e.extras={}),e.extras.targetNames=[];for(var z=0;z<h.numTargets;++z){var G=h.getTarget(z);this._setMorphTargetAttributes(A,V,G,r),e.extras.targetNames.push(G.name)}}e.primitives.push(V),this._extensionsPostExportMeshPrimitiveAsync("postExport",V,A,r),o.push()}}return Promise.all(o).then(function(){})},e.prototype._createSceneAsync=function(e){var t,r,s,a,o,l=this,c={nodes:[]},f=(0,n.__spreadArray)((0,n.__spreadArray)((0,n.__spreadArray)((0,n.__spreadArray)([],this._babylonScene.transformNodes,!0),this._babylonScene.meshes,!0),this._babylonScene.lights,!0),this._babylonScene.cameras,!0),p=new Set;if(this._babylonScene.metadata&&(this._options.metadataSelector?c.extras=this._options.metadataSelector(this._babylonScene.metadata):this._babylonScene.metadata.gltf&&(c.extras=this._babylonScene.metadata.gltf.extras)),(null==(r=this._options.removeNoopRootNodes)||r)&&!this._options.includeCoordinateSystemConversionNodes)for(var h=0,_=this._babylonScene.rootNodes;h<_.length;h++){var d=_[h];(function(e,t){if(!(e instanceof i.TransformNode))return!1;if(t){var r=e.getWorldMatrix();if(!r.isIdentity())return!1}else{var r=e.getWorldMatrix().multiplyToRef(u,i.TmpVectors.Matrix[0]);if(!r.isIdentity())return!1}return(!(e instanceof i.Mesh)||!e.geometry)&&(!(e instanceof i.InstancedMesh)||!e.sourceMesh.geometry)})(d,this._babylonScene.useRightHandedSystem)&&(p.add(d),f.splice(f.indexOf(d),1))}var m=new Map;this._babylonScene.cameras.forEach(function(e){if(!l._options.shouldExportNode||l._options.shouldExportNode(e)){var t={type:e.mode===i.Camera.PERSPECTIVE_CAMERA?"perspective":"orthographic"};e.name&&(t.name=e.name),"perspective"===t.type?t.perspective={aspectRatio:e.getEngine().getAspectRatio(e),yfov:e.fovMode===i.Camera.FOVMODE_VERTICAL_FIXED?e.fov:e.fov*e.getEngine().getAspectRatio(e),znear:e.minZ,zfar:e.maxZ}:"orthographic"===t.type&&(t.orthographic={xmag:e.orthoLeft&&e.orthoRight?.5*(e.orthoRight-e.orthoLeft):.5*e.getEngine().getRenderWidth(),ymag:e.orthoBottom&&e.orthoTop?.5*(e.orthoTop-e.orthoBottom):.5*e.getEngine().getRenderHeight(),znear:e.minZ,zfar:e.maxZ}),m.set(e,l._cameras.length),l._cameras.push(t)}});var g=(t=this._getExportNodes(f))[0],x=t[1];return this._glTFMaterialExporter._convertMaterialsToGLTFAsync(x,"image/png",!0).then(function(){return l._createNodeMapAndAnimationsAsync(g,e).then(function(t){return l._createSkinsAsync(t,e).then(function(r){if(l._nodeMap=t,l._totalByteLength=e.getByteOffset(),void 0==l._totalByteLength)throw Error("undefined byte length!");for(var n=0;n<f.length;n++){var h=f[n];if(void 0!==(s=l._nodeMap[h.uniqueId])&&(a=l._nodes[s],h.metadata&&(l._options.metadataSelector?a.extras=l._options.metadataSelector(h.metadata):h.metadata.gltf&&(a.extras=h.metadata.gltf.extras)),h instanceof i.Camera&&(a.c
1amera=m.get(h)),l._options.shouldExportNode&&!l._options.shouldExportNode(h)?i.Tools.Log("Omitting "+h.name+" from scene."):(h.parent||l._babylonScene.useRightHandedSystem||function(e){var t=i.Vector3.FromArrayToRef(e.translation||[0,0,0],0,i.TmpVectors.Vector3[0]),r=i.Quaternion.FromArrayToRef(e.rotation||[0,0,0,1],0,i.TmpVectors.Quaternion[0]),n=i.Vector3.FromArrayToRef(e.scale||[1,1,1],0,i.TmpVectors.Vector3[1]);i.Matrix.ComposeToRef(n,r,t,i.TmpVectors.Matrix[0]).multiplyToRef(u,i.TmpVectors.Matrix[0]).decompose(n,r,t),t.equalsToFloats(0,0,0)?delete e.translation:e.translation=t.asArray(),i.Quaternion.IsIdentity(r)?delete e.rotation:e.rotation=r.asArray(),n.equalsToFloats(1,1,1)?delete e.scale:e.scale=n.asArray()}(a),(!h.parent||p.has(h.parent))&&c.nodes.push(s)),h instanceof i.Mesh&&h.skeleton&&(a.skin=r[h.skeleton.uniqueId]),o=h.getDescendants(!0),!a.children&&o&&o.length)){for(var _=[],d=0;d<o.length;d++){var g=o[d];null!=l._nodeMap[g.uniqueId]&&_.push(l._nodeMap[g.uniqueId])}_.length&&(a.children=_)}}c.nodes.length&&l._scenes.push(c)})})})},e.prototype._getExportNodes=function(e){for(var t=[],r=new Set,n=0;n<e.length;n++){var s=e[n];if(!this._options.shouldExportNode||this._options.shouldExportNode(s)){if(t.push(s),s.subMeshes&&s.subMeshes.length>0){var a=s.material||s.getScene().defaultMaterial;if(a instanceof i.MultiMaterial)for(var o=0,l=a.subMaterials;o<l.length;o++){var u=l[o];u&&r.add(u)}else r.add(a)}}else s.name}return[t,r]},e.prototype._createNodeMapAndAnimationsAsync=function(e,t){for(var r,n=this,s=Promise.resolve(),a={},o={name:"runtime animations",channels:[],samplers:[]},u=[],c=function(e){s=s.then(function(){return n._createNodeAsync(e,t).then(function(s){var c=n._extensionsPostExportNodeAsync("createNodeAsync",s,e,a,t);return null==c?(i.Tools.Warn("Not exporting node ".concat(e.name)),Promise.resolve()):c.then(function(i){i&&(n._nodes.push(i),r=n._nodes.length-1,a[e.uniqueId]=r,!n._babylonScene.animationGroups.length&&(l._GLTFAnimation._CreateMorphTargetAnimationFromMorphTargetAnimations(e,o,u,a,n._nodes,t,n._bufferViews,n._accessors,n._animationSampleRate,n._options.shouldExportAnimation),e.animations.length&&l._GLTFAnimation._CreateNodeAnimationFromNodeAnimations(e,o,u,a,n._nodes,t,n._bufferViews,n._accessors,n._animationSampleRate,n._options.shouldExportAnimation)))})})})},f=0;f<e.length;f++)c(e[f]);return s.then(function(){return o.channels.length&&o.samplers.length&&n._animations.push(o),u.forEach(function(e){e.channels.length&&e.samplers.length&&n._animations.push(e)}),n._babylonScene.animationGroups.length&&l._GLTFAnimation._CreateNodeAndMorphAnimationFromAnimationGroups(n._babylonScene,n._animations,a,t,n._bufferViews,n._accessors,n._animationSampleRate,n._options.shouldExportAnimation),a})},e.prototype._createNodeAsync=function(e,t){var r=this;return Promise.resolve().then(function(){var n={},s={primitives:[]};if(e.name&&(n.name=e.name),e instanceof i.TransformNode){if(r._setNodeTransformation(n,e),e instanceof i.Mesh){var a=e.morphTargetManager;if(a&&a.numTargets>0){s.weights=[];for(var o=0;o<a.numTargets;++o)s.weights.push(a.getTarget(o).influence)}}return r._setPrimitiveAttributesAsync(s,e,t).then(function(){return s.primitives.length&&(r._meshes.push(s),n.mesh=r._meshes.length-1),n})}return e instanceof i.Camera&&r._setCameraTransformation(n,e),n})},e.prototype._createSkinsAsync=function(e,t){for(var r,n=Promise.resolve(),s={},o=0,l=this._babylonScene.skeletons;o<l.length;o++){var u=l[o];if(!(u.bones.length<=0)){for(var c={joints:[]},f=[],p={},h=-1,_=0;_<u.bones.length;++_){var d=u.bones[_],m=null!=(r=d.getIndex())?r:_;-1!==m&&(p[m]=d,m>h&&(h=m))}for(var m=0;m<=h;++m){var d=p[m];f.push(d.getInvertedAbsoluteTransform());var g=d.getTransformNode();g&&null!==e[g.uniqueId]&&void 0!==e[g.uniqueId]?c.joints.push(e[g.uniqueId]):i.Tools.Warn("Exporting a bone without a linked transform node is currently unsupported")}if(c.joints.length>0){var x=64*f.length,y=t.getByteOffset(),T=a._GLTFUtilities._CreateBufferView(0,y,x,void 0,"InverseBindMatrices - "+u.name);this._bufferViews.push(T);var v=this._bufferViews.length-1,b=a._GLTFUtilities._CreateAccessor(v,"InverseBindMatrices - "+u.name,"MAT4",5126,f.length,null,
1null,null);c.inverseBindMatrices=this._accessors.push(b)-1,this._skins.push(c),s[u.uniqueId]=this._skins.length-1,f.forEach(function(e){e.m.forEach(function(e){t.setFloat32(e)})})}}}return n.then(function(){return s})},e._ExtensionNames=[],e._ExtensionFactories={},e}(),p=function(){function e(e){this._arrayBuffer=new ArrayBuffer(e),this._dataView=new DataView(this._arrayBuffer),this._byteOffset=0}return e.prototype._resizeBuffer=function(e){var t=new ArrayBuffer(e),r=Math.min(this._arrayBuffer.byteLength,e),n=new Uint8Array(this._arrayBuffer,0,r);return new Uint8Array(t).set(n,0),this._arrayBuffer=t,this._dataView=new DataView(this._arrayBuffer),t},e.prototype.getArrayBuffer=function(){return this._resizeBuffer(this.getByteOffset())},e.prototype.getByteOffset=function(){if(void 0==this._byteOffset)throw Error("Byte offset is undefined!");return this._byteOffset},e.prototype.setUInt8=function(e,t){null!=t?t<this._byteOffset?this._dataView.setUint8(t,e):i.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._byteOffset+1>this._arrayBuffer.byteLength&&this._resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setUint8(this._byteOffset,e),this._byteOffset+=1)},e.prototype.setUInt16=function(e,t){null!=t?t<this._byteOffset?this._dataView.setUint16(t,e,!0):i.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._byteOffset+2>this._arrayBuffer.byteLength&&this._resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setUint16(this._byteOffset,e,!0),this._byteOffset+=2)},e.prototype.getUInt32=function(e){if(e<this._byteOffset)return this._dataView.getUint32(e,!0);throw i.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"),Error("BinaryWriter: byteoffset is greater than the current binary buffer length!")},e.prototype.getVector3Float32FromRef=function(e,t){t+8>this._byteOffset?i.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(e.x=this._dataView.getFloat32(t,!0),e.y=this._dataView.getFloat32(t+4,!0),e.z=this._dataView.getFloat32(t+8,!0))},e.prototype.setVector3Float32FromRef=function(e,t){t+8>this._byteOffset?i.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._dataView.setFloat32(t,e.x,!0),this._dataView.setFloat32(t+4,e.y,!0),this._dataView.setFloat32(t+8,e.z,!0))},e.prototype.getVector4Float32FromRef=function(e,t){t+12>this._byteOffset?i.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(e.x=this._dataView.getFloat32(t,!0),e.y=this._dataView.getFloat32(t+4,!0),e.z=this._dataView.getFloat32(t+8,!0),e.w=this._dataView.getFloat32(t+12,!0))},e.prototype.setVector4Float32FromRef=function(e,t){t+12>this._byteOffset?i.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._dataView.setFloat32(t,e.x,!0),this._dataView.setFloat32(t+4,e.y,!0),this._dataView.setFloat32(t+8,e.z,!0),this._dataView.setFloat32(t+12,e.w,!0))},e.prototype.setFloat32=function(e,t){isNaN(e)&&i.Tools.Error("Invalid data being written!"),null!=t&&(t<this._byteOffset?this._dataView.setFloat32(t,e,!0):i.Tools.Error("BinaryWriter: byteoffset is greater than the current binary length!")),this._byteOffset+4>this._arrayBuffer.byteLength&&this._resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setFloat32(this._byteOffset,e,!0),this._byteOffset+=4},e.prototype.setUInt32=function(e,t){null!=t?t<this._byteOffset?this._dataView.setUint32(t,e,!0):i.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._byteOffset+4>this._arrayBuffer.byteLength&&this._resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setUint32(this._byteOffset,e,!0),this._byteOffset+=4)},e.prototype.setInt16=function(e,t){null!=t?t<this._byteOffset?this._dataView.setInt16(t,e,!0):i.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._byteOffset+2>this._arrayBuffer.byteLength&&this._resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setInt16(this._byteOffset,e,!0),this._byteOffset+=2)},e.prototype.setByte=function(e,t){null!=t?t<this._byteOffset?this._dataView.setInt8(t,e):i.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._byteOffset+1>this._arrayBuffer.byteLength&&this._resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setInt8(this._byteOffset,e),this._byteOffset++)},e}()},
1"../../../dev/serializers/src/glTF/2.0/glTFExporterExtension.ts":(e,t,r)=>{r.r(t),r.d(t,{__IGLTFExporterExtensionV2:()=>n});var n=0},
1"../../../dev/serializers/src/glTF/2.0/glTFMaterialExporter.ts":(e,t,r)=>{r.r(t),r.d(t,{_GLTFMaterialExporter:()=>s});var n=r("../../../../node_modules/tslib/tslib.es6.mjs"),i=r("babylonjs/Maths/math.vector"),s=function(){function e(e){this._textureMap={},this._internalTextureToImage={},this._textureMap={},this._exporter=e}return e._FuzzyEquals=function(e,t,r){return i.Scalar.WithinEpsilon(e.r,t.r,r)&&i.Scalar.WithinEpsilon(e.g,t.g,r)&&i.Scalar.WithinEpsilon(e.b,t.b,r)},e.prototype._convertMaterialsToGLTFAsync=function(e,t,r){var n=this,s=[];return e.forEach(function(e){"StandardMaterial"===e.getClassName()?s.push(n._convertStandardMaterialAsync(e,t,r)):-1!==e.getClassName().indexOf("PBR")?s.push(n._convertPBRMaterialAsync(e,t,r)):i.Tools.Warn("Unsupported material type: ".concat(e.name))}),Promise.all(s).then(function(){})},e.prototype._stripTexturesFromMaterial=function(e){var t={};if(e){t.name=e.name,t.doubleSided=e.doubleSided,t.alphaMode=e.alphaMode,t.alphaCutoff=e.alphaCutoff,t.emissiveFactor=e.emissiveFactor;var r=e.pbrMetallicRoughness;r&&(t.pbrMetallicRoughness={},t.pbrMetallicRoughness.baseColorFactor=r.baseColorFactor,t.pbrMetallicRoughness.metallicFactor=r.metallicFactor,t.pbrMetallicRoughness.roughnessFactor=r.roughnessFactor)}return t},e.prototype._hasTexturesPresent=function(e){if(e.emissiveTexture||e.normalTexture||e.occlusionTexture)return!0;var t,r=e.pbrMetallicRoughness;if(r&&(r.baseColorTexture||r.metallicRoughnessTexture))return!0;if(e.extensions)for(var n in e.extensions){var i=e.extensions[n];if(i)return null==(t=i.hasTextures)?void 0:t.call(i)}return!1},e.prototype._getTextureInfo=function(e){if(e){var t=e.uid;if(t in this._textureMap)return this._textureMap[t]}return null},e.prototype._convertToGLTFPBRMetallicRoughness=function(t){var r,n=new i.Vector2(0,1),s=new i.Vector2(0,.1),a=new i.Vector2(0,.1),o=new i.Vector2(1300,.1),l=t.diffuseColor.toLinearSpace(t.getScene().getEngine().useExactSrgbConversions).scale(.5),u=t.alpha,c=(r=Math.pow(i.Scalar.Clamp(t.specularPower,0,e._MaxSpecularPower)/o.x,.333333),(1-r)*(1-r)*(1-r)*n.y+3*(1-r)*(1-r)*r*s.y+3*(1-r)*r*r*a.y+r*r*r*o.y);return{baseColorFactor:[l.r,l.g,l.b,u],metallicFactor:0,roughnessFactor:c}},e._SolveMetallic=function(e,t,r){if(t<this._DielectricSpecular.r)return this._DielectricSpecular,0;var n=this._DielectricSpecular.r,s=e*r/(1-this._DielectricSpecular.r)+t-2*this._DielectricSpecular.r,a=this._DielectricSpecular.r-t;return i.Scalar.Clamp((-s+Math.sqrt(s*s-4*n*a))/(2*n),0,1)},e._SetAlphaMode=function(e,t){t.needAlphaBlending()?e.alphaMode="BLEND":t.needAlphaTesting()&&(e.alphaMode="MASK",e.alphaCutoff=t.alphaCutOff)},e.prototype._convertStandardMaterialAsync=function(t,r,n){var s=this._exporter._materialMap,a=this._exporter._materials,o=[],l=this._convertToGLTFPBRMetallicRoughness(t),u={name:t.name};if(null==t.backFaceCulling||t.backFaceCulling||(t.twoSidedLighting||i.Tools.Warn(t.name+": Back-face culling disabled and two-sided lighting disabled is not supported in glTF."),u.doubleSided=!0),n){t.diffuseTexture&&o.push(this._exportTextureAsync(t.diffuseTexture,r).then(function(e){e&&(l.baseColorTexture=e)}));var c=t.bumpTexture;c&&o.push(this._exportTextureAsync(c,r).then(function(e){e&&(u.normalTexture=e,1!==c.level&&(u.normalTexture.scale=c.level))})),t.emissiveTexture&&(u.emissiveFactor=[1,1,1],o.push(this._exportTextureAsync(t.emissiveTexture,r).then(function(e){e&&(u.emissiveTexture=e)}))),t.ambientTexture&&o.push(this._exportTextureAsync(t.ambientTexture,r).then(function(e){e&&(u.occlusionTexture={index:e.index})}))}return(t.alpha<1||t.opacityTexture)&&(t.alphaMode===i.Constants.ALPHA_COMBINE?u.alphaMode="BLEND":i.Tools.Warn(t.name+": glTF 2.0 does not support alpha mode: "+t.alphaMode.toString())),t.emissiveColor&&!e._FuzzyEquals(t.emissiveColor,i.Color3.Black(),e._Epsilon)&&(u.emissiveFactor=t.emissiveColor.asArray()),u.pbrMetallicRoughness=l,e._SetAlphaMode(u,t),a.push(u),s[t.uniqueId]=a.length-1,this._finishMaterial(o,u,t,r)},e.prototype._finishMaterial=function(e,t,r,n){var i=this;return Promise.all(e).then(function(){for(var e=i._exporter._extensionsPostExportMaterialAdditionalTextures("exportMaterial",t,r),s=null,a=0;a<e.length;a++){var o=e[a];s||(s=[]),s.push(i._exportTextureAsync(o,n))}return s||(s=[Promise.resolve(null)]),Promise.all(s).then(function(){var e=i._exporter._extensionsPostExportMaterialAsync("exportMaterial",t,r);return e?e.then(function(){return t}):t})})},e.prototype._getImageDataAsync=function(e,t,r,s){return(0,n.__awaiter)(this,void 0,void 0,function(){var a,o,l,u,c;return(0,n.__generator)(this,function(n){switch(n.label){case 0:return a=i.Constants.TEXTURETYPE_UNSIGNED_INT,u=(l=(o=this._exporter._babylonScene).getEngine()).createRawTexture(e,t,r,i.Constants.TEXTUREFORMAT_RGBA,!1,!0,i.Texture.NEAREST_SAMPL
1INGMODE,null,a),[4,i.TextureTools.ApplyPostProcess("pass",u,o,a,i.Constants.TEXTURE_NEAREST_SAMPLINGMODE,i.Constants.TEXTUREFORMAT_RGBA)];case 1:return n.sent(),[4,l._readTexturePixels(u,t,r)];case 2:return c=n.sent(),[4,i.DumpTools.DumpDataAsync(t,r,c,s,void 0,!0,!0)];case 3:return[2,n.sent()]}})})},e.prototype._createWhiteTexture=function(e,t,r){for(var n=new Uint8Array(e*t*4),s=0;s<n.length;s+=4)n[s]=n[s+1]=n[s+2]=n[s+3]=255;return i.RawTexture.CreateRGBATexture(n,e,t,r)},e.prototype._resizeTexturesToSameDimensions=function(e,t,r){var n,s,a=e?e.getSize():{width:0,height:0},o=t?t.getSize():{width:0,height:0};return a.width<o.width?(n=e&&e instanceof i.Texture?i.TextureTools.CreateResizedCopy(e,o.width,o.height,!0):this._createWhiteTexture(o.width,o.height,r),s=t):a.width>o.width?(s=t&&t instanceof i.Texture?i.TextureTools.CreateResizedCopy(t,a.width,a.height,!0):this._createWhiteTexture(a.width,a.height,r),n=e):(n=e,s=t),{texture1:n,texture2:s}},e.prototype._convertPixelArrayToFloat32=function(e){if(e instanceof Uint8Array){for(var t=e.length,r=new Float32Array(e.length),n=0;n<t;++n)r[n]=e[n]/255;return r}if(e instanceof Float32Array)return e;throw Error("Unsupported pixel format!")},e.prototype._convertSpecularGlossinessTexturesToMetallicRoughnessAsync=function(t,r,s,a){var o;return(0,n.__awaiter)(this,void 0,void 0,function(){var l,u,c,f,p,h,_,d,m,g,x,y,T,v,b,E,F,A,R,M,w,S,C,V,I,K,B;return(0,n.__generator)(this,function(n){switch(n.label){case 0:if(l=[],!(t||r))return[2,Promise.reject("_ConvertSpecularGlosinessTexturesToMetallicRoughness: diffuse and specular glossiness textures are not defined!")];if(!(u=t?t.getScene():r?r.getScene():null))return[3,3];return f=null==(o=(c=this._resizeTexturesToSameDimensions(t,r,u)).texture1)?void 0:o.getSize(),p=void 0,h=void 0,_=f.width,d=f.height,[4,c.texture1.readPixels()];case 1:return m=n.sent(),[4,c.texture2.readPixels()];case 2:if(g=n.sent(),!m)return[2,Promise.reject("Failed to retrieve pixels from diffuse texture!")];if(p=this._convertPixelArrayToFloat32(m),!g)return[2,Promise.reject("Failed to retrieve pixels from specular glossiness texture!")];for(y=new Uint8Array(x=(h=this._convertPixelArrayToFloat32(g)).byteLength),T=new Uint8Array(x),F=0,v=i.Color3.Black(),b=0,E=0;F<d;++F)for(A=0;A<_;++A)R=(_*F+A)*4,M={diffuseColor:new i.Color3(p[R],p[R+1],p[R+2]).toLinearSpace(u.getEngine().useExactSrgbConversions).multiply(s.diffuseColor),specularColor:new i.Color3(h[R],h[R+1],h[R+2]).toLinearSpace(u.getEngine().useExactSrgbConversions).multiply(s.specularColor),glossiness:h[R+3]*s.glossiness},w=this._convertSpecularGlossinessToMetallicRoughness(M),v.r=Math.max(v.r,w.baseColor.r),v.g=Math.max(v.g,w.baseColor.g),v.b=Math.max(v.b,w.baseColor.b),b=Math.max(b,w.metallic),E=Math.max(E,w.roughness),T[R]=255*w.baseColor.r,T[R+1]=255*w.baseColor.g,T[R+2]=255*w.baseColor.b,T[R+3]=c.texture1.hasAlpha?255*p[R+3]:255,y[R]=0,y[R+1]=255*w.roughness,y[R+2]=255*w.metallic,y[R+3]=255;for(F=0,S={baseColor:v,metallic:b,roughness:E},C=!1,V=!1;F<d;++F)for(A=0;A<_;++A)I=(_*F+A)*4,T[I]/=S.baseColor.r>e._Epsilon?S.baseColor.r:1,T[I+1]/=S.baseColor.g>e._Epsilon?S.baseColor.g:1,T[I+2]/=S.baseColor.b>e._Epsilon?S.baseColor.b:1,K=i.Color3.FromInts(T[I],T[I+1],T[I+2]).toGammaSpace(u.getEngine().useExactSrgbConversions),T[I]=255*K.r,T[I+1]=255*K.g,T[I+2]=255*K.b,e._FuzzyEquals(K,i.Color3.White(),e._Epsilon)||(V=!0),y[I+1]/=S.roughness>e._Epsilon?S.roughness:1,y[I+2]/=S.metallic>e._Epsilon?S.metallic:1,B=i.Color3.FromInts(255,y[I+1],y[I+2]),e._FuzzyEquals(B,i.Color3.White(),e._Epsilon)||(C=!0);return C&&l.push(this._getImageDataAsync(y,_,d,a).then(function(e){S.metallicRoughnessTextureData=e})),V&&l.push(this._getImageDataAsync(T,_,d,a).then(function(e){S.baseColorTextureData=e})),[2,Promise.all(l).then(function(){return S})];case 3:return[2,Promise.reject("_ConvertSpecularGlossinessTexturesToMetallicRoughness: Scene from textures is missing!")]}})})},e.prototype._convertSpecularGlossinessToMetallicRoughness=function(t){var r=this._getPerceivedBrightness(t.diffuseColor),n=this._getPerceivedBrightness(t.specularColor),s=1-this._getMaxComponent(t.specularColor),a=e._SolveMetallic(r,n,s),o=t.diffuseColor.scale(s/(1-e._DielectricSpecular.r)/Math.max(1-a,e._Epsilon)),l=t.specularColor.subtract(e._DielectricSpecular.scale(1-a)).scale(1/Math.max(a,e._Epsilon)),u=i.Color3.Lerp(o,l,a*a);return{baseColor:u=u.clampToRef(0,1,u),metallic:a,roughness:1-t.glossiness}},e.prototype._getPerceivedBrightness=function(e){return e?Math.sqrt(.299*e.r*e.r+.587*e.g*e.g+.114*e.b*e.b):0},e.prototype._getMaxComponent=function(e){return e?Math.max(e.r,Math.max(e.g,e.b)):0},e.prototype._convertMetalRoughFactorsToMetallicRoughnessAsync=function(e,t,r,n){var i=[],s={baseColor:e._albedoColor,metallic:e._metallic,roughness:e._roughness};if(n){e._albedoTexture&&i.push(this._exportTextureAsync(e._albedoTexture,t).then(function(e){e&&(r.baseColorTexture=e)}));var a=e._metallicTexture;a&&i.push(this._exportTextureAsync(a,t).then(function(e){e&&(r.metallicRoughnessTexture=e)}))}return Promise.all(i).then(function(){return s})},e.prototype._getTextureSampler=function(e){var t={};if(!e||!(e instanceof i.Texture))return t;var r=this._getGLTFTextureWrapMode(e.wrapU);10497!==r&&(t.wrapS=r);var n=this._getGLTFTextureWrapMode(e.wrapV);switch(10497!==n&&(t.wrapT=n),e.samplingMode){case i.Texture.LINEAR_LINEAR:t.magFilter=9729,t.minFilter=9729;break;case i.Texture.LINEAR_NEAREST:t.magFilter=9729,t.minFilter=9728;break;case i.Texture.NEAREST_LINEAR:t.magFilter=9728,t.minFilter=9729;break;case i.Texture.NEAREST_LINEAR_MIPLINEAR:t.magFilter=9728,t.minFilter=9987;break;case i.Texture.NEAREST_NEAREST:t.magFilter=9728,t.minFilter=9728;break;case i.Texture.NEAREST_LINEAR_MIPNEAREST:t.magFilter=9728,t.minFilter=9985;break;case i.Texture.LINEAR_NEAREST_MIPNEAREST:t.magFilter=9729,t.minFilter=9984;break;case i.Texture.LINEAR_NEAREST_MIPLINEAR:t.magFilter=9729,t.minFilter=9986;break;case i.Texture.NEAREST_NEAREST_MIPLINEAR:t.magFilter=9728,t.minFilter=9986;break;case i.Texture.LINEAR_LINEAR_MIPLINEAR:t.magFilter=9729,t.minFilter=9987;break;case i.Texture.LINEAR_LINEAR_MIPNEAREST:t.magFilter=9729,t.minFilter=9985;break;case i.Texture.NEAREST_NEAREST_MIPNEAREST:t.magFilter=9728,t.minFilter=9984}return t},e.prototype._getGLTFTextureWrapMode=function(e){switch(e){case i.Texture.WRAP_ADDRESSMODE:return 10497;case i.Texture.CLAMP_ADDRESSMODE:return 33071;case i.Texture.MIRROR_ADDRESSMODE:return 33648;default:return i.Tools.Error("Unsupported Texture Wrap Mode ".concat(e,"!")),10497}},e.prototype._convertSpecGlossFactorsToMetallicRoughnessAsync=function(e,t,r,n){var i=this;return Promise.resolve().then(function(){var s={diffuseColor:e._albedoColor,specularColor:e._reflectivityColor,glossiness:e._microSurface},a=e._albedoTexture,o=e._reflectivityTexture,l=e._useMicroSurfaceFromReflectivityMapAlpha;if(o&&!l)return Promise.reject("_ConvertPBRMaterial: Glossiness values n
1ot included in the reflectivity texture are currently not supported");if(!a&&!o||!n)return i._convertSpecularGlossinessToMetallicRoughness(s);var u=i._exportTextureSampler(a||o);return i._convertSpecularGlossinessTexturesToMetallicRoughnessAsync(a,o,s,t).then(function(e){var n=i._exporter._textures;if(e.baseColorTextureData){var s=i._exportImage("baseColor".concat(n.length),t,e.baseColorTextureData);r.baseColorTexture=i._exportTextureInfo(s,u,null==a?void 0:a.coordinatesIndex)}if(e.metallicRoughnessTextureData){var s=i._exportImage("metallicRoughness".concat(n.length),t,e.metallicRoughnessTextureData);r.metallicRoughnessTexture=i._exportTextureInfo(s,u,null==o?void 0:o.coordinatesIndex)}return e})})},e.prototype._convertPBRMaterialAsync=function(e,t,r){var n=this,i={},s={name:e.name};if(!e.isMetallicWorkflow())return this._convertSpecGlossFactorsToMetallicRoughnessAsync(e,t,i,r).then(function(a){return n._setMetallicRoughnessPbrMaterial(a,e,s,i,t,r)});var a=e._albedoColor,o=e.alpha;return a&&(i.baseColorFactor=[a.r,a.g,a.b,o]),this._convertMetalRoughFactorsToMetallicRoughnessAsync(e,t,i,r).then(function(a){return n._setMetallicRoughnessPbrMaterial(a,e,s,i,t,r)})},e.prototype._setMetallicRoughnessPbrMaterial=function(t,r,n,s,a,o){var l=this._exporter._materialMap,u=this._exporter._materials,c=[];if(t){if(e._SetAlphaMode(n,r),e._FuzzyEquals(t.baseColor,i.Color3.White(),e._Epsilon)&&r.alpha>=e._Epsilon||(s.baseColorFactor=[t.baseColor.r,t.baseColor.g,t.baseColor.b,r.alpha]),null!=t.metallic&&1!==t.metallic&&(s.metallicFactor=t.metallic),null!=t.roughness&&1!==t.roughness&&(s.roughnessFactor=t.roughness),null==r.backFaceCulling||r.backFaceCulling||(r._twoSidedLighting||i.Tools.Warn(r.name+": Back-face culling disabled and two-sided lighting disabled is not supported in glTF."),n.doubleSided=!0),o){var f=r._bumpTexture;if(f){var p=this._exportTextureAsync(f,a).then(function(e){e&&(n.normalTexture=e,1!==f.level&&(n.normalTexture.scale=f.level))});c.push(p)}var h=r._ambientTexture;if(h){var p=this._exportTextureAsync(h,a).then(function(e){if(e){var t={index:e.index,texCoord:e.texCoord,extensions:e.extensions};n.occlusionTexture=t;var i=r._ambientTextureStrength;i&&(t.strength=i)}});c.push(p)}var _=r._emissiveTexture;if(_){var p=this._exportTextureAsync(_,a).then(function(e){e&&(n.emissiveTexture=e)});c.push(p)}}var d=r._emissiveColor;e._FuzzyEquals(d,i.Color3.Black(),e._Epsilon)||(n.emissiveFactor=d.asArray()),n.pbrMetallicRoughness=s,u.push(n),l[r.uniqueId]=u.length-1}return this._finishMaterial(c,n,r,a)},e.prototype._getPixelsFromTexture=function(e){return e.textureType===i.Constants.TEXTURETYPE_UNSIGNED_INT,e.readPixels()},e.prototype._exportTextureAsync=function(e,t){var r=this,n=this._exporter._extensionsPreExportTextureAsync("exporter",e,t);return n?n.then(function(n){return n?r._exportTextureInfoAsync(n,t):r._exportTextureInfoAsync(e,t)}):this._exportTextureInfoAsync(e,t)},e.prototype._exportTextureInfoAsync=function(e,t){return(0,n.__awaiter)(this,void 0,void 0,function(){var r,s,a,o,l,u,c,f,p,h,_=this;return(0,n.__generator)(this,function(d){switch(d.label){case 0:if((r=e.uid)in this._textureMap)return[3,3];return[4,this._getPixelsFromTexture(e)];case 1:if(!(s=d.sent()))return[2,null];if(a=this._exportTextureSampler(e),o=e.mimeType)switch(o){case"image/jpeg":case"image/png":case"image/webp":t=o;break;default:i.Tools.Warn("Unsupported media type: ".concat(o))}return(l=this._internalTextureToImage)[u=e.getInternalTexture().uniqueId]||(l[u]={}),void 0===(c=l[u][t])&&(f=e.getSize(),c=(0,n.__awaiter)(_,void 0,void 0,function(){var r;return(0,n.__generator)(this,function(n){switch(n.label){case 0:return[4,this._getImageDataAsync(s,f.width,f.height,t)];case 1:return r=n.sent(),[2,this._exportImage(e.name,t,r)]}})}),l[u][t]=c),h=this._exportTextureInfo,[4,c];case 2:p=h.apply(this,[d.sent(),a,e.coordinatesIndex]),this._textureMap[r]=p,this._exporter._extensionsPostExportTextures("exporter",this._textureMap[r],e),d.label=3;case 3:return[2,this._textureMap[r]]}})})},e.prototype._exportImage=function(e,t,r){var n=this._exporter._imageData,s=e.replace(/\.\/|\/|\.\\|\\/g,"_"),a=function(e){switch(e){case"image/jpeg":return".jpg";case"image/png":return".png";case"image/webp":return".webp"}}(t),o=s+a;o in n&&(o="".concat(s,"_").concat(i.Tools.RandomId()).concat(a)),n[o]={data:r,mimeType:t};var l=this._exporter._images;return l.push({name:e,uri:o}),l.length-1},e.prototype._exportTextureInfo=function(e,t,r){var n=this._exporter._textures,i=n.findIndex(function(r){return r.s
1ampler==t&&r.source===e});-1===i&&(i=n.length,n.push({source:e,sampler:t}));var s={index:i};return r&&(s.texCoord=r),s},e.prototype._exportTextureSampler=function(e){var t=this._getTextureSampler(e),r=this._exporter._samplers,n=r.findIndex(function(e){return e.minFilter===t.minFilter&&e.magFilter===t.magFilter&&e.wrapS===t.wrapS&&e.wrapT===t.wrapT});return -1!==n?n:(r.push(t),r.length-1)},e._DielectricSpecular=new i.Color3(.04,.04,.04),e._MaxSpecularPower=1024,e._Epsilon=1e-6,e}()},
1"../../../dev/serializers/src/glTF/2.0/glTFSerializer.ts":(e,t,r)=>{r.r(t),r.d(t,{GLTF2Export:()=>i});var n=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),i=function(){function e(){}return e.GLTFAsync=function(e,t,r){return e.whenReadyAsync().then(function(){var i=t.replace(/\.[^/.]+$/,"");return new n._Exporter(e,r)._generateGLTFAsync(i)})},e._PreExportAsync=function(e,t){return Promise.resolve().then(function(){return t&&t.exportWithoutWaitingForScene?Promise.resolve():e.whenReadyAsync()})},e._PostExportAsync=function(e,t,r){return Promise.resolve().then(function(){return r&&r.exportWithoutWaitingForScene,t})},e.GLBAsync=function(e,t,r){var i=this;return this._PreExportAsync(e,r).then(function(){var s=t.replace(/\.[^/.]+$/,"");return new n._Exporter(e,r)._generateGLBAsync(s).then(function(t){return i._PostExportAsync(e,t,r)})})},e}()},
1"../../../dev/serializers/src/glTF/2.0/glTFUtilities.ts":(e,t,r)=>{r.r(t),r.d(t,{_GLTFUtilities:()=>i});var n=r("babylonjs/Maths/math.vector"),i=function(){function e(){}return e._CreateBufferView=function(e,t,r,n,i){var s={buffer:e,byteLength:r};return t&&(s.byteOffset=t),i&&(s.name=i),n&&(s.byteStride=n),s},e._CreateAccessor=function(e,t,r,n,i,s,a,o){var l={name:t,bufferView:e,componentType:n,count:i,type:r};return null!=a&&(l.min=a),null!=o&&(l.max=o),null!=s&&(l.byteOffset=s),l},e._CalculateMinMaxPositions=function(e,t,r){var i,s,a=[1/0,1/0,1/0],o=[-1/0,-1/0,-1/0];if(r)for(var l=t,u=t+r;l<u;++l){i=3*l,s=n.Vector3.FromArray(e,i).asArray();for(var c=0;c<3;++c){var f=s[c];f<a[c]&&(a[c]=f),f>o[c]&&(o[c]=f),++i}}return{min:a,max:o}},e._NormalizeTangentFromRef=function(e){var t=Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z);t>0&&(e.x/=t,e.y/=t,e.z/=t)},e._GetDataAccessorElementCount=function(e){switch(e){case"MAT2":case"VEC4":return 4;case"MAT3":return 9;case"MAT4":return 16;case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3}},e}()},
1"../../../dev/serializers/src/glTF/2.0/index.ts":(e,t,r)=>{r.r(t),r.d(t,{EXT_mesh_gpu_instancing:()=>c.EXT_mesh_gpu_instancing,GLTF2Export:()=>l.GLTF2Export,GLTFData:()=>i.GLTFData,KHR_lights_punctual:()=>c.KHR_lights_punctual,KHR_materials_anisotropy:()=>c.KHR_materials_anisotropy,KHR_materials_clearcoat:()=>c.KHR_materials_clearcoat,KHR_materials_dispersion:()=>c.KHR_materials_dispersion,KHR_materials_emissive_strength:()=>c.KHR_materials_emissive_strength,KHR_materials_ior:()=>c.KHR_materials_ior,KHR_materials_iridescence:()=>c.KHR_materials_iridescence,KHR_materials_sheen:()=>c.KHR_materials_sheen,KHR_materials_specular:()=>c.KHR_materials_specular,KHR_materials_transmission:()=>c.KHR_materials_transmission,KHR_materials_unlit:()=>c.KHR_materials_unlit,KHR_materials_volume:()=>c.KHR_materials_volume,KHR_texture_transform:()=>c.KHR_texture_transform,_BinaryWriter:()=>s._BinaryWriter,_Exporter:()=>s._Exporter,_GLTFAnimation:()=>n._GLTFAnimation,_GLTFMaterialExporter:()=>o._GLTFMaterialExporter,_GLTFUtilities:()=>u._GLTFUtilities,__IGLTFExporterExtensionV2:()=>a.__IGLTFExporterExtensionV2});var n=r("../../../dev/serializers/src/glTF/2.0/glTFAnimation.ts"),i=r("../../../dev/serializers/src/glTF/2.0/glTFData.ts"),s=r("../../../dev/serializers/src/glTF/2.0/glTFExporter.ts"),a=r("../../../dev/serializers/src/glTF/2.0/glTFExporterExtension.ts"),o=r("../../../dev/serializers/src/glTF/2.0/glTFMaterialExporter.ts"),l=r("../../../dev/serializers/src/glTF/2.0/glTFSerializer.ts"),u=r("../../../dev/serializers/src/glTF/2.0/glTFUtilities.ts"),c=r("../../../dev/serializers/src/glTF/2.0/Extensions/index.ts")},
1"../../../dev/serializers/src/glTF/glTFFileExporter.ts":(e,t,r)=>{r.r(t),r.d(t,{__IGLTFExporterExtension:()=>n});var n=0},
1"../../../dev/serializers/src/glTF/index.ts":(e,t,r)=>{r.r(t),r.d(t,{EXT_mesh_gpu_instancing:()=>i.EXT_mesh_gpu_instancing,GLTF2Export:()=>i.GLTF2Export,GLTFData:()=>i.GLTFData,KHR_lights_punctual:()=>i.KHR_lights_punctual,KHR_materials_anisotropy:()=>i.KHR_materials_anisotropy,KHR_materials_clearcoat:()=>i.KHR_materials_clearcoat,KHR_materials_dispersion:()=>i.KHR_materials_dispersion,KHR_materials_emissive_strength:()=>i.KHR_materials_emissive_strength,KHR_materials_ior:()=>i.KHR_materials_ior,KHR_materials_iridescence:()=>i.KHR_materials_iridescence,KHR_materials_sheen:()=>i.KHR_materials_sheen,KHR_materials_specular:()=>i.KHR_materials_specular,KHR_materials_transmission:()=>i.KHR_materials_transmission,KHR_materials_unlit:()=>i.KHR_materials_unlit,KHR_materials_volume:()=>i.KHR_materials_volume,KHR_texture_transform:()=>i.KHR_texture_transform,_BinaryWriter:()=>i._BinaryWriter,_Exporter:()=>i._Exporter,_GLTFAnimation:()=>i._GLTFAnimation,_GLTFMaterialExporter:()=>i._GLTFMaterialExporter,_GLTFUtilities:()=>i._GLTFUtilities,__IGLTFExporterExtension:()=>n.__IGLTFExporterExtension,__IGLTFExporterExtensionV2:()=>i.__IGLTFExporterExtensionV2});var n=r("../../../dev/serializers/src/glTF/glTFFileExporter.ts"),i=r("../../../dev/serializers/src/glTF/2.0/index.ts")},
1"../../../dev/serializers/src/index.ts":(e,t,r)=>{r.r(t),r.d(t,{EXT_mesh_gpu_instancing:()=>i.EXT_mesh_gpu_instancing,GLTF2Export:()=>i.GLTF2Export,GLTFData:()=>i.GLTFData,KHR_lights_punctual:()=>i.KHR_lights_punctual,KHR_materials_anisotropy:()=>i.KHR_materials_anisotropy,KHR_materials_clearcoat:()=>i.KHR_materials_clearcoat,KHR_materials_dispersion:()=>i.KHR_materials_dispersion,KHR_materials_emissive_strength:()=>i.KHR_materials_emissive_strength,KHR_materials_ior:()=>i.KHR_materials_ior,KHR_materials_iridescence:()=>i.KHR_materials_iridescence,KHR_materials_sheen:()=>i.KHR_materials_sheen,KHR_materials_specular:()=>i.KHR_materials_specular,KHR_materials_transmission:()=>i.KHR_materials_transmission,KHR_materials_unlit:()=>i.KHR_materials_unlit,KHR_materials_volume:()=>i.KHR_materials_volume,KHR_texture_transform:()=>i.KHR_texture_transform,OBJExport:()=>n.OBJExport,STLExport:()=>s.STLExport,_BinaryWriter:()=>i._BinaryWriter,_Exporter:()=>i._Exporter,_GLTFAnimation:()=>i._GLTFAnimation,_GLTFMaterialExporter:()=>i._GLTFMaterialExporter,_GLTFUtilities:()=>i._GLTFUtilities,__IGLTFExporterExtension:()=>i.__IGLTFExporterExtension,__IGLTFExporterExtensionV2:()=>i.__IGLTFExporterExtensionV2});var n=r("../../../dev/serializers/src/OBJ/index.ts"),i=r("../../../dev/serializers/src/glTF/index.ts"),s=r("../../../dev/serializers/src/stl/index.ts")},
1"../../../dev/serializers/src/stl/index.ts":(e,t,r)=>{r.r(t),r.d(t,{STLExport:()=>n.STLExport});var n=r("../../../dev/serializers/src/stl/stlSerializer.ts")},
1"../../../dev/serializers/src/stl/stlSerializer.ts":(e,t,r)=>{r.r(t),r.d(t,{STLExport:()=>i});var n=r("babylonjs/Maths/math.vector"),i=function(){function e(){}return e.CreateSTL=function(e,t,r,i,s,a,o,l){void 0===t&&(t=!0),void 0===r&&(r="stlmesh"),void 0===i&&(i=!1),void 0===s&&(s=!0),void 0===a&&(a=!1),void 0===o&&(o=!1),void 0===l&&(l=!1);var u=function(e,t,r,n){return t=c(e,t,r.x,n),t=c(e,t,r.y,n),c(e,t,r.z,n)},c=function(e,t,r,n){return e.setFloat32(t,r,n),t+4};o&&(a=!0);var f="",p=0,h=0;if(i){for(var _=0;_<e.length;_++){var d=e[_],m=d.getIndices();p+=m?m.length/3:0}f=new DataView(new ArrayBuffer(84+50*p)),h+=80,f.setUint32(h,p,s),h+=4}else l||(f="solid stlmesh\r\n");for(var _=0;_<e.length;_++){var d=e[_];!i&&l&&(f+="solid "+d.name+"\r\n"),!a&&d instanceof n.Mesh&&d.bakeCurrentTransformIntoVertices();for(var g=function(e){if(!o)return e.getVerticesData(n.VertexBuffer.PositionKind)||[];var t=e;e instanceof n.InstancedMesh&&(t=e.sourceMesh);var r=t.getVerticesData(n.VertexBuffer.PositionKind,!0,!0);if(!r)return[];var i=n.Vector3.Zero(),s=void 0;for(s=0;s<r.length;s+=3)n.Vector3.TransformCoordinatesFromFloatsToRef(r[s],r[s+1],r[s+2],e.computeWorldMatrix(!0),i).toArray(r,s);return r}(d),m=d.getIndices()||[],x=0;x<m.length;x+=3){var y=function(e,t,r){var i=[3*e[r],3*e[r+1],3*e[r+2]],s=[new n.Vector3(t[i[0]],t[i[0]+2],t[i[0]+1]),new n.Vector3(t[i[1]],t[i[1]+2],t[i[1]+1]),new n.Vector3(t[i[2]],t[i[2]+2],t[i[2]+1])],a=s[0].subtract(s[1]),o=s[2].subtract(s[1]);return{v:s,n:n.Vector3.Cross(o,a).normalize()}}(m,g,x);i?(h=u(f,h,y.n,s),h=u(f,h,y.v[0],s),h=u(f,h,y.v[1],s),h=u(f,h,y.v[2],s)+2):(f+="	facet normal "+y.n.x+" "+y.n.y+" "+y.n.z+"\r\n",f+="		outer loop\r\n",f+="			vertex "+y.v[0].x+" "+y.v[0].y+" "+y.v[0].z+"\r\n",f+="			vertex "+y.v[1].x+" "+y.v[1].y+" "+y.v[1].z+"\r\n",f+="			vertex "+y.v[2].x+" "+y.v[2].y+" "+y.v[2].z+"\r\n",f+="		endloop\r\n",f+="	endfacet\r\n")}!i&&l&&(f+="endsolid "+name+"\r\n")}if(i||l||(f+="endsolid stlmesh"),t){var T=document.createElement("a"),v=new Blob([f],{type:"application/octet-stream"});T.href=window.URL.createObjectURL(v),T.download=r+".stl",T.click()}return f},e}()},
1"../../../lts/serializers/src/legacy/legacy-glTF2Serializer.ts":(e,t,r)=>{r.r(t),r.d(t,{EXT_mesh_gpu_instancing:()=>o.EXT_mesh_gpu_instancing,GLTF2Export:()=>o.GLTF2Export,GLTFData:()=>o.GLTFData,KHR_lights_punctual:()=>o.KHR_lights_punctual,KHR_materials_anisotropy:()=>o.KHR_materials_anisotropy,KHR_materials_clearcoat:()=>o.KHR_materials_clearcoat,KHR_materials_dispersion:()=>o.KHR_materials_dispersion,KHR_materials_emissive_strength:()=>o.KHR_materials_emissive_strength,KHR_materials_ior:()=>o.KHR_materials_ior,KHR_materials_iridescence:()=>o.KHR_materials_iridescence,KHR_materials_sheen:()=>o.KHR_materials_sheen,KHR_materials_specular:()=>o.KHR_materials_specular,KHR_materials_transmission:()=>o.KHR_materials_transmission,KHR_materials_unlit:()=>o.KHR_materials_unlit,KHR_materials_volume:()=>o.KHR_materials_volume,KHR_texture_transform:()=>o.KHR_texture_transform,_BinaryWriter:()=>o._BinaryWriter,_Exporter:()=>o._Exporter,_GLTFAnimation:()=>o._GLTFAnimation,_GLTFMaterialExporter:()=>o._GLTFMaterialExporter,_GLTFUtilities:()=>o._GLTFUtilities,__IGLTFExporterExtension:()=>n.__IGLTFExporterExtension,__IGLTFExporterExtensionV2:()=>o.__IGLTFExporterExtensionV2});var n=r("../../../dev/serializers/src/glTF/glTFFileExporter.ts"),i=r("../../../dev/serializers/src/glTF/2.0/glTFData.ts"),s=r("../../../dev/serializers/src/glTF/2.0/glTFSerializer.ts"),a=r("../../../dev/serializers/src/glTF/2.0/Extensions/index.ts"),o=r("../../../dev/serializers/src/glTF/2.0/index.ts"),l=void 0!==r.g?r.g:"undefined"!=typeof window?window:void 0;if(void 0!==l){l.BABYLON=l.BABYLON||{};var u=l.BABYLON;u.GLTF2=u.GLTF2||{},u.GLTF2.Exporter=u.GLTF2.Exporter||{},u.GLTF2.Exporter.Extensions=u.GLTF2.Exporter.Extensions||{};var c=[];for(var f in n)u[f]=n[f],c.push(f);for(var f in i)u[f]=i[f],c.push(f);for(var f in s)u[f]=s[f],c.push(f);for(var f in a)u.GLTF2.Exporter.Extensions[f]=a[f],c.push(f);for(var f in o)c.indexOf(f)>-1||(u.GLTF2.Exporter[f]=o[f])}},
1"../../../lts/serializers/src/legacy/legacy-objSerializer.ts":(e,t,r)=>{r.r(t),r.d(t,{OBJExport:()=>n.OBJExport});var n=r("../../../dev/serializers/src/OBJ/index.ts"),i=void 0!==r.g?r.g:"undefined"!=typeof window?window:void 0;if(void 0!==i)for(var s in n)i.BABYLON[s]=n[s]},
1"../../../lts/serializers/src/legacy/legacy-stlSerializer.ts":(e,t,r)=>{r.r(t),r.d(t,{STLExport:()=>n.STLExport});var n=r("../../../dev/serializers/src/stl/index.ts"),i=void 0!==r.g?r.g:"undefined"!=typeof window?window:void 0;if(void 0!==i)for(var s in n)i.BABYLON[s]=n[s]},
1"../../../lts/serializers/src/legacy/legacy.ts":(e,t,r)=>{r.r(t),r.d(t,{EXT_mesh_gpu_instancing:()=>n.EXT_mesh_gpu_instancing,GLTF2Export:()=>n.GLTF2Export,GLTFData:()=>n.GLTFData,KHR_lights_punctual:()=>n.KHR_lights_punctual,KHR_materials_anisotropy:()=>n.KHR_materials_anisotropy,KHR_materials_clearcoat:()=>n.KHR_materials_clearcoat,KHR_materials_dispersion:()=>n.KHR_materials_dispersion,KHR_materials_emissive_strength:()=>n.KHR_materials_emissive_strength,KHR_materials_ior:()=>n.KHR_materials_ior,KHR_materials_iridescence:()=>n.KHR_materials_iridescence,KHR_materials_sheen:()=>n.KHR_materials_sheen,KHR_materials_specular:()=>n.KHR_materials_specular,KHR_materials_transmission:()=>n.KHR_materials_transmission,KHR_materials_unlit:()=>n.KHR_materials_unlit,KHR_materials_volume:()=>n.KHR_materials_volume,KHR_texture_transform:()=>n.KHR_texture_transform,OBJExport:()=>i.OBJExport,STLExport:()=>s.STLExport,_BinaryWriter:()=>n._BinaryWriter,_Exporter:()=>n._Exporter,_GLTFAnimation:()=>n._GLTFAnimation,_GLTFMaterialExporter:()=>n._GLTFMaterialExporter,_GLTFUtilities:()=>n._GLTFUtilities,__IGLTFExporterExtension:()=>n.__IGLTFExporterExtension,__IGLTFExporterExtensionV2:()=>n.__IGLTFExporterExtensionV2}),r("../../../dev/serializers/src/index.ts");var n=r("../../../lts/serializers/src/legacy/legacy-glTF2Serializer.ts"),i=r("../../../lts/serializers/src/legacy/legacy-objSerializer.ts"),s=r("../../../lts/serializers/src/legacy/legacy-stlSerializer.ts")},"babylonjs/Maths/math.vector":e=>{e.exports=n},
vendor: 10,098 bytes, line 1
1"../../../../node_modules/tslib/tslib.es6.mjs":(e,t,r)=>{r.r(t),r.d(t,{__addDisposableResource:()=>B,__assign:()=>s,__asyncDelegator:()=>A,__asyncGenerator:()=>F,__asyncValues:()=>R,__await:()=>E,__awaiter:()=>_,__classPrivateFieldGet:()=>V,__classPrivateFieldIn:()=>K,__classPrivateFieldSet:()=>I,__createBinding:()=>m,__decorate:()=>o,__disposeResources:()=>P,__esDecorate:()=>u,__exportStar:()=>g,__extends:()=>i,__generator:()=>d,__importDefault:()=>C,__importStar:()=>S,__makeTemplateObject:()=>M,__metadata:()=>h,__param:()=>l,__propKey:()=>f,__read:()=>y,__rest:()=>a,__runInitializers:()=>c,__setFunctionName:()=>p,__spread:()=>T,__spreadArray:()=>b,__spreadArrays:()=>v,__values:()=>x,default:()=>O});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function o(e,t,r,n){var i,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,r,a):i(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a}function l(e,t){return function(r,n){t(r,n,e)}}function u(e,t,r,n,i,s){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var o,l=n.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?n.static?e:e.prototype:null,f=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),p=!1,h=r.length-1;h>=0;h--){var _={};for(var d in n)_[d]="access"===d?{}:n[d];for(var d in n.access)_.access[d]=n.access[d];_.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");s.push(a(e||null))};var m=(0,r[h])("accessor"===l?{get:f.get,set:f.set}:f[u],_);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(o=a(m.get))&&(f.get=o),(o=a(m.set))&&(f.set=o),(o=a(m.init))&&i.unshift(o)}else(o=a(m))&&("field"===l?i.unshift(o):f[u]=o)}c&&Object.defineProperty(c,n.name,f),p=!0}function c(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function _(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function o(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((n=n.apply(e,t||[])).next())})}function d(e,t){var r,n,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){var u=[o,l];if(r)throw TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var m=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function g(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||m(t,e,r)}function x(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return a}function T(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}function v(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var s=arguments[t],a=0,o=s.length;a<o;a++,i++)n[i]=s[a];return n}function b(e,t,r){if(r||2==arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function E(e){return this instanceof E?(this.v=e,this):new E(e)}function F(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise(function(r,n){s.push([e,t,r,n])>1||o(e,t)})})}function o(e,t){try{var r;(r=i[e](t)).value instanceof E?Promise.resolve(r.value.v).then(l,u):c(s[0][2],r)}catch(e){c(s[0][3],e)}}function l(e){o("next",e)}function u(e){o("throw",e)}function c(e,t){e(t),s.shift(),s.length&&o(s[0][0],s[0][1])}}function A(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:E(e[n](t)),done:!1}:i?i(t):t}:i}}function R(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=x(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){var s,a,o;s=n,a=i,o=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){s({value:e,done:o})},a)})}}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var w=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return w(t,e),t}function C(e){return e&&e.__esModule?e:{default:e}}function V(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function I(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function K(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function B(e,t,r){if(null!=t){var n;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var L="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function P(e){function t(t){e.error=e.hasError?new L(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(e){return t(e),r()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}let O={__extends:i,__assign:s,__rest:a,__decorate:o,__param:l,__metadata:h,__awaiter:_,__generator:d,__createBinding:m,__exportStar:g,__values:x,__read:y,__spread:T,__spreadArrays:v,__spreadArray:b,__await:E,__asyncGenerator:F,__asyncDelegator:A,__asyncValues:R,__makeTemplateObject:M,__importStar:S,__importDefault:C,__classPrivateFieldGet:V,__classPrivateFieldSet:I,__classPrivateFieldIn:K,__addDisposableResource:B,__disposeResources:P}}
1},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};r.r(i),r.d(i,{default:()=>a,serializers:()=>s});var s=r("../../../lts/serializers/src/legacy/legacy.ts");let a=s;return i.default})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.