-
Notifications
You must be signed in to change notification settings - Fork 13
/
SVG2GIF.min.js
252 lines (238 loc) · 129 KB
/
SVG2GIF.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
/*
VERSION: 0.14.8
DATE: 2016-07-18
UPDATES AND DOCS AT: http://greensock.com
Requires TweenLite and CSSPlugin version 1.17.0 or later (TweenMax contains both TweenLite and CSSPlugin). ThrowPropsPlugin is required for momentum-based continuation of movement after the mouse/touch is released (ThrowPropsPlugin is a membership benefit of Club GreenSock - http://greensock.com/club/).
@license Copyright (c) 2008-2016, GreenSock. All rights reserved.
This work is subject to the terms at http://greensock.com/standard-license or for
Club GreenSock members, the software agreement that was issued with your membership.
@author: Jack Doyle, [email protected]
*/
/*
html2canvas 0.5.0-alpha1 <http://html2canvas.hertzen.com>
Copyright (c) 2015 Niklas von Hertzen
Released under MIT License
*/
/*
html2canvas 0.5.0-alpha1 <http://html2canvas.hertzen.com>
Copyright (c) 2015 Niklas von Hertzen
Released under MIT License
*/
//# sourceMappingURL=gif.js.map
// gif.js 0.1.6 - https://github.com/jnordberg/gif.js
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;
(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){_gsScope._gsDefine("utils.Draggable",["events.EventDispatcher","TweenLite","plugins.CSSPlugin"],function(q,h,ra){var y,H,O,B,K,n,L,R,ma,Ga={css:{}},f={css:{}},k={css:{}},v={css:{}},Pa=_gsScope._gsDefine.globals,ka={},w=document,A=w.documentElement||{},z=function(b){return w.createElementNS?w.createElementNS("http://www.w3.org/1999/xhtml",b):w.createElement(b)},E=z("div"),Q=[],ga=function(){return!1},ob=180/Math.PI,Ka=Date.now||function(){return(new Date).getTime()},
sa=!(w.addEventListener||!w.all),ta=w.createElement("div"),M=[],W={},Za=0,F=/^(?:a|input|textarea|button|select)$/i,u=0,db=-1!==navigator.userAgent.toLowerCase().indexOf("android"),Ta=0,Qa,Ha,Ba={},$a=function(b){if("string"==typeof b&&(b=h.selector(b)),!b||b.nodeType)return[b];var a,d=[],e=b.length;for(a=0;a!==e;d.push(b[a++]));return d},eb=function(b){var a,d={};for(a in b)d[a]=b[a];return d},I=function(){for(var b=M.length;-1<--b;)M[b]()},yb=function(b){M.push(b);1===M.length&&h.ticker.addEventListener("tick",
I,this,!1,1)},gb=function(b){for(var a=M.length;-1<--a;)M[a]===b&&M.splice(a,1);h.to(fb,0,{overwrite:"all",delay:15,onComplete:fb})},fb=function(){M.length||h.ticker.removeEventListener("tick",I)},Ia=function(b,a){for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b},La=function(){return null!=window.pageYOffset?window.pageYOffset:null!=w.scrollTop?w.scrollTop:A.scrollTop||w.body.scrollTop||0},X=function(){return null!=window.pageXOffset?window.pageXOffset:null!=w.scrollLeft?w.scrollLeft:A.scrollLeft||
w.body.scrollLeft||0},Sa=function(b,a){G(b,"scroll",a);Ra(b.parentNode)||Sa(b.parentNode,a)},xa=function(b,a){aa(b,"scroll",a);Ra(b.parentNode)||xa(b.parentNode,a)},Ra=function(b){return!(b&&b!==A&&b!==w&&b!==w.body&&b!==window&&b.nodeType&&b.parentNode)},pb=function(b,a){var c="x"===a?"Width":"Height",e="scroll"+c,g="client"+c,m=w.body;return Math.max(0,Ra(b)?Math.max(A[e],m[e])-(window["inner"+c]||A[g]||m[g]):b[e]-b[g])},Ua=function(b){var a=Ra(b),d=pb(b,"x"),e=pb(b,"y");a?b=Ba:Ua(b.parentNode);
b._gsMaxScrollX=d;b._gsMaxScrollY=e;b._gsScrollX=b.scrollLeft||0;b._gsScrollY=b.scrollTop||0},ab=function(b,a){return b=b||window.event,ka.pageX=b.clientX+w.body.scrollLeft+A.scrollLeft,ka.pageY=b.clientY+w.body.scrollTop+A.scrollTop,a&&(b.returnValue=!1),ka},Ca=function(b){return b?("string"==typeof b&&(b=h.selector(b)),b.length&&b!==window&&b[0]&&b[0].style&&!b.nodeType&&(b=b[0]),b===window||b.nodeType&&b.style?b:null):b},ya=function(b,a){var c,e,g,m=b.style;if(void 0===m[a]){g=["O","Moz","ms",
"Ms","Webkit"];e=5;for(c=a.charAt(0).toUpperCase()+a.substr(1);-1<--e&&void 0===m[g[e]+c];);if(0>e)return"";y=3===e?"ms":g[e];a=y+c}return a},Da=function(b,a,d){var c=b.style;c&&(void 0===c[a]&&(a=ya(b,a)),null==d?c.removeProperty?c.removeProperty(a.replace(/([A-Z])/g,"-$1").toLowerCase()):c.removeAttribute(a):void 0!==c[a]&&(c[a]=d))},da=w.defaultView?w.defaultView.getComputedStyle:ga,hb=/(?:Left|Right|Width)/i,Ea=/(?:\d|\-|\+|=|#|\.)*/g,za=function(b,a,d,e,g){if("px"===e||!e)return d;if("auto"===
e||!d)return 0;var c,p=hb.test(a),x=b,P=E.style,f=0>d;return f&&(d=-d),"%"===e&&-1!==a.indexOf("border")?c=d/100*(p?b.clientWidth:b.clientHeight):(P.cssText="border:0 solid red;position:"+ba(b,"position",!0)+";line-height:0;","%"!==e&&x.appendChild?P[p?"borderLeftWidth":"borderTopWidth"]=d+e:(x=b.parentNode||w.body,P[p?"width":"height"]=d+e),x.appendChild(E),c=parseFloat(E[p?"offsetWidth":"offsetHeight"]),x.removeChild(E),0!==c||g||(c=za(b,a,d,e,!0))),f?-c:c},ba=function(b,a,d){var c,g=(b._gsTransform||
{})[a];g||0===g?d=g:(b.style[a]?g=b.style[a]:(c=da(b))?(g=c.getPropertyValue(a.replace(/([A-Z])/g,"-$1").toLowerCase()),g=g||c.length?g:c[a]):b.currentStyle&&(g=b.currentStyle[a]),"auto"!==g||"top"!==a&&"left"!==a||("absolute"!==ba(b,"position",!0)?b=0:(c="left"===a?"Left":"Top",g=ba(b,"margin"+c,!0),b=b["offset"+c]-(za(b,a,parseFloat(g),(g+"").replace(Ea,""))||0)),g=b),d=d?g:parseFloat(g)||0);return d},ha=function(b,a,d){var c=b.vars,g=c[d],m=b._listeners[a];"function"==typeof g&&g.apply(c[d+"Scope"]||
c.callbackScope||b,c[d+"Params"]||[b.pointerEvent]);m&&b.dispatchEvent(a)},Wa=function(b,a){var c,e,g,m=Ca(b),p;if(m)a:if(c=a,g=Ca(m)){c=Ca(c);var x,P,f,ib,r,t,h,k,n,v,y,H,C,S,Y,U,na;P=g.getBBox&&Fa(g);if(g===window)m=La(),e=X(),x=e+(A.clientWidth||g.innerWidth||w.body.clientWidth||0),P=m+((g.innerHeight||0)-20<A.clientHeight?A.clientHeight:g.innerHeight||w.body.clientHeight||0);else{if(void 0===c||c===window){p=g.getBoundingClientRect();break a}m=qa(g);e=-m.x;m=-m.y;P?(x=g.getBBox(),p=x.width,n=
x.height):"svg"!==(g.nodeName+"").toLowerCase()&&g.offsetWidth?(p=g.offsetWidth,n=g.offsetHeight):(U=da(g),p=parseFloat(U.width),n=parseFloat(U.height));x=e+p;P=m+n;"svg"!==g.nodeName.toLowerCase()||sa||(v=oa(g),na=v.computedStyle||{},C=(g.getAttribute("viewBox")||"0 0").split(" "),S=parseFloat(C[0]),Y=parseFloat(C[1]),y=parseFloat(na.borderLeftWidth)||0,H=parseFloat(na.borderTopWidth)||0,x-=p-(p-y)/v.scaleX-S,P-=n-(n-H)/v.scaleY-Y,e-=y/v.scaleX-S,m-=H/v.scaleY-Y,U&&(x+=(parseFloat(na.borderRightWidth)+
y)/v.scaleX,P+=(H+parseFloat(na.borderBottomWidth))/v.scaleY))}p=g===c?{left:e,top:m,width:x-e,height:P-m}:(f=Va(g),ib=Va(c,!0),r=ua({x:e,y:m},f,ib),t=ua({x:x,y:m},f,ib),h=ua({x:x,y:P},f,ib),k=ua({x:e,y:P},f,ib),e=Math.min(r.x,t.x,h.x,k.x),m=Math.min(r.y,t.y,h.y,k.y),Qa=Ha=0,{left:e+Qa,top:m+Ha,width:Math.max(r.x,t.x,h.x,k.x)-e,height:Math.max(r.y,t.y,h.y,k.y)-m})}else p=null;else p=void 0!==b.left?(g=qa(a),{left:b.left-g.x,top:b.top-g.y,width:b.width,height:b.height}):(e=b.min||b.minX||b.minRotation||
0,c=b.min||b.minY||0,{left:e,top:c,width:(b.max||b.maxX||b.maxRotation||0)-e,height:(b.max||b.maxY||0)-c});return p},qb=function(){if(!w.createElementNS)return B=0,void(K=!1);var b,a,d;b=z("div");var e=w.createElementNS("http://www.w3.org/2000/svg","svg");d=z("div");var g=b.style,m=w.body||A;w.body&&T&&(g.position="absolute",m.appendChild(d),d.appendChild(b),a=b.offsetParent,d.style[T]="rotate(1deg)",R=b.offsetParent===a,d.style.position="absolute",g.height="10px",a=b.offsetTop,d.style.border="5px solid red",
L=a!==b.offsetTop,m.removeChild(d));g=e.style;e.setAttributeNS(null,"width","400px");e.setAttributeNS(null,"height","400px");e.setAttributeNS(null,"viewBox","0 0 400 400");g.display="block";g.boxSizing="border-box";g.border="0px solid red";g.transform="none";b.style.cssText="width:100px;height:100px;overflow:scroll;-ms-overflow-style:none;";m.appendChild(b);b.appendChild(e);d=e.createSVGPoint().matrixTransform(e.getScreenCTM());a=d.y;b.scrollTop=100;d.x=d.y=0;d=d.matrixTransform(e.getScreenCTM());
n=100.1>a-d.y?0:a-d.y-150;b.removeChild(e);m.removeChild(b);m.appendChild(e);b=e.getScreenCTM();a=b.e;g.border="50px solid red";b=e.getScreenCTM();0===a&&0===b.e&&0===b.f&&1===b.a?(B=1,K=!0):(B=a!==b.e?1:0,K=1!==b.a);m.removeChild(e)},zb=""!==ya(E,"perspective"),rb=ya(E,"transformOrigin").replace(/^ms/g,"Ms").replace(/([A-Z])/g,"-$1").toLowerCase(),T=ya(E,"transform"),Ab=T.replace(/^ms/g,"Ms").replace(/([A-Z])/g,"-$1").toLowerCase(),jb={},kb={},sb=window.SVGElement,Fa=function(b){return!!(sb&&"function"==
typeof b.getBBox&&b.getCTM&&(!b.parentNode||b.parentNode.getBBox&&b.parentNode.getCTM))},Bb=(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(navigator.userAgent)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(navigator.userAgent))&&11>parseFloat(RegExp.$1),Z=[],ia=[],oa=function(b){if(!b.getBoundingClientRect||!b.parentNode||!T)return{offsetTop:0,offsetLeft:0,scaleX:1,scaleY:1,offsetParent:A};if(!1!==ja.cacheSVGData&&b._gsCache&&b._gsCache.lastUpdate===h.ticker.frame)return b._gsCache;var a,d,e,g,m,p,x,P,f,k,r;
d=b;var t=V(b);if(t.lastUpdate=h.ticker.frame,b.getBBox&&!t.isSVGRoot){d=b.parentNode;for(a=b.getBBox();d&&"svg"!==(d.nodeName+"").toLowerCase();)d=d.parentNode;return g=oa(d),t.offsetTop=a.y*g.scaleY,t.offsetLeft=a.x*g.scaleX,t.scaleX=g.scaleX,t.scaleY=g.scaleY,t.offsetParent=d||A,t}e=t.offsetParent;e===w.body&&(e=A);for(ia.length=Z.length=0;d&&(m=ba(d,T,!0),"matrix(1, 0, 0, 1, 0, 0)"!==m&&"none"!==m&&"translate3d(0px, 0px, 0px)"!==m&&(ia.push(d),Z.push(d.style[T]),d.style[T]="none"),d!==e);)d=d.parentNode;
d=e.getBoundingClientRect();m=b.getScreenCTM();x=b.createSVGPoint();p=x.matrixTransform(m);x.x=x.y=10;x=x.matrixTransform(m);t.scaleX=(x.x-p.x)/10;t.scaleY=(x.y-p.y)/10;void 0===B&&qb();t.borderBox&&!K&&b.getAttribute("width")&&(g=da(b)||{},P=parseFloat(g.borderLeftWidth)+parseFloat(g.borderRightWidth)||0,f=parseFloat(g.borderTopWidth)+parseFloat(g.borderBottomWidth)||0,k=parseFloat(g.width)||0,r=parseFloat(g.height)||0,t.scaleX*=(k-P)/k,t.scaleY*=(r-f)/r);n?(a=b.getBoundingClientRect(),t.offsetLeft=
a.left-d.left,t.offsetTop=a.top-d.top):(t.offsetLeft=p.x-d.left,t.offsetTop=p.y-d.top);t.offsetParent=e;for(b=ia.length;-1<--b;)ia[b].style[T]=Z[b];return t},qa=function(b,a){if(a=a||{},!b||b===A||!b.parentNode||b===window)return{x:0,y:0};var c=da(b),c=rb&&c?c.getPropertyValue(rb):"50% 50%",e=c.split(" "),g=-1!==c.indexOf("left")?"0%":-1!==c.indexOf("right")?"100%":e[0],e=-1!==c.indexOf("top")?"0%":-1!==c.indexOf("bottom")?"100%":e[1];return("center"===e||null==e)&&(e="50%"),("center"===g||isNaN(parseFloat(g)))&&
(g="50%"),b.getBBox&&Fa(b)?(b._gsTransform||(h.set(b,{x:"+=0",overwrite:!1}),void 0===b._gsTransform.xOrigin&&console.log("Draggable requires at least GSAP 1.17.0")),c=b.getBBox(),a.x=b._gsTransform.xOrigin-c.x,a.y=b._gsTransform.yOrigin-c.y):(b.getBBox&&-1!==(g+e).indexOf("%")&&(b=b.getBBox(),b={offsetWidth:b.width,offsetHeight:b.height}),a.x=-1!==g.indexOf("%")?b.offsetWidth*parseFloat(g)/100:parseFloat(g),a.y=-1!==e.indexOf("%")?b.offsetHeight*parseFloat(e)/100:parseFloat(e)),a},V=function(b){if(!1!==
ja.cacheSVGData&&b._gsCache&&b._gsCache.lastUpdate===h.ticker.frame)return b._gsCache;var a,d=b._gsCache=b._gsCache||{};a=da(b);var e=b.getBBox&&Fa(b),g="svg"===(b.nodeName+"").toLowerCase();if(d.isSVG=e,d.isSVGRoot=g,d.borderBox="border-box"===a.boxSizing,d.computedStyle=a,g)a=b.parentNode||A,a.insertBefore(E,b),d.offsetParent=E.offsetParent||A,a.removeChild(E);else if(e){for(a=b.parentNode;a&&"svg"!==(a.nodeName+"").toLowerCase();)a=a.parentNode;d.offsetParent=a}else d.offsetParent=b.offsetParent;
return d},Ma=function(b,a,d,e){if(b===window||!b||!b.style||!b.parentNode)return[1,0,0,1,0,0];var c,m,p,x,P,f,k,r,t,h,n,v,y,H,u=b._gsCache||V(b),C=b.parentNode,S=C._gsCache||V(C),Y=u.computedStyle,U=u.isSVG?S.offsetParent:C.offsetParent;return c=u.isSVG&&-1!==(b.style[T]+"").indexOf("matrix")?b.style[T]:Y?Y.getPropertyValue(Ab):b.currentStyle?b.currentStyle[T]:"1,0,0,1,0,0",b.getBBox&&-1!==(b.getAttribute("transform")+"").indexOf("matrix")&&(c=b.getAttribute("transform")),c=(c+"").match(/(?:\-|\.|\b)(\d|\.|e\-)+/g)||
[1,0,0,1,0,0],6<c.length&&(c=[c[0],c[1],c[4],c[5],c[12],c[13]]),e?c[4]=c[5]=0:u.isSVG&&(P=b._gsTransform)&&(P.xOrigin||P.yOrigin)&&(c[0]=parseFloat(c[0]),c[1]=parseFloat(c[1]),c[2]=parseFloat(c[2]),c[3]=parseFloat(c[3]),c[4]=parseFloat(c[4])-(P.xOrigin-(P.xOrigin*c[0]+P.yOrigin*c[2])),c[5]=parseFloat(c[5])-(P.yOrigin-(P.xOrigin*c[1]+P.yOrigin*c[3]))),a&&(void 0===B&&qb(),p=u.isSVG||u.isSVGRoot?oa(b):b,u.isSVG?(x=b.getBBox(),h=S.isSVGRoot?{x:0,y:0}:C.getBBox(),p={offsetLeft:x.x-h.x,offsetTop:x.y-h.y,
offsetParent:u.offsetParent}):u.isSVGRoot?(n=parseInt(Y.borderTopWidth,10)||0,v=parseInt(Y.borderLeftWidth,10)||0,y=(c[0]-B)*v+c[2]*n,H=c[1]*v+(c[3]-B)*n,f=a.x,k=a.y,r=f-(f*c[0]+k*c[2]),t=k-(f*c[1]+k*c[3]),c[4]=parseFloat(c[4])+r,c[5]=parseFloat(c[5])+t,a.x-=r,a.y-=t,f=p.scaleX,k=p.scaleY,a.x*=f,a.y*=k,c[0]*=f,c[1]*=k,c[2]*=f,c[3]*=k,Bb||(a.x+=y,a.y+=H)):!L&&b.offsetParent&&(a.x+=parseInt(ba(b.offsetParent,"borderLeftWidth"),10)||0,a.y+=parseInt(ba(b.offsetParent,"borderTopWidth"),10)||0),m=C===A||
C===w.body,c[4]=Number(c[4])+a.x+(p.offsetLeft||0)-d.x-(m?0:C.scrollLeft||0),c[5]=Number(c[5])+a.y+(p.offsetTop||0)-d.y-(m?0:C.scrollTop||0),C&&"fixed"===ba(b,"position",Y)&&(c[4]+=X(),c[5]+=La()),!C||C===A||U!==p.offsetParent||S.isSVG||R&&"100100"!==Ma(C).join("")||(p=S.isSVGRoot?oa(C):C,c[4]-=p.offsetLeft||0,c[5]-=p.offsetTop||0,L||!S.offsetParent||u.isSVG||u.isSVGRoot||(c[4]-=parseInt(ba(S.offsetParent,"borderLeftWidth"),10)||0,c[5]-=parseInt(ba(S.offsetParent,"borderTopWidth"),10)||0))),c},Va=
function(b,a){if(!b||b===window||!b.parentNode)return[1,0,0,1,0,0];var c,e,g,m,p,x,f,k;f=qa(b,jb);for(var h=qa(b.parentNode,kb),r=Ma(b,f,h);(b=b.parentNode)&&b.parentNode&&b!==A;)f=h,h=qa(b.parentNode,f===jb?kb:jb),f=Ma(b,f,h),c=r[0],e=r[1],g=r[2],m=r[3],p=r[4],x=r[5],r[0]=c*f[0]+e*f[2],r[1]=c*f[1]+e*f[3],r[2]=g*f[0]+m*f[2],r[3]=g*f[1]+m*f[3],r[4]=p*f[0]+x*f[2]+f[4],r[5]=p*f[1]+x*f[3]+f[5];return a&&(c=r[0],e=r[1],g=r[2],m=r[3],p=r[4],x=r[5],k=c*m-e*g,r[0]=m/k,r[1]=-e/k,r[2]=-g/k,r[3]=c/k,r[4]=(g*
x-m*p)/k,r[5]=-(c*x-e*p)/k),r},ua=function(b,a,d){var c=b.x*a[0]+b.y*a[2]+a[4];a=b.x*a[1]+b.y*a[3]+a[5];return b.x=c*d[0]+a*d[2]+d[4],b.y=c*d[1]+a*d[3]+d[5],b},tb=function(b){return b&&b.length&&b[0]&&(b[0].nodeType&&b[0].style&&!b.nodeType||b[0].length&&b[0][0])?!0:!1},lb="ontouchstart"in A&&"orientation"in window,Xa=function(b){var a=b.split(",");b=(void 0!==E.onpointerdown?"pointerdown,pointermove,pointerup,pointercancel":void 0!==E.onmspointerdown?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":
b).split(",");for(var d={},e=8;-1<--e;)d[a[e]]=b[e],d[b[e]]=a[e];return d}("touchstart,touchmove,touchend,touchcancel"),G=function(b,a,d,e){b.addEventListener?b.addEventListener(Xa[a]||a,d,e):b.attachEvent&&b.attachEvent("on"+a,d)},aa=function(b,a,d){b.removeEventListener?b.removeEventListener(Xa[a]||a,d):b.detachEvent&&b.detachEvent("on"+a,d)},Cb=function(b,a){for(var c=b.length;-1<--c;)if(b[c].identifier===a)return!0;return!1},ub=function(b){H=b.touches&&u<b.touches.length;aa(b.target,"touchend",
ub)},vb=function(b){H=b.touches&&u<b.touches.length;G(b.target,"touchend",ub)},mb=function(b,a,d,e,g,m){var c,x,f,k={};if(a)if(1!==g&&a instanceof Array){k.end=c=[];f=a.length;for(x=0;f>x;x++)c[x]=a[x]*g;d+=1.1;e-=1.1}else"function"==typeof a?k.end=function(c){return a.call(b,c)*g}:k.end=a;return(d||0===d)&&(k.max=d),(e||0===e)&&(k.min=e),m&&(k.velocity=0),k},wb=function(b){var a;return b&&b.getAttribute&&"BODY"!==b.nodeName?"true"===(a=b.getAttribute("data-clickable"))||"false"!==a&&(b.onclick||
F.test(b.nodeName+"")||"true"===b.getAttribute("contentEditable"))?!0:wb(b.parentNode):!1},bb=function(a,c){for(var b,e=a.length;-1<--e;)b=a[e],b.ondragstart=b.onselectstart=c?null:ga,Da(b,"userSelect",c?"text":"none")},Db=function(){var a,c=w.createElement("div"),d=w.createElement("div"),e=d.style,g=w.body||E;return e.display="inline-block",e.position="relative",c.style.cssText=d.innerHTML="width:90px; height:40px; padding:10px; overflow:auto; visibility: hidden",c.appendChild(d),g.appendChild(c),
ma=d.offsetHeight+18>c.scrollHeight,e.width="100%",T||(e.paddingRight="500px",a=c.scrollLeft=c.scrollWidth-c.clientWidth,e.left="-90px",a=a!==c.scrollLeft),g.removeChild(c),a}(),xb=function(a,c){a=Ca(a);c=c||{};var b,e,g,m,p,f,k=w.createElement("div"),n=k.style,v=a.firstChild,r=0,t=0,u=a.scrollTop,y=a.scrollLeft,H=a.scrollWidth,A=a.scrollHeight,z=0,q=0,C=0;zb&&!1!==c.force3D?(p="translate3d(",f="px,0px)"):T&&(p="translate(",f="px)");this.scrollTop=function(a,b){return arguments.length?void this.top(-a,
b):-this.top()};this.scrollLeft=function(a,b){return arguments.length?void this.left(-a,b):-this.left()};this.left=function(b,d){if(!arguments.length)return-(a.scrollLeft+t);var e=a.scrollLeft-y,g=t;return(2<e||-2>e)&&!d?(y=a.scrollLeft,h.killTweensOf(this,!0,{left:1,scrollLeft:1}),this.left(-y),void(c.onKill&&c.onKill())):(b=-b,0>b?(t=b-.5|0,b=0):b>q?(t=b-q|0,b=q):t=0,(t||g)&&(p?this._suspendTransforms||(n[T]=p+-t+"px,"+-r+f):n.left=-t+"px",Db&&0<=t+z&&(n.paddingRight=t+z+"px")),a.scrollLeft=0|b,
void(y=a.scrollLeft))};this.top=function(b,d){if(!arguments.length)return-(a.scrollTop+r);var e=a.scrollTop-u,g=r;return(2<e||-2>e)&&!d?(u=a.scrollTop,h.killTweensOf(this,!0,{top:1,scrollTop:1}),this.top(-u),void(c.onKill&&c.onKill())):(b=-b,0>b?(r=b-.5|0,b=0):b>C?(r=b-C|0,b=C):r=0,(r||g)&&(p?this._suspendTransforms||(n[T]=p+-t+"px,"+-r+f):n.top=-r+"px"),a.scrollTop=0|b,void(u=a.scrollTop))};this.maxScrollTop=function(){return C};this.maxScrollLeft=function(){return q};this.disable=function(){for(v=
k.firstChild;v;)m=v.nextSibling,a.appendChild(v),v=m;a===k.parentNode&&a.removeChild(k)};this.enable=function(){if(v=a.firstChild,v!==k){for(;v;)m=v.nextSibling,k.appendChild(v),v=m;a.appendChild(k);this.calibrate()}};this.calibrate=function(c){var d,m,p=a.clientWidth===b;u=a.scrollTop;y=a.scrollLeft;p&&a.clientHeight===e&&k.offsetHeight===g&&H===a.scrollWidth&&A===a.scrollHeight&&!c||((r||t)&&(d=this.left(),m=this.top(),this.left(-a.scrollLeft),this.top(-a.scrollTop)),(!p||c)&&(n.display="block",
n.width="auto",n.paddingRight="0px",z=Math.max(0,a.scrollWidth-a.clientWidth),z&&(z+=ba(a,"paddingLeft")+(ma?ba(a,"paddingRight"):0))),n.display="inline-block",n.position="relative",n.overflow="visible",n.verticalAlign="top",n.width="100%",n.paddingRight=z+"px",ma&&(n.paddingBottom=ba(a,"paddingBottom",!0)),sa&&(n.zoom="1"),b=a.clientWidth,e=a.clientHeight,H=a.scrollWidth,A=a.scrollHeight,q=a.scrollWidth-b,C=a.scrollHeight-e,g=k.offsetHeight,n.display="block",!d&&!m||(this.left(d),this.top(m)))};
this.content=k;this.element=a;this._suspendTransforms=!1;this.enable()},ja=function(b,c){q.call(this,b);b=Ca(b);O||(O=Pa.com.greensock.plugins.ThrowPropsPlugin);this.vars=c=eb(c||{});this.target=b;this.x=this.y=this.rotation=0;this.dragResistance=parseFloat(c.dragResistance)||0;this.edgeResistance=isNaN(c.edgeResistance)?1:parseFloat(c.edgeResistance)||0;this.lockAxis=c.lockAxis;this.autoScroll=c.autoScroll||0;this.lockedAxis=null;this.allowEventDefault=!!c.allowEventDefault;var d,e,g,m,p,x,n,y,z,
r,t,ea,L,F,B,E,R,C,S,Y,U,na,pa,D,I,cb,Na,Oa,Eb,N,Fb,Aa=(c.type||(sa?"top,left":"x,y")).toLowerCase(),Ja=-1!==Aa.indexOf("x")||-1!==Aa.indexOf("y"),J=-1!==Aa.indexOf("rotation"),nb=J?"rotation":Ja?"x":"left",ka=Ja?"y":"top",fa=-1!==Aa.indexOf("x")||-1!==Aa.indexOf("left")||"scroll"===Aa,M=-1!==Aa.indexOf("y")||-1!==Aa.indexOf("top")||"scroll"===Aa,ma=c.minimumMovement||2,l=this,K=$a(c.trigger||c.handle||b),T={},Z=0,ga=!1,ia=c.clickableTest||wb,V=0,X=function(a){if(l.autoScroll&&l.isDragging&&(ga||
C)){var c,d,g,m,p,ca,f,N;c=b;var x=15*l.autoScroll;ga=!1;Ba.scrollTop=null!=window.pageYOffset?window.pageYOffset:null!=A.scrollTop?A.scrollTop:w.body.scrollTop;Ba.scrollLeft=null!=window.pageXOffset?window.pageXOffset:null!=A.scrollLeft?A.scrollLeft:w.body.scrollLeft;m=l.pointerX-Ba.scrollLeft;for(p=l.pointerY-Ba.scrollTop;c&&!d;)c=(d=Ra(c.parentNode))?Ba:c.parentNode,g=d?{bottom:Math.max(A.clientHeight,window.innerHeight||0),right:Math.max(A.clientWidth,window.innerWidth||0),left:0,top:0}:c.getBoundingClientRect(),
ca=f=0,M&&(N=c._gsMaxScrollY-c.scrollTop,0>N?f=N:p>g.bottom-40&&N?(ga=!0,f=Math.min(N,x*(1-Math.max(0,g.bottom-p)/40)|0)):p<g.top+40&&c.scrollTop&&(ga=!0,f=-Math.min(c.scrollTop,x*(1-Math.max(0,p-g.top)/40)|0)),f&&(c.scrollTop+=f)),fa&&(N=c._gsMaxScrollX-c.scrollLeft,0>N?ca=N:m>g.right-40&&N?(ga=!0,ca=Math.min(N,x*(1-Math.max(0,g.right-m)/40)|0)):m<g.left+40&&c.scrollLeft&&(ga=!0,ca=-Math.min(c.scrollLeft,x*(1-Math.max(0,m-g.left)/40)|0)),ca&&(c.scrollLeft+=ca)),d&&(ca||f)&&(window.scrollTo(c.scrollLeft,
c.scrollTop),ya(l.pointerX+ca,l.pointerY+f))}C&&(d=l.x,m=l.y,1E-6>d&&-1E-6<d&&(d=0),1E-6>m&&-1E-6<m&&(m=0),J?(cb.data.rotation=l.rotation=d,cb.setRatio(1)):e?(M&&e.top(m),fa&&e.left(d)):Ja?(M&&(cb.data.y=m),fa&&(cb.data.x=d),cb.setRatio(1)):(M&&(b.style.top=m+"px"),fa&&(b.style.left=d+"px")),!y||a||Eb||(Eb=!0,ha(l,"drag","onDrag"),Eb=!1));C=!1},da=function(a,c){var d;l.x;l.y;b._gsTransform||!Ja&&!J||h.set(b,{x:"+=0",overwrite:!1});Ja?(l.y=b._gsTransform.y,l.x=b._gsTransform.x):J?l.x=l.rotation=b._gsTransform.rotation:
e?(l.y=e.top(),l.x=e.left()):(l.y=parseInt(b.style.top,10)||0,l.x=parseInt(b.style.left,10)||0);!Y&&!U||c||(Y&&(d=Y(l.x),d!==l.x&&(l.x=d,J&&(l.rotation=d),C=!0)),U&&(d=U(l.y),d!==l.y&&(l.y=d),C=!0));C&&X(!0);a||ha(l,"throwupdate","onThrowUpdate")},oa=function(){var a,d,g,m;n=!1;e?(e.calibrate(),l.minX=r=-e.maxScrollLeft(),l.minY=ea=-e.maxScrollTop(),l.maxX=z=l.maxY=t=0,n=!0):c.bounds&&(a=Wa(c.bounds,b.parentNode),J?(l.minX=r=a.left,l.maxX=z=a.left+a.width,l.minY=ea=l.maxY=t=0):void 0!==c.bounds.maxX||
void 0!==c.bounds.maxY?(a=c.bounds,l.minX=r=a.minX,l.minY=ea=a.minY,l.maxX=z=a.maxX,l.maxY=t=a.maxY):(d=Wa(b,b.parentNode),l.minX=r=ba(b,nb)+a.left-d.left,l.minY=ea=ba(b,ka)+a.top-d.top,l.maxX=z=r+(a.width-d.width),l.maxY=t=ea+(a.height-d.height)),r>z&&(l.minX=z,l.maxX=z=r,r=l.minX),ea>t&&(l.minY=t,l.maxY=t=ea,ea=l.minY),J&&(l.minRotation=r,l.maxRotation=z),n=!0);c.liveSnap&&(g=!0===c.liveSnap?c.snap||{}:c.liveSnap,m=g instanceof Array||"function"==typeof g,J?(Y=Ea(m?g:g.rotation,r,z,1),U=null):(fa&&
(Y=Ea(m?g:g.x||g.left||g.scrollLeft,r,z,e?-1:1)),M&&(U=Ea(m?g:g.y||g.top||g.scrollTop,ea,t,e?-1:1))))},ua=function(){l.isThrowing=!1;ha(l,"throwcomplete","onThrowComplete")},Qa=function(){l.isThrowing=!1},qa=function(a,d){var g,m,p,ca;a&&O?(!0===a&&(g=c.snap||{},m=g instanceof Array||"function"==typeof g,a={resistance:(c.throwResistance||c.resistance||1E3)/(J?10:1)},J?a.rotation=mb(l,m?g:g.rotation,z,r,1,d):(fa&&(a[nb]=mb(l,m?g:g.x||g.left||g.scrollLeft,z,r,e?-1:1,d||"x"===l.lockedAxis)),M&&(a[ka]=
mb(l,m?g:g.y||g.top||g.scrollTop,t,ea,e?-1:1,d||"y"===l.lockedAxis)))),l.isThrowing=!0,ca=isNaN(c.overshootTolerance)?1===c.edgeResistance?0:1-l.edgeResistance+.2:c.overshootTolerance,l.tween=p=O.to(e||b,{throwProps:a,ease:c.ease||Pa.Power3.easeOut,onComplete:ua,onOverwrite:Qa,onUpdate:c.fastMode?ha:da,onUpdateParams:c.fastMode?[l,"onthrowupdate","onThrowUpdate"]:Q},isNaN(c.maxDuration)?2:c.maxDuration,isNaN(c.minDuration)?0===ca?0:.5:c.minDuration,ca),c.fastMode||(e&&(e._suspendTransforms=!0),p.render(p.duration(),
!0,!0),da(!0,!0),l.endX=l.x,l.endY=l.y,J&&(l.endRotation=l.x),p.play(0),da(!0,!0),e&&(e._suspendTransforms=!1))):n&&l.applyBounds()},wa=function(a){var c,d,e,p,ca,N,f,x,k,r=D||[1,0,0,1,0,0];D=Va(b.parentNode,!0);a&&l.isPressed&&r.join(",")!==D.join(",")&&(c=r[0],d=r[1],e=r[2],p=r[3],ca=r[4],N=r[5],f=c*p-d*e,x=p/f*g+-e/f*m+(e*N-p*ca)/f,k=-d/f*g+c/f*m+-(c*N-d*ca)/f,m=x*D[1]+k*D[3]+D[5],g=x*D[0]+k*D[2]+D[4]);D[1]||D[2]||1!=D[0]||1!=D[3]||0!=D[4]||0!=D[5]||(D=null)},za=function(){var a=1-l.edgeResistance;
wa(!1);D&&(g=l.pointerX*D[0]+l.pointerY*D[2]+D[4],m=l.pointerX*D[1]+l.pointerY*D[3]+D[5]);C&&(ya(l.pointerX,l.pointerY),X(!0));if(e)oa(),x=e.top(),p=e.left();else if(va()?(da(!0,!0),oa()):l.applyBounds(),J){var c=b,d={x:0,y:0},f=void 0,c=Ca(c),c=Va(c,!1,void 0),N=d.x,k=d.y;R=(f=!0===f?d:f||{},f.x=N*c[0]+k*c[2]+c[4],f.y=N*c[1]+k*c[3]+c[5],f);da(!0,!0);p=l.x;x=l.y=Math.atan2(R.y-l.pointerY,l.pointerX-R.x)*ob}else x=ba(b,ka),p=ba(b,nb);n&&a&&(p>z?p=z+(p-z)/a:r>p&&(p=r-(r-p)/a),J||(x>t?x=t+(x-t)/a:ea>
x&&(x=ea-(ea-x)/a)))},va=function(){return l.tween&&l.tween.isActive()},La=function(){!ta.parentNode||va()||l.isDragging||ta.parentNode.removeChild(ta)},Ea=function(a,b,c,d){return"function"==typeof a?function(e){var g=l.isPressed?1-l.edgeResistance:1;return a.call(l,e>c?c+(e-c)*g:b>e?b+(e-b)*g:e)*d}:a instanceof Array?function(d){for(var e,g,m=a.length,l=0,p=999999999999999;-1<--m;)e=a[m],g=e-d,0>g&&(g=-g),p>g&&e>=b&&c>=e&&(l=m,p=g);return a[l]}:isNaN(a)?function(a){return a}:function(){return a*
d}},Ha=function(a){if(!(!d||l.isPressed||!a||("mousedown"===a.type||"pointerdown"===a.type)&&30>Ka()-V&&Xa[l.pointerEvent.type])){if(I=va(),l.pointerEvent=a,Xa[a.type]?(pa=-1!==a.type.indexOf("touch")?a.currentTarget||a.target:w,G(pa,"touchend",la),G(pa,"touchmove",Ya),G(pa,"touchcancel",la),G(w,"touchstart",vb)):(pa=null,G(w,"mousemove",Ya)),Oa=null,G(w,"mouseup",la),a&&a.target&&G(a.target,"mouseup",la),na=ia.call(l,a.target)&&!c.dragClickables)return G(a.target,"change",la),ha(l,"press","onPress"),
void bb(K,!0);if(Na=!pa||fa===M||e||!1===l.vars.allowNativeTouchScrolling?!1:fa?"y":"x",sa?a=ab(a,!0):Na||l.allowEventDefault||(a.preventDefault(),a.preventManipulation&&a.preventManipulation()),a.changedTouches?(a=B=a.changedTouches[0],E=a.identifier):a.pointerId?E=a.pointerId:B=E=null,u++,yb(X),m=l.pointerY=a.pageY,g=l.pointerX=a.pageX,(Na||l.autoScroll)&&Ua(b.parentNode),b.parentNode&&(e||l.autoScroll&&!J&&b.parentNode._gsMaxScrollX&&!ta.parentNode)&&!b.getBBox&&(ta.style.width=b.parentNode.scrollWidth+
"px",b.parentNode.appendChild(ta)),za(),l.tween&&l.tween.kill(),l.isThrowing=!1,h.killTweensOf(e||b,!0,T),e&&h.killTweensOf(b,!0,{scrollTo:1}),l.tween=l.lockedAxis=null,(c.zIndexBoost||!J&&!e&&!1!==c.zIndexBoost)&&(b.style.zIndex=ja.zIndex++),l.isPressed=!0,y=!(!c.onDrag&&!l._listeners.drag),!J)for(a=K.length;-1<--a;)Da(K[a],"cursor",c.cursor||"move");ha(l,"press","onPress")}},Ya=function(a){var b,c,e,p,f=a;if(d&&!H&&l.isPressed&&a){if(l.pointerEvent=a,b=a.changedTouches){if(a=b[0],a!==B&&a.identifier!==
E){for(p=b.length;-1<--p&&(a=b[p]).identifier!==E;);if(0>p)return}}else if(a.pointerId&&E&&a.pointerId!==E)return;if(sa)a=ab(a,!0);else{if(pa&&Na&&!Oa&&(c=a.pageX,e=a.pageY,D&&(p=c*D[0]+e*D[2]+D[4],e=c*D[1]+e*D[3]+D[5],c=p),Oa=Math.abs(c-g)>Math.abs(e-m)&&fa?"x":"y",!1!==l.vars.lockAxisOnTouchScroll&&(l.lockedAxis="x"===Oa?"y":"x","function"==typeof l.vars.onLockAxis&&l.vars.onLockAxis.call(l,f)),db&&Na===Oa))return void la(f);l.allowEventDefault||Na&&(!Oa||Na===Oa)||!1===f.cancelable||(f.preventDefault(),
f.preventManipulation&&f.preventManipulation())}l.autoScroll&&(ga=!0);ya(a.pageX,a.pageY)}},ya=function(a,b){var c,d,e,f,N,k,ca=1-l.dragResistance,h=1-l.edgeResistance;l.pointerX=a;l.pointerY=b;J?(f=Math.atan2(R.y-b,a-R.x)*ob,N=l.y-f,l.y=f,180<N?x-=360:-180>N&&(x+=360),e=p+(x-f)*ca):(D&&(k=a*D[0]+b*D[2]+D[4],b=a*D[1]+b*D[3]+D[5],a=k),d=b-m,c=a-g,ma>d&&d>-ma&&(d=0),ma>c&&c>-ma&&(c=0),(l.lockAxis||l.lockedAxis)&&(c||d)&&(k=l.lockedAxis,k||(l.lockedAxis=k=fa&&Math.abs(c)>Math.abs(d)?"y":M?"x":null,k&&
"function"==typeof l.vars.onLockAxis&&l.vars.onLockAxis.call(l,l.pointerEvent)),"y"===k?d=0:"x"===k&&(c=0)),e=p+c*ca,f=x+d*ca);Y||U?(Y&&(e=Y(e)),U&&(f=U(f))):n&&(e>z?e=z+(e-z)*h:r>e&&(e=r+(e-r)*h),J||(f>t?f=t+(f-t)*h:ea>f&&(f=ea+(f-ea)*h)));J||(e=Math.round(e),f=Math.round(f));(l.x!==e||l.y!==f&&!J)&&(J?l.endRotation=l.x=l.endX=e:(M&&(l.y=l.endY=f),fa&&(l.x=l.endX=e)),C=!0,!l.isDragging&&l.isPressed&&(l.isDragging=!0,ha(l,"dragstart","onDragStart")))},la=function(a,e){if(d&&l.isPressed&&(!a||null==
E||e||!(a.pointerId&&a.pointerId!==E||a.changedTouches&&!Cb(a.changedTouches,E)))){l.isPressed=!1;var g,m,p,f,x,k=a,r=l.isDragging,n=h.delayedCall(.001,La);if(pa?(aa(pa,"touchend",la),aa(pa,"touchmove",Ya),aa(pa,"touchcancel",la),aa(w,"touchstart",vb)):aa(w,"mousemove",Ya),aa(w,"mouseup",la),a&&a.target&&aa(a.target,"mouseup",la),C=!1,na)return a&&aa(a.target,"change",la),bb(K,!1),ha(l,"release","onRelease"),ha(l,"click","onClick"),void(na=!1);if(gb(X),!J)for(m=K.length;-1<--m;)Da(K[m],"cursor",c.cursor||
"move");if(r&&(Z=Ta=Ka(),l.isDragging=!1),u--,a){if(sa&&(a=ab(a,!1)),g=a.changedTouches,g&&(a=g[0],a!==B&&a.identifier!==E)){for(m=g.length;-1<--m&&(a=g[m]).identifier!==E;);if(0>m)return}l.pointerEvent=k;l.pointerX=a.pageX;l.pointerY=a.pageY}return k&&!r?(I&&(c.snap||c.bounds)&&qa(c.throwProps),ha(l,"release","onRelease"),db&&"touchmove"===k.type||(ha(l,"click","onClick"),f=k.target||k.srcElement||b,V=Ka(),x=function(){V!==N&&l.enabled()&&!l.isPressed&&(f.click?f.click():w.createEvent&&(p=w.createEvent("MouseEvents"),
p.initMouseEvent("click",!0,!0,window,1,l.pointerEvent.screenX,l.pointerEvent.screenY,l.pointerX,l.pointerY,!1,!1,!1,!1,0,null),f.dispatchEvent(p)))},db||h.delayedCall(1E-5,x))):(qa(c.throwProps),sa||l.allowEventDefault||!k||!c.dragClickables&&ia.call(l,k.target)||!r||Na&&(!Oa||Na!==Oa)||!1===k.cancelable||(k.preventDefault(),k.preventManipulation&&k.preventManipulation()),ha(l,"release","onRelease")),va()&&n.duration(l.tween.duration()),r&&ha(l,"dragend","onDragEnd"),!0}},Fa=function(a){if(a&&l.isDragging){a=
a.target||a.srcElement||b.parentNode;var c=a.scrollLeft-a._gsScrollX,d=a.scrollTop-a._gsScrollY;(c||d)&&(D?(g-=c*D[0]+d*D[2],m-=d*D[3]+c*D[1]):(g-=c,m-=d),a._gsScrollX+=c,a._gsScrollY+=d,ya(l.pointerX,l.pointerY))}},Ma=function(a){var b=Ka(),c=40>b-V,b=40>b-Z,d=c&&N===V,e=!!a.preventDefault,g=c&&Fb===V,m=a.isTrusted||null==a.isTrusted&&c&&d;return e&&(d||b&&!1!==l.vars.suppressClickOnDrag)&&a.stopImmediatePropagation(),!c||d&&m===g?void((l.isPressed||b||c)&&(e?m&&a.detail&&c||(a.preventDefault(),
a.preventManipulation&&a.preventManipulation()):a.returnValue=!1)):(m&&d&&(Fb=V),void(N=V))};(S=ja.get(this.target))&&S.kill();this.startDrag=function(a){Ha(a);l.isDragging||(l.isDragging=!0,ha(l,"dragstart","onDragStart"))};this.drag=Ya;this.endDrag=function(a){la(a,!0)};this.timeSinceDrag=function(){return l.isDragging?0:(Ka()-Z)/1E3};this.hitTest=function(a,b){return ja.hitTest(l.target,a,b)};this.getDirection=function(b,c){var d,e,g,m,f,N,k="velocity"===b&&O?b:"object"!=typeof b||J?"start":"element";
return"element"===k&&(f=a(l.target),N=a(b)),d="start"===k?l.x-p:"velocity"===k?O.getVelocity(this.target,nb):f.left+f.width/2-(N.left+N.width/2),J?0>d?"counter-clockwise":"clockwise":(c=c||2,e="start"===k?l.y-x:"velocity"===k?O.getVelocity(this.target,ka):f.top+f.height/2-(N.top+N.height/2),g=Math.abs(d/e),m=1/c>g?"":0>d?"left":"right",c>g&&(""!==m&&(m+="-"),m+=0>e?"up":"down"),m)};this.applyBounds=function(a){var d,e,g,m;if(a&&c.bounds!==a)return c.bounds=a,l.update(!0);if(da(!0),oa(),n){if(d=l.x,
e=l.y,d>z?d=z:r>d&&(d=r),e>t?e=t:ea>e&&(e=ea),(l.x!==d||l.y!==e)&&(g=!0,l.x=l.endX=d,J?l.endRotation=d:l.y=l.endY=e,C=!0,X(!0),l.autoScroll&&!l.isDragging))for(Ua(b.parentNode),a=b,Ba.scrollTop=null!=window.pageYOffset?window.pageYOffset:null!=A.scrollTop?A.scrollTop:w.body.scrollTop,Ba.scrollLeft=null!=window.pageXOffset?window.pageXOffset:null!=A.scrollLeft?A.scrollLeft:w.body.scrollLeft;a&&!m;)a=(m=Ra(a.parentNode))?Ba:a.parentNode,M&&a.scrollTop>a._gsMaxScrollY&&(a.scrollTop=a._gsMaxScrollY),
fa&&a.scrollLeft>a._gsMaxScrollX&&(a.scrollLeft=a._gsMaxScrollX);l.isThrowing&&(g||l.endX>z||l.endX<r||l.endY>t||l.endY<ea)&&qa(c.throwProps,g)}return l};this.update=function(a,c,d){var e=l.x,g=l.y;return wa(!c),a?l.applyBounds():(C&&d&&X(!0),da(!0)),c&&(ya(l.pointerX,l.pointerY),C&&X(!0)),l.isPressed&&!c&&(fa&&.01<Math.abs(e-l.x)||M&&.01<Math.abs(g-l.y)&&!J)&&za(),l.autoScroll&&(Ua(b.parentNode),ga=l.isDragging,X(!0)),l.autoScroll&&(xa(b,Fa),Sa(b,Fa)),l};this.enable=function(a){var g,m,p;if("soft"!==
a){for(m=K.length;-1<--m;)p=K[m],G(p,"mousedown",Ha),G(p,"touchstart",Ha),G(p,"click",Ma,!0),J||Da(p,"cursor",c.cursor||"move"),Da(p,"touchCallout","none"),Da(p,"touchAction",fa===M||e?"none":fa?"pan-y":"pan-x");bb(K,!1)}return Sa(b,Fa),d=!0,O&&"soft"!==a&&O.track(e||b,Ja?"x,y":J?"rotation":"top,left"),e&&e.enable(),b._gsDragID=g="d"+Za++,W[g]=this,e&&(e.element._gsDragID=g),h.set(b,{x:"+=0",overwrite:!1}),cb={t:b,data:sa?F:b._gsTransform,tween:{},setRatio:sa?function(){h.set(b,L)}:ra._internals.setTransformRatio||
ra._internals.set3DTransformRatio},za(),l.update(!0),l};this.disable=function(a){var c,g,m=l.isDragging;if(!J)for(c=K.length;-1<--c;)Da(K[c],"cursor",null);if("soft"!==a){for(c=K.length;-1<--c;)g=K[c],Da(g,"touchCallout",null),Da(g,"touchAction",null),aa(g,"mousedown",Ha),aa(g,"touchstart",Ha),aa(g,"click",Ma);bb(K,!0);pa&&(aa(pa,"touchcancel",la),aa(pa,"touchend",la),aa(pa,"touchmove",Ya));aa(w,"mouseup",la);aa(w,"mousemove",Ya)}return xa(b,Fa),d=!1,O&&"soft"!==a&&O.untrack(e||b,Ja?"x,y":J?"rotation":
"top,left"),e&&e.disable(),gb(X),l.isDragging=l.isPressed=na=!1,m&&ha(l,"dragend","onDragEnd"),l};this.enabled=function(a,b){return arguments.length?a?l.enable(b):l.disable(b):d};this.kill=function(){return l.isThrowing=!1,h.killTweensOf(e||b,!0,T),l.disable(),delete W[b._gsDragID],l};-1!==Aa.indexOf("scroll")&&(e=this.scrollProxy=new xb(b,Ia({onKill:function(){l.isPressed&&la(null)}},c)),b.style.overflowY=M&&!lb?"auto":"hidden",b.style.overflowX=fa&&!lb?"auto":"hidden",b=e.content);!1!==c.force3D&&
h.set(b,{force3D:!0});J?T.rotation=1:(fa&&(T[nb]=1),M&&(T[ka]=1));J?(L=v,F=L.css,L.overwrite=!1):Ja&&(L=fa&&M?Ga:fa?f:k,F=L.css,L.overwrite=!1);this.enable()},va=ja.prototype=new q;va.constructor=ja;va.pointerX=va.pointerY=0;va.isDragging=va.isPressed=!1;ja.version="0.14.8";ja.zIndex=1E3;G(w,"touchcancel",function(){});G(w,"contextmenu",function(a){for(var b in W)W[b].isPressed&&W[b].endDrag()});ja.create=function(a,c){"string"==typeof a&&(a=h.selector(a));var b;if(a&&0!==a.length)if(tb(a)){b=a;var e,
g,m,p=[],f=b.length;for(e=0;f>e;e++)if(g=b[e],tb(g))for(m=0;m<g.length;m++)p.push(g[m]);else g&&0!==g.length&&p.push(g);b=p}else b=[a];else b=[];for(e=b.length;-1<--e;)b[e]=new ja(b[e],c);return b};ja.get=function(a){return W[(Ca(a)||{})._gsDragID]};ja.timeSinceDrag=function(){return(Ka()-Ta)/1E3};var wa={},a=function(a,c){if(a===window)return wa.left=wa.top=0,wa.width=wa.right=A.clientWidth||a.innerWidth||w.body.clientWidth||0,wa.height=wa.bottom=(a.innerHeight||0)-20<A.clientHeight?A.clientHeight:
a.innerHeight||w.body.clientHeight||0,wa;var b;if(a.pageX!==c)b={left:a.pageX-X(),top:a.pageY-La(),right:a.pageX-X()+1,bottom:a.pageY-La()+1};else if(a.nodeType||a.left===c||a.top===c)if(sa){var e,g,m=0,p=0;b=Ca(a);e=b.offsetWidth;for(g=b.offsetHeight;b;)m+=b.offsetTop,p+=b.offsetLeft,b=b.offsetParent;b={top:m,left:p,width:e,height:g}}else b=Ca(a).getBoundingClientRect();else b=a;return b.right===c&&b.width!==c?(b.right=b.left+b.width,b.bottom=b.top+b.height):b.width===c&&(b={width:b.right-b.left,
height:b.bottom-b.top,right:b.right,left:b.left,bottom:b.bottom,top:b.top}),b};return ja.hitTest=function(b,c,d){if(b===c)return!1;var e,g,m;b=a(b);c=a(c);var p=c.left>b.right||c.right<b.left||c.top>b.bottom||c.bottom<b.top;return p||!d?!p:(m=-1!==(d+"").indexOf("%"),d=parseFloat(d)||0,e={left:Math.max(b.left,c.left),top:Math.max(b.top,c.top)},e.width=Math.min(b.right,c.right)-e.left,e.height=Math.min(b.bottom,c.bottom)-e.top,0>e.width||0>e.height?!1:m?(d*=.01,g=e.width*e.height,g>=b.width*b.height*
d||g>=c.width*c.height*d):e.width>d&&e.height>d)},ta.style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;",ja},!0)});_gsScope._gsDefine&&_gsScope._gsQueue.pop()();(function(q){var h=function(){return(_gsScope.GreenSockGlobals||_gsScope)[q]};"function"==typeof define&&define.amd?define(["TweenLite","CSSPlugin"],h):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),require("../plugins/CSSPlugin.js"),module.exports=h())})("Draggable");
(function(q,h,ra,y,H,O){function B(a,b,c,d,e){return f(a,a,c,d,b,a.defaultView.pageXOffset,a.defaultView.pageYOffset).then(function(g){F("Document cloned");var m="data-html2canvas-node"+e,p="["+m+"='"+e+"']";a.querySelector(p).removeAttribute(m);var m=g.contentWindow,f=m.document.querySelector(p);return("function"===typeof b.onclone?Promise.resolve(b.onclone(m.document)):Promise.resolve(!0)).then(function(){return K(f,g,b,c,d)})})}function K(a,b,c,d,e){var g=b.contentWindow,m=new qa(g.document),p=
new W(c,m),f=$a(a);d="view"===c.type?d:L(g.document);e="view"===c.type?e:R(g.document);var k=new c.renderer(d,e,p,c,h);return(new I(a,k,m,p,c)).ready.then(function(){F("Finished rendering");var d;d="view"===c.type?n(k.canvas,{width:k.canvas.width,height:k.canvas.height,top:0,left:0,x:0,y:0}):a===g.document.body||a===g.document.documentElement||null!=c.canvas?k.canvas:n(k.canvas,{width:null!=c.width?c.width:f.width,height:null!=c.height?c.height:f.height,top:f.top,left:f.left,x:g.pageXOffset,y:g.pageYOffset});
c.removeContainer&&(b.parentNode.removeChild(b),F("Cleaned up container"));return d})}function n(a,b){var c=h.createElement("canvas"),d=Math.min(a.width-1,Math.max(0,b.left)),e=Math.min(a.width,Math.max(1,b.left+b.width)),g=Math.min(a.height-1,Math.max(0,b.top)),m=Math.min(a.height,Math.max(1,b.top+b.height));c.width=b.width;c.height=b.height;F("Cropping canvas at:","left:",b.left,"top:",b.top,"width:",e-d,"height:",m-g);F("Resulting crop with width",b.width,"and height",b.height," with x",d,"and y",
g);c.getContext("2d").drawImage(a,d,g,e-d,m-g,b.x,b.y,e-d,m-g);return c}function L(a){return Math.max(Math.max(a.body.scrollWidth,a.documentElement.scrollWidth),Math.max(a.body.offsetWidth,a.documentElement.offsetWidth),Math.max(a.body.clientWidth,a.documentElement.clientWidth))}function R(a){return Math.max(Math.max(a.body.scrollHeight,a.documentElement.scrollHeight),Math.max(a.body.offsetHeight,a.documentElement.offsetHeight),Math.max(a.body.clientHeight,a.documentElement.clientHeight))}function ma(){return"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"}
function Ga(a,b){for(var c=3===a.nodeType?h.createTextNode(a.nodeValue):a.cloneNode(!1),d=a.firstChild;d;)!0!==b&&1===d.nodeType&&"SCRIPT"===d.nodeName||c.appendChild(Ga(d,b)),d=d.nextSibling;return c}function f(a,b,c,d,e,g,m){ka(a);var p=h.documentMode&&9>=h.documentMode?Ga(a.documentElement,e.javascriptEnabled):a.documentElement.cloneNode(!0),f=b.createElement("iframe");f.className="html2canvas-container";f.style.visibility="hidden";f.style.position="fixed";f.style.left="-10000px";f.style.top="0px";
f.style.border="0";f.width=c;f.height=d;f.scrolling="no";b.body.appendChild(f);return new Promise(function(b){var c=f.contentWindow.document;k(a.documentElement,p,"textarea");k(a.documentElement,p,"select");f.contentWindow.onload=f.onload=function(){var d=setInterval(function(){0<c.body.childNodes.length&&(w(a,c),clearInterval(d),"view"===e.type&&f.contentWindow.scrollTo(g,m),b(f))},50)};c.open();c.write("<!DOCTYPE html><html></html>");!a.defaultView||g===a.defaultView.pageXOffset&&m===a.defaultView.pageYOffset||
a.defaultView.scrollTo(g,m);c.replaceChild(!0===e.javascriptEnabled?c.adoptNode(p):A(c.adoptNode(p)),c.documentElement);c.close()})}function k(a,b,c){a=a.getElementsByTagName(c);b=b.getElementsByTagName(c);c=a.length;for(var d=0;d<c;d++)b[d].value=a[d].value}function v(a,b,c,d,e,g){return(new Ab(a,b,q.document)).then(Pa(a)).then(function(a){return f(a,c,d,e,g,0,0)})}function Pa(a){return function(b){var c=new DOMParser,d;try{d=c.parseFromString(b,"text/html")}catch(e){F("DOMParser not supported, falling back to createHTMLDocument");
d=h.implementation.createHTMLDocument("");try{d.open(),d.write(b),d.close()}catch(g){F("createHTMLDocument write not supported, falling back to document.body.innerHTML"),d.body.innerHTML=b}}(b=d.querySelector("base"))&&b.href.host||(b=d.createElement("base"),b.href=a,d.head.insertBefore(b,d.head.firstChild));return d}}function ka(a){[].slice.call(a.querySelectorAll("canvas"),0).forEach(function(a){a.setAttribute("data-html2canvas-canvas-clone","canvas-"+Cb++)})}function w(a,b){[].slice.call(a.querySelectorAll("[data-html2canvas-canvas-clone]"),
0).forEach(function(a){try{var c=b.querySelector('[data-html2canvas-canvas-clone="'+a.getAttribute("data-html2canvas-canvas-clone")+'"]');c&&(c.width=a.width,c.height=a.height,c.getContext("2d").putImageData(a.getContext("2d").getImageData(0,0,a.width,a.height),0,0))}catch(e){F("Unable to copy canvas content from",a,e)}a.removeAttribute("data-html2canvas-canvas-clone")})}function A(a){[].slice.call(a.childNodes,0).filter(z).forEach(function(b){"SCRIPT"===b.tagName?a.removeChild(b):A(b)});return a}
function z(a){return a.nodeType===Node.ELEMENT_NODE}function E(a){var b=h.createElement("a");b.href=a;b.href=b.href;return b}function Q(a){this.b=this.g=this.r=0;this.a=null;this.fromArray(a)||this.namedColor(a)||this.rgb(a)||this.rgba(a)||this.hex6(a)||this.hex3(a)}function ga(a){this.src=a;F("DummyImageContainer for",a);if(!this.promise||!this.image){F("Initiating DummyImageContainer");ga.prototype.image=new Image;var b=this.image;ga.prototype.promise=new Promise(function(a,d){b.onload=a;b.onerror=
d;b.src=ma();!0===b.complete&&a(b)})}}function ob(a,b){var c=h.createElement("div"),d=h.createElement("img"),e=h.createElement("span"),g;c.style.visibility="hidden";c.style.fontFamily=a;c.style.fontSize=b;c.style.margin=0;c.style.padding=0;h.body.appendChild(c);d.src=ma();d.width=1;d.height=1;d.style.margin=0;d.style.padding=0;d.style.verticalAlign="baseline";e.style.fontFamily=a;e.style.fontSize=b;e.style.margin=0;e.style.padding=0;e.appendChild(h.createTextNode("Hidden Text"));c.appendChild(e);
c.appendChild(d);g=d.offsetTop-e.offsetTop+1;c.removeChild(e);c.appendChild(h.createTextNode("Hidden Text"));c.style.lineHeight="normal";d.style.verticalAlign="super";d=d.offsetTop-c.offsetTop+1;h.body.removeChild(c);this.baseline=g;this.lineWidth=1;this.middle=d}function Ka(){this.data={}}function sa(a,b,c){this.image=null;this.src=a;var d=this,e=$a(a);this.promise=(b?new Promise(function(b){"about:blank"===a.contentWindow.document.URL||null==a.contentWindow.document.documentElement?a.contentWindow.onload=
a.onload=function(){b(a)}:b(a)}):this.proxyLoad(c.proxy,e,c)).then(function(a){return html2canvas(a.contentWindow.document.documentElement,{type:"view",width:a.width,height:a.height,proxy:c.proxy,javascriptEnabled:c.javascriptEnabled,removeContainer:c.removeContainer,allowTaint:c.allowTaint,imageTimeout:c.imageTimeout/2})}).then(function(a){return d.image=a})}function ta(a){this.src=a.value;this.colorStops=[];this.type=null;this.y1=this.x1=this.y0=this.x0=.5;this.promise=Promise.resolve(!0)}function M(a,
b){this.src=a;this.image=new Image;var c=this;this.tainted=null;this.promise=new Promise(function(d,e){c.image.onload=d;c.image.onerror=e;b&&(c.image.crossOrigin="anonymous");c.image.src=a;!0===c.image.complete&&d(c.image)})}function W(a,b){this.link=null;this.options=a;this.support=b;this.origin=this.getOrigin(q.location.href)}function Za(a){ta.apply(this,arguments);this.type=this.TYPES.LINEAR;var b=null===a.args[0].match(this.stepRegExp);b?a.args[0].split(" ").reverse().forEach(function(a){switch(a){case "left":this.x0=
0;this.x1=1;break;case "top":this.y0=0;this.y1=1;break;case "right":this.x0=1;this.x1=0;break;case "bottom":this.y0=1;this.y1=0;break;case "to":a=this.y0;var b=this.x0;this.y0=this.y1;this.x0=this.x1;this.x1=b;this.y1=a}},this):(this.y0=0,this.y1=1);this.colorStops=a.args.slice(b?1:0).map(function(a){a=a.match(this.stepRegExp);return{color:new Q(a[1]),stop:"%"===a[3]?a[2]/100:null}},this);null===this.colorStops[0].stop&&(this.colorStops[0].stop=0);null===this.colorStops[this.colorStops.length-1].stop&&
(this.colorStops[this.colorStops.length-1].stop=1);this.colorStops.forEach(function(a,b){null===a.stop&&this.colorStops.slice(b).some(function(c,d){return null!==c.stop?(a.stop=(c.stop-this.colorStops[b-1].stop)/(d+1)+this.colorStops[b-1].stop,!0):!1},this)},this)}function F(){q.html2canvas.logging&&q.console&&q.console.log&&Function.prototype.bind.call(q.console.log,q.console).apply(q.console,[Date.now()-q.html2canvas.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))}function u(a,b){this.node=
a;this.parent=b;this.borders=this.bounds=this.stack=null;this.clip=[];this.backgroundClip=[];this.computedStyles=this.visible=this.offsetBounds=null;this.colors={};this.styles={};this.transformMatrix=this.transformData=this.backgroundImages=null;this.isPseudoElement=!1;this.opacity=null}function db(a){if(a&&"matrix"===a[1])return a[2].split(",").map(function(a){return parseFloat(a.trim())})}function Ta(a){return-1!==a.toString().indexOf("%")}function Qa(a){var b,c,d,e,g,m=[],f=0,k=0,h,n,v=function(){b&&
('"'===c.substr(0,1)&&(c=c.substr(1,c.length-2)),c&&n.push(c),"-"===b.substr(0,1)&&0<(e=b.indexOf("-",1)+1)&&(d=b.substr(0,e),b=b.substr(e)),m.push({prefix:d,method:b.toLowerCase(),value:g,args:n,image:null}));n=[];b=d=c=g=""};n=[];b=d=c=g="";a.split("").forEach(function(a){if(!(0===f&&-1<" \r\n\t".indexOf(a))){switch(a){case '"':h?h===a&&(h=null):h=a;break;case "(":if(!h){if(0===f){f=1;g+=a;return}k++}break;case ")":if(!h&&1===f){if(0===k){f=0;g+=a;v();return}k--}break;case ",":if(!h){if(0===f){v();
return}if(1===f&&0===k&&!b.match(/^url$/i)){n.push(c);c="";g+=a;return}}}g+=a;0===f?b+=a:c+=a}});v();return m}function Ha(a){return a.replace("px","")}function Ba(a){return parseFloat(a)}function $a(a){if(a.getBoundingClientRect){var b=a.getBoundingClientRect(),c=null==a.offsetWidth?b.width:a.offsetWidth;return{top:b.top,bottom:b.bottom||b.top+b.height,right:b.left+c,left:b.left,width:c,height:null==a.offsetHeight?b.height:a.offsetHeight}}return{}}function eb(a){var b=a.offsetParent?eb(a.offsetParent):
{top:0,left:0};return{top:a.offsetTop+b.top,bottom:a.offsetTop+a.offsetHeight+b.top,right:a.offsetLeft+b.left+a.offsetWidth,left:a.offsetLeft+b.left,width:a.offsetWidth,height:a.offsetHeight}}function I(a,b,c,d,e){F("Starting NodeParser");this.renderer=b;this.options=e;this.range=null;this.support=c;this.renderQueue=[];this.stack=new oa(!0,1,a.ownerDocument,null);c=new u(a,null);e.background&&b.rectangle(0,0,b.width,b.height,new Q(e.background));if(a===a.ownerDocument.documentElement){var g=new u(c.color("backgroundColor").isTransparent()?
a.ownerDocument.body:a.ownerDocument.documentElement,null);b.rectangle(0,0,b.width,b.height,g.color("backgroundColor"))}c.visibile=c.isElementVisible();this.createPseudoHideStyles(a.ownerDocument);this.disableAnimations(a.ownerDocument);this.nodes=[].concat.apply([],[c].concat(this.getChildren(c)).filter(function(a){return a.visible=a.isElementVisible()}).map(this.getPseudoElements,this));this.fontMetrics=new Ka;F("Fetched nodes, total:",this.nodes.length);F("Calculate overflow clips");this.calculateOverflowClips();
F("Start fetching images");this.images=d.fetch(this.nodes.filter(za));this.ready=this.images.ready.then(Wa(function(){F("Images loaded, starting parsing");F("Creating stacking contexts");this.createStackingContexts();F("Sorting stacking contexts");this.sortStackingContexts(this.stack);this.parse(this.stack);F("Render queue created with "+this.renderQueue.length+" items");return new Promise(Wa(function(a){e.async?"function"===typeof e.async?e.async.call(this,this.renderQueue,a):0<this.renderQueue.length?
(this.renderIndex=0,this.asyncRenderer(this.renderQueue,a)):a():(this.renderQueue.forEach(this.paint,this),a())},this))},this))}function yb(a){return a.replace(/(\-[a-z])/g,function(a){return a.toUpperCase().replace("-","")})}function gb(){}function fb(a,b,c,d){return a.map(function(e,g){if(0<e.width){var m=b.left,f=b.top,k=b.width,h=b.height-a[2].width;switch(g){case 0:h=a[0].width;e.args=Sa({c1:[m,f],c2:[m+k,f],c3:[m+k-a[1].width,f+h],c4:[m+a[3].width,f+h]},d[0],d[1],c.topLeftOuter,c.topLeftInner,
c.topRightOuter,c.topRightInner);break;case 1:m=b.left+b.width-a[1].width;k=a[1].width;e.args=Sa({c1:[m+k,f],c2:[m+k,f+h+a[2].width],c3:[m,f+h],c4:[m,f+a[0].width]},d[1],d[2],c.topRightOuter,c.topRightInner,c.bottomRightOuter,c.bottomRightInner);break;case 2:f=f+b.height-a[2].width;h=a[2].width;e.args=Sa({c1:[m+k,f+h],c2:[m,f+h],c3:[m+a[3].width,f],c4:[m+k-a[3].width,f]},d[2],d[3],c.bottomRightOuter,c.bottomRightInner,c.bottomLeftOuter,c.bottomLeftInner);break;case 3:k=a[3].width,e.args=Sa({c1:[m,
f+h+a[2].width],c2:[m,f],c3:[m+k,f+a[0].width],c4:[m+k,f+h]},d[3],d[0],c.bottomLeftOuter,c.bottomLeftInner,c.topLeftOuter,c.topLeftInner)}}return e})}function Ia(a,b,c,d){var e=(Math.sqrt(2)-1)/3*4,g=c*e,e=d*e;c=a+c;d=b+d;return{topLeft:X({x:a,y:d},{x:a,y:d-e},{x:c-g,y:b},{x:c,y:b}),topRight:X({x:a,y:b},{x:a+g,y:b},{x:c,y:d-e},{x:c,y:d}),bottomRight:X({x:c,y:b},{x:c,y:b+e},{x:a+g,y:d},{x:a,y:d}),bottomLeft:X({x:c,y:d},{x:c-g,y:d},{x:a,y:b+e},{x:a,y:b})}}function La(a,b,c){var d=a.left,e=a.top,g=a.width;
a=a.height;var m=b[0][0],f=b[0][1],k=b[1][0],h=b[1][1],n=b[2][0],v=b[2][1],r=b[3][0];b=b[3][1];var t=g-k,z=a-v,y=g-n,w=a-b;return{topLeftOuter:Ia(d,e,m,f).topLeft.subdivide(.5),topLeftInner:Ia(d+c[3].width,e+c[0].width,Math.max(0,m-c[3].width),Math.max(0,f-c[0].width)).topLeft.subdivide(.5),topRightOuter:Ia(d+t,e,k,h).topRight.subdivide(.5),topRightInner:Ia(d+Math.min(t,g+c[3].width),e+c[0].width,t>g+c[3].width?0:k-c[3].width,h-c[0].width).topRight.subdivide(.5),bottomRightOuter:Ia(d+y,e+z,n,v).bottomRight.subdivide(.5),
bottomRightInner:Ia(d+Math.min(y,g-c[3].width),e+Math.min(z,a+c[0].width),Math.max(0,n-c[1].width),v-c[2].width).bottomRight.subdivide(.5),bottomLeftOuter:Ia(d,e+w,r,b).bottomLeft.subdivide(.5),bottomLeftInner:Ia(d+c[3].width,e+w,Math.max(0,r-c[3].width),b-c[2].width).bottomLeft.subdivide(.5)}}function X(a,b,c,d){var e=function(a,b,c){return{x:a.x+(b.x-a.x)*c,y:a.y+(b.y-a.y)*c}};return{start:a,startControl:b,endControl:c,end:d,subdivide:function(g){var f=e(a,b,g),p=e(b,c,g),k=e(c,d,g),h=e(f,p,g),
p=e(p,k,g);g=e(h,p,g);return[X(a,f,h,g),X(g,p,k,d)]},curveTo:function(a){a.push(["bezierCurve",b.x,b.y,c.x,c.y,d.x,d.y])},curveToReversed:function(d){d.push(["bezierCurve",c.x,c.y,b.x,b.y,a.x,a.y])}}}function Sa(a,b,c,d,e,g,f){var m=[];0<b[0]||0<b[1]?(m.push(["line",d[1].start.x,d[1].start.y]),d[1].curveTo(m)):m.push(["line",a.c1[0],a.c1[1]]);0<c[0]||0<c[1]?(m.push(["line",g[0].start.x,g[0].start.y]),g[0].curveTo(m),m.push(["line",f[0].end.x,f[0].end.y]),f[0].curveToReversed(m)):(m.push(["line",a.c2[0],
a.c2[1]]),m.push(["line",a.c3[0],a.c3[1]]));0<b[0]||0<b[1]?(m.push(["line",e[1].end.x,e[1].end.y]),e[1].curveToReversed(m)):m.push(["line",a.c4[0],a.c4[1]]);return m}function xa(a,b,c,d,e,g,f){0<b[0]||0<b[1]?(a.push(["line",d[0].start.x,d[0].start.y]),d[0].curveTo(a),d[1].curveTo(a)):a.push(["line",g,f]);(0<c[0]||0<c[1])&&a.push(["line",e[0].start.x,e[0].start.y])}function Ra(a){return 0>a.cssInt("zIndex")}function pb(a){return 0<a.cssInt("zIndex")}function Ua(a){return 0===a.cssInt("zIndex")}function ab(a){return-1!==
["inline","inline-block","inline-table"].indexOf(a.css("display"))}function Ca(a){return 0<a.node.data.trim().length}function ya(a){return["TopLeft","TopRight","BottomRight","BottomLeft"].map(function(b){b=a.css("border"+b+"Radius").split(" ");1>=b.length&&(b[1]=b[0]);return b.map(qb)})}function Da(a){return a.nodeType===Node.TEXT_NODE||a.nodeType===Node.ELEMENT_NODE}function da(a){return"static"!==a.css("position")}function hb(a){return"none"!==a.css("float")}function Ea(a){var b=this;return function(){return!a.apply(b,
arguments)}}function za(a){return a.node.nodeType===Node.ELEMENT_NODE}function ba(a){return a.node.nodeType===Node.TEXT_NODE}function ha(a){return function(b,c){return b.cssInt("zIndex")+a.indexOf(b)/a.length-(c.cssInt("zIndex")+a.indexOf(c)/a.length)}}function Wa(a,b){return function(){return a.apply(b,arguments)}}function qb(a){return parseInt(a,10)}function zb(a){return a.width}function rb(a){return a.node.nodeType!==Node.ELEMENT_NODE||-1==="SCRIPT HEAD TITLE OBJECT BR OPTION".split(" ").indexOf(a.node.nodeName)}
function T(a){for(var b=[],c=0,d=!1,e;a.length;)-1!==[32,13,10,9,45].indexOf(a[c])===d?(e=a.splice(0,c),e.length&&b.push(q.html2canvas.punycode.ucs2.encode(e)),d=!d,c=0):c++,c>=a.length&&(e=a.splice(0,c),e.length&&b.push(q.html2canvas.punycode.ucs2.encode(e)));return b}function Ab(a,b,c){if(!b)return Promise.reject("No proxy configured");var d=sb(va);a=Fa(b,a,d);return va?Xa(a):kb(c,a,d).then(function(a){return Ma(a.content)})}function jb(a,b,c){var d=sb(wa);a=Fa(b,a,d);return wa?Promise.resolve(a):
kb(c,a,d).then(function(a){return"data:"+a.type+";base64,"+a.content})}function kb(a,b,c){return new Promise(function(d,e){var g=a.createElement("script"),f=function(){delete q.html2canvas.proxy[c];a.body.removeChild(g)};q.html2canvas.proxy[c]=function(a){f();d(a)};g.src=b;g.onerror=function(a){f();e(a)};a.body.appendChild(g)})}function sb(a){return a?"":"html2canvas_"+Date.now()+"_"+ ++ja+"_"+Math.round(1E5*Math.random())}function Fa(a,b,c){return a+"?url="+encodeURIComponent(b)+(c.length?"&callback=html2canvas.proxy."+
c:"")}function Bb(a,b){h.createElement("script");var c=h.createElement("a");c.href=a;this.src=a=c.href;this.image=new Image;var d=this;this.promise=new Promise(function(c,g){d.image.crossOrigin="Anonymous";d.image.onload=c;d.image.onerror=g;(new jb(a,b,h)).then(function(a){d.image.src=a})["catch"](g)})}function Z(a,b,c){u.call(this,a,b);this.isPseudoElement=!0;this.before=":before"===c}function ia(a,b,c,d,e){this.width=a;this.height=b;this.images=c;this.options=d;this.document=e}function oa(a,b,c,
d){u.call(this,c,d);this.ownStacking=a;this.contexts=[];this.children=[];this.opacity=(this.parent?this.parent.stack.opacity:1)*b}function qa(a){this.rangeBounds=this.testRangeBounds(a);this.cors=this.testCORS();this.svg=this.testSVG()}function V(a){this.src=a;this.image=null;var b=this;this.promise=this.hasFabric().then(function(){return b.isInline(a)?Promise.resolve(b.inlineFormatting(a)):Xa(a)}).then(function(a){return new Promise(function(c){html2canvas.fabric.loadSVGFromString(a,b.createCanvas.call(b,
c))})})}function Ma(a){var b=a.length,c,d,e,g,f,k,h="";for(c=0;c<b;c+=4)d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c]),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+1]),g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+2]),f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[c+3]),d=d<<2|e>>4,e=(e&15)<<4|g>>2,k=(g&3)<<6|f,h=64===g?h+String.fromCharCode(d):64===f||-1===f?
h+String.fromCharCode(d,e):h+String.fromCharCode(d,e,k);return h}function Va(a,b){this.src=a;this.image=null;var c=this;this.promise=b?new Promise(function(b,e){c.image=new Image;c.image.onload=b;c.image.onerror=e;c.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(a);!0===c.image.complete&&b(c.image)}):this.hasFabric().then(function(){return new Promise(function(b){html2canvas.fabric.parseSVGDocument(a,c.createCanvas.call(c,b))})})}function ua(a,b){u.call(this,a,b)}function tb(a,
b,c){if(0<a.length)return b+c.toUpperCase()}function lb(a){ta.apply(this,arguments);this.type="linear"===a.args[0]?this.TYPES.LINEAR:this.TYPES.RADIAL}function Xa(a){return new Promise(function(b,c){var d=new XMLHttpRequest;d.open("GET",a);d.onload=function(){200===d.status?b(d.responseText):c(Error(d.statusText))};d.onerror=function(){c(Error("Network Error"))};d.send()})}function G(a,b){ia.apply(this,arguments);this.canvas=this.options.canvas||this.document.createElement("canvas");this.options.canvas||
(this.canvas.width=a,this.canvas.height=b);this.ctx=this.canvas.getContext("2d");this.taintCtx=this.document.createElement("canvas").getContext("2d");this.ctx.textBaseline="bottom";this.variables={};F("Initialized CanvasRenderer with size",a,"x",b)}function aa(a){return 0<a.length}(function(){function a(a,b){D[U]=a;D[U+1]=b;U+=2;2===U&&G()}function b(a){return"function"===typeof a}function c(){return function(){process.nextTick(f)}}function d(){var a=0,b=new B(f),c=h.createTextNode("");b.observe(c,
{characterData:!0});return function(){c.data=a=++a%2}}function e(){var a=new MessageChannel;a.port1.onmessage=f;return function(){a.port2.postMessage(0)}}function g(){return function(){setTimeout(f,1)}}function f(){for(var a=0;a<U;a+=2)(0,D[a])(D[a+1]),D[a]=void 0,D[a+1]=void 0;U=0}function k(){}function n(a,b,c,d){try{a.call(b,c,d)}catch(J){return J}}function v(b,c,d){a(function(a){var b=!1,e=n(d,c,function(d){b||(b=!0,c!==d?w(a,d):t(a,d))},function(c){b||(b=!0,u(a,c))});!b&&e&&(b=!0,u(a,e))},b)}
function z(a,b){1===b.a?t(a,b.b):2===a.a?u(a,b.b):A(b,void 0,function(b){w(a,b)},function(b){u(a,b)})}function w(a,c){if(a===c)u(a,new TypeError("You cannot resolve a promise with itself"));else if("function"===typeof c||"object"===typeof c&&null!==c)if(c.constructor===a.constructor)z(a,c);else{var d;try{d=c.then}catch(Ja){R.error=Ja,d=R}d===R?u(a,R.error):void 0===d?t(a,c):b(d)?v(a,c,d):t(a,c)}else t(a,c)}function r(a){a.f&&a.f(a.b);L(a)}function t(b,c){void 0===b.a&&(b.b=c,b.a=1,0!==b.e.length&&
a(L,b))}function u(b,c){void 0===b.a&&(b.a=2,b.b=c,a(r,b))}function A(b,c,d,e){var g=b.e,f=g.length;b.f=null;g[f]=c;g[f+1]=d;g[f+2]=e;0===f&&b.a&&a(L,b)}function L(a){var b=a.e,c=a.a;if(0!==b.length){for(var d,e,g=a.b,f=0;f<b.length;f+=3)d=b[f],e=b[f+c],d?M(c,d,e,g):e(g);a.e.length=0}}function E(){this.error=null}function M(a,c,d,e){var g=b(d),f,m,k,p;if(g){try{f=d(e)}catch(Gb){K.error=Gb,f=K}f===K?(p=!0,m=f.error,f=null):k=!0;if(c===f){u(c,new TypeError("A promises callback cannot return that same promise."));
return}}else f=e,k=!0;void 0===c.a&&(g&&k?w(c,f):p?u(c,m):1===a?t(c,f):2===a&&u(c,f))}function F(a,b){try{b(function(b){w(a,b)},function(b){u(a,b)})}catch(Aa){u(a,Aa)}}function C(a,b,c,d){this.n=a;this.c=new a(k,d);this.i=c;this.o(b)?(this.m=b,this.d=this.length=b.length,this.l(),0===this.length?t(this.c,this.b):(this.length=this.length||0,this.k(),0===this.d&&t(this.c,this.b))):u(this.c,this.p())}function S(a){ka++;this.b=this.a=void 0;this.e=[];if(k!==a){if(!b(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");
if(!(this instanceof S))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");F(this,a)}}var Y=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},U=0,na="undefined"!==typeof q?q:{},B=na.MutationObserver||na.WebKitMutationObserver,na="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel,D=Array(1E3),G;G="undefined"!==
typeof process&&"[object process]"==={}.toString.call(process)?c():B?d():na?e():g();var R=new E,K=new E;C.prototype.o=function(a){return Y(a)};C.prototype.p=function(){return Error("Array Methods must be provided an Array")};C.prototype.l=function(){this.b=Array(this.length)};C.prototype.k=function(){for(var a=this.length,b=this.c,c=this.m,d=0;void 0===b.a&&d<a;d++)this.j(c[d],d)};C.prototype.j=function(a,b){var c=this.n;"object"===typeof a&&null!==a?a.constructor===c&&void 0!==a.a?(a.f=null,this.g(a.a,
b,a.b)):this.q(c.resolve(a),b):(this.d--,this.b[b]=this.h(a))};C.prototype.g=function(a,b,c){var d=this.c;void 0===d.a&&(this.d--,this.i&&2===a?u(d,c):this.b[b]=this.h(c));0===this.d&&t(d,this.b)};C.prototype.h=function(a){return a};C.prototype.q=function(a,b){var c=this;A(a,void 0,function(a){c.g(1,b,a)},function(a){c.g(2,b,a)})};var ka=0;S.all=function(a,b){return(new C(this,a,!0,b)).c};S.race=function(a,b){function c(a){w(e,a)}function d(a){u(e,a)}var e=new this(k,b);if(!Y(a))return u(e,new TypeError("You must pass an array to race.")),
e;for(var g=a.length,f=0;void 0===e.a&&f<g;f++)A(this.resolve(a[f]),void 0,c,d);return e};S.resolve=function(a,b){if(a&&"object"===typeof a&&a.constructor===this)return a;var c=new this(k,b);w(c,a);return c};S.reject=function(a,b){var c=new this(k,b);u(c,a);return c};S.prototype={constructor:S,then:function(b,c){var d=this.a;if(1===d&&!b||2===d&&!c)return this;var e=new this.constructor(k),g=this.b;if(d){var f=arguments[d-1];a(function(){M(d,e,f,g)})}else A(this,e,b,c);return e},"catch":function(a){return this.then(null,
a)}};var I={Promise:S,polyfill:function(){var a;a="undefined"!==typeof y?y:"undefined"!==typeof q&&q.document?q:self;"Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var c;new a.Promise(function(a){c=a});return b(c)}()||(a.Promise=S)}};"function"===typeof H&&H.amd?H(function(){return I}):"undefined"!==typeof module&&module.exports?module.exports=I:"undefined"!==typeof this&&(this.ES6Promise=I)}).call(q);q&&q.ES6Promise.polyfill();if("undefined"===
typeof h||"function"!==typeof Object.create||"function"!==typeof h.createElement("canvas").getContext)(q||module.exports).html2canvas=function(){return Promise.reject("No canvas support")};else{(function(a){function b(a){throw RangeError(L[a]);}function c(a,b){for(var c=a.length,d=[];c--;)d[c]=b(a[c]);return d}function d(a,b){var d=a.split("@"),e="";1<d.length&&(e=d[0]+"@",a=d[1]);d=a.split(A);d=c(d,b).join(".");return e+d}function e(a){for(var b=[],c=0,d=a.length,e,g;c<d;)e=a.charCodeAt(c++),55296<=
e&&56319>=e&&c<d?(g=a.charCodeAt(c++),56320==(g&64512)?b.push(((e&1023)<<10)+(g&1023)+65536):(b.push(e),c--)):b.push(e);return b}function g(a){return c(a,function(a){var b="";65535<a&&(a-=65536,b+=q(a>>>10&1023|55296),a=56320|a&1023);return b+q(a)}).join("")}function f(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function k(a,b,c){var d=0;a=c?E(a/700):a>>1;for(a+=E(a/b);455<a;d+=36)a=E(a/35);return E(d+36*a/(a+38))}function h(a){var c=[],d=a.length,e,f=0,m=128,p=72,h,n,r,v,t;h=a.lastIndexOf("-");0>h&&(h=
0);for(n=0;n<h;++n)128<=a.charCodeAt(n)&&b("not-basic"),c.push(a.charCodeAt(n));for(h=0<h?h+1:0;h<d;){n=f;e=1;for(r=36;;r+=36){h>=d&&b("invalid-input");v=a.charCodeAt(h++);v=10>v-48?v-22:26>v-65?v-65:26>v-97?v-97:36;(36<=v||v>E((2147483647-f)/e))&&b("overflow");f+=v*e;t=r<=p?1:r>=p+26?26:r-p;if(v<t)break;v=36-t;e>E(2147483647/v)&&b("overflow");e*=v}e=c.length+1;p=k(f-n,e,0==n);E(f/e)>2147483647-m&&b("overflow");m+=E(f/e);f%=e;c.splice(f++,0,m)}return g(c)}function n(a){var c,d,g,m,p,h,n,r,v,t=[],
u,x,z;a=e(a);u=a.length;c=128;d=0;p=72;for(h=0;h<u;++h)v=a[h],128>v&&t.push(q(v));for((g=m=t.length)&&t.push("-");g<u;){n=2147483647;for(h=0;h<u;++h)v=a[h],v>=c&&v<n&&(n=v);x=g+1;n-c>E((2147483647-d)/x)&&b("overflow");d+=(n-c)*x;c=n;for(h=0;h<u;++h)if(v=a[h],v<c&&2147483647<++d&&b("overflow"),v==c){r=d;for(n=36;;n+=36){v=n<=p?1:n>=p+26?26:n-p;if(r<v)break;z=r-v;r=36-v;t.push(q(f(v+z%r,0)));r=E(z/r)}t.push(q(f(r,0)));p=k(d,x,g==m);d=0;++g}++d;++c}return t.join("")}var v="object"==typeof ra&&ra&&!ra.nodeType&&
ra,u="object"==typeof module&&module&&!module.nodeType&&module,r="object"==typeof y&&y;if(r.global===r||r.window===r||r.self===r)a=r;var t,z=/^xn--/,w=/[^\x20-\x7E]/,A=/[\x2E\u3002\uFF0E\uFF61]/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=Math.floor,q=String.fromCharCode,C;t={version:"1.3.1",ucs2:{decode:e,encode:g},decode:h,encode:n,toASCII:function(a){return d(a,function(a){return w.test(a)?
"xn--"+n(a):a})},toUnicode:function(a){return d(a,function(a){return z.test(a)?h(a.slice(4).toLowerCase()):a})}};if("function"==typeof H&&"object"==typeof H.amd&&H.amd)H("punycode",function(){return t});else if(v&&u)if(module.exports==v)u.exports=t;else for(C in t)t.hasOwnProperty(C)&&(v[C]=t[C]);else a.punycode=t})(this);var Cb=0,ub=0;q.html2canvas=function(a,b){var c=ub++;b=b||{};b.logging&&(q.html2canvas.logging=!0,q.html2canvas.start=Date.now());b.async="undefined"===typeof b.async?!0:b.async;
b.allowTaint="undefined"===typeof b.allowTaint?!1:b.allowTaint;b.removeContainer="undefined"===typeof b.removeContainer?!0:b.removeContainer;b.javascriptEnabled="undefined"===typeof b.javascriptEnabled?!1:b.javascriptEnabled;b.imageTimeout="undefined"===typeof b.imageTimeout?1E4:b.imageTimeout;b.renderer="function"===typeof b.renderer?b.renderer:G;b.strict=!!b.strict;if("string"===typeof a){if("string"!==typeof b.proxy)return Promise.reject("Proxy must be used when rendering url");var d=null!=b.width?
b.width:q.innerWidth,e=null!=b.height?b.height:q.innerHeight;return v(E(a),b.proxy,h,d,e,b).then(function(a){return K(a.contentWindow.document.documentElement,a,b,d,e)})}var g=(a===O?[h.documentElement]:a.length?a:[a])[0];g.setAttribute("data-html2canvas-node"+c,c);return B(g.ownerDocument,b,g.ownerDocument.defaultView.innerWidth,g.ownerDocument.defaultView.innerHeight,c).then(function(a){"function"===typeof b.onrendered&&(F("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),
b.onrendered(a));return a})};q.html2canvas.punycode=this.punycode;q.html2canvas.proxy={};Q.prototype.darken=function(a){a=1-a;return new Q([Math.round(this.r*a),Math.round(this.g*a),Math.round(this.b*a),this.a])};Q.prototype.isTransparent=function(){return 0===this.a};Q.prototype.isBlack=function(){return 0===this.r&&0===this.g&&0===this.b};Q.prototype.fromArray=function(a){Array.isArray(a)&&(this.r=Math.min(a[0],255),this.g=Math.min(a[1],255),this.b=Math.min(a[2],255),3<a.length&&(this.a=a[3]));
return Array.isArray(a)};var vb=/^#([a-f0-9]{3})$/i;Q.prototype.hex3=function(a){null!==(a=a.match(vb))&&(this.r=parseInt(a[1][0]+a[1][0],16),this.g=parseInt(a[1][1]+a[1][1],16),this.b=parseInt(a[1][2]+a[1][2],16));return null!==a};var mb=/^#([a-f0-9]{6})$/i;Q.prototype.hex6=function(a){null!==(a=a.match(mb))&&(this.r=parseInt(a[1].substring(0,2),16),this.g=parseInt(a[1].substring(2,4),16),this.b=parseInt(a[1].substring(4,6),16));return null!==a};var wb=/^rgb\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3})\)$/;
Q.prototype.rgb=function(a){null!==(a=a.match(wb))&&(this.r=Number(a[1]),this.g=Number(a[2]),this.b=Number(a[3]));return null!==a};var bb=/^rgba\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3}) *, *(\d+\.?\d*)\)$/;Q.prototype.rgba=function(a){null!==(a=a.match(bb))&&(this.r=Number(a[1]),this.g=Number(a[2]),this.b=Number(a[3]),this.a=Number(a[4]));return null!==a};Q.prototype.toString=function(){return null!==this.a&&1!==this.a?"rgba("+[this.r,this.g,this.b,this.a].join()+")":"rgb("+[this.r,this.g,this.b].join()+
")"};Q.prototype.namedColor=function(a){var b=Db[a.toLowerCase()];if(b)this.r=b[0],this.g=b[1],this.b=b[2];else if("transparent"===a.toLowerCase())return this.r=this.g=this.b=this.a=0,!0;return!!b};Q.prototype.isColor=!0;var Db={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,
135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,
143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],
honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,
206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,
255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],
red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,
222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};Ka.prototype.getMetrics=function(a,b){this.data[a+"-"+b]===O&&(this.data[a+"-"+b]=new ob(a,b));return this.data[a+"-"+b]};sa.prototype.proxyLoad=function(a,b,c){var d=this.src;return v(d.src,a,d.ownerDocument,b.width,b.height,c)};ta.prototype.TYPES={LINEAR:1,RADIAL:2};W.prototype.findImages=function(a){var b=[];a.reduce(function(a,b){switch(b.node.nodeName){case "IMG":return a.concat([{args:[b.node.src],
method:"url"}]);case "svg":case "IFRAME":return a.concat([{args:[b.node],method:b.node.nodeName}])}return a},[]).forEach(this.addImage(b,this.loadImage),this);return b};W.prototype.findBackgroundImage=function(a,b){b.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(a,this.loadImage),this);return a};W.prototype.addImage=function(a,b){return function(c){c.args.forEach(function(d){this.imageExists(a,d)||(a.splice(0,0,b.call(this,c)),F("Added image #"+a.length,"string"===
typeof d?d.substring(0,100):d))},this)}};W.prototype.hasImageBackground=function(a){return"none"!==a.method};W.prototype.loadImage=function(a){return"url"===a.method?(a=a.args[0],!this.isSVG(a)||this.support.svg||this.options.allowTaint?a.match(/data:image\/.*;base64,/i)?new M(a.replace(/url\(['"]{0,}|['"]{0,}\)$/ig,""),!1):this.isSameOrigin(a)||!0===this.options.allowTaint||this.isSVG(a)?new M(a,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new M(a,!0):this.options.proxy?
new Bb(a,this.options.proxy):new ga(a):new V(a)):"linear-gradient"===a.method?new Za(a):"gradient"===a.method?new lb(a):"svg"===a.method?new Va(a.args[0],this.support.svg):"IFRAME"===a.method?new sa(a.args[0],this.isSameOrigin(a.args[0].src),this.options):new ga(a)};W.prototype.isSVG=function(a){return"svg"===a.substring(a.length-3).toLowerCase()||V.prototype.isInline(a)};W.prototype.imageExists=function(a,b){return a.some(function(a){return a.src===b})};W.prototype.isSameOrigin=function(a){return this.getOrigin(a)===
this.origin};W.prototype.getOrigin=function(a){var b=this.link||(this.link=h.createElement("a"));b.href=a;b.href=b.href;return b.protocol+b.hostname+b.port};W.prototype.getPromise=function(a){return this.timeout(a,this.options.imageTimeout)["catch"](function(){return(new ga(a.src)).promise.then(function(b){a.image=b})})};W.prototype.get=function(a){var b=null;return this.images.some(function(c){return(b=c).src===a})?b:null};W.prototype.fetch=function(a){this.images=a.reduce(Wa(this.findBackgroundImage,
this),this.findImages(a));this.images.forEach(function(a,c){a.promise.then(function(){F("Succesfully loaded image #"+(c+1),a)},function(b){F("Failed loading image #"+(c+1),a,b)})});this.ready=Promise.all(this.images.map(this.getPromise,this));F("Finished searching images");return this};W.prototype.timeout=function(a,b){var c,d=Promise.race([a.promise,new Promise(function(d,g){c=setTimeout(function(){F("Timed out loading image",a);g(a)},b)})]).then(function(a){clearTimeout(c);return a});d["catch"](function(){clearTimeout(c)});
return d};Za.prototype=Object.create(ta.prototype);Za.prototype.stepRegExp=/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/;u.prototype.cloneTo=function(a){a.visible=this.visible;a.borders=this.borders;a.bounds=this.bounds;a.clip=this.clip;a.backgroundClip=this.backgroundClip;a.computedStyles=this.computedStyles;a.styles=this.styles;a.backgroundImages=this.backgroundImages;a.opacity=this.opacity};u.prototype.getOpacity=function(){return null===this.opacity?this.opacity=
this.cssFloat("opacity"):this.opacity};u.prototype.assignStack=function(a){this.stack=a;a.children.push(this)};u.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:"none"!==this.css("display")&&"hidden"!==this.css("visibility")&&!this.node.hasAttribute("data-html2canvas-ignore")&&("INPUT"!==this.node.nodeName||"hidden"!==this.node.getAttribute("type"))};u.prototype.css=function(a){this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?
":before":":after"):this.computedStyle(null));return this.styles[a]||(this.styles[a]=this.computedStyles[a])};u.prototype.prefixedCss=function(a){var b=["webkit","moz","ms","o"],c=this.css(a);c===O&&b.some(function(b){c=this.css(b+a.substr(0,1).toUpperCase()+a.substr(1));return c!==O},this);return c===O?null:c};u.prototype.computedStyle=function(a){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,a)};u.prototype.cssInt=function(a){a=parseInt(this.css(a),10);return isNaN(a)?0:
a};u.prototype.color=function(a){return this.colors[a]||(this.colors[a]=new Q(this.css(a)))};u.prototype.cssFloat=function(a){a=parseFloat(this.css(a));return isNaN(a)?0:a};u.prototype.fontWeight=function(){var a=this.css("fontWeight");switch(parseInt(a,10)){case 401:a="bold";break;case 400:a="normal"}return a};u.prototype.parseClip=function(){var a=this.css("clip").match(this.CLIP);return a?{top:parseInt(a[1],10),right:parseInt(a[2],10),bottom:parseInt(a[3],10),left:parseInt(a[4],10)}:null};u.prototype.parseBackgroundImages=
function(){return this.backgroundImages||(this.backgroundImages=Qa(this.css("backgroundImage")))};u.prototype.cssList=function(a,b){var c=(this.css(a)||"").split(","),c=c[b||0]||c[0]||"auto",c=c.trim().split(" ");1===c.length&&(c=[c[0],c[0]]);return c};u.prototype.parseBackgroundSize=function(a,b,c){c=this.cssList("backgroundSize",c);var d;if(Ta(c[0]))d=a.width*parseFloat(c[0])/100;else{if(/contain|cover/.test(c[0]))return b=b.width/b.height,a.width/a.height<b^"contain"===c[0]?{width:a.height*b,height:a.height}:
{width:a.width,height:a.width/b};d=parseInt(c[0],10)}a="auto"===c[0]&&"auto"===c[1]?b.height:"auto"===c[1]?d/b.width*b.height:Ta(c[1])?a.height*parseFloat(c[1])/100:parseInt(c[1],10);"auto"===c[0]&&(d=a/b.height*b.width);return{width:d,height:a}};u.prototype.parseBackgroundPosition=function(a,b,c,d){c=this.cssList("backgroundPosition",c);var e;e=Ta(c[0])?(a.width-(d||b).width)*(parseFloat(c[0])/100):parseInt(c[0],10);a="auto"===c[1]?e/b.width*b.height:Ta(c[1])?(a.height-(d||b).height)*parseFloat(c[1])/
100:parseInt(c[1],10);"auto"===c[0]&&(e=a/b.height*b.width);return{left:e,top:a}};u.prototype.parseBackgroundRepeat=function(a){return this.cssList("backgroundRepeat",a)[0]};u.prototype.parseTextShadows=function(){var a=this.css("textShadow"),b=[];if(a&&"none"!==a)for(var a=a.match(this.TEXT_SHADOW_PROPERTY),c=0;a&&c<a.length;c++){var d=a[c].match(this.TEXT_SHADOW_VALUES);b.push({color:new Q(d[0]),offsetX:d[1]?parseFloat(d[1].replace("px","")):0,offsetY:d[2]?parseFloat(d[2].replace("px","")):0,blur:d[3]?
d[3].replace("px",""):0})}return b};u.prototype.parseTransform=function(){if(!this.transformData)if(this.hasTransform()){var a=this.parseBounds(),b=this.prefixedCss("transformOrigin").split(" ").map(Ha).map(Ba);b[0]+=a.left;b[1]+=a.top;this.transformData={origin:b,matrix:this.parseTransformMatrix()}}else this.transformData={origin:[0,0],matrix:[1,0,0,1,0,0]};return this.transformData};u.prototype.parseTransformMatrix=function(){if(!this.transformMatrix){var a=this.prefixedCss("transform");this.transformMatrix=
(a=a?db(a.match(this.MATRIX_PROPERTY)):null)?a:[1,0,0,1,0,0]}return this.transformMatrix};u.prototype.parseBounds=function(){return this.bounds||(this.bounds=this.hasTransform()?eb(this.node):$a(this.node))};u.prototype.hasTransform=function(){return"1,0,0,1,0,0"!==this.parseTransformMatrix().join(",")||this.parent&&this.parent.hasTransform()};u.prototype.getValue=function(){var a=this.node.value||"";"SELECT"===this.node.tagName?(a=this.node,a=(a=a.options[a.selectedIndex||0])?a.text||"":""):"password"===
this.node.type&&(a=Array(a.length+1).join("\u2022"));return 0===a.length?this.node.placeholder||"":a};u.prototype.MATRIX_PROPERTY=/(matrix)\((.+)\)/;u.prototype.TEXT_SHADOW_PROPERTY=/((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g;u.prototype.TEXT_SHADOW_VALUES=/(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g;u.prototype.CLIP=/^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/;I.prototype.calculateOverflowClips=function(){this.nodes.forEach(function(a){if(za(a)){!0===a.isPseudoElement&&a.appendToDOM();a.borders=
this.parseBorders(a);var b="hidden"===a.css("overflow")?[a.borders.clip]:[],c=a.parseClip();c&&-1!==["absolute","fixed"].indexOf(a.css("position"))&&b.push([["rect",a.bounds.left+c.left,a.bounds.top+c.top,c.right-c.left,c.bottom-c.top]]);a.clip=a.parent&&a.parent.clip.length?a.parent.clip.concat(b):b;a.backgroundClip="hidden"!==a.css("overflow")?a.clip.concat([a.borders.clip]):a.clip;!0===a.isPseudoElement&&a.cleanDOM()}else ba(a)&&(a.clip=a.parent&&a.parent.clip.length?a.parent.clip:[]);!0!==a.isPseudoElement&&
(a.bounds=null)},this)};I.prototype.asyncRenderer=function(a,b,c){c=c||Date.now();this.paint(a[this.renderIndex++]);a.length===this.renderIndex?b():c+20>Date.now()?this.asyncRenderer(a,b,c):setTimeout(Wa(function(){this.asyncRenderer(a,b)},this),0)};I.prototype.createPseudoHideStyles=function(a){this.createStyles(a,"."+Z.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+Z.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')};
I.prototype.disableAnimations=function(a){this.createStyles(a,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")};I.prototype.createStyles=function(a,b){var c=a.createElement("style");c.innerHTML=b;a.body.appendChild(c)};I.prototype.getPseudoElements=function(a){var b=[[a]];if(a.node.nodeType===
Node.ELEMENT_NODE){var c=this.getPseudoElement(a,":before");a=this.getPseudoElement(a,":after");c&&b.push(c);a&&b.push(a)}return[].concat.apply([],b)};I.prototype.getPseudoElement=function(a,b){var c=a.computedStyle(b);if(!c||!c.content||"none"===c.content||"-moz-alt-content"===c.content||"none"===c.display)return null;var d,e=c.content,g=e.substr(0,1);d=g===e.substr(e.length-1)&&g.match(/'|"/)?e.substr(1,e.length-2):e;for(var f="url"===d.substr(0,3),e=h.createElement(f?"img":"html2canvaspseudoelement"),
g=new Z(e,a,b),k=c.length-1;0<=k;k--){var n=yb(c.item(k));e.style[n]=c[n]}e.className=Z.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+Z.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER;if(f)return e.src=Qa(d)[0].args[0],[g];c=h.createTextNode(d);e.appendChild(c);return[g,new ua(c,g)]};I.prototype.getChildren=function(a){return[].concat.apply([],[].filter.call(a.node.childNodes,Da).map(function(b){var c=[b.nodeType===Node.TEXT_NODE?new ua(b,a):new u(b,a)].filter(rb);return b.nodeType===Node.ELEMENT_NODE&&
c.length&&"TEXTAREA"!==b.tagName?c[0].isElementVisible()?c.concat(this.getChildren(c[0])):[]:c},this))};I.prototype.newStackingContext=function(a,b){var c=new oa(b,a.getOpacity(),a.node,a.parent);a.cloneTo(c);(b?c.getParentStack(this):c.parent.stack).contexts.push(c);a.stack=c};I.prototype.createStackingContexts=function(){this.nodes.forEach(function(a){var b;if(b=za(a))(b=this.isRootElement(a)||1>a.getOpacity())||(b=a.css("position"),b="auto"!==(-1!==["absolute","relative","fixed"].indexOf(b)?a.css("zIndex"):
"auto")),b=b||this.isBodyWithTransparentRoot(a)||a.hasTransform();b?this.newStackingContext(a,!0):za(a)&&(da(a)&&Ua(a)||-1!==["inline-block","inline-table"].indexOf(a.css("display"))||hb(a))?this.newStackingContext(a,!1):a.assignStack(a.parent.stack)},this)};I.prototype.isBodyWithTransparentRoot=function(a){return"BODY"===a.node.nodeName&&a.parent.color("backgroundColor").isTransparent()};I.prototype.isRootElement=function(a){return null===a.parent};I.prototype.sortStackingContexts=function(a){a.contexts.sort(ha(a.contexts.slice(0)));
a.contexts.forEach(this.sortStackingContexts,this)};I.prototype.parseTextBounds=function(a){return function(b,c,d){if("none"!==a.parent.css("textDecoration").substr(0,4)||0!==b.trim().length){if(this.support.rangeBounds&&!a.parent.hasTransform())return c=d.slice(0,c).join("").length,this.getRangeBounds(a.node,c,b.length);if(a.node&&"string"===typeof a.node.data)return b=a.node.splitText(b.length),c=this.getWrapperBounds(a.node,a.parent.hasTransform()),a.node=b,c}else if(!this.support.rangeBounds||
a.parent.hasTransform())a.node=a.node.splitText(b.length);return{}}};I.prototype.getWrapperBounds=function(a,b){var c=a.ownerDocument.createElement("html2canvaswrapper"),d=a.parentNode,e=a.cloneNode(!0);c.appendChild(a.cloneNode(!0));d.replaceChild(c,a);var g=b?eb(c):$a(c);d.replaceChild(e,c);return g};I.prototype.getRangeBounds=function(a,b,c){var d=this.range||(this.range=a.ownerDocument.createRange());d.setStart(a,b);d.setEnd(a,b+c);return d.getBoundingClientRect()};I.prototype.parse=function(a){var b=
a.contexts.filter(Ra),c=a.children.filter(za),d=c.filter(Ea(hb)),e=d.filter(Ea(da)).filter(Ea(ab)),c=c.filter(Ea(da)).filter(hb),g=d.filter(Ea(da)).filter(ab),d=a.contexts.concat(d.filter(da)).filter(Ua),f=a.children.filter(ba).filter(Ca);a=a.contexts.filter(pb);b.concat(e).concat(c).concat(g).concat(d).concat(f).concat(a).forEach(function(a){this.renderQueue.push(a);a instanceof oa&&(this.parse(a),this.renderQueue.push(new gb))},this)};I.prototype.paint=function(a){try{a instanceof gb?this.renderer.ctx.restore():
ba(a)?(!0===a.parent.isPseudoElement&&a.parent.appendToDOM(),this.paintText(a),!0===a.parent.isPseudoElement&&a.parent.cleanDOM()):this.paintNode(a)}catch(b){if(F(b),this.options.strict)throw b;}};I.prototype.paintNode=function(a){a instanceof oa&&(this.renderer.setOpacity(a.opacity),this.renderer.ctx.save(),a.hasTransform()&&this.renderer.setTransform(a.parseTransform()));"INPUT"===a.node.nodeName&&"checkbox"===a.node.type?this.paintCheckbox(a):"INPUT"===a.node.nodeName&&"radio"===a.node.type?this.paintRadio(a):
this.paintElement(a)};I.prototype.paintElement=function(a){var b=a.parseBounds();this.renderer.clip(a.backgroundClip,function(){this.renderer.renderBackground(a,b,a.borders.borders.map(zb))},this);this.renderer.clip(a.clip,function(){this.renderer.renderBorders(a.borders.borders)},this);this.renderer.clip(a.backgroundClip,function(){switch(a.node.nodeName){case "svg":case "IFRAME":var c=this.images.get(a.node);c?this.renderer.renderImage(a,b,a.borders,c):F("Error loading <"+a.node.nodeName+">",a.node);
break;case "IMG":(c=this.images.get(a.node.src))?this.renderer.renderImage(a,b,a.borders,c):F("Error loading <img>",a.node.src);break;case "CANVAS":this.renderer.renderImage(a,b,a.borders,{image:a.node});break;case "SELECT":case "INPUT":case "TEXTAREA":this.paintFormValue(a)}},this)};I.prototype.paintCheckbox=function(a){var b=a.parseBounds(),c=Math.min(b.width,b.height),d={width:c-1,height:c-1,top:b.top,left:b.left},b=[3,3],e=[b,b,b,b],g=[1,1,1,1].map(function(a){return{color:new Q("#A5A5A5"),width:a}}),
f=La(d,e,g);this.renderer.clip(a.backgroundClip,function(){this.renderer.rectangle(d.left+1,d.top+1,d.width-2,d.height-2,new Q("#DEDEDE"));this.renderer.renderBorders(fb(g,d,f,e));a.node.checked&&(this.renderer.font(new Q("#424242"),"normal","normal","bold",c-3+"px","arial"),this.renderer.text("\u2714",d.left+c/6,d.top+c-1))},this)};I.prototype.paintRadio=function(a){var b=a.parseBounds(),c=Math.min(b.width,b.height)-2;this.renderer.clip(a.backgroundClip,function(){this.renderer.circleStroke(b.left+
1,b.top+1,c,new Q("#DEDEDE"),1,new Q("#A5A5A5"));a.node.checked&&this.renderer.circle(Math.ceil(b.left+c/4)+1,Math.ceil(b.top+c/4)+1,Math.floor(c/2),new Q("#424242"))},this)};I.prototype.paintFormValue=function(a){var b=a.getValue();if(0<b.length){var c=a.node.ownerDocument,d=c.createElement("html2canvaswrapper");"lineHeight textAlign fontFamily fontWeight fontSize color paddingLeft paddingTop paddingRight paddingBottom width height borderLeftStyle borderTopStyle borderLeftWidth borderTopWidth boxSizing whiteSpace wordWrap".split(" ").forEach(function(b){try{d.style[b]=
a.css(b)}catch(m){F("html2canvas: Parse: Exception caught in renderFormValue: "+m.message)}});var e=a.parseBounds();d.style.position="fixed";d.style.left=e.left+"px";d.style.top=e.top+"px";d.textContent=b;c.body.appendChild(d);this.paintText(new ua(d.firstChild,a));c.body.removeChild(d)}};I.prototype.paintText=function(a){a.applyTextTransform();var b=q.html2canvas.punycode.ucs2.decode(a.node.data),c=this.options.letterRendering&&!/^(normal|none|0px)$/.test(a.parent.css("letterSpacing"))||/[^\u0000-\u00ff]/.test(a.node.data)?
b.map(function(a){return q.html2canvas.punycode.ucs2.encode([a])}):T(b),b=a.parent.fontWeight(),d=a.parent.css("fontSize"),e=a.parent.css("fontFamily"),g=a.parent.parseTextShadows();this.renderer.font(a.parent.color("color"),a.parent.css("fontStyle"),a.parent.css("fontVariant"),b,d,e);g.length?this.renderer.fontShadow(g[0].color,g[0].offsetX,g[0].offsetY,g[0].blur):this.renderer.clearShadow();this.renderer.clip(a.parent.clip,function(){c.map(this.parseTextBounds(a),this).forEach(function(b,g){b&&
(this.renderer.text(c[g],b.left,b.bottom),this.renderTextDecoration(a.parent,b,this.fontMetrics.getMetrics(e,d)))},this)},this)};I.prototype.renderTextDecoration=function(a,b,c){switch(a.css("textDecoration").split(" ")[0]){case "underline":this.renderer.rectangle(b.left,Math.round(b.top+c.baseline+c.lineWidth),b.width,1,a.color("color"));break;case "overline":this.renderer.rectangle(b.left,Math.round(b.top),b.width,1,a.color("color"));break;case "line-through":this.renderer.rectangle(b.left,Math.ceil(b.top+
c.middle+c.lineWidth),b.width,1,a.color("color"))}};var xb={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};I.prototype.parseBorders=function(a){var b=a.parseBounds(),c=ya(a),d=["Top","Right","Bottom","Left"].map(function(b,c){var d=a.css("border"+b+"Style"),e=a.color("border"+b+"Color");"inset"===d&&e.isBlack()&&(e=new Q([255,255,255,e.a]));d=xb[d]?xb[d][c]:null;return{width:a.cssInt("border"+b+"Width"),color:d?e[d[0]](d[1]):e,args:null}}),e=La(b,c,d);return{clip:this.parseBackgroundClip(a,
e,d,c,b),borders:fb(d,b,e,c)}};I.prototype.parseBackgroundClip=function(a,b,c,d,e){var g=[];switch(a.css("backgroundClip")){case "content-box":case "padding-box":xa(g,d[0],d[1],b.topLeftInner,b.topRightInner,e.left+c[3].width,e.top+c[0].width);xa(g,d[1],d[2],b.topRightInner,b.bottomRightInner,e.left+e.width-c[1].width,e.top+c[0].width);xa(g,d[2],d[3],b.bottomRightInner,b.bottomLeftInner,e.left+e.width-c[1].width,e.top+e.height-c[2].width);xa(g,d[3],d[0],b.bottomLeftInner,b.topLeftInner,e.left+c[3].width,
e.top+e.height-c[2].width);break;default:xa(g,d[0],d[1],b.topLeftOuter,b.topRightOuter,e.left,e.top),xa(g,d[1],d[2],b.topRightOuter,b.bottomRightOuter,e.left+e.width,e.top),xa(g,d[2],d[3],b.bottomRightOuter,b.bottomLeftOuter,e.left+e.width,e.top+e.height),xa(g,d[3],d[0],b.bottomLeftOuter,b.topLeftOuter,e.left,e.top+e.height)}return g};var ja=0,va="withCredentials"in new XMLHttpRequest,wa="crossOrigin"in new Image;Z.prototype.cloneTo=function(a){Z.prototype.cloneTo.call(this,a);a.isPseudoElement=!0;
a.before=this.before};Z.prototype=Object.create(u.prototype);Z.prototype.appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node);this.parent.node.className+=" "+this.getHideClass()};Z.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node);this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")};Z.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+
(this.before?"BEFORE":"AFTER")]};Z.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before";Z.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after";ia.prototype.renderImage=function(a,b,c,d){var e=a.cssInt("paddingLeft"),g=a.cssInt("paddingTop"),f=a.cssInt("paddingRight");a=a.cssInt("paddingBottom");c=c.borders;f=b.width-(c[1].width+c[3].width+e+f);a=b.height-(c[0].width+c[2].width+g+a);this.drawImage(d,0,0,d.image.width||f,d.image.height||a,b.left+
e+c[3].width,b.top+g+c[0].width,f,a)};ia.prototype.renderBackground=function(a,b,c){0<b.height&&0<b.width&&(this.renderBackgroundColor(a,b),this.renderBackgroundImage(a,b,c))};ia.prototype.renderBackgroundColor=function(a,b){var c=a.color("backgroundColor");c.isTransparent()||this.rectangle(b.left,b.top,b.width,b.height,c)};ia.prototype.renderBorders=function(a){a.forEach(this.renderBorder,this)};ia.prototype.renderBorder=function(a){a.color.isTransparent()||null===a.args||this.drawShape(a.args,a.color)};
ia.prototype.renderBackgroundImage=function(a,b,c){a.parseBackgroundImages().reverse().forEach(function(d,e,g){switch(d.method){case "url":var f=this.images.get(d.args[0]);f?this.renderBackgroundRepeating(a,b,f,g.length-(e+1),c):F("Error loading background-image",d.args[0]);break;case "linear-gradient":case "gradient":(e=this.images.get(d.value))?this.renderBackgroundGradient(e,b,c):F("Error loading background-image",d.args[0]);break;case "none":break;default:F("Unknown background-image type",d.args[0])}},
this)};ia.prototype.renderBackgroundRepeating=function(a,b,c,d,e){var g=a.parseBackgroundSize(b,c.image,d),f=a.parseBackgroundPosition(b,c.image,d,g);switch(a.parseBackgroundRepeat(d)){case "repeat-x":case "repeat no-repeat":this.backgroundRepeatShape(c,f,g,b,b.left+e[3],b.top+f.top+e[0],99999,g.height,e);break;case "repeat-y":case "no-repeat repeat":this.backgroundRepeatShape(c,f,g,b,b.left+f.left+e[3],b.top+e[0],g.width,99999,e);break;case "no-repeat":this.backgroundRepeatShape(c,f,g,b,b.left+f.left+
e[3],b.top+f.top+e[0],g.width,g.height,e);break;default:this.renderBackgroundRepeat(c,f,g,{top:b.top,left:b.left},e[3],e[0])}};oa.prototype=Object.create(u.prototype);oa.prototype.getParentStack=function(a){var b=this.parent?this.parent.stack:null;return b?b.ownStacking?b:b.getParentStack(a):a.stack};qa.prototype.testRangeBounds=function(a){var b,c,d=!1;a.createRange&&(b=a.createRange(),b.getBoundingClientRect&&(c=a.createElement("boundtest"),c.style.height="123px",c.style.display="block",a.body.appendChild(c),
b.selectNode(c),b=b.getBoundingClientRect(),b=b.height,123===b&&(d=!0),a.body.removeChild(c)));return d};qa.prototype.testCORS=function(){return"undefined"!==typeof(new Image).crossOrigin};qa.prototype.testSVG=function(){var a=new Image,b=h.createElement("canvas"),c=b.getContext("2d");a.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{c.drawImage(a,0,0),b.toDataURL()}catch(d){return!1}return!0};V.prototype.hasFabric=function(){return html2canvas.fabric?Promise.resolve():
Promise.reject(Error("html2canvas.svg.js is not loaded, cannot render svg"))};V.prototype.inlineFormatting=function(a){return/^data:image\/svg\+xml;base64,/.test(a)?this.decode64(this.removeContentType(a)):this.removeContentType(a)};V.prototype.removeContentType=function(a){return a.replace(/^data:image\/svg\+xml(;base64)?,/,"")};V.prototype.isInline=function(a){return/^data:image\/svg\+xml/i.test(a)};V.prototype.createCanvas=function(a){var b=this;return function(c,d){var e=new html2canvas.fabric.StaticCanvas("c");
b.image=e.lowerCanvasEl;e.setWidth(d.width).setHeight(d.height).add(html2canvas.fabric.util.groupSVGElements(c,d)).renderAll();a(e.lowerCanvasEl)}};V.prototype.decode64=function(a){return"function"===typeof q.atob?q.atob(a):Ma(a)};Va.prototype=Object.create(V.prototype);ua.prototype=Object.create(u.prototype);ua.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))};ua.prototype.transform=function(a){var b=this.node.data;switch(a){case "lowercase":return b.toLowerCase();
case "capitalize":return b.replace(/(^|\s|:|-|\(|\))([a-z])/g,tb);case "uppercase":return b.toUpperCase();default:return b}};lb.prototype=Object.create(ta.prototype);G.prototype=Object.create(ia.prototype);G.prototype.setFillStyle=function(a){this.ctx.fillStyle="object"===typeof a&&a.isColor?a.toString():a;return this.ctx};G.prototype.rectangle=function(a,b,c,d,e){this.setFillStyle(e).fillRect(a,b,c,d)};G.prototype.circle=function(a,b,c,d){this.setFillStyle(d);this.ctx.beginPath();this.ctx.arc(a+
c/2,b+c/2,c/2,0,2*Math.PI,!0);this.ctx.closePath();this.ctx.fill()};G.prototype.circleStroke=function(a,b,c,d,e,g){this.circle(a,b,c,d);this.ctx.strokeStyle=g.toString();this.ctx.stroke()};G.prototype.drawShape=function(a,b){this.shape(a);this.setFillStyle(b).fill()};G.prototype.taints=function(a){if(null===a.tainted){this.taintCtx.drawImage(a.image,0,0);try{this.taintCtx.getImageData(0,0,1,1),a.tainted=!1}catch(b){this.taintCtx=h.createElement("canvas").getContext("2d"),a.tainted=!0}}return a.tainted};
G.prototype.drawImage=function(a,b,c,d,e,g,f,k,h){this.taints(a)&&!this.options.allowTaint||this.ctx.drawImage(a.image,b,c,d,e,g,f,k,h)};G.prototype.clip=function(a,b,c){this.ctx.save();a.filter(aa).forEach(function(a){this.shape(a).clip()},this);b.call(c);this.ctx.restore()};G.prototype.shape=function(a){this.ctx.beginPath();a.forEach(function(a,c){"rect"===a[0]?this.ctx.rect.apply(this.ctx,a.slice(1)):this.ctx[0===c?"moveTo":a[0]+"To"].apply(this.ctx,a.slice(1))},this);this.ctx.closePath();return this.ctx};
G.prototype.font=function(a,b,c,d,e,g){this.setFillStyle(a).font=[b,c,d,e,g].join(" ").split(",")[0]};G.prototype.fontShadow=function(a,b,c,d){this.setVariable("shadowColor",a.toString()).setVariable("shadowOffsetY",b).setVariable("shadowOffsetX",c).setVariable("shadowBlur",d)};G.prototype.clearShadow=function(){this.setVariable("shadowColor","rgba(0,0,0,0)")};G.prototype.setOpacity=function(a){this.ctx.globalAlpha=a};G.prototype.setTransform=function(a){this.ctx.translate(a.origin[0],a.origin[1]);
this.ctx.transform.apply(this.ctx,a.matrix);this.ctx.translate(-a.origin[0],-a.origin[1])};G.prototype.setVariable=function(a,b){this.variables[a]!==b&&(this.variables[a]=this.ctx[a]=b);return this};G.prototype.text=function(a,b,c){this.ctx.fillText(a,b,c)};G.prototype.backgroundRepeatShape=function(a,b,c,d,e,g,f,k,h){this.clip([[["line",Math.round(e),Math.round(g)],["line",Math.round(e+f),Math.round(g)],["line",Math.round(e+f),Math.round(k+g)],["line",Math.round(e),Math.round(k+g)]]],function(){this.renderBackgroundRepeat(a,
b,c,d,h[3],h[0])},this)};G.prototype.renderBackgroundRepeat=function(a,b,c,d,e,g){e=Math.round(d.left+b.left+e);b=Math.round(d.top+b.top+g);this.setFillStyle(this.ctx.createPattern(this.resizeImage(a,c),"repeat"));this.ctx.translate(e,b);this.ctx.fill();this.ctx.translate(-e,-b)};G.prototype.renderBackgroundGradient=function(a,b){if(a instanceof Za){var c=this.ctx.createLinearGradient(b.left+b.width*a.x0,b.top+b.height*a.y0,b.left+b.width*a.x1,b.top+b.height*a.y1);a.colorStops.forEach(function(a){c.addColorStop(a.stop,
a.color.toString())});this.rectangle(b.left,b.top,b.width,b.height,c)}};G.prototype.resizeImage=function(a,b){var c=a.image;if(c.width===b.width&&c.height===b.height)return c;var d=h.createElement("canvas");d.width=b.width;d.height=b.height;d.getContext("2d").drawImage(c,0,0,c.width,c.height,0,0,b.width,b.height);return d}}}).call({},"undefined"!==typeof window?window:void 0,"undefined"!==typeof document?document:void 0);
(function(q){function h(y,H){if({}.hasOwnProperty.call(h.cache,y))return h.cache[y];var q=h.resolve(y);if(!q)throw Error("Failed to resolve module "+y);var B={id:y,require:h,filename:y,exports:{},loaded:!1,parent:H,children:[]};H&&H.children.push(B);var K=y.slice(0,y.lastIndexOf("/")+1);return h.cache[y]=B.exports,q.call(B.exports,B,B.exports,K,y),B.loaded=!0,h.cache[y]=B.exports}h.modules={};h.cache={};h.resolve=function(y){return{}.hasOwnProperty.call(h.modules,y)?h.modules[y]:void 0};h.define=
function(y,q){h.modules[y]=q};var ra=function(h){return h="/",{title:"browser",version:"v0.10.26",browser:!0,env:{},argv:[],nextTick:q.setImmediate||function(h){setTimeout(h,0)},cwd:function(){return h},chdir:function(y){h=y}}}();h.define("/gif.coffee",function(y,q,O,B){function H(h,n){function f(){this.constructor=h}for(var k in n)({}).hasOwnProperty.call(n,k)&&(h[k]=n[k]);return f.prototype=n.prototype,h.prototype=new f,h.__super__=n.prototype,h}var n,L,R;q=h("events",y).EventEmitter;n=h("/browser.coffee",
y);q=function(h){function q(f){var k;this.running=!1;this.options={};this.frames=[];this.freeWorkers=[];this.activeWorkers=[];this.setOptions(f);for(k in L)f=L[k],null!=this.options[k]?this.options[k]:this.options[k]=f}return H(q,h),L={workerScript:"gif.worker.js",workers:2,repeat:0,background:"#fff",quality:10,width:null,height:null,transparent:null},R={delay:500,copy:!1},q.prototype.setOption=function(f,k){return this.options[f]=k,null==this._canvas||"width"!==f&&"height"!==f?void 0:this._canvas[f]=
k},q.prototype.setOptions=function(f){var k,h,n=[];for(k in f)({}).hasOwnProperty.call(f,k)&&(h=f[k],n.push(this.setOption(k,h)));return n},q.prototype.addFrame=function(f,k){var h,n;null==k&&(k={});h={};h.transparent=this.options.transparent;for(n in R)h[n]=k[n]||R[n];if(null!=this.options.width||this.setOption("width",f.width),null!=this.options.height||this.setOption("height",f.height),"undefined"!==typeof ImageData&&null!=ImageData&&f instanceof ImageData)h.data=f.data;else if("undefined"!==typeof CanvasRenderingContext2D&&
null!=CanvasRenderingContext2D&&f instanceof CanvasRenderingContext2D||"undefined"!==typeof WebGLRenderingContext&&null!=WebGLRenderingContext&&f instanceof WebGLRenderingContext)k.copy?h.data=this.getContextData(f):h.context=f;else if(null!=f.childNodes)k.copy?h.data=this.getImageData(f):h.image=f;else throw Error("Invalid image");return this.frames.push(h)},q.prototype.render=function(){var f;if(this.running)throw Error("Already running");if(null==this.options.width||null==this.options.height)throw Error("Width and height must be set prior to rendering");
this.running=!0;this.finishedFrames=this.nextFrame=0;this.imageParts=function(f){for(var k=0,h=function(){var f;f=[];for(var k=0;0<=this.frames.length?k<this.frames.length:k>this.frames.length;0<=this.frames.length?++k:--k)f.push(k);return f}.apply(this,arguments).length;k<h;++k)f.push(null);return f}.call(this,[]);f=this.spawnWorkers();for(var k=0,h=function(){var k;k=[];for(var h=0;0<=f?h<f:h>f;0<=f?++h:--h)k.push(h);return k}.apply(this,arguments).length;k<h;++k)this.renderNextFrame();return this.emit("start"),
this.emit("progress",0)},q.prototype.abort=function(){for(var f;f=this.activeWorkers.shift(),null!=f;)console.log("killing active worker"),f.terminate();return this.running=!1,this.emit("abort")},q.prototype.spawnWorkers=function(){var f;return f=Math.min(this.options.workers,this.frames.length),function(){var k;k=[];for(var h=this.freeWorkers.length;this.freeWorkers.length<=f?h<f:h>f;this.freeWorkers.length<=f?++h:--h)k.push(h);return k}.apply(this,arguments).forEach(function(f){return function(k){var h;
return console.log("spawning worker "+k),h=new Worker(f.options.workerScript),h.onmessage=function(f){return function(k){return f.activeWorkers.splice(f.activeWorkers.indexOf(h),1),f.freeWorkers.push(h),f.frameFinished(k.data)}}(f),f.freeWorkers.push(h)}}(this)),f},q.prototype.frameFinished=function(f){console.log("frame "+f.index+" finished - "+this.activeWorkers.length+" active");this.finishedFrames++;this.emit("progress",this.finishedFrames/this.frames.length);this.imageParts[f.index]=f;a:{f=this.imageParts;
for(var k=0,h=f.length;k<h;++k)if(k in f&&null===f[k]){f=!0;break a}f=!1}return f?this.renderNextFrame():this.finishRendering()},q.prototype.finishRendering=function(){var f,k,h,n,q,w;h=f=0;for(q=this.imageParts.length;h<q;++h)k=this.imageParts[h],f+=(k.data.length-1)*k.pageSize+k.cursor;f+=k.pageSize-k.cursor;console.log("rendering finished - filesize "+Math.round(f/1E3)+"kb");f=new Uint8Array(f);for(var y=q=0,z=this.imageParts.length;y<z;++y){k=this.imageParts[y];for(var E=0,L=k.data.length;E<L;++E)w=
k.data[E],h=E,f.set(w,q),h===k.data.length-1?q+=k.cursor:q+=k.pageSize}return n=new Blob([f],{type:"image/gif"}),this.emit("finished",n,f)},q.prototype.renderNextFrame=function(){var f,k,h;if(0===this.freeWorkers.length)throw Error("No free workers");return this.nextFrame>=this.frames.length?void 0:(f=this.frames[this.nextFrame++],h=this.freeWorkers.shift(),k=this.getTask(f),console.log("starting frame "+(k.index+1)+" of "+this.frames.length),this.activeWorkers.push(h),h.postMessage(k))},q.prototype.getContextData=
function(f){return f.getImageData(0,0,this.options.width,this.options.height).data},q.prototype.getImageData=function(f){var k;return null!=this._canvas||(this._canvas=document.createElement("canvas"),this._canvas.width=this.options.width,this._canvas.height=this.options.height),k=this._canvas.getContext("2d"),k.setFill=this.options.background,k.fillRect(0,0,this.options.width,this.options.height),k.drawImage(f,0,0),this.getContextData(k)},q.prototype.getTask=function(f){var k,h;if(k=this.frames.indexOf(f),
h={index:k,last:k===this.frames.length-1,delay:f.delay,transparent:f.transparent,width:this.options.width,height:this.options.height,quality:this.options.quality,repeat:this.options.repeat,canTransfer:"chrome"===n.name},null!=f.data)h.data=f.data;else if(null!=f.context)h.data=this.getContextData(f.context);else if(null!=f.image)h.data=this.getImageData(f.image);else throw Error("Invalid frame");return h},q}(q);y.exports=q});h.define("/browser.coffee",function(h,q,O,B){O=navigator.userAgent.toLowerCase();
q=navigator.platform.toLowerCase();B=O.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,"unknown",0];q={name:"version"===B[1]?B[3]:B[1],version:"ie"===B[1]&&document.documentMode||parseFloat("opera"===B[1]&&B[4]?B[4]:B[2]),platform:{name:O.match(/ip(?:ad|od|hone)/)?"ios":(O.match(/(?:webos|android)/)||q.match(/mac|win|linux/)||["other"])[0]}};q[q.name]=!0;q[q.name+parseInt(q.version,10)]=!0;q.platform[q.platform.name]=!0;h.exports=q});h.define("events",
function(h,q,O,B){ra.EventEmitter||(ra.EventEmitter=function(){});h=q.EventEmitter=ra.EventEmitter;var y="function"===typeof Array.isArray?Array.isArray:function(h){return"[object Array]"===Object.prototype.toString.call(h)};h.prototype.setMaxListeners=function(h){this._events||(this._events={});this._events.maxListeners=h};h.prototype.emit=function(h){if("error"===h&&(!this._events||!this._events.error||y(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:
Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var n=this._events[h];if(!n)return!1;if("function"!=typeof n){if(y(n)){for(var q=Array.prototype.slice.call(arguments,1),n=n.slice(),B=0,H=n.length;B<H;B++)n[B].apply(this,q);return!0}return!1}switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:q=Array.prototype.slice.call(arguments,1),n.apply(this,q)}return!0};h.prototype.addListener=
function(h,q){if("function"!==typeof q)throw Error("addListener only takes instances of Function");if(this._events||(this._events={}),this.emit("newListener",h,q),this._events[h])if(y(this._events[h])){if(!this._events[h].warned){var n;void 0!==this._events.maxListeners?n=this._events.maxListeners:n=10;n&&0<n&&this._events[h].length>n&&(this._events[h].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",
this._events[h].length),console.trace())}this._events[h].push(q)}else this._events[h]=[this._events[h],q];else this._events[h]=q;return this};h.prototype.on=h.prototype.addListener;h.prototype.once=function(h,q){var n=this;return n.on(h,function Ga(){n.removeListener(h,Ga);q.apply(this,arguments)}),this};h.prototype.removeListener=function(h,q){if("function"!==typeof q)throw Error("removeListener only takes instances of Function");if(!this._events||!this._events[h])return this;var n=this._events[h];
if(y(n)){var B=n.indexOf(q);if(0>B)return this;n.splice(B,1);0==n.length&&delete this._events[h]}else this._events[h]===q&&delete this._events[h];return this};h.prototype.removeAllListeners=function(h){return h&&this._events&&this._events[h]&&(this._events[h]=null),this};h.prototype.listeners=function(h){return this._events||(this._events={}),this._events[h]||(this._events[h]=[]),y(this._events[h])||(this._events[h]=[this._events[h]]),this._events[h]}});q.GIF=h("/gif.coffee")}).call(this,this);
(function(){function q(f){var h=f.fps?f.fps:30,k,n,q=1/h,v=f.timeline,w=f.startFrameValue,y=v.totalDuration()/q,z=f.svg,A=Math.floor(1/h*1E3),B,F=this,u,H=f.convertButton;this.init=function(){"svg"==z.tagName&&(z.style="none",z.getAttribute("width")||(z.setAttribute("width",f.svgWidth),z.setAttribute("height",f.svgHeight),z.setAttribute("style","width:"+f.svgWidth+"px; height:"+f.svgHeight+"px;visibility:visible;"),z.style.width=f.svgWidth,z.style.height=f.svgHeight));y/=v.timeScale();k=0;z.style.position=
"relative";z.style.transform="none";z.style.webkitTransform="none";z.style.mozTransform="none";var h;try{h=new Blob(["(function(b){function a(b,d){if({}.hasOwnProperty.call(a.cache,b))return a.cache[b];var e=a.resolve(b);if(!e)throw new Error('Failed to resolve module '+b);var c={id:b,require:a,filename:b,exports:{},loaded:!1,parent:d,children:[]};d&&d.children.push(c);var f=b.slice(0,b.lastIndexOf('/')+1);return a.cache[b]=c.exports,e.call(c.exports,c,c.exports,f,b),c.loaded=!0,a.cache[b]=c.exports}a.modules={},a.cache={},a.resolve=function(b){return{}.hasOwnProperty.call(a.modules,b)?a.modules[b]:void 0},a.define=function(b,c){a.modules[b]=c},a.define('/gif.worker.coffee',function(d,e,f,g){var b,c;b=a('/GIFEncoder.js',d),c=function(a){var c,e,d,f;return c=new b(a.width,a.height),a.index===0?c.writeHeader():c.firstFrame=!1,c.setTransparent(a.transparent),c.setRepeat(a.repeat),c.setDelay(a.delay),c.setQuality(a.quality),c.addFrame(a.data),a.last&&c.finish(),d=c.stream(),a.data=d.pages,a.cursor=d.cursor,a.pageSize=d.constructor.pageSize,a.canTransfer?(f=function(c){for(var b=0,d=a.data.length;b<d;++b)e=a.data[b],c.push(e.buffer);return c}.call(this,[]),self.postMessage(a,f)):self.postMessage(a)},self.onmessage=function(a){return c(a.data)}}),a.define('/GIFEncoder.js',function(e,h,i,j){function c(){this.page=-1,this.pages=[],this.newPage()}function b(a,b){this.width=~~a,this.height=~~b,this.transparent=null,this.transIndex=0,this.repeat=-1,this.delay=0,this.image=null,this.pixels=null,this.indexedPixels=null,this.colorDepth=null,this.colorTab=null,this.usedEntry=new Array,this.palSize=7,this.dispose=-1,this.firstFrame=!0,this.sample=10,this.out=new c}var f=a('/TypedNeuQuant.js',e),g=a('/LZWEncoder.js',e);c.pageSize=4096,c.charMap={};for(var d=0;d<256;d++)c.charMap[d]=String.fromCharCode(d);c.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(c.pageSize),this.cursor=0},c.prototype.getData=function(){var d='';for(var a=0;a<this.pages.length;a++)for(var b=0;b<c.pageSize;b++)d+=c.charMap[this.pages[a][b]];return d},c.prototype.writeByte=function(a){this.cursor>=c.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=a},c.prototype.writeUTFBytes=function(b){for(var c=b.length,a=0;a<c;a++)this.writeByte(b.charCodeAt(a))},c.prototype.writeBytes=function(b,d,e){for(var c=e||b.length,a=d||0;a<c;a++)this.writeByte(b[a])},b.prototype.setDelay=function(a){this.delay=Math.round(a/10)},b.prototype.setFrameRate=function(a){this.delay=Math.round(100/a)},b.prototype.setDispose=function(a){a>=0&&(this.dispose=a)},b.prototype.setRepeat=function(a){this.repeat=a},b.prototype.setTransparent=function(a){this.transparent=a},b.prototype.addFrame=function(a){this.image=a,this.getImagePixels(),this.analyzePixels(),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.writePixels(),this.firstFrame=!1},b.prototype.finish=function(){this.out.writeByte(59)},b.prototype.setQuality=function(a){a<1&&(a=1),this.sample=a},b.prototype.writeHeader=function(){this.out.writeUTFBytes('GIF89a')},b.prototype.analyzePixels=function(){var g=this.pixels.length,d=g/3;this.indexedPixels=new Uint8Array(d);var a=new f(this.pixels,this.sample);a.buildColormap(),this.colorTab=a.getColormap();var b=0;for(var c=0;c<d;c++){var e=a.lookupRGB(this.pixels[b++]&255,this.pixels[b++]&255,this.pixels[b++]&255);this.usedEntry[e]=!0,this.indexedPixels[c]=e}this.pixels=null,this.colorDepth=8,this.palSize=7,this.transparent!==null&&(this.transIndex=this.findClosest(this.transparent))},b.prototype.findClosest=function(e){if(this.colorTab===null)return-1;var k=(e&16711680)>>16,l=(e&65280)>>8,m=e&255,c=0,d=16777216,j=this.colorTab.length;for(var a=0;a<j;){var f=k-(this.colorTab[a++]&255),g=l-(this.colorTab[a++]&255),h=m-(this.colorTab[a]&255),i=f*f+g*g+h*h,b=parseInt(a/3);this.usedEntry[b]&&i<d&&(d=i,c=b),a++}return c},b.prototype.getImagePixels=function(){var a=this.width,g=this.height;this.pixels=new Uint8Array(a*g*3);var b=this.image,c=0;for(var d=0;d<g;d++)for(var e=0;e<a;e++){var f=d*a*4+e*4;this.pixels[c++]=b[f],this.pixels[c++]=b[f+1],this.pixels[c++]=b[f+2]}},b.prototype.writeGraphicCtrlExt=function(){this.out.writeByte(33),this.out.writeByte(249),this.out.writeByte(4);var b,a;this.transparent===null?(b=0,a=0):(b=1,a=2),this.dispose>=0&&(a=dispose&7),a<<=2,this.out.writeByte(0|a|0|b),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},b.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},b.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},b.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes('NETSCAPE2.0'),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},b.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var b=768-this.colorTab.length;for(var a=0;a<b;a++)this.out.writeByte(0)},b.prototype.writeShort=function(a){this.out.writeByte(a&255),this.out.writeByte(a>>8&255)},b.prototype.writePixels=function(){var a=new g(this.width,this.height,this.indexedPixels,this.colorDepth);a.encode(this.out)},b.prototype.stream=function(){return this.out},e.exports=b}),a.define('/LZWEncoder.js',function(e,g,h,i){function f(y,D,C,B){function w(a,b){r[f++]=a,f>=254&&t(b)}function x(b){u(a),k=i+2,j=!0,l(i,b)}function u(b){for(var a=0;a<b;++a)h[a]=-1}function A(z,r){var g,t,d,e,y,w,s;for(q=z,j=!1,n_bits=q,m=p(n_bits),i=1<<z-1,o=i+1,k=i+2,f=0,e=v(),s=0,g=a;g<65536;g*=2)++s;s=8-s,w=a,u(w),l(i,r);a:while((t=v())!=c){if(g=(t<<b)+e,d=t<<s^e,h[d]===g){e=n[d];continue}if(h[d]>=0){y=w-d,d===0&&(y=1);do if((d-=y)<0&&(d+=w),h[d]===g){e=n[d];continue a}while(h[d]>=0)}l(e,r),e=t,k<1<<b?(n[d]=k++,h[d]=g):x(r)}l(e,r),l(o,r)}function z(a){a.writeByte(s),remaining=y*D,curPixel=0,A(s+1,a),a.writeByte(0)}function t(a){f>0&&(a.writeByte(f),a.writeBytes(r,0,f),f=0)}function p(a){return(1<<a)-1}function v(){if(remaining===0)return c;--remaining;var a=C[curPixel++];return a&255}function l(a,c){g&=d[e],e>0?g|=a<<e:g=a,e+=n_bits;while(e>=8)w(g&255,c),g>>=8,e-=8;if((k>m||j)&&(j?(m=p(n_bits=q),j=!1):(++n_bits,n_bits==b?m=1<<b:m=p(n_bits))),a==o){while(e>0)w(g&255,c),g>>=8,e-=8;t(c)}}var s=Math.max(2,B),r=new Uint8Array(256),h=new Int32Array(a),n=new Int32Array(a),g,e=0,f,k=0,m,j=!1,q,i,o;this.encode=z}var c=-1,b=12,a=5003,d=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];e.exports=f}),a.define('/TypedNeuQuant.js',function(A,F,E,D){function C(A,B){function I(){o=[],q=new Int32Array(256),t=new Int32Array(a),y=new Int32Array(a),z=new Int32Array(a>>3);var c,d;for(c=0;c<a;c++)d=(c<<b+8)/a,o[c]=new Float64Array([d,d,d,0]),y[c]=e/a,t[c]=0}function J(){for(var c=0;c<a;c++)o[c][0]>>=b,o[c][1]>>=b,o[c][2]>>=b,o[c][3]=c}function K(b,a,c,e,f){o[a][0]-=b*(o[a][0]-c)/d,o[a][1]-=b*(o[a][1]-e)/d,o[a][2]-=b*(o[a][2]-f)/d}function L(j,e,n,l,k){var h=Math.abs(e-j),i=Math.min(e+j,a),g=e+1,f=e-1,m=1,b,d;while(g<i||f>h)d=z[m++],g<i&&(b=o[g++],b[0]-=d*(b[0]-n)/c,b[1]-=d*(b[1]-l)/c,b[2]-=d*(b[2]-k)/c),f>h&&(b=o[f--],b[0]-=d*(b[0]-n)/c,b[1]-=d*(b[1]-l)/c,b[2]-=d*(b[2]-k)/c)}function C(p,s,q){var h=2147483647,k=h,d=-1,m=d,c,j,e,n,l;for(c=0;c<a;c++)j=o[c],e=Math.abs(j[0]-p)+Math.abs(j[1]-s)+Math.abs(j[2]-q),e<h&&(h=e,d=c),n=e-(t[c]>>i-b),n<k&&(k=n,m=c),l=y[c]>>g,y[c]-=l,t[c]+=l<<f;return y[d]+=x,t[d]-=r,m}function D(){var d,b,e,c,h,g,f=0,i=0;for(d=0;d<a;d++){for(e=o[d],h=d,g=e[1],b=d+1;b<a;b++)c=o[b],c[1]<g&&(h=b,g=c[1]);if(c=o[h],d!=h&&(b=c[0],c[0]=e[0],e[0]=b,b=c[1],c[1]=e[1],e[1]=b,b=c[2],c[2]=e[2],e[2]=b,b=c[3],c[3]=e[3],e[3]=b),g!=f){for(q[f]=i+d>>1,b=f+1;b<g;b++)q[b]=d;f=g,i=d}}for(q[f]=i+n>>1,b=f+1;b<256;b++)q[b]=n}function E(j,i,k){var b,d,c,e=1e3,h=-1,f=q[i],g=f-1;while(f<a||g>=0)f<a&&(d=o[f],c=d[1]-i,c>=e?f=a:(f++,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c<e&&(b=d[2]-k,b<0&&(b=-b),c+=b,c<e&&(e=c,h=d[3])))),g>=0&&(d=o[g],c=i-d[1],c>=e?g=-1:(g--,c<0&&(c=-c),b=d[0]-j,b<0&&(b=-b),c+=b,c<e&&(b=d[2]-k,b<0&&(b=-b),c+=b,c<e&&(e=c,h=d[3]))));return h}function F(){var c,f=A.length,D=30+(B-1)/3,y=f/(3*B),q=~~(y/w),n=d,o=u,a=o>>h;for(a<=1&&(a=0),c=0;c<a;c++)z[c]=n*((a*a-c*c)*m/(a*a));var i;f<s?(B=1,i=3):f%l!==0?i=3*l:f%k!==0?i=3*k:f%p!==0?i=3*p:i=3*j;var r,t,x,e,g=0;c=0;while(c<y)if(r=(A[g]&255)<<b,t=(A[g+1]&255)<<b,x=(A[g+2]&255)<<b,e=C(r,t,x),K(n,e,r,t,x),a!==0&&L(a,e,r,t,x),g+=i,g>=f&&(g-=f),c++,q===0&&(q=1),c%q===0)for(n-=n/D,o-=o/v,a=o>>h,a<=1&&(a=0),e=0;e<a;e++)z[e]=n*((a*a-e*e)*m/(a*a))}function G(){I(),F(),J(),D()}function H(){var b=[],g=[];for(var c=0;c<a;c++)g[o[c][3]]=c;var d=0;for(var e=0;e<a;e++){var f=g[e];b[d++]=o[f][0],b[d++]=o[f][1],b[d++]=o[f][2]}return b}var o,q,t,y,z;this.buildColormap=G,this.getColormap=H,this.lookupRGB=E}var w=100,a=256,n=a-1,b=4,i=16,e=1<<i,f=10,B=1<<f,g=10,x=e>>g,r=e<<f-g,z=a>>3,h=6,t=1<<h,u=z*t,v=30,o=10,d=1<<o,q=8,m=1<<q,y=o+q,c=1<<y,l=499,k=491,p=487,j=503,s=3*j;A.exports=C}),a('/gif.worker.coffee')}.call(this,this))"],
{type:"application/javascript"})}catch(Qa){window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,h=new BlobBuilder,h.append(response),h=h.getBlob()}n=new GIF({workers:f.workers?f.workers:10,workerScript:URL.createObjectURL(h)});n.on("finished",F.onFinished);u=new TimelineMax({paused:!0});u.add(v);v.play(0);F.makeFrame()};this.onFinished=function(f){H.value="Show GIF";H.className="form-sub finished";H.onclick=function(h){window.open(URL.createObjectURL(f))};TweenMax.to(".circleLoaderSVG",
.3,{width:0,height:0})};this.makeFrame=function(){B=k*q;if(k>=y){makeFrame=null;if(1<w){var h=n.frames.slice(0,w),v=n.frames.slice(w);console.log(h.length,v.length);h=v.concat(h);n.frames=h}n.render()}else u.seek(B,!1),html2canvas(z,{background:f.backgroundColor,allowTaint:!0}).then(function(f){n.addFrame(f,{copy:!0,delay:A});k++;F.makeFrame()})}}function h(){for(var f=TweenLite.to({},.1,{}).timeline._first,h=[];f;)f.getChildren&&(h.push(f),f.progress(.999),f.pause()),f=f._next;console.log(h);return h}
function ra(h){B.progress(0);A=new TimelineMax({onComplete:function(){(new q(n)).init()}});A.to(".uiElements",1,{height:1,width:230,autoAlpha:0,padding:0,marginBottom:0,ease:Back.easeOut.config(.7)}).to(Pa,0,{display:"none"},"-=1").to(".uiPanel",1,{width:290,ease:Back.easeOut.config(.7)},"-=1");var n={preview:!1,fps:30,workers:parseInt(""==k.value?5:k.value),timeline:B,svg:K,svgWidth:""!=ma.value?Number(ma.value):800,svgHeight:""!=Ga.value?Number(Ga.value):600,startFrameValue:""!=f.value?parseInt(f.value):
1,backgroundColor:v.value,convertButton:R,mainButtonTl:A};console.log(n);R.value="Converting...";(new TimelineMax).set(".circleLoaderSVG",{alpha:1,visibility:"visible",width:40,height:40}).to(".circleLoaderSVG",1,{transformOrigin:"50% 50%",rotation:360,ease:Linear.easeNone,repeat:-1})}function y(){""!=L.value?(document.querySelector(".form-sub").disabled=!1,document.querySelector(".form-sub").className="form-sub",K=document.getElementsByClassName(L.value)[0]):(document.querySelector(".form-sub").className=
"form-sub uiButton-disabled",document.querySelector(".form-sub").disabled=!0,K=null)}var H,O,B,K,n,L,R,ma,Ga,f,k,v,Pa,ka,w,A;console.log("::SVG2GIF Loaded::");TweenMax.delayedCall(1,function(){H=document.createElement("div");H.setAttribute("style","width:100%; position:absolute; height:100%; top:0;");H.innerHTML='<style type="text/css"> .uiContainer{width:100%; height: 100%; text-align: center; background: rgba(0,0,0,0.3); position: absolute; top: 0; left: 0; z-index: 999;}.uiPanel h2,.uiPanel h4{padding-top: 20px; font-size: 1.3em; width: 100%; text-align: center;}.uiPanel h4{font-size: 0.9em; padding: 0;}.uiPanel{position: relative; text-align: left; width:500px; padding-bottom: 20px; /* background:rgba(237,237,237,0.95); */ background: #FFF; /* border:4px solid #ED4A70; */ border-radius: 12px; transform: translate(-50%, -50%); left: 50%; top: 50%; box-sizing: border-box; box-shadow: 0 0 10px rgba(0,0,0,0.5); overflow:hidden;}.uiContainer *{font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; color: #666;}.uiContainer li{list-style-type: none; line-height: 40px; padding: 6px;}.uiContainer li label{margin-left: 40px;}.uiContainer ul li input, .uiContainer ul li select{width: 50%; padding: 10px 12px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; color: #333; border: none; background: rgba(0,0,0,0.07); border-radius: 6px; box-shadow: inset 0 1px 2px rgba(0,0,0,0.12); box-sizing: border-box; outline : none; -webkit-appearance: none; -moz-appearance: none; appearance: none;}.uiContainer ul li input:focus, .uiContainer ul li select:focus{background: rgba(255,255,255,0.07);}.uiContainer ul li label{}.uiButton{outline : none;}.form-sub{padding: 10px 15px 10px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 500; cursor: pointer; border: none; text-decoration: none; background: #ED4A70; border-radius: 6px; color: #FFF; margin: 10px; font-size: 18px; outline: none;}.uiContainer .playButton{padding: 8px 20px 8px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 500; cursor: pointer; border: none; text-decoration: none; background: #FFF; border-radius: 6px; color: #ED4A70; margin: 10px; font-size: 18px; border:2px solid #ED4A70; outline: none;}.uiButton-disabled{opacity: 0.25; cursor: default;}.uiButtonContainer{text-align: center; width: 100%;}.uiButtonContainer .circleLoaderSVG{background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgOTYgOTYiPiAgPHRpdGxlPmNpcmNsZUxvYWRlcjwvdGl0bGU+ICAgICAgPGNpcmNsZSBjbGFzcz0iY2lyY2xlTG9hZGVyIiBjeD0iNDgiIGN5PSI0OCIgcj0iMzIiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2VkNGE3MCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBzdHJva2Utd2lkdGg9IjEwIiBzdHJva2UtZGFzaGFycmF5PSI1MCIvPjwvc3ZnPg==); background-repeat: no-repeat; background-position: 50% 50%; width: 0; height: 0; position: relative; transform: none; vertical-align: middle; margin: 0; padding: 0;display: inline-block;}.uiElements{width: 100%; height: 100%;margin-bottom: 20px; padding:0;}.uiElements .start-frame{text-align: right; width: 80px !important;}.uiContainer .playButton{display: inline-block; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgOTYgOTYiIHdpZHRoPSIyMyIgaGVpZ2h0PSIyMyI+ICAgICAgPHBhdGggaWQ9InBsYXlJY29uIiBkPSJNMzQuNyw4NC40NGMtMy4zMywwLTYuNy0yLjYyLTYuNy03LjYzVjE4LjY0YzAtNSwzLjM3LTcuNjQsNi43LTcuNjRhOC4wNyw4LjA3LDAsMCwxLDUuMiwyLjA3TDczLDQwLjc4YTguOTEsOC45MSwwLDAsMSwwLDEzLjg3TDM5LjksODIuMzZBOC4wNSw4LjA1LDAsMCwxLDM0LjcsODQuNDRaIiBmaWxsPSIjZWQ0YTcwIj48dGl0bGU+UGxheSBTVkcgdGltZWxpbmU8L3RpdGxlPjwvcGF0aD48L3N2Zz4=); background-repeat: no-repeat; background-position: 50% 50%;;}.uiElements .uiButtonContainer, .uiElements .num-frames{padding: 0; margin: 0; left: 270px; position: absolute; width: 180px;}select > option{background: #FFF; color:#ED4A70 !important; outline: none;}.chooseOption{color: #666 !important;}.tick-icon, .finished{background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgY2xhc3M9InRpY2staWNvbiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNDAgNDAiPiAgPHRpdGxlPnRpY2tfaWNvbjwvdGl0bGU+ICAgICAgPHBvbHlnb24gaWQ9InRpY2siIHBvaW50cz0iMzkuMyA4NS4xNyAxMS4zIDYxLjg0IDE3LjcgNTQuMTYgMzcuNyA3MC44MyA3Ny41MyAxOC45NSA4NS40NyAyNS4wNSAzOS4zIDg1LjE3IiBmaWxsPSIjZmZmIi8+PC9zdmc+); background-repeat: no-repeat; background-position: 100% 50%; width: 180px;}.uiPanel hr{width:80%; margin-bottom: 20px; border-color: #DDD; border-width: 1px;}.svg2gif-logo{background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMjEyLjMyIDY5LjQ5Ij4gIDx0aXRsZT5zdmcyZ2lmX2xvZ288L3RpdGxlPiAgICAgIDxnIGlkPSJzdmcyZ2lmX2xvZ28iPiAgICAgICAgPGc+ICAgICAgICAgIDxwYXRoIGQ9Ik02MC41NywzNC40MWMwLS45LTIuNzgtMi4yOS01LjgxLTIuMjktNC4zMywwLTYuMzMsMS40NS02LjMzLDIuOTQsMCw0LjQ5LDE2LjkzLDIuMiwxNi45Myw5LjY2LDAsNC4zOS00LjQ2LDYuNzUtMTEuMjQsNi43NWExNi43MywxNi43MywwLDAsMS02LjY5LTEuMWMtMS4zMi0uNTItMy4yMy0xLjYyLTMuMjMtMi43NVY0NC4xM2MwLS41MiwxLjY1LTEuMjMsMi44MS0xLjIzLjM2LDAsLjY4LjI5LjY4LDEuMDdWNDYuM2MwLC45NCwzLjQ5LDIuMzksNi41MywyLjM5LDUuMzksMCw3LTEuNjIsNy0zLjQ2LDAtNC44OC0xNy4xOS0xLjc4LTE3LjE5LTkuNjYsMC0zLjkxLDUuNjItNi4yNywxMC41LTYuMjdhMTQuMjYsMTQuMjYsMCwwLDEsNywxLjM5YzEsLjQ4LDIuMTMsMS4yNiwyLjEzLDIuMzl2My4xN2MwLC41Mi0xLjc1LDEuMjMtMi41OCwxLjIzLS4zOSwwLS41OC0uMjYtLjU4LS42NVoiIGZpbGw9IiM2NjYiLz4gICAgICAgICAgPHBhdGggZD0iTTgxLjU0LDUxLjQ3YTIuMywyLjMsMCwwLDEtMi4xNy0xLjI2TDY5LjEsMzIuODNhLjY4LjY4LDAsMCwwLS43NC0uNDJoLTJhLjguOCwwLDAsMS0uOS0uODRWMzAuMzdjMC0uNTIuMzYtLjc0LjktLjc0SDc1Yy41MiwwLC45LjIzLjkuNzR2MS4xOWEuODEuODEsMCwwLDEtLjkuODRoLS4yOWMtLjM2LDAtLjY4LDAtLjY4LjI2LDAsMCwwLC4wNi4xMy4zMmw3LjMzLDEyLjUzYy4yMy4zNi4yMy40Mi40Mi40MnMuMTktLjA2LjQyLS40Mkw4OS42NSwzM2MuMTMtLjI2LjEzLS4yOS4xMy0uMzIsMC0uMjYtLjMyLS4yNi0uNzEtLjI2aC0uMjlhLjguOCwwLDAsMS0uOS0uODRWMzAuMzdjMC0uNTIuMzYtLjc0LjktLjc0aDguMzNjLjU1LDAsLjkuMjMuOS43NHYxLjE5YS44LjgsMCwwLDEtLjkuODRoLTJhLjY4LjY4LDAsMCwwLS43NC40Mkw4NC4wOSw1MC4yMWEyLjMyLDIuMzIsMCwwLDEtMi4xNiwxLjI2WiIgZmlsbD0iIzY2NiIvPiAgICAgICAgICA8cGF0aCBkPSJNMTE1LjQ2LDQzLjYyYy0uNDUsMC0xLjIzLTEuNzUtMS4yMy0yLjU4LDAtLjM5LjI2LS41OC42NS0uNThIMTIxYTEuMTYsMS4xNiwwLDAsMSwxLjI5LDEuMjZ2Ni4xMWMwLC44Ny00LjU1LDMuNjUtMTIsMy42NVM5Ni4zNCw0OCw5Ni4zNCw0MC44N2MwLTYuODIsNi44OC0xMS41NiwxNS4zOC0xMS41NmExNC4yNiwxNC4yNiwwLDAsMSw3LDEuMzljMSwuNDgsMi4xMywxLjI2LDIuMTMsMi4zOXYzLjE3YzAsLjQ1LTEuNzQsMS4yMy0yLjU4LDEuMjMtLjM5LDAtLjU4LS4yNi0uNTgtLjY1VjM0LjQxYzAtLjktMi43OC0yLjI2LTUuODEtMi4yNi02LjIsMC0xMS4xMSwzLjQyLTExLjExLDguNjYsMCw0LjM5LDMuNzEsNy42Niw5LjYzLDcuNjYsNywwLDguNzItMS43NCw4LjcyLTIuMDd2LTJjMC0uNTUtLjI2LS43NC0uNzgtLjc0WiIgZmlsbD0iIzY2NiIvPiAgICAgICAgICA8cGF0aCBkPSJNMTI3LDUxLjE0Yy0uOTQsMC0uOTQtLjUyLS45NC0yLjE2LDAtLjQyLjk0LTEsMS40OS0xLjM5LDQuNjUtMy4yMywxMS43My03LjI3LDExLjczLTEyLjY2LDAtMS43MS0xLjQ1LTMtNC4yMy0zLTMsMC01LjA3LDEuMzItNS4wNywyLjE3djEuODRjMCwuNDgtMS42NSwxLjIzLTIuODEsMS4yMy0uNDUsMC0uNjgtLjQ1LS42OC0xLjIzVjMyLjc2YzAtMS4xMywxLjEzLTEuNzQsMi4xMy0yLjI2YTEzLjM4LDEzLjM4LDAsMCwxLDctMS41MmM0LjQ5LDAsOC4zLDIuMiw4LjMsNiwwLDYuMDctOS41LDExLjc2LTEwLjc2LDEyLjUzLS4xMy4xLS4xOS4xMy0uMTkuMjNzLjEuMTMuMjkuMTNoOS44NWMuNjgsMCwxLjEuMSwxLjEuNjUsMCwuNzEtLjYxLDIuNjItMS40NSwyLjYyWiIgZmlsbD0iIzY2NiIvPiAgICAgICAgICA8cGF0aCBkPSJNMTY2LjA5LDQzLjYyYy0uNDUsMC0xLjIzLTEuNzUtMS4yMy0yLjU4LDAtLjM5LjI2LS41OC42NS0uNThoNi4xN0ExLjE2LDEuMTYsMCwwLDEsMTczLDQxLjcxdjYuMTFjMCwuODctNC41NSwzLjY1LTEyLDMuNjVTMTQ3LDQ4LDE0Nyw0MC44N2MwLTYuODIsNi44OC0xMS41NiwxNS4zOC0xMS41NmExNC4yNiwxNC4yNiwwLDAsMSw3LDEuMzljMSwuNDgsMi4xMywxLjI2LDIuMTMsMi4zOXYzLjE3YzAsLjQ1LTEuNzQsMS4yMy0yLjU4LDEuMjMtLjM5LDAtLjU4LS4yNi0uNTgtLjY1VjM0LjQxYzAtLjktMi43OC0yLjI2LTUuODEtMi4yNi02LjIsMC0xMS4xMSwzLjQyLTExLjExLDguNjYsMCw0LjM5LDMuNzEsNy42Niw5LjYzLDcuNjYsNywwLDguNzItMS43NCw4LjcyLTIuMDd2LTJjMC0uNTUtLjI2LS43NC0uNzgtLjc0WiIgZmlsbD0iIzY2NiIvPiAgICAgICAgICA8cGF0aCBkPSJNMTgzLjQxLDQ3Ljc4YzAsLjQyLjIzLjU4LjY1LjU4aDEuNzRhLjguOCwwLDAsMSwuOTEuODRWNTAuNGMwLC41Mi0uMzYuNzQtLjkxLjc0aC04Ljg1Yy0uNTUsMC0uOS0uMjMtLjktLjc0VjQ5LjIxYS44LjgsMCwwLDEsLjktLjg0aDEuNzRjLjQyLDAsLjY1LS4xNi42NS0uNThWMzNjMC0uNDItLjIzLS41OC0uNjUtLjU4aC0xLjc0YS44LjgsMCwwLDEtLjktLjg0VjMwLjM3YzAtLjUyLjM2LS43NC45LS43NGg4Ljg1Yy41NSwwLC45MS4yMy45MS43NHYxLjE5YS44LjgsMCwwLDEtLjkxLjg0aC0xLjc0Yy0uNDIsMC0uNjUuMTYtLjY1LjU4WiIgZmlsbD0iIzY2NiIvPiAgICAgICAgICA8cGF0aCBkPSJNMjEyLjMyLDM1LjMyYzAsLjc4LS4zMiwxLjA3LS42OCwxLjA3LTEuMTYsMC0yLjQ5LS43OC0yLjQ5LTEuMjNWMzMuMDljMC0uNDItLjMyLS42OC0uODctLjY4SDE5OC4wOGEuNTcuNTcsMCwwLDAtLjY1LjY1djVhLjUxLjUxLDAsMCwwLC41NS41NWg5LjM0YS44LjgsMCwwLDEsLjkuODRWNDFjMCwuNTItLjM2Ljc0LS45Ljc0SDE5OGEuNTYuNTYsMCwwLDAtLjU4LjU4VjQ4YzAsLjM5LjIzLjM5LjY1LjM5aDEuNzRhLjguOCwwLDAsMSwuOTEuODRWNTAuNGMwLC41Mi0uMzYuNzQtLjkxLjc0SDE5MWMtLjU1LDAtLjktLjIzLS45LS43NFY0OS4yMWEuOC44LDAsMCwxLC45LS44NGgxLjc0Yy40MiwwLC42NSwwLC42NS0uMzlWMzIuOGMwLS4zOS0uMjMtLjM5LS42NS0uMzlIMTkxYS44LjgsMCwwLDEtLjktLjg0VjMwLjM3YzAtLjUyLjM2LS43NC45LS43NGgyMC4xM2ExLjE0LDEuMTQsMCwwLDEsMS4yMywxLjI5WiIgZmlsbD0iIzY2NiIvPiAgICAgICAgPC9nPiAgICAgICAgPGc+ICAgICAgICAgIDxwYXRoIGQ9Ik03LjM1LDYyLjMyYzUuNS02LjkxLDIxLjIxLTcuMTgsMjEuMjEtMTcuNTciIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzAwOWRkYyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHN0cm9rZS13aWR0aD0iMy43MyIvPiAgICAgICAgICA8cGF0aCBkPSJNMjguNTYsNDQuNzVjMC0xMC4zOS0yMS4yMS03LjE4LTIxLjIxLTE3LjU4IiBmaWxsPSJub25lIiBzdHJva2U9IiNmY2I4MjciIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBzdHJva2Utd2lkdGg9IjMuNzMiLz4gICAgICAgICAgPHBhdGggZD0iTTcuMzUsMjcuMTdjMC0xMC4zOSwxNS4yOS0xMi43OSwyMS4yMS0xNy41OCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZTAzYTNlIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgc3Ryb2tlLXdpZHRoPSIzLjczIi8+ICAgICAgICAgIDxyZWN0IHg9IjIzLjExIiB5PSI0LjEyIiB3aWR0aD0iMTAuNzMiIGhlaWdodD0iMTAuNzMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDMwLjg5IDM5LjM5KSByb3RhdGUoLTExMy4wNCkiIGZpbGw9IiNmZmYiLz4gICAgICAgICAgPHBhdGggZD0iTTI0LjY1LDE5LDE5LDUuNjYsMzIuMjksMCwzOCwxMy4zWk0yMy44OCw3LjYzbDIuNzQsNi40NCw2LjQ0LTIuNzRMMzAuMzIsNC44OVoiIGZpbGw9IiM2NjYiLz4gICAgICAgICAgPGc+ICAgICAgICAgICAgPGNpcmNsZSBjeD0iNy4yMyIgY3k9IjYyLjI2IiByPSI1LjM2IiBmaWxsPSIjZmZmIi8+ICAgICAgICAgICAgPHBhdGggZD0iTTcuMjMsNjkuNDlhNy4yMyw3LjIzLDAsMSwxLDcuMjMtNy4yM0E3LjI0LDcuMjQsMCwwLDEsNy4yMyw2OS40OVptMC0xMC43M2EzLjUsMy41LDAsMSwwLDMuNSwzLjVBMy41LDMuNSwwLDAsMCw3LjIzLDU4Ljc2WiIgZmlsbD0iIzY2NiIvPiAgICAgICAgICA8L2c+ICAgICAgICA8L2c+ICAgICAgPC9nPjwvc3ZnPg==); height: 45px; margin:20px; /* width: 100%; */ padding-top: 20px; background-repeat: no-repeat; background-position: 50% 50%;}</style><div class="uiContainer"> <div class="uiPanel"><div class="svg2gif-logo"> </div><ul class="uiElements"> <li><label title="If this is blank ensure you have added a class to the SVG you wish to convert.">SVG class:<select style="left: 180px; position: absolute;" class="svg-tags"><option class="chooseOption" value="" selected>Choose...</option></select></label></li><li><label title="The current width and height of the SVG.">SVG size: <input onkeypress="return event.charCode >=48 && event.charCode <=57" class="svg-width" style="left: 180px; width: 60px; position: absolute;" type="text" name="svg-width" value="800"></label><label style="left:215px; position: absolute;">x</label><input onkeypress="return event.charCode >=48 && event.charCode <=57" class="svg-height" style="left: 278px; width: 60px; position: absolute;" type="text" name="svg-height" value="600"></li><li><label title="The background colour of the GIF (usually the background colour of the body).">BG Color: <input class="gif-background-color" style="left: 180px; width: 80px; position: absolute;" type="text" name="gif-background-color" value="#FFF"></label></li><li><label title="Default is 5. Higher values mean quicker conversion but may drain memory.">Workers: <input onkeypress="return event.charCode >=48 && event.charCode <=57" class="num-workers" style="left: 180px; width: 40px; position: absolute;" type="text" value="5" name="num-workers"></label></li><li><label title="The frame that will be the first frame of the GIF" >Start frame: <input onkeypress="return event.charCode >=48 && event.charCode <=57" class="start-frame" style="left: 180px; width: 80px; position: absolute;" type="text" name="start-frame" value="1"></label><label class="num-frames">Calculating...</label></li></ul> <div class="uiButtonContainer"><input type="submit" name="play" value=" " class="playButton"><input disabled type="submit" name="commit" value="Convert SVG to GIF" class="form-sub uiButton-disabled"><div class="circleLoaderSVG"></div></div></div></div>';
document.body.appendChild(H);Pa=document.querySelector(".playButton");n=document.getElementsByTagName("svg");L=document.querySelector(".svg-tags");for(var q=0;q<n.length;q++){var A=document.createElement("option");A.value=n[q].className.baseVal;A.innerHTML=n[q].className.baseVal?n[q].className.baseVal:"[Unknown SVG]";L.appendChild(A)}L.onchange=y;R=document.querySelector(".form-sub");ma=document.querySelector(".svg-width");Ga=document.querySelector(".svg-height");f=document.querySelector(".start-frame");
document.querySelector(".gsap-timeline");k=document.querySelector(".num-workers");v=document.querySelector(".gif-background-color");w=document.querySelector(".num-frames");O=h();B=O[0];Pa.onclick=function(){B.play(0)};timelineFrames=Math.floor(B.totalDuration()/(1/30));timelineFrames=9999999<timelineFrames?'<div class="warningTriangle"></div> Set timeline repeat:0':"of "+timelineFrames;w.innerHTML=timelineFrames;R.onclick=ra;ka=Draggable.create(document.querySelector(".uiPanel"),{bounds:window});
window.onresize=function(){ka[0].applyBounds()}})})();