qa-regulatory-gwj-vue/static/map/cesium91/CesiumUnminified/Workers/Matrix4-4c545f70.js

2 lines
31 KiB
JavaScript

define(["exports","./Cartesian3-e0307675","./Check-741c5f3c","./defaultValue-81eec7ed","./Math-e73894ab","./RuntimeError-26acdd3b"],(function(n,t,e,r,a,u){"use strict";function i(n,t,e,a,u,i,o,s,c){this[0]=r.defaultValue(n,0),this[1]=r.defaultValue(a,0),this[2]=r.defaultValue(o,0),this[3]=r.defaultValue(t,0),this[4]=r.defaultValue(u,0),this[5]=r.defaultValue(s,0),this[6]=r.defaultValue(e,0),this[7]=r.defaultValue(i,0),this[8]=r.defaultValue(c,0)}i.packedLength=9,i.pack=function(n,t,e){return e=r.defaultValue(e,0),t[e++]=n[0],t[e++]=n[1],t[e++]=n[2],t[e++]=n[3],t[e++]=n[4],t[e++]=n[5],t[e++]=n[6],t[e++]=n[7],t[e++]=n[8],t},i.unpack=function(n,t,e){return t=r.defaultValue(t,0),r.defined(e)||(e=new i),e[0]=n[t++],e[1]=n[t++],e[2]=n[t++],e[3]=n[t++],e[4]=n[t++],e[5]=n[t++],e[6]=n[t++],e[7]=n[t++],e[8]=n[t++],e},i.packArray=function(n,t){const e=n.length,a=9*e;r.defined(t)?(Array.isArray(t)||t.length===a)&&t.length!==a&&(t.length=a):t=new Array(a);for(let r=0;r<e;++r)i.pack(n[r],t,9*r);return t},i.unpackArray=function(n,t){const e=n.length;r.defined(t)?t.length=e/9:t=new Array(e/9);for(let r=0;r<e;r+=9){const e=r/9;t[e]=i.unpack(n,r,t[e])}return t},i.clone=function(n,t){if(r.defined(n))return r.defined(t)?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t):new i(n[0],n[3],n[6],n[1],n[4],n[7],n[2],n[5],n[8])},i.fromArray=i.unpack,i.fromColumnMajorArray=function(n,t){return i.clone(n,t)},i.fromRowMajorArray=function(n,t){return r.defined(t)?(t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8],t):new i(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8])},i.fromQuaternion=function(n,t){const e=n.x*n.x,a=n.x*n.y,u=n.x*n.z,o=n.x*n.w,s=n.y*n.y,c=n.y*n.z,l=n.y*n.w,f=n.z*n.z,y=n.z*n.w,d=n.w*n.w,h=e-s-f+d,m=2*(a-y),x=2*(u+l),w=2*(a+y),z=-e+s-f+d,M=2*(c-o),p=2*(u-l),C=2*(c+o),g=-e-s+f+d;return r.defined(t)?(t[0]=h,t[1]=w,t[2]=p,t[3]=m,t[4]=z,t[5]=C,t[6]=x,t[7]=M,t[8]=g,t):new i(h,m,x,w,z,M,p,C,g)},i.fromHeadingPitchRoll=function(n,t){const e=Math.cos(-n.pitch),a=Math.cos(-n.heading),u=Math.cos(n.roll),o=Math.sin(-n.pitch),s=Math.sin(-n.heading),c=Math.sin(n.roll),l=e*a,f=-u*s+c*o*a,y=c*s+u*o*a,d=e*s,h=u*a+c*o*s,m=-c*a+u*o*s,x=-o,w=c*e,z=u*e;return r.defined(t)?(t[0]=l,t[1]=d,t[2]=x,t[3]=f,t[4]=h,t[5]=w,t[6]=y,t[7]=m,t[8]=z,t):new i(l,f,y,d,h,m,x,w,z)},i.fromScale=function(n,t){return r.defined(t)?(t[0]=n.x,t[1]=0,t[2]=0,t[3]=0,t[4]=n.y,t[5]=0,t[6]=0,t[7]=0,t[8]=n.z,t):new i(n.x,0,0,0,n.y,0,0,0,n.z)},i.fromUniformScale=function(n,t){return r.defined(t)?(t[0]=n,t[1]=0,t[2]=0,t[3]=0,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=n,t):new i(n,0,0,0,n,0,0,0,n)},i.fromCrossProduct=function(n,t){return r.defined(t)?(t[0]=0,t[1]=n.z,t[2]=-n.y,t[3]=-n.z,t[4]=0,t[5]=n.x,t[6]=n.y,t[7]=-n.x,t[8]=0,t):new i(0,-n.z,n.y,n.z,0,-n.x,-n.y,n.x,0)},i.fromRotationX=function(n,t){const e=Math.cos(n),a=Math.sin(n);return r.defined(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=a,t[6]=0,t[7]=-a,t[8]=e,t):new i(1,0,0,0,e,-a,0,a,e)},i.fromRotationY=function(n,t){const e=Math.cos(n),a=Math.sin(n);return r.defined(t)?(t[0]=e,t[1]=0,t[2]=-a,t[3]=0,t[4]=1,t[5]=0,t[6]=a,t[7]=0,t[8]=e,t):new i(e,0,a,0,1,0,-a,0,e)},i.fromRotationZ=function(n,t){const e=Math.cos(n),a=Math.sin(n);return r.defined(t)?(t[0]=e,t[1]=a,t[2]=0,t[3]=-a,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new i(e,-a,0,a,e,0,0,0,1)},i.toArray=function(n,t){return r.defined(t)?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t):[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8]]},i.getElementIndex=function(n,t){return 3*n+t},i.getColumn=function(n,t,e){const r=3*t,a=n[r],u=n[r+1],i=n[r+2];return e.x=a,e.y=u,e.z=i,e},i.setColumn=function(n,t,e,r){const a=3*t;return(r=i.clone(n,r))[a]=e.x,r[a+1]=e.y,r[a+2]=e.z,r},i.getRow=function(n,t,e){const r=n[t],a=n[t+3],u=n[t+6];return e.x=r,e.y=a,e.z=u,e},i.setRow=function(n,t,e,r){return(r=i.clone(n,r))[t]=e.x,r[t+3]=e.y,r[t+6]=e.z,r};const o=new t.Cartesian3;i.setScale=function(n,t,e){const r=i.getScale(n,o),a=t.x/r.x,u=t.y/r.y,s=t.z/r.z;return e[0]=n[0]*a,e[1]=n[1]*a,e[2]=n[2]*a,e[3]=n[3]*u,e[4]=n[4]*u,e[5]=n[5]*u,e[6]=n[6]*s,e[7]=n[7]*s,e[8]=n[8]*s,e};const s=new t.Cartesian3;i.setUniformScale=function(n,t,e){const r=i.getScale(n,s),a=t/r.x,u=t/r.y,o=t/r.z;return e[0]=n[0]*a,e[1]=n[1]*a,e[2]=n[2]*a,e[3]=n[3]*u,e[4]=n[4]*u,e[5]=n[5]*u,e[6]=n[6]*o,e[7]=n[7]*o,e[8]=n[8]*o,e};const c=new t.Cartesian3;i.getScale=function(n,e){return e.x=t.Cartesian3.magnitude(t.Cartesian3.fromElements(n[0],n[1],n[2],c)),e.y=t.Cartesian3.magnitude(t.Cartesian3.fromElements(n[3],n[4],n[5],c)),e.z=t.Cartesian3.magnitude(t.Cartesian3.fromElements(n[6],n[7],n[8],c)),e};const l=new t.Cartesian3;i.getMaximumScale=function(n){return i.getScale(n,l),t.Cartesian3.maximumComponent(l)};const f=new t.Cartesian3;i.setRotation=function(n,t,e){const r=i.getScale(n,f);return e[0]=t[0]*r.x,e[1]=t[1]*r.x,e[2]=t[2]*r.x,e[3]=t[3]*r.y,e[4]=t[4]*r.y,e[5]=t[5]*r.y,e[6]=t[6]*r.z,e[7]=t[7]*r.z,e[8]=t[8]*r.z,e};const y=new t.Cartesian3;i.getRotation=function(n,t){const e=i.getScale(n,y);return t[0]=n[0]/e.x,t[1]=n[1]/e.x,t[2]=n[2]/e.x,t[3]=n[3]/e.y,t[4]=n[4]/e.y,t[5]=n[5]/e.y,t[6]=n[6]/e.z,t[7]=n[7]/e.z,t[8]=n[8]/e.z,t},i.multiply=function(n,t,e){const r=n[0]*t[0]+n[3]*t[1]+n[6]*t[2],a=n[1]*t[0]+n[4]*t[1]+n[7]*t[2],u=n[2]*t[0]+n[5]*t[1]+n[8]*t[2],i=n[0]*t[3]+n[3]*t[4]+n[6]*t[5],o=n[1]*t[3]+n[4]*t[4]+n[7]*t[5],s=n[2]*t[3]+n[5]*t[4]+n[8]*t[5],c=n[0]*t[6]+n[3]*t[7]+n[6]*t[8],l=n[1]*t[6]+n[4]*t[7]+n[7]*t[8],f=n[2]*t[6]+n[5]*t[7]+n[8]*t[8];return e[0]=r,e[1]=a,e[2]=u,e[3]=i,e[4]=o,e[5]=s,e[6]=c,e[7]=l,e[8]=f,e},i.add=function(n,t,e){return e[0]=n[0]+t[0],e[1]=n[1]+t[1],e[2]=n[2]+t[2],e[3]=n[3]+t[3],e[4]=n[4]+t[4],e[5]=n[5]+t[5],e[6]=n[6]+t[6],e[7]=n[7]+t[7],e[8]=n[8]+t[8],e},i.subtract=function(n,t,e){return e[0]=n[0]-t[0],e[1]=n[1]-t[1],e[2]=n[2]-t[2],e[3]=n[3]-t[3],e[4]=n[4]-t[4],e[5]=n[5]-t[5],e[6]=n[6]-t[6],e[7]=n[7]-t[7],e[8]=n[8]-t[8],e},i.multiplyByVector=function(n,t,e){const r=t.x,a=t.y,u=t.z,i=n[0]*r+n[3]*a+n[6]*u,o=n[1]*r+n[4]*a+n[7]*u,s=n[2]*r+n[5]*a+n[8]*u;return e.x=i,e.y=o,e.z=s,e},i.multiplyByScalar=function(n,t,e){return e[0]=n[0]*t,e[1]=n[1]*t,e[2]=n[2]*t,e[3]=n[3]*t,e[4]=n[4]*t,e[5]=n[5]*t,e[6]=n[6]*t,e[7]=n[7]*t,e[8]=n[8]*t,e},i.multiplyByScale=function(n,t,e){return e[0]=n[0]*t.x,e[1]=n[1]*t.x,e[2]=n[2]*t.x,e[3]=n[3]*t.y,e[4]=n[4]*t.y,e[5]=n[5]*t.y,e[6]=n[6]*t.z,e[7]=n[7]*t.z,e[8]=n[8]*t.z,e},i.multiplyByUniformScale=function(n,t,e){return e[0]=n[0]*t,e[1]=n[1]*t,e[2]=n[2]*t,e[3]=n[3]*t,e[4]=n[4]*t,e[5]=n[5]*t,e[6]=n[6]*t,e[7]=n[7]*t,e[8]=n[8]*t,e},i.negate=function(n,t){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t[4]=-n[4],t[5]=-n[5],t[6]=-n[6],t[7]=-n[7],t[8]=-n[8],t},i.transpose=function(n,t){const e=n[0],r=n[3],a=n[6],u=n[1],i=n[4],o=n[7],s=n[2],c=n[5],l=n[8];return t[0]=e,t[1]=r,t[2]=a,t[3]=u,t[4]=i,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t};const d=[1,0,0],h=[2,2,1];function m(n){let t=0;for(let e=0;e<3;++e){const r=n[i.getElementIndex(h[e],d[e])];t+=2*r*r}return Math.sqrt(t)}function x(n,t){const e=a.CesiumMath.EPSILON15;let r=0,u=1;for(let t=0;t<3;++t){const e=Math.abs(n[i.getElementIndex(h[t],d[t])]);e>r&&(u=t,r=e)}let o=1,s=0;const c=d[u],l=h[u];if(Math.abs(n[i.getElementIndex(l,c)])>e){const t=(n[i.getElementIndex(l,l)]-n[i.getElementIndex(c,c)])/2/n[i.getElementIndex(l,c)];let e;e=t<0?-1/(-t+Math.sqrt(1+t*t)):1/(t+Math.sqrt(1+t*t)),o=1/Math.sqrt(1+e*e),s=e*o}return(t=i.clone(i.IDENTITY,t))[i.getElementIndex(c,c)]=t[i.getElementIndex(l,l)]=o,t[i.getElementIndex(l,c)]=s,t[i.getElementIndex(c,l)]=-s,t}const w=new i,z=new i;i.computeEigenDecomposition=function(n,t){const e=a.CesiumMath.EPSILON20;let u=0,o=0;r.defined(t)||(t={});const s=t.unitary=i.clone(i.IDENTITY,t.unitary),c=t.diagonal=i.clone(n,t.diagonal),l=e*function(n){let t=0;for(let e=0;e<9;++e){const r=n[e];t+=r*r}return Math.sqrt(t)}(c);for(;o<10&&m(c)>l;)x(c,w),i.transpose(w,z),i.multiply(c,w,c),i.multiply(z,c,c),i.multiply(s,w,s),++u>2&&(++o,u=0);return t},i.abs=function(n,t){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t[3]=Math.abs(n[3]),t[4]=Math.abs(n[4]),t[5]=Math.abs(n[5]),t[6]=Math.abs(n[6]),t[7]=Math.abs(n[7]),t[8]=Math.abs(n[8]),t},i.determinant=function(n){const t=n[0],e=n[3],r=n[6],a=n[1],u=n[4],i=n[7],o=n[2],s=n[5],c=n[8];return t*(u*c-s*i)+a*(s*r-e*c)+o*(e*i-u*r)},i.inverse=function(n,t){const e=n[0],r=n[1],a=n[2],u=n[3],o=n[4],s=n[5],c=n[6],l=n[7],f=n[8],y=i.determinant(n);t[0]=o*f-l*s,t[1]=l*a-r*f,t[2]=r*s-o*a,t[3]=c*s-u*f,t[4]=e*f-c*a,t[5]=u*a-e*s,t[6]=u*l-c*o,t[7]=c*r-e*l,t[8]=e*o-u*r;const d=1/y;return i.multiplyByScalar(t,d,t)};const M=new i;function p(n,t,e,a){this.x=r.defaultValue(n,0),this.y=r.defaultValue(t,0),this.z=r.defaultValue(e,0),this.w=r.defaultValue(a,0)}i.inverseTranspose=function(n,t){return i.inverse(i.transpose(n,M),t)},i.equals=function(n,t){return n===t||r.defined(n)&&r.defined(t)&&n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]&&n[3]===t[3]&&n[4]===t[4]&&n[5]===t[5]&&n[6]===t[6]&&n[7]===t[7]&&n[8]===t[8]},i.equalsEpsilon=function(n,t,e){return e=r.defaultValue(e,0),n===t||r.defined(n)&&r.defined(t)&&Math.abs(n[0]-t[0])<=e&&Math.abs(n[1]-t[1])<=e&&Math.abs(n[2]-t[2])<=e&&Math.abs(n[3]-t[3])<=e&&Math.abs(n[4]-t[4])<=e&&Math.abs(n[5]-t[5])<=e&&Math.abs(n[6]-t[6])<=e&&Math.abs(n[7]-t[7])<=e&&Math.abs(n[8]-t[8])<=e},i.IDENTITY=Object.freeze(new i(1,0,0,0,1,0,0,0,1)),i.ZERO=Object.freeze(new i(0,0,0,0,0,0,0,0,0)),i.COLUMN0ROW0=0,i.COLUMN0ROW1=1,i.COLUMN0ROW2=2,i.COLUMN1ROW0=3,i.COLUMN1ROW1=4,i.COLUMN1ROW2=5,i.COLUMN2ROW0=6,i.COLUMN2ROW1=7,i.COLUMN2ROW2=8,Object.defineProperties(i.prototype,{length:{get:function(){return i.packedLength}}}),i.prototype.clone=function(n){return i.clone(this,n)},i.prototype.equals=function(n){return i.equals(this,n)},i.equalsArray=function(n,t,e){return n[0]===t[e]&&n[1]===t[e+1]&&n[2]===t[e+2]&&n[3]===t[e+3]&&n[4]===t[e+4]&&n[5]===t[e+5]&&n[6]===t[e+6]&&n[7]===t[e+7]&&n[8]===t[e+8]},i.prototype.equalsEpsilon=function(n,t){return i.equalsEpsilon(this,n,t)},i.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})\n(${this[1]}, ${this[4]}, ${this[7]})\n(${this[2]}, ${this[5]}, ${this[8]})`},p.fromElements=function(n,t,e,a,u){return r.defined(u)?(u.x=n,u.y=t,u.z=e,u.w=a,u):new p(n,t,e,a)},p.fromColor=function(n,t){return r.defined(t)?(t.x=n.red,t.y=n.green,t.z=n.blue,t.w=n.alpha,t):new p(n.red,n.green,n.blue,n.alpha)},p.clone=function(n,t){if(r.defined(n))return r.defined(t)?(t.x=n.x,t.y=n.y,t.z=n.z,t.w=n.w,t):new p(n.x,n.y,n.z,n.w)},p.packedLength=4,p.pack=function(n,t,e){return e=r.defaultValue(e,0),t[e++]=n.x,t[e++]=n.y,t[e++]=n.z,t[e]=n.w,t},p.unpack=function(n,t,e){return t=r.defaultValue(t,0),r.defined(e)||(e=new p),e.x=n[t++],e.y=n[t++],e.z=n[t++],e.w=n[t],e},p.packArray=function(n,t){const e=n.length,a=4*e;r.defined(t)?(Array.isArray(t)||t.length===a)&&t.length!==a&&(t.length=a):t=new Array(a);for(let r=0;r<e;++r)p.pack(n[r],t,4*r);return t},p.unpackArray=function(n,t){const e=n.length;r.defined(t)?t.length=e/4:t=new Array(e/4);for(let r=0;r<e;r+=4){const e=r/4;t[e]=p.unpack(n,r,t[e])}return t},p.fromArray=p.unpack,p.maximumComponent=function(n){return Math.max(n.x,n.y,n.z,n.w)},p.minimumComponent=function(n){return Math.min(n.x,n.y,n.z,n.w)},p.minimumByComponent=function(n,t,e){return e.x=Math.min(n.x,t.x),e.y=Math.min(n.y,t.y),e.z=Math.min(n.z,t.z),e.w=Math.min(n.w,t.w),e},p.maximumByComponent=function(n,t,e){return e.x=Math.max(n.x,t.x),e.y=Math.max(n.y,t.y),e.z=Math.max(n.z,t.z),e.w=Math.max(n.w,t.w),e},p.magnitudeSquared=function(n){return n.x*n.x+n.y*n.y+n.z*n.z+n.w*n.w},p.magnitude=function(n){return Math.sqrt(p.magnitudeSquared(n))};const C=new p;p.distance=function(n,t){return p.subtract(n,t,C),p.magnitude(C)},p.distanceSquared=function(n,t){return p.subtract(n,t,C),p.magnitudeSquared(C)},p.normalize=function(n,t){const e=p.magnitude(n);return t.x=n.x/e,t.y=n.y/e,t.z=n.z/e,t.w=n.w/e,t},p.dot=function(n,t){return n.x*t.x+n.y*t.y+n.z*t.z+n.w*t.w},p.multiplyComponents=function(n,t,e){return e.x=n.x*t.x,e.y=n.y*t.y,e.z=n.z*t.z,e.w=n.w*t.w,e},p.divideComponents=function(n,t,e){return e.x=n.x/t.x,e.y=n.y/t.y,e.z=n.z/t.z,e.w=n.w/t.w,e},p.add=function(n,t,e){return e.x=n.x+t.x,e.y=n.y+t.y,e.z=n.z+t.z,e.w=n.w+t.w,e},p.subtract=function(n,t,e){return e.x=n.x-t.x,e.y=n.y-t.y,e.z=n.z-t.z,e.w=n.w-t.w,e},p.multiplyByScalar=function(n,t,e){return e.x=n.x*t,e.y=n.y*t,e.z=n.z*t,e.w=n.w*t,e},p.divideByScalar=function(n,t,e){return e.x=n.x/t,e.y=n.y/t,e.z=n.z/t,e.w=n.w/t,e},p.negate=function(n,t){return t.x=-n.x,t.y=-n.y,t.z=-n.z,t.w=-n.w,t},p.abs=function(n,t){return t.x=Math.abs(n.x),t.y=Math.abs(n.y),t.z=Math.abs(n.z),t.w=Math.abs(n.w),t};const g=new p;p.lerp=function(n,t,e,r){return p.multiplyByScalar(t,e,g),r=p.multiplyByScalar(n,1-e,r),p.add(g,r,r)};const b=new p;p.mostOrthogonalAxis=function(n,t){const e=p.normalize(n,b);return p.abs(e,e),t=e.x<=e.y?e.x<=e.z?e.x<=e.w?p.clone(p.UNIT_X,t):p.clone(p.UNIT_W,t):e.z<=e.w?p.clone(p.UNIT_Z,t):p.clone(p.UNIT_W,t):e.y<=e.z?e.y<=e.w?p.clone(p.UNIT_Y,t):p.clone(p.UNIT_W,t):e.z<=e.w?p.clone(p.UNIT_Z,t):p.clone(p.UNIT_W,t)},p.equals=function(n,t){return n===t||r.defined(n)&&r.defined(t)&&n.x===t.x&&n.y===t.y&&n.z===t.z&&n.w===t.w},p.equalsArray=function(n,t,e){return n.x===t[e]&&n.y===t[e+1]&&n.z===t[e+2]&&n.w===t[e+3]},p.equalsEpsilon=function(n,t,e,u){return n===t||r.defined(n)&&r.defined(t)&&a.CesiumMath.equalsEpsilon(n.x,t.x,e,u)&&a.CesiumMath.equalsEpsilon(n.y,t.y,e,u)&&a.CesiumMath.equalsEpsilon(n.z,t.z,e,u)&&a.CesiumMath.equalsEpsilon(n.w,t.w,e,u)},p.ZERO=Object.freeze(new p(0,0,0,0)),p.ONE=Object.freeze(new p(1,1,1,1)),p.UNIT_X=Object.freeze(new p(1,0,0,0)),p.UNIT_Y=Object.freeze(new p(0,1,0,0)),p.UNIT_Z=Object.freeze(new p(0,0,1,0)),p.UNIT_W=Object.freeze(new p(0,0,0,1)),p.prototype.clone=function(n){return p.clone(this,n)},p.prototype.equals=function(n){return p.equals(this,n)},p.prototype.equalsEpsilon=function(n,t,e){return p.equalsEpsilon(this,n,t,e)},p.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const O=new Float32Array(1),V=new Uint8Array(O.buffer),E=new Uint32Array([287454020]),R=68===new Uint8Array(E.buffer)[0];function N(n,t,e,a,u,i,o,s,c,l,f,y,d,h,m,x){this[0]=r.defaultValue(n,0),this[1]=r.defaultValue(u,0),this[2]=r.defaultValue(c,0),this[3]=r.defaultValue(d,0),this[4]=r.defaultValue(t,0),this[5]=r.defaultValue(i,0),this[6]=r.defaultValue(l,0),this[7]=r.defaultValue(h,0),this[8]=r.defaultValue(e,0),this[9]=r.defaultValue(o,0),this[10]=r.defaultValue(f,0),this[11]=r.defaultValue(m,0),this[12]=r.defaultValue(a,0),this[13]=r.defaultValue(s,0),this[14]=r.defaultValue(y,0),this[15]=r.defaultValue(x,0)}p.packFloat=function(n,t){return r.defined(t)||(t=new p),O[0]=n,R?(t.x=V[0],t.y=V[1],t.z=V[2],t.w=V[3]):(t.x=V[3],t.y=V[2],t.z=V[1],t.w=V[0]),t},p.unpackFloat=function(n){return R?(V[0]=n.x,V[1]=n.y,V[2]=n.z,V[3]=n.w):(V[0]=n.w,V[1]=n.z,V[2]=n.y,V[3]=n.x),O[0]},N.packedLength=16,N.pack=function(n,t,e){return e=r.defaultValue(e,0),t[e++]=n[0],t[e++]=n[1],t[e++]=n[2],t[e++]=n[3],t[e++]=n[4],t[e++]=n[5],t[e++]=n[6],t[e++]=n[7],t[e++]=n[8],t[e++]=n[9],t[e++]=n[10],t[e++]=n[11],t[e++]=n[12],t[e++]=n[13],t[e++]=n[14],t[e]=n[15],t},N.unpack=function(n,t,e){return t=r.defaultValue(t,0),r.defined(e)||(e=new N),e[0]=n[t++],e[1]=n[t++],e[2]=n[t++],e[3]=n[t++],e[4]=n[t++],e[5]=n[t++],e[6]=n[t++],e[7]=n[t++],e[8]=n[t++],e[9]=n[t++],e[10]=n[t++],e[11]=n[t++],e[12]=n[t++],e[13]=n[t++],e[14]=n[t++],e[15]=n[t],e},N.packArray=function(n,t){const e=n.length,a=16*e;r.defined(t)?(Array.isArray(t)||t.length===a)&&t.length!==a&&(t.length=a):t=new Array(a);for(let r=0;r<e;++r)N.pack(n[r],t,16*r);return t},N.unpackArray=function(n,t){const e=n.length;r.defined(t)?t.length=e/16:t=new Array(e/16);for(let r=0;r<e;r+=16){const e=r/16;t[e]=N.unpack(n,r,t[e])}return t},N.clone=function(n,t){if(r.defined(n))return r.defined(t)?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t):new N(n[0],n[4],n[8],n[12],n[1],n[5],n[9],n[13],n[2],n[6],n[10],n[14],n[3],n[7],n[11],n[15])},N.fromArray=N.unpack,N.fromColumnMajorArray=function(n,t){return N.clone(n,t)},N.fromRowMajorArray=function(n,t){return r.defined(t)?(t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15],t):new N(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15])},N.fromRotationTranslation=function(n,e,a){return e=r.defaultValue(e,t.Cartesian3.ZERO),r.defined(a)?(a[0]=n[0],a[1]=n[1],a[2]=n[2],a[3]=0,a[4]=n[3],a[5]=n[4],a[6]=n[5],a[7]=0,a[8]=n[6],a[9]=n[7],a[10]=n[8],a[11]=0,a[12]=e.x,a[13]=e.y,a[14]=e.z,a[15]=1,a):new N(n[0],n[3],n[6],e.x,n[1],n[4],n[7],e.y,n[2],n[5],n[8],e.z,0,0,0,1)},N.fromTranslationQuaternionRotationScale=function(n,t,e,a){r.defined(a)||(a=new N);const u=e.x,i=e.y,o=e.z,s=t.x*t.x,c=t.x*t.y,l=t.x*t.z,f=t.x*t.w,y=t.y*t.y,d=t.y*t.z,h=t.y*t.w,m=t.z*t.z,x=t.z*t.w,w=t.w*t.w,z=s-y-m+w,M=2*(c-x),p=2*(l+h),C=2*(c+x),g=-s+y-m+w,b=2*(d-f),O=2*(l-h),V=2*(d+f),E=-s-y+m+w;return a[0]=z*u,a[1]=C*u,a[2]=O*u,a[3]=0,a[4]=M*i,a[5]=g*i,a[6]=V*i,a[7]=0,a[8]=p*o,a[9]=b*o,a[10]=E*o,a[11]=0,a[12]=n.x,a[13]=n.y,a[14]=n.z,a[15]=1,a},N.fromTranslationRotationScale=function(n,t){return N.fromTranslationQuaternionRotationScale(n.translation,n.rotation,n.scale,t)},N.fromTranslation=function(n,t){return N.fromRotationTranslation(i.IDENTITY,n,t)},N.fromScale=function(n,t){return r.defined(t)?(t[0]=n.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new N(n.x,0,0,0,0,n.y,0,0,0,0,n.z,0,0,0,0,1)},N.fromUniformScale=function(n,t){return r.defined(t)?(t[0]=n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new N(n,0,0,0,0,n,0,0,0,0,n,0,0,0,0,1)},N.fromRotation=function(n,t){return r.defined(t)||(t=new N),t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=0,t[4]=n[3],t[5]=n[4],t[6]=n[5],t[7]=0,t[8]=n[6],t[9]=n[7],t[10]=n[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t};const S=new t.Cartesian3,U=new t.Cartesian3,I=new t.Cartesian3;N.fromCamera=function(n,e){const a=n.position,u=n.direction,i=n.up;t.Cartesian3.normalize(u,S),t.Cartesian3.normalize(t.Cartesian3.cross(S,i,U),U),t.Cartesian3.normalize(t.Cartesian3.cross(U,S,I),I);const o=U.x,s=U.y,c=U.z,l=S.x,f=S.y,y=S.z,d=I.x,h=I.y,m=I.z,x=a.x,w=a.y,z=a.z,M=o*-x+s*-w+c*-z,p=d*-x+h*-w+m*-z,C=l*x+f*w+y*z;return r.defined(e)?(e[0]=o,e[1]=d,e[2]=-l,e[3]=0,e[4]=s,e[5]=h,e[6]=-f,e[7]=0,e[8]=c,e[9]=m,e[10]=-y,e[11]=0,e[12]=M,e[13]=p,e[14]=C,e[15]=1,e):new N(o,s,c,M,d,h,m,p,-l,-f,-y,C,0,0,0,1)},N.computePerspectiveFieldOfView=function(n,t,e,r,a){const u=1/Math.tan(.5*n),i=u/t,o=(r+e)/(e-r),s=2*r*e/(e-r);return a[0]=i,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=u,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=o,a[11]=-1,a[12]=0,a[13]=0,a[14]=s,a[15]=0,a},N.computeOrthographicOffCenter=function(n,t,e,r,a,u,i){let o=1/(t-n),s=1/(r-e),c=1/(u-a);const l=-(t+n)*o,f=-(r+e)*s,y=-(u+a)*c;return o*=2,s*=2,c*=-2,i[0]=o,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=s,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=c,i[11]=0,i[12]=l,i[13]=f,i[14]=y,i[15]=1,i},N.computePerspectiveOffCenter=function(n,t,e,r,a,u,i){const o=2*a/(t-n),s=2*a/(r-e),c=(t+n)/(t-n),l=(r+e)/(r-e),f=-(u+a)/(u-a),y=-2*u*a/(u-a);return i[0]=o,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=s,i[6]=0,i[7]=0,i[8]=c,i[9]=l,i[10]=f,i[11]=-1,i[12]=0,i[13]=0,i[14]=y,i[15]=0,i},N.computeInfinitePerspectiveOffCenter=function(n,t,e,r,a,u){const i=2*a/(t-n),o=2*a/(r-e),s=(t+n)/(t-n),c=(r+e)/(r-e),l=-2*a;return u[0]=i,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=o,u[6]=0,u[7]=0,u[8]=s,u[9]=c,u[10]=-1,u[11]=-1,u[12]=0,u[13]=0,u[14]=l,u[15]=0,u},N.computeViewportTransformation=function(n,t,e,a){r.defined(a)||(a=new N),n=r.defaultValue(n,r.defaultValue.EMPTY_OBJECT);const u=r.defaultValue(n.x,0),i=r.defaultValue(n.y,0),o=r.defaultValue(n.width,0),s=r.defaultValue(n.height,0);t=r.defaultValue(t,0);const c=.5*o,l=.5*s,f=.5*((e=r.defaultValue(e,1))-t),y=c,d=l,h=f,m=u+c,x=i+l,w=t+f;return a[0]=y,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=d,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=h,a[11]=0,a[12]=m,a[13]=x,a[14]=w,a[15]=1,a},N.computeView=function(n,e,r,a,u){return u[0]=a.x,u[1]=r.x,u[2]=-e.x,u[3]=0,u[4]=a.y,u[5]=r.y,u[6]=-e.y,u[7]=0,u[8]=a.z,u[9]=r.z,u[10]=-e.z,u[11]=0,u[12]=-t.Cartesian3.dot(a,n),u[13]=-t.Cartesian3.dot(r,n),u[14]=t.Cartesian3.dot(e,n),u[15]=1,u},N.toArray=function(n,t){return r.defined(t)?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t):[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]]},N.getElementIndex=function(n,t){return 4*n+t},N.getColumn=function(n,t,e){const r=4*t,a=n[r],u=n[r+1],i=n[r+2],o=n[r+3];return e.x=a,e.y=u,e.z=i,e.w=o,e},N.setColumn=function(n,t,e,r){const a=4*t;return(r=N.clone(n,r))[a]=e.x,r[a+1]=e.y,r[a+2]=e.z,r[a+3]=e.w,r},N.getRow=function(n,t,e){const r=n[t],a=n[t+4],u=n[t+8],i=n[t+12];return e.x=r,e.y=a,e.z=u,e.w=i,e},N.setRow=function(n,t,e,r){return(r=N.clone(n,r))[t]=e.x,r[t+4]=e.y,r[t+8]=e.z,r[t+12]=e.w,r},N.setTranslation=function(n,t,e){return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=t.x,e[13]=t.y,e[14]=t.z,e[15]=n[15],e};const T=new t.Cartesian3;N.setScale=function(n,t,e){const r=N.getScale(n,T),a=t.x/r.x,u=t.y/r.y,i=t.z/r.y;return e[0]=n[0]*a,e[1]=n[1]*a,e[2]=n[2]*a,e[3]=n[3],e[4]=n[4]*u,e[5]=n[5]*u,e[6]=n[6]*u,e[7]=n[7],e[8]=n[8]*i,e[9]=n[9]*i,e[10]=n[10]*i,e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e};const q=new t.Cartesian3;N.setUniformScale=function(n,t,e){const r=N.getScale(n,q),a=t/r.x,u=t/r.y,i=t/r.z;return e[0]=n[0]*a,e[1]=n[1]*a,e[2]=n[2]*a,e[3]=n[3],e[4]=n[4]*u,e[5]=n[5]*u,e[6]=n[6]*u,e[7]=n[7],e[8]=n[8]*i,e[9]=n[9]*i,e[10]=n[10]*i,e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e};const A=new t.Cartesian3;N.getScale=function(n,e){return e.x=t.Cartesian3.magnitude(t.Cartesian3.fromElements(n[0],n[1],n[2],A)),e.y=t.Cartesian3.magnitude(t.Cartesian3.fromElements(n[4],n[5],n[6],A)),e.z=t.Cartesian3.magnitude(t.Cartesian3.fromElements(n[8],n[9],n[10],A)),e};const L=new t.Cartesian3;N.getMaximumScale=function(n){return N.getScale(n,L),t.Cartesian3.maximumComponent(L)};const W=new t.Cartesian3;N.setRotation=function(n,t,e){const r=N.getScale(n,W);return e[0]=t[0]*r.x,e[1]=t[1]*r.x,e[2]=t[2]*r.x,e[3]=n[3],e[4]=t[3]*r.y,e[5]=t[4]*r.y,e[6]=t[5]*r.y,e[7]=n[7],e[8]=t[6]*r.z,e[9]=t[7]*r.z,e[10]=t[8]*r.z,e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e};const k=new t.Cartesian3;N.getRotation=function(n,t){const e=N.getScale(n,k);return t[0]=n[0]/e.x,t[1]=n[1]/e.x,t[2]=n[2]/e.x,t[3]=n[4]/e.y,t[4]=n[5]/e.y,t[5]=n[6]/e.y,t[6]=n[8]/e.z,t[7]=n[9]/e.z,t[8]=n[10]/e.z,t},N.multiply=function(n,t,e){const r=n[0],a=n[1],u=n[2],i=n[3],o=n[4],s=n[5],c=n[6],l=n[7],f=n[8],y=n[9],d=n[10],h=n[11],m=n[12],x=n[13],w=n[14],z=n[15],M=t[0],p=t[1],C=t[2],g=t[3],b=t[4],O=t[5],V=t[6],E=t[7],R=t[8],N=t[9],S=t[10],U=t[11],I=t[12],T=t[13],q=t[14],A=t[15],L=r*M+o*p+f*C+m*g,W=a*M+s*p+y*C+x*g,k=u*M+c*p+d*C+w*g,$=i*M+l*p+h*C+z*g,B=r*b+o*O+f*V+m*E,j=a*b+s*O+y*V+x*E,P=u*b+c*O+d*V+w*E,v=i*b+l*O+h*V+z*E,_=r*R+o*N+f*S+m*U,Y=a*R+s*N+y*S+x*U,Z=u*R+c*N+d*S+w*U,D=i*R+l*N+h*S+z*U,F=r*I+o*T+f*q+m*A,Q=a*I+s*T+y*q+x*A,X=u*I+c*T+d*q+w*A,H=i*I+l*T+h*q+z*A;return e[0]=L,e[1]=W,e[2]=k,e[3]=$,e[4]=B,e[5]=j,e[6]=P,e[7]=v,e[8]=_,e[9]=Y,e[10]=Z,e[11]=D,e[12]=F,e[13]=Q,e[14]=X,e[15]=H,e},N.add=function(n,t,e){return e[0]=n[0]+t[0],e[1]=n[1]+t[1],e[2]=n[2]+t[2],e[3]=n[3]+t[3],e[4]=n[4]+t[4],e[5]=n[5]+t[5],e[6]=n[6]+t[6],e[7]=n[7]+t[7],e[8]=n[8]+t[8],e[9]=n[9]+t[9],e[10]=n[10]+t[10],e[11]=n[11]+t[11],e[12]=n[12]+t[12],e[13]=n[13]+t[13],e[14]=n[14]+t[14],e[15]=n[15]+t[15],e},N.subtract=function(n,t,e){return e[0]=n[0]-t[0],e[1]=n[1]-t[1],e[2]=n[2]-t[2],e[3]=n[3]-t[3],e[4]=n[4]-t[4],e[5]=n[5]-t[5],e[6]=n[6]-t[6],e[7]=n[7]-t[7],e[8]=n[8]-t[8],e[9]=n[9]-t[9],e[10]=n[10]-t[10],e[11]=n[11]-t[11],e[12]=n[12]-t[12],e[13]=n[13]-t[13],e[14]=n[14]-t[14],e[15]=n[15]-t[15],e},N.multiplyTransformation=function(n,t,e){const r=n[0],a=n[1],u=n[2],i=n[4],o=n[5],s=n[6],c=n[8],l=n[9],f=n[10],y=n[12],d=n[13],h=n[14],m=t[0],x=t[1],w=t[2],z=t[4],M=t[5],p=t[6],C=t[8],g=t[9],b=t[10],O=t[12],V=t[13],E=t[14],R=r*m+i*x+c*w,N=a*m+o*x+l*w,S=u*m+s*x+f*w,U=r*z+i*M+c*p,I=a*z+o*M+l*p,T=u*z+s*M+f*p,q=r*C+i*g+c*b,A=a*C+o*g+l*b,L=u*C+s*g+f*b,W=r*O+i*V+c*E+y,k=a*O+o*V+l*E+d,$=u*O+s*V+f*E+h;return e[0]=R,e[1]=N,e[2]=S,e[3]=0,e[4]=U,e[5]=I,e[6]=T,e[7]=0,e[8]=q,e[9]=A,e[10]=L,e[11]=0,e[12]=W,e[13]=k,e[14]=$,e[15]=1,e},N.multiplyByMatrix3=function(n,t,e){const r=n[0],a=n[1],u=n[2],i=n[4],o=n[5],s=n[6],c=n[8],l=n[9],f=n[10],y=t[0],d=t[1],h=t[2],m=t[3],x=t[4],w=t[5],z=t[6],M=t[7],p=t[8],C=r*y+i*d+c*h,g=a*y+o*d+l*h,b=u*y+s*d+f*h,O=r*m+i*x+c*w,V=a*m+o*x+l*w,E=u*m+s*x+f*w,R=r*z+i*M+c*p,N=a*z+o*M+l*p,S=u*z+s*M+f*p;return e[0]=C,e[1]=g,e[2]=b,e[3]=0,e[4]=O,e[5]=V,e[6]=E,e[7]=0,e[8]=R,e[9]=N,e[10]=S,e[11]=0,e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e},N.multiplyByTranslation=function(n,t,e){const r=t.x,a=t.y,u=t.z,i=r*n[0]+a*n[4]+u*n[8]+n[12],o=r*n[1]+a*n[5]+u*n[9]+n[13],s=r*n[2]+a*n[6]+u*n[10]+n[14];return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=i,e[13]=o,e[14]=s,e[15]=n[15],e},N.multiplyByScale=function(n,t,e){const r=t.x,a=t.y,u=t.z;return 1===r&&1===a&&1===u?N.clone(n,e):(e[0]=r*n[0],e[1]=r*n[1],e[2]=r*n[2],e[3]=n[3],e[4]=a*n[4],e[5]=a*n[5],e[6]=a*n[6],e[7]=n[7],e[8]=u*n[8],e[9]=u*n[9],e[10]=u*n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e)},N.multiplyByUniformScale=function(n,t,e){return e[0]=n[0]*t,e[1]=n[1]*t,e[2]=n[2]*t,e[3]=n[3],e[4]=n[4]*t,e[5]=n[5]*t,e[6]=n[6]*t,e[7]=n[7],e[8]=n[8]*t,e[9]=n[9]*t,e[10]=n[10]*t,e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e},N.multiplyByVector=function(n,t,e){const r=t.x,a=t.y,u=t.z,i=t.w,o=n[0]*r+n[4]*a+n[8]*u+n[12]*i,s=n[1]*r+n[5]*a+n[9]*u+n[13]*i,c=n[2]*r+n[6]*a+n[10]*u+n[14]*i,l=n[3]*r+n[7]*a+n[11]*u+n[15]*i;return e.x=o,e.y=s,e.z=c,e.w=l,e},N.multiplyByPointAsVector=function(n,t,e){const r=t.x,a=t.y,u=t.z,i=n[0]*r+n[4]*a+n[8]*u,o=n[1]*r+n[5]*a+n[9]*u,s=n[2]*r+n[6]*a+n[10]*u;return e.x=i,e.y=o,e.z=s,e},N.multiplyByPoint=function(n,t,e){const r=t.x,a=t.y,u=t.z,i=n[0]*r+n[4]*a+n[8]*u+n[12],o=n[1]*r+n[5]*a+n[9]*u+n[13],s=n[2]*r+n[6]*a+n[10]*u+n[14];return e.x=i,e.y=o,e.z=s,e},N.multiplyByScalar=function(n,t,e){return e[0]=n[0]*t,e[1]=n[1]*t,e[2]=n[2]*t,e[3]=n[3]*t,e[4]=n[4]*t,e[5]=n[5]*t,e[6]=n[6]*t,e[7]=n[7]*t,e[8]=n[8]*t,e[9]=n[9]*t,e[10]=n[10]*t,e[11]=n[11]*t,e[12]=n[12]*t,e[13]=n[13]*t,e[14]=n[14]*t,e[15]=n[15]*t,e},N.negate=function(n,t){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t[4]=-n[4],t[5]=-n[5],t[6]=-n[6],t[7]=-n[7],t[8]=-n[8],t[9]=-n[9],t[10]=-n[10],t[11]=-n[11],t[12]=-n[12],t[13]=-n[13],t[14]=-n[14],t[15]=-n[15],t},N.transpose=function(n,t){const e=n[1],r=n[2],a=n[3],u=n[6],i=n[7],o=n[11];return t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=e,t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=u,t[10]=n[10],t[11]=n[14],t[12]=a,t[13]=i,t[14]=o,t[15]=n[15],t},N.abs=function(n,t){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t[3]=Math.abs(n[3]),t[4]=Math.abs(n[4]),t[5]=Math.abs(n[5]),t[6]=Math.abs(n[6]),t[7]=Math.abs(n[7]),t[8]=Math.abs(n[8]),t[9]=Math.abs(n[9]),t[10]=Math.abs(n[10]),t[11]=Math.abs(n[11]),t[12]=Math.abs(n[12]),t[13]=Math.abs(n[13]),t[14]=Math.abs(n[14]),t[15]=Math.abs(n[15]),t},N.equals=function(n,t){return n===t||r.defined(n)&&r.defined(t)&&n[12]===t[12]&&n[13]===t[13]&&n[14]===t[14]&&n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]&&n[4]===t[4]&&n[5]===t[5]&&n[6]===t[6]&&n[8]===t[8]&&n[9]===t[9]&&n[10]===t[10]&&n[3]===t[3]&&n[7]===t[7]&&n[11]===t[11]&&n[15]===t[15]},N.equalsEpsilon=function(n,t,e){return e=r.defaultValue(e,0),n===t||r.defined(n)&&r.defined(t)&&Math.abs(n[0]-t[0])<=e&&Math.abs(n[1]-t[1])<=e&&Math.abs(n[2]-t[2])<=e&&Math.abs(n[3]-t[3])<=e&&Math.abs(n[4]-t[4])<=e&&Math.abs(n[5]-t[5])<=e&&Math.abs(n[6]-t[6])<=e&&Math.abs(n[7]-t[7])<=e&&Math.abs(n[8]-t[8])<=e&&Math.abs(n[9]-t[9])<=e&&Math.abs(n[10]-t[10])<=e&&Math.abs(n[11]-t[11])<=e&&Math.abs(n[12]-t[12])<=e&&Math.abs(n[13]-t[13])<=e&&Math.abs(n[14]-t[14])<=e&&Math.abs(n[15]-t[15])<=e},N.getTranslation=function(n,t){return t.x=n[12],t.y=n[13],t.z=n[14],t},N.getMatrix3=function(n,t){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t};const $=new i,B=new i,j=new p,P=new p(0,0,0,1);N.inverse=function(n,t){const e=n[0],r=n[4],o=n[8],s=n[12],c=n[1],l=n[5],f=n[9],y=n[13],d=n[2],h=n[6],m=n[10],x=n[14],w=n[3],z=n[7],M=n[11],C=n[15];let g=m*C,b=x*M,O=h*C,V=x*z,E=h*M,R=m*z,S=d*C,U=x*w,I=d*M,T=m*w,q=d*z,A=h*w;const L=g*l+V*f+E*y-(b*l+O*f+R*y),W=b*c+S*f+T*y-(g*c+U*f+I*y),k=O*c+U*l+q*y-(V*c+S*l+A*y),v=R*c+I*l+A*f-(E*c+T*l+q*f),_=b*r+O*o+R*s-(g*r+V*o+E*s),Y=g*e+U*o+I*s-(b*e+S*o+T*s),Z=V*e+S*r+A*s-(O*e+U*r+q*s),D=E*e+T*r+q*o-(R*e+I*r+A*o);g=o*y,b=s*f,O=r*y,V=s*l,E=r*f,R=o*l,S=e*y,U=s*c,I=e*f,T=o*c,q=e*l,A=r*c;const F=g*z+V*M+E*C-(b*z+O*M+R*C),Q=b*w+S*M+T*C-(g*w+U*M+I*C),X=O*w+U*z+q*C-(V*w+S*z+A*C),H=R*w+I*z+A*M-(E*w+T*z+q*M),J=O*m+R*x+b*h-(E*x+g*h+V*m),G=I*x+g*d+U*m-(S*m+T*x+b*d),K=S*h+A*x+V*d-(q*x+O*d+U*h),nn=q*m+E*d+T*h-(I*h+A*m+R*d);let tn=e*L+r*W+o*k+s*v;if(Math.abs(tn)<a.CesiumMath.EPSILON21){if(i.equalsEpsilon(N.getMatrix3(n,$),B,a.CesiumMath.EPSILON7)&&p.equals(N.getRow(n,3,j),P))return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=-n[12],t[13]=-n[13],t[14]=-n[14],t[15]=1,t;throw new u.RuntimeError("matrix is not invertible because its determinate is zero.")}return tn=1/tn,t[0]=L*tn,t[1]=W*tn,t[2]=k*tn,t[3]=v*tn,t[4]=_*tn,t[5]=Y*tn,t[6]=Z*tn,t[7]=D*tn,t[8]=F*tn,t[9]=Q*tn,t[10]=X*tn,t[11]=H*tn,t[12]=J*tn,t[13]=G*tn,t[14]=K*tn,t[15]=nn*tn,t},N.inverseTransformation=function(n,t){const e=n[0],r=n[1],a=n[2],u=n[4],i=n[5],o=n[6],s=n[8],c=n[9],l=n[10],f=n[12],y=n[13],d=n[14],h=-e*f-r*y-a*d,m=-u*f-i*y-o*d,x=-s*f-c*y-l*d;return t[0]=e,t[1]=u,t[2]=s,t[3]=0,t[4]=r,t[5]=i,t[6]=c,t[7]=0,t[8]=a,t[9]=o,t[10]=l,t[11]=0,t[12]=h,t[13]=m,t[14]=x,t[15]=1,t};const v=new N;N.inverseTranspose=function(n,t){return N.inverse(N.transpose(n,v),t)},N.IDENTITY=Object.freeze(new N(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),N.ZERO=Object.freeze(new N(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),N.COLUMN0ROW0=0,N.COLUMN0ROW1=1,N.COLUMN0ROW2=2,N.COLUMN0ROW3=3,N.COLUMN1ROW0=4,N.COLUMN1ROW1=5,N.COLUMN1ROW2=6,N.COLUMN1ROW3=7,N.COLUMN2ROW0=8,N.COLUMN2ROW1=9,N.COLUMN2ROW2=10,N.COLUMN2ROW3=11,N.COLUMN3ROW0=12,N.COLUMN3ROW1=13,N.COLUMN3ROW2=14,N.COLUMN3ROW3=15,Object.defineProperties(N.prototype,{length:{get:function(){return N.packedLength}}}),N.prototype.clone=function(n){return N.clone(this,n)},N.prototype.equals=function(n){return N.equals(this,n)},N.equalsArray=function(n,t,e){return n[0]===t[e]&&n[1]===t[e+1]&&n[2]===t[e+2]&&n[3]===t[e+3]&&n[4]===t[e+4]&&n[5]===t[e+5]&&n[6]===t[e+6]&&n[7]===t[e+7]&&n[8]===t[e+8]&&n[9]===t[e+9]&&n[10]===t[e+10]&&n[11]===t[e+11]&&n[12]===t[e+12]&&n[13]===t[e+13]&&n[14]===t[e+14]&&n[15]===t[e+15]},N.prototype.equalsEpsilon=function(n,t){return N.equalsEpsilon(this,n,t)},N.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})\n(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})\n(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})\n(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`},n.Cartesian4=p,n.Matrix3=i,n.Matrix4=N}));