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;rr&&(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