transformation-matrix
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -10,3 +10,3 @@ "use strict"; | ||
// Generated by PEG.js v0.11.0-master.30f3260, https://pegjs.org/ | ||
// Generated by PEG.js v0.11.0-master.b7b87ea, https://pegjs.org/ | ||
function peg$subclass(child, parent) { | ||
@@ -35,3 +35,3 @@ function C() { | ||
peg$SyntaxError.buildMessage = function (expected, found) { | ||
peg$SyntaxError.buildMessage = function (expected, found, location) { | ||
var DESCRIBE_EXPECTATION_FNS = { | ||
@@ -433,3 +433,3 @@ literal: function (expectation) { | ||
function peg$buildStructuredError(expected, found, location) { | ||
return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location); | ||
return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found, location), expected, found, location); | ||
} | ||
@@ -436,0 +436,0 @@ |
@@ -11,2 +11,3 @@ "use strict"; | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _applyToPoint[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -24,2 +25,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _fromObject[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -37,2 +39,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _fromString[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -50,2 +53,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _identity[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -63,2 +67,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _inverse[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -76,2 +81,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _isAffineMatrix[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -89,2 +95,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _rotate[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -102,2 +109,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _scale[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -115,2 +123,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _shear[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -128,2 +137,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _skew[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -141,2 +151,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _toString[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -154,2 +165,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _transform[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -167,2 +179,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _translate[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -180,2 +193,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _fromTriangles[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -193,2 +207,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _smoothMatrix[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -206,2 +221,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _fromDefinition[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -219,2 +235,3 @@ enumerable: true, | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _fromTransformAttribute[key]) return; | ||
Object.defineProperty(exports, key, { | ||
@@ -221,0 +238,0 @@ enumerable: true, |
@@ -10,94 +10,10 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
root["TransformationMatrix"] = factory(); | ||
})(window, function() { | ||
return /******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ | ||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) { | ||
/******/ return installedModules[moduleId].exports; | ||
/******/ } | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ i: moduleId, | ||
/******/ l: false, | ||
/******/ exports: {} | ||
/******/ }; | ||
/******/ | ||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
/******/ | ||
/******/ // Flag the module as loaded | ||
/******/ module.l = true; | ||
/******/ | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ | ||
/******/ | ||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
/******/ | ||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
/******/ | ||
/******/ // define getter function for harmony exports | ||
/******/ __webpack_require__.d = function(exports, name, getter) { | ||
/******/ if(!__webpack_require__.o(exports, name)) { | ||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); | ||
/******/ } | ||
/******/ }; | ||
/******/ | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = function(exports) { | ||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | ||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
/******/ } | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ | ||
/******/ // create a fake namespace object | ||
/******/ // mode & 1: value is a module id, require it | ||
/******/ // mode & 2: merge all properties of value into the ns | ||
/******/ // mode & 4: return value when already ns object | ||
/******/ // mode & 8|1: behave like require | ||
/******/ __webpack_require__.t = function(value, mode) { | ||
/******/ if(mode & 1) value = __webpack_require__(value); | ||
/******/ if(mode & 8) return value; | ||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; | ||
/******/ var ns = Object.create(null); | ||
/******/ __webpack_require__.r(ns); | ||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); | ||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); | ||
/******/ return ns; | ||
/******/ }; | ||
/******/ | ||
/******/ // getDefaultExport function for compatibility with non-harmony modules | ||
/******/ __webpack_require__.n = function(module) { | ||
/******/ var getter = module && module.__esModule ? | ||
/******/ function getDefault() { return module['default']; } : | ||
/******/ function getModuleExports() { return module; }; | ||
/******/ __webpack_require__.d(getter, 'a', getter); | ||
/******/ return getter; | ||
/******/ }; | ||
/******/ | ||
/******/ // Object.prototype.hasOwnProperty.call | ||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; | ||
/******/ | ||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
/******/ | ||
/******/ | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 0); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
})(self, function() { | ||
return /******/ (() => { // webpackBootstrap | ||
/******/ "use strict"; | ||
/******/ var __webpack_modules__ = ({ | ||
"use strict"; | ||
/***/ 947: | ||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | ||
// ESM COMPAT FLAG | ||
@@ -107,25 +23,27 @@ __webpack_require__.r(__webpack_exports__); | ||
// EXPORTS | ||
__webpack_require__.d(__webpack_exports__, "applyToPoint", function() { return /* reexport */ applyToPoint; }); | ||
__webpack_require__.d(__webpack_exports__, "applyToPoints", function() { return /* reexport */ applyToPoints; }); | ||
__webpack_require__.d(__webpack_exports__, "fromObject", function() { return /* reexport */ fromObject; }); | ||
__webpack_require__.d(__webpack_exports__, "fromString", function() { return /* reexport */ fromString; }); | ||
__webpack_require__.d(__webpack_exports__, "identity", function() { return /* reexport */ identity; }); | ||
__webpack_require__.d(__webpack_exports__, "inverse", function() { return /* reexport */ inverse; }); | ||
__webpack_require__.d(__webpack_exports__, "isAffineMatrix", function() { return /* reexport */ isAffineMatrix; }); | ||
__webpack_require__.d(__webpack_exports__, "rotate", function() { return /* reexport */ rotate; }); | ||
__webpack_require__.d(__webpack_exports__, "rotateDEG", function() { return /* reexport */ rotateDEG; }); | ||
__webpack_require__.d(__webpack_exports__, "scale", function() { return /* reexport */ scale; }); | ||
__webpack_require__.d(__webpack_exports__, "shear", function() { return /* reexport */ shear; }); | ||
__webpack_require__.d(__webpack_exports__, "skew", function() { return /* reexport */ skew; }); | ||
__webpack_require__.d(__webpack_exports__, "skewDEG", function() { return /* reexport */ skewDEG; }); | ||
__webpack_require__.d(__webpack_exports__, "toCSS", function() { return /* reexport */ toCSS; }); | ||
__webpack_require__.d(__webpack_exports__, "toSVG", function() { return /* reexport */ toSVG; }); | ||
__webpack_require__.d(__webpack_exports__, "toString", function() { return /* reexport */ toString_toString; }); | ||
__webpack_require__.d(__webpack_exports__, "transform", function() { return /* reexport */ transform; }); | ||
__webpack_require__.d(__webpack_exports__, "compose", function() { return /* reexport */ compose; }); | ||
__webpack_require__.d(__webpack_exports__, "translate", function() { return /* reexport */ translate; }); | ||
__webpack_require__.d(__webpack_exports__, "fromTriangles", function() { return /* reexport */ fromTriangles; }); | ||
__webpack_require__.d(__webpack_exports__, "smoothMatrix", function() { return /* reexport */ smoothMatrix; }); | ||
__webpack_require__.d(__webpack_exports__, "fromDefinition", function() { return /* reexport */ fromDefinition; }); | ||
__webpack_require__.d(__webpack_exports__, "fromTransformAttribute", function() { return /* reexport */ fromTransformAttribute; }); | ||
__webpack_require__.d(__webpack_exports__, { | ||
"applyToPoint": () => /* reexport */ applyToPoint, | ||
"applyToPoints": () => /* reexport */ applyToPoints, | ||
"compose": () => /* reexport */ compose, | ||
"fromDefinition": () => /* reexport */ fromDefinition, | ||
"fromObject": () => /* reexport */ fromObject, | ||
"fromString": () => /* reexport */ fromString, | ||
"fromTransformAttribute": () => /* reexport */ fromTransformAttribute, | ||
"fromTriangles": () => /* reexport */ fromTriangles, | ||
"identity": () => /* reexport */ identity, | ||
"inverse": () => /* reexport */ inverse, | ||
"isAffineMatrix": () => /* reexport */ isAffineMatrix, | ||
"rotate": () => /* reexport */ rotate, | ||
"rotateDEG": () => /* reexport */ rotateDEG, | ||
"scale": () => /* reexport */ scale, | ||
"shear": () => /* reexport */ shear, | ||
"skew": () => /* reexport */ skew, | ||
"skewDEG": () => /* reexport */ skewDEG, | ||
"smoothMatrix": () => /* reexport */ smoothMatrix, | ||
"toCSS": () => /* reexport */ toCSS, | ||
"toSVG": () => /* reexport */ toSVG, | ||
"toString": () => /* reexport */ toString_toString, | ||
"transform": () => /* reexport */ transform, | ||
"translate": () => /* reexport */ translate | ||
}); | ||
@@ -298,3 +216,3 @@ // CONCATENATED MODULE: ./src/applyToPoint.js | ||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
@@ -665,3 +583,3 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } | ||
// CONCATENATED MODULE: ./src/fromTransformAttribute.autogenerated.js | ||
// Generated by PEG.js v0.11.0-master.30f3260, https://pegjs.org/ | ||
// Generated by PEG.js v0.11.0-master.b7b87ea, https://pegjs.org/ | ||
function peg$subclass(child, parent) { | ||
@@ -690,3 +608,3 @@ function C() { | ||
peg$SyntaxError.buildMessage = function (expected, found) { | ||
peg$SyntaxError.buildMessage = function (expected, found, location) { | ||
var DESCRIBE_EXPECTATION_FNS = { | ||
@@ -1088,3 +1006,3 @@ literal: function literal(expectation) { | ||
function peg$buildStructuredError(expected, found, location) { | ||
return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location); | ||
return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found, location), expected, found, location); | ||
} | ||
@@ -2309,3 +2227,3 @@ | ||
/* harmony default export */ var fromTransformAttribute_autogenerated = ({ | ||
/* harmony default export */ const fromTransformAttribute_autogenerated = ({ | ||
SyntaxError: peg$SyntaxError, | ||
@@ -2357,4 +2275,65 @@ parse: peg$parse | ||
/***/ }) | ||
/******/ ]); | ||
/******/ }); | ||
/************************************************************************/ | ||
/******/ // The module cache | ||
/******/ var __webpack_module_cache__ = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ // Check if module is in cache | ||
/******/ if(__webpack_module_cache__[moduleId]) { | ||
/******/ return __webpack_module_cache__[moduleId].exports; | ||
/******/ } | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = __webpack_module_cache__[moduleId] = { | ||
/******/ // no module.id needed | ||
/******/ // no module.loaded needed | ||
/******/ exports: {} | ||
/******/ }; | ||
/******/ | ||
/******/ // Execute the module function | ||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | ||
/******/ | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ | ||
/************************************************************************/ | ||
/******/ /* webpack/runtime/define property getters */ | ||
/******/ (() => { | ||
/******/ // define getter functions for harmony exports | ||
/******/ __webpack_require__.d = (exports, definition) => { | ||
/******/ for(var key in definition) { | ||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
/******/ } | ||
/******/ } | ||
/******/ }; | ||
/******/ })(); | ||
/******/ | ||
/******/ /* webpack/runtime/hasOwnProperty shorthand */ | ||
/******/ (() => { | ||
/******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop) | ||
/******/ })(); | ||
/******/ | ||
/******/ /* webpack/runtime/make namespace object */ | ||
/******/ (() => { | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = (exports) => { | ||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | ||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
/******/ } | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ })(); | ||
/******/ | ||
/************************************************************************/ | ||
/******/ // module exports must be returned from runtime so entry inlining is disabled | ||
/******/ // startup | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(947); | ||
/******/ })() | ||
; | ||
}); | ||
//# sourceMappingURL=transformation-matrix.js.map |
@@ -1,2 +0,2 @@ | ||
!function(n,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.TransformationMatrix=r():n.TransformationMatrix=r()}(window,(function(){return function(n){var r={};function t(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return n[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=n,t.c=r,t.d=function(n,r,e){t.o(n,r)||Object.defineProperty(n,r,{enumerable:!0,get:e})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,r){if(1&r&&(n=t(n)),8&r)return n;if(4&r&&"object"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(t.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:n}),2&r&&"string"!=typeof n)for(var o in n)t.d(e,o,function(r){return n[r]}.bind(null,o));return e},t.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(r,"a",r),r},t.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},t.p="",t(t.s=0)}([function(n,r,t){"use strict";function e(n,r){return Array.isArray(r)?[n.a*r[0]+n.c*r[1]+n.e,n.b*r[0]+n.d*r[1]+n.f]:{x:n.a*r.x+n.c*r.y+n.e,y:n.b*r.x+n.d*r.y+n.f}}function o(n,r){return r.map((function(r){return e(n,r)}))}function u(n){return{a:parseFloat(n.a),b:parseFloat(n.b),c:parseFloat(n.c),d:parseFloat(n.d),e:parseFloat(n.e),f:parseFloat(n.f)}}t.r(r),t.d(r,"applyToPoint",(function(){return e})),t.d(r,"applyToPoints",(function(){return o})),t.d(r,"fromObject",(function(){return u})),t.d(r,"fromString",(function(){return a})),t.d(r,"identity",(function(){return c})),t.d(r,"inverse",(function(){return f})),t.d(r,"isAffineMatrix",(function(){return d})),t.d(r,"rotate",(function(){return _})),t.d(r,"rotateDEG",(function(){return j})),t.d(r,"scale",(function(){return C})),t.d(r,"shear",(function(){return E})),t.d(r,"skew",(function(){return F})),t.d(r,"skewDEG",(function(){return R})),t.d(r,"toCSS",(function(){return T})),t.d(r,"toSVG",(function(){return O})),t.d(r,"toString",(function(){return P})),t.d(r,"transform",(function(){return g})),t.d(r,"compose",(function(){return x})),t.d(r,"translate",(function(){return h})),t.d(r,"fromTriangles",(function(){return k})),t.d(r,"smoothMatrix",(function(){return N})),t.d(r,"fromDefinition",(function(){return D})),t.d(r,"fromTransformAttribute",(function(){return U}));var i=/^matrix\(\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*\)$/i;function a(n){var r=n.match(i);if(null===r||r.length<7)throw new Error("'".concat(n,"' is not a matrix"));return{a:parseFloat(r[1]),b:parseFloat(r[2]),c:parseFloat(r[3]),d:parseFloat(r[4]),e:parseFloat(r[5]),f:parseFloat(r[6])}}function c(){return{a:1,c:0,e:0,b:0,d:1,f:0}}function f(n){var r=n.a,t=n.b,e=n.c,o=n.d,u=n.e,i=n.f,a=r*o-t*e;return{a:o/a,b:t/-a,c:e/-a,d:r/a,e:(o*u-e*i)/-a,f:(t*u-r*i)/a}}function s(n){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function l(n){return void 0===n}function p(n){return"number"==typeof n&&!Number.isNaN(n)&&Number.isFinite(n)}function d(n){return"object"===s(r=n)&&null!==r&&!Array.isArray(r)&&"a"in n&&p(n.a)&&"b"in n&&p(n.b)&&"c"in n&&p(n.c)&&"d"in n&&p(n.d)&&"e"in n&&p(n.e)&&"f"in n&&p(n.f);var r}function h(n){return{a:1,c:0,e:n,b:0,d:1,f:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0}}function y(n){return function(n){if(Array.isArray(n))return A(n)}(n)||m(n)||b(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(n){return function(n){if(Array.isArray(n))return n}(n)||m(n)||b(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(n,r){if(n){if("string"==typeof n)return A(n,r);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?A(n,r):void 0}}function A(n,r){(null==r||r>n.length)&&(r=n.length);for(var t=0,e=new Array(r);t<r;t++)e[t]=n[t];return e}function m(n){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(n))return Array.from(n)}function g(){for(var n=arguments.length,r=new Array(n),t=0;t<n;t++)r[t]=arguments[t];var e=function(n,r){return{a:n.a*r.a+n.c*r.b,c:n.a*r.c+n.c*r.d,e:n.a*r.e+n.c*r.f+n.e,b:n.b*r.a+n.d*r.b,d:n.b*r.c+n.d*r.d,f:n.b*r.e+n.d*r.f+n.f}};switch((r=Array.isArray(r[0])?r[0]:r).length){case 0:throw new Error("no matrices provided");case 1:return r[0];case 2:return e(r[0],r[1]);default:var o=v(r),u=o[0],i=o[1],a=o.slice(2),c=e(u,i);return g.apply(void 0,[c].concat(y(a)))}}function x(){return g.apply(void 0,arguments)}var w=Math.cos,M=Math.sin,S=Math.PI;function _(n,r,t){var e=w(n),o=M(n),u={a:e,c:-o,e:0,b:o,d:e,f:0};return l(r)||l(t)?u:g([h(r,t),u,h(-r,-t)])}function j(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return _(n*S/180,r,t)}function C(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;l(r)&&(r=n);var o={a:n,c:0,e:0,b:0,d:r,f:0};return l(t)||l(e)?o:g([h(t,e),o,h(-t,-e)])}function E(n,r){return{a:1,c:n,e:0,b:r,d:1,f:0}}var I=Math.tan;function F(n,r){return{a:1,c:I(n),e:0,b:I(r),d:1,f:0}}function R(n,r){return F(n*Math.PI/180,r*Math.PI/180)}function T(n){return P(n)}function O(n){return P(n)}function P(n){return"matrix(".concat(n.a,",").concat(n.b,",").concat(n.c,",").concat(n.d,",").concat(n.e,",").concat(n.f,")")}function N(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e10;return{a:Math.round(n.a*r)/r,b:Math.round(n.b*r)/r,c:Math.round(n.c*r)/r,d:Math.round(n.d*r)/r,e:Math.round(n.e*r)/r,f:Math.round(n.f*r)/r}}function k(n,r){var t=null!=n[0].x?n[0].x:n[0][0],e=null!=n[0].y?n[0].y:n[0][1],o=null!=r[0].x?r[0].x:r[0][0],u=null!=r[0].y?r[0].y:r[0][1],i=null!=n[1].x?n[1].x:n[1][0],a=null!=n[1].y?n[1].y:n[1][1],c=null!=r[1].x?r[1].x:r[1][0],s=null!=r[1].y?r[1].y:r[1][1],l=null!=n[2].x?n[2].x:n[2][0],p=null!=n[2].y?n[2].y:n[2][1],d=null!=r[2].x?r[2].x:r[2][0],h=null!=r[2].y?r[2].y:r[2][1];return N(g([{a:o-d,b:u-h,c:c-d,d:s-h,e:d,f:h},f({a:t-l,b:e-p,c:i-l,d:a-p,e:l,f:p})]))}function D(n){return Array.isArray(n)?n.map(r):r(n);function r(n){switch(n.type){case"matrix":if("a"in n&&"b"in n&&"c"in n&&"d"in n&&"e"in n&&"f"in n)return u(n);throw new Error("MISSING_MANDATORY_PARAM");case"translate":if(!("tx"in n))throw new Error("MISSING_MANDATORY_PARAM");return"ty"in n?h(n.tx,n.ty):h(n.tx);case"scale":if(!("sx"in n))throw new Error("MISSING_MANDATORY_PARAM");return"sy"in n?C(n.sx,n.sy):C(n.sx);case"rotate":if(!("angle"in n))throw new Error("MISSING_MANDATORY_PARAM");return"cx"in n&&"cy"in n?j(n.angle,n.cx,n.cy):j(n.angle);case"skewX":if(!("angle"in n))throw new Error("MISSING_MANDATORY_PARAM");return R(n.angle,0);case"skewY":if(!("angle"in n))throw new Error("MISSING_MANDATORY_PARAM");return R(0,n.angle);case"shear":if(!("shx"in n&&"shy"in n))throw new Error("MISSING_MANDATORY_PARAM");return E(n.shx,n.shy);default:throw new Error("UNSUPPORTED_DESCRIPTOR")}}}function Y(n,r,t,e){this.message=n,this.expected=r,this.found=t,this.location=e,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,Y)}function G(n,r){r=void 0!==r?r:{};var t,e={},o={transformList:fn},u=fn,i="matrix",a="(",c=")",f="translate",s="scale",l="rotate",p="skewX",d="skewY",h=",",y=".",v=/^[eE]/,b=/^[+\-]/,A=/^[0-9]/,m=/^[ \t\r\n]/,g=nn("matrix",!1),x=nn("(",!1),w=nn(")",!1),M=nn("translate",!1),S=nn("scale",!1),_=nn("rotate",!1),j=nn("skewX",!1),C=nn("skewY",!1),E=nn(",",!1),I=tn("fractionalConstant"),F=rn(["e","E"],!1,!1),R=rn(["+","-"],!1,!1),T=rn([["0","9"]],!1,!1),O=rn([" ","\t","\r","\n"],!1,!1),P=function(n){return n},N=function(n,r){return n.concat(r)},k=function(n,r,t,e,o,u){return[{type:"matrix",a:n,b:r,c:t,d:e,e:o,f:u}]},D=function(n,r){var t={type:"translate",tx:n};return r&&(t.ty=r),[t]},G=function(n,r){var t={type:"scale",sx:n};return r&&(t.sy=r),[t]},U=function(n,r){var t={type:"rotate",angle:n};return r&&(t.cx=r[0],t.cy=r[1]),[t]},X=function(n){return[{type:"skewX",angle:n}]},$=function(n){return[{type:"skewY",angle:n}]},L=function(n){return parseFloat(n.join(""))},V=function(n){return parseInt(n.join(""))},q=function(n){return n},z=function(n,r){return[n,r]},B=function(n){return n.join("")},H=function(n,r){return[n?n.join(""):null,".",r.join("")].join("")},J=function(n){return n.join("")},K=0,Q=[{line:1,column:1}],W=[],Z=0;if("startRule"in r){if(!(r.startRule in o))throw new Error("Can't start parsing from rule \""+r.startRule+'".');u=o[r.startRule]}function nn(n,r){return{type:"literal",text:n,ignoreCase:r}}function rn(n,r,t){return{type:"class",parts:n,inverted:r,ignoreCase:t}}function tn(n){return{type:"other",description:n}}function en(r){var t,e=Q[r];if(e)return e;for(t=r-1;!Q[t];)t--;for(e={line:(e=Q[t]).line,column:e.column};t<r;)10===n.charCodeAt(t)?(e.line++,e.column=1):e.column++,t++;return Q[r]=e,e}var on="string"==typeof r.filename&&r.filename.length>0;function un(n,t){var e={};on&&(e.filename=r.filename);var o=en(n);e.start={offset:n,line:o.line,column:o.column};var u=en(t);return e.end={offset:t,line:u.line,column:u.column},e}function an(n){var r=W[W.length-1];K<r.pos||(K>r.pos&&(r.pos=K,r.variants=[]),r.variants.push(n))}function cn(n,r,t){return new Y(Y.buildMessage(n,r),n,r,t)}function fn(){var n,r,t,o,u;for(n=K,r=[],t=mn();t!==e;)r.push(t),t=mn();for((t=function n(){var r,t,o,u;if(r=K,(t=sn())!==e){if(o=[],(u=dn())!==e)for(;u!==e;)o.push(u),u=dn();else o=e;o!==e&&(u=n())!==e?(r,r=N(t,u)):(K=r,r=e)}else K=r,r=e;r===e&&(r=sn());return r}())===e&&(t=null),o=[],u=mn();u!==e;)o.push(u),u=mn();return n,n=P(t)}function sn(){var r;return(r=function(){var r,t,o,u,f,s,l,p,d,h,y,v,b,A=function(n){0===Z&&an(n)};r=K,A(g),n.substr(K,6)===i?(t=i,K+=6):t=e;if(t!==e){for(o=[],u=mn();u!==e;)o.push(u),u=mn();if(A(x),40===n.charCodeAt(K)?(u=a,K++):u=e,u!==e){for(f=[],s=mn();s!==e;)f.push(s),s=mn();if((s=ln())!==e)if(dn()!==e)if((l=ln())!==e)if(dn()!==e)if((p=ln())!==e)if(dn()!==e)if((d=ln())!==e)if(dn()!==e)if((h=ln())!==e)if(dn()!==e)if((y=ln())!==e){for(v=[],b=mn();b!==e;)v.push(b),b=mn();A(w),41===n.charCodeAt(K)?(b=c,K++):b=e,b!==e?(r,r=k(s,l,p,d,h,y)):(K=r,r=e)}else K=r,r=e;else K=r,r=e;else K=r,r=e;else K=r,r=e;else K=r,r=e;else K=r,r=e;else K=r,r=e;else K=r,r=e;else K=r,r=e;else K=r,r=e;else K=r,r=e}else K=r,r=e}else K=r,r=e;return r}())===e&&(r=function(){var r,t,o,u,i,s,l,p,d,h=function(n){0===Z&&an(n)};r=K,h(M),n.substr(K,9)===f?(t=f,K+=9):t=e;if(t!==e){for(o=[],u=mn();u!==e;)o.push(u),u=mn();if(h(x),40===n.charCodeAt(K)?(u=a,K++):u=e,u!==e){for(i=[],s=mn();s!==e;)i.push(s),s=mn();if((s=ln())!==e){for((l=pn())===e&&(l=null),p=[],d=mn();d!==e;)p.push(d),d=mn();h(w),41===n.charCodeAt(K)?(d=c,K++):d=e,d!==e?(r,r=D(s,l)):(K=r,r=e)}else K=r,r=e}else K=r,r=e}else K=r,r=e;return r}())===e&&(r=function(){var r,t,o,u,i,f,l,p,d,h=function(n){0===Z&&an(n)};r=K,h(S),n.substr(K,5)===s?(t=s,K+=5):t=e;if(t!==e){for(o=[],u=mn();u!==e;)o.push(u),u=mn();if(h(x),40===n.charCodeAt(K)?(u=a,K++):u=e,u!==e){for(i=[],f=mn();f!==e;)i.push(f),f=mn();if((f=ln())!==e){for((l=pn())===e&&(l=null),p=[],d=mn();d!==e;)p.push(d),d=mn();h(w),41===n.charCodeAt(K)?(d=c,K++):d=e,d!==e?(r,r=G(f,l)):(K=r,r=e)}else K=r,r=e}else K=r,r=e}else K=r,r=e;return r}())===e&&(r=function(){var r,t,o,u,i,f,s,p,d,h=function(n){0===Z&&an(n)};r=K,h(_),n.substr(K,6)===l?(t=l,K+=6):t=e;if(t!==e){for(o=[],u=mn();u!==e;)o.push(u),u=mn();if(h(x),40===n.charCodeAt(K)?(u=a,K++):u=e,u!==e){for(i=[],f=mn();f!==e;)i.push(f),f=mn();if((f=ln())!==e){for((s=function(){var n,r,t;n=K,dn()!==e&&(r=ln())!==e&&dn()!==e&&(t=ln())!==e?(n,n=z(r,t)):(K=n,n=e);return n}())===e&&(s=null),p=[],d=mn();d!==e;)p.push(d),d=mn();h(w),41===n.charCodeAt(K)?(d=c,K++):d=e,d!==e?(r,r=U(f,s)):(K=r,r=e)}else K=r,r=e}else K=r,r=e}else K=r,r=e;return r}())===e&&(r=function(){var r,t,o,u,i,f,s,l,d=function(n){0===Z&&an(n)};r=K,d(j),n.substr(K,5)===p?(t=p,K+=5):t=e;if(t!==e){for(o=[],u=mn();u!==e;)o.push(u),u=mn();if(d(x),40===n.charCodeAt(K)?(u=a,K++):u=e,u!==e){for(i=[],f=mn();f!==e;)i.push(f),f=mn();if((f=ln())!==e){for(s=[],l=mn();l!==e;)s.push(l),l=mn();d(w),41===n.charCodeAt(K)?(l=c,K++):l=e,l!==e?(r,r=X(f)):(K=r,r=e)}else K=r,r=e}else K=r,r=e}else K=r,r=e;return r}())===e&&(r=function(){var r,t,o,u,i,f,s,l,p=function(n){0===Z&&an(n)};r=K,p(C),n.substr(K,5)===d?(t=d,K+=5):t=e;if(t!==e){for(o=[],u=mn();u!==e;)o.push(u),u=mn();if(p(x),40===n.charCodeAt(K)?(u=a,K++):u=e,u!==e){for(i=[],f=mn();f!==e;)i.push(f),f=mn();if((f=ln())!==e){for(s=[],l=mn();l!==e;)s.push(l),l=mn();p(w),41===n.charCodeAt(K)?(l=c,K++):l=e,l!==e?(r,r=$(f)):(K=r,r=e)}else K=r,r=e}else K=r,r=e}else K=r,r=e;return r}()),r}function ln(){var r,t,o,u;return r=K,t=K,(o=vn())===e&&(o=null),(u=function(){var r,t,o;r=K,(t=function(){var r,t,o,u;(function(n){0===Z&&an(n)})(I),Z++,r=K,(t=bn())===e&&(t=null);46===n.charCodeAt(K)?(o=y,K++):o=e;o!==e&&(u=bn())!==e?(r,r=H(t,u)):(K=r,r=e);r===e&&(r=K,(t=bn())!==e?(46===n.charCodeAt(K)?(o=y,K++):o=e,o!==e?(r,r=J(t)):(K=r,r=e)):(K=r,r=e));return Z--,r}())!==e?((o=yn())===e&&(o=null),r=t=[t,o]):(K=r,r=e);r===e&&(r=K,(t=bn())!==e&&(o=yn())!==e?r=t=[t,o]:(K=r,r=e));return r}())!==e?t=o=[o,u]:(K=t,t=e),t!==e&&(r,t=L(t)),(r=t)===e&&(r=K,t=K,(o=vn())===e&&(o=null),(u=function(){var n,r;n=K,(r=bn())!==e&&(n,r=B(r));return n=r}())!==e?t=o=[o,u]:(K=t,t=e),t!==e&&(r,t=V(t)),r=t),r}function pn(){var n,r;return n=K,dn()!==e&&(r=ln())!==e?(n,n=q(r)):(K=n,n=e),n}function dn(){var n,r,t,o,u;if(n=K,r=[],(t=mn())!==e)for(;t!==e;)r.push(t),t=mn();else r=e;if(r!==e){for((t=hn())===e&&(t=null),o=[],u=mn();u!==e;)o.push(u),u=mn();n=r=[r,t,o]}else K=n,n=e;if(n===e)if(n=K,(r=hn())!==e){for(t=[],o=mn();o!==e;)t.push(o),o=mn();n=r=[r,t]}else K=n,n=e;return n}function hn(){var r;return function(n){0===Z&&an(n)}(E),44===n.charCodeAt(K)?(r=h,K++):r=e,r}function yn(){var r,t,o,u;return r=K,function(n){0===Z&&an(n)}(F),v.test(n.charAt(K))?(t=n.charAt(K),K++):t=e,t!==e?((o=vn())===e&&(o=null),(u=bn())!==e?r=t=[t,o,u]:(K=r,r=e)):(K=r,r=e),r}function vn(){var r;return function(n){0===Z&&an(n)}(R),b.test(n.charAt(K))?(r=n.charAt(K),K++):r=e,r}function bn(){var n,r;if(n=[],(r=An())!==e)for(;r!==e;)n.push(r),r=An();else n=e;return n}function An(){var r;return function(n){0===Z&&an(n)}(T),A.test(n.charAt(K))?(r=n.charAt(K),K++):r=e,r}function mn(){var r;return function(n){0===Z&&an(n)}(O),m.test(n.charAt(K))?(r=n.charAt(K),K++):r=e,r}if(W.push({pos:K,variants:[]}),(t=u())!==e&&K===n.length)return t;throw t!==e&&K<n.length&&an({type:"end"}),function(){var r=W[0],t=r.pos;return cn(r.variants,t<n.length?n.charAt(t):null,t<n.length?un(t,t+1):un(t,t))}()}!function(n,r){function t(){this.constructor=n}t.prototype=r.prototype,n.prototype=new t}(Y,Error),Y.buildMessage=function(n,r){var t={literal:function(n){return'"'+o(n.text)+'"'},class:function(n){var r=n.parts.map((function(n){return Array.isArray(n)?u(n[0])+"-"+u(n[1]):u(n)}));return"["+(n.inverted?"^":"")+r+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(n){return n.description},not:function(n){return"not "+i(n.expected)}};function e(n){return n.charCodeAt(0).toString(16).toUpperCase()}function o(n){return n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(n){return"\\x0"+e(n)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(n){return"\\x"+e(n)}))}function u(n){return n.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(n){return"\\x0"+e(n)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(n){return"\\x"+e(n)}))}function i(n){return t[n.type](n)}return"Expected "+function(n){var r,t,e=n.map(i);if(e.sort(),e.length>0){for(r=1,t=1;r<e.length;r++)e[r-1]!==e[r]&&(e[t]=e[r],t++);e.length=t}switch(e.length){case 1:return e[0];case 2:return e[0]+" or "+e[1];default:return e.slice(0,-1).join(", ")+", or "+e[e.length-1]}}(n)+" but "+function(n){return n?'"'+o(n)+'"':"end of input"}(r)+" found."};function U(n){return G(n)}}])})); | ||
!function(r,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TransformationMatrix=e():r.TransformationMatrix=e()}(self,(function(){return(()=>{"use strict";var r={947:(r,e,t)=>{function n(r,e){return Array.isArray(e)?[r.a*e[0]+r.c*e[1]+r.e,r.b*e[0]+r.d*e[1]+r.f]:{x:r.a*e.x+r.c*e.y+r.e,y:r.b*e.x+r.d*e.y+r.f}}function o(r,e){return e.map((function(e){return n(r,e)}))}function a(r){return{a:parseFloat(r.a),b:parseFloat(r.b),c:parseFloat(r.c),d:parseFloat(r.d),e:parseFloat(r.e),f:parseFloat(r.f)}}t.r(e),t.d(e,{applyToPoint:()=>n,applyToPoints:()=>o,compose:()=>x,fromDefinition:()=>D,fromObject:()=>a,fromString:()=>u,fromTransformAttribute:()=>U,fromTriangles:()=>k,identity:()=>c,inverse:()=>f,isAffineMatrix:()=>h,rotate:()=>C,rotateDEG:()=>E,scale:()=>I,shear:()=>_,skew:()=>F,skewDEG:()=>R,smoothMatrix:()=>O,toCSS:()=>T,toSVG:()=>N,toString:()=>P,transform:()=>g,translate:()=>d});var i=/^matrix\(\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*\)$/i;function u(r){var e=r.match(i);if(null===e||e.length<7)throw new Error("'".concat(r,"' is not a matrix"));return{a:parseFloat(e[1]),b:parseFloat(e[2]),c:parseFloat(e[3]),d:parseFloat(e[4]),e:parseFloat(e[5]),f:parseFloat(e[6])}}function c(){return{a:1,c:0,e:0,b:0,d:1,f:0}}function f(r){var e=r.a,t=r.b,n=r.c,o=r.d,a=r.e,i=r.f,u=e*o-t*n;return{a:o/u,b:t/-u,c:n/-u,d:e/u,e:(o*a-n*i)/-u,f:(t*a-e*i)/u}}function s(r){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function l(r){return void 0===r}function p(r){return"number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r)}function h(r){return"object"===s(e=r)&&null!==e&&!Array.isArray(e)&&"a"in r&&p(r.a)&&"b"in r&&p(r.b)&&"c"in r&&p(r.c)&&"d"in r&&p(r.d)&&"e"in r&&p(r.e)&&"f"in r&&p(r.f);var e}function d(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{a:1,c:0,e:r,b:0,d:1,f:e}}function y(r){return function(r){if(Array.isArray(r))return A(r)}(r)||m(r)||b(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(r){return function(r){if(Array.isArray(r))return r}(r)||m(r)||b(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(r,e){if(r){if("string"==typeof r)return A(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?A(r,e):void 0}}function A(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function m(r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(r))return Array.from(r)}function g(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];var n=function(r,e){return{a:r.a*e.a+r.c*e.b,c:r.a*e.c+r.c*e.d,e:r.a*e.e+r.c*e.f+r.e,b:r.b*e.a+r.d*e.b,d:r.b*e.c+r.d*e.d,f:r.b*e.e+r.d*e.f+r.f}};switch((e=Array.isArray(e[0])?e[0]:e).length){case 0:throw new Error("no matrices provided");case 1:return e[0];case 2:return n(e[0],e[1]);default:var o=e,a=v(o),i=a[0],u=a[1],c=a.slice(2),f=n(i,u);return g.apply(void 0,[f].concat(y(c)))}}function x(){return g.apply(void 0,arguments)}var w=Math.cos,M=Math.sin,S=Math.PI;function C(r,e,t){var n=w(r),o=M(r),a={a:n,c:-o,e:0,b:o,d:n,f:0};return l(e)||l(t)?a:g([d(e,t),a,d(-e,-t)])}function E(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return C(r*S/180,e,t)}function I(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;l(e)&&(e=r);var o={a:r,c:0,e:0,b:0,d:e,f:0};return l(t)||l(n)?o:g([d(t,n),o,d(-t,-n)])}function _(r,e){return{a:1,c:r,e:0,b:e,d:1,f:0}}var j=Math.tan;function F(r,e){return{a:1,c:j(r),e:0,b:j(e),d:1,f:0}}function R(r,e){return F(r*Math.PI/180,e*Math.PI/180)}function T(r){return P(r)}function N(r){return P(r)}function P(r){return"matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")")}function O(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e10;return{a:Math.round(r.a*e)/e,b:Math.round(r.b*e)/e,c:Math.round(r.c*e)/e,d:Math.round(r.d*e)/e,e:Math.round(r.e*e)/e,f:Math.round(r.f*e)/e}}function k(r,e){var t=null!=r[0].x?r[0].x:r[0][0],n=null!=r[0].y?r[0].y:r[0][1],o=null!=e[0].x?e[0].x:e[0][0],a=null!=e[0].y?e[0].y:e[0][1],i=null!=r[1].x?r[1].x:r[1][0],u=null!=r[1].y?r[1].y:r[1][1],c=null!=e[1].x?e[1].x:e[1][0],s=null!=e[1].y?e[1].y:e[1][1],l=null!=r[2].x?r[2].x:r[2][0],p=null!=r[2].y?r[2].y:r[2][1],h=null!=e[2].x?e[2].x:e[2][0],d=null!=e[2].y?e[2].y:e[2][1];return O(g([{a:o-h,b:a-d,c:c-h,d:s-d,e:h,f:d},f({a:t-l,b:n-p,c:i-l,d:u-p,e:l,f:p})]))}function D(r){return Array.isArray(r)?r.map(e):e(r);function e(r){switch(r.type){case"matrix":if("a"in r&&"b"in r&&"c"in r&&"d"in r&&"e"in r&&"f"in r)return a(r);throw new Error("MISSING_MANDATORY_PARAM");case"translate":if(!("tx"in r))throw new Error("MISSING_MANDATORY_PARAM");return"ty"in r?d(r.tx,r.ty):d(r.tx);case"scale":if(!("sx"in r))throw new Error("MISSING_MANDATORY_PARAM");return"sy"in r?I(r.sx,r.sy):I(r.sx);case"rotate":if(!("angle"in r))throw new Error("MISSING_MANDATORY_PARAM");return"cx"in r&&"cy"in r?E(r.angle,r.cx,r.cy):E(r.angle);case"skewX":if(!("angle"in r))throw new Error("MISSING_MANDATORY_PARAM");return R(r.angle,0);case"skewY":if(!("angle"in r))throw new Error("MISSING_MANDATORY_PARAM");return R(0,r.angle);case"shear":if(!("shx"in r)||!("shy"in r))throw new Error("MISSING_MANDATORY_PARAM");return _(r.shx,r.shy);default:throw new Error("UNSUPPORTED_DESCRIPTOR")}}}function Y(r,e,t,n){this.message=r,this.expected=e,this.found=t,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,Y)}function G(r,e){e=void 0!==e?e:{};var t,n={},o={transformList:q},a=q,i="matrix",u="(",c=")",f="translate",s="scale",l="rotate",p="skewX",h="skewY",d=/^[eE]/,y=/^[+\-]/,v=/^[0-9]/,b=/^[ \t\r\n]/,A=k("matrix",!1),m=k("(",!1),g=k(")",!1),x=k("translate",!1),w=k("scale",!1),M=k("rotate",!1),S=k("skewX",!1),C=k("skewY",!1),E=k(",",!1),I={type:"other",description:"fractionalConstant"},_=D(["e","E"],!1,!1),j=D(["+","-"],!1,!1),F=D([["0","9"]],!1,!1),R=D([" ","\t","\r","\n"],!1,!1),T=0,N=[{line:1,column:1}],P=[],O=0;if("startRule"in e){if(!(e.startRule in o))throw new Error("Can't start parsing from rule \""+e.startRule+'".');a=o[e.startRule]}function k(r,e){return{type:"literal",text:r,ignoreCase:e}}function D(r,e,t){return{type:"class",parts:r,inverted:e,ignoreCase:t}}function G(e){var t,n=N[e];if(n)return n;for(t=e-1;!N[t];)t--;for(n={line:(n=N[t]).line,column:n.column};t<e;)10===r.charCodeAt(t)?(n.line++,n.column=1):n.column++,t++;return N[e]=n,n}var U,X,$="string"==typeof e.filename&&e.filename.length>0;function L(r,t){var n={};$&&(n.filename=e.filename);var o=G(r);n.start={offset:r,line:o.line,column:o.column};var a=G(t);return n.end={offset:t,line:a.line,column:a.column},n}function V(r){var e=P[P.length-1];T<e.pos||(T>e.pos&&(e.pos=T,e.variants=[]),e.variants.push(r))}function q(){var r,e,t,o;for(T,r=[],e=tr();e!==n;)r.push(e),e=tr();for((e=z())===n&&(e=null),t=[],o=tr();o!==n;)t.push(o),o=tr();return e}function z(){var r,e,t,o,a;if(r=T,(e=B())!==n){if(t=[],(o=K())!==n)for(;o!==n;)t.push(o),o=K();else t=n;t!==n&&(o=z())!==n?(a=o,r=e.concat(a)):(T=r,r=n)}else T=r,r=n;return r===n&&(r=B()),r}function B(){var e;return(e=function(){var e,t,o,a,f,s,l,p,h,d,y,v,b,x=function(r){0===O&&V(r)};if(e=T,x(A),r.substr(T,6)===i?(t=i,T+=6):t=n,t!==n){for(o=[],a=tr();a!==n;)o.push(a),a=tr();if(x(m),40===r.charCodeAt(T)?(a=u,T++):a=n,a!==n){for(f=[],s=tr();s!==n;)f.push(s),s=tr();if((s=H())!==n)if(K()!==n)if((l=H())!==n)if(K()!==n)if((p=H())!==n)if(K()!==n)if((h=H())!==n)if(K()!==n)if((d=H())!==n)if(K()!==n)if((y=H())!==n){for(v=[],b=tr();b!==n;)v.push(b),b=tr();x(g),41===r.charCodeAt(T)?(b=c,T++):b=n,b!==n?e=[{type:"matrix",a:s,b:l,c:p,d:h,e:d,f:y}]:(T=e,e=n)}else T=e,e=n;else T=e,e=n;else T=e,e=n;else T=e,e=n;else T=e,e=n;else T=e,e=n;else T=e,e=n;else T=e,e=n;else T=e,e=n;else T=e,e=n;else T=e,e=n}else T=e,e=n}else T=e,e=n;return e}())===n&&(e=function(){var e,t,o,a,i,s,l,p,h,d,y,v=function(r){0===O&&V(r)};if(e=T,v(x),r.substr(T,9)===f?(t=f,T+=9):t=n,t!==n){for(o=[],a=tr();a!==n;)o.push(a),a=tr();if(v(m),40===r.charCodeAt(T)?(a=u,T++):a=n,a!==n){for(i=[],s=tr();s!==n;)i.push(s),s=tr();if((s=H())!==n){for((l=J())===n&&(l=null),p=[],h=tr();h!==n;)p.push(h),h=tr();v(g),41===r.charCodeAt(T)?(h=c,T++):h=n,h!==n?(y={type:"translate",tx:s},(d=l)&&(y.ty=d),e=[y]):(T=e,e=n)}else T=e,e=n}else T=e,e=n}else T=e,e=n;return e}())===n&&(e=function(){var e,t,o,a,i,f,l,p,h,d,y,v=function(r){0===O&&V(r)};if(e=T,v(w),r.substr(T,5)===s?(t=s,T+=5):t=n,t!==n){for(o=[],a=tr();a!==n;)o.push(a),a=tr();if(v(m),40===r.charCodeAt(T)?(a=u,T++):a=n,a!==n){for(i=[],f=tr();f!==n;)i.push(f),f=tr();if((f=H())!==n){for((l=J())===n&&(l=null),p=[],h=tr();h!==n;)p.push(h),h=tr();v(g),41===r.charCodeAt(T)?(h=c,T++):h=n,h!==n?(y={type:"scale",sx:f},(d=l)&&(y.sy=d),e=[y]):(T=e,e=n)}else T=e,e=n}else T=e,e=n}else T=e,e=n;return e}())===n&&(e=function(){var e,t,o,a,i,f,s,p,h,d,y,v=function(r){0===O&&V(r)};if(e=T,v(M),r.substr(T,6)===l?(t=l,T+=6):t=n,t!==n){for(o=[],a=tr();a!==n;)o.push(a),a=tr();if(v(m),40===r.charCodeAt(T)?(a=u,T++):a=n,a!==n){for(i=[],f=tr();f!==n;)i.push(f),f=tr();if((f=H())!==n){for((s=function(){var r,e,t;return r=T,K()!==n&&(e=H())!==n&&K()!==n&&(t=H())!==n?r=[e,t]:(T=r,r=n),r}())===n&&(s=null),p=[],h=tr();h!==n;)p.push(h),h=tr();v(g),41===r.charCodeAt(T)?(h=c,T++):h=n,h!==n?(y={type:"rotate",angle:f},(d=s)&&(y.cx=d[0],y.cy=d[1]),e=[y]):(T=e,e=n)}else T=e,e=n}else T=e,e=n}else T=e,e=n;return e}())===n&&(e=function(){var e,t,o,a,i,f,s,l,h=function(r){0===O&&V(r)};if(e=T,h(S),r.substr(T,5)===p?(t=p,T+=5):t=n,t!==n){for(o=[],a=tr();a!==n;)o.push(a),a=tr();if(h(m),40===r.charCodeAt(T)?(a=u,T++):a=n,a!==n){for(i=[],f=tr();f!==n;)i.push(f),f=tr();if((f=H())!==n){for(s=[],l=tr();l!==n;)s.push(l),l=tr();h(g),41===r.charCodeAt(T)?(l=c,T++):l=n,l!==n?e=[{type:"skewX",angle:f}]:(T=e,e=n)}else T=e,e=n}else T=e,e=n}else T=e,e=n;return e}())===n&&(e=function(){var e,t,o,a,i,f,s,l,p=function(r){0===O&&V(r)};if(e=T,p(C),r.substr(T,5)===h?(t=h,T+=5):t=n,t!==n){for(o=[],a=tr();a!==n;)o.push(a),a=tr();if(p(m),40===r.charCodeAt(T)?(a=u,T++):a=n,a!==n){for(i=[],f=tr();f!==n;)i.push(f),f=tr();if((f=H())!==n){for(s=[],l=tr();l!==n;)s.push(l),l=tr();p(g),41===r.charCodeAt(T)?(l=c,T++):l=n,l!==n?e=[{type:"skewY",angle:f}]:(T=e,e=n)}else T=e,e=n}else T=e,e=n}else T=e,e=n;return e}()),e}function H(){var e,t,o,a;return e=T,t=T,(o=Z())===n&&(o=null),(a=function(){var e,t,o;return e=T,(t=function(){var e,t,o,a,i,u,c;return i=I,0===O&&V(i),O++,e=T,(t=rr())===n&&(t=null),46===r.charCodeAt(T)?(o=".",T++):o=n,o!==n&&(a=rr())!==n?(c=a,e=[(u=t)?u.join(""):null,".",c.join("")].join("")):(T=e,e=n),e===n&&(e=T,(t=rr())!==n?(46===r.charCodeAt(T)?(o=".",T++):o=n,o!==n?e=t.join(""):(T=e,e=n)):(T=e,e=n)),O--,e}())!==n?((o=W())===n&&(o=null),e=t=[t,o]):(T=e,e=n),e===n&&(e=T,(t=rr())!==n&&(o=W())!==n?e=t=[t,o]:(T=e,e=n)),e}())!==n?t=o=[o,a]:(T=t,t=n),t!==n&&(t=parseFloat(t.join(""))),(e=t)===n&&(e=T,t=T,(o=Z())===n&&(o=null),(a=function(){var r;return T,(r=rr())!==n&&(r=r.join("")),r}())!==n?t=o=[o,a]:(T=t,t=n),t!==n&&(t=parseInt(t.join(""))),e=t),e}function J(){var r,e;return r=T,K()!==n&&(e=H())!==n?r=e:(T=r,r=n),r}function K(){var r,e,t,o,a;if(r=T,e=[],(t=tr())!==n)for(;t!==n;)e.push(t),t=tr();else e=n;if(e!==n){for((t=Q())===n&&(t=null),o=[],a=tr();a!==n;)o.push(a),a=tr();r=e=[e,t,o]}else T=r,r=n;if(r===n)if(r=T,(e=Q())!==n){for(t=[],o=tr();o!==n;)t.push(o),o=tr();r=e=[e,t]}else T=r,r=n;return r}function Q(){var e,t;return t=E,0===O&&V(t),44===r.charCodeAt(T)?(e=",",T++):e=n,e}function W(){var e,t,o,a,i;return e=T,i=_,0===O&&V(i),d.test(r.charAt(T))?(t=r.charAt(T),T++):t=n,t!==n?((o=Z())===n&&(o=null),(a=rr())!==n?e=t=[t,o,a]:(T=e,e=n)):(T=e,e=n),e}function Z(){var e,t;return t=j,0===O&&V(t),y.test(r.charAt(T))?(e=r.charAt(T),T++):e=n,e}function rr(){var r,e;if(r=[],(e=er())!==n)for(;e!==n;)r.push(e),e=er();else r=n;return r}function er(){var e,t;return t=F,0===O&&V(t),v.test(r.charAt(T))?(e=r.charAt(T),T++):e=n,e}function tr(){var e,t;return t=R,0===O&&V(t),b.test(r.charAt(T))?(e=r.charAt(T),T++):e=n,e}if(P.push({pos:T,variants:[]}),(t=a())!==n&&T===r.length)return t;throw t!==n&&T<r.length&&V({type:"end"}),U=P[0],X=U.pos,function(r,e,t){return new Y(Y.buildMessage(r,e,t),r,e,t)}(U.variants,X<r.length?r.charAt(X):null,X<r.length?L(X,X+1):L(X,X))}function U(r){return G(r)}!function(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}(Y,Error),Y.buildMessage=function(r,e,t){var n={literal:function(r){return'"'+a(r.text)+'"'},class:function(r){var e=r.parts.map((function(r){return Array.isArray(r)?i(r[0])+"-"+i(r[1]):i(r)}));return"["+(r.inverted?"^":"")+e+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(r){return r.description},not:function(r){return"not "+u(r.expected)}};function o(r){return r.charCodeAt(0).toString(16).toUpperCase()}function a(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(r){return"\\x0"+o(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+o(r)}))}function i(r){return r.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(r){return"\\x0"+o(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+o(r)}))}function u(r){return n[r.type](r)}return"Expected "+function(r){var e,t,n=r.map(u);if(n.sort(),n.length>0){for(e=1,t=1;e<n.length;e++)n[e-1]!==n[e]&&(n[t]=n[e],t++);n.length=t}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(r)+" but "+function(r){return r?'"'+a(r)+'"':"end of input"}(e)+" found."}}},e={};function t(n){if(e[n])return e[n].exports;var o=e[n]={exports:{}};return r[n](o,o.exports,t),o.exports}return t.d=(r,e)=>{for(var n in e)t.o(e,n)&&!t.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:e[n]})},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),t.r=r=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t(947)})()})); | ||
//# sourceMappingURL=transformation-matrix.min.js.map |
{ | ||
"name": "transformation-matrix", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "2d transformation matrix functions written in ES6 syntax. Tree shaking ready!", | ||
@@ -24,6 +24,6 @@ "main": "./build-commonjs/index.js", | ||
"build-docs": "jsdoc2md --partial disclaimer.hbs --template README.template.hbs src/*.js > README.md", | ||
"build-umd-min": "webpack --config ./webpack-umd.config.js --env.minimize", | ||
"build-umd-min": "webpack --config ./webpack-umd.config.js --env minimize", | ||
"build-umd": "webpack --config ./webpack-umd.config.js", | ||
"build-parser": "pegjs -o src/fromTransformAttribute.autogenerated.js --format es src/fromTransformAttribute.pegjs", | ||
"clean": "del build-*", | ||
"clean": "del build-* coverage", | ||
"build": "npm-run-all clean build-commonjs build-docs build-umd build-umd-min build-parser", | ||
@@ -53,18 +53,18 @@ "standard": "standard", | ||
"devDependencies": { | ||
"@babel/cli": "^7.8.4", | ||
"@babel/core": "^7.9.0", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.9.5", | ||
"@babel/plugin-transform-runtime": "^7.9.0", | ||
"@babel/preset-env": "^7.9.5", | ||
"@types/jest": "^25.2.1", | ||
"@babel/cli": "^7.12.1", | ||
"@babel/core": "^7.12.3", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.12.1", | ||
"@babel/plugin-transform-runtime": "^7.12.1", | ||
"@babel/preset-env": "^7.12.1", | ||
"@types/jest": "^26.0.14", | ||
"babel-loader": "^8.1.0", | ||
"del-cli": "^3.0.0", | ||
"jest": "^25.3.0", | ||
"jsdoc-to-markdown": "^5.0.3", | ||
"jest": "^26.5.3", | ||
"jsdoc-to-markdown": "^6.0.1", | ||
"npm-run-all": "^4.1.5", | ||
"pegjs": "0.11.0-master.30f3260", | ||
"pegjs": "0.11.0-master.b7b87ea", | ||
"standard": "^14.3.3", | ||
"typescript": "^3.8.3", | ||
"webpack": "^4.42.1", | ||
"webpack-cli": "^3.3.11" | ||
"typescript": "^4.0.3", | ||
"webpack": "^5.1.3", | ||
"webpack-cli": "^4.0.0" | ||
}, | ||
@@ -71,0 +71,0 @@ "standard": { |
@@ -160,2 +160,3 @@ <!--------------------------------------------------------------------> | ||
- **2.4**- Improves typescript definition [#75](https://github.com/chrvadala/transformation-matrix/pull/75) | ||
- **2.5**- Upgrade deps; Deprecates NodeJS 8; Adds NodeJs 14 support | ||
# API | ||
@@ -162,0 +163,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by PEG.js v0.11.0-master.30f3260, https://pegjs.org/ | ||
// Generated by PEG.js v0.11.0-master.b7b87ea, https://pegjs.org/ | ||
@@ -24,3 +24,3 @@ function peg$subclass(child, parent) { | ||
peg$SyntaxError.buildMessage = function(expected, found) { | ||
peg$SyntaxError.buildMessage = function(expected, found, location) { | ||
var DESCRIBE_EXPECTATION_FNS = { | ||
@@ -374,3 +374,3 @@ literal: function(expectation) { | ||
return new peg$SyntaxError( | ||
peg$SyntaxError.buildMessage(expected, found), | ||
peg$SyntaxError.buildMessage(expected, found, location), | ||
expected, | ||
@@ -377,0 +377,0 @@ found, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
199899
535
418153
6092