@digivorefr/html2pdf.js
Version:
Client-side HTML-to-PDF rendering using pure JS with html2canvas-pro
2 lines • 1.14 MB
JavaScript
/*! For license information please see html2pdf.bundle.min.js.LICENSE.txt */
!function(A,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("html2pdf",[],e):"object"==typeof exports?exports.html2pdf=e():A.html2pdf=e()}(self,(function(){return function(){var A,e,t={"./node_modules/@babel/runtime-corejs3/core-js-stable/array/from.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/array/from.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/array/is-array.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/date/now.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/date/now.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/bind.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/bind.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/concat.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/every.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/every.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/fill.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/fill.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/filter.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/for-each.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/for-each.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/includes.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/includes.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/index-of.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/map.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/reduce.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/reduce.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/reverse.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/reverse.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/slice.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/some.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/some.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/starts-with.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/starts-with.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/trim.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/trim.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/instance/values.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/instance/values.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/map.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/map/index.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/object/define-properties.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/object/define-properties.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/object/define-property.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/object/get-own-property-descriptor.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/object/get-own-property-descriptors.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/object/get-own-property-symbols.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/object/keys.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/parse-float.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/parse-float.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/parse-int.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/parse-int.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/promise.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/promise/index.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/reflect/apply.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/reflect/apply.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/reflect/construct.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/reflect/construct.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/reflect/delete-property.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/reflect/delete-property.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/reflect/get-prototype-of.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/reflect/get-prototype-of.js")},"./node_modules/@babel/runtime-corejs3/core-js-stable/symbol.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/stable/symbol/index.js")},"./node_modules/@babel/runtime-corejs3/core-js/array/from.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/features/array/from.js")},"./node_modules/@babel/runtime-corejs3/core-js/array/is-array.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/features/array/is-array.js")},"./node_modules/@babel/runtime-corejs3/core-js/get-iterator-method.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/features/get-iterator-method.js")},"./node_modules/@babel/runtime-corejs3/core-js/get-iterator.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/features/get-iterator.js")},"./node_modules/@babel/runtime-corejs3/core-js/instance/slice.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/features/instance/slice.js")},"./node_modules/@babel/runtime-corejs3/core-js/object/create.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/features/object/create.js")},"./node_modules/@babel/runtime-corejs3/core-js/object/define-property.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/features/object/define-property.js")},"./node_modules/@babel/runtime-corejs3/core-js/object/get-own-property-descriptor.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/features/object/get-own-property-descriptor.js")},"./node_modules/@babel/runtime-corejs3/core-js/object/get-prototype-of.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/features/object/get-prototype-of.js")},"./node_modules/@babel/runtime-corejs3/core-js/object/set-prototype-of.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/features/object/set-prototype-of.js")},"./node_modules/@babel/runtime-corejs3/core-js/promise.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/features/promise/index.js")},"./node_modules/@babel/runtime-corejs3/core-js/reflect/get.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/features/reflect/get.js")},"./node_modules/@babel/runtime-corejs3/core-js/symbol.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/features/symbol/index.js")},"./node_modules/@babel/runtime-corejs3/core-js/symbol/iterator.js":function(A,e,t){A.exports=t("./node_modules/core-js-pure/features/symbol/iterator.js")},"./node_modules/@babel/runtime-corejs3/helpers/esm/arrayLikeToArray.js":function(A,e,t){"use strict";function r(A,e){(null==e||e>A.length)&&(e=A.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=A[t];return r}t.r(e),t.d(e,{default:function(){return r}})},"./node_modules/@babel/runtime-corejs3/helpers/esm/arrayWithHoles.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return n}});var r=t("./node_modules/@babel/runtime-corejs3/core-js/array/is-array.js");function n(A){if(r(A))return A}},"./node_modules/@babel/runtime-corejs3/helpers/esm/arrayWithoutHoles.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return o}});var r=t("./node_modules/@babel/runtime-corejs3/core-js/array/is-array.js"),n=t("./node_modules/@babel/runtime-corejs3/helpers/esm/arrayLikeToArray.js");function o(A){if(r(A))return(0,n.default)(A)}},"./node_modules/@babel/runtime-corejs3/helpers/esm/assertThisInitialized.js":function(A,e,t){"use strict";function r(A){if(void 0===A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}t.r(e),t.d(e,{default:function(){return r}})},"./node_modules/@babel/runtime-corejs3/helpers/esm/asyncToGenerator.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return o}});var r=t("./node_modules/@babel/runtime-corejs3/core-js/promise.js");function n(A,e,t,n,o,s,i){try{var a=A[s](i),u=a.value}catch(A){return void t(A)}a.done?e(u):r.resolve(u).then(n,o)}function o(A){return function(){var e=this,t=arguments;return new r((function(r,o){var s=A.apply(e,t);function i(A){n(s,r,o,i,a,"next",A)}function a(A){n(s,r,o,i,a,"throw",A)}i(void 0)}))}}},"./node_modules/@babel/runtime-corejs3/helpers/esm/classCallCheck.js":function(A,e,t){"use strict";function r(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}t.r(e),t.d(e,{default:function(){return r}})},"./node_modules/@babel/runtime-corejs3/helpers/esm/createClass.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return o}});var r=t("./node_modules/@babel/runtime-corejs3/core-js/object/define-property.js");function n(A,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),r(A,n.key,n)}}function o(A,e,t){return e&&n(A.prototype,e),t&&n(A,t),A}},"./node_modules/@babel/runtime-corejs3/helpers/esm/defineProperty.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return n}});var r=t("./node_modules/@babel/runtime-corejs3/core-js/object/define-property.js");function n(A,e,t){return e in A?r(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}},"./node_modules/@babel/runtime-corejs3/helpers/esm/get.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return s}});var r=t("./node_modules/@babel/runtime-corejs3/core-js/reflect/get.js"),n=t("./node_modules/@babel/runtime-corejs3/core-js/object/get-own-property-descriptor.js"),o=t("./node_modules/@babel/runtime-corejs3/helpers/esm/superPropBase.js");function s(A,e,t){return(s="undefined"!=typeof Reflect&&r?r:function(A,e,t){var r=(0,o.default)(A,e);if(r){var s=n(r,e);return s.get?s.get.call(t):s.value}})(A,e,t||A)}},"./node_modules/@babel/runtime-corejs3/helpers/esm/getPrototypeOf.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return o}});var r=t("./node_modules/@babel/runtime-corejs3/core-js/object/set-prototype-of.js"),n=t("./node_modules/@babel/runtime-corejs3/core-js/object/get-prototype-of.js");function o(A){return(o=r?n:function(A){return A.__proto__||n(A)})(A)}},"./node_modules/@babel/runtime-corejs3/helpers/esm/inherits.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return o}});var r=t("./node_modules/@babel/runtime-corejs3/core-js/object/create.js"),n=t("./node_modules/@babel/runtime-corejs3/helpers/esm/setPrototypeOf.js");function o(A,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");A.prototype=r(e&&e.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),e&&(0,n.default)(A,e)}},"./node_modules/@babel/runtime-corejs3/helpers/esm/iterableToArray.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return s}});var r=t("./node_modules/@babel/runtime-corejs3/core-js/symbol.js"),n=t("./node_modules/@babel/runtime-corejs3/core-js/get-iterator-method.js"),o=t("./node_modules/@babel/runtime-corejs3/core-js/array/from.js");function s(A){if(void 0!==r&&null!=n(A)||null!=A["@@iterator"])return o(A)}},"./node_modules/@babel/runtime-corejs3/helpers/esm/iterableToArrayLimit.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return o}});var r=t("./node_modules/@babel/runtime-corejs3/core-js/symbol.js"),n=t("./node_modules/@babel/runtime-corejs3/core-js/get-iterator-method.js");function o(A,e){var t=null==A?null:void 0!==r&&n(A)||A["@@iterator"];if(null!=t){var o,s,i=[],a=!0,u=!1;try{for(t=t.call(A);!(a=(o=t.next()).done)&&(i.push(o.value),!e||i.length!==e);a=!0);}catch(A){u=!0,s=A}finally{try{a||null==t.return||t.return()}finally{if(u)throw s}}return i}}},"./node_modules/@babel/runtime-corejs3/helpers/esm/nonIterableRest.js":function(A,e,t){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}t.r(e),t.d(e,{default:function(){return r}})},"./node_modules/@babel/runtime-corejs3/helpers/esm/nonIterableSpread.js":function(A,e,t){"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}t.r(e),t.d(e,{default:function(){return r}})},"./node_modules/@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return o}});var r=t("./node_modules/@babel/runtime-corejs3/helpers/esm/typeof.js"),n=t("./node_modules/@babel/runtime-corejs3/helpers/esm/assertThisInitialized.js");function o(A,e){return!e||"object"!==(0,r.default)(e)&&"function"!=typeof e?(0,n.default)(A):e}},"./node_modules/@babel/runtime-corejs3/helpers/esm/setPrototypeOf.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return n}});var r=t("./node_modules/@babel/runtime-corejs3/core-js/object/set-prototype-of.js");function n(A,e){return(n=r||function(A,e){return A.__proto__=e,A})(A,e)}},"./node_modules/@babel/runtime-corejs3/helpers/esm/slicedToArray.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return i}});var r=t("./node_modules/@babel/runtime-corejs3/helpers/esm/arrayWithHoles.js"),n=t("./node_modules/@babel/runtime-corejs3/helpers/esm/iterableToArrayLimit.js"),o=t("./node_modules/@babel/runtime-corejs3/helpers/esm/unsupportedIterableToArray.js"),s=t("./node_modules/@babel/runtime-corejs3/helpers/esm/nonIterableRest.js");function i(A,e){return(0,r.default)(A)||(0,n.default)(A,e)||(0,o.default)(A,e)||(0,s.default)()}},"./node_modules/@babel/runtime-corejs3/helpers/esm/superPropBase.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return n}});var r=t("./node_modules/@babel/runtime-corejs3/helpers/esm/getPrototypeOf.js");function n(A,e){for(;!Object.prototype.hasOwnProperty.call(A,e)&&null!==(A=(0,r.default)(A)););return A}},"./node_modules/@babel/runtime-corejs3/helpers/esm/toConsumableArray.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return i}});var r=t("./node_modules/@babel/runtime-corejs3/helpers/esm/arrayWithoutHoles.js"),n=t("./node_modules/@babel/runtime-corejs3/helpers/esm/iterableToArray.js"),o=t("./node_modules/@babel/runtime-corejs3/helpers/esm/unsupportedIterableToArray.js"),s=t("./node_modules/@babel/runtime-corejs3/helpers/esm/nonIterableSpread.js");function i(A){return(0,r.default)(A)||(0,n.default)(A)||(0,o.default)(A)||(0,s.default)()}},"./node_modules/@babel/runtime-corejs3/helpers/esm/typeof.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return o}});var r=t("./node_modules/@babel/runtime-corejs3/core-js/symbol.js"),n=t("./node_modules/@babel/runtime-corejs3/core-js/symbol/iterator.js");function o(A){return(o="function"==typeof r&&"symbol"==typeof n?function(A){return typeof A}:function(A){return A&&"function"==typeof r&&A.constructor===r&&A!==r.prototype?"symbol":typeof A})(A)}},"./node_modules/@babel/runtime-corejs3/helpers/esm/unsupportedIterableToArray.js":function(A,e,t){"use strict";t.r(e),t.d(e,{default:function(){return s}});var r=t("./node_modules/@babel/runtime-corejs3/core-js/instance/slice.js"),n=t("./node_modules/@babel/runtime-corejs3/core-js/array/from.js"),o=t("./node_modules/@babel/runtime-corejs3/helpers/esm/arrayLikeToArray.js");function s(A,e){var t;if(A){if("string"==typeof A)return(0,o.default)(A,e);var s=r(t=Object.prototype.toString.call(A)).call(t,8,-1);return"Object"===s&&A.constructor&&(s=A.constructor.name),"Map"===s||"Set"===s?n(A):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?(0,o.default)(A,e):void 0}}},"./node_modules/@babel/runtime-corejs3/regenerator/index.js":function(A,e,t){A.exports=t("./node_modules/regenerator-runtime/runtime.js")},"./node_modules/@babel/runtime/helpers/esm/typeof.js":function(A,e,t){"use strict";function r(A){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(A)}t.r(e),t.d(e,{default:function(){return r}})},"./src/plugin/hyperlinks.js":function(A,e,t){"use strict";t.r(e),t("./node_modules/core-js/modules/web.dom-collections.for-each.js"),t("./node_modules/core-js/modules/es.string.link.js");var r=t("./src/worker.js"),n=t("./src/utils.js"),o=[],s={toContainer:r.default.prototype.toContainer,toPdf:r.default.prototype.toPdf};r.default.prototype.toContainer=function(){return s.toContainer.call(this).then((function(){if(this.opt.enableLinks){var A=this.prop.container,e=A.querySelectorAll("a"),t=(0,n.unitConvert)(A.getBoundingClientRect(),this.prop.pageSize.k);o=[],Array.prototype.forEach.call(e,(function(A){for(var e=A.getClientRects(),r=0;r<e.length;r++){var s=(0,n.unitConvert)(e[r],this.prop.pageSize.k);s.left-=t.left,s.top-=t.top;var i=Math.floor(s.top/this.prop.pageSize.inner.height)+1,a=this.opt.margin[0]+s.top%this.prop.pageSize.inner.height,u=this.opt.margin[1]+s.left;o.push({page:i,top:a,left:u,clientRect:s,link:A})}}),this)}}))},r.default.prototype.toPdf=function(){return s.toPdf.call(this).then((function(){if(this.opt.enableLinks){o.forEach((function(A){this.prop.pdf.setPage(A.page),this.prop.pdf.link(A.left,A.top,A.clientRect.width,A.clientRect.height,{url:A.link.href})}),this);var A=this.prop.pdf.internal.getNumberOfPages();this.prop.pdf.setPage(A)}}))}},"./src/plugin/jspdf-plugin.js":function(A,e,t){"use strict";t.r(e),t("./node_modules/core-js/modules/es.symbol.js"),t("./node_modules/core-js/modules/es.symbol.description.js"),t("./node_modules/core-js/modules/es.object.to-string.js"),t("./node_modules/core-js/modules/es.symbol.iterator.js"),t("./node_modules/core-js/modules/es.array.iterator.js"),t("./node_modules/core-js/modules/es.string.iterator.js"),t("./node_modules/core-js/modules/web.dom-collections.iterator.js");var r=t("./node_modules/jspdf/dist/jspdf.es.min.js");function n(A){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(A)}r.jsPDF.getPageSize=function(A,e,t){if("object"===n(A)){var r=A;A=r.orientation,e=r.unit||e,t=r.format||t}e=e||"mm",t=t||"a4",A=(""+(A||"P")).toLowerCase();var o=(""+t).toLowerCase(),s={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(e){case"pt":var i=1;break;case"mm":i=72/25.4;break;case"cm":i=72/2.54;break;case"in":i=72;break;case"px":i=.75;break;case"pc":case"em":i=12;break;case"ex":i=6;break;default:throw"Invalid unit: "+e}if(s.hasOwnProperty(o))var a=s[o][1]/i,u=s[o][0]/i;else try{a=t[1],u=t[0]}catch(A){throw new Error("Invalid format: "+t)}if("p"===A||"portrait"===A){if(A="p",u>a){var c=u;u=a,a=c}}else{if("l"!==A&&"landscape"!==A)throw"Invalid orientation: "+A;A="l",a>u&&(c=u,u=a,a=c)}return{width:u,height:a,unit:e,k:i}},e.default=r.jsPDF},"./src/plugin/pagebreaks.js":function(A,e,t){"use strict";t.r(e),t("./node_modules/core-js/modules/es.array.concat.js"),t("./node_modules/core-js/modules/es.array.slice.js"),t("./node_modules/core-js/modules/es.array.join.js"),t("./node_modules/core-js/modules/web.dom-collections.for-each.js"),t("./node_modules/core-js/modules/es.object.keys.js");var r=t("./src/worker.js"),n=t("./src/utils.js"),o={toContainer:r.default.prototype.toContainer};r.default.template.opt.pagebreak={mode:["css","legacy"],before:[],after:[],avoid:[]},r.default.prototype.toContainer=function(){return o.toContainer.call(this).then((function(){var A=this.prop.container,e=this.prop.pageSize.inner.px.height,t=[].concat(this.opt.pagebreak.mode),r={avoidAll:-1!==t.indexOf("avoid-all"),css:-1!==t.indexOf("css"),legacy:-1!==t.indexOf("legacy")},o={},s=this;["before","after","avoid"].forEach((function(e){var t=r.avoidAll&&"avoid"===e;o[e]=t?[]:[].concat(s.opt.pagebreak[e]||[]),o[e].length>0&&(o[e]=Array.prototype.slice.call(A.querySelectorAll(o[e].join(", "))))}));var i=A.querySelectorAll(".html2pdf__page-break");i=Array.prototype.slice.call(i);var a=A.querySelectorAll("*");Array.prototype.forEach.call(a,(function(A){var t={before:!1,after:r.legacy&&-1!==i.indexOf(A),avoid:r.avoidAll};if(r.css){var s=window.getComputedStyle(A),a=["always","page","left","right"];t={before:t.before||-1!==a.indexOf(s.breakBefore||s.pageBreakBefore),after:t.after||-1!==a.indexOf(s.breakAfter||s.pageBreakAfter),avoid:t.avoid||-1!==["avoid","avoid-page"].indexOf(s.breakInside||s.pageBreakInside)}}Object.keys(t).forEach((function(e){t[e]=t[e]||-1!==o[e].indexOf(A)}));var u=A.getBoundingClientRect();if(t.avoid&&!t.before){var c=Math.floor(u.top/e),l=Math.floor(u.bottom/e),d=Math.abs(u.bottom-u.top)/e;l!==c&&d<=1&&(t.before=!0)}if(t.before){var f=(0,n.createElement)("div",{style:{display:"block",height:e-u.top%e+"px"}});A.parentNode.insertBefore(f,A)}t.after&&(f=(0,n.createElement)("div",{style:{display:"block",height:e-u.bottom%e+"px"}}),A.parentNode.insertBefore(f,A.nextSibling))}))}))}},"./src/utils.js":function(A,e,t){"use strict";function r(A){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(A)}t.r(e),t.d(e,{objType:function(){return n},createElement:function(){return o},cloneNode:function(){return s},unitConvert:function(){return i},toPx:function(){return a}}),t("./node_modules/core-js/modules/es.number.constructor.js"),t("./node_modules/core-js/modules/es.symbol.js"),t("./node_modules/core-js/modules/es.symbol.description.js"),t("./node_modules/core-js/modules/es.object.to-string.js"),t("./node_modules/core-js/modules/es.symbol.iterator.js"),t("./node_modules/core-js/modules/es.array.iterator.js"),t("./node_modules/core-js/modules/es.string.iterator.js"),t("./node_modules/core-js/modules/web.dom-collections.iterator.js");var n=function(A){var e=r(A);return"undefined"===e?"undefined":"string"===e||A instanceof String?"string":"number"===e||A instanceof Number?"number":"function"===e||A instanceof Function?"function":A&&A.constructor===Array?"array":A&&1===A.nodeType?"element":"object"===e?"object":"unknown"},o=function(A,e){var t=document.createElement(A);if(e.className&&(t.className=e.className),e.innerHTML){t.innerHTML=e.innerHTML;for(var r=t.getElementsByTagName("script"),n=r.length;n-- >0;null)r[n].parentNode.removeChild(r[n])}for(var o in e.style)t.style[o]=e.style[o];return t},s=function A(e,t){for(var r=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(!1),n=e.firstChild;n;n=n.nextSibling)!0!==t&&1===n.nodeType&&"SCRIPT"===n.nodeName||r.appendChild(A(n,t));return 1===e.nodeType&&("CANVAS"===e.nodeName?(r.width=e.width,r.height=e.height,r.getContext("2d").drawImage(e,0,0)):"TEXTAREA"!==e.nodeName&&"SELECT"!==e.nodeName||(r.value=e.value),r.addEventListener("load",(function(){r.scrollTop=e.scrollTop,r.scrollLeft=e.scrollLeft}),!0)),r},i=function(A,e){if("number"===n(A))return 72*A/96/e;var t={};for(var r in A)t[r]=72*A[r]/96/e;return t},a=function(A,e){return Math.floor(A*e/72*96)}},"./src/worker.js":function(A,e,t){"use strict";t.r(e),t("./node_modules/core-js/modules/es.object.assign.js"),t("./node_modules/core-js/modules/es.array.map.js"),t("./node_modules/core-js/modules/es.object.keys.js"),t("./node_modules/core-js/modules/es.array.concat.js"),t("./node_modules/core-js/modules/es.object.to-string.js"),t("./node_modules/core-js/modules/es.regexp.to-string.js"),t("./node_modules/core-js/modules/es.function.name.js"),t("./node_modules/core-js/modules/web.dom-collections.for-each.js");var r=t("./node_modules/jspdf/dist/jspdf.es.min.js"),n=t("./node_modules/html2canvas-pro/dist/html2canvas-pro.js"),o=t("./src/utils.js"),s=t("./node_modules/es6-promise/dist/es6-promise.js"),i=t.n(s)().Promise,a=function A(e){var t=Object.assign(A.convert(i.resolve()),JSON.parse(JSON.stringify(A.template))),r=A.convert(i.resolve(),t);return(r=r.setProgress(1,A,1,[A])).set(e)};(a.prototype=Object.create(i.prototype)).constructor=a,a.convert=function(A,e){return A.__proto__=e||a.prototype,A},a.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],image:{type:"jpeg",quality:.95},enableLinks:!0,html2canvas:{},jsPDF:{}}},a.prototype.from=function(A,e){return this.then((function(){switch(e=e||function(A){switch((0,o.objType)(A)){case"string":return"string";case"element":return A.nodeName.toLowerCase&&"canvas"===A.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(A)){case"string":return this.set({src:(0,o.createElement)("div",{innerHTML:A})});case"element":return this.set({src:A});case"canvas":return this.set({canvas:A});case"img":return this.set({img:A});default:return this.error("Unknown source type.")}}))},a.prototype.to=function(A){switch(A){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},a.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then((function(){var A={position:"fixed",overflow:"hidden",zIndex:1e3,left:0,right:0,bottom:0,top:0,backgroundColor:"rgba(0,0,0,0.8)"},e={position:"absolute",width:this.prop.pageSize.inner.width+this.prop.pageSize.unit,left:0,right:0,top:0,height:"auto",margin:"auto",backgroundColor:"white"};A.opacity=0;var t=(0,o.cloneNode)(this.prop.src,this.opt.html2canvas.javascriptEnabled);this.prop.overlay=(0,o.createElement)("div",{className:"html2pdf__overlay",style:A}),this.prop.container=(0,o.createElement)("div",{className:"html2pdf__container",style:e}),this.prop.container.appendChild(t),this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay)}))},a.prototype.toCanvas=function(){var A=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(A).then((function(){var A=Object.assign({},this.opt.html2canvas);return delete A.onrendered,n(this.prop.container,A)})).then((function(A){(this.opt.html2canvas.onrendered||function(){})(A),this.prop.canvas=A,document.body.removeChild(this.prop.overlay)}))},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then((function(){var A=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=A}))},a.prototype.toPdf=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()},function(){return this.prop.pageSize||this.setPageSize()}]).then((function(){var A=this.prop.canvas,e=this.opt,t=A.height,n=Math.floor(A.width*this.prop.pageSize.inner.ratio),o=Math.ceil(t/n),s=this.prop.pageSize.inner.height,i=document.createElement("canvas"),a=i.getContext("2d");i.width=A.width,i.height=n,this.prop.pdf=this.prop.pdf||new r.jsPDF(e.jsPDF);for(var u=0;u<o;u++){u===o-1&&t%n!=0&&(i.height=t%n,s=i.height*this.prop.pageSize.inner.width/i.width);var c=i.width,l=i.height;a.fillStyle="white",a.fillRect(0,0,c,l),a.drawImage(A,0,u*n,c,l,0,0,c,l),u&&this.prop.pdf.addPage();var d=i.toDataURL("image/"+e.image.type,e.image.quality);this.prop.pdf.addImage(d,e.image.type,e.margin[1],e.margin[0],this.prop.pageSize.inner.width,s)}}))},a.prototype.output=function(A,e,t){return"img"===(t=t||"pdf").toLowerCase()||"image"===t.toLowerCase()?this.outputImg(A,e):this.outputPdf(A,e)},a.prototype.outputPdf=function(A,e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){return this.prop.pdf.output(A,e)}))},a.prototype.outputImg=function(A,e){return this.thenList([function(){return this.prop.img||this.toImg()}]).then((function(){switch(A){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+A+'" is not supported.'}}))},a.prototype.save=function(A){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(A?{filename:A}:null).then((function(){this.prop.pdf.save(this.opt.filename)}))},a.prototype.set=function(A){if("object"!==(0,o.objType)(A))return this;var e=Object.keys(A||{}).map((function(e){switch(e){case"margin":return this.setMargin.bind(this,A.margin);case"jsPDF":return function(){return this.opt.jsPDF=A.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,A.pageSize);default:return e in a.template.prop?function(){this.prop[e]=A[e]}:function(){this.opt[e]=A[e]}}}),this);return this.then((function(){return this.thenList(e)}))},a.prototype.get=function(A,e){return this.then((function(){var t=A in a.template.prop?this.prop[A]:this.opt[A];return e?e(t):t}))},a.prototype.setMargin=function(A){return this.then((function(){switch((0,o.objType)(A)){case"number":A=[A,A,A,A];case"array":if(2===A.length&&(A=[A[0],A[1],A[0],A[1]]),4===A.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=A})).then(this.setPageSize)},a.prototype.setPageSize=function(A){return this.then((function(){(A=A||r.jsPDF.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(A.inner={width:A.width-this.opt.margin[1]-this.opt.margin[3],height:A.height-this.opt.margin[0]-this.opt.margin[2]},A.inner.px={width:(0,o.toPx)(A.inner.width,A.k),height:(0,o.toPx)(A.inner.height,A.k)},A.inner.ratio=A.inner.height/A.inner.width),this.prop.pageSize=A}))},a.prototype.setProgress=function(A,e,t,r){return null!=A&&(this.progress.val=A),null!=e&&(this.progress.state=e),null!=t&&(this.progress.n=t),null!=r&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(A,e,t,r){return this.setProgress(A?this.progress.val+A:null,e||null,t?this.progress.n+t:null,r?this.progress.stack.concat(r):null)},a.prototype.then=function(A,e){var t=this;return this.thenCore(A,e,(function(A,e){return t.updateProgress(null,null,1,[A]),i.prototype.then.call(this,(function(e){return t.updateProgress(null,A),e})).then(A,e).then((function(A){return t.updateProgress(1),A}))}))},a.prototype.thenCore=function(A,e,t){t=t||i.prototype.then;var r=this;A&&(A=A.bind(r)),e&&(e=e.bind(r));var n=-1!==i.toString().indexOf("[native code]")&&"Promise"===i.name?r:a.convert(Object.assign({},r),i.prototype),o=t.call(n,A,e);return a.convert(o,r.__proto__)},a.prototype.thenExternal=function(A,e){return i.prototype.then.call(this,A,e)},a.prototype.thenList=function(A){var e=this;return A.forEach((function(A){e=e.thenCore(A)})),e},a.prototype.catch=function(A){A&&(A=A.bind(this));var e=i.prototype.catch.call(this,A);return a.convert(e,this)},a.prototype.catchExternal=function(A){return i.prototype.catch.call(this,A)},a.prototype.error=function(A){return this.then((function(){throw new Error(A)}))},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,e.default=a},"./node_modules/canvg/lib/index.es.js":function(A,e,t){"use strict";t.r(e),t.d(e,{AElement:function(){return pt},AnimateColorElement:function(){return it},AnimateElement:function(){return st},AnimateTransformElement:function(){return at},BoundingBox:function(){return De},CB1:function(){return ie},CB2:function(){return ae},CB3:function(){return ue},CB4:function(){return ce},Canvg:function(){return zt},CircleElement:function(){return Xe},ClipPathElement:function(){return Nt},DefsElement:function(){return At},DescElement:function(){return kt},Document:function(){return Rt},Element:function(){return Ne},EllipseElement:function(){return Je},FeColorMatrixElement:function(){return xt},FeCompositeElement:function(){return Tt},FeDropShadowElement:function(){return St},FeGaussianBlurElement:function(){return Ot},FeMorphologyElement:function(){return Lt},FilterElement:function(){return It},Font:function(){return Oe},FontElement:function(){return ct},FontFaceElement:function(){return lt},GElement:function(){return et},GlyphElement:function(){return ft},GradientElement:function(){return tt},ImageElement:function(){return yt},LineElement:function(){return We},LinearGradientElement:function(){return rt},MarkerElement:function(){return $e},MaskElement:function(){return _t},Matrix:function(){return je},MissingGlyphElement:function(){return dt},Mouse:function(){return Be},PSEUDO_ZERO:function(){return re},Parser:function(){return be},PathElement:function(){return Ve},PathParser:function(){return Re},PatternElement:function(){return Ze},Point:function(){return ge},PolygonElement:function(){return Ye},PolylineElement:function(){return qe},Property:function(){return he},QB1:function(){return le},QB2:function(){return de},QB3:function(){return fe},RadialGradientElement:function(){return nt},RectElement:function(){return ze},RenderedElement:function(){return ke},Rotate:function(){return Ue},SVGElement:function(){return Ge},SVGFontLoader:function(){return Qt},Scale:function(){return Fe},Screen:function(){return ye},Skew:function(){return Ee},SkewX:function(){return xe},SkewY:function(){return _e},StopElement:function(){return ot},StyleElement:function(){return bt},SymbolElement:function(){return vt},TRefElement:function(){return ht},TSpanElement:function(){return Me},TextElement:function(){return Pe},TextPathElement:function(){return wt},TitleElement:function(){return Dt},Transform:function(){return He},Translate:function(){return Ce},UnknownElement:function(){return Ie},UseElement:function(){return Ct},ViewPort:function(){return pe},compressSpaces:function(){return PA},getSelectorSpecificity:function(){return te},normalizeAttributeName:function(){return GA},normalizeColor:function(){return XA},parseExternalUrl:function(){return zA},presets:function(){return Xt},toNumbers:function(){return RA},trimLeft:function(){return MA},trimRight:function(){return KA},vectorMagnitude:function(){return ne},vectorsAngle:function(){return se},vectorsRatio:function(){return oe}});var r=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/starts-with.js"),n=t.n(r),o=t("./node_modules/@babel/runtime-corejs3/core-js-stable/parse-float.js"),s=t.n(o),i=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js"),a=t.n(i),u=t("./node_modules/@babel/runtime-corejs3/helpers/esm/slicedToArray.js"),c=t("./node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js"),l=t.n(c),d=t("./node_modules/@babel/runtime-corejs3/core-js-stable/object/define-properties.js"),f=t.n(d),h=t("./node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors.js"),p=t.n(h),g=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/for-each.js"),B=t.n(g),m=t("./node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js"),w=t.n(m),y=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js"),v=t.n(y),Q=t("./node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols.js"),b=t.n(Q),C=t("./node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js"),U=t.n(C),F=t("./node_modules/@babel/runtime-corejs3/regenerator/index.js"),j=t.n(F),E=t("./node_modules/@babel/runtime-corejs3/helpers/esm/asyncToGenerator.js"),x=t("./node_modules/@babel/runtime-corejs3/helpers/esm/defineProperty.js"),_=t("./node_modules/@babel/runtime-corejs3/helpers/esm/classCallCheck.js"),H=t("./node_modules/@babel/runtime-corejs3/helpers/esm/createClass.js"),N=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js"),I=t.n(N),S=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/reduce.js"),L=t.n(S),T=t("./node_modules/@babel/runtime-corejs3/core-js-stable/date/now.js"),O=t.n(T),D=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/every.js"),k=t.n(D),P=t("./node_modules/@babel/runtime-corejs3/core-js-stable/promise.js"),M=t.n(P),K=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/bind.js"),R=t.n(K),V=t("./node_modules/raf/index.js"),G=t.n(V),z=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/trim.js"),X=t.n(z),J=t("./node_modules/rgbcolor/index.js"),W=t.n(J),q=t("./node_modules/@babel/runtime-corejs3/core-js-stable/reflect/construct.js"),Y=t.n(q),Z=t("./node_modules/@babel/runtime-corejs3/helpers/esm/inherits.js"),$=t("./node_modules/@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn.js"),AA=t("./node_modules/@babel/runtime-corejs3/helpers/esm/getPrototypeOf.js"),eA=t("./node_modules/@babel/runtime-corejs3/helpers/esm/toConsumableArray.js"),tA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/some.js"),rA=t.n(tA),nA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/includes.js"),oA=t.n(nA),sA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/array/from.js"),iA=t.n(sA),aA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/reverse.js"),uA=t.n(aA),cA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js"),lA=t.n(cA),dA=t("./node_modules/@babel/runtime-corejs3/helpers/esm/get.js"),fA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/fill.js"),hA=t.n(fA),pA=t("./node_modules/svg-pathdata/lib/SVGPathData.module.js"),gA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/reflect/delete-property.js"),BA=t.n(gA),mA=t("./node_modules/@babel/runtime-corejs3/helpers/esm/assertThisInitialized.js"),wA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/values.js"),yA=t.n(wA),vA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/parse-int.js"),QA=t.n(vA),bA=t("./node_modules/@babel/runtime-corejs3/core-js/get-iterator.js"),CA=t.n(bA),UA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js"),FA=t.n(UA),jA=t("./node_modules/@babel/runtime-corejs3/core-js/get-iterator-method.js"),EA=t.n(jA),xA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/symbol.js"),_A=t.n(xA),HA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js"),NA=t.n(HA),IA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/map.js"),SA=t.n(IA),LA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/reflect/apply.js"),TA=t.n(LA),OA=t("./node_modules/@babel/runtime-corejs3/core-js-stable/reflect/get-prototype-of.js"),DA=t.n(OA),kA=t("./node_modules/stackblur-canvas/dist/stackblur-es.js");function PA(A){return A.replace(/(?!\u3000)\s+/gm," ")}function MA(A){return A.replace(/^[\n \t]+/,"")}function KA(A){return A.replace(/[\n \t]+$/,"")}function RA(A){var e=(A||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return a()(e).call(e,s())}var VA=/^[A-Z-]+$/;function GA(A){return VA.test(A)?A.toLowerCase():A}function zA(A){var e=A.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/)||[];return e[2]||e[3]||e[4]}function XA(A){if(!n()(A).call(A,"rgb"))return A;var e=3;return A.replace(/\d+(\.\d+)?/g,(function(A,t){return e--&&t?String(Math.round(s()(A))):A}))}var JA=/(\[[^\]]+\])/g,WA=/(#[^\s\+>~\.\[:]+)/g,qA=/(\.[^\s\+>~\.\[:]+)/g,YA=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,ZA=/(:[\w-]+\([^\)]*\))/gi,$A=/(:[^\s\+>~\.\[:]+)/g,Ae=/([^\s\+>~\.\[:]+)/g;function ee(A,e){var t=A.match(e);return t?[A.replace(e," "),t.length]:[A,0]}function te(A){var e=[0,0,0],t=A.replace(/:not\(([^\)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),r=0,n=ee(t,JA),o=(0,u.default)(n,2);t=o[0],r=o[1],e[1]+=r;var s=ee(t,WA),i=(0,u.default)(s,2);t=i[0],r=i[1],e[0]+=r;var a=ee(t,qA),c=(0,u.default)(a,2);t=c[0],r=c[1],e[1]+=r;var l=ee(t,YA),d=(0,u.default)(l,2);t=d[0],r=d[1],e[2]+=r;var f=ee(t,ZA),h=(0,u.default)(f,2);t=h[0],r=h[1],e[1]+=r;var p=ee(t,$A),g=(0,u.default)(p,2);t=g[0],r=g[1],e[1]+=r;var B=ee(t=t.replace(/[\*\s\+>~]/g," ").replace(/[#\.]/g," "),Ae),m=(0,u.default)(B,2);return t=m[0],r=m[1],e[2]+=r,e.join("")}var re=1e-8;function ne(A){return Math.sqrt(Math.pow(A[0],2)+Math.pow(A[1],2))}function oe(A,e){return(A[0]*e[0]+A[1]*e[1])/(ne(A)*ne(e))}function se(A,e){return(A[0]*e[1]<A[1]*e[0]?-1:1)*Math.acos(oe(A,e))}function ie(A){return A*A*A}function ae(A){return 3*A*A*(1-A)}function ue(A){return 3*A*(1-A)*(1-A)}function ce(A){return(1-A)*(1-A)*(1-A)}function le(A){return A*A}function de(A){return 2*A*(1-A)}function fe(A){return(1-A)*(1-A)}var he=function(){function A(e,t,r){(0,_.default)(this,A),this.document=e,this.name=t,this.value=r,this.isNormalizedColor=!1}return(0,H.default)(A,[{key:"split",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ",n=this.document,o=this.name;return a()(e=X()(t=PA(this.getString())).call(t).split(r)).call(e,(function(e){return new A(n,o,e)}))}},{key:"hasValue",value:function(A){var e=this.value;return null!==e&&""!==e&&(A||0!==e)&&void 0!==e}},{key:"isString",value:function(A){var e=this.value,t="string"==typeof e;return t&&A?A.test(e):t}},{key:"isUrlDefinition",value:function(){return this.isString(/^url\(/)}},{key:"isPixels",value:function(){if(!this.hasValue())return!1;var A=this.getString();switch(!0){case/px$/.test(A):case/^[0-9]+$/.test(A):return!0;default:return!1}}},{key:"setValue",value:function(A){return this.value=A,this}},{key:"getValue",value:function(A){return void 0===A||this.hasValue()?this.value:A}},{key:"getNumber",value:function(A){if(!this.hasValue())return void 0===A?0:s()(A);var e=this.value,t=s()(e);return this.isString(/%$/)&&(t/=100),t}},{key:"getString",value:function(A){return void 0===A||this.hasValue()?void 0===this.value?"":String(this.value):String(A)}},{key:"getColor",value:function(A){var e=this.getString(A);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=XA(e),this.value=e),e}},{key:"getDpi",value:function(){return 96}},{key:"getRem",value:function(){return this.document.rootEmSize}},{key:"getEm",value:function(){return this.document.emSize}},{key:"getUnits",value:function(){return this.getString().replace(/[0-9\.\-]/g,"")}},{key:"getPixels",value:function(A){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var t="boolean"==typeof A?[void 0,A]:[A],r=(0,u.default)(t,2),n=r[0],o=r[1],s=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(s.computeSize("x"),s.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(s.computeSize("x"),s.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*s.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*s.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&o:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*s.computeSize(n);default:var i=this.getNumber();return e&&i<1?i*s.computeSize(n):i}}},{key:"getMilliseconds",value:function(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}},{key:"getRadians",value:function(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}},{key:"getDefinition",value:function(){var A=this.getString(),e=A.match(/#([^\)'"]+)/);return e&&(e=e[1]),e||(e=A),this.document.definitions[e]}},{key:"getFillStyleDefinition",value:function(A,e){var t=this.getDefinition();if(!t)return null;if("function"==typeof t.createGradient)return t.createGradient(this.document.ctx,A,e);if("function"==typeof t.createPattern){if(t.getHrefAttribute().hasValue()){var r=t.getAttribute("patternTransform");t=t.getHrefAttribute().getDefinition(),r.hasValue()&&t.getAttribute("patternTransform",!0).setValue(r.value)}return t.createPattern(this.document.ctx,A,e)}return null}},{key:"getTextBaseline",value:function(){return this.hasValue()?A.textBaselineMapping[this.getString()]:null}},{key:"addOpacity",value:function(e){for(var t=this.getColor(),r=t.length,n=0,o=0;o<r&&(","===t[o]&&n++,3!==n);o++);if(e.hasValue()&&this.isString()&&3!==n){var s=new(W())(t);s.ok&&(s.alpha=e.getNumber(),t=s.toRGBA())}return new A(this.document,this.name,t)}}],[{key:"empty",value:function(e){return new A(e,"EMPTY","")}}]),A}();he.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};var pe=function(){function A(){(0,_.default)(this,A),this.viewPorts=[]}return(0,H.default)(A,[{key:"clear",value:function(){this.viewPorts=[]}},{key:"setCurrent",value:function(A,e){this.viewPorts.push({width:A,height:e})}},{key:"removeCurrent",value:function(){this.viewPorts.pop()}},{key:"getCurrent",value:function(){var A=this.viewPorts;return A[A.length-1]}},{key:"computeSize",value:function(A){return"number"==typeof A?A:"x"===A?this.width:"y"===A?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}},{key:"width",get:function(){return this.getCurrent().width}},{key:"height",get:function(){return this.getCurrent().height}}]),A}(),ge=function(){function A(e,t){(0,_.default)(this,A),this.x=e,this.y=t}return(0,H.default)(A,[{key:"angleTo",value:function(A){return Math.atan2(A.y-this.y,A.x-this.x)}},{key:"applyTransform",value:function(A){var e=this.x,t=this.y,r=e*A[0]+t*A[2]+A[4],n=e*A[1]+t*A[3]+A[5];this.x=r,this.y=n}}],[{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=RA(e),n=(0,u.default)(r,2),o=n[0],s=void 0===o?t:o,i=n[1],a=void 0===i?t:i;return new A(s,a)}},{key:"parseScale",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=RA(e),n=(0,u.default)(r,2),o=n[0],s=void 0===o?t:o,i=n[1],a=void 0===i?s:i;return new A(s,a)}},{key:"parsePath",value:function(e){for(var t=RA(e),r=t.length,n=[],o=0;o<r;o+=2)n.push(new A(t[o],t[o+1]));return n}}]),A}(),Be=function(){function A(e){var t,r;(0,_.default)(this,A),this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=R()(t=this.onClick).call(t,this),this.onMouseMove=R()(r=this.onMouseMove).call(r,this)}return(0,H.default)(A,[{key:"isWorking",value:function(){return this.working}},{key:"start",value:function(){if(!this.working){var A=this.screen,e=this.onClick,t=this.onMouseMove,r=A.ctx.canvas;r.onclick=e,r.onmousemove=t,this.working=!0}}},{key:"stop",value:function(){if(this.working){var A=this.screen.ctx.canvas;this.working=!1,A.onclick=null,A.onmousemove=null}}},{key:"hasEvents",value:function(){return this.working&&this.events.length>0}},{key:"runEvents",value:function(){if(this.working){var A=this.screen,e=this.events,t=this.eventElements,r=A.ctx.canvas.style;r&&(r.cursor=""),B()(e).call(e,(function(A,e){for(var r=A.run,n=t[e];n;)r(n),n=n.parent})),this.events=[],this.eventElements=[]}}},{key:"checkPath",value:function(A,e){if(this.working&&e){var t=this.events,r=this.eventElements;B()(t).call(t,(fu