@abi-software/scaffoldvuer 1.15.2 → 1.15.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32283,7 +32283,7 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32283
32283
  /* 2 */
32284
32284
  /***/
32285
32285
  (o) => {
32286
- o.exports = /* @__PURE__ */ JSON.parse('{"name":"zincjs","version":"1.18.7","description":"ZincJS (Web-based-Zinc-Visualisation)","main":"build/zinc.js","directories":{"doc":"docs"},"files":["package.json","LICENSE","README.md","src/*","build/zinc.js","build/zinc.frontend.js","build/zinc.js.map","webpack.config.js"],"scripts":{"build-bundle":"webpack --config webpack.frontend.js; webpack --config webpack.backend.js","build-backend":"webpack --config webpack.backend.js","test":"npm --prefix ./test install && npm --prefix ./test run test-ci","changelog":"auto-changelog -p --output CHANGELOG.md --template keepachangelog","jsdoc":"jsdoc -c jsdoc_conf.json","version":"npm run build-bundle;npm run jsdoc;npm run changelog; git add CHANGELOG.md docs","release:beta":"npm version prerelease --preid=beta; npm publish --tag beta","release:minor":"npm version minor; npm publish","release:patch":"npm version patch; npm publish"},"repository":{"type":"git","url":"git+https://github.com/alan-wu/ZincJS.git"},"keywords":["library","webgl","3d","zincjs"],"author":"Alan Wu <alan.wu@auckland.ac.nz>","license":"MIT","bugs":{"url":"https://github.com/alan-wu/ZincJS/issues"},"homepage":"http://alan-wu.github.io/ZincJS/","devDependencies":{"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","auto-changelog":"^2.4.0","babel-loader":"^9.1.3","babel-preset-minify":"^0.5.1","file-loader":"^6.2.0","jsdoc":"^4.0.2","raw-loader":"^4.0.2","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"dependencies":{"css-element-queries":"^1.2.2","lodash":"^4.17.19","promise-polyfill":"^8.1.3","three":"^0.130.1","three-spritetext":"1.6.2","url-loader":"^4.1.1","url-polyfill":"^1.1.7","webworkify-webpack":"^2.1.5"}}');
32286
+ o.exports = /* @__PURE__ */ JSON.parse('{"name":"zincjs","version":"1.18.8","description":"ZincJS (Web-based-Zinc-Visualisation)","main":"build/zinc.js","directories":{"doc":"docs"},"files":["package.json","LICENSE","README.md","src/*","build/zinc.js","build/zinc.frontend.js","build/zinc.js.map","webpack.config.js"],"scripts":{"build-bundle":"webpack --config webpack.frontend.js; webpack --config webpack.backend.js","build-backend":"webpack --config webpack.backend.js","test":"npm --prefix ./test install && npm --prefix ./test run test-ci","changelog":"auto-changelog -p --output CHANGELOG.md --template keepachangelog","jsdoc":"jsdoc -c jsdoc_conf.json","version":"npm run build-bundle;npm run jsdoc;npm run changelog; git add CHANGELOG.md docs","release:beta":"npm version prerelease --preid=beta; npm publish --tag beta","release:minor":"npm version minor; npm publish","release:patch":"npm version patch; npm publish"},"repository":{"type":"git","url":"git+https://github.com/alan-wu/ZincJS.git"},"keywords":["library","webgl","3d","zincjs"],"author":"Alan Wu <alan.wu@auckland.ac.nz>","license":"MIT","bugs":{"url":"https://github.com/alan-wu/ZincJS/issues"},"homepage":"http://alan-wu.github.io/ZincJS/","devDependencies":{"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","auto-changelog":"^2.4.0","babel-loader":"^9.1.3","babel-preset-minify":"^0.5.1","file-loader":"^6.2.0","jsdoc":"^4.0.2","raw-loader":"^4.0.2","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"dependencies":{"css-element-queries":"^1.2.2","lodash":"^4.17.19","promise-polyfill":"^8.1.3","three":"^0.130.1","three-spritetext":"1.6.2","url-loader":"^4.1.1","url-polyfill":"^1.1.7","webworkify-webpack":"^2.1.5"}}');
32287
32287
  },
32288
32288
  /* 3 */
32289
32289
  /***/
@@ -33568,7 +33568,7 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33568
33568
  if (y && (g = y.getPosition(), this.group.remove(y.getSprite()), y.dispose(), y = void 0), v && (typeof v == "string" || v instanceof String)) {
33569
33569
  y = new (c(17)).Label(v, M), y.setPosition(g[0], g[1], g[2]);
33570
33570
  var w = y.getSprite();
33571
- w.material.alphaTest = 0.5, w.material.transparent = !0, w.material.depthWrite = !1, w.material.depthTest = labelDepthTest, this.group.add(y.getSprite());
33571
+ w.material.alphaTest = 0.5, w.material.transparent = !0, w.material.depthWrite = !1, this.group.add(y.getSprite());
33572
33572
  }
33573
33573
  }, this.hideLabel = () => {
33574
33574
  y && (g = y.getPosition(), this.group.remove(y.getSprite()), y.dispose(), y = void 0);
@@ -3179,9 +3179,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3179
3179
  `),s=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP"," vec4 texelGlossiness = texture2D( glossinessMap, vUv );"," // reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture"," glossinessFactor *= texelGlossiness.a;","#endif"].join(`
3180
3180
  `),o=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb * ( 1. - max( specularFactor.r, max( specularFactor.g, specularFactor.b ) ) );","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 ); // 0.0525 corresponds to the base mip of a 256 cubemap.","material.specularRoughness += geometryRoughness;","material.specularRoughness = min( material.specularRoughness, 1.0 );","material.specularColor = specularFactor;"].join(`
3181
3181
  `),l={specular:{value:new Ce().setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=l,this.onBeforeCompile=function(u){for(const c in l)u.uniforms[c]=l[c];u.fragmentShader=u.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",t).replace("#include <metalnessmap_pars_fragment>",i).replace("#include <roughnessmap_fragment>",r).replace("#include <metalnessmap_fragment>",s).replace("#include <lights_physical_fragment>",o)},Object.defineProperties(this,{specular:{get:function(){return l.specular.value},set:function(u){l.specular.value=u}},specularMap:{get:function(){return l.specularMap.value},set:function(u){l.specularMap.value=u,u?this.defines.USE_SPECULARMAP="":delete this.defines.USE_SPECULARMAP}},glossiness:{get:function(){return l.glossiness.value},set:function(u){l.glossiness.value=u}},glossinessMap:{get:function(){return l.glossinessMap.value},set:function(u){l.glossinessMap.value=u,u?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_UV=""):(delete this.defines.USE_GLOSSINESSMAP,delete this.defines.USE_UV)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}copy(e){return super.copy(e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this}}class fD{constructor(){this.name=nt.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,this.specularGlossinessParams=["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"]}getMaterialType(){return df}extendParams(e,t,i){const r=t.extensions[this.name];e.color=new Ce(1,1,1),e.opacity=1;const s=[];if(Array.isArray(r.diffuseFactor)){const o=r.diffuseFactor;e.color.fromArray(o),e.opacity=o[3]}if(r.diffuseTexture!==void 0&&s.push(i.assignTexture(e,"map",r.diffuseTexture)),e.emissive=new Ce(0,0,0),e.glossiness=r.glossinessFactor!==void 0?r.glossinessFactor:1,e.specular=new Ce(1,1,1),Array.isArray(r.specularFactor)&&e.specular.fromArray(r.specularFactor),r.specularGlossinessTexture!==void 0){const o=r.specularGlossinessTexture;s.push(i.assignTexture(e,"glossinessMap",o)),s.push(i.assignTexture(e,"specularMap",o))}return Promise.all(s)}createMaterial(e){const t=new df(e);return t.fog=!0,t.color=e.color,t.map=e.map===void 0?null:e.map,t.lightMap=null,t.lightMapIntensity=1,t.aoMap=e.aoMap===void 0?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=1,t.emissiveMap=e.emissiveMap===void 0?null:e.emissiveMap,t.bumpMap=e.bumpMap===void 0?null:e.bumpMap,t.bumpScale=1,t.normalMap=e.normalMap===void 0?null:e.normalMap,t.normalMapType=tr,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=e.specularMap===void 0?null:e.specularMap,t.specular=e.specular,t.glossinessMap=e.glossinessMap===void 0?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=e.envMap===void 0?null:e.envMap,t.envMapIntensity=1,t.refractionRatio=.98,t}}class pD{constructor(){this.name=nt.KHR_MESH_QUANTIZATION}}class _o extends ni{constructor(e,t,i,r){super(e,t,i,r)}copySampleValue_(e){const t=this.resultBuffer,i=this.sampleValues,r=this.valueSize,s=e*r*3+r;for(let o=0;o!==r;o++)t[o]=i[s+o];return t}}_o.prototype.beforeStart_=_o.prototype.copySampleValue_,_o.prototype.afterEnd_=_o.prototype.copySampleValue_,_o.prototype.interpolate_=function(n,e,t,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,l=o*2,u=o*3,c=i-e,f=(t-e)/c,d=f*f,p=d*f,g=n*u,m=g-u,h=-2*p+3*d,b=p-d,y=1-h,v=b-d+f;for(let M=0;M!==o;M++){const A=s[m+M+o],_=s[m+M+l]*c,w=s[g+M+o],C=s[g+M]*c;r[M]=y*A+v*_+h*w+b*C}return r};const Di={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},Va={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},mx={9728:wt,9729:gt,9984:qo,9985:Il,9986:Qo,9987:Si},gx={33071:Ut,33648:Rs,10497:er},vx={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},hf={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},br={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},mD={CUBICSPLINE:void 0,LINEAR:Nr,STEP:Is},ff={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function yx(n,e){return typeof n!="string"||n===""?"":(/^https?:\/\//i.test(e)&&/^\//.test(n)&&(e=e.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(n)||/^data:.*,.*$/i.test(n)||/^blob:.*$/i.test(n)?n:e+n)}function gD(n){return n.DefaultMaterial===void 0&&(n.DefaultMaterial=new Yr({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:Ki})),n.DefaultMaterial}function za(n,e,t){for(const i in t.extensions)n[i]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[i]=t.extensions[i])}function os(n,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(n.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function vD(n,e,t){let i=!1,r=!1;for(let l=0,u=e.length;l<u;l++){const c=e[l];if(c.POSITION!==void 0&&(i=!0),c.NORMAL!==void 0&&(r=!0),i&&r)break}if(!i&&!r)return Promise.resolve(n);const s=[],o=[];for(let l=0,u=e.length;l<u;l++){const c=e[l];if(i){const f=c.POSITION!==void 0?t.getDependency("accessor",c.POSITION):n.attributes.position;s.push(f)}if(r){const f=c.NORMAL!==void 0?t.getDependency("accessor",c.NORMAL):n.attributes.normal;o.push(f)}}return Promise.all([Promise.all(s),Promise.all(o)]).then(function(l){const u=l[0],c=l[1];return i&&(n.morphAttributes.position=u),r&&(n.morphAttributes.normal=c),n.morphTargetsRelative=!0,n})}function yD(n,e){if(n.updateMorphTargets(),e.weights!==void 0)for(let t=0,i=e.weights.length;t<i;t++)n.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(n.morphTargetInfluences.length===t.length){n.morphTargetDictionary={};for(let i=0,r=t.length;i<r;i++)n.morphTargetDictionary[t[i]]=i}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function bD(n){const e=n.extensions&&n.extensions[nt.KHR_DRACO_MESH_COMPRESSION];let t;return e?t="draco:"+e.bufferView+":"+e.indices+":"+bx(e.attributes):t=n.indices+":"+bx(n.attributes)+":"+n.mode,t}function bx(n){let e="";const t=Object.keys(n).sort();for(let i=0,r=t.length;i<r;i++)e+=t[i]+":"+n[t[i]]+";";return e}function pf(n){switch(n){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}class xD{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new nD,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.textureCache={},this.nodeNamesUsed={},typeof createImageBitmap<"u"&&/Firefox/.test(navigator.userAgent)===!1?this.textureLoader=new Xh(this.options.manager):this.textureLoader=new Vh(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new yn(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,r=this.json,s=this.extensions;this.cache.removeAll(),this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const l={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:i,userData:{}};za(s,l,r),os(l,r),Promise.all(i._invokeAll(function(u){return u.afterRoot&&u.afterRoot(l)})).then(function(){e(l)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let r=0,s=t.length;r<s;r++){const o=t[r].joints;for(let l=0,u=o.length;l<u;l++)e[o[l]].isBone=!0}for(let r=0,s=e.length;r<s;r++){const o=e[r];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(i[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,i){if(e.refs[t]<=1)return i;const r=i.clone();return r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i<t.length;i++){const r=e(t[i]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const i=[];for(let r=0;r<t.length;r++){const s=e(t[r]);s&&i.push(s)}return i}getDependency(e,t){const i=e+":"+t;let r=this.cache.get(i);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this.loadNode(t);break;case"mesh":r=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(t)});break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(t)});break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(t)});break;case"texture":r=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(t)});break;case"skin":r=this.loadSkin(t);break;case"animation":r=this.loadAnimation(t);break;case"camera":r=this.loadCamera(t);break;default:throw new Error("Unknown type: "+e)}this.cache.add(i,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const i=this,r=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(r.map(function(s,o){return i.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],i=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[nt.KHR_BINARY_GLTF].body);const r=this.options;return new Promise(function(s,o){i.load(yx(t.uri,r.path),s,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(i){const r=t.byteLength||0,s=t.byteOffset||0;return i.slice(s,s+r)})}loadAccessor(e){const t=this,i=this.json,r=this.json.accessors[e];if(r.bufferView===void 0&&r.sparse===void 0)return Promise.resolve(null);const s=[];return r.bufferView!==void 0?s.push(this.getDependency("bufferView",r.bufferView)):s.push(null),r.sparse!==void 0&&(s.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(s).then(function(o){const l=o[0],u=vx[r.type],c=Va[r.componentType],f=c.BYTES_PER_ELEMENT,d=f*u,p=r.byteOffset||0,g=r.bufferView!==void 0?i.bufferViews[r.bufferView].byteStride:void 0,m=r.normalized===!0;let h,b;if(g&&g!==d){const y=Math.floor(p/g),v="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+y+":"+r.count;let M=t.cache.get(v);M||(h=new c(l,y*g,r.count*g/f),M=new hr(h,g/f),t.cache.add(v,M)),b=new Ni(M,u,p%g/f,m)}else l===null?h=new c(r.count*u):h=new c(l,p,r.count*u),b=new Ze(h,u,m);if(r.sparse!==void 0){const y=vx.SCALAR,v=Va[r.sparse.indices.componentType],M=r.sparse.indices.byteOffset||0,A=r.sparse.values.byteOffset||0,_=new v(o[1],M,r.sparse.count*y),w=new c(o[2],A,r.sparse.count*u);l!==null&&(b=new Ze(b.array.slice(),b.itemSize,b.normalized));for(let C=0,P=_.length;C<P;C++){const R=_[C];if(b.setX(R,w[C*u]),u>=2&&b.setY(R,w[C*u+1]),u>=3&&b.setZ(R,w[C*u+2]),u>=4&&b.setW(R,w[C*u+3]),u>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return b})}loadTexture(e){const t=this.json,i=this.options,r=t.textures[e],s=t.images[r.source];let o=this.textureLoader;if(s.uri){const l=i.manager.getHandler(s.uri);l!==null&&(o=l)}return this.loadTextureImage(e,s,o)}loadTextureImage(e,t,i){const r=this,s=this.json,o=this.options,l=s.textures[e],u=(t.uri||t.bufferView)+":"+l.sampler;if(this.textureCache[u])return this.textureCache[u];const c=self.URL||self.webkitURL;let f=t.uri||"",d=!1,p=!0;const g=f.search(/\.jpe?g($|\?)/i)>0||f.search(/^data\:image\/jpeg/)===0;if((t.mimeType==="image/jpeg"||g)&&(p=!1),t.bufferView!==void 0)f=r.getDependency("bufferView",t.bufferView).then(function(h){if(t.mimeType==="image/png"){const y=new DataView(h,25,1).getUint8(0,!1);p=y===6||y===4||y===3}d=!0;const b=new Blob([h],{type:t.mimeType});return f=c.createObjectURL(b),f});else if(t.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const m=Promise.resolve(f).then(function(h){return new Promise(function(b,y){let v=b;i.isImageBitmapLoader===!0&&(v=function(M){const A=new Mt(M);A.needsUpdate=!0,b(A)}),i.load(yx(h,o.path),v,void 0,y)})}).then(function(h){d===!0&&c.revokeObjectURL(f),h.flipY=!1,l.name&&(h.name=l.name),p||(h.format=Ti);const y=(s.samplers||{})[l.sampler]||{};return h.magFilter=mx[y.magFilter]||gt,h.minFilter=mx[y.minFilter]||Si,h.wrapS=gx[y.wrapS]||er,h.wrapT=gx[y.wrapT]||er,r.associations.set(h,{type:"textures",index:e}),h}).catch(function(){return console.error("THREE.GLTFLoader: Couldn't load texture",f),null});return this.textureCache[u]=m,m}assignTexture(e,t,i){const r=this;return this.getDependency("texture",i.index).then(function(s){if(i.texCoord!==void 0&&i.texCoord!=0&&!(t==="aoMap"&&i.texCoord==1)&&console.warn("THREE.GLTFLoader: Custom UV set "+i.texCoord+" for texture "+t+" not yet supported."),r.extensions[nt.KHR_TEXTURE_TRANSFORM]){const o=i.extensions!==void 0?i.extensions[nt.KHR_TEXTURE_TRANSFORM]:void 0;if(o){const l=r.associations.get(s);s=r.extensions[nt.KHR_TEXTURE_TRANSFORM].extendTexture(s,o),r.associations.set(s,l)}}e[t]=s})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const r=t.attributes.tangent!==void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0,l=Object.keys(t.morphAttributes).length>0,u=l&&t.morphAttributes.normal!==void 0;if(e.isPoints){const c="PointsMaterial:"+i.uuid;let f=this.cache.get(c);f||(f=new fr,Ft.prototype.copy.call(f,i),f.color.copy(i.color),f.map=i.map,f.sizeAttenuation=!1,this.cache.add(c,f)),i=f}else if(e.isLine){const c="LineBasicMaterial:"+i.uuid;let f=this.cache.get(c);f||(f=new Vt,Ft.prototype.copy.call(f,i),f.color.copy(i.color),this.cache.add(c,f)),i=f}if(r||s||o||l){let c="ClonedMaterial:"+i.uuid+":";i.isGLTFSpecularGlossinessMaterial&&(c+="specular-glossiness:"),r&&(c+="vertex-tangents:"),s&&(c+="vertex-colors:"),o&&(c+="flat-shading:"),l&&(c+="morph-targets:"),u&&(c+="morph-normals:");let f=this.cache.get(c);f||(f=i.clone(),s&&(f.vertexColors=!0),o&&(f.flatShading=!0),l&&(f.morphTargets=!0),u&&(f.morphNormals=!0),r&&(f.vertexTangents=!0,f.normalScale&&(f.normalScale.y*=-1),f.clearcoatNormalScale&&(f.clearcoatNormalScale.y*=-1)),this.cache.add(c,f),this.associations.set(f,this.associations.get(i))),i=f}i.aoMap&&t.attributes.uv2===void 0&&t.attributes.uv!==void 0&&t.setAttribute("uv2",t.attributes.uv),e.material=i}getMaterialType(){return Yr}loadMaterial(e){const t=this,i=this.json,r=this.extensions,s=i.materials[e];let o;const l={},u=s.extensions||{},c=[];if(u[nt.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){const d=r[nt.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];o=d.getMaterialType(),c.push(d.extendParams(l,s,t))}else if(u[nt.KHR_MATERIALS_UNLIT]){const d=r[nt.KHR_MATERIALS_UNLIT];o=d.getMaterialType(),c.push(d.extendParams(l,s,t))}else{const d=s.pbrMetallicRoughness||{};if(l.color=new Ce(1,1,1),l.opacity=1,Array.isArray(d.baseColorFactor)){const p=d.baseColorFactor;l.color.fromArray(p),l.opacity=p[3]}d.baseColorTexture!==void 0&&c.push(t.assignTexture(l,"map",d.baseColorTexture)),l.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,l.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(c.push(t.assignTexture(l,"metalnessMap",d.metallicRoughnessTexture)),c.push(t.assignTexture(l,"roughnessMap",d.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,l)})))}s.doubleSided===!0&&(l.side=qi);const f=s.alphaMode||ff.OPAQUE;return f===ff.BLEND?(l.transparent=!0,l.depthWrite=!1):(l.transparent=!1,f===ff.MASK&&(l.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==cn&&(c.push(t.assignTexture(l,"normalMap",s.normalTexture)),l.normalScale=new Ae(1,-1),s.normalTexture.scale!==void 0&&l.normalScale.set(s.normalTexture.scale,-s.normalTexture.scale)),s.occlusionTexture!==void 0&&o!==cn&&(c.push(t.assignTexture(l,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(l.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==cn&&(l.emissive=new Ce().fromArray(s.emissiveFactor)),s.emissiveTexture!==void 0&&o!==cn&&c.push(t.assignTexture(l,"emissiveMap",s.emissiveTexture)),Promise.all(c).then(function(){let d;return o===df?d=r[nt.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(l):d=new o(l),s.name&&(d.name=s.name),d.map&&(d.map.encoding=kr),d.emissiveMap&&(d.emissiveMap.encoding=kr),os(d,s),t.associations.set(d,{type:"materials",index:e}),s.extensions&&za(r,d,s),d})}createUniqueName(e){const t=Qe.sanitizeNodeName(e||"");let i=t;for(let r=1;this.nodeNamesUsed[i];++r)i=t+"_"+r;return this.nodeNamesUsed[i]=!0,i}loadGeometries(e){const t=this,i=this.extensions,r=this.primitiveCache;function s(l){return i[nt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(l,t).then(function(u){return wx(u,l,t)})}const o=[];for(let l=0,u=e.length;l<u;l++){const c=e[l],f=bD(c),d=r[f];if(d)o.push(d.promise);else{let p;c.extensions&&c.extensions[nt.KHR_DRACO_MESH_COMPRESSION]?p=s(c):p=wx(new ke,c,t),r[f]={primitive:c,promise:p},o.push(p)}}return Promise.all(o)}loadMesh(e){const t=this,i=this.json,r=this.extensions,s=i.meshes[e],o=s.primitives,l=[];for(let u=0,c=o.length;u<c;u++){const f=o[u].material===void 0?gD(this.cache):this.getDependency("material",o[u].material);l.push(f)}return l.push(t.loadGeometries(o)),Promise.all(l).then(function(u){const c=u.slice(0,u.length-1),f=u[u.length-1],d=[];for(let g=0,m=f.length;g<m;g++){const h=f[g],b=o[g];let y;const v=c[g];if(b.mode===Di.TRIANGLES||b.mode===Di.TRIANGLE_STRIP||b.mode===Di.TRIANGLE_FAN||b.mode===void 0)y=s.isSkinnedMesh===!0?new xa(h,v):new St(h,v),y.isSkinnedMesh===!0&&!y.geometry.attributes.skinWeight.normalized&&y.normalizeSkinWeights(),b.mode===Di.TRIANGLE_STRIP?y.geometry=Mx(y.geometry,_0):b.mode===Di.TRIANGLE_FAN&&(y.geometry=Mx(y.geometry,_d));else if(b.mode===Di.LINES)y=new rn(h,v);else if(b.mode===Di.LINE_STRIP)y=new Qn(h,v);else if(b.mode===Di.LINE_LOOP)y=new gc(h,v);else if(b.mode===Di.POINTS)y=new io(h,v);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+b.mode);Object.keys(y.geometry.morphAttributes).length>0&&yD(y,s),y.name=t.createUniqueName(s.name||"mesh_"+e),os(y,s),b.extensions&&za(r,y,b),t.assignFinalMaterial(y),d.push(y)}if(d.length===1)return d[0];const p=new qn;for(let g=0,m=d.length;g<m;g++)p.add(d[g]);return p})}loadCamera(e){let t;const i=this.json.cameras[e],r=i[i.type];if(!r){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return i.type==="perspective"?t=new kt(Pd.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):i.type==="orthographic"&&(t=new xo(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),i.name&&(t.name=this.createUniqueName(i.name)),os(t,i),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],i={joints:t.joints};return t.inverseBindMatrices===void 0?Promise.resolve(i):this.getDependency("accessor",t.inverseBindMatrices).then(function(r){return i.inverseBindMatrices=r,i})}loadAnimation(e){const i=this.json.animations[e],r=[],s=[],o=[],l=[],u=[];for(let c=0,f=i.channels.length;c<f;c++){const d=i.channels[c],p=i.samplers[d.sampler],g=d.target,m=g.node!==void 0?g.node:g.id,h=i.parameters!==void 0?i.parameters[p.input]:p.input,b=i.parameters!==void 0?i.parameters[p.output]:p.output;r.push(this.getDependency("node",m)),s.push(this.getDependency("accessor",h)),o.push(this.getDependency("accessor",b)),l.push(p),u.push(g)}return Promise.all([Promise.all(r),Promise.all(s),Promise.all(o),Promise.all(l),Promise.all(u)]).then(function(c){const f=c[0],d=c[1],p=c[2],g=c[3],m=c[4],h=[];for(let y=0,v=f.length;y<v;y++){const M=f[y],A=d[y],_=p[y],w=g[y],C=m[y];if(M===void 0)continue;M.updateMatrix(),M.matrixAutoUpdate=!0;let P;switch(br[C.path]){case br.weights:P=vo;break;case br.rotation:P=Kr;break;case br.position:case br.scale:default:P=yo;break}const R=M.name?M.name:M.uuid,I=w.interpolation!==void 0?mD[w.interpolation]:Nr,S=[];br[C.path]===br.weights?M.traverse(function(E){E.isMesh===!0&&E.morphTargetInfluences&&S.push(E.name?E.name:E.uuid)}):S.push(R);let T=_.array;if(_.normalized){const E=pf(T.constructor),L=new Float32Array(T.length);for(let F=0,x=T.length;F<x;F++)L[F]=T[F]*E;T=L}for(let E=0,L=S.length;E<L;E++){const F=new P(S[E]+"."+br[C.path],A.array,T,I);w.interpolation==="CUBICSPLINE"&&(F.createInterpolant=function(O){return new _o(this.times,this.values,this.getValueSize()/3,O)},F.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),h.push(F)}}const b=i.name?i.name:"animation_"+e;return new bo(b,void 0,h)})}createNodeMesh(e){const t=this.json,i=this,r=t.nodes[e];return r.mesh===void 0?null:i.getDependency("mesh",r.mesh).then(function(s){const o=i._getNodeRef(i.meshCache,r.mesh,s);return r.weights!==void 0&&o.traverse(function(l){if(l.isMesh)for(let u=0,c=r.weights.length;u<c;u++)l.morphTargetInfluences[u]=r.weights[u]}),o})}loadNode(e){const t=this.json,i=this.extensions,r=this,s=t.nodes[e],o=s.name?r.createUniqueName(s.name):"";return function(){const l=[],u=r._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(e)});return u&&l.push(u),s.camera!==void 0&&l.push(r.getDependency("camera",s.camera).then(function(c){return r._getNodeRef(r.cameraCache,s.camera,c)})),r._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(e)}).forEach(function(c){l.push(c)}),Promise.all(l)}().then(function(l){let u;if(s.isBone===!0?u=new wa:l.length>1?u=new qn:l.length===1?u=l[0]:u=new Xe,u!==l[0])for(let c=0,f=l.length;c<f;c++)u.add(l[c]);if(s.name&&(u.userData.name=s.name,u.name=o),os(u,s),s.extensions&&za(i,u,s),s.matrix!==void 0){const c=new Oe;c.fromArray(s.matrix),u.applyMatrix4(c)}else s.translation!==void 0&&u.position.fromArray(s.translation),s.rotation!==void 0&&u.quaternion.fromArray(s.rotation),s.scale!==void 0&&u.scale.fromArray(s.scale);return r.associations.set(u,{type:"nodes",index:e}),u})}loadScene(e){const t=this.json,i=this.extensions,r=this.json.scenes[e],s=this,o=new qn;r.name&&(o.name=s.createUniqueName(r.name)),os(o,r),r.extensions&&za(i,o,r);const l=r.nodes||[],u=[];for(let c=0,f=l.length;c<f;c++)u.push(xx(l[c],o,t,s));return Promise.all(u).then(function(){return o})}}function xx(n,e,t,i){const r=t.nodes[n];return i.getDependency("node",n).then(function(s){if(r.skin===void 0)return s;let o;return i.getDependency("skin",r.skin).then(function(l){o=l;const u=[];for(let c=0,f=o.joints.length;c<f;c++)u.push(i.getDependency("node",o.joints[c]));return Promise.all(u)}).then(function(l){return s.traverse(function(u){if(!u.isMesh)return;const c=[],f=[];for(let d=0,p=l.length;d<p;d++){const g=l[d];if(g){c.push(g);const m=new Oe;o.inverseBindMatrices!==void 0&&m.fromArray(o.inverseBindMatrices.array,d*16),f.push(m)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',o.joints[d])}u.bind(new Ma(c,f),u.matrixWorld)}),s})}).then(function(s){e.add(s);const o=[];if(r.children){const l=r.children;for(let u=0,c=l.length;u<c;u++){const f=l[u];o.push(xx(f,s,t,i))}}return Promise.all(o)})}function wD(n,e,t){const i=e.attributes,r=new ln;if(i.POSITION!==void 0){const l=t.json.accessors[i.POSITION],u=l.min,c=l.max;if(u!==void 0&&c!==void 0){if(r.set(new ee(u[0],u[1],u[2]),new ee(c[0],c[1],c[2])),l.normalized){const f=pf(Va[l.componentType]);r.min.multiplyScalar(f),r.max.multiplyScalar(f)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const l=new ee,u=new ee;for(let c=0,f=s.length;c<f;c++){const d=s[c];if(d.POSITION!==void 0){const p=t.json.accessors[d.POSITION],g=p.min,m=p.max;if(g!==void 0&&m!==void 0){if(u.setX(Math.max(Math.abs(g[0]),Math.abs(m[0]))),u.setY(Math.max(Math.abs(g[1]),Math.abs(m[1]))),u.setZ(Math.max(Math.abs(g[2]),Math.abs(m[2]))),p.normalized){const h=pf(Va[p.componentType]);u.multiplyScalar(h)}l.max(u)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}r.expandByVector(l)}n.boundingBox=r;const o=new Ci;r.getCenter(o.center),o.radius=r.min.distanceTo(r.max)/2,n.boundingSphere=o}function wx(n,e,t){const i=e.attributes,r=[];function s(o,l){return t.getDependency("accessor",o).then(function(u){n.setAttribute(l,u)})}for(const o in i){const l=hf[o]||o.toLowerCase();l in n.attributes||r.push(s(i[o],l))}if(e.indices!==void 0&&!n.index){const o=t.getDependency("accessor",e.indices).then(function(l){n.setIndex(l)});r.push(o)}return os(n,e),wD(n,e,t),Promise.all(r).then(function(){return e.targets!==void 0?vD(n,e.targets,t):n})}function Mx(n,e){let t=n.getIndex();if(t===null){const o=[],l=n.getAttribute("position");if(l!==void 0){for(let u=0;u<l.count;u++)o.push(u);n.setIndex(o),t=n.getIndex()}else return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),n}const i=t.count-2,r=[];if(e===_d)for(let o=1;o<=i;o++)r.push(t.getX(0)),r.push(t.getX(o)),r.push(t.getX(o+1));else for(let o=0;o<i;o++)o%2===0?(r.push(t.getX(o)),r.push(t.getX(o+1)),r.push(t.getX(o+2))):(r.push(t.getX(o+2)),r.push(t.getX(o+1)),r.push(t.getX(o)));r.length/3!==i&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=n.clone();return s.setIndex(r),s}const MD=Al(Object.freeze(Object.defineProperty({__proto__:null,GLTFLoader:tD},Symbol.toStringTag,{value:"Module"})));var mf={exports:{}},Ax;function AD(){return Ax||(Ax=1,function(n){function e(c){var f={};function d(g){if(f[g])return f[g].exports;var m=f[g]={i:g,l:!1,exports:{}};return c[g].call(m.exports,m,m.exports,d),m.l=!0,m.exports}d.m=c,d.c=f,d.i=function(g){return g},d.d=function(g,m,h){d.o(g,m)||Object.defineProperty(g,m,{configurable:!1,enumerable:!0,get:h})},d.r=function(g){Object.defineProperty(g,"__esModule",{value:!0})},d.n=function(g){var m=g&&g.__esModule?function(){return g.default}:function(){return g};return d.d(m,"a",m),m},d.o=function(g,m){return Object.prototype.hasOwnProperty.call(g,m)},d.p="/",d.oe=function(g){throw console.error(g),g};var p=d(d.s=ENTRY_MODULE);return p.default||p}var t="[\\.|\\-|\\+|\\w|/|@]+",i="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+t+").*?\\)";function r(c){return(c+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function s(c){return!isNaN(1*c)}function o(c,f,d){var p={};p[d]=[];var g=f.toString(),m=g.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!m)return p;for(var h=m[1],b=new RegExp("(\\\\n|\\W)"+r(h)+i,"g"),y;y=b.exec(g);)y[3]!=="dll-reference"&&p[d].push(y[3]);for(b=new RegExp("\\("+r(h)+'\\("(dll-reference\\s('+t+'))"\\)\\)'+i,"g");y=b.exec(g);)c[y[2]]||(p[d].push(y[1]),c[y[2]]=__webpack_require__(y[1]).m),p[y[2]]=p[y[2]]||[],p[y[2]].push(y[4]);for(var v=Object.keys(p),M=0;M<v.length;M++)for(var A=0;A<p[v[M]].length;A++)s(p[v[M]][A])&&(p[v[M]][A]=1*p[v[M]][A]);return p}function l(c){var f=Object.keys(c);return f.reduce(function(d,p){return d||c[p].length>0},!1)}function u(c,f){for(var d={main:[f]},p={main:[]},g={main:{}};l(d);)for(var m=Object.keys(d),h=0;h<m.length;h++){var b=m[h],y=d[b],v=y.pop();if(g[b]=g[b]||{},!(g[b][v]||!c[b][v])){g[b][v]=!0,p[b]=p[b]||[],p[b].push(v);for(var M=o(c,c[b][v],b),A=Object.keys(M),_=0;_<A.length;_++)d[A[_]]=d[A[_]]||[],d[A[_]]=d[A[_]].concat(M[A[_]])}}return p}n.exports=function(c,f){f=f||{};var d={main:__webpack_modules__},p=f.all?{main:Object.keys(d.main)}:u(d,c),g="";Object.keys(p).filter(function(v){return v!=="main"}).forEach(function(v){for(var M=0;p[v][M];)M++;p[v].push(M),d[v][M]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",g=g+"var "+v+" = ("+e.toString().replace("ENTRY_MODULE",JSON.stringify(M))+")({"+p[v].map(function(A){return""+JSON.stringify(A)+": "+d[v][A].toString()}).join(",")+`});
3182
- `}),g=g+"new (("+e.toString().replace("ENTRY_MODULE",JSON.stringify(c))+")({"+p.main.map(function(v){return""+JSON.stringify(v)+": "+d.main[v].toString()}).join(",")+"}))(self);";var m=new window.Blob([g],{type:"text/javascript"});if(f.bare)return m;var h=window.URL||window.webkitURL||window.mozURL||window.msURL,b=h.createObjectURL(m),y=new window.Worker(b);return y.objectURL=b,y}}(mf)),mf.exports}function SD(n){var e=this.constructor;return this.then(function(t){return e.resolve(n()).then(function(){return t})},function(t){return e.resolve(n()).then(function(){return e.reject(t)})})}function _D(n){var e=this;return new e(function(t,i){if(!(n&&typeof n.length<"u"))return i(new TypeError(typeof n+" "+n+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(n);if(r.length===0)return t([]);var s=r.length;function o(u,c){if(c&&(typeof c=="object"||typeof c=="function")){var f=c.then;if(typeof f=="function"){f.call(c,function(d){o(u,d)},function(d){r[u]={status:"rejected",reason:d},--s===0&&t(r)});return}}r[u]={status:"fulfilled",value:c},--s===0&&t(r)}for(var l=0;l<r.length;l++)o(l,r[l])})}function Sx(n,e){this.name="AggregateError",this.errors=n,this.message=e||""}Sx.prototype=Error.prototype;function TD(n){var e=this;return new e(function(t,i){if(!(n&&typeof n.length<"u"))return i(new TypeError("Promise.any accepts an array"));var r=Array.prototype.slice.call(n);if(r.length===0)return i();for(var s=[],o=0;o<r.length;o++)try{e.resolve(r[o]).then(t).catch(function(l){s.push(l),s.length===r.length&&i(new Sx(s,"All promises were rejected"))})}catch(l){i(l)}})}var ED=setTimeout;function _x(n){return!!(n&&typeof n.length<"u")}function CD(){}function LD(n,e){return function(){n.apply(e,arguments)}}function ft(n){if(!(this instanceof ft))throw new TypeError("Promises must be constructed via new");if(typeof n!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],Ex(n,this)}function Tx(n,e){for(;n._state===3;)n=n._value;if(n._state===0){n._deferreds.push(e);return}n._handled=!0,ft._immediateFn(function(){var t=n._state===1?e.onFulfilled:e.onRejected;if(t===null){(n._state===1?gf:Ua)(e.promise,n._value);return}var i;try{i=t(n._value)}catch(r){Ua(e.promise,r);return}gf(e.promise,i)})}function gf(n,e){try{if(e===n)throw new TypeError("A promise cannot be resolved with itself.");if(e&&(typeof e=="object"||typeof e=="function")){var t=e.then;if(e instanceof ft){n._state=3,n._value=e,vf(n);return}else if(typeof t=="function"){Ex(LD(t,e),n);return}}n._state=1,n._value=e,vf(n)}catch(i){Ua(n,i)}}function Ua(n,e){n._state=2,n._value=e,vf(n)}function vf(n){n._state===2&&n._deferreds.length===0&&ft._immediateFn(function(){n._handled||ft._unhandledRejectionFn(n._value)});for(var e=0,t=n._deferreds.length;e<t;e++)Tx(n,n._deferreds[e]);n._deferreds=null}function RD(n,e,t){this.onFulfilled=typeof n=="function"?n:null,this.onRejected=typeof e=="function"?e:null,this.promise=t}function Ex(n,e){var t=!1;try{n(function(i){t||(t=!0,gf(e,i))},function(i){t||(t=!0,Ua(e,i))})}catch(i){if(t)return;t=!0,Ua(e,i)}}ft.prototype.catch=function(n){return this.then(null,n)},ft.prototype.then=function(n,e){var t=new this.constructor(CD);return Tx(this,new RD(n,e,t)),t},ft.prototype.finally=SD,ft.all=function(n){return new ft(function(e,t){if(!_x(n))return t(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(n);if(i.length===0)return e([]);var r=i.length;function s(l,u){try{if(u&&(typeof u=="object"||typeof u=="function")){var c=u.then;if(typeof c=="function"){c.call(u,function(f){s(l,f)},t);return}}i[l]=u,--r===0&&e(i)}catch(f){t(f)}}for(var o=0;o<i.length;o++)s(o,i[o])})},ft.any=TD,ft.allSettled=_D,ft.resolve=function(n){return n&&typeof n=="object"&&n.constructor===ft?n:new ft(function(e){e(n)})},ft.reject=function(n){return new ft(function(e,t){t(n)})},ft.race=function(n){return new ft(function(e,t){if(!_x(n))return t(new TypeError("Promise.race accepts an array"));for(var i=0,r=n.length;i<r;i++)ft.resolve(n[i]).then(e,t)})},ft._immediateFn=typeof setImmediate=="function"&&function(n){setImmediate(n)}||function(n){ED(n,0)},ft._unhandledRejectionFn=function(e){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};const FD=Al(Object.freeze(Object.defineProperty({__proto__:null,default:ft},Symbol.toStringTag,{value:"Module"})));(function(n,e){(function(i,r){n.exports=r()})(Yi,()=>(()=>{var t=[(o,l,u)=>{u(1);var c=u(2),f=c.version,d=function(){this.Revision=f,this.defaultMaterialColor=16777215,this.defaultOpacity=1,this.modelPrefix=void 0,this.Geometry=u(3).Geometry,this.Glyph=u(16).Glyph,this.Glyphset=u(18).Glyphset,this.Pointset=u(22).Pointset,this.Label=u(17).Label,this.Lines=u(24).Lines,this.TextureArray=u(25).TextureArray,this.TextureSlides=u(27).TextureSlides,this.Renderer=u(30).Renderer,this.Scene=u(32).Scene,this.GeometryCSG=u(51).GeometryCSG,this.GlyphsetCSG=u(57).GlyphsetCSG,this.Viewport=u(44).Viewport,this.CameraControls=u(44).CameraControls,this.SmoothCameraTransition=u(44).SmoothCameraTransition,this.RayCaster=u(44).RayCaster,this.CameraAutoTumble=u(44).CameraAutoTumble,this.StereoEffect=u(44).StereoEffect,this.loadExternalFile=u(5).loadExternalFile,this.loadExternalFiles=u(5).loadExternalFiles,this.THREE=u(4)};o.exports=new d},o=>{o.exports=SR()},o=>{o.exports=JSON.parse('{"name":"zincjs","version":"1.18.7","description":"ZincJS (Web-based-Zinc-Visualisation)","main":"build/zinc.js","directories":{"doc":"docs"},"files":["package.json","LICENSE","README.md","src/*","build/zinc.js","build/zinc.frontend.js","build/zinc.js.map","webpack.config.js"],"scripts":{"build-bundle":"webpack --config webpack.frontend.js; webpack --config webpack.backend.js","build-backend":"webpack --config webpack.backend.js","test":"npm --prefix ./test install && npm --prefix ./test run test-ci","changelog":"auto-changelog -p --output CHANGELOG.md --template keepachangelog","jsdoc":"jsdoc -c jsdoc_conf.json","version":"npm run build-bundle;npm run jsdoc;npm run changelog; git add CHANGELOG.md docs","release:beta":"npm version prerelease --preid=beta; npm publish --tag beta","release:minor":"npm version minor; npm publish","release:patch":"npm version patch; npm publish"},"repository":{"type":"git","url":"git+https://github.com/alan-wu/ZincJS.git"},"keywords":["library","webgl","3d","zincjs"],"author":"Alan Wu <alan.wu@auckland.ac.nz>","license":"MIT","bugs":{"url":"https://github.com/alan-wu/ZincJS/issues"},"homepage":"http://alan-wu.github.io/ZincJS/","devDependencies":{"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","auto-changelog":"^2.4.0","babel-loader":"^9.1.3","babel-preset-minify":"^0.5.1","file-loader":"^6.2.0","jsdoc":"^4.0.2","raw-loader":"^4.0.2","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"dependencies":{"css-element-queries":"^1.2.2","lodash":"^4.17.19","promise-polyfill":"^8.1.3","three":"^0.130.1","three-spritetext":"1.6.2","url-loader":"^4.1.1","url-polyfill":"^1.1.7","webworkify-webpack":"^2.1.5"}}')},function(o,l,u){var c=u(4),f=u(5).toBufferGeometry,d=(g,m,h)=>{var b=f(g,h),y=!1;1>h.opacity&&(y=!0);var v;if(b._video===void 0){var M=h.localTimeEnabled||h.localMorphColour;m?(v=m,v.morphTargets=M,v.morphNormals=h.localTimeEnabled):b instanceof c.BufferGeometry&&b.attributes.color===void 0?v=new c.MeshPhongMaterial({color:h.colour,morphTargets:M,morphNormals:h.localTimeEnabled,transparent:y,opacity:h.opacity,side:c.DoubleSide}):v=new c.MeshPhongMaterial({color:h.colour,morphTargets:M,morphNormals:h.localTimeEnabled,vertexColors:c.VertexColors,transparent:y,opacity:h.opacity,side:c.DoubleSide}),h.localMorphColour&&b.morphAttributes.color&&(v.onBeforeCompile=u(9).augmentMorphColor())}else{var A=b._video.createCanvasVideoTexture();v=new c.MeshBasicMaterial({morphTargets:h.localTimeEnabled,color:new c.Color(1,1,1),transparent:y,opacity:h.opacity,map:A,side:c.DoubleSide}),this.videoHandler=b._video}return new c.Mesh(b,v)},p=function(){u(10).ZincObject.call(this),this.videoHandler=void 0,this.isGeometry=!0,this.createMesh=(g,m,h)=>{if(!(this.morph&&this.morph.geometry&&g!=null)){var b=d(g,m,h);this.setMesh(b,h.localTimeEnabled,h.localMorphColour)}},this.calculateUVs=()=>{this.geometry.computeBoundingBox();var g=this.geometry.boundingBox.max,m=this.geometry.boundingBox.min,h=new c.Vector2(0-m.x,0-m.y),b=new c.Vector2(g.x-m.x,g.y-m.y);this.geometry.faceVertexUvs[0]=[];for(var y=0;y<this.geometry.faces.length;y++){var v=this.geometry.vertices[this.geometry.faces[y].a],M=this.geometry.vertices[this.geometry.faces[y].b],A=this.geometry.vertices[this.geometry.faces[y].c];geometry.faceVertexUvs[0].push([new c.Vector2((v.x+h.x)/b.x,(v.y+h.y)/b.y),new c.Vector2((M.x+h.x)/b.x,(M.y+h.y)/b.y),new c.Vector2((A.x+h.x)/b.x,(A.y+h.y)/b.y)])}geometry.uvsNeedUpdate=!0},this.checkTransparentMesh=function(){this._lod.checkTransparentMesh()},this.setWireframe=g=>{this.morph.material.wireframe=g},this.editVertices=function(g,m){if(g&&g.length){var h=this.getMorph(),b=h.geometry.getAttribute("position");if(!h||0>m)return;var y=3*m;g.forEach(v=>{b.array[y++]=v[0],b.array[y++]=v[1],b.array[y++]=v[2]}),b.needsUpdate=!0,h.geometry.computeBoundingBox(),h.geometry.computeBoundingSphere(),this.boundingBoxUpdateRequired=!0}}};p.prototype=Object.create(u(10).ZincObject.prototype),l.Geometry=p},o=>{o.exports=DB},(o,l,u)=>{var c=u(4),f=u(6).Geometry,d=u(7).default;function p(R){var I=R,S=u(0).modelPrefix;return S&&(S[S.length-1]!="/"&&(S+="/"),/^(?:[a-z]+:)?\/\//i.test(R)||(I=S+R)),I}function g(R,I){var S=(E,L)=>{try{var F=new URL(E,L).href;if(E&&2>E.split("?").length){var x=L.split("?");x.length===2&&(F=F+"?"+x[1])}return F}catch{console.error("There is an issue creating the url link with: ".concat(E,"."))}};if(!Array.isArray(R))return S(R,I);var T=[];return R.forEach(E=>{T.push(S(E,I))}),T}function m(R,I,S,T,E){var L=R.morphTargetInfluences,F=void 0;R.geometry&&(F=R.geometry.morphAttributes);var x=!1;if(L&&F&&F.position){T.set(0,0,0),E.set(0,0,0);for(var O=0;O<L.length;O++)0<L[O]&&(x=!0,S.setFromArray(F.position[O].array),T.add(S.min.multiplyScalar(L[O])),E.add(S.max.multiplyScalar(L[O])));x&&I.set(T,E)}x||I.setFromBufferAttribute(R.geometry.attributes.position),R.updateWorldMatrix(!0,!0),I.applyMatrix4(R.matrixWorld)}function h(R,I,S,T){var E=new XMLHttpRequest;E.open("GET",p(R),!0),E.onreadystatechange=()=>{E.readyState==4&&(E.status==200?S(E.responseText,I):T(R))},E.send(null)}function b(R,I,S){function T(O,B){F[B]=O,L++,L==E&&I(F)}for(var E=R.length,L=0,F=[],x=0;x<E;x++)h(R[x],x,T,S)}l.getColorsRGB=(R,I)=>{var S=Math.floor(I/3),T=I%3,E=0;T==0?E=R[S].r:T==1?E=R[S].g:T==2&&(E=R[S].b);var L=new c.Color(E);return[L.r,L.g,L.b]},l.updateMorphColorAttribute=function(R,I){if(I&&R&&R.morphAttributes&&R.morphAttributes.color){var S=R.morphAttributes.color,T=I.morphTargetInfluences,E=T.length;R.deleteAttribute("morphColor0"),R.deleteAttribute("morphColor1");for(var L=0,F=[],x=0;1>L||x<E;x++)0<T[x]&&(L++,F.push([x,T[x]]));F.length==2?(R.setAttribute("morphColor0",S[F[0][0]]),R.setAttribute("morphColor1",S[F[1][0]])):F.length==1&&(R.setAttribute("morphColor0",S[F[0][0]]),R.setAttribute("morphColor1",S[F[0][0]]))}},l.toBufferGeometry=(R,I)=>{var S;return R instanceof f?(I.localTimeEnabled&&!R.morphNormalsReady&&(R.morphNormals==null||R.morphNormals.length==0)&&R.computeMorphNormals(),S=R.toIndexedBufferGeometry(),I.localMorphColour&&y(R,S)):R instanceof c.BufferGeometry&&(S=R.clone()),S.colorsNeedUpdate=!0,S.computeBoundingBox(),S.computeBoundingSphere(),R._video&&(S._video=R._video),S},l.copyMorphColorsToBufferGeometry=(R,I)=>{if(R&&R.morphColors&&0<R.morphColors.length){for(var S=[],T=R.morphColors,E=u(5).getColorsRGB,L=0,F=T.length;L<F;L++){for(var x=T[L],O=[],B=0;B<R.faces.length;B++){var N=R.faces[B],k=E(x.colors,N.a);O.push(k[0],k[1],k[2]),k=E(x.colors,N.b),O.push(k[0],k[1],k[2]),k=E(x.colors,N.c),O.push(k[0],k[1],k[2])}var z=new c.Float32BufferAttribute(3*(3*R.faces.length),3);z.name=x.name,S.push(z.copyArray(O))}I.morphAttributes.color=S}};var y=(R,I)=>{if(R&&R.morphColors&&0<R.morphColors.length){for(var S=[],T=R.morphColors,E=u(5).getColorsRGB,L=0,F=T.length;L<F;L++){for(var x,O=T[L],B=[],N=0;N<3*O.colors.length;N++)x=E(O.colors,N),B.push(x[0],x[1],x[2]);var k=new c.Float32BufferAttribute(B,3);k.name=O.name,S.push(k)}I.morphAttributes.color=S}};function v(R){for(var I,S,T,E,L=-1,F=0,x=0;x<R.length;++x){if(E=R[x],I===void 0&&(I=E.array.constructor),I!==E.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(S===void 0&&(S=E.itemSize),S!==E.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(T===void 0&&(T=E.normalized),T!==E.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(L===-1&&(L=E.gpuType),L!==E.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;F+=E.count*S}for(var O,B=new I(F),N=new c.BufferAttribute(B,S,T),k=0,z=0;z<R.length;++z){if(O=R[z],O.isInterleavedBufferAttribute)for(var G=k/S,Y=0,Z=O.count;Y<Z;Y++)for(var te,q=0;q<S;q++)te=O.getComponent(Y,q),N.setComponent(Y+G,q,te);else B.set(O.array,k);k+=O.count*S}return L!==void 0&&(N.gpuType=L),N}l.mergeGeometries=function(R){for(var I=1<arguments.length&&arguments[1]!==void 0&&arguments[1],S=R[0].index!==null,T=new Set(Object.keys(R[0].attributes)),E=new Set(Object.keys(R[0].morphAttributes)),L={},F={},x=R[0].morphTargetsRelative,O=new c.BufferGeometry,B=0,N=0;N<R.length;++N){var k=R[N],z=0;if(S!==(k.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+N+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(var G in k.attributes){if(!T.has(G))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+N+'. All geometries must have compatible attributes; make sure "'+G+'" attribute exists among all geometries, or in none of them.'),null;L[G]===void 0&&(L[G]=[]),L[G].push(k.attributes[G]),z++}if(z!==T.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+N+". Make sure all geometries have the same number of attributes."),null;if(x!==k.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+N+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(var Y in k.morphAttributes){if(!E.has(Y))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+N+". .morphAttributes must be consistent throughout all geometries."),null;F[Y]===void 0&&(F[Y]=[]),F[Y].push(k.morphAttributes[Y])}if(I){var Z=void 0;if(S)Z=k.index.count;else if(k.attributes.position!==void 0)Z=k.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+N+". The geometry must have either an index or a position attribute"),null;O.addGroup(B,Z,N),B+=Z}}if(S){for(var te,q=0,W=[],$=0;$<R.length;++$){te=R[$].index;for(var X=0;X<te.count;++X)W.push(te.getX(X)+q);q+=R[$].attributes.position.count}O.setIndex(W)}for(var K in L){var re=v(L[K]);if(!re)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+K+" attribute."),null;O.setAttribute(K,re)}for(var V in F){var j=F[V][0].length;if(j===0)break;O.morphAttributes=O.morphAttributes||{},O.morphAttributes[V]=[];for(var oe,ae=0;ae<j;++ae){oe=[];for(var le=0;le<F[V].length;++le)oe.push(F[V][le][ae]);var H=v(oe);if(!H)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+V+" morphAttribute."),null;O.morphAttributes[V].push(H)}}return O},l.mergeVertices=function(R){var I=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1e-4;I=Math.max(I,Number.EPSILON);for(var S,T={},E=R.getIndex(),L=R.getAttribute("position"),F=E?E.count:L.count,x=0,O=Object.keys(R.attributes),B={},N={},ge=[],k=["getX","getY","getZ","getW"],z=0,G=O.length;z<G;z++){S=O[z],B[S]=[];var Y=R.morphAttributes[S];Y&&(N[S]=Array(Y.length).fill().map(()=>[]))}for(var Z=Math.log10(1/I),te=Math.pow(10,Z),z=0;z<F;z++){for(var q=E?E.getX(z):z,W="",$=0,G=O.length;$<G;$++)for(var S=O[$],X=R.getAttribute(S),K=X.itemSize,re=0;re<K;re++)W+="".concat(~~(X[k[re]](q)*te),",");if(W in T)ge.push(T[W]);else{for(var $=0,G=O.length;$<G;$++)for(var V,S=O[$],X=R.getAttribute(S),Y=R.morphAttributes[S],K=X.itemSize,j=B[S],oe=N[S],re=0;re<K;re++)if(V=k[re],j.push(X[V](q)),Y)for(var ae=0,le=Y.length;ae<le;ae++)oe[ae].push(Y[ae][V](q));T[W]=x,ge.push(x),x++}}for(var H=R.clone(),z=0,G=O.length;z<G;z++){var X,S=O[z],U=R.getAttribute(S),D=new U.array.constructor(B[S]);if(U.isInterleavedBufferAttribute?X=new c.BufferAttribute(D,U.itemSize,U.itemSize):(X=R.getAttribute(S).clone(),X.setArray(D)),H.setAttribute(S,X),S in N)for(var Q,$=0;$<N[S].length;$++)Q=R.morphAttributes[S][$].clone(),Q.setArray(new Q.array.constructor(N[S][$])),H.morphAttributes[S][$]=Q}var ie=Uint8Array;ge.length>=Math.pow(2,8)&&(ie=Uint16Array),ge.length>=Math.pow(2,16)&&(ie=Uint32Array);var ce=new ie(ge),ge=null;return E===null?ge=new c.BufferAttribute(ce,1):(ge=R.getIndex().clone(),ge.setArray(ce)),H.setIndex(ge),H};function M(R){if(R.isMeshPhongMaterial){var I=new c.MeshToonMaterial({color:R.color.clone(),morphTargets:R.morphTargets,morphNormals:R.morphNormals,vertexColors:R.vertexColors,transparent:R.transparent,opacity:R.opacity,side:R.side});return R.map&&(I.map=R.map),I}return R}function A(R,I){if(I&&R>=I.length){var S=new c.BufferGeometry,T=new Float32Array(3*R),E=0;return I.forEach(L=>{T[E++]=L[0],T[E++]=L[1],T[E++]=L[2]}),S.setAttribute("position",new c.BufferAttribute(T,3)),S.setDrawRange(0,I.length),S}}function _(){var R=new Image;R.src=u(8);var I=new c.Texture;return I.image=R,I.needsUpdate=!0,I}function w(R,I,S,T,E,L){var F=new d(R,I,S,T,E,L);return F.fontFace=T,F.fontSize=E,F.fontWeight=L,F.material.map.generateMipmaps=!1,F.material.map.anisotropy=4,F.material.sizeAttenuation=!1,F.material.alphaTest=.5,F.material.transparent=!0,F.material.depthWrite=!1,F.material.depthTest=!1,F.center.set(.5,-1.2),F.renderOrder=1e4,F}function C(R,I,S){if(S){var T=R||"",E=I||"",L=S.lastIndexOf("/");if(-1<L){var F=void 0,x=void 0;if(F=S.substring(0,L),x=S.substring(L+1),(F==="*"||F==="**"||F.toLowerCase()===T.toLowerCase())&&(x==="*"||x==="**"||x.toLowerCase()===E.toLowerCase()))return!0}else if(T.toLowerCase()===S.toLowerCase()||E.toLowerCase()===S.toLowerCase())return!0}return!1}function P(R,I,S){var T=R.getAttribute("position"),E=R.getAttribute("normal");if(T){var L=T.itemSize,F=I*L,x=L,O=!1,B=(N,k)=>{var z=!1,G=Array.from(N.array);if(G.length>=F+x){G.splice(F,x),S&&G.concat(Array(x).fill(0)),z=!0;var Y=new Float32Array(G);R.setAttribute(k,new c.BufferAttribute(Y,L)),R.getAttribute(k).needsUpdate=!0}return z};return O=B(T,"position"),E&&B(E,"normal"),R.index!==null&&console.warn("Removing vertices from indexed geometry requires index buffer recalculation."),O}}l.getBoundingBox=m,l.createNewURL=g,l.createBufferGeometry=A,l.getCircularTexture=_,l.resolveURL=p,l.loadExternalFile=h,l.loadExternalFiles=b,l.PhongToToon=M,l.createNewSpriteText=w,l.isRegionGroup=C,l.removeVertexAtIndex=P},(o,l,u)=>{u.r(l),u.d(l,{Face3:()=>b,Geometry:()=>m});var c=u(4),f=new c.Matrix4,d=new c.Object3D,p=new c.Vector3,g=new c.Vector3;function m(){this.uuid=c.MathUtils.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.normals=[],this.uvs=[],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1,this.morphNormalsReady=!1}m.prototype=Object.assign(Object.create(c.EventDispatcher.prototype),{constructor:m,isGeometry:!0,applyMatrix4:function(v){for(var M,A=new c.Matrix3().getNormalMatrix(v),_=0,w=this.vertices.length;_<w;_++)M=this.vertices[_],M.applyMatrix4(v);for(var C,P=0,R=this.faces.length;P<R;P++){C=this.faces[P],C.normal.applyMatrix3(A).normalize();for(var I=0,S=C.vertexNormals.length;I<S;I++)C.vertexNormals[I].applyMatrix3(A).normalize()}return this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(v){return f.makeRotationX(v),this.applyMatrix4(f),this},rotateY:function(v){return f.makeRotationY(v),this.applyMatrix4(f),this},rotateZ:function(v){return f.makeRotationZ(v),this.applyMatrix4(f),this},translate:function(v,M,A){return f.makeTranslation(v,M,A),this.applyMatrix4(f),this},scale:function(v,M,A){return f.makeScale(v,M,A),this.applyMatrix4(f),this},lookAt:function(v){return d.lookAt(v),d.updateMatrix(),this.applyMatrix4(d.matrix),this},fromBufferGeometry:function(v){function M(G,Y,Z,te){var q=R===void 0?[]:[A.colors[G].clone(),A.colors[Y].clone(),A.colors[Z].clone()],W=P===void 0?[]:[new c.Vector3().fromBufferAttribute(P,G),new c.Vector3().fromBufferAttribute(P,Y),new c.Vector3().fromBufferAttribute(P,Z)],$=new b(G,Y,Z,W,q,te);A.faces.push($),I!==void 0&&A.faceVertexUvs[0].push([new c.Vector2().fromBufferAttribute(I,G),new c.Vector2().fromBufferAttribute(I,Y),new c.Vector2().fromBufferAttribute(I,Z)]),S!==void 0&&A.faceVertexUvs[1].push([new c.Vector2().fromBufferAttribute(S,G),new c.Vector2().fromBufferAttribute(S,Y),new c.Vector2().fromBufferAttribute(S,Z)])}var A=this,_=v.index===null?void 0:v.index,w=v.attributes;if(w.position===void 0)return console.error("THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion."),this;var C=w.position,P=w.normal,R=w.color,I=w.uv,S=w.uv2;S!==void 0&&(this.faceVertexUvs[1]=[]);for(var T=0;T<C.count;T++)A.vertices.push(new c.Vector3().fromBufferAttribute(C,T)),R!==void 0&&A.colors.push(new c.Color().fromBufferAttribute(R,T));var E=v.groups;if(0<E.length)for(var L=0;L<E.length;L++)for(var F=E[L],x=F.start,O=F.count,B=x,N=x+O;B<N;B+=3)_===void 0?M(B,B+1,B+2,F.materialIndex):M(_.getX(B),_.getX(B+1),_.getX(B+2),F.materialIndex);else if(_!==void 0)for(var k=0;k<_.count;k+=3)M(_.getX(k),_.getX(k+1),_.getX(k+2));else for(var z=0;z<C.count;z+=3)M(z,z+1,z+2);return this.computeFaceNormals(),v.boundingBox!==null&&(this.boundingBox=v.boundingBox.clone()),v.boundingSphere!==null&&(this.boundingSphere=v.boundingSphere.clone()),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(p).negate(),this.translate(p.x,p.y,p.z),this},normalize:function(){this.computeBoundingSphere();var v=this.boundingSphere.center,M=this.boundingSphere.radius,A=M===0?1:1/M,_=new c.Matrix4;return _.set(A,0,0,-A*v.x,0,A,0,-A*v.y,0,0,A,-A*v.z,0,0,0,1),this.applyMatrix4(_),this},computeFaceNormals:function(){for(var v=new c.Vector3,M=new c.Vector3,A=0,_=this.faces.length;A<_;A++){var w=this.faces[A],C=this.vertices[w.a],P=this.vertices[w.b],R=this.vertices[w.c];v.subVectors(R,P),M.subVectors(C,P),v.cross(M),v.normalize(),w.normal.copy(v)}},computeVertexNormals:function(){for(var v=!(0<arguments.length&&arguments[0]!==void 0)||arguments[0],M=Array(this.vertices.length),A=0,_=this.vertices.length;A<_;A++)M[A]=new c.Vector3;if(v)for(var w=new c.Vector3,C=new c.Vector3,P=0,R=this.faces.length;P<R;P++){var I=this.faces[P],S=this.vertices[I.a],T=this.vertices[I.b],E=this.vertices[I.c];w.subVectors(E,T),C.subVectors(S,T),w.cross(C),M[I.a].add(w),M[I.b].add(w),M[I.c].add(w)}else{this.computeFaceNormals();for(var L,F=0,x=this.faces.length;F<x;F++)L=this.faces[F],M[L.a].add(L.normal),M[L.b].add(L.normal),M[L.c].add(L.normal)}for(var O=0,B=this.vertices.length;O<B;O++)M[O].normalize();for(var N=0,k=this.faces.length;N<k;N++){var z=this.faces[N],G=z.vertexNormals;G.length===3?(G[0].copy(M[z.a]),G[1].copy(M[z.b]),G[2].copy(M[z.c])):(G[0]=M[z.a].clone(),G[1]=M[z.b].clone(),G[2]=M[z.c].clone())}return 0<this.faces.length&&(this.normalsNeedUpdate=!0),M},computeFlatVertexNormals:function(){this.computeFaceNormals();for(var v=0,M=this.faces.length;v<M;v++){var A=this.faces[v],_=A.vertexNormals;_.length===3?(_[0].copy(A.normal),_[1].copy(A.normal),_[2].copy(A.normal)):(_[0]=A.normal.clone(),_[1]=A.normal.clone(),_[2]=A.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){for(var v,M=0,A=this.faces.length;M<A;M++){v=this.faces[M],v.__originalFaceNormal?v.__originalFaceNormal.copy(v.normal):v.__originalFaceNormal=v.normal.clone(),v.__originalVertexNormals||(v.__originalVertexNormals=[]);for(var _=0,w=v.vertexNormals.length;_<w;_++)v.__originalVertexNormals[_]?v.__originalVertexNormals[_].copy(v.vertexNormals[_]):v.__originalVertexNormals[_]=v.vertexNormals[_].clone()}var C=new m;C.faces=this.faces;for(var P=0,R=this.morphTargets.length;P<R;P++){if(!this.morphNormals[P]){this.morphNormals[P]={},this.morphNormals[P].faceNormals=[],this.morphNormals[P].vertexNormals=[];for(var I=this.morphNormals[P].faceNormals,S=this.morphNormals[P].vertexNormals,T=0,E=this.faces.length;T<E;T++){var L=new c.Vector3,F={a:new c.Vector3,b:new c.Vector3,c:new c.Vector3};I.push(L),S.push(F)}}var x=this.morphNormals[P];C.vertices=this.morphTargets[P].vertices,C.computeFaceNormals();var O=C.computeVertexNormals();if(O&&0<O.length){this.morphTargets[P].normals=Array(this.vertices.length);for(var B=0;B<O.length;B++)this.morphTargets[P].normals[B]=O[B].clone()}for(var N=0,k=this.faces.length;N<k;N++){var z=this.faces[N],G=x.faceNormals[N],Y=x.vertexNormals[N];G.copy(z.normal),Y.a.copy(z.vertexNormals[0]),Y.b.copy(z.vertexNormals[1]),Y.c.copy(z.vertexNormals[2])}}for(var Z,te=0,q=this.faces.length;te<q;te++)Z=this.faces[te],Z.normal=Z.__originalFaceNormal,Z.vertexNormals=Z.__originalVertexNormals;this.morphNormalsReady=!0},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new c.Box3),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new c.Sphere),this.boundingSphere.setFromPoints(this.vertices)},mergeMorph:function(v,M){var A=this.morphTargets.length,_=this.morphTargets,w=v.morphTargets,C=this.morphColors.length,P=this.morphColors,R=v.morphColors;if(0<A&&A==w.length)for(var I=0,S=_.length;I<S;I++){for(var T=_[I],E=w[I],L=0,F=E.vertices.length;L<F;L++){var x=E.vertices[L],O=x.clone();M!==void 0&&O.applyMatrix4(M),T.vertices.push(O)}if(T.normals&&E.normals)for(var B=0;B<E.normals.length;B+=3)g.set(E.normals2[B],E.normals2[B+1],E.normals2[B+2]),M!==void 0&&g.applyMatrix4(M),T.normals.push(g.x,g.y,g.z)}if(0<C&&C==R.length)for(var N=0,k=P.length;N<k;N++)for(var z=P[N],G=R[N],Y=0,Z=G.colors;Y<Z;Y++)z.colors.push(G.colors[Y].clone())},merge:function(v,M){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:0;if(!(v&&v.isGeometry))return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",v);var _,w=this.vertices.length,C=this.vertices,P=v.vertices,R=v.normals,I=this.faces,S=v.faces,T=this.colors,E=v.colors;M!==void 0&&(_=new c.Matrix3().getNormalMatrix(M));for(var L=0,F=P.length;L<F;L++){var x=P[L],O=x.clone();M!==void 0&&O.applyMatrix4(M),C.push(O)}for(var B=0;B<R.length;B+=3)g.set(R[B],R[B+1],R[B+2]),M!==void 0&&g.applyMatrix4(M),this.normals.push(g.x,g.y,g.z);for(var N=0,k=E.length;N<k;N++)typeof E[N]=="number"?T.push(E[N]):T.push(E[N].clone());for(var z=0,G=S.length;z<G;z++){var Y=S[z],Z=void 0,te=void 0,q=Y.vertexNormals,W=Y.vertexColors,$=new b(Y.a+w,Y.b+w,Y.c+w);$.normal.copy(Y.normal),_!==void 0&&$.normal.applyMatrix3(_).normalize();for(var X=0,K=q.length;X<K;X++)Z=q[X].clone(),_!==void 0&&Z.applyMatrix3(_).normalize(),$.vertexNormals.push(Z);$.color.copy(Y.color);for(var re=0,V=W.length;re<V;re++)te=W[re],$.vertexColors.push(te.clone());$.materialIndex=Y.materialIndex+A,I.push($)}for(var j,oe=0,ae=v.faceVertexUvs.length;oe<ae;oe++){j=v.faceVertexUvs[oe],this.faceVertexUvs[oe]===void 0&&(this.faceVertexUvs[oe]=[]);for(var le=0,H=j.length;le<H;le++){for(var U=j[le],D=[],Q=0,ie=U.length;Q<ie;Q++)D.push(U[Q].clone());this.faceVertexUvs[oe].push(D)}}this.mergeMorph(v,M)},mergeMesh:function(v){return v&&v.isMesh?(v.matrixAutoUpdate&&v.updateMatrix(),void this.merge(v.geometry,v.matrix)):void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",v)},mergeVertices:function(){for(var v=0<arguments.length&&arguments[0]!==void 0?arguments[0]:4,M={},A=[],_=[],w=Math.pow(10,v),C=0,P=this.vertices.length;C<P;C++){var R=this.vertices[C],I=Math.round(R.x*w)+"_"+Math.round(R.y*w)+"_"+Math.round(R.z*w);M[I]===void 0?(M[I]=C,A.push(this.vertices[C]),_[C]=A.length-1):_[C]=_[M[I]]}for(var S,T=[],E=0,L=this.faces.length;E<L;E++){S=this.faces[E],S.a=_[S.a],S.b=_[S.b],S.c=_[S.c];for(var F=[S.a,S.b,S.c],x=0;3>x;x++)if(F[x]===F[(x+1)%3]){T.push(E);break}}for(var O,B=T.length-1;0<=B;B--){O=T[B],this.faces.splice(O,1);for(var N=0,k=this.faceVertexUvs.length;N<k;N++)this.faceVertexUvs[N].splice(O,1)}var z=this.vertices.length-A.length;return this.vertices=A,z},setFromPoints:function(v){this.vertices=[];for(var M,A=0,_=v.length;A<_;A++)M=v[A],this.vertices.push(new c.Vector3(M.x,M.y,M.z||0));return this},sortFacesByMaterialIndex:function(){for(var v=this.faces,M=v.length,A=0;A<M;A++)v[A]._id=A;v.sort(function(S,T){return S.materialIndex-T.materialIndex});var _,w,C=this.faceVertexUvs[0],P=this.faceVertexUvs[1];C&&C.length===M&&(_=[]),P&&P.length===M&&(w=[]);for(var R,I=0;I<M;I++)R=v[I]._id,_&&_.push(C[R]),w&&w.push(P[R]);_&&(this.faceVertexUvs[0]=_),w&&(this.faceVertexUvs[1]=w)},toJSON:function(){function v(V,j,oe){return oe?V|1<<j:V&~(1<<j)}function M(V){var j=V.x.toString()+V.y.toString()+V.z.toString();return L[j]===void 0&&(L[j]=E.length/3,E.push(V.x,V.y,V.z)),L[j]}function A(V){var j=V.r.toString()+V.g.toString()+V.b.toString();return x[j]===void 0&&(x[j]=F.length,F.push(V.getHex())),x[j]}function _(V){var j=V.x.toString()+V.y.toString();return B[j]===void 0&&(B[j]=O.length/2,O.push(V.x,V.y)),B[j]}var w={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(w.uuid=this.uuid,w.type=this.type,this.name!==""&&(w.name=this.name),this.parameters!==void 0){var C=this.parameters;for(var P in C)C[P]!==void 0&&(w[P]=C[P]);return w}for(var R,I=[],S=0;S<this.vertices.length;S++)R=this.vertices[S],I.push(R.x,R.y,R.z);for(var T=[],E=[],L={},F=[],x={},O=[],B={},N=0;N<this.faces.length;N++){var k=this.faces[N],z=!0,G=!1,Y=this.faceVertexUvs[0][N]!==void 0,Z=0<k.normal.length(),te=0<k.vertexNormals.length,q=k.color.r!==1||k.color.g!==1||k.color.b!==1,W=0<k.vertexColors.length,$=0;if($=v($,0,0),$=v($,1,z),$=v($,2,G),$=v($,3,Y),$=v($,4,Z),$=v($,5,te),$=v($,6,q),$=v($,7,W),T.push($),T.push(k.a,k.b,k.c),T.push(k.materialIndex),Y){var X=this.faceVertexUvs[0][N];T.push(_(X[0]),_(X[1]),_(X[2]))}if(Z&&T.push(M(k.normal)),te){var K=k.vertexNormals;T.push(M(K[0]),M(K[1]),M(K[2]))}if(q&&T.push(A(k.color)),W){var re=k.vertexColors;T.push(A(re[0]),A(re[1]),A(re[2]))}}return w.data={},w.data.vertices=I,w.data.normals=E,0<F.length&&(w.data.colors=F),0<O.length&&(w.data.uvs=[O]),w.data.faces=T,w},clone:function(){return new m().copy(this)},copy:function(v){this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=v.name;for(var M=v.vertices,A=0,_=M.length;A<_;A++)this.vertices.push(M[A].clone());for(var w=v.colors,C=0,P=w.length;C<P;C++)this.colors.push(w[C].clone());for(var R=v.faces,I=0,S=R.length;I<S;I++)this.faces.push(R[I].clone());for(var T,E=0,L=v.faceVertexUvs.length;E<L;E++){T=v.faceVertexUvs[E],this.faceVertexUvs[E]===void 0&&(this.faceVertexUvs[E]=[]);for(var F=0,x=T.length;F<x;F++){for(var O,B=T[F],N=[],k=0,z=B.length;k<z;k++)O=B[k],N.push(O.clone());this.faceVertexUvs[E].push(N)}}for(var G,Y=v.morphTargets,Z=0,te=Y.length;Z<te;Z++){if(G={},G.name=Y[Z].name,Y[Z].vertices!==void 0){G.vertices=[];for(var q=0,W=Y[Z].vertices.length;q<W;q++)G.vertices.push(Y[Z].vertices[q].clone())}if(Y[Z].normals!==void 0){G.normals=[];for(var $=0,X=Y[Z].normals.length;$<X;$++)G.normals.push(Y[Z].normals[$].clone())}this.morphTargets.push(G)}for(var K,re=v.morphNormals,V=0,j=re.length;V<j;V++){if(K={},re[V].vertexNormals!==void 0){K.vertexNormals=[];for(var oe=0,ae=re[V].vertexNormals.length;oe<ae;oe++){var le=re[V].vertexNormals[oe],H={};H.a=le.a.clone(),H.b=le.b.clone(),H.c=le.c.clone(),K.vertexNormals.push(H)}}if(re[V].faceNormals!==void 0){K.faceNormals=[];for(var U=0,D=re[V].faceNormals.length;U<D;U++)K.faceNormals.push(re[V].faceNormals[U].clone())}this.morphNormals.push(K)}for(var Q=v.skinWeights,ie=0,ce=Q.length;ie<ce;ie++)this.skinWeights.push(Q[ie].clone());for(var ge=v.skinIndices,ye=0,ue=ge.length;ye<ue;ye++)this.skinIndices.push(ge[ye].clone());for(var be=v.lineDistances,ne=0,de=be.length;ne<de;ne++)this.lineDistances.push(be[ne]);var ve=v.boundingBox;ve!==null&&(this.boundingBox=ve.clone());var Ee=v.boundingSphere;return Ee!==null&&(this.boundingSphere=Ee.clone()),this.elementsNeedUpdate=v.elementsNeedUpdate,this.verticesNeedUpdate=v.verticesNeedUpdate,this.uvsNeedUpdate=v.uvsNeedUpdate,this.normalsNeedUpdate=v.normalsNeedUpdate,this.colorsNeedUpdate=v.colorsNeedUpdate,this.lineDistancesNeedUpdate=v.lineDistancesNeedUpdate,this.groupsNeedUpdate=v.groupsNeedUpdate,this},computeGroups(){var y,v,M=[],A=void 0,_=this.faces;for(v=0;v<_.length;v++){var w=_[v];w.materialIndex!==A&&(A=w.materialIndex,y!==void 0&&(y.count=3*v-y.start,M.push(y)),y={start:3*v,materialIndex:A})}return y!==void 0&&(y.count=3*v-y.start,M.push(y)),M},toBufferGeometry:function(){var v=new h().fromGeometry(this),M=new c.BufferGeometry,A=new Float32Array(3*v.vertices.length);if(M.setAttribute("position",new c.BufferAttribute(A,3).copyVector3sArray(v.vertices)),0<v.normals.length){var _=new Float32Array(3*v.normals.length);M.setAttribute("normal",new c.BufferAttribute(_,3).copyVector3sArray(v.normals))}if(0<v.colors.length){var w=new Float32Array(3*v.colors.length);M.setAttribute("color",new c.BufferAttribute(w,3).copyColorsArray(v.colors))}if(0<v.uvs.length){var C=new Float32Array(2*v.uvs.length);M.setAttribute("uv",new c.BufferAttribute(C,2).copyVector2sArray(v.uvs))}if(0<v.uvs2.length){var P=new Float32Array(2*v.uvs2.length);M.setAttribute("uv2",new c.BufferAttribute(P,2).copyVector2sArray(v.uvs2))}for(var R in M.groups=v.groups,v.morphTargets){for(var I=[],S=v.morphTargets[R],T=0,E=S.length;T<E;T++){var L=S[T],F=new c.Float32BufferAttribute(3*L.data.length,3);F.name=L.name,I.push(F.copyVector3sArray(L.data))}M.morphAttributes[R]=I}if(0<v.skinIndices.length){var x=new c.Float32BufferAttribute(4*v.skinIndices.length,4);M.setAttribute("skinIndex",x.copyVector4sArray(v.skinIndices))}if(0<v.skinWeights.length){var O=new c.Float32BufferAttribute(4*v.skinWeights.length,4);M.setAttribute("skinWeight",O.copyVector4sArray(v.skinWeights))}return v.boundingSphere!==null&&(M.boundingSphere=v.boundingSphere.clone()),v.boundingBox!==null&&(M.boundingBox=v.boundingBox.clone()),M},toIndexedBufferGeometry:function(){var v=new c.BufferGeometry,M=new Float32Array(3*this.vertices.length);if(v.setAttribute("position",new c.BufferAttribute(M,3).copyVector3sArray(this.vertices)),0<this.normals.length){var A=new Float32Array(this.normals.length),_=new c.BufferAttribute(A,3).copyArray(this.normals);v.setAttribute("normal",_)}if(0<this.uvs.length&&0<this.uvs[0].length){var w=new Float32Array(2*this.uvs[0].length);v.setAttribute("uv",new c.BufferAttribute(w,2).copyArray(this.uvs[0]))}if(1<this.uvs.length&&0<this.uvs[1].length){var C=new Float32Array(2*this.uvs[1].length);v.setAttribute("uv2",new c.BufferAttribute(C,2).copyArray(this.uvs[1]))}if(0<this.colors.length){for(var P=[],R=0;R<this.colors.length;R++)P.push(new c.Color(this.colors[R]));var I=new Float32Array(3*P.length);v.setAttribute("color",new c.BufferAttribute(I,3).copyColorsArray(P))}else{for(var S=new Float32Array(3*this.vertices.length),T=0;T<3*this.vertices.length;T++)S[T]=1;v.setAttribute("color",new c.BufferAttribute(S,3))}if(0<this.faces.length){for(var E=[],L=[],F=0;F<this.faces.length;F++){L.push(this.faces[F].a,this.faces[F].b,this.faces[F].c);var x=this.faces[F].vertexColors;if(x.length===3)E.push(x[0],x[1],x[2]);else{var O=this.faces[F].color;E.push(O,O,O)}}v.setIndex(L),v.groups=this.computeGroups()}if(0<this.morphTargets.length){for(var B=[],N=[],k=0,z=this.morphTargets.length;k<z;k++){var G=this.morphTargets[k],Y=new c.Float32BufferAttribute(3*G.vertices.length,3);if(Y.name=G.name,B.push(Y.copyVector3sArray(G.vertices)),G.normals){var Z=new c.Float32BufferAttribute(3*G.normals.length,3);Z.name=G.name,N.push(Z.copyVector3sArray(G.normals))}}v.morphAttributes.position=B,v.morphAttributes.normal=N}if(0<this.skinIndices.length){var te=new c.Float32BufferAttribute(4*this.skinIndices.length,4);v.setAttribute("skinIndex",te.copyVector4sArray(this.skinIndices))}if(0<this.skinWeights.length){var q=new c.Float32BufferAttribute(4*this.skinWeights.length,4);v.setAttribute("skinWeight",q.copyVector4sArray(this.skinWeights))}return this.boundingSphere!==null&&(v.boundingSphere=this.boundingSphere.clone()),this.boundingBox!==null&&(v.boundingBox=this.boundingBox.clone()),v},computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")},applyMatrix:function(v){return console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(v)},dispose:function(){this.dispatchEvent({type:"dispose"})}}),m.createBufferGeometryFromObject=function(y){var v=new c.BufferGeometry,M=y.geometry;if(y.isPoints||y.isLine){var A=new c.Float32BufferAttribute(3*M.vertices.length,3),_=new c.Float32BufferAttribute(3*M.colors.length,3);if(v.setAttribute("position",A.copyVector3sArray(M.vertices)),v.setAttribute("color",_.copyColorsArray(M.colors)),M.lineDistances&&M.lineDistances.length===M.vertices.length){var w=new c.Float32BufferAttribute(M.lineDistances.length,1);v.setAttribute("lineDistance",w.copyArray(M.lineDistances))}M.boundingSphere!==null&&(v.boundingSphere=M.boundingSphere.clone()),M.boundingBox!==null&&(v.boundingBox=M.boundingBox.clone())}else y.isMesh&&(v=M.toBufferGeometry());return v};class h{constructor(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}computeGroups(v){var M,A,_=[],w=void 0,C=v.faces;for(A=0;A<C.length;A++){var P=C[A];P.materialIndex!==w&&(w=P.materialIndex,M!==void 0&&(M.count=3*A-M.start,_.push(M)),M={start:3*A,materialIndex:w})}M!==void 0&&(M.count=3*A-M.start,_.push(M)),this.groups=_}fromGeometry(v){var M,A=v.faces,_=v.vertices,w=v.faceVertexUvs,C=w[0]&&0<w[0].length,P=w[1]&&0<w[1].length,R=v.morphTargets,I=R.length;if(0<I){M=[];for(var S=0;S<I;S++)M[S]={name:R[S].name,data:[]};this.morphTargets.position=M}var T,E=v.morphNormals,L=E.length;if(0<L){T=[];for(var F=0;F<L;F++)T[F]={name:E[F].name,data:[]};this.morphTargets.normal=T}var x=v.skinIndices,O=v.skinWeights,B=x.length===_.length,N=O.length===_.length;0<_.length&&A.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(var k,z=0;z<A.length;z++){k=A[z],this.vertices.push(_[k.a],_[k.b],_[k.c]);var G=k.vertexNormals;if(G.length===3)this.normals.push(G[0],G[1],G[2]);else{var Y=k.normal;this.normals.push(Y,Y,Y)}var Z=k.vertexColors;if(Z.length===3)this.colors.push(Z[0],Z[1],Z[2]);else{var te=k.color;this.colors.push(te,te,te)}if(C===!0){var q=w[0][z];q===void 0?(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",z),this.uvs.push(new c.Vector2,new c.Vector2,new c.Vector2)):this.uvs.push(q[0],q[1],q[2])}if(P===!0){var W=w[1][z];W===void 0?(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",z),this.uvs2.push(new c.Vector2,new c.Vector2,new c.Vector2)):this.uvs2.push(W[0],W[1],W[2])}for(var $,X=0;X<I;X++)$=R[X].vertices,M[X].data.push($[k.a],$[k.b],$[k.c]);for(var K,re=0;re<L;re++)K=E[re].vertexNormals[z],T[re].data.push(K.a,K.b,K.c);B&&this.skinIndices.push(x[k.a],x[k.b],x[k.c]),N&&this.skinWeights.push(O[k.a],O[k.b],O[k.c])}return this.computeGroups(v),this.verticesNeedUpdate=v.verticesNeedUpdate,this.normalsNeedUpdate=v.normalsNeedUpdate,this.colorsNeedUpdate=v.colorsNeedUpdate,this.uvsNeedUpdate=v.uvsNeedUpdate,this.groupsNeedUpdate=v.groupsNeedUpdate,v.boundingSphere!==null&&(this.boundingSphere=v.boundingSphere.clone()),v.boundingBox!==null&&(this.boundingBox=v.boundingBox.clone()),this}}class b{constructor(v,M,A,_,w){var C=5<arguments.length&&arguments[5]!==void 0?arguments[5]:0;this.a=v,this.b=M,this.c=A,this.normal=_&&_.isVector3?_:new c.Vector3,this.vertexNormals=Array.isArray(_)?_:[],this.color=w&&w.isColor?w:new c.Color,this.vertexColors=Array.isArray(w)?w:[],this.materialIndex=C}clone(){return new this.constructor().copy(this)}copy(v){this.a=v.a,this.b=v.b,this.c=v.c,this.normal.copy(v.normal),this.color.copy(v.color),this.materialIndex=v.materialIndex;for(var M=0,A=v.vertexNormals.length;M<A;M++)this.vertexNormals[M]=v.vertexNormals[M].clone();for(var _=0,w=v.vertexColors.length;_<w;_++)this.vertexColors[_]=v.vertexColors[_].clone();return this}}},o=>{o.exports=QB},o=>{o.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg=="},(o,l)=>{l.augmentMorphColor=function(){return function(u){u.vertexShader=u.vertexShader.replace("#include <color_pars_vertex>",["varying vec3 vColor;","attribute vec3 morphColor0;","attribute vec3 morphColor1;"].join(`
3182
+ `}),g=g+"new (("+e.toString().replace("ENTRY_MODULE",JSON.stringify(c))+")({"+p.main.map(function(v){return""+JSON.stringify(v)+": "+d.main[v].toString()}).join(",")+"}))(self);";var m=new window.Blob([g],{type:"text/javascript"});if(f.bare)return m;var h=window.URL||window.webkitURL||window.mozURL||window.msURL,b=h.createObjectURL(m),y=new window.Worker(b);return y.objectURL=b,y}}(mf)),mf.exports}function SD(n){var e=this.constructor;return this.then(function(t){return e.resolve(n()).then(function(){return t})},function(t){return e.resolve(n()).then(function(){return e.reject(t)})})}function _D(n){var e=this;return new e(function(t,i){if(!(n&&typeof n.length<"u"))return i(new TypeError(typeof n+" "+n+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(n);if(r.length===0)return t([]);var s=r.length;function o(u,c){if(c&&(typeof c=="object"||typeof c=="function")){var f=c.then;if(typeof f=="function"){f.call(c,function(d){o(u,d)},function(d){r[u]={status:"rejected",reason:d},--s===0&&t(r)});return}}r[u]={status:"fulfilled",value:c},--s===0&&t(r)}for(var l=0;l<r.length;l++)o(l,r[l])})}function Sx(n,e){this.name="AggregateError",this.errors=n,this.message=e||""}Sx.prototype=Error.prototype;function TD(n){var e=this;return new e(function(t,i){if(!(n&&typeof n.length<"u"))return i(new TypeError("Promise.any accepts an array"));var r=Array.prototype.slice.call(n);if(r.length===0)return i();for(var s=[],o=0;o<r.length;o++)try{e.resolve(r[o]).then(t).catch(function(l){s.push(l),s.length===r.length&&i(new Sx(s,"All promises were rejected"))})}catch(l){i(l)}})}var ED=setTimeout;function _x(n){return!!(n&&typeof n.length<"u")}function CD(){}function LD(n,e){return function(){n.apply(e,arguments)}}function ft(n){if(!(this instanceof ft))throw new TypeError("Promises must be constructed via new");if(typeof n!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],Ex(n,this)}function Tx(n,e){for(;n._state===3;)n=n._value;if(n._state===0){n._deferreds.push(e);return}n._handled=!0,ft._immediateFn(function(){var t=n._state===1?e.onFulfilled:e.onRejected;if(t===null){(n._state===1?gf:Ua)(e.promise,n._value);return}var i;try{i=t(n._value)}catch(r){Ua(e.promise,r);return}gf(e.promise,i)})}function gf(n,e){try{if(e===n)throw new TypeError("A promise cannot be resolved with itself.");if(e&&(typeof e=="object"||typeof e=="function")){var t=e.then;if(e instanceof ft){n._state=3,n._value=e,vf(n);return}else if(typeof t=="function"){Ex(LD(t,e),n);return}}n._state=1,n._value=e,vf(n)}catch(i){Ua(n,i)}}function Ua(n,e){n._state=2,n._value=e,vf(n)}function vf(n){n._state===2&&n._deferreds.length===0&&ft._immediateFn(function(){n._handled||ft._unhandledRejectionFn(n._value)});for(var e=0,t=n._deferreds.length;e<t;e++)Tx(n,n._deferreds[e]);n._deferreds=null}function RD(n,e,t){this.onFulfilled=typeof n=="function"?n:null,this.onRejected=typeof e=="function"?e:null,this.promise=t}function Ex(n,e){var t=!1;try{n(function(i){t||(t=!0,gf(e,i))},function(i){t||(t=!0,Ua(e,i))})}catch(i){if(t)return;t=!0,Ua(e,i)}}ft.prototype.catch=function(n){return this.then(null,n)},ft.prototype.then=function(n,e){var t=new this.constructor(CD);return Tx(this,new RD(n,e,t)),t},ft.prototype.finally=SD,ft.all=function(n){return new ft(function(e,t){if(!_x(n))return t(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(n);if(i.length===0)return e([]);var r=i.length;function s(l,u){try{if(u&&(typeof u=="object"||typeof u=="function")){var c=u.then;if(typeof c=="function"){c.call(u,function(f){s(l,f)},t);return}}i[l]=u,--r===0&&e(i)}catch(f){t(f)}}for(var o=0;o<i.length;o++)s(o,i[o])})},ft.any=TD,ft.allSettled=_D,ft.resolve=function(n){return n&&typeof n=="object"&&n.constructor===ft?n:new ft(function(e){e(n)})},ft.reject=function(n){return new ft(function(e,t){t(n)})},ft.race=function(n){return new ft(function(e,t){if(!_x(n))return t(new TypeError("Promise.race accepts an array"));for(var i=0,r=n.length;i<r;i++)ft.resolve(n[i]).then(e,t)})},ft._immediateFn=typeof setImmediate=="function"&&function(n){setImmediate(n)}||function(n){ED(n,0)},ft._unhandledRejectionFn=function(e){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};const FD=Al(Object.freeze(Object.defineProperty({__proto__:null,default:ft},Symbol.toStringTag,{value:"Module"})));(function(n,e){(function(i,r){n.exports=r()})(Yi,()=>(()=>{var t=[(o,l,u)=>{u(1);var c=u(2),f=c.version,d=function(){this.Revision=f,this.defaultMaterialColor=16777215,this.defaultOpacity=1,this.modelPrefix=void 0,this.Geometry=u(3).Geometry,this.Glyph=u(16).Glyph,this.Glyphset=u(18).Glyphset,this.Pointset=u(22).Pointset,this.Label=u(17).Label,this.Lines=u(24).Lines,this.TextureArray=u(25).TextureArray,this.TextureSlides=u(27).TextureSlides,this.Renderer=u(30).Renderer,this.Scene=u(32).Scene,this.GeometryCSG=u(51).GeometryCSG,this.GlyphsetCSG=u(57).GlyphsetCSG,this.Viewport=u(44).Viewport,this.CameraControls=u(44).CameraControls,this.SmoothCameraTransition=u(44).SmoothCameraTransition,this.RayCaster=u(44).RayCaster,this.CameraAutoTumble=u(44).CameraAutoTumble,this.StereoEffect=u(44).StereoEffect,this.loadExternalFile=u(5).loadExternalFile,this.loadExternalFiles=u(5).loadExternalFiles,this.THREE=u(4)};o.exports=new d},o=>{o.exports=SR()},o=>{o.exports=JSON.parse('{"name":"zincjs","version":"1.18.8","description":"ZincJS (Web-based-Zinc-Visualisation)","main":"build/zinc.js","directories":{"doc":"docs"},"files":["package.json","LICENSE","README.md","src/*","build/zinc.js","build/zinc.frontend.js","build/zinc.js.map","webpack.config.js"],"scripts":{"build-bundle":"webpack --config webpack.frontend.js; webpack --config webpack.backend.js","build-backend":"webpack --config webpack.backend.js","test":"npm --prefix ./test install && npm --prefix ./test run test-ci","changelog":"auto-changelog -p --output CHANGELOG.md --template keepachangelog","jsdoc":"jsdoc -c jsdoc_conf.json","version":"npm run build-bundle;npm run jsdoc;npm run changelog; git add CHANGELOG.md docs","release:beta":"npm version prerelease --preid=beta; npm publish --tag beta","release:minor":"npm version minor; npm publish","release:patch":"npm version patch; npm publish"},"repository":{"type":"git","url":"git+https://github.com/alan-wu/ZincJS.git"},"keywords":["library","webgl","3d","zincjs"],"author":"Alan Wu <alan.wu@auckland.ac.nz>","license":"MIT","bugs":{"url":"https://github.com/alan-wu/ZincJS/issues"},"homepage":"http://alan-wu.github.io/ZincJS/","devDependencies":{"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","auto-changelog":"^2.4.0","babel-loader":"^9.1.3","babel-preset-minify":"^0.5.1","file-loader":"^6.2.0","jsdoc":"^4.0.2","raw-loader":"^4.0.2","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"dependencies":{"css-element-queries":"^1.2.2","lodash":"^4.17.19","promise-polyfill":"^8.1.3","three":"^0.130.1","three-spritetext":"1.6.2","url-loader":"^4.1.1","url-polyfill":"^1.1.7","webworkify-webpack":"^2.1.5"}}')},function(o,l,u){var c=u(4),f=u(5).toBufferGeometry,d=(g,m,h)=>{var b=f(g,h),y=!1;1>h.opacity&&(y=!0);var v;if(b._video===void 0){var M=h.localTimeEnabled||h.localMorphColour;m?(v=m,v.morphTargets=M,v.morphNormals=h.localTimeEnabled):b instanceof c.BufferGeometry&&b.attributes.color===void 0?v=new c.MeshPhongMaterial({color:h.colour,morphTargets:M,morphNormals:h.localTimeEnabled,transparent:y,opacity:h.opacity,side:c.DoubleSide}):v=new c.MeshPhongMaterial({color:h.colour,morphTargets:M,morphNormals:h.localTimeEnabled,vertexColors:c.VertexColors,transparent:y,opacity:h.opacity,side:c.DoubleSide}),h.localMorphColour&&b.morphAttributes.color&&(v.onBeforeCompile=u(9).augmentMorphColor())}else{var A=b._video.createCanvasVideoTexture();v=new c.MeshBasicMaterial({morphTargets:h.localTimeEnabled,color:new c.Color(1,1,1),transparent:y,opacity:h.opacity,map:A,side:c.DoubleSide}),this.videoHandler=b._video}return new c.Mesh(b,v)},p=function(){u(10).ZincObject.call(this),this.videoHandler=void 0,this.isGeometry=!0,this.createMesh=(g,m,h)=>{if(!(this.morph&&this.morph.geometry&&g!=null)){var b=d(g,m,h);this.setMesh(b,h.localTimeEnabled,h.localMorphColour)}},this.calculateUVs=()=>{this.geometry.computeBoundingBox();var g=this.geometry.boundingBox.max,m=this.geometry.boundingBox.min,h=new c.Vector2(0-m.x,0-m.y),b=new c.Vector2(g.x-m.x,g.y-m.y);this.geometry.faceVertexUvs[0]=[];for(var y=0;y<this.geometry.faces.length;y++){var v=this.geometry.vertices[this.geometry.faces[y].a],M=this.geometry.vertices[this.geometry.faces[y].b],A=this.geometry.vertices[this.geometry.faces[y].c];geometry.faceVertexUvs[0].push([new c.Vector2((v.x+h.x)/b.x,(v.y+h.y)/b.y),new c.Vector2((M.x+h.x)/b.x,(M.y+h.y)/b.y),new c.Vector2((A.x+h.x)/b.x,(A.y+h.y)/b.y)])}geometry.uvsNeedUpdate=!0},this.checkTransparentMesh=function(){this._lod.checkTransparentMesh()},this.setWireframe=g=>{this.morph.material.wireframe=g},this.editVertices=function(g,m){if(g&&g.length){var h=this.getMorph(),b=h.geometry.getAttribute("position");if(!h||0>m)return;var y=3*m;g.forEach(v=>{b.array[y++]=v[0],b.array[y++]=v[1],b.array[y++]=v[2]}),b.needsUpdate=!0,h.geometry.computeBoundingBox(),h.geometry.computeBoundingSphere(),this.boundingBoxUpdateRequired=!0}}};p.prototype=Object.create(u(10).ZincObject.prototype),l.Geometry=p},o=>{o.exports=DB},(o,l,u)=>{var c=u(4),f=u(6).Geometry,d=u(7).default;function p(R){var I=R,S=u(0).modelPrefix;return S&&(S[S.length-1]!="/"&&(S+="/"),/^(?:[a-z]+:)?\/\//i.test(R)||(I=S+R)),I}function g(R,I){var S=(E,L)=>{try{var F=new URL(E,L).href;if(E&&2>E.split("?").length){var x=L.split("?");x.length===2&&(F=F+"?"+x[1])}return F}catch{console.error("There is an issue creating the url link with: ".concat(E,"."))}};if(!Array.isArray(R))return S(R,I);var T=[];return R.forEach(E=>{T.push(S(E,I))}),T}function m(R,I,S,T,E){var L=R.morphTargetInfluences,F=void 0;R.geometry&&(F=R.geometry.morphAttributes);var x=!1;if(L&&F&&F.position){T.set(0,0,0),E.set(0,0,0);for(var O=0;O<L.length;O++)0<L[O]&&(x=!0,S.setFromArray(F.position[O].array),T.add(S.min.multiplyScalar(L[O])),E.add(S.max.multiplyScalar(L[O])));x&&I.set(T,E)}x||I.setFromBufferAttribute(R.geometry.attributes.position),R.updateWorldMatrix(!0,!0),I.applyMatrix4(R.matrixWorld)}function h(R,I,S,T){var E=new XMLHttpRequest;E.open("GET",p(R),!0),E.onreadystatechange=()=>{E.readyState==4&&(E.status==200?S(E.responseText,I):T(R))},E.send(null)}function b(R,I,S){function T(O,B){F[B]=O,L++,L==E&&I(F)}for(var E=R.length,L=0,F=[],x=0;x<E;x++)h(R[x],x,T,S)}l.getColorsRGB=(R,I)=>{var S=Math.floor(I/3),T=I%3,E=0;T==0?E=R[S].r:T==1?E=R[S].g:T==2&&(E=R[S].b);var L=new c.Color(E);return[L.r,L.g,L.b]},l.updateMorphColorAttribute=function(R,I){if(I&&R&&R.morphAttributes&&R.morphAttributes.color){var S=R.morphAttributes.color,T=I.morphTargetInfluences,E=T.length;R.deleteAttribute("morphColor0"),R.deleteAttribute("morphColor1");for(var L=0,F=[],x=0;1>L||x<E;x++)0<T[x]&&(L++,F.push([x,T[x]]));F.length==2?(R.setAttribute("morphColor0",S[F[0][0]]),R.setAttribute("morphColor1",S[F[1][0]])):F.length==1&&(R.setAttribute("morphColor0",S[F[0][0]]),R.setAttribute("morphColor1",S[F[0][0]]))}},l.toBufferGeometry=(R,I)=>{var S;return R instanceof f?(I.localTimeEnabled&&!R.morphNormalsReady&&(R.morphNormals==null||R.morphNormals.length==0)&&R.computeMorphNormals(),S=R.toIndexedBufferGeometry(),I.localMorphColour&&y(R,S)):R instanceof c.BufferGeometry&&(S=R.clone()),S.colorsNeedUpdate=!0,S.computeBoundingBox(),S.computeBoundingSphere(),R._video&&(S._video=R._video),S},l.copyMorphColorsToBufferGeometry=(R,I)=>{if(R&&R.morphColors&&0<R.morphColors.length){for(var S=[],T=R.morphColors,E=u(5).getColorsRGB,L=0,F=T.length;L<F;L++){for(var x=T[L],O=[],B=0;B<R.faces.length;B++){var N=R.faces[B],k=E(x.colors,N.a);O.push(k[0],k[1],k[2]),k=E(x.colors,N.b),O.push(k[0],k[1],k[2]),k=E(x.colors,N.c),O.push(k[0],k[1],k[2])}var z=new c.Float32BufferAttribute(3*(3*R.faces.length),3);z.name=x.name,S.push(z.copyArray(O))}I.morphAttributes.color=S}};var y=(R,I)=>{if(R&&R.morphColors&&0<R.morphColors.length){for(var S=[],T=R.morphColors,E=u(5).getColorsRGB,L=0,F=T.length;L<F;L++){for(var x,O=T[L],B=[],N=0;N<3*O.colors.length;N++)x=E(O.colors,N),B.push(x[0],x[1],x[2]);var k=new c.Float32BufferAttribute(B,3);k.name=O.name,S.push(k)}I.morphAttributes.color=S}};function v(R){for(var I,S,T,E,L=-1,F=0,x=0;x<R.length;++x){if(E=R[x],I===void 0&&(I=E.array.constructor),I!==E.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(S===void 0&&(S=E.itemSize),S!==E.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(T===void 0&&(T=E.normalized),T!==E.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(L===-1&&(L=E.gpuType),L!==E.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;F+=E.count*S}for(var O,B=new I(F),N=new c.BufferAttribute(B,S,T),k=0,z=0;z<R.length;++z){if(O=R[z],O.isInterleavedBufferAttribute)for(var G=k/S,Y=0,Z=O.count;Y<Z;Y++)for(var te,q=0;q<S;q++)te=O.getComponent(Y,q),N.setComponent(Y+G,q,te);else B.set(O.array,k);k+=O.count*S}return L!==void 0&&(N.gpuType=L),N}l.mergeGeometries=function(R){for(var I=1<arguments.length&&arguments[1]!==void 0&&arguments[1],S=R[0].index!==null,T=new Set(Object.keys(R[0].attributes)),E=new Set(Object.keys(R[0].morphAttributes)),L={},F={},x=R[0].morphTargetsRelative,O=new c.BufferGeometry,B=0,N=0;N<R.length;++N){var k=R[N],z=0;if(S!==(k.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+N+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(var G in k.attributes){if(!T.has(G))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+N+'. All geometries must have compatible attributes; make sure "'+G+'" attribute exists among all geometries, or in none of them.'),null;L[G]===void 0&&(L[G]=[]),L[G].push(k.attributes[G]),z++}if(z!==T.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+N+". Make sure all geometries have the same number of attributes."),null;if(x!==k.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+N+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(var Y in k.morphAttributes){if(!E.has(Y))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+N+". .morphAttributes must be consistent throughout all geometries."),null;F[Y]===void 0&&(F[Y]=[]),F[Y].push(k.morphAttributes[Y])}if(I){var Z=void 0;if(S)Z=k.index.count;else if(k.attributes.position!==void 0)Z=k.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+N+". The geometry must have either an index or a position attribute"),null;O.addGroup(B,Z,N),B+=Z}}if(S){for(var te,q=0,W=[],$=0;$<R.length;++$){te=R[$].index;for(var X=0;X<te.count;++X)W.push(te.getX(X)+q);q+=R[$].attributes.position.count}O.setIndex(W)}for(var K in L){var re=v(L[K]);if(!re)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+K+" attribute."),null;O.setAttribute(K,re)}for(var V in F){var j=F[V][0].length;if(j===0)break;O.morphAttributes=O.morphAttributes||{},O.morphAttributes[V]=[];for(var oe,ae=0;ae<j;++ae){oe=[];for(var le=0;le<F[V].length;++le)oe.push(F[V][le][ae]);var H=v(oe);if(!H)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+V+" morphAttribute."),null;O.morphAttributes[V].push(H)}}return O},l.mergeVertices=function(R){var I=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1e-4;I=Math.max(I,Number.EPSILON);for(var S,T={},E=R.getIndex(),L=R.getAttribute("position"),F=E?E.count:L.count,x=0,O=Object.keys(R.attributes),B={},N={},ge=[],k=["getX","getY","getZ","getW"],z=0,G=O.length;z<G;z++){S=O[z],B[S]=[];var Y=R.morphAttributes[S];Y&&(N[S]=Array(Y.length).fill().map(()=>[]))}for(var Z=Math.log10(1/I),te=Math.pow(10,Z),z=0;z<F;z++){for(var q=E?E.getX(z):z,W="",$=0,G=O.length;$<G;$++)for(var S=O[$],X=R.getAttribute(S),K=X.itemSize,re=0;re<K;re++)W+="".concat(~~(X[k[re]](q)*te),",");if(W in T)ge.push(T[W]);else{for(var $=0,G=O.length;$<G;$++)for(var V,S=O[$],X=R.getAttribute(S),Y=R.morphAttributes[S],K=X.itemSize,j=B[S],oe=N[S],re=0;re<K;re++)if(V=k[re],j.push(X[V](q)),Y)for(var ae=0,le=Y.length;ae<le;ae++)oe[ae].push(Y[ae][V](q));T[W]=x,ge.push(x),x++}}for(var H=R.clone(),z=0,G=O.length;z<G;z++){var X,S=O[z],U=R.getAttribute(S),D=new U.array.constructor(B[S]);if(U.isInterleavedBufferAttribute?X=new c.BufferAttribute(D,U.itemSize,U.itemSize):(X=R.getAttribute(S).clone(),X.setArray(D)),H.setAttribute(S,X),S in N)for(var Q,$=0;$<N[S].length;$++)Q=R.morphAttributes[S][$].clone(),Q.setArray(new Q.array.constructor(N[S][$])),H.morphAttributes[S][$]=Q}var ie=Uint8Array;ge.length>=Math.pow(2,8)&&(ie=Uint16Array),ge.length>=Math.pow(2,16)&&(ie=Uint32Array);var ce=new ie(ge),ge=null;return E===null?ge=new c.BufferAttribute(ce,1):(ge=R.getIndex().clone(),ge.setArray(ce)),H.setIndex(ge),H};function M(R){if(R.isMeshPhongMaterial){var I=new c.MeshToonMaterial({color:R.color.clone(),morphTargets:R.morphTargets,morphNormals:R.morphNormals,vertexColors:R.vertexColors,transparent:R.transparent,opacity:R.opacity,side:R.side});return R.map&&(I.map=R.map),I}return R}function A(R,I){if(I&&R>=I.length){var S=new c.BufferGeometry,T=new Float32Array(3*R),E=0;return I.forEach(L=>{T[E++]=L[0],T[E++]=L[1],T[E++]=L[2]}),S.setAttribute("position",new c.BufferAttribute(T,3)),S.setDrawRange(0,I.length),S}}function _(){var R=new Image;R.src=u(8);var I=new c.Texture;return I.image=R,I.needsUpdate=!0,I}function w(R,I,S,T,E,L){var F=new d(R,I,S,T,E,L);return F.fontFace=T,F.fontSize=E,F.fontWeight=L,F.material.map.generateMipmaps=!1,F.material.map.anisotropy=4,F.material.sizeAttenuation=!1,F.material.alphaTest=.5,F.material.transparent=!0,F.material.depthWrite=!1,F.material.depthTest=!1,F.center.set(.5,-1.2),F.renderOrder=1e4,F}function C(R,I,S){if(S){var T=R||"",E=I||"",L=S.lastIndexOf("/");if(-1<L){var F=void 0,x=void 0;if(F=S.substring(0,L),x=S.substring(L+1),(F==="*"||F==="**"||F.toLowerCase()===T.toLowerCase())&&(x==="*"||x==="**"||x.toLowerCase()===E.toLowerCase()))return!0}else if(T.toLowerCase()===S.toLowerCase()||E.toLowerCase()===S.toLowerCase())return!0}return!1}function P(R,I,S){var T=R.getAttribute("position"),E=R.getAttribute("normal");if(T){var L=T.itemSize,F=I*L,x=L,O=!1,B=(N,k)=>{var z=!1,G=Array.from(N.array);if(G.length>=F+x){G.splice(F,x),S&&G.concat(Array(x).fill(0)),z=!0;var Y=new Float32Array(G);R.setAttribute(k,new c.BufferAttribute(Y,L)),R.getAttribute(k).needsUpdate=!0}return z};return O=B(T,"position"),E&&B(E,"normal"),R.index!==null&&console.warn("Removing vertices from indexed geometry requires index buffer recalculation."),O}}l.getBoundingBox=m,l.createNewURL=g,l.createBufferGeometry=A,l.getCircularTexture=_,l.resolveURL=p,l.loadExternalFile=h,l.loadExternalFiles=b,l.PhongToToon=M,l.createNewSpriteText=w,l.isRegionGroup=C,l.removeVertexAtIndex=P},(o,l,u)=>{u.r(l),u.d(l,{Face3:()=>b,Geometry:()=>m});var c=u(4),f=new c.Matrix4,d=new c.Object3D,p=new c.Vector3,g=new c.Vector3;function m(){this.uuid=c.MathUtils.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.normals=[],this.uvs=[],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1,this.morphNormalsReady=!1}m.prototype=Object.assign(Object.create(c.EventDispatcher.prototype),{constructor:m,isGeometry:!0,applyMatrix4:function(v){for(var M,A=new c.Matrix3().getNormalMatrix(v),_=0,w=this.vertices.length;_<w;_++)M=this.vertices[_],M.applyMatrix4(v);for(var C,P=0,R=this.faces.length;P<R;P++){C=this.faces[P],C.normal.applyMatrix3(A).normalize();for(var I=0,S=C.vertexNormals.length;I<S;I++)C.vertexNormals[I].applyMatrix3(A).normalize()}return this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(v){return f.makeRotationX(v),this.applyMatrix4(f),this},rotateY:function(v){return f.makeRotationY(v),this.applyMatrix4(f),this},rotateZ:function(v){return f.makeRotationZ(v),this.applyMatrix4(f),this},translate:function(v,M,A){return f.makeTranslation(v,M,A),this.applyMatrix4(f),this},scale:function(v,M,A){return f.makeScale(v,M,A),this.applyMatrix4(f),this},lookAt:function(v){return d.lookAt(v),d.updateMatrix(),this.applyMatrix4(d.matrix),this},fromBufferGeometry:function(v){function M(G,Y,Z,te){var q=R===void 0?[]:[A.colors[G].clone(),A.colors[Y].clone(),A.colors[Z].clone()],W=P===void 0?[]:[new c.Vector3().fromBufferAttribute(P,G),new c.Vector3().fromBufferAttribute(P,Y),new c.Vector3().fromBufferAttribute(P,Z)],$=new b(G,Y,Z,W,q,te);A.faces.push($),I!==void 0&&A.faceVertexUvs[0].push([new c.Vector2().fromBufferAttribute(I,G),new c.Vector2().fromBufferAttribute(I,Y),new c.Vector2().fromBufferAttribute(I,Z)]),S!==void 0&&A.faceVertexUvs[1].push([new c.Vector2().fromBufferAttribute(S,G),new c.Vector2().fromBufferAttribute(S,Y),new c.Vector2().fromBufferAttribute(S,Z)])}var A=this,_=v.index===null?void 0:v.index,w=v.attributes;if(w.position===void 0)return console.error("THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion."),this;var C=w.position,P=w.normal,R=w.color,I=w.uv,S=w.uv2;S!==void 0&&(this.faceVertexUvs[1]=[]);for(var T=0;T<C.count;T++)A.vertices.push(new c.Vector3().fromBufferAttribute(C,T)),R!==void 0&&A.colors.push(new c.Color().fromBufferAttribute(R,T));var E=v.groups;if(0<E.length)for(var L=0;L<E.length;L++)for(var F=E[L],x=F.start,O=F.count,B=x,N=x+O;B<N;B+=3)_===void 0?M(B,B+1,B+2,F.materialIndex):M(_.getX(B),_.getX(B+1),_.getX(B+2),F.materialIndex);else if(_!==void 0)for(var k=0;k<_.count;k+=3)M(_.getX(k),_.getX(k+1),_.getX(k+2));else for(var z=0;z<C.count;z+=3)M(z,z+1,z+2);return this.computeFaceNormals(),v.boundingBox!==null&&(this.boundingBox=v.boundingBox.clone()),v.boundingSphere!==null&&(this.boundingSphere=v.boundingSphere.clone()),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(p).negate(),this.translate(p.x,p.y,p.z),this},normalize:function(){this.computeBoundingSphere();var v=this.boundingSphere.center,M=this.boundingSphere.radius,A=M===0?1:1/M,_=new c.Matrix4;return _.set(A,0,0,-A*v.x,0,A,0,-A*v.y,0,0,A,-A*v.z,0,0,0,1),this.applyMatrix4(_),this},computeFaceNormals:function(){for(var v=new c.Vector3,M=new c.Vector3,A=0,_=this.faces.length;A<_;A++){var w=this.faces[A],C=this.vertices[w.a],P=this.vertices[w.b],R=this.vertices[w.c];v.subVectors(R,P),M.subVectors(C,P),v.cross(M),v.normalize(),w.normal.copy(v)}},computeVertexNormals:function(){for(var v=!(0<arguments.length&&arguments[0]!==void 0)||arguments[0],M=Array(this.vertices.length),A=0,_=this.vertices.length;A<_;A++)M[A]=new c.Vector3;if(v)for(var w=new c.Vector3,C=new c.Vector3,P=0,R=this.faces.length;P<R;P++){var I=this.faces[P],S=this.vertices[I.a],T=this.vertices[I.b],E=this.vertices[I.c];w.subVectors(E,T),C.subVectors(S,T),w.cross(C),M[I.a].add(w),M[I.b].add(w),M[I.c].add(w)}else{this.computeFaceNormals();for(var L,F=0,x=this.faces.length;F<x;F++)L=this.faces[F],M[L.a].add(L.normal),M[L.b].add(L.normal),M[L.c].add(L.normal)}for(var O=0,B=this.vertices.length;O<B;O++)M[O].normalize();for(var N=0,k=this.faces.length;N<k;N++){var z=this.faces[N],G=z.vertexNormals;G.length===3?(G[0].copy(M[z.a]),G[1].copy(M[z.b]),G[2].copy(M[z.c])):(G[0]=M[z.a].clone(),G[1]=M[z.b].clone(),G[2]=M[z.c].clone())}return 0<this.faces.length&&(this.normalsNeedUpdate=!0),M},computeFlatVertexNormals:function(){this.computeFaceNormals();for(var v=0,M=this.faces.length;v<M;v++){var A=this.faces[v],_=A.vertexNormals;_.length===3?(_[0].copy(A.normal),_[1].copy(A.normal),_[2].copy(A.normal)):(_[0]=A.normal.clone(),_[1]=A.normal.clone(),_[2]=A.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){for(var v,M=0,A=this.faces.length;M<A;M++){v=this.faces[M],v.__originalFaceNormal?v.__originalFaceNormal.copy(v.normal):v.__originalFaceNormal=v.normal.clone(),v.__originalVertexNormals||(v.__originalVertexNormals=[]);for(var _=0,w=v.vertexNormals.length;_<w;_++)v.__originalVertexNormals[_]?v.__originalVertexNormals[_].copy(v.vertexNormals[_]):v.__originalVertexNormals[_]=v.vertexNormals[_].clone()}var C=new m;C.faces=this.faces;for(var P=0,R=this.morphTargets.length;P<R;P++){if(!this.morphNormals[P]){this.morphNormals[P]={},this.morphNormals[P].faceNormals=[],this.morphNormals[P].vertexNormals=[];for(var I=this.morphNormals[P].faceNormals,S=this.morphNormals[P].vertexNormals,T=0,E=this.faces.length;T<E;T++){var L=new c.Vector3,F={a:new c.Vector3,b:new c.Vector3,c:new c.Vector3};I.push(L),S.push(F)}}var x=this.morphNormals[P];C.vertices=this.morphTargets[P].vertices,C.computeFaceNormals();var O=C.computeVertexNormals();if(O&&0<O.length){this.morphTargets[P].normals=Array(this.vertices.length);for(var B=0;B<O.length;B++)this.morphTargets[P].normals[B]=O[B].clone()}for(var N=0,k=this.faces.length;N<k;N++){var z=this.faces[N],G=x.faceNormals[N],Y=x.vertexNormals[N];G.copy(z.normal),Y.a.copy(z.vertexNormals[0]),Y.b.copy(z.vertexNormals[1]),Y.c.copy(z.vertexNormals[2])}}for(var Z,te=0,q=this.faces.length;te<q;te++)Z=this.faces[te],Z.normal=Z.__originalFaceNormal,Z.vertexNormals=Z.__originalVertexNormals;this.morphNormalsReady=!0},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new c.Box3),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new c.Sphere),this.boundingSphere.setFromPoints(this.vertices)},mergeMorph:function(v,M){var A=this.morphTargets.length,_=this.morphTargets,w=v.morphTargets,C=this.morphColors.length,P=this.morphColors,R=v.morphColors;if(0<A&&A==w.length)for(var I=0,S=_.length;I<S;I++){for(var T=_[I],E=w[I],L=0,F=E.vertices.length;L<F;L++){var x=E.vertices[L],O=x.clone();M!==void 0&&O.applyMatrix4(M),T.vertices.push(O)}if(T.normals&&E.normals)for(var B=0;B<E.normals.length;B+=3)g.set(E.normals2[B],E.normals2[B+1],E.normals2[B+2]),M!==void 0&&g.applyMatrix4(M),T.normals.push(g.x,g.y,g.z)}if(0<C&&C==R.length)for(var N=0,k=P.length;N<k;N++)for(var z=P[N],G=R[N],Y=0,Z=G.colors;Y<Z;Y++)z.colors.push(G.colors[Y].clone())},merge:function(v,M){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:0;if(!(v&&v.isGeometry))return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",v);var _,w=this.vertices.length,C=this.vertices,P=v.vertices,R=v.normals,I=this.faces,S=v.faces,T=this.colors,E=v.colors;M!==void 0&&(_=new c.Matrix3().getNormalMatrix(M));for(var L=0,F=P.length;L<F;L++){var x=P[L],O=x.clone();M!==void 0&&O.applyMatrix4(M),C.push(O)}for(var B=0;B<R.length;B+=3)g.set(R[B],R[B+1],R[B+2]),M!==void 0&&g.applyMatrix4(M),this.normals.push(g.x,g.y,g.z);for(var N=0,k=E.length;N<k;N++)typeof E[N]=="number"?T.push(E[N]):T.push(E[N].clone());for(var z=0,G=S.length;z<G;z++){var Y=S[z],Z=void 0,te=void 0,q=Y.vertexNormals,W=Y.vertexColors,$=new b(Y.a+w,Y.b+w,Y.c+w);$.normal.copy(Y.normal),_!==void 0&&$.normal.applyMatrix3(_).normalize();for(var X=0,K=q.length;X<K;X++)Z=q[X].clone(),_!==void 0&&Z.applyMatrix3(_).normalize(),$.vertexNormals.push(Z);$.color.copy(Y.color);for(var re=0,V=W.length;re<V;re++)te=W[re],$.vertexColors.push(te.clone());$.materialIndex=Y.materialIndex+A,I.push($)}for(var j,oe=0,ae=v.faceVertexUvs.length;oe<ae;oe++){j=v.faceVertexUvs[oe],this.faceVertexUvs[oe]===void 0&&(this.faceVertexUvs[oe]=[]);for(var le=0,H=j.length;le<H;le++){for(var U=j[le],D=[],Q=0,ie=U.length;Q<ie;Q++)D.push(U[Q].clone());this.faceVertexUvs[oe].push(D)}}this.mergeMorph(v,M)},mergeMesh:function(v){return v&&v.isMesh?(v.matrixAutoUpdate&&v.updateMatrix(),void this.merge(v.geometry,v.matrix)):void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",v)},mergeVertices:function(){for(var v=0<arguments.length&&arguments[0]!==void 0?arguments[0]:4,M={},A=[],_=[],w=Math.pow(10,v),C=0,P=this.vertices.length;C<P;C++){var R=this.vertices[C],I=Math.round(R.x*w)+"_"+Math.round(R.y*w)+"_"+Math.round(R.z*w);M[I]===void 0?(M[I]=C,A.push(this.vertices[C]),_[C]=A.length-1):_[C]=_[M[I]]}for(var S,T=[],E=0,L=this.faces.length;E<L;E++){S=this.faces[E],S.a=_[S.a],S.b=_[S.b],S.c=_[S.c];for(var F=[S.a,S.b,S.c],x=0;3>x;x++)if(F[x]===F[(x+1)%3]){T.push(E);break}}for(var O,B=T.length-1;0<=B;B--){O=T[B],this.faces.splice(O,1);for(var N=0,k=this.faceVertexUvs.length;N<k;N++)this.faceVertexUvs[N].splice(O,1)}var z=this.vertices.length-A.length;return this.vertices=A,z},setFromPoints:function(v){this.vertices=[];for(var M,A=0,_=v.length;A<_;A++)M=v[A],this.vertices.push(new c.Vector3(M.x,M.y,M.z||0));return this},sortFacesByMaterialIndex:function(){for(var v=this.faces,M=v.length,A=0;A<M;A++)v[A]._id=A;v.sort(function(S,T){return S.materialIndex-T.materialIndex});var _,w,C=this.faceVertexUvs[0],P=this.faceVertexUvs[1];C&&C.length===M&&(_=[]),P&&P.length===M&&(w=[]);for(var R,I=0;I<M;I++)R=v[I]._id,_&&_.push(C[R]),w&&w.push(P[R]);_&&(this.faceVertexUvs[0]=_),w&&(this.faceVertexUvs[1]=w)},toJSON:function(){function v(V,j,oe){return oe?V|1<<j:V&~(1<<j)}function M(V){var j=V.x.toString()+V.y.toString()+V.z.toString();return L[j]===void 0&&(L[j]=E.length/3,E.push(V.x,V.y,V.z)),L[j]}function A(V){var j=V.r.toString()+V.g.toString()+V.b.toString();return x[j]===void 0&&(x[j]=F.length,F.push(V.getHex())),x[j]}function _(V){var j=V.x.toString()+V.y.toString();return B[j]===void 0&&(B[j]=O.length/2,O.push(V.x,V.y)),B[j]}var w={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(w.uuid=this.uuid,w.type=this.type,this.name!==""&&(w.name=this.name),this.parameters!==void 0){var C=this.parameters;for(var P in C)C[P]!==void 0&&(w[P]=C[P]);return w}for(var R,I=[],S=0;S<this.vertices.length;S++)R=this.vertices[S],I.push(R.x,R.y,R.z);for(var T=[],E=[],L={},F=[],x={},O=[],B={},N=0;N<this.faces.length;N++){var k=this.faces[N],z=!0,G=!1,Y=this.faceVertexUvs[0][N]!==void 0,Z=0<k.normal.length(),te=0<k.vertexNormals.length,q=k.color.r!==1||k.color.g!==1||k.color.b!==1,W=0<k.vertexColors.length,$=0;if($=v($,0,0),$=v($,1,z),$=v($,2,G),$=v($,3,Y),$=v($,4,Z),$=v($,5,te),$=v($,6,q),$=v($,7,W),T.push($),T.push(k.a,k.b,k.c),T.push(k.materialIndex),Y){var X=this.faceVertexUvs[0][N];T.push(_(X[0]),_(X[1]),_(X[2]))}if(Z&&T.push(M(k.normal)),te){var K=k.vertexNormals;T.push(M(K[0]),M(K[1]),M(K[2]))}if(q&&T.push(A(k.color)),W){var re=k.vertexColors;T.push(A(re[0]),A(re[1]),A(re[2]))}}return w.data={},w.data.vertices=I,w.data.normals=E,0<F.length&&(w.data.colors=F),0<O.length&&(w.data.uvs=[O]),w.data.faces=T,w},clone:function(){return new m().copy(this)},copy:function(v){this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=v.name;for(var M=v.vertices,A=0,_=M.length;A<_;A++)this.vertices.push(M[A].clone());for(var w=v.colors,C=0,P=w.length;C<P;C++)this.colors.push(w[C].clone());for(var R=v.faces,I=0,S=R.length;I<S;I++)this.faces.push(R[I].clone());for(var T,E=0,L=v.faceVertexUvs.length;E<L;E++){T=v.faceVertexUvs[E],this.faceVertexUvs[E]===void 0&&(this.faceVertexUvs[E]=[]);for(var F=0,x=T.length;F<x;F++){for(var O,B=T[F],N=[],k=0,z=B.length;k<z;k++)O=B[k],N.push(O.clone());this.faceVertexUvs[E].push(N)}}for(var G,Y=v.morphTargets,Z=0,te=Y.length;Z<te;Z++){if(G={},G.name=Y[Z].name,Y[Z].vertices!==void 0){G.vertices=[];for(var q=0,W=Y[Z].vertices.length;q<W;q++)G.vertices.push(Y[Z].vertices[q].clone())}if(Y[Z].normals!==void 0){G.normals=[];for(var $=0,X=Y[Z].normals.length;$<X;$++)G.normals.push(Y[Z].normals[$].clone())}this.morphTargets.push(G)}for(var K,re=v.morphNormals,V=0,j=re.length;V<j;V++){if(K={},re[V].vertexNormals!==void 0){K.vertexNormals=[];for(var oe=0,ae=re[V].vertexNormals.length;oe<ae;oe++){var le=re[V].vertexNormals[oe],H={};H.a=le.a.clone(),H.b=le.b.clone(),H.c=le.c.clone(),K.vertexNormals.push(H)}}if(re[V].faceNormals!==void 0){K.faceNormals=[];for(var U=0,D=re[V].faceNormals.length;U<D;U++)K.faceNormals.push(re[V].faceNormals[U].clone())}this.morphNormals.push(K)}for(var Q=v.skinWeights,ie=0,ce=Q.length;ie<ce;ie++)this.skinWeights.push(Q[ie].clone());for(var ge=v.skinIndices,ye=0,ue=ge.length;ye<ue;ye++)this.skinIndices.push(ge[ye].clone());for(var be=v.lineDistances,ne=0,de=be.length;ne<de;ne++)this.lineDistances.push(be[ne]);var ve=v.boundingBox;ve!==null&&(this.boundingBox=ve.clone());var Ee=v.boundingSphere;return Ee!==null&&(this.boundingSphere=Ee.clone()),this.elementsNeedUpdate=v.elementsNeedUpdate,this.verticesNeedUpdate=v.verticesNeedUpdate,this.uvsNeedUpdate=v.uvsNeedUpdate,this.normalsNeedUpdate=v.normalsNeedUpdate,this.colorsNeedUpdate=v.colorsNeedUpdate,this.lineDistancesNeedUpdate=v.lineDistancesNeedUpdate,this.groupsNeedUpdate=v.groupsNeedUpdate,this},computeGroups(){var y,v,M=[],A=void 0,_=this.faces;for(v=0;v<_.length;v++){var w=_[v];w.materialIndex!==A&&(A=w.materialIndex,y!==void 0&&(y.count=3*v-y.start,M.push(y)),y={start:3*v,materialIndex:A})}return y!==void 0&&(y.count=3*v-y.start,M.push(y)),M},toBufferGeometry:function(){var v=new h().fromGeometry(this),M=new c.BufferGeometry,A=new Float32Array(3*v.vertices.length);if(M.setAttribute("position",new c.BufferAttribute(A,3).copyVector3sArray(v.vertices)),0<v.normals.length){var _=new Float32Array(3*v.normals.length);M.setAttribute("normal",new c.BufferAttribute(_,3).copyVector3sArray(v.normals))}if(0<v.colors.length){var w=new Float32Array(3*v.colors.length);M.setAttribute("color",new c.BufferAttribute(w,3).copyColorsArray(v.colors))}if(0<v.uvs.length){var C=new Float32Array(2*v.uvs.length);M.setAttribute("uv",new c.BufferAttribute(C,2).copyVector2sArray(v.uvs))}if(0<v.uvs2.length){var P=new Float32Array(2*v.uvs2.length);M.setAttribute("uv2",new c.BufferAttribute(P,2).copyVector2sArray(v.uvs2))}for(var R in M.groups=v.groups,v.morphTargets){for(var I=[],S=v.morphTargets[R],T=0,E=S.length;T<E;T++){var L=S[T],F=new c.Float32BufferAttribute(3*L.data.length,3);F.name=L.name,I.push(F.copyVector3sArray(L.data))}M.morphAttributes[R]=I}if(0<v.skinIndices.length){var x=new c.Float32BufferAttribute(4*v.skinIndices.length,4);M.setAttribute("skinIndex",x.copyVector4sArray(v.skinIndices))}if(0<v.skinWeights.length){var O=new c.Float32BufferAttribute(4*v.skinWeights.length,4);M.setAttribute("skinWeight",O.copyVector4sArray(v.skinWeights))}return v.boundingSphere!==null&&(M.boundingSphere=v.boundingSphere.clone()),v.boundingBox!==null&&(M.boundingBox=v.boundingBox.clone()),M},toIndexedBufferGeometry:function(){var v=new c.BufferGeometry,M=new Float32Array(3*this.vertices.length);if(v.setAttribute("position",new c.BufferAttribute(M,3).copyVector3sArray(this.vertices)),0<this.normals.length){var A=new Float32Array(this.normals.length),_=new c.BufferAttribute(A,3).copyArray(this.normals);v.setAttribute("normal",_)}if(0<this.uvs.length&&0<this.uvs[0].length){var w=new Float32Array(2*this.uvs[0].length);v.setAttribute("uv",new c.BufferAttribute(w,2).copyArray(this.uvs[0]))}if(1<this.uvs.length&&0<this.uvs[1].length){var C=new Float32Array(2*this.uvs[1].length);v.setAttribute("uv2",new c.BufferAttribute(C,2).copyArray(this.uvs[1]))}if(0<this.colors.length){for(var P=[],R=0;R<this.colors.length;R++)P.push(new c.Color(this.colors[R]));var I=new Float32Array(3*P.length);v.setAttribute("color",new c.BufferAttribute(I,3).copyColorsArray(P))}else{for(var S=new Float32Array(3*this.vertices.length),T=0;T<3*this.vertices.length;T++)S[T]=1;v.setAttribute("color",new c.BufferAttribute(S,3))}if(0<this.faces.length){for(var E=[],L=[],F=0;F<this.faces.length;F++){L.push(this.faces[F].a,this.faces[F].b,this.faces[F].c);var x=this.faces[F].vertexColors;if(x.length===3)E.push(x[0],x[1],x[2]);else{var O=this.faces[F].color;E.push(O,O,O)}}v.setIndex(L),v.groups=this.computeGroups()}if(0<this.morphTargets.length){for(var B=[],N=[],k=0,z=this.morphTargets.length;k<z;k++){var G=this.morphTargets[k],Y=new c.Float32BufferAttribute(3*G.vertices.length,3);if(Y.name=G.name,B.push(Y.copyVector3sArray(G.vertices)),G.normals){var Z=new c.Float32BufferAttribute(3*G.normals.length,3);Z.name=G.name,N.push(Z.copyVector3sArray(G.normals))}}v.morphAttributes.position=B,v.morphAttributes.normal=N}if(0<this.skinIndices.length){var te=new c.Float32BufferAttribute(4*this.skinIndices.length,4);v.setAttribute("skinIndex",te.copyVector4sArray(this.skinIndices))}if(0<this.skinWeights.length){var q=new c.Float32BufferAttribute(4*this.skinWeights.length,4);v.setAttribute("skinWeight",q.copyVector4sArray(this.skinWeights))}return this.boundingSphere!==null&&(v.boundingSphere=this.boundingSphere.clone()),this.boundingBox!==null&&(v.boundingBox=this.boundingBox.clone()),v},computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")},applyMatrix:function(v){return console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(v)},dispose:function(){this.dispatchEvent({type:"dispose"})}}),m.createBufferGeometryFromObject=function(y){var v=new c.BufferGeometry,M=y.geometry;if(y.isPoints||y.isLine){var A=new c.Float32BufferAttribute(3*M.vertices.length,3),_=new c.Float32BufferAttribute(3*M.colors.length,3);if(v.setAttribute("position",A.copyVector3sArray(M.vertices)),v.setAttribute("color",_.copyColorsArray(M.colors)),M.lineDistances&&M.lineDistances.length===M.vertices.length){var w=new c.Float32BufferAttribute(M.lineDistances.length,1);v.setAttribute("lineDistance",w.copyArray(M.lineDistances))}M.boundingSphere!==null&&(v.boundingSphere=M.boundingSphere.clone()),M.boundingBox!==null&&(v.boundingBox=M.boundingBox.clone())}else y.isMesh&&(v=M.toBufferGeometry());return v};class h{constructor(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}computeGroups(v){var M,A,_=[],w=void 0,C=v.faces;for(A=0;A<C.length;A++){var P=C[A];P.materialIndex!==w&&(w=P.materialIndex,M!==void 0&&(M.count=3*A-M.start,_.push(M)),M={start:3*A,materialIndex:w})}M!==void 0&&(M.count=3*A-M.start,_.push(M)),this.groups=_}fromGeometry(v){var M,A=v.faces,_=v.vertices,w=v.faceVertexUvs,C=w[0]&&0<w[0].length,P=w[1]&&0<w[1].length,R=v.morphTargets,I=R.length;if(0<I){M=[];for(var S=0;S<I;S++)M[S]={name:R[S].name,data:[]};this.morphTargets.position=M}var T,E=v.morphNormals,L=E.length;if(0<L){T=[];for(var F=0;F<L;F++)T[F]={name:E[F].name,data:[]};this.morphTargets.normal=T}var x=v.skinIndices,O=v.skinWeights,B=x.length===_.length,N=O.length===_.length;0<_.length&&A.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(var k,z=0;z<A.length;z++){k=A[z],this.vertices.push(_[k.a],_[k.b],_[k.c]);var G=k.vertexNormals;if(G.length===3)this.normals.push(G[0],G[1],G[2]);else{var Y=k.normal;this.normals.push(Y,Y,Y)}var Z=k.vertexColors;if(Z.length===3)this.colors.push(Z[0],Z[1],Z[2]);else{var te=k.color;this.colors.push(te,te,te)}if(C===!0){var q=w[0][z];q===void 0?(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",z),this.uvs.push(new c.Vector2,new c.Vector2,new c.Vector2)):this.uvs.push(q[0],q[1],q[2])}if(P===!0){var W=w[1][z];W===void 0?(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",z),this.uvs2.push(new c.Vector2,new c.Vector2,new c.Vector2)):this.uvs2.push(W[0],W[1],W[2])}for(var $,X=0;X<I;X++)$=R[X].vertices,M[X].data.push($[k.a],$[k.b],$[k.c]);for(var K,re=0;re<L;re++)K=E[re].vertexNormals[z],T[re].data.push(K.a,K.b,K.c);B&&this.skinIndices.push(x[k.a],x[k.b],x[k.c]),N&&this.skinWeights.push(O[k.a],O[k.b],O[k.c])}return this.computeGroups(v),this.verticesNeedUpdate=v.verticesNeedUpdate,this.normalsNeedUpdate=v.normalsNeedUpdate,this.colorsNeedUpdate=v.colorsNeedUpdate,this.uvsNeedUpdate=v.uvsNeedUpdate,this.groupsNeedUpdate=v.groupsNeedUpdate,v.boundingSphere!==null&&(this.boundingSphere=v.boundingSphere.clone()),v.boundingBox!==null&&(this.boundingBox=v.boundingBox.clone()),this}}class b{constructor(v,M,A,_,w){var C=5<arguments.length&&arguments[5]!==void 0?arguments[5]:0;this.a=v,this.b=M,this.c=A,this.normal=_&&_.isVector3?_:new c.Vector3,this.vertexNormals=Array.isArray(_)?_:[],this.color=w&&w.isColor?w:new c.Color,this.vertexColors=Array.isArray(w)?w:[],this.materialIndex=C}clone(){return new this.constructor().copy(this)}copy(v){this.a=v.a,this.b=v.b,this.c=v.c,this.normal.copy(v.normal),this.color.copy(v.color),this.materialIndex=v.materialIndex;for(var M=0,A=v.vertexNormals.length;M<A;M++)this.vertexNormals[M]=v.vertexNormals[M].clone();for(var _=0,w=v.vertexColors.length;_<w;_++)this.vertexColors[_]=v.vertexColors[_].clone();return this}}},o=>{o.exports=QB},o=>{o.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg=="},(o,l)=>{l.augmentMorphColor=function(){return function(u){u.vertexShader=u.vertexShader.replace("#include <color_pars_vertex>",["varying vec3 vColor;","attribute vec3 morphColor0;","attribute vec3 morphColor1;"].join(`
3183
3183
  `)),u.vertexShader=u.vertexShader.replace("#include <color_vertex>",["vColor.xyz = color.xyz;","#ifdef USE_MORPHTARGETS","vColor = morphColor0 * morphTargetInfluences[ 0 ];","vColor += morphColor1 * morphTargetInfluences[ 1 ];","#endif"].join(`
3184
- `))}}},(o,l,u)=>{var c=u(4),f=u(5).createBufferGeometry,d=u(5).removeVertexAtIndex,p=u(5).resolveURL,g=0,m=function(){return"pr"+g++},h=function(){this.isZincObject=!0,this.geometry=void 0,this.morph=void 0,this.group=new c.Group,this._lod=new(u(11)).LOD(this),this.groupName=void 0,this.timeEnabled=!1,this.morphColour=!1,this.inbuildTime=0,this.mixer=void 0,this.animationGroup=void 0,this.duration=6e3,this.clipAction=void 0,this.userData={},this.videoHandler=void 0,this.marker=void 0,this.markerNumber=void 0,this.markerUpdateRequired=!0,this.closestVertexIndex=-1,this.boundingBoxUpdateRequired=!0,this.cachedBoundingBox=new c.Box3,this.anatomicalId=void 0,this.region=void 0,this.animationClip=void 0,this.markerMode="inherited",this.uuid=m(),this._v1=new c.Vector3,this._v2=new c.Vector3,this._b1=new c.Box3,this.center=new c.Vector3,this.radius=0,this.visible=!0,this.drawRange=-1,this.origColour=void 0,this.origVertexColors=!1,this.isPickable=!0};h.prototype.setDuration=function(b){this.duration=b,this.clipAction&&this.clipAction.setDuration(this.duration)},h.prototype.getDuration=function(){return this.duration},h.prototype.setRegion=function(b){this.region=b},h.prototype.getRegion=function(){return this.region},h.prototype.getMorph=function(){var b=this._lod.getCurrentMorph();return b||this.morph},h.prototype.getGroup=function(){return this.group},h.prototype.setMorph=function(b){this.morph=b,this.group.add(this.morph);var y=this._lod.calculateDistance("far");this._lod.addLevel(b,y),this._lod.setMaterial(b.material)},h.prototype.checkTransparentMesh=function(){},h.prototype.setMesh=function(b,y,v){this.animationGroup=new c.AnimationObjectGroup(b),this.mixer=new c.AnimationMixer(this.animationGroup);var M=b.geometry;if(this.geometry=b.geometry,this.clipAction=void 0,M&&M.morphAttributes){var A=M.morphAttributes.position;A||(A=M.morphAttributes.color?M.morphAttributes.color:M.morphAttributes.normal),A&&(this.animationClip=c.AnimationClip.CreateClipsFromMorphTargetSequences(A,10,!0),this.animationClip&&this.animationClip[0]!=null&&(this.clipAction=this.mixer.clipAction(this.animationClip[0]).setDuration(this.duration),this.clipAction.loop=c.loopOnce,this.clipAction.clampWhenFinished=!0,this.clipAction.play()))}this.timeEnabled=y,this.morphColour=v,b.userData=this,b.matrixAutoUpdate=!1,this.setMorph(b),this.checkTransparentMesh(),this.timeEnabled?this.setFrustumCulled(!1):this.morphColour&&(M.setAttribute("morphTarget0",M.getAttribute("position")),M.setAttribute("morphTarget1",M.getAttribute("position"))),this.boundingBoxUpdateRequired=!0},h.prototype.setIsPickable=function(b){this.isPickable!==b&&(this.isPickable=b,this.region&&(this.region.pickableUpdateRequired=!0))},h.prototype.setAnatomicalId=function(b){this.anatomicalId=b},h.prototype.setName=function(b){this.groupName=b,this._lod.setName(b)},h.prototype.getCurrentTime=function(){if(this.clipAction){var b=this.clipAction.time/this.clipAction._clip.duration;return this.duration*b}return this.inbuildTime},h.prototype.setMorphTime=function(b){var y=!1;if(this.clipAction){var v=b/this.duration,M=this.clipAction._clip.duration,A=v*M;A!=this.clipAction.time&&(this.clipAction.time=A,y=!0),y&&this.isTimeVarying()&&this.mixer.update(0)}else{var _=b;_=b>this.duration?this.duration:0>b?0:b,_!=this.inbuildTime&&(this.inbuildTime=_,y=!0)}y&&(this.boundingBoxUpdateRequired=!0,this._lod.updateMorphColorAttribute(!0),this.timeEnabled&&(this.markerUpdateRequired=!0))},h.prototype.isTimeVarying=function(){return!!(this.timeEnabled||this.morphColour)},h.prototype.getVisibility=function(){return this.visible},h.prototype.setVisibility=function(b){b!==this.visible&&(this.visible=b,this.group.visible=b,this.region&&(this.region.pickableUpdateRequired=!0))},h.prototype.setAlpha=function(b){var y=this._lod._material,v=!1;1>b&&(v=!0),y.opacity=b,y.transparent=v,this.checkTransparentMesh()},h.prototype.setFrustumCulled=function(b){this._lod.setFrustumCulled(b)},h.prototype.setVertexColors=function(b){this._lod.setVertexColors(b)},h.prototype.getColour=function(){return this._lod._material?this._lod._material.color:void 0},h.prototype.setColour=function(b){this._lod.setColour(b)},h.prototype.setGreyScale=function(b){if(b){if(!this.origColour&&this._lod._material)return this.origColour=this._lod._material.color,this.origVertexColors=this._lod._material.vertexColors,this._lod.setVertexColors(!1),this._lod.setColour(new c.Color().setHex(12303291)),!0}else if(this.origColour)return this._lod.setColour(this.origColour),this._lod.setVertexColors(this.origVertexColors),this.origColour=void 0,!0;return!1},h.prototype.getColourHex=function(){return!this.morphColour&&this._lod._material&&this._lod._material.color?this._lod._material.color.getHexString():void 0},h.prototype.setColourHex=function(b){this._lod._material.color.setHex(b),this._lod._secondaryMaterial&&this._lod._secondaryMaterial.color.setHex(b)},h.prototype.setEmissiveRGB=function(b){this._lod._material&&this._lod._material.emissive&&this._lod._material.emissive.setRGB(...b),this._lod._secondaryMaterial&&this._lod._secondaryMaterial.emissive.setRGB(...b)},h.prototype.setMaterial=function(b){this._lod.setMaterial(b)},h.prototype.getClosestVertexIndex=function(){var b=-1,y=this.getMorph();if(y&&y.geometry){var v=y.geometry.attributes.position;if(v){this._b1.setFromBufferAttribute(v),this._b1.getCenter(this._v1);for(var M=-1,A=0,_=0;_<v.count;_++)this._v2.fromArray(v.array,3*_),A=this._v2.distanceTo(this._v1),M==-1?M=A:M>A&&(M=A,b=_)}}return b},h.prototype.getClosestVertex=function(b){var y=new c.Vector3;this.closestVertexIndex==-1&&(this.closestVertexIndex=this.getClosestVertexIndex());var v=this.getMorph();if(v&&v.geometry&&0<=this.closestVertexIndex){var M=v.morphTargetInfluences,A=v.geometry.morphAttributes;if(M&&A&&A.position){for(var _=!1,w=0;w<M.length;w++)0<M[w]&&(_=!0,this._v1.fromArray(A.position[w].array,3*this.closestVertexIndex),y.add(this._v1.multiplyScalar(M[w])));if(_)return b?y.applyMatrix4(v.matrixWorld):y}else return y.fromArray(v.geometry.attributes.position.array,3*this.closestVertexIndex),b?y.applyMatrix4(v.matrixWorld):y}return this.getBoundingBox(),y.copy(this.center),y},h.prototype.getBoundingBox=function(){if(this.visible){var b=this._lod.getCurrentMorph();if(b&&b.visible)return this.boundingBoxUpdateRequired&&(u(5).getBoundingBox(b,this.cachedBoundingBox,this._b1,this._v1,this._v2),this.cachedBoundingBox.getCenter(this.center),this.radius=this.center.distanceTo(this.cachedBoundingBox.max),this.boundingBoxUpdateRequired=!1),this.cachedBoundingBox}},h.prototype.dispose=function(){this._lod.dispose(),this.animationGroup=void 0,this.mixer=void 0,this.morph=void 0,this.group=void 0,this.clipAction=void 0,this.groupName=void 0},h.prototype.markerIsRequired=function(b){return!!(this.visible&&(this.markerMode==="on"||b&&b.displayMarkers&&this.markerMode==="inherited"))},h.prototype.updateMarker=function(b,y){if(b==!1&&this.markerIsRequired(y)){var v=y.ndcToBeUpdated;if(this.groupName){if(this.marker||(this.marker=new(u(14)).Marker(this),this.markerUpdateRequired=!0),this.markerUpdateRequired){var M=this.getClosestVertex(!1);M&&(this.marker.setPosition(M.x,M.y,M.z),this.markerUpdateRequired=!1)}this.marker.isEnabled()||(y.markersList&&!(this.marker.uuid in y.markersList)&&(v=!0,y.markersList[this.marker.uuid]=this.marker),this.marker.enable(),this.group.add(this.marker.morph)),this.marker.setNumber(this.markerNumber),this.markerImgURL?this.marker.loadUserSprite(this.markerImgURL):this.marker.setDefaultSprite(),y&&y.camera&&(v||y.markerCluster.markerUpdateRequired)&&(this.marker.updateNDC(y.camera.cameraObject),y.markerCluster.markerUpdateRequired=!0)}}else this.marker&&this.marker.isEnabled()&&(this.marker.disable(),this.group.remove(this.marker.morph),y.markersList&&this.marker.uuid in y.markersList&&(y.markerCluster.markerUpdateRequired=!0,delete y.markersList[this.marker.uuid])),this.markerUpdateRequired=!0},h.prototype.processMarkerVisual=function(b,y){this.marker&&this.marker.isEnabled()&&this.marker.updateVisual(b,y)},h.prototype.initiateMorphColor=function(){this.morphColour==1&&this._lod.updateMorphColorAttribute(!1)},h.prototype.setRenderOrder=function(b){this._lod.setRenderOrder(b)},h.prototype.getClosestVertexDOMElementCoords=function(b){if(b&&b.camera){var y=!0,v=this.getClosestVertex(!0);return v.project(b.camera),v.z=Math.min(Math.max(v.z,0),1),(1<v.x||-1>v.x||1<v.y||-1>v.y)&&(y=!1),b.getZincCameraControls().getRelativeCoordsFromNDC(v.x,v.y,v),{position:v,inView:y}}},h.prototype.setMarkerMode=function(b,y){b!==this.markerMode&&(this.markerMode=b==="on"||b==="off"?b:"inherited",this.region&&(this.region.pickableUpdateRequired=!0)),y&&(this.markerNumber=y.number,this.markerImgURL=y.imgURL)},h.prototype.render=function(b,y,v,M){if(this.visible&&!(this.timeEnabled&&y)&&this._lod.update(v,this.center),y==!0){if(this.clipAction&&this.isTimeVarying())this.mixer.update(b);else{var A=this.inbuildTime+b;A>this.duration&&(A-=this.duration),this.inbuildTime=A}this.visible&&b!=0&&(this.boundingBoxUpdateRequired=!0,this.morphColour==1&&this._lod.updateMorphColorAttribute(!0))}this.updateMarker(y,M)},h.prototype.addLOD=function(b,y,v,M,A){this._lod.addLevelFromURL(b,y,v,M,A)},h.prototype.addVertices=function(b){var y=this.getMorph(),v=void 0;if(!y)v=f(500,b),this.drawRange=b.length;else if(-1<this.drawRange){var M=y.geometry.getAttribute("position");b.forEach(A=>{M.setXYZ(this.drawRange,A[0],A[1],A[2]),++this.drawRange}),M.needsUpdate=!0,y.geometry.setDrawRange(0,this.drawRange),y.geometry.computeBoundingBox(),y.geometry.computeBoundingSphere(),v=y.geoemtry,this.boundingBoxUpdateRequired=!0}return v},h.prototype.deleteVertices=function(b){var y=this.getMorph();return!!(y!=null&&y.geometry&&this.drawRange>=b&&d(y.geometry,b,!0))&&(--this.drawRange,y.geometry.setDrawRange(0,this.drawRange),y.geometry.computeBoundingBox(),y.geometry.computeBoundingSphere(),this.boundingBoxUpdateRequired=!0,!0)},h.prototype.setPosition=function(b,y,v){var M=this.getGroup();M&&(M.position.set(b,y,v),M.matrixWorldNeedsUpdate=!0,M.updateMatrix(),M.updateWorldMatrix(!0,!0),this.boundingBoxUpdateRequired=!0)},h.prototype.loadAdditionalSources=function(b){b.load(p(filename),meshloader(region,colour,opacity,localTimeEnabled,localMorphColour,void 0,void 0,void 0,void 0,finishCallback),this.onProgress(filename),this.onError(finishCallback))},h.prototype.setScaleAll=function(b){var y=this.getGroup();y&&(y.scale.set(b,b,b),y.updateMatrix(),this.boundingBoxUpdateRequired=!0)},l.ZincObject=h},(o,l,u)=>{var c=u(4),f=u(5).updateMorphColorAttribute,d=u(5).toBufferGeometry,p=function(g){this.levels=[],this._currentLevel=0,this._renderOrder=1,this._material=void 0,this._secondaryMaterial=void 0,this._loader=void 0,this._parent=g,this.addLevel=(h,b)=>{if(h){var y,v=Math.abs(b);for(y=0;y<this.levels.length&&!(v<this.levels[y].distance);y++);this.levels.splice(y,0,{distance:v,morph:h,loaded:!0,loading:!1,url:""}),h.renderOrder=this._renderOrder}},this.levelLoaded=(h,b)=>{if(h){for(var y=Math.abs(b),v=0;v<this.levels.length;v++)if(y===this.levels[v].distance){this._parent.group.add(h),this.levels[v].morph=h,this.levels[v].loaded=!0,this.levels[v].loading=!1;break}this.checkTransparentMesh()}},this.addLevelFromURL=(h,b,y,v,M)=>{this._loader=h;var A,_=this.calculateDistance(b);for(A=0;A<this.levels.length&&!(_<this.levels[A].distance);A++);this.levels.splice(A,0,{distance:_,morph:void 0,loaded:!1,loading:!1,url:y,index:v}),M&&this.loadLevel(A)},this.loadLevel=h=>{var b=this.levels[h];return b.morph||b.loaded||b.loading||(b.loading=!0,this._loader.load(b.url,this.lodLoader(b.distance),void 0,void 0,{index:b.index})),b.morph===void 0},this.calculateDistance=function(h){this._parent.getBoundingBox();var b=this._parent.radius,y=0;return h==="far"?y=4.5*b:h==="medium"?y=2.5*b:h=="close"&&(y=0),y},this.containsLevels=()=>!!(this.levels&&1<this.levels.length),this.checkTransparentMesh=()=>{var h=this.levels[this._currentLevel];this._material&&(this._material.transparent?(!this._secondaryMaterial&&(this._secondaryMaterial=this._material.clone(),this._secondaryMaterial.side=c.FrontSide),this._secondaryMaterial.opacity=this._material.opacity,this._secondaryMaterial.emissive&&this._secondaryMaterial.emissive.copy(this._material.emissive),this._secondaryMaterial.needsUpdate=!0,!h.secondaryMesh&&(h.secondaryMesh=new c.Mesh(h.morph.geometry,this._secondaryMaterial),h.secondaryMesh.renderOrder=h.morph.renderOrder+1,h.secondaryMesh.userData=h.morph.userData,h.secondaryMesh.name=h.morph.name),this._material.side=c.BackSide,this._material.needsUpdate=!0,!h.secondaryMesh.parent&&(h.morph.add(h.secondaryMesh),this._parent.animationGroup&&this._parent.animationGroup.add(h.secondaryMesh))):(h.secondaryMesh&&(h.morph.remove(h.secondaryMesh),this._parent.animationGroup&&(this._parent.animationGroup.uncache(h.secondaryMesh),this._parent.animationGroup.remove(h.secondaryMesh))),this._material.side=c.DoubleSide,this._material.needsUpdate=!0))},this.dispose=()=>{this.levels.forEach(h=>{h.morph&&h.morph.geometry&&h.morph.geometry.dispose()}),this._material&&this._material.dispose(),this._secondaryMaterial&&this._secondaryMaterial.dispose()},this.getCurrentLevel=()=>this._currentLevel,this.getCurrentMorph=()=>{var h=this.levels[this._currentLevel];return h&&h.morph?h.morph:this._parent.morph},this.lodLoader=function(h){return b=>{var y=this._material,v={localTimeEnabled:this._parent.timeEnabled,localMorphColour:this._parent.morphColour},M=d(b,v),A=void 0;this._parent.isGeometry?A=new c.Mesh(M,y):this._parent.isLines&&(A=new(u(12)).LineSegments(M,y)),A.userData=this._parent,A.renderOrder=this._renderOrder,b.dispose(),this.levelLoaded(A,h)}},this.updateMorphColorAttribute=h=>{if(this._material&&(this._material.vertexColors==c.VertexColors||this._material.vertexColors==!0))if(h){var b=this.getCurrentMorph();f(b.geometry,b)}else this.levels.forEach(y=>{y.morph&&y.morph.geometry&&f(y.morph.geometry,y.morph)})},this.setColour=h=>{this._material.color=h,this._secondaryMaterial&&(this._secondaryMaterial.color=h),m()},this.setFrustumCulled=h=>{this.levels.forEach(b=>{b.morph&&(b.morph.frustumCulled=h),b.secondaryMesh&&(b.secondaryMesh.frustumCulled=h)})},this.setMaterial=h=>{h&&(!this._material||this._material.id!==h.id)&&(this._material=h,this._secondaryMaterial&&this._secondaryMaterial.dispose(),this._secondaryMaterial=h.clone(),this._secondaryMaterial.side=c.FrontSide,this._secondaryMaterial.transparent=!0,this.levels.forEach(b=>{b.morph&&(b.morph.material=this._material,b.morph.geometry&&(b.morph.geometry.colorsNeedUpdate=!0)),b.secondaryMesh&&(b.secondaryMesh.material=this._secondaryMaterial)}))},this.setName=h=>{this.levels.forEach(b=>{b.morph&&(b.morph.name=h),b.secondaryMesh&&(b.secondaryMesh.name=h)})},this.setRenderOrder=h=>{this._renderOrder=h,this.levels.forEach(b=>{b.morph&&(b.morph.renderOrder=h),b.secondaryMesh&&(b.secondaryMesh.renderOrder=h)})},this.setVertexColors=h=>{this._material.vertexColors=h,m(),this._secondaryMaterial&&(this._secondaryMaterial.vertexColors=h)},this.update=(h,b)=>{var y=this.levels;if(1<y.length){var v,M,A=h.cameraObject.position.distanceTo(b),_=-1,w=-1;for(v=0,M=y.length;v<M&&A>=y[v].distance;v++)y[v].morph?(-1<_&&y[_].morph&&(y[_].morph.visible=!1),_=v,y[v].morph.visible=!0,w=-1):w=v;for(-1<w&&this.loadLevel(w);v<M;v++)y[v].morph&&(-1<_?y[v].morph.visible=!1:(y[v].morph.visible=!0,_=v));this._currentLevel!=_&&(this._currentLevel=_,this.checkTransparentMesh())}},this.toggleMarker=(h,b)=>{this.levels.forEach(y=>{y.morph&&(b?y.morph.add(h):y.morph.remove(h))})};var m=()=>{this.levels.forEach(h=>{h.morph&&h.morph.geometry&&(h.morph.geometry.colorsNeedUpdate=!0)})}};l.LOD=p},(o,l,u)=>{u.r(l),u.d(l,{LineSegments:()=>g});var c=u(13),f=u(4),d=new f.Vector3,p=new f.Vector3;class g extends c.Line{constructor(h,b){super(h,b),this.type="LineSegments"}computeLineDistances(){var h=this.geometry;if(!h.isBufferGeometry)h.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");else if(h.index===null){for(var b=h.attributes.position,y=[],v=0,M=b.count;v<M;v+=2)d.fromBufferAttribute(b,v),p.fromBufferAttribute(b,v+1),y[v]=v==0?0:y[v-1],y[v+1]=y[v]+d.distanceTo(p);h.setAttribute("lineDistance",new f.Float32BufferAttribute(y,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}g.prototype.isLineSegments=!0},(o,l,u)=>{u.r(l),u.d(l,{Line:()=>M});var c=u(4),f=new c.Vector3,d=new c.Vector3,p=new c.Matrix4,g=new c.Ray,m=new c.Sphere,h=new c.Vector3,b=new c.Vector3,y=new c.Vector3,v=new c.Vector3;class M extends c.Object3D{constructor(){var w=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new c.BufferGeometry,C=1<arguments.length&&arguments[1]!==void 0?arguments[1]:new c.LineBasicMaterial;super(),this.type="Line",this.geometry=w,this.material=C,this.updateMorphTargets()}copy(w){return super.copy(w),this.material=w.material,this.geometry=w.geometry,this}computeLineDistances(){var w=this.geometry;if(!w.isBufferGeometry)w.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");else if(w.index===null){for(var C=w.attributes.position,P=[0],R=1,I=C.count;R<I;R++)f.fromBufferAttribute(C,R-1),d.fromBufferAttribute(C,R),P[R]=P[R-1],P[R]+=f.distanceTo(d);w.setAttribute("lineDistance",new c.Float32BufferAttribute(P,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(w,C){var P=this.geometry,R=this.matrixWorld,I=w.params.Line.threshold,S=P.drawRange,T=P.morphAttributes.position;if(P.boundingSphere===null&&P.computeBoundingSphere(),m.copy(P.boundingSphere),m.applyMatrix4(R),m.radius+=I,w.ray.intersectsSphere(m)!==!1){p.copy(R).invert(),g.copy(w.ray).applyMatrix4(p);var E=I/((this.scale.x+this.scale.y+this.scale.z)/3),L=E*E,F=new c.Vector3,x=new c.Vector3,O=new c.Vector3,B=new c.Vector3,N=this.isLineSegments?2:1;if(P.isBufferGeometry){var k=P.index,z=P.attributes,G=z.position;if(k!==null)for(var Y=Math.max(0,S.start),Z=Math.min(k.count,S.start+S.count),te=Y;te<Z-1;te+=N){var q=k.getX(te),W=k.getX(te+1);A(F,x,this,G,T,q,W);var $=g.distanceSqToSegment(F,x,B,O);if(!($>L)){B.applyMatrix4(this.matrixWorld);var X=w.ray.origin.distanceTo(B);X<w.near||X>w.far||C.push({distance:X,point:O.clone().applyMatrix4(this.matrixWorld),index:te,face:null,faceIndex:null,object:this})}}else for(var K=Math.max(0,S.start),re=Math.min(G.count,S.start+S.count),V=K;V<re-1;V+=N){A(F,x,this,G,T,V,V+1);var j=g.distanceSqToSegment(F,x,B,O);if(!(j>L)){B.applyMatrix4(this.matrixWorld);var oe=w.ray.origin.distanceTo(B);oe<w.near||oe>w.far||C.push({distance:oe,point:O.clone().applyMatrix4(this.matrixWorld),index:V,face:null,faceIndex:null,object:this})}}}else P.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}updateMorphTargets(){var w=this.geometry;if(w.isBufferGeometry){var C=w.morphAttributes,P=Object.keys(C);if(0<P.length){var R=C[P[0]];if(R!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var I,S=0,T=R.length;S<T;S++)I=R[S].name||S+"",this.morphTargetInfluences.push(0),this.morphTargetDictionary[I]=S}}}else{var E=w.morphTargets;E!==void 0&&0<E.length&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function A(_,w,C,P,R,I,S){_.fromBufferAttribute(P,I),w.fromBufferAttribute(P,S);var T=C.morphTargetInfluences;if(C.material.morphTargets&&R&&T){h.set(0,0,0),b.set(0,0,0);for(var E=0,L=R.length;E<L;E++){var F=T[E],x=R[E];F!==0&&(y.fromBufferAttribute(x,I),v.fromBufferAttribute(x,S),h.addScaledVector(y.sub(_),F),b.addScaledVector(v.sub(w),F))}_.add(h),w.add(b)}}M.prototype.isLine=!0},(o,l,u)=>{var c=u(4),f=new Image(128,128);f.src=u(15);var d=new c.Texture;d.image=f,d.needsUpdate=!0;var p=[.02,.03,1],g=new c.SpriteMaterial({map:d,alphaTest:.5,transparent:!0,depthTest:!1,depthWrite:!1,sizeAttenuation:!1}),m=u(5).createNewSpriteText,h=function(b){u(10).ZincObject.call(this),this.texture=d;var y=void 0,v=void 0,M=void 0,A=void 0,_=void 0,w=!0;this.morph=new c.Group,this.group=this.morph,this.parent=b,this.isMarker=!0;var C=!1;this.ndc=new c.Vector3;var P=void 0,R=void 0,I=()=>{y=new c.Sprite(g),y.center.set(.5,0),this.morph.add(y),this.morph.position.set(0,0,0),this.morph.renderOrder=1e4,y.scale.set(p[0],p[1],p[2]),y.userData=this};this.updateVisual=(S,T)=>{var E=1,L=0;S!==T&&(L=1-(this.ndc.z-S)/(T-S),E=.6+.4*L),this.setSpriteSize(E)},this.updateNDC=S=>(this.ndc.copy(this.morph.position),this.ndc.project(S),this.ndc.z=Math.min(Math.max(this.ndc.z,0),1),this.ndc),this.setPosition=(S,T,E)=>{this.morph.position.set(S,T,E)},this.setSpriteSize=S=>{y.scale.set(.015,.02,1),y.scale.multiplyScalar(S)},this.setUserSprite=()=>{A&&(this.morph.add(A),w&&(this.morph.remove(y),R&&this.morph.remove(R),w=!1))},this.setImageForUserSprite=(S,T)=>{A&&(this.morph.remove(A),A=void 0),v&&v.dispose(),M&&M.dispose(),v=new c.Texture,v.image=S,v.needsUpdate=!0,M=new c.SpriteMaterial({map:v,alphaTest:.5,transparent:!0,depthTest:!1,depthWrite:!1,sizeAttenuation:!1}),T||(T=[.05,.05,1]),A=new c.Sprite(M),A.center.set(.5,0),A.scale.set(T[0],T[1],T[2]),A.userData=this,this.setUserSprite()},this.setDefaultSprite=()=>{w||(w=!0,this.morph.add(y),A&&this.morph.remove(A),R&&this.morph.add(R))},this.loadUserSprite=(S,T)=>{if(S)if(S!==_){_=S;var E=new Image(128,128);E.crossOrigin="anonymous",E.onload=()=>{this.setImageForUserSprite(E,T)},E.src=S}else this.setUserSprite()},this.dispose=()=>{this.morph&&this.morph.clear(),y&&(y.clear(),y=void 0),R&&(R.material.map.dispose(),R.material.dispose(),R=void 0)},this.isEnabled=()=>C,this.setNumber=S=>{(!S||P!=S)&&R&&(this.morph.remove(R),R.material.map.dispose(),R.material.dispose(),R=void 0),!R&&S&&(R=m(S,.012,"black","Asap",120,700),this.morph.add(R)),P=S},this.getNumber=()=>P||1,this.setVisibility=function(S){S!==this.visible&&(this.visible=S,this.group.visible=S,this.parent.region&&(this.parent.region.pickableUpdateRequired=!0))},this.enable=()=>{C=!0,this.morph.visible=!0,this.visible=!0},this.disable=()=>{C=!1,this.morph.visible=!1,this.visible=!1},I()};h.prototype=Object.create(u(10).ZincObject.prototype),l.Marker=h},o=>{o.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMzY1IiBoZWlnaHQ9IjU2MCIgdmlld0JveD0iMCAwIDM2NSA1NjAiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGRlc2M+Q3JlYXRlZCB3aXRoIEZhYnJpYy5qcyA1LjIuNDwvZGVzYz4NCjxkZWZzPg0KPC9kZWZzPg0KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idHJhbnNwYXJlbnQiPjwvcmVjdD4NCjxnIHRyYW5zZm9ybT0ibWF0cml4KDAgMCAwIDAgMCAwKSIgaWQ9IjgwOGVkMjgzLTI1MjQtNDQwZi04OGFlLTNiZGI0N2JiNTc0OSIgID4NCjwvZz4NCjxnIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIDEgMTgyLjUgMjgwKSIgaWQ9ImRiMzA0MTNkLTViZmYtNGI5OC1hYjU5LTQ2NDQ5N2VlMTk5ZSIgID4NCjxyZWN0IHN0eWxlPSJzdHJva2U6IG5vbmU7IHN0cm9rZS13aWR0aDogMTsgc3Ryb2tlLWRhc2hhcnJheTogbm9uZTsgc3Ryb2tlLWxpbmVjYXA6IGJ1dHQ7IHN0cm9rZS1kYXNob2Zmc2V0OiAwOyBzdHJva2UtbGluZWpvaW46IG1pdGVyOyBzdHJva2UtbWl0ZXJsaW1pdDogNDsgZmlsbDogcmdiKDI1NSwyNTUsMjU1KTsgZmlsbC1ydWxlOiBub256ZXJvOyBvcGFjaXR5OiAxOyB2aXNpYmlsaXR5OiBoaWRkZW47IiB2ZWN0b3ItZWZmZWN0PSJub24tc2NhbGluZy1zdHJva2UiICB4PSItMTgyLjUiIHk9Ii0yODAiIHJ4PSIwIiByeT0iMCIgd2lkdGg9IjM2NSIgaGVpZ2h0PSI1NjAiIC8+DQo8L2c+DQo8ZyB0cmFuc2Zvcm09Im1hdHJpeCgwIDAgMCAwIDAgOTcuNSkiICA+DQo8ZyBzdHlsZT0iIiAgID4NCjwvZz4NCjwvZz4NCjxnIHRyYW5zZm9ybT0ibWF0cml4KDAgMCAwIDAgMCA5Ny41KSIgID4NCjxnIHN0eWxlPSIiICAgPg0KPC9nPg0KPC9nPg0KPGcgdHJhbnNmb3JtPSJtYXRyaXgoMC45OSAwIDAgMC45OSAxODIuNSAyODApIiAgPg0KPGcgc3R5bGU9IiIgdmVjdG9yLWVmZmVjdD0ibm9uLXNjYWxpbmctc3Ryb2tlIiAgID4NCgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSAwIDApIiAgPg0KPHJlY3Qgc3R5bGU9InN0cm9rZTogbm9uZTsgc3Ryb2tlLXdpZHRoOiAxOyBzdHJva2UtZGFzaGFycmF5OiBub25lOyBzdHJva2UtbGluZWNhcDogYnV0dDsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDA7IHN0cm9rZS1saW5lam9pbjogbWl0ZXI7IHN0cm9rZS1taXRlcmxpbWl0OiA0OyBmaWxsOiByZ2IoMjU1LDI1NSwyNTUpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IHZpc2liaWxpdHk6IGhpZGRlbjsiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSIgIHg9Ii01NDAiIHk9Ii01NDAiIHJ4PSIwIiByeT0iMCIgd2lkdGg9IjEwODAiIGhlaWdodD0iMTA4MCIgLz4NCjwvZz4NCgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSAwIDApIiAgPg0KPHBhdGggc3R5bGU9InN0cm9rZTogcmdiKDAsMCwwKTsgc3Ryb2tlLXdpZHRoOiAwOyBzdHJva2UtZGFzaGFycmF5OiBub25lOyBzdHJva2UtbGluZWNhcDogYnV0dDsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDA7IHN0cm9rZS1saW5lam9pbjogbWl0ZXI7IHN0cm9rZS1taXRlcmxpbWl0OiA0OyBmaWxsOiByZ2IoMCw4OSwxMTYpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB2ZWN0b3ItZWZmZWN0PSJub24tc2NhbGluZy1zdHJva2UiICB0cmFuc2Zvcm09IiB0cmFuc2xhdGUoLTE4Mi45LCAtMjc5Ljg1KSIgZD0iTSAxODIuOSA1NTEuNyBDIDE4Mi45IDU1MS44MDAwMDAwMDAwMDAxIDE4My4xIDU1MiAxODMuMSA1NTIgQyAxODMuMSA1NTIgMzU4LjMgMjgzIDM1OC4zIDE5NC42IEMgMzU4LjMgNjQuNSAyNjkuNSA3LjkwMDAwMDAwMDAwMDAwNiAxODIuOSA3LjY5OTk5OTk5OTk5OTk4OSBDIDk2LjMgNy45IDcuNSA2NC41IDcuNSAxOTQuNiBDIDcuNSAyODMgMTgyLjggNTUyIDE4Mi44IDU1MiBDIDE4Mi44IDU1MiAxODIuOSA1NTEuNyAxODIuOSA1NTEuNyB6IE0gMTIyLjIgMTg3LjIgQyAxMjIuMiAxNTMuNiAxNDkuNCAxMjYuMzk5OTk5OTk5OTk5OTkgMTgzIDEyNi4zOTk5OTk5OTk5OTk5OSBDIDIxNi42IDEyNi4zOTk5OTk5OTk5OTk5OSAyNDMuOCAxNTMuNiAyNDMuOCAxODcuMiBDIDI0My44IDIyMC43OTk5OTk5OTk5OTk5OCAyMTYuNSAyNDggMTgyLjkgMjQ4IEMgMTQ5LjQgMjQ4IDEyMi4yIDIyMC44IDEyMi4yIDE4Ny4yIHoiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgLz4NCjwvZz4NCgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMy44MiAwIDAgMy44MiAwIC0xMDAuNzcpIiAgPg0KPGNpcmNsZSBzdHlsZT0ic3Ryb2tlOiByZ2IoMCwwLDApOyBzdHJva2Utd2lkdGg6IDA7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGZpbGw6IHJnYigyNTUsMjU1LDI1NSk7IGZpbGwtcnVsZTogbm9uemVybzsgb3BhY2l0eTogMTsiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSIgIGN4PSIwIiBjeT0iMCIgcj0iMzUiIC8+DQo8L2c+DQo8L2c+DQo8L2c+DQo8L3N2Zz4="},(o,l,u)=>{var c=u(4),f=function(d,p,g,m){u(10).ZincObject.call(this);var h;p&&(h=p.clone(),h.vertexColors=c.FaceColors),this.id=g;var b=void 0,y=void 0;this.isGlyph=!0;var v=[0,0,0];this.fromMesh=M=>!!(M&&M.isMesh)&&(this.morph=M.clone(),this.morph.userData=this,this.group.add(this.morph),!0),d&&h&&this.fromMesh(new c.Mesh(d,h)),this.getGlyphset=function(){return m},this.setLabel=M=>{M&&(typeof M=="string"||M instanceof String)&&(y=M,this.morph&&(this.morph.name=M))},this.showLabel=M=>{if(b&&(v=b.getPosition(),this.group.remove(b.getSprite()),b.dispose(),b=void 0),y&&(typeof y=="string"||y instanceof String)){b=new(u(17)).Label(y,M),b.setPosition(v[0],v[1],v[2]);var A=b.getSprite();A.material.alphaTest=.5,A.material.transparent=!0,A.material.depthWrite=!1,A.material.depthTest=labelDepthTest,this.group.add(b.getSprite())}},this.hideLabel=()=>{b&&(v=b.getPosition(),this.group.remove(b.getSprite()),b.dispose(),b=void 0)},this.getLabel=()=>y,this.getMesh=()=>this.morph,this.setTransformation=(M,A,_,w)=>{this.morph&&(this.morph.matrix.elements[0]=A[0],this.morph.matrix.elements[1]=A[1],this.morph.matrix.elements[2]=A[2],this.morph.matrix.elements[3]=0,this.morph.matrix.elements[4]=_[0],this.morph.matrix.elements[5]=_[1],this.morph.matrix.elements[6]=_[2],this.morph.matrix.elements[7]=0,this.morph.matrix.elements[8]=w[0],this.morph.matrix.elements[9]=w[1],this.morph.matrix.elements[10]=w[2],this.morph.matrix.elements[11]=0,this.morph.matrix.elements[12]=M[0],this.morph.matrix.elements[13]=M[1],this.morph.matrix.elements[14]=M[2],this.morph.matrix.elements[15]=1,this.morph.matrixAutoUpdate=!1),v=[...M],b&&b.setPosition(M[0],M[1],M[2])},this.setColour=M=>{b&&b.setColour(M),this.secondaryMesh&&this.secondaryMesh.material&&(this.secondaryMesh.material.color=colour),this.geometry&&(this.geometry.colorsNeedUpdate=!0)},this.dispose=()=>{this.material&&this.material.dispose(),this.morph=void 0}};f.prototype=Object.create(u(10).ZincObject.prototype),l.Glyph=f},(o,l,u)=>{var c=u(7).default;l.Label=function(f,d){var p=f,g=void 0,m=500;g=d?new c(p,.012,d.getStyle()):new c(p,.012),g.fontFace="Asap",g.fontWeight=m,g.material.map.generateMipmaps=!1,g.material.sizeAttenuation=!1,g.center.x=-.05,g.center.y=0;var h=[g.scale.x,g.scale.y];this.getPosition=()=>g?[g.position.x,g.position.y,g.position.z]:[0,0,0],this.setPosition=(b,y,v)=>{g&&g.position.set(b,y,v)},this.setColour=b=>{b&&(g.color=b.getStyle())},this.setScale=b=>{g&&0<b&&g.scale.set(b,b,1)},this.setDepthTest=b=>{b&&b!==g.material.depthTest&&(g.material.depthTest=b)},this.setSize=b=>{0<b&&(g.scale.x=h[0]*b,g.scale.y=h[1]*b)},this.setFontWeight=b=>{b&&b!==m&&(g.fontWeight=b,m=b)},this.setText=b=>{b&&b!==g.text&&(g.text=b,p=b)},this.setVisibility=b=>{g.visible=b},this.dispose=()=>{},this.getSprite=()=>g,this.getString=()=>p}},(o,l,u)=>{var c=u(4),f=u(19).JSONLoader,d=function(){u(10).ZincObject.call(this);var p=[],g=void 0,m=void 0,h=void 0,b=void 0,y=void 0,v=void 0,M=void 0,A=0,_=0,w=[0,0,0],C=[0,0,0],P=[0,0,0],R="NONE";this.ready=!1;var I=!1,S=!1;this.isGlyphset=!0;var T=new c.Matrix4,E=new c.Color,L=new c.Color,F=new c.Box3,x=new c.Box3,O=new c.Box3,B=[],N=[],k=[],z=[],G=[],Y=[],Z=[];this.globalScale=1;for(var te=0;8>te;te++)new c.Vector3;this.load=(V,j,oe,ae,le)=>{g=V.axis1,m=V.axis2,h=V.axis3,b=V.positions,y=V.scale,v=V.colors,M=V.label,I=V.metadata.MorphColours,S=V.metadata.MorphVertices,A=V.metadata.number_of_time_steps,R=V.metadata.repeat_mode,_=V.metadata.number_of_vertices,R=="AXES_2D"||R=="MIRROR"?_*=2:R=="AXES_3D"&&(_*=3),w=V.metadata.base_size,C=V.metadata.offset,P=V.metadata.scale_factors;var H=new f;this.geometry=new c.BufferGeometry;var U=new c.InstancedMesh(this.geometry,void 0,_);if(this.setMorph(U),ae){var D=H.parse(j);re(oe,le)(D.geometry,D.materials),D.geometry.dispose()}else H.crossOrigin="Anonymous",H.load(j,re(oe,le))};var q=(V,j,oe,ae,le,H)=>{if(R=="NONE"||R=="MIRROR"){for(var U,D=[0,0,0],Q=[0,0,0],ie=[0,0,0],ce=[0,0,0],ge=[0,0,0],ye=[0,0,0],ue=[0,0,0],be=[0,0,0],ne=[0,0,0],de=0;3>de;de++)U=0>le[de]?-1:1,D[de]=(U*w[de]+le[de]*P[de])*this.globalScale;for(var de=0;3>de;de++)Q[de]=j[de]*D[0],ie[de]=oe[de]*D[1],ce[de]=ae[de]*D[2],ge[de]=V[de]+C[0]*Q[de]+C[1]*ie[de]+C[2]*ce[de],R=="MIRROR"&&(ye[de]=-Q[de],ue[de]=-ie[de],be[de]=-ce[de],ne[de]=ge[de],0>le[0]&&(ge[de]-=Q[de],ne[de]-=ye[de]));0>ce[0]*(Q[1]*ie[2]-Q[2]*ie[1])+ce[1]*(Q[2]*ie[0]-Q[0]*ie[2])+ce[2]*(Q[0]*ie[1]-Q[1]*ie[0])&&(ce[0]=-ce[0],ce[1]=-ce[1],ce[2]=-ce[2]),H[0]=[ge,Q,ie,ce],R=="MIRROR"&&(0>be[0]*(ye[1]*ue[2]-ye[2]*ue[1])+be[1]*(ye[2]*ue[0]-ye[0]*ue[2])+be[2]*(ye[0]*ue[1]-ye[1]*ue[0])&&(be[0]=-be[0],be[1]=-be[1],be[2]=-be[2]),H[1]=[ne,ye,ue,be])}else if(R=="AXES_2D"||R=="AXES_3D"){for(var U,ve=[0,0,0],Ee=[0,0,0],de=0;3>de;de++)U=0>le[de]?-1:1,ve[de]=(U*w[0]+le[de]*P[0])*this.globalScale;for(var de=0;3>de;de++)Ee[de]=V[de]+C[0]*ve[0]*j[de]+C[1]*ve[1]*oe[de]+C[2]*ve[2]*ae[de];for(var Se=glyph_repeat_mode=="AXES_2D"?2:3,Ie=0;Ie<Se;Ie++){var Je=void 0,Ve=void 0,st=le[Ie],Re=[0,0,0],Ue=[0,0,0],We=[0,0,0];Ie==0?(Je=j,Ve=oe):Ie==1?(Je=oe,Ve=glyph_repeat_mode=="AXES_2D"?j:ae):(Je=ae,Ve=j);var Pt=(w[0]+st*P[0])*this.globalScale;Re[0]=Je[0]*Pt,Re[1]=Je[1]*Pt,Re[2]=Je[2]*Pt,We[0]=Re[1]*Ve[2]-Ve[1]*Re[2],We[1]=Re[2]*Ve[0]-Ve[2]*Re[0],We[2]=Re[0]*Ve[1]-Re[1]*Ve[0];var It=Math.sqrt(We[0]*We[0]+We[1]*We[1]+We[2]*We[2]);if(0<It){var pt=(w[2]+st*P[2])*this.globalScale/It;R=="AXES_2D"&&0<Ie&&(pt*=-1),We[0]*=pt,We[1]*=pt,We[2]*=pt}if(Ue[0]=We[1]*Re[2]-Re[1]*We[2],Ue[1]=We[2]*Re[0]-Re[2]*We[0],Ue[2]=We[0]*Re[1]-We[1]*Re[0],It=Math.sqrt(Ue[0]*Ue[0]+Ue[1]*Ue[1]+Ue[2]*Ue[2]),0<It){var yt=(w[1]+st*P[1])*this.globalScale/It;Ue[0]*=yt,Ue[1]*=yt,Ue[2]*=yt}H[Ie]=[Ee,Re,Ue,We]}}return H},W=(V,j,oe,ae,le)=>{var H=1;R=="AXES_2D"||R=="MIRROR"?H=2:R=="AXES_3D"&&(H=3);var U=V.length/3,D=0;Z.length=H;for(var Q=0;Q<U;Q++){var ie=3*Q,ce=[V[ie],V[ie+1],V[ie+2]],ge=[j[ie],j[ie+1],j[ie+2]],ye=[oe[ie],oe[ie+1],oe[ie+2]],ue=[ae[ie],ae[ie+1],ae[ie+2]],be=[le[ie],le[ie+1],le[ie+2]],ne=q(ce,ge,ye,ue,be,Z);if(ne.length==H)for(var de=0;de<H;de++){T.elements[0]=ne[de][1][0],T.elements[1]=ne[de][1][1],T.elements[2]=ne[de][1][2],T.elements[3]=0,T.elements[4]=ne[de][2][0],T.elements[5]=ne[de][2][1],T.elements[6]=ne[de][2][2],T.elements[7]=0,T.elements[8]=ne[de][3][0],T.elements[9]=ne[de][3][1],T.elements[10]=ne[de][3][2],T.elements[11]=0,T.elements[12]=ne[de][0][0],T.elements[13]=ne[de][0][1],T.elements[14]=ne[de][0][2],T.elements[15]=1,this.morph.setMatrixAt(D,T);var ve=p[D];ve&&ve.setTransformation(ne[de][0],ne[de][1],ne[de][2],ne[de][3]),D++}}this.morph.instanceMatrix.needsUpdate=!0},$=V=>{var j=1;R=="AXES_2D"||R=="MIRROR"?j=2:R=="AXES_3D"&&(j=3);for(var oe,ae=V.length,le=0,H=0;H<ae;H++){oe=V[H];for(var U=0;U<j;U++){E.setHex(oe),this.morph.setColorAt(le,E);var D=p[le];D&&D.setColour(E),le++}}this.morph.instanceColor.needsUpdate=!0},X=()=>{var V=B,j=N,oe=k,ae=z,le=G,H=Y,U=this.inbuildTime/this.duration*(A-1),D=Math.floor(U),Q=1-(U-D),ie=Math.ceil(U);if(S){var ce=b[D.toString()],ge=b[ie.toString()],ye=g[D.toString()],ue=g[ie.toString()],be=m[D.toString()],ne=m[ie.toString()],de=h[D.toString()],ve=h[ie.toString()],Ee=y[D.toString()],Se=y[ie.toString()];B.length=ce.length,N.length=ce.length,k.length=ce.length,z.length=ce.length,G.length=ce.length;for(var Ie=0;Ie<ce.length;Ie++)V[Ie]=Q*ce[Ie]+(1-Q)*ge[Ie],j[Ie]=Q*ye[Ie]+(1-Q)*ue[Ie],oe[Ie]=Q*be[Ie]+(1-Q)*ne[Ie],ae[Ie]=Q*de[Ie]+(1-Q)*ve[Ie],le[Ie]=Q*Ee[Ie]+(1-Q)*Se[Ie]}else V=b[0],j=g[0],oe=m[0],ae=h[0],le=y[0];if(W(V,j,oe,ae,le),this.boundingBoxUpdateRequired=!0,v!=null){if(I){var Je=v[D.toString()],Ve=v[ie.toString()];H.length=Je.length;for(var st=0;st<Je.length;st++)E.setHex(Je[st]),L.setHex(Ve[st]),E.setRGB(E.r*Q+L.r*(1-Q),E.g*Q+L.g*(1-Q),E.b*Q+L.b*(1-Q)),H[st]=E.getHex()}else H=v[0];$(H)}};this.getLabel=V=>M&&M.length>V?M[V]:void 0,this.showLabel=()=>{for(var V=0;V<p.length;V++)p[V].showLabel(this.morph.material?this.morph.material.color:void 0)},this.hideLabel=()=>{for(var V=0;V<p.length;V++)p[V].hideLabel()};var K=V=>{for(var j=0;j<_;j++){var oe=new(u(16)).Glyph(void 0,void 0,j,this),ae=M?M[j]:void 0;ae=ae||this.groupName,ae&&oe.setLabel(ae),0<A&&oe.setFrustumCulled(!1),p[j]=oe,this.morph.add(oe.getGroup())}V&&this.showLabel(),W(b[0],g[0],m[0],h[0],y[0]),v!=null&&$(v[0]),this.ready=!0,this.boundingBoxUpdateRequired=!0};this.addCustomGlyph=V=>{V.isGlyph&&p.push(V),this.ready=!0,this.boundingBoxUpdateRequired=!0},this.addMeshAsGlyph=(V,j)=>{if(V.isMesh){var oe=new(u(16)).Glyph(void 0,void 0,j,this);return oe.fromMesh(V),p.push(oe),this.morph.add(oe.getGroup()),this.ready=!0,this.boundingBoxUpdateRequired=!0,oe}},this.forEachGlyph=V=>{for(var j=0;j<p.length;j++)V(p[j])};var re=(V,j)=>(oe,ae)=>{var le=oe.toBufferGeometry();this.geometry.copy(le),this.geometry.computeBoundingSphere(),this.geometry.computeBoundingBox(),le.dispose(),ae&&ae[0]&&(this.morph.material=ae[0]),K(j),this.morph.name=this.groupName,this.morph.userData=this,this.setMorph(this.morph),oe.dispose(),V!=null&&typeof V=="function"&&V(this)};this.getClosestVertexIndex=function(){var V=-1;if(this.morph&&this.ready){this.getBoundingBox().getCenter(this._v1);for(var j,oe=b[0],ae=oe.length/3,le=-1,H=0,U=0;U<ae;U++)j=3*U,this._v2.set(oe[j],oe[j+1],oe[j+2]),H=this._v1.distanceTo(this._v2),(le==-1||le>H)&&(le=H,V=U)}return V},this.getClosestVertex=function(){if(this.closestVertexIndex==-1&&(this.closestVertexIndex=this.getClosestVertexIndex()),0<=this.closestVertexIndex&&this.morph){var V=new c.Vector3;return this.morph.getMatrixAt(this.closestVertexIndex,T),V.setFromMatrixPosition(T),V}},this.getBoundingBox=()=>{if(this.morph&&this.ready&&this.morph.visible){if(this.boundingBoxUpdateRequired){F.setFromBufferAttribute(this.morph.geometry.attributes.position);for(var V=0;V<_;V++)this.morph.getMatrixAt(V,T),x.copy(F).applyMatrix4(T),V==0?O.copy(x):O.union(x);if(O)this.cachedBoundingBox.copy(O),this.morph.updateWorldMatrix(!0,!0),this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld),this.boundingBoxUpdateRequired=!1;else return}return this.cachedBoundingBox}},this.setMorphTime=V=>{this.inbuildTime=V>this.duration?this.duration:0>V?0:V,(I||S)&&(X(),S&&(this.markerUpdateRequired=!0))},this.isTimeVarying=()=>!!((this.ready===!1||0<A)&&(I||S)),this.getCurrentTime=()=>this.inbuildTime,this.setScaleAll=function(V){this.globalScale=V,X()},this.dispose=()=>{for(var V=p.length-1;0<=V;V--)p[V].dispose();this.geometry&&this.geometry.dispose(),this.morph&&this.morph.material.dispose(),g=void 0,m=void 0,h=void 0,b=void 0,y=void 0,v=void 0,this.ready=!1,this.groupName=void 0},this.render=(V,j,oe)=>{if(j==!0){var ae=this.inbuildTime+V;ae>this.duration&&(ae-=this.duration),this.inbuildTime=ae,(I||S)&&X()}this.updateMarker(j,oe)}};d.prototype=Object.create(u(10).ZincObject.prototype),l.Glyphset=d},(o,l,u)=>{u.r(l),u.d(l,{JSONLoader:()=>w});var c=u(4),f=u(20).Loader,d=c.LoaderUtils,p=c.AnimationClip,g=c.Vector3,m=c.Vector4,h=c.Color,b=c.Vector2,y=u(6).Face3,v=u(6).Geometry,M=c.FileLoader,A=c.DefaultLoadingManager,_=u(21).VideoHandler;function w(C){typeof C=="boolean"&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),C=void 0),this.manager=C===void 0?A:C,this.withCredentials=!1,this.paramsString=""}Object.assign(w.prototype,{load:function(P,R,I,S){var T=this,E=this.texturePath&&typeof this.texturePath=="string"?this.texturePath:d.extractUrlBase(P),L=new M(this.manager);P.split("?"),this.paramsString=P.length===2?paramsStrings[1]:"",L.setWithCredentials(this.withCredentials),L.load(P,function(F){var x;try{x=JSON.parse(F)}catch{if(console.error("The loader has encountered an error while parsing the content of a resource."),S)return void S({responseURL:P})}var O=x.metadata;if(O!==void 0){var B=O.type;if(B!==void 0&&B.toLowerCase()==="object")return void console.error("THREE.JSONLoader: "+P+" should be loaded with THREE.ObjectLoader instead.")}if(T&&T.parse)try{var N=T.parse(x,E);R(N.geometry,N.materials)}catch(k){if(console.error("The loader has encountered aon loading the geometry"),console.error(k),S)return void S({responseURL:P})}},I,S)},setTexturePath:function(P){this.texturePath=P},parse:function(){function C(S,T){function E(de,ve){return de&1<<ve}var L,F,x,O,B,N,k,z,G,Y,Z,te,q,W,$,X,K,re,V,j,oe,ae,le,H,U,D,Q,ie=S.faces,ce=S.vertices,ge=S.normals,ye=S.colors,ue=S.scale,be=0;if(S.uvs!==void 0){for(L=0;L<S.uvs.length;L++)S.uvs[L].length&&be++;for(L=0;L<be;L++)T.faceVertexUvs[L]=[]}for(O=0,B=ce.length;O<B;)re=new g,re.x=ce[O++]*ue,re.y=ce[O++]*ue,re.z=ce[O++]*ue,T.vertices.push(re);if(O=0,B=ie.length,S.uvs)for(L=0;L<S.uvs.length;L++){T.uvs[L]=[];for(var ne=0;ne<S.uvs[L].length;ne++)T.uvs[L][ne]=S.uvs[L][ne]}if(ge)for(L=0;L<ge.length;L++)T.normals[L]=ge[L];if(ye)for(L=0;L<ye.length;L++)T.colors[L]=ye[L];for(;O<B;)if(Y=ie[O++],Z=E(Y,0),te=E(Y,1),q=E(Y,3),W=E(Y,4),$=E(Y,5),X=E(Y,6),K=E(Y,7),Z){if(j=new y,j.a=ie[O],j.b=ie[O+1],j.c=ie[O+3],oe=new y,oe.a=ie[O+1],oe.b=ie[O+2],oe.c=ie[O+3],O+=4,te&&(G=ie[O++],j.materialIndex=G,oe.materialIndex=G),x=T.faces.length,q)for(L=0;L<be;L++)for(H=S.uvs[L],T.faceVertexUvs[L][x]=[],T.faceVertexUvs[L][x+1]=[],F=0;4>F;F++)z=ie[O++],D=H[2*z],Q=H[2*z+1],U=new b(D,Q),F!==2&&T.faceVertexUvs[L][x].push(U),F!==0&&T.faceVertexUvs[L][x+1].push(U);if(W&&(k=3*ie[O++],j.normal.set(ge[k++],ge[k++],ge[k]),oe.normal.copy(j.normal)),$)for(L=0;4>L;L++)k=3*ie[O++],le=new g(ge[k++],ge[k++],ge[k]),L!==2&&j.vertexNormals.push(le),L!==0&&oe.vertexNormals.push(le);if(X&&(N=ie[O++],ae=ye[N],j.color.setHex(ae),oe.color.setHex(ae)),K)for(L=0;4>L;L++)N=ie[O++],ae=ye[N],L!==2&&j.vertexColors.push(new h(ae)),L!==0&&oe.vertexColors.push(new h(ae));T.faces.push(j),T.faces.push(oe)}else{if(V=new y,V.a=ie[O++],V.b=ie[O++],V.c=ie[O++],V.b||(V.b=V.a),V.c||(V.c=V.b),te&&(G=ie[O++],V.materialIndex=G),x=T.faces.length,q)for(L=0;L<be;L++)for(H=S.uvs[L],T.faceVertexUvs[L][x]=[],F=0;3>F;F++)z=ie[O++],D=H[2*z],Q=H[2*z+1],U=new b(D,Q),T.faceVertexUvs[L][x].push(U);if(W&&(k=3*ie[O++],V.normal.set(ge[k++],ge[k++],ge[k])),$)for(L=0;3>L;L++)k=3*ie[O++],le=new g(ge[k++],ge[k++],ge[k]),V.vertexNormals.push(le);if(X&&(N=ie[O++],V.color.setHex(ye[N])),K)for(L=0;3>L;L++)N=ie[O++],V.vertexColors.push(new h(ye[N]));T.faces.push(V)}}function P(S,T){var E=S.influencesPerVertex===void 0?2:S.influencesPerVertex;if(S.skinWeights)for(var L=0,F=S.skinWeights.length;L<F;L+=E){var x=S.skinWeights[L],O=1<E?S.skinWeights[L+1]:0,B=2<E?S.skinWeights[L+2]:0,N=3<E?S.skinWeights[L+3]:0;T.skinWeights.push(new m(x,O,B,N))}if(S.skinIndices)for(var L=0,F=S.skinIndices.length;L<F;L+=E){var k=S.skinIndices[L],z=1<E?S.skinIndices[L+1]:0,G=2<E?S.skinIndices[L+2]:0,Y=3<E?S.skinIndices[L+3]:0;T.skinIndices.push(new m(k,z,G,Y))}T.bones=S.bones,T.bones&&0<T.bones.length&&(T.skinWeights.length!==T.skinIndices.length||T.skinIndices.length!==T.vertices.length)&&console.warn("When skinning, number of vertices ("+T.vertices.length+"), skinIndices ("+T.skinIndices.length+"), and skinWeights ("+T.skinWeights.length+") should match.")}function R(S,T){var E=S.scale;if(S.morphTargets!==void 0)for(var L=0,F=S.morphTargets.length;L<F;L++){T.morphTargets[L]={},T.morphTargets[L].name=S.morphTargets[L].name,T.morphTargets[L].vertices=[];for(var x,O=T.morphTargets[L].vertices,B=S.morphTargets[L].vertices,N=0,k=B.length;N<k;N+=3)x=new g,x.x=B[N]*E,x.y=B[N+1]*E,x.z=B[N+2]*E,O.push(x)}if(S.morphNormals!==void 0){for(var L=0,F=S.morphNormals.length;L<F;L++)if(T.morphTargets[L]){T.morphTargets[L].normals=[];for(var z,G=T.morphTargets[L].normals,Y=S.morphNormals[L].normals,N=0,k=Y.length;N<k;N+=3)z=new g,z.x=Y[N],z.y=Y[N+1],z.z=Y[N+2],G.push(z);T.morphNormalsReady=!0}}if(S.morphColors!==void 0){var L,F,Z,te,q,W,$;for(L=0,F=S.morphColors.length;L<F;L++)for(T.morphColors[L]={},T.morphColors[L].name=S.morphColors[L].name,T.morphColors[L].colors=[],q=T.morphColors[L].colors,W=S.morphColors[L].colors,Z=0,te=W.length;Z<te;Z+=3)$=new c.Color(16755200),$.setRGB(W[Z],W[Z+1],W[Z+2]),q.push($)}}function I(S,T){var E=[],L=[];S.animation!==void 0&&L.push(S.animation),S.animations!==void 0&&(S.animations.length?L=L.concat(S.animations):L.push(S.animations));for(var F,x=0;x<L.length;x++)F=p.parseAnimation(L[x],T.bones),F&&E.push(F);if(T.morphTargets){var O=p.CreateClipsFromMorphTargetSequences(T.morphTargets,10);E=E.concat(O)}0<E.length&&(T.animations=E)}return function(S,T){S.data!==void 0&&(S=S.data),S.scale=S.scale===void 0?1:1/S.scale;var E=new v;if(E.morphColors=[],C(S,E),P(S,E),R(S,E),I(S,E),E.computeFaceNormals(),E.computeBoundingSphere(),S.materials===void 0||S.materials.length===0)return{geometry:E};var L=f.prototype.initMaterials(S.materials,T,"Anonymous");if(S.materials[0].video){var F=T+S.materials[0].video;this.paramsString&&(F+="?".concat(this.paramsString));var x=new _(F);E._video=x}return L&&0<L.length&&(L[0].side=S.materials[0].singleSided?c.FrontSide:S.materials[0].flipSided?c.BackSide:c.DoubleSide,S.materials[0].specularCoef&&(L[0].shininess=Math.floor(S.materials[0].specularCoef/3))),{geometry:E,materials:L}}}()})},(o,l,u)=>{u.r(l),u.d(l,{Loader:()=>f});var c=u(4);u(4);function f(){}f.Handlers={handlers:[],add:function(p,g){this.handlers.push(p,g)},get:function(p){for(var g=this.handlers,m=0,h=g.length;m<h;m+=2){var b=g[m],y=g[m+1];if(b.test(p))return y}return null}},Object.assign(f.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(p,g,m){for(var h=[],b=0;b<p.length;++b)h[b]=this.createMaterial(p[b],g,m);return h},createMaterial:function(){var d={NoBlending:c.NoBlending,NormalBlending:c.NormalBlending,AdditiveBlending:c.AdditiveBlending,SubtractiveBlending:c.SubtractiveBlending,MultiplyBlending:c.MultiplyBlending,CustomBlending:c.CustomBlending},p=new c.Color,g=new c.TextureLoader,m=new c.MaterialLoader;return function(h,b,y){function v(C,P,R,I,S){var T,E=b+C,L=f.Handlers.get(E);L===null?(g.setCrossOrigin(y),T=g.load(E)):T=L.load(E),P!==void 0&&(T.repeat.fromArray(P),P[0]!==1&&(T.wrapS=c.RepeatWrapping),P[1]!==1&&(T.wrapT=c.RepeatWrapping)),R!==void 0&&T.offset.fromArray(R),I!==void 0&&(I[0]==="repeat"&&(T.wrapS=c.RepeatWrapping),I[0]==="mirror"&&(T.wrapS=c.MirroredRepeatWrapping),I[1]==="repeat"&&(T.wrapT=c.RepeatWrapping),I[1]==="mirror"&&(T.wrapT=c.MirroredRepeatWrapping)),S!==void 0&&(T.anisotropy=S);var F=c.MathUtils.generateUUID();return M[F]=T,F}var M={},A={uuid:c.MathUtils.generateUUID(),type:"MeshLambertMaterial"};for(var _ in h){var w=h[_];switch(_){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":A.name=w;break;case"blending":A.blending=d[w];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",_,"is no longer supported.");break;case"colorDiffuse":A.color=p.fromArray(w).getHex();break;case"colorSpecular":A.specular=p.fromArray(w).getHex();break;case"colorEmissive":A.emissive=p.fromArray(w).getHex();break;case"specularCoef":A.shininess=w;break;case"shading":w.toLowerCase()==="basic"&&(A.type="MeshBasicMaterial"),w.toLowerCase()==="phong"&&(A.type="MeshPhongMaterial"),w.toLowerCase()==="standard"&&(A.type="MeshStandardMaterial");break;case"mapDiffuse":A.map=v(w,h.mapDiffuseRepeat,h.mapDiffuseOffset,h.mapDiffuseWrap,h.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":A.emissiveMap=v(w,h.mapEmissiveRepeat,h.mapEmissiveOffset,h.mapEmissiveWrap,h.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":A.lightMap=v(w,h.mapLightRepeat,h.mapLightOffset,h.mapLightWrap,h.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":A.aoMap=v(w,h.mapAORepeat,h.mapAOOffset,h.mapAOWrap,h.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":A.bumpMap=v(w,h.mapBumpRepeat,h.mapBumpOffset,h.mapBumpWrap,h.mapBumpAnisotropy);break;case"mapBumpScale":A.bumpScale=w;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":A.normalMap=v(w,h.mapNormalRepeat,h.mapNormalOffset,h.mapNormalWrap,h.mapNormalAnisotropy);break;case"mapNormalFactor":A.normalScale=w;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":A.specularMap=v(w,h.mapSpecularRepeat,h.mapSpecularOffset,h.mapSpecularWrap,h.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":A.metalnessMap=v(w,h.mapMetalnessRepeat,h.mapMetalnessOffset,h.mapMetalnessWrap,h.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":A.roughnessMap=v(w,h.mapRoughnessRepeat,h.mapRoughnessOffset,h.mapRoughnessWrap,h.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":A.alphaMap=v(w,h.mapAlphaRepeat,h.mapAlphaOffset,h.mapAlphaWrap,h.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":A.side=c.BackSide;break;case"doubleSided":A.side=c.DoubleSide;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),A.opacity=w;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":A[_]=w;break;case"vertexColors":w===!0&&(A.vertexColors=c.VertexColors),w==="face"&&(A.vertexColors=c.FaceColors);break;default:console.error("THREE.Loader.createMaterial: Unsupported",_,w)}}return A.type==="MeshBasicMaterial"&&delete A.emissive,A.type!=="MeshPhongMaterial"&&delete A.specular,1>A.opacity&&(A.transparent=!0),m.setTextures(M),m.parse(A)}}()})},(o,l,u)=>{var c=u(4);l.VideoHandler=function(f){var d=this;this.video=void 0,this.videoTexture=void 0,this.setMorphTime=function(p,g){var m=p/g*d.video.duration;d.video.currentTime=m},this.getVideoDuration=function(){return d.video.duration},this.createCanvasVideoTexture=function(){return d.videoTexture=new c.VideoTexture(d.video),d.videoTexture.minFilter=c.LinearFilter,d.videoTexture.magFilter=c.LinearFilter,d.videoTexture.format=c.RGBFormat,d.video.currentTime=0,d.videoTexture},this.getCurrentTime=function(p){return d.video?p*(d.video.currentTime/d.video.duration):0},this.isReadyToPlay=function(){return!!(d.video&&3<=d.video.readyState)},function(){document&&(d.video=document.createElement("video"),d.video.crossOrigin="anonymous",d.video.src=f,d.video.load(),d.video.loop=!0)}()}},(o,l,u)=>{var c=u(4),f=u(23).Points,d=u(5).toBufferGeometry,p=u(5).getCircularTexture,g=u(17).Label,m=function(){u(10).ZincObject.call(this),this.isPointset=!0;var h=[],b=1,y=!1,v=500,M=!0;this.createMesh=(w,C,P)=>{if(w&&C){var R=d(w,P),I=p();C.map=I;var S=new f(R,C);this.setMesh(S,P.localTimeEnabled,P.localMorphColour)}};var A=(w,C,P,R)=>{if(P){var I=new c.Color(R),S=new g(P,I);S.setPosition(C[0],C[1],C[2]);var T=S.getSprite();T.material.sizeAttenuation=!1,T.material.alphaTest=.5,T.material.transparent=!0,T.material.depthWrite=!1,T.material.depthTest=y,S.setFontWeight(v),S.setSize(b),S.setVisibility(M),this.group.add(T),h[w]=S}},_=w=>{var C=h[w];if(C){var P=C.getSprite();this.group.remove(P),C.dispose(),h.splice(w,1)}};this.addPoints=(w,C,P)=>{if(w&&0<w.length){var R=this.drawRange;R===-1&&(R=0);var I=this.addVertices(w),S=this.getMorph();if(!S){var T=new c.PointsMaterial({alphaTest:.5,size:10,color:P,sizeAttenuation:!1}),E={localTimeEnabled:!1,localMorphColour:!1};I.colorsNeedUpdate=!0,this.createMesh(I,T,E)}var L=R+w.length,F=0;if(Array.isArray(C)&&C.length===w.length||typeof C=="string")for(h.length,R;R+F<L;){var x=typeof C=="string"?C:C[F];A(R+F,w[F],x,this._lod._material.color),F++}this.region&&(this.region.pickableUpdateRequired=!0)}},this.setColourHex=function(w){this._lod._material.color.setHex(w),this._lod._secondaryMaterial&&this._lod._secondaryMaterial.color.setHex(w);for(var C=0;C<h.length;C++)h[C]&&h[C].setColour(this._lod._material.color)},this.setColour=w=>{this._lod.setColour(w);for(var C=0;C<h.length;C++)h[C]&&h[C].setColour(this._lod._material.color)},this.setLabelDepthTest=w=>{y=w;for(var C=0;C<h.length;C++)h[C]&&h[C].setDepthTest(w)},this.setLabelFontWeight=w=>{v=w;for(var C=0;C<h.length;C++)h[C]&&h[C].setFontWeight(w)},this.setLabelSize=w=>{b=w;for(var C=0;C<h.length;C++)h[C]&&h[C].setSize(b)},this.displayLabels=w=>{M=w;for(var C=0;C<h.length;C++)h[C]&&h[C].setVisibility(M)},this.setSize=w=>{this.morph&&this.morph.material&&(this.morph.material.size=w,this.morph.material.needsUpdate=!0)},this.setSizeAttenuation=w=>{this.morph&&this.morph.material&&(this.morph.material.sizeAttenuation=w,this.morph.material.needsUpdate=!0)},this.getVerticesByIndex=function(w){if(0<=w&&this.drawRange>w){var C=this.getMorph().geometry.getAttribute("position");return[C.getX(w),C.getY(w),C.getZ(w)]}},this.editVertices=function(w,C){if(w&&w.length){var P=this.getMorph(),R=C+w.length-1;if(!P||0>C||R>=this.drawRange)return;var I=P.geometry.getAttribute("position"),S=C;w.forEach(T=>{var E=h[S];E&&E.setPosition(T[0],T[1],T[2]),I.setXYZ(S++,T[0],T[1],T[2])}),I.needsUpdate=!0,P.geometry.computeBoundingBox(),P.geometry.computeBoundingSphere(),this.boundingBoxUpdateRequired=!0}},this.deleteVertices=function(w){var C=m.prototype.deleteVertices.call(this,w);return C&&_(w),this.drawRange},this.setName=function(w){var C=this.groupName;m.prototype.setName.call(this,w),h.forEach(P=>{P.getString()===C&&(P==null||P.setText(w))})},this.render=(w,C,P,R)=>{this.morph&&P&&(this.morph.sizePerPixel=P.pixelHeight),m.prototype.render.call(this,w,C,P,R)}};m.prototype=Object.create(u(10).ZincObject.prototype),l.Pointset=m},(o,l,u)=>{u.r(l),u.d(l,{Points:()=>b});var c=u(4),f=new c.Matrix4,d=new c.Ray,p=new c.Sphere,g=new c.Vector3,m=new c.Vector3,h=new c.Vector3;class b extends c.Object3D{constructor(){var A=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new c.BufferGeometry,_=1<arguments.length&&arguments[1]!==void 0?arguments[1]:new c.PointsMaterial;super(),this.type="Points",this.geometry=A,this.material=_,this.sizePerPixel=1,this.updateMorphTargets()}copy(A){return super.copy(A),this.material=A.material,this.geometry=A.geometry,this}raycast(A,_){var w=this.geometry,C=this.matrixWorld,P=A.params.Points.threshold,R=w.drawRange;if(w.boundingSphere===null&&w.computeBoundingSphere(),p.copy(w.boundingSphere),p.applyMatrix4(C),p.radius+=P,A.ray.intersectsSphere(p)!==!1){f.copy(C).invert(),d.copy(A.ray).applyMatrix4(f);var I=P/((this.scale.x+this.scale.y+this.scale.z)/3)*this.material.size*this.sizePerPixel,S=I*I;if(w.isBufferGeometry){var T=w.index,E=w.attributes,L=E.position,F=w.morphAttributes.position;if(T!==null)for(var x,O=Math.max(0,R.start),B=Math.min(T.count,R.start+R.count),N=O;N<B;N++)x=T.getX(N),v(this,L,F,x),y(g,x,S,C,A,_,this);else for(var k=Math.max(0,R.start),z=Math.min(L.count,R.start+R.count),G=k;G<z;G++)v(this,L,F,G),y(g,G,S,C,A,_,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}updateMorphTargets(){var A=this.geometry;if(A.isBufferGeometry){var _=A.morphAttributes,w=Object.keys(_);if(0<w.length){var C=_[w[0]];if(C!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var P,R=0,I=C.length;R<I;R++)P=C[R].name||R+"",this.morphTargetInfluences.push(0),this.morphTargetDictionary[P]=R}}}else{var S=A.morphTargets;S!==void 0&&0<S.length&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}b.prototype.isPoints=!0;function y(M,A,_,w,C,P,R){var I=d.distanceSqToPoint(M);if(I<_){var S=new c.Vector3;d.closestPointToPoint(M,S),S.applyMatrix4(w);var T=C.ray.origin.distanceTo(S);if(T<C.near||T>C.far)return;P.push({distance:T,distanceToRay:Math.sqrt(I),point:S,index:A,face:null,object:R})}}function v(M,A,_,w){g.fromBufferAttribute(A,w);var C=M.morphTargetInfluences;if(M.material.morphTargets&&_&&C){m.set(0,0,0);for(var P=0,R=_.length;P<R;P++){var I=C[P],S=_[P];I!==0&&(h.fromBufferAttribute(S,w),m.addScaledVector(h.sub(g),I))}g.add(m)}}},(o,l,u)=>{var c=u(4),f=u(5).toBufferGeometry,d=function(){u(10).ZincObject.call(this),this.isLines=!0,this.createLineSegment=(p,g,m)=>{if(p&&g){var h=f(p,m);m.localMorphColour&&h.morphAttributes.color&&(g.onBeforeCompile=u(9).augmentMorphColor());var b=new(u(12)).LineSegments(h,g);this.setMesh(b,m.localTimeEnabled,m.localMorphColour)}},this.setWidth=p=>{this.morph&&this.morph.material&&(this.morph.material.linewidth=p,this.morph.material.needsUpdate=!0)},this.addLines=(p,g)=>{if(p&&0<p.length){var m=this.addVertices(p),h=this.getMorph();if(!h){var b=new c.LineBasicMaterial({color:g});m.colorsNeedUpdate=!0,this.createLineSegment(m,b,{localTimeEnabled:!1,localMorphColour:!1})}this.region&&(this.region.pickableUpdateRequired=!0)}}};d.prototype=Object.create(u(10).ZincObject.prototype),l.Lines=d},(o,l,u)=>{function c(g,m,h,b,y,v,M){try{var A=g[v](M),_=A.value}catch(w){return void h(w)}A.done?m(_):Promise.resolve(_).then(b,y)}function f(g){return function(){var m=this,h=arguments;return new Promise(function(b,y){function v(_){c(A,b,y,v,M,"next",_)}function M(_){c(A,b,y,v,M,"throw",_)}var A=g.apply(m,h);v(void 0)})}}var d=u(4),p=function(){var g=this;u(26).Texture.call(this),this.isTextureArray=!0,this.loadFromImages=function(){var m=f(function*(h){var b=1,y=1,v=0;if(h&&h.length){g.isLoading=!0;var M=new Image;M.crossOrigin="Anonymous";for(var A,_=document.createElement("canvas"),w=0,C=Array(h.length),P=0;P<h.length;P++)A=yield g.imageToUint8Array(g,M,h[P],_),A&&A.array&&(b=A.width,y=A.height,C[v]=A.array,w+=C[v].length,v++);var R=new Uint8Array(w);w=0,C.forEach(I=>{R.set(I,w),w+=I.length}),g.impl=new d.DataTexture2DArray(R,b,y,v),g.size={width:b,height:y,depth:v},g.isLoading=!1,g.impl.needsUpdate=!0}});return function(){return m.apply(this,arguments)}}(),this.getMaterial=m=>{if(this.impl){var h;if(!m)h=new d.MeshBasicMaterial({color:new d.Color(1,1,1),transparent:!1,opacity:1,map:this.impl,side:d.DoubleSide});else if(m.vs&&m.fs){var b=!0;"transparent"in m&&(b=m.transparent);var y=d.FrontSide;m.side&&(y=m.side),h=new d.ShaderMaterial({transparent:b,uniforms:m.uniforms,vertexShader:m.vs,fragmentShader:m.fs,side:y}),m.glslVersion&&(h.glslVersion=m.glslVersion)}if(h)return h.needsUpdate=!0,h}}};p.prototype=Object.create(u(26).Texture.prototype),l.TextureArray=p},(o,l,u)=>{function c(g,m,h,b,y,v,M){try{var A=g[v](M),_=A.value}catch(w){return void h(w)}A.done?m(_):Promise.resolve(_).then(b,y)}function f(g){return function(){var m=this,h=arguments;return new Promise(function(b,y){function v(_){c(A,b,y,v,M,"next",_)}function M(_){c(A,b,y,v,M,"throw",_)}var A=g.apply(m,h);v(void 0)})}}var d=u(4),p=function(){this.isTexture=!0,this.impl=void 0,this.isLoading=!1,this.size={width:1,height:1,depth:0}};p.prototype.loadImage=function(g,m){return new Promise((h,b)=>{g.onload=()=>h(g),g.onerror=b,g.src=m})},p.prototype.imageToUint8Array=function(){var g=f(function*(m,h,b,y){yield m.loadImage(h,b),y.width=h.width,y.height=h.height;var v=y.getContext("2d");return v.drawImage(h,0,0),{array:new Uint8Array(v.getImageData(0,0,y.width,y.height).data.buffer),width:y.width,height:y.height}});return function(){return g.apply(this,arguments)}}(),p.prototype.loadFromImages=function(){var g=f(function*(){});return function(){return g.apply(this,arguments)}}(),p.prototype.isReady=function(){return!(!this.impl||this.isLoading)},p.prototype.getMaterial=function(){if(this.impl)return new d.MeshBasicMaterial({color:new d.Color(1,1,1),transparent:!1,opacity:1,map:this.impl,side:d.DoubleSide})},l.Texture=p},(o,l,u)=>{function c(y,v){var M=Object.keys(y);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(y);v&&(A=A.filter(function(_){return Object.getOwnPropertyDescriptor(y,_).enumerable})),M.push.apply(M,A)}return M}function f(y){for(var v,M=1;M<arguments.length;M++)v=arguments[M]==null?{}:arguments[M],M%2?c(Object(v),!0).forEach(function(A){d(y,A,v[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(v)):c(Object(v)).forEach(function(A){Object.defineProperty(y,A,Object.getOwnPropertyDescriptor(v,A))});return y}function d(y,v,M){return(v=p(v))in y?Object.defineProperty(y,v,{value:M,enumerable:!0,configurable:!0,writable:!0}):y[v]=M,y}function p(y){var v=g(y,"string");return typeof v=="symbol"?v:v+""}function g(y,v){if(typeof y!="object"||!y)return y;var M=y[Symbol.toPrimitive];if(M!==void 0){var A=M.call(y,v);if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(y)}var m=u(4),h=u(28),b=function(y){u(29).TexturePrimitive.call(this,y),this.isTextureSlides=!0;var v=[],M={};this.morph=new m.Group,this.group=this.morph,this.morph.userData=this;var A=void 0,_=!0,w=0,C=1,P=!0;this.createSlides=S=>{S.forEach(T=>this.createSlide(T))};var R=(S,T)=>{var E=S.material,L=E.uniforms;switch(S.rotation.x=0,S.rotation.y=0,S.rotation.z=0,S.position.x=0,S.position.y=0,S.position.z=0,T.direction){case"x":var F=-Math.PI/2;S.rotation.y=F,L.direction.value=1,L.slide.value.set(T.value,0,0),S.position.x=T.value;break;case"y":S.rotation.x=Math.PI/2,L.direction.value=2,L.slide.value.set(0,T.value,0),S.position.y=T.value;break;case"z":L.direction.value=3,L.slide.value.set(0,0,T.value),S.position.z=T.value;break}E.needsUpdate=!0,this.boundingBoxUpdateRequired=!0};this.modifySlideSettings=S=>{S&&S.id&&S.id in M&&M[S.id]&&R(M[S.id],S)},this.createSlide=S=>{if(this.texture&&this.texture.isTextureArray&&this.texture.isReady()&&S&&S.direction&&S.value!==void 0){var T=new m.PlaneGeometry(1,1);T.translate(.5,.5,0);var E=h.getUniforms();E.brightness.value=w,E.contrast.value=C,E.diffuse.value=this.texture.impl,E.discardAlpha.value=P,E.depth.value=this.texture.size.depth,E.flipY.value=_;var L={fs:h.fs,vs:h.vs,uniforms:E,glslVersion:h.glslVersion,side:m.DoubleSide,transparent:!1},F=this.texture.getMaterial(L);F.needsUpdate=!0;var x=new m.Mesh(T,F);x.name=this.groupName,x.userData=this;var O={value:S.value,direction:S.direction,id:x.id};return v.push(O),R(x,O),M[x.id]=x,this.morph.add(x),this.boundingBoxUpdateRequired=!0,O}},this.getTextureSettings=()=>[...v],this.getTextureSettingsWithId=S=>{for(var T=0;T<v.length;T++)if(S===v[T].id)return f({},v[T])},this.getSlides=()=>this.morph?[...this.morph.children]:[],this.removeSlide=S=>{S&&this.removeSlideWithId(S.id)},this.removeSlideWithId=S=>{if(this.morph&&S in M&&M[S]){if(this.morph.getObjectById(S)){var T=M[S];this.morph.remove(T),T.clear(),T.geometry&&T.geometry.dispose(),T.material&&T.material.dispose(),this.boundingBoxUpdateRequired=!0}var E=v.findIndex(L=>L.id===S);-1<E&&v.splice(E,1)}},this.dispose=()=>{this.morph.children.forEach(S=>{S.geometry&&S.geometry.dispose(),S.material&&S.material.dispose()}),u(29).TexturePrimitive.prototype.dispose.call(this),this.boundingBoxUpdateRequired=!0};var I=(S,T,E)=>{if(T)switch(T.direction.value){case 1:E.copy(T.slide.value),S.expandByPoint(E),E.setY(1),E.setZ(1),S.expandByPoint(E);break;case 2:E.copy(T.slide.value),S.expandByPoint(E),E.setX(1),E.setZ(1),S.expandByPoint(E);break;case 3:E.copy(T.slide.value),S.expandByPoint(E),E.setX(1),E.setY(1),S.expandByPoint(E);break}};this.getBoundingBox=()=>{if(this.morph&&this.morph.children&&this.morph.visible&&this.boundingBoxUpdateRequired){this.cachedBoundingBox.makeEmpty();var S=new m.Vector3(0,0,0);this.morph.children.forEach(T=>{I(this.cachedBoundingBox,T.material.uniforms,S)}),this.morph.updateMatrixWorld(!0,!0),this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld),this.boundingBoxUpdateRequired=!1}return this.cachedBoundingBox},this.applyTransformation=(S,T,E)=>{var L=new m.Matrix4;L.set(S[0],S[1],S[2],0,S[3],S[4],S[5],0,S[6],S[7],S[8],0,0,0,0,0);var F=new m.Quaternion().setFromRotationMatrix(L);this.morph.position.set(...T),this.morph.quaternion.copy(F),this.morph.scale.set(...E),this.morph.updateMatrix(),this.boundingBoxUpdateRequired=!0},this.setRenderOrder=S=>{this.morph.renderOrder=S},this.initialise=(S,T)=>{if(S){var E=S.locations;E&&0<E.length&&(this.applyTransformation(E[0].orientation,E[0].position,E[0].scale),"flipY"in E[0]&&(_=E[0].flipY)),this.createSlides(S.settings.slides),T!=null&&typeof T=="function"&&T(this)}},this.showEdges=S=>{if(A)A.material.color=S;else{var T=new m.BoxGeometry(1,1,1);T.translate(.5,.5,.5);var E=new m.EdgesGeometry(T);A=new m.LineSegments(E,new m.LineBasicMaterial({color:S})),this.group.add(A)}A.visible=!0},this.isAlphaPixelDiscarded=()=>P,this.discardAlphaPixel=S=>{P=S,this.morph.children.forEach(T=>{var E=T.material;if(E.type==="ShaderMaterial"){var L=E.uniforms;L.discardAlpha.value=P,E.needsUpdate=!0}})},this.getBrightness=()=>w,this.setBrightness=S=>{w=S,this.morph.children.forEach(T=>{var E=T.material;if(E.type==="ShaderMaterial"){var L=E.uniforms;L.brightness.value=w,E.needsUpdate=!0}})},this.getContrast=()=>C,this.setContrast=S=>{0<=C&&(C=S,this.morph.children.forEach(T=>{var E=T.material;if(E.type==="ShaderMaterial"){var L=E.uniforms;L.contrast.value=C,E.needsUpdate=!0}}))},this.hideEdges=()=>{A&&(A.visible=!1)}};b.prototype=Object.create(u(29).TexturePrimitive.prototype),b.prototype.constructor=b,l.TextureSlides=b},(o,l,u)=>{var c=u(4),f=c.GLSL3,d=`
3184
+ `))}}},(o,l,u)=>{var c=u(4),f=u(5).createBufferGeometry,d=u(5).removeVertexAtIndex,p=u(5).resolveURL,g=0,m=function(){return"pr"+g++},h=function(){this.isZincObject=!0,this.geometry=void 0,this.morph=void 0,this.group=new c.Group,this._lod=new(u(11)).LOD(this),this.groupName=void 0,this.timeEnabled=!1,this.morphColour=!1,this.inbuildTime=0,this.mixer=void 0,this.animationGroup=void 0,this.duration=6e3,this.clipAction=void 0,this.userData={},this.videoHandler=void 0,this.marker=void 0,this.markerNumber=void 0,this.markerUpdateRequired=!0,this.closestVertexIndex=-1,this.boundingBoxUpdateRequired=!0,this.cachedBoundingBox=new c.Box3,this.anatomicalId=void 0,this.region=void 0,this.animationClip=void 0,this.markerMode="inherited",this.uuid=m(),this._v1=new c.Vector3,this._v2=new c.Vector3,this._b1=new c.Box3,this.center=new c.Vector3,this.radius=0,this.visible=!0,this.drawRange=-1,this.origColour=void 0,this.origVertexColors=!1,this.isPickable=!0};h.prototype.setDuration=function(b){this.duration=b,this.clipAction&&this.clipAction.setDuration(this.duration)},h.prototype.getDuration=function(){return this.duration},h.prototype.setRegion=function(b){this.region=b},h.prototype.getRegion=function(){return this.region},h.prototype.getMorph=function(){var b=this._lod.getCurrentMorph();return b||this.morph},h.prototype.getGroup=function(){return this.group},h.prototype.setMorph=function(b){this.morph=b,this.group.add(this.morph);var y=this._lod.calculateDistance("far");this._lod.addLevel(b,y),this._lod.setMaterial(b.material)},h.prototype.checkTransparentMesh=function(){},h.prototype.setMesh=function(b,y,v){this.animationGroup=new c.AnimationObjectGroup(b),this.mixer=new c.AnimationMixer(this.animationGroup);var M=b.geometry;if(this.geometry=b.geometry,this.clipAction=void 0,M&&M.morphAttributes){var A=M.morphAttributes.position;A||(A=M.morphAttributes.color?M.morphAttributes.color:M.morphAttributes.normal),A&&(this.animationClip=c.AnimationClip.CreateClipsFromMorphTargetSequences(A,10,!0),this.animationClip&&this.animationClip[0]!=null&&(this.clipAction=this.mixer.clipAction(this.animationClip[0]).setDuration(this.duration),this.clipAction.loop=c.loopOnce,this.clipAction.clampWhenFinished=!0,this.clipAction.play()))}this.timeEnabled=y,this.morphColour=v,b.userData=this,b.matrixAutoUpdate=!1,this.setMorph(b),this.checkTransparentMesh(),this.timeEnabled?this.setFrustumCulled(!1):this.morphColour&&(M.setAttribute("morphTarget0",M.getAttribute("position")),M.setAttribute("morphTarget1",M.getAttribute("position"))),this.boundingBoxUpdateRequired=!0},h.prototype.setIsPickable=function(b){this.isPickable!==b&&(this.isPickable=b,this.region&&(this.region.pickableUpdateRequired=!0))},h.prototype.setAnatomicalId=function(b){this.anatomicalId=b},h.prototype.setName=function(b){this.groupName=b,this._lod.setName(b)},h.prototype.getCurrentTime=function(){if(this.clipAction){var b=this.clipAction.time/this.clipAction._clip.duration;return this.duration*b}return this.inbuildTime},h.prototype.setMorphTime=function(b){var y=!1;if(this.clipAction){var v=b/this.duration,M=this.clipAction._clip.duration,A=v*M;A!=this.clipAction.time&&(this.clipAction.time=A,y=!0),y&&this.isTimeVarying()&&this.mixer.update(0)}else{var _=b;_=b>this.duration?this.duration:0>b?0:b,_!=this.inbuildTime&&(this.inbuildTime=_,y=!0)}y&&(this.boundingBoxUpdateRequired=!0,this._lod.updateMorphColorAttribute(!0),this.timeEnabled&&(this.markerUpdateRequired=!0))},h.prototype.isTimeVarying=function(){return!!(this.timeEnabled||this.morphColour)},h.prototype.getVisibility=function(){return this.visible},h.prototype.setVisibility=function(b){b!==this.visible&&(this.visible=b,this.group.visible=b,this.region&&(this.region.pickableUpdateRequired=!0))},h.prototype.setAlpha=function(b){var y=this._lod._material,v=!1;1>b&&(v=!0),y.opacity=b,y.transparent=v,this.checkTransparentMesh()},h.prototype.setFrustumCulled=function(b){this._lod.setFrustumCulled(b)},h.prototype.setVertexColors=function(b){this._lod.setVertexColors(b)},h.prototype.getColour=function(){return this._lod._material?this._lod._material.color:void 0},h.prototype.setColour=function(b){this._lod.setColour(b)},h.prototype.setGreyScale=function(b){if(b){if(!this.origColour&&this._lod._material)return this.origColour=this._lod._material.color,this.origVertexColors=this._lod._material.vertexColors,this._lod.setVertexColors(!1),this._lod.setColour(new c.Color().setHex(12303291)),!0}else if(this.origColour)return this._lod.setColour(this.origColour),this._lod.setVertexColors(this.origVertexColors),this.origColour=void 0,!0;return!1},h.prototype.getColourHex=function(){return!this.morphColour&&this._lod._material&&this._lod._material.color?this._lod._material.color.getHexString():void 0},h.prototype.setColourHex=function(b){this._lod._material.color.setHex(b),this._lod._secondaryMaterial&&this._lod._secondaryMaterial.color.setHex(b)},h.prototype.setEmissiveRGB=function(b){this._lod._material&&this._lod._material.emissive&&this._lod._material.emissive.setRGB(...b),this._lod._secondaryMaterial&&this._lod._secondaryMaterial.emissive.setRGB(...b)},h.prototype.setMaterial=function(b){this._lod.setMaterial(b)},h.prototype.getClosestVertexIndex=function(){var b=-1,y=this.getMorph();if(y&&y.geometry){var v=y.geometry.attributes.position;if(v){this._b1.setFromBufferAttribute(v),this._b1.getCenter(this._v1);for(var M=-1,A=0,_=0;_<v.count;_++)this._v2.fromArray(v.array,3*_),A=this._v2.distanceTo(this._v1),M==-1?M=A:M>A&&(M=A,b=_)}}return b},h.prototype.getClosestVertex=function(b){var y=new c.Vector3;this.closestVertexIndex==-1&&(this.closestVertexIndex=this.getClosestVertexIndex());var v=this.getMorph();if(v&&v.geometry&&0<=this.closestVertexIndex){var M=v.morphTargetInfluences,A=v.geometry.morphAttributes;if(M&&A&&A.position){for(var _=!1,w=0;w<M.length;w++)0<M[w]&&(_=!0,this._v1.fromArray(A.position[w].array,3*this.closestVertexIndex),y.add(this._v1.multiplyScalar(M[w])));if(_)return b?y.applyMatrix4(v.matrixWorld):y}else return y.fromArray(v.geometry.attributes.position.array,3*this.closestVertexIndex),b?y.applyMatrix4(v.matrixWorld):y}return this.getBoundingBox(),y.copy(this.center),y},h.prototype.getBoundingBox=function(){if(this.visible){var b=this._lod.getCurrentMorph();if(b&&b.visible)return this.boundingBoxUpdateRequired&&(u(5).getBoundingBox(b,this.cachedBoundingBox,this._b1,this._v1,this._v2),this.cachedBoundingBox.getCenter(this.center),this.radius=this.center.distanceTo(this.cachedBoundingBox.max),this.boundingBoxUpdateRequired=!1),this.cachedBoundingBox}},h.prototype.dispose=function(){this._lod.dispose(),this.animationGroup=void 0,this.mixer=void 0,this.morph=void 0,this.group=void 0,this.clipAction=void 0,this.groupName=void 0},h.prototype.markerIsRequired=function(b){return!!(this.visible&&(this.markerMode==="on"||b&&b.displayMarkers&&this.markerMode==="inherited"))},h.prototype.updateMarker=function(b,y){if(b==!1&&this.markerIsRequired(y)){var v=y.ndcToBeUpdated;if(this.groupName){if(this.marker||(this.marker=new(u(14)).Marker(this),this.markerUpdateRequired=!0),this.markerUpdateRequired){var M=this.getClosestVertex(!1);M&&(this.marker.setPosition(M.x,M.y,M.z),this.markerUpdateRequired=!1)}this.marker.isEnabled()||(y.markersList&&!(this.marker.uuid in y.markersList)&&(v=!0,y.markersList[this.marker.uuid]=this.marker),this.marker.enable(),this.group.add(this.marker.morph)),this.marker.setNumber(this.markerNumber),this.markerImgURL?this.marker.loadUserSprite(this.markerImgURL):this.marker.setDefaultSprite(),y&&y.camera&&(v||y.markerCluster.markerUpdateRequired)&&(this.marker.updateNDC(y.camera.cameraObject),y.markerCluster.markerUpdateRequired=!0)}}else this.marker&&this.marker.isEnabled()&&(this.marker.disable(),this.group.remove(this.marker.morph),y.markersList&&this.marker.uuid in y.markersList&&(y.markerCluster.markerUpdateRequired=!0,delete y.markersList[this.marker.uuid])),this.markerUpdateRequired=!0},h.prototype.processMarkerVisual=function(b,y){this.marker&&this.marker.isEnabled()&&this.marker.updateVisual(b,y)},h.prototype.initiateMorphColor=function(){this.morphColour==1&&this._lod.updateMorphColorAttribute(!1)},h.prototype.setRenderOrder=function(b){this._lod.setRenderOrder(b)},h.prototype.getClosestVertexDOMElementCoords=function(b){if(b&&b.camera){var y=!0,v=this.getClosestVertex(!0);return v.project(b.camera),v.z=Math.min(Math.max(v.z,0),1),(1<v.x||-1>v.x||1<v.y||-1>v.y)&&(y=!1),b.getZincCameraControls().getRelativeCoordsFromNDC(v.x,v.y,v),{position:v,inView:y}}},h.prototype.setMarkerMode=function(b,y){b!==this.markerMode&&(this.markerMode=b==="on"||b==="off"?b:"inherited",this.region&&(this.region.pickableUpdateRequired=!0)),y&&(this.markerNumber=y.number,this.markerImgURL=y.imgURL)},h.prototype.render=function(b,y,v,M){if(this.visible&&!(this.timeEnabled&&y)&&this._lod.update(v,this.center),y==!0){if(this.clipAction&&this.isTimeVarying())this.mixer.update(b);else{var A=this.inbuildTime+b;A>this.duration&&(A-=this.duration),this.inbuildTime=A}this.visible&&b!=0&&(this.boundingBoxUpdateRequired=!0,this.morphColour==1&&this._lod.updateMorphColorAttribute(!0))}this.updateMarker(y,M)},h.prototype.addLOD=function(b,y,v,M,A){this._lod.addLevelFromURL(b,y,v,M,A)},h.prototype.addVertices=function(b){var y=this.getMorph(),v=void 0;if(!y)v=f(500,b),this.drawRange=b.length;else if(-1<this.drawRange){var M=y.geometry.getAttribute("position");b.forEach(A=>{M.setXYZ(this.drawRange,A[0],A[1],A[2]),++this.drawRange}),M.needsUpdate=!0,y.geometry.setDrawRange(0,this.drawRange),y.geometry.computeBoundingBox(),y.geometry.computeBoundingSphere(),v=y.geoemtry,this.boundingBoxUpdateRequired=!0}return v},h.prototype.deleteVertices=function(b){var y=this.getMorph();return!!(y!=null&&y.geometry&&this.drawRange>=b&&d(y.geometry,b,!0))&&(--this.drawRange,y.geometry.setDrawRange(0,this.drawRange),y.geometry.computeBoundingBox(),y.geometry.computeBoundingSphere(),this.boundingBoxUpdateRequired=!0,!0)},h.prototype.setPosition=function(b,y,v){var M=this.getGroup();M&&(M.position.set(b,y,v),M.matrixWorldNeedsUpdate=!0,M.updateMatrix(),M.updateWorldMatrix(!0,!0),this.boundingBoxUpdateRequired=!0)},h.prototype.loadAdditionalSources=function(b){b.load(p(filename),meshloader(region,colour,opacity,localTimeEnabled,localMorphColour,void 0,void 0,void 0,void 0,finishCallback),this.onProgress(filename),this.onError(finishCallback))},h.prototype.setScaleAll=function(b){var y=this.getGroup();y&&(y.scale.set(b,b,b),y.updateMatrix(),this.boundingBoxUpdateRequired=!0)},l.ZincObject=h},(o,l,u)=>{var c=u(4),f=u(5).updateMorphColorAttribute,d=u(5).toBufferGeometry,p=function(g){this.levels=[],this._currentLevel=0,this._renderOrder=1,this._material=void 0,this._secondaryMaterial=void 0,this._loader=void 0,this._parent=g,this.addLevel=(h,b)=>{if(h){var y,v=Math.abs(b);for(y=0;y<this.levels.length&&!(v<this.levels[y].distance);y++);this.levels.splice(y,0,{distance:v,morph:h,loaded:!0,loading:!1,url:""}),h.renderOrder=this._renderOrder}},this.levelLoaded=(h,b)=>{if(h){for(var y=Math.abs(b),v=0;v<this.levels.length;v++)if(y===this.levels[v].distance){this._parent.group.add(h),this.levels[v].morph=h,this.levels[v].loaded=!0,this.levels[v].loading=!1;break}this.checkTransparentMesh()}},this.addLevelFromURL=(h,b,y,v,M)=>{this._loader=h;var A,_=this.calculateDistance(b);for(A=0;A<this.levels.length&&!(_<this.levels[A].distance);A++);this.levels.splice(A,0,{distance:_,morph:void 0,loaded:!1,loading:!1,url:y,index:v}),M&&this.loadLevel(A)},this.loadLevel=h=>{var b=this.levels[h];return b.morph||b.loaded||b.loading||(b.loading=!0,this._loader.load(b.url,this.lodLoader(b.distance),void 0,void 0,{index:b.index})),b.morph===void 0},this.calculateDistance=function(h){this._parent.getBoundingBox();var b=this._parent.radius,y=0;return h==="far"?y=4.5*b:h==="medium"?y=2.5*b:h=="close"&&(y=0),y},this.containsLevels=()=>!!(this.levels&&1<this.levels.length),this.checkTransparentMesh=()=>{var h=this.levels[this._currentLevel];this._material&&(this._material.transparent?(!this._secondaryMaterial&&(this._secondaryMaterial=this._material.clone(),this._secondaryMaterial.side=c.FrontSide),this._secondaryMaterial.opacity=this._material.opacity,this._secondaryMaterial.emissive&&this._secondaryMaterial.emissive.copy(this._material.emissive),this._secondaryMaterial.needsUpdate=!0,!h.secondaryMesh&&(h.secondaryMesh=new c.Mesh(h.morph.geometry,this._secondaryMaterial),h.secondaryMesh.renderOrder=h.morph.renderOrder+1,h.secondaryMesh.userData=h.morph.userData,h.secondaryMesh.name=h.morph.name),this._material.side=c.BackSide,this._material.needsUpdate=!0,!h.secondaryMesh.parent&&(h.morph.add(h.secondaryMesh),this._parent.animationGroup&&this._parent.animationGroup.add(h.secondaryMesh))):(h.secondaryMesh&&(h.morph.remove(h.secondaryMesh),this._parent.animationGroup&&(this._parent.animationGroup.uncache(h.secondaryMesh),this._parent.animationGroup.remove(h.secondaryMesh))),this._material.side=c.DoubleSide,this._material.needsUpdate=!0))},this.dispose=()=>{this.levels.forEach(h=>{h.morph&&h.morph.geometry&&h.morph.geometry.dispose()}),this._material&&this._material.dispose(),this._secondaryMaterial&&this._secondaryMaterial.dispose()},this.getCurrentLevel=()=>this._currentLevel,this.getCurrentMorph=()=>{var h=this.levels[this._currentLevel];return h&&h.morph?h.morph:this._parent.morph},this.lodLoader=function(h){return b=>{var y=this._material,v={localTimeEnabled:this._parent.timeEnabled,localMorphColour:this._parent.morphColour},M=d(b,v),A=void 0;this._parent.isGeometry?A=new c.Mesh(M,y):this._parent.isLines&&(A=new(u(12)).LineSegments(M,y)),A.userData=this._parent,A.renderOrder=this._renderOrder,b.dispose(),this.levelLoaded(A,h)}},this.updateMorphColorAttribute=h=>{if(this._material&&(this._material.vertexColors==c.VertexColors||this._material.vertexColors==!0))if(h){var b=this.getCurrentMorph();f(b.geometry,b)}else this.levels.forEach(y=>{y.morph&&y.morph.geometry&&f(y.morph.geometry,y.morph)})},this.setColour=h=>{this._material.color=h,this._secondaryMaterial&&(this._secondaryMaterial.color=h),m()},this.setFrustumCulled=h=>{this.levels.forEach(b=>{b.morph&&(b.morph.frustumCulled=h),b.secondaryMesh&&(b.secondaryMesh.frustumCulled=h)})},this.setMaterial=h=>{h&&(!this._material||this._material.id!==h.id)&&(this._material=h,this._secondaryMaterial&&this._secondaryMaterial.dispose(),this._secondaryMaterial=h.clone(),this._secondaryMaterial.side=c.FrontSide,this._secondaryMaterial.transparent=!0,this.levels.forEach(b=>{b.morph&&(b.morph.material=this._material,b.morph.geometry&&(b.morph.geometry.colorsNeedUpdate=!0)),b.secondaryMesh&&(b.secondaryMesh.material=this._secondaryMaterial)}))},this.setName=h=>{this.levels.forEach(b=>{b.morph&&(b.morph.name=h),b.secondaryMesh&&(b.secondaryMesh.name=h)})},this.setRenderOrder=h=>{this._renderOrder=h,this.levels.forEach(b=>{b.morph&&(b.morph.renderOrder=h),b.secondaryMesh&&(b.secondaryMesh.renderOrder=h)})},this.setVertexColors=h=>{this._material.vertexColors=h,m(),this._secondaryMaterial&&(this._secondaryMaterial.vertexColors=h)},this.update=(h,b)=>{var y=this.levels;if(1<y.length){var v,M,A=h.cameraObject.position.distanceTo(b),_=-1,w=-1;for(v=0,M=y.length;v<M&&A>=y[v].distance;v++)y[v].morph?(-1<_&&y[_].morph&&(y[_].morph.visible=!1),_=v,y[v].morph.visible=!0,w=-1):w=v;for(-1<w&&this.loadLevel(w);v<M;v++)y[v].morph&&(-1<_?y[v].morph.visible=!1:(y[v].morph.visible=!0,_=v));this._currentLevel!=_&&(this._currentLevel=_,this.checkTransparentMesh())}},this.toggleMarker=(h,b)=>{this.levels.forEach(y=>{y.morph&&(b?y.morph.add(h):y.morph.remove(h))})};var m=()=>{this.levels.forEach(h=>{h.morph&&h.morph.geometry&&(h.morph.geometry.colorsNeedUpdate=!0)})}};l.LOD=p},(o,l,u)=>{u.r(l),u.d(l,{LineSegments:()=>g});var c=u(13),f=u(4),d=new f.Vector3,p=new f.Vector3;class g extends c.Line{constructor(h,b){super(h,b),this.type="LineSegments"}computeLineDistances(){var h=this.geometry;if(!h.isBufferGeometry)h.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");else if(h.index===null){for(var b=h.attributes.position,y=[],v=0,M=b.count;v<M;v+=2)d.fromBufferAttribute(b,v),p.fromBufferAttribute(b,v+1),y[v]=v==0?0:y[v-1],y[v+1]=y[v]+d.distanceTo(p);h.setAttribute("lineDistance",new f.Float32BufferAttribute(y,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}g.prototype.isLineSegments=!0},(o,l,u)=>{u.r(l),u.d(l,{Line:()=>M});var c=u(4),f=new c.Vector3,d=new c.Vector3,p=new c.Matrix4,g=new c.Ray,m=new c.Sphere,h=new c.Vector3,b=new c.Vector3,y=new c.Vector3,v=new c.Vector3;class M extends c.Object3D{constructor(){var w=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new c.BufferGeometry,C=1<arguments.length&&arguments[1]!==void 0?arguments[1]:new c.LineBasicMaterial;super(),this.type="Line",this.geometry=w,this.material=C,this.updateMorphTargets()}copy(w){return super.copy(w),this.material=w.material,this.geometry=w.geometry,this}computeLineDistances(){var w=this.geometry;if(!w.isBufferGeometry)w.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");else if(w.index===null){for(var C=w.attributes.position,P=[0],R=1,I=C.count;R<I;R++)f.fromBufferAttribute(C,R-1),d.fromBufferAttribute(C,R),P[R]=P[R-1],P[R]+=f.distanceTo(d);w.setAttribute("lineDistance",new c.Float32BufferAttribute(P,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(w,C){var P=this.geometry,R=this.matrixWorld,I=w.params.Line.threshold,S=P.drawRange,T=P.morphAttributes.position;if(P.boundingSphere===null&&P.computeBoundingSphere(),m.copy(P.boundingSphere),m.applyMatrix4(R),m.radius+=I,w.ray.intersectsSphere(m)!==!1){p.copy(R).invert(),g.copy(w.ray).applyMatrix4(p);var E=I/((this.scale.x+this.scale.y+this.scale.z)/3),L=E*E,F=new c.Vector3,x=new c.Vector3,O=new c.Vector3,B=new c.Vector3,N=this.isLineSegments?2:1;if(P.isBufferGeometry){var k=P.index,z=P.attributes,G=z.position;if(k!==null)for(var Y=Math.max(0,S.start),Z=Math.min(k.count,S.start+S.count),te=Y;te<Z-1;te+=N){var q=k.getX(te),W=k.getX(te+1);A(F,x,this,G,T,q,W);var $=g.distanceSqToSegment(F,x,B,O);if(!($>L)){B.applyMatrix4(this.matrixWorld);var X=w.ray.origin.distanceTo(B);X<w.near||X>w.far||C.push({distance:X,point:O.clone().applyMatrix4(this.matrixWorld),index:te,face:null,faceIndex:null,object:this})}}else for(var K=Math.max(0,S.start),re=Math.min(G.count,S.start+S.count),V=K;V<re-1;V+=N){A(F,x,this,G,T,V,V+1);var j=g.distanceSqToSegment(F,x,B,O);if(!(j>L)){B.applyMatrix4(this.matrixWorld);var oe=w.ray.origin.distanceTo(B);oe<w.near||oe>w.far||C.push({distance:oe,point:O.clone().applyMatrix4(this.matrixWorld),index:V,face:null,faceIndex:null,object:this})}}}else P.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}updateMorphTargets(){var w=this.geometry;if(w.isBufferGeometry){var C=w.morphAttributes,P=Object.keys(C);if(0<P.length){var R=C[P[0]];if(R!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var I,S=0,T=R.length;S<T;S++)I=R[S].name||S+"",this.morphTargetInfluences.push(0),this.morphTargetDictionary[I]=S}}}else{var E=w.morphTargets;E!==void 0&&0<E.length&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function A(_,w,C,P,R,I,S){_.fromBufferAttribute(P,I),w.fromBufferAttribute(P,S);var T=C.morphTargetInfluences;if(C.material.morphTargets&&R&&T){h.set(0,0,0),b.set(0,0,0);for(var E=0,L=R.length;E<L;E++){var F=T[E],x=R[E];F!==0&&(y.fromBufferAttribute(x,I),v.fromBufferAttribute(x,S),h.addScaledVector(y.sub(_),F),b.addScaledVector(v.sub(w),F))}_.add(h),w.add(b)}}M.prototype.isLine=!0},(o,l,u)=>{var c=u(4),f=new Image(128,128);f.src=u(15);var d=new c.Texture;d.image=f,d.needsUpdate=!0;var p=[.02,.03,1],g=new c.SpriteMaterial({map:d,alphaTest:.5,transparent:!0,depthTest:!1,depthWrite:!1,sizeAttenuation:!1}),m=u(5).createNewSpriteText,h=function(b){u(10).ZincObject.call(this),this.texture=d;var y=void 0,v=void 0,M=void 0,A=void 0,_=void 0,w=!0;this.morph=new c.Group,this.group=this.morph,this.parent=b,this.isMarker=!0;var C=!1;this.ndc=new c.Vector3;var P=void 0,R=void 0,I=()=>{y=new c.Sprite(g),y.center.set(.5,0),this.morph.add(y),this.morph.position.set(0,0,0),this.morph.renderOrder=1e4,y.scale.set(p[0],p[1],p[2]),y.userData=this};this.updateVisual=(S,T)=>{var E=1,L=0;S!==T&&(L=1-(this.ndc.z-S)/(T-S),E=.6+.4*L),this.setSpriteSize(E)},this.updateNDC=S=>(this.ndc.copy(this.morph.position),this.ndc.project(S),this.ndc.z=Math.min(Math.max(this.ndc.z,0),1),this.ndc),this.setPosition=(S,T,E)=>{this.morph.position.set(S,T,E)},this.setSpriteSize=S=>{y.scale.set(.015,.02,1),y.scale.multiplyScalar(S)},this.setUserSprite=()=>{A&&(this.morph.add(A),w&&(this.morph.remove(y),R&&this.morph.remove(R),w=!1))},this.setImageForUserSprite=(S,T)=>{A&&(this.morph.remove(A),A=void 0),v&&v.dispose(),M&&M.dispose(),v=new c.Texture,v.image=S,v.needsUpdate=!0,M=new c.SpriteMaterial({map:v,alphaTest:.5,transparent:!0,depthTest:!1,depthWrite:!1,sizeAttenuation:!1}),T||(T=[.05,.05,1]),A=new c.Sprite(M),A.center.set(.5,0),A.scale.set(T[0],T[1],T[2]),A.userData=this,this.setUserSprite()},this.setDefaultSprite=()=>{w||(w=!0,this.morph.add(y),A&&this.morph.remove(A),R&&this.morph.add(R))},this.loadUserSprite=(S,T)=>{if(S)if(S!==_){_=S;var E=new Image(128,128);E.crossOrigin="anonymous",E.onload=()=>{this.setImageForUserSprite(E,T)},E.src=S}else this.setUserSprite()},this.dispose=()=>{this.morph&&this.morph.clear(),y&&(y.clear(),y=void 0),R&&(R.material.map.dispose(),R.material.dispose(),R=void 0)},this.isEnabled=()=>C,this.setNumber=S=>{(!S||P!=S)&&R&&(this.morph.remove(R),R.material.map.dispose(),R.material.dispose(),R=void 0),!R&&S&&(R=m(S,.012,"black","Asap",120,700),this.morph.add(R)),P=S},this.getNumber=()=>P||1,this.setVisibility=function(S){S!==this.visible&&(this.visible=S,this.group.visible=S,this.parent.region&&(this.parent.region.pickableUpdateRequired=!0))},this.enable=()=>{C=!0,this.morph.visible=!0,this.visible=!0},this.disable=()=>{C=!1,this.morph.visible=!1,this.visible=!1},I()};h.prototype=Object.create(u(10).ZincObject.prototype),l.Marker=h},o=>{o.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMzY1IiBoZWlnaHQ9IjU2MCIgdmlld0JveD0iMCAwIDM2NSA1NjAiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGRlc2M+Q3JlYXRlZCB3aXRoIEZhYnJpYy5qcyA1LjIuNDwvZGVzYz4NCjxkZWZzPg0KPC9kZWZzPg0KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idHJhbnNwYXJlbnQiPjwvcmVjdD4NCjxnIHRyYW5zZm9ybT0ibWF0cml4KDAgMCAwIDAgMCAwKSIgaWQ9IjgwOGVkMjgzLTI1MjQtNDQwZi04OGFlLTNiZGI0N2JiNTc0OSIgID4NCjwvZz4NCjxnIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIDEgMTgyLjUgMjgwKSIgaWQ9ImRiMzA0MTNkLTViZmYtNGI5OC1hYjU5LTQ2NDQ5N2VlMTk5ZSIgID4NCjxyZWN0IHN0eWxlPSJzdHJva2U6IG5vbmU7IHN0cm9rZS13aWR0aDogMTsgc3Ryb2tlLWRhc2hhcnJheTogbm9uZTsgc3Ryb2tlLWxpbmVjYXA6IGJ1dHQ7IHN0cm9rZS1kYXNob2Zmc2V0OiAwOyBzdHJva2UtbGluZWpvaW46IG1pdGVyOyBzdHJva2UtbWl0ZXJsaW1pdDogNDsgZmlsbDogcmdiKDI1NSwyNTUsMjU1KTsgZmlsbC1ydWxlOiBub256ZXJvOyBvcGFjaXR5OiAxOyB2aXNpYmlsaXR5OiBoaWRkZW47IiB2ZWN0b3ItZWZmZWN0PSJub24tc2NhbGluZy1zdHJva2UiICB4PSItMTgyLjUiIHk9Ii0yODAiIHJ4PSIwIiByeT0iMCIgd2lkdGg9IjM2NSIgaGVpZ2h0PSI1NjAiIC8+DQo8L2c+DQo8ZyB0cmFuc2Zvcm09Im1hdHJpeCgwIDAgMCAwIDAgOTcuNSkiICA+DQo8ZyBzdHlsZT0iIiAgID4NCjwvZz4NCjwvZz4NCjxnIHRyYW5zZm9ybT0ibWF0cml4KDAgMCAwIDAgMCA5Ny41KSIgID4NCjxnIHN0eWxlPSIiICAgPg0KPC9nPg0KPC9nPg0KPGcgdHJhbnNmb3JtPSJtYXRyaXgoMC45OSAwIDAgMC45OSAxODIuNSAyODApIiAgPg0KPGcgc3R5bGU9IiIgdmVjdG9yLWVmZmVjdD0ibm9uLXNjYWxpbmctc3Ryb2tlIiAgID4NCgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSAwIDApIiAgPg0KPHJlY3Qgc3R5bGU9InN0cm9rZTogbm9uZTsgc3Ryb2tlLXdpZHRoOiAxOyBzdHJva2UtZGFzaGFycmF5OiBub25lOyBzdHJva2UtbGluZWNhcDogYnV0dDsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDA7IHN0cm9rZS1saW5lam9pbjogbWl0ZXI7IHN0cm9rZS1taXRlcmxpbWl0OiA0OyBmaWxsOiByZ2IoMjU1LDI1NSwyNTUpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IHZpc2liaWxpdHk6IGhpZGRlbjsiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSIgIHg9Ii01NDAiIHk9Ii01NDAiIHJ4PSIwIiByeT0iMCIgd2lkdGg9IjEwODAiIGhlaWdodD0iMTA4MCIgLz4NCjwvZz4NCgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSAwIDApIiAgPg0KPHBhdGggc3R5bGU9InN0cm9rZTogcmdiKDAsMCwwKTsgc3Ryb2tlLXdpZHRoOiAwOyBzdHJva2UtZGFzaGFycmF5OiBub25lOyBzdHJva2UtbGluZWNhcDogYnV0dDsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDA7IHN0cm9rZS1saW5lam9pbjogbWl0ZXI7IHN0cm9rZS1taXRlcmxpbWl0OiA0OyBmaWxsOiByZ2IoMCw4OSwxMTYpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB2ZWN0b3ItZWZmZWN0PSJub24tc2NhbGluZy1zdHJva2UiICB0cmFuc2Zvcm09IiB0cmFuc2xhdGUoLTE4Mi45LCAtMjc5Ljg1KSIgZD0iTSAxODIuOSA1NTEuNyBDIDE4Mi45IDU1MS44MDAwMDAwMDAwMDAxIDE4My4xIDU1MiAxODMuMSA1NTIgQyAxODMuMSA1NTIgMzU4LjMgMjgzIDM1OC4zIDE5NC42IEMgMzU4LjMgNjQuNSAyNjkuNSA3LjkwMDAwMDAwMDAwMDAwNiAxODIuOSA3LjY5OTk5OTk5OTk5OTk4OSBDIDk2LjMgNy45IDcuNSA2NC41IDcuNSAxOTQuNiBDIDcuNSAyODMgMTgyLjggNTUyIDE4Mi44IDU1MiBDIDE4Mi44IDU1MiAxODIuOSA1NTEuNyAxODIuOSA1NTEuNyB6IE0gMTIyLjIgMTg3LjIgQyAxMjIuMiAxNTMuNiAxNDkuNCAxMjYuMzk5OTk5OTk5OTk5OTkgMTgzIDEyNi4zOTk5OTk5OTk5OTk5OSBDIDIxNi42IDEyNi4zOTk5OTk5OTk5OTk5OSAyNDMuOCAxNTMuNiAyNDMuOCAxODcuMiBDIDI0My44IDIyMC43OTk5OTk5OTk5OTk5OCAyMTYuNSAyNDggMTgyLjkgMjQ4IEMgMTQ5LjQgMjQ4IDEyMi4yIDIyMC44IDEyMi4yIDE4Ny4yIHoiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgLz4NCjwvZz4NCgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMy44MiAwIDAgMy44MiAwIC0xMDAuNzcpIiAgPg0KPGNpcmNsZSBzdHlsZT0ic3Ryb2tlOiByZ2IoMCwwLDApOyBzdHJva2Utd2lkdGg6IDA7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGZpbGw6IHJnYigyNTUsMjU1LDI1NSk7IGZpbGwtcnVsZTogbm9uemVybzsgb3BhY2l0eTogMTsiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSIgIGN4PSIwIiBjeT0iMCIgcj0iMzUiIC8+DQo8L2c+DQo8L2c+DQo8L2c+DQo8L3N2Zz4="},(o,l,u)=>{var c=u(4),f=function(d,p,g,m){u(10).ZincObject.call(this);var h;p&&(h=p.clone(),h.vertexColors=c.FaceColors),this.id=g;var b=void 0,y=void 0;this.isGlyph=!0;var v=[0,0,0];this.fromMesh=M=>!!(M&&M.isMesh)&&(this.morph=M.clone(),this.morph.userData=this,this.group.add(this.morph),!0),d&&h&&this.fromMesh(new c.Mesh(d,h)),this.getGlyphset=function(){return m},this.setLabel=M=>{M&&(typeof M=="string"||M instanceof String)&&(y=M,this.morph&&(this.morph.name=M))},this.showLabel=M=>{if(b&&(v=b.getPosition(),this.group.remove(b.getSprite()),b.dispose(),b=void 0),y&&(typeof y=="string"||y instanceof String)){b=new(u(17)).Label(y,M),b.setPosition(v[0],v[1],v[2]);var A=b.getSprite();A.material.alphaTest=.5,A.material.transparent=!0,A.material.depthWrite=!1,this.group.add(b.getSprite())}},this.hideLabel=()=>{b&&(v=b.getPosition(),this.group.remove(b.getSprite()),b.dispose(),b=void 0)},this.getLabel=()=>y,this.getMesh=()=>this.morph,this.setTransformation=(M,A,_,w)=>{this.morph&&(this.morph.matrix.elements[0]=A[0],this.morph.matrix.elements[1]=A[1],this.morph.matrix.elements[2]=A[2],this.morph.matrix.elements[3]=0,this.morph.matrix.elements[4]=_[0],this.morph.matrix.elements[5]=_[1],this.morph.matrix.elements[6]=_[2],this.morph.matrix.elements[7]=0,this.morph.matrix.elements[8]=w[0],this.morph.matrix.elements[9]=w[1],this.morph.matrix.elements[10]=w[2],this.morph.matrix.elements[11]=0,this.morph.matrix.elements[12]=M[0],this.morph.matrix.elements[13]=M[1],this.morph.matrix.elements[14]=M[2],this.morph.matrix.elements[15]=1,this.morph.matrixAutoUpdate=!1),v=[...M],b&&b.setPosition(M[0],M[1],M[2])},this.setColour=M=>{b&&b.setColour(M),this.secondaryMesh&&this.secondaryMesh.material&&(this.secondaryMesh.material.color=colour),this.geometry&&(this.geometry.colorsNeedUpdate=!0)},this.dispose=()=>{this.material&&this.material.dispose(),this.morph=void 0}};f.prototype=Object.create(u(10).ZincObject.prototype),l.Glyph=f},(o,l,u)=>{var c=u(7).default;l.Label=function(f,d){var p=f,g=void 0,m=500;g=d?new c(p,.012,d.getStyle()):new c(p,.012),g.fontFace="Asap",g.fontWeight=m,g.material.map.generateMipmaps=!1,g.material.sizeAttenuation=!1,g.center.x=-.05,g.center.y=0;var h=[g.scale.x,g.scale.y];this.getPosition=()=>g?[g.position.x,g.position.y,g.position.z]:[0,0,0],this.setPosition=(b,y,v)=>{g&&g.position.set(b,y,v)},this.setColour=b=>{b&&(g.color=b.getStyle())},this.setScale=b=>{g&&0<b&&g.scale.set(b,b,1)},this.setDepthTest=b=>{b&&b!==g.material.depthTest&&(g.material.depthTest=b)},this.setSize=b=>{0<b&&(g.scale.x=h[0]*b,g.scale.y=h[1]*b)},this.setFontWeight=b=>{b&&b!==m&&(g.fontWeight=b,m=b)},this.setText=b=>{b&&b!==g.text&&(g.text=b,p=b)},this.setVisibility=b=>{g.visible=b},this.dispose=()=>{},this.getSprite=()=>g,this.getString=()=>p}},(o,l,u)=>{var c=u(4),f=u(19).JSONLoader,d=function(){u(10).ZincObject.call(this);var p=[],g=void 0,m=void 0,h=void 0,b=void 0,y=void 0,v=void 0,M=void 0,A=0,_=0,w=[0,0,0],C=[0,0,0],P=[0,0,0],R="NONE";this.ready=!1;var I=!1,S=!1;this.isGlyphset=!0;var T=new c.Matrix4,E=new c.Color,L=new c.Color,F=new c.Box3,x=new c.Box3,O=new c.Box3,B=[],N=[],k=[],z=[],G=[],Y=[],Z=[];this.globalScale=1;for(var te=0;8>te;te++)new c.Vector3;this.load=(V,j,oe,ae,le)=>{g=V.axis1,m=V.axis2,h=V.axis3,b=V.positions,y=V.scale,v=V.colors,M=V.label,I=V.metadata.MorphColours,S=V.metadata.MorphVertices,A=V.metadata.number_of_time_steps,R=V.metadata.repeat_mode,_=V.metadata.number_of_vertices,R=="AXES_2D"||R=="MIRROR"?_*=2:R=="AXES_3D"&&(_*=3),w=V.metadata.base_size,C=V.metadata.offset,P=V.metadata.scale_factors;var H=new f;this.geometry=new c.BufferGeometry;var U=new c.InstancedMesh(this.geometry,void 0,_);if(this.setMorph(U),ae){var D=H.parse(j);re(oe,le)(D.geometry,D.materials),D.geometry.dispose()}else H.crossOrigin="Anonymous",H.load(j,re(oe,le))};var q=(V,j,oe,ae,le,H)=>{if(R=="NONE"||R=="MIRROR"){for(var U,D=[0,0,0],Q=[0,0,0],ie=[0,0,0],ce=[0,0,0],ge=[0,0,0],ye=[0,0,0],ue=[0,0,0],be=[0,0,0],ne=[0,0,0],de=0;3>de;de++)U=0>le[de]?-1:1,D[de]=(U*w[de]+le[de]*P[de])*this.globalScale;for(var de=0;3>de;de++)Q[de]=j[de]*D[0],ie[de]=oe[de]*D[1],ce[de]=ae[de]*D[2],ge[de]=V[de]+C[0]*Q[de]+C[1]*ie[de]+C[2]*ce[de],R=="MIRROR"&&(ye[de]=-Q[de],ue[de]=-ie[de],be[de]=-ce[de],ne[de]=ge[de],0>le[0]&&(ge[de]-=Q[de],ne[de]-=ye[de]));0>ce[0]*(Q[1]*ie[2]-Q[2]*ie[1])+ce[1]*(Q[2]*ie[0]-Q[0]*ie[2])+ce[2]*(Q[0]*ie[1]-Q[1]*ie[0])&&(ce[0]=-ce[0],ce[1]=-ce[1],ce[2]=-ce[2]),H[0]=[ge,Q,ie,ce],R=="MIRROR"&&(0>be[0]*(ye[1]*ue[2]-ye[2]*ue[1])+be[1]*(ye[2]*ue[0]-ye[0]*ue[2])+be[2]*(ye[0]*ue[1]-ye[1]*ue[0])&&(be[0]=-be[0],be[1]=-be[1],be[2]=-be[2]),H[1]=[ne,ye,ue,be])}else if(R=="AXES_2D"||R=="AXES_3D"){for(var U,ve=[0,0,0],Ee=[0,0,0],de=0;3>de;de++)U=0>le[de]?-1:1,ve[de]=(U*w[0]+le[de]*P[0])*this.globalScale;for(var de=0;3>de;de++)Ee[de]=V[de]+C[0]*ve[0]*j[de]+C[1]*ve[1]*oe[de]+C[2]*ve[2]*ae[de];for(var Se=glyph_repeat_mode=="AXES_2D"?2:3,Ie=0;Ie<Se;Ie++){var Je=void 0,Ve=void 0,st=le[Ie],Re=[0,0,0],Ue=[0,0,0],We=[0,0,0];Ie==0?(Je=j,Ve=oe):Ie==1?(Je=oe,Ve=glyph_repeat_mode=="AXES_2D"?j:ae):(Je=ae,Ve=j);var Pt=(w[0]+st*P[0])*this.globalScale;Re[0]=Je[0]*Pt,Re[1]=Je[1]*Pt,Re[2]=Je[2]*Pt,We[0]=Re[1]*Ve[2]-Ve[1]*Re[2],We[1]=Re[2]*Ve[0]-Ve[2]*Re[0],We[2]=Re[0]*Ve[1]-Re[1]*Ve[0];var It=Math.sqrt(We[0]*We[0]+We[1]*We[1]+We[2]*We[2]);if(0<It){var pt=(w[2]+st*P[2])*this.globalScale/It;R=="AXES_2D"&&0<Ie&&(pt*=-1),We[0]*=pt,We[1]*=pt,We[2]*=pt}if(Ue[0]=We[1]*Re[2]-Re[1]*We[2],Ue[1]=We[2]*Re[0]-Re[2]*We[0],Ue[2]=We[0]*Re[1]-We[1]*Re[0],It=Math.sqrt(Ue[0]*Ue[0]+Ue[1]*Ue[1]+Ue[2]*Ue[2]),0<It){var yt=(w[1]+st*P[1])*this.globalScale/It;Ue[0]*=yt,Ue[1]*=yt,Ue[2]*=yt}H[Ie]=[Ee,Re,Ue,We]}}return H},W=(V,j,oe,ae,le)=>{var H=1;R=="AXES_2D"||R=="MIRROR"?H=2:R=="AXES_3D"&&(H=3);var U=V.length/3,D=0;Z.length=H;for(var Q=0;Q<U;Q++){var ie=3*Q,ce=[V[ie],V[ie+1],V[ie+2]],ge=[j[ie],j[ie+1],j[ie+2]],ye=[oe[ie],oe[ie+1],oe[ie+2]],ue=[ae[ie],ae[ie+1],ae[ie+2]],be=[le[ie],le[ie+1],le[ie+2]],ne=q(ce,ge,ye,ue,be,Z);if(ne.length==H)for(var de=0;de<H;de++){T.elements[0]=ne[de][1][0],T.elements[1]=ne[de][1][1],T.elements[2]=ne[de][1][2],T.elements[3]=0,T.elements[4]=ne[de][2][0],T.elements[5]=ne[de][2][1],T.elements[6]=ne[de][2][2],T.elements[7]=0,T.elements[8]=ne[de][3][0],T.elements[9]=ne[de][3][1],T.elements[10]=ne[de][3][2],T.elements[11]=0,T.elements[12]=ne[de][0][0],T.elements[13]=ne[de][0][1],T.elements[14]=ne[de][0][2],T.elements[15]=1,this.morph.setMatrixAt(D,T);var ve=p[D];ve&&ve.setTransformation(ne[de][0],ne[de][1],ne[de][2],ne[de][3]),D++}}this.morph.instanceMatrix.needsUpdate=!0},$=V=>{var j=1;R=="AXES_2D"||R=="MIRROR"?j=2:R=="AXES_3D"&&(j=3);for(var oe,ae=V.length,le=0,H=0;H<ae;H++){oe=V[H];for(var U=0;U<j;U++){E.setHex(oe),this.morph.setColorAt(le,E);var D=p[le];D&&D.setColour(E),le++}}this.morph.instanceColor.needsUpdate=!0},X=()=>{var V=B,j=N,oe=k,ae=z,le=G,H=Y,U=this.inbuildTime/this.duration*(A-1),D=Math.floor(U),Q=1-(U-D),ie=Math.ceil(U);if(S){var ce=b[D.toString()],ge=b[ie.toString()],ye=g[D.toString()],ue=g[ie.toString()],be=m[D.toString()],ne=m[ie.toString()],de=h[D.toString()],ve=h[ie.toString()],Ee=y[D.toString()],Se=y[ie.toString()];B.length=ce.length,N.length=ce.length,k.length=ce.length,z.length=ce.length,G.length=ce.length;for(var Ie=0;Ie<ce.length;Ie++)V[Ie]=Q*ce[Ie]+(1-Q)*ge[Ie],j[Ie]=Q*ye[Ie]+(1-Q)*ue[Ie],oe[Ie]=Q*be[Ie]+(1-Q)*ne[Ie],ae[Ie]=Q*de[Ie]+(1-Q)*ve[Ie],le[Ie]=Q*Ee[Ie]+(1-Q)*Se[Ie]}else V=b[0],j=g[0],oe=m[0],ae=h[0],le=y[0];if(W(V,j,oe,ae,le),this.boundingBoxUpdateRequired=!0,v!=null){if(I){var Je=v[D.toString()],Ve=v[ie.toString()];H.length=Je.length;for(var st=0;st<Je.length;st++)E.setHex(Je[st]),L.setHex(Ve[st]),E.setRGB(E.r*Q+L.r*(1-Q),E.g*Q+L.g*(1-Q),E.b*Q+L.b*(1-Q)),H[st]=E.getHex()}else H=v[0];$(H)}};this.getLabel=V=>M&&M.length>V?M[V]:void 0,this.showLabel=()=>{for(var V=0;V<p.length;V++)p[V].showLabel(this.morph.material?this.morph.material.color:void 0)},this.hideLabel=()=>{for(var V=0;V<p.length;V++)p[V].hideLabel()};var K=V=>{for(var j=0;j<_;j++){var oe=new(u(16)).Glyph(void 0,void 0,j,this),ae=M?M[j]:void 0;ae=ae||this.groupName,ae&&oe.setLabel(ae),0<A&&oe.setFrustumCulled(!1),p[j]=oe,this.morph.add(oe.getGroup())}V&&this.showLabel(),W(b[0],g[0],m[0],h[0],y[0]),v!=null&&$(v[0]),this.ready=!0,this.boundingBoxUpdateRequired=!0};this.addCustomGlyph=V=>{V.isGlyph&&p.push(V),this.ready=!0,this.boundingBoxUpdateRequired=!0},this.addMeshAsGlyph=(V,j)=>{if(V.isMesh){var oe=new(u(16)).Glyph(void 0,void 0,j,this);return oe.fromMesh(V),p.push(oe),this.morph.add(oe.getGroup()),this.ready=!0,this.boundingBoxUpdateRequired=!0,oe}},this.forEachGlyph=V=>{for(var j=0;j<p.length;j++)V(p[j])};var re=(V,j)=>(oe,ae)=>{var le=oe.toBufferGeometry();this.geometry.copy(le),this.geometry.computeBoundingSphere(),this.geometry.computeBoundingBox(),le.dispose(),ae&&ae[0]&&(this.morph.material=ae[0]),K(j),this.morph.name=this.groupName,this.morph.userData=this,this.setMorph(this.morph),oe.dispose(),V!=null&&typeof V=="function"&&V(this)};this.getClosestVertexIndex=function(){var V=-1;if(this.morph&&this.ready){this.getBoundingBox().getCenter(this._v1);for(var j,oe=b[0],ae=oe.length/3,le=-1,H=0,U=0;U<ae;U++)j=3*U,this._v2.set(oe[j],oe[j+1],oe[j+2]),H=this._v1.distanceTo(this._v2),(le==-1||le>H)&&(le=H,V=U)}return V},this.getClosestVertex=function(){if(this.closestVertexIndex==-1&&(this.closestVertexIndex=this.getClosestVertexIndex()),0<=this.closestVertexIndex&&this.morph){var V=new c.Vector3;return this.morph.getMatrixAt(this.closestVertexIndex,T),V.setFromMatrixPosition(T),V}},this.getBoundingBox=()=>{if(this.morph&&this.ready&&this.morph.visible){if(this.boundingBoxUpdateRequired){F.setFromBufferAttribute(this.morph.geometry.attributes.position);for(var V=0;V<_;V++)this.morph.getMatrixAt(V,T),x.copy(F).applyMatrix4(T),V==0?O.copy(x):O.union(x);if(O)this.cachedBoundingBox.copy(O),this.morph.updateWorldMatrix(!0,!0),this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld),this.boundingBoxUpdateRequired=!1;else return}return this.cachedBoundingBox}},this.setMorphTime=V=>{this.inbuildTime=V>this.duration?this.duration:0>V?0:V,(I||S)&&(X(),S&&(this.markerUpdateRequired=!0))},this.isTimeVarying=()=>!!((this.ready===!1||0<A)&&(I||S)),this.getCurrentTime=()=>this.inbuildTime,this.setScaleAll=function(V){this.globalScale=V,X()},this.dispose=()=>{for(var V=p.length-1;0<=V;V--)p[V].dispose();this.geometry&&this.geometry.dispose(),this.morph&&this.morph.material.dispose(),g=void 0,m=void 0,h=void 0,b=void 0,y=void 0,v=void 0,this.ready=!1,this.groupName=void 0},this.render=(V,j,oe)=>{if(j==!0){var ae=this.inbuildTime+V;ae>this.duration&&(ae-=this.duration),this.inbuildTime=ae,(I||S)&&X()}this.updateMarker(j,oe)}};d.prototype=Object.create(u(10).ZincObject.prototype),l.Glyphset=d},(o,l,u)=>{u.r(l),u.d(l,{JSONLoader:()=>w});var c=u(4),f=u(20).Loader,d=c.LoaderUtils,p=c.AnimationClip,g=c.Vector3,m=c.Vector4,h=c.Color,b=c.Vector2,y=u(6).Face3,v=u(6).Geometry,M=c.FileLoader,A=c.DefaultLoadingManager,_=u(21).VideoHandler;function w(C){typeof C=="boolean"&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),C=void 0),this.manager=C===void 0?A:C,this.withCredentials=!1,this.paramsString=""}Object.assign(w.prototype,{load:function(P,R,I,S){var T=this,E=this.texturePath&&typeof this.texturePath=="string"?this.texturePath:d.extractUrlBase(P),L=new M(this.manager);P.split("?"),this.paramsString=P.length===2?paramsStrings[1]:"",L.setWithCredentials(this.withCredentials),L.load(P,function(F){var x;try{x=JSON.parse(F)}catch{if(console.error("The loader has encountered an error while parsing the content of a resource."),S)return void S({responseURL:P})}var O=x.metadata;if(O!==void 0){var B=O.type;if(B!==void 0&&B.toLowerCase()==="object")return void console.error("THREE.JSONLoader: "+P+" should be loaded with THREE.ObjectLoader instead.")}if(T&&T.parse)try{var N=T.parse(x,E);R(N.geometry,N.materials)}catch(k){if(console.error("The loader has encountered aon loading the geometry"),console.error(k),S)return void S({responseURL:P})}},I,S)},setTexturePath:function(P){this.texturePath=P},parse:function(){function C(S,T){function E(de,ve){return de&1<<ve}var L,F,x,O,B,N,k,z,G,Y,Z,te,q,W,$,X,K,re,V,j,oe,ae,le,H,U,D,Q,ie=S.faces,ce=S.vertices,ge=S.normals,ye=S.colors,ue=S.scale,be=0;if(S.uvs!==void 0){for(L=0;L<S.uvs.length;L++)S.uvs[L].length&&be++;for(L=0;L<be;L++)T.faceVertexUvs[L]=[]}for(O=0,B=ce.length;O<B;)re=new g,re.x=ce[O++]*ue,re.y=ce[O++]*ue,re.z=ce[O++]*ue,T.vertices.push(re);if(O=0,B=ie.length,S.uvs)for(L=0;L<S.uvs.length;L++){T.uvs[L]=[];for(var ne=0;ne<S.uvs[L].length;ne++)T.uvs[L][ne]=S.uvs[L][ne]}if(ge)for(L=0;L<ge.length;L++)T.normals[L]=ge[L];if(ye)for(L=0;L<ye.length;L++)T.colors[L]=ye[L];for(;O<B;)if(Y=ie[O++],Z=E(Y,0),te=E(Y,1),q=E(Y,3),W=E(Y,4),$=E(Y,5),X=E(Y,6),K=E(Y,7),Z){if(j=new y,j.a=ie[O],j.b=ie[O+1],j.c=ie[O+3],oe=new y,oe.a=ie[O+1],oe.b=ie[O+2],oe.c=ie[O+3],O+=4,te&&(G=ie[O++],j.materialIndex=G,oe.materialIndex=G),x=T.faces.length,q)for(L=0;L<be;L++)for(H=S.uvs[L],T.faceVertexUvs[L][x]=[],T.faceVertexUvs[L][x+1]=[],F=0;4>F;F++)z=ie[O++],D=H[2*z],Q=H[2*z+1],U=new b(D,Q),F!==2&&T.faceVertexUvs[L][x].push(U),F!==0&&T.faceVertexUvs[L][x+1].push(U);if(W&&(k=3*ie[O++],j.normal.set(ge[k++],ge[k++],ge[k]),oe.normal.copy(j.normal)),$)for(L=0;4>L;L++)k=3*ie[O++],le=new g(ge[k++],ge[k++],ge[k]),L!==2&&j.vertexNormals.push(le),L!==0&&oe.vertexNormals.push(le);if(X&&(N=ie[O++],ae=ye[N],j.color.setHex(ae),oe.color.setHex(ae)),K)for(L=0;4>L;L++)N=ie[O++],ae=ye[N],L!==2&&j.vertexColors.push(new h(ae)),L!==0&&oe.vertexColors.push(new h(ae));T.faces.push(j),T.faces.push(oe)}else{if(V=new y,V.a=ie[O++],V.b=ie[O++],V.c=ie[O++],V.b||(V.b=V.a),V.c||(V.c=V.b),te&&(G=ie[O++],V.materialIndex=G),x=T.faces.length,q)for(L=0;L<be;L++)for(H=S.uvs[L],T.faceVertexUvs[L][x]=[],F=0;3>F;F++)z=ie[O++],D=H[2*z],Q=H[2*z+1],U=new b(D,Q),T.faceVertexUvs[L][x].push(U);if(W&&(k=3*ie[O++],V.normal.set(ge[k++],ge[k++],ge[k])),$)for(L=0;3>L;L++)k=3*ie[O++],le=new g(ge[k++],ge[k++],ge[k]),V.vertexNormals.push(le);if(X&&(N=ie[O++],V.color.setHex(ye[N])),K)for(L=0;3>L;L++)N=ie[O++],V.vertexColors.push(new h(ye[N]));T.faces.push(V)}}function P(S,T){var E=S.influencesPerVertex===void 0?2:S.influencesPerVertex;if(S.skinWeights)for(var L=0,F=S.skinWeights.length;L<F;L+=E){var x=S.skinWeights[L],O=1<E?S.skinWeights[L+1]:0,B=2<E?S.skinWeights[L+2]:0,N=3<E?S.skinWeights[L+3]:0;T.skinWeights.push(new m(x,O,B,N))}if(S.skinIndices)for(var L=0,F=S.skinIndices.length;L<F;L+=E){var k=S.skinIndices[L],z=1<E?S.skinIndices[L+1]:0,G=2<E?S.skinIndices[L+2]:0,Y=3<E?S.skinIndices[L+3]:0;T.skinIndices.push(new m(k,z,G,Y))}T.bones=S.bones,T.bones&&0<T.bones.length&&(T.skinWeights.length!==T.skinIndices.length||T.skinIndices.length!==T.vertices.length)&&console.warn("When skinning, number of vertices ("+T.vertices.length+"), skinIndices ("+T.skinIndices.length+"), and skinWeights ("+T.skinWeights.length+") should match.")}function R(S,T){var E=S.scale;if(S.morphTargets!==void 0)for(var L=0,F=S.morphTargets.length;L<F;L++){T.morphTargets[L]={},T.morphTargets[L].name=S.morphTargets[L].name,T.morphTargets[L].vertices=[];for(var x,O=T.morphTargets[L].vertices,B=S.morphTargets[L].vertices,N=0,k=B.length;N<k;N+=3)x=new g,x.x=B[N]*E,x.y=B[N+1]*E,x.z=B[N+2]*E,O.push(x)}if(S.morphNormals!==void 0){for(var L=0,F=S.morphNormals.length;L<F;L++)if(T.morphTargets[L]){T.morphTargets[L].normals=[];for(var z,G=T.morphTargets[L].normals,Y=S.morphNormals[L].normals,N=0,k=Y.length;N<k;N+=3)z=new g,z.x=Y[N],z.y=Y[N+1],z.z=Y[N+2],G.push(z);T.morphNormalsReady=!0}}if(S.morphColors!==void 0){var L,F,Z,te,q,W,$;for(L=0,F=S.morphColors.length;L<F;L++)for(T.morphColors[L]={},T.morphColors[L].name=S.morphColors[L].name,T.morphColors[L].colors=[],q=T.morphColors[L].colors,W=S.morphColors[L].colors,Z=0,te=W.length;Z<te;Z+=3)$=new c.Color(16755200),$.setRGB(W[Z],W[Z+1],W[Z+2]),q.push($)}}function I(S,T){var E=[],L=[];S.animation!==void 0&&L.push(S.animation),S.animations!==void 0&&(S.animations.length?L=L.concat(S.animations):L.push(S.animations));for(var F,x=0;x<L.length;x++)F=p.parseAnimation(L[x],T.bones),F&&E.push(F);if(T.morphTargets){var O=p.CreateClipsFromMorphTargetSequences(T.morphTargets,10);E=E.concat(O)}0<E.length&&(T.animations=E)}return function(S,T){S.data!==void 0&&(S=S.data),S.scale=S.scale===void 0?1:1/S.scale;var E=new v;if(E.morphColors=[],C(S,E),P(S,E),R(S,E),I(S,E),E.computeFaceNormals(),E.computeBoundingSphere(),S.materials===void 0||S.materials.length===0)return{geometry:E};var L=f.prototype.initMaterials(S.materials,T,"Anonymous");if(S.materials[0].video){var F=T+S.materials[0].video;this.paramsString&&(F+="?".concat(this.paramsString));var x=new _(F);E._video=x}return L&&0<L.length&&(L[0].side=S.materials[0].singleSided?c.FrontSide:S.materials[0].flipSided?c.BackSide:c.DoubleSide,S.materials[0].specularCoef&&(L[0].shininess=Math.floor(S.materials[0].specularCoef/3))),{geometry:E,materials:L}}}()})},(o,l,u)=>{u.r(l),u.d(l,{Loader:()=>f});var c=u(4);u(4);function f(){}f.Handlers={handlers:[],add:function(p,g){this.handlers.push(p,g)},get:function(p){for(var g=this.handlers,m=0,h=g.length;m<h;m+=2){var b=g[m],y=g[m+1];if(b.test(p))return y}return null}},Object.assign(f.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(p,g,m){for(var h=[],b=0;b<p.length;++b)h[b]=this.createMaterial(p[b],g,m);return h},createMaterial:function(){var d={NoBlending:c.NoBlending,NormalBlending:c.NormalBlending,AdditiveBlending:c.AdditiveBlending,SubtractiveBlending:c.SubtractiveBlending,MultiplyBlending:c.MultiplyBlending,CustomBlending:c.CustomBlending},p=new c.Color,g=new c.TextureLoader,m=new c.MaterialLoader;return function(h,b,y){function v(C,P,R,I,S){var T,E=b+C,L=f.Handlers.get(E);L===null?(g.setCrossOrigin(y),T=g.load(E)):T=L.load(E),P!==void 0&&(T.repeat.fromArray(P),P[0]!==1&&(T.wrapS=c.RepeatWrapping),P[1]!==1&&(T.wrapT=c.RepeatWrapping)),R!==void 0&&T.offset.fromArray(R),I!==void 0&&(I[0]==="repeat"&&(T.wrapS=c.RepeatWrapping),I[0]==="mirror"&&(T.wrapS=c.MirroredRepeatWrapping),I[1]==="repeat"&&(T.wrapT=c.RepeatWrapping),I[1]==="mirror"&&(T.wrapT=c.MirroredRepeatWrapping)),S!==void 0&&(T.anisotropy=S);var F=c.MathUtils.generateUUID();return M[F]=T,F}var M={},A={uuid:c.MathUtils.generateUUID(),type:"MeshLambertMaterial"};for(var _ in h){var w=h[_];switch(_){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":A.name=w;break;case"blending":A.blending=d[w];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",_,"is no longer supported.");break;case"colorDiffuse":A.color=p.fromArray(w).getHex();break;case"colorSpecular":A.specular=p.fromArray(w).getHex();break;case"colorEmissive":A.emissive=p.fromArray(w).getHex();break;case"specularCoef":A.shininess=w;break;case"shading":w.toLowerCase()==="basic"&&(A.type="MeshBasicMaterial"),w.toLowerCase()==="phong"&&(A.type="MeshPhongMaterial"),w.toLowerCase()==="standard"&&(A.type="MeshStandardMaterial");break;case"mapDiffuse":A.map=v(w,h.mapDiffuseRepeat,h.mapDiffuseOffset,h.mapDiffuseWrap,h.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":A.emissiveMap=v(w,h.mapEmissiveRepeat,h.mapEmissiveOffset,h.mapEmissiveWrap,h.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":A.lightMap=v(w,h.mapLightRepeat,h.mapLightOffset,h.mapLightWrap,h.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":A.aoMap=v(w,h.mapAORepeat,h.mapAOOffset,h.mapAOWrap,h.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":A.bumpMap=v(w,h.mapBumpRepeat,h.mapBumpOffset,h.mapBumpWrap,h.mapBumpAnisotropy);break;case"mapBumpScale":A.bumpScale=w;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":A.normalMap=v(w,h.mapNormalRepeat,h.mapNormalOffset,h.mapNormalWrap,h.mapNormalAnisotropy);break;case"mapNormalFactor":A.normalScale=w;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":A.specularMap=v(w,h.mapSpecularRepeat,h.mapSpecularOffset,h.mapSpecularWrap,h.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":A.metalnessMap=v(w,h.mapMetalnessRepeat,h.mapMetalnessOffset,h.mapMetalnessWrap,h.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":A.roughnessMap=v(w,h.mapRoughnessRepeat,h.mapRoughnessOffset,h.mapRoughnessWrap,h.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":A.alphaMap=v(w,h.mapAlphaRepeat,h.mapAlphaOffset,h.mapAlphaWrap,h.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":A.side=c.BackSide;break;case"doubleSided":A.side=c.DoubleSide;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),A.opacity=w;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":A[_]=w;break;case"vertexColors":w===!0&&(A.vertexColors=c.VertexColors),w==="face"&&(A.vertexColors=c.FaceColors);break;default:console.error("THREE.Loader.createMaterial: Unsupported",_,w)}}return A.type==="MeshBasicMaterial"&&delete A.emissive,A.type!=="MeshPhongMaterial"&&delete A.specular,1>A.opacity&&(A.transparent=!0),m.setTextures(M),m.parse(A)}}()})},(o,l,u)=>{var c=u(4);l.VideoHandler=function(f){var d=this;this.video=void 0,this.videoTexture=void 0,this.setMorphTime=function(p,g){var m=p/g*d.video.duration;d.video.currentTime=m},this.getVideoDuration=function(){return d.video.duration},this.createCanvasVideoTexture=function(){return d.videoTexture=new c.VideoTexture(d.video),d.videoTexture.minFilter=c.LinearFilter,d.videoTexture.magFilter=c.LinearFilter,d.videoTexture.format=c.RGBFormat,d.video.currentTime=0,d.videoTexture},this.getCurrentTime=function(p){return d.video?p*(d.video.currentTime/d.video.duration):0},this.isReadyToPlay=function(){return!!(d.video&&3<=d.video.readyState)},function(){document&&(d.video=document.createElement("video"),d.video.crossOrigin="anonymous",d.video.src=f,d.video.load(),d.video.loop=!0)}()}},(o,l,u)=>{var c=u(4),f=u(23).Points,d=u(5).toBufferGeometry,p=u(5).getCircularTexture,g=u(17).Label,m=function(){u(10).ZincObject.call(this),this.isPointset=!0;var h=[],b=1,y=!1,v=500,M=!0;this.createMesh=(w,C,P)=>{if(w&&C){var R=d(w,P),I=p();C.map=I;var S=new f(R,C);this.setMesh(S,P.localTimeEnabled,P.localMorphColour)}};var A=(w,C,P,R)=>{if(P){var I=new c.Color(R),S=new g(P,I);S.setPosition(C[0],C[1],C[2]);var T=S.getSprite();T.material.sizeAttenuation=!1,T.material.alphaTest=.5,T.material.transparent=!0,T.material.depthWrite=!1,T.material.depthTest=y,S.setFontWeight(v),S.setSize(b),S.setVisibility(M),this.group.add(T),h[w]=S}},_=w=>{var C=h[w];if(C){var P=C.getSprite();this.group.remove(P),C.dispose(),h.splice(w,1)}};this.addPoints=(w,C,P)=>{if(w&&0<w.length){var R=this.drawRange;R===-1&&(R=0);var I=this.addVertices(w),S=this.getMorph();if(!S){var T=new c.PointsMaterial({alphaTest:.5,size:10,color:P,sizeAttenuation:!1}),E={localTimeEnabled:!1,localMorphColour:!1};I.colorsNeedUpdate=!0,this.createMesh(I,T,E)}var L=R+w.length,F=0;if(Array.isArray(C)&&C.length===w.length||typeof C=="string")for(h.length,R;R+F<L;){var x=typeof C=="string"?C:C[F];A(R+F,w[F],x,this._lod._material.color),F++}this.region&&(this.region.pickableUpdateRequired=!0)}},this.setColourHex=function(w){this._lod._material.color.setHex(w),this._lod._secondaryMaterial&&this._lod._secondaryMaterial.color.setHex(w);for(var C=0;C<h.length;C++)h[C]&&h[C].setColour(this._lod._material.color)},this.setColour=w=>{this._lod.setColour(w);for(var C=0;C<h.length;C++)h[C]&&h[C].setColour(this._lod._material.color)},this.setLabelDepthTest=w=>{y=w;for(var C=0;C<h.length;C++)h[C]&&h[C].setDepthTest(w)},this.setLabelFontWeight=w=>{v=w;for(var C=0;C<h.length;C++)h[C]&&h[C].setFontWeight(w)},this.setLabelSize=w=>{b=w;for(var C=0;C<h.length;C++)h[C]&&h[C].setSize(b)},this.displayLabels=w=>{M=w;for(var C=0;C<h.length;C++)h[C]&&h[C].setVisibility(M)},this.setSize=w=>{this.morph&&this.morph.material&&(this.morph.material.size=w,this.morph.material.needsUpdate=!0)},this.setSizeAttenuation=w=>{this.morph&&this.morph.material&&(this.morph.material.sizeAttenuation=w,this.morph.material.needsUpdate=!0)},this.getVerticesByIndex=function(w){if(0<=w&&this.drawRange>w){var C=this.getMorph().geometry.getAttribute("position");return[C.getX(w),C.getY(w),C.getZ(w)]}},this.editVertices=function(w,C){if(w&&w.length){var P=this.getMorph(),R=C+w.length-1;if(!P||0>C||R>=this.drawRange)return;var I=P.geometry.getAttribute("position"),S=C;w.forEach(T=>{var E=h[S];E&&E.setPosition(T[0],T[1],T[2]),I.setXYZ(S++,T[0],T[1],T[2])}),I.needsUpdate=!0,P.geometry.computeBoundingBox(),P.geometry.computeBoundingSphere(),this.boundingBoxUpdateRequired=!0}},this.deleteVertices=function(w){var C=m.prototype.deleteVertices.call(this,w);return C&&_(w),this.drawRange},this.setName=function(w){var C=this.groupName;m.prototype.setName.call(this,w),h.forEach(P=>{P.getString()===C&&(P==null||P.setText(w))})},this.render=(w,C,P,R)=>{this.morph&&P&&(this.morph.sizePerPixel=P.pixelHeight),m.prototype.render.call(this,w,C,P,R)}};m.prototype=Object.create(u(10).ZincObject.prototype),l.Pointset=m},(o,l,u)=>{u.r(l),u.d(l,{Points:()=>b});var c=u(4),f=new c.Matrix4,d=new c.Ray,p=new c.Sphere,g=new c.Vector3,m=new c.Vector3,h=new c.Vector3;class b extends c.Object3D{constructor(){var A=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new c.BufferGeometry,_=1<arguments.length&&arguments[1]!==void 0?arguments[1]:new c.PointsMaterial;super(),this.type="Points",this.geometry=A,this.material=_,this.sizePerPixel=1,this.updateMorphTargets()}copy(A){return super.copy(A),this.material=A.material,this.geometry=A.geometry,this}raycast(A,_){var w=this.geometry,C=this.matrixWorld,P=A.params.Points.threshold,R=w.drawRange;if(w.boundingSphere===null&&w.computeBoundingSphere(),p.copy(w.boundingSphere),p.applyMatrix4(C),p.radius+=P,A.ray.intersectsSphere(p)!==!1){f.copy(C).invert(),d.copy(A.ray).applyMatrix4(f);var I=P/((this.scale.x+this.scale.y+this.scale.z)/3)*this.material.size*this.sizePerPixel,S=I*I;if(w.isBufferGeometry){var T=w.index,E=w.attributes,L=E.position,F=w.morphAttributes.position;if(T!==null)for(var x,O=Math.max(0,R.start),B=Math.min(T.count,R.start+R.count),N=O;N<B;N++)x=T.getX(N),v(this,L,F,x),y(g,x,S,C,A,_,this);else for(var k=Math.max(0,R.start),z=Math.min(L.count,R.start+R.count),G=k;G<z;G++)v(this,L,F,G),y(g,G,S,C,A,_,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}updateMorphTargets(){var A=this.geometry;if(A.isBufferGeometry){var _=A.morphAttributes,w=Object.keys(_);if(0<w.length){var C=_[w[0]];if(C!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var P,R=0,I=C.length;R<I;R++)P=C[R].name||R+"",this.morphTargetInfluences.push(0),this.morphTargetDictionary[P]=R}}}else{var S=A.morphTargets;S!==void 0&&0<S.length&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}b.prototype.isPoints=!0;function y(M,A,_,w,C,P,R){var I=d.distanceSqToPoint(M);if(I<_){var S=new c.Vector3;d.closestPointToPoint(M,S),S.applyMatrix4(w);var T=C.ray.origin.distanceTo(S);if(T<C.near||T>C.far)return;P.push({distance:T,distanceToRay:Math.sqrt(I),point:S,index:A,face:null,object:R})}}function v(M,A,_,w){g.fromBufferAttribute(A,w);var C=M.morphTargetInfluences;if(M.material.morphTargets&&_&&C){m.set(0,0,0);for(var P=0,R=_.length;P<R;P++){var I=C[P],S=_[P];I!==0&&(h.fromBufferAttribute(S,w),m.addScaledVector(h.sub(g),I))}g.add(m)}}},(o,l,u)=>{var c=u(4),f=u(5).toBufferGeometry,d=function(){u(10).ZincObject.call(this),this.isLines=!0,this.createLineSegment=(p,g,m)=>{if(p&&g){var h=f(p,m);m.localMorphColour&&h.morphAttributes.color&&(g.onBeforeCompile=u(9).augmentMorphColor());var b=new(u(12)).LineSegments(h,g);this.setMesh(b,m.localTimeEnabled,m.localMorphColour)}},this.setWidth=p=>{this.morph&&this.morph.material&&(this.morph.material.linewidth=p,this.morph.material.needsUpdate=!0)},this.addLines=(p,g)=>{if(p&&0<p.length){var m=this.addVertices(p),h=this.getMorph();if(!h){var b=new c.LineBasicMaterial({color:g});m.colorsNeedUpdate=!0,this.createLineSegment(m,b,{localTimeEnabled:!1,localMorphColour:!1})}this.region&&(this.region.pickableUpdateRequired=!0)}}};d.prototype=Object.create(u(10).ZincObject.prototype),l.Lines=d},(o,l,u)=>{function c(g,m,h,b,y,v,M){try{var A=g[v](M),_=A.value}catch(w){return void h(w)}A.done?m(_):Promise.resolve(_).then(b,y)}function f(g){return function(){var m=this,h=arguments;return new Promise(function(b,y){function v(_){c(A,b,y,v,M,"next",_)}function M(_){c(A,b,y,v,M,"throw",_)}var A=g.apply(m,h);v(void 0)})}}var d=u(4),p=function(){var g=this;u(26).Texture.call(this),this.isTextureArray=!0,this.loadFromImages=function(){var m=f(function*(h){var b=1,y=1,v=0;if(h&&h.length){g.isLoading=!0;var M=new Image;M.crossOrigin="Anonymous";for(var A,_=document.createElement("canvas"),w=0,C=Array(h.length),P=0;P<h.length;P++)A=yield g.imageToUint8Array(g,M,h[P],_),A&&A.array&&(b=A.width,y=A.height,C[v]=A.array,w+=C[v].length,v++);var R=new Uint8Array(w);w=0,C.forEach(I=>{R.set(I,w),w+=I.length}),g.impl=new d.DataTexture2DArray(R,b,y,v),g.size={width:b,height:y,depth:v},g.isLoading=!1,g.impl.needsUpdate=!0}});return function(){return m.apply(this,arguments)}}(),this.getMaterial=m=>{if(this.impl){var h;if(!m)h=new d.MeshBasicMaterial({color:new d.Color(1,1,1),transparent:!1,opacity:1,map:this.impl,side:d.DoubleSide});else if(m.vs&&m.fs){var b=!0;"transparent"in m&&(b=m.transparent);var y=d.FrontSide;m.side&&(y=m.side),h=new d.ShaderMaterial({transparent:b,uniforms:m.uniforms,vertexShader:m.vs,fragmentShader:m.fs,side:y}),m.glslVersion&&(h.glslVersion=m.glslVersion)}if(h)return h.needsUpdate=!0,h}}};p.prototype=Object.create(u(26).Texture.prototype),l.TextureArray=p},(o,l,u)=>{function c(g,m,h,b,y,v,M){try{var A=g[v](M),_=A.value}catch(w){return void h(w)}A.done?m(_):Promise.resolve(_).then(b,y)}function f(g){return function(){var m=this,h=arguments;return new Promise(function(b,y){function v(_){c(A,b,y,v,M,"next",_)}function M(_){c(A,b,y,v,M,"throw",_)}var A=g.apply(m,h);v(void 0)})}}var d=u(4),p=function(){this.isTexture=!0,this.impl=void 0,this.isLoading=!1,this.size={width:1,height:1,depth:0}};p.prototype.loadImage=function(g,m){return new Promise((h,b)=>{g.onload=()=>h(g),g.onerror=b,g.src=m})},p.prototype.imageToUint8Array=function(){var g=f(function*(m,h,b,y){yield m.loadImage(h,b),y.width=h.width,y.height=h.height;var v=y.getContext("2d");return v.drawImage(h,0,0),{array:new Uint8Array(v.getImageData(0,0,y.width,y.height).data.buffer),width:y.width,height:y.height}});return function(){return g.apply(this,arguments)}}(),p.prototype.loadFromImages=function(){var g=f(function*(){});return function(){return g.apply(this,arguments)}}(),p.prototype.isReady=function(){return!(!this.impl||this.isLoading)},p.prototype.getMaterial=function(){if(this.impl)return new d.MeshBasicMaterial({color:new d.Color(1,1,1),transparent:!1,opacity:1,map:this.impl,side:d.DoubleSide})},l.Texture=p},(o,l,u)=>{function c(y,v){var M=Object.keys(y);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(y);v&&(A=A.filter(function(_){return Object.getOwnPropertyDescriptor(y,_).enumerable})),M.push.apply(M,A)}return M}function f(y){for(var v,M=1;M<arguments.length;M++)v=arguments[M]==null?{}:arguments[M],M%2?c(Object(v),!0).forEach(function(A){d(y,A,v[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(v)):c(Object(v)).forEach(function(A){Object.defineProperty(y,A,Object.getOwnPropertyDescriptor(v,A))});return y}function d(y,v,M){return(v=p(v))in y?Object.defineProperty(y,v,{value:M,enumerable:!0,configurable:!0,writable:!0}):y[v]=M,y}function p(y){var v=g(y,"string");return typeof v=="symbol"?v:v+""}function g(y,v){if(typeof y!="object"||!y)return y;var M=y[Symbol.toPrimitive];if(M!==void 0){var A=M.call(y,v);if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(y)}var m=u(4),h=u(28),b=function(y){u(29).TexturePrimitive.call(this,y),this.isTextureSlides=!0;var v=[],M={};this.morph=new m.Group,this.group=this.morph,this.morph.userData=this;var A=void 0,_=!0,w=0,C=1,P=!0;this.createSlides=S=>{S.forEach(T=>this.createSlide(T))};var R=(S,T)=>{var E=S.material,L=E.uniforms;switch(S.rotation.x=0,S.rotation.y=0,S.rotation.z=0,S.position.x=0,S.position.y=0,S.position.z=0,T.direction){case"x":var F=-Math.PI/2;S.rotation.y=F,L.direction.value=1,L.slide.value.set(T.value,0,0),S.position.x=T.value;break;case"y":S.rotation.x=Math.PI/2,L.direction.value=2,L.slide.value.set(0,T.value,0),S.position.y=T.value;break;case"z":L.direction.value=3,L.slide.value.set(0,0,T.value),S.position.z=T.value;break}E.needsUpdate=!0,this.boundingBoxUpdateRequired=!0};this.modifySlideSettings=S=>{S&&S.id&&S.id in M&&M[S.id]&&R(M[S.id],S)},this.createSlide=S=>{if(this.texture&&this.texture.isTextureArray&&this.texture.isReady()&&S&&S.direction&&S.value!==void 0){var T=new m.PlaneGeometry(1,1);T.translate(.5,.5,0);var E=h.getUniforms();E.brightness.value=w,E.contrast.value=C,E.diffuse.value=this.texture.impl,E.discardAlpha.value=P,E.depth.value=this.texture.size.depth,E.flipY.value=_;var L={fs:h.fs,vs:h.vs,uniforms:E,glslVersion:h.glslVersion,side:m.DoubleSide,transparent:!1},F=this.texture.getMaterial(L);F.needsUpdate=!0;var x=new m.Mesh(T,F);x.name=this.groupName,x.userData=this;var O={value:S.value,direction:S.direction,id:x.id};return v.push(O),R(x,O),M[x.id]=x,this.morph.add(x),this.boundingBoxUpdateRequired=!0,O}},this.getTextureSettings=()=>[...v],this.getTextureSettingsWithId=S=>{for(var T=0;T<v.length;T++)if(S===v[T].id)return f({},v[T])},this.getSlides=()=>this.morph?[...this.morph.children]:[],this.removeSlide=S=>{S&&this.removeSlideWithId(S.id)},this.removeSlideWithId=S=>{if(this.morph&&S in M&&M[S]){if(this.morph.getObjectById(S)){var T=M[S];this.morph.remove(T),T.clear(),T.geometry&&T.geometry.dispose(),T.material&&T.material.dispose(),this.boundingBoxUpdateRequired=!0}var E=v.findIndex(L=>L.id===S);-1<E&&v.splice(E,1)}},this.dispose=()=>{this.morph.children.forEach(S=>{S.geometry&&S.geometry.dispose(),S.material&&S.material.dispose()}),u(29).TexturePrimitive.prototype.dispose.call(this),this.boundingBoxUpdateRequired=!0};var I=(S,T,E)=>{if(T)switch(T.direction.value){case 1:E.copy(T.slide.value),S.expandByPoint(E),E.setY(1),E.setZ(1),S.expandByPoint(E);break;case 2:E.copy(T.slide.value),S.expandByPoint(E),E.setX(1),E.setZ(1),S.expandByPoint(E);break;case 3:E.copy(T.slide.value),S.expandByPoint(E),E.setX(1),E.setY(1),S.expandByPoint(E);break}};this.getBoundingBox=()=>{if(this.morph&&this.morph.children&&this.morph.visible&&this.boundingBoxUpdateRequired){this.cachedBoundingBox.makeEmpty();var S=new m.Vector3(0,0,0);this.morph.children.forEach(T=>{I(this.cachedBoundingBox,T.material.uniforms,S)}),this.morph.updateMatrixWorld(!0,!0),this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld),this.boundingBoxUpdateRequired=!1}return this.cachedBoundingBox},this.applyTransformation=(S,T,E)=>{var L=new m.Matrix4;L.set(S[0],S[1],S[2],0,S[3],S[4],S[5],0,S[6],S[7],S[8],0,0,0,0,0);var F=new m.Quaternion().setFromRotationMatrix(L);this.morph.position.set(...T),this.morph.quaternion.copy(F),this.morph.scale.set(...E),this.morph.updateMatrix(),this.boundingBoxUpdateRequired=!0},this.setRenderOrder=S=>{this.morph.renderOrder=S},this.initialise=(S,T)=>{if(S){var E=S.locations;E&&0<E.length&&(this.applyTransformation(E[0].orientation,E[0].position,E[0].scale),"flipY"in E[0]&&(_=E[0].flipY)),this.createSlides(S.settings.slides),T!=null&&typeof T=="function"&&T(this)}},this.showEdges=S=>{if(A)A.material.color=S;else{var T=new m.BoxGeometry(1,1,1);T.translate(.5,.5,.5);var E=new m.EdgesGeometry(T);A=new m.LineSegments(E,new m.LineBasicMaterial({color:S})),this.group.add(A)}A.visible=!0},this.isAlphaPixelDiscarded=()=>P,this.discardAlphaPixel=S=>{P=S,this.morph.children.forEach(T=>{var E=T.material;if(E.type==="ShaderMaterial"){var L=E.uniforms;L.discardAlpha.value=P,E.needsUpdate=!0}})},this.getBrightness=()=>w,this.setBrightness=S=>{w=S,this.morph.children.forEach(T=>{var E=T.material;if(E.type==="ShaderMaterial"){var L=E.uniforms;L.brightness.value=w,E.needsUpdate=!0}})},this.getContrast=()=>C,this.setContrast=S=>{0<=C&&(C=S,this.morph.children.forEach(T=>{var E=T.material;if(E.type==="ShaderMaterial"){var L=E.uniforms;L.contrast.value=C,E.needsUpdate=!0}}))},this.hideEdges=()=>{A&&(A.visible=!1)}};b.prototype=Object.create(u(29).TexturePrimitive.prototype),b.prototype.constructor=b,l.TextureSlides=b},(o,l,u)=>{var c=u(4),f=c.GLSL3,d=`
3185
3185
  precision highp float;
3186
3186
  precision highp int;
3187
3187
  precision highp sampler2DArray;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/scaffoldvuer",
3
- "version": "1.15.2",
3
+ "version": "1.15.4",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -53,7 +53,7 @@
53
53
  "unplugin-vue-components": "^0.26.0",
54
54
  "vue": "^3.4.21",
55
55
  "vue-router": "^4.2.5",
56
- "zincjs": "1.18.7"
56
+ "zincjs": "1.18.8"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@babel/eslint-parser": "^7.28.0",