/*! For license information please see vd_rematrix.js.LICENSE.txt */
!function(n){var t={};function r(e){if(t[e])return t[e].exports;var u=t[e]={i:e,l:!1,exports:{}};return n[e].call(u.exports,u,u.exports,r),u.l=!0,u.exports}r.m=n,r.c=t,r.d=function(n,t,e){r.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:e})},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,t){if(1&t&&(n=r(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var u in n)r.d(e,u,function(t){return n[t]}.bind(null,u));return e},r.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(t,"a",t),t},r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.p="",r(r.s=644)}({644:function(n,t,r){"use strict";r.r(t),r.d(t,"Rematrix",(function(){return e}));var e={};function u(n){if(n&&n.constructor===Array){var t=n.filter((function(n){return"number"==typeof n})).filter((function(n){return!isNaN(n)}));if(6===n.length&&6===t.length){var r=i();return r[0]=t[0],r[1]=t[1],r[4]=t[2],r[5]=t[3],r[12]=t[4],r[13]=t[5],r}if(16===n.length&&16===t.length)return n}throw new TypeError("Expected a `number[]` with length 6 or 16.")}function o(n){if("string"==typeof n){var t=n.match(/matrix(3d)?\(([^)]+)\)/);if(t)return u(t[2].split(",").map(parseFloat));if("none"===n||""===n)return i()}throw new TypeError("Expected a string containing `matrix()` or `matrix3d()")}function i(){for(var n=[],t=0;t<16;t++)t%5==0?n.push(1):n.push(0);return n}function a(n){var t=u(n),r=t[0]*t[5]-t[4]*t[1],e=t[0]*t[6]-t[4]*t[2],o=t[0]*t[7]-t[4]*t[3],i=t[1]*t[6]-t[5]*t[2],a=t[1]*t[7]-t[5]*t[3],f=t[2]*t[7]-t[6]*t[3],c=t[10]*t[15]-t[14]*t[11],d=t[9]*t[15]-t[13]*t[11],l=t[9]*t[14]-t[13]*t[10],s=t[8]*t[15]-t[12]*t[11],v=t[8]*t[14]-t[12]*t[10],p=t[8]*t[13]-t[12]*t[9],h=1/(r*c-e*d+o*l+i*s-a*v+f*p);if(isNaN(h)||h===1/0)throw new Error("Inverse determinant attempted to divide by zero.");return[(t[5]*c-t[6]*d+t[7]*l)*h,(-t[1]*c+t[2]*d-t[3]*l)*h,(t[13]*f-t[14]*a+t[15]*i)*h,(-t[9]*f+t[10]*a-t[11]*i)*h,(-t[4]*c+t[6]*s-t[7]*v)*h,(t[0]*c-t[2]*s+t[3]*v)*h,(-t[12]*f+t[14]*o-t[15]*e)*h,(t[8]*f-t[10]*o+t[11]*e)*h,(t[4]*d-t[5]*s+t[7]*p)*h,(-t[0]*d+t[1]*s-t[3]*p)*h,(t[12]*a-t[13]*o+t[15]*r)*h,(-t[8]*a+t[9]*o-t[11]*r)*h,(-t[4]*l+t[5]*v-t[6]*p)*h,(t[0]*l-t[1]*v+t[2]*p)*h,(-t[12]*i+t[13]*e-t[14]*r)*h,(t[8]*i-t[9]*e+t[10]*r)*h]}function f(n,t){for(var r=u(n),e=u(t),o=[],i=0;i<4;i++)for(var a=[r[i],r[i+4],r[i+8],r[i+12]],f=0;f<4;f++){var c=4*f,d=[e[c],e[c+1],e[c+2],e[c+3]],l=a[0]*d[0]+a[1]*d[1]+a[2]*d[2]+a[3]*d[3];o[i+c]=l}return o}function c(n){var t=i();return t[11]=-1/n,t}function d(n){return v(n)}function l(n){var t=Math.PI/180*n,r=i();return r[5]=r[10]=Math.cos(t),r[6]=r[9]=Math.sin(t),r[9]*=-1,r}function s(n){var t=Math.PI/180*n,r=i();return r[0]=r[10]=Math.cos(t),r[2]=r[8]=Math.sin(t),r[2]*=-1,r}function v(n){var t=Math.PI/180*n,r=i();return r[0]=r[5]=Math.cos(t),r[1]=r[4]=Math.sin(t),r[4]*=-1,r}function p(n,t){var r=i();return r[0]=n,r[5]="number"==typeof t?t:n,r}function h(n){var t=i();return t[0]=n,t}function m(n){var t=i();return t[5]=n,t}function y(n){var t=i();return t[10]=n,t}function M(n,t){var r=Math.PI/180*n,e=i();if(e[4]=Math.tan(r),t){var u=Math.PI/180*t;e[1]=Math.tan(u)}return e}function b(n){var t=Math.PI/180*n,r=i();return r[4]=Math.tan(t),r}function g(n){var t=Math.PI/180*n,r=i();return r[1]=Math.tan(t),r}function x(n){return"matrix3d("+u(n).join(", ")+")"}function w(n,t){var r=i();return r[12]=n,t&&(r[13]=t),r}function P(n,t,r){var e=i();return void 0!==n&&void 0!==t&&void 0!==r&&(e[12]=n,e[13]=t,e[14]=r),e}function j(n){var t=i();return t[12]=n,t}function I(n){var t=i();return t[13]=n,t}function S(n){var t=i();return t[14]=n,t}r.r(e),r.d(e,"format",(function(){return u})),r.d(e,"fromString",(function(){return o})),r.d(e,"identity",(function(){return i})),r.d(e,"inverse",(function(){return a})),r.d(e,"multiply",(function(){return f})),r.d(e,"perspective",(function(){return c})),r.d(e,"rotate",(function(){return d})),r.d(e,"rotateX",(function(){return l})),r.d(e,"rotateY",(function(){return s})),r.d(e,"rotateZ",(function(){return v})),r.d(e,"scale",(function(){return p})),r.d(e,"scaleX",(function(){return h})),r.d(e,"scaleY",(function(){return m})),r.d(e,"scaleZ",(function(){return y})),r.d(e,"skew",(function(){return M})),r.d(e,"skewX",(function(){return b})),r.d(e,"skewY",(function(){return g})),r.d(e,"toString",(function(){return x})),r.d(e,"translate",(function(){return w})),r.d(e,"translate3d",(function(){return P})),r.d(e,"translateX",(function(){return j})),r.d(e,"translateY",(function(){return I})),r.d(e,"translateZ",(function(){return S})),console.log("Loaded -- JS Rematrix"),window.Rematrix=e}});
//# sourceMappingURL=vd_rematrix.js.map