1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[19449],{1907(t,e,r){r.d(e,{A:()=>s,a:()=>a,b:()=>h,c:()=>i,d:()=>o,e:()=>n});let i="#c20017",o="#00ab26",n="#0081d4",s=i,a=o,h=n},9449(t,e,r){r.d(e,{OrientationDisplay:()=>m});var i=r(9451);r(6179);var o=r(5075);r(122);var n=r(1907);function s(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 a(t){return(a=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 u(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,s,a=[],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)&&(a.push(i.value),a.length!==e);h=!0);}catch(t){c=!0,o=t}finally{try{if(!h&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(t,e)||f(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 l(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||f(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 f(t,e){if(t){if("string"==typeof t)return s(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)?s(t,e):void 0}}var d="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,s=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 d.SpriteMaterial],t=a(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||[],a(this).constructor):t.apply(this,e)))._text="".concat(o),i._textHeight=n,i._color=s,i._backgroundColor=!1,i._padding=0,i._borderWidth=0,i._borderRadius=0,i._borderColor="white",i._offsetX=0,i._offsetY=0,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:"offsetX",get:function(){return this._offsetX},set:function(t){this._offsetX=t,this._genCanvas()}},{key:"offsetY",get:function(){return this._offsetY},set:function(t){this._offsetY=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}),s=(Array.isArray(this.borderRadius)?this.borderRadius:[this.borderRadius,this.borderRadius,this.borderRadius,this.borderRadius]).map(function(e){return e*t.fontSize*i}),a=Array.isArray(this.padding)?this.padding:[this.padding,this.padding],h=a.map(function(e){return e*t.fontSize*i}),c=[this.offsetX,this.offsetY].map(function(e){return e*t.fontSize*i}),f=this.text.split("\n"),p="".concat(this.fontWeight," ").concat(this.fontSize,"px ").concat(this.fontFace);r.font=p;var _=Math.max.apply(Math,l(f.map(function(t){return r.measureText(t).width}))),b=this.fontSize*f.length,g=_+2*n[0]+2*h[0],y=b+2*n[1]+2*h[1];if(e.width=g+Math.abs(c[0]),e.height=y+Math.abs(c[1]),r.translate.apply(r,l(c.map(function(t){return Math.max(0,t)}))),this.borderWidth){if(r.strokeStyle=this.borderColor,n[0]){var m=n[0]/2;r.lineWidth=n[0],r.beginPath(),r.moveTo(m,s[0]),r.lineTo(m,y-s[3]),r.moveTo(g-m,s[1]),r.lineTo(g-m,y-s[2]),r.stroke()}if(n[1]){var v=n[1]/2;r.lineWidth=n[1],r.beginPath(),r.moveTo(Math.max(n[0],s[0]),v),r.lineTo(g-Math.max(n[0],s[1]),v),r.moveTo(Math.max(n[0],s[3]),y-v),r.lineTo(g-Math.max(n[0],s[2]),y-v),r.stroke()}if(this.borderRadius){var C=Math.max.apply(Math,l(n)),k=C/2;r.lineWidth=C,r.beginPath(),[!!s[0]&&[s[0],k,k,s[0]],!!s[1]&&[g-s[1],g-k,k,s[1]],!!s[2]&&[g-s[2],g-k,y-k,y-s[2]],!!s[3]&&[s[3],k,y-k,y-s[3]]].filter(function(t){return t}).forEach(function(t){var e=u(t,4),i=e[0],o=e[1],n=e[2],s=e[3];r.moveTo(i,n),r.quadraticCurveTo(o,n,o,s)}),r.stroke()}}this.backgroundColor&&(r.fillStyle=this.backgroundColor,this.borderRadius?(r.beginPath(),r.moveTo(n[0],s[0]),[[n[0],s[0],g-s[1],n[1],n[1],n[1]],[g-n[0],g-n[0],g-n[0],n[1],s[1],y-s[2]],[g-n[0],g-s[2],s[3],y-n[1],y-n[1],y-n[1]],[n[0],n[0],n[0],y-n[1],y-s[3],s[0]]].forEach(function(t){var e=u(t,6),i=e[0],o=e[1],n=e[2],s=e[3],a=e[4],h=e[5];r.quadraticCurveTo(i,s,o,a),r.lineTo(n,h)}),r.closePath(),r.fill()):r.fillRect(n[0],n[1],g-2*n[0],y-2*n[1])),r.translate.apply(r,l(n)),r.translate.apply(r,l(h)),r.font=p,r.fillStyle=this.color,r.textBaseline="bottom";var x=this.strokeWidth>0;x&&(r.lineWidth=this.strokeWidth*this.fontSize/10,r.strokeStyle=this.strokeColor),f.forEach(function(e,i){var o=(_-r.measureText(e).width)/2,n=(i+1)*t.fontSize;x&&r.strokeText(e,o,n),r.fillText(e,o,n)}),this.material.map&&this.material.map.dispose(),(this.material.map=new d.CanvasTexture(e)).colorSpace
1=d.SRGBColorSpace;var w=this.textHeight*f.length+2*o[1]+2*a[1]+Math.abs(this.offsetY);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 d.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.offsetX=t.offsetX,this.offsetY=t.offsetY,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}(d.Sprite),_=Object.defineProperty,b=(t,e,r)=>e in t?_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,g=(t,e,r)=>b(t,"symbol"!=typeof e?e+"":e,r);class y extends i.B69{constructor(){super(),g(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){g(this,"uuid",i.cj9.generateUUID()),g(this,"_axes"),g(this,"_orthographicCamera"),g(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.