@arcgis/core 5.2.0-next.160 → 5.2.0-next.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{15bcf7cfe603f2ee1a24.js → 28104681ba161967039f.js} +1 -1
- package/assets/esri/core/workers/chunks/{842893e75696428d536f.js → 3b0808ee3c4facfaca3d.js} +1 -1
- package/assets/esri/core/workers/chunks/{eebbde81e56d69dc602f.js → 44f90e75c1dc3d726a95.js} +1 -1
- package/assets/esri/core/workers/chunks/{4eae066673484986d4c1.js → 4ed76fb5f6096a089f5b.js} +1 -1
- package/assets/esri/core/workers/chunks/5daa9429808ca31279f2.js +1 -0
- package/assets/esri/core/workers/chunks/83f29a159b8b5197e76a.js +1 -0
- package/assets/esri/core/workers/chunks/{77ebacfdf8e57f2e03f1.js → 8480fe6b4372dbbfa7cc.js} +1 -1
- package/assets/esri/core/workers/chunks/{1d77c8c59b0118c7e77b.js → 85bba551057366cd00ae.js} +1 -1
- package/assets/esri/core/workers/chunks/a2fcbc494333376192aa.js +1 -0
- package/assets/esri/core/workers/chunks/{f1df76f098a3cc924832.js → b5df193c93e9c19f9700.js} +1 -1
- package/assets/esri/core/workers/chunks/{02f8654852d389583891.js → e04fb83ab2634bc15cc7.js} +1 -1
- package/assets/esri/core/workers/chunks/f74ae0eff3f08978e607.js +1 -0
- package/chunks/RibbonLine.glsl.js +69 -83
- package/config.d.ts +62 -34
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/core/mapCollectionUtils.js +1 -1
- package/core/workers/Connection.d.ts +58 -89
- package/core/workers.d.ts +45 -54
- package/geometry/support/Indices.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/geometry/support/ray.js +1 -1
- package/kernel.js +1 -1
- package/layers/GeospatialPDFLayer.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/support/commonProperties.js +1 -1
- package/package.json +2 -2
- package/rest/print.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/input/handlers/DragZoom.js +1 -1
- package/views/3d/input/handlers/MouseWheelFov.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/extrudePolygon.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/state/controllers/FovController.js +1 -1
- package/views/3d/state/controllers/GroundNavigationController.js +1 -1
- package/views/3d/state/controllers/momentum/GroundNavigationMomentumController.js +1 -1
- package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/TextureReference.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/editGeometry/operations/RotateVertex.js +1 -1
- package/views/interactive/editGeometry/operations/ScaleVertex.js +1 -1
- package/views/interactive/editGeometry/operations/SetAllVertexPositions.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/Search/LocatorSearchSource.d.ts +22 -1
- package/widgets/support/SelectionList/GroupLayerItem.d.ts +2 -0
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/ItemBase.d.ts +2 -0
- package/widgets/support/SelectionList/ItemBase.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/assets/esri/core/workers/chunks/7d212c415f2709037408.js +0 -1
- package/assets/esri/core/workers/chunks/abb9e820d2871fa7acae.js +0 -1
- package/assets/esri/core/workers/chunks/ade5fdcd08dcbac74740.js +0 -1
- package/assets/esri/core/workers/chunks/b390b9cde2884755e8be.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[491],{32198(t,e,n){function r(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function i(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose],n&&(i=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>r,hk:()=>a,mS:()=>i}),Object.create,Object.create;var o="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var r=new Error(n);return r.name="SuppressedError",r.error=t,r.suppressed=e,r};function a(t){function e(e){t.error=t.hasError?new o(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,r=0;return function i(){for(;n=t.stack.pop();)try{if(!n.async&&1===r)return r=0,t.stack.push(n),Promise.resolve().then(i);if(n.dispose){var o=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(o).then(i,function(t){return e(t),i()})}else r|=1}catch(t){e(t)}if(1===r)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},4341(t,e,n){n.d(e,{I:()=>i});var r=n(26390);class i{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,o));t++)this._items.push(this._allocator())}}const o=1024},29242(t,e,n){function r(){return[1,0,0,0,1,0,0,0,1]}function i(t,e,n,r,i,o,a,s,u){return[t,e,n,r,i,o,a,s,u]}n.d(e,{fA:()=>i,vt:()=>r});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:i},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,o])},9093(t,e,n){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}n.d(e,{o8:()=>i,vt:()=>r});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:i,create:r,fromValues:function(t,e,n,r,i,o,a,s,u,h,c,l,f,d,m,M){return[t,e,n,r,i,o,a,s,u,h,c,l,f,d,m,M]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,o])},82534(t,e,n){function r(){return[0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3]]}n.d(e,{o8:()=>i,vt:()=>r});const o=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:i,create:r,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,o])},77690(t,e,n){n.d(e,{B8:()=>s,Ge:()=>d,I0:()=>f,KC:()=>u,a4:()=>h,hZ:()=>o,hs:()=>l,lw:()=>c,mg:()=>a,z0:()=>i});var r=n(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function o(t,e,n,r,i,o,a,s,u,h){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=h,t}function a(t,e){if(t===e){let n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function s(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=c*a-s*h,f=-c*o+s*u,d=h*o-a*u,m=n*l+r*f+i*d;return m?(m=1/m,t[0]=l*m,t[1]=(-c*r+i*h)*m,t[2]=(s*r-i*a)*m,t[3]=f*m,t[4]=(c*n-i*u)*m,t[5]=(-s*n+i*o)*m,t[6]=d*m,t[7]=(-h*n+r*u)*m,t[8]=(a*n-r*o)*m,t):null}function u(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8];return t[0]=a*c-s*h,t[1]=i*h-r*c,t[2]=r*s-i*a,t[3]=s*u-o*c,t[4]=n*c-i*u,t[5]=i*o-n*s,t[6]=o*h-a*u,t[7]=r*u-n*h,t[8]=n*a-r*o,t}function h(t){let e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],h=t[8];return e*(h*o-a*u)+n*(-h*i+a*s)+r*(u*i-o*s)}function c(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=n[0],d=n[1],m=n[2],M=n[3],b=n[4],g=n[5],_=n[6],p=n[7],v=n[8];return t[0]=f*r+d*a+m*h,t[1]=f*i+d*s+m*c,t[2]=f*o+d*u+m*l,t[3]=M*r+b*a+g*h,t[4]=M*i+b*s+g*c,t[5]=M*o+b*u+g*l,t[6]=_*r+p*a+v*h,t[7]=_*i+p*s+v*c,t[8]=_*o+p*u+v*l,t}function l(t,e,n){let r=n[0],i=n[1],o=n[2];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=o*e[6],t[7]=o*e[7],t[8]=o*e[8],t}function f(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,h=n*a,c=r*a,l=r*s,f=i*a,d=i*s,m=i*u,M=o*a,b=o*s,g=o*u;return t[0]=1-l-m,t[3]=c-g,t[6]=f+b,t[1]=c+g,t[4]=1-h-m,t[7]=d-M,t[2]=f-b,t[5]=d+M,t[8]=1-h-l,t}function d(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15],_=n*s-r*a,p=n*u-i*a,v=n*h-o*a,x=r*u-i*s,y=r*h-o*s,S=i*h-o*u,w=c*M-l*m,A=c*b-f*m,j=c*g-d*m,O=l*b-f*M,T=l*g-d*M,q=f*g-d*b,C=_*q-p*T+v*O+x*j-y*A+S*w;return C?(C=1/C,t[0]=(s*q-u*T+h*O)*C,t[1]=(u*j-a*q-h*A)*C,t[2]=(a*T-s*j+h*w)*C,t[3]=(i*T-r*q-o*O)*C,t[4]=(n*q-i*j+o*A)*C,t[5]=(r*j-n*T-o*w)*C,t[6]=(M*S-b*y+g*x)*C,t[7]=(b*v-m*S-g*p)*C,t[8]=(m*y-M*v+g*_)*C,t):null}function m(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}const M=c,b=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:u,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:h,equals:function(t,e){let n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],h=t[6],c=t[7],l=t[8],f=e[0],d=e[1],m=e[2],M=e[3],b=e[4],g=e[5],_=e[6],p=e[7],v=e[8],x=(0,r.FD)();return Math.abs(n-f)<=x*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(i-d)<=x*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-m)<=x*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(a-M)<=x*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(s-b)<=x*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(u-g)<=x*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(h-_)<=x*Math.max(1,Math.abs(h),Math.abs(_))&&Math.abs(c-p)<=x*Math.max(1,Math.abs(c),Math.abs(p))&&Math.abs(l-v)<=x*Math.max(1,Math.abs(l),Math.abs(v))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:i,fromQuat:f,fromRotation:function(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:s,isOrthoNormal:function(t){let e=(0,r.FD)(),n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],h=t[6],c=t[7],l=t[8];return Math.abs(1-(n*n+a*a+h*h))<=e&&Math.abs(1-(i*i+s*s+c*c))<=e&&Math.abs(1-(o*o+u*u+l*l))<=e},mul:M,multiply:c,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},normalFromMat4:d,normalFromMat4Legacy:function(t,e){let n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],h=e[9],c=e[10],l=c*a-s*h,f=-c*o+s*u,d=h*o-a*u,m=n*l+r*f+i*d;if(!m)return null;let M=1/m;return t[0]=l*M,t[1]=(-c*r+i*h)*M,t[2]=(s*r-i*a)*M,t[3]=f*M,t[4]=(c*n-i*u)*M,t[5]=(-s*n+i*o)*M,t[6]=d*M,t[7]=(-h*n+r*u)*M,t[8]=(a*n-r*o)*M,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=Math.sin(n),d=Math.cos(n);return t[0]=d*r+f*a,t[1]=d*i+f*s,t[2]=d*o+f*u,t[3]=d*a-f*r,t[4]=d*s-f*i,t[5]=d*u-f*o,t[6]=h,t[7]=c,t[8]=l,t},scale:l,scaleByVec2:function(t,e,n){let r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t},set:o,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:b,subtract:m,translate:function(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=n[0],d=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=f*r+d*a+h,t[7]=f*i+d*s+c,t[8]=f*o+d*u+l,t},transpose:a},Symbol.toStringTag,{value:"Module"}))},58083(t,e,n){n.d(e,{$0:()=>g,$h:()=>O,B8:()=>c,C:()=>o,D_:()=>s,N9:()=>p,O7:()=>j,Qw:()=>h,Tl:()=>f,X_:()=>S,e$:()=>m,eL:()=>M,hM:()=>_,hZ:()=>a,hs:()=>d,kN:()=>b,l:()=>w,lw:()=>l,mg:()=>u,o1:()=>A,sC:()=>y,t2:()=>C,t5:()=>T,tZ:()=>E,ut:()=>R});var r=n(51850),i=n(34304);function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function a(t,e,n,r,i,o,a,s,u,h,c,l,f,d,m,M,b){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=h,t[9]=c,t[10]=l,t[11]=f,t[12]=d,t[13]=m,t[14]=M,t[15]=b,t}function s(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function u(t,e){if(t===e){let n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function h(t,e){return c(t,e)||s(t),t}function c(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15],_=n*s-r*a,p=n*u-i*a,v=n*h-o*a,x=r*u-i*s,y=r*h-o*s,S=i*h-o*u,w=c*M-l*m,A=c*b-f*m,j=c*g-d*m,O=l*b-f*M,T=l*g-d*M,q=f*g-d*b,C=_*q-p*T+v*O+x*j-y*A+S*w;return C?(C=1/C,t[0]=(s*q-u*T+h*O)*C,t[1]=(i*T-r*q-o*O)*C,t[2]=(M*S-b*y+g*x)*C,t[3]=(f*y-l*S-d*x)*C,t[4]=(u*j-a*q-h*A)*C,t[5]=(n*q-i*j+o*A)*C,t[6]=(b*v-m*S-g*p)*C,t[7]=(c*S-f*v+d*p)*C,t[8]=(a*T-s*j+h*w)*C,t[9]=(r*j-n*T-o*w)*C,t[10]=(m*y-M*v+g*_)*C,t[11]=(l*v-c*y-d*_)*C,t[12]=(s*A-a*O-u*w)*C,t[13]=(n*O-r*A+i*w)*C,t[14]=(M*p-m*x-b*_)*C,t[15]=(c*x-l*p+f*_)*C,t):null}function l(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=e[9],d=e[10],m=e[11],M=e[12],b=e[13],g=e[14],_=e[15],p=n[0],v=n[1],x=n[2],y=n[3];return t[0]=p*r+v*s+x*l+y*M,t[1]=p*i+v*u+x*f+y*b,t[2]=p*o+v*h+x*d+y*g,t[3]=p*a+v*c+x*m+y*_,p=n[4],v=n[5],x=n[6],y=n[7],t[4]=p*r+v*s+x*l+y*M,t[5]=p*i+v*u+x*f+y*b,t[6]=p*o+v*h+x*d+y*g,t[7]=p*a+v*c+x*m+y*_,p=n[8],v=n[9],x=n[10],y=n[11],t[8]=p*r+v*s+x*l+y*M,t[9]=p*i+v*u+x*f+y*b,t[10]=p*o+v*h+x*d+y*g,t[11]=p*a+v*c+x*m+y*_,p=n[12],v=n[13],x=n[14],y=n[15],t[12]=p*r+v*s+x*l+y*M,t[13]=p*i+v*u+x*f+y*b,t[14]=p*o+v*h+x*d+y*g,t[15]=p*a+v*c+x*m+y*_,t}function f(t,e,n){let r=n[0],i=n[1],o=n[2];if(e===t)t[12]=e[0]*r+e[4]*i+e[8]*o+e[12],t[13]=e[1]*r+e[5]*i+e[9]*o+e[13],t[14]=e[2]*r+e[6]*i+e[10]*o+e[14],t[15]=e[3]*r+e[7]*i+e[11]*o+e[15];else{let n=e[0],a=e[1],s=e[2],u=e[3],h=e[4],c=e[5],l=e[6],f=e[7],d=e[8],m=e[9],M=e[10],b=e[11];t[0]=n,t[1]=a,t[2]=s,t[3]=u,t[4]=h,t[5]=c,t[6]=l,t[7]=f,t[8]=d,t[9]=m,t[10]=M,t[11]=b,t[12]=n*r+h*i+d*o+e[12],t[13]=a*r+c*i+m*o+e[13],t[14]=s*r+l*i+M*o+e[14],t[15]=u*r+f*i+b*o+e[15]}return t}function d(t,e,n){let r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function m(t,e,n,r){let a=r[0],s=r[1],u=r[2],h=Math.sqrt(a*a+s*s+u*u);if(h<=(0,i.FD)())return void o(t,e);h=1/h,a*=h,s*=h,u*=h;let c=Math.sin(n),l=Math.cos(n),f=1-l,d=e[0],m=e[1],M=e[2],b=e[3],g=e[4],_=e[5],p=e[6],v=e[7],x=e[8],y=e[9],S=e[10],w=e[11],A=a*a*f+l,j=s*a*f+u*c,O=u*a*f-s*c,T=a*s*f-u*c,q=s*s*f+l,C=u*s*f+a*c,R=a*u*f+s*c,E=s*u*f-a*c,P=u*u*f+l;t[0]=d*A+g*j+x*O,t[1]=m*A+_*j+y*O,t[2]=M*A+p*j+S*O,t[3]=b*A+v*j+w*O,t[4]=d*T+g*q+x*C,t[5]=m*T+_*q+y*C,t[6]=M*T+p*q+S*C,t[7]=b*T+v*q+w*C,t[8]=d*R+g*E+x*P,t[9]=m*R+_*E+y*P,t[10]=M*R+p*E+S*P,t[11]=b*R+v*E+w*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15])}function M(t,e,n){let r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],h=e[8],c=e[9],l=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+h*r,t[5]=a*i+c*r,t[6]=s*i+l*r,t[7]=u*i+f*r,t[8]=h*i-o*r,t[9]=c*i-a*r,t[10]=l*i-s*r,t[11]=f*i-u*r,t}function b(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function g(t,e,n){if(0===e)return s(t);let r=n[0],o=n[1],a=n[2],u=Math.sqrt(r*r+o*o+a*a);if(u<=(0,i.FD)())return null;u=1/u,r*=u,o*=u,a*=u;let h=Math.sin(e),c=Math.cos(e),l=1-c;return t[0]=r*r*l+c,t[1]=o*r*l+a*h,t[2]=a*r*l-o*h,t[3]=0,t[4]=r*o*l-a*h,t[5]=o*o*l+c,t[6]=a*o*l+r*h,t[7]=0,t[8]=r*a*l+o*h,t[9]=o*a*l-r*h,t[10]=a*a*l+c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function p(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function v(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,h=o+o,c=r*s,l=r*u,f=r*h,d=i*u,m=i*h,M=o*h,b=a*s,g=a*u,_=a*h;return t[0]=1-(d+M),t[1]=l+_,t[2]=f-g,t[3]=0,t[4]=l-_,t[5]=1-(c+M),t[6]=m+b,t[7]=0,t[8]=f+g,t[9]=m-b,t[10]=1-(c+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const x=(0,r.vt)();function y(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function S(t,e){let n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],h=e[9],c=e[10];return t[0]=Math.sqrt(n*n+r*r+i*i),t[1]=Math.sqrt(o*o+a*a+s*s),t[2]=Math.sqrt(u*u+h*h+c*c),t}function w(t,e){let n=e[0]+e[5]+e[10],r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t}function A(t,e,n,r){let i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,h=o+o,c=a+a,l=i*u,f=i*h,d=i*c,m=o*h,M=o*c,b=a*c,g=s*u,_=s*h,p=s*c,v=r[0],x=r[1],y=r[2];return t[0]=(1-(m+b))*v,t[1]=(f+p)*v,t[2]=(d-_)*v,t[3]=0,t[4]=(f-p)*x,t[5]=(1-(l+b))*x,t[6]=(M+g)*x,t[7]=0,t[8]=(d+_)*y,t[9]=(M-g)*y,t[10]=(1-(l+m))*y,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function j(t,e,n,r,i){let o=e[0],a=e[1],s=e[2],u=e[3],h=o+o,c=a+a,l=s+s,f=o*h,d=o*c,m=o*l,M=a*c,b=a*l,g=s*l,_=u*h,p=u*c,v=u*l,x=r[0],y=r[1],S=r[2],w=i[0],A=i[1],j=i[2],O=(1-(M+g))*x,T=(d+v)*x,q=(m-p)*x,C=(d-v)*y,R=(1-(f+g))*y,E=(b+_)*y,P=(m+p)*S,I=(b-_)*S,z=(1-(f+M))*S;return t[0]=O,t[1]=T,t[2]=q,t[3]=0,t[4]=C,t[5]=R,t[6]=E,t[7]=0,t[8]=P,t[9]=I,t[10]=z,t[11]=0,t[12]=n[0]+w-(O*w+C*A+P*j),t[13]=n[1]+A-(T*w+R*A+I*j),t[14]=n[2]+j-(q*w+E*A+z*j),t[15]=1,t}function O(t,e,n,r,i,o,a){let s=1/(n-e),u=1/(i-r),h=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*h,t[15]=0,t}function T(t,e,n,r){let o=e[0],a=e[1],u=e[2],h=o-n[0],c=a-n[1],l=u-n[2],f=(0,i.FD)();if(Math.abs(h)<f&&Math.abs(c)<f&&Math.abs(l)<f)return void s(t);let d=1/Math.sqrt(h*h+c*c+l*l);h*=d,c*=d,l*=d;let m=r[0],M=r[1],b=r[2],g=M*l-b*c,_=b*h-m*l,p=m*c-M*h;d=Math.sqrt(g*g+_*_+p*p),d?(d=1/d,g*=d,_*=d,p*=d):(g=0,_=0,p=0);let v=c*p-l*_,x=l*g-h*p,y=h*_-c*g;d=Math.sqrt(v*v+x*x+y*y),d?(d=1/d,v*=d,x*=d,y*=d):(v=0,x=0,y=0),t[0]=g,t[1]=v,t[2]=h,t[3]=0,t[4]=_,t[5]=x,t[6]=c,t[7]=0,t[8]=p,t[9]=y,t[10]=l,t[11]=0,t[12]=-(g*o+_*a+p*u),t[13]=-(v*o+x*a+y*u),t[14]=-(h*o+c*a+l*u),t[15]=1}function q(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function C(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function R(t){let e=(0,i.FD)(),n=t[0],r=t[1],o=t[2],a=t[4],s=t[5],u=t[6],h=t[8],c=t[9],l=t[10];return Math.abs(1-(n*n+a*a+h*h))<=e&&Math.abs(1-(r*r+s*s+c*c))<=e&&Math.abs(1-(o*o+u*u+l*l))<=e}function E(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const P=l,I=q;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15];return t[0]=s*(f*g-d*b)-l*(u*g-h*b)+M*(u*d-h*f),t[1]=-(r*(f*g-d*b)-l*(i*g-o*b)+M*(i*d-o*f)),t[2]=r*(u*g-h*b)-s*(i*g-o*b)+M*(i*h-o*u),t[3]=-(r*(u*d-h*f)-s*(i*d-o*f)+l*(i*h-o*u)),t[4]=-(a*(f*g-d*b)-c*(u*g-h*b)+m*(u*d-h*f)),t[5]=n*(f*g-d*b)-c*(i*g-o*b)+m*(i*d-o*f),t[6]=-(n*(u*g-h*b)-a*(i*g-o*b)+m*(i*h-o*u)),t[7]=n*(u*d-h*f)-a*(i*d-o*f)+c*(i*h-o*u),t[8]=a*(l*g-d*M)-c*(s*g-h*M)+m*(s*d-h*l),t[9]=-(n*(l*g-d*M)-c*(r*g-o*M)+m*(r*d-o*l)),t[10]=n*(s*g-h*M)-a*(r*g-o*M)+m*(r*h-o*s),t[11]=-(n*(s*d-h*l)-a*(r*d-o*l)+c*(r*h-o*s)),t[12]=-(a*(l*b-f*M)-c*(s*b-u*M)+m*(s*f-u*l)),t[13]=n*(l*b-f*M)-c*(r*b-i*M)+m*(r*f-i*l),t[14]=-(n*(s*b-u*M)-a*(r*b-i*M)+m*(r*u-i*s)),t[15]=n*(s*f-u*l)-a*(r*f-i*l)+c*(r*u-i*s),t},copy:o,determinant:function(t){let e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],h=t[8],c=t[9],l=t[10],f=t[11],d=t[12],m=t[13],M=t[14],b=t[15];return(e*a-n*o)*(l*b-f*M)-(e*s-r*o)*(c*b-f*m)+(e*u-i*o)*(c*M-l*m)+(n*s-r*a)*(h*b-f*d)-(n*u-i*a)*(h*M-l*d)+(r*u-i*s)*(h*m-c*d)},equals:function(t,e){if(t===e)return!0;let n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],h=t[6],c=t[7],l=t[8],f=t[9],d=t[10],m=t[11],M=t[12],b=t[13],g=t[14],_=t[15],p=e[0],v=e[1],x=e[2],y=e[3],S=e[4],w=e[5],A=e[6],j=e[7],O=e[8],T=e[9],q=e[10],C=e[11],R=e[12],E=e[13],P=e[14],I=e[15],z=(0,i.FD)();return Math.abs(n-p)<=z*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(r-v)<=z*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(o-x)<=z*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-y)<=z*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(s-S)<=z*Math.max(1,Math.abs(s),Math.abs(S))&&Math.abs(u-w)<=z*Math.max(1,Math.abs(u),Math.abs(w))&&Math.abs(h-A)<=z*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(c-j)<=z*Math.max(1,Math.abs(c),Math.abs(j))&&Math.abs(l-O)<=z*Math.max(1,Math.abs(l),Math.abs(O))&&Math.abs(f-T)<=z*Math.max(1,Math.abs(f),Math.abs(T))&&Math.abs(d-q)<=z*Math.max(1,Math.abs(d),Math.abs(q))&&Math.abs(m-C)<=z*Math.max(1,Math.abs(m),Math.abs(C))&&Math.abs(M-R)<=z*Math.max(1,Math.abs(M),Math.abs(R))&&Math.abs(b-E)<=z*Math.max(1,Math.abs(b),Math.abs(E))&&Math.abs(g-P)<=z*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(_-I)<=z*Math.max(1,Math.abs(_),Math.abs(I))},exactEquals:C,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,h=n*a,c=r*a,l=r*s,f=i*a,d=i*s,m=i*u,M=o*a,b=o*s,g=o*u;return t[0]=1-l-m,t[1]=c+g,t[2]=f-b,t[3]=0,t[4]=c-g,t[5]=1-h-m,t[6]=d+M,t[7]=0,t[8]=f+b,t[9]=d-M,t[10]=1-h-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){let n=x,r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=r*r+i*i+o*o+a*a;return l>0?(n[0]=2*(s*a+c*r+u*o-h*i)/l,n[1]=2*(u*a+c*i+h*r-s*o)/l,n[2]=2*(h*a+c*o+s*i-u*r)/l):(n[0]=2*(s*a+c*r+u*o-h*i),n[1]=2*(u*a+c*i+h*r-s*o),n[2]=2*(h*a+c*o+s*i-u*r)),v(t,e,n),t},fromRotation:g,fromRotationTranslation:v,fromRotationTranslationScale:A,fromRotationTranslationScaleOrigin:j,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:b,fromXRotation:_,fromYRotation:function(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:p,frustum:O,getRotation:w,getScale:S,getTranslation:y,hasIdentityRotation:E,identity:s,invert:c,invertOrIdentity:h,isOrthoNormal:R,lookAt:T,mul:P,multiply:l,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:function(t,e,n,r,i,o,a){let s=1/(e-n),u=1/(r-i),h=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*h,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*h,t[15]=1,t},perspective:function(t,e,n,r,i){let o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){let i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),h=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=h,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*h*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:m,rotateX:M,rotateY:function(t,e,n){let r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],h=e[8],c=e[9],l=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-h*r,t[1]=a*i-c*r,t[2]=s*i-l*r,t[3]=u*i-f*r,t[8]=o*r+h*i,t[9]=a*r+c*i,t[10]=s*r+l*i,t[11]=u*r+f*i,t},rotateZ:function(t,e,n){let r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],h=e[4],c=e[5],l=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+h*r,t[1]=a*i+c*r,t[2]=s*i+l*r,t[3]=u*i+f*r,t[4]=h*i-o*r,t[5]=c*i-a*r,t[6]=l*i-s*r,t[7]=f*i-u*r,t},scale:d,set:a,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:I,subtract:q,targetTo:function(t,e,n,r){let i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],h=r[2],c=i-n[0],l=o-n[1],f=a-n[2],d=c*c+l*l+f*f;d>0&&(d=1/Math.sqrt(d),c*=d,l*=d,f*=d);let m=u*f-h*l,M=h*c-s*f,b=s*l-u*c;return d=m*m+M*M+b*b,d>0&&(d=1/Math.sqrt(d),m*=d,M*=d,b*=d),t[0]=m,t[1]=M,t[2]=b,t[3]=0,t[4]=l*b-f*M,t[5]=f*m-c*b,t[6]=c*M-l*m,t[7]=0,t[8]=c,t[9]=l,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t},translate:f,transpose:u},Symbol.toStringTag,{value:"Module"}))},4197(t,e,n){n.d(e,{Vj:()=>c,cj:()=>h,jh:()=>o,l5:()=>s,yH:()=>u});var r=n(34275),i=n(9093);function o(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function a(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function s(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}function u(t,e){if(0===e.length)return a(t);if(0===t.length)return a(e);let n=o(t.length+e.length);for(let e=0;e<t.length;++e)n[e]=t[e];for(let r=0;r<e.length;++r)n[t.length+r]=e[r];return n}function h(t){return[...t]}function c(t){let e=(0,i.vt)();for(let n=0;n<16;++n)e[n]=t[n];return e}},70328(t,e,n){n.d(e,{BI:()=>O,C:()=>a,DC:()=>f,Ej:()=>p,Ie:()=>A,Jt:()=>j,Lu:()=>x,Ne:()=>y,RF:()=>l,TF:()=>g,VL:()=>m,aI:()=>q,fA:()=>s,gE:()=>h,gX:()=>_,hZ:()=>w,iT:()=>d,is:()=>T,pg:()=>v,uJ:()=>b,vI:()=>S,vY:()=>u,vt:()=>o,w1:()=>c,yr:()=>M}),n(35522);var r=n(5443),i=(n(19419),n(4197));function o(t=R){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function a(t,e){for(let n=0;n<6;n++)t[n]=e[n];return t}function s(t,e,n,r,i,a,s=o()){return s[0]=t,s[1]=e,s[2]=n,s[3]=r,s[4]=i,s[5]=a,s}function u(t,e=o()){return function(t,e,n,r=o()){return w(r,C),function(t,e,n=0,r=e.length/3){let i=t[0],o=t[1],a=t[2],s=t[3],u=t[4],h=t[5];for(let t=0;t<r;t++)i=Math.min(i,e[n+3*t]),o=Math.min(o,e[n+3*t+1]),a=Math.min(a,e[n+3*t+2]),s=Math.max(s,e[n+3*t]),u=Math.max(u,e[n+3*t+1]),h=Math.max(h,e[n+3*t+2]);t[0]=i,t[1]=o,t[2]=a,t[3]=s,t[4]=u,t[5]=h}(r,t,e,n),r}(t,0,t.length/3,e)}function h(t,e=(0,i.jh)(24)){let[n,r,o,a,s,u]=t;return e[0]=n,e[1]=r,e[2]=o,e[3]=n,e[4]=r,e[5]=u,e[6]=n,e[7]=s,e[8]=o,e[9]=n,e[10]=s,e[11]=u,e[12]=a,e[13]=r,e[14]=o,e[15]=a,e[16]=r,e[17]=u,e[18]=a,e[19]=s,e[20]=o,e[21]=a,e[22]=s,e[23]=u,e}function c(t,e){return isFinite(t[2])||isFinite(t[5])?new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}):new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function l(t,e,n=t){n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.min(t[2],e[2]),n[3]=Math.max(t[3],e[3]),n[4]=Math.max(t[4],e[4]),n[5]=Math.max(t[5],e[5])}function f(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function d(t,[e,n,r]){!function(t,e,n,r){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.min(t[2],r),t[3]=Math.max(t[3],e),t[4]=Math.max(t[4],n),t[5]=Math.max(t[5],r)}(t,e,n,r)}function m(t){return t[0]>=t[3]?0:t[3]-t[0]}function M(t){return t[1]>=t[4]?0:t[4]-t[1]}function b(t){return t[2]>=t[5]?0:t[5]-t[2]}function g(t){let e=m(t),n=b(t),r=M(t);return e*e+n*n+r*r}function _(t,e=[0,0,0]){return e[0]=t[0]+m(t)/2,e[1]=t[1]+M(t)/2,e[2]=t[2]+b(t)/2,e}function p(t,e=[0,0,0]){return e[0]=m(t),e[1]=M(t),e[2]=b(t),e}function v(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function x(t,e){return e[0]=t[3],e[1]=t[4],e[2]=t[5],e}function y(t,e,n=t){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n!==t&&(n[3]=t[3],n[4]=t[4],n[5]=t[5]),n}function S(t,e,n=t){return n[3]=e[0],n[4]=e[1],n[5]=e[2],n!==t&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),t}function w(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function A(t){return t?w(t,C):o(C)}function j(t,e){return t[0]=e[0],t[1]=e[1],t[2]=-1/0,t[3]=e[2],t[4]=e[3],t[5]=1/0,t}function O(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=-1/0,t[3]=r,t[4]=i,t[5]=1/0,t}function T(t){return 6===t.length}function q(t,e,n){if(null==t||null==e)return t===e;if(!T(t)||!T(e))return!1;if(n){for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1}else for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],R=[0,0,0,0,0,0];o(),n.d(e,["qv",0,C,"v_",0,R])},19419(t,e,n){n.d(e,{$9:()=>S,C:()=>o,DC:()=>m,HY:()=>y,IO:()=>l,Ie:()=>A,Rj:()=>x,Uc:()=>v,VL:()=>M,VY:()=>s,Wc:()=>g,aI:()=>O,bx:()=>f,fA:()=>a,fT:()=>d,gR:()=>w,gX:()=>_,ib:()=>p,nw:()=>c,pJ:()=>T,tK:()=>h,uJ:()=>b,vt:()=>i,w1:()=>u}),n(34727);var r=n(5443);function i(t=C){return[t[0],t[1],t[2],t[3]]}function o(t,e){return t!==e&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]),t}function a(t,e,n,r,o=i()){return o[0]=t,o[1]=e,o[2]=n,o[3]=r,o}function s(t,e=i()){return e[0]=t.xmin,e[1]=t.ymin,e[2]=t.xmax,e[3]=t.ymax,e}function u(t,e,n=new r.A){return n.xmin=t[0],n.ymin=t[1],n.xmax=t[2],n.ymax=t[3],n.spatialReference=e,n}function h(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function c(t,e){e<t[0]&&(t[0]=e),e>t[2]&&(t[2]=e)}function l(t,e){e<t[1]&&(t[1]=e),e>t[3]&&(t[3]=e)}function f(t,{xmin:e,ymin:n,xmax:r,ymax:i}){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],r),t[3]=Math.max(t[3],i)}function d(t,e,n){if(null!=e)if("length"in e)j(e)?(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[2]),n[3]=Math.max(t[3],e[3])):(2===e.length||3===e.length)&&(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[0]),n[3]=Math.max(t[3],e[1]));else switch(e.type){case"extent":n[0]=Math.min(t[0],e.xmin),n[1]=Math.min(t[1],e.ymin),n[2]=Math.max(t[2],e.xmax),n[3]=Math.max(t[3],e.ymax);break;case"point":n[0]=Math.min(t[0],e.x),n[1]=Math.min(t[1],e.y),n[2]=Math.max(t[2],e.x),n[3]=Math.max(t[3],e.y)}else o(n,t)}function m(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[2]),t[3]=Math.max(t[3],e[3])}function M(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}function b(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}function g(t){return M(t)*b(t)}function _(t,e=[0,0]){return e[0]=(t[0]+t[2])/2,e[1]=(t[1]+t[3])/2,e}function p(t){let e=M(t),n=b(t);return Math.sqrt(e*e+n*n)}function v(t,e){return x(t,e[0],e[1])}function x(t,e,n){return e>=t[0]&&n>=t[1]&&e<=t[2]&&n<=t[3]}function y(t,e){return Math.max(e[0],t[0])<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])<=Math.min(e[3],t[3])}function S(t,e,n){return Math.max(e[0],t[0])-n<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])-n<=Math.min(e[3],t[3])}function w(t,e){return e[0]>=t[0]&&e[2]<=t[2]&&e[1]>=t[1]&&e[3]<=t[3]}function A(t){return t?o(t,q):i(q)}function j(t){return null!=t&&4===t.length}function O(t,e){return j(t)&&j(e)?t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]:t===e}function T(t,e){if(4!==e.length||t[0]===t[2]||t[1]===t[3])return!1;for(let n=0;n<e.length;n++){let r=e[n],i=e[(n+1)%e.length];if(r[0]!==t[0]&&r[0]!==t[2]||r[1]!==t[1]&&r[1]!==t[3])return!1;let o=r[1]===i[1]&&r[0]!==i[0],a=r[0]===i[0]&&r[1]!==i[1];if(!o&&!a)return!1}return!0}const q=[1/0,1/0,-1/0,-1/0],C=[0,0,0,0];n.d(e,["qv",0,q])},65720(t,e,n){n.d(e,{C:()=>g,vt:()=>M,Qy:()=>b,ui:()=>_,ST:()=>w,bU:()=>j,pw:()=>S,m7:()=>p,ZU:()=>v,GH:()=>y,Pi:()=>x,LJ:()=>A,c8:()=>q});var r=n(4341),i=n(58083),o=n(35522),a=n(51850),s=n(78955),u=n(91829),h=n(70328),c=n(71351);function l(t){return t?{ray:(0,c.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,c.vt)(),c0:0,c1:Number.MAX_VALUE}}new r.I(()=>l());var f=n(27921);function d(t,e,n,r){let{t0:i,t1:o}=r,a=(0,f.mN)(t,e),s=(0,f.mN)(t,n);if(a>=0&&s>=0)return!1;if(a<0&&s>=0){let t=-a/(s-a);if(t<i)return!1;t<o&&(o=t)}else if(a>=0&&s<0){let t=a/(a-s);if(t>o)return!1;t>i&&(i=t)}return r.t0=i,r.t1=o,!0}var m=n(32114);function M(t){return t?[(0,f.vt)(t[0]),(0,f.vt)(t[1]),(0,f.vt)(t[2]),(0,f.vt)(t[3]),(0,f.vt)(t[4]),(0,f.vt)(t[5])]:[(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)()]}function b(){return[(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)()]}function g(t,e){for(let n=0;n<C;n++)(0,f.C)(t[n],e[n]);return t}function _(t,e,n,r=I){let a=(0,i.lw)(m.Rc.get(),e,t);(0,i.B8)(a,a);for(let t=0;t<R;++t){let e=(0,s.Z0)(m.Km.get(),E[t],a);(0,o.hZ)(r[t],e[0]/e[3],e[1]/e[3],e[2]/e[3])}!function(t,e){(0,f.Cr)(e[4],e[0],e[3],t[0]),(0,f.Cr)(e[1],e[5],e[6],t[1]),(0,f.Cr)(e[4],e[5],e[1],t[2]),(0,f.Cr)(e[3],e[2],e[6],t[3]),(0,f.Cr)(e[0],e[1],e[2],t[4]),(0,f.Cr)(e[5],e[4],e[7],t[5])}(n,r)}function p(t,e){return v(t,e.center,e.radius)}function v(t,e,n){for(let r=0;r<C;r++){let i=t[r];if(i[0]*e[0]+i[1]*e[1]+i[2]*e[2]+i[3]>=n)return!1}return!0}function x(t,e,n){for(let r of T)if((0,f.wE)(t[r],e,n))return!0;return!1}function y(t,e,n){let r=(0,h.gX)(e,z),i=(0,h.VL)(e)/2,a=(0,h.yr)(e)/2,s=(0,h.uJ)(e)/2;return n?function(t,e,n,r,i,a){let s=(0,o.Z0)(F,e,a);for(let e=0;e<C;e++){let o=t[e];if(o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]-(Math.abs(o[0]*a[0]+o[1]*a[1]+o[2]*a[2])*n+Math.abs(o[0]*a[4]+o[1]*a[5]+o[2]*a[6])*r+Math.abs(o[0]*a[8]+o[1]*a[9]+o[2]*a[10])*i)>0)return!1}return!0}(t,r,i,a,s,n):function(t,e,n,r,i){for(let o=0;o<C;o++){let a=t[o];if(a[0]*e[0]+a[1]*e[1]+a[2]*e[2]+a[3]-(Math.abs(a[0])*n+Math.abs(a[1])*r+Math.abs(a[2])*i)>0)return!1}return!0}(t,r,i,a,s)}function S(t,e){return O(t,function(t,e=l()){return(0,c.C)(t,e.ray),e.c0=0,e.c1=Number.MAX_VALUE,e}(e,P.get()))}function w(t,e,n){return O(t,function(t,e,n=l()){let r=(0,o.Bw)(t.vector);return(0,c.fA)(t.origin,e,n.ray),n.c0=0,n.c1=r,n}(e,n,P.get()))}function A(t,e,n){return function(t,e,n,r){let i={t0:0,t1:1};for(let o of e)if(!d(t[o],n,r,i))return!1;return i.t0<i.t1}(t,T,e,n)}function j(t,e){for(let n=0;n<C;n++)if((0,f.mN)(t[n],e)>0)return!1;return!0}function O(t,e){for(let n=0;n<C;n++)if(!(0,f.$Q)(t[n],e))return!1;return!0}const T=[0,1,2,3,5],q={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},C=6,R=8,E=[(0,u.fA)(-1,-1,-1,1),(0,u.fA)(1,-1,-1,1),(0,u.fA)(1,1,-1,1),(0,u.fA)(-1,1,-1,1),(0,u.fA)(-1,-1,1,1),(0,u.fA)(1,-1,1,1),(0,u.fA)(1,1,1,1),(0,u.fA)(-1,1,1,1)],P=new r.I(l),I=b(),z=(0,a.vt)(),F=(0,a.vt)()},11964(t,e,n){n.d(e,{Cr:()=>c,H6:()=>d,LV:()=>h,_I:()=>f,kb:()=>l,vt:()=>u});var r=n(34727),i=n(4341),o=n(35522),a=n(51850),s=n(32114);function u(t){return t?{origin:(0,a.o8)(t.origin),vector:(0,a.o8)(t.vector)}:{origin:(0,a.vt)(),vector:(0,a.vt)()}}function h(t,e){let n=m.get();return n.origin=t,n.vector=e,n}function c(t,e,n=u()){return(0,o.C)(n.origin,t),(0,o.Re)(n.vector,e,t),n}function l(t,e){let n=(0,o.Re)(s.rq.get(),e,t.origin),i=(0,o.Om)(t.vector,n),a=(0,o.Om)(t.vector,t.vector);if(Math.abs(a)<M)return(0,o.hG)(t.origin,e);let u=(0,r.qE)(i/a,0,1),h=(0,o.Re)(s.rq.get(),(0,o.hs)(s.rq.get(),t.vector,u),n);return(0,o.Om)(h,h)}function f(t,e,n){return d(t,e,0,1,n)}function d(t,e,n,i,a){let{vector:u,origin:h}=t,c=(0,o.Re)(s.rq.get(),e,h),l=(0,o.Om)(u,c)/(0,o.m3)(u);return(0,o.hs)(a,u,(0,r.qE)(l,n,i)),(0,o.WQ)(a,a,t.origin)}(0,a.vt)(),(0,a.vt)();const m=new i.I(()=>u()),M=1e-9},27921(t,e,n){n.d(e,{$Q:()=>T,BX:()=>O,C:()=>h,Cr:()=>d,H:()=>C,LV:()=>u,O_:()=>f,Qj:()=>c,T7:()=>w,Ui:()=>S,_I:()=>R,fA:()=>l,gv:()=>A,lU:()=>m,mN:()=>E,mP:()=>x,mR:()=>y,vE:()=>z,vt:()=>s,wE:()=>P});var r=n(34727),i=n(35522),o=n(51850),a=(n(78955),n(44280),n(32114));function s(t=F){return[t[0],t[1],t[2],t[3]]}function u(t=F[0],e=F[1],n=F[2],r=F[3]){return l(t,e,n,r,a.Km.get())}function h(t,e){return l(e[0],e[1],e[2],e[3],t)}function c(t){return t}function l(t,e,n,r,i=s()){return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function f(t,e,n){let r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=e[0]*i,n[1]=e[1]*i,n[2]=e[2]*i,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function d(t,e,n,r=s()){let i=n[0]-e[0],o=n[1]-e[1],a=n[2]-e[2],u=t[0]-e[0],h=t[1]-e[1],c=t[2]-e[2],l=o*c-a*h,f=a*u-i*c,d=i*h-o*u,m=l*l+f*f+d*d,M=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return r[0]=l*M,r[1]=f*M,r[2]=d*M,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function m(t,e,n,r=0,o=Math.floor(1/3*n),a=Math.floor(2/3*n)){if(n<3)return!1;e(b,r);let s=o,u=!1;for(;s<n-1&&!u;)e(g,s),s++,u=!(0,i.t2)(b,g);if(!u)return!1;for(s=Math.max(s,a),u=!1;s<n&&!u;)e(_,s),s++,(0,i.Re)(p,b,g),(0,i.S8)(p,p),(0,i.Re)(v,g,_),(0,i.S8)(v,v),u=!(0,i.t2)(b,_)&&!(0,i.t2)(g,_)&&Math.abs((0,i.Om)(p,v))<M;return u?(d(b,g,_,t),!0):(0!==r||1!==o||2!==a)&&m(t,e,n,0,1,2)}n(32728);const M=.99619469809,b=(0,o.vt)(),g=(0,o.vt)(),_=(0,o.vt)(),p=(0,o.vt)(),v=(0,o.vt)();function x(t,e,n){return e!==t&&h(t,e),t[3]=-(0,i.Om)(t,n),t}function y(t,e,n,r){return(0,i.$A)(_,e,t),f(n,_,r)}function S(t,e,n){return null!=e&&I(z(t,e.origin,e.direction,V,n))}function w(t,e,n){return I(z(t,e.origin,e.vector,0,n))}function A(t,e,n){return I(z(t,e.origin,e.vector,1,n))}function j(t,e){return E(t,e)<=0}function O(t,e){return E(t,e)>=0}function T(t,e){return function(t,e,n,r,o,a,s){let u=(0,i.Om)(t,n),h=E(t,e);if(u>-1e-6&&u<1e-6)return q(h,o,a);let c=-h/u,l=q(u,o,!1);return!(s&&!l&&!q(h,o,a))&&(l?c>r.c0&&(r.c0=c):c<r.c1&&(r.c1=c),r.c0<=r.c1)}(t,e.ray.origin,e.ray.direction,e,!1,!1,!0)}function q(t,e,n){return n?e?t>=0:t<=0:e?t>0:t<0}function C(t,e,n,r=!1){let o=e.at(-1),a=E(t,o),s=r?a>0:a<=0;for(let u=0;u<e.length;u++){let h=e.at(u),c=E(t,h),l=r?c>0:c<=0;s!==l&&(0,i.Cc)(n(),o,h,a/(a-c)),l&&(0,i.C)(n(),h),o=h,a=c,s=l}}function R(t,e,n){let r=(0,i.hs)(a.rq.get(),t,-t[3]),o=function(t,e,n){let r=(0,i.hs)(a.rq.get(),t,(0,i.Om)(t,e));return(0,i.Re)(n,e,r),n}(t,(0,i.Re)(a.rq.get(),e,r),a.rq.get());return(0,i.WQ)(n,o,r),n}function E(t,e){return(0,i.Om)(t,e)+t[3]}function P(t,e,n){for(let r=0;r<n;++r)if(j(t,e[r]))return!1;return!0}function I(t){return 0===t||1===t}function z(t,e,n,o,a){let s=(0,i.Om)(t,n),u=E(t,e);if(0===s)return u>=0?2:3;let h=-u/s;return 1&o&&(h=(0,r.qE)(h,0,1)),!(4&o)&&h<0||!(8&o)&&h>1?u>=0?2:3:((0,i.WQ)(a,e,(0,i.hs)(a,n,h)),u>=0?0:1)}const F=[0,0,1,0],V=8;(0,o.vt)()},71351(t,e,n){n.d(e,{C:()=>l,Cr:()=>f,LV:()=>c,fA:()=>d,kb:()=>m,vt:()=>u}),n(4576);var r=n(4341),i=(n(77690),n(29242)),o=n(35522),a=n(51850),s=n(32114);function u(t){return t?h((0,a.o8)(t.origin),(0,a.o8)(t.direction)):h((0,a.vt)(),(0,a.vt)())}function h(t,e){return{origin:t,direction:e}}function c(t,e){let n=M.get();return n.origin=t,n.direction=e,n}function l(t,e=u()){return d(t.origin,t.direction,e)}function f(t,e,n=u()){return(0,o.C)(n.origin,t),(0,o.Re)(n.direction,e,t),n}function d(t,e,n=u()){return(0,o.C)(n.origin,t),(0,o.C)(n.direction,e),n}function m(t,e){let n=(0,o.$A)(s.rq.get(),(0,o.S8)(s.rq.get(),t.direction),(0,o.Re)(s.rq.get(),e,t.origin));return(0,o.Om)(n,n)}const M=new r.I(()=>u());(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,i.vt)()},94008(t,e,n){n.d(e,{iy:()=>d}),n(44208),n(53966);var r=n(34727),i=n(34304),o=n(58083),a=n(35522),s=n(51850),u=n(91829),h=n(34275);var c=n(71351),l=n(44280),f=n(32114);class d{constructor(t=0,e=0,n=0,r=0){this.radius=r,"number"==typeof t?this._center=(0,s.fA)(t,e,n):function(t){return e=t,(0,h.vZ)(e)&&e.length>=3||function(t){return((0,h.aI)(t)||Array.isArray(t))&&t.length>=3}(t);var e}(t)||function(t){return(e=t)instanceof Float32Array&&e.length>=4||function(t){return Array.isArray(t)&&t.length>=4}(t);var e}(t)?(this._center=(0,s.ci)(t),this.radius=4===t.length?t[3]:e):(this._center=(0,s.o8)(t.center),this.radius=t.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(t){(0,a.C)(this.center,t)}exactEquals(t){return(0,a.aI)(this._center,t.center)&&this.radius===t.radius}copyFrom(t){return t!==this&&((0,a.C)(this._center,t.center),this.radius=t.radius),this}clone(){return new d(this.center,this.radius)}toVec4(){return(0,u.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(t){return(0,a.hG)(this.center,t)<=this.radius**2}intersects(t){let e=this.radius+t.radius;return(0,a.hG)(this.center,t.center)<=e*e}intersectRay(t,e){if(null==t||!this._intersect(t,m))return!1;let{t0:n,t1:r}=m;if((n<0||r<n&&r>0)&&(n=r),n<0)return!1;if(e){let{origin:r,direction:i}=t;e[0]=r[0]+i[0]*n,e[1]=r[1]+i[1]*n,e[2]=r[2]+i[2]*n}return!0}intersectLine(t,e){let n=(0,c.Cr)(t,e);if(!this._intersect(n,m))return[];let{origin:r,direction:o}=n,{t0:u,t1:h}=m,l=t=>{let e=(0,s.vt)();return(0,a.Ln)(e,r,o,t),this.projectPoint(e,e)};return Math.abs(u-h)<(0,i.FD)()?[l(u)]:[l(u),l(h)]}_intersect(t,e){let{origin:n,direction:r}=t,i=M;i[0]=n[0]-this.center[0],i[1]=n[1]-this.center[1],i[2]=n[2]-this.center[2];let o=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(0===o)return!1;let a=2*(r[0]*i[0]+r[1]*i[1]+r[2]*i[2]),s=a*a-4*o*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-this.radius**2);if(s<0)return!1;let u=Math.sqrt(s);return e.t0=(-a-u)/(2*o),e.t1=(-a+u)/(2*o),!0}projectPoint(t,e){let n=(0,a.Re)(f.rq.get(),t,this.center),r=(0,a.hs)(f.rq.get(),n,this.radius/(0,a.Bw)(n));return(0,a.WQ)(e,r,this.center)}closestPointOnSilhouette(t,e){let n=f.rq.get(),r=f.Rc.get();(0,a.$A)(n,t.origin,t.direction),(0,a.$A)(e,n,t.origin),(0,a.hs)(e,e,1/(0,a.Bw)(e)*this.radius);let i=this._angleToSilhouette(t.origin),s=(0,l.g7)(t.origin,e);return(0,o.$0)(r,s+i,n),(0,a.Z0)(e,e,r),e}frustumCoverage(t,e,n){let r=this.radius,i=r*r,o=t+.5*Math.PI,a=e*e+i-2*Math.cos(o)*e*r,s=Math.sqrt(a),u=a-i;if(u<=0)return.5;let h=Math.acos(Math.sqrt(u)/s)-Math.asin(r/(s/Math.sin(o)));return Math.min(1,(h+.5*n)/n)}_angleToSilhouette(t){let e=(0,a.Re)(f.rq.get(),t,this.center),n=(0,a.Bw)(e),i=this.radius,o=i+Math.abs(i-n);return(0,r.XM)(i/o)}union(t){let e=(0,a.Io)(this._center,t.center),n=this.radius,r=t.radius;return e+r<n?this:e+n<r?(this.copyFrom(t),this):((0,a.Cc)(this._center,this._center,t.center,(e+r-n)/(2*e)),this.radius=(e+n+r)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(t){let{center:e,radius:n}=this,r=t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3];return r<0?Math.min(r+n,0):Math.max(r-n,0)}}new d;const m={t0:0,t1:0},M=(0,s.vt)();(0,s.vt)(),(0,s.vt)()},44280(t,e,n){n.d(e,{g7:()=>s,gr:()=>a});var r=n(34727),i=n(35522),o=n(51850);function a(t,e){return(0,i.Om)(t,e)/(0,i.Bw)(t)}function s(t,e){let n=(0,i.Om)(t,e)/((0,i.Bw)(t)*(0,i.Bw)(e));return-(0,r.XM)(n)}(0,o.vt)(),(0,o.vt)()},32114(t,e,n){n.d(e,{Rc:()=>d,rq:()=>l,Km:()=>f}),n(44208);var r=n(26390),i=n(29242),o=n(9093),a=n(82534),s=n(48163),u=n(51850),h=n(91829);class c{constructor(t){this._create=t,this._items=[],this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){let t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new c(s.vt)}static createVec3f64(){return new c(u.vt)}static createVec4f64(){return new c(h.vt)}static createMat3f64(){return new c(i.vt)}static createMat4f64(){return new c(o.vt)}static createQuatf64(){return new c(a.vt)}get test(){}}c.createVec2f64();const l=c.createVec3f64(),f=c.createVec4f64(),d=(c.createMat3f64(),c.createMat4f64());c.createQuatf64()},32728(t,e,n){n.d(e,{YH:()=>a,nu:()=>s,wp:()=>o}),n(34727);var r=n(35522),i=n(51850);function o(t,e){let n=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),i=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),o=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,r.hZ)(t,n,i,o),t}function a(t,e,n){n||=t;let i=(0,r.Om)(t,e);(0,r.hZ)(n,t[0]-i*e[0],t[1]-i*e[1],t[2]-i*e[2]),(0,r.S8)(n,n)}function s(t,e,n,o=(0,i.vt)()){let a=(0,r.Bw)(t),s=(0,r.Bw)(e),c=(0,r.Om)(t,e)/(a*s);if(c<.9999999999999999){let i=Math.acos(c),l=((1-n)*a+n*s)/Math.sin(i),f=l/a*Math.sin((1-n)*i),d=l/s*Math.sin(n*i);return(0,r.hs)(u,t,f),(0,r.hs)(h,e,d),(0,r.WQ)(o,u,h)}return(0,r.Cc)(o,t,e,n)}(0,i.vt)(),(0,i.vt)(),(0,i.vt)();const u=(0,i.vt)(),h=(0,i.vt)()},70491(t,e,n){n.r(e),n.d(e,{default:()=>K});var r=n(32198),i=n(17676),o=n(24326),a=n(91429),s=n(35522),u=n(51850),h=n(11964),c=n(94008),l=n(93687),f=n(15142),d=n(65720),m=n(71351),M=n(620);class b{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new g,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),g.clearPool(),I[0]=null,N.prune(),W.prune()}add(t){let e=Array.from(t);this._grow(e);let n=g.acquire();for(let t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));g.release(n)}remove(t,e=null){this._objectCount-=t.length;let n=g.acquire();for(let r of t){let t=e??this.objectToBoundingSphere(r);C(t.radius)?(n.init(this._root),x(r,t,n)):this._degenerateObjects.delete(r)}g.release(n),this._shrink()}update(t,e){if(!C(e.radius)&&this._isDegenerate(t))return;let n=function(t){return I[0]=t,I}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){let r=(0,m.LV)(t,e);p(this._root,t=>{if(!function(t,e){return j(e.bounds.center,2*-e.halfSize,V),j(e.bounds.center,2*e.halfSize,D),(0,M.O_)(t.origin,t.direction,V,D)}(r,t))return!1;let e=t.node;return e.terminals.forAll(t=>{this._intersectsObject(r,t)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObject(r,t)&&n(t)}),!0})}forEachAlongRayWithVerticalOffset(t,e,n,r){let i=(0,m.LV)(t,e);p(this._root,t=>{if(!function(t,e,n){return j(e.bounds.center,2*-e.halfSize,V),j(e.bounds.center,2*e.halfSize,D),n.applyToMinMax(V,D),(0,M.O_)(t.origin,t.direction,V,D)}(i,t,r))return!1;let e=t.node;return e.terminals.forAll(t=>{this._intersectsObjectWithOffset(i,t,r)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObjectWithOffset(i,t,r)&&n(t)}),!0})}forEach(t){for(let e of this.values())t(e)}*values(){for(let t of this._nodeIteratorValues()){let e=t.node;yield*e.terminals,null!==e.residents&&(yield*e.residents)}yield*this.degenerateObjectValues()}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}*degenerateObjectValues(){yield*this._degenerateObjects.values()}findClosest(t,e,n,r=()=>!0,i=1/0){let o=1/0,a=1/0,u=null,h=T(t,e),c=s=>{if(--i,!r(s))return;let h=this.objectToBoundingSphere(s);if(!(0,d.m7)(n,h))return;let c=q(t,e,h.center),l=c-h.radius,f=c+h.radius;l<o&&(o=l,a=f,u=s)};return v(this._root,r=>{if(i<=0||!(0,d.ZU)(n,r.bounds.center,2*r.bounds.radius)||((0,s.hs)(F,h,2*r.halfSize),(0,s.WQ)(F,F,r.bounds.center),q(t,e,F)>a))return!1;let o=r.node;return o.terminals.forAll(t=>c(t)),null!==o.residents&&o.residents.forAll(t=>c(t)),!0},t,e),u}forEachInDepthRange(t,e,n,r,i,o,a){let u=-1/0,h=1/0,c={setRange:t=>{1===n?(u=Math.max(u,t.near),h=Math.min(h,t.far)):(u=Math.max(u,-t.far),h=Math.min(h,-t.near))}};c.setRange(r);let l=q(e,n,t),f=T(e,n),m=T(e,-n),M=t=>{if(!a(t))return;let r=this.objectToBoundingSphere(t),s=q(e,n,r.center)-l,f=s-r.radius,m=s+r.radius;f>h||m<u||!(0,d.m7)(o,r)||i(t,c)};v(this._root,t=>{if(!(0,d.ZU)(o,t.bounds.center,2*t.bounds.radius)||((0,s.hs)(F,f,2*t.halfSize),(0,s.WQ)(F,F,t.bounds.center),q(e,n,F)-l>h)||((0,s.hs)(F,m,2*t.halfSize),(0,s.WQ)(F,F,t.bounds.center),q(e,n,F)-l<u))return!1;let r=t.node;return r.terminals.forAll(t=>M(t)),null!==r.residents&&r.residents.forAll(t=>M(t)),!0},e,n)}forEachNode(t){p(this._root,e=>t(e.node,e.bounds,e.halfSize,e.depth))}forEachIntersectingFrustum(t,e,n=()=>!0){for(let r of this.intersectingFrustumValues(t,n))e(r)}*intersectingFrustumValues(t,e=()=>!0){for(let n of this._nodeIteratorValues(e=>(0,d.ZU)(t,e.bounds.center,2*e.bounds.radius))){let r=n.node;for(let n of r.terminals)e(n)&&(0,d.m7)(t,this.objectToBoundingSphere(n))&&(yield n);if(null!==r.residents)for(let n of r.residents)e(n)&&(0,d.m7)(t,this.objectToBoundingSphere(n))&&(yield n)}}*_nodeIteratorValues(t=()=>!0){yield*_(this._root,t)}forEachNeighbor(t,e){let n=e.radius,r=e.center,i=n=>{let r=this.objectToBoundingSphere(n);return!e.intersects(r)||t(n)},o=!0,a=t=>{o&&=i(t)};p(this._root,t=>{let e=2*t.bounds.radius,i=n+e;if((0,s.hG)(t.bounds.center,r)-i*i>0)return!1;let u=t.node;return u.terminals.forAll(a),o&&null!==u.residents&&u.residents.forAll(a),o}),o&&this.forEachDegenerateObject(a)}_intersectsObject(t,e){let n=this.objectToBoundingSphere(e);return!(n.radius>0)||n.intersectRay(t)}_intersectsObjectWithOffset(t,e,n){let r=this.objectToBoundingSphere(e);return!(r.radius>0)||n.applyToBoundingSphere(r).intersectRay(t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){let e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){let r=g.acquire().init(t);this._add(e.at(n),r),g.release(r)}}_grow(t){if(O(t,t=>this.objectToBoundingSphere(t),B),C(B.radius)&&!this._fitsInsideTree(B))if(S(this._root.node))this._root.bounds.copyFrom(B),this._root.halfSize=1.25*this._root.bounds.radius,this._root.updateBoundsRadiusFromHalfSize();else{let t=this._rootBoundsForRootAsSubNode(B);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(B,t):this._growRootAsSubNode(t),g.release(t)}}_rebuildTree(t,e){L.center=e.bounds.center,L.radius=e.halfSize,O([t,L],t=>t,k);let n=g.acquire().init(this._root);this._root.initFrom(null,k,k.radius),this._root.increaseHalfSize(1.25),p(n,t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0)),g.release(n)}_placingRootViolatesMaxDepth(t){let e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E,n=0;return p(this._root,t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth)),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){let e=t.radius,n=t.center,r=-1/0,i=this._root.bounds.center,o=this._root.halfSize;for(let t=0;t<3;t++){let a=i[t]-o-(n[t]-e),s=n[t]+e-(i[t]+o),u=Math.max(0,Math.ceil(a/(2*o))),h=Math.max(0,Math.ceil(s/(2*o)))+1,c=2**Math.ceil(Math.log(u+h)*Math.LOG2E);r=Math.max(r,c),Q[t].min=u,Q[t].max=h}for(let t=0;t<3;t++){let e=Q[t].min,n=Q[t].max,a=(r-(e+n))/2;e+=Math.ceil(a),n+=Math.floor(a);let s=i[t]-o-e*o*2;z.center[t]=s+(n+e)*o}let a=r*o;return z.radius=a*P,g.acquire().initFrom(null,z,a,0)}_growRootAsSubNode(t){let e=this._root.node;B.center=this._root.bounds.center,B.radius=this._root.halfSize,this._root.init(t),t.advanceTo(B,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){let t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null,e=this._root.node.children,n=0,r=0;for(;r<e.length&&null==t;)n=r++,t=e[n];for(;r<e.length;)if(e[r++])return-1;return n}_isDegenerate(t){return!C(this.objectToBoundingSphere(t).radius)}_fitsInsideTree(t){let e=this._root.bounds,n=this._root.halfSize;return t.radius<=n&&t.center[0]>=e.center[0]-n&&t.center[0]<=e.center[0]+n&&t.center[1]>=e.center[1]-n&&t.center[1]<=e.center[1]+n&&t.center[2]>=e.center[2]-n&&t.center[2]<=e.center[2]+n}_nodeToJSON(t){return{children:t.children.map(t=>t?this._nodeToJSON(t):null),residents:t.residents?.map(t=>this.objectToBoundingSphere(t)),terminals:t.terminals?.map(t=>this.objectToBoundingSphere(t))}}}class g{constructor(){this.bounds=new c.iy,this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,r=this.depth){return this.node=t??g.createEmptyNode(),e&&this.bounds.copyFrom(e),this.halfSize=n,this.depth=r,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds.radius=this.halfSize*P}advance(t){let e=this.node.children[t];e||(e=g.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;let n=R[t];return this.bounds.center[0]+=n[0]*this.halfSize,this.bounds.center[1]+=n[1]*this.halfSize,this.bounds.center[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e?.(this,-1),!0;if(this.isLeaf()){if(!n)return e?.(this,-1),!1;this.node.residents=null}let r=this._childIndex(t);e?.(this,r),this.advance(r)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t.radius>this.halfSize/2}_childIndex(t){let e=this.bounds.center;return+(e[0]<t.center[0])+(e[1]<t.center[1]?2:0)+(e[2]<t.center[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new f.A({shrink:!0}),residents:new f.A({shrink:!0})}}static{this._pool=new l.A(()=>new g)}static acquire(){return g._pool.acquire()}static release(t){g._pool.release(t)}static clearPool(){g._pool.prune()}}function*_(t,e=()=>!0){let n=[g.acquire().init(t)];for(;0!==n.length;){let t=n.pop();if(e(t)){if(yield t,!t.isLeaf())for(let e=0;e<t.node.children.length;e++)t.node.children[e]&&n.push(g.acquire().init(t).advance(e));g.release(t)}}}function p(t,e){let n=_(t,e);for(let t of n);}function v(t,e,n,r=1){let i=g.acquire().init(t),o=[i];for(function(t,e,n){if(!W.length)for(let t=0;t<8;++t)W.push({index:0,distance:0});for(let n=0;n<8;++n){let r=R[n];W.data[n].index=n,W.data[n].distance=q(t,e,r)}W.sort((t,e)=>t.distance-e.distance);for(let t=0;t<8;++t)n[t]=W.data[t].index}(n,r,Z);0!==o.length;){if(i=o.pop(),e(i)&&!i.isLeaf())for(let t=7;t>=0;--t){let e=Z[t];i.node.children[e]&&o.push(g.acquire().init(i).advance(e))}g.release(i)}}function x(t,e,n){N.clear();let r=n.advanceTo(e,(t,e)=>{N.push(t.node),N.push(e)})?n.node.terminals:n.node.residents;if(r.removeUnordered(t),0===r.length)for(let t=N.length-2;t>=0&&y(N.data[t],N.data[t+1]);t-=2);}function y(t,e){return e>=0&&(t.children[e]=null),!!S(t)&&(null===t.residents&&(t.residents=new f.A({shrink:!0})),!0)}function S(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function w(t,e){t[0]=Math.min(t[0],e.center[0]-e.radius),t[1]=Math.min(t[1],e.center[1]-e.radius),t[2]=Math.min(t[2],e.center[2]-e.radius)}function A(t,e){t[0]=Math.max(t[0],e.center[0]+e.radius),t[1]=Math.max(t[1],e.center[1]+e.radius),t[2]=Math.max(t[2],e.center[2]+e.radius)}function j(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function O(t,e,n){V[0]=1/0,V[1]=1/0,V[2]=1/0,D[0]=-1/0,D[1]=-1/0,D[2]=-1/0;for(let n of t){let t=e(n);C(t.radius)&&(w(V,t),A(D,t))}(0,s.Cc)(n.center,V,D,.5),n.radius=Math.max(D[0]-V[0],D[1]-V[1],D[2]-V[2])/2}function T(t,e){let n,r=1/0;for(let i=0;i<8;++i){let o=q(t,e,E[i]);o<r&&(r=o,n=E[i])}return n}function q(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function C(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}const R=[(0,u.fA)(-1,-1,-1),(0,u.fA)(1,-1,-1),(0,u.fA)(-1,1,-1),(0,u.fA)(1,1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(1,-1,1),(0,u.fA)(-1,1,1),(0,u.fA)(1,1,1)],E=[(0,u.fA)(-1,-1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(-1,1,-1),(0,u.fA)(-1,1,1),(0,u.fA)(1,-1,-1),(0,u.fA)(1,-1,1),(0,u.fA)(1,1,-1),(0,u.fA)(1,1,1)],P=Math.sqrt(3),I=[null],z=new c.iy,F=(0,u.vt)(),V=(0,u.vt)(),D=(0,u.vt)(),N=new f.A,B=new c.iy,L=new c.iy,k=new c.iy,Q=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],W=new f.A,Z=[0,0,0,0,0,0,0,0];var H=n(44801);function $(t,e,n){let r=new c.iy;return(0,s.hs)(r.center,t,.5),(0,s.Ln)(r.center,r.center,e,.5),r.radius=(0,s.Io)(r.center,t),(0,s.WQ)(r.center,r.center,n),r}class U{constructor(t,e,n){this.objectId=t,this.target=e,this.distance=n}}class X extends U{constructor(t,e,n){super(t,e,n),this.type="vertex"}}class J extends U{constructor(t,e,n,r,i){super(t,e,n),this.start=r,this.end=i,this.type="edge"}}let Y=class{constructor(){this._idToComponent=new Map,this._components=new b(t=>t.bounds),this._edges=new b(t=>t.bounds),this._tmpLineSegment=(0,h.vt)(),this._tmpP1=(0,u.vt)(),this._tmpP2=(0,u.vt)(),this._tmpP3=(0,u.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,i.Te)(e);let n=t;n.mbs=new c.iy(t.mbsJSON),await this._ensureEdgeLocations(n,e);let r=[];return this._edges.forEachNeighbor(t=>(this._addCandidates(n,t,r),r.length<1e3),n.mbs),{result:{candidates:r}}}async _ensureEdgeLocations(t,e){let n=[];if(this._components.forEachNeighbor(t=>{if(null==t.info){let{id:e,uid:r}=t;n.push({id:e,uid:r})}return!0},t.mbs),!n.length)return;let r={components:n},i=await this.remoteClient.invoke("fetchAllEdgeLocations",r,e??{});for(let t of i.components)this._setFetchEdgeLocations(t)}async add(t){let e=new tt(t.id,new c.iy(t.bounds));return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){let e=this._idToComponent.get(t.id);if(e){let t=[];this._edges.forEachNeighbor(n=>(n.component===e&&t.push(n),!0),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){let e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;let n=H.HY.createView(t.locations),r=Array(n.count),i=(0,u.vt)(),o=(0,u.vt)();for(let a=0;a<n.count;a++){n.position0.getVec(a,i),n.position1.getVec(a,o);let s=$(i,o,t.origin),u=new et(e,a,s);r[a]=u}this._edges.add(r);let{objectIds:a,origin:s}=t;e.info={locations:n,objectIds:a,origin:s}}_addCandidates(t,e,n){let{info:r}=e.component,{origin:i,objectIds:o}=r,a=r.locations,u=a.position0.getVec(e.index,this._tmpP1),h=a.position1.getVec(e.index,this._tmpP2);(0,s.WQ)(u,u,i),(0,s.WQ)(h,h,i);let c=o[a.componentIndex.get(e.index)];this._addEdgeCandidate(t,c,u,h,n),G(t,c,u,n),G(t,c,h,n)}_addEdgeCandidate(t,e,n,r,i){if(!t.returnEdge)return;let o=t.mbs.center,a=(0,h.Cr)(n,r,this._tmpLineSegment),c=(0,h._I)(a,o,this._tmpP3);t.mbs.contains(c)&&i.push(new J(e,(0,u.o8)(c),(0,s.Io)(o,c),(0,u.o8)(n),(0,u.o8)(r)))}};Y=(0,r.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],Y);const K=Y;function G(t,e,n,r){t.returnVertex&&t.mbs.contains(n)&&r.push(new X(e,(0,u.o8)(n),(0,s.Io)(t.mbs.center,n)))}class tt{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=(0,o.c)()}}class et{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[491],{32198(t,e,n){function r(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function i(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose],n&&(i=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>r,hk:()=>a,mS:()=>i}),Object.create,Object.create;var o="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var r=new Error(n);return r.name="SuppressedError",r.error=t,r.suppressed=e,r};function a(t){function e(e){t.error=t.hasError?new o(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,r=0;return function i(){for(;n=t.stack.pop();)try{if(!n.async&&1===r)return r=0,t.stack.push(n),Promise.resolve().then(i);if(n.dispose){var o=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(o).then(i,function(t){return e(t),i()})}else r|=1}catch(t){e(t)}if(1===r)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},4341(t,e,n){n.d(e,{I:()=>i});var r=n(26390);class i{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,o));t++)this._items.push(this._allocator())}}const o=1024},29242(t,e,n){function r(){return[1,0,0,0,1,0,0,0,1]}function i(t,e,n,r,i,o,a,s,u){return[t,e,n,r,i,o,a,s,u]}n.d(e,{fA:()=>i,vt:()=>r});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:i},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,o])},9093(t,e,n){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}n.d(e,{o8:()=>i,vt:()=>r});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:i,create:r,fromValues:function(t,e,n,r,i,o,a,s,u,h,c,l,f,d,m,M){return[t,e,n,r,i,o,a,s,u,h,c,l,f,d,m,M]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,o])},82534(t,e,n){function r(){return[0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3]]}n.d(e,{o8:()=>i,vt:()=>r});const o=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:i,create:r,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,o])},77690(t,e,n){n.d(e,{B8:()=>s,Ge:()=>d,I0:()=>f,KC:()=>u,a4:()=>h,hZ:()=>o,hs:()=>l,lw:()=>c,mg:()=>a,z0:()=>i});var r=n(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function o(t,e,n,r,i,o,a,s,u,h){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=h,t}function a(t,e){if(t===e){let n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function s(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=c*a-s*h,f=-c*o+s*u,d=h*o-a*u,m=n*l+r*f+i*d;return m?(m=1/m,t[0]=l*m,t[1]=(-c*r+i*h)*m,t[2]=(s*r-i*a)*m,t[3]=f*m,t[4]=(c*n-i*u)*m,t[5]=(-s*n+i*o)*m,t[6]=d*m,t[7]=(-h*n+r*u)*m,t[8]=(a*n-r*o)*m,t):null}function u(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8];return t[0]=a*c-s*h,t[1]=i*h-r*c,t[2]=r*s-i*a,t[3]=s*u-o*c,t[4]=n*c-i*u,t[5]=i*o-n*s,t[6]=o*h-a*u,t[7]=r*u-n*h,t[8]=n*a-r*o,t}function h(t){let e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],h=t[8];return e*(h*o-a*u)+n*(-h*i+a*s)+r*(u*i-o*s)}function c(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=n[0],d=n[1],m=n[2],M=n[3],b=n[4],g=n[5],_=n[6],p=n[7],v=n[8];return t[0]=f*r+d*a+m*h,t[1]=f*i+d*s+m*c,t[2]=f*o+d*u+m*l,t[3]=M*r+b*a+g*h,t[4]=M*i+b*s+g*c,t[5]=M*o+b*u+g*l,t[6]=_*r+p*a+v*h,t[7]=_*i+p*s+v*c,t[8]=_*o+p*u+v*l,t}function l(t,e,n){let r=n[0],i=n[1],o=n[2];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=o*e[6],t[7]=o*e[7],t[8]=o*e[8],t}function f(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,h=n*a,c=r*a,l=r*s,f=i*a,d=i*s,m=i*u,M=o*a,b=o*s,g=o*u;return t[0]=1-l-m,t[3]=c-g,t[6]=f+b,t[1]=c+g,t[4]=1-h-m,t[7]=d-M,t[2]=f-b,t[5]=d+M,t[8]=1-h-l,t}function d(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15],_=n*s-r*a,p=n*u-i*a,v=n*h-o*a,x=r*u-i*s,y=r*h-o*s,S=i*h-o*u,w=c*M-l*m,A=c*b-f*m,j=c*g-d*m,O=l*b-f*M,T=l*g-d*M,q=f*g-d*b,C=_*q-p*T+v*O+x*j-y*A+S*w;return C?(C=1/C,t[0]=(s*q-u*T+h*O)*C,t[1]=(u*j-a*q-h*A)*C,t[2]=(a*T-s*j+h*w)*C,t[3]=(i*T-r*q-o*O)*C,t[4]=(n*q-i*j+o*A)*C,t[5]=(r*j-n*T-o*w)*C,t[6]=(M*S-b*y+g*x)*C,t[7]=(b*v-m*S-g*p)*C,t[8]=(m*y-M*v+g*_)*C,t):null}function m(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}const M=c,b=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:u,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:h,equals:function(t,e){let n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],h=t[6],c=t[7],l=t[8],f=e[0],d=e[1],m=e[2],M=e[3],b=e[4],g=e[5],_=e[6],p=e[7],v=e[8],x=(0,r.FD)();return Math.abs(n-f)<=x*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(i-d)<=x*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-m)<=x*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(a-M)<=x*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(s-b)<=x*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(u-g)<=x*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(h-_)<=x*Math.max(1,Math.abs(h),Math.abs(_))&&Math.abs(c-p)<=x*Math.max(1,Math.abs(c),Math.abs(p))&&Math.abs(l-v)<=x*Math.max(1,Math.abs(l),Math.abs(v))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:i,fromQuat:f,fromRotation:function(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:s,isOrthoNormal:function(t){let e=(0,r.FD)(),n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],h=t[6],c=t[7],l=t[8];return Math.abs(1-(n*n+a*a+h*h))<=e&&Math.abs(1-(i*i+s*s+c*c))<=e&&Math.abs(1-(o*o+u*u+l*l))<=e},mul:M,multiply:c,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},normalFromMat4:d,normalFromMat4Legacy:function(t,e){let n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],h=e[9],c=e[10],l=c*a-s*h,f=-c*o+s*u,d=h*o-a*u,m=n*l+r*f+i*d;if(!m)return null;let M=1/m;return t[0]=l*M,t[1]=(-c*r+i*h)*M,t[2]=(s*r-i*a)*M,t[3]=f*M,t[4]=(c*n-i*u)*M,t[5]=(-s*n+i*o)*M,t[6]=d*M,t[7]=(-h*n+r*u)*M,t[8]=(a*n-r*o)*M,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=Math.sin(n),d=Math.cos(n);return t[0]=d*r+f*a,t[1]=d*i+f*s,t[2]=d*o+f*u,t[3]=d*a-f*r,t[4]=d*s-f*i,t[5]=d*u-f*o,t[6]=h,t[7]=c,t[8]=l,t},scale:l,scaleByVec2:function(t,e,n){let r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t},set:o,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:b,subtract:m,translate:function(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=n[0],d=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=f*r+d*a+h,t[7]=f*i+d*s+c,t[8]=f*o+d*u+l,t},transpose:a},Symbol.toStringTag,{value:"Module"}))},58083(t,e,n){n.d(e,{$0:()=>g,$h:()=>O,B8:()=>c,C:()=>o,D_:()=>s,N9:()=>p,O7:()=>j,Qw:()=>h,Tl:()=>f,X_:()=>S,e$:()=>m,eL:()=>M,hM:()=>_,hZ:()=>a,hs:()=>d,kN:()=>b,l:()=>w,lw:()=>l,mg:()=>u,o1:()=>A,sC:()=>y,t2:()=>C,t5:()=>T,tZ:()=>E,ut:()=>R});var r=n(51850),i=n(34304);function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function a(t,e,n,r,i,o,a,s,u,h,c,l,f,d,m,M,b){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=h,t[9]=c,t[10]=l,t[11]=f,t[12]=d,t[13]=m,t[14]=M,t[15]=b,t}function s(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function u(t,e){if(t===e){let n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function h(t,e){return c(t,e)||s(t),t}function c(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15],_=n*s-r*a,p=n*u-i*a,v=n*h-o*a,x=r*u-i*s,y=r*h-o*s,S=i*h-o*u,w=c*M-l*m,A=c*b-f*m,j=c*g-d*m,O=l*b-f*M,T=l*g-d*M,q=f*g-d*b,C=_*q-p*T+v*O+x*j-y*A+S*w;return C?(C=1/C,t[0]=(s*q-u*T+h*O)*C,t[1]=(i*T-r*q-o*O)*C,t[2]=(M*S-b*y+g*x)*C,t[3]=(f*y-l*S-d*x)*C,t[4]=(u*j-a*q-h*A)*C,t[5]=(n*q-i*j+o*A)*C,t[6]=(b*v-m*S-g*p)*C,t[7]=(c*S-f*v+d*p)*C,t[8]=(a*T-s*j+h*w)*C,t[9]=(r*j-n*T-o*w)*C,t[10]=(m*y-M*v+g*_)*C,t[11]=(l*v-c*y-d*_)*C,t[12]=(s*A-a*O-u*w)*C,t[13]=(n*O-r*A+i*w)*C,t[14]=(M*p-m*x-b*_)*C,t[15]=(c*x-l*p+f*_)*C,t):null}function l(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=e[8],f=e[9],d=e[10],m=e[11],M=e[12],b=e[13],g=e[14],_=e[15],p=n[0],v=n[1],x=n[2],y=n[3];return t[0]=p*r+v*s+x*l+y*M,t[1]=p*i+v*u+x*f+y*b,t[2]=p*o+v*h+x*d+y*g,t[3]=p*a+v*c+x*m+y*_,p=n[4],v=n[5],x=n[6],y=n[7],t[4]=p*r+v*s+x*l+y*M,t[5]=p*i+v*u+x*f+y*b,t[6]=p*o+v*h+x*d+y*g,t[7]=p*a+v*c+x*m+y*_,p=n[8],v=n[9],x=n[10],y=n[11],t[8]=p*r+v*s+x*l+y*M,t[9]=p*i+v*u+x*f+y*b,t[10]=p*o+v*h+x*d+y*g,t[11]=p*a+v*c+x*m+y*_,p=n[12],v=n[13],x=n[14],y=n[15],t[12]=p*r+v*s+x*l+y*M,t[13]=p*i+v*u+x*f+y*b,t[14]=p*o+v*h+x*d+y*g,t[15]=p*a+v*c+x*m+y*_,t}function f(t,e,n){let r=n[0],i=n[1],o=n[2];if(e===t)t[12]=e[0]*r+e[4]*i+e[8]*o+e[12],t[13]=e[1]*r+e[5]*i+e[9]*o+e[13],t[14]=e[2]*r+e[6]*i+e[10]*o+e[14],t[15]=e[3]*r+e[7]*i+e[11]*o+e[15];else{let n=e[0],a=e[1],s=e[2],u=e[3],h=e[4],c=e[5],l=e[6],f=e[7],d=e[8],m=e[9],M=e[10],b=e[11];t[0]=n,t[1]=a,t[2]=s,t[3]=u,t[4]=h,t[5]=c,t[6]=l,t[7]=f,t[8]=d,t[9]=m,t[10]=M,t[11]=b,t[12]=n*r+h*i+d*o+e[12],t[13]=a*r+c*i+m*o+e[13],t[14]=s*r+l*i+M*o+e[14],t[15]=u*r+f*i+b*o+e[15]}return t}function d(t,e,n){let r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function m(t,e,n,r){let a=r[0],s=r[1],u=r[2],h=Math.sqrt(a*a+s*s+u*u);if(h<=(0,i.FD)())return void o(t,e);h=1/h,a*=h,s*=h,u*=h;let c=Math.sin(n),l=Math.cos(n),f=1-l,d=e[0],m=e[1],M=e[2],b=e[3],g=e[4],_=e[5],p=e[6],v=e[7],x=e[8],y=e[9],S=e[10],w=e[11],A=a*a*f+l,j=s*a*f+u*c,O=u*a*f-s*c,T=a*s*f-u*c,q=s*s*f+l,C=u*s*f+a*c,R=a*u*f+s*c,E=s*u*f-a*c,P=u*u*f+l;t[0]=d*A+g*j+x*O,t[1]=m*A+_*j+y*O,t[2]=M*A+p*j+S*O,t[3]=b*A+v*j+w*O,t[4]=d*T+g*q+x*C,t[5]=m*T+_*q+y*C,t[6]=M*T+p*q+S*C,t[7]=b*T+v*q+w*C,t[8]=d*R+g*E+x*P,t[9]=m*R+_*E+y*P,t[10]=M*R+p*E+S*P,t[11]=b*R+v*E+w*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15])}function M(t,e,n){let r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],h=e[8],c=e[9],l=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+h*r,t[5]=a*i+c*r,t[6]=s*i+l*r,t[7]=u*i+f*r,t[8]=h*i-o*r,t[9]=c*i-a*r,t[10]=l*i-s*r,t[11]=f*i-u*r,t}function b(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function g(t,e,n){if(0===e)return s(t);let r=n[0],o=n[1],a=n[2],u=Math.sqrt(r*r+o*o+a*a);if(u<=(0,i.FD)())return null;u=1/u,r*=u,o*=u,a*=u;let h=Math.sin(e),c=Math.cos(e),l=1-c;return t[0]=r*r*l+c,t[1]=o*r*l+a*h,t[2]=a*r*l-o*h,t[3]=0,t[4]=r*o*l-a*h,t[5]=o*o*l+c,t[6]=a*o*l+r*h,t[7]=0,t[8]=r*a*l+o*h,t[9]=o*a*l-r*h,t[10]=a*a*l+c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function p(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function v(t,e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,h=o+o,c=r*s,l=r*u,f=r*h,d=i*u,m=i*h,M=o*h,b=a*s,g=a*u,_=a*h;return t[0]=1-(d+M),t[1]=l+_,t[2]=f-g,t[3]=0,t[4]=l-_,t[5]=1-(c+M),t[6]=m+b,t[7]=0,t[8]=f+g,t[9]=m-b,t[10]=1-(c+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const x=(0,r.vt)();function y(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function S(t,e){let n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],h=e[9],c=e[10];return t[0]=Math.sqrt(n*n+r*r+i*i),t[1]=Math.sqrt(o*o+a*a+s*s),t[2]=Math.sqrt(u*u+h*h+c*c),t}function w(t,e){let n=e[0]+e[5]+e[10],r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t}function A(t,e,n,r){let i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,h=o+o,c=a+a,l=i*u,f=i*h,d=i*c,m=o*h,M=o*c,b=a*c,g=s*u,_=s*h,p=s*c,v=r[0],x=r[1],y=r[2];return t[0]=(1-(m+b))*v,t[1]=(f+p)*v,t[2]=(d-_)*v,t[3]=0,t[4]=(f-p)*x,t[5]=(1-(l+b))*x,t[6]=(M+g)*x,t[7]=0,t[8]=(d+_)*y,t[9]=(M-g)*y,t[10]=(1-(l+m))*y,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function j(t,e,n,r,i){let o=e[0],a=e[1],s=e[2],u=e[3],h=o+o,c=a+a,l=s+s,f=o*h,d=o*c,m=o*l,M=a*c,b=a*l,g=s*l,_=u*h,p=u*c,v=u*l,x=r[0],y=r[1],S=r[2],w=i[0],A=i[1],j=i[2],O=(1-(M+g))*x,T=(d+v)*x,q=(m-p)*x,C=(d-v)*y,R=(1-(f+g))*y,E=(b+_)*y,P=(m+p)*S,I=(b-_)*S,z=(1-(f+M))*S;return t[0]=O,t[1]=T,t[2]=q,t[3]=0,t[4]=C,t[5]=R,t[6]=E,t[7]=0,t[8]=P,t[9]=I,t[10]=z,t[11]=0,t[12]=n[0]+w-(O*w+C*A+P*j),t[13]=n[1]+A-(T*w+R*A+I*j),t[14]=n[2]+j-(q*w+E*A+z*j),t[15]=1,t}function O(t,e,n,r,i,o,a){let s=1/(n-e),u=1/(i-r),h=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*h,t[15]=0,t}function T(t,e,n,r){let o=e[0],a=e[1],u=e[2],h=o-n[0],c=a-n[1],l=u-n[2],f=(0,i.FD)();if(Math.abs(h)<f&&Math.abs(c)<f&&Math.abs(l)<f)return void s(t);let d=1/Math.sqrt(h*h+c*c+l*l);h*=d,c*=d,l*=d;let m=r[0],M=r[1],b=r[2],g=M*l-b*c,_=b*h-m*l,p=m*c-M*h;d=Math.sqrt(g*g+_*_+p*p),d?(d=1/d,g*=d,_*=d,p*=d):(g=0,_=0,p=0);let v=c*p-l*_,x=l*g-h*p,y=h*_-c*g;d=Math.sqrt(v*v+x*x+y*y),d?(d=1/d,v*=d,x*=d,y*=d):(v=0,x=0,y=0),t[0]=g,t[1]=v,t[2]=h,t[3]=0,t[4]=_,t[5]=x,t[6]=c,t[7]=0,t[8]=p,t[9]=y,t[10]=l,t[11]=0,t[12]=-(g*o+_*a+p*u),t[13]=-(v*o+x*a+y*u),t[14]=-(h*o+c*a+l*u),t[15]=1}function q(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function C(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function R(t){let e=(0,i.FD)(),n=t[0],r=t[1],o=t[2],a=t[4],s=t[5],u=t[6],h=t[8],c=t[9],l=t[10];return Math.abs(1-(n*n+a*a+h*h))<=e&&Math.abs(1-(r*r+s*s+c*c))<=e&&Math.abs(1-(o*o+u*u+l*l))<=e}function E(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const P=l,I=q;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15];return t[0]=s*(f*g-d*b)-l*(u*g-h*b)+M*(u*d-h*f),t[1]=-(r*(f*g-d*b)-l*(i*g-o*b)+M*(i*d-o*f)),t[2]=r*(u*g-h*b)-s*(i*g-o*b)+M*(i*h-o*u),t[3]=-(r*(u*d-h*f)-s*(i*d-o*f)+l*(i*h-o*u)),t[4]=-(a*(f*g-d*b)-c*(u*g-h*b)+m*(u*d-h*f)),t[5]=n*(f*g-d*b)-c*(i*g-o*b)+m*(i*d-o*f),t[6]=-(n*(u*g-h*b)-a*(i*g-o*b)+m*(i*h-o*u)),t[7]=n*(u*d-h*f)-a*(i*d-o*f)+c*(i*h-o*u),t[8]=a*(l*g-d*M)-c*(s*g-h*M)+m*(s*d-h*l),t[9]=-(n*(l*g-d*M)-c*(r*g-o*M)+m*(r*d-o*l)),t[10]=n*(s*g-h*M)-a*(r*g-o*M)+m*(r*h-o*s),t[11]=-(n*(s*d-h*l)-a*(r*d-o*l)+c*(r*h-o*s)),t[12]=-(a*(l*b-f*M)-c*(s*b-u*M)+m*(s*f-u*l)),t[13]=n*(l*b-f*M)-c*(r*b-i*M)+m*(r*f-i*l),t[14]=-(n*(s*b-u*M)-a*(r*b-i*M)+m*(r*u-i*s)),t[15]=n*(s*f-u*l)-a*(r*f-i*l)+c*(r*u-i*s),t},copy:o,determinant:function(t){let e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],h=t[8],c=t[9],l=t[10],f=t[11],d=t[12],m=t[13],M=t[14],b=t[15];return(e*a-n*o)*(l*b-f*M)-(e*s-r*o)*(c*b-f*m)+(e*u-i*o)*(c*M-l*m)+(n*s-r*a)*(h*b-f*d)-(n*u-i*a)*(h*M-l*d)+(r*u-i*s)*(h*m-c*d)},equals:function(t,e){if(t===e)return!0;let n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],h=t[6],c=t[7],l=t[8],f=t[9],d=t[10],m=t[11],M=t[12],b=t[13],g=t[14],_=t[15],p=e[0],v=e[1],x=e[2],y=e[3],S=e[4],w=e[5],A=e[6],j=e[7],O=e[8],T=e[9],q=e[10],C=e[11],R=e[12],E=e[13],P=e[14],I=e[15],z=(0,i.FD)();return Math.abs(n-p)<=z*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(r-v)<=z*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(o-x)<=z*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-y)<=z*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(s-S)<=z*Math.max(1,Math.abs(s),Math.abs(S))&&Math.abs(u-w)<=z*Math.max(1,Math.abs(u),Math.abs(w))&&Math.abs(h-A)<=z*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(c-j)<=z*Math.max(1,Math.abs(c),Math.abs(j))&&Math.abs(l-O)<=z*Math.max(1,Math.abs(l),Math.abs(O))&&Math.abs(f-T)<=z*Math.max(1,Math.abs(f),Math.abs(T))&&Math.abs(d-q)<=z*Math.max(1,Math.abs(d),Math.abs(q))&&Math.abs(m-C)<=z*Math.max(1,Math.abs(m),Math.abs(C))&&Math.abs(M-R)<=z*Math.max(1,Math.abs(M),Math.abs(R))&&Math.abs(b-E)<=z*Math.max(1,Math.abs(b),Math.abs(E))&&Math.abs(g-P)<=z*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(_-I)<=z*Math.max(1,Math.abs(_),Math.abs(I))},exactEquals:C,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){let n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,h=n*a,c=r*a,l=r*s,f=i*a,d=i*s,m=i*u,M=o*a,b=o*s,g=o*u;return t[0]=1-l-m,t[1]=c+g,t[2]=f-b,t[3]=0,t[4]=c-g,t[5]=1-h-m,t[6]=d+M,t[7]=0,t[8]=f+b,t[9]=d-M,t[10]=1-h-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){let n=x,r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],h=e[6],c=e[7],l=r*r+i*i+o*o+a*a;return l>0?(n[0]=2*(s*a+c*r+u*o-h*i)/l,n[1]=2*(u*a+c*i+h*r-s*o)/l,n[2]=2*(h*a+c*o+s*i-u*r)/l):(n[0]=2*(s*a+c*r+u*o-h*i),n[1]=2*(u*a+c*i+h*r-s*o),n[2]=2*(h*a+c*o+s*i-u*r)),v(t,e,n),t},fromRotation:g,fromRotationTranslation:v,fromRotationTranslationScale:A,fromRotationTranslationScaleOrigin:j,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:b,fromXRotation:_,fromYRotation:function(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:p,frustum:O,getRotation:w,getScale:S,getTranslation:y,hasIdentityRotation:E,identity:s,invert:c,invertOrIdentity:h,isOrthoNormal:R,lookAt:T,mul:P,multiply:l,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:function(t,e,n,r,i,o,a){let s=1/(e-n),u=1/(r-i),h=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*h,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*h,t[15]=1,t},perspective:function(t,e,n,r,i){let o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){let i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),h=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=h,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*h*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:m,rotateX:M,rotateY:function(t,e,n){let r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],h=e[8],c=e[9],l=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-h*r,t[1]=a*i-c*r,t[2]=s*i-l*r,t[3]=u*i-f*r,t[8]=o*r+h*i,t[9]=a*r+c*i,t[10]=s*r+l*i,t[11]=u*r+f*i,t},rotateZ:function(t,e,n){let r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],h=e[4],c=e[5],l=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+h*r,t[1]=a*i+c*r,t[2]=s*i+l*r,t[3]=u*i+f*r,t[4]=h*i-o*r,t[5]=c*i-a*r,t[6]=l*i-s*r,t[7]=f*i-u*r,t},scale:d,set:a,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:I,subtract:q,targetTo:function(t,e,n,r){let i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],h=r[2],c=i-n[0],l=o-n[1],f=a-n[2],d=c*c+l*l+f*f;d>0&&(d=1/Math.sqrt(d),c*=d,l*=d,f*=d);let m=u*f-h*l,M=h*c-s*f,b=s*l-u*c;return d=m*m+M*M+b*b,d>0&&(d=1/Math.sqrt(d),m*=d,M*=d,b*=d),t[0]=m,t[1]=M,t[2]=b,t[3]=0,t[4]=l*b-f*M,t[5]=f*m-c*b,t[6]=c*M-l*m,t[7]=0,t[8]=c,t[9]=l,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t},translate:f,transpose:u},Symbol.toStringTag,{value:"Module"}))},4197(t,e,n){n.d(e,{Vj:()=>c,cj:()=>h,jh:()=>o,l5:()=>s,yH:()=>u});var r=n(34275),i=n(9093);function o(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function a(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function s(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}function u(t,e){if(0===e.length)return a(t);if(0===t.length)return a(e);let n=o(t.length+e.length);for(let e=0;e<t.length;++e)n[e]=t[e];for(let r=0;r<e.length;++r)n[t.length+r]=e[r];return n}function h(t){return[...t]}function c(t){let e=(0,i.vt)();for(let n=0;n<16;++n)e[n]=t[n];return e}},70328(t,e,n){n.d(e,{BI:()=>O,C:()=>a,DC:()=>f,Ej:()=>p,Ie:()=>A,Jt:()=>j,Lu:()=>x,Ne:()=>y,RF:()=>l,TF:()=>g,VL:()=>m,aI:()=>q,fA:()=>s,gE:()=>h,gX:()=>_,hZ:()=>w,iT:()=>d,is:()=>T,pg:()=>v,uJ:()=>b,vI:()=>S,vY:()=>u,vt:()=>o,w1:()=>c,yr:()=>M}),n(35522);var r=n(5443),i=(n(19419),n(4197));function o(t=R){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function a(t,e){for(let n=0;n<6;n++)t[n]=e[n];return t}function s(t,e,n,r,i,a,s=o()){return s[0]=t,s[1]=e,s[2]=n,s[3]=r,s[4]=i,s[5]=a,s}function u(t,e=o()){return function(t,e,n,r=o()){return w(r,C),function(t,e,n=0,r=e.length/3){let i=t[0],o=t[1],a=t[2],s=t[3],u=t[4],h=t[5];for(let t=0;t<r;t++)i=Math.min(i,e[n+3*t]),o=Math.min(o,e[n+3*t+1]),a=Math.min(a,e[n+3*t+2]),s=Math.max(s,e[n+3*t]),u=Math.max(u,e[n+3*t+1]),h=Math.max(h,e[n+3*t+2]);t[0]=i,t[1]=o,t[2]=a,t[3]=s,t[4]=u,t[5]=h}(r,t,e,n),r}(t,0,t.length/3,e)}function h(t,e=(0,i.jh)(24)){let[n,r,o,a,s,u]=t;return e[0]=n,e[1]=r,e[2]=o,e[3]=n,e[4]=r,e[5]=u,e[6]=n,e[7]=s,e[8]=o,e[9]=n,e[10]=s,e[11]=u,e[12]=a,e[13]=r,e[14]=o,e[15]=a,e[16]=r,e[17]=u,e[18]=a,e[19]=s,e[20]=o,e[21]=a,e[22]=s,e[23]=u,e}function c(t,e){return isFinite(t[2])||isFinite(t[5])?new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}):new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function l(t,e,n=t){n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.min(t[2],e[2]),n[3]=Math.max(t[3],e[3]),n[4]=Math.max(t[4],e[4]),n[5]=Math.max(t[5],e[5])}function f(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function d(t,[e,n,r]){!function(t,e,n,r){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.min(t[2],r),t[3]=Math.max(t[3],e),t[4]=Math.max(t[4],n),t[5]=Math.max(t[5],r)}(t,e,n,r)}function m(t){return t[0]>=t[3]?0:t[3]-t[0]}function M(t){return t[1]>=t[4]?0:t[4]-t[1]}function b(t){return t[2]>=t[5]?0:t[5]-t[2]}function g(t){let e=m(t),n=b(t),r=M(t);return e*e+n*n+r*r}function _(t,e=[0,0,0]){return e[0]=t[0]+m(t)/2,e[1]=t[1]+M(t)/2,e[2]=t[2]+b(t)/2,e}function p(t,e=[0,0,0]){return e[0]=m(t),e[1]=M(t),e[2]=b(t),e}function v(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function x(t,e){return e[0]=t[3],e[1]=t[4],e[2]=t[5],e}function y(t,e,n=t){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n!==t&&(n[3]=t[3],n[4]=t[4],n[5]=t[5]),n}function S(t,e,n=t){return n[3]=e[0],n[4]=e[1],n[5]=e[2],n!==t&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),t}function w(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function A(t){return t?w(t,C):o(C)}function j(t,e){return t[0]=e[0],t[1]=e[1],t[2]=-1/0,t[3]=e[2],t[4]=e[3],t[5]=1/0,t}function O(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=-1/0,t[3]=r,t[4]=i,t[5]=1/0,t}function T(t){return 6===t.length}function q(t,e,n){if(null==t||null==e)return t===e;if(!T(t)||!T(e))return!1;if(n){for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1}else for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],R=[0,0,0,0,0,0];o(),n.d(e,["qv",0,C,"v_",0,R])},19419(t,e,n){n.d(e,{$9:()=>S,C:()=>o,DC:()=>m,HY:()=>y,IO:()=>l,Ie:()=>A,Rj:()=>x,Uc:()=>v,VL:()=>M,VY:()=>s,Wc:()=>g,aI:()=>O,bx:()=>f,fA:()=>a,fT:()=>d,gR:()=>w,gX:()=>_,ib:()=>p,nw:()=>c,pJ:()=>T,tK:()=>h,uJ:()=>b,vt:()=>i,w1:()=>u}),n(34727);var r=n(5443);function i(t=C){return[t[0],t[1],t[2],t[3]]}function o(t,e){return t!==e&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]),t}function a(t,e,n,r,o=i()){return o[0]=t,o[1]=e,o[2]=n,o[3]=r,o}function s(t,e=i()){return e[0]=t.xmin,e[1]=t.ymin,e[2]=t.xmax,e[3]=t.ymax,e}function u(t,e,n=new r.A){return n.xmin=t[0],n.ymin=t[1],n.xmax=t[2],n.ymax=t[3],n.spatialReference=e,n}function h(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function c(t,e){e<t[0]&&(t[0]=e),e>t[2]&&(t[2]=e)}function l(t,e){e<t[1]&&(t[1]=e),e>t[3]&&(t[3]=e)}function f(t,{xmin:e,ymin:n,xmax:r,ymax:i}){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],r),t[3]=Math.max(t[3],i)}function d(t,e,n){if(null!=e)if("length"in e)j(e)?(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[2]),n[3]=Math.max(t[3],e[3])):(2===e.length||3===e.length)&&(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[0]),n[3]=Math.max(t[3],e[1]));else switch(e.type){case"extent":n[0]=Math.min(t[0],e.xmin),n[1]=Math.min(t[1],e.ymin),n[2]=Math.max(t[2],e.xmax),n[3]=Math.max(t[3],e.ymax);break;case"point":n[0]=Math.min(t[0],e.x),n[1]=Math.min(t[1],e.y),n[2]=Math.max(t[2],e.x),n[3]=Math.max(t[3],e.y)}else o(n,t)}function m(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[2]),t[3]=Math.max(t[3],e[3])}function M(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}function b(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}function g(t){return M(t)*b(t)}function _(t,e=[0,0]){return e[0]=(t[0]+t[2])/2,e[1]=(t[1]+t[3])/2,e}function p(t){let e=M(t),n=b(t);return Math.sqrt(e*e+n*n)}function v(t,e){return x(t,e[0],e[1])}function x(t,e,n){return e>=t[0]&&n>=t[1]&&e<=t[2]&&n<=t[3]}function y(t,e){return Math.max(e[0],t[0])<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])<=Math.min(e[3],t[3])}function S(t,e,n){return Math.max(e[0],t[0])-n<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])-n<=Math.min(e[3],t[3])}function w(t,e){return e[0]>=t[0]&&e[2]<=t[2]&&e[1]>=t[1]&&e[3]<=t[3]}function A(t){return t?o(t,q):i(q)}function j(t){return null!=t&&4===t.length}function O(t,e){return j(t)&&j(e)?t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]:null==t&&null==e||t===e}function T(t,e){if(4!==e.length||t[0]===t[2]||t[1]===t[3])return!1;for(let n=0;n<e.length;n++){let r=e[n],i=e[(n+1)%e.length];if(r[0]!==t[0]&&r[0]!==t[2]||r[1]!==t[1]&&r[1]!==t[3])return!1;let o=r[1]===i[1]&&r[0]!==i[0],a=r[0]===i[0]&&r[1]!==i[1];if(!o&&!a)return!1}return!0}const q=[1/0,1/0,-1/0,-1/0],C=[0,0,0,0];n.d(e,["qv",0,q])},65720(t,e,n){n.d(e,{C:()=>g,vt:()=>M,Qy:()=>b,ui:()=>_,ST:()=>w,bU:()=>j,pw:()=>S,m7:()=>p,ZU:()=>v,GH:()=>y,Pi:()=>x,LJ:()=>A,c8:()=>q});var r=n(4341),i=n(58083),o=n(35522),a=n(51850),s=n(78955),u=n(91829),h=n(70328),c=n(71351);function l(t){return t?{ray:(0,c.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,c.vt)(),c0:0,c1:Number.MAX_VALUE}}new r.I(()=>l());var f=n(27921);function d(t,e,n,r){let{t0:i,t1:o}=r,a=(0,f.mN)(t,e),s=(0,f.mN)(t,n);if(a>=0&&s>=0)return!1;if(a<0&&s>=0){let t=-a/(s-a);if(t<i)return!1;t<o&&(o=t)}else if(a>=0&&s<0){let t=a/(a-s);if(t>o)return!1;t>i&&(i=t)}return r.t0=i,r.t1=o,!0}var m=n(32114);function M(t){return t?[(0,f.vt)(t[0]),(0,f.vt)(t[1]),(0,f.vt)(t[2]),(0,f.vt)(t[3]),(0,f.vt)(t[4]),(0,f.vt)(t[5])]:[(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)()]}function b(){return[(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)()]}function g(t,e){for(let n=0;n<C;n++)(0,f.C)(t[n],e[n]);return t}function _(t,e,n,r=I){let a=(0,i.lw)(m.Rc.get(),e,t);(0,i.B8)(a,a);for(let t=0;t<R;++t){let e=(0,s.Z0)(m.Km.get(),E[t],a);(0,o.hZ)(r[t],e[0]/e[3],e[1]/e[3],e[2]/e[3])}!function(t,e){(0,f.Cr)(e[4],e[0],e[3],t[0]),(0,f.Cr)(e[1],e[5],e[6],t[1]),(0,f.Cr)(e[4],e[5],e[1],t[2]),(0,f.Cr)(e[3],e[2],e[6],t[3]),(0,f.Cr)(e[0],e[1],e[2],t[4]),(0,f.Cr)(e[5],e[4],e[7],t[5])}(n,r)}function p(t,e){return v(t,e.center,e.radius)}function v(t,e,n){for(let r=0;r<C;r++){let i=t[r];if(i[0]*e[0]+i[1]*e[1]+i[2]*e[2]+i[3]>=n)return!1}return!0}function x(t,e,n){for(let r of T)if((0,f.wE)(t[r],e,n))return!0;return!1}function y(t,e,n){let r=(0,h.gX)(e,z),i=(0,h.VL)(e)/2,a=(0,h.yr)(e)/2,s=(0,h.uJ)(e)/2;return n?function(t,e,n,r,i,a){let s=(0,o.Z0)(F,e,a);for(let e=0;e<C;e++){let o=t[e];if(o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]-(Math.abs(o[0]*a[0]+o[1]*a[1]+o[2]*a[2])*n+Math.abs(o[0]*a[4]+o[1]*a[5]+o[2]*a[6])*r+Math.abs(o[0]*a[8]+o[1]*a[9]+o[2]*a[10])*i)>0)return!1}return!0}(t,r,i,a,s,n):function(t,e,n,r,i){for(let o=0;o<C;o++){let a=t[o];if(a[0]*e[0]+a[1]*e[1]+a[2]*e[2]+a[3]-(Math.abs(a[0])*n+Math.abs(a[1])*r+Math.abs(a[2])*i)>0)return!1}return!0}(t,r,i,a,s)}function S(t,e){return O(t,function(t,e=l()){return(0,c.C)(t,e.ray),e.c0=0,e.c1=Number.MAX_VALUE,e}(e,P.get()))}function w(t,e,n){return O(t,function(t,e,n=l()){let r=(0,o.Bw)(t.vector);return(0,c.fA)(t.origin,e,n.ray),n.c0=0,n.c1=r,n}(e,n,P.get()))}function A(t,e,n){return function(t,e,n,r){let i={t0:0,t1:1};for(let o of e)if(!d(t[o],n,r,i))return!1;return i.t0<i.t1}(t,T,e,n)}function j(t,e){for(let n=0;n<C;n++)if((0,f.mN)(t[n],e)>0)return!1;return!0}function O(t,e){for(let n=0;n<C;n++)if(!(0,f.$Q)(t[n],e))return!1;return!0}const T=[0,1,2,3,5],q={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},C=6,R=8,E=[(0,u.fA)(-1,-1,-1,1),(0,u.fA)(1,-1,-1,1),(0,u.fA)(1,1,-1,1),(0,u.fA)(-1,1,-1,1),(0,u.fA)(-1,-1,1,1),(0,u.fA)(1,-1,1,1),(0,u.fA)(1,1,1,1),(0,u.fA)(-1,1,1,1)],P=new r.I(l),I=b(),z=(0,a.vt)(),F=(0,a.vt)()},11964(t,e,n){n.d(e,{Cr:()=>c,H6:()=>d,LV:()=>h,_I:()=>f,kb:()=>l,vt:()=>u});var r=n(34727),i=n(4341),o=n(35522),a=n(51850),s=n(32114);function u(t){return t?{origin:(0,a.o8)(t.origin),vector:(0,a.o8)(t.vector)}:{origin:(0,a.vt)(),vector:(0,a.vt)()}}function h(t,e){let n=m.get();return n.origin=t,n.vector=e,n}function c(t,e,n=u()){return(0,o.C)(n.origin,t),(0,o.Re)(n.vector,e,t),n}function l(t,e){let n=(0,o.Re)(s.rq.get(),e,t.origin),i=(0,o.Om)(t.vector,n),a=(0,o.Om)(t.vector,t.vector);if(Math.abs(a)<M)return(0,o.hG)(t.origin,e);let u=(0,r.qE)(i/a,0,1),h=(0,o.Re)(s.rq.get(),(0,o.hs)(s.rq.get(),t.vector,u),n);return(0,o.Om)(h,h)}function f(t,e,n){return d(t,e,0,1,n)}function d(t,e,n,i,a){let{vector:u,origin:h}=t,c=(0,o.Re)(s.rq.get(),e,h),l=(0,o.Om)(u,c)/(0,o.m3)(u);return(0,o.hs)(a,u,(0,r.qE)(l,n,i)),(0,o.WQ)(a,a,t.origin)}(0,a.vt)(),(0,a.vt)();const m=new i.I(()=>u()),M=1e-9},27921(t,e,n){n.d(e,{$Q:()=>T,BX:()=>O,C:()=>h,Cr:()=>d,H:()=>C,LV:()=>u,O_:()=>f,Qj:()=>c,T7:()=>w,Ui:()=>S,_I:()=>R,fA:()=>l,gv:()=>A,lU:()=>m,mN:()=>E,mP:()=>x,mR:()=>y,vE:()=>z,vt:()=>s,wE:()=>P});var r=n(34727),i=n(35522),o=n(51850),a=(n(78955),n(44280),n(32114));function s(t=F){return[t[0],t[1],t[2],t[3]]}function u(t=F[0],e=F[1],n=F[2],r=F[3]){return l(t,e,n,r,a.Km.get())}function h(t,e){return l(e[0],e[1],e[2],e[3],t)}function c(t){return t}function l(t,e,n,r,i=s()){return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function f(t,e,n){let r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=e[0]*i,n[1]=e[1]*i,n[2]=e[2]*i,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function d(t,e,n,r=s()){let i=n[0]-e[0],o=n[1]-e[1],a=n[2]-e[2],u=t[0]-e[0],h=t[1]-e[1],c=t[2]-e[2],l=o*c-a*h,f=a*u-i*c,d=i*h-o*u,m=l*l+f*f+d*d,M=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return r[0]=l*M,r[1]=f*M,r[2]=d*M,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function m(t,e,n,r=0,o=Math.floor(1/3*n),a=Math.floor(2/3*n)){if(n<3)return!1;e(b,r);let s=o,u=!1;for(;s<n-1&&!u;)e(g,s),s++,u=!(0,i.t2)(b,g);if(!u)return!1;for(s=Math.max(s,a),u=!1;s<n&&!u;)e(_,s),s++,(0,i.Re)(p,b,g),(0,i.S8)(p,p),(0,i.Re)(v,g,_),(0,i.S8)(v,v),u=!(0,i.t2)(b,_)&&!(0,i.t2)(g,_)&&Math.abs((0,i.Om)(p,v))<M;return u?(d(b,g,_,t),!0):(0!==r||1!==o||2!==a)&&m(t,e,n,0,1,2)}n(32728);const M=.99619469809,b=(0,o.vt)(),g=(0,o.vt)(),_=(0,o.vt)(),p=(0,o.vt)(),v=(0,o.vt)();function x(t,e,n){return e!==t&&h(t,e),t[3]=-(0,i.Om)(t,n),t}function y(t,e,n,r){return(0,i.$A)(_,e,t),f(n,_,r)}function S(t,e,n){return null!=e&&I(z(t,e.origin,e.direction,V,n))}function w(t,e,n){return I(z(t,e.origin,e.vector,0,n))}function A(t,e,n){return I(z(t,e.origin,e.vector,1,n))}function j(t,e){return E(t,e)<=0}function O(t,e){return E(t,e)>=0}function T(t,e){return function(t,e,n,r,o,a,s){let u=(0,i.Om)(t,n),h=E(t,e);if(u>-1e-6&&u<1e-6)return q(h,o,a);let c=-h/u,l=q(u,o,!1);return!(s&&!l&&!q(h,o,a))&&(l?c>r.c0&&(r.c0=c):c<r.c1&&(r.c1=c),r.c0<=r.c1)}(t,e.ray.origin,e.ray.direction,e,!1,!1,!0)}function q(t,e,n){return n?e?t>=0:t<=0:e?t>0:t<0}function C(t,e,n,r=!1){let o=e.at(-1),a=E(t,o),s=r?a>0:a<=0;for(let u=0;u<e.length;u++){let h=e.at(u),c=E(t,h),l=r?c>0:c<=0;s!==l&&(0,i.Cc)(n(),o,h,a/(a-c)),l&&(0,i.C)(n(),h),o=h,a=c,s=l}}function R(t,e,n){let r=(0,i.hs)(a.rq.get(),t,-t[3]),o=function(t,e,n){let r=(0,i.hs)(a.rq.get(),t,(0,i.Om)(t,e));return(0,i.Re)(n,e,r),n}(t,(0,i.Re)(a.rq.get(),e,r),a.rq.get());return(0,i.WQ)(n,o,r),n}function E(t,e){return(0,i.Om)(t,e)+t[3]}function P(t,e,n){for(let r=0;r<n;++r)if(j(t,e[r]))return!1;return!0}function I(t){return 0===t||1===t}function z(t,e,n,o,a){let s=(0,i.Om)(t,n),u=E(t,e);if(0===s)return u>=0?2:3;let h=-u/s;return 1&o&&(h=(0,r.qE)(h,0,1)),!(4&o)&&h<0||!(8&o)&&h>1?u>=0?2:3:((0,i.WQ)(a,e,(0,i.hs)(a,n,h)),u>=0?0:1)}const F=[0,0,1,0],V=8;(0,o.vt)()},71351(t,e,n){n.d(e,{C:()=>l,Cr:()=>f,LV:()=>c,fA:()=>d,kb:()=>m,vt:()=>u});var r=n(4341),i=(n(77690),n(29242)),o=n(35522),a=n(51850),s=n(32114);function u(t){return t?h((0,a.o8)(t.origin),(0,a.o8)(t.direction)):h((0,a.vt)(),(0,a.vt)())}function h(t,e){return{origin:t,direction:e}}function c(t,e){let n=M.get();return n.origin=t,n.direction=e,n}function l(t,e=u()){return d(t.origin,t.direction,e)}function f(t,e,n=u()){return(0,o.C)(n.origin,t),(0,o.Re)(n.direction,e,t),n}function d(t,e,n=u()){return(0,o.C)(n.origin,t),(0,o.C)(n.direction,e),n}function m(t,e){let n=(0,o.$A)(s.rq.get(),(0,o.S8)(s.rq.get(),t.direction),(0,o.Re)(s.rq.get(),e,t.origin));return(0,o.Om)(n,n)}const M=new r.I(()=>u());(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,i.vt)()},94008(t,e,n){n.d(e,{iy:()=>d}),n(44208),n(53966);var r=n(34727),i=n(34304),o=n(58083),a=n(35522),s=n(51850),u=n(91829),h=n(34275);var c=n(71351),l=n(44280),f=n(32114);class d{constructor(t=0,e=0,n=0,r=0){this.radius=r,"number"==typeof t?this._center=(0,s.fA)(t,e,n):function(t){return e=t,(0,h.vZ)(e)&&e.length>=3||function(t){return((0,h.aI)(t)||Array.isArray(t))&&t.length>=3}(t);var e}(t)||function(t){return(e=t)instanceof Float32Array&&e.length>=4||function(t){return Array.isArray(t)&&t.length>=4}(t);var e}(t)?(this._center=(0,s.ci)(t),this.radius=4===t.length?t[3]:e):(this._center=(0,s.o8)(t.center),this.radius=t.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(t){(0,a.C)(this.center,t)}exactEquals(t){return(0,a.aI)(this._center,t.center)&&this.radius===t.radius}copyFrom(t){return t!==this&&((0,a.C)(this._center,t.center),this.radius=t.radius),this}clone(){return new d(this.center,this.radius)}toVec4(){return(0,u.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(t){return(0,a.hG)(this.center,t)<=this.radius**2}intersects(t){let e=this.radius+t.radius;return(0,a.hG)(this.center,t.center)<=e*e}intersectRay(t,e){if(null==t||!this._intersect(t,m))return!1;let{t0:n,t1:r}=m;if((n<0||r<n&&r>0)&&(n=r),n<0)return!1;if(e){let{origin:r,direction:i}=t;e[0]=r[0]+i[0]*n,e[1]=r[1]+i[1]*n,e[2]=r[2]+i[2]*n}return!0}intersectLine(t,e){let n=(0,c.Cr)(t,e);if(!this._intersect(n,m))return[];let{origin:r,direction:o}=n,{t0:u,t1:h}=m,l=t=>{let e=(0,s.vt)();return(0,a.Ln)(e,r,o,t),this.projectPoint(e,e)};return Math.abs(u-h)<(0,i.FD)()?[l(u)]:[l(u),l(h)]}_intersect(t,e){let{origin:n,direction:r}=t,i=M;i[0]=n[0]-this.center[0],i[1]=n[1]-this.center[1],i[2]=n[2]-this.center[2];let o=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(0===o)return!1;let a=2*(r[0]*i[0]+r[1]*i[1]+r[2]*i[2]),s=a*a-4*o*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-this.radius**2);if(s<0)return!1;let u=Math.sqrt(s);return e.t0=(-a-u)/(2*o),e.t1=(-a+u)/(2*o),!0}projectPoint(t,e){let n=(0,a.Re)(f.rq.get(),t,this.center),r=(0,a.hs)(f.rq.get(),n,this.radius/(0,a.Bw)(n));return(0,a.WQ)(e,r,this.center)}closestPointOnSilhouette(t,e){let n=f.rq.get(),r=f.Rc.get();(0,a.$A)(n,t.origin,t.direction),(0,a.$A)(e,n,t.origin),(0,a.hs)(e,e,1/(0,a.Bw)(e)*this.radius);let i=this._angleToSilhouette(t.origin),s=(0,l.g7)(t.origin,e);return(0,o.$0)(r,s+i,n),(0,a.Z0)(e,e,r),e}frustumCoverage(t,e,n){let r=this.radius,i=r*r,o=t+.5*Math.PI,a=e*e+i-2*Math.cos(o)*e*r,s=Math.sqrt(a),u=a-i;if(u<=0)return.5;let h=Math.acos(Math.sqrt(u)/s)-Math.asin(r/(s/Math.sin(o)));return Math.min(1,(h+.5*n)/n)}_angleToSilhouette(t){let e=(0,a.Re)(f.rq.get(),t,this.center),n=(0,a.Bw)(e),i=this.radius,o=i+Math.abs(i-n);return(0,r.XM)(i/o)}union(t){let e=(0,a.Io)(this._center,t.center),n=this.radius,r=t.radius;return e+r<n?this:e+n<r?(this.copyFrom(t),this):((0,a.Cc)(this._center,this._center,t.center,(e+r-n)/(2*e)),this.radius=(e+n+r)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(t){let{center:e,radius:n}=this,r=t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3];return r<0?Math.min(r+n,0):Math.max(r-n,0)}}new d;const m={t0:0,t1:0},M=(0,s.vt)();(0,s.vt)(),(0,s.vt)()},44280(t,e,n){n.d(e,{g7:()=>s,gr:()=>a});var r=n(34727),i=n(35522),o=n(51850);function a(t,e){return(0,i.Om)(t,e)/(0,i.Bw)(t)}function s(t,e){let n=(0,i.Om)(t,e)/((0,i.Bw)(t)*(0,i.Bw)(e));return-(0,r.XM)(n)}(0,o.vt)(),(0,o.vt)()},32114(t,e,n){n.d(e,{Rc:()=>d,rq:()=>l,Km:()=>f}),n(44208);var r=n(26390),i=n(29242),o=n(9093),a=n(82534),s=n(48163),u=n(51850),h=n(91829);class c{constructor(t){this._create=t,this._items=[],this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){let t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new c(s.vt)}static createVec3f64(){return new c(u.vt)}static createVec4f64(){return new c(h.vt)}static createMat3f64(){return new c(i.vt)}static createMat4f64(){return new c(o.vt)}static createQuatf64(){return new c(a.vt)}get test(){}}c.createVec2f64();const l=c.createVec3f64(),f=c.createVec4f64(),d=(c.createMat3f64(),c.createMat4f64());c.createQuatf64()},32728(t,e,n){n.d(e,{YH:()=>a,nu:()=>s,wp:()=>o}),n(34727);var r=n(35522),i=n(51850);function o(t,e){let n=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),i=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),o=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,r.hZ)(t,n,i,o),t}function a(t,e,n){n||=t;let i=(0,r.Om)(t,e);(0,r.hZ)(n,t[0]-i*e[0],t[1]-i*e[1],t[2]-i*e[2]),(0,r.S8)(n,n)}function s(t,e,n,o=(0,i.vt)()){let a=(0,r.Bw)(t),s=(0,r.Bw)(e),c=(0,r.Om)(t,e)/(a*s);if(c<.9999999999999999){let i=Math.acos(c),l=((1-n)*a+n*s)/Math.sin(i),f=l/a*Math.sin((1-n)*i),d=l/s*Math.sin(n*i);return(0,r.hs)(u,t,f),(0,r.hs)(h,e,d),(0,r.WQ)(o,u,h)}return(0,r.Cc)(o,t,e,n)}(0,i.vt)(),(0,i.vt)(),(0,i.vt)();const u=(0,i.vt)(),h=(0,i.vt)()},70491(t,e,n){n.r(e),n.d(e,{default:()=>K});var r=n(32198),i=n(17676),o=n(24326),a=n(91429),s=n(35522),u=n(51850),h=n(11964),c=n(94008),l=n(93687),f=n(15142),d=n(65720),m=n(71351),M=n(620);class b{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new g,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),g.clearPool(),I[0]=null,N.prune(),W.prune()}add(t){let e=Array.from(t);this._grow(e);let n=g.acquire();for(let t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));g.release(n)}remove(t,e=null){this._objectCount-=t.length;let n=g.acquire();for(let r of t){let t=e??this.objectToBoundingSphere(r);C(t.radius)?(n.init(this._root),x(r,t,n)):this._degenerateObjects.delete(r)}g.release(n),this._shrink()}update(t,e){if(!C(e.radius)&&this._isDegenerate(t))return;let n=function(t){return I[0]=t,I}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){let r=(0,m.LV)(t,e);p(this._root,t=>{if(!function(t,e){return j(e.bounds.center,2*-e.halfSize,V),j(e.bounds.center,2*e.halfSize,D),(0,M.O_)(t.origin,t.direction,V,D)}(r,t))return!1;let e=t.node;return e.terminals.forAll(t=>{this._intersectsObject(r,t)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObject(r,t)&&n(t)}),!0})}forEachAlongRayWithVerticalOffset(t,e,n,r){let i=(0,m.LV)(t,e);p(this._root,t=>{if(!function(t,e,n){return j(e.bounds.center,2*-e.halfSize,V),j(e.bounds.center,2*e.halfSize,D),n.applyToMinMax(V,D),(0,M.O_)(t.origin,t.direction,V,D)}(i,t,r))return!1;let e=t.node;return e.terminals.forAll(t=>{this._intersectsObjectWithOffset(i,t,r)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObjectWithOffset(i,t,r)&&n(t)}),!0})}forEach(t){for(let e of this.values())t(e)}*values(){for(let t of this._nodeIteratorValues()){let e=t.node;yield*e.terminals,null!==e.residents&&(yield*e.residents)}yield*this.degenerateObjectValues()}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}*degenerateObjectValues(){yield*this._degenerateObjects.values()}findClosest(t,e,n,r=()=>!0,i=1/0){let o=1/0,a=1/0,u=null,h=T(t,e),c=s=>{if(--i,!r(s))return;let h=this.objectToBoundingSphere(s);if(!(0,d.m7)(n,h))return;let c=q(t,e,h.center),l=c-h.radius,f=c+h.radius;l<o&&(o=l,a=f,u=s)};return v(this._root,r=>{if(i<=0||!(0,d.ZU)(n,r.bounds.center,2*r.bounds.radius)||((0,s.hs)(F,h,2*r.halfSize),(0,s.WQ)(F,F,r.bounds.center),q(t,e,F)>a))return!1;let o=r.node;return o.terminals.forAll(t=>c(t)),null!==o.residents&&o.residents.forAll(t=>c(t)),!0},t,e),u}forEachInDepthRange(t,e,n,r,i,o,a){let u=-1/0,h=1/0,c={setRange:t=>{1===n?(u=Math.max(u,t.near),h=Math.min(h,t.far)):(u=Math.max(u,-t.far),h=Math.min(h,-t.near))}};c.setRange(r);let l=q(e,n,t),f=T(e,n),m=T(e,-n),M=t=>{if(!a(t))return;let r=this.objectToBoundingSphere(t),s=q(e,n,r.center)-l,f=s-r.radius,m=s+r.radius;f>h||m<u||!(0,d.m7)(o,r)||i(t,c)};v(this._root,t=>{if(!(0,d.ZU)(o,t.bounds.center,2*t.bounds.radius)||((0,s.hs)(F,f,2*t.halfSize),(0,s.WQ)(F,F,t.bounds.center),q(e,n,F)-l>h)||((0,s.hs)(F,m,2*t.halfSize),(0,s.WQ)(F,F,t.bounds.center),q(e,n,F)-l<u))return!1;let r=t.node;return r.terminals.forAll(t=>M(t)),null!==r.residents&&r.residents.forAll(t=>M(t)),!0},e,n)}forEachNode(t){p(this._root,e=>t(e.node,e.bounds,e.halfSize,e.depth))}forEachIntersectingFrustum(t,e,n=()=>!0){for(let r of this.intersectingFrustumValues(t,n))e(r)}*intersectingFrustumValues(t,e=()=>!0){for(let n of this._nodeIteratorValues(e=>(0,d.ZU)(t,e.bounds.center,2*e.bounds.radius))){let r=n.node;for(let n of r.terminals)e(n)&&(0,d.m7)(t,this.objectToBoundingSphere(n))&&(yield n);if(null!==r.residents)for(let n of r.residents)e(n)&&(0,d.m7)(t,this.objectToBoundingSphere(n))&&(yield n)}}*_nodeIteratorValues(t=()=>!0){yield*_(this._root,t)}forEachNeighbor(t,e){let n=e.radius,r=e.center,i=n=>{let r=this.objectToBoundingSphere(n);return!e.intersects(r)||t(n)},o=!0,a=t=>{o&&=i(t)};p(this._root,t=>{let e=2*t.bounds.radius,i=n+e;if((0,s.hG)(t.bounds.center,r)-i*i>0)return!1;let u=t.node;return u.terminals.forAll(a),o&&null!==u.residents&&u.residents.forAll(a),o}),o&&this.forEachDegenerateObject(a)}_intersectsObject(t,e){let n=this.objectToBoundingSphere(e);return!(n.radius>0)||n.intersectRay(t)}_intersectsObjectWithOffset(t,e,n){let r=this.objectToBoundingSphere(e);return!(r.radius>0)||n.applyToBoundingSphere(r).intersectRay(t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){let e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){let r=g.acquire().init(t);this._add(e.at(n),r),g.release(r)}}_grow(t){if(O(t,t=>this.objectToBoundingSphere(t),B),C(B.radius)&&!this._fitsInsideTree(B))if(S(this._root.node))this._root.bounds.copyFrom(B),this._root.halfSize=1.25*this._root.bounds.radius,this._root.updateBoundsRadiusFromHalfSize();else{let t=this._rootBoundsForRootAsSubNode(B);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(B,t):this._growRootAsSubNode(t),g.release(t)}}_rebuildTree(t,e){L.center=e.bounds.center,L.radius=e.halfSize,O([t,L],t=>t,k);let n=g.acquire().init(this._root);this._root.initFrom(null,k,k.radius),this._root.increaseHalfSize(1.25),p(n,t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0)),g.release(n)}_placingRootViolatesMaxDepth(t){let e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E,n=0;return p(this._root,t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth)),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){let e=t.radius,n=t.center,r=-1/0,i=this._root.bounds.center,o=this._root.halfSize;for(let t=0;t<3;t++){let a=i[t]-o-(n[t]-e),s=n[t]+e-(i[t]+o),u=Math.max(0,Math.ceil(a/(2*o))),h=Math.max(0,Math.ceil(s/(2*o)))+1,c=2**Math.ceil(Math.log(u+h)*Math.LOG2E);r=Math.max(r,c),Q[t].min=u,Q[t].max=h}for(let t=0;t<3;t++){let e=Q[t].min,n=Q[t].max,a=(r-(e+n))/2;e+=Math.ceil(a),n+=Math.floor(a);let s=i[t]-o-e*o*2;z.center[t]=s+(n+e)*o}let a=r*o;return z.radius=a*P,g.acquire().initFrom(null,z,a,0)}_growRootAsSubNode(t){let e=this._root.node;B.center=this._root.bounds.center,B.radius=this._root.halfSize,this._root.init(t),t.advanceTo(B,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){let t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null,e=this._root.node.children,n=0,r=0;for(;r<e.length&&null==t;)n=r++,t=e[n];for(;r<e.length;)if(e[r++])return-1;return n}_isDegenerate(t){return!C(this.objectToBoundingSphere(t).radius)}_fitsInsideTree(t){let e=this._root.bounds,n=this._root.halfSize;return t.radius<=n&&t.center[0]>=e.center[0]-n&&t.center[0]<=e.center[0]+n&&t.center[1]>=e.center[1]-n&&t.center[1]<=e.center[1]+n&&t.center[2]>=e.center[2]-n&&t.center[2]<=e.center[2]+n}_nodeToJSON(t){return{children:t.children.map(t=>t?this._nodeToJSON(t):null),residents:t.residents?.map(t=>this.objectToBoundingSphere(t)),terminals:t.terminals?.map(t=>this.objectToBoundingSphere(t))}}}class g{constructor(){this.bounds=new c.iy,this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,r=this.depth){return this.node=t??g.createEmptyNode(),e&&this.bounds.copyFrom(e),this.halfSize=n,this.depth=r,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds.radius=this.halfSize*P}advance(t){let e=this.node.children[t];e||(e=g.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;let n=R[t];return this.bounds.center[0]+=n[0]*this.halfSize,this.bounds.center[1]+=n[1]*this.halfSize,this.bounds.center[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e?.(this,-1),!0;if(this.isLeaf()){if(!n)return e?.(this,-1),!1;this.node.residents=null}let r=this._childIndex(t);e?.(this,r),this.advance(r)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t.radius>this.halfSize/2}_childIndex(t){let e=this.bounds.center;return+(e[0]<t.center[0])+(e[1]<t.center[1]?2:0)+(e[2]<t.center[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new f.A({shrink:!0}),residents:new f.A({shrink:!0})}}static{this._pool=new l.A(()=>new g)}static acquire(){return g._pool.acquire()}static release(t){g._pool.release(t)}static clearPool(){g._pool.prune()}}function*_(t,e=()=>!0){let n=[g.acquire().init(t)];for(;0!==n.length;){let t=n.pop();if(e(t)){if(yield t,!t.isLeaf())for(let e=0;e<t.node.children.length;e++)t.node.children[e]&&n.push(g.acquire().init(t).advance(e));g.release(t)}}}function p(t,e){let n=_(t,e);for(let t of n);}function v(t,e,n,r=1){let i=g.acquire().init(t),o=[i];for(function(t,e,n){if(!W.length)for(let t=0;t<8;++t)W.push({index:0,distance:0});for(let n=0;n<8;++n){let r=R[n];W.data[n].index=n,W.data[n].distance=q(t,e,r)}W.sort((t,e)=>t.distance-e.distance);for(let t=0;t<8;++t)n[t]=W.data[t].index}(n,r,Z);0!==o.length;){if(i=o.pop(),e(i)&&!i.isLeaf())for(let t=7;t>=0;--t){let e=Z[t];i.node.children[e]&&o.push(g.acquire().init(i).advance(e))}g.release(i)}}function x(t,e,n){N.clear();let r=n.advanceTo(e,(t,e)=>{N.push(t.node),N.push(e)})?n.node.terminals:n.node.residents;if(r.removeUnordered(t),0===r.length)for(let t=N.length-2;t>=0&&y(N.data[t],N.data[t+1]);t-=2);}function y(t,e){return e>=0&&(t.children[e]=null),!!S(t)&&(null===t.residents&&(t.residents=new f.A({shrink:!0})),!0)}function S(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function w(t,e){t[0]=Math.min(t[0],e.center[0]-e.radius),t[1]=Math.min(t[1],e.center[1]-e.radius),t[2]=Math.min(t[2],e.center[2]-e.radius)}function A(t,e){t[0]=Math.max(t[0],e.center[0]+e.radius),t[1]=Math.max(t[1],e.center[1]+e.radius),t[2]=Math.max(t[2],e.center[2]+e.radius)}function j(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function O(t,e,n){V[0]=1/0,V[1]=1/0,V[2]=1/0,D[0]=-1/0,D[1]=-1/0,D[2]=-1/0;for(let n of t){let t=e(n);C(t.radius)&&(w(V,t),A(D,t))}(0,s.Cc)(n.center,V,D,.5),n.radius=Math.max(D[0]-V[0],D[1]-V[1],D[2]-V[2])/2}function T(t,e){let n,r=1/0;for(let i=0;i<8;++i){let o=q(t,e,E[i]);o<r&&(r=o,n=E[i])}return n}function q(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function C(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}const R=[(0,u.fA)(-1,-1,-1),(0,u.fA)(1,-1,-1),(0,u.fA)(-1,1,-1),(0,u.fA)(1,1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(1,-1,1),(0,u.fA)(-1,1,1),(0,u.fA)(1,1,1)],E=[(0,u.fA)(-1,-1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(-1,1,-1),(0,u.fA)(-1,1,1),(0,u.fA)(1,-1,-1),(0,u.fA)(1,-1,1),(0,u.fA)(1,1,-1),(0,u.fA)(1,1,1)],P=Math.sqrt(3),I=[null],z=new c.iy,F=(0,u.vt)(),V=(0,u.vt)(),D=(0,u.vt)(),N=new f.A,B=new c.iy,L=new c.iy,k=new c.iy,Q=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],W=new f.A,Z=[0,0,0,0,0,0,0,0];var H=n(44801);function $(t,e,n){let r=new c.iy;return(0,s.hs)(r.center,t,.5),(0,s.Ln)(r.center,r.center,e,.5),r.radius=(0,s.Io)(r.center,t),(0,s.WQ)(r.center,r.center,n),r}class U{constructor(t,e,n){this.objectId=t,this.target=e,this.distance=n}}class X extends U{constructor(t,e,n){super(t,e,n),this.type="vertex"}}class J extends U{constructor(t,e,n,r,i){super(t,e,n),this.start=r,this.end=i,this.type="edge"}}let Y=class{constructor(){this._idToComponent=new Map,this._components=new b(t=>t.bounds),this._edges=new b(t=>t.bounds),this._tmpLineSegment=(0,h.vt)(),this._tmpP1=(0,u.vt)(),this._tmpP2=(0,u.vt)(),this._tmpP3=(0,u.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,i.Te)(e);let n=t;n.mbs=new c.iy(t.mbsJSON),await this._ensureEdgeLocations(n,e);let r=[];return this._edges.forEachNeighbor(t=>(this._addCandidates(n,t,r),r.length<1e3),n.mbs),{result:{candidates:r}}}async _ensureEdgeLocations(t,e){let n=[];if(this._components.forEachNeighbor(t=>{if(null==t.info){let{id:e,uid:r}=t;n.push({id:e,uid:r})}return!0},t.mbs),!n.length)return;let r={components:n},i=await this.remoteClient.invoke("fetchAllEdgeLocations",r,e??{});for(let t of i.components)this._setFetchEdgeLocations(t)}async add(t){let e=new tt(t.id,new c.iy(t.bounds));return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){let e=this._idToComponent.get(t.id);if(e){let t=[];this._edges.forEachNeighbor(n=>(n.component===e&&t.push(n),!0),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){let e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;let n=H.HY.createView(t.locations),r=Array(n.count),i=(0,u.vt)(),o=(0,u.vt)();for(let a=0;a<n.count;a++){n.position0.getVec(a,i),n.position1.getVec(a,o);let s=$(i,o,t.origin),u=new et(e,a,s);r[a]=u}this._edges.add(r);let{objectIds:a,origin:s}=t;e.info={locations:n,objectIds:a,origin:s}}_addCandidates(t,e,n){let{info:r}=e.component,{origin:i,objectIds:o}=r,a=r.locations,u=a.position0.getVec(e.index,this._tmpP1),h=a.position1.getVec(e.index,this._tmpP2);(0,s.WQ)(u,u,i),(0,s.WQ)(h,h,i);let c=o[a.componentIndex.get(e.index)];this._addEdgeCandidate(t,c,u,h,n),G(t,c,u,n),G(t,c,h,n)}_addEdgeCandidate(t,e,n,r,i){if(!t.returnEdge)return;let o=t.mbs.center,a=(0,h.Cr)(n,r,this._tmpLineSegment),c=(0,h._I)(a,o,this._tmpP3);t.mbs.contains(c)&&i.push(new J(e,(0,u.o8)(c),(0,s.Io)(o,c),(0,u.o8)(n),(0,u.o8)(r)))}};Y=(0,r.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],Y);const K=Y;function G(t,e,n,r){t.returnVertex&&t.mbs.contains(n)&&r.push(new X(e,(0,u.o8)(n),(0,s.Io)(t.mbs.center,n)))}class tt{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=(0,o.c)()}}class et{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8197],{4341(e,t,r){r.d(t,{I:()=>a});var i=r(26390);class a{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*s);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,s));e++)this._items.push(this._allocator())}}const s=1024},11964(e,t,r){r.d(t,{Cr:()=>u,H6:()=>d,LV:()=>h,_I:()=>m,kb:()=>c,vt:()=>l});var i=r(34727),a=r(4341),s=r(35522),n=r(51850),o=r(32114);function l(e){return e?{origin:(0,n.o8)(e.origin),vector:(0,n.o8)(e.vector)}:{origin:(0,n.vt)(),vector:(0,n.vt)()}}function h(e,t){let r=p.get();return r.origin=e,r.vector=t,r}function u(e,t,r=l()){return(0,s.C)(r.origin,e),(0,s.Re)(r.vector,t,e),r}function c(e,t){let r=(0,s.Re)(o.rq.get(),t,e.origin),a=(0,s.Om)(e.vector,r),n=(0,s.Om)(e.vector,e.vector);if(Math.abs(n)<_)return(0,s.hG)(e.origin,t);let l=(0,i.qE)(a/n,0,1),h=(0,s.Re)(o.rq.get(),(0,s.hs)(o.rq.get(),e.vector,l),r);return(0,s.Om)(h,h)}function m(e,t,r){return d(e,t,0,1,r)}function d(e,t,r,a,n){let{vector:l,origin:h}=e,u=(0,s.Re)(o.rq.get(),t,h),c=(0,s.Om)(l,u)/(0,s.m3)(l);return(0,s.hs)(n,l,(0,i.qE)(c,r,a)),(0,s.WQ)(n,n,e.origin)}(0,n.vt)(),(0,n.vt)();const p=new a.I(()=>l()),_=1e-9},80754(e,t,r){r.d(t,{kS:()=>h,kd:()=>l});var i=r(82799),a=r(16930),s=r(60408),n=r(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function h(e,t){if((0,n.Ed)(e))for(let r of function(e){return(0,s.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r){if((0,n.aO)(e)){let[r,i]=e.c;r[0]+=t,i[0]+=t;continue}if((0,n.FG)(e)){let[r,i]=e.a;r[0]+=t,i[0]+=t;continue}if((0,n.n1)(e)){let[r,i,a]=e.b;r[0]+=t,i[0]+=t,a[0]+=t;continue}e[0]+=t}for(let r of function(e){return(0,s.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,o])},71351(e,t,r){r.d(t,{C:()=>c,Cr:()=>m,LV:()=>u,fA:()=>d,kb:()=>p,vt:()=>l});var i=r(4341),a=(r(77690),r(29242)),s=r(35522),n=r(51850),o=r(32114);function l(e){return e?h((0,n.o8)(e.origin),(0,n.o8)(e.direction)):h((0,n.vt)(),(0,n.vt)())}function h(e,t){return{origin:e,direction:t}}function u(e,t){let r=_.get();return r.origin=e,r.direction=t,r}function c(e,t=l()){return d(e.origin,e.direction,t)}function m(e,t,r=l()){return(0,s.C)(r.origin,e),(0,s.Re)(r.direction,t,e),r}function d(e,t,r=l()){return(0,s.C)(r.origin,e),(0,s.C)(r.direction,t),r}function p(e,t){let r=(0,s.$A)(o.rq.get(),(0,s.S8)(o.rq.get(),e.direction),(0,s.Re)(o.rq.get(),t,e.origin));return(0,s.Om)(r,r)}const _=new i.I(()=>l());(0,n.vt)(),(0,n.vt)(),(0,n.vt)(),(0,a.vt)()},94008(e,t,r){r.d(t,{iy:()=>d}),r(44208),r(53966);var i=r(34727),a=r(34304),s=r(58083),n=r(35522),o=r(51850),l=r(91829),h=r(34275);var u=r(71351),c=r(44280),m=r(32114);class d{constructor(e=0,t=0,r=0,i=0){this.radius=i,"number"==typeof e?this._center=(0,o.fA)(e,t,r):function(e){return t=e,(0,h.vZ)(t)&&t.length>=3||function(e){return((0,h.aI)(e)||Array.isArray(e))&&e.length>=3}(e);var t}(e)||function(e){return(t=e)instanceof Float32Array&&t.length>=4||function(e){return Array.isArray(e)&&e.length>=4}(e);var t}(e)?(this._center=(0,o.ci)(e),this.radius=4===e.length?e[3]:t):(this._center=(0,o.o8)(e.center),this.radius=e.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(e){(0,n.C)(this.center,e)}exactEquals(e){return(0,n.aI)(this._center,e.center)&&this.radius===e.radius}copyFrom(e){return e!==this&&((0,n.C)(this._center,e.center),this.radius=e.radius),this}clone(){return new d(this.center,this.radius)}toVec4(){return(0,l.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(e){return(0,n.hG)(this.center,e)<=this.radius**2}intersects(e){let t=this.radius+e.radius;return(0,n.hG)(this.center,e.center)<=t*t}intersectRay(e,t){if(null==e||!this._intersect(e,p))return!1;let{t0:r,t1:i}=p;if((r<0||i<r&&i>0)&&(r=i),r<0)return!1;if(t){let{origin:i,direction:a}=e;t[0]=i[0]+a[0]*r,t[1]=i[1]+a[1]*r,t[2]=i[2]+a[2]*r}return!0}intersectLine(e,t){let r=(0,u.Cr)(e,t);if(!this._intersect(r,p))return[];let{origin:i,direction:s}=r,{t0:l,t1:h}=p,c=e=>{let t=(0,o.vt)();return(0,n.Ln)(t,i,s,e),this.projectPoint(t,t)};return Math.abs(l-h)<(0,a.FD)()?[c(l)]:[c(l),c(h)]}_intersect(e,t){let{origin:r,direction:i}=e,a=_;a[0]=r[0]-this.center[0],a[1]=r[1]-this.center[1],a[2]=r[2]-this.center[2];let s=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===s)return!1;let n=2*(i[0]*a[0]+i[1]*a[1]+i[2]*a[2]),o=n*n-4*s*(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]-this.radius**2);if(o<0)return!1;let l=Math.sqrt(o);return t.t0=(-n-l)/(2*s),t.t1=(-n+l)/(2*s),!0}projectPoint(e,t){let r=(0,n.Re)(m.rq.get(),e,this.center),i=(0,n.hs)(m.rq.get(),r,this.radius/(0,n.Bw)(r));return(0,n.WQ)(t,i,this.center)}closestPointOnSilhouette(e,t){let r=m.rq.get(),i=m.Rc.get();(0,n.$A)(r,e.origin,e.direction),(0,n.$A)(t,r,e.origin),(0,n.hs)(t,t,1/(0,n.Bw)(t)*this.radius);let a=this._angleToSilhouette(e.origin),o=(0,c.g7)(e.origin,t);return(0,s.$0)(i,o+a,r),(0,n.Z0)(t,t,i),t}frustumCoverage(e,t,r){let i=this.radius,a=i*i,s=e+.5*Math.PI,n=t*t+a-2*Math.cos(s)*t*i,o=Math.sqrt(n),l=n-a;if(l<=0)return.5;let h=Math.acos(Math.sqrt(l)/o)-Math.asin(i/(o/Math.sin(s)));return Math.min(1,(h+.5*r)/r)}_angleToSilhouette(e){let t=(0,n.Re)(m.rq.get(),e,this.center),r=(0,n.Bw)(t),a=this.radius,s=a+Math.abs(a-r);return(0,i.XM)(a/s)}union(e){let t=(0,n.Io)(this._center,e.center),r=this.radius,i=e.radius;return t+i<r?this:t+r<i?(this.copyFrom(e),this):((0,n.Cc)(this._center,this._center,e.center,(t+i-r)/(2*t)),this.radius=(t+r+i)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(e){let{center:t,radius:r}=this,i=e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3];return i<0?Math.min(i+r,0):Math.max(i-r,0)}}new d;const p={t0:0,t1:0},_=(0,o.vt)();(0,o.vt)(),(0,o.vt)()},38969(e,t,r){r.d(t,{i:()=>a});var i=r(37955);function a(e,t){return new Promise((r,a)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",a)))})}},31217(e,t,r){r.d(t,{D:()=>a});var i=r(56507);async function a(e,t){return(await(0,i.A)(e,{responseType:"image",...t})).data}},46859(e,t,r){r.d(t,{h:()=>L});var i=r(49186),a=r(65529),s=r(97768),n=r(17676),o=r(34275),l=r(24326),h=r(84952),u=r(38969),c=r(31217),m=r(95117),d=r(53966),p=r(2741);let _;var g=r(63907),f=r(21231),T=r(42293);const x=()=>d.A.getLogger("esri.views.3d.webgl-engine.lib.BasisUtil");let E=null,A=null;async function M(){return A??(_??=(async()=>{let e=await(await r.e(9321).then(()=>r(49321))).default({locateFile:e=>(0,p.s)(`esri/libs/basisu/${e}`)});return e.initializeBasis(),e})(),A=_,E=await A),A}function R(e,t,r,i,a){let s=(0,T.MW)(t?g.CQ.COMPRESSED_RGBA8_ETC2_EAC:g.CQ.COMPRESSED_RGB8_ETC2),n=a&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*s*n)}function w(e){return e.getNumImages()>=1&&!e.isUASTC()}function b(e){return e.getFaces()>=1&&(e.isETC1S()||e.isUASTC())}function C(e,t,r,i,a,s,n,o,l=!1){let{compressedTextureETC:h,compressedTextureS3TC:u}=e.capabilities,{basisFormat:c,internalFormat:m}=function(e,t,r,i){return e?r?{basisFormat:1,internalFormat:i?g.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:g.CQ.COMPRESSED_RGBA8_ETC2_EAC}:{basisFormat:0,internalFormat:i?g.CQ.COMPRESSED_SRGB8_ETC2:g.CQ.COMPRESSED_RGB8_ETC2}:t?r?{basisFormat:3,internalFormat:g.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT}:{basisFormat:2,internalFormat:g.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT}:{basisFormat:13,internalFormat:i?g.H0.SRGB8_ALPHA8:6408}}(null!=h,null!=u,i,l),d=t.hasMipmap?r:Math.min(1,r),p=[];for(let e=0;e<d;e++)p.push(new Uint8Array(n(e,c))),o(e,c,p[e]);return t.internalFormat=m,t.hasMipmap=p.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=a,t.height=s,new f.A(e,t,{type:"compressed",levels:p})}function D(e,t){let r=new Uint32Array(e.buffer,e.byteOffset,16);if(1481919403!==r[0]||3140563232!==r[1]||169478669!==r[2])return x().error("Invalid magic number in KTX1 header"),null;if(67305985!==r[3]||1!==r[5]||r[7]!==g.CQ.COMPRESSED_RGB8_ETC2||6407!==r[8])return x().error("Unsupported KTX1 image"),null;let i=r[7],a=1,s=r[9],n=r[10];if(3&s||3&n)return null;let o=s,l=n;!1!==t&&(a=Math.max(1,r[14]));let h,u,c=e.byteOffset+64,m=[];for(let t=0;t<a;++t)u=(e[c]|e[c+1]<<8|e[c+2]<<16|e[c+3]<<24)>>>0,c+=4,h=new Uint8Array(e.buffer,c,u),m.push(h),c+=u,s=Math.max(1,s>>1),n=Math.max(1,n>>1);return{textureData:{type:"compressed",levels:m},internalFormat:i,width:o,height:l}}const S=()=>d.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function F(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const y=F("DXT1"),I=F("DXT3"),v=F("DXT5");function P(e,t){let r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return S().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return S().error("Unsupported format, must contain a FourCC code"),null;let i,a,s=r[21];switch(s){case y:i=8,a=g.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case I:i=16,a=g.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case v:i=16,a=g.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return S().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(s)),null}let n=1,o=r[4],l=r[3];(3&o||3&l)&&(S().warn("Rounding up compressed texture size to nearest multiple of 4."),o=o+3&-4,l=l+3&-4);let h=o,u=l;131072&r[2]&&!1!==t&&(n=Math.max(1,r[7]));let c,m,d=e.byteOffset+r[1]+4,p=[];for(let t=0;t<n;++t)m=(o+3>>2)*(l+3>>2)*i,c=new Uint8Array(e.buffer,d,m),p.push(c),d+=m,o=Math.max(1,o>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:p},internalFormat:a,width:h,height:u}}function H(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function U(e,t){let[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){let a=Math.max(e,t),s=e*t;if(a<=i&&s<=r)return[e,t];let n=Math.min(Math.sqrt(r/s),i/a);return[H(Math.round(e*n),i),H(Math.round(t*n),i)]}(e,t);return e.width===r&&e.height===i?e:O(e,r,i)}function O(e,t,r){if(e instanceof ImageData)return O(function(e){let t=document.createElement("canvas");t.width=e.width,t.height=e.height;let r=t.getContext("2d");if(null==r)throw new i.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);let a=document.createElement("canvas");return a.width=t,a.height=r,a.getContext("2d").drawImage(e,0,0,a.width,a.height),a}var G=r(620),B=r(67171),N=r(12541);class L{constructor(e,t){this._data=e,this.id=(0,l.c)(),this.events=new a.bk,this._parameters={...W,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!(0,h.w8)(e.src)&&("auto"!==e.preload||!e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){let t=[];(0,u.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){!(0,h.DB)(e.src)&&!(0,h.w8)(e.src)&&!e.crossOrigin&&(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){let t=new B.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t.isImmutable=!0===this._parameters.immutable&&function(e){return null!=e&&((0,N.tl)(e)||(0,N.tr)(e)||(0,N.CR)(e)||(0,N.QJ)(e))}(this._parameters.internalFormat),t}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(e,t){if(null==e)return 0;if((0,o.mw)(e)||(0,o.mg)(e))return"image/ktx2"===t.encoding?function(e,t){if(null==E)return e.byteLength;let r=new E.KTX2File(new Uint8Array(e)),i=b(r)?R(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):"image/x.basis"===t.encoding?function(e,t){if(null==E)return e.byteLength;let r=new E.BasisFile(new Uint8Array(e)),i=w(r)?R(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;let{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?X(e):t,a=t.pixelFormat??6408,s=(0,T.wH)(a);return(t.mipmap?4/3:1)*r*i*s||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;let t=this._data;return null==t?(this._texture=new f.A(e,this._createDescriptor(e),null),this._texture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,o.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,o.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):(0,o.mg)(t)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(e,t):(0,o.mw)(t)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(e,new Uint8Array(t)):((0,o.mw)(t)||(0,o.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,o.mw)(t)||(0,o.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,o.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,o.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._texture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._texture.setData(e),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._texture=function(e,t,r){let i=P(r,t.hasMipmap??!1);if(null==i)throw Error("DDS texture data is null");let{textureData:a,internalFormat:s,width:n,height:o}=i;return t.samplingMode=a.levels.length>1?9987:9729,t.hasMipmap=a.levels.length>1,t.internalFormat=s,t.width=n,t.height=o,new f.A(e,t,a)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX1(e,t){return this._texture=function(e,t,r){let i=D(r,t.hasMipmap??!1);if(null==i)throw Error("KTX1 texture data is null");let{textureData:a,internalFormat:s,width:n,height:o}=i;return t.samplingMode=a.levels.length>1?9987:9729,t.hasMipmap=a.levels.length>1,t.internalFormat=s,t.width=n,t.height=o,new f.A(e,t,a)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r,i=!1){E??=await M();let a=new E.KTX2File(new Uint8Array(r));if(!b(a))return null;let s=i&&2===a.getDFDTransferFunc();a.startTranscoding();let n=C(e,t,a.getLevels(),a.getHasAlpha(),a.getWidth(),a.getHeight(),(e,t)=>a.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>a.transcodeImage(r,e,0,0,t,0,-1,-1),s);return a.close(),a.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){E??=await M();let i=new E.BasisFile(new Uint8Array(r));if(!w(i))return null;i.startTranscoding();let a=C(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),a}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromPixelData(e,t){(0,G.vA)(this._parameters.width>0&&this._parameters.height>0);let r=this._createDescriptor(e);return(6407===r.pixelFormat||6408===r.pixelFormat)&&(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._texture=new f.A(e,r,t),this._texture}_loadFromURL(e,t){return this._loadAsync(async r=>{let i=await(0,c.D)(t,{signal:r});return(0,n.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{let i=await(0,m.y)(t,t.src,!1,r);return(0,n.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((a,o)=>{let l=()=>{t.removeEventListener("loadeddata",h),t.removeEventListener("error",u),(0,s.xt)(c)},h=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(l(),a(this._loadFromImage(e,t)))},u=e=>{l(),o(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",h),t.addEventListener("error",u);let c=(0,n.u7)(r,()=>u((0,n.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=U(r,e.parameters));let i=X(r);this._parameters.width=i.width,this._parameters.height=i.height;let a=this._createDescriptor(e);return a.width=i.width,a.height=i.height,a.compress=this._parameters.compressionOptions,this._texture=new f.A(e,a,r),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(e){let t=new AbortController;this._loadingController=t;let r=e(t.signal);this._loadingPromise=r;let i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._texture=(0,s.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){let e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function X(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const W={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},58682(e,t,r){r.d(t,{Uy:()=>l,h7:()=>m});var i=r(35522),a=r(51850),s=r(70328);class n{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const o=(0,s.vt)();function l(e,t,r,a,s,o){if(!e.visible)return;let l=(0,i.jb)(M,a,r),{tolerance:h}=t,c=new n(h,!1,t.options.normalRequired);if(e.boundingInfo)u(e.readPrimitivePosition,e.boundingInfo,r,l,h,s,c,o);else{let t=e.readPrimitivePosition;!function(e,t,r,a,s,n,o,l){let h=t,u=R,c=Math.abs(h[0]),m=Math.abs(h[1]),d=Math.abs(h[2]),f=c>=m?c>=d?0:2:m>=d?1:2,x=f,E=h[x]<0?2:1,A=(f+E)%3,M=(f+(3-E))%3,w=h[A]/h[x],b=h[M]/h[x],C=1/h[x],D=p,S=_,F=g,{normalRequired:y}=o;for(let t=r;t<a;++t){let r=3*t;s(u[0],r),s(u[1],r+1),s(u[2],r+2),n&&(n.applyToVertex(u[0],u[0][0],u[0][1],u[0][2],t),n.applyToVertex(u[1],u[1][0],u[1][1],u[1][2],t),n.applyToVertex(u[2],u[2][0],u[2][1],u[2][2],t)),(0,i.jb)(D,u[0],e),(0,i.jb)(S,u[1],e),(0,i.jb)(F,u[2],e);let a=D[A]-w*D[x],o=D[M]-b*D[x],h=S[A]-w*S[x],c=S[M]-b*S[x],m=F[A]-w*F[x],d=F[M]-b*F[x],p=m*c-d*h,_=a*d-o*m,g=h*o-c*a;if((p<0||_<0||g<0)&&(p>0||_>0||g>0))continue;let f=p+_+g;if(0===f)continue;let E=p*(C*D[x])+_*(C*S[x])+g*(C*F[x]);if(E*Math.sign(f)<0)continue;let R=E/f;R>=0&&l(R,R,y?T(u):null,t)}}(r,l,0,e.faceCount,t,s,c,o)}}const h=(0,a.vt)();function u(e,t,r,a,n,l,c,m){if(null==t)return;let p=function(e,t){return(0,i.hZ)(t,1/e[0],1/e[1],1/e[2])}(a,h);if((0,s.C)(o,t.box),l?.applyToAabb(o),function(e,t,r,i){return function(e,t,r,i){let a=(e[0]-i-t[0])*r[0],s=(e[3]+i-t[0])*r[0],n=Math.min(a,s),o=Math.max(a,s),l=(e[1]-i-t[1])*r[1],h=(e[4]+i-t[1])*r[1];if(o=Math.min(o,Math.max(l,h)),o<0||(n=Math.max(n,Math.min(l,h)),n>o))return!1;let u=(e[2]-i-t[2])*r[2],c=(e[5]+i-t[2])*r[2];return o=Math.min(o,Math.max(u,c)),!(o<0||(n=Math.max(n,Math.min(u,c)),n>o))&&n<1/0}(e,t,r,i)}(o,r,p,n)){let{primitiveIndices:i}=t,s=i.length;if(s>1e3){let i=t.children;if(void 0!==i){for(let t of i)u(e,t,r,a,n,l,c,m);return}}d(r,a,0,s,e,i,l,c,m)}}const c=(0,a.vt)();function m(e,t,r,i,a,s,n,o,l,h=null,u=0){let m=e[0],d=e[1],p=e[2],_=t[0],g=t[1],T=t[2];for(let e=r;e<i;++e){let t=u+(h?.[e]??e),r=3*t,i=n*a[r],x=s[i],E=s[i+1],M=s[i+2],R=n*a[r+1],w=s[R],b=s[R+1],C=s[R+2],D=n*a[r+2],S=w-x,F=b-E,y=C-M,I=s[D]-x,v=s[D+1]-E,P=s[D+2]-M,H=g*P-v*T,U=T*I-P*_,O=_*v-I*g,G=S*H+F*U+y*O,B=G*G;if(B<=A)continue;let N=m-x,L=d-E,X=p-M,W=(N*H+L*U+X*O)*G;if(W<0||W>B)continue;let Q=L*y-F*X,V=X*S-y*N,k=N*F-S*L,q=(_*Q+g*V+T*k)*G;if(q<0||W+q>B)continue;let K=(I*Q+v*V+P*k)/G;K>=0&&l(K,K,o?f(S,F,y,I,v,P,c):null,t)}}function d(e,t,r,i,a,s,n,o,l){let h=e[0],u=e[1],m=e[2],d=t[0],p=t[1],_=t[2],{normalRequired:g}=o;for(let e=r;e<i;++e){let t=s[e],r=3*t,[i,o,T]=a(b,r),[x,E,M]=a(b,r+1),[R,C,D]=a(b,r+2);null!=n&&([i,o,T]=n.applyToVertex(w,i,o,T,e),[x,E,M]=n.applyToVertex(w,x,E,M,e),[R,C,D]=n.applyToVertex(w,R,C,D,e));let S=x-i,F=E-o,y=M-T,I=R-i,v=C-o,P=D-T,H=p*P-v*_,U=_*I-P*d,O=d*v-I*p,G=S*H+F*U+y*O,B=G*G;if(B<=A)continue;let N=h-i,L=u-o,X=m-T,W=(N*H+L*U+X*O)*G;if(W<0||W>B)continue;let Q=L*y-F*X,V=X*S-y*N,k=N*F-S*L,q=(d*Q+p*V+_*k)*G;if(q<0||W+q>B)continue;let K=(I*Q+v*V+P*k)/G;K>=0&&l(K,K,g?f(S,F,y,I,v,P,c):null,t)}}const p=(0,a.vt)(),_=(0,a.vt)(),g=(0,a.vt)();function f(e,t,r,a,s,n,o){return(0,i.hZ)(x,e,t,r),(0,i.hZ)(E,a,s,n),(0,i.$A)(o,x,E),(0,i.S8)(o,o),o}function T(e){return(0,i.jb)(x,e[1],e[0]),(0,i.jb)(E,e[2],e[0]),(0,i.$A)(c,x,E),(0,i.S8)(c,c),c}const x=(0,a.vt)(),E=(0,a.vt)(),A=1e-7*1e-7,M=(0,a.vt)(),R=[(0,a.vt)(),(0,a.vt)(),(0,a.vt)()],w=(0,a.vt)(),b=(0,a.vt)()},74810(e,t,r){r.d(t,{Jr:()=>s});var i=r(35522),a=r(51850);function s({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:s,emissiveTexture:n,emissiveFactor:o,occlusionTexture:l}){return null==e&&null==t&&null==n&&(null==o||(0,i.t2)(o,a.uY))&&null==l&&(null==s||1===s)&&(null==r||1===r)}const n=(0,a.CN)(1,1,.5),o=(0,a.CN)(0,.6,.2),l=(0,a.CN)(0,1,.2);r.d(t,["Bt",0,o,"SY",0,l,"mb",0,n])},21231(e,t,r){r.d(t,{A:()=>g});var i=r(49186),a=r(44208),s=r(53966),n=r(97768),o=r(93637),l=r(17676),h=r(94656),u=r(63907),c=r(67171),m=r(12541);class d extends c.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case u.H0.R16F:case u.H0.R32F:case u.H0.R8_SNORM:case u.H0.R8:this.pixelFormat=6403;break;case u.H0.R8I:case u.H0.R8UI:case u.H0.R16I:case u.H0.R16UI:case u.H0.R32I:case u.H0.R32UI:this.pixelFormat=36244}}static validate(e,t){return new d(e,t)}}const p=!!(0,a.A)("esri-tests-disable-gpu-memory-measurements"),_=()=>s.A.getLogger("esri/views/webgl/Texture");class g{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=1,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._shadowFilterDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{let r=d.validate(e,t);if(!r)throw new i.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}34067===this._descriptor.target?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return p?0:(0,c.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty||this._shadowFilterDirty}get hasWebGLTextureObject(){return!!this._glName}dispose(){this.abortCompression(),this.hasWebGLTextureObject&&this._descriptor.context?.gl&&(this._descriptor.context.instanceCounter.decrement(u.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}[Symbol.dispose](){this.dispose()}resize(e,t){let r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=t,34067===this._descriptor.target?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.compress=e}disableCompression(){this._descriptor.compress=void 0}setData(e){this.abortCompression(),!(0,m.Qp)(e)&&this._descriptor.internalFormat&&(0,o.a4)(u.CQ,this._descriptor.internalFormat)&&(this._descriptor.internalFormat=void 0),this._setData(e),!(0,m.Qp)(e)&&this._descriptor.compress&&this._compressOnWorker(e)}updateData(e,t,r,a,s,n,o=0){n||_().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||_().error("An attempt to update uninitialized texture!");let l=this._descriptor;l.internalFormat=(0,m.mq)(l);let{context:h,pixelFormat:u,dataType:c,target:d,isImmutable:p}=l;if(p&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");let f=h.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES,!0);(t<0||r<0||t+a>l.width||r+s>l.height)&&_().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();let{gl:T}=h;o&&((!a||!s)&&_().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),T.pixelStorei(T.UNPACK_SKIP_ROWS,o)),(0,m.Kv)(n)?T.texSubImage2D(d,e,t,r,a,s,u,c,n):(0,m.Qp)(n)?T.compressedTexSubImage2D(d,e,t,r,a,s,l.internalFormat,n.levels[e]):T.texSubImage2D(d,e,t,r,a,s,u,c,n),o&&T.pixelStorei(T.UNPACK_SKIP_ROWS,0),h.bindTexture(f,g.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,t,r,a,s,n,o,l){l||_().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||_().error("An attempt to update an uninitialized texture!");let h=this._descriptor;h.internalFormat=(0,m.mq)(h);let{context:u,pixelFormat:c,dataType:d,isImmutable:p,target:f}=h;if(p&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");(0,m.re)(f)||_().warn("Attempting to set 3D texture data on a non-3D texture");let T=u.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),(t<0||r<0||a<0||t+s>h.width||r+n>h.height||a+o>h.depth)&&_().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();let{gl:x}=u;if((0,m.Qp)(l))l=l.levels[e],x.compressedTexSubImage3D(f,e,t,r,a,s,n,o,h.internalFormat,l);else{let i=l;x.texSubImage3D(f,e,t,r,a,s,n,o,c,d,i)}u.bindTexture(T,g.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){let e=this._descriptor;if(0===e.width||0===e.height)return;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,(0,m.QE)(e)}9729===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9985):9728===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9984);let t=this._descriptor.context.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(e.target),this._descriptor.context.bindTexture(t,g.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){let e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,(0,m.QE)(e)}9985===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9729):9984===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9728)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,(0,m.QE)(this._descriptor),this._wrapModeDirty=!0)}setShadowFiltering(e){e!==this._descriptor.linearFilterDepth&&(this._descriptor.linearFilterDepth=this._descriptor.compareEnabled=e,this.setSamplingMode(e?9729:9728),(0,m.QE)(this._descriptor),this._shadowFilterDirty=!0)}applyChanges(){this._samplingModeDirty&&=(this._applySamplingMode(),!1),this._wrapModeDirty&&=(this._applyWrapMode(),!1),this._shadowFilterDirty&&=(this._applyShadowMode(),!1)}abortCompression(){this._compressionAbortController=(0,n.DC)(this._compressionAbortController)}_setData(e,t){let r=this._descriptor,a=r.context?.gl;if(!a)return;(0,h.Y2)(a),this.hasWebGLTextureObject||(this._glName=a.createTexture(),r.context.instanceCounter.increment(u.vt.Texture,this)),(0,m.QE)(r);let s=r.context.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);r.context.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,h.Y2)(a);let n=t??r.target,o=(0,m.re)(n);if((0,m.Kv)(e))this._setDataFromTexImageSource(e,n);else{let{width:t,height:s,depth:l}=r;if(null==t||null==s)throw new i.A("texture:missing-size","Width and height must be specified!");if(o&&null==l)throw new i.A("texture:missing-depth","Depth must be specified!");if(r.internalFormat=(0,m.mq)(r),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(n,r.internalFormat,r.hasMipmap,t,s,l),(0,m.Qp)(e)){if(!(0,m.tl)(r.internalFormat))throw new i.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(e,r.internalFormat,n)}else this._texImage(n,0,r.internalFormat,t,s,l,e),(0,h.Y2)(a),r.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),this._applyShadowMode(),(0,h.Y2)(a),r.context.bindTexture(s,g.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=34069;t<=34074;t++)this._setData(e,t)}_configurePixelStorage(){let e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,+!!r),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,+!!i)}_setDataFromTexImageSource(e,t){let{gl:r}=this._descriptor.context,i=this._descriptor;i.internalFormat=(0,m.mq)(i);let a=(0,m.re)(t),{width:s,height:n,depth:o}=(0,m.Eo)(e);i.width&&i.height,i.width||=s,i.height||=n,a&&i.depth,a&&(i.depth=o),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,s,n,o),this._texImage(t,0,i.internalFormat,s,n,o,e),(0,h.Y2)(r),i.hasMipmap&&(this.generateMipmap(),(0,h.Y2)(r))}_setDataFromCompressedSource(e,t,r){let i=this._descriptor,{width:a,height:s,depth:n}=i,o=e.levels,l=(0,m.FV)(r,a,s,n),h=Math.min(l,o.length)-1;this._descriptor.context.gl.texParameteri(i.target,33085,h),this._forEachMipmapLevel((e,i,a,s)=>{let n=o[Math.min(e,o.length-1)];this._compressedTexImage(r,e,t,i,a,s,n)},h)}_texStorage(e,t,r,a,s,n){let{gl:o}=this._descriptor.context;if(!(0,m.tr)(t)&&!(0,m.tl)(t))throw new i.A("texture:missing-format","Immutable textures must have a sized or compressed internal format");if(!this._descriptor.isImmutable)return;let l=r?(0,m.FV)(e,a,s,n):1;if((0,m.re)(e)){if(null==n)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");o.texStorage3D(e,l,t,a,s,n)}else o.texStorage2D(e,l,t,a,s);this._wasImmutablyAllocated=!0}_texImage(e,t,r,a,s,n,o){let l=this._descriptor.context.gl,h=(0,m.re)(e),{isImmutable:u,pixelFormat:c,dataType:d}=this._descriptor;if(u){if(null!=o){let r=o;if(h){if(null==n)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texSubImage3D(e,t,0,0,0,a,s,n,c,d,r)}else l.texSubImage2D(e,t,0,0,a,s,c,d,r)}}else{let u=o;if(h){if(null==n)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texImage3D(e,t,r,a,s,n,0,c,d,u)}else l.texImage2D(e,t,r,a,s,0,c,d,u)}}_compressedTexImage(e,t,r,a,s,n,o){let l=this._descriptor.context.gl,h=(0,m.re)(e);if(this._descriptor.isImmutable){if(null!=o)if(h){if(null==n)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,t,0,0,0,a,s,n,r,o)}else l.compressedTexSubImage2D(e,t,0,0,a,s,r,o)}else if(h){if(null==n)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,t,r,a,s,n,0,o)}else l.compressedTexImage2D(e,t,r,a,s,0,o)}async _compressOnWorker(e){let{width:t,height:r,context:i,flipped:a,preMultiplyAlpha:s,hasMipmap:n,compress:o}=this._descriptor;if(!o)return;let{compressionTracker:h,compressionCallback:u,preserveSourceBitmap:c}=o,{compressedTextureETC:m,compressedTextureS3TC:d}=i.capabilities;if(!g.compressionWorkerHandle?.isCompressible(e,this._descriptor)||!m&&!d)return;this.abortCompression();let p=new AbortController;this._compressionAbortController=p,h?.increment();let f,T=!1,x=!1;try{e instanceof ImageBitmap?c?(f=await createImageBitmap(e),(0,l.Te)(p),x=!0):f=e:e instanceof Uint8Array?(f=e.buffer,T=this.descriptor.flipped):(f=await createImageBitmap(e,{imageOrientation:a?"flipY":"none"}),(0,l.Te)(p),x=!0);let i={data:f,width:t,height:r,needsFlip:T,components:6408===this._descriptor.pixelFormat?4:3,preMultiplyAlpha:s,isOpaque:this._descriptor.isOpaque,hasMipmap:n,hasETC:!!m,hasS3TC:!!d},o=await g.compressionWorkerHandle.invoke(i,p.signal,1);if((0,l.Te)(p),o.compressedTexture&&this.hasWebGLTextureObject){let e=this.usedMemory;this._descriptor.internalFormat=o.internalFormat,this._setData(o.compressedTexture),u?.(e-this.usedMemory)}}catch(e){(0,l.zf)(e)||_().error("Texture compression failed!")}finally{h?.decrement(),this._compressionAbortController?.signal.aborted&&(this._compressionAbortController=null),x&&f instanceof ImageBitmap&&f.close()}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:a,depth:s,hasMipmap:n,target:o}=this._descriptor,l=32879===o;if(null==r||null==a||l&&null==s)throw new i.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,a,s),n&&(1!==r||1!==a||l&&1!==s)&&!(i>=t);++i)r=Math.max(1,r>>1),a=Math.max(1,a>>1),l&&(s=Math.max(1,s>>1))}_applySamplingMode(){let e=this._descriptor,t=e.context?.gl,r=e.samplingMode,i=e.samplingMode;9985===r||9987===r?(r=9729,e.hasMipmap||(i=9729)):(9984===r||9986===r)&&(r=9728,e.hasMipmap||(i=9728)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,i)}_applyWrapMode(){let e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyShadowMode(){let e=this._descriptor,t=e.context?.gl,r=e.compareEnabled?t.COMPARE_REF_TO_TEXTURE:t.NONE;t.texParameteri(e.target,t.TEXTURE_COMPARE_MODE,r),e.compareEnabled&&t.texParameteri(e.target,t.TEXTURE_COMPARE_FUNC,t.GREATER),(0,h.Y2)(t)}_applyAnisotropicFilteringParameters(){let e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},67171(e,t,r){r.d(t,{R:()=>s,e:()=>n});var i=r(63907),a=r(42293);class s{constructor(e=0,t=e){this.width=e,this.height=t,this.type=0,this.target=3553,this.pixelFormat=6408,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=9729,this.wrapMode=10497,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.compareEnabled=!1,this.linearFilterDepth=!1,this.depth=1,this.isImmutable=!1}}function n(e){return e.width<=0||e.height<=0||e.depth<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,a.MW)(e.internalFormat))*(34067===e.target?6:1))}},42293(e,t,r){r.d(t,{MW:()=>l,wH:()=>o,yu:()=>n});var i=r(94656),a=r(63907);const s=new Set([a.pe.BYTE,a.pe.SHORT,a.pe.INT,a.pe.UNSIGNED_BYTE,a.pe.UNSIGNED_SHORT,a.pe.UNSIGNED_INT]);function n(e,t,r,a=0){let n=e.gl;e.bindBuffer(r);for(let o of r.layout){let r=t.get(o.name);if(null==r){console.warn(`There is no location for vertex attribute '${o.name}' defined.`);continue}let l=a*o.stride;if(o.count<=4)o.integer&&s.has(o.type)?n.vertexAttribIPointer(r,o.count,o.type,o.stride,o.offset+l):n.vertexAttribPointer(r,o.count,o.type,o.normalized,o.stride,o.offset+l),n.enableVertexAttribArray(r),o.divisor>0&&n.vertexAttribDivisor(r,o.divisor);else if(9===o.count)for(let e=0;e<3;e++)n.vertexAttribPointer(r+e,3,o.type,o.normalized,o.stride,o.offset+12*e+l),n.enableVertexAttribArray(r+e),o.divisor>0&&n.vertexAttribDivisor(r+e,o.divisor);else if(16===o.count)for(let e=0;e<4;e++)n.vertexAttribPointer(r+e,4,o.type,o.normalized,o.stride,o.offset+16*e+l),n.enableVertexAttribArray(r+e),o.divisor>0&&n.vertexAttribDivisor(r+e,o.divisor);else console.error("Unsupported vertex attribute element count: "+o.count);if((0,i.en)()){let t=(0,i.u1)(e.gl);t&&console.error(`Unable to bind vertex attribute "${o.name}" with baseInstanceOffset ${l}:`,t,o)}}}function o(e){switch(e){case 6406:case 6409:case 6403:case 36244:case 6402:case 34041:return 1;case 6410:case 33319:case 33320:return 2;case 6407:case 36248:return 3;case 6408:case 36249:return 4}return 0}function l(e){switch(e){case 6406:case 6409:case 6403:case 36244:case a.H0.R8:case a.H0.R8I:case a.H0.R8UI:case a.H0.R8_SNORM:case 36168:return 1;case 6410:case 33319:case 33320:case a.H0.RGBA4:case a.H0.R16F:case a.H0.R16I:case a.H0.R16UI:case a.H0.RG8:case a.H0.RG8I:case a.H0.RG8UI:case a.H0.RG8_SNORM:case a.H0.RGB565:case a.H0.RGB5_A1:case a.SB.DEPTH_COMPONENT16:return 2;case 6407:case 36248:case a.H0.RGB8:case a.H0.RGB8I:case a.H0.RGB8UI:case a.H0.RGB8_SNORM:case a.H0.SRGB8:case a.SB.DEPTH_COMPONENT24:return 3;case 6408:case 36249:case a.H0.RGBA8:case a.H0.R32F:case a.H0.R11F_G11F_B10F:case a.H0.RG16F:case a.H0.R32I:case a.H0.R32UI:case a.H0.RG16I:case a.H0.RG16UI:case a.H0.RGBA8I:case a.H0.RGBA8UI:case a.H0.RGBA8_SNORM:case a.H0.SRGB8_ALPHA8:case a.H0.RGB9_E5:case a.H0.RGB10_A2UI:case a.H0.RGB10_A2:case a.SB.DEPTH_COMPONENT32F:case a.iE.DEPTH24_STENCIL8:return 4;case a.iE.DEPTH32F_STENCIL8:return 5;case a.H0.RGB16F:case a.H0.RGB16I:case a.H0.RGB16UI:return 6;case a.H0.RG32F:case a.H0.RG32I:case a.H0.RG32UI:case a.H0.RGBA16F:case a.H0.RGBA16I:case a.H0.RGBA16UI:return 8;case a.H0.RGB32F:case a.H0.RGB32I:case a.H0.RGB32UI:return 12;case a.H0.RGBA32F:case a.H0.RGBA32I:case a.H0.RGBA32UI:return 16;case a.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case a.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case a.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case a.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case a.CQ.COMPRESSED_R11_EAC:case a.CQ.COMPRESSED_SIGNED_R11_EAC:case a.CQ.COMPRESSED_RGB8_ETC2:case a.CQ.COMPRESSED_SRGB8_ETC2:case a.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case a.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case a.CQ.COMPRESSED_RG11_EAC:case a.CQ.COMPRESSED_SIGNED_RG11_EAC:case a.CQ.COMPRESSED_RGBA8_ETC2_EAC:case a.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},94656(e,t,r){r.d(t,{Y2:()=>h,en:()=>l,u1:()=>n});var i=r(49186),a=r(44208),s=r(53966);function n(e){switch(e.getError()){case e.NO_ERROR:return null;case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}const o=!!(0,a.A)("enable-feature:webgl-debug");function l(){return o}function h(e,t=l()){if(t){let t=n(e);if(t){let e=Error().stack;s.A.getLogger("esri.views.webgl.checkWebGLError").error(new i.A("webgl-error","WebGL error occurred",{message:t,stack:e}))}}}},12541(e,t,r){r.d(t,{CR:()=>u,Eo:()=>T,FV:()=>g,Kv:()=>p,QE:()=>l,QJ:()=>c,Qp:()=>d,mq:()=>f,re:()=>_,tl:()=>m,tr:()=>h});var i=r(49186),a=r(53966),s=r(93637),n=r(63907);const o=()=>a.A.getLogger("esri/views/webgl/textureUtils");function l(e){let{width:t,height:r,depth:i}=e;(null!=t&&t<0||null!=r&&r<0||null!=i&&i<0)&&o().error("Negative dimension parameters are not allowed!");let{internalFormat:a}=e;if(a&&(u(a)||c(a))){let{linearFilterDepth:t,compareEnabled:r,samplingMode:i,hasMipmap:a}=e;a&&o().error("Depth textures cannot have mipmaps"),t?9729!==i&&9728!==i&&o().error("Depth textures cannot sample mipmaps"):(9728!==i&&o().error("Depth textures without filtering must use NEAREST filtering"),r&&o().error("Depth textures without filtering cannot use compare function"))}}function h(e){return function(e){return n.XN.includes(e)}(e)||u(e)||c(e)}function u(e){return(0,s.a4)(n.SB,e)}function c(e){return(0,s.a4)(n.iE,e)}function m(e){return null!=e&&(0,s.a4)(n.CQ,e)}function d(e){return null!=e&&"type"in e&&"compressed"===e.type}function p(e){return null!=e&&!d(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function _(e){return 32879===e||35866===e}function g(e,t,r,i=1){let a=Math.max(t,r);return 32879===e&&(a=Math.max(a,i)),Math.floor(Math.log2(a))+1}function f(e){if(null!=e.internalFormat)return e.internalFormat;switch(e.dataType){case n.ld.FLOAT:switch(e.pixelFormat){case 6408:return n.H0.RGBA32F;case 6407:return n.H0.RGB32F;default:throw new i.A("texture:unknown-format","Unable to derive format")}case n.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case 6408:return n.H0.RGBA8;case 6407:return n.H0.RGB8}}let{pixelFormat:t}=e;return e.internalFormat=34041===t?n.iE.DEPTH24_STENCIL8:6402===t?n.SB.DEPTH_COMPONENT24:t,e.internalFormat}function T(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}},49788(e,t,r){r.d(t,["Q",0,1/255.5,"v",0,.9960861056751468])}}]);
|