blob: f780550d55066ee24e58be85084d55bc60352f93 [file] [log] [blame]
<html xmlns="http://www.w3.org/1999/xhtml">
<meta charset="UTF-8">
<head>
<style>
body{
background-color:#fff;
margin: 0px;
height: 100%;
overflow: hidden;
}
#bodymovin{
background-color:#fff;
width:90%;
height:90%;
display:block;
overflow: hidden;
transform: translate3d(0,0,0);
text-align: center;
opacity: 1;
}
</style>
</head>
<body>
<script>
(function (root, factory) { if(typeof define === "function" && define.amd) { define( factory); } else if(typeof module === "object" && module.exports) { module.exports = factory(); } else { root.bodymovin = factory(); } }(window, function() {function roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function roundTo2Decimals(t){return Math.round(1e4*t)/1e4}function roundTo3Decimals(t){return Math.round(100*t)/100}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin=t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="visible",t.style.transformStyle=t.style.webkitTransformStyle=t.style.mozTransformStyle="preserve-3d"}function styleUnselectableDiv(t){t.style.userSelect="none",t.style.MozUserSelect="none",t.style.webkitUserSelect="none",t.style.oUserSelect="none"}function BMEnterFrameEvent(t,e,s,r){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=0>r?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=0>e?-1:1}function BMCompleteLoopEvent(t,e,s,r){this.type=t,this.currentLoop=e,this.totalLoops=s,this.direction=0>r?-1:1}function BMSegmentStartEvent(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}function BMDestroyEvent(t,e){this.type=t,this.target=e}function _addEventListener(t,e){this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e)}function _removeEventListener(t,e){if(e){if(this._cbs[t]){for(var s=0,r=this._cbs[t].length;r>s;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,r-=1),s+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}function _triggerEvent(t,e){if(this._cbs[t])for(var s=this._cbs[t].length,r=0;s>r;r++)this._cbs[t][r](e)}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var s,r="";for(s=t;s>0;--s)r+=e[Math.round(Math.random()*(e.length-1))];return r}function HSVtoRGB(t,e,s){var r,i,a,n,o,h,l,p;switch(1===arguments.length&&(e=t.s,s=t.v,t=t.h),n=Math.floor(6*t),o=6*t-n,h=s*(1-e),l=s*(1-o*e),p=s*(1-(1-o)*e),n%6){case 0:r=s,i=p,a=h;break;case 1:r=l,i=s,a=h;break;case 2:r=h,i=s,a=p;break;case 3:r=h,i=l,a=s;break;case 4:r=p,i=h,a=s;break;case 5:r=s,i=h,a=l}return[r,i,a]}function RGBtoHSV(t,e,s){1===arguments.length&&(e=t.g,s=t.b,t=t.r);var r,i=Math.max(t,e,s),a=Math.min(t,e,s),n=i-a,o=0===i?0:n/i,h=i/255;switch(i){case a:r=0;break;case t:r=e-s+n*(s>e?6:0),r/=6*n;break;case e:r=s-t+2*n,r/=6*n;break;case s:r=t-e+4*n,r/=6*n}return[r,o,h]}function addSaturationToRGB(t,e){var s=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return s[1]+=e,s[1]>1?s[1]=1:s[1]<=0&&(s[1]=0),HSVtoRGB(s[0],s[1],s[2])}function addBrightnessToRGB(t,e){var s=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return s[2]+=e,s[2]>1?s[2]=1:s[2]<0&&(s[2]=0),HSVtoRGB(s[0],s[1],s[2])}function addHueToRGB(t,e){var s=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return s[0]+=e/360,s[0]>1?s[0]-=1:s[0]<0&&(s[0]+=1),HSVtoRGB(s[0],s[1],s[2])}function componentToHex(t){var e=t.toString(16);return 1==e.length?"0"+e:e}function fillToRgba(t,e){if(!cachedColors[t]){var s=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);cachedColors[t]=parseInt(s[1],16)+","+parseInt(s[2],16)+","+parseInt(s[3],16)}return"rgba("+cachedColors[t]+","+e+")"}function RenderedFrame(t,e){this.tr=t,this.o=e}function LetterProps(t,e,s,r,i,a){this.o=t,this.sw=e,this.sc=s,this.fc=r,this.m=i,this.props=a}function iterateDynamicProperties(t){var e,s=this.dynamicProperties;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t)}function reversePath(t,e){var s,r,i=[],a=[],n=[],o={},h=0;e&&(i[0]=t.o[0],a[0]=t.i[0],n[0]=t.v[0],h=1),r=t.i.length;var l=r-1;for(s=h;r>s;s+=1)i.push(t.o[l]),a.push(t.i[l]),n.push(t.v[l]),l-=1;return o.i=i,o.o=a,o.v=n,o}function Matrix(){}function matrixManagerFunction(){var t=new Matrix,e=function(e,s,r,i,a){return t.reset().translate(i,a).rotate(e).scale(s,r).toCSS()},s=function(t){return e(t.tr.r[2],t.tr.s[0],t.tr.s[1],t.tr.p[0],t.tr.p[1])};return{getMatrix:s}}function createElement(t,e,s){if(!e){var r=Object.create(t.prototype,s),i={};return r&&"[object Function]"===i.toString.call(r.init)&&r.init(),r}e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype._parent=t.prototype}function extendPrototype(t,e){for(var s in t.prototype)t.prototype.hasOwnProperty(s)&&(e.prototype[s]=t.prototype[s])}function bezFunction(){function t(t,e,s,r,i,a){var n=t*r+e*i+s*a-i*r-a*t-s*e;return n>-1e-4&&1e-4>n}function e(e,s,r,i,a,n,o,h,l){return t(e,s,i,a,o,h)&&t(e,r,i,n,o,l)}function s(t){this.segmentLength=0,this.points=new Array(t)}function r(t,e){this.partialLength=t,this.point=e}function i(t,e){var s=e.segments,r=s.length,i=bm_floor((r-1)*t),a=t*e.addedLength,n=0;if(a==s[i].l)return s[i].p;for(var o=s[i].l>a?-1:1,h=!0;h;)s[i].l<=a&&s[i+1].l>a?(n=(a-s[i].l)/(s[i+1].l-s[i].l),h=!1):i+=o,(0>i||i>=r-1)&&(h=!1);return s[i].p+(s[i+1].p-s[i].p)*n}function a(){this.pt1=new Array(2),this.pt2=new Array(2),this.pt3=new Array(2),this.pt4=new Array(2)}function n(t,e,s,r,n,o,h){var l=new a;n=0>n?0:n>1?1:n;var p=i(n,h);o=o>1?1:o;var m,f=i(o,h),d=t.length,c=1-p,u=1-f;for(m=0;d>m;m+=1)l.pt1[m]=Math.round(1e3*(c*c*c*t[m]+(p*c*c+c*p*c+c*c*p)*s[m]+(p*p*c+c*p*p+p*c*p)*r[m]+p*p*p*e[m]))/1e3,l.pt3[m]=Math.round(1e3*(c*c*u*t[m]+(p*c*u+c*p*u+c*c*f)*s[m]+(p*p*u+c*p*f+p*c*f)*r[m]+p*p*f*e[m]))/1e3,l.pt4[m]=Math.round(1e3*(c*u*u*t[m]+(p*u*u+c*f*u+c*u*f)*s[m]+(p*f*u+c*f*f+p*u*f)*r[m]+p*f*f*e[m]))/1e3,l.pt2[m]=Math.round(1e3*(u*u*u*t[m]+(f*u*u+u*f*u+u*u*f)*s[m]+(f*f*u+u*f*f+f*u*f)*r[m]+f*f*f*e[m]))/1e3;return l}var o=(Math,function(){function t(t,e){this.l=t,this.p=e}var e={};return function(s,r,i,a){var n=(s.join("_")+"_"+r.join("_")+"_"+i.join("_")+"_"+a.join("_")).replace(/\./g,"p");if(e[n])return e[n];var o,h,l,p,m,f,d=defaultCurveSegments,c=0,u=[],y=[],g={addedLength:0,segments:[]};for(l=i.length,o=0;d>o;o+=1){for(m=o/(d-1),f=0,h=0;l>h;h+=1)p=bm_pow(1-m,3)*s[h]+3*bm_pow(1-m,2)*m*i[h]+3*(1-m)*bm_pow(m,2)*a[h]+bm_pow(m,3)*r[h],u[h]=p,null!==y[h]&&(f+=bm_pow(u[h]-y[h],2)),y[h]=u[h];f&&(f=bm_sqrt(f),c+=f),g.segments.push(new t(c,m))}return g.addedLength=c,e[n]=g,g}}()),h=function(){var e={};return function(i){var a=i.s,n=i.e,o=i.to,h=i.ti,l=(a.join("_")+"_"+n.join("_")+"_"+o.join("_")+"_"+h.join("_")).replace(/\./g,"p");if(e[l])return void(i.bezierData=e[l]);var p,m,f,d,c,u,y,g=defaultCurveSegments,v=0,b=null;2===a.length&&(a[0]!=n[0]||a[1]!=n[1])&&t(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&t(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])&&(g=2);var P=new s(g);for(f=o.length,p=0;g>p;p+=1){for(y=new Array(f),c=p/(g-1),u=0,m=0;f>m;m+=1)d=bm_pow(1-c,3)*a[m]+3*bm_pow(1-c,2)*c*(a[m]+o[m])+3*(1-c)*bm_pow(c,2)*(n[m]+h[m])+bm_pow(c,3)*n[m],y[m]=d,null!==b&&(u+=bm_pow(y[m]-b[m],2));u=bm_sqrt(u),v+=u,P.points[p]=new r(u,y),b=y}P.segmentLength=v,i.bezierData=P,e[l]=P}}();return{getBezierLength:o,getNewSegment:n,buildBezierData:h,pointOnLine2D:t,pointOnLine3D:e}}function dataFunctionManager(){function t(i,a,o){var h,l,p,m,f,d,c,u,y=i.length;for(m=0;y>m;m+=1)if(h=i[m],"ks"in h&&!h.completed){if(h.completed=!0,h.tt&&(i[m-1].td=h.tt),l=[],p=-1,h.hasMask){var g=h.masksProperties;for(d=g.length,f=0;d>f;f+=1)if(g[f].pt.k.i)r(g[f].pt.k);else for(u=g[f].pt.k.length,c=0;u>c;c+=1)g[f].pt.k[c].s&&r(g[f].pt.k[c].s[0]),g[f].pt.k[c].e&&r(g[f].pt.k[c].e[0])}0===h.ty?(h.layers=e(h.refId,a),t(h.layers,a,o)):4===h.ty?s(h.shapes):5==h.ty&&n(h,o)}}function e(t,e){for(var s=0,r=e.length;r>s;){if(e[s].id===t)return JSON.parse(JSON.stringify(e[s].layers));s+=1}}function s(t){var e,i,a,n=t.length;for(e=n-1;e>=0;e-=1)if("sh"==t[e].ty)if(t[e].ks.k.i)r(t[e].ks.k);else for(a=t[e].ks.k.length,i=0;a>i;i+=1)t[e].ks.k[i].s&&r(t[e].ks.k[i].s[0]),t[e].ks.k[i].e&&r(t[e].ks.k[i].e[0]);else"gr"==t[e].ty&&s(t[e].it)}function r(t){var e,s=t.i.length;for(e=0;s>e;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function i(t,e){var s=e?e.split("."):[100,100,100];return t[0]>s[0]?!0:s[0]>t[0]?!1:t[1]>s[1]?!0:s[1]>t[1]?!1:t[2]>s[2]?!0:s[2]>t[2]?!1:void 0}function a(e,s){o(e),t(e.layers,e.assets,s)}function n(t,e){var s,r,i,a,n,o,h,l=[],p=t.t.d,m=0,f=t.t.m.g,d=0,c=0,u=0,y=[],g=0,v=0,b=e.getFontByName(p.f),P=0,E=b.fStyle.split(" "),k="normal",S="normal";for(r=E.length,s=0;r>s;s+=1)"italic"===E[s].toLowerCase()?S="italic":"bold"===E[s].toLowerCase()?k="700":"black"===E[s].toLowerCase()?k="900":"medium"===E[s].toLowerCase()?k="500":"regular"===E[s].toLowerCase()||"normal"===E[s].toLowerCase()?k="400":("light"===E[s].toLowerCase()||"thin"===E[s].toLowerCase())&&(k="200");if(p.fWeight=k,p.fStyle=S,r=p.t.length,p.sz){var x=p.sz[0],M=-1;for(s=0;r>s;s+=1)i=!1," "===p.t.charAt(s)?M=s:13===p.t.charCodeAt(s)&&(g=0,i=!0),e.chars?(h=e.getCharData(p.t.charAt(s),b.fStyle,b.fFamily),P=i?0:h.w*p.s/100):P=e.measureText(p.t.charAt(s),p.f,p.s),g+P>x?(-1===M?(p.t=p.t.substr(0,s)+"\r"+p.t.substr(s),r+=1):(s=M,p.t=p.t.substr(0,s)+"\r"+p.t.substr(s+1)),M=-1,g=0):g+=P;r=p.t.length}for(g=0,P=0,s=0;r>s;s+=1)if(i=!1," "===p.t.charAt(s)?a=" ":13===p.t.charCodeAt(s)?(y.push(g),v=g>v?g:v,g=0,a="",i=!0,u+=1):a=p.t.charAt(s),e.chars?(h=e.getCharData(p.t.charAt(s),b.fStyle,e.getFontByName(p.f).fFamily),P=i?0:h.w*p.s/100):P=e.measureText(a,p.f,p.s),g+=P,l.push({l:P,an:P,add:d,n:i,anIndexes:[],val:a,line:u}),2==f){if(d+=P,""==a||" "==a||s==r-1){for((""==a||" "==a)&&(d-=P);s>=c;)l[c].an=d,l[c].ind=m,l[c].extra=P,c+=1;m+=1,d=0}}else if(3==f){if(d+=P,""==a||s==r-1){for(""==a&&(d-=P);s>=c;)l[c].an=d,l[c].ind=m,l[c].extra=P,c+=1;d=0,m+=1}}else l[m].ind=m,l[m].extra=0,m+=1;if(p.l=l,v=g>v?g:v,y.push(g),p.sz)p.boxWidth=p.sz[0],t.t.d.justifyOffset=0;else switch(p.boxWidth=v,p.j){case 1:t.t.d.justifyOffset=-p.boxWidth;break;case 2:t.t.d.justifyOffset=-p.boxWidth/2;break;default:t.t.d.justifyOffset=0}p.lineWidths=y;var C=t.t.a;o=C.length;var D,w,T=[];for(n=0;o>n;n+=1){for(C[n].a.sc&&(p.strokeColorAnim=!0),C[n].a.sw&&(p.strokeWidthAnim=!0),(C[n].a.fc||C[n].a.fh||C[n].a.fs||C[n].a.fb)&&(p.fillColorAnim=!0),w=0,D=C[n].s.b,s=0;r>s;s+=1)l[s].anIndexes[n]=w,(1==D&&""!=l[s].val||2==D&&""!=l[s].val&&" "!=l[s].val||3==D&&(l[s].n||" "==l[s].val||s==r-1)||4==D&&(l[s].n||s==r-1))&&(1===C[n].s.rn&&T.push(w),w+=1);t.t.a[n].s.totalChars=w;var F,I=-1;if(1===C[n].s.rn)for(s=0;r>s;s+=1)I!=l[s].anIndexes[n]&&(I=l[s].anIndexes[n],F=T.splice(Math.floor(Math.random()*T.length),1)[0]),l[s].anIndexes[n]=F}0!==o||"m"in t.t.p||(t.singleShape=!0),p.yOffset=1.2*p.s,p.ascent=b.ascent*p.s/100}var o=function(){function t(e){var s,r,i,a=e.length;for(s=0;a>s;s+=1)if("gr"===e[s].ty)t(e[s].it);else if("fl"===e[s].ty||"st"===e[s].ty)if(e[s].c.k&&e[s].c.k[0].i)for(i=e[s].c.k.length,r=0;i>r;r+=1)e[s].c.k[r].s&&(e[s].c.k[r].s[0]/=255,e[s].c.k[r].s[1]/=255,e[s].c.k[r].s[2]/=255,e[s].c.k[r].s[3]/=255),e[s].c.k[r].e&&(e[s].c.k[r].e[0]/=255,e[s].c.k[r].e[1]/=255,e[s].c.k[r].e[2]/=255,e[s].c.k[r].e[3]/=255);else e[s].c.k[0]/=255,e[s].c.k[1]/=255,e[s].c.k[2]/=255,e[s].c.k[3]/=255}function e(e){var s,r=e.length;for(s=0;r>s;s+=1)4===e[s].ty&&t(e[s].shapes)}var s=[4,1,9];return function(t){if(i(s,t.v)&&(e(t.layers),t.assets)){var r,a=t.assets.length;for(r=0;a>r;r+=1)t.assets[r].layers&&e(t.assets[r].layers)}}}(),h={};return h.completeData=a,h}function ShapeModifier(){}function TrimModifier(){}function RoundCornersModifier(){}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet"},this.elements=[],this.destroyed=!1}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:e&&e.clearCanvas||!0,context:e&&e.context||null,scaleMode:e&&e.scaleMode||"fit"},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1},this.contextData={saved:Array.apply(null,{length:15}),savedOp:Array.apply(null,{length:15}),cArrPos:0,cTr:new Matrix,cO:1};var s,r=15;for(s=0;r>s;s+=1)this.contextData.saved[s]=Array.apply(null,{length:16});this.elements=[],this.transformMat=new Matrix}function HybridRenderer(t){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null}function MaskElement(t,e,s){this.dynamicProperties=[],this.data=t,this.element=e,this.globalData=s,this.paths=[],this.storedData=[],this.masksProperties=this.data.masksProperties,this.viewData=new Array(this.masksProperties.length),this.maskElement=null,this.firstFrame=!0;var r,i,a,n,o,h,l,p,m=(this.element.maskedElement,this.globalData.defs),f=this.masksProperties.length,d=this.masksProperties,c=0,u=[],y=randomString(10),g="clipPath",v="clip-path";for(r=0;f>r;r++)if(("a"!==d[r].mode&&"n"!==d[r].mode||d[r].inv)&&(g="mask",v="mask"),"s"!=d[r].mode&&"i"!=d[r].mode||0!=c||(o=document.createElementNS(svgNS,"rect"),o.setAttribute("fill","#ffffff"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("width","100%"),o.setAttribute("height","100%"),u.push(o)),"n"!=d[r].mode&&d[r].cl!==!1){if(c+=1,i=document.createElementNS(svgNS,"path"),d[r].cl?"s"==d[r].mode?i.setAttribute("fill","#000000"):i.setAttribute("fill","#ffffff"):(i.setAttribute("fill","none"),"s"==d[r].mode?i.setAttribute("fill","#000000"):i.setAttribute("fill","#ffffff"),i.setAttribute("stroke-width","1"),i.setAttribute("stroke-miterlimit","10")),i.setAttribute("clip-rule","nonzero"),0!==d[r].x.k){g="mask",v="mask",p=PropertyFactory.getProp(this.element,d[r].x,0,null,this.dynamicProperties);var b="fi_"+randomString(10);h=document.createElementNS(svgNS,"filter"),h.setAttribute("id",b),l=document.createElementNS(svgNS,"feMorphology"),l.setAttribute("operator","dilate"),l.setAttribute("in","SourceGraphic"),l.setAttribute("radius","0"),h.appendChild(l),m.appendChild(h),"s"==d[r].mode?i.setAttribute("stroke","#000000"):i.setAttribute("stroke","#ffffff")}else l=null,p=null;if(this.storedData[r]={elem:i,x:p,expan:l,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"==d[r].mode){n=u.length;var P=document.createElementNS(svgNS,"g");for(a=0;n>a;a+=1)P.appendChild(u[a]);var E=document.createElementNS(svgNS,"mask");E.setAttribute("mask-type","alpha"),E.setAttribute("id",y+"_"+c),E.appendChild(i),m.appendChild(E),P.setAttribute("mask","url(#"+y+"_"+c+")"),u.length=0,u.push(P)}else u.push(i);d[r].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[r]={elem:i,lastPath:"",prop:ShapePropertyFactory.getShapeProp(this.element,d[r],3,this.dynamicProperties,null)},this.viewData[r].prop.k||this.drawPath(d[r],this.viewData[r].prop.v,this.viewData[r])}else this.viewData[r]={prop:ShapePropertyFactory.getShapeProp(this.element,d[r],3,this.dynamicProperties,null)};for(this.maskElement=document.createElementNS(svgNS,g),f=u.length,r=0;f>r;r+=1)this.maskElement.appendChild(u[r]);this.maskElement.setAttribute("id",y),c>0&&this.element.maskedElement.setAttribute(v,"url(#"+y+")"),m.appendChild(this.maskElement)}function BaseElement(){}function SVGBaseElement(t,e,s,r,i){this.globalData=s,this.comp=r,this.data=t,this.matteElement=null,this.parentContainer=e,this.layerId=i?i.layerId:"ly_"+randomString(10),this.placeholder=i,this.init()}function ITextElement(t,e,s,r){}function SVGTextElement(t,e,s,r,i){this.textSpans=[],this.renderType="svg",this._parent.constructor.call(this,t,e,s,r,i)}function ICompElement(t,e,s,r,i){this._parent.constructor.call(this,t,e,s,r,i),this.layers=t.layers,this.isSvg=!0,this.data.tm&&(this.tm=PropertyFactory.getProp(this,this.data.tm,0,s.frameRate,this.dynamicProperties))}function IImageElement(t,e,s,r,i){this.assetData=s.getAssetData(t.refId),this.path=s.getPath(),this._parent.constructor.call(this,t,e,s,r,i)}function IShapeElement(t,e,s,r,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.viewData=[],this.shapeModifiers=[],this.shapesContainer=document.createElementNS(svgNS,"g"),this._parent.constructor.call(this,t,e,s,r,i)}function ISolidElement(t,e,s,r,i){this._parent.constructor.call(this,t,e,s,r,i)}function CVBaseElement(t,e,s){this.globalData=s,this.data=t,this.comp=e,this.canvasContext=s.canvasContext,this.init()}function CVCompElement(t,e,s){this._parent.constructor.call(this,t,e,s);var r={};for(var i in s)s.hasOwnProperty(i)&&(r[i]=s[i]);r.renderer=this,r.compHeight=this.data.h,r.compWidth=this.data.w,this.renderConfig={clearCanvas:!0},this.contextData={saved:Array.apply(null,{length:15}),savedOp:Array.apply(null,{length:15}),cArrPos:0,cTr:new Matrix,cO:1};var a,n=15;for(a=0;n>a;a+=1)this.contextData.saved[a]=Array.apply(null,{length:16});this.transformMat=new Matrix,this.parentGlobalData=this.globalData;var o=document.createElement("canvas");r.canvasContext=o.getContext("2d"),this.canvasContext=r.canvasContext,o.width=this.data.w,o.height=this.data.h,this.canvas=o,this.globalData=r,this.layers=t.layers,this.data.tm&&(this.tm=PropertyFactory.getProp(this,this.data.tm,0,s.frameRate,this.dynamicProperties))}function CVImageElement(t,e,s){this.assetData=s.getAssetData(t.refId),this.path=s.getPath(),this._parent.constructor.call(this,t,e,s),this.globalData.addPendingElement()}function CVMaskElement(t,e){this.data=t,this.element=e,this.dynamicProperties=[],this.masksProperties=this.data.masksProperties,this.viewData=new Array(this.masksProperties.length);var s,r=this.masksProperties.length;for(s=0;r>s;s++)this.viewData[s]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[s],3,this.dynamicProperties,null)}function CVShapeElement(t,e,s){this.shapes=[],this.stylesList=[],this.viewData=[],this.shapeModifiers=[],this.shapesData=t.shapes,this.firstFrame=!0,this._parent.constructor.call(this,t,e,s)}function CVSolidElement(t,e,s){this._parent.constructor.call(this,t,e,s)}function CVTextElement(t,e,s){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this._parent.constructor.call(this,t,e,s)}function HBaseElement(t,e,s,r,i){this.globalData=s,this.comp=r,this.data=t,this.matteElement=null,this.parentContainer=e,this.layerId=i?i.layerId:"ly_"+randomString(10),this.placeholder=i,this.init()}function HSolidElement(t,e,s,r,i){this._parent.constructor.call(this,t,e,s,r,i)}function HCompElement(t,e,s,r,i){this._parent.constructor.call(this,t,e,s,r,i),this.layers=t.layers,this.isSvg=!1,this.data.tm&&(this.tm=PropertyFactory.getProp(this,this.data.tm,0,s.frameRate,this.dynamicProperties)),this.data.hasMask&&(this.isSvg=!0)}function HShapeElement(t,e,s,r,i){this.shapes=[],this.shapeModifiers=[],this.shapesData=t.shapes,this.stylesList=[],this.viewData=[],this._parent.constructor.call(this,t,e,s,r,i)}function HTextElement(t,e,s,r,i){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this._parent.constructor.call(this,t,e,s,r,i)}function HImageElement(t,e,s,r,i){this.assetData=s.getAssetData(t.refId),this.path=s.getPath(),this._parent.constructor.call(this,t,e,s,r,i)}function HCameraElement(t,e,s,r,i){if(this._parent.constructor.call(this,t,e,s,r,i),this.pe=PropertyFactory.getProp(this,t.pe,0,0,this.dynamicProperties),t.ks.p.s?(this.px=PropertyFactory.getProp(this,t.ks.p.x,1,0,this.dynamicProperties),this.py=PropertyFactory.getProp(this,t.ks.p.y,1,0,this.dynamicProperties),this.pz=PropertyFactory.getProp(this,t.ks.p.z,1,0,this.dynamicProperties)):this.p=PropertyFactory.getProp(this,t.ks.p,1,0,this.dynamicProperties),t.ks.a&&(this.a=PropertyFactory.getProp(this,t.ks.a,1,0,this.dynamicProperties)),t.ks.or.k.length){var a,n=t.ks.or.k.length;for(a=0;n>a;a+=1)t.ks.or.k[a].to=null,t.ks.or.k[a].ti=null}this.or=PropertyFactory.getProp(this,t.ks.or,1,degToRads,this.dynamicProperties),this.or.sh=!0,this.rx=PropertyFactory.getProp(this,t.ks.rx,0,degToRads,this.dynamicProperties),this.ry=PropertyFactory.getProp(this,t.ks.ry,0,degToRads,this.dynamicProperties),this.rz=PropertyFactory.getProp(this,t.ks.rz,0,degToRads,this.dynamicProperties),this.mat=new Matrix}function SliderEffect(t,e,s){this.p=PropertyFactory.getProp(e,t.v,0,0,s)}function AngleEffect(t,e,s){this.p=PropertyFactory.getProp(e,t.v,0,0,s)}function ColorEffect(t,e,s){this.p=PropertyFactory.getProp(e,t.v,1,0,s)}function PointEffect(t,e,s){this.p=PropertyFactory.getProp(e,t.v,1,0,s)}function CheckboxEffect(t,e,s){this.p=PropertyFactory.getProp(e,t.v,1,0,s)}function NoValueEffect(t,e,s){this.p={}}function groupEffectFunction(t){}function GroupEffect(){var t=groupEffectFunction;return t}function EffectsManager(t,e,s){var r,i,a=t.ef,n=[],o=a.length;for(r=0;o>r;r++)switch(a[r].ty){case 0:i=new SliderEffect(a[r],e,s),n.push(i.proxyFunction.bind(i));break;case 1:i=new AngleEffect(a[r],e,s),n.push(i.proxyFunction.bind(i));break;case 2:i=new ColorEffect(a[r],e,s),n.push(i.proxyFunction.bind(i));break;case 3:i=new PointEffect(a[r],e,s),n.push(i.proxyFunction.bind(i));break;case 4:case 7:i=new CheckboxEffect(a[r],e,s),n.push(i.proxyFunction.bind(i));break;case 5:i=new EffectsManager(a[r],e,s),n.push(i);break;case 6:i=new NoValueEffect(a[r],e,s),n.push(i)}var h=function(e){for(var s=t.ef,r=0,i=s.length;i>r;){if(e===s[r].nm||e===s[r].ix)return 5===s[r].ty?n[r]:n[r]();r+=1}};return h}var svgNS="http://www.w3.org/2000/svg",subframeEnabled=!0,expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bm_rounder=Math.round,bm_rnd,bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_abs=Math.abs,bm_floor=Math.floor,bm_max=Math.max,bm_min=Math.min,BMMath={};!function(){var t,e=Object.getOwnPropertyNames(Math),s=e.length;for(t=0;s>t;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){var e=typeof t;if("object"===e&&t.length){var s,r=Array.apply(null,{length:t.length}),i=t.length;for(s=0;i>s;s+=1)r[s]=Math.abs(t[s]);return r}return t};var defaultCurveSegments=75,degToRads=Math.PI/180,roundCorner=.5519;roundValues(!1);var rgbToHex=function(){var t,e,s=[];for(t=0;256>t;t+=1)e=t.toString(16),s[t]=1==e.length?"0"+e:e;return function(t,e,r){return 0>t&&(t=0),0>e&&(e=0),0>r&&(r=0),"#"+s[t]+s[e]+s[r]}}(),fillColorToString=function(){var t=[];return function(e,s){return void 0!==s&&(e[3]=s),t[e[0]]||(t[e[0]]={}),t[e[0]][e[1]]||(t[e[0]][e[1]]={}),t[e[0]][e[1]][e[2]]||(t[e[0]][e[1]][e[2]]={}),t[e[0]][e[1]][e[2]][e[3]]||(t[e[0]][e[1]][e[2]][e[3]]="rgba("+e.join(",")+")"),t[e[0]][e[1]][e[2]][e[3]]}}(),Matrix=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function e(t){if(0===t)return this;var e=Math.cos(t),s=Math.sin(t);return this._t(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1)}function s(t){if(0===t)return this;var e=Math.cos(t),s=Math.sin(t);return this._t(1,0,0,0,0,e,-s,0,0,s,e,0,0,0,0,1)}function r(t){if(0===t)return this;var e=Math.cos(t),s=Math.sin(t);return this._t(e,0,s,0,0,1,0,0,-s,0,e,0,0,0,0,1)}function i(t){if(0===t)return this;var e=Math.cos(t),s=Math.sin(t);return this._t(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1)}function a(t,e){return this._t(1,e,t,1,0,0)}function n(t,e){return this.shear(Math.tan(t),Math.tan(e))}function o(t,e){var s=Math.cos(e),r=Math.sin(e);return this._t(s,r,0,0,-r,s,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,Math.tan(t),1,0,0,0,0,1,0,0,0,0,1)._t(s,-r,0,0,r,s,0,0,0,0,1,0,0,0,0,1)}function h(t,e,s){return s=isNaN(s)?1:s,1==t&&1==e&&1==s?this:this._t(t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1)}function l(t,e,s,r,i,a,n,o,h,l,p,m,f,d,c,u){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=r,this.props[4]=i,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=m,this.props[12]=f,this.props[13]=d,this.props[14]=c,this.props[15]=u,this}function p(t,e,s){return s=isNaN(s)?0:s,0!==t||0!==e||0!==s?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,s,1):this}function m(t,e,s,r,i,a,n,o,h,l,p,m,f,d,c,u){if(1===t&&0===e&&0===s&&0===r&&0===i&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===m)return(0!==f||0!==d||0!==c)&&(this.props[12]=this.props[12]*t+this.props[13]*i+this.props[14]*h+this.props[15]*f,this.props[13]=this.props[12]*e+this.props[13]*a+this.props[14]*l+this.props[15]*d,this.props[14]=this.props[12]*s+this.props[13]*n+this.props[14]*p+this.props[15]*c,this.props[15]=this.props[12]*r+this.props[13]*o+this.props[14]*m+this.props[15]*u),this;var y=this.props[0],g=this.props[1],v=this.props[2],b=this.props[3],P=this.props[4],E=this.props[5],k=this.props[6],S=this.props[7],x=this.props[8],M=this.props[9],C=this.props[10],D=this.props[11],w=this.props[12],T=this.props[13],F=this.props[14],I=this.props[15];return this.props[0]=y*t+g*i+v*h+b*f,this.props[1]=y*e+g*a+v*l+b*d,this.props[2]=y*s+g*n+v*p+b*c,this.props[3]=y*r+g*o+v*m+b*u,this.props[4]=P*t+E*i+k*h+S*f,this.props[5]=P*e+E*a+k*l+S*d,this.props[6]=P*s+E*n+k*p+S*c,this.props[7]=P*r+E*o+k*m+S*u,this.props[8]=x*t+M*i+C*h+D*f,this.props[9]=x*e+M*a+C*l+D*d,this.props[10]=x*s+M*n+C*p+D*c,this.props[11]=x*r+M*o+C*m+D*u,this.props[12]=w*t+T*i+F*h+I*f,this.props[13]=w*e+T*a+F*l+I*d,this.props[14]=w*s+T*n+F*p+I*c,this.props[15]=w*r+T*o+F*m+I*u,this}function f(t){var e;for(e=0;16>e;e+=1)t.props[e]=this.props[e]}function d(t){var e;for(e=0;16>e;e+=1)this.props[e]=t[e]}function c(t,e,s){return{x:t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}}function u(t,e,s){return t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12]}function y(t,e,s){return t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13]}function g(t,e,s){return t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}function v(t,e,s){return[t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]]}function b(t,e){return bm_rnd(t*this.props[0]+e*this.props[4]+this.props[12])+","+bm_rnd(t*this.props[1]+e*this.props[5]+this.props[13])}function P(){return[this.props[0],this.props[1],this.props[2],this.props[3],this.props[4],this.props[5],this.props[6],this.props[7],this.props[8],this.props[9],this.props[10],this.props[11],this.props[12],this.props[13],this.props[14],this.props[15]]}function E(){return isSafari?"matrix3d("+roundTo2Decimals(this.props[0])+","+roundTo2Decimals(this.props[1])+","+roundTo2Decimals(this.props[2])+","+roundTo2Decimals(this.props[3])+","+roundTo2Decimals(this.props[4])+","+roundTo2Decimals(this.props[5])+","+roundTo2Decimals(this.props[6])+","+roundTo2Decimals(this.props[7])+","+roundTo2Decimals(this.props[8])+","+roundTo2Decimals(this.props[9])+","+roundTo2Decimals(this.props[10])+","+roundTo2Decimals(this.props[11])+","+roundTo2Decimals(this.props[12])+","+roundTo2Decimals(this.props[13])+","+roundTo2Decimals(this.props[14])+","+roundTo2Decimals(this.props[15])+")":(this.cssParts[1]=this.props.join(","),this.cssParts.join(""))}function k(){return"matrix("+this.props[0]+","+this.props[1]+","+this.props[4]+","+this.props[5]+","+this.props[12]+","+this.props[13]+")"}function S(){return""+this.toArray()}return function(){this.reset=t,this.rotate=e,this.rotateX=s,this.rotateY=r,this.rotateZ=i,this.skew=n,this.skewFromAxis=o,this.shear=a,this.scale=h,this.setTransform=l,this.translate=p,this.transform=m,this.applyToPoint=c,this.applyToX=u,this.applyToY=y,this.applyToZ=g,this.applyToPointArray=v,this.applyToPointStringified=b,this.toArray=P,this.toCSS=E,this.to2dCSS=k,this.toString=S,this.clone=f,this.cloneFromProps=d,this._t=this.transform,this.props=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],this.cssParts=["matrix3d(","",")"]}}();!function(t,e){function s(s,l,p){var d=[];l=1==l?{entropy:!0}:l||{};var v=n(a(l.entropy?[s,h(t)]:null==s?o():s,3),d),b=new r(d),P=function(){for(var t=b.g(f),e=u,s=0;y>t;)t=(t+s)*m,e*=m,s=b.g(1);for(;t>=g;)t/=2,e/=2,s>>>=1;return(t+s)/e};return P.int32=function(){return 0|b.g(4)},P.quick=function(){return b.g(4)/4294967296},P["double"]=P,n(h(b.S),t),(l.pass||p||function(t,s,r,a){return a&&(a.S&&i(a,b),t.state=function(){return i(b,{})}),r?(e[c]=t,s):t})(P,v,"global"in l?l.global:this==e,l.state)}function r(t){var e,s=t.length,r=this,i=0,a=r.i=r.j=0,n=r.S=[];for(s||(t=[s++]);m>i;)n[i]=i++;for(i=0;m>i;i++)n[i]=n[a=v&a+t[i%s]+(e=n[i])],n[a]=e;(r.g=function(t){for(var e,s=0,i=r.i,a=r.j,n=r.S;t--;)e=n[i=v&i+1],s=s*m+n[v&(n[i]=n[a=v&a+e])+(n[a]=e)];return r.i=i,r.j=a,s})(m)}function i(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function a(t,e){var s,r=[],i=typeof t;if(e&&"object"==i)for(s in t)try{r.push(a(t[s],e-1))}catch(n){}return r.length?r:"string"==i?t:t+"\x00"}function n(t,e){for(var s,r=t+"",i=0;i<r.length;)e[v&i]=v&(s^=19*e[v&i])+r.charCodeAt(i++);return h(e)}function o(){try{if(l)return h(l.randomBytes(m));var e=new Uint8Array(m);return(p.crypto||p.msCrypto).getRandomValues(e),h(e)}catch(s){var r=p.navigator,i=r&&r.plugins;return[+new Date,p,i,p.screen,h(t)]}}function h(t){return String.fromCharCode.apply(0,t)}var l,p=this,m=256,f=6,d=52,c="random",u=e.pow(m,f),y=e.pow(2,d),g=2*y,v=m-1;e["seed"+c]=s,n(e.random(),t)}([],BMMath);var BezierFactory=function(){function t(t,e,s,r,i){var a=i||("bez_"+t+"_"+e+"_"+s+"_"+r).replace(/\./g,"p");if(p[a])return p[a];var n=new h([t,e,s,r]);return p[a]=n,n}function e(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function r(t){return 3*t}function i(t,i,a){return((e(i,a)*t+s(i,a))*t+r(i))*t}function a(t,i,a){return 3*e(i,a)*t*t+2*s(i,a)*t+r(i)}function n(t,e,s,r,a){var n,o,h=0;do o=e+(s-e)/2,n=i(o,r,a)-t,n>0?s=o:e=o;while(Math.abs(n)>d&&++h<c);return o}function o(t,e,s,r){for(var n=0;m>n;++n){var o=a(e,s,r);if(0===o)return e;var h=i(e,s,r)-t;e-=h/o}return e}function h(t){this._p=t,this._mSampleValues=g?new Float32Array(u):new Array(u),this._precomputed=!1,this.get=this.get.bind(this)}var l={};l.getBezierEasing=t;var p={},m=4,f=.001,d=1e-7,c=10,u=11,y=1/(u-1),g="function"==typeof Float32Array;return h.prototype={get:function(t){var e=this._p[0],s=this._p[1],r=this._p[2],a=this._p[3];return this._precomputed||this._precompute(),e===s&&r===a?t:0===t?0:1===t?1:i(this._getTForX(t),s,a)},_precompute:function(){var t=this._p[0],e=this._p[1],s=this._p[2],r=this._p[3];this._precomputed=!0,(t!==e||s!==r)&&this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],s=0;u>s;++s)this._mSampleValues[s]=i(s*y,t,e)},_getTForX:function(t){for(var e=this._p[0],s=this._p[2],r=this._mSampleValues,i=0,h=1,l=u-1;h!==l&&r[h]<=t;++h)i+=y;--h;var p=(t-r[h])/(r[h+1]-r[h]),m=i+p*y,d=a(m,e,s);return d>=f?o(t,m,e,s):0===d?m:n(t,i,i+y,e,s)}},l}(),MatrixManager=matrixManagerFunction;!function(){for(var t=0,e=["ms","moz","webkit","o"],s=0;s<e.length&&!window.requestAnimationFrame;++s)window.requestAnimationFrame=window[e[s]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[s]+"CancelAnimationFrame"]||window[e[s]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,s){var r=(new Date).getTime(),i=Math.max(0,16-(r-t)),a=window.setTimeout(function(){e(r+i)},i);return t=r+i,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var bez=bezFunction(),dataManager=dataFunctionManager(),FontManager=function(){function t(t,e){var s=document.createElement("span");s.style.fontFamily=e;var r=document.createElement("span");r.innerHTML="giItT1WQy@!-/#",s.style.position="absolute",s.style.left="-10000px",s.style.top="-10000px",s.style.fontSize="300px",s.style.fontVariant="normal",s.style.fontStyle="normal",s.style.fontWeight="normal",s.style.letterSpacing="0",s.appendChild(r),document.body.appendChild(s);var i=r.offsetWidth;return r.style.fontFamily=t+", "+e,{node:r,w:i,parent:s}}function e(){var t,s,r,i=this.fonts.length,a=i;for(t=0;i>t;t+=1)if(this.fonts[t].loaded)a-=1;else if("t"===this.fonts[t].fOrigin){if(window.Typekit&&window.Typekit.load&&0===this.typekitLoaded){
this.typekitLoaded=1;try{Typekit.load({async:!0,active:function(){this.typekitLoaded=2}.bind(this)})}catch(n){}}2===this.typekitLoaded&&(this.fonts[t].loaded=!0)}else"n"===this.fonts[t].fOrigin?this.fonts[t].loaded=!0:(s=this.fonts[t].monoCase.node,r=this.fonts[t].monoCase.w,s.offsetWidth!==r?(a-=1,this.fonts[t].loaded=!0):(s=this.fonts[t].sansCase.node,r=this.fonts[t].sansCase.w,s.offsetWidth!==r&&(a-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==a&&Date.now()-this.initTime<h?setTimeout(e.bind(this),20):setTimeout(function(){this.loaded=!0}.bind(this),0)}function s(t,e){var s=document.createElementNS(svgNS,"text");s.style.fontSize="100px",s.style.fontFamily=e.fFamily,s.textContent="1",e.fClass?(s.style.fontFamily="inherit",s.className=e.fClass):s.style.fontFamily=e.fFamily,t.appendChild(s);var r=document.createElement("canvas").getContext("2d");return r.font="100px "+e.fFamily,r}function r(r,i){if(!r)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=r.list);var a,n=r.list,o=n.length;for(a=0;o>a;a+=1){if(n[a].loaded=!1,n[a].monoCase=t(n[a].fFamily,"monospace"),n[a].sansCase=t(n[a].fFamily,"sans-serif"),n[a].fPath){if("p"===n[a].fOrigin){var h=document.createElement("style");h.type="text/css",h.innerHTML="@font-face {font-family: "+n[a].fFamily+"; font-style: normal; src: url('"+n[a].fPath+"');}",i.appendChild(h)}else if("g"===n[a].fOrigin){var l=document.createElement("link");l.type="text/css",l.rel="stylesheet",l.href=n[a].fPath,i.appendChild(l)}else if("t"===n[a].fOrigin){var p=document.createElement("script");p.setAttribute("src",n[a].fPath),i.appendChild(p)}}else n[a].loaded=!0;n[a].helper=s(i,n[a]),this.fonts.push(n[a])}e.bind(this)()}function i(t){if(t){this.chars||(this.chars=[]);var e,s,r,i=t.length,a=this.chars.length;for(e=0;i>e;e+=1){for(s=0,r=!1;a>s;)this.chars[s].style===t[e].style&&this.chars[s].fFamily===t[e].fFamily&&this.chars[s].ch===t[e].ch&&(r=!0),s+=1;r||(this.chars.push(t[e]),a+=1)}}}function a(t,e,s){for(var r=0,i=this.chars.length;i>r;){if(this.chars[r].ch===t&&this.chars[r].style===e&&this.chars[r].fFamily===s)return this.chars[r];r+=1}}function n(t,e,s){var r=this.getFontByName(e),i=r.helper;return i.measureText(t).width*s/100}function o(t){for(var e=0,s=this.fonts.length;s>e;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return"sans-serif"}var h=5e3,l=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.loaded=!1,this.initTime=Date.now()};return l.prototype.addChars=i,l.prototype.addFonts=r,l.prototype.getCharData=a,l.prototype.getFontByName=o,l.prototype.measureText=n,l}(),PropertyFactory=function(){function t(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime;if(t===this.lastFrame||this.lastFrame!==l&&(this.lastFrame>=this.keyframes[this.keyframes.length-1].t-this.offsetTime&&t>=this.keyframes[this.keyframes.length-1].t-this.offsetTime||this.lastFrame<this.keyframes[0].t-this.offsetTime&&t<this.keyframes[0].t-this.offsetTime));else{for(var e,s,r=0,i=this.keyframes.length-1,a=1,n=!0;n;){if(e=this.keyframes[r],s=this.keyframes[r+1],r==i-1&&t>=s.t-this.offsetTime){e.h&&(e=s);break}if(s.t-this.offsetTime>t)break;i-1>r?r+=a:n=!1}var o,h,p,m,f,d=0;if(e.to){e.bezierData||bez.buildBezierData(e);var c=e.bezierData;if(t>=s.t-this.offsetTime||t<e.t-this.offsetTime){var u=t>=s.t-this.offsetTime?c.points.length-1:0;for(h=c.points[u].point.length,o=0;h>o;o+=1)this.v[o]=this.mult?c.points[u].point[o]*this.mult:c.points[u].point[o],this.pv[o]=c.points[u].point[o],this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o])}else{e.__fnct?f=e.__fnct:(f=BezierFactory.getBezierEasing(e.o.x,e.o.y,e.i.x,e.i.y,e.n).get,e.__fnct=f),p=f((t-(e.t-this.offsetTime))/(s.t-this.offsetTime-(e.t-this.offsetTime)));var y,g=c.segmentLength*p,v=0;for(a=1,n=!0,m=c.points.length;n;){if(v+=c.points[d].partialLength*a,0===g||0===p||d==c.points.length-1){for(h=c.points[d].point.length,o=0;h>o;o+=1)this.v[o]=this.mult?c.points[d].point[o]*this.mult:c.points[d].point[o],this.pv[o]=c.points[d].point[o],this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o]);break}if(g>=v&&g<v+c.points[d+1].partialLength){for(y=(g-v)/c.points[d+1].partialLength,h=c.points[d].point.length,o=0;h>o;o+=1)this.v[o]=this.mult?(c.points[d].point[o]+(c.points[d+1].point[o]-c.points[d].point[o])*y)*this.mult:c.points[d].point[o]+(c.points[d+1].point[o]-c.points[d].point[o])*y,this.pv[o]=c.points[d].point[o]+(c.points[d+1].point[o]-c.points[d].point[o])*y,this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o]);break}m-1>d&&1==a||d>0&&-1==a?d+=a:n=!1}}}else{var b,P,E,k,S,x=!1;for(i=e.s.length,r=0;i>r;r+=1){if(1!==e.h&&(e.o.x instanceof Array?(x=!0,e.__fnct||(e.__fnct=[]),e.__fnct[r]||(b=e.o.x[r]||e.o.x[0],P=e.o.y[r]||e.o.y[0],E=e.i.x[r]||e.i.x[0],k=e.i.y[r]||e.i.y[0])):(x=!1,e.__fnct||(b=e.o.x,P=e.o.y,E=e.i.x,k=e.i.y)),x?e.__fnct[r]?f=e.__fnct[r]:(f=BezierFactory.getBezierEasing(b,P,E,k).get,e.__fnct[r]=f):e.__fnct?f=e.__fnct:(f=BezierFactory.getBezierEasing(b,P,E,k).get,e.__fnct=f),p=t>=s.t-this.offsetTime?1:t<e.t-this.offsetTime?0:f((t-(e.t-this.offsetTime))/(s.t-this.offsetTime-(e.t-this.offsetTime)))),this.sh&&1!==e.h){var M=e.s[r],C=e.e[r];-180>M-C?M+=360:M-C>180&&(M-=360),S=M+(C-M)*p}else S=1===e.h?e.s[r]:e.s[r]+(e.e[r]-e.s[r])*p;1===i?(this.v=this.mult?S*this.mult:S,this.pv=S,this.lastPValue!=this.pv&&(this.mdf=!0,this.lastPValue=this.pv)):(this.v[r]=this.mult?S*this.mult:S,this.pv[r]=S,this.lastPValue[r]!==this.pv[r]&&(this.mdf=!0,this.lastPValue[r]=this.pv[r]))}}}this.lastFrame=t,this.frameId=this.elem.globalData.frameId}}function e(){}function s(t,s,r){this.mult=r,this.v=r?s.k*r:s.k,this.pv=s.k,this.mdf=!1,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.getValue=e}function r(t,s,r){this.mult=r,this.data=s,this.mdf=!1,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1,this.v=new Array(s.k.length),this.pv=new Array(s.k.length),this.lastValue=new Array(s.k.length);var i=Array.apply(null,{length:s.k.length});this.vel=i.map(function(){return 0});var a,n=s.k.length;for(a=0;n>a;a+=1)this.v[a]=r?s.k[a]*r:s.k[a],this.pv[a]=s.k[a];this.getValue=e}function i(e,s,r){this.keyframes=s.k,this.offsetTime=e.data.st,this.lastValue=-99999,this.lastPValue=-99999,this.frameId=-1,this.k=!0,this.kf=!0,this.data=s,this.mult=r,this.elem=e,this.comp=e.comp,this.lastFrame=l,this.v=r?s.k[0].s[0]*r:s.k[0].s[0],this.pv=s.k[0].s[0],this.getValue=t}function a(e,s,r){var i,a,n,o,h,p=s.k.length;for(i=0;p-1>i;i+=1)s.k[i].to&&s.k[i].s&&s.k[i].e&&(a=s.k[i].s,n=s.k[i].e,o=s.k[i].to,h=s.k[i].ti,(2==a.length&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])||bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],a[0]+o[0],a[1]+o[1],a[2]+o[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],n[0]+h[0],n[1]+h[1],n[2]+h[2]))&&(s.k[i].to=null,s.k[i].ti=null));this.keyframes=s.k,this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this.mult=r,this.elem=e,this.comp=e.comp,this.getValue=t,this.frameId=-1,this.v=new Array(s.k[0].s.length),this.pv=new Array(s.k[0].s.length),this.lastValue=new Array(s.k[0].s.length),this.lastPValue=new Array(s.k[0].s.length),this.lastFrame=l}function n(t,e,n,o,h){var l;if(2===n)l=new p(t,e,h);else if(7===n)l=new TrimProperty(t,e,h);else if(e.k.length)if("number"==typeof e.k[0])l=new r(t,e,o);else switch(n){case 0:l=new i(t,e,o);break;case 1:l=new a(t,e,o)}else l=new s(t,e,o);return l.k&&h.push(l),l}function o(t,e,s,r){return new f(t,e,s,r)}function h(t,e,s){return new d(t,e,s)}var l=-999999,p=function(){function t(){return this.p.k&&this.p.getValue(),this.p.v}function e(){return this.px.k&&this.px.getValue(),this.px.v}function s(){return this.py.k&&this.py.getValue(),this.py.v}function r(){return this.a.k&&this.a.getValue(),this.a.v}function i(){return this.or.k&&this.or.getValue(),this.or.v}function a(){return this.r.k&&this.r.getValue(),this.r.v/degToRads}function n(){return this.s.k&&this.s.getValue(),this.s.v}function o(){return this.o.k&&this.o.getValue(),this.o.v}function h(){return this.sk.k&&this.sk.getValue(),this.sk.v}function l(){return this.sa.k&&this.sa.getValue(),this.sa.v}function p(t){var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.r?t.rotate(-this.r.v):t.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function m(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1;var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t].mdf&&(this.mdf=!0);this.mdf&&(this.v.reset(),this.a&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r?this.v.rotate(-this.r.v):this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])),this.frameId=this.elem.globalData.frameId}}function f(){this.inverted=!0,this.iv=new Matrix,this.k||(this.data.p.s?this.iv.translate(this.px.v,this.py.v,-this.pz.v):this.iv.translate(this.p.v[0],this.p.v[1],-this.p.v[2]),this.r?this.iv.rotate(-this.r.v):this.iv.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.s&&this.iv.scale(this.s.v[0],this.s.v[1],1),this.a&&this.iv.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]))}return function(d,c,u){this.elem=d,this.frameId=-1,this.dynamicProperties=[],this.mdf=!1,this.data=c,this.getValue=m,this.applyToMatrix=p,this.setInverted=f,this.v=new Matrix,c.p.s?(this.px=PropertyFactory.getProp(d,c.p.x,0,0,this.dynamicProperties),this.py=PropertyFactory.getProp(d,c.p.y,0,0,this.dynamicProperties),c.p.z&&(this.pz=PropertyFactory.getProp(d,c.p.z,0,0,this.dynamicProperties))):this.p=PropertyFactory.getProp(d,c.p,1,0,this.dynamicProperties),c.r?this.r=PropertyFactory.getProp(d,c.r,0,degToRads,this.dynamicProperties):c.rx&&(this.rx=PropertyFactory.getProp(d,c.rx,0,degToRads,this.dynamicProperties),this.ry=PropertyFactory.getProp(d,c.ry,0,degToRads,this.dynamicProperties),this.rz=PropertyFactory.getProp(d,c.rz,0,degToRads,this.dynamicProperties),this.or=PropertyFactory.getProp(d,c.or,0,degToRads,this.dynamicProperties)),c.sk&&(this.sk=PropertyFactory.getProp(d,c.sk,0,degToRads,this.dynamicProperties),this.sa=PropertyFactory.getProp(d,c.sa,0,degToRads,this.dynamicProperties)),c.a&&(this.a=PropertyFactory.getProp(d,c.a,1,0,this.dynamicProperties)),c.s&&(this.s=PropertyFactory.getProp(d,c.s,1,.01,this.dynamicProperties)),this.o=c.o?PropertyFactory.getProp(d,c.o,0,.01,u):{mdf:!1,v:1},this.dynamicProperties.length?u.push(this):(this.a&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r?this.v.rotate(-this.r.v):this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?c.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])),Object.defineProperty(this,"position",{get:t}),Object.defineProperty(this,"xPosition",{get:e}),Object.defineProperty(this,"yPosition",{get:s}),Object.defineProperty(this,"orientation",{get:i}),Object.defineProperty(this,"anchorPoint",{get:r}),Object.defineProperty(this,"rotation",{get:a}),Object.defineProperty(this,"scale",{get:n}),Object.defineProperty(this,"opacity",{get:o}),Object.defineProperty(this,"skew",{get:h}),Object.defineProperty(this,"skewAxis",{get:l})}}(),m=function(){function t(t){if(this.prop.getValue(),this.cmdf=!1,this.omdf=!1,this.prop.mdf||t){var e,s,r,i=4*this.data.p;for(e=0;i>e;e+=1)s=e%4===0?100:255,r=Math.round(this.prop.v[e]*s),this.c[e]!==r&&(this.c[e]=r,this.cmdf=!0);if(this.o.length)for(i=this.prop.v.length,e=4*this.data.p;i>e;e+=1)s=e%2===0?100:1,r=e%2===0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==r&&(this.o[e-4*this.data.p]=r,this.omdf=!0)}}function e(e,s,r){this.prop=n(e,s.k,1,null,[]),this.data=s,this.k=this.prop.k,this.c=Array.apply(null,{length:4*s.p});var i=s.k.k[0].s?s.k.k[0].s.length-4*s.p:s.k.k.length-4*s.p;this.o=Array.apply(null,{length:i}),this.cmdf=!1,this.omdf=!1,this.getValue=t,this.prop.k&&r.push(this),this.getValue(!0)}return function(t,s,r){return new e(t,s,r)}}(),f=function(){function t(t){var e=0,s=this.dataProps.length;if(this.elem.globalData.frameId!==this.frameId||t){for(this.mdf=!1,this.frameId=this.elem.globalData.frameId;s>e;){if(this.dataProps[e].p.mdf){this.mdf=!0;break}e+=1}if(this.mdf||t)for("svg"===this.renderer&&(this.dasharray=""),e=0;s>e;e+=1)"o"!=this.dataProps[e].n?"svg"===this.renderer?this.dasharray+=" "+this.dataProps[e].p.v:this.dasharray[e]=this.dataProps[e].p.v:this.dashoffset=this.dataProps[e].p.v}}return function(e,s,r,i){this.elem=e,this.frameId=-1,this.dataProps=new Array(s.length),this.renderer=r,this.mdf=!1,this.k=!1,this.dasharray="svg"===this.renderer?"":new Array(s.length-1),this.dashoffset=0;var a,n,o=s.length;for(a=0;o>a;a+=1)n=PropertyFactory.getProp(e,s[a].v,0,0,i),this.k=n.k?!0:this.k,this.dataProps[a]={n:s[a].n,p:n};this.getValue=t,this.k?i.push(this):this.getValue(!0)}}(),d=function(){function t(){if(this.dynamicProperties.length){var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t].mdf&&(this.mdf=!0)}var s=this.data.totalChars,r=2===this.data.r?1:100/s,i=this.o.v/r,a=this.s.v/r+i,n=this.e.v/r+i;if(a>n){var o=a;a=n,n=o}this.finalS=a,this.finalE=n}function e(t){var e=BezierFactory.getBezierEasing(this.ne.v/100,0,1-this.xe.v/100,1).get,a=0,n=this.finalS,o=this.finalE,h=this.data.sh;if(2==h)a=o===n?t>=o?1:0:s(0,r(.5/(o-n)+(t-n)/(o-n),1)),a=e(a);else if(3==h)a=o===n?t>=o?0:1:1-s(0,r(.5/(o-n)+(t-n)/(o-n),1)),a=e(a);else if(4==h)o===n?a=t>=o?0:1:(a=s(0,r(.5/(o-n)+(t-n)/(o-n),1)),.5>a?a*=2:a=1-a);else if(5==h)if(o===n)a=t>=o?0:1;else{var l=o-n;a=-4/(l*l)*t*t+4/l*t}else 6==h?a=o===n?t>=o?0:1:(1+(Math.cos(Math.PI+2*Math.PI*(t-n)/(o-n))+0))/2:t>=i(n)&&(a=0>t-n?1-(n-t):s(0,r(o-t,1)));return a*this.a.v}var s=Math.max,r=Math.min,i=Math.floor;return this.mdf=!1,function(s,r,i){this.mdf=!1,this.k=!1,this.data=r,this.dynamicProperties=[],this.getValue=t,this.getMult=e,this.comp=s.comp,this.finalS=0,this.finalE=0,this.s=PropertyFactory.getProp(s,r.s||{k:0},0,0,this.dynamicProperties),this.e="e"in r?PropertyFactory.getProp(s,r.e,0,0,this.dynamicProperties):{v:2===r.r?r.totalChars:100},this.o=PropertyFactory.getProp(s,r.o||{k:0},0,0,this.dynamicProperties),this.xe=PropertyFactory.getProp(s,r.xe||{k:0},0,0,this.dynamicProperties),this.ne=PropertyFactory.getProp(s,r.ne||{k:0},0,0,this.dynamicProperties),this.a=PropertyFactory.getProp(s,r.a,0,.01,this.dynamicProperties),this.dynamicProperties.length?i.push(this):this.getValue()}}(),c={};return c.getProp=n,c.getDashProp=o,c.getTextSelectorProp=h,c.getGradientProp=m,c}(),ShapePropertyFactory=function(){function t(){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime;if(this.lastFrame!==n&&(this.lastFrame<this.keyframes[0].t-this.offsetTime&&t<this.keyframes[0].t-this.offsetTime||this.lastFrame>this.keyframes[this.keyframes.length-1].t-this.offsetTime&&t>this.keyframes[this.keyframes.length-1].t-this.offsetTime));else{var e,s,r;if(t<this.keyframes[0].t-this.offsetTime)e=this.keyframes[0].s[0],r=!0;else if(t>this.keyframes[this.keyframes.length-1].t-this.offsetTime)e=1===this.keyframes[this.keyframes.length-2].h?this.keyframes[this.keyframes.length-2].s[0]:this.keyframes[this.keyframes.length-2].e[0],r=!0;else{for(var i,a,o,h,l,p,m=0,f=this.keyframes.length-1,d=1,c=!0;c&&(i=this.keyframes[m],a=this.keyframes[m+1],!(a.t-this.offsetTime>t&&1==d));)f-1>m&&1==d||m>0&&-1==d?m+=d:c=!1;r=1===i.h,r&&m===f-1&&(i=a);var u;if(!r){var y;i.__fnct?y=i.__fnct:(y=BezierFactory.getBezierEasing(i.o.x,i.o.y,i.i.x,i.i.y).get,i.__fnct=y),u=t>=a.t-this.offsetTime?1:t<i.t-this.offsetTime?0:y((t-(i.t-this.offsetTime))/(a.t-this.offsetTime-(i.t-this.offsetTime))),s=i.e[0]}e=i.s[0]}h=this.v.i.length,p=e.i[0].length;var g,v=!1;for(o=0;h>o;o+=1)for(l=0;p>l;l+=1)r?(g=e.i[o][l],this.v.i[o][l]!==g&&(this.v.i[o][l]=g,this.pv.i[o][l]=g,v=!0),g=e.o[o][l],this.v.o[o][l]!==g&&(this.v.o[o][l]=g,this.pv.o[o][l]=g,v=!0),g=e.v[o][l],this.v.v[o][l]!==g&&(this.v.v[o][l]=g,this.pv.v[o][l]=g,v=!0)):(g=e.i[o][l]+(s.i[o][l]-e.i[o][l])*u,this.v.i[o][l]!==g&&(this.v.i[o][l]=g,this.pv.i[o][l]=g,v=!0),g=e.o[o][l]+(s.o[o][l]-e.o[o][l])*u,this.v.o[o][l]!==g&&(this.v.o[o][l]=g,this.pv.o[o][l]=g,v=!0),g=e.v[o][l]+(s.v[o][l]-e.v[o][l])*u,this.v.v[o][l]!==g&&(this.v.v[o][l]=g,this.pv.v[o][l]=g,v=!0));this.mdf=v,this.paths.length=0,this.paths[0]=this.v}this.lastFrame=t}function e(){return this.v}function s(){this.paths.length?(this.paths.length=1,this.paths[0]=this.v):this.paths=[this.v]}function r(t,r,i){this.comp=t.comp,this.k=!1,this.mdf=!1,this.closed=3===i?r.cl:r.closed,this.numNodes=3===i?r.pt.k.v.length:r.ks.k.v.length,this.v=3===i?r.pt.k:r.ks.k,this.getValue=e,this.pv=this.v,this.v.c=this.closed,this.paths=[this.v],this.reset=s}function i(e,r,i){this.comp=e.comp,this.offsetTime=e.data.st,this.getValue=t,this.keyframes=3===i?r.pt.k:r.ks.k,this.k=!0,this.closed=3===i?r.cl:r.closed;var a,o=this.keyframes[0].s[0].i.length,h=this.keyframes[0].s[0].i[0].length;for(this.numNodes=o,this.v={i:Array.apply(null,{length:o}),o:Array.apply(null,{length:o}),v:Array.apply(null,{length:o}),c:this.closed},this.pv={i:Array.apply(null,{length:o}),o:Array.apply(null,{length:o}),v:Array.apply(null,{length:o})},a=0;o>a;a+=1)this.v.i[a]=Array.apply(null,{length:h}),this.v.o[a]=Array.apply(null,{length:h}),this.v.v[a]=Array.apply(null,{length:h}),this.pv.i[a]=Array.apply(null,{length:h}),this.pv.o[a]=Array.apply(null,{length:h}),this.pv.v[a]=Array.apply(null,{length:h});this.paths=[],this.lastFrame=n,this.reset=s}function a(t,e,s,a){var n;if(3===s||4===s){var p=3===s?e.pt.k:e.ks.k;n=p.length?new i(t,e,s):new r(t,e,s)}else 5===s?n=new l(t,e):6===s?n=new o(t,e):7===s&&(n=new h(t,e));return n.k&&a.push(n),n}var n=-999999,o=function(){function t(){var t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2;2!==this.d&&3!==this.d?(this.v.v[0]=[t,e-i],this.v.i[0]=[t-s*r,e-i],this.v.o[0]=[t+s*r,e-i],this.v.v[1]=[t+s,e],this.v.i[1]=[t+s,e-i*r],this.v.o[1]=[t+s,e+i*r],this.v.v[2]=[t,e+i],this.v.i[2]=[t+s*r,e+i],this.v.o[2]=[t-s*r,e+i],this.v.v[3]=[t-s,e],this.v.i[3]=[t-s,e+i*r],this.v.o[3]=[t-s,e-i*r]):(this.v.v[0]=[t,e-i],this.v.o[0]=[t-s*r,e-i],this.v.i[0]=[t+s*r,e-i],this.v.v[1]=[t-s,e],this.v.o[1]=[t-s,e+i*r],this.v.i[1]=[t-s,e-i*r],this.v.v[2]=[t,e+i],this.v.o[2]=[t+s*r,e+i],this.v.i[2]=[t-s*r,e+i],this.v.v[3]=[t+s,e],this.v.o[3]=[t+s,e-i*r],this.v.i[3]=[t+s,e+i*r]),this.paths.length=0,this.paths[0]=this.v}function e(t){var e,s=this.dynamicProperties.length;if(this.elem.globalData.frameId!==this.frameId){for(this.mdf=!1,this.frameId=this.elem.globalData.frameId,e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.mdf&&(this.convertEllToPath(),this.paths.length=0,this.paths[0]=this.v)}}var r=roundCorner;return function(r,i){this.v={v:Array.apply(null,{length:4}),i:Array.apply(null,{length:4}),o:Array.apply(null,{length:4}),c:!0},this.numNodes=4,this.d=i.d,this.dynamicProperties=[],this.paths=[],i.closed=!0,this.closed=!0,this.elem=r,this.comp=r.comp,this.frameId=-1,this.mdf=!1,this.getValue=e,this.convertEllToPath=t,this.reset=s,this.p=PropertyFactory.getProp(r,i.p,1,0,this.dynamicProperties),this.s=PropertyFactory.getProp(r,i.s,1,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertEllToPath()}}(),h=function(){function t(){var t=Math.floor(this.pt.v),e=2*Math.PI/t;this.v.v.length=t,this.v.i.length=t,this.v.o.length=t;var s,r=this.or.v,i=this.os.v,a=2*Math.PI*r/(4*t),n=-Math.PI/2,o=3===this.data.d?-1:1;for(n+=this.r.v,s=0;t>s;s+=1){var h=r*Math.cos(n),l=r*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),m=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.v[s]=[h,l],this.v.i[s]=[h+p*a*i*o,l+m*a*i*o],this.v.o[s]=[h-p*a*i*o,l-m*a*i*o],n+=e*o}this.numNodes=t,this.paths.length=0,this.paths[0]=this.v}function e(){var t=2*Math.floor(this.pt.v),e=2*Math.PI/t;this.v.v.length=t,this.v.i.length=t,this.v.o.length=t;var s,r,i,a,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,m=2*Math.PI*o/(2*t),f=2*Math.PI*h/(2*t),d=-Math.PI/2;d+=this.r.v;var c=3===this.data.d?-1:1;for(s=0;t>s;s+=1){r=n?o:h,i=n?l:p,a=n?m:f;var u=r*Math.cos(d),y=r*Math.sin(d),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.v[s]=[u,y],this.v.i[s]=[u+g*a*i*c,y+v*a*i*c],this.v.o[s]=[u-g*a*i*c,y-v*a*i*c],n=!n,d+=e*c}this.numNodes=t,this.paths.length=0,this.paths[0]=this.v}function r(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem.globalData.frameId;var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t].mdf&&(this.mdf=!0);this.mdf&&this.convertToPath()}}return function(i,a){this.v={v:[],i:[],o:[],c:!0},this.elem=i,this.comp=i.comp,this.data=a,this.frameId=-1,this.d=a.d,this.dynamicProperties=[],this.mdf=!1,a.closed=!0,this.closed=!0,this.getValue=r,this.reset=s,1===a.sy?(this.ir=PropertyFactory.getProp(i,a.ir,0,0,this.dynamicProperties),this.is=PropertyFactory.getProp(i,a.is,0,.01,this.dynamicProperties),this.convertToPath=e):this.convertToPath=t,this.pt=PropertyFactory.getProp(i,a.pt,0,0,this.dynamicProperties),this.p=PropertyFactory.getProp(i,a.p,1,0,this.dynamicProperties),this.r=PropertyFactory.getProp(i,a.r,0,degToRads,this.dynamicProperties),this.or=PropertyFactory.getProp(i,a.or,0,0,this.dynamicProperties),this.os=PropertyFactory.getProp(i,a.os,0,.01,this.dynamicProperties),this.paths=[],this.dynamicProperties.length?this.k=!0:this.convertToPath()}}(),l=function(){function t(t){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem.globalData.frameId;var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.mdf&&this.convertRectToPath()}}function e(){var t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,r=this.s.v[1]/2,i=bm_min(s,r,this.r.v),a=i*(1-roundCorner);2===this.d||1===this.d?(this.v.v[0]=[t+s,e-r+i],this.v.o[0]=this.v.v[0],this.v.i[0]=[t+s,e-r+a],this.v.v[1]=[t+s,e+r-i],this.v.o[1]=[t+s,e+r-a],this.v.i[1]=this.v.v[1],this.v.v[2]=[t+s-i,e+r],this.v.o[2]=this.v.v[2],this.v.i[2]=[t+s-a,e+r],this.v.v[3]=[t-s+i,e+r],this.v.o[3]=[t-s+a,e+r],this.v.i[3]=this.v.v[3],this.v.v[4]=[t-s,e+r-i],this.v.o[4]=this.v.v[4],this.v.i[4]=[t-s,e+r-a],this.v.v[5]=[t-s,e-r+i],this.v.o[5]=[t-s,e-r+a],this.v.i[5]=this.v.v[5],this.v.v[6]=[t-s+i,e-r],this.v.o[6]=this.v.v[6],this.v.i[6]=[t-s+a,e-r],this.v.v[7]=[t+s-i,e-r],this.v.o[7]=[t+s-a,e-r],this.v.i[7]=this.v.v[7]):(this.v.v[0]=[t+s,e-r+i],this.v.o[0]=[t+s,e-r+a],this.v.i[0]=this.v.v[0],this.v.v[1]=[t+s-i,e-r],this.v.o[1]=this.v.v[1],this.v.i[1]=[t+s-a,e-r],this.v.v[2]=[t-s+i,e-r],this.v.o[2]=[t-s+a,e-r],this.v.i[2]=this.v.v[2],this.v.v[3]=[t-s,e-r+i],this.v.o[3]=this.v.v[3],this.v.i[3]=[t-s,e-r+a],this.v.v[4]=[t-s,e+r-i],this.v.o[4]=[t-s,e+r-a],this.v.i[4]=this.v.v[4],this.v.v[5]=[t-s+i,e+r],this.v.o[5]=this.v.v[5],this.v.i[5]=[t-s+a,e+r],this.v.v[6]=[t+s-i,e+r],this.v.o[6]=[t+s-a,e+r],this.v.i[6]=this.v.v[6],this.v.v[7]=[t+s,e+r-i],this.v.o[7]=this.v.v[7],this.v.i[7]=[t+s,e+r-a]),this.paths.length=0,this.paths[0]=this.v}return function(r,i){this.v={v:Array.apply(null,{length:8}),i:Array.apply(null,{length:8}),o:Array.apply(null,{length:8}),c:!0},this.paths=[],this.numNodes=8,this.elem=r,this.comp=r.comp,this.frameId=-1,this.d=i.d,this.dynamicProperties=[],this.mdf=!1,i.closed=!0,this.closed=!0,this.getValue=t,this.convertRectToPath=e,this.reset=s,this.p=PropertyFactory.getProp(r,i.p,1,0,this.dynamicProperties),this.s=PropertyFactory.getProp(r,i.s,1,0,this.dynamicProperties),this.r=PropertyFactory.getProp(r,i.r,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertRectToPath()}}(),p={};return p.getShapeProp=a,p}(),ShapeModifiers=function(){function t(t,e){r[t]||(r[t]=e)}function e(t,e,s,i){return new r[t](e,s,i)}var s={},r={};return s.registerModifier=t,s.getModifier=e,s}();ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShape=function(t){this.closed||this.shapes.push({shape:t,last:[]})},ShapeModifier.prototype.init=function(t,e,s){this.elem=t,this.frameId=-1,this.shapes=[],this.dynamicProperties=[],this.mdf=!1,this.closed=!1,this.k=!1,this.isTrimming=!1,this.comp=t.comp,this.initModifierProperties(t,e),this.dynamicProperties.length?(this.k=!0,s.push(this)):this.getValue(!0)},extendPrototype(ShapeModifier,TrimModifier),TrimModifier.prototype.processKeys=function(t){if(this.elem.globalData.frameId!==this.frameId||t){this.mdf=t?!0:!1,this.frameId=this.elem.globalData.frameId;var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e].mdf&&(this.mdf=!0);if(this.mdf||t){var r=this.o.v%360/360;0>r&&(r+=1);var i=this.s.v+r,a=this.e.v+r;if(i>a){var n=i;i=a,a=n}this.sValue=i,this.eValue=a,this.oValue=r}}},TrimModifier.prototype.initModifierProperties=function(t,e){this.sValue=0,this.eValue=0,this.oValue=0,this.getValue=this.processKeys,this.s=PropertyFactory.getProp(t,e.s,0,.01,this.dynamicProperties),this.e=PropertyFactory.getProp(t,e.e,0,.01,this.dynamicProperties),this.o=PropertyFactory.getProp(t,e.o,0,0,this.dynamicProperties),this.dynamicProperties.length||this.getValue(!0)},TrimModifier.prototype.getSegmentsLength=function(t){var e,s=t.c,r=t.v,i=t.o,a=t.i,n=r.length,o=[],h=0;for(e=0;n-1>e;e+=1)o[e]=bez.getBezierLength(r[e],r[e+1],i[e],a[e+1]),h+=o[e].addedLength;return s&&(o[e]=bez.getBezierLength(r[e],r[0],i[e],a[0]),h+=o[e].addedLength),{lengths:o,totalLength:h}},TrimModifier.prototype.processShapes=function(){var t,e,s,r,i,a,n,o=this.shapes.length,h=this.sValue,l=this.eValue,p=0;if(l===h)for(e=0;o>e;e+=1)this.shapes[e].shape.paths=[],this.shapes[e].shape.mdf=!0;else{var m,f,d=[];for(e=0;o>e;e+=1)if(m=this.shapes[e],m.shape.mdf||this.mdf){for(t=m.shape.paths,m.shape.mdf=!0,r=t.length,i=[],n=0,s=0;r>s;s+=1)a=this.getSegmentsLength(t[s]),i.push(a),n+=a.totalLength;m.totalShapeLength=n,m.pathsData=i,p+=n}else m.shape.paths=m.last;for(e=0;o>e;e+=1)if(f=[],m=this.shapes[e],m.shape.mdf){d.length=0,1>=l?d.push({s:m.totalShapeLength*h,e:m.totalShapeLength*l}):h>=1?d.push({s:m.totalShapeLength*(h-1),e:m.totalShapeLength*(l-1)}):(d.push({s:m.totalShapeLength*h,e:m.totalShapeLength}),d.push({s:0,e:m.totalShapeLength*(l-1)}));var c,u=this.addShapes(m,d[0]);f.push(u),d.length>1&&(m.shape.closed?this.addShapes(m,d[1],u):(u.i[0]=[u.v[0][0],u.v[0][1]],c=u.v.length-1,u.o[c]=[u.v[c][0],u.v[c][1]],u=this.addShapes(m,d[1]),f.push(u))),u.i[0]=[u.v[0][0],u.v[0][1]],c=u.v.length-1,u.o[c]=[u.v[c][0],u.v[c][1]],m.last=f,m.shape.paths=f}}this.dynamicProperties.length||(this.mdf=!1)},TrimModifier.prototype.addSegment=function(t,e,s,r,i,a){i.o[a]=e,i.i[a+1]=s,i.v[a+1]=r,i.v[a]=t},TrimModifier.prototype.addShapes=function(t,e,s){var r,i,a,n,o,h,l,p=t.pathsData,m=t.shape.paths,f=m.length,d=0;for(s?o=s.v.length-1:(s={c:!1,v:[],i:[],o:[]},o=0),r=0;f>r;r+=1){for(h=p[r].lengths,a=m[r].c?h.length:h.length+1,i=1;a>i;i+=1)if(n=h[i-1],d+n.addedLength<e.s)d+=n.addedLength;else{if(d>e.e)break;e.s<=d&&e.e>=d+n.addedLength?this.addSegment(m[r].v[i-1],m[r].o[i-1],m[r].i[i],m[r].v[i],s,o):(l=bez.getNewSegment(m[r].v[i-1],m[r].v[i],m[r].o[i-1],m[r].i[i],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[i-1]),this.addSegment(l.pt1,l.pt3,l.pt4,l.pt2,s,o)),d+=n.addedLength,o+=1}if(m[r].c&&d<=e.e){var c=h[i-1].addedLength;e.s<=d&&e.e>=d+c?this.addSegment(m[r].v[i-1],m[r].o[i-1],m[r].i[0],m[r].v[0],s,o):(l=bez.getNewSegment(m[r].v[i-1],m[r].v[0],m[r].o[i-1],m[r].i[0],(e.s-d)/c,(e.e-d)/c,h[i-1]),this.addSegment(l.pt1,l.pt3,l.pt4,l.pt2,s,o))}}return s},ShapeModifiers.registerModifier("tm",TrimModifier),extendPrototype(ShapeModifier,RoundCornersModifier),RoundCornersModifier.prototype.processKeys=function(t){if(this.elem.globalData.frameId!==this.frameId||t){this.mdf=t?!0:!1,this.frameId=this.elem.globalData.frameId;var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e].mdf&&(this.mdf=!0)}},RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this.dynamicProperties),this.dynamicProperties.length||this.getValue(!0)},RoundCornersModifier.prototype.processPath=function(t,e){var s,r,i,a,n,o,h,l,p,m,f=t.v.length,d=[],c=[],u=[];for(s=0;f>s;s+=1)r=t.v[s],a=t.o[s],i=t.i[s],r[0]===a[0]&&r[1]===a[1]&&r[0]===i[0]&&r[1]===i[1]?0!==s&&s!==f-1||t.c?(n=0===s?t.v[f-1]:t.v[s-1],p=Math.sqrt(Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2)),m=Math.min(p/2,e)/p,o=[r[0]+(n[0]-r[0])*m,r[1]-(r[1]-n[1])*m],l=o,h=[o[0]-(o[0]-r[0])*roundCorner,o[1]-(o[1]-r[1])*roundCorner],d.push(o),c.push(h),u.push(l),n=s===f-1?t.v[0]:t.v[s+1],p=Math.sqrt(Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2)),m=Math.min(p/2,e)/p,o=[r[0]+(n[0]-r[0])*m,r[1]+(n[1]-r[1])*m],l=[o[0]-(o[0]-r[0])*roundCorner,o[1]-(o[1]-r[1])*roundCorner],h=o,d.push(o),c.push(h),u.push(l)):(d.push(r),c.push(a),u.push(i)):(d.push(t.v[s]),c.push(t.o[s]),u.push(t.i[s]));return{v:d,o:c,i:u,c:t.c}},RoundCornersModifier.prototype.processShapes=function(){var t,e,s,r,i=this.shapes.length,a=this.rd.v;if(0!==a){var n,o=[];for(e=0;i>e;e+=1)if(n=this.shapes[e],n.shape.mdf||this.mdf){for(n.shape.mdf=!0,t=n.shape.paths,r=t.length,s=0;r>s;s+=1)o.push(this.processPath(t[s],a));n.shape.paths=o,n.last=o}else n.shape.paths=n.last}this.dynamicProperties.length||(this.mdf=!1)},ShapeModifiers.registerModifier("rd",RoundCornersModifier),SVGRenderer.prototype.createItem=function(t,e,s,r){switch(t.ty){case 2:return this.createImage(t,e,s,r);case 0:return this.createComp(t,e,s,r);case 1:return this.createSolid(t,e,s,r);case 4:return this.createShape(t,e,s,r);case 5:return this.createText(t,e,s,r);case 99:return this.createPlaceHolder(t,e)}return this.createBase(t,e,s)},SVGRenderer.prototype.buildItems=function(t,e,s,r,i){var a,n=t.length;s||(s=this.elements),e||(e=this.animationItem.container),r||(r=this);var o;for(a=n-1;a>=0;a--)s[a]=this.createItem(t[a],e,r,i),0===t[a].ty&&(o=[],this.buildItems(t[a].layers,s[a].getDomElement(),o,s[a],s[a].placeholder),s[a].setElements(o)),t[a].td&&s[a+1].setMatte(s[a].layerId)},SVGRenderer.prototype.includeLayers=function(t,e,s){var r,i=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var a,n,o,h=s.length;for(r=0;i>r;r+=1)for(a=0;h>a;){if(s[a].data.id==t[r].id){o=s[a],s[a]=this.createItem(t[r],e,this,o),0===t[r].ty&&(n=[],this.buildItems(t[r].layers,s[a].getDomElement(),n,s[a],s[r].placeholder),s[a].setElements(n));break}a+=1}for(r=0;i>r;r+=1)t[r].td&&s[r+1].setMatte(s[r].layerId)},SVGRenderer.prototype.createBase=function(t,e,s,r){return new SVGBaseElement(t,e,this.globalData,s,r)},SVGRenderer.prototype.createPlaceHolder=function(t,e){
return new PlaceHolderElement(t,e,this.globalData)},SVGRenderer.prototype.createShape=function(t,e,s,r){return new IShapeElement(t,e,this.globalData,s,r)},SVGRenderer.prototype.createText=function(t,e,s,r){return new SVGTextElement(t,e,this.globalData,s,r)},SVGRenderer.prototype.createImage=function(t,e,s,r){return new IImageElement(t,e,this.globalData,s,r)},SVGRenderer.prototype.createComp=function(t,e,s,r){return new ICompElement(t,e,this.globalData,s,r)},SVGRenderer.prototype.createSolid=function(t,e,s,r){return new ISolidElement(t,e,this.globalData,s,r)},SVGRenderer.prototype.configAnimation=function(t){this.animationItem.container=document.createElementNS(svgNS,"svg"),this.animationItem.container.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.animationItem.container.setAttribute("width",t.w),this.animationItem.container.setAttribute("height",t.h),this.animationItem.container.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.animationItem.container.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.container.style.width="100%",this.animationItem.container.style.height="100%",this.animationItem.container.style.transform="translate3d(0,0,0)",this.animationItem.container.style.transformOrigin=this.animationItem.container.style.mozTransformOrigin=this.animationItem.container.style.webkitTransformOrigin=this.animationItem.container.style["-webkit-transform"]="0px 0px 0px",this.animationItem.wrapper.appendChild(this.animationItem.container);var e=document.createElementNS(svgNS,"defs");this.globalData.defs=e,this.animationItem.container.appendChild(e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getPath=this.animationItem.getPath.bind(this.animationItem),this.globalData.elementLoaded=this.animationItem.elementLoaded.bind(this.animationItem),this.globalData.frameId=0,this.globalData.compSize={w:t.w,h:t.h},this.globalData.frameRate=t.fr;var s=document.createElementNS(svgNS,"clipPath"),r=document.createElementNS(svgNS,"rect");r.setAttribute("width",t.w),r.setAttribute("height",t.h),r.setAttribute("x",0),r.setAttribute("y",0);var i="animationMask_"+randomString(10);s.setAttribute("id",i),s.appendChild(r);var a=document.createElementNS(svgNS,"g");a.setAttribute("clip-path","url(#"+i+")"),this.animationItem.container.appendChild(a),e.appendChild(s),this.animationItem.container=a,this.layers=t.layers,this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e)},SVGRenderer.prototype.buildStage=function(t,e,s){var r,i,a=e.length;for(s||(s=this.elements),r=a-1;r>=0;r--)i=e[r],void 0!==i.parent&&this.buildItemParenting(i,s[r],e,i.parent,s,!0),0===i.ty&&this.buildStage(s[r].getComposingElement(),i.layers,s[r].getElements())},SVGRenderer.prototype.buildItemParenting=function(t,e,s,r,i,a){t.parents||(t.parents=[]),a&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==r&&(e.getHierarchy().push(i[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,i,!1)),n+=1},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;e>t;t++)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0},SVGRenderer.prototype.updateContainerSize=function(){},SVGRenderer.prototype.renderFrame=function(t){if(this.renderedFrame!=t&&!this.destroyed){null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1;var e,s=this.layers.length;for(e=s-1;e>=0;e--)this.elements[e].prepareFrame(t-this.layers[e].st);for(e=s-1;e>=0;e--)this.elements[e].renderFrame()}},SVGRenderer.prototype.hide=function(){this.animationItem.container.style.display="none"},SVGRenderer.prototype.show=function(){this.animationItem.container.style.display="block"},CanvasRenderer.prototype.createItem=function(t,e,s){switch(t.ty){case 0:return this.createComp(t,e,s);case 1:return this.createSolid(t,e,s);case 2:return this.createImage(t,e,s);case 4:return this.createShape(t,e,s);case 5:return this.createText(t,e,s);case 99:return this.createPlaceHolder(t,e,s);default:return this.createBase(t,e,s)}return this.createBase(t,e,s)},CanvasRenderer.prototype.buildItems=function(t,e,s){e||(e=this.elements),s||(s=this);var r,i=t.length;for(r=0;i>r;r++)if(e[r]=this.createItem(t[r],s,s.globalData),0===t[r].ty){var a=[];this.buildItems(t[r].layers,a,e[r],s.globalData),e[e.length-1].setElements(a)}},CanvasRenderer.prototype.includeLayers=function(t,e,s){var r,i=t.length;s||(s=this.elements);var a,n,o=s.length;for(r=0;i>r;r+=1)for(a=0;o>a;){if(s[a].data.id==t[r].id){s[a]=this.createItem(t[r],this),0===t[r].ty&&(n=[],this.buildItems(t[r].layers,n,s[a]),s[a].setElements(n));break}a+=1}},CanvasRenderer.prototype.createBase=function(t,e,s){return new CVBaseElement(t,e,s)},CanvasRenderer.prototype.createShape=function(t,e,s){return new CVShapeElement(t,e,s)},CanvasRenderer.prototype.createText=function(t,e,s){return new CVTextElement(t,e,s)},CanvasRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,null,e)},CanvasRenderer.prototype.createImage=function(t,e,s){return new CVImageElement(t,e,s)},CanvasRenderer.prototype.createComp=function(t,e,s){return new CVCompElement(t,e,s)},CanvasRenderer.prototype.createSolid=function(t,e,s){return new CVSolidElement(t,e,s)},CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13]){if(!this.renderConfig.clearCanvas)return void this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13]);this.transformMat.cloneFromProps(t),this.transformMat.transform(this.contextData.cTr.props[0],this.contextData.cTr.props[1],this.contextData.cTr.props[2],this.contextData.cTr.props[3],this.contextData.cTr.props[4],this.contextData.cTr.props[5],this.contextData.cTr.props[6],this.contextData.cTr.props[7],this.contextData.cTr.props[8],this.contextData.cTr.props[9],this.contextData.cTr.props[10],this.contextData.cTr.props[11],this.contextData.cTr.props[12],this.contextData.cTr.props[13],this.contextData.cTr.props[14],this.contextData.cTr.props[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var e=this.contextData.cTr.props;this.canvasContext.setTransform(e[0],e[1],e[4],e[5],e[12],e[13])}},CanvasRenderer.prototype.ctxOpacity=function(t){if(1!==t){if(!this.renderConfig.clearCanvas)return void(this.canvasContext.globalAlpha*=0>t?0:t);this.contextData.cO*=0>t?0:t,this.canvasContext.globalAlpha=this.contextData.cO}},CanvasRenderer.prototype.reset=function(){return this.renderConfig.clearCanvas?(this.contextData.cArrPos=0,this.contextData.cTr.reset(),void(this.contextData.cO=1)):void this.canvasContext.restore()},CanvasRenderer.prototype.save=function(t){if(!this.renderConfig.clearCanvas)return void this.canvasContext.save();t&&this.canvasContext.save();var e=this.contextData.cTr.props;(null===this.contextData.saved[this.contextData.cArrPos]||void 0===this.contextData.saved[this.contextData.cArrPos])&&(this.contextData.saved[this.contextData.cArrPos]=new Array(16));var s,r=this.contextData.saved[this.contextData.cArrPos];for(s=0;16>s;s+=1)r[s]=e[s];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1},CanvasRenderer.prototype.restore=function(t){if(!this.renderConfig.clearCanvas)return void this.canvasContext.restore();t&&this.canvasContext.restore(),this.contextData.cArrPos-=1;var e,s=this.contextData.saved[this.contextData.cArrPos],r=this.contextData.cTr.props;for(e=0;16>e;e+=1)r[e]=s[e];this.canvasContext.setTransform(s[0],s[1],s[4],s[5],s[12],s[13]),s=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=s,this.canvasContext.globalAlpha=s},CanvasRenderer.prototype.configAnimation=function(t){this.animationItem.wrapper?(this.animationItem.container=document.createElement("canvas"),this.animationItem.container.style.width="100%",this.animationItem.container.style.height="100%",this.animationItem.container.style.transformOrigin=this.animationItem.container.style.mozTransformOrigin=this.animationItem.container.style.webkitTransformOrigin=this.animationItem.container.style["-webkit-transform"]="0px 0px 0px",this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d")):this.canvasContext=this.renderConfig.context,this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.totalFrames=Math.floor(t.tf),this.globalData.compWidth=t.w,this.globalData.compHeight=t.h,this.globalData.frameRate=t.fr,this.globalData.frameId=0,this.globalData.compSize={w:t.w,h:t.h},this.layers=t.layers,this.transformCanvas={},this.transformCanvas.w=t.w,this.transformCanvas.h=t.h,this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,document),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getPath=this.animationItem.getPath.bind(this.animationItem),this.globalData.elementLoaded=this.animationItem.elementLoaded.bind(this.animationItem),this.globalData.addPendingElement=this.animationItem.addPendingElement.bind(this.animationItem)},CanvasRenderer.prototype.updateContainerSize=function(){var t,e;if(this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr),"fit"==this.renderConfig.scaleMode){var s=t/e,r=this.transformCanvas.w/this.transformCanvas.h;r>s?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr,this.transformCanvas.ty=0)}else this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0;this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1];var i,a=this.elements.length;for(i=0;a>i;i+=1)0===this.elements[i].data.ty&&this.elements[i].resize(this.transformCanvas)},CanvasRenderer.prototype.buildStage=function(t,e,s){s||(s=this.elements);var r,i,a=e.length;for(r=a-1;r>=0;r--)i=e[r],void 0!==i.parent&&this.buildItemHierarchy(i,s[r],e,i.parent,s,!0),0==i.ty&&this.buildStage(null,i.layers,s[r].getElements());this.updateContainerSize()},CanvasRenderer.prototype.buildItemHierarchy=function(t,e,s,r,i,a){var n=0,o=s.length;for(a&&e.resetHierarchy();o>n;)s[n].ind===r&&(e.getHierarchy().push(i[n]),void 0!==s[n].parent&&this.buildItemHierarchy(t,e,s,s[n].parent,i,!1)),n+=1},CanvasRenderer.prototype.destroy=function(){this.renderConfig.clearCanvas&&(this.animationItem.wrapper.innerHTML="");var t,e=this.layers?this.layers.length:0;for(t=e-1;t>=0;t-=1)this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRenderer.prototype.renderFrame=function(t){if(!(this.renderedFrame==t&&this.renderConfig.clearCanvas===!0||this.destroyed||null===t)){this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem.firstFrame,this.globalData.frameId+=1,this.renderConfig.clearCanvas===!0?(this.reset(),this.canvasContext.save(),this.canvasContext.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)):this.save(),this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip();var e,s=this.layers.length;for(e=0;s>e;e++)this.elements[e].prepareFrame(t-this.layers[e].st);for(e=s-1;e>=0;e-=1)this.elements[e].renderFrame();this.renderConfig.clearCanvas!==!0?this.restore():this.canvasContext.restore()}},CanvasRenderer.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRenderer.prototype.show=function(){this.animationItem.container.style.display="block"},HybridRenderer.prototype.createItem=function(t,e,s,r){switch(t.ty){case 2:return this.createImage(t,e,s,r);case 0:return this.createComp(t,e,s,r);case 1:return this.createSolid(t,e,s,r);case 4:return this.createShape(t,e,s,r);case 5:return this.createText(t,e,s,r);case 13:return this.createCamera(t,e,s,r);case 99:return this.createPlaceHolder(t,e)}return this.createBase(t,e,s)},HybridRenderer.prototype.buildItems=function(t,e,s,r,i){var a,n=t.length;s||(s=this.elements),r||(r=this);var o,h,l=!1;for(a=n-1;a>=0;a--)e?s[a]=this.createItem(t[a],e,r,i):t[a].ddd?(l||(l=!0,o=this.getThreeDContainer()),s[a]=this.createItem(t[a],o,r,i)):(l=!1,s[a]=this.createItem(t[a],this.animationItem.resizerElem,r,i)),0===t[a].ty&&(h=[],this.buildItems(t[a].layers,s[a].getDomElement(),h,s[a],s[a].placeholder),s[a].setElements(h)),t[a].td&&s[a+1].setMatte(s[a].layerId);if(this.currentContainer=this.animationItem.resizerElem,!e&&this.threeDElements.length)if(this.camera)this.camera.setup();else{var p=this.globalData.compSize.w,m=this.globalData.compSize.h;for(n=this.threeDElements.length,a=0;n>a;a+=1)this.threeDElements[0][a].style.perspective=this.threeDElements[0][a].style.webkitPerspective=Math.sqrt(Math.pow(p,2)+Math.pow(m,2))+"px"}},HybridRenderer.prototype.includeLayers=function(t,e,s){var r,i=t.length;s||(s=this.elements),e||(e=this.currentContainer);var a,n,o,h=s.length;for(r=0;i>r;r+=1)if(t[r].id)for(a=0;h>a;)s[a].data.id==t[r].id&&(o=s[a],s[a]=this.createItem(t[r],e,this,o),0===t[r].ty&&(n=[],this.buildItems(t[r].layers,s[a].getDomElement(),n,s[a],s[r].placeholder),s[a].setElements(n))),a+=1;else{var l=this.createItem(t[r],e,this);s.push(l),0===t[r].ty&&(n=[],this.buildItems(t[r].layers,l.getDomElement(),n,l),l.setElements(n))}for(r=0;i>r;r+=1)t[r].td&&s[r+1].setMatte(s[r].layerId)},HybridRenderer.prototype.createBase=function(t,e,s,r){return new SVGBaseElement(t,e,this.globalData,s,r)},HybridRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},HybridRenderer.prototype.createShape=function(t,e,s,r){return s.isSvg?new IShapeElement(t,e,this.globalData,s,r):new HShapeElement(t,e,this.globalData,s,r)},HybridRenderer.prototype.createText=function(t,e,s,r){return s.isSvg?new SVGTextElement(t,e,this.globalData,s,r):new HTextElement(t,e,this.globalData,s,r)},HybridRenderer.prototype.createCamera=function(t,e,s,r){return this.camera=new HCameraElement(t,e,this.globalData,s,r),this.camera},HybridRenderer.prototype.createImage=function(t,e,s,r){return s.isSvg?new IImageElement(t,e,this.globalData,s,r):new HImageElement(t,e,this.globalData,s,r)},HybridRenderer.prototype.createComp=function(t,e,s,r){return s.isSvg?new ICompElement(t,e,this.globalData,s,r):new HCompElement(t,e,this.globalData,s,r)},HybridRenderer.prototype.createSolid=function(t,e,s,r){return s.isSvg?new ISolidElement(t,e,this.globalData,s,r):new HSolidElement(t,e,this.globalData,s,r)},HybridRenderer.prototype.getThreeDContainer=function(){var t=document.createElement("div");styleDiv(t),t.style.width=this.globalData.compSize.w+"px",t.style.height=this.globalData.compSize.h+"px",t.style.transformOrigin=t.style.mozTransformOrigin=t.style.webkitTransformOrigin="50% 50%";var e=document.createElement("div");return styleDiv(e),e.style.transform=e.style.webkitTransform="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)",t.appendChild(e),this.animationItem.resizerElem.appendChild(t),this.threeDElements.push([t,e]),e},HybridRenderer.prototype.configAnimation=function(t){var e=document.createElement("div"),s=this.animationItem.wrapper;e.style.width=t.w+"px",e.style.height=t.h+"px",this.animationItem.resizerElem=e,styleDiv(e),e.style.transformStyle=e.style.webkitTransformStyle=e.style.mozTransformStyle="flat",s.appendChild(e),e.style.overflow="hidden";var r=document.createElementNS(svgNS,"svg");r.setAttribute("width","1"),r.setAttribute("height","1"),styleDiv(r),this.animationItem.resizerElem.appendChild(r);var i=document.createElementNS(svgNS,"defs");r.appendChild(i),this.globalData.defs=i,this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getPath=this.animationItem.getPath.bind(this.animationItem),this.globalData.elementLoaded=this.animationItem.elementLoaded.bind(this.animationItem),this.globalData.frameId=0,this.globalData.compSize={w:t.w,h:t.h},this.globalData.frameRate=t.fr,this.layers=t.layers,this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,r),this.updateContainerSize()},HybridRenderer.prototype.buildStage=function(t,e,s){var r,i,a=e.length;for(s||(s=this.elements),r=a-1;r>=0;r--)i=e[r],void 0!==i.parent&&this.buildItemParenting(i,s[r],e,i.parent,s,!0),0===i.ty&&this.buildStage(s[r].getComposingElement(),i.layers,s[r].getElements())},HybridRenderer.prototype.buildItemParenting=function(t,e,s,r,i,a){t.parents||(t.parents=[]),a&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==r&&(e.getHierarchy().push(i[n]),13===e.data.ty&&i[n].finalTransform.mProp.setInverted(),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,i,!1)),n+=1},HybridRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;e>t;t++)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0},HybridRenderer.prototype.updateContainerSize=function(){var t,e,s,r,i=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight,n=i/a,o=this.globalData.compSize.w/this.globalData.compSize.h;o>n?(t=i/this.globalData.compSize.w,e=i/this.globalData.compSize.w,s=0,r=(a-this.globalData.compSize.h*(i/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,s=(i-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,r=0),this.animationItem.resizerElem.style.transform=this.animationItem.resizerElem.style.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+s+","+r+",0,1)"},HybridRenderer.prototype.renderFrame=function(t){if(this.renderedFrame!=t&&!this.destroyed){null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1;var e,s=this.layers.length;for(e=0;s>e;e++)this.elements[e].prepareFrame(t-this.layers[e].st);for(e=0;s>e;e++)this.elements[e].renderFrame()}},HybridRenderer.prototype.hide=function(){this.animationItem.resizerElem.style.display="none"},HybridRenderer.prototype.show=function(){this.animationItem.resizerElem.style.display="block"},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.prepareFrame=function(){var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue()},MaskElement.prototype.renderFrame=function(){var t,e=this.masksProperties.length;for(t=0;e>t;t++)if("n"!==this.masksProperties[t].mode&&this.masksProperties[t].cl!==!1&&((this.viewData[t].prop.mdf||this.firstFrame)&&this.drawPath(this.masksProperties[t],this.viewData[t].prop.v,this.viewData[t]),this.storedData[t].x&&(this.storedData[t].x.mdf||this.firstFrame))){var s=this.storedData[t].expan;this.storedData[t].x.v<0?("erode"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="erode",this.storedData[t].elem.setAttribute("filter","url(#"+this.storedData[t].filterId+")")),s.setAttribute("radius",-this.storedData[t].x.v)):("dilate"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="dilate",this.storedData[t].elem.setAttribute("filter",null)),this.storedData[t].elem.setAttribute("stroke-width",2*this.storedData[t].x.v))}this.firstFrame=!1},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,s){var r,i,a="";for(i=e.v.length,r=1;i>r;r+=1)1==r&&(a+=" M"+bm_rnd(e.v[0][0])+","+bm_rnd(e.v[0][1])),a+=" C"+bm_rnd(e.o[r-1][0])+","+bm_rnd(e.o[r-1][1])+" "+bm_rnd(e.i[r][0])+","+bm_rnd(e.i[r][1])+" "+bm_rnd(e.v[r][0])+","+bm_rnd(e.v[r][1]);t.cl&&(a+=" C"+bm_rnd(e.o[r-1][0])+","+bm_rnd(e.o[r-1][1])+" "+bm_rnd(e.i[0][0])+","+bm_rnd(e.i[0][1])+" "+bm_rnd(e.v[0][0])+","+bm_rnd(e.v[0][1])),s.lastPath!==a&&(t.inv?s.elem.setAttribute("d",this.solidPath+a):s.elem.setAttribute("d",a),s.lastPath=a)},MaskElement.prototype.getMask=function(t){for(var e=0,s=this.masksProperties.length;s>e;){if(this.masksProperties[e].nm===t)return{maskPath:this.viewData[e].prop.pv};e+=1}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.paths=null,this.masksProperties=null},BaseElement.prototype.checkMasks=function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;e>t;){if("n"!==this.data.masksProperties[t].mode&&this.data.masksProperties[t].cl!==!1)return!0;t+=1}return!1},BaseElement.prototype.prepareFrame=function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isVisible!==!0&&(this.globalData.mdf=!0,this.isVisible=!0,this.firstFrame=!0,this.data.hasMask&&(this.maskManager.firstFrame=!0)):this.isVisible!==!1&&(this.globalData.mdf=!0,this.isVisible=!1);var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e].mdf&&(this.globalData.mdf=!0);return this.data.hasMask&&this.maskManager.prepareFrame(t*this.data.sr),this.currentFrameNum=t*this.data.sr,this.isVisible},BaseElement.prototype.setBlendMode=function(){var t="";switch(this.data.bm){case 1:t="multiply";break;case 2:t="screen";break;case 3:t="overlay";break;case 4:t="darken";break;case 5:t="lighten";break;case 6:t="color-dodge";break;case 7:t="color-burn";break;case 8:t="hard-light";break;case 9:t="soft-light";break;case 10:t="difference";break;case 11:t="exclusion";break;case 12:t="hue";break;case 13:t="saturation";break;case 14:t="color";break;case 15:t="luminosity"}this.layerElement.style["mix-blend-mode"]=t},BaseElement.prototype.init=function(){this.data.sr||(this.data.sr=1),this.dynamicProperties=[],this.data.ef&&expressionsPlugin&&(this.effectsManager=expressionsPlugin.getEffectsManager(this.data,this,this.dynamicProperties),this.effect=this.effectsManager.bind(this.effectsManager)),this.hidden=!1,this.firstFrame=!0,this.isVisible=!1,this.currentFrameNum=-99999,this.lastNum=-99999,this.finalTransform={mProp:PropertyFactory.getProp(this,this.data.ks,2,null,this.dynamicProperties),matMdf:!1,opMdf:!1,mat:new Matrix,opacity:1},this.finalTransform.op=this.finalTransform.mProp.o,this.transform=this.finalTransform.mProp,11!==this.data.ty&&this.createElements(),this.data.hasMask&&this.addMasks(this.data)},BaseElement.prototype.getType=function(){return this.type},BaseElement.prototype.resetHierarchy=function(){this.hierarchy?this.hierarchy.length=0:this.hierarchy=[]},BaseElement.prototype.getHierarchy=function(){return this.hierarchy||(this.hierarchy=[]),this.hierarchy},BaseElement.prototype.getLayerSize=function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}},BaseElement.prototype.hide=function(){},BaseElement.prototype.mHelper=new Matrix,createElement(BaseElement,SVGBaseElement),SVGBaseElement.prototype.appendNodeToParent=function(t){if(!this.data.hd||this.data.td)if(this.placeholder){var e=this.placeholder.phElement;e.parentNode.insertBefore(t,e)}else this.parentContainer.appendChild(t)},SVGBaseElement.prototype.createElements=function(){if(this.data.td){if(3==this.data.td)this.layerElement=document.createElementNS(svgNS,"mask"),this.layerElement.setAttribute("id",this.layerId),this.layerElement.setAttribute("mask-type","luminance"),this.globalData.defs.appendChild(this.layerElement);else if(2==this.data.td){var t=document.createElementNS(svgNS,"mask");t.setAttribute("id",this.layerId),t.setAttribute("mask-type","alpha");var e=document.createElementNS(svgNS,"g");t.appendChild(e),this.layerElement=document.createElementNS(svgNS,"g");var s=document.createElementNS(svgNS,"filter"),r=randomString(10);s.setAttribute("id",r),s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%");var i=document.createElementNS(svgNS,"feComponentTransfer");i.setAttribute("in","SourceGraphic"),s.appendChild(i);var a=document.createElementNS(svgNS,"feFuncA");a.setAttribute("type","table"),a.setAttribute("tableValues","1.0 0.0"),i.appendChild(a),this.globalData.defs.appendChild(s);var n=document.createElementNS(svgNS,"rect");n.setAttribute("width","100%"),n.setAttribute("height","100%"),n.setAttribute("x","0"),n.setAttribute("y","0"),n.setAttribute("fill","#ffffff"),n.setAttribute("opacity","0"),e.setAttribute("filter","url(#"+r+")"),e.appendChild(n),e.appendChild(this.layerElement),this.globalData.defs.appendChild(t)}else{this.layerElement=document.createElementNS(svgNS,"g");var o=document.createElementNS(svgNS,"mask");o.setAttribute("id",this.layerId),o.setAttribute("mask-type","alpha"),o.appendChild(this.layerElement),this.globalData.defs.appendChild(o)}this.data.hasMask&&(this.maskedElement=this.layerElement)}else this.data.hasMask?(this.layerElement=document.createElementNS(svgNS,"g"),this.data.tt?(this.matteElement=document.createElementNS(svgNS,"g"),this.matteElement.appendChild(this.layerElement),this.appendNodeToParent(this.matteElement)):this.appendNodeToParent(this.layerElement),this.maskedElement=this.layerElement):this.data.tt?(this.matteElement=document.createElementNS(svgNS,"g"),this.matteElement.setAttribute("id",this.layerId),this.appendNodeToParent(this.matteElement),this.layerElement=this.matteElement):this.layerElement=this.parentContainer;!this.data.ln&&!this.data.cl||4!==this.data.ty&&0!==this.data.ty||(this.layerElement===this.parentContainer&&(this.layerElement=document.createElementNS(svgNS,"g"),this.appendNodeToParent(this.layerElement)),this.data.