1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[19449],{1907:(t,e,r)=>{r.d(e,{A:()=>a,a:()=>s,b:()=>h,c:()=>i,d:()=>o,e:()=>n});let i="#c20017",o="#00ab26",n="#0081d4",a=i,s=o,h=n},9449:(t,e,r)=>{r.r(e),r.d(e,{OrientationDisplay:()=>m,OrientationDisplayAxes:()=>y});var i=r(9451);r(8764);var o=r(5075),n=r(1907);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,o,n,a,s=[],h=!0,c=!1;try{if(n=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;h=!1}else for(;!(h=(i=n.call(r)).done)&&(s.push(i.value),s.length!==e);h=!0);}catch(t){c=!0,o=t}finally{try{if(!h&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||d(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||d(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){if(t){if("string"==typeof t)return a(t,e);var r=({}).toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}var f="undefined"!=typeof window&&window.THREE?window.THREE:{CanvasTexture:i.GOR,Sprite:i.kxk,SpriteMaterial:i.RoJ,SRGBColorSpace:i.er$},p=function(t){var e;function r(){var t,e,i,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"rgba(255, 255, 255, 1)";return!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,r),t=r,e=[new f.SpriteMaterial],t=s(t),(i=function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,h()?Reflect.construct(t,e||[],s(this).constructor):t.apply(this,e)))._text="".concat(o),i._textHeight=n,i._color=a,i._backgroundColor=!1,i._padding=0,i._borderWidth=0,i._borderRadius=0,i._borderColor="white",i._strokeWidth=0,i._strokeColor="white",i._fontFace="system-ui",i._fontSize=90,i._fontWeight="normal",i._canvas=document.createElement("canvas"),i._genCanvas(),i}return!function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(r,t),e=[{key:"text",get:function(){return this._text},set:function(t){this._text=t,this._genCanvas()}},{key:"textHeight",get:function(){return this._textHeight},set:function(t){this._textHeight=t,this._genCanvas()}},{key:"color",get:function(){return this._color},set:function(t){this._color=t,this._genCanvas()}},{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._genCanvas()}},{key:"padding",get:function(){return this._padding},set:function(t){this._padding=t,this._genCanvas()}},{key:"borderWidth",get:function(){return this._borderWidth}
1,set:function(t){this._borderWidth=t,this._genCanvas()}},{key:"borderRadius",get:function(){return this._borderRadius},set:function(t){this._borderRadius=t,this._genCanvas()}},{key:"borderColor",get:function(){return this._borderColor},set:function(t){this._borderColor=t,this._genCanvas()}},{key:"fontFace",get:function(){return this._fontFace},set:function(t){this._fontFace=t,this._genCanvas()}},{key:"fontSize",get:function(){return this._fontSize},set:function(t){this._fontSize=t,this._genCanvas()}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(t){this._fontWeight=t,this._genCanvas()}},{key:"strokeWidth",get:function(){return this._strokeWidth},set:function(t){this._strokeWidth=t,this._genCanvas()}},{key:"strokeColor",get:function(){return this._strokeColor},set:function(t){this._strokeColor=t,this._genCanvas()}},{key:"_genCanvas",value:function(){var t=this,e=this._canvas,r=e.getContext("2d"),i=1/this.textHeight,o=Array.isArray(this.borderWidth)?this.borderWidth:[this.borderWidth,this.borderWidth],n=o.map(function(e){return e*t.fontSize*i}),a=(Array.isArray(this.borderRadius)?this.borderRadius:[this.borderRadius,this.borderRadius,this.borderRadius,this.borderRadius]).map(function(e){return e*t.fontSize*i}),s=Array.isArray(this.padding)?this.padding:[this.padding,this.padding],h=s.map(function(e){return e*t.fontSize*i}),c=this.text.split("\n"),d="".concat(this.fontWeight," ").concat(this.fontSize,"px ").concat(this.fontFace);r.font=d;var p=Math.max.apply(Math,u(c.map(function(t){return r.measureText(t).width}))),g=this.fontSize*c.length;if(e.width=p+2*n[0]+2*h[0],e.height=g+2*n[1]+2*h[1],this.borderWidth){if(r.strokeStyle=this.borderColor,n[0]){var _=n[0]/2;r.lineWidth=n[0],r.beginPath(),r.moveTo(_,a[0]),r.lineTo(_,e.height-a[3]),r.moveTo(e.width-_,a[1]),r.lineTo(e.width-_,e.height-a[2]),r.stroke()}if(n[1]){var b=n[1]/2;r.lineWidth=n[1],r.beginPath(),r.moveTo(Math.max(n[0],a[0]),b),r.lineTo(e.width-Math.max(n[0],a[1]),b),r.moveTo(Math.max(n[0],a[3]),e.height-b),r.lineTo(e.width-Math.max(n[0],a[2]),e.height-b),r.stroke()}if(this.borderRadius){var y=Math.max.apply(Math,u(n)),m=y/2;r.lineWidth=y,r.beginPath(),[!!a[0]&&[a[0],m,m,a[0]],!!a[1]&&[e.width-a[1],e.width-m,m,a[1]],!!a[2]&&[e.width-a[2],e.width-m,e.height-m,e.height-a[2]],!!a[3]&&[a[3],m,e.height-m,e.height-a[3]]].filter(function(t){return t}).forEach(function(t){var e=l(t,4),i=e[0],o=e[1],n=e[2],a=e[3];r.moveTo(i,n),r.quadraticCurveTo(o,n,o,a)}),r.stroke()}}this.backgroundColor&&(r.fillStyle=this.backgroundColor,this.borderRadius?(r.beginPath(),r.moveTo(n[0],a[0]),[[n[0],a[0],e.width-a[1],n[1],n[1],n[1]],[e.width-n[0],e.width-n[0],e.width-n[0],n[1],a[1],e.height-a[2]],[e.width-n[0],e.width-a[2],a[3],e.height-n[1],e.height-n[1],e.height-n[1]],[n[0],n[0],n[0],e.height-n[1],e.height-a[3],a[0]]].forEach(function(t){var e=l(t,6),i=e[0],o=e[1],n=e[2],a=e[3],s=e[4],h=e[5];r.quadraticCurveTo(i,a,o,s),r.lineTo(n,h)}),r.closePath(),r.fill()):r.fillRect(n[0],n[1],e.width-2*n[0],e.height-2*n[1])),r.translate.apply(r,u(n)),r.translate.apply(r,u(h)),r.font=d,r.fillStyle=this.color,r.textBaseline="bottom";var v=this.strokeWidth>0;v&&(r.lineWidth=this.strokeWidth*this.fontSize/10,r.strokeStyle=this.strokeColor),c.forEach(function(e,i){var o=(p-r.measureText(e).width)/2,n=(i+1)*t.fontSize;v&&r.strokeText(e,o,n),r.fillText(e,o,n)}),this.material.map&&this.material.map.dispose(),(this.material.map=new f.CanvasTexture(e)).colorSpace
1=f.SRGBColorSpace;var w=this.textHeight*c.length+2*o[1]+2*s[1];this.scale.set(w*e.width/e.height,w,0)}},{key:"clone",value:function(){return new this.constructor(this.text,this.textHeight,this.color).copy(this)}},{key:"copy",value:function(t){return f.Sprite.prototype.copy.call(this,t),this.color=t.color,this.backgroundColor=t.backgroundColor,this.padding=t.padding,this.borderWidth=t.borderWidth,this.borderColor=t.borderColor,this.fontFace=t.fontFace,this.fontSize=t.fontSize,this.fontWeight=t.fontWeight,this.strokeWidth=t.strokeWidth,this.strokeColor=t.strokeColor,this}}],function(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e);if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:e+""}(i.key),i)}}(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}(f.Sprite),g=Object.defineProperty,_=(t,e,r)=>e in t?g(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,b=(t,e,r)=>_(t,"symbol"!=typeof e?e+"":e,r);class y extends i.B69{constructor(){super(),b(this,"_axesHelper"),this._axesHelper=new i.IzY(.5),this._axesHelper.layers.mask=o.C,this._axesHelper.material.depthTest=!1,this._axesHelper.position.set(0,0,-1),this._axesHelper.setColors(new i.Q1f(n.A),new i.Q1f(n.a),new i.Q1f(n.b));let t=new p("X",.2,n.c),e=new p("Y",.2,n.d),r=new p("Z",.2,n.e);t.layers.mask=o.C,e.layers.mask=o.C,r.layers.mask=o.C,t.position.set(.7,0,0),e.position.set(0,.7,0),r.position.set(0,0,.7),this._axesHelper.add(t),this._axesHelper.add(e),this._axesHelper.add(r),this.add(this._axesHelper)}setFromCameraMatrix(t){this._axesHelper.rotation.setFromRotationMatrix(new i.kn4().extractRotation(t).invert())}}class m{constructor(t,e,r){b(this,"uuid",i.cj9.generateUUID()),b(this,"_axes"),b(this,"_orthographicCamera"),b(this,"_restoreViewport",new i.IUQ),this._renderer=t,this._scene=e,this._camera=r,this._orthographicCamera=new i.qUd(-1,1,1,-1,.1,100),this._orthographicCamera.name="OrientationDisplayCamera",this._orthographicCamera.layers.mask=o.C,this._scene.add(this._orthographicCamera),this._axes=new y,this._axes.name="OrientationDisplayAxes",this._scene.add(this._axes)}tick(){let t=this._scene.background??null;this._scene.background=null,this._renderer.webglrenderer.getViewport(this._restoreViewport),this._renderer.webglrenderer.setViewport(0,0,150,150),this._renderer.webglrenderer.autoClear=!1,this._axes.setFromCameraMatrix(this._camera.matrix),this._renderer.webglrenderer.render(this._scene,this._orthographicCamera),this._renderer.webglrenderer.setViewport(this._restoreViewport),this._renderer.webglrenderer.autoClear=!0,this._scene.background=t}dispose(){this._scene.remove(this._axes),this._scene.remove(this._orthographicCamera)}}}}]);
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.