1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[56492],{878(t,e,i){function s(t,e){return!!t&&e in t}i.d(e,{f:()=>function t(e,i){if(e)return s(e,i)?e:t(e.parent,i)},i:()=>s})},1907(t,e,i){i.d(e,{A:()=>a,a:()=>r,b:()=>l,c:()=>s,d:()=>n,e:()=>o});let s="#c20017",n="#00ab26",o="#0081d4",a=s,r=n,l=o},6492(t,e,i){i.r(e),i.d(e,{DIVEBaseTool:()=>V,DIVESelectTool:()=>_,DIVETransformTool:()=>R,DragTool:()=>B,HoverTool:()=>d,SelectTool:()=>_,SelectionState:()=>c,Toolbox:()=>G,TransformTool:()=>R,isSelectTool:()=>p,isTransformTool:()=>U});var s=i(9451);i(6179);var n=i(5075);i(122);var o=i(878),a=i(1907),r=Object.defineProperty,l=(t,e,i)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,h=(t,e,i)=>l(t,"symbol"!=typeof e?e+"":e,i);class c{constructor(){h(this,"_selected",null),h(this,"_listeners",new Set)}get selected(){return this._selected}select(t){var e,i,s;this._selected!==t&&(this._selected&&(null==(i=(e=this._selected).onDeselect)||i.call(e)),this._selected=t,null==(s=t.onSelect)||s.call(t),this.notifyListeners())}deselect(){var t,e;this._selected&&(null==(e=(t=this._selected).onDeselect)||e.call(t),this._selected=null,this.notifyListeners())}onChange(t){this._listeners.add(t)}offChange(t){this._listeners.delete(t)}dispose(){this._selected=null,this._listeners.clear()}notifyListeners(){for(let t of this._listeners)t(this._selected)}}class d{constructor(){h(this,"name","hover"),h(this,"priority",20),h(this,"_hovered",null)}get hovered(){return this._hovered}onActivate(){this._hovered=null}onDeactivate(){var t,e;this._hovered&&(null==(e=(t=this._hovered).onPointerLeave)||e.call(t),this._hovered=null)}onPointerMove(t){var e,i,s,n,a,r,l;let h=t.modelIntersects[0],c=(0,o.f)(null==h?void 0:h.object,"isHoverable");if(h&&c){if(!this._hovered){null==(e=c.onPointerEnter)||e.call(c,h),this._hovered=c;return}if(this._hovered.uuid!==c.uuid){null==(s=(i=this._hovered).onPointerLeave)||s.call(i),null==(n=c.onPointerEnter)||n.call(c,h),this._hovered=c;return}null==(a=c.onPointerOver)||a.call(c,h);return}this._hovered&&(null==(l=(r=this._hovered).onPointerLeave)||l.call(r),this._hovered=null)}}let p=t=>"select"===t.name;class _{constructor(t){h(this,"name","select"),h(this,"priority",30),h(this,"_selectionState"),this._selectionState=t}get selected(){return this._selectionState.selected}onActivate(){}onDeactivate(){}onClick(t){let e=t.modelIntersects[0],i=(0,o.f)(null==e?void 0:e.object,"isSelectable");if(!e||!i){this._selectionState.deselect();return}let s=this._selectionState.selected;s&&s.uuid===i.uuid||this._selectionState.select(i)}select(t){this._selectionState.select(t)}deselect(){this._selectionState.deselect()}}let u=new s.tBo,g=new s.Pq0,m=new s.Pq0,w=new s.PTz,v={X:new s.Pq0(1,0,0),Y:new s.Pq0(0,1,0),Z:new s.Pq0(0,0,1)},y={type:"change"},b={type:"mouseDown"},P={type:"mouseUp",mode:null},f={type:"objectChange"};class S extends s.B69{constructor(t,e){super(),void 0===e&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),e=document),this.isTransformControls=!0,this.visible=!1,this.domElement=e,this.domElement.style.touchAction="none";let i=new W;this._gizmo=i,this.add(i);let n=new N;this._plane=n,this.add(n);let o=this;function a(t,e){let s=e;Object.defineProperty(o,t,{get:function(){return void 0!==s?s:e},set:function(e){s!==e&&(s=e,n[t]=e,i[t]=e,o.dispatchEvent({type:t+"-changed",value:e}),o.dispatchEvent(y))}}),o[t]=e,n[t]=e,i[t]=e}a("camera",t),a("object",void 0),a("enabled",!0),a("axis",null),a("mode","translate"),a("translationSnap",null),a("rotationSnap",null),a("scaleSnap",null),a("space","world"),a("size",1),a("dragging",!1),a("showX",!0),a("showY",!0),a("showZ",!0);let r=new s.Pq0,l=new s.Pq0,h=new s.PTz,c=new s.PTz,d=new s.Pq0,p=new s.PTz,_=new s.Pq0,u=new s.Pq0,g=new s.Pq0,m=new s.Pq0;a("worldPosition",r),a("worldPositionStart",l),a("worldQuaternion",h),a("worldQuaternionStart",c),a("cameraPosition",d),a("cameraQuaternion",p),a("pointStart",_),a("pointEnd",u),a("rotationAxis",g),a("rotationAngle",0),a("eye",m),this._offset=new s.Pq0,this._startNorm=new s.Pq0,this._endNorm=new s.Pq0,this._cameraScale=new s.Pq0,this._parentPosition=new s.Pq0,this._parentQuaternion=new s.PTz,this._parentQuaternionInv=new s.PTz,this._parentScale=new s.Pq0,this._worldScaleStart=new s.Pq0,this._worldQuaternionInv=new s.PTz,this._worldScale=new s.Pq0,this._positionStart=new s.Pq0,this._quaternionStart=new s.PTz,this._scaleStart=new s.Pq0,this._getPointer=M.bind(this),this._onPointerDown=E.bind(this),this._onPointerHover=D.bind(this),this._onPointerMove=x.bind(this),this._onPointerUp=I.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(t){void 0!==this.object&&(this.object.updateMatrixWorld(),null===this.object.parent?c
1onsole.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(t)}pointerHover(t){if(void 0===this.object||!0===this.dragging)return;null!==t&&u.setFromCamera(t,this.camera);let e=T(this._gizmo.picker[this.mode],u);e?this.axis=e.object.name:this.axis=null}pointerDown(t){if(void 0!==this.object&&!0!==this.dragging&&(null==t||0===t.button)&&null!==this.axis){null!==t&&u.setFromCamera(t,this.camera);let e=T(this._plane,u,!0);e&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(e.point).sub(this.worldPositionStart)),this.dragging=!0,b.mode=this.mode,this.dispatchEvent(b)}}pointerMove(t){let e=this.axis,i=this.mode,s=this.object,n=this.space;if("scale"===i?n="local":("E"===e||"XYZE"===e||"XYZ"===e)&&(n="world"),void 0===s||null===e||!1===this.dragging||null!==t&&-1!==t.button)return;null!==t&&u.setFromCamera(t,this.camera);let o=T(this._plane,u,!0);if(o){if(this.pointEnd.copy(o.point).sub(this.worldPositionStart),"translate"===i)this._offset.copy(this.pointEnd).sub(this.pointStart),"local"===n&&"XYZ"!==e&&this._offset.applyQuaternion(this._worldQuaternionInv),-1===e.indexOf("X")&&(this._offset.x=0),-1===e.indexOf("Y")&&(this._offset.y=0),-1===e.indexOf("Z")&&(this._offset.z=0),"local"===n&&"XYZ"!==e?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),s.position.copy(this._offset).add(this._positionStart),this.translationSnap&&("local"===n&&(s.position.applyQuaternion(w.copy(this._quaternionStart).invert()),-1!==e.search("X")&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),-1!==e.search("Y")&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),-1!==e.search("Z")&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.position.applyQuaternion(this._quaternionStart)),"world"===n&&(s.parent&&s.position.add(g.setFromMatrixPosition(s.parent.matrixWorld)),-1!==e.search("X")&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),-1!==e.search("Y")&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),-1!==e.search("Z")&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.parent&&s.position.sub(g.setFromMatrixPosition(s.parent.matrixWorld))));else if("scale"===i){if(-1!==e.search("XYZ")){let t=this.pointEnd.length()/this.pointStart.length();0>this.pointEnd.dot(this.pointStart)&&(t*=-1),m.set(t,t,t)}else g.copy(this.pointStart),m.copy(this.pointEnd),g.applyQuaternion(this._worldQuaternionInv),m.applyQuaternion(this._worldQuaternionInv),m.divide(g),-1===e.search("X")&&(m.x=1),-1===e.search("Y")&&(m.y=1),-1===e.search("Z")&&(m.z=1);s.scale.copy(this._scaleStart).multiply(m),this.scaleSnap&&(-1!==e.search("X")&&(s.scale.x=Math.round(s.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),-1!==e.search("Y")&&(s.scale.y=Math.round(s.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),-1!==e.search("Z")&&(s.scale.z=Math.round(s.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if("rotate"===i){this._offset.copy(this.pointEnd).sub(this.pointStart);let t=20/this.worldPosition.distanceTo(g.setFromMatrixPosition(this.camera.matrixWorld)),i=!1;"XYZE"===e?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(g.copy(this.rotationAxis).cross(this.eye))*t):("X"===e||"Y"===e||"Z"===e)&&(this.rotationAxis.copy(v[e]),g.copy(v[e]),"local"===n&&g.applyQuaternion(this.worldQuaternion),g.cross(this.eye),0===g.length()?i=!0:this.rotationAngle=this._offset.dot(g.normalize())*t),("E"===e||i)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=0>this._endNorm.cross(this._startNorm).dot(this.eye)?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),"local"===n&&"E"!==e&&"XYZE"!==e?(s.quaternion.copy(this._quaternionStart),s.quaternion.multiply(w.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),s.quaternion.copy(w.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),s.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(y),this.dispatchEvent(f)}}pointerUp(t){null!==t&&0!==t.button||(this.dragging&&null!==this.axis&&(P.mode=this.mode,this.dispatchEvent(P)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(t){t.geometry&&t.geometry.dispose(),t.material&&t.material.dispose()})}attach(t){return this.object=t,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(y),this.dispatchEvent(f),this.pointStart.copy(this.pointEnd))}getRaycaster(){return u}getMode(){return this.mode}setMode(t){this.mode=t}setTranslationSnap(t){this.translationSnap=t}setRotationSnap(t){this.rotationSnap=t}setScaleSnap(t){this.scaleSnap=t}setSize(t){this.size=t}setSpace(t){this.space=t}}function M(t){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:t.button};{let e=this.domElement.getBoundingClientRect();return{x:(t.clientX-e.left)/e.width*2-1,y:-(t.clientY-e.top)/e.height*2+1,button:t.button}}}function D(t){if(this.enabled)switch(t.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(t))}}function E(t){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(t.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(t)),this.pointerDown(this._getPointer(t)))}function x(t){this.enabled&&this.pointerMove(this._getPointer(t))}function I(t){this.enabled&&(this.domElement.releasePointerCapture(t.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(t)))}function T(t,e,i){let s=e.intersectObject(t,!0);for(let t=0;t<s.length;t++)if(s[t].object.visible||i)return s[t];return!1}let z=new s.O9p,F=new s.Pq0(0,1,0),A=new s.Pq0(0,0,0),j=new s.kn4,q=new s.PTz,Y=new s.PTz,C=new s.Pq0,k=new s.kn4,X=new s.Pq0(1,0,0),Q=new s.Pq0(0,1,0),L=new s.Pq0(0,0,1),Z=new s.Pq0,H=new s.Pq0,O=new s.Pq0;class W extends s.B69{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";let t=new s.V9B({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),e=new s.mrM({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),i=t.clone();i.opacity=.15;let n=e.clone();n.opacity=.5;let o=t.clone();o.color.setHex(0xff0000);let a=t.clone();a.color.setHex(65280);let r=t.clone();r.color.setHex(255);let l=t.clone();l.color.setHex(0xff0000),l.opacity=.5;let h=t.clone();h.color.setHex(65280),h.opacity=.5;let c=t.clone();c.color.setHex(255),c.opacity=.5;let d=t.clone();d.opacity=.25;let p=t.clone();p.color.setHex(0xffff00),p.opacity=.25,t.clone().color.setHex(0xffff00);let _=t.clone();_.color.setHex(7895160);let u=new s.Ho_(0,.04,.1,12);u.translate(0,.05,0);let g=new s.iNn(.08,.08,.08);g.translate(0,.04,0);let m=new s.LoY;m.setAttribute("position",new s.qtW([0,0,0,1,0,0],3));let w=new s.Ho_(.0075,.0075,.5,3);function v(t,e){let i=new s.O3Y(t,.0075,3,64,e*Math.PI*2);return i.rotateY(Math.PI/2),i.rotateX(Math.PI/2),i}w.translate(0,.25,0);let y={X:[[new s.eaF(u,o),[.5,0,0],[0,0,-Math.PI/2]],[new s.eaF(u,o),[
1-.5,0,0],[0,0,Math.PI/2]],[new s.eaF(w,o),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new s.eaF(u,a),[0,.5,0]],[new s.eaF(u,a),[0,-.5,0],[Math.PI,0,0]],[new s.eaF(w,a)]],Z:[[new s.eaF(u,r),[0,0,.5],[Math.PI/2,0,0]],[new s.eaF(u,r),[0,0,-.5],[-Math.PI/2,0,0]],[new s.eaF(w,r),null,[Math.PI/2,0,0]]],XYZ:[[new s.eaF(new s.Ufg(.1,0),d.clone()),[0,0,0]]],XY:[[new s.eaF(new s.iNn(.15,.15,.01),c.clone()),[.15,.15,0]]],YZ:[[new s.eaF(new s.iNn(.15,.15,.01),l.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new s.eaF(new s.iNn(.15,.15,.01),h.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},b={X:[[new s.eaF(new s.Ho_(.2,0,.6,4),i),[.3,0,0],[0,0,-Math.PI/2]],[new s.eaF(new s.Ho_(.2,0,.6,4),i),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new s.eaF(new s.Ho_(.2,0,.6,4),i),[0,.3,0]],[new s.eaF(new s.Ho_(.2,0,.6,4),i),[0,-.3,0],[0,0,Math.PI]]],Z:[[new s.eaF(new s.Ho_(.2,0,.6,4),i),[0,0,.3],[Math.PI/2,0,0]],[new s.eaF(new s.Ho_(.2,0,.6,4),i),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new s.eaF(new s.Ufg(.2,0),i)]],XY:[[new s.eaF(new s.iNn(.2,.2,.01),i),[.15,.15,0]]],YZ:[[new s.eaF(new s.iNn(.2,.2,.01),i),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new s.eaF(new s.iNn(.2,.2,.01),i),[.15,0,.15],[-Math.PI/2,0,0]]]},P={START:[[new s.eaF(new s.Ufg(.01,2),n),null,null,null,"helper"]],END:[[new s.eaF(new s.Ufg(.01,2),n),null,null,null,"helper"]],DELTA:[[new s.N1A(function(){let t=new s.LoY;return t.setAttribute("position",new s.qtW([0,0,0,1,1,1],3)),t}(),n),null,null,null,"helper"]],X:[[new s.N1A(m,n.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new s.N1A(m,n.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new s.N1A(m,n.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},f={XYZE:[[new s.eaF(v(.5,1),_),null,[0,Math.PI/2,0]]],X:[[new s.eaF(v(.5,.5),o)]],Y:[[new s.eaF(v(.5,.5),a),null,[0,0,-Math.PI/2]]],Z:[[new s.eaF(v(.5,.5),r),null,[0,Math.PI/2,0]]],E:[[new s.eaF(v(.75,1),p),null,[0,Math.PI/2,0]]]},S={AXIS:[[new s.N1A(m,n.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},M={XYZE:[[new s.eaF(new s.Gu$(.25,10,8),i)]],X:[[new s.eaF(new s.O3Y(.5,.1,4,24),i),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new s.eaF(new s.O3Y(.5,.1,4,24),i),[0,0,0],[Math.PI/2,0,0]]],Z:[[new s.eaF(new s.O3Y(.5,.1,4,24),i),[0,0,0],[0,0,-Math.PI/2]]],E:[[new s.eaF(new s.O3Y(.75,.1,2,24),i)]]},D={X:[[new s.eaF(g,o),[.5,0,0],[0,0,-Math.PI/2]],[new s.eaF(w,o),[0,0,0],[0,0,-Math.PI/2]],[new s.eaF(g,o),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new s.eaF(g,a),[0,.5,0]],[new s.eaF(w,a)],[new s.eaF(g,a),[0,-.5,0],[0,0,Math.PI]]],Z:[[new s.eaF(g,r),[0,0,.5],[Math.PI/2,0,0]],[new s.eaF(w,r),[0,0,0],[Math.PI/2,0,0]],[new s.eaF(g,r),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new s.eaF(new s.iNn(.15,.15,.01),c),[.15,.15,0]]],YZ:[[new s.eaF(new s.iNn(.15,.15,.01),l),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new s.eaF(new s.iNn(.15,.15,.01),h),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new s.eaF(new s.iNn(.1,.1,.1),d.clone())]]},E={X:[[new s.eaF(new s.Ho_(.2,0,.6,4),i),[.3,0,0],[0,0,-Math.PI/2]],[new s.eaF(new s.Ho_(.2,0,.6,4),i),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new s.eaF(new s.Ho_(.2,0,.6,4),i),[0,.3,0]],[new s.eaF(new s.Ho_(.2,0,.6,4),i),[0,-.3,0],[0,0,Math.PI]]],Z:[[new s.eaF(new s.Ho_(.2,0,.6,4),i),[0,0,.3],[Math.PI/2,0,0]],[new s.eaF(new s.Ho_(.2,0,.6,4),i),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new s.eaF(new s.iNn(.2,.2,.01),i),[.15,.15,0]]],YZ:[[new s.eaF(new s.iNn(.2,.2,.01),i),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new s.eaF(new s.iNn(.2,.2,.01),i),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new s.eaF(new s.iNn(.2,.2,.2),i),[0,0,0]]]},x={X:[[new s.N1A(m,n.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new s.N1A(m,n.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new s.N1A(m,n.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function I(t){let e=new s.B69;for(let i in t)for(let s=t[i].length;s--;){let n=t[i][s][0].clone(),o=t[i][s][1],a=t[i][s][2],r=t[i][s][3],l=t[i][s][4];n.name=i,n.tag=l,o&&n.position.set(o[0],o[1],o[2]),a&&n.rotation.set(a[0],a[1],a[2]),r&&n.scale.set(r[0],r[1],r[2]),n.updateMatrix();let h=n.geometry.clone();h.applyMatrix4(n.matrix),n.geometry=h,n.renderOrder=1/0,n.position.set(0,0,0),n.rotation.set(0,0,0),n.scale.set(1,1,1),e.add(n)}return e}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=I(y)),this.add(this.gizmo.rotate=I(f)),this.add(this.gizmo.scale=I(D)),this.add(this.picker.translate=I(b)),this.add(this.picker.rotate=I(M)),this.add(this.picker.scale=I(E)),this.add(this.helper.translate=I(P)),this.add(this.helper.rotate=I(S)),this.add(this.helper.scale=I(x)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(t){let e=("scale"===this.mode?"local":this.space)==="local"?this.worldQuaternion:Y;this.gizmo.translate.visible="translate"===this.mode,this.gizmo.rotate.visible="rotate"===this.mode,this.gizmo.scale.visible="scale"===this.mode,this.helper.translate.visible="translate"===this.mode,this.helper.rotate.visible="rotate"===this.mode,this.helper.scale.visible="scale"===this.mode;let i=[];i=(i=(i=i.concat(this.picker[this.mode].children)).concat(this.gizmo[this.mode].children)).concat(this.helper[this.mode].children);for(let t=0;t<i.length;t++){let s;let n=i[t];if(n.visible=!0,n.rotation.set(0,0,0),n.position.copy(this.worldPosition),s=this.camera.isOrthographicCamera?(this.camera.top-this.camera.bottom)/this.camera.zoom:this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),n.scale.set(1,1,1).multiplyScalar(s*this.size/4),"helper"===n.tag){n.visible=!1,"AXIS"===n.name?(n.visible=!!this.axis,"X"===this.axis&&(w.setFromEuler(z.set(0,0,0)),n.quaternion.copy(e).multiply(w),Math.abs(F.copy(X).applyQuaternion(e).dot(this.eye))>.9&&(n.visible=!1)),"Y"===this.axis&&(w.setFromEuler(z.set(0,0,Math.PI/2)),n.quaternion.copy(e).multiply(w),Math.abs(F.copy(Q).applyQuaternion(e).dot(this.eye))>.9&&(n.visible=!1)),"Z"===this.axis&&(w.setFromEuler(z.set(0,Math.PI/2,0)),n.quaternion.copy(e).multiply(w),Math.abs(F.copy(L).applyQuaternion(e).dot(this.eye))>.9&&(n.visible=!1)),"XYZE"===this.axis&&(w.setFromEuler(z.set(0,Math.PI/2,0)),F.copy(this.rotationAxis),n.quaternion.setFromRotationMatrix(j.lookAt(A,F,Q)),n.quaternion.multiply(w),n.visible=this.dragging),"E"===this.axis&&(n.visible=!1)):"START"===n.name?(n.position.copy(this.worldPositionStart),n.visible=this.dragging):"END"===n.name?(n.position.copy(this.worldPosition),n.visible=this.dragging):"DELTA"===n.name?(n.position.copy(this.worldPositionStart),n.quaternion.copy(this.worldQuaternionStart),g.set(1e-10,
11e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),g.applyQuaternion(this.worldQuaternionStart.clone().invert()),n.scale.copy(g),n.visible=this.dragging):(n.quaternion.copy(e),this.dragging?n.position.copy(this.worldPositionStart):n.position.copy(this.worldPosition),this.axis&&(n.visible=-1!==this.axis.search(n.name)));continue}n.quaternion.copy(e),"translate"===this.mode||"scale"===this.mode?("X"===n.name&&Math.abs(F.copy(X).applyQuaternion(e).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),"Y"===n.name&&Math.abs(F.copy(Q).applyQuaternion(e).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),"Z"===n.name&&Math.abs(F.copy(L).applyQuaternion(e).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),"XY"===n.name&&.2>Math.abs(F.copy(L).applyQuaternion(e).dot(this.eye))&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),"YZ"===n.name&&.2>Math.abs(F.copy(X).applyQuaternion(e).dot(this.eye))&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),"XZ"===n.name&&.2>Math.abs(F.copy(Q).applyQuaternion(e).dot(this.eye))&&(n.scale.set(1e-10,
11e-10,1e-10),n.visible=!1)):"rotate"===this.mode&&(q.copy(e),F.copy(this.eye).applyQuaternion(w.copy(e).invert()),-1!==n.name.search("E")&&n.quaternion.setFromRotationMatrix(j.lookAt(this.eye,A,Q)),"X"===n.name&&(w.setFromAxisAngle(X,Math.atan2(-F.y,F.z)),w.multiplyQuaternions(q,w),n.quaternion.copy(w)),"Y"===n.name&&(w.setFromAxisAngle(Q,Math.atan2(F.x,F.z)),w.multiplyQuaternions(q,w),n.quaternion.copy(w)),"Z"===n.name&&(w.setFromAxisAngle(L,Math.atan2(F.y,F.x)),w.multiplyQuaternions(q,w),n.quaternion.copy(w))),n.visible=n.visible&&(-1===n.name.indexOf("X")||this.showX),n.visible=n.visible&&(-1===n.name.indexOf("Y")||this.showY),n.visible=n.visible&&(-1===n.name.indexOf("Z")||this.showZ),n.visible=n.visible&&(-1===n.name.indexOf("E")||this.showX&&this.showY&&this.showZ),n.material._color=n.material._color||n.material.color.clone(),n.material._opacity=n.material._opacity||n.material.opacity,n.material.color.copy(n.material._color),n.material.opacity=n.material._opacity,this.enabled&&this.axis&&(n.name===this.axis||this.axis.split("").some(function(t){return n.name===t}))&&(n.material.color.setHex(0xffff00),n.material.opacity=1)}super.updateMatrixWorld(t)}}class N extends s.eaF{constructor(){super(new s.bdM(1e5,1e5,2,2),new s.V9B({visible:!1,wireframe:!0,side:s.$EB,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(t){let e=this.space;switch(this.position.copy(this.worldPosition),"scale"===this.mode&&(e="local"),Z.copy(X).applyQuaternion("local"===e?this.worldQuaternion:Y),H.copy(Q).applyQuaternion("local"===e?this.worldQuaternion:Y),O.copy(L).applyQuaternion("local"===e?this.worldQuaternion:Y),F.copy(H),this.mode){case"translate":case"scale":switch(this.axis){case"X":F.copy(this.eye).cross(Z),C.copy(Z).cross(F);break;case"Y":F.copy(this.eye).cross(H),C.copy(H).cross(F);break;case"Z":F.copy(this.eye).cross(O),C.copy(O).cross(F);break;case"XY":C.copy(O);break;case"YZ":C.copy(Z);break;case"XZ":F.copy(O),C.copy(H);break;case"XYZ":case"E":C.set(0,0,0)}break;default:C.set(0,0,0)}0===C.length()?this.quaternion.copy(this.cameraQuaternion):(k.lookAt(g.set(0,0,0),C,F),this.quaternion.setFromRotationMatrix(k)),super.updateMatrixWorld(t)}}let U=t=>"transform"===t.name;class R extends s.Qev{constructor(t,e,i){super(),h(this,"name","transform"),h(this,"priority",5),h(this,"_scene"),h(this,"_controller"),h(this,"_selectionState"),h(this,"_gizmo"),h(this,"_scaleLinked",!1),h(this,"_gizmoVisible",!0),h(this,"_selectionChangeHandler"),this._scene=t,this._controller=e,this._selectionState=i,this._gizmo=this.initGizmo(),this._scene.add(this._gizmo),this._selectionChangeHandler=this.onSelectionChange.bind(this)}get gizmo(){return this._gizmo}get isDragging(){return this._gizmo.dragging}onActivate(){this._selectionState.onChange(this._selectionChangeHandler);let t=this._selectionState.selected;t&&this.attachGizmo(t)}onDeactivate(){this._selectionState.offChange(this._selectionChangeHandler),this._gizmo.detach()}onPointerMove(t){if(this._gizmo.dragging||t.uiIntersects.length>0&&t.uiIntersects.some(t=>this.isGizmoChild(t.object)))return!0}setGizmoMode(t){this._gizmo.mode=t}setGizmoVisible(t){this._gizmoVisible=t;let e=this._scene.children.includes(this._gizmo);t&&!e?(this._scene.add(this._gizmo),this._gizmo.getRaycaster().layers.enableAll()):!t&&e&&(this._scene.remove(this._gizmo),this._gizmo.getRaycaster().layers.disableAll())}setGizmoScaleLinked(t){this._scaleLinked=t}dispose(){this._selectionState.offChange(this._selectionChangeHandler),this._gizmo.detach(),this._scene.remove(this._gizmo),this._gizmo.dispose()}onSelectionChange(t){t&&(0,o.i)(t,"isMovable")?this.attachGizmo(t):this._gizmo.detach()}attachGizmo(t){(0,o.i)(t,"isMovable")&&(this._gizmo.attach(t),this.setGizmoVisible(t.visible&&this._gizmoVisible))}isGizmoChild(t){let e=t;for(;e;){if(e===this._gizmo)return!0;e=e.parent}return!1}initGizmo(){let t=new S(this._controller.object,this._controller.domElement);return t.mode="translate",t.traverse(t=>{if(!("isMesh"in t))return;let e=t.material;"X"===t.name&&e.color.set(a.A),"Y"===t.name&&e.color.set(a.a),"Z"===t.name&&e.color.set(a.b),"XY"===t.name&&e.color.set(a.b),"YZ"===t.name&&e.color.set(a.A),"XZ"===t.name&&e.color.set(a.a)}),t.addEventListener("mouseDown",()=>{var e,i;this._controller.enabled=!1,(0,o.i)(t.object,"isMovable")&&(null==(i=(e=t.object).onMoveStart)||i.call(e))}),t.addEventListener("objectChange",()=>{var e,i;if((0,o.i)(t.object,"isMovable")){if(null==(i=(e=t.object).onMove)||i.call(e),this._scaleLinked&&t.object){let e=t.object.scale,i=(e.x+e.y+e.z)/3;t.object.scale.set(i,i,i)}switch(this.dispatchEvent({type:"object-change",object:t.object}),t.mode){case"translate":this.dispatchEvent({type:"object-position-change",object:t.object});break;case"rotate":this.dispatchEvent({type:"object-rotation-change",object:t.object});break;case"scale":this.dispatchEvent({type:"object-scale-change",object:t.object})}}}),t.addEventListener("mouseUp",()=>{var e,i;this._controller.enabled=!0,(0,o.i)(t.object,"isMovable")&&(null==(i=(e=t.object).onMoveEnd)||i.call(e))}),t}}class B{constructor(t){h(this,"name","drag"),h(this,"priority",10),h(this,"_controller"),h(this,"_raycaster"),h(this,"_dragging",!1),h(this,"_draggable",null),h(this,"_dragStart",new s.Pq0),h(this,"_dragCurrent",new s.Pq0),h(this,"_dragEnd",new s.Pq0),h(this,"_dragDelta",new s.Pq0),h(this,"_dragRaycastTargets",null),this._controller=t,this._raycaster=new s.tBo}get isDragging(){return this._dragging}get draggable(){return this._draggable}onActivate(){this.resetDragState()}
1onDeactivate(){this._dragging&&this._draggable&&this.endDrag(),this.resetDragState()}onPointerDown(t){var e;t.pointerPrimaryDown&&(this._draggable=(0,o.f)(null==(e=t.intersects[0])?void 0:e.object,"isDraggable")||null)}onPointerMove(t){if(t.pointerPrimaryDown&&this._draggable&&(this._raycaster.setFromCamera(t.pointer,this._controller.object),this._dragging||t.lastPointerDown.distanceTo(t.pointer)>.001&&this.startDrag(t),this._dragging))return this.updateDrag(t),!0}onPointerUp(t){this._dragging&&(this._raycaster.setFromCamera(t.pointer,this._controller.object),this.endDrag()),this._draggable=null}setDragRaycastTargets(t){this._dragRaycastTargets=t}startDrag(t){var e,i;let s=this.getDragIntersect(t);s&&(this._dragStart.copy(s.point),this._dragCurrent.copy(s.point),this._dragEnd.copy(s.point),this._dragDelta.set(0,0,0),null==(i=null==(e=this._draggable)?void 0:e.onDragStart)||i.call(e,this.createDragEvent()),this._dragging=!0,this._controller.enabled=!1)}updateDrag(t){var e,i;let s=this.getDragIntersect(t);s&&(this._dragCurrent.copy(s.point),this._dragEnd.copy(s.point),this._dragDelta.subVectors(this._dragCurrent,this._dragStart),null==(i=null==(e=this._draggable)?void 0:e.onDrag)||i.call(e,this.createDragEvent()))}endDrag(){var t,e;let i=this.createDragEvent();null==(e=null==(t=this._draggable)?void 0:t.onDragEnd)||e.call(t,i),this._dragging=!1,this._controller.enabled=!0,this.resetDragState()}getDragIntersect(t){return this._dragRaycastTargets?this._raycaster.intersectObjects(this._dragRaycastTargets,!0)[0]||null:t.intersects[0]||null}createDragEvent(){return{dragStart:this._dragStart.clone(),dragCurrent:this._dragCurrent.clone(),dragEnd:this._dragEnd.clone(),dragDelta:this._dragDelta.clone()}}resetDragState(){this._dragStart.set(0,0,0),this._dragCurrent.set(0,0,0),this._dragEnd.set(0,0,0),this._dragDelta.set(0,0,0)}}class G{constructor(t,e){h(this,"_scene"),h(this,"_controller"),h(this,"_canvas"),h(this,"_tools"),h(this,"_activeTools",new Map),h(this,"_sortedActiveTools",[]),h(this,"_selectionState"),h(this,"_raycaster"),h(this,"_pointer"),h(this,"_productLayerMask"),h(this,"_uiLayerMask"),h(this,"_pointerPrimaryDown",!1),h(this,"_pointerMiddleDown",!1),h(this,"_pointerSecondaryDown",!1),h(this,"_lastPointerDown"),h(this,"_boundPointerMove"),h(this,"_boundPointerDown"),h(this,"_boundPointerUp"),h(this,"_boundWheel"),this._scene=t,this._controller=e,this._canvas=e.domElement,this._selectionState=new c,this._raycaster=new s.tBo,this._pointer=new s.I9Y,this._lastPointerDown=new s.I9Y,this._productLayerMask=new s.zgK,this._productLayerMask.set(Math.log2(n.P)),this._uiLayerMask=new s.zgK,this._uiLayerMask.set(Math.log2(n.U)),this._tools=new Map([["hover",new d],["select",new _(this._selectionState)],["transform",new R(t,e,this._selectionState)],["drag",new B(e)]]),this._boundPointerMove=this.onPointerMove.bind(this),this._boundPointerDown=this.onPointerDown.bind(this),this._boundPointerUp=this.onPointerUp.bind(this),this._boundWheel=this.onWheel.bind(this),this._canvas.addEventListener("pointermove",this._boundPointerMove),this._canvas.addEventListener("pointerdown",this._boundPointerDown),this._canvas.addEventListener("pointerup",this._boundPointerUp),this._canvas.addEventListener("wheel",this._boundWheel)}get selectionState(){return this._selectionState}enableTool(t){var e;let i=this._tools.get(t);i&&(this._activeTools.has(t)||(this._activeTools.set(t,i),this.updateSortedTools(),null==(e=i.onActivate)||e.call(i)))}disableTool(t){var e;let i=this._activeTools.get(t);i&&(null==(e=i.onDeactivate)||e.call(i),this._activeTools.delete(t),this.updateSortedTools())}isToolEnabled(t){return this._activeTools.has(t)}getTool(t){return this._tools.get(t)}getActiveTools(){return[...this._sortedActiveTools]}dispose(){var t;for(let e of this._activeTools.values())null==(t=e.onDeactivate)||t.call(e);this._activeTools.clear(),this._tools.clear(),this._sortedActiveTools=[],this._canvas.removeEventListener("pointermove",this._boundPointerMove),this._canvas.removeEventListener("pointerdown",this._boundPointerDown),this._canvas.removeEventListener("pointerup",this._boundPointerUp),this._canvas.removeEventListener("wheel",this._boundWheel),this._selectionState.dispose()}onPointerMove(t){var e;this.updatePointer(t);let i=this.createPointerContext(t);for(let t of this._sortedActiveTools)if(null==(e=t.onPointerMove)?void 0:e.call(t,i))break}onPointerDown(t){var e;this.updatePointerState(t,!0),this.updatePointer(t),this._lastPointerDown.copy(this._pointer);let i=this.createPointerContext(t);for(let t of this._sortedActiveTools)if(null==(e=t.onPointerDown)?void 0:e.call(t,i))break}onPointerUp(t){var e,i;this.updatePointer(t);let s=this.createPointerContext(t),n=!this.pointerWasDragged();for(let t of this._sortedActiveTools)if(null==(e=t.onPointerUp)?void 0:e.call(t,s))break;if(n){for(let t of this._sortedActiveTools)if(null==(i=t.onClick)?void 0:i.call(t,s))break}this.updatePointerState(t,!1)}onWheel(t){var e;let i=this.createWheelContext(t);for(let t of this._sortedActiveTools)if(null==(e=t.onWheel)?void 0:e.call(t,i))break}createPointerContext(t){let e=this.raycast();return{event:t,pointer:this._pointer.clone(),intersects:e,modelIntersects:this.filterIntersectsByLayer(e,n.P),uiIntersects:this.filterIntersectsByLayer(e,n.U),pointerPrimaryDown:this._pointerPrimaryDown,pointerMiddleDown:this._pointerMiddleDown,pointerSecondary
1Down:this._pointerSecondaryDown,lastPointerDown:this._lastPointerDown.clone()}}createWheelContext(t){let e=this.raycast();return{event:t,pointer:this._pointer.clone(),intersects:e,modelIntersects:this.filterIntersectsByLayer(e,n.P),uiIntersects:this.filterIntersectsByLayer(e,n.U)}}updatePointer(t){this._pointer.x=t.offsetX/this._canvas.clientWidth*2-1,this._pointer.y=-(2*(t.offsetY/this._canvas.clientHeight))+1,this._raycaster.setFromCamera(this._pointer,this._controller.object)}updatePointerState(t,e){switch(t.button){case 0:this._pointerPrimaryDown=e;break;case 1:this._pointerMiddleDown=e;break;case 2:this._pointerSecondaryDown=e}}raycast(){this._raycaster.layers.mask=n.P|n.U;let t=this._scene.children.filter(t=>t.visible&&"isMesh"in t&&t.isMesh);return this._raycaster.intersectObjects(t,!0)}filterIntersectsByLayer(t,e){return t.filter(t=>(t.object.layers.mask&e)!=0)}updateSortedTools(){this._sortedActiveTools=[...this._activeTools.values()].sort((t,e)=>t.priority-e.priority)}pointerWasDragged(){return this._lastPointerDown.distanceTo(this._pointer)>.001}useTool(t){for(let e of["hover","select","transform","drag"])(e===t||"select"===t)&&this.enableTool(e)}getActiveTool(){return this._sortedActiveTools[0]||null}}class V{constructor(t,e){h(this,"POINTER_DRAG_THRESHOLD",.001),h(this,"name"),h(this,"_canvas"),h(this,"_scene"),h(this,"_controller"),h(this,"_pointer"),h(this,"_pointerPrimaryDown"),h(this,"_pointerMiddleDown"),h(this,"_pointerSecondaryDown"),h(this,"_lastPointerDown"),h(this,"_lastPointerUp"),h(this,"_raycaster"),h(this,"_intersects"),h(this,"_hovered"),h(this,"_dragging"),h(this,"_dragStart"),h(this,"_dragCurrent"),h(this,"_dragEnd"),h(this,"_dragDelta"),h(this,"_draggable"),h(this,"_dragRaycastOnObjects"),this.name="BaseTool",this._canvas=e.domElement,this._scene=t,this._controller=e,this._pointer=new s.I9Y,this._pointerPrimaryDown=!1,this._pointerMiddleDown=!1,this._pointerSecondaryDown=!1,this._lastPointerDown=new s.I9Y,this._lastPointerUp=new s.I9Y,this._raycaster=new s.tBo,this._raycaster.layers.mask=n.P|n.U,this._intersects=[],this._hovered=null,this._dragging=!1,this._dragStart=new s.Pq0,this._dragCurrent=new s.Pq0,this._dragEnd=new s.Pq0,this._dragDelta=new s.Pq0,this._draggable=null,this._dragRaycastOnObjects=null}get _pointerAnyDown(){return this._pointerPrimaryDown||this._pointerMiddleDown||this._pointerSecondaryDown}activate(){}deactivate(){}onPointerDown(t){var e;switch(t.button){case 0:this._pointerPrimaryDown=!0;break;case 1:this._pointerMiddleDown=!0;break;case 2:this._pointerSecondaryDown=!0;break;default:console.warn("DIVEBaseTool.onPointerDown: Unknown button: "+t.button)}this._lastPointerDown.copy(this._pointer),this._draggable=(0,o.f)(null==(e=this._intersects[0])?void 0:e.object,"isDraggable")||null}onDragStart(t){this._draggable&&(null!==this._dragRaycastOnObjects&&(this._intersects=this._raycaster.intersectObjects(this._dragRaycastOnObjects,!0)),0!==this._intersects.length&&(this._dragStart.copy(this._intersects[0].point.clone()),this._dragCurrent.copy(this._intersects[0].point.clone()),this._dragEnd.copy(this._dragStart.clone()),this._dragDelta.set(0,0,0),this._draggable&&this._draggable.onDragStart&&(this._draggable.onDragStart({dragStart:this._dragStart,dragCurrent:this._dragCurrent,dragEnd:this._dragEnd,dragDelta:this._dragDelta}),this._dragging=!0,this._controller.enabled=!1)))}onPointerMove(t){var e;this._pointer.x=t.offsetX/this._canvas.clientWidth*2-1,this._pointer.y=-(2*(t.offsetY/this._canvas.clientHeight))+1,this._raycaster.setFromCamera(this._pointer,this._controller.object),this._intersects=this.raycast(this._scene.children);let i=(0,o.f)(null==(e=this._intersects[0])?void 0:e.object,"isHoverable");if(this._intersects[0]&&i){if(!this._hovered){i.onPointerEnter&&i.onPointerEnter(this._intersects[0]),this._hovered=i;return}if(this._hovered.uuid!==i.uuid){this._hovered.onPointerLeave&&this._hovered.onPointerLeave(),i.onPointerEnter&&i.onPointerEnter(this._intersects[0]),this._hovered=i;return}i.onPointerOver&&i.onPointerOver(this._intersects[0]),this._hovered=i}else this._hovered&&this._hovered.onPointerLeave&&this._hovered.onPointerLeave(),this._hovered=null;this._pointerAnyDown&&(this._dragging||this.onDragStart(t),this.onDrag(t))}onDrag(t){null!==this._dragRaycastOnObjects&&(this._intersects=this._raycaster.intersectObjects(this._dragRaycastOnObjects,!0));let e=this._intersects[0];
1e&&(this._dragCurrent.copy(e.point.clone()),this._dragEnd.copy(e.point.clone()),this._dragDelta.subVectors(this._dragCurrent.clone(),this._dragStart.clone()),this._draggable&&this._draggable.onDrag&&this._draggable.onDrag({dragStart:this._dragStart,dragCurrent:this._dragCurrent,dragEnd:this._dragEnd,dragDelta:this._dragDelta}))}onPointerUp(t){switch(this.pointerWasDragged()||this._dragging?this._draggable&&this.onDragEnd(t):this.onClick(t),t.button){case 0:this._pointerPrimaryDown=!1;break;case 1:this._pointerMiddleDown=!1;break;case 2:this._pointerSecondaryDown=!1}this._lastPointerUp.copy(this._pointer)}onClick(t){}onDragEnd(t){let e=this._intersects[0];e&&(this._dragEnd.copy(e.point.clone()),this._dragCurrent.copy(e.point.clone()),this._dragDelta.subVectors(this._dragCurrent.clone(),this._dragStart.clone())),this._draggable&&this._draggable.onDragEnd&&this._draggable.onDragEnd({dragStart:this._dragStart,dragCurrent:this._dragCurrent,dragEnd:this._dragEnd,dragDelta:this._dragDelta}),this._draggable=null,this._dragging=!1,this._dragStart.set(0,0,0),this._dragCurrent.set(0,0,0),this._dragEnd.set(0,0,0),this._dragDelta.set(0,0,0),this._controller.enabled=!0}onWheel(t){}raycast(t){let e=(t||this._scene.children).filter(t=>t.visible&&"isMesh"in t&&t.isMesh);return this._raycaster.intersectObjects(e,!0)}pointerWasDragged(){return this._lastPointerDown.distanceTo(this._pointer)>this.POINTER_DRAG_THRESHOLD}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.