!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("three")):"function"==typeof define&&define.amd?define(["exports","three"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).VueGL={},t.THREE)}(this,(function(t,e){"use strict";function i(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function n(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var n,r,s=[],o=!0,a=!1;try{for(i=i.call(t);!(o=(n=i.next()).done)&&(s.push(n.value),!e||s.length!==e);o=!0);}catch(t){a=!0,r=t}finally{try{o||null==i.return||i.return()}finally{if(a)throw r}}return s}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||a(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return u(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var h,l,d,c="add",m="remove",f="change",p="inst",g="name",y="image",b="fog",v="overrideMaterial",w="environment",N="background",S="mapping",x="wrapS",$="wrapT",A="magFilter",M="minFilter",D="anisotropy",V="format",P="type",L="offsetU",O="offsetV",j="repeatU",k="repeatV",T="rotation",C="centerU",G="centerV",I="premultiplyAlpha",_="unpackAlignment",B="encoding",R="noFlipY",E="color",U="near",z="far",F="alpha",Y="noPremultipliedAlpha",X="antialias",H="noStencil",q="preserveDrawingBuffer",Z="noDepth",W="logarithmicDepthBuffer",K="shadowMapEnabled",Q="precision",J="camera",tt="scene",et="material",it="geometry",nt="map",rt="alphaMap",st="fragmentShader",ot="uniforms",at="vertexShader",ut="wireframe",ht="size",lt="noSizeAttenuation",dt="clearcoat",ct="clearcoatRoughness",mt="reflectivity",ft="specular",pt="shininess",gt="side",yt="vertexColors",bt="defines",vt="linewidth",wt="dashSize",Nt="gapSize",St="linecap",xt="linejoin",$t="distance",At="decay",Mt="angle",Dt="penumbra",Vt="target",Pt="width",Lt="height",Ot="intensity",jt="groundColor",kt="light",Tt="radius",Ct="radials",Gt="circles",It="divisions",_t="color1",Bt="color2",Rt="colorCenterLine",Et="colorGrid",Ut="object",zt="directionX",Ft="directionY",Yt="directionZ",Xt="length",Ht="headLength",qt="headWidth",Zt="tube",Wt="radialSegments",Kt="tubularSegments",Qt="text",Jt="depth",te="curveSegments",ee="steps",ie="bevelEnabled",ne="bevelThickness",re="bevelSize",se="bevelOffset",oe="bevelSegments",ae="extrudePath",ue="uvGenerator",he="font",le="detail",de="widthSegments",ce="heightSegments",me="phiStart",fe="phiLength",pe="thetaStart",ge="thetaLength",ye="shapes",be="phiSegments",ve="thetaSegments",we="outerRadius",Ne="innerRadius",Se="vertices",xe="indices",$e="points",Ae="segments",Me="radiusTop",De="radiusBottom",Ve="openEnded",Pe="depthSegments",Le="holes",Oe="data",je="autoClose",ke="position",Te="positionX",Ce="positionY",Ge="positionZ",Ie="positionRadius",_e="positionPhi",Be="positionTheta",Re="rotationX",Ee="rotationY",Ue="rotationZ",ze="rotationW",Fe="rotationOrder",Ye="lookAtX",Xe="lookAtY",He="lookAtZ",qe="scaleX",Ze="scaleY",We="scaleZ",Ke="castShadow",Qe="receiveShadow",Je="hidden",ti="drawRangeStart",ei="drawRangeCount",ii="groups",ni="normalized",ri="itemSize",si="usage",oi="array",ai="zoom",ui="aspect",hi="left",li="right",di="bottom",ci="euler",mi="quaternion",fi="lookAt",pi="rectangular",gi="spherical",yi="xAxisColor",bi="yAxisColor",vi="zAxisColor",wi={inject:{$_vglSlot:{default:{$emit:function(){}}}},created:function(){this.$_vglSlot.$emit(c,this.inst)},beforeDestroy:function(){this.$_vglSlot.$emit(m,this.inst)},beforeUpdate:function(){this.$_vglSlot.$emit(f)},watch:r({},p,(function(t,e){this.$_vglSlot.$emit(m,e),this.$_vglSlot.$emit(c,t)})),methods:r({},f,(function(){this.$_vglSlot.$emit(f)}))},Ni={emits:[c,m,f],provide:function(){return{$_vglSlot:this}},render:function(t){return t("template",this.$slots.default)}},Si={render:function(t){var e=this;return t("template",Object.entries(this.$slots).map((function(i){var n,o=s(i,2),a=o[0],u=o[1];return t(Ni,{key:a,on:(n={},r(n,c,(function(t){return e.add(a,t)})),r(n,m,(function(t){return e.remove(a,t)})),r(n,f,(function(){return e.change(a)})),n)},u)})))}};function xi(t){return t.trim().toUpperCase().split(/\s*/)}var $i,Ai,Mi={mixins:[wi,Si],props:(h={},r(h,ke,{type:String,default:pi,validator:function(t){return[pi,gi].includes(t)}}),r(h,Te,{type:Number,default:0}),r(h,Ce,{type:Number,default:0}),r(h,Ge,{type:Number,default:0}),r(h,Ie,{type:Number,default:1}),r(h,_e,{type:Number,default:0}),r(h,Be,{type:Number,default:0}),r(h,T,{type:String,default:ci,validator:function(t){return[ci,mi,fi].includes(t)}}),r(h,Re,{type:Number,default:0}),r(h,Ee,{type:Number,default:0}),r(h,Ue,{type:Number,default:0}),r(h,ze,{type:Number,default:1}),r(h,Fe,{type:String,default:"XYZ",validator:function(t){return"XYZ"===xi(t).sort().join("")}}),r(h,Ye,{type:Number,default:0}),r(h,Xe,{type:Number,default:0}),r(h,He,{type:Number,default:0}),r(h,qe,{type:Number,default:1}),r(h,Ze,{type:Number,default:1}),r(h,We,{type:Number,default:1}),r(h,Ke,Boolean),r(h,Qe,Boolean),r(h,g,{type:String,default:""}),r(h,Je,Boolean),h),computed:r({},p,(function(){return new e.Object3D})),watch:(l={},r(l,p,(function(t,e){var i=e.position,n=e.rotation,r=e.scale,s=e.castShadow,o=e.receiveShadow,a=e.visible,u=e.name;t.position.copy(i),t.rotation.copy(n),t.scale.copy(r),Object.assign(t,{castShadow:s,receiveShadow:o,visible:a,name:u})})),r(l,g,{handler:function(t){this.inst.name=t},immediate:!0}),r(l,Te,(function(t){this.position===pi&&(this.inst.position.x=t,this.rotation===fi&&this.inst.lookAt(this.lookAtX,this.lookAtY,this.lookAtZ))})),r(l,Ce,(function(t){this.position===pi&&(this.inst.position.y=t,this.rotation===fi&&this.inst.lookAt(this.lookAtX,this.lookAtY,this.lookAtZ))})),r(l,Ge,(function(t){this.position===pi&&(this.inst.position.z=t,this.rotation===fi&&this.inst.lookAt(this.lookAtX,this.lookAtY,this.lookAtZ))})),r(l,Ie,(function(t){this.position===gi&&(this.inst.position.setFromSphericalCoords(t,this.positionPhi,this.positionTheta),this.rotation===fi&&this.inst.lookAt(this.lookAtX,this.lookAtY,this.lookAtZ))})),r(l,_e,(function(t){this.position===gi&&(this.inst.position.setFromSphericalCoords(this.positionRadius,t,this.positionTheta),this.rotation===fi&&this.inst.lookAt(this.lookAtX,this.lookAtY,this.lookAtZ))})),r(l,Be,(function(t){this.position===gi&&(this.inst.position.setFromSphericalCoords(this.positionRadius,this.positionPhi,t),this.rotation===fi&&this.inst.lookAt(this.lookAtX,this.lookAtY,this.lookAtZ))})),r(l,ke,{handler:function(t){t===pi?this.inst.position.set(this.positionX,this.positionY,this.positionZ):this.inst.position.setFromSphericalCoords(this.positionRadius,this.positionPhi,this.positionTheta),this.rotation===fi&&this.inst.lookAt(this.lookAtX,this.lookAtY,this.lookAtZ)},immediate:!0}),r(l,T,{handler:function(t){t===ci?this.inst.rotation.set(this.rotationX,this.rotationY,this.rotationZ,xi(this.rotationOrder).join("")):t===mi?this.inst.quaternion.set(this.rotationX,this.rotationY,this.rotationZ,this.rotationW):this.inst.lookAt(this.lookAtX,this.lookAtY,this.lookAtZ)},immediate:!0}),r(l,Re,(function(t){this.rotation===ci?this.inst.rotation.x=t:this.rotation===mi&&(this.inst.quaternion.x=t)})),r(l,Ee,(function(t){this.rotation===ci?this.inst.rotation.y=t:this.rotation===mi&&(this.inst.quaternion.y=t)})),r(l,Ue,(function(t){this.rotation===ci?this.inst.rotation.z=t:this.rotation===mi&&(this.inst.quaternion.z=t)})),r(l,ze,(function(t){this.rotation===mi&&(this.inst.quaternion.w=t)})),r(l,Fe,(function(t){this.rotation===ci&&(this.inst.rotation.order=xi(t).join(""))})),r(l,Ye,(function(t){this.rotation===fi&&this.inst.lookAt(t,this.lookAtY,this.lookAtZ)})),r(l,Xe,(function(t){this.rotation===fi&&this.inst.lookAt(this.lookAtX,t,this.lookAtZ)})),r(l,He,(function(t){this.rotation===fi&&this.inst.lookAt(this.lookAtX,this.lookAtY,t)})),r(l,qe,{handler:function(t){this.inst.scale.x=t},immediate:!0}),r(l,Ze,{handler:function(t){this.inst.scale.y=t},immediate:!0}),r(l,We,{handler:function(t){this.inst.scale.z=t},immediate:!0}),r(l,Ke,{handler:function(t){this.inst.castShadow=t},immediate:!0}),r(l,Qe,{handler:function(t){this.inst.receiveShadow=t},immediate:!0}),r(l,Je,{handler:function(t){this.inst.visible=!t},immediate:!0}),l),methods:(d={},r(d,c,(function(t,e){"default"===t&&this.inst.add(e)})),r(d,m,(function(t,e){"default"===t&&this.inst.remove(e)})),d),render:void 0},Di={extends:Mi,computed:r({},p,(function(){return new e.Camera}))};function Vi(t,e){var i=Object.assign(t,e);[i.left,i.right,i.top,i.bottom].includes(void 0)||t.updateProjectionMatrix()}var Pi,Li,Oi={extends:Di,props:($i={},r($i,ai,{type:Number,default:1}),r($i,U,{type:Number,default:.1}),r($i,z,{type:Number,default:2e3}),r($i,hi,Number),r($i,li,Number),r($i,"top",Number),r($i,di,Number),$i),computed:r({},p,(function(){return new e.OrthographicCamera})),watch:(Ai={},r(Ai,ai,{handler:function(t){Vi(this.inst,{zoom:t})},immediate:!0}),r(Ai,U,{handler:function(t){Vi(this.inst,{near:t})},immediate:!0}),r(Ai,z,{handler:function(t){Vi(this.inst,{far:t})},immediate:!0}),r(Ai,hi,{handler:function(t){Vi(this.inst,{left:t})},immediate:!0}),r(Ai,li,{handler:function(t){Vi(this.inst,{right:t})},immediate:!0}),r(Ai,"top",{handler:function(t){Vi(this.inst,{top:t})},immediate:!0}),r(Ai,di,{handler:function(t){Vi(this.inst,{bottom:t})},immediate:!0}),Ai)};function ji(t,e){void 0!==Object.assign(t,e).aspect&&t.updateProjectionMatrix()}var ki,Ti,Ci,Gi,Ii,_i,Bi,Ri,Ei,Ui,zi={extends:Di,props:(Pi={},r(Pi,ai,{type:Number,default:1}),r(Pi,U,{type:Number,default:.1}),r(Pi,z,{type:Number,default:2e3}),r(Pi,"fov",{type:Number,default:50}),r(Pi,ui,Number),Pi),computed:r({},p,(function(){return new e.PerspectiveCamera})),watch:(Li={},r(Li,ai,{handler:function(t){ji(this.inst,{zoom:t})},immediate:!0}),r(Li,U,{handler:function(t){ji(this.inst,{near:t})},immediate:!0}),r(Li,z,{handler:function(t){ji(this.inst,{far:t})},immediate:!0}),r(Li,"fov",{handler:function(t){ji(this.inst,{fov:t})},immediate:!0}),r(Li,ui,{handler:function(t){ji(this.inst,{aspect:t})},immediate:!0}),Li)},Fi={extends:Si,beforeCreate:function(){this.$root.$_vglDefs?this.$root.$_vglDefs.defs+=1:this.$root.$_vglDefs={defs:1,use:0,slots:Object.create(null),users:Object.create(null)}},beforeDestroy:function(){this.$root.$_vglDefs.defs-=1,this.$root.$_vglDefs.defs||this.$root.$_vglDefs.use||delete this.$root.$_vglDefs},methods:(ki={},r(ki,c,(function(t,e){this.$root.$_vglDefs.slots[t]?this.$root.$_vglDefs.slots[t].push(e):this.$root.$_vglDefs.slots[t]=[e],this.$root.$_vglDefs.users[t]&&this.$root.$_vglDefs.users[t].forEach((function(t){t.$_vglSlot.$emit(c,e)}))})),r(ki,m,(function(t,e){this.$root.$_vglDefs.users[t]&&this.$root.$_vglDefs.users[t].forEach((function(t){t.$_vglSlot.$emit(m,e)})),this.$root.$_vglDefs.slots[t].splice(this.$root.$_vglDefs.slots[t].indexOf(e),1),this.$root.$_vglDefs.slots[t].length||delete this.$root.$_vglDefs.slots[t]})),r(ki,f,(function(t){this.$root.$_vglDefs.users[t]&&this.$root.$_vglDefs.users[t].forEach((function(t){t.$_vglSlot.$emit(f)}))})),ki),render:void 0},Yi={staticDraw:e.StaticDrawUsage,staticRead:e.StaticReadUsage,staticCopy:e.StaticCopyUsage,dynamicDraw:e.DynamicDrawUsage,dynamicRead:e.DynamicReadUsage,dynamicCopy:e.DynamicCopyUsage,streamDraw:e.StreamDrawUsage,streamRead:e.StreamReadUsage,streamCopy:e.StreamCopyUsage},Xi={extends:wi,props:(Ti={},r(Ti,oi,{type:Array,default:function(){return[]},validator:function(t){return t.every((function(t){return"number"==typeof t||t instanceof Number}))}}),r(Ti,g,{default:"",type:String}),r(Ti,ni,Boolean),r(Ti,ri,{required:!0,type:Number,validator:Number.isInteger}),r(Ti,si,{default:"staticDraw",type:String,validator:function(t){return t in Yi}}),Ti),computed:(Ci={},r(Ci,p,(function(){return new e.BufferAttribute(this.typedArray,this.itemSize)})),r(Ci,"arrayLength",(function(){return this.array.length})),Ci),watch:(Gi={},r(Gi,oi,{handler:function(t){this.inst.set(t)},immediate:!0}),r(Gi,ni,{handler:function(t){this.inst.normalized=t},immediate:!0}),r(Gi,si,{handler:function(t){this.inst.setUsage(Yi[t])},immediate:!0}),r(Gi,g,{handler:function(t){this.inst.name=t},immediate:!0}),r(Gi,p,(function(t,e){var i=e.name,n=e.normalized,r=e.usage;Object.assign(t,{name:i,normalized:n}).setUsage(r)})),Gi),render:function(){}},Hi={extends:Xi,computed:{typedArray:function(){return new Float32Array(this.arrayLength)}}},qi={extends:Xi,computed:{typedArray:function(){return new Float64Array(this.arrayLength)}}},Zi={mixins:[wi,Si],props:(Ii={},r(Ii,g,{type:String,default:""}),r(Ii,ti,{type:Number,default:0,validator:Number.isInteger}),r(Ii,ei,{type:Number,default:1/0,validator:function(t){return Number.isInteger(t)||t===1/0}}),r(Ii,ii,{type:Array,default:function(){return[]},validator:function(t){return t.every((function(t){return[t.start,t.count,t.materialIndex].every(Number.isInteger)}))}}),Ii),computed:(_i={},r(_i,p,(function(){return new e.BufferGeometry})),r(_i,"drawRange",(function(){return[this.drawRangeStart,this.drawRangeCount]})),_i),beforeDestroy:function(){this.inst.dispose()},watch:(Bi={},r(Bi,g,{handler:function(t){this.inst.name=t},immediate:!0}),r(Bi,ii,{handler:function(t){var e=this;this.inst.clearGroups(),t.forEach((function(t){var i=t.start,n=t.count,r=t.materialIndex;e.inst.addGroup(i,n,r)}))},immediate:!0}),r(Bi,p,(function(t,e){var i=e.name,n=e.drawRange,r=e.groups;Object.assign(t,{name:i}).setDrawRange(n.start,n.count),r.forEach((function(e){var i=e.start,n=e.count,r=e.materialIndex;t.addGroup(i,n,r)})),e.dispose()})),r(Bi,"drawRange",{handler:function(t){var e;(e=this.inst).setDrawRange.apply(e,o(t))},immediate:!0}),Bi),methods:(Ri={},r(Ri,c,(function(t,e){this.inst.setAttribute(t,e)})),r(Ri,m,(function(t,e){this.inst.getAttribute(t)===e&&this.inst.deleteAttribute(t)})),Ri),render:void 0},Wi={extends:Xi,computed:{typedArray:function(){return new Int8Array(this.arrayLength)}}},Ki={extends:Xi,computed:{typedArray:function(){return new Int16Array(this.arrayLength)}}},Qi={extends:Xi,computed:{typedArray:function(){return new Int32Array(this.arrayLength)}}},Ji={extends:Xi,computed:{typedArray:function(){return new Uint8Array(this.arrayLength)}}},tn={extends:Xi,computed:{typedArray:function(){return new Uint8ClampedArray(this.arrayLength)}}},en={extends:Xi,computed:{typedArray:function(){return new Uint16Array(this.arrayLength)}}},nn={extends:Xi,computed:{typedArray:function(){return new Uint32Array(this.arrayLength)}}},rn={inject:{$_vglSlot:{default:{$emit:function(){}}}},props:{href:{type:String,required:!0}},watch:{href:{handler:function(t,e){var i=this;void 0!==e&&(this.$root.$_vglDefs.slots[e]&&this.$root.$_vglDefs.slots[e].forEach((function(t){i.$_vglSlot.$emit(m,t)})),this.$root.$_vglDefs.users[e].splice(this.$root.$_vglDefs.users[e].indexOf(this),1),this.$root.$_vglDefs.users[e].length||delete this.$root.$_vglDefs.users[e]),this.$root.$_vglDefs.users[t]?this.$root.$_vglDefs.users[t].push(this):this.$root.$_vglDefs.users[t]=[this],this.$root.$_vglDefs.slots[t]&&this.$root.$_vglDefs.slots[t].forEach((function(t){i.$_vglSlot.$emit(c,t)}))},immediate:!0}},beforeCreate:function(){this.$root.$_vglDefs?this.$root.$_vglDefs.use+=1:this.$root.$_vglDefs={defs:0,use:1,slots:Object.create(null),users:Object.create(null)}},beforeDestroy:function(){var t=this;this.$root.$_vglDefs.slots[this.href]&&this.$root.$_vglDefs.slots[this.href].forEach((function(e){t.$_vglSlot.$emit(m,e)})),this.$root.$_vglDefs.users[this.href].splice(this.$root.$_vglDefs.users[this.href].indexOf(this),1),this.$root.$_vglDefs.users[this.href].length||delete this.$root.$_vglDefs.users[this.href],this.$root.$_vglDefs.use-=1,this.$root.$_vglDefs.defs||this.$root.$_vglDefs.use||delete this.$root.$_vglDefs},render:function(){}},sn={extends:wi,props:r({},"src",{type:String,default:""}),computed:r({},p,(function(){var t=this,e=document.createElement("img");return e.addEventListener("load",(function(){t.$_vglSlot.$emit(f)}),!1),e})),watch:r({},"src",{handler:function(t){this.inst.src=t},immediate:!0}),render:function(){}},on={extends:wi,computed:r({},p,(function(){return new e.Curve})),render:function(){}},an={extends:on,props:r({},je,Boolean),computed:r({},p,(function(){return new e.CurvePath})),watch:(Ei={},r(Ei,p,(function(t,e){var i=e.autoClose;Object.assign(t,{autoClose:i})})),r(Ei,je,{handler:function(t){this.inst.autoClose=t},immediate:!0}),Ei)},un={extends:wi,props:r({},Oe,Object),computed:r({},p,(function(){return new e.Font(this.data)})),render:function(){}};function hn(t,e){return t.reduce((function(t,i,n){return n%e?t[Math.floor(n/e)].push(i):t.push([i]),t}),[])}var ln={M:function(t,e){t.moveTo(e[e.length-2],e[e.length-1])},m:function(t,e){t.moveTo.apply(t,o(hn(e,2).reduce((function(t,e){var i=s(t,2),n=i[0],r=i[1],o=s(e,2);return[n+o[0],r+o[1]]}),t.currentPoint.toArray())))},L:function(t,e){hn(e,2).forEach((function(e){var i=s(e,2),n=i[0],r=i[1];t.lineTo(n,r)}))},l:function(t,e){hn(e,2).forEach((function(e){var i=s(e,2),n=i[0],r=i[1];t.lineTo(t.currentPoint.x+n,t.currentPoint.y+r)}))},H:function(t,e){e.forEach((function(e){t.lineTo(e,t.currentPoint.y)}))},h:function(t,e){e.forEach((function(e){t.lineTo(t.currentPoint.x+e,t.currentPoint.y)}))},V:function(t,e){e.forEach((function(e){t.lineTo(t.currentPoint.x,e)}))},v:function(t,e){e.forEach((function(e){t.lineTo(t.currentPoint.x,t.currentPoint.y+e)}))},Q:function(t,e){var i=hn(e,4);i.forEach((function(e){var i=s(e,4),n=i[0],r=i[1],o=i[2],a=i[3];t.quadraticCurveTo(n,r,o,a)}));var n=s(i[i.length-1],2);return{cpX:n[0],cpY:n[1]}},q:function(t,e){var i=hn(e,4);i.forEach((function(e){var i=s(e,4),n=i[0],r=i[1],o=i[2],a=i[3],u=t.currentPoint,h=u.x,l=u.y;t.quadraticCurveTo(h+n,l+r,h+o,l+a)}));var n=s(i[i.length-1],4),r=n[0],o=n[1],a=n[2],u=n[3];return{cpX:t.currentPoint.x-a+r,cpY:t.currentPoint.y-u+o}},T:function(t,e,i){var n=i||{cpX:t.currentPoint.x,cpY:t.currentPoint.y},r=n.cpX,o=n.cpY;return hn(e,2).forEach((function(e){var i=s(e,2),n=i[0],a=i[1];r=2*t.currentPoint.x-r,o=2*t.currentPoint.y-o,t.quadraticCurveTo(r,o,n,a)})),{cpX:r,cpY:o}},t:function(t,e,i){var n=i||{cpX:t.currentPoint.x,cpY:t.currentPoint.y},r=n.cpX,o=n.cpY;return hn(e,2).forEach((function(e){var i=s(e,2),n=i[0],a=i[1];r=2*t.currentPoint.x-r,o=2*t.currentPoint.y-o,t.quadraticCurveTo(r,o,t.currentPoint.x+n,t.currentPoint.y+a)})),{cpX:r,cpY:o}}},dn=Object.keys(ln).join("");function cn(t){return t.length?t.match(new RegExp("[".concat(dn,"][^").concat(dn,"]*"),"g")).map((function(t){return[t[0],t.slice(1).trim().split(/\s*,\s*|\s+/).map(parseFloat)]})):[]}var mn,fn,pn,gn,yn,bn,vn,wn,Nn={extends:an,props:r({},"d",{type:String,default:"",validator:function(t){var e=t.trim();return!e.length||!!dn.includes(e[0])&&cn(t).every((function(t){var e=s(t,2),i=e[0],n=e[1];return!n.some(Number.isNaN)&&("MmLlTt".includes(i)?!(n.length%2):!"Qq".includes(i)||!(n.length%4))}))}}),computed:(Ui={},r(Ui,p,(function(){return this.path(new e.Path)})),r(Ui,"path",(function(){var t=cn(this.d);return function(e){var i;return t.forEach((function(t){var n=s(t,2),r=n[0],o=n[1];i=ln[r](e,o,i)})),e}})),Ui)},Sn={mixins:[Nn,Si],computed:r({},p,(function(){return this.path(new e.Shape)})),watch:r({},p,(function(t,e){var i=e.holes;Object.assign(t,{holes:i})})),methods:(mn={},r(mn,c,(function(t,e){t===Le&&this.inst.holes.push(e)})),r(mn,m,(function(t,e){t===Le&&this.inst.holes.splice(this.inst.holes.indexOf(e),1)})),mn),render:void 0},xn={extends:Zi,props:(fn={},r(fn,Pt,{type:Number,default:1}),r(fn,Lt,{type:Number,default:1}),r(fn,Jt,{type:Number,default:1}),r(fn,de,{type:Number,default:1,validator:Number.isInteger}),r(fn,ce,{type:Number,default:1,validator:Number.isInteger}),r(fn,Pe,{type:Number,default:1,validator:Number.isInteger}),fn),computed:{inst:function(){return new e.BoxGeometry(this.width,this.height,this.depth,this.widthSegments,this.heightSegments,this.depthSegments)}}},$n={extends:Zi,props:(pn={},r(pn,Tt,{type:Number,default:1}),r(pn,Ae,{type:Number,default:8,validator:Number.isInteger}),r(pn,pe,{type:Number,default:0}),r(pn,ge,{type:Number,default:2*Math.PI}),pn),computed:r({},p,(function(){return new e.CircleGeometry(this.radius,this.segments,this.thetaStart,this.thetaLength)}))},An={extends:Zi,props:(gn={},r(gn,Me,{type:Number,default:1}),r(gn,De,{type:Number,default:1}),r(gn,Lt,{type:Number,default:1}),r(gn,Wt,{type:Number,default:8,validator:Number.isInteger}),r(gn,ce,{type:Number,default:1,validator:Number.isInteger}),r(gn,Ve,Boolean),r(gn,pe,{type:Number,default:0}),r(gn,ge,{type:Number,default:2*Math.PI}),gn),computed:r({},p,(function(){return new e.CylinderGeometry(this.radiusTop,this.radiusBottom,this.height,this.radialSegments,this.heightSegments,this.openEnded,this.thetaStart,this.thetaLength)}))},Mn={extends:An,props:r({},Tt,{type:Number,default:1}),computed:{inst:function(){return new e.ConeGeometry(this.radius,this.height,this.radialSegments,this.heightSegments,this.openEnded,this.thetaStart,this.thetaLength)}}},Dn={extends:Zi,props:(yn={},r(yn,Se,{type:Array,default:function(){return[]},validator:function(t){return t.every((function(t){return"number"==typeof t||t instanceof Number}))}}),r(yn,xe,{type:Array,default:function(){return[]},validator:function(t){return t.every(Number.isInteger)}}),r(yn,Tt,{type:Number,default:1}),r(yn,le,{type:Number,default:0,validator:Number.isInteger}),yn),computed:r({},p,(function(){return new e.PolyhedronGeometry(this.vertices,this.indices,this.radius,this.detail)}))},Vn={extends:Dn,computed:r({},p,(function(){return new e.DodecahedronGeometry(this.radius,this.detail)}))},Pn={extends:Zi,props:(bn={},r(bn,te,{type:Number,default:12,validator:Number.isInteger}),r(bn,ee,{type:Number,default:1,validator:Number.isInteger}),r(bn,Jt,{type:Number,default:50}),r(bn,ie,Boolean),r(bn,ne,{type:Number,default:10}),r(bn,re,Number),r(bn,se,{type:Number,default:0}),r(bn,oe,{type:Number,default:3,validator:Number.isInteger}),r(bn,ue,Object),bn),data:function(){return{shapes:[],extrudePath:void 0}},computed:r({},p,(function(){return new e.ExtrudeGeometry(this.shapes,{curveSegments:this.curveSegments,steps:this.steps,depth:this.depth,bevelEnabled:this.bevelEnabled,bevelThickness:this.bevelThickness,bevelSize:this.bevelSize,bevelOffset:this.bevelOffset,bevelSegments:this.bevelSegments,extrudePath:this.extrudePath,UVGenerator:this.uvGenerator})})),methods:(vn={},r(vn,c,(function(t,e){t===ye?this.shapes.push(e):t===ae&&(this.extrudePath=e)})),r(vn,m,(function(t,e){t===ye?this.shapes.splice(this.shapes.indexOf(e),1):t===ae&&this.extrudePath===e&&(this.extrudePath=void 0)})),vn)},Ln={extends:Dn,computed:r({},p,(function(){return new e.IcosahedronGeometry(this.radius,this.detail)}))};function On(t){return"number"==typeof t||t instanceof Number}var jn,kn,Tn,Cn,Gn,In,_n,Bn,Rn,En,Un,zn,Fn,Yn,Xn,Hn={extends:Zi,props:(wn={},r(wn,$e,{type:Array,default:function(){return[]},validator:function(t){return t.every(On)&&!(t.length%2)||t.every((function(t){return Array.isArray(t)&&2===t.length&&t.every(On)}))}}),r(wn,Ae,{type:Number,default:12,validator:Number.isInteger}),r(wn,me,{type:Number,default:0}),r(wn,fe,{type:Number,default:2*Math.PI}),wn),computed:r({},p,(function(){return new e.LatheGeometry(function(t){return t.reduce((function(t,e,i){return i%2?t[t.length-1].push(e):t.push([e]),t}),[])}(this.points.flat()).map((function(t){var i=s(t,2),n=i[0],r=i[1];return new e.Vector2(n,r)})),this.segments,this.phiStart,this.phiLength)}))},qn={extends:Dn,computed:r({},p,(function(){return new e.OctahedronGeometry(this.radius,this.detail)}))},Zn={extends:Zi,props:(jn={},r(jn,Pt,{type:Number,default:1}),r(jn,Lt,{type:Number,default:1}),r(jn,de,{type:Number,default:1,validator:Number.isInteger}),r(jn,ce,{type:Number,default:1,validator:Number.isInteger}),jn),computed:r({},p,(function(){return new e.PlaneGeometry(this.width,this.height,this.widthSegments,this.heightSegments)}))},Wn={extends:Zi,props:(kn={},r(kn,Ne,{type:Number,default:.5}),r(kn,we,{type:Number,default:1}),r(kn,ve,{type:Number,default:8,validator:Number.isInteger}),r(kn,be,{type:Number,default:1,validator:Number.isInteger}),r(kn,pe,{type:Number,default:0}),r(kn,ge,{type:Number,default:2*Math.PI}),kn),computed:{inst:function(){return new e.RingGeometry(this.innerRadius,this.outerRadius,this.thetaSegments,this.phiSegments,this.thetaStart,this.thetaLength)}}},Kn={extends:Zi,props:r({},te,{type:Number,default:12,validator:Number.isInteger}),data:function(){return{shapes:[]}},computed:r({},p,(function(){return new e.ShapeGeometry(this.shapes,this.curveSegments)})),methods:(Tn={},r(Tn,c,(function(t,e){t===ye&&this.shapes.push(e)})),r(Tn,m,(function(t,e){t===ye&&this.shapes.splice(this.shapes.indexOf(e),1)})),Tn)},Qn={extends:Zi,props:(Cn={},r(Cn,Tt,{type:Number,default:1}),r(Cn,de,{type:Number,default:8,validator:Number.isInteger}),r(Cn,ce,{type:Number,default:6,validator:Number.isInteger}),r(Cn,me,{type:Number,default:0}),r(Cn,fe,{type:Number,default:2*Math.PI}),r(Cn,pe,{type:Number,default:0}),r(Cn,ge,{type:Number,default:Math.PI}),Cn),computed:r({},p,(function(){return new e.SphereGeometry(this.radius,this.widthSegments,this.heightSegments,this.phiStart,this.phiLength,this.thetaStart,this.thetaLength)}))},Jn={extends:Dn,computed:r({},p,(function(){return new e.TetrahedronGeometry(this.radius,this.detail)}))},tr={extends:Pn,props:(Gn={},r(Gn,Qt,{type:String,default:""}),r(Gn,ht,{type:Number,default:100}),Gn),data:function(){return{font:void 0}},computed:r({},p,(function(){return this.font?new e.TextGeometry(this.text,{font:this.font,size:this.size,height:this.depth,curveSegments:this.curveSegments,steps:this.steps,bevelEnabled:this.bevelEnabled,bevelThickness:this.bevelThickness,bevelSize:this.bevelSize,bevelOffset:this.bevelOffset,extrudePath:this.extrudePath,bevelSegments:this.bevelSegments,UVGenerator:this.uvGenerator}):new e.BufferGeometry})),methods:(In={},r(In,c,(function(t,e){t===he?this.font=e:t===ae&&(this.extrudePath=e)})),r(In,m,(function(t,e){t===he?this.font===e&&(this.font=void 0):t===ae&&this.extrudePath===e&&(this.extrudePath=void 0)})),In)},er={extends:Zi,props:(_n={},r(_n,Tt,{type:Number,default:1}),r(_n,Zt,{type:Number,default:.4}),r(_n,Wt,{type:Number,default:8,validator:Number.isInteger}),r(_n,Kt,{type:Number,default:6,validator:Number.isInteger}),r(_n,"arc",{type:Number,default:2*Math.PI}),_n),computed:{inst:function(){return new e.TorusGeometry(this.radius,this.tube,this.radialSegments,this.tubularSegments,this.arc)}}},ir={extends:Zi,props:(Bn={},r(Bn,Tt,{type:Number,default:1}),r(Bn,Zt,{type:Number,default:.4}),r(Bn,Wt,{type:Number,default:8,validator:Number.isInteger}),r(Bn,Kt,{type:Number,default:64,validator:Number.isInteger}),r(Bn,"p",{type:Number,default:2,validator:Number.isInteger}),r(Bn,"q",{type:Number,default:3,validator:Number.isInteger}),Bn),computed:{inst:function(){return new e.TorusKnotGeometry(this.radius,this.tube,this.tubularSegments,this.radialSegments,this.p,this.q)}}},nr={extends:Mi,props:(Rn={},r(Rn,zt,{type:Number,default:0}),r(Rn,Ft,{type:Number,default:0}),r(Rn,Yt,{type:Number,default:1}),r(Rn,Xt,{type:Number,default:1}),r(Rn,E,{type:[String,Number],default:16776960}),r(Rn,Ht,Number),r(Rn,qt,Number),Rn),computed:r({},p,(function(){return new e.ArrowHelper})),watch:(En={},r(En,zt,{handler:function(t){this.inst.setDirection(new e.Vector3(t,this.directionY,this.directionZ).normalize())},immediate:!0}),r(En,Ft,(function(t){this.inst.setDirection(new e.Vector3(this.directionX,t,this.directionZ).normalize())})),r(En,Yt,(function(t){this.inst.setDirection(new e.Vector3(this.directionX,this.directionY,t).normalize())})),r(En,Xt,{handler:function(t){this.inst.setLength(t,this.headLength,this.headWidth)},immediate:!0}),r(En,Ht,(function(t){this.inst.setLength(this.length,t,this.headWidth)})),r(En,qt,(function(t){this.inst.setLength(this.length,this.headLength,t)})),r(En,E,{handler:function(t){this.inst.setColor(t)},immediate:!0}),En)},rr=new e.BufferGeometry,sr=new e.MeshBasicMaterial,or=new e.LineBasicMaterial,ar=new e.PointsMaterial,ur=new e.SpriteMaterial,hr={mixins:[Mi],computed:r({},p,(function(){return new e.Line})),methods:(Un={},r(Un,c,(function(t,i){t===it?(this.inst.geometry=i,this.inst.material instanceof e.LineDashedMaterial&&this.inst.computeLineDistances()):t===et?(this.inst.material=i,i instanceof e.LineDashedMaterial&&this.inst.computeLineDistances()):Mi.methods.add.call(this,t,i)})),r(Un,m,(function(t,i){t===it?this.inst.geometry===i&&(this.inst.geometry=rr,this.inst.material instanceof e.LineDashedMaterial&&this.inst.computeLineDistances()):t===et&&this.inst.material===i?this.inst.material=or:Mi.methods.remove.call(this,t,i)})),Un)},lr={mixins:[hr],computed:r({},p,(function(){return new e.LineSegments}))},dr={extends:lr,props:(zn={},r(zn,ht,{type:Number,default:1}),r(zn,yi,[String,Number]),r(zn,bi,[String,Number]),r(zn,vi,[String,Number]),zn),computed:(Fn={},r(Fn,p,(function(){return new e.AxesHelper(this.size)})),r(Fn,"colors",(function(){return[this.xAxisColor,this.yAxisColor,this.zAxisColor]})),Fn),watch:(Yn={},r(Yn,p,(function(t,e){var i=e.geometry;t.geometry.getAttribute("color").set(i.getAttribute("color").array)})),r(Yn,"colors",{handler:function(t,e){var i;if(t.includes(void 0)){if(!e)return;var n=this.inst.geometry.getAttribute("color");n.set([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1]),n.needsUpdate=!0}else(i=this.inst).setColors.apply(i,o(t))},immediate:!0}),Yn),beforeDestroy:function(){this.inst.dispose()}};function cr(t,e){return e in t.methods?t.methods[e]:"extends"in t?cr(t.extends,e):function(){}}var mr,fr,pr,gr,yr,br,vr,wr,Nr,Sr,xr,$r,Ar,Mr,Dr,Vr,Pr,Lr,Or,jr,kr,Tr,Cr,Gr,Ir,_r,Br,Rr,Er,Ur,zr,Fr,Yr,Xr,Hr,qr,Zr,Wr,Kr,Qr,Jr,ts,es,is,ns={extends:lr,props:r({},E,{type:[String,Number],default:16776960}),computed:r({},p,(function(){return new e.BoxHelper})),watch:r({},E,{handler:function(t){this.inst.material.color.set(t)},immediate:!0}),methods:(Xn={},r(Xn,c,(function(t,e){var i=this;t===Ut?this.$nextTick((function(){i.inst.setFromObject(e)})):cr(lr,c).call(this,t,e)})),r(Xn,m,(function(t,e){var i=this;t===Ut?this.$nextTick((function(){i.object===e&&(i.inst.object=void 0)})):cr(lr,m).call(this,t,e)})),r(Xn,f,(function(t){var e=this;t===Ut?this.$nextTick((function(){e.inst.update()})):cr(lr,f).call(this,t)})),Xn),render:void 0},rs={extends:lr,data:function(){return{camera:null}},computed:r({},p,(function(){return this.camera?new e.CameraHelper(this.camera):new e.LineSegments})),methods:(mr={},r(mr,c,(function(t,e){t===J?this.camera=e:cr(lr,c).call(this,t,e)})),r(mr,m,(function(t,e){t===J?this.camera===e&&(this.camera=null):cr(lr,m).call(this,t,e)})),mr)},ss={extends:Mi,props:(fr={},r(fr,E,[String,Number]),r(fr,ht,{type:Number,default:1}),fr),beforeDestroy:function(){this.inst.dispose()},data:function(){return{light:null}},computed:r({},p,(function(){return this.light?new e.DirectionalLightHelper(this.light,this.size):new e.Object3D})),methods:(pr={},r(pr,c,(function(t,e){t===kt?this.light=e:Mi.methods.add.call(this,t,e)})),r(pr,m,(function(t,e){t===kt?this.light===e&&(this.light=null):Mi.methods.remove.call(this,t,e)})),pr),watch:(gr={},r(gr,p,(function(t,e){var i=e.color;Object.assign(t,{color:i}).update()})),r(gr,E,{handler:function(t){this.light&&(this.inst.color=t,this.inst.update())},immediate:!0}),gr)},os={extends:lr,props:(yr={},r(yr,ht,{type:Number,default:10}),r(yr,It,{type:Number,default:10,validator:Number.isInteger}),r(yr,Rt,{type:[String,Number],default:4473924}),r(yr,Et,{type:[String,Number],default:8947848}),yr),computed:r({},p,(function(){return new e.GridHelper(this.size,this.divisions,this.colorCenterLine,this.colorGrid)}))},as={extends:lr,props:(br={},r(br,Tt,{type:Number,default:10}),r(br,Ct,{type:Number,default:16,validator:Number.isInteger}),r(br,Gt,{type:Number,default:8,validator:Number.isInteger}),r(br,It,{type:Number,default:64,validator:Number.isInteger}),r(br,_t,{type:[String,Number],default:4473924}),r(br,Bt,{type:[String,Number],default:8947848}),br),computed:r({},p,(function(){return new e.PolarGridHelper(this.radius,this.radials,this.circles,this.divisions,this.color1,this.color2)}))},us={extends:Mi,props:r({},E,[String,Number]),data:function(){return{lightUuid:null}},computed:r({},p,(function(){return this.lightUuid?new e.SpotLightHelper(this.light):new e.Object3D})),methods:(vr={},r(vr,c,(function(t,e){t===kt?(this.light=e,this.lightUuid=e.uuid):cr(Mi,c).call(this,t,e)})),r(vr,m,(function(t,e){t===kt?this.light===e&&(delete this.light,this.lightUuid=null):cr(Mi,m).call(this,t,e)})),r(vr,f,(function(t){t===kt&&this.inst.update(),cr(Mi,f).call(this,t)})),vr),watch:(wr={},r(wr,p,(function(t,e){var i=e.color;Object.assign(t,{color:i}).update()})),r(wr,E,{handler:function(t){this.light&&Object.assign(this.inst,{color:t}).update()},immediate:!0}),wr)},hs={extends:Mi,props:(Nr={},r(Nr,E,{type:[String,Number],default:16777215}),r(Nr,Ot,{type:Number,default:1}),Nr),computed:r({},p,(function(){return new e.Light})),watch:(Sr={},r(Sr,E,{handler:function(t){this.inst.color.set(t)},immediate:!0}),r(Sr,Ot,{handler:function(t){this.inst.intensity=t},immediate:!0}),Sr),beforeDestroy:function(){this.inst.dispose()}},ls={extends:hs,computed:r({},p,(function(){return new e.AmbientLight}))},ds={extends:hs,computed:r({},p,(function(){return new e.DirectionalLight}))},cs={extends:hs,props:r({},jt,{type:[String,Number],default:16777215}),computed:r({},p,(function(){return new e.HemisphereLight})),watch:r({},jt,{handler:function(t){this.inst.groundColor.set(t)},immediate:!0})},ms={extends:hs,props:(xr={},r(xr,$t,{type:Number,default:0}),r(xr,At,{type:Number,default:1}),xr),computed:r({},p,(function(){return new e.PointLight})),watch:($r={},r($r,$t,{handler:function(t){this.inst.distance=t},immediate:!0}),r($r,At,{handler:function(t){this.inst.decay=t},immediate:!0}),$r)},fs={extends:hs,props:(Ar={},r(Ar,Pt,{type:Number,default:10}),r(Ar,Lt,{type:Number,default:10}),Ar),computed:r({},p,(function(){return new e.RectAreaLight})),watch:(Mr={},r(Mr,Pt,{handler:function(t){this.inst.width=t},immediate:!0}),r(Mr,Lt,{handler:function(t){this.inst.height=t},immediate:!0}),Mr)},ps={extends:hs,props:(Dr={},r(Dr,$t,{type:Number,default:0}),r(Dr,At,{type:Number,default:1}),r(Dr,Mt,{type:Number,default:Math.PI/3,validator:function(t){return t>=0&&t<=Math.PI/2}}),r(Dr,Dt,{type:Number,default:0,validator:function(t){return t>=0&&t<=1}}),Dr),computed:r({},p,(function(){return new e.SpotLight})),watch:(Vr={},r(Vr,$t,{handler:function(t){this.inst.distance=t},immediate:!0}),r(Vr,At,{handler:function(t){this.inst.decay=t},immediate:!0}),r(Vr,Mt,{handler:function(t){this.inst.angle=t},immediate:!0}),r(Vr,Dt,{handler:function(t){this.inst.penumbra=t},immediate:!0}),Vr),methods:(Pr={},r(Pr,c,(function(t,e){t===Vt?this.inst.target=e:cr(hs,c).call(this,t,e)})),r(Pr,m,(function(t,i){t===Vt?this.inst.target===i&&(this.inst.target=new e.Object3D):cr(hs,m).call(this,t,i)})),Pr)},gs={front:e.FrontSide,back:e.BackSide,double:e.DoubleSide},ys={mixins:[wi,Si],props:(Lr={},r(Lr,g,{type:String,default:""}),r(Lr,gt,{type:String,default:"front",validator:function(t){return t in gs}}),r(Lr,yt,Boolean),r(Lr,bt,{type:Object,default:function(){return{}}}),r(Lr,b,Boolean),Lr),computed:r({},p,(function(){return new e.Material})),watch:(Or={},r(Or,g,{handler:function(t){this.inst.name=t},immediate:!0}),r(Or,gt,{handler:function(t){this.inst.side=gs[t]},immediate:!0}),r(Or,yt,{handler:function(t){this.inst.vertexColors=t},immediate:!0}),r(Or,bt,{handler:function(t){Object.assign(this.inst,{defines:t,needsUpdate:!0})},immediate:!0}),r(Or,b,{handler:function(t){Object.assign(this.inst,{fog:t,needsUpdate:!0})},immediate:!0}),Or),beforeDestroy:function(){this.inst.dispose()}},bs={mixins:[ys],props:(jr={},r(jr,E,{type:[String,Number],default:16777215}),r(jr,vt,{type:Number,default:1}),r(jr,St,{type:String,default:"round",validator:function(t){return["butt","round","square"].includes(t)}}),r(jr,xt,{type:String,default:"round",validator:function(t){return["round","bevel","miter"].includes(t)}}),jr),computed:r({},p,(function(){return new e.LineBasicMaterial})),watch:(kr={},r(kr,E,{handler:function(t){this.inst.color.set(t)},immediate:!0}),r(kr,vt,{handler:function(t){this.inst.linewidth=t},immediate:!0}),r(kr,St,{handler:function(t){this.inst.linecap=t},immediate:!0}),r(kr,xt,{handler:function(t){this.inst.linejoin=t},immediate:!0}),kr)},vs={mixins:[ys],props:(Tr={},r(Tr,E,{type:[String,Number],default:16777215}),r(Tr,vt,{type:Number,default:1}),r(Tr,wt,{type:Number,default:3}),r(Tr,Nt,{type:Number,default:1}),Tr),computed:r({},p,(function(){return new e.LineDashedMaterial})),watch:(Cr={},r(Cr,E,{handler:function(t){this.inst.color.set(t)},immediate:!0}),r(Cr,vt,{handler:function(t){this.inst.linewidth=t},immediate:!0}),r(Cr,wt,{handler:function(t){this.inst.dashSize=t},immediate:!0}),r(Cr,Nt,{handler:function(t){this.inst.gapSize=t},immediate:!0}),Cr)},ws={mixins:[ys],props:r({},E,{type:[String,Number],default:16777215}),computed:r({},p,(function(){return new e.MeshBasicMaterial})),watch:r({},E,{handler:function(t){this.inst.color.set(t)},immediate:!0}),methods:(Gr={},r(Gr,c,(function(t,e){t===nt&&(this.inst.map=e)})),r(Gr,m,(function(t,e){t===nt&&this.inst.map===e&&(this.inst.map=null)})),Gr)},Ns={mixins:[ys],props:r({},b,Boolean),computed:r({},p,(function(){return new e.MeshDepthMaterial})),watch:r({},b,{handler:function(t){this.inst.fog=t},immediate:!0}),methods:(Ir={},r(Ir,c,(function(t,e){t===nt&&(this.inst.map=e)})),r(Ir,m,(function(t,e){t===nt&&this.inst.map===e&&(this.inst.map=null)})),Ir)},Ss={mixins:[ys],props:r({},E,{type:[String,Number],default:16777215}),computed:r({},p,(function(){return new e.MeshLambertMaterial})),watch:r({},E,{handler:function(t){this.inst.color.set(t)},immediate:!0}),methods:(_r={},r(_r,c,(function(t,e){t===nt&&(this.inst.map=e)})),r(_r,m,(function(t,e){t===nt&&this.inst.map===e&&(this.inst.map=null)})),_r)},xs={mixins:[ys],props:r({},b,Boolean),computed:r({},p,(function(){return new e.MeshNormalMaterial})),watch:r({},b,{handler:function(t){this.inst.fog=t},immediate:!0})},$s={mixins:[ys],props:(Br={},r(Br,E,{type:[String,Number],default:16777215}),r(Br,ft,{type:[String,Number],default:1118481}),r(Br,pt,{type:Number,default:30}),Br),computed:r({},p,(function(){return new e.MeshPhongMaterial})),watch:(Rr={},r(Rr,E,{handler:function(t){this.inst.color.set(t)},immediate:!0}),r(Rr,ft,{handler:function(t){this.inst.specular.set(t)},immediate:!0}),r(Rr,pt,{handler:function(t){this.inst.shininess=t},immediate:!0}),Rr),methods:(Er={},r(Er,c,(function(t,e){t===nt&&(this.inst.map=e)})),r(Er,m,(function(t,e){t===nt&&this.inst.map===e&&(this.inst.map=null)})),Er)},As={mixins:[ys],props:r({},E,{type:[String,Number],default:16777215}),computed:r({},p,(function(){return new e.MeshStandardMaterial})),watch:r({},E,{handler:function(t){this.inst.color.set(t)},immediate:!0}),methods:(Ur={},r(Ur,c,(function(t,e){t===nt&&(this.inst.map=e)})),r(Ur,m,(function(t,e){t===nt&&this.inst.map===e&&(this.inst.map=null)})),Ur),render:void 0},Ms={mixins:[As],props:(zr={},r(zr,dt,{type:Number,default:0,validator:function(t){return t>=0&&t<=1}}),r(zr,ct,{type:Number,default:0,validator:function(t){return t>=0&&t<=1}}),r(zr,mt,{type:Number,default:.5,validator:function(t){return t>=0&&t<=1}}),zr),computed:r({},p,(function(){return new e.MeshPhysicalMaterial})),watch:(Fr={},r(Fr,dt,{handler:function(t){this.inst.clearcoat=t},immediate:!0}),r(Fr,ct,{handler:function(t){this.inst.clearcoatRoughness=t},immediate:!0}),r(Fr,mt,{handler:function(t){this.inst.reflectivity=t},immediate:!0}),Fr)},Ds={mixins:[ys],props:r({},E,{type:[String,Number],default:16777215}),computed:r({},p,(function(){return new e.MeshToonMaterial})),watch:r({},E,{handler:function(t){this.inst.color.set(t)},immediate:!0}),methods:(Yr={},r(Yr,c,(function(t,e){t===nt&&(this.inst.map=e)})),r(Yr,m,(function(t,e){t===nt&&this.inst.map===e&&(this.inst.map=null)})),Yr)},Vs={mixins:[ys],props:(Xr={},r(Xr,E,{type:[String,Number],default:16777215}),r(Xr,ht,{type:Number,default:1}),r(Xr,lt,Boolean),Xr),computed:r({},p,(function(){return new e.PointsMaterial})),watch:(Hr={},r(Hr,E,{handler:function(t){this.inst.color.set(t)},immediate:!0}),r(Hr,ht,{handler:function(t){this.inst.size=t},immediate:!0}),r(Hr,lt,{handler:function(t){this.inst.sizeAttenuation=!t},immediate:!0}),Hr)},Ps={mixins:[ys],props:(qr={},r(qr,st,{type:String,default:"\nvoid main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}\n"}),r(qr,ot,{type:Object,default:function(){return{}}}),r(qr,at,{type:String,default:"\nvoid main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}\n"}),r(qr,ut,Boolean),qr),computed:r({},p,(function(){return new e.ShaderMaterial})),watch:(Zr={},r(Zr,st,{handler:function(t){Object.assign(this.inst,{fragmentShader:t,needsUpdate:!0})},immediate:!0}),r(Zr,at,{handler:function(t){Object.assign(this.inst,{vertexShader:t,needsUpdate:!0})},immediate:!0}),r(Zr,ot,{handler:function(t){Object.assign(this.inst.uniforms,t)},immediate:!0}),r(Zr,ut,{handler:function(t){this.inst.wireframe=t},immediate:!0}),Zr)},Ls={mixins:[ys],computed:r({},p,(function(){return new e.ShadowMaterial}))},Os={mixins:[ys],props:(Wr={},r(Wr,E,{type:[String,Number],default:16777215}),r(Wr,T,{type:Number,default:0}),Wr),computed:r({},p,(function(){return new e.SpriteMaterial})),watch:(Kr={},r(Kr,E,{handler:function(t){this.inst.color.set(t)},immediate:!0}),r(Kr,T,{handler:function(t){this.inst.rotation=t},immediate:!0}),Kr),methods:(Qr={},r(Qr,c,(function(t,e){t===nt?this.inst.map=e:t===rt&&(this.inst.alphaMap=e)})),r(Qr,m,(function(t,e){t===nt?this.inst.map===e&&(this.inst.map=null):t===rt&&this.inst.alphaMap===e&&(this.inst.alphaMap=null)})),Qr)},js={mixins:[Mi],computed:r({},p,(function(){return new e.Group}))},ks={mixins:[hr],computed:r({},p,(function(){return new e.LineLoop}))},Ts={mixins:[Mi],computed:r({},p,(function(){return new e.Mesh(rr,sr)})),methods:(Jr={},r(Jr,c,(function(t,e){t===it?this.inst.geometry=e:t===et?Array.isArray(this.inst.material)?this.inst.material.push(e):this.inst.material===sr?this.inst.material=e:this.inst.material=[this.inst.material,e]:Mi.methods.add.call(this,t,e)})),r(Jr,m,(function(t,e){if(t===it)this.inst.geometry===e&&(this.inst.geometry=rr);else if(t===et)if(Array.isArray(this.inst.material)){var i=this.inst.material.indexOf(e);if(i>=0&&(this.inst.material.splice(i,1),1===this.inst.material.length)){var n=s(this.inst.material,1);this.inst.material=n[0]}}else this.inst.material===e&&(this.inst.material=sr);else Mi.methods.remove.call(this,t,e)})),Jr),render:void 0},Cs={mixins:[Mi],computed:r({},p,(function(){return new e.Points(rr,ar)})),methods:(ts={},r(ts,c,(function(t,e){t===it?this.inst.geometry=e:t===et?this.inst.material=e:Mi.methods.add.call(this,t,e)})),r(ts,m,(function(t,e){t===it?this.inst.geometry===e&&(this.inst.geometry=rr):t===et?this.inst.material===e&&(this.inst.material=ar):Mi.methods.remove.call(this,t,e)})),ts)},Gs={mixins:[Mi],computed:r({},p,(function(){return new e.Sprite(ur)})),methods:(es={},r(es,c,(function(t,e){t===et?this.inst.material=e:Mi.methods.add.call(this,t,e)})),r(es,m,(function(t,e){t===et?this.inst.material===e&&(this.inst.material=ur):Mi.methods.add.call(this,t,e)})),es)},Is={highPerformance:"high-performance",lowPower:"low-power",default:"default"};function _s(t){return Object.entries(t).sort().map((function(t){return t[1]})).map((function(t){return!0===t?1:!1===t?0:t}))}function Bs(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return e.flatMap(_s).join("")}function Rs(t,e){var i;return{on:(i={},r(i,c,(function(i){t.inst[e]=i,t.$nextTick(t.render)})),r(i,m,(function(i){t.inst[e]===i&&delete t.inst[e]})),r(i,f,(function(){t.$nextTick(t.render)})),i)}}var Es,Us,zs,Fs,Ys,Xs,Hs=globalThis.ResizeObserver?{created:function(){this.resizeObserver=new globalThis.ResizeObserver(this.render)},mounted:function(){this.resizeObserver.observe(this.$el)},updated:function(){this.resizeObserver.disconnect(),this.resizeObserver.observe(this.$el)},beforeDestroy:function(){this.resizeObserver.disconnect(),this.inst.renderer&&this.inst.renderer.dispose()}}:{},qs=n({props:(is={},r(is,F,Boolean),r(is,Y,Boolean),r(is,X,Boolean),r(is,H,Boolean),r(is,q,Boolean),r(is,Z,Boolean),r(is,W,Boolean),r(is,K,Boolean),r(is,Q,{type:String,validator:function(t){return["highp","mediump","lowp"].includes(t)}}),r(is,"powerPreference",{type:String,default:"default",validator:function(t){return t in Is}}),is),computed:r({},p,(function(){return{parameters:{preserveDrawingBuffer:this.preserveDrawingBuffer,precision:this.precision,depth:!this.noDepth,alpha:this.alpha,stencil:!this.noStencil,logarithmicDepthBuffer:this.logarithmicDepthBuffer,antialias:this.antialias,powerPreference:Is[this.powerPreference],premultipliedAlpha:!this.noPremultipliedAlpha},shadowMap:{enabled:this.shadowMapEnabled}}})),methods:{render:function(){var t=this;this.inst.toBeRendered||(this.$nextTick((function(){var i=t.inst,r=t.$el;i.renderer||(i.renderer=new e.WebGLRenderer(n({canvas:r},i.parameters)),Object.assign(i.renderer.shadowMap,i.shadowMap));var s=i.scene,o=i.camera,a=i.renderer;if(s&&o){var u,h=r.clientWidth,l=r.clientHeight;if(o instanceof e.PerspectiveCamera){var d=o.aspect;void 0===d&&(u={aspect:d},o.aspect=h/l,o.updateProjectionMatrix())}else if(o instanceof e.OrthographicCamera){var c=o.left,m=o.right,f=o.top,p=o.bottom;if([c,m,f,p].includes(void 0)){if(u={left:c,right:m,top:f,bottom:p},[c,m].includes(void 0))if([f,p].includes(void 0))void 0!==c?o.right=c+h:void 0!==m?o.left=m-h:Object.assign(o,{left:h/-2,right:h/2}),void 0!==f?o.bottom=f-l:void 0!==p?o.top=p+l:Object.assign(o,{top:l/2,bottom:l/-2});else{var g=Math.abs(f-p)*(h/l);void 0!==c?o.right=c+g:void 0!==m?o.left=m-g:Object.assign(o,{left:g/-2,right:g/2})}else{var y=Math.abs(c-m)*(l/h);void 0!==p?o.top=p+y:void 0!==f?o.bottom=f-y:Object.assign(o,{top:y/2,bottom:y/-2})}o.updateProjectionMatrix()}}i.clientWidth===h&&i.clientHeight===l||(Object.assign(i,{clientWidth:h,clientHeight:l}),a.setSize(h,l,!1)),a.render(s,o),u&&Object.assign(o,u)}i.toBeRendered=0})),this.inst.toBeRendered=1)}},watch:r({},p,(function(t,e){var i=e.renderer;i&&i.dispose()})),beforeDestroy:function(){this.inst.renderer&&this.inst.renderer.dispose()},render:function(t){var e=this.inst;return t("canvas",{key:Bs(e.parameters,e.shadowMap)},[t(Ni,Rs(this,J),this.$slots.camera),t(Ni,Rs(this,tt),this.$slots.scene),t("template",this.$slots.default)])}},Hs),Zs={mixins:[wi],props:(Es={},r(Es,g,{default:"",type:String}),r(Es,E,{type:[String,Number],default:16777215}),r(Es,U,{type:Number,default:1}),r(Es,z,{type:Number,default:1e3}),Es),computed:r({},p,(function(){return new e.Fog})),watch:(Us={},r(Us,g,{handler:function(t){this.inst.name=t},immediate:!0}),r(Us,U,{handler:function(t){this.inst.near=t},immediate:!0}),r(Us,z,{handler:function(t){this.inst.far=t},immediate:!0}),r(Us,E,{handler:function(t){this.inst.color.set(t)},immediate:!0}),Us),render:function(){}},Ws={mixins:[Mi],props:r({},N,[String,Number]),computed:r({},p,(function(){return new e.Scene})),watch:r({},N,{handler:function(t){void 0!==t&&(this.inst.background?this.inst.background instanceof e.Color&&this.inst.background.set(t):this.inst.background=new e.Color(t))},immediate:!0}),methods:(zs={},r(zs,c,(function(t,e){t===b?this.inst.fog=e:t===v?this.inst.overrideMaterial=e:t===w?this.inst.environment=e:t===N?this.inst.background=e:Mi.methods.add.call(this,t,e)})),r(zs,m,(function(t,i){t===b?this.inst.fog===i&&(this.inst.fog=null):t===v?this.inst.overrideMaterial===i&&(this.inst.overrideMaterial=null):t===w?this.inst.environment===i&&(this.inst.environment=null):t===N?this.inst.background===i&&(this.inst.background=this.background?new e.Color(this.background):null):Mi.methods.remove.call(this,t,i)})),zs),render:void 0},Ks={uv:e.UVMapping,cubeReflection:e.CubeReflectionMapping,cubeRefraction:e.CubeRefractionMapping,equirectangularReflection:e.EquirectangularReflectionMapping,equirectangularRefraction:e.EquirectangularRefractionMapping,cubeUvReflection:e.CubeUVReflectionMapping,cubeUvRefraction:e.CubeUVRefractionMapping},Qs={repeat:e.RepeatWrapping,clampToEdge:e.ClampToEdgeWrapping,mirroredRepeat:e.MirroredRepeatWrapping},Js={nearest:e.NearestFilter,nearestMipMapNearest:e.NearestMipMapNearestFilter,nearestMipMapLinear:e.NearestMipMapLinearFilter,linear:e.LinearFilter,linearMipMapNearest:e.LinearMipMapNearestFilter,linearMipMapLinear:e.LinearMipMapLinearFilter},to={alpha:e.AlphaFormat,rgb:e.RGBFormat,rgba:e.RGBAFormat,luminance:e.LuminanceFormat,luminanceAlpha:e.LuminanceAlphaFormat,rgbe:e.RGBEFormat,depth:e.DepthFormat,depthStencil:e.DepthStencilFormat},eo={unsignedByte:e.UnsignedByteType,byte:e.ByteType,short:e.ShortType,int:e.IntType,unsignedShort:e.UnsignedShortType,unsignedInt:e.UnsignedIntType,float:e.FloatType,halfFloat:e.HalfFloatType,unsignedShort4444:e.UnsignedShort4444Type,unsignedShort5551:e.UnsignedShort5551Type,unsignedShort565:e.UnsignedShort565Type,unsignedInt248:e.UnsignedInt248Type},io={linear:e.LinearEncoding,sRgb:e.sRGBEncoding,gamma:e.GammaEncoding,rgbe:e.RGBEEncoding,logLuv:e.LogLuvEncoding,rgbm7:e.RGBM7Encoding,rgbm16:e.RGBM16Encoding,rgbde:e.RGBDEncoding,basicDepth:e.BasicDepthPacking,rgbaDepth:e.RGBADepthPacking},no={mixins:[wi,Si],props:(Fs={},r(Fs,g,{type:String,default:""}),r(Fs,S,{type:String,default:"uv",validator:function(t){return t in Ks}}),r(Fs,x,{type:String,default:"clampToEdge",validator:function(t){return t in Qs}}),r(Fs,$,{type:String,default:"clampToEdge",validator:function(t){return t in Qs}}),r(Fs,A,{type:String,default:"linear",validator:function(t){return t in Js}}),r(Fs,M,{type:String,default:"linearMipMapLinear",validator:function(t){return t in Js}}),r(Fs,D,{type:Number,default:1,validator:Number.isInteger}),r(Fs,V,{type:String,validator:function(t){return t in to},default:"rgba"}),r(Fs,P,{type:String,default:"unsignedByte",validator:function(t){return t in eo}}),r(Fs,L,{type:Number,default:0}),r(Fs,O,{type:Number,default:0}),r(Fs,j,{type:Number,default:1}),r(Fs,k,{type:Number,default:1}),r(Fs,T,{type:Number,default:0}),r(Fs,C,{type:Number,default:0}),r(Fs,G,{type:Number,default:0}),r(Fs,I,Boolean),r(Fs,R,Boolean),r(Fs,_,{type:Number,default:4,validator:function(t){return[1,2,4,8].includes(t)}}),r(Fs,B,{type:String,default:"linear",validator:function(t){return t in io}}),Fs),computed:r({},p,(function(){return new e.Texture})),methods:(Ys={},r(Ys,c,(function(t,e){t===y&&Object.assign(this.inst,{image:e,needsUpdate:!0})})),r(Ys,m,(function(t,i){t===y&&this.inst.image===i&&Object.assign(this.inst,{image:e.Texture.DEFAULT_IMAGE,needsUpdate:!0})})),r(Ys,f,(function(t){t===y&&(this.inst.needsUpdate=!0),wi.methods.change.call(this,t)})),Ys),beforeDestroy:function(){this.inst.dispose()},watch:(Xs={},r(Xs,g,{handler:function(t){this.inst.name=t},immediate:!0}),r(Xs,S,{handler:function(t){this.inst.mapping=Ks[t]},immediate:!0}),r(Xs,x,{handler:function(t){this.inst.wrapS=Qs[t]},immediate:!0}),r(Xs,$,{handler:function(t){this.inst.wrapT=Qs[t]},immediate:!0}),r(Xs,A,{handler:function(t){this.inst.magFilter=Js[t]},immediate:!0}),r(Xs,M,{handler:function(t){this.inst.minFilter=Js[t]},immediate:!0}),r(Xs,D,{handler:function(t){this.inst.anisotropy=t},immediate:!0}),r(Xs,V,{handler:function(t){this.inst.format=to[t]},immediate:!0}),r(Xs,P,{handler:function(t){this.inst.type=eo[t]},immediate:!0}),r(Xs,L,{handler:function(t){this.inst.offset.setX(t)},immediate:!0}),r(Xs,O,{handler:function(t){this.inst.offset.setY(t)},immediate:!0}),r(Xs,j,{handler:function(t){this.inst.repeat.setX(t)},immediate:!0}),r(Xs,k,{handler:function(t){this.inst.repeat.setY(t)},immediate:!0}),r(Xs,T,{handler:function(t){this.inst.rotation=t},immediate:!0}),r(Xs,C,{handler:function(t){this.inst.center.setX(t)},immediate:!0}),r(Xs,G,{handler:function(t){this.inst.center.setY(t)},immediate:!0}),r(Xs,I,{handler:function(t){this.inst.premultiplyAlpha=t},immediate:!0}),r(Xs,R,{handler:function(t){this.inst.flipY=!t},immediate:!0}),r(Xs,_,{handler:function(t){this.inst.unpackAlignment=t},immediate:!0}),r(Xs,B,{handler:function(t){this.inst.encoding=io[t]},immediate:!0}),Xs),render:void 0};t.VglAmbientLight=ls,t.VglArrowHelper=nr,t.VglAxesHelper=dr,t.VglBoxGeometry=xn,t.VglBoxHelper=ns,t.VglCamera=Di,t.VglCameraHelper=rs,t.VglCircleGeometry=$n,t.VglConeGeometry=Mn,t.VglCurve=on,t.VglCurvePath=an,t.VglCylinderGeometry=An,t.VglDefs=Fi,t.VglDirectionalLight=ds,t.VglDirectionalLightHelper=ss,t.VglDodecahedronGeometry=Vn,t.VglExtrudeGeometry=Pn,t.VglFloat32Attribute=Hi,t.VglFloat64Attribute=qi,t.VglFog=Zs,t.VglFont=un,t.VglGeometry=Zi,t.VglGridHelper=os,t.VglGroup=js,t.VglHemisphereLight=cs,t.VglIcosahedronGeometry=Ln,t.VglImage=sn,t.VglInt16Attribute=Ki,t.VglInt32Attribute=Qi,t.VglInt8Attribute=Wi,t.VglLatheGeometry=Hn,t.VglLight=hs,t.VglLine=hr,t.VglLineBasicMaterial=bs,t.VglLineDashedMaterial=vs,t.VglLineLoop=ks,t.VglLineSegments=lr,t.VglMaterial=ys,t.VglMesh=Ts,t.VglMeshBasicMaterial=ws,t.VglMeshDepthMaterial=Ns,t.VglMeshLambertMaterial=Ss,t.VglMeshNormalMaterial=xs,t.VglMeshPhongMaterial=$s,t.VglMeshPhysicalMaterial=Ms,t.VglMeshStandardMaterial=As,t.VglMeshToonMaterial=Ds,t.VglObject3d=Mi,t.VglOctahedronGeometry=qn,t.VglOrthographicCamera=Oi,t.VglPath=Nn,t.VglPerspectiveCamera=zi,t.VglPlaneGeometry=Zn,t.VglPointLight=ms,t.VglPoints=Cs,t.VglPointsMaterial=Vs,t.VglPolarGridHelper=as,t.VglPolyhedronGeometry=Dn,t.VglRectAreaLight=fs,t.VglRenderer=qs,t.VglRingGeometry=Wn,t.VglScene=Ws,t.VglShaderMaterial=Ps,t.VglShadowMaterial=Ls,t.VglShape=Sn,t.VglShapeGeometry=Kn,t.VglSphereGeometry=Qn,t.VglSpotLight=ps,t.VglSpotLightHelper=us,t.VglSprite=Gs,t.VglSpriteMaterial=Os,t.VglTetrahedronGeometry=Jn,t.VglTextGeometry=tr,t.VglTexture=no,t.VglTorusGeometry=er,t.VglTorusKnotGeometry=ir,t.VglUint16Attribute=en,t.VglUint32Attribute=nn,t.VglUint8Attribute=Ji,t.VglUint8ClampedAttribute=tn,t.VglUse=rn,Object.defineProperty(t,"__esModule",{value:!0})}));
