UNPKG

js-html2pdf

Version:
1 lines 418 kB
!function(A,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("html2pdf",[],t):"object"==typeof exports?exports.html2pdf=t():A.html2pdf=t()}("undefined"!=typeof self?self:this,function(){return function(A){function t(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return A[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var e={};return t.m=A,t.c=e,t.d=function(A,e,n){t.o(A,e)||Object.defineProperty(A,e,{configurable:!1,enumerable:!0,get:n})},t.n=function(A){var e=A&&A.__esModule?function(){return A.default}:function(){return A};return t.d(e,"a",e),e},t.o=function(A,t){return Object.prototype.hasOwnProperty.call(A,t)},t.p="",t(t.s=30)}([function(A,t){function e(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function r(A){if(l===setTimeout)return setTimeout(A,0);if((l===e||!l)&&setTimeout)return l=setTimeout,setTimeout(A,0);try{return l(A,0)}catch(t){try{return l.call(null,A,0)}catch(t){return l.call(this,A,0)}}}function i(A){if(u===clearTimeout)return clearTimeout(A);if((u===n||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(A);try{return u(A)}catch(t){try{return u.call(null,A)}catch(t){return u.call(this,A)}}}function o(){B&&d&&(B=!1,d.length?f=d.concat(f):g=-1,f.length&&a())}function a(){if(!B){var A=r(o);B=!0;for(var t=f.length;t;){for(d=f,f=[];++g<t;)d&&d[g].run();g=-1,t=f.length}d=null,B=!1,i(A)}}function s(A,t){this.fun=A,this.array=t}function c(){}var l,u,h=A.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:e}catch(A){l=e}try{u="function"==typeof clearTimeout?clearTimeout:n}catch(A){u=n}}();var d,f=[],B=!1,g=-1;h.nextTick=function(A){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];f.push(new s(A,t)),1!==f.length||B||r(a)},s.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(A){return[]},h.binding=function(A){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(A){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(A,t,e){"use strict";function n(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function A(A,t){var e=[],n=!0,r=!1,i=void 0;try{for(var o,a=A[Symbol.iterator]();!(n=(o=a.next()).done)&&(e.push(o.value),!t||e.length!==t);n=!0);}catch(A){r=!0,i=A}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return e}return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return A(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function A(A,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(A,n.key,n)}}return function(t,e,n){return e&&A(t.prototype,e),n&&A(t,n),t}}(),o=/^#([a-f0-9]{3})$/i,a=function(A){var t=A.match(o);return!!t&&[parseInt(t[1][0]+t[1][0],16),parseInt(t[1][1]+t[1][1],16),parseInt(t[1][2]+t[1][2],16),null]},s=/^#([a-f0-9]{6})$/i,c=function(A){var t=A.match(s);return!!t&&[parseInt(t[1].substring(0,2),16),parseInt(t[1].substring(2,4),16),parseInt(t[1].substring(4,6),16),null]},l=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,u=function(A){var t=A.match(l);return!!t&&[Number(t[1]),Number(t[2]),Number(t[3]),null]},h=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/,d=function(A){var t=A.match(h);return!!(t&&t.length>4)&&[Number(t[1]),Number(t[2]),Number(t[3]),Number(t[4])]},f=function(A){return[Math.min(A[0],255),Math.min(A[1],255),Math.min(A[2],255),A.length>3?A[3]:null]},B=function(A){var t=p[A.toLowerCase()];return t||!1},g=function(){function A(t){n(this,A);var e=Array.isArray(t)?f(t):a(t)||u(t)||d(t)||B(t)||c(t)||[0,0,0,null],i=r(e,4),o=i[0],s=i[1],l=i[2],h=i[3];this.r=o,this.g=s,this.b=l,this.a=h}return i(A,[{key:"isTransparent",value:function(){return 0===this.a}},{key:"toString",value:function(){return null!==this.a&&1!==this.a?"rgba("+this.r+","+this.g+","+this.b+","+this.a+")":"rgb("+this.r+","+this.g+","+this.b+")"}}]),A}();t.default=g;var p={transparent:[0,0,0,0],aliceblue:[240,248,255,null],antiquewhite:[250,235,215,null],aqua:[0,255,255,null],aquamarine:[127,255,212,null],azure:[240,255,255,null],beige:[245,245,220,null],bisque:[255,228,196,null],black:[0,0,0,null],blanchedalmond:[255,235,205,null],blue:[0,0,255,null],blueviolet:[138,43,226,null],brown:[165,42,42,null],burlywood:[222,184,135,null],cadetblue:[95,158,160,null],chartreuse:[127,255,0,null],chocolate:[210,105,30,null],coral:[255,127,80,null],cornflowerblue:[100,149,237,null],cornsilk:[255,248,220,null],crimson:[220,20,60,null],cyan:[0,255,255,null],darkblue:[0,0,139,null],darkcyan:[0,139,139,null],darkgoldenrod:[184,134,11,null],darkgray:[169,169,169,null],darkgreen:[0,100,0,null],darkgrey:[169,169,169,null],darkkhaki:[189,183,107,null],darkmagenta:[139,0,139,null],darkolivegreen:[85,107,47,null],darkorange:[255,140,0,null],darkorchid:[153,50,204,null],darkred:[139,0,0,null],darksalmon:[233,150,122,null],darkseagreen:[143,188,143,null],darkslateblue:[72,61,139,null],darkslategray:[47,79,79,null],darkslategrey:[47,79,79,null],darkturquoise:[0,206,209,null],darkviolet:[148,0,211,null],deeppink:[255,20,147,null],deepskyblue:[0,191,255,null],dimgray:[105,105,105,null],dimgrey:[105,105,105,null],dodgerblue:[30,144,255,null],firebrick:[178,34,34,null],floralwhite:[255,250,240,null],forestgreen:[34,139,34,null],fuchsia:[255,0,255,null],gainsboro:[220,220,220,null],ghostwhite:[248,248,255,null],gold:[255,215,0,null],goldenrod:[218,165,32,null],gray:[128,128,128,null],green:[0,128,0,null],greenyellow:[173,255,47,null],grey:[128,128,128,null],honeydew:[240,255,240,null],hotpink:[255,105,180,null],indianred:[205,92,92,null],indigo:[75,0,130,null],ivory:[255,255,240,null],khaki:[240,230,140,null],lavender:[230,230,250,null],lavenderblush:[255,240,245,null],lawngreen:[124,252,0,null],lemonchiffon:[255,250,205,null],lightblue:[173,216,230,null],lightcoral:[240,128,128,null],lightcyan:[224,255,255,null],lightgoldenrodyellow:[250,250,210,null],lightgray:[211,211,211,null],lightgreen:[144,238,144,null],lightgrey:[211,211,211,null],lightpink:[255,182,193,null],lightsalmon:[255,160,122,null],lightseagreen:[32,178,170,null],lightskyblue:[135,206,250,null],lightslategray:[119,136,153,null],lightslategrey:[119,136,153,null],lightsteelblue:[176,196,222,null],lightyellow:[255,255,224,null],lime:[0,255,0,null],limegreen:[50,205,50,null],linen:[250,240,230,null],magenta:[255,0,255,null],maroon:[128,0,0,null],mediumaquamarine:[102,205,170,null],mediumblue:[0,0,205,null],mediumorchid:[186,85,211,null],mediumpurple:[147,112,219,null],mediumseagreen:[60,179,113,null],mediumslateblue:[123,104,238,null],mediumspringgreen:[0,250,154,null],mediumturquoise:[72,209,204,null],mediumvioletred:[199,21,133,null],midnightblue:[25,25,112,null],mintcream:[245,255,250,null],mistyrose:[255,228,225,null],moccasin:[255,228,181,null],navajowhite:[255,222,173,null],navy:[0,0,128,null],oldlace:[253,245,230,null],olive:[128,128,0,null],olivedrab:[107,142,35,null],orange:[255,165,0,null],orangered:[255,69,0,null],orchid:[218,112,214,null],palegoldenrod:[238,232,170,null],palegreen:[152,251,152,null],paleturquoise:[175,238,238,null],palevioletred:[219,112,147,null],papayawhip:[255,239,213,null],peachpuff:[255,218,185,null],peru:[205,133,63,null],pink:[255,192,203,null],plum:[221,160,221,null],powderblue:[176,224,230,null],purple:[128,0,128,null],rebeccapurple:[102,51,153,null],red:[255,0,0,null],rosybrown:[188,143,143,null],royalblue:[65,105,225,null],saddlebrown:[139,69,19,null],salmon:[250,128,114,null],sandybrown:[244,164,96,null],seagreen:[46,139,87,null],seashell:[255,245,238,null],sienna:[160,82,45,null],silver:[192,192,192,null],skyblue:[135,206,235,null],slateblue:[106,90,205,null],slategray:[112,128,144,null],slategrey:[112,128,144,null],snow:[255,250,250,null],springgreen:[0,255,127,null],steelblue:[70,130,180,null],tan:[210,180,140,null],teal:[0,128,128,null],thistle:[216,191,216,null],tomato:[255,99,71,null],turquoise:[64,224,208,null],violet:[238,130,238,null],wheat:[245,222,179,null],white:[255,255,255,null],whitesmoke:[245,245,245,null],yellow:[255,255,0,null],yellowgreen:[154,205,50,null]};t.TRANSPARENT=new g([0,0,0,0])},function(A,t,e){"use strict";(function(A){function n(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.calculateLengthFromValueWithUnit=t.LENGTH_TYPE=void 0;var r=function(){function A(A,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(A,n.key,n)}}return function(t,e,n){return e&&A(t.prototype,e),n&&A(t,n),t}}(),i=e(4),o=(function(A){A&&A.__esModule}(i),t.LENGTH_TYPE={PX:0,PERCENTAGE:1}),a=function(){function t(e){n(this,t),this.type="%"===e.substr(e.length-1)?o.PERCENTAGE:o.PX;var r=parseFloat(e);"production"!==A.env.NODE_ENV&&isNaN(r)&&console.error('Invalid value given for Length: "'+e+'"'),this.value=isNaN(r)?0:r}return r(t,[{key:"isPercentage",value:function(){return this.type===o.PERCENTAGE}},{key:"getAbsoluteValue",value:function(A){return this.isPercentage()?A*(this.value/100):this.value}}],[{key:"create",value:function(A){return new t(A)}}]),t}();t.default=a;var s=function A(t){var e=t.parent;return e?A(e):parseFloat(t.style.font.fontSize)};t.calculateLengthFromValueWithUnit=function(A,t,e){switch(e){case"px":case"%":return new a(t+e);case"em":case"rem":var n=new a(t);return n.value*="em"===e?parseFloat(A.style.font.fontSize):s(A),n;default:return new a("0")}}}).call(t,e(0))},function(A,t,e){"use strict";(function(A){function n(A){return A&&A.__esModule?A:{default:A}}function r(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.parseBoundCurves=t.calculatePaddingBoxPath=t.calculateBorderBoxPath=t.parsePathForBorder=t.parseDocumentSize=t.calculateContentBox=t.calculatePaddingBox=t.parseBounds=t.Bounds=void 0;var i=function(){function A(A,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(A,n.key,n)}}return function(t,e,n){return e&&A(t.prototype,e),n&&A(t,n),t}}(),o=e(9),a=n(o),s=e(40),c=n(s),l=t.Bounds=function(){function A(t,e,n,i){r(this,A),this.left=t,this.top=e,this.width=n,this.height=i}return i(A,null,[{key:"fromClientRect",value:function(t,e,n){return new A(t.left+e,t.top+n,t.width,t.height)}}]),A}(),u=(t.parseBounds=function(A,t,e){return l.fromClientRect(A.getBoundingClientRect(),t,e)},t.calculatePaddingBox=function(A,t){return new l(A.left+t[3].borderWidth,A.top+t[0].borderWidth,A.width-(t[1].borderWidth+t[3].borderWidth),A.height-(t[0].borderWidth+t[2].borderWidth))},t.calculateContentBox=function(A,t,e){var n=t[0].value,r=t[1].value,i=t[2].value,o=t[3].value;return new l(A.left+o+e[3].borderWidth,A.top+n+e[0].borderWidth,A.width-(e[1].borderWidth+e[3].borderWidth+o+r),A.height-(e[0].borderWidth+e[2].borderWidth+n+i))},t.parseDocumentSize=function(t){var e=t.body,n=t.documentElement;if(!e||!n)throw new Error("production"!==A.env.NODE_ENV?"Unable to get document size":"");var r=Math.max(Math.max(e.scrollWidth,n.scrollWidth),Math.max(e.offsetWidth,n.offsetWidth),Math.max(e.clientWidth,n.clientWidth)),i=Math.max(Math.max(e.scrollHeight,n.scrollHeight),Math.max(e.offsetHeight,n.offsetHeight),Math.max(e.clientHeight,n.clientHeight));return new l(0,0,r,i)},t.parsePathForBorder=function(A,t){switch(t){case 0:return u(A.topLeftOuter,A.topLeftInner,A.topRightOuter,A.topRightInner);case 1:return u(A.topRightOuter,A.topRightInner,A.bottomRightOuter,A.bottomRightInner);case 2:return u(A.bottomRightOuter,A.bottomRightInner,A.bottomLeftOuter,A.bottomLeftInner);case 3:default:return u(A.bottomLeftOuter,A.bottomLeftInner,A.topLeftOuter,A.topLeftInner)}},function(A,t,e,n){var r=[];return A instanceof c.default?r.push(A.subdivide(.5,!1)):r.push(A),e instanceof c.default?r.push(e.subdivide(.5,!0)):r.push(e),n instanceof c.default?r.push(n.subdivide(.5,!0).reverse()):r.push(n),t instanceof c.default?r.push(t.subdivide(.5,!1).reverse()):r.push(t),r}),h=(t.calculateBorderBoxPath=function(A){return[A.topLeftOuter,A.topRightOuter,A.bottomRightOuter,A.bottomLeftOuter]},t.calculatePaddingBoxPath=function(A){return[A.topLeftInner,A.topRightInner,A.bottomRightInner,A.bottomLeftInner]},t.parseBoundCurves=function(A,t,e){var n=e[h.TOP_LEFT][0].getAbsoluteValue(A.width),r=e[h.TOP_LEFT][1].getAbsoluteValue(A.height),i=e[h.TOP_RIGHT][0].getAbsoluteValue(A.width),o=e[h.TOP_RIGHT][1].getAbsoluteValue(A.height),s=e[h.BOTTOM_RIGHT][0].getAbsoluteValue(A.width),c=e[h.BOTTOM_RIGHT][1].getAbsoluteValue(A.height),l=e[h.BOTTOM_LEFT][0].getAbsoluteValue(A.width),u=e[h.BOTTOM_LEFT][1].getAbsoluteValue(A.height),f=[];f.push((n+i)/A.width),f.push((l+s)/A.width),f.push((r+u)/A.height),f.push((o+c)/A.height);var B=Math.max.apply(Math,f);B>1&&(n/=B,r/=B,i/=B,o/=B,s/=B,c/=B,l/=B,u/=B);var g=A.width-i,p=A.height-c,w=A.width-s,m=A.height-u;return{topLeftOuter:n>0||r>0?d(A.left,A.top,n,r,h.TOP_LEFT):new a.default(A.left,A.top),topLeftInner:n>0||r>0?d(A.left+t[3].borderWidth,A.top+t[0].borderWidth,Math.max(0,n-t[3].borderWidth),Math.max(0,r-t[0].borderWidth),h.TOP_LEFT):new a.default(A.left+t[3].borderWidth,A.top+t[0].borderWidth),topRightOuter:i>0||o>0?d(A.left+g,A.top,i,o,h.TOP_RIGHT):new a.default(A.left+A.width,A.top),topRightInner:i>0||o>0?d(A.left+Math.min(g,A.width+t[3].borderWidth),A.top+t[0].borderWidth,g>A.width+t[3].borderWidth?0:i-t[3].borderWidth,o-t[0].borderWidth,h.TOP_RIGHT):new a.default(A.left+A.width-t[1].borderWidth,A.top+t[0].borderWidth),bottomRightOuter:s>0||c>0?d(A.left+w,A.top+p,s,c,h.BOTTOM_RIGHT):new a.default(A.left+A.width,A.top+A.height),bottomRightInner:s>0||c>0?d(A.left+Math.min(w,A.width-t[3].borderWidth),A.top+Math.min(p,A.height+t[0].borderWidth),Math.max(0,s-t[1].borderWidth),c-t[2].borderWidth,h.BOTTOM_RIGHT):new a.default(A.left+A.width-t[1].borderWidth,A.top+A.height-t[2].borderWidth),bottomLeftOuter:l>0||u>0?d(A.left,A.top+m,l,u,h.BOTTOM_LEFT):new a.default(A.left,A.top+A.height),bottomLeftInner:l>0||u>0?d(A.left+t[3].borderWidth,A.top+m,Math.max(0,l-t[3].borderWidth),u-t[2].borderWidth,h.BOTTOM_LEFT):new a.default(A.left+t[3].borderWidth,A.top+A.height-t[2].borderWidth)}},{TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_RIGHT:2,BOTTOM_LEFT:3}),d=function(A,t,e,n,r){var i=(Math.sqrt(2)-1)/3*4,o=e*i,s=n*i,l=A+e,u=t+n;switch(r){case h.TOP_LEFT:return new c.default(new a.default(A,u),new a.default(A,u-s),new a.default(l-o,t),new a.default(l,t));case h.TOP_RIGHT:return new c.default(new a.default(A,t),new a.default(A+o,t),new a.default(l,u-s),new a.default(l,u));case h.BOTTOM_RIGHT:return new c.default(new a.default(l,t),new a.default(l,t+s),new a.default(A+o,u),new a.default(A,u));case h.BOTTOM_LEFT:default:return new c.default(new a.default(l,u),new a.default(l-o,u),new a.default(A,t+s),new a.default(A,t))}}}).call(t,e(0))},function(A,t,e){"use strict";(function(A){function n(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function A(A,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(A,n.key,n)}}return function(t,e,n){return e&&A(t.prototype,e),n&&A(t,n),t}}(),i=e(1),o=function(A){return A&&A.__esModule?A:{default:A}}(i),a=e(5),s=e(6),c=e(14),l=e(41),u=e(42),h=e(43),d=e(44),f=e(45),B=e(46),g=e(10),p=e(47),w=e(48),m=e(20),Q=e(19),y=e(21),C=e(13),v=e(49),U=e(22),F=e(50),b=e(51),E=e(52),H=e(53),x=e(3),_=e(23),I=e(16),T=["INPUT","TEXTAREA","SELECT"],N=function(){function t(e,r,i,a){var N=this;n(this,t),this.parent=r,this.tagName=e.tagName,this.index=a,this.childNodes=[],this.listItems=[],"number"==typeof e.start&&(this.listStart=e.start);var k=e.ownerDocument.defaultView,O=k.pageXOffset,D=k.pageYOffset,P=k.getComputedStyle(e,null),L=(0,u.parseDisplay)(P.display),R="radio"===e.type||"checkbox"===e.type,K=(0,y.parsePosition)(P.position);if(this.style={background:R?_.INPUT_BACKGROUND:(0,s.parseBackground)(P,i),border:R?_.INPUT_BORDERS:(0,c.parseBorder)(P),borderRadius:(e instanceof k.HTMLInputElement||e instanceof HTMLInputElement)&&R?(0,_.getInputBorderRadius)(e):(0,l.parseBorderRadius)(P),color:R?_.INPUT_COLOR:new o.default(P.color),display:L,float:(0,h.parseCSSFloat)(P.float),font:(0,d.parseFont)(P),letterSpacing:(0,f.parseLetterSpacing)(P.letterSpacing),listStyle:L===u.DISPLAY.LIST_ITEM?(0,g.parseListStyle)(P):null,lineBreak:(0,B.parseLineBreak)(P.lineBreak),margin:(0,p.parseMargin)(P),opacity:parseFloat(P.opacity),overflow:-1===T.indexOf(e.tagName)?(0,w.parseOverflow)(P.overflow):w.OVERFLOW.HIDDEN,overflowWrap:(0,m.parseOverflowWrap)(P.overflowWrap?P.overflowWrap:P.wordWrap),padding:(0,Q.parsePadding)(P),position:K,textDecoration:(0,C.parseTextDecoration)(P),textShadow:(0,v.parseTextShadow)(P.textShadow),textTransform:(0,U.parseTextTransform)(P.textTransform),transform:(0,F.parseTransform)(P),visibility:(0,b.parseVisibility)(P.visibility),wordBreak:(0,E.parseWordBreak)(P.wordBreak),zIndex:(0,H.parseZIndex)(K!==y.POSITION.STATIC?P.zIndex:"auto")},this.isTransformed()&&(e.style.transform="matrix(1,0,0,1,0,0)"),L===u.DISPLAY.LIST_ITEM){var M=(0,I.getListOwner)(this);if(M){var z=M.listItems.length;M.listItems.push(this),this.listIndex=e.hasAttribute("value")&&"number"==typeof e.value?e.value:0===z?"number"==typeof M.listStart?M.listStart:1:M.listItems[z-1].listIndex+1}}"IMG"===e.tagName&&e.addEventListener("load",function(){N.bounds=(0,x.parseBounds)(e,O,D),N.curvedBounds=(0,x.parseBoundCurves)(N.bounds,N.style.border,N.style.borderRadius)}),this.image=S(e,i),this.bounds=R?(0,_.reformatInputBounds)((0,x.parseBounds)(e,O,D)):(0,x.parseBounds)(e,O,D),this.curvedBounds=(0,x.parseBoundCurves)(this.bounds,this.style.border,this.style.borderRadius),"production"!==A.env.NODE_ENV&&(this.name=e.tagName.toLowerCase()+(e.id?"#"+e.id:"")+e.className.toString().split(" ").map(function(A){return A.length?"."+A:""}).join(""))}return r(t,[{key:"getClipPaths",value:function(){var A=this.parent?this.parent.getClipPaths():[];return this.style.overflow!==w.OVERFLOW.VISIBLE?A.concat([(0,x.calculatePaddingBoxPath)(this.curvedBounds)]):A}},{key:"isInFlow",value:function(){return this.isRootElement()&&!this.isFloating()&&!this.isAbsolutelyPositioned()}},{key:"isVisible",value:function(){return!(0,a.contains)(this.style.display,u.DISPLAY.NONE)&&this.style.opacity>0&&this.style.visibility===b.VISIBILITY.VISIBLE}},{key:"isAbsolutelyPositioned",value:function(){return this.style.position!==y.POSITION.STATIC&&this.style.position!==y.POSITION.RELATIVE}},{key:"isPositioned",value:function(){return this.style.position!==y.POSITION.STATIC}},{key:"isFloating",value:function(){return this.style.float!==h.FLOAT.NONE}},{key:"isRootElement",value:function(){return null===this.parent}},{key:"isTransformed",value:function(){return null!==this.style.transform}},{key:"isPositionedWithZIndex",value:function(){return this.isPositioned()&&!this.style.zIndex.auto}},{key:"isInlineLevel",value:function(){return(0,a.contains)(this.style.display,u.DISPLAY.INLINE)||(0,a.contains)(this.style.display,u.DISPLAY.INLINE_BLOCK)||(0,a.contains)(this.style.display,u.DISPLAY.INLINE_FLEX)||(0,a.contains)(this.style.display,u.DISPLAY.INLINE_GRID)||(0,a.contains)(this.style.display,u.DISPLAY.INLINE_LIST_ITEM)||(0,a.contains)(this.style.display,u.DISPLAY.INLINE_TABLE)}},{key:"isInlineBlockOrInlineTable",value:function(){return(0,a.contains)(this.style.display,u.DISPLAY.INLINE_BLOCK)||(0,a.contains)(this.style.display,u.DISPLAY.INLINE_TABLE)}}]),t}();t.default=N;var S=function(A,t){if(A instanceof A.ownerDocument.defaultView.SVGSVGElement||A instanceof SVGSVGElement){var e=new XMLSerializer;return t.loadImage("data:image/svg+xml,"+encodeURIComponent(e.serializeToString(A)))}switch(A.tagName){case"IMG":var n=A;return t.loadImage(n.currentSrc||n.src);case"CANVAS":var r=A;return t.loadCanvas(r);case"IFRAME":var i=A.getAttribute("data-html2canvas-internal-iframe-key");if(i)return i}return null}}).call(t,e(0))},function(A,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.contains=function(A,t){return 0!=(A&t)},t.distance=function(A,t){return Math.sqrt(A*A+t*t)},t.copyCSSStyles=function(A,t){for(var e=A.length-1;e>=0;e--){var n=A.item(e);"content"!==n&&t.style.setProperty(n,A.getPropertyValue(n))}return t},t.SMALL_IMAGE="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},function(A,t,e){"use strict";(function(A){function n(A){return A&&A.__esModule?A:{default:A}}function r(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.parseBackgroundImage=t.parseBackground=t.calculateBackgroundRepeatPath=t.calculateBackgroundPosition=t.calculateBackgroungPositioningArea=t.calculateBackgroungPaintingArea=t.calculateGradientBackgroundSize=t.calculateBackgroundSize=t.BACKGROUND_ORIGIN=t.BACKGROUND_CLIP=t.BACKGROUND_SIZE=t.BACKGROUND_REPEAT=void 0;var i=e(1),o=n(i),a=e(2),s=n(a),c=e(39),l=n(c),u=e(9),h=n(u),d=e(3),f=e(19),B=t.BACKGROUND_REPEAT={REPEAT:0,NO_REPEAT:1,REPEAT_X:2,REPEAT_Y:3},g=t.BACKGROUND_SIZE={AUTO:0,CONTAIN:1,COVER:2,LENGTH:3},p=t.BACKGROUND_CLIP={BORDER_BOX:0,PADDING_BOX:1,CONTENT_BOX:2},w=t.BACKGROUND_ORIGIN=p,m=function A(t){switch(r(this,A),t){case"contain":this.size=g.CONTAIN;break;case"cover":this.size=g.COVER;break;case"auto":this.size=g.AUTO;break;default:this.value=new s.default(t)}},Q=(t.calculateBackgroundSize=function(A,t,e){var n=0,r=0,i=A.size;if(i[0].size===g.CONTAIN||i[0].size===g.COVER){var o=e.width/e.height,a=t.width/t.height;return o<a!=(i[0].size===g.COVER)?new l.default(e.width,e.width/a):new l.default(e.height*a,e.height)}return i[0].value&&(n=i[0].value.getAbsoluteValue(e.width)),i[0].size===g.AUTO&&i[1].size===g.AUTO?r=t.height:i[1].size===g.AUTO?r=n/t.width*t.height:i[1].value&&(r=i[1].value.getAbsoluteValue(e.height)),i[0].size===g.AUTO&&(n=r/t.height*t.width),new l.default(n,r)},t.calculateGradientBackgroundSize=function(A,t){var e=A.size,n=e[0].value?e[0].value.getAbsoluteValue(t.width):t.width,r=e[1].value?e[1].value.getAbsoluteValue(t.height):e[0].value?n:t.height;return new l.default(n,r)},new m("auto")),y=(t.calculateBackgroungPaintingArea=function(A,t){switch(t){case p.BORDER_BOX:return(0,d.calculateBorderBoxPath)(A);case p.PADDING_BOX:default:return(0,d.calculatePaddingBoxPath)(A)}},t.calculateBackgroungPositioningArea=function(A,t,e,n){var r=(0,d.calculatePaddingBox)(t,n);switch(A){case w.BORDER_BOX:return t;case w.CONTENT_BOX:var i=e[f.PADDING_SIDES.LEFT].getAbsoluteValue(t.width),o=e[f.PADDING_SIDES.RIGHT].getAbsoluteValue(t.width),a=e[f.PADDING_SIDES.TOP].getAbsoluteValue(t.width),s=e[f.PADDING_SIDES.BOTTOM].getAbsoluteValue(t.width);return new d.Bounds(r.left+i,r.top+a,r.width-i-o,r.height-a-s);case w.PADDING_BOX:default:return r}},t.calculateBackgroundPosition=function(A,t,e){return new h.default(A[0].getAbsoluteValue(e.width-t.width),A[1].getAbsoluteValue(e.height-t.height))},t.calculateBackgroundRepeatPath=function(A,t,e,n,r){switch(A.repeat){case B.REPEAT_X:return[new h.default(Math.round(r.left),Math.round(n.top+t.y)),new h.default(Math.round(r.left+r.width),Math.round(n.top+t.y)),new h.default(Math.round(r.left+r.width),Math.round(e.height+n.top+t.y)),new h.default(Math.round(r.left),Math.round(e.height+n.top+t.y))];case B.REPEAT_Y:return[new h.default(Math.round(n.left+t.x),Math.round(r.top)),new h.default(Math.round(n.left+t.x+e.width),Math.round(r.top)),new h.default(Math.round(n.left+t.x+e.width),Math.round(r.height+r.top)),new h.default(Math.round(n.left+t.x),Math.round(r.height+r.top))];case B.NO_REPEAT:return[new h.default(Math.round(n.left+t.x),Math.round(n.top+t.y)),new h.default(Math.round(n.left+t.x+e.width),Math.round(n.top+t.y)),new h.default(Math.round(n.left+t.x+e.width),Math.round(n.top+t.y+e.height)),new h.default(Math.round(n.left+t.x),Math.round(n.top+t.y+e.height))];default:return[new h.default(Math.round(r.left),Math.round(r.top)),new h.default(Math.round(r.left+r.width),Math.round(r.top)),new h.default(Math.round(r.left+r.width),Math.round(r.height+r.top)),new h.default(Math.round(r.left),Math.round(r.height+r.top))]}},t.parseBackground=function(A,t){return{backgroundColor:new o.default(A.backgroundColor),backgroundImage:U(A,t),backgroundClip:y(A.backgroundClip),backgroundOrigin:C(A.backgroundOrigin)}},function(A){switch(A){case"padding-box":return p.PADDING_BOX;case"content-box":return p.CONTENT_BOX}return p.BORDER_BOX}),C=function(A){switch(A){case"padding-box":return w.PADDING_BOX;case"content-box":return w.CONTENT_BOX}return w.BORDER_BOX},v=function(t){switch(t.trim()){case"no-repeat":return B.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return B.REPEAT_X;case"repeat-y":case"no-repeat repeat":return B.REPEAT_Y;case"repeat":return B.REPEAT}return"production"!==A.env.NODE_ENV&&console.error('Invalid background-repeat value "'+t+'"'),B.REPEAT},U=function(A,t){var e=E(A.backgroundImage).map(function(A){if("url"===A.method){var e=t.loadImage(A.args[0]);A.args=e?[e]:[]}return A}),n=A.backgroundPosition.split(","),r=A.backgroundRepeat.split(","),i=A.backgroundSize.split(",");return e.map(function(A,t){var e=(i[t]||"auto").trim().split(" ").map(F),o=(n[t]||"auto").trim().split(" ").map(b);return{source:A,repeat:v("string"==typeof r[t]?r[t]:r[0]),size:e.length<2?[e[0],Q]:[e[0],e[1]],position:o.length<2?[o[0],o[0]]:[o[0],o[1]]}})},F=function(A){return"auto"===A?Q:new m(A)},b=function(A){switch(A){case"bottom":case"right":return new s.default("100%");case"left":case"top":return new s.default("0%");case"auto":return new s.default("0")}return new s.default(A)},E=t.parseBackgroundImage=function(A){var t=/^\s$/,e=[],n=[],r="",i=null,o="",a=0,s=0,c=function(){var A="";if(r){'"'===o.substr(0,1)&&(o=o.substr(1,o.length-2)),o&&n.push(o.trim());var t=r.indexOf("-",1)+1;"-"===r.substr(0,1)&&t>0&&(A=r.substr(0,t).toLowerCase(),r=r.substr(t)),r=r.toLowerCase(),"none"!==r&&e.push({prefix:A,method:r,args:n})}n=[],r=o=""};return A.split("").forEach(function(A){if(0!==a||!t.test(A)){switch(A){case'"':i?i===A&&(i=null):i=A;break;case"(":if(i)break;if(0===a)return void(a=1);s++;break;case")":if(i)break;if(1===a){if(0===s)return a=0,void c();s--}break;case",":if(i)break;if(0===a)return void c();if(1===a&&0===s&&!r.match(/^url$/i))return n.push(o.trim()),void(o="")}0===a?r+=A:o+=A}}),c(),e}}).call(t,e(0))},function(A,t){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(A){"object"==typeof window&&(e=window)}A.exports=e},function(A,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.PATH={VECTOR:0,BEZIER_CURVE:1,CIRCLE:2}},function(A,t,e){"use strict";(function(A){function n(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=e(8),i=function t(e,i){n(this,t),this.type=r.PATH.VECTOR,this.x=e,this.y=i,"production"!==A.env.NODE_ENV&&(isNaN(e)&&console.error("Invalid x value given for Vector"),isNaN(i)&&console.error("Invalid y value given for Vector"))};t.default=i}).call(t,e(0))},function(A,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseListStyle=t.parseListStyleType=t.LIST_STYLE_TYPE=t.LIST_STYLE_POSITION=void 0;var n=e(6),r=t.LIST_STYLE_POSITION={INSIDE:0,OUTSIDE:1},i=t.LIST_STYLE_TYPE={NONE:-1,DISC:0,CIRCLE:1,SQUARE:2,DECIMAL:3,CJK_DECIMAL:4,DECIMAL_LEADING_ZERO:5,LOWER_ROMAN:6,UPPER_ROMAN:7,LOWER_GREEK:8,LOWER_ALPHA:9,UPPER_ALPHA:10,ARABIC_INDIC:11,ARMENIAN:12,BENGALI:13,CAMBODIAN:14,CJK_EARTHLY_BRANCH:15,CJK_HEAVENLY_STEM:16,CJK_IDEOGRAPHIC:17,DEVANAGARI:18,ETHIOPIC_NUMERIC:19,GEORGIAN:20,GUJARATI:21,GURMUKHI:22,HEBREW:22,HIRAGANA:23,HIRAGANA_IROHA:24,JAPANESE_FORMAL:25,JAPANESE_INFORMAL:26,KANNADA:27,KATAKANA:28,KATAKANA_IROHA:29,KHMER:30,KOREAN_HANGUL_FORMAL:31,KOREAN_HANJA_FORMAL:32,KOREAN_HANJA_INFORMAL:33,LAO:34,LOWER_ARMENIAN:35,MALAYALAM:36,MONGOLIAN:37,MYANMAR:38,ORIYA:39,PERSIAN:40,SIMP_CHINESE_FORMAL:41,SIMP_CHINESE_INFORMAL:42,TAMIL:43,TELUGU:44,THAI:45,TIBETAN:46,TRAD_CHINESE_FORMAL:47,TRAD_CHINESE_INFORMAL:48,UPPER_ARMENIAN:49,DISCLOSURE_OPEN:50,DISCLOSURE_CLOSED:51},o=t.parseListStyleType=function(A){switch(A){case"disc":return i.DISC;case"circle":return i.CIRCLE;case"square":return i.SQUARE;case"decimal":return i.DECIMAL;case"cjk-decimal":return i.CJK_DECIMAL;case"decimal-leading-zero":return i.DECIMAL_LEADING_ZERO;case"lower-roman":return i.LOWER_ROMAN;case"upper-roman":return i.UPPER_ROMAN;case"lower-greek":return i.LOWER_GREEK;case"lower-alpha":return i.LOWER_ALPHA;case"upper-alpha":return i.UPPER_ALPHA;case"arabic-indic":return i.ARABIC_INDIC;case"armenian":return i.ARMENIAN;case"bengali":return i.BENGALI;case"cambodian":return i.CAMBODIAN;case"cjk-earthly-branch":return i.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return i.CJK_HEAVENLY_STEM;case"cjk-ideographic":return i.CJK_IDEOGRAPHIC;case"devanagari":return i.DEVANAGARI;case"ethiopic-numeric":return i.ETHIOPIC_NUMERIC;case"georgian":return i.GEORGIAN;case"gujarati":return i.GUJARATI;case"gurmukhi":return i.GURMUKHI;case"hebrew":return i.HEBREW;case"hiragana":return i.HIRAGANA;case"hiragana-iroha":return i.HIRAGANA_IROHA;case"japanese-formal":return i.JAPANESE_FORMAL;case"japanese-informal":return i.JAPANESE_INFORMAL;case"kannada":return i.KANNADA;case"katakana":return i.KATAKANA;case"katakana-iroha":return i.KATAKANA_IROHA;case"khmer":return i.KHMER;case"korean-hangul-formal":return i.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return i.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return i.KOREAN_HANJA_INFORMAL;case"lao":return i.LAO;case"lower-armenian":return i.LOWER_ARMENIAN;case"malayalam":return i.MALAYALAM;case"mongolian":return i.MONGOLIAN;case"myanmar":return i.MYANMAR;case"oriya":return i.ORIYA;case"persian":return i.PERSIAN;case"simp-chinese-formal":return i.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return i.SIMP_CHINESE_INFORMAL;case"tamil":return i.TAMIL;case"telugu":return i.TELUGU;case"thai":return i.THAI;case"tibetan":return i.TIBETAN;case"trad-chinese-formal":return i.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return i.TRAD_CHINESE_INFORMAL;case"upper-armenian":return i.UPPER_ARMENIAN;case"disclosure-open":return i.DISCLOSURE_OPEN;case"disclosure-closed":return i.DISCLOSURE_CLOSED;case"none":default:return i.NONE}},a=(t.parseListStyle=function(A){var t=(0,n.parseBackgroundImage)(A.getPropertyValue("list-style-image"));return{listStyleType:o(A.getPropertyValue("list-style-type")),listStyleImage:t.length?t[0]:null,listStylePosition:a(A.getPropertyValue("list-style-position"))}},function(A){switch(A){case"inside":return r.INSIDE;case"outside":default:return r.OUTSIDE}})},function(A,t,e){"use strict";function n(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}function r(A,t,e){return A.length>0?t+e.toUpperCase():A}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function A(A,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(A,n.key,n)}}return function(t,e,n){return e&&A(t.prototype,e),n&&A(t,n),t}}(),o=e(22),a=e(24),s=function(){function A(t,e,r){n(this,A),this.text=t,this.parent=e,this.bounds=r}return i(A,null,[{key:"fromTextNode",value:function(t,e){var n=l(t.data,e.style.textTransform);return new A(n,e,(0,a.parseTextBounds)(n,e,t))}}]),A}();t.default=s;var c=/(^|\s|:|-|\(|\))([a-z])/g,l=function(A,t){switch(t){case o.TEXT_TRANSFORM.LOWERCASE:return A.toLowerCase();case o.TEXT_TRANSFORM.CAPITALIZE:return A.replace(c,r);case o.TEXT_TRANSFORM.UPPERCASE:return A.toUpperCase();default:return A}}},function(A,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e(25),r=function(A){if(A.createRange){var t=A.createRange();if(t.getBoundingClientRect){var e=A.createElement("boundtest");e.style.height="123px",e.style.display="block",A.body.appendChild(e),t.selectNode(e);var n=t.getBoundingClientRect(),r=Math.round(n.height);if(A.body.removeChild(e),123===r)return!0}}return!1},i=function(A,t){var e=new Image,n=A.createElement("canvas"),r=n.getContext("2d");return new Promise(function(A){e.src=t;var i=function(){try{r.drawImage(e,0,0),n.toDataURL()}catch(t){return A(!1)}return A(!0)};e.onload=i,e.onerror=function(){return A(!1)},!0===e.complete&&setTimeout(function(){i()},500)})},o=function(){return void 0!==(new Image).crossOrigin},a=function(){return"string"==typeof(new XMLHttpRequest).responseType},s=function(A){var t=new Image,e=A.createElement("canvas"),n=e.getContext("2d");t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{n.drawImage(t,0,0),e.toDataURL()}catch(A){return!1}return!0},c=function(A){return 0===A[0]&&255===A[1]&&0===A[2]&&255===A[3]},l=function(A){var t=A.createElement("canvas");t.width=100,t.height=100;var e=t.getContext("2d");e.fillStyle="rgb(0, 255, 0)",e.fillRect(0,0,100,100);var r=new Image,i=t.toDataURL();r.src=i;var o=(0,n.createForeignObjectSVG)(100,100,0,0,r);return e.fillStyle="red",e.fillRect(0,0,100,100),(0,n.loadSerializedSVG)(o).then(function(t){e.drawImage(t,0,0);var r=e.getImageData(0,0,100,100).data;e.fillStyle="red",e.fillRect(0,0,100,100);var o=A.createElement("div");return o.style.backgroundImage="url("+i+")",o.style.height="100px",c(r)?(0,n.loadSerializedSVG)((0,n.createForeignObjectSVG)(100,100,0,0,o)):Promise.reject(!1)}).then(function(A){return e.drawImage(A,0,0),c(e.getImageData(0,0,100,100).data)}).catch(function(A){return!1})},u={get SUPPORT_RANGE_BOUNDS(){var A=r(document);return Object.defineProperty(u,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=s(document);return Object.defineProperty(u,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_BASE64_DRAWING(){return function(A){var t=i(document,A);return Object.defineProperty(u,"SUPPORT_BASE64_DRAWING",{value:function(){return t}}),t}},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A="function"==typeof Array.from&&"function"==typeof window.fetch?l(document):Promise.resolve(!1);return Object.defineProperty(u,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=o();return Object.defineProperty(u,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A=a();return Object.defineProperty(u,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(u,"SUPPORT_CORS_XHR",{value:A}),A}};t.default=u},function(A,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTextDecoration=t.TEXT_DECORATION_LINE=t.TEXT_DECORATION=t.TEXT_DECORATION_STYLE=void 0;var n=e(1),r=function(A){return A&&A.__esModule?A:{default:A}}(n),i=t.TEXT_DECORATION_STYLE={SOLID:0,DOUBLE:1,DOTTED:2,DASHED:3,WAVY:4},o=t.TEXT_DECORATION={NONE:null},a=t.TEXT_DECORATION_LINE={UNDERLINE:1,OVERLINE:2,LINE_THROUGH:3,BLINK:4},s=function(A){switch(A){case"underline":return a.UNDERLINE;case"overline":return a.OVERLINE;case"line-through":return a.LINE_THROUGH}return a.BLINK},c=function(A){return"none"===A?null:A.split(" ").map(s)},l=function(A){switch(A){case"double":return i.DOUBLE;case"dotted":return i.DOTTED;case"dashed":return i.DASHED;case"wavy":return i.WAVY}return i.SOLID};t.parseTextDecoration=function(A){var t=c(A.textDecorationLine?A.textDecorationLine:A.textDecoration);return null===t?o.NONE:{textDecorationLine:t,textDecorationColor:A.textDecorationColor?new r.default(A.textDecorationColor):null,textDecorationStyle:l(A.textDecorationStyle)}}},function(A,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseBorder=t.BORDER_SIDES=t.BORDER_STYLE=void 0;var n=e(1),r=function(A){return A&&A.__esModule?A:{default:A}}(n),i=t.BORDER_STYLE={NONE:0,SOLID:1},o=t.BORDER_SIDES={TOP:0,RIGHT:1,BOTTOM:2,LEFT:3},a=Object.keys(o).map(function(A){return A.toLowerCase()}),s=function(A){switch(A){case"none":return i.NONE}return i.SOLID};t.parseBorder=function(A){return a.map(function(t){var e=new r.default(A.getPropertyValue("border-"+t+"-color")),n=s(A.getPropertyValue("border-"+t+"-style")),i=parseFloat(A.getPropertyValue("border-"+t+"-width"));return{borderColor:e,borderStyle:n,borderWidth:isNaN(i)?0:i}})}},function(A,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});for(var n=(t.toCodePoints=function(A){for(var t=[],e=0,n=A.length;e<n;){var r=A.charCodeAt(e++);if(r>=55296&&r<=56319&&e<n){var i=A.charCodeAt(e++);56320==(64512&i)?t.push(((1023&r)<<10)+(1023&i)+65536):(t.push(r),e--)}else t.push(r)}return t},t.fromCodePoint=function(){if(String.fromCodePoint)return String.fromCodePoint.apply(String,arguments);var A=arguments.length;if(!A)return"";for(var t=[],e=-1,n="";++e<A;){var r=arguments.length<=e?void 0:arguments[e];r<=65535?t.push(r):(r-=65536,t.push(55296+(r>>10),r%1024+56320)),(e+1===A||t.length>16384)&&(n+=String.fromCharCode.apply(String,t),t.length=0)}return n},"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),r="undefined"==typeof Uint8Array?[]:new Uint8Array(256),i=0;i<n.length;i++)r[n.charCodeAt(i)]=i;t.decode=function(A){var t=.75*A.length,e=A.length,n=void 0,i=0,o=void 0,a=void 0,s=void 0,c=void 0;"="===A[A.length-1]&&(t--,"="===A[A.length-2]&&t--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(t):new Array(t),u=Array.isArray(l)?l:new Uint8Array(l);for(n=0;n<e;n+=4)o=r[A.charCodeAt(n)],a=r[A.charCodeAt(n+1)],s=r[A.charCodeAt(n+2)],c=r[A.charCodeAt(n+3)],u[i++]=o<<2|a>>4,u[i++]=(15&a)<<4|s>>2,u[i++]=(3&s)<<6|63&c;return l},t.polyUint16Array=function(A){for(var t=A.length,e=[],n=0;n<t;n+=2)e.push(A[n+1]<<8|A[n]);return e},t.polyUint32Array=function(A){for(var t=A.length,e=[],n=0;n<t;n+=4)e.push(A[n+3]<<24|A[n+2]<<16|A[n+1]<<8|A[n]);return e}},function(A,t,e){"use strict";function n(A){return A&&A.__esModule?A:{default:A}}Object.defineProperty(t,"__esModule",{value:!0}),t.createCounterText=t.inlineListItemElement=t.getListOwner=void 0;var r=e(5),i=e(4),o=n(i),a=e(11),s=n(a),c=e(10),l=e(26),u=["OL","UL","MENU"],h=(t.getListOwner=function(A){var t=A.parent;if(!t)return null;do{if(-1!==u.indexOf(t.tagName))return t;t=t.parent}while(t);return A.parent},t.inlineListItemElement=function(A,t,e){var n=t.style.listStyle;if(n){var i=A.ownerDocument.defaultView.getComputedStyle(A,null),a=A.ownerDocument.createElement("html2canvaswrapper");switch((0,r.copyCSSStyles)(i,a),a.style.position="absolute",a.style.bottom="auto",a.style.display="block",a.style.letterSpacing="normal",n.listStylePosition){case c.LIST_STYLE_POSITION.OUTSIDE:a.style.left="auto",a.style.right=A.ownerDocument.defaultView.innerWidth-t.bounds.left-t.style.margin[1].getAbsoluteValue(t.bounds.width)+7+"px",a.style.textAlign="right";break;case c.LIST_STYLE_POSITION.INSIDE:a.style.left=t.bounds.left-t.style.margin[3].getAbsoluteValue(t.bounds.width)+"px",a.style.right="auto",a.style.textAlign="left"}var l=void 0,u=t.style.margin[0].getAbsoluteValue(t.bounds.width),h=n.listStyleImage;if(h)if("url"===h.method){var d=A.ownerDocument.createElement("img");d.src=h.args[0],a.style.top=t.bounds.top-u+"px",a.style.width="auto",a.style.height="auto",a.appendChild(d)}else{var f=.5*parseFloat(t.style.font.fontSize);a.style.top=t.bounds.top-u+t.bounds.height-1.5*f+"px",a.style.width=f+"px",a.style.height=f+"px",a.style.backgroundImage=i.listStyleImage}else"number"==typeof t.listIndex&&(l=A.ownerDocument.createTextNode(y(t.listIndex,n.listStyleType,!0)),a.appendChild(l),a.style.top=t.bounds.top-u+"px");var B=A.ownerDocument.body;B.appendChild(a),l?(t.childNodes.push(s.default.fromTextNode(l,t)),B.removeChild(a)):t.childNodes.push(new o.default(a,t,e,0))}},{integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]}),d={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},f={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},B={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},g=function(A,t,e,n,r,i){return A<t||A>e?y(A,r,i.length>0):n.integers.reduce(function(t,e,r){for(;A>=e;)A-=e,t+=n.values[r];return t},"")+i},p=function(A,t,e,n){var r="";do{e||A--,r=n(A)+r,A/=t}while(A*t>=t);return r},w=function(A,t,e,n,r){var i=e-t+1;return(A<0?"-":"")+(p(Math.abs(A),i,n,function(A){return(0,l.fromCodePoint)(Math.floor(A%i)+t)})+r)},m=function(A,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:". ",n=t.length;return p(Math.abs(A),n,!1,function(A){return t[Math.floor(A%n)]})+e},Q=function(A,t,e,n,i,o){if(A<-9999||A>9999)return y(A,c.LIST_STYLE_TYPE.CJK_DECIMAL,i.length>0);var a=Math.abs(A),s=i;if(0===a)return t[0]+s;for(var l=0;a>0&&l<=4;l++){var u=a%10;0===u&&(0,r.contains)(o,1)&&""!==s?s=t[u]+s:u>1||1===u&&0===l||1===u&&1===l&&(0,r.contains)(o,2)||1===u&&1===l&&(0,r.contains)(o,4)&&A>100||1===u&&l>1&&(0,r.contains)(o,8)?s=t[u]+(l>0?e[l-1]:"")+s:1===u&&l>0&&(s=e[l-1]+s),a=Math.floor(a/10)}return(A<0?n:"")+s},y=t.createCounterText=function(A,t,e){var n=e?". ":"",r=e?"、":"",i=e?", ":"";switch(t){case c.LIST_STYLE_TYPE.DISC:return"•";case c.LIST_STYLE_TYPE.CIRCLE:return"◦";case c.LIST_STYLE_TYPE.SQUARE:return"◾";case c.LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO:var o=w(A,48,57,!0,n);return o.length<4?"0"+o:o;case c.LIST_STYLE_TYPE.CJK_DECIMAL:return m(A,"〇一二三四五六七八九",r);case c.LIST_STYLE_TYPE.LOWER_ROMAN:return g(A,1,3999,h,c.LIST_STYLE_TYPE.DECIMAL,n).toLowerCase();case c.LIST_STYLE_TYPE.UPPER_ROMAN:return g(A,1,3999,h,c.LIST_STYLE_TYPE.DECIMAL,n);case c.LIST_STYLE_TYPE.LOWER_GREEK:return w(A,945,969,!1,n);case c.LIST_STYLE_TYPE.LOWER_ALPHA:return w(A,97,122,!1,n);case c.LIST_STYLE_TYPE.UPPER_ALPHA:return w(A,65,90,!1,n);case c.LIST_STYLE_TYPE.ARABIC_INDIC:return w(A,1632,1641,!0,n);case c.LIST_STYLE_TYPE.ARMENIAN:case c.LIST_STYLE_TYPE.UPPER_ARMENIAN:return g(A,1,9999,d,c.LIST_STYLE_TYPE.DECIMAL,n);case c.LIST_STYLE_TYPE.LOWER_ARMENIAN:return g(A,1,9999,d,c.LIST_STYLE_TYPE.DECIMAL,n).toLowerCase();case c.LIST_STYLE_TYPE.BENGALI:return w(A,2534,2543,!0,n);case c.LIST_STYLE_TYPE.CAMBODIAN:case c.LIST_STYLE_TYPE.KHMER:return w(A,6112,6121,!0,n);case c.LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH:return m(A,"子丑寅卯辰巳午未申酉戌亥",r);case c.LIST_STYLE_TYPE.CJK_HEAVENLY_STEM:return m(A,"甲乙丙丁戊己庚辛壬癸",r);case c.LIST_STYLE_TYPE.CJK_IDEOGRAPHIC:case c.LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL:return Q(A,"零一二三四五六七八九","十百千萬","負",r,14);case c.LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL:return Q(A,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",r,15);case c.LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL:return Q(A,"零一二三四五六七八九","十百千萬","负",r,14);case c.LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL:return Q(A,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",r,15);case c.LIST_STYLE_TYPE.JAPANESE_INFORMAL:return Q(A,"〇一二三四五六七八九","十百千万","マイナス",r,0);case c.LIST_STYLE_TYPE.JAPANESE_FORMAL:return Q(A,"零壱弐参四伍六七八九","拾百千万","マイナス",r,7);case c.LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL:return Q(A,"영일이삼사오육칠팔구","십백천만","마이너스 ",i,7);case c.LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL:return Q(A,"零一二三四五六七八九","十百千萬","마이너스 ",i,0);case c.LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL:return Q(A,"零壹貳參四五六七八九","拾百千","마이너스 ",i,7);case c.LIST_STYLE_TYPE.DEVANAGARI:return w(A,2406,2415,!0,n);case c.LIST_STYLE_TYPE.GEORGIAN:return g(A,1,19999,B,c.LIST_STYLE_TYPE.DECIMAL,n);case c.LIST_STYLE_TYPE.GUJARATI:return w(A,2790,2799,!0,n);case c.LIST_STYLE_TYPE.GURMUKHI:return w(A,2662,2671,!0,n);case c.LIST_STYLE_TYPE.HEBREW:return g(A,1,10999,f,c.LIST_STYLE_TYPE.DECIMAL,n);case c.LIST_STYLE_TYPE.HIRAGANA:return m(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case c.LIST_STYLE_TYPE.HIRAGANA_IROHA:return m(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case c.LIST_STYLE_TYPE.KANNADA:return w(A,3302,3311,!0,n);case c.LIST_STYLE_TYPE.KATAKANA:return m(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",r);case c.LIST_STYLE_TYPE.KATAKANA_IROHA:return m(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",r);case c.LIST_STYLE_TYPE.LAO:return w(A,3792,3801,!0,n);case c.LIST_STYLE_TYPE.MONGOLIAN:return w(A,6160,6169,!0,n);case c.LIST_STYLE_TYPE.MYANMAR:return w(A,4160,4169,!0,n);case c.LIST_STYLE_TYPE.ORIYA:return w(A,2918,2927,!0,n);case c.LIST_STYLE_TYPE.PERSIAN:return w(A,1776,1785,!0,n);case c.LIST_STYLE_TYPE.TAMIL:return w(A,3046,3055,!0,n);case c.LIST_STYLE_TYPE.TELUGU:return w(A,3174,3183,!0,n);case c.LIST_STYLE_TYPE.THAI:return w(A,3664,3673,!0,n);case c.LIST_STYLE_TYPE.TIBETAN:return w(A,3872,3881,!0,n);case c.LIST_STYLE_TYPE.DECIMAL:default:return w(A,48,57,!0,n)}}},function(A,t,e){"use strict";function n(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function A(A,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(A,n.key,n)}}return function(t,e,n){return e&&A(t.prototype,e),n&&A(t,n),t}}(),i=e(8),o=e(13),a=function(A,t){var e=Math.max.apply(null,A.colorStops.map(function(A){return A.stop})),n=1/Math.max(1,e);A.colorStops.forEach(function(A){t.addColorStop(n*A.stop,A.color.toString())})},s=function(){function A(t){n(this,A),this.canvas=t||document.createElement("canvas")}return r(A,[{key:"render",value:function(A){this.ctx=this.canvas.getContext("2d"),this.options=A,this.canvas.width=Math.floor(A.width*A.scale),this.canvas.height=Math.floor(A.height*A.scale),this.canvas.style.width=A.width+"px",this.canvas.style.height=A.height+"px",this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-A.x,-A.y),this.ctx.textBaseline="bottom",A.logger.log("Canvas renderer initialized ("+A.width+"x"+A.height+" at "+A.x+","+A.y+") with scale "+this.options.scale)}},{key:"clip",value:function(A,t){var e=this;A.length&&(this.ctx.save(),A.forEach(function(A){e.path(A),e.ctx.clip()})),t(),A.length&&this.ctx.restore()}},{key:"drawImage",value:function(A,t,e){this.ctx.drawImage(A,t.left,t.top,t.width,t.height,e.left,e.top,e.width,e.height)}},{key:"drawShape",value:function(A,t){this.path(A),this.ctx.fillStyle=t.toString(),this.ctx.fill()}},{key:"fill",value:function(A){this.ctx.fillStyle=A.toString(),this.ctx.fill()}},{key:"getTarget",value:function(){return this.canvas.getContext("2d").setTransform(1,0,0,1,0,0),Promise.resolve(this.canvas)}},{key:"path",value:function(A){var t=this;this.ctx.beginPath(),Array.isArray(A)?A.forEach(function(A,e){var n=A.type===i.PATH.VECTOR?A:A.start;0===e?t.ctx.moveTo(n.x,n.y):t.ctx.lineTo(n.x,n.y),A.type===i.PATH.BEZIER_CURVE&&t.ctx.bezierCurveTo(A.startControl.x,A.startControl.y,A.endControl.x,A.endControl.y,A.end.x,A.end.y)}):this.ctx.arc(A.x+A.radius,A.y+A.radius,A.radius,0,2*Math.PI,!0),this.ctx.closePath()}},{key:"rectangle",value:function(A,t,e,n,r){this.ctx.fillStyle=r.toString(),this.ctx.fillRect(A,t,e,n)}},{key:"renderLinearGradient",value:function(A,t){var e=this.ctx.createLinearGradient(A.left+t.direction.x1,A.top+t.direction.y1,A.left+t.direction.x0,A.top+t.direction.y0);a(t,e),this.ctx.fillStyle=e,this.ctx.fillRect(A.left,A.top,A.width,A.height)}},{key:"renderRadialGradient",value:function(A,t){var e=this,n=A.left+t.center.x,r=A.top+t.center.y,i=this.ctx.createRadialGradient(n,r,0,n,r,t.radius.x);if(i)if(a(t,i),this.ctx.fillStyle=i,t.radius.x!==t.radius.y){var o=A.left+.5*A.width,s=A.top+.5*A.height,c=t.radius.y/t.radius.x,l=1/c;this.transform(o,s,[1,0,0,c,0,0],function(){return e.ctx.fillRect(A.left,l*(A.top-s)+s,A.width,A.height*l)})}else this.ctx.fillRect(A.left,A.top,A.width,A.height)}},{key:"renderRepeat",value:function(A,t,e,n,r){this.path(A),this.ctx.fillStyle=this.ctx.createPattern(this.resizeImage(t,e),"repeat"),this.ctx.translate(n,r),this.ctx.fill(),this.ctx.translate(-n,-r)}},{key:"renderTextNode",value:function(A,t,e,n,r){var i=this;this.ctx.font=[e.fontStyle,e.fontVariant,e.fontWeight,e.fontSize,e.fontFamily].join(" "),A.forEach(function(A){if(i.ctx.fillStyle=t.toString(),r&&A.text.trim().length?r.slice(0).reverse().forEach(function(t){i.ctx.shadowColor=t.color.toString(),i.ctx.shadowOffsetX=t.offsetX*i.options.scale,i.ctx.shadowOffsetY=t.offsetY*i.options.scale,i.ctx.shadowBlur=t.blur,i.ctx.fillText(A.text,A.bounds.left,A.bounds.top+A.bounds.height)}):i.ctx.fillText(A.text,A.bounds.left,A.bounds.top+A.bounds.height),null!==n){var a=n.textDecorationColor||t;n.textDecorationLine.forEach(function(t){switch(t){case o.TEXT_DECORATION_LINE.UNDERLINE:var n=i.options.fontMetrics.getMetrics(e),r=n.baseline;i.rectangle(A.bounds.left,Math.round(A.bounds.top+r),A.bounds.width,1,a);break;case o.TEXT_DECORATION_LINE.OVERLINE:i.rectangle(A.bounds.left,Math.round(A.bounds.top),A.bounds.width,1,a);break;case o.TEXT_DECORATION_LINE.LINE_THR