text: self.webpackChunkRemoteClient([55],{103:function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return h})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return g})),n.d(e,"e",(function(){return m})),n.d(e,"f",(function(){return M})),n.d(e,"g",(function(){return c})),n.d(e,"h",(function(){return u})),n.d(e,"i",(function(){return l})),n.d(e,"j",(function(){return E})),n.d(e,"k",(function(){return j})),n.d(e,"l",(function(){return y})),n.d(e,"m",(function(){return i})),n.d(e,"n",(function(){return w})),n.d(e,"o",(function(){return b})),n.d(e,"p",(function(){return p})),n.d(e,"q",(function(){return B})),n.d(e,"r",(function(){return f})),n.d(e,"s",(function(){return T})),n.d(e,"t",(function(){return x}));var r=n(91),s=n(174);function i(t){const e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function f(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function o(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function c(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function a(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function d(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function y(t,e){const n=e[0]-t[0],r=e[1]-t[1],s=e[2]-t[2];return Math.sqrt(n*n+r*r+s*s)}function l(t,e){const n=e[0]-t[0],r=e[1]-t[1],s=e[2]-t[2];return n*n+r*r+s*s}function p(t){const e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function b(t,e){const n=e[0],r=e[1],s=e[2];let i=n*n+r*r+s*s;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i),t}function m(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function g(t,e,n){const r=e[0],s=e[1],i=e[2],u=n[0],f=n[1],o=n[2];return t[0]=s*o-i*f,t[1]=i*u-r*o,t[2]=r*f-s*u,t}function M(t,e,n,r){const s=e[0],i=e[1],u=e[2];return t[0]=s+r*(n[0]-s),t[1]=i+r*(n[1]-i),t[2]=u+r*(n[2]-u),t}function E(t,e,n){const r=e[0],s=e[1],i=e[2];return t[0]=n[0]*r+n[4]*s+n[8]*i+n[12],t[1]=n[1]*r+n[5]*s+n[9]*i+n[13],t[2]=n[2]*r+n[6]*s+n[10]*i+n[14],t}function T(t,e,n){const r=e[0],s=e[1],i=e[2];return t[0]=r*n[0]+s*n[3]+i*n[6],t[1]=r*n[1]+s*n[4]+i*n[7],t[2]=r*n[2]+s*n[5]+i*n[8],t}function B(t,e,n){const r=n[0],s=n[1],i=n[2],u=n[3],f=e[0],o=e[1],c=e[2];let a=s*c-i*o,d=i*f-r*c,h=r*o-s*f,y=s*h-i*d,l=i*a-r*h,p=r*d-s*a;const b=2*u;return a*=b,d*=b,h*=b,y*=2,l*=2,p*=2,t[0]=f+a+y,t[1]=o+d+l,t[2]=c+h+p,t}const O=Object(r.e)(),A=Object(r.e)();function w(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}let S=c,L=a,v=d,x=y,_=l,j=i,I=p;Object.freeze({__proto__:null,length:i,copy:u,set:f,add:o,subtract:c,multiply:a,divide:d,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:h,scaleAndAdd: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},distance:y,squaredDistance:l,squaredLength:p,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},normalize:b,dot:m,cross:g,lerp:M,hermite:function(t,e,n,r,s,i){const u=i*i,f=u*(2*i-3)+1,o=u*(i-2)+i,c=u*(i-1),a=u*(3-2*i);return t[0]=e[0]*f+n[0]*o+r[0]*c+s[0]*a,t[1]=e[1]*f+n[1]*o+r[1]*c+s[1]*a,t[2]=e[2]*f+n[2]*o+r[2]*c+s[2]*a,t},bezier:function(t,e,n,r,s,i){const u=1-i,f=u*u,o=i*i,c=f*u,a=3*i*f,d=3*o*u,h=o*i;return t[0]=e[0]*c+n[0]*a+r[0]*d+s[0]*h,t[1]=e[1]*c+n[1]*a+r[1]*d+s[1]*h,t[2]=e[2]*c+n[2]*a+r[2]*d+s[2]*h,t},random:function(t,e){e=e||1;const n=2*Object(s.b)()*Math.PI,r=2*Object(s.b)()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t},transformMat4:E,transformMat3:T,transformQuat:B,rotateX:function(t,e,n,r){const s=[],i=[];return s[0]=e[0]-n[0],s[1]=e[1]-n[1],s[2]=e[2]-n[2],i[0]=s[0],i[1]=s[1]*Math.cos(r)-s[2]*Math.sin(r),i[2]=s[1]*Math.sin(r)+s[2]*Math.cos(r),t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},rotateY:function(t,e,n,r){const s=[],i=[];return s[0]=e[0]-n[0],s[1]=e[1]-n[1],s[2]=e[2]-n[2],i[0]=s[2]*Math.sin(r)+s[0]*Math.cos(r),i[1]=s[1],i[2]=s[2]*Math.cos(r)-s[0]*Math.sin(r),t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},rotateZ:function(t,e,n,r){const s=[],i=[];return s[0]=e[0]-n[0],s[1]=e[1]-n[1],s[2]=e[2]-n[2],i[0]=s[0]*Math.cos(r)-s[1]*Math.sin(r),i[1]=s[0]*Math.sin(r)+s[1]*Math.cos(r),i[2]=s[2],t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},angle:function(t,e){u(O,t),u(A,e),b(O,O),b(A,A);const n=m(O,A);return n>1?0:n<-1?Math.PI:Math.acos(n)},str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},exactEquals:w,equals:function(t,e){const n=t[0],r=t[1],i=t[2],u=e[0],f=e[1],o=e[2];return Math.abs(n-u)<=s.a*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(r-f)<=s.a*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(i-o)<=s.a*Math.max(1,Math.abs(i),Math.abs(o))},sub:S,mul:L,div:v,dist:x,sqrDist:_,len:j,sqrLen:I})},174:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return f}));const r=1e-6,s=Math.random,i=Math.PI/180,u=180/Math.PI;function f(t){return t*i}function o(t){return t*u}Object.freeze({__proto__:null,EPSILON:1e-6,RANDOM:s,toRadian:f,toDegree:o,equals:function(t,e){return Math.abs(t-e)<=1e-6*Math.max(1,Math.abs(t),Math.abs(e))}})},226:function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return T})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return f})),n.d(e,"e",(function(){return b})),n.d(e,"f",(function(){return g})),n.d(e,"g",(function(){return m})),n.d(e,"h",(function(){return u})),n.d(e,"i",(function(){return d})),n.d(e,"j",(function(){return y})),n.d(e,"k",(function(){return p})),n.d(e,"l",(function(){return i})),n.d(e,"m",(function(){return M}));var r=n(174);function s(t,e){return t[0]=e[0],t[1]=e[1],t}function i(t,e,n){return t[0]=e,t[1]=n,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function f(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function o(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function a(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function d(t,e){const n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function h(t,e){const n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function y(t){const e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function l(t){const e=t[0],n=t[1];return e*e+n*n}function p(t,e){return t[0]=-e[0],t[1]=-e[1],t}function b(t,e){const n=e[0],r=e[1];let s=n*n+r*r;return s>0&&(s=1/Math.sqrt(s),t[0]=e[0]*s,t[1]=e[1]*s),t}function m(t,e){return t[0]*e[0]+t[1]*e[1]}function g(t,e,n){const r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t}function M(t,e,n){const r=e[0],s=e[1];return t[0]=n[0]*r+n[2]*s+n[4],t[1]=n[1]*r+n[3]*s+n[5],t}const E=y,T=f,B=o,O=c,A=d,w=h,S=l;Object.freeze({__proto__:null,copy:s,set:i,add:u,subtract:f,multiply:o,divide:c,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:a,scaleAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},distance:d,squaredDistance:h,length:y,squaredLength:l,negate:p,inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},normalize:b,dot:m,cross:g,lerp:function(t,e,n,r){const s=e[0],i=e[1];return t[0]=s+r*(n[0]-s),t[1]=i+r*(n[1]-i),t},random:function(t,e){e=e||1;const n=2*Object(r.b)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},transformMat2:function(t,e,n){const r=e[0],s=e[1];return t[0]=n[0]*r+n[2]*s,t[1]=n[1]*r+n[3]*s,t},transformMat2d:M,transformMat3:function(t,e,n){const r=e[0],s=e[1];return t[0]=n[0]*r+n[3]*s+n[6],t[1]=n[1]*r+n[4]*s+n[7],t},transformMat4:function(t,e,n){const r=e[0],s=e[1];return t[0]=n[0]*r+n[4]*s+n[12],t[1]=n[1]*r+n[5]*s+n[13],t},rotate:function(t,e,n,r){const s=e[0]-n[0],i=e[1]-n[1],u=Math.sin(r),f=Math.cos(r);return t[0]=s*f-i*u+n[0],t[1]=s*u+i*f+n[1],t},angle:function(t,e){const n=t[0],r=t[1],s=e[0],i=e[1];let u=n*n+r*r;u>0&&(u=1/Math.sqrt(u));let f=s*s+i*i;f>0&&(f=1/Math.sqrt(f));const o=(n*s+r*i)*u*f;return o>1?0:o<-1?Math.PI:Math.acos(o)},str:function(t){return"vec2("+t[0]+", "+t[1]+")"},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},equals:function(t,e){const n=t[0],s=t[1],i=e[0],u=e[1];return Math.abs(n-i)<=r.a*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(s-u)<=r.a*Math.max(1,Math.abs(s),Math.abs(u))},len:E,sub:T,mul:B,div:O,dist:A,sqrDist:w,sqrLen:S})},244:function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return b})),n.d(e,"e",(function(){return y})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return M})),n.d(e,"h",(function(){return E})),n.d(e,"i",(function(){return m})),n.d(e,"j",(function(){return p})),n.d(e,"k",(function(){return i})),n.d(e,"l",(function(){return g}));var r=n(174);function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function i(t,e,n,r,s){return t[0]=e,t[1]=n,t[2]=r,t[3]=s,t}function u(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}function f(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}function o(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}function c(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}function a(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}function d(t,e){const n=e[0]-t[0],r=e[1]-t[1],s=e[2]-t[2],i=e[3]-t[3];return Math.sqrt(n*n+r*r+s*s+i*i)}function h(t,e){const n=e[0]-t[0],r=e[1]-t[1],s=e[2]-t[2],i=e[3]-t[3];return n*n+r*r+s*s+i*i}function y(t){const e=t[0],n=t[1],r=t[2],s=t[3];return Math.sqrt(e*e+n*n+r*r+s*s)}function l(t){const e=t[0],n=t[1],r=t[2],s=t[3];return e*e+n*n+r*r+s*s}function p(t,e){const n=e[0],r=e[1],s=e[2],i=e[3];let u=n*n+r*r+s*s+i*i;return u>0&&(u=1/Math.sqrt(u),t[0]=n*u,t[1]=r*u,t[2]=s*u,t[3]=i*u),t}function b(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function m(t,e,n,r){const s=e[0],i=e[1],u=e[2],f=e[3];return t[0]=s+r*(n[0]-s),t[1]=i+r*(n[1]-i),t[2]=u+r*(n[2]-u),t[3]=f+r*(n[3]-f),t}function g(t,e,n){const r=e[0],s=e[1],i=e[2],u=e[3];return t[0]=n[0]*r+n[4]*s+n[8]*i+n[12]*u,t[1]=n[1]*r+n[5]*s+n[9]*i+n[13]*u,t[2]=n[2]*r+n[6]*s+n[10]*i+n[14]*u,t[3]=n[3]*r+n[7]*s+n[11]*i+n[15]*u,t}function M(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function E(t,e){const n=t[0],s=t[1],i=t[2],u=t[3],f=e[0],o=e[1],c=e[2],a=e[3];return Math.abs(n-f)<=r.a*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(s-o)<=r.a*Math.max(1,Math.abs(s),Math.abs(o))&&Math.abs(i-c)<=r.a*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(u-a)<=r.a*Math.max(1,Math.abs(u),Math.abs(a))}let T=f,B=o,O=c,A=d,w=h,S=y,L=l;Object.freeze({__proto__:null,copy:s,set:i,add:u,subtract:f,multiply:o,divide:c,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t},scale:a,scaleAndAdd: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},distance:d,squaredDistance:h,length:y,squaredLength:l,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},normalize:p,dot:b,lerp:m,random:function(t,e){let n,s,i,u,f,o;e=e||1;do{n=2*Object(r.b)()-1,s=2*Object(r.b)()-1,f=n*n+s*s}while(f>=1);do{i=2*Object(r.b)()-1,u=2*Object(r.b)()-1,o=i*i+u*u}while(o>=1);const c=Math.sqrt((1-f)/o);return t[0]=e*n,t[1]=e*s,t[2]=e*i*c,t[3]=e*u*c,t},transformMat4:g,transformQuat:function(t,e,n){const r=e[0],s=e[1],i=e[2],u=n[0],f=n[1],o=n[2],c=n[3],a=c*r+f*i-o*s,d=c*s+o*r-u*i,h=c*i+u*s-f*r,y=-u*r-f*s-o*i;return t[0]=a*c+y*-u+d*-o-h*-f,t[1]=d*c+y*-f+h*-u-a*-o,t[2]=h*c+y*-o+a*-f-d*-u,t[3]=e[3],t},str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},exactEquals:M,equals:E,sub:T,mul:B,div:O,dist:A,sqrDist:w,len:S,sqrLen:L})},307:function(t,e,n){"use strict";n.d(e,"a",(function(){return h})),n.d(e,"b",(function(){return E})),n.d(e,"c",(function(){return Y})),n.d(e,"d",(function(){return k})),n.d(e,"e",(function(){return q})),n.d(e,"f",(function(){return b})),n.d(e,"g",(function(){return m})),n.d(e,"h",(function(){return g})),n.d(e,"i",(function(){return M})),n.d(e,"j",(function(){return v})),n.d(e,"k",(function(){return I})),n.d(e,"l",(function(){return A})),n.d(e,"m",(function(){return y})),n.d(e,"n",(function(){return T})),n.d(e,"o",(function(){return V})),n.d(e,"p",(function(){return W})),n.d(e,"q",(function(){return P})),n.d(e,"r",(function(){return x})),n.d(e,"s",(function(){return N})),n.d(e,"t",(function(){return w})),n.d(e,"u",(function(){return l})),n.d(e,"v",(function(){return B})),n.d(e,"w",(function(){return z})),n.d(e,"x",(function(){return Z})),n.d(e,"y",(function(){return U})),n.d(e,"z",(function(){return _})),n.d(e,"A",(function(){return F})),n.d(e,"B",(function(){return S})),n.d(e,"C",(function(){return p})),n.d(e,"D",(function(){return O})),n.d(e,"E",(function(){return D})),n.d(e,"F",(function(){return G})),n.d(e,"G",(function(){return R})),n.d(e,"H",(function(){return j})),n.d(e,"I",(function(){return C})),n.d(e,"J",(function(){return L}));class r{constructor(t,e,n=0,r,s){this.TypedArrayConstructor=t,this.elementCount=9;const i=this.TypedArrayConstructor;void 0===r&&(r=9*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:n;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-n)/i.BYTES_PER_ELEMENT),this.typedBufferStride=r/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}getMat(t,e){const n=t*this.typedBufferStride;for(let t=0;t<9;t++)e[t]=this.typedBuffer[n+t];return e}setMat(t,e){const n=t*this.typedBufferStride;for(let t=0;t<9;t++)this.typedBuffer[n+t]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,n){this.typedBuffer[t*this.typedBufferStride+e]=n}copyFrom(t,e,n){const r=this.typedBuffer,s=e.typedBuffer,i=t*this.typedBufferStride,u=n*e.typedBufferStride;for(let t=0;t<9;++t)r[i+t]=s[u+t]}get buffer(){return this.typedBuffer.buffer}}r.ElementCount=9;class s{constructor(t,e,n=0,r,s){this.TypedArrayConstructor=t,this.elementCount=16;const i=this.TypedArrayConstructor;void 0===r&&(r=16*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:n;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-n)/i.BYTES_PER_ELEMENT),this.typedBufferStride=r/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}getMat(t,e){const n=t*this.typedBufferStride;for(let t=0;t<16;t++)e[t]=this.typedBuffer[n+t];return e}setMat(t,e){const n=t*this.typedBufferStride;for(let t=0;t<16;t++)this.typedBuffer[n+t]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,n){this.typedBuffer[t*this.typedBufferStride+e]=n}copyFrom(t,e,n){const r=this.typedBuffer,s=e.typedBuffer,i=t*this.typedBufferStride,u=n*e.typedBufferStride;for(let t=0;t<16;++t)r[i+t]=s[u+t]}get buffer(){return this.typedBuffer.buffer}}s.ElementCount=16;class i{constructor(t,e,n=0,r,s){this.TypedArrayConstructor=t,this.elementCount=1;const i=this.TypedArrayConstructor;void 0===r&&(r=i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:n;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-n)/i.BYTES_PER_ELEMENT),this.typedBufferStride=r/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}get(t){return this.typedBuffer[t*this.typedBufferStride]}set(t,e){this.typedBuffer[t*this.typedBufferStride]=e}get buffer(){return this.typedBuffer.buffer}}i.ElementCount=1;var u=n(226);class f{constructor(t,e,n=0,r,s){this.TypedArrayConstructor=t,this.elementCount=2;const i=this.TypedArrayConstructor;void 0===r&&(r=2*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:n;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-n)/i.BYTES_PER_ELEMENT),this.typedBufferStride=r/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}getVec(t,e){return Object(u.l)(e,this.typedBuffer[t*this.typedBufferStride],this.typedBuffer[t*this.typedBufferStride+1])}setVec(t,e){this.typedBuffer[t*this.typedBufferStride]=e[0],this.typedBuffer[t*this.typedBufferStride+1]=e[1]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,n){this.typedBuffer[t*this.typedBufferStride+e]=n}setValues(t,e,n){this.typedBuffer[t*this.typedBufferStride]=e,this.typedBuffer[t*this.typedBufferStride+1]=n}copyFrom(t,e,n){const r=this.typedBuffer,s=e.typedBuffer,i=t*this.typedBufferStride,u=n*e.typedBufferStride;r[i]=s[u],r[i+1]=s[u+1]}get buffer(){return this.typedBuffer.buffer}}f.ElementCount=2;var o=n(103);class c{constructor(t,e,n=0,r,s){this.TypedArrayConstructor=t,this.elementCount=3;const i=this.TypedArrayConstructor;void 0===r&&(r=3*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:n;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-n)/i.BYTES_PER_ELEMENT),this.typedBufferStride=r/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}getVec(t,e){return Object(o.r)(e,this.typedBuffer[t*this.typedBufferStride],this.typedBuffer[t*this.typedBufferStride+1],this.typedBuffer[t*this.typedBufferStride+2])}setVec(t,e){this.typedBuffer[t*this.typedBufferStride]=e[0],this.typedBuffer[t*this.typedBufferStride+1]=e[1],this.typedBuffer[t*this.typedBufferStride+2]=e[2]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,n){this.typedBuffer[t*this.typedBufferStride+e]=n}setValues(t,e,n,r){this.typedBuffer[t*this.typedBufferStride]=e,this.typedBuffer[t*this.typedBufferStride+1]=n,this.typedBuffer[t*this.typedBufferStride+2]=r}copyFrom(t,e,n){const r=this.typedBuffer,s=e.typedBuffer,i=t*this.typedBufferStride,u=n*e.typedBufferStride;r[i]=s[u],r[i+1]=s[u+1],r[i+2]=s[u+2]}get buffer(){return this.typedBuffer.buffer}}c.ElementCount=3;var a=n(244);class d{constructor(t,e,n=0,r,s){this.TypedArrayConstructor=t,this.elementCount=4;const i=this.TypedArrayConstructor;void 0===r&&(r=4*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:n;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-n)/i.BYTES_PER_ELEMENT),this.typedBufferStride=r/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}getVec(t,e){return Object(a.k)(e,this.typedBuffer[t*this.typedBufferStride],this.typedBuffer[t*this.typedBufferStride+1],this.typedBuffer[t*this.typedBufferStride+2],this.typedBuffer[t*this.typedBufferStride+3])}setVec(t,e){this.typedBuffer[t*this.typedBufferStride]=e[0],this.typedBuffer[t*this.typedBufferStride+1]=e[1],this.typedBuffer[t*this.typedBufferStride+2]=e[2],this.typedBuffer[t*this.typedBufferStride+3]=e[3]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,n){this.typedBuffer[t*this.typedBufferStride+e]=n}setValues(t,e,n,r,s){this.typedBuffer[t*this.typedBufferStride]=e,this.typedBuffer[t*this.typedBufferStride+1]=n,this.typedBuffer[t*this.typedBufferStride+2]=r,this.typedBuffer[t*this.typedBufferStride+3]=s}copyFrom(t,e,n){const r=this.typedBuffer,s=e.typedBuffer,i=t*this.typedBufferStride,u=n*e.typedBufferStride;r[i]=s[u],r[i+1]=s[u+1],r[i+2]=s[u+2],r[i+3]=s[u+3]}get buffer(){return this.typedBuffer.buffer}}d.ElementCount=4;class h extends i{constructor(t,e=0,n,r){super(Float32Array,t,e,n,r),this.elementType="f32"}static fromTypedArray(t,e){return new h(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}h.ElementType="f32";class y extends f{constructor(t,e=0,n,r){super(Float32Array,t,e,n,r),this.elementType="f32"}static fromTypedArray(t,e){return new y(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}y.ElementType="f32";class l extends c{constructor(t,e=0,n,r){super(Float32Array,t,e,n,r),this.elementType="f32"}static fromTypedArray(t,e){return new l(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}l.ElementType="f32";class p extends d{constructor(t,e=0,n,r){super(Float32Array,t,e,n,r),this.elementType="f32"}static fromTypedArray(t,e){return new p(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}p.ElementType="f32";class b extends r{constructor(t,e=0,n,r){super(Float32Array,t,e,n,r),this.elementType="f32"}static fromTypedArray(t,e){return new b(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}b.ElementType="f32";class m extends r{constructor(t,e=0,n,r){super(Float64Array,t,e,n,r),this.elementType="f64"}static fromTypedArray(t,e){return new m(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}m.ElementType="f64";class g extends s{constructor(t,e=0,n,r){super(Float32Array,t,e,n,r),this.elementType="f32"}static fromTypedArray(t,e){return new g(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}g.ElementType="f32";class M extends s{constructor(t,e=0,n,r){super(Float64Array,t,e,n,r),this.elementType="f64"}static fromTypedArray(t,e){return new M(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}M.ElementType="f64";class E extends i{constructor(t,e=0,n,r){super(Float64Array,t,e,n,r),this.elementType="f64"}static fromTypedArray(t,e){return new E(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}E.ElementType="f64";class T extends f{constructor(t,e=0,n,r){super(Float64Array,t,e,n,r),this.elementType="f64"}static fromTypedArray(t,e){return new T(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}T.ElementType="f64";class B extends c{constructor(t,e=0,n,r){super(Float64Array,t,e,n,r),this.elementType="f64"}static fromTypedArray(t,e){return new B(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}B.ElementType="f64";class O extends d{constructor(t,e=0,n,r){super(Float64Array,t,e,n,r),this.elementType="f64"}static fromTypedArray(t,e){return new O(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}O.ElementType="f64";class A extends i{constructor(t,e=0,n,r){super(Uint8Array,t,e,n,r),this.elementType="u8"}static fromTypedArray(t,e){return new A(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}A.ElementType="u8";class w extends f{constructor(t,e=0,n,r){super(Uint8Array,t,e,n,r),this.elementType="u8"}static fromTypedArray(t,e){return new w(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}w.ElementType="u8";class S extends c{constructor(t,e=0,n,r){super(Uint8Array,t,e,n,r),this.elementType="u8"}static fromTypedArray(t,e){return new S(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}S.ElementType="u8";class L extends d{constructor(t,e=0,n,r){super(Uint8Array,t,e,n,r),this.elementType="u8"}static fromTypedArray(t,e){return new L(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}L.ElementType="u8";class v extends i{constructor(t,e=0,n,r){super(Uint16Array,t,e,n,r),this.elementType="u16"}static fromTypedArray(t,e){return new v(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}v.ElementType="u16";class x extends f{constructor(t,e=0,n,r){super(Uint16Array,t,e,n,r),this.elementType="u16"}static fromTypedArray(t,e){return new x(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}x.ElementType="u16";class _ extends c{constructor(t,e=0,n,r){super(Uint16Array,t,e,n,r),this.elementType="u16"}static fromTypedArray(t,e){return new _(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}_.ElementType="u16";class j extends d{constructor(t,e=0,n,r){super(Uint16Array,t,e,n,r),this.elementType="u16"}static fromTypedArray(t,e){return new j(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}j.ElementType="u16";class I extends i{constructor(t,e=0,n,r){super(Uint32Array,t,e,n,r),this.elementType="u32"}static fromTypedArray(t,e){return new I(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}I.ElementType="u32";class N extends f{constructor(t,e=0,n,r){super(Uint32Array,t,e,n,r),this.elementType="u32"}static fromTypedArray(t,e){return new N(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}N.ElementType="u32";class F extends c{constructor(t,e=0,n,r){super(Uint32Array,t,e,n,r),this.elementType="u32"}static fromTypedArray(t,e){return new F(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}F.ElementType="u32";class C extends d{constructor(t,e=0,n,r){super(Uint32Array,t,e,n,r),this.elementType="u32"}static fromTypedArray(t,e){return new C(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}C.ElementType="u32";class q extends i{constructor(t,e=0,n,r){super(Int8Array,t,e,n,r),this.elementType="i8"}static fromTypedArray(t,e){return new q(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}q.ElementType="i8";class P extends f{constructor(t,e=0,n,r){super(Int8Array,t,e,n,r),this.elementType="i8"}static fromTypedArray(t,e){return new P(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}P.ElementType="i8";class U extends c{constructor(t,e=0,n,r){super(Int8Array,t,e,n,r),this.elementType="i8"}static fromTypedArray(t,e){return new U(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}U.ElementType="i8";class R extends d{constructor(t,e=0,n,r){super(Int8Array,t,e,n,r),this.elementType="i8"}static fromTypedArray(t,e){return new R(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}R.ElementType="i8";class Y extends i{constructor(t,e=0,n,r){super(Int16Array,t,e,n,r),this.elementType="i16"}static fromTypedArray(t,e){return new Y(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}Y.ElementType="i16";class V extends f{constructor(t,e=0,n,r){super(Int16Array,t,e,n,r),this.elementType="i16"}static fromTypedArray(t,e){return new V(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}V.ElementType="i16";class z extends c{constructor(t,e=0,n,r){super(Int16Array,t,e,n,r),this.elementType="i16"}static fromTypedArray(t,e){return new z(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}z.ElementType="i16";class D extends d{constructor(t,e=0,n,r){super(Int16Array,t,e,n,r),this.elementType="i16"}static fromTypedArray(t,e){return new D(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}D.ElementType="i16";class k extends i{constructor(t,e=0,n,r){super(Int32Array,t,e,n,r),this.elementType="i32"}static fromTypedArray(t,e){return new k(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}k.ElementType="i32";class W extends f{constructor(t,e=0,n,r){super(Int32Array,t,e,n,r),this.elementType="i32"}static fromTypedArray(t,e){return new W(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}W.ElementType="i32";class Z extends c{constructor(t,e=0,n,r){super(Int32Array,t,e,n,r),this.elementType="i32"}static fromTypedArray(t,e){return new Z(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}Z.ElementType="i32";class G extends d{constructor(t,e=0,n,r){super(Int32Array,t,e,n,r),this.elementType="i32"}static fromTypedArray(t,e){return new G(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}}G.ElementType="i32"},317:function(t,e,n){"use strict";n.d(e,"a",(function(){return f})),n.d(e,"b",(function(){return d})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return u}));var r=n(81),s=n(91),i=n(103);function u(t){const e=t[0]*t[0]+t[4]*t[4]+t[8]*t[8],n=t[1]*t[1]+t[5]*t[5]+t[9]*t[9],r=t[2]*t[2]+t[6]*t[6]+t[10]*t[10];return Math.sqrt(Math.max(Math.max(e,n),r))}function f(t,e){const n=Object(i.m)(t),s=Object(r.b)(t[2]/n),u=Math.atan2(t[1]/n,t[0]/n);return Object(i.r)(e,n,s,u),e}function o(t,e,n){const r=n[0]-e[0],s=n[1]-e[1],i=n[2]-e[2];let u=r*r+s*s+i*i;return u?(u=1/Math.sqrt(u),t[0]=r*u,t[1]=s*u,t[2]=i*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}class c{constructor(t,e){this.min=t,this.max=e,this.range=e-t}ndiff(t,e=0){return Math.ceil((t-e)/this.range)*this.range+e}_normalize(t,e,n,r=0,s=!1){return(n-=r)<t?n+=this.ndiff(t-n):n>e&&(n-=this.ndiff(n-e)),s&&n===e&&(n=t),n+r}normalize(t,e=0,n=!1){return this._normalize(this.min,this.max,t,e,n)}clamp(t,e=0){return Object(r.c)(t-e,this.min,this.max)+e}monotonic(t,e,n){return t<e?e:e+this.ndiff(t-e,n)}minimalMonotonic(t,e,n){return this._normalize(t,t+this.range,e,n)}center(t,e,n){return e=this.monotonic(t,e,n),this.normalize((t+e)/2,n)}diff(t,e,n){return this.monotonic(t,e,n)-t}shortestSignedDiff(t,e){t=this.normalize(t);const n=(e=this.normalize(e))-t,r=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(n)<Math.abs(r)?n:r}contains(t,e,n){return e=this.minimalMonotonic(t,e),(n=this.minimalMonotonic(t,n))>t&&n<e}}Object(s.e)(),Object(s.e)();function a(t){for(const e in t){const n=t[e];n instanceof Function&&(t[e]=n.bind(t))}return t}a(new c(0,2*Math.PI)),a(new c(-Math.PI,Math.PI));const d=a(new c(0,360));Object(s.e)(),Object(s.e)(),Object(s.e)()},340:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return u}));n(7);function r(t){switch(t){case"u8":return 1;case"u16":return 2;case"u32":return 4;case"i8":return 1;case"i16":return 2;case"i32":case"f32":return 4;case"f64":return 8;default:return}}function s(t){switch(t){case"u8":case"u16":case"u32":return!1;case"i8":case"i16":case"i32":case"f32":case"f64":return!0;default:return}}function i(t){switch(t){case"u8":case"u16":case"u32":case"i8":case"i16":case"i32":return!0;case"f32":case"f64":return!1;default:return}}function u(t){switch(t){case"u8":return 255;case"u16":return 65535;case"u32":return 4294967295;case"i8":return 127;case"i16":return 32767;case"i32":return 2147483647;case"f32":return 3402823e32;case"f64":return 179769e303;default:return}}},382:function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(307),s=n(340);class i{constructor(t,e){this.layout=t,this.buffer="number"==typeof e?new ArrayBuffer(e*t.stride):e;for(const e of t.fieldNames){const n=t.fields.get(e);this[e]=new n.constructor(this.buffer,n.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(t,e){const n=this[t];return n&&n.elementCount===e.ElementCount&&n.elementType===e.ElementType?n:null}slice(t,e){return new i(this.layout,this.buffer.slice(t*this.stride,e*this.stride))}copyFrom(t,e,n,r){const s=this.stride;if(s%4==0){const i=new Uint32Array(t.buffer,e*s,r*s/4);new Uint32Array(this.buffer,n*s,r*s/4).set(i)}else{const i=new Uint8Array(t.buffer,e*s,r*s);new Uint8Array(this.buffer,n*s,r*s).set(i)}}}class u{constructor(){this.stride=0,this.fields=new Map,this.fieldNames=[]}vec2f(t,e){return this.appendField(t,r.m,e),this}vec2f64(t,e){return this.appendField(t,r.n,e),this}vec3f(t,e){return this.appendField(t,r.u,e),this}vec3f64(t,e){return this.appendField(t,r.v,e),this}vec4f(t,e){return this.appendField(t,r.C,e),this}vec4f64(t,e){return this.appendField(t,r.D,e),this}mat3f(t,e){return this.appendField(t,r.f,e),this}mat3f64(t,e){return this.appendField(t,r.g,e),this}mat4f(t,e){return this.appendField(t,r.h,e),this}mat4f64(t,e){return this.appendField(t,r.i,e),this}vec4u8(t,e){return this.appendField(t,r.J,e),this}f32(t,e){return this.appendField(t,r.a,e),this}f64(t,e){return this.appendField(t,r.b,e),this}u8(t,e){return this.appendField(t,r.l,e),this}u16(t,e){return this.appendField(t,r.j,e),this}i8(t,e){return this.appendField(t,r.e,e),this}vec2i8(t,e){return this.appendField(t,r.q,e),this}vec2i16(t,e){return this.appendField(t,r.o,e),this}vec2u8(t,e){return this.appendField(t,r.t,e),this}vec4u16(t,e){return this.appendField(t,r.H,e),this}u32(t,e){return this.appendField(t,r.k,e),this}appendField(t,e,n){const r=e.ElementCount*Object(s.a)(e.ElementType),i=this.stride;this.fields.set(t,{size:r,constructor:e,offset:i,optional:n}),this.stride+=r,this.fieldNames.push(t)}alignTo(t){return this.stride=Math.floor((this.stride+t-1)/t)*t,this}hasField(t){return this.fieldNames.indexOf(t)>=0}createBuffer(t){return new i(this,t)}createView(t){return new i(this,t)}clone(){const t=new u;return t.stride=this.stride,t.fields=new Map,this.fields.forEach((e,n)=>t.fields.set(n,e)),t.fieldNames=this.fieldNames.slice(),t.BufferType=this.BufferType,t}}function f(){return new u}},669:function(t,e,n){"use strict";n.r(e),n.d(e,"work",(function(){return W})),n.d(e,"wrappedWork",(function(){return k}));var r=n(81);function s(t,e,n){const s=t.byteLength/(4*e),c=new Uint32Array(t,0,s*e);let a=new Uint32Array(s);const d=n&&n.minReduction||0,h=n&&n.originalIndices||null,y=n&&n.componentOffsets||null;let l=0;if(y)for(let t=0;t<y.length-1;t++){const e=y[t+1]-y[t];e>l&&(l=e)}else l=s;const p=Math.floor(1.1*l)+1;(null==o||o.length<2*p)&&(o=new Uint32Array(Object(r.i)(2*p)));for(let t=0;t<2*p;t++)o[t]=0;let b=0;const m=!!y&&!!h,g=m?h.length:s,M=m?new Uint32Array(h.length):null,E=1.96;let T=0!==d?Math.ceil(7.84*E/(d*d)*d*(1-d)):g,B=1,O=y?y[1]:g;for(let t=0;t<g;t++){if(t===T){const e=1-b/t;if(e+E*Math.sqrt(e*(1-e)/t)<d)return null;T*=2}if(t===O){for(let t=0;t<2*p;t++)o[t]=0;if(h)for(let t=y[B-1];t<y[B];t++)M[t]=a[h[t]];O=y[++B]}const n=m?h[t]:t,r=n*e,s=f(c,r,e);let u=s%p,l=b;for(;0!==o[2*u+1];){if(o[2*u]===s){const t=o[2*u+1]-1;if(i(c,r,t*e,e)){l=a[t];break}}u++,u>=p&&(u-=p)}l===b&&(o[2*u]=s,o[2*u+1]=n+1,b++),a[n]=l}if(0!==d&&1-b/s<d)return null;if(m){for(let t=y[B-1];t<M.length;t++)M[t]=a[h[t]];a=M}const A=new Uint32Array(e*b);b=0;for(let t=0;t<g;t++)a[t]===b&&(u(c,(m?h[t]:t)*e,A,b*e,e),b++);if(h&&!m){const t=new Uint32Array(h.length);for(let e=0;e<t.length;e++)t[e]=a[h[e]];a=t}return{buffer:A.buffer,indices:a,uniqueCount:b}}function i(t,e,n,r){for(let s=0;s<r;s++)if(t[e+s]!==t[n+s])return!1;return!0}function u(t,e,n,r,s){for(let i=0;i<s;i++)n[r+i]=t[e+i]}function f(t,e,n){let r=0;for(let s=0;s<n;s++)r=t[e+s]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let o=null;const c={divisor:0};function a(t,e={}){e={...c,...e};const n=t.stride;return t.fieldNames.filter(e=>{const n=t.fields.get(e).optional;return!(n&&n.glPadding)}).map(r=>{const s=t.fields.get(r),i=s.constructor.ElementCount,u=function(t){const e=d[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}(s.constructor.ElementType),f=s.offset,o=!(!s.optional||!s.optional.glNormalized);return{name:r,stride:n,count:i,type:u,offset:f,normalized:o,divisor:e.divisor}})}const d={u8:5121,u16:5123,u32:5125,i8:5120,i16:5122,i32:5124,f32:5126};var h=n(382);const y=Object(h.a)().vec3f("position").u16("componentIndex").u16("_padding"),l=(a(Object(h.a)().vec2u8("sideness")),Object(h.a)().vec3f("position0").vec3f("position1").u16("componentIndex").u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).u8("_padding",{glPadding:!0}).u16("_padding2",{glPadding:!0})),p=l.clone().vec3f("normal"),b=l.clone().vec3f("normalA").vec3f("normalB");var m=n(44),g=n(91),M=n(103);class E{updateSettings(t){this.settings=t}write(t,e,n){const r=function(t){const e=T;e[0]=t.position0[0],e[1]=t.position0[1],e[2]=t.position0[2],e[3]=t.position1[0],e[4]=t.position1[1],e[5]=t.position1[2],O[0]=5381;for(let t=0;t<B.length;t++)O[0]=31*O[0]+B[t];return O[0]}(n);A.seed=r;const s=A.getIntRange(0,255),i=A.getIntRange(0,this.settings.variants-1),u=A.getFloat(),f=255*(.5*function(t,e){const n=t<0?-1:1;return Math.pow(Math.abs(t),1.2)*n}(-(1-Math.min(u/.7,1))+Math.max(0,u-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,s),t.variantStroke.set(e,i),t.variantExtension.set(e,f)}trim(t,e){return t.slice(0,e)}}const T=new Float32Array(6),B=new Uint32Array(T.buffer),O=new Uint32Array(1),A=new m.a;class w{constructor(){this.commonWriter=new E}updateSettings(t){this.commonWriter.updateSettings(t)}allocate(t){return p.createBuffer(t)}write(t,e,n){this.commonWriter.write(t,e,n),Object(M.c)(L,n.faceNormal0,n.faceNormal1),Object(M.o)(L,L),t.normal.setVec(e,L)}trim(t,e){return this.commonWriter.trim(t,e)}}w.Layout=p,w.glLayout=a(p,{divisor:1});class S{constructor(){this.commonWriter=new E}updateSettings(t){this.commonWriter.updateSettings(t)}allocate(t){return b.createBuffer(t)}write(t,e,n){this.commonWriter.write(t,e,n),t.normalA.setVec(e,n.faceNormal0),t.normalB.setVec(e,n.faceNormal1)}trim(t,e){return this.commonWriter.trim(t,e)}}S.Layout=b,S.glLayout=a(b,{divisor:1});const L=Object(g.e)();var v=n(307);function x(t,e){return e.push(t.buffer),{buffer:t.buffer,layout:_(t.layout)}}function _(t){const e=new Array;return t.fields.forEach((t,n)=>{const r={...t,constructor:I(t.constructor)};e.push([n,r])}),{stride:t.stride,fields:e,fieldNames:t.fieldNames}}const j=[v.a,v.m,v.u,v.C,v.f,v.h,v.b,v.n,v.v,v.D,v.g,v.i,v.l,v.t,v.B,v.J,v.j,v.r,v.z,v.H,v.k,v.s,v.A,v.I,v.e,v.q,v.y,v.G,v.c,v.o,v.w,v.E,v.d,v.p,v.x,v.F];function I(t){return`${t.ElementType}_${t.ElementCount}`}const N=new Map;function F(t,e){const n=t.length/3,r=new Uint32Array(e+1),s=new Uint32Array(e+1),i=(t,e)=>{t<e?r[t+1]++:s[e+1]++};for(let e=0;e<n;e++){const n=t[3*e],r=t[3*e+1],s=t[3*e+2];i(n,r),i(r,s),i(s,n)}let u=0,f=0;for(let t=0;t<e;t++){const e=r[t+1],n=s[t+1];r[t+1]=u,s[t+1]=f,u+=e,f+=n}const o=new Uint32Array(6*n),c=r[e],a=(t,e,n)=>{if(t<e){const s=r[t+1]++;o[2*s]=e,o[2*s+1]=n}else{const r=s[e+1]++;o[2*c+2*r]=t,o[2*c+2*r+1]=n}};for(let e=0;e<n;e++){const n=t[3*e],r=t[3*e+1],s=t[3*e+2];a(n,r,e),a(r,s,e),a(s,n,e)}const d=(t,e)=>{const n=2*t,r=e-t;for(let t=1;t<r;t++){const e=o[n+2*t],r=o[n+2*t+1];let s=t-1;for(;s>=0&&o[n+2*s]>e;s--)o[n+2*s+2]=o[n+2*s],o[n+2*s+3]=o[n+2*s+1];o[n+2*s+2]=e,o[n+2*s+3]=r}};for(let t=0;t<e;t++)d(r[t],r[t+1]),d(c+s[t],c+s[t+1]);const h=new Int32Array(3*n),y=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,l=(t,e)=>{const n=y(t,e);h[3*e+n]=-1},p=(t,e,n,r)=>{const s=y(t,e);h[3*e+s]=r;const i=y(n,r);h[3*r+i]=e};for(let t=0;t<e;t++){let e=r[t];const n=r[t+1];let i=s[t];const u=s[t+1];for(;e<n&&i<u;){const n=o[2*e],r=o[2*c+2*i];n===r?(p(t,o[2*e+1],r,o[2*c+2*i+1]),e++,i++):n<r?(l(t,o[2*e+1]),e++):(l(r,o[2*c+2*i+1]),i++)}for(;e<n;)l(t,o[2*e+1]),e++;for(;i<u;)l(o[2*c+2*i],o[2*c+2*i+1]),i++}return h}j.forEach(t=>N.set(I(t),t));var C=n(13),q=n(21),P=n(317);function U(t,e){return t.cosAngle<e}function R(t,e){return t.cosAngle>e}function Y(t,e){const n=Object(r.a)(t.cosAngle),s=V.fwd,i=V.ortho;return Object(P.c)(s,t.position1,t.position0),n*(Object(M.e)(Object(M.d)(i,t.faceNormal0,t.faceNormal1),s)>0?-1:1)>e}const V={edge:{position0:Object(g.e)(),position1:Object(g.e)(),faceNormal0:Object(g.e)(),faceNormal1:Object(g.e)(),componentIndex:0,cosAngle:0},ortho:Object(g.e)(),fwd:Object(g.e)()},z={v0:Object(g.e)(),v1:Object(g.e)(),v2:Object(g.e)()},D={anglePlanar:4,angleSignificantEdge:35};async function k(t){const e=function(t){return{data:y.createView(t.dataBuffer),originalIndices:"Uint32Array"===t.originalIndicesType?new Uint32Array(t.originalIndicesBuffer):"Uint16Array"===t.originalIndicesType?new Uint16Array(t.originalIndicesBuffer):void 0,writerSettings:t.writerSettings,skipDeduplicate:t.skipDeduplicate}}(t),n=W(e),r=[e.data.buffer];return{result:function(t,e){return e.push(t.regular.lodInfo.lengths.buffer),e.push(t.silhouette.lodInfo.lengths.buffer),{regular:{instancesData:x(t.regular.instancesData,e),lodInfo:{lengths:t.regular.lodInfo.lengths.buffer}},silhouette:{instancesData:x(t.silhouette.instancesData,e),lodInfo:{lengths:t.silhouette.lodInfo.lengths.buffer}},averageEdgeLength:t.averageEdgeLength}}(n,r),transferList:r}}function W(t){const e=function(t,e,n){if(e&&n)return{faces:n,neighbors:F(n,t.count),vertices:t};{const e=s(t.buffer,t.stride/4,{originalIndices:n}),r=F(e.indices,e.uniqueCount);return{faces:e.indices,neighbors:r,vertices:y.createView(e.buffer)}}}(t.data,t.skipDeduplicate,t.originalIndices);return Z.updateSettings(t.writerSettings),G.updateSettings(t.writerSettings),function(t,e,n,s=D){const i=t.vertices.position,u=t.vertices.componentIndex,f=Object(r.d)(s.anglePlanar),o=Object(r.d)(s.angleSignificantEdge),c=Math.cos(o),a=Math.cos(f),d=V.edge,h=d.position0,y=d.position1,l=d.faceNormal0,p=d.faceNormal1,b=function(t){const e=t.faces.length/3,n=t.vertices.position,r=t.faces,s=z.v0,i=z.v1,u=z.v2,f=new Float32Array(3*e);for(let t=0;t<e;t++){const e=r[3*t+0],o=r[3*t+1],c=r[3*t+2];n.getVec(e,s),n.getVec(o,i),n.getVec(c,u),Object(M.g)(i,i,s),Object(M.g)(u,u,s),Object(M.d)(s,i,u),Object(M.o)(s,s),f[3*t+0]=s[0],f[3*t+1]=s[1],f[3*t+2]=s[2]}return f}(t),m=function(t){const e=t.faces.length/3,n=t.faces,r=t.neighbors;let s=0;for(let t=0;t<e;t++){const e=r[3*t+0],i=r[3*t+1],u=r[3*t+2],f=n[3*t+0],o=n[3*t+1],c=n[3*t+2];s+=-1===e||f<o?1:0,s+=-1===i||o<c?1:0,s+=-1===u||c<f?1:0}const i=new Int32Array(4*s);let u=0;for(let t=0;t<e;t++){const e=r[3*t+0],s=r[3*t+1],f=r[3*t+2],o=n[3*t+0],c=n[3*t+1],a=n[3*t+2];(-1===e||o<c)&&(i[u++]=o,i[u++]=c,i[u++]=t,i[u++]=e),(-1===s||c<a)&&(i[u++]=c,i[u++]=a,i[u++]=t,i[u++]=s),(-1===f||a<o)&&(i[u++]=a,i[u++]=o,i[u++]=t,i[u++]=f)}return i}(t),g=m.length/4,E=e.allocate(g);let T=0;const B=g,O=n.allocate(B);let A=0,w=0,S=0;const L=Object(q.f)(0,g),v=new Float32Array(g);Object(C.b)(v,(t,e,n)=>{i.getVec(m[4*e+0],h),i.getVec(m[4*e+1],y),n[e]=Object(M.l)(h,y)}),L.sort((t,e)=>v[e]-v[t]);const x=new Array,_=new Array;for(let t=0;t<g;t++){const r=L[t],s=v[r],o=m[4*r+0],g=m[4*r+1],B=m[4*r+2],j=m[4*r+3],I=-1===j;if(i.getVec(o,h),i.getVec(g,y),I)Object(M.r)(l,b[3*B+0],b[3*B+1],b[3*B+2]),Object(M.h)(p,l),d.componentIndex=u.get(o),d.cosAngle=Object(M.e)(l,p);else{if(Object(M.r)(l,b[3*B+0],b[3*B+1],b[3*B+2]),Object(M.r)(p,b[3*j+0],b[3*j+1],b[3*j+2]),d.componentIndex=u.get(o),d.cosAngle=Object(M.e)(l,p),R(d,a))continue;d.cosAngle<-.9999&&Object(M.h)(p,l)}w+=s,S++,I||U(d,c)?(e.write(E,T++,d),x.push(s)):Y(d,f)&&(n.write(O,A++,d),_.push(s))}const j=new Float32Array(x.reverse()),I=new Float32Array(_.reverse());return{regular:{instancesData:e.trim(E,T),lodInfo:{lengths:j}},silhouette:{instancesData:n.trim(O,A),lodInfo:{lengths:I}},averageEdgeLength:w/S}}(e,Z,G)}const Z=new w,G=new S},81:function(t,e,n){"use strict";n.d(e,"a",(function(){return y})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return i})),n.d(e,"d",(function(){return d})),n.d(e,"e",(function(){return u})),n.d(e,"f",(function(){return f})),n.d(e,"g",(function(){return a})),n.d(e,"h",(function(){return c})),n.d(e,"i",(function(){return s})),n.d(e,"j",(function(){return o})),n.d(e,"k",(function(){return h}));const r=new Float32Array(1);Number.isFinite,Number.isNaN;function s(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,n){return t<e?e:t>n?n:t}function u(t,e,n){return Math.min(Math.max(t,e),n)}function f(t){return 0==(t&t-1)}function o(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t}Math.sign;const c=Math.log2||function(t){return Math.log(t)/Math.LN2};function a(t,e,n){return t+(e-t)*n}function d(t){return t*Math.PI/180}function h(t){return 180*t/Math.PI}function y(t){return Math.acos(i(t,-1,1))}function l(t){return Math.asin(i(t,-1,1))}function p(t){return r[0]=t,r[0]}p(34028234663852886e22)},91:function(t,e,n){"use strict";function r(){return[0,0,0]}function s(t){return[t[0],t[1],t[2]]}function i(t,e,n){return[t,e,n]}function u(t){const e=[0,0,0],n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function f(t,e){return new Float64Array(t,e,3)}function o(){return i(1,1,1)}function c(){return i(1,0,0)}function a(){return i(0,1,0)}function d(){return i(0,0,1)}n.d(e,"a",(function(){return y})),n.d(e,"b",(function(){return h})),n.d(e,"c",(function(){return f})),n.d(e,"d",(function(){return s})),n.d(e,"e",(function(){return r})),n.d(e,"f",(function(){return u})),n.d(e,"g",(function(){return i}));const h=[0,0,0],y=o(),l=c(),p=a(),b=d();Object.freeze({__proto__:null,create:r,clone:s,fromValues:i,fromArray:u,createView:f,zeros:function(){return[0,0,0]},ones:o,unitX:c,unitY:a,unitZ:d,ZEROS:h,ONES:y,UNIT_X:l,UNIT_Y:p,UNIT_Z:b})}});